gdalautotest-3.1.2/0000775000175000017500000000000013701060034012665 5ustar evenevengdalautotest-3.1.2/osr/0000775000175000017500000000000013701057754013507 5ustar evenevengdalautotest-3.1.2/osr/osr_pm.py0000775000175000017500000000641313701057753015366 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_pm.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test some prime meridian related issues with EPSG translation # and evaluation by PROJ.4. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import osr import pytest ############################################################################### # Check that EPSG:27572 lookup has the prime meridian properly set, # and the central meridian. def test_osr_pm_1(): srs = osr.SpatialReference() srs.ImportFromEPSG(27572) assert float(srs.GetAttrValue('PRIMEM', 1)) == pytest.approx(2.33722917, abs=0.0000005), \ 'Wrong prime meridian.' assert srs.GetProjParm(osr.SRS_PP_CENTRAL_MERIDIAN) == pytest.approx(0.0, abs=0.0000005), \ 'Wrong central meridian.' ############################################################################### # Check that EPSG:27572 lookup has the prime meridian properly set, # and the central meridian in the PROJ.4 string. def test_osr_pm_2(): srs = osr.SpatialReference() srs.ImportFromEPSG(27572) proj4_srs = srs.ExportToProj4() assert proj4_srs.find('+pm=paris') != -1, 'prime meridian wrong or missing.' assert proj4_srs.find('+lon_0=0') != -1, '+lon_0 is wrong.' ############################################################################### # Convert PROJ.4 format to WKT and verify that PM and central meridian # are properly preserved. def test_osr_pm_3(): srs = osr.SpatialReference() srs.ImportFromProj4('+proj=utm +zone=30 +datum=WGS84 +pm=bogota') assert abs(float(srs.GetAttrValue('PRIMEM', 1)) + 74.08091666678081) <= 0.0000005, \ 'Wrong prime meridian.' assert abs(srs.GetProjParm(osr.SRS_PP_CENTRAL_MERIDIAN) + 3.0) <= 0.0000005, \ 'Wrong central meridian.' ############################################################################### gdalautotest-3.1.2/osr/osr_ct.py0000775000175000017500000003773713701057753015375 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_ct.py 7294a96e7747b442cd7033280c2780cfd2bca572 2020-06-12 16:43:48 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test coordinate transformations. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # Copyright (c) 2014, Google # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal from osgeo import osr from osgeo import ogr import gdaltest import pytest ############################################################################### # Verify that we have PROJ.4 available. def test_osr_ct_1(): utm_srs = osr.SpatialReference() utm_srs.SetUTM(11) utm_srs.SetWellKnownGeogCS('WGS84') ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') try: gdal.PushErrorHandler('CPLQuietErrorHandler') ct = osr.CoordinateTransformation(ll_srs, utm_srs) gdal.PopErrorHandler() if gdal.GetLastErrorMsg().find('Unable to load PROJ.4') != -1: pytest.skip('PROJ.4 missing, transforms not available.') except ValueError: gdal.PopErrorHandler() if gdal.GetLastErrorMsg().find('Unable to load PROJ.4') != -1: pytest.skip('PROJ.4 missing, transforms not available.') pytest.fail(gdal.GetLastErrorMsg()) assert not (ct is None or ct.this is None), \ 'Unable to create simple CoordinateTransformat.' ############################################################################### # Actually perform a simple LL to UTM conversion. def test_osr_ct_2(): utm_srs = osr.SpatialReference() utm_srs.SetUTM(11) utm_srs.SetWellKnownGeogCS('WGS84') ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') ct = osr.CoordinateTransformation(ll_srs, utm_srs) result = ct.TransformPoint(32.0, -117.5, 0.0) assert result[0] == pytest.approx(452772.06, abs=0.01) and result[1] == pytest.approx(3540544.89, abs=0.01) and result[2] == pytest.approx(0.0, abs=0.01), \ 'Wrong LL to UTM result' ############################################################################### # Transform an OGR geometry ... this is mostly aimed at ensuring that # the OGRCoordinateTransformation target SRS isn't deleted till the output # geometry which also uses it is deleted. def test_osr_ct_3(): utm_srs = osr.SpatialReference() utm_srs.SetUTM(11) utm_srs.SetWellKnownGeogCS('WGS84') ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') ll_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ct = osr.CoordinateTransformation(ll_srs, utm_srs) pnt = ogr.CreateGeometryFromWkt('POINT(-117.5 32.0)', ll_srs) result = pnt.Transform(ct) assert result == 0 ll_srs = None ct = None utm_srs = None out_srs = pnt.GetSpatialReference().ExportToPrettyWkt() assert out_srs[0:6] == 'PROJCS', 'output srs corrupt, ref counting issue?' pnt = None ############################################################################### # Actually perform a simple LL to UTM conversion. # Works for both OG and NG bindings def test_osr_ct_4(): utm_srs = osr.SpatialReference() utm_srs.SetUTM(11) utm_srs.SetWellKnownGeogCS('WGS84') ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') ll_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ct = osr.CoordinateTransformation(ll_srs, utm_srs) result = ct.TransformPoints([(-117.5, 32.0, 0.0), (-117.5, 32.0)]) assert len(result) == 2 assert len(result[0]) == 3 for i in range(2): assert result[i][0] == pytest.approx(452772.06, abs=0.01) and result[i][1] == pytest.approx(3540544.89, abs=0.01) and result[i][2] == pytest.approx(0.0, abs=0.01), \ 'Wrong LL to UTM result' ############################################################################### # Same test, but with any sequence of tuples instead of a tuple of tuple # New in NG bindings (#3020) def test_osr_ct_5(): utm_srs = osr.SpatialReference() utm_srs.SetUTM(11) utm_srs.SetWellKnownGeogCS('WGS84') ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') ll_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ct = osr.CoordinateTransformation(ll_srs, utm_srs) result = ct.TransformPoints(((-117.5, 32.0, 0.0), (-117.5, 32.0))) for i in range(2): assert result[i][0] == pytest.approx(452772.06, abs=0.01) and result[i][1] == pytest.approx(3540544.89, abs=0.01) and result[i][2] == pytest.approx(0.0, abs=0.01), \ 'Wrong LL to UTM result' ############################################################################### # Test osr.CreateCoordinateTransformation() method def test_osr_ct_6(): with gdaltest.error_handler(): ct = osr.CreateCoordinateTransformation(None, None) assert ct is None utm_srs = osr.SpatialReference() utm_srs.SetUTM(11) utm_srs.SetWellKnownGeogCS('WGS84') ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') ll_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ct = osr.CreateCoordinateTransformation(ll_srs, utm_srs) assert ct is not None result = ct.TransformPoints(((-117.5, 32.0, 0.0), (-117.5, 32.0))) for i in range(2): assert result[i][0] == pytest.approx(452772.06, abs=0.01) and result[i][1] == pytest.approx(3540544.89, abs=0.01) and result[i][2] == pytest.approx(0.0, abs=0.01), \ 'Wrong LL to UTM result' ############################################################################### # Actually perform a simple Pseudo Mercator to LL conversion. def test_osr_ct_7(): pm_srs = osr.SpatialReference() pm_srs.ImportFromEPSG(3857) ll_srs = osr.SpatialReference() ll_srs.SetWellKnownGeogCS('WGS84') ll_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ct = osr.CoordinateTransformation(pm_srs, ll_srs) (x, y, z) = ct.TransformPoint(7000000, 7000000, 0) (exp_x, exp_y, exp_z) = (62.8820698884, 53.0918187696, 0.0) if (exp_x != pytest.approx(x, abs=0.00001) or exp_y != pytest.approx(y, abs=0.00001) or exp_z != pytest.approx(z, abs=0.00001)): print('Got: (%f, %f, %f)' % (x, y, z)) print('Expected: (%f, %f, %f)' % (exp_x, exp_y, exp_z)) pytest.fail('Wrong LL for Pseudo Mercator result') pnt = ogr.CreateGeometryFromWkt('POINT(%g %g)' % (7000000, 7000000), pm_srs) expected_pnt = ogr.CreateGeometryFromWkt('POINT(%.10f %.10f)' % (exp_x, exp_y), ll_srs) result = pnt.Transform(ct) assert result == 0 if (expected_pnt.GetX() != pytest.approx(pnt.GetX(), abs=0.00001) or expected_pnt.GetY() != pytest.approx(pnt.GetY(), abs=0.00001) or expected_pnt.GetZ() != pytest.approx(pnt.GetZ(), abs=0.00001)): print('Got: %s' % pnt.ExportToWkt()) print('Expected: %s' % expected_pnt.ExportToWkt()) pytest.fail('Failed to transform from Pseudo Mercator to LL') ############################################################################### # Test WebMercator -> WGS84 optimized transform def test_osr_ct_8(): src_srs = osr.SpatialReference() src_srs.ImportFromEPSG(3857) dst_srs = osr.SpatialReference() dst_srs.SetWellKnownGeogCS('WGS84') dst_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ct = osr.CoordinateTransformation(src_srs, dst_srs) pnts = [(0, 6274861.39400658), (1, 6274861.39400658)] result = ct.TransformPoints(pnts) expected_result = [(0.0, 49.000000000000007, 0.0), (8.9831528411952125e-06, 49.000000000000007, 0.0)] for i in range(2): for j in range(3): if result[i][j] != pytest.approx(expected_result[i][j], abs=1e-10): print('Got: %s' % str(result)) print('Expected: %s' % str(expected_result)) pytest.fail('Failed to transform from Pseudo Mercator to LL') pnts = [(0, 6274861.39400658), (1 + 0, 1 + 6274861.39400658)] result = ct.TransformPoints(pnts) expected_result = [(0.0, 49.000000000000007, 0.0), (8.9831528411952125e-06, 49.000005893478189, 0.0)] for i in range(2): for j in range(3): if result[i][j] != pytest.approx(expected_result[i][j], abs=1e-10): print('Got: %s' % str(result)) print('Expected: %s' % str(expected_result)) pytest.fail('Failed to transform from Pseudo Mercator to LL') ############################################################################### # Test coordinate transformation where only one CRS has a towgs84 clause (#1156) def test_osr_ct_towgs84_only_one_side(): srs_towgs84 = osr.SpatialReference() srs_towgs84.SetFromUserInput("+proj=longlat +ellps=GRS80 +towgs84=100,200,300") srs_just_ellps = osr.SpatialReference() srs_just_ellps.SetFromUserInput('+proj=longlat +ellps=GRS80') ct = osr.CoordinateTransformation(srs_towgs84, srs_just_ellps) (x, y, z) = ct.TransformPoint(0, 0, 0) assert x == 0 assert y == 0 assert z == 0 ct = osr.CoordinateTransformation(srs_just_ellps, srs_towgs84) (x, y, z) = ct.TransformPoint(0, 0, 0) assert x == 0 assert y == 0 assert z == 0 ############################################################################### # Test coordinate transformation where both side have towgs84/datum clause (#1156) def test_osr_ct_towgs84_both_side(): srs_towgs84 = osr.SpatialReference() srs_towgs84.SetFromUserInput("+proj=longlat +ellps=GRS80 +towgs84=100,200,300") srs_other_towgs84 = osr.SpatialReference() srs_other_towgs84.SetFromUserInput("+proj=longlat +ellps=GRS80 +towgs84=0,0,0") ct = osr.CoordinateTransformation(srs_towgs84, srs_other_towgs84) (x, y, z) = ct.TransformPoint(0, 0, 20) assert x != 0 assert y != 0 assert z == 20 srs_datum_wgs84 = osr.SpatialReference() srs_datum_wgs84.SetFromUserInput("+proj=longlat +datum=WGS84") ct = osr.CoordinateTransformation(srs_towgs84, srs_datum_wgs84) (x, y, z) = ct.TransformPoint(0, 0, 20) assert x != 0 assert y != 0 assert z == 20 ct = osr.CoordinateTransformation(srs_datum_wgs84, srs_towgs84) (x, y, z) = ct.TransformPoint(0, 0, 20) assert x != 0 assert y != 0 assert z == 20 ############################################################################### # Test coordinate transformation with custom operation def test_osr_ct_options_operation(): options = osr.CoordinateTransformationOptions() assert options.SetOperation('+proj=affine +s11=-1') ct = osr.CoordinateTransformation(None, None, options) assert ct x, y, z = ct.TransformPoint(1, 2, 3) assert x == -1 assert y == 2 assert z == 3 ############################################################################### # Test coordinate transformation with area of interest def test_osr_ct_options_area_of_interest(): srs_nad27 = osr.SpatialReference() srs_nad27.SetFromUserInput("NAD27") srs_wgs84 = osr.SpatialReference() srs_wgs84.SetFromUserInput("WGS84") options = osr.CoordinateTransformationOptions() assert not options.SetAreaOfInterest(-200,40,-99,41) assert not options.SetAreaOfInterest(-100,-100,-99,41) assert not options.SetAreaOfInterest(-100,40,200,41) assert not options.SetAreaOfInterest(-100,40,-99,100) assert options.SetAreaOfInterest(-100,40,-99,41) ct = osr.CoordinateTransformation(srs_nad27, srs_wgs84, options) assert ct x, y, z = ct.TransformPoint(40.5,-99.5,0) assert x != 40.5 assert x == pytest.approx(40.5, abs=1e-3) x, y, z = ct.TransformPoint(0,0,0) if sys.platform == 'darwin': print("ct.TransformPoint(0,0,0) doesn't return expected result on MacOSX. Not sure why.") else: assert x == float('inf') ############################################################################### # Test 4D transformations def test_osr_ct_4D(): options = osr.CoordinateTransformationOptions() assert options.SetOperation('+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=cart +step +proj=helmert +convention=position_vector +x=0.0127 +dx=-0.0029 +rx=-0.00039 +drx=-0.00011 +y=0.0065 +dy=-0.0002 +ry=0.00080 +dry=-0.00019 +z=-0.0209 +dz=-0.0006 +rz=-0.00114 +drz=0.00007 +s=0.00195 +ds=0.00001 +t_epoch=1988.0 +step +proj=cart +inv +step +proj=unitconvert +xy_in=rad +xy_out=deg') ct = osr.CoordinateTransformation(None, None, options) assert ct x, y, z, t = ct.TransformPoint(2, 49, 0, 2000) assert x == pytest.approx(2.0000005420366, abs=1e-10), x assert y == pytest.approx(49.0000003766711, abs=1e-10), y assert z == pytest.approx(-0.0222802283242345, abs=1e-8), z assert t == pytest.approx(2000, abs=1e-10), t ret = ct.TransformPoints([[2, 49, 0, 2000], [2, 49, 0, 1988]]) assert len(ret) == 2, ret assert len(ret[0]) == 4, ret x, y, z, t = ret[0] assert x == pytest.approx(2.0000005420366, abs=1e-10), x assert y == pytest.approx(49.0000003766711, abs=1e-10), y assert z == pytest.approx(-0.0222802283242345, abs=1e-8), z assert t == pytest.approx(2000, abs=1e-10), t assert len(ret[1]) == 4, ret x, y, z, t = ret[1] assert x == pytest.approx(1.9999998809056305, abs=1e-10), x assert y == pytest.approx(48.9999995630005, abs=1e-10), y assert z == pytest.approx(0.005032399669289589, abs=1e-8), z assert t == pytest.approx(1988, abs=1e-10), t ############################################################################### # Test geocentric transformations def test_osr_ct_geocentric(): s = osr.SpatialReference() s.SetFromUserInput("IGNF:RGR92") t = osr.SpatialReference() t.SetFromUserInput("IGNF:REUN47") ct = osr.CoordinateTransformation(s, t) assert ct x, y, z = ct.TransformPoint(3356123.5400, 1303218.3090, 5247430.6050) assert x == pytest.approx(3353420.949, abs=1e-1) assert y == pytest.approx(1304075.021, abs=1e-1) assert z == pytest.approx(5248935.144, abs=1e-1) ############################################################################### # Test with +lon_wrap=180 def test_osr_ct_lon_wrap(): if osr.GetPROJVersionMajor() * 10000 + osr.GetPROJVersionMinor() * 100 + osr.GetPROJVersionMicro() < 70001: # Issue before PROJ 7.0.1 pytest.skip() s = osr.SpatialReference() s.SetFromUserInput("+proj=longlat +ellps=GRS80") t = osr.SpatialReference() t.SetFromUserInput("+proj=longlat +ellps=GRS80 +lon_wrap=180") ct = osr.CoordinateTransformation(s, t) assert ct x, y, _ = ct.TransformPoint(-25, 60, 0) assert x == pytest.approx(-25 + 360, abs=1e-12) assert y == pytest.approx(60, abs=1e-12) gdalautotest-3.1.2/osr/osr_usgs.py0000775000175000017500000001002213701057753015722 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_usgs.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test some USGS specific translation issues. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2004, Andrey Kiselev # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import osr import pytest ############################################################################### # Test the osr.SpatialReference.ImportFromUSGS() function. # def test_osr_usgs_1(): srs = osr.SpatialReference() srs.ImportFromUSGS( 8, 0, (0.0, 0.0, gdal.DecToPackedDMS(47.0), gdal.DecToPackedDMS(62.0), gdal.DecToPackedDMS(45.0), gdal.DecToPackedDMS(54.5), 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), 15) assert srs.GetProjParm(osr.SRS_PP_STANDARD_PARALLEL_1) == pytest.approx(47.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_STANDARD_PARALLEL_2) == pytest.approx(62.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_LATITUDE_OF_CENTER) == pytest.approx(54.5, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_LONGITUDE_OF_CENTER) == pytest.approx(45.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) == pytest.approx(0.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_FALSE_NORTHING) == pytest.approx(0.0, abs=0.0000005), \ 'Can not import Equidistant Conic projection.' ############################################################################### # Test the osr.SpatialReference.ExportToUSGS() function. # def test_osr_usgs_2(): srs = osr.SpatialReference() srs.ImportFromWkt("""PROJCS["unnamed",GEOGCS["NAD27",\ DATUM["North_American_Datum_1927",\ SPHEROID["Clarke 1866",6378206.4,294.9786982139006,\ AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],\ PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],\ AUTHORITY["EPSG","4267"]],PROJECTION["Lambert_Conformal_Conic_2SP"],\ PARAMETER["standard_parallel_1",33.90363402777778],\ PARAMETER["standard_parallel_2",33.62529002777778],\ PARAMETER["latitude_of_origin",33.76446202777777],\ PARAMETER["central_meridian",-117.4745428888889],\ PARAMETER["false_easting",0],PARAMETER["false_northing",0],\ UNIT["metre",1,AUTHORITY["EPSG","9001"]]]""") (proj_code, _, parms, datum_code) = srs.ExportToUSGS() assert proj_code == 4 and datum_code == 0 and gdal.PackedDMSToDec(parms[2]) == pytest.approx(33.90363403, abs=0.0000005) and gdal.PackedDMSToDec(parms[3]) == pytest.approx(33.62529003, abs=0.0000005) and gdal.PackedDMSToDec(parms[4]) == pytest.approx(-117.4745429, abs=0.0000005) and gdal.PackedDMSToDec(parms[5]) == pytest.approx(33.76446203, abs=0.0000005), \ 'Can not import Lambert Conformal Conic projection.' gdalautotest-3.1.2/osr/osr_validate.py0000775000175000017500000002440613701057753016545 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_validate.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test (error cases of) OSRValidate # Author: Even Rouault, # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import osr ############################################################################### # No root pointer def test_osr_validate_1(): empty_srs = osr.SpatialReference() assert empty_srs.Validate() != 0 ############################################################################### # Unrecognized root node def test_osr_validate_2(): srs = osr.SpatialReference() srs.ImportFromWkt("FOO[]") assert srs.Validate() != 0 ############################################################################### # COMPD_CS errors def test_osr_validate_3(): # No DATUM child in GEOGCS srs = osr.SpatialReference() srs.ImportFromWkt("""COMPD_CS[]""") # 5 is OGRERR_CORRUPT_DATA. assert srs.Validate() != 0 srs.ImportFromWkt("""COMPD_CS["MYNAME",GEOGCS[]]""") assert srs.Validate() != 0 # AUTHORITY has wrong number of children (1), not 2. srs = osr.SpatialReference() srs.ImportFromWkt("""COMPD_CS["MYNAME",AUTHORITY[]]""") assert srs.Validate() != 0 # Unexpected child for COMPD_CS `FOO' srs = osr.SpatialReference() srs.ImportFromWkt("""COMPD_CS["MYNAME",FOO[]]""") assert srs.Validate() != 0 ############################################################################### # VERT_CS errors def test_osr_validate_4(): # Invalid number of children : 1 srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",VERT_DATUM[]]""") assert srs.Validate() != 0 # UNIT has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",UNIT[]]""") assert srs.Validate() != 0 # AXIS has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",AXIS[]]""") assert srs.Validate() != 0 # AUTHORITY has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",AUTHORITY[]]""") assert srs.Validate() != 0 # Unexpected child for VERT_CS `FOO' srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",FOO[]]""") assert srs.Validate() != 0 # No VERT_DATUM child in VERT_CS srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME"]""") assert srs.Validate() != 0 # No UNIT child in VERT_CS srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",VERT_DATUM["MYNAME",2005,AUTHORITY["EPSG","0"]]]""") assert srs.Validate() != 0 # Too many AXIS children in VERT_CS srs = osr.SpatialReference() srs.ImportFromWkt("""VERT_CS["MYNAME",VERT_DATUM["MYNAME",2005,AUTHORITY["EPSG","0"]],UNIT["metre",1],AXIS["foo",foo],AXIS["bar",bar]]""") assert srs.Validate() != 0 ############################################################################### # GEOCCS errors def test_osr_validate_5(): # srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["meter",1]]') # PRIMEM has wrong number of children (1),not 2 or 3 as expected srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM[],UNIT["meter",1]]') assert srs.Validate() != 0 # UNIT has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT[]]') assert srs.Validate() != 0 # AXIS has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],AXIS[],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["meter",1]]') assert srs.Validate() != 0 # AUTHORITY has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["meter",1],AUTHORITY[]]') assert srs.Validate() != 0 # Unexpected child for GEOCCS `FOO' srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",FOO[]]') assert srs.Validate() != 0 # No DATUM child in GEOCCS srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric"]') assert srs.Validate() != 0 # No PRIMEM child in GEOCCS srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]]]]') assert srs.Validate() != 0 # No UNIT child in GEOCCS srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]]],PRIMEM["Greenwich",0]]') assert srs.Validate() != 0 # Wrong number of AXIS children in GEOCCS srs = osr.SpatialReference() srs.ImportFromWkt('GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],AXIS["foo",foo],UNIT["meter",1]]') assert srs.Validate() != 0 ############################################################################### # PROJCS errors def test_osr_validate_6(): # srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32631"]]') # UNIT has wrong number of children (1), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",UNIT[]]') assert srs.Validate() != 0 # PARAMETER has wrong number of children (1),not 2 as expected srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PARAMETER[]]') assert srs.Validate() != 0 # Unrecognized PARAMETER `foo' srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PARAMETER["foo",0]]') assert srs.Validate() != 0 # PROJECTION has wrong number of children (0),not 1 or 2 as expected srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PROJECTION]') assert srs.Validate() != 0 # Unrecognized PROJECTION `foo' srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PROJECTION["foo"]]') assert srs.Validate() != 0 # Unsupported, but recognised PROJECTION `Tunisia_Mining_Grid' srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PROJECTION["Tunisia_Mining_Grid"]]') assert srs.Validate() != 0 # Unexpected child for PROJECTION `FOO' srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PROJECTION["Transverse_Mercator", FOO]]') assert srs.Validate() != 0 # AUTHORITY has wrong number of children (0), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",PROJECTION["Transverse_Mercator", AUTHORITY]]') assert srs.Validate() != 0 # AUTHORITY has wrong number of children (0), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",AUTHORITY]]') assert srs.Validate() != 0 # AXIS has wrong number of children (0), not 2 srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",AXIS]]') assert srs.Validate() != 0 # Unexpected child for PROJCS `FOO' srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N",FOO]]') assert srs.Validate() != 0 # PROJCS does not have PROJECTION subnode. srs = osr.SpatialReference() srs.ImportFromWkt('PROJCS["WGS 84 / UTM zone 31N"]') assert srs.Validate() != 0 ############################################################################### gdalautotest-3.1.2/osr/osr_erm.py0000775000175000017500000000463513701057753015541 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_erm.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test ERMapper spatial reference implementation. # Author: Andrey Kiselev, dron@ak4719.spb.edu # ############################################################################### # Copyright (c) 2010, Andrey Kiselev # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### from osgeo import osr ############################################################################### # Test for the http://trac.osgeo.org/gdal/ticket/3787 problem. # Spherical datums should have inverse flattening parameter 0.0, not 1.0. # def test_osr_erm_1(): for sphere_datum in ['SPHERE', 'SPHERE2', 'USSPHERE']: srs = osr.SpatialReference() srs.ImportFromERM('MRWORLD', sphere_datum, 'METRE') assert srs.GetInvFlattening() == 0.0 and not abs(srs.GetSemiMajor() - srs.GetSemiMinor() > 0.0000005), \ 'Wrong ERMapper spherical datum parameters (bug #3787). Be sure your "ecw_cs.wkt" is from 20890 revision or newer.' ############################################################################### # Confirm that unsupported SRSes will be translated from/to EPSG:n # format (#3955) # def test_osr_erm_2(): srs = osr.SpatialReference() assert srs.ImportFromERM('EPSG:3395', 'EPSG:3395', 'METRE') == 0 and srs.IsProjected(), \ 'EPSG:n import failed.' srs2 = osr.SpatialReference() srs2.SetFromUserInput('EPSG:3395') assert srs2.IsSame(srs), 'EPSG:n import does not match.' gdalautotest-3.1.2/osr/data/0000775000175000017500000000000013701057752014416 5ustar evenevengdalautotest-3.1.2/osr/data/Test_Data_File.csv0000664000175000017500000000327013701057752017744 0ustar eveneventestName,testMethod,srcCrsAuth,srcCrs,tgtCrsType,tgtCrs,srcOrd1,srcOrd2,srcOrd3,tgtOrd1,tgtOrd2,tgtOrd3,tolOrd1,tolOrd2,tolOrd3,using,dataSource,dataCmnts,maintenanceCmnts WGS84 Geogrpahic 2D to CSPC Z3 USFT NAD83,CRS2D,EPSG,4326,EPSG,2227,37.95657778,-121.3128278,,2171792.15,6327319.23,,0.05,0.05,,,Trimble Business Center 1.10,The latitude and longitude values provided as the source CRS ordinate values were obtained from Google Earth Version X for the approximate location of the KSN Inc. Office in Stockton California. These latitude and longitude values were calculated to California State Plane Coordinates Zone 3 United States Survey Feet using Version 1.10 of Trimble Business Center. The latitude and longitude values were inserted into TGO in Degrees-Minutes-Seconds format. These values were 37-57-23.68000 and -121.18-46.80000. The decimal degrees format for these latitude and longitude values provided in the Source CRS columns were converted by hand from the Degrees-Minutes-Seconds format by Landon Blake.,The latitude and longitude values provided as the source CRS ordinate values were obtained from Google Earth Version X for the approximate location of the KSN Inc. Office in Stockton California. These latitude and longitude values were calculated to California State Plane Coordinates Zone 3 United States Survey Feet using Version 1.10 of Trimble Business Center. The latitude and longitude values were inserted into TGO in Degrees-Minutes-Seconds format. These values were 37-57-23.68000 and -121.18-46.80000. The decimal degrees format for these latitude and longitude values provided in the Source CRS columns were converted by hand from the Degrees-Minutes-Seconds format by Landon Blake. gdalautotest-3.1.2/osr/data/esri_extra.csv0000664000175000017500000001412013701057752017276 0ustar evenevenCOORD_REF_SYS_CODE;ESRI_DATUM_NAME;WKT 0;;GEOGCS["GCS_Tete",DATUM["D_Tete",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]PROJCS["SAD_1969_UTM_Zone_21S",GEOGCS["GCS_South_American_1969",DATUM["D_South_American_1969",SPHEROID["GRS_1967_Truncated",6378160.0,298.25]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",-57.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]PROJCS["World_Aitoff",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Aitoff"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],UNIT["Meter",1.0],AUTHORITY["ESRI",54043]] 0;;PROJCS["South_America_Albers_Equal_Area_Conic",GEOGCS["GCS_South_American_1969",DATUM["D_South_American_1969",SPHEROID["GRS_1967_Truncated",6378160.0,298.25]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-59.0],PARAMETER["Standard_Parallel_1",1.0],PARAMETER["Standard_Parallel_2",-14.0],PARAMETER["Latitude_Of_Origin",5.0],UNIT["Kilometer",1000.0]]PROJCS["World_Bonne",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Bonne"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",60.0],UNIT["Meter",1.0],AUTHORITY["ESRI",54024]] 0;;GEOGCS["GCS_South_American_1969",DATUM["D_South_American_1969",SPHEROID["GRS_1967_Truncated",6378160.0,298.25]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]PROJCS["South_America_Albers_Equal_Area_Conic",GEOGCS["GCS_SIRGAS_2000",DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-59.0],PARAMETER["Standard_Parallel_1",1.0],PARAMETER["Standard_Parallel_2",-14.0],PARAMETER["Latitude_Of_Origin",5.0],UNIT["Kilometer",1000.0]]GEOGCS["GCS_SIRGAS_2000",DATUM["D_SIRGAS_2000",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]PROJCS["Pulkovo_1942_GK_Zone_7N",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",39.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",28467]] 0;;PROJCS["Pulkovo_1942_GK_Zone_7",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",7500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",39.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",28407]] 0;;PROJCS["Pulkovo 1963 D 3 Degree Zone 1N",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",1250000.0],PARAMETER["False_Northing",-14743.504],PARAMETER["Central_Meridian",38.55],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]PROJCS["Pulkovo 1963 D 3 Degree Zone 1",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",250000.0],PARAMETER["False_Northing",-14743.504],PARAMETER["Central_Meridian",38.55],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]PROJCS["Pulkovo 1963 D 3 Degree Zone 2N",GEOGCS["GCS_Pulkovo_1942",DATUM["D_Pulkovo_1942",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Gauss_Kruger"],PARAMETER["False_Easting",2250000.0],PARAMETER["False_Northing",-14743.504],PARAMETER["Central_Meridian",41.55],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",3857]] 0;;PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0],AUTHORITY["ESRI",102113]] 0;;PROJCS["WGS_1984_World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",3395]] gdalautotest-3.1.2/osr/data/lcc_esri.prj0000664000175000017500000000077213701057752016724 0ustar evenevenESRI::PROJCS["Lambert Conformal Conic",GEOGCS["grs80",DATUM["D_North_American_1983",SPHEROID["Geodetic_Reference_System_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",34.33333333333334],PARAMETER["standard_parallel_2",36.16666666666666],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],UNIT["Meter",1]] gdalautotest-3.1.2/osr/data/esri_pcs.csv.gz0000664000175000017500000040067313701057752017373 0ustar evenevenNesri_pcs.csvks۶?#oC܁+v7n;{8ڬe1ҝ~FH"Hϙ=) q[XX8I]tuttpz<:9"<80 Gi:Eotߒ$:ݥ8:ӻO?_OgRٷՉO':c1&@?y}T~Y$ۇW _.o'` ( B`fU?tz|sW7y<Kq]$m}:$|.p'xіU*d=ؖI&n~U: [yeh (u˺V> .dy<)1wPūRJz-C&I!L̫+unpi6zup=ܖVnio`Vq2d><:/gƢF+&UU;^`HaH,@0N/ m D䆈zyAhqѿ;C& !!BDH{Y "sCd=Do,"6Anu 7DCH;HMA覸1`cd%Ɠw;:jytNl45ҮWހT8ي t0azaP9*h ]PauS'TPqPQT삊{BeCMP *nU6mC%MP *n u 6Ae.)T1T7HZriA`RtO6Jr0w9 Tc~Y˵6T~yxc"p-|6{13sdoukQG%"QDkqG+D0tc6=F/_P-D<0F"-}GEן%m>zqׇVQCC\ѓnQ *F 3H!ɜ0!A{O ;ΌVF ?}YLeP5:fy(k28FV|hq߼L|l plC!! p0B$!& ,+v*D>,}qm]p,&7=\gt<> Hqkr"FNI''`؎@GelJeQ Y=)yMc  )9Ayw./ӲIrYYT.H}hhX|Wky ;f\V?p50 dCPxk{GR/UHCJ!  a €0@o-"X4,5 i]|pZsHvr6ZT%r:ͳl0Vb*|!ɼ$ wIDJDOr{V6ġ %=J;ʎ7(hB (ent mrhq:*6hokVj ܲP%x=ɧf;˕Nƙ\3u7( x#1~8Oe9v3fF:ڔ{.Xj$('ի=O |48d8PC<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޺rpꈂN'&T'WNZH(R&  DD͡1%@ &)][ZZqԉҕz߶vԽ pr0sKCuB0qGW4J'Q$AaoȽV+CѢ6@C 9ltQcɬ`@[ԹjFhYn0 x O8'-+2I0[Р|]&>q&xyww\Umx}jYn|ɲ.[Kfxb8n4],ʦGq1[q9ٖ xAq; ~Y 1FkqW4n2^ ]<~A;۽ # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import osr import pytest ############################################################################### # Test the osr.SpatialReference.ImportFromMICoordSys() function. # def test_osr_micoordsys_1(): srs = osr.SpatialReference() srs.ImportFromMICoordSys('Earth Projection 3, 62, "m", -117.474542888889, 33.7644620277778, 33.9036340277778, 33.6252900277778, 0, 0') if srs.GetProjParm(osr.SRS_PP_STANDARD_PARALLEL_1) != pytest.approx(33.9036340277778, abs=0.0000005) \ or srs.GetProjParm(osr.SRS_PP_STANDARD_PARALLEL_2) != pytest.approx(33.6252900277778, abs=0.0000005) \ or srs.GetProjParm(osr.SRS_PP_LATITUDE_OF_ORIGIN) != pytest.approx(33.7644620277778, abs=0.0000005) \ or srs.GetProjParm(osr.SRS_PP_CENTRAL_MERIDIAN) != pytest.approx((-117.474542888889), abs=0.0000005) \ or srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) != pytest.approx(0.0, abs=0.0000005) \ or srs.GetProjParm(osr.SRS_PP_FALSE_NORTHING) != pytest.approx(0.0, abs=0.0000005): print(srs.ExportToPrettyWkt()) pytest.fail('Can not export Lambert Conformal Conic projection.') ############################################################################### # Test the osr.SpatialReference.ExportToMICoordSys() function. # def test_osr_micoordsys_2(): srs = osr.SpatialReference() srs.ImportFromWkt("""PROJCS["unnamed",GEOGCS["NAD27",\ DATUM["North_American_Datum_1927",\ SPHEROID["Clarke 1866",6378206.4,294.9786982139006,\ AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],\ PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],\ AUTHORITY["EPSG","4267"]],PROJECTION["Lambert_Conformal_Conic_2SP"],\ PARAMETER["standard_parallel_1",33.90363402777778],\ PARAMETER["standard_parallel_2",33.62529002777778],\ PARAMETER["latitude_of_origin",33.76446202777777],\ PARAMETER["central_meridian",-117.4745428888889],\ PARAMETER["false_easting",0],PARAMETER["false_northing",0],\ UNIT["metre",1,AUTHORITY["EPSG","9001"]]]""") proj = srs.ExportToMICoordSys() assert proj == 'Earth Projection 3, 62, "m", -117.474542888889, 33.7644620277778, 33.9036340277778, 33.6252900277778, 0, 0', \ 'Can not import Lambert Conformal Conic projection.' ############################################################################### # Test EPSG:3857 # def test_osr_micoordsys_3(): srs = osr.SpatialReference() srs.ImportFromEPSG(3857) proj = srs.ExportToMICoordSys() assert proj == 'Earth Projection 10, 157, "m", 0' srs = osr.SpatialReference() srs.ImportFromMICoordSys('Earth Projection 10, 157, "m", 0') wkt = srs.ExportToWkt() assert 'EXTENSION["PROJ4"' in wkt # Transform again to MITAB (we no longer have the EPSG code, so we rely on PROJ4 extension node) proj = srs.ExportToMICoordSys() assert proj == 'Earth Projection 10, 157, "m", 0' gdalautotest-3.1.2/osr/osr_ct_proj.py0000775000175000017500000002521413701057753016412 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_ct_proj.py cc02dc4397c7ec43ec4c4b842e5faabe16c54904 2019-12-17 14:27:30 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test reprojection of points of many different projections. # Author: Frank Warmerdam, warmerdam@pobox.com # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import os import pytest from osgeo import osr bonne = 'PROJCS["bonne",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["bonne"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",60.0],UNIT["Meter",1.0]]' ############################################################################### # Table of transformations, inputs and expected results (with a threshold) # # Each entry in the list should have a tuple with: # # - src_srs: any form that SetFromUserInput() will take. # - (src_x, src_y, src_z): location in src_srs. # - src_error: threshold for error when srs_x/y is transformed into dst_srs and # then back into srs_src. # - dst_srs: destination srs. # - (dst_x,dst_y,dst_z): point that src_x/y should transform to. # - dst_error: acceptable error threshold for comparing to dst_x/y. # - unit_name: the display name for this unit test. # - options: eventually we will allow a list of special options here (like one # way transformation). For now just put None. # - requirements: string with minimum proj version required, GRID: # or None depend on requirements for the test. transform_list = [ # Simple straight forward reprojection. ('+proj=utm +zone=11 +datum=WGS84', (398285.45, 2654587.59, 0.0), 0.02, 'WGS84', (24.0, -118.0, 0.0), 0.00001, 'UTM_WGS84', None, None), # Ensure that prime meridian *and* axis orientation changes are applied. # Note that this test will fail with PROJ.4 4.7 or earlier, it requires # axis support in PROJ 4.8.0. # ('EPSG:27391', (40000, 20000, 0.0), 0.02, # 'EPSG:4273', (6.397933,58.358709,0.000000), 0.00001, # 'NGO_Oslo_zone1_NGO', None, '4.8.0' ), # Test Bonne projection. ('WGS84', (65.0, 1.0, 0.0), 0.00001, bonne, (47173.75, 557621.30, 0.0), 0.02, 'Bonne_WGS84', None, None), # Test Two Point Equidistant ('+proj=tpeqd +a=3396000 +b=3396000 +lat_1=36.3201218 +lon_1=-179.1566925 +lat_2=45.8120651 +lon_2=179.3727570 +no_defs', (4983568.76, 2092902.61, 0.0), 0.1, '+proj=latlong +a=3396000 +b=3396000', (-140.0, 40.0, 0.0), 0.000001, 'TPED_Mars', None, None), # test scale factor precision (per #1970) ('data/wkt_rt90.def', (1572570.342, 6728429.67, 0.0), 0.001, ' +proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs', (616531.1155, 6727527.5682, 0.0), 0.001, 'ScalePrecision(#1970)', None, None), # Test Google Mercator (EPSG:3785) ('EPSG:3785', (1572570.342, 6728429.67, 0.0), 0.001, 'WGS84', (51.601722482149995, 14.126639735716626, 0.0), 0.0000001, 'GoogleMercator(#3136)', None, None), # Test Equirectangular with all parameters ('+proj=eqc +ellps=sphere +lat_0=-2 +lat_ts=1 +lon_0=-10', (-14453132.04, 4670184.72, 0.0), 0.1, '+proj=latlong +ellps=sphere', (-140.0, 40.0, 0.0), 0.000001, 'Equirectangular(#2706)', None, "4.6.1"), # Test Geocentric ('+proj=latlong +datum=WGS84', (-140.0, 40.0, 0.0), 0.000001, 'EPSG:4328', (-3748031.46884168, -3144971.82314589, 4077985.57220038), 0.1, 'Geocentric', None, None), # Test Vertical Datum Shift with a change of horizontal units. ('+proj=utm +zone=11 +datum=WGS84', (100000.0, 3500000.0, 0.0), 0.1, '+proj=utm +zone=11 +datum=WGS84 +geoidgrids=egm96_15.gtx +units=us-ft', (328083.333225467, 11482916.6665952, 41.4697855726348), 0.01, 'EGM 96 Conversion', None, "GRID:egm96_15.gtx"), # Test optimization in case of identical projections (projected) ('+proj=utm +zone=11 +datum=NAD27 +units=m', (440720.0, 3751260.0, 0.0), 0, '+proj=utm +zone=11 +datum=NAD27 +units=m', (440720.0, 3751260.0, 0.0), 0, 'No-op Optimization (projected)', None, None), # Test optimization in case of identical projections (geodetic) ('+proj=longlat +datum=WGS84', (2, 49, 0.0), 0, '+proj=longlat +datum=WGS84', (2, 49, 0.0), 0, 'No-op Optimization (geodetic)', None, None), # Test GRS80 -> EPSG:3857 ('+proj=longlat +ellps=GRS80 +towgs84=0,0,0 +no_defs', (2, 49, 0.0), 1e-8, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs', (222638.981586547, 6274861.39384813, 0), 1e-3, 'GRS80 -> EPSG:3857', None, None), # Test GRS80 -> EPSG:3857 ('+proj=longlat +ellps=GRS80 +towgs84=0,0,0 +no_defs', (2, 49, 0.0), 1e-8, '+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs', (222638.981586547, 6274861.39384813, 0), 1e-3, 'GRS80 -> EPSG:3857', None, None), ('EPSG:4314', (50, 10, 0.0), 1e-8, 'EPSG:4326', (49.9988573027651,9.99881145557889, 0.0), 1e-8, 'DHDN -> WGS84 using BETA2007', None, 'GRID:BETA2007.gsb'), ("""GEOGCS["DHDN", DATUM["Deutsches_Hauptdreiecksnetz", SPHEROID["Bessel 1841",6377397.155,299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7], AUTHORITY["EPSG","6314"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4314"]]""", (50, 10, 0.0), 1e-8, 'EPSG:4326', (49.9988572643058,9.99881392529464,0), 1e-8, 'DHDN -> WGS84 using TOWGS84 automatically set', 'OSR_CT_USE_DEFAULT_EPSG_TOWGS84=YES', None), ('+proj=longlat +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +no_defs', (10, 50, 0.0), 1e-8, 'EPSG:4326', (49.9988572643058,9.99881392529464,0), 1e-8, 'DHDN -> WGS84 usign explicit TOWGS84', None, None), ] ############################################################################### # When imported build a list of units based on the files available. @pytest.mark.parametrize( 'src_srs,src_xyz,src_error,dst_srs,dst_xyz,dst_error,unit_name,options,requirements', transform_list, ids=[row[6] for row in transform_list] ) def test_proj(src_srs, src_xyz, src_error, dst_srs, dst_xyz, dst_error, unit_name, options, requirements): if requirements is not None and requirements[:5] == 'GRID:': grid_name = requirements[5:] if grid_name == 'egm96_15.gtx' and \ osr.GetPROJVersionMajor() * 10000 + osr.GetPROJVersionMinor() * 100 + osr.GetPROJVersionMicro() < 60201: # Issues before PROJ 6.2.1 pytest.skip() search_paths = osr.GetPROJSearchPaths() found = False for path in search_paths: if os.path.exists(os.path.join(path, grid_name)): found = True break if not found: #print( 'Did not find GRID:%s' % grid_name ) pytest.skip() src = osr.SpatialReference() assert src.SetFromUserInput(src_srs) == 0, \ ('SetFromUserInput(%s) failed.' % src_srs) dst = osr.SpatialReference() assert dst.SetFromUserInput(dst_srs) == 0, \ ('SetFromUserInput(%s) failed.' % dst_srs) if requirements is not None and requirements[0] != 'G': additionnal_error_str = ' Check that proj version is >= %s ' % requirements else: additionnal_error_str = '' has_built_ct = False if options and '=' in options: tokens = options.split('=') if len(tokens) == 2: key = tokens[0] value = tokens[1] with gdaltest.config_option(key, value): has_built_ct = True ct = osr.CoordinateTransformation(src, dst) if not has_built_ct: ct = osr.CoordinateTransformation(src, dst) ###################################################################### # Transform source point to destination SRS. result = ct.TransformPoint(src_xyz[0], src_xyz[1], src_xyz[2]) error = abs(result[0] - dst_xyz[0]) \ + abs(result[1] - dst_xyz[1]) \ + abs(result[2] - dst_xyz[2]) assert error <= dst_error, \ ('Dest error is %g, got (%.15g,%.15g,%.15g)%s' % (error, result[0], result[1], result[2], additionnal_error_str)) ###################################################################### # Now transform back. has_built_ct = False if options and '=' in options: tokens = options.split('=') if len(tokens) == 2: key = tokens[0] value = tokens[1] with gdaltest.config_option(key, value): has_built_ct = True ct = osr.CoordinateTransformation(dst, src) if not has_built_ct: ct = osr.CoordinateTransformation(dst, src) result = ct.TransformPoint(result[0], result[1], result[2]) error = abs(result[0] - src_xyz[0]) \ + abs(result[1] - src_xyz[1]) \ + abs(result[2] - src_xyz[2]) assert error <= src_error, \ ('Back to source error is %g got (%.15g,%.15g,%.15g)%s' % (error, result[0], result[1], result[2], additionnal_error_str)) gdalautotest-3.1.2/osr/osr_compd.py0000775000175000017500000003437113701057753016060 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_compd.py ff1d44dce4a27f896671def2e375306480022f0d 2020-05-20 20:22:48 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test COMPD_CS support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2010, Frank Warmerdam # Copyright (c) 2010-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import osr import pytest example_compd_wkt = 'COMPD_CS["OSGB36 / British National Grid + ODN",PROJCS["OSGB 1936 / British National Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[375,-111,431,0,0,0,0],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["DMSH",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4277"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.999601272],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["metre_1",1,AUTHORITY["EPSG","9001"]],AXIS["E",EAST],AXIS["N",NORTH],AUTHORITY["EPSG","27700"]],VERT_CS["Newlyn",VERT_DATUM["Ordnance Datum Newlyn",2005,AUTHORITY["EPSG","5101"]],UNIT["metre_2",1,AUTHORITY["EPSG","9001"]],AXIS["Up",UP],AUTHORITY["EPSG","5701"]],AUTHORITY["EPSG","7405"]]' ############################################################################### # Test parsing and a few operations on a compound coordinate system. def test_osr_compd_1(): srs = osr.SpatialReference() srs.ImportFromWkt(example_compd_wkt) assert srs.IsProjected(), 'Projected COMPD_CS not recognised as projected.' assert not srs.IsGeographic(), 'projected COMPD_CS misrecognised as geographic.' assert not srs.IsLocal(), 'projected COMPD_CS misrecognised as local.' assert srs.IsCompound(), 'COMPD_CS not recognised as compound.' expected_proj4 = '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.999601272 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=375,-111,431,0,0,0,0 +units=m +vunits=m +no_defs' got_proj4 = srs.ExportToProj4() if expected_proj4 != got_proj4: print('Got: %s' % got_proj4) print('Expected: %s' % expected_proj4) pytest.fail('did not get expected proj.4 translation of compd_cs') assert srs.GetLinearUnitsName() == 'metre_1', 'Did not get expected linear units.' assert srs.Validate() == 0, 'Validate() failed.' ############################################################################### # Test SetFromUserInput() def test_osr_compd_2(): srs = osr.SpatialReference() srs.SetFromUserInput(example_compd_wkt) assert srs.Validate() == 0, 'Does not validate' assert srs.IsProjected(), 'Projected COMPD_CS not recognised as projected.' ############################################################################### # Test expansion of compound coordinate systems from EPSG definition. def test_osr_compd_3(): srs = osr.SpatialReference() srs.ImportFromEPSG(7401) assert srs.Validate() == 0, 'Does not validate' exp_wkt = """COMPD_CS["NTF (Paris) / France II + NGF Lallemand", PROJCS["NTF (Paris) / France II (deprecated)", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265, AUTHORITY["EPSG","7011"]], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.33722917, AUTHORITY["EPSG","8903"]], UNIT["grad",0.01570796326794897, AUTHORITY["EPSG","9105"]], AUTHORITY["EPSG","4807"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",52], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99987742], PARAMETER["false_easting",600000], PARAMETER["false_northing",2200000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","27582"]], VERT_CS["NGF Lallemand height", VERT_DATUM["Nivellement General de la France - Lallemand",2005, AUTHORITY["EPSG","5118"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Gravity-related height",UP], AUTHORITY["EPSG","5719"]], AUTHORITY["EPSG","7401"]]""" wkt = srs.ExportToPrettyWkt() assert gdaltest.equal_srs_from_wkt(exp_wkt, wkt) != 0, \ 'did not get expected compound cs for EPSG:7401' ############################################################################### # Test expansion of GCS+VERTCS compound coordinate system. def test_osr_compd_4(): srs = osr.SpatialReference() srs.ImportFromEPSG(7400) assert srs.Validate() == 0, 'Does not validate' exp_wkt = """COMPD_CS["NTF (Paris) + NGF IGN69 height", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265, AUTHORITY["EPSG","7011"]], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.33722917, AUTHORITY["EPSG","8903"]], UNIT["grad",0.01570796326794897, AUTHORITY["EPSG","9105"]], AUTHORITY["EPSG","4807"]], VERT_CS["NGF-IGN69 height", VERT_DATUM["Nivellement General de la France - IGN69",2005, AUTHORITY["EPSG","5119"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Gravity-related height",UP], AUTHORITY["EPSG","5720"]], AUTHORITY["EPSG","7400"]]""" wkt = srs.ExportToPrettyWkt() assert gdaltest.equal_srs_from_wkt(exp_wkt, wkt) != 0, \ 'did not get expected compound cs for EPSG:7400' ############################################################################### # Test EPGS:x+y syntax def test_osr_compd_5(): srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:26911+5703') assert srs.Validate() == 0, 'Does not validate' exp_wkt = """COMPD_CS["NAD83 / UTM zone 11N + NAVD88 height", PROJCS["NAD83 / UTM zone 11N", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","26911"]], VERT_CS["NAVD88 height", VERT_DATUM["North American Vertical Datum 1988",2005, AUTHORITY["EPSG","5103"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Gravity-related height",UP], AUTHORITY["EPSG","5703"]]]""" wkt = srs.ExportToPrettyWkt() if gdaltest.equal_srs_from_wkt(exp_wkt, wkt) == 0: pytest.fail() elif exp_wkt != wkt: print('warning they are equivalent, but not completely the same') print(wkt) exp_proj4 = '+proj=utm +zone=11 +datum=NAD83 +units=m +vunits=m +no_defs' proj4 = srs.ExportToProj4() assert proj4 == exp_proj4, ('Did not get expected proj.4 string, got:' + proj4) ############################################################################### # Test conversion from PROJ.4 to WKT including vertical units. def test_osr_compd_6(): srs = osr.SpatialReference() srs.SetFromUserInput('+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +geoidgrids=g2003conus.gtx,g2003alaska.gtx,g2003h01.gtx,g2003p01.gtx +vunits=us-ft +no_defs ') assert srs.Validate() == 0, 'Does not validate' exp_wkt = """COMPD_CS["unknown", PROJCS["unknown", GEOGCS["unknown", DATUM["Unknown_based_on_GRS80_ellipsoid", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH]], VERT_CS["unknown", VERT_DATUM["unknown",2005, EXTENSION["PROJ4_GRIDS","g2003conus.gtx,g2003alaska.gtx,g2003h01.gtx,g2003p01.gtx"]], UNIT["US survey foot",0.304800609601219, AUTHORITY["EPSG","9003"]], AXIS["Gravity-related height",UP]]]""" wkt = srs.ExportToPrettyWkt() if gdaltest.equal_srs_from_wkt(exp_wkt, wkt) == 0: pytest.fail() elif exp_wkt != wkt: print('warning they are equivalent, but not completely the same') print(wkt) assert wkt.find('g2003conus.gtx') != -1, 'Did not get PROJ4_GRIDS EXTENSION node' exp_proj4 = '+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +geoidgrids=g2003conus.gtx,g2003alaska.gtx,g2003h01.gtx,g2003p01.gtx +vunits=us-ft +no_defs' proj4 = srs.ExportToProj4() assert proj4 == exp_proj4, ('Did not get expected proj.4 string, got:' + proj4) ############################################################################### # Test SetCompound() def test_osr_compd_7(): srs_horiz = osr.SpatialReference() srs_horiz.ImportFromEPSG(4326) srs_vert = osr.SpatialReference() srs_vert.ImportFromEPSG(5703) srs_vert.SetTargetLinearUnits('VERT_CS', 'foot', 0.304800609601219) srs = osr.SpatialReference() srs.SetCompoundCS('My Compound SRS', srs_horiz, srs_vert) assert srs.Validate() == 0, 'Does not validate' exp_wkt = """COMPD_CS["My Compound SRS", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], VERT_CS["NAVD88 height", VERT_DATUM["North American Vertical Datum 1988",2005, AUTHORITY["EPSG","5103"]], UNIT["foot",0.304800609601219], AXIS["Gravity-related height",UP]]]""" wkt = srs.ExportToPrettyWkt() if gdaltest.equal_srs_from_wkt(exp_wkt, wkt) == 0: pytest.fail() elif exp_wkt != wkt: print('warning they are equivalent, but not completely the same') print(wkt) assert srs.GetTargetLinearUnits('VERT_CS') == pytest.approx(0.304800609601219, 1e-15) assert srs.GetTargetLinearUnits(None) == pytest.approx(0.304800609601219, 1e-15) ############################################################################### # Test ImportFromURN() def test_osr_compd_8(): srs = osr.SpatialReference() srs.SetFromUserInput('urn:ogc:def:crs,crs:EPSG::27700,crs:EPSG::5701') assert srs.Validate() == 0, 'Does not validate' wkt = srs.ExportToWkt() assert wkt.startswith('COMPD_CS'), 'COMPD_CS not recognised as compound.' ############################################################################### # Test COMPD_CS with a VERT_DATUM type = 2002 (Ellipsoid height) def test_osr_compd_vert_datum_2002(): if osr.GetPROJVersionMajor() * 10000 + osr.GetPROJVersionMinor() * 100 < 70100: # Not supported before PROJ 7.1 pytest.skip() sr = osr.SpatialReference() sr.SetFromUserInput('COMPD_CS["NAD83 / Alabama West + Ellipsoidal height",PROJCS["NAD83 / Alabama West",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30],PARAMETER["central_meridian",-87.5],PARAMETER["scale_factor",0.999933333],PARAMETER["false_easting",600000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","26930"]],VERT_CS["Ellipsoidal height",VERT_DATUM["Ellipsoid",2002],UNIT["metre",1.0,AUTHORITY["EPSG","9001"]],AXIS["Up",UP]]]') assert sr.IsProjected() assert sr.GetAuthorityCode('PROJCS') == '26930' assert sr.GetAuthorityName('PROJCS') == 'EPSG' assert sr.GetAuthorityCode(None) is None assert sr.GetAuthorityName(None) is None gdalautotest-3.1.2/osr/osr_ozi.py0000775000175000017500000001056713701057753015560 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_ozi.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OZI projection and datum support # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import osr ############################################################################### # Test with WGS 84 datum def test_osr_ozi_1(): srs = osr.SpatialReference() srs.ImportFromOzi(["OziExplorer Map Data File Version 2.2", "Test_Map", "Test_Map.png", "1 ,Map Code,", "WGS 84,WGS 84, 0.0000, 0.0000,WGS 84", "Map Projection,Lambert Conformal Conic,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No", "Projection Setup, 4.000000000, 10.000000000,,,, 40.000000000, 56.000000000,,,"]) expected = 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40],PARAMETER["standard_parallel_2",56],PARAMETER["latitude_of_origin",4],PARAMETER["central_meridian",10],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]' assert gdaltest.equal_srs_from_wkt(expected, srs.ExportToWkt()) ############################################################################### # Test with another datum known by OZI and whose EPSG code is known def test_osr_ozi_2(): srs = osr.SpatialReference() srs.ImportFromOzi(["OziExplorer Map Data File Version 2.2", "Test_Map", "Test_Map.png", "1 ,Map Code,", "Tokyo,", "Map Projection,Latitude/Longitude,,,,,,", "Projection Setup,,,,,,,,,,"]) srs_ref = osr.SpatialReference() srs_ref.ImportFromEPSG(4301) assert gdaltest.equal_srs_from_wkt(srs_ref.ExportToWkt(), srs.ExportToWkt()) ############################################################################### # Test with another datum known by OZI and whose EPSG code is unknown def test_osr_ozi_3(): srs = osr.SpatialReference() srs.ImportFromOzi(["OziExplorer Map Data File Version 2.2", "Test_Map", "Test_Map.png", "1 ,Map Code,", "European 1950 (Mean France),", "Map Projection,Latitude/Longitude,,,,,,", "Projection Setup,,,,,,,,,,"]) expected = 'GEOGCS["European 1950 (Mean France)",DATUM["European 1950 (Mean France)",SPHEROID["International 1924",6378388,297],TOWGS84[-87,-96,-120,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]' assert gdaltest.equal_srs_from_wkt(expected, srs.ExportToWkt()) gdalautotest-3.1.2/osr/osr_esri.py0000775000175000017500000013052313701057753015714 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_esri.py a73047feb719b135ca84f477582add8b9910d132 2020-04-19 13:54:31 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test some ESRI specific translation issues. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # Copyright (c) 2013, Kyle Shannon # Copyright (c) 2014, Google # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import ogr from osgeo import osr import pytest ############################################################################### # This test verifies that morphToESRI() translates idiosyncratic datum names # from "EPSG" form to ESRI from when the exception list comes from the # gdal_datum.csv file. def test_osr_esri_1(): srs = osr.SpatialReference() srs.ImportFromEPSG(4202) assert srs.GetAttrValue('DATUM') == 'Australian_Geodetic_Datum_1966', \ ('Got wrong DATUM name (%s) after EPSG import.' % srs.GetAttrValue('DATUM')) srs.MorphToESRI() assert srs.GetAttrValue('DATUM') == 'D_Australian_1966', \ ('Got wrong DATUM name (%s) after ESRI morph.' % srs.GetAttrValue('DATUM')) srs.MorphFromESRI() assert srs.GetAttrValue('DATUM') == 'Australian_Geodetic_Datum_1966', \ ('Got wrong DATUM name (%s) after ESRI unmorph.' % srs.GetAttrValue('DATUM')) ############################################################################### # Verify that exact correct form of UTM names is established when # translating certain GEOGCSes to ESRI format. def test_osr_esri_2(): srs = osr.SpatialReference() srs.ImportFromEPSG(32711) srs.MorphToESRI() assert srs.GetAttrValue('GEOGCS') == 'GCS_WGS_1984', \ ('Got wrong GEOGCS name (%s) after ESRI morph.' % srs.GetAttrValue('GEOGCS')) assert srs.GetAttrValue('PROJCS') == 'WGS_1984_UTM_Zone_11S', \ ('Got wrong PROJCS name (%s) after ESRI morph.' % srs.GetAttrValue('PROJCS')) ############################################################################### # Verify Polar Stereographic translations work properly OGR to ESRI. def test_osr_esri_4(): srs = osr.SpatialReference() srs.SetFromUserInput('PROJCS["PS Test",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-80.2333],PARAMETER["central_meridian",171],PARAMETER["false_northing",0],UNIT["metre",1]]') srs.MorphToESRI() assert srs.GetAttrValue('PROJECTION') == 'Stereographic_South_Pole', \ ('Got wrong PROJECTION name (%s) after ESRI morph.' % srs.GetAttrValue('PROJECTION')) assert srs.GetProjParm('standard_parallel_1') == -80.2333, \ ('Got wrong parameter value (%g) after ESRI morph.' % srs.GetProjParm('standard_parallel_1')) ############################################################################### # Verify Polar Stereographic translations work properly ESRI to OGR. def test_osr_esri_5(): srs = osr.SpatialReference() srs.SetFromUserInput('PROJCS["PS Test",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Stereographic_South_Pole"],PARAMETER["standard_parallel_1",-80.2333],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]') srs.MorphFromESRI() assert srs.GetAttrValue('PROJECTION') == 'Polar_Stereographic', \ ('Got wrong PROJECTION name (%s) after ESRI morph.' % srs.GetAttrValue('PROJECTION')) assert srs.GetProjParm('latitude_of_origin') == -80.2333, \ ('Got wrong parameter value (%g) after ESRI morph.' % srs.GetProjParm('latitude_of_origin')) ############################################################################### # Verify Lambert 2SP with a 1.0 scale factor still gets translated to 2SP # per bug 187. def test_osr_esri_6(): srs = osr.SpatialReference() srs.SetFromUserInput('PROJCS["Texas Centric Mapping System/Lambert Conformal",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1500000.0],PARAMETER["False_Northing",5000000.0],PARAMETER["Central_Meridian",-100.0],PARAMETER["Standard_Parallel_1",27.5],PARAMETER["Standard_Parallel_2",35.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",18.0],UNIT["Meter",1.0]]') srs.MorphFromESRI() assert srs.GetAttrValue('PROJECTION') == 'Lambert_Conformal_Conic_2SP', \ ('Got wrong PROJECTION name (%s) after ESRI morph, expected 2SP' % srs.GetAttrValue('PROJECTION')) ############################################################################### # Verify that FEET is treated as US survey feet per bug #1533. def test_osr_esri_7(): prj = ['Projection STATEPLANE', 'Fipszone 903', 'Datum NAD83', 'Spheroid GRS80', 'Units FEET', 'Zunits NO', 'Xshift 0.0', 'Yshift 0.0', 'Parameters ', ''] srs_prj = osr.SpatialReference() srs_prj.ImportFromESRI(prj) wkt = """PROJCS["NAD83 / Florida North", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["latitude_of_origin",29], PARAMETER["central_meridian",-84.5], PARAMETER["standard_parallel_1",30.75], PARAMETER["standard_parallel_2",29.5833333333333], PARAMETER["false_easting",1968500], PARAMETER["false_northing",0], UNIT["Foot_US",0.304800609601219], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" srs_wkt = osr.SpatialReference(wkt=wkt) if not srs_prj.IsSame(srs_wkt): print('got: %s' % srs_prj.ExportToPrettyWkt()) pytest.fail('old style ESRI projection imported wrong, perhaps linear units?') ############################################################################### # Verify that handling of numerically specified units (see bug #1533) def test_osr_esri_8(): prj = ['Projection STATEPLANE', 'Fipszone 903', 'Datum NAD83', 'Spheroid GRS80', 'Units 3.280839895013123', 'Zunits NO', 'Xshift 0.0', 'Yshift 0.0', 'Parameters ', ''] srs_prj = osr.SpatialReference() srs_prj.ImportFromESRI(prj) wkt = """PROJCS["NAD83 / Florida North", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["latitude_of_origin",29], PARAMETER["central_meridian",-84.5], PARAMETER["standard_parallel_1",30.75], PARAMETER["standard_parallel_2",29.5833333333333], PARAMETER["false_easting",1968503.93700787], PARAMETER["false_northing",0], UNIT["user-defined",0.3048], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" srs_wkt = osr.SpatialReference(wkt=wkt) assert srs_prj.IsSame(srs_wkt), \ 'old style ESRI projection imported wrong, perhaps linear units?' ############################################################################### # Verify Equidistant Conic handling. def test_osr_esri_9(): srs = osr.SpatialReference() esri_wkt = 'PROJCS["edc",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equidistant_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-96.0],PARAMETER["Standard_Parallel_1",29.5],PARAMETER["Standard_Parallel_2",45.5],PARAMETER["Latitude_Of_Origin",37.5],UNIT["Meter",1.0]]' srs.SetFromUserInput(esri_wkt) expected = 'PROJCS["edc",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equidistant_Conic"],PARAMETER["latitude_of_center",37.5],PARAMETER["longitude_of_center",-96],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' srs.MorphFromESRI() wkt = srs.ExportToWkt() if wkt != expected: print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected Equidistant Conic SRS after morphFromESRI') srs.MorphToESRI() wkt = srs.ExportToWkt() expected = esri_wkt if wkt != expected: print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected Equidistant Conic SRS after morphToESRI') ############################################################################### # Verify arc/info style TM handling. def test_osr_esri_11(): srs = osr.SpatialReference() srs.ImportFromESRI(['Projection TRANSVERSE', 'Datum NAD27', 'Spheroid CLARKE1866', 'Units METERS', 'Zunits NO', 'Xshift 0.0', 'Yshift 0.0', 'Parameters ', '1.0 /* scale factor at central meridian', '-106 56 0.5 /* longitude of central meridian', ' 39 33 30 /* latitude of origin', '0.0 /* false easting (meters)', '0.0 /* false northing (meters)']) expected = 'PROJCS["unnamed",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",39.5583333333333],PARAMETER["central_meridian",-106.933472222222],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["METERS",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' srs.MorphFromESRI() wkt = srs.ExportToWkt() if wkt != expected: print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected TM SRS after morphFromESRI') ############################################################################### # Test automatic morphing of ESRI-style LCC WKT prefixed with 'ESRI::' def test_osr_esri_12(): srs = osr.SpatialReference() srs.SetFromUserInput('ESRI::PROJCS["Lambert Conformal Conic",GEOGCS["grs80",DATUM["D_North_American_1983",SPHEROID["Geodetic_Reference_System_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",34.33333333333334],PARAMETER["standard_parallel_2",36.16666666666666],PARAMETER["latitude_of_origin",33.75],PARAMETER["central_meridian",-79],PARAMETER["false_easting",609601.22],PARAMETER["false_northing",0],UNIT["Meter",1]]') # No MorphFromESRI() is required assert srs.GetAttrValue('PROJECTION') == 'Lambert_Conformal_Conic_2SP', \ ('Got wrong PROJECTION name (%s) after ESRI morph.' % srs.GetAttrValue('PROJECTION')) assert srs.GetProjParm('standard_parallel_1') == pytest.approx(34.333333333, abs=0.00001), \ ('Got wrong parameter value (%g) after ESRI morph.' % srs.GetProjParm('standard_parallel_1')) if srs.GetAttrValue('DATUM') != 'North_American_Datum_1983': gdaltest.post_reason('Got wrong DATUM name (%s) after ESRI morph.' % srs.GetAttrValue('DATUM')) assert srs.GetAttrValue('UNIT') == 'metre', \ ('Got wrong UNIT name (%s) after ESRI morph.' % srs.GetAttrValue('UNIT')) ############################################################################### # Test automatic morphing of ESRI-style LCC WKT prefixed with 'ESRI::' # but read directly from file. def test_osr_esri_13(): srs = osr.SpatialReference() srs.SetFromUserInput('data/lcc_esri.prj') # No MorphFromESRI() is required assert srs.GetAttrValue('PROJECTION') == 'Lambert_Conformal_Conic_2SP', \ ('Got wrong PROJECTION name (%s) after ESRI morph.' % srs.GetAttrValue('PROJECTION')) assert srs.GetProjParm('standard_parallel_1') == pytest.approx(34.333333333, abs=0.00001), \ ('Got wrong parameter value (%g) after ESRI morph.' % srs.GetProjParm('standard_parallel_1')) if srs.GetAttrValue('DATUM') != 'North_American_Datum_1983': gdaltest.post_reason('Got wrong DATUM name (%s) after ESRI morph.' % srs.GetAttrValue('DATUM')) assert srs.GetAttrValue('UNIT') == 'metre', \ ('Got wrong UNIT name (%s) after ESRI morph.' % srs.GetAttrValue('UNIT')) ############################################################################### # Verify that state plane epsg authority values are not applied if the # linear units are changed for old style .prj files (bug #1697) def test_osr_esri_14(): srs = osr.SpatialReference() srs.ImportFromESRI(['PROJECTION STATEPLANE', 'UNITS feet', 'FIPSZONE 2600', 'DATUM NAD83', 'PARAMETERS']) assert srs.GetAuthorityCode('PROJCS') is None, \ 'Get epsg authority code inappropriately.' srs = osr.SpatialReference() srs.ImportFromESRI(['PROJECTION STATEPLANE', 'UNITS meter', 'FIPSZONE 2600', 'DATUM NAD83', 'PARAMETERS']) assert srs.GetAuthorityCode('PROJCS') == '32104', \ 'Did not get epsg authority code when expected.' ############################################################################### # Verify hotine oblique mercator handling, particularly handling # of the rectified_grid_angle parameter. def test_osr_esri_15(): srs = osr.SpatialReference() srs.SetFromUserInput('PROJCS["Bern_1898_Bern_LV03C",GEOGCS["GCS_Bern_1898_Bern",DATUM["D_Bern_1898",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Bern",7.439583333333333],UNIT["Degree",0.0174532925199433]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Azimuth",90.0],PARAMETER["Longitude_Of_Center",0.0],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1.0]]') expected = 'PROJCS["Bern_1898_Bern_LV03C",GEOGCS["GCS_Bern_1898_Bern",DATUM["D_Bern_1898",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Bern",7.43958333333333],UNIT["Degree",0.0174532925199433]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Azimuth",90.0],PARAMETER["Longitude_Of_Center",0.0],PARAMETER["Latitude_Of_Center",46.9524055555556],UNIT["Meter",1.0]]' srs.MorphFromESRI() wkt = srs.ExportToWkt() assert wkt.find('rectified_grid_angle') != -1, \ 'Did not get rectified_grid_angle as expected.' srs.MorphToESRI() wkt = srs.ExportToWkt() assert wkt.find('rectified_grid_angle') == -1, \ 'did not get rectified_grid_angle removed as expected.' if wkt != expected: print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected HOM projection after morphing') ############################################################################### # Verify translation of equirectangular to equidistant cylindrical with # cleanup of parameters. def test_osr_esri_16(): srs = osr.SpatialReference() srs.SetFromUserInput('+proj=eqc +lat_0=0 +lat_ts=-10 +lon_0=2 +x_0=100000 +y_0=200000 +ellps=sphere') expected = 'PROJCS["unknown",GEOGCS["GCS_unknown",DATUM["D_Unknown_based_on_Normal_Sphere_r_6370997_ellipsoid",SPHEROID["Normal_Sphere_r_6370997",6370997.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equidistant_Cylindrical"],PARAMETER["False_Easting",100000.0],PARAMETER["False_Northing",200000.0],PARAMETER["Central_Meridian",2.0],PARAMETER["Standard_Parallel_1",-10.0],UNIT["Meter",1.0]]' srs.MorphToESRI() wkt = srs.ExportToWkt() assert expected == wkt, 'Did not get expected equidistant cylindrical.' ############################################################################### # Test LAEA support (#3017) def test_osr_esri_17(): original = 'PROJCS["ETRS89 / ETRS-LAEA",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994328]],UNIT["metre",1],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",52],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000]]' srs = osr.SpatialReference() srs.SetFromUserInput(original) expected = 'PROJCS["ETRS89_ETRS_LAEA",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",4321000.0],PARAMETER["False_Northing",3210000.0],PARAMETER["Central_Meridian",10.0],PARAMETER["Latitude_Of_Origin",52.0],UNIT["Meter",1.0]]' srs.MorphToESRI() wkt = srs.ExportToWkt() if wkt not in (expected, expected.replace('ETRS89_ETRS_LAEA', 'ETRS89_ETRS-LAEA')): print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected LAEA SRS after morphToESRI') expected = 'PROJCS["ETRS89 / ETRS-LAEA",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",52],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000],UNIT["metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' srs.MorphFromESRI() wkt = srs.ExportToWkt() if wkt != expected: print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected LAEA SRS after morphFromESRI') ############################################################################### # Test EC morphing. def test_osr_esri_18(): original = """PROJCS["World_Equidistant_Cylindrical", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTION["Equidistant_Cylindrical"], PARAMETER["False_Easting",0], PARAMETER["False_Northing",0], PARAMETER["Central_Meridian",0], PARAMETER["Standard_Parallel_1",60], UNIT["Meter",1]]""" srs = osr.SpatialReference() srs.SetFromUserInput(original) expected = 'PROJCS["World_Equidistant_Cylindrical",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equirectangular"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["standard_parallel_1",60],UNIT["Meter",1]]' srs.MorphFromESRI() srs_expected = osr.SpatialReference(wkt=expected) if not srs.IsSame(srs_expected): print('') print('Got: ', srs.ExportToPrettyWkt()) print('Expected: ', srs_expected.ExportToPrettyWkt()) pytest.fail('Did not get expected EC SRS after morphFromESRI') expected = 'PROJCS["World_Equidistant_Cylindrical",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Equidistant_Cylindrical"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",60.0],UNIT["Meter",1.0]]' srs.MorphToESRI() wkt = srs.ExportToWkt() if wkt != expected: print('') print('Got: ', wkt) print('Expected: ', expected) pytest.fail('Did not get expected EC SRS after morphToESRI') ############################################################################### # Test spheroid remapping (per #3904) def test_osr_esri_19(): original = """GEOGCS["GCS_South_American_1969",DATUM["D_South_American_1969",SPHEROID["GRS_1967_Truncated",6378160.0,298.25]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]""" srs = osr.SpatialReference() srs.SetFromUserInput(original) srs.MorphFromESRI() expected = 'GRS 1967 Modified' if srs.GetAttrValue('SPHEROID') != expected: print('') print('Got: ', srs.ExportToPrettyWkt()) pytest.fail('Did not get expected spheroid name after morphFromESRI') srs.MorphToESRI() expected = 'GRS_1967_Truncated' if srs.GetAttrValue('SPHEROID') != expected: print('') print('Got: ', srs.ExportToPrettyWkt()) pytest.fail('Did not get expected spheroid name after morphToESRI') ############################################################################### # Test esri->ogc, esri->proj / ogc->esri, ogc->proj / proj->esri, proj->ogc def osr_esri_test(wkt_esri, wkt_ogc, proj4): silent = True # silent = False result = 'success' srs_from_esri = osr.SpatialReference() srs_ogc = osr.SpatialReference() if not silent: print('osr_esri_test( ) \nwkt_esri=' + wkt_esri + '\nwkt_ogc= ' + wkt_ogc + '\nproj4=' + proj4) # esri->ogc, esri->proj if not silent: print('\nesri->ogc, esri->proj\n') srs_from_esri.SetFromUserInput(wkt_esri) srs_from_esri.MorphFromESRI() srs_ogc.SetFromUserInput(wkt_ogc) wkt_esri_to_ogc = srs_from_esri.ExportToWkt() if not silent: print('wkt_ogc: ' + srs_ogc.ExportToWkt()) print('wkt_esri_to_ogc: ' + wkt_esri_to_ogc) if not srs_from_esri.IsSame(srs_ogc): print('wkt_esri_to_ogc failed for ' + proj4) result = 'fail' wkt_esri_to_proj4 = srs_from_esri.ExportToProj4() if not silent: print('wkt_esri_to_proj4: ' + wkt_esri_to_proj4) if wkt_esri_to_proj4 != proj4: print('wkt_esri_to_proj4 failed for ' + proj4 + '. Got ' + wkt_esri_to_proj4) result = 'fail' # ogc->esri if not silent: print('\nogc->esri, ogc->proj\n') srs_ogc.SetFromUserInput(wkt_ogc) srs_ogc.MorphToESRI() wkt_ogc_to_esri = srs_ogc.ExportToWkt() if not silent: print('wkt_ogc_to_esri: ' + wkt_ogc_to_esri) if wkt_ogc_to_esri != wkt_esri: print('wkt_ogc_to_esri failed for ' + proj4) print(wkt_ogc_to_esri) print(wkt_esri) result = 'fail' return result ############################################################################### # Test for various stereographic projection remappings (ESRI / OGC / PROJ.4) # Stereographic # Double_Stereographic / Oblique_Stereographic (#1428 and #4267) # Stereographic_North_Pole / Polar_Stereographic # Orthographics (#4249) def test_osr_esri_20(): result = 'success' # Stereographic / Stereographic / +proj=stere +lat_0=0 +lon_0=0 ... # modified definitions from ESRI 'Stereographic (world).prj' stere_esri = 'PROJCS["World_Stereographic",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Stereographic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]' stere_ogc = 'PROJCS["World_Stereographic",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Stereographic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]' stere_proj4 = '+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' result1 = osr_esri_test(stere_esri, stere_ogc, stere_proj4) # Double_Stereographic / Oblique_Stereographic / +proj=sterea +lat_0=46 +lon_0=25 ... # modified definitions from ESRI 'Stereo 1970.prj' sterea_esri = 'PROJCS["Stereo_70",GEOGCS["GCS_Dealul_Piscului_1970",DATUM["D_Dealul_Piscului_1970",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",500000.0],PARAMETER["Central_Meridian",25.0],PARAMETER["Scale_Factor",0.99975],PARAMETER["Latitude_Of_Origin",46.0],UNIT["Meter",1.0]]' sterea_ogc = 'PROJCS["Stereo_70",GEOGCS["GCS_Dealul_Piscului_1970",DATUM["Dealul_Piscului_1970",SPHEROID["Krasovsky_1940",6378245.0,298.3]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Oblique_Stereographic"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",500000.0],PARAMETER["Central_Meridian",25.0],PARAMETER["Scale_Factor",0.99975],PARAMETER["Latitude_Of_Origin",46.0],UNIT["Meter",1.0]]' sterea_proj4 = '+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs' result2 = osr_esri_test(sterea_esri, sterea_ogc, sterea_proj4) # Stereographic_North_Pole / Polar_Stereographic / +proj=stere +lat_0=90 +lat_ts=70 ... # modified definitions from ESRI 'WGS 1984 NSIDC Sea Ice Polar Stereographic North.prj' sterep_esri = 'PROJCS["WGS_1984_NSIDC_Sea_Ice_Polar_Stereographic_North",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Stereographic_North_Pole"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-45.0],PARAMETER["Standard_Parallel_1",70.0],UNIT["Meter",1.0]]' sterep_ogc = 'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic North",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",70],PARAMETER["central_meridian",-45],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3413"]]' sterep_proj4 = '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' result3 = osr_esri_test(sterep_esri, sterep_ogc, sterep_proj4) # Orthographic (#4249) ortho_esri = 'PROJCS["unnamed",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Orthographic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Longitude_Of_Center",145.0],PARAMETER["Latitude_Of_Center",-37.0],UNIT["Meter",1.0]]' ortho_ogc = 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Orthographic"],PARAMETER["latitude_of_origin",-37],PARAMETER["central_meridian",145],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]' ortho_proj4 = '+proj=ortho +lat_0=-37 +lon_0=145 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' result4 = osr_esri_test(ortho_esri, ortho_ogc, ortho_proj4) if (result1 != 'success' or result2 != 'success' or result3 != 'success' or result4 != 'success'): result = 'fail' return result ############################################################################### # Test LCC_2 Central_Parallel <--> latitude_of_origin issue (#3191) # def test_osr_esri_24(): srs = osr.SpatialReference() srs.ImportFromWkt('''PROJCS["Custom", GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.017453292519943295]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",10.5], PARAMETER["Standard_Parallel_1",48.66666666666666], PARAMETER["Standard_Parallel_2",53.66666666666666], PARAMETER["Central_Parallel",51.0], UNIT["Meter",1.0]]''') srs.MorphFromESRI() assert srs.GetProjParm(osr.SRS_PP_LATITUDE_OF_ORIGIN, 1000.0) != 1000.0, \ 'Failed to set latitude_of_origin' ############################################################################### # Test Pseudo-Mercator (#3962) # def test_osr_esri_25(): srs = osr.SpatialReference() srs.SetFromUserInput( 'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",' ' GEOGCS["GCS_WGS_1984",' ' DATUM["D_WGS_1984",' ' SPHEROID["WGS_1984",6378137.0,298.257223563]],' ' PRIMEM["Greenwich",0.0],' ' UNIT["Degree",0.017453292519943295]],' ' PROJECTION["Mercator_Auxiliary_Sphere"],' ' PARAMETER["False_Easting",0.0],' ' PARAMETER["False_Northing",0.0],' ' PARAMETER["Central_Meridian",0.0],' ' PARAMETER["Standard_Parallel_1",0.0],' ' PARAMETER["Auxiliary_Sphere_Type",0.0],' ' UNIT["Meter",1.0]]' ) target_srs = osr.SpatialReference() target_srs.ImportFromEPSG(4326) target_srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) transformer = osr.CoordinateTransformation(srs, target_srs) expected_proj4_string = ('+a=6378137 +b=6378137 +proj=merc +lat_ts=0' ' +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +no_defs') proj4_string = srs.ExportToProj4() if not (expected_proj4_string.split(' ').sort() == proj4_string.split(' ').sort()): # pylint: disable=superfluous-parens print('Got: %s' % expected_proj4_string) pytest.fail('Expected: %s' % proj4_string) # test an actual conversion (x, y, z) = transformer.TransformPoint(7000000, 7000000, 0) (exp_x, exp_y, exp_z) = (62.882069888366, 53.091818769596, 0.0) if (exp_x != pytest.approx(x, abs=0.00001) or exp_y != pytest.approx(y, abs=0.00001) or exp_z != pytest.approx(z, abs=0.00001)): print('Got: (%f, %f, %f)' % (x, y, z)) pytest.fail('Expected: (%f, %f, %f)' % (exp_x, exp_y, exp_z)) ############################################################################### # Test LCC_1SP (#2072) # def test_osr_esri_26(): srs = osr.SpatialReference() srs.SetFromUserInput("""PROJCS["NAD_1983_HARN_WISCRS_Washburn_County_Meters",GEOGCS["GCS_North_American_1983_HARN",DATUM["D_North_American_1983_HARN",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",234086.8682],PARAMETER["False_Northing",188358.6058],PARAMETER["Central_Meridian",-91.78333333333333],PARAMETER["Standard_Parallel_1",45.96121983333334],PARAMETER["Scale_Factor",1.0000475376],PARAMETER["Latitude_Of_Origin",45.96121983333334],UNIT["Meter",1.0]]""") srs.MorphFromESRI() assert srs.Validate() == 0, srs.ExportToWkt() ############################################################################### # Test Mercator_2SP (#4861) def test_osr_esri_27(): esri_wkt = """PROJCS["Batavia_NEIEZ", GEOGCS["GCS_Batavia", DATUM["D_Batavia", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator"], PARAMETER["False_Easting",3900000.0], PARAMETER["False_Northing",900000.0], PARAMETER["Central_Meridian",110.0], PARAMETER["Standard_Parallel_1",4.45405154589751], UNIT["Meter",1.0]]""" srs = osr.SpatialReference() srs.SetFromUserInput(esri_wkt) srs.MorphFromESRI() got_wkt = srs.ExportToPrettyWkt() assert got_wkt == """PROJCS["Batavia / NEIEZ", GEOGCS["Batavia", DATUM["Batavia", SPHEROID["Bessel 1841",6377397.155,299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6211"]], PRIMEM["Greenwich",0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",4.45405154589751], PARAMETER["central_meridian",110], PARAMETER["false_easting",3900000], PARAMETER["false_northing",900000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" srs.MorphToESRI() got_wkt = srs.ExportToPrettyWkt() assert got_wkt == """PROJCS["Batavia_NEIEZ", GEOGCS["GCS_Batavia", DATUM["D_Batavia", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator"], PARAMETER["False_Easting",3900000.0], PARAMETER["False_Northing",900000.0], PARAMETER["Central_Meridian",110.0], PARAMETER["Standard_Parallel_1",4.45405154589751], UNIT["Meter",1.0]]""" ############################################################################### # Test Mercator_1SP (#4861) def test_osr_esri_28(): ogc_wkt = """PROJCS["Segara (Jakarta) / NEIEZ (deprecated)", GEOGCS["Segara (Jakarta)", DATUM["Gunung_Segara_Jakarta", SPHEROID["Bessel 1841",6377397.155,299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[-403,684,41,0,0,0,0], AUTHORITY["EPSG","6820"]], PRIMEM["Jakarta",106.8077194444444, AUTHORITY["EPSG","8908"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4820"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",110], PARAMETER["scale_factor",0.997], PARAMETER["false_easting",3900000], PARAMETER["false_northing",900000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","2934"]]""" srs = osr.SpatialReference() srs.SetFromUserInput(ogc_wkt) # 1SP transformed to 2SP form ! srs.MorphToESRI() got_wkt = srs.ExportToPrettyWkt() # Do not do exact test because of subtle difference of precision among compilers assert got_wkt.startswith("""PROJCS["Gunung_Segara_Jakarta_NEIEZ", GEOGCS["GCS_Gunung_Segara_Jakarta", DATUM["D_Gunung_Segara", SPHEROID["Bessel_1841",6377397.155,299.1528128]], PRIMEM["Jakarta",106.807719444444], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator"], PARAMETER["False_Easting",3900000.0], PARAMETER["False_Northing",900000.0], PARAMETER["Central_Meridian",110.0], PARAMETER["Standard_Parallel_1",4.45405154""") srs = osr.SpatialReference() srs.SetFromUserInput(got_wkt) srs.MorphFromESRI() got_wkt = srs.ExportToPrettyWkt() # Do not do exact test because of subtle difference of precision among compilers assert got_wkt.startswith("""PROJCS["Segara (Jakarta) / NEIEZ", GEOGCS["Segara (Jakarta)", DATUM["Gunung_Segara_Jakarta", SPHEROID["Bessel 1841",6377397.155,299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6613"]], PRIMEM["Jakarta",106.807719444444], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",4.45405154""") ############################################################################### # Test Web Mercator def test_osr_esri_29(): srs = osr.SpatialReference() srs.ImportFromEPSG(3857) srs.MorphToESRI() got_wkt = srs.ExportToPrettyWkt() assert got_wkt == """PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator_Auxiliary_Sphere"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], PARAMETER["Standard_Parallel_1",0.0], PARAMETER["Auxiliary_Sphere_Type",0.0], UNIT["Meter",1.0]]""" srs.MorphFromESRI() got_wkt = srs.ExportToPrettyWkt() assert got_wkt == """PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"], AUTHORITY["EPSG","3857"]]""" # 6134 srs.SetFromUserInput("""PROJCS["WGS_84_Pseudo_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],PARAMETER["standard_parallel_1",0.0]]""") srs.MorphFromESRI() got_wkt = srs.ExportToPrettyWkt() assert got_wkt == """PROJCS["WGS_84_Pseudo_Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"]]""" ############################################################################### # Verify import of custom ellipsoid def test_osr_esri_30(): prj = ['Projection GEOGRAPHIC', 'Parameters 6370000.0 6370000.0', ''] srs_prj = osr.SpatialReference() srs_prj.ImportFromESRI(prj) wkt = """GEOGCS["unknown", DATUM["unknown", SPHEROID["unknown",6370000,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""" srs_wkt = osr.SpatialReference(wkt=wkt) assert srs_prj.IsSame(srs_wkt) ############################################################################### # Verify import of old-style Mercator def test_osr_esri_31(): prj = ['Projection MERCATOR', 'Datum WGS84', 'Spheroid WGS84', 'Units METERS', 'Zunits NO', 'Xshift 0.0', 'Yshift 0.0', 'Parameters ', '100 0 0.0 /* longitude of central meridian', '-41 0 0.0 /* latitude of true scale', '100.0 /* false easting (meters)', '200.0 /* false northing (meters)' ''] srs_prj = osr.SpatialReference() srs_prj.ImportFromESRI(prj) wkt = """PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["latitude_of_origin",-41], PARAMETER["central_meridian",100], PARAMETER["scale_factor",1], PARAMETER["false_easting",100], PARAMETER["false_northing",200], UNIT["METERS",1]]""" srs_wkt = osr.SpatialReference(wkt=wkt) assert srs_prj.IsSame(srs_wkt) ############################################################################### # Bad Equidistant Conic def test_osr_esri_32(): # Autofuzz POC from b/65416453 prj = [ 'PROJECTIONLOCA?L_CSw?( EQUIDISTANT_CONIC', 'Paramet', '55555555555555'] srs_prj = osr.SpatialReference() with gdaltest.error_handler('CPLQuietErrorHandler'): result = srs_prj.ImportFromESRI(prj) assert result == ogr.OGRERR_CORRUPT_DATA, \ 'Corrupt EQUIDISTANT_CONIC not marked corrupt' ############################################################################### # Test morphing invalid PROJCS WKT does not crash def test_osr_esri_33(): sr = osr.SpatialReference() with gdaltest.error_handler(): sr.ImportFromWkt('PROJCS[]') sr.MorphFromESRI() sr.MorphToESRI() ############################################################################### # gdalautotest-3.1.2/osr/__init__.py0000775000175000017500000000000013701057753015610 0ustar evenevengdalautotest-3.1.2/osr/osr_metacrs.py0000775000175000017500000001322513701057753016407 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_metacrs.py 34914f6e10abac1b75bea95d52ed3541aaf9c800 2019-08-01 16:39:53 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test with MetaCRS TestSuite # Author: Frank Warmerdam, warmerdam@pobox.com # ############################################################################### # Copyright (c) 2009, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import csv import pytest import gdaltest from osgeo import osr, gdal ############################################################################### # When imported build a list of units based on the files available. csv_rows = list(csv.DictReader(open(os.path.join(os.path.dirname(__file__), 'data/Test_Data_File.csv'), 'rt'))) class TestMetaCRS(object): @pytest.mark.parametrize( 'test_line', csv_rows, ids=[row['testName'] for row in csv_rows] ) def test_metacrs(self, test_line): self.test_line = test_line self.src_xyz = None self.dst_xyz = None self.src_srs = None self.dst_srs = None self.dst_error = None result = self.parse_line() ct = osr.CoordinateTransformation(self.src_srs, self.dst_srs) ###################################################################### # Transform source point to destination SRS result = ct.TransformPoint(self.src_xyz[0], self.src_xyz[1], self.src_xyz[2]) # This is odd, but it seems the expected results are switched if self.src_srs.EPSGTreatsAsLatLong(): result = (result[1], result[0], result[2]) ###################################################################### # Check results. error = abs(result[0] - self.dst_xyz[0]) \ + abs(result[1] - self.dst_xyz[1]) \ + abs(result[2] - self.dst_xyz[2]) if error > self.dst_error: err_msg = 'Dest error is %g, src=%g,%g,%g, dst=%.18g,%.18g,%.18g, exp=%.18g,%.18g,%.18g' \ % (error, self.src_xyz[0], self.src_xyz[1], self.src_xyz[2], result[0], result[1], result[2], self.dst_xyz[0], self.dst_xyz[1], self.dst_xyz[2]) gdal.Debug('OSR', 'Src SRS:\n%s\n\nDst SRS:\n%s\n' % (self.src_srs.ExportToPrettyWkt(), self.dst_srs.ExportToPrettyWkt())) pytest.fail(err_msg) self.src_srs = None self.dst_srs = None def parse_line(self): test_line = self.test_line self.src_srs = self.build_srs(test_line['srcCrsAuth'], test_line['srcCrs']) try: self.dst_srs = self.build_srs(test_line['tgtCrsAuth'], test_line['tgtCrs']) except: # Old style self.dst_srs = self.build_srs(test_line['tgtCrsType'], test_line['tgtCrs']) assert not (self.src_srs is None or self.dst_srs is None) try: self.src_xyz = (float(test_line['srcOrd1']), float(test_line['srcOrd2']), float(test_line['srcOrd3'])) except: self.src_xyz = (float(test_line['srcOrd1']), float(test_line['srcOrd2']), 0.0) try: self.dst_xyz = (float(test_line['tgtOrd1']), float(test_line['tgtOrd2']), float(test_line['tgtOrd3'])) except: self.dst_xyz = (float(test_line['tgtOrd1']), float(test_line['tgtOrd2']), 0.0) try: self.dst_error = max(float(test_line['tolOrd1']), float(test_line['tolOrd2']), float(test_line['tolOrd3'])) except: self.dst_error = max(float(test_line['tolOrd1']), float(test_line['tolOrd2'])) def build_srs(self, typ, crstext): if typ == 'EPSG': srs = osr.SpatialReference() if srs.ImportFromEPSG(int(crstext)) == 0: return srs gdaltest.post_reason('failed to translate EPSG:' + crstext) return None gdaltest.post_reason('unsupported srs type: ' + typ) return None gdalautotest-3.1.2/osr/osr_xml.py0000775000175000017500000002035413701057753015552 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_xml.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OSR XML import/export # Author: Even Rouault, # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import re import gdaltest from osgeo import osr ############################################################################### # Test the osr.SpatialReference.ImportFromXML() function. # def test_osr_xml_1(): gdaltest.srs_xml = """ WGS 84 / UTM zone 31N 32631 WGS 84 4326 ellipsoidal 6402 Geodetic latitude 9901 Lat north Geodetic longitude 9902 Lon east WGS_1984 6326 Greenwich 8901 0 WGS 84 7030 6378137 298.257223563 Transverse_Mercator 0 3 0.9996 500000 0 Cartesian 4400 Easting 9906 E east Northing 9907 N north """ gdaltest.srs_wkt = """PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32631"]]""" srs = osr.SpatialReference() srs.ImportFromXML(gdaltest.srs_xml) got = srs.ExportToWkt() expected = gdaltest.srs_wkt assert got == expected ############################################################################### # Test the osr.SpatialReference.ExportToXML() function. # def test_osr_xml_2(): srs = osr.SpatialReference() srs.ImportFromWkt(gdaltest.srs_wkt) expected = gdaltest.srs_xml got = srs.ExportToXML() # Strip the gml:id tags got = re.sub(r' gml:id="[^"]*"', '', got, 0) expected = re.sub(r' gml:id="[^"]*"', '', expected, 0) assert got == expected gdalautotest-3.1.2/osr/osr_proj4.py0000775000175000017500000006447013701057753016017 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_proj4.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test some PROJ.4 specific translation issues. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # Copyright (c) 2014, Kyle Shannon # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal, osr import gdaltest import pytest ############################################################################### # Test the +k_0 flag works as well as +k when consuming PROJ.4 format. # This is from Bugzilla bug 355. # def test_osr_proj4_1(): srs = osr.SpatialReference() srs.ImportFromProj4('+proj=tmerc +lat_0=53.5000000000 +lon_0=-8.0000000000 +k_0=1.0000350000 +x_0=200000.0000000000 +y_0=250000.0000000000 +a=6377340.189000 +rf=299.324965 +towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15') assert srs.GetProjParm(osr.SRS_PP_SCALE_FACTOR) == pytest.approx(1.000035, abs=0.0000005), \ '+k_0 not supported on import from PROJ.4?' ############################################################################### # Verify that we can import strings with parameter values that are exponents # and contain a plus sign. As per bug 355 in GDAL/OGR's bugzilla. # def test_osr_proj4_2(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=lcc +x_0=0.6096012192024384e+06 +y_0=0 +lon_0=90dw +lat_0=42dn +lat_1=44d4'n +lat_2=42d44'n +a=6378206.400000 +rf=294.978698 +nadgrids=conus,ntv1_can.dat +units=m") assert srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) == pytest.approx(609601.219, abs=0.0005), \ 'Parsing exponents not supported?' if srs.Validate() != 0: print(srs.ExportToPrettyWkt()) pytest.fail('does not validate') ############################################################################### # Verify that unrecognized projections return an error, not those # annoying ellipsoid-only results. # def test_osr_proj4_4(): srs = osr.SpatialReference() srs.SetFromUserInput('+proj=utm +zone=11 +datum=WGS84') srs.SetAttrValue('PROJCS|PROJECTION', 'FakeTransverseMercator') try: gdal.PushErrorHandler('CPLQuietErrorHandler') srs.ExportToProj4() gdal.PopErrorHandler() except RuntimeError: gdal.PopErrorHandler() if gdal.GetLastErrorMsg().find('Unsupported conversion method') != -1: return pytest.fail('unknown srs not handled properly') ############################################################################### # Verify that prime meridians are preserved when round tripping. (#1940) # def test_osr_proj4_5(): srs = osr.SpatialReference() input_p4 = '+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +ellps=clrk80ign +pm=paris +towgs84=-168,-60,320,0,0,0,0 +units=m +no_defs' srs.ImportFromProj4(input_p4) assert float(srs.GetAttrValue('PRIMEM', 1)) == pytest.approx(2.3372291667, abs=0.00000001), \ 'prime meridian lost?' assert abs(srs.GetProjParm('central_meridian')) == 0.0, 'central meridian altered?' p4 = srs.ExportToProj4() if p4 != input_p4: gdaltest.post_reason('round trip via PROJ.4 damaged srs?') print(p4) return 'fail' ############################################################################### # Confirm handling of non-zero latitude of origin mercator (#3026) # def test_osr_proj4_6(): wkt = """PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["latitude_of_origin",46.1333331], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",1000], PARAMETER["false_northing",2000], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""" srs = osr.SpatialReference() srs.ImportFromWkt(wkt) proj4 = srs.ExportToProj4() expect_proj4 = '+proj=merc +lat_ts=46.1333331 +lon_0=0 +x_0=1000 +y_0=2000 +datum=WGS84 +units=m +no_defs' assert proj4 == expect_proj4 ############################################################################### # Confirm handling of somerc (#3032). # def test_osr_proj4_7(): srs = osr.SpatialReference() srs.ImportFromEPSG(23700) proj4 = srs.ExportToProj4() expected = '+proj=somerc +lat_0=47.1443937222222 +lon_0=19.0485717777778 +k_0=0.99993 +x_0=650000 +y_0=200000 +ellps=GRS67 +towgs84=52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191 +units=m +no_defs' assert proj4 == expected srs.ImportFromProj4(proj4) proj4 = srs.ExportToProj4() assert proj4 == expected ############################################################################### # Check EPSG:3857, confirm Google Mercator hackery. def test_osr_proj4_8(): srs = osr.SpatialReference() srs.ImportFromEPSG(3857) proj4 = srs.ExportToProj4() expected = '+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs' assert proj4 == expected, 'did not get expected EPSG:3857 (google mercator) result.' srs = osr.SpatialReference() srs.ImportFromEPSG(3785) proj4 = srs.ExportToProj4() assert proj4 == expected, 'did not get expected EPSG:3785 (google mercator) result.' ############################################################################### # NAD27 is a bit special - make sure no towgs84 values come through. # def test_osr_proj4_9(): srs = osr.SpatialReference() srs.ImportFromEPSG(4267) proj4 = srs.ExportToProj4() expected = '+proj=longlat +datum=NAD27 +no_defs' assert proj4 == expected, 'did not get expected EPSG:4267 (NAD27)' srs = osr.SpatialReference() srs.SetFromUserInput('NAD27') proj4 = srs.ExportToProj4() assert proj4 == expected, 'did not get expected "NAD27"' ############################################################################### # Does geocentric work okay? # def test_osr_proj4_10(): srs = osr.SpatialReference() srs.ImportFromProj4('+proj=geocent +ellps=WGS84 +towgs84=0,0,0 ') wkt_expected = 'GEOCCS["unknown",DATUM["Unknown_based_on_WGS84_ellipsoid",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Geocentric X",OTHER],AXIS["Geocentric Y",OTHER],AXIS["Geocentric Z",NORTH]]' assert gdaltest.equal_srs_from_wkt(wkt_expected, srs.ExportToWkt()), \ 'did not get expected wkt.' p4 = srs.ExportToProj4() srs2 = osr.SpatialReference() srs2.ImportFromProj4(p4) if not srs.IsSame(srs2): print(srs.ExportToPrettyWkt()) print(srs2.ExportToPrettyWkt()) pytest.fail('round trip via PROJ.4 damaged srs?') ############################################################################### # Test round-tripping of all supported projection methods # def test_osr_proj4_11(): proj4strlist = ['+proj=bonne +lat_1=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=cass +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=nzmg +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=cea +lat_ts=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=tmerc +lat_0=1 +lon_0=2 +k=5 +x_0=3 +y_0=4', '+proj=utm +zone=31 +south', '+proj=merc +lat_ts=45 +lon_0=2 +x_0=3 +y_0=4', '+proj=merc +lon_0=2 +k=5 +x_0=3 +y_0=4', '+proj=stere +lat_0=90 +lat_ts=90 +lon_0=2 +x_0=3 +y_0=4', '+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=2 +x_0=3 +y_0=4', '+proj=stere +lat_0=90 +lon_0=2 +k=0.99 +x_0=3 +y_0=4', '+proj=sterea +lat_0=45 +lon_0=2 +k=2 +x_0=3 +y_0=4', '+proj=stere +lat_0=1 +lon_0=2 +k=1 +x_0=3 +y_0=4', '+proj=eqc +lat_ts=0 +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=gstmerc +lat_0=1 +lon_0=2 +k_0=5 +x_0=3 +y_0=4', '+proj=gnom +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=ortho +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=laea +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=aeqd +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=eqdc +lat_0=1 +lon_0=2 +lat_1=-2 +lat_2=-1 +x_0=3 +y_0=4', '+proj=mill +R_A +lon_0=2 +x_0=3 +y_0=4', '+proj=moll +lon_0=2 +x_0=3 +y_0=4', '+proj=eck1 +lon_0=2 +x_0=3 +y_0=4', '+proj=eck2 +lon_0=2 +x_0=3 +y_0=4', '+proj=eck3 +lon_0=2 +x_0=3 +y_0=4', '+proj=eck4 +lon_0=2 +x_0=3 +y_0=4', '+proj=eck5 +lon_0=2 +x_0=3 +y_0=4', '+proj=eck6 +lon_0=2 +x_0=3 +y_0=4', '+proj=poly +lat_0=1 +lon_0=2 +x_0=3 +y_0=4', '+proj=aea +lat_0=1 +lon_0=2 +lat_1=-2 +lat_2=-1 +x_0=3 +y_0=4', '+proj=robin +lon_0=2 +x_0=3 +y_0=4', '+proj=vandg +R_A +lon_0=2 +x_0=3 +y_0=4', '+proj=sinu +lon_0=2 +x_0=3 +y_0=4', '+proj=gall +lon_0=2 +x_0=3 +y_0=4', '+proj=goode +lon_0=2 +x_0=3 +y_0=4', '+proj=igh +lon_0=0 +x_0=0 +y_0=0', '+proj=geos +lon_0=2 +h=1 +x_0=3 +y_0=4', '+proj=lcc +lat_1=1 +lat_0=1 +lon_0=2 +k_0=2 +x_0=3 +y_0=4', '+proj=lcc +lat_0=60 +lon_0=2 +lat_1=-10 +lat_2=30 +x_0=3 +y_0=4', '+proj=lcc +lat_0=-10 +lon_0=2 +lat_1=-10 +lat_2=30 +x_0=3 +y_0=4', '+proj=omerc +lat_0=1 +lonc=2 +alpha=-1 +gamma=-2 +k=2.5 +x_0=3 +y_0=4', '+proj=omerc +lat_0=1 +lat_1=3 +lon_1=2 +lat_2=5 +lon_2=4 +k=2.5 +x_0=3 +y_0=4', '+proj=somerc +lat_0=1 +lon_0=2 +k_0=2 +x_0=3 +y_0=4', '+proj=krovak +lat_0=1 +lon_0=2 +alpha=30.2881397222222 +k=2 +x_0=3 +y_0=4', '+proj=imw_p +lon_0=2 +lat_1=-2 +lat_2=-1 +x_0=3 +y_0=4', '+proj=wag1 +lon_0=0 +x_0=3 +y_0=4', '+proj=wag2 +lon_0=0 +x_0=3 +y_0=4', '+proj=wag3 +lat_ts=1 +lon_0=0 +x_0=3 +y_0=4', '+proj=wag4 +lon_0=0 +x_0=3 +y_0=4', '+proj=wag5 +lon_0=0 +x_0=3 +y_0=4', '+proj=wag6 +lon_0=0 +x_0=3 +y_0=4', '+proj=wag7 +lon_0=0 +x_0=3 +y_0=4', '+proj=tpeqd +lat_1=1 +lon_1=2 +lat_2=3 +lon_2=4 +x_0=5 +y_0=6', #'+proj=utm +zone=31 +south +ellps=WGS84 +units=us-ft +no_defs ', #'+proj=utm +zone=31 +south +ellps=WGS84 +units=ft +no_defs ', #'+proj=utm +zone=31 +south +ellps=WGS84 +units=yd +no_defs ', #'+proj=utm +zone=31 +south +ellps=WGS84 +units=us-yd +no_defs ', ['+proj=etmerc +lat_0=0 +lon_0=9 +k=0.9996 +units=m +x_0=500000 +datum=WGS84 +no_defs', '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs'], '+proj=qsc +lat_0=0 +lon_0=0 +x_0=0 +y_0=0', '+proj=sch +plat_0=1 +plon_0=2 +phdg_0=3 +h_0=4' ] for input_ in proj4strlist: if isinstance(input_, list): proj4str, expected = input_ else: proj4str = input_ if proj4str.find("+no_defs") == -1: proj4str = proj4str + " +ellps=WGS84 +units=m +no_defs" expected = proj4str srs = osr.SpatialReference() srs.ImportFromProj4(proj4str) if srs.Validate() != 0: print(proj4str) print(srs.ExportToPrettyWkt()) pytest.fail('does not validate') out = srs.ExportToProj4() assert out == expected, 'round trip via PROJ.4 failed' ############################################################################### # Test importing +init=epsg:XXX # def test_osr_proj4_12(): expect_wkt = """GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]]""" srs = osr.SpatialReference() srs.ImportFromProj4("+init=epsg:4326") wkt = srs.ExportToPrettyWkt() if not wkt.startswith("""GEOGCS["WGS 84"""): print('Got:%s' % wkt) print('Expected:%s' % expect_wkt) pytest.fail('Did not get expected result.') ############################################################################### # Test error cases # def test_osr_proj4_13(): proj4strlist = ['', # None, 'foo', '+a=5', '+proj=foo', '+proj=longlat +ellps=wgs72 +towgs84=3'] gdal.PushErrorHandler('CPLQuietErrorHandler') for proj4str in proj4strlist: srs = osr.SpatialReference() gdal.ErrorReset() if srs.ImportFromProj4(proj4str) == 0 and gdal.GetLastErrorMsg() == '': gdal.PopErrorHandler() print(proj4str) pytest.fail() gdal.PopErrorHandler() ############################################################################### # Test etmerc (#4853) # def test_osr_proj4_14(): proj4str = '+proj=etmerc +lat_0=1 +lon_0=2 +k=0.9996 +x_0=3 +y_0=4 +datum=WGS84 +nodefs' # Test importing etmerc srs = osr.SpatialReference() srs.ImportFromProj4(proj4str) wkt = srs.ExportToPrettyWkt() expect_wkt = """PROJCS["unknown", GEOGCS["unknown", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",1], PARAMETER["central_meridian",2], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",3], PARAMETER["false_northing",4], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" if wkt != expect_wkt: print('Got:%s' % wkt) print('Expected:%s' % expect_wkt) pytest.fail('Did not get expected result.') srs = osr.SpatialReference() srs.ImportFromEPSG(32600 + 32) # Test exporting standard Transverse_Mercator, without any particular option proj4str = srs.ExportToProj4() expect_proj4str = '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs' assert proj4str == expect_proj4str srs = osr.SpatialReference() proj4str = '+proj=etmerc +lat_0=1 +lon_0=2 +k=0.9996 +x_0=3 +y_0=4 +datum=WGS84 +units=m +no_defs' srs.ImportFromProj4(proj4str) # Test exporting standard Transverse_Mercator, with OSR_USE_APPROX_TMERC=YES with gdaltest.config_option('OSR_USE_APPROX_TMERC', 'YES'): got_proj4str = srs.ExportToProj4() gdal.SetConfigOption('OSR_USE_APPROX_TMERC', None) assert got_proj4str == '+proj=tmerc +approx +lat_0=1 +lon_0=2 +k=0.9996 +x_0=3 +y_0=4 +datum=WGS84 +units=m +no_defs' # Test exporting standard Transverse_Mercator, with OSR_USE_APPROX_TMERC=YES srs = osr.SpatialReference() srs.ImportFromEPSG(32600 + 32) with gdaltest.config_option('OSR_USE_APPROX_TMERC', 'YES'): got_proj4str = srs.ExportToProj4() assert got_proj4str == '+proj=utm +approx +zone=32 +datum=WGS84 +units=m +no_defs' ############################################################################### # Test unit parsing # def test_osr_proj4_16(): def almost(a, b): if a != pytest.approx(b, abs=0.000000000001): return False return True units = (('km', 1000.), ('m', 1.), ('dm', 1. / 10.), ('cm', 1. / 100.), ('mm', 1. / 1000.), ('kmi', 1852.0), ('in', 0.0254), ('ft', 0.3048), ('yd', 0.9144), ('mi', 1609.344), ('fath', 1.8288), ('ch', 20.1168), ('link', 0.201168), ('us-in', 1. / 39.37), ('us-ft', 0.304800609601219), ('us-yd', 0.914401828803658), ('us-ch', 20.11684023368047), ('us-mi', 1609.347218694437), ('ind-yd', 0.91439523), ('ind-ft', 0.30479841), ('ind-ch', 20.11669506)) srs = osr.SpatialReference() for u in units: assert srs.ImportFromProj4('+proj=utm +zone=11 +datum=WGS84 +units=%s' % u[0]) == 0 to_met = srs.GetLinearUnits() assert almost(to_met, u[1]), \ ('Did not get expected units for %s: %.12f vs %.12f' % (u[0], u[1], to_met)) ############################################################################### # Test unit parsing for name assignment # def test_osr_proj4_17(): units = (('km', 'kilometre'), ('m', 'metre'), ('dm', 'decimetre'), ('cm', 'centimetre'), ('mm', 'millimetre'), ('kmi', 'nautical mile'), ('in', 'inch'), ('ft', 'foot'), ('yd', 'yard'), ('mi', 'Statute mile'), ('fath', 'fathom'), ('ch', 'chain'), ('link', 'link'), ('us-in', 'US survey inch'), ('us-ft', 'US survey foot'), ('us-yd', 'US survey yard'), ('us-ch', 'US survey chain'), ('us-mi', 'US survey mile'), ('ind-yd', 'Indian yard (1937)'), ('ind-ft', 'Indian foot (1937)'), ('ind-ch', 'Indian chain')) srs = osr.SpatialReference() for u in units: assert srs.ImportFromProj4('+proj=utm +zone=11 +datum=WGS84 +units=%s' % u[0]) == 0 unit_name = srs.GetLinearUnitsName() assert unit_name == u[1], \ ('Did not get expected unit name: %s vs %s' % (str(u), str(unit_name))) ############################################################################### # Test fix for #5511 # def test_osr_proj4_18(): for p in ['no_off', 'no_uoff']: srs = osr.SpatialReference() srs.ImportFromProj4('+proj=omerc +lat_0=57 +lonc=-133 +alpha=-36 +k=0.9999 +x_0=5000000 +y_0=-5000000 +%s +datum=NAD83 +units=m +no_defs' % p) if srs.Validate() != 0: print(srs.ExportToPrettyWkt()) pytest.fail('does not validate') out = srs.ExportToProj4() proj4str = '+proj=omerc +no_uoff +lat_0=57 +lonc=-133 +alpha=-36 +gamma=-36 +k=0.9999 +x_0=5000000 +y_0=-5000000 +datum=NAD83 +units=m +no_defs' if out != proj4str: print(p) pytest.fail('round trip via PROJ.4 failed') ############################################################################### # Test EXTENSION and AUTHORITY in DATUM def test_osr_proj4_19(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=longlat +datum=WGS84 +nadgrids=@null") assert srs.ExportToWkt().find('DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],EXTENSION["PROJ4_GRIDS","@null"],AUTHORITY["EPSG","6326"]]') > 0 if srs.Validate() != 0: print(srs.ExportToPrettyWkt()) pytest.fail('does not validate') ############################################################################### # Test EXTENSION in GEOGCS def test_osr_proj4_20(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=longlat +lon_0=90") assert srs.ExportToWkt() == 'GEOGCS["unknown",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Longitude",EAST],AXIS["Latitude",NORTH],EXTENSION["PROJ4","+proj=longlat +lon_0=90"]]' if srs.Validate() != 0: print(srs.ExportToPrettyWkt()) pytest.fail('does not validate') ############################################################################### # Test importing datum other than WGS84, WGS72, NAD27 or NAD83 def test_osr_proj4_21(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=longlat +datum=nzgd49") got = srs.ExportToProj4() assert got.startswith('+proj=longlat +ellps=intl') ############################################################################### # Test importing ellipsoid defined with +R def test_osr_proj4_22(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=longlat +R=1") got = srs.ExportToProj4() assert got.startswith('+proj=longlat +R=1') ############################################################################### # Test importing ellipsoid defined with +a and +f def test_osr_proj4_23(): # +f=0 particular case srs = osr.SpatialReference() srs.ImportFromProj4("+proj=longlat +a=1 +f=0") got = srs.ExportToProj4() assert got.startswith('+proj=longlat +R=1') srs = osr.SpatialReference() srs.ImportFromProj4("+proj=longlat +a=2 +f=0.5") got = srs.ExportToProj4() assert got.startswith('+proj=longlat +a=2 +rf=2') ############################################################################### # Test importing linear units defined with +to_meter def test_osr_proj4_24(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +to_meter=1.0") got = srs.ExportToProj4() assert '+units=m' in got # Intl foot srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +to_meter=0.3048") got = srs.ExportToProj4() assert '+units=ft' in got # US foot srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +to_meter=0.3048006096012192") got = srs.ExportToProj4() assert '+units=us-ft' in got # unknown srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +to_meter=0.4") got = srs.ExportToProj4() assert '+to_meter=0.4' in got ############################################################################### # Test importing linear units defined with +vto_meter def test_osr_proj4_25(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vto_meter=1.0") got = srs.ExportToProj4() assert '+vunits=m' in got # Intl foot srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vto_meter=0.3048") got = srs.ExportToProj4() assert '+vunits=ft' in got # US foot srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vto_meter=0.3048006096012192") got = srs.ExportToProj4() assert '+vunits=us-ft' in got # Unknown srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vto_meter=0.4") got = srs.ExportToProj4() assert '+vto_meter=0.4' in got ############################################################################### # Test importing linear units defined with +vunits def test_osr_proj4_26(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vunits=m") got = srs.ExportToProj4() assert '+vunits=m' in got # Intl foot srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vunits=ft") got = srs.ExportToProj4() assert '+vunits=ft' in got # US yard srs = osr.SpatialReference() srs.ImportFromProj4("+proj=merc +geoidgrids=foo +vunits=us-yd") got = srs.ExportToProj4() assert '+vunits=us-yd' in got ############################################################################### # Test geostationary +sweep (#6030) def test_osr_proj4_27(): srs = osr.SpatialReference() srs.ImportFromProj4("+proj=geos +sweep=x +lon_0=0 +h=35785831 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs") got = srs.ExportToProj4() assert '+proj=geos +sweep=x +lon_0=0 +h=35785831 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' in got ############################################################################### # Test importing +init=epsg: with an override def test_osr_proj4_28(): srs = osr.SpatialReference() srs.ImportFromProj4("+init=epsg:32631 +units=cm") got = srs.ExportToWkt() assert '32631' not in got assert 'Transverse_Mercator' in got assert 'UNIT["centimetre",0.01' in got def test_osr_proj4_error_cases_export_mercator(): srs = osr.SpatialReference() # latitude_of_origin != 0.0 and scale != 1.0 srs.SetFromUserInput('WGS84') srs.SetMercator(30.0, 0.0, 0.99, 0.0, 0.0) srs.SetLinearUnits('metre', 1) with gdaltest.error_handler(): got = srs.ExportToProj4() assert got == '' # latitude_of_origin != 0.0 srs = osr.SpatialReference() srs.SetFromUserInput('WGS84') srs.SetMercator2SP(0.0, 40.0, 0.0, 0.0, 0.0) srs.SetLinearUnits('metre', 1) with gdaltest.error_handler(): got = srs.ExportToProj4() assert got == '' gdalautotest-3.1.2/osr/osr_basic.py0000775000175000017500000017063613701057753016044 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_basic.py b286871e3ee58afac4712c5c0a9c77f930c5055a 2020-03-09 18:34:56 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Basic tests of OGRSpatialReference (OSR) operation, not including # support for actual reprojection or use of EPSG tables. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import osr import pytest from threading import Thread ############################################################################### # Create a UTM WGS84 coordinate system and check various items. def test_osr_basic_1(): utm_srs = osr.SpatialReference() # Southern hemisphere utm_srs.SetUTM(11, 0) utm_srs.SetWellKnownGeogCS('WGS84') assert utm_srs.GetUTMZone() == -11 # Northern hemisphere utm_srs.SetUTM(11) assert utm_srs.GetUTMZone() == 11 parm_list = \ [(osr.SRS_PP_CENTRAL_MERIDIAN, -117.0), (osr.SRS_PP_LATITUDE_OF_ORIGIN, 0.0), (osr.SRS_PP_SCALE_FACTOR, 0.9996), (osr.SRS_PP_FALSE_EASTING, 500000.0), (osr.SRS_PP_FALSE_NORTHING, 0.0)] for parm in parm_list: value = utm_srs.GetProjParm(parm[0], -1111) assert value == pytest.approx(parm[1], abs=.00000000000010), ('got %g for %s instead of %g.' % (value, parm[0], parm[1])) auth_list = [('GEOGCS', '4326'), ('DATUM', '6326')] for auth in auth_list: assert utm_srs.GetAuthorityName(auth[0]) == 'EPSG', \ ('Got authority %s instead of EPSG for %s' % (utm_srs.GetAuthorityName(auth[0]), auth[0])) assert str(utm_srs.GetAuthorityCode(auth[0])) == auth[1], \ ('Got code %s instead of %s for %s' % (utm_srs.GetAuthorityName(auth[0]), auth[1], auth[0])) ############################################################################### # Simple default NAD83 State Plane zone. def test_osr_basic_2(): srs = osr.SpatialReference() srs.SetStatePlane(403, 1) # California III NAD83. parm_list = \ [(osr.SRS_PP_STANDARD_PARALLEL_1, 38.43333333333333), (osr.SRS_PP_STANDARD_PARALLEL_2, 37.06666666666667), (osr.SRS_PP_LATITUDE_OF_ORIGIN, 36.5), (osr.SRS_PP_CENTRAL_MERIDIAN, -120.5), (osr.SRS_PP_FALSE_EASTING, 2000000.0), (osr.SRS_PP_FALSE_NORTHING, 500000.0)] for parm in parm_list: value = srs.GetProjParm(parm[0], -1111) assert gdaltest.approx_equal(parm[1], value), \ ('got %.16g for %s instead of %.16g.' % (value, parm[0], parm[1])) auth_list = [('GEOGCS', '4269'), ('DATUM', '6269'), ('PROJCS', '26943'), ('PROJCS|UNIT', '9001')] for auth in auth_list: assert srs.GetAuthorityName(auth[0]) == 'EPSG', \ ('Got authority %s instead of EPSG for %s' % (srs.GetAuthorityName(auth[0]), auth[0])) assert str(srs.GetAuthorityCode(auth[0])) == auth[1], \ ('Got code %s instead of %s for %s' % (srs.GetAuthorityCode(auth[0]), auth[1], auth[0])) ############################################################################### # NAD83 State Plane zone, but overridden to be in Feet. def test_osr_basic_3(): srs = osr.SpatialReference() # California III NAD83 (feet) srs.SetStatePlane(403, 1, 'Foot', 0.3048006096012192) # print srs.ExportToPrettyWkt() parm_list = \ [(osr.SRS_PP_STANDARD_PARALLEL_1, 38.43333333333333), (osr.SRS_PP_STANDARD_PARALLEL_2, 37.06666666666667), (osr.SRS_PP_LATITUDE_OF_ORIGIN, 36.5), (osr.SRS_PP_CENTRAL_MERIDIAN, -120.5), (osr.SRS_PP_FALSE_EASTING, 6561666.666666667), (osr.SRS_PP_FALSE_NORTHING, 1640416.666666667)] for parm in parm_list: value = srs.GetProjParm(parm[0], -1111) assert gdaltest.approx_equal(parm[1], value), \ ('got %.16g for %s instead of %.16g.' % (value, parm[0], parm[1])) auth_list = [('GEOGCS', '4269'), ('DATUM', '6269')] for auth in auth_list: assert srs.GetAuthorityName(auth[0]) == 'EPSG', \ ('Got authority %s instead of EPSG for %s' % (srs.GetAuthorityName(auth[0]), auth[0])) assert str(srs.GetAuthorityCode(auth[0])) == auth[1], \ ('Got code %s instead of %s for %s' % (srs.GetAuthorityCode(auth[0]), auth[1], auth[0])) assert srs.GetAuthorityName('PROJCS') is None, \ 'Got a PROJCS Authority but we should not' assert str(srs.GetAuthorityCode('PROJCS|UNIT')) != '9001', \ 'Got METER authority code on linear units.' assert srs.GetLinearUnitsName() == 'Foot', 'Didnt get Foot linear units' assert srs.GetLinearUnits() == pytest.approx(0.3048006096012192, 1e-16) assert srs.GetTargetLinearUnits('PROJCS') == pytest.approx(0.3048006096012192, 1e-16) assert srs.GetTargetLinearUnits(None) == pytest.approx(0.3048006096012192, 1e-16) ############################################################################### # Translate a coordinate system with nad shift into to PROJ.4 and back # and verify that the TOWGS84 parameters are preserved. def test_osr_basic_4(): srs = osr.SpatialReference() srs.SetGS(cm=-117.0, fe=100000.0, fn=100000) srs.SetLinearUnits('meter', 1) srs.SetGeogCS('Test GCS', 'Test Datum', 'WGS84', osr.SRS_WGS84_SEMIMAJOR, osr.SRS_WGS84_INVFLATTENING) srs.SetTOWGS84(1, 2, 3) assert srs.GetTOWGS84() == (1, 2, 3, 0, 0, 0, 0), 'GetTOWGS84() result is wrong.' proj4 = srs.ExportToProj4() srs2 = osr.SpatialReference() srs2.ImportFromProj4(proj4) assert srs2.GetTOWGS84() == (1, 2, 3, 0, 0, 0, 0), \ 'GetTOWGS84() result is wrong after PROJ.4 conversion.' ############################################################################### # Test URN support for OGC:CRS84. def test_osr_basic_5(): wkt_1 = osr.GetUserInputAsWKT('urn:ogc:def:crs:OGC:1.3:CRS84') wkt_2 = osr.GetUserInputAsWKT('WGS84') assert wkt_1 == 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Longitude",EAST],AXIS["Latitude",NORTH]]' assert wkt_2 == 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' ############################################################################### # Test URN support for EPSG def test_osr_basic_6(): # Without version wkt_1 = osr.GetUserInputAsWKT('urn:x-ogc:def:crs:EPSG::4326') assert not (wkt_1.find('GEOGCS["WGS 84",DATUM["WGS_1984"') == -1 or wkt_1.find('AXIS["Latitude",NORTH],AXIS["Longitude",EAST]') == -1), \ 'EPSG:4326 urn lookup not as expected.' # With a version wkt_2 = osr.GetUserInputAsWKT('urn:x-ogc:def:crs:EPSG:6.6:4326') if wkt_2.find('GEOGCS["WGS 84",DATUM["WGS_1984"') == -1 or wkt_2.find('AXIS["Latitude",NORTH],AXIS["Longitude",EAST]') == -1: print(wkt_1) pytest.fail('EPSG:4326 urn lookup not as expected.') # Without version, but with no repeated :. Probably illegal from my understanding # of http://www.opengeospatial.org/ogcUrnPolicy, but found quite often in the wild # especially in content returned by GeoServer wkt_2 = osr.GetUserInputAsWKT('urn:x-ogc:def:crs:EPSG:4326') if wkt_2.find('GEOGCS["WGS 84",DATUM["WGS_1984"') == -1 or wkt_2.find('AXIS["Latitude",NORTH],AXIS["Longitude",EAST]') == -1: print(wkt_1) pytest.fail('EPSG:4326 urn lookup not as expected.') ############################################################################### # Test URN support for auto projection. def test_osr_basic_7(): wkt = osr.GetUserInputAsWKT('urn:ogc:def:crs:OGC::AUTO42001:-117:33') assert wkt.find('GEOGCS["WGS 84"') > 0 and wkt.find('PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]') > 0, 'AUTO42001 urn lookup not as expected.' ############################################################################### # Test the SetLinearUnitsAndUpdateParameters() method. def test_osr_basic_8(): srs = osr.SpatialReference() srs.SetFromUserInput('+proj=tmerc +x_0=1000 +datum=WGS84 +units=m') srs.SetLinearUnits('Foot', 0.3048) fe = srs.GetProjParm('false_easting') assert fe == 1000.0, 'false easting was unexpectedly updated.' srs.SetFromUserInput('+proj=tmerc +x_0=1000 +datum=WGS84 +units=m') srs.SetLinearUnitsAndUpdateParameters('Foot', 0.3048) fe = srs.GetProjParm('false_easting') assert fe != 1000.0, 'false easting was unexpectedly not updated.' assert fe == pytest.approx(3280.840, abs=0.01), 'wrong updated false easting value.' ############################################################################### # Test the Validate() method. def test_osr_basic_9(): srs = osr.SpatialReference() srs.SetFromUserInput("PROJCS[\"unnamed\",GEOGCS[\"unnamed ellipse\",DATUM[\"unknown\",SPHEROID[\"unnamed\",6378137,0]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]],PROJECTION[\"Mercator_2SP\"],PARAMETER[\"standard_parallel_1\",0],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",0],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1],EXTENSION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs\"]]") assert srs.Validate() == 0 ############################################################################### # Test the Validate() method on PROJCS with AXIS definition (#2739) def test_osr_basic_10(): srs = osr.SpatialReference() srs.SetFromUserInput("""PROJCS["NAD83(CSRS98) / UTM zone 20N (deprecated)", GEOGCS["NAD83(CSRS98)", DATUM["NAD83_Canadian_Spatial_Reference_System", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6140"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4140"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-63], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","2038"]]""") assert srs.Validate() == 0 ############################################################################### # Test the IsSame() method (and the IsSameGeogCS() method through that) def test_osr_basic_11(): srs1 = osr.SpatialReference() srs1.SetFromUserInput("""PROJCS["NAD83(CSRS98) / UTM zone 20N (deprecated)", GEOGCS["NAD83(CSRS98)", DATUM["NAD83_Canadian_Spatial_Reference_System", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6140"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4140"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-63], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","2038"], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") srs2 = osr.SpatialReference() srs2.SetFromUserInput("""PROJCS["NAD83(CSRS98) / UTM zone 20N (deprecated)", GEOGCS["NAD83(CSRS98)", DATUM["NAD83_Canadian_Spatial_Reference_System", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6140"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4140"]], PROJECTION["Transverse_Mercator"], PARAMETER["central_meridian",-63], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","2038"], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") assert srs1.IsSame(srs2) ############################################################################### # Test URN support for OGC:CRS84. def test_osr_basic_12(): wkt_1 = osr.GetUserInputAsWKT('CRS:84') wkt_2 = osr.GetUserInputAsWKT('WGS84') assert wkt_1 == 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Longitude",EAST],AXIS["Latitude",NORTH]]' assert wkt_2 == 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' ############################################################################### # Test GEOCCS lookup in supporting data files. def test_osr_basic_13(): srs = osr.SpatialReference() srs.ImportFromEPSG(4328) with gdaltest.config_option('OSR_USE_NON_DEPRECATED', 'NO'): srs.ImportFromEPSG(4328) expected_wkt = 'GEOCCS["WGS 84 (geocentric) (deprecated)",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Geocentric X",OTHER],AXIS["Geocentric Y",OTHER],AXIS["Geocentric Z",NORTH],AUTHORITY["EPSG","4328"]]' wkt = srs.ExportToWkt() assert wkt == expected_wkt, 'did not get expected GEOCCS WKT.' assert srs.IsGeocentric(), 'srs not recognised as geocentric.' assert srs.Validate() == 0, 'epsg geoccs import does not validate!' ############################################################################### # Manually setup a simple geocentric/wgs84 srs. def test_osr_basic_14(): srs = osr.SpatialReference() srs.SetGeocCS('My Geocentric') srs.SetWellKnownGeogCS('WGS84') srs.SetLinearUnits('meter', 1.0) expected_wkt = 'GEOCCS["My Geocentric",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["meter",1],AXIS["Geocentric X",OTHER],AXIS["Geocentric Y",OTHER],AXIS["Geocentric Z",NORTH]]' wkt = srs.ExportToWkt() assert wkt == expected_wkt, 'did not get expected GEOCCS WKT.' assert srs.IsGeocentric(), 'srs not recognised as geocentric.' assert srs.Validate() == 0, 'geocentric srs not recognised as valid.' ############################################################################### # Test validation and fixup methods. def test_osr_basic_15(): wkt = """GEOCCS["WGS 84 (geocentric)", PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], UNIT["metre",1], AXIS["Geocentric X",OTHER], AXIS["Geocentric Y",OTHER], AXIS["Geocentric Z",OTHER], AUTHORITY["EPSG","4328"]]""" srs = osr.SpatialReference() srs.SetFromUserInput(wkt) # Missing PRIMEM assert srs.Validate() != 0 ############################################################################### # Test OSRSetGeocCS() def test_osr_basic_16(): # Nominal test : change citation of a GEOCCS srs = osr.SpatialReference() srs.SetFromUserInput("""GEOCCS["WGS 84 (geocentric)", PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], UNIT["metre",1], AXIS["Geocentric X",OTHER], AXIS["Geocentric Y",OTHER], AXIS["Geocentric Z",OTHER], AUTHORITY["EPSG","4328"]]""") srs.SetGeocCS("a") expect_wkt = """GEOCCS["a", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["metre",1], AXIS["Geocentric X",OTHER], AXIS["Geocentric Y",OTHER], AXIS["Geocentric Z",NORTH], AUTHORITY["EPSG","4328"]]""" wkt = srs.ExportToPrettyWkt() if wkt != expect_wkt: print('Got:%s' % wkt) print('Expected:%s' % expect_wkt) pytest.fail('Did not get expected result.') # Build GEOCCS from a valid GEOGCS srs = osr.SpatialReference() srs.ImportFromEPSG(4326) srs.SetGeocCS("a") expect_wkt = """GEOCCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Geocentric X",OTHER], AXIS["Geocentric Y",OTHER], AXIS["Geocentric Z",NORTH]]""" wkt = srs.ExportToPrettyWkt() if wkt != expect_wkt: print('Got:%s' % wkt) print('Expected:%s' % expect_wkt) pytest.fail('Did not get expected result.') # Error expected. Cannot work on a PROJCS srs = osr.SpatialReference() srs.ImportFromEPSG(32631) ret = srs.SetGeocCS("a") if ret == 0: print(srs) pytest.fail('expected failure') # Limit test : build GEOCCS from an invalid GEOGCS srs = osr.SpatialReference() with gdaltest.error_handler(): assert srs.SetFromUserInput("""GEOGCS["foo"]""") != 0 ############################################################################### # Test OGC URL support def test_osr_basic_17(): wkt_1 = osr.GetUserInputAsWKT('urn:ogc:def:crs:EPSG::4326') wkt_2 = osr.GetUserInputAsWKT('http://www.opengis.net/def/crs/EPSG/0/4326') assert wkt_1 == wkt_2, 'CRS URL parsing not as expected.' ############################################################################### # Test OGC URL support for compound CRS def test_osr_basic_18(): wkt = osr.GetUserInputAsWKT('http://www.opengis.net/def/crs-compound?1=http://www.opengis.net/def/crs/EPSG/0/4326&2=http://www.opengis.net/def/crs/EPSG/0/3855') assert wkt.startswith('COMPD_CS'), 'CRS URL parsing not as expected.' ############################################################################### # Test well known GCS names against their corresponding EPSG definitions (#6080) def test_osr_basic_19(): sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') sr_ref = osr.SpatialReference() sr_ref.ImportFromEPSG(4326) assert sr.ExportToWkt() == sr_ref.ExportToWkt() sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS72') sr_ref = osr.SpatialReference() sr_ref.ImportFromEPSG(4322) assert sr.ExportToWkt() == sr_ref.ExportToWkt() sr = osr.SpatialReference() sr.SetWellKnownGeogCS('NAD27') sr_ref = osr.SpatialReference() sr_ref.ImportFromEPSG(4267) assert sr.ExportToWkt() == sr_ref.ExportToWkt() sr = osr.SpatialReference() sr.SetWellKnownGeogCS('NAD83') sr_ref = osr.SpatialReference() sr_ref.ImportFromEPSG(4269) assert sr.ExportToWkt() == sr_ref.ExportToWkt() ############################################################################### # Test GetAxisName() and GetAxisOrientation() and GetAngularUnitsName() def test_osr_basic_20(): sr = osr.SpatialReference() sr.ImportFromEPSGA(4326) assert sr.GetAxesCount() == 2 assert sr.GetAxisName(None, 0) == 'Geodetic latitude' assert sr.GetAxisOrientation(None, 0) == osr.OAO_North assert sr.GetAxisName('GEOGCS', 1) == 'Geodetic longitude' assert sr.GetAxisOrientation('GEOGCS', 1) == osr.OAO_East assert sr.GetAngularUnitsName() == 'degree' sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:4326+5773') assert sr.GetAxisName(None, 0) == 'Geodetic latitude' assert sr.GetAxisOrientation(None, 0) == osr.OAO_North assert sr.GetAxisName(None, 1) == 'Geodetic longitude' assert sr.GetAxisOrientation(None, 1) == osr.OAO_East assert sr.GetAxisName(None, 2) == 'Gravity-related height' assert sr.GetAxisOrientation(None, 2) == osr.OAO_Up ############################################################################### # Test IsSame() with equivalent forms of Mercator_1SP and Mercator_2SP def test_osr_basic_21(): wkt1 = """PROJCS["unnamed", GEOGCS["Segara (Jakarta)", DATUM["Gunung_Segara_Jakarta", SPHEROID["Bessel 1841",6377397.155,299.1528128]], PRIMEM["Jakarta",106.8077194444444], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_2SP"], PARAMETER["central_meridian",110], PARAMETER["false_easting",3900000], PARAMETER["false_northing",900000], PARAMETER["standard_parallel_1",4.45405154589751], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" wkt2 = """PROJCS["unnamed", GEOGCS["Segara (Jakarta)", DATUM["Gunung_Segara_Jakarta", SPHEROID["Bessel 1841",6377397.155,299.1528128]], PRIMEM["Jakarta",106.8077194444444], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",110], PARAMETER["scale_factor",0.997], PARAMETER["false_easting",3900000], PARAMETER["false_northing",900000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" wkt2_not_equivalent = """PROJCS["unnamed", GEOGCS["Segara (Jakarta)", DATUM["Gunung_Segara_Jakarta", SPHEROID["Bessel 1841",6377397.155,299.1528128]], PRIMEM["Jakarta",106.8077194444444], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",110], PARAMETER["scale_factor",0.998], PARAMETER["false_easting",3900000], PARAMETER["false_northing",900000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" sr1 = osr.SpatialReference() sr1.ImportFromWkt(wkt1) sr2 = osr.SpatialReference() sr2.ImportFromWkt(wkt2) assert sr1.IsSame(sr2) != 0 assert sr2.IsSame(sr1) != 0 sr2_not_equivalent = osr.SpatialReference() sr2_not_equivalent.ImportFromWkt(wkt2_not_equivalent) assert sr1.IsSame(sr2_not_equivalent) != 1 ############################################################################### # Test LCC_2SP -> LCC_1SP -> LCC_2SP def test_osr_basic_22(): sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",49], PARAMETER["standard_parallel_2",44], PARAMETER["latitude_of_origin",46.5], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","2154"]]""") sr2 = sr.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP) expected_sr2_wkt = """PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.5194302239868], PARAMETER["central_meridian",3], PARAMETER["scale_factor",0.9990510286374693], PARAMETER["false_easting",700000], PARAMETER["false_northing",6602157.83881033], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" expected_sr2 = osr.SpatialReference() expected_sr2.ImportFromWkt(expected_sr2_wkt) assert sr2.IsSame(expected_sr2) != 0 # Back to LCC_2SP sr3 = sr2.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP) assert sr3.IsSame(sr) != 0 # Particular case of LCC_2SP with phi0=phi1=phi2 sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",46.5], PARAMETER["standard_parallel_2",46.5], PARAMETER["latitude_of_origin",46.5], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP) expected_sr2_wkt = """PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.5], PARAMETER["central_meridian",3], PARAMETER["scale_factor",1], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" expected_sr2 = osr.SpatialReference() expected_sr2.ImportFromWkt(expected_sr2_wkt) assert sr2.IsSame(expected_sr2) != 0 sr3 = sr2.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP) assert sr3.IsSame(sr) != 0 # Particular case of LCC_2SP with phi0 != phi1 and phi1=phi2 sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",46.4567], PARAMETER["standard_parallel_2",46.4567], PARAMETER["latitude_of_origin",46.123], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP) expected_sr2_wkt = """PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.4567], PARAMETER["central_meridian",3], PARAMETER["scale_factor",1], PARAMETER["false_easting",700000], PARAMETER["false_northing",6637093.292952879], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" expected_sr2 = osr.SpatialReference() expected_sr2.ImportFromWkt(expected_sr2_wkt) assert sr2.IsSame(expected_sr2) != 0 sr3 = sr2.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP) expected_sr3_wkt = """PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6171"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4171"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",46.4567], PARAMETER["standard_parallel_2",46.4567], PARAMETER["latitude_of_origin",46.4567], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6637093.292952879], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" expected_sr3 = osr.SpatialReference() expected_sr3.ImportFromWkt(expected_sr3_wkt) assert sr3.IsSame(expected_sr3) != 0 ############################################################################### # Test LCC_1SP -> LCC_2SP -> LCC_1SP def test_osr_basic_23(): sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269, AUTHORITY["EPSG","7011"]], TOWGS84[-168,-60,320,0,0,0,0], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.33722917, AUTHORITY["EPSG","8903"]], UNIT["grad",0.01570796326794897, AUTHORITY["EPSG","9105"]], AUTHORITY["EPSG","4807"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.85], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","27584"]]""") sr2 = sr.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP) expected_sr2_wkt = """PROJCS["unnamed", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269, AUTHORITY["EPSG","7011"]], TOWGS84[-168,-60,320,0,0,0,0], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.33722917, AUTHORITY["EPSG","8903"]], UNIT["grad",0.01570796326794897, AUTHORITY["EPSG","9105"]], AUTHORITY["EPSG","4807"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",47.51962607709162], PARAMETER["standard_parallel_2",46.17820871246364], PARAMETER["latitude_of_origin",46.85], PARAMETER["central_meridian",0], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" expected_sr2 = osr.SpatialReference() expected_sr2.ImportFromWkt(expected_sr2_wkt) assert sr2.IsSame(expected_sr2) != 0 # Back to LCC_2SP sr3 = sr2.ConvertToOtherProjection(osr.SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP) assert sr3.IsSame(sr) != 0 ############################################################################### # Test Mercator_1SP -> Mercator_2SP -> Mercator_1SP def test_osr_basic_24(): sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.5], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection(osr.SRS_PT_MERCATOR_2SP) expected_sr2_wkt = """PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",60.08325228676391], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" expected_sr2 = osr.SpatialReference() expected_sr2.ImportFromWkt(expected_sr2_wkt) assert sr2.IsSame(expected_sr2) != 0 # Back to LCC_2SP sr3 = sr2.ConvertToOtherProjection(osr.SRS_PT_MERCATOR_1SP) assert sr3.IsSame(sr) != 0 ############################################################################### # Test corner cases of ConvertToOtherProjection() def test_osr_basic_25(): sr = osr.SpatialReference() sr.SetFromUserInput("""GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]]""") sr2 = sr.ConvertToOtherProjection('Mercator_1SP') assert sr2 is None sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.5], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection(None) assert sr2 is None sr2 = sr.ConvertToOtherProjection('foo') assert sr2 is None sr2 = sr.ConvertToOtherProjection('Mercator_1SP') assert sr2.IsSame(sr) != 0 # Mercator_1SP -> Mercator_2SP: Negative scale factor sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",-0.5], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Mercator_2SP') assert sr2 is None # Mercator_1SP -> Mercator_2SP: Invalid eccentricity sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,0.1]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.5], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Mercator_2SP') assert sr2 is None # Mercator_2SP -> Mercator_1SP: Invalid standard_parallel_1 sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",100], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Mercator_1SP') assert sr2 is None # Mercator_2SP -> Mercator_1SP: Invalid eccentricity sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,0.1]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",60], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Mercator_1SP') assert sr2 is None # LCC_1SP -> LCC_2SP: Negative scale factor sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269]], PRIMEM["Paris",2.33722917], UNIT["grad",0.01570796326794897]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.85], PARAMETER["central_meridian",0], PARAMETER["scale_factor",-0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_2SP') assert sr2 is None # LCC_1SP -> LCC_2SP: Invalid eccentricity sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,0.1]], PRIMEM["Paris",2.33722917], UNIT["grad",0.01570796326794897]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.85], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_2SP') assert sr2 is None # LCC_1SP -> LCC_2SP: Invalid latitude_of_origin sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269]], PRIMEM["Paris",2.33722917], UNIT["grad",0.01570796326794897]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",200], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_2SP') assert sr2 is None # LCC_1SP -> LCC_2SP: latitude_of_origin == 0 sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269]], PRIMEM["Paris",2.33722917], UNIT["grad",0.01570796326794897]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_2SP') assert sr2 is None # LCC_2SP -> LCC_1SP : Invalid standard_parallel_1 sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",246.4567], PARAMETER["standard_parallel_2",46.4567], PARAMETER["latitude_of_origin",46.123], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_1SP') assert sr2 is None # LCC_2SP -> LCC_1SP : Invalid standard_parallel_2 sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",46.4567], PARAMETER["standard_parallel_2",246.4567], PARAMETER["latitude_of_origin",46.123], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_1SP') assert sr2 is None # LCC_2SP -> LCC_1SP : Invalid latitude_of_origin sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",46.4567], PARAMETER["standard_parallel_2",46.4567], PARAMETER["latitude_of_origin",246.123], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_1SP') assert sr2 is None # LCC_2SP -> LCC_1SP : abs(stdp1) == abs(stdp2) sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",1], PARAMETER["standard_parallel_2",-1], PARAMETER["latitude_of_origin",10], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_1SP') assert sr2 is None # LCC_2SP -> LCC_1SP : stdp1 ~= stdp2 ~= 0 sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,298.257222101]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",.0000000000000001], PARAMETER["standard_parallel_2",.0000000000000002], PARAMETER["latitude_of_origin",10], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_1SP') assert sr2 is None # LCC_2SP -> LCC_1SP : Invalid eccentricity sr.SetFromUserInput("""PROJCS["unnamed", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 1980",6378137,0.1]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",46.4567], PARAMETER["standard_parallel_2",46.4567], PARAMETER["latitude_of_origin",46.123], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["metre",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""") sr2 = sr.ConvertToOtherProjection('Lambert_Conformal_Conic_1SP') assert sr2 is None ############################################################################### # Test corner cases of osr.SetGeocCS() def test_osr_basic_setgeogcs(): sr = osr.SpatialReference() sr.SetGeogCS(None, None, None, 0, 0, None, 0, None, 0) assert sr.ExportToWkt() == 'GEOGCS["unnamed",DATUM["unnamed",SPHEROID["unnamed",0,0]],PRIMEM["Reference meridian",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]' sr.SetGeogCS('a', 'b', 'c', 1, 2, 'd', 3, 'e', 4) assert sr.ExportToWkt() == 'GEOGCS["a",DATUM["b",SPHEROID["c",1,2]],PRIMEM["d",3],UNIT["e",4],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]' sr.SetUTM(31) sr.SetGeogCS(None, None, None, 0, 0, None, 0, None, 0) assert sr.ExportToWkt() == 'PROJCS["unnamed",GEOGCS["unnamed",DATUM["unnamed",SPHEROID["unnamed",0,0]],PRIMEM["Reference meridian",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' ############################################################################### # Test other authorities than EPSG, e.g. IGNF:XXXX # def test_osr_basic_set_from_user_input_IGNF(): srs = osr.SpatialReference() assert srs.SetFromUserInput("IGNF:LAMB93") == 0 assert srs.GetAuthorityName(None) == 'IGNF' and srs.GetAuthorityCode(None) == 'LAMB93' def test_osr_basic_set_from_user_input_IGNF_non_existing_code(): srs = osr.SpatialReference() assert srs.SetFromUserInput("IGNF:non_existing_code") != 0 def test_osr_basic_set_from_user_input_non_existing_authority(): srs = osr.SpatialReference() assert srs.SetFromUserInput("non_existing_auth:1234") != 0 def test_osr_basic_set_from_user_input_GEODCRS(): srs = osr.SpatialReference() assert srs.SetFromUserInput("""GEODCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], AREA["World"], BBOX[-90,-180,90,180], ID["EPSG",4326]]""") == 0 assert srs.Validate() == 0 def test_osr_basic_set_from_user_input_GEOGCRS(): srs = osr.SpatialReference() assert srs.SetFromUserInput("""GEOGCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], USAGE[ SCOPE["unknown"], AREA["World"], BBOX[-90,-180,90,180]], ID["EPSG",4326]]""") == 0 assert srs.Validate() == 0 def test_osr_basic_set_from_user_input_PROJCRS(): srs = osr.SpatialReference() assert srs.SetFromUserInput("""PROJCRS["WGS 84 / UTM zone 31N", BASEGEODCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]]], CONVERSION["UTM zone 31N", METHOD["Transverse Mercator", ID["EPSG",9807]], PARAMETER["Latitude of natural origin",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8801]], PARAMETER["Longitude of natural origin",3, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8802]], PARAMETER["Scale factor at natural origin",0.9996, SCALEUNIT["unity",1], ID["EPSG",8805]], PARAMETER["False easting",500000, LENGTHUNIT["metre",1], ID["EPSG",8806]], PARAMETER["False northing",0, LENGTHUNIT["metre",1], ID["EPSG",8807]]], CS[Cartesian,2], AXIS["(E)",east, ORDER[1], LENGTHUNIT["metre",1]], AXIS["(N)",north, ORDER[2], LENGTHUNIT["metre",1]], AREA["World - N hemisphere - 0°E to 6°E - by country"], BBOX[0,0,84,6], ID["EPSG",32631]]""") == 0 assert srs.Validate() == 0 def test_osr_basic_set_from_user_input_COMPOUNDCRS(): srs = osr.SpatialReference() assert srs.SetFromUserInput("""COMPOUNDCRS["KKJ / Finland Uniform Coordinate System + N60 height", PROJCRS["KKJ / Finland Uniform Coordinate System", BASEGEODCRS["KKJ", DATUM["Kartastokoordinaattijarjestelma (1966)", ELLIPSOID["International 1924",6378388,297, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]]], CONVERSION["Finland Uniform Coordinate System", METHOD["Transverse Mercator", ID["EPSG",9807]], PARAMETER["Latitude of natural origin",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8801]], PARAMETER["Longitude of natural origin",27, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8802]], PARAMETER["Scale factor at natural origin",1, SCALEUNIT["unity",1], ID["EPSG",8805]], PARAMETER["False easting",3500000, LENGTHUNIT["metre",1], ID["EPSG",8806]], PARAMETER["False northing",0, LENGTHUNIT["metre",1], ID["EPSG",8807]]], CS[Cartesian,2], AXIS["northing (X)",north, ORDER[1], LENGTHUNIT["metre",1]], AXIS["easting (Y)",east, ORDER[2], LENGTHUNIT["metre",1]]], VERTCRS["N60 height", VDATUM["Helsinki 1960"], CS[vertical,1], AXIS["gravity-related height (H)",up, LENGTHUNIT["metre",1]]], AREA["Finland - onshore"], BBOX[59.75,19.24,70.09,31.59], ID["EPSG",3901]]""") == 0 assert srs.Validate() == 0 def test_osr_basic_export_to_sfsql(): sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') assert sr.ExportToWkt(['FORMAT=SFSQL']) == 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]' def test_osr_basic_export_to_wkt1_esri(): sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') assert sr.ExportToWkt(['FORMAT=WKT1_ESRI']) == 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]' def test_osr_basic_export_to_wkt1_gdal(): sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') assert sr.ExportToWkt(['FORMAT=WKT1_GDAL']) == 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' def test_osr_basic_export_to_wkt2_2015(): sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') assert sr.ExportToWkt(['FORMAT=WKT2_2015']) == 'GEODCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]]' def test_osr_basic_export_to_wkt2_2018(): sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') assert sr.ExportToWkt(['FORMAT=WKT2_2018']) == 'GEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4326]]' def test_osr_get_name(): sr = osr.SpatialReference() assert sr.GetName() is None sr.SetWellKnownGeogCS('WGS84') assert sr.GetName() == 'WGS 84' def test_SetPROJSearchPath(): # OSRSetPROJSearchPaths() is only taken into priority over other methods # starting with PROJ >= 6.1 if not(osr.GetPROJVersionMajor() > 6 or osr.GetPROJVersionMinor() >= 1): pytest.skip() # Do the test in a new thread, so that SetPROJSearchPath() is taken # into account def threaded_function(arg): sr = osr.SpatialReference() with gdaltest.error_handler(): arg[0] = sr.ImportFromEPSG(32631) try: arg = [ -1 ] thread = Thread(target = threaded_function, args = (arg, )) thread.start() thread.join() assert arg[0] == 0 osr.SetPROJSearchPath('/i_do/not/exist') thread = Thread(target = threaded_function, args = (arg, )) thread.start() thread.join() assert arg[0] > 0 finally: # Cancel search path (we can't call SetPROJSearchPath(None)) osr.SetPROJSearchPaths([]) sr = osr.SpatialReference() assert sr.ImportFromEPSG(32631) == 0 def test_osr_import_projjson(): sr = osr.SpatialReference() projjson = '{"$schema":"https://proj.org/schemas/v0.1/projjson.schema.json","type":"GeographicCRS","name":"WGS 84","datum":{"type":"GeodeticReferenceFrame","name":"World Geodetic System 1984","ellipsoid":{"name":"WGS 84","semi_major_axis":6378137,"inverse_flattening":298.257223563}},"coordinate_system":{"subtype":"ellipsoidal","axis":[{"name":"Geodetic latitude","abbreviation":"Lat","direction":"north","unit":"degree"},{"name":"Geodetic longitude","abbreviation":"Lon","direction":"east","unit":"degree"}]},"area":"World","bbox":{"south_latitude":-90,"west_longitude":-180,"north_latitude":90,"east_longitude":180},"id":{"authority":"EPSG","code":4326}}' with gdaltest.error_handler(): ret = sr.SetFromUserInput(projjson) if osr.GetPROJVersionMajor() > 6 or osr.GetPROJVersionMinor() >= 2: assert ret == 0 broken_projjson = projjson[0:-10] with gdaltest.error_handler(): assert sr.SetFromUserInput(broken_projjson) != 0 def test_osr_export_projjson(): sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') if not(osr.GetPROJVersionMajor() > 6 or osr.GetPROJVersionMinor() >= 2): with gdaltest.error_handler(): sr.ExportToPROJJSON() pytest.skip() assert sr.ExportToPROJJSON() != '' def test_osr_promote_to_3D(): sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') if not(osr.GetPROJVersionMajor() > 6 or osr.GetPROJVersionMinor() >= 3): with gdaltest.error_handler(): sr.PromoteTo3D() pytest.skip() assert sr.PromoteTo3D() == 0 assert sr.GetAuthorityCode(None) == '4979' def test_osr_SetVerticalPerspective(): sr = osr.SpatialReference() sr.SetVerticalPerspective(1, 2, 0, 3, 4, 5) assert sr.ExportToProj4() == '+proj=nsper +lat_0=1 +lon_0=2 +h=3 +x_0=4 +y_0=5 +datum=WGS84 +units=m +no_defs' if osr.GetPROJVersionMajor() > 6 or osr.GetPROJVersionMinor() >= 3: assert sr.GetAttrValue('PROJECTION') in 'Vertical Perspective' assert sr.GetNormProjParm('Longitude of topocentric origin') == 2 def test_osr_create_in_one_thread_destroy_in_other(): def threaded_function(arg): sr = osr.SpatialReference() sr.ImportFromEPSG(32631) arg[0] = sr arg = [ None ] thread = Thread(target = threaded_function, args = (arg, )) thread.start() thread.join() assert arg[0] del arg[0] def test_osr_SpatialReference_invalid_wkt_in_constructor(): with pytest.raises(RuntimeError): osr.SpatialReference('invalid') gdalautotest-3.1.2/osr/osr_pci.py0000775000175000017500000002126613701057754015531 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_pci.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test some PCI specific translation issues. # Author: Andrey Kiselev, dron@ak4719.spb.edu # ############################################################################### # Copyright (c) 2004, Andrey Kiselev # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest from osgeo import osr import pytest ############################################################################### # Test the osr.SpatialReference.ImportFromPCI() function. # def test_osr_pci_1(): prj_parms = (0.0, 0.0, 45.0, 54.5, 47.0, 62.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) srs = osr.SpatialReference() srs.ImportFromPCI('EC E015', 'METRE', prj_parms) assert srs.GetProjParm(osr.SRS_PP_STANDARD_PARALLEL_1) == pytest.approx(47.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_STANDARD_PARALLEL_2) == pytest.approx(62.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_LATITUDE_OF_CENTER) == pytest.approx(54.5, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_LONGITUDE_OF_CENTER) == pytest.approx(45.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) == pytest.approx(0.0, abs=0.0000005) and srs.GetProjParm(osr.SRS_PP_FALSE_NORTHING) == pytest.approx(0.0, abs=0.0000005), \ 'Can not import Equidistant Conic projection.' expected = 'PROJCS["unnamed",GEOGCS["Unknown - PCI E015",DATUM["Unknown - PCI E015",SPHEROID["Krassowsky 1940",6378245,298.3,AUTHORITY["EPSG","7024"]]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Equidistant_Conic"],PARAMETER["standard_parallel_1",47],PARAMETER["standard_parallel_2",62],PARAMETER["latitude_of_center",54.5],PARAMETER["longitude_of_center",45],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]' assert gdaltest.equal_srs_from_wkt(expected, srs.ExportToWkt()) pci_parms = srs.ExportToPCI() assert pci_parms[0] == 'EC E015' and pci_parms[1] == 'METRE' and pci_parms[2] == prj_parms, \ 'ExportToPCI result wrong.' ############################################################################### # Test the osr.SpatialReference.ExportToPCI() function. # def test_osr_pci_2(): srs = osr.SpatialReference() srs.ImportFromWkt("""PROJCS["unnamed",GEOGCS["NAD27",\ DATUM["North_American_Datum_1927",\ SPHEROID["Clarke 1866",6378206.4,294.9786982139006,\ AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],\ PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],\ AUTHORITY["EPSG","4267"]],PROJECTION["Lambert_Conformal_Conic_2SP"],\ PARAMETER["standard_parallel_1",33.90363402777778],\ PARAMETER["standard_parallel_2",33.62529002777778],\ PARAMETER["latitude_of_origin",33.76446202777777],\ PARAMETER["central_meridian",-117.4745428888889],\ PARAMETER["false_easting",0],PARAMETER["false_northing",0],\ UNIT["metre",1,AUTHORITY["EPSG","9001"]]]""") (proj, units, parms) = srs.ExportToPCI() assert proj == 'LCC D-01' and units == 'METRE' and parms[2] == pytest.approx(-117.4745429, abs=0.0000005) and parms[3] == pytest.approx(33.76446203, abs=0.0000005) and parms[4] == pytest.approx(33.90363403, abs=0.0000005) and parms[5] == pytest.approx(33.62529003, abs=0.0000005), \ 'Can not import Lambert Conformal Conic projection.' ############################################################################### # Test MGRS interpretation. (#3379) # def test_osr_pci_3(): srs = osr.SpatialReference() srs.ImportFromPCI( 'UTM 13 D000', 'METRE', (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)) wkt = srs.ExportToWkt() if wkt.find('PARAMETER["false_northing",0]') == -1: gdaltest.post_reason('did not default to northern hemisphere!') print(wkt) return 'fail' srs = osr.SpatialReference() srs.ImportFromPCI( 'UTM 13 G D000', 'METRE', (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)) wkt = srs.ExportToWkt() if wkt.find('PARAMETER["false_northing",10000000]') == -1: gdaltest.post_reason('did get northern hemisphere!') print(wkt) return 'fail' srs = osr.SpatialReference() srs.ImportFromPCI( 'UTM 13 X D000', 'METRE', (0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)) wkt = srs.ExportToWkt() if wkt.find('PARAMETER["false_northing",0]') == -1: gdaltest.post_reason('did get southern hemisphere!') print(wkt) return 'fail' ############################################################################### # Test Datum lookup in pci_datum.txt # def test_osr_pci_4(): prj_parms = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) srs = osr.SpatialReference() srs.ImportFromPCI('LONG/LAT D506', 'DEGREE', prj_parms) expected = 'GEOGCS["Rijksdriehoeks Datum",DATUM["Rijksdriehoeks Datum",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.04,49.91,465.84,0.4094,-0.3597,1.8685,4.077200000063286]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]' assert gdaltest.equal_srs_from_wkt(expected, srs.ExportToWkt()) pci_parms = srs.ExportToPCI() assert pci_parms[0] == 'LONG/LAT D506' and pci_parms[1] == 'DEGREE' and pci_parms[2] == prj_parms, \ 'ExportToPCI result wrong.' ############################################################################### # Test Datum ellisoid lookup in pci_ellpis.txt # def test_osr_pci_5(): prj_parms = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) srs = osr.SpatialReference() srs.ImportFromPCI('LONG/LAT E224', 'DEGREE', prj_parms) expected = 'GEOGCS["Unknown - PCI E224",DATUM["Unknown - PCI E224",SPHEROID["Xian 1980",6378140,298.2569978029123]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]' assert gdaltest.equal_srs_from_wkt(expected, srs.ExportToWkt()) pci_parms = srs.ExportToPCI() assert pci_parms[0] == 'LONG/LAT E224' and pci_parms[1] == 'DEGREE' and pci_parms[2] == prj_parms, \ 'ExportToPCI result wrong.' ############################################################################### # Test Datum lookup in pci_datum.txt # def test_osr_pci_6(): prj_parms = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) srs = osr.SpatialReference() srs.ImportFromPCI('LONG/LAT D030', 'DEGREE', prj_parms) expected = 'GEOGCS["AGD84",DATUM["Australian_Geodetic_Datum_1984",SPHEROID["Australian National Spheroid",6378160,298.25,AUTHORITY["EPSG","7003"]],TOWGS84[-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191],AUTHORITY["EPSG","6203"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4203"]]' assert gdaltest.equal_srs_from_wkt(expected, srs.ExportToWkt()) pci_parms = srs.ExportToPCI() assert pci_parms[0] == 'LONG/LAT D030' and pci_parms[1] == 'DEGREE' and pci_parms[2] == prj_parms, \ 'ExportToPCI result wrong.' ############################################################################### # Make sure we can translate a datum with only the TOWGS84 parameters to # to identify it. # def test_osr_pci_7(): srs = osr.SpatialReference() srs.SetFromUserInput('GEOGCS["My GCS",DATUM["My Datum",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[565.04,49.91,465.84,0.4094,-0.3597,1.8685,4.077200000063286]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]') prj_parms = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) pci_parms = srs.ExportToPCI() assert pci_parms[0] == 'LONG/LAT D506' and pci_parms[1] == 'DEGREE' and pci_parms[2] == prj_parms, \ 'ExportToPCI result wrong.' gdalautotest-3.1.2/osr/osr_url.py0000775000175000017500000000651213701057754015555 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: osr_url.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test some URL specific translation issues. # Author: Howard Butler # ############################################################################### # Copyright (c) 2007, Howard Butler # Copyright (c) 2008-2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import socket import gdaltest from osgeo import osr import pytest expected_wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]' def osr_url_test(url, expected_wkt): timeout = 10 socket.setdefaulttimeout(timeout) if gdaltest.gdalurlopen(url) is None: pytest.skip() # Depend on the Accepts headers that ImportFromUrl sets to request SRS from sr.org srs = osr.SpatialReference() from osgeo import gdal gdal.PushErrorHandler('CPLQuietErrorHandler') try: srs.ImportFromUrl(url) except AttributeError: # old-gen bindings don't have this method yet pytest.skip() except Exception: gdal.PopErrorHandler() if gdal.GetLastErrorMsg() == "GDAL/OGR not compiled with libcurl support, remote requests not supported." or \ gdal.GetLastErrorMsg().find("timed out") != -1: pytest.skip() pytest.fail('exception: ' + gdal.GetLastErrorMsg()) gdal.PopErrorHandler() if gdal.GetLastErrorMsg() == "GDAL/OGR not compiled with libcurl support, remote requests not supported." or \ gdal.GetLastErrorMsg().find("timed out") != -1: pytest.skip() assert gdaltest.equal_srs_from_wkt(expected_wkt, srs.ExportToWkt()) def test_osr_url_1(): return osr_url_test('http://spatialreference.org/ref/epsg/4326/', expected_wkt) def test_osr_url_2(): return osr_url_test('http://spatialreference.org/ref/epsg/4326/ogcwkt/', expected_wkt) gdalautotest-3.1.2/osr/osr_epsg.py0000775000175000017500000003665113701057754015720 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: osr_epsg.py 17e26a662b3b1e7858f83078f9f302b47715c90a 2020-05-04 01:50:25 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test aspects of EPSG code lookup. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # Copyright (c) 2010-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import osr import gdaltest import pytest ############################################################################### # Verify that deprecated EPSG:26591 ends up picking non-deprecated EPSG:3003 def test_osr_epsg_1(): srs = osr.SpatialReference() srs.ImportFromEPSG(26591) assert srs.GetAuthorityCode(None) == '3003' ############################################################################### # Check that EPSG:4312 w.r.t towgs84 values def test_osr_epsg_2(): srs = osr.SpatialReference() with gdaltest.config_option('OSR_ADD_TOWGS84_ON_IMPORT_FROM_EPSG', 'YES'): srs.ImportFromEPSG(4312) if float(srs.GetAttrValue('TOWGS84', 6)) != pytest.approx(2.4232, abs=0.0005): print(srs.ExportToPrettyWkt()) pytest.fail('Wrong TOWGS84, override missed?') ############################################################################### # Check that various EPSG lookups based on Pulvoko 1942 have the # towgs84 values set properly (#3579) def test_osr_epsg_3(): for epsg in [3120, 2172, 2173, 2174, 2175, 3328]: srs = osr.SpatialReference() srs.ImportFromEPSG(epsg) srs.AddGuessedTOWGS84() expected_towgs84 = [33.4, -146.6, -76.3, -0.359, -0.053, 0.844, -0.84] for i in range(6): if float(srs.GetAttrValue('TOWGS84', i)) != pytest.approx(expected_towgs84[i], abs=0.0005): print(srs.ExportToPrettyWkt()) pytest.fail('For EPSG:%d. Wrong TOWGS84, override missed?' % epsg) ############################################################################### # Check that EPSG:4326 is considered as lat/long def test_osr_epsg_4(): srs = osr.SpatialReference() srs.ImportFromEPSG(4326) assert srs.EPSGTreatsAsLatLong(), 'supposed to be treated as lat/long' assert srs.ExportToWkt().find('AXIS') != -1, 'should have AXIS node' ############################################################################### # Check that EPSGA:4326 is considered as lat/long def test_osr_epsg_5(): srs = osr.SpatialReference() srs.ImportFromEPSGA(4326) assert srs.EPSGTreatsAsLatLong(), 'supposed to be treated as lat/long' assert srs.ExportToWkt().find('AXIS') != -1, 'should have AXIS node' ############################################################################### # Test datum shift for OSGB 36 def test_osr_epsg_6(): srs = osr.SpatialReference() srs.ImportFromEPSG(4277) assert srs.ExportToWkt().find('TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489]') == -1, \ '# We do not expect a datum shift' ############################################################################### # Check working of EPSGTreatsAsNorthingEasting @pytest.mark.parametrize('epsg_code,is_northing_easting', [(2193, True), # NZGD2000 / New Zealand Transverse Mercator 2000 (32631, False), # WGS 84 / UTM zone 31N (32661, True), # WGS 84 / UPS North (N,E) (5041, False), # WGS 84 / UPS North (E,N) (32761, True), # WGS 84 / UPS South (N,E) (5042, False), # WGS 84 / UPS South (E,N) (3031, False), # WGS 84 / Antarctic Polar Stereographic (5482, True), # RSRGD2000 / RSPS2000 ] ) def test_osr_epsg_treats_as_northing_easting(epsg_code, is_northing_easting): srs = osr.SpatialReference() srs.ImportFromEPSG(epsg_code) assert srs.EPSGTreatsAsNorthingEasting() == is_northing_easting ############################################################################### # Check EPSG:3857 def test_osr_epsg_9(): srs = osr.SpatialReference() srs.ImportFromEPSG(3857) assert srs.ExportToWkt() == 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]' assert srs.Validate() == 0, 'Does not validate' ############################################################################### # Test AutoIdentifyEPSG() on Polar Stereographic def test_osr_epsg_10(): srs = osr.SpatialReference() srs.SetFromUserInput("""PROJCS["PS WGS84", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",-71], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""") assert srs.AutoIdentifyEPSG() == 0 assert srs.GetAuthorityCode(None) == '3031', srs.ExportToWkt() srs_ref = osr.SpatialReference() srs_ref.ImportFromEPSG(3031) assert srs.IsSame(srs_ref) != 0, "%s vs %s" % (srs.ExportToPrettyWkt(), srs_ref.ExportToPrettyWkt()) srs = osr.SpatialReference() srs.SetFromUserInput("""PROJCS["PS WGS84", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",71], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""") assert srs.AutoIdentifyEPSG() == 0 assert srs.GetAuthorityCode(None) == '3995', srs.ExportToWkt() srs_ref = osr.SpatialReference() srs_ref.ImportFromEPSG(3995) assert srs.IsSame(srs_ref) != 0 ############################################################################### # Test datum shift for EPSG:2065 (PCS based override) def test_osr_epsg_11(): srs = osr.SpatialReference() srs.ImportFromEPSG(2065) # The override is no longer in proj.db #assert srs.ExportToWkt().find('TOWGS84[570.8,85.7,462.8,4.998,1.587,5.261,3.56]') != -1, \ # 'did not get expected TOWGS84' ############################################################################### # Test IsSame() on SRS that differs only by their PROJ4 EXTENSION (besides # different EPSG codes) def test_osr_epsg_12(): sr1 = osr.SpatialReference() sr1.ImportFromEPSG(3857) sr2 = osr.SpatialReference() sr2.ImportFromEPSG(3395) assert not sr1.IsSame(sr2) ############################################################################### # Test FindMatches() def test_osr_epsg_13(): # One exact match sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["ETRS89 / UTM zone 32N (N-E)", GEOGCS["ETRS89", DATUM["European_Terrestrial_Reference_System_1989", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4258"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Northing",NORTH], AXIS["Easting",EAST]]""") matches = sr.FindMatches() assert len(matches) == 1 and matches[0][1] == 100 assert matches[0][0].IsSame(sr) # Another one sr = osr.SpatialReference() sr.ImportFromEPSG(3044) sr.MorphToESRI() sr.SetFromUserInput(sr.ExportToWkt()) matches = sr.FindMatches() assert len(matches) == 1 and matches[0][1] == 100 assert not matches[0][0].IsSame(sr) # Two matches (and test GEOGCS) # This will now match with 4126 (which is deprecated), since the datum # is identified to 6126 and GetEPSGGeogCS has logic to subtract 2000 to it. #sr.SetFromUserInput("""GEOGCS["myLKS94", #DATUM["Lithuania_1994_ETRS89", # SPHEROID["GRS 1980",6378137,298.257222101], # TOWGS84[0,0,0,0,0,0,0]], #PRIMEM["Greenwich",0], #UNIT["degree",0.0174532925199433]]""") #matches = sr.FindMatches() #if len(matches) != 2: # gdaltest.post_reason('fail') # print(matches) # return 'fail' #if matches[0][0].GetAuthorityCode(None) != '4126' or matches[0][1] != 90: # gdaltest.post_reason('fail') # print(matches) # return 'fail' #if matches[1][0].GetAuthorityCode(None) != '4669' or matches[1][1] != 90: # gdaltest.post_reason('fail') # print(matches) # return 'fail' # Very approximate matches sr.SetFromUserInput("""GEOGCS["myGEOGCS", DATUM["my_datum", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]] """) matches = sr.FindMatches() assert matches # One single match, but not similar according to IsSame() sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["WGS 84 / UTM zone 32N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",999999999], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]] """) matches = sr.FindMatches() assert len(matches) == 1 and matches[0][1] == 25 assert matches[0][0].IsSame(sr) != 1 # WKT has EPSG code but the definition doesn't match with the official # one (namely linear units are different) # https://github.com/OSGeo/gdal/issues/990 sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["NAD83 / Ohio North", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",41.7], PARAMETER["standard_parallel_2",40.43333333333333], PARAMETER["latitude_of_origin",39.66666666666666], PARAMETER["central_meridian",-82.5], PARAMETER["false_easting",1968503.937007874], PARAMETER["false_northing",0], UNIT["International Foot",0.3048, AUTHORITY["EPSG","9002"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","32122"]] """) matches = sr.FindMatches() assert len(matches) == 1 and matches[0][1] == 25 assert matches[0][0].IsSame(sr) != 1 ############################################################################### def test_osr_epsg_gcs_deprecated(): sr = osr.SpatialReference() with gdaltest.config_option('OSR_USE_NON_DEPRECATED', 'NO'): sr.ImportFromEPSG(4268) assert sr.ExportToWkt().find('NAD27 Michigan (deprecated)') >= 0 ############################################################################### def test_osr_epsg_geoccs_deprecated(): sr = osr.SpatialReference() with gdaltest.config_option('OSR_USE_NON_DEPRECATED', 'NO'): sr.ImportFromEPSG(4346) assert sr.ExportToWkt().find('ETRS89 (geocentric) (deprecated)') >= 0 ############################################################################### def test_osr_epsg_area_of_use(): srs = osr.SpatialReference() srs.ImportFromEPSG(2154) area = srs.GetAreaOfUse() assert area.west_lon_degree == -9.86 assert area.south_lat_degree == 41.15 assert area.east_lon_degree == 10.38 assert area.north_lat_degree == 51.56 assert area.name == 'France' ############################################################################### def test_osr_GetCRSInfoListFromDatabase(): l = osr.GetCRSInfoListFromDatabase('EPSG') found = False for record in l: if record.auth_name == 'EPSG' and record.code == '2154': assert record.name == 'RGF93 / Lambert-93' assert record.type == osr.OSR_CRS_TYPE_PROJECTED assert not record.deprecated assert record.bbox_valid assert record.west_lon_degree == -9.86 assert record.south_lat_degree == 41.15 assert record.east_lon_degree == 10.38 assert record.north_lat_degree == 51.56 assert record.area_name == 'France' assert record.projection_method == 'Lambert Conic Conformal (2SP)' found = True assert found gdalautotest-3.1.2/gnm/0000775000175000017500000000000013701057754013465 5ustar evenevengdalautotest-3.1.2/gnm/data/0000775000175000017500000000000013701057752014374 5ustar evenevengdalautotest-3.1.2/gnm/data/pipes.shp0000664000175000017500000000567413701057752016244 0ustar eveneven' ݝTB@+qK@7(B@1K@(r~B@L5.K@BlfB@Ř1K@BlfB@Ř1K@r~B@L5.K@(qfB@!.K@rTB@1K@rTB@!.K@qfB@1K@(IB@*K@IB@3.K@IB@*K@IB@3.K@(B@[W!K@bIB@ԁ*K@B@[W!K@bIB@ԁ*K@(ͥB@\AK@NڥB@Me,K@ͥB@\AK@NڥB@Me,K@(jKB@쟀K@ B@/K@jKB@쟀K@ B@/K@(< B@X%K@7B@j .K@7B@X%K@< B@j .K@(27B@OK@(B@߱%K@(B@OK@27B@߱%K@ (0R B@z|Lv K@7(B@sOK@0R B@z|Lv K@7(B@sOK@ (@{)B@fOK@rʥB@M>K@@{)B@M>K@rʥB@fOK@ (ZgB@FK@@{)B@$K@ZgB@$K@@{)B@FK@ (B6}\xB@VgK@ fB@K@B6}\xB@VgK@ fB@K@ (3@StۥB@K@lHޥB@:hK@3@StۥB@K@lHޥB@:hK@(9ۥB@1.K@2@StۥB@6K@9ۥB@1.K@2@StۥB@6K@(9ۥB@K@?B@1.K@?B@K@9ۥB@1.K@(aQB@K@sB@AW!K@sB@AW!K@aQB@K@("B@nIK@ExͥB@W!K@ExͥB@nIK@"B@W!K@(8ͥB@KhK@AޥB@_K@AޥB@KhK@8ͥB@_K@(ԽޥB@*~K@9$B@@hK@9$B@*~K@ԽޥB@@hK@(X$B@W`8K@P+B@.h~K@P+B@W`8K@X$B@.h~K@(+B@⥀K@Q)B@a6K@Q)B@⥀K@+B@a6K@(1B@/!Hv K@/R B@K@/R B@/!Hv K@1B@K@(x&B@PDK@?Q B@/!Hv K@x&B@PDK@?Q B@/!Hv K@(WM>B@=YK@A B@sK@WM>B@=YK@A B@sK@(JʥB@wOK@DB@I>K@JʥB@wOK@DB@I>K@(s$B@ 7+K@:ʥB@goOK@s$B@ 7+K@:ʥB@goOK@(ѢB@+qK@q$B@,K@ѢB@+qK@q$B@,K@(UB@+qK@ѢB@;K@UB@;K@ѢB@+qK@(w[xB@ ?K@B@W)PdK@w[xB@W)PdK@B@ ?K@(tiB@QdK@[xB@$t|K@tiB@$t|K@[xB@QdK@(!"a\B@RK@y4iB@4 K@!"a\B@4 K@y4iB@RK@ (ݝTB@AK@va\B@1K@ݝTB@1K@va\B@AK@!( B@5K@pQ B@T/G.K@ B@5K@pQ B@T/G.K@gdalautotest-3.1.2/gnm/data/wells.dbf0000664000175000017500000000112113701057752016172 0ustar eveneven_aidN depthN 31 15 30 15 29 15 28 15 27 15 26 15 25 15 24 15 23 15 22 16 21 15 20 15 19 15 18 15 17 15 16 15 15 15 14 15 13 15 12 15 11 16 10 15 9 15 8 12 7 10 6 10 5 16 4 15 3 16 2 15 1 15gdalautotest-3.1.2/gnm/data/pipes.shx0000664000175000017500000000055413701057752016244 0ustar eveneven' ݝTB@+qK@7(B@1K@2(^(((((:(f(((((B(n(((((J(v((((&(R(~((((.(Z(((gdalautotest-3.1.2/gnm/data/pipes.qpj0000664000175000017500000000040113701057752016223 0ustar evenevenGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] gdalautotest-3.1.2/gnm/data/pipes.prj0000664000175000017500000000021713701057752016231 0ustar evenevenGEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]gdalautotest-3.1.2/gnm/data/wells.shx0000664000175000017500000000053413701057752016250 0ustar eveneven' O TB@LSjlK@(B@nk1K@2 @ N \ j x    . < J X f t        gdalautotest-3.1.2/gnm/data/wells.prj0000664000175000017500000000021713701057752016237 0ustar evenevenGEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]gdalautotest-3.1.2/gnm/data/pipes.dbf0000664000175000017500000000116113701057752016170 0ustar eveneven_!aidN widthN 32 1 31 5 30 3 29 3 28 5 27 3 26 4 25 4 24 10 23 8 22 7 21 7 20 3 19 3 18 3 17 2 16 5 15 4 14 4 13 3 12 2 11 3 10 4 9 6 8 7 7 4 6 6 5 5 4 6 3 4 2 4 1 3 0 6gdalautotest-3.1.2/gnm/data/wells.qpj0000664000175000017500000000040113701057752016231 0ustar evenevenGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] gdalautotest-3.1.2/gnm/data/wells.shp0000664000175000017500000000171013701057752016235 0ustar eveneven' O TB@LSjlK@(B@nk1K@ z)B@SK@ ּB@ MK@ BtۥB@-:K@ 99ۥB@&MK@ d B@_^.K@ g/8B@Tlʲ%K@ E2B@y?K@ (B@OK@ ~B@1.K@ SڦfB@nk1K@ {B@'.K@ IB@,#*K@ ڥB@Q=,K@ QB@DK@ fcB@/W!K@ ͥB@Cv9K@ PޥB@*QhK@ {#B@‘~K@ 8+B@]K@ PċB@>K@ Q B@Vv K@ A~B@K@ ZήB@K@ V~ʥB@i}OK@ c$B@+K@ 砂ѢB@dqK@ B@w3K@ ]][xB@ߠeK@ DniB@UK@ #"a\B@3 K@ İTB@8aK@gdalautotest-3.1.2/gnm/tmp/0000775000175000017500000000000013701057752014263 5ustar evenevengdalautotest-3.1.2/gnm/tmp/do-not-remove0000664000175000017500000000000013701057752016667 0ustar evenevengdalautotest-3.1.2/gnm/__init__.py0000775000175000017500000000000013701057754015567 0ustar evenevengdalautotest-3.1.2/gnm/gnm_test.py0000775000175000017500000001471613701057754015673 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: gnm_test.py 010860a7429f4a21ba9ccb8034afbc3a2b61575a 2019-06-29 23:31:46 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic GNMGdalNetwork class functionality. # Authors: Mikhail Gusev (gusevmihs at gmail dot com) # Dmitry Baryshnikov, polimax@mail.ru # ############################################################################### # Copyright (c) 2014, Mikhail Gusev # Copyright (c) 2014-2015, NextGIS # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal from osgeo import gnm import pytest ############################################################################### # Create file base network def test_gnm_filenetwork_create(): try: shutil.rmtree('tmp/test_gnm') except OSError: pass ogrtest.drv = None ogrtest.have_gnm = 0 ogrtest.drv = gdal.GetDriverByName('GNMFile') if ogrtest.drv is None: pytest.skip() ds = ogrtest.drv.Create('tmp/', 0, 0, 0, gdal.GDT_Unknown, options=['net_name=test_gnm', 'net_description=Test file based GNM', 'net_srs=EPSG:4326']) # cast to GNM dn = gnm.CastToNetwork(ds) assert dn is not None assert dn.GetVersion() == 100, 'GNM: Check GNM version failed' assert dn.GetName() == 'test_gnm', 'GNM: Check GNM name failed' assert dn.GetDescription() == 'Test file based GNM', \ 'GNM: Check GNM description failed' dn = None ogrtest.have_gnm = 1 ############################################################################### # Open file base network def test_gnm_filenetwork_open(): if not ogrtest.have_gnm: pytest.skip() ds = gdal.OpenEx('tmp/test_gnm') # cast to GNM dn = gnm.CastToNetwork(ds) assert dn is not None assert dn.GetVersion() == 100, 'GNM: Check GNM version failed' assert dn.GetName() == 'test_gnm', 'GNM: Check GNM name failed' assert dn.GetDescription() == 'Test file based GNM', \ 'GNM: Check GNM description failed' dn = None ############################################################################### # Import layers into file base network def test_gnm_import(): if not ogrtest.have_gnm: pytest.skip() ds = gdal.OpenEx('tmp/test_gnm') # pipes dspipes = gdal.OpenEx('data/pipes.shp', gdal.OF_VECTOR) lyrpipes = dspipes.GetLayerByIndex(0) new_lyr = ds.CopyLayer(lyrpipes, 'pipes') assert new_lyr is not None, 'failed to import pipes' dspipes = None new_lyr = None # wells dswells = gdal.OpenEx('data/wells.shp', gdal.OF_VECTOR) lyrwells = dswells.GetLayerByIndex(0) new_lyr = ds.CopyLayer(lyrwells, 'wells') assert new_lyr is not None, 'failed to import wells' dswells = None new_lyr = None assert ds.GetLayerCount() == 2, 'expected 2 layers' ds = None ############################################################################### # autoconnect def test_gnm_autoconnect(): if not ogrtest.have_gnm: pytest.skip() ds = gdal.OpenEx('tmp/test_gnm') dgn = gnm.CastToGenericNetwork(ds) assert dgn is not None, 'cast to GNMGenericNetwork failed' ret = dgn.ConnectPointsByLines(['pipes', 'wells'], 0.000001, 1, 1, gnm.GNM_EDGE_DIR_BOTH) assert ret == 0, 'failed to connect' dgn = None ############################################################################### # Dijkstra shortest path def test_gnm_graph_dijkstra(): if not ogrtest.have_gnm: pytest.skip() ds = gdal.OpenEx('tmp/test_gnm') dn = gnm.CastToNetwork(ds) assert dn is not None, 'cast to GNMNetwork failed' lyr = dn.GetPath(61, 50, gnm.GATDijkstraShortestPath) assert lyr is not None, 'failed to get path' if lyr.GetFeatureCount() == 0: dn.ReleaseResultSet(lyr) pytest.fail('failed to get path') dn.ReleaseResultSet(lyr) dn = None import ogrtest ############################################################################### # KShortest Paths def test_gnm_graph_kshortest(): if not ogrtest.have_gnm: pytest.skip() ds = gdal.OpenEx('tmp/test_gnm') dn = gnm.CastToNetwork(ds) assert dn is not None, 'cast to GNMNetwork failed' lyr = dn.GetPath(61, 50, gnm.GATKShortestPath, options=['num_paths=3']) assert lyr is not None, 'failed to get path' if lyr.GetFeatureCount() < 20: dn.ReleaseResultSet(lyr) pytest.fail('failed to get path') dn.ReleaseResultSet(lyr) dn = None ############################################################################### # ConnectedComponents def test_gnm_graph_connectedcomponents(): if not ogrtest.have_gnm: pytest.skip() ds = gdal.OpenEx('tmp/test_gnm') dn = gnm.CastToNetwork(ds) assert dn is not None, 'cast to GNMNetwork failed' lyr = dn.GetPath(61, 50, gnm.GATConnectedComponents) assert lyr is not None, 'failed to get path' if lyr.GetFeatureCount() == 0: dn.ReleaseResultSet(lyr) pytest.fail('failed to get path') dn.ReleaseResultSet(lyr) dn = None ############################################################################### # Network deleting def test_gnm_delete(): if not ogrtest.have_gnm: pytest.skip() gdal.GetDriverByName('GNMFile').Delete('tmp/test_gnm') assert not os.path.exists('tmp/test_gnm') gdalautotest-3.1.2/requirements.txt0000664000175000017500000000044313701057752016167 0ustar eveneven# Python 2.7 constraints # more-itertools 6.0 no longer supporting Python 2.7 more-itertools < 6.0.0; python_version < '3.0' # pytest 5.0 no longer supporting Python 2.7 pytest>=3.6.0,<5.0.0; python_version < '3.0' pytest>=3.6.0; python_version >= '3.0' pytest-sugar pytest-env lxml==4.5.1 gdalautotest-3.1.2/README.md0000664000175000017500000000333613701057751014165 0ustar eveneven# GDAL test suite ## How to run tests 1. You need to install `pytest` to run the test suite. This should do it: ```bash cd autotest pip install -r ./requirements.txt ``` 2. Then, run tests with: ```bash pytest ``` 3. Some quick usage tips: ```bash # get more verbose output; don't capture stdout/stdin pytest -vvs # run all the gcore tests pytest gcore/ # run a particular module only pytest gcore/basic_test.py # run a particular test case in a module pytest gcore/basic_test.py::test_basic_test_1 ``` Full documentation of pytest at https://docs.pytest.org/en/latest/ ## GDAL's tests are not independent GDAL's test functions are not currently independent of each other. In particular, running individual test functions from a given module may not work. Most tests were originally written with the assumption that entire modules will be run at once. Practically, this means that you should avoid using: * pytest's `--last-failed` / `--lf` option (since it runs only failed tests, not the whole module) * test specifiers that run individual tests (e.g. `pytest gcore/basic_test.py::test_basic_test_1` ) * the xunit plugin to run tests in parallel, unless you also use `--dist=loadfile`. (This may have other issues; untested) This will hopefully be addressed in the future. When writing new tests, please try to make them independent of each other. ## Notes about availability of GDAL sample and test data The GDAL Team makes every effort to assure that all sample data files available from GDAL download server (http://download.osgeo.org/gdal/data/) and test data files used in GDAL Autotest package (https://github.com/OSGeo/gdal/tree/master/autotest) are available as public and freely redistributable geodata. -- http://gdal.org/ gdalautotest-3.1.2/gcore/0000775000175000017500000000000013701057757014006 5ustar evenevengdalautotest-3.1.2/gcore/mask.py0000775000175000017500000007177513701057754015334 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: mask.py d00253db12cdb861d65cbe9e59845e8458874213 2020-03-01 17:06:13 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC 15 "mask band" default functionality (nodata/alpha/etc) # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # Copyright (c) 2008-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import gdal import pytest ############################################################################### # Verify the checksum and flags for "all valid" case. def test_mask_1(): ds = gdal.Open('data/byte.tif') assert ds is not None, 'Failed to open test dataset.' band = ds.GetRasterBand(1) assert band.GetMaskFlags() == gdal.GMF_ALL_VALID, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 4873, 'Got wrong mask checksum' my_min, my_max, mean, stddev = band.GetMaskBand().ComputeStatistics(0) assert (my_min, my_max, mean, stddev) == (255, 255, 255, 0), 'Got wrong mask stats' ############################################################################### # Verify the checksum and flags for "nodata" case. def test_mask_2(): ds = gdal.Open('data/byte.vrt') assert ds is not None, 'Failed to open test dataset.' band = ds.GetRasterBand(1) assert band.GetMaskFlags() == gdal.GMF_NODATA, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 4209, 'Got wrong mask checksum' ############################################################################### # Verify the checksum and flags for "alpha" case. def test_mask_3(): ds = gdal.Open('data/stefan_full_rgba.png') assert ds is not None, 'Failed to open test dataset.' # Test first mask. band = ds.GetRasterBand(1) assert band.GetMaskFlags() == gdal.GMF_ALPHA + gdal.GMF_PER_DATASET, \ 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 10807, 'Got wrong mask checksum' # Verify second and third same as first. band_2 = ds.GetRasterBand(2) band_3 = ds.GetRasterBand(3) # We have commented the following tests as SWIG >= 1.3.37 is buggy ! # or str(band_2.GetMaskBand()) != str(band.GetMaskBand()) \ # or str(band_3.GetMaskBand()) != str(band.GetMaskBand()) assert band_2.GetMaskFlags() == band.GetMaskFlags() and band_3.GetMaskFlags() == band.GetMaskFlags(), \ 'Band 2 or 3 does not seem to match first mask' # Verify alpha has no mask. band = ds.GetRasterBand(4) assert band.GetMaskFlags() == gdal.GMF_ALL_VALID, \ 'Did not get expected mask for alpha.' cs = band.GetMaskBand().Checksum() assert cs == 36074, 'Got wrong alpha mask checksum' ############################################################################### # Copy a *real* masked dataset, and confirm masks copied properly. def test_mask_4(): src_ds = gdal.Open('../gdrivers/data/masked.jpg') assert src_ds is not None, 'Failed to open test dataset.' # NOTE: for now we copy to PNM since it does everything (overviews too) # externally. Should eventually test with gtiff, hfa. drv = gdal.GetDriverByName('PNM') ds = drv.CreateCopy('tmp/mask_4.ppm', src_ds) src_ds = None # confirm we got the custom mask on the copied dataset. assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET, \ 'did not get expected mask flags' msk = ds.GetRasterBand(1).GetMaskBand() cs = msk.Checksum() expected_cs = 770 assert cs == expected_cs, 'Did not get expected checksum' msk = None ds = None ############################################################################### # Create overviews for masked file, and verify the overviews have proper # masks built for them. def test_mask_5(): # This crashes with libtiff 3.8.2, so skip it md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('BigTIFF') == -1: pytest.skip() ds = gdal.Open('tmp/mask_4.ppm', gdal.GA_Update) assert ds is not None, 'Failed to open test dataset.' # So that we instantiate the mask band before. ds.GetRasterBand(1).GetMaskFlags() ds.BuildOverviews(overviewlist=[2, 4]) # confirm mask flags on overview. ovr = ds.GetRasterBand(1).GetOverview(1) assert ovr.GetMaskFlags() == gdal.GMF_PER_DATASET, 'did not get expected mask flags' msk = ovr.GetMaskBand() cs = msk.Checksum() expected_cs = 20505 assert cs == expected_cs, 'Did not get expected checksum' ovr = None msk = None ds = None # Reopen and confirm we still get same results. ds = gdal.Open('tmp/mask_4.ppm') # confirm mask flags on overview. ovr = ds.GetRasterBand(1).GetOverview(1) assert ovr.GetMaskFlags() == gdal.GMF_PER_DATASET, 'did not get expected mask flags' msk = ovr.GetMaskBand() cs = msk.Checksum() expected_cs = 20505 assert cs == expected_cs, 'Did not get expected checksum' ovr = None msk = None ds = None gdal.GetDriverByName('PNM').Delete('tmp/mask_4.ppm') ############################################################################### # Test a TIFF file with 1 band and an embedded mask of 1 bit def test_mask_6(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = gdal.Open('data/test_with_mask_1bit.tif') assert ds is not None, 'Failed to open test dataset.' band = ds.GetRasterBand(1) assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 100, 'Got wrong mask checksum' ############################################################################### # Test a TIFF file with 3 bands and an embedded mask of 1 band of 1 bit def test_mask_7(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = gdal.Open('data/test3_with_1mask_1bit.tif') assert ds is not None, 'Failed to open test dataset.' for i in (1, 2, 3): band = ds.GetRasterBand(i) assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 100, 'Got wrong mask checksum' ############################################################################### # Test a TIFF file with 1 band and an embedded mask of 8 bit. # Note : The TIFF6 specification, page 37, only allows 1 BitsPerSample && 1 SamplesPerPixel, def test_mask_8(): ds = gdal.Open('data/test_with_mask_8bit.tif') assert ds is not None, 'Failed to open test dataset.' band = ds.GetRasterBand(1) assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 1222, 'Got wrong mask checksum' ############################################################################### # Test a TIFF file with 3 bands with an embedded mask of 1 bit with 3 bands. # Note : The TIFF6 specification, page 37, only allows 1 BitsPerSample && 1 SamplesPerPixel, def test_mask_9(): ds = gdal.Open('data/test3_with_mask_1bit.tif') assert ds is not None, 'Failed to open test dataset.' for i in (1, 2, 3): band = ds.GetRasterBand(i) assert band.GetMaskFlags() == 0, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 100, 'Got wrong mask checksum' ############################################################################### # Test a TIFF file with 3 bands with an embedded mask of 8 bit with 3 bands. # Note : The TIFF6 specification, page 37, only allows 1 BitsPerSample && 1 SamplesPerPixel, def test_mask_10(): ds = gdal.Open('data/test3_with_mask_8bit.tif') assert ds is not None, 'Failed to open test dataset.' for i in (1, 2, 3): band = ds.GetRasterBand(i) assert band.GetMaskFlags() == 0, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 1222, 'Got wrong mask checksum' ############################################################################### # Test a TIFF file with an overview, an embedded mask of 1 bit, and an embedded # mask for the overview def test_mask_11(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = gdal.Open('data/test_with_mask_1bit_and_ovr.tif') assert ds is not None, 'Failed to open test dataset.' band = ds.GetRasterBand(1) # Let's fetch the mask assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 100, 'Got wrong mask checksum' # Let's fetch the overview band = ds.GetRasterBand(1).GetOverview(0) cs = band.Checksum() assert cs == 1126, 'Got wrong overview checksum' # Let's fetch the mask of the overview assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 25, 'Got wrong checksum for the mask of the overview' # Let's fetch the overview of the mask == the mask of the overview band = ds.GetRasterBand(1).GetMaskBand().GetOverview(0) cs = band.Checksum() assert cs == 25, 'Got wrong checksum for the overview of the mask' ############################################################################### # Test a TIFF file with 3 bands, an overview, an embedded mask of 1 bit, and an embedded # mask for the overview def test_mask_12(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = gdal.Open('data/test3_with_mask_1bit_and_ovr.tif') assert ds is not None, 'Failed to open test dataset.' for i in (1, 2, 3): band = ds.GetRasterBand(i) # Let's fetch the mask assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 100, 'Got wrong mask checksum' # Let's fetch the overview band = ds.GetRasterBand(i).GetOverview(0) cs = band.Checksum() assert cs == 1126, 'Got wrong overview checksum' # Let's fetch the mask of the overview assert band.GetMaskFlags() == gdal.GMF_PER_DATASET, 'Did not get expected mask.' cs = band.GetMaskBand().Checksum() assert cs == 25, 'Got wrong checksum for the mask of the overview' # Let's fetch the overview of the mask == the mask of the overview band = ds.GetRasterBand(i).GetMaskBand().GetOverview(0) cs = band.Checksum() assert cs == 25, 'Got wrong checksum for the overview of the mask' ############################################################################### # Test creation of external TIFF mask band def test_mask_13(): src_ds = gdal.Open('data/byte.tif') assert src_ds is not None, 'Failed to open test dataset.' drv = gdal.GetDriverByName('GTiff') ds = drv.CreateCopy('tmp/byte_with_mask.tif', src_ds) src_ds = None ds.CreateMaskBand(gdal.GMF_PER_DATASET) cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 0, 'Got wrong checksum for the mask' ds.GetRasterBand(1).GetMaskBand().Fill(1) cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask' ds = None try: os.stat('tmp/byte_with_mask.tif.msk') except OSError: pytest.fail('tmp/byte_with_mask.tif.msk is absent') ds = gdal.Open('tmp/byte_with_mask.tif') assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET, \ 'wrong mask flags' cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask' ds = None drv.Delete('tmp/byte_with_mask.tif') assert not os.path.exists('tmp/byte_with_mask.tif.msk') ############################################################################### # Test creation of internal TIFF mask band def test_mask_14(): src_ds = gdal.Open('data/byte.tif') assert src_ds is not None, 'Failed to open test dataset.' drv = gdal.GetDriverByName('GTiff') with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = drv.CreateCopy('tmp/byte_with_mask.tif', src_ds) src_ds = None # The only flag value supported for internal mask is GMF_PER_DATASET with gdaltest.error_handler(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ret = ds.CreateMaskBand(0) assert ret != 0, 'Error expected' with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ret = ds.CreateMaskBand(gdal.GMF_PER_DATASET) assert ret == 0, 'Creation failed' cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 0, 'Got wrong checksum for the mask (1)' ds.GetRasterBand(1).GetMaskBand().Fill(1) cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask (2)' # This TIFF dataset has already an internal mask band with gdaltest.error_handler(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ret = ds.CreateMaskBand(gdal.GMF_PER_DATASET) assert ret != 0, 'Error expected' # This TIFF dataset has already an internal mask band with gdaltest.error_handler(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ret = ds.GetRasterBand(1).CreateMaskBand(gdal.GMF_PER_DATASET) assert ret != 0, 'Error expected' ds = None assert not os.path.exists('tmp/byte_with_mask.tif.msk') with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = gdal.Open('tmp/byte_with_mask.tif') assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET, \ 'wrong mask flags' cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask (3)' # Test fix for #5884 old_val = gdal.GetCacheMax() gdal.SetCacheMax(0) with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): out_ds = drv.CreateCopy('/vsimem/byte_with_mask.tif', ds, options=['COMPRESS=JPEG']) gdal.SetCacheMax(old_val) assert out_ds.GetRasterBand(1).Checksum() != 0 cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask (4)' out_ds = None drv.Delete('/vsimem/byte_with_mask.tif') ds = None drv.Delete('tmp/byte_with_mask.tif') ############################################################################### # Test creation of internal TIFF overview, mask band and mask band of overview def mask_and_ovr(order, method): src_ds = gdal.Open('data/byte.tif') assert src_ds is not None, 'Failed to open test dataset.' drv = gdal.GetDriverByName('GTiff') ds = drv.CreateCopy('tmp/byte_with_ovr_and_mask.tif', src_ds) src_ds = None if order == 1: with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds.CreateMaskBand(gdal.GMF_PER_DATASET) ds.BuildOverviews(method, overviewlist=[2, 4]) with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds.GetRasterBand(1).GetOverview(0).CreateMaskBand(gdal.GMF_PER_DATASET) ds.GetRasterBand(1).GetOverview(1).CreateMaskBand(gdal.GMF_PER_DATASET) elif order == 2: with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds.BuildOverviews(method, overviewlist=[2, 4]) ds.CreateMaskBand(gdal.GMF_PER_DATASET) ds.GetRasterBand(1).GetOverview(0).CreateMaskBand(gdal.GMF_PER_DATASET) ds.GetRasterBand(1).GetOverview(1).CreateMaskBand(gdal.GMF_PER_DATASET) elif order == 3: with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds.BuildOverviews(method, overviewlist=[2, 4]) ds.GetRasterBand(1).GetOverview(0).CreateMaskBand(gdal.GMF_PER_DATASET) ds.GetRasterBand(1).GetOverview(1).CreateMaskBand(gdal.GMF_PER_DATASET) ds.CreateMaskBand(gdal.GMF_PER_DATASET) elif order == 4: with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds.CreateMaskBand(gdal.GMF_PER_DATASET) ds.GetRasterBand(1).GetMaskBand().Fill(1) # The overview for the mask will be implicitly created and computed. ds.BuildOverviews(method, overviewlist=[2, 4]) if order < 4: ds = None ds = gdal.Open('tmp/byte_with_ovr_and_mask.tif', gdal.GA_Update) ds.GetRasterBand(1).GetMaskBand().Fill(1) # The overview of the mask will be implicitly recomputed. ds.BuildOverviews(method, overviewlist=[2, 4]) ds = None assert not os.path.exists('tmp/byte_with_ovr_and_mask.tif.msk') with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK_TO_8BIT', 'FALSE'): ds = gdal.Open('tmp/byte_with_ovr_and_mask.tif') assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET, \ 'wrong mask flags' cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask' cs = ds.GetRasterBand(1).GetOverview(0).GetMaskBand().Checksum() assert cs == 100, 'Got wrong checksum for the mask of the first overview' cs = ds.GetRasterBand(1).GetOverview(1).GetMaskBand().Checksum() assert cs == 25, 'Got wrong checksum for the mask of the second overview' ds = None drv.Delete('tmp/byte_with_ovr_and_mask.tif') def test_mask_15(): return mask_and_ovr(1, 'NEAREST') def test_mask_16(): return mask_and_ovr(2, 'NEAREST') def test_mask_17(): return mask_and_ovr(3, 'NEAREST') def test_mask_18(): return mask_and_ovr(4, 'NEAREST') def test_mask_15_avg(): return mask_and_ovr(1, 'AVERAGE') def test_mask_16_avg(): return mask_and_ovr(2, 'AVERAGE') def test_mask_17_avg(): return mask_and_ovr(3, 'AVERAGE') def test_mask_18_avg(): return mask_and_ovr(4, 'AVERAGE') ############################################################################### # Test NODATA_VALUES mask def test_mask_19(): ds = gdal.Open('data/test_nodatavalues.tif') assert ds is not None, 'Failed to open test dataset.' assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET + gdal.GMF_NODATA, \ 'did not get expected mask flags' msk = ds.GetRasterBand(1).GetMaskBand() cs = msk.Checksum() expected_cs = 11043 assert cs == expected_cs, 'Did not get expected checksum' msk = None ds = None ############################################################################### # Extensive test of nodata mask for all data types def test_mask_20(): types = [gdal.GDT_Byte, gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CFloat32, gdal.GDT_CFloat64] nodatavalue = [1, -1, 1, -1, 1, 0.5, 0.5, 0.5, 0.5] drv = gdal.GetDriverByName('GTiff') for i, typ in enumerate(types): ds = drv.Create('tmp/mask20.tif', 1, 1, 1, typ) ds.GetRasterBand(1).Fill(nodatavalue[i]) ds.GetRasterBand(1).SetNoDataValue(nodatavalue[i]) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_NODATA, \ ('did not get expected mask flags for type %s' % gdal.GetDataTypeName(typ)) msk = ds.GetRasterBand(1).GetMaskBand() assert msk.Checksum() == 0, \ ('did not get expected mask checksum for type %s : %d' % gdal.GetDataTypeName(typ, msk.Checksum())) msk = None ds = None drv.Delete('tmp/mask20.tif') ############################################################################### # Extensive test of NODATA_VALUES mask for all data types def test_mask_21(): types = [gdal.GDT_Byte, gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CFloat32, gdal.GDT_CFloat64] nodatavalue = [1, -1, 1, -1, 1, 0.5, 0.5, 0.5, 0.5] drv = gdal.GetDriverByName('GTiff') for i, typ in enumerate(types): ds = drv.Create('tmp/mask21.tif', 1, 1, 3, typ) md = {} md['NODATA_VALUES'] = '%f %f %f' % (nodatavalue[i], nodatavalue[i], nodatavalue[i]) ds.SetMetadata(md) ds.GetRasterBand(1).Fill(nodatavalue[i]) ds.GetRasterBand(2).Fill(nodatavalue[i]) ds.GetRasterBand(3).Fill(nodatavalue[i]) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET + gdal.GMF_NODATA, \ ('did not get expected mask flags for type %s' % gdal.GetDataTypeName(typ)) msk = ds.GetRasterBand(1).GetMaskBand() assert msk.Checksum() == 0, \ ('did not get expected mask checksum for type %s : %d' % gdal.GetDataTypeName(typ, msk.Checksum())) msk = None ds = None drv.Delete('tmp/mask21.tif') ############################################################################### # Test creation of external TIFF mask band just after Create() def test_mask_22(): drv = gdal.GetDriverByName('GTiff') ds = drv.Create('tmp/mask_22.tif', 20, 20) ds.CreateMaskBand(gdal.GMF_PER_DATASET) cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 0, 'Got wrong checksum for the mask' ds.GetRasterBand(1).GetMaskBand().Fill(1) cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask' ds = None try: os.stat('tmp/mask_22.tif.msk') except OSError: pytest.fail('tmp/mask_22.tif.msk is absent') ds = gdal.Open('tmp/mask_22.tif') assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET, \ 'wrong mask flags' cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 400, 'Got wrong checksum for the mask' ds = None drv.Delete('tmp/mask_22.tif') assert not os.path.exists('tmp/mask_22.tif.msk') ############################################################################### # Test CreateCopy() of a dataset with a mask into a JPEG-compressed TIFF with # internal mask (#3800) def test_mask_23(): drv = gdal.GetDriverByName('GTiff') md = drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = drv.Create('tmp/mask_23_src.tif', 3000, 2000, 3, options=['TILED=YES', 'SPARSE_OK=YES']) src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) old_val = gdal.GetCacheMax() gdal.SetCacheMax(15000000) gdal.ErrorReset() with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds = drv.CreateCopy('tmp/mask_23_dst.tif', src_ds, options=['TILED=YES', 'COMPRESS=JPEG']) gdal.SetCacheMax(old_val) del ds error_msg = gdal.GetLastErrorMsg() src_ds = None drv.Delete('tmp/mask_23_src.tif') drv.Delete('tmp/mask_23_dst.tif') # 'ERROR 1: TIFFRewriteDirectory:Error fetching directory count' was triggered before assert error_msg == '' ############################################################################### # Test on a GDT_UInt16 RGBA (#5692) def test_mask_24(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/mask_24.tif', 100, 100, 4, gdal.GDT_UInt16, options=['PHOTOMETRIC=RGB', 'ALPHA=YES']) ds.GetRasterBand(1).Fill(65565) ds.GetRasterBand(2).Fill(65565) ds.GetRasterBand(3).Fill(65565) ds.GetRasterBand(4).Fill(65565) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALPHA + gdal.GMF_PER_DATASET, \ 'Did not get expected mask.' mask = ds.GetRasterBand(1).GetMaskBand() # IRasterIO() optimized case import struct assert struct.unpack('B', mask.ReadRaster(0, 0, 1, 1))[0] == 255 # IReadBlock() code path (blockx, blocky) = mask.GetBlockSize() assert struct.unpack('B' * blockx * blocky, mask.ReadBlock(0, 0))[0] == 255 mask.FlushCache() # Test special case where dynamics is only 0-255 ds.GetRasterBand(4).Fill(255) assert struct.unpack('B', mask.ReadRaster(0, 0, 1, 1))[0] == 1 ds = None gdal.Unlink('/vsimem/mask_24.tif') ############################################################################### # Test various error conditions def test_mask_25(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/mask_25.tif', 1, 1) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALL_VALID ds = None # No INTERNAL_MASK_FLAGS_x metadata gdal.GetDriverByName('GTiff').Create('/vsimem/mask_25.tif.msk', 1, 1) ds = gdal.Open('/vsimem/mask_25.tif') assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALL_VALID cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 3 ds = None gdal.Unlink('/vsimem/mask_25.tif') gdal.Unlink('/vsimem/mask_25.tif.msk') # Per-band mask ds = gdal.GetDriverByName('GTiff').Create('/vsimem/mask_25.tif', 1, 1) ds.GetRasterBand(1).CreateMaskBand(0) ds = None ds = gdal.Open('/vsimem/mask_25.tif') assert ds.GetRasterBand(1).GetMaskFlags() == 0 cs = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 0 ds = None gdal.Unlink('/vsimem/mask_25.tif') gdal.Unlink('/vsimem/mask_25.tif.msk') # .msk file does not have enough bands gdal.GetDriverByName('GTiff').Create('/vsimem/mask_25.tif', 1, 1, 2) ds = gdal.GetDriverByName('GTiff').Create('/vsimem/mask_25.tif.msk', 1, 1) ds.SetMetadataItem('INTERNAL_MASK_FLAGS_2', '0') ds = None ds = gdal.Open('/vsimem/mask_25.tif') with gdaltest.error_handler(): assert ds.GetRasterBand(2).GetMaskFlags() == gdal.GMF_ALL_VALID ds = None gdal.Unlink('/vsimem/mask_25.tif') gdal.Unlink('/vsimem/mask_25.tif.msk') # Invalid sequences of CreateMaskBand() calls ds = gdal.GetDriverByName('GTiff').Create('/vsimem/mask_25.tif', 1, 1, 2) ds.GetRasterBand(1).CreateMaskBand(gdal.GMF_PER_DATASET) with gdaltest.error_handler(): assert ds.GetRasterBand(2).CreateMaskBand(0) != 0 ds = None gdal.Unlink('/vsimem/mask_25.tif') gdal.Unlink('/vsimem/mask_25.tif.msk') # CreateMaskBand not supported by this dataset with gdaltest.error_handler(): ds = gdal.GetDriverByName('MEM').Create('', 1, 1) ds.CreateMaskBand(0) ############################################################################### # Test on a GDT_UInt16 1band data def test_mask_26(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/mask_26.tif', 100, 100, 2, gdal.GDT_UInt16, options=['ALPHA=YES']) ds.GetRasterBand(1).Fill(65565) ds.GetRasterBand(2).Fill(65565) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALPHA + gdal.GMF_PER_DATASET, \ 'Did not get expected mask.' mask = ds.GetRasterBand(1).GetMaskBand() # IRasterIO() optimized case import struct assert struct.unpack('B', mask.ReadRaster(0, 0, 1, 1))[0] == 255 ds = None gdal.Unlink('/vsimem/mask_26.tif') ############################################################################### # Cleanup. ############################################################################### # Extensive test of nodata mask for all complex types using real part only def test_mask_27(): types = [gdal.GDT_CFloat32, gdal.GDT_CFloat64] nodatavalue = [0.5, 0.5] drv = gdal.GetDriverByName('GTiff') for i, typ in enumerate(types): ds = drv.Create('tmp/mask27.tif', 1, 1, 1, typ) ds.GetRasterBand(1).Fill(nodatavalue[i], 10) ds.GetRasterBand(1).SetNoDataValue(nodatavalue[i]) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_NODATA, \ ('did not get expected mask flags for type %s' % gdal.GetDataTypeName(typ)) msk = ds.GetRasterBand(1).GetMaskBand() assert msk.Checksum() == 0, \ ('did not get expected mask checksum for type %s : %d' % gdal.GetDataTypeName(typ, msk.Checksum())) msk = None ds = None drv.Delete('tmp/mask27.tif') ############################################################################### # Extensive test of real NODATA_VALUES mask for all complex types gdalautotest-3.1.2/gcore/hfa_read.py0000775000175000017500000000474313701057754016121 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: hfa_read.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for all datatypes from a HFA file. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest from osgeo import gdal import gdaltest init_list = [ ('byte.img', 4672), ('int16.img', 4672), ('uint16.img', 4672), ('int32.img', 4672), ('uint32.img', 4672), ('float32.img', 4672), ('float64.img', 4672), ('utmsmall.img', 50054), ('2bit_compressed.img', 11918)] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('HFA') def test_hfa_open(filename, checksum): ut = gdaltest.GDALTest('HFA', filename, 1, checksum) ut.testOpen() ############################################################################### # Test bugfix for https://oss-fuzz.com/v2/testcase-detail/6053338875428864 def test_hfa_read_completedefn_recursion(): with gdaltest.error_handler(): gdal.Open('data/hfa_completedefn_recursion.img') gdalautotest-3.1.2/gcore/nodatamaskband.py0000775000175000017500000001007513701057754017332 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: nodatamaskband.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test GDALNoDataMaskBand # Author: Even Rouault # ############################################################################### # Copyright (c) 2018, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct from osgeo import gdal def test_nodatamaskband_1(): for (dt, struct_type, v) in [(gdal.GDT_Byte, 'B', 255), (gdal.GDT_Int16, 'h', 32767), (gdal.GDT_UInt16, 'H', 65535), (gdal.GDT_Int32, 'i', 0x7FFFFFFF), (gdal.GDT_UInt32, 'I', 0xFFFFFFFF), (gdal.GDT_Float32, 'f', 1.25), (gdal.GDT_Float32, 'f', float('nan')), (gdal.GDT_Float64, 'd', 1.2345678), (gdal.GDT_Float64, 'd', float('nan'))]: ds = gdal.GetDriverByName('MEM').Create('', 6, 4, 1, dt) ds.GetRasterBand(1).SetNoDataValue(v) ds.GetRasterBand(1).WriteRaster(0, 0, 6, 4, struct.pack(struct_type * 6 * 4, v, 1, 1, v, v, 0, v, 1, 1, v, v, 0, v, 1, 1, v, v, 0, 0, v, v, 0, 0, 0)) data = ds.GetRasterBand(1).GetMaskBand().ReadRaster() data_ar = struct.unpack('B' * 6 * 4, data) expected_ar = (0, 255, 255, 0, 0, 255, 0, 255, 255, 0, 0, 255, 0, 255, 255, 0, 0, 255, 255, 0, 0, 255, 255, 255) assert data_ar == expected_ar, dt data = ds.GetRasterBand(1).GetMaskBand().ReadBlock(0, 0) data_ar = struct.unpack('B' * 6 * 1, data) expected_ar = (0, 255, 255, 0, 0, 255) assert data_ar == expected_ar, dt data = ds.GetRasterBand(1).GetMaskBand().ReadBlock(0, 3) data_ar = struct.unpack('B' * 6 * 1, data) expected_ar = (255, 0, 0, 255, 255, 255) assert data_ar == expected_ar, dt data = ds.GetRasterBand(1).GetMaskBand().ReadRaster( buf_xsize=3, buf_ysize=2) data_ar = struct.unpack('B' * 3 * 2, data) expected_ar = (255, 0, 255, 0, 255, 255) assert data_ar == expected_ar, dt data = ds.GetRasterBand(1).GetMaskBand().ReadRaster( buf_type=gdal.GDT_UInt16, buf_xsize=3, buf_ysize=2) data_ar = struct.unpack('H' * 3 * 2, data) expected_ar = (255, 0, 255, 0, 255, 255) assert data_ar == expected_ar, dt gdalautotest-3.1.2/gcore/cog.py0000775000175000017500000005411313701057754015134 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: cog.py 5eb286323884ad16df10ae755cacb0ac7672b4cf 2020-06-16 15:57:09 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: COG driver testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest import sys from osgeo import gdal import gdaltest ############################################################################### def _check_cog(filename): path = '../../gdal/swig/python/samples' if path not in sys.path: sys.path.append(path) import validate_cloud_optimized_geotiff try: _, errors, _ = validate_cloud_optimized_geotiff.validate(filename, full_check=True) assert not errors, 'validate_cloud_optimized_geotiff failed' except OSError: pytest.fail('validate_cloud_optimized_geotiff failed') ############################################################################### # Basic test def test_cog_basic(): tab = [ 0 ] def my_cbk(pct, _, arg): assert pct >= tab[0] tab[0] = pct return 1 filename = '/vsimem/cog.tif' src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, callback = my_cbk, callback_data = tab) src_ds = None assert tab[0] == 1.0 assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetMetadataItem('LAYOUT', 'IMAGE_STRUCTURE') == 'COG' assert ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') is None assert ds.GetRasterBand(1).GetOverviewCount() == 0 assert ds.GetRasterBand(1).GetBlockSize() == [512, 512] ds = None _check_cog(filename) gdal.GetDriverByName('GTiff').Delete(filename) ############################################################################### # Test creation options def test_cog_creation_options(): filename = '/vsimem/cog.tif' src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=DEFLATE', 'LEVEL=1', 'NUM_THREADS=2']) assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') == 'DEFLATE' ds = None filesize = gdal.VSIStatL(filename).size _check_cog(filename) gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=DEFLATE', 'BIGTIFF=YES', 'LEVEL=1']) assert gdal.VSIStatL(filename).size != filesize gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=DEFLATE', 'PREDICTOR=YES', 'LEVEL=1']) assert gdal.VSIStatL(filename).size != filesize gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=DEFLATE', 'LEVEL=9']) assert gdal.VSIStatL(filename).size < filesize colist = gdal.GetDriverByName('COG').GetMetadataItem('DMD_CREATIONOPTIONLIST') if 'ZSTD' in colist: gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=ZSTD']) ds = gdal.Open(filename) assert ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') == 'ZSTD' ds = None if 'WEBP' in colist: with gdaltest.error_handler(): assert not gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=WEBP']) if 'LERC' in colist: assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=LERC']) filesize_no_z_error = gdal.VSIStatL(filename).size assert gdal.VSIStatL(filename).size != filesize assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=LERC', 'MAX_Z_ERROR=10']) filesize_with_z_error = gdal.VSIStatL(filename).size assert filesize_with_z_error < filesize_no_z_error assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=LERC_DEFLATE']) filesize_lerc_deflate = gdal.VSIStatL(filename).size assert filesize_lerc_deflate < filesize_no_z_error assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=LERC_DEFLATE', 'LEVEL=1']) filesize_lerc_deflate_level_1 = gdal.VSIStatL(filename).size assert filesize_lerc_deflate_level_1 > filesize_lerc_deflate if 'ZSTD' in colist: assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=LERC_ZSTD']) filesize_lerc_zstd = gdal.VSIStatL(filename).size assert filesize_lerc_zstd < filesize_no_z_error assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=LERC_ZSTD', 'LEVEL=1']) filesize_lerc_zstd_level_1 = gdal.VSIStatL(filename).size assert filesize_lerc_zstd_level_1 > filesize_lerc_zstd src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) ############################################################################### # Test creation of overviews def test_cog_creation_of_overviews(): tab = [ 0 ] def my_cbk(pct, _, arg): assert pct >= tab[0] tab[0] = pct return 1 directory = '/vsimem/test_cog_creation_of_overviews' filename = directory + '/cog.tif' src_ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -outsize 2048 300') with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): check_filename = '/vsimem/tmp.tif' ds = gdal.GetDriverByName('GTiff').CreateCopy(check_filename, src_ds, options = ['TILED=YES']) ds.BuildOverviews('CUBIC', [2, 4]) cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2 = ds.GetRasterBand(1).GetOverview(1).Checksum() ds = None gdal.Unlink(check_filename) ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds assert len(gdal.ReadDir(directory)) == 1 # check that the temp file has gone away ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 2 assert ds.GetRasterBand(1).GetOverview(0).Checksum() == cs1 assert ds.GetRasterBand(1).GetOverview(1).Checksum() == cs2 ds = None _check_cog(filename) src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) gdal.Unlink(directory) ############################################################################### # Test creation of overviews with a dataset with a mask def test_cog_creation_of_overviews_with_mask(): tab = [ 0 ] def my_cbk(pct, _, arg): assert pct >= tab[0] tab[0] = pct return 1 directory = '/vsimem/test_cog_creation_of_overviews_with_mask' gdal.Mkdir(directory, 0o755) filename = directory + '/cog.tif' src_ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -outsize 2048 300') src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) src_ds.GetRasterBand(1).GetMaskBand().WriteRaster(0, 0, 1024, 300, b'\xFF', buf_xsize = 1, buf_ysize = 1) with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): check_filename = '/vsimem/tmp.tif' ds = gdal.GetDriverByName('GTiff').CreateCopy(check_filename, src_ds, options = ['TILED=YES']) ds.BuildOverviews('CUBIC', [2, 4]) cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2 = ds.GetRasterBand(1).GetOverview(1).Checksum() ds = None gdal.Unlink(check_filename) ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds assert len(gdal.ReadDir(directory)) == 1 # check that the temp file has gone away ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 2 assert ds.GetRasterBand(1).GetOverview(0).GetBlockSize() == [512, 512] assert ds.GetRasterBand(1).GetOverview(0).Checksum() == cs1 assert ds.GetRasterBand(1).GetOverview(1).Checksum() == cs2 ds = None _check_cog(filename) src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) gdal.Unlink(directory) ############################################################################### # Test full world reprojection to WebMercator def test_cog_small_world_to_web_mercator(): tab = [ 0 ] def my_cbk(pct, _, arg): assert pct >= tab[0] tab[0] = pct return 1 directory = '/vsimem/test_cog_small_world_to_web_mercator' gdal.Mkdir(directory, 0o755) filename = directory + '/cog.tif' src_ds = gdal.Open('../gdrivers/data/small_world.tif') ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['TILING_SCHEME=GoogleMapsCompatible', 'COMPRESS=JPEG'], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds assert len(gdal.ReadDir(directory)) == 1 # check that the temp file has gone away ds = None ds = gdal.Open(filename) assert ds.RasterCount == 3 assert ds.RasterXSize == 256 assert ds.RasterYSize == 256 assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET assert ds.GetRasterBand(1).GetBlockSize() == [256, 256] gt = ds.GetGeoTransform() expected_gt = [-20037508.342789248, 156543.033928041, 0.0, 20037508.342789248, 0.0, -156543.033928041] for i in range(6): if gt[i] != pytest.approx(expected_gt[i], abs=1e-10 * abs(expected_gt[i])): assert False, gt got_cs = [ds.GetRasterBand(i+1).Checksum() for i in range(3)] if sys.platform == 'darwin' and gdal.GetConfigOption('TRAVIS', None) is not None: assert got_cs != [0, 0, 0] else: assert got_cs == [26293, 23439, 14955] assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 17849 assert ds.GetRasterBand(1).GetOverviewCount() == 0 ds = None _check_cog(filename) src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) gdal.Unlink(directory) ############################################################################### # Test reprojection of small extent to WebMercator def test_cog_byte_to_web_mercator(): tab = [ 0 ] def my_cbk(pct, _, arg): assert pct >= tab[0] tab[0] = pct return 1 directory = '/vsimem/test_cog_byte_to_web_mercator' gdal.Mkdir(directory, 0o755) filename = directory + '/cog.tif' src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['TILING_SCHEME=GoogleMapsCompatible', 'ALIGNED_LEVELS=3'], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds assert len(gdal.ReadDir(directory)) == 1 # check that the temp file has gone away ds = None ds = gdal.Open(filename) assert ds.RasterCount == 2 assert ds.RasterXSize == 1024 assert ds.RasterYSize == 1024 assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALPHA + gdal.GMF_PER_DATASET assert ds.GetRasterBand(1).GetBlockSize() == [256,256] gt = ds.GetGeoTransform() expected_gt = [-13149614.849955443, 76.43702828517598, 0.0, 4070118.8821290657, 0.0, -76.43702828517598] for i in range(6): if gt[i] != pytest.approx(expected_gt[i], abs=1e-10 * abs(expected_gt[i])): assert False, gt assert ds.GetRasterBand(1).Checksum() in (4363, 4264) # 4264 on Mac assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 4356 assert ds.GetRasterBand(1).GetOverviewCount() == 2 ds = None _check_cog(filename) src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) gdal.Unlink(directory) ############################################################################### # Same as previous test case but with other input options def test_cog_byte_to_web_mercator_manual(): directory = '/vsimem/test_cog_byte_to_web_mercator_manual' gdal.Mkdir(directory, 0o755) filename = directory + '/cog.tif' src_ds = gdal.Open('data/byte.tif') res = 76.43702828517598 minx = -13149614.849955443 maxx = minx + 1024 * res maxy = 4070118.8821290657 miny = maxy - 1024 * res ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['BLOCKSIZE=256', 'TARGET_SRS=EPSG:3857', 'RES=%.18g' % res, 'EXTENT=%.18g,%.18g,%.18g,%.18g' % (minx,miny,maxx,maxy)]) assert ds ds = None ds = gdal.Open(filename) assert ds.RasterCount == 2 assert ds.RasterXSize == 1024 assert ds.RasterYSize == 1024 assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALPHA + gdal.GMF_PER_DATASET assert ds.GetRasterBand(1).GetBlockSize() == [256,256] gt = ds.GetGeoTransform() expected_gt = [-13149614.849955443, 76.43702828517598, 0.0, 4070118.8821290657, 0.0, -76.43702828517598] for i in range(6): if gt[i] != pytest.approx(expected_gt[i], abs=1e-10 * abs(expected_gt[i])): assert False, gt assert ds.GetRasterBand(1).Checksum() in (4363, 4264) # 4264 on Mac assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 4356 assert ds.GetRasterBand(1).GetOverviewCount() == 2 ds = None src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) gdal.Unlink(directory) ############################################################################### # Test OVERVIEWS creation option def test_cog_overviews_co(): def my_cbk(pct, _, arg): assert pct >= tab[0] tab[0] = pct return 1 directory = '/vsimem/test_cog_overviews_co' filename = directory + '/cog.tif' src_ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -outsize 2048 300') for val in ['NONE', 'FORCE_USE_EXISTING']: tab = [ 0 ] ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['OVERVIEWS=' + val], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 0 ds = None _check_cog(filename) for val in ['AUTO', 'IGNORE_EXISTING']: tab = [ 0 ] ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['OVERVIEWS=' + val], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 2 assert ds.GetRasterBand(1).GetOverview(0).Checksum() != 0 ds = None _check_cog(filename) # Add overviews to source src_ds.BuildOverviews('NONE', [2]) tab = [ 0 ] ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['OVERVIEWS=NONE'], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 0 ds = None _check_cog(filename) tab = [ 0 ] ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['OVERVIEWS=FORCE_USE_EXISTING'], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 1 assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 0 ds = None _check_cog(filename) tab = [ 0 ] ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['OVERVIEWS=IGNORE_EXISTING'], callback = my_cbk, callback_data = tab) assert tab[0] == 1.0 assert ds ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() assert ds.GetRasterBand(1).GetOverviewCount() == 2 assert ds.GetRasterBand(1).GetOverview(0).Checksum() != 0 ds = None _check_cog(filename) src_ds = None gdal.GetDriverByName('GTiff').Delete(filename) gdal.Unlink(directory) ############################################################################### # Test editing and invalidating a COG file def test_cog_invalidation_by_data_change(): filename = '/vsimem/cog.tif' src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100) ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=DEFLATE']) ds = None ds = gdal.Open(filename, gdal.GA_Update) assert ds.GetMetadataItem('LAYOUT', 'IMAGE_STRUCTURE') == 'COG' src_ds = gdal.Open('data/byte.tif') data = src_ds.ReadRaster() ds.GetRasterBand(1).WriteRaster(0, 0, 20, 20, data) with gdaltest.error_handler(): ds.FlushCache() ds = None with gdaltest.error_handler(): ds = gdal.Open(filename) assert ds.GetMetadataItem('LAYOUT', 'IMAGE_STRUCTURE') is None ds = None with pytest.raises(AssertionError, match='KNOWN_INCOMPATIBLE_EDITION=YES is declared in the file'): _check_cog(filename) with gdaltest.error_handler(): gdal.GetDriverByName('GTiff').Delete(filename) ############################################################################### # Test editing and invalidating a COG file def test_cog_invalidation_by_metadata_change(): filename = '/vsimem/cog.tif' src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) ds = gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['COMPRESS=DEFLATE']) ds = None ds = gdal.Open(filename, gdal.GA_Update) ds.GetRasterBand(1).ComputeStatistics(False) ds = None with gdaltest.error_handler(): ds = gdal.Open(filename) assert ds.GetMetadataItem('LAYOUT', 'IMAGE_STRUCTURE') is None ds = None with gdaltest.error_handler(): gdal.GetDriverByName('GTiff').Delete(filename) ############################################################################### def test_cog_invalid_warp_resampling(): filename = '/vsimem/test_cog_invalid_warp_resampling.tif' src_ds = gdal.Open('data/byte.tif') with gdaltest.error_handler(): assert gdal.GetDriverByName('COG').CreateCopy(filename, src_ds, options = ['TILING_SCHEME=GoogleMapsCompatible', 'RESAMPLING=INVALID']) is None gdal.Unlink(filename) gdalautotest-3.1.2/gcore/gdal_api_proxy.py0000775000175000017500000003517313701057754017372 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: gdal_api_proxy.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GDAL API PROXY mechanism # Author: Even Rouault, # ############################################################################### # Copyright (c) 2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import subprocess import time from osgeo import gdal from osgeo import osr import pytest ############################################################################### # Test forked gdalserver @pytest.fixture(scope="module") def gdalserver_path(): import test_cli_utilities gdalserver_path = test_cli_utilities.get_cli_utility_path('gdalserver') if gdalserver_path is None: gdalserver_path = 'gdalserver' return gdalserver_path def test_gdal_api_proxy_1(gdalserver_path): subprocess.check_call([ sys.executable, 'gdal_api_proxy.py', gdalserver_path, '-2', ]) ############################################################################### # Test connection to TCP server def test_gdal_api_proxy_2(gdalserver_path): if sys.version_info < (2, 6, 0): pytest.skip() subprocess.check_call([ sys.executable, 'gdal_api_proxy.py', gdalserver_path, '-2', ]) ############################################################################### # Test connection to Unix socket server def test_gdal_api_proxy_3(gdalserver_path): if sys.version_info < (2, 6, 0): pytest.skip() if sys.platform == 'win32': pytest.skip() if sys.platform == 'darwin': pytest.skip("Fails on MacOSX ('ERROR 1: posix_spawnp() failed'. Not sure why.") subprocess.check_call([ sys.executable, 'gdal_api_proxy.py', gdalserver_path, '-3', ]) ############################################################################### # Test -nofork mode def test_gdal_api_proxy_4(gdalserver_path): if sys.version_info < (2, 6, 0): pytest.skip() if sys.platform == 'win32': pytest.skip() if sys.platform == 'darwin': pytest.skip("Fails on MacOSX ('ERROR 1: posix_spawnp() failed'. Not sure why.") subprocess.check_call([ sys.executable, 'gdal_api_proxy.py', gdalserver_path, '-4', ]) ############################################################################### # def _gdal_api_proxy_sub(): src_ds = gdal.Open('data/byte.tif') src_cs = src_ds.GetRasterBand(1).Checksum() src_gt = src_ds.GetGeoTransform() src_prj = src_ds.GetProjectionRef() src_data = src_ds.ReadRaster(0, 0, 20, 20) src_md = src_ds.GetMetadata() src_ds = None drv = gdal.IdentifyDriver('data/byte.tif') assert drv.GetDescription() == 'API_PROXY' ds = gdal.GetDriverByName('GTiff').Create('tmp/byte.tif', 1, 1, 3) ds = None src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/byte.tif', src_ds, options=['TILED=YES']) got_cs = ds.GetRasterBand(1).Checksum() assert src_cs == got_cs ds = None ds = gdal.Open('tmp/byte.tif', gdal.GA_Update) ds.SetGeoTransform([1, 2, 3, 4, 5, 6]) got_gt = ds.GetGeoTransform() assert src_gt != got_gt ds.SetGeoTransform(src_gt) got_gt = ds.GetGeoTransform() assert src_gt == got_gt assert ds.GetGCPCount() == 0 assert ds.GetGCPProjection() == '', ds.GetGCPProjection() assert not ds.GetGCPs() gcps = [gdal.GCP(0, 1, 2, 3, 4)] sr = osr.SpatialReference() sr.ImportFromEPSG(4326) wkt = sr.ExportToWkt() assert ds.SetGCPs(gcps, wkt) == 0 got_gcps = ds.GetGCPs() assert len(got_gcps) == 1 assert (got_gcps[0].GCPLine == gcps[0].GCPLine and \ got_gcps[0].GCPPixel == gcps[0].GCPPixel and \ got_gcps[0].GCPX == gcps[0].GCPX and \ got_gcps[0].GCPY == gcps[0].GCPY) assert ds.GetGCPProjection() == wkt ds.SetGCPs([], "") assert not ds.GetGCPs() ds.SetProjection('') got_prj = ds.GetProjectionRef() assert src_prj != got_prj ds.SetProjection(src_prj) got_prj = ds.GetProjectionRef() assert src_prj == got_prj ds.GetRasterBand(1).Fill(0) got_cs = ds.GetRasterBand(1).Checksum() assert got_cs == 0 ds.GetRasterBand(1).WriteRaster(0, 0, 20, 20, src_data) got_cs = ds.GetRasterBand(1).Checksum() assert src_cs == got_cs ds.GetRasterBand(1).Fill(0) got_cs = ds.GetRasterBand(1).Checksum() assert got_cs == 0 ds.WriteRaster(0, 0, 20, 20, src_data) got_cs = ds.GetRasterBand(1).Checksum() assert src_cs == got_cs # Not bound to SWIG # ds.AdviseRead(0,0,20,20,20,20) got_data = ds.ReadRaster(0, 0, 20, 20) assert src_data == got_data got_data = ds.GetRasterBand(1).ReadRaster(0, 0, 20, 20) assert src_data == got_data got_data_weird_spacing = ds.ReadRaster(0, 0, 20, 20, buf_pixel_space=1, buf_line_space=32) assert len(got_data_weird_spacing) == 32 * (20 - 1) + 20 assert got_data[20:20 + 20] == got_data_weird_spacing[32:32 + 20] got_data_weird_spacing = ds.GetRasterBand(1).ReadRaster(0, 0, 20, 20, buf_pixel_space=1, buf_line_space=32) assert len(got_data_weird_spacing) == 32 * (20 - 1) + 20 assert got_data[20:20 + 20] == got_data_weird_spacing[32:32 + 20] got_block = ds.GetRasterBand(1).ReadBlock(0, 0) assert len(got_block) == 256 * 256 assert got_data[20:20 + 20] == got_block[256:256 + 20] ds.FlushCache() ds.GetRasterBand(1).FlushCache() got_data = ds.GetRasterBand(1).ReadRaster(0, 0, 20, 20) assert src_data == got_data assert len(ds.GetFileList()) == 1 assert ds.AddBand(gdal.GDT_Byte) != 0 got_md = ds.GetMetadata() assert src_md == got_md assert ds.GetMetadataItem('AREA_OR_POINT') == 'Area' assert ds.GetMetadataItem('foo') is None ds.SetMetadataItem('foo', 'bar') assert ds.GetMetadataItem('foo') == 'bar' ds.SetMetadata({'foo': 'baz'}, 'OTHER') assert ds.GetMetadataItem('foo', 'OTHER') == 'baz' ds.GetRasterBand(1).SetMetadata({'foo': 'baw'}, 'OTHER') assert ds.GetRasterBand(1).GetMetadataItem('foo', 'OTHER') == 'baw' assert ds.GetMetadataItem('INTERLEAVE', 'IMAGE_STRUCTURE') == 'BAND' assert not ds.GetRasterBand(1).GetMetadata() assert ds.GetRasterBand(1).GetMetadataItem('foo') is None ds.GetRasterBand(1).SetMetadataItem('foo', 'baz') assert ds.GetRasterBand(1).GetMetadataItem('foo') == 'baz' ds.GetRasterBand(1).SetMetadata({'foo': 'baw'}) assert ds.GetRasterBand(1).GetMetadataItem('foo') == 'baw' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_Undefined) ct = ds.GetRasterBand(1).GetColorTable() assert ct is None ct = gdal.ColorTable() ct.SetColorEntry(0, (1, 2, 3)) assert ds.GetRasterBand(1).SetColorTable(ct) == 0 ct = ds.GetRasterBand(1).GetColorTable() assert ct is not None assert ct.GetColorEntry(0) == (1, 2, 3, 255) ct = ds.GetRasterBand(1).GetColorTable() assert ct is not None assert ds.GetRasterBand(1).SetColorTable(None) == 0 ct = ds.GetRasterBand(1).GetColorTable() assert ct is None rat = ds.GetRasterBand(1).GetDefaultRAT() assert rat is None assert ds.GetRasterBand(1).SetDefaultRAT(None) == 0 ref_rat = gdal.RasterAttributeTable() assert ds.GetRasterBand(1).SetDefaultRAT(ref_rat) == 0 rat = ds.GetRasterBand(1).GetDefaultRAT() assert rat is None assert ds.GetRasterBand(1).SetDefaultRAT(None) == 0 rat = ds.GetRasterBand(1).GetDefaultRAT() assert rat is None assert ds.GetRasterBand(1).GetMinimum() is None got_stats = ds.GetRasterBand(1).GetStatistics(0, 0) assert got_stats[3] < 0.0 got_stats = ds.GetRasterBand(1).GetStatistics(1, 1) assert got_stats[0] == 74.0 assert ds.GetRasterBand(1).GetMinimum() == 74.0 assert ds.GetRasterBand(1).GetMaximum() == 255.0 ds.GetRasterBand(1).SetStatistics(1, 2, 3, 4) got_stats = ds.GetRasterBand(1).GetStatistics(1, 1) assert got_stats == [1, 2, 3, 4] ds.GetRasterBand(1).ComputeStatistics(0) got_stats = ds.GetRasterBand(1).GetStatistics(1, 1) assert got_stats[0] == 74.0 minmax = ds.GetRasterBand(1).ComputeRasterMinMax() assert minmax == (74.0, 255.0) assert ds.GetRasterBand(1).GetOffset() is None assert ds.GetRasterBand(1).GetScale() is None ds.GetRasterBand(1).SetOffset(10.0) assert ds.GetRasterBand(1).GetOffset() == 10.0 ds.GetRasterBand(1).SetScale(2.0) assert ds.GetRasterBand(1).GetScale() == 2.0 ds.BuildOverviews('NEAR', [2]) assert ds.GetRasterBand(1).GetOverviewCount() == 1 assert ds.GetRasterBand(1).GetOverview(-1) is None assert ds.GetRasterBand(1).GetOverview(0) is not None assert ds.GetRasterBand(1).GetOverview(0) is not None got_hist = ds.GetRasterBand(1).GetHistogram() assert len(got_hist) == 256 (minval, maxval, nitems, got_hist2) = ds.GetRasterBand(1).GetDefaultHistogram() assert minval == -0.5 assert maxval == 255.5 assert nitems == 256 assert got_hist == got_hist2 ds.GetRasterBand(1).SetDefaultHistogram(1, 2, [3]) (minval, maxval, nitems, got_hist3) = ds.GetRasterBand(1).GetDefaultHistogram() assert minval == 1 assert maxval == 2 assert nitems == 1 assert got_hist3[0] == 3 got_nodatavalue = ds.GetRasterBand(1).GetNoDataValue() assert got_nodatavalue is None ds.GetRasterBand(1).SetNoDataValue(123) got_nodatavalue = ds.GetRasterBand(1).GetNoDataValue() assert got_nodatavalue == 123 assert ds.GetRasterBand(1).GetMaskFlags() == 8 assert ds.GetRasterBand(1).GetMaskBand() is not None ret = ds.GetRasterBand(1).DeleteNoDataValue() assert ret == 0 got_nodatavalue = ds.GetRasterBand(1).GetNoDataValue() assert got_nodatavalue is None ds.CreateMaskBand(0) assert ds.GetRasterBand(1).GetMaskFlags() == 2 assert ds.GetRasterBand(1).GetMaskBand() is not None ds.GetRasterBand(1).CreateMaskBand(0) assert ds.GetRasterBand(1).HasArbitraryOverviews() == 0 ds.GetRasterBand(1).SetUnitType('foo') assert ds.GetRasterBand(1).GetUnitType() == 'foo' assert ds.GetRasterBand(1).GetCategoryNames() is None ds.GetRasterBand(1).SetCategoryNames(['foo']) assert ds.GetRasterBand(1).GetCategoryNames() == ['foo'] ds.GetRasterBand(1).SetDescription('bar') ds = None gdal.GetDriverByName('GTiff').Delete('tmp/byte.tif') ############################################################################### # def _gdal_api_proxy_sub_clean(): if gdaltest.api_proxy_server_p is not None: try: gdaltest.api_proxy_server_p.terminate() except Exception: pass gdaltest.api_proxy_server_p.wait() gdal.Unlink('tmp/gdalapiproxysocket') if __name__ == '__main__': sys.path.insert(0, '../pymod') import gdaltest if len(sys.argv) >= 3 and sys.argv[2] == '-1': gdal.SetConfigOption('GDAL_API_PROXY', 'YES') if sys.platform == 'win32': arg_gdalserver_path = sys.argv[1] # noqa gdal.SetConfigOption('GDAL_API_PROXY_SERVER', arg_gdalserver_path) gdaltest.api_proxy_server_p = None gdaltest_list = [_gdal_api_proxy_sub] elif len(sys.argv) >= 3 and sys.argv[2] == '-2': arg_gdalserver_path = sys.argv[1] p = None for port in [8080, 8081, 8082]: p = subprocess.Popen([arg_gdalserver_path, '-tcpserver', '%d' % port]) time.sleep(1) if p.poll() is None: break try: p.terminate() except (AttributeError, OSError): pass p.wait() p = None if p is not None: gdal.SetConfigOption('GDAL_API_PROXY', 'YES') gdal.SetConfigOption('GDAL_API_PROXY_SERVER', 'localhost:%d' % port) print('port = %d' % port) gdaltest.api_proxy_server_p = p gdaltest_list = [_gdal_api_proxy_sub, _gdal_api_proxy_sub_clean] else: gdaltest_list = [] elif len(sys.argv) >= 3 and sys.argv[2] == '-3': arg_gdalserver_path = sys.argv[1] p = subprocess.Popen([arg_gdalserver_path, '-unixserver', 'tmp/gdalapiproxysocket']) time.sleep(1) if p.poll() is None: gdal.SetConfigOption('GDAL_API_PROXY', 'YES') gdal.SetConfigOption('GDAL_API_PROXY_SERVER', 'tmp/gdalapiproxysocket') gdaltest.api_proxy_server_p = p gdaltest_list = [_gdal_api_proxy_sub, _gdal_api_proxy_sub_clean] else: try: p.terminate() except (AttributeError, OSError): pass p.wait() gdaltest_list = [] elif len(sys.argv) >= 3 and sys.argv[2] == '-4': arg_gdalserver_path = sys.argv[1] p = subprocess.Popen([arg_gdalserver_path, '-nofork', '-unixserver', 'tmp/gdalapiproxysocket']) time.sleep(1) if p.poll() is None: gdal.SetConfigOption('GDAL_API_PROXY', 'YES') gdal.SetConfigOption('GDAL_API_PROXY_SERVER', 'tmp/gdalapiproxysocket') gdaltest.api_proxy_server_p = p gdaltest_list = [_gdal_api_proxy_sub, _gdal_api_proxy_sub_clean] else: try: p.terminate() except (AttributeError, OSError): pass p.wait() gdaltest_list = [] for func in gdaltest_list: func() gdalautotest-3.1.2/gcore/hdf4multidim.py0000664000175000017500000005015713701057754016757 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: hdf4multidim.py 6e8bb3c6a526613c01d34f6ff4373ae1f74e422c 2019-08-04 20:25:42 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test multidimensional support in HDF4 driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import pytest import struct from osgeo import gdal pytestmark = pytest.mark.require_driver('HDF4') ############################################################################### # Test reading HDFEOS SWATH products def test_hdf4multidim_hdfeos_swath(): if not gdaltest.download_file('https://gamma.hdfgroup.org/ftp/pub/outgoing/NASAHDFfiles2/eosweb/hdf4/hdfeos2-swath-wo-dimmaps/AMSR_E_L2_Ocean_B01_200206182340_A.hdf', 'AMSR_E_L2_Ocean_B01_200206182340_A.hdf'): pytest.skip() ds = gdal.OpenEx('tmp/cache/AMSR_E_L2_Ocean_B01_200206182340_A.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg assert rg.GetGroupNames() == ['swaths'] attrs = rg.GetAttributes() assert attrs attr = rg.GetAttribute('HDFEOSVersion') assert attr.Read() == 'HDFEOS_V2.7.2' swaths = rg.OpenGroup('swaths') assert swaths assert not rg.OpenGroup('foo') assert swaths.GetGroupNames() == ['Swath1'] swath1 = swaths.OpenGroup('Swath1') assert swath1 assert not swaths.OpenGroup('foo') attrs = swath1.GetAttributes() assert len(attrs) == 3 attr = swath1.GetAttribute('SoftwareRevisionDate') assert attr.Read()[0:-1] == "November 7, 2003" attr = swath1.GetAttribute('SoftwareBuildNumber') assert attr.Read() == 1 dims = swath1.GetDimensions() assert len(dims) == 4 dim = next((x for x in dims if x.GetName() == 'DataXtrack_lo'), None) assert dim assert dim.GetFullName() == '/swaths/Swath1/DataXtrack_lo' assert dim.GetSize() == 196 assert swath1.GetGroupNames() == ['Data Fields', 'Geolocation Fields'] assert not swath1.OpenGroup('foo') datafields = swath1.OpenGroup('Data Fields') assert datafields assert len(datafields.GetMDArrayNames()) == 10 assert not datafields.OpenMDArray('foo') array = datafields.OpenMDArray('High_res_cloud') assert array dims = array.GetDimensions() assert len(dims) == 2 assert dims[0].GetFullName() == '/swaths/Swath1/DataTrack_lo' assert array.GetDataType().GetNumericDataType() == gdal.GDT_Int16 attr = array.GetAttribute('Scale') assert attr.Read() == 9.999999747378752e-05 got_data = array.Read(array_start_idx = [13, 0], count = [3, 2]) assert len(got_data) == 3 * 2 * 2 assert struct.unpack('h' * 6, got_data) == (0, 0, 17318, 17317, 17318, 17317) got_data = array.Read(array_start_idx = [13, 0], count = [3, 2], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_Int32)) assert len(got_data) == 3 * 2 * 4 assert struct.unpack('i' * 6, got_data) == (0, 0, 17318, 17317, 17318, 17317) got_data = array.Read(array_start_idx = [13, 0], count = [3, 2], array_step = [2, 1]) assert len(got_data) == 3 * 2 * 2 assert struct.unpack('h' * 6, got_data) == (0, 0, 17318, 17317, 17317, 17317) got_data = array.Read(array_start_idx = [15, 1], count = [3, 2], array_step = [-1, -1]) assert len(got_data) == 3 * 2 * 2 assert struct.unpack('h' * 6, got_data) == (17317, 17318, 17317, 17318, 0, 0) got_data = array.Read(array_start_idx = [13, 0], count = [3, 2], buffer_stride = [1, 3]) assert len(got_data) == 3 * 2 * 2 assert struct.unpack('h' * 6, got_data) == (0, 17318, 17318, 0, 17317, 17317) ############################################################################### # Test reading HDFEOS GRID products def test_hdf4multidim_hdfeos_grid(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/MOD09A1.A2010041.h06v03.005.2010051001103.hdf', 'MOD09A1.A2010041.h06v03.005.2010051001103.hdf'): pytest.skip() ds = gdal.OpenEx('tmp/cache/MOD09A1.A2010041.h06v03.005.2010051001103.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['eos_grids'] attrs = rg.GetAttributes() assert attrs attr = rg.GetAttribute('HDFEOSVersion') assert attr.Read() == 'HDFEOS_V2.9' eos_grids = rg.OpenGroup('eos_grids') assert eos_grids assert not rg.OpenGroup('foo') assert eos_grids.GetGroupNames() == ['MOD_Grid_500m_Surface_Reflectance'] MOD_Grid_500m_Surface_Reflectance = eos_grids.OpenGroup('MOD_Grid_500m_Surface_Reflectance') assert MOD_Grid_500m_Surface_Reflectance assert not eos_grids.OpenGroup('foo') attrs = MOD_Grid_500m_Surface_Reflectance.GetAttributes() assert len(attrs) == 0 assert MOD_Grid_500m_Surface_Reflectance.GetGroupNames() == ['Data Fields'] assert not MOD_Grid_500m_Surface_Reflectance.OpenGroup('foo') datafields = MOD_Grid_500m_Surface_Reflectance.OpenGroup('Data Fields') assert datafields assert len(datafields.GetMDArrayNames()) == 13 assert not datafields.OpenMDArray('foo') array = datafields.OpenMDArray('sur_refl_b01') assert array dims = array.GetDimensions() assert len(dims) == 2 assert dims[0].GetFullName() == '/eos_grids/MOD_Grid_500m_Surface_Reflectance/YDim' assert dims[0].GetSize() == 2400 assert dims[1].GetFullName() == '/eos_grids/MOD_Grid_500m_Surface_Reflectance/XDim' assert dims[1].GetSize() == 2400 assert array.GetDataType().GetNumericDataType() == gdal.GDT_Int16 assert array.GetNoDataValueAsDouble() == -28672.0 assert array.GetOffset() == 0 assert array.GetScale() == 0.0001 assert array.GetUnit() == 'reflectance' attr = array.GetAttribute('valid_range') assert attr.Read() == (-100, 16000) assert array.GetSpatialRef() got_data = array.Read(array_start_idx = [2398, 2398], count = [2, 2]) assert len(got_data) == 2 * 2 * 2 assert struct.unpack('h' * 4, got_data) == (-24, 0, -15, -22) dims = MOD_Grid_500m_Surface_Reflectance.GetDimensions() assert len(dims) == 2 assert dims[0].GetName() == 'YDim' assert dims[0].GetIndexingVariable() assert dims[1].GetName() == 'XDim' assert dims[1].GetIndexingVariable() assert MOD_Grid_500m_Surface_Reflectance.GetMDArrayNames() == ['YDim', 'XDim'] XDim = MOD_Grid_500m_Surface_Reflectance.OpenMDArray('XDim') assert XDim YDim = MOD_Grid_500m_Surface_Reflectance.OpenMDArray('YDim') assert YDim assert not MOD_Grid_500m_Surface_Reflectance.OpenMDArray('foo') ############################################################################### # Test reading GDAL SDS 2D def test_hdf4multidim_gdal_sds_2d(): ds = gdal.OpenEx('data/byte_2.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() is None assert rg.OpenGroup('scientific_datasets') is None assert rg.GetMDArrayNames() == ['Band0', 'X', 'Y'] dims = rg.GetDimensions() assert len(dims) == 2 array = rg.OpenMDArray('Band0') assert array dims = array.GetDimensions() assert len(dims) == 2 assert dims[0].GetFullName() == '/Y' assert dims[1].GetFullName() == '/X' assert array.GetDataType().GetNumericDataType() == gdal.GDT_Byte got_data = array.Read(array_start_idx = [0, 0], count = [2, 2]) assert len(got_data) == 2 * 2 assert struct.unpack('B' * 4, got_data) == (107, 123, 115, 132) assert array.GetSpatialRef() assert array.GetUnit() == '' assert not array.GetOffset() assert not array.GetScale() assert not array.GetNoDataValueAsDouble() X = dims[0].GetIndexingVariable() assert X assert struct.unpack('d' * 2, X.Read(array_start_idx = [0], count = [2])) == (3751290.0, 3751230.0) Y = dims[1].GetIndexingVariable() assert Y assert struct.unpack('d' * 2, Y.Read(array_start_idx = [0], count = [2])) == (440750.0, 440810.0) ############################################################################### # Test reading GDAL SDS 3D def test_hdf4multidim_gdal_sds_3d(): ds = gdal.OpenEx('data/byte_3.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() is None assert rg.OpenGroup('scientific_datasets') is None assert rg.GetMDArrayNames() == ['3-dimensional Scientific Dataset', 'X', 'Y'] dims = rg.GetDimensions() assert len(dims) == 3 array = rg.OpenMDArray('3-dimensional Scientific Dataset') assert array dims = array.GetDimensions() assert len(dims) == 3 assert dims[0].GetFullName() == '/Y' assert dims[1].GetFullName() == '/X' assert dims[2].GetFullName() == '/Band' assert array.GetDataType().GetNumericDataType() == gdal.GDT_Byte got_data = array.Read(array_start_idx = [0, 0, 0], count = [2, 2, 1]) assert len(got_data) == 2 * 2 assert struct.unpack('B' * 4, got_data) == (107, 123, 115, 132) assert array.GetSpatialRef() X = dims[0].GetIndexingVariable() assert X assert struct.unpack('d' * 2, X.Read(array_start_idx = [0], count = [2])) == (3751290.0, 3751230.0) assert rg.OpenMDArray('X') Y = dims[1].GetIndexingVariable() assert Y assert struct.unpack('d' * 2, Y.Read(array_start_idx = [0], count = [2])) == (440750.0, 440810.0) assert rg.OpenMDArray('Y') ############################################################################### # Test reading a simple SDS product def test_hdf4multidim_sds(): # Generated with # https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/mfhdf/examples/SD_create_sds.c # + https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/mfhdf/examples/SD_set_get_dim_info.c # + https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/mfhdf/examples/SD_set_attr.c ds = gdal.OpenEx('data/SDS.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['scientific_datasets'] subg = rg.OpenGroup('scientific_datasets') assert subg attrs = rg.GetAttributes() assert len(attrs) == 1 assert attrs[0].GetName() == 'File_contents' assert attrs[0].Read() == 'Storm_track_data' assert not rg.OpenGroup('foo') assert not rg.GetMDArrayNames() assert not rg.OpenMDArray('foo') assert not subg.GetGroupNames() assert not subg.OpenGroup('foo') assert subg.GetMDArrayNames() == ['SDStemplate', 'Y_Axis', 'X_Axis'] dims = subg.GetDimensions() assert len(dims) == 2 array = subg.OpenMDArray('SDStemplate') assert array dims = array.GetDimensions() assert len(dims) == 2 assert dims[0].GetFullName() == '/scientific_datasets/Y_Axis' assert dims[0].GetIndexingVariable() assert dims[1].GetFullName() == '/scientific_datasets/X_Axis' assert dims[1].GetIndexingVariable() attrs = array.GetAttributes() assert len(attrs) == 1 assert attrs[0].GetName() == 'Valid_range' attr = array.GetAttribute('Valid_range') assert attr assert attr.Read() == (2, 10) assert array.GetUnit() == '' assert not array.GetSpatialRef() ############################################################################### # Test reading a SDS product with unlimited dimension def test_hdf4multidim_sds_unlimited_dim(): # Generated with # hhttps://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/mfhdf/examples/SD_unlimited_sds.c ds = gdal.OpenEx('data/SDSUNLIMITED.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['scientific_datasets'] subg = rg.OpenGroup('scientific_datasets') assert subg dims = subg.GetDimensions() assert len(dims) == 2 assert dims[0].GetName() == 'fakeDim0' assert dims[0].GetSize() == 11 array = subg.OpenMDArray('AppendableData') dims = array.GetDimensions() assert len(dims) == 2 assert dims[0].GetName() == 'fakeDim0' assert dims[0].GetSize() == 11 assert len(array.Read()) == 11 * 10 * 4 ############################################################################### # Test reading a 'random' SDS product def test_hdf4multidim_sds_read_world(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/A2004259075000.L2_LAC_SST.hdf', 'A2004259075000.L2_LAC_SST.hdf'): pytest.skip() ds = gdal.OpenEx('tmp/cache/A2004259075000.L2_LAC_SST.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['scientific_datasets'] subg = rg.OpenGroup('scientific_datasets') assert subg assert not rg.OpenGroup('foo') assert not rg.GetMDArrayNames() assert not rg.OpenMDArray('foo') assert not subg.GetGroupNames() assert not subg.OpenGroup('foo') assert subg.GetMDArrayNames() == ['sst'] dims = subg.GetDimensions() assert len(dims) == 2 sst = subg.OpenMDArray('sst') assert sst dims = sst.GetDimensions() assert len(dims) == 2 assert dims[0].GetFullName() == '/scientific_datasets/fakeDim0' assert dims[1].GetFullName() == '/scientific_datasets/fakeDim1' attrs = sst.GetAttributes() assert len(attrs) == 5 attr = sst.GetAttribute('long_name') assert attr assert attr.Read() == 'Sea Surface Temperature' assert sst.GetUnit() == 'degrees-C' assert not sst.GetSpatialRef() ############################################################################### # Test reading a SDS product with indexed dimensions def test_hdf4multidim_sds_read_world_with_indexing_variable(): if not gdaltest.download_file('https://download.osgeo.org/gdal/data/hdf4/REANALYSIS_1999217.hdf', 'REANALYSIS_1999217.hdf'): pytest.skip() ds = gdal.OpenEx('tmp/cache/REANALYSIS_1999217.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['scientific_datasets'] subg = rg.OpenGroup('scientific_datasets') assert subg dims = subg.GetDimensions() assert len(dims) == 3 assert dims[0].GetFullName() == '/scientific_datasets/lat' assert dims[0].GetIndexingVariable() assert dims[1].GetFullName() == '/scientific_datasets/lon' assert dims[1].GetIndexingVariable() assert dims[2].GetFullName() == '/scientific_datasets/time' assert not dims[2].GetIndexingVariable() assert subg.GetMDArrayNames() == ['lat', 'lon', 'slp', 'pr_wtr', 'air'] slp = subg.OpenMDArray('slp') assert slp assert slp.GetUnit() == 'Pascals' assert slp.GetOffset() == 119765.0 assert slp.GetScale() == 1.0 ############################################################################### # Test reading a GR dataset def test_hdf4multidim_gr(): # Generated by https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/hdf/examples/GR_create_and_write_image.c ds = gdal.OpenEx('data/General_RImages.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['general_rasters'] subg = rg.OpenGroup('general_rasters') assert subg attrs = subg.GetAttributes() assert len(attrs) == 2 attr = subg.GetAttribute('File Attribute 1') assert attr.Read() == 'Contents of First FILE Attribute' assert not subg.GetGroupNames() assert not subg.OpenGroup('foo') assert subg.GetMDArrayNames() == ['Image Array 1'] array = subg.OpenMDArray('Image Array 1') assert not subg.OpenMDArray('foo') dims = array.GetDimensions() assert len(dims) == 3 assert dims[0].GetName() == 'y' assert dims[0].GetSize() == 10 assert dims[1].GetName() == 'x' assert dims[1].GetSize() == 5 assert dims[2].GetName() == 'bands' assert dims[2].GetSize() == 2 got_data = array.Read(array_start_idx = [1, 2, 0], count = [3, 2, 2]) assert len(got_data) == 3 * 2 * 2 * 2 assert struct.unpack('h' * 12, got_data) == (4, 5, 5, 6, 6, 7, 5, 6, 6, 7, 7, 8) got_data = array.Read(array_start_idx = [1, 2, 0], count = [3, 2, 1]) assert len(got_data) == 3 * 2 * 1 * 2 assert struct.unpack('h' * 6, got_data) == (4, 5, 6, 5, 6, 7) got_data = array.Read(array_start_idx = [1, 2, 1], count = [3, 2, 1]) assert len(got_data) == 3 * 2 * 1 * 2 assert struct.unpack('h' * 6, got_data) == (5, 6, 7, 6, 7, 8) got_data = array.Read(array_start_idx = [1, 2, 1], count = [3, 2, 2], array_step = [1, 1, -1]) assert len(got_data) == 3 * 2 * 2 * 2 assert struct.unpack('h' * 12, got_data) == (5, 4, 6, 5, 7, 6, 6, 5, 7, 6, 8, 7) attrs = array.GetAttributes() assert len(attrs) == 2 attr = array.GetAttribute('Image Attribute 1') assert attr.Read() == "Contents of IMAGE's First Attribute" attr = array.GetAttribute('Image Attribute 2') assert attr.Read() == (1, 2, 3, 4, 5, 6) ############################################################################### # Test reading a GR dataset with a palette def test_hdf4multidim_gr_palette(): # Generated by https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/hdf/examples/GR_write_palette.c def get_lut(): ds = gdal.OpenEx('data/Image_with_Palette.hdf', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['general_rasters'] subg = rg.OpenGroup('general_rasters') array = subg.OpenMDArray('Image with Palette') assert array lut = array.GetAttribute('lut') return lut lut = get_lut() assert lut got = lut.Read() assert len(got) == 3 * 256 assert got[0] == 0 assert got[1] == 1 assert got[2] == 2 assert got[255 * 3 + 0] == 255 assert got[255 * 3 + 1] == 0 assert got[255 * 3 + 2] == 1 gdalautotest-3.1.2/gcore/basic_test.py0000775000175000017500000004352013701057754016504 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: basic_test.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic GDAL open # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import subprocess import sys import gdaltest from osgeo import gdal import pytest # Nothing exciting here. Just trying to open non existing files, # or empty names, or files that are not valid datasets... def matches_non_existing_error_msg(msg): m1 = "does not exist in the file system, and is not recognized as a supported dataset name." in msg m2 = 'No such file or directory' in msg m3 = 'Permission denied' in msg return m1 or m2 or m3 def test_basic_test_1(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('non_existing_ds', gdal.GA_ReadOnly) gdal.PopErrorHandler() if ds is None and matches_non_existing_error_msg(gdal.GetLastErrorMsg()): return pytest.fail('did not get expected error message, got %s' % gdal.GetLastErrorMsg()) def test_basic_test_strace_non_existing_file(): if not sys.platform.startswith('linux'): pytest.skip() python_exe = sys.executable cmd = "strace -f %s -c \"from osgeo import gdal; " % python_exe + ( "gdal.OpenEx('non_existing_ds', gdal.OF_RASTER)" " \" ") try: (_, err) = gdaltest.runexternal_out_and_err(cmd) except Exception: # strace not available pytest.skip() interesting_lines = [] for line in err.split('\n'): if 'non_existing_ds' in line: interesting_lines += [ line ] # Only 3 calls on the file are legit: open(), stat() and readlink() assert len(interesting_lines) <= 3, 'too many system calls accessing file' def test_basic_test_2(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('non_existing_ds', gdal.GA_Update) gdal.PopErrorHandler() if ds is None and matches_non_existing_error_msg(gdal.GetLastErrorMsg()): return pytest.fail('did not get expected error message, got %s' % gdal.GetLastErrorMsg()) def test_basic_test_3(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('', gdal.GA_ReadOnly) gdal.PopErrorHandler() if ds is None and matches_non_existing_error_msg(gdal.GetLastErrorMsg()): return pytest.fail('did not get expected error message, got %s' % gdal.GetLastErrorMsg()) def test_basic_test_4(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('', gdal.GA_Update) gdal.PopErrorHandler() if ds is None and matches_non_existing_error_msg(gdal.GetLastErrorMsg()): return pytest.fail('did not get expected error message, got %s' % gdal.GetLastErrorMsg()) def test_basic_test_5(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/doctype.xml', gdal.GA_ReadOnly) gdal.PopErrorHandler() last_error = gdal.GetLastErrorMsg() expected = '`data/doctype.xml\' not recognized as a supported file format' if ds is None and expected in last_error: return pytest.fail() ############################################################################### # Issue several AllRegister() to check that GDAL drivers are good citizens def test_basic_test_6(): gdal.AllRegister() gdal.AllRegister() gdal.AllRegister() ############################################################################### # Test fix for #3077 (check that errors are cleared when using UseExceptions()) def basic_test_7_internal(): with pytest.raises(Exception): gdal.Open('non_existing_ds', gdal.GA_ReadOnly) # Special case: we should still be able to get the error message # until we call a new GDAL function assert matches_non_existing_error_msg(gdal.GetLastErrorMsg()), ('did not get expected error message, got %s' % gdal.GetLastErrorMsg()) # Special case: we should still be able to get the error message # until we call a new GDAL function assert matches_non_existing_error_msg(gdal.GetLastErrorMsg()), 'did not get expected error message, got %s' % gdal.GetLastErrorMsg() assert gdal.GetLastErrorType() != 0, 'did not get expected error type' # Should issue an implicit CPLErrorReset() gdal.GetCacheMax() assert gdal.GetLastErrorType() == 0, 'got unexpected error type' def test_basic_test_7(): old_use_exceptions_status = gdal.GetUseExceptions() gdal.UseExceptions() ret = basic_test_7_internal() if old_use_exceptions_status == 0: gdal.DontUseExceptions() return ret ############################################################################### # Test gdal.VersionInfo('RELEASE_DATE') and gdal.VersionInfo('LICENSE') def test_basic_test_8(): ret = gdal.VersionInfo('RELEASE_DATE') assert len(ret) == 8 python_exe = sys.executable if sys.platform == 'win32': python_exe = python_exe.replace('\\', '/') license_text = gdal.VersionInfo('LICENSE') assert ( license_text.startswith('GDAL/OGR is released under the MIT/X license') or 'GDAL/OGR Licensing' in license_text ) # Use a subprocess to avoid the cached license text env = os.environ.copy() env['GDAL_DATA'] = 'tmp' with open('tmp/LICENSE.TXT', 'wt') as f: f.write('fake_license') license_text = subprocess.check_output( [sys.executable, 'basic_test_subprocess.py'], env=env ).decode('utf-8') os.unlink('tmp/LICENSE.TXT') assert ( license_text.startswith(u'fake_license') ) ############################################################################### # Test gdal.PushErrorHandler() with a Python error handler def my_python_error_handler(eErrClass, err_no, msg): gdaltest.eErrClass = eErrClass gdaltest.err_no = err_no gdaltest.msg = msg def test_basic_test_9(): gdaltest.eErrClass = 0 gdaltest.err_no = 0 gdaltest.msg = '' gdal.PushErrorHandler(my_python_error_handler) gdal.Error(1, 2, 'test') gdal.PopErrorHandler() assert gdaltest.eErrClass == 1 assert gdaltest.err_no == 2 assert gdaltest.msg == 'test' ############################################################################### # Test gdal.PushErrorHandler() with a Python error handler as a method (#5186) class my_python_error_handler_class(object): def __init__(self): self.eErrClass = None self.err_no = None self.msg = None def handler(self, eErrClass, err_no, msg): self.eErrClass = eErrClass self.err_no = err_no self.msg = msg def test_basic_test_10(): # Check that reference counting works OK gdal.PushErrorHandler(my_python_error_handler_class().handler) gdal.Error(1, 2, 'test') gdal.PopErrorHandler() error_handler = my_python_error_handler_class() gdal.PushErrorHandler(error_handler.handler) gdal.Error(1, 2, 'test') gdal.PopErrorHandler() assert error_handler.eErrClass == 1 assert error_handler.err_no == 2 assert error_handler.msg == 'test' ############################################################################### # Test gdal.OpenEx() def test_basic_test_11(): ds = gdal.OpenEx('data/byte.tif') assert ds is not None ds = gdal.OpenEx('data/byte.tif', gdal.OF_RASTER) assert ds is not None ds = gdal.OpenEx('data/byte.tif', gdal.OF_VECTOR) assert ds is None ds = gdal.OpenEx('data/byte.tif', gdal.OF_RASTER | gdal.OF_VECTOR) assert ds is not None ds = gdal.OpenEx('data/byte.tif', gdal.OF_ALL) assert ds is not None ds = gdal.OpenEx('data/byte.tif', gdal.OF_UPDATE) assert ds is not None ds = gdal.OpenEx('data/byte.tif', gdal.OF_RASTER | gdal.OF_VECTOR | gdal.OF_UPDATE | gdal.OF_VERBOSE_ERROR) assert ds is not None ds = gdal.OpenEx('data/byte.tif', allowed_drivers=[]) assert ds is not None ds = gdal.OpenEx('data/byte.tif', allowed_drivers=['GTiff']) assert ds is not None ds = gdal.OpenEx('data/byte.tif', allowed_drivers=['PNG']) assert ds is None with gdaltest.error_handler(): ds = gdal.OpenEx('data/byte.tif', open_options=['FOO']) assert ds is not None ar_ds = [gdal.OpenEx('data/byte.tif', gdal.OF_SHARED) for _ in range(1024)] assert ar_ds[1023] is not None ar_ds = None ds = gdal.OpenEx('../ogr/data/poly.shp', gdal.OF_RASTER) assert ds is None ds = gdal.OpenEx('../ogr/data/poly.shp', gdal.OF_VECTOR) assert ds is not None assert ds.GetLayerCount() == 1 assert ds.GetLayer(0) is not None ds.GetLayer(0).GetMetadata() ds = gdal.OpenEx('../ogr/data/poly.shp', allowed_drivers=['ESRI Shapefile']) assert ds is not None ds = gdal.OpenEx('../ogr/data/poly.shp', gdal.OF_RASTER | gdal.OF_VECTOR) assert ds is not None ds = gdal.OpenEx('non existing') assert ds is None and gdal.GetLastErrorMsg() == '' gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.OpenEx('non existing', gdal.OF_VERBOSE_ERROR) gdal.PopErrorHandler() assert ds is None and gdal.GetLastErrorMsg() != '' old_use_exceptions_status = gdal.GetUseExceptions() gdal.UseExceptions() got_exception = False try: ds = gdal.OpenEx('non existing') except RuntimeError: got_exception = True if old_use_exceptions_status == 0: gdal.DontUseExceptions() assert got_exception ############################################################################### # Test GDAL layer API def test_basic_test_12(): ds = gdal.GetDriverByName('MEMORY').Create('bar', 0, 0, 0) assert ds.GetDescription() == 'bar' lyr = ds.CreateLayer("foo") assert lyr is not None assert lyr.GetDescription() == 'foo' from osgeo import ogr assert lyr.TestCapability(ogr.OLCCreateField) == 1 assert ds.GetLayerCount() == 1 lyr = ds.GetLayerByName("foo") assert lyr is not None lyr = ds.GetLayerByIndex(0) assert lyr is not None lyr = ds.GetLayer(0) assert lyr is not None sql_lyr = ds.ExecuteSQL('SELECT * FROM foo') assert sql_lyr is not None ds.ReleaseResultSet(sql_lyr) new_lyr = ds.CopyLayer(lyr, 'bar') assert new_lyr is not None assert ds.DeleteLayer(0) == 0 assert ds.DeleteLayer('bar') == 0 ds.SetStyleTable(ds.GetStyleTable()) ds = None ############################################################################### # Test correct sorting of StringList / metadata (#5540, #5557) def test_basic_test_13(): ds = gdal.GetDriverByName('MEM').Create('', 1, 1) for i in range(3): if i == 0: ds.SetMetadataItem("ScaleBounds", "True") ds.SetMetadataItem("ScaleBounds.MinScale", "0") ds.SetMetadataItem("ScaleBounds.MaxScale", "2000000") elif i == 1: ds.SetMetadataItem("ScaleBounds.MaxScale", "2000000") ds.SetMetadataItem("ScaleBounds.MinScale", "0") ds.SetMetadataItem("ScaleBounds", "True") else: ds.SetMetadataItem("ScaleBounds.MinScale", "0") ds.SetMetadataItem("ScaleBounds", "True") ds.SetMetadataItem("ScaleBounds.MaxScale", "2000000") assert ds.GetMetadataItem('scalebounds') == 'True' assert ds.GetMetadataItem('ScaleBounds') == 'True' assert ds.GetMetadataItem('SCALEBOUNDS') == 'True' assert ds.GetMetadataItem('ScaleBounds.MinScale') == '0' assert ds.GetMetadataItem('ScaleBounds.MaxScale') == '2000000' ds = None ds = gdal.GetDriverByName('MEM').Create('', 1, 1) for i in range(200): ds.SetMetadataItem("FILENAME_%d" % i, "%d" % i) for i in range(200): assert ds.GetMetadataItem("FILENAME_%d" % i) == '%d' % i ############################################################################### # Test SetMetadata() def test_basic_test_14(): ds = gdal.GetDriverByName('MEM').Create('', 1, 1) ds.SetMetadata('foo') assert ds.GetMetadata_List() == ['foo'] with pytest.raises(Exception): ds.SetMetadata(5) ds.SetMetadata(['foo=bar']) assert ds.GetMetadata_List() == ['foo=bar'] with pytest.raises(Exception): ds.SetMetadata([5]) ds.SetMetadata({'foo': 'baz'}) assert ds.GetMetadata_List() == ['foo=baz'] with pytest.raises(Exception): ds.SetMetadata({'foo': 5}) with pytest.raises(Exception): ds.SetMetadata({5: 'baz'}) with pytest.raises(Exception): ds.SetMetadata({5: 6}) if sys.version_info >= (3, 0, 0): val = '\u00e9ven' else: exec("val = u'\\u00e9ven'") ds.SetMetadata({'bar': val}) assert ds.GetMetadata()['bar'] == val ds.SetMetadata({val: 'baz'}) assert ds.GetMetadata()[val] == 'baz' with pytest.raises(Exception): ds.SetMetadata({val: 5}) with pytest.raises(Exception): ds.SetMetadata({5: val}) ############################################################################### # Test errors with progress callback def basic_test_15_cbk_no_argument(): return None def basic_test_15_cbk_no_ret(a, b, c): # pylint: disable=unused-argument return None def basic_test_15_cbk_bad_ret(a, b, c): # pylint: disable=unused-argument return 'ok' def test_basic_test_15(): mem_driver = gdal.GetDriverByName('MEM') with pytest.raises(Exception): with gdaltest.error_handler(): gdal.GetDriverByName('MEM').CreateCopy('', gdal.GetDriverByName('MEM').Create('', 1, 1), callback='foo') with gdaltest.error_handler(): ds = mem_driver.CreateCopy('', mem_driver.Create('', 1, 1), callback=basic_test_15_cbk_no_argument) assert ds is None with gdaltest.error_handler(): ds = mem_driver.CreateCopy('', mem_driver.Create('', 1, 1), callback=basic_test_15_cbk_no_ret) assert ds is not None with gdaltest.error_handler(): ds = mem_driver.CreateCopy('', mem_driver.Create('', 1, 1), callback=basic_test_15_cbk_bad_ret) assert ds is None ############################################################################### # Test unrecognized and recognized open options prefixed by @ def test_basic_test_16(): gdal.ErrorReset() gdal.OpenEx('data/byte.tif', open_options=['@UNRECOGNIZED=FOO']) assert gdal.GetLastErrorMsg() == '' gdal.ErrorReset() gdal.Translate('/vsimem/temp.tif', 'data/byte.tif', options='-co BLOCKYSIZE=10') with gdaltest.error_handler(): gdal.OpenEx('/vsimem/temp.tif', gdal.OF_UPDATE, open_options=['@NUM_THREADS=INVALID']) gdal.Unlink('/vsimem/temp.tif') assert gdal.GetLastErrorMsg() == 'Invalid value for NUM_THREADS: INVALID' ############################################################################### # Test mix of gdal/ogr.UseExceptions()/DontUseExceptions() def test_basic_test_17(): from osgeo import ogr for _ in range(2): ogr.UseExceptions() gdal.UseExceptions() try: gdal.Open('do_not_exist') except RuntimeError: pass gdal.DontUseExceptions() ogr.DontUseExceptions() assert not gdal.GetUseExceptions() assert not ogr.GetUseExceptions() for _ in range(2): ogr.UseExceptions() gdal.UseExceptions() try: gdal.Open('do_not_exist') except RuntimeError: pass flag = False try: ogr.DontUseExceptions() gdal.DontUseExceptions() flag = True except: gdal.DontUseExceptions() ogr.DontUseExceptions() assert not flag, 'expected failure' assert not gdal.GetUseExceptions() assert not ogr.GetUseExceptions() def test_gdal_getspatialref(): ds = gdal.Open('data/byte.tif') assert ds.GetSpatialRef() is not None ds = gdal.Open('data/minfloat.tif') assert ds.GetSpatialRef() is None def test_gdal_setspatialref(): ds = gdal.Open('data/byte.tif') sr = ds.GetSpatialRef() ds = gdal.GetDriverByName('MEM').Create('',1,1) ds.SetSpatialRef(sr) sr_got = ds.GetSpatialRef() assert sr_got assert sr_got.IsSame(sr) def test_gdal_getgcpspatialref(): ds = gdal.Open('data/byte.tif') assert ds.GetGCPSpatialRef() is None ds = gdal.Open('data/byte_gcp.tif') assert ds.GetGCPSpatialRef() is not None def test_gdal_setgcpspatialref(): ds = gdal.Open('data/byte.tif') sr = ds.GetSpatialRef() ds = gdal.GetDriverByName('MEM').Create('',1,1) gcp = gdal.GCP() gcp.GCPPixel = 0 gcp.GCPLine = 0 gcp.GCPX = 440720.000 gcp.GCPY = 3751320.000 ds.SetGCPs([gcp], sr) sr_got = ds.GetGCPSpatialRef() assert sr_got assert sr_got.IsSame(sr) gdalautotest-3.1.2/gcore/colortable.py0000775000175000017500000000622413701057754016512 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: colortable.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test functioning of the GDALColorTable. Mostly this tests # the python binding. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal import pytest ############################################################################### # Create a color table. def test_colortable_1(): gdaltest.test_ct_data = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 255, 0)] gdaltest.test_ct = gdal.ColorTable() for i in range(len(gdaltest.test_ct_data)): gdaltest.test_ct.SetColorEntry(i, gdaltest.test_ct_data[i]) ############################################################################### # verify contents. def test_colortable_2(): for i in range(len(gdaltest.test_ct_data)): g_data = gdaltest.test_ct.GetColorEntry(i) o_data = gdaltest.test_ct_data[i] for j in range(4): if len(o_data) <= j: o_v = 255 else: o_v = o_data[j] assert g_data[j] == o_v, 'color table mismatch' ############################################################################### # Test CreateColorRamp() def test_colortable_3(): ct = gdal.ColorTable() try: ct.CreateColorRamp except AttributeError: pytest.skip() ct.CreateColorRamp(0, (255, 0, 0), 255, (0, 0, 255)) assert ct.GetColorEntry(0) == (255, 0, 0, 255) assert ct.GetColorEntry(255) == (0, 0, 255, 255) ############################################################################### # Cleanup. def test_colortable_cleanup(): gdaltest.test_ct = None gdalautotest-3.1.2/gcore/gtiff_write.py0000775000175000017500000000465213701057754016700 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: gtiff_write.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for GTiff driver. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest init_list = [ ('byte.tif', 4672), ('int16.tif', 4672), ('uint16.tif', 4672), ('int32.tif', 4672), ('uint32.tif', 4672), ('float32.tif', 4672), ('float64.tif', 4672), ('cint16.tif', 5028), ('cint32.tif', 5028), ('cfloat32.tif', 5028), ('cfloat64.tif', 5028)] # Some tests we don't need to do for each type. @pytest.mark.parametrize( 'testfunction', [ 'testSetGeoTransform', 'testSetProjection', 'testSetMetadata', ] ) @pytest.mark.require_driver('GTiff') def test_gtiff_set(testfunction): ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672) getattr(ut, testfunction)() # Others we do for each pixel type. @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.parametrize( 'testfunction', [ 'testCreateCopy', 'testCreate', 'testSetNoDataValue', ] ) @pytest.mark.require_driver('GTiff') def test_gtiff_create(filename, checksum, testfunction): ut = gdaltest.GDALTest('GTiff', filename, 1, checksum) getattr(ut, testfunction)() gdalautotest-3.1.2/gcore/vsiswift.py0000775000175000017500000006640513701057754016251 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: vsiswift.py a68b4b9092dd4a42d8dcf77dabaacf23029e39c2 2020-02-14 10:00:34 +0100 Jiri Drbalek $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsiswift # Author: Even Rouault # ############################################################################### # Copyright (c) 2018 Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import stat import sys from osgeo import gdal import gdaltest import webserver import pytest import json def open_for_read(uri): """ Opens a test file for reading. """ return gdal.VSIFOpenExL(uri, 'rb', 1) ############################################################################### def test_vsiswift_init(): gdaltest.swift_vars = {} for var in ('SWIFT_STORAGE_URL', 'SWIFT_AUTH_TOKEN', 'SWIFT_AUTH_V1_URL', 'SWIFT_USER', 'SWIFT_KEY'): gdaltest.swift_vars[var] = gdal.GetConfigOption(var) if gdaltest.swift_vars[var] is not None: gdal.SetConfigOption(var, "") ############################################################################### # Error cases def test_vsiswift_real_server_errors(): if not gdaltest.built_against_curl(): pytest.skip() # Nothing set gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiswift/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('SWIFT_STORAGE_URL') >= 0 gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiswift_streaming/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('SWIFT_STORAGE_URL') >= 0 gdal.SetConfigOption('SWIFT_STORAGE_URL', 'http://0.0.0.0') # Missing SWIFT_AUTH_TOKEN gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiswift/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('SWIFT_AUTH_TOKEN') >= 0 gdal.SetConfigOption('SWIFT_AUTH_TOKEN', 'SWIFT_AUTH_TOKEN') gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiswift/foo/bar.baz') if f is not None: if f is not None: gdal.VSIFCloseL(f) pytest.fail(gdal.VSIGetLastErrorMsg()) gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiswift_streaming/foo/bar.baz') assert f is None, gdal.VSIGetLastErrorMsg() ############################################################################### def test_vsiswift_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() ############################################################################### # Test authentication with SWIFT_AUTH_V1_URL + SWIFT_USER + SWIFT_KEY def test_vsiswift_fake_auth_v1_url(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() gdal.SetConfigOption('SWIFT_AUTH_V1_URL', 'http://127.0.0.1:%d/auth/1.0' % gdaltest.webserver_port) gdal.SetConfigOption('SWIFT_USER', 'my_user') gdal.SetConfigOption('SWIFT_KEY', 'my_key') gdal.SetConfigOption('SWIFT_STORAGE_URL', '') gdal.SetConfigOption('SWIFT_AUTH_TOKEN', '') handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'X-Auth-User' not in h or h['X-Auth-User'] != 'my_user' or \ 'X-Auth-Key' not in h or h['X-Auth-Key'] != 'my_key': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-Length', 0) request.send_header('X-Storage-Url', 'http://127.0.0.1:%d/v1/AUTH_something' % gdaltest.webserver_port) request.send_header('X-Auth-Token', 'my_auth_token') request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/auth/1.0', custom_method=method) def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'x-auth-token' not in h or \ h['x-auth-token'] != 'my_auth_token': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/v1/AUTH_something/foo/bar', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsiswift/foo/bar') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # authentication is reused def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'x-auth-token' not in h or \ h['x-auth-token'] != 'my_auth_token': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""bar""".encode('ascii')) handler.add('GET', '/v1/AUTH_something/foo/baz', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsiswift/foo/baz') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar' ############################################################################### # Test authentication with OS_IDENTITY_API_VERSION=3 OS_AUTH_URL + OS_USERNAME + OS_PASSWORD def test_vsiswift_fake_auth_v3_url(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() gdal.SetConfigOption('OS_IDENTITY_API_VERSION', '3') gdal.SetConfigOption('OS_AUTH_URL', 'http://127.0.0.1:%d/v3' % gdaltest.webserver_port) gdal.SetConfigOption('OS_USERNAME', 'my_user') gdal.SetConfigOption('OS_USER_DOMAIN_NAME', 'test_user_domain') gdal.SetConfigOption('OS_PROJECT_NAME', 'test_proj') gdal.SetConfigOption('OS_PROJECT_DOMAIN_NAME', 'test_project_domain') gdal.SetConfigOption('OS_REGION_NAME', 'Test') gdal.SetConfigOption('OS_PASSWORD', 'pwd') gdal.SetConfigOption('SWIFT_STORAGE_URL', '') gdal.SetConfigOption('SWIFT_AUTH_TOKEN', '') handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'Content-Type' not in h or h['Content-Type'] != 'application/json': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request_len = int(h['Content-Length']) request_body = request.rfile.read(request_len).decode() request_json = json.loads(request_body) password = request_json['auth']['identity']['password']['user']['password'] assert password == 'pwd' content = """{ "token" : { "catalog" : [ { "endpoints" : [ { "region" : "Test", "url" : "http://127.0.0.1:%d/v1/AUTH_something" } ], "name" : "swift" } ] } }""" % gdaltest.webserver_port content = content.encode('ascii') request.send_response(200) request.send_header('Content-Length', len(content)) request.send_header('Content-Type', 'application/json') request.send_header('X-Subject-Token', 'my_auth_token') request.end_headers() request.wfile.write(content) handler.add('POST', '/v3/auth/tokens', custom_method=method) def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'x-auth-token' not in h or \ h['x-auth-token'] != 'my_auth_token': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write('foo'.encode('ascii')) handler.add('GET', '/v1/AUTH_something/foo/bar', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsiswift/foo/bar') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') assert data == 'foo' gdal.VSIFCloseL(f) ############################################################################### # Test authentication with SWIFT_STORAGE_URL + SWIFT_AUTH_TOKEN def test_vsiswift_fake_auth_storage_url_and_auth_token(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() gdal.SetConfigOption('SWIFT_AUTH_V1_URL', '') gdal.SetConfigOption('SWIFT_USER', '') gdal.SetConfigOption('SWIFT_KEY', '') gdal.SetConfigOption('SWIFT_STORAGE_URL', 'http://127.0.0.1:%d/v1/AUTH_something' % gdaltest.webserver_port) gdal.SetConfigOption('SWIFT_AUTH_TOKEN', 'my_auth_token') # Failure handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/bar', 501) with webserver.install_http_handler(handler): f = open_for_read('/vsiswift/foo/bar') assert f is not None gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) gdal.VSICurlClearCache() # Success def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'x-auth-token' not in h or \ h['x-auth-token'] != 'my_auth_token': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/bar', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsiswift/foo/bar') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' ############################################################################### # Test VSIStatL() def test_vsiswift_stat(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/bar', 206, {'Content-Range': 'bytes 0-0/1000000'}, 'x') with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsiswift/foo/bar') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() handler = webserver.SequentialHandler() handler.add('HEAD', '/v1/AUTH_something/foo/bar', 200, {'Content-Length': '1000000'}) with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsiswift_streaming/foo/bar') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() # Test stat on container handler = webserver.SequentialHandler() # GET on the container URL returns something, but we must hack this back # to a directory handler.add('GET', '/v1/AUTH_something/foo', 200, {}, "blabla") with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsiswift/foo') assert stat_res is not None and stat.S_ISDIR(stat_res.mode) ############################################################################### # Test ReadDir() def test_vsiswift_fake_readdir(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=1', 200, {'Content-type': 'application/json'}, """[ { "last_modified": "1970-01-01T00:00:01", "bytes": 123456, "name": "bar.baz" } ]""") handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=1&marker=bar.baz', 200, {'Content-type': 'application/json'}, """[ { "subdir": "mysubdir/" } ]""") handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=1&marker=mysubdir%2F', 200, {'Content-type': 'application/json'}, """[ ]""") with gdaltest.config_option('SWIFT_MAX_KEYS', '1'): with webserver.install_http_handler(handler): f = open_for_read('/vsiswift/foo/bar.baz') assert f is not None gdal.VSIFCloseL(f) dir_contents = gdal.ReadDir('/vsiswift/foo') assert dir_contents == ['bar.baz', 'mysubdir'] stat_res = gdal.VSIStatL('/vsiswift/foo/bar.baz') assert stat_res.size == 123456 assert stat_res.mtime == 1 # ReadDir on something known to be a file shouldn't cause network access dir_contents = gdal.ReadDir('/vsiswift/foo/bar.baz') assert dir_contents is None # Test error on ReadDir() handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000&prefix=error_test%2F', 500) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiswift/foo/error_test/') assert dir_contents is None # List containers (empty result) handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something', 200, {'Content-type': 'application/json'}, """[] """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiswift/') assert dir_contents == ['.'] # List containers gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something', 200, {'Content-type': 'application/json'}, """[ { "name": "mycontainer1", "count": 0, "bytes": 0 }, { "name": "mycontainer2", "count": 0, "bytes": 0} ] """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiswift/') assert dir_contents == ['mycontainer1', 'mycontainer2'] # ReadDir() with a file and directory of same names gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something', 200, {'Content-type': 'application/json'}, """[ { "last_modified": "1970-01-01T00:00:01", "bytes": 123456, "name": "foo" }, { "subdir": "foo/"} ] """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiswift/') assert dir_contents == ['foo', 'foo/'] handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000', 200, {'Content-type': 'application/json'}, "[]") with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiswift/foo/') assert dir_contents == ['.'] ############################################################################### # Test write def test_vsiswift_fake_write(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Test creation of BlockBob f = gdal.VSIFOpenL('/vsiswift/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): h = request.headers if 'x-auth-token' not in h or \ h['x-auth-token'] != 'my_auth_token' or \ 'Transfer-Encoding' not in h or h['Transfer-Encoding'] != 'chunked': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = '' while True: numchars = int(request.rfile.readline().strip(), 16) content += request.rfile.read(numchars).decode('ascii') request.rfile.read(2) if numchars == 0: break if len(content) != 40000: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/v1/AUTH_something/test_copy/file.bin', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL('x' * 35000, 1, 35000, f) ret += gdal.VSIFWriteL('x' * 5000, 1, 5000, f) if ret != 40000: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) ############################################################################### # Test Unlink() def test_vsiswift_fake_unlink(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Success handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/bar', 206, {'Content-Range': 'bytes 0-0/1'}, 'x') handler.add('DELETE', '/v1/AUTH_something/foo/bar', 202, {'Connection': 'close'}) with webserver.install_http_handler(handler): ret = gdal.Unlink('/vsiswift/foo/bar') assert ret == 0 # Failure handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/bar', 206, {'Content-Range': 'bytes 0-0/1'}, 'x') handler.add('DELETE', '/v1/AUTH_something/foo/bar', 400, {'Connection': 'close'}) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.Unlink('/vsiswift/foo/bar') assert ret == -1 ############################################################################### # Test Mkdir() / Rmdir() def test_vsiswift_fake_mkdir_rmdir(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Invalid name ret = gdal.Mkdir('/vsiswift', 0) assert ret != 0 handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/dir/', 404, {'Connection': 'close'}) handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000', 200, {'Connection': 'close'}, "[]") handler.add('PUT', '/v1/AUTH_something/foo/dir/', 201) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsiswift/foo/dir', 0) assert ret == 0 # Try creating already existing directory handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/dir/', 404, {'Connection': 'close'}) handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000', 200, {'Connection': 'close', 'Content-type': 'application/json'}, """[ { "subdir": "dir/" } ]""") with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsiswift/foo/dir', 0) assert ret != 0 # Invalid name ret = gdal.Rmdir('/vsiswift') assert ret != 0 gdal.VSICurlClearCache() # Not a directory handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/it_is_a_file/', 404) handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000', 200, {'Connection': 'close', 'Content-type': 'application/json'}, """[ { "name": "it_is_a_file/", "bytes": 0, "last_modified": "1970-01-01T00:00:01" } ]""") with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiswift/foo/it_is_a_file') assert ret != 0 # Valid handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/dir/', 200) handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=101&prefix=dir%2F', 200, {'Connection': 'close', 'Content-type': 'application/json'}, """[] """) handler.add('DELETE', '/v1/AUTH_something/foo/dir/', 204) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiswift/foo/dir') assert ret == 0 # Try deleting already deleted directory handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/dir/', 404) handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000', 200) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiswift/foo/dir') assert ret != 0 gdal.VSICurlClearCache() # Try deleting non-empty directory handler = webserver.SequentialHandler() handler.add('GET', '/v1/AUTH_something/foo/dir_nonempty/', 404) handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=10000', 200, {'Connection': 'close', 'Content-type': 'application/json'}, """[ { "subdir": "dir_nonempty/" } ]""") handler.add('GET', '/v1/AUTH_something/foo?delimiter=%2F&limit=101&prefix=dir_nonempty%2F', 200, {'Connection': 'close', 'Content-type': 'application/json'}, """[ { "name": "dir_nonempty/some_file", "bytes": 0, "last_modified": "1970-01-01T00:00:01" } ]""") with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiswift/foo/dir_nonempty') assert ret != 0 ############################################################################### def test_vsiswift_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Nominal cases (require valid credentials) def test_vsiswift_extra_1(): if not gdaltest.built_against_curl(): pytest.skip() swift_resource = gdal.GetConfigOption('SWIFT_RESOURCE') if swift_resource is None: pytest.skip('Missing SWIFT_RESOURCE') if '/' not in swift_resource: path = '/vsiswift/' + swift_resource statres = gdal.VSIStatL(path) assert statres is not None and stat.S_ISDIR(statres.mode), \ ('%s is not a valid bucket' % path) readdir = gdal.ReadDir(path) assert readdir is not None, 'ReadDir() should not return empty list' for filename in readdir: if filename != '.': subpath = path + '/' + filename assert gdal.VSIStatL(subpath) is not None, \ ('Stat(%s) should not return an error' % subpath) unique_id = 'vsiswift_test' subpath = path + '/' + unique_id ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id in readdir, \ ('ReadDir(%s) should contain %s' % (path, unique_id)) ret = gdal.Mkdir(subpath, 0) assert ret != 0, ('Mkdir(%s) repeated should return an error' % subpath) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id not in readdir, \ ('ReadDir(%s) should not contain %s' % (path, unique_id)) ret = gdal.Rmdir(subpath) assert ret != 0, ('Rmdir(%s) repeated should return an error' % subpath) ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'wb') assert f is not None gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) ret = gdal.Rmdir(subpath) assert ret != 0, \ ('Rmdir(%s) on non empty directory should return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) ret = gdal.Unlink(subpath + '/test.txt') assert ret >= 0, \ ('Unlink(%s) should not return an error' % (subpath + '/test.txt')) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) return f = open_for_read('/vsiswift/' + swift_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 # Same with /vsiswift_streaming/ f = open_for_read('/vsiswift_streaming/' + swift_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 # Invalid resource gdal.ErrorReset() f = open_for_read('/vsiswift_streaming/' + swift_resource + '/invalid_resource.baz') assert f is None, gdal.VSIGetLastErrorMsg() ############################################################################### def test_vsiswift_cleanup(): for var in gdaltest.swift_vars: gdal.SetConfigOption(var, gdaltest.swift_vars[var]) gdalautotest-3.1.2/gcore/hdf4_read.py0000775000175000017500000003063413701057754016206 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: hdf4_read.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for a all datatypes from a HDF file. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev # Copyright (c) 2009-2012, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest from osgeo import gdal pytestmark = pytest.mark.require_driver('HDF4') init_list = [ ('byte_3.hdf', 4672), ('int16_3.hdf', 4672), ('uint16_3.hdf', 4672), ('int32_3.hdf', 4672), ('uint32_3.hdf', 4672), ('float32_3.hdf', 4672), ('float64_3.hdf', 4672), ('utmsmall_3.hdf', 50054), ('byte_2.hdf', 4672), ('int16_2.hdf', 4672), ('uint16_2.hdf', 4672), ('int32_2.hdf', 4672), ('uint32_2.hdf', 4672), ('float32_2.hdf', 4672), ('float64_2.hdf', 4672), ('utmsmall_2.hdf', 50054)] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('HDF4Image') def test_hdf4_open(filename, checksum): ut = gdaltest.GDALTest('HDF4Image', filename, 1, checksum) ut.testOpen() ############################################################################### # Test reading a GR dataset def test_hdf4_read_gr(): # Generated by https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/hdf/examples/GR_create_and_write_image.c ds = gdal.Open('data/General_RImages.hdf') assert ds assert ds.RasterCount == 2 assert ds.GetRasterBand(1).Checksum() == 361 assert not ds.GetRasterBand(1).GetColorTable() assert ds.GetRasterBand(2).Checksum() == 400 ############################################################################### # Test reading a GR dataset with a palette def test_hdf4_read_gr_palette(): # Generated by https://support.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/hdf/examples/GR_write_palette.c ds = gdal.Open('data/Image_with_Palette.hdf') assert ds assert ds.RasterCount == 1 assert ds.GetRasterBand(1).GetColorTable() ############################################################################### # Test HDF4_SDS with single subdataset def test_hdf4_read_online_1(): gdaltest.hdf4_drv = gdal.GetDriverByName('HDF4') if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/A2004259075000.L2_LAC_SST.hdf', 'A2004259075000.L2_LAC_SST.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'tmp/cache/A2004259075000.L2_LAC_SST.hdf', 1, 28189, filename_absolute=1) return tst.testOpen() ############################################################################### # Test HDF4_SDS with GEOLOCATION info def test_hdf4_read_online_2(): if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/A2006005182000.L2_LAC_SST.x.hdf', 'A2006005182000.L2_LAC_SST.x.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'HDF4_SDS:UNKNOWN:"tmp/cache/A2006005182000.L2_LAC_SST.x.hdf":13', 1, 13209, filename_absolute=1) tst.testOpen() ds = gdal.Open('HDF4_SDS:UNKNOWN:"tmp/cache/A2006005182000.L2_LAC_SST.x.hdf":13') md = ds.GetMetadata('GEOLOCATION') ds = None assert md['X_DATASET'] == 'HDF4_SDS:UNKNOWN:"tmp/cache/A2006005182000.L2_LAC_SST.x.hdf":11', \ 'Did not get expected X_DATASET' ############################################################################### # Test HDF4_EOS:EOS_GRID def test_hdf4_read_online_3(): if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/MO36MW14.chlor_MODIS.ADD2001089.004.2002186190207.hdf', 'MO36MW14.chlor_MODIS.ADD2001089.004.2002186190207.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'tmp/cache/MO36MW14.chlor_MODIS.ADD2001089.004.2002186190207.hdf', 1, 34723, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/MO36MW14.chlor_MODIS.ADD2001089.004.2002186190207.hdf') gt = ds.GetGeoTransform() expected_gt = [-180.0, 0.3515625, 0.0, 90.0, 0.0, -0.3515625] for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-8), 'did not get expected gt' srs = ds.GetProjectionRef() assert srs.find('Clarke') != -1, 'did not get expected projection' ds = None ############################################################################### # Test HDF4_SDS:SEAWIFS_L1A def test_hdf4_read_online_4(): if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/S2002196124536.L1A_HDUN.BartonBendish.extract.hdf', 'S2002196124536.L1A_HDUN.BartonBendish.extract.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'tmp/cache/S2002196124536.L1A_HDUN.BartonBendish.extract.hdf', 1, 33112, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/S2002196124536.L1A_HDUN.BartonBendish.extract.hdf') assert ds.RasterCount == 8, 'did not get expected band number' ds = None ############################################################################### # Test fix for #2208 def test_hdf4_read_online_5(): if gdaltest.hdf4_drv is None: pytest.skip() # 13 MB if not gdaltest.download_file('ftp://data.nodc.noaa.gov/pub/data.nodc/pathfinder/Version5.0/Monthly/1991/199101.s04m1pfv50-sst-16b.hdf', '199101.s04m1pfv50-sst-16b.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'tmp/cache/199101.s04m1pfv50-sst-16b.hdf', 1, 41173, filename_absolute=1) tst.testOpen() ############################################################################### # Test fix for #3386 where block size is dataset size def test_hdf4_read_online_6(): if gdaltest.hdf4_drv is None: pytest.skip() # 1 MB if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/MOD09Q1G_EVI.A2006233.h07v03.005.2008338190308.hdf', 'MOD09Q1G_EVI.A2006233.h07v03.005.2008338190308.hdf'): pytest.skip() # Test with quoting of components tst = gdaltest.GDALTest('HDF4Image', 'HDF4_EOS:EOS_GRID:"tmp/cache/MOD09Q1G_EVI.A2006233.h07v03.005.2008338190308.hdf":"MODIS_NACP_EVI":"MODIS_EVI"', 1, 12197, filename_absolute=1) tst.testOpen() ds = gdal.Open('HDF4_EOS:EOS_GRID:tmp/cache/MOD09Q1G_EVI.A2006233.h07v03.005.2008338190308.hdf:MODIS_NACP_EVI:MODIS_EVI') if 'GetBlockSize' in dir(gdal.Band): (blockx, blocky) = ds.GetRasterBand(1).GetBlockSize() assert blockx == 4800 and blocky == 4800, "Did not get expected block size" cs = ds.GetRasterBand(1).Checksum() assert cs == 12197, 'did not get expected checksum' ds = None ############################################################################### # Test fix for #3386 where block size is smaller than dataset size def test_hdf4_read_online_7(): if gdaltest.hdf4_drv is None: pytest.skip() # 4 MB if not gdaltest.download_file('http://download.osgeo.org/gdal/data/hdf4/MOD09A1.A2010041.h06v03.005.2010051001103.hdf', 'MOD09A1.A2010041.h06v03.005.2010051001103.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'HDF4_EOS:EOS_GRID:tmp/cache/MOD09A1.A2010041.h06v03.005.2010051001103.hdf:MOD_Grid_500m_Surface_Reflectance:sur_refl_b01', 1, 54894, filename_absolute=1) tst.testOpen() ds = gdal.Open('HDF4_EOS:EOS_GRID:tmp/cache/MOD09A1.A2010041.h06v03.005.2010051001103.hdf:MOD_Grid_500m_Surface_Reflectance:sur_refl_b01') if 'GetBlockSize' in dir(gdal.Band): (blockx, blocky) = ds.GetRasterBand(1).GetBlockSize() assert blockx == 2400 and blocky == 32, "Did not get expected block size" cs = ds.GetRasterBand(1).Checksum() assert cs == 54894, 'did not get expected checksum' ds = None ############################################################################### # Test reading a HDF4_EOS:EOS_GRID where preferred block height reported would be 1 # but that will lead to very poor performance (#3386) def test_hdf4_read_online_8(): if gdaltest.hdf4_drv is None: pytest.skip() # 5 MB if not gdaltest.download_file('https://e4ftl01.cr.usgs.gov/MOLT/MOD13Q1.006/2006.06.10/MOD13Q1.A2006161.h34v09.006.2015161173716.hdf', 'MOD13Q1.A2006161.h34v09.006.2015161173716.hdf'): pytest.skip() tst = gdaltest.GDALTest('HDF4Image', 'HDF4_EOS:EOS_GRID:tmp/cache/MOD13Q1.A2006161.h34v09.006.2015161173716.hdf:MODIS_Grid_16DAY_250m_500m_VI:250m 16 days NDVI', 1, 44174, filename_absolute=1) tst.testOpen() ds = gdal.Open('HDF4_EOS:EOS_GRID:tmp/cache/MOD13Q1.A2006161.h34v09.006.2015161173716.hdf:MODIS_Grid_16DAY_250m_500m_VI:250m 16 days NDVI') cs = ds.GetRasterBand(1).Checksum() assert cs == 44174, 'did not get expected checksum' if 'GetBlockSize' in dir(gdal.Band): (blockx, blocky) = ds.GetRasterBand(1).GetBlockSize() if blockx != 4800 or blocky == 1: print('blockx=%d, blocky=%d' % (blockx, blocky)) pytest.fail("Did not get expected block size") ds = None ############################################################################### # Test reading L1G MTL metadata metadata def test_hdf4_read_online_9(): if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('http://www.geogratis.cgdi.gc.ca/download/landsat_7/hdf/L71002025_02520010722/L71002025_02520010722_MTL.L1G', 'L71002025_02520010722_MTL.L1G'): pytest.skip() if not gdaltest.download_file('http://www.geogratis.cgdi.gc.ca/download/landsat_7/hdf/L71002025_02520010722/L71002025_02520010722_HDF.L1G', 'L71002025_02520010722_HDF.L1G'): pytest.skip() f = open('tmp/cache/L71002025_02520010722_B10.L1G', 'wb') f.close() ds = gdal.Open('HDF4_SDS:UNKNOWN:"tmp/cache/L71002025_02520010722_HDF.L1G":0') gcp_count = ds.GetGCPCount() ds = None assert gcp_count == 4, 'did not get expected gcp count' ############################################################################### # Test that non-tiled access works (#4672) def test_hdf4_read_online_10(): if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('http://trac.osgeo.org/gdal/raw-attachment/ticket/4672/MOD16A2.A2000M01.h14v02.105.2010357183410.hdf', 'MOD16A2.A2000M01.h14v02.105.2010357183410.hdf'): pytest.skip() ds = gdal.Open('HDF4_EOS:EOS_GRID:"tmp/cache/MOD16A2.A2000M01.h14v02.105.2010357183410.hdf":MOD_Grid_MOD16A2:ET_1km') if 'GetBlockSize' in dir(gdal.Band): (blockx, blocky) = ds.GetRasterBand(1).GetBlockSize() assert blockx == 1200 and blocky == 833, "Did not get expected block size" cs = ds.GetRasterBand(1).Checksum() assert cs == 20976, 'did not get expected checksum' ds = None ############################################################################### # Test reading HDFEOS SWATH projducts def test_hdf4_read_online_11(): if gdaltest.hdf4_drv is None: pytest.skip() if not gdaltest.download_file('https://gamma.hdfgroup.org/ftp/pub/outgoing/NASAHDFfiles2/eosweb/hdf4/hdfeos2-swath-wo-dimmaps/AMSR_E_L2_Ocean_B01_200206182340_A.hdf', 'AMSR_E_L2_Ocean_B01_200206182340_A.hdf'): pytest.skip() ds = gdal.Open('HDF4_EOS:EOS_SWATH:"tmp/cache/AMSR_E_L2_Ocean_B01_200206182340_A.hdf":Swath1:Ocean_products_quality_flag') cs = ds.GetRasterBand(1).Checksum() assert cs == 7809, 'did not get expected checksum' gdalautotest-3.1.2/gcore/pixfun.py0000775000175000017500000005637013701057754015704 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: pixfun.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test pixel functions support. # Author: Antonio Valentino # ############################################################################### # Copyright (c) 2010-2014, Antonio Valentino # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest try: import numpy numpy_available = True except ImportError: numpy_available = False from osgeo import gdal ############################################################################### # Verify real part extraction from a complex dataset. def test_pixfun_real_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_real_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata.real) ############################################################################### # Verify real part extraction from a complex dataset. def test_pixfun_real_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_real_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/int32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata.real) ############################################################################### # Verify imaginary part extraction from a complex dataset. def test_pixfun_imag_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_imag_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata.imag) # Test bugfix of #6599 copied_ds = gdal.Translate('', filename, format='MEM') data_ds = copied_ds.GetRasterBand(1).ReadAsArray() copied_ds = None assert numpy.alltrue(data == data_ds) ############################################################################### # Verify imaginary part extraction from a real dataset. def test_pixfun_imag_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_imag_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == 0) ############################################################################### # Verify imaginary part extraction from a real dataset. def test_pixfun_complex(): if not numpy_available: pytest.skip() filename = 'data/pixfun_complex.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/int32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.allclose(data, refdata + 1j * refdata) ############################################################################### # Verify modulus extraction from a complex (float) dataset. def test_pixfun_mod_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_mod_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.abs(refdata)) ############################################################################### # Verify modulus extraction from a real (integer type) dataset. def test_pixfun_mod_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_mod_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/int32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.abs(refdata)) ############################################################################### # Verify phase extraction from a complex dataset. def test_pixfun_phase_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_phase_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() refdata = refdata.astype('complex128') assert numpy.allclose(data, numpy.arctan2(refdata.imag, refdata.real)) ############################################################################### # Verify phase extraction from a real dataset. def test_pixfun_phase_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_phase_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/pixfun_imag_c.vrt' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.arctan2(0, refdata)) ############################################################################### # Verify cmplex conjugare computation on a complex dataset. def test_pixfun_conj_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_conj_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.conj(refdata)) ############################################################################### # Verify cmplex conjugare computation on a real dataset. def test_pixfun_conj_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_conj_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/int32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.conj(refdata)) ############################################################################### # Verify the sum of 3 (real) datasets. def test_pixfun_sum_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_sum_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() if numpy_available: refdata = numpy.zeros(data.shape, 'float') for reffilename in ('data/uint16.tif', 'data/int32.tif', 'data/float32.tif'): refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata += refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata) ############################################################################### # Verify the sum of 3 (two complex and one real) datasets. def test_pixfun_sum_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_sum_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() if numpy_available: refdata = numpy.zeros(data.shape, 'complex') for reffilename in ('data/uint16.tif', 'data/cint_sar.tif', 'data/cfloat64.tif'): refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata += refds.GetRasterBand(1).ReadAsArray(0, 0, 5, 6) assert numpy.alltrue(data == refdata) ############################################################################### # Verify the difference of 2 (real) datasets. def test_pixfun_diff_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_diff_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/int32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata1 = refds.GetRasterBand(1).ReadAsArray(0, 0, 5, 6) reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata2 = refds.GetRasterBand(1).ReadAsArray(10, 10, 5, 6) assert numpy.alltrue(data == refdata1 - refdata2) ############################################################################### # Verify the difference of 2 (complex) datasets. def test_pixfun_diff_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_diff_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata1 = refds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cfloat64.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata2 = refds.GetRasterBand(1).ReadAsArray(0, 0, 5, 6) assert numpy.alltrue(data == refdata1 - refdata2) ############################################################################### # Verify the product of 3 (real) datasets. def test_pixfun_mul_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_mul_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() if numpy_available: refdata = numpy.ones(data.shape, 'float') for reffilename in ('data/uint16.tif', 'data/int32.tif', 'data/float32.tif'): refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata *= refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata) ############################################################################### # Verify the product of 2 (complex) datasets. def test_pixfun_mul_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_mul_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata * refdata) ############################################################################### # Verify the product with complex conjugate of a complex datasets. def test_pixfun_cmul_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_cmul_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == refdata * refdata.conj()) ############################################################################### # Verify the product with complex conjugate of two real datasets. def test_pixfun_cmul_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_cmul_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/uint16.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata1 = refds.GetRasterBand(1).ReadAsArray() refdata1 = refdata1.astype('float64') reffilename = 'data/int32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata2 = refds.GetRasterBand(1).ReadAsArray() refdata2 = refdata2.astype('float64') assert numpy.alltrue(data == refdata1 * refdata2.conj()) ############################################################################### # Verify computation of the inverse of a real datasets. def test_pixfun_inv_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_inv_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/uint16.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() refdata = refdata.astype('float64') assert numpy.alltrue(data == 1. / refdata) ############################################################################### # Verify computation of the inverse of a complex datasets. def test_pixfun_inv_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_inv_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() refdata = refdata.astype('complex') delta = data - 1. / refdata assert numpy.alltrue(abs(delta.real) < 1e-13) assert numpy.alltrue(abs(delta.imag) < 1e-13) ############################################################################### # Verify intensity computation of a complex dataset. def test_pixfun_intensity_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_intensity_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == (refdata * refdata.conj()).real) ############################################################################### # Verify intensity computation of real dataset. def test_pixfun_intensity_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_intensity_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == (refdata * refdata.conj()).real) ############################################################################### # Verify square root computation. def test_pixfun_sqrt(): if not numpy_available: pytest.skip() filename = 'data/pixfun_sqrt.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.sqrt(refdata)) ############################################################################### # Verify logarithm computation of real dataset. def test_pixfun_log10_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_log10_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.alltrue(data == numpy.log10(refdata)) ############################################################################### # Verify logarithm computation of imag dataset. def test_pixfun_log10_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_log10_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.allclose(data, numpy.log10(numpy.abs(refdata))) ############################################################################### # Verify dB computation of real dataset. def test_pixfun_dB_r(): if not numpy_available: pytest.skip() filename = 'data/pixfun_dB_r.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.allclose(data, 20. * numpy.log10(refdata)) ############################################################################### # Verify dB computation of imag dataset. def test_pixfun_dB_c(): if not numpy_available: pytest.skip() filename = 'data/pixfun_dB_c.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/cint_sar.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() assert numpy.allclose(data, 20. * numpy.log10(numpy.abs(refdata))) ############################################################################### # Verify conversion from dB to amplitude. def test_pixfun_dB2amp(): if not numpy_available: pytest.skip() filename = 'data/pixfun_dB2amp.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() # if not numpy.alltrue(data == 10.**(refdata/20.)): assert numpy.allclose(data, 10.**(refdata / 20.)) ############################################################################### # Verify conversion from dB to power. def test_pixfun_dB2pow(): if not numpy_available: pytest.skip() filename = 'data/pixfun_dB2pow.vrt' ds = gdal.OpenShared(filename, gdal.GA_ReadOnly) assert ds is not None, ('Unable to open "%s" dataset.' % filename) data = ds.GetRasterBand(1).ReadAsArray() reffilename = 'data/float32.tif' refds = gdal.Open(reffilename) assert refds is not None, ('Unable to open "%s" dataset.' % reffilename) refdata = refds.GetRasterBand(1).ReadAsArray() refdata = refdata.astype('float64') assert numpy.allclose(data, 10.**(refdata / 10.)) ############################################################################### gdalautotest-3.1.2/gcore/histogram.py0000775000175000017500000001401613701057754016357 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: colortable.py 11065 2007-03-24 09:35:32Z mloskot $ # # Project: GDAL/OGR Test Suite # Purpose: Test GetHistogram() and GetDefaultHistogram() handling. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal ############################################################################### # Fetch simple histogram. def test_histogram_1(): ds = gdal.Open('data/utmsmall.tif') hist = ds.GetRasterBand(1).GetHistogram() exp_hist = [2, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, 281, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 0, 0, 0, 0, 0, 460, 0, 0, 0, 0, 0, 0, 0, 533, 0, 0, 0, 0, 0, 0, 0, 544, 0, 0, 0, 0, 0, 0, 0, 0, 626, 0, 0, 0, 0, 0, 0, 0, 653, 0, 0, 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, 0, 0, 0, 629, 0, 0, 0, 0, 0, 0, 0, 0, 586, 0, 0, 0, 0, 0, 0, 0, 541, 0, 0, 0, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, 0, 341, 0, 0, 0, 0, 0, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 824] assert hist == exp_hist, 'did not get expected histogram.' ############################################################################### # Fetch histogram with specified sampling, using keywords. def test_histogram_2(): ds = gdal.Open('data/utmsmall.tif') hist = ds.GetRasterBand(1).GetHistogram(buckets=16, max=255.5, min=-0.5) exp_hist = [10, 52, 115, 219, 371, 493, 825, 1077, 1279, 1302, 1127, 783, 625, 462, 331, 929] assert hist == exp_hist, 'did not get expected histogram.' ############################################################################### # try on a different data type with out of range values included. def test_histogram_3(): ds = gdal.Open('data/int32_withneg.grd') hist = ds.GetRasterBand(1).GetHistogram(buckets=21, max=100, min=-100, include_out_of_range=1, approx_ok=0) exp_hist = [0, 0, 0, 0, 0, 1, 0, 1, 1, 3, 3, 2, 0, 5, 3, 4, 0, 1, 1, 2, 3] assert hist == exp_hist, 'did not get expected histogram.' ############################################################################### # try on a different data type without out of range values included. def test_histogram_4(): ds = gdal.Open('data/int32_withneg.grd') hist = ds.GetRasterBand(1).GetHistogram(buckets=21, max=100, min=-100, include_out_of_range=0, approx_ok=0) exp_hist = [0, 0, 0, 0, 0, 1, 0, 1, 1, 3, 3, 2, 0, 5, 3, 4, 0, 1, 1, 2, 0] assert hist == exp_hist, 'did not get expected histogram.' ds = None gdal.Unlink('data/int32_withneg.grd.aux.xml') ############################################################################### # Test GetDefaultHistogram() on the file. def test_histogram_5(): ds = gdal.Open('data/utmsmall.tif') hist = ds.GetRasterBand(1).GetDefaultHistogram(force=1) exp_hist = (-0.5, 255.5, 256, [2, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 178, 0, 0, 0, 0, 0, 0, 0, 193, 0, 0, 0, 0, 0, 0, 0, 212, 0, 0, 0, 0, 0, 0, 0, 281, 0, 0, 0, 0, 0, 0, 0, 0, 365, 0, 0, 0, 0, 0, 0, 0, 460, 0, 0, 0, 0, 0, 0, 0, 533, 0, 0, 0, 0, 0, 0, 0, 544, 0, 0, 0, 0, 0, 0, 0, 0, 626, 0, 0, 0, 0, 0, 0, 0, 653, 0, 0, 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, 0, 0, 0, 629, 0, 0, 0, 0, 0, 0, 0, 0, 586, 0, 0, 0, 0, 0, 0, 0, 541, 0, 0, 0, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, 0, 341, 0, 0, 0, 0, 0, 0, 0, 0, 284, 0, 0, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0, 0, 172, 0, 0, 0, 0, 0, 0, 0, 0, 159, 0, 0, 0, 0, 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, 0, 824]) assert hist == exp_hist, 'did not get expected histogram.' ds = None gdal.Unlink('data/utmsmall.tif.aux.xml') ############################################################################### # Test GetDefaultHistogram( force = 0 ) on a JPG file (#3304) def test_histogram_6(): shutil.copy('../gdrivers/data/albania.jpg', 'tmp/albania.jpg') ds = gdal.Open('tmp/albania.jpg') hist = ds.GetRasterBand(1).GetDefaultHistogram(force=0) assert hist is None, 'did not get expected histogram.' ds = None os.unlink('tmp/albania.jpg') gdalautotest-3.1.2/gcore/hfa_rfc40.py0000775000175000017500000003430613701057754016122 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: hfa_rfc40.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Tests Raster Attribute Table support in the HFA driver and in # particular, changes related to RFC40. # Author: Sam Gillingham # ############################################################################### # Copyright (c) 2013, Sam Gillingham # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest try: import numpy array = numpy.array except ImportError: numpy = None array = list pytestmark = pytest.mark.skipif(numpy is None, reason="numpy not available") INT_DATA = array([197, 83, 46, 29, 1, 78, 23, 90, 12, 45]) DOUBLE_DATA = array([0.1, 43.2, 78.1, 9.9, 23.0, 0.92, 82.5, 0.0, 1.0, 99.0]) STRING_DATA = array(["sddf", "wess", "grbgr", "dewd", "ddww", "qwsqw", "gbfgbf", "wwqw3", "e", ""]) STRING_DATA_INTS = array(["197", "83", "46", "29", "1", "78", "23", "90", "12", "45"]) STRING_DATA_DOUBLES = array(["0.1", "43.2", "78.1", "9.9", "23.0", "0.92", "82.5", "0.0", "1.0", "99.0"]) LONG_STRING_DATA = array(["sdfsdfsdfs", "sdweddw", "sdewdweee", "3423dedd", "jkejjjdjd", "edcdcdcdc", "fcdkmk4m534m", "edwededdd", "dedwedew", "wdedefrfrfrf"]) class HFATestError(Exception): pass def CreateAndWriteRAT(fname): """ Creates file and writes some data """ # create driver = gdal.GetDriverByName("HFA") ds = driver.Create(fname, 10, 10, 1, gdal.GDT_Byte) ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) # write some image data band = ds.GetRasterBand(1) data = numpy.zeros((10, 10), numpy.uint8) data[5, 5] = 20 band.WriteArray(data) band.SetMetadataItem("LAYER_TYPE", "thematic") rat = band.GetDefaultRAT() rat.SetTableType(gdal.GRTT_THEMATIC) # create some columns if rat.CreateColumn("Ints", gdal.GFT_Integer, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("Doubles", gdal.GFT_Real, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("Strings", gdal.GFT_String, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") # for writing as different type if rat.CreateColumn("IntAsDouble", gdal.GFT_Integer, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("IntsAsString", gdal.GFT_Integer, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("DoubleAsInt", gdal.GFT_Real, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("DoubleAsString", gdal.GFT_Real, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("StringAsInt", gdal.GFT_String, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") if rat.CreateColumn("StringAsDouble", gdal.GFT_String, gdal.GFU_Generic) != gdal.CE_None: raise HFATestError("Create column failed") rat.SetRowCount(INT_DATA.size) # some basic checks if rat.GetRowCount() != INT_DATA.size: raise HFATestError('Wrong RowCount') if rat.GetColumnCount() != 9: raise HFATestError('Wrong Column Count') if rat.GetNameOfCol(1) != "Doubles": raise HFATestError('Wrong Column Count') if rat.GetUsageOfCol(1) != gdal.GFU_Generic: raise HFATestError("Wrong column usage") if rat.GetTypeOfCol(1) != gdal.GFT_Real: raise HFATestError("Wrong column usage") if rat.GetColOfUsage(gdal.GFU_Generic) != 0: raise HFATestError("Wrong col of usage") if not rat.ChangesAreWrittenToFile(): raise HFATestError("Wrong ChangesAreWrittenToFile") # Write data if rat.WriteArray(INT_DATA, 0) != gdal.CE_None: raise HFATestError("Failed to write int column") if rat.WriteArray(DOUBLE_DATA, 1) != gdal.CE_None: raise HFATestError("Failed to write double column") if rat.WriteArray(STRING_DATA, 2) != gdal.CE_None: raise HFATestError("Failed to write string column") # different types if rat.WriteArray(DOUBLE_DATA, 3) != gdal.CE_None: raise HFATestError("Failed to write doubles to int column") if rat.WriteArray(STRING_DATA_INTS, 4) != gdal.CE_None: raise HFATestError("Failed to write strings to int column") if rat.WriteArray(INT_DATA, 5) != gdal.CE_None: raise HFATestError("Failed to write ints to doubles column") if rat.WriteArray(STRING_DATA_DOUBLES, 6) != gdal.CE_None: raise HFATestError("Failed to write strings to doubles column") if rat.WriteArray(INT_DATA, 7) != gdal.CE_None: raise HFATestError("Failed to write ints to string column") if rat.WriteArray(DOUBLE_DATA, 8) != gdal.CE_None: raise HFATestError("Failed to write doubles to string column") # print('Succeeding writing data') # ds.FlushCache() ds = None def ReadAndCheckValues(fname, numrows): ds = gdal.Open(fname) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() if rat.GetTableType() != gdal.GRTT_THEMATIC: raise HFATestError("Wrong table type") if rat.GetRowCount() != numrows: raise HFATestError("Wrong number of rows") data = rat.ReadAsArray(0, 0, 10) if not (data == INT_DATA).all(): raise HFATestError("Int column does not match") data = rat.ReadAsArray(1, 0, 10) if not (data == DOUBLE_DATA).all(): raise HFATestError("double column does not match") data = rat.ReadAsArray(2, 0, 10) if not (data == STRING_DATA.astype(numpy.character)).all(): raise HFATestError("string column does not match") data = rat.ReadAsArray(3, 0, 10) if not (data == DOUBLE_DATA.astype(int)).all(): raise HFATestError("int as double column does not match") data = rat.ReadAsArray(4, 0, 10) if not (data == STRING_DATA_INTS.astype(numpy.int)).all(): raise HFATestError("int as string column does not match") data = rat.ReadAsArray(5, 0, 10) if not (data == INT_DATA).all(): raise HFATestError("double as int column does not match") data = rat.ReadAsArray(6, 0, 10) if not (data == STRING_DATA_DOUBLES.astype(numpy.double)).all(): raise HFATestError("double as string column does not match") data = rat.ReadAsArray(7, 0, 10) if not (data.astype(numpy.int) == INT_DATA).all(): raise HFATestError("string as int column does not match") data = rat.ReadAsArray(8, 0, 10) if not (data.astype(numpy.double) == DOUBLE_DATA).all(): raise HFATestError("string as int column does not match") # print('succeeded reading') ds = None def CheckSetGetValues(fname): # check the 'legacy' get and set value calls ds = gdal.Open(fname, gdal.GA_Update) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() # write data nrows = rat.GetRowCount() for i in range(nrows): # write some data slightly different rat.SetValueAsInt(i, 0, int(INT_DATA[i] + 1)) rat.SetValueAsDouble(i, 1, DOUBLE_DATA[i] + 1) s = STRING_DATA[i] s = s + 'z' rat.SetValueAsString(i, 2, s) # read data and check for i in range(nrows): if rat.GetValueAsInt(i, 0) != (INT_DATA[i] + 1): raise HFATestError("GetValueAsInt not reading correctly") if rat.GetValueAsDouble(i, 1) != (DOUBLE_DATA[i] + 1): raise HFATestError("GetValueAsDouble not reading correctly") s = STRING_DATA[i] s = s + 'z' if rat.GetValueAsString(i, 2) != s: raise HFATestError("GetValueAsString not reading correctly") # no need to check different types as ValuesIO is checked for this above # and these calls map to ValuesIO # write back old for i in range(nrows): rat.SetValueAsInt(i, 0, int(INT_DATA[i])) rat.SetValueAsDouble(i, 1, DOUBLE_DATA[i]) rat.SetValueAsString(i, 2, STRING_DATA[i]) # print("Get/SetValue OK") # ds.FlushCache() ds = None def ExtendAndWrite(fname): # write more data to the end of the RAT - will extend it ds = gdal.Open(fname, gdal.GA_Update) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() noldrows = rat.GetRowCount() # extend nrows = noldrows + INT_DATA.size rat.SetRowCount(nrows) # write new data if rat.WriteArray(INT_DATA, 0, 10) != gdal.CE_None: raise HFATestError("Failed to write int column") if rat.WriteArray(DOUBLE_DATA, 1, 10) != gdal.CE_None: raise HFATestError("Failed to write double column") if rat.WriteArray(STRING_DATA, 2, 10) != gdal.CE_None: raise HFATestError("Failed to write string column") # print('extend ok') # ds.FlushCache() ds = None def CheckExtension(fname): ds = gdal.Open(fname) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() data = rat.ReadAsArray(0, 10, 10) if not (data == INT_DATA).all(): raise HFATestError("Int column does not match") data = rat.ReadAsArray(1, 10, 10) if not (data == DOUBLE_DATA).all(): raise HFATestError("Double column does not match") data = rat.ReadAsArray(2, 10, 10) if not (data == STRING_DATA.astype(numpy.character)).all(): raise HFATestError("String column does not match") # print('extension data ok') ds = None def WriteLongStrings(fname): # this will force the string column to be re-written to accommodate # a longer string size ds = gdal.Open(fname, gdal.GA_Update) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() if rat.WriteArray(LONG_STRING_DATA, 2, 10) != gdal.CE_None: raise HFATestError("Failed to write string column") # print("wrote long strings ok") # ds.FlushCache() ds = None def CheckLongStrings(fname): ds = gdal.Open(fname) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() data = rat.ReadAsArray(2, 10, 10) if not (data == LONG_STRING_DATA.astype(numpy.character)).all(): raise HFATestError("String column does not match") # print("checked long strings ok") ds = None def SetLinearBinning(fname): ds = gdal.Open(fname, gdal.GA_Update) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() if rat.SetLinearBinning(0, 1) != gdal.CE_None: raise HFATestError("Error in SetLinearBinning") # print("set linear binning ok") # ds.FlushCache() ds = None def CheckLinearBinning(fname): ds = gdal.Open(fname) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() (state, mini, size) = rat.GetLinearBinning() if not state: raise HFATestError("GetLinearBinning failed") if mini != 0 or size != 1: raise HFATestError("GetLinearBinning values wrong") if rat.GetRowOfValue(3) != 3: raise HFATestError("GetRowOfValue value wrong") # print('linear binning ok') ds = None def CheckClone(fname): ds = gdal.Open(fname) band = ds.GetRasterBand(1) rat = band.GetDefaultRAT() cloned = rat.Clone() if cloned.GetTableType() != gdal.GRTT_THEMATIC: raise HFATestError("Cloned into wrong table type") if cloned.GetValueAsInt(0, 0) != 197: raise HFATestError("Cloned into wrong int") if cloned.GetValueAsDouble(5, 1) != 0.92: raise HFATestError("Cloned into wrong double") if cloned.GetValueAsString(1, 2) != "wess": raise HFATestError("Cloned into wrong string") # print("cloned ok") ds = None # basic tests def test_hfa_rfc40_1(): return CreateAndWriteRAT("tmp/test.img") def test_hfa_rfc40_2(): return ReadAndCheckValues("tmp/test.img", 10) # the older interface def test_hfa_rfc40_3(): return CheckSetGetValues("tmp/test.img") # make sure original data not changed def test_hfa_rfc40_4(): return ReadAndCheckValues("tmp/test.img", 10) # make it longer - data will be re-written def test_hfa_rfc40_5(): return ExtendAndWrite("tmp/test.img") # make sure old data not changed def test_hfa_rfc40_6(): return ReadAndCheckValues("tmp/test.img", 20) # new data at the end ok? def test_hfa_rfc40_7(): return CheckExtension("tmp/test.img") # write some longer strings - string column will # have to be re-written def test_hfa_rfc40_8(): return WriteLongStrings("tmp/test.img") # make sure old data not changed def test_hfa_rfc40_9(): return ReadAndCheckValues("tmp/test.img", 20) # check new data ok def test_hfa_rfc40_10(): return CheckLongStrings("tmp/test.img") # linear binning def test_hfa_rfc40_11(): return SetLinearBinning("tmp/test.img") # linear binning def test_hfa_rfc40_12(): return CheckLinearBinning("tmp/test.img") # clone def test_hfa_rfc40_13(): return CheckClone("tmp/test.img") # serialize not available from Python... def test_hfa_rfc40_cleanup(): gdal.GetDriverByName('HFA').Delete("tmp/test.img") gdalautotest-3.1.2/gcore/vsifile.py0000775000175000017500000007245513701057754016036 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vsifile.py b1ed16957836c5d7356d2fd45b40219130c1eec7 2020-02-25 14:23:07 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test VSI file primitives # Author: Even Rouault # ############################################################################### # Copyright (c) 2011-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import time from osgeo import gdal import gdaltest import pytest ############################################################################### # Generic test def vsifile_generic(filename): start_time = time.time() fp = gdal.VSIFOpenL(filename, 'wb+') assert fp is not None assert gdal.VSIFWriteL('0123456789', 1, 10, fp) == 10 assert gdal.VSIFFlushL(fp) == 0 assert gdal.VSIFTruncateL(fp, 20) == 0 assert gdal.VSIFTellL(fp) == 10 assert gdal.VSIFTruncateL(fp, 5) == 0 assert gdal.VSIFTellL(fp) == 10 assert gdal.VSIFSeekL(fp, 0, 2) == 0 assert gdal.VSIFTellL(fp) == 5 gdal.VSIFWriteL('XX', 1, 2, fp) gdal.VSIFCloseL(fp) statBuf = gdal.VSIStatL(filename, gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf.size == 7 assert start_time == pytest.approx(statBuf.mtime, abs=2) fp = gdal.VSIFOpenL(filename, 'rb') buf = gdal.VSIFReadL(1, 7, fp) assert gdal.VSIFWriteL('a', 1, 1, fp) == 0 assert gdal.VSIFTruncateL(fp, 0) != 0 gdal.VSIFCloseL(fp) assert buf.decode('ascii') == '01234XX' # Test append mode on existing file fp = gdal.VSIFOpenL(filename, 'ab') gdal.VSIFWriteL('XX', 1, 2, fp) gdal.VSIFCloseL(fp) statBuf = gdal.VSIStatL(filename, gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf.size == 9 assert gdal.Unlink(filename) == 0 statBuf = gdal.VSIStatL(filename, gdal.VSI_STAT_EXISTS_FLAG) assert statBuf is None # Test append mode on non existing file fp = gdal.VSIFOpenL(filename, 'ab') gdal.VSIFWriteL('XX', 1, 2, fp) gdal.VSIFCloseL(fp) statBuf = gdal.VSIStatL(filename, gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf.size == 2 assert gdal.Unlink(filename) == 0 ############################################################################### # Test /vsimem def test_vsifile_1(): return vsifile_generic('/vsimem/vsifile_1.bin') ############################################################################### # Test regular file system def test_vsifile_2(): ret = vsifile_generic('tmp/vsifile_2.bin') if ret != 'success' and gdaltest.skip_on_travis(): # FIXME # Fails on Travis with 17592186044423 (which is 0x10 00 00 00 00 07 instead of 7) at line 63 # Looks like a 32/64bit issue with Python bindings of VSIStatL() pytest.skip() return ret ############################################################################### # Test ftruncate >= 32 bit def test_vsifile_3(): if not gdaltest.filesystem_supports_sparse_files('tmp'): pytest.skip() filename = 'tmp/vsifile_3' fp = gdal.VSIFOpenL(filename, 'wb+') gdal.VSIFTruncateL(fp, 10 * 1024 * 1024 * 1024) gdal.VSIFSeekL(fp, 0, 2) pos = gdal.VSIFTellL(fp) if pos != 10 * 1024 * 1024 * 1024: gdal.VSIFCloseL(fp) gdal.Unlink(filename) pytest.fail(pos) gdal.VSIFSeekL(fp, 0, 0) gdal.VSIFSeekL(fp, pos, 0) pos = gdal.VSIFTellL(fp) if pos != 10 * 1024 * 1024 * 1024: gdal.VSIFCloseL(fp) gdal.Unlink(filename) pytest.fail(pos) gdal.VSIFCloseL(fp) statBuf = gdal.VSIStatL(filename, gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) gdal.Unlink(filename) assert statBuf.size == 10 * 1024 * 1024 * 1024 ############################################################################### # Test fix for #4583 (short reads) def test_vsifile_4(): fp = gdal.VSIFOpenL('vsifile.py', 'rb') data = gdal.VSIFReadL(1000000, 1, fp) # print(len(data)) gdal.VSIFSeekL(fp, 0, 0) data = gdal.VSIFReadL(1, 1000000, fp) assert data gdal.VSIFCloseL(fp) ############################################################################### # Test vsicache def test_vsifile_5(): fp = gdal.VSIFOpenL('tmp/vsifile_5.bin', 'wb') ref_data = ''.join(['%08X' % i for i in range(5 * 32768)]) gdal.VSIFWriteL(ref_data, 1, len(ref_data), fp) gdal.VSIFCloseL(fp) gdal.SetConfigOption('VSI_CACHE', 'YES') for i in range(3): if i == 0: gdal.SetConfigOption('VSI_CACHE_SIZE', '0') elif i == 1: gdal.SetConfigOption('VSI_CACHE_SIZE', '65536') else: gdal.SetConfigOption('VSI_CACHE_SIZE', None) fp = gdal.VSIFOpenL('tmp/vsifile_5.bin', 'rb') gdal.VSIFSeekL(fp, 50000, 0) if gdal.VSIFTellL(fp) != 50000: gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) pytest.fail() gdal.VSIFSeekL(fp, 50000, 1) if gdal.VSIFTellL(fp) != 100000: gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) pytest.fail() gdal.VSIFSeekL(fp, 0, 2) if gdal.VSIFTellL(fp) != 5 * 32768 * 8: gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) pytest.fail() gdal.VSIFReadL(1, 1, fp) gdal.VSIFSeekL(fp, 0, 0) data = gdal.VSIFReadL(1, 3 * 32768, fp) if data.decode('ascii') != ref_data[0:3 * 32768]: gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) pytest.fail() gdal.VSIFSeekL(fp, 16384, 0) data = gdal.VSIFReadL(1, 5 * 32768, fp) if data.decode('ascii') != ref_data[16384:16384 + 5 * 32768]: gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) pytest.fail() data = gdal.VSIFReadL(1, 50 * 32768, fp) if data[0:1130496].decode('ascii') != ref_data[16384 + 5 * 32768:]: gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) pytest.fail() gdal.VSIFCloseL(fp) gdal.SetConfigOption('VSI_CACHE_SIZE', None) gdal.SetConfigOption('VSI_CACHE', None) gdal.Unlink('tmp/vsifile_5.bin') ############################################################################### # Test vsicache above 2 GB def test_vsifile_6(): if not gdaltest.filesystem_supports_sparse_files('tmp'): pytest.skip() offset = 4 * 1024 * 1024 * 1024 ref_data = 'abcd'.encode('ascii') fp = gdal.VSIFOpenL('tmp/vsifile_6.bin', 'wb') gdal.VSIFSeekL(fp, offset, 0) gdal.VSIFWriteL(ref_data, 1, len(ref_data), fp) gdal.VSIFCloseL(fp) # Sanity check without VSI_CACHE fp = gdal.VSIFOpenL('tmp/vsifile_6.bin', 'rb') gdal.VSIFSeekL(fp, offset, 0) got_data = gdal.VSIFReadL(1, len(ref_data), fp) gdal.VSIFCloseL(fp) assert ref_data == got_data # Real test now gdal.SetConfigOption('VSI_CACHE', 'YES') fp = gdal.VSIFOpenL('tmp/vsifile_6.bin', 'rb') gdal.SetConfigOption('VSI_CACHE', None) gdal.VSIFSeekL(fp, offset, 0) got_data = gdal.VSIFReadL(1, len(ref_data), fp) gdal.VSIFCloseL(fp) assert ref_data == got_data gdal.Unlink('tmp/vsifile_6.bin') ############################################################################### # Test limit cases on /vsimem def test_vsifile_7(): if gdal.GetConfigOption('SKIP_MEM_INTENSIVE_TEST') is not None: pytest.skip() # Test extending file beyond reasonable limits in write mode fp = gdal.VSIFOpenL('/vsimem/vsifile_7.bin', 'wb') assert gdal.VSIFSeekL(fp, 0x7FFFFFFFFFFFFFFF, 0) == 0 assert gdal.VSIStatL('/vsimem/vsifile_7.bin').size == 0 gdal.PushErrorHandler() ret = gdal.VSIFWriteL('a', 1, 1, fp) gdal.PopErrorHandler() assert ret == 0 assert gdal.VSIStatL('/vsimem/vsifile_7.bin').size == 0 gdal.VSIFCloseL(fp) # Test seeking beyond file size in read-only mode fp = gdal.VSIFOpenL('/vsimem/vsifile_7.bin', 'rb') assert gdal.VSIFSeekL(fp, 0x7FFFFFFFFFFFFFFF, 0) == 0 assert gdal.VSIFEofL(fp) == 0 assert gdal.VSIFTellL(fp) == 0x7FFFFFFFFFFFFFFF assert not gdal.VSIFReadL(1, 1, fp) assert gdal.VSIFEofL(fp) == 1 gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/vsifile_7.bin') ############################################################################### # Test renaming directory in /vsimem def test_vsifile_8(): # octal 0666 = decimal 438 gdal.Mkdir('/vsimem/mydir', 438) fp = gdal.VSIFOpenL('/vsimem/mydir/a', 'wb') gdal.VSIFCloseL(fp) gdal.Rename('/vsimem/mydir', '/vsimem/newdir'.encode('ascii').decode('ascii')) assert gdal.VSIStatL('/vsimem/newdir') is not None assert gdal.VSIStatL('/vsimem/newdir/a') is not None gdal.Unlink('/vsimem/newdir/a') gdal.Rmdir('/vsimem/newdir') ############################################################################### # Test ReadDir() def test_vsifile_9(): lst = gdal.ReadDir('.') assert len(lst) >= 4 # Test truncation lst_truncated = gdal.ReadDir('.', int(len(lst) / 2)) assert len(lst_truncated) > int(len(lst) / 2) gdal.Mkdir('/vsimem/mydir', 438) for i in range(10): fp = gdal.VSIFOpenL('/vsimem/mydir/%d' % i, 'wb') gdal.VSIFCloseL(fp) lst = gdal.ReadDir('/vsimem/mydir') assert len(lst) >= 4 # Test truncation lst_truncated = gdal.ReadDir('/vsimem/mydir', int(len(lst) / 2)) assert len(lst_truncated) > int(len(lst) / 2) for i in range(10): gdal.Unlink('/vsimem/mydir/%d' % i) gdal.Rmdir('/vsimem/mydir') ############################################################################### # Test fuzzer friendly archive def test_vsifile_10(): gdal.FileFromMemBuffer('/vsimem/vsifile_10.tar', """FUZZER_FRIENDLY_ARCHIVE ***NEWFILE***:test.txt abc***NEWFILE***:huge.txt 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678X ***NEWFILE***:small.txt a""") contents = gdal.ReadDir('/vsitar//vsimem/vsifile_10.tar') if contents is None: gdal.Unlink('/vsimem/vsifile_10.tar') pytest.skip() assert contents == ['test.txt', 'huge.txt', 'small.txt'] assert gdal.VSIStatL('/vsitar//vsimem/vsifile_10.tar/test.txt').size == 3 assert gdal.VSIStatL('/vsitar//vsimem/vsifile_10.tar/huge.txt').size == 3888 assert gdal.VSIStatL('/vsitar//vsimem/vsifile_10.tar/small.txt').size == 1 gdal.FileFromMemBuffer('/vsimem/vsifile_10.tar', """FUZZER_FRIENDLY_ARCHIVE ***NEWFILE***:x abc""") contents = gdal.ReadDir('/vsitar//vsimem/vsifile_10.tar') assert contents == ['x'] gdal.FileFromMemBuffer('/vsimem/vsifile_10.tar', """FUZZER_FRIENDLY_ARCHIVE ***NEWFILE***:x abc***NEWFILE***:""") contents = gdal.ReadDir('/vsitar//vsimem/vsifile_10.tar') assert contents == ['x'] gdal.Unlink('/vsimem/vsifile_10.tar') ############################################################################### # Test generic Truncate implementation for file extension def test_vsifile_11(): f = gdal.VSIFOpenL('/vsimem/vsifile_11', 'wb') gdal.VSIFCloseL(f) f = gdal.VSIFOpenL('/vsisubfile/0_,/vsimem/vsifile_11', 'wb') gdal.VSIFWriteL('0123456789', 1, 10, f) assert gdal.VSIFTruncateL(f, 10 + 4096 + 2) == 0 assert gdal.VSIFTellL(f) == 10 assert gdal.VSIFTruncateL(f, 0) == -1 gdal.VSIFCloseL(f) f = gdal.VSIFOpenL('/vsimem/vsifile_11', 'rb') data = gdal.VSIFReadL(1, 10 + 4096 + 2, f) gdal.VSIFCloseL(f) import struct data = struct.unpack('B' * len(data), data) assert data[0] == 48 and data[9] == 57 and data[10] == 0 and data[10 + 4096 + 2 - 1] == 0 gdal.Unlink('/vsimem/vsifile_11') ############################################################################### # Test regular file system sparse file support def test_vsifile_12(): target_dir = 'tmp' if gdal.VSISupportsSparseFiles(target_dir) == 0: pytest.skip() # Minimum value to make it work on NTFS block_size = 65536 f = gdal.VSIFOpenL(target_dir + '/vsifile_12', 'wb') gdal.VSIFWriteL('a', 1, 1, f) assert gdal.VSIFTruncateL(f, block_size * 2) == 0 ret = gdal.VSIFGetRangeStatusL(f, 0, 1) # We could get unknown on nfs if ret == gdal.VSI_RANGE_STATUS_UNKNOWN: print('Range status unknown') else: assert ret == gdal.VSI_RANGE_STATUS_DATA ret = gdal.VSIFGetRangeStatusL(f, block_size * 2 - 1, 1) assert ret == gdal.VSI_RANGE_STATUS_HOLE gdal.VSIFCloseL(f) gdal.Unlink(target_dir + '/vsifile_12') ############################################################################### # Test reading filename with prefixes without terminating slash def test_vsifile_13(): gdal.VSIFOpenL('/vsigzip', 'rb') gdal.VSIFOpenL('/vsizip', 'rb') gdal.VSIFOpenL('/vsitar', 'rb') gdal.VSIFOpenL('/vsimem', 'rb') gdal.VSIFOpenL('/vsisparse', 'rb') gdal.VSIFOpenL('/vsisubfile', 'rb') gdal.VSIFOpenL('/vsicurl', 'rb') gdal.VSIFOpenL('/vsis3', 'rb') gdal.VSIFOpenL('/vsicurl_streaming', 'rb') gdal.VSIFOpenL('/vsis3_streaming', 'rb') gdal.VSIFOpenL('/vsistdin', 'rb') fp = gdal.VSIFOpenL('/vsistdout', 'wb') if fp is not None: gdal.VSIFCloseL(fp) gdal.VSIStatL('/vsigzip') gdal.VSIStatL('/vsizip') gdal.VSIStatL('/vsitar') gdal.VSIStatL('/vsimem') gdal.VSIStatL('/vsisparse') gdal.VSIStatL('/vsisubfile') gdal.VSIStatL('/vsicurl') gdal.VSIStatL('/vsis3') gdal.VSIStatL('/vsicurl_streaming') gdal.VSIStatL('/vsis3_streaming') gdal.VSIStatL('/vsistdin') gdal.VSIStatL('/vsistdout') ############################################################################### # Check performance issue (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1673) def test_vsifile_14(): with gdaltest.error_handler(): gdal.VSIFOpenL('/vsitar//vsitar//vsitar//vsitar//vsitar//vsitar//vsitar//vsitar/a.tgzb.tgzc.tgzd.tgze.tgzf.tgz.h.tgz.i.tgz', 'rb') ############################################################################### # Test issue with Eof() not detecting end of corrupted gzip stream (#6944) def test_vsifile_15(): fp = gdal.VSIFOpenL('/vsigzip/data/corrupted_z_buf_error.gz', 'rb') assert fp is not None file_len = 0 while not gdal.VSIFEofL(fp): with gdaltest.error_handler(): file_len += len(gdal.VSIFReadL(1, 4, fp)) assert file_len == 6469 with gdaltest.error_handler(): file_len += len(gdal.VSIFReadL(1, 4, fp)) assert file_len == 6469 with gdaltest.error_handler(): assert gdal.VSIFSeekL(fp, 0, 2) != 0 assert gdal.VSIFSeekL(fp, 0, 0) == 0 len_read = len(gdal.VSIFReadL(1, file_len, fp)) assert len_read == file_len gdal.VSIFCloseL(fp) ############################################################################### # Test failed gdal.Rename() with exceptions enabled def test_vsifile_16(): old_val = gdal.GetUseExceptions() gdal.UseExceptions() try: gdal.Rename('/tmp/i_do_not_exist_vsifile_16.tif', '/tmp/me_neither.tif') ret = 'fail' except RuntimeError: ret = 'success' if not old_val: gdal.DontUseExceptions() return ret ############################################################################### # Test gdal.GetActualURL() on a non-network based filesystem def test_vsifile_17(): assert gdal.GetActualURL('foo') is None assert gdal.GetSignedURL('foo') is None ############################################################################### # Test gdal.GetFileSystemsPrefixes() def test_vsifile_18(): prefixes = gdal.GetFileSystemsPrefixes() assert '/vsimem/' in prefixes ############################################################################### # Test gdal.GetFileSystemOptions() def test_vsifile_19(): for prefix in gdal.GetFileSystemsPrefixes(): options = gdal.GetFileSystemOptions(prefix) # Check that the options is XML correct if options is not None: ret = gdal.ParseXMLString(options) assert ret is not None, (prefix, options) ############################################################################### # Test gdal.VSIFReadL with None fp def test_vsifile_20(): try: gdal.VSIFReadL(1, 1, None) except ValueError: return pytest.fail() ############################################################################### # Test gdal.VSIGetMemFileBuffer_unsafe() and gdal.VSIFWriteL() reading buffers def test_vsifile_21(): filename = '/vsimem/read.tif' filename_write = '/vsimem/write.tif' data = 'This is some data' vsifile = gdal.VSIFOpenL(filename, 'wb') assert gdal.VSIFWriteL(data, 1, len(data), vsifile) == len(data) gdal.VSIFCloseL(vsifile) vsifile = gdal.VSIFOpenL(filename, 'rb') gdal.VSIFSeekL(vsifile, 0, 2) vsilen = gdal.VSIFTellL(vsifile) gdal.VSIFSeekL(vsifile, 0, 0) data_read = gdal.VSIFReadL(1, vsilen, vsifile) data_mem = gdal.VSIGetMemFileBuffer_unsafe(filename) assert data_read == data_mem[:] gdal.VSIFCloseL(vsifile) vsifile_write = gdal.VSIFOpenL(filename_write, 'wb') assert gdal.VSIFWriteL(data_mem, 1, len(data_mem), vsifile_write) == len(data_mem) gdal.VSIFCloseL(vsifile_write) gdal.Unlink(filename) gdal.Unlink(filename_write) with gdaltest.error_handler(): data3 = gdal.VSIGetMemFileBuffer_unsafe(filename) assert data3 == None def test_vsifile_22(): # VSIOpenL doesn't set errorno gdal.VSIErrorReset() assert gdal.VSIGetLastErrorNo() == 0, \ ("Expected Err=0 after VSIErrorReset(), got %d" % gdal.VSIGetLastErrorNo()) fp = gdal.VSIFOpenL('tmp/not-existing', 'r') assert fp is None, "Expected None from VSIFOpenL" assert gdal.VSIGetLastErrorNo() == 0, \ ("Expected Err=0 from VSIFOpenL, got %d" % gdal.VSIGetLastErrorNo()) # VSIOpenExL does fp = gdal.VSIFOpenExL('tmp/not-existing', 'r', 1) assert fp is None, "Expected None from VSIFOpenExL" assert gdal.VSIGetLastErrorNo() == 1, \ ("Expected Err=1 from VSIFOpenExL, got %d" % gdal.VSIGetLastErrorNo()) assert len(gdal.VSIGetLastErrorMsg()) != 0, "Expected a VSI error message" gdal.VSIErrorReset() assert gdal.VSIGetLastErrorNo() == 0, \ ("Expected Err=0 after VSIErrorReset(), got %d" % gdal.VSIGetLastErrorNo()) ############################################################################### # Test bugfix for https://github.com/OSGeo/gdal/issues/675 def test_vsitar_bug_675(): content = gdal.ReadDir('/vsitar/data/tar_with_star_base256_fields.tar') assert len(content) == 1 ############################################################################### # Test multithreaded compression def test_vsigzip_multi_thread(): with gdaltest.config_options({'GDAL_NUM_THREADS': 'ALL_CPUS', 'CPL_VSIL_DEFLATE_CHUNK_SIZE': '32K'}): f = gdal.VSIFOpenL('/vsigzip//vsimem/vsigzip_multi_thread.gz', 'wb') for i in range(100000): gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL('/vsigzip//vsimem/vsigzip_multi_thread.gz', 'rb') data = gdal.VSIFReadL(100000, 5, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/vsigzip_multi_thread.gz') if data != 'hello' * 100000: for i in range(10000): if data[i*5:i*5+5] != 'hello': print(i*5, data[i*5:i*5+5], data[i*5-5:i*5+5-5]) break pytest.fail() ############################################################################### # Test vsisync() def test_vsisync(): with gdaltest.error_handler(): assert not gdal.Sync('/i_do/not/exist', '/vsimem/') with gdaltest.error_handler(): assert not gdal.Sync('vsifile.py', '/i_do/not/exist') # Test copying a file for i in range(2): assert gdal.Sync('vsifile.py', '/vsimem/') assert gdal.VSIStatL('/vsimem/vsifile.py').size == gdal.VSIStatL('vsifile.py').size gdal.Unlink('/vsimem/vsifile.py') # Test copying the content of a directory gdal.Mkdir('/vsimem/test_sync', 0) gdal.FileFromMemBuffer('/vsimem/test_sync/foo.txt', 'bar') gdal.Mkdir('/vsimem/test_sync/subdir', 0) gdal.FileFromMemBuffer('/vsimem/test_sync/subdir/bar.txt', 'baz') if sys.platform != 'win32': with gdaltest.error_handler(): assert not gdal.Sync('/vsimem/test_sync/', '/i_do_not/exist') assert gdal.Sync('/vsimem/test_sync/', '/vsimem/out') assert gdal.ReadDir('/vsimem/out') == [ 'foo.txt', 'subdir' ] assert gdal.ReadDir('/vsimem/out/subdir') == [ 'bar.txt' ] # Again assert gdal.Sync('/vsimem/test_sync/', '/vsimem/out') gdal.RmdirRecursive('/vsimem/out') # Test copying a directory pct_values = [] def my_progress(pct, message, user_data): pct_values.append(pct) assert gdal.Sync('/vsimem/test_sync', '/vsimem/out', callback = my_progress) assert pct_values == [0.5, 1.0] assert gdal.ReadDir('/vsimem/out') == [ 'test_sync' ] assert gdal.ReadDir('/vsimem/out/test_sync') == [ 'foo.txt', 'subdir' ] gdal.RmdirRecursive('/vsimem/test_sync') gdal.RmdirRecursive('/vsimem/out') ############################################################################### # Test gdal.OpenDir() def test_vsifile_opendir(): # Non existing dir d = gdal.OpenDir('/vsimem/i_dont_exist') assert not d gdal.Mkdir('/vsimem/vsifile_opendir', 0o755) # Empty dir d = gdal.OpenDir('/vsimem/vsifile_opendir') assert d entry = gdal.GetNextDirEntry(d) assert not entry gdal.CloseDir(d) gdal.FileFromMemBuffer('/vsimem/vsifile_opendir/test', 'foo') gdal.Mkdir('/vsimem/vsifile_opendir/subdir', 0o755) gdal.Mkdir('/vsimem/vsifile_opendir/subdir/subdir2', 0o755) gdal.FileFromMemBuffer('/vsimem/vsifile_opendir/subdir/subdir2/test2', 'bar') # Unlimited depth d = gdal.OpenDir('/vsimem/vsifile_opendir') entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir' assert entry.mode == 16384 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir/subdir2' assert entry.mode == 16384 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir/subdir2/test2' assert entry.mode == 32768 entry = gdal.GetNextDirEntry(d) assert entry.name == 'test' assert entry.mode == 32768 assert entry.modeKnown assert entry.size == 3 assert entry.sizeKnown assert entry.mtime != 0 assert entry.mtimeKnown assert not entry.extra entry = gdal.GetNextDirEntry(d) assert not entry gdal.CloseDir(d) # Only top level d = gdal.OpenDir('/vsimem/vsifile_opendir', 0) entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir' entry = gdal.GetNextDirEntry(d) assert entry.name == 'test' entry = gdal.GetNextDirEntry(d) assert not entry gdal.CloseDir(d) # Depth 1 files = [l_entry.name for l_entry in gdal.listdir('/vsimem/vsifile_opendir', 1)] assert files == ['subdir', 'subdir/subdir2', 'test'] gdal.RmdirRecursive('/vsimem/vsifile_opendir') ############################################################################### # Test bugfix for https://github.com/OSGeo/gdal/issues/1559 def test_vsitar_verylongfilename(): f = gdal.VSIFOpenL('/vsitar/data/verylongfilename.tar/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccccccccccccccc/ddddddddddddddddddddddddddddddddddddddd/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/fffffffffffffffffffffffffffffffffffffffffffffff/foo', 'rb') assert f data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar' def test_unlink_batch(): gdal.FileFromMemBuffer('/vsimem/foo', 'foo') gdal.FileFromMemBuffer('/vsimem/bar', 'bar') assert gdal.UnlinkBatch(['/vsimem/foo', '/vsimem/bar']) assert not gdal.VSIStatL('/vsimem/foo') assert not gdal.VSIStatL('/vsimem/bar') assert not gdal.UnlinkBatch([]) gdal.FileFromMemBuffer('/vsimem/foo', 'foo') open('tmp/bar', 'wt').write('bar') with gdaltest.error_handler(): assert not gdal.UnlinkBatch(['/vsimem/foo', 'tmp/bar']) gdal.Unlink('/vsimem/foo') gdal.Unlink('tmp/bar') gdalautotest-3.1.2/gcore/pamproxydb.py0000775000175000017500000001222013701057754016542 0ustar eveneven#!/usr/bin/env python ############################################################################### # $Id: pamproxydb.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test functioning of the ProxyDB PAM metadata support # Author: Even Rouault, # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os try: os.putenv('CPL_SHOW_MEM_STATS', '') except OSError: pass # Must to be launched from pam.py/pam_11() # Test creating a new proxydb if len(sys.argv) == 2 and sys.argv[1] == '-test1': from osgeo import gdal import shutil try: shutil.rmtree('tmppamproxydir') except OSError: pass os.mkdir('tmppamproxydir') gdal.SetConfigOption('GDAL_PAM_PROXY_DIR', 'tmppamproxydir') # Compute statistics. They should be saved in the .aux.xml in the proxyDB ds = gdal.Open('tmpdirreadonly/byte.tif') stats = ds.GetRasterBand(1).ComputeStatistics(False) gdal.ErrorReset() ds = None error_msg = gdal.GetLastErrorMsg() if error_msg != '': print('did not expected error message') sys.exit(1) # Check that the .aux.xml in the proxyDB exists filelist = gdal.ReadDir('tmppamproxydir') if '000000_tmpdirreadonly_byte.tif.aux.xml' not in filelist: print('did not get find 000000_tmpdirreadonly_byte.tif.aux.xml on filesystem') sys.exit(1) # Test altering a value to check that the file will be used f = open('tmppamproxydir/000000_tmpdirreadonly_byte.tif.aux.xml', 'w') f.write(""" 255 126.765 -9999 22.928470838676 """) f.close() ds = gdal.Open('tmpdirreadonly/byte.tif') filelist = ds.GetFileList() if len(filelist) != 2: print('did not get find 000000_tmpdirreadonly_byte.tif.aux.xml in dataset GetFileList()') print(filelist) sys.exit(1) stats = ds.GetRasterBand(1).GetStatistics(False, False) if stats[0] != -9999: print('did not get expected minimum') sys.exit(1) ds = None # Check that proxy overviews work ds = gdal.Open('tmpdirreadonly/byte.tif') ds.BuildOverviews('NEAR', overviewlist=[2]) ds = None filelist = gdal.ReadDir('tmppamproxydir') if '000001_tmpdirreadonly_byte.tif.ovr' not in filelist: print('did not get find 000001_tmpdirreadonly_byte.tif.ovr') sys.exit(1) ds = gdal.Open('tmpdirreadonly/byte.tif') filelist = ds.GetFileList() if len(filelist) != 3: print('did not get find 000001_tmpdirreadonly_byte.tif.ovr in dataset GetFileList()') print(filelist) sys.exit(1) nb_ovr = ds.GetRasterBand(1).GetOverviewCount() ds = None if nb_ovr != 1: print('did not get expected overview count') sys.exit(1) print('success') sys.exit(0) # Must to be launched from pam.py/pam_11() # Test loading an existing proxydb if len(sys.argv) == 2 and sys.argv[1] == '-test2': from osgeo import gdal gdal.SetConfigOption('GDAL_PAM_PROXY_DIR', 'tmppamproxydir') ds = gdal.Open('tmpdirreadonly/byte.tif') filelist = ds.GetFileList() if len(filelist) != 3: print('did not get find 000000_tmpdirreadonly_byte.tif.aux.xml and/or 000001_tmpdirreadonly_byte.tif.ovr in dataset GetFileList()') print(filelist) sys.exit(1) stats = ds.GetRasterBand(1).GetStatistics(False, False) if stats[0] != -9999: print('did not get expected minimum') sys.exit(1) nb_ovr = ds.GetRasterBand(1).GetOverviewCount() ds = None if nb_ovr != 1: print('did not get expected overview count') sys.exit(1) print('success') sys.exit(0) gdalautotest-3.1.2/gcore/transformer.py0000664000175000017500000011601213701057754016720 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: transformer.py 7294a96e7747b442cd7033280c2780cfd2bca572 2020-06-12 16:43:48 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test the GenImgProjTransformer capabilities. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal from osgeo import osr import pytest import math ############################################################################### # Test simple Geotransform based transformer. def test_transformer_1(): ds = gdal.Open('data/byte.tif') tr = gdal.Transformer(ds, None, []) (success, pnt) = tr.TransformPoint(0, 20, 10) assert success and pnt[0] == pytest.approx(441920, abs=0.00000001) and pnt[1] == pytest.approx(3750720, abs=0.00000001) and pnt[2] == 0.0, \ 'got wrong forward transform result.' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20, abs=0.00000001) and pnt[1] == pytest.approx(10, abs=0.00000001) and pnt[2] == 0.0, \ 'got wrong reverse transform result.' ############################################################################### # Test GCP based transformer with polynomials. def test_transformer_2(): ds = gdal.Open('data/gcps.vrt') tr = gdal.Transformer(ds, None, ['METHOD=GCP_POLYNOMIAL']) (success, pnt) = tr.TransformPoint(0, 20, 10) assert success and pnt[0] == pytest.approx(441920, abs=0.001) and pnt[1] == pytest.approx(3750720, abs=0.001) and pnt[2] == 0, \ 'got wrong forward transform result.' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20, abs=0.001) and pnt[1] == pytest.approx(10, abs=0.001) and pnt[2] == 0, \ 'got wrong reverse transform result.' ############################################################################### # Test GCP based transformer with thin plate splines. def test_transformer_3(): ds = gdal.Open('data/gcps.vrt') tr = gdal.Transformer(ds, None, ['METHOD=GCP_TPS']) (success, pnt) = tr.TransformPoint(0, 20, 10) assert success and pnt[0] == pytest.approx(441920, abs=0.001) and pnt[1] == pytest.approx(3750720, abs=0.001) and pnt[2] == 0, \ 'got wrong forward transform result.' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20, abs=0.001) and pnt[1] == pytest.approx(10, abs=0.001) and pnt[2] == 0, \ 'got wrong reverse transform result.' ############################################################################### # Test geolocation based transformer. def test_transformer_4(): ds = gdal.Open('data/sstgeo.vrt') tr = gdal.Transformer(ds, None, ['METHOD=GEOLOC_ARRAY']) (success, pnt) = tr.TransformPoint(0, 20, 10) assert success and abs(pnt[0] + 81.961341857910156) <= 0.000001 and pnt[1] == pytest.approx(29.612689971923828, abs=0.000001) and pnt[2] == 0, \ 'got wrong forward transform result.' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.436627518907024, abs=0.001) and pnt[1] == pytest.approx(10.484599774610549, abs=0.001) and pnt[2] == 0, \ 'got wrong reverse transform result.' ############################################################################### # Test RPC based transformer. def test_transformer_5(): ds = gdal.Open('data/rpc.vrt') tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_PIXEL_ERROR_THRESHOLD=0.05']) (success, pnt) = tr.TransformPoint(0, 20.5, 10.5) assert success and pnt[0] == pytest.approx(125.64830100509131, abs=0.000001) and pnt[1] == pytest.approx(39.869433991997553, abs=0.000001) and pnt[2] == 0, \ 'got wrong forward transform result.' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.5, abs=0.05) and pnt[1] == pytest.approx(10.5, abs=0.05) and pnt[2] == 0, \ 'got wrong reverse transform result.' # Try with a different height. (success, pnt) = tr.TransformPoint(0, 20.5, 10.5, 30) assert success and pnt[0] == pytest.approx(125.64828521533849, abs=0.000001) and pnt[1] == pytest.approx(39.869345204440144, abs=0.000001) and pnt[2] == 30, \ 'got wrong forward transform result.(2)' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.5, abs=0.05) and pnt[1] == pytest.approx(10.5, abs=0.05) and pnt[2] == 30, \ 'got wrong reverse transform result.(2)' # Test RPC_HEIGHT option tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT=30']) (success, pnt) = tr.TransformPoint(0, 20.5, 10.5) assert success and pnt[0] == pytest.approx(125.64828521533849, abs=0.000001) and pnt[1] == pytest.approx(39.869345204440144, abs=0.000001), \ 'got wrong forward transform result.(3)' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.5, abs=0.1) and pnt[1] == pytest.approx(10.5, abs=0.1), \ 'got wrong reverse transform result.(3)' # Test RPC_DEM and RPC_HEIGHT_SCALE options # (long,lat)=(125.64828521533849 39.869345204440144) -> (Easting,Northing)=(213324.662167036 4418634.47813677) in EPSG:32652 ds_dem = gdal.GetDriverByName('GTiff').Create('/vsimem/dem.tif', 100, 100, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(32652) ds_dem.SetProjection(sr.ExportToWkt()) ds_dem.SetGeoTransform([213300, 200, 0, 4418700, 0, -200]) ds_dem.GetRasterBand(1).Fill(15) ds_dem = None tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT_SCALE=2', 'RPC_DEM=/vsimem/dem.tif']) (success, pnt) = tr.TransformPoint(0, 20.5, 10.5, 0) assert success and pnt[0] == pytest.approx(125.64828521533849, abs=0.000001) and pnt[1] == pytest.approx(39.869345204440144, abs=0.000001), \ 'got wrong forward transform result.(4)' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.5, abs=0.05) and pnt[1] == pytest.approx(10.5, abs=0.05), \ 'got wrong reverse transform result.(4)' tr = None # Test RPC_DEMINTERPOLATION=cubic tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT_SCALE=2', 'RPC_DEM=/vsimem/dem.tif', 'RPC_DEMINTERPOLATION=cubic']) (success, pnt) = tr.TransformPoint(0, 20.5, 10.5, 0) assert success and pnt[0] == pytest.approx(125.64828521533849, abs=0.000001) and pnt[1] == pytest.approx(39.869345204440144, abs=0.000001), \ 'got wrong forward transform result.(5)' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.5, abs=0.05) and pnt[1] == pytest.approx(10.5, abs=0.05), \ 'got wrong reverse transform result.(5)' tr = None # Test RPC_DEMINTERPOLATION=near tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT_SCALE=2', 'RPC_DEM=/vsimem/dem.tif', 'RPC_DEMINTERPOLATION=near']) (success, pnt) = tr.TransformPoint(0, 20.5, 10.5, 0) assert success and pnt[0] == pytest.approx(125.64828521503811, abs=0.000001) and pnt[1] == pytest.approx(39.869345204874911, abs=0.000001), \ 'got wrong forward transform result.(6)' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(20.5, abs=0.05) and pnt[1] == pytest.approx(10.5, abs=0.05), \ 'got wrong reverse transform result.(6)' tr = None # Test outside DEM extent : default behaviour --> error tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT_SCALE=2', 'RPC_DEM=/vsimem/dem.tif']) (success, pnt) = tr.TransformPoint(0, 40000, 0, 0) assert success == 0 (success, pnt) = tr.TransformPoint(1, 125, 40, 0) assert success == 0 tr = None # Test outside DEM extent with RPC_DEM_MISSING_VALUE=0 ds_dem = gdal.GetDriverByName('GTiff').Create('/vsimem/dem.tif', 100, 100, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(32652) ds_dem.SetProjection(sr.ExportToWkt()) ds_dem.SetGeoTransform([213300, 1, 0, 4418700, 0, -1]) ds_dem.GetRasterBand(1).Fill(15) ds_dem = None tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT_SCALE=2', 'RPC_DEM=/vsimem/dem.tif', 'RPC_DEM_MISSING_VALUE=0']) (success, pnt) = tr.TransformPoint(0, -99.5, 0.5, 0) assert success and pnt[0] == pytest.approx(125.64746155942839, abs=0.000001) and pnt[1] == pytest.approx(39.869506789921168, abs=0.000001), \ 'got wrong forward transform result.' (success, pnt) = tr.TransformPoint(1, pnt[0], pnt[1], pnt[2]) assert success and pnt[0] == pytest.approx(-99.5, abs=0.05) and pnt[1] == pytest.approx(0.5, abs=0.05), \ 'got wrong reverse transform result.' tr = None gdal.Unlink('/vsimem/dem.tif') ############################################################################### # Test RPC convergence bug (bug # 5395) def test_transformer_6(): ds = gdal.Open('data/rpc_5395.vrt') tr = gdal.Transformer(ds, None, ['METHOD=RPC']) (success, pnt) = tr.TransformPoint(0, 0.5, 0.5) assert success and pnt[0] == pytest.approx(28.26163232, abs=0.0001) and pnt[1] == pytest.approx(-27.79853245, abs=0.0001) and pnt[2] == 0, \ 'got wrong forward transform result.' ############################################################################### # Test Transformer.TransformPoints def test_transformer_7(): ds = gdal.Open('data/byte.tif') tr = gdal.Transformer(ds, None, []) (pnt, success) = tr.TransformPoints(0, [(20, 10)]) assert success[0] != 0 and pnt[0][0] == pytest.approx(441920, abs=0.00000001) and pnt[0][1] == pytest.approx(3750720, abs=0.00000001) and pnt[0][2] == 0.0, \ 'got wrong forward transform result.' ############################################################################### # Test handling of nodata in RPC DEM (#5680) def test_transformer_8(): ds = gdal.Open('data/rpc.vrt') # (long,lat)=(125.64828521533849 39.869345204440144) -> (Easting,Northing)=(213324.662167036 4418634.47813677) in EPSG:32652 ds_dem = gdal.GetDriverByName('GTiff').Create('/vsimem/dem.tif', 100, 100, 1, gdal.GDT_Int16) sr = osr.SpatialReference() sr.ImportFromEPSG(32652) ds_dem.SetProjection(sr.ExportToWkt()) ds_dem.SetGeoTransform([213300, 1, 0, 4418700, 0, -1]) ds_dem.GetRasterBand(1).SetNoDataValue(-32768) ds_dem.GetRasterBand(1).Fill(-32768) ds_dem = None for method in ['near', 'bilinear', 'cubic']: tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/dem.tif', 'RPC_DEMINTERPOLATION=%s' % method]) (success, pnt) = tr.TransformPoint(0, 20, 10, 0) if success: print(success, pnt) pytest.fail('got wrong forward transform result.') (success, pnt) = tr.TransformPoint(1, 125.64828521533849, 39.869345204440144, 0) if success: print(success, pnt) pytest.fail('got wrong reverse transform result.') gdal.Unlink('/vsimem/dem.tif') ############################################################################### # Test RPC DEM line optimization def test_transformer_9(): ds = gdal.Open('data/rpc.vrt') # (long,lat)=(125.64828521533849 39.869345204440144) -> (Easting,Northing)=(213324.662167036 4418634.47813677) in EPSG:32652 ds_dem = gdal.GetDriverByName('GTiff').Create('/vsimem/dem.tif', 100, 100, 1, gdal.GDT_Byte) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds_dem.SetProjection(sr.ExportToWkt()) ds_dem.SetGeoTransform([125.647968621436, 1.2111052640051412e-05, 0, 39.869926216038, 0, -8.6569068979969188e-06]) import random random.seed(0) data = ''.join([chr(40 + int(10 * random.random())) for _ in range(100 * 100)]) ds_dem.GetRasterBand(1).WriteRaster(0, 0, 100, 100, data) ds_dem = None for method in ['near', 'bilinear', 'cubic']: tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/dem.tif', 'RPC_DEMINTERPOLATION=%s' % method]) points = [(125.64828521533849, 39.869345204440144)] * 10 (pnt, success) = tr.TransformPoints(1, points) assert success[0], method pnt_optimized = pnt[0] (success, pnt) = tr.TransformPoint(1, 125.64828521533849, 39.869345204440144, 0) assert success, method assert pnt == pnt_optimized, method gdal.Unlink('/vsimem/dem.tif') ############################################################################### # Test RPC DEM transform from geoid height to ellipsoidal height def test_transformer_10(): # Create fake vertical shift grid out_ds = gdal.GetDriverByName('GTX').Create('tmp/fake.gtx', 10, 10, 1, gdal.GDT_Float32) out_ds.SetGeoTransform([-180, 36, 0, 90, 0, -18]) sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') out_ds.SetProjection(sr.ExportToWkt()) out_ds.GetRasterBand(1).Fill(100) out_ds = None # Create a fake DEM ds_dem = gdal.GetDriverByName('GTiff').Create('/vsimem/dem.tif', 100, 100, 1, gdal.GDT_Byte) ds_dem.SetGeoTransform([125.647968621436, 1.2111052640051412e-05, 0, 39.869926216038, 0, -8.6569068979969188e-06]) import random random.seed(0) data = ''.join([chr(40 + int(10 * random.random())) for _ in range(100 * 100)]) ds_dem.GetRasterBand(1).WriteRaster(0, 0, 100, 100, data) ds_dem = None ds_dem = gdal.Open('/vsimem/dem.tif') vrt_dem = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/dem.vrt', ds_dem) ds_dem = None vrt_dem.SetProjection("""COMPD_CS["WGS 84 + my_height", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], VERT_CS["my_height", VERT_DATUM["my_height",0, EXTENSION["PROJ4_GRIDS","./tmp/fake.gtx"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Up",UP]]]""") vrt_dem = None ds = gdal.Open('data/rpc.vrt') tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/dem.vrt']) (success, pnt) = tr.TransformPoint(1, 125.64828521533849, 39.869345204440144, 0) assert success and pnt[0] == pytest.approx(27.31476045569616, abs=1e-5) and pnt[1] == pytest.approx(-53.328814757762302, abs=1e-5) and pnt[2] == 0, \ 'got wrong result: %s' % str(pnt) tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/dem.vrt', 'RPC_DEM_APPLY_VDATUM_SHIFT=FALSE']) (success, pnt) = tr.TransformPoint(1, 125.64828521533849, 39.869345204440144, 0) assert success and pnt[0] == pytest.approx(21.445626206892484, abs=1e-5) and pnt[1] == pytest.approx(1.6460100520871492, abs=1e-5) and pnt[2] == 0, \ 'got wrong result.' gdal.GetDriverByName('GTX').Delete('tmp/fake.gtx') gdal.Unlink('/vsimem/dem.tif') gdal.Unlink('/vsimem/dem.vrt') ############################################################################### # Test failed inverse RPC transform (#6162) def test_transformer_11(): ds = gdal.GetDriverByName('MEM').Create('', 6600, 4400) rpc = [ 'HEIGHT_OFF=1113.66579196784', 'HEIGHT_SCALE=12.5010114250099', 'LAT_OFF=38.8489906468112', 'LAT_SCALE=-0.106514418771489', 'LINE_DEN_COEFF=1 -0.000147949809772754 -0.000395269640841174 -1.15825619524758e-05 -0.001613476071797 5.20818134468044e-05 -2.87546958936308e-05 0.00139252754800089 0.00103224907048726 -5.0328770407996e-06 8.03722313022155e-06 0.000236052289425919 0.000208478107633822 -8.11629138727222e-06 0.000168941442517399 0.000392113144410504 3.13299811375497e-06 -1.50306451132806e-07 -1.96870155855449e-06 6.84425679628047e-07', 'LINE_NUM_COEFF=0.00175958077249233 1.38380980570961 -1.10937056344449 -2.64222540811728e-05 0.00242330787142254 0.000193743606261641 -0.000149740797138056 0.000348558508286103 -8.44646294793856e-05 3.10853483444725e-05 6.94899990982205e-05 -0.00348125387930033 -0.00481553689971959 -7.80038440894703e-06 0.00410332555882184 0.00269594666059233 5.94355882183947e-06 -6.12499223746471e-05 -2.16490482825638e-05 -1.95059491792213e-06', 'LINE_OFF=2199.80872158044', 'LINE_SCALE=2202.03966104116', 'LONG_OFF=77.3374268058015', 'LONG_SCALE=0.139483831686384', 'SAMP_DEN_COEFF=1 0.000220381598198686 -5.9113079248377e-05 -0.000123013508187712 -2.69270454504924e-05 3.85090208529735e-05 -5.05359221990966e-05 0.000207017095461956 0.000441092857548974 1.47302072491805e-05 9.4840973108768e-06 -0.000810344094204395 -0.000690502911945615 -1.07959445293954e-05 0.000801157109076503 0.000462754838815978 9.13256389877791e-06 7.49571761868177e-06 -5.00612460432453e-06 -2.25925949180435e-06', 'SAMP_NUM_COEFF=-0.00209214639511201 -0.759096012299728 -0.903450038473527 5.43928095403867e-05 -0.000717672934172181 -0.000168790405106395 -0.00015564609496447 0.0013261576802665 -0.000398331147368139 -3.84712681506314e-05 2.70041394522796e-05 0.00254362585790201 0.00332988183285888 3.36326833370395e-05 0.00445687297094153 0.00290078876854111 3.59552237739047e-05 7.16492495304347e-05 -5.6782194494005e-05 2.32051448455541e-06', 'SAMP_OFF=3300.39818049514', 'SAMP_SCALE=3302.50400920438' ] ds.SetMetadata(rpc, 'RPC') tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT=4000']) (success, pnt) = tr.TransformPoint(0, 0, 0, 0) assert not success, pnt # But this one should succeed tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_HEIGHT=1150']) (success, pnt) = tr.TransformPoint(0, 0, 0, 0) assert success and pnt[0] == pytest.approx(77.350939956024618, abs=1e-7) and pnt[1] == pytest.approx(38.739703990877814, abs=1e-7) ############################################################################### # Test degenerate cases of TPS transformer def test_transformer_12(): ds = gdal.Open(""" Gray data/byte.tif """) tr = gdal.Transformer(ds, None, ['METHOD=GCP_TPS']) assert tr is not None ds = gdal.Open(""" Gray data/byte.tif """) gdal.ErrorReset() with gdaltest.error_handler(): tr = gdal.Transformer(ds, None, ['METHOD=GCP_TPS']) assert gdal.GetLastErrorMsg() != '' ds = gdal.Open(""" Gray data/byte.tif """) gdal.ErrorReset() with gdaltest.error_handler(): tr = gdal.Transformer(ds, None, ['METHOD=GCP_TPS']) assert gdal.GetLastErrorMsg() != '' ############################################################################### # Test inverse RPC transform at DEM edge (#6377) def test_transformer_13(): ds = gdal.GetDriverByName('MEM').Create('', 6600, 4400) rpc = [ "HEIGHT_OFF=79.895358112544", "HEIGHT_SCALE=71.8479951519956", "LAT_OFF=39.1839631741725", "LAT_SCALE=-0.0993355184710674", "LINE_DEN_COEFF=1 8.18889582174233e-05 -0.000585027621468826 0.00141894885228522 -0.000585589558894143 2.26848970721562e-05 0.0004556101949561 -0.000807782279739336 -0.00042471862816941 -0.000569244978738162 1.48442578097541e-05 4.05131290592846e-05 2.84884306250279e-05 -5.18205692205965e-06 -6.313878273056e-07 1.53979251356426e-05 -7.18376115203249e-06 -6.17331013601745e-05 -7.21314704472095e-05 4.12297300238455e-06", "LINE_NUM_COEFF=-0.00742236358913794 -1.34432796989641 1.14742235955483 -0.00419813954264328 -0.00234215180175534 -0.00624463816085957 0.00678228413157904 0.0020362389986917 -0.00187712244349171 -8.03499198655765e-08 -0.00058862905508099 -0.00738644673656152 -0.00769111767189179 0.00076485216017804 0.00714033152180546 0.00597946564795612 -0.000632882594479344 -0.000167672086277102 0.00055226160003967 1.01784884515205e-06", "LINE_OFF=2199.71134437189", "LINE_SCALE=2197.27163235171", "LONG_OFF=-108.129788954851", "LONG_SCALE=0.135395601856691", "SAMP_DEN_COEFF=1 -0.000817668457487893 -0.00151956231901818 0.00117149108953055 0.000514723430775277 0.000357856819755055 0.000655430235824068 -0.00100177312999255 -0.000488725013873637 -0.000500795084518271 -3.31511569640467e-06 4.60608554396048e-05 4.71371559254521e-05 -3.47487113243818e-06 1.0984752288197e-05 1.6421626141648e-05 -6.2866141729034e-06 -6.32966599886646e-05 -7.06552514786235e-05 3.89288575686084e-06", "SAMP_NUM_COEFF=0.00547379112608157 0.807100297014362 0.845388298829057 0.01082483811889 -0.00320368761068744 0.00357867636379949 0.00459377712275926 -0.00324853865239341 -0.00218177030092682 2.99823054607907e-05 0.000946829367823539 0.00428577519330827 0.0045745876325088 -0.000396201144848935 0.00488772258958395 0.00435309486883759 -0.000402737234433541 0.000402935809278189 0.000642374929382851 -5.26793321752838e-06", "SAMP_OFF=3299.3111821927", "SAMP_SCALE=3297.19448149873" ] ds.SetMetadata(rpc, 'RPC') tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=data/transformer_13_dem.tif']) (success, pnt) = tr.TransformPoint(0, 6600, 24) assert success and pnt[0] == pytest.approx(-108.00066000065341, abs=1e-7) and pnt[1] == pytest.approx(39.157694013439489, abs=1e-7) ############################################################################### # Test inverse RPC transform when iterations do oscillations (#6377) def test_transformer_14(): ds = gdal.GetDriverByName('MEM').Create('', 4032, 2688) rpc = ["MIN_LAT=0", "MAX_LAT=0", "MIN_LONG=0", "MAX_LONG=0", "HEIGHT_OFF=244.72924043124081", "HEIGHT_SCALE=391.44066987292678", "LAT_OFF=0.095493639758799986", "LAT_SCALE=-0.0977494003085103", "LINE_DEN_COEFF=1 1.73399671259238e-05 -6.18169396309642e-06 -3.11498839490863e-05 -1.18048814815295e-05 -5.46123898974842e-05 -2.51203895820587e-05 -5.77299008756702e-05 -1.37836923606953e-05 -3.24029327866125e-06 2.06307542696228e-07 -5.16777154466466e-08 2.98762926005741e-07 3.17761145061869e-08 1.48077371641094e-07 -7.69738626480047e-08 2.94990048269861e-08 -3.37468052222007e-08 -3.67859879729462e-08 8.79847359414426e-10 ", "LINE_NUM_COEFF=0.000721904493927027 1.02330510505135 -1.27742813759689 -0.0973049949136407 -0.014260789316429 0.00229308399354221 -0.0016640916975237 0.0124508639909873 0.00336835383694126 1.1987123734283e-05 -1.85240614830659e-05 4.40716454954686e-05 2.3198555492418e-05 -8.31659287301587e-08 -5.10329082923063e-05 2.56477008932482e-05 1.01465909326012e-05 1.04407036240869e-05 4.27413648628578e-05 2.91696764503125e-07 ", "LINE_OFF=1343.99369782095", "LINE_SCALE=1343.96638400536", "LONG_OFF=-0.034423410000698595", "LONG_SCALE=0.143444599019706", "SAMP_DEN_COEFF=1 1.83636704399141e-05 3.55794197969218e-06 -1.33255440425932e-05 -4.25424777986987e-06 -3.95287146748821e-05 1.35786181318561e-05 -3.86131208639696e-05 -1.10085128708761e-05 -1.26863939055319e-05 -2.88045902675552e-07 -1.58732907217101e-07 4.08999884183478e-07 6.6854211618061e-08 -1.46399266323942e-07 -4.69718293745237e-08 -4.14626818788491e-08 -3.00588241056424e-07 4.54784506604435e-08 3.24214474149225e-08 ", "SAMP_NUM_COEFF=-0.0112062780844554 -1.05096833835297 -0.704023055461029 0.0384547265206585 -0.00987134340336078 -0.00310989611092616 -0.00116937850565916 -0.0102714370609919 0.000930565787504389 7.03834691339565e-05 -3.83216250787844e-05 -3.67841179314918e-05 2.45498653278515e-05 1.06302833544472e-05 -6.26921822677631e-05 1.29769009118128e-05 1.1336284460811e-05 -3.01250967502161e-05 -7.60511798099513e-06 -4.45260900205512e-07 ", "SAMP_OFF=2015.99417232167", "SAMP_SCALE=2015.9777295656" ] ds.SetMetadata(rpc, 'RPC') old_rpc_inverse_verbose = gdal.GetConfigOption('RPC_INVERSE_VERBOSE') gdal.SetConfigOption('RPC_INVERSE_VERBOSE', 'YES') old_rpc_inverse_log = gdal.GetConfigOption('RPC_INVERSE_LOG') gdal.SetConfigOption('RPC_INVERSE_LOG', '/vsimem/transformer_14.csv') tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=data/transformer_14_dem.tif']) gdal.SetConfigOption('RPC_INVERSE_VERBOSE', old_rpc_inverse_verbose) gdal.SetConfigOption('RPC_INVERSE_LOG', old_rpc_inverse_log) (success, pnt) = tr.TransformPoint(0, 0, 0) assert success and pnt[0] == pytest.approx(1.9391846640653961e-05, abs=1e-7) and pnt[1] == pytest.approx(-0.0038824752244123275, abs=1e-7) f = gdal.VSIFOpenL('/vsimem/transformer_14.csvt', 'rb') if f is not None: content = gdal.VSIFReadL(1, 1000, f).decode('ASCII') gdal.VSIFCloseL(f) assert content.startswith('Integer,Real,Real,Real,String,Real,Real') f = gdal.VSIFOpenL('/vsimem/transformer_14.csv', 'rb') if f is not None: content = gdal.VSIFReadL(1, 1000, f).decode('ASCII') gdal.VSIFCloseL(f) assert content.startswith("""iter,long,lat,height,WKT,error_pixel_x,error_pixel_y 0,""") gdal.Unlink('/vsimem/transformer_14.csvt') gdal.Unlink('/vsimem/transformer_14.csv') ############################################################################### # Test inverse RPC transform with DEM in [-180,180] but guessed longitude going # beyond def test_transformer_15(): ds = gdal.GetDriverByName('MEM').Create('', 6600, 4400) rpc = [ "HEIGHT_OFF=50", "HEIGHT_SCALE=10", "LAT_OFF=0", "LAT_SCALE=-0.105215174097221", "LINE_DEN_COEFF=1 0.000113241782375585 -7.43522609681362e-05 3.71535308900828e-08 0.000338102551252493 4.57912749279076e-07 -7.00823537484445e-08 9.01275640119332e-05 -0.000209723741981335 4.74972505083506e-09 7.2855438070338e-10 -3.16688523275456e-05 -4.49211037453489e-05 8.29706981496464e-12 7.58128162744879e-06 6.82536481272507e-07 2.58661007069147e-11 -3.9697791887986e-08 -5.06502821928986e-08 4.66978771069271e-11 ", "LINE_NUM_COEFF=0.00673418095252569 -1.38985626744028 -0.645141238074041 1.4661564574111e-05 0.00022202101663831 -4.32910472926433e-06 -1.90048143949724e-06 -0.00374486341484218 -0.00041396053769863 1.14148334846788e-09 -1.20458144309064e-07 -0.00618122456017927 -0.00783023711720404 1.32704635552568e-09 -0.0032532225011433 -0.00355239507036451 6.20315160857432e-10 -4.75170167074672e-07 1.37652348819162e-07 9.53393990126859e-12 ", "LINE_OFF=2191.17012189569", "LINE_SCALE=2197.23749680132", "LONG_OFF=179.9", "LONG_SCALE=0.124705315627701", "SAMP_DEN_COEFF=1 2.1759243891474e-05 -5.96367842636917e-06 6.03714873685079e-09 -0.000109764869260479 4.67786228725161e-07 -4.22013004308237e-07 0.000110379633112327 -0.00011679427405351 9.30515192365439e-09 1.09243100743555e-09 -3.29956656106618e-05 -4.1918167733603e-05 2.78076356769406e-11 -4.57011012884097e-06 -1.01453844685279e-05 2.60244039950836e-11 -3.52960090220746e-08 -4.49975439524006e-08 1.80641651820794e-11 ", "SAMP_NUM_COEFF=-0.000776008179693209 -0.380692820465227 1.0647540743599 1.72660888229082e-06 0.0028311896140173 -1.0466632896253e-06 3.17728359468736e-06 -0.000150466834838251 0.000566231304705376 -7.34786296240808e-11 5.90340934437437e-07 -0.00169917056998316 -0.00231193494979752 -2.71280972480264e-09 0.00482224415396017 0.00596164573794891 7.58464598771136e-09 -1.46075167736497e-07 -4.64652272450397e-07 -5.59268858101854e-13 ", "SAMP_OFF=3300.0420831968", "SAMP_SCALE=3295.90302088781", ] ds.SetMetadata(rpc, 'RPC') sr = osr.SpatialReference() sr.SetWellKnownGeogCS('WGS84') demE179 = gdal.GetDriverByName('GTiff').Create('/vsimem/demE179.tif', 10, 10) demE179.SetProjection(sr.ExportToWkt()) demE179.SetGeoTransform([179, 0.1, 0, 0.5, 0, -0.1]) demE179.GetRasterBand(1).Fill(50) demW180 = gdal.GetDriverByName('GTiff').Create('/vsimem/demW180.tif', 10, 10) demW180.SetProjection(sr.ExportToWkt()) demW180.SetGeoTransform([-180, 0.1, 0, 0.5, 0, -0.1]) demW180.GetRasterBand(1).Fill(50) gdal.BuildVRT('/vsimem/transformer_15_dem.vrt', [demE179, demW180]) demE179 = None demW180 = None tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/transformer_15_dem.vrt']) (success, pnt) = tr.TransformPoint(0, 0, 0) assert success and pnt[0] == pytest.approx(180.02280735469199, abs=1e-7) and pnt[1] == pytest.approx(0.061069145746997976, abs=1e-7) (success, pnt_forward) = tr.TransformPoint(1, pnt[0], pnt[1], 0) assert success and pnt_forward[0] == pytest.approx(0, abs=0.1) and pnt_forward[1] == pytest.approx(0, abs=0.1), \ 'got wrong reverse transform result.' (success, pnt_forward) = tr.TransformPoint(1, pnt[0] - 360, pnt[1], 0) assert success and pnt_forward[0] == pytest.approx(0, abs=0.1) and pnt_forward[1] == pytest.approx(0, abs=0.1), \ 'got wrong reverse transform result.' # Now test around -180 ds = gdal.GetDriverByName('MEM').Create('', 6600, 4400) rpc.remove('LONG_OFF=179.9') rpc += ['LONG_OFF=-179.9'] ds.SetMetadata(rpc, 'RPC') tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/transformer_15_dem.vrt']) (success, pnt) = tr.TransformPoint(0, 6600, 4400) assert success and pnt[0] == pytest.approx(-180.02313813793387, abs=1e-7) and pnt[1] == pytest.approx(-0.061398913932229765, abs=1e-7) (success, pnt_forward) = tr.TransformPoint(1, pnt[0], pnt[1], 0) assert success and pnt_forward[0] == pytest.approx(6600, abs=0.1) and pnt_forward[1] == pytest.approx(4400, abs=0.1), \ 'got wrong reverse transform result.' (success, pnt_forward) = tr.TransformPoint(1, pnt[0] + 360, pnt[1], 0) assert success and pnt_forward[0] == pytest.approx(6600, abs=0.1) and pnt_forward[1] == pytest.approx(4400, abs=0.1), \ 'got wrong reverse transform result.' gdal.Unlink('/vsimem/demE179.tif') gdal.Unlink('/vsimem/demW180.tif') gdal.Unlink('/vsimem/transformer_15_dem.tif') gdal.Unlink('/vsimem/transformer_15_dem.vrt') ############################################################################### # Test approximate sub-transformers in GenImgProjTransformer # (we mostly test that the parameters are well recognized and serialized) def test_transformer_16(): gdal.Translate('/vsimem/transformer_16.tif', 'data/byte.tif', options="-gcp 0 0 440720.000 3751320.000 -gcp 0 20 440720.000 3750120.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 -a_srs EPSG:26711") gdal.Warp('/vsimem/transformer_16.vrt', '/vsimem/transformer_16.tif', options='-of VRT -t_srs EPSG:4326 -et 0 -to SRC_APPROX_ERROR_IN_SRS_UNIT=6.05 -to SRC_APPROX_ERROR_IN_PIXEL=0.1 -to REPROJECTION_APPROX_ERROR_IN_SRC_SRS_UNIT=6.1 -to REPROJECTION_APPROX_ERROR_IN_DST_SRS_UNIT=0.0001') f = gdal.VSIFOpenL('/vsimem/transformer_16.vrt', 'rb') if f is not None: content = gdal.VSIFReadL(1, 10000, f).decode('ASCII') gdal.VSIFCloseL(f) assert ('6.05' in content and \ '0.1' in content and \ '0.0001' in content and \ '6.1' in content) ds = gdal.Translate('', '/vsimem/transformer_16.vrt', format='MEM') assert ds.GetRasterBand(1).Checksum() == 4727 ds = None gdal.Unlink('/vsimem/transformer_16.tif') gdal.Unlink('/vsimem/transformer_16.vrt') ############################################################################### # Test RPC DEM with unexisting RPC DEM file def test_transformer_17(): ds = gdal.Open('data/rpc.vrt') with gdaltest.error_handler(): tr = gdal.Transformer(ds, None, ['METHOD=RPC', 'RPC_DEM=/vsimem/i/donot/exist/dem.tif']) assert tr is None def test_transformer_longlat_wrap_outside_180(): ds = gdal.GetDriverByName('MEM').Create('', 360, 1, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) ds.SetGeoTransform([-180, 1, 0, 0, 0, -1]) tr = gdal.Transformer(ds, ds, []) (success, pnt) = tr.TransformPoint(0, -0.5, 0.5, 0) assert success assert pnt[0] == pytest.approx(359.5, abs=0.000001), pnt assert pnt[1] == pytest.approx(0.5, abs=0.000001), pnt ############################################################################### # Test reprojection transformer without reverse path # NOTE: in case the inverse airy method is implemented some day, this test # might fail def test_transformer_no_reverse_method(): tr = gdal.Transformer(None, None, ['SRC_SRS=+proj=longlat +ellps=GRS80', 'DST_SRS=+proj=airy +ellps=GRS80']) assert tr (success, pnt) = tr.TransformPoint(0, 2, 49) assert success assert pnt[0] == pytest.approx(141270.54731856665, abs=1e-3), pnt assert pnt[1] == pytest.approx(4656605.104980032, abs=1e-3), pnt with gdaltest.error_handler(): (success, pnt) = tr.TransformPoint(1, 2, 49) assert not success ############################################################################### # Test precision of GCP based transformer with thin plate splines and lots of GCPs (2115). def test_transformer_tps_precision(): ds = gdal.Open('data/gcps_2115.vrt') tr = gdal.Transformer(ds, None, ['METHOD=GCP_TPS']) assert tr, 'tps transformation could not be computed' success = True maxDiffResult = 0.0 for gcp in ds.GetGCPs(): (s, result) = tr.TransformPoint(0, gcp.GCPPixel, gcp.GCPLine) success &= s diffResult = math.sqrt((gcp.GCPX - result[0])**2 + (gcp.GCPY -result[1])**2) maxDiffResult = max(maxDiffResult, diffResult) assert success, 'at least one point could not be transformed' assert maxDiffResult < 1e-3, 'at least one transformation exceeds the error bound' ############################################################################### def test_transformer_image_no_srs(): ds = gdal.GetDriverByName('MEM').Create('', 1, 1) ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) tr = gdal.Transformer(ds, None, ['COORDINATE_OPERATION=+proj=unitconvert +xy_in=1 +xy_out=2']) assert tr (success, pnt) = tr.TransformPoint(0, 10, 20, 0) assert success assert pnt[0] == pytest.approx(50), pnt assert pnt[1] == pytest.approx(-100), pnt gdalautotest-3.1.2/gcore/pam.py0000775000175000017500000004513113701057754015141 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: pam.py 66ea9bfa6e0e4ba27b0ae8ce7c75f3d5ad11da63 2020-01-28 12:30:39 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test functioning of the PAM metadata support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import stat import gdaltest from osgeo import gdal import pytest ############################################################################### # Check that we can read PAM metadata for existing PNM file. def test_pam_1(): gdaltest.pam_setting = gdal.GetConfigOption('GDAL_PAM_ENABLED', "NULL") gdal.SetConfigOption('GDAL_PAM_ENABLED', 'YES') ds = gdal.Open("data/byte.pnm") base_md = ds.GetMetadata() assert len(base_md) == 2 and base_md['other'] == 'red' and base_md['key'] == 'value', \ 'Default domain metadata missing' xml_md = ds.GetMetadata('xml:test') assert len(xml_md) == 1, 'xml:test metadata missing' assert isinstance(xml_md, list), 'xml:test metadata not returned as list.' expected_xml = """ Value """ assert xml_md[0] == expected_xml, 'xml does not match' ############################################################################### # Verify that we can write XML to a new file. def test_pam_2(): driver = gdal.GetDriverByName('PNM') ds = driver.Create('tmp/pam.pnm', 10, 10) band = ds.GetRasterBand(1) band.SetMetadata({'other': 'red', 'key': 'value'}) expected_xml = """ Value """ band.SetMetadata([expected_xml], 'xml:test') band.SetNoDataValue(100) ds = None ############################################################################### # Check that we can read PAM metadata for existing PNM file. def test_pam_3(): ds = gdal.Open("tmp/pam.pnm") band = ds.GetRasterBand(1) base_md = band.GetMetadata() assert len(base_md) == 2 and base_md['other'] == 'red' and base_md['key'] == 'value', \ 'Default domain metadata missing' xml_md = band.GetMetadata('xml:test') assert len(xml_md) == 1, 'xml:test metadata missing' assert isinstance(xml_md, list), 'xml:test metadata not returned as list.' expected_xml = """ Value """ assert xml_md[0] == expected_xml, 'xml does not match' assert band.GetNoDataValue() == 100, 'nodata not saved via pam' ds = None ds = gdal.Open('tmp/pam.pnm', gdal.GA_Update) assert ds.GetRasterBand(1).DeleteNoDataValue() == 0 ds = None ds = gdal.Open('tmp/pam.pnm') assert ds.GetRasterBand(1).GetNoDataValue() is None, \ 'got nodata value whereas none was expected' ############################################################################### # Check that PAM binary encoded nodata values work properly. # def test_pam_4(): # Copy test dataset to tmp directory so that the .aux.xml file # won't be rewritten with the statistics in the master dataset. shutil.copyfile('data/mfftest.hdr.aux.xml', 'tmp/mfftest.hdr.aux.xml') shutil.copyfile('data/mfftest.hdr', 'tmp/mfftest.hdr') shutil.copyfile('data/mfftest.r00', 'tmp/mfftest.r00') ds = gdal.Open('tmp/mfftest.hdr') stats = ds.GetRasterBand(1).GetStatistics(0, 1) assert stats[0] == 0 and stats[1] == 4, \ 'Got wrong min/max, likely nodata not working?' ############################################################################### # Verify that .aux files that don't match the configuration of the # dependent file are not utilized. (#2471) # def test_pam_5(): ds = gdal.Open('data/sasha.tif') filelist = ds.GetFileList() ds = None assert len(filelist) == 1, 'did not get expected file list.' ############################################################################### # Verify we can read nodata values from .aux files (#2505) # def test_pam_6(): ds = gdal.Open('data/f2r23.tif') assert ds.GetRasterBand(1).GetNoDataValue() == 0, \ 'did not get expected .aux sourced nodata.' ds = None assert not os.path.exists('data/f2r23.tif.aux.xml'), \ 'did not expect .aux.xml to be created.' ############################################################################### # Verify we can create overviews on PNG with PAM disabled (#3693) # def test_pam_7(): gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') shutil.copyfile('data/stefan_full_rgba.png', 'tmp/stefan_full_rgba.png') ds = gdal.Open('tmp/stefan_full_rgba.png') ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open('tmp/stefan_full_rgba.png') ovr_count = ds.GetRasterBand(1).GetOverviewCount() ds = None os.remove('tmp/stefan_full_rgba.png') os.remove('tmp/stefan_full_rgba.png.ovr') assert ovr_count == 1 ############################################################################### # Test that Band.SetDescription() goes through PAM (#3780) # def test_pam_8(): gdal.SetConfigOption('GDAL_PAM_ENABLED', 'YES') ds = gdal.GetDriverByName('GTiff').Create('/vsimem/pam_8.tif', 1, 1, 1) ds.GetRasterBand(1).SetDescription('foo') ds = None ds = gdal.Open('/vsimem/pam_8.tif') desc = ds.GetRasterBand(1).GetDescription() ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/pam_8.tif') assert desc == 'foo' ############################################################################### # Test that we can retrieve projection from xml:ESRI domain # def test_pam_9(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/pam_9.tif', 1, 1, 1) ds = None f = gdal.VSIFOpenL('/vsimem/pam_9.tif.aux.xml', 'wb') content = """ PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",500000.0],PARAMETER["false_northing",0.0],PARAMETER["central_meridian",-99.0],PARAMETER["scale_factor",0.9996],PARAMETER["latitude_of_origin",0.0],UNIT["Meter",1.0]] true """ gdal.VSIFWriteL(content, 1, len(content), f) gdal.VSIFCloseL(f) ds = gdal.Open('/vsimem/pam_9.tif') wkt = ds.GetProjectionRef() ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/pam_9.tif') expected_wkt = """PROJCS["NAD83 / UTM zone 14N",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert wkt == expected_wkt ############################################################################### # Test serializing and deserializing of various band metadata def test_pam_10(): src_ds = gdal.Open('data/testserialization.asc') ds = gdal.GetDriverByName('AAIGRID').CreateCopy('/vsimem/pam_10.asc', src_ds) src_ds = None ds = None ds = gdal.Open('/vsimem/pam_10.asc') gcps = ds.GetGCPs() assert len(gcps) == 2 and ds.GetGCPCount() == 2 assert ds.GetGCPProjection().find("WGS 84") != -1 assert (gcps[0].GCPPixel == 0 and gcps[0].GCPLine == 1 and \ gcps[0].GCPX == 2 and gcps[0].GCPY == 3 and gcps[0].GCPZ == 4) assert (gcps[1].GCPPixel == 1 and gcps[1].GCPLine == 2 and \ gcps[1].GCPX == 3 and gcps[1].GCPY == 4 and gcps[1].GCPZ == 5) band = ds.GetRasterBand(1) assert band.GetDescription() == 'MyDescription' assert band.GetUnitType() == 'MyUnit' assert band.GetOffset() == 1 assert band.GetScale() == 2 assert band.GetRasterColorInterpretation() == gdal.GCI_PaletteIndex assert band.GetCategoryNames() == ['Cat1', 'Cat2'] ct = band.GetColorTable() assert ct.GetColorEntry(0) == (0, 0, 0, 255) assert ct.GetColorEntry(1) == (1, 1, 1, 255) assert band.GetMaximum() == 0 assert band.GetMinimum() == 2 assert band.GetMetadata() == {'STATISTICS_MEAN': '1', 'STATISTICS_MINIMUM': '2', 'STATISTICS_MAXIMUM': '0', 'STATISTICS_STDDEV': '3'} ds = None gdal.Unlink('/vsimem/pam_10.asc') gdal.Unlink('/vsimem/pam_10.asc.aux.xml') ############################################################################### # Test PamProxyDb mechanism def test_pam_11(): # Create a read-only directory try: os.chmod('tmpdirreadonly', stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR) shutil.rmtree('tmpdirreadonly') except OSError: pass os.mkdir('tmpdirreadonly') shutil.copy('data/byte.tif', 'tmpdirreadonly/byte.tif') # FIXME: how do we create a read-only dir on windows ? # The following has no effect os.chmod('tmpdirreadonly', stat.S_IRUSR | stat.S_IXUSR) # Test that the directory is really read-only try: f = open('tmpdirreadonly/test', 'w') if f is not None: f.close() pytest.skip() except IOError: pass # Compute statistics --> the saving as .aux.xml should fail ds = gdal.Open('tmpdirreadonly/byte.tif') stats = ds.GetRasterBand(1).ComputeStatistics(False) assert stats[0] == 74, 'did not get expected minimum' gdal.ErrorReset() ds = None error_msg = gdal.GetLastErrorMsg() assert error_msg.startswith('Unable to save auxiliary information'), \ 'warning was expected at that point' # Check that we actually have no saved statistics ds = gdal.Open('tmpdirreadonly/byte.tif') stats = ds.GetRasterBand(1).GetStatistics(False, False) assert stats[3] == -1, 'did not expected to have stats at that point' ds = None # This must be run as an external process so we can override GDAL_PAM_PROXY_DIR # at the beginning of the process import test_py_scripts ret = test_py_scripts.run_py_script_as_external_script('.', 'pamproxydb', '-test1') assert ret.find('success') != -1, ('pamproxydb.py -test1 failed %s' % ret) # Test loading an existing proxydb ret = test_py_scripts.run_py_script_as_external_script('.', 'pamproxydb', '-test2') assert ret.find('success') != -1, ('pamproxydb.py -test2 failed %s' % ret) ############################################################################### # Test histogram with 64bit counts def test_pam_12(): shutil.copy('data/byte.tif', 'tmp') open('tmp/byte.tif.aux.xml', 'wt').write(""" -0.5 255.5 256 1 0 6000000000|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|6|0|0|0|0|0|0|0|0|37|0|0|0|0|0|0|0|57|0|0|0|0|0|0|0|62|0|0|0|0|0|0|0|66|0|0|0|0|0|0|0|0|72|0|0|0|0|0|0|0|31|0|0|0|0|0|0|0|24|0|0|0|0|0|0|0|12|0|0|0|0|0|0|0|0|7|0|0|0|0|0|0|0|12|0|0|0|0|0|0|0|5|0|0|0|0|0|0|0|3|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|0|2|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|0|0|0|0|1 """) ds = gdal.Open('tmp/byte.tif') (mini, maxi, _, hist1) = ds.GetRasterBand(1).GetDefaultHistogram() hist2 = ds.GetRasterBand(1).GetHistogram(include_out_of_range=1, approx_ok=0) ds.SetMetadataItem('FOO', 'BAR') ds.GetRasterBand(1).SetDefaultHistogram(mini, maxi, hist1) ds = None aux_xml = open('tmp/byte.tif.aux.xml', 'rt').read() gdal.Unlink('tmp/byte.tif') gdal.Unlink('tmp/byte.tif.aux.xml') assert hist1 == hist2 assert hist1[0] == 6000000000 assert '6000000000|' in aux_xml ############################################################################### # Test various stuff with PAM disabled # def test_pam_13(): gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') ds = gdal.GetDriverByName('PNM').Create('/vsimem/tmp.pnm', 1, 1) # if ds.GetRasterBand(1).SetColorTable(None) == 0: # gdaltest.post_reason('fail') # return 'fail' gdal.PushErrorHandler() ret = ds.GetRasterBand(1).SetNoDataValue(0) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = ds.GetRasterBand(1).DeleteNoDataValue() gdal.PopErrorHandler() assert ret != 0 ds = None assert gdal.VSIStatL('/vsimem/tmp.pnm.aux.xml') is None gdal.Unlink('/vsimem/tmp.pnm') gdal.SetConfigOption('GDAL_PAM_ENABLED', 'YES') ############################################################################### # Test that existing PAM metadata is preserved when new is added # https://github.com/OSGeo/gdal/issues/1430 def test_pam_metadata_preserved(): tmpfilename = '/vsimem/tmp.pnm' ds = gdal.GetDriverByName('PNM').Create(tmpfilename, 1, 1) ds.SetMetadataItem('foo', 'bar') ds = None ds = gdal.Open(tmpfilename) ds.GetRasterBand(1).SetMetadataItem('bar', 'baz') ds = None ds = gdal.Open(tmpfilename) assert ds.GetMetadataItem('foo') == 'bar' assert ds.GetRasterBand(1).GetMetadataItem('bar') == 'baz' ds = None gdal.GetDriverByName('PNM').Delete(tmpfilename) ############################################################################### # Test that we can retrieve GCPs from xml:ESRI domain # def test_pam_esri_GeodataXform_gcp(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/test_pam_esri_GeodataXform_gcp.tif', 20, 20, 1) ds = None gdal.FileFromMemBuffer('/vsimem/test_pam_esri_GeodataXform_gcp.tif.aux.xml', """ 1 PROJCS["NW Africa Grid",GEOGCS["GCS_NTF",DATUM["D_NTF",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936265]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1000000.0],PARAMETER["False_Northing",500000.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",34.0],PARAMETER["Scale_Factor",0.9994],PARAMETER["Latitude_Of_Origin",34.0],UNIT["Meter",1.0]] -36981000 -28020400 118575067.20124523 -100000 10000 -100000 10000 0.001 0.001 0.001 true 1 -2 3 -4 5 -6 7 8 9 10 11 12 """) ds = gdal.Open('/vsimem/test_pam_esri_GeodataXform_gcp.tif') gcps = ds.GetGCPs() sr_gt = ds.GetSpatialRef() sr_gcp = ds.GetGCPSpatialRef() gdal.GetDriverByName('GTiff').Delete('/vsimem/test_pam_esri_GeodataXform_gcp.tif') assert len(gcps) == 3 assert gcps[0].GCPPixel == 1 assert gcps[0].GCPLine == 2 assert gcps[0].GCPX == 7 assert gcps[0].GCPY == 8 assert gcps[0].GCPZ == 0 assert gcps[1].GCPPixel == 3 assert gcps[1].GCPLine == 4 assert gcps[1].GCPX == 9 assert gcps[1].GCPY == 10 assert gcps[1].GCPZ == 0 assert sr_gt is None assert sr_gcp is not None ds = None ############################################################################### # Cleanup. def test_pam_cleanup(): gdaltest.clean_tmp() if gdaltest.pam_setting != 'NULL': gdal.SetConfigOption('GDAL_PAM_ENABLED', gdaltest.pam_setting) else: gdal.SetConfigOption('GDAL_PAM_ENABLED', None) try: os.chmod('tmpdirreadonly', stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR) shutil.rmtree('tmpdirreadonly') except OSError: pass try: shutil.rmtree('tmppamproxydir') except OSError: pass gdalautotest-3.1.2/gcore/geoloc.py0000775000175000017500000000353613701057754015637 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: geoloc.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test Geolocation warper. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Verify warped result. def test_geoloc_1(): tst = gdaltest.GDALTest('VRT', 'warpsst.vrt', 1, 61818) return tst.testOpen(check_filelist=False) gdalautotest-3.1.2/gcore/test_driver_metadata.py0000664000175000017500000005072013701057754020553 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: test_driver_metadata.py 2b4ed5a1103094430f1b8c85f94eea10aaafec54 2020-06-09 11:01:20 +0200 René Buffat $ # # Project: GDAL/OGR Test Suite # Purpose: Test driver matadata # Author: Rene Buffat # ############################################################################### # Copyright (c) 2020, Rene Buffat # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest from osgeo import gdal from lxml import etree all_driver_names = [gdal.GetDriver(i).GetDescription() for i in range(gdal.GetDriverCount())] ogr_driver_names = [driver_name for driver_name in all_driver_names if gdal.GetDriverByName(driver_name).GetMetadataItem('DCAP_VECTOR') == 'YES'] gdal_driver_names = [driver_name for driver_name in all_driver_names if gdal.GetDriverByName(driver_name).GetMetadataItem('DCAP_RASTER') == 'YES'] multidim_driver_name = [driver_name for driver_name in gdal_driver_names if gdal.GetDriverByName(driver_name).GetMetadataItem('DCAP_MULTIDIM_RASTER') == 'YES'] schema_openoptionslist = etree.XML(r""" """) schema_creationoptionslist_xml = etree.XML(r""" """) schema_layer_creationoptionslist_xml = etree.XML(r""" """) schema_multidim_array_creationoptionslist_xml =etree.XML(r""" """) schema_multidim_attribute_creationoptionslist_xml = etree.XML(r""" """) schema_multidim_dataset_creationoptionslist_xml = etree.XML(r""" """) schema_multidim_dimension_creationoptionslist_xml = etree.XML(r""" """) @pytest.mark.parametrize('driver_name', all_driver_names) def test_metadata_openoptionlist(driver_name): """ Test if DMD_OPENOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_openoptionslist) driver = gdal.GetDriverByName(driver_name) openoptionlist_xml = driver.GetMetadataItem('DMD_OPENOPTIONLIST') if openoptionlist_xml is not None and len(openoptionlist_xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(openoptionlist_xml, parser) except: print(openoptionlist_xml) raise @pytest.mark.parametrize('driver_name', all_driver_names) def test_metadata_creationoptionslist(driver_name): """ Test if DMD_CREATIONOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) creationoptionslist_xml = driver.GetMetadataItem('DMD_CREATIONOPTIONLIST') if creationoptionslist_xml is not None and len(creationoptionslist_xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(creationoptionslist_xml, parser) except: print(creationoptionslist_xml) raise @pytest.mark.parametrize('driver_name', ogr_driver_names) def test_metadata_layer_creationoptionslist(driver_name): """ Test if DS_LAYER_CREATIONOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_layer_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) creationoptionslist_xml = driver.GetMetadataItem('DS_LAYER_CREATIONOPTIONLIST') if creationoptionslist_xml is not None and len(creationoptionslist_xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(creationoptionslist_xml, parser) except: print(creationoptionslist_xml) raise @pytest.mark.parametrize('driver_name', multidim_driver_name) def test_metadata_multidim_array_creationoptionslist(driver_name): """ Test if DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_multidim_array_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) xml = driver.GetMetadataItem('DMD_MULTIDIM_ARRAY_CREATIONOPTIONLIST') if xml is not None and len(xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(xml, parser) except: print(xml) raise @pytest.mark.parametrize('driver_name', multidim_driver_name) def test_metadata_multidim_attribute_creationoptionslist(driver_name): """ Test if DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_multidim_attribute_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) xml = driver.GetMetadataItem('DMD_MULTIDIM_ATTRIBUTE_CREATIONOPTIONLIST') if xml is not None and len(xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(xml, parser) except: print(xml) raise @pytest.mark.parametrize('driver_name', multidim_driver_name) def test_metadata_multidim_dataset_creationoptionslist(driver_name): """ Test if DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_multidim_dataset_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) xml = driver.GetMetadataItem('DMD_MULTIDIM_DATASET_CREATIONOPTIONLIST') if xml is not None and len(xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(xml, parser) except: print(xml) raise @pytest.mark.parametrize('driver_name', multidim_driver_name) def test_metadata_multidim_dimension_creationoptionslist(driver_name): """ Test if DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST metadataitem is present and can be parsed """ schema = etree.XMLSchema(schema_multidim_dimension_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) xml = driver.GetMetadataItem('DMD_MULTIDIM_DIMENSION_CREATIONOPTIONLIST') if xml is not None and len(xml) > 0: # do not fail try: parser = etree.XMLParser(schema=schema) etree.fromstring(xml, parser) except: print(xml) raise @pytest.mark.parametrize('driver_name', multidim_driver_name) def test_metadata_multidim_group_creationoptionslist(driver_name): """ Test if DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST metadataitem is present and can be parsed """ # TODO: create schema if xml is available # schema = etree.XMLSchema(schema_multidim_group_creationoptionslist_xml) driver = gdal.GetDriverByName(driver_name) xml = driver.GetMetadataItem('DMD_MULTIDIM_GROUP_CREATIONOPTIONLIST') if xml is not None and len(xml) > 0: # do not fail try: # parser = etree.XMLParser(schema=schema) # etree.fromstring(xml, parser) etree.fromstring(xml) except: print(xml) raise @pytest.mark.parametrize('driver_name', all_driver_names) def test_metadata_creation_field_datatypes(driver_name): """ Test if DMD_CREATIONFIELDDATATYPES metadataitem returns valid datatypes """ valid_datatypes = {'Integer', 'Integer64', 'Real', 'String', 'Date', 'DateTime', 'Time', 'IntegerList', 'Integer64List', 'RealList', 'StringList', 'Binary'} driver = gdal.GetDriverByName(driver_name) datatypes_str = driver.GetMetadataItem('DMD_CREATIONFIELDDATATYPES') if datatypes_str is not None: for datatype in datatypes_str.split(' '): assert datatype in valid_datatypes @pytest.mark.parametrize('driver_name', all_driver_names) def test_metadata_creation_sub_field_datatypes(driver_name): """ Test if DMD_CREATIONFIELDDATASUBTYPES metadataitem returns valid data subtypes """ valid_datatypes = {'Boolean', 'Float32', 'Int16'} driver = gdal.GetDriverByName(driver_name) datatypes_str = driver.GetMetadataItem('DMD_CREATIONFIELDDATASUBTYPES') if datatypes_str is not None: for datatype in datatypes_str.split(' '): assert datatype in valid_datatypes gdalautotest-3.1.2/gcore/basic_test_subprocess.py0000775000175000017500000000336313701057754020755 0ustar eveneven#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: basic_test_subprocess.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic GDAL open # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal if __name__ == '__main__': # test_basic_test_8 print(gdal.VersionInfo('LICENSE')) gdalautotest-3.1.2/gcore/vsiaz.py0000775000175000017500000012033313701057754015516 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: vsiaz.py 40efacfd86d23b628d9423a50e0b1e593de6ebf5 2020-06-18 15:33:57 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsiaz # Author: Even Rouault # ############################################################################### # Copyright (c) 2017 Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import stat import sys from osgeo import gdal import gdaltest import webserver import pytest def open_for_read(uri): """ Opens a test file for reading. """ return gdal.VSIFOpenExL(uri, 'rb', 1) ############################################################################### def test_vsiaz_init(): gdaltest.az_vars = {} for var in ('AZURE_STORAGE_CONNECTION_STRING', 'AZURE_STORAGE_ACCOUNT', 'AZURE_STORAGE_ACCESS_KEY'): gdaltest.az_vars[var] = gdal.GetConfigOption(var) if gdaltest.az_vars[var] is not None: gdal.SetConfigOption(var, "") assert gdal.GetSignedURL('/vsiaz/foo/bar') is None ############################################################################### # Error cases def test_vsiaz_real_server_errors(): if not gdaltest.built_against_curl(): pytest.skip() # Missing AZURE_STORAGE_ACCOUNT gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiaz/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('AZURE_STORAGE_ACCOUNT') >= 0 gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiaz_streaming/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('AZURE_STORAGE_ACCOUNT') >= 0 # Invalid AZURE_STORAGE_CONNECTION_STRING gdal.SetConfigOption('AZURE_STORAGE_CONNECTION_STRING', 'invalid') gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiaz/foo/bar') assert f is None gdal.SetConfigOption('AZURE_STORAGE_CONNECTION_STRING', '') gdal.SetConfigOption('AZURE_STORAGE_ACCOUNT', 'AZURE_STORAGE_ACCOUNT') # Missing AZURE_STORAGE_ACCESS_KEY gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiaz/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('AZURE_STORAGE_ACCESS_KEY') >= 0 gdal.SetConfigOption('AZURE_STORAGE_ACCESS_KEY', 'AZURE_STORAGE_ACCESS_KEY') gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiaz/foo/bar.baz') if f is not None: if f is not None: gdal.VSIFCloseL(f) if gdal.GetConfigOption('APPVEYOR') is not None: return pytest.fail(gdal.VSIGetLastErrorMsg()) gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsiaz_streaming/foo/bar.baz') assert f is None, gdal.VSIGetLastErrorMsg() ############################################################################### def test_vsiaz_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AZURE_STORAGE_CONNECTION_STRING', 'DefaultEndpointsProtocol=http;AccountName=myaccount;AccountKey=MY_ACCOUNT_KEY;EndpointSuffix=127.0.0.1:%d' % gdaltest.webserver_port) gdal.SetConfigOption('AZURE_STORAGE_ACCOUNT', '') gdal.SetConfigOption('AZURE_STORAGE_ACCESS_KEY', '') gdal.SetConfigOption('CPL_AZURE_TIMESTAMP', 'my_timestamp') ############################################################################### # Test with a fake Azure Blob server def test_vsiaz_fake_basic(): if gdaltest.webserver_port == 0: pytest.skip() signed_url = gdal.GetSignedURL('/vsiaz/az_fake_bucket/resource', ['START_DATE=20180213T123456']) assert (signed_url in ('http://127.0.0.1:8080/azure/blob/myaccount/az_fake_bucket/resource?se=2018-02-13T13%3A34%3A56Z&sig=9Jc4yBFlSRZSSxf059OohN6pYRrjuHWJWSEuryczN%2FM%3D&sp=r&sr=c&st=2018-02-13T12%3A34%3A56Z&sv=2012-02-12', 'http://127.0.0.1:8081/azure/blob/myaccount/az_fake_bucket/resource?se=2018-02-13T13%3A34%3A56Z&sig=9Jc4yBFlSRZSSxf059OohN6pYRrjuHWJWSEuryczN%2FM%3D&sp=r&sr=c&st=2018-02-13T12%3A34%3A56Z&sv=2012-02-12')) def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'Authorization' not in h or \ h['Authorization'] != 'SharedKey myaccount:zKb0EXnM/RinBjcUE9EU+qfRIGaIItoUElSWc+FE24E=' or \ 'x-ms-date' not in h or h['x-ms-date'] != 'my_timestamp': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/az_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsiaz/az_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' def method(request): request.protocol_version = 'HTTP/1.1' h = request.headers if 'Authorization' not in h or \ h['Authorization'] != 'SharedKey myaccount:8d6IEeOsl7qGpKAxaTTxx2xMNpvqWq8DGlFE67lsmQ4=' or \ 'x-ms-date' not in h or h['x-ms-date'] != 'my_timestamp' or \ 'Accept-Encoding' not in h or h['Accept-Encoding'] != 'gzip': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/az_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsiaz_streaming/az_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_fake_bucket/resource2.bin', 200, {'Content-Length': '1000000'}) with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsiaz/az_fake_bucket/resource2.bin') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_fake_bucket/resource2.bin', 200, {'Content-Length': 1000000}) with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsiaz_streaming/az_fake_bucket/resource2.bin') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() ############################################################################### # Test ReadDir() with a fake Azure Blob server def test_vsiaz_fake_readdir(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/az_fake_bucket2?comp=list&delimiter=%2F&prefix=a_dir%2F&restype=container', 200, {'Content-type': 'application/xml'}, """ a_dir/ bla a_dir/resource3.bin 01 Jan 1970 00:00:01 123456 """) handler.add('GET', '/azure/blob/myaccount/az_fake_bucket2?comp=list&delimiter=%2F&marker=bla&prefix=a_dir%2F&restype=container', 200, {'Content-type': 'application/xml'}, """ a_dir/ a_dir/resource4.bin 16 Oct 2016 12:34:56 456789 a_dir/subdir/ """) with webserver.install_http_handler(handler): f = open_for_read('/vsiaz/az_fake_bucket2/a_dir/resource3.bin') if f is None: if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') pytest.fail() gdal.VSIFCloseL(f) dir_contents = gdal.ReadDir('/vsiaz/az_fake_bucket2/a_dir') assert dir_contents == ['resource3.bin', 'resource4.bin', 'subdir'] assert gdal.VSIStatL('/vsiaz/az_fake_bucket2/a_dir/resource3.bin').size == 123456 assert gdal.VSIStatL('/vsiaz/az_fake_bucket2/a_dir/resource3.bin').mtime == 1 # ReadDir on something known to be a file shouldn't cause network access dir_contents = gdal.ReadDir('/vsiaz/az_fake_bucket2/a_dir/resource3.bin') assert dir_contents is None # Test error on ReadDir() handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/az_fake_bucket2?comp=list&delimiter=%2F&prefix=error_test%2F&restype=container', 500) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiaz/az_fake_bucket2/error_test/') assert dir_contents is None # List containers (empty result) handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/?comp=list', 200, {'Content-type': 'application/xml'}, """ """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiaz/') assert dir_contents == ['.'] gdal.VSICurlClearCache() # List containers handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/?comp=list', 200, {'Content-type': 'application/xml'}, """ mycontainer1 bla """) handler.add('GET', '/azure/blob/myaccount/?comp=list&marker=bla', 200, {'Content-type': 'application/xml'}, """ mycontainer2 """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsiaz/') assert dir_contents == ['mycontainer1', 'mycontainer2'] ############################################################################### # Test write def test_vsiaz_fake_write(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Test creation of BlockBob f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): h = request.headers if 'Authorization' not in h or \ h['Authorization'] != 'SharedKey myaccount:AigkrY7q66WCrx3JRKBte56k7kxV2cxB/ZyGNubxk5I=' or \ 'Expect' not in h or h['Expect'] != '100-continue' or \ 'Content-Length' not in h or h['Content-Length'] != '40000' or \ 'x-ms-date' not in h or h['x-ms-date'] != 'my_timestamp' or \ 'x-ms-blob-type' not in h or h['x-ms-blob-type'] != 'BlockBlob': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(40000).decode('ascii') if len(content) != 40000: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(201) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL('x' * 35000, 1, 35000, f) ret += gdal.VSIFWriteL('x' * 5000, 1, 5000, f) if ret != 40000: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) # Simulate illegal read f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFReadL(1, 1, f) assert not ret gdal.VSIFCloseL(f) # Simulate illegal seek f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFSeekL(f, 1, 0) assert ret != 0 gdal.VSIFCloseL(f) # Simulate failure when putting BlockBob f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', custom_method=method) if gdal.VSIFSeekL(f, 0, 0) != 0: gdal.VSIFCloseL(f) pytest.fail() gdal.VSIFWriteL('x' * 35000, 1, 35000, f) if gdal.VSIFTellL(f) != 35000: gdal.VSIFCloseL(f) pytest.fail() if gdal.VSIFSeekL(f, 35000, 0) != 0: gdal.VSIFCloseL(f) pytest.fail() if gdal.VSIFSeekL(f, 0, 1) != 0: gdal.VSIFCloseL(f) pytest.fail() if gdal.VSIFSeekL(f, 0, 2) != 0: gdal.VSIFCloseL(f) pytest.fail() if gdal.VSIFEofL(f) != 0: gdal.VSIFCloseL(f) pytest.fail() with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.VSIFCloseL(f) if ret == 0: gdal.VSIFCloseL(f) pytest.fail(ret) # Simulate creation of BlockBob over an existing blob of incompatible type f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', 409) handler.add('DELETE', '/azure/blob/myaccount/test_copy/file.bin', 202) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', 201) with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) # Test creation of AppendBlob gdal.SetConfigOption('VSIAZ_CHUNK_SIZE_BYTES', '10') f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') gdal.SetConfigOption('VSIAZ_CHUNK_SIZE_BYTES', None) assert f is not None handler = webserver.SequentialHandler() def method(request): h = request.headers if 'Authorization' not in h or \ h['Authorization'] != 'SharedKey myaccount:KimVui3ptY9D5ftLlsI7CNOgK36CNAEzsXqcuHskdEY=' or \ 'Content-Length' not in h or h['Content-Length'] != '0' or \ 'x-ms-date' not in h or h['x-ms-date'] != 'my_timestamp' or \ 'x-ms-blob-type' not in h or h['x-ms-blob-type'] != 'AppendBlob': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.send_response(201) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', custom_method=method) def method(request): h = request.headers if 'Content-Length' not in h or h['Content-Length'] != '10' or \ 'x-ms-date' not in h or h['x-ms-date'] != 'my_timestamp' or \ 'x-ms-blob-type' not in h or h['x-ms-blob-type'] != 'AppendBlob': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' content = request.rfile.read(10).decode('ascii') if content != '0123456789': sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(201) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', custom_method=method) def method(request): h = request.headers if 'Content-Length' not in h or h['Content-Length'] != '6' or \ 'x-ms-date' not in h or h['x-ms-date'] != 'my_timestamp' or \ 'x-ms-blob-type' not in h or h['x-ms-blob-type'] != 'AppendBlob': sys.stderr.write('Bad headers: %s\n' % str(h)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' content = request.rfile.read(6).decode('ascii') if content != 'abcdef': sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(201) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL('0123456789abcdef', 1, 16, f) if ret != 16: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) # Test failed creation of AppendBlob gdal.SetConfigOption('VSIAZ_CHUNK_SIZE_BYTES', '10') f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') gdal.SetConfigOption('VSIAZ_CHUNK_SIZE_BYTES', None) assert f is not None handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', custom_method=method) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.VSIFWriteL('0123456789abcdef', 1, 16, f) if ret != 0: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) # Test failed writing of a block of an AppendBlob gdal.SetConfigOption('VSIAZ_CHUNK_SIZE_BYTES', '10') f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') gdal.SetConfigOption('VSIAZ_CHUNK_SIZE_BYTES', None) assert f is not None handler = webserver.SequentialHandler() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', 201) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', 403) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.VSIFWriteL('0123456789abcdef', 1, 16, f) if ret != 0: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) ############################################################################### # Test write with retry def test_vsiaz_write_blockblob_retry(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Test creation of BlockBob f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None with gdaltest.config_options({'GDAL_HTTP_MAX_RETRY': '2', 'GDAL_HTTP_RETRY_DELAY': '0.01'}): handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(3).decode('ascii') if len(content) != 3: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(201) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', 502) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', custom_method=method) with gdaltest.error_handler(): with webserver.install_http_handler(handler): assert gdal.VSIFWriteL('foo', 1, 3, f) == 3 gdal.VSIFCloseL(f) ############################################################################### # Test write with retry def test_vsiaz_write_appendblob_retry(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() with gdaltest.config_options({'GDAL_HTTP_MAX_RETRY': '2', 'GDAL_HTTP_RETRY_DELAY': '0.01', 'VSIAZ_CHUNK_SIZE_BYTES': '10'}): f = gdal.VSIFOpenL('/vsiaz/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', 502) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin', 201) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', 502) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', 201) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', 502) handler.add('PUT', '/azure/blob/myaccount/test_copy/file.bin?comp=appendblock', 201) with gdaltest.error_handler(): with webserver.install_http_handler(handler): assert gdal.VSIFWriteL('0123456789abcdef', 1, 16, f) == 16 gdal.VSIFCloseL(f) ############################################################################### # Test Unlink() def test_vsiaz_fake_unlink(): if gdaltest.webserver_port == 0: pytest.skip() # Success handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_unlink/myfile', 200, {'Content-Length': '1'}) handler.add('DELETE', '/azure/blob/myaccount/az_bucket_test_unlink/myfile', 202, {'Connection': 'close'}) with webserver.install_http_handler(handler): ret = gdal.Unlink('/vsiaz/az_bucket_test_unlink/myfile') assert ret == 0 # Failure handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_unlink/myfile', 200, {'Content-Length': '1'}) handler.add('DELETE', '/azure/blob/myaccount/az_bucket_test_unlink/myfile', 400, {'Connection': 'close'}) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.Unlink('/vsiaz/az_bucket_test_unlink/myfile') assert ret == -1 ############################################################################### # Test Mkdir() / Rmdir() def test_vsiaz_fake_mkdir_rmdir(): if gdaltest.webserver_port == 0: pytest.skip() # Invalid name ret = gdal.Mkdir('/vsiaz', 0) assert ret != 0 handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_mkdir/dir/', 404, {'Connection': 'close'}) handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=dir%2F&restype=container', 200, {'Connection': 'close'}) handler.add('PUT', '/azure/blob/myaccount/az_bucket_test_mkdir/dir/.gdal_marker_for_dir', 201) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsiaz/az_bucket_test_mkdir/dir', 0) assert ret == 0 # Try creating already existing directory handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_mkdir/dir/', 404) handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=dir%2F&restype=container', 200, {'Connection': 'close', 'Content-type': 'application/xml'}, """ dir/ dir/.gdal_marker_for_dir """) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsiaz/az_bucket_test_mkdir/dir', 0) assert ret != 0 # Invalid name ret = gdal.Rmdir('/vsiaz') assert ret != 0 # Not a directory handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_mkdir/it_is_a_file/', 404) handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=it_is_a_file%2F&restype=container', 200, {'Connection': 'close', 'Content-type': 'application/xml'}, """ it_is_a_file/ """) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiaz/az_bucket_test_mkdir/it_is_a_file') assert ret != 0 # Valid handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=dir%2F&restype=container', 200, {'Connection': 'close', 'Content-type': 'application/xml'}, """ dir/ dir/.gdal_marker_for_dir """) handler.add('DELETE', '/azure/blob/myaccount/az_bucket_test_mkdir/dir/.gdal_marker_for_dir', 202) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiaz/az_bucket_test_mkdir/dir') assert ret == 0 # Try deleting already deleted directory handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_mkdir/dir/', 404) handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=dir%2F&restype=container', 200) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiaz/az_bucket_test_mkdir/dir') assert ret != 0 # Try deleting non-empty directory handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/az_bucket_test_mkdir/dir_nonempty/', 404) handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=dir_nonempty%2F&restype=container', 200, {'Connection': 'close', 'Content-type': 'application/xml'}, """ dir_nonempty/ dir_nonempty/foo """) handler.add('GET', '/azure/blob/myaccount/az_bucket_test_mkdir?comp=list&delimiter=%2F&maxresults=1&prefix=dir_nonempty%2F&restype=container', 200, {'Connection': 'close', 'Content-type': 'application/xml'}, """ dir_nonempty/ dir_nonempty/foo """) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsiaz/az_bucket_test_mkdir/dir_nonempty') assert ret != 0 ############################################################################### def test_vsiaz_fake_test_BlobEndpointInConnectionString(): if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.config_option('AZURE_STORAGE_CONNECTION_STRING', 'DefaultEndpointsProtocol=http;AccountName=myaccount;AccountKey=MY_ACCOUNT_KEY;BlobEndpoint=http://127.0.0.1:%d/myaccount' % gdaltest.webserver_port): signed_url = gdal.GetSignedURL('/vsiaz/az_fake_bucket/resource') assert 'http://127.0.0.1:%d/myaccount/az_fake_bucket/resource' % gdaltest.webserver_port in signed_url ############################################################################### # Test rename def test_vsiaz_fake_rename(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('HEAD', '/azure/blob/myaccount/test/source.txt', 200, {'Content-Length': '3'}) handler.add('HEAD', '/azure/blob/myaccount/test/target.txt', 404) handler.add('GET', '/azure/blob/myaccount/test?comp=list&delimiter=%2F&maxresults=1&prefix=target.txt%2F&restype=container', 200) def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return expected = 'http://127.0.0.1:%d/azure/blob/myaccount/test/source.txt' % gdaltest.webserver_port if request.headers['x-ms-copy-source'] != expected: sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(202) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/azure/blob/myaccount/test/target.txt', custom_method=method) handler.add('DELETE', '/azure/blob/myaccount/test/source.txt', 202) with webserver.install_http_handler(handler): assert gdal.Rename( '/vsiaz/test/source.txt', '/vsiaz/test/target.txt') == 0 ############################################################################### # Test OpenDir() with a fake server def test_vsiaz_opendir(): if gdaltest.webserver_port == 0: pytest.skip() # Unlimited depth handler = webserver.SequentialHandler() handler.add('GET', '/azure/blob/myaccount/opendir?comp=list&restype=container', 200, {'Content-type': 'application/xml'}, """ test.txt 01 Jan 1970 00:00:01 40 subdir/.gdal_marker_for_dir subdir/test.txt 01 Jan 1970 00:00:01 4 """) with webserver.install_http_handler(handler): d = gdal.OpenDir('/vsiaz/opendir') assert d is not None entry = gdal.GetNextDirEntry(d) assert entry.name == 'test.txt' assert entry.size == 40 assert entry.mode == 32768 assert entry.mtime == 1 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir/' assert entry.mode == 16384 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir/test.txt' assert entry.size == 4 assert entry.mode == 32768 entry = gdal.GetNextDirEntry(d) assert entry is None gdal.CloseDir(d) ############################################################################### def test_vsiaz_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Nominal cases (require valid credentials) def test_vsiaz_extra_1(): if not gdaltest.built_against_curl(): pytest.skip() az_resource = gdal.GetConfigOption('AZ_RESOURCE') if az_resource is None: pytest.skip('Missing AZ_RESOURCE') if '/' not in az_resource: path = '/vsiaz/' + az_resource statres = gdal.VSIStatL(path) assert statres is not None and stat.S_ISDIR(statres.mode), \ ('%s is not a valid bucket' % path) readdir = gdal.ReadDir(path) assert readdir is not None, 'ReadDir() should not return empty list' for filename in readdir: if filename != '.': subpath = path + '/' + filename assert gdal.VSIStatL(subpath) is not None, \ ('Stat(%s) should not return an error' % subpath) unique_id = 'vsiaz_test' subpath = path + '/' + unique_id ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id in readdir, \ ('ReadDir(%s) should contain %s' % (path, unique_id)) ret = gdal.Mkdir(subpath, 0) assert ret != 0, ('Mkdir(%s) repeated should return an error' % subpath) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id not in readdir, \ ('ReadDir(%s) should not contain %s' % (path, unique_id)) ret = gdal.Rmdir(subpath) assert ret != 0, ('Rmdir(%s) repeated should return an error' % subpath) ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'wb') assert f is not None gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) ret = gdal.Rmdir(subpath) assert ret != 0, \ ('Rmdir(%s) on non empty directory should return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) assert gdal.Rename(subpath + '/test.txt', subpath + '/test2.txt') == 0 f = gdal.VSIFOpenL(subpath + '/test2.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) ret = gdal.Unlink(subpath + '/test2.txt') assert ret >= 0, \ ('Unlink(%s) should not return an error' % (subpath + '/test2.txt')) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) return f = open_for_read('/vsiaz/' + az_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 # Same with /vsiaz_streaming/ f = open_for_read('/vsiaz_streaming/' + az_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 if False: # pylint: disable=using-constant-test # we actually try to read at read() time and bSetError = false # Invalid bucket : "The specified bucket does not exist" gdal.ErrorReset() f = open_for_read('/vsiaz/not_existing_bucket/foo') with gdaltest.error_handler(): gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert gdal.VSIGetLastErrorMsg() != '' # Invalid resource gdal.ErrorReset() f = open_for_read('/vsiaz_streaming/' + az_resource + '/invalid_resource.baz') assert f is None, gdal.VSIGetLastErrorMsg() # Test GetSignedURL() signed_url = gdal.GetSignedURL('/vsiaz/' + az_resource) f = open_for_read('/vsicurl_streaming/' + signed_url) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 ############################################################################### def test_vsiaz_cleanup(): for var in gdaltest.az_vars: gdal.SetConfigOption(var, gdaltest.az_vars[var]) gdalautotest-3.1.2/gcore/bmp_write.py0000775000175000017500000000444613701057754016360 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: bmp_write.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for Microsoft Bitmap (.bmp) # BMP driver. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev # Copyright (c) 2008-2009, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest ############################################################################### # Test creating an in memory copy. def test_bmp_vsimem(): tst = gdaltest.GDALTest('BMP', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # When imported build a list of units based on the files available. init_list = [ ('byte.tif', 4672), ('utmsmall.tif', 50054), ('8bit_pal.bmp', 4672), ] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.parametrize( 'testfunction', [ 'testCreateCopy', 'testCreate', ] ) @pytest.mark.require_driver('BMP') def test_bmp_create(filename, checksum, testfunction): ut = gdaltest.GDALTest('BMP', filename, 1, checksum) getattr(ut, testfunction)() gdalautotest-3.1.2/gcore/numpy_rw.py0000775000175000017500000006162413701057754016251 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: numpy_rw.py 31b4495025a1cf4f4d9e0361915c411901cfa67d 2020-04-10 17:58:24 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic integration with Numeric Python. # Author: Frank Warmerdam, warmerdam@pobox.com # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal import pytest ############################################################################### # verify that we can load Numeric python, and find the Numpy driver. def test_numpy_rw_1(): gdaltest.numpy_drv = None try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() gdal.AllRegister() gdaltest.numpy_drv = gdal.GetDriverByName('NUMPY') assert gdaltest.numpy_drv is not None, 'NUMPY driver not found!' ############################################################################### # Load a test file into a memory Numpy array, and verify the checksum. def test_numpy_rw_2(): if gdaltest.numpy_drv is None: pytest.skip() from osgeo import gdalnumeric array = gdalnumeric.LoadFile('data/utmsmall.tif') assert array is not None, 'Failed to load utmsmall.tif into array' ds = gdalnumeric.OpenArray(array) assert ds is not None, 'Failed to open memory array as dataset.' bnd = ds.GetRasterBand(1) assert bnd.Checksum() == 50054, 'Didnt get expected checksum on reopened file' ds = None ############################################################################### # Test loading complex data. def test_numpy_rw_3(): if gdaltest.numpy_drv is None: pytest.skip() ds = gdal.Open('data/cint_sar.tif') array = ds.ReadAsArray() assert array[2][3] == 116 - 16j, 'complex value read improperly.' ############################################################################### # Test a band read with downsampling. def test_numpy_rw_4(): if gdaltest.numpy_drv is None: pytest.skip() ds = gdal.Open('data/byte.tif') array = ds.GetRasterBand(1).ReadAsArray(0, 0, 20, 20, 5, 5) assert array[2][3] == 123, \ 'Read wrong value - perhaps downsampling algorithm has changed subtly?' ############################################################################### # Test reading a multi-band file. def test_numpy_rw_5(): if gdaltest.numpy_drv is None: pytest.skip() from osgeo import gdalnumeric array = gdalnumeric.LoadFile('data/rgbsmall.tif', 35, 21, 1, 1) assert array[0][0][0] == 78, 'value read improperly.' assert array[1][0][0] == 117, 'value read improperly.' assert array[2][0][0] == 24, 'value read improperly.' array = gdalnumeric.LoadFile('data/rgbsmall.tif', buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Bilinear) assert array.shape[0] == 3 and array.shape[1] == 1 and array.shape[2] == 1, \ 'wrong array shape.' assert array[0][0][0] == 70 and array[1][0][0] == 97 and array[2][0][0] == 29, \ 'value read improperly.' import numpy array = numpy.zeros([3, 1, 1], dtype=numpy.uint8) ds = gdal.Open('data/rgbsmall.tif') ds.ReadAsArray(buf_obj=array, resample_alg=gdal.GRIORA_Bilinear) assert array[0][0][0] == 70 and array[1][0][0] == 97 and array[2][0][0] == 29, \ 'value read improperly.' ############################################################################### # Check that Band.ReadAsArray() can accept an already allocated array (#2658, #3028) def test_numpy_rw_6(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdalnumeric ds = gdal.Open('data/byte.tif') array = numpy.zeros([ds.RasterYSize, ds.RasterXSize], numpy.uint8) array_res = ds.GetRasterBand(1).ReadAsArray(buf_obj=array) assert array is array_res ds2 = gdalnumeric.OpenArray(array) assert ds2.GetRasterBand(1).Checksum() == ds.GetRasterBand(1).Checksum() ############################################################################### # Check that Dataset.ReadAsArray() can accept an already allocated array (#2658, #3028) def test_numpy_rw_7(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdalnumeric ds = gdal.Open('data/byte.tif') array = numpy.zeros([1, ds.RasterYSize, ds.RasterXSize], numpy.uint8) array_res = ds.ReadAsArray(buf_obj=array) assert array is array_res ds2 = gdalnumeric.OpenArray(array) assert ds2.GetRasterBand(1).Checksum() == ds.GetRasterBand(1).Checksum() # Try again with a 2D array array = numpy.zeros([ds.RasterYSize, ds.RasterXSize], numpy.uint8) array_res = ds.ReadAsArray(buf_obj=array) assert array is array_res ds2 = gdalnumeric.OpenArray(array) assert ds2.GetRasterBand(1).Checksum() == ds.GetRasterBand(1).Checksum() # With a multi band file ds = gdal.Open('data/rgbsmall.tif') array = numpy.zeros([ds.RasterCount, ds.RasterYSize, ds.RasterXSize], numpy.uint8) array_res = ds.ReadAsArray(buf_obj=array) assert array is array_res ds2 = gdalnumeric.OpenArray(array) assert ds2.GetRasterBand(1).Checksum() == ds.GetRasterBand(1).Checksum() ############################################################################### # Check that Dataset.ReadAsArray() with multi-band data def test_numpy_rw_8(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdalnumeric ds = gdal.Open('data/rgbsmall.tif') array = numpy.zeros([ds.RasterCount, ds.RasterYSize, ds.RasterXSize], numpy.uint8) ds.ReadAsArray(buf_obj=array) ds2 = gdalnumeric.OpenArray(array) for i in range(1, ds.RasterCount): assert ds2.GetRasterBand(i).Checksum() == ds.GetRasterBand(i).Checksum() ############################################################################### # Test Band.WriteArray() def test_numpy_rw_9(): if gdaltest.numpy_drv is None: pytest.skip() ds = gdal.Open('data/byte.tif') array = ds.ReadAsArray() out_ds = gdal.GetDriverByName('MEM').Create('', ds.RasterYSize, ds.RasterXSize) out_ds.GetRasterBand(1).WriteArray(array) cs = out_ds.GetRasterBand(1).Checksum() out_ds = None ds = None assert cs == 4672, 'did not get expected checksum' ############################################################################### # Test signed byte handling def test_numpy_rw_10(): if gdaltest.numpy_drv is None: pytest.skip() import numpy ds = gdal.GetDriverByName('GTiff').Create('/vsimem/signed8.tif', 2, 1, options=['PIXELTYPE=SIGNEDBYTE']) ar = numpy.empty([1, 2], dtype=numpy.int8) ar[0][0] = -128 ar[0][1] = 127 ds.GetRasterBand(1).WriteArray(ar) ds = None ds = gdal.Open('/vsimem/signed8.tif') ar2 = ds.ReadAsArray() ar3 = numpy.empty_like(ar2) ds.GetRasterBand(1).ReadAsArray(buf_obj=ar3) ds = None gdal.Unlink('/vsimem/signed8.tif') assert ar2[0][0] == -128 and ar2[0][1] == 127, 'did not get expected result (1)' assert ar3[0][0] == -128 and ar3[0][1] == 127, 'did not get expected result (2)' ############################################################################### # Test all datatypes def test_numpy_rw_11(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdal_array type_tuples = [('uint8', gdal.GDT_Byte, numpy.uint8, 255), ('uint16', gdal.GDT_UInt16, numpy.uint16, 65535), ('int16', gdal.GDT_Int16, numpy.int16, -32767), ('uint32', gdal.GDT_UInt32, numpy.uint32, 4294967295), ('int32', gdal.GDT_Int32, numpy.int32, -2147483648), ('float32', gdal.GDT_Float32, numpy.float32, 1.23), ('float64', gdal.GDT_Float64, numpy.float64, 1.23456789), ('cint16', gdal.GDT_CInt16, numpy.complex64, -32768 + 32767j), ('cint32', gdal.GDT_CInt32, numpy.complex64, -32769 + 32768j), ('cfloat32', gdal.GDT_CFloat32, numpy.complex64, -32768.5 + 32767.5j), ('cfloat64', gdal.GDT_CFloat64, numpy.complex128, -32768.123456 + 32767.123456j)] for type_tuple in type_tuples: ds = gdal.GetDriverByName('GTiff').Create('/vsimem/' + type_tuple[0], 1, 1, 1, type_tuple[1]) tmp = ds.ReadAsArray() assert tmp.dtype == type_tuple[2], 'did not get expected numpy type' ar = numpy.empty([1, 1], dtype=type_tuple[2]) ar_ds = gdal_array.OpenArray(ar) got_dt = ar_ds.GetRasterBand(1).DataType ar_ds = None expected_dt = type_tuple[1] if expected_dt == gdal.GDT_CInt16 or expected_dt == gdal.GDT_CInt32: expected_dt = gdal.GDT_CFloat32 if got_dt != expected_dt: print(type_tuple[1]) pytest.fail('did not get expected result (0)') ar[0][0] = type_tuple[3] ds.GetRasterBand(1).WriteArray(ar) ds = None ds = gdal.Open('/vsimem/' + type_tuple[0]) ar2 = ds.ReadAsArray() ar3 = numpy.empty_like(ar2) ds.GetRasterBand(1).ReadAsArray(buf_obj=ar3) ds = None gdal.Unlink('/vsimem/' + type_tuple[0]) assert (not (type_tuple[0] == 'float32' and ar2[0][0] != pytest.approx(type_tuple[3], abs=1e-6)) or \ (type_tuple[0] != 'float32' and ar2[0][0] != type_tuple[3])), \ 'did not get expected result (1)' assert (not (type_tuple[0] == 'float32' and ar3[0][0] != pytest.approx(type_tuple[3], abs=1e-6)) or \ (type_tuple[0] != 'float32' and ar3[0][0] != type_tuple[3])), \ 'did not get expected result (2)' ############################################################################### # Test array with slices (#3542) def test_numpy_rw_12(): if gdaltest.numpy_drv is None: pytest.skip() import numpy ar = numpy.empty([2, 2], dtype=numpy.uint8) ar[0][0] = 0 ar[0][1] = 1 ar[1][0] = 2 ar[1][1] = 3 drv = gdal.GetDriverByName('MEM') ds = drv.Create('', 1, 2, 1, gdal.GDT_Byte) ds.GetRasterBand(1).WriteArray(ar[:, 1:]) ar_read = numpy.zeros_like(ar) slice_read = ar_read[:, 1:] ds.GetRasterBand(1).ReadAsArray(buf_obj=slice_read) ds = None assert slice_read[0][0] == 1 and slice_read[1][0] == 3 ############################################################################### # Test expected errors def test_numpy_rw_13(): if gdaltest.numpy_drv is None: pytest.skip() import numpy drv = gdal.GetDriverByName('MEM') ds = drv.Create('', 2, 1, 1, gdal.GDT_Byte) ar = numpy.empty([1, 2], dtype=numpy.uint8) ar[0][0] = 100 ar[0][1] = 200 ds.GetRasterBand(1).WriteArray(ar) # Try reading into unsupported array type ar = numpy.empty([1, 2], dtype=numpy.int64) with pytest.raises(Exception, match='array does not have ' 'corresponding GDAL data type'): ds.GetRasterBand(1).ReadAsArray(buf_obj=ar) # Try call with inconsistent parameters. ar = numpy.empty([1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_ysize not consistent ' 'with array shape'): ds.GetRasterBand(1).ReadAsArray(buf_obj=ar, buf_xsize=2, buf_ysize=2) # Same with 3 dimensions ar = numpy.empty([1, 1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_ysize not consistent ' 'with array shape'): ds.GetRasterBand(1).ReadAsArray(buf_obj=ar, buf_xsize=2, buf_ysize=2) # Try call with inconsistent parameters. ar = numpy.empty([1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_xsize not consistent ' 'with array shape'): ds.GetRasterBand(1).ReadAsArray(buf_obj=ar, buf_xsize=1, buf_ysize=1) # Inconsistent data type ar = numpy.empty([1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_type not consistent ' 'with array type'): ds.GetRasterBand(1).ReadAsArray(buf_obj=ar, buf_type=gdal.GDT_Int16) # This one should be OK ! ar = numpy.zeros([1, 2], dtype=numpy.uint8) ds.GetRasterBand(1).ReadAsArray(buf_obj=ar, buf_xsize=2, buf_ysize=1) assert ar[0][0] == 100 and ar[0][1] == 200, 'did not get expected values' # This one too ar = numpy.zeros([1, 1, 2], dtype=numpy.uint8) ds.GetRasterBand(1).ReadAsArray(buf_obj=ar) assert ar[0][0][0] == 100 and ar[0][0][1] == 200, 'did not get expected values' # This one too ar = numpy.zeros([1, 1, 2], dtype=numpy.uint8) ds.ReadAsArray(buf_obj=ar) assert ar[0][0][0] == 100 and ar[0][0][1] == 200, 'did not get expected values' # This one too ar = ds.ReadAsArray() assert ar[0][0] == 100 and ar[0][1] == 200, 'did not get expected values' ds = None # With a multiband file drv = gdal.GetDriverByName('MEM') ds = drv.Create('', 2, 1, 3, gdal.GDT_Byte) ar = numpy.empty([3, 1, 2], dtype=numpy.uint8) ar[0][0][0] = 100 ar[0][0][1] = 200 ar[1][0][0] = 101 ar[1][0][1] = 201 ar[2][0][0] = 102 ar[2][0][1] = 202 for i in range(3): ds.GetRasterBand(i + 1).WriteArray(ar[i]) ar = numpy.empty([3, 1, 2], dtype=numpy.int64) with pytest.raises(Exception, match='array does not have ' 'corresponding GDAL data type'): ds.ReadAsArray(buf_obj=ar) # Try call with inconsistent parameters. ar = numpy.empty([3, 1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_ysize not consistent ' 'with array shape'): ds.ReadAsArray(buf_obj=ar, buf_xsize=2, buf_ysize=2) # With 2 dimensions ar = numpy.empty([1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Array should have 3 ' 'dimensions'): ds.ReadAsArray(buf_obj=ar) # Try call with inconsistent parameters ar = numpy.empty([3, 1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_xsize not consistent ' 'with array shape'): ds.ReadAsArray(buf_obj=ar, buf_xsize=1, buf_ysize=1) ar = numpy.empty([1, 2, 3], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_xsize not consistent ' 'with array shape'): ds.ReadAsArray(buf_obj=ar, buf_xsize=1, buf_ysize=1, interleave='pixel') # Inconsistent data type ar = numpy.empty([3, 1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Specified buf_type not consistent with array type'): ds.ReadAsArray(buf_obj=ar, buf_type=gdal.GDT_Int16) # Not enough space in first dimension ar = numpy.empty([2, 1, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Dimension 0 of array should have size 3 to store bands'): ds.ReadAsArray(buf_obj=ar) # Not enough space in third dimension ar = numpy.empty([1, 2, 2], dtype=numpy.uint8) with pytest.raises(Exception, match='Dimension 2 of array should have size 3 to store bands'): ds.ReadAsArray(buf_obj=ar, interleave='pixel') # This one should be OK ! ar = numpy.zeros([3, 1, 2], dtype=numpy.uint8) ds.ReadAsArray(buf_obj=ar, buf_xsize=2, buf_ysize=1, buf_type=gdal.GDT_Byte) assert ar[0][0][0] == 100 and ar[0][0][1] == 200 and ar[1][0][0] == 101 and ar[1][0][1] == 201 and ar[2][0][0] == 102 and ar[2][0][1] == 202, \ 'did not get expected values' # This one too ar = numpy.zeros([3, 1, 2], dtype=numpy.uint8) ds.ReadAsArray(buf_obj=ar) assert ar[0][0][0] == 100 and ar[0][0][1] == 200 and ar[1][0][0] == 101 and ar[1][0][1] == 201 and ar[2][0][0] == 102 and ar[2][0][1] == 202, \ 'did not get expected values' # This one too ar = ds.ReadAsArray() assert ar[0][0][0] == 100 and ar[0][0][1] == 200 and ar[1][0][0] == 101 and ar[1][0][1] == 201 and ar[2][0][0] == 102 and ar[2][0][1] == 202, \ 'did not get expected values' ds = None ############################################################################### # Test callback of ReadAsArray() def numpy_rw_14_progress_callback(pct, message, user_data): # pylint: disable=unused-argument if pct != pytest.approx(user_data[0], abs=1e-5): print('Expected %f, got %f' % (user_data[0], pct)) user_data[1] = False user_data[0] = user_data[0] + 0.05 return 1 # 1 to continue, 0 to stop def numpy_rw_14_progress_interrupt_callback(pct, message, user_data): # pylint: disable=unused-argument user_data[0] = pct if pct >= 0.5: return 0 return 1 # 1 to continue, 0 to stop def numpy_rw_14_progress_callback_2(pct, message, user_data): # pylint: disable=unused-argument if pct < user_data[0]: print('Got %f, last pct was %f' % (pct, user_data[0])) return 0 user_data[0] = pct return 1 # 1 to continue, 0 to stop def test_numpy_rw_14(): if gdaltest.numpy_drv is None: pytest.skip() # Progress not implemented yet if gdal.GetConfigOption('GTIFF_DIRECT_IO') == 'YES' or \ gdal.GetConfigOption('GTIFF_VIRTUAL_MEM_IO') == 'YES': pytest.skip() import numpy ds = gdal.Open('data/byte.tif') # Test RasterBand.ReadAsArray tab = [0.05, True] data = ds.GetRasterBand(1).ReadAsArray(resample_alg=gdal.GRIORA_NearestNeighbour, callback=numpy_rw_14_progress_callback, callback_data=tab) assert data is not None assert tab[0] == pytest.approx(1.05, abs=1e-5) and tab[1] # Test interruption tab = [0] data = ds.GetRasterBand(1).ReadAsArray(callback=numpy_rw_14_progress_interrupt_callback, callback_data=tab) assert data is None assert tab[0] >= 0.50 # Test Dataset.ReadAsArray tab = [0.05, True] data = ds.ReadAsArray(resample_alg=gdal.GRIORA_NearestNeighbour, callback=numpy_rw_14_progress_callback, callback_data=tab) assert data is not None assert tab[0] == pytest.approx(1.05, abs=1e-5) and tab[1] # Same with interruption tab = [0] data = ds.ReadAsArray(callback=numpy_rw_14_progress_interrupt_callback, callback_data=tab) assert data is None and tab[0] >= 0.50 # Test Dataset.ReadAsArray on a multi band file ds = None ds = gdal.Open('data/rgbsmall.tif') last_pct = [0] data = ds.ReadAsArray(callback=numpy_rw_14_progress_callback_2, callback_data=last_pct) assert not (data is None or last_pct[0] != pytest.approx(1.0, abs=1e-5)) last_pct = [0] # Same but with a provided array array = numpy.empty([ds.RasterCount, ds.RasterYSize, ds.RasterXSize], numpy.uint8) data = ds.ReadAsArray(buf_obj=array, callback=numpy_rw_14_progress_callback_2, callback_data=last_pct) assert not (data is None or last_pct[0] != pytest.approx(1.0, abs=1e-5)) ############################################################################### # Test NumPy GetGeoTransform/SetGeoTransform def test_numpy_rw_15(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdal_array array = numpy.empty([1, 1, 1], numpy.uint8) ds = gdal_array.OpenArray(array) gt = ds.GetGeoTransform(can_return_null=True) assert gt is None ds.SetGeoTransform([1, 2, 3, 4, 5, -6]) gt = ds.GetGeoTransform() assert gt == (1, 2, 3, 4, 5, -6) ############################################################################### # Test errors of OpenArray() def test_numpy_rw_16(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdal_array # 1D array = numpy.empty([1], numpy.uint8) with gdaltest.error_handler(): ds = gdal_array.OpenArray(array) assert ds is None # 4D array = numpy.empty([1, 1, 1, 1], numpy.uint8) with gdaltest.error_handler(): ds = gdal_array.OpenArray(array) assert ds is None # Unsupported data type array = numpy.empty([1, 1], numpy.float16) with gdaltest.error_handler(): ds = gdal_array.OpenArray(array) assert ds is None ############################################################################### # Test old deprecated way with gdal_array.GetArrayFilename() def test_numpy_rw_17(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdal_array # Disabled by default array = numpy.empty([1, 1], numpy.uint8) with gdaltest.error_handler(): ds = gdal.Open(gdal_array.GetArrayFilename(array)) assert ds is None gdal.SetConfigOption('GDAL_ARRAY_OPEN_BY_FILENAME', 'TRUE') ds = gdal.Open(gdal_array.GetArrayFilename(array)) gdal.SetConfigOption('GDAL_ARRAY_OPEN_BY_FILENAME', None) assert ds is not None # Invalid value with gdaltest.error_handler(): ds = gdal.Open('NUMPY:::invalid') assert ds is None ############################################################################### # Test the pixel interleave options def test_numpy_rw_18(): if gdaltest.numpy_drv is None: pytest.skip() import numpy import numpy.random from osgeo import gdal_array img = numpy.random.randint(0, 255, size=(256, 200, 3)).astype('uint8') ds = gdal_array.OpenArray(img, interleave='pixel') assert ds is not None, 'Failed to open memory array as dataset.' bnd1 = ds.GetRasterBand(1).ReadAsArray() bnd2 = ds.GetRasterBand(2).ReadAsArray() bnd3 = ds.GetRasterBand(3).ReadAsArray() res = numpy.dstack((bnd1, bnd2, bnd3)) assert numpy.all(img == res) res = ds.ReadAsArray(interleave='pixel') assert numpy.all(img == res) res = numpy.zeros([256, 200, 3]) ds.ReadAsArray(buf_obj=res, interleave='pixel') assert numpy.all(img == res) ############################################################################### # The VRT references a non existing TIF file, but using the proxy pool dataset API (#2837) def test_numpy_rw_failure_in_readasarray(): if gdaltest.numpy_drv is None: pytest.skip() ds = gdal.Open('data/idontexist2.vrt') assert ds is not None exception_raised = False with gdaltest.enable_exceptions(): try: ds.ReadAsArray() except RuntimeError: exception_raised = True assert exception_raised exception_raised = False with gdaltest.enable_exceptions(): try: ds.GetRasterBand(1).ReadAsArray() except RuntimeError: exception_raised = True assert exception_raised ############################################################################### # Test permission handling def test_numpy_rw_gdal_array_openarray_permissions(): if gdaltest.numpy_drv is None: pytest.skip() import numpy from osgeo import gdal_array # Writeable array ar = numpy.zeros([1, 1], dtype=numpy.uint8) ds = gdal_array.OpenArray(ar) assert ds.GetRasterBand(1).Fill(1) == 0 assert ds.GetRasterBand(1).Checksum() != 0 # Non-writeable array ar = numpy.zeros([1, 1], dtype=numpy.uint8) ar.setflags(write=False) ds = gdal_array.OpenArray(ar) with gdaltest.error_handler(): assert ds.GetRasterBand(1).Fill(1) != 0 assert ds.GetRasterBand(1).Checksum() == 0 def test_numpy_rw_cleanup(): gdaltest.numpy_drv = None gdalautotest-3.1.2/gcore/vsicurl.py0000775000175000017500000004334413701057754016057 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: vsicurl.py e9915df0c744cbf149e9bc687cc9edd6e88fb959 2019-06-25 11:41:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsicurl # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from sys import version_info import time from osgeo import gdal from osgeo import ogr import gdaltest import webserver import pytest ############################################################################### # def test_vsicurl_1(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds = ogr.Open('/vsizip/vsicurl/http://publicfiles.dep.state.fl.us/dear/BWR_GIS/2007NWFLULC/NWFWMD2007LULC.zip') assert ds is not None ############################################################################### # def vsicurl_2(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds = gdal.Open('/vsizip//vsicurl/http://eros.usgs.gov/archive/nslrsda/GeoTowns/HongKong/srtm/n22e113.zip/n22e113.bil') assert ds is not None ############################################################################### # This server doesn't support range downloading def vsicurl_3(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds = ogr.Open('/vsizip/vsicurl/http://www.iucnredlist.org/spatial-data/MAMMALS_TERRESTRIAL.zip') assert ds is None ############################################################################### # This server doesn't support range downloading def test_vsicurl_4(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds = ogr.Open('/vsizip/vsicurl/http://lelserver.env.duke.edu:8080/LandscapeTools/export/49/Downloads/1_Habitats.zip') assert ds is None ############################################################################### # Test URL unescaping when reading HTTP file list def test_vsicurl_5(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds = gdal.Open('/vsicurl/http://dds.cr.usgs.gov/srtm/SRTM_image_sample/picture%20examples/N34W119_DEM.tif') assert ds is not None ############################################################################### # Test with FTP server that doesn't support EPSV command def vsicurl_6_disabled(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() fl = gdal.ReadDir('/vsicurl/ftp://ftp2.cits.rncan.gc.ca/pub/cantopo/250k_tif') assert fl ############################################################################### # Test Microsoft-IIS/6.0 listing def test_vsicurl_7(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() fl = gdal.ReadDir('/vsicurl/http://ortho.linz.govt.nz/tifs/2005_06') assert fl ############################################################################### # Test interleaved reading between 2 datasets def vsicurl_8(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds1 = gdal.Open('/vsigzip//vsicurl/http://dds.cr.usgs.gov/pub/data/DEM/250/notavail/C/chipicoten-w.gz') gdal.Open('/vsizip//vsicurl/http://edcftp.cr.usgs.gov/pub/data/landcover/files/2009/biso/gokn09b_dnbr.zip/nps-serotnbsp-9001-20090321_rd.tif') cs = ds1.GetRasterBand(1).Checksum() assert cs == 61342 ############################################################################### # Test reading a file with Chinese characters, but the HTTP file listing # returns escaped sequences instead of the Chinese characters. def test_vsicurl_9(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() if version_info >= (3, 0, 0): filename = 'xx\u4E2D\u6587.\u4E2D\u6587' else: exec("filename = u'xx\u4E2D\u6587.\u4E2D\u6587'") filename = filename.encode('utf-8') ds = gdal.Open('/vsicurl/http://download.osgeo.org/gdal/data/gtiff/' + filename) assert ds is not None ############################################################################### # Test reading a file with escaped Chinese characters. def test_vsicurl_10(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() ds = gdal.Open('/vsicurl/http://download.osgeo.org/gdal/data/gtiff/xx%E4%B8%AD%E6%96%87.%E4%B8%AD%E6%96%87') assert ds is not None ############################################################################### # Test ReadDir() after reading a file on the same server def test_vsicurl_11(): if not gdaltest.run_slow_tests(): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() f = gdal.VSIFOpenL('/vsicurl/http://download.osgeo.org/gdal/data/bmp/Bug2236.bmp', 'rb') if f is None: pytest.skip() gdal.VSIFSeekL(f, 1000000, 0) gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) filelist = gdal.ReadDir('/vsicurl/http://download.osgeo.org/gdal/data/gtiff') assert filelist is not None and filelist ############################################################################### def test_vsicurl_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() ############################################################################### def test_vsicurl_test_redirect(): if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test_redirect/', 404) # Simulate a big time difference between server and local machine current_time = 1500 def method(request): response = 'HTTP/1.1 302\r\n' response += 'Server: foo\r\n' response += 'Date: ' + time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(current_time)) + '\r\n' response += 'Location: %s\r\n' % ('http://localhost:%d/foo.s3.amazonaws.com/test_redirected/test.bin?Signature=foo&Expires=%d' % (gdaltest.webserver_port, current_time + 30)) response += '\r\n' request.wfile.write(response.encode('ascii')) handler.add('HEAD', '/test_redirect/test.bin', custom_method=method) handler.add('HEAD', '/foo.s3.amazonaws.com/test_redirected/test.bin?Signature=foo&Expires=%d' % (current_time + 30), 403, {'Server': 'foo'}, '') def method(request): if 'Range' in request.headers: if request.headers['Range'] == 'bytes=0-16383': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 0-16383/1000000') request.send_header('Content-Length', 16384) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(('x' * 16384).encode('ascii')) elif request.headers['Range'] == 'bytes=16384-49151': # Test expiration of the signed URL request.protocol_version = 'HTTP/1.1' request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() else: # After a failed attempt on a HEAD, the client should go there response = 'HTTP/1.1 200\r\n' response += 'Server: foo\r\n' response += 'Date: ' + time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(current_time)) + '\r\n' response += 'Content-type: text/plain\r\n' response += 'Content-Length: 1000000\r\n' response += 'Connection: close\r\n' response += '\r\n' request.wfile.write(response.encode('ascii')) handler.add('GET', '/foo.s3.amazonaws.com/test_redirected/test.bin?Signature=foo&Expires=%d' % (current_time + 30), custom_method=method) with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsicurl/http://localhost:%d/test_redirect/test.bin' % gdaltest.webserver_port, 'rb') assert f is not None gdal.VSIFSeekL(f, 0, 2) if gdal.VSIFTellL(f) != 1000000: gdal.VSIFCloseL(f) pytest.fail(gdal.VSIFTellL(f)) gdal.VSIFSeekL(f, 0, 0) handler = webserver.SequentialHandler() handler.add('GET', '/foo.s3.amazonaws.com/test_redirected/test.bin?Signature=foo&Expires=%d' % (current_time + 30), custom_method=method) handler.add('GET', '/foo.s3.amazonaws.com/test_redirected/test.bin?Signature=foo&Expires=%d' % (current_time + 30), custom_method=method) current_time = int(time.time()) def method(request): # We should go there after expiration of the first signed URL if 'Range' in request.headers and \ request.headers['Range'] == 'bytes=16384-49151': request.protocol_version = 'HTTP/1.1' request.send_response(302) # Return a new signed URL request.send_header('Location', 'http://localhost:%d/foo.s3.amazonaws.com/test_redirected2/test.bin?Signature=foo&Expires=%d' % (request.server.port, current_time + 30)) request.send_header('Content-Length', 16384) request.end_headers() request.wfile.write(('x' * 16384).encode('ascii')) handler.add('GET', '/test_redirect/test.bin', custom_method=method) def method(request): # Second signed URL if 'Range' in request.headers and \ request.headers['Range'] == 'bytes=16384-49151': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 16384-16384/1000000') request.send_header('Content-Length', 1) request.end_headers() request.wfile.write('y'.encode('ascii')) handler.add('GET', '/foo.s3.amazonaws.com/test_redirected2/test.bin?Signature=foo&Expires=%d' % (current_time + 30), custom_method=method) with webserver.install_http_handler(handler): content = gdal.VSIFReadL(1, 16383, f).decode('ascii') if len(content) != 16383 or content[0] != 'x': gdal.VSIFCloseL(f) pytest.fail(content) content = gdal.VSIFReadL(1, 2, f).decode('ascii') if content != 'xy': gdal.VSIFCloseL(f) pytest.fail(content) gdal.VSIFCloseL(f) ############################################################################### # TODO: better testing def test_vsicurl_test_clear_cache(): gdal.VSICurlClearCache() gdal.VSICurlClearCache() ############################################################################### def test_vsicurl_test_retry(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/test_retry/', 404) handler.add('HEAD', '/test_retry/test.txt', 200, {'Content-Length': '3'}) handler.add('GET', '/test_retry/test.txt', 502) with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsicurl/http://localhost:%d/test_retry/test.txt' % gdaltest.webserver_port, 'rb') data_len = 0 if f: data_len = len(gdal.VSIFReadL(1, 1, f)) gdal.VSIFCloseL(f) assert data_len == 0 gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test_retry/', 404) handler.add('HEAD', '/test_retry/test.txt', 200, {'Content-Length': '3'}) handler.add('GET', '/test_retry/test.txt', 502) handler.add('GET', '/test_retry/test.txt', 429) handler.add('GET', '/test_retry/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsicurl?max_retry=2&retry_delay=0.01&url=http://localhost:%d/test_retry/test.txt' % gdaltest.webserver_port, 'rb') assert f is not None gdal.ErrorReset() with gdaltest.error_handler(): data = gdal.VSIFReadL(1, 3, f).decode('ascii') error_msg = gdal.GetLastErrorMsg() gdal.VSIFCloseL(f) assert data == 'foo' assert '429' in error_msg ############################################################################### def test_vsicurl_test_fallback_from_head_to_get(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('HEAD', '/test_fallback_from_head_to_get', 405) handler.add('GET', '/test_fallback_from_head_to_get', 200, {}, 'foo') with webserver.install_http_handler(handler): statres = gdal.VSIStatL('/vsicurl/http://localhost:%d/test_fallback_from_head_to_get' % gdaltest.webserver_port) assert statres.size == 3 gdal.VSICurlClearCache() ############################################################################### def test_vsicurl_test_parse_html_filelist_apache(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/mydir/', 200, {}, """ Index of /mydir

Index of /mydir

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[IMG]foo.tif17-May-2010 12:26 90K 
[IMG]foo with space.tif15-Jan-2007 11:02 736  

""") with webserver.install_http_handler(handler): fl = gdal.ReadDir('/vsicurl/http://localhost:%d/mydir' % gdaltest.webserver_port) assert fl == ['foo.tif', 'foo%20with%20space.tif'] assert gdal.VSIStatL('/vsicurl/http://localhost:%d/mydir/foo%%20with%%20space.tif' % gdaltest.webserver_port, gdal.VSI_STAT_EXISTS_FLAG) is not None handler = webserver.SequentialHandler() handler.add('HEAD', '/mydir/i_dont_exist', 404, {}) with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsicurl/http://localhost:%d/mydir/i_dont_exist' % gdaltest.webserver_port, gdal.VSI_STAT_EXISTS_FLAG) is None ############################################################################### def test_vsicurl_no_size_in_HEAD(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('HEAD', '/test_vsicurl_no_size_in_HEAD.bin', 200, {}, add_content_length_header=False) handler.add('GET', '/test_vsicurl_no_size_in_HEAD.bin', 200, {}, 'X' * 10) with webserver.install_http_handler(handler): statres = gdal.VSIStatL('/vsicurl/http://localhost:%d/test_vsicurl_no_size_in_HEAD.bin' % gdaltest.webserver_port) assert statres.size == 10 ############################################################################### def test_vsicurl_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) gdalautotest-3.1.2/gcore/vsicrypt.py0000775000175000017500000004435013701057754016251 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vsicrypt.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsicrypt/ # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct from osgeo import gdal import gdaltest import pytest from gcore.testnonboundtoswig import setup as testnonboundtoswig_setup # noqa testnonboundtoswig_setup; # to please pyflakes ############################################################################### # Use common test for /vsicrypt def test_vsicrypt_1(): gdaltest.has_vsicrypt = False fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'wb+') if fp is None: pytest.skip() gdal.VSIFCloseL(fp) gdal.Unlink('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin') gdaltest.has_vsicrypt = True import vsifile return vsifile.vsifile_generic('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin') ############################################################################### # Test various error cases def test_vsicrypt_2(): if not gdaltest.has_vsicrypt: pytest.skip() # Missing key with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'wb+') assert fp is None # Invalid file with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/not_existing/not_existing', 'wb') assert fp is None # Invalid file with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/not_existing/not_existing', 'rb') assert fp is None # Invalid file with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/not_existing/not_existing', 'ab') assert fp is None # Invalid access with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/not_existing/not_existing', 'foo') assert fp is None # Key to short with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=a,file=/vsimem/file.bin', 'wb+') assert fp is None # Invalid signature gdal.FileFromMemBuffer('/vsimem/file.bin', 'foo') with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'rb') assert fp is None # Generate empty file fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'wb') gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'rb') assert fp is not None gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsimem/file.bin', 'rb') header = gdal.VSIFReadL(1, 1000, fp) gdal.VSIFCloseL(fp) assert len(header) == 46 # Test shortening header for i in range(46): fp = gdal.VSIFOpenL('/vsimem/file.bin', 'wb') gdal.VSIFWriteL(header, 1, 46 - 1 - i, fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'rb') assert fp is None # Test corrupting all bytes of header for i in range(46): for val in (0, 127, 255): fp = gdal.VSIFOpenL('/vsimem/file.bin', 'wb') try: new_byte = chr(val).encode('latin1') except (UnicodeDecodeError, UnicodeEncodeError): new_byte = chr(val) header_new = header[0:i] + new_byte + header[i + 1:] gdal.VSIFWriteL(header_new, 1, 46, fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=' '/vsimem/file.bin', 'rb') if fp is not None: gdal.VSIFCloseL(fp) gdal.SetConfigOption('VSICRYPT_IV', 'TOO_SHORT') with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=' '/vsimem/file.bin', 'wb') gdal.SetConfigOption('VSICRYPT_IV', None) if fp is not None: gdal.VSIFCloseL(fp) # Inconsistent initial vector. header = struct.pack('B' * 38, 86, 83, 73, 67, 82, 89, 80, 84, # signature 38, 0, # header size 1, # major 0, # minor 0, 2, # sector size 0, # alg 0, # mode 8, # size of IV (should be 16) 32, 13, 169, 71, 154, 208, 22, 32, # IV 0, 0, # size of free text 0, # size of key check 0, 0, 0, 0, 0, 0, 0, 0, # size of unencrypted file 0, 0 # size of extra content ) fp = gdal.VSIFOpenL('/vsimem/file.bin', 'wb') gdal.VSIFWriteL(header, 1, len(header), fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): fp = gdal.VSIFOpenL( '/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'rb') assert fp is None # Inconsistent initial vector with key check. header = struct.pack('B' * 39, 86, 83, 73, 67, 82, 89, 80, 84, # signature 39, 0, # header size 1, # major 0, # minor 0, 2, # sector size 0, # alg 0, # mode 8, # size of IV (should be 16) 32, 13, 169, 71, 154, 208, 22, 32, # IV 0, 0, # size of free text 1, # size of key check 0, # key check 0, 0, 0, 0, 0, 0, 0, 0, # size of unencrypted file 0, 0 # size of extra content ) fp = gdal.VSIFOpenL('/vsimem/file.bin', 'wb') gdal.VSIFWriteL(header, 1, len(header), fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'rb') assert fp is None # Test reading with wrong key fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'wb') gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt/key=dont_use_in_prod,file=/vsimem/file.bin', 'rb') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content != 'hello' with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=short_key,file=/vsimem/file.bin', 'ab') assert fp is None # Test reading with wrong key with add_key_check fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,add_key_check=yes,file=/vsimem/file.bin', 'wb') gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=dont_use_in_prod,file=/vsimem/file.bin', 'rb') assert fp is None with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=short_key,file=/vsimem/file.bin', 'ab') assert fp is None with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=dont_use_in_prod,file=/vsimem/file.bin', 'ab') assert fp is None # Test creating with potentially not build-in alg: with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/alg=blowfish,key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'wb') if fp is not None: gdal.VSIFCloseL(fp) # Invalid sector_size with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,sector_size=1,file=/vsimem/file.bin', 'wb') assert fp is None # Sector size (16) should be at least twice larger than the block size (16) in CBC_CTS with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,sector_size=16,mode=CBC_CTS,file=/vsimem/file.bin', 'wb') assert fp is None gdal.Unlink('/vsimem/file.bin') ############################################################################### # Test various options def test_vsicrypt_3(): if not gdaltest.has_vsicrypt: pytest.skip() for options in ['sector_size=16', 'alg=AES', 'alg=DES_EDE2', 'alg=DES_EDE3', 'alg=SKIPJACK', 'alg=invalid', 'mode=CBC', 'mode=CFB', 'mode=OFB', 'mode=CTR', 'mode=CBC_CTS', 'mode=invalid', 'freetext=my_free_text', 'add_key_check=yes']: gdal.Unlink('/vsimem/file.bin') if options == 'alg=invalid' or options == 'mode=invalid': with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PRODDONT_USE_IN_PROD,%s,file=/vsimem/file.bin' % options, 'wb') else: fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PRODDONT_USE_IN_PROD,%s,file=/vsimem/file.bin' % options, 'wb') assert fp is not None, options gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PRODDONT_USE_IN_PROD,file=/vsimem/file.bin', 'r') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content == 'hello', options # Some of those algs might be missing for options in ['alg=Blowfish', 'alg=Camellia', 'alg=CAST256', 'alg=MARS', 'alg=IDEA', 'alg=RC5', 'alg=RC6', 'alg=Serpent', 'alg=SHACAL2', 'alg=Twofish', 'alg=XTEA']: gdal.Unlink('/vsimem/file.bin') with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,%s,file=/vsimem/file.bin' % options, 'wb') if fp is not None: gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file.bin', 'rb') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content == 'hello', options # Test key generation # Do NOT set VSICRYPT_CRYPTO_RANDOM=NO in production. This is just to speed up tests ! gdal.SetConfigOption("VSICRYPT_CRYPTO_RANDOM", "NO") fp = gdal.VSIFOpenL('/vsicrypt/key=GENERATE_IT,add_key_check=yes,file=/vsimem/file.bin', 'wb') gdal.SetConfigOption("VSICRYPT_CRYPTO_RANDOM", None) # Get the generated random key key_b64 = gdal.GetConfigOption('VSICRYPT_KEY_B64') assert key_b64 is not None gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'rb') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content == 'hello', options gdal.SetConfigOption('VSICRYPT_KEY_B64', None) fp = gdal.VSIFOpenL('/vsicrypt/key_b64=%s,file=/vsimem/file.bin' % key_b64, 'rb') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content == 'hello', options with gdaltest.error_handler(): statRes = gdal.VSIStatL('/vsicrypt//vsimem/file.bin') assert statRes is None ret = gdal.Rename('/vsicrypt//vsimem/file.bin', '/vsicrypt//vsimem/subdir_crypt/file.bin') assert ret == 0 ret = gdal.Rename('/vsicrypt//vsimem/subdir_crypt/file.bin', '/vsimem/subdir_crypt/file2.bin') assert ret == 0 dir_content = gdal.ReadDir('/vsicrypt//vsimem/subdir_crypt') assert dir_content == ['file2.bin'] gdal.Unlink('/vsimem/subdir_crypt/file2.bin') ############################################################################### # Test "random" operations against reference filesystem def test_vsicrypt_4(): if not gdaltest.has_vsicrypt: pytest.skip() test_file = '/vsicrypt/key=DONT_USE_IN_PROD,sector_size=32,file=/vsimem/file_enc.bin' ref_file = '/vsimem/file.bin' for seed in range(1000): gdal.Unlink(test_file) gdal.Unlink(ref_file) test_f = gdal.VSIFOpenL(test_file, 'wb+') ref_f = gdal.VSIFOpenL(ref_file, 'wb+') import random random.seed(seed) for _ in range(20): random_offset = random.randint(0, 1000) gdal.VSIFSeekL(test_f, random_offset, 0) gdal.VSIFSeekL(ref_f, random_offset, 0) random_size = random.randint(1, 80) random_content = ''.join([chr(40 + int(10 * random.random())) for _ in range(random_size)]) gdal.VSIFWriteL(random_content, 1, random_size, test_f) gdal.VSIFWriteL(random_content, 1, random_size, ref_f) if random.randint(0, 1) == 0: random_offset = random.randint(0, 1500) gdal.VSIFSeekL(test_f, random_offset, 0) gdal.VSIFSeekL(ref_f, random_offset, 0) random_size = random.randint(1, 80) test_content = gdal.VSIFReadL(1, random_size, test_f) ref_content = gdal.VSIFReadL(1, random_size, ref_f) if test_content != ref_content: print(seed) print('Test content (%d):' % len(test_content)) print('') pytest.fail('Ref content (%d):' % len(ref_content)) gdal.VSIFSeekL(test_f, 0, 0) gdal.VSIFSeekL(ref_f, 0, 0) test_content = gdal.VSIFReadL(1, 100000, test_f) ref_content = gdal.VSIFReadL(1, 100000, ref_f) gdal.VSIFCloseL(test_f) gdal.VSIFCloseL(ref_f) if test_content != ref_content: print(seed) print('Test content (%d):' % len(test_content)) print('') pytest.fail('Ref content (%d):' % len(ref_content)) gdal.Unlink(test_file) gdal.Unlink(ref_file) ############################################################################### # Test random filling of last sector def test_vsicrypt_5(): if not gdaltest.has_vsicrypt: pytest.skip() test_file = '/vsicrypt/key=DONT_USE_IN_PROD,file=/vsimem/file_enc.bin' f = gdal.VSIFOpenL(test_file, 'wb+') gdal.VSIFWriteL('ab', 1, 2, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(test_file, 'rb+') gdal.VSIFSeekL(f, 3, 0) gdal.VSIFWriteL('d', 1, 1, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(test_file, 'rb') content = gdal.VSIFReadL(1, 4, f) content = struct.unpack('B' * len(content), content) gdal.VSIFCloseL(f) assert content == (97, 98, 0, 100) f = gdal.VSIFOpenL(test_file, 'rb+') gdal.VSIFReadL(1, 1, f) gdal.VSIFSeekL(f, 5, 0) gdal.VSIFWriteL('f', 1, 1, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(test_file, 'rb') content = gdal.VSIFReadL(1, 6, f) content = struct.unpack('B' * len(content), content) gdal.VSIFCloseL(f) assert content == (97, 98, 0, 100, 0, 102) f = gdal.VSIFOpenL(test_file, 'rb+') gdal.VSIFReadL(1, 1, f) gdal.VSIFSeekL(f, 512, 0) gdal.VSIFWriteL('Z', 1, 1, f) gdal.VSIFSeekL(f, 7, 0) gdal.VSIFWriteL('h', 1, 1, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(test_file, 'rb') content = gdal.VSIFReadL(1, 8, f) content = struct.unpack('B' * len(content), content) gdal.VSIFCloseL(f) assert content == (97, 98, 0, 100, 0, 102, 0, 104) gdal.Unlink(test_file) ############################################################################### # Test VSISetCryptKey def test_vsicrypt_6(testnonboundtoswig_setup): # noqa try: import ctypes except ImportError: pytest.skip() testnonboundtoswig_setup.VSISetCryptKey.argtypes = [ctypes.c_char_p, ctypes.c_int] testnonboundtoswig_setup.VSISetCryptKey.restype = None # Set a valid key testnonboundtoswig_setup.VSISetCryptKey('DONT_USE_IN_PROD'.encode('ASCII'), 16) if not gdaltest.has_vsicrypt: pytest.skip() fp = gdal.VSIFOpenL('/vsicrypt/add_key_check=yes,file=/vsimem/file.bin', 'wb+') assert fp is not None gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'rb') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content == 'hello' fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'wb+') assert fp is not None gdal.VSIFWriteL('hello', 1, 5, fp) gdal.VSIFCloseL(fp) fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'rb') content = gdal.VSIFReadL(1, 5, fp).decode('latin1') gdal.VSIFCloseL(fp) assert content == 'hello' # Set a too short key testnonboundtoswig_setup.VSISetCryptKey('bbc'.encode('ASCII'), 3) with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'rb') assert fp is None with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'wb+') assert fp is None # Erase key testnonboundtoswig_setup.VSISetCryptKey(None, 0) with gdaltest.error_handler(): fp = gdal.VSIFOpenL('/vsicrypt//vsimem/file.bin', 'wb+') assert fp is None gdal.Unlink('/vsimem/file.bin') gdalautotest-3.1.2/gcore/pnm_write.py0000775000175000017500000000343413701057754016370 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: pnm_write.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for portable anymap file format # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest init_list = [ ('byte.tif', 4672), ('uint16.tif', 4672)] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.parametrize( 'testfunction', [ 'testCreateCopy', 'testCreate', ] ) @pytest.mark.require_driver('PNM') def test_pnm_create(filename, checksum, testfunction): ut = gdaltest.GDALTest('PNM', filename, 1, checksum) getattr(ut, testfunction)() gdalautotest-3.1.2/gcore/data/0000775000175000017500000000000013701057756014716 5ustar evenevengdalautotest-3.1.2/gcore/data/zero_stored.bin.zip.end0000664000175000017500000000055013701057751021310 0ustar evenevenPK [:Dn׬ hello.txtUT }%R}%Rux HELLO PK-y:D5,zero.binUTmRux **PK [:Dn׬ $hello.txtUT}%Rux W*PK,-*PK]*PKgdalautotest-3.1.2/gcore/data/nan32_nodata.vrt0000664000175000017500000000310713701057751017716 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32631"]] 4.0000000000000000e+05, 1.0000000000000000e+00, 0.0000000000000000e+00, 5.0000000000000000e+06, 0.0000000000000000e+00, -1.0000000000000000e+00 Area nan Gray nan32_nodata.tif 1 nan gdalautotest-3.1.2/gcore/data/toomanyblocks.tif0000664000175000017500000000023613701057751020302 0ustar evenevenII* ``BCDESgdalautotest-3.1.2/gcore/data/pixfun_conj_c.vrt0000664000175000017500000000104413701057751020271 0ustar eveneven conjugate conj CInt16 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/ycbcr_14_lzw.tif0000664000175000017500000000447013701057751017724 0ustar evenevenII*0 @@x\*!dN#EcQJ6!p s 0k6"#! G e2Ks#9[= FSIhW0M%la6NYb;fjlc3Z: %s0J#k*cwEXe2q/0NRp9Eټ~9YW<^n8mfv:ʅTU7$Y0 $dڕCWMse1z s(Lfl2# 5̊*(/C#b8.0,i$0> @./ 0 Р-cȮC()+p/Ē3 +3 0 è2#4Ȃf0#жT CCа>+ 1#> @/(f4 4i#Hc3$4J-2d6#z0# -K19 03 B+C8,5\b+ ; BhqhK7R F̳ >$A<d DO!\?"CTBp6څ͠{aX<0_I !m9fЖŏXZP3 Bs`,Ysr6P91qD`t )^y ЍזZI/tnz@Da@7 .g x:1Pt ]P bW" Z"`X 0 )8! x ABx=\@ Q7FЦHd AT9“B,\C a;'kE W'> %RD0T .QBN@"E0CЀ)$Ā] H A?C!(#! O HЪxt'"%Y hA70CHxB8*PDh;ViM$͙@"@!D?Bp' aFz ;CUx;(U0? ql,X]qCcd0Ĉ̱$QBr0-)0f3pCvd0 n aBpAA xF!PvCP!Br0AH b |`. !J . C i@`Z @|H:,r6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V\hsͥ7V[j]2+V;;vc!uC|Z^nWV|q̙ "e2-otV;+|>vv˧^ɱ]bo /f"WԾW[Z2pTү~? y'xKoǒe(C{}߹~⛒lɑQRdYvMPf@]߯+9TcgA o=EX4ZX$?-ұq + 63q \W(vMN.$ȃ+c?x4 {EuEcaX^=&^ }zr97&YL=ΈI]߿ c&gT댘wOsvp.{~v80  ~l$|$ @*ByB7fȠ΁1H󋻺DT`K*0@`pWeWJס:OkΡpbӂ!6`~"~ëͤG0Vda#o$9~c}647:$vʎFqunj)[gQL^,P5T[[8`p {Cj$ >:$Bk {@{d&/ҳ\b \%k5UOB 4դ6/U w]/珿,˲=CqUrb#^ɰϿ^!D#<`?m'ibkZ{aaoedyl.4Ϣon;rچD8?{k1Խ&TeE\:tsP$8eǼ@x!>$ fe $ɎǨmMٝ|Q]y07 5]s-whBCrhF1E)Z2WO pq׷nw%X>׏;VS|:7Fu%ouXp^)N[4?<7xUMgwGb/IK85`Z=o_@Q5٬ʭ1'5D3F1Mҍ{ ';]/5LN-_?*|?C0H2K=X]ɝ+٨*+dSkWգ86C+TوRN)傞@Zx:Y]KQ;g0dBer_uwh4(o>-ѹN I$EEgq\@ R$I۬f> yd :t5CO8̛"&oLoJ (7)0dARGRf5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/test_nodatavalues.tif0000664000175000017500000000131113701057751021136 0ustar evenevenII*B222=SJ0 0 0 0 x1ðIIP;$W^9$R3*22 26=S0 DEFLATE PIXEL 0 0 0 gdalautotest-3.1.2/gcore/data/byte_gcp.tif.aux.xml0000664000175000017500000000022713701057754020610 0ustar eveneven gdalautotest-3.1.2/gcore/data/byte_3.hdf0000664000175000017500000001001513701057751016556 0ustar eveneven j\  V Z< !  < !  < X!j y }  Q 7 3; nI F <:NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0j j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["UTM",GEOGCS["North_American_Datum_1927",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]VALUES ProjectionAttr0.0  byte3.hdfCDF0.0gdalautotest-3.1.2/gcore/data/spaf27_brokengdal.tif0000664000175000017500000000164013701057751020710 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  ^L >"~˶8AY[#APō[Lph@nQfLh@#      +#      TXAUuor@ @@@DDDDd@@]ZUUUU@@MM;p"ANAD27 / California zone VI|NAD27|gdalautotest-3.1.2/gcore/data/cielab.tif0000664000175000017500000000024113701057751016631 0ustar evenevenII* Szgdalautotest-3.1.2/gcore/data/byte_zstd.tif0000664000175000017500000000110013701057751017414 0ustar evenevenII*PfS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|(/X1nW"*}:/D_]J$(*:%x 7\Y>_Le ]#/ϻ^{D"#[N*sÎ^صȌxVbg8[k8-*DCѢȘhԵm VuHYWms#뺌 <=0@J!iM ` "C 8'Qwp$egdalautotest-3.1.2/gcore/data/byte.tif0000664000175000017500000000134013701057751016356 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS R jN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/pixfun_dB_r.vrt0000664000175000017500000000104213701057751017702 0ustar eveneven dB dB Float32 float32.tif 1 gdalautotest-3.1.2/gcore/data/twofileinsubdir.zip0000664000175000017500000000160513701057751020650 0ustar evenevenPK <twofileinsubdir/UT uKKUxPK Value red value gdalautotest-3.1.2/gcore/data/sasha.tif0000664000175000017500000006666413701057751016536 0ustar evenevenII*0BCDES[> <K#::5BShC"9%""F25)9RHWUQHPN[fo[a|bNPrs|XmC""C%%C^P^ }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz 1 (96) (96) 2 2000:00:00 00:00:00 2 Copyright 9,2002 (0.0155793) (2.9) 3 100 0210 2000:00:00 00:00:00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",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-111.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",26712]]true267121.883333333333333.823333333333330110.5166666666666993.896666666666670119.1299999999999993.9627.7766666666666994.03000000000000021.813333333333329915.54333333333329910.43666666666669915.5819.04333333333330115.62666666666670127.666666666666715.6866666666666991.7966666666666727.2710.37333333333329927.28333333333329918.96999999999999927.31333333333330127.57999999999999827.35333333333331.820000000000000138.99000000000000210.38333333333330138.986666666666718.94000000000000138.99333333333329727.52333333333330139.0266666666666995000004705078.79016612513694.738949854974705092.24672045527389.488231900964705132.6166430097541084.258175572964705199.90071250035000004723585.2528382801513658.312030380014723598.71614639527316.633693014974723639.1063283999540974.974617394044723706.42415740995000004742092.2619709503513621.768887386024742105.7315773396527243.546710298054742146.1406523297540865.342401484034742213.48996334995000004760599.8178412998513585.109822754984760613.2932902602527170.227887553054760653.7198910601540755.3624336514760721.0984054497gdalautotest-3.1.2/gcore/data/zero_stored.bin.zip.start0000664000175000017500000000012313701057751021673 0ustar evenevenPK-y:D50zero.binUT mRoRux **gdalautotest-3.1.2/gcore/data/zackthecat.tif0000664000175000017500000002010213701057751017531 0ustar evenevenMM*($v8OU0Ss=)]6^1 Sւ Pt[FgNx4RUF՟%@s߷UUW-4ZPJ:+h|qPk/.2ݶ ~Χ7OKr*u|ֳmt {1<P֩j,⫻&PPo1S+5= 8gIt2ϨJIFMDjVMI ;QT ;]w MNH9MQR@Nw9,S(ف Oqd*Q2H:֚&&p)!H;`c83l2('lNHX Z^Sz>ee?#?4(;qkqr?V+c\-%HY3[ٵ@ &;Ɋhr^qm61? {ܰ='?_^&5-BYAP>G} tS`NJ7\R⺱Gl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IoR 8ˀdۯSwG_J>~Ґnv=6?֝z?}ҚOAHa}>0rpZsSZ@E q;<???2dGLt>cT[֘g)(w*u|5zЀ(BCDE    * q' q'     ' .(00-(,,39I>36E7,,@W@ELNRSR1=Z`YP`IPRO %%O4,44OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO %%O4,44OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOD   }!1AQa"q2#BR3br $%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzy!1AQq"2aB3R#br$4CS %&'()*56789:DEFGHIJTUVWXYZcdefghijstuvwxyzy!1AQq"2aB3R#br$4CS %&'()*56789:DEFGHIJTUVWXYZcdefghijstuvwxyzT ''t'gdalautotest-3.1.2/gcore/data/bigtiff_one_strip_long.tif0000664000175000017500000000037513701057751022135 0ustar evenevenII+ Ssgdalautotest-3.1.2/gcore/data/uint16.raw0000664000175000017500000000144013701057751016551 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/int32_withneg.grd0000664000175000017500000000051313701057751020072 0ustar evenevenncols 5 nrows 6 xllcorner 0.000000000000 yllcorner -6.000000000000 cellsize 1.000000000000 35 -8 25 52 -47 -1 24 39 29 -12 -22 -12 11 116 63 4 27 -25 48 83 -4 77 84 36 33 47 127 173 48 12 gdalautotest-3.1.2/gcore/data/utmsmall_2.hdf0000664000175000017500000003260113701057751017455 0ustar eveneven j\ '00<1!171;<1w!j111 12 17 2+; 2fI 2F 2 5 < 5E;NCSA HDF Version 4.1 Release 4, December 2000k{skkk{skksc{cJsRssk{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ť޵޽֔楥{ν{ŵε潔޽朔Υ{ֽŭ֌攔ք{Rkŵޔsks{ZŽ楔ޭs歔掠ť{k{kscsc{ť֜c{kޜs{J{c{Rcs{kΥέŔťŵνΜsk{sskk{skscRcJk{sέ{Ŝ֌޽έޭޥ{k{{Rk{kZ{RťŭνŵΜŌks{sskck{ֵŜsZŭ֔εŵεJkkss{{s{c{ŌޥŜsk歜֜{޽s֭{{{{Ŝ{s{k{{ckkŜ浌c潥ޔޥs{{s֔s{s{c{ks{s{s{εέֵ{{ssss{{kskkュ{ssތŌkckckcsksks{{ss{{Ό{sŽ歵{΄֜ބksckkk{{{{sks{{ťck{޵޽{έބkksssssc{kc{ccsބŌcsޥŭs{sR{c{sZks{ss{kcs{kZ{ޔޔkޥ{ŔֽŔŵ{{kkskskZ{sZksssZRk{kc{{ńs{k潌֭s֭kޜ歭csZsc{{ckcs{c{skRk{RZsťŭ{ssŽνΜ֭潽޽ŌksRssssk{{sksc{{kRBνŽ{{ťŭ޵ŔνޥΥ֭JkJ{kRZksRkkss֭kcŜksέΥ޽֜Zk:ccRs{kskkscΥŌc{s{Ž޽֜ޔք{νBBk)ZJcZsc{ksck{k{{{{ccﵭss{{ŭέޜ{ť歵s{RJsJkc)kkJcR{cksssckZcRRksk{{{ΌŔޥΔ޵քkZcZJ:JRsJRscs{ZR{Z{J{kk挭k{{ތŵ{ֽνŵk{kBsc{cZZcks{ck{kZkkZkJsk֜s{kŵΔŽޜ{֜ޔks:1{ZcRBJBRcc{sZsJcJsZcޥsZ・潭ń1skń{{scscュB:!ZJZ{kkZRcskkŵJkB{cZcέ{ֽΔŭΥ޵sZBcťkJs{BJBRkRkJ:BskRBscZBcJkZ{{ť浜s޵樂c֜ťŽŵZRc{BRZRkZZJscZ{s{{JZsss{s{{ZkZss{Ό{νsޭŜέkε֥ŭεc::cksŌksR{JJJBBksckssZkZZ{k{s{Ό֔{{ΔŜ֭Zskss:ksJ{{kRR{{cZRsRZJZ:Zkc{sBZ{sccֵ{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JB)RRs{R:){k1:JJ):)kR{sJJZkBkBJBZ:R1:ZcccsJRRskk:{sscRZ{dValuesfakeDim0 DimVal0.1fakeDim0Dim0.0dValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ddjjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 utmsmall_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/int32.tif0000664000175000017500000000362013701057751016355 0ustar evenevenII*Hk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck @S  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/transformer_13_dem.tif0000664000175000017500000000072013701057751021106 0ustar evenevenII*llK=S   2 r &h/?h/?@[D@#  mtr@@TXAWGS 84|x1 (^@ xA (LJXBa+ީë/X38,gdalautotest-3.1.2/gcore/data/test_mosaic1.vrt0000664000175000017500000000067713701057751020053 0ustar eveneven Red ../tmp/test_mosaic1.tif 1 gdalautotest-3.1.2/gcore/data/size_of_stripbytecount_at_1_and_lower_than_stripcount.tif0000664000175000017500000000025513701057751030475 0ustar evenevenII* SsZgdalautotest-3.1.2/gcore/data/bigtiff_two_strip_long8.tif0000664000175000017500000000043613701057751022253 0ustar evenevenII+ Sstgdalautotest-3.1.2/gcore/data/classictiff_four_strip_short.tif0000664000175000017500000000026613701057751023406 0ustar evenevenII* Sgdalautotest-3.1.2/gcore/data/mfftest.hdr0000664000175000017500000000014013701057751017053 0ustar evenevenIMAGE_FILE_FORMAT = MFF FILE_TYPE = IMAGE IMAGE_LINES = 3 LINE_SAMPLES = 3 BYTE_ORDER = LSB END gdalautotest-3.1.2/gcore/data/pixfun_sum_r.vrt0000664000175000017500000000175213701057751020171 0ustar eveneven Sum sum uint16.tif 1 int32.tif 1 float32.tif 1 gdalautotest-3.1.2/gcore/data/vrtmisc16_tile1.tif0000664000175000017500000001707413701057751020362 0ustar evenevenII*:=@S     04 S r , K j $Cb;Zy3Rq +Ji#Ba:Yx2Qp *Ih"A`9Xw1Po )Hg!@_~8Wv0On (Gf 33??Ջ?񙙙?|A`gLA# e )#WGS 84 / UTM zone 13N|WGS 84|x1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿΆx1 àԿ 'gdalautotest-3.1.2/gcore/data/bug_gh_1439_update_lzw.tif0000664000175000017500000002303313701057751021567 0ustar evenevenII* }%=S4tĶKIMvC7pa =M.X(PA#%1h#@RB8MH}TU&)b;@%ѨPpKT"F)14N:Rp";tZ'Dt^fd@Og?KPp4nTj%D`h# XBg⍀H G00Q9t7- `#&Z!]`dj@ 0:-R@Ija *^8gi jep9@<&|`dAXt#XbZst5:FI!1%9@;ɤ@d{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ðHWhp8`)#pqPDb`p%,` HF` a;p B`Pu !C3h@ƃ\- :LBA C9pR`1 !Cl `:AF 89Bf AA.ib(@>qlCK kk C`o`%Nq=0K (.րBaڻpOhBaP5v tHp&| 2 H\L7"0G G;pXÐ+ [ J-j} pHwB0D r'gH a"P` *U"P&: !c!FPf | @@%`Rc~4B1 ,Z&XxaA %C} !?d)a8pKmFb1 ;.(X@x 5ל`(T1 p, śi+" Ae a8@<@''!CLE/gdalautotest-3.1.2/gcore/data/float32.img0000664000175000017500000002574013701057751016671 0ustar evenevenEHFA_HEADER_TAG@RG rootrootoXAAG RRLayer_148752350Eimg_LayeroXAA Ehfa_Layer52350Ehfa_LayeroXAA0 n0Statistics52350Esta_StatisticsrsoXAAR@o@)\_@@^@@`@@X) 6@Z<StatisticsParametersEimg_StatisticsParameters830oXAA@H dtDescriptor_TableersEdsc_TableticsParameters830oXAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830oXAAR@o@eZHistogramion#eersEdsc_Columntionrameters830oXAAZZHistogramParametersEimg_StatisticsParameters830oXAApx R@o@HEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{400:fdata,}RasterDMS,.R IMGFormatInfo50ImgFormatInfo831oXAA@BBCBCC CCCCBCBCCBBBCCBCBBCB%CB CBBBBCBCCCBCBC CCBB CB CBCBBCCBBBBBCCBBBCCBBBBBBBCBB CBCCCC CCCBBBBCB%CBCBBCCB=C-C-CCCBCBBCBCCBBBCCNCBEC-CC C CCBCBB CCCBCBC-CBBCBCBCB CBBBCBBBBBB5CBBBBCBBCBCCBBCBBBBCBBB C CB CBBBBCBBBBBCBBBCCCCCBBCBBCBBB C-CBBBBBBBBBB CBBBBBB-CBBBBBCBB-CCBBBBBBB=C-CBBBBB CB-C CCCCBBBBBBCB CBCBBCBC C CB CBBBBBBBBBBBBCBCBC%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBBf4RasterDMS52350Edms_StateoXAA @oXAACcMap_Info52350Eprj_MapInfooXAAKUTMWALAoALAN@N@meters&Projection52350Eprj_ProParametersoXAA4<UTM L? Clarke 1866TXA333?XA^s{?fOMXA+Datumtion52350Eprj_DatumametersoXAANAD27 nadcon.dat?@B@L@O@P@R@?@8@(@@(@@@?@??:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/md_ls_b1.tif0000664000175000017500000001265013701057751017101 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5ɴ7oHxbhuM?Mx_Fҡ Dg%5(VjoWSU 9 Kd&)0vt "#qjPE«q+r %ž IZX짎J*`# aq]!))l)Y DFWx|L#]xSlQUΟIW q Y$.;.EEI4$[*@әɈ; !2,Ȋ$ RuPyD: UY,.( ԲJGVWwbP.b'+ht\)UXD*^ NP2Z^q6_ IsEq +1(+B)!氅~!ϟf+؆UU[I)0S10E촻 " B~:mtj]#oZlD'qa?Y߽ ̓Ԍ^G&7StIVmҊ;9 ׆aLd\i:Bk1}sa' h=q"~km3V<˘Yȅ娞%#m|;whPt7eMq(YZle5΄XB9_P1]k$J*٩ć[q;bIvo7n'OD;侟47:}[^%YXz?Le}f,x}ogF@hBjRIm)$I$uxxwvf>μs۝^zCJR>Hn6$< < ~oJiɃ"_f6ہFPDsrT:}"08,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o>-ѹN I$EEgq\@ R$I۬f> yd :t5CO8̛"&oLoJ (7)0dARGRf5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/float32_3.hdf0000664000175000017500000001247413701057751017100 0ustar eveneven j\ @ <F!gk<!< !j ) -K [Q 7 ; I gF<>NCSA HDF Version 4.1 Release 4, December 2000BBCBCCC CCCBCBCCBBBCCBCBBCBC%BC BBBBCBCCCBCBCC CBBC BC BCBBCCBBBBBCCBBBCCBBBBBBBCBBC BCCCCC CCBBBBCBC%BCBBCCBC=C-C-CCBCBBCBCCBBBCCCNBCEC-CC C CBCBBC CCBCBCC-BBCBCBCBC BBBCBBBBBBC5BBBBCBBCBCCBBCBBBBCBBBC C BC BBBBCBBBBBCBBBCCCCCBBCBBCBBBC C-BBBBBBBBBBC BBBBBBC-BBBBBCBBC-CBBBBBBBC=C-BBBBBC BC-C CCCBBBBBBCBC BCBBCBCC C BC BBBBBBBBBBBBCBCBCC%CCBBBBBC BBBBBBCBBBBC=C-C C C%BCBBBBBBBBCBBCCCC5C C-BCBBBBBBBC CCC%C C BC-CwCCNCBC BCCC%C%CC CBBBBBC5C5CCCCCC5CCBCBBBBBBBBValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0 j j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0  float32_3.hdfCDF0.0gdalautotest-3.1.2/gcore/data/WGS_1984_Web_Mercator.tif0000664000175000017500000000127413701057751021177 0ustar evenevenII* S  T& GIA`AԣpE@ԣpE@#       )#     @TXA@TXA?WGS_1984_Web_Mercator|GCS Name = GCS_WGS_1984_Major_Auxiliary_Sphere|Datum = WGS_1984_Major_Auxiliary_Sphere|Ellipsoid = WGS_1984_Major_Auxiliary_Sphere|Primem = Greenwich||gdalautotest-3.1.2/gcore/data/bigtiff_one_block_be_long8.tif0000664000175000017500000000102013701057751022610 0ustar evenevenMM+ BCDESsgdalautotest-3.1.2/gcore/data/reproduce_average_issue.tif0000664000175000017500000002703313701057751022314 0ustar evenevenII* 'q-=S P8$ BaPd6DbQ8V-FcQv=HdR9$M'JeRd]/LfS9m7NgS}?PhT:%GRiTe6OTjU:VWVkUv_XlV;%gZmVeo\nW;w^oW`pX<& bqXf7drYy+n\-ulZfYdY%epTY1a@1gE5 0;8WHX|Q P3 P5$ L G#nKK5NӤGRYYucX9ug5ag&cV-mWmyU#_RSVٵNcfj-UnëU9F]Tn3kER[U ڴ6ݹюŝHjTkSd宆_? e)<%r4V%wqr BM=3dv%k]lauݘ!w{=zb!cyF1c7z>d&G׳F?/d}zy_1^sȀP g0w(af g3|U 9&h٣tϺ D(=.yµW1\> Ӳv?[|E@?]"T|bHn&"LR'EQAET68@%$ .}?6Cxx=g8 bhA5 A]!HEH+$RLU)$䰪"NIS'HBT yI)(RQI+Q1I+,2SKQ(BV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 ۰1E @f.@l>!b+smB(F!# (HA%\u@K $&hP !8(ФxS a@*@BR T)ФT `*PUA[=|BWA_:`HS!SDfj9+istZ`+0Yz+5HZ a`-s[ AcZk`ƧaoTB] ;,l B^ p/_awhݦa[Oi ;Chl^{.൰{0núw\{/෴`ߜgٴchn]. wq a0@"<2PC')|N7* ϚP g桰6|Xk !6Cpk 6txm7 q o qa9@ïi:~x] 7[~o?}oS?C$B?A#<<[@ < >K=T==|AL;;C+:8x8:h7A|B 3585cP43x08p7x0/u5CbxBZ+65C *4^xcg _h֘=95*QŽ誵@Njxign.1誂6ءB>jFprʙ9`Ԫ%wt0P6n!**Qeo&pwe&mf V6* 5l V)=15F4cAI^WŀZPD8S{`?F :иРS$M0 Qtś!-'XRǏҸш{ @ H + ,΂,r"OXO_RGv}"-'# H#G"HGȁpxG{'с} $'Њ@ƿR@GX p2TnB|.`x/C[k2!Px,r!8hADt1pAEфveUC E"d\.B,/R1x]8 ô̠4% 1U|7Lu0J]UQ& |!aɘn`\apX PZEB,:'ND%@D, B0@C,ȮH0N9@FDŽ+A$DC@@AHA2Ѵ[^ٶ~[۾[\ ?\_!\)ܿ1\9A]I?Q[gdalautotest-3.1.2/gcore/data/ycbcr_11_lzw.tif0000664000175000017500000000727613701057751017730 0ustar evenevenII* APhd& Db82@#g/\w-_/ {bJT $د? ;ST`9u6:c:#,е-CXӲ:+è<)D >C?/8>bʾʎìS;M30H -B6cц2;ŵWU-(=@ S4b=`=8*Sz KXbCȌ"C ќ/Cc8#-s1$0!e˶u;03% M?,گԯ˪( /%YA> C5y(0(&$al34SaMDc20`u:IVod+L)h8rfFD#3@C&pg+IuԐyt=q  E8֚N!/[² r LXP`9K8k 85Cix (d@pa0v bLGi|G)zʜ'[i@0}+)P /?BD+1A8,(dh71D JDx&{yN5dԚPJP`e { 3PJBT*-D<G1gL Da<@iB`m-D$)aSBNg!4xb 0Gg?0CI&"q0qX~!46ZPTPt 9p⢧)"r)L?D@Pb$(phU,  a=Ɗ$j(r T9#NtjT*$q AP*]spChHa A L= S ч-^}Z魨H9ZjS!<Bt`>W ' v(" " dA TaXf^ žr P9炉 ~H A3` pm UX"Cu8NCl%j;DPS!VE!->qCA! #䩃t 9>Bn3a*`C b 싳ȟRKQ$AT@d@cps E*TvrxFΤSJf !4 d ;!@6n <CMT9=2؅:x? Q"p't FpT4SUN֢LC$'z5o=ɐh HRXt 60°`$aB G H4Xel9mƒ| XIw D*iDV,7 0xhrD$y !K6C)sgiЦ50@ҠCѸB{ 7+C%ja\0y<hM!E H1; C+Bho08 N((aA5Ӥ(Bh .Q-!L; Bxwh=cD spKA4!9b0.ʑyHp3a0fΞ49y~8 !,X}>#G : v >, `Ā' @@` ]`\6)\ ) ` `- cDvE@ma,M!a '`f jT    `R[@ *, *o-梪b@{m`&z ߭BIBv  a ` /#Dm$  Hb/"ؿKs(R %@bA! ԏ   a  nP\  O , *NB@HcF4 `C,"M6 @ '   ! 'NO*x`V@ /% @g`BJEK þ FSMf0b(N%{4  r .@X Ғԁ   ʸ> YVrk"d* $$. kf`d$ 09 >.@ @r'v3*M@t 0पS`At g!`A `@35`nm bz ( 6 ? ' (a( V Ň%oX jVM`! 3aD:O|@`@`0 {@nm7@ ܀{ A@ !$( : 6Ъ1Y$ *s6N+b(X `A2! 9|AjBZl H,P-nX` 8 @ !'8 8)!+  `@QNJah Jx8q 5@%A%N!a=2!T`a C ($  l! IN< ''pF vCLE/gdalautotest-3.1.2/gcore/data/ycbcr_44_lzw.tif0000664000175000017500000000361213701057751017724 0ustar evenevenII* P8$@AP8D. A c@!KE,xSad5!h+ e8NfIw>eY\2d#]-pPkQH,N#hV-p](Ao4GY6/E{4b*KƂ\U) $YUByuɮh2gQр 5dX[!x CIA`"/f* U$3D= @28/.#3 /:2H74K04C@^1 A %C} 3f60YV,ZpKcE "''<yrBCLE/gdalautotest-3.1.2/gcore/data/float64.tif0000664000175000017500000000672013701057751016701 0ustar evenevenII* Z@^@`@\@`@`@a@`@`@`@Z@`@Z@`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","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray cint32.tif 1 gdalautotest-3.1.2/gcore/data/rpc_5395.vrt0000664000175000017500000000441713701057751016725 0ustar eveneven 300 600 -27.689839583902 1 1 -0.000565083938580901 -0.00974153845115211 -0.000794958239421523 0.00784996523870163 2.10636680764154e-07 6.85732484595469e-06 -0.0137711394455584 0.0104193322169692 2.96123621609801e-07 6.68697894923298e-06 -1.99656815311755e-05 2.79585890439193e-06 2.55435494977974e-09 -0.000220679266647039 -8.59804168840128e-05 -1.04048356597275e-08 -1.26611886734906e-05 7.55325741863544e-06 -0.000198739559854933 7.60785544306492e-05 -14.0414767431677 2.45276702125956 -7.23869336054436e-05 -0.00450598097418797 -5.46285135312602e-05 1.14514308534597e-05 -0.000909846164052902 -0.0218529040338717 6.28996438614693e-09 5.23140484043338e-07 -0.000857585883098567 0.000793452779238812 -3.07644792593709e-06 0.000697251094359919 0.000300049830300964 5.25204092882703e-07 1.22634879473615e-07 -2.03688928834822e-07 -1.80967333588151e-05 1344 1344.5 28.2093298743762 1 1 -0.000745926079289916 -0.000900686906646797 -0.000791563212814012 0.0026046187758002 5.36774902748505e-07 4.53337123396125e-08 -0.00645061187068485 0.00103164674687495 -1.41299856798449e-06 2.30855788174722e-06 -4.82541713608953e-06 2.48302339116435e-05 -4.75899541996228e-09 -0.000134796844065477 -5.41622966920841e-07 9.10052166958053e-09 -6.50256952994255e-06 -2.88941516046748e-07 -0.000197890803203444 3.7636857875202e-05 1.36472735610589 9.85951824427767 -0.000308204934926913 0.00507860692929707 1.04795143375802e-05 7.88534978790334e-05 -0.0361831898897949 -0.000646503355165695 2.86864410697918e-08 -1.67866121003613e-08 9.5227084031535e-05 -0.000352661500443663 -2.02804763937969e-06 0.00064048124228222 -5.50652734678803e-05 -1.46603300837933e-05 -2.81211146813121e-07 9.07323766119461e-09 -7.70512335653336e-05 2016 2016.5 gdalautotest-3.1.2/gcore/data/cp866.zip0000664000175000017500000000041613701057751016304 0ustar evenevenPK [U7DPK [U7DPK? [U7D$ WR㭽wwPK? [U7D$$ WR㭽wwPKHgdalautotest-3.1.2/gcore/data/SDS.hdf0000664000175000017500000001100513701057751016022 0ustar eveneven j\x|:: !2!:=""w7j##  E $<%%@j&P&T b'r3((<))@j*(*, :+J7,,?-4 HDF Version 4.2 Release 10, February 7, 2014ValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0 SDS variableSDSVar jjjjj SDStemplateVar0.0 SDS.hdfCDF0.0??ə?333334?ٙ??333334?fffffg?陙???񙙙?333334??fffffg?ValuesY_Axis DimVal0.1Y_AxisDim0.0ValuesX_Axis DimVal0.1X_AxisDim0.0 SDS variableSDSVar jjjjj SDStemplateVar0.0Coordinate variableCoordVar@jj jj  Y_AxisVar0.0Coordinate variableCoordVarjjjj X_AxisVar0.0SDS.hdfCDF0.0ValuesY_Axis DimVal0.1Y_AxisDim0.0ValuesX_Axis DimVal0.1X_AxisDim0.0@A VALUES Valid_rangeAttr0.0 SDS variableSDSVar j#j#j#j###j !"## SDStemplateVar0.0Coordinate variableCoordVar@j&j& j&&&j% && Y_AxisVar0.0SecondsVALUES Dim_metricAttr0.0Coordinate variableCoordVarj*j*j***j ()** X_AxisVar0.0Storm_track_dataVALUES File_contentsAttr0.0 $'+,SDS.hdfCDF0.0gdalautotest-3.1.2/gcore/data/stats_nodata_posinf.tif0000664000175000017500000000046413701057751021463 0ustar evenevenII*  S?   Sinfgdalautotest-3.1.2/gcore/data/4bit_pal.bmp0000664000175000017500000000054613701057751017114 0ustar evenevenBMfv(wwxwwwwwwwwwwwwwxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxwwwwwwwwxwwwwwwwwwwxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxwwwwwwwwxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwgdalautotest-3.1.2/gcore/data/contig_strip.tif0000664000175000017500000000525213701057751020125 0ustar evenevenMM* &  !"  !"#  !"#$  !"#$%  !"#$%&  !"#$%&'  !"#$%&'(  !"#$%&'()  !"#$%&'()*  !"#$%&'()*+  !"#$%&'()*+,  !"#$%&'()*+,-  !"#$%&'()*+,-.  !"#$%&'()*+,-./ !"#$%&'()*+,-./0 !"#$%&'()*+,-./01 !"#$%&'()*+,-./012 !"#$%&'()*+,-./0123 !"#$%&'()*+,-./01234 !"#$%&'()*+,-./012345 !"#$%&'()*+,-./0123456 !"#$%&'()*+,-./01234567 !"#$%&'()*+,-./012345678 !"#$%&'()*+,-./0123456789 !"#$%&'()*+,-./0123456789: !"#$%&'()*+,-./0123456789:; !"#$%&'()*+,-./0123456789:;< !"#$%&'()*+,-./0123456789:;<= !"#$%&'()*+,-./0123456789:;<=> !"#$%&'()*+,-./0123456789:;<=>? !"#$%&'()*+,-./0123456789:;<=>?@ !"#$%&'()*+,-./0123456789:;<=>?@A !"#$%&'()*+,-./0123456789:;<=>?@AB!"#$%&'()*+,-./0123456789:;<=>?@ABC"#$%&'()*+,-./0123456789:;<=>?@ABCD#$%&'()*+,-./0123456789:;<=>?@ABCDE$%&'()*+,-./0123456789:;<=>?@ABCDEF #% ( gdalautotest-3.1.2/gcore/data/bigtiff_one_strip_long8.tif0000664000175000017500000000037513701057751022225 0ustar evenevenII+ Ssgdalautotest-3.1.2/gcore/data/int32.img0000664000175000017500000002574013701057751016356 0ustar evenevenEHFA_HEADER_TAG@RG rootrootXAAG R9RLayer_148752478Eimg_LayerXAAEhfa_Layer52478Ehfa_LayerXAA0 n0Statistics52478Esta_StatisticsrsXAAR@o@)\_@^@`@@X) 6@Z<StatisticsParametersEimg_StatisticsParameters830XAAKK  KK9Descriptor_TableersEdsc_TableticsParameters830XAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830XAAR@o@oL?@B@L@O@P@R@?@8@(@@(@@@?@??{400:ldata,}RasterDMS,.R IMGFormatInfo78ImgFormatInfo831XAA@k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckf4RasterDMS52478Edms_StateXAA @XAACcMap_Info52478Eprj_MapInfoXAAKUTMWALAoALAN@N@meters&Projection52478Eprj_ProParametersXAA4<UTM L? Clarke 1866TXA333?XA^s{?fOMXA+Datumtion52478Eprj_DatumametersXAANAD27 nadcon.datZ+Histogramion#eersEdsc_Columntionrameters830XAAZZHistogramParametersEimg_StatisticsParameters830XAA R@o@ } erType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/ycbcr_12_lzw.tif0000664000175000017500000000552013701057751017717 0ustar evenevenII*H  0xT" C"P>'@0x@DGtXmA ]? E\[;e<;grٰw/' ho9SHDc1zf_a! %ODQ|3 V> SѐY<eX:M%sX; y(g,HWzvt0afSY\^`ڪ@v5v:E8lo<F_w+OfIV; esTŌ)"Sf2NHW:C7xQ6=,tm+:5/.,.CC* n7p "{52b4@볣;1̼?` l0  Ð0Bc, 3 8 ŎH,-> L2 ŇC20 ?} G?/ (0,c( P # @* 1(0.I-Î[=PE,0)€/h/{ :7Fð⎤@*3< #f!p/Cй=x0=X=Sc Ä:BBcF#85E Peϐ5/P̊Rx'+X㰮+ꚶ! <.;@33 1 =$>? 8NH<>FAzP\C(JC_ P.rxHv&D2Xa0ΙMvP/`CxGښ: `dG"!H;ðw /T $d?KYA$1C39 0 `o ) shaoa:\ AF 60Cl$W0t9HZ\"_ @GC$  xl@$ YP"l1a)rCI f@!?)L2%O 7=hQptD)CQ 8DU +0 !9C\ !3и [BFlĈ@, p(RpC ĀPa[  =D AE6l$DLA= @I]a0 hXА@i-B~ P<@ =pQ[0iR-Qx6ڊ>FiN ! CBb p&k(q)Zf> !NM(G#Dlp: $"`8q>y# >}D<nƃa8q! -@Hȴ0lìr7CS:/㐃B0uF"DhMBݩVu5@ H.vD hF" a A@z=<а!Ot><:CFAģCQs'?" 8fN{J(| Bp8 aB`0A !n5xb} `9]P((Aq %RkA0-p%ZD>0v X9W858̄ C;X\T /Q \$3p*IR!paYJP ؄B@l8$!3y#p, ANC#DD!?rBC۸8M;988xaE` ÀX"~Dh!A í] q Bfi@8qҜ* )a jwBo`=` (r]9F!à!B 򯄸 Uaχ@2 0w|P< \ h9`\`( ! V A8 a& !OV +@''6`R VPJLa }x @`@ A@ `j a =Q ! I. s 1 BHz@jX S <8'' i? 8  CLE/gdalautotest-3.1.2/gcore/data/huge-implied-number-strips.tif0000664000175000017500000000020013701057751022566 0ustar evenevenII*.2. gdalautotest-3.1.2/gcore/data/zero_stored.bin.xml.zip0000664000175000017500000000144713701057751021350 0ustar eveneven 5000000447 zero_stored.bin.zip.start 0 0 83 83 5000000003 0 5000000086 1 3 zero_stored.bin.zip.end 5000000087 0 360 gdalautotest-3.1.2/gcore/data/test_with_mask_1bit.tif0000664000175000017500000000141413701057751021361 0ustar evenevenII* Sj .<Sgdalautotest-3.1.2/gcore/data/byte_gcp.tif0000664000175000017500000000141213701057751017207 0ustar evenevenII*zS  " br????#  mtr@@TXAWGS 84|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/quad-lzw-old-style.tif0000664000175000017500000064250613701057751021110 0ustar evenevenMM*B&H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJUF@䏊$X(c$ί0On=tDEt!6%~\z^닥d.C 8oC@t UIl/Ex۸sͻ0",?&I Y.I+j躡;S]{1/ȼ!CK%L^ fRrI8D$L!?W\e`hFFZh[rU]z{[؇~0(4h#Q ` `?@$0s Nqiܽe]jystR|xxix yЕ ]uD  AE$ĒP<8uXTltA^b&|9b%ta&lͩꪬ.H*\ȰÇ#JHŋ3jȱǏ CI2d?>\Ͽ}/= F@D?)YO ^2_NtfOϧ,^I?'L7T?j©HE kJ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:0 vp"mG uP, ŝr^00|s' :' *nFؐ?!p@F" #,6P!@0p4xPQTa%S! T~(_V~_LbY|q_z@/ҋ"./⋻"/؋// "1X 0r㣓F$Ɛb`Ѕ5 jc`2f$c0: tp-Αr8nA (Fc:p#DC4 @<@3 8΀O3 9:>hf'p31B,wf4jF!fXX3Zo1C/$Nfd*"fH4q;8PL` x,0\a~_0C/%  F,(]P3u2"j`E8Њp?"@!оG+w"#0GUaxQ3E0L " F3 i\@0 !4h(@F *^ ĠQLa$%Kn20e QBiA 8Pyg9Y} @ obCC+@ARB@=/P  'i@iC @ 0}m`z`&ـ\~ ? @`I pS p] ePki r @ÐxP|PPPP0 Pk 8H 5 `  `0 p P @ @ w ʰ  ` ې u MXx4@q`kP {iP | H  836@#P  &WT`Jdt Pep01Gp> ~0o q s u w y { 6`` wh j0PAX  Ҁi  p ՠ ̠̀ ` @ p  0 : ˶ P R Ҷ ٱ 6 qޱ ] _ l r vK        " $ ,*K 0#`"0 + 4 <0t`Xe0 Wp ^q `q kpnp'a ia if ma oa qa sa    )yp h`  p @)p & l`!`` )p &Đ0 -0  5 tDeL I P T  [ -  l0qu |0y {  yWy@fp    03:k` %PT 7`  EP @N @MM>Pf`  ;I;;; ;Y;;;9 z @ U 0 P ` v P P  ۀ P }` P L?.880]4q_ r p0500 0 6 Mq[PppF{"T rрh {`T+T  ؀p ׀@Hc3@ @ `P * 6 dt Pep yc h da ga c h }Yp@{a s s v y 0 0Ґ` !  sh  @ 0Ҁ    ް ڰ~@ C9P =%@)@v 2@q ޱE@`PFǠƀF0K` rd Q f tŰ% oopK@ R T B R B G B R j=qäD D R="JP0= 90 #0 &p 0`@ 8 ? ttꝵ` @ `1 b1 I '1 i1 k1 m1 o1   jSZ G W a 0 \   p + l扴0J0+0 &0  -2P 8`йԙt}@`Iۢ۞gJzЦ@P@     `p 0)t΢ ^ "p< @ pK VZP cg 0r `f0~ցօ`֊`֎`֓ p ` [- @ 0ղ P J @ ݐ P  Ӡ֐ ؐ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w/8 a&2Z0 h؀B)l@UAdQ#=P h x*ŞJE, " d3PTB@K}a:?09U1OPb0 '4 @bϧ8'XQXfaA)S@)[8 3B,(p +8U| RA")8\ +|\F2dAH8цq$CHʑ = AE;@F%ܝ tw"8Ao`E7m8.a ^TF1bH2ьc #F5 l􂦹c-~X9J t.1\cG l1;ТL ĭ `p#t1@؁3i;M5RY2]L@-[\$nIܢ@C%n1\&p\0D. y"Eo[hhQ8h-X W$8D-lQZF$nVBF7loȂ8J r|"p5DT1 ^`8`Au*PU&v @Q P 0 B~P4@ $  "` -`_2_6@M k n q S au z |  % ' 0Pp QQR  `_0__S Ɛ ` ӰFͣ ɐGs `  uQ.~PePVV``ȨȘ pWW!0!P! X!!pK` R "R $R x"pYPK@ 2B E 6B 8B :B B PPPG2 IB KB PE PPUB PYB [B P_B aB cB eB gB zPRFaL` *[q0. 7" ?  Fp  Sp  bpP i@ s0p zPPP _  P 0  6 #  9 0OH&?p ,p00 4`^ > EH0 RP/-`NF&v#  2p2h 6b`bP`Pp 8 `c 9 <& ! Ȁ 2 I @b R `C 6` !^$ k($ A` _0@` iPP rp`` {`@ @ p @  @  0 S ΐ S|: ߀  p 0 p @ `@| @] ` %` `ʱ @ЧEp Ð0 P Pq: `p$0 P`0 [x0@ h` @ r pP z 0 Я@G ;1 {9 ' Q$ T$    p @   P ߐ `0 Щ@ p P #`U:D a`[p lpU` w@VS` `` { $!4`` P  PEK`5 " "@&) 7 =pzYp nq MP@N01* PpP2p2*i0PpP`k0P P \Y p I My % @s ư ;  ϧ J  p N PU`.@`V ` 0W 2 (W`K % " cP( " "2K v0 ~pY*2  6 8 : < >  C GJ$[%pP%p%٠! _ g {&<: 2 p+ ;P" B` Jp S `P p _ ` fP mp0P vz˂˅ˉ`@ ̖˛`˞ˡP 𼥌6p   " `p , 0 < p7STPN` ): 0@@, 8p0`H@X Q` Yp^p`cgkp@Phkn Ӑ𕝐pp -  i @ 7 hQA? l@j` pPp p`@0 8 00 $& +0 < ep m } pڃpڇڋڐ@ p١PP  P ` p ɰ `   ` PP ` @  ` P3PpPP   7<=@` ` J@NU p @pE PP Zx@ g`  r p { V.V~SPM> p T p  P-   |  p @p  @  @)f=gp]0[0 hpU s0`R {.Q ` {@  0 pS BrG `p* 0  &p 26L@ I0 /9 u! $ C! |!      % '   -    ! ! % o( 6 𥱮@ OD , @ Š ` 00 ` ` / y ٠ P @ Ҡ ~p } 0 0 ˮPPK    e J,O ?9 _ 4~  )ß!" "@"`"KhK 2 %{#< Z GO[O Q YP %%%&ǝP&p&0ȝP&@- 5 7( ?@!` FP N0@ W0 _ 0 e  m  v ~     P 0 @ 0 p D P @ )`  8P? PBcP &E ,6 4*@!c M`Kʖ` ]L Lό0 ` 0 ̋̐̕˙`˝0ˠ͖ͤ ` @ # Đ 1 Π!f}{ ]`SL PP@ ; `2 !@) 'P 2P0ʀ i20 x 0   pP P P @=נ P Ґ 0 ˀ ր `  P `0  @ 0c^ 0pnfP$ P0  ͠ 8 h E   U w/{p D Pp@X * d`  n  {  pE 0 ` T W p  p @p  }}z@ p0 t0 0P0 x  s :(PH*\ȰaA!I|򩌕Oi|r(8鴧I?&44RH@|J1@4 LTQ(bӪOVjʡӧP p,ā%*@II2"D R~D$1H FVnof/wo&錄j/(/,iWHD R9L$h$M;{,2@x ap)f ڵZԦƬ7c.,x\#US_h` 'Kt%-'9^A}A&s̈nj{c!<&& ʐː   Όΐ(GT ]xB&2p 2T `%A0I HD8A$R`@|#b@8F@#rjk!"«#JB% 8 x"A#LH)8$t-Dr$ð@13PD3%  fbBD',I 8hR %@Gфu\Ε؜ t2(0b\*L B-PKbB%L 8C&ixBsr$( LJt"P0:lA x& (dbB %-|` TRPJx-/x ;!'..I;X.'J:N.+2 9.X7-hs 2 5@# -4C5̲ z, Xc0-\XXюZb0:lt稅,A[,G axC, Y0F, X`2\ b`E6"1a& T(NQNE>!|"`%bЄ~s XD)Q4@19ء,xy `cCE1#Ң ޠ.ɃW!G *0B[(`QA@ n J@ } H   0  @  p II@   y ` r 0 k ǀP p P 0P 0 |/tqfxb` \T` eMP U u|IP @_ x 8@ LA ` ` @   phxq@3 p &';B?0pH@`PS0PpP`QQRQQQQQQQZUЍЍaQQQa0W ƨW@ s i `0 f W  0 P ޠ Đ=z` U|Q[F_U B B B R B B B B 6@_)!@]"#_$2 &2 \"""l)#P#^##K @ B G  K y`0% y%%%0 9&g i k m o q ) u - / 'e )BG0>62?(EP"M V_p`f@8`r` i) `p i 0 !P ( 2ǐ ?рӛgHj &cDP 1P7 9 Mq %FiJ`iN0WfZpecViffofy0g}`gsFzgn &hV W V #p Jj 4 & `A 1  zpN pA@ p8 0EHs`#)0t4p]if HD0 j0 00 0     @   P ɰ P P Ұ ʠ ` 7. pB) 80  0y }@K/zp w  m "; = @ F 0~ T Z+ j ?Pz M@` k fj  t  ~pp @H~[ P P W5 00   wp @ np  hP ΰP   ` p 1-h( I[0 ^@ P gJ3I300G j{@N {PPP  `F ෕k 4$ ! #&p04  P? @G`0P S !d/` Oa\pUPp X|ū! I< 0` C̐ @ : : ` 00 ڐ ` p ް ` P ?       BRK!q   MR&b*"0"@ #^^##0_$KGKG]`TSUWY[]aWap&&b KP0'}''- AgP )0F2`;:P0BP'pI@!PR`@[@aP i`0spw0 ~ׂׅ׊p׍P  כ֝ 0 @ճ@p 'P 0pP` ; J2Z>=Q6 'eF@R(\:9@0?0'FKNSW`癞I`i@ iiz:z j j `L  `  2p >ۼ!y pPVP PA p7@ && Z剬`E0 @Q@T@ep| {@  p   Pʪ ݐ ͐  8E `Į0 0 ^ P `  Pc !t j " Ԁ ?` @ؐ INS ܠ 7@i` CP U b ` m0  {p  / Ex P p = ~P p w@  l0 P @0 # s   P ~ ~P:$_ Y`PdpJm FvPD~RpppǞ  o +$ !(` @5pP 0p@?  GpP0PPWi/~Zt  OP` ο  0 Ѐ0 o 0 p P0 p l @ @ @ 0 ` p Q '`   -\ "$&(*f-"@ #^p#KTKUKp@_$ K0%9` Kp p K Kа&&&&'0'`ӈp''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p\㸂 XdY|A_4, K02 D1 $+2Œ8#+(M4J#P*`5re#6P 7lӍ||M8"C(09̣{xU{$@T'^3@{`"̃,B($ L"7 &bÉ|5)hYd%YEVd4՘6⍦#69rްn[<3lxN>?\j!`k?mXp6laIi`Vl(9a`օh!7VP0a*H(M +;Jb̠41( %P}(a m^3H: ^%l$5jp"XLcZ`QX1EcLXl`Xc ox@@%̣u"8(J(76PJ*b) , ̢4(M-Js4.‹"+zV`de!FiQcIFie@Pqkєh4EFlkGFnmEFp!7pE!y̑sMYGxTG%`jK7gfavd$A?_HqFZ`$d?QaTR8 Ƅv%\G8q@\<uq\28 *AF07< g2% Tc+ViSBA1M1\!uqEAMaYMNP 0"Q5%bB"  rS#Ugp``?P P M! MA MQ Ma Mq M   ! A Q a q E E r B l!iCfcPraұYDUsгF cdqaQC6!:7 R3lxlXeEllbW8r/$!"' ! p#O 4h=m1E!iq֝^z\iAo"Q'.;p.:P.8 .6 .5-3-1-0-,+)'%-#-!-- . 1 1^ 3B5UrC uq d y l<2erxԢ!.P5ac(]XBz"zz B# &'$'"' ''Ѕ !*'Y !KYBR܂ 1 a z ( s0'v0 x+z{P4|4~4h%`nP5A0;5b=`6 7P7D1  G1 0Gs M1 M M M ?`pL!EQrơiP1Qq=?+Bu:ki"I)!!r=rP5qp0;n5lkh`e@JVAdirE.uU0/u0);\\!VSGqSEAr#la^UPY=j lP3 . MPdzPǷPǼPǿPPPPP22ККККК0AQk,0;6=``  7PP````````̶  ! A Q a q   E! EA EQ a q B B Ʊ l i #AaS+vձY UCvq uYMơf^KaaHCII"7 c S"lbEB?<96201,p[)& .$0"P0 !' ! p#0  4@P5$b`6  yLae`gPҶ!ҋpqsP[hL0'> .=-;98z[311.,*('$1#p[ p[p[--2'V% ZPærdy> 3 &[P_`$c,fZhj0lmnP[q`-E XD 10'00',0'+0')0''0'%0'#p+!p+p+P'; #' !*' `( !pX|:K!P[@-0@`,`ST7rFE1%3AUSaKP f# iC Q q o r u E ! S GQeĠȠ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y<i =T;OГ=dݣ@=tQWL6ځLx8<aCI *2b+X"6n100 $LUh% iiBZU'b iBZ)&cɠb2h bDYpXt_OFe]mFWqA=C k6H+cS&b`0  # % q qא $$AـC@sܠ'@:9<8`' 80'*`]٤bM@@  ! T c 4ðŰǰ0~ !O(:԰IAB   2Rq1q9 &abH m  p! A b    ^@@*`^ݢŰưpȰ@@@}~O! 1 Q a q ߡ k  m!BVrgfBQsN'(B@n0bB q@C :8 8 -0P!p&@&( 112" >2#BAP T TB Z  D 3 R J -!3NVcdgmk`:!!8: @C q`B@ z@nJ8Vt`2vp"y|@&~pa"Aakr"O [1 A a t NT 8 UpQ q ĥ':1 R Tq OF  ! R  R  NC#ga'3RqcO).@0P)" )0@&a/_511G;UN      # C c N  ! Q3 e # ~ R 2 1PT  1 OA b `A-`8 嗠7+7 8!p8`'880@8 9 9 <<<''''<<<< 9 980@8Ҡ8`'! 8770!*`xOtg4.o#! ы)#7a +77p88 9 99 ' A A@C@A`A qP AB0r0r0r0r0r0rP P p`Aq@CӠP &C@s٠'@:9݀'8ߠ8!+0!0`>^ op 1 q ܒ  t^q ŗ|ͷIII-----010```ސ >\+0!~0'7L-F`4")`p_!&p. PPPT eGpvT T T!  w    "! &װ!ZB m &BgR rf#QCNs*C@n @@! sqA '`'0'#2c O " A V b # ' E ! -2 Jx R X 3b U  4 U 3 R; Re J - ! E#A#bNnp_p.@ 0'`''' p P eRUr%v`2y1{R}0~.@&m1 ! O@ u`@@Pp.p_`!P)"Wְab`12 U}m r8u0'wyz|~&@!P)  )0@&Pa//__< Q ! ! !& !F QS " F #b  ~ % B !qوW@n` *I-`ʸ#  " ~9 |S c s   v v  # 4 T s  # C S s   v v" 2 V s s  !TЁt! $p_ gz*s7h`'0@ 9<9: ' C Aqqp `A`A`A`A`A`A`Ap qq͠Π A ՠ':@:9ۀ' 9ݠ8p8~)BxP]qH*\D ODa,':h%2Y"k%RH^"}1a}<1e}QGjaĆQFna1\(㮚u\ۑzC`*°]Ff96I>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+p pݐ+`+@TP!T!R2U"pUc`"~@cc7&)PQV #P#p##`jPPWpWW'$$$$$$$$$$$ư$ɀ$'͐WpWPWPP` #p#P# #PV[U"\*@:`"\,H % B IU r    $ 1 Q q aO'd``.  1 Q  " Q    S% R#%b @8FFc\?&'C)S+s}%5 5 u5 CR Fb @s } H H z G I w  M2 C Pb Pr P  ! A a P P P M w K2 KR z H W30$PjP߰#M9@HFu+[#::@lpP@P;P;l;;E<1;b;F뒡es4 'LҘ4 -0WRp\`Fۅza1_X0,&#ubXR^ E$ lb0'"b/K* B"H,*2Т"-Ғ"-HK/#-H0B"ƨ2*,"̨3$ D.5b\c/؋6tc/700L9s!1$;C2=zta,;Ia8&@ V}B( T AH* @pM,`3 b6-fb6M/f lX av6Ƙ ˈA g( Fj0;!mjhohG?qr%R1Aw(Gg#>׏BLS(=RŏV1HV{] Т$M;N/;N`Q=#7]gFqQj8RCq>l1))*0?*S r **/@N` @ d 400vbGvh7v  ! B b  " 2 b  " Er0sAٵ)8{ t! 1 %Q ,a w - / W 0`\2 ^B zS v  u u A ? ? ?# ?C ?S ?s ? ? ? A <  & zC ^b \ W i# QR O w /  Gc s#kT*9`Me@>i:0jvj :f€Ő:ǐ:e`i4*ḑU^N _N0p>yQ B  1 Q {|ðİŰǰȰʰ˰~{ {U00```` $ $0H0H# 99K1pQs]H1,R"p*O*P!/@! `?  2 R b r       I @ BXwCH @ p a[Ku[ N!@ +P!P!*۠!!p* "P"!"+Aeuc()@ 31##90H $`Eitn  CDDPDGP67bI B   :"  ?SrS"ce 2 S c % ŵ   ! 2 R tNu T W" 2 R b/͹` N! +P! Ҡ!0Op*P0݀0PPᰠpV Ip) 1qAC`1]]#9@^p'2 2088p%p%%%%%% ` ` ` ` ` ` ` `7bLcr&\2 WR 4s #'78%$p'$PG"7HP]TkU!M9:ee@>P:`   1 A c ^ \V2yl۶nl[j&  $ D q B B  010000000000000000 ~f`Ӑ $@(B !Cc=r=Ս##HH1#]~@` aj  3"  1 Y r X!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`&fc7T֒f"}uOkM[@@|T^z TKxhA-w® ;/콰 ;0N1ǔ'SfƝ 覆h& 6F(F@Y`(!Z-."R/%R/%#R0 01Y!P)DP %+"+Z,"R-%բ-0KKKK-Ӓ0-@1*2"%#213Aӕ@4id >/Jop 'q W rwr(r(Njr(0 \12%321ӛ3q(m *k&6Fˠ ]! ","P-٢.!(/'H"$#x@@( iE[Wn6KoW pp p p p p GLwLon jFl8<@h! ".".! @/R@@D@b#2, jm!(..[/nnF b5F[2j7G.WngH*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶۷pʝKݻxk3 H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳhӪ]˶ۓ BMBMDE6E>$@\x/EI]wFA"%&'!'(=(*0K:RHdYm!#_֘y:&**+,+,H-2;HYlINX$2Y:=>Q>?m?@AA%a=% 1Q/ 3 j<V  BKH iC'''gdalautotest-3.1.2/gcore/data/int24.tif0000664000175000017500000000362013701057751016356 0ustar evenevenII*Hk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckS  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/corrupted_z_buf_error.gz0000664000175000017500000000154313701057751021663 0ustar evenevenMn0MV]$=Ee!TMYB#(9JOR~|ag~fqBBj>6Rj3zrםd]n u˯5o<;S6$#JW!0?#v4[<籿JOR~|ag~fqBBj>6+zrםd]n u˯5o<;S6$#JW!RDA2 A 2 133377 131840 1026 1 4105 2 gg 526 40 107 123 132 115 115 132 107 123 115 132 140 132 148 132 123 123 132 156 132 140 107 123 132 115 115 132 107 123 115 132 140 132 148 132 123 )23 132 156 5?#v4[~ꁫ_132 140 1026 1 4105 3 dim 13paswv]V_gi/#oܽp1Rw%Is;sword=2$5<'uV 4 254 gdalautotest-3.1.2/gcore/data/leak-ZIPSetupDecode.tif0000664000175000017500000000057313701057751021123 0ustar evenevenII*r =S   VN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|xcgdalautotest-3.1.2/gcore/data/classictiff_one_strip_be_long.tif0000664000175000017500000000022313701057751023453 0ustar evenevenMM* Ssgdalautotest-3.1.2/gcore/data/cfloat64.hdr0000664000175000017500000000036313701057751017034 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 9 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} ././@LongLink0000644000000000000000000000015300000000000011602 Lustar rootrootgdalautotest-3.1.2/gcore/data/esri_103300_NAD_1983_HARN_WISCRS_Adams_County_Meters_transverse_mercator.imggdalautotest-3.1.2/gcore/data/esri_103300_NAD_1983_HARN_WISCRS_Adams_County_Meters_transverse_mercat0000664000175000017500000002330013701057751031246 0ustar evenevenEHFA_HEADER_TAG- &{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.1!Z4RasterDMSEdms_Statepk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksck!1! Ehfa_LayerEhfa_Layer {4096:cdata,}RasterDMS,. rootroot1!- -!IMGFormatInfoImgFormatInfo831% - !Layer_1Eimg_Layer@@"1!E"Map_InfoEprj_MapInfo)M"NAD_1983_HARN_WISCRS_Adams_County_Meters~"ALA"ALA"N@N@"meters!1!4$M#ProjectionEprj_ProParameters c#Transverse Mercator#gM&?-DT!)~Ps8?ǺA_vOn?$ $GRS 1980@TXA'?XA>k{?@TXA"$WDatumEprj_Datum$HARN$Area1!- %%GDAL_MetaDataEdsc_Table2&%&#Bin_Function#Edsc_BinFunction%%&AREA_OR_POINTEdsc_Column %gdalautotest-3.1.2/gcore/data/stats_nodata_neginf_msvc.tif0000664000175000017500000000026213701057751022457 0ustar evenevenII*   S-1.#INF?gdalautotest-3.1.2/gcore/data/pixfun_cmul_c.vrt0000664000175000017500000000140313701057751020277 0ustar eveneven Product with complex conjugate cmul cint_sar.tif 1 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/test_mosaic.vrt0000664000175000017500000000126213701057751017761 0ustar eveneven Red test_mosaic1.vrt 1 test_mosaic2.vrt 1 gdalautotest-3.1.2/gcore/data/int16.hdr0000664000175000017500000000036313701057751016353 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 2 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/classictiff_two_strip_short.tif0000664000175000017500000000024413701057751023240 0ustar evenevenII* Sstgdalautotest-3.1.2/gcore/data/md_kompsat.txt0000664000175000017500000000031313701057751017605 0ustar evenevenAUX_IMAGE_LEVEL L1R AUX_PRODUCT_LEVEL RPC AUX_CLOUD_STATUS 1 AUX_SATELLITE_NAME KOMPSAT2 AUX_SATELLITE_SENSOR MSC AUX_STRIP_ACQ_DATE_UT 20070501 AUX_STRIP_ACQ_START_UT 070000.000000 LICENCE NULL gdalautotest-3.1.2/gcore/data/sstgeo.tif0000664000175000017500000007651413701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±OBƦ>>BƋh>0BBģBPB"#_BVBăB͸±BBJ:BƖLB||`qB)y\Bs6JB {4BƛSz!Bɏ B2Ħ BXlBƂ8½BxBڰlBr”BƔ-kBưrPB8BqBƿ5\BƗOB©B:BƱTBiwmBOBC,Bn B7[B{8 ByB+wBAtRBGB%Bm Bq?B(Ү¹B0GkBy<Bf,B盰B#­Bl´VB-½BƠ3AAPjA73yAGLBƉ̢>BœB%$BkUBWBǰrBƟۣB/}B:mBm[BƷ®JBϤ/7B+&BN4BƞcQBƈ]B9̥BƆ\B7(Bưj¼Bদ™BKۦXqBq3YBƝO DB揧*Bǧ©Bƒ 6BƶDB҉=B5ƨخB¥BLwBƹ/YB=٩>BX'ŒBkBƁgB2BZZB$zB5SBqO^1Bd¤B ›BWTB B"dBƼ¿2BƷ BƧ]BZůXBƫB-dB/B 92BU˳BƒClB9ƲY+BƩeApD%A <' }6} &}RSF} >]gdalautotest-3.1.2/gcore/data/epsg4979_geotiff1_1.tif0000664000175000017500000000044713701057751020721 0ustar evenevenII*&S  v@f@fV@sgdalautotest-3.1.2/gcore/data/tiff_single_band_with_whitepoint_primarychroma_tags.tif0000664000175000017500000000037013701057751030152 0ustar evenevenII* k>?S PX9T ףzTLff&(\gdalautotest-3.1.2/gcore/data/md_dg_2.tif0000664000175000017500000001265013701057751016714 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5ɴ7oHxbhuM?Mx_Fҡ Dg%5(VjoWSU 9 Kd&)0vt "#qjPE«q+r %ž IZX짎J*`# aq]!))l)Y DFWx|L#]xSlQUΟIW q Y$.;.EEI4$[*@әɈ; !2,Ȋ$ RuPyD: UY,.( ԲJGVWwbP.b'+ht\)UXD*^ NP2Z^q6_ IsEq +1(+B)!氅~!ϟf+؆UU[I)0S10E촻 " B~:mtj]#oZlD'qa?Y߽ ̓Ԍ^G&7StIVmҊ;9 ׆aLd\i:Bk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 LSQ1"ZI7 Շ 0i'@w> Ggdalautotest-3.1.2/gcore/data/test_with_mask_8bit.tif0000664000175000017500000000214013701057751021365 0ustar evenevenII* S .Sgdalautotest-3.1.2/gcore/data/tiff_vertcs_scale_offset.tif0000664000175000017500000000065713701057751022460 0ustar evenevenII*S  0 DjN@N@@@A̞LA$@ **# Wh )#03)#NAD27 / UTM zone 11N + EGM96 geoid height|NAD27|EGM96 geoid height|kgdalautotest-3.1.2/gcore/data/tag_without_null_byte.tif0000664000175000017500000000027213701057751022031 0ustar evenevenII* 1Ssoftware without null byte sgdalautotest-3.1.2/gcore/data/byte_rpc.tif0000664000175000017500000000241613701057751017227 0ustar evenevenII* ~S \@L@gj+nEHhb@r@@L@M?Q|a2?P@EcͮAe?:/ [nll~Xru?85a?i?/1 :?EBv:5 ?>Ήw¾GyD>HoվVź>ܿ3%raJ>پAa+Q> lw>?ЭTuD["~v?0&\s$ɠ/6$7>"vSqM?gӤl>]/5-> "s>E(;8J={^B>*}2yM>Y EJlxh> BR>C~Yb+ق>PS?N'?-Cm?TeA:'E{?e}muQv0iz~nu$N>O>=?|L-!?2w8dnyo첝>"ڕh> ٮӔk?s>%rPsӲ>X7CkY>ط>H%lpZ?ЭTuD["~v?0&\s$ɠ/6$7>"vSqM?gӤl>]/5-> "s>E(;8J={^B>*}2yM>Y EJlxh> BR>C~Yb+ق>k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/bug4468.tif0000664000175000017500000000205413701057751016521 0ustar evenevenII*xWn@=nJ]t% D fg Z)R"?u`=o@{Dza;玁Ll]iD8ȵ;@{)0=m)l3`EK,M>--8JZ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J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@I@I@J@J@K@K@L@L@M@  2@2Sgdalautotest-3.1.2/gcore/data/cfloat32.hdr0000664000175000017500000000036313701057751017027 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 6 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/22281.aux0000664000175000017500000005432013701057751016112 0ustar evenevenEHFA_HEADER_TAG@RLrootroot!AdRRDependentFileEimg_DependentFile!A Z22281.tif^ R0 Band_1467904135Eimg_LayerentFile!A Layer_1 ^ |DependentLayerNameEimg_DependentLayerName!ALayer_2^ RE@ Band_3467904135Eimg_LayerentFile!AL*.(Ehfa_Layer04135Ehfa_LayerentFile!A{262144:Cdata,}RasterDMS,. |BDependentLayerNameEimg_DependentLayerName!AJLayer_3 dEimg_NonInitializedValueEimg_NonInitializedValue!A9 ^ gEimg_NonInitializedValueEimg_NonInitializedValue!Ao7Eimg_NonInitializedValueEimg_NonInitializedValue!ARdMap_InfonitializedValueEprj_MapInfoalizedValue+A'Transverse Mercator (South Orientated)$!Ỷ@HgpEA$!Y|.@HgSeEA??meters d`ProjectiontializedValueEprj_ProParametersValue+AG'Transverse Mercator (South Orientated)?[n u?(0Clarke 1880 ArcGITXAcٽ?XA 9{?JtMXAYDatumtiontializedValueEprj_DatumametersValue+ACape-1a[@r9 n^ Map_InfonitializedValueEprj_MapInfoalizedValue+A Cape-1 a[@r _L*.! dEhfa_Layer04135Ehfa_LayerentFile!A{262144:Cdata,}RasterDMS,.D RdDependentLayerNameEimg_DependentLayerName!AdR Band_2467904135Eimg_LayerentFile!AL*.S%^ r Ehfa_Layer04135Ehfa_LayerentFile!Az {262144:Cdata,}RasterDMS,.2d  Descriptor_TableedValueEdsc_TableametersValue@0A #Bin_Function#eedValueEdsc_BinFunctionsValue@0A(@n@  Histogramion#eedValueEdsc_ColumntionsValue@0A dSHistogramParametersalueEimg_StatisticsParameters830@0A(@n@2d0StatisticsrametersalueEsta_Statisticsarameters830@0A(@n@2B+]@^@_@h-V8@d5SStatisticsParameterslueEimg_StatisticsParameters830@0A(@n@n4^ ( Descriptor_TableedValueEdsc_TableametersValue@0A#Bin_Function#eedValueEdsc_BinFunctionsValue@0A(@o@&Histogramion#eedValueEdsc_ColumntionsValue@0A .^ SHistogramParametersalueEimg_StatisticsParameters830@0A(@o@4^ 0StatisticsrametersalueEsta_Statisticsarameters830@0A(@o@8wڃ\@\@@\@AhC$9@^ 7SStatisticsParameterslueEimg_StatisticsParameters830@0A(@o@^@n@6,*,{1:bcovariance,}Esta_Covariance,.'Transverse Mercator (South Orientated)$!Ỷ@HgpEA7$!Y|.@HgSeEAO??gmeters9 ^ ProjectiontializedValueEprj_ProParametersValue+AG'Transverse Mercator (South Orientated)7?[n u?Clarke 1880 ArcGITXAcٽ?XA 9{?JtMXAn YDatumtiontializedValueEprj_DatumametersValue+A|=Map_InfonitializedValueEprj_MapInfoalizedValue+A'Transverse Mercator (South Orientated)$!Ỷ@HgpEA$!Y|.@HgSeEA??6meters75ProjectiontializedValueEprj_ProParametersValue+AG'Transverse Mercator (South Orientated)?[n u?NVClarke 1880 ArcGITXAcٽ?XA 9{?JtMXA=YDatumtiontializedValueEprj_DatumametersValue+ACape-1a[@r_@??@ @$@=@F@U@^@c@0q@w@x@@@@@x@l@@0@@U@ @@7@1@@@a@@F@@`@@@@P@@@@d@@@p@@AXA8bA`EA A A0kA(|AXAlXAxA3A8A5AA7AA1A[ A!A!A,"AL4#A.#AJ$AlR%A&A֯&Ah'A+(A(AԤ)Ag*AG+A$,A-Ab.Av.A./A0A 1A1A~02A2Aya3A2 4A4AG5A5A6A57Aw7A8AR9Aؾ9A[:A:A6;A1.Au>A?Aq?A?A@At!@A3@AH@A;F@AO@A(D@A@@A#@A{ @A?Al?AG ?A>Ah=A;Y=ARAN>Az>Aݦ>A7>A>A%>A >AT>A^>A.>Ai=A=AhY=A-)Av'A\&A$Ap#A!A&o AA(WAAAPApAؿA@- AAAAL@P@p@@ @`@@:@@@W@@@@@@@$@@@@@ֽ@@@Ӵ@}@@@@x@T@@@@@؂@z@0v@n@`h@@d@X@@T@D@D@1@"@*@@@@@@?@??@??@??=>*6Descriptor_TableedValueEdsc_TableametersValue@0AB>5#Bin_Function#eedValueEdsc_BinFunctionsValue@0A@@@@@@(@.@9@B@J@S@``@g@t@w@(@@(@$@@Σ@Ψ@H@U@@@x@@@ @h@@@B@ @ &@v@@@`@R@@@ @@A(AHjAHAX A AxqA AHAADA[A0A8AAFg AM!A>"A!#A$Ap %A%A&A'A@(A*A:+A,A-A9/A\0A.1A 2A2A3AR5A-6Aa7A8A9A*;AvrAf?Au@A@AQ6AA#zAA֟AAAA7AAqAAhAAY1AA@A@AV@A?AP?A)>A|=Az[=Awb(Ab&A$A#A[!AHBAtGAASAеA(1A( A A$AhAP@@=@@@\@@@@ @@@@@,@@@@ @d@ @@V@;@@@ڬ@@@Ġ@\@@@@@h@@z@0v@p@`l@c@ c@\@O@O@C@<@0@$@@@@ @?????????????????*65Histogramion#eedValueEdsc_ColumntionsValue@0A5?B?SHistogramParametersalueEimg_StatisticsParameters830@0A@n@>E@@0StatisticsrametersalueEsta_Statisticsarameters830@0A@n@~lY@Y@X@-7@?@SStatisticsParameterslueEimg_StatisticsParameters830@0A@n@ dAzRRDInfoList4135Eimg_RRDInfoListe0A AErdasBino3AA22281.rrd(:Band_1:_ss_2_)A22281.rrd(:Band_1:_ss_4_)A22281.rrd(:Band_1:_ss_8_)!B22281.rrd(:Band_1:_ss_16_)DB22281.rrd(:Band_1:_ss_32_)gB22281.rrd(:Band_1:_ss_64_)B22281.rrd(:Band_1:_ss_128_)B22281.rrd(:Band_1:_ss_256_)B&C IRtT]*.!D dC2RRDNamesList135Eimg_RRDNamesList0A CErdasBino3CC22281.rrd(:Band_1:_ss_2_)C22281.rrd(:Band_1:_ss_4_)C22281.rrd(:Band_1:_ss_8_)D22281.rrd(:Band_1:_ss_16_)>D22281.rrd(:Band_1:_ss_32_)aD22281.rrd(:Band_1:_ss_64_)D22281.rrd(:Band_1:_ss_128_)D22281.rrd(:Band_1:_ss_256_)F ^ DEzRRDInfoList4135Eimg_RRDInfoListe0A LEErdasBino3_EgE22281.rrd(:Band_2:_ss_2_)E22281.rrd(:Band_2:_ss_4_)E22281.rrd(:Band_2:_ss_8_)E22281.rrd(:Band_2:_ss_16_)E22281.rrd(:Band_2:_ss_32_)F22281.rrd(:Band_2:_ss_64_)6F22281.rrd(:Band_2:_ss_128_)ZF22281.rrd(:Band_2:_ss_256_)~F&C IRtT]*.S% ^ >G2RRDNamesList135Eimg_RRDNamesList0A FGErdasBino3YGaG22281.rrd(:Band_2:_ss_2_)G22281.rrd(:Band_2:_ss_4_)G22281.rrd(:Band_2:_ss_8_)G22281.rrd(:Band_2:_ss_16_)G22281.rrd(:Band_2:_ss_32_) H22281.rrd(:Band_2:_ss_64_)0H22281.rrd(:Band_2:_ss_128_)TH22281.rrd(:Band_2:_ss_256_)jJ HzRRDInfoList4135Eimg_RRDInfoListe0A HErdasBino3 II22281.rrd(:Band_3:_ss_2_)5I22281.rrd(:Band_3:_ss_4_)WI22281.rrd(:Band_3:_ss_8_)yI22281.rrd(:Band_3:_ss_16_)I22281.rrd(:Band_3:_ss_32_)I22281.rrd(:Band_3:_ss_64_)I22281.rrd(:Band_3:_ss_128_)J22281.rrd(:Band_3:_ss_256_)*J&C IRtT]*.( J2RRDNamesList135Eimg_RRDNamesList0A JErdasBino3K K22281.rrd(:Band_3:_ss_2_)/K22281.rrd(:Band_3:_ss_4_)QK22281.rrd(:Band_3:_ss_8_)sK22281.rrd(:Band_3:_ss_16_)K22281.rrd(:Band_3:_ss_32_)K22281.rrd(:Band_3:_ss_64_)K22281.rrd(:Band_3:_ss_128_)L22281.rrd(:Band_3:_ss_256_){1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:oEmif_String,algorithm,0:poEmif_String,nameList,0:pLdimList,}Eimg_RRDInfoList,.gdalautotest-3.1.2/gcore/data/cfloat64.vrt0000664000175000017500000000253713701057751017077 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray cfloat64.tif 1 gdalautotest-3.1.2/gcore/data/stats_signed_byte.img0000664000175000017500000002070513701057751021125 0ustar evenevenEHFA_HEADER_TAG- &{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.1!Z4RasterDMSEdms_Statep1! Ehfa_LayerEhfa_Layer {4096:Cdata,}RasterDMS,. rootroot1!- -!IMGFormatInfoImgFormatInfo831 - !Layer_1Eimg_Layer@@gdalautotest-3.1.2/gcore/data/ycbcr_41_lzw.tif0000664000175000017500000000451213701057751017721 0ustar evenevenII*B @@x\*Bǃh+4^; PT %tFs)g5Lel.V9K"m.PȂ2C)X; f2d^0@*U-aBZ*.~5ҹi4(F314vۅ;oNIxs=cT`3ζ#^Q3vn@|;Ec`2ɬV9KfkYYL@K)~3OW;wFe/Ά2ѓϧܭb9'bx-Cx'< C;ԴMrcCs3 ` H1c3/# (C> ,Cb #2 C.6L,\)( 0 =`*.Œ0p<. c!J2$A;1$/) H4Cx;zF $ RB2P|^8.b,#<8P( B%0r`bh.SdP4b+ $ U1 y.Cx5ȴ+@j4:uD ˆ 3CФ+à;`56"4'7>04 u /-2 9dI*#2M3 cR /euX X<2;#p2 > >(/cǣ902VT=Mc*CB12y$?JC(lC*ZI #= Câ8 $c=Y w)A#+B)GD *P= 1c@-878#: D3% B8`?"*X4d D@ !LQ,%\,ØR96[}A\+ P[9Ĵ "p HwѡH-Ӎ(zpr!q V@1,.PDP{ UE]a70x !*@1E 3!vLa6@K  a)b4fn0Cxa A8ya@.@CؐP( b:u#e)!0:za47"˜r !0X}(H,A a2@DJ @<$€q@DĘA'@,#1C- )< p`BbH@1ȇ<8 8$DT AxF\WA0E{"89 Mu NQ#c dJv 28t!FC}A!\<Á a, AC`H C }и+sDUjB0CY&b P7o4BP- ;ϢA?R`1%*Ja~58&PB 5($蓐 Ĉ 0:;,;  #Ґ~Lj_!pN P@ CP }A0KLpk;PBaR/A( !2@!"(C G:R D 0{ ψ/7WxPvUP&|-4YB8%¸,g)@a$`@s!Q 0D" S %x8݃w0B0`C"UPCz:$<3"$`pJݍ=C|6JHcu_6"p;m5 sB>a\IYt>a"ŨZ'Za<88#KJ$D;`` AXxc0J7*: 5\C8جU X 1kȂ YdRC$p@@'':2  CLE/gdalautotest-3.1.2/gcore/data/gtiff_towgs84_override.tif0000664000175000017500000000150713701057751022015 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  ^$ !&JA`I|UA??# z )#fffffF@P@y@zG?9v?/$Gz$@DHDN / Gauss-Kruger zone 3|DHDN|gdalautotest-3.1.2/gcore/data/byte_ovr_jpeg_tablesmode0.tif0000664000175000017500000000264613701057751022542 0ustar evenevenII*f@S   JfN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|   BCDE^SC    $.' ",#(7),01444'9=82<.342 *S5t!1A2q?ėlYK-1w敧JҟN}K)O_ٶ~דs{nac^M?ykɹ=y70籯&5Ƽ~דs{nac^M?ykɹ=y700_O:p]OicZֿBJRRRT֗r_SZ]kKUMiw/ꩭ.U5ܿT֗r_SZ]kKUMiw/:Z[\CA |byh Ggdalautotest-3.1.2/gcore/data/md_ge_rgb_0010000_rpc.txt0000664000175000017500000000727213701057751021113 0ustar evenevenLINE_OFF: +003754.00 pixels SAMP_OFF: +002322.00 pixels LAT_OFF: +48.87720000 degrees LONG_OFF: +002.29450000 degrees HEIGHT_OFF: +0086.000 meters LINE_SCALE: +003754.00 pixels SAMP_SCALE: +002323.00 pixels LAT_SCALE: +00.03410000 degrees LONG_SCALE: +000.03220000 degrees HEIGHT_SCALE: +0194.000 meters LINE_NUM_COEFF_1: +1.332808717180063E-03 LINE_NUM_COEFF_2: +5.838338162123306E-03 LINE_NUM_COEFF_3: -1.009752051699543E+00 LINE_NUM_COEFF_4: +1.639109825624001E-02 LINE_NUM_COEFF_5: -3.367124587841246E-03 LINE_NUM_COEFF_6: +3.418139814295659E-05 LINE_NUM_COEFF_7: +2.725217573364683E-03 LINE_NUM_COEFF_8: -1.136478536138676E-04 LINE_NUM_COEFF_9: -1.430144921673965E-03 LINE_NUM_COEFF_10: -4.442510706499226E-05 LINE_NUM_COEFF_11: -3.740719192328738E-06 LINE_NUM_COEFF_12: -4.428194095535854E-07 LINE_NUM_COEFF_13: +7.849067991883587E-07 LINE_NUM_COEFF_14: +6.476944648851546E-08 LINE_NUM_COEFF_15: -4.190764824024006E-07 LINE_NUM_COEFF_16: +2.604509233052465E-07 LINE_NUM_COEFF_17: +2.007288008283678E-06 LINE_NUM_COEFF_18: +6.807783035194681E-07 LINE_NUM_COEFF_19: -7.324069126732976E-06 LINE_NUM_COEFF_20: -2.911374890048000E-08 LINE_DEN_COEFF_1: +1.000000000000000E+00 LINE_DEN_COEFF_2: +3.341837949953734E-03 LINE_DEN_COEFF_3: +1.413402151478922E-03 LINE_DEN_COEFF_4: -3.353868240228878E-03 LINE_DEN_COEFF_5: -7.939341430848480E-07 LINE_DEN_COEFF_6: +1.464661833433624E-06 LINE_DEN_COEFF_7: +5.420601966045226E-06 LINE_DEN_COEFF_8: +2.418517479122306E-07 LINE_DEN_COEFF_9: -2.618804378743522E-07 LINE_DEN_COEFF_10: -1.850052696212862E-08 LINE_DEN_COEFF_11: +2.901758478182862E-09 LINE_DEN_COEFF_12: +1.157680773655344E-10 LINE_DEN_COEFF_13: +2.757379458383255E-11 LINE_DEN_COEFF_14: -1.778307031557182E-09 LINE_DEN_COEFF_15: +1.779638859280152E-10 LINE_DEN_COEFF_16: +2.892540510908146E-11 LINE_DEN_COEFF_17: -3.343682187106984E-09 LINE_DEN_COEFF_18: +2.503226828621465E-10 LINE_DEN_COEFF_19: +1.847198034982663E-09 LINE_DEN_COEFF_20: +7.216457909015041E-10 SAMP_NUM_COEFF_1: -3.557872238818793E-04 SAMP_NUM_COEFF_2: +1.016335494334002E+00 SAMP_NUM_COEFF_3: +1.513605650641709E-02 SAMP_NUM_COEFF_4: +4.807724237164880E-03 SAMP_NUM_COEFF_5: +7.961689402077173E-04 SAMP_NUM_COEFF_6: -3.071423942177348E-03 SAMP_NUM_COEFF_7: +1.276322859089735E-04 SAMP_NUM_COEFF_8: +3.396901539018378E-03 SAMP_NUM_COEFF_9: +2.537122290529346E-05 SAMP_NUM_COEFF_10: -1.745893731269933E-05 SAMP_NUM_COEFF_11: +8.549458117912697E-06 SAMP_NUM_COEFF_12: +2.396282052729133E-07 SAMP_NUM_COEFF_13: -1.422798782176754E-06 SAMP_NUM_COEFF_14: -9.988283137037749E-07 SAMP_NUM_COEFF_15: -3.107467131977126E-06 SAMP_NUM_COEFF_16: +7.970237235722655E-10 SAMP_NUM_COEFF_17: -4.086946530323194E-07 SAMP_NUM_COEFF_18: +2.451278005502479E-06 SAMP_NUM_COEFF_19: +9.020228618443205E-07 SAMP_NUM_COEFF_20: +1.710486731803557E-09 SAMP_DEN_COEFF_1: +1.000000000000000E+00 SAMP_DEN_COEFF_2: +3.341837949953734E-03 SAMP_DEN_COEFF_3: +1.413402151478922E-03 SAMP_DEN_COEFF_4: -3.353868240228878E-03 SAMP_DEN_COEFF_5: -7.939341430848480E-07 SAMP_DEN_COEFF_6: +1.464661833433624E-06 SAMP_DEN_COEFF_7: +5.420601966045226E-06 SAMP_DEN_COEFF_8: +2.418517479122306E-07 SAMP_DEN_COEFF_9: -2.618804378743522E-07 SAMP_DEN_COEFF_10: -1.850052696212862E-08 SAMP_DEN_COEFF_11: +2.901758478182862E-09 SAMP_DEN_COEFF_12: +1.157680773655344E-10 SAMP_DEN_COEFF_13: +2.757379458383255E-11 SAMP_DEN_COEFF_14: -1.778307031557182E-09 SAMP_DEN_COEFF_15: +1.779638859280152E-10 SAMP_DEN_COEFF_16: +2.892540510908146E-11 SAMP_DEN_COEFF_17: -3.343682187106984E-09 SAMP_DEN_COEFF_18: +2.503226828621465E-10 SAMP_DEN_COEFF_19: +1.847198034982663E-09 SAMP_DEN_COEFF_20: +7.216457909015041E-10 ERR_BIAS: 0004.98 meters ERR_RAND: 0000.50 meters gdalautotest-3.1.2/gcore/data/classictiff_four_strip_be_short.tif0000664000175000017500000000026613701057751024054 0ustar evenevenMM* Sgdalautotest-3.1.2/gcore/data/int16_3.hdf0000664000175000017500000001103213701057751016554 0ustar eveneven j\    < &! G K< !  < !j    + ;Q 7 ; I GF<<NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0j j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0  int16_3.tifCDF0.0gdalautotest-3.1.2/gcore/data/byte_nearest_50pct.vrt0000664000175000017500000000302613701057751021146 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray byte.tif 1 gdalautotest-3.1.2/gcore/data/cp866_plus_utf8.zip0000664000175000017500000000054213701057751020315 0ustar evenevenPK [U7DupVабвгдеPK [U7DupiжзийклPK [U7D9upVабвгде W0=㭽p[wPK [U7D99upiжзийкл W0=㭽p[wPKrgdalautotest-3.1.2/gcore/data/byte_bigtiff_strip5lines.tif0000664000175000017500000000170013701057751022411 0ustar evenevenII+lLS   dddd0\N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/classictiff_one_block_byte.tif0000664000175000017500000000063613701057751022752 0ustar evenevenII* BCDESsgdalautotest-3.1.2/gcore/data/byte_ovr_jpeg_tablesmode2.tif0000664000175000017500000000402713701057751022537 0ustar evenevenII*S[   2N }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|  BCDE;S[ }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzC    $.' ",#(7),01444'9=82<.342 ?IY"# sץHQ,7x?w'ʏ>Oo|?*Oo|?*ޚ̬0ZfăI#'ӠzgV_\ Fc21<1ֹ*Շa6Is\9n~Q gdalautotest-3.1.2/gcore/data/ycbcr_21_lzw.tif0000664000175000017500000000557613701057751017732 0ustar evenevenII*v  0xT" C ,x5L[/r@]< sQ7CPkb2PsQha1ΆXl.)jnpCl2O#!\d2N `d1݌d"Լ`, κ@0 (K:Frp+ҹi,M&¹fe0&3IdkX|Mzg@1i̜駣AЬw*5*5NAűms}p8Xw7ys,v0)[^`Kx0:+봝6T?=8; 1 x7A֧ C2P-0##;LT ?;Q.-x,|;cAè2#HCʄ`;OH3:C` - kĶ8"B/DJd c[ +Ќ=J; # ]#bbjP3?:;uUm&=nM<91"º=2CPcQ% tT(rb70部J> ~_k`T&rЕ!T>pc 0x ?k a0PT ١AEHAu3CQ %ffI  bA}&PO_c1pY /I!( x !DTV"@T[a5 s 9ZQ 3 k.T[TI%Bp*ut?`d @42'pq<@CL7'p o,0A@ P= <$A*0h(\ &7"ڨt,H7C93VO( at-"e<%LJR F2P`t Ah:QU CfgAl: blX4$sX;1 Aia4S5(мxn" (FiرAX NWTY_K[q `DPP'^CЃ EW )ĩa7* @a؆8; 4Zmx%BBi@qL&!pÈ!$61,L;R_D ~X{' fxdal\Q'y $0H1& '`r"('a ¨tF bAARGhtl&A] N+A]$8+cTG ó 8[&A >;e0{0(ę$H?C` e%T0r A [8!> kWA6¡S9e0t,P"΁CcR /P@ A'#Bhq`Z)| ((>RbH^/' !^١< \PzPA&|a$D(S:!v%*# 6qX$51 3pAp('f( .#^Ðv f73` l:AD2@Ȇߢ(@́!Hn\:p`+"8nNZAAJ x&|{a>e8\TA B$0 qB8P!2V!@ 3CU!9 SCOJBs`8SS 8pu%U9208@$p`J +!@ @ *`kc @ N/zn8O~Ĭ`͌WPJ6pnK^' @ A 2 !  ` %OJ ע^ a\ 8aj a^ ` a8 Ia )  Rm`F¸ @axlbA a@  @ < @ ̯ N !Ρ Mj R<@ ''0 fn f 6 CLE/gdalautotest-3.1.2/gcore/data/utmsmall.tif0000664000175000017500000002417013701057751017257 0ustar evenevenII*'k{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sŜŌֵέ֭sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{Ŕεs{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{Žέ֭Δŵ{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{kέńBΥννΜsss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{k{ccť攽s{ksc{skscZk{cs{Zcccc{kskk{kssk{ZsΔŽޜZkŭ{ŭc{sc{{ssckk{ckkcsccZcsZss{{{sνﵔťsޥ{s{{kssksc{cck{kcccsZ{sksskss{sc{{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{Rcֵ֌ccs{kksks{{k{kskscskkssks{Zֽ楄{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{ksέέ{֔極{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{ť{kέ޽{ޥΥc{{k{ckksskckZ{ksss{ss{ksssε{Δ楥ޥŜŭk{ccsccs{c{ssc{kkcs{s{{skk{֜Žֵ޽ŽŭޥεkkZkskZc{sss{{sc{kckk{{ssŵ{{νΜֽεΔŽŵ֥ťޭŜ{kkkscscckssZ{s{{k{{{Zk{kkńŵsc{ŽŭŌksZcsZcckccksZs{skskssֵŭΜεΌŔ޽ŭ֜{cs{Jsc{ckkskksŽ{εŵν֭Μks΄k{{k{k{RccZŭŜΥε浌ŭ{{ޭΔ{Ό޵skkkkksckZsccέޭ޵ֵ֥s{Ŝ{ޭΜ{sZcsZkccZckcc{ε朔ŭŽŵŭŵŵk{{{kcRkkkcckŭŭ֥ޭ֔Ŝ{ޜZckcRss޽έބε業{Z{k{ŽŭŌŵŜŭc{{kޔŽť{{sR{֜{s{{{sֵޥֽs{{{{Zc楜{έ{ŽΔΜc{εk΄省ΜΥsks{{Ō攜֔ŔskޜŔs{εޭńŽ֭ﭥ{֔{{ťs{{Ό޽֭歵Z{ŵŵŌťŽŌ{{sֵŔ޽ssŌsνť挥ť޵޽֔楥{ν{ŵε潔޽朔Υ{ֽŭ֌攔ք{Rkŵޔsks{ZŽ楔ޭs歔掠ť{k{kscsc{ť֜c{kޜs{J{c{Rcs{kΥέŔťŵνΜsk{sskk{skscRcJk{sέ{Ŝ֌޽έޭޥ{k{{Rk{kZ{RťŭνŵΜŌks{sskck{ֵŜsZŭ֔εŵεJkkss{{s{c{ŌޥŜsk歜֜{޽s֭{{{{Ŝ{s{k{{ckkŜ浌c潥ޔޥs{{s֔s{s{c{ks{s{s{εέֵ{{ssss{{kskkュ{ssތŌkckckcsksks{{ss{{Ό{sŽ歵{΄֜ބksckkk{{{{sks{{ťck{޵޽{έބkksssssc{kc{ccsބŌcsޥŭs{sR{c{sZks{ss{kcs{kZ{ޔޔkޥ{ŔֽŔŵ{{kkskskZ{sZksssZRk{kc{{ńs{k潌֭s֭kޜ歭csZsc{{ckcs{c{skRk{RZsťŭ{ssŽνΜ֭潽޽ŌksRssssk{{sksc{{kRBνŽ{{ťŭ޵ŔνޥΥ֭JkJ{kRZksRkkss֭kcŜksέΥ޽֜Zk:ccRs{kskkscΥŌc{s{Ž޽֜ޔք{νBBk)ZJcZsc{ksck{k{{{{ccﵭss{{ŭέޜ{ť歵s{RJsJkc)kkJcR{cksssckZcRRksk{{{ΌŔޥΔ޵քkZ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Rs!1JBc:)J:ZkZRR:R!BJZR{Zs{{攜{sJJJR{cJBRBZRkZkRJBZBBBBcsBcZs:!J:Z!1J)R!B)::ZcR1BcsZ:1Z:kskJΌJssJsccsRckJJRJJcJ{sskkkc)JBZskRRJ1!Zc{!)::Z)R)1:BsckssZZ1:BBJJR!B֌JBcRs{cJBZsZ:ssJRJZ{kZ{Zk{{{ZRR1Bs1BJR11BR{{s{)ZcZR))!B)sŔZc):s{ZJkkRsBJ1ccBkZZB1ssskZkR{:RRZks{ZkccBs:)!:kcsތRRkZ:))!!):JRkB11{{1cskRRRZ!cRsZ:k1{J:1ksJZ{k{JZ{:skccRZZk)JRk1ccBckssZ!11cJ)JJB)RRs{R:){k1:JJ):)kR{sJJZkBkBJBZ:R1:ZcccsJRRskk:{sscRZ{dd'Q'S ( '*(b(l@A̞LAN@N@ Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/left_vrt_subpixel_offset.tif0000664000175000017500000000105613701057751022525 0ustar evenevenII* fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{ssk{ssks{sks{{s{s{sss{s{kŭc{s{s{{ks{ss{s{ccs{kk{c{kc{{{k{{ssZc{{k{ckk{ccsckZkskZc{{kkkscsZcs{cs{J΄k{gdalautotest-3.1.2/gcore/data/md_rdk1.xml0000664000175000017500000000141713701057755016763 0ustar eveneven Version = "0.0.1" nNumberKA = 40 cCodeKA = "RDK1" cCodePPI = "NTSOMZ" cStation = "NA VRL" dDateHeaderFile = 1/1/2015 cOrganization = "NTSOMZ-NKPOI" cProgramm = "PK KFI" cFormatNamePasport = "MSP" nImageType = 0 cDeviceName = "GEOTON" nStringLength = 36000 nBitsPerPixel = 10 nFokalLength = 4005.408 aNWLat = 54:50:11.360508 aNWLong = 35:24:50.248891 aNELat = 54:51:13.449236 aNELong = 35:27:29.080959 aSELat = 54:49:44.072484 aSELong = 35:29:12.837671 aSWLat = 54:48:42.028900 aSWLong = 35:26:34.056061 aMidLat = 54:49:57.743237 aMidLong = 35:27:1.522895 nBitsPerPixel = 10 nNChannel = 1 nWidth = 4000 nHeight = 4000 dSceneDate = 1/8/2014 tSceneTime = 19:00:00.0000000 gdalautotest-3.1.2/gcore/data/float32_minwhite.tif0000664000175000017500000000050613701057751020574 0ustar evenevenII* ;? S  >oM$I?oM$I?@I@#WGS 84|gdalautotest-3.1.2/gcore/data/hugeblocksize.tif0000664000175000017500000000023613701057751020254 0ustar evenevenII* BCDESgdalautotest-3.1.2/gcore/data/General_RImages.hdf0000664000175000017500000000227213701057751020363 0ustar eveneven\9.5j,'#J0 <J I(!II HDF Version 4.2 Release 10, February 7, 2014      j,. Image Array 1RI0.0RIG0.0RIG0.0,.,. Image Array 1RI0.0Contents of IMAGE's First Attribute#Image Attribute 1 RIATTR0.0N RIATTR0.0C,.,. Image Array 1RI0.0Image Attribute 2 RIATTR0.0N RIATTR0.0C,.,. Image Array 1RI0.0Contents of First FILE Attribute File Attribute 1 RIATTR0.0N RIATTR0.0CContents of Second FILE Attribute!File Attribute 2 RIATTR0.0N RIATTR0.0CRIG0.0RIG0.0gdalautotest-3.1.2/gcore/data/bigtiff_two_strip_be_long.tif0000664000175000017500000000043613701057751022631 0ustar evenevenMM+ Sstgdalautotest-3.1.2/gcore/data/spaf27_epsg.tif0000664000175000017500000000134413701057751017537 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  R˶8AY[#APō[Lph@nQfLh@# zh +#SPAF 406 E000|gdalautotest-3.1.2/gcore/data/test_deflate_4GB.tif.zip0000664000175000017500000002723613701057751021327 0ustar evenevenPK ON1$-utest_deflate_4GB.tifUT f\f\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-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1"-"1_wfwo/meW?yxe٧{p z *VPK ON1$-utest_deflate_4GB.tifUTf\ux PKZ..gdalautotest-3.1.2/gcore/data/md_ov.pvl0000664000175000017500000001010713701057751016537 0ustar evenevencopyright = "(C) COPYRIGHT Some corp"; companyName = "Some corp"; BEGIN_GROUP = productInfo; distributionMediaType = "Removable Storage"; productCloudCoverPercentage = 999; bytesPerPixel = 2; bitsPerPixel = 11; spacingUnits = "meters"; numScanLines = 27482; pixelsPerScanLine = 8016; lineSpacing = 1.1371980000e+00; pixelSpacing = 1.1076250000e+00; BEGIN_GROUP = geodeticCorners; BEGIN_GROUP = upperLeftCorner; latitude = 52.2791997000; longitude = 35.4363643000; height = 193.6229706000; END_GROUP = upperLeftCorner; BEGIN_GROUP = upperRightCorner; latitude = 52.2804926000; longitude = 35.5612666000; height = 233.9022567000; END_GROUP = upperRightCorner; BEGIN_GROUP = lowerRightCorner; latitude = 51.9848272000; longitude = 35.5634170000; height = 266.1853238000; END_GROUP = lowerRightCorner; BEGIN_GROUP = lowerLeftCorner; latitude = 51.9811444000; longitude = 35.4341051000; height = 255.8598057000; END_GROUP = lowerLeftCorner; END_GROUP = geodeticCorners; BEGIN_GROUP = rationalFunctions; errorBias = 0.7895830000; errorRand = 1.7287800000; lineFitQuality = 0.0057215900; pixelFitQuality = 0.0158227000; lineOffset = 13741; pixelOffset = 4008; latitudeOffset = 52.1348000000; longitudeOffset = 35.4988000000; heightOffset = 187; lineScale = 13741; pixelScale = 4008; latitudeScale = 0.1547000000; longitudeScale = 0.0652000000; heightScale = 300; lineNumeratorCoefficients = ( 1.2139522000e-02, 8.6390366000e-03, -1.0458370000e+00, -8.2485745000e-03, -3.2943662000e-03, -3.3170669000e-05, 3.7925112000e-04, -5.0983401000e-05, -3.6218128000e-02, 5.6195798000e-06, -5.3882431000e-05, -1.3020458000e-06, -1.1081245000e-03, -3.5808830000e-07, 1.2169698000e-04, -5.6299113000e-03, -4.3150790000e-07, 1.3301807000e-06, -1.2818923000e-04, 7.7889933000e-10 ); lineDenominatorCoefficients = ( 9.9995149000e-01, -9.6804321000e-05, -2.8251791000e-04, 2.9551446000e-06, 1.0020444000e-03, 4.8453322000e-05, 2.2753464000e-04, -1.3037612000e-04, 6.8270975000e-03, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00 ); pixelNumeratorCoefficients = ( 1.6220009000e-05, 1.0258227000e+00, -6.6448174000e-05, 5.3314395000e-03, 1.8613264000e-02, 9.8160833000e-04, -1.5204838000e-03, -9.5200268000e-04, -2.4161835000e-04, -7.8873504000e-06, -1.4208021000e-04, -5.9193119000e-05, 1.1618314000e-02, 3.8508625000e-07, 1.0335565000e-04, 2.6322693000e-05, -1.7564084000e-06, -2.0334168000e-05, -2.3851960000e-05, 1.0874163000e-09 ); pixelDenominatorCoefficients = ( 9.9987815000e-01, 1.4307523000e-05, -1.2830986000e-04, 8.0826420000e-05, -2.0080269000e-04, -2.0646704000e-05, -1.3486920000e-04, -5.3956955000e-05, 1.1118010000e-02, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00 ); END_GROUP = rationalFunctions; END_GROUP = productInfo; BEGIN_GROUP = sensorInfo; satelliteName = "OV-3"; sensorName = "PAN"; END_GROUP = sensorInfo; BEGIN_GROUP = inputImageInfo; firstLineAcquisitionDateTime = 2013-07-01T15:00:00.000000Z; circularError = 3.3038700000; acquisitionOrbitNumber = 0000; idsNumberScanLines = 27482; idsPixelsPerScanLine = 8016; idsLineSpacing = 1.1371980000e+00; idsPixelSpacing = 1.1076250000e+00; END_GROUP = inputImageInfo; END; gdalautotest-3.1.2/gcore/data/tar_with_star_base256_fields.tar0000664000175000017500000000100013701057751023037 0ustar evenevencb_2014_us_state_20m/0000755c0000000000013306531125014675 5ustar simon.evesmapdgdalautotest-3.1.2/gcore/data/nan32_nodata_warp_zero_to_nan.vrt0000664000175000017500000000443013701057751023344 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32631"]] 4.0000000000000000e+05, 1.0000000000000000e+00, 0.0000000000000000e+00, 5.0000000000000000e+06, 0.0000000000000000e+00, -1.0000000000000000e+00 nan 512 128 6.71089e+07 NearestNeighbour Float32 nan32_nodata_warp_nan_to_zero.vrt 0.125 400000,1,0,5000000,0,-1 -400000,1,0,5000000,0,-1 400000,1,0,5000000,0,-1 -400000,1,0,5000000,0,-1 0 0 nan 0 gdalautotest-3.1.2/gcore/data/md_kompsat.rpc0000664000175000017500000000724613701057751017566 0ustar evenevenLINE_OFF: 1937.50 pixels SAMP_OFF: 1874.88 pixels LAT_OFF: 51.56772106 degrees LONG_OFF: 45.98734433 degrees HEIGHT_OFF: 168.68 meters LINE_SCALE: 1937.50 pixels SAMP_SCALE: 1874.88 pixels LAT_SCALE: 0.08641944 degrees LONG_SCALE: 0.13839466 degrees HEIGHT_SCALE: 168.68 meters LINE_NUM_COEFF_1: 2.094646315995084e-004 LINE_NUM_COEFF_2: 2.824750131694535e-001 LINE_NUM_COEFF_3: -1.173219179951515e+000 LINE_NUM_COEFF_4: -1.643871889503145e-004 LINE_NUM_COEFF_5: -4.459904216443517e-004 LINE_NUM_COEFF_6: 6.084761032075198e-008 LINE_NUM_COEFF_7: -2.398876894257297e-007 LINE_NUM_COEFF_8: -1.111217596494691e-003 LINE_NUM_COEFF_9: -1.389855422616564e-004 LINE_NUM_COEFF_10: 7.083566157854145e-009 LINE_NUM_COEFF_11: -1.224882520719930e-007 LINE_NUM_COEFF_12: -3.918301133164352e-006 LINE_NUM_COEFF_13: 3.274768487322774e-005 LINE_NUM_COEFF_14: -7.331057466697384e-006 LINE_NUM_COEFF_15: 1.161541733564753e-005 LINE_NUM_COEFF_16: -4.014454129634238e-005 LINE_NUM_COEFF_17: 3.044857993209063e-005 LINE_NUM_COEFF_18: 3.642567889539727e-008 LINE_NUM_COEFF_19: -8.384567439686723e-008 LINE_NUM_COEFF_20: 4.261707718456547e-009 LINE_DEN_COEFF_1: 1.000000000000000e+000 LINE_DEN_COEFF_2: -2.695655775221908e-004 LINE_DEN_COEFF_3: 2.091828849434532e-004 LINE_DEN_COEFF_4: -2.117966663508839e-007 LINE_DEN_COEFF_5: 2.934493924413960e-005 LINE_DEN_COEFF_6: 1.301639536718661e-007 LINE_DEN_COEFF_7: 3.699123948529798e-008 LINE_DEN_COEFF_8: -2.026947931442176e-005 LINE_DEN_COEFF_9: -6.731673266376843e-005 LINE_DEN_COEFF_10: -2.595461316405050e-005 LINE_DEN_COEFF_11: 2.012281265939131e-008 LINE_DEN_COEFF_12: 2.850608580024337e-006 LINE_DEN_COEFF_13: 1.389397053353597e-004 LINE_DEN_COEFF_14: 4.966772935405603e-009 LINE_DEN_COEFF_15: -3.427916927895478e-005 LINE_DEN_COEFF_16: -1.889868626674809e-004 LINE_DEN_COEFF_17: -2.078004480709344e-009 LINE_DEN_COEFF_18: -2.409823243159362e-009 LINE_DEN_COEFF_19: -4.030159880309564e-008 LINE_DEN_COEFF_20: 1.299018273224906e-011 SAMP_NUM_COEFF_1: 1.801323933224189e-003 SAMP_NUM_COEFF_2: 1.178863201055586e+000 SAMP_NUM_COEFF_3: 2.830684570865402e-001 SAMP_NUM_COEFF_4: 5.728545672444025e-003 SAMP_NUM_COEFF_5: -1.887567467741118e-003 SAMP_NUM_COEFF_6: 1.111553934343384e-004 SAMP_NUM_COEFF_7: 3.476047763479550e-005 SAMP_NUM_COEFF_8: -2.477463380727685e-003 SAMP_NUM_COEFF_9: 1.980392503148189e-004 SAMP_NUM_COEFF_10: 2.873596383849840e-007 SAMP_NUM_COEFF_11: 3.014178263750575e-007 SAMP_NUM_COEFF_12: -6.808880542647113e-005 SAMP_NUM_COEFF_13: -1.494361868018614e-004 SAMP_NUM_COEFF_14: -9.823046889065704e-005 SAMP_NUM_COEFF_15: 4.116968005327678e-005 SAMP_NUM_COEFF_16: 1.272492737704768e-004 SAMP_NUM_COEFF_17: -2.359225384754636e-005 SAMP_NUM_COEFF_18: 3.176399624285134e-008 SAMP_NUM_COEFF_19: -1.346185899997949e-007 SAMP_NUM_COEFF_20: -4.773232480264892e-007 SAMP_DEN_COEFF_1: 1.000000000000000e+000 SAMP_DEN_COEFF_2: 1.307868521990991e-003 SAMP_DEN_COEFF_3: 1.755373119101831e-003 SAMP_DEN_COEFF_4: -1.512020807093616e-004 SAMP_DEN_COEFF_5: 2.252816677913234e-005 SAMP_DEN_COEFF_6: 1.193790650240214e-006 SAMP_DEN_COEFF_7: 1.627185983950029e-007 SAMP_DEN_COEFF_8: -5.222632442464887e-005 SAMP_DEN_COEFF_9: -4.320995242285467e-005 SAMP_DEN_COEFF_10: -8.335569426226505e-005 SAMP_DEN_COEFF_11: -4.845786735988417e-009 SAMP_DEN_COEFF_12: -2.241531445183524e-007 SAMP_DEN_COEFF_13: -2.168805560416187e-007 SAMP_DEN_COEFF_14: -2.874165583568054e-007 SAMP_DEN_COEFF_15: -5.478883857797828e-009 SAMP_DEN_COEFF_16: -4.586720636157518e-007 SAMP_DEN_COEFF_17: -2.181581217109535e-007 SAMP_DEN_COEFF_18: 1.634575697195243e-008 SAMP_DEN_COEFF_19: 1.333688380766964e-008 SAMP_DEN_COEFF_20: 2.148235549909915e-008 gdalautotest-3.1.2/gcore/data/8bit_pal.bmp0000664000175000017500000000270613701057751017120 0ustar evenevenBM6(  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~skkkkksck΄k{{k{k{{cs{Jsc{csZcsZcckcck{kkkscscckssZ{skZkskZc{sss{{sck{ccsccs{c{c{{k{ckksskck{{{k{{ssZkkkkkc{s{c{kcs{{k{{{kccs{kksks{{k{{ss{s{{csc{ssk{s{{kssksc{cckŭc{sc{{ss{ksc{sksss{{{kk{{{s{s{s{ksksss{sks{kssksksk{ssk{{c{ck{skkk{sgdalautotest-3.1.2/gcore/data/bigtiff_four_strip_be_short.tif0000664000175000017500000000050013701057751023163 0ustar evenevenMM+ <=>?S<=>?gdalautotest-3.1.2/gcore/data/byte_nogeoref.tfw0000664000175000017500000000002513701057751020257 0ustar eveneven1, 0, 0, -1, 100, 200gdalautotest-3.1.2/gcore/data/byte_lerc.tif0000664000175000017500000000135513701057751017371 0ustar evenevenII*GzsS   ^N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|Lerc2 2s?R@o@JJ 0000`Ppp  `0_w7G NN}Ƒne;tJJ` tqq$PŨD"#^{vRjlemڶ1]Lu(Zt%Y a n9 2$TPD]!tY Lܶgdalautotest-3.1.2/gcore/data/text.txt0000664000175000017500000000067613701057751016447 0ustar evenevenLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. gdalautotest-3.1.2/gcore/data/uint32.img0000664000175000017500000002574013701057751016543 0ustar evenevenEHFA_HEADER_TAG@RG rootrootXAAG R9RLayer_148752518Eimg_LayerXAAEhfa_Layer52518Ehfa_LayerXAA0 n0Statistics52518Esta_StatisticsrsXAAR@o@)\_@^@`@@X) 6@Z<StatisticsParametersEimg_StatisticsParameters830XAAxPP PP9Descriptor_TableersEdsc_TableticsParameters830XAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830XAAR@o@~P?@B@L@O@P@R@?@8@(@@(@@@?@??{400:Ldata,}RasterDMS,.R IMGFormatInfo18ImgFormatInfo831XAA@k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckf4RasterDMS52518Edms_StateXAA @XAACcMap_Info52518Eprj_MapInfoXAAKUTMWALAoALAN@N@meters&Projection52518Eprj_ProParametersXAA4<UTM L? Clarke 1866TXA333?XA^s{?fOMXA+Datumtion52518Eprj_DatumametersXAANAD27 nadcon.datZ+Histogramion#eersEdsc_Columntionrameters830XAAZZHistogramParametersEimg_StatisticsParameters830XAA/M/M /M/MR@o@/M} erType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/rat.img0000664000175000017500000021506213701057751016203 0ustar evenevenEHFA_HEADER_TAGH&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.G#IZ&8RasterDMSEdms_State@pǡס'7GWgwǢע'7GWgwǣף'7GWgwǤפ'7GWgwǥץ'7GWgwǦצ'7GWgwǧק'7GWgwǨר'7GWgwǩש'7GWgwǪת'7GWgwǫ׫'7GWgwǬ׬'7GWgwǭ׭'7GWgwǮ׮'7GWgwǯׯ'7GWgwǰװ'7GWgwDZױ'7GWgwDzײ'7GWgwdz׳'7GWgwǴ״'7GWgwǵ׵'7GWgwǶ׶'7GWgwǷ׷'7GWgwǸ׸'7GWgwǹ׹'7GWgwǺ׺'7GWgwǻ׻'7GWgwǼ׼'7GWgwǽ׽'7GWgwǾ׾'7GWgwǿ׿'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw'7GWgw.y )9IYiy )9I7G9 0@P`p 0@P_7c )9IYiy )9IYiyj#(4\9%5EUeu%5EU0" 0@P`p 0@PRUI@P`p 0@P`p Gg@P`p 0@P`p 0d#IHEhfa_LayerEhfa_LayerH{4096:sdata,}RasterDMS,.Hrootroot#IHIIMGFormatInfoImgFormatInfo831HHIlenz_lvl_2Eimg_Layer@@?]]]]]]???XXXXXX?PPPPPP?]]]]]]???______?WWWWWW?QQQQQQ?______?PPPPPP????uuuuuu?????QQQQQQ?QQQQQQ?QQQQQQ??XXXXXX?______?XXXXXX??WWWWWW??333333?????______???QQQQQQ???????????????XXXXXX?QQQQQQ????QQQQQQ???QQQQQQ?????~~~~~~??YYYYYY?YYYYYY????444444?????????PPPPPP?XXXXXX?uuuuuu?______?????]]]]]]???????333333???XXXXXX??QQQQQQ???tttttt?333333??QQQQQQ??????????XXXXXX??444444??QQQQQQ???QQQQQQ?????vvvvvv????tttttt???????PPPPPP????WWWWWW????XXXXXX???XXXXXX??????vvvvvv??uuuuuu??]]]]]]???QQQQQQ??______??PPPPPP?WWWWWW?????????????tttttt???????uuuuuu???uuuuuu???????333333????222222???????????]]]]]]????????______??TTTTTT???????????????????????tttttt????||||||?????????uuuuuu???uuuuuu?????PPPPPP?????TTTTTT????PPPPPP??333333??VVVVVV?????????????QQQQQQ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPN?>=<;;98 BPLH=43 21 0 0 0 0 0 0 0 0 0 0               PPPPPPPPPPPPPPPPPPPPPPPPPPPPPcqJ?9655444 3332110/.-, *  % % $ "                         7 20,+*)('&#!##$&()+,-01 0 1 1 3 33322/ / / / / />?>?>>>>=+**  (((2221&) )()                                                                     0 0 0 00000000000 00000000000000000000000000000000000000000000000000           PPPPPPPPPPPPPPPPPPPPPPPPPPPPPVc! !           "##%&'"!                       $   ' +                                                                                                      !--55 4 4 3 2 1 1 211 " !      ' ' ( *            ) 9(&                                                                                                                                                                                                                     000000000000000000000000000000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 00 0 0 0 0000000                            PPPPPPPPPPPPPPPPPPPPPPPPPPPPtD>===<<;;::::9999999999:::;;;;;<<<<<<<==<<<<<==                 .                                       &% !            # $ %(1))) & " !                                                                                                                                                                                                  % /        + -  -.$ -( "#--))/2     - =?@O9:6 21,*                                                                                                                                                                                         0000 0 0 0 0 00000000 000000000 00000 0 0 00000000000000000000000000000000                PPPPPPPPPPPPPPPPPPPPPPPPPPPP=>>>????N P^            #$& 4 5 6 8<@;75531222 // -)(                            (  '  %  $  #  (  &  %  "                                                                                                                 !!        1,) 0 4 3 3 67:B;>5)' " % & 89+) ( 6 5 1                                           000000 0 0 0 0 0000000000000 00 0 0 000000000000 0 00000 00 0 000 000000 0 0 00000                                                             PPPPPPPPPPPPPPPPPPPPPPPPPPPPP$         . ) ' & $ # !          $))'&$#!!             !"$#!! ! #                                                                                      %#!))(''&&%$                          # $ $ $                                                                                                                                                                                                     +00 000 0 0 0 0 0 0 0 0 0 0 0 0 0 00 000 0 0 0 00000 0000 0 0 00000000 0 0 0 0000000000000000                                                                             PPPPPPPPPPPPPPPPPPPPPPPPPPPPPVd' ( ) **+ -./ 0 2 3 3 4 5 5 6 7 89:;<<;;<<<H              ( ) 001       !                                                                                                                                             0 0 0 1 0 00000000000 0 0000000 0 0 0 0 0 0 0 0000 0 0 000000000 0 0 0 000000000000000                                                PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPVd!!"#$$%% % ' ' ( ( '..L                  +9000 0 0 0 0 0 0 0 00000L0           {#IgMap_InfoEprj_MapInfounnamed, Difference diff int32.tif 1 float32.tif 1 gdalautotest-3.1.2/gcore/data/byte.pnm0000664000175000017500000000063513701057751016374 0ustar evenevenP5 20 20 255 k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/epsg26711_3855_geotiff1_1.tif0000664000175000017500000000054213701057751021445 0ustar evenevenII*aS   ':N@N@?@A̞LA& WhNAD27 / UTM zone 11N + EGM2008 height|kgdalautotest-3.1.2/gcore/data/uint16_3.hdf0000664000175000017500000001103213701057751016741 0ustar eveneven j\    < &! G K< !  < !j    + ;Q 7 ; I GF<<NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0j j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0  uint16_.hdfCDF0.0gdalautotest-3.1.2/gcore/data/pixfun_mul_c.vrt0000664000175000017500000000135313701057751020140 0ustar eveneven Product mul cint_sar.tif 1 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/byte_ovr_jpeg_tablesmode3.tif0000664000175000017500000000403013701057751022532 0ustar evenevenII*YS[!   8xC    $.' ",#(7),01444'9=82<.342 }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|  BCDcES[!BC    $.' ",#(7),01444'9=82<.342 }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?IY"# sץHQ,7x?w'ʏ>Oo|?*Oo|?*ޚ̬0ZfăI#'ӠzgV_\ Fc21<1ֹ*Շa6Is\9n~Q gdalautotest-3.1.2/gcore/data/nan32.tif0000664000175000017500000000125413701057751016340 0ustar evenevenII*"     SHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhB     Sgdalautotest-3.1.2/gcore/data/3376.rrd0000664000175000017500000002636613701057751016041 0ustar evenevenEHFA_HEADER_TAG@R8 rootrootA R_ss_2_470373667Eimg_Layer_SubSampleA6%6% Ehfa_Layer73667Ehfa_LayerA0  n4RasterDMS73667Edms_Statefo831AZA R Layer_2tInfo67Eimg_Layerfo831A V_ss_2_470373667Eimg_Layer_SubSampleA6%6%V"6Ehfa_Layer73667Ehfa_Layerfo831A>{1998:Cdata,}RasterDMS,."4RasterDMS73667Edms_Statefo831A(%AR"Layer_3tInfo67Eimg_Layerfo831A:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{1998:Cdata,}RasterDMS,. R IMGFormatInfo67ImgFormatInfo831AjfP 4RasterDMS73667Edms_StateAf | AH RLayer_1tInfo67Eimg_Layerfo831A _ss_2_470373667Eimg_Layer_SubSampleA6%6%  Ehfa_Layer73667Ehfa_Layerfo831A {1998:Cdata,}RasterDMS,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,.nwnc]BglfYQ40aWb[^VWe\R(E>@]wmlfcqijljcYXYi``\chkrgYL7XbU\ad[YSSZVUGaykaJdFdNZ\MrUtsdZ_cc]rof^ddmRou_`QalLhbbd^_jgc]IBQ\eeab[b=BRNY^Lfmse]`chmb]b_iuul~}qlkchklgc`fi\]vQl\eY^eaJZd_QXI_\^jblVpXed_cn{qmjhlklihjjkdZxZxcqnLl|w`eh\SXIR_ZfjjyadU`]gxskijjkigkwpjlgqVzf[oeMllek]TVRZ`fddixiP\W_ouijmoknc^piX[j]owiv[WvenkwtTJKb`gaoѯgc]`n`n{trrpxiQZig_Vqr}UrjNYb[fnb[`h\esϩΟnmjjjopl~~{yroasrghuHYzqrgad_K[X\_abg[awUsѽ`hbd]Zpcinu{wqfwzxupoknkjb_Reore^aedeնqf`o]^fnx{wsyuxtjpngj\U\jki`[izmԽǂȽldl[[agnt~|w{qmknk{j^p`AZ\_kdlƵȳtz\[]chfjjqmfjfa^Zdjx\ed;T[fbs{ʛ²Ϲӯb][^acefhgecb]VSWdtetv[\b_^d`Ľνf_]^`bceddecccababhl{uo_\o{i˨{ffbacddeeddcccddd`ejjiggjuuga̼eȠhsftohddefeefgfeccbbc`acac`Zb{þа|gSbmjgeeeefffffddeefc_^^af`gx–ĞuXIn4ifeeddfffffdccccb``d`bRXɶƔo}ĉvz@8]qddccdddeeefecb`_]]\akfaRu~lcz6 dbbccdddcdeecaa`_^_cjeföжǴmczxOVedbbbddabeeaaehjjgde_vťz{Эduucdcdbbbcbceeddefb``\Wbȹ̱÷ok{edefd``dfdflkcbhg`diķo{[orrkvgfegebacdbcghkg]gvöQ̝ĢZ^`q=Bjihgfeecbba_bdewò~¦ƭØ`vvF[iggddb]]bemoʶgƯhzecefcc`YZcjh̽ӾʼϧrzϨ̘ohbcegd_]amdþȴßsΪǽɑ~qkdkiif`^ko˶ѷbθj͞vqgba]Zai»½ƬʓtɐRcmxܦ̩ui\adafƿƺȉƴʩ_gqy׽}{̺ƚöo¶ųʯ}u|Xnɸźƪ|cʾxҰ|}zִƹěɾ²qrķüϥqmcy|Ýxáɰ̀{Ψǡʹźf{y޷sijzzt⟭ĸuv{ײ²Fwwtwrñܫw~vyùٸ{lŭ|zƴ^zإbwn˻vh{»gyzyd`r{iȁиxvxayĔZevlv_zv}|~kgwtvh|vpo|rffmwaVXrm{|yljbm|ѭxvxxͲwpmeenwʾ~ȵr~{lmv̴zzvg}}VŨˑ~mttklxyƍ}elڭgfjjsvpʿtqowĵtmhnr}ʳϣxq}ۺtke`qručۻœxw|poa۴]clkisrzqəpmjhfغotuqs|}w{v|Ķzk|yk_vx{xv~~įǩ~npr~}zrcuy{ŤƬʹzwo|zrtjkrei|{wǝIJrz}zzstyxsv}x}zs|{ʻ֧|jWtv|qg{omvo{rűhr}xzjygv}vefmagoucz{Զs~zvzz~`__}}tʿö|Ǿú׺ùܻ˰˝┷ȺȨü»ğ¼ƿǺӭǶ⽺ȿԵһŤҼĶİ[iṴҽƾ޶™cl[]ǽʿųŶʹϭū~X9xy»ªҫèӳp\Io\ùƸǽ̞ľd7jcjfVĺŻstfnmia}׾ļĶùdQdQutz}orѾ¸̽ğswjZoIzqj`dk\hNVpʴи͖YpUkZDpp\oY]gj}m_yűѤ\QbNr}vk^exo`gjQwblĿ¾ĵWZSmYpl_^QYY\S8R[\XUlbxltk`jefI_YSRWO\MeeCYFWj:d_e{^2Pjwn^Xd[SjlXJUTmx[\sthilS_L[clbWZ]NRRKf-Y`2oBB?UxrP`^?rh^ZQP]nMABjaVwgdalautotest-3.1.2/gcore/data/6band_wrong_number_extrasamples.tif0000664000175000017500000000536413701057751023773 0ustar evenevenII*` RS   8xN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kkkkk{{{{{ssssskkkkkkkkkkkkkkk{{{{{sssssssssskkkkk{{{{{sssssssssskkkkk{{{{{{{{{{ccccc{{{{{cccccsssss{{{{{ssssskkkkksssss{{{{{kkkkksssssssssskkkkkssssskkkkk{{{{{{{{{{sssss{{{{{sssss{{{{{sssss{{{{{kkkkkssssskkkkksssssssssssssssssssssssss{{{{{{{{{{{{{{{kkkkkkkkkk{{{{{sssss{{{{{kkkkksssssccccc{{{{{ssssskkkkkccccc{{{{{sssssccccc{{{{{{{{{{sssss{{{{{sssss{{{{{{{{{{kkkkksssssssssskkkkksssssccccc{{{{{cccccccccckkkkk{{{{{ssssssssss{{{{{sssss{{{{{{{{{{cccccsssssccccc{{{{{sssssssssskkkkkccccccccccsssss{{{{{kkkkkkkkkkssssskkkkksssss{{{{{{{{{{kkkkk{{{{{{{{{{ccccc{{{{{kkkkkcccccsssss{{{{{{{{{{kkkkk{{{{{{{{{{{{{{{kkkkk{{{{{{{{{{{{{{{kkkkk{{{{{{{{{{ssssssssssZZZZZkkkkkkkkkkkkkkkkkkkkkkkkkccccc{{{{{sssssccccc{{{{{{{{{{kkkkk{{{{{ccccckkkkkkkkkksssssssssskkkkkccccckkkkkkkkkk{{{{{ccccccccccsssssccccccccccsssss{{{{{ccccc{{{{{kkkkkZZZZZkkkkkssssskkkkkZZZZZccccc{{{{{sssssssssssssss{{{{{{{{{{sssssccccc{{{{{kkkkkkkkkkkkkkkssssscccccssssscccccccccckkkkkssssssssssZZZZZ{{{{{ssssssssssZZZZZcccccsssssZZZZZcccccccccckkkkkcccccccccckkkkk{{{{{cccccsssss{{{{{JJJJJsssssccccc{{{{{ccccckkkkk{{{{{{{{{{kkkkk{{{{{kkkkk{{{{{ssssskkkkkkkkkkkkkkkkkkkkkkkkksssssccccckkkkkgdalautotest-3.1.2/gcore/data/packbits-not-enough-data.tif0000664000175000017500000000207613701057751022212 0ustar evenevenII* !:IIield  II*?P8$ ƒ*PD‰DcH#5-!2 >F1~!:IIield  >FťX#A>Rؤ[͂U*o-yl0-[%P /.(-SxL   >FGTIFF_RAW: :IIield FťX#A>Rؤ[͂U*o-yl0-[%P /.(-SxL  ! ()@ (foo.tifHgdalautotest-3.1.2/gcore/data/utmsmall.raw0000664000175000017500000002342013701057751017263 0ustar evenevenk{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sŜŌֵέ֭sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{Ŕεs{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{Žέ֭Δŵ{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{kέńBΥννΜsss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{k{ccť攽s{ksc{skscZk{cs{Zcccc{kskk{kssk{ZsΔŽޜZkŭ{ŭc{sc{{ssckk{ckkcsccZcsZss{{{sνﵔťsޥ{s{{kssksc{cck{kcccsZ{sksskss{sc{{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{Rcֵ֌ccs{kksks{{k{kskscskkssks{Zֽ楄{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{ksέέ{֔極{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{ť{kέ޽{ޥΥc{{k{ckksskckZ{ksss{ss{ksssε{Δ楥ޥŜŭk{ccsccs{c{ssc{kkcs{s{{skk{֜Žֵ޽ŽŭޥεkkZkskZc{sss{{sc{kckk{{ssŵ{{νΜֽεΔŽŵ֥ťޭŜ{kkkscscckssZ{s{{k{{{Zk{kkńŵsc{ŽŭŌksZcsZcckccksZs{skskssֵŭΜεΌŔ޽ŭ֜{cs{Jsc{ckkskksŽ{εŵν֭Μks΄k{{k{k{RccZŭŜΥε浌ŭ{{ޭΔ{Ό޵skkkkksckZsccέޭ޵ֵ֥s{Ŝ{ޭΜ{sZcsZkccZckcc{ε朔ŭŽŵŭŵŵk{{{kcRkkkcckŭŭ֥ޭ֔Ŝ{ޜZckcRss޽έބε業{Z{k{ŽŭŌŵŜŭc{{kޔŽť{{sR{֜{s{{{sֵޥֽs{{{{Zc楜{έ{ŽΔΜc{εk΄省ΜΥsks{{Ō攜֔ŔskޜŔs{εޭńŽ֭ﭥ{֔{{ťs{{Ό޽֭歵Z{ŵŵŌťŽŌ{{sֵŔ޽ssŌsνť挥ť޵޽֔楥{ν{ŵε潔޽朔Υ{ֽŭ֌攔ք{Rkŵޔsks{ZŽ楔ޭs歔掠ť{k{kscsc{ť֜c{kޜs{J{c{Rcs{kΥέŔťŵνΜsk{sskk{skscRcJk{sέ{Ŝ֌޽έޭޥ{k{{Rk{kZ{RťŭνŵΜŌks{sskck{ֵŜsZŭ֔εŵεJkkss{{s{c{ŌޥŜsk歜֜{޽s֭{{{{Ŝ{s{k{{ckkŜ浌c潥ޔޥs{{s֔s{s{c{ks{s{s{εέֵ{{ssss{{kskkュ{ssތŌkckckcsksks{{ss{{Ό{sŽ歵{΄֜ބksckkk{{{{sks{{ťck{޵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)J1ZkZcB1JJBJ֜{ZkkBR:Z{ťcZkZJRsΔssBk{sBJ1J:BJ:JRBRk!!!kZB!!!{c)Z:1cJZJR1ZB:BccBc{cc{RJs1RBkcŜΜcZZkcscR1{{Z{{sBRRBB1BRRJ:Z{ŭ!sscR:Bc1cscZk!sBs1cB:BJ1RR{Jc){ccsZsŭsRR:kZ:{kRRsksRJJBB1J)JZkR!JsZ)kBRZsJZ{c::ZBZZZck:11):sBRs)JsZcRޭν{s{cRRZJsRRZcs{kcRR1BJBB{kJ11!!:BBB::sB!RZs{kBJBcss)B::)JB挜έcZk:k{ksZZ{{RsJ{cZJRZ)BBBsZ1Rs!1JBc:)J:ZkZRR:R!BJZR{Zs{{攜{sJJJR{cJBRBZRkZkRJBZBBBBcsBcZs:!J:Z!1J)R!B)::ZcR1BcsZ:1Z:kskJΌJssJsccsRckJJRJJcJ{sskkkc)JBZskRRJ1!Zc{!)::Z)R)1:BsckssZZ1:BBJJR!B֌JBcRs{cJBZsZ:ssJRJZ{kZ{Zk{{{ZRR1Bs1BJR11BR{{s{)ZcZR))!B)sŔZc):s{ZJkkRsBJ1ccBkZZB1ssskZkR{:RRZks{ZkccBs:)!:kcsތRRkZ:))!!):JRkB11{{1cskRRRZ!cRsZ:k1{J:1ksJZ{k{JZ{:skccRZZk)JRk1ccBckssZ!11cJ)JJB)RRs{R:){k1:JJ):)kR{sJJZkBkBJBZ:R1:ZcccsJRRskk:{sscRZ{gdalautotest-3.1.2/gcore/data/thunder.tif0000664000175000017500000000022413701057751017064 0ustar evenevenII* )SUgdalautotest-3.1.2/gcore/data/separate_tiled.tif0000664000175000017500000001045213701057751020404 0ustar evenevenMM*"  !""  !"#"  !"#$"  !"#$%"  !"#$%&"  !"#$%&'"  !"#$%&'("  !"#$%&'()"  !"#$%&'()*"  !"#$%&'()*+"  !"#$%&'()*+,"  !"#$%&'()*+,-"  !"#$%&'()*+,-."  !"#$%&'()*+,-./" !"#$%&'()*+,-./0" !"#$%&'()*+,-./01" !"#$%&'()*+,-./012" !"#$%&'()*+,-./0123" !"#$%&'()*+,-./01234" !"#$%&'()*+,-./012345" !"#$%&'()*+,-./0123456" !"#$%&'()*+,-./01234567" !"#$%&'()*+,-./012345678" !"#$%&'()*+,-./0123456789" !"#$%&'()*+,-./0123456789:" !"#$%&'()*+,-./0123456789:;" !"#$%&'()*+,-./0123456789:;<" !"#$%&'()*+,-./0123456789:;<=" !"#$%&'()*+,-./0123456789:;<=>" !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?@" !"#$%&'()*+,-./0123456789:;<=>?@A" !"#$%&'()*+,-./0123456789:;<=>?@AB"!"#$%&'()*+,-./0123456789:;<=>?@ABC""#$%&'()*+,-./0123456789:;<=>?@ABCD"#$%&'()*+,-./0123456789:;<=>?@ABCDE"$%&'()*+,-./0123456789:;<=>?@ABCDEF"  !""  !"#"  !"#$"  !"#$%"  !"#$%&"  !"#$%&'"  !"#$%&'("  !"#$%&'()"  !"#$%&'()*"  !"#$%&'()*+"  !"#$%&'()*+,"  !"#$%&'()*+,-"  !"#$%&'()*+,-."  !"#$%&'()*+,-./" !"#$%&'()*+,-./0" !"#$%&'()*+,-./01" !"#$%&'()*+,-./012" !"#$%&'()*+,-./0123" !"#$%&'()*+,-./01234" !"#$%&'()*+,-./012345" !"#$%&'()*+,-./0123456" !"#$%&'()*+,-./01234567" !"#$%&'()*+,-./012345678" !"#$%&'()*+,-./0123456789" !"#$%&'()*+,-./0123456789:" !"#$%&'()*+,-./0123456789:;" !"#$%&'()*+,-./0123456789:;<" !"#$%&'()*+,-./0123456789:;<=" !"#$%&'()*+,-./0123456789:;<=>" !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?@" !"#$%&'()*+,-./0123456789:;<=>?@A" !"#$%&'()*+,-./0123456789:;<=>?@AB"!"#$%&'()*+,-./0123456789:;<=>?@ABC""#$%&'()*+,-./0123456789:;<=>?@ABCD"#$%&'()*+,-./0123456789:;<=>?@ABCDE"$%&'()*+,-./0123456789:;<=>?@ABCDEF"  !""  !"#"  !"#$"  !"#$%"  !"#$%&"  !"#$%&'"  !"#$%&'("  !"#$%&'()"  !"#$%&'()*"  !"#$%&'()*+"  !"#$%&'()*+,"  !"#$%&'()*+,-"  !"#$%&'()*+,-."  !"#$%&'()*+,-./" !"#$%&'()*+,-./0" !"#$%&'()*+,-./01" !"#$%&'()*+,-./012" !"#$%&'()*+,-./0123" !"#$%&'()*+,-./01234" !"#$%&'()*+,-./012345" !"#$%&'()*+,-./0123456" !"#$%&'()*+,-./01234567" !"#$%&'()*+,-./012345678" !"#$%&'()*+,-./0123456789" !"#$%&'()*+,-./0123456789:" !"#$%&'()*+,-./0123456789:;" !"#$%&'()*+,-./0123456789:;<" !"#$%&'()*+,-./0123456789:;<=" !"#$%&'()*+,-./0123456789:;<=>" !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?@" !"#$%&'()*+,-./0123456789:;<=>?@A" !"#$%&'()*+,-./0123456789:;<=>?@AB"!"#$%&'()*+,-./0123456789:;<=>?@ABC""#$%&'()*+,-./0123456789:;<=>?@ABCD"#$%&'()*+,-./0123456789:;<=>?@ABCDE"$%&'()*+,-./0123456789:;<=>?@ABCDEF #% B@C@DE ~~~gdalautotest-3.1.2/gcore/data/float32_with_nodata_slightly_above_float_max.tif0000664000175000017500000000203013701057751026370 0ustar evenevenII*jd S   $:  3.40282346638529011e+38??;At>!A # @q )#a+婁@ӼI@J +}@؃I ڿ0(hr?w-!&S@Amersfoort / RD New|Amersfoort|rݽ 8@qSY`z֔(ݾ`M!lԤpV> >B`>|>>2??Zd? ?.%?G(?+?0?{.?.?4?Lj,?;/?.?ޠ%?&?*?*?'!??}?>-?>&>>K>*>!>t>ܕ>ʬ>)=˦V6<۾O}?5YlGa=L=^;_=֡=-=\=` =z==F=;>h=+>>==(>y1>v[$>Q3>G>B>3>X7>B>rR>F> d S3.40282346638529011e+38gdalautotest-3.1.2/gcore/data/byte_user_defined_geokeys.tif0000664000175000017500000000203113701057751022616 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  ^h vwh@w@mx)@9P?9P?"#               )#:RFߑ?@TXA_M˕r@?|I+@˲/>J@A`@Sk@?unnamed ellipse|undefined|gdalautotest-3.1.2/gcore/data/byte.raw0000664000175000017500000000062013701057751016365 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/tif_jpeg_too_big_last_stripe.tif0000664000175000017500000000143213701057751023317 0ustar evenevenII*S[I ( @ pC    $.' ",#(7),01444'9=82<.342N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27| (!1AQq"ab?k1JuQa؍~~팕* +rK(r ;f8<͊zp"ea 0# $dvOTAeϹ %1A!"BQaq?Aĭ_\)I-$U ts5Ö^ cgdalautotest-3.1.2/gcore/data/vrtmisc16_tile2.tif0000664000175000017500000001002213701057751020345 0ustar evenevenII*}88=@S   . 0L k  % D c  < [ z  4 S r , K j $Cb;Zy33??ަ?^?$~A333SLA# e )#WGS 84 / UTM zone 13N|WGS 84|x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x  igdalautotest-3.1.2/gcore/data/byte_inconsistent_georef.tab0000664000175000017500000000053613701057751022477 0ustar eveneven!table !version 300 !charset WindowsLatin1 Definition Table File "HP.TIF" Type "RASTER" (400000,1200000) (0,4000) Label "Pt 1", (500000,1200000) (4000,4000) Label "Pt 2", (500000,1300000) (4000,0) Label "Pt 3", (400000,1300000) (0,0) Label "Pt 4" CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000, -100000 Units "m" gdalautotest-3.1.2/gcore/data/seperate_strip.tif0000664000175000017500000001010013701057751020436 0ustar evenevenMM*"  !""  !"#"  !"#$"  !"#$%"  !"#$%&"  !"#$%&'"  !"#$%&'("  !"#$%&'()"  !"#$%&'()*"  !"#$%&'()*+"  !"#$%&'()*+,"  !"#$%&'()*+,-"  !"#$%&'()*+,-."  !"#$%&'()*+,-./" !"#$%&'()*+,-./0" !"#$%&'()*+,-./01" !"#$%&'()*+,-./012" !"#$%&'()*+,-./0123" !"#$%&'()*+,-./01234" !"#$%&'()*+,-./012345" !"#$%&'()*+,-./0123456" !"#$%&'()*+,-./01234567" !"#$%&'()*+,-./012345678" !"#$%&'()*+,-./0123456789" !"#$%&'()*+,-./0123456789:" !"#$%&'()*+,-./0123456789:;" !"#$%&'()*+,-./0123456789:;<" !"#$%&'()*+,-./0123456789:;<=" !"#$%&'()*+,-./0123456789:;<=>" !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?@" !"#$%&'()*+,-./0123456789:;<=>?@A" !"#$%&'()*+,-./0123456789:;<=>?@AB"!"#$%&'()*+,-./0123456789:;<=>?@ABC""#$%&'()*+,-./0123456789:;<=>?@ABCD"#$%&'()*+,-./0123456789:;<=>?@ABCDE"$%&'()*+,-./0123456789:;<=>?@ABCDEF"  !""  !"#"  !"#$"  !"#$%"  !"#$%&"  !"#$%&'"  !"#$%&'("  !"#$%&'()"  !"#$%&'()*"  !"#$%&'()*+"  !"#$%&'()*+,"  !"#$%&'()*+,-"  !"#$%&'()*+,-."  !"#$%&'()*+,-./" !"#$%&'()*+,-./0" !"#$%&'()*+,-./01" !"#$%&'()*+,-./012" !"#$%&'()*+,-./0123" !"#$%&'()*+,-./01234" !"#$%&'()*+,-./012345" !"#$%&'()*+,-./0123456" !"#$%&'()*+,-./01234567" !"#$%&'()*+,-./012345678" !"#$%&'()*+,-./0123456789" !"#$%&'()*+,-./0123456789:" !"#$%&'()*+,-./0123456789:;" !"#$%&'()*+,-./0123456789:;<" !"#$%&'()*+,-./0123456789:;<=" !"#$%&'()*+,-./0123456789:;<=>" !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?@" !"#$%&'()*+,-./0123456789:;<=>?@A" !"#$%&'()*+,-./0123456789:;<=>?@AB"!"#$%&'()*+,-./0123456789:;<=>?@ABC""#$%&'()*+,-./0123456789:;<=>?@ABCD"#$%&'()*+,-./0123456789:;<=>?@ABCDE"$%&'()*+,-./0123456789:;<=>?@ABCDEF"  !""  !"#"  !"#$"  !"#$%"  !"#$%&"  !"#$%&'"  !"#$%&'("  !"#$%&'()"  !"#$%&'()*"  !"#$%&'()*+"  !"#$%&'()*+,"  !"#$%&'()*+,-"  !"#$%&'()*+,-."  !"#$%&'()*+,-./" !"#$%&'()*+,-./0" !"#$%&'()*+,-./01" !"#$%&'()*+,-./012" !"#$%&'()*+,-./0123" !"#$%&'()*+,-./01234" !"#$%&'()*+,-./012345" !"#$%&'()*+,-./0123456" !"#$%&'()*+,-./01234567" !"#$%&'()*+,-./012345678" !"#$%&'()*+,-./0123456789" !"#$%&'()*+,-./0123456789:" !"#$%&'()*+,-./0123456789:;" !"#$%&'()*+,-./0123456789:;<" !"#$%&'()*+,-./0123456789:;<=" !"#$%&'()*+,-./0123456789:;<=>" !"#$%&'()*+,-./0123456789:;<=>?" !"#$%&'()*+,-./0123456789:;<=>?@" !"#$%&'()*+,-./0123456789:;<=>?@A" !"#$%&'()*+,-./0123456789:;<=>?@AB"!"#$%&'()*+,-./0123456789:;<=>?@ABC""#$%&'()*+,-./0123456789:;<=>?@ABCD"#$%&'()*+,-./0123456789:;<=>?@ABCDE"$%&'()*+,-./0123456789:;<=>?@ABCDEF #%"((4< p444gdalautotest-3.1.2/gcore/data/corrupted_deflate_singlestrip.tif0000664000175000017500000002400213701057751023531 0ustar evenevenII* {{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZcckcCame{cs{{s{{{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{cckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{ckkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckskk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{ckkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{ckkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckskk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkkckkkkkksckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{ckkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkkscks{k{{{k{{ssZkkk{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkzcscckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{k{k{c{kkkzccckssZ{ssZcsZcckcck{cs{{s{{kssksc{cck{ss{s{k{k{sTag skkkkksckkkkkkscksZcsZcckcck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc {cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckkkkkksck{cs{{s{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{c{kkkzcscckssZ{ssZcsZc{{kssksc{cck{ss{s{cs{Jsc{|ZssR΄k{{k{k{sTag skkkkksckkkkkksckgdalautotest-3.1.2/gcore/data/Image_with_Palette.hdf0000664000175000017500000000234413701057751021132 0ustar eveneven\6.5-NjNjR3V,j2~ HDF Version 4.2 Release 10, February 7, 2014      ! !"!"#"#$#$%$%&%&'&'('()()*)*+*+,+,-,-.-././0/0101212323434545656767878989:9:;:;<;<=<=>=>?>?@?@A@ABABCBCDCDEDEFEFGFGHGHIHIJIJKJKLKLMLMNMNONOPOPQPQRQRSRSTSTUTUVUVWVWXWXYXYZYZ[Z[\[\]\]^]^_^_`_`a`ababcbcdcdedefefgfghghihijijkjklklmlmnmnonopopqpqrqrsrststutuvuvwvwxwxyxyzyz{z{|{|}|}~}~~jj,.3-,.3-Image with PaletteRI0.0RIG0.0RIG0.0gdalautotest-3.1.2/gcore/data/test3_with_mask_1bit.tif0000664000175000017500000000325013701057751021444 0ustar evenevenII* NST ZSgdalautotest-3.1.2/gcore/data/md_eros.tif0000664000175000017500000001265013701057751017051 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5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wOsvp.{~v80  ~l$|$ @*ByB7fȠ΁1H󋻺DT`K*0@`pWeWJס:OkΡpbӂ!6`~"~ëͤG0Vda#o$9~c}647:$vʎFqunj)[gQL^,P5T[[8`p {Cj$ >:$Bk {@{d&/ҳ\b \%k5UOB 4դ6/U w]/珿,˲=CqUrb#^ɰϿ^!D#<`?m'ibkZ{aaoedyl.4Ϣon;rچD8?{k1Խ&TeE\:tsP$8eǼ@x!>$ fe $ɎǨmMٝ|Q]y07 5]s-whBCrhF1E)Z2WO pq׷nw%X>׏;VS|:7Fu%ouXp^)N[4?<7xUMgwGb/IK85`Z=o_@Q5٬ʭ1'5D3F1Mҍ{ ';]/5LN-_?*|?C0H2K=X]ɝ+٨*+dSkWգ86C+TوRN)傞@Zx:Y]KQ;g0dBer_uwh4(o>-ѹN I$EEgq\@ R$I۬f> yd :t5CO8̛"&oLoJ (7)0dARGRf5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/bigtiff_four_strip_short.tif0000664000175000017500000000050013701057751022515 0ustar evenevenII+ <=>?S<=>?gdalautotest-3.1.2/gcore/data/arcgis93_geodataxform_gcp.tif0000664000175000017500000004212213701057751022433 0ustar evenevenII*,/(BCDp"EpS,,gdalautotest-3.1.2/gcore/data/epsg4326_5030_geotiff1_1.tif0000664000175000017500000000045013701057751021344 0ustar evenevenII* S  fV@v@f@?gdalautotest-3.1.2/gcore/data/cog_strile_arrays_zeroified_when_possible.tif0000664000175000017500000000235613701057751026117 0ustar evenevenII*GDAL_STRUCTURAL_METADATA_SIZE=000177 bytes LAYOUT=IFDS_BEFORE_DATA BLOCK_ORDER=ROW_MAJOR BLOCK_LEADER=SIZE_AS_UINT4 BLOCK_TRAILER=LAST_4_BYTES_REPEATED KNOWN_INCOMPATIBLE_EDITION=NO MASK_INTERLEAVED_WITH_IMAGERY=YES =BCDE&S   Jh$@$@A*QA# w )#WGS 84 / UTM zone 31N|WGS 84|=BCD.E>SJ. N?APhd& Db8|V%EQb=d9C'J$ҙd]*Kf2i7fө}=O(Qx(Qxxc`z 3z 3Z?aPd6AaVbѸb#C #I҈K,ˣ 5$擙S<"h.. xc`  M?APhd& Db8|V%EQb=r9$M'JeRd]/LfS9m7NgS}?PfPf xc`  A?aPd6AaVbѸb#HdR9$M'JeRd]/LfS9mm xc`  gdalautotest-3.1.2/gcore/data/uint16_3band.vrt0000664000175000017500000000465013701057751017650 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 testvalue Gray 107 byte.tif 1 testvalueBand Gray 107 byte.tif 1 testvalueBand Gray 107 byte.tif 1 testvalueBand gdalautotest-3.1.2/gcore/data/int32_2.hdf0000664000175000017500000001225613701057751016562 0ustar eveneven j\ @ <F!gk<!j 2 $7 [; I F % 9< u8NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0 jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 int32_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/rgbsmall.tif0000664000175000017500000001265013701057751017224 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5ɴ7oHxbhuM?Mx_Fҡ Dg%5(VjoWSU 9 Kd&)0vt "#qjPE«q+r %ž IZX짎J*`# aq]!))l)Y DFWx|L#]xSlQUΟIW q Y$.;.EEI4$[*@әɈ; !2,Ȋ$ RuPyD: UY,.( ԲJGVWwbP.b'+ht\)UXD*^ NP2Z^q6_ IsEq +1(+B)!氅~!ϟf+؆UU[I)0S10E촻 " B~:mtj]#oZlD'qa?Y߽ ̓Ԍ^G&7StIVmҊ;9 ׆aLd\i:Bk1}sa' h=q"~km3V<˘Yȅ娞%#m|;whPt7eMq(YZle5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<7xUMgwGb/IK85`Z=o_@Q5٬ʭ1'5D3F1Mҍ{ ';]/5LN-_?*|?C0H2K=X]ɝ+٨*+dSkWգ86C+TوRN)傞@Zx:Y]KQ;g0dBer_uwh4(o>-ѹN I$EEgq\@ R$I۬f> yd :t5CO8̛"&oLoJ (7)0dARGRf5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/pixfun_dB2amp.vrt0000664000175000017500000000106313701057751020144 0ustar eveneven db to amplitude dB2amp Float64 float32.tif 1 gdalautotest-3.1.2/gcore/data/ycbcr_44_lzw_optimized.tif0000664000175000017500000000506413701057751022013 0ustar evenevenII*, P8$@AP8D. A$N)@0 t "1D Nr@9e3d2lm0fsm8Lܤ[/^5F2h\2Φh8 W9;z00X2Gb0NB{SCkɚNgy:p.ST_A %\o4 fl2W:WLf4'3b45zm4Ń1XkŠ1P8:?X9P1@= @63/ 3;+* @-`:3 5 #X> 8/*,4C89/-9H0 #P/b,so!* 1(*"۪c 0 c+2 B0#EH ",#/, X0 R)J/ 8(( 5 B<2jh4 0%cC^Ab+ h=EBظ$ .Ŷ3X*-(1 5 bLϒ C5 c7 YύGB(D)#0,@<[␿x"< b(: #Ь1+r8 @+ C4:`=dHQ> 7YbmxD6ض54Ao bȰB/Ȭ3 P* T0 b' Ȗ,B|  p֎0@)78;]i@>d ;5x< "7 !*@8X+8> 2⨒$c@)?F1p+fy$>/T0n̐fCPc|- lN[Aa83,sad7Pr'X%#[_ ah*@䜡0>6#@",Jx!,.C~ "Jhl aP#ByQ,%f )Y{ -PCC<aR.tW8p 7i +0ܖxs.c AeI "@@Pd \-0!f$9qDȷD6ON 2 `jB.ܾQ . ' k  RAI CIؕ;`E7 u1zx4(8dVJAйm*D\ "EtDPVAh4Q qA$ĀQ<ȀB E!$DN B\!Y anBT;Р(I 060e?,&@EqBb0p$bX=˱u8potuPZ45`+UM8B :"Epb4p>B8U A 8r ,p%(@b0D?At@0yBtVd BaÀDE$C8D`ڐ A@A$Epv )?(b (Lb5 (U,$Ck aAXAz`a@!A3vx~KDB ! C?`!DPp Bpo/ shtH6J p+R "5 9 PJrh>k\I4=q^\&CM 5{"8rb#XHB$C]iB@B ACv$/MP*+8X <:R$D Ap*AAX/P /$AZK%Cb1 R!CP3 }H% B%batk8JA!q %Q1v !ݒ!.'H\b=1 #E"b,< @& &`A@`!w,,q'xp4I"N * !F` Dbt>1#X 08 `Da&%` 6 LĐ|BBퟴSfW\ * X Dpm^(< 00 $   CLE/gdalautotest-3.1.2/gcore/data/spot/0000775000175000017500000000000013701057751015676 5ustar evenevengdalautotest-3.1.2/gcore/data/spot/md_spot.tif0000664000175000017500000001265013701057751020053 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5ɴ7oHxbhuM?Mx_Fҡ Dg%5(VjoWSU 9 Kd&)0vt "#qjPE«q+r %ž IZX짎J*`# aq]!))l)Y DFWx|L#]xSlQUΟIW q Y$.;.EEI4$[*@әɈ; !2,Ȋ$ RuPyD: UY,.( ԲJGVWwbP.b'+ht\)UXD*^ NP2Z^q6_ IsEq +1(+B)!氅~!ϟf+؆UU[I)0S10E촻 " B~:mtj]#oZlD'qa?Y߽ ̓Ԍ^G&7StIVmҊ;9 ׆aLd\i:Bk1}sa' h=q"~km3V<˘Yȅ娞%#m|;whPt7eMq(YZle5΄XB9_P1]k$J*٩ć[q;bIvo7n'OD;侟47:}[^%YXz?Le}f,x}ogF@hBjRIm)$I$uxxwvf>μs۝^zCJR>Hn6$< < ~oJiɃ"_f6ہFPDsrT:}"08,!PUe$'taE?-'o8Ki'f]*h! <8n$Mļ"͡>!1O8hQ!L:.xE$]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5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/spot/METADATA.DIM0000664000175000017500000000306513701057751017415 0ustar eveneven DIMAP SPOTSCENE_1A EPSG EPSG:4326 GEOGRAPHIC WGS 84 2001-03-01 00:00:00 SPOT 4 +1.4490376282e+02 +5.4877838135e+01 3000 3000 4 8 UNSIGNED I NONE 1A RAW SYSTEM gdalautotest-3.1.2/gcore/data/uint16.hdr0000664000175000017500000000036413701057751016541 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 12 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/WGS_1984_Web_Mercator_Auxiliary_Sphere.tif0000664000175000017500000000241113701057751024526 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  ^, A:.xfTA@@ 2 2#   ? )#@TXAmtr@PCS Name = WGS_1984_Web_Mercator_Auxiliary_Sphere|GCS_WGS_1984|ESRI PE String = PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]|gdalautotest-3.1.2/gcore/data/onefileinsubdir.zip0000664000175000017500000000135513701057751020622 0ustar evenevenPK ﬜<onefileinsubdir/UT KKUxPK﬜ Real part real CFloat64 int32.tif 1 gdalautotest-3.1.2/gcore/data/pixfun_phase_c.vrt0000664000175000017500000000104413701057751020440 0ustar eveneven Phase phase CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/small_ov.rrd0000664000175000017500000003121213701057751017235 0ustar evenevenEHFA_HEADER_TAG0&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.v10Z;DependentFileEimg_DependentFile bsmall.imgW01BRasterDMSEdms_State +WW kkk{kkccssk{{skck{{c{s{֥sεֵŽ޵s{kss{ccZss{{kk{{s{ŜֽΔޥss΄ssksk{scssckks{{s{kc{ֵŔc{{skkcksccZ{sŽ֥֥ޥŵ{{s{ccssJssss{{{sRε֜c{s{{{sk{{cc{s{k歭֔ޭc{{kskZkss{ssέޥŔΜkkcss{sc{ck{s{έ֜έ޵Ō歜kcZcccsZ{ks΄ތŔޥťťskkRcŵΥ挌{ޜ΄{εޜޥ{ZskZkcŵ攭ťŜޭޔބccsťΥΜޭֵ歜c{{k{c札΄{΄Υεss{Ŝޭ{{Žŵֵs֌νŜ֜Žε޵Δ{֭浥Rkޥs{{kcc֥֜ks{kc{{Ōք潭νkŵ挄k{skc{ŔZŽ֌εŵΔk省ֵ歽֔{{{k挽޽ޭ{s{{ތ{sss{kksޭ֭ﵜsckk{ss{Ŝc{ޥŌ޵ŵs{sk{s{kskZޔތޥŔΔťcZc{kc{ckR{ss֔νJJRkRssֵkkΜֽֽ{BkZJZ{s{{{ss{ޭs޵νŔZcZ:RsRcZ{kk{Ōތ{֜έﵽ{ބks1ZRBBcsscs籠Zֽ1kޥŽ{έŔcJ{JRRJBkBcBJk{ńsֵ楔c|Ž{Υťscs{ť{֌skk{{sޭs凜ΜΔŽ֌޽ŽŽέ{֭ތν޽k{kŌŜ10Ehfa_LayerEhfa_Layer0{4096:cdata,}RasterDMS,.rootroot01Layer_1Eimg_Layerv1v2_ss_2_Eimg_Layer_SubSampleF @@gdalautotest-3.1.2/gcore/data/warpsst.vrt0000664000175000017500000000460013701057751017151 0ustar eveneven -9.0302711486816406e+01, 1.5466423123725517e-01, 0.0000000000000000e+00, 3.3875526428222656e+01, 0.0000000000000000e+00, -1.5466423123725517e-01 512 128 6.71089e+07 NearestNeighbour Int16 sstgeo.vrt 0.125 0 GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4326"]] data/sstgeo.tif 1 0 1 data/sstgeo.tif 2 0 1 -90.30271148681641,0.1546642312372552,0,33.87552642822266,0,-0.1546642312372552 583.8629317485302,6.465619051026727,0,219.0262490378758,0,-6.465619051026727 gdalautotest-3.1.2/gcore/data/md_re_metadata.xml0000664000175000017500000000210413701057755020362 0ustar eveneven RE00 RE-0 2010-02-01T12:00:00.000000Z 0 70 AUTOMATIC gdalautotest-3.1.2/gcore/data/byte_averaged_50pct.vrt0000664000175000017500000000303213701057751021260 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray byte.tif 1 gdalautotest-3.1.2/gcore/data/byte_2.hdf0000664000175000017500000000760213701057751016565 0ustar eveneven j\  V Z< !  < !j   2 B2 t7 ; I /F u < J7NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["UTM",GEOGCS["North_American_Datum_1927",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]VALUES ProjectionAttr0.0 byte_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/next_literalspan.tif0000664000175000017500000000023013701057751020764 0ustar evenevenII* S@Ugdalautotest-3.1.2/gcore/data/uint32.hdr0000664000175000017500000000036413701057751016537 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 13 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/int16.vrt0000664000175000017500000000234713701057751016415 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray int16.tif 1 gdalautotest-3.1.2/gcore/data/utmsmall.vrt0000664000175000017500000000254113701057751017306 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray utmsmall.tif 1 gdalautotest-3.1.2/gcore/data/nan32_nodata.tif0000664000175000017500000000140413701057751017663 0ustar evenevenII*   t S   Vnan??jASA# w )#WGS 84 / UTM zone 31N|WGS 84|HBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBHBLBPBTBXB\B`BdBhBgdalautotest-3.1.2/gcore/data/right_top_vrt_subpixel_offset.tif0000664000175000017500000000071213701057751023570 0ustar evenevenII*  f dS   JN@N@(A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|xxxxxswq~msp{qw|rooowxslk|~xhv|ylw{qr|w}}mpjpkgzsjkm|rononwqqgdalautotest-3.1.2/gcore/data/spaf27_markedcorrect.tif0000664000175000017500000000165013701057751021426 0ustar evenevenII*S  P "Pō[Lph@nQfLh@˶8AY[#A#       +#      ZUUUU@@] @@@DDDDd@@>AUuor@TXANAD27 / California zone VI|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/stefan_full_greyalpha.tif0000664000175000017500000013734613701057751021771 0ustar evenevenII* (RSHH V@_B)   'nn    n)n -.0"!6JNDNC4/+$   n&%(-)!DbkfdaB1('   nn/!34+7qtnbM7-0,./02/%(" !Znn1. ]0d{>'%'$,:DKkygKCG:." cnB Alm=&%*?Rd|zmR>2'" Bon=  %8GQ`kwUJE4&%! q   #,?F^f`[\OJ?30$!   Ew0 &.1<>JSJDM[J>4# 445554431/-+(% n JN$"&-;9A@PcVH%259<?ADEGHHIIIHGFEC@=962.)%  n =kG8"'#*:FEPJ0 49=AEIMPSVXZ\]]^^^]\[ZWTQMIE@;50*$  n*%# !Vw'#M%   7>DJPV\afjnquxz}}{xtplga[TLD;2(  &% $  ;4;CJQX^djotx|{wrle]TJ@5+!  '!# t8 5=FNV^ekqw|}xrkbXNB6* ,. (% -! ?GPYaiq  zskbXL?2& 1/,""+-.b" BJR $#~zuog]RE8+ 9:8<=F@EI"*7/(&  $&"~{ywtpkd\RG:." !OYkffjaf7#2  %$(%$ +#yvsqomkigda\UMC8,! n'Qpt- 6^R2 a^\ZYXVTRNJC;2(  Ct[0vz'JHGEDCBA>;61)" 0SZ[u_'   643210/.,)%   MwitehX  RMIEA>;852 &$#""!  Do}kovi  ~xrmga\VQLGC?;851/,)&#! P~v{|  {uojd_ZUPLGC@<963/-*'$! bu 2i: {uoje`\XTPMJGDA>;852/,)&#  5h|Q0  xsnifb_]ZWUSPNLIGDA>;741.*'#  C{}s]"yuqnkihfecb`^][YVSPMJGC@<840,'# 0hxjF( ~{xvutssrqponlkifda^[XTPLHC?:5/*$ 0nn MtaL9$~~}|{zxvtromjfc_[WRMHB<6/(! I5qlXC6! }{yvspmiea\WRMG@91*" ;zrVpaME(}{xvsplie`\WRMF@80' 2d@n2t\Q.~|zxusqnkhea]YUQLGA:3*" *n^7xlaB }zwurpmkigec`]ZWSPMJFB=81*" Ic^2}lW}zwtqmjgda_\ZXVTRPMKHEC@>;951,& 3pY_yj(~{wtpmieb^[WTQNLIGEDB@><975310.,*($  Z/n7gGxr=  |xtqmieb^YURNJGC@=:864210.,+)'%$#"!  vM)DnQ|97[}vpkfa]YUQMIEA=:630-+(&$#"!  KD3nBp.wnf^XRMIEA=952.+(%"  35gj qRo; vj_ULE?:52.+($! u-n9vd  qxF yl^QF<4.)%! P$enH wY^/ teVG;0'! `B8l $&&"iwF rbRB5)  z{iUgw ").1/*#[xa scSC4( 9=iwPXp8q*/3>CFF>2/% Hg iXH9,  ncZ r_ap">U^knyrmaYM[Q ,% qbRC4' /r7s kTN§uEEjhYcgortvtvrt) m^O@2& TcN'ZEqj% ) yk]N?1% Aih^ |"F@0_]& p_  yk]N?1% =Xe&?JERblhMA4# 8|,  yk]M>0$ (-&#AvlV;,YMEz%     xU yk\M=/" jT8#4'qFZFSl#dC &T ./( |l[6u^HhucjIWk:-n) $J7UvrL*($( !#07'  =ZA@g,d`ca~Wo/nUscP5ney}~i- #x>lznp2""     +HmemlX]=HdyhL@3J=Ui``KGRIU\)*(DV`;_y}f     %$-324GDP$!KWVPQSa`aVO)n`\l\GL\HIB87oP13SPD.EkvaS "-?Yif\K,    % #'"1/''#!-AID-)@F8WecFIHe`qmwaIOE,H62-/ MSHnG{WKRu6!kjjr QN  (& *(//+40@/.).3MEWKO\jVoOM !&#!1*"!+-#.() )-7(956:083/"L1+ #3z=A9H8)^``j r,%  '( ". )+#'&%   $ (.($%,$-#'(60" '0 r< :;::JMJHE[^Q 9xz.      OK#!*'"1 , (  ", %!$"  JMIFT"Idujiaa+.YaW*AU`r3     N E$ "&&4 * ,  # .v O rqV&=qza[LM4IVZZR >;6/' r:XaA2NOXR-2!{,[   F81#&&  uh]UPPS Y  &A&  ,0-)%!#(/6>EKOQQMG>4)mT//sZ(@LB,>j  iB    P!%# tkebbek  )"/ m c YPHA:51-+**+.39@HPX^bdc_WMA4( [O{S1 1AI^\ZUJ?' D@sz&]Q3`4   <)6 zussv{ 5 skb[TNHD@=<<=AELS[cjostrneZM?0#j_[L2*3100(7N+w! %:ZxgW>    ,  @ztmgb]XTQPPQUY_elsy}}xodVG7( X%#e| :bbRVYRY]\\`Y8B11oFo~U# "    8,}ytplhfddfhlqv{|th[K;, k>JFLqqJGQZ_^c^[D"Ua\Kd{x2 "    9ET}zxwwwy|zrgZL<-  g2q&PTQqfiZlX^Z[\UNNIECAA%.3rUPyqo^SY} 1U AKY`!  '@d-|uojgdccehmsz*{tkcYPF>71,'# I;,32L5dyqo_Pxkv)[* %;>FUk`  *|skc\WRONOQTZairz}vne\RH>5-'" ! (469m bxoeiNif# &0 (=IP=OlzU   xmbYPIC>;::=AGNW`jsz~xqi`VLB8.& )-5;Gp4 WungQZx "(K =MVMAMatG    vi]QF=60,)()+/4<ENYbjquwvsmf]TI>4*" 4 Q?>:7clw$ F{r_gaHi4&ui#9JTTR@M`zt   xj[M@6-& %+3=GPYafijhc\TJ?5*! LY.#_f;:9DbZlA$##3umc^F]{ 5'@+-GQOTGAZu ~n^N?2'%-6?HPVZ]\ZTMD9/$ :\~BK&>?5R@4=.mZ(_wuh[KSnp 8+%u %=KHSKBY|7 wfTC3&  '/7?FKOQPMG@6," 2a~iF 8B97/#!_zzH !MvvjcNPjP92-GP3ILRLDQ~$r_L:+  !(/6<BEGFC=5+" 0i1$=93+" 9P{ 80Cvpq>(hnH[rA@74Cs8JTTHjw ~lYE2"  "(.36650)" 6C~ & .rvR 8OV|U=5,h# %NWVKkR~lXD1!  #(,..+&  9S^S  jrODg_}Q:3Dtc0JWMj9  nZE2!  "%&%! D[J}  Lu6J}frF93oz;ZTw{ p\H4#   AeXk F{"3gnpG4Nwp#JQpcs`K7&  #aa^ #vn0Oh>9mlDRy, wdO<*   nIeQ- R` %I0Wc!I_W {hT@.  -pS, &`lmg,#:?ah?Ih#mZF3# ]dx,j"0g[q+=;/SdQFOx s_K8':po-9b I^"\XH?0G^m}zy{~LzpfxeR>, "kf'}H5I^r6R4E5A]j|upmmpu{~ti^U }kXD2" `h$/z#5I^r Le F<8Ukxngb`afkry~ypeYOGq^K7'M| #5H]rYL|yxz/G5Ze!vj`XTSV[bipuxwslbWLC weQ>, HT #4H]q-nZ|slhghl<3U`vh\QJFGJPX`fkmlg`VKB; }kXD1" , F$ /BWk}5xhYJ>6114:@O<gpy{n^N>2)%%(.5=DJNPNJC;4}kXD1" 7  ,?SgyqaPA3*$#%)><70*'tweQ=, %6I\o~|tgXG7(3!)3>KYfr{}uhWE3$")/4651,&"Yjz|kWC1!  !0BUhw|ywwvsmcVF5& %0=KZhsz{vjZH6& $(+,*&!$/=N_pq^J6& +<N`oy|wqlhghiie^SD5&  $0?N^ktxtk\J8'  !"!&3CTfvvcO<* &5GWeossng`ZWVX[]]XOC4&  %3CSbmsrj]L:)  )8I[l|zhT@.  !/?O[dge_WNHEEGLQSQK@3&  *9IXemnh\L:)   !.>Pbs}lXD2!  )8FQXZWPG>8458>DHHD<1% "0?O\ehdYJ9)   %4EWiy~mZG4# $1=GLMIA8/)&'*07<?<6-"  (7FS]a^UG7( +;M_p|lZG5$  *4=A@;4+#%+144/( !.=JTXWOB3%#1BTeuwhWE3$  #,3650( !&**'!  '4@JONG<.!  )8IZjwynaQ@0" $)+*%     +7?DC=4(   .=M]jtz}|ytlbUH9+   !     #-5983+!  %2@N[djllhc[RH<0$      $*--)"  '4@JSXZYUPIA9/%      ""  '1:AEFEB=71*#     $+0342/+'"    !#$"      gdalautotest-3.1.2/gcore/data/tif_webp.tif0000664000175000017500000000335613701057751017223 0ustar evenevenII*22Qf2S    N^ \T@$@HpH@B`"[@U@T@&@R!u??ܵ|?@h@v4U?xIw? q'Ȑ??_kϱ?mID 2Sf?BBjvnWCJZ"aϾ[a NLV>'bq>.ܭTIFz> @>ARצ>'(޾oYB_?pW`k?=(W?!Myk/ޤףEht>Ǟ S>q<:>LXTbS'(>PGt=09KUQ=2tEvB.u=|FͿ=Bո,V)$3=1#s> ۩>}Q7DB?d{?sޥCs?[ǿJ?sH,>)i ?k?6)>W NB>_>4޷jtVX"M<ʾMK߱b >RmLU>j@QD>n9b>?pW`k?=(W?!Myk/ޤףEht>Ǟ S>q<:>LXTbS'(>PGt=09KUQ=2tEvB.u=|FͿ=Bո,V)$3=1#s> ۩>Pll?Pll?]kF4ӽ6#  mtr@@TXAWGS 84|RIFFWEBPVP8 t*22>HJ,P@PlpO-]-m|hDB^n PL[@ NA\h'4{kY.H|ΠZ $߱Ňr^`uC}h?lO9kT8ݪ.5ȃܤ,]Вk:YK`s WlLB(5g]'z%/jCoZX4ʿL6z+ ҫ&}+9:x{ʯ3oNhi캈Jtuq.$է ( ͕pH'iQvB) Ai2|]ҭ0QRy2crG`';H21؈kUŨ$L^ܚhRlp"Q|e^kiHgdalautotest-3.1.2/gcore/data/stats_nodata_posinf_msvc.tif0000664000175000017500000000026113701057751022506 0ustar evenevenII*   S1.#INF?gdalautotest-3.1.2/gcore/data/byte.tif.gz0000664000175000017500000000067513701057751017007 0ustar evenevenQH}Q=A]E 431;t?8 *` :i&l 749C}cb757=&%V3736V)YtJQpSDX8*`d4hNيjY2Ή#fwдHV`9 - # T`@3^QҋpX+cŴ):īʐ"9n0oaȺ\2DaUYUN%iQ.pz^׹MYRJoq㱄zJ8ǤfG|1Lpέ {γqOG)}i~ m9N_O| w-_?n#}}<5kWR\fGv~jw,<ݟxd훗C-gdalautotest-3.1.2/gcore/data/float64.img0000664000175000017500000003104013701057751016664 0ustar evenevenEHFA_HEADER_TAG@R%G rootroot}XAAG RRLayer_148752378Eimg_Layer}XAA OEhfa_Layer52378Ehfa_Layer}XAA0 n0Statistics52378Esta_Statisticsrs}XAAR@o@)\_@@^@@`@@X) 6@Z<StatisticsParametersEimg_StatisticsParameters830}XAA*b*b *b*bDescriptor_TableersEdsc_TableticsParameters830}XAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830}XAAR@o@ZcZHistogramion#eersEdsc_Columntionrameters830}XAAZZHistogramParametersEimg_StatisticsParameters830}XAA ̿ܿR@o@"HEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{400:ddata,}RasterDMS,.R IMGFormatInfo78ImgFormatInfo831}XAA Z@^@`@\@`@`@a@`@`@`@Z@`@Z@`@`@Z@^@\@c@b@\@`@Z@^@b@\@d@\@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eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/vertcs_user_defined.tif0000664000175000017500000000065013701057751021440 0ustar evenevenII* kS  0 <l@A̞LAN@N@? &&# Wh )#,*#NAD27 / UTM zone 11N + EGM2008 height|NAD27|EGM2008 height|gdalautotest-3.1.2/gcore/data/idontexist.vrt0000664000175000017500000000157413701057751017647 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] 2.0000000000000000e+00, 1.0000000000000001e-01, 0.0000000000000000e+00, 4.9000000000000000e+01, 0.0000000000000000e+00, -1.0000000000000001e-01 idontexist.tif 1 gdalautotest-3.1.2/gcore/data/stefan_full_rgba.tif0000664000175000017500000027630613701057751020730 0ustar evenevenII*    RS````````````0v=6\zVv06Om." 7)#      *C%"  nn  !   !%&( !          nn% !7)3<)0?+/.'* '';4BLH^QK\LAPYJXG@PB.@?);8&32&*%$      n'' %#0!)7#.<(25%)&(+IBPn^mohzmb}o`pp\jP=G=-92$.2"2,)'#!      #  n n0-)# .#H-6C019&."@4Avn}|q}sji_q[HWA3>:(8;+;4(6:*8:+;8-59/>5-72!-1%1+))!(%       <1$(nn0--:*2 (#mYOC+,)fclvL9D4"01!02"30 +6(5B7DKASRH[ki|yw|gfvQHXDBOMC_=8D6+7, !      =?&!n=.7% _7Eyij|hqK8E3!-%"(*5 *7&.G;QVOjk_~}xtymjUOcD;J:.A2#2-)(!      <Bon J99  # -&!  ()6 %B4@LERWN`b\}vf}|rZRjNG[KAU:2=4")0!/+)        N`MBq     &&02!;(-D8LQH]SIYibnlto{ylmerlcqUKeRGa>5G7+>3!21",(         QP      s*\1  $"   &,3;,*8',H7=G;CN9LQBMe[kkcrf]paYcbXlWK\PF]E;V=/B9+C/ ...#            #        0y 3I bilvv5#'% % ,4"L6IfN^PAV& 7=BGLQVZ^aehjmnpqqrrrqponlifb^YTNHA:3+$  n  `v9KxEH$%x29dmP`FU-#&  "* 7>DJPV\afjnquxz}}{xtplga[TLD;2(    #&60Y n!4 =Sc:J77$! 4;CJQX^djotx|{wrle]TJ@5+!  $"",B l  I8  5=FNV^ekqw|}xrkbXNB6*   $ P$( q1x-0&   ?GPYaiq! " ..zskbXL?2&        5XU[+  BJR-<A MN S QQ HLD?<7572 449<? 9%+ (~zuog]RE8+  2%"J<>U7(4U!q+~sjE -! ')  #      37< : * 3$ ~{ywtpkd\RG:."   { ,:PJKODK&WWMC/%!# &1!';!4%#4!"2 '** "       $ 0 A'/ yvsqomkigda\UMC8,! n    u1V `L('  =5&k]E_OE81-."             & / a^\ZYXVTRNJC;2(    ,#\s |X8/)nLۉxx8%                 !  JHGEDCBA>;61)"   2k   W !K$71pcT8%                            643210/.,)%     r *_   lR _LRK                 !#! ! ! RMIEA>;852    &$#""!     = %U  ] [bX)           , ""~xrmga\VQLGC?;851/,)&#!   F /i    = scjn.      {uojd_ZUPLGC@<963/-*'$!  ? Hs k9v#_s ́ |J:"     {uoje`\XTPMJGDA>;852/,)&#    K   kAh$-    xsnifb_]ZWUSPNLIGDA>;741.*'#    7"e  j]IL# yuqnkihfecb`^][YVSPMJGC@<840,'#  K ~vcT2T~{xvutssrqponlkifda^[XTPLHC?:5/*$ n1Gn$1}  ~`H2#Z ~~}|{zxvtromjfc_[WRMHB<6/(! GQK X  wU=*!] }{yvspmiea\WRMG@91*" 7=l0i 35V nG2,o}{xvsplie`\WRMF@80' +Ss:n }!k  v^B6y ~|zxusqnkhea]YUQLGA:3*" nOkfb 1 9u  cTG*! }zwurpmkigec`]ZWSPMJFB=81*" @S\~=w*T    riT=<  }zwtqmjgda_\ZXVTRPMKHEC@>;951,& $*wO 3kI |cSc  ~{wtpmieb^[WTQNLIGEDB@><975310.,*($  Fi$3 n0 Wvb*V P`    ~\&    |xtqmieb^YURNJGC@=:864210.,+)'%$#"!  c;Y-#nG[ | Tw 3%    qmA=    }vpkfa]YUQMIEA=:630-+(&$#"!  m-U7H  b Yn3  z}Yz   wnf^XRMIEA=952.+(%"  yr9!-l{Ly C qE {Y"     vj_ULE?:52.+($! w r S n;= c n(]  j d+@     yl^QF<4.)%! jv d1a!]q O  %@ w LmE    teVG;0'! Kpsucr<3:nlby n $&&"  ^d0      rbRB5)  btw[G}L_uMx? ").1/*# RdL2   scSC4( 9:j tmim"6^v_IZ /pq%'6,:4G8M:P=O8F,8&6! 9vPJ    iXH9,   nZorXouIh `Mnbj] p #8EJaRj_x d|nfbz\l WbRRXdF\eisrT%       qbRC4' 3/usSmcs!X{?b %IIUu"?>M`w{v atUc^n^tb}blsmp` B Zi?     m^O@2& P] {|\Prn9U%Jg8O L~Vzvz~ + %oz oF"    yk]N?1% *7r yM|\vRj|":P>F40Ho  Wg+(   d} M d Q6     yk]N?1% :D yFf[r!)6GLP 'C I\Bunex\uAW9J-;'   (e} }aXC,  yk]M>0$ % -! '0@G g wPQ`:A-/XaaMEKXR&(   - `j~Ch_TM<#    yk\M=/" ^ _ V X M| :c*A'%78:BMX#$,*k)LLAJjNv)D     1}k{ Tq cZOQA2      xj[K;- & o  y Gy!(0)N\:Hi D>TX" /7KX W Km=fL-1QL34l   5Q`WX|/#:z?;z   5M.Vs:y"~%T]   n ZeQ\aca_VTIKH4*     |l[.8Q6=m%.UDz&F-Tn&Hz-!B WX } Yz3A n  c %. > CS =;7f:?O yz QQ 7) 0) /# 4'!/DXx w } &l I 4:]al]][kleddWT@J9=1       0<?Z(B 99Gv+)0 Jr"@o#Bs#Jn'Bm"!*o nV] | u~z}fk =VnTs inrhn v Qz %3:  nCB 472o=U65+#,"      5?PNQR]IC0Pd_ggkwi[eePOLIC82      +/DO L Xr[{ayId@l0 1E>RZnh?Z+C'7%*-@:?V]etZk Vk SPNK M[YK cYKi -+(.$-"FJ  U^ QmA>3u75LxM       9BTSJTNP:BVS^Z]lc_WePHJEQG7!  $.&+%10865668EM=L ?[$' *!HSPa M`@\L[M]YlYkRoIa +En@Q[eouXfLLPR Tg HNPMHFL7 K6 sx:B ;1 289b?\ | $*, AK31+S044x 7@_% %44HHe\vMvIi8V%2 *N[]RQN<:FK]JQ]ZJY^KIJJ>F0 "%.&+%!#+$.(+";2031'1()$/ 3/JDQM@K'3,,DEILA:W_]qPr ?N >S AQKvPn]ezkWm TMSVHJ7-GO <9?2>,?- 5`OUZ #!nhQ3Tu t{mT` KQ [W g>9"$-10Z1F\f *4GXS=&.XRJJO_K<,4I[JKQbN]TNHCDF9"  ()!.*)')+ $5*-*=/51$#*:*E4):1CE03604*9/=5IVOIT_ QPRURhWzS_}vSUAW L<SMEH!OE*'. ,& A+R@ --b sM r jLR,'&7 ,QJ=I50 *b*04r 6%D  'cMberDBG%@.G? F# MOXE/-BORIIM]ILIH'N;.'( %&&+!-'-#,!55,.%!+"+!:+/1(0/#(;/+*3* -(3)5/9;7';=99>8;?62K77661,"aM83%=)& *6 -'f iayz  %I % .   !!+N+C"WJ6>!/)w+y,yU{m+ &Xjkh@MWR,/&' %!  ,=KXNJ86JNOYNUCF,7$0$    #&*"+4(!.+:*'%1'!$0&5$"!    ( 3#.   6'70-) 1$+'(4.*%D*/#:$.)K5;1  0! % (   )*% ^ K jf x Q'G&  +C,E.C6@=UCWCSCT9?,, TMP RIE "-#&#%5+(*.!>2#, //!*-*  "  3 8-%&''#1)&*'0-8*.' & !  :U 5[mf{ 0W?N9c$%;TPsem_]xYxVnQo!2!6)p-y+ln&3  4K;eHp[%:': #"   (-8A-#"" PMP OAJ!' !"!&)#)4%+(#B4-4+  ,0/   "'%"+)' %% #'% ! /$ ' v /_ ZtF &Fc!+7EXhnxvh_TnOgEVIU(<(Z(l+pGh,d /E2S6N?d")&  $ +8%    LLt'.36Ovecedfdouz~{sG1#'b*n&Yl U,<)3(>MYc  pi=43x        " B!,V5G9H)5%* )0",B%'.)!,#  zk\OE@?%A9*(#%" -" { &,38<>>;6/' \d 7@p@gLpcs|{x xz {a%O";)a'bLd i;`&4):u&   t{9('U^M       ! "!! ! HH37>+7 !)$'!,7$"4%uh]UPPSY 1&KD+'  ( >)4%!)%!#(/6>EKOQQMG>4)#^|}p3e8"03S kyp m|yu s~vd+q.'N&_0N{T"37FSy   hiq.EC0    )% LS=##!',' ! 3$ ,$ tkebbek  ='3/ mcYPHA:51-+**+.39@HPX^bdc_WMA4( RgtgW 8]LR5d#9 #)72K 8T Gm Bl [{4_& &' 5@ VbFO:iXtJb` %% *%6(B(D,K.E-E1M2N7U8X8^>mAsEtPd&D       |ywvvwz}F+zrjaYPIB<61*" J'N#K+ 6%<AU #0g #4`EAFAp>bP]d (a"3l?lj % &9(>b "&O,[>j`-;u2Mk&% #  "   %+1JMt 5       |uojgdccehmsz#{tkcYPF>71,'# $*X#G4!=#;2[Frv !?5-'" .'  /$=#@,BAN"L  =wIIFxK|7]?HX !bBz)  -&7]v. .#J)Z(c)I4_@Ln'|->c#!! !             (!!xmbYPIC>;::=AGNW`jsz~xqi`VLB8.&  0 5$?(F5SJ\}!> ?gQLQOx>^;lDMqc$'/3Yla($$J+_-k(`'O0]9vJi!k!3R      &"$%%  vi]QF=60,)()+/4<ENYbjquwvsmf]TI>4*" c&<  +d&L'K)E*@EuJ\ `)4RNKHoQwIq2V?M`l!? +?~!C| &%'D+[,h-h,e(M4\:uM ~!W    !     $#!% !  xj[M@6-& %+3=GPYafijhc\TJ?5*! .\ Ne'4(0v- 'F'E)C;MDu?jP~ (N (#((-9O\RNsOl6QkOk_        "  &%! ~n^N?2'%-6?HPVZ]\ZTMD9/$ (D[ei)P;']"+(J,J,<?`,L(<*H"!64+p!&-DpXZRyKhR`gjNk:Q@rP /^ !.)K$;%;MMv.'=/`.b1f*`.PZ n*          n[G5%  !(.4:=>=93+" %DZT ^&B#9,P32cw y <1G*+Rxjx^}7T>mJ*N(M&B%=5MMeJ 'C-Z1f2f.VR{ R             ~lYE2"  "(.36650)" &@.O  + &524^}65a8>fxg9];fO2g,H(>$3I{Ty!' $(6]6i5h,[T| ~ 4c          ~lXD1!  #(,..+&  'D/eaf9b  /5c 1BX 9MkwC{7tO1c,D);4OLd Hs&72X2j+_L}m @          nZE2!  "%&%! -Q3o:Ve-]9j -+=CS_Q;}D/T-B*;KXu +F6n.hW O               p\H4#   -M6|2liv)U;q+#(18C|:B5S,<=ZVv G  &.Z,dN:v             s`K7&   $5x3wNl (:k } F%83_B}5G5@S]{h)R.eW 3              wdO<*    n0X1~:_ 5 +ed ~Hqqy #  %(=T.5Pa\o%3V8t:g           {hT@.  $072dx 4,UKmQ~KWux,1  (%3BAD]ktn)I 0XA}(            mZF3#  8p5{ f 4C}&% 43HzEjlD1-=C7B52Q[^oFZ4R3_x           s_K8'+D:W "4 .BOp I^($?mJezq DP>F.5GNYhY|}zy{~8Y zpf         xeR>,  #6 Wt ,X7R5I^r2=, 4U\5d  #4H]q2/c{ >j|slhghl=B67P_Yk vh\QJFGJPX`fkmlg`VKB;       }kXD1" .FT  "3G\pLaPz{od\VTUY`<6;;LXPf wi[MC<:;@GNV]aca]ULB:       q^J7&7M5b  !1EZn>.KqcVLEBBFL/(, =O* /BWk}09 xhYJ>6114:=GOW*C gpy{n^N>2)%%(.5=DJNPNJC;4       }kXD1" />  ,?SgyqaPA3*$#%) ;BOe U`ku~}qbP?1&!'.5<BFGEA:3-      q^J7& );Nbtyl\K:,"HY!.9CO[gs|~teTB1$!(/6;>><70*'   tweQ=, %6I\o~|tgXG7("-!)3>KYfr{}uhWE3$")/4651,&" Yjz|kWC1!  !0BUhw|ywwvsmcVF5& %0=KZhsz{vjZH6& $(+,*&!$/=N_pq^J6& +<N`oy|wqlhghiie^SD5&  $0?N^ktxtk\J8'  !"!&3CTfvvcO<* &5GWeossng`ZWVX[]]XOC4&  %3CSbmsrj]L:)  )8I[l|zhT@.  !/?O[dge_WNHEEGLQSQK@3&  *9IXemnh\L:)   !.>Pbs}lXD2!  )8FQXZWPG>8458>DHHD<1% "0?O\ehdYJ9)   %4EWiy~mZG4# $1=GLMIA8/)&'*07<?<6-"  (7FS]a^UG7( +;M_p|lZG5$  *4=A@;4+#%+144/( !.=JTXWOB3%#1BTeuwhWE3$  #,3650( !&**'!  '4@JONG<.!  )8IZjwynaQ@0" $)+*%     +7?DC=4(   .=M]jtz}|ytlbUH9+   !     #-5983+!  %2@N[djllhc[RH<0$      $*--)"  '4@JSXZYUPIA9/%      ""  '1:AEFEB=71*#     $+0342/+'"    !#$"      gdalautotest-3.1.2/gcore/data/epsg4326_geotiff1_1.tif0000664000175000017500000000043713701057751020702 0ustar evenevenII*S  v@f@fV@gdalautotest-3.1.2/gcore/data/md_ge_metadata.txt0000664000175000017500000000514613701057751020373 0ustar eveneven============================================================== Version Number: 2.2 ================================================================== Product Order Metadata Creation Date: 01/01/15 Product Work Order Number: 0000000 Product Order Number: 0000000 Customer Project Name: XXXXXXX Sensor Type: Satellite Sensor Name: IKONOS-2 Product Line: Geo Processing Level: Standard Geometrically Corrected Image Type: PAN/MSI Interpolation Method: Cubic Convolution Multispectral Algorithm: Projective File Format: GeoTIFF TIFF Tiled: No Bits per Pixel per Band: 8 bits per pixel Multispectral Files: RGB ============================================================== Source Image Metadata Number of Source Images: 2 Source Image ID: 00000000000000000000000000000 Product Image ID: 000 Sensor: IKONOS-2 Acquired Nominal GSD Pan Cross Scan: 0.93 meters Pan Along Scan: 1.07 meters MS Cross Scan: 3.72 meters MS Along Scan: 4.26 meters Acquisition Date/Time: 2012-06-01 14:00 GMT Percent Cloud Cover: 16 -------------------------------------------------------------- Source Image ID: 00000000000000000000000000000 Product Image ID: 001 Sensor: IKONOS-2 Acquired Nominal GSD Pan Cross Scan: 0.87 meters Pan Along Scan: 0.93 meters MS Cross Scan: 3.49 meters MS Along Scan: 3.71 meters Acquisition Date/Time: 2012-06-01 14:00 GMT Percent Cloud Cover: 6 ============================================================== Product Space Metadata Number of Image Components: 2 X Components: 1 Y Components: 1 Pixel Size X: 1.0000000000 meters Pixel Size Y: 1.0000000000 meters Product Order Map Units: meters Columns: 50 pixels Rows: 50 pixels Reference Height: 85.9509811401 meters ============================================================== Product Component Metadata Number of Components: 2 Component ID: 0000000 Product Image ID: 000 Country Code: FR Component Map Coordinates (in Map Units) UL Map X (Easting): 449755.21 meters UL Map Y (Northing): 5417778.74 meters Pixel Size X: 1.0000000000 meters Pixel Size Y: 1.0000000000 meters Percent Component Cloud Cover: 2 -------------------------------------------------------------- Component ID: 0010000 Product Image ID: 001 Country Code: FR Component Map Coordinates (in Map Units) UL Map X (Easting): 445950.21 meters UL Map Y (Northing): 5417803.74 meters Pixel Size X: 1.0000000000 meters Pixel Size Y: 1.0000000000 meters Product Order Map Units: meters Percent Component Cloud Cover: 3 ============================================================== gdalautotest-3.1.2/gcore/data/testserialization.asc0000664000175000017500000000016513701057751021160 0ustar evenevenncols 1 nrows 1 xllcorner 0.000000000000 yllcorner 0.000000000000 cellsize 1.000000000000 0 gdalautotest-3.1.2/gcore/data/pixfun_mod_r.vrt0000664000175000017500000000104513701057751020137 0ustar eveneven Magnitude mod Int32 int32.tif 1 gdalautotest-3.1.2/gcore/data/test_mosaic2.vrt0000664000175000017500000000067713701057751020054 0ustar eveneven Red ../tmp/test_mosaic2.tif 1 gdalautotest-3.1.2/gcore/data/tiled_bad_offset.tif0000664000175000017500000000025213701057751020671 0ustar evenevenII* BCDESgdalautotest-3.1.2/gcore/data/next_default_case.tif0000664000175000017500000000022313701057751021067 0ustar evenevenII* Ssgdalautotest-3.1.2/gcore/data/pixfun_phase_r.vrt0000664000175000017500000000105013701057751020454 0ustar eveneven Phase phase Float64 pixfun_imag_c.vrt 1 gdalautotest-3.1.2/gcore/data/f2r23.aux0000664000175000017500000005635413701057751016303 0ustar evenevenEHFA_HEADER_TAG@ R/<rootrootxAdRRDependentFileEimg_DependentFilexA Zf2r23.tifR0 Band_1215470050Eimg_LayerentFilexA Layer_1\ d|Descriptor_TableedValueEdsc_TabletializedValuexA #Bin_Function840#dValueEdsc_BinFunction840aluexA,@0@A@u@@@"@1@.@@Q@*@c@4@3@,@0@@@ @A@p@A@M@A@V@@5@$@b@*@$@@ @ @0@@@@6@B@I@L@@ @"@N@;@ b@@2@M@N@I@P@U@J@Q@"@=@3@ @d@"@@@A@"@&@O@ @@8@1@$@@@@&@@U@G@@$@9@@ @4@@ @D@@@"@,@@@5@@@@@"@? @"@@@@&@(@@@1@@@(@.@@@,@$@@:@ @@@@@*@@$@.@ @"@$@@@@@@@ @@@$@>@@4@@4@?&@@B@ @D@B@1@b@;@J@&@4@:@$@>@@F@<@3@?@V@@@6@@7@3@@ @@F@<@4@@@<@$@@9@2@D@ @ @,@(@C@@(@7@0@4@9@2@ @7@@ @@6@5@4@6@8@C@2@8@@@6@6@?`k@8V@O@@sK]6Q@G%nfo831,.@@ dEhfa_Layer70050Ehfa_LayerentFilexA{4096:Cdata,}RasterDMS,.D \ dDependentLayerNameEimg_DependentLayerNamexA d Eimg_NonInitializedValueEimg_NonInitializedValuexA  BFUniquek{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:LnumBins,1:*bbinLimits,}BFUnique,. ?@@@@@@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@A@A@B@B@C@C@D@D@E@E@F@F@G@G@H@H@I@I@J@J@K@K@L@L@M@M@N@N@O@O@P@@P@P@P@Q@@Q@Q@Q@R@@R@R@R@S@@S@S@S@T@@T@T@T@U@@U@U@U@V@@V@V@V@W@@W@W@W@X@@X@X@X@Y@@Y@Y@Y@Z@@Z@Z@Z@[@@[@[@[@\@@\@\@\@]@@]@]@]@^@@^@^@^@_@@_@_@_@`@ `@@`@``@`@`@`@`@a@ a@@a@`a@a@a@a@a@b@ b@@b@`b@b@b@b@b@c@ c@@c@`c@c@c@c@c@d@ d@@d@`d@d@d@d@d@e@ e@@e@`e@e@e@e@e@f@ f@@f@`f@f@f@f@f@g@ g@@g@`g@g@g@g@g@h@ h@@h@`h@h@h@h@h@i@ i@@i@`i@i@i@i@i@j@ j@@j@`j@j@j@j@j@k@ k@@k@`k@ Unique Value  Histogramion840#dValueEdsc_Columntion840aluexAd& HistogramParametersalueEimg_StatisticsParameters840xAd 0StatisticsrametersalueEsta_Statisticsarameters840xAd StatisticsParameterslueEimg_StatisticsParameters840xAEdsc_BinFunction840.{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,. BFUniquek{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:LnumBins,1:*bbinLimits,}BFUnique,. ?@@@@@@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@A@A@B@B@C@C@D@D@E@E@F@F@G@G@H@H@I@I@J@J@K@K@L@L@M@M@N@N@O@O@P@@P@P@P@Q@@Q@Q@Q@R@@R@R@R@S@@S@S@S@T@@T@T@T@U@@U@U@U@V@@V@V@V@W@@W@W@W@X@@X@X@X@Y@@Y@Y@Y@Z@@Z@Z@Z@[@@[@[@[@\@@\@\@\@]@@]@]@]@^@@^@^@^@_@@_@_@_@`@ `@@`@``@`@`@`@`@a@ a@@a@`a@a@a@a@a@b@ b@@b@`b@b@b@b@b@c@ c@@c@`c@c@c@c@c@d@ d@@d@`d@d@d@d@d@e@ e@@e@`e@e@e@e@e@f@ f@@f@`f@f@f@f@f@g@ g@@g@`g@g@g@g@g@h@ h@@h@`h@h@h@h@h@i@ i@@i@`i@i@i@i@i@j@ j@@j@`j@j@j@j@j@k@ k@@k@`k@ Unique Value$ STREET_NAMon840#dValueEdsc_Columntion840aluexA  "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  %Value_NAMon840#dValueEdsc_Columntion840aluexA"!1a_Covariance,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,.Edsc_BinFunction840.{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,. BFUniquek{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:LnumBins,1:*bbinLimits,}BFUnique,. ?@@@@@@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@A@A@B@B@C@C@D@D@E@E@F@F@G@G@H@H@I@I@J@J@K@K@L@L@M@M@N@N@O@O@P@@P@P@P@Q@@Q@Q@Q@R@@R@R@R@S@@S@S@S@T@@T@T@T@U@@U@U@U@V@@V@V@V@W@@W@W@W@X@@X@X@X@Y@@Y@Y@Y@Z@@Z@Z@Z@[@@[@[@[@\@@\@\@\@]@@]@]@]@^@@^@^@^@_@@_@_@_@`@ `@@`@``@`@`@`@`@a@ a@@a@`a@a@a@a@a@b@ b@@b@`b@b@b@b@b@c@ c@@c@`c@c@c@c@c@d@ d@@d@`d@d@d@d@d@e@ e@@e@`e@e@e@e@e@f@ f@@f@`f@f@f@f@f@g@ g@@g@`g@g@g@g@g@h@ h@@h@`h@h@h@h@h@i@ i@@i@`i@i@i@i@i@j@ j@@j@`j@j@j@j@j@k@ k@@k@`k@ Unique Value' ion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,{0:px{0:pcstring,}Emif_String,LayerNames,1:*bExcludedValues,1:x{0:pcstring,}Emif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,BinFunction,}Eimg_StatisticsParameters840,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,{0:px{0:pcstring,}Emif_String,LayerNames,1:*bExcludedValues,1:x{0:pcstring,}Emif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,BinFunction,}Eimg_StatisticsParameters840,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,.Spruce LnMountain ResortMAPLEUnknownAPPLEBYHALL COPPICEBOLTONFORESTSANBORNNOTCHBROOKWELLESWEEKS HILLELMORE MOUNTAINMOSS GLEN FALLSMANSFIELD VIEWPARTRIDGE HILLSOUTHKIDDERWORCESTERCAPE CODMOUNTAINCOTTAGE CLUBLUCE HILLBRUSH HILLBROWNSVILLESIMMONSBIRCH HILLPALISADESNEBRASKA VALLEYWINTERBIRDLOWER JUDSONSUNSETSCHOOLPARKPONDHIGHLANDPLEASANTCLIFFBEECH HILLMAINBARROWSRIVERMCALLISTERFALLS BROOKTHOMASTABER HILLSYLVAN PARKSTOWE HOLLOWSACHS PONDGILCRISTSHAW HILLHOLLOWUPPER HOLLOWMOSCOWTRAPP HILLGOLD BROOKWATERBURYWOODDEWEY HILLADAMS MILLCLARKHILLUPPER HOLLOW HILLBARNES HILLAYERS FARMSLAYTON FARMLOGGING HILLWOODLANDSTERLING GORGESKI CLUBBULL MOOSE RIDGESTERLING WOODSLINTILHACHEMLOCKBIRCHBEECHTHOMAS PASTUREUPPER SPRINGSROBINSON SPRINGSWADE PASTUREDISHEDSON WOODSCAREY FARMINNISFREESARGENTS FARMRANCH BROOKTURNER MILLHOADLEY BROOKBROOKBRANCHHARTSONSPRUCE HOLLOWCHURCHILLSUMMIT RUNCOUNTRY CLUB LPSTOWE CLUBLAPELLEPERKINSALPINE MEADOWSHORIZONSLOWER TAMARCKATWOODSWEETSERELIZABETHSGALE MEADOWSTROM FARMHIGH RIDGERIDGEALGERUPPER ALGERWEEKS HILL MEADOWSPARKERSCRIBNERUPPER JUDSONSADDLEVALEMONTDEER HILLOLD FARMFARR HILLWAITESCOVERED BRIDGEOWLS HEADWILKENSMAGOON PASTUREFOSTER FARMWATTSWARREN HILLMARSHALLTALL PINESLANG FARMHIDDEN VALLEYRAVEN HILLMERRILL HILLSEARSSULHAMBROWNSSPRINGGULCHHIGH MEADOWUPPER MEADOWRICHARDSONHOLTCHANDLER FARMPOINTSBENNETTMEADOWLINDHAUSGREY BIRCHVIEWWESTVIEW HIEGHTSDEPOTTAMARACKELMSTERLING VALLEYSPRUCE PEAKSTERLING RIDGETOLLWHITE GATESEDSON HILLLOWER MOULTONPERCY HILLALPINE VIEWNEEDLE LEAFTANSY HILLBROOKDALESTAGECOACHHOUSTON FARMRANDOLPHTINKERPUCKERDEER RUNUPPER BAIRDBAIRDNORTHWORCESTER LPBOUCHARDX ROAD 18CEMETERYPIKEMCCALL PASTURESUGAR BUSHCADY HILLCROSSPINNACLEWHITNEYDUNHAMMAPLE RUNLOWER SANBORNSINCLAIRMILLER BROOKTOWNE FARMMAYO FARMLOWER LERICHETABER RIDGESALLIESHOLMESHOLLOW VIEWSKY ACRESSUGAR HOUSEGLENBROOKBILLINGS HILLMILLLITTLE RIVER FARMARCTICFOXFIREBINGHAMWATERWORKSCOTTONBROOKSHORFIELDUPPER PINNACLEBLACK BEAR RUNOLD COUNTRYBRYANHIGH FARMSMOULTONMOUNTAINSIDEBEAR RUNgdalautotest-3.1.2/gcore/data/test3_with_mask_1bit_and_ovr.tif0000664000175000017500000000434013701057751023155 0ustar evenevenII* NST   (Z ,S.p 4<S&>>>>>   @Sgdalautotest-3.1.2/gcore/data/pixfun_inv_r.vrt0000664000175000017500000000105013701057751020150 0ustar eveneven Inverse inv Float64 float32.tif 1 gdalautotest-3.1.2/gcore/data/uint32_3.hdf0000664000175000017500000001247313701057751016751 0ustar eveneven j\ @ <F!gk<!< !j ) -K [Q 7 ; I gF<=NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0 j j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0  uint32_3.hdfCDF0.0gdalautotest-3.1.2/gcore/data/vrtinvrt.vrt0000664000175000017500000000206313701057751017345 0ustar eveneven byte.tif 1 ]]> 1 gdalautotest-3.1.2/gcore/data/hfa_completedefn_recursion.img0000664000175000017500000000037213701057751022765 0ustar evenevenEHFA_HEADER_TAG y*&{j,jj:o,,:o,{n,,:oEprj_MapProjection842,}:,:oEmif_MIFObject,,:o,,,:oEprj_MapPro:o,,:o,},:oE,,}Emif_MIFObject,,:o,:o,,:o,},:oE,,}E,{,:o,,:E,:o,,:o,},:oE,,}E,{,:o,,:E,,}{,E,:oE,,:oE,,:o,} ,:o,},:oE,,},gdalautotest-3.1.2/gcore/data/uint32_3band.vrt0000664000175000017500000000465013701057751017646 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 testvalue Gray 107 byte.tif 1 testvalueBand Gray 107 byte.tif 1 testvalueBand Gray 107 byte.tif 1 testvalueBand gdalautotest-3.1.2/gcore/data/md_re.tif0000664000175000017500000001265013701057751016507 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5ɴ7oHxbhuM?Mx_Fҡ Dg%5(VjoWSU 9 Kd&)0vt "#qjPE«q+r %ž IZX짎J*`# aq]!))l)Y DFWx|L#]xSlQUΟIW q Y$.;.EEI4$[*@әɈ; !2,Ȋ$ RuPyD: UY,.( ԲJGVWwbP.b'+ht\)UXD*^ NP2Z^q6_ IsEq +1(+B)!氅~!ϟf+؆UU[I)0S10E촻 " B~:mtj]#oZlD'qa?Y߽ ̓Ԍ^G&7StIVmҊ;9 ׆aLd\i:Bk1}sa' h=q"~km3V<˘Yȅ娞%#m|;whPt7eMq(YZle5΄XB9_P1]k$J*٩ć[q;bIvo7n'OD;侟47:}[^%YXz?Le}f,x}ogF@hBjRIm)$I$uxxwvf>μs۝^zCJR>Hn6$< < ~oJiɃ"_f6ہFPDsrT:}"08,!PUe$'taE?-'o8Ki'f]*h! <8n$Mļ"͡>!1O8hQ!L:.xE$]{9p;tAITq'I" D#AU:8i?^seq@ @H"Ȃ#yzY3rhJßd?]*O2xN=v!Q6bXקʊ P E|BE(~_z厥s`)?^HGێz׫etASofFF> @5$gr1!ۖ왾vq$+!% sRLjf*<1&OhJq{=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 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/pixfun_intensity_c.vrt0000664000175000017500000000105413701057751021367 0ustar eveneven Intensity intensity CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/negative_scaley.tif0000664000175000017500000000054713701057751020565 0ustar evenevenII*fS   JN@N@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kgdalautotest-3.1.2/gcore/data/ycbcr_42_lzw_optimized.tif0000664000175000017500000000547213701057751022014 0ustar evenevenII*2 P8A8T, !( GXx3&S9p+Ϧ [;El.)a=c:E!2'N#iKCyd3 c qe2 '9d6L&BŌ^5F2dh8 X9ѩPT*K@4Nig5'3\p8Nf)ЪW<&f2Φcc)Ńk(7'J Abb?ƃw7v%Z)k0 s ## 6ۆ:9lɺ Bhj0H0:C/C<88 b/7C* @-5 #X> 8 4O29 #B(64 h04̣ 6C(:/-B2i.~5 X.ȱ  6 0 c83701"( ; 3 "4,&-x, gQzFɬ\-@34Щ5C2H2@8n0$n-  ",#K!?4`â6 hX8<%,crӶ 𭦎vD`9yxDB U-. 2"/ Kx0 ⸖," @⨤:;x3/-0"7 !*@㐬> Cc /&0 Lg q |?l7X!pq T idH;D@P;Q*a`+BHHa. 64~C !6,_ aӄ !2PX L-@!bPJH$ L%DЈ A?%Di a4, *wX:IBha Àn!:pHoa)5PBA$4!>ª%,|'JN0D nHÈW5@"o `0r(AP8 Cs%Bc@]#O|ABD60v6"h~-*\0*ѐbG)* B|8@^ w <!Q[at(8U4( JjtpA@!D=0nA*>`ȋ.`2) ":"*[b@'B$H0xWXGФBHM !60E&q-I ZDPGNX3{8= T9p0< ="Epb4z`B (9&tVXRpKDX8: ɻ[ A8! <PJwD;Ќ-+bfh~HŀABA<p? :]LBe BaY$;xz"x\\ThP"aXEy!9pQ 012xY %Hoab"x <ZXaC@(^ (?o45ēC r A w&DЀ8D>a"xA<^tLa 5JF 89 vuA-(qA(͘BG`!xK b,AQ0 af`n G;V 8+`0d@ N4`B| +n-P 2PWDX5e D\!<.B=C@DSV 8WB$Ae4%@J gAx) AK !8<I1+$!A=ОCX]+80"HL8@D` h"0!87YD9(}axBϏDcgaEf 4@A( `CdU0fP ̈i>*6`@v$* a!0͚ @!@ V(@AN@NJΈb@2@ lA @ @ xȮ < a8 @ˎa ̷ a( p T VXR@`H<00 * "  CLE/gdalautotest-3.1.2/gcore/data/utmsmall.img0000664000175000017500000006271313701057751017256 0ustar evenevenEHFA_HEADER_TAG@R{YH rootrootXAAH RRLayer_148752538Eimg_LayerXAAdd@@JEhfa_Layer52538Ehfa_LayerXAA0 Ln0Statistics52538Esta_StatisticsrsXAA @o@g@Tc@b@o@ٶK@Z<StatisticsParametersEimg_StatisticsParameters830XAATT ĒTԒTDescriptor_TableersEdsc_TableticsParameters830XAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830XAAo@TZHistogramion#eersEdsc_Columntionrameters830XAANZZHistogramParametersEimg_StatisticsParameters830XAANN NNo@2NVHEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{4096:Cdata,}RasterDMS,.R IMGFormatInfo38ImgFormatInfo831XAA@k{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{ksss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{s{ksc{skscZk{cs{Zcccc{kskk{kssk{Zsŭc{sc{{ssckk{ckkcsccZcsZss{{{sν{s{{kssksc{cck{kcccsZ{sksskss{s{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{ccs{kksks{{k{kskscskkssks{{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{k{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{c{{k{ckksskckZ{ksss{ss{ksssk{ccsccs{c{ssc{kkcs{s{{skk{֜ŽkZkskZc{sss{{sc{kckk{{ssŵ{{νΜ凜{kkkscscckssZ{s{{k{{{Zk{kkńŵsc{潭sZcsZcckccksZs{skskssֵŭΜΜ{cs{Jsc{ckkskksŽ{εŵν΄k{{k{k{RccZŭŜΥε浌ŭ{{skkkkksckZsccέޭ޵ֵ֥s{sZcsZkccZckcc{ε朔ŭŽŵk{{{kcRkkkcckŭŭ֥ޜZckcRss޽業{Z{k{ŽŭŌŭc{{{{sR{֜{s{{{{{{Zc楜{έ{c{εkΥsks{{֔ŔskޜŔs{ﭥ{֔{{ťs{Z{ŵŵŌťŽŌ{{ssŌsνť挥ť{ν{潔޽朔Υ{攔ք{Rkŵޔsks{ZŽ楔ޭs歔ť{k{kscsc{ť֜{J{c{Rcs{kΥέŔťŵskk{skscRcJk{sέ{Ŝ֌޽έk{{Rk{kZ{Rťŭνks{sskck{ֵŜsZŭkss{{s{c{ŌޥŜsk歜֜{{Ŝ{s{k{{ckkŜ浌c潥ޔޔs{s{c{ks{s{s{εέ{{ssss{{kskkュ{ssތkckckcsksks{{ss{{Ό{sŽ歄ksckkk{{{{sks{{ťck{޵޽kksssssc{kc{ccsބŌcsޥŭssR{c{sZks{ss{kcs{kZ{ޔޔkޥ{{kkskskZ{sZksssZRk{kc{{ńs{k潌֭csZsc{{ckcs{c{skRk{RZsťŭ{ssŽνksRssssk{{sksc{{kRBνŽ{{ťŭ޵JkJ{kRZksRkkss֭kcŜksέZk:ccRs{kskkscΥŌc{s{ŽBBk)ZJcZsc{ksck{k{{{{ccﵭss{{ŭ{RJsJkc)kkJcR{cksssckZcRRksk{{{ΌZcZJ:JRsJRscs{ZR{Z{J{kk挭k{{ތk{kBsc{cZZcks{ck{kZkkZkJsk֜s{kŵΔks:1{ZcRBJBRcc{sZsJcJsZcޥsZ・潭cscュB:!ZJZ{kkZRcskkŵJkB{cZcέ{ֽΔŭΥJs{BJBRkRkJ:BskRBscZBcJkZ{{ť浜s޵ZRc{BRZRkZZJscZ{s{{JZsss{s{{ZkZss{Ό{νs凜sŜŌֵέ֭s{ŔεŽέ֭ΔŵέńBΥννΜk{ccťΔŽޜZkŭ{ﵔťsޥc{RcֵZֽsέέ{֔極ť{kέ޽{ޥΥε{Δ楥ޥŜŭֵ޽ŽŭޥεkֽεΔŽŵ֥ťޭŜŽŭŌkΌŔ޽ŭ֭ΜksޭΔ{Ό{Ŝ{ޭŭŵŵޭ֔Ŝ{έބεŵŜkޔŽťsֵޥֽs{ŽΔΜ΄省ΜŌ攜εޭńŽ֭{Ό޽֭sֵŔ޵޽֔ŵεֽŭ֌掠c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BZk֥kJkss{{cs{ZBR:J:BBZs{{{skZRc1J:ZZBJJ)BJB:ckZJRsΔssBk{sBJ1J:BJ:JRBRkscR1{{Z{{sBRRBB1BRRJ:Z{ŭ:{kRRsksRJJBB1J)JZkRRRZJsRRZcs{kcRR1BJBB{kksZZ{{RsJ{cZJRZ)BBBsJBRBZRkZkRJBZBBBBcsckJJRJJcJ{sskkkc)JBZskRRJ1ZsZ:ssJRJZ{kZ{Zk{{{ZRR1ccBkZZB1ssskZkR{:RRZks{ZkccsZ:k1{J:1ksJZ{k{JZ{:skccRZZkkBJBZ:R1:ZcccsJRRskk:{sscRZ{fKPK^RasterDMS52538Edms_StateXAAfK *:KXAAJL.LcMap_Info52538Eprj_MapInfoXAA6LUTMBLALAZLCA#LArLN@N@LmetersKMMProjection52538Eprj_ProParametersXAAM'MUTM 7M?M MClarke 1866TXA333?XA^s{?fOMXALkN+Datumtion52538Eprj_DatumametersXAAsNNAD27N Nnadcon.dat @7@=@G@@Q@X@^@@f@ h@j@q@v@|@@@@h@@@P@@0{@u@Pu@q@ l@m@e@c@@Z@@:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/1bit_2bands.tif0000664000175000017500000000063613701057751017512 0ustar evenevenII*    RSUUZUVjUUUUUZUUUUUUVUUYUVZiUUUVZiUUUUUVUUUUUUZUYUZUVjUUZUVjUUUUUZUUUUUUVUUYUVZiUUUVZiUUUUUVUUUUUUZUYUZUVjUUZUVjUUUUUZUUUUUUVUUYUVZiUUUVZiUUUUUVUUUUUUZUYUZUVjUUZUVjUUUUUZUUUUUUVUUYUVZiUUUVZiUUUUUVUUUUUUZUYUZUVjgdalautotest-3.1.2/gcore/data/classictiff_one_block_long.tif0000664000175000017500000000063613701057751022746 0ustar evenevenII* BCDESsgdalautotest-3.1.2/gcore/data/float32.tif0000664000175000017500000000362013701057751016670 0ustar evenevenII*HBBCBCC CCCCBCBCCBBBCCBCBBCB%CB CBBBBCBCCCBCBC CCBB CB CBCBBCCBBBBBCCBBBCCBBBBBBBCBB CBCCCC CCCBBBBCB%CBCBBCCB=C-C-CCCBCBBCBCCBBBCCNCBEC-CC C CCBCBB CCCBCBC-CBBCBCBCB CBBBCBBBBBB5CBBBBCBBCBCCBBCBBBBCBBB C CB CBBBBCBBBBBCBBBCCCCCBBCBBCBBB C-CBBBBBBBBBB CBBBBBB-CBBBBBCBB-CCBBBBBBB=C-CBBBBB CB-C CCCCBBBBBBCB CBCBBCBC C CB CBBBBBBBBBBBBCBCBC%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBB @S  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/mfftest.r000000664000175000017500000000004413701057751016702 0ustar eveneven?@@@@gdalautotest-3.1.2/gcore/data/scanline_more_than_2GB.tif0000664000175000017500000000024013701057751021673 0ustar evenevenII* RSkkgdalautotest-3.1.2/gcore/data/pixfun_intensity_r.vrt0000664000175000017500000000106013701057751021403 0ustar eveneven Intensity intensity Float32 float32.tif 1 gdalautotest-3.1.2/gcore/data/testzip.zip0000664000175000017500000001240613701057751017142 0ustar evenevenPK )@subdir/UT ײOײOux PK .@subdir/subdir/UT ײOײOux PK.@psubdir/subdir/uint16.tifUT ײOײOux }S=K1[SbFmD;Qa  Z3V&喋ݕX\y#, N^f׵qd&36m22dIXr-XD5#ï5fqXR7Oq:Fr*_3Dq#ѭy~}qCom {Nr~v\_&;PK+@#!D^subdir/subdir/test_rpc.txtUT ײOײOux ;o\7 .8wrG&B 'E~~y%-qÇۗW/Yn]ӧ|;|ޏ _oI[oOwo~~-m=Onޝ:.vAvLSq>noM3]p[ #oDnH̠ "FHq)>!T)B%" ,$|y5 4W(edH`&@٣L}UuD2$Sƹpv.Hϱ7$sͽBT ڒaVc y}R)ZY-c^v/s2eLyvtt%;D9+aЌѢkHSu5b2D(;5Zm9nVW'c'_Aޫ)//)wqeP"l+G (]6޸o-3'o B-3Jp JCˈ9$L Qp1<يʯ>4H #R*ɱ>}TlzyA XJ@t.H% ”K9$DtIAE;\ے1CR6. e>-W¼$c薣Q5vSƢ]// t-S[TB U1BPA~3K0&T&PxbܱAmcqw{ii}DtfcivZ1 ZL`d;tyl]!]悷} -noM3]p[ #oDnH̠ "FHq)>!T)B%" ,$|y5 4W(edH`&@٣L}UuD2$Sƹpv.Hϱ7$sͽBT ڒaVc y}R)ZY-c^v/s2eLyvtt%;D9+aЌѢkHSu5b2D(;5Zm9nVW'c'_Aޫ)//)wqeP"l+G (]6޸o-3'o B-3Jp JCˈ9$L Qp1<يʯ>4H #R*ɱ>}TlzyA XJ@t.H% ”K9$DtIAE;\ے1CR6. e>-W¼$c薣Q5vSƢ]// t-S[TB U1BPA~3K0&T&PxbܱAmcqw{ii}DtfcivZ1 ZL`d;tyl]!]悷} -noM3]p[ #oDnH̠ "FHq)>!T)B%" ,$|y5 4W(edH`&@٣L}UuD2$Sƹpv.Hϱ7$sͽBT ڒaVc y}R)ZY-c^v/s2eLyvtt%;D9+aЌѢkHSu5b2D(;5Zm9nVW'c'_Aޫ)//)wqeP"l+G (]6޸o-3'o B-3Jp JCˈ9$L Qp1<يʯ>4H #R*ɱ>}TlzyA XJ@t.H% ”K9$DtIAE;\ے1CR6. e>-W¼$c薣Q5vSƢ]// t-S[TB U1BPA~3K0&T&PxbܱAmcqw{ii}DtfcivZ1 ZL`d;tyl]!]悷} -*_3Dq#ѭy~}qCom {Nr~v\_&;PK )@Asubdir/UTײOux PK .@AAsubdir/subdir/UTײOux PK.@psubdir/subdir/uint16.tifUTײOux PK+@#!D^subdir/subdir/test_rpc.txtUTײOux PK)@#!D^Usubdir/test_rpc.txtUTײOux PK@#!D^  test_rpc.txtUTײOux PK@p puint16.tifUTײOux PKZgdalautotest-3.1.2/gcore/data/3376.tif0000664000175000017500000011037713701057751016030 0ustar evenevenII*BvWjŐUkYGb;XC`vbacdj^QOV _{_^gFaYZ]\[^cgkhfboVkXLbvvц}wlkn_sRDuvggfXNAWVt6T5sJwKOc_eYe]SEPXtqhU^STmRkC\>YKf(c~"_ym ]wA~ywvaS_]hbq̂]hjjjls^gTCZYIOilFg]_a^[_dehjkkg۵֖Uotȁhc-niP-n,m^YeOOsRshgdbQPHR#a$b[e[[XV_E^^BPlO7t[n{T]N1l#`|CDmNVEL؀kiaQtgg^PzilehmdZ\acHPFiade_Y_eediqu}҉١%Xnt?w{GZ@T4u-nhgoE[7u={W[edcZL[MJ3qnJ\@~OYSS8x;{adZpjN"_yn_F&^x[v_N[ptq͐E?}^uYEvqwqk\k>T`bdbb^ZC\·FZfga[`edbgmt{ϋ}ʊ 7MdSs`lcAO9z6w$emry6tsiǸNgcdecfVdiowbgf`[QFIUZd|`]kXi@{Vqm+c} XtsC Ki@Nm7u[HNr1n=|`s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ddcccccbbbadfhjiid^_`bdglqtpqwxwu~\{mc\UPcNDWQkpfҍyT7vWoH9$DĆMSXn\_Uf_o4ZDHFȁFxD^p i>x<곭aQmx<]yXVEfkyblͮziwہiedb`abceedddeeedddddcccbcddedcefb]elihihgggffiofrknh`WRvomquJKXM}fiD|HJ?YQ ݛknw;}X`T"}A{裞\ԁpFxll"ێav,rdc΂Ј_D輛Wxltmc{umarāhgdccddegffeffffheeeddddcba``__ac_Zhslddfd]WWVVXmouuzbEV}QXl_MXQwwnsɫT{5zSA#-ЊΑCK ";ۗmS$2׏ww0Uф吾F菬p_Z}k7e-{`[뷴=ٯgDWlkiwihedcddefeefeeeegggffddcccbbaaace_[agc`bccba\W\`lcm|tu[J}7YZmzocԝ~妐D1eCxmo+Lx}}:󲗫koz;DPM`gS}Rq:ăS2=FM{9u_&BᡨDGdӏ`S"dgOOLÔ\7ծC[_cnqvjifedeeeeefeeeegggffffdccccceeeghaZ[[[[^_chlc[bjlCGcQxVq}wJFė}ydR%`˜{W3{ Nµr4?몚l]zTǫwxLrIH YTBCŋXFLp䴋T.ȭ~V+صbDȑрh̸tb|vv=H[\ct́kjifeeeeeeeeeegffffffffccceeeeefgc__]]]^^`bhc]bfoU2mbQUSaZwjoБ{N:եnQ+⾀]9ȩfL%`TwMl[$0|Wk/ոϬ×èvhE=URݩYF_ϧۺǫƝ5N&3qdU1 hGĄPܳtlm^^MtlC-#A'Mo!Gk?hlkjiffeeedddffffffffffeeeeeedefggfedba``^`aeb```tn'TOkClE{OYXdqRҚcmq߽hk>n\o֩s'ؔqطM*b}Z-kve0qsj:hLJpFdGyoL`UآRn-aPi>NFcQlH M|qu 3V%Tyjihfeeeeeddddffffffffffccccbbbccccaa^`achXgdZPOH̀riq{٬ֈjyU}VÖƑhazW{[kˊpI]%!N_(@Yw{Hɰ 䢿֝e^徖[೥Wfq|sJpwFyi]ǃ{.3exvO70$PvCg^^8rqY}|3Vgggdddddeddddffeefffgfdcccbaaaa___]]]`cfsRleRB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ÂQa^o&io1Ypp8oWWɓЂ^A.$M{yHVȗj^}UϔoȉeќpFYZLسlӰh{jrmN6qFwV.\wSِkT3ǯҜ%ԇȁyXgFfzYnNϤ}mvpK}zoNz\oT}gߤq`r^w<'x_nQuZfIO4訌E*̒viN͛~sXxb[G`RkXzfr[kSgOmT\C΋r`@lJ"znqBN?^\em7O[>Hs~7WXad[Z}u0GcW㡁zFtRuNsGآz`M:엍vfO<[BdGT4bAs[wZed_^_WmJTDL(1`BCDE:SZ 4  LdIMAGINE TIFF Support Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01EDT $ujj)A[1t@uj \@IMAGINE GeoTIFF Support ERDAS IMAGINE 2016 16.0.0.75 Geocoding information not available Projection Name = Unknown Units = meters GeoTIFF Units = meters|gdalautotest-3.1.2/gcore/data/nan32_nodata_nan_to_zero.vrt0000664000175000017500000000310513701057751022311 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32631"]] 4.0000000000000000e+05, 1.0000000000000000e+00, 0.0000000000000000e+00, 5.0000000000000000e+06, 0.0000000000000000e+00, -1.0000000000000000e+00 Area 0 Gray nan32_nodata.tif 1 nan gdalautotest-3.1.2/gcore/data/float32.hdr0000664000175000017500000000036313701057751016664 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 4 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/byte_zstd_corrupted.tif0000664000175000017500000000110013701057751021503 0ustar evenevenII*PfS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|(/XnW"*}:/D_]J$(*:%x 7\Y>_Le ]#/ϻ^{D"#[N*sÎ^صȌxVbg8[k8-*DCѢȘhԵm VuHYWms#뺌 <=0@J!iM ` "C 8'Qwp$egdalautotest-3.1.2/gcore/data/float16.tif0000664000175000017500000000362013701057751016672 0ustar evenevenII*HVW X0W X X`X X X XV XV X XVW0WXX0W XVWX0W(Y0W`XVWW0V XW X X X0VX0W X`X XW0W`XV`X0W XWV X X0W0WV0WVX XWW0W X XW0WW0WWV0WXV0W`X0W X XX X`X X X0W0W0WWXW(YW XVV XXWYhYhYXX0WXWV X0W XX0VW0W X XpZV(ZhYX`X`X X0V XW0W`X X X0V XW XhYW0WXWX0WXW`XWV0W X0WV0W0VW0VY0VVW0W X0WW X0W X XWW X0V0W0VW X0W0WV`X`X0V`X0V0WWV XV0WV0WW XWVW X X X X XW0V XWVX0V0WW`XhYWVWWWVWWWV`XWW0W0WUVhYVVVV0V XW0WhYX0VWWVW0VVYhYV0W0WV0V`XVhY`XX X XVW0V0V0W0V X0V`X0WXW0V XWX`X`XV`XUV0WVU0VW0W0W0WWWX0WX0V X(YXXWVVV0W`X0V0W0V0VV0W X0WUW0WYhY`X`X(Y0W XU0V0WU0V0VV0V X0VV X XXY`XhYW X0V0WWT0W0VW`XX X(Y`X`X0VhY[[pZ XV`XWX X(Y(YX`X XWVWVWYYXXXXXY XX0W XVVVVV0W0VVCCCBBCBBCBBB C-CBBBBBBBBBB CBBBBBB-CBBBBBCBB-CCBBBBBBB=C-CBBBBB CB-C CCCCBBBBBBCB CBCBBCBC C CB CBBBBBBBBBBBBCBCBC%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBB S  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/unknown_compression.tif0000664000175000017500000000022213701057751021531 0ustar evenevenII* Sgdalautotest-3.1.2/gcore/data/int32_3.hdf0000664000175000017500000001247213701057751016563 0ustar eveneven j\ @ <F!gk<!< !j ) -K [Q 7 ; I gF<<NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0 j j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0  int32_3.hdfCDF0.0gdalautotest-3.1.2/gcore/data/int32.vrt0000664000175000017500000000253113701057751016406 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray int32.tif 1 gdalautotest-3.1.2/gcore/data/byte.img0000664000175000017500000002346013701057751016357 0ustar evenevenEHFA_HEADER_TAG@RG rootrootBXAAG RRLayer_148752260Eimg_LayerBXAA_ Ehfa_Layer52260Ehfa_LayerBXAA0 n0Statistics52260Esta_StatisticsrsBXAAR@o@)\_@^@`@@X) 6@Z<StatisticsParametersEimg_StatisticsParameters830BXAAMM MMDescriptor_TableersEdsc_TableticsParameters830BXAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830BXAAo@sMZHistogramion#eersEdsc_Columntionrameters830BXAAZZHistogramParametersEimg_StatisticsParameters830BXAAaLaL aL bLo@*bLHEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{400:Cdata,}RasterDMS,.R IMGFormatInfo60ImgFormatInfo831BXAAk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckf 4RasterDMS52260Edms_StateBXAA  BXAA_ cMap_Info52260Eprj_MapInfoBXAA UTM ALA ALA N@N@ meters PvProjection52260Eprj_ProParametersBXAAUTM ? $Clarke 1866TXA333?XA^s{?fOMXA +Datumtion52260Eprj_DatumametersBXAANAD27 nadcon.dat?@B@L@O@P@R@?@8@(@@(@@@?@??:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/byte.tgz0000664000175000017500000000106413701057751016403 0ustar evenevenʂK퓿Q&" VZh6͉vNppy+D-"eJ3,r9Y+泼df}w7y;\>{b1fN=F^c7`h:Yz&C^45ד?lo_3c xq1FFœ0 ̄QpQ8p(`Ia} ދT8%l~ŢOz#d-b2.+`yXUӪ`cǺE e|m.9^1+e(2í&sE}I[QN1[0 )ak_&HY=;ϋP\ugI/ƜJjycjjgfVߨ\X|̽Z~}46y'm9/Yl ֨[ǣqiϷGd1 PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray uint32.tif 1 gdalautotest-3.1.2/gcore/data/byte_inconsistent_georef.tif0000664000175000017500000000134013701057751022505 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS R jN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/bigtiff_one_strip_be_long8.tif0000664000175000017500000000037513701057751022673 0ustar evenevenMM+ Ssgdalautotest-3.1.2/gcore/data/byte_nogeoref.tab0000664000175000017500000000053613701057751020234 0ustar eveneven!table !version 300 !charset WindowsLatin1 Definition Table File "HP.TIF" Type "RASTER" (400000,1200000) (0,4000) Label "Pt 1", (500000,1200000) (4000,4000) Label "Pt 2", (500000,1300000) (4000,0) Label "Pt 3", (400000,1300000) (0,0) Label "Pt 4" CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000, -100000 Units "m" gdalautotest-3.1.2/gcore/data/md_ov.tif0000664000175000017500000001265013701057751016525 0ustar evenevenII*RxoeHh^Kn$s霛R-Qo?^ERIQ(ɲd8q.vP`X>e{=i؟3%gM |Crl1~]N%Qih?vmDZyEA|=մ@ `5ɴ7oHxbhuM?Mx_Fҡ Dg%5(VjoWSU 9 Kd&)0vt "#qjPE«q+r %ž IZX짎J*`# aq]!))l)Y DFWx|L#]xSlQUΟIW q Y$.;.EEI4$[*@әɈ; !2,Ȋ$ RuPyD: UY,.( ԲJGVWwbP.b'+ht\)UXD*^ NP2Z^q6_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^!D#<`?m'ibkZ{aaoedyl.4Ϣon;rچD8?{k1Խ&TeE\:tsP$8eǼ@x!>$ fe $ɎǨmMٝ|Q]y07 5]s-whBCrhF1E)Z2WO pq׷nw%X>׏;VS|:7Fu%ouXp^)N[4?<7xUMgwGb/IK85`Z=o_@Q5٬ʭ1'5D3F1Mҍ{ ';]/5LN-_?*|?C0H2K=X]ɝ+٨*+dSkWգ86C+TوRN)傞@Zx:Y]KQ;g0dBer_uwh4(o>-ѹN I$EEgq\@ R$I۬f> yd :t5CO8̛"&oLoJ (7)0dARGRf5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/flt_min.tif0000664000175000017500000000044613701057751017051 0ustar evenevenII* S  1.17549435082228751e-38???gdalautotest-3.1.2/gcore/data/many_blocks_truncated.tif0000664000175000017500000000024713701057751021772 0ustar evenevenII* =Sx+ttgdalautotest-3.1.2/gcore/data/pixfun_log10_r.vrt0000664000175000017500000000105013701057751020276 0ustar eveneven Log10 log10 Float32 float32.tif 1 gdalautotest-3.1.2/gcore/data/zackthecat_corrupted.tif0000664000175000017500000002010213701057751021620 0ustar evenevenMM*($v8OU0Ss=)]6^1 Sւ Pt[FgNx4RUF՟%@s߷UUW-4ZPJ:+h|qPk/.2ݶ ~Χ7OKr*u|ֳmt {1<P֩j,⫻&PPo1S+5= 8gIt2ϨJIFMDjVMI ;QT ;]w MNH9MQR@Nw9,S(ف Oqd*Q2H:֚&&p)!H;`c83l2('lNHX Z^Sz>ee?#?4(;qkqr?V+c\-%HY3[ٵ@ &;Ɋhr^qm61? {ܰ='?_^&5-BYAP>G} tS`NJ7\R⺱GlT[ndkIzV>K033pA=N\ SRvnBnAi"FGCu?t՛7*@;Us}| Bf<{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@E q;<???2dGLt>cT[֘g)(w*u|5zЀ(BCDE    * q' q'     ' .(00-(,,39I>36E7,,@W@ELNRSR1=Z`YP`IPRO %%O4,44OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO %%O4,44OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOD   }!1AQa"q2#BR3br $%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzy!1AQq"2aB3R#br$4CS %&'()*56789:DEFGHIJTUVWXYZcdefghijstuvwxyzy!1AQq"2aB3R#br$4CS %&'()*56789:DEFGHIJTUVWXYZcdefghijstuvwxyzT ''t'gdalautotest-3.1.2/gcore/data/zero.bin.zip.zip0000664000175000017500000002765713701057751020005 0ustar evenevenPKy:D=z/ J zero.bin.zipUT RRux 1;Q~u66HB S2Ic 1*v7i .\ FJ㼈Ne:) ,)P%rq 8gdalautotest-3.1.2/gcore/data/dstsize_larger_than_source.tif0000664000175000017500000000172113701057751023031 0ustar evenevenII* 4 =S & > n1111111111._#T;kI@;kI@dtAͦ%LA# c )#WGS 84 / UTM zone 11N|WGS 84|x1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g /gPx1 g ?pqgdalautotest-3.1.2/gcore/data/citation_mixedcase.tif0000664000175000017500000000242313701057751021252 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  R 9[5]Ac%A??E E#   QIMAGINE GeoTIFF Support Copyright 1991 - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved @(#)$RCSfile: egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST $ Projection Name = NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601 Units = international_FeeT GeoTIFF Units = international_FeeT|NAD83(HARN)|IMAGINE GeoTIFF Support Copyright 1991 - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved @(#)$RCSfile: egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST $ State Plane Zone -3601 NAD = HARN|gdalautotest-3.1.2/gcore/data/3376.aux0000664000175000017500000005070013701057751016034 0ustar evenevenEHFA_HEADER_TAG@# R ErootrootAcRRDependentFileEimg_DependentFileA Z3376.tifn R0 Layer_170373667Eimg_LayerentFileA  nn sDependentLayerNameEimg_DependentLayerNameA{Layer_2n R?Layer_370373667Eimg_LayerentFileAmJCEhfa_Layer73667Ehfa_LayerentFileA{262144:Cdata,}RasterDMS,.p9DependentLayerNameEimg_DependentLayerNameAALayer_3 LcMap_InfoLayerNameEprj_MapInfotLayerNameA$Hotine Oblique Mercator (Variant A)@i&k)A\0AXQ*ȵ@-[1t@uj \@EmetersI cProjectionyerNameEprj_ProParametersNameAF$Hotine Oblique Mercator (Variant A) qt?45T?A9u@9RF߱?Wjrg?b jGRS 1980@TXA?XA@k{?˯MXAL[DatumtionyerNameEprj_DatumametersNameA GDM 2000.nqn Map_InfoLayerNameEprj_MapInfotLayerNameA$Hotine Oblique Mercator (Variant A)"@i&k)A:\0AXQ*ȵ@R[1t@uj \@jmetersnn ProjectionyerNameEprj_ProParametersNameAF$ Hotine Oblique Mercator (Variant A) 7 qt?45T?A9u@9RF߱?Wjrg? GRS 1980@TXA?XA@k{?˯MXA GDM 2000   831,.mJn@ cEhfa_Layer73667Ehfa_LayerentFileA{262144:Cdata,}RasterDMS,.D Ic^ DependentLayerNameEimg_DependentLayerNameAf Layer_1cR Layer_270373667Eimg_LayerentFileAmJAn Ehfa_Layer73667Ehfa_LayerentFileA{262144:Cdata,}RasterDMS,.LHc  Descriptor_TableeEdsc_TableametersNameA #Bin_Function#eeEdsc_BinFunctionsNameAo@ :Histogramion#eeEdsc_ColumntionsNameA cFHistogramParametersEimg_StatisticsParameters830Ao@Hc0StatisticsrametersEsta_Statisticsarameters830Ao@XA׈a@]@@Y@ZI@c>FStatisticsParametersEimg_StatisticsParameters830Ao@q0n  Descriptor_TableeEdsc_TableametersNameA#Bin_Function#eeEdsc_BinFunctionsNameAo@"Histogramion#eeEdsc_ColumntionsNameA,n FHistogramParametersEimg_StatisticsParameters830Ao@0n v0StatisticsrametersEsta_Statisticsarameters830Ao@ ͛c@d@e@|sC@n &FStatisticsParametersEimg_StatisticsParameters830Ao@o@5o@ ,.q [DatumtionyerNameEprj_DatumametersNameAsMap_InfoLayerNameEprj_MapInfotLayerNameA$Hotine Oblique Mercator (Variant A)$@i&k)A<\0AXQ*ȵ@T[1t@uj \@lmetersp4ProjectionyerNameEprj_ProParametersNameAF$ Hotine Oblique Mercator (Variant A) 9qt?45T?A9u@9RF߱?Wjrg? GRS 1980@TXA?XA@k{?˯MXAs:[DatumtionyerNameEprj_DatumametersNameA BGDM 2000U,@@?@@???@@???@@?@@?@@@@@@?@@@@@@"@@@@@@@ @@ @?@@ @"@@@@ @"@@"@"@@@,@"@"@*@3@"@6@*@2@*@.@9@0@0@1@2@6@9@3@:@@@A@>@@@B@F@A@H@N@K@W@@S@Z@V@Y@@Z@`@e@l@k@n@`g@b@[@^@^@U@T@S@K@P@K@J@J@L@I@F@K@I@F@C@A@@@G@D@A@B@E@>@B@A@A@5@>@B@=@A@@@B@=@B@=@4@=@@@>@A@9@<@@@@@7@6@9@:@:@A@@@?@A@B@<@G@E@D@B@D@B@D@D@B@K@?@B@C@A@G@>@F@D@G@F@E@D@A@M@@@F@F@D@H@I@E@@@C@@@A@E@A@C@@@;@?@?@;@;@:@8@9@9@>@5@;@3@6@>@9@5@1@,@1@8@4@3@2@*@$@2@7@0@.@5@*@&@(@"@&@1@@"@ @(@2@$@ @@"@@ @@@ @@@^@c ion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSk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@8@0@$@.@(@@*@"@2@$@&@"@@@,@(@@@@@ @ @ @@@*@$@@S@x54Histogramion#eeEdsc_ColumntionsNameA4>FHistogramParametersEimg_StatisticsParameters830Ax>?x?0StatisticsrametersEsta_Statisticsarameters830Ao@8b}7c@@f@`h@682YwL@>(@FStatisticsParametersEimg_StatisticsParameters830Ao@;AD c@MRRDInfoList3667Eimg_RRDInfoListeA @ErdasBino3 AA3376.rrd(:Layer_1:_ss_2_)3A7%n@cA=RRDNamesList667Eimg_RRDNamesListA AErdasBino3AA3376.rrd(:Layer_1:_ss_2_)B n xBMRRDInfoList3667Eimg_RRDInfoListeA BErdasBino3BB3376.rrd(:Layer_2:_ss_2_)B7%An EC=RRDNamesList667Eimg_RRDNamesListA MCErdasBino3`ChC3376.rrd(:Layer_2:_ss_2_)ODDMRRDInfoList3667Eimg_RRDInfoListeA DErdasBino3D%D3376.rrd(:Layer_3:_ss_2_)GD7%CD=RRDNamesList667Eimg_RRDNamesListA DErdasBino3DD3376.rrd(:Layer_3:_ss_2_){1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:oEmif_String,algorithm,0:poEmif_String,nameList,0:pLdimList,}Eimg_RRDInfoList,.gdalautotest-3.1.2/gcore/data/byte.tif.grd0000664000175000017500000000560413701057751017140 0ustar evenevenncols 20 nrows 20 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 107 123 132 115 132 132 140 132 132 132 107 132 107 132 132 107 123 115 156 148 115 132 107 123 148 115 165 115 140 107 123 123 99 132 123 132 132 132 99 156 115 132 140 132 123 115 140 107 140 115 132 123 107 132 132 115 115 107 115 107 148 132 123 123 115 132 132 123 115 123 115 123 107 115 148 107 115 140 115 132 132 156 132 140 132 132 115 115 115 123 148 123 165 123 132 107 107 132 156 123 189 173 173 148 148 115 148 123 107 132 115 132 156 99 123 115 132 132 206 107 197 173 148 140 140 132 99 132 123 115 140 132 132 99 132 123 132 173 123 115 148 123 148 115 148 123 140 123 107 115 132 115 107 115 99 123 99 181 99 107 123 115 132 115 123 132 115 132 132 123 123 132 99 115 99 123 132 115 115 107 140 140 99 140 99 115 123 107 132 107 115 107 115 123 132 123 107 123 132 132 132 132 132 123 99 132 123 107 148 99 115 123 140 173 123 107 123 123 123 107 123 123 123 107 140 123 123 115 115 90 107 173 107 107 107 107 99 132 123 115 173 148 99 123 123 107 123 99 107 189 173 107 115 115 107 99 140 107 173 140 148 132 132 107 123 99 99 115 99 132 99 140 115 148 123 99 132 123 148 140 140 107 140 90 107 115 107 90 99 123 115 115 115 123 123 148 115 148 99 132 165 148 156 123 107 107 107 115 140 99 115 99 99 107 115 132 115 90 123 115 189 173 140 140 165 115 132 90 99 115 90 99 99 107 99 132 99 107 132 132 156 181 140 173 123 132 99 115 123 74 115 99 123 140 156 132 165 140 140 99 173 247 255 206 132 107 140 123 148 132 165 165 148 140 132 123 107 123 107 123 181 181 156 148 156 156 156 181 132 148 115 132 107 107 107 107 107 115 99 107 gdalautotest-3.1.2/gcore/data/toomanyblocks_separate.tif0000664000175000017500000000063613701057751022172 0ustar evenevenII* BCDESsgdalautotest-3.1.2/gcore/data/utmsmall.hdr0000664000175000017500000000036513701057751017252 0ustar evenevenENVI samples = 100 lines = 100 bands = 1 header offset = 0 file type = ENVI Standard data type = 1 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/oddsize1bit.tif0000664000175000017500000000263113701057751017640 0ustar evenevenII* cccS/4'`J:ZrQPP(*`gsTX:B AS% K+Ђ< ʷq  hOϿ`@,Ѐ``(7?`T?Wp=7}>`??G񗷠3q ?~y^ ?"'0g< E?<< A8(p}gdalautotest-3.1.2/gcore/data/cfloat32.vrt0000664000175000017500000000253713701057751017072 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray cfloat32.tif 1 gdalautotest-3.1.2/gcore/data/pixfun_imag_c.vrt0000664000175000017500000000105413701057751020256 0ustar eveneven Imaginary part imag CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/byte.tif.zip0000664000175000017500000000107713701057751017166 0ustar evenevenPKVK8C-ͫbyte.tifUT cG HUx}Q=A]E 431;t?8 *` :i&l 749C}cb757=&%V3736V)YtJQpSDX8*`d4hNيjY2Ή#fwдHV`9 - # T`@3^QҋpX+cŴ):īʐ"9n0oaȺ\2DaUYUN%iQ.pz^׹MYRJoq㱄zJ8ǤfG|1Lpέ {γqOG)}i~ m9N_O| w-_?n#}}<5kWR\fGv~jw,<ݟxd훗PKVK8C-ͫ byte.tifUTcGUxPKCgdalautotest-3.1.2/gcore/data/int12_ycbcr_contig.tif0000664000175000017500000000024313701057751021076 0ustar evenevenII* S kgdalautotest-3.1.2/gcore/data/doctype.xml0000664000175000017500000000123213701057756017105 0ustar eveneven ]> Chapter 1 More unexpert, I boast not: them let those Contrive who need, or when they need, not now. For while they sit contriving, shall the rest, Millions that stand in Arms, and longing wait gdalautotest-3.1.2/gcore/data/weird_mercator_2sp.tif0000664000175000017500000000166513701057751021217 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS ^ vP Fn@n@Q|a՜OA#      )#        @TXAr@L7A`G@?Global Mercator|NAD83|gdalautotest-3.1.2/gcore/data/byte_inconsistent_georef.tfw0000664000175000017500000000002513701057751022522 0ustar eveneven1, 0, 0, -1, 100, 200gdalautotest-3.1.2/gcore/data/md_ov_rpc.txt0000664000175000017500000000727213701057751017432 0ustar evenevenLINE_OFF: +013741.00 pixels SAMP_OFF: +004008.00 pixels LAT_OFF: +52.13480000 degrees LONG_OFF: +035.49880000 degrees HEIGHT_OFF: +0187.000 meters LINE_SCALE: +013741.00 pixels SAMP_SCALE: +004008.00 pixels LAT_SCALE: +00.15470000 degrees LONG_SCALE: +000.06520000 degrees HEIGHT_SCALE: +0300.000 meters LINE_NUM_COEFF_1: +1.213952200000000E-02 LINE_NUM_COEFF_2: +8.639036600000000E-03 LINE_NUM_COEFF_3: -1.045837000000000E+00 LINE_NUM_COEFF_4: -8.248574500000000E-03 LINE_NUM_COEFF_5: -3.294366200000000E-03 LINE_NUM_COEFF_6: -3.317066900000000E-05 LINE_NUM_COEFF_7: +3.792511200000000E-04 LINE_NUM_COEFF_8: -5.098340100000000E-05 LINE_NUM_COEFF_9: -3.621812800000000E-02 LINE_NUM_COEFF_10: +5.619579800000000E-06 LINE_NUM_COEFF_11: -5.388243100000000E-05 LINE_NUM_COEFF_12: -1.302045800000000E-06 LINE_NUM_COEFF_13: -1.108124500000000E-03 LINE_NUM_COEFF_14: -3.580883000000000E-07 LINE_NUM_COEFF_15: +1.216969800000000E-04 LINE_NUM_COEFF_16: -5.629911300000000E-03 LINE_NUM_COEFF_17: -4.315079000000000E-07 LINE_NUM_COEFF_18: +1.330180700000000E-06 LINE_NUM_COEFF_19: -1.281892300000000E-04 LINE_NUM_COEFF_20: +7.788993300000000E-10 LINE_DEN_COEFF_1: +9.999514900000001E-01 LINE_DEN_COEFF_2: -9.680432099999999E-05 LINE_DEN_COEFF_3: -2.825179100000000E-04 LINE_DEN_COEFF_4: +2.955144600000000E-06 LINE_DEN_COEFF_5: +1.002044400000000E-03 LINE_DEN_COEFF_6: +4.845332200000000E-05 LINE_DEN_COEFF_7: +2.275346400000000E-04 LINE_DEN_COEFF_8: -1.303761200000000E-04 LINE_DEN_COEFF_9: +6.827097500000000E-03 LINE_DEN_COEFF_10: +0.000000000000000E+00 LINE_DEN_COEFF_11: +0.000000000000000E+00 LINE_DEN_COEFF_12: +0.000000000000000E+00 LINE_DEN_COEFF_13: +0.000000000000000E+00 LINE_DEN_COEFF_14: +0.000000000000000E+00 LINE_DEN_COEFF_15: +0.000000000000000E+00 LINE_DEN_COEFF_16: +0.000000000000000E+00 LINE_DEN_COEFF_17: +0.000000000000000E+00 LINE_DEN_COEFF_18: +0.000000000000000E+00 LINE_DEN_COEFF_19: +0.000000000000000E+00 LINE_DEN_COEFF_20: +0.000000000000000E+00 SAMP_NUM_COEFF_1: +1.622000900000000E-05 SAMP_NUM_COEFF_2: +1.025822700000000E+00 SAMP_NUM_COEFF_3: -6.644817399999999E-05 SAMP_NUM_COEFF_4: +5.331439500000000E-03 SAMP_NUM_COEFF_5: +1.861326400000000E-02 SAMP_NUM_COEFF_6: +9.816083299999999E-04 SAMP_NUM_COEFF_7: -1.520483800000000E-03 SAMP_NUM_COEFF_8: -9.520026800000000E-04 SAMP_NUM_COEFF_9: -2.416183500000000E-04 SAMP_NUM_COEFF_10: -7.887350400000000E-06 SAMP_NUM_COEFF_11: -1.420802100000000E-04 SAMP_NUM_COEFF_12: -5.919311900000000E-05 SAMP_NUM_COEFF_13: +1.161831400000000E-02 SAMP_NUM_COEFF_14: +3.850862500000000E-07 SAMP_NUM_COEFF_15: +1.033556500000000E-04 SAMP_NUM_COEFF_16: +2.632269300000000E-05 SAMP_NUM_COEFF_17: -1.756408400000000E-06 SAMP_NUM_COEFF_18: -2.033416800000000E-05 SAMP_NUM_COEFF_19: -2.385196000000000E-05 SAMP_NUM_COEFF_20: +1.087416300000000E-09 SAMP_DEN_COEFF_1: +9.998781500000000E-01 SAMP_DEN_COEFF_2: +1.430752300000000E-05 SAMP_DEN_COEFF_3: -1.283098600000000E-04 SAMP_DEN_COEFF_4: +8.082642000000000E-05 SAMP_DEN_COEFF_5: -2.008026900000000E-04 SAMP_DEN_COEFF_6: -2.064670400000000E-05 SAMP_DEN_COEFF_7: -1.348692000000000E-04 SAMP_DEN_COEFF_8: -5.395695500000000E-05 SAMP_DEN_COEFF_9: +1.111801000000000E-02 SAMP_DEN_COEFF_10: +0.000000000000000E+00 SAMP_DEN_COEFF_11: +0.000000000000000E+00 SAMP_DEN_COEFF_12: +0.000000000000000E+00 SAMP_DEN_COEFF_13: +0.000000000000000E+00 SAMP_DEN_COEFF_14: +0.000000000000000E+00 SAMP_DEN_COEFF_15: +0.000000000000000E+00 SAMP_DEN_COEFF_16: +0.000000000000000E+00 SAMP_DEN_COEFF_17: +0.000000000000000E+00 SAMP_DEN_COEFF_18: +0.000000000000000E+00 SAMP_DEN_COEFF_19: +0.000000000000000E+00 SAMP_DEN_COEFF_20: +0.000000000000000E+00 ERR_BIAS: 0000.79 meters ERR_RAND: 0001.73 meters gdalautotest-3.1.2/gcore/data/cint16.tif0000664000175000017500000000362013701057751016522 0ustar evenevenII*Hk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck @S  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/bigtiff_two_strip_be_long8.tif0000664000175000017500000000043613701057751022721 0ustar evenevenMM+  Sstgdalautotest-3.1.2/gcore/data/mandrilmini_12bitjpeg.tif0000664000175000017500000001574613701057751021604 0ustar evenevenII*@@@8(S[ C    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222      !" #12$3A%BQ &CRa5bq  '()*+,-./046789:;<=>?@DEFGHIJKLMNOPSTUVWXYZ[\]^_`cdefghijklmnoprstuvwxyz{|}~    !1A"Qa2qB #Rb $r3CS 5  %&'()*+,-./046789:;<=>?@DEFGHIJKLMNOPTUVWXYZ[\]^_`cdefghijklmnopstuvwxyz{|}~ @@" ?.6;:nRdXu(I?MKWCM)bwUrhdc* ~1u$hʰn7J}zH!a{7Lqv(de9è3G"̆=h?E|xH}rLR_*)Txsv6[n\x(ڷ-e9틷4$=RMxذHR YD)יecs<@ud)XsBReT)Be'g:NyͭO4D7:TمK $-=Hz[E/aYAr.˚ƭK[ΚV]W6[->̗yPE_/~B8E%OB=jn^VdPϨ"t;I[06Reg_cDɊxf66Mɗ[Y="r% 0z#Jܳ $a|os5űHVrq#$īufɭq#WϥPS'bU )O$'o%VIB qϩ15;+m-ݭ!ȩ+J.јRV%Er{~ݏe \b2}%jOqʤRΦ | ${'c@}R+UTMoKxmG]euNcacl-V&m@w9]ef,416 tY; )to簰{*ȂŴ3 8KIn6!2)A>rdz}}mN\_]H({K{"%Uֹd7lv_ڄiLӌwlΤLSaOnJdn9Njӣf zHH8~GAk8_qzxKFƸ\RowM*+k'Ϲsie3j5|Ws{m8k"pN!v;eq_TqEfOd%M]]C=?55mauR'd>ț c e:s2cXo7y׍-v#1>> y^_-Ys1oNdQ͍3 ZmXXcPKe}]TܡHefPڐBo: #j ;ALMq⯎h[, ).gò~N?4ۗ('VqGz+q $O<Td>qfؤzɍB6[.jAI} M8FO,`K¡EکVmc"4q Uos 5P7 1s6.Rh뼳"swFh_m_rYیL@3SF?U*(:eՙem9&b)fDb_-iM0ur,1\˻N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im0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0@jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 float64_3.hdfCDF0.0gdalautotest-3.1.2/gcore/data/tif_webp_huge_single_strip.tif0000664000175000017500000000152213701057751023006 0ustar evenevenII*QnS   R Gray Gray Gray @۲j^0?@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|RIFFWEBPVP8 P*>HL%" inۖƃ־zd # <-r2d#5)b2-y kn,=Tߩ~X5by5UC{ ֯O)#|E'DT-#N1G_v4+_˅f?"Ջ>t:68gdalautotest-3.1.2/gcore/data/pixfun_real_c.vrt0000664000175000017500000000104713701057751020266 0ustar eveneven Real part real CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/SDSUNLIMITED.hdf0000664000175000017500000001315513701057751017305 0ustar eveneven j\B   <":><z!7j   ? ;1 HDF Version 4.2 Release 10, February 7, 2014            ValuesfakeDim0 DimVal0.1fakeDim0UDim0.0 ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0 SDS variableSDSVar  j j j j   j AppendableDataVar0.0 SDSUNLIMITED.hdfCDF0.0gdalautotest-3.1.2/gcore/data/minfloat_nodata_slightly_out_of_float.vrt0000664000175000017500000000062413701057751025266 0ustar eveneven -3.402823466385289e+38 Gray minfloat.tif 1 -3.402823466385289e+38 gdalautotest-3.1.2/gcore/data/pixfun_complex.vrt0000664000175000017500000000145613701057751020514 0ustar eveneven Make complex complex CFloat32 int32.tif 1 int32.tif 1 gdalautotest-3.1.2/gcore/data/uint33.tif0000664000175000017500000000023213701057751016537 0ustar evenevenII* !Sgdalautotest-3.1.2/gcore/data/byte_ovr_jpeg_tablesmode1.tif0000664000175000017500000000270713701057751022541 0ustar evenevenII*S[I  0 `C    $.' ",#(7),01444'9=82<.342N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|  BCDES[IjC    $.' ",#(7),01444'9=82<.342 *S5t!1A2q?ėlYK-1w敧JҟN}K)O_ٶ~דs{nac^M?ykɹ=y70籯&5Ƽ~דs{nac^M?ykɹ=y700_O:p]OicZֿBJRRRT֗r_SZ]kKUMiw/ꩭ.U5ܿT֗r_SZ]kKUMiw/:Z[\CA |byh Ggdalautotest-3.1.2/gcore/data/pixfun_mod_c.vrt0000664000175000017500000000104613701057751020121 0ustar eveneven Magnitude mod CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/tiff_dos_strip_chop.tif0000664000175000017500000000017213701057751021444 0ustar evenevenII* @@gdalautotest-3.1.2/gcore/data/pixfun_log10_c.vrt0000664000175000017500000000105013701057751020257 0ustar eveneven Log10 log10 CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/int12.tif0000664000175000017500000000167613701057751016364 0ustar evenevenII* fXS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|{@s@@@ks 0{ @s Psk{0@00sks@{@s0k0k @{0@{0{0{s @k00@@@0s0{ @{ P{@k { Э Д @s @{0 cs@ k P @0s@c@{@s @{ @s @{{s@ss0{00ks@s0@{0s0{@s0k00sk@k0k0{@{{@@@{0k @c0{k{k{k{s0Zkk0s Д0{kc k0sck Ќ @@kc0s000c@{ @kZsZ0{0s0{00 P {ksc0c0k00Zs Э Ps@Z0sc0k00k@ 0sJ0c Pc @k{ @ P @@{{{ P @0kks0kgdalautotest-3.1.2/gcore/data/oddsize_1bit2b.tif0000664000175000017500000000563413701057751020231 0ustar evenevenII* <00 ?<030?3? < 3 < 33 ? < 1 1 N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|gdalautotest-3.1.2/gcore/data/float32.raw0000664000175000017500000000310013701057751016670 0ustar evenevenBBCBCC CCCCBCBCCBBBCCBCBBCB%CB CBBBBCBCCCBCBC CCBB CB CBCBBCCBBBBBCCBBBCCBBBBBBBCBB CBCCCC CCCBBBBCB%CBCBBCCB=C-C-CCCBCBBCBCCBBBCCNCBEC-CC C CCBCBB CCCBCBC-CBBCBCBCB CBBBCBBBBBB5CBBBBCBBCBCCBBCBBBBCBBB C CB CBBBBCBBBBBCBBBCCCCCBBCBBCBBB C-CBBBBBBBBBB CBBBBBB-CBBBBBCBB-CCBBBBBBB=C-CBBBBB CB-C CCCCBBBBBBCB CBCBBCBC C CB CBBBBBBBBBBBBCBCBC%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBBgdalautotest-3.1.2/gcore/data/cfloat64.raw0000664000175000017500000001440013701057751017045 0ustar evenevenZ@^@`@\@`@`@a@`@`@`@Z@`@Z@`@`@Z@^@\@c@b@\@`@Z@^@b@\@d@\@a@Z@^@^@X@`@^@`@`@`@X@c@\@`@a@`@^@\@a@Z@a@\@`@^@Z@`@`@\@\@Z@\@Z@b@`@^@^@\@`@`@^@\@^@\@^@Z@\@b@Z@\@a@\@`@`@c@`@a@`@`@\@\@\@^@b@^@d@^@`@Z@Z@`@c@^@g@e@e@b@b@\@b@^@Z@`@\@`@c@X@^@\@`@`@i@Z@h@e@b@a@a@`@X@`@^@\@a@`@`@X@`@^@`@e@^@\@b@^@b@\@b@^@a@^@Z@\@`@\@Z@\@X@^@X@f@X@Z@^@\@`@\@^@`@\@`@`@^@^@`@X@\@X@^@`@\@\@Z@a@a@X@a@X@\@^@Z@`@Z@\@Z@\@^@`@^@Z@^@`@`@`@`@`@^@X@`@^@Z@b@X@\@^@a@e@^@Z@^@^@^@Z@^@^@^@Z@a@^@^@\@\@V@Z@e@Z@Z@Z@Z@X@`@^@\@e@b@X@^@^@Z@^@X@Z@g@e@Z@\@\@Z@X@a@Z@e@a@b@`@`@Z@^@X@X@\@X@`@X@a@\@b@^@X@`@^@b@a@a@Z@a@V@Z@\@Z@V@X@^@\@\@\@^@^@b@\@b@X@`@d@b@c@^@Z@Z@Z@\@a@X@\@X@X@Z@\@`@\@V@^@\@g@e@a@a@d@\@`@V@X@\@V@X@X@Z@X@`@X@Z@`@`@c@f@a@e@^@`@X@\@^@R@\@X@^@a@c@`@d@a@a@X@e@n@o@i@`@Z@a@^@b@`@d@d@b@a@`@^@Z@^@Z@^@f@f@c@b@c@c@c@f@`@b@\@`@Z@Z@Z@Z@Z@\@X@Z@gdalautotest-3.1.2/gcore/data/spaf27_correct.tif0000664000175000017500000000164013701057751020241 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  ^L >"~˶8AY[#APō[Lph@nQfLh@#      +#      TXAUuor@ @@@DDDDd@@]ZUUUU@@>ANAD27 / California zone VI|NAD27|gdalautotest-3.1.2/gcore/data/testserialization.asc.aux.xml0000664000175000017500000000243713701057756022564 0ustar eveneven MyDescription MyUnit 1 2 Palette Cat1 Cat2 0 1 2 3 gdalautotest-3.1.2/gcore/data/pcscitation.tif0000664000175000017500000000153213701057751017736 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  ^@ & N@A̞LAN@N@v     )#     *?mycitation|gdalautotest-3.1.2/gcore/data/2bit_compressed.img0000664000175000017500000002330713701057751020500 0ustar evenevenEHFA_HEADER_TAGW&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.[Z^RasterDMSEdms_State@pI8J[8Ehfa_LayerEhfa_Layer>{4096:2data,}RasterDMS,.rootroot[WWIMGFormatInfoImgFormatInfo831%WLayer_1Eimg_LayerPP@@eiYUUUUUUVYeYfVYUUUfVUVefiUeVUUUeZiUeUUUUeVUZefiUUUUUfVifVjUUUUfZUUUeffeUYUUeUVVUUeUYUVeZUUjYVZUYeUiVYUVUYUeZVZUiUeVjUYYZVfUUViZZjUVUeUffUUe﫮YUjUfjUUjUUUꪪjUUVUZUꪪjiU꿫Zfj翪jZjjjj^jگڪjjZꪪjꯪYZUieUifVfjZjikojziZꪪUj꺦VYfff릩iYji^ZYjjjiVZYkYUUfZejjUUYfYeZUUVYZeUZZyiYeUVVjiYUUYUZjUUeUfEZUiYzUUZijeEUUUjjjUUUUZUjUUUjUY 0 0000000000000 0 0 0 0 0 00 0 00000 000000 0 0 00 0000 000 0 000 0 0 0000000000000 0                LVd0 0 00 00 0 00 0 00000 L0![\ProjectionXEprj_MapProjection842 PE_COORDSYSN{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,coordSys,}PE_COORDSYS,.PROJCS["NAD_1927_UTM_Zone_11N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]PE"[`"uMap_InfoEprj_MapInfoh"NAD_1927_UTM_Zone_11N"ALA"0A{LA"N@N@"meters![/$U#ProjectionEprj_ProParametersk#UTM {#?# $Clarke 1866TXA333?XA^s{?TXA"$cDatumEprj_Datum$NAD27$ %nadcon.datArea[W%%GDAL_MetaDataEdsc_Table9&%&#Bin_Function#Edsc_BinFunction%%&AREA_OR_POINTEdsc_Column%gdalautotest-3.1.2/gcore/data/md_eros.rpc0000664000175000017500000000713613701057751017056 0ustar evenevenLINE_OFF: +003577.86 pixels SAMP_OFF: +005073.81 pixels LAT_OFF: -25.46203790 degrees LONG_OFF: +030.92821397 degrees HEIGHT_OFF: +0799.818 meters LINE_SCALE: +003701.00 pixels SAMP_SCALE: +005073.50 pixels LAT_SCALE: +00.03366450 degrees LONG_SCALE: +000.03933000 degrees HEIGHT_SCALE: +0800.000 meters LINE_NUM_COEFF_1: -5.685732320958757E-05 LINE_NUM_COEFF_2: -1.688452124667677E-01 LINE_NUM_COEFF_3: +1.026285109792635E-02 LINE_NUM_COEFF_4: +3.370333778549677E-02 LINE_NUM_COEFF_5: -1.688452123504236E-01 LINE_NUM_COEFF_6: -9.210941236359113E-05 LINE_NUM_COEFF_7: +1.026285112455623E-02 LINE_NUM_COEFF_8: +7.275450748233468E-04 LINE_NUM_COEFF_9: -5.685732326117261E-05 LINE_NUM_COEFF_10: +1.275991345347366E-05 LINE_NUM_COEFF_11: -9.210941329658526E-05 LINE_NUM_COEFF_12: -7.107935332182441E-03 LINE_NUM_COEFF_13: -1.688452124517246E-01 LINE_NUM_COEFF_14: -7.817702560991569E-05 LINE_NUM_COEFF_15: +7.275450726536353E-04 LINE_NUM_COEFF_16: +1.259657328251798E-03 LINE_NUM_COEFF_17: -5.685732319980720E-05 LINE_NUM_COEFF_18: +1.275991335486938E-05 LINE_NUM_COEFF_19: +1.026285112524951E-02 LINE_NUM_COEFF_20: -4.046048387797195E-06 LINE_DEN_COEFF_1: +1.000000000000000E+00 LINE_DEN_COEFF_2: -1.660629248792338E-05 LINE_DEN_COEFF_3: +7.781766191075484E-04 LINE_DEN_COEFF_4: +1.552004958811531E-03 LINE_DEN_COEFF_5: -1.660629300111096E-05 LINE_DEN_COEFF_6: -5.496314032583734E-04 LINE_DEN_COEFF_7: +7.781766202266671E-04 LINE_DEN_COEFF_8: +4.691190242093672E-03 LINE_DEN_COEFF_9: -2.800290040998603E-01 LINE_DEN_COEFF_10: +9.190822500847878E-06 LINE_DEN_COEFF_11: -5.496313957449625E-04 LINE_DEN_COEFF_12: -1.556308710889394E-03 LINE_DEN_COEFF_13: -1.660629304429864E-05 LINE_DEN_COEFF_14: +1.675835981211626E-05 LINE_DEN_COEFF_15: +4.691190212377331E-03 LINE_DEN_COEFF_16: +3.805520978922899E-04 LINE_DEN_COEFF_17: -2.800290039595706E-01 LINE_DEN_COEFF_18: +9.190789503243230E-06 LINE_DEN_COEFF_19: +7.781766189033090E-04 LINE_DEN_COEFF_20: +1.574732057685324E-05 SAMP_NUM_COEFF_1: -2.129060789027837E-04 SAMP_NUM_COEFF_2: +3.493776357942976E-06 SAMP_NUM_COEFF_3: +1.936345819081399E-01 SAMP_NUM_COEFF_4: -2.382498929970764E-02 SAMP_NUM_COEFF_5: +3.493752749279915E-06 SAMP_NUM_COEFF_6: -7.113250768332150E-03 SAMP_NUM_COEFF_7: +1.936345817997452E-01 SAMP_NUM_COEFF_8: -1.993343984792224E-04 SAMP_NUM_COEFF_9: -2.129060800454212E-04 SAMP_NUM_COEFF_10: +1.244388483525128E-02 SAMP_NUM_COEFF_11: -7.113250770281199E-03 SAMP_NUM_COEFF_12: -6.640580663263980E-04 SAMP_NUM_COEFF_13: +3.493770676204088E-06 SAMP_NUM_COEFF_14: -1.090930315505032E-03 SAMP_NUM_COEFF_15: -1.993343996887753E-04 SAMP_NUM_COEFF_16: +3.766611282534946E-03 SAMP_NUM_COEFF_17: -2.129060800034271E-04 SAMP_NUM_COEFF_18: +1.244388483322245E-02 SAMP_NUM_COEFF_19: +1.936345816322605E-01 SAMP_NUM_COEFF_20: -4.930201160996610E-03 SAMP_DEN_COEFF_1: +1.000000000000000E+00 SAMP_DEN_COEFF_2: -3.399660026730292E-03 SAMP_DEN_COEFF_3: +7.140161558631606E-03 SAMP_DEN_COEFF_4: -1.404299913797778E-04 SAMP_DEN_COEFF_5: -3.399660026924333E-03 SAMP_DEN_COEFF_6: -4.408923950531601E-04 SAMP_DEN_COEFF_7: +7.140161558382806E-03 SAMP_DEN_COEFF_8: +1.744314123010001E-03 SAMP_DEN_COEFF_9: -2.218626461126291E-01 SAMP_DEN_COEFF_10: -3.870828853713920E-03 SAMP_DEN_COEFF_11: -4.408924020411851E-04 SAMP_DEN_COEFF_12: -1.053716488104013E-05 SAMP_DEN_COEFF_13: -3.399660027333339E-03 SAMP_DEN_COEFF_14: +6.221075558288873E-05 SAMP_DEN_COEFF_15: +1.744314147054657E-03 SAMP_DEN_COEFF_16: -2.066729793693595E-05 SAMP_DEN_COEFF_17: -2.218626462941301E-01 SAMP_DEN_COEFF_18: -3.870828817334132E-03 SAMP_DEN_COEFF_19: +7.140161557935442E-03 SAMP_DEN_COEFF_20: -1.231838158165972E-04 ERR_BIAS: 0000.00 meters ERR_RAND: 0000.00 meters gdalautotest-3.1.2/gcore/data/pixfun_dB2pow.vrt0000664000175000017500000000105713701057751020177 0ustar eveneven dB to power dB2pow Float64 float32.tif 1 gdalautotest-3.1.2/gcore/data/stats_nodata_neginf.tif0000664000175000017500000000047113701057751021431 0ustar evenevenII*  S?   S4-infgdalautotest-3.1.2/gcore/data/huge4GB.tif0000664000175000017500000000062113701057751016641 0ustar evenevenII* Sgdalautotest-3.1.2/gcore/data/test3_with_1mask_1bit.tif0000664000175000017500000000307013701057751021525 0ustar evenevenII* NST Z<Sgdalautotest-3.1.2/gcore/data/GTModelTypeGeoKey_only.tif0000664000175000017500000000107613701057751021723 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksck S.gdalautotest-3.1.2/gcore/data/zoom_in.vrt0000664000175000017500000000124513701057751017122 0ustar eveneven byte.tif 1 byte.tif 1 gdalautotest-3.1.2/gcore/data/cint_sar.tif0000664000175000017500000000306313701057751017221 0ustar evenevenII*#4$';6 t?M#+0SM<Tz$!/0  xS :*2ڝ'1r@|?5^0@d@^I r@Gzt0@d@ü@w/r@'10@ڝü@?5^Ir@p= 0@#WGS 84| ES 6356.7590000 19970718024119087 347.339 6378.1440000 7.9040000 INCREASE 0001667400297672 24.824 ERS2-SLC-6.1 ESA -65.311 3.9900000 345.5885834 90.000 ITALY 16.213 GEM6 gdalautotest-3.1.2/gcore/data/pixfun_imag_r.vrt0000664000175000017500000000106013701057751020272 0ustar eveneven Imaginary part imag Float32 float32.tif 1 gdalautotest-3.1.2/gcore/data/projection_3856.tif0000664000175000017500000000053613701057751020262 0ustar evenevenII* sS   D@A̞LAN@N@  WGS 84 / Pseudo-Mercator|gdalautotest-3.1.2/gcore/data/pixfun_inv_c.vrt0000664000175000017500000000104513701057751020135 0ustar eveneven Inverse inv CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/byte_inconsistent_georef.tif.aux.xml0000664000175000017500000000014313701057756024105 0ustar eveneven LOCAL_CS["PAM"] 1,2,3,4,5,6 gdalautotest-3.1.2/gcore/data/contig_tiled.tif0000664000175000017500000000540013701057751020060 0ustar evenevenMM* p  !"  !"#  !"#$  !"#$%  !"#$%&  !"#$%&'  !"#$%&'(  !"#$%&'()  !"#$%&'()*  !"#$%&'()*+  !"#$%&'()*+,  !"#$%&'()*+,-  !"#$%&'()*+,-.  !"#$%&'()*+,-./ !"#$%&'()*+,-./0 !"#$%&'()*+,-./01 !"#$%&'()*+,-./012 !"#$%&'()*+,-./0123 !"#$%&'()*+,-./01234 !"#$%&'()*+,-./012345 !"#$%&'()*+,-./0123456 !"#$%&'()*+,-./01234567 !"#$%&'()*+,-./012345678 !"#$%&'()*+,-./0123456789 !"#$%&'()*+,-./0123456789: !"#$%&'()*+,-./0123456789:; !"#$%&'()*+,-./0123456789:;< !"#$%&'()*+,-./0123456789:;<= !"#$%&'()*+,-./0123456789:;<=> !"#$%&'()*+,-./0123456789:;<=>? !"#$%&'()*+,-./0123456789:;<=>?@ !"#$%&'()*+,-./0123456789:;<=>?@A !"#$%&'()*+,-./0123456789:;<=>?@AB!"#$%&'()*+,-./0123456789:;<=>?@ABC"#$%&'()*+,-./0123456789:;<=>?@ABCD#$%&'()*+,-./0123456789:;<=>?@ABCDE$%&'()*+,-./0123456789:;<=>?@ABCDEF #% B@C@DE hgdalautotest-3.1.2/gcore/data/corrupted_gtiff_tags.tif0000664000175000017500000000062513701057751021624 0ustar evenevenII*S  , v@@@A̞LA #  )#mtr@@TXAWGS 84|NAVD88 height|sgdalautotest-3.1.2/gcore/data/utmsmall_3.hdf0000664000175000017500000003301513701057751017456 0ustar eveneven j\ '00<1!171;<1w!11< 1!j 1 12 2+Q 2|7 2; 2I 37F3}5<5?NCSA HDF Version 4.1 Release 4, December 2000k{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sŜŌֵέ֭sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{Ŕεs{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{Žέ֭Δŵ{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{kέńBΥννΜsss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{k{ccť攽s{ksc{skscZk{cs{Zcccc{kskk{kssk{ZsΔŽޜZkŭ{ŭc{sc{{ssckk{ckkcsccZcsZss{{{sνﵔťsޥ{s{{kssksc{cck{kcccsZ{sksskss{sc{{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{Rcֵ֌ccs{kksks{{k{kskscskkssks{Zֽ楄{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{ksέέ{֔極{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{ť{kέ޽{ޥΥc{{k{ckksskckZ{ksss{ss{ksssε{Δ楥ޥŜŭk{ccsccs{c{ssc{kkcs{s{{skk{֜Žֵ޽ŽŭޥεkkZkskZc{sss{{sc{kckk{{ssŵ{{νΜֽεΔŽŵ֥ťޭŜ{kkkscscckssZ{s{{k{{{Zk{kkńŵsc{ŽŭŌksZcsZcckccksZs{skskssֵŭΜεΌŔ޽ŭ֜{cs{Jsc{ckkskksŽ{εŵν֭Μks΄k{{k{k{RccZŭŜΥε浌ŭ{{ޭΔ{Ό޵skkkkksckZsccέޭ޵ֵ֥s{Ŝ{ޭΜ{sZcsZkccZckcc{ε朔ŭŽŵŭŵŵk{{{kcRkkkcckŭŭ֥ޭ֔Ŝ{ޜZckcRss޽έބε業{Z{k{ŽŭŌŵŜŭc{{kޔŽť{{sR{֜{s{{{sֵޥֽs{{{{Zc楜{έ{ŽΔΜc{εk΄省ΜΥsks{{Ō攜֔ŔskޜŔs{εޭńŽ֭ﭥ{֔{{ťs{{Ό޽֭歵Z{ŵŵŌťŽŌ{{sֵŔ޽ssŌsνť挥ť޵޽֔楥{ν{ŵε潔޽朔Υ{ֽŭ֌攔ք{Rkŵޔsks{ZŽ楔ޭs歔掠ť{k{kscsc{ť֜c{kޜs{J{c{Rcs{kΥέŔťŵνΜsk{sskk{skscRcJk{sέ{Ŝ֌޽έޭޥ{k{{Rk{kZ{RťŭνŵΜŌks{sskck{ֵŜsZŭ֔εŵεJkkss{{s{c{ŌޥŜsk歜֜{޽s֭{{{{Ŝ{s{k{{ckkŜ浌c潥ޔޥs{{s֔s{s{c{ks{s{s{εέֵ{{ssss{{kskkュ{ssތŌkckckcsksks{{ss{{Ό{sŽ歵{΄֜ބksckkk{{{{sks{{ťck{޵޽{έބkksssssc{kc{ccsބŌcsޥŭs{sR{c{sZks{ss{kcs{kZ{ޔޔkޥ{ŔֽŔŵ{{kkskskZ{sZksssZRk{kc{{ńs{k潌֭s֭kޜ歭csZsc{{ckcs{c{skRk{RZsťŭ{ssŽνΜ֭潽޽ŌksRssssk{{sksc{{kRBνŽ{{ťŭ޵ŔνޥΥ֭JkJ{kRZksRkkss֭kcŜksέΥ޽֜Zk:ccRs{kskkscΥŌc{s{Ž޽֜ޔք{νBBk)ZJcZsc{ksck{k{{{{ccﵭss{{ŭέޜ{ť歵s{RJsJkc)kkJcR{cksssckZcRRksk{{{ΌŔޥΔ޵քkZcZJ:JRsJRscs{ZR{Z{J{kk挭k{{ތŵ{ֽνŵk{kBsc{cZZcks{ck{kZkkZkJsk֜s{kŵΔŽޜ{֜ޔks:1{ZcRBJBRcc{sZsJcJsZcޥsZ・潭ń1skń{{sc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RRJ1!Zc{!)::Z)R)1:BsckssZZ1:BBJJR!B֌JBcRs{cJBZsZ:ssJRJZ{kZ{Zk{{{ZRR1Bs1BJR11BR{{s{)ZcZR))!B)sŔZc):s{ZJkkRsBJ1ccBkZZB1ssskZkR{:RRZks{ZkccBs:)!:kcsތRRkZ:))!!):JRkB11{{1cskRRRZ!cRsZ:k1{J:1ksJZ{k{JZ{:skccRZZk)JRk1ccBckssZ!11cJ)JJB)RRs{R:){k1:JJ):)kR{sJJZkBkBJBZ:R1:ZcccsJRRskk:{sscRZ{dValuesfakeDim0 DimVal0.1fakeDim0Dim0.0dValuesfakeDim1 DimVal0.1fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1fakeDim2Dim0.0ddj j j j j   j   3-dimensional Scientific DatasetVar0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 utmsmall_3.hdfCDF0.0gdalautotest-3.1.2/gcore/data/rgbsmall_cmyk.tif0000664000175000017500000002441013701057751020244 0ustar evenevenII*' 22'(SHH@r~yn#}ZfÆ,z{o \Pʹn|zt mtq hWq j{vUX[ѿ'tmyz~q q ulq o szkma[m ﻾W|oy|Xwvtr ievs r stЍBwsto ǾGYjzs lhj|clelir q sn wr r jfʽUv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躶v鿴y¶ô~a]hbD*8tk.N@6.+0!'9>,:0H:<R?FؕWx赼x繶t轳u{گNཀྵfŏ>ROWX GrPbdž.GTʅ.uQ9/&+F+8<04@;GPN[ߞqw赼x縵r龴wĵʮ|ѫ}ʾIQ|_hKr dG<1Sr ͍@zf07 A<2Dtfn zq mOKILVܜh籼q泺r綼x˵ӯڬ22('(((S(`(HH PIXEL gdalautotest-3.1.2/gcore/data/int16.img0000664000175000017500000002430013701057751016347 0ustar evenevenEHFA_HEADER_TAG@RpG rootrootXAAG RRLayer_148752404Eimg_LayerXAA Ehfa_Layer52404Ehfa_LayerXAA0 n0Statistics52404Esta_StatisticsrsXAAR@o@)\_@^@`@@X) 6@Z<StatisticsParametersEimg_StatisticsParameters830XAAgg ggDescriptor_TableersEdsc_TableticsParameters830XAAVZb#Bin_Function#eersEdsc_BinFunctionrameters830XAAR@o@vg?@B@L@O@P@R@?@8@(@@(@@@?@??{400:sdata,}RasterDMS,.R IMGFormatInfo04ImgFormatInfo831XAA k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckfo4RasterDMS52404Edms_StateXAA XAA #cMap_Info52404Eprj_MapInfoXAA+UTM7ALAOALAgN@N@metersProjection52404Eprj_ProParametersXAAUTM ,? Clarke 1866TXA333?XA^s{?fOMXA`+Datumtion52404Eprj_DatumametersXAAhNAD27x nadcon.datZ Histogramion#eersEdsc_Columntionrameters830XAAZZHistogramParametersEimg_StatisticsParameters830XAA a(a DaTaR@o@ra} erType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.gdalautotest-3.1.2/gcore/data/byte_nogeoref.tif.aux.xml0000664000175000017500000000014313701057756021642 0ustar eveneven LOCAL_CS["PAM"] 1,2,3,4,5,6 gdalautotest-3.1.2/gcore/data/float64.hdr0000664000175000017500000000036313701057751016671 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 5 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/pixfun_cmul_r.vrt0000664000175000017500000000140713701057751020322 0ustar eveneven Product with complex conjugate cmul uint16.tif 1 int32.tif 1 gdalautotest-3.1.2/gcore/data/uint32.raw0000664000175000017500000000310013701057751016542 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/uint32_2.hdf0000664000175000017500000001225713701057751016750 0ustar eveneven j\ @ <F!gk<!j 2 $7 [; I F % 9< u9NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0 jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 uint32_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/nan32_nodata_warp_nan_to_zero.vrt0000664000175000017500000000443013701057751023344 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32631"]] 4.0000000000000000e+05, 1.0000000000000000e+00, 0.0000000000000000e+00, 5.0000000000000000e+06, 0.0000000000000000e+00, -1.0000000000000000e+00 0.00000000000000E+00 512 128 6.71089e+07 NearestNeighbour Float32 nan32_nodata.tif 0.125 400000,1,0,5000000,0,-1 -400000,1,0,5000000,0,-1 400000,1,0,5000000,0,-1 -400000,1,0,5000000,0,-1 nan 0 0 0 gdalautotest-3.1.2/gcore/data/gcps_2115.vrt0000664000175000017500000066464113701057751017073 0ustar eveneven Gray utmsmall.tif 1 gdalautotest-3.1.2/gcore/data/excessive-memory-TIFFFillStrip.tif0000664000175000017500000000331213701057751023277 0ustar evenevenII*}88=@S   . 0Կ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ!4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x1 àԿ4x  igdalautotest-3.1.2/gcore/data/byte.hdr0000664000175000017500000000036313701057751016355 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 1 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/test_with_mask_1bit_and_ovr.tif0000664000175000017500000000234013701057751023070 0ustar evenevenII* S   . dSp 4<S&>>>>>   @Sgdalautotest-3.1.2/gcore/data/pixfun_dB_c.vrt0000664000175000017500000000104213701057751017663 0ustar eveneven dB dB CFloat64 cint_sar.tif 1 gdalautotest-3.1.2/gcore/data/byte_nearest_200pct.vrt0000664000175000017500000000302613701057751021223 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 3.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -3.0000000000000000e+01 Area Gray byte.tif 1 gdalautotest-3.1.2/gcore/data/md_dg.IMD0000664000175000017500000000234113701057751016316 0ustar evenevenversion = "24.06"; generationTime = 2015-01-01T00:00:00.000000Z; productOrderId = "000000000_00_0000"; productCatalogId = "00000000000000000"; imageDescriptor = "ORStandard2A"; bandId = "Multi"; panSharpenAlgorithm = "None"; numRows = 50; numColumns = 50; productLevel = "LV2A"; productType = "Standard"; numberOfLooks = 1; radiometricLevel = "Corrected"; radiometricEnhancement = "Off"; bitsPerPixel = 16; compressionType = "None"; outputFormat = "GeoTIFF"; BEGIN_GROUP = IMAGE_1 satId = "WV03"; mode = "FullSwath"; scanDirection = "Forward"; CatId = "00000000000000000"; firstLineTime = 2010-04-01T12:00:00.000000Z; avgLineRate = 5000.01; exposureDuration = 0.00020000; minCollectedRowGSD = 1.315; maxCollectedRowGSD = 1.315; meanCollectedRowGSD = 1.315; minCollectedColGSD = 1.286; maxCollectedColGSD = 1.287; meanCollectedColGSD = 1.286; meanCollectedGSD = 1.301; cloudCover = 0.027; resamplingKernel = "MTF"; positionKnowledgeSrc = "R"; attitudeKnowledgeSrc = "R"; revNumber = 337; END_GROUP = IMAGE_1 BEGIN_GROUP = MAP_PROJECTED_PRODUCT earliestAcqTime = 2015-01-01T00:00:00.000000Z; latestAcqTime = 2015-01-01T00:00:00.000000Z; datumName = "WE"; numGCP = 0; END_GROUP = MAP_PROJECTED_PRODUCT END; gdalautotest-3.1.2/gcore/data/float24.tif0000664000175000017500000000362013701057751016671 0ustar evenevenII*HEEFEFFFFFFEFEFFEEE8F(FEFEE(FEJFEFEEEEFEFFFE8FEFFFEEFEFEFEEFFEEEEE(FFEEEFFEEEEEEE(FEEFEFF8FFFFFEEEE(FEJFEFEEF8FEzFZFZF(F(FE(FEEFEF8FEEEFFFEFZF(FFFFEFEEFFFEFEFZFEE(FE(FE(FEFEEEFEEEEEEjFEEEEFEEFEFFEEFEEEEFEEEFFEFEEEEFEEEEEFEEEFFFFFEEFEE(FEEEFZFEEEEEEEEEEFEEEEhEEZFEEEEEFEEZF(FEEEEEEEzFZFEEEEEFEZFF(FFFEEEEEEFEFE(FEEFE(FFFEFhEEEEhEEEEEEEE(FE(FEFJF(F8FEEEEEFEEEEEEFEhEEEzFZFFFJFEFhEEEhEEEEEFEEFF8FjFFZFEFEEE(EEEEF8FFJFFFEZFFFFFEFE(FFJFJF(FFFEEEEEjFjF8F(F8F8F8FjFF(FEFEEEEEEEE%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBBS  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/pixfun_sqrt.vrt0000664000175000017500000000105513701057751020031 0ustar eveneven Square root sqrt Float32 float32.tif 1 gdalautotest-3.1.2/gcore/data/byte_averaged_200pct.vrt0000664000175000017500000000303213701057751021335 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 3.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -3.0000000000000000e+01 Area Gray byte.tif 1 gdalautotest-3.1.2/gcore/data/byte_nogeoref.tif0000664000175000017500000000104213701057751020241 0ustar evenevenII* Sk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/huge-number-strips.tif0000664000175000017500000000030013701057751021146 0ustar evenevenII+Tag ooooooooooogdalautotest-3.1.2/gcore/data/byte_bigtiff_invalid_slong8_for_stripoffsets.tif0000664000175000017500000000160013701057751026530 0ustar evenevenII+S L d N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/erdas_m.img0000664000175000017500000004316413701057751017031 0ustar evenevenEHFA_HEADER_TAGV- 961!0StatisticsEsta_StatisticsA"@o@/ҏb@@a@@a@  ]M@&~1! (StatisticsParametersEimg_StatisticsParameters830A* (2 1!Descriptor_TableersEdsc_TableticsParameters830A ~#Bin_Function#eersEdsc_BinFunctionrameters830Ao@? @ @D@?F@B@??9@.@~$ Histogramion#eersEdsc_Columntionrameters830A~ 1! FHistogramParametersEimg_StatisticsParameters830Ao@2 1! Elevation_InfotersEprj_ElevationInfometers830APulkovo 1942(83) [To WGS 84 1]8@^W>:z|*yU>qF'%>avt>meters&ing,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.&1!Z4RasterDMSEdms_Statepccc<<ccc<cccccرcc رcccرcccc<<<رccc<<رcc\AɍWAw"L\AWA"@@@@"meters!1!$.#ProjectionEprj_ProParameters D#Transverse Mercatord#??8\A# #Krasovsky@TXAޓ3?XAj{?@TXA"$_DatumEprj_Datum $Pulkovo 1942$fffff7@a9T¾2GѾ+i)+1!- z%v%GDAL_MetaDataEdsc_Table&$%#Bin_Function#Edsc_BinFunctionz%$&ELEVATION_UNITSEdsc_Column$ion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,{1:*oEprj_Datum,verticalDatum,0:pcelevationUnit,1:e3:EPRJ_ELEVATION_TYPE_HEIGHT,EPRJ_ELEVATION_TYPE_DEPTH,EPRJ_ELEVATION_TYPE_UNKNOWN,elevationType,}Eprj_ElevationInfo,.gdalautotest-3.1.2/gcore/data/byte_ovr_jpeg_tablesmode_not_correctly_set_on_ovr.tif0000664000175000017500000000324413701057751027660 0ustar evenevenII*S[I  0 `C    $.' ",#(7),01444'9=82<.342N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|  BCDES[IjC    $.' ",#(7),01444'9=82<.342 ?IY"# sץHQ,7x?w'ʏ>Oo|?*Oo|?* Ggdalautotest-3.1.2/gcore/data/byte_zstd_corrupted2.tif0000664000175000017500000000110013701057751021565 0ustar evenevenII*PfS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|X1nW"*}:/D_]J$(*:%x 7\Y>_Le ]#/ϻ^{D"#[N*sÎ^صȌxVbg8[k8-*DCѢȘhԵm VuHYWms#뺌 <=0@J!iM ` "C 8'Qwp$egdalautotest-3.1.2/gcore/data/epsg4326_3855_geotiff1_1.tif0000664000175000017500000000052413701057751021363 0ustar evenevenII*SS   :v@f@?fV@WGS 84 + EGM2008 height|gdalautotest-3.1.2/gcore/data/geomatrix.tif0000664000175000017500000000133213701057751017413 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksck S؅ :?h Gray utmsmall.tif 1 gdalautotest-3.1.2/gcore/data/sasha.aux0000664000175000017500000007054213701057751016537 0ustar evenevenEHFA_HEADER_TAG&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.8Z;DependentFileEimg_DependentFile bsasha.tifWBRasterDMSEdms_State +oEhfa_LayerEhfa_Layer{4096:cdata,}RasterDMS,.PvBRasterDMSEdms_State :pP8Ehfa_LayerEhfa_Layer>{4096:cdata,}RasterDMS,.BRasterDMSEdms_State pWEhfa_LayerEhfa_Layer{4096:cdata,}RasterDMS,.rootrootIMGFormatInfoImgFormatInfo831`P8<Layer_1Eimg_Layerd2@@Layer_2Eimg_Layerd2@@PWdLayer_3Eimg_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z({ [ڼKgH ̪e @eֹQoyّjBDS  ^i/5b-i  8'7glm{WVzm+^i-Ov:_\.۬ҤfY,  'Im}-'j(Qj+cӦլTNgGQ?\kQJ$W7>q!?9/\FSFnd?i37SQEW|!k2ZTRT}nVs_Qx#ො+#ƝiIJ}JP%7VvvNvrFZE1$Q"0(dG.>ĝVlv`-'L^;`]Ooym:6[2$5''1nkO{W!*W̿4ۧ֯((+r!Xsl{\|(SX$)r}k7H~a}qҰ|C1R;6Q>9!Fp@;Z2-y߈fbE񤢽e?}EUOuk)6(~V&66Ry@ywpZ-aӸ>ާk6K(.@T[qמW_fWk+%eV(W8KxM)ۜjDjZJrƲ%y~&ٚXľ'mYW<a זOk>)I؏B;#5Tbdu;F))rE&sEQW=M]MV!+Y]Er#'0lgqZOk~$ LWSd9$ $@Wx_\k(]8z}z3\5 F8~MZ./eN2~=p>:F/d\CC1t5cIq]'o/ǸmR4['H⌟`󩯵YuL0BylV`+.dTTQEQEKn%]qgoK8.a>[]7CnxPK9"61ѵSzދqҲO<,koX4GV(C    $.' ",#(7),01444'9=82<.342 ?qRy͌fҗ$uԱLNr9Fȭ(5ME>4TYJ(((((((((((( , ,@ ,RS-[!-L$BF vbyH$?+C    $.' ",#(7),01444'9=82<.342 }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzgdalautotest-3.1.2/gcore/data/minfloat.tif0000664000175000017500000000052013701057751017223 0ustar evenevenII*  S@@  S8-3.4028234663852886e+38gdalautotest-3.1.2/gcore/data/epsg_2853_with_us_feet.tif0000664000175000017500000000237613701057751021611 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  R,fAZA??D %  D +#IMAGINE GeoTIFF Support Copyright 1991 - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved @(#)$RCSfile: egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST $ Projection Name = NAD_1983_HARN_StatePlane_Virginia_North_FIPS_4501_Feet Units = us_survey_feet GeoTIFF Units = us_survey_feet|IMAGINE GeoTIFF Support Copyright 1991 - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved @(#)$RCSfile: egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST $ State Plane Zone -4501 NAD = HARN|gdalautotest-3.1.2/gcore/data/uint16_sgilog.tif0000664000175000017500000000115013701057751020104 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k {{{k{{ssZkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{ sksck tLSgdalautotest-3.1.2/gcore/data/nodata_byte.tif0000664000175000017500000000142513701057751017710 0ustar evenevenII*S   /V0N@N@@A̞LA# Wh )#NAD_1927_UTM_Zone_11N|GCS_North_American_1927|k{skkk{ss{ssk{{c{cs{sks{kssksk{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsckZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkkscgdalautotest-3.1.2/gcore/data/float32_2.hdf0000664000175000017500000001226013701057751017070 0ustar eveneven j\ @ <F!gk<!j 2 $7 [; I F % 9< u:NCSA HDF Version 4.1 Release 4, December 2000BBCBCCC CCCBCBCCBBBCCBCBBCBC%BC BBBBCBCCCBCBCC CBBC BC BCBBCCBBBBBCCBBBCCBBBBBBBCBBC BCCCCC CCBBBBCBC%BCBBCCBC=C-C-CCBCBBCBCCBBBCCCNBCEC-CC C CBCBBC CCBCBCC-BBCBCBCBC BBBCBBBBBBC5BBBBCBBCBCCBBCBBBBCBBBC C BC BBBBCBBBBBCBBBCCCCCBBCBBCBBBC C-BBBBBBBBBBC BBBBBBC-BBBBBCBBC-CBBBBBBBC=C-BBBBBC BC-C CCCBBBBBBCBC BCBBCBCC C BC BBBBBBBBBBBBCBCBCC%CCBBBBBC BBBBBBCBBBBC=C-C C C%BCBBBBBBBBCBBCCCC5C C-BCBBBBBBBC CCC%C C BC-CwCCNCBC BCCC%C%CC CBBBBBC5C5CCCCCC5CCBCBBBBBBBBValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0 jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 float32_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/vrt_subpixel_offset.vrt0000664000175000017500000000423413701057751021545 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray left_vrt_subpixel_offset.tif 1 right_top_vrt_subpixel_offset.tif 1 right_bottom_vrt_subpixel_offset.tif 1 gdalautotest-3.1.2/gcore/data/float32_almost_nodata_max_float32.tif0000664000175000017500000000065713701057751024003 0ustar evenevenII* S   0/p-3.40282300000000000e+38N@N@@ALA# Wh )#NAD_1927_UTM_Zone_11N|GCS_North_American_1927|gdalautotest-3.1.2/gcore/data/stefan_full_rgba.png0000664000175000017500000006730113701057751020723 0ustar evenevenPNG  IHDR*c6gAMA1_ IDATxiUՕޫ^ͳP58P&8!6*h1 jI:+Ncda&LJc4 DY2( UTAw˽YU{})4F uu?o\0U$!DQXo~;r1z,kg sH 0@\X P1$W{W01hekU4V"}T64'H +%X64;M;k~;fM" ]lVDaŸ{{2EX LrEu` $'kV{XY-ru#'Inb+/=m3sM% kIn)u5B^Jlذ5i*pt]Ij.5ˬIgUAS]]gV+\ "܈Pg,}JP,Ou?AH3KOLIƕІV%FTX hn+lp@C+"R|_aػ %9JQ0jIF 0Z ;)졑w/y*Ŷ-s }=#^ >=HFWMP3\ `0#V޼uүQ:'Q1t!sޣVQ-:G(آ28 |뾀yWhyXZ jI0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Doocx,~R"ݝ {NĆF|R~Z8l+!y%`|Xp=%hmZAo~3Qb{Wv1?(7gaZS9vXH4ah04f#bڼsOk>aPEZNC#ͽ6f)EΚSOf$f%B3Pvw{\rTӘ_&ڴ.NQ)15ϵbʴDz:8 lbp!ӄ" l-c)-c3_kC-'-˳T7dNnYY 4eJ+\k-J}=ŽRװH B} 5uGOɪ -}Q u6+AKZ4u)`1 VىO5goY[/Ζ$sk)gzڠki*~3eS3H2F1M *XuDQJLI!fry ҮҠ<6-hޕ'\~1jӖ#:>l,Ǜz;z@"Tsey>y/Z0#l>ȭ{[Iyڽ4/To=b_p \x "%BE :&1:UU=Y^“^ubtM"b#$]R.]V.BUה֖ 6beԢxFB8bPV79cwŌ3MhZ3u%]bY#~“#u&YZtmpӠJ]`ƈEg.(n=bבk~hP#N'2Xww"e&tcEy8 |vH,t&rq2Kٓ11L!=/2RzƁ߅w!CmݗŨ3 qpx٢3ipB{,ڟe$Va[ġB R[+(o'e,[Ύak cR;_sOwBԙoO,ua 3OTkIN[0v&]A,stm$0uN:o)mKbLS<΃<܉Jϫߒ~iME85:{%^ P(.+mOk}.O+G0@3*<\{l?6%zwwpX>K tR29n/q\'ua?㶷6sBb%0ّpOc@&\:w5_R(-|j5gڎЅ|iVmGh;,> FMwn&. ov{0ґi@qI/Z0O$A<`3:?UmY:d\,9=$!O,.$rbZK(KrV_2O$G%Z ؖlcI'u+%uO,='iblwT) \a-˥?QNbGzliNVNNv&L `B'[~!hsbG1yDً^ @;EStN):EStN):E?/9SIENDB`gdalautotest-3.1.2/gcore/data/tif_jpeg_ycbcr_too_big_last_stripe.tif0000664000175000017500000000244413701057751024505 0ustar evenevenII*S[>   D`[C    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222 Gray Gray Gray N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|"(!1AQq"ab ?# 2x#\a|0rӡYǑ̬!2e$OIa|C IeB!gGPt﹥LZ_'P"% 1A!"BQaq ?V/YA6,q"]$SVT)gI9g\<@A#Ѐ?gdalautotest-3.1.2/gcore/data/second_image_width_above_32bit.tif0000664000175000017500000000047013701057751023411 0ustar evenevenII* S Sgdalautotest-3.1.2/gcore/data/cfloat32.raw0000664000175000017500000000620013701057751017037 0ustar evenevenBBCBCC CCCCBCBCCBBBCCBCBBCB%CB CBBBBCBCCCBCBC CCBB CB CBCBBCCBBBBBCCBBBCCBBBBBBBCBB CBCCCC CCCBBBBCB%CBCBBCCB=C-C-CCCBCBBCBCCBBBCCNCBEC-CC C CCBCBB CCCBCBC-CBBCBCBCB CBBBCBBBBBB5CBBBBCBBCBCCBBCBBBBCBBB C CB CBBBBCBBBBBCBBBCCCCCBBCBBCBBB C-CBBBBBBBBBB CBBBBBB-CBBBBBCBB-CCBBBBBBB=C-CBBBBB CB-C CCCCBBBBBBCB CBCBBCBC C CB CBBBBBBBBBBBBCBCBC%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBBgdalautotest-3.1.2/gcore/data/byte_point.tif0000664000175000017500000000125613701057751017575 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS v F@A̞LAN@N@ cgdalautotest-3.1.2/gcore/data/md_dg_2.XML0000664000175000017500000001233613701057751016573 0ustar eveneven 24.06 2011-05-01T13:00:00.000000Z 000000000000_00_P000 000000000000000 ORStandard2A Multi None 50 50 LV2A Standard 1 Corrected Off 16 None GeoTIFF WV03 FullSwath Forward 000000000000000 2011-05-01T13:00:00.000000Z 5.000010000000000e+03 2.000000000000000e-04 1.315000000000000e+00 1.315000000000000e+00 1.315000000000000e+00 1.286000000000000e+00 1.287000000000000e+00 1.286000000000000e+00 1.301000000000000e+00 2.229000000000000e+01 1.060000000000000e+01 3.300000000000000e+00 2.700000000000000e-02 MTF R R 337 2015-01-01T00:00:00.000000Z 2015-01-01T00:00:00.000000Z WE 6.378137000000000e+06 2.982572235630000e+02 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 Base Elevation 9.166000000000000e+01 0 WV03 Multi RPC00B 1.490000000000000e+00 5.800000000000000e-01 812 850 4.187910000000000e+01 1.257980000000000e+01 95 938 1152 1.500000000000000e-02 2.250000000000000e-02 501 -6.181087000000000e-03 3.510113000000000e-02 -1.109763000000000e+00 -8.245545999999999e-02 -1.574358000000000e-04 -1.151270000000000e-05 3.785618000000000e-04 -1.617343000000000e-04 3.392421000000000e-03 1.557476000000000e-05 2.094558000000000e-07 -6.314111999999999e-08 7.033553000000000e-07 5.121700000000000e-08 2.389848000000000e-06 -1.042301000000000e-05 -1.402098000000000e-06 6.953425000000000e-08 -5.038526000000000e-07 -9.876126999999999e-08 1.000000000000000e+00 4.696998000000000e-05 -3.057960000000000e-03 -8.778793000000000e-05 -3.454986000000000e-07 1.971646000000000e-08 1.083809000000000e-06 -1.723920000000000e-06 9.397055000000000e-06 1.371016000000000e-06 1.647007000000000e-08 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 -3.685579000000000e-08 0.000000000000000e+00 -2.476523000000000e-07 0.000000000000000e+00 -1.941040000000000e-03 1.012973000000000e+00 2.549412000000000e-02 3.146281000000000e-02 -7.701827000000001e-05 4.973536000000000e-04 -2.130061000000000e-04 9.757313000000000e-04 7.164101000000000e-06 -5.137094000000000e-06 -3.021765000000000e-07 9.135275000000000e-07 -5.816734000000000e-08 1.078116000000000e-07 -1.534883000000000e-07 0.000000000000000e+00 -1.318700000000000e-07 9.196606000000000e-07 -3.705506000000000e-07 0.000000000000000e+00 1.000000000000000e+00 9.641438000000000e-04 1.340215000000000e-04 -4.371442000000000e-04 4.849114000000000e-08 0.000000000000000e+00 -6.403717000000000e-08 9.014668000000000e-07 0.000000000000000e+00 -2.387648000000000e-07 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 0.000000000000000e+00 gdalautotest-3.1.2/gcore/data/stefan_full_rgba_jpeg_contig.tif0000664000175000017500000002676513701057751023302 0ustar evenevenII*+   RSC    $.' ",#(7),01444'9=82<.342?(((((((((((((((((((((((((((URA,Ni@,I<;Ҫ` $ޟ2\L,f<MkXxoP#ybi̪[n{wZz-; )mwZVZo$1;"cqE-=3ڽgh}Z \q׺=[==4y(cgC&J\ ?gCO Awl`&q8Ngis=~$֝RxCU=w}kN&2-mp2X=I$ֽgw# bX=rIᧂtaCq{*ͽ`yJ4'Td}>GW1=U?UA<BĞ(%>'W=(TgV&szK&1G/*'C\քO1֚`Gyg?g y/<1~6 ec̬UV 08=k)9ԐQE6(((((C    $.' ",#(7),01444'9=82<.342?(((((HƬU$VjҺ[D]30D}Yxo%S$pcmsA䞕|?*,m'XG$.:0k/.9cw!a Y'u⽗D8>gfʁ<c?3}I5w 7Xp~*ߋ<w!) V\7dq[-fBX)]lUM:KBy =jwkKDy3奶ew-%#H̨ICA`6Hhڧջ7mB SV,& 'Q[A?rZĿ i/Mˏ'? W+urNW+sOtĹ\eqz=3dc qNsU*bMe|KdﳲhZC\*o}fI'2#ӿ}Է;*N:Pey{й tϽ[g Wx>!֧kDa7UfR z 2\]͔1 *QEQEQEQEQEQEQEQEQEIuS uۨYJp ۀM~VW l''VK]l/1✌ᗨ9Q.MOt\5(,H <]5L8^XԹMz/~'8#Ն>c*r?;h8a@0/|'tx mv9S'ʹnh3x2݋['c]F}2Gzk$a2YNhՃ#(;Sn?Zyzah'-VI%Fq\S^C#رy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NB쒡ܬiA : eW˲T6L%O> Қ+F rvP{k d́]Ԟ-p 9[7|hBq{.Rvk1Ti+_Hl(\CC1t4QEaDvS4Q]'o/Ǹ)aP@ퟭ.k\D-yFO N'!MM}˭f*iQ^c[U (6JEQQQEQEQEQEQEQEQEQE-(]qQY%3EQjbNMQ\l>EQ]7Cn(^!89+,C(whѵSQ^#jt++0&()`ӱQEV((((((C    $.' ",#(7),01444'9=82<.342?(qETsc)9QJ\֊(E,S4G En^Aɢ* ((Q(҃XEg,MQTY((((((((((((((((((((((((((((C    $.' ",#(7),01444'9=82<.342?(((((((((((((((((((( t, , |,RS,[!,}kz  {h!M')+C    $.' ",#(7),01444'9=82<.342 }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzgdalautotest-3.1.2/gcore/data/block_width_above_32bit.tif0000664000175000017500000000023613701057751022066 0ustar evenevenII* BCDESgdalautotest-3.1.2/gcore/data/bug_gh_1439_to_be_updated_lzw.tif0000664000175000017500000002047713701057751023114 0ustar evenevenII* =S 0"مzuʀ2;jʧyO0׃XJVQbh~4ۉi-;-\W-`c(``1n噥|}x$DW[uZ`<dJ^ x<-Gᨎ- 3o-,T: @G"$kDtOP@6z(-x&d 0i *EA6@juQy4jAC3iBBl9؁1*>GJL9ItԴ_g6%n+f B"xѮP=c?( c8 [a- $PcМJ aAV:RCDwh&Enf?$aRP$prKFY4M 0 OAxfz vs PѺrGx9hMyC`-yXY!) Dx F6b8l0{&x@,A#5 !rp3(*~bhj:! NAx'x3Eh-lF(^4FXy&h+ơdl`|D 0\al 6ze!p`a`p@G-.~` uuQ87D`$F8&AcGGhBt 9XB\ @1@6 ! 0CD (HV% #| `bv `P "yЊ+`|X0XAJ@UP7! | ~@z"bc0d`!؄\uDv )Ø|[!T 0!'G`B~"Pk & A07 #f%r)pz"T Gf Cq3bM1@ w $H<2A#Ġ#d\Qh&D(M`[Jp `<XpJC2pFA$h6 90E#vp> a`~AXK (5hXN5h %Cpf`,At\,rr`NDCT a µLz2h] G "` H!0jALCnx!lVXceVy CKBp#Gknk(8-^NG[D0hðCGH! 4ExHPH;8D, X+P"$ x8aŰct[N 9@l h'02 $D"AkCrPH ?bE d^CBL3'pP0@B$q*-Xnj^2\`B@z!hr|`:a&`ttj`0 @N`6<AP8@ `@8a"*!!j6 RVaAT Az!A\ FA ! |!@ thdAN@`A@^ !>!!!H@ !R@ $`hV4 A Al, `. L &@& `$At!"  X1d> @ Aa a.X  8@"j2! 8Ab`h*nj!f,`*h  ~@ ``ih`Da`j@a @ v p* a`@! !k ji.@؞!d`* ^``jFA J a`T A>J(\ (`$ !V a!aT` A>Aa!@r0$@aBAA $,A>`b @ !,"a a.>| HXXx$Z j bz ( `J @ NP !a,@ Aj6va` @"z AZ8a@j AX@j A8 " A:*@f  xa@!@A|A T` 2 ` `@   PH^pab d   A>4>vrA! ap@`(R aс8 !Za!l  DH fA $@ `^.A^Vx La& ^ !4`a Z @h Db BA Aa`( a^`A > FajR!* h* at,T A&a!  !R,\A|!| Z`!hp  @ a@ `f fTHaHV"@J b (:!P`ġlT@a  aS 0 `Hld@ X  v @ !.xajVp A Al | ,W5U `"@&a! @AN Axaaa@@ jj R2~q\PnV*:!d A @tXz\@ `NV `0Ab 2 aAvA hP @b * ad Ax @\, ^bAa!@:8 anJj$@x.t `Ah26@{`~N@aT!I`,@R@` t| h alB  A v`d !8b @@f @ >Ah!@P > |Nd"!d {*!T AL va!nLz!!ht`!<z ݱF!``! `! x  @L  n @ c`aaV!H@ `DP !*` !@:n! `j  A@@X v`   apba R!$aZ8@@   pj@RA <Az` p~  AzH: .@$`.AhF b `@| :  ~ @\!@z av, ~hP@ ` a  !j A!hrje@$j4a H !`~!a\ j  0@!|B"@A.d  D d-:؁Zux~A* @ X,b.ӄqC5C(j6DQqxVCpaD$%׭r4: +'R%q8 d1LD<E'CXgGl?3 w,1"gZ1XJmK-n-#JœxM:JT\e:6-(" D6M b&c4{>}r $%'4( e+0"$Qڃz[a"R1BPa|eXqcv|XHKpDC!Dt`Zq>&%2HA4x), T7@ dE p`fybHrH\h c7j.`)xa@@Ю!2q::D!b!oTG`ZD`9Z_S%Xf<aj |q pRt hC1 f(G&.B% '^d |a7Ɋ E$'+w8} L٠ex5fDchrQLTb4tqV5B%xV07e@sa,\ 1l!(yFx($xE.0R #_=%pF"(Ĺj$8 i"Bavl'k0*^&p ~ <F:. $6Ac F D9vQ-Ecr.^b0 <#1}aC eb>᙮;C)_!HN¨ /f{٘8@)_TW CQ< F(" 06@G1 Èt`=C8X h@l`%pYPw@ 1 8<B#G8 _ m $h *PB]p. 0,@28e&)C$ n8"MCP@,p*P-.è!(O25DH "3p,8A"@"R`!qa.co*@`L Ac" @ E."@x`04! PM c !2h ~0 J>,PBT @'XU/l A x_ ` 5AjC5  4؟<q;4 pr8% =P(8`Dp(A,{ TAX2j@$+C Q8" 4lt f5L К p/@`  %2He4h89F * }:<P  B?$hc|"pU Jxa5 18C<chmEHBXOG |0[T@=(Zb\ Gؕ#`x"Ph P<1c FAZ /a[ -C Gq@$ !#BL1i &@ @ 0/p tj pRT;AЙ0[d%,bj ƀXx nb,@ *DE ( h Ǩ`_j<V^f?x YQ# }90r"XA{ 1h2HP)`8Du 4]@ `X aB ~@ ъ X?LXp ExJ@Uq PCl& p.BA@3 )pZ{& A|# acHHDHAȶB'2"Cv Z` :z|*yU>qF'%>avt>metersPulkovo 1942(83) [To WGS 84 1]8@^W>:z|*yU>qF'%>avt>feet&'nary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.&1!Z4RasterDMSEdms_Statepccc<<ccc<cccccرcc رcccرcccc<<<رccc<<رcc\AɍWAw"L\AWA"@@@@"meters!1!$.#ProjectionEprj_ProParameters D#Transverse Mercatord#??8\A# #Krasovsky@TXAޓ3?XAj{?@TXA"$_DatumEprj_Datum $Pulkovo 1942$fffff7@a9T¾2GѾ+i)+1!- z%v%GDAL_MetaDataEdsc_Table&$%#Bin_Function#Edsc_BinFunctionz%$&ELEVATION_UNITSEdsc_Column$ion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,{1:*oEprj_Datum,verticalDatum,0:pcelevationUnit,1:e3:EPRJ_ELEVATION_TYPE_HEIGHT,EPRJ_ELEVATION_TYPE_DEPTH,EPRJ_ELEVATION_TYPE_UNKNOWN,elevationType,}Eprj_ElevationInfo,.gdalautotest-3.1.2/gcore/data/float64.vrt0000664000175000017500000000253513701057751016732 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray float64.tif 1 gdalautotest-3.1.2/gcore/data/rpc.vrt0000664000175000017500000001556213701057751016243 0ustar eveneven 16201 15184 97 39.7792 125.7510 16480 15217 501 0.0900 0.1096 +5.105608E-04 -2.921055E-02 -1.010407E+00 -1.743729E-02 -6.604239E-05 -7.871396E-05 +3.027877E-04 -4.323587E-04 -2.624751E-04 +6.186490E-06 +1.084676E-06 +5.389738E-05 +4.145232E-06 +3.911486E-07 +1.772434E-05 +3.302960E-06 +3.006106E-06 +1.662606E-05 +6.051677E-06 -2.657667E-08 +1.000000E+00 -9.652128E-05 +2.488346E-04 +3.089019E-04 -2.120170E-06 +4.117913E-07 +1.370009E-06 +1.357281E-05 -4.174324E-06 -3.146787E-06 -7.724587E-06 +3.524480E-04 -1.303224E-05 -8.507679E-07 -1.670972E-05 +6.781061E-06 +5.602262E-07 +1.161421E-05 +4.681872E-06 +5.593931E-08 -2.429563E-04 +1.028320E+00 -3.360972E-02 +3.519600E-03 -6.568341E-04 +5.951139E-04 -3.875716E-04 +1.260622E-04 -5.273817E-05 -4.418981E-06 -3.520581E-06 -2.502760E-04 -4.167704E-05 -5.973233E-05 -1.438949E-04 +7.603041E-06 +2.358136E-06 -2.275274E-05 +1.602657E-06 -1.716541E-07 +1.000000E+00 +7.765620E-05 +6.568707E-04 -6.270621E-04 +5.163170E-05 +6.979463E-06 +2.476334E-07 +1.083558E-04 -4.043734E-05 -5.819288E-05 +1.778201E-07 +5.665202E-05 +6.927205E-06 +6.793485E-07 +3.604209E-05 -4.057103E-07 -8.291254E-07 +1.010650E-05 -2.875552E-06 +5.142751E-08 "R" 2006-10-20T08:42:31.000000Z "005553965230_01_P001" "ORStandard2A" "P" "None" 32380 30324 "LV2A" "Corrected" "Off" 16 "None" 125.64811494 39.86920881 97.12 125.86059820 39.86415940 97.12 125.85336381 39.68933367 97.12 125.64141633 39.69435205 97.12 4.656600e-02 3.980000e-01 "GeoTIFF" "QB02" "FullSwath" "Forward" "1010010005448B00" 2006-10-20T02:50:52.250677Z 6900.11 0.00260865 0.679 0.651 0.665 63.87 37.90 170.1 39.7 192.3 70.6 -17.8 -1.0 17.8 4.4 0.036 "CC" 18 "R" "R" 28119 2006-10-20T02:50:52.526006Z 2006-10-20T02:50:52.526006Z "WE" 6378137.0000 298.257223563 (0.000,0.000,0.000) "UTM" 1 51 "N" (0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000) "M" 726487.50014544 4416597.29999868 0.0 0.60 0.60 0.60 726487.50014544 4416597.29999868 97.12 744681.30024945 4416597.29999863 97.12 744681.30024444 4397169.89999862 97.12 726487.50014252 4397169.89999869 97.12 "Base Elevation" 97.12 0 byte.tif 1 gdalautotest-3.1.2/gcore/data/minimum_tiff_tags_with_warning.tif0000664000175000017500000000006413701057751023676 0ustar evenevenII* gdalautotest-3.1.2/gcore/data/rgba_with_alpha_0_and_255.tif0000664000175000017500000000064513701057751022171 0ustar evenevenII*RS   &/fN@N@@ALA# Wh )#NAD_1927_UTM_Zone_11N|GCS_North_American_1927|gdalautotest-3.1.2/gcore/data/dstsize_larger_than_source.vrt0000664000175000017500000000257713701057751023074 0ustar eveneven PROJCS["WGS 84 / UTM zone 11N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32611"]] 1.3468857985001034e+05, 5.0009600968988252e+01, 0.0000000000000000e+00, 4.0103732789101200e+06, 0.0000000000000000e+00, -5.0009600968988252e+01 Gray dstsize_larger_than_source.tif 1 gdalautotest-3.1.2/gcore/data/small_ov.img0000664000175000017500000005145613701057751017236 0ustar evenevenEHFA_HEADER_TAGI@&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.?MAZPRasterDMSEdms_State0p/k{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{ksss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{s{ksc{skscZk{cs{Zcccc{kskk{kssk{Zsŭc{sc{{ssckk{ckkcsccZcsZss{{{sν{s{{kssksc{cck{kcccsZ{sksskss{s{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{ccs{kksks{{k{kskscskkssks{{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{k{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{c{{k{ckksskckZ{ksss{ss{ksssk{ccsccs{c{ssc{kkcs{s{{skk{֜ŽkZkskZc{sss{{sc{kckk{{ssŵ{{νΜ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ŝέ極ޭs{Ŕεޭޥ޽ΥŽŽέ֭ΔŵޥֽνŭŔssΔέńBΥννΜνť΄Όk{ccť{ŵֽŜΔŽޜZkŭ{挌ﭜŜޜޭΔﵔťsޥ֥΄Ōc{ŔŭŌΜŔ{Rcֵ֌{֜Zֽ楌ΜΥsέέ{֔極{ε֔ť{kέ޽{ޥΥŔε{Δ楥ޥŜŭΜŜ{ֵ֥޽Žŭޥεk朔{ŽֽεΔŽŵ֥ťޭŜ歭{ﭵkŽŭŌkŭsν楜sΌŔ޽ŭε֥ťs֭Μks֥{{ޭΔ{Ό|ޭŵ{Ŝ{ޭތΥ֥ŭŵŵΜ֭ŽŌޭ֔Ŝ{ޔνŌέބεޔֽŵŜ֥έkޔŽťΌֵťsֵޥֽs{֥ŵֽΜŽΔΜތ΄省ΜΜ֭Ō攜ޥεޭńŽ֭ŵŔ{Ό޽֭ŵ֭sֵŔ޵ֽŵ޵޽֔ŽεŵεŽŜֽŭ֌ތνŭεﭽ掠έc{kޜs歜ťένΜsk{s޽{{攥Δޭޥ{kέֵŵΜŌέŭ޵քΜ֔εŵεJkքŵޭ歵޽s֭{{{sֽŽŭsνޥs{{s֔{{ŵֵŌ{ֵֵŌޜֵ攔ŭŜﭵﵜ{΄֜ޔέŽέ{έޥޭΔ޵޵{{ΔŔֽŔŵ{޽ńքs֭kޜ歭޵ťֽΜ֭潽޽ŭޭ{sֽŵŔνޥΥ֭֜έ޽έΥ޽֜ŔνŌŽ{έ޽֜ޔք{νŔŭ{ޜ{ť歵s{έŔ޵{ŔޥΔ޵քkŭνֵŭsŵ{ֽνŵε{ޔބ{Žޜ{֜ޔΌέksέskﵽń1skń{{sΌŭ﵌֭Όscޥ޵sZBcťkc֔s{{kcń樂c֜ťŽŵ潭Z{{֥ťs{cޭsޭŜέkε֥ŭεέsck{ν֌sν޵ťތ{{sΜ楌ֵ{{s{kŌ΄֌sk{{ksńk{{έֵ֥Ŝcsks{s{sscs{{{{{{sksk攥ŭs{ބΜΥΥΥΌcΥsνΥ{֭ν挭ֵνŽքΜŽΥέֵオν޵{֌ﭜބ極Υ޽ksk{{{kΥ޵kŭŭνŽތΜŵŽﵽ֌Ŝ޽ŭ֭{ŽAMA*@Ehfa_LayerEhfa_Layer0@{4096:cdata,}RasterDMS,.@rootrootMAI@IAIMGFormatInfoImgFormatInfo8310E@I@ALayer_1Eimg_Layer@@@B?MAaBtMap_InfoEprj_MapInfoiBNAD27 / UTM zone 11NBALABiA[LABN@N@BmetersFAMA/DUCProjectionEprj_ProParameterskCUTM {C?C DClarke 1866TXA333?XA^s{?TXABDcDatumEprj_DatumDNAD27D Enadcon.datAreaMAI@EEGDAL_MetaDataEdsc_Table9FEF#Bin_Function#Edsc_BinFunctionEEFAREA_OR_POINTEdsc_ColumnEBMAGG RRDNamesListEimg_RRDNamesListOGIMAGINE 2X2 ResamplingnGvGsmall.rrd(:Layer_1:_ss_2_)gdalautotest-3.1.2/gcore/data/test_average_palette.tif0000664000175000017500000000730413701057751021610 0ustar evenevenII*. @S @Sgdalautotest-3.1.2/gcore/data/int16_2.hdf0000664000175000017500000001061613701057751016562 0ustar eveneven j\    < &! G K< !j    2 7 ;; vI F  < U8NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 int16_2.tifCDF0.0gdalautotest-3.1.2/gcore/data/md_eros.pass0000664000175000017500000000034713701057751017235 0ustar evenevensatellite EROS-B1 camera NA50 sweep_start_utc 2013-04-01,11:00:00.00000 overall_cc 0 detail_cc 0 cc_ul 0 cc_ur 0 cc_lr 0 cc_ll 0 gdalautotest-3.1.2/gcore/data/int32.hdr0000664000175000017500000000036313701057751016351 0ustar evenevenENVI samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 3 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1} gdalautotest-3.1.2/gcore/data/byte.tar0000664000175000017500000002400013701057751016360 0ustar evenevenbyte.tif0000644000175000017500000000134011364624556011213 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS R jN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/uint16.vrt0000664000175000017500000000253313701057751016577 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray uint16.tif 1 gdalautotest-3.1.2/gcore/data/classictiff_two_strip_be_short.tif0000664000175000017500000000024413701057751023706 0ustar evenevenMM* Sstgdalautotest-3.1.2/gcore/data/pixfun_sum_c.vrt0000664000175000017500000000174113701057751020150 0ustar eveneven Sum sum uint16.tif 1 cint_sar.tif 1 cfloat64.tif 1 gdalautotest-3.1.2/gcore/data/bigtiff_header_extract.tif0000664000175000017500000000037413701057751022075 0ustar evenevenII+ 5 Sgdalautotest-3.1.2/gcore/data/uint16_2.hdf0000664000175000017500000001061713701057751016750 0ustar eveneven j\    < &! G K< !j    2 7 ;; vI F  < U9NCSA HDF Version 4.1 Release 4, December 2000k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 uint16_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/nan32_nodata_warp.vrt0000664000175000017500000000441113701057751020746 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32631"]] 4.0000000000000000e+05, 1.0000000000000000e+00, 0.0000000000000000e+00, 5.0000000000000000e+06, 0.0000000000000000e+00, -1.0000000000000000e+00 nan 512 128 6.71089e+07 NearestNeighbour Float32 nan32_nodata.tif 0.125 400000,1,0,5000000,0,-1 -400000,1,0,5000000,0,-1 400000,1,0,5000000,0,-1 -400000,1,0,5000000,0,-1 nan 0 nan 0 gdalautotest-3.1.2/gcore/data/excessive-memory-TIFFFillTile.tif0000664000175000017500000000262213701057751023076 0ustar evenevenII*BCDES   6vN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkksk{ssk{{c{s{sks{ks{{s{s{s{ksksss{{{ks{ksc{sŭc{sc{{s{{kssksc{{ss{s{{csc{ccs{kksks{{{c{kcs{{k{{{k{{ssZkkkkkc{{k{ckksskck{ccsccs{ckZkskZc{sss{{{kkkscsccks{scskskssk{k{sccksskk{{{{kc{sk{scsZ{ssZcsZcckc{cs{Jsc{΄k{{skkkkckck{k{ksckgdalautotest-3.1.2/gcore/data/sstgeo.vrt0000664000175000017500000000215513701057751016755 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4326"]] data/sstgeo.tif 1 0 1 data/sstgeo.tif 2 0 1 Gray -32767 sstgeo.tif 3 gdalautotest-3.1.2/gcore/data/epsg26730_with_linear_units_set.tif0000664000175000017500000000136613701057751023445 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS  R ":&Aoh 1Aߣp= ?ȣp= ?# jh +#NAD27 / Alabama West|NAD27|gdalautotest-3.1.2/gcore/data/cint32.tif0000664000175000017500000000672013701057751016524 0ustar evenevenII* k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck@ S B Z   N@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/test_rpc.txt0000664000175000017500000000713613701057751017304 0ustar evenevenLINE_OFF: +015834.00 pixels SAMP_OFF: +013464.00 pixels LAT_OFF: -42.86070000 degrees LONG_OFF: +147.25880000 degrees HEIGHT_OFF: +0300.000 meters LINE_SCALE: +015834.00 pixels SAMP_SCALE: +013464.00 pixels LAT_SCALE: +00.07150000 degrees LONG_SCALE: +000.08280000 degrees HEIGHT_SCALE: +0970.000 meters LINE_NUM_COEFF_1: -5.396368863150944E-04 LINE_NUM_COEFF_2: +2.627711654471593E-03 LINE_NUM_COEFF_3: -1.002878365030092E+00 LINE_NUM_COEFF_4: -3.403033110765838E-02 LINE_NUM_COEFF_5: +5.236585985386163E-03 LINE_NUM_COEFF_6: +2.100573285690368E-03 LINE_NUM_COEFF_7: +3.116646954215110E-03 LINE_NUM_COEFF_8: +4.062679628915546E-04 LINE_NUM_COEFF_9: -5.500898738846068E-03 LINE_NUM_COEFF_10: +5.262025538628248E-05 LINE_NUM_COEFF_11: +2.595870786562705E-06 LINE_NUM_COEFF_12: -2.236321986531990E-06 LINE_NUM_COEFF_13: +2.028224523347030E-05 LINE_NUM_COEFF_14: -5.240094084170959E-06 LINE_NUM_COEFF_15: +2.169130236379565E-05 LINE_NUM_COEFF_16: -2.360025540323606E-05 LINE_NUM_COEFF_17: +1.567039324774875E-06 LINE_NUM_COEFF_18: -6.140955761839389E-06 LINE_NUM_COEFF_19: +1.842219178666101E-05 LINE_NUM_COEFF_20: +2.016157744853291E-07 LINE_DEN_COEFF_1: +1.000000000000000E+00 LINE_DEN_COEFF_2: -5.207696939454288E-03 LINE_DEN_COEFF_3: +5.491384701857780E-03 LINE_DEN_COEFF_4: -4.727180074393679E-03 LINE_DEN_COEFF_5: -2.020573655432083E-05 LINE_DEN_COEFF_6: +8.395096049908390E-06 LINE_DEN_COEFF_7: -3.437283172911763E-05 LINE_DEN_COEFF_8: -1.945981417186446E-05 LINE_DEN_COEFF_9: +2.356606160184157E-05 LINE_DEN_COEFF_10: +3.716539248344547E-06 LINE_DEN_COEFF_11: +7.084068533515953E-08 LINE_DEN_COEFF_12: -5.720023734630433E-09 LINE_DEN_COEFF_13: +8.713633855611634E-09 LINE_DEN_COEFF_14: -4.390823433854830E-09 LINE_DEN_COEFF_15: +1.391612952975369E-08 LINE_DEN_COEFF_16: -1.249149641244712E-08 LINE_DEN_COEFF_17: +4.617114319884902E-08 LINE_DEN_COEFF_18: +1.700675693818975E-08 LINE_DEN_COEFF_19: -2.374499913161109E-08 LINE_DEN_COEFF_20: +9.054600849900734E-10 SAMP_NUM_COEFF_1: +1.213864291061065E-03 SAMP_NUM_COEFF_2: +1.004765220558402E+00 SAMP_NUM_COEFF_3: +3.630405784792365E-03 SAMP_NUM_COEFF_4: -3.370205555837898E-02 SAMP_NUM_COEFF_5: +6.658085265327544E-03 SAMP_NUM_COEFF_6: -3.622524618488598E-03 SAMP_NUM_COEFF_7: -2.511746391245581E-04 SAMP_NUM_COEFF_8: -5.232329647398484E-03 SAMP_NUM_COEFF_9: +1.746291301991781E-05 SAMP_NUM_COEFF_10: +1.310497157498372E-04 SAMP_NUM_COEFF_11: -2.802990027621599E-05 SAMP_NUM_COEFF_12: -1.952735465610529E-05 SAMP_NUM_COEFF_13: +2.919770377248328E-05 SAMP_NUM_COEFF_14: +2.787361173742650E-07 SAMP_NUM_COEFF_15: -2.640057594230422E-05 SAMP_NUM_COEFF_16: +7.082777646638441E-08 SAMP_NUM_COEFF_17: +1.122115749459905E-06 SAMP_NUM_COEFF_18: +1.153307732758342E-06 SAMP_NUM_COEFF_19: +7.154634160111926E-07 SAMP_NUM_COEFF_20: -2.427419939623720E-08 SAMP_DEN_COEFF_1: +1.000000000000000E+00 SAMP_DEN_COEFF_2: -5.207696939454288E-03 SAMP_DEN_COEFF_3: +5.491384701857780E-03 SAMP_DEN_COEFF_4: -4.727180074393679E-03 SAMP_DEN_COEFF_5: -2.020573655432083E-05 SAMP_DEN_COEFF_6: +8.395096049908390E-06 SAMP_DEN_COEFF_7: -3.437283172911763E-05 SAMP_DEN_COEFF_8: -1.945981417186446E-05 SAMP_DEN_COEFF_9: +2.356606160184157E-05 SAMP_DEN_COEFF_10: +3.716539248344547E-06 SAMP_DEN_COEFF_11: +7.084068533515953E-08 SAMP_DEN_COEFF_12: -5.720023734630433E-09 SAMP_DEN_COEFF_13: +8.713633855611634E-09 SAMP_DEN_COEFF_14: -4.390823433854830E-09 SAMP_DEN_COEFF_15: +1.391612952975369E-08 SAMP_DEN_COEFF_16: -1.249149641244712E-08 SAMP_DEN_COEFF_17: +4.617114319884902E-08 SAMP_DEN_COEFF_18: +1.700675693818975E-08 SAMP_DEN_COEFF_19: -2.374499913161109E-08 SAMP_DEN_COEFF_20: +9.054600849900734E-10 ERR_BIAS: 0000.31 meters ERR_RAND: 0000.25 meters gdalautotest-3.1.2/gcore/data/empty1bit.tif0000664000175000017500000000043413701057751017334 0ustar evenevenII*    S    Sgdalautotest-3.1.2/gcore/data/pixfun_diff_c.vrt0000664000175000017500000000135713701057751020257 0ustar eveneven Difference diff cint_sar.tif 1 cfloat64.tif 1 gdalautotest-3.1.2/gcore/data/int32.raw0000664000175000017500000000310013701057751016355 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/int16.tif0000664000175000017500000000216013701057751016355 0ustar evenevenII*(k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck S  *ZN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/md_ls_MTL.txt0000664000175000017500000000111513701057751017262 0ustar evenevenGROUP = L1_METADATA_FILE GROUP = PRODUCT_METADATA DATA_TYPE = "L1T" ELEVATION_SOURCE = "GLS2000" OUTPUT_FORMAT = "GEOTIFF" SPACECRAFT_ID = "LANDSAT_8" SENSOR_ID = "OLI_TIRS" DATE_ACQUIRED = 2015-09-01 SCENE_CENTER_TIME = 17:00:00.0000000Z END_GROUP = PRODUCT_METADATA GROUP = IMAGE_ATTRIBUTES CLOUD_COVER = 1.09 IMAGE_QUALITY_OLI = 9 IMAGE_QUALITY_TIRS = 9 ROLL_ANGLE = -0.001 SUN_AZIMUTH = 139.45771403 SUN_ELEVATION = 56.31165874 EARTH_SUN_DISTANCE = 1.0011798 END_GROUP = IMAGE_ATTRIBUTES END_GROUP = L1_METADATA_FILE END gdalautotest-3.1.2/gcore/data/slim_g4.tif0000664000175000017500000002603613701057751016762 0ustar evenevenII**   )(1@SIMAGINE TIFF Support Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01EDT $&s Iy@2]R#:\C#6e.z~߰=l?{ ˥V}\5@((<"` DH bz}=0GOzA'ooKmv%GA0`]-aa , hP@S8B`l D\ bNdu 4G@GO!A&o_~[kKa X"ح5@pO?@ *4/^X Cx{@F!l@e˾E 8l{k ?o~o~LJk}|>@ Ñ@9B"Tq[xeњ#;Z A0(P b,)LjpogC6Ӡa`r ! a78vx wQ| ^(|@!8hpB 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1999 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01EDT $gdalautotest-3.1.2/gcore/data/stefan_full_rgba_pct32.png0000664000175000017500000003111313701057751021726 0ustar evenevenPNG  IHDRgAMA1_PLTEZY'/>D"6 "         J "]I`   )g 7F f /WJNk(( 9^ ,}|r}/(?>t'6 $[v!M1ItI/ *r Ld>!4zXo .`Jb%F-RH7 Ip0m$~'5>W*_% 9 '(PZ("  I    9}tRNS y)&j# +]VF2xJDz }~>^.nT,[؎ٮm}hrY_N)M) F/bң \9Y/k0MbTsook[򬃮!G-K_X4.]N>|` wg]-)?8t.ѐ@L~;0u{6qO_1ΐZg*+yI/#l^޶{^} w?+u(\ڍClgdBQJ\Uݴi O7 GiŐ8νCTN6I1p>-!zERYLD]4ll]Кۅ4]?#g// 7BLw]1)Qձ՝v_|dzZvحm}@Op'Eo Ȫ/1㙸{XJMREM$EGMeS.klE 8p GBx"(-ck2/MWlu=+io8%ܬ\O*zjcX%'?Svtc- +k/7Vnd! TR,qt_  qnt+uD\Or=_#ISU-ͭ.[v=TU=#K@mז qOD\q#'VWu''9~O V S%Yy$dM?KX:=ՐN>X|7<#X \e))D¦WUCpC|CHE bT֝dtx p8uݲWȃZ^nʀ6+!B x7pK=9=0}࢓'|#Wz%O np\4^\\ltdd.e*7BP*BXcfR>q WS3H}2^0g:⎣{vzug!/uu!F(+PՒ0I3cغ<kH"L3|<Π1[\D[EOSB:o$r86xnOkML\ZXa-B_M4R3?1=j x f[0XO& 1 REmyvw>!RGxۓw70cl< c7\[VĠWV4z(f d[9y pV_1* !gښ 6?m8 #i+lǷHV.>Q;QuEHI({h4@>jB$czdEmC Ǒkmo}?̕[τ"M4Q@K%:tTHS͕ .g%;[ZTBennD)4! aI1e vE-qi^(u0O..W<xȩ;ء~{=Ir9=merE;xO'%-'O>Vv.nnQE}{dOlFCW#7@WA]˯}~tم]Q쥋T;& bVv+o`'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qO**2*L#T jrILf)Pט2Mh+ׯ,ACؾ~}LW@^2@y6r d8<Ԕ[5 otACT<'5%YJwOjsȫmaСYai }1i7iX=`  4؈5`[IlkZdc bR[Q&_<1]W)g L\/kQ0P7bpu=l4 U]Amj*  [K?7Mm3[svIqDpqpΪR"#H5Z4>4#/%*OB8 Da*n*.7 k[Ƿ?kd{ -Ħ#T~X@<.8̞֩ſh@ DiU1(+c ֳ6\3V1;Dk*~mj ?'S}Z"o{i Y]Wh;'fn}Ϟoݽ4-ϞY\CJ],/*jpW 񂂓ŎC@ӋWӻefAD! sW;b 7{ #g%|ZG2<oS j}}8^F,{fTtpp[x<,a7y] ٹUP tY! ?l!(}dCH@@Q`'j [|<ܟwVu aS<<̆ןXYoMƹpĠNIENDB`gdalautotest-3.1.2/gcore/data/right_bottom_vrt_subpixel_offset.tif0000664000175000017500000000071213701057751024272 0ustar evenevenII*  f dS   JN@N@(ALA# Wh )#NAD27 / UTM zone 11N|NAD27|kpwyqw|\mjx~u}iigovt}ev}rt||{qpinttquhcadfww^n~^`eu~~xu~zuoqomgdalautotest-3.1.2/gcore/data/excessive-memory-TIFFFillStrip2.tif0000664000175000017500000000036413701057751023365 0ustar evenevenII*llK=S   2 r xA (LJXBa+ީë/X38,gdalautotest-3.1.2/gcore/data/one_strip_nobytecount.tif0000664000175000017500000000414313701057751022052 0ustar evenevenII* Sgdalautotest-3.1.2/gcore/data/float32.vrt0000664000175000017500000000253513701057751016725 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray float32.tif 1 gdalautotest-3.1.2/gcore/data/1bit.bmp0000664000175000017500000000027613701057751016255 0ustar evenevenBM>(  0x 0 00x 0x 0 00x 0x 0 00x 0x 0 00xgdalautotest-3.1.2/gcore/data/test_gf.tif0000664000175000017500000000145213701057751017052 0ustar evenevenII*4  $,4<(2D X p$B<HH2008:01:07 21:21:42??<)A@A  )# k )Image Data|NTF (Paris)(France - onshore)|NTF (Paris) / France II|gdalautotest-3.1.2/gcore/data/size_of_stripbytecount_lower_than_stripcount.tif0000664000175000017500000000025513701057751026747 0ustar evenevenII* SsZgdalautotest-3.1.2/gcore/data/ycbcr_with_mask.tif0000664000175000017500000010625213701057751020573 0ustar evenevenII*΂KBCDES  TN Q.' .f@' .f@U4b]㭳zQAH#        )#    H@@@TXAmtr@unnamed|GCS Name = WGS 84|Datum = unknown|Ellipsoid = WGS84|Primem = Greenwich|| KBCD2E"SIʊċC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" ?((((((((aiUcG^N:WgKFb2͐8*pFx}2a]^ǙQ_G?;b˩]^R17b9ʿ8GWH-#MI3TAaק墹.i,M@KA82^EuWsm-WI|8zn5"]<\>_I5 GȞcǧ^C kv]CZaE`{b_-ެ*1ƊӅ(H$kЮVh `aORi6R>zWk0z(4a)Ik#?XFkHY9-$9Odžlkh4B ,^o=12@DԢN&ayjuWӔ]@~cn$bh<{kZ6崍E7ikwi Q6rp0@=+&iѤVQ*EH @;ޣ[&7 R0 c3j9W q^}qee$ :aƱo.2I#QJ̬@lm\Éf*{zWaN|.VsfE3G浏Fu[ Ы3ӑ&8SLbq{Ǧ?JMUZF:NRv>E+>(((((o ~!.\\|\F \Aǩ=hnۃv2jk[K녷vBp2p=?zpY2nsR!r3pT 3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ԗj*3R7wkCޢgiOQؤXF8NԠT(ޕV9-HwWX뚴FM6@Tum h[㞝HI\NF=+b i3e˨8G$N)uI#֒9dx-Q_}@QEQEQEQE^mkoXu랹G2[]BD$n+)0=kz 6ig SOᱼ+z[=F lRAACgY.mqB2t?Ӄ[6ڊ\:H[j!mF,bD5av N$$+z8~ݎzZu{\JO:US.ו"$2ڃ[H8Rx5>"5B$=qJq='Nz5v֖s[(i+zPN(XP(((((((kJ>Bh\*S8Sp0;{WaxK)i=z7w\ ך]4qu)8(}0pe9v"A׊k,v$rVYt*fy^= ۓN%#k?7n@#TU1#)齍GpcgÁܰ0oR3CٷSU5Cuy9HJa.mpVQ?/u9[sAh>Ut<}.;˫wF-'νF:@ r+5v=}R%B L2ݚR=?3v\`$6M;q\01N?o*`1k,UTqX{k \x!e_Iϯ&J|Ep-Go,-X{#o*pY\N(=(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((C    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" ? Xg?ZbKh.6rrY-!]%,|c{bL)GSd>  SZ(_ c[F Zw^2rv>MHI fȽjr+e8ncL 8j2"^6gڝUD{ڒq7خ/y{ ;.l(ڟ[PTr[KYZH gkx)I\ B*ުQ}[v1\NcBG~j7qGz^k[EDiݧ;$5ٲ&錀sq&##խe, b!zաJ 7".EnB\νpi13GQa)~VUy"˅!SOAWeO{(Qrz _rkO[uaSg\ت͝L3اKIs)?1T^>zE6u$QEQEQEQEQE}ʙb~!%WAX:43KxF WM"B<wfͽ+,ԸB 9oCx#ԌW۟K}`d0*\|qQ #BU^w&7kpDH/g8'u!KZY;ۿXOsކԷ6QnYULET^ E)9;B1QVK@) ((((((4aߩ-69U(s}(7V|:5QX=WXk;#sEi0;kOr@?[i}>-7>~zʃV>PmҞQLse[>.=U$m =rzK_y9zZ2A,dy$u$`~U [97# 5чάc.eWwCa ,;5e@Ecz$ա{E& QVпt7pBW?#O9ꯈ5(Xԫ Q,q=s+ռvÈzwzF* ;-cYҭDӄ.Qxs^qxQ-d{k2Hڄq9x9ki幕WFʼnuӬGC OŠ(((((((((0W)jqWc|?Hi:X߷迴m|-}OIGU_Bkn[]m~`$=YF?*ǚaW#\M7}e6C'ٗvU#ak?]biU~\9 pG==klK >THyrYyB2g/jkq}vK߆}Fj;o&߅[lOja›E{Z6w8*ON:v#wSЧ<ژKR4m;9M X'nkB;߉}|5㳗߈C>||-;~*୯nE>~FϮ7^ŗe6#zwޝxH<$C!x{"wG#H|$>OA|$>ǛxH|ӹyTC!OH}>RG#H}>Rwd{AGW&~s\z^{}~Ⱥ=dݞv{˺=`/dޏ+gn`I/Is/#6QoII/Im>gA*^nq:߮I/6yO`ON='\ w np'p7 xo|;+W xMz% n??f/u:t:nv%^Q~FN?r_fݒIS@N9#䔿[5s(#[\^[N19ӖtsAK2WI^xһ 1 PWţ >}(8#א;9]~l Oqc~Mod@Fd@F$>wX`ywOx3p{3p{3p{3p{3 ^^^8Ops89xhw􅼣'qP08(  FׂG'N> %/s@\ {~/ ~7抢(((((|jxұ D+( 2wbNoF,+WW%^^}N// މ7x!ng_'Ao+q;">x#^zx=t+qx惇a>x{8{罜=<<<<۽/g9F7rs=}?gdalautotest-3.1.2/gcore/data/classictiff_one_strip_long.tif0000664000175000017500000000022313701057751023005 0ustar evenevenII* Ssgdalautotest-3.1.2/gcore/data/byte_rle8.bmp0000664000175000017500000000304213701057751017305 0ustar evenevenBM"6(    !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~sksck΄k{{k{k{{cs{Jsc{csZcsZcckcck{k scscckssZ{s kZkskZc{s{{sck{ccsccs{c{c{{k{ckksskck{ k{{ssZkkc{s {c{kcs{{k{kccs{kksks{{k{{ss{s{{csc{ssk{s{{kssksc{cckŭc{sc{{ss{ksc{sks {{{kk{{{s{s{s{ksksss{sks{kssksksk{ssk{{c{ck{s kkk{sgdalautotest-3.1.2/gcore/data/verylongfilename.tar0000664000175000017500000002400013701057751020763 0ustar evenevenaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/0000775000175000017500000000000013471526041017125 5ustar evenevenaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/0000775000175000017500000000000013471526041026562 5ustar eveneven././@LongLink0000644000000000000000000000016500000000000011605 Lustar rootrootaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccccccccccccccc/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccc0000775000175000017500000000000013471526041032456 5ustar eveneven././@LongLink0000644000000000000000000000023500000000000011603 Lustar rootrootaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccccccccccccccc/ddddddddddddddddddddddddddddddddddddddd/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccc0000775000175000017500000000000013471526041032456 5ustar eveneven././@LongLink0000644000000000000000000000032300000000000011601 Lustar rootrootaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccccccccccccccc/ddddddddddddddddddddddddddddddddddddddd/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccc0000775000175000017500000000000013471526041032456 5ustar eveneven././@LongLink0000644000000000000000000000040300000000000011600 Lustar rootrootaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccccccccccccccc/ddddddddddddddddddddddddddddddddddddddd/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/fffffffffffffffffffffffffffffffffffffffffffffff/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccc0000775000175000017500000000000013471526060032457 5ustar eveneven././@LongLink0000644000000000000000000000040600000000000011603 Lustar rootrootaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ccccccccccccccccccccccccccccccccccc/ddddddddddddddddddddddddddddddddddddddd/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/fffffffffffffffffffffffffffffffffffffffffffffff/fooaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccc0000664000175000017500000000000413471526060032453 0ustar evenevenbar gdalautotest-3.1.2/gcore/data/irregular_tile_size_jpeg_in_tiff.tif0000664000175000017500000000450513701057751024167 0ustar evenevenII*r BCDESC    $.' ",#(7),01444'9=82<.342 ?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((C    $.' ",#(7),01444'9=82<.342 ?((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( BCDES[!$bbC    $.' ",#(7),01444'9=82<.342 }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzgdalautotest-3.1.2/gcore/data/minimum_tiff_tags_no_warning.tif0000664000175000017500000000010013701057751023326 0ustar evenevenII* gdalautotest-3.1.2/gcore/data/exif_and_gps.tif0000664000175000017500000000064413701057751020047 0ustar evenevenII*(Si%.HH$0220EXIF Spectral SensitivitySpEM<" gdalautotest-3.1.2/gcore/data/msubwinbyte.vrt0000664000175000017500000000336113701057751020021 0ustar eveneven byte.tif 1 byte.tif 1 byte.tif 1 byte.tif 1 byte.tif 1 byte.tif 1 gdalautotest-3.1.2/gcore/data/int10.tif0000664000175000017500000000153213701057751016351 0ustar evenevenII* fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|Dzs!B0!ABk2pA{%2s#{A!AB020k#2{BsƱk%A{B{DZ{2Pk̄! !AsDzP{)GkBp{/JҴ%2P{Ā'1s!C8k1JP#A20!2{! s%Ps%0{2s1{Qk2sĀ!1{!1k#1k!kDz{Dz!B{Ak%1{# kDZkDZk#sšƱkAs+IA{ƱcҴk1c#%Bk1sAAc!P#0Z1ZDZsDZA)IBp{Ʊs#1cƱ̄šs/J0)G2Z1hcƱƲ' R0Asġcp)H0c+Os!0{%B%{DZ{-KRp' p! ĀƱk1kgdalautotest-3.1.2/gcore/data/classictiff_one_block_be_long.tif0000664000175000017500000000063613701057751023414 0ustar evenevenMM* BCDESsgdalautotest-3.1.2/gcore/data/test3_with_mask_8bit.tif0000664000175000017500000000527013701057751021457 0ustar evenevenII* NST   ZS gdalautotest-3.1.2/gcore/data/byte_zip64_local_header_zeroed.zip0000664000175000017500000000107413701057751023470 0ustar evenevenPK-C-Ͷbyte.tif|Q=A]E 431;t?8 *` :i&l 749C}cb757=&%V3736V)YtJQpSDX8*`d4hNيjY2Ή#fwдHV`9 - # T`@3^QҋpX+cŴ):īʐ"9n0oaȺ\2DaUYUN%iQ.pz^׹MYRJoq㱄zJ8ǤfG|1Lpέ {γqOG)}i~ m9N_O| w-_?n#}}<5kWR\fGv~jw,<ݟxd훗PKC-Ͷbyte.tifPK6gdalautotest-3.1.2/gcore/data/empty_nodata.tif0000664000175000017500000000023713701057751020103 0ustar evenevenII* Ssgdalautotest-3.1.2/gcore/data/bigtiff_two_strip_long.tif0000664000175000017500000000043613701057751022163 0ustar evenevenII+ Sstgdalautotest-3.1.2/gcore/data/ticket3019.tif0000664000175000017500000000164413701057751017222 0ustar evenevenII*S  N@N@@A̞LA wk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS L dN@N@@A̞LA wgdalautotest-3.1.2/gcore/data/md_dg.RPB0000664000175000017500000000350213701057751016330 0ustar evenevensatId = "WV03"; bandId = "Multi"; SpecId = "RPC00B"; BEGIN_GROUP = IMAGE errBias = 1.49; errRand = 0.58; lineOffset = 812; sampOffset = 850; latOffset = 41.8791; longOffset = 12.5798; heightOffset = 95; lineScale = 938; sampScale = 1152; latScale = 0.0150; longScale = 0.0225; heightScale = 501; lineNumCoef = ( -6.181087E-03, +3.510113E-02, -1.109763E+00, -8.245546E-02, -1.574358E-04, -1.151270E-05, +3.785618E-04, -1.617343E-04, +3.392421E-03, +1.557476E-05, +2.094558E-07, -6.314112E-08, +7.033553E-07, +5.121700E-08, +2.389848E-06, -1.042301E-05, -1.402098E-06, +6.953425E-08, -5.038526E-07, -9.876127E-08); lineDenCoef = ( +1.000000E+00, +4.696998E-05, -3.057960E-03, -8.778793E-05, -3.454986E-07, +1.971646E-08, +1.083809E-06, -1.723920E-06, +9.397055E-06, +1.371016E-06, +1.647007E-08, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, -3.685579E-08, +0.000000E+00, -2.476523E-07, +0.000000E+00); sampNumCoef = ( -1.941040E-03, +1.012973E+00, +2.549412E-02, +3.146281E-02, -7.701827E-05, +4.973536E-04, -2.130061E-04, +9.757313E-04, +7.164101E-06, -5.137094E-06, -3.021765E-07, +9.135275E-07, -5.816734E-08, +1.078116E-07, -1.534883E-07, +0.000000E+00, -1.318700E-07, +9.196606E-07, -3.705506E-07, +0.000000E+00); sampDenCoef = ( +1.000000E+00, +9.641438E-04, +1.340215E-04, -4.371442E-04, +4.849114E-08, +0.000000E+00, -6.403717E-08, +9.014668E-07, +0.000000E+00, -2.387648E-07, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00, +0.000000E+00); END_GROUP = IMAGE END;gdalautotest-3.1.2/gcore/data/f2r23.tif0000664000175000017500000002171713701057751016263 0ustar evenevenII*  P8$ BaPd6DbQ8V-FcQv= RzI%dܢ#+ee3ʡSy2kOaSnnРJ,Nҩ)>QN5X-b;Wi@ pק:hڧ-hXZy^k{a` *GرP,f6ɏQ\62*'[m'okO 鵺 a'T-] O7sݴq s^<F+󠜮nܽd+yϿmTx &%/r ,*"/#8I4$ pR)""1 -@DDSDA/DY$z-W#ЃBtmű2G O# BI JԷ/!j P8$ B`6*D`pؔV-EQ4R9d8I'G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/GI~</ 쀀 P8$ BaPd6DbQ8V-FcQv=HdR9$M'JeRd]/LfS9m7NgS}?PhT:%GRiTe6OTjU:V4@U4 P8$ d z=`(TJ-ⱘF#"AdYde%s4M;A"4 TCx>Reu ̾];9eE6V -;|^n^.ۍ:n0AaレN*/drYtQ,VU}`mgRVh"וiW&HwaXuLX6B3STHmg&5+fڈl[63n[En -3.40282346638529E+38 gdalautotest-3.1.2/gcore/data/pixfun_mul_r.vrt0000664000175000017500000000175613701057751020166 0ustar eveneven Product mul uint16.tif 1 int32.tif 1 float32.tif 1 gdalautotest-3.1.2/gcore/data/erdas_cm.img0000664000175000017500000004316413701057751017174 0ustar evenevenEHFA_HEADER_TAGV- 961!0StatisticsEsta_StatisticsA"@o@/ҏb@@a@@a@  ]M@&~1! (StatisticsParametersEimg_StatisticsParameters830A (2 1!Descriptor_TableersEdsc_TableticsParameters830A ~#Bin_Function#eersEdsc_BinFunctionrameters830Ao@? @ @D@?F@B@??9@.@~$ Histogramion#eersEdsc_Columntionrameters830A~ 1! FHistogramParametersEimg_StatisticsParameters830Ao@2 1!* Elevation_InfotersEprj_ElevationInfometers830A Pulkovo 1942(83) [To WGS 84 1]8@^W>:z|*yU>qF'%>avt>metersPulkovo 1942(83) [To WGS 84 1]8@^W>:z|*yU>qF'%>avt>cm&)ionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.&1!Z4RasterDMSEdms_Statepccc<<ccc<cccccرcc رcccرcccc<<<رccc<<رcc\AɍWAw"L\AWA"@@@@"meters!1!$.#ProjectionEprj_ProParameters D#Transverse Mercatord#??8\A# #Krasovsky@TXAޓ3?XAj{?@TXA"$_DatumEprj_Datum $Pulkovo 1942$fffff7@a9T¾2GѾ+i)+1!- z%v%GDAL_MetaDataEdsc_Table&$%#Bin_Function#Edsc_BinFunctionz%$&ELEVATION_UNITSEdsc_Column$ion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,{1:*oEprj_Datum,verticalDatum,0:pcelevationUnit,1:e3:EPRJ_ELEVATION_TYPE_HEIGHT,EPRJ_ELEVATION_TYPE_DEPTH,EPRJ_ELEVATION_TYPE_UNKNOWN,elevationType,}Eprj_ElevationInfo,.gdalautotest-3.1.2/gcore/data/stefan_full_rgba_photometric_rgb.tif0000664000175000017500000030576613701057751024202 0ustar evenevenII*    RS`````````````v=6\zVv06Om." 7)#      *C%"  nn  !   !%&( !          nn% !7)3<)0?+/.'* '';4BLH^QK\LAPYJXG@PB.@?);8&32&*%$      n'' %#0!)7#.<(25%)&(+IBPn^mohzmb}o`pp\jP=G=-92$.2"2,)'#!      #  n n0-)# .#H-6C019&."@4Avn}|q}sji_q[HWA3>:(8;+;4(6:*8:+;8-59/>5-72!-1%1+))!(%       <1$(nn0--:*2 (#mYOC+,)fclvL9D4"01!02"30 +6(5B7DKASRH[ki|yw|gfvQHXDBOMC_=8D6+7, !      =?&!n=.7% _7Eyij|hqK8E3!-%"(*5 *7&.G;QVOjk_~}xtymjUOcD;J:.A2#2-)(!      <Bon J99  # -&!  ()6 %B4@LERWN`b\}vf}|rZRjNG[KAU:2=4")0!/+)        N`MBq     &&02!;(-D8LQH]SIYibnlto{ylmerlcqUKeRGa>5G7+>3!21",(         QP      s*\1  $"   &,3;,*8',H7=G;CN9LQBMe[kkcrf]paYcbXlWK\PF]E;V=/B9+C/ ...#            #        0y 3I bilvv5#'% % ,4"L6IfN^PAV& 7=BGLQVZ^aehjmnpqqrrrqponlifb^YTNHA:3+$  n  `v9KxEH$%x29dmP`FU-#&  "* 7>DJPV\afjnquxz}}{xtplga[TLD;2(    #&60Y n!4 =Sc:J77$! 4;CJQX^djotx|{wrle]TJ@5+!  $"",B l  I8  5=FNV^ekqw|}xrkbXNB6*   $ P$( q1x-0&   ?GPYaiq! " ..zskbXL?2&        5XU[+  BJR-<A MN S QQ HLD?<7572 449<? 9%+ (~zuog]RE8+  2%"J<>U7(4U!q+~sjE -! ')  #      37< : * 3$ ~{ywtpkd\RG:."   { ,:PJKODK&WWMC/%!# &1!';!4%#4!"2 '** "       $ 0 A'/ yvsqomkigda\UMC8,! n    u1V `L('  =5&k]E_OE81-."             & / a^\ZYXVTRNJC;2(    ,#\s |X8/)nLۉxx8%                 !  JHGEDCBA>;61)"   2k   W !K$71pcT8%                            643210/.,)%     r *_   lR _LRK                 !#! ! ! RMIEA>;852    &$#""!     = %U  ] [bX)           , ""~xrmga\VQLGC?;851/,)&#!   F /i    = scjn.      {uojd_ZUPLGC@<963/-*'$!  ? Hs k9v#_s ́ |J:"     {uoje`\XTPMJGDA>;852/,)&#    K   kAh$-    xsnifb_]ZWUSPNLIGDA>;741.*'#    7"e  j]IL# yuqnkihfecb`^][YVSPMJGC@<840,'#  K ~vcT2T~{xvutssrqponlkifda^[XTPLHC?:5/*$ n1Gn$1}  ~`H2#Z ~~}|{zxvtromjfc_[WRMHB<6/(! GQK X  wU=*!] }{yvspmiea\WRMG@91*" 7=l0i 35V nG2,o}{xvsplie`\WRMF@80' +Ss:n }!k  v^B6y ~|zxusqnkhea]YUQLGA:3*" nOkfb 1 9u  cTG*! }zwurpmkigec`]ZWSPMJFB=81*" @S\~=w*T    riT=<  }zwtqmjgda_\ZXVTRPMKHEC@>;951,& $*wO 3kI |cSc  ~{wtpmieb^[WTQNLIGEDB@><975310.,*($  Fi$3 n0 Wvb*V P`    ~\&    |xtqmieb^YURNJGC@=:864210.,+)'%$#"!  c;Y-#nG[ | Tw 3%    qmA=    }vpkfa]YUQMIEA=:630-+(&$#"!  m-U7H  b Yn3  z}Yz   wnf^XRMIEA=952.+(%"  yr9!-l{Ly C qE {Y"     vj_ULE?:52.+($! w r S n;= c n(]  j d+@     yl^QF<4.)%! jv d1a!]q O  %@ w LmE    teVG;0'! Kpsucr<3:nlby n $&&"  ^d0      rbRB5)  btw[G}L_uMx? ").1/*# RdL2   scSC4( 9:j tmim"6^v_IZ /pq%'6,:4G8M:P=O8F,8&6! 9vPJ    iXH9,   nZorXouIh `Mnbj] p #8EJaRj_x d|nfbz\l WbRRXdF\eisrT%       qbRC4' 3/usSmcs!X{?b %IIUu"?>M`w{v atUc^n^tb}blsmp` B Zi?     m^O@2& P] {|\Prn9U%Jg8O L~Vzvz~ + %oz oF"    yk]N?1% *7r yM|\vRj|":P>F40Ho  Wg+(   d} M d Q6     yk]N?1% :D yFf[r!)6GLP 'C I\Bunex\uAW9J-;'   (e} }aXC,  yk]M>0$ % -! '0@G g wPQ`:A-/XaaMEKXR&(   - `j~Ch_TM<#    yk\M=/" ^ _ V X M| :c*A'%78:BMX#$,*k)LLAJjNv)D     1}k{ Tq cZOQA2      xj[K;- & o  y Gy!(0)N\:Hi D>TX" /7KX W Km=fL-1QL34l   5Q`WX|/#:z?;z   5M.Vs:y"~%T]   n ZeQ\aca_VTIKH4*     |l[.8Q6=m%.UDz&F-Tn&Hz-!B WX } Yz3A n  c %. > CS =;7f:?O yz QQ 7) 0) /# 4'!/DXx w } &l I 4:]al]][kleddWT@J9=1       0<?Z(B 99Gv+)0 Jr"@o#Bs#Jn'Bm"!*o nV] | u~z}fk =VnTs inrhn v Qz %3:  nCB 472o=U65+#,"      5?PNQR]IC0Pd_ggkwi[eePOLIC82      +/DO L Xr[{ayId@l0 1E>RZnh?Z+C'7%*-@:?V]etZk Vk SPNK M[YK cYKi -+(.$-"FJ  U^ QmA>3u75LxM       9BTSJTNP:BVS^Z]lc_WePHJEQG7!  $.&+%10865668EM=L ?[$' *!HSPa M`@\L[M]YlYkRoIa +En@Q[eouXfLLPR Tg HNPMHFL7 K6 sx:B ;1 289b?\ | $*, AK31+S044x 7@_% %44HHe\vMvIi8V%2 *N[]RQN<:FK]JQ]ZJY^KIJJ>F0 "%.&+%!#+$.(+";2031'1()$/ 3/JDQM@K'3,,DEILA:W_]qPr ?N >S AQKvPn]ezkWm TMSVHJ7-GO <9?2>,?- 5`OUZ #!nhQ3Tu t{mT` KQ [W g>9"$-10Z1F\f *4GXS=&.XRJJO_K<,4I[JKQbN]TNHCDF9"  ()!.*)')+ $5*-*=/51$#*:*E4):1CE03604*9/=5IVOIT_ QPRURhWzS_}vSUAW L<SMEH!OE*'. ,& A+R@ --b sM r jLR,'&7 ,QJ=I50 *b*04r 6%D  'cMberDBG%@.G? F# MOXE/-BORIIM]ILIH'N;.'( %&&+!-'-#,!55,.%!+"+!:+/1(0/#(;/+*3* -(3)5/9;7';=99>8;?62K77661,"aM83%=)& *6 -'f iayz  %I % .   !!+N+C"WJ6>!/)w+y,yU{m+ &Xjkh@MWR,/&' %!  ,=KXNJ86JNOYNUCF,7$0$    #&*"+4(!.+:*'%1'!$0&5$"!    ( 3#.   6'70-) 1$+'(4.*%D*/#:$.)K5;1  0! % (   )*% ^ K jf x Q'G&  +C,E.C6@=UCWCSCT9?,, TMP RIE "-#&#%5+(*.!>2#, //!*-*  "  3 8-%&''#1)&*'0-8*.' & !  :U 5[mf{ 0W?N9c$%;TPsem_]xYxVnQo!2!6)p-y+ln&3  4K;eHp[%:': #"   (-8A-#"" PMP OAJ!' !"!&)#)4%+(#B4-4+  ,0/   "'%"+)' %% #'% ! /$ ' v /_ ZtF &Fc!+7EXhnxvh_TnOgEVIU(<(Z(l+pGh,d /E2S6N?d")&  $ +8%    LLt'.36Ovecedfdouz~{sG1#'b*n&Yl U,<)3(>MYc  pi=43x        " B!,V5G9H)5%* )0",B%'.)!,#  zk\OE@?%A9*(#%" -" { &,38<>>;6/' \d 7@p@gLpcs|{x xz {a%O";)a'bLd i;`&4):u&   t{9('U^M       ! "!! ! HH37>+7 !)$'!,7$"4%uh]UPPSY 1&KD+'  ( >)4%!)%!#(/6>EKOQQMG>4)#^|}p3e8"03S kyp m|yu s~vd+q.'N&_0N{T"37FSy   hiq.EC0    )% LS=##!',' ! 3$ ,$ tkebbek  ='3/ mcYPHA:51-+**+.39@HPX^bdc_WMA4( RgtgW 8]LR5d#9 #)72K 8T Gm Bl [{4_& &' 5@ VbFO:iXtJb` %% *%6(B(D,K.E-E1M2N7U8X8^>mAsEtPd&D       |ywvvwz}F+zrjaYPIB<61*" J'N#K+ 6%<AU #0g #4`EAFAp>bP]d (a"3l?lj % &9(>b "&O,[>j`-;u2Mk&% #  "   %+1JMt 5       |uojgdccehmsz#{tkcYPF>71,'# $*X#G4!=#;2[Frv !?5-'" .'  /$=#@,BAN"L  =wIIFxK|7]?HX !bBz)  -&7]v. .#J)Z(c)I4_@Ln'|->c#!! !             (!!xmbYPIC>;::=AGNW`jsz~xqi`VLB8.&  0 5$?(F5SJ\}!> ?gQLQOx>^;lDMqc$'/3Yla($$J+_-k(`'O0]9vJi!k!3R      &"$%%  vi]QF=60,)()+/4<ENYbjquwvsmf]TI>4*" c&<  +d&L'K)E*@EuJ\ `)4RNKHoQwIq2V?M`l!? +?~!C| &%'D+[,h-h,e(M4\:uM ~!W    !     $#!% !  xj[M@6-& %+3=GPYafijhc\TJ?5*! .\ Ne'4(0v- 'F'E)C;MDu?jP~ (N (#((-9O\RNsOl6QkOk_        "  &%! ~n^N?2'%-6?HPVZ]\ZTMD9/$ (D[ei)P;']"+(J,J,<?`,L(<*H"!64+p!&-DpXZRyKhR`gjNk:Q@rP /^ !.)K$;%;MMv.'=/`.b1f*`.PZ n*          n[G5%  !(.4:=>=93+" %DZT ^&B#9,P32cw y <1G*+Rxjx^}7T>mJ*N(M&B%=5MMeJ 'C-Z1f2f.VR{ R             ~lYE2"  "(.36650)" &@.O  + &524^}65a8>fxg9];fO2g,H(>$3I{Ty!' $(6]6i5h,[T| ~ 4c          ~lXD1!  #(,..+&  'D/eaf9b  /5c 1BX 9MkwC{7tO1c,D);4OLd Hs&72X2j+_L}m @          nZE2!  "%&%! -Q3o:Ve-]9j -+=CS_Q;}D/T-B*;KXu +F6n.hW O               p\H4#   -M6|2liv)U;q+#(18C|:B5S,<=ZVv G  &.Z,dN:v             s`K7&   $5x3wNl (:k } F%83_B}5G5@S]{h)R.eW 3              wdO<*    n0X1~:_ 5 +ed ~Hqqy #  %(=T.5Pa\o%3V8t:g           {hT@.  $072dx 4,UKmQ~KWux,1  (%3BAD]ktn)I 0XA}(            mZF3#  8p5{ f 4C}&% 43HzEjlD1-=C7B52Q[^oFZ4R3_x           s_K8'+D:W "4 .BOp I^($?mJezq DP>F.5GNYhY|}zy{~8Y zpf         xeR>,  #6 Wt ,X7R5I^r2=, 4U\5d  #4H]q2/c{ >j|slhghl=B67P_Yk vh\QJFGJPX`fkmlg`VKB;       }kXD1" .FT  "3G\pLaPz{od\VTUY`<6;;LXPf wi[MC<:;@GNV]aca]ULB:       q^J7&7M5b  !1EZn>.KqcVLEBBFL/(, =O* /BWk}09 xhYJ>6114:=GOW*C gpy{n^N>2)%%(.5=DJNPNJC;4       }kXD1" />  ,?SgyqaPA3*$#%) ;BOe U`ku~}qbP?1&!'.5<BFGEA:3-      q^J7& );Nbtyl\K:,"HY!.9CO[gs|~teTB1$!(/6;>><70*'   tweQ=, %6I\o~|tgXG7("-!)3>KYfr{}uhWE3$")/4651,&" Yjz|kWC1!  !0BUhw|ywwvsmcVF5& %0=KZhsz{vjZH6& $(+,*&!$/=N_pq^J6& +<N`oy|wqlhghiie^SD5&  $0?N^ktxtk\J8'  !"!&3CTfvvcO<* &5GWeossng`ZWVX[]]XOC4&  %3CSbmsrj]L:)  )8I[l|zhT@.  !/?O[dge_WNHEEGLQSQK@3&  *9IXemnh\L:)   !.>Pbs}lXD2!  )8FQXZWPG>8458>DHHD<1% "0?O\ehdYJ9)   %4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\@g@e@a@a@d@\@`@V@X@\@V@X@X@Z@X@`@X@Z@`@`@c@f@a@e@^@`@X@\@^@R@\@X@^@a@c@`@d@a@a@X@e@n@o@i@`@Z@a@^@b@`@d@d@b@a@`@^@Z@^@Z@^@f@f@c@b@c@c@c@f@`@b@\@`@Z@Z@Z@Z@Z@\@X@ZValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1fakeDim1Dim0.0@jjjjjBand0Var0.0Created with GDAL (http://www.remotesensing.org/gdal/)777VALUES SignatureAttr0.0440720.000000, 60.000000, 0.000000, 3751320.000000, 0.000000, -60.000000IIIVALUESTransformationMatrixAttr0.0PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]VALUES ProjectionAttr0.0 float64_2.hdfCDF0.0gdalautotest-3.1.2/gcore/data/uint32.tif0000664000175000017500000000362013701057751016542 0ustar evenevenII*Hk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck @S  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/byte_buggy_packbits.tif0000664000175000017500000000165113701057751021440 0ustar evenevenII*S b z 0F[p-BWlN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{s kkk{ssk{ssk{{c{c s{sks{ksksk{{s{s{s{ksksss {{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{csc{sskccs{kksks{{k{ {c{kcs{{k{k{k{sZkkc{sc{{k{ckksskckk{ccsccs{c{ kZkskZc{s{sc{k scscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{sksckgdalautotest-3.1.2/gcore/data/strip_larger_than_2GB_header.tif0000664000175000017500000000041013701057751023061 0ustar evenevenMM+ PSFeGgdalautotest-3.1.2/gcore/data/alos/0000775000175000017500000000000013701057751015647 5ustar evenevengdalautotest-3.1.2/gcore/data/alos/RPC-md_alos.txt0000664000175000017500000000200213701057751020442 0ustar eveneven00400003639+55.8151+032.0758+300000412903699+00.4400+000.7304+3158-3.910052E-4-3.183540E-1-1.136076E+0-2.764965E-4+4.820507E-3+6.314381E-4+2.248402E-3-4.827423E-3-5.628790E-3+7.063636E-7+7.387494E-6+1.621526E-5+7.714024E-5+2.645431E-6+9.095926E-6+5.103928E-6+9.402414E-6+1.317677E-5+2.180787E-5+6.331507E-9+1.000000E+0-2.395249E-3+4.910170E-3-1.979234E-3-4.434428E-5-1.095954E-5-1.797271E-5+2.114926E-6-3.908516E-6-8.265047E-6+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+0.000000E+0+7.854784E-3+1.190927E+0-3.819688E-1+4.903193E-5-6.649807E-3+3.604242E-3-1.156816E-3-4.774021E-3-1.842626E-3+6.588797E-8-2.311049E-5-3.063846E-6-8.987769E-5+5.254359E-6-1.970831E-5+9.643964E-7-1.697456E-6-3.331775E-5+1.815988E-7-8.016227E-9+1.000000E+0-2.395249E-3+4.910170E-3-1.979234E-3-4.434428E-5-1.095954E-5-1.797271E-5+2.114926E-6-3.908516E-6-8.265047E-6+0.000000E+0+0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Cz=@!jWFWݥzm,oYIYdϝ>1x lYV\hsͥ7V[j]2+V;;vc!uC|Z^nWV|q̙ "e2-otV;+|>vv˧^ɱ]bo /f"WԾW[Z2pTү~? y'xKoǒe(C{}߹~⛒lɑQRdYvMPf@]߯+9TcgA o=EX4ZX$?-ұq + 63q \W(vMN.$ȃ+c?x4 {EuEcaX^=&^ }zr97&YL=ΈI]߿ c&gT댘wOsvp.{~v80  ~l$|$ @*ByB7fȠ΁1H󋻺DT`K*0@`pWeWJס:OkΡpbӂ!6`~"~ëͤG0Vda#o$9~c}647:$vʎFqunj)[gQL^,P5T[[8`p {Cj$ >:$Bk {@{d&/ҳ\b \%k5UOB 4դ6/U w]/珿,˲=CqUrb#^ɰϿ^!D#<`?m'ibkZ{aaoedyl.4Ϣon;rچD8?{k1Խ&TeE\:tsP$8eǼ@x!>$ fe $ɎǨmMٝ|Q]y07 5]s-whBCrhF1E)Z2WO pq׷nw%X>׏;VS|:7Fu%ouXp^)N[4?<7xUMgwGb/IK85`Z=o_@Q5٬ʭ1'5D3F1Mҍ{ ';]/5LN-_?*|?C0H2K=X]ɝ+٨*+dSkWգ86C+TوRN)傞@Zx:Y]KQ;g0dBer_uwh4(o>-ѹN I$EEgq\@ R$I۬f> yd :t5CO8̛"&oLoJ (7)0dARGRf5sHSɨ ,/uPEZ6MG{9(JRfa;? iVl5$z1]yu-"TƧdĭNuEۏe/q|yJ9pE0[z>ϋdڈ'mŤ^իEYjjqZf?}^G: <_y/WqMQYo?\,,/M+×4iA(ۦ:7$ L H22 2S* 0 Hx/:Pll?Pll?]kF4ӽ6WGS 84|gdalautotest-3.1.2/gcore/data/alos/summary.txt0000664000175000017500000000011113701057751020076 0ustar evenevenLbi_Satellite="ALOS" Lbi_Sensor="AVNIR-2" Lbi_ObservationDate="20100701" gdalautotest-3.1.2/gcore/data/ModelTiepointTag_z_non_zero_but_ModelPixelScaleTag_z_zero.tif0000664000175000017500000000044013701057751031055 0ustar evenevenII* kS  ?5^#A ףW\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€;2 T-$c4/#H8C5 ;P@ ؖ, + XҜI C8+=T+j `K R=u+@l66 )ы#ؤ+03* "Bcc#R77c0㠭b@8*#P˾/ e@"bT7 D@!*XT A:`̿)fg4C D*0Q9a6ÈI PA DJA\-@p".0stPP0 %$"(=ШoP;\˘q a-csh0@i :x +]̆@pS\CCs , hptS";b0,  ~ C à_oL:0 ezB,TvCh A@5!PT&B(C0uL'eB DDXbX& u !6@le5 hWA `Y?i"8(ST- b'M AW u 9Nh:Q d@8HH BTG#DA#K`8 A@!U8P)]Ys:!YD8$#qM:0J )`z ܥA xp$FBCP;vhm É ("*8t !; t B#Cb8`2=̟TA)( ( !8 aap'!@ i p`%<H8婈ZL-] 2Xs-qd8@?k ADD;΂z<`+ P" .! !A!(G\ NpKCHp`{ !=pO <COEhr"D5F 'B oT8Pn bJ3cAx> {A0C>` 48 @ A V` K1q 2w,Z&ÛIb/u" !; "BN#0(7$N"C @T(C`3J!Þu`De`(CaS(A 59b0O,* sP\D! !0 5 A8m)C$D08@Pv ''8 un > CLE/gdalautotest-3.1.2/gcore/data/twoimages.tif0000664000175000017500000000212413701057751017413 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksck Sk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksck .Sgdalautotest-3.1.2/gcore/data/ycbcr_24_lzw.tif0000664000175000017500000000407613701057751017727 0ustar evenevenII*6 P8A8T, !(LE|h g"Fs <̨#!^>sQs4%rلq0Mk= f31d[/ 2Z; xc4gPeS:;~Ac\3p7k/N_1I~3sw7'3N1 تR1"ʦyj`3 Y / 1cˀ4 "( @7 /B3F3 Kj69#*t1 4#0д< KC.#ȡ$ C30-/X. B K;,r>>8  5C5 cp3b3+.b(c`-$ 8-ʱ33C) ,HJà= #5  FdH= P@Y*ؖ, y6 (=`ҡ B0R@5 3+ cR5E+X&+`;&lHGD˜9T0BHĩ:āP+թ9 U,c1H1b2A@31pgC҆8 c(/о2ո/0/(cP-D:0)`987bCvc(5 mRP x6 OdO>@qEq%Ȯ@"6$P6H59b:0$K8c )nC4#!X9`78H9{b: K^pn$;Hذ,! v EI4t,wD,Dps a8$#Z)f B08A )B+ u F!0jPD85m: u`; Ap(aR B2LAhp A$`!°vtԜ$k ax/_0r-:!?"D3@?D`P5B o\9ADDu S"RˆP+P9 `:(y e=q!=B! w?:W@N+7J0rB̑PHO1X40Ȣp"Ŭ M@ āEq3郅@rB'L 4I 8*I 0C!KZ"IyG"C @y@Pb0H P!Q!%eyC+>RjN A@%x` p䀀''.&CLE/gdalautotest-3.1.2/gcore/data/uint16.pnm0000664000175000017500000000145713701057751016562 0ustar evenevenP5 20 20 65535 k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/utf8.zip0000664000175000017500000000050613701057751016324 0ustar evenevenPK [U7D абвгдеUT RRux PK [U7D жзийклUT RRux PK [U7D абвгдеUTRux PK [U7D FжзийклUTRux PKgdalautotest-3.1.2/gcore/data/cint16.vrt0000664000175000017500000000253313701057751016555 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray cint16.tif 1 gdalautotest-3.1.2/gcore/data/byte.vrt0000664000175000017500000000300613701057751016410 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 testvalue Gray 107 byte.tif 1 testvalueBand gdalautotest-3.1.2/gcore/data/mfloat32.vrt0000664000175000017500000000404513701057751017100 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray float32.tif 1 Gray float32.tif 1 Gray float32.tif 1 gdalautotest-3.1.2/gcore/data/pixfun_conj_r.vrt0000664000175000017500000000104713701057751020313 0ustar eveneven conjugate conj Int32 int32.tif 1 gdalautotest-3.1.2/gcore/data/cfloat32.tif0000664000175000017500000000672013701057751017037 0ustar evenevenII* BBCBCC CCCCBCBCCBBBCCBCBBCB%CB CBBBBCBCCCBCBC CCBB CB CBCBBCCBBBBBCCBBBCCBBBBBBBCBB CBCCCC CCCBBBBCB%CBCBBCCB=C-C-CCCBCBBCBCCBBBCCNCBEC-CC C CCBCBB CCCBCBC-CBBCBCBCB CBBBCBBBBBB5CBBBBCBBCBCCBBCBBBBCBBB C CB CBBBBCBBBBBCBBBCCCCCBBCBBCBBB C-CBBBBBBBBBB CBBBBBB-CBBBBBCBB-CCBBBBBBB=C-CBBBBB CB-C CCCCBBBBBBCB CBCBBCBC C CB CBBBBBBBBBBBBCBCBC%CCCBBBBB CBBBBBBCBBBB=C-C C C%CBCBBBBBBBBCBBCCC5C C-CBCBBBBBBB CCC%C C CB-CwCCNCCB CBCC%C%CC CCBBBBB5C5CCCCCC5CCCBCBBBBBBBB@ S B Z   N@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gcore/data/idontexist2.vrt0000664000175000017500000000262513701057751017727 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] 2.0000000000000000e+00, 1.0000000000000001e-01, 0.0000000000000000e+00, 4.9000000000000000e+01, 0.0000000000000000e+00, -1.0000000000000001e-01 idontexist.tif 1 idontexist2.tif 1 gdalautotest-3.1.2/gcore/data/epsg32631_4979_geotiff1_1.tif0000664000175000017500000000055313701057751021455 0ustar evenevenII* kS   /<@A̞LAN@N@?. wsNAD27 / UTM zone 11N + WGS84 ellipsoid height|gdalautotest-3.1.2/gcore/data/image_width_above_32bit.tif0000664000175000017500000000022213701057751022051 0ustar evenevenII* Sgdalautotest-3.1.2/gcore/data/rgba.tif0000664000175000017500000000370413701057751016334 0ustar evenevenII*@RS   &f$@$@A*QA# w )#WGS 84 / UTM zone 31N|WGS 84|gdalautotest-3.1.2/gcore/data/int16.raw0000664000175000017500000000144013701057751016364 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gcore/data/transformer_14_dem.tif0000664000175000017500000000171613701057751021115 0ustar evenevenII*&n`S    Vf ϻ1?J41?#  mtr@@TXAWGS 84|#$+3:CKSZagnu{ (/6?GPW^ejotz$+2;CLS[bfjnsy~$*19AIRZ^bflrw}"(/5?IRW[`ekpv}}$09@KOTX^ciovv|%-7BLQUZ_diouu{&0:DNSW[`dinttz&0:DNSW[`dinttz '2 # ############################################################################### # Copyright (c) 2005, Frank Warmerdam # Copyright (c) 2009-2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal ############################################################################### # Parse a simple document into a tree of lists. def test_minixml_1(): tree = gdal.ParseXMLString('abc') assert tree[0] == gdal.CXT_Element, 'wrong node type.' assert tree[1] == 'TestDoc', 'Wrong element name' assert len(tree) == 5, 'Wrong number of children.' # Check style attribute node = tree[2] assert node[0] == gdal.CXT_Attribute, 'wrong node type.' assert node[1] == 'style', 'Wrong element name' assert len(node) == 3, 'Wrong number of children.' assert node[2][1] == '123', 'Wrong element content.' # Check element node = tree[3] assert node[0] == gdal.CXT_Element, 'wrong node type.' assert node[1] == 'sub1', 'Wrong element name' assert len(node) == 2, 'Wrong number of children.' # Check element node = tree[4] assert node[0] == gdal.CXT_Element, 'wrong node type.' assert node[1] == 'sub2', 'Wrong element name' assert len(node) == 3, 'Wrong number of children.' assert node[2][1] == 'abc', 'Wrong element content.' ############################################################################### # Serialize an XML Tree def test_minixml_2(): tree = [0, 'TestDoc', [2, 'style', [1, '123']], [0, 'sub1'], [0, 'sub2', [1, 'abc']]] doc_target = '\n \n abc\n\n' doc_got = gdal.SerializeXMLTree(tree) assert doc_got == doc_target, 'serialize xml tree failed.' ############################################################################### # Read XML document with complex DOCTYPE element. def test_minixml_3(): fp = open('data/doctype.xml', 'r') text = fp.read() tree = gdal.ParseXMLString(text) assert tree[0] == gdal.CXT_Element, 'wrong node type.' # Check element node = tree[6] assert node[0] == gdal.CXT_Element, 'wrong node type.' assert node[1] == 'chapter', 'Wrong element name' assert len(node) == 7, 'Wrong number of children.' # Check subelement subnode = node[2] assert subnode[0] == gdal.CXT_Element, 'wrong node type.' assert subnode[1] == 'title', 'Wrong element name' assert len(subnode) == 3, 'Wrong number of children.' assert subnode[2][1] == 'Chapter 1', 'Wrong element content.' # Check fist <chapter><para> subelement subnode = node[3] assert subnode[0] == gdal.CXT_Element, 'wrong node type.' assert subnode[1] == 'para', 'Wrong element name' assert len(subnode) == 3, 'Wrong number of children.' ############################################################################### # Parse and serialize an XML Tree with a <?xml> prolog def test_minixml_4(): xml = """<?xml encoding="utf-8"?>\n<foo />\n""" got_xml = gdal.SerializeXMLTree(gdal.ParseXMLString(xml)) assert xml == got_xml, 'serialize xml tree failed.' ############################################################################### # Parse malformed XML. Complains, but still makes a tree. def test_minixml_5(): test_pairs = ( ('<a></A>', 'case'), ('<a b=c></a>', 'quoted'), ) for xml_str, expect in test_pairs: with gdaltest.error_handler(): tree = gdal.ParseXMLString(xml_str) found = gdal.GetLastErrorMsg() assert expect in found, ('Did not find expected error message: "%s" ' 'Found: "%s" ' 'For test string: "%s""' % (expect, found, xml_str)) assert tree is not None, ('Tree is None: "%s"' % tree) ############################################################################### # Parse malformed XML. def test_minixml_6(): test_pairs = ( ('<', 'element token after open angle bracket'), ('<a>', 'not all elements have been closed'), ('<a><b>', 'not all elements have been closed'), ('<a><b></a></b>', 'have matching'), ('<a foo=></a>', 'attribute value'), ('<></>', 'element token'), ('<&></&>', 'matching'), ('<a></a', 'Missing close angle'), ('<a foo=2\'> foo=2\'>', 'unexpected token'), ('<a?>', 'without matching'), ('<a/.', 'for value of attribute '), ('<a\'>', 'reached EOF before closing quote'), ) for xml_str, expect in test_pairs: with gdaltest.error_handler(): tree = gdal.ParseXMLString(xml_str) found = gdal.GetLastErrorMsg() assert expect in found, ('Did not find expected error message: "%s" ' 'Found: "%s" ' 'For test string: "%s""' % (expect, found, xml_str)) assert tree is None, ('Tree is not None: "%s"' % tree) ############################################################################### # Parse malformed XML. Pass without warning, but should not pass. def test_minixml_7(): test_strings = ( '<1></1>', '<-></->', '<.></.>', '<![CDATA[', ) for xml_str in test_strings: gdal.ErrorReset() tree = gdal.ParseXMLString(xml_str) found = gdal.GetLastErrorMsg() assert found == '', ('Unexpected msg "%s"' % found) assert tree is not None, ('Tree is None: "%s"' % tree) ############################################################################### # Parse XML with too many nesting def test_minixml_8(): xml_str = '<a>' * 10001 xml_str += '</a>' * 10001 gdal.ErrorReset() with gdaltest.error_handler(): tree = gdal.ParseXMLString(xml_str) assert tree is None, 'expected None tree' assert gdal.GetLastErrorMsg() != '', 'expected error message' ############################################################################### # Cleanup def test_minixml_cleanup(): pass ���������������������������������������������gdalautotest-3.1.2/gcore/testnonboundtoswig.py������������������������������������������������������0000775�0001750�0001750�00000025675�13701057756�020360� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: testnonboundtoswig.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GDAL functions not bound SWIG with ctypes # Author: Even Rouault, <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2011-2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from sys import version_info from osgeo import gdal import pytest try: import ctypes except ImportError: pass import gdaltest gdal_handle_init = False gdal_handle = None gdal_handle_stdcall = None ############################################################################### # find_libgdal() def find_libgdal(): return gdaltest.find_lib('gdal') ############################################################################### # Init @pytest.fixture(scope='module', autouse=True) def setup(): global gdal_handle_init, gdal_handle, gdal_handle_stdcall if gdal_handle_init: if gdal_handle is None: pytest.skip() return gdal_handle gdal_handle_init = True try: ctypes.cdll except ImportError: pytest.skip('cannot find ctypes') name = find_libgdal() if name is None: pytest.skip() print('Found libgdal we are running against : %s' % name) static_version = gdal.VersionInfo(None) # short_static_version = static_version[0:2] try: gdal_handle = ctypes.cdll.LoadLibrary(name) try: gdal_handle_stdcall = ctypes.windll.LoadLibrary(name) except: gdal_handle_stdcall = gdal_handle gdal_handle_stdcall.GDALVersionInfo.argtypes = [ctypes.c_char_p] gdal_handle_stdcall.GDALVersionInfo.restype = ctypes.c_char_p dynamic_version = gdal_handle_stdcall.GDALVersionInfo(None) if version_info >= (3, 0, 0): dynamic_version = str(dynamic_version, 'utf-8') if dynamic_version != static_version: gdal_handle = None gdal_handle_stdcall = None pytest.skip('dynamic version(%s) does not match static version (%s)' % (dynamic_version, static_version)) return gdal_handle except Exception: print('cannot find gdal shared object') pytest.skip() ############################################################################### # Call GDALDestroyDriverManager() def GDALDestroyDriverManager(): if gdal_handle_stdcall: gdal_handle_stdcall.GDALDestroyDriverManager.argtypes = [] gdal_handle_stdcall.GDALDestroyDriverManager.restype = None gdal_handle_stdcall.GDALDestroyDriverManager() ############################################################################### # Call OGRCleanupAll() def OGRCleanupAll(): if gdal_handle_stdcall: gdal_handle_stdcall.OGRCleanupAll.argtypes = [] gdal_handle_stdcall.OGRCleanupAll.restype = None gdal_handle_stdcall.OGRCleanupAll() ############################################################################### # Call OSRCleanup() def OSRCleanup(): if gdal_handle: gdal_handle.OSRCleanup.argtypes = [] gdal_handle.OSRCleanup.restype = None gdal_handle.OSRCleanup() ############################################################################### # Test GDALSimpleImageWarp def test_testnonboundtoswig_GDALSimpleImageWarp(): src_ds = gdal.Open('data/byte.tif') gt = src_ds.GetGeoTransform() wkt = src_ds.GetProjectionRef() src_ds = None gdal_handle_stdcall.GDALOpen.argtypes = [ctypes.c_char_p, ctypes.c_int] gdal_handle_stdcall.GDALOpen.restype = ctypes.c_void_p gdal_handle_stdcall.GDALClose.argtypes = [ctypes.c_void_p] gdal_handle_stdcall.GDALClose.restype = None gdal_handle.GDALCreateGenImgProjTransformer2.restype = ctypes.c_void_p gdal_handle.GDALCreateGenImgProjTransformer2.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] gdal_handle_stdcall.GDALSimpleImageWarp.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] gdal_handle_stdcall.GDALSimpleImageWarp.restype = ctypes.c_int gdal_handle.GDALDestroyGenImgProjTransformer.argtypes = [ctypes.c_void_p] gdal_handle.GDALDestroyGenImgProjTransformer.restype = None out_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/out.tif', 20, 20, 1) out_ds.SetGeoTransform(gt) out_ds.SetProjection(wkt) out_ds = None filename = 'data/byte.tif' if version_info >= (3, 0, 0): filename = bytes(filename, 'utf-8') native_in_ds = gdal_handle_stdcall.GDALOpen(filename, gdal.GA_ReadOnly) assert native_in_ds is not None filename = '/vsimem/out.tif' if version_info >= (3, 0, 0): filename = bytes(filename, 'utf-8') native_out_ds = gdal_handle_stdcall.GDALOpen(filename, gdal.GA_Update) assert native_out_ds is not None pTransformerArg = gdal_handle.GDALCreateGenImgProjTransformer2(native_in_ds, native_out_ds, None) assert pTransformerArg is not None ret = gdal_handle_stdcall.GDALSimpleImageWarp(native_in_ds, native_out_ds, 0, None, gdal_handle_stdcall.GDALGenImgProjTransform, pTransformerArg, None, None, None) assert ret == 1 gdal_handle.GDALDestroyGenImgProjTransformer(pTransformerArg) gdal_handle_stdcall.GDALClose(native_in_ds) gdal_handle_stdcall.GDALClose(native_out_ds) ds = gdal.Open('/vsimem/out.tif') cs = ds.GetRasterBand(1).Checksum() ds = None gdal.Unlink('/vsimem/out.tif') assert cs == 4672 ############################################################################### # Test VRT derived bands with callback functions implemented in Python! def GDALTypeToCTypes(gdaltype): if gdaltype == gdal.GDT_Byte: return ctypes.c_ubyte if gdaltype == gdal.GDT_Int16: return ctypes.c_short if gdaltype == gdal.GDT_UInt16: return ctypes.c_ushort if gdaltype == gdal.GDT_Int32: return ctypes.c_int if gdaltype == gdal.GDT_UInt32: return ctypes.c_uint if gdaltype == gdal.GDT_Float32: return ctypes.c_float if gdaltype == gdal.GDT_Float64: return ctypes.c_double return None def my_pyDerivedPixelFunc(papoSources, nSources, pData, nBufXSize, nBufYSize, eSrcType, eBufType, nPixelSpace, nLineSpace): if nSources != 1: print(nSources) print('did not get expected nSources') return 1 srcctype = GDALTypeToCTypes(eSrcType) if srcctype is None: print(eSrcType) print('did not get expected eSrcType') return 1 dstctype = GDALTypeToCTypes(eBufType) if dstctype is None: print(eBufType) print('did not get expected eBufType') return 1 if nPixelSpace != gdal.GetDataTypeSize(eBufType) / 8: print(nPixelSpace) print('did not get expected nPixelSpace') return 1 if (nLineSpace % nPixelSpace) != 0: print(nLineSpace) print('did not get expected nLineSpace') return 1 nLineStride = (int)(nLineSpace / nPixelSpace) srcValues = ctypes.cast(papoSources[0], ctypes.POINTER(srcctype)) dstValues = ctypes.cast(pData, ctypes.POINTER(dstctype)) for j in range(nBufYSize): for i in range(nBufXSize): dstValues[j * nLineStride + i] = srcValues[j * nBufXSize + i] return 0 def test_testnonboundtoswig_VRTDerivedBands(): DerivedPixelFuncType = ctypes.CFUNCTYPE(ctypes.c_int, # ret CPLErr ctypes.POINTER(ctypes.c_void_p), # void **papoSources ctypes.c_int, # int nSources ctypes.c_void_p, # void *pData ctypes.c_int, # int nBufXSize ctypes.c_int, # int nBufYSize ctypes.c_int, # GDALDataType eSrcType ctypes.c_int, # GDALDataType eBufType ctypes.c_int, # int nPixelSpace ctypes.c_int) # int nLineSpace my_cDerivedPixelFunc = DerivedPixelFuncType(my_pyDerivedPixelFunc) # CPLErr CPL_DLL CPL_STDCALL GDALAddDerivedBandPixelFunc( const char *pszName, # GDALDerivedPixelFunc pfnPixelFunc ); gdal_handle_stdcall.GDALAddDerivedBandPixelFunc.argtypes = [ctypes.c_char_p, DerivedPixelFuncType] gdal_handle_stdcall.GDALAddDerivedBandPixelFunc.restype = ctypes.c_int funcName = "pyDerivedPixelFunc" if version_info >= (3, 0, 0): funcName = bytes(funcName, 'utf-8') ret = gdal_handle_stdcall.GDALAddDerivedBandPixelFunc(funcName, my_cDerivedPixelFunc) assert ret == 0 vrt_xml = """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1" subClass="VRTDerivedRasterBand"> <PixelFunctionType>pyDerivedPixelFunc</PixelFunctionType> <SourceTransferType>Byte</SourceTransferType> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" src_ds = gdal.Open('data/byte.tif') ref_cs = src_ds.GetRasterBand(1).Checksum() ref_data = src_ds.GetRasterBand(1).ReadRaster(0, 0, 20, 20) src_ds = None ds = gdal.Open(vrt_xml) got_cs = ds.GetRasterBand(1).Checksum() got_data = ds.GetRasterBand(1).ReadRaster(0, 0, 20, 20) ds = None assert ref_cs == got_cs, 'wrong checksum' assert ref_data == got_data �������������������������������������������������������������������gdalautotest-3.1.2/gcore/gdal_stats.py��������������������������������������������������������������0000775�0001750�0001750�00000063432�13701057756�016517� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: gdal_stats.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test core numeric operations and statistics calculations # Author: Mateusz Loskot <mateusz@loskot.net> # ############################################################################### # Copyright (c) 2007, Mateusz Loskot <mateusz@loskot.net> # Copyright (c) 2009-2012, Even Rouault <even dot rouault at spatialys.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import struct import shutil import gdaltest from osgeo import gdal import pytest ############################################################################### # Test handling NaN with GDT_Float32 data def test_stats_nan_1(): gdaltest.gtiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.gtiff_drv is None: pytest.skip() stats = (50.0, 58.0, 54.0, 2.5819888974716) shutil.copyfile('data/nan32.tif', 'tmp/nan32.tif') t = gdaltest.GDALTest('GTiff', 'tmp/nan32.tif', 1, 874, filename_absolute=1) ret = t.testOpen(check_approx_stat=stats, check_stat=stats) gdal.GetDriverByName('GTiff').Delete('tmp/nan32.tif') return ret ############################################################################### # Test handling NaN with GDT_Float64 data def test_stats_nan_2(): if gdaltest.gtiff_drv is None: pytest.skip() stats = (50.0, 58.0, 54.0, 2.5819888974716) shutil.copyfile('data/nan64.tif', 'tmp/nan64.tif') t = gdaltest.GDALTest('GTiff', 'tmp/nan64.tif', 1, 4414, filename_absolute=1) ret = t.testOpen(check_approx_stat=stats, check_stat=stats) gdal.GetDriverByName('GTiff').Delete('tmp/nan64.tif') return ret ############################################################################### # Test stats on signed byte (#3151) def test_stats_signedbyte(): if gdaltest.gtiff_drv is None: pytest.skip() stats = (-128.0, 127.0, -0.2, 80.64) shutil.copyfile('data/stats_signed_byte.img', 'tmp/stats_signed_byte.img') t = gdaltest.GDALTest('HFA', 'tmp/stats_signed_byte.img', 1, 11, filename_absolute=1) ret = t.testOpen(check_approx_stat=stats, check_stat=stats, skip_checksum=1) gdal.GetDriverByName('HFA').Delete('tmp/stats_signed_byte.img') return ret ############################################################################### # Test return of GetStatistics() when we don't have stats and don't # force their computation (#3572) def test_stats_dont_force(): gdal.Unlink('data/byte.tif.aux.xml') ds = gdal.Open('data/byte.tif') stats = ds.GetRasterBand(1).GetStatistics(0, 0) assert stats == [0, 0, 0, -1], 'did not get expected stats' ############################################################################### # Test statistics when stored nodata value doesn't accurately match the nodata # value used in the imagery (#3573) def test_stats_approx_nodata(): shutil.copyfile('data/minfloat.tif', 'tmp/minfloat.tif') try: os.remove('tmp/minfloat.tif.aux.xml') except OSError: pass ds = gdal.Open('tmp/minfloat.tif') stats = ds.GetRasterBand(1).GetStatistics(0, 1) md = ds.GetRasterBand(1).GetMetadata() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None os.remove('tmp/minfloat.tif.aux.xml') ds = gdal.Open('tmp/minfloat.tif') minmax = ds.GetRasterBand(1).ComputeRasterMinMax() ds = None os.remove('tmp/minfloat.tif') if nodata != -3.4028234663852886e+38: print("%.18g" % nodata) pytest.fail('did not get expected nodata') assert stats == [-3.0, 5.0, 1.0, 4.0], 'did not get expected stats' assert md == {'STATISTICS_MEAN': '1', 'STATISTICS_MAXIMUM': '5', 'STATISTICS_MINIMUM': '-3', 'STATISTICS_STDDEV': '4', 'STATISTICS_VALID_PERCENT': '50'}, \ 'did not get expected metadata' assert minmax == (-3.0, 5.0), 'did not get expected minmax' ############################################################################### # Test read and copy of dataset with nan as nodata value (#3576) def test_stats_nan_3(): src_ds = gdal.Open('data/nan32_nodata.tif') nodata = src_ds.GetRasterBand(1).GetNoDataValue() assert gdaltest.isnan(nodata), ('expected nan, got %f' % nodata) out_ds = gdaltest.gtiff_drv.CreateCopy('tmp/nan32_nodata.tif', src_ds) del out_ds src_ds = None try: os.remove('tmp/nan32_nodata.tif.aux.xml') except OSError: pass ds = gdal.Open('tmp/nan32_nodata.tif') nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None gdaltest.gtiff_drv.Delete('tmp/nan32_nodata.tif') assert gdaltest.isnan(nodata), ('expected nan, got %f' % nodata) ############################################################################### # Test reading a VRT with a complex source that define nan as band nodata # and complex source nodata (#3576) def test_stats_nan_4(): ds = gdal.Open('data/nan32_nodata.vrt') cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None assert cs == 874, 'did not get expected checksum' assert gdaltest.isnan(nodata), ('expected nan, got %f' % nodata) ############################################################################### # Test reading a VRT with a complex source that define 0 as band nodata # and complex source nodata (nan must be translated to 0 then) (#3576) def test_stats_nan_5(): ds = gdal.Open('data/nan32_nodata_nan_to_zero.vrt') cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None assert cs == 978, 'did not get expected checksum' assert nodata == 0, ('expected nan, got %f' % nodata) ############################################################################### # Test reading a warped VRT with nan as src nodata and dest nodata (#3576) def test_stats_nan_6(): ds = gdal.Open('data/nan32_nodata_warp.vrt') cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None assert cs == 874, 'did not get expected checksum' assert gdaltest.isnan(nodata), ('expected nan, got %f' % nodata) ############################################################################### # Test reading a warped VRT with nan as src nodata and 0 as dest nodata (#3576) def test_stats_nan_7(): ds = gdal.Open('data/nan32_nodata_warp_nan_to_zero.vrt') cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None assert cs == 978, 'did not get expected checksum' assert nodata == 0, ('expected nan, got %f' % nodata) ############################################################################### # Test reading a warped VRT with zero as src nodata and nan as dest nodata (#3576) def test_stats_nan_8(): ds = gdal.Open('data/nan32_nodata_warp_zero_to_nan.vrt') cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None assert cs == 874, 'did not get expected checksum' assert gdaltest.isnan(nodata), ('expected nan, got %f' % nodata) ############################################################################### # Test statistics computation when nodata = +/- inf def stats_nodata_inf_progress_cbk(value, string, extra): # pylint: disable=unused-argument extra[0] = value def test_stats_nodata_inf(): ds = gdal.GetDriverByName('HFA').Create('/vsimem/stats_nodata_inf.img', 3, 1, 1, gdal.GDT_Float32) ds.GetRasterBand(1).SetNoDataValue(gdaltest.neginf()) ds.GetRasterBand(1).WriteRaster(0, 0, 1, 1, struct.pack('f', gdaltest.neginf()), buf_type=gdal.GDT_Float32) ds.GetRasterBand(1).WriteRaster(1, 0, 1, 1, struct.pack('f', 1), buf_type=gdal.GDT_Float32) ds.GetRasterBand(1).WriteRaster(2, 0, 1, 1, struct.pack('f', -2), buf_type=gdal.GDT_Float32) ds.GetRasterBand(1).Checksum() user_data = [0] stats = ds.GetRasterBand(1).ComputeStatistics(False, stats_nodata_inf_progress_cbk, user_data) assert user_data[0] == 1.0, 'did not get expected pct' ds = None gdal.GetDriverByName('HFA').Delete('/vsimem/stats_nodata_inf.img') assert stats == [-2.0, 1.0, -0.5, 1.5], 'did not get expected stats' ############################################################################### # Test deserialization of +inf/-inf values written by Linux and Windows def stats_nodata_check(filename, expected_nodata): ds = gdal.Open(filename) nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None assert nodata == expected_nodata, 'did not get expected nodata value' def test_stats_nodata_neginf_linux(): return stats_nodata_check('data/stats_nodata_neginf.tif', gdaltest.neginf()) def test_stats_nodata_neginf_msvc(): return stats_nodata_check('data/stats_nodata_neginf_msvc.tif', gdaltest.neginf()) def test_stats_nodata_posinf_linux(): return stats_nodata_check('data/stats_nodata_posinf.tif', gdaltest.posinf()) def test_stats_nodata_posinf_msvc(): return stats_nodata_check('data/stats_nodata_posinf_msvc.tif', gdaltest.posinf()) ############################################################################### # Test standard deviation computation on huge values def test_stats_stddev_huge_values(): gdal.FileFromMemBuffer('/vsimem/stats_stddev_huge_values.asc', """ncols 4 nrows 4 xllcorner 0 yllcorner 0 cellsize 1 100000000 100000002 100000000 100000002 100000000 100000002 100000000 100000002 100000000 100000002 100000000 100000002 100000000 100000002 100000000 100000002""") ds = gdal.Open('/vsimem/stats_stddev_huge_values.asc') stats = ds.GetRasterBand(1).ComputeStatistics(0) assert stats == [100000000.0, 100000002.0, 100000001.0, 1.0], \ 'did not get expected stats' ds = None gdal.GetDriverByName('AAIGRID').Delete('/vsimem/stats_stddev_huge_values.asc') ############################################################################### # Test approximate statistics computation on a square shaped raster whose first column # of blocks is nodata only def test_stats_square_shape(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/stats_square_shape.tif', 32, 32, options=['TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16']) ds.GetRasterBand(1).SetNoDataValue(0) ds.GetRasterBand(1).WriteRaster(16, 0, 16, 32, struct.pack('B' * 1, 255), buf_xsize=1, buf_ysize=1) stats = ds.GetRasterBand(1).ComputeStatistics(True) hist = ds.GetRasterBand(1).GetHistogram(approx_ok=1) minmax = ds.GetRasterBand(1).ComputeRasterMinMax(1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_square_shape.tif') assert stats == [255, 255, 255, 0], 'did not get expected stats' assert hist[255] == 16 * 16, 'did not get expected histogram' if minmax != (255, 255): print(hist) pytest.fail('did not get expected minmax') ############################################################################### # Test when nodata = FLT_MIN (#6578) def test_stats_flt_min(): shutil.copyfile('data/flt_min.tif', 'tmp/flt_min.tif') try: os.remove('tmp/flt_min.tif.aux.xml') except OSError: pass ds = gdal.Open('tmp/flt_min.tif') stats = ds.GetRasterBand(1).GetStatistics(0, 1) nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None os.remove('tmp/flt_min.tif.aux.xml') ds = gdal.Open('tmp/flt_min.tif') minmax = ds.GetRasterBand(1).ComputeRasterMinMax() ds = None os.remove('tmp/flt_min.tif') if nodata != 1.17549435082228751e-38: print("%.18g" % nodata) pytest.fail('did not get expected nodata') assert (stats == [0.0, 1.0, 0.33333333333333337, 0.47140452079103168] or \ stats == [0.0, 1.0, 0.33333333333333331, 0.47140452079103168]), \ 'did not get expected stats' assert minmax == (0.0, 1.0), 'did not get expected minmax' ############################################################################### # Test when nodata = DBL_MIN (#6578) def test_stats_dbl_min(): shutil.copyfile('data/dbl_min.tif', 'tmp/dbl_min.tif') try: os.remove('tmp/dbl_min.tif.aux.xml') except OSError: pass ds = gdal.Open('tmp/dbl_min.tif') stats = ds.GetRasterBand(1).GetStatistics(0, 1) nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None os.remove('tmp/dbl_min.tif.aux.xml') ds = gdal.Open('tmp/dbl_min.tif') minmax = ds.GetRasterBand(1).ComputeRasterMinMax() ds = None os.remove('tmp/dbl_min.tif') if nodata != 2.22507385850720138e-308: print("%.18g" % nodata) pytest.fail('did not get expected nodata') assert (stats == [0.0, 1.0, 0.33333333333333337, 0.47140452079103168] or \ stats == [0.0, 1.0, 0.33333333333333331, 0.47140452079103168]), \ 'did not get expected stats' assert minmax == (0.0, 1.0), 'did not get expected minmax' ############################################################################### # Test stats on a tiled Byte with partial tiles def test_stats_byte_partial_tiles(): ds = gdal.Translate('/vsimem/stats_byte_tiled.tif', '../gdrivers/data/small_world.tif', creationOptions=['TILED=YES', 'BLOCKXSIZE=64', 'BLOCKYSIZE=64']) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_byte_tiled.tif') expected_stats = [0.0, 255.0, 50.22115, 67.119029288849973] assert stats == expected_stats, 'did not get expected stats' # Same but with nodata set ds = gdal.Translate('/vsimem/stats_byte_tiled.tif', '../gdrivers/data/small_world.tif', creationOptions=['TILED=YES', 'BLOCKXSIZE=64', 'BLOCKYSIZE=64']) ds.GetRasterBand(1).SetNoDataValue(0) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_byte_tiled.tif') expected_stats = [1.0, 255.0, 50.311081057390084, 67.14541389488096] expected_stats_32bit = [1.0, 255.0, 50.311081057390084, 67.145413894880946] assert stats == expected_stats or stats == expected_stats_32bit, \ 'did not get expected stats' # Same but with nodata set but untiled and with non power of 16 block size ds = gdal.Translate('/vsimem/stats_byte_untiled.tif', '../gdrivers/data/small_world.tif', options='-srcwin 0 0 399 200') ds.GetRasterBand(1).SetNoDataValue(0) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_byte_untiled.tif') expected_stats = [1.0, 255.0, 50.378183963744554, 67.184793517649453] assert stats == expected_stats, 'did not get expected stats' ds = gdal.GetDriverByName('GTiff').Create('/vsimem/stats_byte_tiled.tif', 1000, 512, options=['TILED=YES', 'BLOCKXSIZE=512', 'BLOCKYSIZE=512']) ds.GetRasterBand(1).Fill(255) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.Unlink('/vsimem/stats_byte_tiled.tif') expected_stats = [255.0, 255.0, 255.0, 0.0] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' # Non optimized code path ds = gdal.GetDriverByName('MEM').Create('', 1, 1) ds.GetRasterBand(1).WriteRaster(0, 0, 1, 1, struct.pack('B' * 1, 1)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [1.0, 1.0, 1.0, 0.0] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' ds = gdal.GetDriverByName('MEM').Create('', 3, 5) ds.GetRasterBand(1).WriteRaster(0, 0, 3, 1, struct.pack('B' * 3, 20, 30, 50)) ds.GetRasterBand(1).WriteRaster(0, 1, 3, 1, struct.pack('B' * 3, 60, 10, 5)) ds.GetRasterBand(1).WriteRaster(0, 2, 3, 1, struct.pack('B' * 3, 10, 20, 0)) ds.GetRasterBand(1).WriteRaster(0, 3, 3, 1, struct.pack('B' * 3, 10, 20, 255)) ds.GetRasterBand(1).WriteRaster(0, 4, 3, 1, struct.pack('B' * 3, 10, 20, 10)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [0.0, 255.0, 35.333333333333336, 60.785597709398971] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' ds = gdal.GetDriverByName('MEM').Create('', 32 + 2, 2) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).WriteRaster(32, 1, 2, 1, struct.pack('B' * 2, 0, 255)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [0.0, 255.0, 4.7205882352941178, 30.576733555893391] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' ds = gdal.GetDriverByName('MEM').Create('', 32 + 2, 2) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).SetNoDataValue(2) ds.GetRasterBand(1).WriteRaster(32, 1, 2, 1, struct.pack('B' * 2, 0, 255)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [0.0, 255.0, 4.7205882352941178, 30.576733555893391] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' ############################################################################### # Test stats on uint16 def test_stats_uint16(): ds = gdal.Translate('/vsimem/stats_uint16_tiled.tif', '../gdrivers/data/small_world.tif', outputType=gdal.GDT_UInt16, scaleParams=[[0, 255, 0, 65535]], creationOptions=['TILED=YES', 'BLOCKXSIZE=64', 'BLOCKYSIZE=64']) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_uint16_tiled.tif') expected_stats = [0.0, 65535.0, 50.22115 * 65535 / 255, 67.119029288849973 * 65535 / 255] assert stats == expected_stats, 'did not get expected stats' ds = gdal.Translate('/vsimem/stats_uint16_untiled.tif', '../gdrivers/data/small_world.tif', options='-srcwin 0 0 399 200 -scale 0 255 0 65535 -ot UInt16') stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_uint16_untiled.tif') expected_stats = [0.0, 65535.0, 12923.9921679198, 17259.703026841547] assert stats == expected_stats, 'did not get expected stats' # Same but with nodata set but untiled and with non power of 16 block size ds = gdal.Translate('/vsimem/stats_uint16_untiled.tif', '../gdrivers/data/small_world.tif', options='-srcwin 0 0 399 200 -scale 0 255 0 65535 -ot UInt16') ds.GetRasterBand(1).SetNoDataValue(0) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/stats_uint16_untiled.tif') expected_stats = [257.0, 65535.0, 50.378183963744554 * 65535 / 255, 67.184793517649453 * 65535 / 255] assert stats == expected_stats, 'did not get expected stats' for fill_val in [0, 1, 32767, 32768, 65535]: ds = gdal.GetDriverByName('GTiff').Create('/vsimem/stats_uint16_tiled.tif', 1000, 512, 1, gdal.GDT_UInt16, options=['TILED=YES', 'BLOCKXSIZE=512', 'BLOCKYSIZE=512']) ds.GetRasterBand(1).Fill(fill_val) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None gdal.Unlink('/vsimem/stats_uint16_tiled.tif') expected_stats = [fill_val, fill_val, fill_val, 0.0] if max([abs(stats[i] - expected_stats[i]) for i in range(4)]) > 1e-15: print(fill_val) pytest.fail('did not get expected stats') # Test remaining pixels after multiple of 32 ds = gdal.GetDriverByName('MEM').Create('', 32 + 2, 1, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).WriteRaster(32, 0, 2, 1, struct.pack('H' * 2, 0, 65535)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [0.0, 65535.0, 1928.4411764705883, 11072.48066469611] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' # Non optimized code path for fill_val in [0, 1, 32767, 32768, 65535]: ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).WriteRaster(0, 0, 1, 1, struct.pack('H' * 1, fill_val)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [fill_val, fill_val, fill_val, 0.0] if max([abs(stats[i] - expected_stats[i]) for i in range(4)]) > 1e-15: print(fill_val) pytest.fail('did not get expected stats') ds = gdal.GetDriverByName('MEM').Create('', 3, 5, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).WriteRaster(0, 0, 3, 1, struct.pack('H' * 3, 20, 30, 50)) ds.GetRasterBand(1).WriteRaster(0, 1, 3, 1, struct.pack('H' * 3, 60, 10, 5)) ds.GetRasterBand(1).WriteRaster(0, 2, 3, 1, struct.pack('H' * 3, 10, 20, 0)) ds.GetRasterBand(1).WriteRaster(0, 3, 3, 1, struct.pack('H' * 3, 10, 20, 65535)) ds.GetRasterBand(1).WriteRaster(0, 4, 3, 1, struct.pack('H' * 3, 10, 20, 10)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [0.0, 65535.0, 4387.333333333333, 16342.408927558861] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).WriteRaster(0, 0, 2, 1, struct.pack('H' * 2, 0, 65535)) ds.GetRasterBand(1).WriteRaster(0, 1, 2, 1, struct.pack('H' * 2, 1, 65534)) stats = ds.GetRasterBand(1).GetStatistics(0, 1) ds = None expected_stats = [0.0, 65535.0, 32767.5, 32767.000003814814] assert max([abs(stats[i] - expected_stats[i]) for i in range(4)]) <= 1e-15, \ 'did not get expected stats' ############################################################################### # Test a case where the nodata value is almost the maximum value of float32 def test_stats_nodata_almost_max_float32(): gdal.FileFromMemBuffer('/vsimem/float32_almost_nodata_max_float32.tif', open('data/float32_almost_nodata_max_float32.tif', 'rb').read()) ds = gdal.Open('/vsimem/float32_almost_nodata_max_float32.tif') minmax = ds.GetRasterBand(1).ComputeRasterMinMax() assert minmax == (0, 0), 'did not get expected minmax' stats = ds.GetRasterBand(1).ComputeStatistics(False) assert stats == [0, 0, 0, 0], 'did not get expected stats' hist = ds.GetRasterBand(1).GetHistogram(approx_ok=0) assert hist[0] == 3, 'did not get expected hist' ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/float32_almost_nodata_max_float32.tif') ############################################################################### # Test STATISTICS_APPROXIMATE def test_stats_approx_stats_flag(dt=gdal.GDT_Byte, struct_frmt='B'): ds = gdal.GetDriverByName('MEM').Create('', 2000, 2000, 1, dt) ds.GetRasterBand(1).WriteRaster(1000, 1000, 1, 1, struct.pack(struct_frmt * 1, 20)) approx_ok = 1 force = 1 stats = ds.GetRasterBand(1).GetStatistics(approx_ok, force) assert stats == [0.0, 0.0, 0.0, 0.0], 'did not get expected stats' md = ds.GetRasterBand(1).GetMetadata() assert md == {'STATISTICS_MEAN': '0', 'STATISTICS_MAXIMUM': '0', 'STATISTICS_MINIMUM': '0', 'STATISTICS_APPROXIMATE': 'YES', 'STATISTICS_STDDEV': '0', 'STATISTICS_VALID_PERCENT': '100'}, \ 'did not get expected metadata' approx_ok = 0 force = 0 stats = ds.GetRasterBand(1).GetStatistics(approx_ok, force) assert stats == [0.0, 0.0, 0.0, -1.0], 'did not get expected stats' approx_ok = 0 force = 1 stats = ds.GetRasterBand(1).GetStatistics(approx_ok, force) assert stats[1] == 20.0, 'did not get expected stats' md = ds.GetRasterBand(1).GetMetadata() assert 'STATISTICS_APPROXIMATE' not in md, 'did not get expected metadata' def test_stats_approx_stats_flag_float(): return test_stats_approx_stats_flag(dt=gdal.GDT_Float32, struct_frmt='f') def test_stats_all_nodata(): ds = gdal.GetDriverByName('MEM').Create('', 2000, 2000) ds.GetRasterBand(1).SetNoDataValue(0) approx_ok = 1 force = 1 with gdaltest.error_handler(): stats = ds.GetRasterBand(1).GetStatistics(approx_ok, force) assert stats == [0.0, 0.0, 0.0, 0.0], 'did not get expected stats' ds = gdal.GetDriverByName('MEM').Create('', 2000, 2000, 1, gdal.GDT_Float32) ds.GetRasterBand(1).SetNoDataValue(0) approx_ok = 1 force = 1 with gdaltest.error_handler(): stats = ds.GetRasterBand(1).GetStatistics(approx_ok, force) assert stats == [0.0, 0.0, 0.0, 0.0], 'did not get expected stats' def test_stats_float32_with_nodata_slightly_above_float_max(): ds = gdal.Open('data/float32_with_nodata_slightly_above_float_max.tif') my_min, my_max = ds.GetRasterBand(1).ComputeRasterMinMax() assert (my_min, my_max) == (-1.0989999771118164, 0.703338623046875), \ 'did not get expected stats' ############################################################################### # Run tests ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/tiff_srs.py����������������������������������������������������������������0000775�0001750�0001750�00000072743�13701057756�016216� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: tiff_srs.py 0eae82ffc49629ee77c95bb50c919589c6112361 2020-05-16 12:31:09 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write round-tripping of SRS for GeoTIFF format. # Author: Even Rouault, <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2011-2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import pytest from osgeo import gdal from osgeo import osr ############################################################################### # Test fix for #4677: def test_tiff_srs_without_linear_units(): sr = osr.SpatialReference() sr.ImportFromProj4('+proj=vandg +datum=WGS84') ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_without_linear_units.tif', 1, 1) ds.SetProjection(sr.ExportToWkt()) ds = None ds = gdal.Open('/vsimem/tiff_srs_without_linear_units.tif') wkt = ds.GetProjectionRef() sr2 = osr.SpatialReference() sr2.SetFromUserInput(wkt) ds = None gdal.Unlink('/vsimem/tiff_srs_without_linear_units.tif') assert sr.IsSame(sr2) == 1, 'did not get expected SRS' ############################################################################### # Test writing a COMPDCS without VerticalCSType def test_srs_write_compd_cs(): sr = osr.SpatialReference() # EPSG:7400 without the Authority sr.SetFromUserInput("""COMPD_CS["unknown", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936265, AUTHORITY["EPSG","7011"]], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.5969213], UNIT["grad",0.01570796326794897], AUTHORITY["EPSG","4807"]], VERT_CS["NGF-IGN69 height", VERT_DATUM["Nivellement General de la France - IGN69",2005, AUTHORITY["EPSG","5119"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Up",UP]]]""") ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_compd_cs.tif', 1, 1) ds.SetProjection(sr.ExportToWkt()) ds = None gdal.SetConfigOption('GTIFF_REPORT_COMPD_CS', 'YES') ds = gdal.Open('/vsimem/tiff_srs_compd_cs.tif') wkt = ds.GetProjectionRef() gdal.SetConfigOption('GTIFF_REPORT_COMPD_CS', None) sr2 = osr.SpatialReference() sr2.SetFromUserInput(wkt) ds = None gdal.Unlink('/vsimem/tiff_srs_compd_cs.tif') assert sr.IsSame(sr2) == 1, wkt ############################################################################### # Test reading a COMPDCS without VerticalCSType def test_srs_read_compd_cs(): gdal.SetConfigOption('GTIFF_REPORT_COMPD_CS', 'YES') ds = gdal.Open('data/vertcs_user_defined.tif') wkt = ds.GetProjectionRef() gdal.SetConfigOption('GTIFF_REPORT_COMPD_CS', None) assert wkt == 'COMPD_CS["NAD27 / UTM zone 11N + EGM2008 height",PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]],VERT_CS["EGM2008 height",VERT_DATUM["EGM2008 geoid",2005,AUTHORITY["EPSG","1027"]],UNIT["foot",0.3048,AUTHORITY["EPSG","9002"]],AXIS["Up",UP]]]' ############################################################################### # Test reading a GeoTIFF with both StdParallel1 and ScaleAtNatOrigin defined (#5791) def test_tiff_srs_weird_mercator_2sp(): ds = gdal.Open('data/weird_mercator_2sp.tif') gdal.PushErrorHandler() wkt = ds.GetProjectionRef() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'warning expected' sr2 = osr.SpatialReference() sr2.SetFromUserInput(wkt) ds = None sr = osr.SpatialReference() # EPSG:7400 without the Authority sr.SetFromUserInput("""PROJCS["Global Mercator", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.2572221010002, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], PROJECTION["Mercator_2SP"], PARAMETER["standard_parallel_1",47.667], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""") assert sr.IsSame(sr2) == 1, 'did not get expected SRS' ############################################################################### # Test reading ESRI WGS_1984_Web_Mercator_Auxiliary_Sphere def test_tiff_srs_WGS_1984_Web_Mercator_Auxiliary_Sphere(): ds = gdal.Open('data/WGS_1984_Web_Mercator_Auxiliary_Sphere.tif') wkt = ds.GetProjectionRef() sr = osr.SpatialReference() sr.SetFromUserInput(wkt) wkt = sr.ExportToPrettyWkt() ds = None assert wkt == """PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"]]""" ############################################################################### # Test reading ESRI:102113 WGS_1984_Web_Mercator def test_tiff_srs_WGS_1984_Web_Mercator(): ds = gdal.Open('data/WGS_1984_Web_Mercator.tif') sr = ds.GetSpatialRef() ds = None assert sr.GetAuthorityName(None) == 'ESRI' assert sr.GetAuthorityCode(None) == '102113' ############################################################################### # Test writing and reading various angular units def test_tiff_srs_angular_units(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_angular_units.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 (arc-second)", DATUM["WGS_1984 (arc-second)", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["arc-second",4.848136811095361e-06]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_angular_units.tif') wkt = ds.GetProjectionRef() assert 'UNIT["arc-second",4.84813681109536E-06' in wkt ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_angular_units.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 (arc-minute)", DATUM["WGS_1984 (arc-minute)", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["arc-minute",0.0002908882086657216]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_angular_units.tif') wkt = ds.GetProjectionRef() assert 'UNIT["arc-minute",0.000290888208665722]' in wkt ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_angular_units.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 (grad)", DATUM["WGS_1984 (grad)", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["grad",0.01570796326794897]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_angular_units.tif') wkt = ds.GetProjectionRef() assert 'UNIT["grad",0.015707963267949' in wkt ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_angular_units.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 (gon)", DATUM["WGS_1984 (gon)", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["gon",0.01570796326794897]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_angular_units.tif') wkt = ds.GetProjectionRef() assert 'UNIT["gon",0.015707963267949]' in wkt ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_angular_units.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 (radian)", DATUM["WGS_1984 (radian)", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["radian",1]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_angular_units.tif') wkt = ds.GetProjectionRef() assert 'UNIT["radian",1]' in wkt ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_angular_units.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 (custom)", DATUM["WGS_1984 (custom)", SPHEROID["WGS 84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["custom",1.23]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_angular_units.tif') wkt = ds.GetProjectionRef() assert 'UNIT["custom",1.23]' in wkt ds = None gdal.Unlink('/vsimem/tiff_srs_angular_units.tif') ############################################################################### # Test writing and reading a unknown datum but with a known ellipsoid def test_tiff_custom_datum_known_ellipsoid(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_custom_datum_known_ellipsoid.tif', 1, 1) ds.SetProjection("""GEOGCS["WGS 84 based", DATUM["WGS_1984_based", SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]]], PRIMEM["Greenwich",0], UNIT["degree",1]]""") ds = None ds = gdal.Open('/vsimem/tiff_custom_datum_known_ellipsoid.tif') wkt = ds.GetProjectionRef() assert wkt == 'GEOGCS["WGS 84 based",DATUM["WGS_1984_based",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]' ds = None gdal.Unlink('/vsimem/tiff_custom_datum_known_ellipsoid.tif') ############################################################################### # Test reading a GeoTIFF file with only PCS set, but with a ProjLinearUnitsGeoKey # override to another unit (us-feet) ... (#6210) def test_tiff_srs_epsg_2853_with_us_feet(): old_val = gdal.GetConfigOption('GTIFF_IMPORT_FROM_EPSG') gdal.SetConfigOption('GTIFF_IMPORT_FROM_EPSG', 'YES') ds = gdal.Open('data/epsg_2853_with_us_feet.tif') gdal.SetConfigOption('GTIFF_IMPORT_FROM_EPSG', old_val) wkt = ds.GetProjectionRef() assert 'PARAMETER["false_easting",11482916.66' in wkt and 'UNIT["us_survey_feet",0.3048006' in wkt and '2853' not in wkt gdal.SetConfigOption('GTIFF_IMPORT_FROM_EPSG', 'NO') ds = gdal.Open('data/epsg_2853_with_us_feet.tif') gdal.SetConfigOption('GTIFF_IMPORT_FROM_EPSG', old_val) wkt = ds.GetProjectionRef() assert 'PARAMETER["false_easting",11482916.66' in wkt and 'UNIT["us_survey_feet",0.3048006' in wkt and '2853' not in wkt ############################################################################### # Test reading a SRS with a PCSCitationGeoKey = "LUnits = ..." def test_tiff_srs_PCSCitationGeoKey_LUnits(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_srs_PCSCitationGeoKey_LUnits.tif', 1, 1) ds.SetProjection("""PROJCS["UTM Zone 32, Northern Hemisphere", GEOGCS["GRS 1980(IUGG, 1980)", DATUM["unknown", SPHEROID["GRS80",6378137,298.257222101], TOWGS84[0,0,0,0,0,0,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",9], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",50000000], PARAMETER["false_northing",0], UNIT["Centimeter",0.01]]""") ds = None ds = gdal.Open('/vsimem/tiff_srs_PCSCitationGeoKey_LUnits.tif') wkt = ds.GetProjectionRef() assert wkt == 'PROJCS["UTM Zone 32, Northern Hemisphere",GEOGCS["GRS 1980(IUGG, 1980)",DATUM["unknown",SPHEROID["GRS80",6378137,298.257222101],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",50000000],PARAMETER["false_northing",0],UNIT["Centimeter",0.01],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' ds = None gdal.Unlink('/vsimem/tiff_srs_PCSCitationGeoKey_LUnits.tif') ############################################################################### # Test reading a geotiff key ProjectionGeoKey (Short,1): Unknown-3856 def test_tiff_srs_projection_3856(): ds = gdal.Open('data/projection_3856.tif') wkt = ds.GetProjectionRef() ds = None assert 'EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs' in wkt ############################################################################### # Test reading a geotiff with a LOCAL_CS and a Imagine citation def test_tiff_srs_imagine_localcs_citation(): ds = gdal.Open('data/imagine_localcs_citation.tif') wkt = ds.GetProjectionRef() ds = None assert wkt.startswith('LOCAL_CS["Projection Name = UTM Units = meters GeoTIFF Units = meters"') ############################################################################### # Test reading a geotiff with a EPSG code and a TOWGS84 key that must # override the default coming from EPSG def test_tiff_srs_towgs84_override_OSR_STRIP_TOWGS84_NO(): with gdaltest.config_option('OSR_STRIP_TOWGS84', 'NO'): ds = gdal.Open('data/gtiff_towgs84_override.tif') wkt = ds.GetProjectionRef() ds = None assert 'TOWGS84[584.8,67,400.3,0.105,0.013,-2.378,10.29]' in wkt, wkt def test_tiff_srs_towgs84_override_OSR_STRIP_TOWGS84_default(): ds = gdal.Open('data/gtiff_towgs84_override.tif') wkt = ds.GetProjectionRef() ds = None assert 'TOWGS84' not in wkt ############################################################################### # Test reading PCSCitationGeoKey (#7199) def test_tiff_srs_pcscitation(): ds = gdal.Open('data/pcscitation.tif') wkt = ds.GetProjectionRef() ds = None assert wkt.startswith('PROJCS["mycitation",') ############################################################################### # Test reading file with ProjectedCSTypeGeoKey and GeographicTypeGeoKey def test_tiff_srs_ProjectedCSTypeGeoKey_GeographicTypeGeoKey(): ds = gdal.Open('data/utmsmall.tif') sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == "26711" def _test_tiff_srs(sr, expect_fail): """ This is not a test by itself; it gets called by the tests below. """ ds = gdal.GetDriverByName('GTiff').Create('/vsimem/TestTiffSRS.tif', 1, 1) ds.SetSpatialRef(sr) ds = None ds = gdal.Open('/vsimem/TestTiffSRS.tif') wkt = ds.GetProjectionRef() sr2 = osr.SpatialReference() sr2.SetFromUserInput(wkt) if 'Miller' in wkt: # Trick so that the EXTENSION node with a PROJ string including +R_A is added sr2.ImportFromProj4(sr2.ExportToProj4()) ds = None gdal.Unlink('/vsimem/TestTiffSRS.tif') if sr.IsSame(sr2) != 1: if expect_fail: pytest.xfail('did not get expected SRS. known to be broken currently. FIXME!') print(sr) print(sr2) assert False, 'did not get expected SRS' else: if expect_fail: print('Succeeded but expected fail...') ############################################################################### # Write a geotiff and read it back to check its SRS epsg_list = [ [3814, False], # tmerc [28991, False], # sterea # [2046, False], # tmerc south oriented DISABLED. Not sure about the axis [3031, False], # polar stere (ticket #3220) [3032, False], # polar stere (ticket #3220) [32661, False], # stere [3408, False], # laea [2062, False], # lcc 1SP #[2065, True], # krovak South-West [5221, True], # krovak east-north [2066, False], # cass [2964, False], # aea [3410, False], # cea #[3786, False], # eqc spherical, method=9823. EPSG:3786 is now deprecated [32663, False], # eqc elliptical, method=9842 [4087, False], # eqc WGS 84 / World Equidistant Cylindrical method=1028 [4088, False], # eqc World Equidistant Cylindrical (Sphere) method=1029 [2934, False], # merc [27200, False], # nzmg [2057, False], # omerc Hotine_Oblique_Mercator_Azimuth_Center [3591, False], # omerc Hotine_Oblique_Mercator [29100, False], # poly [2056, False], # somerc [2027, False], # utm [4326, False], # longlat [26943, False], # lcc 2SP, [4328, False], # geocentric [3994, False], # mercator 2SP [26920, False], # UTM NAD83 special case [26720, False], # UTM NAD27 special case [32630, False], # UTM WGS84 north special case [32730, False], # UTM WGS84 south special case [22700, False], # unknown datum 'Deir_ez_Zor' [3857, True], # Web Mercator [102113, True], # ESRI WGS_1984_Web_Mercator ] @pytest.mark.parametrize('use_epsg_code', [0, 1]) @pytest.mark.parametrize( 'epsg_code,epsg_proj4_broken', epsg_list, ids=[str(r[0]) for r in epsg_list], ) def test_tiff_srs(use_epsg_code, epsg_code, epsg_proj4_broken): sr = osr.SpatialReference() if epsg_code > 32767: sr.SetFromUserInput('ESRI:' + str(epsg_code)) else: sr.ImportFromEPSG(epsg_code) expect_fail = False if use_epsg_code == 0: proj4str = sr.ExportToProj4() # print(proj4str) sr.SetFromUserInput(proj4str) expect_fail = epsg_proj4_broken _test_tiff_srs(sr, expect_fail) @pytest.mark.parametrize( 'proj4', [ '+proj=eqdc +lat_0=%.16g +lon_0=%.16g +lat_1=%.16g +lat_2=%.16g" +x_0=%.16g +y_0=%.16g' % (1, 2, 3, 4, 5, 6), '+proj=mill +R_A +lon_0=2 +x_0=3 +y_0=4 +datum=WGS84 +units=m +no_defs', '+proj=gnom +lat_0=%.16g +lon_0=%.16g +x_0=%.16g +y_0=%.16g' % (1, 2, 3, 4), '+proj=robin +lon_0=%.16g +x_0=%.16g +y_0=%.16g' % (1, 2, 3), '+proj=sinu +lon_0=%.16g +x_0=%.16g +y_0=%.16g' % (1, 2, 3), ], ids=[ 'eqdc', 'mill', 'gnom', 'robin', 'sinu', ] ) def test_tiff_srs_proj4(proj4): sr = osr.SpatialReference() sr.SetFromUserInput(proj4) _test_tiff_srs(sr, False) def _create_geotiff1_1_from_copy_and_compare(srcfilename, options = []): if int(gdal.GetDriverByName('GTiff').GetMetadataItem('LIBGEOTIFF')) < 1600: pytest.skip() src_ds = gdal.Open(srcfilename) tmpfile = '/vsimem/tmp.tif' gdal.GetDriverByName('GTiff').CreateCopy(tmpfile, src_ds, options = options + ['ENDIANNESS=LITTLE']) f = gdal.VSIFOpenL(tmpfile, 'rb') data = gdal.VSIFReadL(1, 100000, f) gdal.VSIFCloseL(f) gdal.Unlink(tmpfile) assert data == open(src_ds.GetDescription(), 'rb').read() def test_tiff_srs_read_epsg4326_geotiff1_1(): ds = gdal.Open('data/epsg4326_geotiff1_1.tif') sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == '4326' def test_tiff_srs_write_epsg4326_geotiff1_1(): _create_geotiff1_1_from_copy_and_compare('data/epsg4326_geotiff1_1.tif', options = ['GEOTIFF_VERSION=1.1']) def test_tiff_srs_read_epsg26711_geotiff1_1(): ds = gdal.Open('data/epsg26711_geotiff1_1.tif') sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == '26711' def test_tiff_srs_write_epsg26711_geotiff1_1(): _create_geotiff1_1_from_copy_and_compare('data/epsg26711_geotiff1_1.tif', options = ['GEOTIFF_VERSION=1.1']) def test_tiff_srs_read_epsg4326_3855_geotiff1_1(): ds = gdal.Open('data/epsg4326_3855_geotiff1_1.tif') sr = ds.GetSpatialRef() assert sr.GetName() == 'WGS 84 + EGM2008 height' assert sr.GetAuthorityCode('COMPD_CS|GEOGCS') == '4326' assert sr.GetAuthorityCode('COMPD_CS|VERT_CS') == '3855' def test_tiff_srs_write_epsg4326_3855_geotiff1_1(): _create_geotiff1_1_from_copy_and_compare('data/epsg4326_3855_geotiff1_1.tif') def test_tiff_srs_read_epsg4979_geotiff1_1(): ds = gdal.Open('data/epsg4979_geotiff1_1.tif') sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == '4979' def test_tiff_srs_write_epsg4979_geotiff1_1(): _create_geotiff1_1_from_copy_and_compare('data/epsg4979_geotiff1_1.tif') def test_tiff_srs_write_epsg4937_etrs89_3D_geotiff1_1(): if int(gdal.GetDriverByName('GTiff').GetMetadataItem('LIBGEOTIFF')) < 1600: pytest.skip() tmpfile = '/vsimem/tmp.tif' ds = gdal.GetDriverByName('GTiff').Create(tmpfile, 1, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(4937) ds.SetSpatialRef(sr) ds = None ds = gdal.Open(tmpfile) assert sr.GetName() == 'ETRS89' assert sr.GetAuthorityCode(None) == '4937' ds = None gdal.Unlink(tmpfile) # Deprecated way of conveying GeographicCRS 3D def test_tiff_srs_read_epsg4326_5030_geotiff1_1(): ds = gdal.Open('data/epsg4326_5030_geotiff1_1.tif') sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == '4979' def test_tiff_srs_read_epsg26711_3855_geotiff1_1(): ds = gdal.Open('data/epsg26711_3855_geotiff1_1.tif') sr = ds.GetSpatialRef() assert sr.GetName() == 'NAD27 / UTM zone 11N + EGM2008 height' assert sr.GetAuthorityCode('COMPD_CS|PROJCS') == '26711' assert sr.GetAuthorityCode('COMPD_CS|VERT_CS') == '3855' def test_tiff_srs_write_epsg26711_3855_geotiff1_1(): _create_geotiff1_1_from_copy_and_compare('data/epsg26711_3855_geotiff1_1.tif') # ProjectedCRS 3D not really defined yet in GeoTIFF 1.1, but this is # a natural extension def test_tiff_srs_read_epsg32631_4979_geotiff1_1(): ds = gdal.Open('data/epsg32631_4979_geotiff1_1.tif') sr = ds.GetSpatialRef() # PROJ 6.0 didn't include the ID of the base CRS assert sr.ExportToWkt().replace(',ID["EPSG",4979]','') == 'PROJCRS["WGS 84 / UTM zone 31N",BASEGEOGCRS["WGS 84",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4979]],CONVERSION["UTM zone 31N",METHOD["Transverse Mercator",ID["EPSG",9807]],PARAMETER["Latitude of natural origin",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude of natural origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale factor at natural origin",0.9996,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False easting",500000,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]],ID["EPSG",16031]],CS[Cartesian,3],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1]],AXIS["ellipsoidal height (h)",up,ORDER[3],LENGTHUNIT["metre",1]]]'.replace(',ID["EPSG",4979]','') def test_tiff_srs_write_vertical_perspective(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/src.tif', 1, 1) sr = osr.SpatialReference() sr.SetGeogCS("GEOG_NAME", "D_DATUM_NAME", "", 3000000, 0) sr.SetVerticalPerspective(1, 2, 0, 1000, 0, 0) gdal.ErrorReset() ds.SetSpatialRef(sr) assert gdal.GetLastErrorMsg() == '' ds = None assert gdal.VSIStatL('/vsimem/src.tif.aux.xml') src_ds = gdal.Open('/vsimem/src.tif') # First is PROJ 7 assert src_ds.GetSpatialRef().ExportToProj4() in ('+proj=nsper +lat_0=1 +lon_0=2 +h=1000 +x_0=0 +y_0=0 +R=3000000 +units=m +no_defs', '+proj=nsper +R=3000000 +lat_0=1 +lon_0=2 +h=1000 +x_0=0 +y_0=0 +wktext +no_defs') gdal.ErrorReset() gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/dst.tif', src_ds) assert gdal.GetLastErrorMsg() == '' assert gdal.VSIStatL('/vsimem/dst.tif.aux.xml') ds = gdal.Open('/vsimem/dst.tif') assert ds.GetSpatialRef().ExportToProj4() == src_ds.GetSpatialRef().ExportToProj4() src_ds = None ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/src.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/dst.tif') def test_tiff_srs_write_ob_tran_eqc(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/src.tif', 1, 1) sr = osr.SpatialReference() sr.ImportFromProj4( '+proj=ob_tran +o_proj=eqc +o_lon_p=-90 +o_lat_p=180 +lon_0=0 +R=3396190 +units=m +no_defs' ) ds.SetSpatialRef(sr) ds = None assert gdal.VSIStatL('/vsimem/src.tif.aux.xml') ds = gdal.Open('/vsimem/src.tif') assert ds.GetSpatialRef().ExportToProj4() == '+proj=ob_tran +o_proj=eqc +o_lon_p=-90 +o_lat_p=180 +lon_0=0 +R=3396190 +units=m +no_defs' ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/src.tif') def test_tiff_srs_towgs84_from_epsg_do_not_write_it(): filename = '/vsimem/test.tif' ds = gdal.GetDriverByName('GTiff').Create(filename, 1, 1) srs_in = osr.SpatialReference() srs_in.ImportFromEPSG(31468) srs_in.AddGuessedTOWGS84() assert srs_in.HasTOWGS84() ds.SetSpatialRef(srs_in) ds = None ds = gdal.Open(filename) with gdaltest.config_option('OSR_ADD_TOWGS84_ON_IMPORT_FROM_EPSG', 'NO'): srs = ds.GetSpatialRef() assert not srs.HasTOWGS84() def test_tiff_srs_towgs84_from_epsg_force_write_it(): filename = '/vsimem/test.tif' ds = gdal.GetDriverByName('GTiff').Create(filename, 1, 1) srs_in = osr.SpatialReference() srs_in.ImportFromEPSG(31468) srs_in.AddGuessedTOWGS84() assert srs_in.HasTOWGS84() with gdaltest.config_option('GTIFF_WRITE_TOWGS84', 'YES'): ds.SetSpatialRef(srs_in) ds = None with gdaltest.config_option('OSR_STRIP_TOWGS84', 'NO'): ds = gdal.Open(filename) with gdaltest.config_option('OSR_ADD_TOWGS84_ON_IMPORT_FROM_EPSG', 'NO'): srs = ds.GetSpatialRef() assert srs.HasTOWGS84() def test_tiff_srs_towgs84_with_epsg_code_but_non_default_TOWGS84(): filename = '/vsimem/test.tif' ds = gdal.GetDriverByName('GTiff').Create(filename, 1, 1) srs_in = osr.SpatialReference() srs_in.SetFromUserInput("""PROJCS["DHDN / 3-degree Gauss-Kruger zone 4", GEOGCS["DHDN", DATUM["Deutsches_Hauptdreiecksnetz", SPHEROID["Bessel 1841",6377397.155,299.1528128, AUTHORITY["EPSG","7004"]], TOWGS84[1,2,3,4,5,6,7], AUTHORITY["EPSG","6314"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4314"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",12], PARAMETER["scale_factor",1], PARAMETER["false_easting",4500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Northing",NORTH], AXIS["Easting",EAST], AUTHORITY["EPSG","31468"]]""") ds.SetSpatialRef(srs_in) ds = None with gdaltest.config_option('OSR_STRIP_TOWGS84', 'NO'): ds = gdal.Open(filename) srs = ds.GetSpatialRef() assert srs.GetTOWGS84() == (1,2,3,4,5,6,7) def test_tiff_srs_write_epsg3857(): tmpfile = '/vsimem/tmp.tif' ds = gdal.GetDriverByName('GTiff').Create(tmpfile, 1, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(3857) ds.SetSpatialRef(sr) ds = None ds = gdal.Open(tmpfile) assert sr.GetName() == 'WGS 84 / Pseudo-Mercator' assert sr.GetAuthorityCode(None) == '3857' f = gdal.VSIFOpenL(tmpfile, 'rb') data = gdal.VSIFReadL(1, 100000, f) gdal.VSIFCloseL(f) gdal.Unlink(tmpfile) assert b"ESRI PE String" not in data def test_tiff_srs_read_epsg26730_with_linear_units_set(): ds = gdal.Open('data/epsg26730_with_linear_units_set.tif') sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == '26730' def test_tiff_srs_read_user_defined_geokeys(): if int(gdal.GetDriverByName('GTiff').GetMetadataItem('LIBGEOTIFF')) < 1600: pytest.skip() gdal.ErrorReset() ds = gdal.Open('data/byte_user_defined_geokeys.tif') sr = ds.GetSpatialRef() assert gdal.GetLastErrorMsg() == '' assert sr is not None �����������������������������gdalautotest-3.1.2/gcore/tiff_ovr.py����������������������������������������������������������������0000775�0001750�0001750�00000173421�13701057756�016210� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: tiff_ovr.py 8c19c9d87751afbf777096601d97c45a23928d5e 2020-06-26 17:57:17 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test Overview Support (mostly a GeoTIFF issue). # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2004, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import shutil import array import stat from osgeo import osr from osgeo import gdal import pytest import gdaltest @pytest.fixture(params=['invert', 'dont-invert']) def both_endian(request): """ Runs tests with both values of GDAL_TIFF_ENDIANNESS """ if request.param == 'invert': with gdaltest.config_option('GDAL_TIFF_ENDIANNESS', 'INVERTED'): yield else: yield ############################################################################### # Check the overviews def tiff_ovr_check(src_ds): for i in (1, 2, 3): assert src_ds.GetRasterBand(i).GetOverviewCount() == 2, 'overviews missing' ovr_band = src_ds.GetRasterBand(i).GetOverview(0) if ovr_band.XSize != 10 or ovr_band.YSize != 10: msg = 'overview wrong size: band %d, overview 0, size = %d * %d,' % (i, ovr_band.XSize, ovr_band.YSize) pytest.fail(msg) if ovr_band.Checksum() != 1087: msg = 'overview wrong checksum: band %d, overview 0, checksum = %d,' % (i, ovr_band.Checksum()) pytest.fail(msg) ovr_band = src_ds.GetRasterBand(i).GetOverview(1) if ovr_band.XSize != 5 or ovr_band.YSize != 5: msg = 'overview wrong size: band %d, overview 1, size = %d * %d,' % (i, ovr_band.XSize, ovr_band.YSize) pytest.fail(msg) if ovr_band.Checksum() != 328: msg = 'overview wrong checksum: band %d, overview 1, checksum = %d,' % (i, ovr_band.Checksum()) pytest.fail(msg) ############################################################################### # Create a 3 band floating point GeoTIFF file so we can build overviews on it # later. Build overviews on it. def test_tiff_ovr_1(both_endian): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/mfloat32.vrt') assert src_ds is not None, 'Failed to open test dataset.' gdaltest.tiff_drv.CreateCopy('tmp/mfloat32.tif', src_ds, options=['INTERLEAVE=PIXEL']) src_ds = None ds = gdal.Open('tmp/mfloat32.tif') assert ds is not None, 'Failed to open test dataset.' err = ds.BuildOverviews(overviewlist=[2, 4]) assert err == 0, 'BuildOverviews reports an error' ret = tiff_ovr_check(ds) ds = None return ret ############################################################################### # Open file and verify some characteristics of the overviews. def test_tiff_ovr_2(both_endian): src_ds = gdal.Open('tmp/mfloat32.tif') assert src_ds is not None, 'Failed to open test dataset.' ret = tiff_ovr_check(src_ds) src_ds = None return ret ############################################################################### # Open target file in update mode, and create internal overviews. def test_tiff_ovr_3(both_endian): try: os.unlink('tmp/mfloat32.tif.ovr') except OSError: pass src_ds = gdal.Open('tmp/mfloat32.tif', gdal.GA_Update) assert src_ds is not None, 'Failed to open test dataset.' err = src_ds.BuildOverviews(overviewlist=[2, 4]) assert err == 0, 'BuildOverviews reports an error' ret = tiff_ovr_check(src_ds) src_ds = None return ret ############################################################################### # Re-open target file and check overviews def test_tiff_ovr_3bis(both_endian): return test_tiff_ovr_2(both_endian) ############################################################################### # Test generation def test_tiff_ovr_4(both_endian): shutil.copyfile('data/oddsize_1bit2b.tif', 'tmp/ovr4.tif') wrk_ds = gdal.Open('tmp/ovr4.tif', gdal.GA_Update) assert wrk_ds is not None, 'Failed to open test dataset.' wrk_ds.BuildOverviews('AVERAGE_BIT2GRAYSCALE', overviewlist=[2, 4]) wrk_ds = None wrk_ds = gdal.Open('tmp/ovr4.tif') ovband = wrk_ds.GetRasterBand(1).GetOverview(1) md = ovband.GetMetadata() assert 'RESAMPLING' in md and md['RESAMPLING'] == 'AVERAGE_BIT2GRAYSCALE', \ 'Did not get expected RESAMPLING metadata.' # compute average value of overview band image data. ovimage = ovband.ReadRaster(0, 0, ovband.XSize, ovband.YSize) pix_count = ovband.XSize * ovband.YSize total = 0.0 is_bytes = False if (isinstance(ovimage, bytes) and not isinstance(ovimage, str)): is_bytes = True if is_bytes is True: for i in range(pix_count): total += ovimage[i] else: for i in range(pix_count): total += ord(ovimage[i]) average = total / pix_count exp_average = 154.0992 assert average == pytest.approx(exp_average, abs=0.1), 'got wrong average for overview image' # Read base band as overview resolution and verify we aren't getting # the grayscale image. frband = wrk_ds.GetRasterBand(1) ovimage = frband.ReadRaster(0, 0, frband.XSize, frband.YSize, ovband.XSize, ovband.YSize) pix_count = ovband.XSize * ovband.YSize total = 0.0 if is_bytes is True: for i in range(pix_count): total += ovimage[i] else: for i in range(pix_count): total += ord(ovimage[i]) average = total / pix_count exp_average = 0.6096 assert average == pytest.approx(exp_average, abs=0.01), 'got wrong average for downsampled image' wrk_ds = None ############################################################################### # Test average overview generation with nodata. def test_tiff_ovr_5(both_endian): shutil.copyfile('data/nodata_byte.tif', 'tmp/ovr5.tif') wrk_ds = gdal.Open('tmp/ovr5.tif', gdal.GA_ReadOnly) assert wrk_ds is not None, 'Failed to open test dataset.' wrk_ds.BuildOverviews('AVERAGE', overviewlist=[2]) cs = wrk_ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 1130 assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Same as tiff_ovr_5 but with USE_RDD=YES to force external overview def test_tiff_ovr_6(both_endian): shutil.copyfile('data/nodata_byte.tif', 'tmp/ovr6.tif') with gdaltest.config_option('USE_RRD', 'YES'): wrk_ds = gdal.Open('tmp/ovr6.tif', gdal.GA_Update) assert wrk_ds is not None, 'Failed to open test dataset.' def cbk(pct, _, user_data): if user_data[0] < 0: assert pct == 0 assert pct >= user_data[0] user_data[0] = pct return 1 tab = [-1] wrk_ds.BuildOverviews('AVERAGE', overviewlist=[2], callback=cbk, callback_data=tab) assert tab[0] == 1.0 try: os.stat('tmp/ovr6.aux') except OSError: pytest.fail('no external overview.') cs = wrk_ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 1130 assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Check nearest resampling on a dataset with a raster band that has a color table def test_tiff_ovr_7(both_endian): shutil.copyfile('data/test_average_palette.tif', 'tmp/test_average_palette.tif') # This dataset is a black&white chessboard, index 0 is black, index 1 is white. # In nearest resampling, we are expecting a uniform black image. ds = gdal.Open('tmp/test_average_palette.tif', gdal.GA_Update) assert ds is not None, 'Failed to open test dataset.' ds.BuildOverviews('NEAREST', overviewlist=[2]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 0 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Check average resampling on a dataset with a raster band that has a color table def test_tiff_ovr_8(both_endian): shutil.copyfile('data/test_average_palette.tif', 'tmp/test_average_palette.tif') # This dataset is a black&white chessboard, index 0 is black, index 1 is white. # So the result of averaging (0,0,0) and (255,255,255) is (127,127,127), which is # index 2. So the result of the averaging is a uniform grey image. ds = gdal.Open('tmp/test_average_palette.tif', gdal.GA_Update) assert ds is not None, 'Failed to open test dataset.' ds.BuildOverviews('AVERAGE', overviewlist=[2]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 200 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Test --config COMPRESS_OVERVIEW JPEG --config PHOTOMETRIC_OVERVIEW YCBCR -ro # Will also check that pixel interleaving is automatically selected (#3064) def test_tiff_ovr_9(both_endian): gdaltest.tiff_drv.Delete('tmp/ovr9.tif') shutil.copyfile('data/rgbsmall.tif', 'tmp/ovr9.tif') with gdaltest.config_options({'COMPRESS_OVERVIEW': 'JPEG', 'PHOTOMETRIC_OVERVIEW': 'YCBCR'}): ds = gdal.Open('tmp/ovr9.tif', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open test dataset.' ds.BuildOverviews('AVERAGE', overviewlist=[2]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 5562 ds = None assert cs == exp_cs or cs == 5635, 'got wrong overview checksum.' # Re-check after dataset reopening ds = gdal.Open('tmp/ovr9.tif', gdal.GA_ReadOnly) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 5562 ds = None assert cs == exp_cs or cs == 5635, 'got wrong overview checksum.' ############################################################################### # Similar to tiff_ovr_9 but with internal overviews. def test_tiff_ovr_10(both_endian): src_ds = gdal.Open('data/rgbsmall.tif', gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr10.tif', src_ds, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR']) src_ds = None assert ds is not None, 'Failed to apply JPEG compression.' ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr10.tif', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open copy of test dataset.' cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 5562 ds = None assert cs == exp_cs or cs == 5635, 'got wrong overview checksum.' ############################################################################### # Overview on a dataset with NODATA_VALUES def test_tiff_ovr_11(both_endian): src_ds = gdal.Open('data/test_nodatavalues.tif', gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr11.tif', src_ds) src_ds = None ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr11.tif', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open copy of test dataset.' cs = ds.GetRasterBand(2).GetOverview(0).Checksum() # If NODATA_VALUES was ignored, we would get 2766 exp_cs = 2792 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Same as tiff_ovr_11 but with compression to trigger the multiband overview # code def test_tiff_ovr_12(both_endian): src_ds = gdal.Open('data/test_nodatavalues.tif', gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr12.tif', src_ds, options=['COMPRESS=DEFLATE']) src_ds = None ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr12.tif', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open copy of test dataset.' cs = ds.GetRasterBand(2).GetOverview(0).Checksum() # If NODATA_VALUES was ignored, we would get 2766 exp_cs = 2792 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Test gaussian resampling def test_tiff_ovr_13(both_endian): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/mfloat32.vrt') assert src_ds is not None, 'Failed to open test dataset.' gdaltest.tiff_drv.CreateCopy('tmp/mfloat32.tif', src_ds, options=['INTERLEAVE=PIXEL']) src_ds = None ds = gdal.Open('tmp/mfloat32.tif') assert ds is not None, 'Failed to open test dataset.' err = ds.BuildOverviews('GAUSS', overviewlist=[2, 4]) assert err == 0, 'BuildOverviews reports an error' # if ds.GetRasterBand(1).GetOverview(0).Checksum() != 1225: # gdaltest.post_reason( 'bad checksum' ) # return 'fail' ds = None ############################################################################### # Check gauss resampling on a dataset with a raster band that has a color table def test_tiff_ovr_14(both_endian): shutil.copyfile('data/test_average_palette.tif', 'tmp/test_gauss_palette.tif') ds = gdal.Open('tmp/test_gauss_palette.tif', gdal.GA_Update) assert ds is not None, 'Failed to open test dataset.' ds.BuildOverviews('GAUSS', overviewlist=[2]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 200 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Same as tiff_ovr_11 but with gauss, and compression to trigger the multiband overview # code def test_tiff_ovr_15(both_endian): src_ds = gdal.Open('data/test_nodatavalues.tif', gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr15.tif', src_ds, options=['COMPRESS=DEFLATE']) src_ds = None ds.BuildOverviews('GAUSS', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr15.tif', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open copy of test dataset.' cs = ds.GetRasterBand(2).GetOverview(0).Checksum() # If NODATA_VALUES was ignored, we would get 2954 exp_cs = 2987 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Test mode resampling on non-byte dataset def test_tiff_ovr_16(both_endian): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/mfloat32.vrt') assert src_ds is not None, 'Failed to open test dataset.' gdaltest.tiff_drv.CreateCopy('tmp/ovr16.tif', src_ds, options=['INTERLEAVE=PIXEL']) src_ds = None ds = gdal.Open('tmp/ovr16.tif') assert ds is not None, 'Failed to open test dataset.' err = ds.BuildOverviews('MODE', overviewlist=[2, 4]) assert err == 0, 'BuildOverviews reports an error' cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 1122 assert cs == exp_cs, 'bad checksum' ds = None ############################################################################### # Test mode resampling on a byte dataset def test_tiff_ovr_17(both_endian): shutil.copyfile('data/byte.tif', 'tmp/ovr17.tif') ds = gdal.Open('tmp/ovr17.tif') assert ds is not None, 'Failed to open test dataset.' err = ds.BuildOverviews('MODE', overviewlist=[2, 4]) assert err == 0, 'BuildOverviews reports an error' cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 1122 assert cs == exp_cs, 'bad checksum' ds = None ############################################################################### # Check mode resampling on a dataset with a raster band that has a color table def test_tiff_ovr_18(both_endian): shutil.copyfile('data/test_average_palette.tif', 'tmp/ovr18.tif') ds = gdal.Open('tmp/ovr18.tif', gdal.GA_Update) assert ds is not None, 'Failed to open test dataset.' ds.BuildOverviews('MODE', overviewlist=[2]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 100 ds = None assert cs == exp_cs, 'got wrong overview checksum.' ############################################################################### # Check that we can create overviews on a newly create file (#2621) def test_tiff_ovr_19(both_endian): ds = gdal.GetDriverByName('GTiff').Create('tmp/ovr19.tif', 100, 100, 1) ds.GetRasterBand(1).Fill(1) # The flush is important to simulate the behaviour that wash it by #2621 ds.FlushCache() ds.BuildOverviews('NEAR', overviewlist=[2]) ds.FlushCache() ds.BuildOverviews('NEAR', overviewlist=[2, 4]) assert ds.GetRasterBand(1).GetOverviewCount() == 2, \ 'Overview could not be generated' cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 2500 cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == 625 ds = None ############################################################################### # Test BIGTIFF_OVERVIEW=YES option def test_tiff_ovr_20(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr20.tif', 100, 100, 1) ds = None ds = gdal.Open('tmp/ovr20.tif') assert ds is not None, 'Failed to open test dataset.' with gdaltest.config_option('BIGTIFF_OVERVIEW', 'YES'): ds.BuildOverviews('NEAREST', overviewlist=[2, 4]) ds = None fileobj = open('tmp/ovr20.tif.ovr', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() # Check BigTIFF signature assert (not ((binvalues[2] != 0x2B or binvalues[3] != 0) and (binvalues[3] != 0x2B or binvalues[2] != 0))) ############################################################################### # Test BIGTIFF_OVERVIEW=IF_NEEDED option def test_tiff_ovr_21(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr21.tif', 170000, 100000, 1, options=['SPARSE_OK=YES']) ds = None ds = gdal.Open('tmp/ovr21.tif') assert ds is not None, 'Failed to open test dataset.' # 170 k * 100 k = 17 GB. 17 GB / (2^2) = 4.25 GB > 4.2 GB # so BigTIFF is needed ds.BuildOverviews('NONE', overviewlist=[2]) ds = None fileobj = open('tmp/ovr21.tif.ovr', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() # Check BigTIFF signature assert (not ((binvalues[2] != 0x2B or binvalues[3] != 0) and (binvalues[3] != 0x2B or binvalues[2] != 0))) ############################################################################### # Test BIGTIFF_OVERVIEW=NO option when BigTIFF is really needed def test_tiff_ovr_22(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr22.tif', 170000, 100000, 1, options=['SPARSE_OK=YES']) ds = None ds = gdal.Open('tmp/ovr22.tif') assert ds is not None, 'Failed to open test dataset.' # 170 k * 100 k = 17 GB. 17 GB / (2^2) = 4.25 GB > 4.2 GB # so BigTIFF is needed with gdaltest.config_option('BIGTIFF_OVERVIEW', 'NO'): with gdaltest.error_handler(): err = ds.BuildOverviews('NONE', overviewlist=[2]) ds = None if err != 0: return pytest.fail() ############################################################################### # Same as before, but BigTIFF might be not needed as we use a compression # method for the overviews. def test_tiff_ovr_23(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr23.tif', 170000, 100000, 1, options=['SPARSE_OK=YES']) ds = None ds = gdal.Open('tmp/ovr23.tif') assert ds is not None, 'Failed to open test dataset.' with gdaltest.config_option('BIGTIFF_OVERVIEW', 'NO'): with gdaltest.config_option('COMPRESS_OVERVIEW', 'DEFLATE'): ds.BuildOverviews('NONE', overviewlist=[2]) ds = None fileobj = open('tmp/ovr23.tif.ovr', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() # Check Classical TIFF signature assert (not ((binvalues[2] != 0x2A or binvalues[3] != 0) and (binvalues[3] != 0x2A or binvalues[2] != 0))) ############################################################################### # Test BIGTIFF_OVERVIEW=IF_SAFER option def test_tiff_ovr_24(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr24.tif', 85000, 100000, 1, options=['SPARSE_OK=YES']) ds = None ds = gdal.Open('tmp/ovr24.tif') assert ds is not None, 'Failed to open test dataset.' # 85 k * 100 k = 8.5 GB, so BigTIFF might be needed as # 8.5 GB / 2 > 4.2 GB with gdaltest.config_option('BIGTIFF_OVERVIEW', 'IF_SAFER'): ds.BuildOverviews('NONE', overviewlist=[16]) ds = None fileobj = open('tmp/ovr24.tif.ovr', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() # Check BigTIFF signature assert (not ((binvalues[2] != 0x2B or binvalues[3] != 0) and (binvalues[3] != 0x2B or binvalues[2] != 0))) ############################################################################### # Test creating overviews after some blocks have been written in the main # band and actually flushed def test_tiff_ovr_25(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr25.tif', 100, 100, 1) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).FlushCache() ds.BuildOverviews('NEAR', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr25.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 10000 assert ds.GetRasterBand(1).GetOverviewCount() != 0 assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 2500 ############################################################################### # Test gdal.RegenerateOverview() def test_tiff_ovr_26(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr26.tif', 100, 100, 1) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).FlushCache() ds.BuildOverviews('NEAR', overviewlist=[2]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() ds.GetRasterBand(1).GetOverview(0).Fill(0) cs_new = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs_new == 0 gdal.RegenerateOverview(ds.GetRasterBand(1), ds.GetRasterBand(1).GetOverview(0), 'NEAR') cs_new = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == cs_new ds = None ############################################################################### # Test gdal.RegenerateOverviews() def test_tiff_ovr_27(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr27.tif', 100, 100, 1) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).FlushCache() ds.BuildOverviews('NEAR', overviewlist=[2, 4]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2 = ds.GetRasterBand(1).GetOverview(1).Checksum() ds.GetRasterBand(1).GetOverview(0).Fill(0) ds.GetRasterBand(1).GetOverview(1).Fill(0) cs_new = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2_new = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs_new == 0 and cs2_new == 0 gdal.RegenerateOverviews(ds.GetRasterBand(1), [ds.GetRasterBand(1).GetOverview(0), ds.GetRasterBand(1).GetOverview(1)], 'NEAR') cs_new = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2_new = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == cs_new assert cs2 == cs2_new ds = None ############################################################################### # Test cleaning overviews. def test_tiff_ovr_28(both_endian): ds = gdal.Open('tmp/ovr25.tif', gdal.GA_Update) assert ds.BuildOverviews(overviewlist=[]) == 0, \ 'BuildOverviews() returned error code.' assert ds.GetRasterBand(1).GetOverviewCount() == 0, \ 'Overview(s) appear to still exist.' # Close and reopen to confirm they are really gone. ds = None ds = gdal.Open('tmp/ovr25.tif') assert ds.GetRasterBand(1).GetOverviewCount() == 0, \ 'Overview(s) appear to still exist after reopen.' ############################################################################### # Test cleaning external overviews (ovr) on a non-TIFF format. def test_tiff_ovr_29(both_endian): src_ds = gdal.Open('data/byte.tif') png_ds = gdal.GetDriverByName('PNG').CreateCopy('tmp/ovr29.png', src_ds) src_ds = None png_ds.BuildOverviews(overviewlist=[2]) png_ds = None assert open('tmp/ovr29.png.ovr') is not None, 'Did not expected .ovr file.' png_ds = gdal.Open('tmp/ovr29.png') assert png_ds.GetRasterBand(1).GetOverviewCount() == 1, 'did not find overview' png_ds.BuildOverviews(overviewlist=[]) assert png_ds.GetRasterBand(1).GetOverviewCount() == 0, 'delete overview failed.' png_ds = None png_ds = gdal.Open('tmp/ovr29.png') assert png_ds.GetRasterBand(1).GetOverviewCount() == 0, 'delete overview failed.' png_ds = None assert not os.path.exists('tmp/ovr29.png.ovr') gdal.GetDriverByName('PNG').Delete('tmp/ovr29.png') ############################################################################### # Test fix for #2988. def test_tiff_ovr_30(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr30.tif', 20, 20, 1) ds.BuildOverviews(overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr30.tif', gdal.GA_Update) ds.SetMetadata({'TEST_KEY': 'TestValue'}) ds = None ds = gdaltest.tiff_drv.Create('tmp/ovr30.tif', 20, 20, 1) ds.BuildOverviews(overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr30.tif', gdal.GA_Update) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) ds = None ds = gdal.Open('tmp/ovr30.tif') assert ds.GetProjectionRef().find('4326') != -1 ############################################################################### # Test fix for #3033 def test_tiff_ovr_31(both_endian): ds = gdaltest.tiff_drv.Create('tmp/ovr31.tif', 100, 100, 4) ds.GetRasterBand(1).Fill(255) ds.GetRasterBand(2).Fill(255) ds.GetRasterBand(3).Fill(255) ds.GetRasterBand(4).Fill(255) ds.BuildOverviews('average', overviewlist=[2, 4]) cs = ds.GetRasterBand(1).GetOverview(1).Checksum() expected_cs = 7646 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d' % (cs, expected_cs)) ds = None ############################################################################### # Test Cubic sampling. def test_tiff_ovr_32(both_endian): # 4 regular band shutil.copyfile('data/stefan_full_rgba_photometric_rgb.tif', 'tmp/ovr32.tif') ds = gdal.Open('tmp/ovr32.tif', gdal.GA_Update) ds.BuildOverviews('cubic', overviewlist=[2, 5]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs = 21168 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 0.' % (cs, expected_cs)) cs = ds.GetRasterBand(3).GetOverview(1).Checksum() expected_cs = 1851 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 1.' % (cs, expected_cs)) ds = None gdaltest.tiff_drv.Delete('tmp/ovr32.tif') # Same, but with non-byte data type (help testing the non-SSE2 code path) src_ds = gdal.Open('data/stefan_full_rgba_photometric_rgb.tif') tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ovr32_float.tif', src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount, gdal.GDT_Float32) src_data = src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize) tmp_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, src_data, buf_type=gdal.GDT_Byte) tmp_ds.BuildOverviews('cubic', overviewlist=[2]) tmp2_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ovr32_byte.tif', tmp_ds.RasterXSize, tmp_ds.RasterYSize, tmp_ds.RasterCount) tmp2_ds.BuildOverviews('NONE', overviewlist=[2]) tmp2_ovr_ds = tmp2_ds.GetRasterBand(1).GetOverview(0).GetDataset() tmp_ovr_ds = tmp_ds.GetRasterBand(1).GetOverview(0).GetDataset() src_data = tmp_ovr_ds.ReadRaster(0, 0, tmp_ovr_ds.RasterXSize, tmp_ovr_ds.RasterYSize, buf_type=gdal.GDT_Byte) tmp2_ovr_ds.WriteRaster(0, 0, tmp_ovr_ds.RasterXSize, tmp_ovr_ds.RasterYSize, src_data) cs = tmp2_ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs = 21168 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 0.' % (cs, expected_cs)) src_ds = None tmp_ds = None tmp2_ds = None gdaltest.tiff_drv.Delete('/vsimem/ovr32_float.tif') gdaltest.tiff_drv.Delete('/vsimem/ovr32_byte.tif') # Test GDALRegenerateOverviewsMultiBand shutil.copyfile('data/stefan_full_rgba_photometric_rgb.tif', 'tmp/ovr32.tif') ds = gdal.Open('tmp/ovr32.tif') with gdaltest.config_option('COMPRESS_OVERVIEW', 'DEFLATE'): with gdaltest.config_option('INTERLEAVE_OVERVIEW', 'PIXEL'): ds.BuildOverviews('cubic', overviewlist=[2, 5]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs = 21168 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 0.' % (cs, expected_cs)) cs = ds.GetRasterBand(3).GetOverview(1).Checksum() expected_cs = 1851 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 1.' % (cs, expected_cs)) ds = None gdaltest.tiff_drv.Delete('tmp/ovr32.tif') # 3 bands + alpha shutil.copyfile('data/stefan_full_rgba.tif', 'tmp/ovr32.tif') ds = gdal.Open('tmp/ovr32.tif', gdal.GA_Update) ds.BuildOverviews('cubic', overviewlist=[2, 5]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs = 21656 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 0.' % (cs, expected_cs)) cs = ds.GetRasterBand(3).GetOverview(1).Checksum() expected_cs = 2132 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 1.' % (cs, expected_cs)) ds = None gdaltest.tiff_drv.Delete('tmp/ovr32.tif') # Same, but with non-byte data type (help testing the non-SSE2 code path) src_ds = gdal.Open('data/stefan_full_rgba.tif') tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ovr32_float.tif', src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount, gdal.GDT_Float32) src_data = src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize) tmp_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, src_data, buf_type=gdal.GDT_Byte) tmp_ds.BuildOverviews('cubic', overviewlist=[2]) tmp2_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ovr32_byte.tif', tmp_ds.RasterXSize, tmp_ds.RasterYSize, tmp_ds.RasterCount) tmp2_ds.BuildOverviews('NONE', overviewlist=[2]) tmp2_ovr_ds = tmp2_ds.GetRasterBand(1).GetOverview(0).GetDataset() tmp_ovr_ds = tmp_ds.GetRasterBand(1).GetOverview(0).GetDataset() src_data = tmp_ovr_ds.ReadRaster(0, 0, tmp_ovr_ds.RasterXSize, tmp_ovr_ds.RasterYSize, buf_type=gdal.GDT_Byte) tmp2_ovr_ds.WriteRaster(0, 0, tmp_ovr_ds.RasterXSize, tmp_ovr_ds.RasterYSize, src_data) cs = tmp2_ds.GetRasterBand(1).GetOverview(0).Checksum() # expected_cs = 21656 expected_cs = 21168 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 0.' % (cs, expected_cs)) src_ds = None tmp_ds = None tmp2_ds = None gdaltest.tiff_drv.Delete('/vsimem/ovr32_float.tif') gdaltest.tiff_drv.Delete('/vsimem/ovr32_byte.tif') # Same test with a compressed dataset src_ds = gdal.Open('data/stefan_full_rgba.tif') ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/ovr32.tif', src_ds, options=['COMPRESS=DEFLATE']) ds.BuildOverviews('cubic', overviewlist=[2, 5]) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs = 21656 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 0.' % (cs, expected_cs)) cs = ds.GetRasterBand(3).GetOverview(1).Checksum() expected_cs = 2132 assert cs == expected_cs, \ ('Checksum is %d. Expected checksum is %d for overview 1.' % (cs, expected_cs)) ds = None gdaltest.tiff_drv.Delete('tmp/ovr32.tif') ############################################################################### # Test creation of overviews on a 1x1 dataset (fix for #3069) def test_tiff_ovr_33(both_endian): try: os.remove('tmp/ovr33.tif.ovr') except OSError: pass ds = gdaltest.tiff_drv.Create('tmp/ovr33.tif', 1, 1, 1) ds = None ds = gdal.Open('tmp/ovr33.tif') ds.BuildOverviews('NEAREST', overviewlist=[2, 4]) ds = None gdaltest.tiff_drv.Delete('tmp/ovr33.tif') ############################################################################### # Confirm that overviews are used on a Band.RasterIO(). def test_tiff_ovr_34(both_endian): ds_in = gdal.Open('data/byte.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr34.tif', ds_in) ds.BuildOverviews('NEAREST', overviewlist=[2]) ds.GetRasterBand(1).GetOverview(0).Fill(32.0) ds = None ds_in = None ds = gdal.Open('tmp/ovr34.tif') data = ds.GetRasterBand(1).ReadRaster(0, 0, 20, 20, buf_xsize=5, buf_ysize=5) ds = None if data != ' '.encode('ascii'): print('[%s]' % data) pytest.fail('did not get expected cleared overview.') gdaltest.tiff_drv.Delete('tmp/ovr34.tif') ############################################################################### # Confirm that overviews are used on a Band.RasterIO(). def test_tiff_ovr_35(both_endian): ds_in = gdal.Open('data/byte.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr35.tif', ds_in) ds.BuildOverviews('NEAREST', overviewlist=[2]) ds.GetRasterBand(1).GetOverview(0).Fill(32.0) ds = None ds_in = None ds = gdal.Open('tmp/ovr35.tif') data = ds.ReadRaster(0, 0, 20, 20, buf_xsize=5, buf_ysize=5, band_list=[1]) ds = None if data != ' '.encode('ascii'): print('[%s]' % data) pytest.fail('did not get expected cleared overview.') gdaltest.tiff_drv.Delete('tmp/ovr35.tif') ############################################################################### # Confirm that overviews are used on a Band.RasterIO() when using BlockBasedRasterIO() (#3124) def test_tiff_ovr_36(both_endian): with gdaltest.config_option('GDAL_FORCE_CACHING', 'YES'): ret = test_tiff_ovr_35(both_endian) return ret ############################################################################### # Test PREDICTOR_OVERVIEW=2 option. (#3414) def test_tiff_ovr_37(both_endian): shutil.copy('../gdrivers/data/n43.dt0', 'tmp/ovr37.dt0') ds = gdal.Open('tmp/ovr37.dt0') assert ds is not None, 'Failed to open test dataset.' with gdaltest.config_option('PREDICTOR_OVERVIEW', '2'): with gdaltest.config_option('COMPRESS_OVERVIEW', 'LZW'): ds.BuildOverviews('NEAR', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr37.dt0') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 45378, 'got wrong overview checksum.' ds = None predictor2_size = os.stat('tmp/ovr37.dt0.ovr')[stat.ST_SIZE] # 3957 : on little-endian host # XXXX : on big-endian host ??? FIXME: To be updated assert predictor2_size == 3957, 'did not get expected file size.' ############################################################################### # Test that the predictor flag gets well propagated to internal overviews def test_tiff_ovr_38(both_endian): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdaltest.tiff_drv.CreateCopy('tmp/ovr38.tif', src_ds, options=['COMPRESS=LZW', 'PREDICTOR=2']) ds.BuildOverviews(overviewlist=[2, 4]) ds = None file_size = os.stat('tmp/ovr38.tif')[stat.ST_SIZE] assert file_size <= 21000, 'did not get expected file size.' ############################################################################### # Test external overviews on all datatypes def test_tiff_ovr_39(both_endian): for datatype in [gdal.GDT_Byte, gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CInt16, gdal.GDT_CInt32, gdal.GDT_CFloat32, gdal.GDT_CFloat64]: gdal.Translate('tmp/ovr39.tif', 'data/byte.tif', options='-ot ' + gdal.GetDataTypeName(datatype)) try: os.remove('tmp/ovr39.tif.ovr') except OSError: pass ds = gdal.Open('tmp/ovr39.tif') ds.BuildOverviews('NEAREST', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr39.tif.ovr') ovr_datatype = ds.GetRasterBand(1).DataType ds = None assert datatype == ovr_datatype, 'did not get expected datatype' ds = gdal.Open('tmp/ovr39.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() ds = None if gdal.DataTypeIsComplex(datatype): expected_cs = 1171 else: expected_cs = 1087 assert cs == expected_cs, \ ('did not get expected checksum for datatype %s' % gdal.GetDataTypeName(datatype)) ############################################################################### # Test external overviews on 1 bit datasets with AVERAGE_BIT2GRAYSCALE (similar to tiff_ovr_4) def test_tiff_ovr_40(both_endian): shutil.copyfile('data/oddsize_1bit2b.tif', 'tmp/ovr40.tif') wrk_ds = gdal.Open('tmp/ovr40.tif') assert wrk_ds is not None, 'Failed to open test dataset.' wrk_ds.BuildOverviews('AVERAGE_BIT2GRAYSCALE', overviewlist=[2, 4]) wrk_ds = None wrk_ds = gdal.Open('tmp/ovr40.tif') ovband = wrk_ds.GetRasterBand(1).GetOverview(1) md = ovband.GetMetadata() assert 'RESAMPLING' in md and md['RESAMPLING'] == 'AVERAGE_BIT2GRAYSCALE', \ 'Did not get expected RESAMPLING metadata.' # compute average value of overview band image data. ovimage = ovband.ReadRaster(0, 0, ovband.XSize, ovband.YSize) pix_count = ovband.XSize * ovband.YSize total = 0.0 is_bytes = False if (isinstance(ovimage, bytes) and not isinstance(ovimage, str)): is_bytes = True if is_bytes is True: for i in range(pix_count): total += ovimage[i] else: for i in range(pix_count): total += ord(ovimage[i]) average = total / pix_count exp_average = 154.0992 assert average == pytest.approx(exp_average, abs=0.1), 'got wrong average for overview image' # Read base band as overview resolution and verify we aren't getting # the grayscale image. frband = wrk_ds.GetRasterBand(1) ovimage = frband.ReadRaster(0, 0, frband.XSize, frband.YSize, ovband.XSize, ovband.YSize) pix_count = ovband.XSize * ovband.YSize total = 0.0 if is_bytes is True: for i in range(pix_count): total += ovimage[i] else: for i in range(pix_count): total += ord(ovimage[i]) average = total / pix_count exp_average = 0.6096 assert average == pytest.approx(exp_average, abs=0.01), 'got wrong average for downsampled image' wrk_ds = None ############################################################################### # Test external overviews on 1 bit datasets with NEAREST def test_tiff_ovr_41(both_endian): shutil.copyfile('data/oddsize_1bit2b.tif', 'tmp/ovr41.tif') ds = gdal.Open('tmp/ovr41.tif') # data = wrk_ds.GetRasterBand(1).ReadRaster(0,0,99,99,50,50) ds.BuildOverviews('NEAREST', overviewlist=[2]) ds = None # ds = gdaltest.tiff_drv.Create('tmp/ovr41.tif.handmade.ovr',50,50,1,options=['NBITS=1']) # ds.GetRasterBand(1).WriteRaster(0,0,50,50,data) # ds = None ds = gdal.Open('tmp/ovr41.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() ds = None assert cs == 1496, 'did not get expected checksum' ############################################################################### # Test external overviews on dataset with color table def test_tiff_ovr_42(both_endian): ct_data = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 255)] ct = gdal.ColorTable() for i, data in enumerate(ct_data): ct.SetColorEntry(i, data) ds = gdaltest.tiff_drv.Create('tmp/ovr42.tif', 1, 1) ds.GetRasterBand(1).SetRasterColorTable(ct) ds = None ds = gdal.Open('tmp/ovr42.tif') ds.BuildOverviews('NEAREST', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr42.tif.ovr') ct2 = ds.GetRasterBand(1).GetRasterColorTable() assert (ct2.GetCount() == 256 and \ ct2.GetColorEntry(0) == (255, 0, 0, 255) and \ ct2.GetColorEntry(1) == (0, 255, 0, 255) and \ ct2.GetColorEntry(2) == (0, 0, 255, 255) and \ ct2.GetColorEntry(3) == (255, 255, 255, 255)), 'Wrong color table entry.' ds = None ############################################################################### # Make sure that 16bit overviews with JPEG compression are handled using 12-bit # jpeg-in-tiff (#3539) def test_tiff_ovr_43(both_endian): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() with gdaltest.config_option('CPL_ACCUM_ERROR_MSG', 'ON'): gdal.ErrorReset() with gdaltest.error_handler(): try: ds = gdal.Open('data/mandrilmini_12bitjpeg.tif') ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) except: ds = None if gdal.GetLastErrorMsg().find( 'Unsupported JPEG data precision 12') != -1: sys.stdout.write('(12bit jpeg not available) ... ') pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/ovr43.tif', 16, 16, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).Fill(4000) ds = None try: os.remove('tmp/ovr43.tif.ovr') except OSError: pass ds = gdal.Open('tmp/ovr43.tif') with gdaltest.config_option('COMPRESS_OVERVIEW', 'JPEG'): ds.BuildOverviews('NEAREST', overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr43.tif.ovr') md = ds.GetRasterBand(1).GetMetadata('IMAGE_STRUCTURE') cs = ds.GetRasterBand(1).Checksum() ds = None assert 'NBITS' in md and md['NBITS'] == '12', 'did not get expected NBITS' assert cs == 642, 'did not get expected checksum' gdaltest.tiff_drv.Delete('tmp/ovr43.tif') ############################################################################### # Test that we can change overview block size through GDAL_TIFF_OVR_BLOCKSIZE configuration # option def test_tiff_ovr_44(both_endian): shutil.copyfile('data/byte.tif', 'tmp/ovr44.tif') with gdaltest.config_option('GDAL_TIFF_OVR_BLOCKSIZE', '256'): ds = gdal.Open('tmp/ovr44.tif', gdal.GA_Update) ds.BuildOverviews(overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr44.tif') ovr_band = ds.GetRasterBand(1).GetOverview(0) if 'GetBlockSize' in dir(gdal.Band): (blockx, blocky) = ovr_band.GetBlockSize() assert blockx == 256 and blocky == 256, 'did not get expected block size' cs = ovr_band.Checksum() ds = None gdaltest.tiff_drv.Delete('tmp/ovr44.tif') assert cs == 1087, 'did not get expected checksum' ############################################################################### # Same as tiff_ovr_44, but with external overviews def test_tiff_ovr_45(both_endian): shutil.copyfile('data/byte.tif', 'tmp/ovr45.tif') with gdaltest.config_option('GDAL_TIFF_OVR_BLOCKSIZE', '256'): ds = gdal.Open('tmp/ovr45.tif', gdal.GA_ReadOnly) ds.BuildOverviews(overviewlist=[2]) ds = None ds = gdal.Open('tmp/ovr45.tif.ovr') ovr_band = ds.GetRasterBand(1) if 'GetBlockSize' in dir(gdal.Band): (blockx, blocky) = ovr_band.GetBlockSize() assert blockx == 256 and blocky == 256, 'did not get expected block size' cs = ovr_band.Checksum() ds = None gdaltest.tiff_drv.Delete('tmp/ovr45.tif') assert cs == 1087, 'did not get expected checksum' ############################################################################### # Test overview on a dataset where width * height > 2 billion def test_tiff_ovr_46(): if not gdaltest.run_slow_tests(): pytest.skip() # Test NEAREST with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ds.BuildOverviews('NEAREST', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test AVERAGE in optimized case (x2 reduction) with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test AVERAGE in un-optimized case (x3 reduction) with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ds.BuildOverviews('AVERAGE', overviewlist=[3]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test AVERAGE in un-optimized case (color table) with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 0, 0)) ds.GetRasterBand(1).SetRasterColorTable(ct) ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test GAUSS with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ds.BuildOverviews('GAUSS', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test GAUSS with color table with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 0, 0)) ds.GetRasterBand(1).SetRasterColorTable(ct) ds.BuildOverviews('GAUSS', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test MODE with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ds.BuildOverviews('MODE', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') # Test CUBIC with gdaltest.config_option('GTIFF_DONT_WRITE_BLOCKS', 'YES'): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_ovr_46.tif', 50000, 50000, options=['SPARSE_OK=YES']) ds.BuildOverviews('CUBIC', overviewlist=[2]) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_ovr_46.tif') ############################################################################### # Test workaround with libtiff 3.X when creating interleaved overviews def test_tiff_ovr_47(both_endian): mem_drv = gdal.GetDriverByName('MEM') mem_ds = mem_drv.Create('', 852, 549, 3) for i in range(1, 4): band = mem_ds.GetRasterBand(i) band.Fill(128) driver = gdal.GetDriverByName("GTIFF") out_ds = driver.CreateCopy("/vsimem/tiff_ovr_47.tif", mem_ds) mem_ds = None out_ds.BuildOverviews("NEAREST", [2, 4, 8, 16]) out_ds = None ds = gdal.Open("/vsimem/tiff_ovr_47.tif") cs = ds.GetRasterBand(1).GetOverview(1).Checksum() ds = None gdal.Unlink("/vsimem/tiff_ovr_47.tif") assert cs == 35721, 'did not get expected checksum' ############################################################################### # Test that we don't average 0's in alpha band def test_tiff_ovr_48(both_endian): shutil.copy('data/rgba_with_alpha_0_and_255.tif', 'tmp') ds = gdal.Open('tmp/rgba_with_alpha_0_and_255.tif') ds.BuildOverviews('AVERAGE', [2]) ds = None ds = gdal.Open('tmp/rgba_with_alpha_0_and_255.tif.ovr') for i in range(4): cs = ds.GetRasterBand(i + 1).Checksum() assert cs == 3, i # But if we define GDAL_OVR_PROPAGATE_NODATA, a nodata value in source # samples will cause the target pixel to be zeroed. shutil.copy('data/rgba_with_alpha_0_and_255.tif', 'tmp') ds = gdal.Open('tmp/rgba_with_alpha_0_and_255.tif') with gdaltest.config_option('GDAL_OVR_PROPAGATE_NODATA', 'YES'): ds.BuildOverviews('AVERAGE', [2]) ds = None ds = gdal.Open('tmp/rgba_with_alpha_0_and_255.tif.ovr') for i in range(4): cs = ds.GetRasterBand(i + 1).Checksum() assert cs == 0, i ############################################################################### # Test possible stride computation issue in GDALRegenerateOverviewsMultiBand (#5653) def test_tiff_ovr_49(both_endian): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_ovr_49.tif', 1023, 1023, 1) ds.GetRasterBand(1).Fill(0) c = '\xFF' # Fails on 1.11.1 with col = 255 or col = 1019 col = 1019 ds.GetRasterBand(1).WriteRaster(col, 0, 1, 1023, c, 1, 1) ds = None ds = gdal.Open('/vsimem/tiff_ovr_49.tif') with gdaltest.config_option('COMPRESS_OVERVIEW', 'DEFLATE'): ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_49.tif.ovr') assert ds.GetRasterBand(1).Checksum() != 0 ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_49.tif') ############################################################################### # Test overviews when X dimension is smaller than Y (#5794) def test_tiff_ovr_50(both_endian): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_ovr_50.tif', 6, 8192, 3, options=['COMPRESS=DEFLATE']) ds.GetRasterBand(1).Fill(255) # We just check that it doesn't crash ds.BuildOverviews('AVERAGE', overviewlist=[2, 4, 8, 16, 32]) ds.BuildOverviews('AVERAGE', overviewlist=[2, 4, 8, 16, 32]) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_50.tif') ############################################################################### # Test average overview on a color palette with nodata values (#6371) def test_tiff_ovr_51(): src_ds = gdal.Open('data/stefan_full_rgba_pct32.png') if src_ds is None: pytest.skip() ds = gdal.GetDriverByName('PNG').CreateCopy('/vsimem/tiff_ovr_51.png', src_ds) ds.BuildOverviews('AVERAGE', [2]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_51.png.ovr') cs = ds.GetRasterBand(1).Checksum() assert cs == 24518 ds = None gdal.GetDriverByName('PNG').Delete('/vsimem/tiff_ovr_51.png') ############################################################################### # Test unsorted external overview building (#6617) def test_tiff_ovr_52(): src_ds = gdal.Open('data/byte.tif') if src_ds is None: pytest.skip() gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tiff_ovr_52.tif', src_ds) with gdaltest.config_option('COMPRESS_OVERVIEW', 'DEFLATE'): with gdaltest.config_option('INTERLEAVE_OVERVIEW', 'PIXEL'): ds = gdal.Open('/vsimem/tiff_ovr_52.tif') ds.BuildOverviews('NEAR', [4]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_52.tif') ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_52.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 328 cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == 1087 ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_52.tif') gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tiff_ovr_52.tif', src_ds) with gdaltest.config_option('COMPRESS_OVERVIEW', 'DEFLATE'): with gdaltest.config_option('INTERLEAVE_OVERVIEW', 'PIXEL'): ds = gdal.Open('/vsimem/tiff_ovr_52.tif') ds.BuildOverviews('NEAR', [4, 2]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_52.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 328 cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == 1087 ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_52.tif') ############################################################################### # Test external overviews building in several steps def test_tiff_ovr_53(): src_ds = gdal.Open('data/byte.tif') if src_ds is None: pytest.skip() gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tiff_ovr_53.tif', src_ds) ds = gdal.Open('/vsimem/tiff_ovr_53.tif') ds.BuildOverviews('NEAR', [2]) ds = None # Note: currently this will compute it from the base raster and not # ov_factor=2 ! ds = gdal.Open('/vsimem/tiff_ovr_53.tif') ds.BuildOverviews('NEAR', [4]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_53.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 1087 cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == 328 ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_53.tif') # Compressed code path gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tiff_ovr_53.tif', src_ds) with gdaltest.config_option('COMPRESS_OVERVIEW', 'DEFLATE'): with gdaltest.config_option('INTERLEAVE_OVERVIEW', 'PIXEL'): ds = gdal.Open('/vsimem/tiff_ovr_53.tif') ds.BuildOverviews('NEAR', [2]) ds = None # Note: currently this will compute it from the base raster and not # ov_factor=2 ! ds = gdal.Open('/vsimem/tiff_ovr_53.tif') ds.BuildOverviews('NEAR', [4]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_53.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 1087 cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == 328 ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_53.tif') ############################################################################### # Test external overviews building in several steps with jpeg compression def test_tiff_ovr_54(): drv = gdal.GetDriverByName('GTiff') md = drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdal.Open('../gdrivers/data/small_world.tif') gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tiff_ovr_54.tif', src_ds) with gdaltest.config_options({'COMPRESS_OVERVIEW': 'JPEG', 'PHOTOMETRIC_OVERVIEW': 'YCBCR', 'INTERLEAVE_OVERVIEW': 'PIXEL'}): ds = gdal.Open('/vsimem/tiff_ovr_54.tif') ds.BuildOverviews('AVERAGE', [2]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_54.tif') ds.BuildOverviews('AVERAGE', [4]) ds = None ds = gdal.Open('/vsimem/tiff_ovr_54.tif') cs0 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs1 = ds.GetRasterBand(1).GetOverview(1).Checksum() ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_54.tif') assert not (cs0 == 0 or cs1 == 0) ############################################################################### def test_tiff_ovr_too_many_levels_contig(): src_ds = gdal.Open('data/byte.tif') tmpfilename = '/vsimem/tiff_ovr_too_many_levels_contig.tif' ds = gdal.GetDriverByName('GTiff').CreateCopy(tmpfilename, src_ds) ds.BuildOverviews('AVERAGE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) assert ds.GetRasterBand(1).GetOverviewCount() == 5 ds.BuildOverviews('AVERAGE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) assert ds.GetRasterBand(1).GetOverviewCount() == 5 ds = None gdal.GetDriverByName('GTiff').Delete(tmpfilename) ############################################################################### def test_tiff_ovr_too_many_levels_separate(): src_ds = gdal.Open('data/separate_tiled.tif') tmpfilename = '/vsimem/tiff_ovr_too_many_levels_separate.tif' ds = gdal.GetDriverByName('GTiff').CreateCopy(tmpfilename, src_ds) ds.BuildOverviews('AVERAGE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) assert ds.GetRasterBand(1).GetOverviewCount() == 6 assert ds.GetRasterBand(1).GetOverviewCount() == 6 ds = None gdal.GetDriverByName('GTiff').Delete(tmpfilename) ############################################################################### def test_tiff_ovr_too_many_levels_external(): src_ds = gdal.Open('data/byte.tif') tmpfilename = '/vsimem/tiff_ovr_too_many_levels_contig.tif' gdal.GetDriverByName('GTiff').CreateCopy(tmpfilename, src_ds) ds = gdal.Open(tmpfilename) ds.BuildOverviews('AVERAGE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) assert ds.GetRasterBand(1).GetOverviewCount() == 5 ds.BuildOverviews('AVERAGE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) assert ds.GetRasterBand(1).GetOverviewCount() == 5 ds = None gdal.GetDriverByName('GTiff').Delete(tmpfilename) ############################################################################### def test_tiff_ovr_average_multiband_vs_singleband(): gdal.Translate('/vsimem/tiff_ovr_average_multiband_band.tif', 'data/reproduce_average_issue.tif', creationOptions=['INTERLEAVE=BAND']) gdal.Translate('/vsimem/tiff_ovr_average_multiband_pixel.tif', 'data/reproduce_average_issue.tif', creationOptions=['INTERLEAVE=PIXEL']) ds = gdal.Open('/vsimem/tiff_ovr_average_multiband_band.tif', gdal.GA_Update) ds.BuildOverviews('AVERAGE', [2]) cs_band = [ds.GetRasterBand(i+1).GetOverview(0).Checksum() for i in range(3)] ds = None ds = gdal.Open('/vsimem/tiff_ovr_average_multiband_pixel.tif', gdal.GA_Update) ds.BuildOverviews('AVERAGE', [2]) cs_pixel = [ds.GetRasterBand(i+1).GetOverview(0).Checksum() for i in range(3)] ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_average_multiband_band.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_ovr_average_multiband_pixel.tif') assert cs_band == cs_pixel ############################################################################### def test_tiff_ovr_multiband_code_path_degenerate(): temp_path = '/vsimem/test.tif' ds = gdal.GetDriverByName('GTiff').Create(temp_path, 5, 6) ds.GetRasterBand(1).Fill(255) del ds ds = gdal.OpenEx(temp_path, gdal.GA_ReadOnly) with gdaltest.config_option('COMPRESS_OVERVIEW', 'LZW'): ds.BuildOverviews('nearest', overviewlist=[2, 4, 8]) assert ds.GetRasterBand(1).GetOverview(0).Checksum() != 0 assert ds.GetRasterBand(1).GetOverview(1).Checksum() != 0 assert ds.GetRasterBand(1).GetOverview(2).Checksum() != 0 del ds gdal.GetDriverByName('GTiff').Delete(temp_path) ############################################################################### # Cleanup def test_tiff_ovr_cleanup(): gdaltest.tiff_drv.Delete('tmp/mfloat32.tif') gdaltest.tiff_drv.Delete('tmp/ovr4.tif') gdaltest.tiff_drv.Delete('tmp/ovr5.tif') gdaltest.tiff_drv.Delete('tmp/ovr6.tif') gdaltest.tiff_drv.Delete('tmp/test_average_palette.tif') gdaltest.tiff_drv.Delete('tmp/ovr9.tif') gdaltest.tiff_drv.Delete('tmp/ovr10.tif') gdaltest.tiff_drv.Delete('tmp/ovr11.tif') gdaltest.tiff_drv.Delete('tmp/ovr12.tif') gdaltest.tiff_drv.Delete('tmp/test_gauss_palette.tif') gdaltest.tiff_drv.Delete('tmp/ovr15.tif') gdaltest.tiff_drv.Delete('tmp/ovr16.tif') gdaltest.tiff_drv.Delete('tmp/ovr17.tif') gdaltest.tiff_drv.Delete('tmp/ovr18.tif') gdaltest.tiff_drv.Delete('tmp/ovr19.tif') gdaltest.tiff_drv.Delete('tmp/ovr20.tif') gdaltest.tiff_drv.Delete('tmp/ovr21.tif') gdaltest.tiff_drv.Delete('tmp/ovr22.tif') gdaltest.tiff_drv.Delete('tmp/ovr23.tif') gdaltest.tiff_drv.Delete('tmp/ovr24.tif') gdaltest.tiff_drv.Delete('tmp/ovr25.tif') gdaltest.tiff_drv.Delete('tmp/ovr26.tif') gdaltest.tiff_drv.Delete('tmp/ovr27.tif') gdaltest.tiff_drv.Delete('tmp/ovr30.tif') gdaltest.tiff_drv.Delete('tmp/ovr31.tif') gdaltest.tiff_drv.Delete('tmp/ovr37.dt0') gdaltest.tiff_drv.Delete('tmp/ovr38.tif') gdaltest.tiff_drv.Delete('tmp/ovr39.tif') gdaltest.tiff_drv.Delete('tmp/ovr40.tif') gdaltest.tiff_drv.Delete('tmp/ovr41.tif') gdaltest.tiff_drv.Delete('tmp/ovr42.tif') gdaltest.tiff_drv.Delete('tmp/rgba_with_alpha_0_and_255.tif') �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsizip.py������������������������������������������������������������������0000775�0001750�0001750�00000053201�13701057756�015707� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vsizip.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsizip/vsimem/ # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2010-2014, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import random import gdaltest from osgeo import gdal import pytest ############################################################################### # Test writing a ZIP with multiple files and directories def test_vsizip_1(): # We can keep the handle open during all the ZIP writing hZIP = gdal.VSIFOpenL("/vsizip/vsimem/test.zip", "wb") assert hZIP is not None, 'fail 1' # One way to create a directory f = gdal.VSIFOpenL("/vsizip/vsimem/test.zip/subdir2/", "wb") assert f is not None, 'fail 2' gdal.VSIFCloseL(f) # A more natural one gdal.Mkdir("/vsizip/vsimem/test.zip/subdir1", 0) # Create 1st file f2 = gdal.VSIFOpenL("/vsizip/vsimem/test.zip/subdir3/abcd", "wb") assert f2 is not None, 'fail 3' gdal.VSIFWriteL("abcd", 1, 4, f2) gdal.VSIFCloseL(f2) # Test that we cannot read a zip file being written gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f = gdal.VSIFOpenL("/vsizip/vsimem/test.zip/subdir3/abcd", "rb") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() == 'Cannot read a zip file being written', \ 'expected error' assert f is None, 'should not have been successful 1' # Create 2nd file f3 = gdal.VSIFOpenL("/vsizip/vsimem/test.zip/subdir3/efghi", "wb") assert f3 is not None, 'fail 4' gdal.VSIFWriteL("efghi", 1, 5, f3) # Try creating a 3d file gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f4 = gdal.VSIFOpenL("/vsizip/vsimem/test.zip/that_wont_work", "wb") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() == 'Cannot create that_wont_work while another file is being written in the .zip', \ 'expected error' assert f4 is None, 'should not have been successful 2' gdal.VSIFCloseL(f3) # Now we can close the main handle gdal.VSIFCloseL(hZIP) # ERROR 6: Support only 1 file in archive file /vsimem/test.zip when no explicit in-archive filename is specified gdal.ErrorReset() with gdaltest.error_handler(): f = gdal.VSIFOpenL('/vsizip/vsimem/test.zip', 'rb') if f is not None: gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '', 'expected error' f = gdal.VSIFOpenL("/vsizip/vsimem/test.zip/subdir3/abcd", "rb") assert f is not None, 'fail 5' data = gdal.VSIFReadL(1, 4, f) gdal.VSIFCloseL(f) assert data.decode('ASCII') == 'abcd' # Test alternate uri syntax gdal.Rename("/vsimem/test.zip", "/vsimem/test.xxx") f = gdal.VSIFOpenL("/vsizip/{/vsimem/test.xxx}/subdir3/abcd", "rb") assert f is not None data = gdal.VSIFReadL(1, 4, f) gdal.VSIFCloseL(f) assert data.decode('ASCII') == 'abcd' # With a trailing slash f = gdal.VSIFOpenL("/vsizip/{/vsimem/test.xxx}/subdir3/abcd/", "rb") assert f is not None gdal.VSIFCloseL(f) # Test ReadDir() assert len(gdal.ReadDir("/vsizip/{/vsimem/test.xxx}")) == 3 # Unbalanced curls f = gdal.VSIFOpenL("/vsizip/{/vsimem/test.xxx", "rb") assert f is None # Non existing mainfile f = gdal.VSIFOpenL("/vsizip/{/vsimem/test.xxx}/bla", "rb") assert f is None # Non existing subfile f = gdal.VSIFOpenL("/vsizip/{/vsimem/test.zzz}/bla", "rb") assert f is None # Wrong syntax f = gdal.VSIFOpenL("/vsizip/{/vsimem/test.xxx}.aux.xml", "rb") assert f is None # Test nested { { } } hZIP = gdal.VSIFOpenL("/vsizip/{/vsimem/zipinzip.yyy}", "wb") assert hZIP is not None, 'fail 1' f = gdal.VSIFOpenL("/vsizip/{/vsimem/zipinzip.yyy}/test.xxx", "wb") f_src = gdal.VSIFOpenL("/vsimem/test.xxx", "rb") data = gdal.VSIFReadL(1, 10000, f_src) gdal.VSIFCloseL(f_src) gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(hZIP) f = gdal.VSIFOpenL("/vsizip/{/vsizip/{/vsimem/zipinzip.yyy}/test.xxx}/subdir3/abcd/", "rb") assert f is not None data = gdal.VSIFReadL(1, 4, f) gdal.VSIFCloseL(f) assert data.decode('ASCII') == 'abcd' gdal.Unlink("/vsimem/test.xxx") gdal.Unlink("/vsimem/zipinzip.yyy") # Test VSIStatL on a non existing file assert gdal.VSIStatL('/vsizip//vsimem/foo.zip') is None # Test ReadDir on a non existing file assert gdal.ReadDir('/vsizip//vsimem/foo.zip') is None ############################################################################### # Test writing 2 files in the ZIP by closing it completely between the 2 def test_vsizip_2(): zip_name = '/vsimem/test2.zip' fmain = gdal.VSIFOpenL("/vsizip/" + zip_name + "/foo.bar", "wb") assert fmain is not None, 'fail 1' gdal.VSIFWriteL("12345", 1, 5, fmain) gdal.VSIFCloseL(fmain) content = gdal.ReadDir("/vsizip/" + zip_name) assert content == ['foo.bar'], 'bad content 1' # Now append a second file fmain = gdal.VSIFOpenL("/vsizip/" + zip_name + "/bar.baz", "wb") assert fmain is not None, 'fail 2' gdal.VSIFWriteL("67890", 1, 5, fmain) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') content = gdal.ReadDir("/vsizip/" + zip_name) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() == 'Cannot read a zip file being written', \ 'expected error' assert content is None, 'bad content 2' gdal.VSIFCloseL(fmain) content = gdal.ReadDir("/vsizip/" + zip_name) assert content == ['foo.bar', 'bar.baz'], 'bad content 3' fmain = gdal.VSIFOpenL("/vsizip/" + zip_name + "/foo.bar", "rb") assert fmain is not None, 'fail 3' data = gdal.VSIFReadL(1, 5, fmain) gdal.VSIFCloseL(fmain) assert data.decode('ASCII') == '12345' fmain = gdal.VSIFOpenL("/vsizip/" + zip_name + "/bar.baz", "rb") assert fmain is not None, 'fail 4' data = gdal.VSIFReadL(1, 5, fmain) gdal.VSIFCloseL(fmain) assert data.decode('ASCII') == '67890' gdal.Unlink(zip_name) ############################################################################### # Test opening in write mode a file inside a zip archive whose content has been listed before (testcase for fix of r22625) def test_vsizip_3(): fmain = gdal.VSIFOpenL("/vsizip/vsimem/test3.zip", "wb") f = gdal.VSIFOpenL("/vsizip/vsimem/test3.zip/foo", "wb") gdal.VSIFWriteL("foo", 1, 3, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL("/vsizip/vsimem/test3.zip/bar", "wb") gdal.VSIFWriteL("bar", 1, 3, f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) gdal.ReadDir("/vsizip/vsimem/test3.zip") f = gdal.VSIFOpenL("/vsizip/vsimem/test3.zip/baz", "wb") gdal.VSIFWriteL("baz", 1, 3, f) gdal.VSIFCloseL(f) res = gdal.ReadDir("/vsizip/vsimem/test3.zip") gdal.Unlink("/vsimem/test3.zip") assert res == ['foo', 'bar', 'baz'] ############################################################################### # Test ReadRecursive on valid zip def test_vsizip_4(): # read recursive and validate content res = gdal.ReadDirRecursive("/vsizip/data/testzip.zip") assert res is not None, 'fail read' assert (res == ['subdir/', 'subdir/subdir/', 'subdir/subdir/uint16.tif', 'subdir/subdir/test_rpc.txt', 'subdir/test_rpc.txt', 'test_rpc.txt', 'uint16.tif']), 'bad content' ############################################################################### # Test ReadRecursive on deep zip def test_vsizip_5(): # make file in memory fmain = gdal.VSIFOpenL('/vsizip/vsimem/bigdepthzip.zip', 'wb') assert fmain is not None filename = "a" + "/a" * 1000 finside = gdal.VSIFOpenL('/vsizip/vsimem/bigdepthzip.zip/' + filename, 'wb') assert finside is not None gdal.VSIFCloseL(finside) gdal.VSIFCloseL(fmain) # read recursive and validate content res = gdal.ReadDirRecursive("/vsizip/vsimem/bigdepthzip.zip") assert res is not None, 'fail read' assert len(res) == 1001, ('wrong size: ' + str(len(res))) assert res[10] == 'a/a/a/a/a/a/a/a/a/a/a/', ('bad content: ' + res[10]) gdal.Unlink("/vsimem/bigdepthzip.zip") ############################################################################### # Test writing 2 files with same name in a ZIP (#4785) def test_vsizip_6(): # Maintain ZIP file opened fmain = gdal.VSIFOpenL("/vsizip/vsimem/test6.zip", "wb") f = gdal.VSIFOpenL("/vsizip/vsimem/test6.zip/foo.bar", "wb") assert f is not None gdal.VSIFWriteL("12345", 1, 5, f) gdal.VSIFCloseL(f) f = None gdal.PushErrorHandler('CPLQuietErrorHandler') f = gdal.VSIFOpenL("/vsizip/vsimem/test6.zip/foo.bar", "wb") gdal.PopErrorHandler() if f is not None: gdal.VSIFCloseL(f) pytest.fail() gdal.VSIFCloseL(fmain) fmain = None gdal.Unlink("/vsimem/test6.zip") # Now close it each time f = gdal.VSIFOpenL("/vsizip/vsimem/test6.zip/foo.bar", "wb") assert f is not None gdal.VSIFWriteL("12345", 1, 5, f) gdal.VSIFCloseL(f) f = None gdal.PushErrorHandler('CPLQuietErrorHandler') f = gdal.VSIFOpenL("/vsizip/vsimem/test6.zip/foo.bar", "wb") gdal.PopErrorHandler() if f is not None: gdal.VSIFCloseL(f) pytest.fail() gdal.Unlink("/vsimem/test6.zip") ############################################################################### # Test that we use the extended field for UTF-8 filenames (#5361). def test_vsizip_7(): content = gdal.ReadDir("/vsizip/data/cp866_plus_utf8.zip") ok = 0 try: local_vars = {'content': content, 'ok': ok} exec("if content == [u'\u0430\u0431\u0432\u0433\u0434\u0435', u'\u0436\u0437\u0438\u0439\u043a\u043b']: ok = 1", None, local_vars) ok = local_vars['ok'] except: if content == ['\u0430\u0431\u0432\u0433\u0434\u0435', '\u0436\u0437\u0438\u0439\u043a\u043b']: ok = 1 if ok == 0: print(content) pytest.fail('bad content') ############################################################################### # Basic test for ZIP64 support (5 GB file that compresses in less than 4 GB) def test_vsizip_8(): assert gdal.VSIStatL('/vsizip/vsizip/data/zero.bin.zip.zip/zero.bin.zip').size == 5000 * 1000 * 1000 + 1 ############################################################################### # Basic test for ZIP64 support (5 GB file that is stored) def test_vsizip_9(): assert gdal.VSIStatL('/vsizip//vsisparse/data/zero_stored.bin.xml.zip/zero.bin').size == 5000 * 1000 * 1000 + 1 assert gdal.VSIStatL('/vsizip//vsisparse/data/zero_stored.bin.xml.zip/hello.txt').size == 6 f = gdal.VSIFOpenL('/vsizip//vsisparse/data/zero_stored.bin.xml.zip/zero.bin', 'rb') gdal.VSIFSeekL(f, 5000 * 1000 * 1000, 0) data = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert data.decode('ascii') == '\x03' f = gdal.VSIFOpenL('/vsizip//vsisparse/data/zero_stored.bin.xml.zip/hello.txt', 'rb') data = gdal.VSIFReadL(1, 6, f) gdal.VSIFCloseL(f) assert data.decode('ascii') == 'HELLO\n' ############################################################################### # Test that we recode filenames in ZIP (#5361) def test_vsizip_10(): gdal.SetConfigOption('CPL_ZIP_ENCODING', 'CP866') content = gdal.ReadDir("/vsizip/data/cp866.zip") gdal.SetConfigOption('CPL_ZIP_ENCODING', None) ok = 0 try: local_vars = {'content': content, 'ok': ok} exec("if content == [u'\u0430\u0431\u0432\u0433\u0434\u0435', u'\u0436\u0437\u0438\u0439\u043a\u043b']: ok = 1", None, local_vars) ok = local_vars['ok'] except: if content == ['\u0430\u0431\u0432\u0433\u0434\u0435', '\u0436\u0437\u0438\u0439\u043a\u043b']: ok = 1 if ok == 0: if gdal.GetLastErrorMsg().find('Recode from CP866 to UTF-8 not supported') >= 0: pytest.skip() print(content) pytest.fail('bad content') ############################################################################### # Test that we don't do anything with ZIP with filenames in UTF-8 already (#5361) def test_vsizip_11(): content = gdal.ReadDir("/vsizip/data/utf8.zip") ok = 0 try: local_vars = {'content': content, 'ok': ok} exec("if content == [u'\u0430\u0431\u0432\u0433\u0434\u0435', u'\u0436\u0437\u0438\u0439\u043a\u043b']: ok = 1", None, local_vars) ok = local_vars['ok'] except: if content == ['\u0430\u0431\u0432\u0433\u0434\u0435', '\u0436\u0437\u0438\u0439\u043a\u043b']: ok = 1 if ok == 0: print(content) pytest.fail('bad content') ############################################################################### # Test changing the content of a zip file (#6005) def test_vsizip_12(): fmain = gdal.VSIFOpenL("/vsizip/vsimem/vsizip_12_src1.zip", "wb") f = gdal.VSIFOpenL("/vsizip/vsimem/vsizip_12_src1.zip/foo.bar", "wb") data = '0123456' gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) fmain = gdal.VSIFOpenL("/vsizip/vsimem/vsizip_12_src2.zip", "wb") f = gdal.VSIFOpenL("/vsizip/vsimem/vsizip_12_src2.zip/bar.baz", "wb") data = '01234567' gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) # Copy vsizip_12_src1 into vsizip_12 f = gdal.VSIFOpenL('/vsimem/vsizip_12_src1.zip', 'rb') data = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL('/vsimem/vsizip_12.zip', 'wb') gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) gdal.ReadDir('/vsizip/vsimem/vsizip_12.zip') # Copy vsizip_12_src2 into vsizip_12 f = gdal.VSIFOpenL('/vsimem/vsizip_12_src2.zip', 'rb') data = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL('/vsimem/vsizip_12.zip', 'wb') gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) content = gdal.ReadDir('/vsizip/vsimem/vsizip_12.zip') gdal.Unlink('/vsimem/vsizip_12_src1.zip') gdal.Unlink('/vsimem/vsizip_12_src2.zip') gdal.Unlink('/vsimem/vsizip_12.zip') assert content == ['bar.baz'] ############################################################################### # Test ReadDir() truncation def test_vsizip_13(): fmain = gdal.VSIFOpenL("/vsizip/vsimem/vsizip_13.zip", "wb") for i in range(10): f = gdal.VSIFOpenL("/vsizip/vsimem/vsizip_13.zip/%d" % i, "wb") gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) lst = gdal.ReadDir('/vsizip/vsimem/vsizip_13.zip') assert len(lst) >= 4 # Test truncation lst_truncated = gdal.ReadDir('/vsizip/vsimem/vsizip_13.zip', int(len(lst) / 2)) assert len(lst_truncated) > int(len(lst) / 2) gdal.Unlink('/vsimem/vsizip_13.zip') ############################################################################### # Test that we can recode filenames in ZIP when writing (#6631) def test_vsizip_14(): fmain = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_14.zip', 'wb') try: x = [''] exec("x[0] = u'\u0430\u0431\u0432\u0433\u0434\u0435'") cp866_filename = x[0] except: cp866_filename = '\u0430\u0431\u0432\u0433\u0434\u0435' with gdaltest.error_handler(): f = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_14.zip/' + cp866_filename, 'wb') if f is None: gdal.VSIFCloseL(fmain) gdal.Unlink('/vsimem/vsizip_14.zip') pytest.skip() gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) content = gdal.ReadDir("/vsizip//vsimem/vsizip_14.zip") assert content == [cp866_filename], 'bad content' gdal.Unlink('/vsimem/vsizip_14.zip') ############################################################################### # Test multithreaded compression def test_vsizip_multi_thread(): with gdaltest.config_options({'GDAL_NUM_THREADS': 'ALL_CPUS', 'CPL_VSIL_DEFLATE_CHUNK_SIZE': '32K'}): fmain = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_multi_thread.zip', 'wb') f = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_multi_thread.zip/test', 'wb') for i in range(100000): gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) f = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_multi_thread.zip/test', 'rb') data = gdal.VSIFReadL(100000, 5, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/vsizip_multi_thread.zip') if data != 'hello' * 100000: for i in range(10000): if data[i*5:i*5+5] != 'hello': print(i*5, data[i*5:i*5+5], data[i*5-5:i*5+5-5]) break pytest.fail() ############################################################################### # Test multithreaded compression, with I/O error def test_vsizip_multi_thread_error(): with gdaltest.error_handler(): with gdaltest.config_options({'GDAL_NUM_THREADS': 'ALL_CPUS', 'CPL_VSIL_DEFLATE_CHUNK_SIZE': '16K'}): fmain = gdal.VSIFOpenL('/vsizip/{/vsimem/vsizip_multi_thread.zip||maxlength=1000}', 'wb') f = gdal.VSIFOpenL('/vsizip/{/vsimem/vsizip_multi_thread.zip||maxlength=1000}/test', 'wb') for i in range(100000): gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) gdal.Unlink('/vsimem/vsizip_multi_thread.zip') ############################################################################### # Test multithreaded compression, below the threshold where it triggers def test_vsizip_multi_thread_below_threshold(): with gdaltest.config_options({'GDAL_NUM_THREADS': 'ALL_CPUS'}): fmain = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_multi_thread.zip', 'wb') f = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_multi_thread.zip/test', 'wb') gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) f = gdal.VSIFOpenL('/vsizip//vsimem/vsizip_multi_thread.zip/test', 'rb') data = gdal.VSIFReadL(1, 5, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/vsizip_multi_thread.zip') assert data == 'hello' ############################################################################### # Test creating ZIP64 file: uncompressed larger than 4GB, but compressed # data stream < 4 GB def test_vsizip_create_zip64(): if not gdaltest.run_slow_tests(): pytest.skip() niters = 1000 s = 'hello' * 1000 * 1000 zip_name = '/vsimem/vsizip_create_zip64.zip' with gdaltest.config_options({'GDAL_NUM_THREADS': 'ALL_CPUS'}): fmain = gdal.VSIFOpenL('/vsizip/' + zip_name, 'wb') f = gdal.VSIFOpenL('/vsizip/' + zip_name + '/test', 'wb') for i in range(niters): gdal.VSIFWriteL(s, 1, len(s), f) gdal.VSIFCloseL(f) gdal.VSIFCloseL(fmain) size = gdal.VSIStatL(zip_name).size assert size <= 0xFFFFFFFF size = gdal.VSIStatL('/vsizip/' + zip_name + '/test').size assert size == len(s) * niters f = gdal.VSIFOpenL('/vsizip/' + zip_name + '/test', 'rb') data = gdal.VSIFReadL(1, len(s), f).decode('ascii') gdal.VSIFCloseL(f) assert data == s gdal.Unlink(zip_name) ############################################################################### # Test creating ZIP64 file: compressed data stream > 4 GB def test_vsizip_create_zip64_stream_larger_than_4G(): if not gdaltest.run_slow_tests(): pytest.skip() zip_name = 'tmp/vsizip_create_zip64_stream_larger_than_4G.zip' gdal.Unlink(zip_name) niters = 999 s = ''.join([chr(random.randint(0, 127)) for i in range(5 * 1000 * 1000)]) with gdaltest.config_options({'GDAL_NUM_THREADS': 'ALL_CPUS'}): f = gdal.VSIFOpenL('/vsizip/' + zip_name + '/test2', 'wb') for i in range(niters): gdal.VSIFWriteL(s, 1, len(s), f) gdal.VSIFCloseL(f) size = gdal.VSIStatL(zip_name).size assert size > 0xFFFFFFFF size = gdal.VSIStatL('/vsizip/' + zip_name + '/test2').size assert size == len(s) * niters f = gdal.VSIFOpenL('/vsizip/' + zip_name + '/test2', 'rb') data = gdal.VSIFReadL(1, len(s), f).decode('ascii') gdal.VSIFCloseL(f) assert data == s gdal.Unlink(zip_name) ############################################################################### def test_vsizip_byte_zip64_local_header_zeroed(): size = gdal.VSIStatL('/vsizip/data/byte_zip64_local_header_zeroed.zip/byte.tif').size assert size == 736 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/asyncreader.py�������������������������������������������������������������0000775�0001750�0001750�00000005374�13701057756�016673� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: asyncreader.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test AsyncReader interface # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal ############################################################################### # Test AsyncReader interface on the default (synchronous) implementation def test_asyncreader_1(): ds = gdal.Open('data/rgbsmall.tif') asyncreader = ds.BeginAsyncReader(0, 0, ds.RasterXSize, ds.RasterYSize) buf = asyncreader.GetBuffer() result = asyncreader.GetNextUpdatedRegion(0) assert result == [gdal.GARIO_COMPLETE, 0, 0, ds.RasterXSize, ds.RasterYSize], \ 'wrong return values for GetNextUpdatedRegion()' ds.EndAsyncReader(asyncreader) asyncreader = None out_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/asyncresult.tif', ds.RasterXSize, ds.RasterYSize, ds.RasterCount) out_ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, buf) expected_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] ds = None out_ds = None gdal.Unlink('/vsimem/asyncresult.tif') for i, csum in enumerate(cs): assert csum == expected_cs[i], ('did not get expected checksum for band %d' % (i + 1)) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/tmp/�����������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057751�014600� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/tmp/do-not-remove����������������������������������������������������������0000664�0001750�0001750�00000000000�13701057751�017204� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/tiff_write.py��������������������������������������������������������������0000775�0001750�0001750�00001010535�13701057757�016532� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: tiff_write.py a7977ff0893580c6bbb4ad43d3beb5e421300e64 2020-02-01 18:09:37 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for GeoTIFF format. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import copy import os import sys import array import shutil import struct from osgeo import gdal from osgeo import osr import pytest import gdaltest run_tiff_write_api_proxy = True ############################################################################### def _check_cog(filename, check_tiled=True, full_check=False): path = '../../gdal/swig/python/samples' if path not in sys.path: sys.path.append(path) import validate_cloud_optimized_geotiff try: _, errors, _ = validate_cloud_optimized_geotiff.validate(filename, check_tiled=check_tiled, full_check=full_check) assert not errors, 'validate_cloud_optimized_geotiff failed' except OSError: pytest.fail('validate_cloud_optimized_geotiff failed') ############################################################################### # Get the GeoTIFF driver, and verify a few things about it. def test_tiff_write_1(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') assert gdaltest.tiff_drv is not None, 'GTiff driver not found!' drv_md = gdaltest.tiff_drv.GetMetadata() assert drv_md['DMD_MIMETYPE'] == 'image/tiff', 'mime type is wrong' ############################################################################### # Create a simple file by copying from an existing one. def test_tiff_write_2(): src_ds = gdal.Open('data/cfloat64.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_2.tif', src_ds) bnd = new_ds.GetRasterBand(1) assert bnd.Checksum() == 5028, 'Didnt get expected checksum on still-open file' bnd = None new_ds = None # hopefully it's closed now! new_ds = gdal.Open('tmp/test_2.tif') bnd = new_ds.GetRasterBand(1) assert bnd.Checksum() == 5028, 'Didnt get expected checksum on reopened file' assert bnd.ComputeRasterMinMax() == (74.0, 255.0), \ 'ComputeRasterMinMax() returned wrong value' bnd = None new_ds = None gdaltest.tiff_drv.Delete('tmp/test_2.tif') ############################################################################### # Create a simple file by copying from an existing one. def test_tiff_write_3(): src_ds = gdal.Open('data/utmsmall.tif') options = ['TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=32'] new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_3.tif', src_ds, options=options) bnd = new_ds.GetRasterBand(1) assert bnd.Checksum() == 50054, 'Didnt get expected checksum on still-open file' bnd = None new_ds = None gdaltest.tiff_drv.Delete('tmp/test_3.tif') ############################################################################### # Create a tiled file. def test_tiff_write_4(): try: from osgeo import gdalnumeric except ImportError: pytest.skip() options = ['TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=32'] new_ds = gdaltest.tiff_drv.Create('tmp/test_4.tif', 40, 50, 3, gdal.GDT_Byte, options) try: data_red = gdalnumeric.zeros((50, 40)) data_green = gdalnumeric.zeros((50, 40)) data_blue = gdalnumeric.zeros((50, 40)) except AttributeError: import numpy data_red = numpy.zeros((50, 40)) data_green = numpy.zeros((50, 40)) data_blue = numpy.zeros((50, 40)) for y in range(50): for x in range(40): data_red[y][x] = x data_green[y][x] = y data_blue[y][x] = x + y try: data_red = data_red.astype(gdalnumeric.UnsignedInt8) data_green = data_green.astype(gdalnumeric.UnsignedInt8) data_blue = data_blue.astype(gdalnumeric.UnsignedInt8) except AttributeError: try: data_red = data_red.astype(gdalnumeric.uint8) data_green = data_green.astype(gdalnumeric.uint8) data_blue = data_blue.astype(gdalnumeric.uint8) except AttributeError: pass new_ds.GetRasterBand(1).WriteArray(data_red) new_ds.GetRasterBand(2).WriteArray(data_green) new_ds.GetRasterBand(3).WriteArray(data_blue) gt = (0.0, 1.0, 0.0, 50.0, 0.0, -1.0) new_ds.SetGeoTransform(gt) assert new_ds.GetRasterBand(1).Checksum() == 21577 and new_ds.GetRasterBand(2).Checksum() == 20950 and new_ds.GetRasterBand(3).Checksum() == 23730, \ 'Wrong checksum.' assert gt == new_ds.GetGeoTransform(), 'Wrong geotransform.' new_ds.SetMetadata({'TEST_KEY': 'TestValue'}) new_ds = None new_ds = gdal.Open('tmp/test_4.tif') assert new_ds.GetRasterBand(1).Checksum() == 21577 and new_ds.GetRasterBand(2).Checksum() == 20950 and new_ds.GetRasterBand(3).Checksum() == 23730, \ 'Wrong checksum (2).' assert gt == new_ds.GetGeoTransform(), 'Wrong geotransform(2).' nd = new_ds.GetRasterBand(1).GetNoDataValue() assert nd is None, 'Got unexpected nodata value.' md_dict = new_ds.GetMetadata() assert md_dict['TEST_KEY'] == 'TestValue', 'Missing metadata' new_ds = None gdaltest.tiff_drv.Delete('tmp/test_4.tif') ############################################################################### # Write a file with GCPs. def test_tiff_write_5(): src_ds = gdal.Open('data/gcps.vrt') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_5.tif', src_ds) assert (new_ds.GetGCPProjection().find( 'AUTHORITY["EPSG","26711"]') != -1), 'GCP Projection not set properly.' gcps = new_ds.GetGCPs() assert len(gcps) == 4, 'GCP count wrong.' new_ds = None gdaltest.tiff_drv.Delete('tmp/test_5.tif') # Test SetGCPs on a new GTiff new_ds = gdaltest.tiff_drv.Create('tmp/test_5.tif', 10, 10, 1) new_ds.SetGCPs(gcps, src_ds.GetGCPProjection()) new_ds = None new_ds = gdal.Open('tmp/test_5.tif') gcps = new_ds.GetGCPs() assert len(gcps) == 4, 'GCP count wrong.' new_ds = None gdaltest.tiff_drv.Delete('tmp/test_5.tif') ############################################################################### # Test a mixture of reading and writing on a DEFLATE compressed file. def test_tiff_write_6(): options = ['TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=32', 'COMPRESS=DEFLATE', 'PREDICTOR=2'] ds = gdaltest.tiff_drv.Create('tmp/test_6.tif', 200, 200, 1, gdal.GDT_Byte, options) # make a 32x32 byte buffer buf = array.array('B', list(range(32))).tostring() * 32 ds.WriteRaster(0, 0, 32, 32, buf, buf_type=gdal.GDT_Byte) ds.FlushCache() ds.WriteRaster(32, 0, 32, 32, buf, buf_type=gdal.GDT_Byte) ds.FlushCache() buf_read = ds.ReadRaster(0, 0, 32, 32, buf_type=gdal.GDT_Byte) if buf_read != buf: gdaltest.tiff_write_6_failed = True pytest.fail('did not get back expected data.') ds = None gdaltest.tiff_write_6_failed = False gdaltest.tiff_drv.Delete('tmp/test_6.tif') ############################################################################### # Test a mixture of reading and writing on a LZW compressed file. def test_tiff_write_7(): options = ['TILED=YES', 'COMPRESS=LZW', 'PREDICTOR=2'] ds = gdaltest.tiff_drv.Create('tmp/test_7.tif', 200, 200, 1, gdal.GDT_Byte, options) # make a 32x32 byte buffer buf = array.array('B', list(range(32))).tostring() * 32 ds.WriteRaster(0, 0, 32, 32, buf, buf_type=gdal.GDT_Byte) ds.FlushCache() ds.WriteRaster(32, 0, 32, 32, buf, buf_type=gdal.GDT_Byte) ds.FlushCache() buf_read = ds.ReadRaster(0, 0, 32, 32, buf_type=gdal.GDT_Byte) assert buf_read == buf, 'did not get back expected data.' ds = None gdaltest.tiff_drv.Delete('tmp/test_7.tif') ############################################################################### # Test a mixture of reading and writing on a PACKBITS compressed file. def test_tiff_write_8(): options = ['TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=32', 'COMPRESS=PACKBITS'] ds = gdaltest.tiff_drv.Create('tmp/test_8.tif', 200, 200, 1, gdal.GDT_Byte, options) # make a 32x32 byte buffer buf = array.array('B', list(range(32))).tostring() * 32 ds.WriteRaster(0, 0, 32, 32, buf, buf_type=gdal.GDT_Byte) ds.FlushCache() ds.WriteRaster(32, 0, 32, 32, buf, buf_type=gdal.GDT_Byte) ds.FlushCache() buf_read = ds.ReadRaster(0, 0, 32, 32, buf_type=gdal.GDT_Byte) assert buf_read == buf, 'did not get back expected data.' ds = None gdaltest.tiff_drv.Delete('tmp/test_8.tif') ############################################################################### # Create a simple file by copying from an existing one. def test_tiff_write_9(): src_ds = gdal.Open('data/byte.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_9.tif', src_ds, options=['NBITS=5']) with gdaltest.error_handler(): new_ds = None new_ds = gdal.Open('tmp/test_9.tif') bnd = new_ds.GetRasterBand(1) assert bnd.Checksum() == 5287, 'Didnt get expected checksum on reopened file' bnd = None new_ds = None gdaltest.tiff_drv.Delete('tmp/test_9.tif') ############################################################################### # 1bit file but with band interleaving, and odd size (not multiple of 8) #1957 def test_tiff_write_10(): ut = gdaltest.GDALTest('GTiff', 'oddsize_1bit2b.tif', 2, 5918, options=['NBITS=1', 'INTERLEAVE=BAND']) return ut.testCreate(out_bands=2) ############################################################################### # Simple 1 bit file, treated through the GTiffBitmapBand class. def test_tiff_write_11(): ut = gdaltest.GDALTest('GTiff', 'oddsize1bit.tif', 1, 5918, options=['NBITS=1', 'COMPRESS=CCITTFAX4']) return ut.testCreateCopy() ############################################################################### # Read JPEG Compressed YCbCr subsampled image. def test_tiff_write_12(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() ds = gdal.Open('data/sasha.tif') cs = ds.GetRasterBand(3).Checksum() assert cs == 31952 or cs == 30145 ############################################################################### # Write JPEG Compressed YCbCr subsampled image. def test_tiff_write_13(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdal.Open('data/sasha.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/sasha.tif', src_ds, options=['PROFILE=BASELINE', 'TILED=YES', 'COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEG_QUALITY=31']) ds = None ds = gdal.Open('tmp/sasha.tif') cs = ds.GetRasterBand(3).Checksum() ds = None size = os.stat('tmp/sasha.tif').st_size gdaltest.tiff_drv.Delete('tmp/sasha.tif') assert cs == 17347 or cs == 14445, 'fail: bad checksum' if md['LIBTIFF'] == 'INTERNAL': assert size <= 22816, 'fail: bad size' ############################################################################### # Test creating an in memory copy. def test_tiff_write_14(): tst = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test that we can restrict metadata and georeferencing in the output # file using the PROFILE creation option with CreateCopy() def test_tiff_write_15(): ds_in = gdal.Open('data/byte.vrt') ds = gdaltest.tiff_drv.CreateCopy('tmp/tw_15.tif', ds_in, options=['PROFILE=BASELINE']) ds_in = None ds = None ds = gdal.Open('tmp/tw_15.tif') md = ds.GetMetadata() assert 'test' in md, 'Metadata absent from .aux.xml file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' in md, 'Metadata absent from .aux.xml file.' ds = None gdal.Unlink('tmp/tw_15.tif.aux.xml') ds = gdal.Open('tmp/tw_15.tif') assert ds.GetGeoTransform() == (0.0, 1.0, 0.0, 0.0, 0.0, 1.0), \ 'Got wrong geotransform, profile ignored?' md = ds.GetMetadata() assert 'test' not in md, 'Metadata written to BASELINE file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' not in md, 'Metadata written to BASELINE file.' ds = None gdaltest.tiff_drv.Delete('tmp/tw_15.tif') ############################################################################### # Test that we can restrict metadata and georeferencing in the output # file using the PROFILE creation option with Create() def test_tiff_write_16(): ds_in = gdal.Open('data/byte.vrt') ds = gdaltest.tiff_drv.Create('tmp/tw_16.tif', 20, 20, gdal.GDT_Byte, options=['PROFILE=BASELINE']) ds.SetMetadata({'test': 'testvalue'}) ds.GetRasterBand(1).SetMetadata({'testBand': 'testvalueBand'}) ds.SetGeoTransform((10, 5, 0, 30, 0, -5)) data = ds_in.ReadRaster(0, 0, 20, 20) ds.WriteRaster(0, 0, 20, 20, data) ds_in = None ds = None ds = gdal.Open('tmp/tw_16.tif') assert ds.GetGeoTransform() == (0.0, 1.0, 0.0, 0.0, 0.0, 1.0), \ 'Got wrong geotransform, profile ignored?' md = ds.GetMetadata() assert 'test' in md, 'Metadata absent from .aux.xml file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' in md, 'Metadata absent from .aux.xml file.' ds = None try: os.remove('tmp/tw_16.tif.aux.xml') except OSError: try: os.stat('tmp/tw_16.tif.aux.xml') except OSError: pytest.fail('No .aux.xml file.') ds = gdal.Open('tmp/tw_16.tif') md = ds.GetMetadata() assert 'test' not in md, 'Metadata written to BASELINE file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' not in md, 'Metadata written to BASELINE file.' ds = None gdaltest.tiff_drv.Delete('tmp/tw_16.tif') ############################################################################### # Test writing a TIFF with an RPC tag. def test_tiff_write_17(): # Translate RPC controlled data to GeoTIFF. ds_in = gdal.Open('data/rpc.vrt') rpc_md = ds_in.GetMetadata('RPC') tmpfilename = '/vsimem/tiff_write_17.tif' ds = gdaltest.tiff_drv.CreateCopy(tmpfilename, ds_in) ds_in = None ds = None # Ensure there is no .aux.xml file which might hold the RPC. assert not gdal.VSIStatL(tmpfilename + '.aux.xml'), \ 'unexpectedly found.aux.xml file' # confirm there is no .rpb file created by default. assert not gdal.VSIStatL(tmpfilename + '.RPB'), 'unexpectedly found .RPB file' # confirm there is no _rpc.txt file created by default. assert not gdal.VSIStatL(tmpfilename + '_RPC.TXT'), \ 'unexpectedly found _RPC.TXT file' # Open the dataset, and confirm the RPC data is still intact. ds = gdal.Open(tmpfilename) assert gdaltest.rpcs_equal(ds.GetMetadata('RPC'), rpc_md) ds = None # Modify the RPC modified_rpc = copy.copy(rpc_md) modified_rpc['LINE_OFF'] = '123456' ds = gdal.Open(tmpfilename, gdal.GA_Update) ds.SetMetadata(modified_rpc, 'RPC') ds = None ds = gdal.Open(tmpfilename) assert gdaltest.rpcs_equal(ds.GetMetadata('RPC'), modified_rpc) ds = None # Unset the RPC ds = gdal.Open(tmpfilename, gdal.GA_Update) ds.SetMetadata(None, 'RPC') ds = None ds = gdal.Open(tmpfilename) assert not ds.GetMetadata('RPC'), 'got RPC, but was not expected' ds = None gdaltest.tiff_drv.Delete(tmpfilename) ############################################################################### # Test that above test still work with the optimization in the GDAL_DISABLE_READDIR_ON_OPEN # case (#3996) def test_tiff_write_17_disable_readdir(): oldval = gdal.GetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN') gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'TRUE') ret = test_tiff_write_17() gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', oldval) return ret ############################################################################### # Test writing a TIFF with an RPB file and IMD file. def test_tiff_write_18(): # Translate RPC controlled data to GeoTIFF. ds_in = gdal.Open('data/rpc.vrt') rpc_md = ds_in.GetMetadata('RPC') gdaltest.tiff_drv.CreateCopy('tmp/tw_18.tif', ds_in, options=['PROFILE=BASELINE']) # Ensure there is no .aux.xml file which might hold the RPC. assert not gdal.VSIStatL('tmp/tm_18.tif.aux.xml'), \ 'unexpectedly found tm_18.tif.aux.xml file' # confirm there is an .rpb and .imd file. assert gdal.VSIStatL('tmp/tw_18.RPB') is not None, 'missing .RPB file.' assert gdal.VSIStatL('tmp/tw_18.IMD') is not None, 'missing .IMD file.' # confirm there is no _rpc.txt file created by default. assert not gdal.VSIStatL('tmp/tw_18_RPC.TXT'), 'unexpectedly found _RPC.TXT file' # Open the dataset, and confirm the RPC/IMD data is still intact. ds = gdal.Open('tmp/tw_18.tif') assert gdaltest.rpcs_equal(ds.GetMetadata('RPC'), rpc_md) imd_md = ds.GetMetadata('IMD') assert imd_md['version'] == '"R"' and imd_md['numColumns'] == '30324' and imd_md['IMAGE_1.sunEl'] == '39.7', \ 'IMD contents wrong?' ds = None # Test deferred loading with GetMetadataItem() ds = gdal.Open('tmp/tw_18.tif') assert ds.GetMetadataItem('LINE_OFF', 'RPC') == '16201', \ "wrong value for GetMetadataItem('LINE_OFF', 'RPC')" assert ds.GetMetadataItem('version', 'IMD') == '"R"', \ "wrong value for GetMetadataItem('version', 'IMD')" ds = None gdaltest.tiff_drv.Delete('tmp/tw_18.tif') # Confirm IMD and RPC files are cleaned up. If not likely the # file list functionality is not working properly. assert not gdal.VSIStatL('tmp/tw_18.RPB'), 'RPB did not get cleaned up.' assert not gdal.VSIStatL('tmp/tw_18.IMD'), 'IMD did not get cleaned up.' # Remove the RPC gdaltest.tiff_drv.CreateCopy('tmp/tw_18.tif', ds_in, options=['PROFILE=BASELINE']) ds = gdal.Open('tmp/tw_18.tif', gdal.GA_Update) ds.SetMetadata(None, 'RPC') ds = None assert not os.path.exists('tmp/tw_18.RPB'), 'RPB did not get removed' gdaltest.tiff_drv.Delete('tmp/tw_18.tif') ############################################################################### # Test that above test still work with the optimization in the GDAL_DISABLE_READDIR_ON_OPEN # case (#3996) def test_tiff_write_18_disable_readdir(): oldval = gdal.GetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN') gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'TRUE') ret = test_tiff_write_18() gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', oldval) return ret ############################################################################### # Test writing a TIFF with an _RPC.TXT def test_tiff_write_rpc_txt(): # Translate RPC controlled data to GeoTIFF. ds_in = gdal.Open('data/rpc.vrt') # Remove IMD before creating the TIFF to avoid creating an .IMD # since .IMD + _RPC.TXT is an odd combination # If the .IMD is found, we don't try reading _RPC.TXT ds_in_without_imd = gdal.GetDriverByName('VRT').CreateCopy('', ds_in) ds_in_without_imd.SetMetadata(None, 'IMD') rpc_md = ds_in.GetMetadata('RPC') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_rpc_txt.tif', ds_in_without_imd, options=['PROFILE=BASELINE', 'RPCTXT=YES']) ds_in = None ds = None # Ensure there is no .aux.xml file which might hold the RPC. try: os.remove('tmp/tiff_write_rpc_txt.tif.aux.xml') except OSError: pass # confirm there is no .RPB file created by default. assert not os.path.exists('tmp/tiff_write_rpc_txt.RPB') assert os.path.exists('tmp/tiff_write_rpc_txt_RPC.TXT') # Open the dataset, and confirm the RPC data is still intact. ds = gdal.Open('tmp/tiff_write_rpc_txt.tif') assert gdaltest.rpcs_equal(ds.GetMetadata('RPC'), rpc_md) ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_rpc_txt.tif') # Confirm _RPC.TXT file is cleaned up. If not likely the # file list functionality is not working properly. assert not os.path.exists('tmp/tiff_write_rpc_txt_RPC.TXT') ############################################################################### # Test writing a TIFF with an RPC in .aux.xml def test_tiff_write_rpc_in_pam(): ds_in = gdal.Open('data/rpc.vrt') rpc_md = ds_in.GetMetadata('RPC') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_rpc_in_pam.tif', ds_in, options=['PROFILE=BASELINE', 'RPB=NO']) ds_in = None ds = None # Ensure there is a .aux.xml file which might hold the RPC. try: os.stat('tmp/tiff_write_rpc_in_pam.tif.aux.xml') except OSError: pytest.fail('missing .aux.xml file.') # confirm there is no .RPB file created. assert not os.path.exists('tmp/tiff_write_rpc_txt.RPB') # Open the dataset, and confirm the RPC data is still intact. ds = gdal.Open('tmp/tiff_write_rpc_in_pam.tif') assert gdaltest.rpcs_equal(ds.GetMetadata('RPC'), rpc_md) ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_rpc_in_pam.tif') ############################################################################### # Test the write of a pixel-interleaved image with NBITS = 7 def test_tiff_write_19(): src_ds = gdal.Open('data/contig_strip.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/contig_strip_7.tif', src_ds, options=['NBITS=7', 'INTERLEAVE=PIXEL']) new_ds = None # hopefully it's closed now! new_ds = gdal.Open('tmp/contig_strip_7.tif') assert (new_ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() and \ new_ds.GetRasterBand(2).Checksum() == src_ds.GetRasterBand(2).Checksum() and \ new_ds.GetRasterBand(3).Checksum() == src_ds.GetRasterBand(3).Checksum()), \ 'Didnt get expected checksum on reopened file' new_ds = None src_ds = None gdaltest.tiff_drv.Delete('tmp/contig_strip_7.tif') ############################################################################### # Test write and read of some TIFF tags # Also test unsetting those tags (#5619) def test_tiff_write_20(): new_ds = gdaltest.tiff_drv.Create('tmp/tags.tif', 1, 1, 1) values = [('TIFFTAG_DOCUMENTNAME', 'document_name'), ('TIFFTAG_IMAGEDESCRIPTION', 'image_description'), ('TIFFTAG_SOFTWARE', 'software'), ('TIFFTAG_DATETIME', '2009/01/01 13:01:08'), # TODO: artitst? ('TIFFTAG_ARTIST', 'artitst'), ('TIFFTAG_HOSTCOMPUTER', 'host_computer'), ('TIFFTAG_COPYRIGHT', 'copyright'), ('TIFFTAG_XRESOLUTION', '100'), ('TIFFTAG_YRESOLUTION', '101'), ('TIFFTAG_RESOLUTIONUNIT', '2 (pixels/inch)'), ('TIFFTAG_MINSAMPLEVALUE', '1'), ('TIFFTAG_MAXSAMPLEVALUE', '2'), ] new_ds.SetMetadata(dict(values)) new_ds = None # hopefully it's closed now! assert not os.path.exists('tmp/tags.tif.aux.xml') new_ds = gdal.Open('tmp/tags.tif') md = new_ds.GetMetadata() for item in values: assert item[0] in md, ('Could not find tag %s' % (item[0])) assert md[item[0]] == item[1], \ ('For tag %s, got %s, expected %s' % (item[0], md[item[0]], item[1])) new_ds = None # Test just unsetting once, but leaving other unchanged ds = gdal.Open('tmp/tags.tif', gdal.GA_Update) ds.SetMetadataItem('TIFFTAG_SOFTWARE', None) ds = None assert not os.path.exists('tmp/tags.tif.aux.xml') ds = gdal.Open('tmp/tags.tif') assert ds.GetMetadataItem('TIFFTAG_SOFTWARE') is None, \ ('expected unset TIFFTAG_SOFTWARE but got %s' % ds.GetMetadataItem('TIFFTAG_SOFTWARE')) assert ds.GetMetadataItem('TIFFTAG_DOCUMENTNAME') is not None, \ 'expected set TIFFTAG_DOCUMENTNAME but got None' ds = None # Test unsetting all the remaining items ds = gdal.Open('tmp/tags.tif', gdal.GA_Update) ds.SetMetadata({}) ds = None ds = gdal.Open('tmp/tags.tif') got_md = ds.GetMetadata() ds = None assert got_md == {}, 'expected empty metadata list, but got some' gdaltest.tiff_drv.Delete('tmp/tags.tif') ############################################################################### # Test RGBA images with TIFFTAG_EXTRASAMPLES=EXTRASAMPLE_ASSOCALPHA def test_tiff_write_21(): src_ds = gdal.Open('data/stefan_full_rgba.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/stefan_full_rgba.tif', src_ds) new_ds = None new_ds = gdal.Open('tmp/stefan_full_rgba.tif') assert new_ds.RasterCount == 4 for i in range(4): assert new_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() == src_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() assert new_ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum() new_ds = None src_ds = None gdaltest.tiff_drv.Delete('tmp/stefan_full_rgba.tif') ############################################################################### # Test RGBA images with TIFFTAG_EXTRASAMPLES=EXTRASAMPLE_UNSPECIFIED def test_tiff_write_22(): src_ds = gdal.Open('data/stefan_full_rgba_photometric_rgb.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/stefan_full_rgba_photometric_rgb.tif', src_ds, options=['PHOTOMETRIC=RGB']) new_ds = None new_ds = gdal.Open('tmp/stefan_full_rgba_photometric_rgb.tif') assert new_ds.RasterCount == 4 for i in range(4): assert new_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() == src_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() assert new_ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum() new_ds = None src_ds = None gdaltest.tiff_drv.Delete('tmp/stefan_full_rgba_photometric_rgb.tif') ############################################################################### # Test grey+alpha images with ALPHA=YES def test_tiff_write_23(): src_ds = gdal.Open('data/stefan_full_greyalpha.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/stefan_full_greyalpha.tif', src_ds, options=['ALPHA=YES']) new_ds = None new_ds = gdal.Open('tmp/stefan_full_greyalpha.tif') assert new_ds.RasterCount == 2 for i in range(2): assert new_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() == src_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() assert new_ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum() new_ds = None src_ds = None gdaltest.tiff_drv.Delete('tmp/stefan_full_greyalpha.tif') ############################################################################### # Test grey+alpha images without ALPHA=YES def test_tiff_write_24(): src_ds = gdal.Open('data/stefan_full_greyalpha.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/stefan_full_greyunspecified.tif', src_ds) new_ds = None new_ds = gdal.Open('tmp/stefan_full_greyunspecified.tif') assert new_ds.RasterCount == 2 for i in range(2): assert new_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() == src_ds.GetRasterBand(i + 1).GetRasterColorInterpretation() assert new_ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum() new_ds = None src_ds = None gdaltest.tiff_drv.Delete('tmp/stefan_full_greyunspecified.tif') ############################################################################### # Read a CIELAB image to test the RGBA image TIFF interface def test_tiff_write_25(): src_ds = gdal.Open('data/cielab.tif') assert src_ds.RasterCount == 4 assert src_ds.GetRasterBand(1).Checksum() == 6 assert src_ds.GetRasterBand(2).Checksum() == 3 assert src_ds.GetRasterBand(3).Checksum() == 0 assert src_ds.GetRasterBand(4).Checksum() == 3 assert src_ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_RedBand assert src_ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_GreenBand assert src_ds.GetRasterBand(3).GetRasterColorInterpretation() == gdal.GCI_BlueBand assert src_ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand src_ds = None ############################################################################### # Test color table in a 8 bit image def test_tiff_write_26(): ds = gdaltest.tiff_drv.Create('tmp/ct8.tif', 1, 1, 1, gdal.GDT_Byte) ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 255, 255, 255)) ct.SetColorEntry(1, (255, 255, 0, 255)) ct.SetColorEntry(2, (255, 0, 255, 255)) ct.SetColorEntry(3, (0, 255, 255, 255)) ds.GetRasterBand(1).SetRasterColorTable(ct) ct = None ds = None ds = gdal.Open('tmp/ct8.tif') ct = ds.GetRasterBand(1).GetRasterColorTable() assert (ct.GetCount() == 256 and \ ct.GetColorEntry(0) == (255, 255, 255, 255) and \ ct.GetColorEntry(1) == (255, 255, 0, 255) and \ ct.GetColorEntry(2) == (255, 0, 255, 255) and \ ct.GetColorEntry(3) == (0, 255, 255, 255)), 'Wrong color table entry.' ct = None ds = None gdaltest.tiff_drv.Delete('tmp/ct8.tif') ############################################################################### # Test color table in a 16 bit image def test_tiff_write_27(): ds = gdaltest.tiff_drv.Create('tmp/ct16.tif', 1, 1, 1, gdal.GDT_UInt16) ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 255, 255, 255)) ct.SetColorEntry(1, (255, 255, 0, 255)) ct.SetColorEntry(2, (255, 0, 255, 255)) ct.SetColorEntry(3, (0, 255, 255, 255)) ds.GetRasterBand(1).SetRasterColorTable(ct) ct = None ds = None ds = gdal.Open('tmp/ct16.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/ct16_copy.tif', ds) del new_ds ds = None ds = gdal.Open('tmp/ct16_copy.tif') ct = ds.GetRasterBand(1).GetRasterColorTable() assert (ct.GetCount() == 65536 and \ ct.GetColorEntry(0) == (255, 255, 255, 255) and \ ct.GetColorEntry(1) == (255, 255, 0, 255) and \ ct.GetColorEntry(2) == (255, 0, 255, 255) and \ ct.GetColorEntry(3) == (0, 255, 255, 255)), 'Wrong color table entry.' ct = None ds = None gdaltest.tiff_drv.Delete('tmp/ct16.tif') gdaltest.tiff_drv.Delete('tmp/ct16_copy.tif') ############################################################################### # Test SetRasterColorInterpretation on a 2 channel image def test_tiff_write_28(): ds = gdaltest.tiff_drv.Create('tmp/greyalpha.tif', 1, 1, 2) assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_Undefined ds.GetRasterBand(2).SetRasterColorInterpretation(gdal.GCI_AlphaBand) assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_AlphaBand ds = None ds = gdal.Open('tmp/greyalpha.tif') assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_AlphaBand ds = None gdaltest.tiff_drv.Delete('tmp/greyalpha.tif') ############################################################################### # Test SetRasterColorInterpretation on a 4 channel image def test_tiff_write_29(): # When creating a 4 channel image with PHOTOMETRIC=RGB, # TIFFTAG_EXTRASAMPLES=EXTRASAMPLE_UNSPECIFIED ds = gdaltest.tiff_drv.Create('/vsimem/rgba.tif', 1, 1, 4, options=['PHOTOMETRIC=RGB']) assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '0' assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_Undefined # Now turn on alpha ds.GetRasterBand(4).SetRasterColorInterpretation(gdal.GCI_AlphaBand) assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '2' ds = None assert gdal.VSIStatL('/vsimem/rgba.tif.aux.xml') is None ds = gdal.Open('/vsimem/rgba.tif') assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '2' assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand # Test cancelling alpha gdaltest.tiff_drv.CreateCopy('/vsimem/rgb_no_alpha.tif', ds, options=['ALPHA=NO']) ds = None assert gdal.VSIStatL('/vsimem/rgb_no_alpha.tif.aux.xml') is None ds = gdal.Open('/vsimem/rgb_no_alpha.tif') assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '0' assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_Undefined # Test re-adding alpha gdaltest.tiff_drv.CreateCopy('/vsimem/rgb_added_alpha.tif', ds, options=['ALPHA=YES']) ds = None assert gdal.VSIStatL('/vsimem/rgb_added_alpha.tif.aux.xml') is None ds = gdal.Open('/vsimem/rgb_added_alpha.tif') assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '2' assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand ds = None gdaltest.tiff_drv.Delete('/vsimem/rgba.tif') gdaltest.tiff_drv.Delete('/vsimem/rgb_no_alpha.tif') gdaltest.tiff_drv.Delete('/vsimem/rgb_added_alpha.tif') ############################################################################### # Create a BigTIFF image with BigTIFF=YES def test_tiff_write_30(): ds = gdaltest.tiff_drv.Create('tmp/bigtiff.tif', 1, 1, 1, options=['BigTIFF=YES']) ds = None ds = gdal.Open('tmp/bigtiff.tif') assert ds is not None ds = None fileobj = open('tmp/bigtiff.tif', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() gdaltest.tiff_drv.Delete('tmp/bigtiff.tif') # Check BigTIFF signature assert (not ((binvalues[2] != 0x2B or binvalues[3] != 0) and (binvalues[3] != 0x2B or binvalues[2] != 0))) ############################################################################### # Create a BigTIFF image implicitly (more than 4Gb). def test_tiff_write_31(): ds = gdaltest.tiff_drv.Create('tmp/bigtiff.tif', 100000, 100000, 1, options=['SPARSE_OK=TRUE']) ds = None ds = gdal.Open('tmp/bigtiff.tif') assert ds is not None ds = None fileobj = open('tmp/bigtiff.tif', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() gdaltest.tiff_drv.Delete('tmp/bigtiff.tif') # Check BigTIFF signature assert (not ((binvalues[2] != 0x2B or binvalues[3] != 0) and (binvalues[3] != 0x2B or binvalues[2] != 0))) ############################################################################### # Create a rotated image def test_tiff_write_32(): ds_in = gdal.Open('data/byte.vrt') # Test creation ds = gdaltest.tiff_drv.Create('tmp/byte_rotated.tif', 20, 20, gdal.GDT_Byte) gt = (10, 3.53553390593, 3.53553390593, 30, 3.53553390593, -3.53553390593) ds.SetGeoTransform(gt) data = ds_in.ReadRaster(0, 0, 20, 20) ds.WriteRaster(0, 0, 20, 20, data) ds_in = None # Test copy new_ds = gdaltest.tiff_drv.CreateCopy('tmp/byte_rotated_copy.tif', ds) del new_ds # Check copy ds = gdal.Open('tmp/byte_rotated_copy.tif') new_gt = ds.GetGeoTransform() for i in range(6): if new_gt[i] != pytest.approx(gt[i], abs=1e-5): print('') print(('old = ', gt)) print(('new = ', new_gt)) pytest.fail('Geotransform differs.') ds = None gdaltest.tiff_drv.Delete('tmp/byte_rotated.tif') gdaltest.tiff_drv.Delete('tmp/byte_rotated_copy.tif') ############################################################################### # Test that metadata is written in .aux.xml file in GeoTIFF profile with CreateCopy # (BASELINE is tested by tiff_write_15) def test_tiff_write_33(): ds_in = gdal.Open('data/byte.vrt') ds = gdaltest.tiff_drv.CreateCopy('tmp/tw_33.tif', ds_in, options=['PROFILE=GeoTIFF']) ds_in = None ds = None ds = gdal.Open('tmp/tw_33.tif') md = ds.GetMetadata() assert 'test' in md, 'Metadata absent from .aux.xml file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' in md, 'Metadata absent from .aux.xml file.' ds = None try: os.remove('tmp/tw_33.tif.aux.xml') except OSError: try: os.stat('tmp/tw_33.tif.aux.xml') except OSError: pytest.fail('No .aux.xml file.') ds = gdal.Open('tmp/tw_33.tif') md = ds.GetMetadata() assert 'test' not in md, 'Metadata written to GeoTIFF file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' not in md, 'Metadata written to GeoTIFF file.' ds = None gdaltest.tiff_drv.Delete('tmp/tw_33.tif') ############################################################################### # Test that metadata is written in .aux.xml file in GeoTIFF profile with Create # (BASELINE is tested by tiff_write_16) def test_tiff_write_34(): ds = gdaltest.tiff_drv.Create('tmp/tw_34.tif', 1, 1, gdal.GDT_Byte, options=['PROFILE=GeoTIFF']) ds.SetMetadata({'test': 'testvalue'}) ds.GetRasterBand(1).SetMetadata({'testBand': 'testvalueBand'}) ds = None ds = gdal.Open('tmp/tw_34.tif') md = ds.GetMetadata() assert 'test' in md, 'Metadata absent from .aux.xml file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' in md, 'Metadata absent from .aux.xml file.' ds = None try: os.remove('tmp/tw_34.tif.aux.xml') except OSError: try: os.stat('tmp/tw_34.tif.aux.xml') except OSError: pytest.fail('No .aux.xml file.') ds = gdal.Open('tmp/tw_34.tif') md = ds.GetMetadata() assert 'test' not in md, 'Metadata written to GeoTIFF file.' md = ds.GetRasterBand(1).GetMetadata() assert 'testBand' not in md, 'Metadata written to GeoTIFF file.' ds = None gdaltest.tiff_drv.Delete('tmp/tw_34.tif') ############################################################################### # Test fallback from internal storage of Geotiff metadata to PAM storage # when metadata is too big to fit into the GDALGeotiff tag def test_tiff_write_35(): # I've no idea why this works, and why this rolled in a # loop doesn't work... Python gurus please fix that ! big_string = 'a' big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string big_string = big_string + big_string ds = gdaltest.tiff_drv.Create('tmp/tw_35.tif', 1, 1, gdal.GDT_Byte) md = {} md['test'] = big_string ds.SetMetadata(md) md = ds.GetMetadata() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = None gdal.PopErrorHandler() try: os.stat('tmp/tw_35.tif.aux.xml') except OSError: pytest.fail('No .aux.xml file.') gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('tmp/tw_35.tif') gdal.PopErrorHandler() md = ds.GetMetadata() assert 'test' in md and len(md['test']) == 32768, 'Did not get expected metadata.' ds = None gdaltest.tiff_drv.Delete('tmp/tw_35.tif') ############################################################################### # Generic functions for the 8 following tests def tiff_write_big_odd_bits(vrtfilename, tmpfilename, nbits, interleaving): ds_in = gdal.Open(vrtfilename) ds = gdaltest.tiff_drv.CreateCopy(tmpfilename, ds_in, options=['NBITS=' + str(nbits), 'INTERLEAVE=' + interleaving]) ds_in = None ds = None ds = gdal.Open(tmpfilename) bnd = ds.GetRasterBand(1) cs = bnd.Checksum() assert cs == 4672, 'Didnt get expected checksum on band 1' md = bnd.GetMetadata('IMAGE_STRUCTURE') assert md['NBITS'] == str(nbits), 'Didnt get expected NBITS value' bnd = ds.GetRasterBand(2) assert bnd.Checksum() == 4672, 'Didnt get expected checksum on band 2' bnd = ds.GetRasterBand(3) assert bnd.Checksum() == 4672, 'Didnt get expected checksum on band 3' bnd = None md = ds.GetMetadata('IMAGE_STRUCTURE') assert md['INTERLEAVE'] == interleaving, 'Didnt get expected interleaving' ds = None gdaltest.tiff_drv.Delete(tmpfilename) ############################################################################### # Test copy with NBITS=9, INTERLEAVE=PIXEL def test_tiff_write_36(): return tiff_write_big_odd_bits('data/uint16_3band.vrt', 'tmp/tw_36.tif', 9, 'PIXEL') ############################################################################### # Test copy with NBITS=9, INTERLEAVE=BAND def test_tiff_write_37(): return tiff_write_big_odd_bits('data/uint16_3band.vrt', 'tmp/tw_37.tif', 9, 'BAND') ############################################################################### # Test copy with NBITS=12, INTERLEAVE=PIXEL def test_tiff_write_38(): return tiff_write_big_odd_bits('data/uint16_3band.vrt', 'tmp/tw_38.tif', 12, 'PIXEL') ############################################################################### # Test copy with NBITS=12, INTERLEAVE=BAND def test_tiff_write_39(): return tiff_write_big_odd_bits('data/uint16_3band.vrt', 'tmp/tw_39.tif', 12, 'BAND') ############################################################################### # Test copy with NBITS=17, INTERLEAVE=PIXEL def test_tiff_write_40(): return tiff_write_big_odd_bits('data/uint32_3band.vrt', 'tmp/tw_40tif', 17, 'PIXEL') ############################################################################### # Test copy with NBITS=17, INTERLEAVE=BAND def test_tiff_write_41(): return tiff_write_big_odd_bits('data/uint32_3band.vrt', 'tmp/tw_41.tif', 17, 'BAND') ############################################################################### # Test copy with NBITS=24, INTERLEAVE=PIXEL def test_tiff_write_42(): return tiff_write_big_odd_bits('data/uint32_3band.vrt', 'tmp/tw_42.tif', 24, 'PIXEL') ############################################################################### # Test copy with NBITS=24, INTERLEAVE=BAND def test_tiff_write_43(): return tiff_write_big_odd_bits('data/uint32_3band.vrt', 'tmp/tw_43.tif', 24, 'BAND') ############################################################################### # Test create with NBITS=9 and preservation through CreateCopy of NBITS def test_tiff_write_44(): ds = gdaltest.tiff_drv.Create('tmp/tw_44.tif', 1, 1, 1, gdal.GDT_UInt16, options=['NBITS=9']) ds = None ds = gdal.Open('tmp/tw_44.tif') bnd = ds.GetRasterBand(1) md = bnd.GetMetadata('IMAGE_STRUCTURE') bnd = None assert md['NBITS'] == '9', 'Didnt get expected NBITS value' ds2 = gdaltest.tiff_drv.CreateCopy('tmp/tw_44_copy.tif', ds) ds2 = None ds2 = gdal.Open('tmp/tw_44_copy.tif') bnd = ds2.GetRasterBand(1) md = bnd.GetMetadata('IMAGE_STRUCTURE') bnd = None assert md['NBITS'] == '9', 'Didnt get expected NBITS value' ds = None ds2 = None gdaltest.tiff_drv.Delete('tmp/tw_44.tif') gdaltest.tiff_drv.Delete('tmp/tw_44_copy.tif') ############################################################################### # Test create with NBITS=17 and preservation through CreateCopy of NBITS def test_tiff_write_45(): ds = gdaltest.tiff_drv.Create('tmp/tw_45.tif', 1, 1, 1, gdal.GDT_UInt32, options=['NBITS=17']) ds = None ds = gdal.Open('tmp/tw_45.tif') bnd = ds.GetRasterBand(1) md = bnd.GetMetadata('IMAGE_STRUCTURE') bnd = None assert md['NBITS'] == '17', 'Didnt get expected NBITS value' ds2 = gdaltest.tiff_drv.CreateCopy('tmp/tw_45_copy.tif', ds) ds2 = None ds2 = gdal.Open('tmp/tw_45_copy.tif') bnd = ds2.GetRasterBand(1) md = bnd.GetMetadata('IMAGE_STRUCTURE') bnd = None assert md['NBITS'] == '17', 'Didnt get expected NBITS value' ds = None ds2 = None gdaltest.tiff_drv.Delete('tmp/tw_45.tif') gdaltest.tiff_drv.Delete('tmp/tw_45_copy.tif') ############################################################################### # Test correct round-tripping of ReadBlock/WriteBlock def test_tiff_write_46(): with gdaltest.SetCacheMax(0): ds = gdaltest.tiff_drv.Create("tmp/tiff_write_46_1.tif", 10, 10, 1, options=['NBITS=1']) ds.GetRasterBand(1).Fill(0) ds2 = gdaltest.tiff_drv.Create("tmp/tiff_write_46_2.tif", 10, 10, 1, options=['NBITS=1']) ds2.GetRasterBand(1).Fill(1) ones = ds2.ReadRaster(0, 0, 10, 1) # Load the working block data = ds.ReadRaster(0, 0, 10, 1) # Write the working bloc ds.WriteRaster(0, 0, 10, 1, ones) # This will discard the cached block for ds ds3 = gdaltest.tiff_drv.Create("tmp/tiff_write_46_3.tif", 10, 10, 1) ds3.GetRasterBand(1).Fill(1) # Load the working block again data = ds.ReadRaster(0, 0, 10, 1) # We expect (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) got = struct.unpack('B' * 10, data) for g in got: assert g == 1, got ds = None ds2 = None ds3 = None gdaltest.tiff_drv.Delete('tmp/tiff_write_46_1.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_46_2.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_46_3.tif') ############################################################################### # Test #2457 def test_tiff_write_47(): with gdaltest.SetCacheMax(0): ret = test_tiff_write_3() return ret ############################################################################### # Test #2457 with nYOff of RasterIO not aligned on the block height def test_tiff_write_48(): with gdaltest.SetCacheMax(0): src_ds = gdal.Open('data/utmsmall.tif') new_ds = gdal.GetDriverByName("GTiff").Create('tmp/tiff_write_48.tif', 100, 100, 1, options=['TILED=YES', 'BLOCKXSIZE=96', 'BLOCKYSIZE=96']) data = src_ds.ReadRaster(0, 0, 100, 1) data2 = src_ds.ReadRaster(0, 1, 100, 99) new_ds.WriteRaster(0, 1, 100, 99, data2) new_ds.WriteRaster(0, 0, 100, 1, data) new_ds = None new_ds = None new_ds = gdal.Open('tmp/tiff_write_48.tif') assert new_ds.GetRasterBand(1).Checksum() == 50054, 'Didnt get expected checksum ' new_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_48.tif') ############################################################################### # Test copying a CMYK TIFF into another CMYK TIFF def test_tiff_write_49(): # We open the source as RAW to get the CMYK bands src_ds = gdal.Open('GTIFF_RAW:data/rgbsmall_cmyk.tif') new_ds = gdal.GetDriverByName("GTiff").CreateCopy('tmp/tiff_write_49.tif', src_ds, options=['PHOTOMETRIC=CMYK']) # At this point, for the purpose of the copy, the dataset will have been opened as RAW assert new_ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_CyanBand, \ 'Wrong color interpretation.' new_ds = None new_ds = gdal.Open('GTIFF_RAW:tmp/tiff_write_49.tif') for i in range(4): assert new_ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum(), \ 'Didnt get expected checksum ' src_ds = None new_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_49.tif') ############################################################################### # Test creating a CMYK TIFF from another CMYK TIFF def test_tiff_write_50(): # We open the source as RAW to get the CMYK bands src_ds = gdal.Open('GTIFF_RAW:data/rgbsmall_cmyk.tif') new_ds = gdal.GetDriverByName("GTiff").Create('tmp/tiff_write_50.tif', src_ds.RasterXSize, src_ds.RasterYSize, 4, options=['PHOTOMETRIC=CMYK']) for i in range(4): data = src_ds.GetRasterBand(i + 1).ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize) new_ds.GetRasterBand(i + 1).WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, data) assert new_ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_CyanBand, \ 'Wrong color interpretation.' new_ds = None new_ds = gdal.Open('GTIFF_RAW:tmp/tiff_write_50.tif') for i in range(4): assert new_ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum(), \ 'Didnt get expected checksum ' src_ds = None new_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_50.tif') ############################################################################### # Test proper clearing of existing GeoTIFF tags when updating the projection. # http://trac.osgeo.org/gdal/ticket/2546 def test_tiff_write_51(): shutil.copyfile('data/utmsmall.tif', 'tmp/tiff_write_51.tif') ds = gdal.Open('tmp/tiff_write_51.tif', gdal.GA_Update) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:32601') ds.SetProjection(srs.ExportToWkt()) ds = None ds = gdal.Open('tmp/tiff_write_51.tif') wkt = ds.GetProjection() ds = None # Create a new GeoTIFF file with same projection ds = gdaltest.tiff_drv.Create('tmp/tiff_write_51_ref.tif', 1, 1, 1) ds.SetProjection(srs.ExportToWkt()) ds = None # Read it back as the reference WKT ds = gdal.Open('tmp/tiff_write_51_ref.tif') expected_wkt = ds.GetProjection() ds = None assert wkt.find('NAD') == -1 and wkt.find('North Am') == -1, \ 'It appears the NAD27 datum was not properly cleared.' assert wkt == expected_wkt and wkt.find('WGS 84 / UTM zone 1N') != -1, \ 'coordinate system does not exactly match.' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_51.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_51_ref.tif') ############################################################################### # Test the ability to update a paletted TIFF files color table. def test_tiff_write_52(): shutil.copyfile('data/test_average_palette.tif', 'tmp/tiff_write_52.tif') test_ct_data = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 255, 0)] test_ct = gdal.ColorTable() for i, data in enumerate(test_ct_data): test_ct.SetColorEntry(i, data) ds = gdal.Open('tmp/tiff_write_52.tif', gdal.GA_Update) ds.GetRasterBand(1).SetRasterColorTable(test_ct) ds = None ds = gdal.Open('tmp/tiff_write_52.tif') ct = ds.GetRasterBand(1).GetRasterColorTable() assert ct.GetColorEntry(0) == (255, 0, 0, 255), 'Did not get expected color 0.' ct = None ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_52.tif') ############################################################################### # Test the ability to create a paletted image and then update later. def test_tiff_write_53(): test_ct_data = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 255, 0)] test_ct = gdal.ColorTable() for i, data in enumerate(test_ct_data): test_ct.SetColorEntry(i, data) ds = gdaltest.tiff_drv.Create('tmp/tiff_write_53.tif', 30, 50, 1, options=['PHOTOMETRIC=PALETTE']) ds.GetRasterBand(1).Fill(10) ds = None ds = gdal.Open('tmp/tiff_write_53.tif', gdal.GA_Update) ds.GetRasterBand(1).SetRasterColorTable(test_ct) ds = None ds = gdal.Open('tmp/tiff_write_53.tif') ct = ds.GetRasterBand(1).GetRasterColorTable() assert ct.GetColorEntry(0) == (255, 0, 0, 255), 'Did not get expected color 0.' ct = None ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_53.tif') ############################################################################### # Same as before except we create an overview before reopening the file and # adding the color table def test_tiff_write_53_bis(): test_ct_data = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 255, 0)] test_ct = gdal.ColorTable() for i, data in enumerate(test_ct_data): test_ct.SetColorEntry(i, data) ds = gdaltest.tiff_drv.Create('tmp/tiff_write_53_bis.tif', 30, 50, 1, options=['PHOTOMETRIC=PALETTE']) ds.GetRasterBand(1).Fill(10) ds.BuildOverviews('NONE', overviewlist=[2]) ds = None ds = gdal.Open('tmp/tiff_write_53_bis.tif', gdal.GA_Update) ds.GetRasterBand(1).SetRasterColorTable(test_ct) ds = None ds = gdal.Open('tmp/tiff_write_53_bis.tif') ct = ds.GetRasterBand(1).GetRasterColorTable() assert ct.GetColorEntry(0) == (255, 0, 0, 255), 'Did not get expected color 0.' ct = None ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_53_bis.tif') ############################################################################### # Test the ability to create a JPEG compressed TIFF, with PHOTOMETRIC=YCBCR # and write data into it without closing it and re-opening it (#2645) def test_tiff_write_54(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/tiff_write_54.tif', 256, 256, 3, options=['TILED=YES', 'COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR']) ds.GetRasterBand(1).Fill(255) ds.FlushCache() ds = None ds = gdal.Open('tmp/tiff_write_54.tif') cs = ds.GetRasterBand(1).Checksum() ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_54.tif') assert cs != 0, 'did not get expected checksum' ############################################################################### # Test creating and reading an equirectangular file with all parameters (#2706) def test_tiff_write_55(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_55.tif', 256, 256, 1) srs_expected = 'PROJCS["Equirectangular Mars",GEOGCS["GCS_Mars",DATUM["unknown",SPHEROID["unnamed",3394813.85797594,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",-2],PARAMETER["central_meridian",184.412994384766],PARAMETER["standard_parallel_1",-15],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' ds.SetProjection(srs_expected) ds.SetGeoTransform((100, 1, 0, 200, 0, -1)) ds = None ds = gdal.Open('tmp/tiff_write_55.tif') srs = ds.GetProjectionRef() ds = None assert srs == srs_expected, \ 'failed to preserve Equirectangular projection as expected, old libgeotiff?' gdaltest.tiff_drv.Delete('tmp/tiff_write_55.tif') ############################################################################### # Test clearing the colormap from an existing paletted TIFF file. def test_tiff_write_56(): test_ct_data = [(255, 0, 0), (0, 255, 0), (0, 0, 255), (255, 255, 255, 0)] test_ct = gdal.ColorTable() for i, data in enumerate(test_ct_data): test_ct.SetColorEntry(i, data) ds = gdaltest.tiff_drv.Create('tmp/tiff_write_56.tif', 30, 50, 1, options=['PHOTOMETRIC=PALETTE']) ds.GetRasterBand(1).Fill(10) ds = None test_ct = gdal.ColorTable() ds = gdal.Open('tmp/tiff_write_56.tif', gdal.GA_Update) ds.GetRasterBand(1).SetRasterColorTable(test_ct) ds = None ds = gdal.Open('tmp/tiff_write_56.tif') ct = ds.GetRasterBand(1).GetRasterColorTable() assert ct is None, 'color table seemingly not cleared.' ct = None ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_56.tif') ############################################################################### # Test replacing normal norm up georef with rotated georef (#2625) def test_tiff_write_57(): # copy a file to tmp dir to modify. open('tmp/tiff57.tif', 'wb').write(open('data/byte.tif', 'rb').read()) # open and set a non-northup geotransform. ds = gdal.Open('tmp/tiff57.tif', gdal.GA_Update) ds.SetGeoTransform([100, 1, 3, 200, 3, 1]) ds = None ds = gdal.Open('tmp/tiff57.tif') gt = ds.GetGeoTransform() ds = None assert gt == (100, 1, 3, 200, 3, 1), \ 'did not get expected geotransform, perhaps unset is not working?' gdaltest.tiff_drv.Delete('tmp/tiff57.tif') ############################################################################### # Test writing partial end strips (#2748) def test_tiff_write_58(): md = gdaltest.tiff_drv.GetMetadata() for compression in ('NONE', 'JPEG', 'LZW', 'DEFLATE', 'PACKBITS'): if md['DMD_CREATIONOPTIONLIST'].find(compression) != -1: ds = gdaltest.tiff_drv.Create('tmp/tiff_write_58.tif', 4, 4000, 1, options=['COMPRESS=' + compression]) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.Open('tmp/tiff_write_58.tif') assert ds.GetRasterBand(1).Checksum() == 65241, 'wrong checksum' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_58.tif') else: print(('Skipping compression method %s' % compression)) ############################################################################### # Test fix for #2759 def test_tiff_write_59(): ret = 'success' for nbands in (1, 2): for nbits in (1, 8, 9, 12, 16, 17, 24, 32): if nbits <= 8: gdal_type = gdal.GDT_Byte ctype = 'B' elif nbits <= 16: gdal_type = gdal.GDT_UInt16 ctype = 'h' else: gdal_type = gdal.GDT_UInt32 ctype = 'i' ds = gdaltest.tiff_drv.Create("tmp/tiff_write_59.tif", 10, 10, nbands, gdal_type, options=['NBITS=%d' % nbits]) ds.GetRasterBand(1).Fill(1) ds = None ds = gdal.Open("tmp/tiff_write_59.tif", gdal.GA_Update) data = struct.pack(ctype * 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) ds.GetRasterBand(1).WriteRaster(0, 0, 10, 1, data) ds = None ds = gdal.Open("tmp/tiff_write_59.tif") data = ds.GetRasterBand(1).ReadRaster(0, 0, 10, 1) # We expect zeros got = struct.unpack(ctype * 10, data) for g in got: if g != 0: print(('nbands=%d, NBITS=%d' % (nbands, nbits))) print(got) ret = 'fail' break ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_59.tif') return ret ############################################################################### # Test fix for #2760 def test_tiff_write_60(): tuples = [('TFW=YES', 'tmp/tiff_write_60.tfw'), ('WORLDFILE=YES', 'tmp/tiff_write_60.wld')] for options_tuple in tuples: # Create case with gdaltest.error_handler(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_60.tif', 10, 10, options=[options_tuple[0], 'PROFILE=BASELINE']) gt = (0.0, 1.0, 0.0, 50.0, 0.0, -1.0) ds.SetGeoTransform(gt) ds = None with gdaltest.error_handler(): ds = gdal.Open('tmp/tiff_write_60.tif') assert ds.GetGeoTransform() == gt, ('case1: %s != %s' % (ds.GetGeoTransform(), gt)) ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_60.tif') assert not os.path.exists(options_tuple[1]) # CreateCopy case src_ds = gdal.Open('data/byte.tif') with gdaltest.error_handler(): ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_60.tif', src_ds, options=[options_tuple[0], 'PROFILE=BASELINE']) gt = (0.0, 1.0, 0.0, 50.0, 0.0, -1.0) ds.SetGeoTransform(gt) ds = None gdal.Unlink('tmp/tiff_write_60.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_60.tif') assert ds.GetGeoTransform() == gt, \ ('case2: %s != %s' % (ds.GetGeoTransform(), gt)) ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_60.tif') assert not os.path.exists(options_tuple[1]) ############################################################################### # Test BigTIFF=IF_NEEDED creation option def test_tiff_write_61(): ds = gdaltest.tiff_drv.Create('tmp/bigtiff.tif', 50000, 50000, 1, options=['BIGTIFF=IF_NEEDED', 'SPARSE_OK=TRUE']) ds = None ds = gdal.Open('tmp/bigtiff.tif') assert ds is not None ds = None fileobj = open('tmp/bigtiff.tif', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() gdaltest.tiff_drv.Delete('tmp/bigtiff.tif') # Check classical TIFF signature assert (not ((binvalues[2] != 0x2A or binvalues[3] != 0) and (binvalues[3] != 0x2A or binvalues[2] != 0))) ############################################################################### # Test BigTIFF=IF_SAFER creation option def test_tiff_write_62(): ds = gdaltest.tiff_drv.Create('tmp/bigtiff.tif', 50000, 50000, 1, options=['BIGTIFF=IF_SAFER', 'SPARSE_OK=TRUE']) ds = None ds = gdal.Open('tmp/bigtiff.tif') assert ds is not None ds = None fileobj = open('tmp/bigtiff.tif', mode='rb') binvalues = array.array('b') binvalues.fromfile(fileobj, 4) fileobj.close() gdaltest.tiff_drv.Delete('tmp/bigtiff.tif') # Check BigTIFF signature assert (not ((binvalues[2] != 0x2B or binvalues[3] != 0) and (binvalues[3] != 0x2B or binvalues[2] != 0))) ############################################################################### # Test BigTIFF=NO creation option when creating a BigTIFF file would be required def test_tiff_write_63(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdaltest.tiff_drv.Create('tmp/bigtiff.tif', 150000, 150000, 1, options=['BIGTIFF=NO']) gdal.PopErrorHandler() if ds is None: return pytest.fail() ############################################################################### # Test returned projection in WKT format for a WGS84 GeoTIFF (#2787) def test_tiff_write_64(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_64.tif', 1, 1, 1) srs = osr.SpatialReference() srs.SetFromUserInput('WGS84') ds.SetProjection(srs.ExportToWkt()) ds = None ds = gdal.Open('tmp/tiff_write_64.tif') wkt = ds.GetProjection() ds = None expected_wkt = """GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]""" assert wkt == expected_wkt, 'coordinate system does not exactly match.' gdaltest.tiff_drv.Delete('tmp/tiff_write_64.tif') ############################################################################### # Verify that we can write XML metadata. def test_tiff_write_65(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_65.tif', 10, 10) doc = '<doc><test xml:attr="abc"/></doc>' ds.SetMetadata([doc], 'xml:test') ds = None ds = gdal.Open('tmp/tiff_write_65.tif') md = ds.GetMetadata('xml:test') ds = None assert len(md) == 1 and md[0] == doc, 'did not get xml back clean' gdaltest.tiff_drv.Delete('tmp/tiff_write_65.tif') ############################################################################### # Verify that we can write and read a band-interleaved GeoTIFF with 65535 bands (#2838) def test_tiff_write_66(): if gdal.GetConfigOption('SKIP_MEM_INTENSIVE_TEST') is not None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/tiff_write_66.tif', 1, 1, 65535, options=['INTERLEAVE=BAND']) ds = None ds = gdal.Open('tmp/tiff_write_66.tif') assert ds.RasterCount == 65535 assert ds.GetRasterBand(1).Checksum() == 0 assert ds.GetRasterBand(65535).Checksum() == 0 ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_66.tif') ############################################################################### # Verify that we can write and read a pixel-interleaved GeoTIFF with 65535 bands (#2838) def test_tiff_write_67(): if gdal.GetConfigOption('SKIP_MEM_INTENSIVE_TEST') is not None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/tiff_write_67.tif', 1, 1, 65535, options=['INTERLEAVE=PIXEL']) ds = None ds = gdal.Open('tmp/tiff_write_67.tif') assert ds.RasterCount == 65535 assert ds.GetRasterBand(1).Checksum() == 0 assert ds.GetRasterBand(65535).Checksum() == 0 ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_67.tif') ############################################################################### # Verify that we can set the color table after a Create() (scenario hit by map.tif in #2820) def test_tiff_write_68(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_68.tif', 151, 161, options=['COMPRESS=LZW']) ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 255, 255, 255)) ct.SetColorEntry(1, (255, 255, 0, 255)) ct.SetColorEntry(2, (255, 0, 255, 255)) ct.SetColorEntry(3, (0, 255, 255, 255)) ds.GetRasterBand(1).SetRasterColorTable(ct) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.Open('tmp/tiff_write_68.tif') assert ds.GetRasterBand(1).Checksum() != 0 ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_68.tif') ############################################################################### # Verify GTiffRasterBand::NullBlock() when reading empty block without any nodata value set def test_tiff_write_69(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_69.tif', 32, 32, 1, gdal.GDT_Int16, options=['SPARSE_OK=YES']) ds = None ds = gdal.Open('tmp/tiff_write_69.tif') assert ds.GetRasterBand(1).Checksum() == 0 ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_69.tif') ############################################################################### # Verify GTiffRasterBand::NullBlock() when reading empty block with nodata value set def test_tiff_write_70(): ref_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_70_ref.tif', 32, 32, 1, gdal.GDT_Int16) ref_ds.GetRasterBand(1).Fill(-32768) ref_ds = None ref_ds = gdal.Open('tmp/tiff_write_70_ref.tif') expected_cs = ref_ds.GetRasterBand(1).Checksum() ref_ds = None ds = gdaltest.tiff_drv.Create('tmp/tiff_write_70.tif', 32, 32, 1, gdal.GDT_Int16, options=['SPARSE_OK=YES']) ds.GetRasterBand(1).SetNoDataValue(0) assert os.stat('tmp/tiff_write_70.tif').st_size <= 8, \ 'directory should not be crystallized' ds = None ds = gdal.Open('tmp/tiff_write_70.tif', gdal.GA_Update) ds.GetRasterBand(1).SetNoDataValue(-32768) ds = None ds = gdal.Open('tmp/tiff_write_70.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs, 'wrong checksum' ds = None ds = gdal.Open('tmp/tiff_write_70.tif', gdal.GA_Update) assert ds.GetRasterBand(1).DeleteNoDataValue() == 0 assert ds.GetRasterBand(1).GetNoDataValue() is None ds = None with pytest.raises(OSError): os.stat('tmp/tiff_write_70.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_70.tif') assert ds.GetRasterBand(1).GetNoDataValue() is None ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_70.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_70_ref.tif') ############################################################################### # Test reading in a real BigTIFF file (on filesystems supporting sparse files) def test_tiff_write_71(): # Determine if the filesystem supports sparse files (we don't want to create a real 10 GB # file ! if not gdaltest.filesystem_supports_sparse_files('tmp'): pytest.skip() header = open('data/bigtiff_header_extract.tif', 'rb').read() f = open('tmp/tiff_write_71.tif', 'wb') f.write(header) # Write StripByteCounts tag # 100,000 in little endian for _ in range(100000): f.write(b'\xa0\x86\x01\x00\x00\x00\x00\x00') # Write StripOffsets tag offset = 1600252 for _ in range(100000): f.write(struct.pack('<Q', offset)) offset = offset + 100000 # Write 0x78 as value of pixel (99999, 99999) f.seek(10001600252 - 1, 0) f.write(b'\x78') f.close() ds = gdal.Open('tmp/tiff_write_71.tif') data = ds.GetRasterBand(1).ReadRaster(99999, 99999, 1, 1) assert struct.unpack('b', data)[0] == 0x78 ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_71.tif') ############################################################################### # With CreateCopy(), check that TIFF directory is in the first bytes of the file # and has not been rewritten later (#3021) def test_tiff_write_72(): shutil.copyfile('data/byte.tif', 'tmp/byte.tif') ds = gdal.Open('tmp/byte.tif', gdal.GA_Update) ds.SetMetadata({'TEST_KEY': 'TestValue'}) ds = None for profile in ('GDALGeotiff', 'GEOTIFF', 'BASELINE'): src_ds = gdal.Open('tmp/byte.tif') out_ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_72.tif', src_ds, options=['ENDIANNESS=LITTLE', 'PROFILE=' + profile]) del out_ds src_ds = None fileobj = open('tmp/tiff_write_72.tif', mode='rb') binvalues = array.array('b') fileobj.seek(4) try: binvalues.fromfile(fileobj, 4) except: binvalues.fromfile(fileobj, 4) fileobj.close() # Directory should be at offset 8 of the file assert (binvalues[0] == 0x08 and binvalues[1] == 0x00 and binvalues[2] == 0x00 and binvalues[3] == 0x00), \ ('Failed with profile %s' % profile) gdaltest.tiff_drv.Delete('tmp/byte.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_72.tif') ############################################################################### # With Create(), check that TIFF directory is in the first bytes of the file # and has not been rewritten later (#3021) def test_tiff_write_73(): out_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_73.tif', 10, 10, options=['ENDIANNESS=LITTLE']) out_ds.SetGeoTransform([1, 0.01, 0, 1, 0, -0.01]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:32601') out_ds.SetProjection(srs.ExportToWkt()) out_ds.SetMetadata({'TEST_KEY': 'TestValue'}) out_ds.BuildOverviews('NONE', [2]) out_ds.GetRasterBand(1).Fill(255) out_ds = None fileobj = open('tmp/tiff_write_73.tif', mode='rb') binvalues = array.array('b') fileobj.seek(4) try: binvalues.fromfile(fileobj, 4) except: binvalues.fromfile(fileobj, 4) fileobj.close() # Directory should be at offset 8 of the file assert (binvalues[0] == 0x08 and binvalues[1] == 0x00 and binvalues[2] == 0x00 and binvalues[3] == 0x00) # Re-open the file and modify the pixel content out_ds = gdal.Open('tmp/tiff_write_73.tif', gdal.GA_Update) out_ds.GetRasterBand(1).Fill(0) out_ds = None fileobj = open('tmp/tiff_write_73.tif', mode='rb') binvalues = array.array('b') fileobj.seek(4) try: binvalues.fromfile(fileobj, 4) except: binvalues.fromfile(fileobj, 4) fileobj.close() # Directory should be at offset 8 of the file assert (binvalues[0] == 0x08 and binvalues[1] == 0x00 and binvalues[2] == 0x00 and binvalues[3] == 0x00) gdaltest.tiff_drv.Delete('tmp/tiff_write_73.tif') ############################################################################### # Verify we can write 12bit jpeg encoded tiff. def test_tiff_write_74(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() old_accum = gdal.GetConfigOption('CPL_ACCUM_ERROR_MSG', 'OFF') gdal.SetConfigOption('CPL_ACCUM_ERROR_MSG', 'ON') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') try: ds = gdal.Open('data/mandrilmini_12bitjpeg.tif') ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) except: ds = None gdal.PopErrorHandler() gdal.SetConfigOption('CPL_ACCUM_ERROR_MSG', old_accum) if gdal.GetLastErrorMsg().find( 'Unsupported JPEG data precision 12') != -1: sys.stdout.write('(12bit jpeg not available) ... ') pytest.skip() for photometric in ('YCBCR', 'RGB'): drv = gdal.GetDriverByName('GTiff') dst_ds = drv.CreateCopy('tmp/test_74.tif', ds, options=['COMPRESS=JPEG', 'NBITS=12', 'JPEG_QUALITY=95', 'PHOTOMETRIC=' + photometric]) dst_ds = None dst_ds = gdal.Open('tmp/test_74.tif') stats = dst_ds.GetRasterBand(1).GetStatistics(0, 1) if stats[2] < 2150 or stats[2] > 2180: print(photometric) pytest.fail('did not get expected mean for band1.') try: compression = dst_ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') except: md = dst_ds.GetMetadata('IMAGE_STRUCTURE') compression = md['COMPRESSION'] if (photometric == 'YCBCR' and compression != 'YCbCr JPEG') or \ (photometric == 'RGB' and compression != 'JPEG'): print(('COMPRESSION="%s"' % compression)) pytest.fail('did not get expected COMPRESSION value') try: nbits = dst_ds.GetRasterBand(3).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') except: md = dst_ds.GetRasterBand(3).GetMetadata('IMAGE_STRUCTURE') nbits = md['NBITS'] if nbits != '12': print(photometric) pytest.fail('did not get expected NBITS value') dst_ds = None gdaltest.tiff_drv.Delete('tmp/test_74.tif') ############################################################################### # Verify that FlushCache() alone doesn't cause crash (#3067 ) def test_tiff_write_75(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_75.tif', 1, 1, 1) ds.FlushCache() ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_75.tif') ############################################################################### # Test generating a G4 band to use the TIFFWriteScanline() def test_tiff_write_76(): src_ds = gdal.Open('data/slim_g4.tif') compression = src_ds.GetMetadata('IMAGE_STRUCTURE')['COMPRESSION'] new_ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_76.tif', src_ds, options=['BLOCKYSIZE=%d' % src_ds.RasterYSize, 'COMPRESS=' + compression]) new_ds = None new_ds = gdal.Open('tmp/tiff_write_76.tif') cs = new_ds.GetRasterBand(1).Checksum() assert cs == 3322, 'Got wrong checksum' src_ds = None new_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_76.tif') ############################################################################### # Test generating & reading a 8bit all-in-one-strip multiband TIFF (#3904) def test_tiff_write_77(): src_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_77_src.tif', 1, 5000, 3) src_ds.GetRasterBand(2).Fill(255) for interleaving in ('PIXEL', 'BAND'): new_ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_77.tif', src_ds, options=['BLOCKYSIZE=%d' % src_ds.RasterYSize, 'COMPRESS=LZW', 'INTERLEAVE=' + interleaving]) for attempt in range(2): # Test reading a few samples to check that random reading works band_lines = [(1, 0), (1, 5), (1, 3), (2, 10), (1, 100), (2, 1000), (2, 500), (1, 500), (2, 500), (2, 4999), (2, 4999), (3, 4999), (1, 4999)] for band_line in band_lines: cs = new_ds.GetRasterBand(band_line[0]).Checksum(0, band_line[1], 1, 1) if band_line[0] == 2: expected_cs = 255 % 7 else: expected_cs = 0 % 7 assert cs == expected_cs, 'Got wrong checksum' # Test whole bands for i in range(3): cs = new_ds.GetRasterBand(i + 1).Checksum() expected_cs = src_ds.GetRasterBand(i + 1).Checksum() assert cs == expected_cs, 'Got wrong checksum' if attempt == 0: new_ds = None new_ds = gdal.Open('tmp/tiff_write_77.tif') new_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_77.tif') src_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_77_src.tif') ############################################################################### # Test generating & reading a YCbCr JPEG all-in-one-strip multiband TIFF (#3259) def test_tiff_write_78(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_78_src.tif', 16, 2048, 3) src_ds.GetRasterBand(2).Fill(255) new_ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_78.tif', src_ds, options=['BLOCKYSIZE=%d' % src_ds.RasterYSize, 'COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR']) # Make sure the file is flushed so that we re-read from it rather from cached blocks new_ds.FlushCache() # new_ds = None # new_ds = gdal.Open('tmp/tiff_write_78.tif') if 'GetBlockSize' in dir(gdal.Band): (_, blocky) = new_ds.GetRasterBand(1).GetBlockSize() if blocky != 1: print('') print('using regular band (libtiff <= 3.9.2 or <= 4.0.0beta5, or SplitBand disabled by config option)') # Test reading a few samples to check that random reading works band_lines = [(1, 0), (1, 5), (1, 3), (2, 10), (1, 100), (2, 1000), (2, 500), (1, 500), (2, 500), (2, 2047), (2, 2047), (3, 2047), (1, 2047)] for band_line in band_lines: cs = new_ds.GetRasterBand(band_line[0]).Checksum(0, band_line[1], 1, 1) if band_line[0] == 1: expected_cs = 0 % 7 elif band_line[0] == 2: expected_cs = 255 % 7 else: # We should expect 0, but due to JPEG YCbCr compression & decompression, # this ends up being 1 expected_cs = 1 % 7 if cs != expected_cs: print(band_line) pytest.fail('Got wrong checksum') # Test whole bands for i in range(3): cs = new_ds.GetRasterBand(i + 1).Checksum() expected_cs = src_ds.GetRasterBand(i + 1).Checksum() if i == 2: # We should expect 0, but due to JPEG YCbCr compression & decompression, # this ends up being 32768 expected_cs = 32768 assert cs == expected_cs, 'Got wrong checksum' new_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_78.tif') src_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_78_src.tif') ############################################################################### # Test reading & updating GDALMD_AREA_OR_POINT (#3522) def test_tiff_write_79(): ds = gdaltest.tiff_drv.Create('tmp/tiff_write_79.tif', 1, 1) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:32601') ds.SetProjection(srs.ExportToWkt()) ds = None for do_projection_ref in [False, True]: for check_just_after in [False, True]: ds = gdal.Open('tmp/tiff_write_79.tif') if do_projection_ref: ds.GetProjectionRef() mdi = ds.GetMetadataItem('AREA_OR_POINT') assert mdi == 'Area', \ ('(1) did not get expected value. do_projection_ref = %d, check_just_after = %d' % (do_projection_ref, check_just_after)) ds = None # Still read-only. ds = gdal.Open('tmp/tiff_write_79.tif') if do_projection_ref: ds.GetProjectionRef() ds.SetMetadataItem('AREA_OR_POINT', 'Point') ds = None assert not os.path.exists('tmp/tiff_write_79.tif.aux.xml') # So should get 'Area' ds = gdal.Open('tmp/tiff_write_79.tif') if do_projection_ref: ds.GetProjectionRef() mdi = ds.GetMetadataItem('AREA_OR_POINT') assert mdi == 'Area', \ ('(2) did not get expected value. do_projection_ref = %d, check_just_after = %d' % (do_projection_ref, check_just_after)) ds = None # Now update to 'Point' ds = gdal.Open('tmp/tiff_write_79.tif', gdal.GA_Update) if do_projection_ref: ds.GetProjectionRef() ds.SetMetadataItem('AREA_OR_POINT', 'Point') if check_just_after: mdi = ds.GetMetadataItem('AREA_OR_POINT') assert mdi == 'Point', \ ('(3) did not get expected value. do_projection_ref = %d, check_just_after = %d' % (do_projection_ref, check_just_after)) ds = None assert not os.path.exists('tmp/tiff_write_79.tif.aux.xml') # Now should get 'Point' ds = gdal.Open('tmp/tiff_write_79.tif') if do_projection_ref: ds.GetProjectionRef() mdi = ds.GetMetadataItem('AREA_OR_POINT') assert mdi == 'Point', \ ('(4) did not get expected value. do_projection_ref = %d, check_just_after = %d' % (do_projection_ref, check_just_after)) ds = None # Now update back to 'Area' through SetMetadata() ds = gdal.Open('tmp/tiff_write_79.tif', gdal.GA_Update) if do_projection_ref: ds.GetProjectionRef() md = {} md['AREA_OR_POINT'] = 'Area' ds.SetMetadata(md) if check_just_after: mdi = ds.GetMetadataItem('AREA_OR_POINT') assert mdi == 'Area', \ ('(5) did not get expected value. do_projection_ref = %d, check_just_after = %d' % (do_projection_ref, check_just_after)) ds = None # Now should get 'Area' ds = gdal.Open('tmp/tiff_write_79.tif') if do_projection_ref: ds.GetProjectionRef() mdi = ds.GetMetadataItem('AREA_OR_POINT') assert mdi == 'Area', '(6) did not get expected value' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_79.tif') ############################################################################### # Test SetOffset() & SetScale() def test_tiff_write_80(): # First part : test storing and retrieving scale & offsets from internal metadata ds = gdaltest.tiff_drv.Create('tmp/tiff_write_80.tif', 1, 1) ds.GetRasterBand(1).SetScale(100) ds.GetRasterBand(1).SetOffset(1000) ds = None assert not os.path.exists('tmp/tiff_write_80.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_80.tif') scale = ds.GetRasterBand(1).GetScale() offset = ds.GetRasterBand(1).GetOffset() assert scale == 100 and offset == 1000, \ 'did not get expected values in internal case (1)' ds = None # Test CreateCopy() src_ds = gdal.Open('tmp/tiff_write_80.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_80_copy.tif', src_ds) src_ds = None ds = None ds = gdal.Open('tmp/tiff_write_80_copy.tif') scale = ds.GetRasterBand(1).GetScale() offset = ds.GetRasterBand(1).GetOffset() assert scale == 100 and offset == 1000, 'did not get expected values in copy' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_80_copy.tif') # Second part : test unsetting scale & offsets from internal metadata ds = gdal.Open('tmp/tiff_write_80.tif', gdal.GA_Update) ds.GetRasterBand(1).SetScale(1) ds.GetRasterBand(1).SetOffset(0) ds = None ds = gdal.Open('tmp/tiff_write_80.tif') scale = ds.GetRasterBand(1).GetScale() offset = ds.GetRasterBand(1).GetOffset() assert not scale assert not offset ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_80.tif') # Third part : test storing and retrieving scale & offsets from PAM metadata ds = gdaltest.tiff_drv.Create('tmp/tiff_write_80_bis.tif', 1, 1) assert ds.GetRasterBand(1).GetScale() is None and ds.GetRasterBand(1).GetOffset() is None, \ 'expected None values' ds = None ds = gdal.Open('tmp/tiff_write_80_bis.tif') ds.GetRasterBand(1).SetScale(-100) ds.GetRasterBand(1).SetOffset(-1000) ds = None try: # check that it *goes* to PAM os.stat('tmp/tiff_write_80_bis.tif.aux.xml') except OSError: pytest.fail('did not go to PAM as expected') ds = gdal.Open('tmp/tiff_write_80_bis.tif') scale = ds.GetRasterBand(1).GetScale() offset = ds.GetRasterBand(1).GetOffset() assert scale == -100 and offset == -1000, \ 'did not get expected values in PAM case (1)' ds = None # Fourth part : test unsetting scale & offsets from PAM metadata ds = gdal.Open('tmp/tiff_write_80_bis.tif') ds.GetRasterBand(1).SetScale(1) ds.GetRasterBand(1).SetOffset(0) ds = None assert not os.path.exists('tmp/tiff_write_80_bis.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_80_bis.tif') scale = ds.GetRasterBand(1).GetScale() offset = ds.GetRasterBand(1).GetOffset() assert not scale assert not offset ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_80_bis.tif') ############################################################################### # Test retrieving GCP from PAM def test_tiff_write_81(): shutil.copyfile('data/byte.tif', 'tmp/tiff_write_81.tif') f = open('tmp/tiff_write_81.tif.aux.xml', 'wt') f.write(""" <PAMDataset> <GCPList Projection="PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]]"> <GCP Id="" Pixel="0.0000" Line="0.0000" X="4.407200000000E+05" Y="3.751320000000E+06"/> <GCP Id="" Pixel="100.0000" Line="0.0000" X="4.467200000000E+05" Y="3.751320000000E+06"/> <GCP Id="" Pixel="0.0000" Line="100.0000" X="4.407200000000E+05" Y="3.745320000000E+06"/> <GCP Id="" Pixel="100.0000" Line="100.0000" X="4.467200000000E+05" Y="3.745320000000E+06"/> </GCPList> </PAMDataset>""") f.close() ds = gdal.Open('tmp/tiff_write_81.tif') assert (ds.GetGCPProjection().find( 'AUTHORITY["EPSG","26711"]') != -1), 'GCP Projection not set properly.' gcps = ds.GetGCPs() assert len(gcps) == 4, 'GCP count wrong.' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_81.tif') ############################################################################### # Test writing & reading a signedbyte 8 bit geotiff def test_tiff_write_82(): src_ds = gdal.Open('data/byte.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_82.tif', src_ds, options=['PIXELTYPE=SIGNEDBYTE']) src_ds = None ds = None ds = gdal.Open('tmp/tiff_write_82.tif') md = ds.GetRasterBand(1).GetMetadata('IMAGE_STRUCTURE') assert md['PIXELTYPE'] == 'SIGNEDBYTE', 'did not get SIGNEDBYTE' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_82.tif') ############################################################################### # Test writing & reading an indexed GeoTIFF with an extra transparency band (#3547) def test_tiff_write_83(): # Test Create() method ds = gdaltest.tiff_drv.Create('tmp/tiff_write_83.tif', 1, 1, 2) ct = gdal.ColorTable() ct.SetColorEntry(127, (255, 255, 255, 255)) ds.GetRasterBand(1).SetRasterColorTable(ct) ds.GetRasterBand(1).Fill(127) ds.GetRasterBand(2).Fill(255) ds = None # Test CreateCopy() method src_ds = gdal.Open('tmp/tiff_write_83.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_83_2.tif', src_ds) src_ds = None ds = None ds = gdal.Open('tmp/tiff_write_83_2.tif') ct2 = ds.GetRasterBand(1).GetRasterColorTable() assert ct2.GetColorEntry(127) == (255, 255, 255, 255), \ 'did not get expected color table' ct2 = None cs1 = ds.GetRasterBand(1).Checksum() assert cs1 == 127 % 7, 'did not get expected checksum for band 1' cs2 = ds.GetRasterBand(2).Checksum() assert cs2 == 255 % 7, 'did not get expected checksum for band 2' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_83.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_83_2.tif') ############################################################################### # Test propagation of non-standard JPEG quality when the current directory # changes in the midst of encoding of tiles (#3539) def test_tiff_write_84(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() with gdaltest.SetCacheMax(0): ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_84.tif', 128, 128, 3) ds = None try: os.remove('tmp/tiff_write_84.tif.ovr') except OSError: pass ds = gdal.Open('tmp/tiff_write_84.tif') gdal.SetConfigOption('COMPRESS_OVERVIEW', 'JPEG') gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', '90') ds.BuildOverviews('NEAREST', overviewlist=[2]) cs = ds.GetRasterBand(2).GetOverview(0).Checksum() ds = None gdal.SetConfigOption('COMPRESS_OVERVIEW', None) gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', None) gdaltest.tiff_drv.Delete('tmp/tiff_write_84.tif') assert cs == 0, 'did not get expected checksum' ############################################################################### # Test SetUnitType() def test_tiff_write_85(): # First part : test storing and retrieving unittype from internal metadata ds = gdaltest.tiff_drv.Create('tmp/tiff_write_85.tif', 1, 1) ds.GetRasterBand(1).SetUnitType('ft') ds = None assert not os.path.exists('tmp/tiff_write_85.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_85.tif') unittype = ds.GetRasterBand(1).GetUnitType() assert unittype == 'ft', 'did not get expected values in internal case (1)' ds = None # Test CreateCopy() src_ds = gdal.Open('tmp/tiff_write_85.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_85_copy.tif', src_ds) src_ds = None ds = None ds = gdal.Open('tmp/tiff_write_85_copy.tif') unittype = ds.GetRasterBand(1).GetUnitType() assert unittype == 'ft', 'did not get expected values in copy' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_85_copy.tif') # Second part : test unsetting unittype from internal metadata ds = gdal.Open('tmp/tiff_write_85.tif', gdal.GA_Update) ds.GetRasterBand(1).SetUnitType(None) ds = None ds = gdal.Open('tmp/tiff_write_85.tif') unittype = ds.GetRasterBand(1).GetUnitType() assert unittype == '', 'did not get expected values in internal case (2)' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_85.tif') # Third part : test storing and retrieving unittype from PAM metadata ds = gdaltest.tiff_drv.Create('tmp/tiff_write_85_bis.tif', 1, 1) assert not ds.GetRasterBand(1).GetUnitType(), 'expected None values' ds = None ds = gdal.Open('tmp/tiff_write_85_bis.tif') ds.GetRasterBand(1).SetUnitType('ft') ds = None try: # check that it *goes* to PAM os.stat('tmp/tiff_write_85_bis.tif.aux.xml') except OSError: pytest.fail('did not go to PAM as expected') ds = gdal.Open('tmp/tiff_write_85_bis.tif') unittype = ds.GetRasterBand(1).GetUnitType() assert unittype == 'ft', 'did not get expected values in PAM case (1)' ds = None # Fourth part : test unsetting unittype from PAM metadata ds = gdal.Open('tmp/tiff_write_85_bis.tif') ds.GetRasterBand(1).SetUnitType(None) ds = None assert not os.path.exists('tmp/tiff_write_85_bis.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_85_bis.tif') unittype = ds.GetRasterBand(1).GetUnitType() assert unittype == '', 'did not get expected values in PAM case (2)' ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_85_bis.tif') ############################################################################### # Test special handling of xml:ESRI domain. When the ESRI_XML_PAM config # option is set we want to write this to PAM, not into the geotiff itself. # This is a special option so that ArcGIS 10 written geotiffs will still work # properly with earlier versions of ArcGIS, requested by ESRI. def test_tiff_write_86(): gdal.SetConfigOption('ESRI_XML_PAM', 'YES') ds = gdaltest.tiff_drv.Create('tmp/tiff_write_86.tif', 100, 100, 1, gdal.GDT_Byte) ds.SetMetadata(['<abc></abc>'], 'xml:ESRI') ds.SetMetadataItem('BaseTest', 'Value') ds = None # Is the xml:ESRI data available? ds = gdal.Open('tmp/tiff_write_86.tif') assert ds.GetMetadata('xml:ESRI') == ['<abc />\n'], \ 'did not get expected xml:ESRI metadata.' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value('missing metadata(1)') pytest.fail() ds = None # After removing the pam file is it gone, but the conventional # metadata still available? os.rename('tmp/tiff_write_86.tif.aux.xml', 'tmp/tiff_write_86.tif.aux.xml.hidden') ds = gdal.Open('tmp/tiff_write_86.tif') assert ds.GetMetadata('xml:ESRI') is None, 'unexpectedly got xml:ESRI metadata' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value('missing metadata(2)') pytest.fail() ds = None # now confirm that CreateCopy also preserves things similarly. os.rename('tmp/tiff_write_86.tif.aux.xml.hidden', 'tmp/tiff_write_86.tif.aux.xml') ds_src = gdal.Open('tmp/tiff_write_86.tif') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_86_cc.tif', ds_src) ds_src = None ds = None # Is the xml:ESRI data available? ds = gdal.Open('tmp/tiff_write_86_cc.tif') assert ds.GetMetadata('xml:ESRI') == ['<abc />\n'], \ 'did not get expected xml:ESRI metadata (cc).' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value('missing metadata(1cc)') pytest.fail() ds = None # After removing the pam file is it gone, but the conventional # metadata still available? os.remove('tmp/tiff_write_86_cc.tif.aux.xml') ds = gdal.Open('tmp/tiff_write_86_cc.tif') assert ds.GetMetadata('xml:ESRI') is None, 'unexpectedly got xml:ESRI metadata(2)' if ds.GetMetadataItem('BaseTest') != 'Value': gdaltest.post_value('missing metadata(2cc)') pytest.fail() ds = None # Cleanup gdal.SetConfigOption('ESRI_XML_PAM', 'NO') gdaltest.tiff_drv.Delete('tmp/tiff_write_86.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_86_cc.tif') ############################################################################### # Test COPY_SRC_OVERVIEWS creation option def test_tiff_write_87(): gdal.Translate('tmp/tiff_write_87_src.tif', 'data/utmsmall.tif', options='-a_nodata 0') src_ds = gdal.Open('tmp/tiff_write_87_src.tif', gdal.GA_Update) src_ds.BuildOverviews('NEAR', overviewlist=[2, 4]) expected_cs1 = src_ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs2 = src_ds.GetRasterBand(1).GetOverview(1).Checksum() ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_87_dst.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES', 'ENDIANNESS=LITTLE']) ds = None src_ds = None ds = gdal.Open('tmp/tiff_write_87_dst.tif') cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2 = ds.GetRasterBand(1).GetOverview(1).Checksum() nodata_ovr_0 = ds.GetRasterBand(1).GetOverview(0).GetNoDataValue() nodata_ovr_1 = ds.GetRasterBand(1).GetOverview(1).GetNoDataValue() ifd_main = int(ds.GetRasterBand(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) ifd_ovr_0 = int(ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('IFD_OFFSET', 'TIFF')) ifd_ovr_1 = int(ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) data_ovr_1 = int(ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) data_ovr_0 = int(ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) data_main = int(ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) size_main = int(ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_0', 'TIFF')) with open('tmp/tiff_write_87_dst.tif', 'rb') as f: f.seek(data_main - 4) size_from_header = struct.unpack('<I', f.read(4))[0] assert size_main == size_from_header f.seek(data_main + size_main - 4) last_bytes = f.read(4) last_bytes_repeated = f.read(4) assert last_bytes == last_bytes_repeated ds = None _check_cog('tmp/tiff_write_87_dst.tif', check_tiled=False, full_check=True) gdaltest.tiff_drv.Delete('tmp/tiff_write_87_src.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_87_dst.tif') # Check checksums assert cs1 == expected_cs1 and cs2 == expected_cs2, 'did not get expected checksums' assert nodata_ovr_0 == 0 and nodata_ovr_1 == 0, 'did not get expected nodata values' assert ifd_main == 8 or(ifd_main < ifd_ovr_0 and ifd_ovr_0 < ifd_ovr_1 and ifd_ovr_1 < data_ovr_1 and data_ovr_1 < data_ovr_0 and data_ovr_0 < data_main) ############################################################################### # Test that COPY_SRC_OVERVIEWS creation option has an influence # on BIGTIFF creation def test_tiff_write_88(): # The file would be > 4.2 GB without SPARSE_OK src_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_88_src.tif', 60000, 60000, 1, options=['TILED=YES', 'SPARSE_OK=YES']) src_ds.BuildOverviews('NONE', overviewlist=[2, 4]) # Just write one data block so that we can truncate it data = src_ds.GetRasterBand(1).GetOverview(1).ReadRaster(0, 0, 128, 128) src_ds.GetRasterBand(1).GetOverview(1).WriteRaster(0, 0, 128, 128, data) src_ds = None # Truncate the file to cause an I/O error on reading # so that the CreateCopy() aborts quickly f = open('tmp/tiff_write_88_src.tif', 'rb') f.seek(0, 2) length = f.tell() f.seek(0, 0) data = f.read(length - 1) f.close() f = open('tmp/tiff_write_88_src.tif', 'wb') f.write(data) f.close() src_ds = gdal.Open('tmp/tiff_write_88_src.tif') # for testing only. We need to keep the file to check it was a bigtiff gdal.SetConfigOption('GTIFF_DELETE_ON_ERROR', 'NO') gdal.SetConfigOption('CHECK_DISK_FREE_SPACE', 'NO') # we don't want free space to be an issue here gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_88_dst.tif', src_ds, options=['TILED=YES', 'COPY_SRC_OVERVIEWS=YES', 'ENDIANNESS=LITTLE']) gdal.PopErrorHandler() gdal.SetConfigOption('GTIFF_DELETE_ON_ERROR', None) gdal.SetConfigOption('CHECK_DISK_FREE_SPACE', None) del ds src_ds = None f = open('tmp/tiff_write_88_dst.tif', 'rb') data = f.read(8) f.close() os.remove('tmp/tiff_write_88_src.tif') os.remove('tmp/tiff_write_88_dst.tif') ar = struct.unpack('B' * 8, data) assert ar[2] == 43, 'not a BIGTIFF file' assert ar[4] == 8 and ar[5] == 0 and ar[6] == 0 and ar[7] == 0, \ 'first IFD is not at offset 8' ############################################################################### # Test JPEG_QUALITY propagation while creating a (default compressed) mask band def test_tiff_write_89(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() last_size = 0 for quality in [90, 75, 30]: src_ds = gdal.Open('../gdrivers/data/utm.tif') ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_89.tif', 1024, 1024, 3, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEG_QUALITY=%d' % quality]) gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', 'YES') ds.CreateMaskBand(gdal.GMF_PER_DATASET) gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', None) data = src_ds.GetRasterBand(1).ReadRaster(0, 0, 512, 512, 1024, 1024) ds.GetRasterBand(1).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(2).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(3).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(1).GetMaskBand().Fill(255) src_ds = None ds = None # older versions of python don't have SEEK_END, add if missing. try: os.SEEK_END except AttributeError: os.SEEK_END = 2 f = open('tmp/tiff_write_89.tif', 'rb') f.seek(0, os.SEEK_END) size = f.tell() f.close() # print('quality = %d, size = %d' % (quality, size)) if quality != 90: assert size < last_size, 'did not get decreasing file sizes' last_size = size gdaltest.tiff_drv.Delete('tmp/tiff_write_89.tif') ############################################################################### # Test JPEG_QUALITY propagation while creating (internal) overviews def test_tiff_write_90(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() last_size = 0 for quality in [90, 75, 30]: src_ds = gdal.Open('../gdrivers/data/utm.tif') ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_90.tif', 1024, 1024, 3, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEG_QUALITY=%d' % quality]) data = src_ds.GetRasterBand(1).ReadRaster(0, 0, 512, 512, 1024, 1024) ds.GetRasterBand(1).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(2).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(3).WriteRaster(0, 0, 1024, 1024, data) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) src_ds = None ds = None f = open('tmp/tiff_write_90.tif', 'rb') f.seek(0, os.SEEK_END) size = f.tell() f.close() # print('quality = %d, size = %d' % (quality, size)) if quality != 90: assert size < last_size, 'did not get decreasing file sizes' last_size = size gdaltest.tiff_drv.Delete('tmp/tiff_write_90.tif') ############################################################################### # Test JPEG_QUALITY propagation while creating (internal) overviews after re-opening def test_tiff_write_91(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() last_size = 0 for quality in [90, 75, 30]: src_ds = gdal.Open('../gdrivers/data/utm.tif') ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_91.tif', 1024, 1024, 3, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEG_QUALITY=%d' % quality]) data = src_ds.GetRasterBand(1).ReadRaster(0, 0, 512, 512, 1024, 1024) ds.GetRasterBand(1).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(2).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(3).WriteRaster(0, 0, 1024, 1024, data) ds = None ds = gdal.Open('tmp/tiff_write_91.tif', gdal.GA_Update) gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', '%d' % quality) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', None) src_ds = None ds = None f = open('tmp/tiff_write_91.tif', 'rb') f.seek(0, os.SEEK_END) size = f.tell() f.close() # print('quality = %d, size = %d' % (quality, size)) if quality != 90: assert size < last_size, 'did not get decreasing file sizes' last_size = size gdaltest.tiff_drv.Delete('tmp/tiff_write_91.tif') ############################################################################### # Test the effect of JPEG_QUALITY_OVERVIEW while creating (internal) overviews after re-opening # This will test that we correctly guess the quality of the main dataset def test_tiff_write_92(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() last_size = 0 quality = 30 for jpeg_quality_overview in [False, 30, 40]: src_ds = gdal.Open('../gdrivers/data/utm.tif') ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_92.tif', 1024, 1024, 3, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEG_QUALITY=%d' % quality]) data = src_ds.GetRasterBand(1).ReadRaster(0, 0, 512, 512, 1024, 1024) ds.GetRasterBand(1).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(2).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(3).WriteRaster(0, 0, 1024, 1024, data) ds = None ds = gdal.Open('tmp/tiff_write_92.tif', gdal.GA_Update) if jpeg_quality_overview is not False: gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', '%d' % jpeg_quality_overview) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', None) src_ds = None ds = None f = open('tmp/tiff_write_92.tif', 'rb') f.seek(0, os.SEEK_END) size = f.tell() f.close() # print('quality = %d, size = %d' % (quality, size)) if jpeg_quality_overview == 30: assert size == last_size, 'did not get equal file sizes' elif jpeg_quality_overview == 40: assert size > last_size, 'did not get growing file sizes' last_size = size gdaltest.tiff_drv.Delete('tmp/tiff_write_92.tif') ############################################################################### # Test JPEG_QUALITY_OVERVIEW propagation while creating external overviews def test_tiff_write_93(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdal.Open('../gdrivers/data/utm.tif') ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_93.tif', 1024, 1024, 3, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR']) data = src_ds.GetRasterBand(1).ReadRaster(0, 0, 512, 512, 1024, 1024) ds.GetRasterBand(1).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(2).WriteRaster(0, 0, 1024, 1024, data) ds.GetRasterBand(3).WriteRaster(0, 0, 1024, 1024, data) ds = None src_ds = None last_size = 0 for quality in [90, 75, 30]: try: os.remove('tmp/tiff_write_93.tif.ovr') except OSError: pass ds = gdal.Open('tmp/tiff_write_93.tif') gdal.SetConfigOption('COMPRESS_OVERVIEW', 'JPEG') gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', '%d' % quality) gdal.SetConfigOption('PHOTOMETRIC_OVERVIEW', 'YCBCR') ds.BuildOverviews('NEAR', overviewlist=[2, 4]) gdal.SetConfigOption('COMPRESS_OVERVIEW', None) gdal.SetConfigOption('JPEG_QUALITY_OVERVIEW', None) gdal.SetConfigOption('PHOTOMETRIC_OVERVIEW', None) ds = None f = open('tmp/tiff_write_93.tif.ovr', 'rb') f.seek(0, os.SEEK_END) size = f.tell() f.close() # print('quality = %d, size = %d' % (quality, size)) if quality != 90: assert size < last_size, 'did not get decreasing file sizes' assert not (quality == 30 and size >= 83000), \ 'file larger than expected. should be about 69100. perhaps jpeg quality is not well propagated' last_size = size gdaltest.tiff_drv.Delete('tmp/tiff_write_93.tif') ############################################################################### # Test CreateCopy() of a dataset with a mask into a JPEG compressed dataset # and check JPEG_QUALITY propagation without warning def test_tiff_write_94(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_94_src.tif', 1024, 1024, 3) gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', 'YES') src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', None) src_ds.GetRasterBand(1).GetMaskBand().WriteRaster(0, 0, 1, 1, '\xff', 1, 1) gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', 'YES') ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/tiff_write_94_dst.tif', src_ds, options=['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEG_QUALITY=30']) gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', None) src_ds = None ds = None ds = gdal.Open('tmp/tiff_write_94_dst.tif') cs = ds.GetRasterBand(1).GetMaskBand().Checksum() ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_94_src.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_94_dst.tif') assert cs == 3, 'wrong checksum' ############################################################################### # Test that COPY_SRC_OVERVIEWS deal well with rounding issues when computing # overview levels from the overview size def test_tiff_write_95(): src_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_95_src.tif', 7171, 6083, options=['SPARSE_OK=YES']) src_ds.BuildOverviews('NONE', overviewlist=[2, 4, 8, 16, 32, 64]) gdal.SetConfigOption('GTIFF_DONT_WRITE_BLOCKS', 'YES') ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_95_dst.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES']) gdal.SetConfigOption('GTIFF_DONT_WRITE_BLOCKS', None) ok = ds is not None ds = None src_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_95_src.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_95_dst.tif') assert ok ############################################################################### # Test that COPY_SRC_OVERVIEWS combined with GDAL_TIFF_INTERNAL_MASK=YES work well def test_tiff_write_96(other_options = [], nbands = 1, nbits = 8): gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', 'YES') src_ds = gdaltest.tiff_drv.Create('tmp/tiff_write_96_src.tif', 100, 100, nbands, options = ['NBITS=' + str(nbits)]) src_ds.GetRasterBand(1).Fill(255 if nbits == 8 else 127) src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) from sys import version_info if version_info >= (3, 0, 0): exec("src_ds.GetRasterBand(1).GetMaskBand().WriteRaster(25,25,50,50,b'\\xff',1,1)") else: src_ds.GetRasterBand(1).GetMaskBand().WriteRaster(25, 25, 50, 50, '\xff', 1, 1) src_ds.BuildOverviews('NEAR', overviewlist=[2, 4]) expected_cs = src_ds.GetRasterBand(1).Checksum() expected_cs_mask = src_ds.GetRasterBand(1).GetMaskBand().Checksum() expected_cs_ovr_1 = src_ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs_ovr_mask_1 = src_ds.GetRasterBand(1).GetOverview(0).GetMaskBand().Checksum() expected_cs_ovr_2 = src_ds.GetRasterBand(1).GetOverview(1).Checksum() expected_cs_ovr_mask_2 = src_ds.GetRasterBand(1).GetOverview(1).GetMaskBand().Checksum() ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_96_dst.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES'] + other_options + ['NBITS=' + str(nbits)]) ds = None src_ds = None gdal.SetConfigOption('GDAL_TIFF_INTERNAL_MASK', None) ds = gdal.Open('tmp/tiff_write_96_dst.tif') cs = ds.GetRasterBand(1).Checksum() cs_mask = ds.GetRasterBand(1).GetMaskBand().Checksum() cs_ovr_1 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs_ovr_mask_1 = ds.GetRasterBand(1).GetOverview(0).GetMaskBand().Checksum() cs_ovr_2 = ds.GetRasterBand(1).GetOverview(1).Checksum() cs_ovr_mask_2 = ds.GetRasterBand(1).GetOverview(1).GetMaskBand().Checksum() assert ds.GetMetadataItem('HAS_USED_READ_ENCODED_API', '_DEBUG_') == '1' ds = None assert [expected_cs, expected_cs_mask, expected_cs_ovr_1, expected_cs_ovr_mask_1, expected_cs_ovr_2, expected_cs_ovr_mask_2] == \ [cs, cs_mask, cs_ovr_1, cs_ovr_mask_1, cs_ovr_2, cs_ovr_mask_2], \ 'did not get expected checksums' if check_libtiff_internal_or_at_least(4, 0, 11): with gdaltest.config_option('GTIFF_HAS_OPTIMIZED_READ_MULTI_RANGE', 'YES'): ds = gdal.Open('tmp/tiff_write_96_dst.tif') cs = ds.GetRasterBand(1).Checksum() cs_mask = ds.GetRasterBand(1).GetMaskBand().Checksum() cs_ovr_1 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs_ovr_mask_1 = ds.GetRasterBand(1).GetOverview(0).GetMaskBand().Checksum() cs_ovr_2 = ds.GetRasterBand(1).GetOverview(1).Checksum() cs_ovr_mask_2 = ds.GetRasterBand(1).GetOverview(1).GetMaskBand().Checksum() assert [expected_cs, expected_cs_mask, expected_cs_ovr_1, expected_cs_ovr_mask_1, expected_cs_ovr_2, expected_cs_ovr_mask_2] == \ [cs, cs_mask, cs_ovr_1, cs_ovr_mask_1, cs_ovr_2, cs_ovr_mask_2], \ 'did not get expected checksums' assert ds.GetMetadataItem('HAS_USED_READ_ENCODED_API', '_DEBUG_') == '0' _check_cog('tmp/tiff_write_96_dst.tif', check_tiled=False, full_check=True) gdaltest.tiff_drv.Delete('tmp/tiff_write_96_src.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_96_dst.tif') def test_tiff_write_96_tiled_threads_nbits7_nbands1(): return test_tiff_write_96(['TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=32', 'NUM_THREADS=ALL_CPUS'], nbands = 1, nbits = 7) def test_tiff_write_96_tiled_threads_nbits7_nbands2(): return test_tiff_write_96(['BIGTIFF=YES', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=32', 'NUM_THREADS=ALL_CPUS'], nbands = 2, nbits = 7) ############################################################################### # Test that strile arrays are written after the IFD def test_tiff_write_ifd_offsets(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100) src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) src_ds.BuildOverviews('NEAR', overviewlist=[2, 4]) filename = '/vsimem/test_tiff_write_ifd_offsets.tif' with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds = gdal.GetDriverByName('GTiff').CreateCopy(filename, src_ds, options=['COPY_SRC_OVERVIEWS=YES', 'TILED=YES', 'COMPRESS=LZW']) val0_ref = int(ds.GetRasterBand(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) val1_ref = int(ds.GetRasterBand(1).GetMaskBand().GetMetadataItem('IFD_OFFSET', 'TIFF')) val2_ref = int(ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('IFD_OFFSET', 'TIFF')) val3_ref = int(ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) val4_ref = int(ds.GetRasterBand(1).GetOverview(0).GetMaskBand().GetMetadataItem('IFD_OFFSET', 'TIFF')) val5_ref = int(ds.GetRasterBand(1).GetOverview(1).GetMaskBand().GetMetadataItem('IFD_OFFSET', 'TIFF')) ds = None assert val0_ref < val1_ref assert val1_ref < val2_ref assert val2_ref < val3_ref assert val3_ref < val4_ref assert val4_ref < val5_ref assert val5_ref < 1100 # Retry with larger file src_ds = gdal.GetDriverByName('MEM').Create('', 4096, 4096) src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) src_ds.BuildOverviews('NEAR', overviewlist=[2, 4]) with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds = gdal.GetDriverByName('GTiff').CreateCopy(filename, src_ds, options=['COPY_SRC_OVERVIEWS=YES', 'TILED=YES', 'COMPRESS=LZW']) val0 = int(ds.GetRasterBand(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) val1 = int(ds.GetRasterBand(1).GetMaskBand().GetMetadataItem('IFD_OFFSET', 'TIFF')) val2 = int(ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('IFD_OFFSET', 'TIFF')) val3 = int(ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) val4 = int(ds.GetRasterBand(1).GetOverview(0).GetMaskBand().GetMetadataItem('IFD_OFFSET', 'TIFF')) val5 = int(ds.GetRasterBand(1).GetOverview(1).GetMaskBand().GetMetadataItem('IFD_OFFSET', 'TIFF')) ds = None # Test rewriting but without changing strile size ds = gdal.Open(filename, gdal.GA_Update) ds.GetRasterBand(1).Fill(0) ds = None assert gdal.GetLastErrorMsg() == '' f = gdal.VSIFOpenL(filename, 'rb') data = gdal.VSIFReadL(1, 1000, f).decode('LATIN1') gdal.VSIFCloseL(f) assert 'KNOWN_INCOMPATIBLE_EDITION=NO\n ' in data # Test rewriting with changing strile size ds = gdal.Open(filename, gdal.GA_Update) ds.GetRasterBand(1).WriteRaster(0,0,1,1,'x') ds = None assert gdal.GetLastErrorMsg() != '' f = gdal.VSIFOpenL(filename, 'rb') data = gdal.VSIFReadL(1, 1000, f).decode('LATIN1') gdal.VSIFCloseL(f) assert 'KNOWN_INCOMPATIBLE_EDITION=YES\n' in data gdal.GetDriverByName('GTiff').Delete(filename) assert (val0_ref, val1_ref, val2_ref, val3_ref, val4_ref, val5_ref) == (val0, val1, val2, val3, val4, val5) ############################################################################### # Create a simple file by copying from an existing one - PixelIsPoint def test_tiff_write_97(): gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'FALSE') src_ds = gdal.Open('data/byte_point.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_97.tif', src_ds) gt = new_ds.GetGeoTransform() md = new_ds.GetMetadataItem('AREA_OR_POINT') new_ds = None gt_expected = (440690.0, 60.0, 0.0, 3751350.0, 0.0, -60.0) assert gt == gt_expected, 'did not get expected geotransform' assert md == 'Point', 'did not get expected AREA_OR_POINT value' gdaltest.tiff_drv.Delete('tmp/test_97.tif') # Again, but ignoring PixelIsPoint gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'TRUE') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_97_2.tif', src_ds) gt = new_ds.GetGeoTransform() md = new_ds.GetMetadataItem('AREA_OR_POINT') new_ds = None src_ds = None gt_expected = (440690.0, 60.0, 0.0, 3751350.0, 0.0, -60.0) assert gt == gt_expected, \ 'did not get expected geotransform when ignoring PixelIsPoint' assert md == 'Point', 'did not get expected AREA_OR_POINT value' gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', None) # read back this file with pixelispoint behavior enabled. new_ds = gdal.Open('tmp/test_97_2.tif') gt = new_ds.GetGeoTransform() md = new_ds.GetMetadataItem('AREA_OR_POINT') new_ds = None gt_expected = (440660.0, 60.0, 0.0, 3751380.0, 0.0, -60.0) assert gt == gt_expected, \ 'did not get expected geotransform when ignoring PixelIsPoint (2)' assert md == 'Point', 'did not get expected AREA_OR_POINT value' gdaltest.tiff_drv.Delete('tmp/test_97_2.tif') ############################################################################### # Create a rotated geotiff file (uses a geomatrix) with - PixelIsPoint def test_tiff_write_98(): with gdaltest.config_option('GTIFF_POINT_GEO_IGNORE', 'FALSE'): src_ds = gdal.Open('data/geomatrix.tif') with gdaltest.config_option('GTIFF_POINT_GEO_IGNORE', 'TRUE'): new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_98.tif', src_ds) gt = new_ds.GetGeoTransform() md = new_ds.GetMetadataItem('AREA_OR_POINT') new_ds = None src_ds = None gt_expected = (1841001.75, 1.5, -5.0, 1144003.25, -5.0, -1.5) assert gt == gt_expected, 'did not get expected geotransform' assert md == 'Point', 'did not get expected AREA_OR_POINT value' with gdaltest.config_option('GTIFF_POINT_GEO_IGNORE', 'FALSE'): new_ds = gdal.Open('tmp/test_98.tif') gt = new_ds.GetGeoTransform() md = new_ds.GetMetadataItem('AREA_OR_POINT') new_ds = None src_ds = None gt_expected = (1841003.5, 1.5, -5.0, 1144006.5, -5.0, -1.5) assert gt == gt_expected, 'did not get expected geotransform (2)' assert md == 'Point', 'did not get expected AREA_OR_POINT value' gdaltest.tiff_drv.Delete('tmp/test_98.tif') ############################################################################### # Create copy into a RGB JPEG-IN-TIFF (#3887) def test_tiff_write_99(): src_ds = gdal.Open('data/rgbsmall.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_99.tif', src_ds, options=['COMPRESS=JPEG']) del new_ds src_ds = None ds = gdal.Open('tmp/test_99.tif') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() cs3 = ds.GetRasterBand(3).Checksum() ds = None gdaltest.tiff_drv.Delete('tmp/test_99.tif') assert (cs1, cs2, cs3) == (21629, 21651, 21371), ('%d,%d,%d' % (cs1, cs2, cs3)) ############################################################################### # Create copy into a 2 band JPEG-IN-TIFF (#3887) def test_tiff_write_100(): src_ds = gdaltest.tiff_drv.Create('/vsimem/test_100_src.tif', 16, 16, 2) src_ds.GetRasterBand(1).Fill(255) new_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/test_100_dst.tif', src_ds, options=['COMPRESS=JPEG']) del new_ds src_ds = None ds = gdal.Open('/vsimem/test_100_dst.tif') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None gdaltest.tiff_drv.Delete('/vsimem/test_100_src.tif') gdaltest.tiff_drv.Delete('/vsimem/test_100_dst.tif') assert (cs1, cs2) == (3118, 0), ('%d,%d' % (cs1, cs2)) ############################################################################### # Test CHUNKY_STRIP_READ_SUPPORT (#3894) # We use random data so the compressed files are big enough to need partial # reloading. tiff_write_78 doesn't produce enough big data to trigger this... def test_tiff_write_101(): md = gdaltest.tiff_drv.GetMetadata() if not gdaltest.run_slow_tests(): pytest.skip() if sys.platform.startswith('linux'): # Much faster to use /dev/urandom than python random generator ! f = open('/dev/urandom', 'rb') rand_array = f.read(10 * 1024 * 1024) f.close() else: import random rand_array = array.array('B') for _ in range(10 * 1024 * 1024): rand_array.append(random.randint(0, 255)) f = open('tmp/tiff_write_101.bin', 'wb') f.write(rand_array) f.close() f = open('tmp/tiff_write_101.hdr', 'wb') f.write("""ENVI samples = 2500 lines = 4000 bands = 1 header offset = 0 file type = ENVI Standard data type = 1 interleave = bsq byte order = 0 map info = {UTM, 1, 1, 440720.000000, 3751320.000000, 60.000000, 60.000000, 11, North} band names = { Band 1}""".encode('ascii')) f.close() src_ds = gdal.Open('tmp/tiff_write_101.bin') expected_cs = src_ds.GetRasterBand(1).Checksum() for compression_method in ['DEFLATE', 'LZW', 'JPEG', 'PACKBITS', 'LZMA']: if md['DMD_CREATIONOPTIONLIST'].find(compression_method) == -1: continue ds = gdaltest.tiff_drv.CreateCopy('tmp/tiff_write_101.tif', src_ds, options=['COMPRESS=' + compression_method, 'BLOCKXSIZE=2500', 'BLOCKYSIZE=4000']) ds = None ds = gdal.Open('tmp/tiff_write_101.tif') gdal.ErrorReset() cs = ds.GetRasterBand(1).Checksum() error_msg = gdal.GetLastErrorMsg() ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_101.tif') if error_msg != '': src_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_101.bin') pytest.fail() if compression_method != 'JPEG' and cs != expected_cs: src_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_101.bin') pytest.fail('for compression method %s, got %d instead of %d' % (compression_method, cs, expected_cs)) src_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_101.bin') ############################################################################### # Test writing and reading back COMPD_CS def test_tiff_write_102(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_102.tif', 1, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(7401) name = sr.GetAttrValue('COMPD_CS') wkt = sr.ExportToWkt() ds.SetProjection(wkt) ds = None ds = gdal.Open('/vsimem/tiff_write_102.tif') wkt1 = ds.GetProjectionRef() ds = None with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'NO'): ds = gdal.Open('/vsimem/tiff_write_102.tif') wkt2 = ds.GetProjectionRef() ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_102.tif') assert wkt1.startswith('COMPD_CS'), 'expected COMPD_CS, but got something else' assert not wkt2.startswith('COMPD_CS'), 'got COMPD_CS, but did not expected it' sr2 = osr.SpatialReference() sr2.SetFromUserInput(wkt1) got_name = sr2.GetAttrValue('COMPD_CS') assert got_name == name, wkt2 ############################################################################### # Test -co COPY_SRC_OVERVIEWS=YES on a multiband source with external overviews (#3938) def test_tiff_write_103(): import test_cli_utilities if test_cli_utilities.get_gdaladdo_path() is None: pytest.skip() gdal.Translate('tmp/tiff_write_103_src.tif', 'data/rgbsmall.tif', options='-outsize 260 260') gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' -ro tmp/tiff_write_103_src.tif 2') gdal.Translate('tmp/tiff_write_103_dst.tif', 'tmp/tiff_write_103_src.tif', options='-co COPY_SRC_OVERVIEWS=YES') src_ds = gdal.Open('tmp/tiff_write_103_src.tif') dst_ds = gdal.Open('tmp/tiff_write_103_dst.tif') src_cs = src_ds.GetRasterBand(1).GetOverview(0).Checksum() dst_cs = dst_ds.GetRasterBand(1).GetOverview(0).Checksum() src_ds = None dst_ds = None gdaltest.tiff_drv.Delete('tmp/tiff_write_103_src.tif') gdaltest.tiff_drv.Delete('tmp/tiff_write_103_dst.tif') assert src_cs == dst_cs, 'did not get expected checksum' ############################################################################### # Confirm as best we can that we can write geotiff files with detailed # projection parameters with the correct linear units set. (#3901) def test_tiff_write_104(): src_ds = gdal.Open('data/spaf27_correct.tif') dst_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_104.tif', src_ds) src_ds = None del dst_ds ds = gdal.Open('tmp/test_104.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(2000000.0, abs=0.001), 'did not get expected false easting' gdaltest.tiff_drv.Delete('tmp/test_104.tif') ############################################################################### # Confirm as best we can that we can write geotiff files with detailed # projection parameters with the correct linear units set. (#3901) def test_tiff_write_105(): shutil.copyfile('data/bug4468.tif', 'tmp/bug4468.tif') # Update a pixel and close again. ds = gdal.Open('tmp/bug4468.tif', gdal.GA_Update) data = ds.ReadRaster(0, 0, 1, 1) ds.WriteRaster(0, 0, 1, 1, data) ds = None # Now check if the image is still intact. ds = gdal.Open('tmp/bug4468.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 2923, ('Did not get expected checksum, got %d.' % cs) ds = None gdaltest.tiff_drv.Delete('tmp/bug4468.tif') ############################################################################### # Test the direct copy mechanism of JPEG source def test_tiff_write_106(filename='../gdrivers/data/byte_with_xmp.jpg', options=None, check_cs=True): if options is None: options = ['COMPRESS=JPEG'] md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdal.Open(filename) nbands = src_ds.RasterCount src_cs = [] for i in range(nbands): src_cs.append(src_ds.GetRasterBand(i + 1).Checksum()) out_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_106.tif', src_ds, options=options) out_ds = None out_ds = gdal.Open('/vsimem/tiff_write_106.tif') cs = [] for i in range(nbands): cs.append(out_ds.GetRasterBand(i + 1).Checksum()) out_ds = None gdal.Unlink('/vsimem/tiff_write_106.tif') if check_cs: for i in range(nbands): assert cs[i] == src_cs[i], 'did not get expected checksum' else: for i in range(nbands): assert cs[i] != 0, 'did not get expected checksum' def test_tiff_write_107(): return test_tiff_write_106(options=['COMPRESS=JPEG', 'BLOCKYSIZE=8']) def test_tiff_write_108(): return test_tiff_write_106(options=['COMPRESS=JPEG', 'BLOCKYSIZE=20']) def test_tiff_write_109(): return test_tiff_write_106(options=['COMPRESS=JPEG', 'TILED=YES', 'BLOCKYSIZE=16', 'BLOCKXSIZE=16']) # Strip organization of YCbCr does *NOT* give exact pixels w.r.t. original image def test_tiff_write_110(): return test_tiff_write_106(filename='../gdrivers/data/albania.jpg', check_cs=False) # Whole copy of YCbCr *DOES* give exact pixels w.r.t. original image def test_tiff_write_111(): return test_tiff_write_106(filename='../gdrivers/data/albania.jpg', options=['COMPRESS=JPEG', 'BLOCKYSIZE=260']) def test_tiff_write_111_bis(): return test_tiff_write_106(filename='../gdrivers/data/albania.jpg', options=['COMPRESS=JPEG', 'BLOCKYSIZE=260', 'INTERLEAVE=PIXEL']) def test_tiff_write_111_ter(): return test_tiff_write_106(filename='../gdrivers/data/albania.jpg', options=['COMPRESS=JPEG', 'BLOCKYSIZE=260', 'INTERLEAVE=BAND'], check_cs=False) # Tiled organization of YCbCr does *NOT* give exact pixels w.r.t. original image def test_tiff_write_112(): return test_tiff_write_106(filename='../gdrivers/data/albania.jpg', options=['COMPRESS=JPEG', 'TILED=YES'], check_cs=False) # The source is a JPEG in RGB colorspace (usually it is YCbCr). def test_tiff_write_113(): return test_tiff_write_106(filename='../gdrivers/data/rgbsmall_rgb.jpg', options=['COMPRESS=JPEG', 'BLOCKYSIZE=8']) ############################################################################### # Test CreateCopy() interruption def test_tiff_write_114(): tst = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1, interrupt_during_copy=True) ############################################################################### # Test writing a pixel interleaved RGBA JPEG-compressed TIFF def test_tiff_write_115(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() tmpfilename = '/vsimem/tiff_write_115.tif' src_ds = gdal.Open('data/stefan_full_rgba.tif') ds = gdaltest.tiff_drv.CreateCopy(tmpfilename, src_ds, options=['COMPRESS=JPEG']) assert ds is not None ds = None src_ds = None f = gdal.VSIFOpenL(tmpfilename + '.aux.xml', 'rb') if f is not None: gdal.VSIFCloseL(f) gdal.Unlink(tmpfilename) pytest.fail() ds = gdal.Open(tmpfilename) md = ds.GetMetadata('IMAGE_STRUCTURE') if md['INTERLEAVE'] != 'PIXEL': ds = None gdal.Unlink(tmpfilename) pytest.fail() expected_cs = [16404, 62700, 37913, 14174] for i in range(4): cs = ds.GetRasterBand(i + 1).Checksum() if cs != expected_cs[i]: ds = None gdal.Unlink(tmpfilename) pytest.fail() if ds.GetRasterBand(i + 1).GetRasterColorInterpretation() != gdal.GCI_RedBand + i: ds = None gdal.Unlink(tmpfilename) pytest.fail() ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test writing a band interleaved RGBA JPEG-compressed TIFF def test_tiff_write_116(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() tmpfilename = '/vsimem/tiff_write_116.tif' src_ds = gdal.Open('data/stefan_full_rgba.tif') ds = gdaltest.tiff_drv.CreateCopy(tmpfilename, src_ds, options=['COMPRESS=JPEG', 'INTERLEAVE=BAND']) assert ds is not None ds = None src_ds = None f = gdal.VSIFOpenL(tmpfilename + '.aux.xml', 'rb') if f is not None: gdal.VSIFCloseL(f) gdal.Unlink(tmpfilename) pytest.fail() ds = gdal.Open(tmpfilename) md = ds.GetMetadata('IMAGE_STRUCTURE') if md['INTERLEAVE'] != 'BAND': ds = None gdal.Unlink(tmpfilename) pytest.fail() expected_cs = [16404, 62700, 37913, 14174] for i in range(4): cs = ds.GetRasterBand(i + 1).Checksum() if cs != expected_cs[i]: ds = None gdal.Unlink(tmpfilename) pytest.fail() if ds.GetRasterBand(i + 1).GetRasterColorInterpretation() != gdal.GCI_RedBand + i: ds = None gdal.Unlink(tmpfilename) pytest.fail() ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test bugfix for ticket #4771 (rewriting of a deflate compressed tile, libtiff bug) def test_tiff_write_117(): # This fail with a libtiff 4.x older than 2012-08-13 md = gdaltest.tiff_drv.GetMetadata() if md['LIBTIFF'] != 'INTERNAL': pytest.skip() import random # so that we have always the same random :-) random.seed(0) ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_117.tif', 512, 256, 2, options=['COMPRESS=DEFLATE', 'TILED=YES']) # Write first tile so that its byte count of that tile is 2048 (a multiple of 1024) adjust = 1254 data = '0' * (65536 - adjust) + ''.join([('%c' % random.randint(0, 255)) for _ in range(adjust)]) ds.GetRasterBand(1).WriteRaster(0, 0, 256, 256, data) # Second tile will be implicitly written at closing, or we could write # any content ds = None ds = gdal.Open('/vsimem/tiff_write_117.tif', gdal.GA_Update) # Will adjust tif_rawdatasize to TIFFroundup_64((uint64)size, 1024) = TIFFroundup_64(2048, 1024) = 2048 ds.GetRasterBand(1).ReadRaster(0, 0, 256, 256) # The new bytecount will be greater than 2048 data = ''.join([('%c' % random.randint(0, 255)) for _ in range(256 * 256)]) ds.GetRasterBand(1).WriteRaster(0, 0, 256, 256, data) # Make sure that data is written now ds.FlushCache() # Oops, without fix, the second tile will have been overwritten and an error will be emitted data = ds.GetRasterBand(1).ReadRaster(256, 0, 256, 256) ds = None gdal.Unlink('/vsimem/tiff_write_117.tif') assert data is not None, \ 'if GDAL is configured with external libtiff 4.x, it can fail if it is older than 4.0.3. With internal libtiff, should not fail' ############################################################################### # Test bugfix for ticket #4816 def test_tiff_write_118(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_118.tif', 1, 1) # Should be rejected in a non-XML domain ds.SetMetadata('bla', 'foo') ds = None ds = gdal.Open('/vsimem/tiff_write_118.tif') md = ds.GetMetadata('foo') ds = None gdal.Unlink('/vsimem/tiff_write_118.tif') assert not md ############################################################################### # Test bugfix for ticket #4816 def test_tiff_write_119(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_119.tif', 1, 1) ds.SetMetadata('foo=bar', 'foo') ds = None ds = gdal.Open('/vsimem/tiff_write_119.tif') md = ds.GetMetadata('foo') ds = None gdal.Unlink('/vsimem/tiff_write_119.tif') assert md['foo'] == 'bar' ############################################################################### # Test bugfix for ticket #4816 def test_tiff_write_120(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_120.tif', 1, 1) ds.SetMetadata('<foo/>', 'xml:foo') ds = None ds = gdal.Open('/vsimem/tiff_write_120.tif') md = ds.GetMetadata('xml:foo') ds = None gdal.Unlink('/vsimem/tiff_write_120.tif') assert len(md) == 1 assert md[0] == '<foo/>' ############################################################################### # Test error cases of COPY_SRC_OVERVIEWS creation option def test_tiff_write_121(): # Test when the overview band is NULL src_ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> <Overview> <SourceFilename relativeToVRT="0">non_existing</SourceFilename> <SourceBand>1</SourceBand> </Overview> </VRTRasterBand> </VRTDataset>""") gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_121.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES']) gdal.PopErrorHandler() assert ds is None src_ds = None # Test when the overview count isn't the same on all base bands src_ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> <Overview> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </Overview> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <SimpleSource> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> </VRTRasterBand> </VRTDataset>""") gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_121.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES']) gdal.PopErrorHandler() assert ds is None src_ds = None # Test when the overview bands of same level have not the same dimensions src_ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> <Overview> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </Overview> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <SimpleSource> <SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> <Overview> <SourceFilename relativeToVRT="0">data/rgbsmall.tif</SourceFilename> <SourceBand>1</SourceBand> </Overview> </VRTRasterBand> </VRTDataset>""") gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_121.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES']) gdal.PopErrorHandler() assert ds is None src_ds = None ############################################################################### # Test write and read of some TIFFTAG_RESOLUTIONUNIT tags where '*'/'' is # specified (gdalwarp conflicts) # Expected to fail (properly) with older libtiff versions (<=3.8.2 for sure) def test_tiff_write_122(): new_ds = gdaltest.tiff_drv.Create('tmp/tags122.tif', 1, 1, 1) new_ds.SetMetadata({ 'TIFFTAG_RESOLUTIONUNIT': '*', }) new_ds = None # hopefully it's closed now! new_ds = gdal.Open('tmp/tags122.tif') md = new_ds.GetMetadata() if 'TIFFTAG_RESOLUTIONUNIT' not in md: pytest.fail('Couldnt find tag TIFFTAG_RESOLUTIONUNIT') elif md['TIFFTAG_RESOLUTIONUNIT'] != '1 (unitless)': pytest.fail("Got unexpected tag TIFFTAG_RESOLUTIONUNIT='%s' (expected ='1 (unitless)')" % md['TIFFTAG_RESOLUTIONUNIT']) new_ds = None gdaltest.tiff_drv.Delete('tmp/tags122.tif') ############################################################################### # Test implicit photometric interpretation def test_tiff_write_123(): src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_src.tif', 1, 1, 5, gdal.GDT_Int16) src_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_GreenBand) src_ds.GetRasterBand(5).SetColorInterpretation(gdal.GCI_AlphaBand) src_ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_BlueBand) src_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_RedBand) src_ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_123_src.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' src_ds = gdal.Open('/vsimem/tiff_write_123_src.tif') assert src_ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is None, \ 'did not expect a TIFFTAG_GDAL_METADATA tag' assert src_ds.GetMetadataItem('TIFFTAG_PHOTOMETRIC', '_DEBUG_') == '2' assert src_ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert src_ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_Undefined assert src_ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand assert src_ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '0,2' new_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_123.tif', src_ds) del new_ds statBuf = gdal.VSIStatL('/vsimem/tiff_write_123.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open('/vsimem/tiff_write_123.tif') assert ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is None, \ 'did not expect a TIFFTAG_GDAL_METADATA tag' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert src_ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_Undefined assert src_ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '0,2' ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_src.tif') gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123.tif') # From implicit RGB to BGR (with Photometric = MinIsBlack) ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_bgr.tif', 1, 1, 3, gdal.GDT_Byte) assert ds.GetMetadataItem('TIFFTAG_PHOTOMETRIC', '_DEBUG_') == '2' assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') is None ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_BlueBand) assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_BlueBand ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_GreenBand) ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_RedBand) ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_123_bgr.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect a PAM file' ds = gdal.Open('/vsimem/tiff_write_123_bgr.tif') assert ds.GetMetadataItem('TIFFTAG_PHOTOMETRIC', '_DEBUG_') == '1' assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '0,0' assert ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is not None, \ 'expected a TIFFTAG_GDAL_METADATA tag' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_RedBand ds = None # Test overriding internal color interpretation with PAM one (read-only mode) ds = gdal.Open('/vsimem/tiff_write_123_bgr.tif') ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_RedBand) ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_123_bgr.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is not None, 'expected a PAM file' ds = gdal.Open('/vsimem/tiff_write_123_bgr.tif') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_RedBand ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_bgr.tif') # Create a BGR with PROFILE=BASELINE --> no TIFFTAG_GDAL_METADATA tag, but .aux.xml instead ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_bgr.tif', 1, 1, 3, options=['PROFILE=BASELINE']) ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_BlueBand) ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_GreenBand) ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_RedBand) ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_123_bgr.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is not None, 'expected a PAM file' ds = gdal.Open('/vsimem/tiff_write_123_bgr.tif') assert ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is None, \ 'did not expect a TIFFTAG_GDAL_METADATA tag' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_RedBand ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_bgr.tif') # From implicit RGBA to MINISBLACK ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_rgba.tif', 1, 1, 4, gdal.GDT_Byte) assert ds.GetMetadataItem('TIFFTAG_PHOTOMETRIC', '_DEBUG_') == '2' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '2' ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_Undefined) assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_Undefined assert ds.GetMetadataItem('TIFFTAG_PHOTOMETRIC', '_DEBUG_') == '1' assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') == '0,0,2' ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_rgba.tif') # From that implicit RGBA to Gray,Undefined,Undefined,Alpha doesn't # produce PAM file ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_guua.tif', 1, 1, 4, gdal.GDT_Byte) ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_GrayIndex) ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_Undefined) ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_Undefined) ds.GetRasterBand(4).SetColorInterpretation(gdal.GCI_AlphaBand) ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_123_guua.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open('/vsimem/tiff_write_123_guua.tif') assert ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is None, \ 'did not expect TIFFTAG_GDAL_METADATA tag' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_guua.tif') # Test that CreateCopy() from a RGB UInt16 doesn't generate ExtraSamples src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_rgb_src.tif', 1, 1, 3, gdal.GDT_UInt16, options=['PHOTOMETRIC=RGB']) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_123_rgb.tif', src_ds) src_ds = None assert ds.GetMetadataItem('TIFFTAG_PHOTOMETRIC', '_DEBUG_') == '2' assert ds.GetMetadataItem('TIFFTAG_EXTRASAMPLES', '_DEBUG_') is None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_rgb_src.tif') gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_rgb.tif') # Test that PHOTOMETRIC=RGB overrides the source color interpretation of the # first 3 bands src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 3) gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_123_rgb.tif', src_ds, options=['PHOTOMETRIC=RGB']) ds = gdal.Open('/vsimem/tiff_write_123_rgb.tif') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_rgb.tif') src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 5) src_ds.GetRasterBand(5).SetColorInterpretation(gdal.GCI_AlphaBand) gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_123_rgbua.tif', src_ds, options=['PHOTOMETRIC=RGB']) ds = gdal.Open('/vsimem/tiff_write_123_rgbua.tif') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_Undefined assert ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_rgbua.tif') # Test updating alpha to undefined gdaltest.tiff_drv.Create('/vsimem/tiff_write_123_rgba_to_undefined.tif', 1, 1, 4, options=['PHOTOMETRIC=RGB', 'ALPHA=YES']) ds = gdal.Open('/vsimem/tiff_write_123_rgba_to_undefined.tif', gdal.GA_Update) ds.GetRasterBand(4).SetColorInterpretation(gdal.GCI_Undefined) ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_123_rgba_to_undefined.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open('/vsimem/tiff_write_123_rgba_to_undefined.tif') assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_Undefined ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_123_rgba_to_undefined.tif') ############################################################################### # Test error cases with palette creation def test_tiff_write_124(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_124.tif', 1, 1, 3, gdal.GDT_Byte) gdal.PushErrorHandler('CPLQuietErrorHandler') # Test "SetColorTable() can only be called on band 1" ret = ds.GetRasterBand(2).SetColorTable(gdal.ColorTable()) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') # Test "SetColorTable() not supported for multi-sample TIFF files" ret = ds.GetRasterBand(1).SetColorTable(gdal.ColorTable()) gdal.PopErrorHandler() assert ret != 0 ds = None ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_124.tif', 1, 1, 1, gdal.GDT_UInt32) gdal.PushErrorHandler('CPLQuietErrorHandler') # Test "SetColorTable() only supported for Byte or UInt16 bands in TIFF format." ret = ds.GetRasterBand(1).SetColorTable(gdal.ColorTable()) gdal.PopErrorHandler() assert ret != 0 ds = None gdal.PushErrorHandler('CPLQuietErrorHandler') # Test "SetColorTable() only supported for Byte or UInt16 bands in TIFF format." ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_124.tif', 1, 1, 1, gdal.GDT_UInt32, options=['PHOTOMETRIC=PALETTE']) gdal.PopErrorHandler() ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_124.tif') ############################################################################### # Test out-of-memory conditions with SplitBand and SplitBitmapBand def test_tiff_write_125(): if gdal.GetConfigOption('SKIP_MEM_INTENSIVE_TEST') is not None: pytest.skip() ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_125.tif', 2147000000, 5000, 65535, options=['SPARSE_OK=YES', 'BLOCKYSIZE=5000', 'COMPRESS=LZW', 'BIGTIFF=NO']) ds = None ds = gdal.Open('/vsimem/tiff_write_125.tif') # Will not open on 32-bit due to overflow if ds is not None: gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetRasterBand(1).ReadBlock(0, 0) gdal.PopErrorHandler() ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_125.tif', 2147000000, 5000, 1, options=['NBITS=1', 'SPARSE_OK=YES', 'BLOCKYSIZE=5000', 'COMPRESS=LZW', 'BIGTIFF=NO']) ds = None ds = gdal.Open('/vsimem/tiff_write_125.tif') # Will not open on 32-bit due to overflow if ds is not None: gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetRasterBand(1).ReadBlock(0, 0) gdal.PopErrorHandler() gdal.Unlink('/vsimem/tiff_write_125.tif') ############################################################################### # Test implicit JPEG-in-TIFF overviews def test_tiff_write_126(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() src_ds = gdal.Open('../gdrivers/data/small_world_400pct.vrt') options_list = [(['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR'], [48788, 56561], [61397, 2463, 2454], [29605, 33654], [10904, 10453]), (['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'JPEGTABLESMODE=0'], [48788, 56561], [61397, 2463, 2454], [29605, 33654], [10904, 10453]), (['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'TILED=YES'], [48788, 56561], [61397, 2463, 2454], [29605, 33654], [10904, 10453]), (['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'BLOCKYSIZE=800'], [48788, 56561], [61397, 2463, 2454], [29605, 33654], [10904, 10453]), (['COMPRESS=JPEG', 'PHOTOMETRIC=YCBCR', 'BLOCKYSIZE=64'], [48788, 56561], [61397, 2463, 2454], [29605, 33654], [10904, 10453]), (['COMPRESS=JPEG'], [49887, 58937], [59311, 2826], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'INTERLEAVE=BAND'], [49887, 58937], [59311, 2826], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'INTERLEAVE=BAND', 'TILED=YES'], [49887, 58937], [59311, 2826], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'INTERLEAVE=BAND', 'BLOCKYSIZE=800'], [49887, 58937], [59311, 2826], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'INTERLEAVE=BAND', 'BLOCKYSIZE=32'], [49887, 58937], [59311, 2826], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'BLOCKYSIZE=8'], [49887, 58937], [59311, 2826], [30829, 34806], [11664, 58937]), ] for (options, cs1, cs2, cs3, cs4) in options_list: os.environ['JPEGMEM'] = '500M' ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_126.tif', src_ds, options=options) ds = None del os.environ['JPEGMEM'] ds = gdal.Open('/vsimem/tiff_write_126.tif') # Officially we have 0 public overviews... assert ds.GetRasterBand(1).GetOverviewCount() == 0, options # But they do exist... cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs in cs1, options cs = ds.GetRasterBand(2).GetOverview(0).Checksum() assert cs in cs2, options cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs in cs3, options cs = ds.GetRasterBand(1).GetOverview(2).Checksum() assert cs in cs4, options assert ds.GetRasterBand(1).GetOverview(-1) is None, options assert ds.GetRasterBand(1).GetOverview(3) is None, options ovr_1_data = ds.GetRasterBand(1).GetOverview(1).GetDataset().ReadRaster(0, 0, 400, 200) subsampled_data = ds.ReadRaster(0, 0, 1600, 800, 400, 200) assert ovr_1_data == subsampled_data, options ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_126.tif') src_ds = gdal.Open('../gdrivers/data/small_world_400pct_1band.vrt') options_list = [(['COMPRESS=JPEG'], [49887, 58937], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'TILED=YES'], [49887, 58937], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'BLOCKYSIZE=800'], [49887, 58937], [30829, 34806], [11664, 58937]), (['COMPRESS=JPEG', 'BLOCKYSIZE=32'], [49887, 58937], [30829, 34806], [11664, 58937]), ] for (options, cs1, cs3, cs4) in options_list: os.environ['JPEGMEM'] = '500M' ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_126.tif', src_ds, options=options) ds = None del os.environ['JPEGMEM'] ds = gdal.Open('/vsimem/tiff_write_126.tif') # Officially we have 0 public overviews... assert ds.GetRasterBand(1).GetOverviewCount() == 0, options # But they do exist... cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs in cs1, options cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs in cs3, options cs = ds.GetRasterBand(1).GetOverview(2).Checksum() assert cs in cs4, options ovr_1_data = ds.GetRasterBand(1).GetOverview(1).GetDataset().ReadRaster(0, 0, 400, 200) subsampled_data = ds.ReadRaster(0, 0, 1600, 800, 400, 200) assert ovr_1_data == subsampled_data, options ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_126.tif') # Test single-strip, opened as split band src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_126_src.tif', 8, 2001) src_ds.GetRasterBand(1).Fill(255) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_126.tif', src_ds, options=['COMPRESS=JPEG', 'BLOCKYSIZE=2001']) src_ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_126_src.tif') ds = None ds = gdal.Open('/vsimem/tiff_write_126.tif') assert ds.GetRasterBand(1).GetBlockSize() == [8, 1] ovr_ds = ds.GetRasterBand(1).GetOverview(1).GetDataset() ovr_1_data = ovr_ds.ReadRaster(0, 0, ovr_ds.RasterXSize, ovr_ds.RasterYSize, 1, 1) subsampled_data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, 1, 1) assert ovr_1_data == subsampled_data ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_126.tif') # We need libtiff 4.0.4 (unreleased at that time) if md['LIBTIFF'] != 'INTERNAL': print('skipping tests that will fail without internal libtiff') return # Test with completely sparse file ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_126.tif', 1024, 1024, options=['COMPRESS=JPEG', 'SPARSE_OK=YES']) ds = None ds = gdal.Open('/vsimem/tiff_write_126.tif') assert ds.GetRasterBand(1).GetOverview(0) is not None assert ds.GetRasterBand(1).GetMetadataItem('JPEGTABLES', 'TIFF') is not None assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF') is None assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_0', 'TIFF') is None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_126.tif') # Test with partially sparse file ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_126.tif', 1024, 1024, 3, options=['COMPRESS=JPEG', 'SPARSE_OK=YES', 'INTERLEAVE=BAND']) # Fill band 3, but let blocks of band 1 unwritten. ds.GetRasterBand(3).Fill(0) ds = None ds = gdal.Open('/vsimem/tiff_write_126.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 0 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_126.tif') ############################################################################### # Test setting/unsetting metadata in update mode (#5628) def test_tiff_write_127(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_127.tif', 1, 1) ds = None for i in range(2): ds = gdal.Open('/vsimem/tiff_write_127.tif', gdal.GA_Update) obj = ds if i == 0 else ds.GetRasterBand(1) obj.SetMetadata({'key': 'value'}) obj = None ds = None ds = gdal.Open('/vsimem/tiff_write_127.tif', gdal.GA_Update) obj = ds if i == 0 else ds.GetRasterBand(1) if obj.GetMetadataItem('key') != 'value': print(i) pytest.fail(obj.GetMetadata()) obj.SetMetadata({}) obj = None ds = None ds = gdal.Open('/vsimem/tiff_write_127.tif', gdal.GA_Update) obj = ds if i == 0 else ds.GetRasterBand(1) assert not obj.GetMetadata(), i obj.SetMetadataItem('key', 'value') obj = None ds = None ds = gdal.Open('/vsimem/tiff_write_127.tif', gdal.GA_Update) obj = ds if i == 0 else ds.GetRasterBand(1) assert obj.GetMetadataItem('key') == 'value', i obj.SetMetadataItem('key', None) obj = None ds = None ds = gdal.Open('/vsimem/tiff_write_127.tif', gdal.GA_Update) obj = ds if i == 0 else ds.GetRasterBand(1) assert not obj.GetMetadata(), i obj = None ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_127.tif.aux.xml') if statBuf is not None: print(i) pytest.fail('unexpected PAM file') gdaltest.tiff_drv.Delete('/vsimem/tiff_write_127.tif') ############################################################################### # Test lossless copying of a CMYK JPEG into JPEG-in-TIFF (#5712) def test_tiff_write_128(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() gdal.SetConfigOption('GDAL_JPEG_TO_RGB', 'NO') src_ds = gdal.Open('../gdrivers/data/rgb_ntf_cmyk.jpg') gdal.SetConfigOption('GDAL_JPEG_TO_RGB', None) # Will received implicitly CMYK photometric interpretation. old_val = gdal.GetConfigOption('GDAL_PAM_ENABLED') gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_128.tif', src_ds, options=['COMPRESS=JPEG']) ds = None gdal.SetConfigOption('GDAL_PAM_ENABLED', old_val) # We need to reopen in raw to avoig automatic CMYK->RGBA to trigger ds = gdal.Open('GTIFF_RAW:/vsimem/tiff_write_128.tif') for i in range(4): assert src_ds.GetRasterBand(i + 1).GetColorInterpretation() == ds.GetRasterBand(i + 1).GetColorInterpretation() assert src_ds.GetRasterBand(i + 1).Checksum() == ds.GetRasterBand(i + 1).Checksum() ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_128.tif') # Try with explicit CMYK photometric interpretation old_val = gdal.GetConfigOption('GDAL_PAM_ENABLED') gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_128.tif', src_ds, options=['COMPRESS=JPEG', 'PHOTOMETRIC=CMYK']) ds = None gdal.SetConfigOption('GDAL_PAM_ENABLED', old_val) # We need to reopen in raw to avoig automatic CMYK->RGBA to trigger ds = gdal.Open('GTIFF_RAW:/vsimem/tiff_write_128.tif') for i in range(4): assert src_ds.GetRasterBand(i + 1).GetColorInterpretation() == ds.GetRasterBand(i + 1).GetColorInterpretation() assert src_ds.GetRasterBand(i + 1).Checksum() == ds.GetRasterBand(i + 1).Checksum() ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_128.tif') # Try with more neutral colorspace in the case the source JPEG is not really CMYK (yes that happens !) old_val = gdal.GetConfigOption('GDAL_PAM_ENABLED') gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_128.tif', src_ds, options=['COMPRESS=JPEG', 'PHOTOMETRIC=MINISBLACK', 'PROFILE=BASELINE']) ds = None gdal.SetConfigOption('GDAL_PAM_ENABLED', old_val) # Here we can reopen without GTIFF_RAW trick ds = gdal.Open('/vsimem/tiff_write_128.tif') for i in range(4): # The color interpretation will NOT be CMYK assert src_ds.GetRasterBand(i + 1).GetColorInterpretation() != ds.GetRasterBand(i + 1).GetColorInterpretation() assert src_ds.GetRasterBand(i + 1).Checksum() == ds.GetRasterBand(i + 1).Checksum() ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_128.tif') ############################################################################### # Check effective guessing of existing JPEG quality def test_tiff_write_129(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() for jpegtablesmode in ['1', '3']: for photometric in ['RGB', 'YCBCR']: cs_ref = 0 for i in range(2): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_129.tif', 64, 32, 3, options=['COMPRESS=JPEG', 'TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=32', 'JPEG_QUALITY=50', 'PHOTOMETRIC=' + photometric, 'JPEGTABLESMODE=' + jpegtablesmode]) src_ds = gdal.Open('data/rgbsmall.tif') data = src_ds.ReadRaster(0, 0, 32, 32) ds.WriteRaster(0, 0, 32, 32, data) # In second pass, we re-open the dataset if i == 1: ds = None ds = gdal.Open('/vsimem/tiff_write_129.tif', gdal.GA_Update) ds.WriteRaster(32, 0, 32, 32, data) ds = None ds = gdal.Open('/vsimem/tiff_write_129.tif') with gdaltest.SetCacheMax(0): cs = ds.GetRasterBand(1).Checksum() ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_129.tif') if i == 0: cs_ref = cs elif cs != cs_ref: print(photometric) print(i) pytest.fail(jpegtablesmode) ############################################################################### # Test cases where JPEG quality will fail def test_tiff_write_130(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() shutil.copyfile('data/byte_jpg_unusual_jpegtable.tif', 'tmp/byte_jpg_unusual_jpegtable.tif') ds = gdal.Open('tmp/byte_jpg_unusual_jpegtable.tif', gdal.GA_Update) assert ds.GetRasterBand(1).Checksum() == 4771 src_ds = gdal.Open('data/byte.tif', gdal.GA_Update) ds.WriteRaster(0, 0, 20, 20, src_ds.ReadRaster()) src_ds = None ds = None ds = gdal.Open('tmp/byte_jpg_unusual_jpegtable.tif') assert ds.GetRasterBand(1).Checksum() == 4743 ds = None os.unlink('tmp/byte_jpg_unusual_jpegtable.tif') shutil.copyfile('data/byte_jpg_tablesmodezero.tif', 'tmp/byte_jpg_tablesmodezero.tif') ds = gdal.Open('tmp/byte_jpg_tablesmodezero.tif', gdal.GA_Update) assert ds.GetRasterBand(1).Checksum() == 4743 src_ds = gdal.Open('data/byte.tif', gdal.GA_Update) ds.WriteRaster(0, 0, 20, 20, src_ds.ReadRaster()) src_ds = None ds = None ds = gdal.Open('tmp/byte_jpg_tablesmodezero.tif') assert ds.GetRasterBand(1).Checksum() == 4743 ds = None os.unlink('tmp/byte_jpg_tablesmodezero.tif') ############################################################################### # Test LZMA compression def test_tiff_write_131(level=1): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LZMA') == -1: pytest.skip() filename = '/vsimem/tiff_write_131.tif' src_ds = gdal.Open('data/byte.tif') ds = gdaltest.tiff_drv.CreateCopy(filename, src_ds, options=['COMPRESS=LZMA', 'LZMA_PRESET=' + str(level)]) assert ds.GetRasterBand(1).Checksum() == 4672 ds = None # LZMA requires an howful amount of memory even on small files if gdal.GetLastErrorMsg().find('cannot allocate memory') >= 0: gdal.Unlink(filename) pytest.skip() ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdal.Unlink(filename) def test_tiff_write_131_level_9(): return test_tiff_write_131(level=9) ############################################################################### # Test that PAM metadata is cleared when internal metadata is set (#5807) def test_tiff_write_132(): for i in range(2): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_132.tif', 1, 1) ds = None # Open in read-only ds = gdal.Open('/vsimem/tiff_write_132.tif') ds.SetMetadataItem('FOO', 'BAR') ds.GetRasterBand(1).SetMetadataItem('FOO', 'BAR') ds = None # Check that PAM file exists assert gdal.VSIStatL('/vsimem/tiff_write_132.tif.aux.xml') is not None # Open in read-write ds = gdal.Open('/vsimem/tiff_write_132.tif', gdal.GA_Update) if i == 0: ds.SetMetadataItem('FOO', 'BAZ') ds.GetRasterBand(1).SetMetadataItem('FOO', 'BAZ') else: ds.SetMetadata({'FOO': 'BAZ'}) ds.GetRasterBand(1).SetMetadata({'FOO': 'BAZ'}) ds = None # Check that PAM file no longer exists assert gdal.VSIStatL('/vsimem/tiff_write_132.tif.aux.xml') is None, i ds = gdal.Open('/vsimem/tiff_write_132.tif') assert ds.GetMetadataItem('FOO') == 'BAZ' and ds.GetRasterBand(1).GetMetadataItem('FOO') == 'BAZ' ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_132.tif') ############################################################################### # Test streaming capabilities def test_tiff_write_133(): src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_133.tif', 1024, 1000, 3, options=['STREAMABLE_OUTPUT=YES']) src_ds.SetGeoTransform([1, 2, 0, 3, 0, -2]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:32601') src_ds.SetProjection(srs.ExportToWkt()) src_ds.SetMetadataItem('FOO', 'BAR') src_ds.GetRasterBand(1).SetNoDataValue(127) src_ds.GetRasterBand(1).Fill(64) src_ds.GetRasterBand(2).Fill(127) src_ds.GetRasterBand(3).Fill(184) src_ds.FlushCache() gdal.PushErrorHandler() ret = src_ds.SetProjection(srs.ExportToWkt()) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = src_ds.SetGeoTransform([1, 2, 0, 3, 0, -4]) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = src_ds.SetMetadataItem('FOO', 'BAZ') gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = src_ds.SetMetadata({}) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = src_ds.GetRasterBand(1).SetMetadataItem('FOO', 'BAZ') gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = src_ds.GetRasterBand(1).SetMetadata({}) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = src_ds.GetRasterBand(1).SetNoDataValue(0) gdal.PopErrorHandler() assert ret != 0 # Pixel interleaved out_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_133_dst.tif', src_ds, options=['STREAMABLE_OUTPUT=YES', 'BLOCKYSIZE=32']) out_ds = None gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') ds = gdal.Open('/vsimem/tiff_write_133_dst.tif') gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds.GetProjectionRef().find('32601') >= 0 assert ds.GetGeoTransform() == (1.0, 2.0, 0.0, 3.0, 0.0, -2.0) assert ds.GetMetadataItem('FOO') == 'BAR' assert ds.GetMetadataItem('UNORDERED_BLOCKS', 'TIFF') is None with gdaltest.SetCacheMax(0): for y in range(1000): got_data = ds.ReadRaster(0, y, 1024, 1) assert got_data is not None ds.FlushCache() for y in range(1000): gdal.PushErrorHandler() got_data = ds.ReadRaster(0, y, 1024, 1) gdal.PopErrorHandler() assert got_data is None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_133_dst.tif') # Tiled out_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_133_dst.tif', src_ds, options=['STREAMABLE_OUTPUT=YES', 'TILED=YES']) out_ds = None gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') ds = gdal.Open('/vsimem/tiff_write_133_dst.tif') gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds.GetProjectionRef().find('32601') >= 0 assert ds.GetGeoTransform() == (1.0, 2.0, 0.0, 3.0, 0.0, -2.0) assert ds.GetMetadataItem('FOO') == 'BAR' assert ds.GetMetadataItem('UNORDERED_BLOCKS', 'TIFF') is None with gdaltest.SetCacheMax(0): for yblock in range(int((1000 + 256 - 1) / 256)): y = 256 * yblock ysize = 256 if y + ysize > ds.RasterYSize: ysize = ds.RasterYSize - y for xblock in range(int((1024 + 256 - 1) / 256)): x = 256 * xblock xsize = 256 if x + xsize > ds.RasterXSize: xsize = ds.RasterXSize - x got_data = ds.ReadRaster(x, y, xsize, ysize) assert got_data is not None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_133_dst.tif') # Band interleaved out_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_133_dst.tif', src_ds, options=['STREAMABLE_OUTPUT=YES', 'INTERLEAVE=BAND']) out_ds = None gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') ds = gdal.Open('/vsimem/tiff_write_133_dst.tif') gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds.GetMetadataItem('UNORDERED_BLOCKS', 'TIFF') is None with gdaltest.SetCacheMax(0): for band in range(3): for y in range(1000): got_data = ds.GetRasterBand(band + 1).ReadRaster(0, y, 1024, 1) assert got_data is not None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_133_dst.tif') # BIGTIFF md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('BigTIFF') >= 0: out_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_133_dst.tif', src_ds, options=['STREAMABLE_OUTPUT=YES', 'BIGTIFF=YES']) out_ds = None gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') ds = gdal.Open('/vsimem/tiff_write_133_dst.tif') gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds.GetMetadataItem('UNORDERED_BLOCKS', 'TIFF') is None with gdaltest.SetCacheMax(0): for y in range(1000): got_data = ds.ReadRaster(0, y, 1024, 1) assert got_data is not None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_133_dst.tif') # Compression not supported gdal.PushErrorHandler() out_ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_133_dst.tif', src_ds, options=['STREAMABLE_OUTPUT=YES', 'COMPRESS=DEFLATE']) gdal.PopErrorHandler() assert out_ds is None # Test writing into a non authorized file ds = gdaltest.tiff_drv.Create('/foo/bar', 1024, 1000, 3, options=['STREAMABLE_OUTPUT=YES', 'BLOCKYSIZE=1']) assert ds is None gdal.PushErrorHandler() out_ds = gdaltest.tiff_drv.CreateCopy('/foo/bar', src_ds, options=['STREAMABLE_OUTPUT=YES']) gdal.PopErrorHandler() assert out_ds is None src_ds = None # Classical TIFF with IFD not at offset 8 gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') gdal.PushErrorHandler() ds = gdal.Open('data/byte.tif') gdal.PopErrorHandler() gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds is None # BigTIFF with IFD not at offset 16 if md['DMD_CREATIONOPTIONLIST'].find('BigTIFF') >= 0: ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_133.tif', 1024, 1000, 3, options=['BIGTIFF=YES']) ds.GetRasterBand(1).Fill(0) ds.FlushCache() ds.SetGeoTransform([1, 2, 0, 3, 0, -2]) ds = None gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') gdal.PushErrorHandler() ds = gdal.Open('/vsimem/tiff_write_133.tif') gdal.PopErrorHandler() gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds is None # Test reading strips in not increasing order ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_133.tif', 1024, 1000, 3, options=['BLOCKYSIZE=1']) for y in range(1000): ds.WriteRaster(0, 1000 - y - 1, 1024, 1, 'a' * (3 * 1024)) ds.FlushCache() ds = None gdal.SetConfigOption('TIFF_READ_STREAMING', 'YES') gdal.PushErrorHandler() ds = gdal.Open('/vsimem/tiff_write_133.tif') gdal.PopErrorHandler() gdal.SetConfigOption('TIFF_READ_STREAMING', None) assert ds.GetMetadataItem('UNORDERED_BLOCKS', 'TIFF') == 'YES' with gdaltest.SetCacheMax(0): for y in range(1000): got_data = ds.ReadRaster(0, 1000 - y - 1, 1024, 1) assert got_data is not None # Test writing strips in not increasing order in a streamable output ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_133.tif', 1024, 1000, 3, options=['STREAMABLE_OUTPUT=YES', 'BLOCKYSIZE=1']) gdal.ErrorReset() gdal.PushErrorHandler() ret = ds.WriteRaster(0, 999, 1024, 1, 'a' * (3 * 1024)) ds.FlushCache() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' ds = None # Test writing tiles in not increasing order in a streamable output ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_133.tif', 1024, 1000, 3, options=['STREAMABLE_OUTPUT=YES', 'TILED=YES']) gdal.ErrorReset() gdal.PushErrorHandler() ret = ds.WriteRaster(256, 256, 256, 256, 'a' * (3 * 256 * 256)) ds.FlushCache() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_133.tif') ############################################################################### # Test DISCARD_LSB def test_tiff_write_134(): for interleave in ['BAND', 'PIXEL']: ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_134.tif', 1, 1, 3, options=['DISCARD_LSB=0,1,3', 'INTERLEAVE='+interleave]) ds.GetRasterBand(1).Fill(127) ds.GetRasterBand(2).Fill(127) ds.GetRasterBand(3).Fill(127) ds = None ds = gdal.Open('/vsimem/tiff_write_134.tif') val1 = struct.unpack('B', ds.GetRasterBand(1).ReadRaster())[0] val2 = struct.unpack('B', ds.GetRasterBand(2).ReadRaster())[0] val3 = struct.unpack('B', ds.GetRasterBand(3).ReadRaster())[0] assert val1 == 127 and val2 == 126 and val3 == 124 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_134.tif') src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_134_src.tif', 1, 1, 3) src_ds.GetRasterBand(1).Fill(127) src_ds.GetRasterBand(2).Fill(127) src_ds.GetRasterBand(3).Fill(255) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_134.tif', src_ds, options=['DISCARD_LSB=0,1,3']) ds = None ds = gdal.Open('/vsimem/tiff_write_134.tif') val1 = struct.unpack('B', ds.GetRasterBand(1).ReadRaster())[0] val2 = struct.unpack('B', ds.GetRasterBand(2).ReadRaster())[0] val3 = struct.unpack('B', ds.GetRasterBand(3).ReadRaster())[0] assert val1 == 127 and val2 == 126 and val3 == 255 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_134_src.tif') gdaltest.tiff_drv.Delete('/vsimem/tiff_write_134.tif') for interleave in ['BAND', 'PIXEL']: for dt in [gdal.GDT_Byte, gdal.GDT_UInt16, gdal.GDT_UInt32]: ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_134.tif', 1, 1, 3, dt, options=['DISCARD_LSB=3', 'INTERLEAVE='+interleave]) ds.GetRasterBand(1).Fill(127) ds.GetRasterBand(2).Fill(127) ds.GetRasterBand(3).Fill(127) ds = None ds = gdal.Open('/vsimem/tiff_write_134.tif') val1 = struct.unpack('B', ds.GetRasterBand(1).ReadRaster(0,0,1,1,1,1,gdal.GDT_Byte))[0] val2 = struct.unpack('B', ds.GetRasterBand(2).ReadRaster(0,0,1,1,1,1,gdal.GDT_Byte))[0] val3 = struct.unpack('B', ds.GetRasterBand(3).ReadRaster(0,0,1,1,1,1,gdal.GDT_Byte))[0] assert val1 == 124 and val2 == 124 and val3 == 124 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_134.tif') # Error cases gdal.ErrorReset() with gdaltest.error_handler(): gdaltest.tiff_drv.Create('/vsimem/tiff_write_134.tif', 1, 1, options=['DISCARD_LSB=1', 'PHOTOMETRIC=PALETTE']) assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() with gdaltest.error_handler(): # Too many elements gdaltest.tiff_drv.Create('/vsimem/tiff_write_134.tif', 1, 1, options=['DISCARD_LSB=1,2']) assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() with gdaltest.error_handler(): # Too many elements gdaltest.tiff_drv.Create('/vsimem/tiff_write_134.tif', 1, 1, options=['DISCARD_LSB=1', 'NBITS=7']) assert gdal.GetLastErrorMsg() != '' ############################################################################### # Test clearing GCPs (#5945) def test_tiff_write_135(): # Simple clear src_ds = gdal.Open('data/gcps.vrt') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_135.tif', src_ds) ds = None ds = gdal.Open('/vsimem/tiff_write_135.tif', gdal.GA_Update) ds.SetGCPs([], '') ds = None ds = gdal.Open('/vsimem/tiff_write_135.tif') assert not ds.GetGCPs() assert ds.GetGCPProjection() == '' ds = None # Double clear src_ds = gdal.Open('data/gcps.vrt') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_135.tif', src_ds) ds = None ds = gdal.Open('/vsimem/tiff_write_135.tif', gdal.GA_Update) ds.SetGCPs([], '') ds.SetGCPs([], '') ds = None ds = gdal.Open('/vsimem/tiff_write_135.tif') assert not ds.GetGCPs() assert ds.GetGCPProjection() == '' ds = None # Clear + set geotransform and new projection src_ds = gdal.Open('data/gcps.vrt') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_135.tif', src_ds) ds = None ds = gdal.Open('/vsimem/tiff_write_135.tif', gdal.GA_Update) ds.SetGCPs([], '') ds.SetGeoTransform([1, 2, 3, 4, 5, -6]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:32601') ds.SetProjection(srs.ExportToWkt()) ds = None ds = gdal.Open('/vsimem/tiff_write_135.tif') assert not ds.GetGCPs() assert ds.GetGeoTransform() == (1, 2, 3, 4, 5, -6) assert ds.GetProjectionRef().find('32601') >= 0 ds = None gdal.Unlink('/vsimem/tiff_write_135.tif') ############################################################################### # Test writing a single-strip mono-bit dataset def test_tiff_write_136(): src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_136_src.tif', 8, 2001) src_ds.GetRasterBand(1).Fill(1) expected_cs = src_ds.GetRasterBand(1).Checksum() ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_136.tif', src_ds, options=['NBITS=1', 'COMPRESS=DEFLATE', 'BLOCKYSIZE=2001']) src_ds = None ds = None ds = gdal.Open('/vsimem/tiff_write_136.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == expected_cs gdal.Unlink('/vsimem/tiff_write_136_src.tif') gdal.Unlink('/vsimem/tiff_write_136.tif') gdal.Unlink('/vsimem/tiff_write_136.tif.aux.xml') ############################################################################### # Test multi-threaded writing def test_tiff_write_137(): src_ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_137_src.tif', 4000, 4000) src_ds.GetRasterBand(1).Fill(1) data = src_ds.GetRasterBand(1).ReadRaster() expected_cs = src_ds.GetRasterBand(1).Checksum() # Test NUM_THREADS as creation option ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_137.tif', src_ds, options=['BLOCKYSIZE=16', 'COMPRESS=DEFLATE', 'NUM_THREADS=ALL_CPUS']) src_ds = None ds = None ds = gdal.Open('/vsimem/tiff_write_137.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == expected_cs # Test NUM_THREADS as creation option with Create() ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_137.tif', 4000, 4000, 1, options=['BLOCKYSIZE=16', 'COMPRESS=DEFLATE', 'NUM_THREADS=ALL_CPUS']) ds.GetRasterBand(1).WriteRaster(0, 0, 4000, 4000, data) ds = None ds = gdal.Open('/vsimem/tiff_write_137.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == expected_cs # Test NUM_THREADS as open option ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_137.tif', 4000, 4000, options=['TILED=YES', 'COMPRESS=DEFLATE', 'PREDICTOR=2', 'SPARSE_OK=YES']) ds = None ds = gdal.OpenEx('/vsimem/tiff_write_137.tif', gdal.OF_UPDATE, open_options=['NUM_THREADS=4']) ds.GetRasterBand(1).Fill(1) ds = None ds = gdal.Open('/vsimem/tiff_write_137.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == expected_cs # Ask data immediately while the block is compressed ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_137.tif', 4000, 4000, options=['BLOCKYSIZE=3999', 'COMPRESS=DEFLATE', 'NUM_THREADS=4']) ds.WriteRaster(0, 0, 1, 1, 'A') ds.FlushCache() val = ds.ReadRaster(0, 0, 1, 1).decode('ascii') assert val == 'A' ds = None gdal.Unlink('/vsimem/tiff_write_137_src.tif') gdal.Unlink('/vsimem/tiff_write_137.tif') # Test NUM_THREADS with raster == tile src_ds = gdal.Open('data/byte.tif') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_137.tif', src_ds, options=['BLOCKYSIZE=20', 'COMPRESS=DEFLATE', 'NUM_THREADS=ALL_CPUS']) src_ds = None ds = None ds = gdal.Open('/vsimem/tiff_write_137.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4672, expected_cs gdal.Unlink('/vsimem/tiff_write_137.tif') ############################################################################### # Test that pixel-interleaved writing generates optimal size def test_tiff_write_138(): # Test that consecutive IWriteBlock() calls for the same block but in # different bands only generate a single tile write, and not 3 rewrites ds = gdal.GetDriverByName('GTiff').Create( '/vsimem/tiff_write_138.tif', 10, 1, 3, options=['COMPRESS=DEFLATE']) ds.GetRasterBand(1).WriteRaster(0, 0, 10, 1, 'A', buf_xsize=1, buf_ysize=1) ds.GetRasterBand(1).FlushCache() ds.GetRasterBand(2).WriteRaster(0, 0, 10, 1, 'A', buf_xsize=1, buf_ysize=1) ds.GetRasterBand(2).FlushCache() ds.GetRasterBand(3).WriteRaster(0, 0, 10, 1, 'A', buf_xsize=1, buf_ysize=1) ds.GetRasterBand(3).FlushCache() ds = None size = gdal.VSIStatL('/vsimem/tiff_write_138.tif').size assert size == 181 # Test fix for #5999 # Create a file with a huge block that will saturate the block cache. with gdaltest.SetCacheMax(1000000): tmp_ds = gdal.GetDriverByName('GTiff').Create( '/vsimem/tiff_write_138_saturate.tif', gdal.GetCacheMax(), 1) tmp_ds = None ds = gdal.GetDriverByName('GTiff').Create( '/vsimem/tiff_write_138.tif', 10, 1, 3, options=['COMPRESS=DEFLATE']) ds.GetRasterBand(1).WriteRaster(0, 0, 10, 1, 'A', buf_xsize=1, buf_ysize=1) ds.GetRasterBand(2).WriteRaster(0, 0, 10, 1, 'A', buf_xsize=1, buf_ysize=1) ds.GetRasterBand(3).WriteRaster(0, 0, 10, 1, 'A', buf_xsize=1, buf_ysize=1) # When internalizing the huge block, check that the 3 above dirty blocks # get written as a single tile write. tmp_ds = gdal.Open('/vsimem/tiff_write_138_saturate.tif') tmp_ds.GetRasterBand(1).Checksum() tmp_ds = None ds = None size = gdal.VSIStatL('/vsimem/tiff_write_138.tif').size assert size == 181 gdal.Unlink('/vsimem/tiff_write_138.tif') gdal.Unlink('/vsimem/tiff_write_138_saturate.tif') ############################################################################### # Test that pixel-interleaved writing generates optimal size def test_tiff_write_139(): drv = gdal.GetDriverByName('GTiff') # Only post 4.0.5 has the fix for non-byte swabing case has_inverted_swab_fix = drv.GetMetadataItem('LIBTIFF') == 'INTERNAL' # In the byte case, there are optimizations for the 3 and 4 case. 1 is the general case for nbands in (1, 3, 4): ds = drv.Create('/vsimem/tiff_write_139.tif', 4, 1, nbands, options=['PREDICTOR=2', 'COMPRESS=DEFLATE']) ref_content = struct.pack('B' * 4, 255, 0, 255, 0) for i in range(nbands): ds.GetRasterBand(i + 1).WriteRaster(0, 0, 4, 1, ref_content) ds = None ds = gdal.Open('/vsimem/tiff_write_139.tif') for i in range(nbands): content = ds.GetRasterBand(i + 1).ReadRaster() assert ref_content == content ds = None gdal.Unlink('/vsimem/tiff_write_139.tif') # Int16 for endianness in ['NATIVE', 'INVERTED']: if endianness == 'INVERTED' and not has_inverted_swab_fix: continue ds = drv.Create('/vsimem/tiff_write_139.tif', 6, 1, 1, gdal.GDT_Int16, options=['PREDICTOR=2', 'COMPRESS=DEFLATE', 'ENDIANNESS=%s' % endianness]) ref_content = struct.pack('h' * 6, -32768, 32767, -32768, 32767, -32768, 32767) ds.GetRasterBand(1).WriteRaster(0, 0, 6, 1, ref_content) ds = None ds = gdal.Open('/vsimem/tiff_write_139.tif') content = ds.GetRasterBand(1).ReadRaster() if ref_content != content: print(endianness) pytest.fail(struct.unpack('h' * 6, content)) ds = None gdal.Unlink('/vsimem/tiff_write_139.tif') # UInt16 (same code path) for endianness in ['NATIVE', 'INVERTED']: if endianness == 'INVERTED' and not has_inverted_swab_fix: continue ds = drv.Create('/vsimem/tiff_write_139.tif', 6, 1, 1, gdal.GDT_UInt16, options=['PREDICTOR=2', 'COMPRESS=DEFLATE', 'ENDIANNESS=%s' % endianness]) ref_content = struct.pack('H' * 6, 0, 65535, 0, 65535, 0, 65535) ds.GetRasterBand(1).WriteRaster(0, 0, 6, 1, ref_content) ds = None ds = gdal.Open('/vsimem/tiff_write_139.tif') content = ds.GetRasterBand(1).ReadRaster() if ref_content != content: print(endianness) pytest.fail(struct.unpack('H' * 6, content)) ds = None gdal.Unlink('/vsimem/tiff_write_139.tif') # Int32 for endianness in ['NATIVE', 'INVERTED']: if endianness == 'INVERTED' and not has_inverted_swab_fix: continue ds = drv.Create('/vsimem/tiff_write_139.tif', 6, 1, 1, gdal.GDT_UInt32, options=['PREDICTOR=2', 'COMPRESS=DEFLATE', 'ENDIANNESS=%s' % endianness]) ref_content = struct.pack('I' * 6, 0, 2000000000, 0, 2000000000, 0, 2000000000) ds.GetRasterBand(1).WriteRaster(0, 0, 6, 1, ref_content) ds = None ds = gdal.Open('/vsimem/tiff_write_139.tif') content = ds.GetRasterBand(1).ReadRaster() if ref_content != content: print(endianness) pytest.fail(struct.unpack('I' * 6, content)) ds = None gdal.Unlink('/vsimem/tiff_write_139.tif') # Test floating-point predictor # Seems to be broken with ENDIANNESS=INVERTED ds = drv.Create('/vsimem/tiff_write_139.tif', 4, 1, 1, gdal.GDT_Float64, options=['PREDICTOR=3', 'COMPRESS=DEFLATE']) ref_content = struct.pack('d' * 4, 1, -1e100, 1e10, -1e5) ds.GetRasterBand(1).WriteRaster(0, 0, 4, 1, ref_content) ds = None ds = gdal.Open('/vsimem/tiff_write_139.tif') content = ds.GetRasterBand(1).ReadRaster() assert ref_content == content, struct.unpack('d' * 4, content) ds = None gdal.Unlink('/vsimem/tiff_write_139.tif') ############################################################################### # Test setting a band to alpha def test_tiff_write_140(): # Nominal case: set alpha to last band ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_140.tif', 1, 1, 5) ds.GetRasterBand(5).SetColorInterpretation(gdal.GCI_AlphaBand) ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_140.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open('/vsimem/tiff_write_140.tif') assert ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None # Strange case: set alpha to a band, but it is already set on another one ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_140.tif', 1, 1, 5) ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_AlphaBand) # Should emit a warning gdal.ErrorReset() with gdaltest.error_handler(): ret = ds.GetRasterBand(5).SetColorInterpretation(gdal.GCI_AlphaBand) assert gdal.GetLastErrorMsg() != '' assert ret == 0 ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_140.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open('/vsimem/tiff_write_140.tif') assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None # Strange case: set alpha to a band, but it is already set on another one (because of ALPHA=YES) ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_140.tif', 1, 1, 5, options=['ALPHA=YES']) # Should emit a warning mentioning ALPHA creation option. gdal.ErrorReset() with gdaltest.error_handler(): ret = ds.GetRasterBand(5).SetColorInterpretation(gdal.GCI_AlphaBand) assert gdal.GetLastErrorMsg().find('ALPHA') >= 0 assert ret == 0 ds = None statBuf = gdal.VSIStatL('/vsimem/tiff_write_140.tif.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open('/vsimem/tiff_write_140.tif') assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_140.tif') ############################################################################### # Test GEOTIFF_KEYS_FLAVOR=ESRI_PE with EPSG:3857 def test_tiff_write_141(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_141.tif', 1, 1, options=['GEOTIFF_KEYS_FLAVOR=ESRI_PE']) srs = osr.SpatialReference() srs.ImportFromEPSG(3857) ds.SetProjection(srs.ExportToWkt()) ds = None ds = gdal.Open('/vsimem/tiff_write_141.tif') wkt = ds.GetProjectionRef() ds = None assert wkt.startswith('PROJCS["WGS 84 / Pseudo-Mercator"') assert 'EXTENSION["PROJ4"' in wkt gdaltest.tiff_drv.Delete('/vsimem/tiff_write_141.tif') ############################################################################### # Test PixelIsPoint without SRS (#6225) def test_tiff_write_142(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_142.tif', 1, 1) ds.SetMetadataItem('AREA_OR_POINT', 'Point') ds.SetGeoTransform([10, 1, 0, 100, 0, -1]) ds = None src_ds = gdal.Open('/vsimem/tiff_write_142.tif') gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_142_2.tif', src_ds) src_ds = None ds = gdal.Open('/vsimem/tiff_write_142_2.tif') gt = ds.GetGeoTransform() md = ds.GetMetadataItem('AREA_OR_POINT') ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_142.tif') gdaltest.tiff_drv.Delete('/vsimem/tiff_write_142_2.tif') gt_expected = (10, 1, 0, 100, 0, -1) assert gt == gt_expected, 'did not get expected geotransform' assert md == 'Point', 'did not get expected AREA_OR_POINT value' ############################################################################### # Check that we detect that free space isn't sufficient def test_tiff_write_143(): with gdaltest.error_handler(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_143.tif', 1000000000, 1000000000) assert ds is None ############################################################################### # Test creating a real BigTIFF file > 4 GB with multiple directories (on filesystems supporting sparse files) def test_tiff_write_144(): # Determine if the filesystem supports sparse files (we don't want to create a real 10 GB # file ! if not gdaltest.filesystem_supports_sparse_files('tmp'): pytest.skip() ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_write_144.tif', 20, 20, 1, options=['BIGTIFF=YES']) ds.GetRasterBand(1).Fill(255) ds = None # Extend the file to 4 GB f = open('tmp/tiff_write_144.tif', 'rb+') f.seek(4294967296, 0) f.write(' '.encode('ascii')) f.close() ds = gdal.Open('tmp/tiff_write_144.tif', gdal.GA_Update) ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open('tmp/tiff_write_144.tif') got_cs = ds.GetRasterBand(1).Checksum() got_cs_ovr = ds.GetRasterBand(1).GetOverview(0).Checksum() ds = None gdal.Unlink('tmp/tiff_write_144.tif') assert got_cs == 4873 and got_cs_ovr == 1218 ############################################################################### # Test various warnings / errors of Create() def test_tiff_write_145(): options_list = [{'bands': 65536, 'expected_failure': True}, {'creation_options': ['INTERLEAVE=foo'], 'expected_failure': True}, {'creation_options': ['COMPRESS=foo'], 'expected_failure': False}, {'creation_options': ['STREAMABLE_OUTPUT=YES', 'SPARSE_OK=YES'], 'expected_failure': True}, {'creation_options': ['STREAMABLE_OUTPUT=YES', 'COPY_SRC_OVERVIEWS=YES'], 'expected_failure': True}, {'use_tmp': True, 'xsize': 100000, 'ysize': 100000, 'creation_options': ['BIGTIFF=NO'], 'expected_failure': True}, {'creation_options': ['ENDIANNESS=foo'], 'expected_failure': False}, {'creation_options': ['NBITS=9'], 'expected_failure': False}, {'datatype': gdal.GDT_Float32, 'creation_options': ['NBITS=8'], 'expected_failure': False}, {'datatype': gdal.GDT_UInt16, 'creation_options': ['NBITS=8'], 'expected_failure': False}, {'datatype': gdal.GDT_UInt16, 'creation_options': ['NBITS=17'], 'expected_failure': False}, {'datatype': gdal.GDT_UInt32, 'creation_options': ['NBITS=16'], 'expected_failure': False}, {'datatype': gdal.GDT_UInt32, 'creation_options': ['NBITS=33'], 'expected_failure': False}, {'bands': 3, 'creation_options': ['PHOTOMETRIC=YCBCR'], 'expected_failure': True}, {'bands': 3, 'creation_options': ['PHOTOMETRIC=YCBCR', 'COMPRESS=JPEG', 'INTERLEAVE=BAND'], 'expected_failure': True}, {'bands': 1, 'creation_options': ['PHOTOMETRIC=YCBCR', 'COMPRESS=JPEG'], 'expected_failure': True}, {'creation_options': ['PHOTOMETRIC=foo'], 'expected_failure': False}, {'creation_options': ['PHOTOMETRIC=RGB'], 'expected_failure': False}, {'creation_options': ['TILED=YES', 'BLOCKSIZE=1', 'BLOCKYSIZE=1'], 'expected_failure': True}, ] for options in options_list: xsize = options.get('xsize', 1) ysize = options.get('ysize', 1) bands = options.get('bands', 1) datatype = options.get('datatype', gdal.GDT_Byte) use_tmp = options.get('use_tmp', False) if use_tmp: filename = 'tmp/tiff_write_145.tif' else: filename = '/vsimem/tiff_write_145.tif' creation_options = options.get('creation_options', []) gdal.Unlink(filename) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdaltest.tiff_drv.Create(filename, xsize, ysize, bands, datatype, options=creation_options) if ds is not None and options.get('expected_failure', False): print(options) pytest.fail('expected failure, but did not get it') elif ds is None and not options.get('expected_failure', False): print(options) pytest.fail('got failure, but did not expect it') ds = None # print(gdal.GetLastErrorMsg()) if gdal.GetLastErrorMsg() == '': print(options) pytest.fail('did not get any warning/error') gdal.Unlink(filename) ############################################################################### # Test implicit JPEG-in-TIFF overviews with RGBA (not completely sure this # is a legal formulation since 4 bands should probably be seen as CMYK) def test_tiff_write_146(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() tmp_ds = gdal.Translate('', 'data/stefan_full_rgba.tif', format='MEM') original_stats = [tmp_ds.GetRasterBand(i + 1).ComputeStatistics(True) for i in range(4)] gdal.Translate('/vsimem/tiff_write_146.tif', 'data/stefan_full_rgba.tif', options='-outsize 1000% 1000% -co COMPRESS=JPEG') out_ds = gdal.Open('/vsimem/tiff_write_146.tif') got_stats = [out_ds.GetRasterBand(i + 1).GetOverview(2).ComputeStatistics(True) for i in range(4)] out_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_write_146.tif') for i in range(4): for j in range(4): assert i == 2 or j < 2 or original_stats[i][j] == pytest.approx(got_stats[i][j], abs=5), \ 'did not get expected statistics' ############################################################################### # Test that we don't use implicit JPEG-in-TIFF overviews with CMYK when converting # to RGBA def test_tiff_write_147(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() gdal.SetConfigOption('GDAL_JPEG_TO_RGB', 'NO') gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') gdal.Translate('/vsimem/tiff_write_147.tif', '../gdrivers/data/rgb_ntf_cmyk.jpg', options='-outsize 1000% 1000% -co COMPRESS=JPEG -co PHOTOMETRIC=CMYK') gdal.SetConfigOption('GDAL_JPEG_TO_RGB', None) gdal.SetConfigOption('GDAL_PAM_ENABLED', None) out_ds = gdal.Open('/vsimem/tiff_write_147.tif') assert out_ds.GetRasterBand(1).GetOverview(0) is None, 'did not expected overview' out_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_write_147.tif') ############################################################################### # Test that we can use implicit JPEG-in-TIFF overviews with CMYK in raw mode def test_tiff_write_148(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() gdal.SetConfigOption('GDAL_JPEG_TO_RGB', 'NO') tmp_ds = gdal.Translate('', '../gdrivers/data/rgb_ntf_cmyk.jpg', format='MEM') gdal.SetConfigOption('GDAL_JPEG_TO_RGB', None) original_stats = [tmp_ds.GetRasterBand(i + 1).ComputeStatistics(True) for i in range(4)] gdal.SetConfigOption('GDAL_JPEG_TO_RGB', 'NO') gdal.SetConfigOption('GDAL_PAM_ENABLED', 'NO') gdal.Translate('/vsimem/tiff_write_148.tif', '../gdrivers/data/rgb_ntf_cmyk.jpg', options='-outsize 1000% 1000% -co COMPRESS=JPEG -co PHOTOMETRIC=CMYK') gdal.SetConfigOption('GDAL_JPEG_TO_RGB', None) gdal.SetConfigOption('GDAL_PAM_ENABLED', None) out_ds = gdal.Open('GTIFF_RAW:/vsimem/tiff_write_148.tif') got_stats = [out_ds.GetRasterBand(i + 1).GetOverview(0).ComputeStatistics(True) for i in range(4)] out_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tiff_write_148.tif') for i in range(4): for j in range(4): assert j < 2 or original_stats[i][j] == pytest.approx(got_stats[i][j], abs=5), \ 'did not get expected statistics' ############################################################################### # Test filling missing blocks with nodata def test_tiff_write_149(): # Power-of-two bit depth ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_149.tif', 1, 1) ds.GetRasterBand(1).SetNoDataValue(127) ds = None ds = gdal.Open('/vsimem/tiff_write_149.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 1 gdaltest.tiff_drv.Delete('/vsimem/tiff_write_149.tif') # Test implicit blocks expected_cs = 13626 ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_149.tif', 40, 30, 2, gdal.GDT_UInt16, options=['NBITS=12', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'INTERLEAVE=BAND', 'SPARSE_OK=YES']) ds.GetRasterBand(1).SetNoDataValue(127) ds.GetRasterBand(2).SetNoDataValue(127) ds = None ds = gdal.Open('/vsimem/tiff_write_149.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == expected_cs gdaltest.tiff_drv.Delete('/vsimem/tiff_write_149.tif') # NBITS=12, SEPARATE. Checksum must be the same as in the implicit blocks case ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_149.tif', 40, 30, 2, gdal.GDT_UInt16, options=['NBITS=12', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'INTERLEAVE=BAND']) ds.GetRasterBand(1).SetNoDataValue(127) ds.GetRasterBand(2).SetNoDataValue(127) ds = None ds = gdal.Open('/vsimem/tiff_write_149.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == expected_cs gdaltest.tiff_drv.Delete('/vsimem/tiff_write_149.tif') # NBITS=12, CONTIG. Checksum must be the same as in the implicit blocks case ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_149.tif', 40, 30, 2, gdal.GDT_UInt16, options=['NBITS=12', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'INTERLEAVE=PIXEL']) ds.GetRasterBand(1).SetNoDataValue(127) ds.GetRasterBand(2).SetNoDataValue(127) ds = None ds = gdal.Open('/vsimem/tiff_write_149.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == expected_cs gdaltest.tiff_drv.Delete('/vsimem/tiff_write_149.tif') ############################################################################### # Test failure when loading block from disk in IWriteBlock() def test_tiff_write_150(): shutil.copy('data/tiled_bad_offset.tif', 'tmp/tiled_bad_offset.tif') ds = gdal.Open('tmp/tiled_bad_offset.tif', gdal.GA_Update) ds.GetRasterBand(1).Fill(0) gdal.ErrorReset() with gdaltest.error_handler(): ds.FlushCache() assert gdal.GetLastErrorMsg() != '' ds = None gdaltest.tiff_drv.Delete('tmp/tiled_bad_offset.tif') ############################################################################### # Test IWriteBlock() with more than 10 bands def test_tiff_write_151(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_151.tif', 1, 1, 11) ds = None ds = gdal.Open('/vsimem/tiff_write_151.tif', gdal.GA_Update) ds.GetRasterBand(1).Fill(1) ds = None ds = gdal.Open('/vsimem/tiff_write_151.tif', gdal.GA_Update) ds.GetRasterBand(1).Checksum() ds.GetRasterBand(2).Fill(1) ds.GetRasterBand(3).Fill(1) ds = None ds = gdal.Open('/vsimem/tiff_write_151.tif') assert ds.GetRasterBand(1).Checksum() == 1 assert ds.GetRasterBand(2).Checksum() == 1 assert ds.GetRasterBand(3).Checksum() == 1 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_151.tif') ############################################################################### # Test flushing of blocks in a contig multi band file with Create() def test_tiff_write_152(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_152.tif', 1, 1, 2, options=['NBITS=2']) ds.GetRasterBand(2).SetNoDataValue(3) ds.GetRasterBand(2).Fill(1) ds = None ds = gdal.Open('/vsimem/tiff_write_152.tif') assert ds.GetRasterBand(1).Checksum() == 0 assert ds.GetRasterBand(2).Checksum() == 1 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_152.tif') ############################################################################### # Test that empty blocks are created in a filesystem sparse way def test_tiff_write_153(): target_dir = 'tmp' if gdal.VSISupportsSparseFiles(target_dir) == 0: pytest.skip() gdaltest.tiff_drv.Create(target_dir + '/tiff_write_153.tif', 500, 500) f = gdal.VSIFOpenL(target_dir + '/tiff_write_153.tif', 'rb') ret = gdal.VSIFGetRangeStatusL(f, 500 * 500, 1) gdal.VSIFCloseL(f) gdaltest.tiff_drv.Delete(target_dir + '/tiff_write_153.tif') assert ret != gdal.VSI_RANGE_STATUS_DATA ############################################################################### # Test empty block writing skipping and SPARSE_OK in CreateCopy() and Open() def test_tiff_write_154(): src_ds = gdal.GetDriverByName('MEM').Create('', 500, 500) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=['BLOCKYSIZE=256']) ds.FlushCache() # At that point empty blocks have not yet been flushed assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 162 ds = None # Now they are and that's done in a filesystem sparse way. TODO: check this assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 256162 gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=['BLOCKYSIZE=256', 'COMPRESS=DEFLATE']) ds.FlushCache() # With compression, empty blocks are written right away assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 462 ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 462 gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') # SPARSE_OK in CreateCopy(): blocks are not written ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=['SPARSE_OK=YES', 'BLOCKYSIZE=256']) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 162 # SPARSE_OK in Open()/update: blocks are not written ds = gdal.OpenEx('/vsimem/tiff_write_154.tif', gdal.OF_UPDATE, open_options=['SPARSE_OK=YES']) ds.GetRasterBand(1).Fill(0) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 162 ds = None # Default behaviour in Open()/update: blocks are written ds = gdal.OpenEx('/vsimem/tiff_write_154.tif', gdal.OF_UPDATE) ds.GetRasterBand(1).Fill(0) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 250162 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') # SPARSE_OK in CreateCopy() in compressed case (strips): blocks are not written ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=['SPARSE_OK=YES', 'BLOCKYSIZE=256', 'COMPRESS=DEFLATE']) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 174 gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') # SPARSE_OK in CreateCopy() in compressed case (tiling): blocks are not written ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=['SPARSE_OK=YES', 'TILED=YES']) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 190 gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') # Test detection of 0 blocks for all data types for dt in ['signedbyte', gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64]: # SPARSE_OK in CreateCopy(): blocks are not written if dt == 'signedbyte': src_ds = gdal.GetDriverByName('MEM').Create('', 500, 500, 1, gdal.GDT_Byte) options = ['SPARSE_OK=YES', 'BLOCKYSIZE=256', 'PIXELTYPE=SIGNEDBYTE'] else: src_ds = gdal.GetDriverByName('MEM').Create('', 500, 500, 1, dt) options = ['SPARSE_OK=YES', 'BLOCKYSIZE=256'] gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=options) assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 162, dt # Test detection of nodata blocks with nodata != 0 for all data types for dt in ['signedbyte', gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64]: # SPARSE_OK in CreateCopy(): blocks are not written if dt == 'signedbyte': src_ds = gdal.GetDriverByName('MEM').Create('', 500, 500, 1, gdal.GDT_Byte) options = ['SPARSE_OK=YES', 'BLOCKYSIZE=256', 'PIXELTYPE=SIGNEDBYTE'] else: src_ds = gdal.GetDriverByName('MEM').Create('', 500, 500, 1, dt) options = ['SPARSE_OK=YES', 'BLOCKYSIZE=256'] src_ds.GetRasterBand(1).Fill(1) src_ds.GetRasterBand(1).SetNoDataValue(1) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=options) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 174, dt # Test optimized detection when nodata==0, and with the last pixel != 0 src_ds = gdal.GetDriverByName('MEM').Create('', 100, 1, 1) src_ds.GetRasterBand(1).Fill(0) src_ds.GetRasterBand(1).WriteRaster(99, 0, 1, 1, struct.pack('B' * 1, 1)) gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_154.tif', src_ds, options=['SPARSE_OK=YES']) assert gdal.VSIStatL('/vsimem/tiff_write_154.tif').size == 246 gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') # Test that setting nodata doesn't prevent blocks to be written (#6706) ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_154.tif', 1, 100, 1) ds.GetRasterBand(1).SetNoDataValue(1) ds = None ds = gdal.Open('/vsimem/tiff_write_154.tif') offset = ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF') ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_154.tif') assert not (offset is None or int(offset) == 0) ############################################################################### # Test reading and writing band description def test_tiff_write_155(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_155.tif', 1, 1) ds.GetRasterBand(1).SetDescription('foo') ds = None assert gdal.VSIStatL('/vsimem/tiff_write_155.tif.aux.xml') is None ds = gdal.Open('/vsimem/tiff_write_155.tif') assert ds.GetRasterBand(1).GetDescription() == 'foo' ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_155.tif') ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_155.tif', 1, 1, options=['PROFILE=GeoTIFF']) ds.GetRasterBand(1).SetDescription('foo') ds = None assert gdal.VSIStatL('/vsimem/tiff_write_155.tif.aux.xml') is not None ds = gdal.Open('/vsimem/tiff_write_155.tif') assert ds.GetRasterBand(1).GetDescription() == 'foo' ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_155.tif') ############################################################################### # Test GetDataCoverageStatus() def test_tiff_write_156(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_156.tif', 64, 64, options=['SPARSE_OK=YES', 'TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=32']) ds.GetRasterBand(1).WriteRaster(0, 0, 1, 1, 'X') (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(0, 0, 32, 32) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA and pct == 100.0 (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(32, 0, 32, 32) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY and pct == 0.0 (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(16, 16, 32, 32) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY and pct == 25.0 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_156.tif') # Test fix for #6703 ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_156.tif', 1, 512, options=['SPARSE_OK=YES', 'BLOCKYSIZE=1']) ds.GetRasterBand(1).WriteRaster(0, 100, 1, 1, 'X') ds = None ds = gdal.Open('/vsimem/tiff_write_156.tif') flags, _ = ds.GetRasterBand(1).GetDataCoverageStatus(0, 100, 1, 1) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_156.tif') ############################################################################### # Test Float16 def test_tiff_write_157(): # Write controlled values of Float16 vals = struct.pack('H' * 14, 0x0000, # Positive zero 0x8000, # Negative zero 0x7C00, # Positive infinity 0xFC00, # Negative infinity 0x7E00, # Some positive quiet NaN 0xFE00, # Some negative quiet NaN 0x3D00, # 1.25 0xBD00, # -1.25 0x0001, # Smallest positive denormalized value 0x8001, # Smallest negative denormalized value 0x03FF, # Largest positive denormalized value 0x83FF, # Largest negative denormalized value 0x0400, # Smallest positive normalized value 0x8400, # Smallest negative normalized value ) ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_157.tif', 14, 1, 1, gdal.GDT_Float32, options=['NBITS=16']) ds = None ds = gdal.Open('/vsimem/tiff_write_157.tif') offset = int(ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) ds = None f = gdal.VSIFOpenL('/vsimem/tiff_write_157.tif', 'rb+') gdal.VSIFSeekL(f, offset, 0) gdal.VSIFWriteL(vals, 1, len(vals), f) gdal.VSIFCloseL(f) # Check that we properly deserialize Float16 values ds = gdal.Open('/vsimem/tiff_write_157.tif') assert ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '16' got = struct.unpack('f' * 14, ds.ReadRaster()) expected = [0.0, -0.0, gdaltest.posinf(), -gdaltest.posinf(), gdaltest.NaN(), gdaltest.NaN(), 1.25, -1.25, 5.9604644775390625e-08, -5.9604644775390625e-08, 6.0975551605224609e-05, -6.0975551605224609e-05, 6.103515625e-05, -6.103515625e-05] for i in range(14): if i == 4 or i == 5: assert got[i] != got[i] elif got[i] != pytest.approx(expected[i], abs=1e-15): print(got[i]) print(expected[i]) pytest.fail(i) # Check that we properly decode&re-encode Float16 values gdal.Translate('/vsimem/tiff_write_157_dst.tif', ds) ds = None ds = gdal.Open('/vsimem/tiff_write_157_dst.tif') offset = int(ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) ds = None f = gdal.VSIFOpenL('/vsimem/tiff_write_157_dst.tif', 'rb') gdal.VSIFSeekL(f, offset, 0) vals_copied = gdal.VSIFReadL(1, 14 * 2, f) gdal.VSIFCloseL(f) if vals != vals_copied: print(struct.unpack('H' * 14, vals)) pytest.fail(struct.unpack('H' * 14, vals_copied)) gdaltest.tiff_drv.Delete('/vsimem/tiff_write_157.tif') gdaltest.tiff_drv.Delete('/vsimem/tiff_write_157_dst.tif') # Now try Float32 -> Float16 conversion ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_157.tif', 18, 1, 1, gdal.GDT_Float32, options=['NBITS=16']) vals = struct.pack('I' * 18, 0x00000000, # Positive zero 0x80000000, # Negative zero 0x7f800000, # Positive infinity 0xff800000, # Negative infinity 0x7fc00000, # Some positive quiet NaN 0xffc00000, # Some negative quiet NaN 0x7f800001, # Some positive signaling NaN with significant that will get lost 0xff800001, # Some negative signaling NaN with significant that will get lost 0x3fa00000, # 1.25 0xbfa00000, # -1.25 0x00000001, # Smallest positive denormalized value 0x80000001, # Smallest negative denormalized value 0x007fffff, # Largest positive denormalized value 0x807fffff, # Largest negative denormalized value 0x00800000, # Smallest positive normalized value 0x80800000, # Smallest negative normalized value 0x33800000, # 5.9604644775390625e-08 = Smallest number that can be converted as a float16 denormalized value 0x47800000, # 65536 --> converted to infinity ) ds.GetRasterBand(1).WriteRaster(0, 0, 18, 1, vals, buf_type=gdal.GDT_Float32) with gdaltest.error_handler(): ds.FlushCache() ds = None ds = gdal.Open('/vsimem/tiff_write_157.tif') got = struct.unpack('f' * 18, ds.ReadRaster()) ds = None expected = (0.0, -0.0, gdaltest.posinf(), -gdaltest.posinf(), gdaltest.NaN(), gdaltest.NaN(), gdaltest.NaN(), gdaltest.NaN(), 1.25, -1.25, 0.0, -0.0, 0.0, -0.0, 0.0, -0.0, 5.9604644775390625e-08, gdaltest.posinf()) for i in range(18): if i in (4, 5, 6, 7): # NaN comparison doesn't work like you'd expect assert got[i] != got[i] else: assert got[i] == pytest.approx(expected[i], abs=1e-15) gdaltest.tiff_drv.Delete('/vsimem/tiff_write_157.tif') # Test pixel interleaved gdal.Translate('/vsimem/tiff_write_157.tif', '../gdrivers/data/small_world.tif', options='-co NBITS=16 -ot Float32') ds = gdal.Open('/vsimem/tiff_write_157.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 30111 cs = ds.GetRasterBand(2).Checksum() assert cs == 32302 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_157.tif') ############################################################################### # Test GetActualBlockSize() (perhaps not the best place for that...) def test_tiff_write_158(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_158.tif', 20, 40, 1, options=['TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=32']) (w, h) = ds.GetRasterBand(1).GetActualBlockSize(0, 0) assert (w, h) == (16, 32) (w, h) = ds.GetRasterBand(1).GetActualBlockSize(1, 1) assert (w, h) == (4, 8) res = ds.GetRasterBand(1).GetActualBlockSize(2, 0) assert res is None res = ds.GetRasterBand(1).GetActualBlockSize(0, 2) assert res is None res = ds.GetRasterBand(1).GetActualBlockSize(-1, 0) assert res is None res = ds.GetRasterBand(1).GetActualBlockSize(0, -1) assert res is None ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_158.tif') ############################################################################### # Test that COPY_SRC_OVERVIEWS creation option with JPEG compression # result in a https://trac.osgeo.org/gdal/wiki/CloudOptimizedGeoTIFF def test_tiff_write_159(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() prev_table = '' for options in [[], ['JPEG_QUALITY=50'], ['PHOTOMETRIC=YCBCR']]: src_ds = gdal.Translate('', '../gdrivers/data/small_world.tif', format='MEM') src_ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_159.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES', 'COMPRESS=JPEG'] + options) ds = None src_ds = None ds = gdal.Open('/vsimem/tiff_write_159.tif') cs0 = ds.GetRasterBand(1).Checksum() cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs2 = ds.GetRasterBand(1).GetOverview(1).Checksum() assert not (cs0 == 0 or cs1 == 0 or cs2 == 0), options ifd_main = int(ds.GetRasterBand(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) ifd_ovr_0 = int(ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('IFD_OFFSET', 'TIFF')) ifd_ovr_1 = int(ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('IFD_OFFSET', 'TIFF')) data_ovr_1 = int(ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) data_ovr_0 = int(ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) data_main = int(ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF')) assert (ifd_main < ifd_ovr_0 and ifd_ovr_0 < ifd_ovr_1 and ifd_ovr_1 < data_ovr_1 and data_ovr_1 < data_ovr_0 and data_ovr_0 < data_main), \ options table_main = ds.GetRasterBand(1).GetMetadataItem('JPEGTABLES', 'TIFF') table_ovr_0 = ds.GetRasterBand(1).GetOverview(0).GetMetadataItem('JPEGTABLES', 'TIFF') table_ovr_1 = ds.GetRasterBand(1).GetOverview(1).GetMetadataItem('JPEGTABLES', 'TIFF') assert table_main == table_ovr_0 and table_ovr_0 == table_ovr_1, options # Check that the JPEG tables are different in the 3 modes assert table_main != prev_table, options prev_table = table_main ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_159.tif') for value in range(4): src_ds = gdal.Translate('', 'data/byte.tif', format='MEM') src_ds.BuildOverviews('NEAR', overviewlist=[2]) ds = gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_159.tif', src_ds, options=['COPY_SRC_OVERVIEWS=YES', 'COMPRESS=JPEG', 'JPEGTABLESMODE=%d' % value]) ds = None src_ds = None ds = gdal.Open('/vsimem/tiff_write_159.tif') cs0 = ds.GetRasterBand(1).Checksum() cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs0 == 4743 and cs1 == 1133, value ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_159.tif') ############################################################################### # Test the Create() interface with a BLOCKYSIZE > image height def test_tiff_write_160(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_160.tif', 10, 10, options=['BLOCKYSIZE=11']) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.Open('/vsimem/tiff_write_160.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 1218 ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_160.tif') ############################################################################### # Test setting GCPs on an image with already a geotransform and vice-versa (#6751) def test_tiff_write_161(): ds = gdaltest.tiff_drv.Create('/vsimem/tiff_write_161.tif', 1, 1) ds.SetGeoTransform([0, 1, 2, 3, 4, 5]) ds = None ds = gdal.Open('/vsimem/tiff_write_161.tif', gdal.GA_Update) src_ds = gdal.Open('data/gcps.vrt') with gdaltest.error_handler(): assert ds.SetGCPs(src_ds.GetGCPs(), '') == 0 assert ds.GetGeoTransform(can_return_null=True) is None ds = None ds = gdal.Open('/vsimem/tiff_write_161.tif', gdal.GA_Update) assert ds.GetGCPs() assert ds.GetGeoTransform(can_return_null=True) is None with gdaltest.error_handler(): assert ds.SetGeoTransform([0, 1, 2, 3, 4, 5]) == 0 assert ds.GetGeoTransform() == (0.0, 1.0, 2.0, 3.0, 4.0, 5.0) assert not ds.GetGCPs() ds = None ds = gdal.Open('/vsimem/tiff_write_161.tif', gdal.GA_Update) assert not ds.GetGCPs() assert ds.GetGeoTransform() == (0.0, 1.0, 2.0, 3.0, 4.0, 5.0) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_161.tif') ############################################################################### # Test creating a JPEG compressed file with big tiles (#6757) def test_tiff_write_162(): src_ds = gdal.GetDriverByName('MEM').Create('', 512, 512, 3) options = ['TILED=YES', 'BLOCKXSIZE=512', 'BLOCKYSIZE=512', 'COMPRESS=JPEG'] gdaltest.tiff_drv.CreateCopy('/vsimem/tiff_write_162.tif', src_ds, options=options) assert gdal.GetLastErrorMsg() == '' gdaltest.tiff_drv.Delete('/vsimem/tiff_write_162.tif') ############################################################################### # Test creating a file that would trigger strip chopping (#6924) def test_tiff_write_163(): # Was a libtiff 4.0.8 regression if gdaltest.tiff_drv.GetMetadataItem('LIBTIFF').find('4.0.8') >= 0: pytest.skip('Test broken with libtiff 4.0.8') gdal.Translate('/vsimem/tiff_write_163.tif', 'data/byte.tif', options='-outsize 1 20000 -co BLOCKYSIZE=20000 -co PROFILE=BASELINE') ds = gdal.Open('/vsimem/tiff_write_163.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 47567 # Check that IsBlockAvailable() works properly in that mode offset_0_2 = ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_2', 'TIFF') assert offset_0_2 == str(146 + 2 * 8192) ds = None gdaltest.tiff_drv.Delete('/vsimem/tiff_write_163.tif') ############################################################################### # Test that we handle [0,1,0,0,0,1] geotransform as a regular geotransform def test_tiff_write_164(): ds = gdaltest.tiff_drv.Create('/vsimem/test.tif', 1, 1) ds.SetGeoTransform([0, 1, 0, 0, 0, 1]) ds = None ds = gdal.Open('/vsimem/test.tif') gt = ds.GetGeoTransform(can_return_null=True) ds = None assert gt == (0, 1, 0, 0, 0, 1) # Test [0,1,0,0,0,-1] as well ds = gdaltest.tiff_drv.Create('/vsimem/test.tif', 1, 1) ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ds = None ds = gdal.Open('/vsimem/test.tif') gt = ds.GetGeoTransform(can_return_null=True) ds = None assert gt == (0, 1, 0, 0, 0, -1) gdal.Unlink('/vsimem/test.tif') ############################################################################### # Test the current behaviour of per-band nodata vs per-dataset serialization def test_tiff_write_165(): ds = gdaltest.tiff_drv.Create('/vsimem/test.tif', 1, 1, 3) ret = ds.GetRasterBand(1).SetNoDataValue(100) assert ret == 0 with gdaltest.error_handler(): ret = ds.GetRasterBand(2).SetNoDataValue(200) assert gdal.GetLastErrorMsg() != '', 'warning expected, but not emitted' assert ret == 0 nd = ds.GetRasterBand(1).GetNoDataValue() assert nd == 100 nd = ds.GetRasterBand(2).GetNoDataValue() assert nd == 200 ds = None ds = gdal.Open('/vsimem/test.tif') nd = ds.GetRasterBand(1).GetNoDataValue() ds = None assert nd == 200 gdal.Unlink('/vsimem/test.tif') ############################################################################### # Test reading & writing Z dimension for ModelTiepointTag and ModelPixelScaleTag (#7093) def test_tiff_write_166(): with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'YES'): ds = gdal.Open('data/tiff_vertcs_scale_offset.tif') assert ds.GetRasterBand(1).GetScale() == 2.0 assert ds.GetRasterBand(1).GetOffset() == 10.0 # Scale + offset through CreateCopy() gdal.Translate('/vsimem/tiff_write_166.tif', 'data/byte.tif', options='-a_srs EPSG:26711+5773 -a_scale 2.0 -a_offset 10 -co PROFILE=GEOTIFF') assert gdal.VSIStatL('/vsimem/tiff_write_166.tif.aux.xml') is None with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'YES'): ds = gdal.Open('/vsimem/tiff_write_166.tif') assert ds.GetRasterBand(1).GetScale() == 2.0 assert ds.GetRasterBand(1).GetOffset() == 10.0 ds = None gdal.Unlink('/vsimem/tiff_write_166.tif') # Offset only through CreateCopy() gdal.Translate('/vsimem/tiff_write_166.tif', 'data/byte.tif', options='-a_srs EPSG:26711+5773 -a_offset 10 -co PROFILE=GEOTIFF') assert gdal.VSIStatL('/vsimem/tiff_write_166.tif.aux.xml') is None with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'YES'): ds = gdal.Open('/vsimem/tiff_write_166.tif') assert ds.GetRasterBand(1).GetScale() == 1.0 assert ds.GetRasterBand(1).GetOffset() == 10.0 ds = None gdal.Unlink('/vsimem/tiff_write_166.tif') # Scale + offset through Create() ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_166.tif', 1, 1, options=['PROFILE=GEOTIFF']) sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:26711+5773') ds.SetProjection(sr.ExportToWkt()) ds.SetGeoTransform([440720, 60, 0, 3751320, 0, -60]) ds.GetRasterBand(1).SetScale(2) ds.GetRasterBand(1).SetOffset(10) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_166.tif.aux.xml') is None with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'YES'): ds = gdal.Open('/vsimem/tiff_write_166.tif') assert ds.GetRasterBand(1).GetScale() == 2.0 assert ds.GetRasterBand(1).GetOffset() == 10.0 ds = None gdal.Unlink('/vsimem/tiff_write_166.tif') # Scale only through Create() ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_166.tif', 1, 1, options=['PROFILE=GEOTIFF']) sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:26711+5773') ds.SetProjection(sr.ExportToWkt()) ds.SetGeoTransform([440720, 60, 0, 3751320, 0, -60]) ds.GetRasterBand(1).SetScale(2) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_166.tif.aux.xml') is None with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'YES'): ds = gdal.Open('/vsimem/tiff_write_166.tif') assert ds.GetRasterBand(1).GetScale() == 2.0 assert ds.GetRasterBand(1).GetOffset() == 0.0 ds = None gdal.Unlink('/vsimem/tiff_write_166.tif') # Offset only through through Create() ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tiff_write_166.tif', 1, 1, options=['PROFILE=GEOTIFF']) sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:26711+5773') ds.SetProjection(sr.ExportToWkt()) ds.SetGeoTransform([440720, 60, 0, 3751320, 0, -60]) ds.GetRasterBand(1).SetOffset(10) ds = None assert gdal.VSIStatL('/vsimem/tiff_write_166.tif.aux.xml') is None with gdaltest.config_option('GTIFF_REPORT_COMPD_CS', 'YES'): ds = gdal.Open('/vsimem/tiff_write_166.tif') assert ds.GetRasterBand(1).GetScale() == 1.0 assert ds.GetRasterBand(1).GetOffset() == 10.0 ds = None gdal.Unlink('/vsimem/tiff_write_166.tif') ############################################################################### def test_tiff_write_167_deflate_zlevel(): src_ds = gdal.Open('data/byte.tif') gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/out.tif', src_ds, options=['COMPRESS=DEFLATE', 'ZLEVEL=1']) size1 = gdal.VSIStatL('/vsimem/out.tif').size gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/out.tif', src_ds, options=['COMPRESS=DEFLATE', 'NUM_THREADS=2', 'ZLEVEL=9']) size2 = gdal.VSIStatL('/vsimem/out.tif').size gdal.Unlink('/vsimem/out.tif') assert size2 < size1 ds = gdal.GetDriverByName('GTiff').Create('/vsimem/out.tif', 20, 20, 1, options=['COMPRESS=DEFLATE', 'ZLEVEL=9']) ds.SetProjection(src_ds.GetProjectionRef()) ds.SetGeoTransform(src_ds.GetGeoTransform()) ds.WriteRaster(0, 0, 20, 20, src_ds.ReadRaster()) ds = None size2_create = gdal.VSIStatL('/vsimem/out.tif').size gdal.Unlink('/vsimem/out.tif') assert size2 == size2_create ############################################################################### # Test CCITTFAX3 def test_tiff_write_168_ccitfax3(): ut = gdaltest.GDALTest('GTiff', 'oddsize1bit.tif', 1, 5918, options=['NBITS=1', 'COMPRESS=CCITTFAX3']) return ut.testCreateCopy() ############################################################################### # Test CCITTRLE def test_tiff_write_169_ccitrle(): ut = gdaltest.GDALTest('GTiff', 'oddsize1bit.tif', 1, 5918, options=['NBITS=1', 'COMPRESS=CCITTRLE']) return ut.testCreateCopy() ############################################################################### # Test invalid compression method def test_tiff_write_170_invalid_compresion(): src_ds = gdal.Open('data/byte.tif') with gdaltest.error_handler(): gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/out.tif', src_ds, options=['COMPRESS=INVALID']) assert gdal.GetLastErrorMsg() != '' gdal.Unlink('/vsimem/out.tif') ############################################################################### # Test ZSTD compression def test_tiff_write_171_zstd(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=ZSTD', 'ZSTD_LEVEL=1']) return ut.testCreateCopy() ############################################################################### # Test ZSTD compression with PREDICTOR = 2 def test_tiff_write_171_zstd_predictor(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=ZSTD', 'ZSTD_LEVEL=1', 'PREDICTOR=2']) return ut.testCreateCopy() ############################################################################### # Test WEBP compression def test_tiff_write_webp(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('WEBP') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'md_ge_rgb_0010000.tif', 0, None, options=['COMPRESS=WEBP']) return ut.testCreateCopy() ############################################################################### # Test WEBP compression with internal tiling def test_tiff_write_tiled_webp(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('WEBP') == -1: pytest.skip() if md['DMD_CREATIONOPTIONLIST'].find('WEBP_LOSSLESS') == -1: pytest.skip() filename = '/vsimem/tiff_write_tiled_webp.tif' src_ds = gdal.Open('data/md_ge_rgb_0010000.tif') gdaltest.tiff_drv.CreateCopy(filename, src_ds, options=['COMPRESS=WEBP', 'WEBP_LOSSLESS=true', 'TILED=true']) ds = gdal.Open(filename) cs = [ds.GetRasterBand(i+1).Checksum() for i in range(3)] assert cs == [21212, 21053, 21349] gdaltest.tiff_drv.Delete(filename) gdal.Unlink('data/md_ge_rgb_0010000.tif.aux.xml') ############################################################################### # Test WEBP compression with huge single strip def test_tiff_write_webp_huge_single_strip(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('WEBP') == -1: pytest.skip() filename = '/vsimem/tif_webp_huge_single_strip.tif' src_ds = gdal.Open('data/tif_webp_huge_single_strip.tif') gdaltest.tiff_drv.CreateCopy(filename, src_ds, options=['COMPRESS=WEBP', 'BLOCKYSIZE=2001']) ds = gdal.Open(filename) original_stats = [src_ds.GetRasterBand(i + 1).ComputeStatistics(True) for i in range(3)] got_stats = [ds.GetRasterBand(i + 1).ComputeStatistics(True) for i in range(3)] ds = None src_ds = None for i in range(3): for j in range(4): assert original_stats[i][j] == pytest.approx(got_stats[i][j], abs=1e-1 * abs(original_stats[i][j])), \ 'did not get expected statistics' gdaltest.tiff_drv.Delete(filename) gdal.Unlink('data/tif_webp_huge_single_strip.tif.aux.xml') ############################################################################### # GeoTIFF DGIWG tags def test_tiff_write_172_geometadata_tiff_rsid(): tmpfilename = '/vsimem/tiff_write_172_geometadata_tiff_rsid.tiff' ds = gdal.GetDriverByName('GTiff').Create(tmpfilename, 1, 1) ds.SetMetadataItem('GEO_METADATA', 'foo') ds.SetMetadataItem('TIFF_RSID', 'bar') ds = None ds = gdal.Open(tmpfilename, gdal.GA_Update) assert ds.GetMetadataItem('GEO_METADATA') == 'foo', ds.GetMetadata() assert ds.GetMetadataItem('TIFF_RSID') == 'bar', ds.GetMetadata() ds.SetMetadata({}) ds = None ds = gdal.Open(tmpfilename) assert ds.GetMetadataItem('GEO_METADATA') is None, ds.GetMetadata() assert ds.GetMetadataItem('TIFF_RSID') is None, ds.GetMetadata() ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test LERC compression def test_tiff_write_173_lerc(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=LERC']) return ut.testCreateCopy() ############################################################################### # Test LERC_DEFLATE compression def test_tiff_write_174_lerc_deflate(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC_DEFLATE') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=LERC_DEFLATE']) return ut.testCreateCopy() ############################################################################### # Test LERC_DEFLATE compression def test_tiff_write_174_lerc_deflate_with_level(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC_DEFLATE') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=LERC_DEFLATE', 'ZLEVEL=1']) return ut.testCreateCopy() ############################################################################### # Test LERC_ZSTD compression def test_tiff_write_175_lerc_zstd(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC_ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=LERC_ZSTD']) return ut.testCreateCopy() ############################################################################### # Test LERC_ZSTD compression def test_tiff_write_175_lerc_zstd_with_level(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC_ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4672, options=['COMPRESS=LERC_ZSTD', 'ZSTD_LEVEL=1']) return ut.testCreateCopy() ############################################################################### # Test LERC compression with MAX_Z_ERROR def test_tiff_write_176_lerc_max_z_error(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte.tif', 1, 4529, options=['COMPRESS=LERC', 'MAX_Z_ERROR=1']) return ut.testCreateCopy(skip_preclose_test=1) ############################################################################### # Test LERC compression with several bands and tiling def test_tiff_write_177_lerc_several_bands_tiling(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() filename = '/vsimem/tiff_write_177_lerc_several_bands_tiling.tif' gdal.Translate(filename, '../gdrivers/data/small_world.tif', creationOptions=['COMPRESS=LERC', 'TILED=YES']) ds = gdal.Open(filename) cs = [ds.GetRasterBand(i+1).Checksum() for i in range(3)] ds = None gdal.Unlink(filename) assert cs == [30111, 32302, 40026] ############################################################################### # Test LERC compression with alpha band def test_tiff_write_178_lerc_with_alpha(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() filename = '/vsimem/tiff_write_178_lerc_with_alpha.tif' gdal.Translate(filename, 'data/stefan_full_rgba.tif', creationOptions=['COMPRESS=LERC']) ds = gdal.Open(filename) cs = [ds.GetRasterBand(i+1).Checksum() for i in range(4)] ds = None gdal.Unlink(filename) assert cs == [12603, 58561, 36064, 10807] ############################################################################### # Test LERC compression with alpha band with only 0 and 255 def test_tiff_write_178_lerc_with_alpha_0_and_255(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() filename = '/vsimem/tiff_write_178_lerc_with_alpha_0_and_255.tif' gdal.Translate(filename, 'data/rgba_with_alpha_0_and_255.tif', creationOptions=['COMPRESS=LERC']) ds = gdal.Open(filename) cs = [ds.GetRasterBand(i+1).Checksum() for i in range(4)] ds = None gdal.Unlink(filename) assert cs == [13, 13, 13, 13] ############################################################################### # Test LERC compression with different data types def test_tiff_write_179_lerc_data_types(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() filename = '/vsimem/tiff_write_179_lerc_data_types.tif' for src_filename in ['uint16.tif', 'int16.tif', 'uint32.tif', 'int32.tif', 'float32.tif', 'float64.tif']: gdal.Translate(filename, 'data/' + src_filename, creationOptions=['COMPRESS=LERC']) ds = gdal.Open(filename) cs = ds.GetRasterBand(1).Checksum() ds = None gdal.Unlink(filename) assert cs == 4672 filename_tmp = filename + ".tmp.tif" gdal.Translate(filename_tmp, 'data/byte.tif', creationOptions=['PIXELTYPE=SIGNEDBYTE']) gdal.Translate(filename, filename_tmp, creationOptions=['COMPRESS=LERC']) gdal.Unlink(filename_tmp) ds = gdal.Open(filename) cs = ds.GetRasterBand(1).Checksum() ds = None gdal.Unlink(filename) assert cs == 4672 gdal.ErrorReset() with gdaltest.error_handler(): gdal.Translate(filename, 'data/cfloat32.tif', creationOptions=['COMPRESS=LERC']) assert gdal.GetLastErrorMsg() != '' gdal.Unlink(filename) ############################################################################### # Test LERC compression with several bands and separate def test_tiff_write_180_lerc_separate(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() filename = '/vsimem/tiff_write_180_lerc_separate.tif' gdal.Translate(filename, '../gdrivers/data/small_world.tif', creationOptions=['COMPRESS=LERC', 'INTERLEAVE=BAND']) ds = gdal.Open(filename) cs = [ds.GetRasterBand(i+1).Checksum() for i in range(3)] ds = None gdal.Unlink(filename) assert cs == [30111, 32302, 40026] ############################################################################### # Test set XMP metadata def test_tiff_write_181_xmp(): src_ds = gdal.Open('data/utmsmall.tif') new_ds = gdaltest.tiff_drv.CreateCopy('tmp/test_181.tif', src_ds) src_ds = None xmp_ds = gdal.Open('../gdrivers/data/byte_with_xmp.tif') xmp = xmp_ds.GetMetadata('xml:XMP') xmp_ds = None assert 'W5M0MpCehiHzreSzNTczkc9d' in xmp[0], 'Wrong input file without XMP' new_ds.SetMetadata(xmp, 'xml:XMP') new_ds = None # hopefully it's closed now! new_ds = gdal.Open('tmp/test_181.tif') read_xmp = new_ds.GetMetadata('xml:XMP') assert read_xmp and 'W5M0MpCehiHzreSzNTczkc9d' in read_xmp[0], \ 'No XMP data written in output file' new_ds = None gdaltest.tiff_drv.Delete('tmp/test_181.tif') ############################################################################### # Test delete XMP from a dataset def test_tiff_write_182_xmp_delete(): shutil.copyfile('../gdrivers/data/byte_with_xmp.tif', 'tmp/test_182.tif') chg_ds = gdal.Open('tmp/test_182.tif', gdal.GA_Update) read_xmp = chg_ds.GetMetadata('xml:XMP') assert read_xmp and 'W5M0MpCehiHzreSzNTczkc9d' in read_xmp[0], \ 'No XMP data written in output file' chg_ds.SetMetadata(None, 'xml:XMP') chg_ds = None again_ds = gdal.Open('tmp/test_182.tif') read_xmp = again_ds.GetMetadata('xml:XMP') assert not read_xmp, 'XMP data not removed' again_ds = None gdaltest.tiff_drv.Delete('tmp/test_182.tif') ############################################################################### def test_tiff_write_183_createcopy_append_subdataset(): tmpfilename = '/vsimem/test_tiff_write_183_createcopy_append_subdataset.tif' gdal.Translate(tmpfilename, 'data/byte.tif') gdal.Translate(tmpfilename, 'data/utmsmall.tif', creationOptions=['APPEND_SUBDATASET=YES']) ds = gdal.Open(tmpfilename) assert ds.GetRasterBand(1).Checksum() == 4672 ds = gdal.Open('GTIFF_DIR:2:' + tmpfilename) assert ds.GetRasterBand(1).Checksum() == 50054 ds = None gdal.Unlink(tmpfilename) ############################################################################### def test_tiff_write_184_create_append_subdataset(): tmpfilename = '/vsimem/test_tiff_write_184_create_append_subdataset.tif' gdal.Translate(tmpfilename, 'data/byte.tif') ds = gdal.GetDriverByName('GTiff').Create(tmpfilename, 1, 1, options=['APPEND_SUBDATASET=YES']) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.Open(tmpfilename) assert ds.GetRasterBand(1).Checksum() == 4672 ds = gdal.Open('GTIFF_DIR:2:' + tmpfilename) assert ds.GetRasterBand(1).Checksum() == 3 ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test LERC compression with Create() and BuildOverviews() # Fixes https://github.com/OSGeo/gdal/issues/1257 def test_tiff_write_185_lerc_create_and_overview(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() filename = '/vsimem/test_tiff_write_185_lerc_create_and_overview.tif' ds = gdaltest.tiff_drv.Create(filename, 20, 20, options=['COMPRESS=LERC_DEFLATE']) src_ds = gdal.Open('data/byte.tif') ds.WriteRaster(0,0,20,20,src_ds.ReadRaster()) gdal.ErrorReset() ds.BuildOverviews('NEAR', [2]) assert gdal.GetLastErrorMsg() == '' ds = None ds = gdal.Open(filename) cs = ds.GetRasterBand(1).Checksum() cs_ovr = ds.GetRasterBand(1).GetOverview(0).Checksum() gdal.Unlink(filename) assert (cs, cs_ovr) == (4672, 1087) ############################################################################### def check_libtiff_internal_or_at_least(expected_maj, expected_min, expected_micro): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['LIBTIFF'] == 'INTERNAL': return True if md['LIBTIFF'].startswith('LIBTIFF, Version '): version = md['LIBTIFF'][len('LIBTIFF, Version '):] version = version[0:version.find('\n')] got_maj, got_min, got_micro = version.split('.') got_maj = int(got_maj) got_min = int(got_min) got_micro = int(got_micro) if got_maj > expected_maj: return True if got_maj < expected_maj: return False if got_min > expected_min: return True if got_min < expected_min: return False return got_micro >= expected_micro return False ############################################################################### # Test writing a deflate compressed file with a uncompressed strip larger than 4 GB # def test_tiff_write_deflate_4GB(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() if not gdaltest.run_slow_tests(): pytest.skip() ref_ds = gdal.GetDriverByName('MEM').Create('', 20, 20) ref_ds.GetRasterBand(1).Fill(127) gdal.Translate('/vsimem/out.tif', ref_ds, options = '-co TILED=YES -co COMPRESS=DEFLATE -co BLOCKXSIZE=50000 -co BLOCKYSIZE=86000 -outsize 50000 86000') ds = gdal.Open('/vsimem/out.tif') data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, buf_xsize = 20, buf_ysize = 20) assert data == ref_ds.ReadRaster() ds = None gdal.Unlink('/vsimem/out.tif') ############################################################################### # Test rewriting a LZW strip/tile that is very close to 8 KB with larger data def test_tiff_write_rewrite_lzw_strip(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() src_data = open('data/bug_gh_1439_to_be_updated_lzw.tif', 'rb').read() tmpfilename = '/vsimem/out.tif' gdal.FileFromMemBuffer(tmpfilename, src_data) ds = gdal.Open(tmpfilename, gdal.GA_Update) src_ds = gdal.Open('data/bug_gh_1439_update_lzw.tif') ds.WriteRaster(0,0,4096,1,src_ds.ReadRaster()) ds = None ds = gdal.Open(tmpfilename) gdal.ErrorReset() assert ds.GetRasterBand(1).ReadRaster(0,1,4096,1) assert gdal.GetLastErrorMsg() == '' gdal.Unlink(tmpfilename) ############################################################################### # Test COPY_SRC_OVERVIEWS on a configuration with overviews, mask, but no # overview on the mask def test_tiff_write_overviews_mask_no_ovr_on_mask(): tmpfile = '/vsimem/test_tiff_write_overviews_mask_no_ovr_on_mask.tif' with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds = gdaltest.tiff_drv.Create(tmpfile, 100, 100) ds.GetRasterBand(1).Fill(255) ds.CreateMaskBand(gdal.GMF_PER_DATASET) ds = gdal.Open(tmpfile) gdal.ErrorReset() with gdaltest.error_handler(): ds.BuildOverviews('NEAR', overviewlist=[2]) assert gdal.GetLastErrorMsg() == 'Building external overviews whereas there is an internal mask is not fully supported. The overviews of the non-mask bands will be created, but not the overviews of the mask band.' # No overview on the mask assert ds.GetRasterBand(1).GetOverview(0).GetMaskFlags() == gdal.GMF_ALL_VALID ds = None tmpfile2 = '/vsimem/test_tiff_write_overviews_mask_no_ovr_on_mask_copy.tif' src_ds = gdal.Open(tmpfile) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdaltest.tiff_drv.CreateCopy(tmpfile2, src_ds, options=['COPY_SRC_OVERVIEWS=YES']) assert gdal.GetLastErrorMsg() == 'Source dataset has a mask band on full resolution, overviews on the regular bands, but lacks overviews on the mask band.' assert ds ds = None src_ds = None ds = gdal.Open(tmpfile) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET # No overview on the mask assert ds.GetRasterBand(1).GetOverview(0).GetMaskFlags() == gdal.GMF_ALL_VALID ds = None gdaltest.tiff_drv.Delete(tmpfile) gdaltest.tiff_drv.Delete(tmpfile2) ############################################################################### # Test that -co PHOTOMETRIC=YCBCR -co COMPRESS=JPEG does not create a TIFFTAG_GDAL_METADATA def test_tiff_write_no_gdal_metadata_tag_for_ycbcr_jpeg(): md = gdaltest.tiff_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() tmpfile = '/vsimem/test_tiff_write_no_gdal_metadata_tag_for_ycbcr_jpeg.tif' assert gdaltest.tiff_drv.Create(tmpfile, 16, 16, 3, gdal.GDT_Byte, options=['PHOTOMETRIC=YCBCR', 'COMPRESS=JPEG']) statBuf = gdal.VSIStatL(tmpfile + '.aux.xml', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) assert statBuf is None, 'did not expect PAM file' ds = gdal.Open(tmpfile) assert ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is None, \ 'did not expect TIFFTAG_GDAL_METADATA tag' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand tmpfile2 = tmpfile + "2" assert gdaltest.tiff_drv.CreateCopy(tmpfile2, ds, options=['PHOTOMETRIC=YCBCR', 'COMPRESS=JPEG']) ds = None ds = gdal.Open(tmpfile2) assert ds.GetMetadataItem('TIFFTAG_GDAL_METADATA', '_DEBUG_') is None, \ 'did not expect TIFFTAG_GDAL_METADATA tag' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand ds = None gdaltest.tiff_drv.Delete(tmpfile) gdaltest.tiff_drv.Delete(tmpfile2) ############################################################################### # Test that repated flushing after SetGeoTransform() does not grow file size # indefinitely def test_tiff_write_setgeotransform_flush(): tmpfile = '/vsimem/test_tiff_write_setgeotransform_flush.tif' gdal.GetDriverByName('GTiff').Create(tmpfile,1,1) ds = gdal.Open(tmpfile, gdal.GA_Update) ds.SetGeoTransform([2,0,1,49,0,-1]) for i in range(10): ds.FlushCache() ds = None assert gdal.VSIStatL(tmpfile).size < 1000 gdaltest.tiff_drv.Delete(tmpfile) ############################################################################### # Test that compression parameters are taken into account in Create() mode def test_tiff_write_compression_create_and_createcopy(): md = gdaltest.tiff_drv.GetMetadata() tests = [] if 'DEFLATE' in md['DMD_CREATIONOPTIONLIST']: tests.append((['COMPRESS=DEFLATE', 'ZLEVEL=1'],['COMPRESS=DEFLATE', 'ZLEVEL=9'])) if 'LZMA' in md['DMD_CREATIONOPTIONLIST']: tests.append((['COMPRESS=LZMA', 'LZMA_PRESET=1'],['COMPRESS=LZMA', 'LZMA_PRESET=9'])) if 'JPEG' in md['DMD_CREATIONOPTIONLIST']: tests.append((['COMPRESS=JPEG', 'JPEG_QUALITY=95'],['COMPRESS=JPEG', 'JPEG_QUALITY=50'])) if 'ZSTD' in md['DMD_CREATIONOPTIONLIST']: tests.append((['COMPRESS=ZSTD', 'ZSTD_LEVEL=1'],['COMPRESS=ZSTD', 'ZSTD_LEVEL=9'])) # FIXME: this test randomly fails, especially on Windows, but also on Linux, # for a unknown reason. Nothing suspicious with Valgrind however # if 'LERC_DEFLATE' in md['DMD_CREATIONOPTIONLIST']: # tests.append((['COMPRESS=LERC_DEFLATE', 'ZLEVEL=1'],['COMPRESS=LERC_DEFLATE', 'ZLEVEL=9'])) if 'WEBP' in md['DMD_CREATIONOPTIONLIST']: tests.append((['COMPRESS=WEBP', 'WEBP_LEVEL=95'],['COMPRESS=WEBP', 'WEBP_LEVEL=15'])) new_tests = [] for (before, after) in tests: new_tests.append((before, after)) new_tests.append((before + ['COPY_SRC_OVERVIEWS=YES', 'TILED=YES', 'NUM_THREADS=2'], after + ['COPY_SRC_OVERVIEWS=YES', 'TILED=YES', 'NUM_THREADS=2'])) tests = new_tests tmpfile = '/vsimem/test_tiff_write_compression_create.tif' src_ds = gdal.Open('data/rgbsmall.tif') data = src_ds.ReadRaster() for (before, after) in tests: ds = gdaltest.tiff_drv.Create(tmpfile, src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount, options = before) ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, data) ds = None size_before = gdal.VSIStatL(tmpfile).size ds = gdaltest.tiff_drv.Create(tmpfile, src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount, options = after) ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, data) ds = None size_after = gdal.VSIStatL(tmpfile).size assert size_after < size_before, (before, after, size_before, size_after) print(before, after, size_before, size_after) gdaltest.tiff_drv.CreateCopy(tmpfile, src_ds, options = before) size_before = gdal.VSIStatL(tmpfile).size gdaltest.tiff_drv.CreateCopy(tmpfile, src_ds, options = after) size_after = gdal.VSIStatL(tmpfile).size assert size_after < size_before, (before, after, size_before, size_after) gdaltest.tiff_drv.Delete(tmpfile) ############################################################################### # Attempt at creating a file with more tile arrays larger than 2 GB def test_tiff_write_too_many_tiles(): src_ds = gdal.Open('<VRTDataset rasterXSize="40000000" rasterYSize="40000000"><VRTRasterBand dataType="Byte" band="1"/></VRTDataset>') with gdaltest.error_handler(): assert not gdaltest.tiff_drv.CreateCopy('/vsimem/tmp.tif', src_ds, options = ['TILED=YES']) assert 'File too large regarding tile size' in gdal.GetLastErrorMsg() with gdaltest.tempfile('/vsimem/test_tiff_write_too_many_tiles.vrt', '<VRTDataset rasterXSize="40000000" rasterYSize="40000000"><VRTRasterBand dataType="Byte" band="1"/></VRTDataset>'): src_ds = gdal.Open('/vsimem/test_tiff_write_too_many_tiles.vrt') gdal.ErrorReset() with gdaltest.config_option('GDAL_TIFF_OVR_BLOCKSIZE', '128'): with gdaltest.error_handler(): src_ds.BuildOverviews('NEAR', [2]) assert 'File too large regarding tile size' in gdal.GetLastErrorMsg() ############################################################################### # Ask to run again tests with GDAL_API_PROXY=YES def tiff_write_api_proxy(): if not run_tiff_write_api_proxy: pytest.skip() import test_py_scripts ret = test_py_scripts.run_py_script_as_external_script('.', 'tiff_write', ' -api_proxy', display_live_on_parent_stdout=True) assert ret.find('Failed: 0') != -1 ############################################################################### def test_tiff_write_cleanup(): gdaltest.tiff_drv = None �������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsiwebhdfs.py��������������������������������������������������������������0000775�0001750�0001750�00000050401�13701057757�016527� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: vsiwebhdfs.py 4b037f2de9b3a6c1c0e34a13b0f6e44cd01715d8 2019-04-27 15:13:11 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsiwebhdfs # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copyright (c) 2018 Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import stat import sys from osgeo import gdal import gdaltest import webserver import pytest def open_for_read(uri): """ Opens a test file for reading. """ return gdal.VSIFOpenExL(uri, 'rb', 1) ############################################################################### def test_vsiwebhdfs_init(): gdaltest.webhdfs_vars = {} for var in ('WEBHDFS_USERNAME', 'WEBHDFS_DELEGATION'): gdaltest.webhdfs_vars[var] = gdal.GetConfigOption(var) if gdaltest.webhdfs_vars[var] is not None: gdal.SetConfigOption(var, "") ############################################################################### def test_vsiwebhdfs_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch( handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() gdaltest.webhdfs_base_connection = '/vsiwebhdfs/http://localhost:' + \ str(gdaltest.webserver_port) + '/webhdfs/v1' gdaltest.webhdfs_redirected_url = 'http://non_existing_host:' + \ str(gdaltest.webserver_port) + '/redirected' ############################################################################### # Test VSIFOpenL() def test_vsiwebhdfs_open(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Download without redirect (not nominal) handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1/foo/bar?op=OPEN&offset=9999990784&length=16384', 200, {}, '0123456789data') with webserver.install_http_handler(handler): f = open_for_read(gdaltest.webhdfs_base_connection + '/foo/bar') assert f is not None gdal.VSIFSeekL(f, 9999990784 + 10, 0) assert gdal.VSIFReadL(1, 4, f).decode('ascii') == 'data' gdal.VSIFCloseL(f) # Download with redirect (nominal) and permissions gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1/foo/bar?op=OPEN&offset=0&length=16384&user.name=root&delegation=token', 307, {'Location': gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=OPEN&offset=0&length=16384'}) handler.add('GET', '/redirected/webhdfs/v1/foo/bar?op=OPEN&offset=0&length=16384', 200, {}, 'yeah') with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DELEGATION': 'token', 'WEBHDFS_DATANODE_HOST': 'localhost'}): with webserver.install_http_handler(handler): f = open_for_read(gdaltest.webhdfs_base_connection + '/foo/bar') assert f is not None assert gdal.VSIFReadL(1, 4, f).decode('ascii') == 'yeah' gdal.VSIFCloseL(f) # Test error gdal.VSICurlClearCache() f = open_for_read(gdaltest.webhdfs_base_connection + '/foo/bar') assert f is not None handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1/foo/bar?op=OPEN&offset=0&length=16384', 404) with webserver.install_http_handler(handler): assert len(gdal.VSIFReadL(1, 4, f)) == 0 # Retry: shouldn't not cause network access assert len(gdal.VSIFReadL(1, 4, f)) == 0 gdal.VSIFCloseL(f) ############################################################################### # Test VSIStatL() def test_vsiwebhdfs_stat(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1/foo/bar?op=GETFILESTATUS', 200, {}, '{"FileStatus":{"type":"FILE","length":1000000}}') with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL(gdaltest.webhdfs_base_connection + '/foo/bar') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() # Test caching stat_res = gdal.VSIStatL(gdaltest.webhdfs_base_connection + '/foo/bar') assert stat_res.size == 1000000 # Test missing file handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1/unexisting?op=GETFILESTATUS', 404, {}, '{"RemoteException":{"exception":"FileNotFoundException","javaClassName":"java.io.FileNotFoundException","message":"File does not exist: /unexisting"}}') with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL( gdaltest.webhdfs_base_connection + '/unexisting') assert stat_res is None ############################################################################### # Test ReadDir() def test_vsiwebhdfs_readdir(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1/foo/?op=LISTSTATUS', 200, {}, '{"FileStatuses":{"FileStatus":[{"type":"FILE","modificationTime":1000,"pathSuffix":"bar.baz","length":123456},{"type":"DIRECTORY","pathSuffix":"mysubdir","length":0}]}}') with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir(gdaltest.webhdfs_base_connection + '/foo') assert dir_contents == ['bar.baz', 'mysubdir'] stat_res = gdal.VSIStatL(gdaltest.webhdfs_base_connection + '/foo/bar.baz') assert stat_res.size == 123456 assert stat_res.mtime == 1 # ReadDir on something known to be a file shouldn't cause network access dir_contents = gdal.ReadDir( gdaltest.webhdfs_base_connection + '/foo/bar.baz') assert dir_contents is None # Test error on ReadDir() handler = webserver.SequentialHandler() handler.add('GET', '/webhdfs/v1foo/error_test/?op=LISTSTATUS', 404) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir( gdaltest.webhdfs_base_connection + 'foo/error_test/') assert dir_contents is None ############################################################################### # Test write def test_vsiwebhdfs_write(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Zero length file handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): # Missing required config options with gdaltest.error_handler(): f = gdal.VSIFOpenL( gdaltest.webhdfs_base_connection + '/foo/bar', 'wb') assert f is None handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 307, {'Location': gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root'}, ) handler.add( 'PUT', '/redirected/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 201) with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DATANODE_HOST': 'localhost'}): with webserver.install_http_handler(handler): f = gdal.VSIFOpenL( gdaltest.webhdfs_base_connection + '/foo/bar', 'wb') assert f is not None assert gdal.VSIFCloseL(f) == 0 # Non-empty file gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 307, {'Location': gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root'}, ) handler.add( 'PUT', '/redirected/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 201) with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DATANODE_HOST': 'localhost'}): with webserver.install_http_handler(handler): f = gdal.VSIFOpenL( gdaltest.webhdfs_base_connection + '/foo/bar', 'wb') assert f is not None assert gdal.VSIFWriteL('foobar', 1, 6, f) == 6 handler = webserver.SequentialHandler() def method(request): h = request.headers if 'Content-Length' in h and h['Content-Length'] != 0: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() request.protocol_version = 'HTTP/1.1' request.send_response(307) request.send_header('Location', gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=APPEND&user.name=root') request.end_headers() handler.add('POST', '/webhdfs/v1/foo/bar?op=APPEND&user.name=root', 307, custom_method=method) handler.add('POST', '/redirected/webhdfs/v1/foo/bar?op=APPEND&user.name=root', 200, expected_body='foobar'.encode('ascii')) with webserver.install_http_handler(handler): assert gdal.VSIFCloseL(f) == 0 # Errors during file creation gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add( 'PUT', '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 404) with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DATANODE_HOST': 'localhost'}): with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = gdal.VSIFOpenL( gdaltest.webhdfs_base_connection + '/foo/bar', 'wb') assert f is None handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 307, {'Location': gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root'}, ) with gdaltest.config_options({'WEBHDFS_USERNAME': 'root'}): with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = gdal.VSIFOpenL( gdaltest.webhdfs_base_connection + '/foo/bar', 'wb') assert f is None # Errors during POST gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 307, {'Location': gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root'}, ) handler.add( 'PUT', '/redirected/webhdfs/v1/foo/bar?op=CREATE&overwrite=true&user.name=root', 201) with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DATANODE_HOST': 'localhost'}): with webserver.install_http_handler(handler): f = gdal.VSIFOpenL( gdaltest.webhdfs_base_connection + '/foo/bar', 'wb') assert f is not None assert gdal.VSIFWriteL('foobar', 1, 6, f) == 6 handler = webserver.SequentialHandler() handler.add('POST', '/webhdfs/v1/foo/bar?op=APPEND&user.name=root', 307, {'Location': gdaltest.webhdfs_redirected_url + '/webhdfs/v1/foo/bar?op=APPEND&user.name=root'}) handler.add( 'POST', '/redirected/webhdfs/v1/foo/bar?op=APPEND&user.name=root', 400) with gdaltest.error_handler(): with webserver.install_http_handler(handler): assert gdal.VSIFCloseL(f) != 0 ############################################################################### # Test Unlink() def test_vsiwebhdfs_unlink(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Success handler = webserver.SequentialHandler() handler.add('DELETE', '/webhdfs/v1/foo/bar?op=DELETE', 200, {}, '{"boolean":true}') with webserver.install_http_handler(handler): ret = gdal.Unlink(gdaltest.webhdfs_base_connection + '/foo/bar') assert ret == 0 gdal.VSICurlClearCache() # With permissions gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('DELETE', '/webhdfs/v1/foo/bar?op=DELETE&user.name=root&delegation=token', 200, {}, '{"boolean":true}') with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DELEGATION': 'token'}): with webserver.install_http_handler(handler): ret = gdal.Unlink(gdaltest.webhdfs_base_connection + '/foo/bar') assert ret == 0 # Failure handler = webserver.SequentialHandler() handler.add('DELETE', '/webhdfs/v1/foo/bar?op=DELETE', 200, {}, '{"boolean":false}') with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.Unlink(gdaltest.webhdfs_base_connection + '/foo/bar') assert ret == -1 gdal.VSICurlClearCache() # Failure handler = webserver.SequentialHandler() handler.add('DELETE', '/webhdfs/v1/foo/bar?op=DELETE', 404, {}) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.Unlink(gdaltest.webhdfs_base_connection + '/foo/bar') assert ret == -1 ############################################################################### # Test Mkdir() / Rmdir() def test_vsiwebhdfs_mkdir_rmdir(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Invalid name ret = gdal.Mkdir('/vsiwebhdfs', 0) assert ret != 0 # Valid handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/dir?op=MKDIRS', 200, {}, '{"boolean":true}') with webserver.install_http_handler(handler): ret = gdal.Mkdir(gdaltest.webhdfs_base_connection + '/foo/dir', 0) assert ret == 0 # Valid with all options handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/dir?op=MKDIRS&user.name=root&delegation=token&permission=755', 200, {}, '{"boolean":true}') with gdaltest.config_options({'WEBHDFS_USERNAME': 'root', 'WEBHDFS_DELEGATION': 'token'}): with webserver.install_http_handler(handler): ret = gdal.Mkdir(gdaltest.webhdfs_base_connection + '/foo/dir/', 493) # 0755 assert ret == 0 # Error handler = webserver.SequentialHandler() handler.add('PUT', '/webhdfs/v1/foo/dir_error?op=MKDIRS', 404) with webserver.install_http_handler(handler): ret = gdal.Mkdir(gdaltest.webhdfs_base_connection + '/foo/dir_error', 0) assert ret != 0 # Root name is invalid ret = gdal.Mkdir(gdaltest.webhdfs_base_connection + '/', 0) assert ret != 0 # Invalid name ret = gdal.Rmdir('/vsiwebhdfs') assert ret != 0 gdal.VSICurlClearCache() # Valid handler = webserver.SequentialHandler() handler.add('DELETE', '/webhdfs/v1/foo/dir?op=DELETE', 200, {}, '{"boolean":true}') with webserver.install_http_handler(handler): ret = gdal.Rmdir(gdaltest.webhdfs_base_connection + '/foo/dir') assert ret == 0 # Error handler = webserver.SequentialHandler() handler.add('DELETE', '/webhdfs/v1/foo/dir_error?op=DELETE', 404) with webserver.install_http_handler(handler): ret = gdal.Rmdir(gdaltest.webhdfs_base_connection + '/foo/dir_error') assert ret != 0 ############################################################################### def test_vsiwebhdfs_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Nominal cases (require valid credentials) def test_vsiwebhdfs_extra_1(): if not gdaltest.built_against_curl(): pytest.skip() webhdfs_url = gdal.GetConfigOption('WEBHDFS_URL') if webhdfs_url is None: pytest.skip('Missing WEBHDFS_URL') if webhdfs_url.endswith('/webhdfs/v1') or webhdfs_url.endswith('/webhdfs/v1/'): path = '/vsiwebhdfs/' + webhdfs_url statres = gdal.VSIStatL(path) assert statres is not None and stat.S_ISDIR(statres.mode), \ ('%s is not a valid bucket' % path) readdir = gdal.ReadDir(path) assert readdir is not None, 'ReadDir() should not return empty list' for filename in readdir: if filename != '.': subpath = path + '/' + filename assert gdal.VSIStatL(subpath) is not None, \ ('Stat(%s) should not return an error' % subpath) unique_id = 'vsiwebhdfs_test' subpath = path + '/' + unique_id ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id in readdir, \ ('ReadDir(%s) should contain %s' % (path, unique_id)) #ret = gdal.Mkdir(subpath, 0) # if ret == 0: # gdaltest.post_reason('fail') # print('Mkdir(%s) repeated should return an error' % subpath) # return 'fail' ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id not in readdir, \ ('ReadDir(%s) should not contain %s' % (path, unique_id)) ret = gdal.Rmdir(subpath) assert ret != 0, ('Rmdir(%s) repeated should return an error' % subpath) ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'wb') assert f is not None gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) ret = gdal.Rmdir(subpath) assert ret != 0, \ ('Rmdir(%s) on non empty directory should return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) ret = gdal.Unlink(subpath + '/test.txt') assert ret >= 0, ('Unlink(%s) should not return an error' % (subpath + '/test.txt')) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) return f = open_for_read('/vsiwebhdfs/' + webhdfs_url) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 ############################################################################### def test_vsiwebhdfs_cleanup(): for var in gdaltest.webhdfs_vars: gdal.SetConfigOption(var, gdaltest.webhdfs_vars[var]) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsis3.py�������������������������������������������������������������������0000775�0001750�0001750�00000403361�13701057757�015441� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: vsis3.py fc729c1093d97b7f10a62de44df1415a3f4dd961 2020-04-21 21:25:03 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsis3 # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copyright (c) 2015, Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os.path import stat import sys from osgeo import gdal import gdaltest import webserver import pytest def open_for_read(uri): """ Opens a test file for reading. """ return gdal.VSIFOpenExL(uri, 'rb', 1) ############################################################################### def test_vsis3_init(): gdaltest.aws_vars = {} for var in ('AWS_SECRET_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', 'AWS_TIMESTAMP', 'AWS_HTTPS', 'AWS_VIRTUAL_HOSTING', 'AWS_S3_ENDPOINT', 'AWS_REQUEST_PAYER', 'AWS_DEFAULT_REGION', 'AWS_DEFAULT_PROFILE', 'AWS_NO_SIGN_REQUEST'): gdaltest.aws_vars[var] = gdal.GetConfigOption(var) if gdaltest.aws_vars[var] is not None: gdal.SetConfigOption(var, "") # To avoid user AWS credentials in ~/.aws/credentials and ~/.aws/config # to mess up our tests gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '') gdal.SetConfigOption('AWS_CONFIG_FILE', '') gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', '') assert gdal.GetSignedURL('/vsis3/foo/bar') is None ############################################################################### # Test AWS_NO_SIGN_REQUEST=YES def test_vsis3_no_sign_request(): if not gdaltest.built_against_curl(): pytest.skip() with gdaltest.config_option('AWS_NO_SIGN_REQUEST', 'YES'): actual_url = gdal.GetActualURL('/vsis3/landsat-pds/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF') assert actual_url == 'https://landsat-pds.s3.amazonaws.com/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF' actual_url = gdal.GetActualURL('/vsis3_streaming/landsat-pds/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF') assert actual_url == 'https://landsat-pds.s3.amazonaws.com/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF' f = open_for_read('/vsis3/landsat-pds/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF') if f is None: if gdaltest.gdalurlopen('https://landsat-pds.s3.amazonaws.com/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF') is None: pytest.skip('cannot open URL') pytest.fail() gdal.VSIFCloseL(f) ############################################################################### # Test Sync() and multithreaded download def test_vsis3_sync_multithreaded_download(): if not gdaltest.built_against_curl(): pytest.skip() def cbk(pct, _, tab): assert pct >= tab[0] tab[0] = pct return True tab = [ -1 ] # Use a public bucket with /test_dummy/foo and /test_dummy/bar files with gdaltest.config_option('AWS_NO_SIGN_REQUEST', 'YES'): assert gdal.Sync('/vsis3/cdn.proj.org/test_dummy', '/vsimem/test_vsis3_no_sign_request_sync', options=['NUM_THREADS=2'], callback=cbk, callback_data=tab) assert tab[0] == 1.0 assert gdal.VSIStatL('/vsimem/test_vsis3_no_sign_request_sync/test_dummy/foo').size == 4 assert gdal.VSIStatL('/vsimem/test_vsis3_no_sign_request_sync/test_dummy/bar').size == 4 gdal.RmdirRecursive('/vsimem/test_vsis3_no_sign_request_sync') ############################################################################### # Test Sync() and multithreaded download and CHUNK_SIZE def test_vsis3_sync_multithreaded_download_chunk_size(): if not gdaltest.built_against_curl(): pytest.skip() def cbk(pct, _, tab): assert pct >= tab[0] tab[0] = pct return True tab = [ -1 ] # Use a public bucket with /test_dummy/foo and /test_dummy/bar files with gdaltest.config_option('AWS_NO_SIGN_REQUEST', 'YES'): assert gdal.Sync('/vsis3/cdn.proj.org/test_dummy', '/vsimem/test_vsis3_no_sign_request_sync', options=['NUM_THREADS=2', 'CHUNK_SIZE=3'], callback=cbk, callback_data=tab) assert tab[0] == 1.0 assert gdal.VSIStatL('/vsimem/test_vsis3_no_sign_request_sync/test_dummy/foo').size == 4 assert gdal.VSIStatL('/vsimem/test_vsis3_no_sign_request_sync/test_dummy/bar').size == 4 gdal.RmdirRecursive('/vsimem/test_vsis3_no_sign_request_sync') ############################################################################### # Error cases def test_vsis3_1(): if not gdaltest.built_against_curl(): pytest.skip() # Missing AWS_SECRET_ACCESS_KEY gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsis3/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('AWS_SECRET_ACCESS_KEY') >= 0 gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('AWS_SECRET_ACCESS_KEY') >= 0 gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', 'AWS_SECRET_ACCESS_KEY') # Missing AWS_ACCESS_KEY_ID gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsis3/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('AWS_ACCESS_KEY_ID') >= 0 gdal.SetConfigOption('AWS_ACCESS_KEY_ID', 'AWS_ACCESS_KEY_ID') # ERROR 1: The AWS Access Key Id you provided does not exist in our records. gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsis3/foo/bar.baz') if f is not None or gdal.VSIGetLastErrorMsg() == '': if f is not None: gdal.VSIFCloseL(f) if gdal.GetConfigOption('APPVEYOR') is not None: return pytest.fail(gdal.VSIGetLastErrorMsg()) gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/foo/bar.baz') assert f is None and gdal.VSIGetLastErrorMsg() != '' ############################################################################### def test_vsis3_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', 'AWS_SECRET_ACCESS_KEY') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', 'AWS_ACCESS_KEY_ID') gdal.SetConfigOption('AWS_TIMESTAMP', '20150101T000000Z') gdal.SetConfigOption('AWS_HTTPS', 'NO') gdal.SetConfigOption('AWS_VIRTUAL_HOSTING', 'NO') gdal.SetConfigOption('AWS_S3_ENDPOINT', '127.0.0.1:%d' % gdaltest.webserver_port) def get_s3_fake_bucket_resource_method(request): request.protocol_version = 'HTTP/1.1' if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization_8080 = 'AWS4-HMAC-SHA256 Credential=AWS_ACCESS_KEY_ID/20150101/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=38901846b865b12ac492bc005bb394ca8d60c098b68db57c084fac686a932f9e' expected_authorization_8081 = 'AWS4-HMAC-SHA256 Credential=AWS_ACCESS_KEY_ID/20150101/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=9f623b7ffce76188a456c70fb4813eb31969e88d130d6b4d801b3accbf050d6c' if request.headers['Authorization'] != expected_authorization_8080 and request.headers['Authorization'] != expected_authorization_8081: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) ############################################################################### # Test with a fake AWS server def test_vsis3_2(): if gdaltest.webserver_port == 0: pytest.skip() signed_url = gdal.GetSignedURL('/vsis3/s3_fake_bucket/resource') expected_url_8080 = 'http://127.0.0.1:8080/s3_fake_bucket/resource?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AWS_ACCESS_KEY_ID%2F20150101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20150101T000000Z&X-Amz-Expires=3600&X-Amz-Signature=dca239dd95f72ff8c37c15c840afc54cd19bdb07f7aaee2223108b5b0ad35da8&X-Amz-SignedHeaders=host' expected_url_8081 = 'http://127.0.0.1:8081/s3_fake_bucket/resource?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AWS_ACCESS_KEY_ID%2F20150101%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20150101T000000Z&X-Amz-Expires=3600&X-Amz-Signature=ef5216bc5971863414c69f6ca095276c0d62c0da97fa4f6ab80c30bd7fc146ac&X-Amz-SignedHeaders=host' assert signed_url in (expected_url_8080, expected_url_8081) handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3_streaming/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization_8080 = 'AWS4-HMAC-SHA256 Credential=AWS_ACCESS_KEY_ID/20150101/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=464a21835038b4f4d292b6463b8a005b9aaa980513aa8c42fc170abb733dce85' expected_authorization_8081 = 'AWS4-HMAC-SHA256 Credential=AWS_ACCESS_KEY_ID/20150101/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-security-token,Signature=b10e91575186342f9f2acfc91c4c2c9938c4a9e8cdcbc043d09d59d9641ad7fb' if request.headers['Authorization'] != expected_authorization_8080 and request.headers['Authorization'] != expected_authorization_8081: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/s3_fake_bucket_with_session_token/resource', custom_method=method) # Test with temporary credentials with gdaltest.config_option('AWS_SESSION_TOKEN', 'AWS_SESSION_TOKEN'): with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket_with_session_token/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' if 'Range' in request.headers: if request.headers['Range'] != 'bytes=0-16383': sys.stderr.write("Bad Range: '%s'\n" % str(request.headers['Range'])) request.send_response(403) return request.send_response(206) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 0-16383/1000000') request.send_header('Content-Length', 16384) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(('a' * 16384).encode('ascii')) else: request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 1000000) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(('a' * 1000000).encode('ascii')) handler.add('GET', '/s3_fake_bucket/resource2.bin', custom_method=method) with webserver.install_http_handler(handler): # old_val = gdal.GetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN') # gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', 'EMPTY_DIR') stat_res = gdal.VSIStatL('/vsis3/s3_fake_bucket/resource2.bin') # gdal.SetConfigOption('GDAL_DISABLE_READDIR_ON_OPEN', old_val) if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() handler = webserver.SequentialHandler() handler.add('HEAD', '/s3_fake_bucket/resource2.bin', 200, {'Content-type': 'text/plain', 'Content-Length': 1000000, 'Connection': 'close'}) with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsis3_streaming/s3_fake_bucket/resource2.bin') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-east-1') >= 0: request.send_response(400) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>AuthorizationHeaderMalformed</Code><Region>us-west-2</Region></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) handler.add('GET', '/s3_fake_bucket/redirect', custom_method=method) def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-west-2') >= 0 and request.headers['Host'].startswith('127.0.0.1'): request.send_response(301) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>PermanentRedirect</Code><Endpoint>localhost:%d</Endpoint></Error>' % request.server.port response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) handler.add('GET', '/s3_fake_bucket/redirect', custom_method=method) def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-west-2') >= 0 and request.headers['Host'].startswith('localhost'): request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) handler.add('GET', '/s3_fake_bucket/redirect', custom_method=method) # Test region and endpoint 'redirects' with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/redirect') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) if data != 'foo': if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') pytest.fail(data) # Test region and endpoint 'redirects' gdal.VSICurlClearCache() handler.req_count = 0 with webserver.install_http_handler(handler): f = open_for_read('/vsis3_streaming/s3_fake_bucket/redirect') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() def method(request): # /vsis3_streaming/ should have remembered the change of region and endpoint if request.headers['Authorization'].find('us-west-2') < 0 or \ not request.headers['Host'].startswith('localhost'): sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.protocol_version = 'HTTP/1.1' request.send_response(400) response = 'bla' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('GET', '/s3_fake_bucket/non_xml_error', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/s3_fake_bucket/non_xml_error') assert f is None and gdal.VSIGetLastErrorMsg().find('bla') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><oops>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/s3_fake_bucket/invalid_xml_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/s3_fake_bucket/invalid_xml_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<oops>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error/>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/s3_fake_bucket/no_code_in_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/s3_fake_bucket/no_code_in_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error/>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error><Code>AuthorizationHeaderMalformed</Code></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/s3_fake_bucket/no_region_in_AuthorizationHeaderMalformed_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/s3_fake_bucket/no_region_in_AuthorizationHeaderMalformed_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error><Code>PermanentRedirect</Code></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/s3_fake_bucket/no_endpoint_in_PermanentRedirect_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/s3_fake_bucket/no_endpoint_in_PermanentRedirect_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error><Code>bla</Code></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/s3_fake_bucket/no_message_in_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3_streaming/s3_fake_bucket/no_message_in_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error>') >= 0 # Test with requester pays handler = webserver.SequentialHandler() def method(request): if 'x-amz-request-payer' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization_8080 = 'AWS4-HMAC-SHA256 Credential=AWS_ACCESS_KEY_ID/20150101/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-request-payer,Signature=cf713a394e1b629ac0e468d60d3d4a12f5236fd72d21b6005c758b0dfc7049cd' expected_authorization_8081 = 'AWS4-HMAC-SHA256 Credential=AWS_ACCESS_KEY_ID/20150101/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-request-payer,Signature=4756166679008a1a40cd6ff91dbbef670a71c11bf8e3c998dd7385577c3ac4d9' if request.headers['Authorization'] != expected_authorization_8080 and request.headers['Authorization'] != expected_authorization_8081: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return if request.headers['x-amz-request-payer'] != 'requester': sys.stderr.write("Bad x-amz-request-payer: '%s'\n" % str(request.headers['x-amz-request-payer'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/s3_fake_bucket_with_requester_pays/resource', custom_method=method) with gdaltest.config_option('AWS_REQUEST_PAYER', 'requester'): with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3/s3_fake_bucket_with_requester_pays/resource') assert f is not None data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # Test temporary redirect handler = webserver.SequentialHandler() class HandlerClass(object): def __init__(self, response_value): self.old_authorization = None self.response_value = response_value def method_req_1(self, request): if request.headers['Host'].find('127.0.0.1') < 0: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return self.old_authorization = request.headers['Authorization'] request.protocol_version = 'HTTP/1.1' request.send_response(307) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>TemporaryRedirect</Code><Endpoint>localhost:%d</Endpoint></Error>' % request.server.port response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) def method_req_2(self, request): if request.headers['Host'].find('localhost') < 0: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return if self.old_authorization == request.headers['Authorization']: sys.stderr.write('Should have get a different Authorization. Bad headers: %s\n' % str(request.headers)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.send_response(200) response = self.response_value request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) h = HandlerClass('foo') handler.add('GET', '/s3_test_temporary_redirect_read/resource', custom_method=h.method_req_1) handler.add('GET', '/s3_test_temporary_redirect_read/resource', custom_method=h.method_req_2) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_test_temporary_redirect_read/resource') assert f is not None data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # Retry on the same bucket and check that the redirection was indeed temporary handler = webserver.SequentialHandler() h = HandlerClass('bar') handler.add('GET', '/s3_test_temporary_redirect_read/resource2', custom_method=h.method_req_1) handler.add('GET', '/s3_test_temporary_redirect_read/resource2', custom_method=h.method_req_2) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_test_temporary_redirect_read/resource2') assert f is not None data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar' ############################################################################### # Test re-opening after chaning configuration option (#2294) def test_vsis3_open_after_config_option_chage(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test_vsis3_change_config_options/?delimiter=%2F', 403) handler.add('GET', '/test_vsis3_change_config_options/test.bin', 403) with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3/test_vsis3_change_config_options/test.bin') assert f is None # Does not attempt any network access since we didn't change significant # parameters f = open_for_read('/vsis3/test_vsis3_change_config_options/test.bin') assert f is None with gdaltest.config_option('AWS_ACCESS_KEY_ID', 'another_key_id'): handler = webserver.SequentialHandler() handler.add('GET', '/test_vsis3_change_config_options/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix></Prefix> <Contents> <Key>test.bin</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>123456</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/test_vsis3_change_config_options/test.bin') assert f is not None gdal.VSIFCloseL(f) ############################################################################### # Test ReadDir() with a fake AWS server def test_vsis3_readdir(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-east-1') >= 0: request.send_response(400) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>AuthorizationHeaderMalformed</Code><Region>us-west-2</Region></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) elif request.headers['Authorization'].find('us-west-2') >= 0: if request.headers['Host'].startswith('127.0.0.1'): request.send_response(301) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>PermanentRedirect</Code><Endpoint>localhost:%d</Endpoint></Error>' % request.server.port response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) elif request.headers['Host'].startswith('localhost'): request.send_response(200) request.send_header('Content-type', 'application/xml') response = """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <NextMarker>bla</NextMarker> <Contents> <Key>a_dir/resource3.bin</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>123456</Size> </Contents> </ListBucketResult> """ request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', custom_method=method) handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', custom_method=method) handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', custom_method=method) def method(request): # /vsis3/ should have remembered the change of region and endpoint if request.headers['Authorization'].find('us-west-2') < 0 or \ not request.headers['Host'].startswith('localhost'): sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'application/xml') response = """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <Contents> <Key>a_dir/resource4.bin</Key> <LastModified>2015-10-16T12:34:56.000Z</LastModified> <Size>456789</Size> </Contents> <Contents> <Key>a_dir/i_am_a_glacier_file</Key> <LastModified>2015-10-16T12:34:56.000Z</LastModified> <Size>456789</Size> <StorageClass>GLACIER</StorageClass> </Contents> <CommonPrefixes> <Prefix>a_dir/subdir/</Prefix> </CommonPrefixes> </ListBucketResult> """ request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&marker=bla&prefix=a_dir%2F', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket2/a_dir/resource3.bin') if f is None: if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') pytest.fail() gdal.VSIFCloseL(f) with webserver.install_http_handler(webserver.SequentialHandler()): dir_contents = gdal.ReadDir('/vsis3/s3_fake_bucket2/a_dir') assert dir_contents == ['resource3.bin', 'resource4.bin', 'subdir'] assert gdal.VSIStatL('/vsis3/s3_fake_bucket2/a_dir/resource3.bin').size == 123456 assert gdal.VSIStatL('/vsis3/s3_fake_bucket2/a_dir/resource3.bin').mtime == 1 # Same as above: cached dir_contents = gdal.ReadDir('/vsis3/s3_fake_bucket2/a_dir') assert dir_contents == ['resource3.bin', 'resource4.bin', 'subdir'] # ReadDir on something known to be a file shouldn't cause network access dir_contents = gdal.ReadDir('/vsis3/s3_fake_bucket2/a_dir/resource3.bin') assert dir_contents is None # Test unrelated partial clear of the cache gdal.VSICurlPartialClearCache('/vsis3/s3_fake_bucket_unrelated') assert gdal.VSIStatL('/vsis3/s3_fake_bucket2/a_dir/resource3.bin').size == 123456 dir_contents = gdal.ReadDir('/vsis3/s3_fake_bucket2/a_dir') assert dir_contents == ['resource3.bin', 'resource4.bin', 'subdir'] # Test partial clear of the cache gdal.VSICurlPartialClearCache('/vsis3/s3_fake_bucket2/a_dir') handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket2/a_dir/resource3.bin', 400) handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&max-keys=100&prefix=a_dir%2Fresource3.bin%2F', 400) with webserver.install_http_handler(handler): gdal.VSIStatL('/vsis3/s3_fake_bucket2/a_dir/resource3.bin') handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <Contents> <Key>a_dir/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsis3/s3_fake_bucket2/a_dir') assert dir_contents == ['test.txt'] gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', 200, {}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <Contents> <Key>a_dir/resource4.bin</Key> <LastModified>2015-10-16T12:34:56.000Z</LastModified> <Size>456789</Size> </Contents> <Contents> <Key>a_dir/i_am_a_glacier_file</Key> <LastModified>2015-10-16T12:34:56.000Z</LastModified> <Size>456789</Size> <StorageClass>GLACIER</StorageClass> </Contents> <CommonPrefixes> <Prefix>a_dir/subdir/</Prefix> </CommonPrefixes> </ListBucketResult> """) with gdaltest.config_option('CPL_VSIL_CURL_IGNORE_GLACIER_STORAGE', 'NO'): with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsis3/s3_fake_bucket2/a_dir') assert dir_contents == ['resource4.bin', 'i_am_a_glacier_file', 'subdir'] # Test CPL_VSIL_CURL_NON_CACHED for config_option_value in ['/vsis3/s3_non_cached/test.txt', '/vsis3/s3_non_cached', '/vsis3/s3_non_cached:/vsis3/unrelated', '/vsis3/unrelated:/vsis3/s3_non_cached', '/vsis3/unrelated:/vsis3/s3_non_cached:/vsis3/unrelated']: with gdaltest.config_option('CPL_VSIL_CURL_NON_CACHED', config_option_value): handler = webserver.SequentialHandler() handler.add('GET', '/s3_non_cached/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo', config_option_value handler = webserver.SequentialHandler() handler.add('GET', '/s3_non_cached/test.txt', 200, {}, 'bar2') with webserver.install_http_handler(handler): size = gdal.VSIStatL('/vsis3/s3_non_cached/test.txt').size assert size == 4, config_option_value handler = webserver.SequentialHandler() handler.add('GET', '/s3_non_cached/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): size = gdal.VSIStatL('/vsis3/s3_non_cached/test.txt').size if size != 3: print(config_option_value) pytest.fail(data) handler = webserver.SequentialHandler() handler.add('GET', '/s3_non_cached/test.txt', 200, {}, 'bar2') with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar2', config_option_value # Retry without option for config_option_value in [None, '/vsis3/s3_non_cached/bar.txt']: with gdaltest.config_option('CPL_VSIL_CURL_NON_CACHED', config_option_value): handler = webserver.SequentialHandler() if config_option_value is None: handler.add('GET', '/s3_non_cached/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix></Prefix> <Contents> <Key>test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <Contents> <Key>test2.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) handler.add('GET', '/s3_non_cached/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo', config_option_value handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) # We should still get foo because of caching assert data == 'foo', config_option_value # List buckets (empty result) handler = webserver.SequentialHandler() handler.add('GET', '/', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult> <Buckets> </Buckets> </ListAllMyBucketsResult> """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsis3/') assert dir_contents == ['.'] gdal.VSICurlClearCache() # List buckets handler = webserver.SequentialHandler() handler.add('GET', '/', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult> <Buckets> <Bucket> <Name>mybucket</Name> </Bucket> </Buckets> </ListAllMyBucketsResult> """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsis3/') assert dir_contents == ['mybucket'] # Test temporary redirect handler = webserver.SequentialHandler() class HandlerClass(object): def __init__(self, response_value): self.old_authorization = None self.response_value = response_value def method_req_1(self, request): if request.headers['Host'].find('127.0.0.1') < 0: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return self.old_authorization = request.headers['Authorization'] request.protocol_version = 'HTTP/1.1' request.send_response(307) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>TemporaryRedirect</Code><Endpoint>localhost:%d</Endpoint></Error>' % request.server.port response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) def method_req_2(self, request): if request.headers['Host'].find('localhost') < 0: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return if self.old_authorization == request.headers['Authorization']: sys.stderr.write('Should have get a different Authorization. Bad headers: %s\n' % str(request.headers)) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'application/xml') response = self.response_value request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) h = HandlerClass("""<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix></Prefix> <CommonPrefixes> <Prefix>test</Prefix> </CommonPrefixes> </ListBucketResult> """) handler.add('GET', '/s3_test_temporary_redirect_read_dir/?delimiter=%2F', custom_method=h.method_req_1) handler.add('GET', '/s3_test_temporary_redirect_read_dir/?delimiter=%2F', custom_method=h.method_req_2) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsis3/s3_test_temporary_redirect_read_dir') assert dir_contents == ['test'] # Retry on the same bucket and check that the redirection was indeed temporary handler = webserver.SequentialHandler() h = HandlerClass("""<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>test/</Prefix> <CommonPrefixes> <Prefix>test/test2</Prefix> </CommonPrefixes> </ListBucketResult> """) handler.add('GET', '/s3_test_temporary_redirect_read_dir/?delimiter=%2F&prefix=test%2F', custom_method=h.method_req_1) handler.add('GET', '/s3_test_temporary_redirect_read_dir/?delimiter=%2F&prefix=test%2F', custom_method=h.method_req_2) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsis3/s3_test_temporary_redirect_read_dir/test') assert dir_contents == ['test2'] ############################################################################### # Test OpenDir() with a fake AWS server def test_vsis3_opendir(): if gdaltest.webserver_port == 0: pytest.skip() # Unlimited depth handler = webserver.SequentialHandler() handler.add('GET', '/vsis3_opendir/', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix/> <Marker/> <Contents> <Key>test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <Contents> <Key>subdir/</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>0</Size> </Contents> <Contents> <Key>subdir/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>5</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): d = gdal.OpenDir('/vsis3/vsis3_opendir') assert d is not None entry = gdal.GetNextDirEntry(d) assert entry.name == 'test.txt' assert entry.size == 40 assert entry.mode == 32768 assert entry.mtime == 1 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir' assert entry.mode == 16384 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir/test.txt' entry = gdal.GetNextDirEntry(d) assert entry is None gdal.CloseDir(d) # Depth = 0 handler = webserver.SequentialHandler() handler.add('GET', '/vsis3_opendir/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix/> <Marker/> <Contents> <Key>test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <CommonPrefixes> <Prefix>subdir/</Prefix> </CommonPrefixes> </ListBucketResult> """) with webserver.install_http_handler(handler): d = gdal.OpenDir('/vsis3/vsis3_opendir', 0) assert d is not None entry = gdal.GetNextDirEntry(d) assert entry.name == 'test.txt' assert entry.size == 40 assert entry.mode == 32768 assert entry.mtime == 1 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir' assert entry.mode == 16384 entry = gdal.GetNextDirEntry(d) assert entry is None gdal.CloseDir(d) # Depth = 1 handler = webserver.SequentialHandler() handler.add('GET', '/vsis3_opendir/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix/> <Marker/> <Contents> <Key>test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <CommonPrefixes> <Prefix>subdir/</Prefix> </CommonPrefixes> </ListBucketResult> """) with webserver.install_http_handler(handler): d = gdal.OpenDir('/vsis3/vsis3_opendir', 1) assert d is not None entry = gdal.GetNextDirEntry(d) assert entry.name == 'test.txt' assert entry.size == 40 assert entry.mode == 32768 assert entry.mtime == 1 entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir' assert entry.mode == 16384 handler = webserver.SequentialHandler() handler.add('GET', '/vsis3_opendir/?delimiter=%2F&prefix=subdir%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>subdir/</Prefix> <Marker/> <Contents> <Key>subdir/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>5</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): entry = gdal.GetNextDirEntry(d) assert entry.name == 'subdir/test.txt' entry = gdal.GetNextDirEntry(d) assert entry is None gdal.CloseDir(d) ############################################################################### # Test simple PUT support with a fake AWS server def test_vsis3_4(): if gdaltest.webserver_port == 0: pytest.skip() with webserver.install_http_handler(webserver.SequentialHandler()): with gdaltest.error_handler(): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3', 'wb') assert f is None handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket3/empty_file.bin', 200, {'Connection': 'close'}, 'foo') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsis3/s3_fake_bucket3/empty_file.bin').size == 3 # Empty file handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/s3_fake_bucket3/empty_file.bin', custom_method=method) with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/empty_file.bin', 'wb') assert f is not None gdal.ErrorReset() gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket3/empty_file.bin', 200, {'Connection': 'close'}, '') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsis3/s3_fake_bucket3/empty_file.bin').size == 0 # Invalid seek handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/empty_file.bin', 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFSeekL(f, 1, 0) assert ret != 0 gdal.VSIFCloseL(f) # Invalid read handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/empty_file.bin', 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFReadL(1, 1, f) assert not ret gdal.VSIFCloseL(f) # Error case handler = webserver.SequentialHandler() handler.add('PUT', '/s3_fake_bucket3/empty_file_error.bin', 403) with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/empty_file_error.bin', 'wb') assert f is not None gdal.ErrorReset() with gdaltest.error_handler(): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '' # Nominal case with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/another_file.bin', 'wb') assert f is not None assert gdal.VSIFSeekL(f, gdal.VSIFTellL(f), 0) == 0 assert gdal.VSIFSeekL(f, 0, 1) == 0 assert gdal.VSIFSeekL(f, 0, 2) == 0 assert gdal.VSIFWriteL('foo', 1, 3, f) == 3 assert gdal.VSIFSeekL(f, gdal.VSIFTellL(f), 0) == 0 assert gdal.VSIFWriteL('bar', 1, 3, f) == 3 handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '6': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(6).decode('ascii') if content != 'foobar': sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/s3_fake_bucket3/another_file.bin', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' # Redirect case with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/redirect', 'wb') assert f is not None assert gdal.VSIFWriteL('foobar', 1, 6, f) == 6 handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-east-1') >= 0: request.send_response(400) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>AuthorizationHeaderMalformed</Code><Region>us-west-2</Region></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) elif request.headers['Authorization'].find('us-west-2') >= 0: if request.headers['Content-Length'] != '6': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(6).decode('ascii') if content != 'foobar': sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/s3_fake_bucket3/redirect', custom_method=method) handler.add('PUT', '/s3_fake_bucket3/redirect', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' ############################################################################### # Test simple PUT support with retry logic def test_vsis3_write_single_put_retry(): if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.config_options({'GDAL_HTTP_MAX_RETRY': '2', 'GDAL_HTTP_RETRY_DELAY': '0.01'}): with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket3/put_with_retry.bin', 'wb') assert f is not None assert gdal.VSIFWriteL('foo', 1, 3, f) == 3 handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '3': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(3).decode('ascii') if content != 'foo': sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/s3_fake_bucket3/put_with_retry.bin', 502) handler.add('PUT', '/s3_fake_bucket3/put_with_retry.bin', custom_method=method) with gdaltest.error_handler(): with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) ############################################################################### # Test simple DELETE support with a fake AWS server def test_vsis3_5(): if gdaltest.webserver_port == 0: pytest.skip() with webserver.install_http_handler(webserver.SequentialHandler()): with gdaltest.error_handler(): ret = gdal.Unlink('/vsis3/foo') assert ret != 0 handler = webserver.SequentialHandler() handler.add('GET', '/s3_delete_bucket/delete_file', 200, {'Connection': 'close'}, 'foo') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsis3/s3_delete_bucket/delete_file').size == 3 handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsis3/s3_delete_bucket/delete_file').size == 3 handler = webserver.SequentialHandler() handler.add('DELETE', '/s3_delete_bucket/delete_file', 204) with webserver.install_http_handler(handler): ret = gdal.Unlink('/vsis3/s3_delete_bucket/delete_file') assert ret == 0 handler = webserver.SequentialHandler() handler.add('GET', '/s3_delete_bucket/delete_file', 404, {'Connection': 'close'}) handler.add('GET', '/s3_delete_bucket/?delimiter=%2F&max-keys=100&prefix=delete_file%2F', 404, {'Connection': 'close'}) with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsis3/s3_delete_bucket/delete_file') is None handler = webserver.SequentialHandler() handler.add('GET', '/s3_delete_bucket/delete_file_error', 200) handler.add('DELETE', '/s3_delete_bucket/delete_file_error', 403) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.Unlink('/vsis3/s3_delete_bucket/delete_file_error') assert ret != 0 handler = webserver.SequentialHandler() handler.add('GET', '/s3_delete_bucket/redirect', 200) def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-east-1') >= 0: request.send_response(400) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>AuthorizationHeaderMalformed</Code><Region>us-west-2</Region></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) elif request.headers['Authorization'].find('us-west-2') >= 0: request.send_response(204) request.send_header('Content-Length', 0) request.end_headers() else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('DELETE', '/s3_delete_bucket/redirect', custom_method=method) handler.add('DELETE', '/s3_delete_bucket/redirect', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.Unlink('/vsis3/s3_delete_bucket/redirect') assert ret == 0 ############################################################################### # Test DeleteObjects with a fake AWS server def test_vsis3_unlink_batch(): if gdaltest.webserver_port == 0: pytest.skip() def method(request): if request.headers['Content-MD5'] != 'Ze0X4LdlTwCsT+WpNxD9FA==': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(403) return content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != """<?xml version="1.0" encoding="UTF-8"?> <Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Object> <Key>foo</Key> </Object> <Object> <Key>bar/baz</Key> </Object> </Delete> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.send_response(200) response = """<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Deleted><Key>foo</Key></Deleted><Deleted><Key>bar/baz</Key></Deleted></DeleteResult>""" request.send_header('Content-Length', len(response)) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) handler = webserver.SequentialHandler() handler.add('POST', '/unlink_batch/?delete', custom_method=method) handler.add('POST', '/unlink_batch/?delete', 200, {}, """<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Deleted><Key>baw</Key></Deleted></DeleteResult>""") with gdaltest.config_option('CPL_VSIS3_UNLINK_BATCH_SIZE', '2'): with webserver.install_http_handler(handler): ret = gdal.UnlinkBatch(['/vsis3/unlink_batch/foo', '/vsis3/unlink_batch/bar/baz', '/vsis3/unlink_batch/baw']) assert ret handler = webserver.SequentialHandler() handler.add('POST', '/unlink_batch/?delete', 200, {}, """<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Failed><Key>foo</Key></Failed></DeleteResult>""") with webserver.install_http_handler(handler): ret = gdal.UnlinkBatch(['/vsis3/unlink_batch/foo']) assert not ret ############################################################################### # Test RmdirRecursive() with a fake AWS server def test_vsis3_rmdir_recursive(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/test_rmdir_recursive/?prefix=somedir%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>somedir/</Prefix> <Marker/> <Contents> <Key>somedir/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <Contents> <Key>somedir/subdir/</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>0</Size> </Contents> <Contents> <Key>somedir/subdir/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>5</Size> </Contents> </ListBucketResult> """) def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != """<?xml version="1.0" encoding="UTF-8"?> <Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Object> <Key>somedir/test.txt</Key> </Object> <Object> <Key>somedir/subdir/</Key> </Object> </Delete> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.send_response(200) response = """<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Deleted><Key>somedir/test.txt</Key></Deleted><Deleted><Key>somedir/subdir/</Key></Deleted></DeleteResult>""" request.send_header('Content-Length', len(response)) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('POST', '/test_rmdir_recursive/?delete', custom_method=method) def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != """<?xml version="1.0" encoding="UTF-8"?> <Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Object> <Key>somedir/subdir/test.txt</Key> </Object> <Object> <Key>somedir/</Key> </Object> </Delete> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(403) return request.protocol_version = 'HTTP/1.1' request.send_response(200) response = """<DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Deleted><Key>somedir/subdir/test.txt</Key></Deleted><Deleted><Key>somedir/</Key></Deleted></DeleteResult>""" request.send_header('Content-Length', len(response)) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('POST', '/test_rmdir_recursive/?delete', custom_method=method) with gdaltest.config_option('CPL_VSIS3_UNLINK_BATCH_SIZE', '2'): with webserver.install_http_handler(handler): assert gdal.RmdirRecursive('/vsis3/test_rmdir_recursive/somedir') == 0 ############################################################################### # Test multipart upload with a fake AWS server def test_vsis3_6(): if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.config_option('VSIS3_CHUNK_SIZE', '1'): # 1 MB with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket4/large_file.bin', 'wb') assert f is not None size = 1024 * 1024 + 1 big_buffer = 'a' * size handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Authorization'].find('us-east-1') >= 0: request.send_response(400) response = '<?xml version="1.0" encoding="UTF-8"?><Error><Message>bla</Message><Code>AuthorizationHeaderMalformed</Code><Region>us-west-2</Region></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.end_headers() request.wfile.write(response.encode('ascii')) elif request.headers['Authorization'].find('us-west-2') >= 0: response = '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>' request.send_response(200) request.send_header('Content-type', 'application/xml') request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploads', custom_method=method) handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploads', custom_method=method) def method(request): if request.headers['Content-Length'] != '1048576': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('ETag', '"first_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/s3_fake_bucket4/large_file.bin?partNumber=1&uploadId=my_id', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == size handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '1': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('ETag', '"second_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/s3_fake_bucket4/large_file.bin?partNumber=2&uploadId=my_id', custom_method=method) def method(request): if request.headers['Content-Length'] != '186': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return content = request.rfile.read(186).decode('ascii') if content != """<CompleteMultipartUpload> <Part> <PartNumber>1</PartNumber><ETag>"first_etag"</ETag></Part> <Part> <PartNumber>2</PartNumber><ETag>"second_etag"</ETag></Part> </CompleteMultipartUpload> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploadId=my_id', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' handler = webserver.SequentialHandler() handler.add('POST', '/s3_fake_bucket4/large_file_initiate_403_error.bin?uploads', 403) handler.add('POST', '/s3_fake_bucket4/large_file_initiate_empty_result.bin?uploads', 200) handler.add('POST', '/s3_fake_bucket4/large_file_initiate_invalid_xml_result.bin?uploads', 200, {}, 'foo') handler.add('POST', '/s3_fake_bucket4/large_file_initiate_no_uploadId.bin?uploads', 200, {}, '<foo/>') with webserver.install_http_handler(handler): for filename in ['/vsis3/s3_fake_bucket4/large_file_initiate_403_error.bin', '/vsis3/s3_fake_bucket4/large_file_initiate_empty_result.bin', '/vsis3/s3_fake_bucket4/large_file_initiate_invalid_xml_result.bin', '/vsis3/s3_fake_bucket4/large_file_initiate_no_uploadId.bin']: with gdaltest.config_option('VSIS3_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == 0 gdal.ErrorReset() gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' handler = webserver.SequentialHandler() handler.add('POST', '/s3_fake_bucket4/large_file_upload_part_403_error.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/s3_fake_bucket4/large_file_upload_part_403_error.bin?partNumber=1&uploadId=my_id', 403) handler.add('DELETE', '/s3_fake_bucket4/large_file_upload_part_403_error.bin?uploadId=my_id', 204) handler.add('POST', '/s3_fake_bucket4/large_file_upload_part_no_etag.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/s3_fake_bucket4/large_file_upload_part_no_etag.bin?partNumber=1&uploadId=my_id', 200) handler.add('DELETE', '/s3_fake_bucket4/large_file_upload_part_no_etag.bin?uploadId=my_id', 204) with webserver.install_http_handler(handler): for filename in ['/vsis3/s3_fake_bucket4/large_file_upload_part_403_error.bin', '/vsis3/s3_fake_bucket4/large_file_upload_part_no_etag.bin']: with gdaltest.config_option('VSIS3_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None, filename with gdaltest.error_handler(): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == 0, filename gdal.ErrorReset() gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '', filename # Simulate failure in AbortMultipart stage handler = webserver.SequentialHandler() handler.add('POST', '/s3_fake_bucket4/large_file_abortmultipart_403_error.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/s3_fake_bucket4/large_file_abortmultipart_403_error.bin?partNumber=1&uploadId=my_id', 403) handler.add('DELETE', '/s3_fake_bucket4/large_file_abortmultipart_403_error.bin?uploadId=my_id', 403) filename = '/vsis3/s3_fake_bucket4/large_file_abortmultipart_403_error.bin' with webserver.install_http_handler(handler): with gdaltest.config_option('VSIS3_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None, filename with gdaltest.error_handler(): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == 0, filename gdal.ErrorReset() with gdaltest.error_handler(): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '', filename # Simulate failure in CompleteMultipartUpload stage handler = webserver.SequentialHandler() handler.add('POST', '/s3_fake_bucket4/large_file_completemultipart_403_error.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/s3_fake_bucket4/large_file_completemultipart_403_error.bin?partNumber=1&uploadId=my_id', 200, {'ETag': 'first_etag'}, '') handler.add('PUT', '/s3_fake_bucket4/large_file_completemultipart_403_error.bin?partNumber=2&uploadId=my_id', 200, {'ETag': 'second_etag'}, '') handler.add('POST', '/s3_fake_bucket4/large_file_completemultipart_403_error.bin?uploadId=my_id', 403) # handler.add('DELETE', '/s3_fake_bucket4/large_file_completemultipart_403_error.bin?uploadId=my_id', 204) filename = '/vsis3/s3_fake_bucket4/large_file_completemultipart_403_error.bin' with webserver.install_http_handler(handler): with gdaltest.config_option('VSIS3_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None, filename ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == size, filename gdal.ErrorReset() with gdaltest.error_handler(): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '', filename ############################################################################### # Test multipart upload with retry logic def test_vsis3_write_multipart_retry(): if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.config_options({'GDAL_HTTP_MAX_RETRY': '2', 'GDAL_HTTP_RETRY_DELAY': '0.01'}): with gdaltest.config_option('VSIS3_CHUNK_SIZE', '1'): # 1 MB with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsis3/s3_fake_bucket4/large_file.bin', 'wb') assert f is not None size = 1024 * 1024 + 1 big_buffer = 'a' * size handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>' handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploads', 502) handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploads', 200, {'Content-type': 'application/xml', 'Content-Length': len(response), 'Connection': 'close'}, response) handler.add('PUT', '/s3_fake_bucket4/large_file.bin?partNumber=1&uploadId=my_id', 502) handler.add('PUT', '/s3_fake_bucket4/large_file.bin?partNumber=1&uploadId=my_id', 200, {'Content-Length': '0', 'ETag': '"first_etag"', 'Connection': 'close'}, {}) with gdaltest.error_handler(): with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == size handler = webserver.SequentialHandler() handler.add('PUT', '/s3_fake_bucket4/large_file.bin?partNumber=2&uploadId=my_id', 200, {'Content-Length': '0', 'ETag': '"second_etag"', 'Connection': 'close'}, {}) handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploadId=my_id', 502) handler.add('POST', '/s3_fake_bucket4/large_file.bin?uploadId=my_id', 200, {'Content-Length': '0', 'Connection': 'close'}, {}) with gdaltest.error_handler(): with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) ############################################################################### # Test Mkdir() / Rmdir() def test_vsis3_7(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_mkdir/dir/', 404, {'Connection': 'close'}) handler.add('GET', '/s3_bucket_test_mkdir/?delimiter=%2F&max-keys=100&prefix=dir%2F', 404, {'Connection': 'close'}) handler.add('PUT', '/s3_bucket_test_mkdir/dir/', 200) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsis3/s3_bucket_test_mkdir/dir', 0) assert ret == 0 assert stat.S_ISDIR(gdal.VSIStatL('/vsis3/s3_bucket_test_mkdir/dir').mode) dir_content = gdal.ReadDir('/vsis3/s3_bucket_test_mkdir/dir') assert dir_content == ['.'] # Try creating already existing directory handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_mkdir/dir/', 416, {'Connection': 'close'}) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsis3/s3_bucket_test_mkdir/dir', 0) assert ret != 0 handler = webserver.SequentialHandler() handler.add('DELETE', '/s3_bucket_test_mkdir/dir/', 204) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsis3/s3_bucket_test_mkdir/dir') assert ret == 0 # Try deleting already deleted directory handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_mkdir/dir/', 404) handler.add('GET', '/s3_bucket_test_mkdir/?delimiter=%2F&max-keys=100&prefix=dir%2F', 404, {'Connection': 'close'}) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsis3/s3_bucket_test_mkdir/dir') assert ret != 0 # Try deleting non-empty directory handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_mkdir/dir_nonempty/', 416) handler.add('GET', '/s3_bucket_test_mkdir/?delimiter=%2F&max-keys=100&prefix=dir_nonempty%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>dir_nonempty/</Prefix> <Contents> <Key>dir_nonempty/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsis3/s3_bucket_test_mkdir/dir_nonempty') assert ret != 0 # Try stat'ing a directory not ending with slash handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_dir_stat/test_dir_stat', 400) handler.add('GET', '/s3_bucket_test_dir_stat/?delimiter=%2F&max-keys=100&prefix=test_dir_stat%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>test_dir_stat/</Prefix> <Contents> <Key>test_dir_stat/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): assert stat.S_ISDIR(gdal.VSIStatL('/vsis3/s3_bucket_test_dir_stat/test_dir_stat').mode) # Try ReadDi'ing a directory not ending with slash handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_readdir/?delimiter=%2F&prefix=test_dirread%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>test_dirread/</Prefix> <Contents> <Key>test_dirread/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): assert gdal.ReadDir('/vsis3/s3_bucket_test_readdir/test_dirread') is not None # Try stat'ing a directory ending with slash handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_dir_stat_2/test_dir_stat/', 400) handler.add('GET', '/s3_bucket_test_dir_stat_2/?delimiter=%2F&max-keys=100&prefix=test_dir_stat%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>test_dir_stat/</Prefix> <Contents> <Key>test_dir_stat/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): assert stat.S_ISDIR(gdal.VSIStatL('/vsis3/s3_bucket_test_dir_stat_2/test_dir_stat/').mode) # Try ReadDi'ing a directory ending with slash handler = webserver.SequentialHandler() handler.add('GET', '/s3_bucket_test_readdir2/?delimiter=%2F&prefix=test_dirread%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>test_dirread/</Prefix> <Contents> <Key>test_dirread/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): assert gdal.ReadDir('/vsis3/s3_bucket_test_readdir2/test_dirread') is not None ############################################################################### # Test handling of file and directory with same name def test_vsis3_8(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/vsis3_8/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix></Prefix> <Contents> <Key>test</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <CommonPrefixes> <Prefix>test/</Prefix> </CommonPrefixes> </ListBucketResult> """) with webserver.install_http_handler(handler): listdir = gdal.ReadDir('/vsis3/vsis3_8', 0) assert listdir == ['test', 'test/'] handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert not stat.S_ISDIR(gdal.VSIStatL('/vsis3/vsis3_8/test').mode) handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert stat.S_ISDIR(gdal.VSIStatL('/vsis3/vsis3_8/test/').mode) ############################################################################### # Test vsisync() with SYNC_STRATEGY=ETAG def test_vsis3_sync_etag(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() options = ['SYNC_STRATEGY=ETAG'] with gdaltest.error_handler(): handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert not gdal.Sync('/i_do/not/exist', '/vsis3/', options=options) with gdaltest.error_handler(): handler = webserver.SequentialHandler() handler.add('GET', '/do_not/exist', 404) handler.add('GET', '/do_not/?delimiter=%2F&max-keys=100&prefix=exist%2F', 404) handler.add('PUT', '/do_not/exist', 404) with webserver.install_http_handler(handler): assert not gdal.Sync('vsifile.py', '/vsis3/do_not/exist', options=options) handler = webserver.SequentialHandler() handler.add('GET', '/out/', 200) handler.add('GET', '/out/testsync.txt', 404) handler.add('GET', '/out/?delimiter=%2F&max-keys=100&prefix=testsync.txt%2F', 404) def method(request): if request.headers['Content-Length'] != '3': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(3).decode('ascii') if content != 'foo': sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.send_header('ETag', '"acbd18db4cc2f85cedef654fccc4a4d8"') request.end_headers() handler.add('PUT', '/out/testsync.txt', custom_method=method) gdal.FileFromMemBuffer('/vsimem/testsync.txt', 'foo') def cbk(pct, _, tab): assert pct > tab[0] tab[0] = pct return True tab = [ 0 ] with webserver.install_http_handler(handler): assert gdal.Sync('/vsimem/testsync.txt', '/vsis3/out', options=options, callback=cbk, callback_data=tab) assert tab[0] == 1.0 # Re-try with cached ETag. Should generate no network access handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert gdal.Sync('/vsimem/testsync.txt', '/vsis3/out', options=options) assert gdal.Sync('/vsimem/testsync.txt', '/vsis3/out/testsync.txt', options=options) gdal.VSICurlClearCache() # Other direction: S3 to /vsimem handler = webserver.SequentialHandler() handler.add('GET', '/out/testsync.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'ETag' : '"acbd18db4cc2f85cedef654fccc4a4d8"' }, "foo") with webserver.install_http_handler(handler): assert gdal.Sync( '/vsis3/out/testsync.txt', '/vsimem/', options=options) # Shouldn't do any copy, but hard to verify with webserver.install_http_handler(webserver.SequentialHandler()): assert gdal.Sync( '/vsis3/out/testsync.txt', '/vsimem/', options=options) assert gdal.Sync( '/vsis3/out/testsync.txt', '/vsimem/testsync.txt', options=options) # Modify target file, and redo synchronization gdal.FileFromMemBuffer('/vsimem/testsync.txt', 'bar') handler = webserver.SequentialHandler() handler.add('GET', '/out/testsync.txt', 200, { 'Content-Length' : '3', 'ETag' : '"acbd18db4cc2f85cedef654fccc4a4d8"' }, "foo") with webserver.install_http_handler(handler): assert gdal.Sync( '/vsis3/out/testsync.txt', '/vsimem/', options=options) f = gdal.VSIFOpenL('/vsimem/testsync.txt', 'rb') data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # /vsimem to S3, but after cleaning the cache gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/out/', 200) handler.add('GET', '/out/testsync.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'ETag' : '"acbd18db4cc2f85cedef654fccc4a4d8"' }, "foo") with webserver.install_http_handler(handler): assert gdal.Sync('/vsimem/testsync.txt', '/vsis3/out', options=options) gdal.Unlink('/vsimem/testsync.txt') # Directory copying gdal.VSICurlClearCache() gdal.Mkdir('/vsimem/subdir', 0) gdal.FileFromMemBuffer('/vsimem/subdir/testsync.txt', 'foo') handler = webserver.SequentialHandler() handler.add('GET', '/out/', 200, {}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix/> <Marker/> <IsTruncated>false</IsTruncated> <Contents> <Key>testsync.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>3</Size> <ETag>"acbd18db4cc2f85cedef654fccc4a4d8"</ETag> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): assert gdal.Sync('/vsimem/subdir/', '/vsis3/out', options=options) gdal.RmdirRecursive('/vsimem/subdir') ############################################################################### # Test vsisync() with SYNC_STRATEGY=TIMESTAMP def test_vsis3_sync_timestamp(): if gdaltest.webserver_port == 0: pytest.skip() options = ['SYNC_STRATEGY=TIMESTAMP'] gdal.FileFromMemBuffer('/vsimem/testsync.txt', 'foo') # S3 to local: S3 file is older -> download gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/out/testsync.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'Last-Modified': 'Mon, 01 Jan 1970 00:00:01 GMT' }, "foo") handler.add('GET', '/out/testsync.txt', 200, { 'Content-Length' : '3', 'Last-Modified': 'Mon, 01 Jan 1970 00:00:01 GMT' }, "foo") with webserver.install_http_handler(handler): assert gdal.Sync( '/vsis3/out/testsync.txt', '/vsimem/', options=options) # S3 to local: S3 file is newer -> do nothing gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/out/testsync.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'Last-Modified': 'Mon, 01 Jan 2037 00:00:01 GMT' }, "foo") with webserver.install_http_handler(handler): assert gdal.Sync( '/vsis3/out/testsync.txt', '/vsimem/', options=options) # Local to S3: S3 file is older -> upload gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/out/testsync.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'Last-Modified': 'Mon, 01 Jan 1970 00:00:01 GMT' }, "foo") handler.add('PUT', '/out/testsync.txt', 200) with webserver.install_http_handler(handler): assert gdal.Sync( '/vsimem/testsync.txt', '/vsis3/out/testsync.txt', options=options) # Local to S3: S3 file is newer -> do nothgin gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/out/testsync.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'Last-Modified': 'Mon, 01 Jan 2037 00:00:01 GMT' }, "foo") with webserver.install_http_handler(handler): assert gdal.Sync( '/vsimem/testsync.txt', '/vsis3/out/testsync.txt', options=options) gdal.Unlink('/vsimem/testsync.txt') ############################################################################### # Test vsisync() with source and target in /vsis3 def test_vsis3_sync_source_target_in_vsis3(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/in/testsync.txt', 200, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3', 'Last-Modified': 'Mon, 01 Jan 1970 00:00:01 GMT' }, "foo") handler.add('GET', '/out/', 200) handler.add('GET', '/out/testsync.txt', 200, { 'Content-Length' : '3', 'Last-Modified': 'Mon, 01 Jan 1970 00:00:01 GMT' }, "foo") def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return if request.headers['x-amz-copy-source'] != '/in/testsync.txt': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/out/testsync.txt', custom_method=method) with webserver.install_http_handler(handler): assert gdal.Sync( '/vsis3/in/testsync.txt', '/vsis3/out/') ############################################################################### # Test rename def test_vsis3_fake_rename(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test/source.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3' }, "foo") handler.add('GET', '/test/target.txt', 404) handler.add('GET', '/test/?delimiter=%2F&max-keys=100&prefix=target.txt%2F', 200) def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return if request.headers['x-amz-copy-source'] != '/test/source.txt': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test/target.txt', custom_method=method) handler.add('DELETE', '/test/source.txt', 204) with webserver.install_http_handler(handler): assert gdal.Rename( '/vsis3/test/source.txt', '/vsis3/test/target.txt') == 0 ############################################################################### # Test rename def test_vsis3_fake_rename_dir(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test/source_dir', 404) handler.add('GET', '/test/?delimiter=%2F&max-keys=100&prefix=source_dir%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>source_dir/</Prefix> <Contents> <Key>source_dir/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>3</Size> </Contents> </ListBucketResult> """) handler.add('GET', '/test/target_dir/', 404) handler.add('GET', '/test/?delimiter=%2F&max-keys=100&prefix=target_dir%2F', 404) def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test/target_dir/', custom_method=method) def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return if request.headers['x-amz-copy-source'] != '/test/source_dir/test.txt': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test/target_dir/test.txt', custom_method=method) handler.add('DELETE', '/test/source_dir/test.txt', 204) handler.add('GET', '/test/source_dir/', 404) handler.add('GET', '/test/?delimiter=%2F&max-keys=100&prefix=source_dir%2F', 404) with webserver.install_http_handler(handler): assert gdal.Rename( '/vsis3/test/source_dir', '/vsis3/test/target_dir') == 0 ############################################################################### # Test rename onto existing dir is not allowed def test_vsis3_fake_rename_on_existing_dir(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test/source.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3' }, "foo") handler.add('GET', '/test_target_dir/', 200) with webserver.install_http_handler(handler): assert gdal.Rename( '/vsis3/test/source.txt', '/vsis3/test_target_dir') == -1 ############################################################################### # Test Sync() and multithreaded download and CHUNK_SIZE def test_vsis3_fake_sync_multithreaded_upload_chunk_size(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() def cbk(pct, _, tab): assert pct >= tab[0] tab[0] = pct return True gdal.Mkdir('/vsimem/test', 0) gdal.FileFromMemBuffer('/vsimem/test/foo', 'foo\n') tab = [ -1 ] handler = webserver.SequentialHandler() handler.add('GET', '/test_bucket/?prefix=test%2F', 200) handler.add('GET', '/test_bucket/test', 404) handler.add('GET', '/test_bucket/?delimiter=%2F&max-keys=100&prefix=test%2F', 200) handler.add('GET', '/test_bucket/', 200) handler.add('GET', '/test_bucket/test/', 404) handler.add('PUT', '/test_bucket/test/', 200) def method(request): request.protocol_version = 'HTTP/1.1' response = '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>' request.send_response(200) request.send_header('Content-type', 'application/xml') request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('POST', '/test_bucket/test/foo?uploads', custom_method=method) def method(request): if request.headers['Content-Length'] != '3': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('ETag', '"first_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_bucket/test/foo?partNumber=1&uploadId=my_id', custom_method=method) def method(request): if request.headers['Content-Length'] != '1': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('ETag', '"second_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_bucket/test/foo?partNumber=2&uploadId=my_id', custom_method=method) def method(request): if request.headers['Content-Length'] != '186': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return content = request.rfile.read(186).decode('ascii') if content != """<CompleteMultipartUpload> <Part> <PartNumber>1</PartNumber><ETag>"first_etag"</ETag></Part> <Part> <PartNumber>2</PartNumber><ETag>"second_etag"</ETag></Part> </CompleteMultipartUpload> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('POST', '/test_bucket/test/foo?uploadId=my_id', custom_method=method) with gdaltest.config_option('VSIS3_SIMULATE_THREADING', 'YES'): with webserver.install_http_handler(handler): assert gdal.Sync('/vsimem/test', '/vsis3/test_bucket', options=['NUM_THREADS=1', 'CHUNK_SIZE=3'], callback=cbk, callback_data=tab) assert tab[0] == 1.0 gdal.RmdirRecursive('/vsimem/test') def test_vsis3_fake_sync_multithreaded_upload_chunk_size_failure(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() gdal.Mkdir('/vsimem/test', 0) gdal.FileFromMemBuffer('/vsimem/test/foo', 'foo\n') handler = webserver.SequentialHandler() handler.add('GET', '/test_bucket/?prefix=test%2F', 200) handler.add('GET', '/test_bucket/test', 404) handler.add('GET', '/test_bucket/?delimiter=%2F&max-keys=100&prefix=test%2F', 200) handler.add('GET', '/test_bucket/', 200) handler.add('GET', '/test_bucket/test/', 404) handler.add('PUT', '/test_bucket/test/', 200) def method(request): request.protocol_version = 'HTTP/1.1' response = '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>' request.send_response(200) request.send_header('Content-type', 'application/xml') request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('POST', '/test_bucket/test/foo?uploads', custom_method=method) def method(request): if request.headers['Content-Length'] != '3': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('ETag', '"first_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_bucket/test/foo?partNumber=1&uploadId=my_id', 400) handler.add('DELETE', '/test_bucket/test/foo?uploadId=my_id', 204) with gdaltest.config_options({'VSIS3_SIMULATE_THREADING': 'YES', 'VSIS3_SYNC_MULTITHREADING': 'NO'}): with webserver.install_http_handler(handler): with gdaltest.error_handler(): assert not gdal.Sync('/vsimem/test', '/vsis3/test_bucket', options=['NUM_THREADS=1', 'CHUNK_SIZE=3']) gdal.RmdirRecursive('/vsimem/test') ############################################################################### # Test reading/writing metadata def test_vsis3_metadata(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() # Read HEADERS domain handler = webserver.SequentialHandler() handler.add('GET', '/test_metadata/foo.txt', 200, {'foo': 'bar'}) with webserver.install_http_handler(handler): md = gdal.GetFileMetadata('/vsis3/test_metadata/foo.txt', 'HEADERS') assert 'foo' in md and md['foo'] == 'bar' # Read TAGS domain handler = webserver.SequentialHandler() handler.add('GET', '/test_metadata/foo.txt?tagging', 200, {}, """<Tagging><TagSet><Tag><Key>foo</Key><Value>bar</Value></Tag></TagSet></Tagging>""") with webserver.install_http_handler(handler): md = gdal.GetFileMetadata('/vsis3/test_metadata/foo.txt', 'TAGS') assert 'foo' in md and md['foo'] == 'bar' # Write HEADERS domain handler = webserver.SequentialHandler() def method(request): if request.headers['foo'] != 'bar': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.end_headers() handler.add('PUT', '/test_metadata/foo.txt', custom_method=method) with webserver.install_http_handler(handler): assert gdal.SetFileMetadata('/vsis3/test_metadata/foo.txt', {'foo': 'bar'}, 'HEADERS') # Write TAGS domain handler = webserver.SequentialHandler() def method(request): request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != """<?xml version="1.0" encoding="UTF-8"?> <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <TagSet> <Tag> <Key>foo</Key> <Value>bar</Value> </Tag> </TagSet> </Tagging> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_metadata/foo.txt?tagging', custom_method=method) with webserver.install_http_handler(handler): assert gdal.SetFileMetadata('/vsis3/test_metadata/foo.txt', {'foo': 'bar'}, 'TAGS') # Write TAGS domain (wiping tags) handler = webserver.SequentialHandler() handler.add('DELETE', '/test_metadata/foo.txt?tagging', 204) with webserver.install_http_handler(handler): assert gdal.SetFileMetadata('/vsis3/test_metadata/foo.txt', {}, 'TAGS') # Error case with gdaltest.error_handler(): assert gdal.GetFileMetadata('/vsis3/test_metadata/foo.txt', 'UNSUPPORTED') == {} # Error case with gdaltest.error_handler(): assert not gdal.SetFileMetadata('/vsis3/test_metadata/foo.txt', {}, 'UNSUPPORTED') ############################################################################### # Test that we take into account directory listing to avoid useless # requests def test_vsis3_no_useless_requests(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/no_useless_requests/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix></Prefix> <Contents> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): assert gdal.VSIFOpenL('/vsis3/no_useless_requests/foo.txt', 'rb') is None assert gdal.VSIFOpenL('/vsis3/no_useless_requests/bar.txt', 'rb') is None assert gdal.VSIStatL('/vsis3/no_useless_requests/baz.txt') is None ############################################################################### # Read credentials from simulated ~/.aws/credentials def test_vsis3_read_credentials_file(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '/vsimem/aws_credentials') gdal.VSICurlClearCache() gdal.FileFromMemBuffer('/vsimem/aws_credentials', """ [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [default] aws_access_key_id = AWS_ACCESS_KEY_ID aws_secret_access_key = AWS_SECRET_ACCESS_KEY [unrelated] aws_access_key_id = foo aws_secret_access_key = bar """) handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '') gdal.Unlink('/vsimem/aws_credentials') ############################################################################### # Read credentials from simulated ~/.aws/config def test_vsis3_read_config_file(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('AWS_CONFIG_FILE', '/vsimem/aws_config') gdal.VSICurlClearCache() gdal.FileFromMemBuffer('/vsimem/aws_config', """ [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [default] aws_access_key_id = AWS_ACCESS_KEY_ID aws_secret_access_key = AWS_SECRET_ACCESS_KEY region = us-east-1 [unrelated] aws_access_key_id = foo aws_secret_access_key = bar """) handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('AWS_CONFIG_FILE', '') gdal.Unlink('/vsimem/aws_config') ############################################################################### # Read credentials from simulated ~/.aws/credentials and ~/.aws/config def test_vsis3_read_credentials_config_file(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '/vsimem/aws_credentials') gdal.SetConfigOption('AWS_CONFIG_FILE', '/vsimem/aws_config') gdal.VSICurlClearCache() gdal.FileFromMemBuffer('/vsimem/aws_credentials', """ [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [default] aws_access_key_id = AWS_ACCESS_KEY_ID aws_secret_access_key = AWS_SECRET_ACCESS_KEY [unrelated] aws_access_key_id = foo aws_secret_access_key = bar """) gdal.FileFromMemBuffer('/vsimem/aws_config', """ [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [default] aws_access_key_id = AWS_ACCESS_KEY_ID aws_secret_access_key = AWS_SECRET_ACCESS_KEY region = us-east-1 [unrelated] aws_access_key_id = foo aws_secret_access_key = bar """) handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '') gdal.Unlink('/vsimem/aws_credentials') gdal.SetConfigOption('AWS_CONFIG_FILE', '') gdal.Unlink('/vsimem/aws_config') ############################################################################### # Read credentials from simulated ~/.aws/credentials and ~/.aws/config with # a non default profile def test_vsis3_read_credentials_config_file_non_default_profile(tmpdir): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', None) gdal.SetConfigOption('AWS_CONFIG_FILE', None) gdal.SetConfigOption('AWS_DEFAULT_PROFILE', 'myprofile') os_aws = tmpdir.mkdir(".aws") gdal.VSICurlClearCache() os_aws.join('credentials').write(""" [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [myprofile] aws_access_key_id = AWS_ACCESS_KEY_ID aws_secret_access_key = AWS_SECRET_ACCESS_KEY [default] aws_access_key_id = foo aws_secret_access_key = bar """) os_aws.join('config').write(""" [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [profile myprofile] region = us-east-1 [default] aws_access_key_id = foo aws_secret_access_key = bar """) handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): with gdaltest.config_option( 'USERPROFILE' if sys.platform == 'win32' else 'HOME', str(tmpdir) ): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('AWS_DEFAULT_PROFILE', '') ############################################################################### # Read credentials from simulated ~/.aws/credentials and ~/.aws/config def test_vsis3_read_credentials_config_file_inconsistent(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '/vsimem/aws_credentials') gdal.SetConfigOption('AWS_CONFIG_FILE', '/vsimem/aws_config') gdal.VSICurlClearCache() gdal.FileFromMemBuffer('/vsimem/aws_credentials', """ [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [default] aws_access_key_id = AWS_ACCESS_KEY_ID aws_secret_access_key = AWS_SECRET_ACCESS_KEY [unrelated] aws_access_key_id = foo aws_secret_access_key = bar """) gdal.FileFromMemBuffer('/vsimem/aws_config', """ [unrelated] aws_access_key_id = foo aws_secret_access_key = bar [default] aws_access_key_id = AWS_ACCESS_KEY_ID_inconsistent aws_secret_access_key = AWS_SECRET_ACCESS_KEY_inconsistent region = us-east-1 [unrelated] aws_access_key_id = foo aws_secret_access_key = bar """) gdal.ErrorReset() handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None assert gdal.GetLastErrorMsg() != '' data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '') gdal.Unlink('/vsimem/aws_credentials') gdal.SetConfigOption('AWS_CONFIG_FILE', '') gdal.Unlink('/vsimem/aws_config') ############################################################################### # Read credentials from simulated EC2 instance def test_vsis3_read_credentials_ec2(): if gdaltest.webserver_port == 0: pytest.skip() if sys.platform not in ('linux', 'linux2', 'win32'): pytest.skip() gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '') gdal.SetConfigOption('AWS_CONFIG_FILE', '') gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', 'http://localhost:%d/latest/meta-data/iam/security-credentials/' % gdaltest.webserver_port) # Disable hypervisor related check to test if we are really on EC2 gdal.SetConfigOption('CPL_AWS_AUTODETECT_EC2', 'NO') gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/latest/meta-data/iam/security-credentials/', 200, {}, 'myprofile') handler.add('GET', '/latest/meta-data/iam/security-credentials/myprofile', 200, {}, """{ "AccessKeyId": "AWS_ACCESS_KEY_ID", "SecretAccessKey": "AWS_SECRET_ACCESS_KEY", "Expiration": "3000-01-01T00:00:00Z" }""") handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # Set a fake URL to check that credentials re-use works gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', '') handler = webserver.SequentialHandler() handler.add('GET', '/s3_fake_bucket/bar', 200, {}, 'bar') with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/bar') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar' gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', '') gdal.SetConfigOption('CPL_AWS_AUTODETECT_EC2', None) ############################################################################### # Read credentials from simulated EC2 instance with expiration of the # cached credentials def test_vsis3_read_credentials_ec2_expiration(): if gdaltest.webserver_port == 0: pytest.skip() if sys.platform not in ('linux', 'linux2', 'win32'): pytest.skip() gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', '') gdal.SetConfigOption('AWS_CONFIG_FILE', '') gdal.SetConfigOption('AWS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('AWS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', 'http://localhost:%d/latest/meta-data/iam/security-credentials/expire_in_past/' % gdaltest.webserver_port) # Disable hypervisor related check to test if we are really on EC2 gdal.SetConfigOption('CPL_AWS_AUTODETECT_EC2', 'NO') gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/latest/meta-data/iam/security-credentials/expire_in_past/', 200, {}, 'myprofile') handler.add('GET', '/latest/meta-data/iam/security-credentials/expire_in_past/myprofile', 200, {}, """{ "AccessKeyId": "AWS_ACCESS_KEY_ID", "SecretAccessKey": "AWS_SECRET_ACCESS_KEY", "Expiration": "1970-01-01T00:00:00Z" }""") handler.add('GET', '/latest/meta-data/iam/security-credentials/expire_in_past/myprofile', 200, {}, """{ "AccessKeyId": "AWS_ACCESS_KEY_ID", "SecretAccessKey": "AWS_SECRET_ACCESS_KEY", "Expiration": "1970-01-01T00:00:00Z" }""") handler.add('GET', '/s3_fake_bucket/resource', custom_method=get_s3_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsis3/s3_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # Set a fake URL to demonstrate we try to re-fetch credentials gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', 'http://localhost:%d/invalid/' % gdaltest.webserver_port) handler = webserver.SequentialHandler() handler.add('GET', '/invalid/myprofile', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsis3/s3_fake_bucket/bar') assert f is None gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', '') gdal.SetConfigOption('CPL_AWS_AUTODETECT_EC2', None) ############################################################################### def test_vsis3_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Nominal cases (require valid credentials) def test_vsis3_extra_1(): if not gdaltest.built_against_curl(): pytest.skip() credentials_filename = gdal.GetConfigOption('HOME', gdal.GetConfigOption('USERPROFILE', '')) + '/.aws/credentials' # Either a bucket name or bucket/filename s3_resource = gdal.GetConfigOption('S3_RESOURCE') if not os.path.exists(credentials_filename): if gdal.GetConfigOption('AWS_SECRET_ACCESS_KEY') is None: pytest.skip('Missing AWS_SECRET_ACCESS_KEY') elif gdal.GetConfigOption('AWS_ACCESS_KEY_ID') is None: pytest.skip('Missing AWS_ACCESS_KEY_ID') if s3_resource is None: pytest.skip('Missing S3_RESOURCE') if '/' not in s3_resource: path = '/vsis3/' + s3_resource statres = gdal.VSIStatL(path) assert statres is not None and stat.S_ISDIR(statres.mode), \ ('%s is not a valid bucket' % path) readdir = gdal.ReadDir(path) assert readdir is not None, 'ReadDir() should not return empty list' for filename in readdir: if filename != '.': subpath = path + '/' + filename assert gdal.VSIStatL(subpath) is not None, \ ('Stat(%s) should not return an error' % subpath) unique_id = 'vsis3_test' subpath = path + '/' + unique_id ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id in readdir, \ ('ReadDir(%s) should contain %s' % (path, unique_id)) ret = gdal.Mkdir(subpath, 0) assert ret != 0, ('Mkdir(%s) repeated should return an error' % subpath) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id not in readdir, \ ('ReadDir(%s) should not contain %s' % (path, unique_id)) ret = gdal.Rmdir(subpath) assert ret != 0, ('Rmdir(%s) repeated should return an error' % subpath) ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'wb') assert f is not None gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) ret = gdal.Rmdir(subpath) assert ret != 0, \ ('Rmdir(%s) on non empty directory should return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) assert gdal.Rename(subpath + '/test.txt', subpath + '/test2.txt') == 0 f = gdal.VSIFOpenL(subpath + '/test2.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) ret = gdal.Unlink(subpath + '/test2.txt') assert ret >= 0, \ ('Unlink(%s) should not return an error' % (subpath + '/test2.txt')) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) return f = open_for_read('/vsis3/' + s3_resource) assert f is not None, ('cannot open %s' % ('/vsis3/' + s3_resource)) ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 # Same with /vsis3_streaming/ f = open_for_read('/vsis3_streaming/' + s3_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 if False: # pylint: disable=using-constant-test # we actually try to read at read() time and bSetError = false # Invalid bucket : "The specified bucket does not exist" gdal.ErrorReset() f = open_for_read('/vsis3/not_existing_bucket/foo') with gdaltest.error_handler(): gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert gdal.VSIGetLastErrorMsg() != '' # Invalid resource gdal.ErrorReset() f = open_for_read('/vsis3_streaming/' + gdal.GetConfigOption('S3_RESOURCE') + '/invalid_resource.baz') assert f is None, gdal.VSIGetLastErrorMsg() # Test GetSignedURL() signed_url = gdal.GetSignedURL('/vsis3/' + s3_resource) f = open_for_read('/vsicurl_streaming/' + signed_url) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 ############################################################################### def test_vsis3_cleanup(): for var in gdaltest.aws_vars: gdal.SetConfigOption(var, gdaltest.aws_vars[var]) gdal.SetConfigOption('CPL_AWS_CREDENTIALS_FILE', None) gdal.SetConfigOption('AWS_CONFIG_FILE', None) gdal.SetConfigOption('CPL_AWS_EC2_CREDENTIALS_URL', None) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vrtmisc.py�����������������������������������������������������������������0000775�0001750�0001750�00000046706�13701057757�016067� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vrtmisc.py b6d10bc152c043126fcd3a527cea2237b3e6b715 2019-11-15 18:36:53 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Misc tests of VRT driver # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal from osgeo import osr ############################################################################### # Test linear scaling def test_vrtmisc_1(): ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale 74 255 0 255') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4323, 'did not get expected checksum' ############################################################################### # Test power scaling def test_vrtmisc_2(): ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale 74 255 0 255 -exponent 2.2') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4159, 'did not get expected checksum' ############################################################################### # Test power scaling (not <SrcMin> <SrcMax> in VRT file) def test_vrtmisc_3(): ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <ComplexSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <Exponent>2.2</Exponent> <DstMin>0</DstMin> <DstMax>255</DstMax> </ComplexSource> </VRTRasterBand> </VRTDataset>""") cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4159, 'did not get expected checksum' ############################################################################### # Test multi-band linear scaling with a single -scale occurrence. def test_vrtmisc_4(): # -scale specified once applies to all bands ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale 74 255 0 255 -b 1 -b 1') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None assert cs1 == 4323, 'did not get expected checksum' assert cs2 == 4323, 'did not get expected checksum' ############################################################################### # Test multi-band linear scaling with -scale_XX syntax def test_vrtmisc_5(): # -scale_2 applies to band 2 only ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale_2 74 255 0 255 -b 1 -b 1') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None assert cs1 == 4672, 'did not get expected checksum' assert cs2 == 4323, 'did not get expected checksum' ############################################################################### # Test multi-band linear scaling with repeated -scale syntax def test_vrtmisc_6(): # -scale repeated as many times as output band number ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale 0 255 0 255 -scale 74 255 0 255 -b 1 -b 1') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None assert cs1 == 4672, 'did not get expected checksum' assert cs2 == 4323, 'did not get expected checksum' ############################################################################### # Test multi-band power scaling with a single -scale and -exponent occurrence. def test_vrtmisc_7(): # -scale and -exponent, specified once, apply to all bands ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale 74 255 0 255 -exponent 2.2 -b 1 -b 1') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None assert cs1 == 4159, 'did not get expected checksum' assert cs2 == 4159, 'did not get expected checksum' ############################################################################### # Test multi-band power scaling with -scale_XX and -exponent_XX syntax def test_vrtmisc_8(): # -scale_2 and -exponent_2 apply to band 2 only ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale_2 74 255 0 255 -exponent_2 2.2 -b 1 -b 1') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None assert cs1 == 4672, 'did not get expected checksum' assert cs2 == 4159, 'did not get expected checksum' ############################################################################### # Test multi-band linear scaling with repeated -scale and -exponent syntax def test_vrtmisc_9(): # -scale and -exponent repeated as many times as output band number ds = gdal.Translate('', 'data/byte.tif', options='-of MEM -scale 0 255 0 255 -scale 74 255 0 255 -exponent 1 -exponent 2.2 -b 1 -b 1') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() ds = None assert cs1 == 4672, 'did not get expected checksum' assert cs2 == 4159, 'did not get expected checksum' ############################################################################### # Test metadata serialization (#5944) def test_vrtmisc_10(): gdal.FileFromMemBuffer("/vsimem/vrtmisc_10.vrt", """<VRTDataset rasterXSize="1" rasterYSize="1"> <Metadata> <MDI key="foo">bar</MDI> </Metadata> <Metadata domain="some_domain"> <MDI key="bar">baz</MDI> </Metadata> <Metadata domain="xml:a_xml_domain" format="xml"> <some_xml /> </Metadata> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">foo.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="1" RasterYSize="1" DataType="Byte" BlockXSize="1" BlockYSize="1" /> <SrcRect xOff="0" yOff="0" xSize="1" ySize="1" /> <DstRect xOff="0" yOff="0" xSize="1" ySize="1" /> </SimpleSource> </VRTRasterBand> </VRTDataset> """) ds = gdal.Open("/vsimem/vrtmisc_10.vrt", gdal.GA_Update) # to trigger a flush ds.SetMetadata(ds.GetMetadata()) ds = None ds = gdal.Open("/vsimem/vrtmisc_10.vrt", gdal.GA_Update) assert ds.GetMetadata() == {'foo': 'bar'} assert ds.GetMetadata('some_domain') == {'bar': 'baz'} assert ds.GetMetadata_List('xml:a_xml_domain')[0] == '<some_xml />\n' # Empty default domain ds.SetMetadata({}) ds = None ds = gdal.Open("/vsimem/vrtmisc_10.vrt") assert ds.GetMetadata() == {} assert ds.GetMetadata('some_domain') == {'bar': 'baz'} assert ds.GetMetadata_List('xml:a_xml_domain')[0] == '<some_xml />\n' ds = None gdal.Unlink("/vsimem/vrtmisc_10.vrt") ############################################################################### # Test relativeToVRT is preserved during re-serialization (#5985) def test_vrtmisc_11(): f = open('tmp/vrtmisc_11.vrt', 'wt') f.write( """<VRTDataset rasterXSize="1" rasterYSize="1"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">../data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="1" RasterYSize="1" DataType="Byte" BlockXSize="1" BlockYSize="1" /> <SrcRect xOff="0" yOff="0" xSize="1" ySize="1" /> <DstRect xOff="0" yOff="0" xSize="1" ySize="1" /> </SimpleSource> </VRTRasterBand> </VRTDataset> """) f.close() ds = gdal.Open("tmp/vrtmisc_11.vrt", gdal.GA_Update) # to trigger a flush ds.SetMetadata(ds.GetMetadata()) ds = None data = open('tmp/vrtmisc_11.vrt', 'rt').read() gdal.Unlink("tmp/vrtmisc_11.vrt") assert '<SourceFilename relativeToVRT="1">../data/byte.tif</SourceFilename>' in data ############################################################################### # Test set/delete nodata def test_vrtmisc_12(): gdal.FileFromMemBuffer("/vsimem/vrtmisc_12.vrt", """<VRTDataset rasterXSize="1" rasterYSize="1"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">foo.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="1" RasterYSize="1" DataType="Byte" BlockXSize="1" BlockYSize="1" /> <SrcRect xOff="0" yOff="0" xSize="1" ySize="1" /> <DstRect xOff="0" yOff="0" xSize="1" ySize="1" /> </SimpleSource> </VRTRasterBand> </VRTDataset> """) ds = gdal.Open("/vsimem/vrtmisc_12.vrt", gdal.GA_Update) ds.GetRasterBand(1).SetNoDataValue(123) ds = None ds = gdal.Open("/vsimem/vrtmisc_12.vrt", gdal.GA_Update) assert ds.GetRasterBand(1).GetNoDataValue() == 123 assert ds.GetRasterBand(1).DeleteNoDataValue() == 0 ds = None ds = gdal.Open("/vsimem/vrtmisc_12.vrt") assert ds.GetRasterBand(1).GetNoDataValue() is None ds = None gdal.Unlink("/vsimem/vrtmisc_12.vrt") ############################################################################### # Test CreateCopy() preserve NBITS def test_vrtmisc_13(): ds = gdal.Open('data/oddsize1bit.tif') out_ds = gdal.GetDriverByName('VRT').CreateCopy('', ds) assert out_ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ############################################################################### # Test SrcRect/DstRect are serialized as integers def test_vrtmisc_14(): src_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrtmisc_14_src.tif', 123456789, 1, options=['SPARSE_OK=YES', 'TILED=YES']) gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrtmisc_14.vrt', src_ds) src_ds = None fp = gdal.VSIFOpenL('/vsimem/vrtmisc_14.vrt', 'rb') content = gdal.VSIFReadL(1, 10000, fp).decode('latin1') gdal.VSIFCloseL(fp) gdal.Unlink("/vsimem/vrtmisc_14_src.tif") gdal.Unlink("/vsimem/vrtmisc_14.vrt") assert ('<SrcRect xOff="0" yOff="0" xSize="123456789" ySize="1"' in content and \ '<DstRect xOff="0" yOff="0" xSize="123456789" ySize="1"' in content) src_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrtmisc_14_src.tif', 1, 123456789, options=['SPARSE_OK=YES', 'TILED=YES']) gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrtmisc_14.vrt', src_ds) src_ds = None fp = gdal.VSIFOpenL('/vsimem/vrtmisc_14.vrt', 'rb') content = gdal.VSIFReadL(1, 10000, fp).decode('latin1') gdal.VSIFCloseL(fp) gdal.Unlink("/vsimem/vrtmisc_14_src.tif") gdal.Unlink("/vsimem/vrtmisc_14.vrt") assert ('<SrcRect xOff="0" yOff="0" xSize="1" ySize="123456789"' in content and \ '<DstRect xOff="0" yOff="0" xSize="1" ySize="123456789"' in content) ############################################################################### # Test CreateCopy() preserve SIGNEDBYTE def test_vrtmisc_15(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrtmisc_15.tif', 1, 1, options=['PIXELTYPE=SIGNEDBYTE']) out_ds = gdal.GetDriverByName('VRT').CreateCopy('', ds) assert out_ds.GetRasterBand(1).GetMetadataItem('PIXELTYPE', 'IMAGE_STRUCTURE') == 'SIGNEDBYTE' ds = None gdal.Unlink('/vsimem/vrtmisc_15.tif') ############################################################################### # Test rounding to closest int for coordinates def test_vrtmisc_16(): gdal.BuildVRT('/vsimem/vrtmisc_16.vrt', ['data/vrtmisc16_tile1.tif', 'data/vrtmisc16_tile2.tif']) fp = gdal.VSIFOpenL('/vsimem/vrtmisc_16.vrt', 'rb') content = gdal.VSIFReadL(1, 100000, fp).decode('latin1') gdal.VSIFCloseL(fp) assert '<SrcRect xOff="0" yOff="0" xSize="952" ySize="1189"' in content assert '<DstRect xOff="0" yOff="0" xSize="952" ySize="1189"' in content assert '<SrcRect xOff="0" yOff="0" xSize="494" ySize="893"' in content assert '<DstRect xOff="1680" yOff="5922" xSize="494" ySize="893"' in content gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrtmisc_16.tif', gdal.Open('/vsimem/vrtmisc_16.vrt')) ds = gdal.Open('/vsimem/vrtmisc_16.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 206 gdal.Unlink('/vsimem/vrtmisc_16.tif') gdal.Unlink('/vsimem/vrtmisc_16.vrt') gdal.FileFromMemBuffer('/vsimem/vrtmisc_16.vrt', """<VRTDataset rasterXSize="2174" rasterYSize="6815"> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>0</NoDataValue> <ComplexSource> <SourceFilename relativeToVRT="0">data/vrtmisc16_tile1.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="952" RasterYSize="1189" DataType="Byte" BlockXSize="952" BlockYSize="8" /> <SrcRect xOff="0" yOff="0" xSize="952" ySize="1189" /> <DstRect xOff="0" yOff="0" xSize="951.999999999543" ySize="1189.0000000031" /> <NODATA>0</NODATA> </ComplexSource> <ComplexSource> <SourceFilename relativeToVRT="0">data/vrtmisc16_tile2.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="494" RasterYSize="893" DataType="Byte" BlockXSize="494" BlockYSize="16" /> <SrcRect xOff="0" yOff="0" xSize="494" ySize="893" /> <DstRect xOff="1680.00000000001" yOff="5921.99999999876" xSize="494.000000000237" ySize="892.99999999767" /> <NODATA>0</NODATA> </ComplexSource> </VRTRasterBand> </VRTDataset>""") gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrtmisc_16.tif', gdal.Open('/vsimem/vrtmisc_16.vrt')) ds = gdal.Open('/vsimem/vrtmisc_16.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 206 gdal.Unlink('/vsimem/vrtmisc_16.tif') gdal.Unlink('/vsimem/vrtmisc_16.vrt') ############################################################################### # Check that the serialized xml:VRT doesn't include itself (#6767) def test_vrtmisc_17(): ds = gdal.Open('data/byte.tif') vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrtmisc_17.vrt', ds) xml_vrt = vrt_ds.GetMetadata('xml:VRT')[0] vrt_ds = None gdal.Unlink('/vsimem/vrtmisc_17.vrt') assert 'xml:VRT' not in xml_vrt ############################################################################### # Check GetMetadata('xml:VRT') behaviour on a in-memory VRT copied from a VRT def test_vrtmisc_18(): ds = gdal.Open('data/byte.vrt') vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('', ds) xml_vrt = vrt_ds.GetMetadata('xml:VRT')[0] assert gdal.GetLastErrorMsg() == '' vrt_ds = None assert ('<SourceFilename relativeToVRT="1">data/byte.tif</SourceFilename>' in xml_vrt or \ '<SourceFilename relativeToVRT="1">data\\byte.tif</SourceFilename>' in xml_vrt) ############################################################################### # Check RAT support def test_vrtmisc_rat(): ds = gdal.Translate('/vsimem/vrtmisc_rat.tif', 'data/byte.tif', format='MEM') rat = gdal.RasterAttributeTable() rat.CreateColumn("Ints", gdal.GFT_Integer, gdal.GFU_Generic) ds.GetRasterBand(1).SetDefaultRAT(rat) vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrtmisc_rat.vrt', ds) xml_vrt = vrt_ds.GetMetadata('xml:VRT')[0] assert gdal.GetLastErrorMsg() == '' vrt_ds = None assert '<GDALRasterAttributeTable tableType="thematic">' in xml_vrt vrt_ds = gdal.Translate('/vsimem/vrtmisc_rat.vrt', ds, format='VRT', srcWin=[0, 0, 1, 1]) xml_vrt = vrt_ds.GetMetadata('xml:VRT')[0] assert gdal.GetLastErrorMsg() == '' vrt_ds = None assert '<GDALRasterAttributeTable tableType="thematic">' in xml_vrt ds = None vrt_ds = gdal.Open('/vsimem/vrtmisc_rat.vrt', gdal.GA_Update) rat = vrt_ds.GetRasterBand(1).GetDefaultRAT() assert rat is not None and rat.GetColumnCount() == 1 vrt_ds.GetRasterBand(1).SetDefaultRAT(None) assert vrt_ds.GetRasterBand(1).GetDefaultRAT() is None vrt_ds = None ds = None gdal.Unlink('/vsimem/vrtmisc_rat.vrt') gdal.Unlink('/vsimem/vrtmisc_rat.tif') ############################################################################### # Check ColorTable support def test_vrtmisc_colortable(): ds = gdal.Translate('', 'data/byte.tif', format='VRT') ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 255, 255, 255)) ds.GetRasterBand(1).SetColorTable(ct) assert ds.GetRasterBand(1).GetColorTable().GetCount() == 1 ds.GetRasterBand(1).SetColorTable(None) assert ds.GetRasterBand(1).GetColorTable() is None ############################################################################### # Check histogram support def test_vrtmisc_histogram(): tmpfile = '/vsimem/vrtmisc_histogram.vrt' ds = gdal.Translate(tmpfile, 'data/byte.tif', format='VRT') ds.GetRasterBand(1).SetDefaultHistogram(1, 2, [3000000000, 4]) ds = None ds = gdal.Open(tmpfile) hist = ds.GetRasterBand(1).GetDefaultHistogram(force=0) ds = None assert hist == (1.0, 2.0, 2, [3000000000, 4]) gdal.Unlink(tmpfile) ############################################################################### # write SRS with unusual data axis to SRS axis mapping def test_vrtmisc_write_srs(): tmpfile = '/vsimem/test_vrtmisc_write_srs.vrt' ds = gdal.Translate(tmpfile, 'data/byte.tif', format='VRT') sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetSpatialRef(sr) ds = None ds = gdal.Open(tmpfile) assert ds.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [1,2] ds = None gdal.Unlink(tmpfile) ############################################################################### # complex scenario involving masks and implicit overviews def test_vrtmisc_mask_implicit_overviews(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): ds = gdal.Translate('/vsimem/cog.tif', 'data/stefan_full_rgba.tif', options = '-outsize 2048 0 -b 1 -b 2 -b 3 -mask 4') ds.BuildOverviews('NEAR', [2, 4]) ds = None gdal.Translate('/vsimem/cog.vrt', '/vsimem/cog.tif') ds = gdal.Open('/vsimem/cog.vrt') assert ds.GetRasterBand(1).GetOverview(0).GetMaskFlags() == gdal.GMF_PER_DATASET ds = None gdal.Translate('/vsimem/out.tif', '/vsimem/cog.vrt', options = '-b mask -outsize 10% 0') gdal.GetDriverByName('GTiff').Delete('/vsimem/cog.tif') gdal.Unlink('/vsimem/cog.vrt') ds = gdal.Open('/vsimem/out.tif') histo = ds.GetRasterBand(1).GetDefaultHistogram()[3] # Check that there are only 0 and 255 in the histogram assert histo[0] + histo[255] == ds.RasterXSize * ds.RasterYSize, histo assert ds.GetRasterBand(1).Checksum() == 46885 ds = None gdal.Unlink('/vsimem/out.tif') ############################################################################### # Cleanup. def test_vrtmisc_cleanup(): pass ����������������������������������������������������������gdalautotest-3.1.2/gcore/rat.py���������������������������������������������������������������������0000775�0001750�0001750�00000011046�13701057757�015153� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: rat.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RasterAttributeTables services from Python. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2009, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2009-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal import pytest ############################################################################### # Create a raster attribute table. def test_rat_1(): gdaltest.saved_rat = None try: rat = gdal.RasterAttributeTable() except: pytest.skip() rat.CreateColumn('Value', gdal.GFT_Integer, gdal.GFU_MinMax) rat.CreateColumn('Count', gdal.GFT_Integer, gdal.GFU_PixelCount) rat.SetRowCount(3) rat.SetValueAsInt(0, 0, 10) rat.SetValueAsInt(0, 1, 100) rat.SetValueAsInt(1, 0, 11) rat.SetValueAsInt(1, 1, 200) rat.SetValueAsInt(2, 0, 12) rat.SetValueAsInt(2, 1, 90) rat2 = rat.Clone() assert rat2.GetColumnCount() == 2, 'wrong column count' assert rat2.GetRowCount() == 3, 'wrong row count' assert rat2.GetNameOfCol(1) == 'Count', 'wrong column name' assert rat2.GetUsageOfCol(1) == gdal.GFU_PixelCount, 'wrong column usage' assert rat2.GetTypeOfCol(1) == gdal.GFT_Integer, 'wrong column type' assert rat2.GetRowOfValue(11.0) == 1, 'wrong row for value' assert rat2.GetValueAsInt(1, 1) == 200, 'wrong field value.' gdaltest.saved_rat = rat ############################################################################### # Save a RAT in a file, written to .aux.xml, read it back and check it. def test_rat_2(): if gdaltest.saved_rat is None: pytest.skip() ds = gdal.GetDriverByName('PNM').Create('tmp/rat_2.pnm', 100, 90, 1, gdal.GDT_Byte) ds.GetRasterBand(1).SetDefaultRAT(gdaltest.saved_rat) ds = None ds = gdal.Open('tmp/rat_2.pnm', gdal.GA_Update) rat2 = ds.GetRasterBand(1).GetDefaultRAT() assert rat2.GetColumnCount() == 2, 'wrong column count' assert rat2.GetRowCount() == 3, 'wrong row count' assert rat2.GetNameOfCol(1) == 'Count', 'wrong column name' assert rat2.GetUsageOfCol(1) == gdal.GFU_PixelCount, 'wrong column usage' assert rat2.GetTypeOfCol(1) == gdal.GFT_Integer, 'wrong column type' assert rat2.GetRowOfValue(11.0) == 1, 'wrong row for value' assert rat2.GetValueAsInt(1, 1) == 200, 'wrong field value.' # unset the RAT ds.GetRasterBand(1).SetDefaultRAT(None) ds = None ds = gdal.Open('tmp/rat_2.pnm') rat = ds.GetRasterBand(1).GetDefaultRAT() ds = None assert rat is None, 'expected a NULL RAT.' gdal.GetDriverByName('PNM').Delete('tmp/rat_2.pnm') gdaltest.saved_rat = None ############################################################################### # Save an empty RAT (#5451) def test_rat_3(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/rat_3.tif', 1, 1) ds.GetRasterBand(1).SetDefaultRAT(gdal.RasterAttributeTable()) ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/rat_3.tif') ############################################################################## ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/pnm_read.py����������������������������������������������������������������0000775�0001750�0001750�00000004161�13701057757�016152� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: pnm_read.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for a all datatypes from a PNM file. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest import gdaltest ############################################################################### # When imported build a list of units based on the files available. init_list = [ ('byte.pnm', 4672), ('uint16.pnm', 4672)] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('PNM') def test_pnm_open(filename, checksum): ut = gdaltest.GDALTest('PNM', filename, 1, checksum) ut.testOpen() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsihdfs.py�����������������������������������������������������������������0000775�0001750�0001750�00000010570�13701057757�016034� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vsihdfs.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test VSI file primitives # Author: James McClain <jmcclain@azavea.com> # ############################################################################### # Copyright (c) 2011-2013, Even Rouault <even dot rouault at spatialys.com> # Copyright (c) 2018, Azavea # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import pytest # Read test def test_vsihdfs_1(): filename = '/vsihdfs/file:' + os.getcwd() + '/data/text.txt' fp = gdal.VSIFOpenL(filename, 'rb') if fp is None: gdaltest.have_vsihdfs = False pytest.skip() gdaltest.have_vsihdfs = True data = gdal.VSIFReadL(5, 1, fp) assert data and data.decode('ascii') == 'Lorem' data = gdal.VSIFReadL(1, 6, fp) assert data and data.decode('ascii') == ' ipsum' gdal.VSIFCloseL(fp) # Seek test def test_vsihdfs_2(): if gdaltest.have_vsihdfs == False: pytest.skip() filename = '/vsihdfs/file:' + os.getcwd() + '/data/text.txt' fp = gdal.VSIFOpenL(filename, 'rb') assert fp is not None gdal.VSIFSeekL(fp, 2, 0) # From beginning gdal.VSIFSeekL(fp, 5, 0) data = gdal.VSIFReadL(6, 1, fp) assert data and data.decode('ascii') == ' ipsum' gdal.VSIFSeekL(fp, 7, 1) # From current data = gdal.VSIFReadL(3, 1, fp) assert data and data.decode('ascii') == 'sit' gdal.VSIFSeekL(fp, 9, 2) # From end data = gdal.VSIFReadL(7, 1, fp) assert data and data.decode('ascii') == 'laborum' gdal.VSIFCloseL(fp) # Tell test def test_vsihdfs_3(): if gdaltest.have_vsihdfs == False: pytest.skip() filename = '/vsihdfs/file:' + os.getcwd() + '/data/text.txt' fp = gdal.VSIFOpenL(filename, 'rb') assert fp is not None data = gdal.VSIFReadL(5, 1, fp) assert data and data.decode('ascii') == 'Lorem' offset = gdal.VSIFTellL(fp) assert offset == 5 gdal.VSIFCloseL(fp) # Write test def test_vsihdfs_4(): pytest.skip() # EOF test def test_vsihdfs_5(): if gdaltest.have_vsihdfs == False: pytest.skip() filename = '/vsihdfs/file:' + os.getcwd() + '/data/text.txt' fp = gdal.VSIFOpenL(filename, 'rb') assert fp is not None gdal.VSIFReadL(5, 1, fp) eof = gdal.VSIFEofL(fp) assert eof == 0 gdal.VSIFReadL(1000000, 1, fp) eof = gdal.VSIFEofL(fp) assert eof == 0 gdal.VSIFReadL(1, 1, fp) eof = gdal.VSIFEofL(fp) assert eof == 1 gdal.VSIFSeekL(fp, 0, 0) eof = gdal.VSIFEofL(fp) assert eof == 0 gdal.VSIFCloseL(fp) # Stat test def test_vsihdfs_6(): if gdaltest.have_vsihdfs == False: pytest.skip() filename = '/vsihdfs/file:' + os.getcwd() + '/data/text.txt' statBuf = gdal.VSIStatL(filename, 0) assert statBuf filename = '/vsihdfs/file:' + os.getcwd() + '/data/no-such-file.txt' statBuf = gdal.VSIStatL(filename, 0) assert not statBuf # ReadDir test def test_vsihdfs_7(): if gdaltest.have_vsihdfs == False: pytest.skip() dirname = '/vsihdfs/file:' + os.getcwd() + '/data/' lst = gdal.ReadDir(dirname) assert len(lst) >= 360 ����������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/__init__.py����������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057757�016110� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/virtualmem.py��������������������������������������������������������������0000775�0001750�0001750�00000023421�13701057757�016552� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: virtualmem.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GDALVirtualMem interface # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2014, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal import pytest ############################################################################### # Test linear and tiled virtual mem interfaces in read-only mode def test_virtualmem_1(): if gdal.GetConfigOption('SKIP_VIRTUALMEM'): pytest.skip() try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() ds = gdal.Open('../gdrivers/data/small_world.tif') bufxsize = 400 bufysize = 128 tilexsize = 128 tileysize = 64 ar = ds.ReadAsArray(0, 0, bufxsize, bufysize) try: ar_flat_bsq = ds.GetVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, bufxsize, bufysize, gdal.GDT_Int16, [1, 2, 3], 1, 1024 * 1024, 0) except: if not sys.platform.startswith('linux'): # Also try GetTiledVirtualMemArray() robustness (#5728) try: ar_tiled_band1 = ds.GetRasterBand(1).GetTiledVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, tilexsize, tileysize, gdal.GDT_Int16, 1024 * 1024) except: pass pytest.skip() ar_flat_band1 = ds.GetRasterBand(1).GetVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, bufxsize, bufysize, gdal.GDT_Int16, 1024 * 1024, 0) ar_flat_bip = ds.GetVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, bufxsize, bufysize, gdal.GDT_Int16, [1, 2, 3], 0, 1024 * 1024, 0) ar_tiled_band1 = ds.GetRasterBand(1).GetTiledVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, tilexsize, tileysize, gdal.GDT_Int16, 1024 * 1024) ar_tip = ds.GetTiledVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, tilexsize, tileysize, gdal.GDT_Int16, [1, 2, 3], gdal.GTO_TIP, 1024 * 1024) ar_bit = ds.GetTiledVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, tilexsize, tileysize, gdal.GDT_Int16, [1, 2, 3], gdal.GTO_BIT, 1024 * 1024) ar_bsq = ds.GetTiledVirtualMemArray(gdal.GF_Read, 0, 0, bufxsize, bufysize, tilexsize, tileysize, gdal.GDT_Int16, [1, 2, 3], gdal.GTO_BSQ, 1024 * 1024) tilepercol = int((bufysize + tileysize - 1) / tileysize) tileperrow = int((bufxsize + tilexsize - 1) / tilexsize) for tiley in range(tilepercol): reqysize = tileysize if reqysize + tiley * tileysize > bufysize: reqysize = bufysize - tiley * tileysize for tilex in range(tileperrow): reqxsize = tilexsize if reqxsize + tilex * tilexsize > bufxsize: reqxsize = bufxsize - tilex * tilexsize for y in range(reqysize): for x in range(reqxsize): for band in range(3): assert ar_tip[tiley][tilex][y][x][band] == ar[band][tiley * tileysize + y][tilex * tilexsize + x] assert ar_tip[tiley][tilex][y][x][band] == ar_flat_bsq[band][tiley * tileysize + y][tilex * tilexsize + x] assert ar_tip[tiley][tilex][y][x][band] == ar_flat_bip[tiley * tileysize + y][tilex * tilexsize + x][band] assert ar_tip[tiley][tilex][y][x][band] == ar_bsq[band][tiley][tilex][y][x] assert ar_tip[tiley][tilex][y][x][band] == ar_bit[tiley][tilex][band][y][x] if band == 0: assert ar_flat_band1[tiley * tileysize + y][tilex * tilexsize + x] == ar_flat_bip[tiley * tileysize + y][tilex * tilexsize + x][0] assert ar_tiled_band1[tiley][tilex][y][x] == ar_flat_bip[tiley * tileysize + y][tilex * tilexsize + x][0] # We need to destroy the array before dataset destruction ar_flat_band1 = None ar_flat_bip = None ar_tiled_band1 = None ar_tip = None ar_bit = None ar_bsq = None ds = None ############################################################################### # Test write mode def test_virtualmem_2(): if gdal.GetConfigOption('SKIP_VIRTUALMEM'): pytest.skip() try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() if not sys.platform.startswith('linux'): pytest.skip() ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 1) ar = ds.GetVirtualMemArray(gdal.GF_Write) ar.fill(255) ar = None # We need to have released the Virtual Memory Array with ar=None to be sure that # every modified page gets flushed back to the dataset cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 57182 ############################################################################### # Test virtual mem auto with a raw driver def test_virtualmem_3(): if gdal.GetConfigOption('SKIP_VIRTUALMEM'): pytest.skip() try: from osgeo import gdalnumeric except ImportError: pytest.skip() if not sys.platform.startswith('linux'): pytest.skip() for tmpfile in ['tmp/virtualmem_3.img', '/vsimem/virtualmem_3.img']: ds = gdal.GetDriverByName('EHdr').Create(tmpfile, 400, 300, 2) ar1 = ds.GetRasterBand(1).GetVirtualMemAutoArray(gdal.GF_Write) ar2 = ds.GetRasterBand(2).GetVirtualMemAutoArray(gdal.GF_Write) for y in range(ds.RasterYSize): ar1[y].fill(127) ar2[y].fill(255) # We need to destroy the array before dataset destruction ar1 = None ar2 = None ds = None ds = gdal.Open(tmpfile) ar1 = ds.GetRasterBand(1).GetVirtualMemAutoArray(gdal.GF_Read) ar2 = ds.GetRasterBand(2).GetVirtualMemAutoArray(gdal.GF_Read) ar_127 = gdalnumeric.empty(ds.RasterXSize) ar_127.fill(127) ar_255 = gdalnumeric.empty(ds.RasterXSize) ar_255.fill(255) for y in range(ds.RasterYSize): assert gdalnumeric.array_equal(ar1[y], ar_127) assert gdalnumeric.array_equal(ar2[y], ar_255) # We need to destroy the array before dataset destruction ar1 = None ar2 = None ds = None gdal.GetDriverByName('EHdr').Delete(tmpfile) ############################################################################### # Test virtual mem auto with GTiff def test_virtualmem_4(): if gdal.GetConfigOption('SKIP_VIRTUALMEM'): pytest.skip() try: from osgeo import gdalnumeric except ImportError: pytest.skip() if not sys.platform.startswith('linux'): pytest.skip() tmpfile = 'tmp/virtualmem_4.tif' for option in ['INTERLEAVE=PIXEL', 'INTERLEAVE=BAND']: gdal.Unlink(tmpfile) ds = gdal.GetDriverByName('GTiff').Create(tmpfile, 400, 301, 2, options=[option]) ar1 = ds.GetRasterBand(1).GetVirtualMemAutoArray(gdal.GF_Write) if gdal.GetLastErrorMsg().find('mmap() failed') >= 0: ar1 = None ds = None pytest.skip() ar1 = None ar1 = ds.GetRasterBand(1).GetVirtualMemAutoArray(gdal.GF_Write) ar1_bis = ds.GetRasterBand(1).GetVirtualMemAutoArray(gdal.GF_Write) ar2 = ds.GetRasterBand(2).GetVirtualMemAutoArray(gdal.GF_Write) for y in range(ds.RasterYSize): ar1[y].fill(127) ar2[y].fill(255) val = ar1_bis[0][0] # We need to destroy the array before dataset destruction ar1 = None ar1_bis = None ar2 = None ds = None assert val == 127 ds = gdal.Open(tmpfile) ar1 = ds.GetRasterBand(1).GetVirtualMemAutoArray(gdal.GF_Read) ar2 = ds.GetRasterBand(2).GetVirtualMemAutoArray(gdal.GF_Read) ar_127 = gdalnumeric.empty(ds.RasterXSize) ar_127.fill(127) ar_255 = gdalnumeric.empty(ds.RasterXSize) ar_255.fill(255) for y in range(ds.RasterYSize): if not gdalnumeric.array_equal(ar1[y], ar_127): ar1 = None ar2 = None ds = None pytest.fail() if not gdalnumeric.array_equal(ar2[y], ar_255): ar1 = None ar2 = None ds = None pytest.fail() # We need to destroy the array before dataset destruction ar1 = None ar2 = None ds = None gdal.GetDriverByName('GTiff').Delete(tmpfile) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/rfc30.py�������������������������������������������������������������������0000775�0001750�0001750�00000010133�13701057757�015276� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: rfc30.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC 30 (UTF filename handling) support. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2010 Frank Warmerdam # Copyright (c) 2010-2011, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from sys import version_info from osgeo import gdal import gdaltest import pytest ############################################################################### # Try opening a file with a Chinese name using the Python UTF-8 string. def test_rfc30_1(): if version_info >= (3, 0, 0): filename = 'xx\u4E2D\u6587.\u4E2D\u6587' filename_escaped = gdaltest.urlescape(filename) else: exec("filename = u'xx\u4E2D\u6587.\u4E2D\u6587'") filename_escaped = gdaltest.urlescape(filename.encode('utf-8')) if not gdaltest.download_file('http://download.osgeo.org/gdal/data/gtiff/' + filename_escaped, filename): pytest.skip() filename = 'tmp/cache/' + filename ds = gdal.Open(filename) file_list = ds.GetFileList() assert ds is not None, 'failed to open utf filename.' ds = None ds = gdal.Open(file_list[0]) assert ds is not None, 'failed to open utf filename (2).' ############################################################################### # Try creating, then renaming a utf-8 named file. def test_rfc30_2(): if version_info >= (3, 0, 0): filename = 'tmp/yy\u4E2D\u6587.\u4E2D\u6587' else: exec("filename = u'tmp/yy\u4E2D\u6587.\u4E2D\u6587'") # The typemaps should accept Unicode strings directly # filename = filename.encode( 'utf-8' ) fd = gdal.VSIFOpenL(filename, 'w') assert fd is not None, 'failed to create utf-8 named file.' gdal.VSIFWriteL('abc', 3, 1, fd) gdal.VSIFCloseL(fd) # rename if version_info >= (3, 0, 0): new_filename = 'tmp/yy\u4E2D\u6587.\u4E2D\u6587' filename_for_rename = filename else: exec("new_filename = u'tmp/yy\u4E2D\u6587.\u4E2D\u6587'") filename_for_rename = filename.encode('utf-8') # FIXME ? rename should perhaps accept unicode strings new_filename = new_filename.encode('utf-8') # FIXME ? rename should perhaps accept unicode strings assert gdal.Rename(filename_for_rename, new_filename) == 0, 'utf-8 rename failed.' fd = gdal.VSIFOpenL(new_filename, 'r') assert fd is not None, 'reopen failed with utf8' data = gdal.VSIFReadL(3, 1, fd) gdal.VSIFCloseL(fd) if version_info >= (3, 0, 0): ok = eval("data == b'abc'") else: ok = data == 'abc' assert ok, 'did not get expected data.' gdal.Unlink(new_filename) fd = gdal.VSIFOpenL(new_filename, 'r') assert fd is None, 'did unlink fail on utf8 filename?' �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/bmp_read.py����������������������������������������������������������������0000775�0001750�0001750�00000004700�13701057757�016135� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: bmp_read.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for a all datatypes from a BMP file. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev <dron@remotesensing.org> # Copyright (c) 2008-2009, Even Rouault <even dot rouault at spatialys.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest init_list = [ ('1bit.bmp', 200), ('4bit_pal.bmp', 2587), ('8bit_pal.bmp', 4672), ('byte_rle8.bmp', 4672)] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('BMP') def test_bmp_open(filename, checksum): ut = gdaltest.GDALTest('BMP', filename, 1, checksum) ut.testOpen() def test_bmp_online_1(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/bmp/8bit_pal_rle.bmp', '8bit_pal_rle.bmp'): pytest.skip() tst = gdaltest.GDALTest('BMP', 'tmp/cache/8bit_pal_rle.bmp', 1, 17270, filename_absolute=1) return tst.testOpen() def test_bmp_online_2(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/bmp/24bit.bmp', '24bit.bmp'): pytest.skip() tst = gdaltest.GDALTest('BMP', 'tmp/cache/24bit.bmp', 1, 7158, filename_absolute=1) if tst == 'success': tst = gdaltest.GDALTest('BMP', 'tmp/cache/24bit.bmp', 3, 27670, filename_absolute=1) return tst.testOpen() ����������������������������������������������������������������gdalautotest-3.1.2/gcore/numpy_rw_multidim.py�������������������������������������������������������0000775�0001750�0001750�00000016377�13701057757�020165� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: numpy_rw_multidim.py 2fb147ddf53416161a4ef763c11038a15ffa8678 2019-06-07 16:07:20 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test multidimensional support with numpy # Author: Even Rouault <even.rouault@spatialys.com> # ############################################################################### # Copyright (c) 2019, Even Rouault <even.rouault@spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal import pytest import struct ############################################################################### # verify that we can load Numeric python, and find the Numpy driver. def test_numpy_rw_multidim_init(): gdaltest.numpy_drv = None try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() gdal.AllRegister() gdaltest.numpy_drv = gdal.GetDriverByName('NUMPY') assert gdaltest.numpy_drv is not None, 'NUMPY driver not found!' ############################################################################### def test_numpy_rw_multidim_readasarray_writearray(): if gdaltest.numpy_drv is None: pytest.skip() import numpy as np drv = gdal.GetDriverByName('MEM') ds = drv.CreateMultiDimensional('myds') rg = ds.GetRootGroup() dim0 = rg.CreateDimension("dim0", None, None, 2) dim1 = rg.CreateDimension("dim1", None, None, 3) myarray = rg.CreateMDArray("myarray", [ dim0, dim1 ], gdal.ExtendedDataType.Create(gdal.GDT_Byte)) assert myarray ar = np.array([[1,2,3], [4,5,6]], dtype=np.uint8) assert myarray.WriteArray(ar) == gdal.CE_None got_ar = myarray.ReadAsArray() assert got_ar.shape == (2, 3) assert np.array_equal(got_ar, ar) # Check algo with non-numpy method so as to detect issues with buffer striding assert struct.unpack('B' * 6, myarray.Read()) == (1, 2, 3, 4, 5, 6) assert struct.unpack('B' * 6, myarray.Read(buffer_stride = [3, 1])) == (1, 2, 3, 4, 5, 6) assert struct.unpack('B' * 6, myarray.Read(buffer_stride = [1, 2])) == (1, 4, 2, 5, 3, 6) ############################################################################### def test_numpy_rw_multidim_numpy_array_as_dataset(): if gdaltest.numpy_drv is None: pytest.skip() from osgeo import gdalnumeric import numpy as np for typ in (np.int8, np.uint8, np.uint16, np.int16, np.uint32, np.int32, np.float32, np.float64, np.cfloat, np.cdouble): ar = np.array([[1,2,3], [4,5,6]], dtype=typ) ds = gdalnumeric.OpenMultiDimensionalNumPyArray(ar) assert ds rg = ds.GetRootGroup() assert rg myarray = rg.OpenMDArray('array') assert myarray assert np.array_equal(myarray.ReadAsArray(), ar) ############################################################################### def test_numpy_rw_multidim_readasarray_writearray_negative_strides(): if gdaltest.numpy_drv is None: pytest.skip() import numpy as np drv = gdal.GetDriverByName('MEM') ds = drv.CreateMultiDimensional('myds') rg = ds.GetRootGroup() dim0 = rg.CreateDimension("dim0", None, None, 2) dim1 = rg.CreateDimension("dim1", None, None, 3) myarray = rg.CreateMDArray("myarray", [ dim0, dim1 ], gdal.ExtendedDataType.Create(gdal.GDT_Byte)) assert myarray ar = np.array([[1,2,3], [4,5,6]], dtype=np.uint8) ar = ar[::-1,::-1] # Test negative strides assert myarray.WriteArray(ar) == gdal.CE_None got_ar = myarray.ReadAsArray() assert got_ar.shape == (2, 3) assert np.array_equal(got_ar, ar) # Check algo with non-numpy method so as to detect issues with buffer striding assert struct.unpack('B' * 6, myarray.Read()) == (6, 5, 4, 3, 2, 1) assert struct.unpack('B' * 6, myarray.Read(buffer_stride = [3, 1])) == (6, 5, 4, 3, 2, 1) assert struct.unpack('B' * 6, myarray.Read(buffer_stride = [1, 2])) == (6, 3, 5, 2, 4, 1) ############################################################################### def test_numpy_rw_multidim_numpy_array_as_dataset_negative_strides(): if gdaltest.numpy_drv is None: pytest.skip() from osgeo import gdalnumeric import numpy as np for typ in (np.int8, np.uint8, np.uint16, np.int16, np.uint32, np.int32, np.float32, np.float64, np.cfloat, np.cdouble): ar = np.array([[1,2,3], [4,5,6]], dtype=typ) ar = ar[::-1,::-1] # Test negative strides ds = gdalnumeric.OpenMultiDimensionalNumPyArray(ar) assert ds rg = ds.GetRootGroup() assert rg myarray = rg.OpenMDArray('array') assert myarray assert np.array_equal(myarray.ReadAsArray(), ar) ############################################################################### def test_numpy_rw_multidim_compound_datatype(): if gdaltest.numpy_drv is None: pytest.skip() from osgeo import gdalnumeric import numpy as np drv = gdal.GetDriverByName('MEM') ds = drv.CreateMultiDimensional('myds') rg = ds.GetRootGroup() dim = rg.CreateDimension("dim0", None, None, 2) comp0 = gdal.EDTComponent.Create('x', 0, gdal.ExtendedDataType.Create(gdal.GDT_Int16)) comp1 = gdal.EDTComponent.Create('y', 4, gdal.ExtendedDataType.Create(gdal.GDT_Int32)) dt = gdal.ExtendedDataType.CreateCompound("mytype", 8, [comp0, comp1]) myarray = rg.CreateMDArray("myarray", [ dim ], dt) assert myarray numpydt = gdalnumeric.ExtendedDataTypeToNumPyDataType(dt) assert numpydt.itemsize == 8 assert numpydt.names == ('x', 'y') assert numpydt.fields['x'] == (np.int16, 0) assert numpydt.fields['y'] == (np.int32, 4) assert myarray.Write(struct.pack('hi' * 2, 32767, 1000000, -32768, -1000000)) == gdal.CE_None res = myarray.ReadAsArray() assert res.dtype == numpydt assert np.array_equal(res, np.array([( 32767, 1000000), (-32768, -1000000)], dtype = res.dtype)) ar = np.array([( -32768, -1000000), (-32767, 1000000)], dtype = numpydt) assert myarray.WriteArray(ar) == gdal.CE_None res = myarray.ReadAsArray() assert np.array_equal(res, ar) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/tiff_read.py���������������������������������������������������������������0000775�0001750�0001750�00000410766�13701057757�016324� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: tiff_read.py 91f0e771e71d3cb27d5ad401e4bc3b52c0742453 2020-04-24 20:11:58 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for a all datatypes from a TIFF file. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2007-2014, Even Rouault <even dot rouault at spatialys.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import sys import shutil import pytest import webserver import gdaltest from osgeo import gdal, osr init_list = [ ('byte.tif', 1, 4672), ('uint16_sgilog.tif', 1, 4672), ('next_literalrow.tif', 1, 4), ('next_literalspan.tif', 1, 4), ('next_default_case.tif', 1, 4), ('thunder.tif', 1, 3), ('int10.tif', 1, 4672), ('int12.tif', 1, 4672), ('int16.tif', 1, 4672), ('uint16.tif', 1, 4672), ('int24.tif', 1, 4672), ('int32.tif', 1, 4672), ('uint32.tif', 1, 4672), ('float16.tif', 1, 4672), ('float24.tif', 1, 4672), ('float32.tif', 1, 4672), ('float32_minwhite.tif', 1, 1), ('float64.tif', 1, 4672), ('cint16.tif', 1, 5028), ('cint32.tif', 1, 5028), ('cfloat32.tif', 1, 5028), ('cfloat64.tif', 1, 5028), # The following four related partial final strip/tiles (#1179) ('separate_tiled.tif', 2, 15234), ('seperate_strip.tif', 2, 15234), # TODO: Spelling. ('contig_tiled.tif', 2, 15234), ('contig_strip.tif', 2, 15234), ('empty1bit.tif', 1, 0) ] @pytest.mark.parametrize( 'filename,band,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('GTiff') def test_tiff_open(filename, band, checksum): ut = gdaltest.GDALTest('GTiff', filename, band, checksum) ut.testOpen() ############################################################################### # Test absolute/offset && index directory access def test_tiff_read_off(): # Test absolute/offset directory access. ds = gdal.Open('GTIFF_DIR:off:408:data/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672 # Same with GTIFF_RAW: prefix ds = gdal.Open('GTIFF_RAW:GTIFF_DIR:off:408:data/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672 # Test index directory access ds = gdal.Open('GTIFF_DIR:1:data/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672 # Check that georeferencing is read properly when accessing # "GTIFF_DIR" subdatasets (#3478) gt = ds.GetGeoTransform() assert gt == (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0), \ 'did not get expected geotransform' # Error cases with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:') assert ds is None with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:1') assert ds is None with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:1:') assert ds is None with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:1:/vsimem/i_dont_exist.tif') assert ds is None # Requested directory not found with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:2:data/byte.tif') assert ds is None # Opening a specific TIFF directory is not supported in update mode. # Switching to read-only with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:1:data/byte.tif', gdal.GA_Update) assert ds is not None ############################################################################### # Confirm we interpret bands as alpha when we should, and not when we # should not. def test_tiff_check_alpha(): # Grey + alpha ds = gdal.Open('data/stefan_full_greyalpha.tif') assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_AlphaBand, \ 'Wrong color interpretation (stefan_full_greyalpha).' ds = None gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('data/stefan_full_greyalpha.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) gdaltest.supports_force_rgba = False if ds.RasterCount == 4: gdaltest.supports_force_rgba = True if gdaltest.supports_force_rgba: got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [1970, 1970, 1970, 10807] ds = None # RGB + alpha ds = gdal.Open('data/stefan_full_rgba.tif') assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand, \ 'Wrong color interpretation (stefan_full_rgba).' ds = None if gdaltest.supports_force_rgba: gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('data/stefan_full_rgba.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] # FIXME? Not the same as without GTIFF_FORCE_RGBA=YES assert got_cs == [11547, 57792, 35643, 10807] ds = None # RGB + undefined ds = gdal.Open('data/stefan_full_rgba_photometric_rgb.tif') assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_Undefined, \ 'Wrong color interpretation (stefan_full_rgba_photometric_rgb).' ds = None if gdaltest.supports_force_rgba: gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('data/stefan_full_rgba_photometric_rgb.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [12603, 58561, 36064, 10807] ds = None ############################################################################### # Test reading a CMYK tiff as RGBA image def test_tiff_read_cmyk_rgba(): ds = gdal.Open('data/rgbsmall_cmyk.tif') md = ds.GetMetadata('IMAGE_STRUCTURE') assert 'SOURCE_COLOR_SPACE' in md and md['SOURCE_COLOR_SPACE'] == 'CMYK', \ 'bad value for IMAGE_STRUCTURE[SOURCE_COLOR_SPACE]' assert ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_RedBand, \ 'Wrong color interpretation.' assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand, \ 'Wrong color interpretation (alpha).' assert ds.GetRasterBand(1).Checksum() == 23303, \ ('Expected checksum = %d. Got = %d' % (23303, ds.GetRasterBand(1).Checksum())) ############################################################################### # Test reading a CMYK tiff as a raw image def test_tiff_read_cmyk_raw(): ds = gdal.Open('GTIFF_RAW:data/rgbsmall_cmyk.tif') assert ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_CyanBand, \ 'Wrong color interpretation.' assert ds.GetRasterBand(1).Checksum() == 29430, \ ('Expected checksum = %d. Got = %d' % (29430, ds.GetRasterBand(1).Checksum())) ############################################################################### # Test reading a OJPEG image def test_tiff_read_ojpeg(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/zackthecat.tif') gdal.PopErrorHandler() if ds is None: if gdal.GetLastErrorMsg().find('Cannot open TIFF file due to missing codec') == 0: pytest.skip() pytest.fail(gdal.GetLastErrorMsg()) gdal.PushErrorHandler('CPLQuietErrorHandler') got_cs = ds.GetRasterBand(1).Checksum() gdal.PopErrorHandler() expected_cs = 61570 assert got_cs == expected_cs, \ ('Expected checksum = %d. Got = %d' % (expected_cs, got_cs)) # gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/zackthecat_corrupted.tif') cs = ds.GetRasterBand(1).Checksum() gdal.PopErrorHandler() if cs != 0: print('Should be 0 with internal libtiff') ############################################################################### # Read a .tif.gz file def test_tiff_read_gzip(): try: os.remove('data/byte.tif.gz.properties') except OSError: pass ds = gdal.Open('/vsigzip/./data/byte.tif.gz') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None try: os.stat('data/byte.tif.gz.properties') pytest.fail('did not expect data/byte.tif.gz.properties') except OSError: return ############################################################################### # Read a .tif.zip file (with explicit filename) def test_tiff_read_zip_1(): ds = gdal.Open('/vsizip/./data/byte.tif.zip/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tif.zip file (with implicit filename) def test_tiff_read_zip_2(): ds = gdal.Open('/vsizip/./data/byte.tif.zip') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tif.zip file with a single file in a subdirectory (with explicit filename) def test_tiff_read_zip_3(): ds = gdal.Open('/vsizip/./data/onefileinsubdir.zip/onefileinsubdir/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tif.zip file with a single file in a subdirectory(with implicit filename) def test_tiff_read_zip_4(): ds = gdal.Open('/vsizip/./data/onefileinsubdir.zip') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tif.zip file with 2 files in a subdirectory def test_tiff_read_zip_5(): ds = gdal.Open('/vsizip/./data/twofileinsubdir.zip/twofileinsubdir/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tar file (with explicit filename) def test_tiff_read_tar_1(): ds = gdal.Open('/vsitar/./data/byte.tar/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tar file (with implicit filename) def test_tiff_read_tar_2(): ds = gdal.Open('/vsitar/./data/byte.tar') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Read a .tgz file (with explicit filename) def test_tiff_read_tgz_1(): ds = gdal.Open('/vsitar/./data/byte.tgz/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None gdal.Unlink('data/byte.tgz.properties') ############################################################################### # Read a .tgz file (with implicit filename) def test_tiff_read_tgz_2(): ds = gdal.Open('/vsitar/./data/byte.tgz') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None gdal.Unlink('data/byte.tgz.properties') ############################################################################### # Check handling of non-degree angular units (#601) def test_tiff_grads(): ds = gdal.Open('data/test_gf.tif') srs = ds.GetProjectionRef() assert srs.find('PARAMETER["latitude_of_origin",52]') != -1, \ ('Did not get expected latitude of origin: wkt=%s' % srs) ############################################################################### # Check Erdas Citation Parsing for coordinate system. def test_tiff_citation(): build_info = gdal.VersionInfo('BUILD_INFO') if build_info.find('ESRI_BUILD=YES') == -1: pytest.skip() ds = gdal.Open('data/citation_mixedcase.tif') wkt = ds.GetProjectionRef() expected_wkt = """PROJCS["NAD_1983_HARN_StatePlane_Oregon_North_FIPS_3601_Feet_Intl",GEOGCS["GCS_North_American_1983_HARN",DATUM["NAD83_High_Accuracy_Reference_Network",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["False_Easting",8202099.737532808],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-120.5],PARAMETER["Standard_Parallel_1",44.33333333333334],PARAMETER["Standard_Parallel_2",46.0],PARAMETER["Latitude_Of_Origin",43.66666666666666],UNIT["Foot",0.3048]]""" if wkt != expected_wkt: print('got: ', wkt) pytest.fail('Erdas citation processing failing?') ############################################################################### # Check that we can read linear projection parameters properly (#3901) def test_tiff_linearparmunits(): # Test the file with the correct formulation. ds = gdal.Open('data/spaf27_correct.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(2000000.0, abs=0.001), 'did not get expected false easting (1)' # Test the file with the old (broken) GDAL formulation. ds = gdal.Open('data/spaf27_brokengdal.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(609601.219202438, abs=0.001), 'did not get expected false easting (2)' # Test the file when using an EPSG code. ds = gdal.Open('data/spaf27_epsg.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(2000000.0, abs=0.001), 'did not get expected false easting (3)' ############################################################################### # Check that the GTIFF_LINEAR_UNITS handling works properly (#3901) def test_tiff_linearparmunits2(): gdal.SetConfigOption('GTIFF_LINEAR_UNITS', 'BROKEN') # Test the file with the correct formulation. ds = gdal.Open('data/spaf27_correct.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(6561666.66667, abs=0.001), 'did not get expected false easting (1)' # Test the file with the correct formulation that is marked as correct. ds = gdal.Open('data/spaf27_markedcorrect.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(2000000.0, abs=0.001), 'did not get expected false easting (2)' # Test the file with the old (broken) GDAL formulation. ds = gdal.Open('data/spaf27_brokengdal.tif') wkt = ds.GetProjectionRef() ds = None srs = osr.SpatialReference(wkt) fe = srs.GetProjParm(osr.SRS_PP_FALSE_EASTING) assert fe == pytest.approx(2000000.0, abs=0.001), 'did not get expected false easting (3)' gdal.SetConfigOption('GTIFF_LINEAR_UNITS', 'DEFAULT') ############################################################################### # Test GTiffSplitBitmapBand to treat one row 1bit files as scanline blocks (#2622) def test_tiff_g4_split(): ds = gdal.Open('data/slim_g4.tif') (_, blocky) = ds.GetRasterBand(1).GetBlockSize() assert blocky == 1, 'Did not get scanline sized blocks.' cs = ds.GetRasterBand(1).Checksum() assert cs == 3322, 'Got wrong checksum' ############################################################################### # Test reading a tiff with multiple images in it def test_tiff_multi_images(): # Implicitly get the content of the first image (backward compatibility). ds = gdal.Open('data/twoimages.tif') assert ds.GetRasterBand(1).Checksum() == 4672, ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) md = ds.GetMetadata('SUBDATASETS') assert md['SUBDATASET_1_NAME'] == 'GTIFF_DIR:1:data/twoimages.tif', \ 'did not get expected subdatasets metadata.' ds = None # Explicitly get the content of the first image. ds = gdal.Open('GTIFF_DIR:1:data/twoimages.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None # Explicitly get the content of the second image. ds = gdal.Open('GTIFF_DIR:2:data/twoimages.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds = None ############################################################################### # Test reading a tiff from a memory buffer (#2931) def test_tiff_vsimem(): try: gdal.FileFromMemBuffer except AttributeError: pytest.skip() content = open('data/byte.tif', mode='rb').read() # Create in-memory file gdal.FileFromMemBuffer('/vsimem/tiffinmem', content) ds = gdal.Open('/vsimem/tiffinmem', gdal.GA_Update) assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) ds.GetRasterBand(1).Fill(0) ds = None ds = gdal.Open('/vsimem/tiffinmem') assert ds.GetRasterBand(1).Checksum() == 0, \ ('Expected checksum = %d. Got = %d' % (0, ds.GetRasterBand(1).Checksum())) ds = None # Also test with anti-slash ds = gdal.Open('/vsimem\\tiffinmem') assert ds.GetRasterBand(1).Checksum() == 0, \ ('Expected checksum = %d. Got = %d' % (0, ds.GetRasterBand(1).Checksum())) ds = None # Release memory associated to the in-memory file gdal.Unlink('/vsimem/tiffinmem') ############################################################################### # Test reading a tiff from inside a zip in a memory buffer ! def test_tiff_vsizip_and_mem(): try: gdal.FileFromMemBuffer except AttributeError: pytest.skip() content = open('data/byte.tif.zip', mode='rb').read() # Create in-memory file gdal.FileFromMemBuffer('/vsimem/tiffinmem.zip', content) ds = gdal.Open('/vsizip/vsimem/tiffinmem.zip/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672, \ ('Expected checksum = %d. Got = %d' % (4672, ds.GetRasterBand(1).Checksum())) # Release memory associated to the in-memory file gdal.Unlink('/vsimem/tiffinmem.zip') ############################################################################### # Test reading a GeoTIFF with only ProjectedCSTypeGeoKey defined (ticket #3019) def test_tiff_ProjectedCSTypeGeoKey_only(): ds = gdal.Open('data/ticket3019.tif') assert ds.GetProjectionRef().find('WGS 84 / UTM zone 31N') != -1 ds = None ############################################################################### # Test reading a GeoTIFF with only GTModelTypeGeoKey defined def test_tiff_GTModelTypeGeoKey_only(): ds = gdal.Open('data/GTModelTypeGeoKey_only.tif') assert ds.GetProjectionRef() in ('LOCAL_CS["unnamed"]', 'LOCAL_CS["unnamed",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]') ds = None ############################################################################### # Test reading a 12bit jpeg compressed geotiff. def test_tiff_12bitjpeg(): old_accum = gdal.GetConfigOption('CPL_ACCUM_ERROR_MSG', 'OFF') gdal.SetConfigOption('CPL_ACCUM_ERROR_MSG', 'ON') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') gdal.Unlink('data/mandrilmini_12bitjpeg.tif.aux.xml') try: ds = gdal.Open('data/mandrilmini_12bitjpeg.tif') ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) except: ds = None gdal.PopErrorHandler() gdal.SetConfigOption('CPL_ACCUM_ERROR_MSG', old_accum) if gdal.GetLastErrorMsg().find( 'Unsupported JPEG data precision 12') != -1: sys.stdout.write('(12bit jpeg not available) ... ') pytest.skip() elif ds is None: pytest.fail('failed to open 12bit jpeg file with unexpected error') try: stats = ds.GetRasterBand(1).GetStatistics(0, 1) except: pass assert not (stats[2] < 2150 or stats[2] > 2180 or str(stats[2]) == 'nan'), \ 'did not get expected mean for band1.' ds = None os.unlink('data/mandrilmini_12bitjpeg.tif.aux.xml') ############################################################################### # Test that statistics for TIFF files are stored and correctly read from .aux.xml def test_tiff_read_stats_from_pam(): try: os.remove('data/byte.tif.aux.xml') except OSError: pass ds = gdal.Open('data/byte.tif') md = ds.GetRasterBand(1).GetMetadata() assert 'STATISTICS_MINIMUM' not in md, 'Unexpected presence of STATISTICS_MINIMUM' # Force statistics computation stats = ds.GetRasterBand(1).GetStatistics(0, 1) assert stats[0] == 74.0 and stats[1] == 255.0 ds = None try: os.stat('data/byte.tif.aux.xml') except OSError: pytest.fail('Expected generation of data/byte.tif.aux.xml') ds = gdal.Open('data/byte.tif') # Just read statistics (from PAM) without forcing their computation stats = ds.GetRasterBand(1).GetStatistics(0, 0) assert stats[0] == 74.0 and stats[1] == 255.0 ds = None try: os.remove('data/byte.tif.aux.xml') except OSError: pass ############################################################################### # Test extracting georeferencing from a .TAB file def test_tiff_read_from_tab(): ds = gdal.GetDriverByName('GTiff').Create('tmp/tiff_read_from_tab.tif', 1, 1) ds = None f = open('tmp/tiff_read_from_tab.tab', 'wt') f.write("""!table !version 300 !charset WindowsLatin1 Definition Table File "HP.TIF" Type "RASTER" (400000,1200000) (0,4000) Label "Pt 1", (500000,1200000) (4000,4000) Label "Pt 2", (500000,1300000) (4000,0) Label "Pt 3", (400000,1300000) (0,0) Label "Pt 4" CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000, -100000 Units "m" """) f.close() ds = gdal.Open('tmp/tiff_read_from_tab.tif') gt = ds.GetGeoTransform() wkt = ds.GetProjectionRef() ds = None gdal.GetDriverByName('GTiff').Delete('tmp/tiff_read_from_tab.tif') assert not os.path.exists('tmp/tiff_read_from_tab.tab') assert gt == (400000.0, 25.0, 0.0, 1300000.0, 0.0, -25.0), \ 'did not get expected geotransform' assert wkt.find('OSGB_1936') != -1, 'did not get expected SRS' ############################################################################### # Test reading PixelIsPoint file. def test_tiff_read_pixelispoint(): gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'FALSE') ds = gdal.Open('data/byte_point.tif') gt = ds.GetGeoTransform() ds = None gt_expected = (440690.0, 60.0, 0.0, 3751350.0, 0.0, -60.0) assert gt == gt_expected, 'did not get expected geotransform' gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'TRUE') ds = gdal.Open('data/byte_point.tif') gt = ds.GetGeoTransform() ds = None gt_expected = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) assert gt == gt_expected, \ 'did not get expected geotransform with GTIFF_POINT_GEO_IGNORE TRUE' gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', None) ############################################################################### # Test reading a GeoTIFF file with a geomatrix in PixelIsPoint format. def test_tiff_read_geomatrix(): gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'FALSE') ds = gdal.Open('data/geomatrix.tif') gt = ds.GetGeoTransform() ds = None gt_expected = (1841001.75, 1.5, -5.0, 1144003.25, -5.0, -1.5) assert gt == gt_expected, 'did not get expected geotransform' gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'TRUE') ds = gdal.Open('data/geomatrix.tif') gt = ds.GetGeoTransform() ds = None gt_expected = (1841000.0, 1.5, -5.0, 1144000.0, -5.0, -1.5) assert gt == gt_expected, \ 'did not get expected geotransform with GTIFF_POINT_GEO_IGNORE TRUE' gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', None) ############################################################################### # Test that we don't crash when reading a TIFF with corrupted GeoTIFF tags def test_tiff_read_corrupted_gtiff(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/corrupted_gtiff_tags.tif') gdal.PopErrorHandler() del ds err_msg = gdal.GetLastErrorMsg() assert (not (err_msg.find('IO error during') == -1 and \ err_msg.find('Error fetching data for field') == -1)), \ 'did not get expected error message' ############################################################################### # Test that we don't crash when reading a TIFF with corrupted GeoTIFF tags def test_tiff_read_tag_without_null_byte(): gdal.ErrorReset() oldval = gdal.GetConfigOption('CPL_DEBUG') gdal.SetConfigOption('CPL_DEBUG', 'OFF') ds = gdal.Open('data/tag_without_null_byte.tif') gdal.SetConfigOption('CPL_DEBUG', oldval) assert gdal.GetLastErrorType() == 0, \ 'should have not emitted a warning, but only a CPLDebug() message' del ds ############################################################################### # Test the effect of the GTIFF_IGNORE_READ_ERRORS configuration option (#3994) def test_tiff_read_buggy_packbits(): old_val = gdal.GetConfigOption('GTIFF_IGNORE_READ_ERRORS') gdal.SetConfigOption('GTIFF_IGNORE_READ_ERRORS', None) ds = gdal.Open('data/byte_buggy_packbits.tif') gdal.SetConfigOption('GTIFF_IGNORE_READ_ERRORS', old_val) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ReadRaster(0, 0, 20, 20) gdal.PopErrorHandler() assert ret is None, 'did not expected a valid result' ds = None gdal.SetConfigOption('GTIFF_IGNORE_READ_ERRORS', 'YES') ds = gdal.Open('data/byte_buggy_packbits.tif') gdal.SetConfigOption('GTIFF_IGNORE_READ_ERRORS', old_val) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ReadRaster(0, 0, 20, 20) gdal.PopErrorHandler() assert ret is not None, 'expected a valid result' ds = None ############################################################################### # Test reading a GeoEye _rpc.txt (#3639) def test_tiff_read_rpc_txt(): shutil.copy('data/byte.tif', 'tmp/test.tif') shutil.copy('data/test_rpc.txt', 'tmp/test_rpc.txt') ds = gdal.Open('tmp/test.tif') rpc_md = ds.GetMetadata('RPC') ds = None os.remove('tmp/test.tif') os.remove('tmp/test_rpc.txt') assert rpc_md['HEIGHT_OFF'] == '+0300.000 meters', \ ('HEIGHT_OFF wrong:"' + rpc_md['HEIGHT_OFF'] + '"') assert (rpc_md['LINE_DEN_COEFF'].find( '+1.000000000000000E+00 -5.207696939454288E-03') == 0), \ 'LINE_DEN_COEFF wrong' ############################################################################### # Test reading a TIFF with the RPC tag per # http://geotiff.maptools.org/rpc_prop.html def test_tiff_read_rpc_tif(): ds = gdal.Open('data/byte_rpc.tif') rpc_md = ds.GetMetadata('RPC') ds = None assert rpc_md['HEIGHT_OFF'] == '300', ('HEIGHT_OFF wrong:' + rpc_md['HEIGHT_OFF']) assert rpc_md['LINE_DEN_COEFF'].find('1 -0.00520769693945429') == 0, \ 'LINE_DEN_COEFF wrong' ############################################################################### # Test a very small TIFF with only 4 tags : # Magic: 0x4949 <little-endian> Version: 0x2a # Directory 0: offset 8 (0x8) next 0 (0) # ImageWidth (256) SHORT (3) 1<1> # ImageLength (257) SHORT (3) 1<1> # StripOffsets (273) LONG (4) 1<0> # StripByteCounts (279) LONG (4) 1<1> def test_tiff_small(): content = '\x49\x49\x2A\x00\x08\x00\x00\x00\x04\x00\x00\x01\x03\x00\x01\x00\x00\x00\x01\x00\x00\x00\x01\x01\x03\x00\x01\x00\x00\x00\x01\x00\x00\x00\x11\x01\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x17\x01\x04\x00\x01\x00\x00\x00\x01\x00\x00\x00' # Create in-memory file gdal.FileFromMemBuffer('/vsimem/small.tif', content) ds = gdal.Open('/vsimem/small.tif') assert ds.GetRasterBand(1).Checksum() == 0, \ ('Expected checksum = %d. Got = %d' % (0, ds.GetRasterBand(1).Checksum())) # Release memory associated to the in-memory file gdal.Unlink('/vsimem/small.tif') ############################################################################### # Test that we can workaround a DoS with def test_tiff_dos_strip_chop(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/tiff_dos_strip_chop.tif') gdal.PopErrorHandler() del ds ############################################################################### # Test reading EXIF and GPS metadata def test_tiff_read_exif_and_gps(): ds = gdal.Open('data/exif_and_gps.tif') exif_md = ds.GetMetadata('EXIF') ds = None assert exif_md is not None and exif_md ds = gdal.Open('data/exif_and_gps.tif') EXIF_GPSVersionID = ds.GetMetadataItem('EXIF_GPSVersionID', 'EXIF') ds = None assert EXIF_GPSVersionID is not None # We should not get any EXIF metadata with that file ds = gdal.Open('data/byte.tif') exif_md = ds.GetMetadata('EXIF') ds = None assert (exif_md is None or not exif_md) ############################################################################### # Test reading a pixel interleaved RGBA JPEG-compressed TIFF def test_tiff_jpeg_rgba_pixel_interleaved(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() ds = gdal.Open('data/stefan_full_rgba_jpeg_contig.tif') md = ds.GetMetadata('IMAGE_STRUCTURE') assert md['INTERLEAVE'] == 'PIXEL' expected_cs = [16404, 62700, 37913, 14174] for i in range(4): cs = ds.GetRasterBand(i + 1).Checksum() assert cs == expected_cs[i] assert ds.GetRasterBand(i + 1).GetRasterColorInterpretation() == gdal.GCI_RedBand + i ds = None ############################################################################### # Test reading a band interleaved RGBA JPEG-compressed TIFF def test_tiff_jpeg_rgba_band_interleaved(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() ds = gdal.Open('data/stefan_full_rgba_jpeg_separate.tif') md = ds.GetMetadata('IMAGE_STRUCTURE') assert md['INTERLEAVE'] == 'BAND' expected_cs = [16404, 62700, 37913, 14174] for i in range(4): cs = ds.GetRasterBand(i + 1).Checksum() assert cs == expected_cs[i] assert ds.GetRasterBand(i + 1).GetRasterColorInterpretation() == gdal.GCI_RedBand + i ds = None ############################################################################### # Test reading a YCbCr JPEG all-in-one-strip multiband TIFF (#3259, #3894) def test_tiff_read_online_1(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() if not gdaltest.download_file('http://trac.osgeo.org/gdal/raw-attachment/ticket/3259/imgpb17.tif', 'imgpb17.tif'): pytest.skip() ds = gdal.Open('tmp/cache/imgpb17.tif') gdal.ErrorReset() cs = ds.GetRasterBand(1).Checksum() ds = None assert gdal.GetLastErrorMsg() == '' assert cs == 62628 or cs == 28554 ############################################################################### # Use GTIFF_DIRECT_IO=YES option combined with /vsicurl to test for multi-range # support def test_tiff_read_vsicurl_multirange(): if gdal.GetDriverByName('HTTP') is None: pytest.skip() webserver_process = None webserver_port = 0 (webserver_process, webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() try: filesize = 262976 handler = webserver.SequentialHandler() handler.add('HEAD', '/utm.tif', 200, {'Content-Length': '%d' % filesize}) def method(request): #sys.stderr.write('%s\n' % str(request.headers)) if request.headers['Range'].startswith('bytes='): rng = request.headers['Range'][len('bytes='):] assert len(rng.split('-')) == 2 start = int(rng.split('-')[0]) end = int(rng.split('-')[1]) request.protocol_version = 'HTTP/1.1' request.send_response(206) request.send_header('Content-type', 'application/octet-stream') request.send_header('Content-Range', 'bytes %d-%d/%d' % (start, end, filesize)) request.send_header('Content-Length', end - start + 1) request.send_header('Connection', 'close') request.end_headers() with open('../gdrivers/data/utm.tif', 'rb') as f: f.seek(start, 0) request.wfile.write(f.read(end - start + 1)) for i in range(6): handler.add('GET', '/utm.tif', custom_method=method) with webserver.install_http_handler(handler): with gdaltest.config_options({ 'GTIFF_DIRECT_IO': 'YES', 'CPL_VSIL_CURL_ALLOWED_EXTENSIONS': '.tif', 'GDAL_DISABLE_READDIR_ON_OPEN': 'EMPTY_DIR' }): ds = gdal.Open('/vsicurl/http://127.0.0.1:%d/utm.tif' % webserver_port) assert ds is not None, 'could not open dataset' # Read subsampled data subsampled_data = ds.ReadRaster(0, 0, 512, 32, 128, 4) ds = None ds = gdal.GetDriverByName('MEM').Create('', 128, 4) ds.WriteRaster(0, 0, 128, 4, subsampled_data) cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 6429, 'wrong checksum' finally: webserver.server_stop(webserver_process, webserver_port) gdal.VSICurlClearCache() ############################################################################### # Test reading a TIFF made of a single-strip that is more than 2GB (#5403) def test_tiff_read_huge4GB(): if not gdaltest.filesystem_supports_sparse_files('tmp'): ds = gdal.Open('data/huge4GB.tif') assert ds is not None else: shutil.copy('data/huge4GB.tif', 'tmp/huge4GB.tif') f = open('tmp/huge4GB.tif', 'rb+') f.seek(65535 * 65535 + 401) f.write(' '.encode('ascii')) f.close() ds = gdal.Open('tmp/huge4GB.tif') if ds is None: os.remove('tmp/huge4GB.tif') pytest.fail() ds = None os.remove('tmp/huge4GB.tif') ############################################################################### # Test reading a (small) BigTIFF. Tests GTiffCacheOffsetOrCount8() def test_tiff_read_bigtiff(): ds = gdal.Open('data/byte_bigtiff_strip5lines.tif') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4672 ############################################################################### # Test reading in TIFF metadata domain def test_tiff_read_tiff_metadata(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() ds = gdal.Open('data/stefan_full_rgba_jpeg_contig.tif') assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF') == '254' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_0', 'TIFF') == '770' assert ds.GetRasterBand(1).GetMetadataItem('JPEGTABLES', 'TIFF').find('FFD8') == 0 assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_100_0', 'TIFF') is None assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_100', 'TIFF') is None assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_100_0', 'TIFF') is None assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_100', 'TIFF') is None ds = gdal.Open('data/stefan_full_rgba_jpeg_separate.tif') assert ds.GetRasterBand(4).GetMetadataItem('BLOCK_OFFSET_0_2', 'TIFF') == '11071' assert ds.GetRasterBand(4).GetMetadataItem('BLOCK_SIZE_0_2', 'TIFF') == '188' ############################################################################### # Test reading a JPEG-in-TIFF with tiles of irregular size (corrupted image) def test_tiff_read_irregular_tile_size_jpeg_in_tiff(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('JPEG') == -1: pytest.skip() ds = gdal.Open('data/irregular_tile_size_jpeg_in_tiff.tif') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetRasterBand(1).Checksum() gdal.PopErrorHandler() assert gdal.GetLastErrorType() != 0 gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetRasterBand(1).GetOverview(0).Checksum() gdal.PopErrorHandler() assert gdal.GetLastErrorType() != 0 gdal.ErrorReset() ############################################################################### # Test GTIFF_DIRECT_IO and GTIFF_VIRTUAL_MEM_IO optimizations def test_tiff_direct_and_virtual_mem_io(): # Test with pixel-interleaved and band-interleaved datasets for dt in [gdal.GDT_Byte, gdal.GDT_Int16, gdal.GDT_CInt16]: src_ds = gdal.Open('data/stefan_full_rgba.tif') dt_size = 1 if dt == gdal.GDT_Int16: dt_size = 2 mem_ds = gdal.GetDriverByName('MEM').Create('', src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount, dt) data = src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, buf_type=dt) new_vals = [] for i in range(4 * src_ds.RasterXSize * src_ds.RasterYSize): if sys.version_info >= (3, 0, 0): new_vals.append(chr(data[2 * i]).encode('latin1')) new_vals.append(chr(255 - data[2 * i]).encode('latin1')) else: new_vals.append(data[2 * i]) new_vals.append(chr(255 - ord(data[2 * i]))) if sys.version_info >= (3, 0, 0): data = ''.encode('latin1').join(new_vals) else: data = ''.join(new_vals) mem_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, data, buf_type=dt) src_ds = mem_ds elif dt == gdal.GDT_CInt16: dt_size = 4 mem_ds = gdal.GetDriverByName('MEM').Create('', src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount, dt) data = src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, buf_type=dt) new_vals = [] for i in range(4 * src_ds.RasterXSize * src_ds.RasterYSize): if sys.version_info >= (3, 0, 0): new_vals.append(chr(data[4 * i]).encode('latin1')) new_vals.append(chr(data[4 * i]).encode('latin1')) new_vals.append(chr(255 - data[4 * i]).encode('latin1')) new_vals.append(chr(255 - data[4 * i]).encode('latin1')) else: new_vals.append(data[4 * i]) new_vals.append(data[4 * i]) new_vals.append(chr(255 - ord(data[4 * i]))) new_vals.append(chr(255 - ord(data[4 * i]))) if sys.version_info >= (3, 0, 0): data = ''.encode('latin1').join(new_vals) else: data = ''.join(new_vals) mem_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, data, buf_type=dt) src_ds = mem_ds for truncated in [False, True]: if truncated: nitermax = 4 options = [('GTIFF_DIRECT_IO', '/vsimem'), ('GTIFF_VIRTUAL_MEM_IO', '/vsimem')] else: nitermax = 8 options = [('GTIFF_DIRECT_IO', '/vsimem'), ('GTIFF_VIRTUAL_MEM_IO', '/vsimem'), ('GTIFF_VIRTUAL_MEM_IO', 'tmp')] for (option, prefix) in options: if dt == gdal.GDT_CInt16: niter = 3 elif prefix == 'tmp': niter = 4 else: niter = nitermax for i in range(niter): if i == 0: filename = '%s/tiff_direct_io_contig.tif' % prefix creation_options = [] if (dt == gdal.GDT_CInt16 or dt == gdal.GDT_Int16): creation_options += ['ENDIANNESS=INVERTED'] out_ds = gdal.GetDriverByName('GTiff').CreateCopy(filename, src_ds, options=creation_options) out_ds.FlushCache() out_ds = None elif i == 1: filename = '%s/tiff_direct_io_separate.tif' % prefix out_ds = gdal.GetDriverByName('GTiff').CreateCopy(filename, src_ds, options=['INTERLEAVE=BAND']) out_ds.FlushCache() out_ds = None elif i == 2: filename = '%s/tiff_direct_io_tiled_contig.tif' % prefix creation_options = ['TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=16'] if (dt == gdal.GDT_CInt16 or dt == gdal.GDT_Int16): creation_options += ['ENDIANNESS=INVERTED'] if option == 'GTIFF_VIRTUAL_MEM_IO' and prefix == '/vsimem': gdal.Translate(filename, src_ds, bandList=[1, 2, 3], creationOptions=creation_options) else: out_ds = gdal.GetDriverByName('GTiff').CreateCopy(filename, src_ds, options=creation_options) out_ds.FlushCache() out_ds = None elif i == 3: filename = '%s/tiff_direct_io_tiled_separate.tif' % prefix out_ds = gdal.GetDriverByName('GTiff').CreateCopy(filename, src_ds, options=['TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=16', 'INTERLEAVE=BAND']) out_ds.FlushCache() out_ds = None elif i == 4: filename = '%s/tiff_direct_io_sparse.tif' % prefix out_ds = gdal.GetDriverByName('GTiff').Create(filename, 165, 150, 4, dt, options=['SPARSE_OK=YES']) out_ds.FlushCache() out_ds = None elif i == 5: filename = '%s/tiff_direct_io_sparse_separate.tif' % prefix out_ds = gdal.GetDriverByName('GTiff').Create(filename, 165, 150, 4, dt, options=['SPARSE_OK=YES', 'INTERLEAVE=BAND']) out_ds.FlushCache() out_ds = None elif i == 6: filename = '%s/tiff_direct_io_sparse_tiled.tif' % prefix out_ds = gdal.GetDriverByName('GTiff').Create(filename, 165, 150, 4, dt, options=['SPARSE_OK=YES', 'TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=16']) out_ds.FlushCache() out_ds = None else: filename = '%s/tiff_direct_io_sparse_tiled_separate.tif' % prefix out_ds = gdal.GetDriverByName('GTiff').Create(filename, 165, 150, 4, dt, options=['SPARSE_OK=YES', 'TILED=YES', 'BLOCKXSIZE=32', 'BLOCKYSIZE=16', 'INTERLEAVE=BAND']) out_ds.FlushCache() out_ds = None if truncated: ds = gdal.Open(filename) nbands = ds.RasterCount nxsize = ds.RasterXSize nysize = ds.RasterYSize (nblockxsize, nblockysize) = ds.GetRasterBand(1).GetBlockSize() band_interleaved = ds.GetMetadataItem('INTERLEAVE', 'IMAGE_STRUCTURE') == 'BAND' ds = None padding = 0 if nblockxsize < nxsize: if (nysize % nblockysize) != 0: padding = ((nxsize + nblockxsize - 1) / nblockxsize * nblockxsize) * (nblockysize - (nysize % nblockysize)) if(nxsize % nblockxsize) != 0: padding += nblockxsize - (nxsize % nblockxsize) padding *= dt_size if not band_interleaved: padding *= nbands padding = int(padding) to_remove = 1 if not band_interleaved: to_remove += (nbands - 1) * dt_size f = gdal.VSIFOpenL(filename, 'rb') data = gdal.VSIFReadL(1, 1000000, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(filename, 'wb') gdal.VSIFWriteL(data, 1, len(data) - padding - to_remove, f) gdal.VSIFCloseL(f) ds = gdal.Open(filename) xoff = int(ds.RasterXSize / 4) yoff = int(ds.RasterYSize / 4) xsize = int(ds.RasterXSize / 2) ysize = int(ds.RasterXSize / 2) nbands = ds.RasterCount sizeof_float = 4 if truncated: gdal.PushErrorHandler() ref_data_native_type = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize) ref_data_native_type_whole = ds.GetRasterBand(1).ReadRaster() ref_data_native_type_downsampled = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2)) ref_data_native_type_downsampled_not_nearest = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2), resample_alg=gdal.GRIORA_Bilinear) ref_data_native_type_upsampled = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=nbands * xsize, buf_ysize=nbands * ysize) ref_data_native_type_custom_spacings = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=nbands * dt_size) ref_data_float32 = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_type=gdal.GDT_Float32) ref_nbands_data_native_type = ds.ReadRaster(xoff, yoff, xsize, ysize) ref_nbands_data_native_type_whole = ds.ReadRaster() ref_nbands_data_native_type_downsampled = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2)) ref_nbands_data_native_type_downsampled_interleaved = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2), buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) ref_nbands_data_native_type_downsampled_not_nearest = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2), resample_alg=gdal.GRIORA_Bilinear) ref_nbands_data_native_type_upsampled = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=4 * xsize, buf_ysize=4 * ysize) ref_nbands_data_native_type_downsampled_x_upsampled_y = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=32 * ysize) ref_nbands_data_native_type_unordered_list = ds.ReadRaster(xoff, yoff, xsize, ysize, band_list=[nbands - i for i in range(nbands)]) ref_nbands_data_native_type_pixel_interleaved = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) ref_nbands_data_native_type_pixel_interleaved_whole = ds.ReadRaster(buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) ref_nbands_m_1_data_native_type_pixel_interleaved_with_extra_space = ds.ReadRaster(xoff, yoff, xsize, ysize, band_list=[i + 1 for i in range(nbands - 1)], buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) ref_nbands_data_float32 = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_type=gdal.GDT_Float32) ref_nbands_data_float32_pixel_interleaved = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_type=gdal.GDT_Float32, buf_pixel_space=nbands * sizeof_float, buf_band_space=1 * sizeof_float) ref_nbands_data_native_type_custom_spacings = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=2 * nbands * dt_size, buf_band_space=dt_size) if nbands == 3: ref_nbands_data_native_type_custom_spacings_2 = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=4 * dt_size, buf_band_space=dt_size) if truncated: gdal.PopErrorHandler() ds = None if truncated: gdal.PushErrorHandler() old_val = gdal.GetConfigOption(option) gdal.SetConfigOption(option, 'YES') ds = gdal.Open(filename) band_interleaved = ds.GetMetadataItem('INTERLEAVE', 'IMAGE_STRUCTURE') == 'BAND' got_data_native_type = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize) got_data_native_type_whole = ds.GetRasterBand(1).ReadRaster() got_data_native_type_downsampled = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2)) got_data_native_type_downsampled_not_nearest = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2), resample_alg=gdal.GRIORA_Bilinear) got_data_native_type_upsampled = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=nbands * xsize, buf_ysize=nbands * ysize) got_data_native_type_custom_spacings = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=nbands * dt_size) got_data_float32 = ds.GetRasterBand(1).ReadRaster(xoff, yoff, xsize, ysize, buf_type=gdal.GDT_Float32) got_nbands_data_native_type = ds.ReadRaster(xoff, yoff, xsize, ysize) got_nbands_data_native_type_whole = ds.ReadRaster() got_nbands_data_native_type_bottom_right_downsampled = ds.ReadRaster(ds.RasterXSize - 2, ds.RasterYSize - 1, 2, 1, buf_xsize=1, buf_ysize=1, buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) got_nbands_data_native_type_downsampled = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2)) got_nbands_data_native_type_downsampled_interleaved = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2), buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) got_nbands_data_native_type_downsampled_not_nearest = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=int(ysize / 2), resample_alg=gdal.GRIORA_Bilinear) got_nbands_data_native_type_upsampled = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=4 * xsize, buf_ysize=4 * ysize) got_nbands_data_native_type_downsampled_x_upsampled_y = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_xsize=int(xsize / 2), buf_ysize=32 * ysize) got_nbands_data_native_type_unordered_list = ds.ReadRaster(xoff, yoff, xsize, ysize, band_list=[nbands - i for i in range(nbands)]) got_nbands_data_native_type_pixel_interleaved = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) got_nbands_data_native_type_pixel_interleaved_whole = ds.ReadRaster(buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) got_nbands_m_1_data_native_type_pixel_interleaved_with_extra_space = ds.ReadRaster(xoff, yoff, xsize, ysize, band_list=[i + 1 for i in range(nbands - 1)], buf_pixel_space=nbands * dt_size, buf_band_space=dt_size) got_nbands_data_float32 = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_type=gdal.GDT_Float32) got_nbands_data_float32_pixel_interleaved = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_type=gdal.GDT_Float32, buf_pixel_space=nbands * sizeof_float, buf_band_space=1 * sizeof_float) got_nbands_data_native_type_custom_spacings = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=2 * nbands * dt_size, buf_band_space=dt_size) if nbands == 3: got_nbands_data_native_type_custom_spacings_2 = ds.ReadRaster(xoff, yoff, xsize, ysize, buf_pixel_space=4 * dt_size, buf_band_space=dt_size) ds = None gdal.SetConfigOption(option, old_val) if truncated: gdal.PopErrorHandler() gdal.Unlink(filename) if ref_data_native_type != got_data_native_type: print(option) pytest.fail(i) if truncated and not band_interleaved: if got_data_native_type_whole is not None: print(truncated) print(band_interleaved) print(option) print(i) pytest.fail(gdal.GetDataTypeName(dt)) elif ref_data_native_type_whole != got_data_native_type_whole: print(i) pytest.fail(option) if ref_data_native_type_downsampled != got_data_native_type_downsampled: print(option) pytest.fail(i) if not truncated and ref_data_native_type_downsampled_not_nearest != got_data_native_type_downsampled_not_nearest: print(band_interleaved) print(option) pytest.fail(i) if ref_data_native_type_upsampled != got_data_native_type_upsampled: print(option) pytest.fail(i) for y in range(ysize): for x in range(xsize): for k in range(dt_size): if ref_data_native_type_custom_spacings[(y * xsize + x) * nbands * dt_size + k] != got_data_native_type_custom_spacings[(y * xsize + x) * nbands * dt_size + k]: print(gdal.GetDataTypeName(dt)) print(option) pytest.fail(i) if not truncated: for band in range(nbands): if ref_nbands_data_native_type_custom_spacings[(y * xsize + x) * 2 * nbands * dt_size + band * dt_size + k] != got_nbands_data_native_type_custom_spacings[(y * xsize + x) * 2 * nbands * dt_size + band * dt_size + k]: print(gdal.GetDataTypeName(dt)) print(option) pytest.fail(i) if nbands == 3: for band in range(nbands): if ref_nbands_data_native_type_custom_spacings_2[(y * xsize + x) * 4 * dt_size + band * dt_size + k] != got_nbands_data_native_type_custom_spacings_2[(y * xsize + x) * 4 * dt_size + band * dt_size + k]: print(gdal.GetDataTypeName(dt)) print(option) pytest.fail(i) if ref_data_float32 != got_data_float32: print(gdal.GetDataTypeName(dt)) print(option) pytest.fail(i) if not truncated and ref_nbands_data_native_type != got_nbands_data_native_type: print(band_interleaved) print(option) pytest.fail(i) if truncated: if got_nbands_data_native_type_whole is not None: print(gdal.GetDataTypeName(dt)) print(option) pytest.fail(i) elif ref_nbands_data_native_type_whole != got_nbands_data_native_type_whole: print(option) print(i) pytest.fail(gdal.GetDataTypeName(dt)) if truncated: if got_nbands_data_native_type_pixel_interleaved_whole is not None: print(option) pytest.fail(i) elif ref_nbands_data_native_type_pixel_interleaved_whole != got_nbands_data_native_type_pixel_interleaved_whole: print(i) pytest.fail(option) if truncated and got_nbands_data_native_type_bottom_right_downsampled is not None: print(gdal.GetDataTypeName(dt)) print(option) pytest.fail(i) if truncated: continue if ref_nbands_data_native_type_downsampled != got_nbands_data_native_type_downsampled: print(option) pytest.fail(i) if ref_nbands_data_native_type_downsampled_interleaved != got_nbands_data_native_type_downsampled_interleaved: print(option) pytest.fail(i) if ref_nbands_data_native_type_downsampled_not_nearest != got_nbands_data_native_type_downsampled_not_nearest: print(option) pytest.fail(i) if ref_nbands_data_native_type_upsampled != got_nbands_data_native_type_upsampled: print(option) # import struct # f1 = open('out1.txt', 'wb') # f2 = open('out2.txt', 'wb') # for b in range(nbands): # for y in range(4 * ysize): # f1.write('%s\n' % str(struct.unpack('B' * 4 * xsize, ref_nbands_data_native_type_upsampled[(b * 4 * ysize + y) * 4 * xsize : (b * 4 * ysize + y + 1) * 4 * xsize]))) # f2.write('%s\n' % str(struct.unpack('B' * 4 * xsize, got_nbands_data_native_type_upsampled[(b * 4 * ysize + y) * 4 * xsize : (b * 4 * ysize + y + 1) * 4 * xsize]))) pytest.fail(i) if ref_nbands_data_native_type_downsampled_x_upsampled_y != got_nbands_data_native_type_downsampled_x_upsampled_y: print(option) # import struct # f1 = open('out1.txt', 'wb') # f2 = open('out2.txt', 'wb') # for b in range(nbands): # for y in range(32 * ysize): # f1.write('%s\n' % str(struct.unpack('B' * int(xsize/2), ref_nbands_data_native_type_downsampled_x_upsampled_y[(b * 32 * ysize + y) * int(xsize/2) : (b * 32 * ysize + y + 1) * int(xsize/2)]))) # f2.write('%s\n' % str(struct.unpack('B' * int(xsize/2), got_nbands_data_native_type_downsampled_x_upsampled_y[(b * 32 * ysize + y) * int(xsize/2) : (b * 32 * ysize + y + 1) * int(xsize/2)]))) pytest.fail(i) if ref_nbands_data_native_type_unordered_list != got_nbands_data_native_type_unordered_list: print(option) pytest.fail(i) if ref_nbands_data_native_type_pixel_interleaved != got_nbands_data_native_type_pixel_interleaved: print(option) pytest.fail(i) for y in range(ysize): for x in range(xsize): for b in range(nbands - 1): for k in range(dt_size): if ref_nbands_m_1_data_native_type_pixel_interleaved_with_extra_space[((y * xsize + x) * nbands + b) * dt_size + k] != got_nbands_m_1_data_native_type_pixel_interleaved_with_extra_space[((y * xsize + x) * nbands + b) * dt_size + k]: print(option) pytest.fail(i) if ref_nbands_data_float32 != got_nbands_data_float32: print(option) pytest.fail(i) if ref_nbands_data_float32_pixel_interleaved != got_nbands_data_float32_pixel_interleaved: print(option) pytest.fail(i) ds = gdal.Open('data/byte.tif') # any GTiff file will do unreached = ds.GetMetadataItem('UNREACHED_VIRTUALMEMIO_CODE_PATH', '_DEBUG_') ds = None if unreached: print('unreached = %s' % unreached) pytest.fail('missing code coverage in VirtualMemIO()') ############################################################################### # Check read Digital Globe metadata IMD & RPB format def test_tiff_read_md1(): try: os.remove('data/md_dg.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_dg.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2010-04-01 12:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_dg.tif.aux.xml') ############################################################################### # Check read Digital Globe metadata XML format def test_tiff_read_md2(): try: os.remove('data/md_dg_2.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_dg_2.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 2, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2011-05-01 13:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_dg_2.tif.aux.xml') ############################################################################### # Check read GeoEye metadata format def test_tiff_read_md3(): try: os.remove('data/md_ge_rgb_0010000.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_ge_rgb_0010000.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2012-06-01 14:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_ge_rgb_0010000.tif.aux.xml') ############################################################################### # Check read OrbView metadata format def test_tiff_read_md4(): try: os.remove('data/md_ov.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_ov.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2013-07-01 15:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_ov.tif.aux.xml') ############################################################################### # Check read Resurs-DK1 metadata format def test_tiff_read_md5(): try: os.remove('data/md_rdk1.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_rdk1.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 2, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 5, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2014-08-01 16:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_rdk1.tif.aux.xml') ############################################################################### # Check read Landsat metadata format def test_tiff_read_md6(): try: os.remove('data/md_ls_b1.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_ls_b1.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 2, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 5, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2015-09-01 17:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_ls_b1.tif.aux.xml') ############################################################################### # Check read Spot metadata format def test_tiff_read_md7(): try: os.remove('data/spot/md_spot.tif.aux.xml') except OSError: pass ds = gdal.Open('data/spot/md_spot.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 2, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 5, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2001-03-01 00:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/spot/md_spot.tif.aux.xml') ############################################################################### # Check read RapidEye metadata format def test_tiff_read_md8(): try: os.remove('data/md_re.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_re.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 2, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 5, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2010-02-01 12:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_re.tif.aux.xml') ############################################################################### # Check read Alos metadata format def test_tiff_read_md9(): try: os.remove('data/alos/IMG-md_alos.tif.aux.xml') except OSError: pass ds = gdal.Open('data/alos/IMG-md_alos.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2010-07-01 00:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/alos/IMG-md_alos.tif.aux.xml') ############################################################################### # Check read Eros metadata format def test_tiff_read_md10(): try: os.remove('data/md_eros.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_eros.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2013-04-01 11:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_eros.tif.aux.xml') ############################################################################### # Check read Kompsat metadata format def test_tiff_read_md11(): try: os.remove('data/md_kompsat.tif.aux.xml') except OSError: pass ds = gdal.Open('data/md_kompsat.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2007-05-01 07:00:00', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' ds = None assert not os.path.exists('data/md_kompsat.tif.aux.xml') ############################################################################### # Check read Dimap metadata format def test_tiff_read_md12(): ds = gdal.Open('../gdrivers/data/dimap2/IMG_foo_R2C1.TIF', gdal.GA_ReadOnly) filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' metadata = ds.GetMetadataDomainList() assert len(metadata) == 6, 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' # Test UTC date assert md['ACQUISITIONDATETIME'] == '2016-06-17 12:34:56', \ 'bad value for IMAGERY[ACQUISITIONDATETIME]' # Test RPC and that we have a LINE_OFF shift rpc = ds.GetMetadata('RPC') assert rpc['LINE_OFF'] == '-11', 'RPC wrong.' ds = None assert not os.path.exists('data/md_kompsat.tif.aux.xml') # Test not valid DIMAP product [https://github.com/OSGeo/gdal/issues/431] shutil.copy('../gdrivers/data/dimap2/IMG_foo_R2C1.TIF', 'tmp/IMG_foo_temp.TIF') shutil.copy('../gdrivers/data/dimap2/DIM_foo.XML', 'tmp/DIM_foo.XML') shutil.copy('../gdrivers/data/dimap2/RPC_foo.XML', 'tmp/RPC_foo.XML') ds = gdal.Open('tmp/IMG_foo_temp.TIF', gdal.GA_ReadOnly) filelist = ds.GetFileList() ds = None gdal.Unlink('tmp/IMG_foo_temp.TIF') gdal.Unlink('tmp/DIM_foo.XML') gdal.Unlink('tmp/RPC_foo.XML') assert len(filelist) <= 1, 'did not get expected file list.' ############################################################################### # Test reading a TIFFTAG_GDAL_NODATA with empty text def test_tiff_read_empty_nodata_tag(): ds = gdal.Open('data/empty_nodata.tif') assert ds.GetRasterBand(1).GetNoDataValue() is None ############################################################################### # Check that no auxiliary files are read with a simple Open(), reading # imagery and getting IMAGE_STRUCTURE metadata def test_tiff_read_strace_check(): if not sys.platform.startswith('linux'): pytest.skip() python_exe = sys.executable cmd = "strace -f %s -c \"from osgeo import gdal; " % python_exe + ( "gdal.SetConfigOption('CPL_DEBUG', 'OFF');" "ds = gdal.Open('../gcore/data/byte.tif');" "ds.ReadRaster();" "ds.GetMetadata('IMAGE_STRUCTURE');" "ds.GetRasterBand(1).GetMetadata('IMAGE_STRUCTURE');" " \" ") try: (_, err) = gdaltest.runexternal_out_and_err(cmd) except: # strace not available pytest.skip() lines_with_dotdot_gcore = [] for line in err.split('\n'): if '../gcore' in line: lines_with_dotdot_gcore += [line] assert len(lines_with_dotdot_gcore) == 1 ############################################################################### # Test GDAL_READDIR_LIMIT_ON_OPEN def test_tiff_read_readdir_limit_on_open(): gdal.SetConfigOption('GDAL_READDIR_LIMIT_ON_OPEN', '1') ds = gdal.Open('data/md_kompsat.tif', gdal.GA_ReadOnly) filelist = ds.GetFileList() gdal.SetConfigOption('GDAL_READDIR_LIMIT_ON_OPEN', None) assert len(filelist) == 3, 'did not get expected file list.' ############################################################################### # def test_tiff_read_minisblack_as_rgba(): if not gdaltest.supports_force_rgba: pytest.skip() gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('data/byte.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [4672, 4672, 4672, 4873] ds = None ############################################################################### # def test_tiff_read_colortable_as_rgba(): if not gdaltest.supports_force_rgba: pytest.skip() gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('data/test_average_palette.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [2433, 2433, 2433, 4873] ds = None ############################################################################### # def test_tiff_read_logl_as_rgba(): if not gdaltest.supports_force_rgba: pytest.skip() gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('data/uint16_sgilog.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] # I'm pretty sure this isn't the expected result... assert got_cs == [0, 0, 0, 4873] ds = None ############################################################################### # def test_tiff_read_strip_separate_as_rgba(): if not gdaltest.supports_force_rgba: pytest.skip() # 3 band gdal.Translate('/vsimem/tiff_read_strip_separate_as_rgba.tif', 'data/rgbsmall.tif', options='-co INTERLEAVE=BAND') gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('/vsimem/tiff_read_strip_separate_as_rgba.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [21212, 21053, 21349, 30658] ds = None gdal.Unlink('/vsimem/tiff_read_strip_separate_as_rgba.tif') # 3 band with PHOTOMETRIC_MINISBLACK to trigger gtStripSeparate() to # use the single band code path gdal.Translate('/vsimem/tiff_read_strip_separate_as_rgba.tif', 'data/rgbsmall.tif', options='-co INTERLEAVE=BAND -co PHOTOMETRIC=MINISBLACK') gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('/vsimem/tiff_read_strip_separate_as_rgba.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [21212, 21212, 21212, 30658] ds = None gdal.Unlink('/vsimem/tiff_read_strip_separate_as_rgba.tif') ############################################################################### # def test_tiff_read_tiled_separate_as_rgba(): if not gdaltest.supports_force_rgba: pytest.skip() # 3 band gdal.Translate('/vsimem/tiff_read_tiled_separate_as_rgba.tif', 'data/rgbsmall.tif', options='-co TILED=YES -co INTERLEAVE=BAND') gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('/vsimem/tiff_read_tiled_separate_as_rgba.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [21212, 21053, 21349, 30658] ds = None gdal.Unlink('/vsimem/tiff_read_tiled_separate_as_rgba.tif') # Single band gdal.Translate('/vsimem/tiff_read_tiled_separate_as_rgba.tif', 'data/byte.tif', options='-co TILED=YES -co INTERLEAVE=BAND') gdal.SetConfigOption('GTIFF_FORCE_RGBA', 'YES') ds = gdal.Open('/vsimem/tiff_read_tiled_separate_as_rgba.tif') gdal.SetConfigOption('GTIFF_FORCE_RGBA', None) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == [4672, 4672, 4672, 4873] ds = None gdal.Unlink('/vsimem/tiff_read_tiled_separate_as_rgba.tif') ############################################################################### # def test_tiff_read_scanline_more_than_2GB(): with gdaltest.error_handler(): ds = gdal.Open('data/scanline_more_than_2GB.tif') if sys.maxsize > 2**32: assert ds is not None else: assert ds is None ############################################################################### # Test that we are at least robust to wrong number of ExtraSamples and warn # about it def test_tiff_read_wrong_number_extrasamples(): gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('data/6band_wrong_number_extrasamples.tif') assert gdal.GetLastErrorMsg().find('Wrong number of ExtraSamples') >= 0 assert ds.GetRasterBand(6).GetRasterColorInterpretation() == gdal.GCI_AlphaBand ############################################################################### # Test that we can read a one-trip TIFF without StripByteCounts tag def test_tiff_read_one_strip_no_bytecount(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/one_strip_nobytecount.tif') gdal.PopErrorHandler() assert ds.GetRasterBand(1).Checksum() == 1 ############################################################################### # Test GDAL_GEOREF_SOURCES def test_tiff_read_nogeoref(): tests = [(None, True, True, False, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, False, True, True, 'OSGB_1936', (400000.0, 25.0, 0.0, 1300000.0, 0.0, -25.0)), (None, True, False, False, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, False, True, False, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), (None, False, False, False, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('INTERNAL', True, True, False, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('INTERNAL,PAM', True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('INTERNAL,WORLDFILE', True, True, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('INTERNAL,PAM,WORLDFILE', True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('INTERNAL,WORLDFILE,PAM', True, True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM,INTERNAL', False, False, True, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('PAM,WORLDFILE,INTERNAL', False, False, True, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('TABFILE,WORLDFILE,INTERNAL', True, True, True, 'OSGB_1936', (400000.0, 25.0, 0.0, 1300000.0, 0.0, -25.0)), ('PAM', True, True, False, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('PAM,WORLDFILE', True, True, False, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('WORLDFILE', True, True, False, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM', True, True, False, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,INTERNAL', True, True, False, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM,INTERNAL', True, True, False, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,INTERNAL,PAM', True, True, False, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('NONE', True, True, False, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ] for (config_option_value, copy_pam, copy_worldfile, copy_tabfile, expected_srs, expected_gt) in tests: for iteration in range(2): gdal.SetConfigOption('GDAL_GEOREF_SOURCES', config_option_value) gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.tif', open('data/byte_nogeoref.tif', 'rb').read()) if copy_pam: gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.tif.aux.xml', open('data/byte_nogeoref.tif.aux.xml', 'rb').read()) if copy_worldfile: gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.tfw', open('data/byte_nogeoref.tfw', 'rb').read()) if copy_tabfile: gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.tab', open('data/byte_nogeoref.tab', 'rb').read()) ds = gdal.Open('/vsimem/byte_nogeoref.tif') if iteration == 0: gt = ds.GetGeoTransform() srs_wkt = ds.GetProjectionRef() else: srs_wkt = ds.GetProjectionRef() gt = ds.GetGeoTransform() ds = None gdal.SetConfigOption('GDAL_GEOREF_SOURCES', None) gdal.Unlink('/vsimem/byte_nogeoref.tif') gdal.Unlink('/vsimem/byte_nogeoref.tif.aux.xml') gdal.Unlink('/vsimem/byte_nogeoref.tfw') gdal.Unlink('/vsimem/byte_nogeoref.tab') if gt != expected_gt: print('Got ' + str(gt)) print('Expected ' + str(expected_gt)) pytest.fail('Iteration %d, did not get expected gt for %s,copy_pam=%s,copy_worldfile=%s,copy_tabfile=%s' % (iteration, config_option_value, str(copy_pam), str(copy_worldfile), str(copy_tabfile))) if expected_srs == 'LOCAL_CS["PAM"]' and srs_wkt == 'LOCAL_CS["PAM",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]': pass # ok elif (expected_srs == '' and srs_wkt != '') or (expected_srs != '' and expected_srs not in srs_wkt): print('Got ' + srs_wkt) print('Expected ' + expected_srs) pytest.fail('Iteration %d, did not get expected SRS for %s,copy_pam=%s,copy_worldfile=%s,copy_tabfile=%s' % (iteration, config_option_value, str(copy_pam), str(copy_worldfile), str(copy_tabfile))) ############################################################################### # Test GDAL_GEOREF_SOURCES def test_tiff_read_inconsistent_georef(): tests = [(None, True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, False, True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), (None, False, False, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), (None, False, True, False, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), (None, False, False, False, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), (None, True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, True, False, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, True, True, False, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), (None, True, False, False, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('INTERNAL', True, True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('PAM', True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('PAM,TABFILE', True, True, True, 'LOCAL_CS["PAM"]', (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)), ('WORLDFILE', True, True, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('TABFILE', True, True, True, 'OSGB_1936', (400000.0, 25.0, 0.0, 1300000.0, 0.0, -25.0)), ('TABFILE,PAM', True, True, True, 'OSGB_1936', (400000.0, 25.0, 0.0, 1300000.0, 0.0, -25.0)), ] for (config_option_value, copy_pam, copy_worldfile, copy_tabfile, expected_srs, expected_gt) in tests: for iteration in range(2): gdal.SetConfigOption('GDAL_GEOREF_SOURCES', config_option_value) gdal.FileFromMemBuffer('/vsimem/byte_inconsistent_georef.tif', open('data/byte_inconsistent_georef.tif', 'rb').read()) if copy_pam: gdal.FileFromMemBuffer('/vsimem/byte_inconsistent_georef.tif.aux.xml', open('data/byte_inconsistent_georef.tif.aux.xml', 'rb').read()) if copy_worldfile: gdal.FileFromMemBuffer('/vsimem/byte_inconsistent_georef.tfw', open('data/byte_inconsistent_georef.tfw', 'rb').read()) if copy_tabfile: gdal.FileFromMemBuffer('/vsimem/byte_inconsistent_georef.tab', open('data/byte_inconsistent_georef.tab', 'rb').read()) ds = gdal.Open('/vsimem/byte_inconsistent_georef.tif') if iteration == 0: gt = ds.GetGeoTransform() srs_wkt = ds.GetProjectionRef() else: srs_wkt = ds.GetProjectionRef() gt = ds.GetGeoTransform() ds = None gdal.SetConfigOption('GDAL_GEOREF_SOURCES', None) gdal.Unlink('/vsimem/byte_inconsistent_georef.tif') gdal.Unlink('/vsimem/byte_inconsistent_georef.tif.aux.xml') gdal.Unlink('/vsimem/byte_inconsistent_georef.tfw') gdal.Unlink('/vsimem/byte_inconsistent_georef.tab') if gt != expected_gt: print('Got ' + str(gt)) print('Expected ' + str(expected_gt)) pytest.fail('Iteration %d, did not get expected gt for %s,copy_pam=%s,copy_worldfile=%s,copy_tabfile=%s' % (iteration, config_option_value, str(copy_pam), str(copy_worldfile), str(copy_tabfile))) if expected_srs == 'LOCAL_CS["PAM"]' and srs_wkt == 'LOCAL_CS["PAM",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]': pass # ok elif (expected_srs == '' and srs_wkt != '') or (expected_srs != '' and expected_srs not in srs_wkt): print('Got ' + srs_wkt) print('Expected ' + expected_srs) pytest.fail('Iteration %d, did not get expected SRS for %s,copy_pam=%s,copy_worldfile=%s,copy_tabfile=%s' % (iteration, config_option_value, str(copy_pam), str(copy_worldfile), str(copy_tabfile))) ############################################################################### # Test GDAL_GEOREF_SOURCES def test_tiff_read_gcp_internal_and_auxxml(): tests = [(None, True, 'LOCAL_CS["PAM"]', 1), (None, False, '4326', 2), ('INTERNAL', True, '4326', 2), ('INTERNAL', False, '4326', 2), ('INTERNAL,PAM', True, '4326', 2), ('INTERNAL,PAM', False, '4326', 2), ('PAM', True, 'LOCAL_CS["PAM"]', 1), ('PAM', False, '', 0), ('PAM,INTERNAL', True, 'LOCAL_CS["PAM"]', 1), ('PAM,INTERNAL', False, '4326', 2), ] for (config_option_value, copy_pam, expected_srs, expected_gcp_count) in tests: for iteration in range(2): gdal.FileFromMemBuffer('/vsimem/byte_gcp.tif', open('data/byte_gcp.tif', 'rb').read()) if copy_pam: gdal.FileFromMemBuffer('/vsimem/byte_gcp.tif.aux.xml', open('data/byte_gcp.tif.aux.xml', 'rb').read()) open_options = [] if config_option_value is not None: open_options += ['GEOREF_SOURCES=' + config_option_value] ds = gdal.OpenEx('/vsimem/byte_gcp.tif', open_options=open_options) if iteration == 0: gcp_count = ds.GetGCPCount() srs_wkt = ds.GetGCPProjection() else: srs_wkt = ds.GetGCPProjection() gcp_count = ds.GetGCPCount() ds = None gdal.Unlink('/vsimem/byte_gcp.tif') gdal.Unlink('/vsimem/byte_gcp.tif.aux.xml') if gcp_count != expected_gcp_count: print('Got ' + str(gcp_count)) print('Expected ' + str(expected_gcp_count)) pytest.fail('Iteration %d, did not get expected gcp count for %s,copy_pam=%s' % (iteration, config_option_value, str(copy_pam))) if expected_srs == 'LOCAL_CS["PAM"]' and srs_wkt == 'LOCAL_CS["PAM",UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]': pass # ok elif (expected_srs == '' and srs_wkt != '') or (expected_srs != '' and expected_srs not in srs_wkt): print('Got ' + srs_wkt) print('Expected ' + expected_srs) pytest.fail('Iteration %d, did not get expected SRS for %s,copy_pam=%s' % (iteration, config_option_value, str(copy_pam))) ############################################################################### # Test reading .tif + .aux class myHandlerClass(object): def __init__(self): self.msg = None def handler(self, eErrClass, err_no, msg): # pylint: disable=unused-argument if 'File open of' in msg: self.msg = msg def test_tiff_read_aux(): gdal.ErrorReset() ds = gdal.Open('data/f2r23.tif') handler = myHandlerClass() gdal.PushErrorHandler(handler.handler) ds.GetFileList() gdal.PopErrorHandler() assert handler.msg is None, \ ('Got message that indicate recursive calls: %s' % handler.msg) def test_tiff_read_one_band_from_two_bands(): gdal.Translate('/vsimem/tiff_read_one_band_from_two_bands.tif', 'data/byte.tif', options='-b 1 -b 1') gdal.Translate('/vsimem/tiff_read_one_band_from_two_bands_dst.tif', '/vsimem/tiff_read_one_band_from_two_bands.tif', options='-b 1') ds = gdal.Open('/vsimem/tiff_read_one_band_from_two_bands_dst.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdal.Unlink('/vsimem/tiff_read_one_band_from_two_bands.tif') gdal.Unlink('/vsimem/tiff_read_one_band_from_two_bands.tif.aux.xml') gdal.Unlink('/vsimem/tiff_read_one_band_from_two_bands_dst.tif') def test_tiff_read_jpeg_cloud_optimized(): for i in range(4): ds = gdal.Open('data/byte_ovr_jpeg_tablesmode%d.tif' % i) cs0 = ds.GetRasterBand(1).Checksum() cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs0 == 4743 and cs1 == 1133, i ds = None # This one was generated with a buggy code that emit JpegTables with mode == 1 # when creating the overview directory but failed to properly set this mode while # writing the imagery. libjpeg-6b emits a 'JPEGLib:Huffman table 0x00 was not defined' # error while jpeg-8 works fine def test_tiff_read_corrupted_jpeg_cloud_optimized(): ds = gdal.Open('data/byte_ovr_jpeg_tablesmode_not_correctly_set_on_ovr.tif') cs0 = ds.GetRasterBand(1).Checksum() assert cs0 == 4743 with gdaltest.error_handler(): cs1 = ds.GetRasterBand(1).GetOverview(0).Checksum() if cs1 == 0: print('Expected error while writing overview with libjpeg-6b') elif cs1 != 1133: pytest.fail(cs1) ############################################################################### # Test reading YCbCr images with LZW compression def test_tiff_read_ycbcr_lzw(): tests = [('ycbcr_11_lzw.tif', 13459, 12939, 12414), ('ycbcr_12_lzw.tif', 13565, 13105, 12660), ('ycbcr_14_lzw.tif', 0, 0, 0), # not supported ('ycbcr_21_lzw.tif', 13587, 13297, 12760), ('ycbcr_22_lzw.tif', 13393, 13137, 12656), ('ycbcr_24_lzw.tif', 0, 0, 0), # not supported ('ycbcr_41_lzw.tif', 13218, 12758, 12592), ('ycbcr_42_lzw.tif', 13277, 12779, 12614), ('ycbcr_42_lzw_optimized.tif', 19918, 20120, 19087), ('ycbcr_44_lzw.tif', 12994, 13229, 12149), ('ycbcr_44_lzw_optimized.tif', 19666, 19860, 18836)] for (filename, cs1, cs2, cs3) in tests: ds = gdal.Open('data/' + filename) if cs1 == 0: gdal.PushErrorHandler() got_cs1 = ds.GetRasterBand(1).Checksum() got_cs2 = ds.GetRasterBand(2).Checksum() got_cs3 = ds.GetRasterBand(3).Checksum() if cs1 == 0: gdal.PopErrorHandler() assert got_cs1 == cs1 and got_cs2 == cs2 and got_cs3 == cs3, \ (filename, got_cs1, got_cs2, got_cs3) ############################################################################### # Test reading YCbCr images with nbits > 8 def test_tiff_read_ycbcr_int12(): with gdaltest.error_handler(): ds = gdal.Open('data/int12_ycbcr_contig.tif') assert ds is None assert gdal.GetLastErrorMsg().find('Cannot open TIFF file with') >= 0 ############################################################################### # Test reading band unit from VERT_CS unit (#6675) def test_tiff_read_unit_from_srs(): filename = '/vsimem/tiff_read_unit_from_srs.tif' ds = gdal.GetDriverByName('GTiff').Create(filename, 1, 1) sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:4326+3855') ds.SetProjection(sr.ExportToWkt()) ds = None ds = gdal.Open(filename) unit = ds.GetRasterBand(1).GetUnitType() assert unit == 'metre' ds = None gdal.Unlink(filename) ############################################################################### # Test reading ArcGIS 9.3 .aux.xml def test_tiff_read_arcgis93_geodataxform_gcp(): ds = gdal.Open('data/arcgis93_geodataxform_gcp.tif') assert ds.GetGCPProjection().find('26712') >= 0 assert ds.GetGCPCount() == 16 gcp = ds.GetGCPs()[0] assert (gcp.GCPPixel == pytest.approx(565, abs=1e-5) and \ gcp.GCPLine == pytest.approx(11041, abs=1e-5) and \ gcp.GCPX == pytest.approx(500000, abs=1e-5) and \ gcp.GCPY == pytest.approx(4705078.79016612, abs=1e-5) and \ gcp.GCPZ == pytest.approx(0, abs=1e-5)) ############################################################################### # Test reading file with block size > signed int 32 bit def test_tiff_read_block_width_above_32bit(): with gdaltest.error_handler(): ds = gdal.Open('data/block_width_above_32bit.tif') assert ds is None ############################################################################### # Test reading file with image size > signed int 32 bit def test_tiff_read_image_width_above_32bit(): with gdaltest.error_handler(): ds = gdal.Open('data/image_width_above_32bit.tif') assert ds is None ############################################################################### # Test reading file with image size > signed int 32 bit def test_tiff_read_second_image_width_above_32bit(): ds = gdal.Open('data/second_image_width_above_32bit.tif') with gdaltest.error_handler(): assert ds.GetMetadata("SUBDATASETS") == {} with gdaltest.error_handler(): ds = gdal.Open('GTIFF_DIR:2:data/second_image_width_above_32bit.tif') assert ds is None ############################################################################### # Test reading file with minimal number of warnings without warning def test_tiff_read_minimum_tiff_tags_no_warning(): gdal.ErrorReset() ds = gdal.Open('data/minimum_tiff_tags_no_warning.tif') assert gdal.GetLastErrorMsg() == '' ds.GetRasterBand(1).Checksum() assert gdal.GetLastErrorMsg() == '' ############################################################################### # Test reading file with minimal number of warnings but warning def test_tiff_read_minimum_tiff_tags_with_warning(): gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('data/minimum_tiff_tags_with_warning.tif') assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() ds.GetRasterBand(1).Checksum() assert gdal.GetLastErrorMsg() == '' ############################################################################### def check_libtiff_internal_or_at_least(expected_maj, expected_min, expected_micro): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['LIBTIFF'] == 'INTERNAL': return True if md['LIBTIFF'].startswith('LIBTIFF, Version '): version = md['LIBTIFF'][len('LIBTIFF, Version '):] version = version[0:version.find('\n')] got_maj, got_min, got_micro = version.split('.') got_maj = int(got_maj) got_min = int(got_min) got_micro = int(got_micro) if got_maj > expected_maj: return True if got_maj < expected_maj: return False if got_min > expected_min: return True if got_min < expected_min: return False return got_micro >= expected_micro return False ############################################################################### def test_tiff_read_unknown_compression(): with gdaltest.error_handler(): ds = gdal.Open('data/unknown_compression.tif') assert ds is None ############################################################################### def test_tiff_read_leak_ZIPSetupDecode(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/leak-ZIPSetupDecode.tif') for i in range(ds.RasterCount): ds.GetRasterBand(i + 1).Checksum() ############################################################################### def test_tiff_read_excessive_memory_TIFFFillStrip(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/excessive-memory-TIFFFillStrip.tif') for i in range(ds.RasterCount): ds.GetRasterBand(i + 1).Checksum() ############################################################################### def test_tiff_read_excessive_memory_TIFFFillStrip2(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/excessive-memory-TIFFFillStrip2.tif') ds.GetRasterBand(1).Checksum() ############################################################################### def test_tiff_read_excessive_memory_TIFFFillTile(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/excessive-memory-TIFFFillTile.tif') ds.GetRasterBand(1).Checksum() ############################################################################### def test_tiff_read_big_strip(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() gdal.Translate('/vsimem/test.tif', 'data/byte.tif', options='-co compress=lzw -outsize 10000 2000 -co blockysize=2000 -r bilinear -ot float32') if gdal.GetLastErrorMsg().find('cannot allocate') >= 0: pytest.skip() ds = gdal.Open('/vsimem/test.tif') assert ds.GetRasterBand(1).Checksum() == 2676 ds = None gdal.Unlink('/vsimem/test.tif') ############################################################################### # (Potentially) test libtiff CHUNKY_STRIP_READ_SUPPORT def test_tiff_read_big_strip_chunky_way(): gdal.Translate('/vsimem/test.tif', 'data/byte.tif', options='-co compress=lzw -outsize 1000 2001 -co blockysize=2001 -r bilinear') ds = gdal.Open('/vsimem/test.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 38337 ds = None gdal.Unlink('/vsimem/test.tif') ############################################################################### def test_tiff_read_big_tile(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() gdal.Translate('/vsimem/test.tif', 'data/byte.tif', options='-co compress=lzw -outsize 10000 2000 -co tiled=yes -co blockxsize=10000 -co blockysize=2000 -r bilinear -ot float32') if gdal.GetLastErrorMsg().find('cannot allocate') >= 0: pytest.skip() ds = gdal.Open('/vsimem/test.tif') assert ds.GetRasterBand(1).Checksum() == 2676 ds = None gdal.Unlink('/vsimem/test.tif') ############################################################################### def test_tiff_read_huge_tile(): with gdaltest.error_handler(): ds = gdal.Open('data/hugeblocksize.tif') assert ds is None ############################################################################### def test_tiff_read_huge_number_strips(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['LIBTIFF'] != 'INTERNAL': pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/huge-number-strips.tif') ds.GetRasterBand(1).Checksum() ############################################################################### def test_tiff_read_huge_implied_number_strips(): if not check_libtiff_internal_or_at_least(4, 0, 10): pytest.skip() with gdaltest.error_handler(): gdal.Open('data/huge-implied-number-strips.tif') ############################################################################### def test_tiff_read_many_blocks(): # Runs super slow on some Windows configs if sys.platform == 'win32': pytest.skip() md = gdal.GetDriverByName('GTiff').GetMetadata() if md['LIBTIFF'] != 'INTERNAL': pytest.skip() ds = gdal.GetDriverByName('GTiff').Create('/vsimem/test.tif', 1, 2000000, options=['BLOCKYSIZE=1']) ds = None ds = gdal.Open('/vsimem/test.tif') assert ds.GetRasterBand(1).Checksum() == 0 ds = None gdal.Unlink('/vsimem/test.tif') ############################################################################### def test_tiff_read_many_blocks_truncated(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['LIBTIFF'] != 'INTERNAL': pytest.skip() ds = gdal.Open('data/many_blocks_truncated.tif') gdal.ErrorReset() with gdaltest.error_handler(): ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_2000000', 'TIFF') assert gdal.GetLastErrorMsg() != '' ############################################################################### # Test reading images with nbits > 32 def test_tiff_read_uint33(): with gdaltest.error_handler(): ds = gdal.Open('data/uint33.tif') assert ds is None assert gdal.GetLastErrorMsg().find('Unsupported TIFF configuration') >= 0 ############################################################################### # Test fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1545 def test_tiff_read_corrupted_deflate_singlestrip(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/corrupted_deflate_singlestrip.tif') ds.GetRasterBand(1).Checksum() ############################################################################### # Test fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1563 def test_tiff_read_packbits_not_enough_data(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/packbits-not-enough-data.tif') ds.GetRasterBand(1).Checksum() ############################################################################### # Test reading images with more than 2billion blocks for a single band def test_tiff_read_toomanyblocks(): with gdaltest.error_handler(): ds = gdal.Open('data/toomanyblocks.tif') assert ds is None ############################################################################### # Test reading images with more than 2billion blocks for all bands def test_tiff_read_toomanyblocks_separate(): with gdaltest.error_handler(): ds = gdal.Open('data/toomanyblocks_separate.tif') assert ds is None ############################################################################### # Test reading images where the number of items in StripByteCounts/StripOffsets # tag is lesser than the number of strips def test_tiff_read_size_of_stripbytecount_lower_than_stripcount(): ds = gdal.Open('data/size_of_stripbytecount_lower_than_stripcount.tif') # There are 3 strips but StripByteCounts has just two elements; assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_1', 'TIFF') == '171' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_1', 'TIFF') == '1' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_2', 'TIFF') is None assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_2', 'TIFF') is None ds = gdal.Open('data/size_of_stripbytecount_at_1_and_lower_than_stripcount.tif') # There are 3 strips but StripByteCounts has just one element; assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_0', 'TIFF') == '1' ############################################################################### # Test different datatypes for StripOffsets tag with little/big, classic/bigtiff def test_tiff_read_stripoffset_types(): tests = [ ('data/classictiff_one_block_byte.tif', []), # unsupported ('data/classictiff_one_block_long.tif', [158]), ('data/classictiff_one_block_be_long.tif', [158]), ('data/classictiff_one_strip_long.tif', [146]), ('data/classictiff_one_strip_be_long.tif', [146]), ('data/classictiff_two_strip_short.tif', [162, 163]), ('data/classictiff_two_strip_be_short.tif', [162, 163]), ('data/classictiff_four_strip_short.tif', [178, 179, 180, 181]), ('data/classictiff_four_strip_be_short.tif', [178, 179, 180, 181]), ('data/bigtiff_four_strip_short.tif', [316, 317, 318, 319]), ('data/bigtiff_four_strip_be_short.tif', [316, 317, 318, 319]), ('data/bigtiff_one_block_long8.tif', [272]), ('data/bigtiff_one_block_be_long8.tif', [272]), ('data/bigtiff_one_strip_long.tif', [252]), ('data/bigtiff_one_strip_be_long.tif', [252]), ('data/bigtiff_one_strip_long8.tif', [252]), ('data/bigtiff_one_strip_be_long8.tif', [252]), ('data/bigtiff_two_strip_long.tif', [284, 285]), ('data/bigtiff_two_strip_be_long.tif', [284, 285]), ('data/bigtiff_two_strip_long8.tif', [284, 285]), ('data/bigtiff_two_strip_be_long8.tif', [284, 285]), ] for (filename, expected_offsets) in tests: # Only when built against internal libtiff we reject byte datatype if not expected_offsets and \ gdal.GetDriverByName('GTiff').GetMetadataItem('LIBTIFF') != 'INTERNAL': continue ds = gdal.Open(filename) offsets = [] for row in range(4): with gdaltest.error_handler(): mdi = ds.GetRasterBand(1).GetMetadataItem( 'BLOCK_OFFSET_0_%d' % row, 'TIFF') if mdi is None: break offsets.append(int(mdi)) if offsets != expected_offsets: print(filename, expected_offsets, offsets) ############################################################################### # Test reading a JPEG-in-TIFF file that contains the 2 denial of service # vulnerabilities listed in # http://www.libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf def test_tiff_read_progressive_jpeg_denial_of_service(): if not check_libtiff_internal_or_at_least(4, 0, 9): pytest.skip() # Should error out with 'JPEGPreDecode:Reading this strip would require # libjpeg to allocate at least...' gdal.ErrorReset() with gdaltest.error_handler(): os.environ['JPEGMEM'] = '10M' os.environ['LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER'] = '1000' ds = gdal.Open('/vsizip/data/eofloop_valid_huff.tif.zip') del os.environ['LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER'] del os.environ['JPEGMEM'] cs = ds.GetRasterBand(1).Checksum() assert cs == 0 and gdal.GetLastErrorMsg() != '' # Should error out with 'TIFFjpeg_progress_monitor:Scan number... gdal.ErrorReset() ds = gdal.Open('/vsizip/data/eofloop_valid_huff.tif.zip') with gdaltest.error_handler(): os.environ['LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC'] = 'YES' os.environ['LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER'] = '10' cs = ds.GetRasterBand(1).Checksum() del os.environ['LIBTIFF_ALLOW_LARGE_LIBJPEG_MEM_ALLOC'] del os.environ['LIBTIFF_JPEG_MAX_ALLOWED_SCAN_NUMBER'] assert cs == 0 and gdal.GetLastErrorMsg() != '' ############################################################################### # Test reading old-style LZW def test_tiff_read_old_style_lzw(): if not check_libtiff_internal_or_at_least(4, 0, 8): pytest.skip() ds = gdal.Open('data/quad-lzw-old-style.tif') # Shut down warning about old style LZW with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() assert cs == 34282 ############################################################################### # Test libtiff mmap interface (actually not using mmap, but our /vsimem # mmap emulation) def test_tiff_read_mmap_interface(): src_ds = gdal.Open('data/byte.tif') tmpfile = '/vsimem/tiff_read_mmap_interface.tif' for options in [[], ['TILED=YES'], ['COMPRESS=LZW'], ['COMPRESS=LZW', 'TILED=YES']]: gdal.GetDriverByName('GTiff').CreateCopy(tmpfile, src_ds, options=options) gdal.SetConfigOption('GTIFF_USE_MMAP', 'YES') ds = gdal.Open(tmpfile) cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GTIFF_USE_MMAP', None) assert cs == 4672, (options, cs) f = gdal.VSIFOpenL(tmpfile, "rb") data = gdal.VSIFReadL(1, gdal.VSIStatL(tmpfile).size - 1, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(tmpfile, "wb") gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) gdal.SetConfigOption('GTIFF_USE_MMAP', 'YES') with gdaltest.error_handler(): ds = gdal.Open(tmpfile) cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GTIFF_USE_MMAP', None) assert cs == 0, (options, cs) gdal.Unlink(tmpfile) gdal.Unlink(tmpfile) ############################################################################### # Test reading JPEG compressed file whole last strip height is the full # strip height, instead of just the number of lines needed to reach the # image height. def test_tiff_read_jpeg_too_big_last_stripe(): if not check_libtiff_internal_or_at_least(4, 0, 9): pytest.skip() ds = gdal.Open('data/tif_jpeg_too_big_last_stripe.tif') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() assert cs == 4557 ds = gdal.Open('data/tif_jpeg_ycbcr_too_big_last_stripe.tif') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() assert cs == 4557 ############################################################################### # Test reading GeoTIFF file with negative ScaleY in GeoPixelScale tag def test_tiff_read_negative_scaley(): ds = gdal.Open('data/negative_scaley.tif') with gdaltest.error_handler(): assert ds.GetGeoTransform()[5] == -60 ds = gdal.Open('data/negative_scaley.tif') with gdaltest.config_option('GTIFF_HONOUR_NEGATIVE_SCALEY', 'NO'): assert ds.GetGeoTransform()[5] == -60 ds = gdal.Open('data/negative_scaley.tif') with gdaltest.config_option('GTIFF_HONOUR_NEGATIVE_SCALEY', 'YES'): assert ds.GetGeoTransform()[5] == 60 ############################################################################### # Test ZSTD compression def test_tiff_read_zstd(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte_zstd.tif', 1, 4672) return ut.testOpen() ############################################################################### # Test ZSTD compression def test_tiff_read_zstd_corrupted(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte_zstd_corrupted.tif', 1, 0) with gdaltest.error_handler(): return ut.testOpen() ############################################################################### # Test ZSTD compression def test_tiff_read_zstd_corrupted2(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('ZSTD') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte_zstd_corrupted2.tif', 1, 0) with gdaltest.error_handler(): return ut.testOpen() ############################################################################### # Test WEBP compression def test_tiff_read_webp(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('WEBP') == -1: pytest.skip() stats = (0, 215, 66.38, 47.186) ut = gdaltest.GDALTest('GTiff', 'tif_webp.tif', 1, None) success = ut.testOpen(check_approx_stat=stats, stat_epsilon=1) gdal.Unlink('data/tif_webp.tif.aux.xml') return success ############################################################################### # Test WEBP compression def test_tiff_read_webp_huge_single_strip(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('WEBP') == -1: pytest.skip() ds = gdal.Open('data/tif_webp_huge_single_strip.tif') assert ds.GetRasterBand(1).Checksum() != 0 ############################################################################### def test_tiff_read_1bit_2bands(): ds = gdal.Open('data/1bit_2bands.tif') cs = (ds.GetRasterBand(1).Checksum(), ds.GetRasterBand(2).Checksum()) assert cs == (200, 824) ############################################################################### # Test LERC compression def test_tiff_read_lerc(): md = gdal.GetDriverByName('GTiff').GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LERC') == -1: pytest.skip() ut = gdaltest.GDALTest('GTiff', 'byte_lerc.tif', 1, 4672) return ut.testOpen() ############################################################################### def test_tiff_read_overview_of_external_mask(): filename = '/vsimem/tiff_read_overview_of_external_mask.tif' gdal.Translate(filename, 'data/byte.tif', options='-b 1 -mask 1') ds = gdal.Open(filename, gdal.GA_Update) ds.BuildOverviews('CUBIC', overviewlist=[2]) ds = None ds = gdal.Open(filename + '.msk', gdal.GA_Update) ds.BuildOverviews('NEAREST', overviewlist=[2]) ds = None ds = gdal.Open(filename) cs1 = ds.GetRasterBand(1).GetOverview(0).GetMaskBand().Checksum() cs2 = ds.GetRasterBand(1).GetMaskBand().GetOverview(0).Checksum() flags1 = ds.GetRasterBand(1).GetOverview(0).GetMaskFlags() ds = None gdal.Unlink(filename) gdal.Unlink(filename + '.msk') assert cs1 == cs2 assert flags1 == gdal.GMF_PER_DATASET ############################################################################### # Test reading GeoTIFF file ModelTiepointTag(z) != 0 and ModelPixelScaleTag(z) = 0 # Test https://issues.qgis.org/issues/20493 def test_tiff_read_ModelTiepointTag_z_non_zero_but_ModelPixelScaleTag_z_zero(): ds = gdal.Open('data/ModelTiepointTag_z_non_zero_but_ModelPixelScaleTag_z_zero.tif') assert not ds.GetRasterBand(1).GetScale() assert not ds.GetRasterBand(1).GetOffset() ############################################################################### # Test strip chopping on uncompressed fies with strips larger than 2 GB def test_tiff_read_strip_larger_than_2GB(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() ds = gdal.Open('data/strip_larger_than_2GB_header.tif') assert ds assert ds.GetRasterBand(1).GetBlockSize() == [50000, 10737] assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_0', 'TIFF') == '264' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_0', 'TIFF') == '536850000' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_1', 'TIFF') == '536850264' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_1', 'TIFF') == '536850000' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_OFFSET_0_5', 'TIFF') == '2684250264' assert ds.GetRasterBand(1).GetMetadataItem('BLOCK_SIZE_0_5', 'TIFF') == '65750000' ############################################################################### # Test reading a deflate compressed file with a uncompressed strip larger than 4 GB def test_tiff_read_deflate_4GB(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() ds = gdal.Open('/vsizip/data/test_deflate_4GB.tif.zip/test_deflate_4GB.tif') if sys.maxsize < 2**32: assert ds is None return assert ds is not None if not gdaltest.run_slow_tests(): pytest.skip() data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, buf_xsize = 20, buf_ysize = 20) ref_ds = gdal.GetDriverByName('MEM').Create('', 20, 20) ref_ds.GetRasterBand(1).Fill(127) assert data == ref_ds.ReadRaster() ############################################################################### # Check that our use of TileByteCounts is minimal for COG (only for last tile) # and for interleaved mask that we also hardly use TileOffsets. def test_tiff_read_cog_strile_arrays_zeroified_when_possible(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() # The file has been produced with: # gdal_translate ../autotest/gcore/data/rgba.tif -b 1 -b 2 -b 3 -mask 4 in.tif # gdal_translate in.tif cog.tif -co COPY_SRC_OVERVIEWS=YES -co COMPRESS=LZW -co TILED=YES -co BLOCKXSIZE=16 -co BLOCKYSIZE=16 --config GDAL_TIFF_INTERNAL_MASK YES # and then with an hex editor, zeroify all entries of TileByteCounts except the last tile for both IFDs # and zeroify all entries of TileOffsets for 2nd IFD (mask) except the last tile. with gdaltest.config_option('GTIFF_HAS_OPTIMIZED_READ_MULTI_RANGE', 'YES'): ds = gdal.Open('data/cog_strile_arrays_zeroified_when_possible.tif') cs = ds.GetRasterBand(1).Checksum() cs_mask = ds.GetRasterBand(1).GetMaskBand().Checksum() assert cs == 4873 assert cs_mask == 1222 ############################################################################### # Check that our reading of a COG with /vsicurl is efficient def test_tiff_read_cog_vsicurl(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() gdal.VSICurlClearCache() webserver_process = None webserver_port = 0 (webserver_process, webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if webserver_port == 0: pytest.skip() in_filename = 'tmp/test_tiff_read_cog_vsicurl_in.tif' cog_filename = 'tmp/test_tiff_read_cog_vsicurl_out.tif' try: src_ds = gdal.GetDriverByName('GTIFF').Create(in_filename, 1024, 1024, options = ['BIGTIFF=YES', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'SPARSE_OK=YES']) src_ds.BuildOverviews('NEAR', [256]) gdal.GetDriverByName('GTIFF').CreateCopy(cog_filename, src_ds, options = ['BIGTIFF=YES', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'COPY_SRC_OVERVIEWS=YES', 'COMPRESS=LZW']) filesize = gdal.VSIStatL(cog_filename).size handler = webserver.SequentialHandler() handler.add('HEAD', '/cog.tif', 200, {'Content-Length': '%d' % filesize}) def method(request): #sys.stderr.write('%s\n' % request.headers['Range']) if request.headers['Range'] == 'bytes=0-16383': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 0-16383/%d' % filesize) request.send_header('Content-Length', 16384) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(open(cog_filename, 'rb').read(16384)) else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() handler.add('GET', '/cog.tif', custom_method=method) with webserver.install_http_handler(handler): ds = gdal.Open('/vsicurl/http://localhost:%d/cog.tif' % webserver_port) assert(ds) handler = webserver.SequentialHandler() def method(request): #sys.stderr.write('%s\n' % request.headers['Range']) if request.headers['Range'] == 'bytes=32768-49151': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 32768-49151/%d' % filesize) request.send_header('Content-Length', 16384) request.send_header('Connection', 'close') request.end_headers() with open(cog_filename, 'rb') as f: f.seek(32768, 0) request.wfile.write(f.read(16384)) else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() handler.add('GET', '/cog.tif', custom_method=method) def method(request): #sys.stderr.write('%s\n' % request.headers['Range']) if request.headers['Range'] == 'bytes=180224-193497': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 180224-193497/%d' % filesize) request.send_header('Content-Length', 13274) request.send_header('Connection', 'close') request.end_headers() with open(cog_filename, 'rb') as f: f.seek(180224, 0) request.wfile.write(f.read(13274)) else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() handler.add('GET', '/cog.tif', custom_method=method) with webserver.install_http_handler(handler): ret = ds.ReadRaster(1024 - 32,1024 - 32,16,16) assert ret finally: webserver.server_stop(webserver_process, webserver_port) gdal.VSICurlClearCache() gdal.GetDriverByName('GTIFF').Delete(in_filename) gdal.GetDriverByName('GTIFF').Delete(cog_filename) ############################################################################### # Check that our reading of a COG with /vsicurl is efficient def test_tiff_read_cog_with_mask_vsicurl(): if not check_libtiff_internal_or_at_least(4, 0, 11): pytest.skip() if not gdaltest.built_against_curl(): pytest.skip() gdal.VSICurlClearCache() webserver_process = None webserver_port = 0 (webserver_process, webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if webserver_port == 0: pytest.skip() in_filename = 'tmp/test_tiff_read_cog_with_mask_vsicurl_in.tif' cog_filename = 'tmp/test_tiff_read_cog_with_mask_vsicurl_out.tif' try: src_ds = gdal.GetDriverByName('GTIFF').Create(in_filename, 1024, 1024, options = ['BIGTIFF=YES', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'SPARSE_OK=YES']) src_ds.BuildOverviews('NEAR', [256]) with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): gdal.GetDriverByName('GTIFF').CreateCopy(cog_filename, src_ds, options = ['BIGTIFF=YES', 'TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16', 'COPY_SRC_OVERVIEWS=YES', 'COMPRESS=LZW']) filesize = gdal.VSIStatL(cog_filename).size handler = webserver.SequentialHandler() handler.add('HEAD', '/cog.tif', 200, {'Content-Length': '%d' % filesize}) def method(request): #sys.stderr.write('%s\n' % request.headers['Range']) if request.headers['Range'] == 'bytes=0-16383': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 0-16383/%d' % filesize) request.send_header('Content-Length', 16384) request.send_header('Connection', 'close') request.end_headers() request.wfile.write(open(cog_filename, 'rb').read(16384)) else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() handler.add('GET', '/cog.tif', custom_method=method) with webserver.install_http_handler(handler): ds = gdal.Open('/vsicurl/http://localhost:%d/cog.tif' % webserver_port) assert(ds) handler = webserver.SequentialHandler() def method(request): #sys.stderr.write('%s\n' % request.headers['Range']) if request.headers['Range'] == 'bytes=32768-49151': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 32768-49151/%d' % filesize) request.send_header('Content-Length', 16384) request.send_header('Connection', 'close') request.end_headers() with open(cog_filename, 'rb') as f: f.seek(32768, 0) request.wfile.write(f.read(16384)) else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() handler.add('GET', '/cog.tif', custom_method=method) def method(request): #sys.stderr.write('%s\n' % request.headers['Range']) if request.headers['Range'] == 'bytes=294912-311295': request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Range', 'bytes 294912-311295/%d' % filesize) request.send_header('Content-Length', 32768) request.send_header('Connection', 'close') request.end_headers() with open(cog_filename, 'rb') as f: f.seek(294912, 0) request.wfile.write(f.read(32768)) else: request.send_response(404) request.send_header('Content-Length', 0) request.end_headers() handler.add('GET', '/cog.tif', custom_method=method) with webserver.install_http_handler(handler): ret = ds.ReadRaster(1024 - 32,1024 - 32,16,16) assert ret ret = ds.GetRasterBand(1).GetMaskBand().ReadRaster(1024 - 32,1024 - 32,16,16) assert ret finally: webserver.server_stop(webserver_process, webserver_port) gdal.VSICurlClearCache() gdal.GetDriverByName('GTIFF').Delete(in_filename) gdal.GetDriverByName('GTIFF').Delete(cog_filename) ############################################################################### # Check that GetMetadataDomainList() works properly def test_tiff_GetMetadataDomainList(): ds = gdal.Open('data/byte.tif') mdd1_set = set([x for x in ds.GetMetadataDomainList()]) assert mdd1_set == set(['', 'DERIVED_SUBDATASETS', 'IMAGE_STRUCTURE']) mdd2_set = set([x for x in ds.GetMetadataDomainList()]) assert mdd1_set == mdd2_set ############################################################################### # Test reading a file with SLONG8 data type for StripOffsets def test_tiff_read_bigtiff_invalid_slong8_for_stripoffsets(): if not check_libtiff_internal_or_at_least(4, 1, 1): pytest.skip() with gdaltest.error_handler(): ds = gdal.Open('data/byte_bigtiff_invalid_slong8_for_stripoffsets.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 4672 ############################################################################### # Test reading a file with a single band, and WhitePoint and PrimaryChromaticities # tags def test_tiff_read_tiff_single_band_with_whitepoint_primarychroma_tags(): ds = gdal.Open('data/tiff_single_band_with_whitepoint_primarychroma_tags.tif') # Check that it doesn't crash. We could perhaps return something more # useful assert ds.GetMetadata('COLOR_PROFILE') == {} ����������gdalautotest-3.1.2/gcore/envi_read.py���������������������������������������������������������������0000775�0001750�0001750�00000004756�13701057757�016333� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: envi_read.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for a all datatypes from an ENVI file. # Author: Andrey Kiselev, dron@remotesensing.org # # See also: gdrivers/envi.py for a driver focused on coordinate system support. # ############################################################################### # Copyright (c) 2003, Andrey Kiselev <dron@remotesensing.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest from osgeo import gdal import gdaltest ############################################################################### # Test GDAL_READDIR_LIMIT_ON_OPEN def test_envi_1(): gdal.SetConfigOption('GDAL_READDIR_LIMIT_ON_OPEN', '1') ds = gdal.Open('data/utmsmall.raw') filelist = ds.GetFileList() gdal.SetConfigOption('GDAL_READDIR_LIMIT_ON_OPEN', None) assert len(filelist) == 2, 'did not get expected file list.' ############################################################################### # When imported build a list of units based on the files available. init_list = [ ('byte.raw', 4672), ('int16.raw', 4672), ('uint16.raw', 4672), ('int32.raw', 4672), ('uint32.raw', 4672), ('float32.raw', 4672), ('float64.raw', 4672), # ('cfloat32.raw', 5028), # ('cfloat64.raw', 5028), ] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('ENVI') def test_envi_open(filename, checksum): ut = gdaltest.GDALTest('ENVI', filename, 1, checksum) ut.testOpen() ������������������gdalautotest-3.1.2/gcore/vsicurl_streaming.py�������������������������������������������������������0000775�0001750�0001750�00000010107�13701057757�020122� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: vsicurl_streaming.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsicurl_streaming # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2012-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import time from osgeo import gdal import gdaltest import pytest ############################################################################### # def test_vsicurl_streaming_1(): drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() gdal.SetConfigOption('GDAL_HTTP_CONNECTTIMEOUT', '5') fp = gdal.VSIFOpenL('/vsicurl_streaming/http://download.osgeo.org/gdal/data/usgsdem/cded/114p01_0100_deme.dem', 'rb') gdal.SetConfigOption('GDAL_HTTP_CONNECTTIMEOUT', None) if fp is None: if gdaltest.gdalurlopen('http://download.osgeo.org/gdal/data/usgsdem/cded/114p01_0100_deme.dem', timeout=4) is None: pytest.skip('cannot open URL') pytest.fail() if gdal.VSIFTellL(fp) != 0: gdal.VSIFCloseL(fp) pytest.fail() data = gdal.VSIFReadL(1, 50, fp) if data.decode('ascii') != ' 114p01DEMe Base Ma': gdal.VSIFCloseL(fp) pytest.fail() if gdal.VSIFTellL(fp) != 50: gdal.VSIFCloseL(fp) pytest.fail() gdal.VSIFSeekL(fp, 0, 0) if gdal.VSIFTellL(fp) != 0: gdal.VSIFCloseL(fp) pytest.fail() data = gdal.VSIFReadL(1, 50, fp) if data.decode('ascii') != ' 114p01DEMe Base Ma': gdal.VSIFCloseL(fp) pytest.fail() if gdal.VSIFTellL(fp) != 50: gdal.VSIFCloseL(fp) pytest.fail() time.sleep(0.5) gdal.VSIFSeekL(fp, 2001, 0) data_2001 = gdal.VSIFReadL(1, 20, fp) if data_2001.decode('ascii') != '7-32767-32767-32767-': gdal.VSIFCloseL(fp) pytest.fail(data_2001) if gdal.VSIFTellL(fp) != 2001 + 20: gdal.VSIFCloseL(fp) pytest.fail() gdal.VSIFSeekL(fp, 0, 2) if gdal.VSIFTellL(fp) != 9839616: gdal.VSIFCloseL(fp) pytest.fail() nRet = len(gdal.VSIFReadL(1, 10, fp)) if nRet != 0: gdal.VSIFCloseL(fp) pytest.fail() gdal.VSIFSeekL(fp, 2001, 0) data_2001_2 = gdal.VSIFReadL(1, 20, fp) if gdal.VSIFTellL(fp) != 2001 + 20: gdal.VSIFCloseL(fp) pytest.fail() if data_2001 != data_2001_2: gdal.VSIFCloseL(fp) pytest.fail() gdal.VSIFSeekL(fp, 1024 * 1024 + 100, 0) data = gdal.VSIFReadL(1, 20, fp) if data.decode('ascii') != '67-32767-32767-32767': gdal.VSIFCloseL(fp) pytest.fail(data) if gdal.VSIFTellL(fp) != 1024 * 1024 + 100 + 20: gdal.VSIFCloseL(fp) pytest.fail() gdal.VSIFCloseL(fp) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/hdf4_write.py��������������������������������������������������������������0000775�0001750�0001750�00000004263�13701057757�016427� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: hdf4_write.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for HDF4 driver. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev <dron@remotesensing.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest init_list = [ ('byte.tif', 4672), ('int16.tif', 4672), ('uint16.tif', 4672), ('int32.tif', 4672), ('uint32.tif', 4672), ('float32.tif', 4672), ('float64.tif', 4672), ('utmsmall.tif', 50054) ] @pytest.mark.parametrize( 'rank', [2, 3], ids=lambda x: 'rank%d' % x ) @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[arg[0].split('.')[0] for arg in init_list] ) @pytest.mark.parametrize( 'testfunction', [ 'testCreateCopy', 'testCreate', 'testSetGeoTransform', 'testSetProjection', 'testSetMetadata', 'testSetNoDataValue', 'testSetDescription', ] ) @pytest.mark.require_driver('HDF4Image') def test_hdf4_write(filename, checksum, testfunction, rank): ut = gdaltest.GDALTest('HDF4Image', filename, 1, checksum, options=['RANK=%d' % rank]) getattr(ut, testfunction)() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/aaigrid_read.py������������������������������������������������������������0000775�0001750�0001750�00000003453�13701057757�016763� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: aaigrid_read.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for Arc/Info ASCII grid (AAIGrid) file. # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev <dron@remotesensing.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest ############################################################################### # When imported build a list of units based on the files available. init_list = [ ('byte.tif.grd', 4672), ] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('AAIGrid') def test_aaigrid_open(filename, checksum): ut = gdaltest.GDALTest('AAIGrid', filename, 1, checksum) ut.testOpen() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/rasterio.py����������������������������������������������������������������0000775�0001750�0001750�00000114366�13701057757�016226� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: rasterio.py 956e2f5eefc4cf098c2e167131a63cbd7bfd4436 2020-05-21 01:30:14 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test default implementation of GDALRasterBand::IRasterIO # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct import sys from osgeo import gdal import gdaltest import pytest ############################################################################### # Test writing a 1x1 buffer to a 10x6 raster and read it back def test_rasterio_1(): data = 'A'.encode('ascii') drv = gdal.GetDriverByName('GTiff') ds = drv.Create('tmp/rasterio1.tif', 10, 6, 1) ds.GetRasterBand(1).Fill(65) checksum = ds.GetRasterBand(1).Checksum() ds.GetRasterBand(1).Fill(0) ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, data, buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) assert checksum == ds.GetRasterBand(1).Checksum(), 'Didnt get expected checksum ' data2 = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, 1, 1) assert data2 == data, 'Didnt get expected buffer ' ds = None drv.Delete('tmp/rasterio1.tif') ############################################################################### # Test writing a 5x4 buffer to a 10x6 raster and read it back def test_rasterio_2(): data = 'AAAAAAAAAAAAAAAAAAAA'.encode('ascii') drv = gdal.GetDriverByName('GTiff') ds = drv.Create('tmp/rasterio2.tif', 10, 6, 1) ds.GetRasterBand(1).Fill(65) checksum = ds.GetRasterBand(1).Checksum() ds.GetRasterBand(1).Fill(0) ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, data, buf_type=gdal.GDT_Byte, buf_xsize=5, buf_ysize=4) assert checksum == ds.GetRasterBand(1).Checksum(), 'Didnt get expected checksum ' data2 = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, 5, 4) assert data2 == data, 'Didnt get expected buffer ' ds = None drv.Delete('tmp/rasterio2.tif') ############################################################################### # Test extensive read & writes into a non tiled raster def test_rasterio_3(): data = [['' for i in range(4)] for i in range(5)] for xsize in range(5): for ysize in range(4): for m in range((xsize + 1) * (ysize + 1)): data[xsize][ysize] = data[xsize][ysize] + 'A' data[xsize][ysize] = data[xsize][ysize].encode('ascii') drv = gdal.GetDriverByName('GTiff') ds = drv.Create('tmp/rasterio3.tif', 10, 6, 1) i = 0 while i < ds.RasterXSize: j = 0 while j < ds.RasterYSize: k = 0 while k < ds.RasterXSize - i: m = 0 while m < ds.RasterYSize - j: for xsize in range(5): for ysize in range(4): ds.GetRasterBand(1).Fill(0) ds.WriteRaster(i, j, k + 1, m + 1, data[xsize][ysize], buf_type=gdal.GDT_Byte, buf_xsize=xsize + 1, buf_ysize=ysize + 1) data2 = ds.ReadRaster(i, j, k + 1, m + 1, xsize + 1, ysize + 1, gdal.GDT_Byte) assert data2 == data[xsize][ysize], \ 'Didnt get expected buffer ' m = m + 1 k = k + 1 j = j + 1 i = i + 1 ds = None drv.Delete('tmp/rasterio3.tif') ############################################################################### # Test extensive read & writes into a tiled raster def test_rasterio_4(): data = ['' for i in range(5 * 4)] for size in range(5 * 4): for k in range(size + 1): data[size] = data[size] + 'A' data[size] = data[size].encode('ascii') drv = gdal.GetDriverByName('GTiff') ds = drv.Create('tmp/rasterio4.tif', 20, 20, 1, options=['TILED=YES', 'BLOCKXSIZE=16', 'BLOCKYSIZE=16']) i = 0 while i < ds.RasterXSize: j = 0 while j < ds.RasterYSize: k = 0 while k < ds.RasterXSize - i: m = 0 while m < ds.RasterYSize - j: for xsize in range(5): for ysize in range(4): ds.GetRasterBand(1).Fill(0) ds.WriteRaster(i, j, k + 1, m + 1, data[(xsize + 1) * (ysize + 1) - 1], buf_type=gdal.GDT_Byte, buf_xsize=xsize + 1, buf_ysize=ysize + 1) data2 = ds.ReadRaster(i, j, k + 1, m + 1, xsize + 1, ysize + 1, gdal.GDT_Byte) if data2 != data[(xsize + 1) * (ysize + 1) - 1]: print(i, j, k, m, xsize, ysize) pytest.fail('Didnt get expected buffer ') m = m + 1 k = k + 1 if j >= 15: j = j + 1 else: j = j + 3 if i >= 15: i = i + 1 else: i = i + 3 ds = None drv.Delete('tmp/rasterio4.tif') ############################################################################### # Test error cases of ReadRaster() def test_rasterio_5(): ds = gdal.Open('data/byte.tif') for obj in [ds, ds.GetRasterBand(1)]: obj.ReadRaster(0, 0, -2000000000, 1, 1, 1) obj.ReadRaster(0, 0, 1, -2000000000, 1, 1) for band_number in [-1, 0, 2]: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') res = ds.ReadRaster(0, 0, 1, 1, band_list=[band_number]) gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert res is None, 'expected None' assert error_msg.find('this band does not exist on dataset') != -1, \ 'did not get expected error msg' res = ds.ReadRaster(0, 0, 1, 1, band_list=[1, 1]) assert res is not None, 'expected non None' for obj in [ds, ds.GetRasterBand(1)]: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') res = obj.ReadRaster(0, 0, 21, 21) gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert res is None, 'expected None' assert error_msg.find('Access window out of range in RasterIO()') != -1, \ 'did not get expected error msg (1)' # This should only fail on a 32bit build try: maxsize = sys.maxint except AttributeError: maxsize = sys.maxsize # On win64, maxsize == 2147483647 and ReadRaster() # fails because of out of memory condition, not # because of integer overflow. I'm not sure on how # to detect win64 better. if maxsize == 2147483647 and sys.platform != 'win32': gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') res = obj.ReadRaster(0, 0, 1, 1, 1000000, 1000000) gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert res is None, 'expected None' assert error_msg.find('Integer overflow') != -1, \ 'did not get expected error msg (2)' gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') res = obj.ReadRaster(0, 0, 0, 1) gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert res is None, 'expected None' assert error_msg.find('Illegal values for buffer size') != -1, \ 'did not get expected error msg (3)' ds = None ############################################################################### # Test error cases of WriteRaster() def test_rasterio_6(): ds = gdal.GetDriverByName('MEM').Create('', 2, 2) for obj in [ds, ds.GetRasterBand(1)]: with pytest.raises(Exception): obj.WriteRaster(0, 0, 2, 2, None) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') obj.WriteRaster(0, 0, 2, 2, ' ') gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert error_msg.find('Buffer too small') != -1, \ 'did not get expected error msg (1)' gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') obj.WriteRaster(-1, 0, 1, 1, ' ') gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert error_msg.find('Access window out of range in RasterIO()') != -1, \ 'did not get expected error msg (2)' gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') obj.WriteRaster(0, 0, 0, 1, ' ') gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() assert error_msg.find('Illegal values for buffer size') != -1, \ 'did not get expected error msg (3)' ds = None ############################################################################### # Test that default window reading works via ReadRaster() def test_rasterio_7(): ds = gdal.Open('data/byte.tif') data = ds.GetRasterBand(1).ReadRaster() assert len(data) == 400, 'did not read expected band data via ReadRaster()' data = ds.ReadRaster() assert len(data) == 400, 'did not read expected dataset data via ReadRaster()' ############################################################################### # Test callback of ReadRaster() def rasterio_8_progress_callback(pct, message, user_data): # pylint: disable=unused-argument if pct != pytest.approx((user_data[0] + 0.05), abs=1e-5): print('Expected %f, got %f' % (user_data[0] + 0.05, pct)) user_data[1] = False user_data[0] = pct return 1 # 1 to continue, 0 to stop def rasterio_8_progress_interrupt_callback(pct, message, user_data): # pylint: disable=unused-argument user_data[0] = pct if pct >= 0.5: return 0 return 1 # 1 to continue, 0 to stop def rasterio_8_progress_callback_2(pct, message, user_data): # pylint: disable=unused-argument if pct < user_data[0]: print('Got %f, last pct was %f' % (pct, user_data[0])) return 0 user_data[0] = pct return 1 # 1 to continue, 0 to stop def test_rasterio_8(): ds = gdal.Open('data/byte.tif') # Progress not implemented yet if gdal.GetConfigOption('GTIFF_DIRECT_IO') == 'YES' or \ gdal.GetConfigOption('GTIFF_VIRTUAL_MEM_IO') == 'YES': pytest.skip() # Test RasterBand.ReadRaster tab = [0, True] data = ds.GetRasterBand(1).ReadRaster(resample_alg=gdal.GRIORA_NearestNeighbour, callback=rasterio_8_progress_callback, callback_data=tab) assert len(data) == 400, 'did not read expected band data via ReadRaster()' assert tab[0] == pytest.approx(1, abs=1e-5) and tab[1] # Test interruption tab = [0] data = ds.GetRasterBand(1).ReadRaster(resample_alg=gdal.GRIORA_NearestNeighbour, callback=rasterio_8_progress_interrupt_callback, callback_data=tab) assert data is None assert tab[0] >= 0.50 # Test RasterBand.ReadRaster with type change tab = [0, True] data = ds.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_Int16, callback=rasterio_8_progress_callback, callback_data=tab) assert data is not None, 'did not read expected band data via ReadRaster()' assert tab[0] == pytest.approx(1, abs=1e-5) and tab[1] # Same with interruption tab = [0] data = ds.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_Int16, callback=rasterio_8_progress_interrupt_callback, callback_data=tab) assert data is None and tab[0] >= 0.50 # Test RasterBand.ReadRaster with resampling tab = [0, True] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=40, callback=rasterio_8_progress_callback, callback_data=tab) assert data is not None, 'did not read expected band data via ReadRaster()' assert tab[0] == pytest.approx(1, abs=1e-5) and tab[1] # Same with interruption tab = [0] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=40, callback=rasterio_8_progress_interrupt_callback, callback_data=tab) assert data is None and tab[0] >= 0.50 # Test Dataset.ReadRaster tab = [0, True] data = ds.ReadRaster(resample_alg=gdal.GRIORA_NearestNeighbour, callback=rasterio_8_progress_callback, callback_data=tab) assert len(data) == 400, 'did not read expected dataset data via ReadRaster()' assert tab[0] == pytest.approx(1, abs=1e-5) and tab[1] ds = None # Test Dataset.ReadRaster on a multi band file, with INTERLEAVE=BAND ds = gdal.Open('data/rgbsmall.tif') last_pct = [0] data = ds.ReadRaster(resample_alg=gdal.GRIORA_NearestNeighbour, callback=rasterio_8_progress_callback_2, callback_data=last_pct) assert not (data is None or last_pct[0] != pytest.approx(1.0, abs=1e-5)) # Same with interruption tab = [0] data = ds.ReadRaster(callback=rasterio_8_progress_interrupt_callback, callback_data=tab) assert data is None and tab[0] >= 0.50 ds = None # Test Dataset.ReadRaster on a multi band file, with INTERLEAVE=PIXEL ds = gdal.Open('data/rgbsmall_cmyk.tif') last_pct = [0] data = ds.ReadRaster(resample_alg=gdal.GRIORA_NearestNeighbour, callback=rasterio_8_progress_callback_2, callback_data=last_pct) assert not (data is None or last_pct[0] != pytest.approx(1.0, abs=1e-5)) # Same with interruption tab = [0] data = ds.ReadRaster(callback=rasterio_8_progress_interrupt_callback, callback_data=tab) assert data is None and tab[0] >= 0.50 ############################################################################### # Test resampling algorithm of ReadRaster() def rasterio_9_progress_callback(pct, message, user_data): # pylint: disable=unused-argument if pct < user_data[0]: print('Got %f, last pct was %f' % (pct, user_data[0])) return 0 user_data[0] = pct if user_data[1] is not None and pct >= user_data[1]: return 0 return 1 # 1 to continue, 0 to stop def rasterio_9_checksum(data, buf_xsize, buf_ysize, data_type=gdal.GDT_Byte): ds = gdal.GetDriverByName('MEM').Create('', buf_xsize, buf_ysize, 1) ds.GetRasterBand(1).WriteRaster(0, 0, buf_xsize, buf_ysize, data, buf_type=data_type) cs = ds.GetRasterBand(1).Checksum() return cs def test_rasterio_9(): ds = gdal.Open('data/byte.tif') # Test RasterBand.ReadRaster, with Bilinear tab = [0, None] data = ds.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_Int16, buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Bilinear, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None data_ar = struct.unpack('h' * 10 * 10, data) cs = rasterio_9_checksum(data, 10, 10, data_type=gdal.GDT_Int16) assert cs == 1211 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Same but query with GDT_Float32. Check that we do not get floating-point # values, since the band type is Byte data = ds.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_Float32, buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Bilinear) data_float32_ar = struct.unpack('f' * 10 * 10, data) assert data_ar == data_float32_ar # Test RasterBand.ReadRaster, with Lanczos tab = [0, None] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Lanczos, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 10, 10) assert cs == 1154 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test RasterBand.ReadRaster, with Bilinear and UInt16 data type src_ds_uint16 = gdal.Open('data/uint16.tif') tab = [0, None] data = src_ds_uint16.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_UInt16, buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Bilinear, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 10, 10, data_type=gdal.GDT_UInt16) assert cs == 1211 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test RasterBand.ReadRaster, with Bilinear on Complex, thus using warp API tab = [0, None] complex_ds = gdal.GetDriverByName('MEM').Create('', 20, 20, 1, gdal.GDT_CInt16) complex_ds.GetRasterBand(1).WriteRaster(0, 0, 20, 20, ds.GetRasterBand(1).ReadRaster(), buf_type=gdal.GDT_Byte) data = complex_ds.GetRasterBand(1).ReadRaster(buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Bilinear, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 10, 10, data_type=gdal.GDT_CInt16) assert cs == 1211 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test interruption tab = [0, 0.5] gdal.PushErrorHandler('CPLQuietErrorHandler') data = ds.GetRasterBand(1).ReadRaster(buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Bilinear, callback=rasterio_9_progress_callback, callback_data=tab) gdal.PopErrorHandler() assert data is None assert tab[0] >= 0.50 # Test RasterBand.ReadRaster, with Gauss, and downsampling tab = [0, None] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Gauss, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 10, 10) assert cs == 1089 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test RasterBand.ReadRaster, with Cubic, and downsampling tab = [0, None] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=10, buf_ysize=10, resample_alg=gdal.GRIORA_Cubic, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 10, 10) assert cs == 1059 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test RasterBand.ReadRaster, with Cubic, and downsampling with >=8x8 source samples used for a dest sample data = ds.GetRasterBand(1).ReadRaster(buf_xsize=5, buf_ysize=5, resample_alg=gdal.GRIORA_Cubic) assert data is not None cs = rasterio_9_checksum(data, 5, 5) assert cs == 214 # Same with UInt16 data = src_ds_uint16.GetRasterBand(1).ReadRaster(buf_xsize=5, buf_ysize=5, resample_alg=gdal.GRIORA_Cubic) assert data is not None cs = rasterio_9_checksum(data, 5, 5, data_type=gdal.GDT_UInt16) assert cs == 214 # Test RasterBand.ReadRaster, with Cubic and supersampling tab = [0, None] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=40, buf_ysize=40, resample_alg=gdal.GRIORA_Cubic, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 40, 40) assert cs == 19556 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test Dataset.ReadRaster, with Cubic and supersampling tab = [0, None] data = ds.ReadRaster(buf_xsize=40, buf_ysize=40, resample_alg=gdal.GRIORA_CubicSpline, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 40, 40) assert cs == 19041 assert tab[0] == pytest.approx(1.0, abs=1e-5) # Test Dataset.ReadRaster on a multi band file, with INTERLEAVE=PIXEL ds = gdal.Open('data/rgbsmall_cmyk.tif') tab = [0, None] data = ds.ReadRaster(buf_xsize=25, buf_ysize=25, resample_alg=gdal.GRIORA_Cubic, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data[0:25 * 25], 25, 25) assert cs == 5975 cs = rasterio_9_checksum(data[25 * 25:2 * 25 * 25], 25, 25) assert cs == 6248 assert tab[0] == pytest.approx(1.0, abs=1e-5) ds = None # Test Band.ReadRaster on a RGBA with parts fully opaque, and fully transparent and with huge upscaling ds = gdal.Open('data/stefan_full_rgba.png') tab = [0, None] data = ds.GetRasterBand(1).ReadRaster(buf_xsize=162 * 16, buf_ysize=150 * 16, resample_alg=gdal.GRIORA_Cubic, callback=rasterio_9_progress_callback, callback_data=tab) assert data is not None cs = rasterio_9_checksum(data, 162 * 16, 150 * 16) assert cs == 30836 assert tab[0] == pytest.approx(1.0, abs=1e-5) ############################################################################### # Test error when getting a block def test_rasterio_10(): ds = gdal.Open('data/byte_truncated.tif') gdal.PushErrorHandler() data = ds.GetRasterBand(1).ReadRaster() gdal.PopErrorHandler() assert data is None # Change buffer type gdal.PushErrorHandler() data = ds.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_Int16) gdal.PopErrorHandler() assert data is None # Resampling case gdal.PushErrorHandler() data = ds.GetRasterBand(1).ReadRaster(buf_xsize=10, buf_ysize=10) gdal.PopErrorHandler() assert data is None ############################################################################### # Test cubic resampling and nbits def test_rasterio_11(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() mem_ds = gdal.GetDriverByName('MEM').Create('', 4, 3) mem_ds.GetRasterBand(1).WriteArray(numpy.array([[80, 125, 125, 80], [80, 125, 125, 80], [80, 125, 125, 80]])) # A bit dummy mem_ds.GetRasterBand(1).SetMetadataItem('NBITS', '8', 'IMAGE_STRUCTURE') ar = mem_ds.GetRasterBand(1).ReadAsArray(0, 0, 4, 3, 8, 3, resample_alg=gdal.GRIORA_Cubic) assert ar.max() == 129 # NBITS=7 mem_ds.GetRasterBand(1).SetMetadataItem('NBITS', '7', 'IMAGE_STRUCTURE') ar = mem_ds.GetRasterBand(1).ReadAsArray(0, 0, 4, 3, 8, 3, resample_alg=gdal.GRIORA_Cubic) # Would overshoot to 129 if NBITS was ignored assert ar.max() == 127 ############################################################################### # Test cubic resampling on dataset RasterIO with an alpha channel def rasterio_12_progress_callback(pct, message, user_data): if pct < user_data[0]: print('Got %f, last pct was %f' % (pct, user_data[0])) return 0 user_data[0] = pct return 1 # 1 to continue, 0 to stop def test_rasterio_12(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() mem_ds = gdal.GetDriverByName('MEM').Create('', 4, 3, 4) for i in range(3): mem_ds.GetRasterBand(i + 1).SetColorInterpretation(gdal.GCI_GrayIndex) mem_ds.GetRasterBand(4).SetColorInterpretation(gdal.GCI_AlphaBand) for i in range(4): mem_ds.GetRasterBand(i + 1).WriteArray(numpy.array([[0, 0, 0, 0], [0, 255, 0, 0], [0, 0, 0, 0]])) tab = [0] ar_ds = mem_ds.ReadAsArray(0, 0, 4, 3, buf_xsize=8, buf_ysize=3, resample_alg=gdal.GRIORA_Cubic, callback=rasterio_12_progress_callback, callback_data=tab) assert tab[0] == 1.0 ar_ds2 = mem_ds.ReadAsArray(0, 0, 4, 3, buf_xsize=8, buf_ysize=3, resample_alg=gdal.GRIORA_Cubic) assert numpy.array_equal(ar_ds, ar_ds2) ar_bands = [mem_ds.GetRasterBand(i + 1).ReadAsArray(0, 0, 4, 3, buf_xsize=8, buf_ysize=3, resample_alg=gdal.GRIORA_Cubic) for i in range(4)] # Results of band or dataset RasterIO should be the same for i in range(4): assert numpy.array_equal(ar_ds[i], ar_bands[i]) # First, second and third band should have identical content assert numpy.array_equal(ar_ds[0], ar_ds[1]) # Alpha band should be different assert not numpy.array_equal(ar_ds[0], ar_ds[3]) ############################################################################### # Test cubic resampling with masking def test_rasterio_13(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() for dt in [gdal.GDT_Byte, gdal.GDT_UInt16, gdal.GDT_UInt32]: mem_ds = gdal.GetDriverByName('MEM').Create('', 4, 3, 1, dt) mem_ds.GetRasterBand(1).SetNoDataValue(0) mem_ds.GetRasterBand(1).WriteArray(numpy.array([[0, 0, 0, 0], [0, 255, 0, 0], [0, 0, 0, 0]])) ar_ds = mem_ds.ReadAsArray(0, 0, 4, 3, buf_xsize=8, buf_ysize=3, resample_alg=gdal.GRIORA_Cubic) expected_ar = numpy.array([[0, 0, 0, 0, 0, 0, 0, 0], [0, 255, 255, 255, 255, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) assert numpy.array_equal(ar_ds, expected_ar), dt ############################################################################### # Test average downsampling by a factor of 2 on exact boundaries def test_rasterio_14(): gdal.FileFromMemBuffer('/vsimem/rasterio_14.asc', """ncols 6 nrows 6 xllcorner 0 yllcorner 0 cellsize 0 0 0 100 0 0 0 0 100 0 0 0 100 0 0 0 0 100 0 100 0 100 0 0 0 0 100 0 100 0 0 0 0 0 0 0 100""") ds = gdal.Translate('/vsimem/rasterio_14_out.asc', '/vsimem/rasterio_14.asc', options='-of AAIGRID -r average -outsize 50% 50%') cs = ds.GetRasterBand(1).Checksum() assert cs == 110, ds.ReadAsArray() gdal.Unlink('/vsimem/rasterio_14.asc') gdal.Unlink('/vsimem/rasterio_14_out.asc') ds = gdal.GetDriverByName('MEM').Create('', 1000000, 1) ds.GetRasterBand(1).WriteRaster(ds.RasterXSize - 1, 0, 1, 1, struct.pack('B' * 1, 100)) data = ds.ReadRaster(buf_xsize=int(ds.RasterXSize / 2), buf_ysize=1, resample_alg=gdal.GRIORA_Average) data = struct.unpack('B' * int(ds.RasterXSize / 2), data) assert data[-1:][0] == 50 data = ds.ReadRaster(ds.RasterXSize - 2, 0, 2, 1, buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Average) data = struct.unpack('B' * 1, data) assert data[0] == 50 ds = gdal.GetDriverByName('MEM').Create('', 1, 1000000) ds.GetRasterBand(1).WriteRaster(0, ds.RasterYSize - 1, 1, 1, struct.pack('B' * 1, 100)) data = ds.ReadRaster(buf_xsize=1, buf_ysize=int(ds.RasterYSize / 2), resample_alg=gdal.GRIORA_Average) data = struct.unpack('B' * int(ds.RasterYSize / 2), data) assert data[-1:][0] == 50 data = ds.ReadRaster(0, ds.RasterYSize - 2, 1, 2, buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Average) data = struct.unpack('B' * 1, data) assert data[0] == 50 ############################################################################### # Test average downsampling by a non-integer factor def test_rasterio_average_4by4_to_3by3(): gdal.FileFromMemBuffer('/vsimem/test_rasterio_average_4by4_to_3by3.asc', """ncols 4 nrows 4 xllcorner 0 yllcorner 0 cellsize 1 1.0 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16""") ds = gdal.Translate('', '/vsimem/test_rasterio_average_4by4_to_3by3.asc', options='-ot Float32 -f MEM -r average -outsize 3 3') data = ds.GetRasterBand(1).ReadRaster() assert struct.unpack('f' * 9, data) == (2.25, 7.25, 12.25, 3.5, 8.5, 13.5, 4.75, 9.75, 14.75) gdal.Unlink('/vsimem/test_rasterio_average_4by4_to_3by3.asc') ############################################################################### # Test average oversampling by an integer factor (should behave like nearest) def test_rasterio_15(): gdal.FileFromMemBuffer('/vsimem/rasterio_15.asc', """ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 0 0 100 100 100""") ds = gdal.Translate('/vsimem/rasterio_15_out.asc', '/vsimem/rasterio_15.asc', options='-of AAIGRID -outsize 200% 200%') data_ref = ds.GetRasterBand(1).ReadRaster() ds = None ds = gdal.Translate('/vsimem/rasterio_15_out.asc', '/vsimem/rasterio_15.asc', options='-of AAIGRID -r average -outsize 200% 200%') data = ds.GetRasterBand(1).ReadRaster() cs = ds.GetRasterBand(1).Checksum() assert data == data_ref and cs == 134, ds.ReadAsArray() gdal.Unlink('/vsimem/rasterio_15.asc') gdal.Unlink('/vsimem/rasterio_15_out.asc') ############################################################################### # Test mode downsampling by a factor of 2 on exact boundaries def test_rasterio_16(): gdal.FileFromMemBuffer('/vsimem/rasterio_16.asc', """ncols 6 nrows 6 xllcorner 0 yllcorner 0 cellsize 0 0 0 0 0 0 0 2 100 0 0 0 0 100 100 0 0 0 0 0 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0""") ds = gdal.Translate('/vsimem/rasterio_16_out.asc', '/vsimem/rasterio_16.asc', options='-of AAIGRID -r mode -outsize 50% 50%') cs = ds.GetRasterBand(1).Checksum() assert cs == 15, ds.ReadAsArray() gdal.Unlink('/vsimem/rasterio_16.asc') gdal.Unlink('/vsimem/rasterio_16_out.asc') ############################################################################### def test_rasterio_nodata(): try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() ndv = 123 btype = [ gdal.GDT_Byte, gdal.GDT_Int16, gdal.GDT_Int32, gdal.GDT_Float32, gdal.GDT_Float64 ] ### create a MEM dataset for src_type in btype: mem_ds = gdal.GetDriverByName('MEM').Create('', 10, 9, 1, src_type) mem_ds.GetRasterBand(1).SetNoDataValue(ndv) mem_ds.GetRasterBand(1).Fill(ndv) for dst_type in btype: if ( dst_type > src_type ): ### read to a buffer of a wider type (and resample) data = mem_ds.GetRasterBand(1).ReadAsArray(0, 0, 10, 9, 4, 3, resample_alg=gdal.GRIORA_Bilinear, buf_type=dst_type) assert int(data[0,0]) == ndv, 'did not read expected band data via ReadAsArray() - src type -> dst type: ' + str( src_type ) + ' -> ' + str( dst_type ) ############################################################################### def test_rasterio_lanczos_nodata(): ds = gdal.Open('data/rasterio_lanczos_nodata.tif') data = ds.GetRasterBand(1).ReadRaster(buf_xsize=9, buf_ysize=9, resample_alg=gdal.GRIORA_Lanczos) data_ar = struct.unpack('H' * 9 * 9, data) expected_ar = (0, 0, 0, 22380, 22417, 22509, 22525, 22505, 22518, 0, 0, 0, 22415, 22432, 22433, 22541, 22541, 22568, 0, 0, 0, 22355, 22378, 22429, 22468, 22562, 22591, 0, 0, 0, 22271, 22343, 22384, 22526, 22565, 22699, 0, 0, 0, 22404, 22345, 22537, 22590, 22582, 22645, 0, 0, 0, 22461, 22484, 22464, 22495, 22633, 22638, 0, 0, 0, 22481, 22466, 22500, 22534, 22536, 22571, 0, 0, 0, 22460, 22460, 22547, 22538, 22456, 22572, 0, 0, 0, 0, 22504, 22496, 22564, 22563, 22610) assert data_ar == expected_ar ############################################################################### def test_rasterio_resampled_value_is_nodata(): gdal.FileFromMemBuffer('/vsimem/in.asc', """ncols 4 nrows 4 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 nodata_value 0 -1.1 -1.1 1.1 1.1 -1.1 -1.1 1.1 1.1 -1.1 -1.1 1.1 1.1 -1.1 -1.1 1.1 1.1""") ds = gdal.Open('/vsimem/in.asc') data = ds.GetRasterBand(1).ReadRaster(buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Lanczos) data_ar = struct.unpack('f' * 1, data) expected_ar = (1.1754943508222875e-38, ) assert data_ar == expected_ar data = ds.GetRasterBand(1).ReadRaster(buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Average) data_ar = struct.unpack('f' * 1, data) expected_ar = (1.1754943508222875e-38, ) assert data_ar == expected_ar gdal.Unlink('/vsimem/in.asc') gdal.FileFromMemBuffer('/vsimem/in.asc', """ncols 4 nrows 4 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 nodata_value 0 -1 -1 1 1 -1 -1 1 1 -1 -1 1 1 -1 -1 1 1""") ds = gdal.Open('/vsimem/in.asc') data = ds.GetRasterBand(1).ReadRaster(buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Lanczos) data_ar = struct.unpack('I' * 1, data) expected_ar = (1, ) assert data_ar == expected_ar data = ds.GetRasterBand(1).ReadRaster(buf_xsize=1, buf_ysize=1, resample_alg=gdal.GRIORA_Average) data_ar = struct.unpack('I' * 1, data) expected_ar = (1, ) assert data_ar == expected_ar gdal.Unlink('/vsimem/in.asc') def test_rasterio_dataset_readarray_cint16(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() mem_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 2, gdal.GDT_CInt16) mem_ds.GetRasterBand(1).WriteArray(numpy.array([[1 + 2j]])) mem_ds.GetRasterBand(2).WriteArray(numpy.array([[3 + 4j]])) got = mem_ds.GetRasterBand(1).ReadAsArray() assert got == numpy.array([[1 + 2j]]) got = mem_ds.ReadAsArray() assert got[0] == numpy.array([[1 + 2j]]) assert got[1] == numpy.array([[3 + 4j]]) def test_rasterio_rasterband_write_on_readonly(): ds = gdal.Open('data/byte.tif') band = ds.GetRasterBand(1) with gdaltest.error_handler(): err = band.WriteRaster(0, 0, 20, 20, band.ReadRaster()) assert err != 0 def test_rasterio_dataset_write_on_readonly(): ds = gdal.Open('data/byte.tif') with gdaltest.error_handler(): err = ds.WriteRaster(0, 0, 20, 20, ds.ReadRaster()) assert err != 0 @pytest.mark.parametrize('resample_alg', [-1, 8]) def test_rasterio_dataset_invalid_resample_alg(resample_alg): mem_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) with gdaltest.error_handler(): with pytest.raises(Exception): assert mem_ds.ReadRaster(buf_xsize=1, buf_ysize=1, resample_alg=resample_alg) is None with pytest.raises(Exception): assert mem_ds.GetRasterBand(1).ReadRaster(buf_xsize=1, buf_ysize=1, resample_alg=resample_alg) is None with pytest.raises(Exception): assert mem_ds.ReadAsArray(buf_xsize=1, buf_ysize=1, resample_alg=resample_alg) is None with pytest.raises(Exception): assert mem_ds.GetRasterBand(1).ReadAsArray(buf_xsize=1, buf_ysize=1, resample_alg=resample_alg) is None ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/misc.py��������������������������������������������������������������������0000775�0001750�0001750�00000066435�13701057757�015334� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: misc.py 9f3ba0fba4ba1a30afda8462a6642c840251c73e 2019-08-08 13:36:00 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Various test of GDAL core. # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2009-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal import gdaltest import pytest ############################################################################### # Test that the constructor of GDALDataset() behaves well with a big number of # opened/created datasets def test_misc_1(): tab_ds = [None] * 5000 drv = gdal.GetDriverByName('MEM') for i, _ in enumerate(tab_ds): name = 'mem_%d' % i tab_ds[i] = drv.Create(name, 1, 1, 1) assert tab_ds[i] is not None ############################################################################### # Test that OpenShared() works as expected by opening a big number of times # the same dataset with it. If it did not work, that would exhaust the system # limit of maximum file descriptors opened at the same time def test_misc_2(): tab_ds = [None for i in range(5000)] for i, _ in enumerate(tab_ds): tab_ds[i] = gdal.OpenShared('data/byte.tif') assert tab_ds[i] is not None ############################################################################### # Test OpenShared() with a dataset whose filename != description (#2797) def test_misc_3(): with gdaltest.error_handler(): ds = gdal.OpenShared('../gdrivers/data/small16.aux') ds.GetRasterBand(1).Checksum() cache_size = gdal.GetCacheUsed() with gdaltest.error_handler(): ds2 = gdal.OpenShared('../gdrivers/data/small16.aux') ds2.GetRasterBand(1).Checksum() cache_size2 = gdal.GetCacheUsed() if cache_size != cache_size2: print("--> OpenShared didn't work as expected") ds = None ds2 = None ############################################################################### # Test Create() with invalid arguments def test_misc_4(): gdal.PushErrorHandler('CPLQuietErrorHandler') # Test a few invalid argument drv = gdal.GetDriverByName('GTiff') drv.Create('tmp/foo', 0, 100, 1) drv.Create('tmp/foo', 100, 1, 1) drv.Create('tmp/foo', 100, 100, -1) drv.Delete('tmp/foo') gdal.PopErrorHandler() ############################################################################### def get_filename(drv, dirname): filename = '%s/foo' % dirname if drv.ShortName == 'GTX': filename += '.gtx' elif drv.ShortName == 'RST': filename += '.rst' elif drv.ShortName == 'SAGA': filename += '.sdat' elif drv.ShortName == 'ADRG': filename = '%s/ABCDEF01.GEN' % dirname elif drv.ShortName == 'SRTMHGT': filename = '%s/N48E002.HGT' % dirname elif drv.ShortName == 'ECW': filename += '.ecw' elif drv.ShortName == 'KMLSUPEROVERLAY': filename += '.kmz' elif drv.ShortName == 'RRASTER': filename += '.grd' return filename ############################################################################### # Test Create() with various band numbers (including 0) and datatype def _misc_5_internal(drv, datatype, nBands): dirname = 'tmp/tmp/tmp_%s_%d_%s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) # print('drv = %s, nBands = %d, datatype = %s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype))) try: os.mkdir(dirname) except OSError: try: os.stat(dirname) # Hum the directory already exists... Not expected, but let's try to go on except OSError: pytest.fail( 'Cannot create %s for drv = %s, nBands = %d, datatype = %s' % (dirname, drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) ) filename = get_filename(drv, dirname) ds = drv.Create(filename, 100, 100, nBands, datatype) if ds is not None and not (drv.ShortName == 'GPKG' and nBands == 0): set_gt = (2, 1.0 / 10, 0, 49, 0, -1.0 / 10) ds.SetGeoTransform(set_gt) ds.SetProjection('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994328]]') # PNM and MFF have no SetGeoTransform() method implemented if drv.ShortName not in ['PNM', 'MFF', 'NULL']: got_gt = ds.GetGeoTransform() for i in range(6): assert got_gt[i] == pytest.approx(set_gt[i], abs=1e-10), \ 'Did not get expected GT for drv = %s, nBands = %d, datatype = %s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) # if ds.RasterCount > 0: # ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.Open(filename) if ds is None: # reason = 'Cannot reopen %s for drv = %s, nBands = %d, datatype = %s' % (dirname, drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) # gdaltest.post_reason(reason) # TODO: Why not return -1? pass # else: # if ds.RasterCount > 0: # print ds.GetRasterBand(1).Checksum() ds = None try: shutil.rmtree(dirname) except OSError: pytest.fail( 'Cannot remove %s for drv = %s, nBands = %d, datatype = %s' % (dirname, drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) ) def test_misc_5(): gdal.PushErrorHandler('CPLQuietErrorHandler') try: shutil.rmtree('tmp/tmp') except OSError: pass try: os.mkdir('tmp/tmp') except OSError: try: os.stat('tmp/tmp') # Hum the directory already exists... Not expected, but let's try to go on except OSError: pytest.fail('Cannot create tmp/tmp') # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') # Test Create() with various band numbers, including 0 for i in range(gdal.GetDriverCount()): drv = gdal.GetDriver(i) md = drv.GetMetadata() if drv.ShortName == 'PDF': # PDF Create() is vector-only continue if drv.ShortName == 'MBTiles': # MBTiles only support some precise resolutions continue if 'DCAP_CREATE' in md and 'DCAP_RASTER' in md: datatype = gdal.GDT_Byte for nBands in range(6): _misc_5_internal(drv, datatype, nBands) for nBands in [1, 3]: for datatype in (gdal.GDT_UInt16, gdal.GDT_Int16, gdal.GDT_UInt32, gdal.GDT_Int32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CInt16, gdal.GDT_CInt32, gdal.GDT_CFloat32, gdal.GDT_CFloat64): _misc_5_internal(drv, datatype, nBands) gdal.PopErrorHandler() ############################################################################### class misc_6_interrupt_callback_class(object): def __init__(self): pass def cbk(self, pct, message, user_data): # pylint: disable=unused-argument return pct <= 0.5 ############################################################################### # Test CreateCopy() with a source dataset with various band numbers (including 0) and datatype def misc_6_internal(datatype, nBands, setDriversDone): ds = gdal.GetDriverByName('MEM').Create('', 10, 10, nBands, datatype) if nBands > 0: ds.GetRasterBand(1).Fill(255) ds.SetGeoTransform([2, 1.0 / 10, 0, 49, 0, -1.0 / 10]) ds.SetProjection('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994328]]') ds.SetMetadata(['a']) for i in range(gdal.GetDriverCount()): drv = gdal.GetDriver(i) md = drv.GetMetadata() if ('DCAP_CREATECOPY' in md or 'DCAP_CREATE' in md) and 'DCAP_RASTER' in md: # print ('drv = %s, nBands = %d, datatype = %s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype))) skip = False # FIXME: A few cases that crashes and should be investigated if drv.ShortName == 'JPEG2000': if (nBands == 2 or nBands >= 5) or \ not (datatype == gdal.GDT_Byte or datatype == gdal.GDT_Int16 or datatype == gdal.GDT_UInt16): skip = True if skip is False: dirname = 'tmp/tmp/tmp_%s_%d_%s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) try: os.mkdir(dirname) except OSError: try: os.stat(dirname) # Hum the directory already exists... Not expected, but let's try to go on except OSError: reason = 'Cannot create %s before drv = %s, nBands = %d, datatype = %s' % (dirname, drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) pytest.fail(reason) filename = get_filename(drv, dirname) dst_ds = drv.CreateCopy(filename, ds) has_succeeded = dst_ds is not None dst_ds = None size = 0 stat = gdal.VSIStatL(filename) if stat is not None: size = stat.size try: shutil.rmtree(dirname) except OSError: reason = 'Cannot remove %s after drv = %s, nBands = %d, datatype = %s' % (dirname, drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) pytest.fail(reason) if has_succeeded and drv.ShortName not in setDriversDone and nBands > 0: setDriversDone.add(drv.ShortName) # The first list of drivers fail to detect short writing # The second one is because they are verbose in stderr if 'DCAP_VIRTUALIO' in md and size != 0 and \ drv.ShortName not in ['JPEG2000', 'KMLSUPEROVERLAY', 'HF2', 'ZMap', 'DDS'] and \ drv.ShortName not in ['GIF', 'JP2ECW', 'JP2Lura']: for j in range(10): truncated_size = (size * j) / 10 vsimem_filename = ('/vsimem/test_truncate/||maxlength=%d||' % truncated_size) + get_filename(drv, '')[1:] # print('drv = %s, nBands = %d, datatype = %s, truncated_size = %d' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype), truncated_size)) dst_ds = drv.CreateCopy(vsimem_filename, ds) error_detected = False if dst_ds is None: error_detected = True else: gdal.ErrorReset() dst_ds = None if gdal.GetLastErrorMsg() != '': error_detected = True if not error_detected: msg = 'write error not decteded with with drv = %s, nBands = %d, datatype = %s, truncated_size = %d' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype), truncated_size) print(msg) gdaltest.post_reason(msg) fl = gdal.ReadDirRecursive('/vsimem/test_truncate') if fl is not None: for myf in fl: gdal.Unlink('/vsimem/test_truncate/' + myf) fl = gdal.ReadDirRecursive('/vsimem/test_truncate') if fl is not None: print(fl) if drv.ShortName not in ['ECW', 'JP2ECW', 'VRT', 'XPM', 'JPEG2000', 'FIT', 'RST', 'INGR', 'USGSDEM', 'KMLSUPEROVERLAY', 'GMT']: dst_ds = drv.CreateCopy(filename, ds, callback=misc_6_interrupt_callback_class().cbk) if dst_ds is not None: dst_ds = None try: shutil.rmtree(dirname) except OSError: pass pytest.fail('interruption did not work with drv = %s, nBands = %d, datatype = %s' % (drv.ShortName, nBands, gdal.GetDataTypeName(datatype))) dst_ds = None try: shutil.rmtree(dirname) except OSError: pass try: os.mkdir(dirname) except OSError: reason = 'Cannot create %s before drv = %s, nBands = %d, datatype = %s' % (dirname, drv.ShortName, nBands, gdal.GetDataTypeName(datatype)) pytest.fail(reason) ds = None def test_misc_6(): gdal.PushErrorHandler('CPLQuietErrorHandler') try: shutil.rmtree('tmp/tmp') except OSError: pass try: os.mkdir('tmp/tmp') except OSError: try: os.stat('tmp/tmp') # Hum the directory already exists... Not expected, but let's try to go on except OSError: pytest.fail('Cannot create tmp/tmp') # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') datatype = gdal.GDT_Byte setDriversDone = set() for nBands in range(6): ret = misc_6_internal(datatype, nBands, setDriversDone) if ret != 'success': gdal.PopErrorHandler() return ret nBands = 1 for datatype in (gdal.GDT_UInt16, gdal.GDT_Int16, gdal.GDT_UInt32, gdal.GDT_Int32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CInt16, gdal.GDT_CInt32, gdal.GDT_CFloat32, gdal.GDT_CFloat64): ret = misc_6_internal(datatype, nBands, setDriversDone) if ret != 'success': gdal.PopErrorHandler() return ret gdal.PopErrorHandler() ############################################################################### # Test gdal.InvGeoTransform() def test_misc_7(): gt = (10, 0.1, 0, 20, 0, -1.0) res = gdal.InvGeoTransform(gt) expected_inv_gt = (-100.0, 10.0, 0.0, 20.0, 0.0, -1.0) for i in range(6): assert res[i] == pytest.approx(expected_inv_gt[i], abs=1e-6), res gt = (10, 1, 1, 20, 2, 2) res = gdal.InvGeoTransform(gt) assert not res gt = (10, 1e10, 1e10, 20, 2e10, 2e10) res = gdal.InvGeoTransform(gt) assert not res gt = (10, 1e-10, 1e-10, 20, 2e-10, 2e-10) res = gdal.InvGeoTransform(gt) assert not res # Test fix for #1615 gt = (-2, 1e-8, 1e-9, 52, 1e-9, -1e-8) res = gdal.InvGeoTransform(gt) expected_inv_gt = (-316831683.16831684, 99009900.990099, 9900990.099009901, 5168316831.683168, 9900990.099009901, -99009900.990099) for i in range(6): assert res[i] == pytest.approx(expected_inv_gt[i], abs=1e-6), res res2 = gdal.InvGeoTransform(res) for i in range(6): assert res2[i] == pytest.approx(gt[i], abs=1e-6), res2 ############################################################################### # Test gdal.ApplyGeoTransform() def test_misc_8(): try: gdal.ApplyGeoTransform except AttributeError: pytest.skip() gt = (10, 0.1, 0, 20, 0, -1.0) res = gdal.ApplyGeoTransform(gt, 10, 1) assert res == [11.0, 19.0] ############################################################################### # Test setting and retrieving > 2 GB values for GDAL max cache (#3689) def test_misc_9(): old_val = gdal.GetCacheMax() gdal.SetCacheMax(3000000000) ret_val = gdal.GetCacheMax() gdal.SetCacheMax(old_val) assert ret_val == 3000000000, 'did not get expected value' ############################################################################### # Test VSIBufferedReaderHandle (fix done in r21358) def test_misc_10(): try: os.remove('data/byte.tif.gz.properties') except OSError: pass f = gdal.VSIFOpenL('/vsigzip/./data/byte.tif.gz', 'rb') gdal.VSIFReadL(1, 1, f) gdal.VSIFSeekL(f, 0, 2) gdal.VSIFSeekL(f, 0, 0) data = gdal.VSIFReadL(1, 4, f) gdal.VSIFCloseL(f) import struct ar = struct.unpack('B' * 4, data) assert ar == (73, 73, 42, 0) try: os.remove('data/byte.tif.gz.properties') except OSError: pass ############################################################################### # Test that we can open a symlink whose pointed filename isn't a real # file, but a filename that GDAL recognizes def test_misc_11(): if not gdaltest.support_symlink(): pytest.skip() gdal.Unlink('tmp/symlink.tif') os.symlink('GTIFF_DIR:1:data/byte.tif', 'tmp/symlink.tif') ds = gdal.Open('tmp/symlink.tif') if ds is None: os.remove('tmp/symlink.tif') pytest.fail() desc = ds.GetDescription() ds = None os.remove('tmp/symlink.tif') assert desc == 'GTIFF_DIR:1:data/byte.tif', 'did not get expected description' ############################################################################### # Test CreateCopy() with a target filename in a non-existing dir def test_misc_12(): if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would crash') import test_cli_utilities gdal_translate_path = test_cli_utilities.get_gdal_translate_path() for i in range(gdal.GetDriverCount()): drv = gdal.GetDriver(i) md = drv.GetMetadata() if ('DCAP_CREATECOPY' in md or 'DCAP_CREATE' in md) and 'DCAP_RASTER' in md: nbands = 1 if drv.ShortName == 'WEBP' or drv.ShortName == 'ADRG': nbands = 3 datatype = gdal.GDT_Byte if drv.ShortName == 'BT' or drv.ShortName == 'BLX': datatype = gdal.GDT_Int16 elif drv.ShortName == 'GTX' or drv.ShortName == 'NTv2' or drv.ShortName == 'Leveller': datatype = gdal.GDT_Float32 size = 1201 if drv.ShortName == 'BLX': size = 128 src_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/misc_12_src.tif', size, size, nbands, datatype) set_gt = (2, 1.0 / size, 0, 49, 0, -1.0 / size) src_ds.SetGeoTransform(set_gt) src_ds.SetProjection('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.01745329251994328]]') # Test to detect crashes gdal.PushErrorHandler('CPLQuietErrorHandler') ds = drv.CreateCopy('/nonexistingpath' + get_filename(drv, ''), src_ds) gdal.PopErrorHandler() if ds is None and gdal.GetLastErrorMsg() == '': gdal.Unlink('/vsimem/misc_12_src.tif') pytest.fail('CreateCopy() into non existing dir fails without error message for driver %s' % drv.ShortName) ds = None if gdal_translate_path is not None: # Test to detect memleaks ds = gdal.GetDriverByName('VRT').CreateCopy('tmp/misc_12.vrt', src_ds) (out, _) = gdaltest.runexternal_out_and_err(gdal_translate_path + ' -of ' + drv.ShortName + ' tmp/misc_12.vrt /nonexistingpath/' + get_filename(drv, ''), check_memleak=False) del ds gdal.Unlink('tmp/misc_12.vrt') # If DEBUG_VSIMALLOC_STATS is defined, this is an easy way # to catch some memory leaks if out.find('VSIMalloc + VSICalloc - VSIFree') != -1 and \ out.find('VSIMalloc + VSICalloc - VSIFree : 0') == -1: if drv.ShortName == 'Rasterlite' and out.find('VSIMalloc + VSICalloc - VSIFree : 1') != -1: pass else: print('memleak detected for driver %s' % drv.ShortName) src_ds = None gdal.Unlink('/vsimem/misc_12_src.tif') ############################################################################### # Test CreateCopy() with incompatible driver types (#5912) def test_misc_13(): # Raster-only -> vector-only ds = gdal.Open('data/byte.tif') gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('ESRI Shapefile').CreateCopy('/vsimem/out.shp', ds) gdal.PopErrorHandler() assert out_ds is None # Raster-only -> vector-only ds = gdal.OpenEx('../ogr/data/poly.shp', gdal.OF_VECTOR) gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/out.tif', ds) gdal.PopErrorHandler() assert out_ds is None ############################################################################### # Test ConfigureLogging() def test_misc_14(): import collections import logging class MockLoggingHandler(logging.Handler): def __init__(self, *args, **kwargs): super(MockLoggingHandler, self).__init__(*args, **kwargs) self.messages = collections.defaultdict(list) def emit(self, record): self.messages[record.levelname].append(record.getMessage()) logger = logging.getLogger('gdal_logging_test') logger.setLevel(logging.DEBUG) logger.propagate = False handler = MockLoggingHandler(level=logging.DEBUG) logger.addHandler(handler) prev_debug = gdal.GetConfigOption("CPL_DEBUG") try: gdal.ConfigurePythonLogging(logger_name='gdal_logging_test', enable_debug=True) assert gdal.GetConfigOption("CPL_DEBUG") == "ON", "should have enabled debug" gdal.Debug("test1", "debug1") gdal.Error(gdal.CE_Debug, gdal.CPLE_FileIO, "debug2") gdal.Error(gdal.CE_None, gdal.CPLE_AppDefined, "info1") gdal.Error(gdal.CE_Warning, gdal.CPLE_AssertionFailed, "warning1") gdal.Error(gdal.CE_Failure, 99999, "error1") expected = { 'DEBUG': ["test1: debug1", "FileIO: debug2"], 'INFO': ["AppDefined: info1"], 'WARNING': ["AssertionFailed: warning1"], 'ERROR': ["99999: error1"], } assert handler.messages == expected, "missing log messages" gdal.SetErrorHandler('CPLDefaultErrorHandler') handler.messages.clear() gdal.SetConfigOption('CPL_DEBUG', "OFF") gdal.ConfigurePythonLogging(logger_name='gdal_logging_test') assert gdal.GetConfigOption("CPL_DEBUG") == "OFF", \ "shouldn't have enabled debug" # these get suppressed by CPL_DEBUG gdal.Debug("test1", "debug3") # these don't gdal.Error(gdal.CE_Debug, gdal.CPLE_None, "debug4") assert handler.messages['DEBUG'] == ['debug4'], "unexpected log messages" finally: gdal.SetErrorHandler('CPLDefaultErrorHandler') gdal.SetConfigOption('CPL_DEBUG', prev_debug) logger.removeHandler(handler) ############################################################################### # Test SetErrorHandler def test_misc_15(): messages0 = [] def handle0(ecls, ecode, emsg): messages0.append((ecls, ecode, emsg)) messages1 = [] def handle1(ecls, ecode, emsg): messages1.append((ecls, ecode, emsg)) prev_debug = gdal.GetConfigOption("CPL_DEBUG") try: gdal.SetErrorHandler(handle0) gdal.SetConfigOption('CPL_DEBUG', "ON") gdal.Debug('foo', 'bar') gdal.Error(gdal.CE_Debug, gdal.CPLE_FileIO, "debug2") gdal.Error(gdal.CE_None, gdal.CPLE_AppDefined, "info1") gdal.Error(gdal.CE_Warning, gdal.CPLE_AssertionFailed, "warning1") gdal.Error(gdal.CE_Failure, 99999, "error1") expected0 = [ (gdal.CE_Debug, 0, 'foo: bar'), (gdal.CE_Debug, gdal.CPLE_FileIO, "debug2"), (gdal.CE_None, gdal.CPLE_AppDefined, "info1"), (gdal.CE_Warning, gdal.CPLE_AssertionFailed, "warning1"), (gdal.CE_Failure, 99999, "error1"), ] assert expected0 == messages0, "SetErrorHandler: mismatched log messages" messages0[:] = [] # Check Push gdal.PushErrorHandler(handle1) gdal.SetConfigOption("CPL_DEBUG", "OFF") gdal.Error(gdal.CE_Debug, gdal.CPLE_FileIO, "debug2") gdal.Error(gdal.CE_None, gdal.CPLE_AppDefined, "info1") gdal.Error(gdal.CE_Warning, gdal.CPLE_AssertionFailed, "warning1") gdal.Error(gdal.CE_Failure, 99999, "error1") assert len(messages0) == 0, "PushErrorHandler: unexpected log messages" assert len(messages1) == 4, "PushErrorHandler: missing log messages" # and pop restores original behaviour gdal.PopErrorHandler() messages1[:] = [] gdal.Error(gdal.CE_Debug, gdal.CPLE_FileIO, "debug2") gdal.Error(gdal.CE_None, gdal.CPLE_AppDefined, "info1") gdal.Error(gdal.CE_Warning, gdal.CPLE_AssertionFailed, "warning1") gdal.Error(gdal.CE_Failure, 99999, "error1") assert len(messages0) == 4, "PopErrorHandler: missing log messages" assert len(messages1) == 0, "PopErrorHandler: unexpected log messages" finally: gdal.SetErrorHandler('CPLDefaultErrorHandler') gdal.SetConfigOption('CPL_DEBUG', prev_debug) ############################################################################### def test_misc_cleanup(): try: shutil.rmtree('tmp/tmp') except OSError: pass �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/thread_test.py�������������������������������������������������������������0000775�0001750�0001750�00000005362�13701057757�016677� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: thread_test.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test Python threading # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2016, Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import threading from osgeo import gdal import pytest def my_error_handler(err_type, err_no, err_msg): # pylint: disable=unused-argument pass def thread_test_1_worker(args_dict): for i in range(1000): ds = gdal.Open('data/byte.tif') if (i % 2) == 0: if ds.GetRasterBand(1).Checksum() != 4672: args_dict['ret'] = False else: ds.GetRasterBand(1).ReadAsArray() for i in range(1000): gdal.PushErrorHandler(my_error_handler) ds = gdal.Open('i_dont_exist') gdal.PopErrorHandler() def test_thread_test_1(): try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() threads = [] args_array = [] for i in range(4): args_dict = {'ret': True} t = threading.Thread(target=thread_test_1_worker, args=(args_dict,)) args_array.append(args_dict) threads.append(t) t.start() ret = 'success' for i in range(4): threads[i].join() if not args_array[i]: ret = 'fail' return ret ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/hfa_write.py���������������������������������������������������������������0000775�0001750�0001750�00000033301�13701057757�016333� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: hfa_write.py 0d3fc0a10e1ccec8161b82a7506bfbb4ed964959 2020-01-06 22:17:34 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for Erdas Imagine (.img) HFA driver. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import pytest from osgeo import gdal import gdaltest ############################################################################### # test that we can write a small file with a custom layer name. def test_hfa_write_desc(): src_ds = gdal.Open('data/byte.tif') new_ds = gdal.GetDriverByName('HFA').CreateCopy('tmp/test_desc.img', src_ds) bnd = new_ds.GetRasterBand(1) bnd.SetDescription('CustomBandName') bnd = None src_ds = None new_ds = None new_ds = gdal.Open('tmp/test_desc.img') bnd = new_ds.GetRasterBand(1) assert bnd.GetDescription() == 'CustomBandName', 'Didnt get custom band name.' bnd = None new_ds = None gdal.GetDriverByName('HFA').Delete('tmp/test_desc.img') ############################################################################### # test writing 4 bit files. def test_hfa_write_4bit(): drv = gdal.GetDriverByName('HFA') src_ds = gdal.Open('data/byte.tif') ds = drv.CreateCopy('tmp/4bit.img', src_ds, options=['NBITS=1']) ds = None src_ds = None ds = gdal.Open('tmp/4bit.img') cs = ds.GetRasterBand(1).Checksum() assert cs == 252, 'Got wrong checksum on 4bit image.' ds = None drv.Delete('tmp/4bit.img') ############################################################################### # test writing 4 bit files compressed. def test_hfa_write_4bit_compressed(): drv = gdal.GetDriverByName('HFA') src_ds = gdal.Open('data/byte.tif') ds = drv.CreateCopy('tmp/4bitc.img', src_ds, options=['NBITS=1', 'COMPRESSED=YES']) ds = None src_ds = None ds = gdal.Open('tmp/4bitc.img') cs = ds.GetRasterBand(1).Checksum() assert cs == 252, 'Got wrong checksum on 4bit image.' ds = None drv.Delete('tmp/4bitc.img') ############################################################################### # Test creating a file with a nodata value, and fetching otherwise unread # blocks and verifying they are the nodata value. (#2427) def test_hfa_write_nd_invalid(): drv = gdal.GetDriverByName('HFA') ds = drv.Create('tmp/ndinvalid.img', 512, 512, 1, gdal.GDT_Byte, []) ds.GetRasterBand(1).SetNoDataValue(200) ds = None ds = gdal.Open('tmp/ndinvalid.img') cs = ds.GetRasterBand(1).Checksum() assert cs == 29754, 'Got wrong checksum on invalid image.' ds = None drv.Delete('tmp/ndinvalid.img') ############################################################################### # Test updating .rrd overviews in place (#2524). def test_hfa_update_overviews(): shutil.copyfile('data/small_ov.img', 'tmp/small.img') shutil.copyfile('data/small_ov.rrd', 'tmp/small.rrd') ds = gdal.Open('tmp/small.img', gdal.GA_Update) result = ds.BuildOverviews(overviewlist=[2]) assert result == 0, 'BuildOverviews() failed.' ds = None ############################################################################### # Test cleaning external overviews. def test_hfa_clean_external_overviews(): ds = gdal.Open('tmp/small.img', gdal.GA_Update) result = ds.BuildOverviews(overviewlist=[]) assert result == 0, 'BuildOverviews() failed.' assert ds.GetRasterBand(1).GetOverviewCount() == 0, 'Overviews still exist.' ds = None ds = gdal.Open('tmp/small.img') assert ds.GetRasterBand(1).GetOverviewCount() == 0, 'Overviews still exist.' ds = None assert not os.path.exists('tmp/small.rrd') gdal.GetDriverByName('HFA').Delete('tmp/small.img') ############################################################################### # Test writing high frequency data (#2525). def test_hfa_bug_2525(): drv = gdal.GetDriverByName('HFA') ds = drv.Create('tmp/test_hfa.img', 64, 64, 1, gdal.GDT_UInt16, options=['COMPRESSED=YES']) import struct data = struct.pack('H' * 64, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535, 0, 65535) for i in range(64): ds.GetRasterBand(1).WriteRaster(0, i, 64, 1, data) ds = None drv.Delete('tmp/test_hfa.img') ############################################################################### # Test building external overviews with HFA_USE_RRD=YES def test_hfa_use_rrd(): shutil.copyfile('data/small_ov.img', 'tmp/small.img') old_value = gdal.GetConfigOption('HFA_USE_RRD', 'NO') gdal.SetConfigOption('HFA_USE_RRD', 'YES') ds = gdal.Open('tmp/small.img', gdal.GA_Update) result = ds.BuildOverviews(overviewlist=[2]) gdal.SetConfigOption('HFA_USE_RRD', old_value) assert result == 0, 'BuildOverviews() failed.' ds = None try: os.stat('tmp/small.rrd') except OSError: pytest.fail('small.rrd not present.') ds = gdal.Open('tmp/small.img') assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 26148, \ 'Unexpected checksum.' ds = None gdal.GetDriverByName('HFA').Delete('tmp/small.img') ############################################################################### # Test fix for #4831 def test_hfa_update_existing_aux_overviews(): gdal.SetConfigOption('USE_RRD', 'YES') ds = gdal.GetDriverByName('BMP').Create('tmp/hfa_update_existing_aux_overviews.bmp', 100, 100, 1) ds.GetRasterBand(1).Fill(255) ds = None # Create overviews ds = gdal.Open('tmp/hfa_update_existing_aux_overviews.bmp') ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None # Save overviews checksum ds = gdal.Open('tmp/hfa_update_existing_aux_overviews.bmp') cs_ovr0 = ds.GetRasterBand(1).GetOverview(0).Checksum() cs_ovr1 = ds.GetRasterBand(1).GetOverview(1).Checksum() # and regenerate them ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None ds = gdal.Open('tmp/hfa_update_existing_aux_overviews.bmp') # Check overviews checksum new_cs_ovr0 = ds.GetRasterBand(1).GetOverview(0).Checksum() new_cs_ovr1 = ds.GetRasterBand(1).GetOverview(1).Checksum() if cs_ovr0 != new_cs_ovr0: gdal.SetConfigOption('USE_RRD', None) pytest.fail() if cs_ovr1 != new_cs_ovr1: gdal.SetConfigOption('USE_RRD', None) pytest.fail() # and regenerate them twice in a row ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None ds = gdal.Open('tmp/hfa_update_existing_aux_overviews.bmp') # Check overviews checksum new_cs_ovr0 = ds.GetRasterBand(1).GetOverview(0).Checksum() new_cs_ovr1 = ds.GetRasterBand(1).GetOverview(1).Checksum() if cs_ovr0 != new_cs_ovr0: gdal.SetConfigOption('USE_RRD', None) pytest.fail() if cs_ovr1 != new_cs_ovr1: gdal.SetConfigOption('USE_RRD', None) pytest.fail() # and regenerate them with an extra overview level ds.BuildOverviews('NEAR', overviewlist=[8]) ds = None ds = gdal.Open('tmp/hfa_update_existing_aux_overviews.bmp') # Check overviews checksum new_cs_ovr0 = ds.GetRasterBand(1).GetOverview(0).Checksum() new_cs_ovr1 = ds.GetRasterBand(1).GetOverview(1).Checksum() if cs_ovr0 != new_cs_ovr0: gdal.SetConfigOption('USE_RRD', None) pytest.fail() if cs_ovr1 != new_cs_ovr1: gdal.SetConfigOption('USE_RRD', None) pytest.fail() ds = None gdal.GetDriverByName('BMP').Delete('tmp/hfa_update_existing_aux_overviews.bmp') gdal.SetConfigOption('USE_RRD', None) ############################################################################### # Test writing invalid WKT (#5258) def test_hfa_write_invalid_wkt(): # No GEOGCS ds = gdal.GetDriverByName('HFA').Create('/vsimem/hfa_write_invalid_wkt.img', 1, 1) ds.SetProjection("""PROJCS["NAD27 / UTM zone 11N", PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]]""") ds = None # No DATUM in GEOGCS ds = gdal.GetDriverByName('HFA').Create('/vsimem/hfa_write_invalid_wkt.img', 1, 1) ds.SetProjection("""PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]]""") ds = None # No SPHEROID in DATUM ds = gdal.GetDriverByName('HFA').Create('/vsimem/hfa_write_invalid_wkt.img', 1, 1) ds.SetProjection("""PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]]""") ds = None gdal.GetDriverByName('HFA').Delete('/vsimem/hfa_write_invalid_wkt.img') ############################################################################### # Get the driver, and verify a few things about it. init_list = [ ('byte.tif', 4672), ('int16.tif', 4672), ('uint16.tif', 4672), ('int32.tif', 4672), ('uint32.tif', 4672), ('float32.tif', 4672), ('float64.tif', 4672), ('cfloat32.tif', 5028), ('cfloat64.tif', 5028), ('utmsmall.tif', 50054)] # full set of tests for normal mode. @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.parametrize( 'testfunction', [ 'testCreateCopy', 'testCreate', 'testSetGeoTransform', 'testSetMetadata', ] ) @pytest.mark.require_driver('HFA') def test_hfa_create_normal(filename, checksum, testfunction): ut = gdaltest.GDALTest('HFA', filename, 1, checksum) getattr(ut, testfunction)() # Just a few for spill file, and compressed support. short_list = [ ('byte.tif', 4672), ('uint16.tif', 4672), ('float64.tif', 4672)] @pytest.mark.parametrize( 'filename,checksum', short_list, ids=[tup[0].split('.')[0] for tup in short_list], ) @pytest.mark.parametrize( 'testfunction', [ 'testCreateCopy', 'testCreate', ] ) @pytest.mark.require_driver('HFA') def test_hfa_create_spill(filename, checksum, testfunction): ut = gdaltest.GDALTest('HFA', filename, 1, checksum, options=['USE_SPILL=YES']) getattr(ut, testfunction)() @pytest.mark.parametrize( 'filename,checksum', short_list, ids=[tup[0].split('.')[0] for tup in short_list], ) @pytest.mark.parametrize( 'testfunction', [ # 'testCreateCopy', 'testCreate', ] ) @pytest.mark.require_driver('HFA') def test_hfa_create_compress(filename, checksum, testfunction): ut = gdaltest.GDALTest('HFA', filename, 1, checksum, options=['COMPRESS=YES']) getattr(ut, testfunction)() def test_hfa_create_compress_big_block(): src_ds = gdal.GetDriverByName('MEM').Create('/vsimem/big_block.img', 128, 128, 1, gdal.GDT_UInt32) src_ds.GetRasterBand(1).Fill(4 * 1000 * 1000 * 1000) src_ds.GetRasterBand(1).WriteRaster(0,0,1,1,b'\0') gdal.GetDriverByName('HFA').CreateCopy('/vsimem/big_block.img', src_ds, options=['COMPRESS=YES', 'BLOCKSIZE=128']) ds = gdal.Open('/vsimem/big_block.img') got_data = ds.GetRasterBand(1).ReadRaster() ds = None gdal.Unlink('/vsimem/big_block.img') assert got_data == src_ds.GetRasterBand(1).ReadRaster() �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vrt_read.py����������������������������������������������������������������0000775�0001750�0001750�00000134063�13701057757�016200� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vrt_read.py 4f2cf2cad9710299b9f4655810a593d47c551735 2020-04-19 19:51:11 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic read support for a all datatypes from a VRT file. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2008-2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import struct import pytest import gdaltest from osgeo import gdal import test_cli_utilities ############################################################################### # When imported build a list of units based on the files available. init_list = [ ('byte.vrt', 4672), ('int16.vrt', 4672), ('uint16.vrt', 4672), ('int32.vrt', 4672), ('uint32.vrt', 4672), ('float32.vrt', 4672), ('float64.vrt', 4672), ('cint16.vrt', 5028), ('cint32.vrt', 5028), ('cfloat32.vrt', 5028), ('cfloat64.vrt', 5028), ('msubwinbyte.vrt', 2699), ('utmsmall.vrt', 50054), ('byte_nearest_50pct.vrt', 1192), ('byte_averaged_50pct.vrt', 1152), ('byte_nearest_200pct.vrt', 18784), ('byte_averaged_200pct.vrt', 18784) ] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('VRT') def test_vrt_open(filename, checksum): ut = gdaltest.GDALTest('VRT', filename, 1, checksum) ut.testOpen() ############################################################################### # The VRT references a non existing TIF file def test_vrt_read_1(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('data/idontexist.vrt') gdal.PopErrorHandler() if ds is None: return pytest.fail() ############################################################################### # The VRT references a non existing TIF file, but using the proxy pool dataset API (#2837) def test_vrt_read_2(): ds = gdal.Open('data/idontexist2.vrt') assert ds is not None gdal.PushErrorHandler('CPLQuietErrorHandler') cs = ds.GetRasterBand(1).Checksum() gdal.PopErrorHandler() assert cs == 0 ds.GetMetadata() ds.GetRasterBand(1).GetMetadata() ds.GetGCPs() ds = None ############################################################################### # Test init of band data in case of cascaded VRT (ticket #2867) def test_vrt_read_3(): driver_tif = gdal.GetDriverByName("GTIFF") output_dst = driver_tif.Create('tmp/test_mosaic1.tif', 100, 100, 3, gdal.GDT_Byte) output_dst.GetRasterBand(1).Fill(255) output_dst = None output_dst = driver_tif.Create('tmp/test_mosaic2.tif', 100, 100, 3, gdal.GDT_Byte) output_dst.GetRasterBand(1).Fill(127) output_dst = None ds = gdal.Open('data/test_mosaic.vrt') # A simple Checksum() cannot detect if the fix works or not as # Checksum() reads line per line, and we must use IRasterIO() on multi-line request data = ds.GetRasterBand(1).ReadRaster(90, 0, 20, 100) got = struct.unpack('B' * 20 * 100, data) for i in range(100): assert got[i * 20 + 9] == 255, ('at line %d, did not find 255' % i) ds = None driver_tif.Delete('tmp/test_mosaic1.tif') driver_tif.Delete('tmp/test_mosaic2.tif') ############################################################################### # Test complex source with complex data (#3977) def test_vrt_read_4(): try: import numpy as np except ImportError: pytest.skip() data = np.zeros((1, 1), np.complex64) data[0, 0] = 1. + 3.j drv = gdal.GetDriverByName('GTiff') ds = drv.Create("/vsimem/test.tif", 1, 1, 1, gdal.GDT_CFloat32) ds.GetRasterBand(1).WriteArray(data) ds = None complex_xml = '''<VRTDataset rasterXSize="1" rasterYSize="1"> <VRTRasterBand dataType="CFloat32" band="1"> <ComplexSource> <SourceFilename relativeToVRT="1">/vsimem/test.tif</SourceFilename> <SourceBand>1</SourceBand> <ScaleOffset>3</ScaleOffset> <ScaleRatio>2</ScaleRatio> </ComplexSource> </VRTRasterBand> </VRTDataset> ''' ds = gdal.Open(complex_xml) scaleddata = ds.GetRasterBand(1).ReadAsArray() ds = None gdal.Unlink("/vsimem/test.tif") if scaleddata[0, 0].real != 5.0 or scaleddata[0, 0].imag != 9.0: print('scaleddata[0, 0]: %f %f' % (scaleddata[0, 0].real, scaleddata[0, 0].imag)) pytest.fail('did not get expected value') ############################################################################### # Test serializing and deserializing of various band metadata def test_vrt_read_5(): src_ds = gdal.Open('data/testserialization.asc') ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrt_read_5.vrt', src_ds) src_ds = None ds = None ds = gdal.Open('/vsimem/vrt_read_5.vrt') gcps = ds.GetGCPs() assert len(gcps) == 2 and ds.GetGCPCount() == 2 assert ds.GetGCPProjection().find("WGS 84") != -1 ds.SetGCPs(ds.GetGCPs(), ds.GetGCPProjection()) gcps = ds.GetGCPs() assert len(gcps) == 2 and ds.GetGCPCount() == 2 assert ds.GetGCPProjection().find("WGS 84") != -1 band = ds.GetRasterBand(1) assert band.GetDescription() == 'MyDescription' assert band.GetUnitType() == 'MyUnit' assert band.GetOffset() == 1 assert band.GetScale() == 2 assert band.GetRasterColorInterpretation() == gdal.GCI_PaletteIndex assert band.GetCategoryNames() == ['Cat1', 'Cat2'] ct = band.GetColorTable() assert ct.GetColorEntry(0) == (0, 0, 0, 255) assert ct.GetColorEntry(1) == (1, 1, 1, 255) assert band.GetMaximum() == 0 assert band.GetMinimum() == 2 assert band.GetMetadata() == {'STATISTICS_MEAN': '1', 'STATISTICS_MINIMUM': '2', 'STATISTICS_MAXIMUM': '0', 'STATISTICS_STDDEV': '3'} ds = None gdal.Unlink('/vsimem/vrt_read_5.vrt') ############################################################################### # Test GetMinimum() and GetMaximum() def test_vrt_read_6(): gdal.Unlink('data/byte.tif.aux.xml') src_ds = gdal.Open('data/byte.tif') mem_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrt_read_6.tif', src_ds) vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrt_read_6.vrt', mem_ds) assert vrt_ds.GetRasterBand(1).GetMinimum() is None, 'got bad minimum value' assert vrt_ds.GetRasterBand(1).GetMaximum() is None, 'got bad maximum value' # Now compute source statistics mem_ds.GetRasterBand(1).ComputeStatistics(False) assert vrt_ds.GetRasterBand(1).GetMinimum() == 74, 'got bad minimum value' assert vrt_ds.GetRasterBand(1).GetMaximum() == 255, 'got bad maximum value' mem_ds = None vrt_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/vrt_read_6.tif') gdal.GetDriverByName('VRT').Delete('/vsimem/vrt_read_6.vrt') ############################################################################### # Test GDALOpen() anti-recursion mechanism def test_vrt_read_7(): filename = "/vsimem/vrt_read_7.vrt" content = """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">%s</SourceFilename> <SourceBand>1</SourceBand> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" % filename gdal.FileFromMemBuffer(filename, content) gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open(filename) gdal.PopErrorHandler() error_msg = gdal.GetLastErrorMsg() gdal.Unlink(filename) assert ds is None assert error_msg != '' ############################################################################### # Test ComputeRasterMinMax() def test_vrt_read_8(): src_ds = gdal.Open('data/byte.tif') mem_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrt_read_8.tif', src_ds) vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrt_read_8.vrt', mem_ds) vrt_minmax = vrt_ds.GetRasterBand(1).ComputeRasterMinMax() mem_minmax = mem_ds.GetRasterBand(1).ComputeRasterMinMax() mem_ds = None vrt_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/vrt_read_8.tif') gdal.GetDriverByName('VRT').Delete('/vsimem/vrt_read_8.vrt') assert vrt_minmax == mem_minmax ############################################################################### # Test ComputeStatistics() def test_vrt_read_9(): src_ds = gdal.Open('data/byte.tif') mem_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrt_read_9.tif', src_ds) vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrt_read_9.vrt', mem_ds) vrt_stats = vrt_ds.GetRasterBand(1).ComputeStatistics(False) mem_stats = mem_ds.GetRasterBand(1).ComputeStatistics(False) mem_ds = None vrt_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/vrt_read_9.tif') gdal.GetDriverByName('VRT').Delete('/vsimem/vrt_read_9.vrt') assert vrt_stats == mem_stats ############################################################################### # Test GetHistogram() & GetDefaultHistogram() def test_vrt_read_10(): src_ds = gdal.Open('data/byte.tif') mem_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrt_read_10.tif', src_ds) vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrt_read_10.vrt', mem_ds) vrt_hist = vrt_ds.GetRasterBand(1).GetHistogram() mem_hist = mem_ds.GetRasterBand(1).GetHistogram() mem_ds = None vrt_ds = None f = gdal.VSIFOpenL('/vsimem/vrt_read_10.vrt', 'rb') content = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert vrt_hist == mem_hist assert '<Histograms>' in content # Single source optimization for i in range(2): gdal.FileFromMemBuffer('/vsimem/vrt_read_10.vrt', """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">vrt_read_10.tif</SourceFilename> </SimpleSource> </VRTRasterBand> </VRTDataset>""") ds = gdal.Open('/vsimem/vrt_read_10.vrt') if i == 0: ds.GetRasterBand(1).GetDefaultHistogram() else: ds.GetRasterBand(1).GetHistogram() ds = None f = gdal.VSIFOpenL('/vsimem/vrt_read_10.vrt', 'rb') content = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert '<Histograms>' in content # Two sources general case for i in range(2): gdal.FileFromMemBuffer('/vsimem/vrt_read_10.vrt', """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">vrt_read_10.tif</SourceFilename> </SimpleSource> <SimpleSource> <SourceFilename relativeToVRT="1">vrt_read_10.tif</SourceFilename> </SimpleSource> </VRTRasterBand> </VRTDataset>""") ds = gdal.Open('/vsimem/vrt_read_10.vrt') if i == 0: ds.GetRasterBand(1).GetDefaultHistogram() else: ds.GetRasterBand(1).GetHistogram() ds = None f = gdal.VSIFOpenL('/vsimem/vrt_read_10.vrt', 'rb') content = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert '<Histograms>' in content gdal.GetDriverByName('GTiff').Delete('/vsimem/vrt_read_10.tif') gdal.GetDriverByName('VRT').Delete('/vsimem/vrt_read_10.vrt') ############################################################################### # Test resolving files from a symlinked vrt using relativeToVRT with an absolute symlink def test_vrt_read_11(): if not gdaltest.support_symlink(): pytest.skip() try: os.remove('tmp/byte.vrt') print('Removed tmp/byte.vrt. Was not supposed to exist...') except OSError: pass os.symlink(os.path.join(os.getcwd(), 'data/byte.vrt'), 'tmp/byte.vrt') ds = gdal.Open('tmp/byte.vrt') os.remove('tmp/byte.vrt') assert ds is not None ############################################################################### # Test resolving files from a symlinked vrt using relativeToVRT # with a relative symlink pointing to a relative symlink def test_vrt_read_12(): if not gdaltest.support_symlink(): pytest.skip() try: os.remove('tmp/byte.vrt') print('Removed tmp/byte.vrt. Was not supposed to exist...') except OSError: pass os.symlink('../data/byte.vrt', 'tmp/byte.vrt') ds = gdal.Open('tmp/byte.vrt') os.remove('tmp/byte.vrt') assert ds is not None ############################################################################### # Test resolving files from a symlinked vrt using relativeToVRT with a relative symlink def test_vrt_read_13(): if not gdaltest.support_symlink(): pytest.skip() try: os.remove('tmp/byte.vrt') print('Removed tmp/byte.vrt. Was not supposed to exist...') except OSError: pass try: os.remove('tmp/other_byte.vrt') print('Removed tmp/other_byte.vrt. Was not supposed to exist...') except OSError: pass os.symlink('../data/byte.vrt', 'tmp/byte.vrt') os.symlink('../tmp/byte.vrt', 'tmp/other_byte.vrt') ds = gdal.Open('tmp/other_byte.vrt') os.remove('tmp/other_byte.vrt') os.remove('tmp/byte.vrt') assert ds is not None ############################################################################### # Test ComputeStatistics() when the VRT is a subwindow of the source dataset (#5468) def test_vrt_read_14(): src_ds = gdal.Open('data/byte.tif') mem_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrt_read_14.tif', src_ds) mem_ds.FlushCache() # hum this should not be necessary ideally vrt_ds = gdal.Open("""<VRTDataset rasterXSize="4" rasterYSize="4"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">/vsimem/vrt_read_14.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="2" yOff="2" xSize="4" ySize="4" /> <DstRect xOff="0" yOff="0" xSize="4" ySize="4" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") vrt_stats = vrt_ds.GetRasterBand(1).ComputeStatistics(False) mem_ds = None vrt_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/vrt_read_14.tif') assert vrt_stats[0] == 115.0 and vrt_stats[1] == 173.0 ############################################################################### # Test RasterIO() with resampling on SimpleSource def test_vrt_read_15(): vrt_ds = gdal.Open("""<VRTDataset rasterXSize="9" rasterYSize="9"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="9" ySize="9" /> </SimpleSource> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="9" ySize="9" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") cs = vrt_ds.GetRasterBand(1).Checksum() assert cs == 1044 ############################################################################### # Test RasterIO() with resampling on ComplexSource def test_vrt_read_16(): vrt_ds = gdal.Open("""<VRTDataset rasterXSize="9" rasterYSize="9"> <VRTRasterBand dataType="Byte" band="1"> <ComplexSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="9" ySize="9" /> </ComplexSource> <ComplexSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="9" ySize="9" /> </ComplexSource> </VRTRasterBand> </VRTDataset>""") cs = vrt_ds.GetRasterBand(1).Checksum() assert cs == 1044 ############################################################################### # Test RasterIO() with resampling on AveragedSource def test_vrt_read_17(): vrt_ds = gdal.Open("""<VRTDataset rasterXSize="9" rasterYSize="9"> <VRTRasterBand dataType="Byte" band="1"> <AveragedSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="9" ySize="9" /> </AveragedSource> </VRTRasterBand> </VRTDataset>""") # Note: AveragedSource with resampling does not give consistent results # depending on the RasterIO() request cs = vrt_ds.GetRasterBand(1).Checksum() assert cs == 847 ############################################################################### # Test that relative path is correctly VRT-in-VRT def test_vrt_read_18(): vrt_ds = gdal.Open('data/vrtinvrt.vrt') cs = vrt_ds.GetRasterBand(1).Checksum() assert cs == 4672 ############################################################################### # Test shared="0" def test_vrt_read_19(): vrt_ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <AveragedSource> <SourceFilename relativeToVRT="0" shared="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> </AveragedSource> </VRTRasterBand> </VRTDataset>""") vrt2_ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <AveragedSource> <SourceFilename relativeToVRT="0" shared="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </AveragedSource> </VRTRasterBand> </VRTDataset>""") cs = vrt_ds.GetRasterBand(1).Checksum() assert cs == 4672 cs = vrt2_ds.GetRasterBand(1).Checksum() assert cs == 4672 ############################################################################### # Test 2 level of VRT with shared="0" def test_vrt_read_20(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() shutil.copy('data/byte.tif', 'tmp') for i in range(3): open('tmp/byte1_%d.vrt' % (i + 1), 'wt').write("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") open('tmp/byte2.vrt', 'wt').write("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="1">byte1_1.vrt</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> <SimpleSource> <SourceFilename relativeToVRT="1">byte1_2.vrt</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> <SimpleSource> <SourceFilename relativeToVRT="1">byte1_3.vrt</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -checksum tmp/byte2.vrt --config VRT_SHARED_SOURCE 0 --config GDAL_MAX_DATASET_POOL_SIZE 3') assert 'Checksum=4672' in ret for f in ['tmp/byte.tif', 'tmp/byte1_1.vrt', 'tmp/byte1_2.vrt', 'tmp/byte1_3.vrt', 'tmp/byte2.vrt']: os.unlink(f) ############################################################################### # Test implicit virtual overviews def test_vrt_read_21(): ds = gdal.Open('data/byte.tif') data = ds.ReadRaster(0, 0, 20, 20, 400, 400) ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/byte.tif', 400, 400) ds.WriteRaster(0, 0, 400, 400, data) ds.BuildOverviews('NEAR', [2]) ds = None gdal.FileFromMemBuffer('/vsimem/vrt_read_21.vrt', """<VRTDataset rasterXSize="800" rasterYSize="800"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename>/vsimem/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="400" RasterYSize="400" DataType="Byte" BlockXSize="400" BlockYSize="1" /> <SrcRect xOff="100" yOff="100" xSize="200" ySize="250" /> <DstRect xOff="300" yOff="400" xSize="200" ySize="250" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") ds = gdal.Open('/vsimem/vrt_read_21.vrt') assert ds.GetRasterBand(1).GetOverviewCount() == 1 data_ds_one_band = ds.ReadRaster(0, 0, 800, 800, 400, 400) ds = None gdal.FileFromMemBuffer('/vsimem/vrt_read_21.vrt', """<VRTDataset rasterXSize="800" rasterYSize="800"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename>/vsimem/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="400" RasterYSize="400" DataType="Byte" BlockXSize="400" BlockYSize="1" /> <SrcRect xOff="100" yOff="100" xSize="200" ySize="250" /> <DstRect xOff="300" yOff="400" xSize="200" ySize="250" /> </SimpleSource> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <ComplexSource> <SourceFilename>/vsimem/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="400" RasterYSize="400" DataType="Byte" BlockXSize="400" BlockYSize="1" /> <SrcRect xOff="100" yOff="100" xSize="200" ySize="250" /> <DstRect xOff="300" yOff="400" xSize="200" ySize="250" /> <ScaleOffset>10</ScaleOffset> </ComplexSource> </VRTRasterBand> </VRTDataset>""") ds = gdal.Open('/vsimem/vrt_read_21.vrt') assert ds.GetRasterBand(1).GetOverviewCount() == 1 ds = gdal.Open('/vsimem/vrt_read_21.vrt') ovr_band = ds.GetRasterBand(1).GetOverview(-1) assert ovr_band is None ovr_band = ds.GetRasterBand(1).GetOverview(1) assert ovr_band is None ovr_band = ds.GetRasterBand(1).GetOverview(0) assert ovr_band is not None cs = ovr_band.Checksum() cs2 = ds.GetRasterBand(2).GetOverview(0).Checksum() data = ds.ReadRaster(0, 0, 800, 800, 400, 400) assert data == data_ds_one_band + ds.GetRasterBand(2).ReadRaster(0, 0, 800, 800, 400, 400) mem_ds = gdal.GetDriverByName('MEM').Create('', 400, 400, 2) mem_ds.WriteRaster(0, 0, 400, 400, data) ref_cs = mem_ds.GetRasterBand(1).Checksum() ref_cs2 = mem_ds.GetRasterBand(2).Checksum() mem_ds = None assert cs == ref_cs assert cs2 == ref_cs2 ds.BuildOverviews('NEAR', [2]) expected_cs = ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs2 = ds.GetRasterBand(2).GetOverview(0).Checksum() ds = None assert cs == expected_cs assert cs2 == expected_cs2 gdal.Unlink('/vsimem/vrt_read_21.vrt') gdal.Unlink('/vsimem/vrt_read_21.vrt.ovr') gdal.Unlink('/vsimem/byte.tif') ############################################################################### # Test that we honour NBITS with SimpleSource and ComplexSource def test_vrt_read_22(): ds = gdal.Open('data/byte.tif') data = ds.ReadRaster() ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/byte.tif', 20, 20) ds.WriteRaster(0, 0, 20, 20, data) ds.GetRasterBand(1).ComputeStatistics(False) ds = None ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <Metadata domain="IMAGE_STRUCTURE"> <MDI key="NBITS">6</MDI> </Metadata> <SimpleSource> <SourceFilename>/vsimem/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> </VRTRasterBand> </VRTDataset>""") assert ds.GetRasterBand(1).GetMinimum() == 63 assert ds.GetRasterBand(1).GetMaximum() == 63 assert ds.GetRasterBand(1).ComputeRasterMinMax() == (63, 63) assert ds.GetRasterBand(1).ComputeStatistics(False) == [63.0, 63.0, 63.0, 0.0] data = ds.ReadRaster() got = struct.unpack('B' * 20 * 20, data) assert got[0] == 63 ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <Metadata domain="IMAGE_STRUCTURE"> <MDI key="NBITS">6</MDI> </Metadata> <ComplexSource> <SourceFilename>/vsimem/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </ComplexSource> </VRTRasterBand> </VRTDataset>""") assert ds.GetRasterBand(1).GetMinimum() == 63 assert ds.GetRasterBand(1).GetMaximum() == 63 assert ds.GetRasterBand(1).ComputeRasterMinMax() == (63, 63) assert ds.GetRasterBand(1).ComputeStatistics(False) == [63.0, 63.0, 63.0, 0.0] ds = gdal.Open("""<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <Metadata domain="IMAGE_STRUCTURE"> <MDI key="NBITS">6</MDI> </Metadata> <ComplexSource> <SourceFilename>/vsimem/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <ScaleOffset>10</ScaleOffset> </ComplexSource> </VRTRasterBand> </VRTDataset>""") assert ds.GetRasterBand(1).GetMinimum() is None assert ds.GetRasterBand(1).GetMaximum() is None assert ds.GetRasterBand(1).ComputeRasterMinMax() == (63, 63) assert ds.GetRasterBand(1).ComputeStatistics(False) == [63.0, 63.0, 63.0, 0.0] gdal.Unlink('/vsimem/byte.tif') gdal.Unlink('/vsimem/byte.tif.aux.xml') ############################################################################### # Test non-nearest resampling on a VRT exposing a nodata value but with # an underlying dataset without nodata def test_vrt_read_23(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() mem_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrt_read_23.tif', 2, 1) mem_ds.GetRasterBand(1).WriteArray(numpy.array([[0, 10]])) mem_ds = None ds = gdal.Open("""<VRTDataset rasterXSize="2" rasterYSize="1"> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>0</NoDataValue> <SimpleSource> <SourceFilename>/vsimem/vrt_read_23.tif</SourceFilename> </SimpleSource> </VRTRasterBand> </VRTDataset>""") got_ar = ds.GetRasterBand(1).ReadAsArray(0, 0, 2, 1, 4, 1, resample_alg=gdal.GRIORA_Bilinear) assert list(got_ar[0]) == [0, 10, 10, 10] assert ds.ReadRaster(0, 0, 2, 1, 4, 1, resample_alg=gdal.GRIORA_Bilinear) == ds.GetRasterBand(1).ReadRaster(0, 0, 2, 1, 4, 1, resample_alg=gdal.GRIORA_Bilinear) ds = None gdal.Unlink('/vsimem/vrt_read_23.tif') # Same but with nodata set on source band too mem_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrt_read_23.tif', 2, 1) mem_ds.GetRasterBand(1).SetNoDataValue(0) mem_ds.GetRasterBand(1).WriteArray(numpy.array([[0, 10]])) mem_ds = None ds = gdal.Open("""<VRTDataset rasterXSize="2" rasterYSize="1"> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>0</NoDataValue> <SimpleSource> <SourceFilename>/vsimem/vrt_read_23.tif</SourceFilename> </SimpleSource> </VRTRasterBand> </VRTDataset>""") got_ar = ds.GetRasterBand(1).ReadAsArray(0, 0, 2, 1, 4, 1, resample_alg=gdal.GRIORA_Bilinear) assert list(got_ar[0]) == [0, 10, 10, 10] assert ds.ReadRaster(0, 0, 2, 1, 4, 1, resample_alg=gdal.GRIORA_Bilinear) == ds.GetRasterBand(1).ReadRaster(0, 0, 2, 1, 4, 1, resample_alg=gdal.GRIORA_Bilinear) ds = None gdal.Unlink('/vsimem/vrt_read_23.tif') ############################################################################### # Test floating point rounding issues when the VRT does a zoom-in def test_vrt_read_24(): ds = gdal.Open('data/zoom_in.vrt') data = ds.ReadRaster(34, 5, 66, 87) ds = None ds = gdal.GetDriverByName('MEM').Create('', 66, 87) ds.WriteRaster(0, 0, 66, 87, data) cs = ds.GetRasterBand(1).Checksum() ds = None # Please do not change the expected checksum without checking that # the result image has no vertical black line in the middle assert cs == 46612 ds = None ############################################################################### # Test GetDataCoverageStatus() def test_vrt_read_25(): import ogrtest if not ogrtest.have_geos(): pytest.skip() ds = gdal.Open("""<VRTDataset rasterXSize="2000" rasterYSize="200"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="1000" yOff="30" xSize="10" ySize="20" /> </SimpleSource> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="1010" yOff="30" xSize="10" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(0, 0, 20, 20) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA and pct == 100.0 (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(1005, 35, 10, 10) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA and pct == 100.0 (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(100, 100, 20, 20) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY and pct == 0.0 (flags, pct) = ds.GetRasterBand(1).GetDataCoverageStatus(10, 10, 20, 20) assert flags == gdal.GDAL_DATA_COVERAGE_STATUS_DATA | gdal.GDAL_DATA_COVERAGE_STATUS_EMPTY and pct == 25.0 ############################################################################### # Test consistency of RasterIO() with resampling, that is extracting different # sub-windows give consistent results def test_vrt_read_26(): vrt_ds = gdal.Open("""<VRTDataset rasterXSize="22" rasterYSize="22"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="22" ySize="22" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""") full_data = vrt_ds.GetRasterBand(1).ReadRaster(0, 0, 22, 22) full_data = struct.unpack('B' * 22 * 22, full_data) partial_data = vrt_ds.GetRasterBand(1).ReadRaster(1, 1, 1, 1) partial_data = struct.unpack('B' * 1 * 1, partial_data) assert partial_data[0] == full_data[22 + 1] ############################################################################### # Test fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1553 def test_vrt_read_27(): gdal.Open('data/empty_gcplist.vrt') ############################################################################### # Test fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1551 def test_vrt_read_28(): with gdaltest.error_handler(): ds = gdal.Open('<VRTDataset rasterXSize="1 "rasterYSize="1"><VRTRasterBand band="-2147483648"><SimpleSource></SimpleSource></VRTRasterBand></VRTDataset>') assert ds is None ############################################################################### # Check VRT source sharing and non-sharing situations (#6949) def test_vrt_read_29(): f = open('data/byte.tif') lst_before = sorted(gdaltest.get_opened_files()) if not lst_before: pytest.skip() f.close() gdal.Translate('tmp/vrt_read_29.tif', 'data/byte.tif') vrt_text = """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename>tmp/vrt_read_29.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <SimpleSource> <SourceFilename>tmp/vrt_read_29.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" lst_before = sorted(gdaltest.get_opened_files()) ds = gdal.Open(vrt_text) # Just after opening, we shouldn't have read the source lst = sorted(gdaltest.get_opened_files()) assert lst == lst_before # Check that the 2 bands share the same source handle ds.GetRasterBand(1).Checksum() lst = sorted(gdaltest.get_opened_files()) assert len(lst) == len(lst_before) + 1 ds.GetRasterBand(2).Checksum() lst = sorted(gdaltest.get_opened_files()) assert len(lst) == len(lst_before) + 1 # Open a second VRT dataset handle ds2 = gdal.Open(vrt_text) # Check that it consumes an extra handle ds2.GetRasterBand(1).Checksum() lst = sorted(gdaltest.get_opened_files()) assert len(lst) == len(lst_before) + 2 gdal.Unlink('tmp/vrt_read_29.tif') ############################################################################### # Check VRT reading with DatasetRasterIO def test_vrt_read_30(): ds = gdal.Open("""<VRTDataset rasterXSize="2" rasterYSize="2"> <VRTRasterBand dataType="Byte" band="1"> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> </VRTRasterBand> </VRTDataset>""") data = ds.ReadRaster(0, 0, 2, 2, 2, 2, buf_pixel_space=3, buf_line_space=2 * 3, buf_band_space=1) got = struct.unpack('B' * 2 * 2 * 3, data) for i in range(2 * 2 * 3): assert got[i] == 0 ds = None ############################################################################### # Check that we take into account intermediate data type demotion def test_vrt_read_31(): gdal.FileFromMemBuffer('/vsimem/in.asc', """ncols 2 nrows 2 xllcorner 0 yllcorner 0 dx 1 dy 1 -255 1 254 256""") ds = gdal.Translate('', '/vsimem/in.asc', outputType=gdal.GDT_Byte, format='VRT') data = ds.GetRasterBand(1).ReadRaster(0, 0, 2, 2, buf_type=gdal.GDT_Float32) got = struct.unpack('f' * 2 * 2, data) assert got == (0, 1, 254, 255) data = ds.ReadRaster(0, 0, 2, 2, buf_type=gdal.GDT_Float32) got = struct.unpack('f' * 2 * 2, data) assert got == (0, 1, 254, 255) ds = None gdal.Unlink('/vsimem/in.asc') ############################################################################### # Test reading a VRT where the NODATA & NoDataValue are slightly below the # minimum float value (https://github.com/OSGeo/gdal/issues/1071) def test_vrt_float32_with_nodata_slightly_below_float_min(): shutil.copyfile('data/minfloat.tif', 'tmp/minfloat.tif') shutil.copyfile('data/minfloat_nodata_slightly_out_of_float.vrt', 'tmp/minfloat_nodata_slightly_out_of_float.vrt') gdal.Unlink('tmp/minfloat_nodata_slightly_out_of_float.vrt.aux.xml') ds = gdal.Open('tmp/minfloat_nodata_slightly_out_of_float.vrt') nodata = ds.GetRasterBand(1).GetNoDataValue() stats = ds.GetRasterBand(1).ComputeStatistics(False) ds = None vrt_content = open('tmp/minfloat_nodata_slightly_out_of_float.vrt', 'rt').read() gdal.Unlink('tmp/minfloat.tif') gdal.Unlink('tmp/minfloat_nodata_slightly_out_of_float.vrt') # Check that the values were 'normalized' when regenerating the VRT assert '-3.402823466385289' not in vrt_content, \ 'did not get expected nodata in rewritten VRT' if nodata != -3.4028234663852886e+38: print("%.18g" % nodata) pytest.fail('did not get expected nodata') assert stats == [-3.0, 5.0, 1.0, 4.0], 'did not get expected stats' ############################################################################### # Fix issue raised in https://lists.osgeo.org/pipermail/gdal-dev/2018-December/049415.html def test_vrt_subpixel_offset(): ds = gdal.Open('data/vrt_subpixel_offset.vrt') cs = ds.GetRasterBand(1).Checksum() assert cs == 4849 ############################################################################### # Check bug fix of bug fix of # https://lists.osgeo.org/pipermail/gdal-dev/2018-December/049415.html def test_vrt_dstsize_larger_than_source(): ds = gdal.Open('data/dstsize_larger_than_source.vrt') cs = ds.GetRasterBand(1).Checksum() assert cs == 33273 def test_vrt_invalid_srcrect(): vrt_text = """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relative="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="-10" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" assert gdal.Open(vrt_text) is None def test_vrt_invalid_dstrect(): vrt_text = """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relative="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="1e400" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" assert gdal.Open(vrt_text) is None def test_vrt_no_explicit_dataAxisToSRSAxisMapping(): vrt_text = """<VRTDataset rasterXSize="20" rasterYSize="20"> <SRS>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]</SRS> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relative="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" ds = gdal.Open(vrt_text) assert ds.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [2,1] ds = None def test_vrt_explicit_dataAxisToSRSAxisMapping_1_2(): vrt_text = """<VRTDataset rasterXSize="20" rasterYSize="20"> <SRS dataAxisToSRSAxisMapping="1,2">GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]</SRS> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relative="1">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="20" RasterYSize="20" DataType="Byte" BlockXSize="20" BlockYSize="20" /> <SrcRect xOff="0" yOff="0" xSize="20" ySize="20" /> <DstRect xOff="0" yOff="0" xSize="20" ySize="20" /> </SimpleSource> </VRTRasterBand> </VRTDataset>""" ds = gdal.Open(vrt_text) assert ds.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [1,2] ds = None def test_vrt_shared_no_proxy_pool(): before = gdaltest.get_opened_files() vrt_text = """<VRTDataset rasterXSize="50" rasterYSize="50"> <VRTRasterBand dataType="Byte" band="1"> <ColorInterp>Red</ColorInterp> <SimpleSource> <SourceFilename>data/rgbsmall.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <ColorInterp>Green</ColorInterp> <SimpleSource> <SourceFilename>data/rgbsmall.tif</SourceFilename> <SourceBand>2</SourceBand> </SimpleSource> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> <ColorInterp>Blue</ColorInterp> <SimpleSource> <SourceFilename>data/rgbsmall.tif</SourceFilename> <SourceBand>3</SourceBand> </SimpleSource> </VRTRasterBand> </VRTDataset>""" ds = gdal.Open(vrt_text) assert ds assert ds.GetRasterBand(1).Checksum() == 21212 assert ds.GetRasterBand(2).Checksum() == 21053 assert ds.GetRasterBand(3).Checksum() == 21349 ds = None after = gdaltest.get_opened_files() if len(before) != len(after) and (gdaltest.is_travis_branch('trusty_clang') or gdaltest.is_travis_branch('trusty_32bit')): pytest.xfail('Mysterious failure on trusty_clang/trusty_32bit') assert len(before) == len(after) def test_vrt_shared_no_proxy_pool_error(): vrt_text = """<VRTDataset rasterXSize="50" rasterYSize="50"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename>data/byte.tif</SourceFilename> <SourceBand>10</SourceBand> </SimpleSource> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <SimpleSource> <SourceFilename>data/byte.tif</SourceFilename> <SourceBand>11</SourceBand> </SimpleSource> </VRTRasterBand> </VRTDataset>""" with gdaltest.error_handler(): ds = gdal.Open(vrt_text) assert not ds def test_vrt_protocol(): with gdaltest.error_handler(): assert not gdal.Open('vrt://') assert not gdal.Open('vrt://i_do_not_exist') assert not gdal.Open('vrt://i_do_not_exist?') ds = gdal.Open('vrt://data/byte.tif') assert ds.RasterCount == 1 assert ds.GetRasterBand(1).Checksum() == 4672 with gdaltest.error_handler(): assert not gdal.Open('vrt://data/byte.tif?foo=bar') assert not gdal.Open('vrt://data/byte.tif?bands=foo') assert not gdal.Open('vrt://data/byte.tif?bands=0') assert not gdal.Open('vrt://data/byte.tif?bands=2') ds = gdal.Open('vrt://data/byte.tif?bands=1,mask,1') assert ds.RasterCount == 3 assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetRasterBand(2).Checksum() == 4873 assert ds.GetRasterBand(3).Checksum() == 4672 def test_vrt_source_no_dstrect(): vrt_text = """<VRTDataset rasterXSize="20" rasterYSize="20"> <VRTRasterBand dataType="Byte" band="1"> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> </SimpleSource> </VRTRasterBand> </VRTDataset> """ filename = '/vsimem/out.tif' ds = gdal.Translate(filename, vrt_text) assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdal.Unlink(filename) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/overviewds.py��������������������������������������������������������������0000775�0001750�0001750�00000025037�13701057757�016567� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: overviewds.py 56dfaadcb7a4bb39320872cfe5901f35d403a329 2019-11-15 14:18:50 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GDALOverviewDataset # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2014 Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import os import shutil import struct from osgeo import gdal import pytest ############################################################################### # Error cases def test_overviewds_1(): ds = gdal.OpenEx('data/byte.tif', open_options=['OVERVIEW_LEVEL=-1']) assert ds is None ds = gdal.OpenEx('data/byte.tif', open_options=['OVERVIEW_LEVEL=0']) assert ds is None ############################################################################### # Nominal cases def test_overviewds_2(): shutil.copy('data/byte.tif', 'tmp') ds = gdal.Open('tmp/byte.tif') ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None ds = gdal.OpenEx('tmp/byte.tif', open_options=['OVERVIEW_LEVEL=0only']) assert ds.GetRasterBand(1).GetOverviewCount() == 0 ds = None src_ds = gdal.Open('tmp/byte.tif') ds = gdal.OpenEx('tmp/byte.tif', open_options=['OVERVIEW_LEVEL=0']) assert ds is not None assert ds.RasterXSize == 10 and ds.RasterYSize == 10 and ds.RasterCount == 1 assert ds.GetProjectionRef() == src_ds.GetProjectionRef() src_gt = src_ds.GetGeoTransform() expected_gt = (src_gt[0], src_gt[1] * 2, src_gt[2], src_gt[3], src_gt[4], src_gt[5] * 2) gt = ds.GetGeoTransform() for i in range(6): assert expected_gt[i] == pytest.approx(gt[i], abs=1e-5) assert ds.GetGCPCount() == 0 and ds.GetGCPProjection() == src_ds.GetGCPProjection() and not ds.GetGCPs() expected_data = src_ds.ReadRaster(0, 0, 20, 20, 10, 10) got_data = ds.ReadRaster(0, 0, 10, 10) assert expected_data == got_data got_data = ds.GetRasterBand(1).ReadRaster(0, 0, 10, 10) assert expected_data == got_data assert ds.GetRasterBand(1).GetOverviewCount() == 1 expected_data = src_ds.ReadRaster(0, 0, 20, 20, 5, 5) got_data = ds.GetRasterBand(1).GetOverview(0).ReadRaster(0, 0, 5, 5) assert expected_data == got_data assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALL_VALID assert ds.GetRasterBand(1).GetMaskBand() assert ds.GetMetadata() == src_ds.GetMetadata() assert ds.GetMetadataItem('AREA_OR_POINT') == src_ds.GetMetadataItem('AREA_OR_POINT') assert not ds.GetMetadata('RPC') assert not ds.GetMetadata('GEOLOCATION') assert ds.GetMetadataItem('RPC', 'FOO') is None ds = None ############################################################################### # Test GCP def test_overviewds_3(): src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/byte.tif', src_ds) ds.SetGeoTransform([0, 1, 0, 0, 0, 1]) # cancel geotransform gcp1 = gdal.GCP() gcp1.GCPPixel = 0 gcp1.GCPLine = 0 gcp1.GCPX = 440720.000 gcp1.GCPY = 3751320.000 gcp2 = gdal.GCP() gcp2.GCPPixel = 0 gcp2.GCPLine = 20 gcp2.GCPX = 440720.000 gcp2.GCPY = 3750120.000 gcp3 = gdal.GCP() gcp3.GCPPixel = 20 gcp3.GCPLine = 0 gcp3.GCPX = 441920.000 gcp3.GCPY = 3751320.000 src_gcps = (gcp1, gcp2, gcp3) ds.SetGCPs(src_gcps, src_ds.GetProjectionRef()) tr = gdal.Transformer(ds, None, ['METHOD=GCP_POLYNOMIAL']) (_, ref_pnt) = tr.TransformPoint(0, 20, 10) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None ds = gdal.OpenEx('tmp/byte.tif', open_options=['OVERVIEW_LEVEL=0']) gcps = ds.GetGCPs() for i in range(3): assert (gcps[i].GCPPixel == src_gcps[i].GCPPixel / 2 and gcps[i].GCPLine == src_gcps[i].GCPLine / 2 and \ gcps[i].GCPX == src_gcps[i].GCPX and gcps[i].GCPY == src_gcps[i].GCPY) # Really check that the transformer works tr = gdal.Transformer(ds, None, ['METHOD=GCP_POLYNOMIAL']) (_, pnt) = tr.TransformPoint(0, 20 / 2.0, 10 / 2.0) for i in range(3): assert ref_pnt[i] == pytest.approx(pnt[i], abs=1e-5) ds = None ############################################################################### # Test RPC def myfloat(s): p = s.rfind(' ') if p >= 0: s = s[0:p] return float(s) def test_overviewds_4(): shutil.copy('data/byte.tif', 'tmp/byte.tif') shutil.copy('data/test_rpc.txt', 'tmp/byte_rpc.txt') ds = gdal.Open('tmp/byte.tif') rpc_md = ds.GetMetadata('RPC') tr = gdal.Transformer(ds, None, ['METHOD=RPC']) (_, ref_pnt) = tr.TransformPoint(0, 20, 10) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None ds = gdal.OpenEx('tmp/byte.tif', open_options=['OVERVIEW_LEVEL=0']) got_md = ds.GetMetadata('RPC') for key in rpc_md: assert ds.GetMetadataItem(key, 'RPC') == got_md[key] if key == 'LINE_SCALE' or key == 'SAMP_SCALE' or key == 'LINE_OFF' or key == 'SAMP_OFF': assert float(got_md[key]) == myfloat(rpc_md[key]) / 2 elif got_md[key] != rpc_md[key]: print(got_md[key]) print(rpc_md[key]) pytest.fail(key) # Really check that the transformer works tr = gdal.Transformer(ds, None, ['METHOD=RPC']) (_, pnt) = tr.TransformPoint(0, 20 / 2.0, 10 / 2.0) for i in range(3): assert ref_pnt[i] == pytest.approx(pnt[i], abs=1e-5) ds = None try: os.remove('tmp/byte_rpc.txt') except OSError: pass ############################################################################### # Test GEOLOCATION def test_overviewds_5(): shutil.copy('data/sstgeo.tif', 'tmp/sstgeo.tif') shutil.copy('data/sstgeo.vrt', 'tmp/sstgeo.vrt') ds = gdal.Open('tmp/sstgeo.vrt') geoloc_md = ds.GetMetadata('GEOLOCATION') tr = gdal.Transformer(ds, None, ['METHOD=GEOLOC_ARRAY']) (_, ref_pnt) = tr.TransformPoint(0, 20, 10) ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None ds = gdal.OpenEx('tmp/sstgeo.vrt', open_options=['OVERVIEW_LEVEL=0']) got_md = ds.GetMetadata('GEOLOCATION') for key in geoloc_md: assert ds.GetMetadataItem(key, 'GEOLOCATION') == got_md[key] if key == 'PIXEL_OFFSET' or key == 'LINE_OFFSET': assert float(got_md[key]) == pytest.approx(myfloat(geoloc_md[key]) * 2, abs=1e-1) elif key == 'PIXEL_STEP' or key == 'LINE_STEP': assert float(got_md[key]) == pytest.approx(myfloat(geoloc_md[key]) / 2, abs=1e-1) elif got_md[key] != geoloc_md[key]: print(got_md[key]) print(geoloc_md[key]) pytest.fail(key) # Really check that the transformer works tr = gdal.Transformer(ds, None, ['METHOD=GEOLOC_ARRAY']) expected_xyz = (20.0 / 2, 10.0 / 2, 0) (_, pnt) = tr.TransformPoint(1, ref_pnt[0], ref_pnt[1]) for i in range(3): assert pnt[i] == pytest.approx(expected_xyz[i], abs=0.5) ds = None ############################################################################### # Test VRT def test_overviewds_6(): shutil.copy('data/byte.tif', 'tmp') ds = gdal.Open('tmp/byte.tif') ds.BuildOverviews('NEAR', overviewlist=[2, 4]) ds = None src_ds = gdal.OpenEx('tmp/byte.tif', open_options=['OVERVIEW_LEVEL=0']) expected_cs = src_ds.GetRasterBand(1).Checksum() ds = gdal.GetDriverByName('VRT').CreateCopy('tmp/byte.vrt', src_ds) ds = None src_ds = None ds = gdal.Open('tmp/byte.vrt') assert ds.RasterXSize == 10 and ds.RasterYSize == 10 and ds.RasterCount == 1 got_cs = ds.GetRasterBand(1).Checksum() assert got_cs == expected_cs ds = None ############################################################################### # Dataset with a mask def test_overviewds_mask(): with gdaltest.config_option('GDAL_TIFF_INTERNAL_MASK', 'YES'): src_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/test.tif', 4, 4) src_ds.CreateMaskBand(gdal.GMF_PER_DATASET) src_ds.GetRasterBand(1).GetMaskBand().WriteRaster(0, 0, 2, 4, b'\xFF' * 8) src_ds.BuildOverviews('NEAR', [2, 4]) src_ds = None ovr_ds = gdal.OpenEx('/vsimem/test.tif', open_options=['OVERVIEW_LEVEL=0']) assert ovr_ds assert ovr_ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET ovrmaskband = ovr_ds.GetRasterBand(1).GetMaskBand() assert struct.unpack('B' * 4, ovrmaskband.ReadRaster()) == (255, 0, 255, 0) # Mask of mask assert ovrmaskband.GetMaskFlags() == gdal.GMF_ALL_VALID assert struct.unpack('B' * 4, ovrmaskband.GetMaskBand().ReadRaster()) == (255, 255, 255, 255) # Overview of overview of mask assert ovrmaskband.GetOverviewCount() == 1 ovrofovrmaskband = ovrmaskband.GetOverview(0) assert struct.unpack('B' * 1, ovrofovrmaskband.ReadRaster()) == (255,) ovr_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/test.tif') ############################################################################### # Cleanup def test_overviewds_cleanup(): gdal.GetDriverByName('GTiff').Delete('tmp/byte.tif') try: os.remove('tmp/byte_rpc.txt') except OSError: pass try: os.remove('tmp/sstgeo.tif') os.remove('tmp/sstgeo.vrt') os.remove('tmp/sstgeo.vrt.ovr') except OSError: pass try: os.remove('tmp/byte.vrt') except OSError: pass �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/identify.py����������������������������������������������������������������0000775�0001750�0001750�00000006751�13701057757�016207� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: identify.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test functioning of the IdentifyDriver functionality. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2007, Frank Warmerdam <warmerdam@pobox.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal ############################################################################### # Simple try of identify driver on a tiff file. def test_identify_1(): file_list = gdal.ReadDir('data') dr = gdal.IdentifyDriver('data/byte.tif', file_list) assert dr is not None and dr.GetDescription() == 'GTiff', \ 'Got wrong driver for byte.tif' ############################################################################### # Test a file that won't be recognised. def test_identify_2(): file_list = gdal.ReadDir('data') dr = gdal.IdentifyDriver('data/byte.pnm.aux.xml', file_list) assert dr is None, 'Got a driver for byte.pnm.aux.xml!' ############################################################################### # Try identify on a directory. def test_identify_3(): dr = gdal.IdentifyDriver('data') assert dr is None, 'Got a driver for data directory!' ############################################################################### # Try IdentifyDriverEx def test_identify_4(): dr = gdal.IdentifyDriverEx('data/byte.tif') assert dr is not None and dr.GetDescription() == 'GTiff', \ 'Got wrong driver for byte.tif' dr = gdal.IdentifyDriverEx('data/byte.tif', gdal.OF_RASTER) assert dr is not None and dr.GetDescription() == 'GTiff', \ 'Got wrong driver for byte.tif' dr = gdal.IdentifyDriverEx('data/byte.tif', gdal.OF_VECTOR) assert dr is None, 'Got wrong driver for byte.tif' dr = gdal.IdentifyDriverEx('data/byte.tif', allowed_drivers=['HFA']) assert dr is None, 'Got wrong driver for byte.tif' dr = gdal.IdentifyDriverEx('../gdrivers/data/aea.dat', sibling_files=['aea.dat']) assert dr is None, 'Got a driver, which was not expected!' dr = gdal.IdentifyDriverEx('../gdrivers/data/aea.dat', sibling_files=['aea.dat', 'aea.hdr']) assert dr is not None, 'Did not get a driver!' �����������������������gdalautotest-3.1.2/gcore/aaigrid_write.py�����������������������������������������������������������0000775�0001750�0001750�00000003654�13701057757�017205� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: aaigrid_write.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for Arc/Info ASCII grid # (AAIGrid) driver # Author: Andrey Kiselev, dron@remotesensing.org # ############################################################################### # Copyright (c) 2003, Andrey Kiselev <dron@remotesensing.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest import gdaltest ############################################################################### # When imported build a list of units based on the files available. init_list = [ ('byte.tif', 4672), ('int16.tif', 4672), ('uint16.tif', 4672), ('float32.tif', 4672), ('utmsmall.tif', 50054)] @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('AAIGrid') def test_aaigrid_create(filename, checksum): ut = gdaltest.GDALTest('AAIGrid', filename, 1, checksum) ut.testCreateCopy() ������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/gcps2geotransform.py�������������������������������������������������������0000775�0001750�0001750�00000013346�13701057757�020037� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: misc.py 26369 2013-08-25 19:48:28Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: Test the GDALGCPsToGeoTransform() method. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2013 Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Helper to make gcps def _list2gcps(src_list): gcp_list = [] for src_tuple in src_list: gcp = gdal.GCP() gcp.GCPPixel = src_tuple[0] gcp.GCPLine = src_tuple[1] gcp.GCPX = src_tuple[2] gcp.GCPY = src_tuple[3] gcp_list.append(gcp) return gcp_list ############################################################################### # Test simple exact case of turning GCPs into a GeoTransform. def test_gcps2gt_1(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (0.0, 0.0, 400000, 370000), (100.0, 0.0, 410000, 370000), (100.0, 200.0, 410000, 368000) ])) assert gdaltest.geotransform_equals( gt, (400000.0, 100.0, 0.0, 370000.0, 0.0, -10.0), 0.000001) ############################################################################### # Similar but non-exact. def test_gcps2gt_2(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (0.0, 0.0, 400000, 370000), (100.0, 0.0, 410000, 370000), (100.0, 200.0, 410000, 368000), (0.0, 200.0, 400000, 368000.01) ])) assert gdaltest.geotransform_equals( gt, (400000.0, 100.0, 0.0, 370000.0025, -5e-05, -9.999975), 0.000001) ############################################################################### # bApproxOK false, and no good solution. def test_gcps2gt_3(): approx_ok = 0 gt = gdal.GCPsToGeoTransform(_list2gcps([ (0.0, 0.0, 400000, 370000), (100.0, 0.0, 410000, 370000), (100.0, 200.0, 410000, 368000), (0.0, 200.0, 400000, 360000) ]), approx_ok) assert gt is None, 'Expected failure when no good solution.' ############################################################################### # Single point - Should return None. def test_gcps2gt_4(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (0.0, 0.0, 400000, 370000), ])) assert gt is None, 'Expected failure for single GCP.' ############################################################################### # Two points - simple offset and scale, no rotation. def test_gcps2gt_5(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (0.0, 0.0, 400000, 370000), (100.0, 200.0, 410000, 368000), ])) assert gdaltest.geotransform_equals( gt, (400000.0, 100.0, 0.0, 370000.0, 0.0, -10.0), 0.000001) ############################################################################### # Special case for four points in a particular order. Exact result. def test_gcps2gt_6(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (400000, 370000, 400000, 370000), (410000, 370000, 410000, 370000), (410000, 368000, 410000, 368000), (400000, 368000, 400000, 368000), ])) assert gdaltest.geotransform_equals( gt, (0.0, 1.0, 0.0, 0.0, 0.0, 1.0), 0.000001) ############################################################################### # Try a case that is hard to do without normalization. def test_gcps2gt_7(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (400000, 370000, 400000, 370000), (410000, 368000, 410000, 368000), (410000, 370000, 410000, 370000), (400000, 368000, 400000, 368000), ])) assert gdaltest.geotransform_equals( gt, (0.0, 1.0, 0.0, 0.0, 0.0, 1.0), 0.000001) ############################################################################### # A fairly messy real world case without a easy to predict result. def test_gcps2gt_8(): gt = gdal.GCPsToGeoTransform(_list2gcps([ (0.01, 0.04, -87.05528672907, 39.22759504228), (0.01, 2688.02, -86.97079900719, 39.27075713986), (4031.99, 2688.04, -87.05960736744, 39.37569137000), (1988.16, 1540.80, -87.055069186699924, 39.304963106777514), (1477.41, 2400.83, -87.013419295885001, 39.304705030894979), (1466.02, 2376.92, -87.013906298363295, 39.304056190007913), ])) gt_expected = (-87.056612873288, -2.232795668658e-05, 3.178617809303e-05, 39.227856615716, 2.6091510188921e-05, 1.596921026218e-05) assert gdaltest.geotransform_equals(gt, gt_expected, 0.00001) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/hfa_srs.py�����������������������������������������������������������������0000775�0001750�0001750�00000011057�13701057757�016014� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: hfa_srs.py 6ae7f60a5914a2f16b8b1a94758f10e6621e4aca 2020-05-31 21:52:48 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write round-tripping of SRS for HFA/Imagine format. # Author: Even Rouault, <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2011, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest from osgeo import gdal from osgeo import osr ############################################################################### # Write a HFA/Imagine and read it back to check its SRS epsg_list = [ [3814, False], # tmerc [2036, True], # sterea # failure caused by revert done in r22803 # [2046, False], # tmerc south oriented DISABLED. Not sure about the axis [3031, True], # stere [32661, True], # stere [6931, False], # laea [2062, False], # lcc #[2065, True], # krovak South-West [5221, True], # krovak east-north [2066, False], # cass [2964, False], # aea [3410, True], # cea [3786, True], # eqc [2934, True], # merc [27200, False], # nzmg [2057, True], # omerc [29100, False], # poly [2056, False], # somerc [2027, False], # utm [4326, False], # longlat ] @pytest.mark.parametrize( 'epsg_code,epsg_broken', epsg_list, ids=[str(r[0]) for r in epsg_list], ) def test_hfa_srs(epsg_code, epsg_broken): sr = osr.SpatialReference() sr.ImportFromEPSG(epsg_code) ds = gdal.GetDriverByName('HFA').Create('/vsimem/TestHFASRS.img', 1, 1) ds.SetProjection(sr.ExportToWkt()) ds = None ds = gdal.Open('/vsimem/TestHFASRS.img') wkt = ds.GetProjectionRef() sr2 = osr.SpatialReference() sr2.SetFromUserInput(wkt) ds = None gdal.Unlink('/vsimem/TestHFASRS.img') # For EPSG:2065. Those 2 datums are translated into D_S_JTSK in ESRI WKT... So for the purpose of # comparison, substitute one for another if sr.ExportToWkt().find('"System_Jednotne_Trigonometricke_Site_Katastralni_Ferro"') != -1 and \ sr2.ExportToWkt().find('"System_Jednotne_Trigonometricke_Site_Katastralni"') != -1: wkt2 = sr2.ExportToWkt().replace('"System_Jednotne_Trigonometricke_Site_Katastralni"', '"System_Jednotne_Trigonometricke_Site_Katastralni_Ferro"') sr2.SetFromUserInput(wkt2) if (epsg_code == 4326 and sr2.GetAuthorityCode(None) != '4326') or sr.IsSame(sr2) != 1: if epsg_broken: pytest.xfail('did not get expected SRS. known to be broken currently. FIXME!') print(sr) print(sr2) assert False, 'did not get expected SRS' def test_hfa_srs_wisconsin_tmerc(): ds = gdal.Open('data/esri_103300_NAD_1983_HARN_WISCRS_Adams_County_Meters_transverse_mercator.img') wkt = ds.GetProjectionRef() sr = osr.SpatialReference() sr.SetFromUserInput(wkt) assert sr.GetAuthorityCode(None) == '103300' def test_hfa_srs_NAD83_UTM(): sr = osr.SpatialReference() sr.ImportFromEPSG(26915) ds = gdal.GetDriverByName('HFA').Create('/vsimem/TestHFASRS.img', 1, 1) ds.SetProjection(sr.ExportToWkt()) ds = None ds = gdal.Open('/vsimem/TestHFASRS.img') wkt = ds.GetProjectionRef() assert ds.GetSpatialRef().GetAuthorityCode(None) == '26915' ds = None gdal.Unlink('/vsimem/TestHFASRS.img') assert 'TOWGS84' not in wkt ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsistdin.py����������������������������������������������������������������0000775�0001750�0001750�00000012174�13701057757�016233� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: vsistdin.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsistdin/ # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import test_cli_utilities import pytest ############################################################################### # Test on a small file def test_vsistdin_1(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/vsistdin_1_src.tif', src_ds) ds = None cs = src_ds.GetRasterBand(1).Checksum() src_ds = None # Should work on both Unix and Windows os.system(test_cli_utilities.get_gdal_translate_path() + " /vsistdin/ tmp/vsistdin_1_out.tif -q < tmp/vsistdin_1_src.tif") gdal.Unlink("tmp/vsistdin_1_src.tif") ds = gdal.Open("tmp/vsistdin_1_out.tif") assert ds is not None assert ds.GetRasterBand(1).Checksum() == cs gdal.Unlink("tmp/vsistdin_1_out.tif") ############################################################################### # Test on a bigger file (> 1 MB) def test_vsistdin_2(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() ds = gdal.GetDriverByName('GTiff').Create('tmp/vsistdin_2_src.tif', 2048, 2048) ds = None # Should work on both Unix and Windows os.system(test_cli_utilities.get_gdal_translate_path() + " /vsistdin/ tmp/vsistdin_2_out.tif -q < tmp/vsistdin_2_src.tif") gdal.Unlink("tmp/vsistdin_2_src.tif") ds = gdal.Open("tmp/vsistdin_2_out.tif") assert ds is not None ds = None gdal.Unlink("tmp/vsistdin_2_out.tif") ############################################################################### # Test opening /vsistdin/ in write mode (failure expected) def test_vsistdin_3(): gdal.PushErrorHandler('CPLQuietErrorHandler') f = gdal.VSIFOpenL('/vsistdin/', 'wb') gdal.PopErrorHandler() assert f is None ############################################################################### # Test fix for #6061 def test_vsistdin_4(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() f = open('tmp/vsistdin_4_src.vrt', 'wt') f.write("""<VRTDataset rasterXSize="20" rasterYSize="20"> %s <SRS>PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]]</SRS> <GeoTransform> 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01</GeoTransform> <VRTRasterBand dataType="Byte" band="1"> <ColorInterp>Gray</ColorInterp> <SimpleSource> <SourceFilename relativeToVRT="0">data/byte.tif</SourceFilename> <SourceBand>1</SourceBand> </SimpleSource> </VRTRasterBand> </VRTDataset>""" % (' ' * (2 * 1024 * 1024))) f.close() # Should work on both Unix and Windows os.system(test_cli_utilities.get_gdal_translate_path() + " /vsistdin/ tmp/vsistdin_4_out.tif -q < tmp/vsistdin_4_src.vrt") gdal.Unlink("tmp/vsistdin_4_src.vrt") ds = gdal.Open("tmp/vsistdin_4_out.tif") assert ds is not None ds = None gdal.Unlink("tmp/vsistdin_4_out.tif") ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsigs.py�������������������������������������������������������������������0000775�0001750�0001750�00000144673�13701057757�015535� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: vsigs.py 6a24aa7370566c829ebfeced26c0fe8eb6120466 2020-03-10 20:05:54 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsigs # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copyright (c) 2017 Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import stat import sys from osgeo import gdal import gdaltest import webserver import pytest def open_for_read(uri): """ Opens a test file for reading. """ return gdal.VSIFOpenExL(uri, 'rb', 1) ############################################################################### def test_vsigs_init(): gdaltest.gs_vars = {} for var in ('GS_SECRET_ACCESS_KEY', 'GS_ACCESS_KEY_ID', 'GOOGLE_APPLICATION_CREDENTIALS', 'CPL_GS_TIMESTAMP', 'CPL_GS_ENDPOINT', 'GDAL_HTTP_HEADER_FILE'): gdaltest.gs_vars[var] = gdal.GetConfigOption(var) if gdaltest.gs_vars[var] is not None: gdal.SetConfigOption(var, "") # To avoid user credentials in ~/.boto # to mess up our tests gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '') gdal.SetConfigOption('GS_OAUTH2_REFRESH_TOKEN', '') gdal.SetConfigOption('GS_OAUTH2_CLIENT_EMAIL', '') gdal.SetConfigOption('GS_OAUTH2_CLIENT_SECRET', '') gdal.SetConfigOption('GS_OAUTH2_CLIENT_ID', '') gdal.SetConfigOption('GOOGLE_APPLICATION_CREDENTIALS', '') with gdaltest.config_option('CPL_GCE_SKIP', 'YES'): assert gdal.GetSignedURL('/vsigs/foo/bar') is None ############################################################################### # Error cases def test_vsigs_1(): if not gdaltest.built_against_curl(): pytest.skip() # Invalid header filename gdal.ErrorReset() with gdaltest.config_option('GDAL_HTTP_HEADER_FILE', '/i_dont/exist.py'): with gdaltest.config_option('CPL_GCE_SKIP', 'YES'): with gdaltest.error_handler(): f = open_for_read('/vsigs/foo/bar') if f is not None: gdal.VSIFCloseL(f) pytest.fail() last_err = gdal.GetLastErrorMsg() assert 'Cannot read' in last_err # Invalid content for header file with gdaltest.config_option('GDAL_HTTP_HEADER_FILE', 'vsigs.py'): with gdaltest.config_option('CPL_GCE_SKIP', 'YES'): f = open_for_read('/vsigs/foo/bar') if f is not None: gdal.VSIFCloseL(f) pytest.fail() # Missing GS_SECRET_ACCESS_KEY gdal.ErrorReset() with gdaltest.config_option('CPL_GCE_SKIP', 'YES'): with gdaltest.error_handler(): f = open_for_read('/vsigs/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('GS_SECRET_ACCESS_KEY') >= 0 gdal.ErrorReset() with gdaltest.config_option('CPL_GCE_SKIP', 'YES'): with gdaltest.error_handler(): f = open_for_read('/vsigs_streaming/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('GS_SECRET_ACCESS_KEY') >= 0 gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', 'GS_SECRET_ACCESS_KEY') # Missing GS_ACCESS_KEY_ID gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsigs/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('GS_ACCESS_KEY_ID') >= 0 gdal.SetConfigOption('GS_ACCESS_KEY_ID', 'GS_ACCESS_KEY_ID') # ERROR 1: The User Id you provided does not exist in our records. gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsigs/foo/bar.baz') if f is not None or gdal.VSIGetLastErrorMsg() == '': if f is not None: gdal.VSIFCloseL(f) if gdal.GetConfigOption('APPVEYOR') is not None: return pytest.fail(gdal.VSIGetLastErrorMsg()) gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsigs_streaming/foo/bar.baz') assert f is None and gdal.VSIGetLastErrorMsg() != '' ############################################################################### def test_vsigs_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('CPL_GS_ENDPOINT', 'http://127.0.0.1:%d/' % gdaltest.webserver_port) gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', 'GS_SECRET_ACCESS_KEY') gdal.SetConfigOption('GS_ACCESS_KEY_ID', 'GS_ACCESS_KEY_ID') ############################################################################### # Test with a fake Google Cloud Storage server def test_vsigs_2(): if gdaltest.webserver_port == 0: pytest.skip() # header file gdal.FileFromMemBuffer('/vsimem/my_headers.txt', 'foo: bar') handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket_http_header_file/resource', 200, {'Content-type': 'text/plain'}, 'Y', expected_headers={'foo': 'bar'}) with webserver.install_http_handler(handler): with gdaltest.config_option('GDAL_HTTP_HEADER_FILE', '/vsimem/my_headers.txt'): f = open_for_read('/vsigs/gs_fake_bucket_http_header_file/resource') assert f is not None data = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(data) == 1 gdal.Unlink('/vsimem/my_headers.txt') gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', 'GS_SECRET_ACCESS_KEY') gdal.SetConfigOption('GS_ACCESS_KEY_ID', 'GS_ACCESS_KEY_ID') gdal.SetConfigOption('CPL_GS_TIMESTAMP', 'my_timestamp') signed_url = gdal.GetSignedURL('/vsigs/gs_fake_bucket/resource', ['START_DATE=20180212T123456Z']) assert (signed_url in ('http://127.0.0.1:8080/gs_fake_bucket/resource?Expires=1518442496&GoogleAccessId=GS_ACCESS_KEY_ID&Signature=xTphUyMqtKA6UmAX3PEr5VL3EOg%3D', 'http://127.0.0.1:8081/gs_fake_bucket/resource?Expires=1518442496&GoogleAccessId=GS_ACCESS_KEY_ID&Signature=xTphUyMqtKA6UmAX3PEr5VL3EOg%3D')) handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket/resource', 200, {'Content-type': 'text/plain'}, 'foo', expected_headers={'Authorization': 'GOOG1 GS_ACCESS_KEY_ID:8tndu9//BfmN+Kg4AFLdUMZMBDQ='}) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket/resource', 200, {'Content-type': 'text/plain'}, 'foo', expected_headers={'Authorization': 'GOOG1 GS_ACCESS_KEY_ID:8tndu9//BfmN+Kg4AFLdUMZMBDQ='}) with webserver.install_http_handler(handler): f = open_for_read('/vsigs_streaming/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket/resource2.bin', 206, {'Content-Range': 'bytes 0-0/1000000'}, 'x') with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsigs/gs_fake_bucket/resource2.bin') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() handler = webserver.SequentialHandler() handler.add('HEAD', '/gs_fake_bucket/resource2.bin', 200, {'Content-Length': 1000000}) with webserver.install_http_handler(handler): stat_res = gdal.VSIStatL('/vsigs_streaming/gs_fake_bucket/resource2.bin') if stat_res is None or stat_res.size != 1000000: if stat_res is not None: print(stat_res.size) else: print(stat_res) pytest.fail() ############################################################################### # Test ReadDir() with a fake Google Cloud Storage server def test_vsigs_readdir(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <NextMarker>bla</NextMarker> <Contents> <Key>a_dir/resource3.bin</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>123456</Size> </Contents> </ListBucketResult> """) handler.add('GET', '/gs_fake_bucket2/?delimiter=%2F&marker=bla&prefix=a_dir%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <Contents> <Key>a_dir/resource4.bin</Key> <LastModified>2015-10-16T12:34:56.000Z</LastModified> <Size>456789</Size> </Contents> <CommonPrefixes> <Prefix>a_dir/subdir/</Prefix> </CommonPrefixes> </ListBucketResult> """) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket2/a_dir/resource3.bin') if f is None: if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') pytest.fail() gdal.VSIFCloseL(f) dir_contents = gdal.ReadDir('/vsigs/gs_fake_bucket2/a_dir') assert dir_contents == ['resource3.bin', 'resource4.bin', 'subdir'] assert gdal.VSIStatL('/vsigs/gs_fake_bucket2/a_dir/resource3.bin').size == 123456 assert gdal.VSIStatL('/vsigs/gs_fake_bucket2/a_dir/resource3.bin').mtime == 1 # ReadDir on something known to be a file shouldn't cause network access dir_contents = gdal.ReadDir('/vsigs/gs_fake_bucket2/a_dir/resource3.bin') assert dir_contents is None # List buckets handler = webserver.SequentialHandler() handler.add('GET', '/', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult> <Buckets> <Bucket> <Name>mybucket</Name> </Bucket> </Buckets> </ListAllMyBucketsResult> """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsigs/') assert dir_contents == ['mybucket'] ############################################################################### # Test write def test_vsigs_write(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() f = gdal.VSIFOpenL('/vsigs/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = '' while True: numchars = int(request.rfile.readline().strip(), 16) content += request.rfile.read(numchars).decode('ascii') request.rfile.read(2) if numchars == 0: break if len(content) != 40000: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_copy/file.bin', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL('x' * 35000, 1, 35000, f) ret += gdal.VSIFWriteL('x' * 5000, 1, 5000, f) if ret != 40000: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) # Simulate failure while transmitting f = gdal.VSIFOpenL('/vsigs/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_copy/file.bin', custom_method=method) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.VSIFWriteL('x' * 35000, 1, 35000, f) if ret != 0: gdal.VSIFCloseL(f) pytest.fail(ret) gdal.VSIFCloseL(f) # Simulate failure at end of transfer f = gdal.VSIFOpenL('/vsigs/test_copy/file.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = '' while True: numchars = int(request.rfile.readline().strip(), 16) content += request.rfile.read(numchars).decode('ascii') request.rfile.read(2) if numchars == 0: break request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_copy/file.bin', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL('x' * 35000, 1, 35000, f) if ret != 35000: gdal.VSIFCloseL(f) pytest.fail(ret) with gdaltest.error_handler(): ret = gdal.VSIFCloseL(f) assert ret != 0 ############################################################################### # Test write with retry def test_vsigs_write_retry(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() with gdaltest.config_options({'GDAL_HTTP_MAX_RETRY': '2', 'GDAL_HTTP_RETRY_DELAY': '0.01'}): f = gdal.VSIFOpenL('/vsigs/test_write_retry/put_with_retry.bin', 'wb') assert f is not None handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = '' while True: numchars = int(request.rfile.readline().strip(), 16) content += request.rfile.read(numchars).decode('ascii') request.rfile.read(2) if numchars == 0: break if len(content) != 3: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test_write_retry/put_with_retry.bin', 502) handler.add('PUT', '/test_write_retry/put_with_retry.bin', custom_method=method) with gdaltest.error_handler(): with webserver.install_http_handler(handler): assert gdal.VSIFWriteL('foo', 1, 3, f) == 3 gdal.VSIFCloseL(f) ############################################################################### # Test rename def test_vsigs_fake_rename(): if gdaltest.webserver_port == 0: pytest.skip() gdal.VSICurlClearCache() handler = webserver.SequentialHandler() handler.add('GET', '/test/source.txt', 206, { 'Content-Length' : '3', 'Content-Range': 'bytes 0-2/3' }, "foo") handler.add('GET', '/test/target.txt', 404) handler.add('GET', '/test/?delimiter=%2F&max-keys=100&prefix=target.txt%2F', 200) def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return if request.headers['x-goog-copy-source'] != '/test/source.txt': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/test/target.txt', custom_method=method) handler.add('DELETE', '/test/source.txt', 204) with webserver.install_http_handler(handler): assert gdal.Rename( '/vsigs/test/source.txt', '/vsigs/test/target.txt') == 0 ############################################################################### # Read credentials with OAuth2 refresh_token def test_vsigs_read_credentials_refresh_token_default_gdal_app(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.SetConfigOption('GOA2_AUTH_URL_TOKEN', 'http://localhost:%d/accounts.google.com/o/oauth2/token' % gdaltest.webserver_port) gdal.SetConfigOption('GS_OAUTH2_REFRESH_TOKEN', 'REFRESH_TOKEN') with gdaltest.error_handler(): assert gdal.GetSignedURL('/vsigs/foo/bar') is None gdal.VSICurlClearCache() handler = webserver.SequentialHandler() def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != 'refresh_token=REFRESH_TOKEN&client_id=265656308688.apps.googleusercontent.com&client_secret=0IbTUDOYzaL6vnIdWTuQnvLz&grant_type=refresh_token': sys.stderr.write('Bad POST content: %s\n' % content) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') content = """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 3600, }""" request.send_header('Content-Length', len(content)) request.end_headers() request.wfile.write(content.encode('ascii')) handler.add('POST', '/accounts.google.com/o/oauth2/token', custom_method=method) def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('GOA2_AUTH_URL_TOKEN', None) gdal.SetConfigOption('GS_OAUTH2_REFRESH_TOKEN', '') ############################################################################### # Read credentials with OAuth2 refresh_token def test_vsigs_read_credentials_refresh_token_custom_app(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.SetConfigOption('GOA2_AUTH_URL_TOKEN', 'http://localhost:%d/accounts.google.com/o/oauth2/token' % gdaltest.webserver_port) gdal.SetConfigOption('GS_OAUTH2_REFRESH_TOKEN', 'REFRESH_TOKEN') gdal.SetConfigOption('GS_OAUTH2_CLIENT_ID', 'CLIENT_ID') gdal.SetConfigOption('GS_OAUTH2_CLIENT_SECRET', 'CLIENT_SECRET') gdal.VSICurlClearCache() handler = webserver.SequentialHandler() def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != 'refresh_token=REFRESH_TOKEN&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=refresh_token': sys.stderr.write('Bad POST content: %s\n' % content) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') content = """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 3600, }""" request.send_header('Content-Length', len(content)) request.end_headers() request.wfile.write(content.encode('ascii')) handler.add('POST', '/accounts.google.com/o/oauth2/token', custom_method=method) def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('GOA2_AUTH_URL_TOKEN', None) gdal.SetConfigOption('GS_OAUTH2_REFRESH_TOKEN', '') gdal.SetConfigOption('GS_OAUTH2_CLIENT_ID', '') gdal.SetConfigOption('GS_OAUTH2_CLIENT_SECRET', '') ############################################################################### # Read credentials with OAuth2 service account def test_vsigs_read_credentials_oauth2_service_account(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') # Generated with 'openssl genrsa -out rsa-openssl.pem 1024' and # 'openssl pkcs8 -nocrypt -in rsa-openssl.pem -inform PEM -topk8 -outform PEM -out rsa-openssl.pkcs8.pem' # DO NOT USE in production !!!! key = """-----BEGIN PRIVATE KEY----- MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAOlwJQLLDG1HeLrk VNcFR5Qptto/rJE5emRuy0YmkVINT4uHb1be7OOo44C2Ev8QPVtNHHS2XwCY5gTm i2RfIBLv+VDMoVQPqqE0LHb0WeqGmM5V1tHbmVnIkCcKMn3HpK30grccuBc472LQ DVkkGqIiGu0qLAQ89JP/r0LWWySRAgMBAAECgYAWjsS00WRBByAOh1P/dz4kfidy TabiXbiLDf3MqJtwX2Lpa8wBjAc+NKrPXEjXpv0W3ou6Z4kkqKHJpXGg4GRb4N5I 2FA+7T1lA0FCXa7dT2jvgJLgpBepJu5b//tqFqORb4A4gMZw0CiPN3sUsWsSw5Hd DrRXwp6sarzG77kvZQJBAPgysAmmXIIp9j1hrFSkctk4GPkOzZ3bxKt2Nl4GFrb+ bpKSon6OIhP1edrxTz1SMD1k5FiAAVUrMDKSarbh5osCQQDwxq4Tvf/HiYz79JBg Wz5D51ySkbg01dOVgFW3eaYAdB6ta/o4vpHhnbrfl6VO9oUb3QR4hcrruwnDHsw3 4mDTAkEA9FPZjbZSTOSH/cbgAXbdhE4/7zWOXj7Q7UVyob52r+/p46osAk9i5qj5 Kvnv2lrFGDrwutpP9YqNaMtP9/aLnwJBALLWf9n+GAv3qRZD0zEe1KLPKD1dqvrj j+LNjd1Xp+tSVK7vMs4PDoAMDg+hrZF3HetSQM3cYpqxNFEPgRRJOy0CQQDQlZHI yzpSgEiyx8O3EK1iTidvnLXbtWabvjZFfIE/0OhfBmN225MtKG3YLV2HoUvpajLq gwE6fxOLyJDxuWRf -----END PRIVATE KEY----- """ for i in range(2): gdal.SetConfigOption('GO2A_AUD', 'http://localhost:%d/oauth2/v4/token' % gdaltest.webserver_port) gdal.SetConfigOption('GOA2_NOW', '123456') if i == 0: gdal.SetConfigOption('GS_OAUTH2_PRIVATE_KEY', key) else: gdal.FileFromMemBuffer('/vsimem/pkey', key) gdal.SetConfigOption('GS_OAUTH2_PRIVATE_KEY_FILE', '/vsimem/pkey') gdal.SetConfigOption('GS_OAUTH2_CLIENT_EMAIL', 'CLIENT_EMAIL') gdal.VSICurlClearCache() handler = webserver.SequentialHandler() def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') content_8080 = 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiAiQ0xJRU5UX0VNQUlMIiwgInNjb3BlIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvZGV2c3RvcmFnZS5yZWFkX3dyaXRlIiwgImF1ZCI6ICJodHRwOi8vbG9jYWxob3N0OjgwODAvb2F1dGgyL3Y0L3Rva2VuIiwgImlhdCI6IDEyMzQ1NiwgImV4cCI6IDEyNzA1Nn0%3D.DAhqWtBgKpObxZ%2BGiXqwF%2Fa4SS%2FNWQRhLCI7DYZCuOTuf2w7dL8j4CdpiwwzQg1diIus7dyViRfzpsFmuZKAXwL%2B84iBoVVqnJJZ4TgwH49NdfMAnc4Rgm%2Bo2a2nEcMjX%2FbQ3jRY%2B9WNVl96hzULGvLrVeyego2f06wivqmvxHA%3D' content_8081 = 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiAiQ0xJRU5UX0VNQUlMIiwgInNjb3BlIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvZGV2c3RvcmFnZS5yZWFkX3dyaXRlIiwgImF1ZCI6ICJodHRwOi8vbG9jYWxob3N0OjgwODEvb2F1dGgyL3Y0L3Rva2VuIiwgImlhdCI6IDEyMzQ1NiwgImV4cCI6IDEyNzA1Nn0%3D.0abOEg4%2FRApWTSeAs6YTHaNzdwOgZLm8DTMO2MKlOA%2Fiagyb4cBJxDpkD5gECPvi7qhkg7LsyFuj0a%2BK48Bsuj%2FgLHOU4MpB0dHwYnDO2UXzH%2FUPdgFCVak1P1V%2ByiDA%2B%2Ft4aDI5fD9qefKQiu3wsMDHzP71MNLzayrjqaqKKS4%3D' if content not in [content_8080, content_8081]: sys.stderr.write('Bad POST content: %s\n' % content) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') content = """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 3600, }""" request.send_header('Content-Length', len(content)) request.end_headers() request.wfile.write(content.encode('ascii')) handler.add('POST', '/oauth2/v4/token', custom_method=method) def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) try: with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) except: if gdal.GetLastErrorMsg().find('CPLRSASHA256Sign() not implemented') >= 0: pytest.skip() finally: gdal.SetConfigOption('GO2A_AUD', None) gdal.SetConfigOption('GO2A_NOW', None) gdal.SetConfigOption('GS_OAUTH2_PRIVATE_KEY', '') gdal.SetConfigOption('GS_OAUTH2_PRIVATE_KEY_FILE', '') gdal.SetConfigOption('GS_OAUTH2_CLIENT_EMAIL', '') assert data == 'foo' gdal.Unlink('/vsimem/pkey') ############################################################################### # Read credentials with OAuth2 service account through a json configuration file def test_vsigs_read_credentials_oauth2_service_account_json_file(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.FileFromMemBuffer('/vsimem/service_account.json', """{ "private_key": "-----BEGIN PRIVATE KEY-----\nMIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAOlwJQLLDG1HeLrk\nVNcFR5Qptto/rJE5emRuy0YmkVINT4uHb1be7OOo44C2Ev8QPVtNHHS2XwCY5gTm\ni2RfIBLv+VDMoVQPqqE0LHb0WeqGmM5V1tHbmVnIkCcKMn3HpK30grccuBc472LQ\nDVkkGqIiGu0qLAQ89JP/r0LWWySRAgMBAAECgYAWjsS00WRBByAOh1P/dz4kfidy\nTabiXbiLDf3MqJtwX2Lpa8wBjAc+NKrPXEjXpv0W3ou6Z4kkqKHJpXGg4GRb4N5I\n2FA+7T1lA0FCXa7dT2jvgJLgpBepJu5b//tqFqORb4A4gMZw0CiPN3sUsWsSw5Hd\nDrRXwp6sarzG77kvZQJBAPgysAmmXIIp9j1hrFSkctk4GPkOzZ3bxKt2Nl4GFrb+\nbpKSon6OIhP1edrxTz1SMD1k5FiAAVUrMDKSarbh5osCQQDwxq4Tvf/HiYz79JBg\nWz5D51ySkbg01dOVgFW3eaYAdB6ta/o4vpHhnbrfl6VO9oUb3QR4hcrruwnDHsw3\n4mDTAkEA9FPZjbZSTOSH/cbgAXbdhE4/7zWOXj7Q7UVyob52r+/p46osAk9i5qj5\nKvnv2lrFGDrwutpP9YqNaMtP9/aLnwJBALLWf9n+GAv3qRZD0zEe1KLPKD1dqvrj\nj+LNjd1Xp+tSVK7vMs4PDoAMDg+hrZF3HetSQM3cYpqxNFEPgRRJOy0CQQDQlZHI\nyzpSgEiyx8O3EK1iTidvnLXbtWabvjZFfIE/0OhfBmN225MtKG3YLV2HoUvpajLq\ngwE6fxOLyJDxuWRf\n-----END PRIVATE KEY-----\n", "client_email": "CLIENT_EMAIL" }""") gdal.SetConfigOption('GOOGLE_APPLICATION_CREDENTIALS', '/vsimem/service_account.json') gdal.SetConfigOption('GO2A_AUD', 'http://localhost:%d/oauth2/v4/token' % gdaltest.webserver_port) gdal.SetConfigOption('GOA2_NOW', '123456') gdal.VSICurlClearCache() handler = webserver.SequentialHandler() def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') content_8080 = 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiAiQ0xJRU5UX0VNQUlMIiwgInNjb3BlIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvZGV2c3RvcmFnZS5yZWFkX3dyaXRlIiwgImF1ZCI6ICJodHRwOi8vbG9jYWxob3N0OjgwODAvb2F1dGgyL3Y0L3Rva2VuIiwgImlhdCI6IDEyMzQ1NiwgImV4cCI6IDEyNzA1Nn0%3D.DAhqWtBgKpObxZ%2BGiXqwF%2Fa4SS%2FNWQRhLCI7DYZCuOTuf2w7dL8j4CdpiwwzQg1diIus7dyViRfzpsFmuZKAXwL%2B84iBoVVqnJJZ4TgwH49NdfMAnc4Rgm%2Bo2a2nEcMjX%2FbQ3jRY%2B9WNVl96hzULGvLrVeyego2f06wivqmvxHA%3D' content_8081 = 'grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiAiQ0xJRU5UX0VNQUlMIiwgInNjb3BlIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL2F1dGgvZGV2c3RvcmFnZS5yZWFkX3dyaXRlIiwgImF1ZCI6ICJodHRwOi8vbG9jYWxob3N0OjgwODEvb2F1dGgyL3Y0L3Rva2VuIiwgImlhdCI6IDEyMzQ1NiwgImV4cCI6IDEyNzA1Nn0%3D.0abOEg4%2FRApWTSeAs6YTHaNzdwOgZLm8DTMO2MKlOA%2Fiagyb4cBJxDpkD5gECPvi7qhkg7LsyFuj0a%2BK48Bsuj%2FgLHOU4MpB0dHwYnDO2UXzH%2FUPdgFCVak1P1V%2ByiDA%2B%2Ft4aDI5fD9qefKQiu3wsMDHzP71MNLzayrjqaqKKS4%3D' if content not in [content_8080, content_8081]: sys.stderr.write('Bad POST content: %s\n' % content) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') content = """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 3600, }""" request.send_header('Content-Length', len(content)) request.end_headers() request.wfile.write(content.encode('ascii')) handler.add('POST', '/oauth2/v4/token', custom_method=method) def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) try: with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') if f is None: gdal.Unlink('/vsimem/service_account.json') pytest.fail() data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) signed_url = gdal.GetSignedURL('/vsigs/gs_fake_bucket/resource', ['START_DATE=20180212T123456Z']) if signed_url not in ('http://127.0.0.1:8080/gs_fake_bucket/resource?Expires=1518442496&GoogleAccessId=CLIENT_EMAIL&Signature=b19I62KdqV51DpWGxhxGXLGJIA8MHvSJofwOygoeQuIxkM6PmmQFvJYTNWRt9zUVTUoVC0UHVB7ee5Z35NqDC8K4i0quu1hb8Js2B4h0W6OAupvyF3nSQ5D0OJmiSbomGMq0Ehyro5cqJ%2FU%2Fd8oAaKrGKVQScKfXoFrSJBbWkNs%3D', 'http://127.0.0.1:8081/gs_fake_bucket/resource?Expires=1518442496&GoogleAccessId=CLIENT_EMAIL&Signature=b19I62KdqV51DpWGxhxGXLGJIA8MHvSJofwOygoeQuIxkM6PmmQFvJYTNWRt9zUVTUoVC0UHVB7ee5Z35NqDC8K4i0quu1hb8Js2B4h0W6OAupvyF3nSQ5D0OJmiSbomGMq0Ehyro5cqJ%2FU%2Fd8oAaKrGKVQScKfXoFrSJBbWkNs%3D'): gdal.Unlink('/vsimem/service_account.json') pytest.fail(signed_url) except: if gdal.GetLastErrorMsg().find('CPLRSASHA256Sign() not implemented') >= 0: pytest.skip() finally: gdal.SetConfigOption('GO2A_AUD', None) gdal.SetConfigOption('GO2A_NOW', None) gdal.SetConfigOption('GOOGLE_APPLICATION_CREDENTIALS', '') gdal.Unlink('/vsimem/service_account.json') assert data == 'foo' ############################################################################### # Read credentials from simulated ~/.boto def test_vsigs_read_credentials_file(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '/vsimem/.boto') gdal.VSICurlClearCache() gdal.FileFromMemBuffer('/vsimem/.boto', """ [unrelated] gs_access_key_id = foo gs_secret_access_key = bar [Credentials] gs_access_key_id = GS_ACCESS_KEY_ID gs_secret_access_key = GS_SECRET_ACCESS_KEY [unrelated] gs_access_key_id = foo gs_secret_access_key = bar """) def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'GOOG1 GS_ACCESS_KEY_ID:8tndu9//BfmN+Kg4AFLdUMZMBDQ=' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '') gdal.Unlink('/vsimem/.boto') ############################################################################### # Read credentials from simulated ~/.boto def test_vsigs_read_credentials_file_refresh_token(): if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '/vsimem/.boto') gdal.SetConfigOption('GOA2_AUTH_URL_TOKEN', 'http://localhost:%d/accounts.google.com/o/oauth2/token' % gdaltest.webserver_port) gdal.VSICurlClearCache() gdal.FileFromMemBuffer('/vsimem/.boto', """ [Credentials] gs_oauth2_refresh_token = REFRESH_TOKEN [OAuth2] client_id = CLIENT_ID client_secret = CLIENT_SECRET """) handler = webserver.SequentialHandler() def method(request): content = request.rfile.read(int(request.headers['Content-Length'])).decode('ascii') if content != 'refresh_token=REFRESH_TOKEN&client_id=CLIENT_ID&client_secret=CLIENT_SECRET&grant_type=refresh_token': sys.stderr.write('Bad POST content: %s\n' % content) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') content = """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 3600, }""" request.send_header('Content-Length', len(content)) request.end_headers() request.wfile.write(content.encode('ascii')) handler.add('POST', '/accounts.google.com/o/oauth2/token', custom_method=method) def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '') gdal.SetConfigOption('GOA2_AUTH_URL_TOKEN', None) gdal.Unlink('/vsimem/.boto') ############################################################################### # Read credentials from simulated GCE instance def test_vsigs_read_credentials_gce(): if gdaltest.webserver_port == 0: pytest.skip() if sys.platform not in ('linux', 'linux2', 'win32'): pytest.skip() gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '') gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_GCE_CREDENTIALS_URL', 'http://localhost:%d/computeMetadata/v1/instance/service-accounts/default/token' % gdaltest.webserver_port) # Disable hypervisor related check to test if we are really on EC2 gdal.SetConfigOption('CPL_GCE_CHECK_LOCAL_FILES', 'NO') gdal.VSICurlClearCache() def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler = webserver.SequentialHandler() handler.add('GET', '/computeMetadata/v1/instance/service-accounts/default/token', 200, {}, """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 3600, }""") handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' # Set a fake URL to check that credentials re-use works gdal.SetConfigOption('CPL_GCE_CREDENTIALS_URL', '') handler = webserver.SequentialHandler() handler.add('GET', '/gs_fake_bucket/bar', 200, {}, 'bar') with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/bar') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar' with gdaltest.error_handler(): assert gdal.GetSignedURL('/vsigs/foo/bar') is None gdal.SetConfigOption('CPL_GCE_CREDENTIALS_URL', '') gdal.SetConfigOption('CPL_GCE_CHECK_LOCAL_FILES', None) ############################################################################### # Read credentials from simulated GCE instance with expiration of the # cached credentials def test_vsigs_read_credentials_gce_expiration(): if gdaltest.webserver_port == 0: pytest.skip() if sys.platform not in ('linux', 'linux2', 'win32'): pytest.skip() gdal.SetConfigOption('CPL_GS_CREDENTIALS_FILE', '') gdal.SetConfigOption('GS_SECRET_ACCESS_KEY', '') gdal.SetConfigOption('GS_ACCESS_KEY_ID', '') gdal.SetConfigOption('CPL_GCE_CREDENTIALS_URL', 'http://localhost:%d/computeMetadata/v1/instance/service-accounts/default/token' % gdaltest.webserver_port) # Disable hypervisor related check to test if we are really on EC2 gdal.SetConfigOption('CPL_GCE_CHECK_LOCAL_FILES', 'NO') gdal.VSICurlClearCache() def method(request): if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'Bearer ACCESS_TOKEN' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.end_headers() request.wfile.write("""foo""".encode('ascii')) handler = webserver.SequentialHandler() # First time is used when trying to establish if GCE authentication is available handler.add('GET', '/computeMetadata/v1/instance/service-accounts/default/token', 200, {}, """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 0, }""") # Second time is needed because f the access to th file handler.add('GET', '/computeMetadata/v1/instance/service-accounts/default/token', 200, {}, """{ "access_token" : "ACCESS_TOKEN", "token_type" : "Bearer", "expires_in" : 0, }""") handler.add('GET', '/gs_fake_bucket/resource', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsigs/gs_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' gdal.SetConfigOption('CPL_GCE_CREDENTIALS_URL', '') gdal.SetConfigOption('CPL_GCE_CHECK_LOCAL_FILES', None) ############################################################################### def test_vsigs_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Nominal cases (require valid credentials) def test_vsigs_extra_1(): if not gdaltest.built_against_curl(): pytest.skip() # if gdal.GetConfigOption('GS_SECRET_ACCESS_KEY') is None: # print('Missing GS_SECRET_ACCESS_KEY') # pytest.skip() # elif gdal.GetConfigOption('GS_ACCESS_KEY_ID') is None: # print('Missing GS_ACCESS_KEY_ID') # pytest.skip() gs_resource = gdal.GetConfigOption('GS_RESOURCE') if gs_resource is None: pytest.skip('Missing GS_RESOURCE') if '/' not in gs_resource: path = '/vsigs/' + gs_resource statres = gdal.VSIStatL(path) assert statres is not None and stat.S_ISDIR(statres.mode), \ ('%s is not a valid bucket' % path) readdir = gdal.ReadDir(path) assert readdir is not None, 'ReadDir() should not return empty list' for filename in readdir: if filename != '.': subpath = path + '/' + filename assert gdal.VSIStatL(subpath) is not None, \ ('Stat(%s) should not return an error' % subpath) unique_id = 'vsigs_test' subpath = path + '/' + unique_id ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id in readdir, \ ('ReadDir(%s) should contain %s' % (path, unique_id)) ret = gdal.Mkdir(subpath, 0) assert ret != 0, ('Mkdir(%s) repeated should return an error' % subpath) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id not in readdir, \ ('ReadDir(%s) should not contain %s' % (path, unique_id)) ret = gdal.Rmdir(subpath) assert ret != 0, ('Rmdir(%s) repeated should return an error' % subpath) ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'wb') assert f is not None gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) ret = gdal.Rmdir(subpath) assert ret != 0, \ ('Rmdir(%s) on non empty directory should return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) assert gdal.Rename(subpath + '/test.txt', subpath + '/test2.txt') == 0 f = gdal.VSIFOpenL(subpath + '/test2.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) ret = gdal.Unlink(subpath + '/test2.txt') assert ret >= 0, \ ('Unlink(%s) should not return an error' % (subpath + '/test2.txt')) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) return f = open_for_read('/vsigs/' + gs_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 # Same with /vsigs_streaming/ f = open_for_read('/vsigs_streaming/' + gs_resource) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 if False: # pylint: disable=using-constant-test # we actually try to read at read() time and bSetError = false # Invalid bucket : "The specified bucket does not exist" gdal.ErrorReset() f = open_for_read('/vsigs/not_existing_bucket/foo') with gdaltest.error_handler(): gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert gdal.VSIGetLastErrorMsg() != '' # Invalid resource gdal.ErrorReset() f = open_for_read('/vsigs_streaming/' + gs_resource + '/invalid_resource.baz') assert f is None, gdal.VSIGetLastErrorMsg() # Test GetSignedURL() signed_url = gdal.GetSignedURL('/vsigs/' + gs_resource) f = open_for_read('/vsicurl_streaming/' + signed_url) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 ############################################################################### def test_vsigs_cleanup(): for var in gdaltest.gs_vars: gdal.SetConfigOption(var, gdaltest.gs_vars[var]) ���������������������������������������������������������������������gdalautotest-3.1.2/gcore/vsioss.py������������������������������������������������������������������0000775�0001750�0001750�00000132412�13701057757�015714� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: vsioss.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test /vsioss # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copyright (c) 2017, Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import stat import sys from osgeo import gdal import gdaltest import webserver import pytest def open_for_read(uri): """ Opens a test file for reading. """ return gdal.VSIFOpenExL(uri, 'rb', 1) ############################################################################### def test_visoss_init(): gdaltest.oss_vars = {} for var in ('OSS_SECRET_ACCESS_KEY', 'OSS_ACCESS_KEY_ID', 'OSS_TIMESTAMP', 'OSS_HTTPS', 'OSS_VIRTUAL_HOSTING', 'OSS_ENDPOINT'): gdaltest.oss_vars[var] = gdal.GetConfigOption(var) if gdaltest.oss_vars[var] is not None: gdal.SetConfigOption(var, "") assert gdal.GetSignedURL('/vsioss/foo/bar') is None ############################################################################### # Error cases def test_visoss_1(): if not gdaltest.built_against_curl(): pytest.skip() # Missing OSS_SECRET_ACCESS_KEY gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsioss/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('OSS_SECRET_ACCESS_KEY') >= 0 gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('OSS_SECRET_ACCESS_KEY') >= 0 gdal.SetConfigOption('OSS_SECRET_ACCESS_KEY', 'OSS_SECRET_ACCESS_KEY') # Missing OSS_ACCESS_KEY_ID gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsioss/foo/bar') assert f is None and gdal.VSIGetLastErrorMsg().find('OSS_ACCESS_KEY_ID') >= 0 gdal.SetConfigOption('OSS_ACCESS_KEY_ID', 'OSS_ACCESS_KEY_ID') def test_visoss_real_test(): if not gdaltest.built_against_curl(): pytest.skip() if gdaltest.skip_on_travis(): pytest.skip() # ERROR 1: The OSS Access Key Id you provided does not exist in our records. gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsioss/foo/bar.baz') if f is not None or gdal.VSIGetLastErrorMsg() == '': if f is not None: gdal.VSIFCloseL(f) if gdal.GetConfigOption('APPVEYOR') is not None: return pytest.fail(gdal.VSIGetLastErrorMsg()) gdal.ErrorReset() with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/foo/bar.baz') assert f is None and gdal.VSIGetLastErrorMsg() != '' ############################################################################### def test_visoss_start_webserver(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('OSS_SECRET_ACCESS_KEY', 'OSS_SECRET_ACCESS_KEY') gdal.SetConfigOption('OSS_ACCESS_KEY_ID', 'OSS_ACCESS_KEY_ID') gdal.SetConfigOption('CPL_OSS_TIMESTAMP', 'my_timestamp') gdal.SetConfigOption('OSS_HTTPS', 'NO') gdal.SetConfigOption('OSS_VIRTUAL_HOSTING', 'NO') gdal.SetConfigOption('OSS_ENDPOINT', '127.0.0.1:%d' % gdaltest.webserver_port) ############################################################################### def get_oss_fake_bucket_resource_method(request): request.protocol_version = 'HTTP/1.1' if 'Authorization' not in request.headers: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) return expected_authorization = 'OSS OSS_ACCESS_KEY_ID:ZFgKjvMtWUwm9CTeCYoPomhuJiE=' if request.headers['Authorization'] != expected_authorization: sys.stderr.write("Bad Authorization: '%s'\n" % str(request.headers['Authorization'])) request.send_response(403) return request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) ############################################################################### # Test with a fake OSS server def test_visoss_2(): if gdaltest.webserver_port == 0: pytest.skip() signed_url = gdal.GetSignedURL('/vsioss/oss_fake_bucket/resource', ['START_DATE=20180212T123456Z']) assert (signed_url in ('http://127.0.0.1:8080/oss_fake_bucket/resource?Expires=1518442496&OSSAccessKeyId=OSS_ACCESS_KEY_ID&Signature=bpFqur6tQMNN7Xe7UHVFFrugmgs%3D', 'http://127.0.0.1:8081/oss_fake_bucket/resource?Expires=1518442496&OSSAccessKeyId=OSS_ACCESS_KEY_ID&Signature=bpFqur6tQMNN7Xe7UHVFFrugmgs%3D')) handler = webserver.SequentialHandler() handler.add('GET', '/oss_fake_bucket/resource', custom_method=get_oss_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() handler.add('GET', '/oss_fake_bucket/resource', custom_method=get_oss_fake_bucket_resource_method) with webserver.install_http_handler(handler): f = open_for_read('/vsioss_streaming/oss_fake_bucket/resource') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.send_response(400) response = """<?xml version="1.0" encoding="UTF-8"?> <Error> <Code>AccessDenied</Code> <Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message> <HostId>unused</HostId> <Bucket>unuset</Bucket> <Endpoint>localhost:%d</Endpoint> </Error>""" % request.server.port response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('GET', '/oss_fake_bucket/redirect', custom_method=method) def method(request): request.protocol_version = 'HTTP/1.1' if request.headers['Host'].startswith('localhost'): request.send_response(200) request.send_header('Content-type', 'text/plain') request.send_header('Content-Length', 3) request.send_header('Connection', 'close') request.end_headers() request.wfile.write("""foo""".encode('ascii')) else: sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) handler.add('GET', '/oss_fake_bucket/redirect', custom_method=method) # Test region and endpoint 'redirects' with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_fake_bucket/redirect') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) if data != 'foo': if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') pytest.fail(data) # Test region and endpoint 'redirects' handler.req_count = 0 with webserver.install_http_handler(handler): f = open_for_read('/vsioss_streaming/oss_fake_bucket/redirect') assert f is not None data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo' handler = webserver.SequentialHandler() def method(request): # /vsioss_streaming/ should have remembered the change of region and endpoint if not request.headers['Host'].startswith('localhost'): sys.stderr.write('Bad headers: %s\n' % str(request.headers)) request.send_response(403) request.protocol_version = 'HTTP/1.1' request.send_response(400) response = 'bla' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) request.send_header('Content-type', 'application/xml') request.send_header('Transfer-Encoding', 'chunked') request.send_header('Connection', 'close') request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('GET', '/oss_fake_bucket/non_xml_error', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/oss_fake_bucket/non_xml_error') assert f is None and gdal.VSIGetLastErrorMsg().find('bla') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><oops>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/oss_fake_bucket/invalid_xml_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/oss_fake_bucket/invalid_xml_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<oops>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error/>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/oss_fake_bucket/no_code_in_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/oss_fake_bucket/no_code_in_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error/>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error><Code>AuthorizationHeaderMalformed</Code></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/oss_fake_bucket/no_region_in_AuthorizationHeaderMalformed_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/oss_fake_bucket/no_region_in_AuthorizationHeaderMalformed_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error><Code>PermanentRedirect</Code></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/oss_fake_bucket/no_endpoint_in_PermanentRedirect_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/oss_fake_bucket/no_endpoint_in_PermanentRedirect_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error>') >= 0 handler = webserver.SequentialHandler() response = '<?xml version="1.0" encoding="UTF-8"?><Error><Code>bla</Code></Error>' response = '%x\r\n%s\r\n0\r\n\r\n' % (len(response), response) handler.add('GET', '/oss_fake_bucket/no_message_in_error', 400, {'Content-type': 'application/xml', 'Transfer-Encoding': 'chunked', 'Connection': 'close'}, response) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.error_handler(): f = open_for_read('/vsioss_streaming/oss_fake_bucket/no_message_in_error') assert f is None and gdal.VSIGetLastErrorMsg().find('<Error>') >= 0 ############################################################################### # Test ReadDir() with a fake OSS server def test_visoss_3(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'application/xml') response = """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <NextMarker>bla</NextMarker> <Contents> <Key>a_dir/resource3.bin</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>123456</Size> </Contents> </ListBucketResult> """ request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('GET', '/oss_fake_bucket2/?delimiter=%2F&prefix=a_dir%2F', custom_method=method) def method(request): request.protocol_version = 'HTTP/1.1' request.send_response(200) request.send_header('Content-type', 'application/xml') response = """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>a_dir/</Prefix> <Contents> <Key>a_dir/resource4.bin</Key> <LastModified>2015-10-16T12:34:56.000Z</LastModified> <Size>456789</Size> </Contents> <CommonPrefixes> <Prefix>a_dir/subdir/</Prefix> </CommonPrefixes> </ListBucketResult> """ request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('GET', '/oss_fake_bucket2/?delimiter=%2F&marker=bla&prefix=a_dir%2F', custom_method=method) with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_fake_bucket2/a_dir/resource3.bin') if f is None: if gdaltest.is_travis_branch('trusty'): pytest.skip('Skipped on trusty branch, but should be investigated') pytest.fail() gdal.VSIFCloseL(f) with webserver.install_http_handler(webserver.SequentialHandler()): dir_contents = gdal.ReadDir('/vsioss/oss_fake_bucket2/a_dir') assert dir_contents == ['resource3.bin', 'resource4.bin', 'subdir'] assert gdal.VSIStatL('/vsioss/oss_fake_bucket2/a_dir/resource3.bin').size == 123456 assert gdal.VSIStatL('/vsioss/oss_fake_bucket2/a_dir/resource3.bin').mtime == 1 # ReadDir on something known to be a file shouldn't cause network access dir_contents = gdal.ReadDir('/vsioss/oss_fake_bucket2/a_dir/resource3.bin') assert dir_contents is None # Test CPL_VSIL_CURL_NON_CACHED for config_option_value in ['/vsioss/oss_non_cached/test.txt', '/vsioss/oss_non_cached', '/vsioss/oss_non_cached:/vsioss/unrelated', '/vsioss/unrelated:/vsioss/oss_non_cached', '/vsioss/unrelated:/vsioss/oss_non_cached:/vsioss/unrelated']: with gdaltest.config_option('CPL_VSIL_CURL_NON_CACHED', config_option_value): handler = webserver.SequentialHandler() handler.add('GET', '/oss_non_cached/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo', config_option_value handler = webserver.SequentialHandler() handler.add('GET', '/oss_non_cached/test.txt', 200, {}, 'bar2') with webserver.install_http_handler(handler): size = gdal.VSIStatL('/vsioss/oss_non_cached/test.txt').size assert size == 4, config_option_value handler = webserver.SequentialHandler() handler.add('GET', '/oss_non_cached/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): size = gdal.VSIStatL('/vsioss/oss_non_cached/test.txt').size if size != 3: print(config_option_value) pytest.fail(data) handler = webserver.SequentialHandler() handler.add('GET', '/oss_non_cached/test.txt', 200, {}, 'bar2') with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'bar2', config_option_value # Retry without option for config_option_value in [None, '/vsioss/oss_non_cached/bar.txt']: with gdaltest.config_option('CPL_VSIL_CURL_NON_CACHED', config_option_value): handler = webserver.SequentialHandler() if config_option_value is None: handler.add('GET', '/oss_non_cached/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>/</Prefix> <Contents> <Key>/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <Contents> <Key>/test2.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) handler.add('GET', '/oss_non_cached/test.txt', 200, {}, 'foo') with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 3, f).decode('ascii') gdal.VSIFCloseL(f) assert data == 'foo', config_option_value handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): f = open_for_read('/vsioss/oss_non_cached/test.txt') assert f is not None, config_option_value data = gdal.VSIFReadL(1, 4, f).decode('ascii') gdal.VSIFCloseL(f) # We should still get foo because of caching assert data == 'foo', config_option_value # List buckets (empty result) handler = webserver.SequentialHandler() handler.add('GET', '/', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult> <Buckets> </Buckets> </ListAllMyBucketsResult> """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsioss/') assert dir_contents == ['.'] gdal.VSICurlClearCache() # List buckets handler = webserver.SequentialHandler() handler.add('GET', '/', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult> <Buckets> <Bucket> <Name>mybucket</Name> </Bucket> </Buckets> </ListAllMyBucketsResult> """) with webserver.install_http_handler(handler): dir_contents = gdal.ReadDir('/vsioss/') assert dir_contents == ['mybucket'] ############################################################################### # Test simple PUT support with a fake OSS server def test_visoss_4(): if gdaltest.webserver_port == 0: pytest.skip() with webserver.install_http_handler(webserver.SequentialHandler()): with gdaltest.error_handler(): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket3', 'wb') assert f is None handler = webserver.SequentialHandler() handler.add('GET', '/oss_fake_bucket3/empty_file.bin', 200, {'Connection': 'close'}, 'foo') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsioss/oss_fake_bucket3/empty_file.bin').size == 3 # Empty file handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '0': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/oss_fake_bucket3/empty_file.bin', custom_method=method) with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket3/empty_file.bin', 'wb') assert f is not None gdal.ErrorReset() gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' handler = webserver.SequentialHandler() handler.add('GET', '/oss_fake_bucket3/empty_file.bin', 200, {'Connection': 'close'}, '') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsioss/oss_fake_bucket3/empty_file.bin').size == 0 # Invalid seek handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket3/empty_file.bin', 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFSeekL(f, 1, 0) assert ret != 0 gdal.VSIFCloseL(f) # Invalid read handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket3/empty_file.bin', 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFReadL(1, 1, f) assert not ret gdal.VSIFCloseL(f) # Error case handler = webserver.SequentialHandler() handler.add('PUT', '/oss_fake_bucket3/empty_file_error.bin', 403) with webserver.install_http_handler(handler): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket3/empty_file_error.bin', 'wb') assert f is not None gdal.ErrorReset() with gdaltest.error_handler(): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '' # Nominal case with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket3/another_file.bin', 'wb') assert f is not None assert gdal.VSIFSeekL(f, gdal.VSIFTellL(f), 0) == 0 assert gdal.VSIFSeekL(f, 0, 1) == 0 assert gdal.VSIFSeekL(f, 0, 2) == 0 assert gdal.VSIFWriteL('foo', 1, 3, f) == 3 assert gdal.VSIFSeekL(f, gdal.VSIFTellL(f), 0) == 0 assert gdal.VSIFWriteL('bar', 1, 3, f) == 3 handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '6': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.wfile.write('HTTP/1.1 100 Continue\r\n\r\n'.encode('ascii')) content = request.rfile.read(6).decode('ascii') if content != 'foobar': sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/oss_fake_bucket3/another_file.bin', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' ############################################################################### # Test simple DELETE support with a fake OSS server def test_visoss_5(): if gdaltest.webserver_port == 0: pytest.skip() with webserver.install_http_handler(webserver.SequentialHandler()): with gdaltest.error_handler(): ret = gdal.Unlink('/vsioss/foo') assert ret != 0 handler = webserver.SequentialHandler() handler.add('GET', '/oss_delete_bucket/delete_file', 200, {'Connection': 'close'}, 'foo') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsioss/oss_delete_bucket/delete_file').size == 3 with webserver.install_http_handler(webserver.SequentialHandler()): assert gdal.VSIStatL('/vsioss/oss_delete_bucket/delete_file').size == 3 handler = webserver.SequentialHandler() handler.add('DELETE', '/oss_delete_bucket/delete_file', 204) with webserver.install_http_handler(handler): ret = gdal.Unlink('/vsioss/oss_delete_bucket/delete_file') assert ret == 0 handler = webserver.SequentialHandler() handler.add('GET', '/oss_delete_bucket/delete_file', 404, {'Connection': 'close'}, 'foo') handler.add('GET', '/oss_delete_bucket/?delimiter=%2F&max-keys=100&prefix=delete_file%2F', 404, {'Connection': 'close'}, 'foo') with webserver.install_http_handler(handler): assert gdal.VSIStatL('/vsioss/oss_delete_bucket/delete_file') is None handler = webserver.SequentialHandler() handler.add('GET', '/oss_delete_bucket/delete_file_error', 200) handler.add('DELETE', '/oss_delete_bucket/delete_file_error', 403) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ret = gdal.Unlink('/vsioss/oss_delete_bucket/delete_file_error') assert ret != 0 ############################################################################### # Test multipart upload with a fake OSS server def test_visoss_6(): if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.config_option('VSIOSS_CHUNK_SIZE', '1'): # 1 MB with webserver.install_http_handler(webserver.SequentialHandler()): f = gdal.VSIFOpenL('/vsioss/oss_fake_bucket4/large_file.bin', 'wb') assert f is not None size = 1024 * 1024 + 1 big_buffer = 'a' * size handler = webserver.SequentialHandler() def method(request): request.protocol_version = 'HTTP/1.1' response = '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>' request.send_response(200) request.send_header('Content-type', 'application/xml') request.send_header('Content-Length', len(response)) request.end_headers() request.wfile.write(response.encode('ascii')) handler.add('POST', '/oss_fake_bucket4/large_file.bin?uploads', custom_method=method) def method(request): if request.headers['Content-Length'] != '1048576': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('ETag', '"first_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/oss_fake_bucket4/large_file.bin?partNumber=1&uploadId=my_id', custom_method=method) with webserver.install_http_handler(handler): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == size handler = webserver.SequentialHandler() def method(request): if request.headers['Content-Length'] != '1': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) return request.send_response(200) request.send_header('ETag', '"second_etag"') request.send_header('Content-Length', 0) request.end_headers() handler.add('PUT', '/oss_fake_bucket4/large_file.bin?partNumber=2&uploadId=my_id', custom_method=method) def method(request): if request.headers['Content-Length'] != '186': sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return content = request.rfile.read(186).decode('ascii') if content != """<CompleteMultipartUpload> <Part> <PartNumber>1</PartNumber><ETag>"first_etag"</ETag></Part> <Part> <PartNumber>2</PartNumber><ETag>"second_etag"</ETag></Part> </CompleteMultipartUpload> """: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(200) request.send_header('Content-Length', 0) request.end_headers() handler.add('POST', '/oss_fake_bucket4/large_file.bin?uploadId=my_id', custom_method=method) gdal.ErrorReset() with webserver.install_http_handler(handler): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' handler = webserver.SequentialHandler() handler.add('POST', '/oss_fake_bucket4/large_file_initiate_403_error.bin?uploads', 403) handler.add('POST', '/oss_fake_bucket4/large_file_initiate_empty_result.bin?uploads', 200) handler.add('POST', '/oss_fake_bucket4/large_file_initiate_invalid_xml_result.bin?uploads', 200, {}, 'foo') handler.add('POST', '/oss_fake_bucket4/large_file_initiate_no_uploadId.bin?uploads', 200, {}, '<foo/>') with webserver.install_http_handler(handler): for filename in ['/vsioss/oss_fake_bucket4/large_file_initiate_403_error.bin', '/vsioss/oss_fake_bucket4/large_file_initiate_empty_result.bin', '/vsioss/oss_fake_bucket4/large_file_initiate_invalid_xml_result.bin', '/vsioss/oss_fake_bucket4/large_file_initiate_no_uploadId.bin']: with gdaltest.config_option('VSIOSS_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None with gdaltest.error_handler(): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == 0 gdal.ErrorReset() gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '' handler = webserver.SequentialHandler() handler.add('POST', '/oss_fake_bucket4/large_file_upload_part_403_error.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/oss_fake_bucket4/large_file_upload_part_403_error.bin?partNumber=1&uploadId=my_id', 403) handler.add('DELETE', '/oss_fake_bucket4/large_file_upload_part_403_error.bin?uploadId=my_id', 204) handler.add('POST', '/oss_fake_bucket4/large_file_upload_part_no_etag.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/oss_fake_bucket4/large_file_upload_part_no_etag.bin?partNumber=1&uploadId=my_id', 200) handler.add('DELETE', '/oss_fake_bucket4/large_file_upload_part_no_etag.bin?uploadId=my_id', 204) with webserver.install_http_handler(handler): for filename in ['/vsioss/oss_fake_bucket4/large_file_upload_part_403_error.bin', '/vsioss/oss_fake_bucket4/large_file_upload_part_no_etag.bin']: with gdaltest.config_option('VSIOSS_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None, filename with gdaltest.error_handler(): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == 0, filename gdal.ErrorReset() gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() == '', filename # Simulate failure in AbortMultipart stage handler = webserver.SequentialHandler() handler.add('POST', '/oss_fake_bucket4/large_file_abortmultipart_403_error.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/oss_fake_bucket4/large_file_abortmultipart_403_error.bin?partNumber=1&uploadId=my_id', 403) handler.add('DELETE', '/oss_fake_bucket4/large_file_abortmultipart_403_error.bin?uploadId=my_id', 403) filename = '/vsioss/oss_fake_bucket4/large_file_abortmultipart_403_error.bin' with webserver.install_http_handler(handler): with gdaltest.config_option('VSIOSS_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None, filename with gdaltest.error_handler(): ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == 0, filename gdal.ErrorReset() with gdaltest.error_handler(): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '', filename # Simulate failure in CompleteMultipartUpload stage handler = webserver.SequentialHandler() handler.add('POST', '/oss_fake_bucket4/large_file_completemultipart_403_error.bin?uploads', 200, {}, '<?xml version="1.0" encoding="UTF-8"?><InitiateMultipartUploadResult><UploadId>my_id</UploadId></InitiateMultipartUploadResult>') handler.add('PUT', '/oss_fake_bucket4/large_file_completemultipart_403_error.bin?partNumber=1&uploadId=my_id', 200, {'ETag': 'first_etag'}, '') handler.add('PUT', '/oss_fake_bucket4/large_file_completemultipart_403_error.bin?partNumber=2&uploadId=my_id', 200, {'ETag': 'second_etag'}, '') handler.add('POST', '/oss_fake_bucket4/large_file_completemultipart_403_error.bin?uploadId=my_id', 403) # handler.add('DELETE', '/oss_fake_bucket4/large_file_completemultipart_403_error.bin?uploadId=my_id', 204) filename = '/vsioss/oss_fake_bucket4/large_file_completemultipart_403_error.bin' with webserver.install_http_handler(handler): with gdaltest.config_option('VSIOSS_CHUNK_SIZE', '1'): # 1 MB f = gdal.VSIFOpenL(filename, 'wb') assert f is not None, filename ret = gdal.VSIFWriteL(big_buffer, 1, size, f) assert ret == size, filename gdal.ErrorReset() with gdaltest.error_handler(): gdal.VSIFCloseL(f) assert gdal.GetLastErrorMsg() != '', filename ############################################################################### # Test Mkdir() / Rmdir() def test_visoss_7(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oss_bucket_test_mkdir/dir/', 404, {'Connection': 'close'}) handler.add('GET', '/oss_bucket_test_mkdir/?delimiter=%2F&max-keys=100&prefix=dir%2F', 404, {'Connection': 'close'}) handler.add('PUT', '/oss_bucket_test_mkdir/dir/', 200) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsioss/oss_bucket_test_mkdir/dir', 0) assert ret == 0 # Try creating already existing directory handler = webserver.SequentialHandler() handler.add('GET', '/oss_bucket_test_mkdir/dir/', 416) with webserver.install_http_handler(handler): ret = gdal.Mkdir('/vsioss/oss_bucket_test_mkdir/dir', 0) assert ret != 0 handler = webserver.SequentialHandler() handler.add('DELETE', '/oss_bucket_test_mkdir/dir/', 204) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsioss/oss_bucket_test_mkdir/dir') assert ret == 0 # Try deleting already deleted directory handler = webserver.SequentialHandler() handler.add('GET', '/oss_bucket_test_mkdir/dir/', 404) handler.add('GET', '/oss_bucket_test_mkdir/?delimiter=%2F&max-keys=100&prefix=dir%2F', 404, {'Connection': 'close'}) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsioss/oss_bucket_test_mkdir/dir') assert ret != 0 # Try deleting non-empty directory handler = webserver.SequentialHandler() handler.add('GET', '/oss_bucket_test_mkdir/dir_nonempty/', 416) handler.add('GET', '/oss_bucket_test_mkdir/?delimiter=%2F&max-keys=100&prefix=dir_nonempty%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix>dir_nonempty/</Prefix> <Contents> <Key>dir_nonempty/test.txt</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> </ListBucketResult> """) with webserver.install_http_handler(handler): ret = gdal.Rmdir('/vsioss/oss_bucket_test_mkdir/dir_nonempty') assert ret != 0 ############################################################################### # Test handling of file and directory with same name def test_visoss_8(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/visoss_8/?delimiter=%2F', 200, {'Content-type': 'application/xml'}, """<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult> <Prefix></Prefix> <Contents> <Key>test</Key> <LastModified>1970-01-01T00:00:01.000Z</LastModified> <Size>40</Size> </Contents> <CommonPrefixes> <Prefix>test/</Prefix> </CommonPrefixes> </ListBucketResult> """) with webserver.install_http_handler(handler): listdir = gdal.ReadDir('/vsioss/visoss_8', 0) assert listdir == ['test', 'test/'] handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert not stat.S_ISDIR(gdal.VSIStatL('/vsioss/visoss_8/test').mode) handler = webserver.SequentialHandler() with webserver.install_http_handler(handler): assert stat.S_ISDIR(gdal.VSIStatL('/vsioss/visoss_8/test/').mode) ############################################################################### def test_visoss_stop_webserver(): if gdaltest.webserver_port == 0: pytest.skip() # Clearcache needed to close all connections, since the Python server # can only handle one connection at a time gdal.VSICurlClearCache() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Nominal cases (require valid credentials) def test_visoss_extra_1(): if not gdaltest.built_against_curl(): pytest.skip() # Either a bucket name or bucket/filename OSS_RESOURCE = gdal.GetConfigOption('OSS_RESOURCE') if gdal.GetConfigOption('OSS_SECRET_ACCESS_KEY') is None: pytest.skip('Missing OSS_SECRET_ACCESS_KEY') elif gdal.GetConfigOption('OSS_ACCESS_KEY_ID') is None: pytest.skip('Missing OSS_ACCESS_KEY_ID') elif OSS_RESOURCE is None: pytest.skip('Missing OSS_RESOURCE') if '/' not in OSS_RESOURCE: path = '/vsioss/' + OSS_RESOURCE statres = gdal.VSIStatL(path) assert statres is not None and stat.S_ISDIR(statres.mode), \ ('%s is not a valid bucket' % path) readdir = gdal.ReadDir(path) assert readdir is not None, 'ReadDir() should not return empty list' for filename in readdir: if filename != '.': subpath = path + '/' + filename assert gdal.VSIStatL(subpath) is not None, \ ('Stat(%s) should not return an error' % subpath) unique_id = 'visoss_test' subpath = path + '/' + unique_id ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id in readdir, \ ('ReadDir(%s) should contain %s' % (path, unique_id)) ret = gdal.Mkdir(subpath, 0) assert ret != 0, ('Mkdir(%s) repeated should return an error' % subpath) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) readdir = gdal.ReadDir(path) assert unique_id not in readdir, \ ('ReadDir(%s) should not contain %s' % (path, unique_id)) ret = gdal.Rmdir(subpath) assert ret != 0, ('Rmdir(%s) repeated should return an error' % subpath) ret = gdal.Mkdir(subpath, 0) assert ret >= 0, ('Mkdir(%s) should not return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'wb') assert f is not None gdal.VSIFWriteL('hello', 1, 5, f) gdal.VSIFCloseL(f) ret = gdal.Rmdir(subpath) assert ret != 0, \ ('Rmdir(%s) on non empty directory should return an error' % subpath) f = gdal.VSIFOpenL(subpath + '/test.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 5, f).decode('utf-8') assert data == 'hello' gdal.VSIFCloseL(f) ret = gdal.Unlink(subpath + '/test.txt') assert ret >= 0, \ ('Unlink(%s) should not return an error' % (subpath + '/test.txt')) ret = gdal.Rmdir(subpath) assert ret >= 0, ('Rmdir(%s) should not return an error' % subpath) return f = open_for_read('/vsioss/' + OSS_RESOURCE) assert f is not None, ('cannot open %s' % ('/vsioss/' + OSS_RESOURCE)) ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 # Same with /vsioss_streaming/ f = open_for_read('/vsioss_streaming/' + OSS_RESOURCE) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 if False: # pylint: disable=using-constant-test # we actually try to read at read() time and bSetError = false: # Invalid bucket : "The specified bucket does not exist" gdal.ErrorReset() f = open_for_read('/vsioss/not_existing_bucket/foo') with gdaltest.error_handler(): gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert gdal.VSIGetLastErrorMsg() != '' # Invalid resource gdal.ErrorReset() f = open_for_read('/vsioss_streaming/' + OSS_RESOURCE + '/invalid_resource.baz') assert f is None, gdal.VSIGetLastErrorMsg() # Test GetSignedURL() signed_url = gdal.GetSignedURL('/vsioss/' + OSS_RESOURCE) f = open_for_read('/vsicurl_streaming/' + signed_url) assert f is not None ret = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) assert len(ret) == 1 ############################################################################### def test_visoss_cleanup(): for var in gdaltest.oss_vars: gdal.SetConfigOption(var, gdaltest.oss_vars[var]) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pytest.ini�����������������������������������������������������������������������0000664�0001750�0001750�00000000717�13701057752�014740� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[pytest] python_files = *.py testpaths = ogr gcore gdrivers osr alg gnm utilities pyscripts norecursedirs = ogr/data env = # GDAL_RUN_SLOW_TESTS=NO # GDAL_DOWNLOAD_TEST_DATA=NO # DYLD_LIBRARY_PATH=../gdal # LD_LIBRARY_PATH=../gdal # GDAL_DATA=../gdal/data # GDAL_DRIVER_PATH=/usr/lib/gdal/gdalplugins markers = require_driver: Skip test(s) if driver isn't present require_run_on_demand: Skip test(s) if RUN_ON_DEMAND environment variable is not set�������������������������������������������������gdalautotest-3.1.2/pyscripts/�����������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057760�014741� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_retile.py����������������������������������������������������0000775�0001750�0001750�00000030320�13701057757�020634� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdal_retile.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_retile.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import shutil import os from osgeo import gdal from osgeo import osr import test_py_scripts import pytest ############################################################################### # Test gdal_retile.py def test_gdal_retile_1(): script_path = test_py_scripts.get_py_script('gdal_retile') if script_path is None: pytest.skip() try: os.mkdir('tmp/outretile') except OSError: pass test_py_scripts.run_py_script(script_path, 'gdal_retile', '-v -levels 2 -r bilinear -targetDir tmp/outretile ../gcore/data/byte.tif') ds = gdal.Open('tmp/outretile/byte_1_1.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None ds = gdal.Open('tmp/outretile/1/byte_1_1.tif') assert ds.RasterXSize == 10 # if ds.GetRasterBand(1).Checksum() != 1152: # print(ds.GetRasterBand(1).Checksum()) # return 'fail' ds = None ds = gdal.Open('tmp/outretile/2/byte_1_1.tif') assert ds.RasterXSize == 5 # if ds.GetRasterBand(1).Checksum() != 215: # print(ds.GetRasterBand(1).Checksum()) # return 'fail' ds = None ############################################################################### # Test gdal_retile.py with RGBA dataset def test_gdal_retile_2(): script_path = test_py_scripts.get_py_script('gdal_retile') if script_path is None: pytest.skip() try: os.mkdir('tmp/outretile2') except OSError: pass test_py_scripts.run_py_script(script_path, 'gdal_retile', '-v -levels 2 -r bilinear -targetDir tmp/outretile2 ../gcore/data/rgba.tif') ds = gdal.Open('tmp/outretile2/2/rgba_1_1.tif') assert ds.GetRasterBand(1).Checksum() == 35, 'wrong checksum for band 1' assert ds.GetRasterBand(4).Checksum() == 35, 'wrong checksum for band 4' ds = None ############################################################################### # Test gdal_retile.py with input images of different pixel sizes def test_gdal_retile_3(): script_path = test_py_scripts.get_py_script('gdal_retile') if script_path is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') wkt = srs.ExportToWkt() # Create two images to tile together. The images will cover the geographic # range 0E-30E and 0-60N, split horizontally at 30N. The pixel size in the # second image will be twice that of the first time. If the make the first # image black and the second gray, then the result of tiling these two # together should be gray square stacked on top of a black square. # # 60 N --------------- # | | \ # | 50x50 | \ Image 2 # | | / # | | / # 30 N --------------- # | | \ # | 100x100 | \ Image 1 # | | / # | | / # 0 N --------------- # 0 E 30 E ds = drv.Create('tmp/in1.tif', 100, 100, 1) px1_x = 30.0 / ds.RasterXSize px1_y = 30.0 / ds.RasterYSize ds.SetProjection(wkt) ds.SetGeoTransform([0, px1_x, 0, 30, 0, -px1_y]) ds.GetRasterBand(1).Fill(0) ds = None ds = drv.Create('tmp/in2.tif', 50, 50, 1) px2_x = 30.0 / ds.RasterXSize px2_y = 30.0 / ds.RasterYSize ds.SetProjection(wkt) ds.SetGeoTransform([0, px2_x, 0, 60, 0, -px2_y]) ds.GetRasterBand(1).Fill(42) ds = None try: os.mkdir('tmp/outretile3') except OSError: pass test_py_scripts.run_py_script(script_path, 'gdal_retile', '-v -levels 2 -r bilinear -targetDir tmp/outretile3 tmp/in1.tif tmp/in2.tif') ds = gdal.Open('tmp/outretile3/in1_1_1.tif') assert ds.GetProjectionRef().find('WGS 84') != -1, \ ('Expected WGS 84\nGot : %s' % (ds.GetProjectionRef())) gt = ds.GetGeoTransform() expected_gt = [0, px1_x, 0, 60, 0, -px1_y] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 100 and ds.RasterYSize == 200, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) assert ds.RasterCount == 1, ('Wrong raster count : %d ' % (ds.RasterCount)) assert ds.GetRasterBand(1).Checksum() == 38999, 'Wrong checksum' ############################################################################### # Test gdal_retile.py -overlap def test_gdal_retile_4(): script_path = test_py_scripts.get_py_script('gdal_retile') if script_path is None: pytest.skip() try: os.mkdir('tmp/outretile4') except OSError: pass test_py_scripts.run_py_script(script_path, 'gdal_retile', '-v -ps 8 7 -overlap 3 -targetDir tmp/outretile4 ../gcore/data/byte.tif') expected_results = [['tmp/outretile4/byte_1_1.tif', 8, 7], ['tmp/outretile4/byte_1_2.tif', 8, 7], ['tmp/outretile4/byte_1_3.tif', 8, 7], ['tmp/outretile4/byte_1_4.tif', 5, 7], ['tmp/outretile4/byte_2_1.tif', 8, 7], ['tmp/outretile4/byte_2_2.tif', 8, 7], ['tmp/outretile4/byte_2_3.tif', 8, 7], ['tmp/outretile4/byte_2_4.tif', 5, 7], ['tmp/outretile4/byte_3_1.tif', 8, 7], ['tmp/outretile4/byte_3_2.tif', 8, 7], ['tmp/outretile4/byte_3_3.tif', 8, 7], ['tmp/outretile4/byte_3_4.tif', 5, 7], ['tmp/outretile4/byte_4_1.tif', 8, 7], ['tmp/outretile4/byte_4_2.tif', 8, 7], ['tmp/outretile4/byte_4_3.tif', 8, 7], ['tmp/outretile4/byte_4_4.tif', 5, 7], ['tmp/outretile4/byte_5_1.tif', 8, 4], ['tmp/outretile4/byte_5_2.tif', 8, 4], ['tmp/outretile4/byte_5_3.tif', 8, 4], ['tmp/outretile4/byte_5_4.tif', 5, 4]] for (filename, width, height) in expected_results: ds = gdal.Open(filename) assert ds.RasterXSize == width, filename assert ds.RasterYSize == height, filename ds = None test_py_scripts.run_py_script(script_path, 'gdal_retile', '-v -levels 1 -ps 8 8 -overlap 4 -targetDir tmp/outretile4 ../gcore/data/byte.tif') expected_results = [['tmp/outretile4/byte_1_1.tif', 8, 8], ['tmp/outretile4/byte_1_2.tif', 8, 8], ['tmp/outretile4/byte_1_3.tif', 8, 8], ['tmp/outretile4/byte_1_4.tif', 8, 8], ['tmp/outretile4/byte_2_1.tif', 8, 8], ['tmp/outretile4/byte_2_2.tif', 8, 8], ['tmp/outretile4/byte_2_3.tif', 8, 8], ['tmp/outretile4/byte_2_4.tif', 8, 8], ['tmp/outretile4/byte_3_1.tif', 8, 8], ['tmp/outretile4/byte_3_2.tif', 8, 8], ['tmp/outretile4/byte_3_3.tif', 8, 8], ['tmp/outretile4/byte_3_4.tif', 8, 8], ['tmp/outretile4/byte_4_1.tif', 8, 8], ['tmp/outretile4/byte_4_2.tif', 8, 8], ['tmp/outretile4/byte_4_3.tif', 8, 8], ['tmp/outretile4/byte_4_4.tif', 8, 8], ['tmp/outretile4/1/byte_1_1.tif', 8, 8], ['tmp/outretile4/1/byte_1_2.tif', 6, 8], ['tmp/outretile4/1/byte_2_1.tif', 8, 6], ['tmp/outretile4/1/byte_2_2.tif', 6, 6]] for (filename, width, height) in expected_results: ds = gdal.Open(filename) assert ds.RasterXSize == width, filename assert ds.RasterYSize == height, filename ds = None ############################################################################### # Test gdal_retile.py with input having a NoData value def test_gdal_retile_5(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy as np except (ImportError, AttributeError): pytest.skip() nodata_value = -3.4028234663852886e+38 raster_array = np.array(([0.0, 2.0], [-1.0, nodata_value])) script_path = test_py_scripts.get_py_script('gdal_retile') if script_path is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') wkt = srs.ExportToWkt() ds = drv.Create('tmp/in5.tif', 2, 2, 1, gdal.GDT_Float32) px1_x = 0.1 / ds.RasterXSize px1_y = 0.1 / ds.RasterYSize ds.SetProjection(wkt) ds.SetGeoTransform([0, px1_x, 0, 30, 0, -px1_y]) raster_band = ds.GetRasterBand(1) raster_band.SetNoDataValue(nodata_value) raster_band.WriteArray(raster_array) raster_band = None ds = None try: os.mkdir('tmp/outretile5') except OSError: pass test_py_scripts.run_py_script(script_path, 'gdal_retile', '-v -targetDir tmp/outretile5 tmp/in5.tif') ds = gdal.Open('tmp/outretile5/in5_1_1.tif') raster_band = ds.GetRasterBand(1) assert raster_band.GetNoDataValue() == nodata_value, \ ('Wrong nodata value.\nExpected %f, Got: %f' % (nodata_value, raster_band.GetNoDataValue())) min_val, max_val = raster_band.ComputeRasterMinMax() assert max_val, \ ('Wrong maximum value.\nExpected 2.0, Got: %f' % max_val) assert min_val == -1.0, \ ('Wrong minimum value.\nExpected -1.0, Got: %f' % min_val) ds = None ############################################################################### # Cleanup def test_gdal_retile_cleanup(): lst = ['tmp/outretile/1/byte_1_1.tif', 'tmp/outretile/2/byte_1_1.tif', 'tmp/outretile/byte_1_1.tif', 'tmp/outretile/1', 'tmp/outretile/2', 'tmp/outretile', 'tmp/outretile2/1/rgba_1_1.tif', 'tmp/outretile2/2/rgba_1_1.tif', 'tmp/outretile2/1', 'tmp/outretile2/2', 'tmp/outretile2/rgba_1_1.tif', 'tmp/outretile2', 'tmp/in1.tif', 'tmp/in2.tif', 'tmp/outretile3/1/in1_1_1.tif', 'tmp/outretile3/2/in1_1_1.tif', 'tmp/outretile3/1', 'tmp/outretile3/2', 'tmp/outretile3/in1_1_1.tif', 'tmp/outretile3', 'tmp/in5.tif'] for filename in lst: try: os.remove(filename) except OSError: try: os.rmdir(filename) except OSError: pass shutil.rmtree('tmp/outretile4') if os.path.exists('tmp/outretile5'): shutil.rmtree('tmp/outretile5') ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_calc.py������������������������������������������������������0000775�0001750�0001750�00000032620�13701057757�020257� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_calc.py 25549 2013-01-26 11:17:10Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_calc.py testing # Author: Etienne Tourigny <etourigny dot dev @ gmail dot com> # ############################################################################### # Copyright (c) 2013, Even Rouault <even dot rouault @ spatialys.com> # Copyright (c) 2014, Etienne Tourigny <etourigny dot dev @ gmail dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import shutil from osgeo import gdal import test_py_scripts import pytest # test that gdalnumeric is available, if not skip all tests gdalnumeric_not_available = False try: from osgeo import gdalnumeric gdalnumeric.BandRasterIONumPy except (ImportError, AttributeError): gdalnumeric_not_available = True # Usage: gdal_calc.py [-A <filename>] [--A_band] [-B...-Z filename] [other_options] ############################################################################### # test basic copy def test_gdal_calc_py_1(): if gdalnumeric_not_available: pytest.skip('gdalnumeric is not available, skipping all tests') script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() shutil.copy('../gcore/data/stefan_full_rgba.tif', 'tmp/test_gdal_calc_py.tif') test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --calc=A --overwrite --outfile tmp/test_gdal_calc_py_1_1.tif') test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --A_band=2 --calc=A --overwrite --outfile tmp/test_gdal_calc_py_1_2.tif') test_py_scripts.run_py_script(script_path, 'gdal_calc', '-Z tmp/test_gdal_calc_py.tif --Z_band=2 --calc=Z --overwrite --outfile tmp/test_gdal_calc_py_1_3.tif') ds1 = gdal.Open('tmp/test_gdal_calc_py_1_1.tif') ds2 = gdal.Open('tmp/test_gdal_calc_py_1_2.tif') ds3 = gdal.Open('tmp/test_gdal_calc_py_1_3.tif') assert ds1 is not None, 'ds1 not found' assert ds2 is not None, 'ds2 not found' assert ds3 is not None, 'ds3 not found' assert ds1.GetRasterBand(1).Checksum() == 12603, 'ds1 wrong checksum' assert ds2.GetRasterBand(1).Checksum() == 58561, 'ds2 wrong checksum' assert ds3.GetRasterBand(1).Checksum() == 58561, 'ds3 wrong checksum' ds1 = None ds2 = None ds3 = None ############################################################################### # test simple formulas def test_gdal_calc_py_2(): if gdalnumeric_not_available: pytest.skip() script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --A_band 1 -B tmp/test_gdal_calc_py.tif --B_band 2 --calc=A+B --overwrite --outfile tmp/test_gdal_calc_py_2_1.tif') test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --A_band 1 -B tmp/test_gdal_calc_py.tif --B_band 2 --calc=A*B --overwrite --outfile tmp/test_gdal_calc_py_2_2.tif') test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --A_band 1 --calc="sqrt(A)" --type=Float32 --overwrite --outfile tmp/test_gdal_calc_py_2_3.tif') ds1 = gdal.Open('tmp/test_gdal_calc_py_2_1.tif') ds2 = gdal.Open('tmp/test_gdal_calc_py_2_2.tif') ds3 = gdal.Open('tmp/test_gdal_calc_py_2_3.tif') assert ds1 is not None, 'ds1 not found' assert ds2 is not None, 'ds2 not found' assert ds3 is not None, 'ds3 not found' assert ds1.GetRasterBand(1).Checksum() == 12368, 'ds1 wrong checksum' assert ds2.GetRasterBand(1).Checksum() == 62785, 'ds2 wrong checksum' assert ds3.GetRasterBand(1).Checksum() == 47132, 'ds3 wrong checksum' ds1 = None ds2 = None ds3 = None ############################################################################### # test --allBands option (simple copy) def test_gdal_calc_py_3(): if gdalnumeric_not_available: pytest.skip() script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --allBands A --calc=A --overwrite --outfile tmp/test_gdal_calc_py_3.tif') ds = gdal.Open('tmp/test_gdal_calc_py_3.tif') assert ds is not None, 'ds not found' assert ds.GetRasterBand(1).Checksum() == 12603, 'band 1 wrong checksum' assert ds.GetRasterBand(2).Checksum() == 58561, 'band 2 wrong checksum' assert ds.GetRasterBand(3).Checksum() == 36064, 'band 3 wrong checksum' assert ds.GetRasterBand(4).Checksum() == 10807, 'band 4 wrong checksum' ds = None ############################################################################### # test --allBands option (simple calc) def test_gdal_calc_py_4(): if gdalnumeric_not_available: pytest.skip() script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() # some values are clipped to 255, but this doesn't matter... small values were visually checked test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif --calc=1 --overwrite --outfile tmp/test_gdal_calc_py_4_1.tif') test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif -B tmp/test_gdal_calc_py_4_1.tif --B_band 1 --allBands A --calc=A+B --NoDataValue=999 --overwrite --outfile tmp/test_gdal_calc_py_4_2.tif') ds1 = gdal.Open('tmp/test_gdal_calc_py_4_2.tif') assert ds1 is not None, 'ds1 not found' assert ds1.GetRasterBand(1).Checksum() == 29935, 'ds1 band 1 wrong checksum' assert ds1.GetRasterBand(2).Checksum() == 13128, 'ds1 band 2 wrong checksum' assert ds1.GetRasterBand(3).Checksum() == 59092, 'ds1 band 3 wrong checksum' ds1 = None # these values were not tested test_py_scripts.run_py_script(script_path, 'gdal_calc', '-A tmp/test_gdal_calc_py.tif -B tmp/test_gdal_calc_py.tif --B_band 1 --allBands A --calc=A*B --NoDataValue=999 --overwrite --outfile tmp/test_gdal_calc_py_4_3.tif') ds2 = gdal.Open('tmp/test_gdal_calc_py_4_3.tif') assert ds2 is not None, 'ds2 not found' assert ds2.GetRasterBand(1).Checksum() == 10025, 'ds2 band 1 wrong checksum' assert ds2.GetRasterBand(2).Checksum() == 62785, 'ds2 band 2 wrong checksum' assert ds2.GetRasterBand(3).Checksum() == 10621, 'ds2 band 3 wrong checksum' ds2 = None ############################################################################### # test python interface, basic copy def test_gdal_calc_py_5(): if gdalnumeric_not_available: pytest.skip('gdalnumeric is not available, skipping all tests') script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() backup_sys_path = sys.path sys.path.insert(0, script_path) import gdal_calc shutil.copy('../gcore/data/stefan_full_rgba.tif', 'tmp/test_gdal_calc_py.tif') gdal_calc.Calc('A', A='tmp/test_gdal_calc_py.tif', overwrite=True, quiet=True, outfile='tmp/test_gdal_calc_py_5_1.tif') gdal_calc.Calc('A', A='tmp/test_gdal_calc_py.tif', A_band=2, overwrite=True, quiet=True, outfile='tmp/test_gdal_calc_py_5_2.tif') gdal_calc.Calc('Z', Z='tmp/test_gdal_calc_py.tif', Z_band=2, overwrite=True, quiet=True, outfile='tmp/test_gdal_calc_py_5_3.tif') sys.path = backup_sys_path ds1 = gdal.Open('tmp/test_gdal_calc_py_5_1.tif') ds2 = gdal.Open('tmp/test_gdal_calc_py_5_2.tif') ds3 = gdal.Open('tmp/test_gdal_calc_py_5_3.tif') assert ds1 is not None, 'ds1 not found' assert ds2 is not None, 'ds2 not found' assert ds3 is not None, 'ds3 not found' assert ds1.GetRasterBand(1).Checksum() == 12603, 'ds1 wrong checksum' assert ds2.GetRasterBand(1).Checksum() == 58561, 'ds2 wrong checksum' assert ds3.GetRasterBand(1).Checksum() == 58561, 'ds3 wrong checksum' ds1 = None ds2 = None ds3 = None ############################################################################### # test nodata def test_gdal_calc_py_6(): if gdalnumeric_not_available: pytest.skip('gdalnumeric is not available, skipping all tests') script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() backup_sys_path = sys.path sys.path.insert(0, script_path) import gdal_calc gdal.Translate('tmp/test_gdal_calc_py.tif', '../gcore/data/byte.tif', options='-a_nodata 74') gdal_calc.Calc('A', A='tmp/test_gdal_calc_py.tif', overwrite=True, quiet=True, outfile='tmp/test_gdal_calc_py_6.tif', NoDataValue=1) sys.path = backup_sys_path ds = gdal.Open('tmp/test_gdal_calc_py_6.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 4673 result = ds.GetRasterBand(1).ComputeRasterMinMax() assert result == (90, 255) ############################################################################### # test --optfile def test_gdal_calc_py_7(): if gdalnumeric_not_available: pytest.skip('gdalnumeric is not available, skipping all tests') script_path = test_py_scripts.get_py_script('gdal_calc') if script_path is None: pytest.skip() shutil.copy('../gcore/data/stefan_full_rgba.tif', 'tmp/test_gdal_calc_py.tif') with open('tmp/opt1', 'w') as f: f.write('-A tmp/test_gdal_calc_py.tif --calc=A --overwrite --outfile tmp/test_gdal_calc_py_7_1.tif') # Lines in optfiles beginning with '#' should be ignored with open('tmp/opt2', 'w') as f: f.write('-A tmp/test_gdal_calc_py.tif --A_band=2 --calc=A --overwrite --outfile tmp/test_gdal_calc_py_7_2.tif') f.write('\n# -A_band=1') # options on separate lines should work, too opts = '-Z tmp/test_gdal_calc_py.tif', '--Z_band=2', '--calc=Z', '--overwrite', '--outfile tmp/test_gdal_calc_py_7_3.tif' with open('tmp/opt3', 'w') as f: for i in opts: f.write(i + '\n') # double-quoted options should be read as single arguments. Mixed numbers of arguments per line should work. opts = '-Z tmp/test_gdal_calc_py.tif --Z_band=2', '--calc "Z + 0"', '--overwrite --outfile tmp/test_gdal_calc_py_7_4.tif' with open('tmp/opt4', 'w') as f: for i in opts: f.write(i + '\n') test_py_scripts.run_py_script(script_path, 'gdal_calc', '--optfile tmp/opt1') test_py_scripts.run_py_script(script_path, 'gdal_calc', '--optfile tmp/opt2') test_py_scripts.run_py_script(script_path, 'gdal_calc', '--optfile tmp/opt3') test_py_scripts.run_py_script(script_path, 'gdal_calc', '--optfile tmp/opt4') ds1 = gdal.Open('tmp/test_gdal_calc_py_7_1.tif') ds2 = gdal.Open('tmp/test_gdal_calc_py_7_2.tif') ds3 = gdal.Open('tmp/test_gdal_calc_py_7_3.tif') ds4 = gdal.Open('tmp/test_gdal_calc_py_7_4.tif') assert ds1 is not None, 'ds1 not found' assert ds2 is not None, 'ds2 not found' assert ds3 is not None, 'ds3 not found' assert ds4 is not None, 'ds4 not found' assert ds1.GetRasterBand(1).Checksum() == 12603, 'ds1 wrong checksum' assert ds2.GetRasterBand(1).Checksum() == 58561, 'ds2 wrong checksum' assert ds3.GetRasterBand(1).Checksum() == 58561, 'ds3 wrong checksum' assert ds4.GetRasterBand(1).Checksum() == 58561, 'ds4 wrong checksum' ds1 = None ds2 = None ds3 = None ds4 = None def test_gdal_calc_py_cleanup(): lst = ['tmp/test_gdal_calc_py.tif', 'tmp/test_gdal_calc_py_1_1.tif', 'tmp/test_gdal_calc_py_1_2.tif', 'tmp/test_gdal_calc_py_1_3.tif', 'tmp/test_gdal_calc_py_2_1.tif', 'tmp/test_gdal_calc_py_2_2.tif', 'tmp/test_gdal_calc_py_2_3.tif', 'tmp/test_gdal_calc_py_3.tif', 'tmp/test_gdal_calc_py_4_1.tif', 'tmp/test_gdal_calc_py_4_2.tif', 'tmp/test_gdal_calc_py_4_3.tif', 'tmp/test_gdal_calc_py_5_1.tif', 'tmp/test_gdal_calc_py_5_2.tif', 'tmp/test_gdal_calc_py_5_3.tif', 'tmp/test_gdal_calc_py_6.tif', 'tmp/test_gdal_calc_py_7_1.tif', 'tmp/test_gdal_calc_py_7_2.tif', 'tmp/test_gdal_calc_py_7_3.tif', 'tmp/test_gdal_calc_py_7_4.tif', 'tmp/opt1', 'tmp/opt2', 'tmp/opt3', ] for filename in lst: try: os.remove(filename) except OSError: pass ����������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_edit.py������������������������������������������������������0000775�0001750�0001750�00000031107�13701057757�020301� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_edit.py ab00f7e8c605da8c38bf70640943067b5050199d 2020-03-06 10:22:31 +0100 Anton Wagensonner $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_edit.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import shutil from osgeo import gdal import test_py_scripts import pytest # Usage: gdal_edit [--help-general] [-a_srs srs_def] [-a_ullr ulx uly lrx lry] # [-tr xres yres] [-a_nodata value] # [-unsetgt] [-stats] [-approx_stats] # [-gcp pixel line easting northing [elevation]]* # [-mo "META-TAG=VALUE"]* datasetname ############################################################################### # Test -a_srs, -a_ullr, -a_nodata, -mo, -unit def test_gdal_edit_py_1(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') if sys.platform == 'win32': # Passing utf-8 characters doesn't at least please Wine... val = 'fake-utf8' val_encoded = val elif sys.version_info >= (3, 0, 0): val = '\u00e9ven' val_encoded = val else: exec("val = u'\\u00e9ven'") val_encoded = val.encode('utf-8') test_py_scripts.run_py_script(script_path, 'gdal_edit', 'tmp/test_gdal_edit_py.tif -a_srs EPSG:4326 -a_ullr 2 50 3 49 -a_nodata 123 -mo FOO=BAR -units metre -mo UTF8=' + val_encoded + ' -mo ' + val_encoded + '=UTF8') ds = gdal.Open('tmp/test_gdal_edit_py.tif') wkt = ds.GetProjectionRef() gt = ds.GetGeoTransform() nd = ds.GetRasterBand(1).GetNoDataValue() md = ds.GetMetadata() units = ds.GetRasterBand(1).GetUnitType() ds = None assert wkt.find('4326') != -1 expected_gt = (2.0, 0.050000000000000003, 0.0, 50.0, 0.0, -0.050000000000000003) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-10) assert nd == 123 assert md['FOO'] == 'BAR' assert md['UTF8'] == val assert md[val] == 'UTF8' assert units == 'metre' ############################################################################### # Test -a_ulurll def test_gdal_edit_py_1b(): script = 'gdal_edit' folder = test_py_scripts.get_py_script(script) if folder is None: pytest.skip() image = 'tmp/test_gdal_edit_py.tif' shutil.copy('../gcore/data/byte.tif', image) for points, expected in ( ('2 50 3 50 2 49', (2, 0.05, 0, 50, 0, -0.05)), # not rotated ('25 70 55 80 35 40', (25, 1.5, 0.5, 70, 0.5, -1.5)), # rotated CCW ('25 70 55 65 20 40', (25, 1.5, -0.25, 70, -0.25, -1.5)), # rotated CW ): arguments = image + ' -a_ulurll ' + points assert test_py_scripts.run_py_script(folder, script, arguments) == '' assert gdal.Open(image).GetGeoTransform() == pytest.approx(expected) ############################################################################### # Test -unsetgt def test_gdal_edit_py_2(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -unsetgt") ds = gdal.Open('tmp/test_gdal_edit_py.tif') wkt = ds.GetProjectionRef() gt = ds.GetGeoTransform(can_return_null=True) ds = None assert gt is None assert wkt != '' ############################################################################### # Test -a_srs '' def test_gdal_edit_py_3(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -a_srs ''") ds = gdal.Open('tmp/test_gdal_edit_py.tif') wkt = ds.GetProjectionRef() gt = ds.GetGeoTransform() ds = None assert gt != (0.0, 1.0, 0.0, 0.0, 0.0, 1.0) assert wkt == '' ############################################################################### # Test -unsetstats def test_gdal_edit_py_4(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') ds = gdal.Open('tmp/test_gdal_edit_py.tif', gdal.GA_Update) band = ds.GetRasterBand(1) band.ComputeStatistics(False) band.SetMetadataItem('FOO', 'BAR') ds = band = None ds = gdal.Open('tmp/test_gdal_edit_py.tif') band = ds.GetRasterBand(1) assert (not (band.GetMetadataItem('STATISTICS_MINIMUM') is None or band.GetMetadataItem('FOO') is None)) ds = band = None test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -unsetstats") ds = gdal.Open('tmp/test_gdal_edit_py.tif') band = ds.GetRasterBand(1) assert (not (band.GetMetadataItem('STATISTICS_MINIMUM') is not None or band.GetMetadataItem('FOO') is None)) ds = band = None with pytest.raises(OSError): os.stat('tmp/test_gdal_edit_py.tif.aux.xml') ############################################################################### # Test -stats def test_gdal_edit_py_5(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() try: from osgeo import gdalnumeric gdalnumeric.BandRasterIONumPy except: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') ds = gdal.Open('tmp/test_gdal_edit_py.tif', gdal.GA_Update) band = ds.GetRasterBand(1) array = band.ReadAsArray() # original minimum is 74; modify a pixel value from 99 to 22 array[15, 12] = 22 band.WriteArray(array) ds = band = None ds = gdal.Open('tmp/test_gdal_edit_py.tif') assert ds.ReadAsArray()[15, 12] == 22 ds = None test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -stats") ds = gdal.Open('tmp/test_gdal_edit_py.tif') stat_min = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') assert stat_min is not None and float(stat_min) == 22 ds = None ds = gdal.Open('tmp/test_gdal_edit_py.tif', gdal.GA_Update) band = ds.GetRasterBand(1) array = band.ReadAsArray() array[15, 12] = 26 band.WriteArray(array) ds = band = None ds = gdal.Open('tmp/test_gdal_edit_py.tif') assert ds.ReadAsArray()[15, 12] == 26 ds = None test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -stats") ds = gdal.Open('tmp/test_gdal_edit_py.tif') stat_min = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') assert stat_min is not None and float(stat_min) == 26 ds = None ############################################################################### # Test -setstats def test_gdal_edit_py_6(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') # original values should be min=74, max=255, mean=126.765 StdDev=22.928470838676 test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -setstats None None None None") ds = gdal.Open('tmp/test_gdal_edit_py.tif') stat_min = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') assert stat_min is not None and float(stat_min) == 74 stat_max = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MAXIMUM') assert stat_max is not None and float(stat_max) == 255 stat_mean = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MEAN') assert not (stat_mean is None or float(stat_mean) != pytest.approx(126.765, abs=0.001)) stat_stddev = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_STDDEV') assert not (stat_stddev is None or float(stat_stddev) != pytest.approx(22.928, abs=0.001)) ds = None test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -setstats 22 217 100 30") ds = gdal.Open('tmp/test_gdal_edit_py.tif') stat_min = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') assert stat_min is not None and float(stat_min) == 22 stat_max = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MAXIMUM') assert stat_max is not None and float(stat_max) == 217 stat_mean = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MEAN') assert stat_mean is not None and float(stat_mean) == 100 stat_stddev = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_STDDEV') assert stat_stddev is not None and float(stat_stddev) == 30 ds = None ############################################################################### # Test -scale and -offset def test_gdal_edit_py_7(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdal_edit_py.tif') test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -scale 2 -offset 3") ds = gdal.Open('tmp/test_gdal_edit_py.tif') assert ds.GetRasterBand(1).GetScale() == 2 assert ds.GetRasterBand(1).GetOffset() == 3 ds = None shutil.copy('../gcore/data/1bit_2bands.tif', 'tmp/test_gdal_edit_py.tif') test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -scale 2 4 -offset 10 20") ds = gdal.Open('tmp/test_gdal_edit_py.tif') for i in [1, 2]: assert ds.GetRasterBand(i).GetScale() == i*2 assert ds.GetRasterBand(i).GetOffset() == i*10 ds = None ############################################################################### # Test -colorinterp_X def test_gdal_edit_py_8(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() gdal.Translate('tmp/test_gdal_edit_py.tif', '../gcore/data/byte.tif', options='-b 1 -b 1 -b 1 -b 1 -co PHOTOMETRIC=RGB -co ALPHA=NO') test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -colorinterp_4 alpha") ds = gdal.Open('tmp/test_gdal_edit_py.tif') assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -colorinterp_4 undefined") ds = gdal.Open('tmp/test_gdal_edit_py.tif') assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_Undefined ############################################################################### def test_gdal_edit_py_unsetrpc(): script_path = test_py_scripts.get_py_script('gdal_edit') if script_path is None: pytest.skip() gdal.Translate('tmp/test_gdal_edit_py.tif', '../gcore/data/byte_rpc.tif') test_py_scripts.run_py_script(script_path, 'gdal_edit', "tmp/test_gdal_edit_py.tif -unsetrpc") ds = gdal.Open('tmp/test_gdal_edit_py.tif') assert not ds.GetMetadata('RPC') ############################################################################### # Cleanup def test_gdal_edit_py_cleanup(): gdal.Unlink('tmp/test_gdal_edit_py.tif') ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal2tiles.py�����������������������������������������������������0000775�0001750�0001750�00000041663�13701057757�020427� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal2tiles.py eeb2fa5f70e4dd7c12e5a94d7cefbddafe6f1034 2020-07-01 12:00:56 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal2tiles.py testing # Author: Even Rouault <even dot rouault @ spatialys dot com> # ############################################################################### # Copyright (c) 2015, Even Rouault <even dot rouault @ spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import shutil from osgeo import gdal # noqa import test_py_scripts # noqa # pylint: disable=E0401 import pytest def _verify_raster_band_checksums(filename, expected_cs=[]): ds = gdal.Open(filename) if ds is None: pytest.fail('cannot open output file "%s"' % filename) num_bands = len(expected_cs) for i in range(num_bands): if ds.GetRasterBand(i + 1).Checksum() != expected_cs[i]: for j in range(num_bands): print(ds.GetRasterBand(j + 1).Checksum()) pytest.fail('wrong checksum for band %d (file %s)' % (i + 1, filename)) ds = None def test_gdal2tiles_py_simple(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() shutil.copy('../gdrivers/data/small_world.tif', 'tmp/out_gdal2tiles_smallworld.tif') os.chdir('tmp') test_py_scripts.run_py_script( script_path, 'gdal2tiles', '-q out_gdal2tiles_smallworld.tif') os.chdir('..') os.unlink('tmp/out_gdal2tiles_smallworld.tif') _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.png', expected_cs = [25314, 28114, 6148, 59026] ) for filename in ['googlemaps.html', 'leaflet.html', 'openlayers.html', 'tilemapresource.xml']: assert os.path.exists('tmp/out_gdal2tiles_smallworld/' + filename), \ ('%s missing' % filename) def test_gdal2tiles_py_zoom_option(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) # Because of multiprocessing, run as external process, to avoid issues with # Ubuntu 12.04 and socket.setdefaulttimeout() # as well as on Windows that doesn't manage to fork test_py_scripts.run_py_script_as_external_script( script_path, 'gdal2tiles', '-q --force-kml --processes=2 -z 0-1 ../gdrivers/data/small_world.tif tmp/out_gdal2tiles_smallworld') _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/1/0/0.png', expected_cs = [8130, 10496, 65274, 63715] ) ds = gdal.Open('tmp/out_gdal2tiles_smallworld/doc.kml') assert ds is not None, 'did not get kml' def test_gdal2tiles_py_resampling_option(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() resampling_list = [ 'average', 'near', 'bilinear', 'cubic', 'cubicspline', 'lanczos', 'antialias', 'mode', 'max', 'min', 'med', 'q1', 'q3'] try: from PIL import Image import numpy import osgeo.gdal_array as gdalarray del Image, numpy, gdalarray except ImportError: # 'antialias' resampling is not available resampling_list.remove('antialias') out_dir = 'tmp/out_gdal2tiles_smallworld' for resample in resampling_list: shutil.rmtree(out_dir, ignore_errors=True) test_py_scripts.run_py_script_as_external_script( script_path, 'gdal2tiles', '-q --resampling={0} {1} {2}'.format( resample, '../gdrivers/data/small_world.tif', out_dir)) # very basic check ds = gdal.Open('tmp/out_gdal2tiles_smallworld/0/0/0.png') if ds is None: pytest.fail('resample option {0!r} failed'.format(resample)) ds = None shutil.rmtree(out_dir, ignore_errors=True) def test_gdal2tiles_py_xyz(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() try: shutil.copy('../gdrivers/data/small_world.tif', 'tmp/out_gdal2tiles_smallworld_xyz.tif') os.chdir('tmp') ret = test_py_scripts.run_py_script( script_path, 'gdal2tiles', '-q --xyz --zoom=0-1 out_gdal2tiles_smallworld_xyz.tif') os.chdir('..') assert 'ERROR ret code' not in ret os.unlink('tmp/out_gdal2tiles_smallworld_xyz.tif') _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld_xyz/0/0/0.png', expected_cs = [30616, 31851, 9392, 63557] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld_xyz/1/0/0.png', expected_cs = [25095, 27337, 10068, 63699] ) for filename in ['googlemaps.html', 'leaflet.html', 'openlayers.html']: assert os.path.exists('tmp/out_gdal2tiles_smallworld_xyz/' + filename), \ ('%s missing' % filename) assert not os.path.exists('tmp/out_gdal2tiles_smallworld_xyz/tilemapresource.xml') finally: shutil.rmtree('tmp/out_gdal2tiles_smallworld_xyz') def test_gdal2tiles_py_invalid_srs(): """ Case where the input image is not georeferenced, i.e. it's missing the SRS info, and no --s_srs option is provided. The script should fail validation and terminate. """ script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() shutil.copy('../gdrivers/data/test_nosrs.vrt', 'tmp/out_gdal2tiles_test_nosrs.vrt') shutil.copy('../gdrivers/data/byte.tif', 'tmp/byte.tif') os.chdir('tmp') # try running on image with missing SRS ret = test_py_scripts.run_py_script( script_path, 'gdal2tiles', '-q --zoom=0-1 out_gdal2tiles_test_nosrs.vrt') # this time pass the spatial reference system via cli options ret2 = test_py_scripts.run_py_script( script_path, 'gdal2tiles', '-q --zoom=0-1 --s_srs EPSG:4326 out_gdal2tiles_test_nosrs.vrt') os.chdir('..') os.unlink('tmp/out_gdal2tiles_test_nosrs.vrt') os.unlink('tmp/byte.tif') shutil.rmtree('tmp/out_gdal2tiles_test_nosrs') assert 'ERROR ret code = 2' in ret assert 'ERROR ret code' not in ret2 def test_does_not_error_when_source_bounds_close_to_tiles_bound(): """ Case where the border coordinate of the input file is inside a tile T but the first pixel is actually assigned to the tile next to T (nearest neighbour), meaning that when the query is done to get the content of T, nothing is returned from the raster. """ in_files = ['./data/test_bounds_close_to_tile_bounds_x.vrt', './data/test_bounds_close_to_tile_bounds_y.vrt'] out_folder = 'tmp/out_gdal2tiles_bounds_approx' try: shutil.rmtree(out_folder) except Exception: pass script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() try: for in_file in in_files: test_py_scripts.run_py_script( script_path, 'gdal2tiles', '-q -z 21-21 %s %s' % (in_file, out_folder)) except TypeError: pytest.fail( 'Case of tile not getting any data not handled properly ' '(tiles at the border of the image)') def test_does_not_error_when_nothing_to_put_in_the_low_zoom_tile(): """ Case when the highest zoom level asked is actually too low for any pixel of the raster to be selected """ in_file = './data/test_bounds_close_to_tile_bounds_x.vrt' out_folder = 'tmp/out_gdal2tiles_bounds_approx' try: shutil.rmtree(out_folder) except OSError: pass script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() try: test_py_scripts.run_py_script( script_path, 'gdal2tiles', '-q -z 10 %s %s' % (in_file, out_folder)) except TypeError: pytest.fail( 'Case of low level tile not getting any data not handled properly ' '(tile at a zoom level too low)') def test_python2_handles_utf8_by_default(): if sys.version_info[0] >= 3: pytest.skip() return _test_utf8(should_raise_unicode=False) @pytest.mark.skip("This behaviour doesn't actually work as expected") def test_python2_gives_warning_if_bad_lc_ctype_and_non_ascii_chars(): if sys.version_info[0] >= 3: pytest.skip() lc_ctype = os.environ.get("LC_CTYPE", "") os.environ['LC_CTYPE'] = 'fr_FR.latin-1' ret = _test_utf8(should_raise_unicode=False, quiet=False, should_display_warning=True) os.environ['LC_CTYPE'] = lc_ctype return ret def test_python2_does_not_give_warning_if_bad_lc_ctype_and_all_ascii_chars(): if sys.version_info[0] >= 3: pytest.skip() lc_ctype = os.environ.get("LC_CTYPE", "") os.environ['LC_CTYPE'] = 'fr_FR.latin-1' ret = _test_utf8(should_raise_unicode=False, quiet=False, should_display_warning=False, input_file='./data/test_bounds_close_to_tile_bounds_x.vrt') os.environ['LC_CTYPE'] = lc_ctype return ret def test_python2_does_not_give_warning_if_bad_lc_ctype_and_non_ascii_chars_in_folder(): if sys.version_info[0] >= 3: pytest.skip() lc_ctype = os.environ.get("LC_CTYPE", "") os.environ['LC_CTYPE'] = 'fr_FR.latin-1' ret = _test_utf8(should_raise_unicode=False, quiet=False, should_display_warning=False, input_file='./data/漢字/test_bounds_close_to_tile_bounds_x.vrt') os.environ['LC_CTYPE'] = lc_ctype return ret def test_python3_handle_utf8_by_default(): if sys.version_info[0] < 3: pytest.skip() return _test_utf8(should_raise_unicode=False) def _test_utf8(should_raise_unicode=False, quiet=True, should_display_warning=False, input_file="data/test_utf8_漢字.vrt"): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() out_folder = 'tmp/utf8_test' try: shutil.rmtree(out_folder) except OSError: pass args = '-z 21 %s %s' % (input_file, out_folder) if quiet: args = "-q " + args try: ret = test_py_scripts.run_py_script(script_path, 'gdal2tiles', args) print(ret) except UnicodeEncodeError: if should_raise_unicode: return pytest.fail('Should be handling filenames with utf8 characters in this context') assert not should_raise_unicode, \ 'Should not be handling filenames with utf8 characters in this context' if should_display_warning: assert "WARNING" in ret and "LC_CTYPE" in ret, \ 'Should display a warning message about LC_CTYPE variable' else: assert not ("WARNING" in ret and "LC_CTYPE" in ret), \ 'Should not display a warning message about LC_CTYPE variable' try: shutil.rmtree(out_folder) except OSError: pass def test_gdal2tiles_py_cleanup(): lst = ['tmp/out_gdal2tiles_smallworld', 'tmp/out_gdal2tiles_bounds_approx'] for filename in lst: try: shutil.rmtree(filename) except Exception: pass def test_exclude_transparent_tiles(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() output_folder = 'tmp/test_exclude_transparent_tiles' os.makedirs(output_folder) try: test_py_scripts.run_py_script_as_external_script( script_path, 'gdal2tiles', '-x -z 14-16 data/test_gdal2tiles_exclude_transparent.tif %s' % output_folder) # First row totally transparent - no tiles tiles_folder = os.path.join(output_folder, '15', '21898') dir_files = os.listdir(tiles_folder) assert not dir_files, ('Generated empty tiles for row 21898: %s' % dir_files) # Second row - only 2 non-transparent tiles tiles_folder = os.path.join(output_folder, '15', '21899') dir_files = sorted(os.listdir(tiles_folder)) assert ['22704.png', '22705.png'] == dir_files, \ ('Generated empty tiles for row 21899: %s' % dir_files) # Third row - only 1 non-transparent tile tiles_folder = os.path.join(output_folder, '15', '21900') dir_files = os.listdir(tiles_folder) assert ['22705.png'] == dir_files, \ ('Generated empty tiles for row 21900: %s' % dir_files) finally: shutil.rmtree(output_folder) def test_gdal2tiles_py_profile_raster(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) test_py_scripts.run_py_script_as_external_script( script_path, 'gdal2tiles', '-q -p raster -z 0-1 ../gdrivers/data/small_world.tif tmp/out_gdal2tiles_smallworld') if sys.platform != 'win32': # For some reason, the checksums on the kml file on Windows are the ones of the below png _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.kml', expected_cs = [29839, 34244, 42706, 64319] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.png', expected_cs = [10125, 10802, 27343, 48852] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/1/0/0.png', expected_cs = [62125, 59756, 43894, 38539] ) shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) def test_gdal2tiles_py_profile_raster_xyz(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) test_py_scripts.run_py_script_as_external_script( script_path, 'gdal2tiles', '-q -p raster --xyz -z 0-1 ../gdrivers/data/small_world.tif tmp/out_gdal2tiles_smallworld') if sys.platform != 'win32': # For some reason, the checksums on the kml file on Windows are the ones of the below png _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.kml', expected_cs = [27644, 31968, 38564, 64301] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.png', expected_cs = [11468, 10719, 27582, 48827] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/1/0/0.png', expected_cs = [60550, 62572, 46338, 38489] ) shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) def test_gdal2tiles_py_profile_geodetic_tmscompatible_xyz(): script_path = test_py_scripts.get_py_script('gdal2tiles') if script_path is None: pytest.skip() shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) test_py_scripts.run_py_script_as_external_script( script_path, 'gdal2tiles', '-q -p geodetic --tmscompatible --xyz -z 0-1 ../gdrivers/data/small_world.tif tmp/out_gdal2tiles_smallworld') if sys.platform != 'win32': # For some reason, the checksums on the kml file on Windows are the ones of the below png _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.kml', expected_cs = [12361, 18212, 21827, 5934] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/0/0/0.png', expected_cs = [8560, 8031, 7209, 17849] ) _verify_raster_band_checksums( 'tmp/out_gdal2tiles_smallworld/1/0/0.png', expected_cs = [2799, 3468, 8686, 17849] ) shutil.rmtree('tmp/out_gdal2tiles_smallworld', ignore_errors=True) �����������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdalinfo_py.py����������������������������������������������������0000775�0001750�0001750�00000020373�13701057757�020663� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdalinfo_py.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdalinfo.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import test_py_scripts import pytest ############################################################################### # Simple test def test_gdalinfo_py_1(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gcore/data/byte.tif') assert ret.find('Driver: GTiff/GeoTIFF') != -1 ############################################################################### # Test -checksum option def test_gdalinfo_py_2(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-checksum ../gcore/data/byte.tif') assert ret.find('Checksum=4672') != -1 ############################################################################### # Test -nomd option def test_gdalinfo_py_3(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gcore/data/byte.tif') assert ret.find('Metadata') != -1 ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-nomd ../gcore/data/byte.tif') assert ret.find('Metadata') == -1 ############################################################################### # Test -noct option def test_gdalinfo_py_4(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gdrivers/data/bug407.gif') assert ret.find('0: 255,255,255,255') != -1 ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-noct ../gdrivers/data/bug407.gif') assert ret.find('0: 255,255,255,255') == -1 ############################################################################### # Test -stats option def test_gdalinfo_py_5(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() try: os.remove('../gcore/data/byte.tif.aux.xml') except OSError: pass ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gcore/data/byte.tif') assert ret.find('STATISTICS_MINIMUM=74') == -1, 'got wrong minimum.' ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-stats ../gcore/data/byte.tif') assert ret.find('STATISTICS_MINIMUM=74') != -1, 'got wrong minimum (2).' # We will blow an exception if the file does not exist now! os.remove('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test a dataset with overviews and RAT def test_gdalinfo_py_6(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gdrivers/data/int.img') assert ret.find('Overviews') != -1 ############################################################################### # Test a dataset with GCPs def test_gdalinfo_py_7(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gcore/data/gcps.vrt') assert ret.find('GCP Projection =') != -1 assert ret.find('PROJCS["NAD27 / UTM zone 11N"') != -1 assert ret.find('(100,100) -> (446720,3745320,0)') != -1 # Same but with -nogcps ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-nogcp ../gcore/data/gcps.vrt') assert ret.find('GCP Projection =') == -1 assert ret.find('PROJCS["NAD27 / UTM zone 11N"') == -1 assert ret.find('(100,100) -> (446720,3745320,0)') == -1 ############################################################################### # Test -hist option def test_gdalinfo_py_8(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() try: os.remove('../gcore/data/byte.tif.aux.xml') except OSError: pass ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gcore/data/byte.tif') assert ret.find('0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 57 0 0 0 0 0 0 0 62 0 0 0 0 0 0 0 66 0 0 0 0 0 0 0 0 72 0 0 0 0 0 0 0 31 0 0 0 0 0 0 0 24 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1') == -1, \ 'did not expect histogram.' ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-hist ../gcore/data/byte.tif') assert ret.find('0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 57 0 0 0 0 0 0 0 62 0 0 0 0 0 0 0 66 0 0 0 0 0 0 0 0 72 0 0 0 0 0 0 0 31 0 0 0 0 0 0 0 24 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1') != -1, \ 'did not get expected histogram.' # We will blow an exception if the file does not exist now! os.remove('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test -mdd option def test_gdalinfo_py_9(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gdrivers/data/fake_nsif.ntf') assert ret.find('BLOCKA=010000001000000000') == -1, 'Got unexpected extra MD.' ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-mdd TRE ../gdrivers/data/fake_nsif.ntf') assert ret.find('BLOCKA=010000001000000000') != -1, 'did not get extra MD.' ############################################################################### # Test -mm option def test_gdalinfo_py_10(): script_path = test_py_scripts.get_py_script('gdalinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '../gcore/data/byte.tif') assert ret.find('Computed Min/Max=74.000,255.000') == -1 ret = test_py_scripts.run_py_script(script_path, 'gdalinfo', '-mm ../gcore/data/byte.tif') assert ret.find('Computed Min/Max=74.000,255.000') != -1 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057752�015653� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/test_bounds_close_to_tile_bounds_y.vrt����������������������������0000664�0001750�0001750�00000002754�13701057752�025557� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<VRTDataset rasterXSize="802" rasterYSize="423"> <SRS>PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32631"]]</SRS> <GeoTransform> 6.5614318824000005e+05, 2.4702942643333180e-02, 0.0000000000000000e+00, 6.5219694422600009e+06, 0.0000000000000000e+00, -2.4686193855448537e-02</GeoTransform> <Metadata> <MDI key="AREA_OR_POINT">Area</MDI> <MDI key="TIFFTAG_SOFTWARE">pix4dmapper</MDI> </Metadata> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Red</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Green</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Blue</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="4"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Alpha</ColorInterp> </VRTRasterBand> </VRTDataset> ��������������������gdalautotest-3.1.2/pyscripts/data/test_latin1_é.vrt������������������������������������������������0000664�0001750�0001750�00000003074�13701057752�021556� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<VRTDataset rasterXSize="504" rasterYSize="454"> <SRS>PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]</SRS> <GeoTransform> 6.3490506599999999e+05, 4.7627007652033447e-02, 0.0000000000000000e+00, 8.1392822900000000e+06, 0.0000000000000000e+00, -4.7657934423650940e-02</GeoTransform> <Metadata> <MDI key="AREA_OR_POINT">Area</MDI> <MDI key="TIFFTAG_SOFTWARE">pix4dmapper</MDI> </Metadata> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Red</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Green</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Blue</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="4"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Alpha</ColorInterp> </VRTRasterBand> </VRTDataset> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/test_gdal2tiles_exclude_transparent.tif���������������������������0000664�0001750�0001750�00000132757�13701057752�025621� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*���������������������������������������a���Z�����������������a�������������R�������S������ ������ ������� ���.���!���n����������p���p������C����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������p���p����������o����@�� �� ��� �������������������� ��"��$��u&��e(��U*��M,��I.��A0��82��34��/6��%8��:���<��=��?��A��C��E��G��I��K��M��O��Q��S��uU��mW��eY��`[��X]��J_��=a��1c��$e��g��i�� k��m��n��p��r��t��v��x��z��|��~������������{��k��d��`��\��X��L��D��?��/��������������������د��ñ��G��[����c��ӵ������=�@'E=@��������������������������������TR'YA|l}]A������������������������������#� ��� ���)#WGS 84 / Pseudo-Mercator|WGS 84|����������������������������������������������������������������������������������������������������������������������������������������������������������������������||+_PKh^]GEF�����������������������������+Հ~~}~~���������������}�A��������������?37B10@--E/27paL|z{x�&��������������CgfkXXZfclqottqh{zx`ּ{yz{yzzxyz�x�&��������������O`_ZUTOTSN[WTiebqli{vslgcxq}~|z{|z{zxyywx~�Á��������������;_^YRQLTSNTSNhdaiebje_ytn[VS|z{}�z|z{zxy|��������������c`_[^]XPOJWVR[ZVnjgyuribZxupvro}{|}{|}~xz}~}~~z{~��������������_ZYTVUPQPKUTPdc_yurgc`a]TZYT}{|~|}|z{~~}��������������_VUPSRMONIXWRifaurme\SZUOVQN~|}}~zxy}{|ywxywxywz��������������_ZYUWXSVWRXWR{zuwrne]Z^YSONI}~~|}{yz}~}~vtutrsxvw��������������_cb^_^ZIEB^YVrqlmlgf\Z^VSJKEzxy|z{ywxzxyzxy��������������Uqpk[[QYVQolgxtq_\U\WQXWSvwr{|z{~~~|}{w�y�|�ف��������������[hgbtqlxup^ZWZWPUTOmmk~~|}|z{{yz{yzwwywwy{|~s���������������_wvqyxs`_Z``X]\W^]Y}{|}{||z{|}z{rts��������������_ZYU|srmpojMLGQPL}{|~xzywxzpqu��������������_dfeacbegf*,+]^XVWOLMEutr~~ttvtuznot��������������|/enmUYXempZY^HZ_YKLGvwr~|}~|}ghj*.7swzhlo��������������8Q(6NRQqmnDmojnnl~GJO~kor��������������=WA\Bcv^hi@~|}UZ`yx}nlm��������������?6R>^(Toj}\[Y}~���� ]adzmnr��������������G8T3V SdKj|ba\y���yxy}afj��������������C8Q7NKdFgzjieeZVnv{yz����w�qlpqaff́��������������C?XG]Lvmjcbdcxoj��� wv{{zgkl�������������MgvBon}|w^_ZO,*).�yz|vwy{|~ijl�������������A_kke`ZLMG98=}z}~�z{}xy{mnp�������������G}|xutpPSLTXY~�yz~w{|hlm�������������K=cb^lmqrpq�uuwswxmqreij�������������rojqmj_]` !&�$zxyust�} wwyx|}hlm�������������cYj b^[:89wx|�zxywuv�|~}vw{vz}imp�������������iahh`WYVPTW� ~wux� xzyz{imp�������������+fc\XYSuyzz0~|}sqv|}{ljm�������������fg`[\V~|}tvqvxwrrtjjl�������������_`Z}~x�~��xvwuussurrtsfgi������������� dc^}�prqvz}�v��00&ehavz{]ab�������������]_^poj�,ust�{~ggqsyudln�������������cgpPTUvvt0{yz{uy|jkm�������������38>W\` {yz��|{nmrccgE�������������iomecd���� }~}~��uuwttvqpumlq�������������� SUPz~}����������y uuwuuwnmr��������������Y`Ymoj��zxy�|{wv|uuwlln�������������� T[Tbhf���4|z{{{}||~jkmNNu ��������������OWOJPL��� �����zz|xxzooq\^`��������������#Y_[nlo���~���y�wnnpjjl��������������'aefrsngfa����}������u�i�rgkl�������������� ad]gj_UUS##-llj����~�~�����r�okln�������������� y{znoj]`Yqsr=@Ejnq����~�����y�scdf��������������3g`ba]^Xhkd_a`645ljk}��������y�x�nhik�������������� fpo}�n(ghccd_zx{���x|}w{|kqqggj��������������muwgcdTTVIIG\]XvwrIS\]`e��}��~����yy{rvwnrsgmm��������������/x|fb_RQMXWSmifafj%1fjm�������}}tuwptwhlo��������������~�i,fb_ba]ed`}�~��w{|txyjnq��������������eab`��0|xwd`aed`ppr108RQV~���yz|txymqrjlq��������������P�)D��4}.1\q_o=*$</)MD?~���s|{vz{Y]`dei��������������QRM|��$kfbdbpznn}{|~|}}�����x tuwfjkOXW��������������,ywzkjh^YVzyu{xs}x��xxzuuwpprddf�������������� stnf TRURQOhc`ihdppnVVT~�� }}uuwkkm��������������ttryywdRPQYXTfkeojgZ����}{|� xxzjnq^^d+��������������(klpKLP}{|YWXPNOdc_jieglf���(~{|~wxzabd_dg��������������_FGIompHFIc]_OIK^XXea^{swzmnpdeg��������������fgahTlfflffSMM\WThc`{y}~kophik��������������_jidokjgc`c^ZYTN]XThc_{vpHIN512~}sx{ostgkl��������������'kjernmlheUTOdc^cb]qmjmif�0~yUPLyz|nrs��������������fgb}yviebd`]dc^ihcY�z��0~w}~|}pqsjno�������������_ddbijdcd^d`]~z}~yzqrtijl�������������_fe`[^WSXQ}vn^FF}~}{yywnojlln������������� ſgfdzP_^Y`_Z]b[fme}{{|~KG;'�������������jTfbcxwuefacd_cd_AEDz}v}}|u-.0d�!������������� ȾabgaTkghba_QPK~zyzu__]ost|~x|lximv�������������JihmjPtpmlkgPOKwvqvupzwzptukpt�������������G_a^ghcsolxtq]ZSfeaonjljkz~rvyorwglo�������������#stl}zsztspkgd]klftuoX� ~� x|ptukns�������������'{jiesrnssqllj�0x|}x|}osv�������������#S~tso�8x|}mqrgkn�������������#zvs{vnl{�$ wx|mssfll�������������+{vznim}a`\e][pli�z ||~pprijl�������������_312VU[|a`\mlhnoaxv{rqv~vtu}}{uuwlln�������������Gjfgnlmyxsihdlkg52=||~w{|klna��������������wffMKN~<|srn�xxzoprgmm��������������ONTc��4 x{vz}mmmo��������������[GGIUPT~~|}||~tw|osvm���������������]wqsTUP`\]~zw}~}}xxzstvjno��������������_^YXXTUeab|yz{}{{}w{|swzosvgol`�������������� g|qorZ_[\plm{wv@~~ssuptukorgkn��������������v}uYZ\OKJa]Zqmjcdh<uuwlln\]_]ad��������������cebjhiied^ZW~zwZ(OKH|{wvvxssucghKTS��������������Kdbc_]^rnmwsrlhgvrqbaf~tsqxsweil��������������ihfjhi`^_}z}xwto|<|}wx}ptu[���������������`[YZ@>C`^aWUV`\[oge~z][O/#ojn��������������_vyrDAHWUZdbeVRQlhgfc\û}}|{>8:c^Z��������������S|~{^_dKLNXVWgefZWR~zrr|iis��������������_]]_pmxTNN]YVa]Zhdavvxmmokop��������������tupdTVSZXSOea^vro~{~w{|imnhlm�������������� qtifQLR^ZWhid}~(�v{hnnefhimn��������������`|wnmiOKLqnieKL}}~|~}swxlpq_`b��������������_ihd^ZWz{sx|kopfjk��������������_ehaihc{|~quvmqrghj��������������zyu\XWbda.-2 ��srrtiik_���������������Gejcutodc_nmi~sv}XPELGDiil��������������\YT\[Vjie?:>���vz}lr~@<9kki��������������snjc_^||zQRMgfd|{w[[Y�����z ru~eqjko��������������#_ZVUSVljk}a`\ac^FDEvuq�4}z{rvykopgkl��������������Cda\|pnqnlmihdba]GFD{ rswoptkop�������������_HDCEA@~fbaSON\XWyz|mssosthlmb�,�������������#OKJkgf~he`^ZY|{ �qrtqwwimnhlm�������������he^nji{zZYUixvw�$utyqrtimpimn�������������#^ZW}z~\\T}|x,*+0./���qpvhloimp�������������W {a]ZopjWVR ��| xxz\[`Y]`�������������'A=<sonrnkjfc ~qwwihmgfkEGI�������������;fba~}gfb]^Y�uuwptufej\[`�������������?eabUVZ�}}{t�phlkZY^�������������OmljhfgSQ\||zypokihlk�������������Sba]VMN@14wwywOE<iik�������������`AZ63>QRV~yv}}yy{iglihfjjm�������������U4rsn�����~}wwyooqffnbcg�������������;~{|w|z{���~vwyefjRSWZ[_�������������#lkg|b^[Z[V�z{}rsuhik_`dABF�������������A]^Y^_ZVUQ�wx}stynoqVZ[A@F��������������7&%*ccelmgWXSWXS�����}vw{stxlkpHMPROXs��������������7SPWONTwwuQRLVWQ���{zqrvlmqjhm\]a��������������;@CH=;HbbdMMKNOJXYTvup�vw{xv{nlqiglVTY��������������Cxu|<?HghbPPNZ[VRSN||~uz}optijn[\`��������������FEKQ~~|egdLNKWVQ� yy{wwymqthime`d�������������� 98>~~lmhY[X���$xy}qrvlmqghlVW[==Q��������������CLG?>C�WXSWXR~��ty|jnqWX\bcgSTX��������������Fa\=EG {|w]][VVTwvt�,}~vuzrvy]beCGJNRU�������������� ,<9PPQLWXRZ[Uxzysrw]^bAFIEIL�������������� ,39zP^]Y[ZVZYUecd}h\P/- b`TTX[AEHGKN��������������cnlq$)%tw|$(^`[YXTSRN}si70(.$sjcQB;KKIABFMMUi��������������_pzrZ[UYVQ|ryppztcmaW_[ceURY��������������7puy||zac^[\Vqni���vyquutzmdg}XY]��������������7jos~zy[WT`]Vgfa����uvxouskorY\aJKO����������������V(ba]`_Z}��y{vUMBinhbfeILQ��������������RWWqy|W�V [Y\��z{int!kjfZRRẂ��������������'nqv},^Z[YWXYWX~��~~qutnogkt]a`JKF�������������� vzyd0USTWUV|z{|zz|ttvnmrdfrT^gYbk��������������,bb`LKGXVWkij{vvxssuxxzmlq`dgIMP�������������� m�W,ZYU[YZ}~�xy{vqutrsjjlUUW��������������/53]]_Z�TXWU������|{yxy{lhejjl[�Q���������������WXRVWYV}}{�����uyurvrimmollntsy�����������������{0klfhjg}��y�urqolldkkmiik���������������� qpk`e^^]Yv�$�{�s�s�olljpot���������������yy{|}oumk��- nmhuusmmkk�p��������������� GFL��~�MMK9,wsrqqoiigo�q��������������{,񅅃kij�usrxmmoj�lvvt�������������w9sK~z~�w|oryontkjoP�c��������������;|{vgfb�vvxnrstsqnnphhjTTV�������������/~]\X_^Z|�{����zz|vvxtuyhik[]\YY[�������������3lmhWVQceb�����|vvxrrtooqhimIJLMMTB�������������5qpab\h`]c^b~}{���ssq//'hgepnqu~}trx�������������w4~yXYsnh|vv~|����zx{DHKswxrnm~}�������������7z~puyt{xil}{����v�ruvqxxvq�x��������������~,!(.aku|{����}�s�u�l�o�w��������������;TZfEJN|���}�y�w�qqqs\\^�������������<Jwux""*}���z�u�t�sqqs[[]�������������v<{}132BDC~z{��{�s�r�q�rqqs�������������CxsyP=Ag\X|xzytvurtstrsv�u��������������@hkpwno~~�zrtssutqploph���������������Gvxs~~|~vvxuvxnrq$jh\��������������9qmj]SR~|}w }vw{noq^bnNIP���������������9UV[2/8~`a\�xy~ntrnsvjkoGMMefh��������������X]`vvt<~{x|}ptuosvimpY]^X\]��������������?DJ+,><{|w|yz|ostnrs[_b`dgCGH��������������!IJO\`clmq8}|}|mrnostimnTY\WX\��������������\fglJLX}z~}wwucghcfkVY^Y^aJLP|��������������-.0cck�@}45/y[WNsutLME`deCFM[^c[\a��������������FBCfcl;;Cxy}� jigV\\s]ajvwy[\^JJL!��������������c_^}zKGH;9:y���0yuz}mssmt~459^ZY��������������`XV\[W}��(||~ssur nms*)7-14��������������kifԉ_ZW`XVZVS|������� ttvttvo kjoljw==;ׁ��������������a\YTOL[XQWLP������~���wv{ssuooqjjlrpqnmk��������������}zuVQNYTQWTO!%>~��}�������xytsnnpeegXXZkbg��������������#WTOZWRWTOSUbWYp�}�����yuusq ihmooqaac��������������'pnonlmmje[WTHFKUSX�]\Wz�{{}vvxttvkkmWWYljo��������������!wqopWVQ\Y`zw0-4����vxxznnpkkmYY[*%+��������������$}^][kij�� xzumnfm�YSTVHIN��������������'|ypjeahgc��~�{{}rpuGIHc�WPUY��������������'ZWPa^Wdc_����$||~uuwpt}qvypqkeeg��������������+lid[XQfc\yxt�������|tuwyz|ornku���������������+䔐nmh�~�������yvwypqsgpuptwAAÍ��������������+uqnzvs���� zz|xxzqqsnnpprquz}��������������+~zwb^[jdd||~{���yy{ttvpprooqqqsz{��������������/|yVSLd_Yb^_~}x~���ttvc^Xd_emsqy��������������kcaWOMZZX�{z.*+�tuyB@E1,(hglotw�������������?lgd]URXWRUV[NNZHDA�}}tuzSP[i_cblps�������������;{{VQM^YUJIENOS{y~ xxzptwjnqosvPSZ�������������]VPb]Yhc_�� ���~~vvxuuwosvosvrvy�������������ZPNf^[ha[rsn�������utyNNPJJLnsveil�������������TSNXUPb_Z����{�y~~��zzy~SV[lot|�������������gd_\WS_XRTPM���~�znmruty| y{z~~�{�{ ssupqvadk� �������������Jtoi]XTRMIYUR-���{�y�V!vu{xxzxxz||~~�y�w�q�s�������������cZU]XRQMJu�q�z�z�w�'kjoyx}wwyxxzwwyzz|z�y�r�p�~��������������!"$ZVW]VL`[UEDBSSU}�{�z�v�r�t�|��z�yywzwuxu�t�t�w��������������+jli&!%c[X~|}{yz{�v�u{yz}{||}xx vtwzx{sqtr�z��������������/rmg`[Wd`_^^\NPM}~}{|~y�x�}{|wwuvvvxt�q�v�y�C�������������s8 `_]d_Y`\Pa]T]YV{yz~|}Zc`vxw����yyy{pprq�q�w��������������;~|TSQhdaqjbe_SRRTKEG}{|~���y�ummoooqo�x��������������?GAA^TRvmf_VQZ_eiry}{y|~wyx���z�t jjlMMOkjo��������������3SJEaVR[RM-&-}~}{~~}}yyw}� ���q^^`RRT��������������3iebJFCd_[VQM>CG/BQ}yx}{~ywz���}||~vvxWV[?���������������3bZVSVRO]YVLJOryN58{vz}v}� ���z QQSVVXPLM��������������3WSPZYTUTOyxv*(+~|bEJxvw/,3�x�~�|zy~jjlDHIWX\��������������_}mif<;9,+)~}|RRP~}}~~ddfWWYQQS��������������[\~|}hgmlkq))+~{{}rrtPPRTTV��������������@BAAC~y}f^\ 0/5~~${y|nlo@?DV�5��������������MHHJCCEPROhcg�y}<;:?{{y|||~sqta_bd^`��������������"mgkWRVIKHedb:;@DR_7GJO[_`~z~vvx^^`b`e\Z[��������������_;<AVVXa_b\XWedb~~tos]^c||~~|ggiRRTigh��������������QSUV[3??WUX\VV{H~wwu~z{vZY_}~xvvtYY[WUZ��������������Y]`X]als{rzjeiokjD|y}UWcz|{}z{uppncabe���������������3<FFw}qx`ae}~onlhlk>DP>DR }{zxxytuvqV��������������� fx|hu}}�0|nms~}~}yxwsyxt|��������������z}�H}}ciiu{wwv{}~~}~xwuzyu��������������oom@}}.74vxwu�t��������������id`d`]}zu~|}}sonupt|��� xxzt����������������� {[WT_\Ua^Wqqo�|~}{{|~z{������xxzrrtp����������������7;</8=`[Uc^XVRO�}�HGMxafi>CI��~~qqsaacl���������������OIK}YUR}}Z]V457ywz/05���qqsddfddf��������������,()v}{}|xZ~~xzycebvwyuuwwwy|����|mqpprqTUW��������������/JKMiomwnxybce~|{QSR&&.stv~��t$}}|}wolTSOWYT��������������+IGL}gj{pqsmnrz��x�z$}}wv{YKKd_\VXS��������������D@?>\Z[Stx{]ehmkl�(||~YV]WML]YV��������������;i`a?;:RNM[UUvrq}~}yz~egd~|}��~~||~rrtRQYWXZ�������������C=?=98UQP_[Zd`avhlk}@~~oomeij}~}}{zutz_^dOOQ�������������QHITOLB=:\XWXTS* mqr{zyy{z {�{uuwxw|^�[d[[�������������ute[Ye^Xc\Vfa^}�swwuttv{�} }~xvw��ljmkopIKHmlj�������������zpni^\YTPkgd}yv{}|z�{%%#qqsz�}|q�{���Z[`STYDC>�������������#PQLQVRceb}|z|}x}~|~}nxxz}��q�z�u���}qspV\XVWR�������������cbjhrt~|} }|]]_���{�{�~~zyw]_\efh�������������okh!"KJO|xy~}~f,&0qvy~�~|}prmadk2�k�o�������������~*(-WV[{ '&+tuy�|~}{{y{zffhOPT`��������������NNPRRZ|zrts $|{~z~ons015z�k�k�^�G��������������|z}NVXqzxymonx|{<�x{{}wv{YY[ZVUeb]�������������wuxqpn�|{}||4mqt`hkxxv{ tupB@4ida������������� ~~|)(&�Px~|aFK~|~z~yyx}ehma`[rff�������������K}}{|}66>mcYs[Yz�ooqddfbb`_]Z�������������O|yZ}}{$%*qqy})0)HDE~�xiikNhid�������������Gwzsx||~}sqtSTVJPPcdhutr��x ywxhgeED@��������������C~}y~}x#1YYax|{~���r�v~|}][\��������������G}zuyyw#!,yzt\]bopr��}�e�qqop��������������W}{wxzwxsust[�]zvw��������������$pno9<C}0KJFrqm~zxytrsM�i���������������yssffht WV\mpu4yurytqzywutra`^`_[��������������]z[_b|~}{kjha`^A@>��������������?wv|L}xwu{zxCD?��������������C#&5iiuIJO:;?~nslTUPu |y vwrfgba^W��������������}~xX]`%(}ZZXpokxyt}LC:ssqlmh561��������������vvnlutw�{$|}w~�DEJGD?^\]VUQ��������������zyt}~}|U�L$|zyu�wrz}korTVU��������������K[,2}LR|}yy{yxt�~�w�vlip��������������W<rohsn|~stn}�x�w�pxvy�������������� }z|ov$$,|�z�v�o�p���������������~v~}zz|0*.-CFKwvt�|�y�hd`a��������������ihdXVWhrqwk,xupa`\omn�wihmZY^��������������Kvup'&,djh|~}YYatxyC@;wvq��v�i�q���������������O{RQLbaf"'SUTy{xiigutp�|�r�p�y���������������}h<WZSghmnosyz|{{y~||�w�g�y����������������j<PRO//9jkoyxs~D?9`_[v�l�x���������������W~^_ZKABx~z~SSUfjk~zE<7}}j�u���������������#~xmnfD6574=syy}|xd8~ed`TSOvmh|}pnosqr��������������%IDK9;G��{{y{nmksqrmgm*��������������)0rqlcgf�}�z{|w{{yoklusoltvsomrzx{��������������+T\_dnzuyz}~uy|uoq}|wkmjmlq|qspkjhc_\b��������������K{zu$+1>GL~|~}}|O=;vvutrfdeEquv#jb_�������������}�,ppr}}eegz|{R=<rVRtqjk�a�i�ypu{CGHU��������������|{{xy{o�|otpytikjn�~�|�vstxeec�������������{| |}x�$z~rvwlquostwuvxsw}~x�nx|{�������������+wx}#'opk��w�}�potqrl{zxo�y��������������-finFIRlqtTY\%$)aeh��}��ntql~}|z~z{wuv{��������������#~}xaflbgm{{~$nrqnru]XRqlf|~~FC>}xu�������������7뒏{ostdmhtyu{{�{�n ~{t2 {tdwvq{|%"ztl߁�������������??~|yr{{yv||msq}z{swxlpqn {zuxqgi[Nuqxzyloviik�������������?}yveijw{z~x|}swxosrvwrxwtm~txpsqtbaf�������������'}optux}(w}x|}swxpuoz}||um}�u�u��������������;},3;iglHHPtw|yy{{qppn~xjidSOD}�x�n��������������+o^WPTSgejedj106rmqz}rvyqvup/( g`Xee[utyrrtw��������������$ ~smo^ddeittv��0rw{kqquuwH3.wf_5/#vusppnssq�������������)yaJPO)6gmm���~(wyv~}urBmlWLH{xomlq)($de_��������������3mpwydi"{||}xw�|wvtcLF\VV~|}t]\dPN[��������������+gdm21-203yurvvtxJ${pqkmqppr��������������ulnoqkuus~�,@;5yzr}|}xumklwuz��������������!Wtuymuxmqtw�,K>8mf\|{}sol{zv}gefnlo��������������'tw*[^crqv����(R5-ib}a`\sutljk��������������3{rEA@IHN:;=w{~w{~vz}w�v|{Ɩzxysw{~��������������a]\olgrp{j�V8QSPvzyy}{{{}sut9.,~zwzyupnor���������������Wqmj{xsjjbyur|!$-ghlmonx|w{~{vz}qpvttvMGG{]ZSt�s���������������[khatqjole23.`deopt~|~{~y}yioopql{{vJK]ON~|rpsr�f���������������+jbbkha{xqw|stvijldeg4tzxy}~x|}tuw|}z|w}z՟zx{nlorsu��������������?[VRxwrOOMOPUmnp{|~}|txw{uyzuyzzz|wwuutoyxvnnpppr��������������'WTM^YUxwr}:89v{uoqp�tuyzw{|v||nrsrrtu�xyyw {zx@>Cffh��������������WTOc`[ba\vuqm(ptutx{uy|vz{|ptuimnssux�z��z]`e`ff:� ��������������GROHgd]khcvw|sut}{}~{}|vz{quvpturvu{�}�p�w�rsqtiil��������������Gb_Xxun}TRSvz}|}~~vz{swxswxtxy}nrq��u�uppnjhi��������������G^[Tee]qqikjfRPQvtywyxxy{tx{v{~mruv||vwy~�}{|jhipnqplk��������������jg`_\Umme�x0ooqtsxwyx|~}tx{rvylpsstxptu{y|� rpqtmt��������������#b_Xssuqqsooq }z~}w}vz}jnqlmquuwt�� {z@?EUPT��������������+_^Z݋pkevuznnpooq|~yy}~swxmqrnrsvz{�|�{ mlqmlr`[_��������������YZTkg^o�V,yyw}~}x{uyzvz{||~||~~}�{qopsqrc���������������VWQde_wsjnwvf�g||ztzvrxxv||rw{inrr�t��|}}{ssqpnoljk��������������HICjkede_hbnk�z|y{yz|qrtt��� qrmpql��������������'BC=Z[UVWQ}}u{y~eijnu}�x{~v�v��|y}~:>A..6H���������������+VRPijdPNYlkq504<DG��z�p�|�~�|~~stvX^^uy|�������������U<~wq}y}y~}yIJLrsxdbc% w{zqutx|{~}~z��z}zxx((2nttr�������������?sigla]wrv~y}mmosnrumjotp{TZXrtswyx�}}{}|119ijlq��������������7QVOlpokiltrumknuus~{~z|{q{�z||~qrtosvp��������������7QRL\]X~zwtsqvusvzy� {y|wvry{z]ccOSV�������������ccd^XYSw~zvzwr}|~|qop0.3jio]bfrtw�������������+pun|mݦڵv~zwz�wx~}~x}�M�Ovw{yz~�������������spk{rӫܸ^<VUZ{zx~}ywvt~}y{wxpotnmrpno�������������Szwr77-|_GEsB@M}�������������_toixsp||}x{{}xzi(,Z[mmumv{�������������cVQNgfb}z~|z{{{qboXcsyu�������������aU |{v{xfglxxv668XY[tpmB@4~~|wtmbj:=F|z{�������������wxrY\Uklp*)18<E}}}@ihdnos@@J56;tsqjnmxsz�������������|trqtiYZ^ty|uy|wza`e <@Lchnvwqt��������������_`ZIHM=UTR�x kjotuo�������������/UWP󈌍}@FTO]jtuy~{vtuu�s srp~~|uwq�������������/;:8hfg|z{8<EB>3ie\}� EDI!nms('-srmxwr��������������3iebkmj+28bis{��� VU[l�Uaa_xxp��������������5~utr^][&*3'~zwVSL~}x� xvynoqnoqwvt{zx��������������7deg|}rvwumkogd}~x}~��ywzompompzx{{yz��������������;45/97<bbjhge|yt~z|wvrwxs��ywxTUZ,+0ywx~}{xxtp��������������_|qupmiiga`[wvrwwufgbtuo}zKLD}ttvuuw9:>[[]}zz�������������� f`bg�libpok||~wxrUVQuus;:@iikcceqrt{��������������/yxvsrpnkdurmmoj~$yyw}}~{{,,4RSWfea��������������INWfLOXMHB|xojf~khchfitxwy~z|~yuwtz{wwy{{}uifoGEJ~}|x$��������������cFHG418spk|rohrqo~{~afbv|xO+-x|{ijlV[_\Z[TTRlkqwst{ց��������������Xi~~|lmqrnk|urk`]V|vv|z~}rtstvuA*$z[`wt{XZfHN\\]XrWSP��������������_CGR06L8>JnosrojvslrohQNI}|vzyz~}nrqy{z~{{yssz|rw}~}{roj��������������7~uuy|gdk( qha~zqhe^b_X^[Vxxv}mqp~� }{|{yzvusjigtrs}zu��������������3jE=xvrmg`]XURI^ZOzzx~uyx�~��z�yustNLOa_b~��������������4qWXUVwjdgb^ID@VQKzywssqpqk�� xvw~|}uvqoomz|{{x_��������������7B>@0,-qqo}vxk[daWRN[SPg_\z~}{utztt|~|}{yzkeegywxzw��������������7FDGrln,"!ukirmib]Yb[Uje_}~yfkdz{txw%quvywxtrs%)4njk|yt��������������KO6:ttv~zypfdifac^Zkfbofay{~]c_ntr~LKGLHG~|s�V BBJ��������������C`YS}rnpfevroupl^YUc\Vif_{~w}ywyv}~{}|}}{q}|zsurj�g{zv}��������������7".HLO{{yvq^ZQ\XOkb]nic}}qtm~}�� xwu{zxvuziikddbuususkā��������������OHAA#)$KJP{urm[XS^WOlbXmlhpuo{x|}yzuxwuzywkXW\rrpspk��������������cwsj_cn!"snj_ZT]XRg\Xmd]}zz}vv|xuyzwxrstn|rrjtuonnp��������������7}pomolg~uCC;]XRa\Vb]Wi\Tzyu}~vrvwuyx|$uvzsrn}qobhROF~}��������������;{}vcaeW[YMc^Xfa[upl}|wwxp|y}| 1,)ust}{~xxnOtrc��������������_C%'{}|zytklpb_Zb]Y^YV~~|~|{~{~nieRQLxvw}{|nm=wd|v^�N�������������><)vp{~z]ab^ZWe\W\WQUTPqplwyxqwuqut} tsnsrm~zvwxpmrmj�������������cȼ=ole|vwq^YUWRN^VS]TOVQK~~v|sut}{~ywxsqr}xwujieqpl{zv�������������3rnm}vb_ZaYVcUT_USc^Xssk~�yywx}{|zywjig_^Z~}y�������������4rmg~ue[Y[RMe\W^UP^WQa\Vxzy~~|vvto�w F4(uuxvwzxyutr`_[srn�������������+vmfg^U_VQ\SN]TOj_[VMH}~y}~}{ }wvtihfzyu_�������������`utoztd_YcZUcYWg][ndbXNLtup{|wstoz{v|ZSZ}ukjmlgkje~z�������������@xunsnjd[Vd[Vf\ZdZXh^\f\Zyomwxs}~ywxszz�zz|wT:9kbcjeb{zv�������������C|rjea\WScZU^UPXOJ^SQ`USRNEz|wxytvwrxytw�tzzomddfxsp�������������?xif_snh_ZTe`\QNIVQMZROPHEsupwxs~z��t��p feclki�������������/eb[daZjg`rohXXPMLGTSNQNI}yvnnp}~�v�z�~�N jid|{v}A�������������;XUNROHghb{yRXNOLE~uwthhjuusuvp~zzxttrs�ptsRSUzur�������������WTMXWRpslVSLf]X{~wp{|wuvpssq~~|~vtsoW[^jjl�������������#TQJ]YPwxs}~y|}w{{{yzx{kjh}�������������7|wtwyxvxwrrpvwrz|w~wqsqrzxykillki~~|��������������/vz{nttnpkuto{}zpuoustigjzyw���������������+tuxtso|ytvtuighrpu���������������w�|��y~|hfgljk���������������u�skghljk{zx���������������OPRlkiyxt���������������nwws4�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/test_utf8_漢字.vrt����������������������������������������������0000664�0001750�0001750�00000003074�13701057752�022655� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<VRTDataset rasterXSize="504" rasterYSize="454"> <SRS>PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]</SRS> <GeoTransform> 6.3490506599999999e+05, 4.7627007652033447e-02, 0.0000000000000000e+00, 8.1392822900000000e+06, 0.0000000000000000e+00, -4.7657934423650940e-02</GeoTransform> <Metadata> <MDI key="AREA_OR_POINT">Area</MDI> <MDI key="TIFFTAG_SOFTWARE">pix4dmapper</MDI> </Metadata> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Red</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Green</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Blue</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="4"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Alpha</ColorInterp> </VRTRasterBand> </VRTDataset> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/漢字/�����������������������������������������������������������0000775�0001750�0001750�00000000000�13701057752�020107� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/漢字/test_bounds_close_to_tile_bounds_x.vrt���������������������0000664�0001750�0001750�00000003074�13701057752�030006� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<VRTDataset rasterXSize="504" rasterYSize="454"> <SRS>PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]</SRS> <GeoTransform> 6.3490506599999999e+05, 4.7627007652033447e-02, 0.0000000000000000e+00, 8.1392822900000000e+06, 0.0000000000000000e+00, -4.7657934423650940e-02</GeoTransform> <Metadata> <MDI key="AREA_OR_POINT">Area</MDI> <MDI key="TIFFTAG_SOFTWARE">pix4dmapper</MDI> </Metadata> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Red</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Green</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Blue</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="4"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Alpha</ColorInterp> </VRTRasterBand> </VRTDataset> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/data/test_bounds_close_to_tile_bounds_x.vrt����������������������������0000664�0001750�0001750�00000003074�13701057752�025552� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<VRTDataset rasterXSize="504" rasterYSize="454"> <SRS>PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]</SRS> <GeoTransform> 6.3490506599999999e+05, 4.7627007652033447e-02, 0.0000000000000000e+00, 8.1392822900000000e+06, 0.0000000000000000e+00, -4.7657934423650940e-02</GeoTransform> <Metadata> <MDI key="AREA_OR_POINT">Area</MDI> <MDI key="TIFFTAG_SOFTWARE">pix4dmapper</MDI> </Metadata> <VRTRasterBand dataType="Byte" band="1"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Red</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="2"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Green</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="3"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Blue</ColorInterp> </VRTRasterBand> <VRTRasterBand dataType="Byte" band="4"> <NoDataValue>-10000</NoDataValue> <ColorInterp>Alpha</ColorInterp> </VRTRasterBand> </VRTDataset> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_proximity.py�������������������������������������������������0000775�0001750�0001750�00000010304�13701057757�021414� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdal_proximity.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test gdal_proximity.py script # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2008, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import test_py_scripts from osgeo import gdal import pytest ############################################################################### # Test a fairly default case. def test_gdal_proximity_1(): script_path = test_py_scripts.get_py_script('gdal_proximity') if script_path is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') dst_ds = drv.Create('tmp/proximity_1.tif', 25, 25, 1, gdal.GDT_Byte) dst_ds = None test_py_scripts.run_py_script(script_path, 'gdal_proximity', '../alg/data/pat.tif tmp/proximity_1.tif') dst_ds = gdal.Open('tmp/proximity_1.tif') dst_band = dst_ds.GetRasterBand(1) cs_expected = 1941 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Try several options def test_gdal_proximity_2(): script_path = test_py_scripts.get_py_script('gdal_proximity') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_proximity', '-q -values 65,64 -maxdist 12 -nodata -1 -fixed-buf-val 255 ../alg/data/pat.tif tmp/proximity_2.tif') dst_ds = gdal.Open('tmp/proximity_2.tif') dst_band = dst_ds.GetRasterBand(1) cs_expected = 3256 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Try input nodata option def test_gdal_proximity_3(): script_path = test_py_scripts.get_py_script('gdal_proximity') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_proximity', '-q -values 65,64 -maxdist 12 -nodata 0 -use_input_nodata yes ../alg/data/pat.tif tmp/proximity_3.tif') dst_ds = gdal.Open('tmp/proximity_3.tif') dst_band = dst_ds.GetRasterBand(1) cs_expected = 1465 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Cleanup def test_gdal_proximity_cleanup(): lst = ['tmp/proximity_1.tif', 'tmp/proximity_2.tif', 'tmp/proximity_3.tif'] for filename in lst: try: os.remove(filename) except OSError: pass ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_pansharpen.py������������������������������������������������0000775�0001750�0001750�00000007630�13701057757�021517� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_pansharpen.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_pansharpen testing # Author: Even Rouault <even.rouault at spatialys.com> # ############################################################################### # Copyright (c) 2015, Even Rouault <even.rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import test_py_scripts import pytest ############################################################################### # Simple test def test_gdal_pansharpen_1(): script_path = test_py_scripts.get_py_script('gdal_pansharpen') if script_path is None: pytest.skip() src_ds = gdal.Open('../gdrivers/data/small_world.tif') src_data = src_ds.GetRasterBand(1).ReadRaster() gt = src_ds.GetGeoTransform() wkt = src_ds.GetProjectionRef() src_ds = None pan_ds = gdal.GetDriverByName('GTiff').Create('tmp/small_world_pan.tif', 800, 400) gt = [gt[i] for i in range(len(gt))] gt[1] *= 0.5 gt[5] *= 0.5 pan_ds.SetGeoTransform(gt) pan_ds.SetProjection(wkt) pan_ds.GetRasterBand(1).WriteRaster(0, 0, 800, 400, src_data, 400, 200) pan_ds = None test_py_scripts.run_py_script(script_path, 'gdal_pansharpen', ' tmp/small_world_pan.tif ../gdrivers/data/small_world.tif tmp/out.tif') ds = gdal.Open('tmp/out.tif') cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] ds = None gdal.GetDriverByName('GTiff').Delete('tmp/out.tif') assert cs == [4735, 10000, 9742] ############################################################################### # Full options def test_gdal_pansharpen_2(): script_path = test_py_scripts.get_py_script('gdal_pansharpen') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_pansharpen', ' -q -b 3 -b 1 -bitdepth 8 -threads ALL_CPUS -spat_adjust union -w 0.33333333333333333 -w 0.33333333333333333 -w 0.33333333333333333 -of VRT -r cubic tmp/small_world_pan.tif ../gdrivers/data/small_world.tif,band=1 ../gdrivers/data/small_world.tif,band=2 ../gdrivers/data/small_world.tif,band=3 tmp/out.vrt') ds = gdal.Open('tmp/out.vrt') cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] ds = None gdal.GetDriverByName('VRT').Delete('tmp/out.vrt') assert cs == [9742, 4735] ############################################################################### # Cleanup def test_gdal_pansharpen_cleanup(): script_path = test_py_scripts.get_py_script('gdal_pansharpen') if script_path is None: pytest.skip() gdal.GetDriverByName('GTiff').Delete('tmp/small_world_pan.tif') ��������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/tmp/�������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057752�015542� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/tmp/do-not-remove������������������������������������������������������0000664�0001750�0001750�00000000000�13701057752�020146� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_ogrinfo_py.py�����������������������������������������������������0000775�0001750�0001750�00000027202�13701057757�020541� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_ogrinfo_py.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ogrinfo.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import ogrtest import test_py_scripts import pytest ############################################################################### # Simple test def test_ogrinfo_py_1(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp') assert ret.find('ESRI Shapefile') != -1 ############################################################################### # Test -ro option def test_ogrinfo_py_2(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '-ro ../ogr/data/poly.shp') assert ret.find('ESRI Shapefile') != -1 ############################################################################### # Test -al option def test_ogrinfo_py_3(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '-al ../ogr/data/poly.shp') assert ret.find('Feature Count: 10') != -1 ############################################################################### # Test layer name def test_ogrinfo_py_4(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly') assert ret.find('Feature Count: 10') != -1 ############################################################################### # Test -sql option def test_ogrinfo_py_5(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp -sql "select * from poly"') assert ret.find('Feature Count: 10') != -1 ############################################################################### # Test -geom=NO option def test_ogrinfo_py_6(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly -geom=no') assert ret.find('Feature Count: 10') != -1 assert ret.find('POLYGON') == -1 ############################################################################### # Test -geom=SUMMARY option def test_ogrinfo_py_7(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly -geom=summary') assert ret.find('Feature Count: 10') != -1 assert ret.find('POLYGON (') == -1 assert ret.find('POLYGON :') != -1 ############################################################################### # Test -spat option def test_ogrinfo_py_8(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly -spat 479609 4764629 479764 4764817') if ogrtest.have_geos(): assert ret.find('Feature Count: 4') != -1 return else: assert ret.find('Feature Count: 5') != -1 return ############################################################################### # Test -where option def test_ogrinfo_py_9(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly -where "EAS_ID=171"') assert ret.find('Feature Count: 1') != -1 ############################################################################### # Test -fid option def test_ogrinfo_py_10(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly -fid 9') assert ret.find('OGRFeature(poly):9') != -1 ############################################################################### # Test -fields=no option def test_ogrinfo_py_11(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '../ogr/data/poly.shp poly -fields=no') assert ret.find('AREA (Real') == -1 assert ret.find('POLYGON (') != -1 ############################################################################### # Test RFC 41 support def test_ogrinfo_py_22(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() f = open('tmp/test_ogrinfo_22.csv', 'wt') f.write('_WKTgeom1_EPSG_4326,_WKTgeom2_EPSG_32631\n') f.write('"POINT(1 2)","POINT(3 4)"\n') f.close() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', 'tmp/test_ogrinfo_22.csv') assert '1: test_ogrinfo_22 (Unknown (any), Unknown (any))' in ret ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '-al tmp/test_ogrinfo_22.csv') expected_ret = """INFO: Open of `tmp/test_ogrinfo_22.csv' using driver `CSV' successful. Layer name: test_ogrinfo_22 Geometry (geom__WKTgeom1_EPSG_4326): Unknown (any) Geometry (geom__WKTgeom2_EPSG_32631): Unknown (any) Feature Count: 1 Extent (geom__WKTgeom1_EPSG_4326): (1.000000, 2.000000) - (1.000000, 2.000000) Extent (geom__WKTgeom2_EPSG_32631): (3.000000, 4.000000) - (3.000000, 4.000000) SRS WKT (geom__WKTgeom1_EPSG_4326): GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AXIS["Latitude",NORTH], AXIS["Longitude",EAST], AUTHORITY["EPSG","4326"]] SRS WKT (geom__WKTgeom2_EPSG_32631): PROJCS["WGS 84 / UTM zone 31N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",3], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","32631"]] Geometry Column 1 = geom__WKTgeom1_EPSG_4326 Geometry Column 2 = geom__WKTgeom2_EPSG_32631 _WKTgeom1_EPSG_4326: String (0.0) _WKTgeom2_EPSG_32631: String (0.0) OGRFeature(test_ogrinfo_22):1 _WKTgeom1_EPSG_4326 (String) = POINT(1 2) _WKTgeom2_EPSG_32631 (String) = POINT(3 4) geom__WKTgeom1_EPSG_4326 = POINT (1 2) geom__WKTgeom2_EPSG_32631 = POINT (3 4) """ expected_lines = expected_ret.splitlines() lines = ret.splitlines() for i, exp_line in enumerate(expected_lines): assert exp_line == lines[i], ret os.unlink('tmp/test_ogrinfo_22.csv') ############################################################################### # Test -geomfield (RFC 41) support def test_ogrinfo_py_23(): script_path = test_py_scripts.get_py_script('ogrinfo') if script_path is None: pytest.skip() f = open('tmp/test_ogrinfo_23.csv', 'wt') f.write('_WKTgeom1_EPSG_4326,_WKTgeom2_EPSG_32631\n') f.write('"POINT(1 2)","POINT(3 4)"\n') f.write('"POINT(3 4)","POINT(1 2)"\n') f.close() ret = test_py_scripts.run_py_script(script_path, 'ogrinfo', '-al tmp/test_ogrinfo_23.csv -spat 1 2 1 2 -geomfield geom__WKTgeom2_EPSG_32631') expected_ret = """INFO: Open of `tmp/test_ogrinfo_23.csv' using driver `CSV' successful. Layer name: test_ogrinfo_23 Geometry (geom__WKTgeom1_EPSG_4326): Unknown (any) Geometry (geom__WKTgeom2_EPSG_32631): Unknown (any) Feature Count: 1 Extent (geom__WKTgeom1_EPSG_4326): (3.000000, 4.000000) - (3.000000, 4.000000) Extent (geom__WKTgeom2_EPSG_32631): (1.000000, 2.000000) - (1.000000, 2.000000) SRS WKT (geom__WKTgeom1_EPSG_4326): GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AXIS["Latitude",NORTH], AXIS["Longitude",EAST], AUTHORITY["EPSG","4326"]] SRS WKT (geom__WKTgeom2_EPSG_32631): PROJCS["WGS 84 / UTM zone 31N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",3], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","32631"]] Geometry Column 1 = geom__WKTgeom1_EPSG_4326 Geometry Column 2 = geom__WKTgeom2_EPSG_32631 _WKTgeom1_EPSG_4326: String (0.0) _WKTgeom2_EPSG_32631: String (0.0) OGRFeature(test_ogrinfo_23):2 _WKTgeom1_EPSG_4326 (String) = POINT(3 4) _WKTgeom2_EPSG_32631 (String) = POINT(1 2) geom__WKTgeom1_EPSG_4326 = POINT (3 4) geom__WKTgeom2_EPSG_32631 = POINT (1 2) """ expected_lines = expected_ret.splitlines() lines = ret.splitlines() for i, exp_line in enumerate(expected_lines): assert exp_line == lines[i], ret os.unlink('tmp/test_ogrinfo_23.csv') ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_merge.py�����������������������������������������������������0000775�0001750�0001750�00000017657�13701057757�020471� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdal_merge.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_merge.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import osr import test_py_scripts import pytest ############################################################################### # Basic test def test_gdal_merge_1(): script_path = test_py_scripts.get_py_script('gdal_merge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_merge', '-o tmp/test_gdal_merge_1.tif ../gcore/data/byte.tif') ds = gdal.Open('tmp/test_gdal_merge_1.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None ############################################################################### # Merge 4 tiles def test_gdal_merge_2(): script_path = test_py_scripts.get_py_script('gdal_merge') if script_path is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') wkt = srs.ExportToWkt() ds = drv.Create('tmp/in1.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) ds.GetRasterBand(1).Fill(0) ds = None ds = drv.Create('tmp/in2.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([3, 0.1, 0, 49, 0, -0.1]) ds.GetRasterBand(1).Fill(63) ds = None ds = drv.Create('tmp/in3.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([2, 0.1, 0, 48, 0, -0.1]) ds.GetRasterBand(1).Fill(127) ds = None ds = drv.Create('tmp/in4.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([3, 0.1, 0, 48, 0, -0.1]) ds.GetRasterBand(1).Fill(255) ds = None test_py_scripts.run_py_script(script_path, 'gdal_merge', '-q -o tmp/test_gdal_merge_2.tif tmp/in1.tif tmp/in2.tif tmp/in3.tif tmp/in4.tif') ds = gdal.Open('tmp/test_gdal_merge_2.tif') assert ds.GetProjectionRef().find('WGS 84') != -1, \ ('Expected WGS 84\nGot : %s' % (ds.GetProjectionRef())) gt = ds.GetGeoTransform() expected_gt = [2, 0.1, 0, 49, 0, -0.1] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 20 and ds.RasterYSize == 20, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) assert ds.RasterCount == 1, ('Wrong raster count : %d ' % (ds.RasterCount)) assert ds.GetRasterBand(1).Checksum() == 3508, 'Wrong checksum' ############################################################################### # Test -separate and -v options def test_gdal_merge_3(): script_path = test_py_scripts.get_py_script('gdal_merge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_merge', '-separate -v -o tmp/test_gdal_merge_3.tif tmp/in1.tif tmp/in2.tif tmp/in3.tif tmp/in4.tif') ds = gdal.Open('tmp/test_gdal_merge_3.tif') assert ds.GetProjectionRef().find('WGS 84') != -1, \ ('Expected WGS 84\nGot : %s' % (ds.GetProjectionRef())) gt = ds.GetGeoTransform() expected_gt = [2, 0.1, 0, 49, 0, -0.1] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 20 and ds.RasterYSize == 20, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) assert ds.RasterCount == 4, ('Wrong raster count : %d ' % (ds.RasterCount)) assert ds.GetRasterBand(1).Checksum() == 0, 'Wrong checksum' ############################################################################### # Test -init option def test_gdal_merge_4(): script_path = test_py_scripts.get_py_script('gdal_merge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_merge', '-init 255 -o tmp/test_gdal_merge_4.tif tmp/in2.tif tmp/in3.tif') ds = gdal.Open('tmp/test_gdal_merge_4.tif') assert ds.GetRasterBand(1).Checksum() == 4725, 'Wrong checksum' ############################################################################### # Test merging with alpha band (#3669) def test_gdal_merge_5(): try: from osgeo import gdalnumeric gdalnumeric.BandRasterIONumPy except (ImportError, AttributeError): pytest.skip() script_path = test_py_scripts.get_py_script('gdal_merge') if script_path is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') wkt = srs.ExportToWkt() ds = drv.Create('tmp/in5.tif', 10, 10, 4) ds.SetProjection(wkt) ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) ds.GetRasterBand(1).Fill(255) ds = None ds = drv.Create('tmp/in6.tif', 10, 10, 4) ds.SetProjection(wkt) ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) ds.GetRasterBand(2).Fill(255) ds.GetRasterBand(4).Fill(255) cs = ds.GetRasterBand(4).Checksum() ds = None test_py_scripts.run_py_script(script_path, 'gdal_merge', ' -o tmp/test_gdal_merge_5.tif tmp/in5.tif tmp/in6.tif') ds = gdal.Open('tmp/test_gdal_merge_5.tif') assert ds.GetRasterBand(1).Checksum() == 0, 'Wrong checksum' assert ds.GetRasterBand(2).Checksum() == cs, 'Wrong checksum' assert ds.GetRasterBand(3).Checksum() == 0, 'Wrong checksum' assert ds.GetRasterBand(4).Checksum() == cs, 'Wrong checksum' ds = None os.unlink('tmp/test_gdal_merge_5.tif') test_py_scripts.run_py_script(script_path, 'gdal_merge', ' -o tmp/test_gdal_merge_5.tif tmp/in6.tif tmp/in5.tif') ds = gdal.Open('tmp/test_gdal_merge_5.tif') assert ds.GetRasterBand(1).Checksum() == 0, 'Wrong checksum' assert ds.GetRasterBand(2).Checksum() == cs, 'Wrong checksum' assert ds.GetRasterBand(3).Checksum() == 0, 'Wrong checksum' assert ds.GetRasterBand(4).Checksum() == cs, 'Wrong checksum' ############################################################################### # Cleanup def test_gdal_merge_cleanup(): lst = ['tmp/test_gdal_merge_1.tif', 'tmp/test_gdal_merge_2.tif', 'tmp/test_gdal_merge_3.tif', 'tmp/test_gdal_merge_4.tif', 'tmp/test_gdal_merge_5.tif', 'tmp/in1.tif', 'tmp/in2.tif', 'tmp/in3.tif', 'tmp/in4.tif', 'tmp/in5.tif', 'tmp/in6.tif'] for filename in lst: try: os.remove(filename) except OSError: pass ���������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_ogrmerge.py�������������������������������������������������������0000775�0001750�0001750�00000026564�13701057757�020207� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_ogrmerge.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: ogrmerge.py testing # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copyright (c) 2017, Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import ogr import test_py_scripts import pytest ############################################################################### # Test -single def test_ogrmerge_1(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -o tmp/out.shp ../ogr/data/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/out.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 20 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/out.shp') ############################################################################### # Test -append and glob def test_ogrmerge_2(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -o tmp/out.shp ../ogr/data/poly.shp') test_py_scripts.run_py_script(script_path, 'ogrmerge', '-append -single -o tmp/out.shp "../ogr/data/p*ly.shp"') ds = ogr.Open('tmp/out.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 20 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/out.shp') ############################################################################### # Test -overwrite_ds def test_ogrmerge_3(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-overwrite_ds -o tmp/out.shp ../ogr/data/poly.shp') test_py_scripts.run_py_script(script_path, 'ogrmerge', '-overwrite_ds -single -o tmp/out.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/out.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 10 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/out.shp') ############################################################################### # Test -f VRT def test_ogrmerge_4(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt ../ogr/data/poly.shp') ds = ogr.Open('tmp/out.vrt') lyr = ds.GetLayer(0) assert lyr.GetName() == 'poly' assert lyr.GetFeatureCount() == 10 ds = None gdal.Unlink('tmp/out.vrt') ############################################################################### # Test -nln def test_ogrmerge_5(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt ../ogr/data/poly.shp ../ogr/data/testpoly.shp -nln ' '"foo_{DS_NAME}_{DS_BASENAME}_{DS_INDEX}_{LAYER_NAME}_{LAYER_INDEX}"') ds = ogr.Open('tmp/out.vrt') lyr = ds.GetLayer(0) assert lyr.GetName() == 'foo_../ogr/data/poly.shp_poly_0_poly_0' assert lyr.GetFeatureCount() == 10 lyr = ds.GetLayer(1) assert lyr.GetName() == 'foo_../ogr/data/testpoly.shp_testpoly_1_testpoly_0' assert lyr.GetFeatureCount() == 14 ds = None gdal.Unlink('tmp/out.vrt') ############################################################################### # Test -src_layer_field_name -src_layer_field_content def test_ogrmerge_6(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-src_layer_field_name source -src_layer_field_content ' '"foo_{DS_NAME}_{DS_BASENAME}_{DS_INDEX}_{LAYER_NAME}_{LAYER_INDEX}"') ds = ogr.Open('tmp/out.vrt') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['source'] != 'foo_../ogr/data/poly.shp_poly_0_poly_0': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('tmp/out.vrt') ############################################################################### # Test -src_geom_type def test_ogrmerge_7(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() # No match in -single mode test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-src_geom_type POINT') ds = ogr.Open('tmp/out.vrt') assert ds.GetLayerCount() == 0 ds = None gdal.Unlink('tmp/out.vrt') # Match in single mode test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-src_geom_type POLYGON') ds = ogr.Open('tmp/out.vrt') assert ds.GetLayerCount() == 1 ds = None gdal.Unlink('tmp/out.vrt') # No match in default mode test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-src_geom_type POINT') ds = ogr.Open('tmp/out.vrt') assert ds.GetLayerCount() == 0 ds = None gdal.Unlink('tmp/out.vrt') # Match in default mode test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-src_geom_type POLYGON') ds = ogr.Open('tmp/out.vrt') assert ds.GetLayerCount() == 1 ds = None gdal.Unlink('tmp/out.vrt') ############################################################################### # Test -s_srs -t_srs in -single mode def test_ogrmerge_8(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-s_srs EPSG:32630 -t_srs EPSG:4326') ds = ogr.Open('tmp/out.vrt') assert ds is not None ds = None f = gdal.VSIFOpenL('tmp/out.vrt', 'rb') content = '' if f is not None: content = gdal.VSIFReadL(1, 10000, f).decode('UTF-8') gdal.VSIFCloseL(f) gdal.Unlink('tmp/out.vrt') assert '<SrcSRS>EPSG:32630</SrcSRS>' in content assert '<TargetSRS>EPSG:4326</TargetSRS>' in content ############################################################################### # Test -s_srs -t_srs in default mode def test_ogrmerge_9(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-s_srs EPSG:32630 -t_srs EPSG:4326') ds = ogr.Open('tmp/out.vrt') assert ds is not None ds = None f = gdal.VSIFOpenL('tmp/out.vrt', 'rb') content = '' if f is not None: content = gdal.VSIFReadL(1, 10000, f).decode('UTF-8') gdal.VSIFCloseL(f) gdal.Unlink('tmp/out.vrt') assert '<SrcSRS>EPSG:32630</SrcSRS>' in content assert '<TargetSRS>EPSG:4326</TargetSRS>' in content ############################################################################### # Test -a_srs in -single mode def test_ogrmerge_10(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-single -f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-a_srs EPSG:32630') ds = ogr.Open('tmp/out.vrt') assert ds is not None ds = None f = gdal.VSIFOpenL('tmp/out.vrt', 'rb') content = '' if f is not None: content = gdal.VSIFReadL(1, 10000, f).decode('UTF-8') gdal.VSIFCloseL(f) gdal.Unlink('tmp/out.vrt') assert '<LayerSRS>EPSG:32630</LayerSRS>' in content ############################################################################### # Test -a_srs in default mode def test_ogrmerge_11(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt ../ogr/data/poly.shp ' '-a_srs EPSG:32630') ds = ogr.Open('tmp/out.vrt') assert ds is not None ds = None f = gdal.VSIFOpenL('tmp/out.vrt', 'rb') content = '' if f is not None: content = gdal.VSIFReadL(1, 10000, f).decode('UTF-8') gdal.VSIFCloseL(f) gdal.Unlink('tmp/out.vrt') assert '<LayerSRS>EPSG:32630</LayerSRS>' in content ############################################################################### # Test layer names with accents def test_ogrmerge_12(): script_path = test_py_scripts.get_py_script('ogrmerge') if script_path is None: pytest.skip() with open('tmp/tmp.json', 'wt') as f: f.write("""{ "type": "FeatureCollection", "name": "\xc3\xa9ven", "features": [ { "type": "Feature", "properties": {}, "geometry": null} ]}""") test_py_scripts.run_py_script(script_path, 'ogrmerge', '-f VRT -o tmp/out.vrt tmp/tmp.json') ds = ogr.Open('tmp/out.vrt') assert ds is not None ds = None gdal.Unlink('tmp/tmp.json') gdal.Unlink('tmp/out.vrt') ��������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_ls_py.py�����������������������������������������������������0000775�0001750�0001750�00000017413�13701057757�020506� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_ls_py.py 51e43c95fbb06ca9bb6ab55fcb0b620b3508e1ff 2020-05-09 12:38:28 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_ls.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2011-2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal import gdaltest import test_py_scripts import pytest ############################################################################### def run_gdal_ls(argv): script_path = test_py_scripts.get_py_script('gdal_ls') if script_path is None: pytest.skip() saved_syspath = sys.path sys.path.append(script_path) try: import gdal_ls except ImportError: sys.path = saved_syspath pytest.fail() sys.path = saved_syspath from sys import version_info if version_info >= (3, 0, 0): import io outstr = io.StringIO() else: import StringIO outstr = StringIO.StringIO() ret = gdal_ls.gdal_ls(argv, outstr) retstr = outstr.getvalue() outstr.close() assert ret == 0, 'got error code : %d' % ret return retstr ############################################################################### # List one file def test_gdal_ls_py_1(): # TODO: Why the '' as the first element of the list here and below? ret_str = run_gdal_ls(['', '-l', '../ogr/data/poly.shp']) assert ret_str.find('poly.shp') != -1 ############################################################################### # List one dir def test_gdal_ls_py_2(): ret_str = run_gdal_ls(['', '-l', '../ogr/data']) assert ret_str.find('poly.shp') != -1 ############################################################################### # List recursively def test_gdal_ls_py_3(): ret_str = run_gdal_ls(['', '-R', '../ogr/data']) assert ret_str.find('PROJ_UNITS') != -1 ############################################################################### # List in a .zip def test_gdal_ls_py_4(): ret_str = run_gdal_ls(['', '-l', '/vsizip/../ogr/data/poly.zip']) if ret_str.find('-r--r--r-- 1 unknown unknown 415 2008-02-11 21:35 /vsizip/../ogr/data/poly.zip/poly.PRJ') == -1: if gdaltest.skip_on_travis(): # FIXME # Fails on Travis with dates at 1970-01-01 00:00 # Looks like a 32/64bit issue with Python bindings of VSIStatL() pytest.skip() pytest.fail(ret_str) ############################################################################### # List dir in /vsicurl/ def test_gdal_ls_py_5(): drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would stall for a long time') f = gdal.VSIFOpenL('/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip', 'rb') if f is None: pytest.skip() d = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) if not d: pytest.skip() # ret_str = run_gdal_ls(['', '-R', 'https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/']) # # if ret_str.find('/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/wkb_wkt/3d_broken_line.wkb') == -1: # print(ret_str) # pytest.fail() ############################################################################### # List in a .zip in /vsicurl/ def test_gdal_ls_py_6(): drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() f = gdal.VSIFOpenL('/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip', 'rb') if f is None: pytest.skip() d = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) if not d: pytest.skip() ret_str = run_gdal_ls(['', '-l', '/vsizip/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip']) if ret_str.find('-r--r--r-- 1 unknown unknown 415 2008-02-11 21:35 /vsizip/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip/poly.PRJ') == -1: if gdaltest.skip_on_travis(): # FIXME # Fails on Travis with dates at 1970-01-01 00:00 # Looks like a 32/64bit issue with Python bindings of VSIStatL() pytest.skip() pytest.fail(ret_str) ############################################################################### # List dir in /vsicurl/ and recurse in zip def test_gdal_ls_py_7(): # Super slow on AppVeyor since a few weeks (Apr 2016) if gdal.GetConfigOption('APPVEYOR') is not None: pytest.skip('Slow on AppVeyor') drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would stall for a long time') f = gdal.VSIFOpenL('/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip', 'rb') if f is None: pytest.skip() d = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) if not d: pytest.skip() # ret_str = run_gdal_ls(['', '-R', '-Rzip', 'https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/']) # if ret_str.find('/vsizip//vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip/poly.PRJ') == -1: # print(ret_str) # pytest.fail() ############################################################################### # List FTP dir in /vsicurl/ def test_gdal_ls_py_8(): if not gdaltest.run_slow_tests(): pytest.skip() drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would stall for a long time') f = gdal.VSIFOpenL('/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip', 'rb') if f is None: pytest.skip() d = gdal.VSIFReadL(1, 1, f) gdal.VSIFCloseL(f) if not d: pytest.skip() ret_str = run_gdal_ls(['', '-l', '-R', '-Rzip', 'ftp://download.osgeo.org/gdal/data/aig']) assert ret_str.find('-r--r--r-- 1 unknown unknown 24576 2007-03-29 00:00 /vsicurl/ftp://download.osgeo.org/gdal/data/aig/nzdem/info/arc0002r.001') != -1 assert ret_str.find('-r--r--r-- 1 unknown unknown 24576 2007-03-29 12:20 /vsizip//vsicurl/ftp://download.osgeo.org/gdal/data/aig/nzdem.zip/nzdem/info/arc0002r.001') != -1 �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdalmove.py�������������������������������������������������������0000775�0001750�0001750�00000005511�13701057757�020163� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdalmove.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdalmove testing # Author: Even Rouault <even dot rouault @ spatialys dot com> # ############################################################################### # Copyright (c) 2015, Even Rouault <even dot rouault @ spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal import test_py_scripts import pytest ############################################################################### # def test_gdalmove_1(): script_path = test_py_scripts.get_py_script('gdalmove') if script_path is None: pytest.skip() shutil.copy('../gcore/data/byte.tif', 'tmp/test_gdalmove_1.tif') test_py_scripts.run_py_script(script_path, 'gdalmove', '-s_srs "+proj=utm +zone=11 +ellps=clrk66 +towgs84=0,0,0 +no_defs" -t_srs EPSG:32611 tmp/test_gdalmove_1.tif -et 1') ds = gdal.Open('tmp/test_gdalmove_1.tif') got_gt = ds.GetGeoTransform() expected_gt = (440719.95870935748, 60.000041745067577, 1.9291142234578728e-05, 3751294.2109841029, 1.9099167548120022e-05, -60.000041705276814) for i in range(6): assert abs(got_gt[i] - expected_gt[i]) / abs(got_gt[i]) <= 1e-5, 'bad gt' wkt = ds.GetProjection() assert '32611' in wkt, 'bad geotransform' ds = None ############################################################################### # Cleanup def test_gdalmove_cleanup(): lst = ['tmp/test_gdalmove_1.tif'] for filename in lst: try: os.remove(filename) except OSError: pass ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/__init__.py������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057757�017051� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_rgb2pct.py��������������������������������������������������������0000775�0001750�0001750�00000013632�13701057757�017733� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_rgb2pct.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: rgb2pct.py and pct2rgb.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import struct from osgeo import gdal import gdaltest import test_py_scripts import pytest ############################################################################### # Test rgb2pct def test_rgb2pct_1(): script_path = test_py_scripts.get_py_script('rgb2pct') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'rgb2pct', '../gcore/data/rgbsmall.tif tmp/test_rgb2pct_1.tif') ds = gdal.Open('tmp/test_rgb2pct_1.tif') assert ds.GetRasterBand(1).Checksum() == 31231 ds = None ############################################################################### # Test pct2rgb def test_pct2rgb_1(): try: from osgeo import gdalnumeric gdalnumeric.BandRasterIONumPy except: pytest.skip() script_path = test_py_scripts.get_py_script('pct2rgb') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'pct2rgb', 'tmp/test_rgb2pct_1.tif tmp/test_pct2rgb_1.tif') ds = gdal.Open('tmp/test_pct2rgb_1.tif') assert ds.GetRasterBand(1).Checksum() == 20963 ori_ds = gdal.Open('../gcore/data/rgbsmall.tif') max_diff = gdaltest.compare_ds(ori_ds, ds) assert max_diff <= 18 ds = None ori_ds = None ############################################################################### # Test rgb2pct -n option def test_rgb2pct_2(): script_path = test_py_scripts.get_py_script('rgb2pct') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'rgb2pct', '-n 16 ../gcore/data/rgbsmall.tif tmp/test_rgb2pct_2.tif') ds = gdal.Open('tmp/test_rgb2pct_2.tif') assert ds.GetRasterBand(1).Checksum() == 16596 ct = ds.GetRasterBand(1).GetRasterColorTable() for i in range(16, 255): entry = ct.GetColorEntry(i) assert (entry[0] == 0 and entry[1] == 0 and entry[2] == 0), \ 'Color table has more than 16 entries' ds = None ############################################################################### # Test rgb2pct -pct option def test_rgb2pct_3(): script_path = test_py_scripts.get_py_script('rgb2pct') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'rgb2pct', '-pct tmp/test_rgb2pct_2.tif ../gcore/data/rgbsmall.tif tmp/test_rgb2pct_3.tif') ds = gdal.Open('tmp/test_rgb2pct_3.tif') assert ds.GetRasterBand(1).Checksum() == 16596 ct = ds.GetRasterBand(1).GetRasterColorTable() for i in range(16, 255): entry = ct.GetColorEntry(i) assert (entry[0] == 0 and entry[1] == 0 and entry[2] == 0), \ 'Color table has more than 16 entries' ds = None ############################################################################### # Test pct2rgb with big CT (>256 entries) def test_pct2rgb_4(): try: from osgeo import gdalnumeric gdalnumeric.BandRasterIONumPy except (ImportError, AttributeError): pytest.skip() script_path = test_py_scripts.get_py_script('pct2rgb') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'pct2rgb', '-rgba ../gcore/data/rat.img tmp/test_pct2rgb_4.tif') ds = gdal.Open('tmp/test_pct2rgb_4.tif') ori_ds = gdal.Open('../gcore/data/rat.img') ori_data = struct.unpack('H', ori_ds.GetRasterBand(1).ReadRaster(1990, 1990, 1, 1, 1, 1))[0] data = (struct.unpack('B', ds.GetRasterBand(1).ReadRaster(1990, 1990, 1, 1, 1, 1))[0], struct.unpack('B', ds.GetRasterBand(2).ReadRaster(1990, 1990, 1, 1, 1, 1))[0], struct.unpack('B', ds.GetRasterBand(3).ReadRaster(1990, 1990, 1, 1, 1, 1))[0], struct.unpack('B', ds.GetRasterBand(4).ReadRaster(1990, 1990, 1, 1, 1, 1))[0],) ct = ori_ds.GetRasterBand(1).GetRasterColorTable() entry = ct.GetColorEntry(ori_data) assert entry == data ds = None ori_ds = None ############################################################################### # Cleanup def test_rgb2pct_cleanup(): lst = ['tmp/test_rgb2pct_1.tif', 'tmp/test_pct2rgb_1.tif', 'tmp/test_rgb2pct_2.tif', 'tmp/test_rgb2pct_3.tif', 'tmp/test_pct2rgb_1.tif', 'tmp/test_pct2rgb_4.tif'] for filename in lst: try: os.remove(filename) except OSError: pass ������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_fillnodata.py������������������������������������������������0000775�0001750�0001750�00000006234�13701057760�021466� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdal_fillnodata.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_fillnodata.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, fillnodata, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import test_py_scripts import pytest ############################################################################### # Dummy test : there is no nodata value in the source dataset ! def test_gdal_fillnodata_1(): script_path = test_py_scripts.get_py_script('gdal_fillnodata') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_fillnodata', '../gcore/data/byte.tif tmp/test_gdal_fillnodata_1.tif') ds = gdal.Open('tmp/test_gdal_fillnodata_1.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None ############################################################################### # Make sure we copy the no data value to the dst when created # No data value for nodata_byte.tif is 0. def test_gdal_fillnodata_2(): script_path = test_py_scripts.get_py_script('gdal_fillnodata') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'gdal_fillnodata', '../gcore/data/nodata_byte.tif tmp/test_gdal_fillnodata_2.tif') ds = gdal.Open('tmp/test_gdal_fillnodata_2.tif') assert ds.GetRasterBand(1).GetNoDataValue() == 0, \ 'Failed to copy No Data Value to dst dataset.' ds = None ############################################################################### # Cleanup def test_gdal_fillnodata_cleanup(): lst = ['tmp/test_gdal_fillnodata_1.tif', 'tmp/test_gdal_fillnodata_2.tif'] for filename in lst: try: os.remove(filename) except OSError: pass ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_sieve.py�����������������������������������������������������0000775�0001750�0001750�00000005302�13701057760�020457� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdal_sieve.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test gdal_sieve.py utility # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2008, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import test_py_scripts from osgeo import gdal import pytest ############################################################################### # Test a fairly default case. def test_gdal_sieve_1(): script_path = test_py_scripts.get_py_script('gdal_sieve') if script_path is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') dst_ds = drv.Create('tmp/sieve_1.tif', 5, 7, 1, gdal.GDT_Byte) dst_ds = None test_py_scripts.run_py_script(script_path, 'gdal_sieve', '-nomask -st 2 -4 ../alg/data/sieve_src.grd tmp/sieve_1.tif') dst_ds = gdal.Open('tmp/sieve_1.tif') dst_band = dst_ds.GetRasterBand(1) cs_expected = 364 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': # Reload because of side effects of run_py_script() drv = gdal.GetDriverByName('GTiff') drv.Delete('tmp/sieve_1.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/setup.cfg��������������������������������������������������������������0000664�0001750�0001750�00000000035�13701057752�016561� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������[flake8] max-line-length=100 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_ogr2ogr_py.py�����������������������������������������������������0000775�0001750�0001750�00000136660�13701057760�020462� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_ogr2ogr_py.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ogr2ogr.py testing # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import shutil import pytest sys.path.append('../ogr') from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest import ogrtest import test_cli_utilities import test_py_scripts ############################################################################### # Simple test def test_ogr2ogr_py_1(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 feat0 = ds.GetLayer(0).GetFeature(0) assert feat0.GetFieldAsDouble('AREA') == 215229.266, \ 'Did not get expected value for field AREA' assert feat0.GetFieldAsString('PRFEDEA') == '35043411', \ 'Did not get expected value for field PRFEDEA' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -sql def test_ogr2ogr_py_2(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -sql "select * from poly"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -spat def test_ogr2ogr_py_3(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -spat 479609 4764629 479764 4764817') ds = ogr.Open('tmp/poly.shp') if ogrtest.have_geos(): assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 else: assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 5 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -where def test_ogr2ogr_py_4(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -where "EAS_ID=171"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -append def test_ogr2ogr_py_5(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp') test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-update -append tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20 feat10 = ds.GetLayer(0).GetFeature(10) assert feat10.GetFieldAsDouble('AREA') == 215229.266, \ 'Did not get expected value for field AREA' assert feat10.GetFieldAsString('PRFEDEA') == '35043411', \ 'Did not get expected value for field PRFEDEA' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -overwrite def test_ogr2ogr_py_6(): import ogr_pg script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ogr_pg.test_ogr_pg_1() if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-f PostgreSQL PG:"' + gdaltest.pg_connection_string + '" ../ogr/data/poly.shp -nln tpoly') test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-update -overwrite -f PostgreSQL PG:"' + gdaltest.pg_connection_string + '" ../ogr/data/poly.shp -nln tpoly') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert ds is not None and ds.GetLayerByName('tpoly').GetFeatureCount() == 10 ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') ############################################################################### # Test -gt def test_ogr2ogr_py_7(): import ogr_pg script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ogr_pg.test_ogr_pg_1() if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-f PostgreSQL PG:"' + gdaltest.pg_connection_string + '" ../ogr/data/poly.shp -nln tpoly -gt 1') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert ds is not None and ds.GetLayerByName('tpoly').GetFeatureCount() == 10 ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') ############################################################################### # Test -t_srs def test_ogr2ogr_py_8(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-t_srs EPSG:4326 tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert str(ds.GetLayer(0).GetSpatialRef()).find('1984') != -1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -a_srs def test_ogr2ogr_py_9(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-a_srs EPSG:4326 tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert str(ds.GetLayer(0).GetSpatialRef()).find('1984') != -1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -select def test_ogr2ogr_py_10(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass # Voluntary don't use the exact case of the source field names (#4502) test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-select eas_id,prfedea tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 feat = lyr.GetNextFeature() ret = 'success' if feat.GetFieldAsDouble('EAS_ID') != 168: gdaltest.post_reason('did not get expected value for EAS_ID') print(feat.GetFieldAsDouble('EAS_ID')) ret = 'fail' elif feat.GetFieldAsString('PRFEDEA') != '35043411': gdaltest.post_reason('did not get expected value for PRFEDEA') print(feat.GetFieldAsString('PRFEDEA')) ret = 'fail' feat = None ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') return ret ############################################################################### # Test -lco def test_ogr2ogr_py_11(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-lco SHPT=POLYGONZ tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds.GetLayer(0).GetLayerDefn().GetGeomType() == ogr.wkbPolygon25D ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -nlt def test_ogr2ogr_py_12(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-nlt POLYGON25D tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds.GetLayer(0).GetLayerDefn().GetGeomType() == ogr.wkbPolygon25D ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Add explicit source layer name def test_ogr2ogr_py_13(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp poly') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -segmentize @pytest.mark.skip() def test_ogr2ogr_py_14(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-segmentize 100 tmp/poly.shp ../ogr/data/poly.shp poly') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 feat = ds.GetLayer(0).GetNextFeature() assert feat.GetGeometryRef().GetGeometryRef(0).GetPointCount() == 36 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -overwrite with a shapefile def test_ogr2ogr_py_15(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() # Overwrite test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-overwrite tmp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -fid def test_ogr2ogr_py_16(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-fid 8 tmp/poly.shp ../ogr/data/poly.shp') src_ds = ogr.Open('../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 src_feat = src_ds.GetLayer(0).GetFeature(8) feat = ds.GetLayer(0).GetNextFeature() assert feat.GetField("EAS_ID") == src_feat.GetField("EAS_ID") ds.Destroy() src_ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -progress def test_ogr2ogr_py_17(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass ret = test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-progress tmp/poly.shp ../ogr/data/poly.shp') assert ret.find('0...10...20...30...40...50...60...70...80...90...100 - done.') != -1 ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -wrapdateline @pytest.mark.skip() def test_ogr2ogr_py_18(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') except OSError: pass try: os.stat('tmp/wrapdateline_dst.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') except OSError: pass ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/wrapdateline_src.shp') srs = osr.SpatialReference() srs.ImportFromEPSG(32660) lyr = ds.CreateLayer('wrapdateline_src', srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POLYGON((700000 4000000,800000 4000000,800000 3000000,700000 3000000,700000 4000000))') feat.SetGeometryDirectly(geom) lyr.CreateFeature(feat) feat.Destroy() ds.Destroy() test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-wrapdateline -t_srs EPSG:4326 tmp/wrapdateline_dst.shp tmp/wrapdateline_src.shp') expected_wkt = 'MULTIPOLYGON (((179.222391385437419 36.124095832129363,180.0 36.10605558800065,180.0 27.090340569400169,179.017505655195095 27.107979523625211,179.222391385437419 36.124095832129363)),((-180.0 36.10605558800065,-179.667822828781084 36.098349195413753,-179.974688335419557 27.089886143076747,-180.0 27.090340569400169,-180.0 36.10605558800065)))' expected_geom = ogr.CreateGeometryFromWkt(expected_wkt) ds = ogr.Open('tmp/wrapdateline_dst.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() ret = ogrtest.check_feature_geometry(feat, expected_geom) feat.Destroy() expected_geom.Destroy() ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') assert ret == 0 ############################################################################### # Test -clipsrc def test_ogr2ogr_py_19(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -clipsrc spat_extent -spat 479609 4764629 479764 4764817') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test correct remap of fields when laundering to Shapefile format # Test that the data is going into the right field # FIXME: Any field is skipped if a subsequent field with same name is found. def test_ogr2ogr_py_20(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.remove('tmp/Fields.dbf') except OSError: pass expected_fields = ['a', 'A_1', 'a_1_2', 'aaaaaAAAAA', 'aAaaaAAA_1', 'aaaaaAAAAB', 'aaaaaAAA_2', 'aaaaaAAA_3', 'aaaaaAAA_4', 'aaaaaAAA_5', 'aaaaaAAA_6', 'aaaaaAAA_7', 'aaaaaAAA_8', 'aaaaaAAA_9', 'aaaaaAAA10'] expected_data = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'] test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp ../utilities/data/Fields.csv') ds = ogr.Open('tmp/Fields.dbf') assert ds is not None layer_defn = ds.GetLayer(0).GetLayerDefn() if layer_defn.GetFieldCount() != 15: ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.dbf') pytest.fail('Unexpected field count: ' + str(ds.GetLayer(0).GetLayerDefn().GetFieldCount())) error_occurred = False feat = ds.GetLayer(0).GetNextFeature() for i in range(layer_defn.GetFieldCount()): if layer_defn.GetFieldDefn(i).GetNameRef() != expected_fields[i]: print('Expected ', expected_fields[i], ',but got', layer_defn.GetFieldDefn(i).GetNameRef()) error_occurred = True if feat.GetFieldAsString(i) != expected_data[i]: print('Expected the value ', expected_data[i], ',but got', feat.GetFieldAsString(i)) error_occurred = True ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.dbf') assert not error_occurred ############################################################################### # Test ogr2ogr when the output driver has already created the fields # at dataset creation (#3247) def test_ogr2ogr_py_21(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.remove('tmp/testogr2ogr21.gtm') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-f GPSTrackMaker tmp/testogr2ogr21.gtm ../utilities/data/dataforogr2ogr21.csv ' + '-sql "SELECT comment, name FROM dataforogr2ogr21" -nlt POINT') ds = ogr.Open('tmp/testogr2ogr21.gtm') assert ds is not None ds.GetLayer(0).GetLayerDefn() lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('name') != 'NAME' or \ feat.GetFieldAsString('comment') != 'COMMENT': print(feat.GetFieldAsString('comment')) ds.Destroy() os.remove('tmp/testogr2ogr21.gtm') pytest.fail(feat.GetFieldAsString('name')) ds.Destroy() os.remove('tmp/testogr2ogr21.gtm') ############################################################################### # Test ogr2ogr when the output driver delays the destination layer defn creation (#3384) def test_ogr2ogr_py_22(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-f "MapInfo File" tmp/testogr2ogr22.mif ../utilities/data/dataforogr2ogr21.csv ' + '-sql "SELECT comment, name FROM dataforogr2ogr21" -nlt POINT') ds = ogr.Open('tmp/testogr2ogr22.mif') assert ds is not None ds.GetLayer(0).GetLayerDefn() lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('name') != 'NAME' or \ feat.GetFieldAsString('comment') != 'COMMENT': print(feat.GetFieldAsString('comment')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr22.mif') pytest.fail(feat.GetFieldAsString('name')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr22.mif') ############################################################################### # Same as previous but with -select def test_ogr2ogr_py_23(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f "MapInfo File" tmp/testogr2ogr23.mif ../utilities/data/dataforogr2ogr21.csv ' + '-sql "SELECT comment, name FROM dataforogr2ogr21" -select comment,name -nlt POINT') ds = ogr.Open('tmp/testogr2ogr23.mif') assert ds is not None ds.GetLayer(0).GetLayerDefn() lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('name') != 'NAME' or \ feat.GetFieldAsString('comment') != 'COMMENT': print(feat.GetFieldAsString('comment')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr23.mif') pytest.fail(feat.GetFieldAsString('name')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr23.mif') ############################################################################### # Test -clipsrc with WKT geometry (#3530) def test_ogr2ogr_py_24(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -clipsrc "POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -clipsrc with clip from external datasource def test_ogr2ogr_py_25(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass f = open('tmp/clip.csv', 'wt') f.write('foo,WKT\n') f.write('foo,"POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"\n') f.close() test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -clipsrc tmp/clip.csv -clipsrcwhere foo=\'foo\'') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') os.remove('tmp/clip.csv') ############################################################################### # Test -clipdst with WKT geometry (#3530) def test_ogr2ogr_py_26(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', 'tmp/poly.shp ../ogr/data/poly.shp -clipdst "POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -clipdst with clip from external datasource def test_ogr2ogr_py_27(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass f = open('tmp/clip.csv', 'wt') f.write('foo,WKT\n') f.write('foo,"POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"\n') f.close() test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-nlt MULTIPOLYGON tmp/poly.shp ../ogr/data/poly.shp -clipdst tmp/clip.csv -clipdstsql "SELECT * from clip"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') os.remove('tmp/clip.csv') ############################################################################### # Test that -overwrite work if the output file doesn't yet exist (#3825) def test_ogr2ogr_py_31(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -overwrite tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test that -append/-overwrite to a single-file shapefile work without specifying -nln def test_ogr2ogr_py_32(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_32.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_32.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_32.shp ../ogr/data/poly.shp') test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -append tmp/test_ogr2ogr_32.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_32.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20, '-append failed' ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -overwrite tmp/test_ogr2ogr_32.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_32.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ '-overwrite failed' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_32.shp') ############################################################################### # Test -explodecollections def test_ogr2ogr_py_33(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_33_src.csv') ogr.GetDriverByName('CSV').DeleteDataSource('tmp/test_ogr2ogr_33_src.csv') except OSError: pass try: os.stat('tmp/test_ogr2ogr_33_dst.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_33_dst.shp') except OSError: pass f = open('tmp/test_ogr2ogr_33_src.csv', 'wt') f.write('foo,WKT\n') f.write('bar,"MULTIPOLYGON (((10 10,10 11,11 11,11 10,10 10)),((100 100,100 200,200 200,200 100,100 100),(125 125,175 125,175 175,125 175,125 125)))"\n') f.write('baz,"POLYGON ((0 0,0 1,1 1,1 0,0 0))"\n') f.close() test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -explodecollections tmp/test_ogr2ogr_33_dst.shp tmp/test_ogr2ogr_33_src.csv -select foo') ds = ogr.Open('tmp/test_ogr2ogr_33_dst.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 3, '-explodecollections failed' feat = lyr.GetFeature(0) if feat.GetField("foo") != 'bar': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((10 10,10 11,11 11,11 10,10 10))': feat.DumpReadable() pytest.fail() feat = lyr.GetFeature(1) if feat.GetField("foo") != 'bar': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((100 100,100 200,200 200,200 100,100 100),(125 125,175 125,175 175,125 175,125 125))': feat.DumpReadable() pytest.fail() feat = lyr.GetFeature(2) if feat.GetField("foo") != 'baz': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('CSV').DeleteDataSource('tmp/test_ogr2ogr_33_src.csv') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_33_dst.shp') ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist src.shp -nln someDirThatDoesNotExist' # This should result in creating a someDirThatDoesNotExist directory with # someDirThatDoesNotExist.shp/dbf/shx inside this directory def test_ogr2ogr_py_34(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_34_dir') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_34_dir') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_34_dir ../ogr/data/poly.shp -nln test_ogr2ogr_34_dir') ds = ogr.Open('tmp/test_ogr2ogr_34_dir/test_ogr2ogr_34_dir.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ 'initial shapefile creation failed' ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -append tmp/test_ogr2ogr_34_dir ../ogr/data/poly.shp -nln test_ogr2ogr_34_dir') ds = ogr.Open('tmp/test_ogr2ogr_34_dir/test_ogr2ogr_34_dir.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20, '-append failed' ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -overwrite tmp/test_ogr2ogr_34_dir ../ogr/data/poly.shp -nln test_ogr2ogr_34_dir') ds = ogr.Open('tmp/test_ogr2ogr_34_dir/test_ogr2ogr_34_dir.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ '-overwrite failed' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_34_dir') ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist src.shp' def test_ogr2ogr_py_35(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_35_dir') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_35_dir') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_35_dir ../ogr/data/poly.shp ') ds = ogr.Open('tmp/test_ogr2ogr_35_dir/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ 'initial shapefile creation failed' ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -append tmp/test_ogr2ogr_35_dir ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_35_dir/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20, '-append failed' ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -overwrite tmp/test_ogr2ogr_35_dir ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_35_dir/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ '-overwrite failed' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_35_dir') ############################################################################### # Test ogr2ogr -zfield def test_ogr2ogr_py_36(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_36.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_36.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_36.shp ../ogr/data/poly.shp -zfield EAS_ID') ds = ogr.Open('tmp/test_ogr2ogr_36.shp') feat = ds.GetLayer(0).GetNextFeature() wkt = feat.GetGeometryRef().ExportToWkt() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_36.shp') assert wkt.find(' 168,') != -1 ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist.shp dataSourceWithMultipleLayer' def test_ogr2ogr_py_37(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_37_dir.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_37_dir.shp') except OSError: pass try: os.mkdir('tmp/test_ogr2ogr_37_src') except OSError: pass shutil.copy('../ogr/data/poly.shp', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/poly.shx', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/poly.dbf', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/testpoly.shp', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/testpoly.shx', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/testpoly.dbf', 'tmp/test_ogr2ogr_37_src') test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_37_dir.shp tmp/test_ogr2ogr_37_src') ds = ogr.Open('tmp/test_ogr2ogr_37_dir.shp') assert ds is not None and ds.GetLayerCount() == 2 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_37_src') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_37_dir.shp') ############################################################################### # Test that we take into account the fields by the where clause when combining # -select and -where (#4015) def test_ogr2ogr_py_38(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_38.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_38.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_38.shp ../ogr/data/poly.shp -select AREA -where "EAS_ID = 170"') ds = ogr.Open('tmp/test_ogr2ogr_38.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_38.shp') ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist.shp dataSourceWithMultipleLayer -sql "select * from alayer"' (#4268) def test_ogr2ogr_py_39(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_39_dir.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_39.shp') except OSError: pass try: os.mkdir('tmp/test_ogr2ogr_39_src') except OSError: pass shutil.copy('../ogr/data/poly.shp', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/poly.shx', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/poly.dbf', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/testpoly.shp', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/testpoly.shx', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/testpoly.dbf', 'tmp/test_ogr2ogr_39_src') test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_39.shp tmp/test_ogr2ogr_39_src -sql "select * from poly"') ds = ogr.Open('tmp/test_ogr2ogr_39.shp') assert ds is not None and ds.GetLayerCount() == 1 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_39_src') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_39.shp') ############################################################################### # Test -dim 3 and -dim 2 def test_ogr2ogr_py_43(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_43_3d.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_3d.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_43_3d.shp ../ogr/data/poly.shp -dim 3') ds = ogr.Open('tmp/test_ogr2ogr_43_3d.shp') lyr = ds.GetLayerByIndex(0) assert lyr.GetGeomType() == ogr.wkbPolygon25D ds = None try: os.stat('tmp/test_ogr2ogr_43_2d.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_2d.shp') except OSError: pass test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' tmp/test_ogr2ogr_43_2d.shp tmp/test_ogr2ogr_43_3d.shp -dim 2') ds = ogr.Open('tmp/test_ogr2ogr_43_2d.shp') lyr = ds.GetLayerByIndex(0) assert lyr.GetGeomType() == ogr.wkbPolygon ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_2d.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_3d.shp') ############################################################################### # Test -nlt PROMOTE_TO_MULTI for polygon/multipolygon def test_ogr2ogr_py_44(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_44_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_44_src.shp') except OSError: pass gdal.Unlink('tmp/test_ogr2ogr_44.gml') gdal.Unlink('tmp/test_ogr2ogr_44.xsd') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test_ogr2ogr_44_src.shp') lyr = ds.CreateLayer('test_ogr2ogr_44_src', geom_type=ogr.wkbPolygon) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 1,1 1,0 0)),((10 0,10 1,11 1,10 0)))')) lyr.CreateFeature(feat) ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -f GML tmp/test_ogr2ogr_44.gml tmp/test_ogr2ogr_44_src.shp -nlt PROMOTE_TO_MULTI') f = open('tmp/test_ogr2ogr_44.xsd') data = f.read() f.close() assert data.find('type="gml:MultiPolygonPropertyType"') != -1 f = open('tmp/test_ogr2ogr_44.gml') data = f.read() f.close() assert data.find('<ogr:geometryProperty><gml:MultiPolygon><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 0,1 1,1 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>') != -1 ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_44_src.shp') os.unlink('tmp/test_ogr2ogr_44.gml') os.unlink('tmp/test_ogr2ogr_44.xsd') ############################################################################### # Test -nlt PROMOTE_TO_MULTI for polygon/multipolygon def test_ogr2ogr_py_45(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_44_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_44_src.shp') except OSError: pass gdal.Unlink('tmp/test_ogr2ogr_44.gml') gdal.Unlink('tmp/test_ogr2ogr_44.xsd') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test_ogr2ogr_44_src.shp') lyr = ds.CreateLayer('test_ogr2ogr_44_src', geom_type=ogr.wkbPolygon) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 1,1 1,0 0)),((10 0,10 1,11 1,10 0)))')) lyr.CreateFeature(feat) ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -f GML tmp/test_ogr2ogr_44.gml tmp/test_ogr2ogr_44_src.shp -nlt PROMOTE_TO_MULTI') f = open('tmp/test_ogr2ogr_44.xsd') data = f.read() f.close() assert data.find('type="gml:MultiPolygonPropertyType"') != -1 f = open('tmp/test_ogr2ogr_44.gml') data = f.read() f.close() assert data.find('<ogr:geometryProperty><gml:MultiPolygon><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 0,1 1,1 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>') != -1 ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_44_src.shp') os.unlink('tmp/test_ogr2ogr_44.gml') os.unlink('tmp/test_ogr2ogr_44.xsd') ############################################################################### # Test -nlt PROMOTE_TO_MULTI for linestring/multilinestring def test_ogr2ogr_py_46(): script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_45_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_45_src.shp') except OSError: pass gdal.Unlink('tmp/test_ogr2ogr_45.gml') gdal.Unlink('tmp/test_ogr2ogr_45.xsd') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test_ogr2ogr_45_src.shp') lyr = ds.CreateLayer('test_ogr2ogr_45_src', geom_type=ogr.wkbLineString) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,0 1,1 1,0 0)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 0,0 1,1 1,0 0),(10 0,10 1,11 1,10 0))')) lyr.CreateFeature(feat) ds = None test_py_scripts.run_py_script(script_path, 'ogr2ogr', ' -f GML tmp/test_ogr2ogr_45.gml tmp/test_ogr2ogr_45_src.shp -nlt PROMOTE_TO_MULTI') f = open('tmp/test_ogr2ogr_45.xsd') data = f.read() f.close() assert data.find('type="gml:MultiLineStringPropertyType"') != -1 f = open('tmp/test_ogr2ogr_45.gml') data = f.read() f.close() assert data.find('<ogr:geometryProperty><gml:MultiLineString><gml:lineStringMember><gml:LineString><gml:coordinates>0,0 0,1 1,1 0,0</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>') != -1 ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_45_src.shp') gdal.Unlink('tmp/test_ogr2ogr_45.gml') gdal.Unlink('tmp/test_ogr2ogr_45.xsd') ��������������������������������������������������������������������������������gdalautotest-3.1.2/pyscripts/test_gdal_polygonize.py������������������������������������������������0000775�0001750�0001750�00000016242�13701057760�021550� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: test_gdal_polygonize.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test gdal_polygonize.py script # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2008, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import ogrtest import test_py_scripts from osgeo import ogr import pytest ############################################################################### # Test a fairly simple case, with nodata masking. def test_gdal_polygonize_1(): script_path = test_py_scripts.get_py_script('gdal_polygonize') if script_path is None: pytest.skip() # Create a OGR datasource to put results in. shp_drv = ogr.GetDriverByName('ESRI Shapefile') try: os.stat('tmp/poly.shp') shp_drv.DeleteDataSource('tmp/poly.shp') except OSError: pass shp_ds = shp_drv.CreateDataSource('tmp/poly.shp') shp_layer = shp_ds.CreateLayer('poly', None, ogr.wkbPolygon) fd = ogr.FieldDefn('DN', ogr.OFTInteger) shp_layer.CreateField(fd) shp_ds.Destroy() # run the algorithm. test_py_scripts.run_py_script(script_path, 'gdal_polygonize', '../alg/data/polygonize_in.grd tmp poly DN') # Confirm we get the set of expected features in the output layer. shp_ds = ogr.Open('tmp') shp_lyr = shp_ds.GetLayerByName('poly') expected_feature_number = 13 assert shp_lyr.GetFeatureCount() == expected_feature_number expect = [107, 123, 115, 115, 140, 148, 123, 140, 156, 100, 101, 102, 103] tr = ogrtest.check_features_against_list(shp_lyr, 'DN', expect) # check at least one geometry. if tr: shp_lyr.SetAttributeFilter('dn = 156') feat_read = shp_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'POLYGON ((440720 3751200,440900 3751200,440900 3751020,440720 3751020,440720 3751200),(440780 3751140,440780 3751080,440840 3751080,440840 3751140,440780 3751140))') != 0: tr = 0 feat_read.Destroy() shp_ds.Destroy() # Reload drv because of side effects of run_py_script() shp_drv = ogr.GetDriverByName('ESRI Shapefile') shp_drv.DeleteDataSource('tmp/poly.shp') assert tr ############################################################################### # Test a simple case without masking. def test_gdal_polygonize_2(): script_path = test_py_scripts.get_py_script('gdal_polygonize') if script_path is None: pytest.skip() shp_drv = ogr.GetDriverByName('ESRI Shapefile') try: os.stat('tmp/out.shp') shp_drv.DeleteDataSource('tmp/out.shp') except OSError: pass # run the algorithm. test_py_scripts.run_py_script(script_path, 'gdal_polygonize', '-b 1 -f "ESRI Shapefile" -q -nomask ../alg/data/polygonize_in.grd tmp') # Confirm we get the set of expected features in the output layer. shp_ds = ogr.Open('tmp') shp_lyr = shp_ds.GetLayerByName('out') expected_feature_number = 17 assert shp_lyr.GetFeatureCount() == expected_feature_number expect = [107, 123, 115, 132, 115, 132, 140, 132, 148, 123, 140, 132, 156, 100, 101, 102, 103] tr = ogrtest.check_features_against_list(shp_lyr, 'DN', expect) shp_ds.Destroy() # Reload drv because of side effects of run_py_script() shp_drv = ogr.GetDriverByName('ESRI Shapefile') shp_drv.DeleteDataSource('tmp/out.shp') assert tr def test_gdal_polygonize_3(): script_path = test_py_scripts.get_py_script('gdal_polygonize') if script_path is None: pytest.skip() drv = ogr.GetDriverByName('GPKG') if drv is None: pytest.skip() try: os.stat('tmp/out.gpkg') drv.DeleteDataSource('tmp/out.gpkg') except OSError: pass # run the algorithm. test_py_scripts.run_py_script(script_path, 'gdal_polygonize', '-b 1 -f "GPKG" -q -nomask ../alg/data/polygonize_in.grd tmp/out.gpkg') # Confirm we get the set of expected features in the output layer. gpkg_ds = ogr.Open('tmp/out.gpkg') gpkg_lyr = gpkg_ds.GetLayerByName('out') geom_type = gpkg_lyr.GetGeomType() geom_is_polygon = geom_type in (ogr.wkbPolygon, ogr.wkbMultiPolygon) gpkg_ds.Destroy() # Reload drv because of side effects of run_py_script() drv = ogr.GetDriverByName('GPKG') drv.DeleteDataSource('tmp/out.gpkg') if geom_is_polygon: return pytest.fail('GetGeomType() returned %d instead of %d or %d (ogr.wkbPolygon or ogr.wkbMultiPolygon)' % (geom_type, ogr.wkbPolygon, ogr.wkbMultiPolygon)) ############################################################################### # Test -b mask def test_gdal_polygonize_4(): script_path = test_py_scripts.get_py_script('gdal_polygonize') if script_path is None: pytest.skip() # Test mask syntax test_py_scripts.run_py_script(script_path, 'gdal_polygonize', '-q -f GML -b mask ../gcore/data/byte.tif tmp/out.gml') content = open('tmp/out.gml', 'rt').read() os.unlink('tmp/out.gml') assert '<ogr:geometryProperty><gml:Polygon srsName="EPSG:26711"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>440720,3751320 440720,3750120 441920,3750120 441920,3751320 440720,3751320</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>' in content # Test mask,1 syntax test_py_scripts.run_py_script(script_path, 'gdal_polygonize', '-q -f GML -b mask,1 ../gcore/data/byte.tif tmp/out.gml') content = open('tmp/out.gml', 'rt').read() os.unlink('tmp/out.gml') assert '<ogr:geometryProperty><gml:Polygon srsName="EPSG:26711"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>440720,3751320 440720,3750120 441920,3750120 441920,3751320 440720,3751320</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>' in content ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/���������������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057760�014031� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/gdaltest_python3.py��������������������������������������������������������0000775�0001750�0001750�00000014610�13701057760�017703� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- coding: utf-8 -*- ############################################################################### # $Id: gdaltest_python3.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Python Library supporting GDAL/OGR Test Suite # Author: Even Rouault, <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2009-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import urllib.request import urllib.error import urllib.parse import socket import subprocess import shlex import os import sys from queue import Queue from threading import Thread def run_func(func): try: result = func() print(result) return result except SystemExit as x: import traceback traceback.print_exc() raise x except Exception: # We really do want to catch most exceptions percolating up to here # pylint: disable=broad-except result = 'fail (blowup)' print(result) import traceback traceback.print_exc() return result def urlescape(url): # Escape any non-ASCII characters try: import urllib url = urllib.parse.quote(url) except AttributeError: pass return url def gdalurlopen(url, timeout=10): old_timeout = socket.getdefaulttimeout() socket.setdefaulttimeout(timeout) proxy = None if 'GDAL_HTTP_PROXY' in os.environ: proxy = os.environ['GDAL_HTTP_PROXY'] protocol = 'http' if 'GDAL_HTTPS_PROXY' in os.environ and url.startswith('https'): proxy = os.environ['GDAL_HTTPS_PROXY'] protocol = 'https' if proxy is not None: if 'GDAL_HTTP_PROXYUSERPWD' in os.environ: proxyuserpwd = os.environ['GDAL_HTTP_PROXYUSERPWD'] proxyHandler = urllib.request.ProxyHandler({"%s" % protocol: "%s://%s@%s" % (protocol, proxyuserpwd, proxy)}) else: proxyuserpwd = None proxyHandler = urllib.request.ProxyHandler({"%s" % protocol: "%s://%s" % (protocol, proxy)}) opener = urllib.request.build_opener(proxyHandler, urllib.request.HTTPHandler) urllib.request.install_opener(opener) try: handle = urllib.request.urlopen(url) socket.setdefaulttimeout(old_timeout) return handle except urllib.error.HTTPError as e: print('HTTP service for %s is down (HTTP Error: %d)' % (url, e.code)) socket.setdefaulttimeout(old_timeout) return None except urllib.error.URLError as e: print('HTTP service for %s is down (URL Error: %s)' % (url, e.reason)) socket.setdefaulttimeout(old_timeout) return None except urllib.error.ContentTooShort: print('HTTP content too short for %s.' % url) socket.setdefaulttimeout(old_timeout) return None def spawn_async(cmd): command = shlex.split(cmd) try: process = subprocess.Popen(command, stdout=subprocess.PIPE) return (process, process.stdout) except OSError: return (None, None) def wait_process(process): process.wait() def runexternal(cmd, strin=None, check_memleak=True, display_live_on_parent_stdout=False, encoding='latin1'): # pylint: disable=unused-argument command = shlex.split(cmd) if strin is None: p = subprocess.Popen(command, stdout=subprocess.PIPE) else: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE) p.stdin.write(bytes(strin, 'ascii')) p.stdin.close() if p.stdout is not None: if display_live_on_parent_stdout: ret = '' ret_stdout = p.stdout while True: c = ret_stdout.read(1).decode(encoding) if c == '': break ret = ret + c sys.stdout.write(c) else: ret = p.stdout.read().decode(encoding) else: ret = '' waitcode = p.wait() if waitcode != 0: ret = ret + '\nERROR ret code = %d' % waitcode return ret def read_in_thread(f, q): q.put(f.read()) f.close() def runexternal_out_and_err(cmd, check_memleak=True, encoding='ascii'): # pylint: disable=unused-argument command = shlex.split(cmd) p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.stdout is not None: q_stdout = Queue() t_stdout = Thread(target=read_in_thread, args=(p.stdout, q_stdout)) t_stdout.start() else: q_stdout = None ret_stdout = '' if p.stderr is not None: q_stderr = Queue() t_stderr = Thread(target=read_in_thread, args=(p.stderr, q_stderr)) t_stderr.start() else: q_stderr = None ret_stderr = '' if q_stdout is not None: ret_stdout = q_stdout.get().decode(encoding) if q_stderr is not None: ret_stderr = q_stderr.get().decode(encoding) waitcode = p.wait() if waitcode != 0: ret_stderr = ret_stderr + '\nERROR ret code = %d' % waitcode return (ret_stdout, ret_stderr) ������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/test_cli_utilities.py������������������������������������������������������0000775�0001750�0001750�00000016542�13701057760�020317� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python ############################################################################### # $Id: test_cli_utilities.py 3273706160521c67923855394ce3eecc5bf4ebbf 2020-01-05 14:56:08 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Helper functions for testing CLI utilities # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2008-2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import gdaltest cli_exe_path = {} ############################################################################### # def get_cli_utility_path_internal(cli_utility_name): if sys.platform == 'win32': cli_utility_name = cli_utility_name + '.exe' # First try : in the apps directory of the GDAL source tree # This is the case for the buildbot directory tree try: cli_utility_path = os.path.join(os.getcwd(), '..', '..', 'gdal', 'apps', cli_utility_name) if sys.platform == 'win32': cli_utility_path = cli_utility_path.replace('\\', '/') if os.path.isfile(cli_utility_path): ret = gdaltest.runexternal(cli_utility_path + ' --utility_version') if ret.find('GDAL') != -1: return cli_utility_path except OSError: pass # Second try : the autotest directory is a subdirectory of gdal/ (FrankW's layout) try: cli_utility_path = os.path.join(os.getcwd(), '..', '..', 'apps', cli_utility_name) if sys.platform == 'win32': cli_utility_path = cli_utility_path.replace('\\', '/') if os.path.isfile(cli_utility_path): ret = gdaltest.runexternal(cli_utility_path + ' --utility_version') if ret.find('GDAL') != -1: return cli_utility_path except OSError: pass # Otherwise look up in the system path try: cli_utility_path = cli_utility_name ret = gdaltest.runexternal(cli_utility_path + ' --utility_version') if ret.find('GDAL') != -1: return cli_utility_path except OSError: pass return None ############################################################################### # def get_cli_utility_path(cli_utility_name): global cli_exe_path if cli_utility_name in cli_exe_path: return cli_exe_path[cli_utility_name] cli_exe_path[cli_utility_name] = get_cli_utility_path_internal(cli_utility_name) return cli_exe_path[cli_utility_name] ############################################################################### # def get_gdalinfo_path(): return get_cli_utility_path('gdalinfo') ############################################################################### # def get_gdalmdiminfo_path(): return get_cli_utility_path('gdalmdiminfo') ############################################################################### # def get_gdal_translate_path(): return get_cli_utility_path('gdal_translate') ############################################################################### # def get_gdalmdimtranslate_path(): return get_cli_utility_path('gdalmdimtranslate') ############################################################################### # def get_gdalwarp_path(): return get_cli_utility_path('gdalwarp') ############################################################################### # def get_gdaladdo_path(): return get_cli_utility_path('gdaladdo') ############################################################################### # def get_gdaltransform_path(): return get_cli_utility_path('gdaltransform') ############################################################################### # def get_gdaltindex_path(): return get_cli_utility_path('gdaltindex') ############################################################################### # def get_gdal_grid_path(): return get_cli_utility_path('gdal_grid') ############################################################################### # def get_ogrinfo_path(): return get_cli_utility_path('ogrinfo') ############################################################################### # def get_ogr2ogr_path(): return get_cli_utility_path('ogr2ogr') ############################################################################### # def get_ogrtindex_path(): return get_cli_utility_path('ogrtindex') ############################################################################### # def get_ogrlineref_path(): return get_cli_utility_path('ogrlineref') ############################################################################### # def get_gdalbuildvrt_path(): return get_cli_utility_path('gdalbuildvrt') ############################################################################### # def get_gdal_contour_path(): return get_cli_utility_path('gdal_contour') ############################################################################### # def get_gdaldem_path(): return get_cli_utility_path('gdaldem') ############################################################################### # def get_gdal_rasterize_path(): return get_cli_utility_path('gdal_rasterize') ############################################################################### # def get_nearblack_path(): return get_cli_utility_path('nearblack') ############################################################################### # def get_test_ogrsf_path(): return get_cli_utility_path('test_ogrsf') ############################################################################### # def get_gdallocationinfo_path(): return get_cli_utility_path('gdallocationinfo') ############################################################################### # def get_gdalsrsinfo_path(): return get_cli_utility_path('gdalsrsinfo') ############################################################################### # def get_gnmmanage_path(): return get_cli_utility_path('gnmmanage') ############################################################################### # def get_gnmanalyse_path(): return get_cli_utility_path('gnmanalyse') ############################################################################### # def get_gdal_viewshed_path(): return get_cli_utility_path('gdal_viewshed') ��������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/webserver.py���������������������������������������������������������������0000775�0001750�0001750�00000035533�13701057760�016423� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python ############################################################################### # $Id: webserver.py e9915df0c744cbf149e9bc687cc9edd6e88fb959 2019-06-25 11:41:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Fake HTTP server # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2010-2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### try: from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer except ImportError: from http.server import BaseHTTPRequestHandler, HTTPServer from threading import Thread import contextlib import time import sys from sys import version_info import gdaltest do_log = False custom_handler = None @contextlib.contextmanager def install_http_handler(handler_instance): global custom_handler custom_handler = handler_instance try: yield finally: handler_instance.final_check() custom_handler = None class RequestResponse(object): def __init__(self, method, path, code, headers=None, body=None, custom_method=None, expected_headers=None, expected_body=None, add_content_length_header=True): self.method = method self.path = path self.code = code self.headers = {} if headers is None else headers self.body = body self.custom_method = custom_method self.expected_headers = {} if expected_headers is None else expected_headers self.expected_body = expected_body self.add_content_length_header = add_content_length_header class FileHandler(object): def __init__(self, _dict): self.dict = _dict def final_check(self): pass def do_HEAD(self, request): if request.path not in self.dict: request.send_response(404) request.end_headers() else: request.send_response(200) request.send_header('Content-Length', len(self.dict[request.path])) request.end_headers() def do_GET(self, request): if request.path not in self.dict: request.send_response(404) request.end_headers() else: filedata = self.dict[request.path] start = 0 end = len(filedata) if 'Range' in request.headers: import re res = re.search('bytes=(\d+)\-(\d+)', request.headers['Range']) if res: res = res.groups() start = int(res[0]) end = int(res[1]) + 1 if end > len(filedata): end = len(filedata) request.send_response(200) if 'Range' in request.headers: request.send_header('Content-Range', '%d-%d' % (start, end - 1)) request.send_header('Content-Length', len(filedata)) request.end_headers() request.wfile.write(filedata[start:end]) class SequentialHandler(object): def __init__(self): self.req_count = 0 self.req_resp = [] self.req_resp_map = {} def final_check(self): assert self.req_count == len(self.req_resp), (self.req_count, len(self.req_resp)) assert not self.req_resp_map def add(self, method, path, code=None, headers=None, body=None, custom_method=None, expected_headers=None, expected_body=None, add_content_length_header=True): hdrs = {} if headers is None else headers expected_hdrs = {} if expected_headers is None else expected_headers assert not self.req_resp_map self.req_resp.append(RequestResponse(method, path, code, hdrs, body, custom_method, expected_hdrs, expected_body, add_content_length_header)) def add_unordered(self, method, path, code=None, headers=None, body=None, custom_method=None, expected_headers=None, expected_body=None, add_content_length_header=True): hdrs = {} if headers is None else headers expected_hdrs = {} if expected_headers is None else expected_headers self.req_resp_map[(method, path)] = RequestResponse(method, path, code, hdrs, body, custom_method, expected_hdrs, expected_body, add_content_length_header) @staticmethod def _process_req_resp(req_resp, request): if req_resp.custom_method: req_resp.custom_method(request) else: if req_resp.expected_headers: for k in req_resp.expected_headers: if k not in request.headers or request.headers[k] != req_resp.expected_headers[k]: sys.stderr.write('Did not get expected headers: %s\n' % str(request.headers)) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return if req_resp.expected_body: content = request.rfile.read(int(request.headers['Content-Length'])) if content != req_resp.expected_body: sys.stderr.write('Did not get expected content: %s\n' % content) request.send_response(400) request.send_header('Content-Length', 0) request.end_headers() return request.send_response(req_resp.code) for k in req_resp.headers: request.send_header(k, req_resp.headers[k]) if req_resp.add_content_length_header: if req_resp.body: request.send_header('Content-Length', len(req_resp.body)) elif 'Content-Length' not in req_resp.headers: request.send_header('Content-Length', '0') request.end_headers() if req_resp.body: try: request.wfile.write(req_resp.body) except: request.wfile.write(req_resp.body.encode('ascii')) def process(self, method, request): if self.req_count < len(self.req_resp): req_resp = self.req_resp[self.req_count] if method == req_resp.method and request.path == req_resp.path: self.req_count += 1 SequentialHandler._process_req_resp(req_resp, request) return else: if (method, request.path) in self.req_resp_map: req_resp = self.req_resp_map[(method, request.path)] del self.req_resp_map[(method, request.path)] SequentialHandler._process_req_resp(req_resp, request) return request.send_error(500, 'Unexpected %s request for %s, req_count = %d' % (method, request.path, self.req_count)) def do_HEAD(self, request): self.process('HEAD', request) def do_GET(self, request): self.process('GET', request) def do_POST(self, request): self.process('POST', request) def do_PUT(self, request): self.process('PUT', request) def do_DELETE(self, request): self.process('DELETE', request) class DispatcherHttpHandler(BaseHTTPRequestHandler): # protocol_version = 'HTTP/1.1' def log_request(self, code='-', size='-'): # pylint: disable=unused-argument pass def do_HEAD(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('HEAD %s\n' % self.path) f.close() custom_handler.do_HEAD(self) def do_DELETE(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('DELETE %s\n' % self.path) f.close() custom_handler.do_DELETE(self) def do_POST(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('POST %s\n' % self.path) f.close() custom_handler.do_POST(self) def do_PUT(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('PUT %s\n' % self.path) f.close() custom_handler.do_PUT(self) def do_GET(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() custom_handler.do_GET(self) class GDAL_Handler(BaseHTTPRequestHandler): # pylint: disable=unused-argument def log_request(self, code='-', size='-'): pass def do_HEAD(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('HEAD %s\n' % self.path) f.close() self.send_error(404, 'File Not Found: %s' % self.path) def do_DELETE(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('DELETE %s\n' % self.path) f.close() self.send_error(404, 'File Not Found: %s' % self.path) def do_POST(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('POST %s\n' % self.path) f.close() self.send_error(404, 'File Not Found: %s' % self.path) def do_PUT(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('PUT %s\n' % self.path) f.close() self.send_error(404, 'File Not Found: %s' % self.path) def do_GET(self): try: if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() if self.path == '/shutdown': self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() # sys.stderr.write('stop requested\n') self.server.stop_requested = True return return except IOError: pass self.send_error(404, 'File Not Found: %s' % self.path) class GDAL_HttpServer(HTTPServer): def __init__(self, server_address, handlerClass): HTTPServer.__init__(self, server_address, handlerClass) self.running = False self.stop_requested = False def is_running(self): return self.running def stop_server(self): if self.running: if version_info >= (2, 6, 0): self.shutdown() else: gdaltest.gdalurlopen("http://127.0.0.1:%d/shutdown" % self.port) self.running = False def serve_until_stop_server(self): self.running = True if version_info >= (2, 6, 0): self.serve_forever(0.25) else: while self.running and not self.stop_requested: self.handle_request() self.running = False self.stop_requested = False class GDAL_ThreadedHttpServer(Thread): def __init__(self, handlerClass=None): Thread.__init__(self) ok = False self.server = 0 if handlerClass is None: handlerClass = GDAL_Handler for port in range(8080, 8100): try: self.server = GDAL_HttpServer(('', port), handlerClass) self.server.port = port ok = True break except: pass if not ok: raise Exception('could not start server') def getPort(self): return self.server.port def run(self): try: self.server.serve_until_stop_server() except KeyboardInterrupt: print('^C received, shutting down server') self.server.socket.close() def start_and_wait_ready(self): if self.server.running: raise Exception('server already started') self.start() while not self.server.running: time.sleep(1) def stop(self): self.server.stop_server() # Explicitly destroy the object so that the socket is really closed del self.server def run_server(self, timeout): if not self.server.running: raise Exception('server not started') count = 0 while (timeout <= 0 or count < timeout) and self.server.running and not self.server.stop_requested: # print(count) # print(self.server.is_running()) time.sleep(0.5) count = count + 0.5 self.stop() def launch(fork_process=None, handler=None): if handler is not None: if fork_process: raise Exception('fork_process = True incompatible with custom handler') fork_process = False else: fork_process = True if not fork_process or handler is not None: try: if handler is None: handler = GDAL_Handler server = GDAL_ThreadedHttpServer(handler) server.start_and_wait_ready() return (server, server.getPort()) except: return (None, 0) python_exe = sys.executable if sys.platform == 'win32': python_exe = python_exe.replace('\\', '/') (process, process_stdout) = gdaltest.spawn_async(python_exe + ' ../pymod/webserver.py') if process is None: return (None, 0) line = process_stdout.readline() line = line.decode('ascii') process_stdout.close() if line.find('port=') == -1: return (None, 0) port = int(line[5:]) if port != 0: print('HTTP Server started on port %d' % port) return (process, port) def server_stop(process, port): if isinstance(process, GDAL_ThreadedHttpServer): process.stop() return gdaltest.gdalurlopen('http://127.0.0.1:%d/shutdown' % port) gdaltest.wait_process(process) def main(): try: server = GDAL_ThreadedHttpServer(GDAL_Handler) server.start_and_wait_ready() print('port=%d' % server.getPort()) sys.stdout.flush() except: print('port=0') sys.stdout.flush() sys.exit(0) server.run_server(10) if __name__ == '__main__': main() ���������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/uffd.py��������������������������������������������������������������������0000775�0001750�0001750�00000006270�13701057760�015337� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- coding: utf-8 -*- ############################################################################### # $Id: uffd.py 4b037f2de9b3a6c1c0e34a13b0f6e44cd01715d8 2019-04-27 15:13:11 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Python Library supporting GDAL/OGR Test Suite # Author: James McClain <james.mcclain@gmail.com> # ############################################################################### # Copyright (c) 2018, Dr. James McClain <james.mcclain@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal def uffd_compare(filename): """Compare the same file opened with and without the userfaultfd. This function reads a file using the standard filesystem-based mechanism and also using VSIL (and the userfaultfd mechanism for drivers which cannot use VSIL except with it, which are the ones of interest). The two datasets are compared to each other in various ways. Args: filename: The name of the file within the 'autotest/gdrivers/data' directory to use for testing. Returns: `None` if the dataset could not be opened through the VSIL mechanism. `True` is returned if the datasets were found to be identical after various comparisons. `False` otherwise. """ ext = os.path.splitext(filename)[1] vsimem = '/vsimem/file{}'.format(ext) filename2 = './data/{}'.format(filename) gdal.FileFromMemBuffer(vsimem, open(filename2, 'rb').read()) dataset1 = gdal.Open(filename2) dataset2 = gdal.Open(vsimem) if dataset2 is None: gdal.Unlink(vsimem) return None if (dataset1.GetMetadata() != dataset2.GetMetadata()): gdal.Unlink(vsimem) return False if (dataset1.RasterCount != dataset2.RasterCount): gdal.Unlink(vsimem) return False for i in range(dataset1.RasterCount): checksum1 = dataset1.GetRasterBand(i+1).Checksum() checksum2 = dataset2.GetRasterBand(i+1).Checksum() if not checksum1 == checksum2: gdal.Unlink(vsimem) return False gdal.Unlink(vsimem) return True ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/gdaltest.py����������������������������������������������������������������0000775�0001750�0001750�00000163207�13701057760�016226� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- coding: utf-8 -*- ############################################################################### # $Id: gdaltest.py 391b9859fd7016873d8e8b2b677b938592733bef 2020-01-11 22:51:51 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Python Library supporting GDAL/OGR Test Suite # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import contextlib import math import os import os.path import stat import sys from sys import version_info import time from osgeo import gdal from osgeo import osr import pytest cur_name = 'default' success_counter = 0 failure_counter = 0 expected_failure_counter = 0 blow_counter = 0 skip_counter = 0 failure_summary = [] reason = None count_skipped_tests_download = 0 count_skipped_tests_slow = 0 start_time = None end_time = None jp2kak_drv = None jpeg2000_drv = None jp2ecw_drv = None jp2mrsid_drv = None jp2openjpeg_drv = None jp2lura_drv = None jp2kak_drv_unregistered = False jpeg2000_drv_unregistered = False jp2ecw_drv_unregistered = False jp2mrsid_drv_unregistered = False jp2openjpeg_drv_unregistered = False jp2lura_drv_unregistered = False if version_info >= (3, 0, 0): import gdaltest_python3 as gdaltestaux else: import gdaltest_python2 as gdaltestaux # Process commandline arguments for stuff like --debug, --locale, --config argv = gdal.GeneralCmdLineProcessor(sys.argv) ############################################################################### def git_status(): out, _ = runexternal_out_and_err('git status --porcelain .') return out ############################################################################### def get_lineno_2framesback(frames): try: import inspect frame = inspect.currentframe() while frames > 0: frame = frame.f_back frames = frames - 1 return frame.f_lineno except ImportError: return -1 ############################################################################### def post_reason(msg, frames=2): lineno = get_lineno_2framesback(frames) global reason if lineno >= 0: reason = 'line %d: %s' % (lineno, msg) else: reason = msg ############################################################################### def clean_tmp(): all_files = os.listdir('tmp') for filename in all_files: if filename in ['CVS', 'do-not-remove']: continue try: os.remove('tmp/' + filename) except OSError: pass ############################################################################### def testCreateCopyInterruptCallback(pct, message, user_data): # pylint: disable=unused-argument return pct <= 0.5 ############################################################################### class GDALTest(object): def __init__(self, drivername, filename, band, chksum, xoff=0, yoff=0, xsize=0, ysize=0, options=None, filename_absolute=0, chksum_after_reopening=None, open_options=None): self.driver = None self.drivername = drivername self.filename = filename self.filename_absolute = filename_absolute self.band = band self.chksum = chksum if chksum_after_reopening is not None: if isinstance(chksum_after_reopening, list): self.chksum_after_reopening = chksum_after_reopening else: self.chksum_after_reopening = [chksum_after_reopening] elif chksum is None: self.chksum_after_reopening = None else: self.chksum_after_reopening = [chksum] self.xoff = xoff self.yoff = yoff self.xsize = xsize self.ysize = ysize self.options = [] if options is None else options self.open_options = open_options def testDriver(self): if self.driver is None: self.driver = gdal.GetDriverByName(self.drivername) if self.driver is None: pytest.skip(self.drivername + ' driver not found!') def testOpen(self, check_prj=None, check_gt=None, gt_epsilon=None, check_stat=None, check_approx_stat=None, stat_epsilon=None, skip_checksum=None, check_min=None, check_max=None, check_filelist=True): """check_prj - projection reference, check_gt - geotransformation matrix (tuple), gt_epsilon - geotransformation tolerance, check_stat - band statistics (tuple), stat_epsilon - statistics tolerance.""" self.testDriver() if self.filename_absolute: wrk_filename = self.filename else: wrk_filename = 'data/' + self.filename if self.open_options: ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) assert ds is not None, ('Failed to open dataset: ' + wrk_filename) assert ds.GetDriver().ShortName == gdal.GetDriverByName(self.drivername).ShortName, \ ('The driver of the returned dataset is %s instead of %s.' % (ds.GetDriver().ShortName, self.drivername)) if self.xsize == 0 and self.ysize == 0: self.xsize = ds.RasterXSize self.ysize = ds.RasterYSize if check_filelist and ds.GetDriver().GetMetadataItem('DCAP_VIRTUALIO') is not None: fl = ds.GetFileList() if fl is not None and fl and wrk_filename == fl[0]: # Copy all files in /vsimem/ mainfile_dirname = os.path.dirname(fl[0]) for filename in fl: target_filename = '/vsimem/tmp_testOpen/' + filename[len(mainfile_dirname) + 1:] if stat.S_ISDIR(gdal.VSIStatL(filename).mode): gdal.Mkdir(target_filename, 0) else: f = gdal.VSIFOpenL(filename, 'rb') assert f is not None, ('File %s does not exist' % filename) gdal.VSIFSeekL(f, 0, 2) size = gdal.VSIFTellL(f) gdal.VSIFSeekL(f, 0, 0) data = gdal.VSIFReadL(1, size, f) gdal.VSIFCloseL(f) if data is None: data = '' gdal.FileFromMemBuffer(target_filename, data) # Try to open the in-memory file main_virtual_filename = '/vsimem/tmp_testOpen/' + os.path.basename(fl[0]) virtual_ds = gdal.Open(main_virtual_filename) virtual_ds_is_None = virtual_ds is None virtual_ds = None # Make sure the driver is specific enough by trying to open # with all other drivers but it drivers = [] for i in range(gdal.GetDriverCount()): drv_name = gdal.GetDriver(i).ShortName if drv_name.lower() != self.drivername.lower() and not \ ((drv_name.lower() == 'gif' and self.drivername.lower() == 'biggif') or (drv_name.lower() == 'biggif' and self.drivername.lower() == 'gif')): drivers += [drv_name] other_ds = gdal.OpenEx(main_virtual_filename, gdal.OF_RASTER, allowed_drivers=drivers) other_ds_is_None = other_ds is None other_ds_driver_name = None if not other_ds_is_None: other_ds_driver_name = other_ds.GetDriver().ShortName other_ds = None for filename in gdal.ReadDirRecursive('/vsimem/tmp_testOpen'): gdal.Unlink('/vsimem/tmp_testOpen/' + filename) assert not virtual_ds_is_None, \ 'File list is not complete or driver does not support /vsimem/' assert other_ds_is_None, \ ('When excluding %s, dataset is still opened by driver %s' % (self.drivername, other_ds_driver_name)) # Do we need to check projection? if check_prj is not None: new_prj = ds.GetProjection() src_osr = osr.SpatialReference() src_osr.SetFromUserInput(check_prj) new_osr = osr.SpatialReference(wkt=new_prj) if not src_osr.IsSame(new_osr): print('') print('old = %s' % src_osr.ExportToPrettyWkt()) print('new = %s' % new_osr.ExportToPrettyWkt()) pytest.fail('Projections differ') # Do we need to check geotransform? if check_gt: # Default to 100th of pixel as our test value. if gt_epsilon is None: gt_epsilon = (abs(check_gt[1]) + abs(check_gt[2])) / 100.0 new_gt = ds.GetGeoTransform() for i in range(6): if new_gt[i] != pytest.approx(check_gt[i], abs=gt_epsilon): print('') print('old = ', check_gt) print('new = ', new_gt) pytest.fail('Geotransform differs.') oBand = ds.GetRasterBand(self.band) if skip_checksum is None: chksum = oBand.Checksum(self.xoff, self.yoff, self.xsize, self.ysize) # Do we need to check approximate statistics? if check_approx_stat: # Default to 1000th of pixel value range as our test value. if stat_epsilon is None: stat_epsilon = \ abs(check_approx_stat[1] - check_approx_stat[0]) / 1000.0 new_stat = oBand.GetStatistics(1, 1) for i in range(4): # NOTE - mloskot: Poor man Nan/Inf value check. It's poor # because we need to support old and buggy Python 2.3. # Tested on Linux, Mac OS X and Windows, with Python 2.3/2.4/2.5. sv = str(new_stat[i]).lower() assert not ('n' in sv or 'i' in sv or '#' in sv), \ ('NaN or infinity value encountered \'%s\'.' % sv) if new_stat[i] != pytest.approx(check_approx_stat[i], abs=stat_epsilon): print('') print('old = ', check_approx_stat) print('new = ', new_stat) pytest.fail('Approximate statistics differs.') # Do we need to check statistics? if check_stat: # Default to 1000th of pixel value range as our test value. if stat_epsilon is None: stat_epsilon = abs(check_stat[1] - check_stat[0]) / 1000.0 # FIXME: how to test approximate statistic results? new_stat = oBand.GetStatistics(1, 1) new_stat = oBand.GetStatistics(0, 1) for i in range(4): sv = str(new_stat[i]).lower() assert not ('n' in sv or 'i' in sv or '#' in sv), \ ('NaN or infinity value encountered \'%s\'.' % sv) if new_stat[i] != pytest.approx(check_stat[i], abs=stat_epsilon): print('') print('old = ', check_stat) print('new = ', new_stat) pytest.fail('Statistics differs.') if check_min: assert oBand.GetMinimum() == check_min, \ ('Unexpected minimum value %s' % str(oBand.GetMinimum())) if check_max: assert oBand.GetMaximum() == check_max, \ ('Unexpected maximum value %s' % str(oBand.GetMaximum())) ds = None assert not is_file_open(wrk_filename), 'file still open after dataset closing' if skip_checksum is not None: return if self.chksum is None or chksum == self.chksum: return pytest.fail('Checksum for band %d in "%s" is %d, but expected %d.' % (self.band, self.filename, chksum, self.chksum)) def testCreateCopy(self, check_minmax=1, check_gt=0, check_srs=None, vsimem=0, new_filename=None, strict_in=0, skip_preclose_test=0, delete_copy=1, gt_epsilon=None, check_checksum_not_null=None, interrupt_during_copy=False, dest_open_options=None, quiet_error_handler=True): self.testDriver() if self.filename_absolute: wrk_filename = self.filename else: wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) if self.band > 0: minmax = src_ds.GetRasterBand(self.band).ComputeRasterMinMax() src_prj = src_ds.GetProjection() src_gt = src_ds.GetGeoTransform() if new_filename is None: if vsimem: new_filename = '/vsimem/' + os.path.basename(self.filename) + '.tst' else: new_filename = 'tmp/' + os.path.basename(self.filename) + '.tst' if quiet_error_handler: gdal.PushErrorHandler('CPLQuietErrorHandler') if interrupt_during_copy: new_ds = self.driver.CreateCopy(new_filename, src_ds, strict=strict_in, options=self.options, callback=testCreateCopyInterruptCallback) else: new_ds = self.driver.CreateCopy(new_filename, src_ds, strict=strict_in, options=self.options) if quiet_error_handler: gdal.PopErrorHandler() if interrupt_during_copy: if new_ds is None: gdal.PushErrorHandler('CPLQuietErrorHandler') self.driver.Delete(new_filename) gdal.PopErrorHandler() return new_ds = None self.driver.Delete(new_filename) pytest.fail('CreateCopy() should have failed due to interruption') assert new_ds is not None, ('Failed to create test file using CreateCopy method.' + '\n' + gdal.GetLastErrorMsg()) assert new_ds.GetDriver().ShortName == gdal.GetDriverByName(self.drivername).ShortName, \ ('The driver of the returned dataset is %s instead of %s.' % (new_ds.GetDriver().ShortName, self.drivername)) if self.band > 0 and skip_preclose_test == 0: bnd = new_ds.GetRasterBand(self.band) if check_checksum_not_null is True: assert bnd.Checksum() != 0, 'Got null checksum on still-open file.' elif self.chksum is not None and bnd.Checksum() != self.chksum: pytest.fail( 'Did not get expected checksum on still-open file.\n' ' Got %d instead of %d.' % (bnd.Checksum(), self.chksum)) if check_minmax: got_minmax = bnd.ComputeRasterMinMax() assert got_minmax == minmax, \ ('Did not get expected min/max values on still-open file.\n' ' Got %g,%g instead of %g,%g.' % (got_minmax[0], got_minmax[1], minmax[0], minmax[1])) bnd = None new_ds = None # hopefully it's closed now! if dest_open_options is not None: new_ds = gdal.OpenEx(new_filename, gdal.OF_RASTER, open_options=dest_open_options) else: new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) if self.band > 0: bnd = new_ds.GetRasterBand(self.band) if check_checksum_not_null is True: assert bnd.Checksum() != 0, 'Got null checksum on reopened file.' elif self.chksum_after_reopening is not None and bnd.Checksum() not in self.chksum_after_reopening: pytest.fail('Did not get expected checksum on reopened file.\n' ' Got %d instead of %s.' % (bnd.Checksum(), str(self.chksum_after_reopening))) if check_minmax: got_minmax = bnd.ComputeRasterMinMax() assert got_minmax == minmax, \ ('Did not get expected min/max values on reopened file.\n' ' Got %g,%g instead of %g,%g.' % (got_minmax[0], got_minmax[1], minmax[0], minmax[1])) # Do we need to check the geotransform? if check_gt: if gt_epsilon is None: eps = 0.00000001 else: eps = gt_epsilon new_gt = new_ds.GetGeoTransform() if new_gt[0] != pytest.approx(src_gt[0], abs=eps) \ or new_gt[1] != pytest.approx(src_gt[1], abs=eps) \ or new_gt[2] != pytest.approx(src_gt[2], abs=eps) \ or new_gt[3] != pytest.approx(src_gt[3], abs=eps) \ or new_gt[4] != pytest.approx(src_gt[4], abs=eps) \ or new_gt[5] != pytest.approx(src_gt[5], abs=eps): print('') print('old = ', src_gt) print('new = ', new_gt) pytest.fail('Geotransform differs.') # Do we need to check the geotransform? if check_srs is not None: new_prj = new_ds.GetProjection() src_osr = osr.SpatialReference(wkt=src_prj) new_osr = osr.SpatialReference(wkt=new_prj) if not src_osr.IsSame(new_osr): print('') print('old = %s' % src_osr.ExportToPrettyWkt()) print('new = %s' % new_osr.ExportToPrettyWkt()) pytest.fail('Projections differ') bnd = None new_ds = None src_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON' and delete_copy == 1: self.driver.Delete(new_filename) def testCreate(self, vsimem=0, new_filename=None, out_bands=1, check_minmax=1, dest_open_options=None): self.testDriver() if self.filename_absolute: wrk_filename = self.filename else: wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize src_img = src_ds.GetRasterBand(self.band).ReadRaster(0, 0, xsize, ysize) minmax = src_ds.GetRasterBand(self.band).ComputeRasterMinMax() if new_filename is None: if vsimem: new_filename = '/vsimem/' + self.filename + '.tst' else: new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, out_bands, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' src_ds = None try: for band in range(1, out_bands + 1): new_ds.GetRasterBand(band).WriteRaster(0, 0, xsize, ysize, src_img) except: pytest.fail('Failed to write raster bands to test file.') for band in range(1, out_bands + 1): assert self.chksum is None or new_ds.GetRasterBand(band).Checksum() == self.chksum, \ ('Did not get expected checksum on still-open file.\n' ' Got %d instead of %d.' % (new_ds.GetRasterBand(band).Checksum(), self.chksum)) computed_minmax = new_ds.GetRasterBand(band).ComputeRasterMinMax() if computed_minmax != minmax and check_minmax: print('expect: ', minmax) print('got: ', computed_minmax) pytest.fail('Did not get expected min/max values on still-open file.') new_ds = None if dest_open_options is not None: new_ds = gdal.OpenEx(new_filename, gdal.OF_RASTER, open_options=dest_open_options) else: new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) for band in range(1, out_bands + 1): assert self.chksum is None or new_ds.GetRasterBand(band).Checksum() == self.chksum, \ ('Did not get expected checksum on reopened file.' ' Got %d instead of %d.' % (new_ds.GetRasterBand(band).Checksum(), self.chksum)) assert new_ds.GetRasterBand(band).ComputeRasterMinMax() == minmax or not check_minmax, \ 'Did not get expected min/max values on reopened file.' new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def testSetGeoTransform(self): self.testDriver() wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, 1, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' gt = (123.0, 1.18, 0.0, 456.0, 0.0, -1.18) assert new_ds.SetGeoTransform(gt) is gdal.CE_None, \ 'Failed to set geographic transformation.' src_ds = None new_ds = None new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) eps = 0.00000001 new_gt = new_ds.GetGeoTransform() if new_gt[0] != pytest.approx(gt[0], abs=eps) \ or new_gt[1] != pytest.approx(gt[1], abs=eps) \ or new_gt[2] != pytest.approx(gt[2], abs=eps) \ or new_gt[3] != pytest.approx(gt[3], abs=eps) \ or new_gt[4] != pytest.approx(gt[4], abs=eps) \ or new_gt[5] != pytest.approx(gt[5], abs=eps): print('') print('old = ', gt) print('new = ', new_gt) pytest.fail('Did not get expected geotransform.') new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def testSetProjection(self, prj=None, expected_prj=None): self.testDriver() wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, 1, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' gt = (123.0, 1.18, 0.0, 456.0, 0.0, -1.18) if prj is None: # This is a challenging SRS since it has non-meter linear units. prj = 'PROJCS["NAD83 / Ohio South",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",40.03333333333333],PARAMETER["standard_parallel_2",38.73333333333333],PARAMETER["latitude_of_origin",38],PARAMETER["central_meridian",-82.5],PARAMETER["false_easting",1968500],PARAMETER["false_northing",0],UNIT["US survey foot",0.3048006096012192]]' src_osr = osr.SpatialReference() src_osr.ImportFromWkt(prj) new_ds.SetGeoTransform(gt) assert new_ds.SetProjection(prj) is gdal.CE_None, \ 'Failed to set geographic projection string.' src_ds = None new_ds = None new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) expected_osr = osr.SpatialReference() if expected_prj is None: expected_osr = src_osr else: expected_osr.ImportFromWkt(expected_prj) new_osr = osr.SpatialReference() new_osr.ImportFromWkt(new_ds.GetProjection()) if not new_osr.IsSame(expected_osr): print('Got: ') print(new_osr.ExportToPrettyWkt()) print('Expected:') print(expected_osr.ExportToPrettyWkt()) pytest.fail('Did not get expected projection reference.') new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def testSetMetadata(self): self.testDriver() wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, 1, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' new_ds.SetMetadata({'TEST_KEY': 'TestValue'}) # FIXME # if new_ds.SetMetadata( dict ) is not gdal.CE_None: # print new_ds.SetMetadata( dict ) # post_reason( 'Failed to set metadata item.' ) # return 'fail' src_ds = None new_ds = None new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) md_dict = new_ds.GetMetadata() assert 'TEST_KEY' in md_dict, 'Metadata item TEST_KEY does not exist.' assert md_dict['TEST_KEY'] == 'TestValue', 'Did not get expected metadata item.' new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def testSetNoDataValue(self, delete=False): self.testDriver() wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, 1, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' if self.options is None or 'PIXELTYPE=SIGNEDBYTE' not in self.options: nodata = 130 else: nodata = 11 assert new_ds.GetRasterBand(1).SetNoDataValue(nodata) is gdal.CE_None, \ 'Failed to set NoData value.' src_ds = None new_ds = None if delete: mode = gdal.GA_Update else: mode = gdal.GA_ReadOnly new_ds = gdal.Open(new_filename, mode) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) assert nodata == new_ds.GetRasterBand(1).GetNoDataValue(), \ 'Did not get expected NoData value.' if delete: assert new_ds.GetRasterBand(1).DeleteNoDataValue() == 0, \ 'Did not manage to delete nodata value' new_ds = None if delete: new_ds = gdal.Open(new_filename) assert new_ds.GetRasterBand(1).GetNoDataValue() is None, \ 'Got nodata value whereas none was expected' new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def testSetNoDataValueAndDelete(self): return self.testSetNoDataValue(delete=True) def testSetDescription(self): self.testDriver() wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, 1, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' description = "Description test string" new_ds.GetRasterBand(1).SetDescription(description) src_ds = None new_ds = None new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) assert description == new_ds.GetRasterBand(1).GetDescription(), \ 'Did not get expected description string.' new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def testSetUnitType(self): self.testDriver() wrk_filename = 'data/' + self.filename if self.open_options: src_ds = gdal.OpenEx(wrk_filename, gdal.OF_RASTER, open_options=self.open_options) else: src_ds = gdal.Open(wrk_filename, gdal.GA_ReadOnly) xsize = src_ds.RasterXSize ysize = src_ds.RasterYSize new_filename = 'tmp/' + self.filename + '.tst' new_ds = self.driver.Create(new_filename, xsize, ysize, 1, src_ds.GetRasterBand(self.band).DataType, options=self.options) assert new_ds is not None, 'Failed to create test file using Create method.' unit = 'mg/m3' assert new_ds.GetRasterBand(1).SetUnitType(unit) is gdal.CE_None, \ 'Failed to set unit type.' src_ds = None new_ds = None new_ds = gdal.Open(new_filename) assert new_ds is not None, ('Failed to open dataset: ' + new_filename) new_unit = new_ds.GetRasterBand(1).GetUnitType() if new_unit != unit: print('') print('old = ', unit) print('new = ', new_unit) pytest.fail('Did not get expected unit type.') new_ds = None if gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': self.driver.Delete(new_filename) def approx_equal(a, b): a = float(a) b = float(b) if a == 0 and b != 0: return 0 if b / a != pytest.approx(1.0, abs=.00000000001): return 0 return 1 def user_srs_to_wkt(user_text): srs = osr.SpatialReference() srs.SetFromUserInput(user_text) return srs.ExportToWkt() def equal_srs_from_wkt(expected_wkt, got_wkt, verbose=True): expected_srs = osr.SpatialReference() expected_srs.ImportFromWkt(expected_wkt) got_srs = osr.SpatialReference() got_srs.ImportFromWkt(got_wkt) if got_srs.IsSame(expected_srs): return 1 if verbose: print('Expected:\n%s' % expected_wkt) print('Got: \n%s' % got_wkt) post_reason('SRS differs from expected.') return 0 ############################################################################### # Compare two sets of RPC metadata, and establish if they are essentially # equivalent or not. def rpcs_equal(md1, md2): simple_fields = ['LINE_OFF', 'SAMP_OFF', 'LAT_OFF', 'LONG_OFF', 'HEIGHT_OFF', 'LINE_SCALE', 'SAMP_SCALE', 'LAT_SCALE', 'LONG_SCALE', 'HEIGHT_SCALE'] coef_fields = ['LINE_NUM_COEFF', 'LINE_DEN_COEFF', 'SAMP_NUM_COEFF', 'SAMP_DEN_COEFF'] for sf in simple_fields: try: if not approx_equal(float(md1[sf]), float(md2[sf])): post_reason('%s values differ.' % sf) print(md1[sf]) print(md2[sf]) return 0 except: post_reason('%s value missing or corrupt.' % sf) print(md1) print(md2) return 0 for cf in coef_fields: try: list1 = md1[cf].split() list2 = md2[cf].split() except: post_reason('%s value missing or corrupt.' % cf) print(md1[cf]) print(md2[cf]) return 0 if len(list1) != 20: post_reason('%s value list length wrong(1)' % cf) print(list1) return 0 if len(list2) != 20: post_reason('%s value list length wrong(2)' % cf) print(list2) return 0 for i in range(20): if not approx_equal(float(list1[i]), float(list2[i])): post_reason('%s[%d] values differ.' % (cf, i)) print(list1[i], list2[i]) return 0 return 1 ############################################################################### # Test if geotransforms are equal with an epsilon tolerance # def geotransform_equals(gt1, gt2, gt_epsilon): for i in range(6): if gt1[i] != pytest.approx(gt2[i], abs=gt_epsilon): print('') print('gt1 = ', gt1) print('gt2 = ', gt2) post_reason('Geotransform differs.') return False return True ############################################################################### # Download file at url 'url' and put it as 'filename' in 'tmp/cache/' # # If 'filename' already exits in 'tmp/cache/', it is not downloaded # If GDAL_DOWNLOAD_TEST_DATA is not defined, the function fails # If GDAL_DOWNLOAD_TEST_DATA is defined, 'url' is downloaded as 'filename' in 'tmp/cache/' def download_file(url, filename=None, download_size=-1, force_download=False, max_download_duration=None, base_dir='tmp/cache'): if filename is None: filename = os.path.basename(url) elif filename.startswith(base_dir + '/'): filename = filename[len(base_dir + '/'):] try: os.stat(base_dir + '/' + filename) return True except OSError: if force_download or download_test_data(): val = None start_time = time.time() try: handle = gdalurlopen(url) if handle is None: return False if download_size == -1: try: handle_info = handle.info() download_size = int(handle_info['content-length']) print('Downloading %s (length = %d bytes)...' % (url, download_size)) except: print('Downloading %s...' % (url)) else: print('Downloading %d bytes from %s...' % (download_size, url)) except: return False if download_size >= 0: sys.stdout.write('Progress: ') nLastTick = -1 val = ''.encode('ascii') while len(val) < download_size or download_size < 0: chunk_size = 1024 if download_size >= 0 and len(val) + chunk_size > download_size: chunk_size = download_size - len(val) try: chunk = handle.read(chunk_size) except: print('Did not get expected data length.') return False if len(chunk) < chunk_size: if download_size < 0: break print('Did not get expected data length.') return False val = val + chunk if download_size >= 0: nThisTick = int(40 * len(val) / download_size) while nThisTick > nLastTick: nLastTick = nLastTick + 1 if nLastTick % 4 == 0: sys.stdout.write("%d" % int((nLastTick / 4) * 10)) else: sys.stdout.write(".") nLastTick = nThisTick if nThisTick == 40: sys.stdout.write(" - done.\n") current_time = time.time() if max_download_duration is not None and current_time - start_time > max_download_duration: print('Download aborted due to timeout.') return False try: os.stat(base_dir) except OSError: os.mkdir(base_dir) try: open(base_dir + '/' + filename, 'wb').write(val) return True except IOError: print('Cannot write %s' % (filename)) return False else: return False ############################################################################### # GDAL data type to python struct format def gdal_data_type_to_python_struct_format(datatype): type_char = 'B' if datatype == gdal.GDT_Int16: type_char = 'h' elif datatype == gdal.GDT_UInt16: type_char = 'H' elif datatype == gdal.GDT_Int32: type_char = 'i' elif datatype == gdal.GDT_UInt32: type_char = 'I' elif datatype == gdal.GDT_Float32: type_char = 'f' elif datatype == gdal.GDT_Float64: type_char = 'd' return type_char ############################################################################### # Compare the values of the pixels def compare_ds(ds1, ds2, xoff=0, yoff=0, width=0, height=0, verbose=1): import struct if width == 0: width = ds1.RasterXSize if height == 0: height = ds1.RasterYSize data1 = ds1.GetRasterBand(1).ReadRaster(xoff, yoff, width, height) type_char = gdal_data_type_to_python_struct_format(ds1.GetRasterBand(1).DataType) val_array1 = struct.unpack(type_char * width * height, data1) data2 = ds2.GetRasterBand(1).ReadRaster(xoff, yoff, width, height) type_char = gdal_data_type_to_python_struct_format(ds2.GetRasterBand(1).DataType) val_array2 = struct.unpack(type_char * width * height, data2) maxdiff = 0.0 ndiffs = 0 for i in range(width * height): diff = val_array1[i] - val_array2[i] if diff != 0: # print(val_array1[i]) # print(val_array2[i]) ndiffs = ndiffs + 1 if abs(diff) > maxdiff: maxdiff = abs(diff) if verbose: print("Diff at pixel (%d, %d) : %f" % (i % width, i / width, float(diff))) elif ndiffs < 10: if verbose: print("Diff at pixel (%d, %d) : %f" % (i % width, i / width, float(diff))) if maxdiff != 0 and verbose: print("Max diff : %d" % (maxdiff)) print("Number of diffs : %d" % (ndiffs)) return maxdiff ############################################################################### # Deregister all JPEG2000 drivers, except the one passed as an argument def deregister_all_jpeg2000_drivers_but(name_of_driver_to_keep): global jp2kak_drv, jpeg2000_drv, jp2ecw_drv, jp2mrsid_drv, jp2openjpeg_drv, jp2lura_drv global jp2kak_drv_unregistered, jpeg2000_drv_unregistered, jp2ecw_drv_unregistered, jp2mrsid_drv_unregistered, jp2openjpeg_drv_unregistered, jp2lura_drv_unregistered # Deregister other potential conflicting JPEG2000 drivers that will # be re-registered in the cleanup jp2kak_drv = gdal.GetDriverByName('JP2KAK') if name_of_driver_to_keep != 'JP2KAK' and jp2kak_drv: gdal.Debug('gdaltest', 'Deregistering JP2KAK') jp2kak_drv.Deregister() jp2kak_drv_unregistered = True jpeg2000_drv = gdal.GetDriverByName('JPEG2000') if name_of_driver_to_keep != 'JPEG2000' and jpeg2000_drv: gdal.Debug('gdaltest', 'Deregistering JPEG2000') jpeg2000_drv.Deregister() jpeg2000_drv_unregistered = True jp2ecw_drv = gdal.GetDriverByName('JP2ECW') if name_of_driver_to_keep != 'JP2ECW' and jp2ecw_drv: gdal.Debug('gdaltest.', 'Deregistering JP2ECW') jp2ecw_drv.Deregister() jp2ecw_drv_unregistered = True jp2mrsid_drv = gdal.GetDriverByName('JP2MrSID') if name_of_driver_to_keep != 'JP2MrSID' and jp2mrsid_drv: gdal.Debug('gdaltest.', 'Deregistering JP2MrSID') jp2mrsid_drv.Deregister() jp2mrsid_drv_unregistered = True jp2openjpeg_drv = gdal.GetDriverByName('JP2OpenJPEG') if name_of_driver_to_keep != 'JP2OpenJPEG' and jp2openjpeg_drv: gdal.Debug('gdaltest.', 'Deregistering JP2OpenJPEG') jp2openjpeg_drv.Deregister() jp2openjpeg_drv_unregistered = True jp2lura_drv = gdal.GetDriverByName('JP2Lura') if name_of_driver_to_keep != 'JP2Lura' and jp2lura_drv: gdal.Debug('gdaltest.', 'Deregistering JP2Lura') jp2lura_drv.Deregister() jp2lura_drv_unregistered = True return True ############################################################################### # Re-register all JPEG2000 drivers previously disabled by # deregister_all_jpeg2000_drivers_but def reregister_all_jpeg2000_drivers(): global jp2kak_drv, jpeg2000_drv, jp2ecw_drv, jp2mrsid_drv, jp2openjpeg_drv, jp2lura_drv global jp2kak_drv_unregistered, jpeg2000_drv_unregistered, jp2ecw_drv_unregistered, jp2mrsid_drv_unregistered, jp2openjpeg_drv_unregistered, jp2lura_drv_unregistered if jp2kak_drv_unregistered: jp2kak_drv.Register() jp2kak_drv_unregistered = False gdal.Debug('gdaltest', 'Registering JP2KAK') if jpeg2000_drv_unregistered: jpeg2000_drv.Register() jpeg2000_drv_unregistered = False gdal.Debug('gdaltest', 'Registering JPEG2000') if jp2ecw_drv_unregistered: jp2ecw_drv.Register() jp2ecw_drv_unregistered = False gdal.Debug('gdaltest', 'Registering JP2ECW') if jp2mrsid_drv_unregistered: jp2mrsid_drv.Register() jp2mrsid_drv_unregistered = False gdal.Debug('gdaltest', 'Registering JP2MrSID') if jp2openjpeg_drv_unregistered: jp2openjpeg_drv.Register() jp2openjpeg_drv_unregistered = False gdal.Debug('gdaltest', 'Registering JP2OpenJPEG') if jp2lura_drv_unregistered: jp2lura_drv.Register() jp2lura_drv_unregistered = False gdal.Debug('gdaltest', 'Registering JP2Lura') return True ############################################################################### # Determine if the filesystem supports sparse files. # Currently, this will only work on Linux (or any *NIX that has the stat # command line utility) def filesystem_supports_sparse_files(path): if skip_on_travis(): return False try: (ret, err) = runexternal_out_and_err('stat -f -c "%T" ' + path) except OSError: return False if err != '': post_reason('Cannot determine if filesystem supports sparse files') return False if ret.find('fat32') != -1: post_reason('File system does not support sparse files') return False if ret.find('wslfs') != -1 or \ ret.find('0x53464846') != -1: # wslfs for older stat versions post_reason('Windows Subsystem for Linux FS is at the time of ' + 'writing not known to support sparse files') return False # Add here any missing filesystem supporting sparse files # See http://en.wikipedia.org/wiki/Comparison_of_file_systems if ret.find('ext3') == -1 and \ ret.find('ext4') == -1 and \ ret.find('reiser') == -1 and \ ret.find('xfs') == -1 and \ ret.find('jfs') == -1 and \ ret.find('zfs') == -1 and \ ret.find('ntfs') == -1: post_reason('Filesystem %s is not believed to support sparse files' % ret) return False return True ############################################################################### # Unzip a file def unzip(target_dir, zipfilename, verbose=False): try: import zipfile zf = zipfile.ZipFile(zipfilename) except ImportError: os.system('unzip -d ' + target_dir + ' ' + zipfilename) return for filename in zf.namelist(): if verbose: print(filename) outfilename = os.path.join(target_dir, filename) if filename.endswith('/'): if not os.path.exists(outfilename): os.makedirs(outfilename) else: outdirname = os.path.dirname(outfilename) if not os.path.exists(outdirname): os.makedirs(outdirname) outfile = open(outfilename, 'wb') outfile.write(zf.read(filename)) outfile.close() return isnan = math.isnan ############################################################################### # Return NaN def NaN(): return float('nan') ############################################################################### # Return positive infinity def posinf(): return float('inf') ############################################################################### # Return negative infinity def neginf(): return float('-inf') ############################################################################### # Has the user requested to dowload test data def download_test_data(): global count_skipped_tests_download val = gdal.GetConfigOption('GDAL_DOWNLOAD_TEST_DATA', None) if val != 'yes' and val != 'YES': if count_skipped_tests_download == 0: print('As GDAL_DOWNLOAD_TEST_DATA environment variable is not defined or set to NO, some tests relying on data to downloaded from the Web will be skipped') count_skipped_tests_download = count_skipped_tests_download + 1 return False return True ############################################################################### # Has the user requested to run the slow tests def run_slow_tests(): global count_skipped_tests_slow val = gdal.GetConfigOption('GDAL_RUN_SLOW_TESTS', None) if val != 'yes' and val != 'YES': if count_skipped_tests_slow == 0: print('As GDAL_RUN_SLOW_TESTS environment variable is not defined or set to NO, some "slow" tests will be skipped') count_skipped_tests_slow = count_skipped_tests_slow + 1 return False return True ############################################################################### # Return true if the platform support symlinks def support_symlink(): if sys.platform.startswith('linux'): return True if sys.platform.find('freebsd') != -1: return True if sys.platform == 'darwin': return True if sys.platform.find('sunos') != -1: return True return False ############################################################################### # Return True if the test must be skipped def skip_on_travis(): val = gdal.GetConfigOption('TRAVIS', None) if val is not None: post_reason('Test skipped on Travis') return True return False ############################################################################### # Return True if the provided name is in TRAVIS_BRANCH or BUILD_NAME def is_travis_branch(name): if 'TRAVIS_BRANCH' in os.environ: val = os.environ['TRAVIS_BRANCH'] if name in val: return True if 'BUILD_NAME' in os.environ: val = os.environ['BUILD_NAME'] if name in val: return True return False ############################################################################### # find_lib_linux() # Parse /proc/self/maps to find an occurrence of libXXXXX.so.* def find_lib_linux(libname): f = open('/proc/self/maps') lines = f.readlines() f.close() for line in lines: if line.rfind('/lib' + libname) == -1 or line.find('.so') == -1: continue i = line.find(' ') if i < 0: continue line = line[i + 1:] i = line.find(' ') if i < 0: continue line = line[i + 1:] i = line.find(' ') if i < 0: continue line = line[i + 1:] i = line.find(' ') if i < 0: continue line = line[i + 1:] i = line.find(' ') if i < 0: continue line = line[i + 1:] soname = line.lstrip().rstrip('\n') if soname.rfind('/lib' + libname) == -1: continue return soname return None ############################################################################### # find_lib_sunos() # Parse output of pmap to find an occurrence of libXXX.so.* def find_lib_sunos(libname): pid = os.getpid() lines, _ = runexternal_out_and_err('pmap %d' % pid) for line in lines.split('\n'): if line.rfind('/lib' + libname) == -1 or line.find('.so') == -1: continue i = line.find('/') if i < 0: continue line = line[i:] soname = line.lstrip().rstrip('\n') if soname.rfind('/lib' + libname) == -1: continue return soname return None ############################################################################### # find_lib_windows() # use Module32First() / Module32Next() API on the current process def find_lib_windows(libname): try: import ctypes except ImportError: return None kernel32 = ctypes.windll.kernel32 MAX_MODULE_NAME32 = 255 MAX_PATH = 260 TH32CS_SNAPMODULE = 0x00000008 class MODULEENTRY32(ctypes.Structure): _fields_ = [ ("dwSize", ctypes.c_int), ("th32ModuleID", ctypes.c_int), ("th32ProcessID", ctypes.c_int), ("GlblcntUsage", ctypes.c_int), ("ProccntUsage", ctypes.c_int), ("modBaseAddr", ctypes.c_char_p), ("modBaseSize", ctypes.c_int), ("hModule", ctypes.c_void_p), ("szModule", ctypes.c_char * (MAX_MODULE_NAME32 + 1)), ("szExePath", ctypes.c_char * MAX_PATH) ] Module32First = kernel32.Module32First Module32First.argtypes = [ctypes.c_void_p, ctypes.POINTER(MODULEENTRY32)] Module32First.rettypes = ctypes.c_int Module32Next = kernel32.Module32Next Module32Next.argtypes = [ctypes.c_void_p, ctypes.POINTER(MODULEENTRY32)] Module32Next.rettypes = ctypes.c_int CreateToolhelp32Snapshot = kernel32.CreateToolhelp32Snapshot CreateToolhelp32Snapshot.argtypes = [ctypes.c_int, ctypes.c_int] CreateToolhelp32Snapshot.rettypes = ctypes.c_void_p CloseHandle = kernel32.CloseHandle CloseHandle.argtypes = [ctypes.c_void_p] CloseHandle.rettypes = ctypes.c_int GetLastError = kernel32.GetLastError GetLastError.argtypes = [] GetLastError.rettypes = ctypes.c_int snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0) if snapshot is None: return None soname = None i = 0 while True: entry = MODULEENTRY32() entry.dwSize = ctypes.sizeof(MODULEENTRY32) pentry = ctypes.pointer(entry) if i == 0: ret = Module32First(snapshot, pentry) else: ret = Module32Next(snapshot, pentry) i = i + 1 if ret == 0: break try: path = entry.szExePath.decode('latin1') except: continue i = path.rfind('\\' + libname) if i < 0: continue if path[i + 1:].find('\\') >= 0: continue # Avoid matching gdal_PLUGIN.dll if path[i + 1:].find('_') >= 0: continue soname = path break CloseHandle(snapshot) return soname ############################################################################### # find_lib() def find_lib(mylib): if sys.platform.startswith('linux'): return find_lib_linux(mylib) if sys.platform.startswith('sunos'): return find_lib_sunos(mylib) if sys.platform.startswith('win32'): return find_lib_windows(mylib) # sorry mac users or other BSDs # should be doable return None ############################################################################### # get_opened_files() get_opened_files_has_warned = False def get_opened_files(): if not sys.platform.startswith('linux'): return [] fdpath = '/proc/%d/fd' % os.getpid() if not os.path.exists(fdpath): global get_opened_files_has_warned if not get_opened_files_has_warned: get_opened_files_has_warned = True print('get_opened_files() not supported due to /proc not being readable') return [] file_numbers = os.listdir(fdpath) filenames = [] for fd in file_numbers: try: filename = os.readlink('%s/%s' % (fdpath, fd)) if not filename.startswith('/dev/') and not filename.startswith('pipe:') and filename.find('proj.db') < 0: filenames.append(filename) except OSError: pass return filenames ############################################################################### # is_file_open() def is_file_open(filename): for got_filename in get_opened_files(): if filename in got_filename: return True return False ############################################################################### # built_against_curl() def built_against_curl(): return gdal.GetDriverByName('HTTP') is not None ############################################################################### # error_handler() # Allow use of "with" for an ErrorHandler that always pops at the scope close. # Defaults to suppressing errors and warnings. @contextlib.contextmanager def error_handler(error_name='CPLQuietErrorHandler'): handler = gdal.PushErrorHandler(error_name) try: yield handler finally: gdal.PopErrorHandler() ############################################################################### # Temporarily define a new value of block cache @contextlib.contextmanager def SetCacheMax(val): oldval = gdal.GetCacheMax() gdal.SetCacheMax(val) try: yield finally: gdal.SetCacheMax(oldval) ############################################################################### # Temporarily define a configuration option @contextlib.contextmanager def config_option(key, val): oldval = gdal.GetConfigOption(key) gdal.SetConfigOption(key, val) try: yield finally: gdal.SetConfigOption(key, oldval) ############################################################################### # Temporarily define a set of configuration options @contextlib.contextmanager def config_options(options): oldvals = {key: gdal.GetConfigOption(key) for key in options} for key in options: gdal.SetConfigOption(key, options[key]) try: yield finally: for key in options: gdal.SetConfigOption(key, oldvals[key]) ############################################################################### # Temporarily create a file @contextlib.contextmanager def tempfile(filename, content): gdal.FileFromMemBuffer(filename, content) try: yield finally: gdal.Unlink(filename) ############################################################################### # Temporarily enable exceptions @contextlib.contextmanager def enable_exceptions(): if gdal.GetUseExceptions(): try: yield finally: pass return gdal.UseExceptions() try: yield finally: gdal.DontUseExceptions() ############################################################################### run_func = gdaltestaux.run_func urlescape = gdaltestaux.urlescape gdalurlopen = gdaltestaux.gdalurlopen spawn_async = gdaltestaux.spawn_async wait_process = gdaltestaux.wait_process runexternal = gdaltestaux.runexternal read_in_thread = gdaltestaux.read_in_thread runexternal_out_and_err = gdaltestaux.runexternal_out_and_err �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/__init__.py����������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057760�016133� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/gdaltest_python2.py��������������������������������������������������������0000775�0001750�0001750�00000015666�13701057760�017716� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- coding: utf-8 -*- ############################################################################### # $Id: gdaltest_python2.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Python Library supporting GDAL/OGR Test Suite # Author: Even Rouault, <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2009-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import urllib2 import socket import os import subprocess import shlex import sys from Queue import Queue from threading import Thread def run_func(func): try: result = func() print(result) return result except SystemExit as x: import traceback traceback.print_exc() raise x except Exception: # pylint: disable=broad-except result = 'fail (blowup)' print(result) import traceback traceback.print_exc() return result def urlescape(url): # Escape any non-ASCII characters try: import urllib url = urllib.quote(url) except ImportError: pass return url def gdalurlopen(url, timeout=10): old_timeout = socket.getdefaulttimeout() socket.setdefaulttimeout(timeout) proxy = None if 'GDAL_HTTP_PROXY' in os.environ: proxy = os.environ['GDAL_HTTP_PROXY'] protocol = 'http' if 'GDAL_HTTPS_PROXY' in os.environ and url.startswith('https'): proxy = os.environ['GDAL_HTTPS_PROXY'] protocol = 'https' if proxy is not None: if 'GDAL_HTTP_PROXYUSERPWD' in os.environ: proxyuserpwd = os.environ['GDAL_HTTP_PROXYUSERPWD'] proxyHandler = urllib2.ProxyHandler({"%s" % protocol: "%s://%s@%s" % (protocol, proxyuserpwd, proxy)}) else: proxyuserpwd = None proxyHandler = urllib2.ProxyHandler({"%s" % protocol: "%s://%s" % (protocol, proxy)}) opener = urllib2.build_opener(proxyHandler, urllib2.HTTPHandler) urllib2.install_opener(opener) try: handle = urllib2.urlopen(url) socket.setdefaulttimeout(old_timeout) return handle except urllib2.HTTPError as e: print('HTTP service for %s is down (HTTP Error: %d)' % (url, e.code)) socket.setdefaulttimeout(old_timeout) return None except urllib2.URLError as e: print('HTTP service for %s is down (HTTP Error: %s)' % (url, e.reason)) socket.setdefaulttimeout(old_timeout) return None except socket.timeout: print('HTTP service for %s is down (timeout)' % url) socket.setdefaulttimeout(old_timeout) return None def warn_if_memleak(cmd, out_str): # If DEBUG_VSIMALLOC_STATS is defined, this is an easy way # to catch some memory leaks if cmd.find('--utility_version') == -1 and \ out_str.find('VSIMalloc + VSICalloc - VSIFree') != -1 and \ out_str.find('VSIMalloc + VSICalloc - VSIFree : 0') == -1: print('memory leak detected') print(out_str) def spawn_async(cmd): command = shlex.split(cmd) try: process = subprocess.Popen(command, stdout=subprocess.PIPE) return (process, process.stdout) except OSError: return (None, None) def wait_process(process): process.wait() def runexternal(cmd, strin=None, check_memleak=True, display_live_on_parent_stdout=False, encoding=None): # pylint: disable=unused-argument command = shlex.split(cmd) command = [elt.replace('\x00', '') for elt in command] if strin is None: p = subprocess.Popen(command, stdout=subprocess.PIPE) else: p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE) p.stdin.write(strin) p.stdin.close() if p.stdout is not None: if display_live_on_parent_stdout: ret = '' ret_stdout = p.stdout while True: c = ret_stdout.read(1) if c == '': break ret = ret + c sys.stdout.write(c) else: ret = p.stdout.read() else: ret = '' waitcode = p.wait() if waitcode != 0: ret = ret + '\nERROR ret code = %d' % waitcode if encoding is not None: ret = ret.decode(encoding) return ret def read_in_thread(f, q): q.put(f.read()) f.close() # Compatible with Python 2.6 or above def _runexternal_out_and_err_subprocess(cmd, check_memleak=True, encoding=None): # pylint: disable=unused-argument command = shlex.split(cmd) command = [elt.replace('\x00', '') for elt in command] p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.stdout is not None: q_stdout = Queue() t_stdout = Thread(target=read_in_thread, args=(p.stdout, q_stdout)) t_stdout.start() else: q_stdout = None ret_stdout = '' if p.stderr is not None: q_stderr = Queue() t_stderr = Thread(target=read_in_thread, args=(p.stderr, q_stderr)) t_stderr.start() else: q_stderr = None ret_stderr = '' if q_stdout is not None: ret_stdout = q_stdout.get() if q_stderr is not None: ret_stderr = q_stderr.get() waitcode = p.wait() if waitcode != 0: ret_stderr = ret_stderr + '\nERROR ret code = %d' % waitcode if encoding is not None: ret_stdout = ret_stdout.decode(encoding) return (ret_stdout, ret_stderr) def runexternal_out_and_err(cmd, check_memleak=True, encoding=None): return _runexternal_out_and_err_subprocess(cmd, check_memleak=check_memleak, encoding=encoding) ��������������������������������������������������������������������������gdalautotest-3.1.2/pymod/ogrtest.py�����������������������������������������������������������������0000775�0001750�0001750�00000026613�13701057760�016105� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������############################################################################### # $Id: ogrtest.py 52ec5315816be7a6a6ecd04631652a6eaac73602 2019-12-01 13:12:49 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Support functions for OGR tests. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2003, Frank Warmerdam <warmerdam@pobox.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import sys import pytest sys.path.append('../pymod') from osgeo import ogr import gdaltest geos_flag = None sfcgal_flag = None ############################################################################### def check_features_against_list(layer, field_name, value_list): field_index = layer.GetLayerDefn().GetFieldIndex(field_name) if field_index < 0: gdaltest.post_reason('did not find required field ' + field_name) return 0 for i, value in enumerate(value_list): feat = layer.GetNextFeature() if feat is None: gdaltest.post_reason('Got only %d features, not the expected %d features.' % (i, len(value_list))) return 0 if isinstance(value, type('str')): isok = (feat.GetFieldAsString(field_index) != value) else: isok = (feat.GetField(field_index) != value) if isok: gdaltest.post_reason('field %s feature %d did not match expected value %s, got %s.' % (field_name, i, str(value), str(feat.GetField(field_index)))) return 0 feat = layer.GetNextFeature() if feat is not None: gdaltest.post_reason('got more features than expected') return 0 return 1 ############################################################################### def check_feature_geometry(feat, geom, max_error=0.0001): """ Returns 0 in case of success """ try: f_geom = feat.GetGeometryRef() except: f_geom = feat if geom is not None and isinstance(geom, type('a')): geom = ogr.CreateGeometryFromWkt(geom) if (f_geom is not None and geom is None): gdaltest.post_reason('expected NULL geometry but got one.') return 1 if (f_geom is None and geom is not None): gdaltest.post_reason('expected geometry but got NULL.') return 1 if f_geom is None and geom is None: return 0 if f_geom.GetGeometryName() != geom.GetGeometryName(): gdaltest.post_reason('geometry names do not match. "%s" ! = "%s"' % (f_geom.GetGeometryName(), geom.GetGeometryName())) return 1 if f_geom.GetGeometryCount() != geom.GetGeometryCount(): gdaltest.post_reason('sub-geometry counts do not match') return 1 if f_geom.GetPointCount() != geom.GetPointCount(): gdaltest.post_reason('point counts do not match') return 1 if f_geom.GetGeometryCount() > 0: count = f_geom.GetGeometryCount() for i in range(count): result = check_feature_geometry(f_geom.GetGeometryRef(i), geom.GetGeometryRef(i), max_error) if result != 0: return result else: count = f_geom.GetPointCount() for i in range(count): x_dist = abs(f_geom.GetX(i) - geom.GetX(i)) y_dist = abs(f_geom.GetY(i) - geom.GetY(i)) z_dist = abs(f_geom.GetZ(i) - geom.GetZ(i)) m_dist = abs(f_geom.GetM(i) - geom.GetM(i)) # Hack to deal with shapefile not-a-number M values that equal to -1.79769313486232e+308 if m_dist > max_error and f_geom.GetM(i) < -1.7e308 and geom.GetM(i) < -1.7e308: m_dist = 0 if max(x_dist, y_dist, z_dist, m_dist) > max_error: gdaltest.post_reason('Error in vertex %d, off by %g.' % (i, max(x_dist, y_dist, z_dist, m_dist))) # print(f_geom.GetX(i)) # print(geom.GetX(i)) # print(f_geom.GetY(i)) # print(geom.GetY(i)) # print(f_geom.GetZ(i)) # print(geom.GetZ(i)) return 1 return 0 ############################################################################### def check_feature(feat, feat_ref, max_error=0.0001, excluded_fields=None): """ Returns 0 in case of success """ for i in range(feat.GetGeomFieldCount()): ret = check_feature_geometry(feat.GetGeomFieldRef(i), feat_ref.GetGeomFieldRef(i), max_error=max_error) if ret != 0: return ret for i in range(feat.GetFieldCount()): if excluded_fields is not None: if feat.GetDefnRef().GetFieldDefn(i).GetName() in excluded_fields: continue if feat.GetField(i) != feat_ref.GetField(i): gdaltest.post_reason('Field %d, expected val %s, got val %s' % (i, str(feat_ref.GetField(i)), str(feat.GetField(i)))) return 1 return 0 ############################################################################### def compare_layers(lyr, lyr_ref, excluded_fields=None): for f_ref in lyr_ref: f = lyr.GetNextFeature() if f is None: f_ref.DumpReadable() pytest.fail() if check_feature(f, f_ref, excluded_fields=excluded_fields) != 0: f.DumpReadable() f_ref.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() ############################################################################### def get_wkt_data_series(with_z, with_m, with_gc, with_circular, with_surface): basic_wkts = [ 'POINT (1 1)', 'POINT (1.1234 1.4321)', 'POINT (1.12345678901234 1.4321)', 'POINT (1.2 -2.1)', 'MULTIPOINT ((10 40),(40 30),(20 20),(30 10))', 'LINESTRING (1.2 -2.1,2.4 -4.8)', 'MULTILINESTRING ((10 10,20 20,10 40),(40 40,30 30,40 20,30 10),(50 50,60 60,50 90))', 'MULTILINESTRING ((1.2 -2.1,2.4 -4.8))', 'POLYGON ((30 10,40 40,20 40,10 20,30 10))', 'POLYGON ((35 10,45 45,15 40,10 20,35 10),(20 30,35 35,30 20,20 30))', 'MULTIPOLYGON (((30 20,45 40,10 40,30 20)),((15 5,40 10,10 20,5 10,15 5)))', 'MULTIPOLYGON (((40 40,20 45,45 30,40 40)),((20 35,10 30,10 10,30 5,45 20,20 35),(30 20,20 15,20 25,30 20)))', 'MULTIPOLYGON (((30 20,45 40,10 40,30 20)))', 'MULTIPOLYGON (((35 10,45 45,15 40,10 20,35 10),(20 30,35 35,30 20,20 30)))', ] gc_wkts = [ 'GEOMETRYCOLLECTION (POINT (4 6),LINESTRING (4 6,7 10))', 'GEOMETRYCOLLECTION (POINT (4 6),GEOMETRYCOLLECTION (POINT (4 6),LINESTRING (4 6,7 10)))' ] circular_wkts = [ 'CIRCULARSTRING (0 0,1 1,1 0)', 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,1 0),(1 0,0 1))', 'CURVEPOLYGON (CIRCULARSTRING (0 0,4 0,4 4,0 4,0 0),(1 1,3 3,3 1,1 1))', 'MULTICURVE ((0 0,5 5),CIRCULARSTRING (4 0,4 4,8 4))', 'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (0 0,4 0,4 4,0 4,0 0),(1 1,3 3,3 1,1 1)),((10 10,14 12,11 10,10 10),(11 11,11.5 11.0,11.0 11.5,11 11)))', ] surface_wkts = [ 'POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)))', 'TRIANGLE ((0 0,0 9,9 0,0 0))', 'TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)))', 'TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))', ] wkts = basic_wkts wkts_with_z = [] wkts_with_m = [] wkts_with_zm = [] if with_gc: wkts.extend(gc_wkts) if with_circular: wkts.extend(circular_wkts) if with_z or with_m: for i, wkt in enumerate(wkts): if with_z: g = ogr.CreateGeometryFromWkt(wkt) g.Set3D(True) wkts_with_z.extend([g.ExportToIsoWkt()]) if with_z: g = ogr.CreateGeometryFromWkt(wkt) g.SetMeasured(True) wkts_with_m.extend([g.ExportToIsoWkt()]) if with_z and with_m: g = ogr.CreateGeometryFromWkt(wkt) g.Set3D(True) g.SetMeasured(True) wkts_with_zm.extend([g.ExportToIsoWkt()]) wkts.extend(wkts_with_z) wkts.extend(wkts_with_m) wkts.extend(wkts_with_zm) if with_surface: wkts.extend(surface_wkts) return wkts ############################################################################### def quick_create_layer_def(lyr, field_list): # Each field is a tuple of (name, type, width, precision) # Any of type, width and precision can be skipped. Default type is string. for field in field_list: name = field[0] if len(field) > 1: field_type = field[1] else: field_type = ogr.OFTString field_defn = ogr.FieldDefn(name, field_type) if len(field) > 2: field_defn.SetWidth(int(field[2])) if len(field) > 3: field_defn.SetPrecision(int(field[3])) lyr.CreateField(field_defn) ############################################################################### def quick_create_feature(layer, field_values, wkt_geometry): feature = ogr.Feature(feature_def=layer.GetLayerDefn()) for i, field_value in enumerate(field_values): feature.SetField(i, field_value) if wkt_geometry is not None: geom = ogr.CreateGeometryFromWkt(wkt_geometry) if geom is None: raise ValueError('Failed to create geometry from: ' + wkt_geometry) feature.SetGeometryDirectly(geom) result = layer.CreateFeature(feature) if result != 0: raise ValueError('CreateFeature() failed in ogrtest.quick_create_feature()') ############################################################################### def have_geos(): global geos_flag if geos_flag is None: pnt1 = ogr.CreateGeometryFromWkt('POINT(10 20)') pnt2 = ogr.CreateGeometryFromWkt('POINT(30 20)') geos_flag = pnt1.Union(pnt2) is not None return geos_flag ############################################################################### def have_sfcgal(): global sfcgal_flag if sfcgal_flag is None: pnt1 = ogr.CreateGeometryFromWkt('POINT(10 20 30)') pnt2 = ogr.CreateGeometryFromWkt('POINT(40 50 60)') sfcgal_flag = pnt1.Distance3D(pnt2) >= 0 return sfcgal_flag ���������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/xmlvalidate.py�������������������������������������������������������������0000775�0001750�0001750�00000044444�13701057760�016732� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- coding: utf-8 -*- ############################################################################### # # Project: MapServer # Purpose: XML validator # Author: Even Rouault, <even dot rouault at spatialys.com> # ############################################################################### # Copyright (C) 2013, Even Rouault # Portions coming from EOxServer # ( https://github.com/EOxServer/eoxserver/blob/master/eoxserver/services/testbase.py ) # Copyright (C) 2011 EOX IT Services GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies of this Software or works derived from this Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ############################################################################### import os import sys from lxml import etree import gdaltest ############################################################################### # Remove mime header if found def ingest_file_and_strip_mime(filename): data = '' f = open(filename, 'rt') for line in f.readlines(): if line == '\r\n': continue if line == '\n': continue if 'Content-Type' in line: continue data = data + line f.close() return data ############################################################################### # Replace http://schemas.opengis.net/foo by $(ogc_schemas_location)/foo def substitute_ogc_schemas_location(location, ogc_schemas_location): if ogc_schemas_location is not None and \ location.startswith('http://schemas.opengis.net/'): location = ogc_schemas_location + '/' + location[len('http://schemas.opengis.net/'):] return location ############################################################################### # Replace http://inspire.ec.europa.eu/schemas/foo by $(inspire_schemas_location)/foo def substitute_inspire_schemas_location(location, inspire_schemas_location): if inspire_schemas_location is not None and \ location.startswith('http://inspire.ec.europa.eu/schemas/'): location = inspire_schemas_location + '/' + location[len('http://inspire.ec.europa.eu/schemas/'):] return location ############################################################################### # Validation function def validate(xml_filename_or_content, xsd_filename=None, application_schema_ns=None, ogc_schemas_location=None, inspire_schemas_location=None): try: if xml_filename_or_content.startswith('<'): doc = etree.XML(xml_filename_or_content) else: doc = etree.XML(ingest_file_and_strip_mime(xml_filename_or_content)) except etree.Error as e: print(str(e)) return False # Special case if this is a schema if doc.tag == '{http://www.w3.org/2001/XMLSchema}schema': for child in doc: if child.tag == '{http://www.w3.org/2001/XMLSchema}import': location = child.get('schemaLocation') location = substitute_ogc_schemas_location(location, ogc_schemas_location) location = substitute_inspire_schemas_location(location, inspire_schemas_location) child.set('schemaLocation', location) try: etree.XMLSchema(etree.XML(etree.tostring(doc))) return True except etree.Error as e: print(str(e)) return False schema_locations = doc.get("{http://www.w3.org/2001/XMLSchema-instance}schemaLocation") if schema_locations is None: print('No schemaLocation found') return False # Our stripped GetFeature document have an empty timeStamp, put a # fake value one instead if doc.get('timeStamp') == '': doc.set('timeStamp', '1970-01-01T00:00:00Z') locations = schema_locations.split() # get schema locations schema_def = etree.Element("schema", attrib={ "elementFormDefault": "qualified", "version": "1.0.0", }, nsmap={ None: "http://www.w3.org/2001/XMLSchema" } ) tempfiles = [] import_dict = {} # Special case for the main application schema for ns, location in zip(locations[::2], locations[1::2]): if ns == application_schema_ns: if xsd_filename is not None: location = xsd_filename else: location = os.path.splitext(xml_filename_or_content)[0] + '.xsd' # Remove mime-type header line if found to generate a valid .xsd sanitized_content = ingest_file_and_strip_mime(location) location = '/tmp/tmpschema%d.xsd' % len(tempfiles) f = open(location, 'wb') f.write(sanitized_content) tempfiles.append(location) f.close() xsd = etree.XML(sanitized_content) for child in xsd: if child.tag == '{http://www.w3.org/2001/XMLSchema}import': sub_ns = child.get('namespace') sub_location = child.get('schemaLocation') sub_location = substitute_ogc_schemas_location(sub_location, ogc_schemas_location) sub_location = substitute_inspire_schemas_location(sub_location, inspire_schemas_location) etree.SubElement(schema_def, "import", attrib={ "namespace": sub_ns, "schemaLocation": sub_location } ) import_dict[sub_ns] = sub_location etree.SubElement(schema_def, "import", attrib={ "namespace": ns, "schemaLocation": location } ) import_dict[ns] = location # Add each schemaLocation as an import for ns, location in zip(locations[::2], locations[1::2]): if ns == application_schema_ns: continue location = substitute_ogc_schemas_location(location, ogc_schemas_location) location = substitute_inspire_schemas_location(location, inspire_schemas_location) if ns not in import_dict: etree.SubElement(schema_def, "import", attrib={ "namespace": ns, "schemaLocation": location } ) import_dict[ns] = location # TODO: ugly workaround. But otherwise, the doc is not recognized as schema # print(etree.tostring(schema_def)) schema = etree.XMLSchema(etree.XML(etree.tostring(schema_def))) try: schema.assertValid(doc) ret = True except etree.Error as e: print(str(e)) ret = False for filename in tempfiles: os.remove(filename) return ret ############################################################################### # Transform absolute schemaLocations into relative ones def transform_abs_links_to_ref_links(path, level=0): for filename in os.listdir(path): filename = os.path.join(path, filename) if os.path.isdir(filename) and 'examples' not in filename: transform_abs_links_to_ref_links(filename, level + 1) elif filename.endswith('.xsd'): f = open(filename, 'rt') lines = f.readlines() f.close() rewrite = False for i, ln in enumerate(lines): if ln[-1] == '\n': ln = ln[0:-1] pos = ln.find('http://schemas.opengis.net/') if pos >= 0: rewrite = True s = ln[0:pos] s += "../" * level s = s + ln[pos + len('http://schemas.opengis.net/'):] ln = s lines[i] = ln pos = ln.find('http://www.w3.org/1999/xlink.xsd') if pos >= 0: rewrite = True s = ln[0:pos] s += "../" * level s = s + ln[pos + len('http://www.w3.org/1999/'):] ln = s lines[i] = ln pos = ln.find('http://www.w3.org/2001/xml.xsd') if pos >= 0: rewrite = True s = ln[0:pos] s += "../" * level s += ln[pos + len('http://www.w3.org/2001/'):] ln = s lines[i] = ln if rewrite: f = open(filename, 'wt') f.writelines(lines) f.close() ############################################################################### # Transform absolute schemaLocations into relative ones def transform_inspire_abs_links_to_ref_links(path, level=0): for filename in os.listdir(path): filename = os.path.join(path, filename) if os.path.isdir(filename) and 'examples' not in filename: transform_inspire_abs_links_to_ref_links(filename, level + 1) elif filename.endswith('.xsd'): f = open(filename, 'rt') lines = f.readlines() f.close() rewrite = False for i, ln in enumerate(lines): ln = lines[i] if ln[-1] == '\n': ln = ln[0:-1] pos = ln.find('schemaLocation="http://inspire.ec.europa.eu/schemas/') if pos >= 0: pos += len('schemaLocation="') rewrite = True s = ln[0:pos] + "../" * level s += ln[pos + len('http://inspire.ec.europa.eu/schemas/'):] ln = s lines[i] = ln pos = ln.find('http://portele.de/') if pos >= 0: rewrite = True s = ln[0:pos] s = s + ln[pos + len('http://portele.de/'):] ln = s lines[i] = ln pos = ln.find('http://schemas.opengis.net/') if pos >= 0: rewrite = True s = ln[0:pos] s += "../" * level + "../SCHEMAS_OPENGIS_NET/" s = s + ln[pos + len('http://schemas.opengis.net/'):] ln = s lines[i] = ln if rewrite: f = open(filename, 'wb') f.writelines(lines) f.close() ############################################################################### # Download OGC schemas def download_ogc_schemas(ogc_schemas_url='http://schemas.opengis.net/SCHEMAS_OPENGIS_NET.zip', xlink_xsd_url='http://www.w3.org/1999/xlink.xsd', xml_xsd_url='http://www.w3.org/2001/xml.xsd', target_dir='.', target_subdir='SCHEMAS_OPENGIS_NET', force_download=False, max_download_duration=None): try: os.mkdir(target_dir) except OSError: pass try: os.stat(target_dir + '/' + 'SCHEMAS_OPENGIS_NET.zip') except OSError: if not gdaltest.download_file(ogc_schemas_url, target_dir + '/' + 'SCHEMAS_OPENGIS_NET.zip', base_dir='.', force_download=force_download, max_download_duration=max_download_duration): return False try: os.stat(target_dir + '/' + target_subdir + '/wfs') except OSError: try: os.mkdir(target_dir + '/' + target_subdir) except OSError: pass gdaltest.unzip(target_dir + '/' + target_subdir, target_dir + '/' + 'SCHEMAS_OPENGIS_NET.zip') try: os.stat(target_dir + '/' + target_subdir + '/wfs') except OSError: print('Cannot unzip SCHEMAS_OPENGIS_NET.zip') return False try: os.stat(target_dir + '/' + target_subdir + '/xlink.xsd') except OSError: if not gdaltest.download_file(xlink_xsd_url, target_dir + '/' + target_subdir + '/xlink.xsd', base_dir='.', force_download=force_download, max_download_duration=max_download_duration): if not gdaltest.download_file('http://even.rouault.free.fr/xlink.xsd', target_dir + '/' + target_subdir + '/xlink.xsd', base_dir='.', force_download=force_download, max_download_duration=max_download_duration): return False try: os.stat(target_dir + '/' + target_subdir + '/xml.xsd') except OSError: if not gdaltest.download_file(xml_xsd_url, target_dir + '/' + target_subdir + '/xml.xsd', base_dir='.', force_download=force_download, max_download_duration=max_download_duration): if not gdaltest.download_file('http://even.rouault.free.fr/xml.xsd', target_dir + '/' + target_subdir + '/xml.xsd', base_dir='.', force_download=force_download, max_download_duration=max_download_duration): return False transform_abs_links_to_ref_links(target_dir + '/' + target_subdir) return True ############################################################################### # Download INSPIRE schemas def download_inspire_schemas(target_dir='.', target_subdir='inspire_schemas', force_download=False): if not download_ogc_schemas(target_dir=target_dir, force_download=force_download): return False try: os.stat(target_dir + '/' + 'inspire_common_1.0.1.zip') except OSError: gdaltest.download_file('http://inspire.ec.europa.eu/schemas/common/1.0.1.zip', target_dir + '/' + 'inspire_common_1.0.1.zip', base_dir='.', force_download=force_download) try: os.stat(target_dir + '/' + 'inspire_vs_1.0.1.zip') except OSError: gdaltest.download_file('http://inspire.ec.europa.eu/schemas/inspire_vs/1.0.1.zip', target_dir + '/' + 'inspire_vs_1.0.1.zip', base_dir='.', force_download=force_download) for subdir in ['', '/common', '/inspire_vs', '/inspire_dls', '/inspire_dls/1.0']: try: os.mkdir(target_dir + '/' + target_subdir + subdir) except OSError: pass try: os.stat(target_dir + '/' + target_subdir + '/common/1.0') except OSError: gdaltest.unzip(target_dir + '/' + target_subdir + '/common', target_dir + '/' + 'inspire_common_1.0.1.zip') try: os.stat(target_dir + '/' + target_subdir + '/common/1.0') except OSError: print('Cannot unzip inspire_common_1.0.1.zip') return False try: os.stat(target_dir + '/' + target_subdir + '/inspire_vs/1.0') except OSError: gdaltest.unzip(target_dir + '/' + target_subdir + '/inspire_vs', target_dir + '/' + 'inspire_vs_1.0.1.zip') try: os.stat(target_dir + '/' + target_subdir + '/inspire_vs/1.0') except OSError: print('Cannot unzip inspire_vs_1.0.1.zip') return False try: os.stat(target_dir + '/' + target_subdir + '/inspire_dls/1.0/inspire_dls.xsd') except OSError: gdaltest.download_file('http://inspire.ec.europa.eu/schemas/inspire_dls/1.0/inspire_dls.xsd', target_dir + '/' + target_subdir + '/inspire_dls/1.0/inspire_dls.xsd', base_dir='.', force_download=force_download) try: os.stat(target_dir + '/' + target_subdir + '/oi/3.0/Orthoimagery.xsd') except OSError: try: os.makedirs(target_dir + '/' + target_subdir + '/oi/3.0') except OSError: pass gdaltest.download_file('http://inspire.ec.europa.eu/schemas/oi/3.0/Orthoimagery.xsd', target_dir + '/' + target_subdir + '/oi/3.0/Orthoimagery.xsd', base_dir='.', force_download=force_download) gdaltest.download_file('http://portele.de/ShapeChangeAppinfo.xsd', target_dir + '/' + target_subdir + '/oi/3.0/ShapeChangeAppinfo.xsd', base_dir='.', force_download=force_download) try: os.stat(target_dir + '/' + target_subdir + '/base/3.3/BaseTypes.xsd') except OSError: try: os.makedirs(target_dir + '/' + target_subdir + '/base/3.3') except OSError: pass gdaltest.download_file('http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd', target_dir + '/' + target_subdir + '/base/3.3/BaseTypes.xsd', base_dir='.', force_download=force_download) transform_inspire_abs_links_to_ref_links(target_dir + '/' + target_subdir) return True ############################################################################### # has_local_ogc_schemas() def has_local_ogc_schemas(path): # Autodetect OGC schemas try: os.stat(path + '/wfs') os.stat(path + '/xlink.xsd') os.stat(path + '/xml.xsd') return True except OSError: return False ############################################################################### # has_local_inspire_schemas() def has_local_inspire_schemas(path): # Autodetect INSPIRE schemas try: os.stat(path + '/common/1.0/common.xsd') os.stat(path + '/inspire_vs/1.0/inspire_vs.xsd') os.stat(path + '/inspire_dls/1.0/inspire_dls.xsd') os.stat(path + '/oi/3.0/Orthoimagery.xsd') os.stat(path + '/base/3.3/BaseTypes.xsd') return True except OSError: return False ############################################################################### # Usage function def Usage(): print('Usage: validate.py [-target_dir dir] [-download_ogc_schemas] [-ogc_schemas_location path]') print(' [-download_inspire_schemas] [-inspire_schemas_location path]') print(' [-app_schema_ns ns] [-schema some.xsd]') print(' some.xml') sys.exit(255) ############################################################################### # Main ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/pymod/test_py_scripts.py���������������������������������������������������������0000775�0001750�0001750�00000007202�13701057760�017645� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: test_py_scripts.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Helper functions for testing python utilities # Author: Even Rouault <even dot rouault @ spatialys.com> # ############################################################################### # Copyright (c) 2010-2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import gdaltest ############################################################################### # Return the path in which the Python script is found # def get_py_script(script_name): for subdir in ['scripts', 'samples']: try: # Test subversion layout : {root_dir}/gdal, {root_dir}/autotest test_path = os.path.join(os.getcwd(), '..', '..', 'gdal', 'swig', 'python', subdir) test_file_path = os.path.join(test_path, script_name + '.py') os.stat(test_file_path) return test_path except OSError: try: # Test FrankW's directory layout : {root_dir}/gdal, {root_dir}/gdal/autotest test_path = os.path.join(os.getcwd(), '..', '..', 'swig', 'python', subdir) test_file_path = os.path.join(test_path, script_name + '.py') os.stat(test_file_path) return test_path except OSError: pass return None ############################################################################### # Runs a Python script # Alias of run_py_script_as_external_script() # def run_py_script(script_path, script_name, concatenated_argv): return run_py_script_as_external_script(script_path, script_name, concatenated_argv) ############################################################################### # Runs a Python script in a new process # def run_py_script_as_external_script(script_path, script_name, concatenated_argv, display_live_on_parent_stdout=False): script_file_path = os.path.join(script_path, script_name + '.py') # print(script_file_path + ' ' + concatenated_argv) python_exe = sys.executable if sys.platform == 'win32': python_exe = python_exe.replace('\\', '/') script_file_path = script_file_path.replace('\\', '/') return gdaltest.runexternal(python_exe + ' ' + script_file_path + ' ' + concatenated_argv, display_live_on_parent_stdout=display_live_on_parent_stdout) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/.gitignore�����������������������������������������������������������������������0000664�0001750�0001750�00000001730�13701057751�014672� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������*.pyc cpp/*.dll cpp/*.exe cpp/*.exe.manifest cpp/*.exp cpp/*.ilk cpp/*.lib cpp/*.pdb cpp/*.vcxproj cpp/*.vcxproj.filters cpp/*.vcxproj.user cpp/[Dd]ebug cpp/[Rr]elease cpp/x64 cpp/data/*.aux.xml cpp/gdal_unit_test cpp/test_c_include_from_cpp_file cpp/test_include_from_c_file cpp/testblockcache cpp/testblockcachelimits cpp/testblockcachewrite cpp/testclosedondestroydm cpp/testcopywords cpp/testdestroy cpp/testmultithreadedwriting cpp/testperfcopywords cpp/testthreadcond cpp/testvirtualmem cpp/test_osr_set_proj_search_paths cpp/bug1488 cpp/proj_with_fork ogr/tmp ogr/data/delete_nas.gfs ogr/data/replace_nas.gfs ogr/data/test_point2.gfs ogr/data/schema_with_geom_in_complextype.gfs ogr/data/bylany.vfk.db gcore/tmp gcore/data/byte.tif.gz.properties gdrivers/data/arg-float32.tif.aux.xml gdrivers/data/arg-float64.tif.aux.xml gdrivers/data/arg-int16-2.json gdrivers/data/arg-int16.arg.aux.xml gdrivers/data/byte.jp2.gz.properties gdrivers/data/utm.json gdrivers/tmp osr/tmp *~ *tmp����������������������������������������gdalautotest-3.1.2/GNUmakefile����������������������������������������������������������������������0000664�0001750�0001750�00000000533�13701057751�014754� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������all: @echo "Run 'make -j test'" gcore-test: pytest gcore gdrivers-test: pytest gdrivers alg-test: pytest alg osr-test: pytest osr ogr-test: pytest ogr utilities-test: pytest utilities pyscripts-test: pytest pyscripts test check: @$(MAKE) $(MFLAGS) gcore-test gdrivers-test alg-test ogr-test osr-test utilities-test pyscripts-test ���������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/�����������������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057761�013464� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testclosedondestroydm.cpp����������������������������������������������������0000664�0001750�0001750�00000022142�13701057760�020631� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testclosedondestroydm.cpp d0324f3133c5df3fe1fab416bad22360ef5a4de5 2018-03-21 01:38:08Z Even Rouault $ * * Project: GDAL Core * Purpose: Test block cache & writing behaviour under multi-threading * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2011, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cpl_conv.h" #include "cpl_string.h" #include "gdal_alg.h" #include "gdal_priv.h" #include "gdal.h" #include <cassert> #include "test_data.h" static void OpenJPEG2000(const char* pszFilename) { const int N_DRIVERS = 6; const char* const apszDrivers[] = {"JP2ECW", "JP2OpenJPEG", "JPEG2000" , "JP2MrSID", "JP2KAK", "JP2Lura" }; GDALDriverH aphDrivers[ N_DRIVERS ]; GDALDatasetH hDS; int i, j; for(i=0;i<N_DRIVERS;i++) aphDrivers[i] = GDALGetDriverByName(apszDrivers[i]); for(i=0;i<N_DRIVERS;i++) { if( aphDrivers[i] == nullptr ) continue; for(j=0;j<N_DRIVERS;j++) { if( i == j || aphDrivers[j] == nullptr ) continue; GDALDeregisterDriver(aphDrivers[j]); } hDS = GDALOpen(pszFilename, GA_ReadOnly); if( !EQUAL(apszDrivers[i], "JP2Lura") ) { assert( hDS != nullptr ); } for(j=0;j<N_DRIVERS;j++) { if( i == j || aphDrivers[j] == nullptr ) continue; GDALRegisterDriver(aphDrivers[j]); } } } int main(int /* argc*/ , char* /* argv */[]) { int nOvrLevel; int nBandNum; GDALDatasetH hDS; GDALDatasetH hSrcDS; FILE* f; const char* pszGDAL_SKIP = CPLGetConfigOption("GDAL_SKIP", nullptr); if( pszGDAL_SKIP == nullptr ) CPLSetConfigOption("GDAL_SKIP", "GIF"); else CPLSetConfigOption("GDAL_SKIP", CPLSPrintf("%s GIF", pszGDAL_SKIP)); GDALAllRegister(); hDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GCORE_DATA_DIR "byte.vrt", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "data/rgb_warp.vrt", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "data/A.TOC", GA_ReadOnly); hDS = GDALOpen("NITF_TOC_ENTRY:CADRG_ONC_1,000,000_2_0:" GDRIVERS_DIR "data/A.TOC", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "data/testtil.til", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "data/product.xml", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "data/METADATA.DIM", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "tmp/cache/file9_j2c.ntf", GA_ReadOnly); if (hDS) GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpen(GDRIVERS_DIR "data/bug407.gif", GA_ReadOnly); if (hDS) { GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); GDALSetCacheMax(0); GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); } /* Create external overviews */ hSrcDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); hDS = GDALCreateCopy(GDALGetDriverByName("GTiff"), "byte.tif", hSrcDS, 0, nullptr, nullptr, nullptr); GDALClose(hSrcDS); hSrcDS = nullptr; hDS = GDALOpen("byte.tif", GA_ReadOnly); nOvrLevel = 2; nBandNum = 1; CPL_IGNORE_RET_VAL(GDALBuildOverviews( hDS, "NEAR", 1, &nOvrLevel, 1, &nBandNum, nullptr, nullptr)); GDALClose(hDS); hDS = GDALOpen("byte.tif", GA_ReadOnly); GDALGetOverviewCount(GDALGetRasterBand(hDS, 1)); /* Create internal overviews */ hSrcDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); hDS = GDALCreateCopy(GDALGetDriverByName("GTiff"), "byte2.tif", hSrcDS, 0, nullptr, nullptr, nullptr); GDALClose(hSrcDS); hSrcDS = nullptr; hDS = GDALOpen("byte2.tif", GA_Update); nOvrLevel = 2; nBandNum = 1; CPL_IGNORE_RET_VAL(GDALBuildOverviews( hDS, "NEAR", 1, &nOvrLevel, 1, &nBandNum, nullptr, nullptr)); GDALClose(hDS); hDS = GDALOpen("byte2.tif", GA_ReadOnly); GDALGetOverviewCount(GDALGetRasterBand(hDS, 1)); /* Create external mask */ hSrcDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); hDS = GDALCreateCopy(GDALGetDriverByName("GTiff"), "byte3.tif", hSrcDS, 0, nullptr, nullptr, nullptr); GDALClose(hSrcDS); hSrcDS = nullptr; hDS = GDALOpen("byte3.tif", GA_ReadOnly); GDALCreateDatasetMaskBand(hDS, GMF_PER_DATASET); GDALClose(hDS); hDS = GDALOpen("byte3.tif", GA_ReadOnly); GDALGetMaskFlags(GDALGetRasterBand(hDS, 1)); f = fopen("byte.vrt", "wb"); fprintf(f, "%s", "<VRTDataset rasterXSize=\"20\" rasterYSize=\"20\">" "<VRTRasterBand dataType=\"Byte\" band=\"1\">" "<SimpleSource>" "<SourceFilename relativeToVRT=\"1\">" GCORE_DATA_DIR "byte.tif</SourceFilename>" "<SourceBand>1</SourceBand>" "<SourceProperties RasterXSize=\"20\" RasterYSize=\"20\" DataType=\"Byte\" BlockXSize=\"20\" BlockYSize=\"20\" />" "<SrcRect xOff=\"0\" yOff=\"0\" xSize=\"20\" ySize=\"20\"/>" "<DstRect xOff=\"0\" yOff=\"0\" xSize=\"20\" ySize=\"20\"/>" "</SimpleSource>" "</VRTRasterBand>" "</VRTDataset>"); fclose(f); hDS = GDALOpen("byte.vrt", GA_ReadOnly); nOvrLevel = 2; nBandNum = 1; CPL_IGNORE_RET_VAL(GDALBuildOverviews( hDS, "NEAR", 1, &nOvrLevel, 1, &nBandNum, nullptr, nullptr)); GDALClose(hDS); hDS = GDALOpen("byte.vrt", GA_ReadOnly); GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); GDALGetOverviewCount(GDALGetRasterBand(hDS, 1)); hDS = GDALOpen("<VRTDataset rasterXSize=\"20\" rasterYSize=\"20\">" "<VRTRasterBand dataType=\"Byte\" band=\"1\">" "<SimpleSource>" "<SourceFilename relativeToVRT=\"1\">byte.vrt</SourceFilename>" "<SourceBand>1</SourceBand>" "<SourceProperties RasterXSize=\"20\" RasterYSize=\"20\" DataType=\"Byte\" BlockXSize=\"20\" BlockYSize=\"20\" />" "<SrcRect xOff=\"0\" yOff=\"0\" xSize=\"20\" ySize=\"20\"/>" "<DstRect xOff=\"0\" yOff=\"0\" xSize=\"20\" ySize=\"20\"/>" "</SimpleSource>" "</VRTRasterBand>" "</VRTDataset>", GA_ReadOnly); GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, GDALGetRasterXSize(hDS), GDALGetRasterYSize(hDS)); hDS = GDALOpenShared(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); hDS = GDALOpenShared(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); hDS = GDALOpenShared(GDRIVERS_DIR "data/mercator.sid", GA_ReadOnly); hDS = GDALOpen("RASTERLITE:" GDRIVERS_DIR "data/rasterlite_pyramids.sqlite,table=test", GA_ReadOnly); hDS = GDALOpen("RASTERLITE:" GDRIVERS_DIR "data/rasterlite_pyramids.sqlite,table=test,level=1", GA_ReadOnly); OpenJPEG2000(GDRIVERS_DIR "data/rgbwcmyk01_YeGeo_kakadu.jp2"); hDS = GDALOpen(GDRIVERS_DIR "tmp/cache/Europe 2001_OZF.map", GA_ReadOnly); CPLDebug("TEST","Call GDALDestroyDriverManager()"); GDALDestroyDriverManager(); unlink("byte.tif"); unlink("byte.tif.ovr"); unlink("byte2.tif"); unlink("byte3.tif"); unlink("byte3.tif.msk"); unlink("byte.vrt"); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/bug1488.cpp������������������������������������������������������������������0000664�0001750�0001750�00000011225�13701057760�015272� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: bug1488.cpp 77b9eaffa6a575b06ecf46b2c5a868a34e70ca4d 2019-05-24 12:23:45 +0200 Even Rouault $ * * Project: GDAL Core * Purpose: Test fix for https://github.com/OSGeo/gdal/issues/1488 (concurrency issue with overviews) * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2019, Even Rouault <even dot rouault at spatialys dot com> * Copyright (c) 2019, Thomas Bonfort <thomas.bonfort at gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include <gdal.h> #include "cpl_multiproc.h" #include <assert.h> #include "test_data.h" static GDALDriverH hTIFFDrv = nullptr; static volatile int bThread1Finished = FALSE; static volatile int bThread2Finished = FALSE; static volatile int bContinue = TRUE; const char* szSrcDataset = TUT_ROOT_DATA_DIR "/bug1488.tif"; static int CPL_STDCALL myProgress(double, const char *, void *); static int CPL_STDCALL myProgress(double, const char *, void *) { return bContinue; } static void CPL_STDCALL myErrorHandler(CPLErr, CPLErrorNum, const char* msg); static void CPL_STDCALL myErrorHandler(CPLErr eErrClass, CPLErrorNum, const char* msg) { if( eErrClass != CPLE_UserInterrupt && strstr(msg, "User terminated") == nullptr ) { fprintf(stderr, "An error occurred: %s\n", msg); fprintf(stderr, "Likely a threading issue !\n"); exit(1); } } static void worker_thread1(void *) { GDALDatasetH hDataset = GDALOpen("/vsimem/thread1.tif", GA_Update); assert(hDataset); int levels[1]={2}; int bands[3]={1,2,3}; CPLErr eErr = GDALBuildOverviews(hDataset,"AVERAGE",1,levels,3,bands, myProgress,nullptr); (void)eErr; GDALClose(hDataset); VSIUnlink("/vsimem/thread1.tif"); bThread1Finished = TRUE; } static void worker_thread2(void *) { GDALDatasetH hSrc = GDALOpen(szSrcDataset, GA_ReadOnly); assert(hSrc); const char * const tops[] = {"TILED=YES","COMPRESS=WEBP",nullptr}; GDALDatasetH hDataset = GDALCreateCopy(GDALGetDriverByName("GTiff"), "/vsimem/thread2.tif",hSrc,TRUE,tops, myProgress,nullptr); GDALClose(hDataset); GDALClose(hSrc); VSIUnlink("/vsimem/thread2.tif"); bThread2Finished = TRUE; } int main() { GDALAllRegister(); hTIFFDrv = GDALGetDriverByName("GTiff"); if( !hTIFFDrv ) { printf("GTIFF driver missing. Skipping\n"); exit(0); } const char* pszCO = GDALGetMetadataItem(hTIFFDrv, GDAL_DMD_CREATIONOPTIONLIST, nullptr); if( pszCO == nullptr || strstr(pszCO, "WEBP") == nullptr ) { printf("WEBP missing. Skipping\n"); exit(0); } GDALSetCacheMax(30* 1000 * 1000); CPLSetErrorHandler(myErrorHandler); VSISync(szSrcDataset, "/vsimem/thread1.tif", nullptr, nullptr, nullptr, nullptr); CPLJoinableThread* t1 = CPLCreateJoinableThread(worker_thread1, nullptr); CPLJoinableThread* t2 = CPLCreateJoinableThread(worker_thread2, nullptr); int nCountSeconds = 0; while( !bThread1Finished && !bThread2Finished ) { CPLSleep(1); nCountSeconds ++; if( nCountSeconds == 2 ) { /* After 2 seconds without errors, assume no threading issue, and */ /* early exit */ bContinue = FALSE; } } CPLJoinThread(t1); CPLJoinThread(t2); return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_osr.cpp�����������������������������������������������������������������0000664�0001750�0001750�00000037015�13701057760�016037� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: OGR Spatial Reference general features test. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_string.h" #include "ogr_srs_api.h" #include "ogr_spatialref.h" #include <algorithm> #include <cmath> #include <string> namespace tut { // Common fixture with test data struct test_osr_data { OGRErr err_; OGRSpatialReferenceH srs_; test_osr_data() : err_(OGRERR_NONE), srs_(nullptr) { srs_ = OSRNewSpatialReference(nullptr); } ~test_osr_data() { OSRDestroySpatialReference(srs_); } }; // Register test group typedef test_group<test_osr_data> group; typedef group::object object; group test_osr_group("OSR"); // Test UTM WGS84 coordinate system and its various items template<> template<> void object::test<1>() { ensure("SRS handle is NULL", nullptr != srs_); err_ = OSRSetUTM(srs_, 11, TRUE); ensure_equals("Can't set UTM zone", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); double val = 0; val = OSRGetProjParm(srs_, SRS_PP_CENTRAL_MERIDIAN, -1111, &err_); ensure("Invalid UTM central meridian", std::fabs(val - (-117.0)) <= .00000000000010); val = OSRGetProjParm(srs_, SRS_PP_LATITUDE_OF_ORIGIN, -1111, &err_); ensure("Invalid UTM latitude of origin", std::fabs(val - 0.0) <= .00000000000010); val = OSRGetProjParm(srs_, SRS_PP_SCALE_FACTOR, -1111, &err_); ensure("Invalid UTM scale factor", std::fabs(val - 0.9996) <= .00000000000010); val = OSRGetProjParm(srs_, SRS_PP_FALSE_EASTING, -1111, &err_); ensure("Invalid UTM false easting", std::fabs(val - 500000.0) <= .00000000000010); val = OSRGetProjParm(srs_, SRS_PP_FALSE_NORTHING, -1111, &err_); ensure("Invalid UTM false northing", std::fabs(val - 0.0) <= .00000000000010); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "GEOGCS")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "GEOGCS")), std::string("4326")); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "DATUM")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "DATUM")), std::string("6326")); } // Simple default NAD83 State Plane zone template<> template<> void object::test<2>() { ensure("SRS handle is NULL", nullptr != srs_); // California III NAD83 OSRSetStatePlane(srs_, 403, 1); double val = 0; val = OSRGetProjParm(srs_, SRS_PP_STANDARD_PARALLEL_1, -1111, &err_); ensure_approx_equals(val, 38.43333333333333); val = OSRGetProjParm(srs_, SRS_PP_STANDARD_PARALLEL_2, -1111, &err_); ensure_approx_equals(val, 37.06666666666667); val = OSRGetProjParm(srs_, SRS_PP_LATITUDE_OF_ORIGIN, -1111, &err_); ensure_approx_equals(val, 36.5); val = OSRGetProjParm(srs_, SRS_PP_CENTRAL_MERIDIAN, -1111, &err_); ensure_approx_equals(val, -120.5); val = OSRGetProjParm(srs_, SRS_PP_FALSE_EASTING, -1111, &err_); ensure_approx_equals(val, 2000000.0); val = OSRGetProjParm(srs_, SRS_PP_FALSE_NORTHING, -1111, &err_); ensure_approx_equals(val, 500000.0); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "GEOGCS")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "GEOGCS")), std::string("4269")); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "DATUM")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "DATUM")), std::string("6269")); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "PROJCS")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "PROJCS")), std::string("26943")); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "PROJCS|UNIT")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "PROJCS|UNIT")), std::string("9001")); } // NAD83 State Plane zone, but overridden to be in Feet template<> template<> void object::test<3>() { ensure("SRS handle is NULL", nullptr != srs_); // California III NAD83 (feet) OSRSetStatePlaneWithUnits(srs_, 403, 1, "Foot", 0.3048006096012192); double val = 0; val = OSRGetProjParm(srs_, SRS_PP_STANDARD_PARALLEL_1, -1111, &err_); ensure_approx_equals(val, 38.43333333333333); val = OSRGetProjParm(srs_, SRS_PP_STANDARD_PARALLEL_2, -1111, &err_); ensure_approx_equals(val, 37.06666666666667); val = OSRGetProjParm(srs_, SRS_PP_LATITUDE_OF_ORIGIN, -1111, &err_); ensure_approx_equals(val, 36.5); val = OSRGetProjParm(srs_, SRS_PP_CENTRAL_MERIDIAN, -1111, &err_); ensure_approx_equals(val, -120.5); val = OSRGetProjParm(srs_, SRS_PP_FALSE_EASTING, -1111, &err_); ensure_approx_equals(val, 6561666.666666667); val = OSRGetProjParm(srs_, SRS_PP_FALSE_NORTHING, -1111, &err_); ensure_approx_equals(val, 1640416.666666667); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "GEOGCS")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "GEOGCS")), std::string("4269")); ensure_equals("Invalid authority name", std::string(OSRGetAuthorityName(srs_, "DATUM")), std::string("EPSG")); ensure_equals("Invalid authority code", std::string(OSRGetAuthorityCode(srs_, "DATUM")), std::string("6269")); ensure("Got a PROJCS Authority but we should not", nullptr == OSRGetAuthorityName(srs_, "PROJCS")); ensure("Got METER authority code on linear units", nullptr == OSRGetAuthorityCode(srs_, "PROJCS|UNIT")); char* unitsName = nullptr; val = OSRGetLinearUnits(srs_, &unitsName); ensure("Units name is NULL", nullptr != unitsName); ensure( "Did not get Foot linear units", std::string("Foot") == unitsName); } // Translate a coordinate system with NAD shift into to PROJ.4 and back. // Also, verify that the TOWGS84 parameters are preserved. template<> template<> void object::test<4>() { ensure("SRS handle is NULL", nullptr != srs_); err_ = OSRSetGS(srs_, -117.0, 100000.0, 100000); ensure_equals("OSRSetGS failed", err_, OGRERR_NONE); err_ = OSRSetGeogCS(srs_, "Test GCS", "Test Datum", "WGS84", SRS_WGS84_SEMIMAJOR, SRS_WGS84_INVFLATTENING, nullptr, 0, nullptr, 0); ensure_equals("OSRSetGeogCS failed", err_, OGRERR_NONE); err_ = OSRSetTOWGS84(srs_, 1, 2, 3, 0, 0, 0, 0); ensure_equals("OSRSetTOWGS84 failed", err_, OGRERR_NONE); const int coeffSize = 7; double coeff[coeffSize] = { 0 }; const double expect[coeffSize] = { 1, 2, 3, 0, 0, 0, 0 }; err_ = OSRGetTOWGS84(srs_, coeff, 7); ensure_equals("OSRSetTOWGS84 failed", err_, OGRERR_NONE); ensure("GetTOWGS84 result is wrong", std::equal(coeff, coeff + coeffSize, expect)); OSRSetLinearUnits(srs_, "Metre", 1); char* proj4 = nullptr; err_ = OSRExportToProj4(srs_, &proj4); ensure_equals("OSRExportToProj4 failed", err_, OGRERR_NONE); OGRSpatialReferenceH srs2 = nullptr; srs2 = OSRNewSpatialReference(nullptr); err_ = OSRImportFromProj4(srs2, proj4); ensure_equals("OSRImportFromProj4 failed", err_, OGRERR_NONE); err_ = OSRGetTOWGS84(srs2, coeff, 7); ensure_equals("OSRSetTOWGS84 failed", err_, OGRERR_NONE); ensure("GetTOWGS84 result is wrong", std::equal(coeff, coeff + coeffSize, expect)); OSRDestroySpatialReference(srs2); CPLFree(proj4); } // Test URN support for OGC:CRS84 template<> template<> void object::test<5>() { ensure("SRS handle is NULL", nullptr != srs_); err_ = OSRSetFromUserInput(srs_, "urn:ogc:def:crs:OGC:1.3:CRS84"); ensure_equals("OSRSetFromUserInput failed", err_, OGRERR_NONE); char* wkt1 = nullptr; err_ = OSRExportToWkt(srs_, &wkt1); ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE); ensure("OSRExportToWkt returned NULL", nullptr != wkt1); CPLFree(wkt1); } // Test URN support for EPSG template<> template<> void object::test<6>() { ensure("SRS handle is NULL", nullptr != srs_); err_ = OSRSetFromUserInput(srs_, "urn:ogc:def:crs:EPSG::4326"); ensure_equals("OSRSetFromUserInput failed", err_, OGRERR_NONE); char* wkt1 = nullptr; err_ = OSRExportToWkt(srs_, &wkt1); ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE); ensure("OSRExportToWkt returned NULL", nullptr != wkt1); err_ = OSRSetFromUserInput(srs_, "EPSGA:4326"); ensure_equals("OSRSetFromUserInput failed", err_, OGRERR_NONE); char* wkt2 = nullptr; err_ = OSRExportToWkt(srs_, &wkt2); ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE); ensure("OSRExportToWkt returned NULL", nullptr != wkt2); ensure_equals("EPSG:4326 urn lookup not as expected", std::string(wkt1), std::string(wkt2)); CPLFree(wkt1); CPLFree(wkt2); } // Test URN support for auto projection template<> template<> void object::test<7 >() { ensure("SRS handle is NULL", nullptr != srs_); err_ = OSRSetFromUserInput(srs_, "urn:ogc:def:crs:OGC::AUTO42001:-117:33"); ensure_equals("OSRSetFromUserInput failed", err_, OGRERR_NONE); char* wkt1 = nullptr; err_ = OSRExportToWkt(srs_, &wkt1); ensure_equals("OSRExportToWkt failed", err_, OGRERR_NONE); ensure("OSRExportToWkt returned NULL", nullptr != wkt1); std::string expect("PROJCS[\"unnamed\",GEOGCS[\"WGS 84\"," "DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\"," "6378137,298.257223563," "AUTHORITY[\"EPSG\",\"7030\"]]," "AUTHORITY[\"EPSG\",\"6326\"]]," "PRIMEM[\"Greenwich\",0," "AUTHORITY[\"EPSG\",\"8901\"]]," "UNIT[\"degree\",0.0174532925199433," "AUTHORITY[\"EPSG\",\"9122\"]]," "AUTHORITY[\"EPSG\",\"4326\"]]," "PROJECTION[\"Transverse_Mercator\"]," "PARAMETER[\"latitude_of_origin\",0]," "PARAMETER[\"central_meridian\",-117]," "PARAMETER[\"scale_factor\",0.9996]," "PARAMETER[\"false_easting\",500000]," "PARAMETER[\"false_northing\",0]," "UNIT[\"Meter\",1,AUTHORITY[\"EPSG\",\"9001\"]]," "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]"); ensure_equals("AUTO42001 urn lookup not as expected", std::string(wkt1), expect); CPLFree(wkt1); } // Test StripTOWGS84IfKnownDatum template<> template<> void object::test<8 >() { // Not a boundCRS { OGRSpatialReference oSRS; oSRS.importFromEPSG(4326); ensure(!oSRS.StripTOWGS84IfKnownDatum()); } // Custom boundCRS --> do not strip TOWGS84 { OGRSpatialReference oSRS; oSRS.SetFromUserInput("+proj=longlat +ellps=GRS80 +towgs84=1,2,3,4,5,6,7"); ensure(!oSRS.StripTOWGS84IfKnownDatum()); double vals[7] = { 0 }; ensure(oSRS.GetTOWGS84(vals, 7) == OGRERR_NONE); } // BoundCRS whose base CRS has a known code --> strip TOWGS84 { OGRSpatialReference oSRS; oSRS.importFromEPSG(4326); oSRS.SetTOWGS84(1,2,3,4,5,6,7); ensure(oSRS.StripTOWGS84IfKnownDatum()); double vals[7] = { 0 }; ensure(oSRS.GetTOWGS84(vals, 7) != OGRERR_NONE); } // BoundCRS whose datum code is known --> strip TOWGS84 { OGRSpatialReference oSRS; oSRS.SetFromUserInput( "GEOGCS[\"bar\"," "DATUM[\"foo\"," "SPHEROID[\"WGS 84\",6378137,298.257223563]," "TOWGS84[1,2,3,4,5,6,7]," "AUTHORITY[\"FOO\",\"1\"]]," "PRIMEM[\"Greenwich\",0]," "UNIT[\"degree\",0.0174532925199433]]"); ensure(oSRS.StripTOWGS84IfKnownDatum()); double vals[7] = { 0 }; ensure(oSRS.GetTOWGS84(vals, 7) != OGRERR_NONE); } // BoundCRS whose datum name is known --> strip TOWGS84 { OGRSpatialReference oSRS; oSRS.SetFromUserInput( "GEOGCS[\"WGS 84\"," "DATUM[\"WGS_1984\"," "SPHEROID[\"WGS 84\",6378137,298.257223563]," "TOWGS84[1,2,3,4,5,6,7]]," "PRIMEM[\"Greenwich\",0]," "UNIT[\"degree\",0.0174532925199433]]"); ensure(oSRS.StripTOWGS84IfKnownDatum()); double vals[7] = { 0 }; ensure(oSRS.GetTOWGS84(vals, 7) != OGRERR_NONE); } // BoundCRS whose datum name is unknown --> do not strip TOWGS84 { OGRSpatialReference oSRS; oSRS.SetFromUserInput( "GEOGCS[\"WGS 84\"," "DATUM[\"i am unknown\"," "SPHEROID[\"WGS 84\",6378137,298.257223563]," "TOWGS84[1,2,3,4,5,6,7]]," "PRIMEM[\"Greenwich\",0]," "UNIT[\"degree\",0.0174532925199433]]"); ensure(!oSRS.StripTOWGS84IfKnownDatum()); double vals[7] = { 0 }; ensure(oSRS.GetTOWGS84(vals, 7) == OGRERR_NONE); } } } // namespace tut �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/proj_with_fork.cpp�����������������������������������������������������������0000664�0001750�0001750�00000001710�13701057760�017214� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include "ogr_srs_api.h" int main() { OGRSpatialReferenceH hSRS = OSRNewSpatialReference(nullptr); // To open the DB in the parent OSRImportFromEPSG(hSRS, 32631); pid_t children[4]; for( int i = 0; i< 4; i++ ) { children[i] = fork(); if( children[i] < 0 ) exit(1); if( children[i] == 0 ) { for(int epsg = 32601; epsg <= 32661; epsg++ ) { if( OSRImportFromEPSG(hSRS, epsg) != OGRERR_NONE || OSRImportFromEPSG(hSRS, epsg+100) != OGRERR_NONE ) { _exit(1); } } _exit(0); } } int ret = 0; for( int i = 0; i< 4; i++ ) { int status = 0; waitpid(children[i], &status, 0); if( status != 0 ) { ret = 1; } } return ret; } ��������������������������������������������������������gdalautotest-3.1.2/cpp/test_triangulation.cpp�������������������������������������������������������0000664�0001750�0001750�00000016633�13701057760�020117� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_triangulation.cpp 1440b062c833f145f89b3dc8c2474f674a8ca3af 2018-10-06 19:20:28 +0200 Even Rouault $ * * Project: GDAL algorithms * Purpose: Test Delaunay triangulation * Author: Even Rouault, even.rouault at spatialys.com * ****************************************************************************** * Copyright (c) 2015, Even Rouault <even.rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal_unit_test.h" #include "gdal_alg.h" namespace tut { // Common fixture with test data struct test_triangulation_data { GDALTriangulation* psDT; test_triangulation_data() : psDT(nullptr) {} ~test_triangulation_data() { GDALTriangulationFree(psDT); } }; // Register test group typedef test_group<test_triangulation_data> group; typedef group::object object; group test_triangulation_group("Triangulation"); template<> template<> void object::test<1>() { if( GDALHasTriangulation() ) { double adfX[] = { 0, -5, -5, 5, 5 }; double adfY[] = { 0, -5, 5, -5, 5 }; CPLPushErrorHandler(CPLQuietErrorHandler); psDT = GDALTriangulationCreateDelaunay(2, adfX, adfY); CPLPopErrorHandler(); ensure(psDT == nullptr); } } template<> template<> void object::test<2>() { if( GDALHasTriangulation() ) { double adfX[] = { 0, 1, 2, 3 }; double adfY[] = { 0, 1, 2, 3 }; CPLPushErrorHandler(CPLQuietErrorHandler); psDT = GDALTriangulationCreateDelaunay(4, adfX, adfY); CPLPopErrorHandler(); ensure(psDT == nullptr); } } template<> template<> void object::test<3>() { if( GDALHasTriangulation() ) { { double adfX[] = { 0, -5, -5, 5, 5 }; double adfY[] = { 0, -5, 5, -5, 5 }; int i, j; psDT = GDALTriangulationCreateDelaunay(5, adfX, adfY); ensure(psDT != nullptr); ensure_equals(psDT->nFacets, 4); for(i=0;i<psDT->nFacets;i++) { for(j=0;j<3;j++) { ensure(psDT->pasFacets[i].anVertexIdx[j] >= 0); ensure(psDT->pasFacets[i].anVertexIdx[j] <= 4); ensure(psDT->pasFacets[i].anNeighborIdx[j] >= -1); ensure(psDT->pasFacets[i].anNeighborIdx[j] <= 4); } } int face; CPLPushErrorHandler(CPLQuietErrorHandler); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 0, 0, 0, &face), FALSE); ensure_equals(GDALTriangulationFindFacetBruteForce(psDT, 0, 0, &face), FALSE); double l1, l2, l3; ensure_equals(GDALTriangulationComputeBarycentricCoordinates(psDT, 0, 0, 0, &l1, &l2, &l3), FALSE); CPLPopErrorHandler(); ensure_equals(GDALTriangulationComputeBarycentricCoefficients(psDT, adfX, adfY) , TRUE); ensure_equals(GDALTriangulationComputeBarycentricCoefficients(psDT, adfX, adfY) , TRUE); } // Points inside { double adfX[] = { 0.1, 0.9, 0.499, -0.9 }; double adfY[] = { 0.9, 0.1, -0.5, 0.1 }; for(int i=0;i<4;i++) { double x = adfX[i]; double y = adfY[i]; int new_face; int face; ensure_equals(GDALTriangulationFindFacetDirected(psDT, 0, x, y, &face), TRUE); ensure(face >= 0 && face < 4); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 1, x, y, &new_face), TRUE); ensure_equals(face, new_face); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 2, x, y, &new_face), TRUE); ensure_equals(face, new_face); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 3, x, y, &new_face), TRUE); ensure_equals(face, new_face); ensure_equals(GDALTriangulationFindFacetBruteForce(psDT, x, y, &new_face), TRUE); ensure_equals(face, new_face); double l1, l2, l3; GDALTriangulationComputeBarycentricCoordinates(psDT, face, x, y, &l1, &l2, &l3); ensure(l1 >= 0 && l1 <= 1); ensure(l2 >= 0 && l2 <= 1); ensure(l3 >= 0 && l3 <= 1); ensure_equals("",l3, 1.0 -l1 - l2,1e-10); } } // Points outside { double adfX[] = { 0, 10, 0, -10 }; double adfY[] = { 10, 0, -10, 0 }; for(int i=0;i<4;i++) { double x = adfX[i]; double y = adfY[i]; int new_face; int face; ensure_equals(GDALTriangulationFindFacetDirected(psDT, 0, x, y, &face), FALSE); ensure(face < 0 || (face >= 0 && face < 4)); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 1, x, y, &new_face), FALSE); ensure_equals(face, new_face); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 2, x, y, &new_face), FALSE); ensure_equals(face, new_face); ensure_equals(GDALTriangulationFindFacetDirected(psDT, 3, x, y, &new_face), FALSE); ensure_equals(face, new_face); ensure_equals(GDALTriangulationFindFacetBruteForce(psDT, x, y, &new_face), FALSE); ensure_equals(face, new_face); double l1, l2, l3; if( face < 0 ) face = 0; GDALTriangulationComputeBarycentricCoordinates(psDT, face, x, y, &l1, &l2, &l3); ensure("outside", !((l1 >= 0 && l1 <= 1) && (l2 >= 0 && l2 <= 1) && (l3 >= 0 && l3 <= 1))); ensure_equals("",l3, 1.0 -l1 - l2,1e-10); } } } } } // namespace tut �����������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_osr_set_proj_search_paths.cpp�������������������������������������������0000664�0001750�0001750�00000007504�13701057760�022470� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_osr_set_proj_search_paths.cpp d123b99851d16cc01ef4a382ad24e974bc589589 2020-07-04 19:12:15 +0200 Even Rouault $ * * Project: GDAL Core * Purpose: Test OSRSetPROJSearchPaths() * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2019, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include <stdlib.h> #include "cpl_error.h" #include "cpl_string.h" #include "ogr_srs_api.h" #include "cpl_multiproc.h" #include "proj.h" static void func1(void*) { OGRSpatialReferenceH hSRS = OSRNewSpatialReference(nullptr); CPLPushErrorHandler(CPLQuietErrorHandler); auto ret = OSRImportFromEPSG(hSRS, 32631); CPLPopErrorHandler(); if( ret == OGRERR_NONE ) { fprintf(stderr, "failure expected (1)\n"); exit(1); } OSRDestroySpatialReference(hSRS); } static void func2(void*) { OGRSpatialReferenceH hSRS = OSRNewSpatialReference(nullptr); if( OSRImportFromEPSG(hSRS, 32631) != OGRERR_NONE ) { fprintf(stderr, "failure not expected (2)\n"); exit(1); } OSRDestroySpatialReference(hSRS); } static void func3(void*) { OGRSpatialReferenceH hSRS = OSRNewSpatialReference(nullptr); if( OSRImportFromEPSG(hSRS, 32631) != OGRERR_NONE ) { fprintf(stderr, "failure not expected (3)\n"); exit(1); } // Test cleanup effect OSRCleanup(); for(int epsg = 32601; epsg <= 32661; epsg++ ) { if( OSRImportFromEPSG(hSRS, epsg) != OGRERR_NONE || OSRImportFromEPSG(hSRS, epsg+100) != OGRERR_NONE ) { fprintf(stderr, "failure not expected (4)\n"); exit(1); } } OSRDestroySpatialReference(hSRS); } int main() { auto tokens = OSRGetPROJSearchPaths(); // Overriding PROJ_LIB setenv("PROJ_LIB", "/i_do/not_exist", true); // Test we can no longer find the database func1(nullptr); // In a thread as well auto t1 = CPLCreateJoinableThread(func1, nullptr); CPLJoinThread(t1); // Use OSRSetPROJSearchPaths to restore search paths OSRSetPROJSearchPaths(tokens); // This time this should work func2(nullptr); // In a thread as well auto t2 = CPLCreateJoinableThread(func2, nullptr); CPLJoinThread(t2); CSLDestroy(tokens); OSRCleanup(); // Test fix for #2744 CPLJoinableThread* ahThreads[4]; for( int i = 0; i< 4; i++ ) { ahThreads[i] = CPLCreateJoinableThread(func3, nullptr); } for( int i = 0; i< 4; i++ ) { CPLJoinThread(ahThreads[i]); } return 0; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/gdal_unit_test.cpp�����������������������������������������������������������0000664�0001750�0001750�00000010610�13701057760�017172� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Main program of C++ Unit Tests runner for GDAL // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #ifdef _MSC_VER #define WIN32_LEAN_AND_MEAN #endif // _MSC_VER #include "gdal_unit_test.h" #include "cpl_conv.h" #include "cpl_multiproc.h" #include "gdal.h" #include "ogr_api.h" #include "ogrsf_frmts.h" #include "test_data.h" #include <tut_reporter.hpp> #include <iostream> #include <string> namespace tut { test_runner_singleton runner; // Common test data path std::string const common::data_basedir(TUT_ROOT_DATA_DIR); std::string const common::tmp_basedir(TUT_ROOT_TMP_DIR); static void check_test_group(char const* name) { std::string grpname(name); if (grpname.empty()) throw std::runtime_error("missing test group name"); tut::groupnames gl = runner.get().list_groups(); tut::groupnames::const_iterator found = std::find(gl.begin(), gl.end(), grpname); if (found == gl.end()) throw std::runtime_error("test group " + grpname + " not found"); } } // namespace tut int main(int argc, char* argv[]) { // Register GDAL/OGR drivers ::GDALAllRegister(); ::OGRRegisterAll(); std::cout << "GDAL C/C++ API tests" << " (" << ::GDALVersionInfo("--version") << ")" << "\n---------------------------------------------------------\n"; argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 ); if (argc < 1) { std::cout << "\n---------------------------------------------------------\n" << "No tests to run\n"; return EXIT_SUCCESS; } // Initialize TUT framework int nRetCode = EXIT_FAILURE; { tut::reporter visi; tut::runner.get().set_callback(&visi); try { if (argc == 1) { tut::runner.get().run_tests(); } else if (argc == 2 && std::string(argv[1]) == "--list") { tut::groupnames gl = tut::runner.get().list_groups(); tut::groupnames::const_iterator b = gl.begin(); tut::groupnames::const_iterator e = gl.end(); tut::groupnames::difference_type d = std::distance(b, e); std::cout << "Registered " << d << " test groups:\n" << std::endl; while (b != e) { std::cout << " " << *b << std::endl; ++b; } } else if (argc == 2 && std::string(argv[1]) != "--list") { tut::check_test_group(argv[1]); tut::runner.get().run_tests(argv[1]); } else if (argc == 3) { tut::check_test_group(argv[1]); tut::test_result result; tut::runner.get().run_test(argv[1], std::atoi(argv[2]), result); } nRetCode = EXIT_SUCCESS; } catch (const std::exception& ex) { std::cerr << "GDAL C/C++ API tests error: " << ex.what() << std::endl; nRetCode = EXIT_FAILURE; } if( !visi.all_ok() ) nRetCode = EXIT_FAILURE; } CSLDestroy(argv); GDALDestroyDriverManager(); OGRCleanupAll(); CPLDumpSharedList( nullptr ); CPLCleanupTLS(); return nRetCode; } ������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testcopywords.cpp������������������������������������������������������������0000664�0001750�0001750�00000073120�13701057760�017123� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testcopywords.cpp e5a74767bbe5045d1e0913c09817766065318d3d 2019-12-30 02:46:39 +0100 Even Rouault $ * * Project: GDAL Core * Purpose: Test GDALCopyWords(). * Author: Even Rouault, <even dot rouault at spatialys.com> * ****************************************************************************** * Copyright (c) 2009-2011, Even Rouault <even dot rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cpl_conv.h" #include "gdal.h" #include <iostream> GByte* pIn; GByte* pOut; int bErr = FALSE; template <class OutType, class ConstantType> void AssertRes(GDALDataType intype, ConstantType inval, GDALDataType outtype, ConstantType expected_outval, OutType outval, int numLine) { if (fabs((double)outval - (double)expected_outval) > .1) { std::cout << "Test failed at line " << numLine << " (intype=" << GDALGetDataTypeName(intype) << ",inval=" << (double)inval << ",outtype=" << GDALGetDataTypeName(outtype) << ",got " << (double)outval << " expected " << expected_outval << std::endl; bErr = TRUE; } } #define ASSERT(intype, inval, outtype, expected_outval, outval ) \ AssertRes(intype, inval, outtype, expected_outval, outval, numLine) template <class InType, class OutType, class ConstantType> void Test(GDALDataType intype, ConstantType inval, ConstantType invali, GDALDataType outtype, ConstantType outval, ConstantType outvali, int numLine) { memset(pIn, 0xff, 128); memset(pOut, 0xff, 128); *(InType*)(pIn) = (InType)inval; *(InType*)(pIn + 32) = (InType)inval; if (GDALDataTypeIsComplex(intype)) { ((InType*)(pIn))[1] = (InType)invali; ((InType*)(pIn + 32))[1] = (InType)invali; } /* Test positive offsets */ GDALCopyWords(pIn, intype, 32, pOut, outtype, 32, 2); /* Test negative offsets */ GDALCopyWords(pIn + 32, intype, -32, pOut + 128 - 16, outtype, -32, 2); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + 32)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + 128 - 16)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + 128 - 16 - 32)); if (GDALDataTypeIsComplex(outtype)) { ASSERT(intype, invali, outtype, outvali, ((OutType*)(pOut))[1]); ASSERT(intype, invali, outtype, outvali, ((OutType*)(pOut + 32))[1]); ASSERT(intype, invali, outtype, outvali, ((OutType*)(pOut + 128 - 16))[1]); ASSERT(intype, invali, outtype, outvali, ((OutType*)(pOut + 128 - 16 - 32))[1]); } else { *(InType*)(pIn + GDALGetDataTypeSize(intype)/8) = (InType)inval; /* Test packed offsets */ GDALCopyWords(pIn, intype, GDALGetDataTypeSize(intype)/8, pOut, outtype, GDALGetDataTypeSize(outtype)/8, 2); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + GDALGetDataTypeSize(outtype)/8)); *(InType*)(pIn + 2 * GDALGetDataTypeSize(intype)/8) = (InType)inval; *(InType*)(pIn + 3 * GDALGetDataTypeSize(intype)/8) = (InType)inval; /* Test packed offsets */ GDALCopyWords(pIn, intype, GDALGetDataTypeSize(intype)/8, pOut, outtype, GDALGetDataTypeSize(outtype)/8, 4); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + GDALGetDataTypeSize(outtype)/8)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + 2 * GDALGetDataTypeSize(outtype)/8)); ASSERT(intype, inval, outtype, outval, *(OutType*)(pOut + 3 * GDALGetDataTypeSize(outtype)/8)); } } template <class InType, class ConstantType> void FromR_2(GDALDataType intype, ConstantType inval, ConstantType invali, GDALDataType outtype, ConstantType outval, ConstantType outvali, int numLine) { if (outtype == GDT_Byte) Test<InType,GByte,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_Int16) Test<InType,GInt16,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_UInt16) Test<InType,GUInt16,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_Int32) Test<InType,GInt32,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_UInt32) Test<InType,GUInt32,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_Float32) Test<InType,float,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_Float64) Test<InType,double,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_CInt16) Test<InType,GInt16,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_CInt32) Test<InType,GInt32,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_CFloat32) Test<InType,float,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (outtype == GDT_CFloat64) Test<InType,double,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); } template<class ConstantType> void FromR(GDALDataType intype, ConstantType inval, ConstantType invali, GDALDataType outtype, ConstantType outval, ConstantType outvali, int numLine) { if (intype == GDT_Byte) FromR_2<GByte,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_Int16) FromR_2<GInt16,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_UInt16) FromR_2<GUInt16,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_Int32) FromR_2<GInt32,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_UInt32) FromR_2<GUInt32,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_Float32) FromR_2<float,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_Float64) FromR_2<double,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_CInt16) FromR_2<GInt16,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_CInt32) FromR_2<GInt32,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_CFloat32) FromR_2<float,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); else if (intype == GDT_CFloat64) FromR_2<double,ConstantType>(intype, inval, invali, outtype, outval, outvali, numLine); } #define FROM_R(intype, inval, outtype, outval) FromR<GIntBig>(intype, inval, 0, outtype, outval, 0, __LINE__) #define FROM_R_F(intype, inval, outtype, outval) FromR<double>(intype, inval, 0, outtype, outval, 0, __LINE__) #define FROM_C(intype, inval, invali, outtype, outval, outvali) FromR<GIntBig>(intype, inval, invali, outtype, outval, outvali, __LINE__) #define FROM_C_F(intype, inval, invali, outtype, outval, outvali) FromR<double>(intype, inval, invali, outtype, outval, outvali, __LINE__) #define IS_UNSIGNED(x) (x == GDT_Byte || x == GDT_UInt16 || x == GDT_UInt32) #define IS_FLOAT(x) (x == GDT_Float32 || x == GDT_Float64 || x == GDT_CFloat32 || x == GDT_CFloat64) #define CST_3000000000 (((GIntBig)3000) * 1000 * 1000) #define CST_5000000000 (((GIntBig)5000) * 1000 * 1000) static void check_GDT_Byte() { /* GDT_Byte */ for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_R(GDT_Byte, 0, outtype, 0); FROM_R(GDT_Byte, 127, outtype, 127); FROM_R(GDT_Byte, 255, outtype, 255); } for(int i=0;i<17;i++) { pIn[i] = (GByte)i; } memset(pOut, 0xff, 128); GDALCopyWords(pIn, GDT_Byte, 1, pOut, GDT_Int32, 4, 17); for(int i=0;i<17;i++) { AssertRes(GDT_Byte, i, GDT_Int32, i, ((int*)pOut)[i], __LINE__); } memset(pOut, 0xff, 128); GDALCopyWords(pIn, GDT_Byte, 1, pOut, GDT_Float32, 4, 17); for(int i=0;i<17;i++) { AssertRes(GDT_Byte, i, GDT_Float32, i, ((float*)pOut)[i], __LINE__); } } static void check_GDT_Int16() { /* GDT_Int16 */ FROM_R(GDT_Int16, -32000, GDT_Byte, 0); /* clamp */ FROM_R(GDT_Int16, -32000, GDT_Int16, -32000); FROM_R(GDT_Int16, -32000, GDT_UInt16, 0); /* clamp */ FROM_R(GDT_Int16, -32000, GDT_Int32, -32000); FROM_R(GDT_Int16, -32000, GDT_UInt32, 0); /* clamp */ FROM_R(GDT_Int16, -32000, GDT_Float32, -32000); FROM_R(GDT_Int16, -32000, GDT_Float64, -32000); FROM_R(GDT_Int16, -32000, GDT_CInt16, -32000); FROM_R(GDT_Int16, -32000, GDT_CInt32, -32000); FROM_R(GDT_Int16, -32000, GDT_CFloat32, -32000); FROM_R(GDT_Int16, -32000, GDT_CFloat64, -32000); for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_R(GDT_Int16, 127, outtype, 127); } FROM_R(GDT_Int16, 32000, GDT_Byte, 255); /* clamp */ FROM_R(GDT_Int16, 32000, GDT_Int16, 32000); FROM_R(GDT_Int16, 32000, GDT_UInt16, 32000); FROM_R(GDT_Int16, 32000, GDT_Int32, 32000); FROM_R(GDT_Int16, 32000, GDT_UInt32, 32000); FROM_R(GDT_Int16, 32000, GDT_Float32, 32000); FROM_R(GDT_Int16, 32000, GDT_Float64, 32000); FROM_R(GDT_Int16, 32000, GDT_CInt16, 32000); FROM_R(GDT_Int16, 32000, GDT_CInt32, 32000); FROM_R(GDT_Int16, 32000, GDT_CFloat32, 32000); FROM_R(GDT_Int16, 32000, GDT_CFloat64, 32000); } static void check_GDT_UInt16() { /* GDT_UInt16 */ for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_R(GDT_UInt16, 0, outtype, 0); FROM_R(GDT_UInt16, 127, outtype, 127); } FROM_R(GDT_UInt16, 65000, GDT_Byte, 255); /* clamp */ FROM_R(GDT_UInt16, 65000, GDT_Int16, 32767); /* clamp */ FROM_R(GDT_UInt16, 65000, GDT_UInt16, 65000); FROM_R(GDT_UInt16, 65000, GDT_Int32, 65000); FROM_R(GDT_UInt16, 65000, GDT_UInt32, 65000); FROM_R(GDT_UInt16, 65000, GDT_Float32, 65000); FROM_R(GDT_UInt16, 65000, GDT_Float64, 65000); FROM_R(GDT_UInt16, 65000, GDT_CInt16, 32767); /* clamp */ FROM_R(GDT_UInt16, 65000, GDT_CInt32, 65000); FROM_R(GDT_UInt16, 65000, GDT_CFloat32, 65000); FROM_R(GDT_UInt16, 65000, GDT_CFloat64, 65000); } static void check_GDT_Int32() { /* GDT_Int32 */ FROM_R(GDT_Int32, -33000, GDT_Byte, 0); /* clamp */ FROM_R(GDT_Int32, -33000, GDT_Int16, -32768); /* clamp */ FROM_R(GDT_Int32, -33000, GDT_UInt16, 0); /* clamp */ FROM_R(GDT_Int32, -33000, GDT_Int32, -33000); /* clamp */ FROM_R(GDT_Int32, -33000, GDT_UInt32, 0); /* clamp */ FROM_R(GDT_Int32, -33000, GDT_Float32, -33000); FROM_R(GDT_Int32, -33000, GDT_Float64, -33000); FROM_R(GDT_Int32, -33000, GDT_CInt16, -32768); /* clamp */ FROM_R(GDT_Int32, -33000, GDT_CInt32, -33000); FROM_R(GDT_Int32, -33000, GDT_CFloat32, -33000); FROM_R(GDT_Int32, -33000, GDT_CFloat64, -33000); for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_R(GDT_Int32, 127, outtype, 127); } FROM_R(GDT_Int32, 67000, GDT_Byte, 255); /* clamp */ FROM_R(GDT_Int32, 67000, GDT_Int16, 32767); /* clamp */ FROM_R(GDT_Int32, 67000, GDT_UInt16, 65535); /* clamp */ FROM_R(GDT_Int32, 67000, GDT_Int32, 67000); FROM_R(GDT_Int32, 67000, GDT_UInt32, 67000); FROM_R(GDT_Int32, 67000, GDT_Float32, 67000); FROM_R(GDT_Int32, 67000, GDT_Float64, 67000); FROM_R(GDT_Int32, 67000, GDT_CInt16, 32767); /* clamp */ FROM_R(GDT_Int32, 67000, GDT_CInt32, 67000); FROM_R(GDT_Int32, 67000, GDT_CFloat32, 67000); FROM_R(GDT_Int32, 67000, GDT_CFloat64, 67000); } static void check_GDT_UInt32() { /* GDT_UInt32 */ for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_R(GDT_UInt32, 0, outtype, 0); FROM_R(GDT_UInt32, 127, outtype, 127); } FROM_R(GDT_UInt32, 3000000000U, GDT_Byte, 255); /* clamp */ FROM_R(GDT_UInt32, 3000000000U, GDT_Int16, 32767); /* clamp */ FROM_R(GDT_UInt32, 3000000000U, GDT_UInt16, 65535); /* clamp */ FROM_R(GDT_UInt32, 3000000000U, GDT_Int32, 2147483647); /* clamp */ FROM_R(GDT_UInt32, 3000000000U, GDT_UInt32, 3000000000U); FROM_R(GDT_UInt32, 3000000000U, GDT_Float32, 3000000000U); FROM_R(GDT_UInt32, 3000000000U, GDT_Float64, 3000000000U); FROM_R(GDT_UInt32, 3000000000U, GDT_CInt16, 32767); /* clamp */ FROM_R(GDT_UInt32, 3000000000U, GDT_CInt32, 2147483647); /* clamp */ FROM_R(GDT_UInt32, 3000000000U, GDT_CFloat32, 3000000000U); FROM_R(GDT_UInt32, 3000000000U, GDT_CFloat64, 3000000000U); } static void check_GDT_Float32and64() { /* GDT_Float32 and GDT_Float64 */ for(int i=0;i<2;i++) { GDALDataType intype = (i == 0) ? GDT_Float32 : GDT_Float64; for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { if (IS_FLOAT(outtype)) { FROM_R_F(intype, 127.1, outtype, 127.1); FROM_R_F(intype, -127.1, outtype, -127.1); } else { FROM_R_F(intype, 127.1, outtype, 127); FROM_R_F(intype, 127.9, outtype, 128); FROM_R_F(intype, 0.4, outtype, 0); FROM_R_F(intype, 0.5, outtype, 1); /* We could argue how to do this rounding */ FROM_R_F(intype, 0.6, outtype, 1); FROM_R_F(intype, 127.5, outtype, 128); /* We could argue how to do this rounding */ if (!IS_UNSIGNED(outtype)) { FROM_R_F(intype, -125.9, outtype, -126); FROM_R_F(intype, -127.1, outtype, -127); FROM_R_F(intype, -0.4, outtype, 0); FROM_R_F(intype, -0.5, outtype, -1); /* We could argue how to do this rounding */ FROM_R_F(intype, -0.6, outtype, -1); FROM_R_F(intype, -127.5, outtype, -128); /* We could argue how to do this rounding */ } } } FROM_R(intype, -CST_3000000000, GDT_Byte, 0); FROM_R(intype, -32768, GDT_Byte, 0); FROM_R(intype, -1, GDT_Byte, 0); FROM_R(intype, 256, GDT_Byte, 255); FROM_R(intype, 65536, GDT_Byte, 255); FROM_R(intype, CST_3000000000, GDT_Byte, 255); FROM_R(intype, -CST_3000000000, GDT_Int16, -32768); FROM_R(intype, -33000, GDT_Int16, -32768); FROM_R(intype, 33000, GDT_Int16, 32767); FROM_R(intype, CST_3000000000, GDT_Int16, 32767); FROM_R(intype, -CST_3000000000, GDT_UInt16, 0); FROM_R(intype, -1, GDT_UInt16, 0); FROM_R(intype, 66000, GDT_UInt16, 65535); FROM_R(intype, CST_3000000000, GDT_UInt16, 65535); FROM_R(intype, -CST_3000000000, GDT_Int32, INT_MIN); FROM_R(intype, CST_3000000000, GDT_Int32, 2147483647); FROM_R(intype, -1, GDT_UInt32, 0); FROM_R(intype, CST_5000000000, GDT_UInt32, 4294967295UL); FROM_R(intype, CST_5000000000, GDT_Float32, CST_5000000000); FROM_R(intype, -CST_5000000000, GDT_Float32, -CST_5000000000); FROM_R(intype, CST_5000000000, GDT_Float64, CST_5000000000); FROM_R(intype, -CST_5000000000, GDT_Float64, -CST_5000000000); FROM_R(intype, -33000, GDT_CInt16, -32768); FROM_R(intype, 33000, GDT_CInt16, 32767); FROM_R(intype, -CST_3000000000, GDT_CInt32, INT_MIN); FROM_R(intype, CST_3000000000, GDT_CInt32, 2147483647); FROM_R(intype, CST_5000000000, GDT_CFloat32, CST_5000000000); FROM_R(intype, -CST_5000000000, GDT_CFloat32, -CST_5000000000); FROM_R(intype, CST_5000000000, GDT_CFloat64, CST_5000000000); FROM_R(intype, -CST_5000000000, GDT_CFloat64, -CST_5000000000); } } static void check_GDT_CInt16() { /* GDT_CInt16 */ FROM_C(GDT_CInt16, -32000, -32500, GDT_Byte, 0, 0); /* clamp */ FROM_C(GDT_CInt16, -32000, -32500, GDT_Int16, -32000, 0); FROM_C(GDT_CInt16, -32000, -32500, GDT_UInt16, 0, 0); /* clamp */ FROM_C(GDT_CInt16, -32000, -32500, GDT_Int32, -32000, 0); FROM_C(GDT_CInt16, -32000, -32500, GDT_UInt32, 0,0); /* clamp */ FROM_C(GDT_CInt16, -32000, -32500, GDT_Float32, -32000, 0); FROM_C(GDT_CInt16, -32000, -32500, GDT_Float64, -32000, 0); FROM_C(GDT_CInt16, -32000, -32500, GDT_CInt16, -32000, -32500); FROM_C(GDT_CInt16, -32000, -32500, GDT_CInt32, -32000, -32500); FROM_C(GDT_CInt16, -32000, -32500, GDT_CFloat32, -32000, -32500); FROM_C(GDT_CInt16, -32000, -32500, GDT_CFloat64, -32000, -32500); for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_C(GDT_CInt16, 127, 128, outtype, 127, 128); } FROM_C(GDT_CInt16, 32000, 32500, GDT_Byte, 255, 0); /* clamp */ FROM_C(GDT_CInt16, 32000, 32500, GDT_Int16, 32000, 0); FROM_C(GDT_CInt16, 32000, 32500, GDT_UInt16, 32000, 0); FROM_C(GDT_CInt16, 32000, 32500, GDT_Int32, 32000, 0); FROM_C(GDT_CInt16, 32000, 32500, GDT_UInt32, 32000, 0); FROM_C(GDT_CInt16, 32000, 32500, GDT_Float32, 32000, 0); FROM_C(GDT_CInt16, 32000, 32500, GDT_Float64, 32000, 0); FROM_C(GDT_CInt16, 32000, 32500, GDT_CInt16, 32000, 32500); FROM_C(GDT_CInt16, 32000, 32500, GDT_CInt32, 32000, 32500); FROM_C(GDT_CInt16, 32000, 32500, GDT_CFloat32, 32000, 32500); FROM_C(GDT_CInt16, 32000, 32500, GDT_CFloat64, 32000, 32500); } static void check_GDT_CInt32() { /* GDT_CInt32 */ FROM_C(GDT_CInt32, -33000, -33500, GDT_Byte, 0, 0); /* clamp */ FROM_C(GDT_CInt32, -33000, -33500, GDT_Int16, -32768, 0); /* clamp */ FROM_C(GDT_CInt32, -33000, -33500, GDT_UInt16, 0, 0); /* clamp */ FROM_C(GDT_CInt32, -33000, -33500, GDT_Int32, -33000, 0); FROM_C(GDT_CInt32, -33000, -33500, GDT_UInt32, 0,0); /* clamp */ FROM_C(GDT_CInt32, -33000, -33500, GDT_Float32, -33000, 0); FROM_C(GDT_CInt32, -33000, -33500, GDT_Float64, -33000, 0); FROM_C(GDT_CInt32, -33000, -33500, GDT_CInt16, -32768, -32768); /* clamp */ FROM_C(GDT_CInt32, -33000, -33500, GDT_CInt32, -33000, -33500); FROM_C(GDT_CInt32, -33000, -33500, GDT_CFloat32, -33000, -33500); FROM_C(GDT_CInt32, -33000, -33500, GDT_CFloat64, -33000, -33500); for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { FROM_C(GDT_CInt32, 127, 128, outtype, 127, 128); } FROM_C(GDT_CInt32, 67000, 67500, GDT_Byte, 255, 0); /* clamp */ FROM_C(GDT_CInt32, 67000, 67500, GDT_Int16, 32767, 0); /* clamp */ FROM_C(GDT_CInt32, 67000, 67500, GDT_UInt16, 65535, 0); /* clamp */ FROM_C(GDT_CInt32, 67000, 67500, GDT_Int32, 67000, 0); FROM_C(GDT_CInt32, 67000, 67500, GDT_UInt32, 67000, 0); FROM_C(GDT_CInt32, 67000, 67500, GDT_Float32, 67000, 0); FROM_C(GDT_CInt32, 67000, 67500, GDT_Float64, 67000, 0); FROM_C(GDT_CInt32, 67000, 67500, GDT_CInt16, 32767, 32767); /* clamp */ FROM_C(GDT_CInt32, 67000, 67500, GDT_CInt32, 67000, 67500); FROM_C(GDT_CInt32, 67000, 67500, GDT_CFloat32, 67000, 67500); FROM_C(GDT_CInt32, 67000, 67500, GDT_CFloat64, 67000, 67500); } static void check_GDT_CFloat32and64() { /* GDT_CFloat32 and GDT_CFloat64 */ for(int i=0;i<2;i++) { GDALDataType intype = (i == 0) ? GDT_CFloat32 : GDT_CFloat64; for(GDALDataType outtype=GDT_Byte; outtype<=GDT_CFloat64;outtype = (GDALDataType)(outtype + 1)) { if (IS_FLOAT(outtype)) { FROM_C_F(intype, 127.1, 127.9, outtype, 127.1, 127.9); FROM_C_F(intype, -127.1, -127.9, outtype, -127.1, -127.9); } else { FROM_C_F(intype, 127.1, 150.9, outtype, 127, 151); FROM_C_F(intype, 127.9, 150.1, outtype, 128, 150); if (!IS_UNSIGNED(outtype)) { FROM_C_F(intype, -125.9, -127.1, outtype, -126, -127); } } } FROM_C(intype, -1, 256, GDT_Byte, 0, 0); FROM_C(intype, 256, -1, GDT_Byte, 255, 0); FROM_C(intype, -33000, 33000, GDT_Int16, -32768, 0); FROM_C(intype, 33000, -33000, GDT_Int16, 32767, 0); FROM_C(intype, -1, 66000, GDT_UInt16, 0, 0); FROM_C(intype, 66000, -1, GDT_UInt16, 65535, 0); FROM_C(intype, -CST_3000000000, -CST_3000000000, GDT_Int32, INT_MIN, 0); FROM_C(intype, CST_3000000000, CST_3000000000, GDT_Int32, 2147483647, 0); FROM_C(intype, -1, CST_5000000000, GDT_UInt32, 0, 0); FROM_C(intype, CST_5000000000, -1, GDT_UInt32, 4294967295UL, 0); FROM_C(intype, CST_5000000000, -1, GDT_Float32, CST_5000000000, 0); FROM_C(intype, CST_5000000000, -1, GDT_Float64, CST_5000000000, 0); FROM_C(intype, -CST_5000000000, -1, GDT_Float32, -CST_5000000000, 0); FROM_C(intype, -CST_5000000000, -1, GDT_Float64, -CST_5000000000, 0); FROM_C(intype, -33000, 33000, GDT_CInt16, -32768, 32767); FROM_C(intype, 33000, -33000, GDT_CInt16, 32767, -32768); FROM_C(intype, -CST_3000000000, -CST_3000000000, GDT_CInt32, INT_MIN, INT_MIN); FROM_C(intype, CST_3000000000, CST_3000000000, GDT_CInt32, 2147483647, 2147483647); FROM_C(intype, CST_5000000000, -CST_5000000000, GDT_CFloat32, CST_5000000000, -CST_5000000000); FROM_C(intype, CST_5000000000, -CST_5000000000, GDT_CFloat64, CST_5000000000, -CST_5000000000); } } template<class Tin, class Tout> void CheckPackedGeneric(GDALDataType eIn, GDALDataType eOut) { const int N = 64+7; Tin arrayIn[N]; Tout arrayOut[N]; for(int i=0;i<N;i++) { arrayIn[i] = static_cast<Tin>(i + 1); arrayOut[i] = 0; } GDALCopyWords(arrayIn, eIn, GDALGetDataTypeSizeBytes(eIn), arrayOut, eOut, GDALGetDataTypeSizeBytes(eOut), N); int numLine = 0; for(int i=0;i<N;i++) { ASSERT(eIn, i+1, eOut, i+1, arrayOut[i] ); } } template<class Tin, class Tout> void CheckPacked(GDALDataType eIn, GDALDataType eOut) { CheckPackedGeneric<Tin,Tout>(eIn, eOut); } template<> void CheckPacked<GUInt16,GByte>(GDALDataType eIn, GDALDataType eOut) { CheckPackedGeneric<GUInt16,GByte>(eIn, eOut); const int N = 64+7; GUInt16 arrayIn[N] = { 0 }; GByte arrayOut[N] = { 0 }; for(int i=0;i<N;i++) { arrayIn[i] = (i % 6) == 0 ? 254 : (i % 6) == 1 ? 255 : (i % 4) == 2 ? 256 : (i % 6) == 3 ? 32767 : (i % 6) == 4 ? 32768 : 65535; } GDALCopyWords(arrayIn, eIn, GDALGetDataTypeSizeBytes(eIn), arrayOut, eOut, GDALGetDataTypeSizeBytes(eOut), N); int numLine = 0; for(int i=0;i<N;i++) { ASSERT(eIn, (int)arrayIn[i], eOut, (i%6) == 0 ? 254 : 255, arrayOut[i] ); } } template<> void CheckPacked<GUInt16,GInt16>(GDALDataType eIn, GDALDataType eOut) { CheckPackedGeneric<GUInt16,GInt16>(eIn, eOut); const int N = 64+7; GUInt16 arrayIn[N] = { 0 }; GInt16 arrayOut[N] = { 0 }; for(int i=0;i<N;i++) { arrayIn[i] = 32766 + (i % 4); } GDALCopyWords(arrayIn, eIn, GDALGetDataTypeSizeBytes(eIn), arrayOut, eOut, GDALGetDataTypeSizeBytes(eOut), N); int numLine = 0; for(int i=0;i<N;i++) { ASSERT(eIn, (int)arrayIn[i], eOut, (i%4) == 0 ? 32766 : 32767, arrayOut[i] ); } } template<class Tin> void CheckPacked(GDALDataType eIn, GDALDataType eOut) { switch(eOut) { case GDT_Byte: CheckPacked<Tin, GByte>(eIn, eOut); break; case GDT_UInt16: CheckPacked<Tin, GUInt16>(eIn, eOut); break; case GDT_Int16: CheckPacked<Tin, GInt16>(eIn, eOut); break; case GDT_UInt32: CheckPacked<Tin, GUInt32>(eIn, eOut); break; case GDT_Int32: CheckPacked<Tin, GInt32>(eIn, eOut); break; case GDT_Float32: CheckPacked<Tin, float>(eIn, eOut); break; case GDT_Float64: CheckPacked<Tin, double>(eIn, eOut); break; default: CPLAssert(false); } } static void CheckPacked(GDALDataType eIn, GDALDataType eOut) { switch(eIn) { case GDT_Byte: CheckPacked<GByte>(eIn, eOut); break; case GDT_UInt16: CheckPacked<GUInt16>(eIn, eOut); break; case GDT_Int16: CheckPacked<GInt16>(eIn, eOut); break; case GDT_UInt32: CheckPacked<GUInt32>(eIn, eOut); break; case GDT_Int32: CheckPacked<GInt32>(eIn, eOut); break; case GDT_Float32: CheckPacked<float>(eIn, eOut); break; case GDT_Float64: CheckPacked<double>(eIn, eOut); break; default: CPLAssert(false); } } int main(int /* argc */, char* /* argv */ []) { pIn = (GByte*)malloc(256); pOut = (GByte*)malloc(256); check_GDT_Byte(); check_GDT_Int16(); check_GDT_UInt16(); check_GDT_Int32(); check_GDT_UInt32(); check_GDT_Float32and64(); check_GDT_CInt16(); check_GDT_CInt32(); check_GDT_CFloat32and64(); for(int k=0;k<2;k++) { if( k == 1 ) CPLSetConfigOption("GDAL_USE_SSSE3", "NO"); for(int spacing=2; spacing<=4; spacing++) { memset(pIn, 0xff, 256); for(int i=0;i<17;i++) { pIn[spacing*i] = (GByte)(17-i); } memset(pOut, 0xff, 256); GDALCopyWords(pIn, GDT_Byte, spacing, pOut, GDT_Byte, 1, 17); for(int i=0;i<17;i++) { AssertRes(GDT_Byte, 17-i, GDT_Byte, 17-i, pOut[i], __LINE__); } memset(pIn, 0xff, 256); memset(pOut, 0xff, 256); for(int i=0;i<17;i++) { pIn[i] = (GByte)(17-i); } GDALCopyWords(pIn, GDT_Byte, 1, pOut, GDT_Byte, spacing, 17); for(int i=0;i<17;i++) { AssertRes(GDT_Byte, 17-i, GDT_Byte, 17-i, pOut[i*spacing], __LINE__); for(int j=1;j<spacing;j++) { AssertRes(GDT_Byte, 0xff, GDT_Byte, 0xff, pOut[i*spacing+j], __LINE__); } } } } CPLSetConfigOption("GDAL_USE_SSSE3", nullptr); memset(pIn, 0xff, 256); GInt16* pInShort = (GInt16*)pIn; GInt16* pOutShort = (GInt16*)pOut; for(int i=0;i<9;i++) { pInShort[2*i+0] = 0x1234; pInShort[2*i+1] = 0x5678; } for(int iSpacing=0;iSpacing<4;iSpacing++) { memset(pOut, 0xff, 256); GDALCopyWords(pInShort, GDT_Int16, sizeof(short), pOutShort, GDT_Int16, (iSpacing + 1) * sizeof(short), 18); for(int i=0;i<9;i++) { AssertRes(GDT_Int16, pInShort[2*i+0], GDT_Int16, pInShort[2*i+0], pOutShort[(iSpacing+1)*(2*i+0)], __LINE__); AssertRes(GDT_Int16, pInShort[2*i+1], GDT_Int16, pInShort[2*i+1], pOutShort[(iSpacing+1)*(2*i+1)], __LINE__); } } for(int iSpacing=0;iSpacing<4;iSpacing++) { memset(pIn, 0xff, 256); memset(pOut, 0xff, 256); for(int i=0;i<9;i++) { pInShort[(iSpacing+1)*(2*i+0)] = 0x1234; pInShort[(iSpacing+1)*(2*i+1)] = 0x5678; } GDALCopyWords(pInShort, GDT_Int16, (iSpacing + 1) * sizeof(short), pOutShort, GDT_Int16, sizeof(short), 18); for(int i=0;i<9;i++) { AssertRes(GDT_Int16, pInShort[(iSpacing+1)*(2*i+0)], GDT_Int16, pInShort[(iSpacing+1)*(2*i+0)], pOutShort[2*i+0], __LINE__); AssertRes(GDT_Int16, pInShort[(iSpacing+1)*(2*i+1)], GDT_Int16, pInShort[(iSpacing+1)*(2*i+1)], pOutShort[2*i+1], __LINE__); } } free(pIn); free(pOut); for( GDALDataType eIn = GDT_Byte; eIn <= GDT_Float64; eIn = static_cast<GDALDataType>(eIn + 1) ) { for( GDALDataType eOut = GDT_Byte; eOut <= GDT_Float64; eOut = static_cast<GDALDataType>(eOut + 1) ) { CheckPacked(eIn, eOut); } } if (bErr == FALSE) printf("success !\n"); else printf("fail !\n"); return (bErr == FALSE) ? 0 : -1; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testsse.cpp������������������������������������������������������������������0000664�0001750�0001750�00000017530�13701057760�015667� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdio.h> #include "gdalsse_priv.h" #define MY_ASSERT(x) do { if (!(x)) { printf("test at line %d failed !\n", __LINE__); exit(1); } } while(0) int main() { { double x = 1.23; XMMReg4Double reg = XMMReg4Double::Load1ValHighAndLow(&x); double res[4]; reg.Store4Val(res); MY_ASSERT(res[0] == x); MY_ASSERT(res[1] == x); MY_ASSERT(res[2] == x); MY_ASSERT(res[3] == x); } { unsigned char input[] = { 1, 2, 3, 4 }; XMMReg4Double reg = XMMReg4Double::Load4Val(input); double res[4]; reg.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); unsigned char output[4]; reg.Store4Val(output); MY_ASSERT(output[0] == input[0]); MY_ASSERT(output[1] == input[1]); MY_ASSERT(output[2] == input[2]); MY_ASSERT(output[3] == input[3]); } { unsigned short input[] = { 1, 65535, 3, 65534 }; XMMReg4Double reg = XMMReg4Double::Load4Val(input); double res[4]; reg.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); unsigned short output[4]; reg.Store4Val(output); MY_ASSERT(output[0] == input[0]); MY_ASSERT(output[1] == input[1]); MY_ASSERT(output[2] == input[2]); MY_ASSERT(output[3] == input[3]); } { short input[] = { 1, 32767, 3, -32768 }; XMMReg4Double reg = XMMReg4Double::Load4Val(input); double res[4]; reg.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); } { float input[] = { 1.0f, 2.0f, 3.0f, 4.0f }; XMMReg4Double reg = XMMReg4Double::Load4Val(input); double res[4]; reg.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); float output[4]; reg.Store4Val(output); MY_ASSERT(output[0] == input[0]); MY_ASSERT(output[1] == input[1]); MY_ASSERT(output[2] == input[2]); MY_ASSERT(output[3] == input[3]); } { double input[] = { 1.0, 2.0, 3.0, 4.0 }; XMMReg4Double reg = XMMReg4Double::Load4Val(input); double res[4]; reg.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); MY_ASSERT(reg.GetHorizSum() == input[0] + input[1] + input[2] + input[3]); double input2[] = { 100.0, 200.0 }; reg.AddToLow( XMMReg2Double::Load2Val(input2) ); reg.Store4Val(res); MY_ASSERT(res[0] == input[0] + input2[0]); MY_ASSERT(res[1] == input[1] + input2[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); } { double input[] = { 1.0, 2.0, 3.0, 4.0 }; double input2[] = { 10.0, 9.0, 8.0, 7.0 }; XMMReg4Double reg = XMMReg4Double::Load4Val(input); XMMReg4Double reg2 = XMMReg4Double::Load4Val(input2); double res[4]; (reg + reg2).Store4Val(res); MY_ASSERT(res[0] == input[0] + input2[0]); MY_ASSERT(res[1] == input[1] + input2[1]); MY_ASSERT(res[2] == input[2] + input2[2]); MY_ASSERT(res[3] == input[3] + input2[3]); reg += reg2; reg.Store4Val(res); MY_ASSERT(res[0] == input[0] + input2[0]); MY_ASSERT(res[1] == input[1] + input2[1]); MY_ASSERT(res[2] == input[2] + input2[2]); MY_ASSERT(res[3] == input[3] + input2[3]); reg = reg - reg2; reg.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); (reg * reg2).Store4Val(res); MY_ASSERT(res[0] == input[0] * input2[0]); MY_ASSERT(res[1] == input[1] * input2[1]); MY_ASSERT(res[2] == input[2] * input2[2]); MY_ASSERT(res[3] == input[3] * input2[3]); (reg / reg2).Store4Val(res); MY_ASSERT(res[0] == input[0] / input2[0]); MY_ASSERT(res[1] == input[1] / input2[1]); MY_ASSERT(res[2] == input[2] / input2[2]); MY_ASSERT(res[3] == input[3] / input2[3]); reg *= reg2; reg.Store4Val(res); MY_ASSERT(res[0] == input[0] * input2[0]); MY_ASSERT(res[1] == input[1] * input2[1]); MY_ASSERT(res[2] == input[2] * input2[2]); MY_ASSERT(res[3] == input[3] * input2[3]); reg = XMMReg4Double::Load4Val(input); reg2 = reg; reg2.Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == input[3]); unsigned char mask[32]; XMMReg4Double::Equals(reg, reg).StoreMask(mask); MY_ASSERT(mask[0] == 0xFF); MY_ASSERT(mask[8] == 0xFF); MY_ASSERT(mask[16] == 0xFF); MY_ASSERT(mask[24] == 0xFF); XMMReg4Double::NotEquals(reg, reg).StoreMask(mask); MY_ASSERT(mask[0] == 0); MY_ASSERT(mask[8] == 0); MY_ASSERT(mask[16] == 0); MY_ASSERT(mask[24] == 0); XMMReg4Double::Greater(reg, reg).StoreMask(mask); MY_ASSERT(mask[0] == 0); MY_ASSERT(mask[8] == 0); MY_ASSERT(mask[16] == 0); MY_ASSERT(mask[24] == 0); double diff[] = { 1.5, -1.5, -0.5, 0.5 }; XMMReg4Double::Greater(reg, reg + XMMReg4Double::Load4Val(diff)).StoreMask(mask); MY_ASSERT(mask[0] == 0); MY_ASSERT(mask[8] == 0xFF); MY_ASSERT(mask[16] == 0xFF); MY_ASSERT(mask[24] == 0); XMMReg4Double::Min(reg, reg + XMMReg4Double::Load4Val(diff)).Store4Val(res); MY_ASSERT(res[0] == input[0]); MY_ASSERT(res[1] == input[1] + diff[1]); MY_ASSERT(res[2] == input[2] + diff[2]); MY_ASSERT(res[3] == input[3]); reg = XMMReg4Double::Load4Val(input); XMMReg4Double reg_diff = XMMReg4Double::Load4Val(diff); XMMReg4Double::Ternary(XMMReg4Double::Greater(reg, reg + reg_diff), reg, reg_diff).Store4Val(res); MY_ASSERT(res[0] == diff[0]); MY_ASSERT(res[1] == input[1]); MY_ASSERT(res[2] == input[2]); MY_ASSERT(res[3] == diff[3]); } #ifndef USE_SSE2_EMULATION { float input[] = { -1.3f, 1.5f, 40000.3f, 65537.0f }; GUInt16 output[4]; GDALCopy4Words(input, output); MY_ASSERT(output[0] == 0); MY_ASSERT(output[1] == 2); MY_ASSERT(output[2] == 40000); MY_ASSERT(output[3] == 65535); } #endif #ifndef USE_SSE2_EMULATION { float input[] = { -1.3f, 1.5f, 40000.3f, 65537.0f, 40000.3f, 1.3f, 65537.0f, -1.3f }; GUInt16 output[8]; GDALCopy8Words(input, output); MY_ASSERT(output[0] == 0); MY_ASSERT(output[1] == 2); MY_ASSERT(output[2] == 40000); MY_ASSERT(output[3] == 65535); MY_ASSERT(output[4] == 40000); MY_ASSERT(output[5] == 1); MY_ASSERT(output[6] == 65535); MY_ASSERT(output[7] == 0); } { float input[] = { -1.3f, 1.5f, 40000.3f, 65537.0f, 40000.3f, 1.3f, 65537.0f, -1.3f }; unsigned char output[8]; GDALCopy8Words<float, unsigned char>(input, output); MY_ASSERT(output[0] == 0); MY_ASSERT(output[1] == 2); MY_ASSERT(output[2] == 255); MY_ASSERT(output[3] == 255); MY_ASSERT(output[4] == 255); MY_ASSERT(output[5] == 1); MY_ASSERT(output[6] == 255); MY_ASSERT(output[7] == 0); } #endif return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_alg.cpp�����������������������������������������������������������������0000664�0001750�0001750�00000025642�13701057760�016002� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_alg.cpp 8e5eeb35bf76390e3134a4ea7076dab7d478ea0e 2018-11-14 22:55:13 +0100 Even Rouault $ * * Project: GDAL algorithms * Purpose: Test alg * Author: Even Rouault, even.rouault at spatialys.com * ****************************************************************************** * Copyright (c) 2016, Even Rouault <even.rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal_unit_test.h" #include "cpl_conv.h" #include "gdal_alg.h" #include "gdalwarper.h" #include "gdal_priv.h" namespace tut { // Common fixture with test data struct test_alg_data { }; // Register test group typedef test_group<test_alg_data> group; typedef group::object object; group test_alg_group("ALG"); typedef struct { double dfLevel; int nPoints; double x; double y; } writeCbkData; static CPLErr writeCbk( double dfLevel, int nPoints, double *padfX, double *padfY, void * userData ) { writeCbkData* data = (writeCbkData*)userData; data->dfLevel = dfLevel; data->nPoints = nPoints; if( nPoints == 1 ) { data->x = padfX[0]; data->y = padfY[0]; } return CE_None; } // Dummy test template<> template<> void object::test<1>() { writeCbkData data; memset(&data, 0, sizeof(data)); GDALContourGeneratorH hCG = GDAL_CG_Create(1,1,FALSE,0,1,0, writeCbk, &data); double scanline[] = { 0 }; ensure_equals(GDAL_CG_FeedLine(hCG, scanline), CE_None); ensure_equals(data.dfLevel, 0); ensure_equals(data.nPoints, 0); ensure_approx_equals(data.x, 0.0); ensure_approx_equals(data.y, 0.0); GDAL_CG_Destroy(hCG); } // GDALWarpResolveWorkingDataType: default type template<> template<> void object::test<2>() { GDALWarpOptions* psOptions = GDALCreateWarpOptions(); GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); GDALDestroyWarpOptions(psOptions); } // GDALWarpResolveWorkingDataType: do not change user specified type template<> template<> void object::test<3>() { GDALWarpOptions* psOptions = GDALCreateWarpOptions(); psOptions->eWorkingDataType = GDT_CFloat64; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_CFloat64 ); GDALDestroyWarpOptions(psOptions); } // GDALWarpResolveWorkingDataType: effect of padfSrcNoDataReal template<> template<> void object::test<4>() { GDALWarpOptions* psOptions = GDALCreateWarpOptions(); psOptions->nBandCount = 1; psOptions->padfSrcNoDataReal = static_cast<double*>(CPLMalloc(sizeof(double))); psOptions->padfSrcNoDataReal[0] = 0.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = -1.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Int16 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 2.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 256.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_UInt16 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 2.5; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Float32 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 2.12345678; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Float64 ); GDALDestroyWarpOptions(psOptions); } // GDALWarpResolveWorkingDataType: effect of padfSrcNoDataImag template<> template<> void object::test<5>() { GDALWarpOptions* psOptions = GDALCreateWarpOptions(); psOptions->nBandCount = 1; psOptions->padfSrcNoDataReal = static_cast<double*>(CPLMalloc(sizeof(double))); psOptions->padfSrcNoDataImag = static_cast<double*>(CPLMalloc(sizeof(double))); psOptions->padfSrcNoDataReal[0] = 0.0; psOptions->padfSrcNoDataImag[0] = 0.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 0.0; psOptions->padfSrcNoDataImag[0] = 1.0; GDALWarpResolveWorkingDataType(psOptions); // Could probably be CInt16 ensure_equals( psOptions->eWorkingDataType, GDT_CInt32 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 0.0; psOptions->padfSrcNoDataImag[0] = 1.5; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_CFloat32 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfSrcNoDataReal[0] = 0.0; psOptions->padfSrcNoDataImag[0] = 2.12345678; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_CFloat64 ); GDALDestroyWarpOptions(psOptions); } // GDALWarpResolveWorkingDataType: effect of padfDstNoDataReal template<> template<> void object::test<6>() { GDALWarpOptions* psOptions = GDALCreateWarpOptions(); psOptions->nBandCount = 1; psOptions->padfDstNoDataReal = static_cast<double*>(CPLMalloc(sizeof(double))); psOptions->padfDstNoDataReal[0] = 0.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataReal[0] = -1.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Int16 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataReal[0] = 2.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataReal[0] = 256.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_UInt16 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataReal[0] = 2.5; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Float32 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataReal[0] = 2.12345678; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Float64 ); GDALDestroyWarpOptions(psOptions); } // GDALWarpResolveWorkingDataType: effect of padfDstNoDataImag template<> template<> void object::test<7>() { GDALWarpOptions* psOptions = GDALCreateWarpOptions(); psOptions->nBandCount = 1; psOptions->padfDstNoDataReal = static_cast<double*>(CPLMalloc(sizeof(double))); psOptions->padfDstNoDataImag = static_cast<double*>(CPLMalloc(sizeof(double))); psOptions->padfDstNoDataReal[0] = 0.0; psOptions->padfDstNoDataImag[0] = 0.0; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_Byte ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataReal[0] = 0.0; psOptions->padfDstNoDataImag[0] = 1.0; GDALWarpResolveWorkingDataType(psOptions); // Could probably be CInt16 ensure_equals( psOptions->eWorkingDataType, GDT_CInt32 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataImag[0] = 0.0; psOptions->padfDstNoDataImag[0] = 1.5; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_CFloat32 ); psOptions->eWorkingDataType = GDT_Unknown; psOptions->padfDstNoDataImag[0] = 0.0; psOptions->padfDstNoDataImag[0] = 2.12345678; GDALWarpResolveWorkingDataType(psOptions); ensure_equals( psOptions->eWorkingDataType, GDT_CFloat64 ); GDALDestroyWarpOptions(psOptions); } // Test GDALAutoCreateWarpedVRT() with creatino of an alpha band template<> template<> void object::test<8>() { GDALDatasetUniquePtr poDS( GDALDriver::FromHandle( GDALGetDriverByName("MEM"))->Create("", 1, 1, 1, GDT_Byte, nullptr)); poDS->SetProjection( SRS_WKT_WGS84_LAT_LONG ); double adfGeoTransform[6] = { 10, 1, 0, 20, 0, -1 }; poDS->SetGeoTransform(adfGeoTransform); GDALWarpOptions* psOptions = GDALCreateWarpOptions(); psOptions->nDstAlphaBand = 2; GDALDatasetH hWarpedVRT = GDALAutoCreateWarpedVRT(GDALDataset::ToHandle(poDS.get()), nullptr, nullptr, GRA_NearestNeighbour, 0.0, psOptions); ensure( hWarpedVRT != nullptr ); ensure_equals( GDALGetRasterCount(hWarpedVRT), 2 ); ensure_equals( GDALGetRasterColorInterpretation( GDALGetRasterBand(hWarpedVRT, 2)), GCI_AlphaBand ); GDALDestroyWarpOptions(psOptions); GDALClose(hWarpedVRT); } } // namespace tut ����������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testdestroy.cpp��������������������������������������������������������������0000664�0001750�0001750�00000003657�13701057760�016573� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testdestroy.cpp 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ * * Project: GDAL Core * Purpose: Test GDALCopyWords(). * Author: Even Rouault, <even dot rouault at spatialys.com> * ****************************************************************************** * Copyright (c) 2015, Even Rouault <even dot rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal.h" int main() { GDALAllRegister(); /* See corresponding bug reports: */ /* https://trac.osgeo.org/gdal/ticket/6139 */ /* https://trac.osgeo.org/gdal/ticket/6868 */ CPLError(CE_None, CPLE_AppDefined, "Expected, CPLError called to trigger hErrorMutex allocation"); GDALDestroy(); return 0; } ���������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/gdal_unit_test.h�������������������������������������������������������������0000664�0001750�0001750�00000003056�13701057760�016645� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Common definitions used in C++ Test Suite for GDAL // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #ifndef GDAL_COMMON_H_INCLUDED #define GDAL_COMMON_H_INCLUDED #include "cpl_port.h" #include <tut_gdal.h> #include <string> namespace tut { namespace common { // Data directory path used by GDAL C++ Unit Tests subset extern std::string const data_basedir; // Temp directory path extern std::string const tmp_basedir; } // common } // tut #endif // GDAL_COMMON_H_INCLUDED ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_gdal_gtiff.cpp����������������������������������������������������������0000664�0001750�0001750�00000021612�13701057760�017316� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test read/write functionality for GeoTIFF format. // Ported from gcore/tiff_read.py, gcore/tiff_write.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_string.h" #include "gdal_alg.h" #include "gdal_priv.h" #include "gdal.h" #include <sstream> #include <string> #include <vector> namespace tut { // Common fixture with test data struct test_gtiff_data { struct raster_t { std::string file_; int band_; int checksum_; raster_t(std::string const& f, int b, int c) : file_(f), band_(b), checksum_(c) {} }; typedef std::vector<raster_t> rasters_t; GDALDriverH drv_; std::string drv_name_; std::string data_; std::string data_tmp_; rasters_t rasters_; test_gtiff_data() : drv_(nullptr), drv_name_("GTiff") { drv_ = GDALGetDriverByName(drv_name_.c_str()); // Compose data path for test group data_ = tut::common::data_basedir; data_tmp_ = tut::common::tmp_basedir; // Collection of test GeoTIFF rasters rasters_.push_back(raster_t("byte.tif", 1, 4672)); rasters_.push_back(raster_t("int16.tif", 1, 4672)); rasters_.push_back(raster_t("uint16.tif", 1, 4672)); rasters_.push_back(raster_t("int32.tif", 1, 4672)); rasters_.push_back(raster_t("uint32.tif", 1, 4672)); rasters_.push_back(raster_t("float32.tif", 1, 4672)); rasters_.push_back(raster_t("float64.tif", 1, 4672)); rasters_.push_back(raster_t("cint16.tif", 1, 5028)); rasters_.push_back(raster_t("cint32.tif", 1, 5028)); rasters_.push_back(raster_t("cfloat32.tif", 1, 5028)); rasters_.push_back(raster_t("cfloat64.tif", 1, 5028)); rasters_.push_back(raster_t("utmsmall.tif", 1, 50054)); } }; // Register test group typedef test_group<test_gtiff_data> group; typedef group::object object; group test_gtiff_group("GDAL::GTiff"); // Test driver availability template<> template<> void object::test<1>() { ensure("GDAL::GTiff driver not available", nullptr != drv_); } // Test open dataset template<> template<> void object::test<2>() { rasters_t::const_iterator it; for (it = rasters_.begin(); it != rasters_.end(); ++it) { std::string file(data_ + SEP); file += it->file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALClose(ds); } } // Test dataset checksums template<> template<> void object::test<3>() { rasters_t::const_iterator it; for (it = rasters_.begin(); it != rasters_.end(); ++it) { std::string file(data_ + SEP); file += it->file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, it->band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(ds); const int ysize = GDALGetRasterYSize(ds); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << file << "' not equal"; ensure_equals(os.str().c_str(), it->checksum_, checksum); GDALClose(ds); } } // Test GeoTIFF driver metadata template<> template<> void object::test<4>() { const char* mdItem = GDALGetMetadataItem(drv_, "DMD_MIMETYPE", nullptr); ensure("Can't fetch metadata", nullptr != mdItem); ensure_equals("Invalid MIME type", std::string(mdItem), std::string("image/tiff")); } // Create a simple file by copying from an existing one template<> template<> void object::test<5>() { // Index of test file being copied const std::size_t fileIdx = 10; std::string src(data_ + SEP); src += rasters_.at(fileIdx).file_; GDALDatasetH dsSrc = GDALOpen(src.c_str(), GA_ReadOnly); ensure("Can't open source dataset: " + src, nullptr != dsSrc); std::string dst(data_tmp_ + "\\test_2.tif"); GDALDatasetH dsDst = nullptr; dsDst = GDALCreateCopy(drv_, dst.c_str(), dsSrc, FALSE, nullptr, nullptr, nullptr); ensure("Can't copy dataset", nullptr != dsDst); GDALClose(dsDst); GDALClose(dsSrc); // Re-open copied dataset and test it dsDst = GDALOpen(dst.c_str(), GA_ReadOnly); GDALRasterBandH band = GDALGetRasterBand(dsDst, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(dsDst); const int ysize = GDALGetRasterYSize(dsDst); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << dst << "' not equal"; ensure_equals(os.str().c_str(), rasters_.at(fileIdx).checksum_, checksum); GDALClose(dsDst); GDALDeleteDataset(drv_, dst.c_str()); } // Create a simple file by copying from an existing one using creation options template<> template<> void object::test<6>() { // Index of test file being copied const std::size_t fileIdx = 11; std::string src(data_ + SEP); src += rasters_.at(fileIdx).file_; GDALDatasetH dsSrc = GDALOpen(src.c_str(), GA_ReadOnly); ensure("Can't open source dataset: " + src, nullptr != dsSrc); std::string dst(data_tmp_ + "\\test_3.tif"); char** options = nullptr; options = CSLSetNameValue(options, "TILED", "YES"); options = CSLSetNameValue(options, "BLOCKXSIZE", "32"); options = CSLSetNameValue(options, "BLOCKYSIZE", "32"); GDALDatasetH dsDst = nullptr; dsDst = GDALCreateCopy(drv_, dst.c_str(), dsSrc, FALSE, options, nullptr, nullptr); ensure("Can't copy dataset", nullptr != dsDst); GDALClose(dsDst); CSLDestroy(options); GDALClose(dsSrc); // Re-open copied dataset and test it dsDst = GDALOpen(dst.c_str(), GA_ReadOnly); GDALRasterBandH band = GDALGetRasterBand(dsDst, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(dsDst); const int ysize = GDALGetRasterYSize(dsDst); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << dst << "' not equal"; ensure_equals(os.str().c_str(), rasters_.at(fileIdx).checksum_, checksum); GDALClose(dsDst); GDALDeleteDataset(drv_, dst.c_str()); } // Test raster min/max calculation template<> template<> void object::test<7>() { // Index of test file being copied const std::size_t fileIdx = 10; std::string src(data_ + SEP); src += rasters_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(src.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + src, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); double expect[2] = { 74.0, 255.0 }; double minmax[2] = { 0 }; GDALComputeRasterMinMax(band, TRUE, minmax); ensure_equals("Computed wrong min", expect[0], minmax[0]); ensure_equals("Computed wrong max", expect[1], minmax[1]); GDALClose(ds); } } // namespace tut ����������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testperfcopywords.cpp��������������������������������������������������������0000664�0001750�0001750�00000010422�13701057760�017774� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testperfcopywords.cpp 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ * * Project: GDAL Core * Purpose: Test performance of GDALCopyWords(). * Author: Even Rouault, <even dot rouault at spatialys.com> * ****************************************************************************** * Copyright (c) 2009-2010, Even Rouault <even dot rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal.h" #include "cpl_conv.h" #include <cstdio> #include <cstdlib> #include <ctime> int main(int /* argc */, char* /* argv */ []) { void* in = calloc(1, 256 * 256 * 16); void* out = malloc(256 * 256 * 16); int i; int intype, outtype; clock_t start, end; for(intype=GDT_Byte; intype<=GDT_CFloat64;intype++) { for(outtype=GDT_Byte;outtype<=GDT_CFloat64;outtype++) { start = clock(); for(i=0;i<1000;i++) GDALCopyWords(in, (GDALDataType)intype, 16, out, (GDALDataType)outtype, 16, 256 * 256); end = clock(); printf("%s -> %s : %.2f s\n", GDALGetDataTypeName((GDALDataType)intype), GDALGetDataTypeName((GDALDataType)outtype), (end - start) * 1.0 / CLOCKS_PER_SEC); start = clock(); for(i=0;i<1000;i++) GDALCopyWords(in, (GDALDataType)intype, GDALGetDataTypeSize((GDALDataType)intype) / 8, out, (GDALDataType)outtype, GDALGetDataTypeSize((GDALDataType)outtype) / 8, 256 * 256); end = clock(); printf("%s -> %s (packed) : %.2f s\n", GDALGetDataTypeName((GDALDataType)intype), GDALGetDataTypeName((GDALDataType)outtype), (end - start) * 1.0 / CLOCKS_PER_SEC); } } for(int k=0;k<2;k++) { if( k == 1 ) { printf("Disabling SSSE3\n"); CPLSetConfigOption("GDAL_USE_SSSE3", "NO"); } // 2 byte stride --> packed byte start = clock(); for(i=0;i<100000;i++) GDALCopyWords(in, GDT_Byte, 2, out, GDT_Byte, 1, 256 * 256); end = clock(); printf("2-byte stride Byte ->packed Byte : %.2f\n", (end - start) * 1.0 / CLOCKS_PER_SEC); // 3 byte stride --> packed byte start = clock(); for(i=0;i<100000;i++) GDALCopyWords(in, GDT_Byte, 3, out, GDT_Byte, 1, 256 * 256); end = clock(); printf("3-byte stride Byte ->packed Byte : %.2f\n", (end - start) * 1.0 / CLOCKS_PER_SEC); // 4 byte stride --> packed byte start = clock(); for(i=0;i<100000;i++) GDALCopyWords(in, GDT_Byte, 4, out, GDT_Byte, 1, 256 * 256); end = clock(); printf("4-byte stride Byte ->packed Byte : %.2f\n", (end - start) * 1.0 / CLOCKS_PER_SEC); } CPLSetConfigOption("GDAL_USE_SSSE3", nullptr); return 0; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_include_from_c_file.c���������������������������������������������������0000664�0001750�0001750�00000004123�13701057760�020635� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * Project: GDAL Core * Purpose: Test including all public C headers from a .c file * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2017, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ // PLEASE DO NOT RENAME THIS FILE AS .cpp !!!!! // since the purpose is to check that the public headers can be included from // C #include "cpl_atomic_ops.h" #include "cpl_conv.h" #include "cpl_csv.h" #include "cpl_error.h" #include "cpl_hash_set.h" #include "cpl_list.h" #include "cpl_minixml.h" #include "cpl_port.h" #include "cpl_progress.h" #include "cpl_quad_tree.h" #include "cpl_vsi.h" #include "gdal_alg.h" #include "gdal_version.h" #include "gdal.h" #include "gdal_utils.h" #include "ogr_api.h" #include "ogr_core.h" #include "ogr_srs_api.h" int main() { return 0; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_marching_squares_polygon.cpp��������������������������������������������0000664�0001750�0001750�00000051205�13701057760�022333� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_marching_squares_polygon.cpp 5c2c68af6b930de5249baf9ff9c1159ee805fbd7 2018-08-06 09:41:49 +0200 Hugo Mercier $ * * Project: GDAL algorithms * Purpose: Tests for the marching squares algorithm * Author: Hugo Mercier, <hugo dot mercier at oslandia dot com> * ****************************************************************************** * Copyright (c) 2018, Hugo Mercier, <hugo dot mercier at oslandia dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal_unit_test.h" #include "gdal_alg.h" #include "marching_squares/level_generator.h" #include "marching_squares/polygon_ring_appender.h" #include "marching_squares/segment_merger.h" #include "marching_squares/contour_generator.h" #ifdef DEBUG #include <fstream> #endif namespace marching_squares { class TestPolygonWriter { public: void startPolygon( double level ) { currentPolygon_ = &polygons_[level]; } void endPolygon() { } void addPart( const std::list<marching_squares::Point>& ring ) { PolygonPart part; part.push_back( ring ); currentPolygon_->emplace_back( part ); currentPart_ = ¤tPolygon_->back(); } void addInteriorRing( const std::list<marching_squares::Point>& ring ) { currentPart_->push_back( ring ); } void out( std::ostream& ostr, double level ) const { auto pIt = polygons_.find( level ); if ( pIt == polygons_.end() ) return; for ( const auto& part: pIt->second ) { ostr << "{ "; for ( const auto& ring: part ) { ostr << "{ "; for ( const auto& pt: ring ) { ostr << "(" << pt.x << "," << pt.y << ") "; } ostr << "} "; } ostr << "} "; } } #ifdef DEBUG void toSvg( const std::string& filename ) { std::ofstream ofs( filename ); ofs << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">\n"; ofs << "<defs><marker id=\"arrow\" refX=\"0\" refY=\"0\" orient=\"auto\">\n"; ofs << "<path d=\"M 0,0 L-1.5,-1 L-1.5,1 L0,0\" style=\"fill:#000000;\" />\n"; ofs << "</marker></defs>\n"; const std::string colors[] = {"white", "#bbb", "#888", "#666", "#333", "black"}; int level = 0; for ( auto& p : polygons_ ) { for ( const auto& part : p.second ) { ofs << "<path style=\"fill:" << colors[level] << ";\" d=\""; for ( const auto& ring : part ) { ofs << "M "; for ( const auto& point : ring ) { ofs << point.x*10 << "," << point.y*10 << " "; } } ofs << "\"/>"; } level++; } ofs << "</svg>"; } #endif private: typedef std::vector<LineString> PolygonPart; typedef std::vector<PolygonPart> Polygon; Polygon* currentPolygon_ = nullptr; PolygonPart* currentPart_ = nullptr; public: std::map<double, Polygon> polygons_; }; static bool equal_linestrings( const LineString& ls1, const LineString& ls2 ) { if ( ls1.size() != ls2.size() ) return false; auto it1 = ls1.begin(); auto it2 = ls2.begin(); for ( ; it1 != ls1.end(); it1++, it2++ ) { if ( !(*it1 == *it2) ) return false; } return true; } } namespace tut { using namespace marching_squares; // Common fixture with test data struct test_ms_polygon_data { }; // Register test group typedef test_group<test_ms_polygon_data> group; typedef group::object object; group test_ms_polygon_group("MarchingSquares:Polygon"); // Dummy test template<> template<> void object::test<1>() { // one pixel std::vector<double> data = { 2.0 }; TestPolygonWriter w; { PolygonRingAppender<TestPolygonWriter> appender( w ); IntervalLevelRangeIterator levels( 0.0, 10.0 ); SegmentMerger<PolygonRingAppender<TestPolygonWriter>, IntervalLevelRangeIterator> writer( appender, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 1, 1, false, NaN, writer, levels); cg.feedLine( &data[0] ); } { std::ostringstream ostr; w.out( ostr, 10.0 ); ensure_equals( "Polygon #0", ostr.str(), "{ { (0.5,1) (1,1) (1,0.5) (1,0) (0.5,0) (0,0) (0,0.5) (0,1) (0.5,1) } } " ); } } template<> template<> void object::test<2>() { // four pixels // two rings // 5 10 // 10 5 // levels = 0, 10 // // legend: // : contour // # border (level 0) // = border (level 10) // // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 5 5| 7.5 10| 10 | // | +#########+########+########o+========++ | // | # | | : || | // | # | | : || | // | # | | : || | // +--------+---------+--------+---------o........o+--------+ // |NaN 5 # 5| 10| 10# NaN| // | # | | # | // | # | | # | // | 7.5++---------+ 7.5 7.5+--------+ | // | # | | # | // | # | | # | // | # | 7.5 | # | // +-------++.........o--------+---------+--------+---------+ // |NaN 10|| 10: | 5| 5 # NaN| // | || : | | # | // | || : | | # | // | ++=========o########+#########+########+ | // | 10 10| 7.5 5| 5 | // | (0,2) | (1,2) | (2,2) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 5.0, 10.0, 10.0, 5.0 }; TestPolygonWriter w; { PolygonRingAppender<TestPolygonWriter> appender( w ); IntervalLevelRangeIterator levels( 0.0, 10.0 ); SegmentMerger<PolygonRingAppender<TestPolygonWriter>, IntervalLevelRangeIterator> writer( appender, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 2, 2, false, NaN, writer, levels); cg.feedLine( &data[0] ); cg.feedLine( &data[2] ); } { std::ostringstream ostr; w.out( ostr, 10.0 ); ensure_equals( "Polygon #1", ostr.str(), "{ { (1.5,2) (2,2) (2,1.5) (2,1) (2,0.5) (1.5,0.5) (1.5,0.5) (1.5,0) (1,0) (0.5,0) (0,0) (0,0.5) (0,1) (0,1.5) (0.5,1.5) (0.5,1.5) (0.5,2) (1,2) (1.5,2) } } "); } { std::ostringstream ostr; w.out( ostr, 20.0 ); ensure_equals( "Polygon #2", ostr.str(), "{ { (2,0.5) (2,0.5) (2,0) (1.5,0) (1.5,0) (1.5,0.5) (1.5,0.5) (2,0.5) } } { { (0.5,1.5) (0.5,1.5) (0,1.5) (0,1.5) (0,2) (0.5,2) (0.5,2) (0.5,1.5) } } "); } } template<> template<> void object::test<3>() { // four pixels // 155 155.01 // 154.99 155 // levels = 155 // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 155 | 155.005 | 155.01 | // | +---------+--------+---------+---------+ | // | | 155 | 155.01 | | // | | | | | | | // | | | 155.005 | | | // +--------+---------+--------+---------+---------+--------+ // |NaN 155 155 155.01 155.01 NaN| // | | | | | | // | 154.995 | | 155.005 | // | +-------154.995 155.005------+ | // | | | | | | // | | | | | | // | | | | | | // +--------+---------+--------+---------+---------+--------+ // |NaN 154.99 154.99 154.995 155 155 NaN| // | | | | | | | // | | | | | | | // | +---------+--------+---------+---------+ | // | 154.99 154.99 154.995 155 155 | // | (0,2) | (1,2) | (2,2) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 155.0, 155.01, 154.99, 155.0 }; TestPolygonWriter w; { PolygonRingAppender<TestPolygonWriter> appender( w ); const double levels[] = { 155.0 }; FixedLevelRangeIterator levelGenerator( levels, 1 ); SegmentMerger<PolygonRingAppender<TestPolygonWriter>, FixedLevelRangeIterator> writer( appender, levelGenerator, /* polygonize */ true ); ContourGenerator<decltype(writer), FixedLevelRangeIterator> cg( 2, 2, false, NaN, writer, levelGenerator); cg.feedLine( &data[0] ); cg.feedLine( &data[2] ); } { std::ostringstream ostr; w.out( ostr, 155.0 ); ensure_equals( "Polygon #0", ostr.str(), "{ { (1.4999,2) (1.4999,1.5) (0.5,0.5001) (0,0.5001) (0,1) (0,1.5) (0,2) (0.5,2) (1,2) (1.4999,2) } } " ); } { std::ostringstream ostr; w.out( ostr, Inf ); ensure_equals( "Polygon #1", ostr.str(), "{ { (1.5,2) (2,2) (2,1.5) (2,1) (2,0.5) (2,0) (1.5,0) (1,0) (0.5,0) (0,0) (0,0.5) (0,0.5001) (0.5,0.5001) (1.4999,1.5) (1.4999,2) (1.5,2) } } " ); } } template<> template<> void object::test<4>() { // nine pixels // two nested rings // levels = 1, 11, 21 // pixels // +-----+-----+-----+-----+-----+ // | | | | | | // | NaN | NaN | NaN | NaN | NaN | // | | | | | | // +-----+-----+-----+-----+-----+ // | | | | | | // | NaN | 0 | 4 | 0 | NaN | // | | | | | | // +-----+-----+-----+-----+-----+ // | | | | | | // | NaN | 4 | 12 | 4 | NaN | // | | | | | | // +-----+-----+-----+-----+-----+ // | | | | | | // | NaN | 0 | 4 | 0 | NaN | // | | | | | | // +-----+-----+-----+-----+-----+ // | | | | | | // | NaN | NaN | NaN | NaN | NaN | // | | | | | | // +-----+-----+-----+-----+-----+ // // NaN NaN NaN NaN NaN // +------------------+------------------+------------------+------------------+ // | | | | | // | (0,0) | (1,0) | (2,0) | | // | 0 0| 2 4| 2 0| 0 | // | +---------+---o----+---------+---------+----o---+---------+ | // | | | : | | | : | | | // | | | : | | | : | | | // | | | : | | | : | | | // +--------+---------+---o----+---------+---------+----o---+---------+--------+ NaN // |NaN 0| 0| _/ 2 4| 2 \_0| |0 | // | o.........o/ | \o.........o | // | | | | | | | // | 2+---------+ 2 | 2+---------+2 | // | | | | | | | // | | | _o_ | | | // | | | / | \ | | | // +--------+---------+---------------o--+--o---------------+---------+--------+ NaN // |NaN 4| 4| \12 / 4| |4 | // | | | -o- | | | // | | | | | | | // | 2+---------+ 2 | 2+---------+2 | // | | | | | | | // | o.........o_ | _o.........o | // | | | \_ 2 | 2 _/ | | | // +--------+---------+---o----+---------+--------+----o/---+---------+--------+ NaN // |NaN 0| 0| : | 4| | : 0| |0 | // | | | : | | | : | | | // | | | : | | | : | | | // | +---------+---o----+---------+--------+----o----+---------+ | // | 0 0| 2 4| 2 0| 0 | // | (0,3) | (1,3) | (2,3) | | // | | | | | // +------------------+------------------+------------------+------------------+ // NaN NaN NaN NaN NaN std::vector<double> data = { 0.0, 4.0, 0.0, 4.0, 12.0, 4.0, 0.0, 4.0, 0.0 }; TestPolygonWriter w; { PolygonRingAppender<TestPolygonWriter> appender( w ); IntervalLevelRangeIterator levels( 1.0, 10.0 ); SegmentMerger<PolygonRingAppender<TestPolygonWriter>, IntervalLevelRangeIterator> writer( appender, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 3, 3, false, NaN, writer, levels); cg.feedLine( &data[0] ); cg.feedLine( &data[3] ); cg.feedLine( &data[6] ); } { std::ostringstream ostr; w.out( ostr, 1.0 ); ensure_equals( "Polygon #0", ostr.str(), "{ { (0.5,0.75) (0.75,0.5) (0.75,0) (0.5,0) (0,0) (0,0.5) (0,0.75) (0.5,0.75) } } { { (2.5,0.75) (3,0.75) (3,0.5) (3,0) (2.5,0) (2.25,0) (2.25,0.5) (2.5,0.75) } } { { (0.75,3) (0.75,2.5) (0.5,2.25) (0,2.25) (0,2.5) (0,3) (0.5,3) (0.75,3) } } { { (2.5,3) (3,3) (3,2.5) (3,2.25) (2.5,2.25) (2.25,2.5) (2.25,3) (2.5,3) } } " ); } { std::ostringstream ostr; w.out( ostr, 11.0 ); ensure_equals( "Polygon #1", ostr.str(), "{ { (2.25,2.5) (2.5,2.25) (3,2.25) (3,2) (3,1.5) (3,1) (3,0.75) (2.5,0.75) (2.25,0.5) (2.25,0) (2,0) (1.5,0) (1,0) (0.75,0) (0.75,0.5) (0.5,0.75) (0,0.75) (0,1) (0,1.5) (0,2) (0,2.25) (0.5,2.25) (0.75,2.5) (0.75,3) (1,3) (1.5,3) (2,3) (2.25,3) (2.25,2.5) } { (1.625,1.5) (1.5,1.625) (1.375,1.5) (1.5,1.375) (1.625,1.5) } } " ); } { std::ostringstream ostr; w.out( ostr, 21.0 ); ensure_equals( "Polygon #2", ostr.str(), "{ { (1.625,1.5) (1.5,1.625) (1.375,1.5) (1.5,1.375) (1.625,1.5) } } " ); } } template<> template<> void object::test<5>() { // Three nested rings std::vector<double> data = { 2, 2, 2, 2, 2, 2, 4, 4, 4, 2, 2, 4, 6, 4, 2, 2, 4, 4, 4, 2, 2, 2, 2, 2, 2 }; TestPolygonWriter w; { PolygonRingAppender<TestPolygonWriter> appender( w ); IntervalLevelRangeIterator levels( 1.0, 2.0 ); SegmentMerger<PolygonRingAppender<TestPolygonWriter>, IntervalLevelRangeIterator> writer( appender, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 5, 5, false, NaN, writer, levels); for ( int i = 0; i < 5; i++ ) { cg.feedLine( &data[5*i] ); } } { std::ostringstream ostr; w.out( ostr, 1.0 ); ensure_equals( "Polygon #0", ostr.str(), "" ); } { std::ostringstream ostr; w.out( ostr, 3.0 ); ensure_equals( "Polygon #1", ostr.str(), "{ { (4.5,5) (5,5) (5,4.5) (5,4) (5,3.5) (5,3) (5,2.5) (5,2) (5,1.5) (5,1) (5,0.5) (5,0) (4.5,0) (4,0) (3.5,0) (3,0) (2.5,0) (2,0) (1.5,0) (1,0) (0.5,0) (0,0) (0,0.5) (0,1) (0,1.5) (0,2) (0,2.5) (0,3) (0,3.5) (0,4) (0,4.5) (0,5) (0.5,5) (1,5) (1.5,5) (2,5) (2.5,5) (3,5) (3.5,5) (4,5) (4.5,5) } { (4,3.5) (3.5,4) (2.5,4) (1.5,4) (1,3.5) (1,2.5) (1,1.5) (1.5,1) (2.5,1) (3.5,1) (4,1.5) (4,2.5) (4,3.5) } } " ); } { std::ostringstream ostr; w.out( ostr, 5.0 ); ensure_equals( "Polygon #2", ostr.str(), "{ { (4,3.5) (3.5,4) (2.5,4) (1.5,4) (1,3.5) (1,2.5) (1,1.5) (1.5,1) (2.5,1) (3.5,1) (4,1.5) (4,2.5) (4,3.5) } { (3,2.5) (2.5,3) (2,2.5) (2.5,2) (3,2.5) } } " ); } { std::ostringstream ostr; w.out( ostr, 7.0 ); ensure_equals( "Polygon #3", ostr.str(), "{ { (3,2.5) (2.5,3) (2,2.5) (2.5,2) (3,2.5) } } " ); } ensure( "Inner ring of polygon #1 = exterioring ring of polygon #2", equal_linestrings( w.polygons_[3.0][0][1], w.polygons_[5.0][0][0] ) ); ensure( "Inner ring of polygon #2 = exterioring ring of polygon #3", equal_linestrings( w.polygons_[5.0][0][1], w.polygons_[7.0][0][0] ) ); } } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testvirtualmem.cpp�����������������������������������������������������������0000664�0001750�0001750�00000023033�13701057760�017255� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testvirtualmem.cpp fea98cfa8bed15686abed8256ef1566f68e1568d 2017-12-28 17:57:32Z Even Rouault $ * * Project: GDAL algorithms * Purpose: Test Delaunay triangulation * Author: Even Rouault, even.rouault at spatialys.com * ****************************************************************************** * Copyright (c) 2014, Even Rouault <even.rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cpl_multiproc.h" #include "cpl_string.h" #include "cpl_virtualmem.h" #include "gdal_alg.h" #include "gdal.h" #include <cassert> #ifdef notdef static void test_huge_mapping_cbk(CPLVirtualMem* ctxt, size_t nOffset, void* pPageToFill, size_t nPageSize, void* pUserData) { /*fprintfstderr("requesting page %lu (nPageSize=%d), nLRUSize=%d\n", (unsigned long)(nOffset / nPageSize), (int)nPageSize, ctxt->nLRUSize);*/ memset(pPageToFill, 0x7F, nPageSize); } static void test_huge_mapping() { CPLVirtualMem* ctxt; char* addr; int i; ctxt = CPLVirtualMemNew((size_t)10000*1024*1024, (size_t)2000*1024*1024, 0, TRUE, VIRTUALMEM_READONLY, test_huge_mapping_cbk, NULL, NULL, NULL); assert(ctxt); addr = (char*) CPLVirtualMemGetAddr(ctxt); for(i=0;i<50*1000;i++) { unsigned int seedp; size_t idx = (size_t)rand_r(&seedp)*3000*1024 / RAND_MAX * 1024; char val = addr[idx]; /*printf("i=%d, val[%ld] = %d\n", i, (long int)idx, val);*/ assert(val == 0x7F); } CPLVirtualMemFree(ctxt); } #endif #include "test_data.h" static void test_two_pages_cbk(CPLVirtualMem* /* ctxt */, size_t nOffset, void* pPageToFill, size_t nPageSize, void* /* pUserData */) { /*fprintfstderr("requesting page %lu (nPageSize=%d), nLRUSize=%d\n", (unsigned long)(nOffset / nPageSize), (int)nPageSize, ctxt->nLRUSize);*/ memset(pPageToFill, (nOffset == 0) ? 0x3F : (nOffset == 4096) ? 0x5F : 0x7F, nPageSize); } #define MINIMUM_PAGE_SIZE 4096 static void test_two_pages_thread(void* p) { CPLVirtualMem* ctxt = (CPLVirtualMem*)p; char* addr = (char*) CPLVirtualMemGetAddr(ctxt); int i; CPLVirtualMemDeclareThread(ctxt); /*fprintfstderr("aux thread is %X\n", pthread_self());*/ for(i=0;i<50*1000;i++) { char val = addr[MINIMUM_PAGE_SIZE * (i % 3) + MINIMUM_PAGE_SIZE/2 - 1]; /*fprintfstderr("T2: val[%d] = %d\n", MINIMUM_PAGE_SIZE * (i % 2) + MINIMUM_PAGE_SIZE/2 - 1, val);*/ assert(val == (((i % 3) == 0) ? 0x3F : ((i % 3) == 1) ? 0x5F : 0x7F)); } CPLVirtualMemUnDeclareThread(ctxt); } static int test_two_pages() { CPLVirtualMem* ctxt; volatile char* addr; CPLJoinableThread* hThread; printf("test_two_pages()\n"); ctxt = CPLVirtualMemNew(3*MINIMUM_PAGE_SIZE, MINIMUM_PAGE_SIZE, MINIMUM_PAGE_SIZE, FALSE, VIRTUALMEM_READONLY, test_two_pages_cbk, nullptr, nullptr, nullptr); if( ctxt == nullptr ) return FALSE; addr = (char*) CPLVirtualMemGetAddr(ctxt); assert(CPLVirtualMemGetPageSize(ctxt) == MINIMUM_PAGE_SIZE); assert(CPLVirtualMemIsAccessThreadSafe(ctxt)); /*fprintfstderr("main thread is %X, addr=%p\n", pthread_self(), addr);*/ hThread = CPLCreateJoinableThread(test_two_pages_thread, ctxt); CPLVirtualMemDeclareThread(ctxt); { int i=0; for(i=0;i<50*1000;i++) { char val = addr[MINIMUM_PAGE_SIZE * (i % 3)]; /*fprintfstderr("T1: val[%d] = %d\n", MINIMUM_PAGE_SIZE * (i % 2), val);*/ assert(val == (((i % 3) == 0) ? 0x3F : ((i % 3) == 1) ? 0x5F : 0x7F)); } } CPLVirtualMemUnDeclareThread(ctxt); CPLJoinThread(hThread); CPLVirtualMemFree(ctxt); return TRUE; } static void test_raw_auto(const char* pszFormat, int bFileMapping) { printf("test_raw_auto(format=%s, bFileMapping=%d)\n", pszFormat, bFileMapping); GDALAllRegister(); CPLString osTmpFile; if( bFileMapping ) osTmpFile = CPLResetExtension(CPLGenerateTempFilename(pszFormat), "img"); else osTmpFile = "/vsimem/tmp.img"; GDALDatasetH hDS = GDALCreate(GDALGetDriverByName(pszFormat), osTmpFile.c_str(), 400, 300, 2, GDT_Byte, nullptr ); assert(hDS); int nPixelSpace1; GIntBig nLineSpace1; int nPixelSpace2; GIntBig nLineSpace2; if( !bFileMapping ) { char** papszOptions = CSLSetNameValue(nullptr, "USE_DEFAULT_IMPLEMENTATION", "NO" ); assert( GDALGetVirtualMemAuto(GDALGetRasterBand(hDS, 1), GF_Write, &nPixelSpace1, &nLineSpace1, papszOptions) == nullptr ); CSLDestroy(papszOptions); } CPLVirtualMem* pVMem1 = GDALGetVirtualMemAuto(GDALGetRasterBand(hDS, 1), GF_Write, &nPixelSpace1, &nLineSpace1, nullptr); char** papszOptions = CSLSetNameValue(nullptr, "USE_DEFAULT_IMPLEMENTATION", (bFileMapping) ? "NO" : "YES"); CPLVirtualMem* pVMem2 = GDALGetVirtualMemAuto(GDALGetRasterBand(hDS, 2), GF_Write, &nPixelSpace2, &nLineSpace2, papszOptions); CSLDestroy(papszOptions); assert(pVMem1 != nullptr); assert(pVMem2 != nullptr); assert(CPLVirtualMemIsFileMapping(pVMem1) == bFileMapping); assert(nPixelSpace1 == ((EQUAL(pszFormat, "GTIFF") && bFileMapping) ? 2 : 1)); if( bFileMapping ) assert(nLineSpace1 == 400 * 2); else assert(nLineSpace1 == 400 * nPixelSpace1); GByte* pBase1 = (GByte*) CPLVirtualMemGetAddr(pVMem1); GByte* pBase2 = (GByte*) CPLVirtualMemGetAddr(pVMem2); for(int j=0;j<300;j++) { for(int i=0;i<400;i++) { pBase1[j * nLineSpace1 + i * nPixelSpace1] = 127; pBase2[j * nLineSpace2 + i * nPixelSpace2] = 255; } } CPLVirtualMemFree(pVMem1); CPLVirtualMemFree(pVMem2); GDALClose(hDS); hDS = GDALOpen(osTmpFile.c_str(), GA_ReadOnly); assert(GDALChecksumImage(GDALGetRasterBand(hDS, 1), 0, 0, 400, 300) == 52906); assert(GDALChecksumImage(GDALGetRasterBand(hDS, 2), 0, 0, 400, 300) == 30926); GDALClose(hDS); GDALDeleteDataset(nullptr, osTmpFile.c_str()); } int main(int /* argc */, char* /* argv */[]) { /*printf("test_huge_mapping\n"); test_huge_mapping();*/ printf("Physical memory : " CPL_FRMT_GIB " bytes\n", CPLGetPhysicalRAM()); if( CPLIsVirtualMemFileMapAvailable() ) { printf("Testing CPLVirtualMemFileMapNew()\n"); VSILFILE* fp = VSIFOpenL(GCORE_DATA_DIR "byte.tif", "rb"); assert(fp); VSIFSeekL(fp, 0, SEEK_END); size_t nSize = (size_t)VSIFTellL(fp); VSIFSeekL(fp, 0, SEEK_SET); void* pRefBuf = CPLMalloc(nSize); VSIFReadL(pRefBuf, 1, nSize, fp); CPLVirtualMem * psMem = CPLVirtualMemFileMapNew( fp, 0, nSize, VIRTUALMEM_READONLY, nullptr, nullptr ); assert(psMem); void* pMemBuf = CPLVirtualMemGetAddr(psMem); assert(memcmp(pRefBuf, pMemBuf, nSize) == 0); CPLFree(pRefBuf); CPLVirtualMemFree(psMem); VSIFCloseL(fp); } if( !test_two_pages() ) return 0; test_raw_auto("EHDR", TRUE); test_raw_auto("EHDR", FALSE); test_raw_auto("GTIFF", TRUE); test_raw_auto("GTIFF", FALSE); CPLVirtualMemManagerTerminate(); GDALDestroyDriverManager(); return 0; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testblockcache.cpp�����������������������������������������������������������0000664�0001750�0001750�00000045750�13701057760�017160� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testblockcache.cpp 7e07230bbff24eb333608de4dbd460b7312839d0 2017-12-11 19:08:47Z Even Rouault $ * * Project: GDAL Core * Purpose: Test block cache under multi-threading * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2015, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #ifndef DEBUG #define DEBUG #endif #include "cpl_multiproc.h" #include "gdal_priv.h" #include <cassert> #include <cstdlib> #include <vector> CPLLock* psLock = nullptr; static void Usage() { printf("Usage: testblockcache [-threads X] [-loops X] [-max_requests X] [-strategy random|line|block]\n"); printf(" [-migrate] [ filename |\n"); printf(" [[-xsize val] [-ysize val] [-bands val] [-co key=value]*\n"); printf(" [[-memdriver] | [-ondisk]] [-check]] ]\n"); exit(1); } int nLoops = 1; const char* pszDataset = nullptr; int bCheck = FALSE; typedef enum { STRATEGY_RANDOM, STRATEGY_LINE, STRATEGY_BLOCK, } Strategy; typedef struct _Request Request; struct _Request { int nXOff, nYOff, nXWin, nYWin; int nBands; Request* psNext; }; typedef struct _Resource Resource; struct _Resource { GDALDataset* poDS; void* pBuffer; Resource* psNext; Resource* psPrev; }; typedef struct { GDALDataset* poDS; Request* psRequestList; int nBufferSize; } ThreadDescription; static Request* psGlobalRequestList = nullptr; static Resource* psGlobalResourceList = nullptr; static Resource* psGlobalResourceLast = nullptr; /* according to rand() man page, POSIX.1-2001 proposes the following implementation */ /* RAND_MAX assumed to be 32767 */ #define MYRAND_MAX 32767 static int myrand_r(unsigned long* pseed) { *pseed = *pseed * 1103515245 + 12345; return((unsigned)((*pseed/65536UL) % (MYRAND_MAX+1))); } static void Check(GByte* pBuffer, int nXSize, int nYSize, int nBands, int nXOff, int nYOff, int nXWin, int nYWin) { for(int iBand=0;iBand<nBands;iBand++) { for(int iY=0;iY<nYWin;iY++) { for(int iX=0;iX<nXWin;iX++) { unsigned long seed = iBand * nXSize * nYSize + (iY + nYOff) * nXSize + iX + nXOff; GByte expected = (GByte)(myrand_r(&seed) & 0xff); assert( pBuffer[iBand * nXWin * nYWin + iY * nXWin + iX] == expected ); (void)expected; } } } } static void ReadRaster(GDALDataset* poDS, int nXSize, int nYSize, int nBands, GByte* pBuffer, int nXOff, int nYOff, int nXWin, int nYWin) { CPL_IGNORE_RET_VAL(poDS->RasterIO(GF_Read, nXOff, nYOff, nXWin, nYWin, pBuffer, nXWin, nYWin, GDT_Byte, nBands, nullptr, 0, 0, 0 #ifdef GDAL_COMPILATION , nullptr #endif )); if( bCheck ) { Check(pBuffer, nXSize, nYSize, nBands, nXOff, nYOff, nXWin, nYWin); } } static void AddRequest(Request*& psRequestList, Request*& psRequestLast, int nXOff, int nYOff, int nXWin, int nYWin, int nBands) { Request* psRequest = (Request*)CPLMalloc(sizeof(Request)); psRequest->nXOff = nXOff; psRequest->nYOff = nYOff; psRequest->nXWin = nXWin; psRequest->nYWin = nYWin; psRequest->nBands = nBands; if( psRequestLast ) psRequestLast->psNext = psRequest; else psRequestList = psRequest; psRequestLast = psRequest; psRequest->psNext = nullptr; } static Request* GetNextRequest(Request*& psRequestList) { if( psLock ) CPLAcquireLock(psLock); Request* psRet = psRequestList; if( psRequestList ) { psRequestList = psRequestList->psNext; psRet->psNext = nullptr; } if( psLock ) CPLReleaseLock(psLock); return psRet; } static Resource* AcquireFirstResource() { if( psLock ) CPLAcquireLock(psLock); Resource* psRet = psGlobalResourceList; psGlobalResourceList = psGlobalResourceList->psNext; if( psGlobalResourceList ) psGlobalResourceList->psPrev = nullptr; else psGlobalResourceLast = nullptr; psRet->psNext = nullptr; assert(psRet->psPrev == nullptr); if( psLock ) CPLReleaseLock(psLock); return psRet; } static void PutResourceAtEnd(Resource* psResource) { if( psLock ) CPLAcquireLock(psLock); psResource->psPrev = psGlobalResourceLast; psResource->psNext = nullptr; if( psGlobalResourceList == nullptr ) psGlobalResourceList = psResource; else psGlobalResourceLast->psNext = psResource; psGlobalResourceLast = psResource; if( psLock ) CPLReleaseLock(psLock); } static void ThreadFuncDedicatedDataset(void* _psThreadDescription) { ThreadDescription* psThreadDescription = (ThreadDescription*)_psThreadDescription; int nXSize = psThreadDescription->poDS->GetRasterXSize(); int nYSize = psThreadDescription->poDS->GetRasterYSize(); void* pBuffer = CPLMalloc(psThreadDescription->nBufferSize); while( psThreadDescription->psRequestList != nullptr ) { Request* psRequest = GetNextRequest(psThreadDescription->psRequestList); ReadRaster(psThreadDescription->poDS, nXSize, nYSize, psRequest->nBands, (GByte*)pBuffer, psRequest->nXOff, psRequest->nYOff, psRequest->nXWin, psRequest->nYWin); CPLFree(psRequest); } CPLFree(pBuffer); } static void ThreadFuncWithMigration(void* /* _unused */) { Request* psRequest; while( (psRequest = GetNextRequest(psGlobalRequestList)) != nullptr ) { Resource* psResource = AcquireFirstResource(); assert(psResource); int nXSize = psResource->poDS->GetRasterXSize(); int nYSize = psResource->poDS->GetRasterYSize(); ReadRaster(psResource->poDS, nXSize, nYSize, psRequest->nBands, (GByte*)psResource->pBuffer, psRequest->nXOff, psRequest->nYOff, psRequest->nXWin, psRequest->nYWin); CPLFree(psRequest); PutResourceAtEnd(psResource); } } static int CreateRandomStrategyRequests(GDALDataset* poDS, int nMaxRequests, Request*& psRequestList, Request*& psRequestLast) { unsigned long seed = 1; int nXSize = poDS->GetRasterXSize(); int nYSize = poDS->GetRasterYSize(); int nMaxXWin = MIN(1000, nXSize/10+1); int nMaxYWin = MIN(1000, nYSize/10+1); int nQueriedBands = MIN(4, poDS->GetRasterCount()); int nAverageIterationsToReadWholeFile = ((nXSize + nMaxXWin/2-1) / (nMaxXWin/2)) * ((nYSize + nMaxYWin/2-1) / (nMaxYWin/2)); int nLocalLoops = nLoops * nAverageIterationsToReadWholeFile; for(int iLoop=0;iLoop<nLocalLoops;iLoop++) { if( nMaxRequests > 0 && iLoop == nMaxRequests ) break; int nXOff = (int)((GIntBig)myrand_r(&seed) * (nXSize-1) / MYRAND_MAX); int nYOff = (int)((GIntBig)myrand_r(&seed) * (nYSize-1) / MYRAND_MAX); int nXWin = 1+(int)((GIntBig)myrand_r(&seed) * nMaxXWin / MYRAND_MAX); int nYWin = 1+(int)((GIntBig)myrand_r(&seed) * nMaxYWin / MYRAND_MAX); if( nXOff + nXWin > nXSize ) nXWin = nXSize - nXOff; if( nYOff + nYWin > nYSize ) nYWin = nYSize - nYOff; AddRequest(psRequestList, psRequestLast, nXOff, nYOff, nXWin, nYWin, nQueriedBands); } return nQueriedBands * nMaxXWin * nMaxYWin; } static int CreateLineStrategyRequests(GDALDataset* poDS, int nMaxRequests, Request*& psRequestList, Request*& psRequestLast) { int nXSize = poDS->GetRasterXSize(); int nYSize = poDS->GetRasterYSize(); int nQueriedBands = MIN(4, poDS->GetRasterCount()); int bStop = FALSE; int nRequests = 0; for(int iLoop=0;!bStop && iLoop<nLoops;iLoop++) { for(int nYOff=0;nYOff<nYSize;nYOff++) { if( nMaxRequests > 0 && nRequests == nMaxRequests ) { bStop = TRUE; break; } AddRequest(psRequestList, psRequestLast, 0, nYOff, nXSize, 1, nQueriedBands); nRequests ++; } } return nQueriedBands * nXSize; } static int CreateBlockStrategyRequests(GDALDataset* poDS, int nMaxRequests, Request*& psRequestList, Request*& psRequestLast) { int nXSize = poDS->GetRasterXSize(); int nYSize = poDS->GetRasterYSize(); int nMaxXWin = MIN(1000, nXSize/10+1); int nMaxYWin = MIN(1000, nYSize/10+1); int nQueriedBands = MIN(4, poDS->GetRasterCount()); int bStop = FALSE; int nRequests = 0; for(int iLoop=0;!bStop && iLoop<nLoops;iLoop++) { for(int nYOff=0;!bStop && nYOff<nYSize;nYOff+=nMaxYWin) { int nReqYSize = (nYOff + nMaxYWin > nYSize) ? nYSize - nYOff : nMaxYWin; for(int nXOff=0;nXOff<nXSize;nXOff+=nMaxXWin) { if( nMaxRequests > 0 && nRequests == nMaxRequests ) { bStop = TRUE; break; } int nReqXSize = (nXOff + nMaxXWin > nXSize) ? nXSize - nXOff : nMaxXWin; AddRequest(psRequestList, psRequestLast, nXOff, nYOff, nReqXSize, nReqYSize, nQueriedBands); nRequests ++; } } } return nQueriedBands * nMaxXWin * nMaxYWin; } int main(int argc, char* argv[]) { int i; int nThreads = CPLGetNumCPUs(); std::vector<CPLJoinableThread*> apsThreads; Strategy eStrategy = STRATEGY_RANDOM; int bNewDatasetOption = FALSE; int nXSize = 5000; int nYSize = 5000; int nBands = 4; char** papszOptions = nullptr; int bOnDisk = FALSE; std::vector<ThreadDescription> asThreadDescription; int bMemDriver = FALSE; GDALDataset* poMEMDS = nullptr; int bMigrate = FALSE; int nMaxRequests = -1; argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 ); GDALAllRegister(); for(i = 1; i < argc; i++) { if( EQUAL(argv[i], "-threads") && i + 1 < argc) { i ++; nThreads = atoi(argv[i]); } else if( EQUAL(argv[i], "-loops") && i + 1 < argc) { i ++; nLoops = atoi(argv[i]); if( nLoops <= 0 ) nLoops = INT_MAX; } else if( EQUAL(argv[i], "-max_requests") && i + 1 < argc) { i ++; nMaxRequests = atoi(argv[i]); } else if( EQUAL(argv[i], "-strategy") && i + 1 < argc) { i ++; if( EQUAL(argv[i], "random") ) eStrategy = STRATEGY_RANDOM; else if( EQUAL(argv[i], "line") ) eStrategy = STRATEGY_LINE; else if( EQUAL(argv[i], "block") ) eStrategy = STRATEGY_BLOCK; else Usage(); } else if( EQUAL(argv[i], "-xsize") && i + 1 < argc) { i ++; nXSize = atoi(argv[i]); bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-ysize") && i + 1 < argc) { i ++; nYSize = atoi(argv[i]); bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-bands") && i + 1 < argc) { i ++; nBands = atoi(argv[i]); bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-co") && i + 1 < argc) { i ++; papszOptions = CSLAddString(papszOptions, argv[i]); bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-ondisk")) { bOnDisk = TRUE; bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-check")) { bCheck = TRUE; bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-memdriver")) { bMemDriver = TRUE; bNewDatasetOption = TRUE; } else if( EQUAL(argv[i], "-migrate")) bMigrate = TRUE; else if( argv[i][0] == '-' ) Usage(); else if( pszDataset == nullptr ) pszDataset = argv[i]; else { Usage(); } } if( pszDataset != nullptr && bNewDatasetOption ) Usage(); CPLDebug("TEST", "Using %d threads", nThreads); int bCreatedDataset = FALSE; if( pszDataset == nullptr ) { bCreatedDataset = TRUE; if( bOnDisk ) pszDataset = "/tmp/tmp.tif"; else pszDataset = "/vsimem/tmp.tif"; GDALDataset* poDS = ((GDALDriver*)GDALGetDriverByName((bMemDriver) ? "MEM" : "GTiff"))->Create(pszDataset, nXSize, nYSize, nBands, GDT_Byte, papszOptions); if( bCheck ) { GByte* pabyLine = (GByte*) VSIMalloc(nBands * nXSize); for(int iY=0;iY<nYSize;iY++) { for(int iX=0;iX<nXSize;iX++) { for(int iBand=0;iBand<nBands;iBand++) { unsigned long seed = iBand * nXSize * nYSize + iY * nXSize + iX; pabyLine[iBand * nXSize + iX] = (GByte)(myrand_r(&seed) & 0xff); } } CPL_IGNORE_RET_VAL(poDS->RasterIO(GF_Write, 0, iY, nXSize, 1, pabyLine, nXSize, 1, GDT_Byte, nBands, nullptr, 0, 0, 0 #ifdef GDAL_COMPILATION , nullptr #endif )); } VSIFree(pabyLine); } if( bMemDriver ) poMEMDS = poDS; else GDALClose(poDS); } else { bCheck = FALSE; } CSLDestroy(papszOptions); papszOptions = nullptr; Request* psGlobalRequestLast = nullptr; for(i = 0; i < nThreads; i++ ) { GDALDataset* poDS; // Since GDAL 2.0, the MEM driver is thread-safe, i.e. does not use the block // cache, but only for operations not involving resampling, which is // the case here if( poMEMDS ) poDS = poMEMDS; else { poDS = (GDALDataset*)GDALOpen(pszDataset, GA_ReadOnly); if( poDS == nullptr ) exit(1); } if( bMigrate ) { Resource* psResource = (Resource*)CPLMalloc(sizeof(Resource)); psResource->poDS = poDS; int nBufferSize; if( eStrategy == STRATEGY_RANDOM ) nBufferSize = CreateRandomStrategyRequests( poDS, nMaxRequests, psGlobalRequestList, psGlobalRequestLast); else if( eStrategy == STRATEGY_LINE ) nBufferSize = CreateLineStrategyRequests( poDS, nMaxRequests, psGlobalRequestList, psGlobalRequestLast); else nBufferSize = CreateBlockStrategyRequests( poDS, nMaxRequests, psGlobalRequestList, psGlobalRequestLast); psResource->pBuffer = CPLMalloc(nBufferSize); PutResourceAtEnd(psResource); } else { ThreadDescription sThreadDescription; sThreadDescription.poDS = poDS; sThreadDescription.psRequestList = nullptr; Request* psRequestLast = nullptr; if( eStrategy == STRATEGY_RANDOM ) sThreadDescription.nBufferSize = CreateRandomStrategyRequests( poDS, nMaxRequests, sThreadDescription.psRequestList, psRequestLast); else if( eStrategy == STRATEGY_LINE ) sThreadDescription.nBufferSize = CreateLineStrategyRequests( poDS, nMaxRequests, sThreadDescription.psRequestList, psRequestLast); else sThreadDescription.nBufferSize = CreateBlockStrategyRequests( poDS, nMaxRequests, sThreadDescription.psRequestList, psRequestLast); asThreadDescription.push_back(sThreadDescription); } } if( bCreatedDataset && poMEMDS == nullptr && bOnDisk ) { CPLPushErrorHandler(CPLQuietErrorHandler); VSIUnlink(pszDataset); CPLPopErrorHandler(); } if( bMigrate ) { psLock = CPLCreateLock(LOCK_SPIN); } for(i = 0; i < nThreads; i++ ) { CPLJoinableThread* pThread; if( bMigrate ) pThread = CPLCreateJoinableThread(ThreadFuncWithMigration, nullptr); else pThread = CPLCreateJoinableThread(ThreadFuncDedicatedDataset, &(asThreadDescription[i])); apsThreads.push_back(pThread); } for(i = 0; i < nThreads; i++ ) { CPLJoinThread(apsThreads[i]); if( !bMigrate && poMEMDS == nullptr ) GDALClose(asThreadDescription[i].poDS); } while( psGlobalResourceList != nullptr ) { CPLFree( psGlobalResourceList->pBuffer); if( poMEMDS == nullptr ) GDALClose(psGlobalResourceList->poDS); Resource* psNext = psGlobalResourceList->psNext; CPLFree( psGlobalResourceList ); psGlobalResourceList = psNext; } if( psLock ) { CPLDestroyLock( psLock ); } if( bCreatedDataset && poMEMDS == nullptr ) { CPLPushErrorHandler(CPLQuietErrorHandler); VSIUnlink(pszDataset); CPLPopErrorHandler(); } if( poMEMDS ) GDALClose(poMEMDS); assert( GDALGetCacheUsed64() == 0 ); GDALDestroyDriverManager(); CSLDestroy( argv ); return 0; } ������������������������gdalautotest-3.1.2/cpp/test_marching_squares_square.cpp���������������������������������������������0000664�0001750�0001750�00000066610�13701057761�022153� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_marching_squares_square.cpp 5c2c68af6b930de5249baf9ff9c1159ee805fbd7 2018-08-06 09:41:49 +0200 Hugo Mercier $ * * Project: GDAL algorithms * Purpose: Tests for the marching squares algorithm * Author: Hugo Mercier, <hugo dot mercier at oslandia dot com> * ****************************************************************************** * Copyright (c) 2018, Hugo Mercier, <hugo dot mercier at oslandia dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal_unit_test.h" #include "gdal_alg.h" #include "marching_squares/square.h" #include "marching_squares/level_generator.h" #include <vector> #include <map> #include <fstream> namespace marching_squares { struct Writer { typedef std::pair< Point, Point > Segment; void addSegment(int levelIdx, const Point &first, const Point &second) { contours[levelIdx].push_back(Segment(first, second)); } void addBorderSegment(int levelIdx, const Point &first, const Point &second) { borders[levelIdx].push_back(Segment(first, second)); } std::map< int, std::vector< Segment > > contours; std::map< int, std::vector< Segment > > borders; const bool polygonize = true; }; } namespace tut { using namespace marching_squares; // Common fixture with test data struct test_ms_data { }; // Register test group typedef test_group<test_ms_data> group; typedef group::object object; group test_ms_group("MarchingSquares:Square"); // Dummy test template<> template<> void object::test<1>() { { const double levels[] = { 0, 4 }; FixedLevelRangeIterator levelGenerator( levels, 2 ); auto r = levelGenerator.range( 0, 5.0 ); auto b = r.begin(); ensure_equals( (*b).first, 1 ); ensure_equals( (*b).second, 4.0 ); auto e = r.end(); ensure_equals( (*e).first, 2 ); ensure_equals( (*e).second, Inf ); } { IntervalLevelRangeIterator levelGenerator( 0, 4 ); auto r = levelGenerator.range( 0, 5.0 ); auto b = r.begin(); ensure_equals( (*b).first, 1 ); ensure_equals( (*b).second, 4.0 ); auto e = r.end(); ensure_equals( (*e).first, 2 ); ensure_equals( (*e).second, 8.0 ); } { IntervalLevelRangeIterator levelGenerator( 0, 10 ); auto r = levelGenerator.range( -18, 5.0 ); auto b = r.begin(); ensure_equals( (*b).first, -1 ); ensure_equals( (*b).second, -10.0 ); auto e = r.end(); ensure_equals( (*e).first, 1 ); ensure_equals( (*e).second, 10.0 ); } { ExponentialLevelRangeIterator levelGenerator( 2 ); auto r = levelGenerator.range( 0, 5.0 ); auto b = r.begin(); ensure_equals( (*b).first, 1 ); ensure_equals( (*b).second, 1.0 ); ++b; ensure_equals( (*b).first, 2 ); ensure_equals( (*b).second, 2.0 ); ++b; ensure_equals( (*b).first, 3 ); ensure_equals( (*b).second, 4.0 ); auto e = r.end(); ensure_equals( (*e).first, 4 ); ensure_equals( (*e).second, 8.0 ); } } template <> template <> void object::test<2>() { // Square with only 0, level = 0.1 Square square( ValuedPoint(0,1,0), ValuedPoint(1,1,0), ValuedPoint(0,0,0), ValuedPoint(1,0,0)); Square::Segments segments(square.segments(.1)); // // 0 0 // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 0 0 ensure_equals( segments.size(), size_t(0) ); } template <> template <> void object::test<3>() { // Square with only 1, level = 0.1 Square square( ValuedPoint(0,1,1), ValuedPoint(1,1,1), ValuedPoint(0,0,1), ValuedPoint(1,0,1)); // // 1 1 // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 1 1 Square::Segments segments(square.segments(.1)); ensure_equals( segments.size(), size_t(0) ); } template <> template <> void object::test<4>() { // Square with only 1, level = 1.0 Square square( ValuedPoint(0,1,1), ValuedPoint(1,1,1), ValuedPoint(0,0,1), ValuedPoint(1,0,1)); // // 1 1 // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 1 1 Square::Segments segments(square.segments(1.0)); ensure_equals( segments.size(), size_t(0) ); } template <> template <> void object::test<5>() { // Square with one segment, level = 0.1 Square square( ValuedPoint(0,1,1), ValuedPoint(1,1,0), ValuedPoint(0,0,0), ValuedPoint(1,0,0)); // // 0 0 // +------------------+ // | | // | | // | | // | | // | | // o | // | \ | // +---o--------------+ // 1 0 Square::Segments segments(square.segments(.1)); ensure_equals( segments.size(), size_t(1) ); ensure( segments[0].first == Point(.9, 1) ); ensure(segments[0].second == Point(0, .1) ); } template <> template <> void object::test<6>() { // Fudge test 1 Square square( ValuedPoint(0,1,0), ValuedPoint(1,1,1), ValuedPoint(0,0,1), ValuedPoint(1,0,1)); // // 0 1 // +------------------o // | __/| // | __/ | // | __/ | // | _/ | // | __/ | // | __/ | // |/ | // o------------------+ // 1 1 // (0,0) { Square::Segments segments(square.segments(0.0)); ensure_equals( segments.size(), size_t(0) ); } { Square::Segments segments(square.segments(1.0)); ensure_equals( segments.size(), size_t(1) ); ensure( (std::fabs(segments[0].first.x - 0.0) < 0.001) && (std::fabs(segments[0].first.y - 0.0) < 0.001) ); ensure( (std::fabs(segments[0].second.x - 1.0) < 0.001) && (std::fabs(segments[0].second.y - 1.0) < 0.001) ); } } template <> template <> void object::test<7>() { // Fudge test 2 Square square( ValuedPoint(0,1,1), ValuedPoint(1,1,0), ValuedPoint(0,0,0), ValuedPoint(1,0,0)); // // 1 0 // +o-----------------+ // o+ | // | | // | | // | | // | | // | | // | | // +------------------+ // 0 0 // (0,0) { Square::Segments segments(square.segments(1.0)); ensure( segments.size() == 1 ); ensure( (std::fabs(segments[0].first.x - 0.0) < 0.001) && (std::fabs(segments[0].first.y - 1.0) < 0.001) ); ensure( (std::fabs(segments[0].second.x - 0.0) < 0.001) && (std::fabs(segments[0].second.y - 1.0) < 0.001) ); } { Square::Segments segments(square.segments(0.0)); ensure( segments.size() == 0 ); } } template <> template <> void object::test<8>() { // A square with NaN const Square square( ValuedPoint(2.500000, 1.500000, 224.990005), ValuedPoint(3.500000, 1.500000, NaN), ValuedPoint(2.500000, 2.500000, 225.029999), ValuedPoint(3.500000, 2.500000, 224.770004)); // // 224.990005 NaN // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 225.029999 224.770004 const Square ul(square.upperLeftSquare()); const Square ll(square.lowerLeftSquare()); // upper left and lower left squares // // 224.990005 224.990005 NaN // +--------+---------+ // | | | // | | | // | | | // +--------+ 224.930002 // 225.010002 | | // | | | // | 224.900001 | // +--------+---------+ // 225.029999 224.770004 ensure( (std::fabs(ul.lowerLeft.value - 225.010002) < 0.000001) ); ensure( (std::fabs(ul.lowerRight.value - 224.930002) < 0.000001) ); ensure( (std::fabs(ul.upperRight.value - 224.990005) < 0.000001) ); ensure( (std::fabs(ll.lowerRight.value - 224.900001) < 0.000001) ); ensure( (ul.lowerLeft.x == ll.upperLeft.x) ); ensure( (ul.lowerLeft.y == ll.upperLeft.y) ); ensure( (ul.lowerLeft.value == ll.upperLeft.value) ); ensure( (ul.lowerRight.x == ll.upperRight.x) ); ensure( (ul.lowerRight.y == ll.upperRight.y) ); ensure( (ul.lowerRight.value == ll.upperRight.value) ); const Square::Segments segments_up(ul.segments(225)); const Square::Segments segments_down(ll.segments(225)); // segments on 225 // // 224.990005 224.990005 NaN // <--------<---------+ // | | | // o_ | | // | \ | | // >--o-----< 224.930002 // 225.01|002 | | // | \ | | // | |224.900001 | // >---o----<---------+ // 225.029999 224.770004 ensure( (segments_up.size() == 1) ); ensure( (segments_down.size() == 1) ); // the two segments have a point in common ensure( (segments_up[0].second == segments_down[0].first) ); } template <> template <> void object::test<9>() { // Border test 1 const Square square( ValuedPoint(0.5, 0.5, NaN), ValuedPoint(1.5, 0.5, NaN), ValuedPoint(0.5, 1.5, 272.87), ValuedPoint(1.5, 1.5, 272.93)); // // NaN NaN // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 272.87 272.93 const Square ll(square.lowerLeftSquare()); const Square lr(square.lowerRightSquare()); // // NaN NaN // +------------------+ // | | // | | // 272.87 272.90000 272.93 // +--------+---------+ // | | | // | | | // | | | // +--------+---------+ // 272.87 272.90000 272.93 Square::Segments segments_l(ll.segments(272.9)); Square::Segments segments_r(lr.segments(272.9)); // the level falls exactly on corners // thanks to the fudge, each corner should be shifted away a bit // // NaN NaN // +------------------+ // | | // | | // 272.87 272.90000 272.93 // <-------o>---------> // | :| | // | :| | // | :| | // <-------o>---------> // 272.87 272.90000 272.93 ensure_equals( segments_l.size(), size_t(1) ); ensure_equals( segments_r.size(), size_t(0) ); } template <> template <> void object::test<10>() { // Multiple levels const Square square( ValuedPoint(0.5, 1.5, 272.99), ValuedPoint(1.5, 1.5, NaN), ValuedPoint(0.5, 0.5, 273.03), ValuedPoint(1.5, 0.5, 272.9)); // // 272.99 NaN // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 273.03 272.90 const Square ul(square.upperLeftSquare()); // // 272.99 272.99 NaN // +---------+--------+ // | | | // | | | // | | | // +---------+ | // 273.01 272.97 | // | | // | | // +------------------+ // 273.03 272.90 ensure( (std::fabs(ul.lowerLeft.value - 273.01) < 0.01) ); ensure( (std::fabs(ul.lowerRight.value - 272.97) < 0.01) ); ensure( (std::fabs(ul.upperRight.value - 272.99) < 0.01) ); // We have a NaN value on the right, we should then have a right border ensure( (ul.borders == Square::RIGHT_BORDER) ); Writer writer; // levels starting at min and increasing by 0.1 IntervalLevelRangeIterator levelGenerator(0, .1); ul.process(levelGenerator, writer); // we only have a contour when level = 273.0 // (0.5, 1.5) (1.5, 1.5) // 272.99 272.99 NaN // +---------+--------+ // | || | // o || | // |\ || | // +-o-------+ | // 273.01 272.97 | // | | // | | // +------------------+ // 273.03 272.90 // (0.5, 0.5) (1.5, 0.5) ensure( (writer.contours.size() == 2) ); ensure( (writer.borders.size() == 1) ); ensure( (writer.contours.find(2730) != writer.contours.end()) ); ensure( (writer.contours.find(2731) != writer.contours.end()) ); ensure( (writer.borders.find(2730) != writer.borders.end()) ); // we have one segment border on the right ensure( (writer.borders[2730].size() == 1) ); ensure( (writer.contours[2730].size() == 1) ); ensure( (writer.contours[2731].size() == 1) ); } template <> template <> void object::test<11>() { // Border test 3 Square square( ValuedPoint(0,0,10), ValuedPoint(1,0,5), ValuedPoint(0,1,NaN), ValuedPoint(1,1,4)); // level value = 7 // 10 7.5 5 // +---------+--------+ // | | | // | _o | // | _/ | | // 10 +====o====+ 6.33 | // | | // | | // | | // +------------------+ // NaN 4 const Square ul(square.upperLeftSquare()); ensure( "Lower left value", (std::fabs(ul.lowerLeft.value - 10.00) < 0.01) ); ensure( "Lower right value", (std::fabs(ul.lowerRight.value - 6.33) < 0.01) ); ensure( "Upper right value", (std::fabs(ul.upperRight.value - 7.50) < 0.01) ); // We have a NaN value on the right, we should then have a right border ensure( "We have the lower border", ul.borders == Square::LOWER_BORDER ); { // ... with a level interval Writer writer; IntervalLevelRangeIterator levelGenerator(7, 5); ul.process(levelGenerator, writer); // we have one contour at 7 and 12 // and two borders: one, at 7 and the second at >7 (12) ensure_equals( "We have 2 borders", writer.borders.size(), size_t(2) ); ensure_equals( "We have 2 contours", writer.contours.size(), size_t(2) ); ensure( "Border at 0", writer.borders.find(0) != writer.borders.end() ); ensure( "Border at 1", writer.borders.find(1) != writer.borders.end() ); ensure( "No contour at 0", writer.contours.find(0) != writer.contours.end() ); // and we have one contour and 2 borders ensure_equals( "1 contour at 0", writer.contours[0].size(), size_t(1) ); ensure_equals( "1 border at 0", writer.borders[0].size(), size_t(1) ); ensure_equals( "1 border at 1", writer.borders[1].size(), size_t(1) ); // the border at 7.0 is around 0.5, 0.5 ensure( "Border at 1 is around 0.5, 0.5", (writer.borders[0][0].first.x == 0.5 && writer.borders[0][0].first.y == 0.5) || (writer.borders[0][0].second.x == 0.5 && writer.borders[0][0].second.y == 0.5) ); // the border at 12.0 is around 0, 0.5 ensure( "Border at 1 is around 0, 0.5", (writer.borders[1][0].first.x == 0.0 && writer.borders[1][0].first.y == 0.5) || (writer.borders[1][0].second.x == 0.0 && writer.borders[1][0].second.y == 0.5) ); } // test with a fixed set of levels { Writer writer; std::vector<double> levels = {7.0}; FixedLevelRangeIterator levelGenerator(&levels[0], 1); ul.process(levelGenerator, writer); // we have one contour at 7 and 12 // and two borders: one, at 7 and the second at >7 (12) ensure_equals( "We have 2 borders", writer.borders.size(), size_t(2) ); ensure_equals( "We have 2 contours", writer.contours.size(), size_t(2) ); ensure( "Border at 0", writer.borders.find(0) != writer.borders.end() ); ensure( "Border at 1", writer.borders.find(1) != writer.borders.end() ); ensure( "No contour at 0", writer.contours.find(0) != writer.contours.end() ); // and we have one contour and 2 borders ensure_equals( "1 contour at 0", writer.contours[0].size(), size_t(1) ); ensure_equals( "1 border at 0", writer.borders[0].size(), size_t(1) ); ensure_equals( "1 border at 1", writer.borders[1].size(), size_t(1) ); // the border at 7.0 is around 0.5, 0.5 ensure( "Border at 1 is around 0.5, 0.5", (writer.borders[0][0].first.x == 0.5 && writer.borders[0][0].first.y == 0.5) || (writer.borders[0][0].second.x == 0.5 && writer.borders[0][0].second.y == 0.5) ); // the border at 12.0 is around 0, 0.5 ensure( "Border at 1 is around 0, 0.5", (writer.borders[1][0].first.x == 0.0 && writer.borders[1][0].first.y == 0.5) || (writer.borders[1][0].second.x == 0.0 && writer.borders[1][0].second.y == 0.5) ); } } template <> template <> void object::test<12>() { // Test level value below square values Square square( ValuedPoint(0,0,10), ValuedPoint(1,0,5), ValuedPoint(0,1,8), ValuedPoint(1,1,4)); // level value = 2 // 10 5 // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // 8 4 { Writer writer; std::vector<double> levels = {2.0}; FixedLevelRangeIterator levelGenerator(&levels[0], 1); square.process(levelGenerator, writer); ensure( (writer.borders.size() == 0) ); ensure( (writer.contours.size() == 0) ); } } template <> template <> void object::test<13>() { // Full border test 1 Square square( ValuedPoint(-0.5,-0.5,NaN), ValuedPoint(0.5,-0.5,NaN), ValuedPoint(-0.5,0.5,NaN), ValuedPoint(0.5,0.5,5)); // level value = 0, 10 // NaN NaN // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // NaN 5 { Writer writer; IntervalLevelRangeIterator levelGenerator( 0, 10.0 ); square.process(levelGenerator, writer); ensure( (writer.borders.size() == 1) ); ensure( (writer.borders[1].size() == 2) ); ensure( ((writer.borders[1][0].first.x == 0.0 && writer.borders[1][0].first.y == 0.0) || (writer.borders[1][0].second.x == 0.0 && writer.borders[1][0].second.y == 0.0)) ); ensure( ((writer.borders[1][0].first.x == 0.5 && writer.borders[1][0].first.y == 0.0) || (writer.borders[1][0].second.x == 0.5 && writer.borders[1][0].second.y == 0.0)) ); ensure( ((writer.borders[1][1].first.x == 0.0 && writer.borders[1][1].first.y == 0.0) || (writer.borders[1][1].second.x == 0.0 && writer.borders[1][1].second.y == 0.0)) ); ensure( ((writer.borders[1][1].first.x == 0.0 && writer.borders[1][1].first.y == 0.0) || (writer.borders[1][1].second.x == 0.0 && writer.borders[1][1].second.y == 0.5)) ); } } template <> template <> void object::test<14>() { // Full border test 2 Square square( ValuedPoint(-0.5,-0.5,NaN), ValuedPoint(0.5,-0.5,NaN), ValuedPoint(-0.5,0.5,NaN), ValuedPoint(0.5,0.5,5)); // level value = 5.0, 10.0 // NaN NaN // +------------------+ // | | // | | // | | // | | // | | // | | // | | // +------------------+ // NaN 5 { Writer writer; IntervalLevelRangeIterator levelGenerator( 5.0, 5.0 ); square.process(levelGenerator, writer); ensure( (writer.borders.size() == 1) ); ensure( (writer.borders[1].size() == 2) ); ensure( ((writer.borders[1][0].first.x == 0.0 && writer.borders[1][0].first.y == 0.0) || (writer.borders[1][0].second.x == 0.0 && writer.borders[1][0].second.y == 0.0)) ); ensure( ((writer.borders[1][0].first.x == 0.5 && writer.borders[1][0].first.y == 0.0) || (writer.borders[1][0].second.x == 0.5 && writer.borders[1][0].second.y == 0.0)) ); ensure( ((writer.borders[1][1].first.x == 0.0 && writer.borders[1][1].first.y == 0.0) || (writer.borders[1][1].second.x == 0.0 && writer.borders[1][1].second.y == 0.0)) ); ensure( ((writer.borders[1][1].first.x == 0.0 && writer.borders[1][1].first.y == 0.0) || (writer.borders[1][1].second.x == 0.0 && writer.borders[1][1].second.y == 0.5)) ); } { Writer writer; std::vector<double> levels = { 5.0 }; FixedLevelRangeIterator levelGenerator( &levels[0], 1 ); square.process(levelGenerator, writer); ensure( (writer.borders.size() == 1) ); ensure( (writer.borders[1].size() == 2) ); ensure( ((writer.borders[1][0].first.x == 0.0 && writer.borders[1][0].first.y == 0.0) || (writer.borders[1][0].second.x == 0.0 && writer.borders[1][0].second.y == 0.0)) ); ensure( ((writer.borders[1][0].first.x == 0.5 && writer.borders[1][0].first.y == 0.0) || (writer.borders[1][0].second.x == 0.5 && writer.borders[1][0].second.y == 0.0)) ); ensure( ((writer.borders[1][1].first.x == 0.0 && writer.borders[1][1].first.y == 0.0) || (writer.borders[1][1].second.x == 0.0 && writer.borders[1][1].second.y == 0.0)) ); ensure( ((writer.borders[1][1].first.x == 0.0 && writer.borders[1][1].first.y == 0.0) || (writer.borders[1][1].second.x == 0.0 && writer.borders[1][1].second.y == 0.5)) ); } } } ������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_c_include_from_cpp_file.cpp���������������������������������������������0000664�0001750�0001750�00000003722�13701057761�022044� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * Project: GDAL Core * Purpose: Test including all public C headers as extern C from .cpp file * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2017, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ extern "C" { #include "cpl_atomic_ops.h" #include "cpl_conv.h" #include "cpl_csv.h" #include "cpl_error.h" #include "cpl_hash_set.h" #include "cpl_list.h" #include "cpl_minixml.h" #include "cpl_port.h" #include "cpl_progress.h" #include "cpl_quad_tree.h" #include "cpl_vsi.h" #include "gdal_alg.h" #include "gdal_version.h" #include "gdal.h" #include "ogr_api.h" #include "ogr_core.h" #include "ogr_srs_api.h" } int main() { return 0; } ����������������������������������������������gdalautotest-3.1.2/cpp/data/������������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057751�014374� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/byte.tif����������������������������������������������������������������0000664�0001750�0001750�00000001340�13701057751�016041� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*���k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksck�����������������������������������������������������������������������S������� ����R�� ����j������������������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/pixel_per_line.prj������������������������������������������������������0000664�0001750�0001750�00000002154�13701057751�020111� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Projection ALBERS Datum NAD83 Zunits NO Units METERS Spheroid GRS1980 Xshift 0.0000000000 Yshift 0.0000000000 Parameters 61 40 0.000 /* 1st standard parallel 68 0 0.000 /* 2nd standard parallel -132 30 0.000 /* central meridian 59 0 0.000 /* latitude of projection's origin 500000.00000 /* false easting (meters) 500000.00000 /* false northing (meters) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/int32.tif���������������������������������������������������������������0000664�0001750�0001750�00000003620�13701057751�016040� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�H��k���{������s���������������������k������k���������k���{���s���������s������k���{������s������s������k���{���{���c������{������������c������s������������{���s������k������s������{���k���������s���s���k���s���k���������{���{���s���������{���s���{���s���{���k���s������k���s������s������������������������s���s���s���{������{������{������k���k���������{������������������s������{���k������s���������c���{���s������������k���������������������c������{���s������������c������{���������{���s������{������s������{������{���k���s������s���k���s���c���{���c������c���k���{���s������s���{������s���������{���{������c���s���c���{������s���s���k���������c������c���s���{���k������k���s���k���s���{������{���k���{������������������{���c������{���k������c���s���{���������{���k���{���{���{���k���{���{���{���k������{���{���s���s���Z���k������k���k���k���k���c������{���s���������c���{���{���k���{���c���k���������k���s���s���k���c������k������������������k���{���c���c���s���c������c������s������{���c������{������������k������Z���k���s���k���Z���c���{���s���s���s���{���{������s������c���������������{���k���k���k���s������c���s���c���c���k���s������s���Z���{���s������������������s������Z���c���s���Z���c���c���k���c������c���k���������������������{������c���s���{���J���s���c���{���������������������c������������������k������{������������������������{���k���{���k���{���������������������������������s������k���k���k���k���k���s���c���k����������������������� ������������������������������������������@���������S������� ������ ����������J������z������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�����������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/float64.tif�������������������������������������������������������������0000664�0001750�0001750�00000006720�13701057751�016364� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*� �������Z@�����^@�����`@�����\@�����`@�����`@�����a@�����`@�����`@�����`@�����Z@�����`@�����Z@�����`@�����`@�����Z@�����^@�����\@�����c@�����b@�����\@�����`@�����Z@�����^@�����b@�����\@�����d@�����\@�����a@�����Z@�����^@�����^@�����X@�����`@�����^@�����`@�����`@�����`@�����X@�����c@�����\@�����`@�����a@�����`@�����^@�����\@�����a@�����Z@�����a@�����\@�����`@�����^@�����Z@�����`@�����`@�����\@�����\@�����Z@�����\@�����Z@�����b@�����`@�����^@�����^@�����\@�����`@�����`@�����^@�����\@�����^@�����\@�����^@�����Z@�����\@�����b@�����Z@�����\@�����a@�����\@�����`@�����`@�����c@�����`@�����a@�����`@�����`@�����\@�����\@�����\@�����^@�����b@�����^@�����d@�����^@�����`@�����Z@�����Z@�����`@�����c@�����^@�����g@�����e@�����e@�����b@�����b@�����\@�����b@�����^@�����Z@�����`@�����\@�����`@�����c@�����X@�����^@�����\@�����`@�����`@�����i@�����Z@�����h@�����e@�����b@�����a@�����a@�����`@�����X@�����`@�����^@�����\@�����a@�����`@�����`@�����X@�����`@�����^@�����`@�����e@�����^@�����\@�����b@�����^@�����b@�����\@�����b@�����^@�����a@�����^@�����Z@�����\@�����`@�����\@�����Z@�����\@�����X@�����^@�����X@�����f@�����X@�����Z@�����^@�����\@�����`@�����\@�����^@�����`@�����\@�����`@�����`@�����^@�����^@�����`@�����X@�����\@�����X@�����^@�����`@�����\@�����\@�����Z@�����a@�����a@�����X@�����a@�����X@�����\@�����^@�����Z@�����`@�����Z@�����\@�����Z@�����\@�����^@�����`@�����^@�����Z@�����^@�����`@�����`@�����`@�����`@�����`@�����^@�����X@�����`@�����^@�����Z@�����b@�����X@�����\@�����^@�����a@�����e@�����^@�����Z@�����^@�����^@�����^@�����Z@�����^@�����^@�����^@�����Z@�����a@�����^@�����^@�����\@�����\@�����V@�����Z@�����e@�����Z@�����Z@�����Z@�����Z@�����X@�����`@�����^@�����\@�����e@�����b@�����X@�����^@�����^@�����Z@�����^@�����X@�����Z@�����g@�����e@�����Z@�����\@�����\@�����Z@�����X@�����a@�����Z@�����e@�����a@�����b@�����`@�����`@�����Z@�����^@�����X@�����X@�����\@�����X@�����`@�����X@�����a@�����\@�����b@�����^@�����X@�����`@�����^@�����b@�����a@�����a@�����Z@�����a@�����V@�����Z@�����\@�����Z@�����V@�����X@�����^@�����\@�����\@�����\@�����^@�����^@�����b@�����\@�����b@�����X@�����`@�����d@�����b@�����c@�����^@�����Z@�����Z@�����Z@�����\@�����a@�����X@�����\@�����X@�����X@�����Z@�����\@�����`@�����\@�����V@�����^@�����\@�����g@�����e@�����a@�����a@�����d@�����\@�����`@�����V@�����X@�����\@�����V@�����X@�����X@�����Z@�����X@�����`@�����X@�����Z@�����`@�����`@�����c@�����f@�����a@�����e@�����^@�����`@�����X@�����\@�����^@�����R@�����\@�����X@�����^@�����a@�����c@�����`@�����d@�����a@�����a@�����X@�����e@�����n@�����o@�����i@�����`@�����Z@�����a@�����^@�����b@�����`@�����d@�����d@�����b@�����a@�����`@�����^@�����Z@�����^@�����Z@�����^@�����f@�����f@�����c@�����b@�����c@�����c@�����c@�����f@�����`@�����b@�����\@�����`@�����Z@�����Z@�����Z@�����Z@�����Z@�����\@�����X@�����Z@��������������������@������������������������������������������ ���������S������� ����B �� ����Z ������ ������ ������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�������������������������������������������������gdalautotest-3.1.2/cpp/data/utmsmall.tif������������������������������������������������������������0000664�0001750�0001750�00000024170�13701057751�016742� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�'��k{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sŜŌֵέ֭sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{Ŕεs{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{Žέ֭Δŵ{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{kέńBΥννΜsss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{k{ccť攽s{ksc{skscZk{cs{Zcccc{kskk{kssk{ZsΔŽޜZkŭ{ŭc{sc{{ssckk{ckkcsccZcsZss{{{sνﵔťsޥ{s{{kssksc{cck{kcccsZ{sksskss{sc{{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{Rcֵ֌ccs{kksks{{k{kskscskkssks{Zֽ楄{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{ksέέ{֔極{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{ť{kέ޽{ޥΥc{{k{ckksskckZ{ksss{ss{ksssε{Δ楥ޥŜŭk{ccsccs{c{ssc{kkcs{s{{skk{֜Žֵ޽ŽŭޥεkkZkskZc{sss{{sc{kckk{{ssŵ{{νΜֽεΔŽŵ֥ťޭŜ{kkkscscckssZ{s{{k{{{Zk{kkńŵsc{ŽŭŌksZcsZcckccksZs{skskssֵŭΜεΌŔ޽ŭ֜{cs{Jsc{ckkskksŽ{εŵν֭Μks΄k{{k{k{RccZŭŜΥε浌ŭ{{ޭΔ{Ό޵skkkkksckZsccέޭ޵ֵ֥s{Ŝ{ޭΜ{sZcsZkccZckcc{ε朔ŭŽŵŭŵŵk{{{kcRkkkcckŭŭ֥ޭ֔Ŝ{ޜZckcRss޽έބε業{Z{k{ŽŭŌŵŜŭc{{kޔŽť{{sR{֜{s{{{sֵޥֽs{{{{Zc楜{έ{ŽΔΜc{εk΄省ΜΥsks{{Ō攜֔ŔskޜŔs{εޭńŽ֭ﭥ{֔{{ťs{{Ό޽֭歵Z{ŵŵŌťŽŌ{{sֵŔ޽ssŌsνť挥ť޵޽֔楥{ν{ŵε潔޽朔Υ{ֽŭ֌攔ք{Rkŵޔsks{ZŽ楔ޭs歔掠ť{k{kscsc{ť֜c{kޜs{J{c{Rcs{kΥέŔťŵνΜsk{sskk{skscRcJk{sέ{Ŝ֌޽έޭޥ{k{{Rk{kZ{RťŭνŵΜŌks{sskck{ֵŜsZŭ֔εŵεJkkss{{s{c{ŌޥŜsk歜֜{޽s֭{{{{Ŝ{s{k{{ckkŜ浌c潥ޔޥs{{s֔s{s{c{ks{s{s{εέֵ{{ssss{{kskkュ{ssތŌkckckcsksks{{ss{{Ό{sŽ歵{΄֜ބksckkk{{{{sks{{ťck{޵޽{έބkksssssc{kc{ccsބŌcsޥŭs{sR{c{sZks{ss{kcs{kZ{ޔޔkޥ{ŔֽŔŵ{{kkskskZ{sZksssZRk{kc{{ńs{k潌֭s֭kޜ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ZZkcscR1{{Z{{sBRRBB1BRRJ:Z{ŭ!sscR:Bc1cscZk!sBs1cB:BJ1RR{Jc){ccsZsŭsRR:kZ:{kRRsksRJJBB1J)JZkR!JsZ)kBRZsJZ{c::ZBZZZck:11):sBRs)JsZcRޭν{s{cRRZJsRRZcs{kcRR1BJBB{kJ11!!:BBB::sB!RZs{kBJBcss)B::)JB挜έcZk:k{ksZZ{{RsJ{cZJRZ)BBBsZ1Rs�!1JBc:)J:ZkZRR:R!BJZR{Zs{{攜{sJJJR{cJBRBZRkZkRJBZBBBBcsBcZs:!J:Z!1J)R!B)::ZcR1BcsZ:1Z:kskJΌJssJsccsRckJJRJJcJ{sskkkc)JBZskRRJ1!Zc{!)::Z)R)1:BsckssZZ1:BBJJR!B֌JBcRs{cJBZsZ:ssJRJZ{kZ{Zk{{{ZRR1Bs1BJR11BR{{s{)ZcZR))!B)sŔZc):s{ZJkkRsBJ1ccBkZZB1ssskZkR{:RRZks{ZkccBs:)!:kcsތRRkZ:))!!):JRkB11{{1cskRRRZ!cRsZ:k1{J:1ksJZ{k{JZ{:skccRZZk)JRk1ccBckssZ!11cJ)JJB)RRs{R�:){k1:JJ):)kR{sJJZkBkBJBZ:R1:ZcccsJRRskk:{sscRZ{������d�������d����������������������������'�������������Q�������'���������S������� ����(�� ����'������*(������b(��������l�����������������������������������@A����̞LA��������������N@������N@������������������������������ ���Wh ���)#NAD27 / UTM zone 11N|���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/n43.dt0�����������������������������������������������������������������0000664�0001750�0001750�00000102562�13701057751�015417� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UHL10800000W0430000N030003000200U 012101210 DSIU DTED0F18 062 01A960900000000US090078 SPEXDLMS2009609MSLWGS84AS11+C 9609 430000.0N0800000.0W430000N0800000W440000N0800000W440000N0790000W430000N0790000W0000000.0030003000121012100 ACC0200020002000200 10 ���������������������������������������~�������������(%%(0<:::<BHNYb[]][J3TX_cdgcjofn|vt?}a&��D6������������������������������������}�~�������������   ! (!0>;=3;7NRbZYZd\R8GTWYXklndjptr}6Fkh7��B�������������������������������������y������������� "%10665@KLTYTYZb`:2JIOPSWba`clpi}FpvO��Bݪ������������������������������������}�w�q���������� �  +$%(.138LGR]YSNH:46>GH:<SVk`^hmip #7aurwU��?������������������������������������o�m�_�������� ��� �� &/*4(6DTSLQ,A)1++)(%-K[H2]ffnt)0Ts`]rS��<l������������������������������������l�h�V����������   "/��)=@)O4#&/'&%%$ (\\G7Iajgjs]$Ewqa\TYI��:������������������������������������o�d�R�q���������� ,���������� &@dgf[]mM 4asweWUPR=��=ժ������������������������������������k�e�S�_�������������� �*3���������� � ,1ID?FJ=05Lh[`GP?D8��>,������������������������������������k�c�V�V�y���������� ��������5,<'��������� ��� ��� ',*0:OdtvWVAPEB.��CM�� � ���������������������������������l�`�X�W�b������������������1<5;�������� �������  �  !1NId`T>=MD8&��BN�� � ���������������������������������j�b�Y�K�e������������������:A@2��������������   "&$(07JV}r]SZ>:HE6"��@g�� � ���������������������������������h�a�[�K�a�~���������� �������-������������������� "%$'*) $->Lb}w[]JKM:8D<1��B�� � ���������������������������������i�X�[�K�U�w����������   ������������������������������  !##+-&01D[b{qh_I=GE52962��Dw�� � ���������������������������������j�Y�U�]�c�T���������� ������������������������������""%,."& +%7B]qrgdUE4;>32745��C������������������������������������i�_�[�K�K�K�{���������������������������������������  #'+$#%%"!-5CPif^SI:7@/'/35��B������������������������������������i�`�Q�K�K�h�b��������������������������������������   !))"%'&))*5<ZSWG@99:0203 ��@������������������������������������b�Z�M�K�K�i�^�s�{�������������������������������������  $((/%&.4$+BNGZF;"(.+7.) ��@2������������������������������������]�S�P�L�K�K�f�f�}��������������������������������������������))'&$)'13&61D=3+()'!6,"��D������������������������������������X�R�N�L�K�K�Q�d�j�u������������������������������������������������� !! #'/)-#*"5**"(,,0&��Eb�����������������������������������}�V�P�L�K�K�K�K�^�`�i�w����������������������������������������������� &*++$($!*01'��D�����������������������������������_�V�N�M�K�K�K�K�U�]�b�e�~������������������������������������������������� '(/-! $'+15"��B˪�����������������������������������[�T�L�L�N�M�K�K�K�Z�`�b�m�w������������������������������������������������"+-.0++.'! 0#&,* ��D����������������������������������c�Z�V�L�L�N�K�K�K�K�X�Z�f�g�r�|���������������������������������������������� ('(%!!%!+ ��B��������������������������������s�k�b�W�V�M�L�M�K�K�K�K�T�[�Z�f�j�x����������������������������������������������   &* &,$ ���@u��������������������������������r�i�`�W�T�L�L�M�K�K�U�O�K�[�U�`�g�v�{������w���������������������������������������  � 2;." ��@F��������������������������������q�^�`�W�T�N�N�K�K�Q�K�K�K�K�U�_�g�o�t������������������������������������������������  ��  7hB*%��C��������������������������������o�f�R�W�S�N�K�L�K�K�K�K�K�K�V�]�c�i�p�z�����������������������������������������������������    � 8`Y/*"��F��������������������������������o�c�Y�W�S�M�M�K�K�K�K�K�K�K�K�X�_�d�g�u�|�}��������������������������������������������������� �   /LN/.-,��G?��������������������������������h�_�Y�S�X�L�K�K�K�K�K�K�K�K�K�T�^�e�b�i�r�{������������������������������������������������������ � � *;#0(0&��H��������������������������������g�V�W�Q�M�K�K�K�K�K�K�K�K�K�K�K�\�Y�]�b�k�t����������������������������������������������������� �  �"3#(%.��H��������������������������������c�W�M�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�\�[�_�a�k�y�w��{����w�������������������������������������������������  ��  #!��Iª��������������������������������`�X�Q�N�K�K�K�K�K�K�K�K�K�K�K�K�K�K�W�\�`�c�j�\�y�}����y�������������������������������������������������� ��  !   ��H|�� � �����������������������������a�V�P�M�K�K�K�K�K�K�K�K�K�K�K�K�K�K�T�Z�Y�_�T�k�u�t������������������������������������������������������  #"  ��GL��!�!�����������������������������a�W�P�M�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�U�T�X�]�e�k�p��������������������������������������������������������� �%��I��"�"�����������������������������`�V�P�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�R�Z�\�d�h�q�|���������������������������������������������������������"%�� ��K��#�#�����������������������������`�U�O�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�T�V�_�b�i�q�q�~������������������������������������������������������ *! �����I��$�$����������������������������d�\�U�M�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�P�Y�[�e�k�y�w����������������������������������������������������� $"�����I��%�%����������������������������a�Z�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N�V�U�_�e�\�k�}������������z��������������������������������������� ( �����E��&�&����������������������������a�Y�R�M�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�Z�]�V�d�m���������������������������������������������������  .;% �����FR��'�'����������������������������`�W�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�V�X�W�]�f�j�s�z����������������������������������������������� '0=" �����Dt��(�(����������������������������]�U�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�O�W�\�a�e�k�l������v����������������������������������������� 3?�����C��)�)����������������������������]�U�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�V�\�^�c�e�~����}�r�u�~���������������������������������������    *1������B'��*�*���������������������������m�[�T�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�R�]�`�d�o��|�}�r�m�y����������������������������������������    ������A��+�+���������������������������c�Y�S�N�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�]�_�h�i�l�i�j�p�R�}����������������������������������������  ������A)��,�,���������������������������b�V�S�M�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�P�V�[�g�e�e�b�f�i�[�o�����������������������������������������*������@��-�-���������������������������b�V�R�L�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�X�]�d�a�\�a�a�Z�k�n�w������������������������������������������ # E������C��.�.���������������������������a�S�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�Y�]�\�V�[�Z�c�N�g�j�q�y����������������������������������������,J�����B��/�/���������������������������a�U�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�T�U�P�U�Y�V�]�_�c�h�n�x��������������������������������������  '%M,��=��0�0���������������������������]�V�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�W�V�W�`�d�k�q����������������������������������� %2V  ��:\��1�1���������������������������Z�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�P�P�U�\�a�h�n�u�z��������������������������������� �%*Q%0+$��:f��2�2���������������������������X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�L�S�X�^�g�k�n�u�w�w�~����������������������������� �(,*$F4890,��8��3�3���������������������������Z�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�W�]�d�i�k�n�u�r���������������}���������������� �+,1-EJ=81"��;��4�4���������������������������Z�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�Y�a�f�m�e�j�s�}������������������������������ ,(34FF0(#��:K��5�5��������������������������a�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�U�Z�b�i�i�r�w�}�������������{�����������������#8@U4)  ��9��6�6��������������������������\�U�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�V�S�g�k�q�u�������������z����������������� (.0M>JB��8��7�7�������������������������f�[�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Z�e�j�o�t�{����������u�z�z���������������� !" ++.>FN4+��7٪��8�8�������������������������f�Z�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�U�a�f�l�q�u�|��������������������������� &)%"*'-:EJ8:��7��9�9�������������������������g�W�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�U�\�a�j�m�q�t�x��������������������������%)+%(!$9:VL?��7��:�:�������������������������j�Y�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�Y�`�h�k�q�w�v�|��f�~��|��{�z����������������� !,.7)- "!+?60A��6,��;�;������������������������y�a�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�V�]�a�g�m�r�u�t�v�f�`�r�~��{�����������������;&*)(#"<:2*@��5��<�<������������������������g�Z�V�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�Y�_�a�^�k�l�T�x�c�n�y�|������������������+ 60/+4'0:��4 ��=�=�����������������������v�c�X�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�T�V�[�f�M�S�t�y�i�v�z�|���������������������!?930# #8% ��6��>�>�����������������������i�`�X�O�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�[�c�[�n�u�x�g�u�i����������������������?<52!%8 ��6e��?�?����������������������{�d�]�V�P�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�P�b�p�r�v�w�z�����������������������0?77)!%(���7%��@�@����������������������x�`�Y�V�P�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N�c�s�w�y�������������������������$/<1*#.< ���7��A�A����������������������o�`�Y�U�O�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�P�a�l�u�������������������������� ,81*&2<! � ��6��B�B����������������������r�^�Z�W�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�[�l�o�w���������������������������#6 '''?���8F��C�C����������������������q�]�Z�W�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�a�i�o�u����������������������������"&4*$-;"��8w��D�D����������������������t�_�Y�W�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�V�_�g�m�u����������������������������85$-(���8��E�E����������������������l�\�[�X�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�[�e�k�u�����������������������������$%61$(#%��8��F�F����������������������j�[�Y�W�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�Z�`�i�q�{�����������������������������,-3-,( ��9`��G�G����������������������f�\�Z�V�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�O�U�]�h�r�x����������������������������� )("2&:'��8��H�H���������������������o�b�[�Z�W�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�O�Z�f�o�s������������������������������ %9%0+"��9T��I�I���������������������p�_�\�Z�W�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�L�L�K�N�W�`�k�p��������{����������������������  )08(��8.��J�J���������������������i�`�\�\�W�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�M�M�K�N�Q�W�m�i�e������|������������������������ ,/8(��8\��K�K��������������������c�N�M�^�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�M�K�K�M�O�T�g�p�v�������������������������������  $380��8B��L�L��������������������w�d�a�K�K�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N�R�e�f�V�{����u������}�������������������� � !:8:��8��M�M�������������������x�g�b�_�`�_�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N�K�K�N�N�O�i�W�R�n��������z���������������������� ";7E��8Y��N�N�������������������|�h�`�^�_�]�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�L�L�L�X�p�u�w�V��d�h����y����������������������� 7=Z��8��O�O�������������������W�h�`�\�_�^�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�L�K�M�L�M�Q�k�t�{�e��b����q������������������������� 6:J��8��P�P������������������x�t�[�`�L�K�_�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N�K�K�K�M�Q�g�s�~�]�|���z�}�������������������������%9H��8l��Q�Q������������������x�n�e�V�^�[�^�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�L�K�L�N�M�_�q�~�}�[��}�|����������������������������9L��9!��R�R�����������������v�w�p�e�a�\�O�_�W�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N�M�Y�t��q�~���~���������������������������6O��8��S�S����������������z�W�N�g�d�a�b�_�]�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�M�N�]�{��m�}��������������������������������4V��9��T�T����������������y�r�p�h�d�_�b�b�]�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�^���z�������������������������������� 1E��8��U�U��������������z�k��y�t�n�j�d�c�a�b�_�]�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�h��~�~������������������������������� *E��9O��V�V���������������~�r�{�w�t�o�g�f�e�W�b�^�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�i��~�������������������������������� &=��8Ǫ��W�W����������������k�t�w�u�r�g�g�e�c�K�U�\�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�W�����������������������������������:��9ª��X�X�����������������a�z�t�s�i�h�W�e�`�[�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K���������������������������������� 7��9Ū��Y�Y������������������X�s�q�j�Z�i�c�`�^�[�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�������������������������������� 5��8��Z�Z������������������w�O�p�n�n�j�e�a�^�[�Y�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�������������������������������� -��8��[�[�������������������s�j�h�m�l�h�b�`�\�[�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�������������������������������� $.��8��\�\�������������������x�k�n�o�m�h�d�`�^�[�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�N������������������������������#3��8��]�]�������������������}�s�t�m�l�j�e�a�]�\�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K����������������������������� "0��8 ��^�^��������������������y�u�r�k�i�f�a�_�\�X�N�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K����������������������������� !3��7��_�_��������������������{�w�s�l�h�f�a�`�[�\�V�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�s���������������������������� #1��8P��`�`���������������������y�t�n�g�f�c�b�^�Z�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�����w����������������������� ��6z��a�a���������������������z�w�s�h�f�d�a�_�\�Y�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�|�}���h����w������������������ 2��7��b�b���������������������|�x�q�k�f�e�a�]�^�S�U�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�p�x�}��������������������������6��c�c����������������������|�m�j�f�f�c�`�_�[�[�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�q�u�y�}�}���������������������� %��7��d�d����������������������x�o�j�g�g�c�b�`�]�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�m�n�r�t�w�~��������������������� $2��7��e�e����������������������{�o�k�g�g�d�b�`�^�Y�L�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�e�P�i�z�}�f�g�������������������%7��7̪��f�f�����������������������q�k�g�f�d�c�a�_�Y�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Y�_�c�t�|�q�������������������� 18��7ʪ��g�g�����������������������s�k�h�g�e�b�b�`�Y�T�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�X�e�f�r�w�}������������������� 2��7��h�h�����������������������x�k�g�g�d�c�b�_�Y�U�M�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�X�f�c�n�}�~������������������ )��7��i�i�����������������������t�k�g�f�d�c�b�]�Y�V�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�[�O�h�z�x�~���������������� #9��6|��j�j�����������������������p�j�f�f�d�^�d�_�Y�U�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�^�_�k�q�s���������������� �;��5_��k�k�����������������������p�i�g�g�c�d�c�_�Y�W�P�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�_�p�b�l�g�g�����������������C��6��l�l�����������������������k�j�k�g�e�e�d�_�Y�V�R�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�T�X�V�]�]�l�j���{������������$��5 ��m�m�����������������������p�k�k�i�e�e�e�`�Z�W�T�O�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�T�V�d�\�e�x���������������-��4��n�n�����������������������o�m�l�j�f�f�e�]�[�X�U�P�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�X�[�`�V�l�q�w�v������������2��3n��o�o�������������a����������p�m�l�j�g�g�e�^�[�X�S�Q�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�O�R�\�`�T�S�^�a�p���~������������2��p�p��������������_���������p�n�l�k�h�g�g�^�Z�Y�V�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�P�X�X�[�\�P�\�[�h�p�w�o�t�������������3��q�q����������������d�������q�r�k�k�h�N�L�a�K�K�P�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�S�\�]�Y�\�O�`�h�^�d�b��������������3n��r�r�������������������R����O�N�N�N�N�]�S�K�[�W�Q�U�X�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�U�S�Z�f�W�g�j�g�t�n�|����������� ��2��s�s��������������������Q�]���s�n�k�i�h�e�_�\�]�Y�V�T�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�K�Y�M�\�]�`�h�i�k�o�|�����������2]��t�t������������������������p�n�k�i�i�d�_�\�[�Z�W�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�R�X�V�d�d�c�e�b�h�x�|�~�������������5Z��u�u������������������������r�n�j�i�h�c�^�\�]�W�X�S�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Y�W�d�h�f�i�t�v�s�w�t�t�y������������5n��v�v������������������������t�o�n�i�h�d�^�[�\�\�X�T�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�]�^�[�d�a�h�j�e�j�e�q�~������������5��w�w�������������������������o�n�j�i�^�_�[�Y�V�S�T�T�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�U�[�X�U�e�Y�Y�f�i�n�n�~������������4��x�x������������������������~�f�d�a�^�X�Y�Y�W�T�O�M�L�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�K�Q�N�N�R�U�b�k�]�`�o�z�}�����������3>����������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/recode-rus.dat����������������������������������������������������������0000664�0001750�0001750�00000026030�13701057751�017137� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UTF-8�������������������Улучшаем интернационализацию GDAL.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������CP1251������������������ GDAL.������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������KOI8-R������������������ GDAL.������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UCS-2�������������������#;CGH05< �8=B5@=0F8>=0;870F8N �G�D�A�L�.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UCS-2BE�����������������#;CGH05<� 8=B5@=0F8>=0;870F8N� �G�D�A�L�.��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UCS-2LE�����������������#;CGH05< �8=B5@=0F8>=0;870F8N �G�D�A�L�.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UCS-4���������������������#��;��C��G��H��0��5��<��� ��8��=��B��5��@��=��0��F��8��>��=��0��;��8��7��0��F��8��N��� ���G���D���A���L���.������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UCS-4BE�������������������#��;��C��G��H��0��5��<��� ��8��=��B��5��@��=��0��F��8��>��=��0��;��8��7��0��F��8��N��� ���G���D���A���L���.������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UCS-4LE�����������������#��;��C��G��H��0��5��<�� ���8��=��B��5��@��=��0��F��8��>��=��0��;��8��7��0��F��8��N�� ���G���D���A���L���.���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UTF-16������������������#;CGH05< �8=B5@=0F8>=0;870F8N �G�D�A�L�.�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������UTF-32��������������������#��;��C��G��H��0��5��<�� ���8��=��B��5��@��=��0��F��8��>��=��0��;��8��7��0��F��8��N�� ���G���D���A���L���.�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/pixel_per_line.asc������������������������������������������������������0000664�0001750�0001750�00000005623�13701057751�020070� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ncols 15 nrows 12 xllcorner 0.100000E+06 yllcorner 0.650000E+06 cellsize .500E+02 nodata_value -99999 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .270E+01 .186E+01 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .614E+01 .931E+01 .868E+01 .200E+02 .266E+02 .122E+02 .313E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .162E+02 .542E+02 .944E+02 .953E+02 .977E+02 .833E+02 .505E+02 .144E+02 .209E+01 .000E+00 .000E+00 .000E+00 .000E+00 .199E+01 .170E+02 .784E+02 .173E+03 .266E+03 .332E+03 .264E+03 .230E+03 .120E+03 .415E+02 .941E+01 .801E+00 .240E+02 .000E+00 .410E+01 .177E+02 .116E+03 .303E+03 .562E+03 .756E+03 .759E+03 .618E+03 .309E+03 .171E+03 .603E+02 .792E+02 .254E+03 .242E+03 .483E+00 .678E+01 .529E+02 .212E+03 .585E+03 .108E+04 .140E+04 .128E+04 .817E+03 .436E+03 .219E+03 .275E+03 .890E+03 .145E+04 .158E+04 .000E+00 .307E+01 .162E+02 .141E+03 .435E+03 .862E+03 .109E+04 .889E+03 .559E+03 .289E+03 .296E+03 .116E+04 .245E+04 .332E+04 .309E+04 .000E+00 .000E+00 .516E+01 .296E+02 .128E+03 .245E+03 .305E+03 .223E+03 .119E+03 .472E+02 .517E+03 .173E+04 .289E+04 .345E+04 .309E+04 .000E+00 .000E+00 .000E+00 .266E+01 .107E+02 .192E+02 .146E+02 .182E+02 .805E+01 .378E+02 .442E+03 .165E+04 .274E+04 .280E+04 .214E+04 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .528E+00 .000E+00 .495E+00 .000E+00 .706E+01 .225E+03 .123E+04 .210E+04 .189E+04 .105E+04 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .844E+02 .405E+03 .752E+03 .430E+03 .244E+03 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .577E+02 .350E+02 .196E+02 .503E+01 �������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/poly.shx����������������������������������������������������������������0000664�0001750�0001750�00000000264�13701057751�016105� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������' �����������������������Z�������� 1A��� @+RA���@eA���-RA�����������������������������������2������������������������H������������������������@��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/float32.tif�������������������������������������������������������������0000664�0001750�0001750�00000003620�13701057751�016353� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�H����B��B��C��B��C��C�� C��C��C��C��B��C��B��C��C��B��B��B��C��C��B��C��B��B��C��B��%C��B�� C��B��B��B��B��C��B��C��C��C��B��C��B��C�� C��C��B��B�� C��B�� C��B��C��B��B��C��C��B��B��B��B��B��C��C��B��B��B��C��C��B��B��B��B��B��B��B��C��B��B�� C��B��C��C��C��C�� C��C��C��B��B��B��B��C��B��%C��B��C��B��B��C��C��B��=C��-C��-C��C��C��B��C��B��B��C��B��C��C��B��B��B��C��C��NC��B��EC��-C��C�� C�� C��C��B��C��B��B�� C��C��C��B��C��B��C��-C��B��B��C��B��C��B��C��B�� C��B��B��B��C��B��B��B��B��B��B��5C��B��B��B��B��C��B��B��C��B��C��C��B��B��C��B��B��B��B��C��B��B��B�� C�� C��B�� C��B��B��B��B��C��B��B��B��B��B��C��B��B��B��C��C��C��C��C��B��B��C��B��B��C��B��B��B�� C��-C��B��B��B��B��B��B��B��B��B��B�� C��B��B��B��B��B��B��-C��B��B��B��B��B��C��B��B��-C��C��B��B��B��B��B��B��B��=C��-C��B��B��B��B��B�� C��B��-C�� C��C��C��C��B��B��B��B��B��B��C��B�� C��B��C��B��B��C��B��C�� C�� C��B�� C��B��B��B��B��B��B��B��B��B��B��B��B��C��B��C��B��C��%C��C��C��B��B��B��B��B�� C��B��B��B��B��B��B��C��B��B��B��B��=C��-C�� C�� C��%C��B��C��B��B��B��B��B��B��B��B��C��B��B��C��C��C��5C�� C��-C��B��C��B��B��B��B��B��B��B�� C��C��C��%C�� C�� C��B��-C��wC��C��NC��C��B�� C��B��C��C��%C��%C��C�� C��C��B��B��B��B��B��5C��5C��C��C��C��C��C��5C��C��C��B��C��B��B��B��B��B��B��B��B�������������������� ������������������������������������������@���������S������� ������ ����������J������z������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�����������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/test.json���������������������������������������������������������������0000664�0001750�0001750�00000005675�13701057751�016263� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������{ "resource": { "id": 0, "cls": "resource_group", "parent": null, "owner_user": { "id": 4 }, "permissions": [ { "action": "allow", "principal": { "id": 5 }, "identity": "", "scope": "", "permission": "", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "resource", "permission": "read", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "metadata", "permission": "read", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "datastruct", "permission": "read", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "data", "permission": "read", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "connection", "permission": "connect", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "service", "permission": "connect", "propagate": true }, { "action": "allow", "principal": { "id": 2 }, "identity": "", "scope": "webmap", "permission": "display", "propagate": true }, { "action": "allow", "principal": { "id": 7 }, "identity": "", "scope": "data", "permission": "write", "propagate": true } ], "keyname": null, "display_name": "Main resources group", "description": null, "children": true, "interfaces": [], "scopes": [ "resource", "metadata" ] }, "resmeta": { "items": {} } } �������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/byte.tif.grd������������������������������������������������������������0000664�0001750�0001750�00000005604�13701057751�016623� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ncols 20 nrows 20 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 107 123 132 115 132 132 140 132 132 132 107 132 107 132 132 107 123 115 156 148 115 132 107 123 148 115 165 115 140 107 123 123 99 132 123 132 132 132 99 156 115 132 140 132 123 115 140 107 140 115 132 123 107 132 132 115 115 107 115 107 148 132 123 123 115 132 132 123 115 123 115 123 107 115 148 107 115 140 115 132 132 156 132 140 132 132 115 115 115 123 148 123 165 123 132 107 107 132 156 123 189 173 173 148 148 115 148 123 107 132 115 132 156 99 123 115 132 132 206 107 197 173 148 140 140 132 99 132 123 115 140 132 132 99 132 123 132 173 123 115 148 123 148 115 148 123 140 123 107 115 132 115 107 115 99 123 99 181 99 107 123 115 132 115 123 132 115 132 132 123 123 132 99 115 99 123 132 115 115 107 140 140 99 140 99 115 123 107 132 107 115 107 115 123 132 123 107 123 132 132 132 132 132 123 99 132 123 107 148 99 115 123 140 173 123 107 123 123 123 107 123 123 123 107 140 123 123 115 115 90 107 173 107 107 107 107 99 132 123 115 173 148 99 123 123 107 123 99 107 189 173 107 115 115 107 99 140 107 173 140 148 132 132 107 123 99 99 115 99 132 99 140 115 148 123 99 132 123 148 140 140 107 140 90 107 115 107 90 99 123 115 115 115 123 123 148 115 148 99 132 165 148 156 123 107 107 107 115 140 99 115 99 99 107 115 132 115 90 123 115 189 173 140 140 165 115 132 90 99 115 90 99 99 107 99 132 99 107 132 132 156 181 140 173 123 132 99 115 123 74 115 99 123 140 156 132 165 140 140 99 173 247 255 206 132 107 140 123 148 132 165 165 148 140 132 123 107 123 107 123 181 181 156 148 156 156 156 181 132 148 115 132 107 107 107 107 107 115 99 107 ����������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/cint16.tif��������������������������������������������������������������0000664�0001750�0001750�00000003620�13701057751�016205� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�H��k���{������s���������������������k������k���������k���{���s���������s������k���{������s������s������k���{���{���c������{������������c������s������������{���s������k������s������{���k���������s���s���k���s���k���������{���{���s���������{���s���{���s���{���k���s������k���s������s������������������������s���s���s���{������{������{������k���k���������{������������������s������{���k������s���������c���{���s������������k���������������������c������{���s������������c������{���������{���s������{������s������{������{���k���s������s���k���s���c���{���c������c���k���{���s������s���{������s���������{���{������c���s���c���{������s���s���k���������c������c���s���{���k������k���s���k���s���{������{���k���{������������������{���c������{���k������c���s���{���������{���k���{���{���{���k���{���{���{���k������{���{���s���s���Z���k������k���k���k���k���c������{���s���������c���{���{���k���{���c���k���������k���s���s���k���c������k������������������k���{���c���c���s���c������c������s������{���c������{������������k������Z���k���s���k���Z���c���{���s���s���s���{���{������s������c���������������{���k���k���k���s������c���s���c���c���k���s������s���Z���{���s������������������s������Z���c���s���Z���c���c���k���c������c���k���������������������{������c���s���{���J���s���c���{���������������������c������������������k������{������������������������{���k���{���k���{���������������������������������s������k���k���k���k���k���s���c���k����������������������� ������������������������������������������@���������S������� ������ ����������J������z������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�����������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/poly.shp����������������������������������������������������������������0000664�0001750�0001750�00000010744�13701057751�016101� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������' ������������������������������ 1A��� @+RA���@eA���-RA���������������������������������������������|FA��� .-RA���RA���-RA�������������`/IA��� -RA���(GA���-RA����|FA���`-RA���GA��� -RA��� LA���-RA���`LA���-RA��� NA���-RA��� )OA���-RA����QA���U-RA���RA���E-RA���NA��� .-RA��� AMA���L-RA���KMA���`^-RA���@cMA���t-RA���LA���-RA���NLA���-RA���KA���`-RA���JA���-RA���IA���-RA���`/IA��� -RA������������<A���3-RA��� LA���-RA�������������`LA���-RA��� LA���-RA���GA��� -RA����|FA���`-RA���(GA���-RA���`/IA��� -RA���`HA���`m-RA��� GA����C-RA����CA���C-RA���BA��� C-RA����AA���B-RA���?A���4-RA���@s?A���3-RA��� M>A���U-RA��� =A���@o-RA���<A���m-RA���<A���v-RA���>A��� -RA���^FA���-RA���`LA���-RA������������@7>A���@,RA���@cMA���`-RA�������������`/IA��� -RA���IA���-RA���JA���-RA���KA���`-RA���NLA���-RA���LA���-RA���@cMA���t-RA���KMA���`^-RA��� LA���\-RA���JA����W-RA���\JA����R-RA���GA���@0-RA��� GA����--RA��� sFA���&-RA���WFA��� -RA���FA����-RA��� EA��� -RA��� DA���`-RA���CDA���`,RA���@@A���@,RA���@7>A���+-RA���@s?A���3-RA���?A���4-RA����AA���B-RA���BA��� C-RA����CA���C-RA��� GA����C-RA���`HA���`m-RA���`/IA��� -RA������������ 1A���,RA���'AA���v-RA�������������<A���v-RA���<A���m-RA���@7>A���+-RA���@@A���@,RA���'AA���@,RA��� `@A���,RA���?A��� ,RA����*>A���,RA��� <A���,RA���:A���,RA���@s8A��� ,RA��� 4A���,RA����3A���`,RA���3A��� ,RA���@3A���,RA���3A���,RA���4A���`,RA����l7A���-RA��� t6A��� -RA���`6A���-RA����5A���-RA���3A���,RA���@ 3A���,RA��� 1A����3-RA����:A����k-RA���<A���v-RA������H������<A���+-RA���@s?A���@o-RA�������������<A���m-RA��� =A���@o-RA��� M>A���U-RA���@s?A���3-RA���@7>A���+-RA���<A���m-RA������������CDA���`,RA���NA���`^-RA�������������KMA���`^-RA��� AMA���L-RA���NA��� .-RA���KA����-RA���HA���-RA���GA����-RA���``FA���@ -RA���`FA���,RA���CDA���`,RA��� DA���`-RA��� EA��� -RA���FA����-RA���WFA��� -RA��� sFA���&-RA��� GA����--RA���GA���@0-RA���\JA����R-RA���JA����W-RA��� LA���\-RA���KMA���`^-RA�����������KA���,RA���nWA���U-RA�������������RA���E-RA���dTA���U-RA���TA���=-RA����tUA���(-RA���@VA���-RA����WA���-RA���`2UA��� -RA���rTA���@-RA��� TA���-RA���nWA���`,RA���VA���`,RA���`VA���,RA���`=VA���`,RA���!UA���@,RA���SA���,RA��� QA���@,RA���@OA���,RA���tNA���,RA���@OA����,RA���PA��� ,RA����PA���,RA���@^QA���@,RA���^QA��� ,RA��� PA���-RA���NA���-RA����wMA���-RA����,LA����-RA���@KA����-RA���KA����-RA���NA��� .-RA���RA���E-RA������������DA��� @+RA���@eA���Q-RA���=����������@VA���-RA���WA���-RA���XA����%-RA��� hZA���,-RA���ZA����--RA����a[A���2-RA����]A����B-RA���`]A���P-RA���@`A��� 3-RA���`,`A���"-RA���bA��� 2-RA���bA���@B-RA���cA���I-RA��� dA���M-RA����dA���Q-RA���eA���<-RA���`weA���`'-RA���@eA���`-RA���eA���-RA���@M_A���,RA���@^A���`,RA���^A���,RA����^A���,RA���^A����,RA���]A���,RA���]A��� ,RA���`^A����,RA���]A���Z,RA���@]A���R,RA���?\A���`<,RA���YA���,RA���@XA����,RA���WA��� +RA���9VA���+RA���@_UA����,RA���gPA��� +RA����vOA���`+RA���OA���@+RA���` OA���+RA���FPA���`+RA���PA���m+RA���`'OA���T+RA���@IA��� @+RA��� IA���@D+RA���GA���`+RA���DA���2,RA���@DA���C,RA���MA��� ,RA���@OA���,RA��� QA���@,RA���SA���,RA���!UA���@,RA���`=VA���`,RA���`VA���,RA���VA���`,RA���nWA���`,RA��� TA���-RA���rTA���@-RA���`2UA��� -RA����WA���-RA���@VA���-RA��� ���������@@A���2,RA���^QA����-RA�������������HA���-RA���KA����-RA���@KA����-RA����,LA����-RA����wMA���-RA���NA���-RA��� PA���-RA���^QA��� ,RA���@^QA���@,RA����PA���,RA���PA��� ,RA���@OA����,RA���tNA���,RA���@OA���,RA���MA��� ,RA���@DA���C,RA���DA���2,RA����CA��� 6,RA����KCA���U,RA����0CA���],RA���BA����q,RA���AA���,RA���'AA���@,RA���@@A���@,RA���CDA���`,RA���`FA���,RA���HA���-RA��� ���@������``FA���,RA���HA����-RA�������������HA���-RA���`FA���,RA���``FA���@ -RA���GA����-RA���HA���-RA����������������������������gdalautotest-3.1.2/cpp/data/uint16.tif��������������������������������������������������������������0000664�0001750�0001750�00000002160�13701057751�016225� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�(��k�{��s�������k��k���k�{�s���s��k�{��s��s��k�{�{�c��{����c��s����{�s��k��s��{�k���s�s�k�s�k���{�{�s���{�s�{�s�{�k�s��k�s��s��������s�s�s�{��{��{��k�k���{������s��{�k��s���c�{�s����k�������c��{�s����c��{���{�s��{��s��{��{�k�s��s�k�s�c�{�c��c�k�{�s��s�{��s���{�{��c�s�c�{��s�s�k���c��c�s�{�k��k�s�k�s�{��{�k�{������{�c��{�k��c�s�{���{�k�{�{�{�k�{�{�{�k��{�{�s�s�Z�k��k�k�k�k�c��{�s���c�{�{�k�{�c�k���k�s�s�k�c��k������k�{�c�c�s�c��c��s��{�c��{����k��Z�k�s�k�Z�c�{�s�s�s�{�{��s��c�����{�k�k�k�s��c�s�c�c�k�s��s�Z�{�s������s��Z�c�s�Z�c�c�k�c��c�k�������{��c�s�{�J�s�c�{�������c������k��{��������{�k�{�k�{�����������s��k�k�k�k�k�s�c�k��������������������������������������������������������������� ���������S������� ������ ����������*������Z������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/cfloat64.tif������������������������������������������������������������0000664�0001750�0001750�00000015120�13701057751�016521� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*��������Z@�������������^@�������������`@�������������\@�������������`@�������������`@�������������a@�������������`@�������������`@�������������`@�������������Z@�������������`@�������������Z@�������������`@�������������`@�������������Z@�������������^@�������������\@�������������c@�������������b@�������������\@�������������`@�������������Z@�������������^@�������������b@�������������\@�������������d@�������������\@�������������a@�������������Z@�������������^@�������������^@�������������X@�������������`@�������������^@�������������`@�������������`@�������������`@�������������X@�������������c@�������������\@�������������`@�������������a@�������������`@�������������^@�������������\@�������������a@�������������Z@�������������a@�������������\@�������������`@�������������^@�������������Z@�������������`@�������������`@�������������\@�������������\@�������������Z@�������������\@�������������Z@�������������b@�������������`@�������������^@�������������^@�������������\@�������������`@�������������`@�������������^@�������������\@�������������^@�������������\@�������������^@�������������Z@�������������\@�������������b@�������������Z@�������������\@�������������a@�������������\@�������������`@�������������`@�������������c@�������������`@�������������a@�������������`@�������������`@�������������\@�������������\@�������������\@�������������^@�������������b@�������������^@�������������d@�������������^@�������������`@�������������Z@�������������Z@�������������`@�������������c@�������������^@�������������g@�������������e@�������������e@�������������b@�������������b@�������������\@�������������b@�������������^@�������������Z@�������������`@�������������\@�������������`@�������������c@�������������X@�������������^@�������������\@�������������`@�������������`@�������������i@�������������Z@�������������h@�������������e@�������������b@�������������a@�������������a@�������������`@�������������X@�������������`@�������������^@�������������\@�������������a@�������������`@�������������`@�������������X@�������������`@�������������^@�������������`@�������������e@�������������^@�������������\@�������������b@�������������^@�������������b@�������������\@�������������b@�������������^@�������������a@�������������^@�������������Z@�������������\@�������������`@�������������\@�������������Z@�������������\@�������������X@�������������^@�������������X@�������������f@�������������X@�������������Z@�������������^@�������������\@�������������`@�������������\@�������������^@�������������`@�������������\@�������������`@�������������`@�������������^@�������������^@�������������`@�������������X@�������������\@�������������X@�������������^@�������������`@�������������\@�������������\@�������������Z@�������������a@�������������a@�������������X@�������������a@�������������X@�������������\@�������������^@�������������Z@�������������`@�������������Z@�������������\@�������������Z@�������������\@�������������^@�������������`@�������������^@�������������Z@�������������^@�������������`@�������������`@�������������`@�������������`@�������������`@�������������^@�������������X@�������������`@�������������^@�������������Z@�������������b@�������������X@�������������\@�������������^@�������������a@�������������e@�������������^@�������������Z@�������������^@�������������^@�������������^@�������������Z@�������������^@�������������^@�������������^@�������������Z@�������������a@�������������^@�������������^@�������������\@�������������\@�������������V@�������������Z@�������������e@�������������Z@�������������Z@�������������Z@�������������Z@�������������X@�������������`@�������������^@�������������\@�������������e@�������������b@�������������X@�������������^@�������������^@�������������Z@�������������^@�������������X@�������������Z@�������������g@�������������e@�������������Z@�������������\@�������������\@�������������Z@�������������X@�������������a@�������������Z@�������������e@�������������a@�������������b@�������������`@�������������`@�������������Z@�������������^@�������������X@�������������X@�������������\@�������������X@�������������`@�������������X@�������������a@�������������\@�������������b@�������������^@�������������X@�������������`@�������������^@�������������b@�������������a@�������������a@�������������Z@�������������a@�������������V@�������������Z@�������������\@�������������Z@�������������V@�������������X@�������������^@�������������\@�������������\@�������������\@�������������^@�������������^@�������������b@�������������\@�������������b@�������������X@�������������`@�������������d@�������������b@�������������c@�������������^@�������������Z@�������������Z@�������������Z@�������������\@�������������a@�������������X@�������������\@�������������X@�������������X@�������������Z@�������������\@�������������`@�������������\@�������������V@�������������^@�������������\@�������������g@�������������e@�������������a@�������������a@�������������d@�������������\@�������������`@�������������V@�������������X@�������������\@�������������V@�������������X@�������������X@�������������Z@�������������X@�������������`@�������������X@�������������Z@�������������`@�������������`@�������������c@�������������f@�������������a@�������������e@�������������^@�������������`@�������������X@�������������\@�������������^@�������������R@�������������\@�������������X@�������������^@�������������a@�������������c@�������������`@�������������d@�������������a@�������������a@�������������X@�������������e@�������������n@�������������o@�������������i@�������������`@�������������Z@�������������a@�������������^@�������������b@�������������`@�������������d@�������������d@�������������b@�������������a@�������������`@�������������^@�������������Z@�������������^@�������������Z@�������������^@�������������f@�������������f@�������������c@�������������b@�������������c@�������������c@�������������c@�������������f@�������������`@�������������b@�������������\@�������������`@�������������Z@�������������Z@�������������Z@�������������Z@�������������Z@�������������\@�������������X@�������������Z@��������������������������������������������������������������������������������S������� ������ ���������� ������:������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/cint32.tif��������������������������������������������������������������0000664�0001750�0001750�00000006720�13701057751�016207� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*� ��k�������{��������������s�������������������������������������������������k��������������k���������������������k�������{�������s���������������������s��������������k�������{��������������s��������������s��������������k�������{�������{�������c��������������{����������������������������c��������������s����������������������������{�������s��������������k��������������s��������������{�������k���������������������s�������s�������k�������s�������k���������������������{�������{�������s���������������������{�������s�������{�������s�������{�������k�������s��������������k�������s��������������s��������������������������������������������������������s�������s�������s�������{��������������{��������������{��������������k�������k���������������������{������������������������������������������s��������������{�������k��������������s���������������������c�������{�������s����������������������������k�������������������������������������������������c��������������{�������s����������������������������c��������������{���������������������{�������s��������������{��������������s��������������{��������������{�������k�������s��������������s�������k�������s�������c�������{�������c��������������c�������k�������{�������s��������������s�������{��������������s���������������������{�������{��������������c�������s�������c�������{��������������s�������s�������k���������������������c��������������c�������s�������{�������k��������������k�������s�������k�������s�������{��������������{�������k�������{������������������������������������������{�������c��������������{�������k��������������c�������s�������{���������������������{�������k�������{�������{�������{�������k�������{�������{�������{�������k��������������{�������{�������s�������s�������Z�������k��������������k�������k�������k�������k�������c��������������{�������s���������������������c�������{�������{�������k�������{�������c�������k���������������������k�������s�������s�������k�������c��������������k������������������������������������������k�������{�������c�������c�������s�������c��������������c��������������s��������������{�������c��������������{����������������������������k��������������Z�������k�������s�������k�������Z�������c�������{�������s�������s�������s�������{�������{��������������s��������������c�����������������������������������{�������k�������k�������k�������s��������������c�������s�������c�������c�������k�������s��������������s�������Z�������{�������s������������������������������������������s��������������Z�������c�������s�������Z�������c�������c�������k�������c��������������c�������k�������������������������������������������������{��������������c�������s�������{�������J�������s�������c�������{�������������������������������������������������c������������������������������������������k��������������{��������������������������������������������������������{�������k�������{�������k�������{�����������������������������������������������������������������������������s��������������k�������k�������k�������k�������k�������s�������c�������k���������������������������@������������������������������������������ ���������S������� ����B �� ����Z ������ ������ ������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�������������������������������������������������gdalautotest-3.1.2/cpp/data/int16.tif���������������������������������������������������������������0000664�0001750�0001750�00000002160�13701057751�016040� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�(��k�{��s�������k��k���k�{�s���s��k�{��s��s��k�{�{�c��{����c��s����{�s��k��s��{�k���s�s�k�s�k���{�{�s���{�s�{�s�{�k�s��k�s��s��������s�s�s�{��{��{��k�k���{������s��{�k��s���c�{�s����k�������c��{�s����c��{���{�s��{��s��{��{�k�s��s�k�s�c�{�c��c�k�{�s��s�{��s���{�{��c�s�c�{��s�s�k���c��c�s�{�k��k�s�k�s�{��{�k�{������{�c��{�k��c�s�{���{�k�{�{�{�k�{�{�{�k��{�{�s�s�Z�k��k�k�k�k�c��{�s���c�{�{�k�{�c�k���k�s�s�k�c��k������k�{�c�c�s�c��c��s��{�c��{����k��Z�k�s�k�Z�c�{�s�s�s�{�{��s��c�����{�k�k�k�s��c�s�c�c�k�s��s�Z�{�s������s��Z�c�s�Z�c�c�k�c��c�k�������{��c�s�{�J�s�c�{�������c������k��{��������{�k�{�k�{�����������s��k�k�k�k�k�s�c�k��������������������������������������������������������������� ���������S������� ������ ����������*������Z������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/poly.dbf����������������������������������������������������������������0000664�0001750�0001750�00000001021�13701057751�016026� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������_ ����(���������������������AREA�������N���� ��������������EAS_ID�����N���� ���������������PRFEDEA����C������������������� 215229.266 16835043411 247328.172 17935043423 261752.781 17135043414 547597.188 17335043416 15775.758 17235043415 101429.977 16935043412 268597.625 16635043409 1634833.375 15835043369 596610.313 16535043408 5268.813 17035043413 ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/uint32.tif��������������������������������������������������������������0000664�0001750�0001750�00000003620�13701057751�016225� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*�H��k���{������s���������������������k������k���������k���{���s���������s������k���{������s������s������k���{���{���c������{������������c������s������������{���s������k������s������{���k���������s���s���k���s���k���������{���{���s���������{���s���{���s���{���k���s������k���s������s������������������������s���s���s���{������{������{������k���k���������{������������������s������{���k������s���������c���{���s������������k���������������������c������{���s������������c������{���������{���s������{������s������{������{���k���s������s���k���s���c���{���c������c���k���{���s������s���{������s���������{���{������c���s���c���{������s���s���k���������c������c���s���{���k������k���s���k���s���{������{���k���{������������������{���c������{���k������c���s���{���������{���k���{���{���{���k���{���{���{���k������{���{���s���s���Z���k������k���k���k���k���c������{���s���������c���{���{���k���{���c���k���������k���s���s���k���c������k������������������k���{���c���c���s���c������c������s������{���c������{������������k������Z���k���s���k���Z���c���{���s���s���s���{���{������s������c���������������{���k���k���k���s������c���s���c���c���k���s������s���Z���{���s������������������s������Z���c���s���Z���c���c���k���c������c���k���������������������{������c���s���{���J���s���c���{���������������������c������������������k������{������������������������{���k���{���k���{���������������������������������s������k���k���k���k���k���s���c���k����������������������� ������������������������������������������@���������S������� ������ ����������J������z������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�����������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/do-not-remove�����������������������������������������������������������0000664�0001750�0001750�00000000000�13701057751�017000� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/data/cfloat32.tif������������������������������������������������������������0000664�0001750�0001750�00000006720�13701057751�016522� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*� ����B������B������C������B������C������C������ C������C������C������C������B������C������B������C������C������B������B������B������C������C������B������C������B������B������C������B������%C������B������ C������B������B������B������B������C������B������C������C������C������B������C������B������C������ C������C������B������B������ C������B������ C������B������C������B������B������C������C������B������B������B������B������B������C������C������B������B������B������C������C������B������B������B������B������B������B������B������C������B������B������ C������B������C������C������C������C������ C������C������C������B������B������B������B������C������B������%C������B������C������B������B������C������C������B������=C������-C������-C������C������C������B������C������B������B������C������B������C������C������B������B������B������C������C������NC������B������EC������-C������C������ C������ C������C������B������C������B������B������ C������C������C������B������C������B������C������-C������B������B������C������B������C������B������C������B������ C������B������B������B������C������B������B������B������B������B������B������5C������B������B������B������B������C������B������B������C������B������C������C������B������B������C������B������B������B������B������C������B������B������B������ C������ C������B������ C������B������B������B������B������C������B������B������B������B������B������C������B������B������B������C������C������C������C������C������B������B������C������B������B������C������B������B������B������ C������-C������B������B������B������B������B������B������B������B������B������B������ C������B������B������B������B������B������B������-C������B������B������B������B������B������C������B������B������-C������C������B������B������B������B������B������B������B������=C������-C������B������B������B������B������B������ C������B������-C������ C������C������C������C������B������B������B������B������B������B������C������B������ C������B������C������B������B������C������B������C������ C������ C������B������ C������B������B������B������B������B������B������B������B������B������B������B������B������C������B������C������B������C������%C������C������C������B������B������B������B������B������ C������B������B������B������B������B������B������C������B������B������B������B������=C������-C������ C������ C������%C������B������C������B������B������B������B������B������B������B������B������C������B������B������C������C������C������5C������ C������-C������B������C������B������B������B������B������B������B������B������ C������C������C������%C������ C������ C������B������-C������wC������C������NC������C������B������ C������B������C������C������%C������%C������C������ C������C������B������B������B������B������B������5C������5C������C������C������C������C������C������5C������C������C������B������C������B������B������B������B������B������B������B������B������������������������@������������������������������������������ ���������S������� ����B �� ����Z ������ ������ ������������N@������N@������������������������������������@A����̞LA�������������������������� ���Wh ���)#NAD27 / UTM zone 11N|�������������������������������������������������gdalautotest-3.1.2/cpp/data/bug1488.tif�������������������������������������������������������������0000664�0001750�0001750�00000142172�13701057751�016211� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������II*���� ������ N������ N�������������Q�����������������������B�������C�������D�a��(b��E�a�����S���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������RIFF���WEBPVP8 ���p�*��>HM%#" (� inv��9}rd={퓐'!NCl9}rd={퓐'!NCl9}rd={퓐'!NCl9}rd=€�c���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_ogr_geos.cpp������������������������������������������������������������0000664�0001750�0001750�00000035407�13701057761�017044� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test GEOS integration in OGR - geometric operations. // Ported from ogr/ogr_geos.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "ogr_api.h" #include "ogrsf_frmts.h" #ifdef HAVE_GEOS #include <geos_c.h> #endif #include <string> namespace tut { // Common fixture with test data struct test_geos_data { OGRErr err_; OGRGeometryH g1_; OGRGeometryH g2_; OGRGeometryH g3_; test_geos_data() : err_(OGRERR_NONE), g1_(nullptr), g2_(nullptr), g3_(nullptr) {} ~test_geos_data() { OGR_G_DestroyGeometry(g1_); OGR_G_DestroyGeometry(g2_); OGR_G_DestroyGeometry(g3_); } }; // Register test group typedef test_group<test_geos_data> group; typedef group::object object; group test_geos_group("OGR::GEOS"); #ifdef OGR_ENABLED #ifdef HAVE_GEOS // Test GEOS support enabled template<> template<> void object::test<1>() { // HAVE_GEOS definition promises GEOS support is enabled ensure(true); } // Test export OGR geometry to GEOS using GDAL C++ API template<> template<> void object::test<2>() { char* wkt = "POLYGON((0 0,4 0,4 4,0 4,0 0),(1 1, 2 1, 2 2, 1 2,1 1))"; OGRPolygon geom; err_ = geom.importFromWkt(&wkt); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); GEOSGeom geosGeom = geom.exportToGEOS(); ensure("Can't export geometry to GEOS", NULL != geosGeom); GEOSGeom_destroy(geosGeom); } // Test OGR_G_Contains function template<> template<> void object::test<3>() { char* wktOuter = "POLYGON((-90 -90, -90 90, 190 -90, -90 -90))"; err_ = OGR_G_CreateFromWkt(&wktOuter, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wktInner = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wktInner, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Contains() failed with FALSE", OGR_G_Contains(g1_, g2_), TRUE); ensure_equals("OGR_G_Contains() failed with TRUE", OGR_G_Contains(g2_, g1_), FALSE); } // Test OGR_G_Crosses function template<> template<> void object::test<4>() { char* wkt1 = "LINESTRING(0 0, 10 10)"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "LINESTRING(10 0, 0 10)"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Crosses() failed with FALSE", OGR_G_Crosses(g1_, g2_), TRUE); char* wkt3 = "LINESTRING(0 0, 0 10)"; err_ = OGR_G_CreateFromWkt(&wkt3, NULL, &g3_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g3_); ensure_equals("OGR_G_Crosses() failed with TRUE", OGR_G_Crosses(g1_, g3_), FALSE); } // Test OGR_G_Disjoint function template<> template<> void object::test<5>() { char* wkt1 = "LINESTRING(0 0, 10 10)"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "LINESTRING(10 0, 0 10)"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Disjoint() failed with TRUE", OGR_G_Disjoint(g1_, g2_), FALSE); char* wkt3 = "POLYGON((20 20, 20 30, 30 20, 20 20))"; err_ = OGR_G_CreateFromWkt(&wkt3, NULL, &g3_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g3_); ensure_equals("OGR_G_Disjoint() failed with FALSE", OGR_G_Disjoint(g1_, g3_), TRUE); } // Test OGR_G_Equals function template<> template<> void object::test<6>() { char* wkt1 = "LINESTRING(0 0, 10 10)"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "LINESTRING(0 0, 10 10)"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Equals() failed with FALSE", OGR_G_Equals(g1_, g2_), TRUE); char* wkt3 = "POLYGON((20 20, 20 30, 30 20, 20 20))"; err_ = OGR_G_CreateFromWkt(&wkt3, NULL, &g3_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g3_); ensure_equals("OGR_G_Equals() failed with TRUE", OGR_G_Equals(g1_, g3_), FALSE); } // Test OGR_G_Intersects function template<> template<> void object::test<7>() { char* wkt1 = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POLYGON((0 0, 0 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Intersects() failed with FALSE", OGR_G_Intersects(g1_, g2_), TRUE); char* wkt3 = "POLYGON((20 20, 40 20, 40 40, 20 20))"; err_ = OGR_G_CreateFromWkt(&wkt3, NULL, &g3_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g3_); ensure_equals("OGR_G_Intersects() failed with TRUE", OGR_G_Intersects(g1_, g3_), FALSE); } // Test OGR_G_Overlaps function template<> template<> void object::test<8>() { char* wkt1 = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POLYGON((-90 -90, -90 90, 190 -90, -90 -90))"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Overlaps() failed with TRUE", OGR_G_Overlaps(g1_, g2_), FALSE); } // Test OGR_G_Touches function template<> template<> void object::test<9>() { char* wkt1 = "LINESTRING(0 0, 10 10)"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "LINESTRING(0 0, 0 10)"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Touches() failed with FALSE", OGR_G_Touches(g1_, g2_), TRUE); char* wkt3 = "POLYGON((20 20, 20 30, 30 20, 20 20))"; err_ = OGR_G_CreateFromWkt(&wkt3, NULL, &g3_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g3_); ensure_equals("OGR_G_Touches() failed with TRUE", OGR_G_Touches(g1_, g3_), FALSE); } // Test OGR_G_Within function template<> template<> void object::test<10>() { char* wkt1 = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POLYGON((-90 -90, -90 90, 190 -90, -90 -90))"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); ensure_equals("OGR_G_Within() failed with FALSE", OGR_G_Within(g1_, g2_), TRUE); ensure_equals("OGR_G_Within() failed with TRUE", OGR_G_Within(g2_, g1_), FALSE); } // Test OGR_G_Union function template<> template<> void object::test<11>() { char* wkt1 = "POINT(10 20)"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POINT(30 20)"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); g3_ = OGR_G_Union(g1_, g2_); ensure("OGR_G_Union failed with NULL", NULL != g3_); OGRGeometryH expect = NULL; char* wktExpect = "MULTIPOINT (10 20,30 20)"; err_ = OGR_G_CreateFromWkt(&wktExpect, NULL, &expect); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != expect); // Compare operation result against expected geometry ensure_equal_geometries(g3_, expect, 0.0001); OGR_G_DestroyGeometry(expect); } // Test OGR_G_Intersection function template<> template<> void object::test<12>() { char* wkt1 = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POLYGON((0 0, 0 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); g3_ = OGR_G_Intersection(g1_, g2_); ensure("OGR_G_Intersection failed with NULL", NULL != g3_); OGRGeometryH expect = NULL; char* wktExpect = "POLYGON ((0 0,5 5,10 0,0 0))"; err_ = OGR_G_CreateFromWkt(&wktExpect, NULL, &expect); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != expect); // Compare operation result against expected geometry ensure_equal_geometries(g3_, expect, 0.0001); OGR_G_DestroyGeometry(expect); } // Test OGR_G_Difference function template<> template<> void object::test<13>() { char* wkt1 = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POLYGON((0 0, 0 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); g3_ = OGR_G_Difference(g1_, g2_); ensure("OGR_G_Difference failed with NULL", NULL != g3_); OGRGeometryH expect = NULL; char* wktExpect = "POLYGON ((5 5,10 10,10 0,5 5))"; err_ = OGR_G_CreateFromWkt(&wktExpect, NULL, &expect); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != expect); // Compare operation result against expected geometry ensure_equal_geometries(g3_, expect, 0.0001); OGR_G_DestroyGeometry(expect); } // Test OGR_G_SymmetricDifference function template<> template<> void object::test<14>() { char* wkt1 = "POLYGON((0 0, 10 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt1, NULL, &g1_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g1_); char* wkt2 = "POLYGON((0 0, 0 10, 10 0, 0 0))"; err_ = OGR_G_CreateFromWkt(&wkt2, NULL, &g2_); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != g2_); g3_ = OGR_G_SymmetricDifference(g1_, g2_); ensure("OGR_G_SymmetricDifference failed with NULL", NULL != g3_); OGRGeometryH expect = NULL; char* wktExpect = "MULTIPOLYGON (((5 5,0 0,0 10,5 5)),((5 5,10 10,10 0,5 5)))"; err_ = OGR_G_CreateFromWkt(&wktExpect, NULL, &expect); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", NULL != expect); // Compare operation result against expected geometry ensure_equal_geometries(g3_, expect, 0.0001); OGR_G_DestroyGeometry(expect); } #else // HAVE_GEOS // Test GEOS support is disabled and shout about it template<> template<> void object::test<1>() { CPLDebug( "TEST", "GEOS support is not available" ); } #endif // ndef HAVE_GEOS #endif // OGR_ENABLED } // namespace tut ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057761�014300� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_console_reporter.hpp�������������������������������������������������0000664�0001750�0001750�00000013554�13701057751�021300� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_CONSOLE_REPORTER #define TUT_CONSOLE_REPORTER #include <tut.hpp> #include <cassert> /** * Template Unit Tests Framework for C++. * http://tut.dozen.ru * * @author Vladimir Dyuzhev, Vladimir.Dyuzhev@gmail.com */ namespace { std::ostream& operator<<(std::ostream& os, const tut::test_result& tr) { switch(tr.result) { case tut::test_result::ok: os << '.'; break; case tut::test_result::fail: os << '[' << tr.test << "=F]"; break; case tut::test_result::ex_ctor: os << '[' << tr.test << "=C]"; break; case tut::test_result::ex: os << '[' << tr.test << "=X]"; break; case tut::test_result::warn: os << '[' << tr.test << "=W]"; break; case tut::test_result::term: os << '[' << tr.test << "=T]"; break; case tut::test_result::rethrown: os << '[' << tr.test << "=P]"; break; case tut::test_result::dummy: assert(!"Should never be called"); } return os; } } // end of namespace namespace tut { /** * Default TUT callback handler. */ class console_reporter : public tut::callback { std::string current_group; typedef std::vector<tut::test_result> not_passed_list; not_passed_list not_passed; std::ostream& os; public: int ok_count; int exceptions_count; int failures_count; int terminations_count; int warnings_count; console_reporter() : os(std::cout) { init(); } console_reporter(std::ostream& out) : os(out) { init(); } void run_started() CPL_OVERRIDE { init(); } void test_completed(const tut::test_result& tr) CPL_OVERRIDE { if (tr.group != current_group) { os << std::endl << tr.group << ": " << std::flush; current_group = tr.group; } os << tr << std::flush; // update global statistics switch (tr.result) { case test_result::ok: ok_count++; break; case test_result::fail: case test_result::rethrown: failures_count++; break; case test_result::ex: case test_result::ex_ctor: exceptions_count++; break; case test_result::warn: warnings_count++; break; case test_result::term: terminations_count++; break; case tut::test_result::dummy: assert(!"Should never be called"); } // switch if (tr.result != tut::test_result::ok) { not_passed.push_back(tr); } } void run_completed() CPL_OVERRIDE { os << std::endl; if (not_passed.size() > 0) { not_passed_list::const_iterator i = not_passed.begin(); while (i != not_passed.end()) { tut::test_result tr = *i; os << std::endl; os << "---> " << "group: " << tr.group << ", test: test<" << tr.test << ">" << (!tr.name.empty() ? (std::string(" : ") + tr.name) : std::string()) << std::endl; #if defined(TUT_USE_POSIX) if(tr.pid != getpid()) { os << " child pid: " << tr.pid << std::endl; } #endif os << " problem: "; switch(tr.result) { case test_result::rethrown: os << "assertion failed in child" << std::endl; break; case test_result::fail: os << "assertion failed" << std::endl; break; case test_result::ex: case test_result::ex_ctor: os << "unexpected exception" << std::endl; if( tr.exception_typeid != "" ) { os << " exception typeid: " << tr.exception_typeid << std::endl; } break; case test_result::term: os << "would be terminated" << std::endl; break; case test_result::warn: os << "test passed, but cleanup code (destructor) raised" " an exception" << std::endl; break; default: break; } if (!tr.message.empty()) { if (tr.result == test_result::fail) { os << " failed assertion: \"" << tr.message << "\"" << std::endl; } else { os << " message: \"" << tr.message << "\"" << std::endl; } } ++i; } } os << std::endl; os << "tests summary:"; if (terminations_count > 0) { os << " terminations:" << terminations_count; } if (exceptions_count > 0) { os << " exceptions:" << exceptions_count; } if (failures_count > 0) { os << " failures:" << failures_count; } if (warnings_count > 0) { os << " warnings:" << warnings_count; } os << " ok:" << ok_count; os << std::endl; } bool all_ok() const { return not_passed.empty(); } private: void init() { ok_count = 0; exceptions_count = 0; failures_count = 0; terminations_count = 0; warnings_count = 0; not_passed.clear(); } }; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_posix.hpp������������������������������������������������������������0000664�0001750�0001750�00000026127�13701057751�017056� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_FORK_H_GUARD #define TUT_FORK_H_GUARD #if defined(TUT_USE_POSIX) #include <errno.h> #include <unistd.h> #include <signal.h> #include <sys/wait.h> #include <sys/time.h> #include <sys/types.h> #include <cstring> #include <cstdlib> #include <map> #include <iterator> #include <functional> #include "tut_result.hpp" #include "tut_assert.hpp" #include "tut_runner.hpp" namespace tut { template<typename, int> class test_group; template<typename T> class test_object; class test_group_posix { private: template<typename, int> friend class test_group; template<typename T> void send_result_(const T *obj, const test_result &tr) { if(obj->get_pipe_() == -1) { return; } if(tr.result != test_result::ok) { std::stringstream ss; ss << int(tr.result) << "\n" << tr.group << "\n" << tr.test << "\n" << tr.name << "\n" << tr.exception_typeid << "\n"; std::copy( tr.message.begin(), tr.message.end(), std::ostreambuf_iterator<char>(ss.rdbuf()) ); int size = static_cast<int>(ss.str().length()); int w = static_cast<int>(write(obj->get_pipe_(), ss.str().c_str(), size)); ensure_errno("write() failed", w == size); } } }; template<typename T> struct tut_posix { pid_t fork() { test_object<T> *self = dynamic_cast< tut::test_object<T>* >(this); ensure("trying to call 'tut_fork' in ctor of test object", self != nullptr); return self->fork_(); } pid_t waitpid(pid_t pid, int *status, int flags = 0) { test_object<T> *self = dynamic_cast< tut::test_object<T>* >(this); ensure("trying to call 'tut_waitpid' in ctor of test object", self != nullptr); return self->waitpid_(pid, status, flags); } void ensure_child_exit(pid_t pid, int exit_status = 0) { test_object<T> *self = dynamic_cast< tut::test_object<T>* >(this); ensure("trying to call 'ensure_child_exit' in ctor of test object", self != nullptr); int status; self->waitpid_(pid, &status); self->ensure_child_exit_(status, exit_status); } void ensure_child_signal(pid_t pid, int signal = SIGTERM) { test_object<T> *self = dynamic_cast< tut::test_object<T>* >(this); ensure("trying to call 'ensure_child_signal' in ctor of test object", self != nullptr); int status; self->waitpid_(pid, &status); self->ensure_child_signal_(status, signal); } std::set<pid_t> get_pids() const { using namespace std; const test_object<T> *self = dynamic_cast< const tut::test_object<T>* >(this); ensure("trying to call 'get_pids' in ctor of test object", self != nullptr); return self->get_pids_(); } virtual ~tut_posix() { } }; class test_object_posix { public: typedef std::map<pid_t, int> pid_map; /** * Default constructor */ test_object_posix() : pipe_(-1) { } virtual ~test_object_posix() { // we have forked if(pipe_ != -1) { // in child, force exit std::exit(0); } if(!pids_.empty()) { std::stringstream ss; // in parent, reap children for(std::map<pid_t, int>::iterator i = pids_.begin(); i != pids_.end(); ++i) { try { kill_child_(i->first); } catch(const rethrown &ex) { ss << std::endl << "child " << ex.tr.pid << " has thrown an exception: " << ex.what(); } catch(const failure &ex) { ss << std::endl << ex.what(); } } if(!ss.str().empty()) { fail(ss.str().c_str()); } } } private: template<typename T> friend struct tut_posix; friend class test_group_posix; int get_pipe_() const { return pipe_; } pid_t fork_() { // create pipe int fds[2]; ensure_errno("pipe() failed", ::pipe(fds) == 0); pid_t pid = ::fork(); ensure_errno("fork() failed", pid >= 0); if(pid != 0) { // in parent, register pid ensure("duplicated child", pids_.insert( std::make_pair(pid, fds[0]) ).second); // close writing side close(fds[1]); } else { // in child, shutdown reporter tut::runner.get().clear_callbacks(); // close reading side close(fds[0]); pipe_ = fds[1]; } return pid; } void kill_child_(pid_t pid) { int status; if(waitpid_(pid, &status, WNOHANG) == pid) { ensure_child_exit_(status, 0); return; } if(::kill(pid, SIGTERM) != 0) { if(errno == ESRCH) { // no such process return; } else { // cannot kill, we are in trouble std::stringstream ss; char e[1024]; ss << "child " << pid << " could not be killed with SIGTERM, " << strerror_r(errno, e, sizeof(e)) << std::endl; fail(ss.str()); } } if(waitpid_(pid, &status, WNOHANG) == pid) { // child killed, check signal ensure_child_signal_(status, SIGTERM); ensure_equals("child process exists after SIGTERM", ::kill(pid, 0), -1); return; } // child seems to be still exiting, give it some time sleep(2); if(waitpid_(pid, &status, WNOHANG) != pid) { // child is still running, kill it if(::kill(pid, SIGKILL) != 0) { if(errno == ESRCH) { // no such process return; } else { std::stringstream ss; char e[1024]; ss << "child " << pid << " could not be killed with SIGKILL, " << strerror_r(errno, e, sizeof(e)) << std::endl; fail(ss.str()); } } ensure_equals("wait after SIGKILL", waitpid_(pid, &status), pid); ensure_child_signal_(status, SIGKILL); ensure_equals("child process exists after SIGKILL", ::kill(pid, 0), -1); std::stringstream ss; ss << "child " << pid << " had to be killed with SIGKILL"; fail(ss.str()); } } test_result receive_result_(std::istream &ss, pid_t pid) { test_result tr; int type; ss >> type; tr.result = test_result::result_type(type); ss.ignore(1024, '\n'); std::getline(ss, tr.group); ss >> tr.test; ss.ignore(1024, '\n'); std::getline(ss, tr.name); std::getline(ss, tr.exception_typeid); std::copy( std::istreambuf_iterator<char>(ss.rdbuf()), std::istreambuf_iterator<char>(), std::back_inserter(tr.message) ); tr.pid = pid; return tr; } struct fdclose { fdclose(int fd): fd_(fd) { } ~fdclose() { close(fd_); } private: int fd_; }; pid_t waitpid_(pid_t pid, int *status, int flags = 0) { ensure("trying to wait for unknown pid", pids_.count(pid) > 0); pid_t p = ::waitpid(pid, status, flags); if( (flags & WNOHANG) && (p != pid) ) { return p; } // read child result from pipe fd_set fdset; timeval tv; tv.tv_sec = 0; tv.tv_usec = 0; FD_ZERO(&fdset); int pipe = pids_[pid]; fdclose guard(pipe); FD_SET(pipe, &fdset); int result = select(pipe+1, &fdset, nullptr, nullptr, &tv); ensure_errno("sanity check on select() failed", result >= 0); if(result > 0) { ensure("sanity check on FD_ISSET() failed", FD_ISSET(pipe, &fdset) ); std::stringstream ss; //TODO: max failure length char buffer[1024]; int r = static_cast<int>(read(pipe, buffer, sizeof(buffer))); ensure_errno("sanity check on read() failed", r >= 0); if(r > 0) { ss.write(buffer, r); throw rethrown( receive_result_(ss, pid) ); } } return pid; } void ensure_child_exit_(int status, int exit_status) { if(WIFSIGNALED(status)) { std::stringstream ss; ss << "child killed by signal " << WTERMSIG(status) << ": expected exit with code " << exit_status; throw failure(ss.str().c_str()); } if(WIFEXITED(status)) { if(WEXITSTATUS(status) != exit_status) { std::stringstream ss; ss << "child exited, expected '" << exit_status << "' actual '" << WEXITSTATUS(status) << '\''; throw failure(ss.str().c_str()); } } if(WIFSTOPPED(status)) { std::stringstream ss; ss << "child stopped by signal " << WTERMSIG(status) << ": expected exit with code " << exit_status; throw failure(ss.str().c_str()); } } void ensure_child_signal_(int status, int signal) { if(WIFSIGNALED(status)) { if(WTERMSIG(status) != signal) { std::stringstream ss; ss << "child killed by signal, expected '" << signal << "' actual '" << WTERMSIG(status) << '\''; throw failure(ss.str().c_str()); } } if(WIFEXITED(status)) { std::stringstream ss; ss << "child exited with code " << WEXITSTATUS(status) << ": expected signal " << signal; throw failure(ss.str().c_str()); } if(WIFSTOPPED(status)) { std::stringstream ss; ss << "child stopped by signal " << WTERMSIG(status) << ": expected kill by signal " << signal; throw failure(ss.str().c_str()); } } std::set<pid_t> get_pids_() const { using namespace std; set<pid_t> pids; for(pid_map::const_iterator i = pids_.begin(); i != pids_.end(); ++i) { pids.insert( i->first ); } return pids; } pid_map pids_; int pipe_; }; } // namespace tut #else namespace tut { struct test_object_posix { }; struct test_group_posix { template<typename T> void send_result_(const T*, const test_result &) { } }; } // namespace tut #endif #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_gdal.h���������������������������������������������������������������0000664�0001750�0001750�00000007640�13701057761�016263� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: TUT: C++ Unit Test Framework extensions for GDAL Test Suite // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #ifndef TUT_GDAL_H_INCLUDED #define TUT_GDAL_H_INCLUDED #include "ogr_api.h" // GDAL #include <cassert> #include <sstream> #include <string> #include <tut.hpp> namespace tut { #if defined(WIN32) #define SEP "\\" #else #define SEP "/" #endif // // Template of attribute reading function and its specializations // template <typename T> inline void read_feature_attribute(OGRFeatureH , int , T& ) { assert(!"Can't find read_feature_attribute specialization for given type"); } template <> inline void read_feature_attribute(OGRFeatureH feature, int index, int& val) { val = OGR_F_GetFieldAsInteger(feature, index); } template <> inline void read_feature_attribute(OGRFeatureH feature, int index, double& val) { val = OGR_F_GetFieldAsDouble(feature, index); } template <> inline void read_feature_attribute(OGRFeatureH feature, int index, std::string& val) { val = OGR_F_GetFieldAsString(feature, index); } // // Test equality of two OGR geometries according to passed tolerance. // void ensure_equal_geometries(OGRGeometryH lhs, OGRGeometryH rhs, double tolerance); // // Test layer attributes from given field against expected list of values // template <typename T> void ensure_equal_attributes(OGRLayerH layer, std::string const& field, T const& list) { ensure("Layer is NULL", nullptr != layer); OGRFeatureDefnH featDefn = OGR_L_GetLayerDefn(layer); ensure("Layer schema is NULL",nullptr != featDefn); int fldIndex = OGR_FD_GetFieldIndex(featDefn, field.c_str()); std::ostringstream os; os << "Can't find field '" << field << "'"; ensure(os.str(), fldIndex >= 0); // Test value in tested field from subsequent features OGRFeatureH feat = nullptr; OGRFieldDefnH fldDefn = nullptr; typename T::value_type attrVal; for (typename T::const_iterator it = list.begin(); it != list.end(); ++it) { feat = OGR_L_GetNextFeature(layer); fldDefn = OGR_F_GetFieldDefnRef(feat, fldIndex); ensure("Field schema is NULL",nullptr != fldDefn); read_feature_attribute(feat, fldIndex, attrVal); OGR_F_Destroy(feat); // Test attribute against expected value ensure_equals("Attributes not equal", (*it), attrVal); } // Check if not too many features filtered feat = OGR_L_GetNextFeature(layer); bool notTooMany = (nullptr == feat); OGR_F_Destroy(feat); ensure("Got more features than expected", notTooMany); } template <typename T> void ensure_approx_equals(T const& a, T const& b) { std::ostringstream os; os << "Approx. equality failed: " << a << " != " << b; ensure(os.str(), (a == 0.0 || b == 0.0) ? fabs(a-b) <= .00000000001 : fabs(1.0 * b / a - 1.0) <= .00000000001); } } // namespace tut #endif // TUT_GDAL_H_INCLUDED ������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/README�������������������������������������������������������������������0000664�0001750�0001750�00000000162�13701057751�015156� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������C++ Template Unit Test Framework This is a local copy of the upstream: http://mrzechonek.github.io/tut-framework ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_assert.hpp�����������������������������������������������������������0000664�0001750�0001750�00000010413�13701057751�017204� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_ASSERT_H_GUARD #define TUT_ASSERT_H_GUARD #include "tut_exception.hpp" #include <limits> #include <iomanip> #if defined(TUT_USE_POSIX) #include <errno.h> #include <cstring> #endif namespace tut { namespace detail { template<typename M> std::ostream &msg_prefix(std::ostream &str, const M &msg) { std::stringstream ss; ss << msg; if(!ss.str().empty()) { str << ss.rdbuf() << ": "; } return str; } } namespace { /** * Tests provided condition. * Throws if false. */ static inline void ensure(bool cond) { if (!cond) { // TODO: default ctor? throw failure(""); } } /** * Tests provided condition. * Throws if true. */ static inline void ensure_not(bool cond) { ensure(!cond); } /** * Tests provided condition. * Throws if false. */ template <typename M> void ensure(const M& msg, bool cond) { if (!cond) { throw failure(msg); } } /** * Tests provided condition. * Throws if true. */ template <typename M> void ensure_not(const M& msg, bool cond) { ensure(msg, !cond); } /** * Tests two objects for being equal. * Throws if false. * * NB: both T and Q must have operator << defined somewhere, or * client code will not compile at all! */ template <typename M, typename LHS, typename RHS> void ensure_equals(const M& msg, const LHS& actual, const RHS& expected) { if (expected != actual) { std::stringstream ss; detail::msg_prefix(ss,msg) << "expected '" << expected << "' actual '" << actual << '\''; throw failure(ss.str()); } } template <typename LHS, typename RHS> void ensure_equals(const LHS& actual, const RHS& expected) { ensure_equals("Values are not equal", actual, expected); } template<typename M> void ensure_equals(const M& msg, const char* actual,const char* expected) { ensure_equals(msg, std::string(actual), std::string(expected)); } inline void ensure_equals(const char* actual,const char* expected) { ensure_equals(0,actual,expected); } template<typename M> void ensure_equals(const M& msg, const double& actual, const double& expected, const double& epsilon = std::numeric_limits<double>::epsilon()) { const double diff = actual - expected; if ( !((diff <= epsilon) && (diff >= -epsilon )) ) { std::stringstream ss; detail::msg_prefix(ss,msg) << std::scientific << std::showpoint << std::setprecision(16) << "expected " << expected << " actual " << actual << " with precision " << epsilon; throw failure(ss.str()); } } /** * Tests two objects for being at most in given distance one from another. * Borders are excluded. * Throws if false. * * NB: T must have operator << defined somewhere, or * client code will not compile at all! Also, T shall have * operators + and -, and be comparable. * * TODO: domains are wrong, T - T might not yield T, but Q */ template <typename M, class T> void ensure_distance(const M& msg, const T& actual, const T& expected, const T& distance) { if (expected-distance >= actual || expected+distance <= actual) { std::stringstream ss; detail::msg_prefix(ss,msg) << " expected (" << expected-distance << " - " << expected+distance << ") actual '" << actual << '\''; throw failure(ss.str()); } } template <class T> void ensure_distance(const T& actual, const T& expected, const T& distance) { ensure_distance<>("Distance is wrong", actual, expected, distance); } template<typename M> void ensure_errno(const M& msg, bool cond) { if(!cond) { #if defined(TUT_USE_POSIX) char e[512]; std::stringstream ss; detail::msg_prefix(ss,msg) << strerror_r(errno, e, sizeof(e)); throw failure(ss.str()); #else throw failure(msg); #endif } } /** * Unconditionally fails with message. */ static inline void fail(const char* msg = "") { throw failure(msg); } template<typename M> void fail(const M& msg) { throw failure(msg); } } // end of namespace } #endif �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_gdal.cpp�������������������������������������������������������������0000664�0001750�0001750�00000006432�13701057761�016614� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: TUT: C++ Unit Test Framework extensions for GDAL Test Suite // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "cpl_port.h" #include <tut.hpp> // TUT #include <tut_gdal.h> #include "ogr_api.h" // GDAL #include <algorithm> // C++ #include <cmath> #include <sstream> #include <string> namespace tut { void ensure_equal_geometries(OGRGeometryH lhs, OGRGeometryH rhs, double tolerance) { // Test raw pointers ensure("First geometry is NULL", nullptr != lhs); ensure("Second geometry is NULL", nullptr != rhs); ensure("Passed the same pointers to geometry", lhs != rhs); // Test basic properties ensure_equals("Geometry names do not match", std::string(OGR_G_GetGeometryName(lhs)), std::string(OGR_G_GetGeometryName(rhs))); ensure_equals("Sub-geometry counts do not match", OGR_G_GetGeometryCount(lhs), OGR_G_GetGeometryCount(rhs)); ensure_equals("Point counts do not match", OGR_G_GetPointCount(lhs), OGR_G_GetPointCount(rhs)); if (OGR_G_GetGeometryCount(lhs) > 0) { // Test sub-geometries recursively const int count = OGR_G_GetGeometryCount(lhs); for (int i = 0; i < count; ++i) { ensure_equal_geometries(OGR_G_GetGeometryRef(lhs, i), OGR_G_GetGeometryRef(rhs, i), tolerance); } } else { // Test geometry points const std::size_t csize = 3; double a[csize] = { 0 }; double b[csize] = { 0 }; double d[csize] = { 0 }; double dmax = 0; const int count = OGR_G_GetPointCount(lhs); for (int i = 0; i < count; ++i) { OGR_G_GetPoint(lhs, i, &a[0], &a[1], &a[2]); OGR_G_GetPoint(rhs, i, &b[0], &b[1], &b[2]); // Test vertices for (std::size_t c = 0; c < csize; ++c) { d[c] = std::fabs(a[c] - b[c]); } const double* pos = std::max_element(d, d + csize); dmax = *pos; std::ostringstream os; os << "Error in vertex " << i << " off by " << dmax; ensure(os.str(), dmax < tolerance); } } } } // } // namespace tut ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_restartable.hpp������������������������������������������������������0000664�0001750�0001750�00000021464�13701057751�020223� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_RESTARTABLE_H_GUARD #define TUT_RESTARTABLE_H_GUARD #include <tut/tut.hpp> #include <fstream> #include <iostream> #include <stdexcept> #include <cassert> /** * Optional restartable wrapper for test_runner. * * Allows to restart test runs finished due to abnormal * test application termination (such as segmentation * fault or math error). * * @author Vladimir Dyuzhev, Vladimir.Dyuzhev@gmail.com */ namespace tut { namespace util { /** * Escapes non-alphabetical characters in string. */ std::string escape(const std::string& orig) { std::string rc; std::string::const_iterator i,e; i = orig.begin(); e = orig.end(); while (i != e) { if ((*i >= 'a' && *i <= 'z') || (*i >= 'A' && *i <= 'Z') || (*i >= '0' && *i <= '9') ) { rc += *i; } else { rc += '\\'; rc += ('a'+(((unsigned int)*i) >> 4)); rc += ('a'+(((unsigned int)*i) & 0xF)); } ++i; } return rc; } /** * Un-escapes string. */ std::string unescape(const std::string& orig) { std::string rc; std::string::const_iterator i,e; i = orig.begin(); e = orig.end(); while (i != e) { if (*i != '\\') { rc += *i; } else { ++i; if (i == e) { throw std::invalid_argument("unexpected end of string"); } unsigned int c1 = *i; ++i; if (i == e) { throw std::invalid_argument("unexpected end of string"); } unsigned int c2 = *i; rc += (((c1 - 'a') << 4) + (c2 - 'a')); } ++i; } return rc; } /** * Serialize test_result avoiding interfering with operator <<. */ void serialize(std::ostream& os, const tut::test_result& tr) { os << escape(tr.group) << std::endl; os << tr.test << ' '; switch(tr.result) { case test_result::ok: os << 0; break; case test_result::fail: os << 1; break; case test_result::ex: os << 2; break; case test_result::warn: os << 3; break; case test_result::term: os << 4; break; case test_result::rethrown: os << 5; break; case test_result::ex_ctor: os << 6; break; case test_result::dummy: assert(!"Should never be called"); default: throw std::logic_error("operator << : bad result_type"); } os << ' ' << escape(tr.message) << std::endl; } /** * deserialization for test_result */ bool deserialize(std::istream& is, tut::test_result& tr) { std::getline(is,tr.group); if (is.eof()) { return false; } tr.group = unescape(tr.group); tr.test = -1; is >> tr.test; if (tr.test < 0) { throw std::logic_error("operator >> : bad test number"); } int n = -1; is >> n; switch(n) { case 0: tr.result = test_result::ok; break; case 1: tr.result = test_result::fail; break; case 2: tr.result = test_result::ex; break; case 3: tr.result = test_result::warn; break; case 4: tr.result = test_result::term; break; case 5: tr.result = test_result::rethrown; break; case 6: tr.result = test_result::ex_ctor; break; default: throw std::logic_error("operator >> : bad result_type"); } is.ignore(1); // space std::getline(is,tr.message); tr.message = unescape(tr.message); if (!is.good()) { throw std::logic_error("malformed test result"); } return true; } }; /** * Restartable test runner wrapper. */ class restartable_wrapper { test_runner& runner_; callbacks callbacks_; std::string dir_; std::string log_; // log file: last test being executed std::string jrn_; // journal file: results of all executed tests public: /** * Default constructor. * @param dir Directory where to search/put log and journal files */ restartable_wrapper(const std::string& dir = ".") : runner_(runner.get()), dir_(dir) { // dozen: it works, but it would be better to use system path separator jrn_ = dir_ + '/' + "journal.tut"; log_ = dir_ + '/' + "log.tut"; } /** * Stores another group for getting by name. */ void register_group(const std::string& name, group_base* gr) { runner_.register_group(name,gr); } /** * Stores callback object. */ void set_callback(callback* cb) { callbacks_.clear(); callbacks_.insert(cb); } void insert_callback(callback* cb) { callbacks_.insert(cb); } void erase_callback(callback* cb) { callbacks_.erase(cb); } void set_callbacks(const callbacks& cb) { callbacks_ = cb; } const callbacks& get_callbacks() const { return runner_.get_callbacks(); } /** * Returns list of known test groups. */ groupnames list_groups() const { return runner_.list_groups(); } /** * Runs all tests in all groups. */ void run_tests() const { // where last run was failed std::string fail_group; int fail_test; read_log_(fail_group,fail_test); bool fail_group_reached = (fail_group == ""); // iterate over groups tut::groupnames gn = list_groups(); tut::groupnames::const_iterator gni,gne; gni = gn.begin(); gne = gn.end(); while (gni != gne) { // skip all groups before one that failed if (!fail_group_reached) { if (*gni != fail_group) { ++gni; continue; } fail_group_reached = true; } // first or restarted run int test = (*gni == fail_group && fail_test >= 0) ? fail_test + 1 : 1; while(true) { // last executed test pos register_execution_(*gni,test); tut::test_result tr; if( !runner_.run_test(*gni,test, tr) || tr.result == test_result::dummy ) { break; } register_test_(tr); ++test; } ++gni; } // show final results to user invoke_callback_(); // truncate files as mark of successful finish truncate_(); } private: /** * Shows results from journal file. */ void invoke_callback_() const { runner_.set_callbacks(callbacks_); runner_.cb_run_started_(); std::string current_group; std::ifstream ijournal(jrn_.c_str()); while (ijournal.good()) { tut::test_result tr; if( !util::deserialize(ijournal,tr) ) { break; } runner_.cb_test_completed_(tr); } runner_.cb_run_completed_(); } /** * Register test into journal. */ void register_test_(const test_result& tr) const { std::ofstream ojournal(jrn_.c_str(), std::ios::app); util::serialize(ojournal, tr); ojournal << std::flush; if (!ojournal.good()) { throw std::runtime_error("unable to register test result in file " + jrn_); } } /** * Mark the fact test going to be executed */ void register_execution_(const std::string& grp, int test) const { // last executed test pos std::ofstream olog(log_.c_str()); olog << util::escape(grp) << std::endl << test << std::endl << std::flush; if (!olog.good()) { throw std::runtime_error("unable to register execution in file " + log_); } } /** * Truncate tests. */ void truncate_() const { std::ofstream olog(log_.c_str()); std::ofstream ojournal(jrn_.c_str()); } /** * Read log file */ void read_log_(std::string& fail_group, int& fail_test) const { // read failure point, if any std::ifstream ilog(log_.c_str()); std::getline(ilog,fail_group); fail_group = util::unescape(fail_group); ilog >> fail_test; if (!ilog.good()) { fail_group = ""; fail_test = -1; truncate_(); } else { // test was terminated... tut::test_result tr(fail_group, fail_test, "", tut::test_result::term); register_test_(tr); } } }; } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_runner.hpp�����������������������������������������������������������0000664�0001750�0001750�00000016064�13701057751�017224� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_RUNNER_H_GUARD #define TUT_RUNNER_H_GUARD #include <string> #include <vector> #include <set> #include "tut_exception.hpp" namespace tut { /** * Interface. * Test group operations. */ struct group_base { virtual ~group_base() { } // execute tests iteratively virtual void rewind() = 0; virtual bool run_next(test_result &) = 0; // execute one test virtual bool run_test(int n, test_result &tr) = 0; }; /** * Test runner callback interface. * Can be implemented by caller to update * tests results in real-time. User can implement * any of callback methods, and leave unused * in default implementation. */ struct callback { /** * Default constructor. */ callback() { } /** * Virtual destructor is a must for subclassed types. */ virtual ~callback() { } /** * Called when new test run started. */ virtual void run_started() { } /** * Called when a group started * @param name Name of the group */ virtual void group_started(const std::string& name) { (void)name; } /** * Called when a test finished. * @param tr Test results. */ virtual void test_completed(const test_result& tr) { (void)tr; } /** * Called when a group is completed * @param name Name of the group */ virtual void group_completed(const std::string& name) { (void)name; } /** * Called when all tests in run completed. */ virtual void run_completed() { } private: callback(const callback &); void operator=(const callback&); }; /** * Typedef for runner::list_groups() */ typedef std::vector<std::string> groupnames; typedef std::set<callback*> callbacks; /** * Test runner. */ class test_runner { public: /** * Constructor */ test_runner() { } /** * Stores another group for getting by name. */ void register_group(const std::string& name, group_base* gr) { if (gr == nullptr) { throw tut_error("group shall be non-null"); } if (groups_.find(name) != groups_.end()) { std::string msg("attempt to add already existent group " + name); // this exception terminates application so we use cerr also // TODO: should this message appear in stream? std::cerr << msg << std::endl; throw tut_error(msg); } groups_.insert( std::make_pair(name, gr) ); } void set_callback(callback *cb) { clear_callbacks(); insert_callback(cb); } /** * Stores callback object. */ void insert_callback(callback* cb) { if(cb != nullptr) { callbacks_.insert(cb); } } void erase_callback(callback* cb) { callbacks_.erase(cb); } void clear_callbacks() { callbacks_.clear(); } /** * Returns callback list. */ const callbacks &get_callbacks() const { return callbacks_; } void set_callbacks(const callbacks &cb) { callbacks_ = cb; } /** * Returns list of known test groups. */ const groupnames list_groups() const { groupnames ret; const_iterator i = groups_.begin(); const_iterator e = groups_.end(); while (i != e) { ret.push_back(i->first); ++i; } return ret; } /** * Runs all tests in all groups. */ void run_tests() const { cb_run_started_(); const_iterator i = groups_.begin(); const_iterator e = groups_.end(); while (i != e) { cb_group_started_(i->first); run_all_tests_in_group_(i); cb_group_completed_(i->first); ++i; } cb_run_completed_(); } /** * Runs all tests in specified group. */ void run_tests(const std::string& group_name) const { cb_run_started_(); const_iterator i = groups_.find(group_name); if (i == groups_.end()) { cb_run_completed_(); throw no_such_group(group_name); } cb_group_started_(group_name); run_all_tests_in_group_(i); cb_group_completed_(group_name); cb_run_completed_(); } /** * Runs one test in specified group. */ bool run_test(const std::string& group_name, int n, test_result &tr) const { cb_run_started_(); const_iterator i = groups_.find(group_name); if (i == groups_.end()) { cb_run_completed_(); throw no_such_group(group_name); } cb_group_started_(group_name); bool t = i->second->run_test(n, tr); if(t && tr.result != test_result::dummy) { cb_test_completed_(tr); } cb_group_completed_(group_name); cb_run_completed_(); return t; } protected: typedef std::map<std::string, group_base*> groups; typedef groups::iterator iterator; typedef groups::const_iterator const_iterator; groups groups_; callbacks callbacks_; private: friend class restartable_wrapper; void cb_run_started_() const { for(callbacks::const_iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) { (*i)->run_started(); } } void cb_run_completed_() const { for(callbacks::const_iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) { (*i)->run_completed(); } } void cb_group_started_(const std::string &group_name) const { for(callbacks::const_iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) { (*i)->group_started(group_name); } } void cb_group_completed_(const std::string &group_name) const { for(callbacks::const_iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) { (*i)->group_completed(group_name); } } void cb_test_completed_(const test_result &tr) const { for(callbacks::const_iterator i = callbacks_.begin(); i != callbacks_.end(); ++i) { (*i)->test_completed(tr); } } void run_all_tests_in_group_(const_iterator i) const { i->second->rewind(); test_result tr; while(i->second->run_next(tr)) { if(tr.result != test_result::dummy) { cb_test_completed_(tr); } if (tr.result == test_result::ex_ctor) { // test object ctor failed, skip whole group break; } } } }; /** * Singleton for test_runner implementation. * Instance with name runner_singleton shall be implemented * by user. */ class test_runner_singleton { public: static test_runner& get() { static test_runner tr; return tr; } }; extern test_runner_singleton runner; } #endif ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_result.hpp�����������������������������������������������������������0000664�0001750�0001750�00000004664�13701057753�017236� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_RESULT_H_GUARD #define TUT_RESULT_H_GUARD #if defined(TUT_USE_POSIX) #include <sys/types.h> #include <unistd.h> #endif #include <string> namespace tut { #if defined(TUT_USE_POSIX) struct test_result_posix { test_result_posix() : pid(getpid()) { } pid_t pid; }; #else struct test_result_posix { }; #endif /** * Return type of ran test/test group. * * For test: contains result of test and, possible, message * for failure or exception. */ struct test_result : public test_result_posix { /** * Test group name. */ std::string group; /** * Test number in group. */ int test; /** * Test name (optional) */ std::string name; /** * ok - test finished successfully * fail - test failed with ensure() or fail() methods * ex - test throwed an exceptions * warn - test finished successfully, but test destructor throwed * term - test forced test application to terminate abnormally */ enum result_type { ok, fail, ex, warn, term, ex_ctor, rethrown, dummy }; result_type result; /** * Exception message for failed test. */ std::string message; std::string exception_typeid; /** * Default constructor. */ test_result() : test(0), result(ok) { } /** * Constructor. */ test_result(const std::string& grp, int pos, const std::string& test_name, result_type res) : group(grp), test(pos), name(test_name), result(res) { } /** * Constructor with exception. */ test_result(const std::string& grp,int pos, const std::string& test_name, result_type res, const std::exception& exIn) : group(grp), test(pos), name(test_name), result(res), message(exIn.what()), exception_typeid(typeid(exIn).name()) { } /** Constructor with typeid. */ test_result(const std::string& grp,int pos, const std::string& test_name, result_type res, const std::string& ex_typeid, const std::string& msg) : group(grp), test(pos), name(test_name), result(res), message(msg), exception_typeid(ex_typeid) { } }; } #endif ����������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_reporter.hpp���������������������������������������������������������0000664�0001750�0001750�00000000221�13701057751�017541� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_REPORTER #define TUT_REPORTER #include <tut_console_reporter.hpp> namespace tut { typedef console_reporter reporter; } #endif �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut.hpp������������������������������������������������������������������0000664�0001750�0001750�00000030070�13701057753�015626� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_H_GUARD #define TUT_H_GUARD #include <iostream> #include <map> #include <vector> #include <set> #include <string> #include <sstream> #include <iterator> #include <algorithm> #include <typeinfo> #if defined(linux) #define TUT_USE_POSIX #endif #include "tut_exception.hpp" #include "tut_result.hpp" #include "tut_posix.hpp" #include "tut_assert.hpp" #include "tut_runner.hpp" #if defined(TUT_USE_SEH) #include <windows.h> #include <winbase.h> #endif /** * Template Unit Tests Framework for C++. * http://tut.dozen.ru * * @author Vladimir Dyuzhev, Vladimir.Dyuzhev@gmail.com */ namespace tut { /** * Test object. Contains data test run upon and default test method * implementation. Inherited from Data to allow tests to * access test data as members. */ template <class Data> class test_object : public Data, public test_object_posix { public: /** * Default constructor */ test_object() { } void set_test_name(const std::string& current_test_name) { current_test_name_ = current_test_name; } const std::string& get_test_name() const { return current_test_name_; } void set_test_id(int current_test_id) { current_test_id_ = current_test_id; } int get_test_id() const { return current_test_id_; } /** * Default do-nothing test. */ template <int n> void test() { called_method_was_a_dummy_test_ = true; } /** * The flag is set to true by default (dummy) test. * Used to detect usused test numbers and avoid unnecessary * test object creation which may be time-consuming depending * on operations described in Data::Data() and Data::~Data(). * TODO: replace with throwing special exception from default test. */ bool called_method_was_a_dummy_test_; private: int current_test_id_; std::string current_test_name_; test_object(test_object const&); // = delete test_object& operator=(test_object const&); // = delete }; /** * Walks through test tree and stores address of each * test method in group. Instantiation stops at 0. */ template <class Test, class Group, int n> struct tests_registerer { static void reg(Group& group) { group.reg(n, &Test::template test<n>); tests_registerer<Test, Group, n - 1>::reg(group); } }; template <class Test, class Group> struct tests_registerer<Test, Group, 0> { static void reg(Group&) { } }; /** * Test group; used to recreate test object instance for * each new test since we have to have reinitialized * Data base class. */ template <class Data, int MaxTestsInGroup = 50> class test_group : public group_base, public test_group_posix { const char* name_; typedef void (test_object<Data>::*testmethod)(); typedef std::map<int, testmethod> tests; typedef typename tests::iterator tests_iterator; typedef typename tests::const_iterator tests_const_iterator; typedef typename tests::const_reverse_iterator tests_const_reverse_iterator; typedef typename tests::size_type size_type; tests tests_; tests_iterator current_test_; enum seh_result { SEH_OK, SEH_CTOR, SEH_TEST, SEH_DUMMY }; /** * Exception-in-destructor-safe smart-pointer class. */ template <class T> class safe_holder { T* p_; bool permit_throw_in_dtor; safe_holder(const safe_holder&); safe_holder& operator=(const safe_holder&); public: safe_holder() : p_(nullptr), permit_throw_in_dtor(false) { } ~safe_holder() { release(); } T* operator->() const { return p_; } T* get() const { return p_; } /** * Tell ptr it can throw from destructor. Right way is to * use std::uncaught_exception(), but some compilers lack * correct implementation of the function. */ void permit_throw() { permit_throw_in_dtor = true; } /** * Specially treats exceptions in test object destructor; * if test itself failed, exceptions in destructor * are ignored; if test was successful and destructor failed, * warning exception throwed. */ void release() { try { if (delete_obj() == false) { throw warning("destructor of test object raised" " an SEH exception"); } } catch (const std::exception& ex) { if (permit_throw_in_dtor) { std::string msg = "destructor of test object raised" " exception: "; msg += ex.what(); throw warning(msg); } } catch( ... ) { if (permit_throw_in_dtor) { throw warning("destructor of test object raised an" " exception"); } } } /** * Re-init holder to get brand new object. */ void reset() { release(); permit_throw_in_dtor = false; p_ = new T(); } bool delete_obj() { #if defined(TUT_USE_SEH) __try { #endif T* p = p_; p_ = nullptr; delete p; #if defined(TUT_USE_SEH) } __except(handle_seh_(::GetExceptionCode())) { if (permit_throw_in_dtor) { return false; } } #endif return true; } }; public: typedef test_object<Data> object; /** * Creates and registers test group with specified name. */ test_group(const char* name) : name_(name) { // register itself runner.get().register_group(name_,this); // register all tests tests_registerer<object, test_group, MaxTestsInGroup>::reg(*this); } /** * This constructor is used in self-test run only. */ test_group(const char* name, test_runner& another_runner) : name_(name) { // register itself another_runner.register_group(name_, this); // register all tests tests_registerer<test_object<Data>, test_group, MaxTestsInGroup>::reg(*this); } /** * Registers test method under given number. */ void reg(int n, testmethod tm) { tests_[n] = tm; } /** * Reset test position before first test. */ void rewind() CPL_OVERRIDE { current_test_ = tests_.begin(); } /** * Runs next test. */ bool run_next(test_result &tr) CPL_OVERRIDE { if (current_test_ == tests_.end()) { return false; } // find next user-specialized test safe_holder<object> obj; while (current_test_ != tests_.end()) { tests_iterator current_test = current_test_++; if(run_test_(current_test, obj, tr) && tr.result != test_result::dummy) { return true; } } return false; } /** * Runs one test by position. */ bool run_test(int n, test_result &tr) CPL_OVERRIDE { if (tests_.rbegin() == tests_.rend() || tests_.rbegin()->first < n) { return false; } // within scope; check if given test exists tests_iterator ti = tests_.find(n); if (ti == tests_.end()) { return false; } safe_holder<object> obj; return run_test_(ti, obj, tr); } /** * VC allows only one exception handling type per function, * so I have to split the method. */ bool run_test_(const tests_iterator& ti, safe_holder<object>& obj, test_result &tr) { std::string current_test_name; tr = test_result(name_, ti->first, current_test_name, test_result::ok); try { switch (run_test_seh_(ti->second, obj, current_test_name, ti->first)) { case SEH_CTOR: throw bad_ctor("seh"); break; case SEH_TEST: throw seh("seh"); break; case SEH_DUMMY: tr.result = test_result::dummy; break; case SEH_OK: // ok break; } } catch (const rethrown& ex) { tr = ex.tr; tr.result = test_result::rethrown; } catch (const tut_error& ex) { tr.result = ex.result(); tr.exception_typeid = typeid(ex).name(); tr.message = ex.what(); } catch (const std::exception& ex) { tr.result = test_result::ex; tr.exception_typeid = typeid(ex).name(); tr.message = ex.what(); } catch (...) { // test failed with unknown exception tr.result = test_result::ex; } if (obj.get()) { tr.name = obj->get_test_name(); // try to report to parent, if exists send_result_(obj.get(), tr); } else { tr.name = current_test_name; } return true; } /** * Runs one under SEH if platform supports it. */ seh_result run_test_seh_(testmethod tm, safe_holder<object>& obj, std::string& current_test_name, int current_test_id) { #if defined(TUT_USE_SEH) __try { #endif if (obj.get() == nullptr) { reset_holder_(obj); } obj->called_method_was_a_dummy_test_ = false; #if defined(TUT_USE_SEH) __try { #endif obj.get()->set_test_id(current_test_id); (obj.get()->*tm)(); #if defined(TUT_USE_SEH) } __except(handle_seh_(::GetExceptionCode())) { current_test_name = obj->get_test_name(); return SEH_TEST; } #endif if (obj->called_method_was_a_dummy_test_) { // do not call obj.release(); reuse object return SEH_DUMMY; } current_test_name = obj->get_test_name(); obj.permit_throw(); obj.release(); #if defined(TUT_USE_SEH) } __except(handle_seh_(::GetExceptionCode())) { return SEH_CTOR; } #endif return SEH_OK; } void reset_holder_(safe_holder<object>& obj) { try { obj.reset(); } catch (const std::exception& ex) { throw bad_ctor(ex.what()); } catch (...) { throw bad_ctor("test constructor has generated an exception;" " group execution is terminated"); } } }; #if defined(TUT_USE_SEH) /** * Decides should we execute handler or ignore SE. */ inline int handle_seh_(DWORD excode) { switch(excode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_BREAKPOINT: case EXCEPTION_SINGLE_STEP: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_FLT_DENORMAL_OPERAND: case EXCEPTION_FLT_DIVIDE_BY_ZERO: case EXCEPTION_FLT_INEXACT_RESULT: case EXCEPTION_FLT_INVALID_OPERATION: case EXCEPTION_FLT_OVERFLOW: case EXCEPTION_FLT_STACK_CHECK: case EXCEPTION_FLT_UNDERFLOW: case EXCEPTION_INT_DIVIDE_BY_ZERO: case EXCEPTION_INT_OVERFLOW: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_NONCONTINUABLE_EXCEPTION: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_INVALID_DISPOSITION: case EXCEPTION_GUARD_PAGE: case EXCEPTION_INVALID_HANDLE: return EXCEPTION_EXECUTE_HANDLER; }; return EXCEPTION_CONTINUE_SEARCH; } #endif } #endif ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tut/tut_exception.hpp��������������������������������������������������������0000664�0001750�0001750�00000004723�13701057753�017712� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#ifndef TUT_EXCEPTION_H_GUARD #define TUT_EXCEPTION_H_GUARD #include <stdexcept> #include "tut_result.hpp" namespace tut { /** * The base for all TUT exceptions. */ struct tut_error : public std::exception { tut_error(const std::string& msg) : err_msg(msg) { } virtual test_result::result_type result() const { return test_result::ex; } const char* what() const throw() CPL_OVERRIDE { return err_msg.c_str(); } ~tut_error() throw() { } private: tut_error& operator=(const tut_error&); std::string err_msg; }; /** * Group not found exception. */ struct no_such_group : public tut_error { no_such_group(const std::string& grp) : tut_error(grp) { } ~no_such_group() throw() { } }; /** * Internal exception to be throwed when * test constructor has failed. */ struct bad_ctor : public tut_error { bad_ctor(const std::string& msg) : tut_error(msg) { } test_result::result_type result() const CPL_OVERRIDE { return test_result::ex_ctor; } ~bad_ctor() throw() { } }; /** * Exception to be throwed when ensure() fails or fail() called. */ struct failure : public tut_error { failure(const std::string& msg) : tut_error(msg) { } test_result::result_type result() const CPL_OVERRIDE { return test_result::fail; } ~failure() throw() { } }; /** * Exception to be thrown when test destructor threw an exception. */ struct warning : public tut_error { warning(const std::string& msg) : tut_error(msg) { } test_result::result_type result() const CPL_OVERRIDE { return test_result::warn; } ~warning() throw() { } }; /** * Exception to be throwed when test issued SEH (Win32) */ struct seh : public tut_error { seh(const std::string& msg) : tut_error(msg) { } virtual test_result::result_type result() const CPL_OVERRIDE { return test_result::term; } ~seh() throw() { } }; /** * Exception to be throwed when child processes fail. */ struct rethrown : public failure { explicit rethrown(const test_result &resultIn) : failure(resultIn.message), tr(resultIn) { } virtual test_result::result_type result() const CPL_OVERRIDE { return test_result::rethrown; } ~rethrown() throw() { } const test_result tr; }; } #endif ���������������������������������������������gdalautotest-3.1.2/cpp/tmp/�������������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701057751�014263� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/tmp/do-not-remove������������������������������������������������������������0000664�0001750�0001750�00000000000�13701057751�016667� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/README�����������������������������������������������������������������������0000664�0001750�0001750�00000004465�13701057751�014354� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������$Id: README,v 1.4 2006/12/06 15:38:16 mloskot Exp $ -------------------------------------------------------------------------- GDAL C++ Unit Tests package Author: Mateusz Loskot (mateusz@loskot.net) -------------------------------------------------------------------------- The C++ Unit Tests package is dedicated to Windows CE platform, though it's runnable on desktop Windows. It should also compile on Unix, but internally Windows paths (with \)are used, so you may need to replace them with Unix paths (with /) This package includes subset of tests from gdalautotest but implemented in C++ language and TUT - C++ Unit Test Framework. The C++ Unit Tests are based on GDAL C API, so they can be used to tests both sets of GDAL APIs: C and C++. ------------------------------------- Tests coverage ------------------------------------- 1. GDAL - Common features - AAIGrid - DTED - GTIff 2. OGR - Common features - GEOS support - Shape 3. OSR - Common features - PROJ.4 - PCI ------------------------------------- Compilation for desktop Windows ------------------------------------- Configuration: Open makefile.vc in your favourite editor and check if section "CONFIGURATION" looks correctly for your environment. Makefile expects to find gdal_i.lib and gdalXY.dll in GDAL_ROOT location, where XY is GDAL_VERSION. Update the configuration block to fit your environment. Customize GEOS_ROOT and PROJ4_ROOT variables. Makefile tries to copy gdalXY.dll into 'gdalautotest\cpp' directory, so test runner executable can find it without any problems. Clean target will delete all binaries, executable and copied DLL. Build: nmake /f makefile.vc Clean: nmake /f makefile.vc clean No project file is available for desktop Windows target. ------------------------------------- Compilation for Windows CE system ------------------------------------- IMPORTANT: Currently, the project file is not integrated with GDAL project files, so Unit Test executable does not link automatically, unless you hack project settings yourself and configure linker settings properly. Please, wait for GDAL 1.4.0. Use project file from 'msvc80ce' subdirectory No makefile is available for Windows CE target. -------------------------------------------------------------------------- Contact: Mateusz Loskot (mateusz@loskot.net)�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_ogr.cpp�����������������������������������������������������������������0000664�0001750�0001750�00000152761�13701057761�016032� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test general OGR features. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "ogr_p.h" #include "ogrsf_frmts.h" #include "../../gdal/ogr/ogrsf_frmts/osm/gpb.h" #include <string> namespace tut { // Common fixture with test data struct test_ogr_data { // Expected number of drivers GDALDriverManager* drv_reg_; int drv_count_; std::string drv_shape_; bool has_geos_support_; std::string data_; std::string data_tmp_; test_ogr_data() : drv_reg_(nullptr), drv_count_(0), drv_shape_("ESRI Shapefile"), data_(tut::common::data_basedir), data_tmp_(tut::common::tmp_basedir) { drv_reg_ = GetGDALDriverManager(); // Windows CE port builds with fixed number of drivers #ifdef OGR_ENABLED #ifdef CSV_ENABLED drv_count_++; #endif #ifdef GML_ENABLED drv_count_++; #endif #ifdef SHAPE_ENABLED drv_count_++; #endif #ifdef SQLITE_ENABLED drv_count_++; #endif #ifdef TAB_ENABLED drv_count_++; #endif #endif /* OGR_ENABLED */ } }; // Register test group typedef test_group<test_ogr_data> group; typedef group::object object; group test_ogr_group("OGR"); // Test OGR driver registrar access template<> template<> void object::test<1>() { ensure("GetGDALDriverManager() is NULL", nullptr != drv_reg_); } // Test if Shapefile driver is registered template<> template<> void object::test<3>() { GDALDriverManager* manager = GetGDALDriverManager(); ensure(nullptr != manager); GDALDriver* drv = manager->GetDriverByName(drv_shape_.c_str()); ensure("Shapefile driver is not registered", nullptr != drv); } template<class T> void testSpatialReferenceLeakOnCopy(OGRSpatialReference* poSRS) { ensure("GetReferenceCount expected to be 1 before copies", 1 == poSRS->GetReferenceCount()); { int nCurCount; int nLastCount = 1; T value; value.assignSpatialReference(poSRS); nCurCount = poSRS->GetReferenceCount(); ensure("SRS reference count not incremented by assignSpatialReference", nCurCount > nLastCount ); nLastCount = nCurCount; T value2(value); nCurCount = poSRS->GetReferenceCount(); ensure("SRS reference count not incremented by copy constructor", nCurCount > nLastCount ); nLastCount = nCurCount; T value3; value3 = value; nCurCount = poSRS->GetReferenceCount(); ensure("SRS reference count not incremented by assignment operator", nCurCount > nLastCount ); nLastCount = nCurCount; value3 = value; ensure( "SRS reference count incremented by assignment operator", nLastCount == poSRS->GetReferenceCount() ); } ensure( "GetReferenceCount expected to be decremented by destructors", 1 == poSRS->GetReferenceCount() ); } // Test if copy does not leak or double delete the spatial reference template<> template<> void object::test<4>() { OGRSpatialReference* poSRS = new OGRSpatialReference(); ensure(nullptr != poSRS); testSpatialReferenceLeakOnCopy<OGRPoint>(poSRS); testSpatialReferenceLeakOnCopy<OGRLineString>(poSRS); testSpatialReferenceLeakOnCopy<OGRLinearRing>(poSRS); testSpatialReferenceLeakOnCopy<OGRCircularString>(poSRS); testSpatialReferenceLeakOnCopy<OGRCompoundCurve>(poSRS); testSpatialReferenceLeakOnCopy<OGRCurvePolygon>(poSRS); testSpatialReferenceLeakOnCopy<OGRPolygon>(poSRS); testSpatialReferenceLeakOnCopy<OGRGeometryCollection>(poSRS); testSpatialReferenceLeakOnCopy<OGRMultiSurface>(poSRS); testSpatialReferenceLeakOnCopy<OGRMultiPolygon>(poSRS); testSpatialReferenceLeakOnCopy<OGRMultiPoint>(poSRS); testSpatialReferenceLeakOnCopy<OGRMultiCurve>(poSRS); testSpatialReferenceLeakOnCopy<OGRMultiLineString>(poSRS); testSpatialReferenceLeakOnCopy<OGRTriangle>(poSRS); testSpatialReferenceLeakOnCopy<OGRPolyhedralSurface>(poSRS); testSpatialReferenceLeakOnCopy<OGRTriangulatedSurface>(poSRS); delete poSRS; } template<class T> T* make(); template<> OGRPoint* make() { return new OGRPoint(1.0, 2.0, 3.0); } template<> OGRLineString* make() { OGRLineString* poLineString = new OGRLineString(); poLineString->addPoint(1.0, 2.0, 3.0); poLineString->addPoint(1.1, 2.1, 3.1); poLineString->addPoint(1.2, 2.2, 3.2); return poLineString; } template<> OGRLinearRing* make() { OGRLinearRing* poLinearRing = new OGRLinearRing(); poLinearRing->addPoint(1.0, 2.0, 3.0); poLinearRing->addPoint(1.1, 2.1, 3.1); poLinearRing->addPoint(1.2, 2.2, 3.2); poLinearRing->addPoint(1.0, 2.0, 3.0); return poLinearRing; } template<> OGRCircularString* make() { OGRCircularString* poCircularString = new OGRCircularString(); poCircularString->addPoint(1.0, 2.0, 3.0); poCircularString->addPoint(1.1, 2.1, 3.1); poCircularString->addPoint(1.2, 2.2, 3.2); return poCircularString; } template<> OGRCompoundCurve* make() { OGRCompoundCurve* poCompoundCurve = new OGRCompoundCurve(); poCompoundCurve->addCurveDirectly(make<OGRLineString>()); OGRCircularString* poCircularString = make<OGRCircularString>(); poCircularString->reversePoints(); poCompoundCurve->addCurveDirectly(poCircularString); return poCompoundCurve; } template<> OGRCurvePolygon* make() { OGRCurvePolygon* poCurvePolygon = new OGRCurvePolygon(); poCurvePolygon->addRingDirectly(make<OGRCompoundCurve>()); poCurvePolygon->addRingDirectly(make<OGRCompoundCurve>()); return poCurvePolygon; } template<> OGRPolygon* make() { OGRPolygon* poPolygon = new OGRPolygon(); poPolygon->addRingDirectly(make<OGRLinearRing>()); poPolygon->addRingDirectly(make<OGRLinearRing>()); return poPolygon; } template<> OGRGeometryCollection* make() { OGRGeometryCollection* poCollection = new OGRGeometryCollection(); poCollection->addGeometryDirectly(make<OGRPoint>()); poCollection->addGeometryDirectly(make<OGRLinearRing>()); return poCollection; } template<> OGRMultiSurface* make() { OGRMultiSurface* poCollection = new OGRMultiSurface(); poCollection->addGeometryDirectly(make<OGRPolygon>()); poCollection->addGeometryDirectly(make<OGRCurvePolygon>()); return poCollection; } template<> OGRMultiPolygon* make() { OGRMultiPolygon* poCollection = new OGRMultiPolygon(); poCollection->addGeometryDirectly(make<OGRPolygon>()); return poCollection; } template<> OGRMultiPoint* make() { OGRMultiPoint* poCollection = new OGRMultiPoint(); poCollection->addGeometryDirectly(make<OGRPoint>()); return poCollection; } template<> OGRMultiCurve* make() { OGRMultiCurve* poCollection = new OGRMultiCurve(); poCollection->addGeometryDirectly(make<OGRLineString>()); poCollection->addGeometryDirectly(make<OGRCompoundCurve>()); return poCollection; } template<> OGRMultiLineString* make() { OGRMultiLineString* poCollection = new OGRMultiLineString(); poCollection->addGeometryDirectly(make<OGRLineString>()); poCollection->addGeometryDirectly(make<OGRLinearRing>()); return poCollection; } template<> OGRTriangle* make() { OGRPoint p1(0, 0), p2(0, 1), p3(1, 1); return new OGRTriangle(p1, p2, p3); } template<> OGRTriangulatedSurface* make() { OGRTriangulatedSurface* poTS = new OGRTriangulatedSurface(); poTS->addGeometryDirectly(make<OGRTriangle>()); return poTS; } template<> OGRPolyhedralSurface* make() { OGRPolyhedralSurface* poPS = new OGRPolyhedralSurface(); poPS->addGeometryDirectly(make<OGRPolygon>()); return poPS; } template<class T> void testCopyEquals() { T* poOrigin = make<T>(); ensure( nullptr != poOrigin); T value2( *poOrigin ); std::ostringstream strErrorCopy; strErrorCopy << poOrigin->getGeometryName() << ": copy constructor changed a value"; ensure(strErrorCopy.str().c_str(), CPL_TO_BOOL(poOrigin->Equals(&value2))); T value3; value3 = *poOrigin; value3 = *poOrigin; auto& value3Ref(value3); value3 = value3Ref; std::ostringstream strErrorAssign; strErrorAssign << poOrigin->getGeometryName() << ": assignment operator changed a value"; #ifdef DEBUG_VERBOSE char* wkt1 = NULL, *wkt2 = NULL; poOrigin->exportToWkt(&wkt1); value3.exportToWkt(&wkt2); printf("%s %s\n", wkt1, wkt2); CPLFree(wkt1); CPLFree(wkt2); #endif ensure(strErrorAssign.str().c_str(), CPL_TO_BOOL(poOrigin->Equals(&value3))); OGRGeometryFactory::destroyGeometry(poOrigin); } // Test if copy constructor and assignment operators succeeds on copying the geometry data template<> template<> void object::test<5>() { testCopyEquals<OGRPoint>(); testCopyEquals<OGRLineString>(); testCopyEquals<OGRLinearRing>(); testCopyEquals<OGRCircularString>(); testCopyEquals<OGRCompoundCurve>(); testCopyEquals<OGRCurvePolygon>(); testCopyEquals<OGRPolygon>(); testCopyEquals<OGRGeometryCollection>(); testCopyEquals<OGRMultiSurface>(); testCopyEquals<OGRMultiPolygon>(); testCopyEquals<OGRMultiPoint>(); testCopyEquals<OGRMultiCurve>(); testCopyEquals<OGRMultiLineString>(); testCopyEquals<OGRTriangle>(); testCopyEquals<OGRPolyhedralSurface>(); testCopyEquals<OGRTriangulatedSurface>(); } template<> template<> void object::test<6>() { { OGRPoint p; double x = 1, y = 2; OGR_G_SetPoints( (OGRGeometryH)&p, 1, &x, 0, &y, 0, nullptr, 0 ); ensure_equals(p.getCoordinateDimension(), 2); ensure_equals(p.getX(), 1); ensure_equals(p.getY(), 2); ensure_equals(p.getZ(), 0); } { OGRPoint p; double x = 1, y = 2, z = 3; OGR_G_SetPoints( (OGRGeometryH)&p, 1, &x, 0, &y, 0, &z, 0 ); ensure_equals(p.getCoordinateDimension(), 3); ensure_equals(p.getX(), 1); ensure_equals(p.getY(), 2); ensure_equals(p.getZ(), 3); } { OGRPoint p; CPLPushErrorHandler(CPLQuietErrorHandler); OGR_G_SetPoints( (OGRGeometryH)&p, 1, nullptr, 0, nullptr, 0, nullptr, 0 ); CPLPopErrorHandler(); } { OGRLineString ls; double x = 1, y = 2; OGR_G_SetPoints( (OGRGeometryH)&ls, 1, &x, 0, &y, 0, nullptr, 0 ); ensure_equals(ls.getCoordinateDimension(), 2); ensure_equals(ls.getX(0), 1); ensure_equals(ls.getY(0), 2); ensure_equals(ls.getZ(0), 0); } { OGRLineString ls; double x = 1, y = 2; OGR_G_SetPoints( (OGRGeometryH)&ls, 1, &x, 0, &y, 0, nullptr, 0 ); ensure_equals(ls.getCoordinateDimension(), 2); ensure_equals(ls.getX(0), 1); ensure_equals(ls.getY(0), 2); ensure_equals(ls.getZ(0), 0); } { OGRLineString ls; double x = 1, y = 2; OGR_G_SetPoints( (OGRGeometryH)&ls, 1, &x, 8, &y, 8, nullptr, 0 ); ensure_equals(ls.getCoordinateDimension(), 2); ensure_equals(ls.getX(0), 1); ensure_equals(ls.getY(0), 2); ensure_equals(ls.getZ(0), 0); } { OGRLineString ls; double x = 1, y = 2, z = 3; OGR_G_SetPoints( (OGRGeometryH)&ls, 1, &x, 0, &y, 0, &z, 0 ); ensure_equals(ls.getCoordinateDimension(), 3); ensure_equals(ls.getX(0), 1); ensure_equals(ls.getY(0), 2); ensure_equals(ls.getZ(0), 3); } { OGRLineString ls; double x = 1, y = 2, z = 3; OGR_G_SetPoints( (OGRGeometryH)&ls, 1, &x, 8, &y, 8, &z, 8 ); ensure_equals(ls.getCoordinateDimension(), 3); ensure_equals(ls.getX(0), 1); ensure_equals(ls.getY(0), 2); ensure_equals(ls.getZ(0), 3); } { OGRLineString ls; CPLPushErrorHandler(CPLQuietErrorHandler); OGR_G_SetPoints( (OGRGeometryH)&ls, 1, nullptr, 0, nullptr, 0, nullptr, 0 ); CPLPopErrorHandler(); } } template<> template<> void object::test<7>() { OGRStyleMgrH hSM = OGR_SM_Create(nullptr); OGR_SM_InitStyleString(hSM, "PEN(w:2px,c:#000000,id:\"mapinfo-pen-2,ogr-pen-0\")"); OGRStyleToolH hTool = OGR_SM_GetPart(hSM, 0, nullptr); int bValueIsNull; ensure_distance(OGR_ST_GetParamDbl(hTool, OGRSTPenWidth, &bValueIsNull), 2.0 * (1.0 / (72.0 * 39.37)) * 1000, 1e-6); ensure_equals(OGR_ST_GetUnit(hTool), OGRSTUMM); OGR_ST_SetUnit(hTool, OGRSTUPixel, 1.0); ensure_equals(OGR_ST_GetParamDbl(hTool, OGRSTPenWidth, &bValueIsNull), 2.0); ensure_equals(OGR_ST_GetUnit(hTool), OGRSTUPixel); OGR_ST_Destroy(hTool); OGR_SM_Destroy(hSM); } template<> template<> void object::test<8>() { OGRField sField; ensure_equals(OGRParseDate("2017/11/31 12:34:56", &sField, 0), TRUE); ensure_equals(sField.Date.Year, 2017); ensure_equals(sField.Date.Month, 11); ensure_equals(sField.Date.Day, 31); ensure_equals(sField.Date.Hour, 12); ensure_equals(sField.Date.Minute, 34); ensure_equals(sField.Date.Second, 56.0f); ensure_equals(sField.Date.TZFlag, 0); ensure_equals(OGRParseDate("2017/11/31 12:34:56+00", &sField, 0), TRUE); ensure_equals(sField.Date.TZFlag, 100); ensure_equals(OGRParseDate("2017/11/31 12:34:56+12:00", &sField, 0), TRUE); ensure_equals(sField.Date.TZFlag, 100 + 12 * 4); ensure_equals(OGRParseDate("2017/11/31 12:34:56+1200", &sField, 0), TRUE); ensure_equals(sField.Date.TZFlag, 100 + 12 * 4); ensure_equals(OGRParseDate("2017/11/31 12:34:56+815", &sField, 0), TRUE); ensure_equals(sField.Date.TZFlag, 100 + 8 * 4 + 1); ensure_equals(OGRParseDate("2017/11/31 12:34:56-12:00", &sField, 0), TRUE); ensure_equals(sField.Date.TZFlag, 100 - 12 * 4); ensure_equals(OGRParseDate(" 2017/11/31 12:34:56", &sField, 0), TRUE); ensure_equals(sField.Date.Year, 2017); ensure_equals(OGRParseDate("2017/11/31 12:34:56.789", &sField, 0), TRUE); ensure_equals(sField.Date.Second, 56.789f); // Leap second ensure_equals(OGRParseDate("2017/11/31 12:34:60", &sField, 0), TRUE); ensure_equals(sField.Date.Second, 60.0f); ensure_equals(OGRParseDate("2017-11-31T12:34:56", &sField, 0), TRUE); ensure_equals(sField.Date.Year, 2017); ensure_equals(sField.Date.Month, 11); ensure_equals(sField.Date.Day, 31); ensure_equals(sField.Date.Hour, 12); ensure_equals(sField.Date.Minute, 34); ensure_equals(sField.Date.Second, 56.0f); ensure_equals(sField.Date.TZFlag, 0); ensure_equals(OGRParseDate("2017-11-31T12:34:56Z", &sField, 0), TRUE); ensure_equals(sField.Date.Second, 56.0f); ensure_equals(sField.Date.TZFlag, 100); ensure_equals(OGRParseDate("2017-11-31T12:34:56.789Z", &sField, 0), TRUE); ensure_equals(sField.Date.Second, 56.789f); ensure_equals(sField.Date.TZFlag, 100); ensure_equals(OGRParseDate("2017-11-31", &sField, 0), TRUE); ensure_equals(sField.Date.Year, 2017); ensure_equals(sField.Date.Month, 11); ensure_equals(sField.Date.Day, 31); ensure_equals(sField.Date.Hour, 0); ensure_equals(sField.Date.Minute, 0); ensure_equals(sField.Date.Second, 0.0f); ensure_equals(sField.Date.TZFlag, 0); ensure_equals(OGRParseDate("2017-11-31Z", &sField, 0), TRUE); ensure_equals(sField.Date.Year, 2017); ensure_equals(sField.Date.Month, 11); ensure_equals(sField.Date.Day, 31); ensure_equals(sField.Date.Hour, 0); ensure_equals(sField.Date.Minute, 0); ensure_equals(sField.Date.Second, 0.0f); ensure_equals(sField.Date.TZFlag, 0); ensure_equals(OGRParseDate("12:34", &sField, 0), TRUE); ensure_equals(sField.Date.Year, 0); ensure_equals(sField.Date.Month, 0); ensure_equals(sField.Date.Day, 0); ensure_equals(sField.Date.Hour, 12); ensure_equals(sField.Date.Minute, 34); ensure_equals(sField.Date.Second, 0.0f); ensure_equals(sField.Date.TZFlag, 0); ensure_equals(OGRParseDate("12:34:56", &sField, 0), TRUE); ensure_equals(OGRParseDate("12:34:56.789", &sField, 0), TRUE); ensure(!OGRParseDate("2017", &sField, 0)); ensure(!OGRParseDate("12:", &sField, 0)); ensure(!OGRParseDate("2017-a-31T12:34:56", &sField, 0)); ensure(!OGRParseDate("2017-00-31T12:34:56", &sField, 0)); ensure(!OGRParseDate("2017-13-31T12:34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-00T12:34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-aT12:34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-32T12:34:56", &sField, 0)); ensure(!OGRParseDate("a:34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-01Ta:34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-01T25:34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-01T00:a:00", &sField, 0)); ensure(!OGRParseDate("2017-01-01T00: 34:56", &sField, 0)); ensure(!OGRParseDate("2017-01-01T00:61:00", &sField, 0)); ensure(!OGRParseDate("2017-01-01T00:00:61", &sField, 0)); ensure(!OGRParseDate("2017-01-01T00:00:a", &sField, 0)); } // Test OGRPolygon::IsPointOnSurface() template<> template<> void object::test<9>() { OGRPolygon oPoly; OGRPoint oEmptyPoint; ensure( !oPoly.IsPointOnSurface(&oEmptyPoint) ); OGRPoint oPoint; oPoint.setX(1); oPoint.setY(1); ensure( !oPoly.IsPointOnSurface(&oPoint) ); const char* pszPoly = "POLYGON((0 0,0 10,10 10,10 0,0 0),(4 4,4 6,6 6,6 4,4 4))"; oPoly.importFromWkt(&pszPoly); ensure( !oPoly.IsPointOnSurface(&oEmptyPoint) ); ensure_equals( oPoly.IsPointOnSurface(&oPoint), TRUE ); oPoint.setX(5); oPoint.setY(5); ensure( !oPoly.IsPointOnSurface(&oPoint) ); } // Test gpb.h template<> template<> void object::test<10>() { ensure_equals( GetVarUIntSize(0), 1 ); ensure_equals( GetVarUIntSize(127), 1 ); ensure_equals( GetVarUIntSize(128), 2 ); ensure_equals( GetVarUIntSize((1 << 14) - 1), 2 ); ensure_equals( GetVarUIntSize(1 << 14), 3 ); ensure_equals( GetVarUIntSize(GUINT64_MAX), 10 ); ensure_equals( GetVarIntSize(0), 1 ); ensure_equals( GetVarIntSize(127), 1 ); ensure_equals( GetVarIntSize(128), 2 ); ensure_equals( GetVarIntSize((1 << 14) - 1), 2 ); ensure_equals( GetVarIntSize(1 << 14), 3 ); ensure_equals( GetVarIntSize(GINT64_MAX), 9 ); ensure_equals( GetVarIntSize(-1), 10 ); ensure_equals( GetVarIntSize(GINT64_MIN), 10 ); ensure_equals( GetVarSIntSize(0), 1 ); ensure_equals( GetVarSIntSize(63), 1 ); ensure_equals( GetVarSIntSize(64), 2 ); ensure_equals( GetVarSIntSize(-1), 1 ); ensure_equals( GetVarSIntSize(-64), 1 ); ensure_equals( GetVarSIntSize(-65), 2 ); ensure_equals( GetVarSIntSize(GINT64_MIN), 10 ); ensure_equals( GetVarSIntSize(GINT64_MAX), 10 ); ensure_equals( GetTextSize(""), 1 ); ensure_equals( GetTextSize(" "), 2 ); ensure_equals( GetTextSize(std::string(" ")), 2 ); GByte abyBuffer[11] = { 0 }; GByte* pabyBuffer; const GByte* pabyBufferRO; pabyBuffer = abyBuffer; WriteVarUInt(&pabyBuffer, 0); ensure_equals(pabyBuffer - abyBuffer, 1); pabyBufferRO = abyBuffer; ensure_equals(ReadVarUInt64(&pabyBufferRO), 0U); pabyBuffer = abyBuffer; WriteVarUInt(&pabyBuffer, 127); ensure_equals(pabyBuffer - abyBuffer, 1); pabyBufferRO = abyBuffer; ensure_equals(ReadVarUInt64(&pabyBufferRO), 127U); pabyBuffer = abyBuffer; WriteVarUInt(&pabyBuffer, 0xDEADBEEFU); ensure_equals(pabyBuffer - abyBuffer, 5); pabyBufferRO = abyBuffer; ensure_equals(ReadVarUInt64(&pabyBufferRO), 0xDEADBEEFU); pabyBuffer = abyBuffer; WriteVarUInt(&pabyBuffer, GUINT64_MAX); ensure_equals(pabyBuffer - abyBuffer, 10); pabyBufferRO = abyBuffer; ensure_equals(ReadVarUInt64(&pabyBufferRO), GUINT64_MAX); pabyBuffer = abyBuffer; WriteVarInt(&pabyBuffer, GINT64_MAX); ensure_equals(pabyBuffer - abyBuffer, 9); pabyBufferRO = abyBuffer; ensure_equals(ReadVarInt64(&pabyBufferRO), GINT64_MAX); pabyBuffer = abyBuffer; WriteVarInt(&pabyBuffer, -1); ensure_equals(pabyBuffer - abyBuffer, 10); pabyBufferRO = abyBuffer; ensure_equals(ReadVarInt64(&pabyBufferRO), -1); pabyBuffer = abyBuffer; WriteVarInt(&pabyBuffer, GINT64_MIN); ensure_equals(pabyBuffer - abyBuffer, 10); pabyBufferRO = abyBuffer; ensure_equals(ReadVarInt64(&pabyBufferRO), GINT64_MIN); pabyBuffer = abyBuffer; WriteVarSInt(&pabyBuffer, 0); ensure_equals(pabyBuffer - abyBuffer, 1); { GIntBig nVal; pabyBufferRO = abyBuffer; READ_VARSINT64(pabyBufferRO, abyBuffer + 10, nVal); ensure_equals(nVal, 0); } pabyBuffer = abyBuffer; WriteVarSInt(&pabyBuffer, 1); ensure_equals(pabyBuffer - abyBuffer, 1); { GIntBig nVal; pabyBufferRO = abyBuffer; READ_VARSINT64(pabyBufferRO, abyBuffer + 10, nVal); ensure_equals(nVal, 1); } pabyBuffer = abyBuffer; WriteVarSInt(&pabyBuffer, -1); ensure_equals(pabyBuffer - abyBuffer, 1); { GIntBig nVal; pabyBufferRO = abyBuffer; READ_VARSINT64(pabyBufferRO, abyBuffer + 10, nVal); ensure_equals(nVal, -1); } pabyBuffer = abyBuffer; WriteVarSInt(&pabyBuffer, GINT64_MAX); ensure_equals(pabyBuffer - abyBuffer, 10); { GIntBig nVal; pabyBufferRO = abyBuffer; READ_VARSINT64(pabyBufferRO, abyBuffer + 10, nVal); ensure_equals(nVal, GINT64_MAX); } pabyBuffer = abyBuffer; WriteVarSInt(&pabyBuffer, GINT64_MIN); ensure_equals(pabyBuffer - abyBuffer, 10); { GIntBig nVal; pabyBufferRO = abyBuffer; READ_VARSINT64(pabyBufferRO, abyBuffer + 10, nVal); ensure_equals(nVal, GINT64_MIN); } pabyBuffer = abyBuffer; WriteText(&pabyBuffer, "x"); ensure_equals(pabyBuffer - abyBuffer, 2); ensure_equals(abyBuffer[0], 1); ensure_equals(abyBuffer[1], 'x'); pabyBuffer = abyBuffer; WriteText(&pabyBuffer, std::string("x")); ensure_equals(pabyBuffer - abyBuffer, 2); ensure_equals(abyBuffer[0], 1); ensure_equals(abyBuffer[1], 'x'); pabyBuffer = abyBuffer; WriteFloat32(&pabyBuffer, 1.25f); ensure_equals(pabyBuffer - abyBuffer, 4); pabyBufferRO = abyBuffer; ensure_equals(ReadFloat32(&pabyBufferRO, abyBuffer + 4), 1.25f); pabyBuffer = abyBuffer; WriteFloat64(&pabyBuffer, 1.25); ensure_equals(pabyBuffer - abyBuffer, 8); pabyBufferRO = abyBuffer; ensure_equals(ReadFloat64(&pabyBufferRO, abyBuffer + 8), 1.25); } // Test OGRGeometry::toXXXXX() template<> template<> void object::test<11>() { #define CONCAT(X,Y) X##Y #define TEST_OGRGEOMETRY_TO(X) { \ CONCAT(OGR,X) o; \ OGRGeometry* poGeom = &o; \ ensure_equals( poGeom->CONCAT(to,X)(), &o ); } TEST_OGRGEOMETRY_TO(Point); TEST_OGRGEOMETRY_TO(LineString); TEST_OGRGEOMETRY_TO(LinearRing); TEST_OGRGEOMETRY_TO(CircularString); TEST_OGRGEOMETRY_TO(CompoundCurve); TEST_OGRGEOMETRY_TO(CurvePolygon); TEST_OGRGEOMETRY_TO(Polygon); TEST_OGRGEOMETRY_TO(GeometryCollection); TEST_OGRGEOMETRY_TO(MultiSurface); TEST_OGRGEOMETRY_TO(MultiPolygon); TEST_OGRGEOMETRY_TO(MultiPoint); TEST_OGRGEOMETRY_TO(MultiCurve); TEST_OGRGEOMETRY_TO(MultiLineString); TEST_OGRGEOMETRY_TO(Triangle); TEST_OGRGEOMETRY_TO(PolyhedralSurface); TEST_OGRGEOMETRY_TO(TriangulatedSurface); { OGRLineString o; OGRGeometry* poGeom = &o; ensure_equals( poGeom->toCurve(), &o ); } { OGRPolygon o; OGRGeometry* poGeom = &o; ensure_equals( poGeom->toSurface(), &o ); } } template<typename T> void TestIterator(T* obj, int nExpectedPointCount) { int nCount = 0; for( auto& elt: obj ) { nCount ++; CPL_IGNORE_RET_VAL(elt); } ensure_equals(nCount, nExpectedPointCount); nCount = 0; const T* const_obj(obj); for( const auto& elt: const_obj) { nCount ++; CPL_IGNORE_RET_VAL(elt); } ensure_equals(nCount, nExpectedPointCount); } template<typename Concrete, typename Abstract = Concrete> void TestIterator( const char* pszWKT = nullptr, int nExpectedPointCount = 0) { Concrete obj; if( pszWKT ) { obj.importFromWkt(&pszWKT); } TestIterator<Abstract>(&obj, nExpectedPointCount); } // Test geometry visitor template<> template<> void object::test<12>() { static const struct { const char* pszWKT; int nExpectedPointCount; } asTests[] = { { "POINT(0 0)", 1}, { "LINESTRING(0 0)", 1}, { "POLYGON((0 0),(0 0))", 2}, { "MULTIPOINT(0 0)", 1}, { "MULTILINESTRING((0 0))", 1}, { "MULTIPOLYGON(((0 0)))", 1}, { "GEOMETRYCOLLECTION(POINT(0 0))", 1}, { "CIRCULARSTRING(0 0,1 1,0 0)", 3}, { "COMPOUNDCURVE((0 0,1 1))", 2}, { "CURVEPOLYGON((0 0,1 1,1 0,0 0))", 4}, { "MULTICURVE((0 0))", 1}, { "MULTISURFACE(((0 0)))", 1}, { "TRIANGLE((0 0,0 1,1 1,0 0))", 4}, { "POLYHEDRALSURFACE(((0 0,0 1,1 1,0 0)))", 4}, { "TIN(((0 0,0 1,1 1,0 0)))", 4}, }; class PointCounterVisitor: public OGRDefaultGeometryVisitor { int m_nPoints = 0; public: PointCounterVisitor() {} using OGRDefaultGeometryVisitor::visit; void visit(OGRPoint*) override { m_nPoints++; } int getNumPoints() const { return m_nPoints; } }; class PointCounterConstVisitor: public OGRDefaultConstGeometryVisitor { int m_nPoints = 0; public: PointCounterConstVisitor() {} using OGRDefaultConstGeometryVisitor::visit; void visit(const OGRPoint*) override { m_nPoints++; } int getNumPoints() const { return m_nPoints; } }; for( size_t i = 0; i < CPL_ARRAYSIZE(asTests); i++ ) { OGRGeometry* poGeom = nullptr; OGRGeometryFactory::createFromWkt(asTests[i].pszWKT, nullptr, &poGeom); PointCounterVisitor oVisitor; poGeom->accept(&oVisitor); ensure_equals(oVisitor.getNumPoints(), asTests[i].nExpectedPointCount); PointCounterConstVisitor oConstVisitor; poGeom->accept(&oConstVisitor); ensure_equals(oConstVisitor.getNumPoints(), asTests[i].nExpectedPointCount); delete poGeom; } TestIterator<OGRLineString>(); TestIterator<OGRLineString>("LINESTRING(0 0)", 1); TestIterator<OGRLineString, OGRCurve>("LINESTRING(0 0)", 1); TestIterator<OGRLineString, OGRCurve>(); TestIterator<OGRLinearRing>(); TestIterator<OGRCircularString>(); TestIterator<OGRCircularString>("CIRCULARSTRING(0 0,1 1,0 0)", 3); TestIterator<OGRCircularString, OGRCurve>("CIRCULARSTRING(0 0,1 1,0 0)", 3); TestIterator<OGRCompoundCurve>(); TestIterator<OGRCompoundCurve>("COMPOUNDCURVE((0 0,1 1))", 1); TestIterator<OGRCompoundCurve, OGRCurve>("COMPOUNDCURVE((0 0,1 1),CIRCULARSTRING(1 1,2 2,3 3))", 4); TestIterator<OGRCompoundCurve>("COMPOUNDCURVE(CIRCULARSTRING EMPTY)", 1); TestIterator<OGRCurvePolygon>(); TestIterator<OGRCurvePolygon>("CURVEPOLYGON((0 0,1 1,1 0,0 0))", 1); TestIterator<OGRPolygon>(); TestIterator<OGRPolygon>("POLYGON((0 0,1 1,1 0,0 0))", 1); TestIterator<OGRGeometryCollection>(); TestIterator<OGRGeometryCollection>("GEOMETRYCOLLECTION(POINT(0 0))", 1); TestIterator<OGRMultiSurface>(); TestIterator<OGRMultiSurface>("MULTISURFACE(((0 0)))", 1); TestIterator<OGRMultiPolygon>(); TestIterator<OGRMultiPolygon>("MULTIPOLYGON(((0 0)))", 1); TestIterator<OGRMultiPoint>(); TestIterator<OGRMultiPoint>("MULTIPOINT(0 0)", 1); TestIterator<OGRMultiCurve>(); TestIterator<OGRMultiCurve>("MULTICURVE((0 0))", 1); TestIterator<OGRMultiLineString>(); TestIterator<OGRMultiLineString>("MULTILINESTRING((0 0))", 1); TestIterator<OGRTriangle>(); TestIterator<OGRTriangle>("TRIANGLE((0 0,0 1,1 1,0 0))", 1); TestIterator<OGRPolyhedralSurface>(); TestIterator<OGRPolyhedralSurface>("POLYHEDRALSURFACE(((0 0,0 1,1 1,0 0)))", 1); TestIterator<OGRTriangulatedSurface>(); TestIterator<OGRTriangulatedSurface>("TIN(((0 0,0 1,1 1,0 0)))", 1); } // Test layer, dataset-feature and layer-feature iterators template<> template<> void object::test<13>() { std::string file(data_ + SEP + "poly.shp"); GDALDatasetUniquePtr poDS( GDALDataset::Open(file.c_str(), GDAL_OF_VECTOR)); ensure( poDS != nullptr ); { GIntBig nExpectedFID = 0; for( const auto& oFeatureLayerPair: poDS->GetFeatures() ) { ensure_equals( oFeatureLayerPair.feature->GetFID(), nExpectedFID ); nExpectedFID ++; ensure_equals( oFeatureLayerPair.layer, poDS->GetLayer(0) ); } ensure_equals(nExpectedFID, 10); } ensure_equals( poDS->GetLayers().size(), 1U ); ensure_equals( poDS->GetLayers()[0], poDS->GetLayer(0) ); ensure_equals( poDS->GetLayers()[static_cast<size_t>(0)], poDS->GetLayer(0) ); ensure_equals( poDS->GetLayers()["poly"], poDS->GetLayer(0) ); for( auto poLayer: poDS->GetLayers() ) { GIntBig nExpectedFID = 0; for( const auto& poFeature: poLayer ) { ensure_equals( poFeature->GetFID(), nExpectedFID ); nExpectedFID ++; } ensure_equals(nExpectedFID, 10); nExpectedFID = 0; for(const auto& oFeatureLayerPair: poDS->GetFeatures() ) { ensure_equals( oFeatureLayerPair.feature->GetFID(), nExpectedFID ); nExpectedFID ++; ensure_equals( oFeatureLayerPair.layer, poLayer ); } ensure_equals(nExpectedFID, 10); nExpectedFID = 0; OGR_FOR_EACH_FEATURE_BEGIN(hFeat, reinterpret_cast<OGRLayerH>(poLayer)) { if( nExpectedFID == 0 ) { nExpectedFID = 1; continue; } ensure_equals( OGR_F_GetFID(hFeat), nExpectedFID ); nExpectedFID ++; if( nExpectedFID == 5 ) break; } OGR_FOR_EACH_FEATURE_END(hFeat) ensure_equals(nExpectedFID, 5); auto oIter = poLayer->begin(); CPLPushErrorHandler(CPLQuietErrorHandler); // Only one feature iterator can be active at a time auto oIter2 = poLayer->begin(); CPLPopErrorHandler(); ensure( !(oIter2 != poLayer->end()) ); ensure( oIter != poLayer->end() ); } poDS.reset(GetGDALDriverManager()->GetDriverByName("Memory")-> Create("", 0, 0, 0, GDT_Unknown, nullptr)); int nCountLayers = 0; for( auto poLayer: poDS->GetLayers() ) { CPL_IGNORE_RET_VAL(poLayer); nCountLayers++; } ensure_equals(nCountLayers, 0); poDS->CreateLayer("foo"); poDS->CreateLayer("bar"); for( auto poLayer: poDS->GetLayers() ) { if( nCountLayers == 0 ) ensure_equals( poLayer->GetName(), "foo" ); else if( nCountLayers == 1 ) ensure_equals( poLayer->GetName(), "bar" ); nCountLayers++; } ensure_equals(nCountLayers, 2); // std::copy requires a InputIterator std::vector<OGRLayer*> oTarget; oTarget.resize(2); auto layers = poDS->GetLayers(); std::copy(layers.begin(), layers.end(), oTarget.begin()); ensure_equals(oTarget[0], layers[0]); ensure_equals(oTarget[1], layers[1]); // but in practice not necessarily uses the postincrement iterator. oTarget.clear(); oTarget.resize(2); auto input_iterator = layers.begin(); auto output_iterator = oTarget.begin(); while (input_iterator != layers.end()) { *output_iterator++ = *input_iterator++; } ensure_equals(oTarget[0], layers[0]); ensure_equals(oTarget[1], layers[1]); // Test copy constructor { GDALDataset::Layers::Iterator srcIter(poDS->GetLayers().begin()); ++srcIter; GDALDataset::Layers::Iterator newIter(srcIter); ensure_equals(*newIter, layers[1]); } // Test assignment operator { GDALDataset::Layers::Iterator srcIter(poDS->GetLayers().begin()); ++srcIter; GDALDataset::Layers::Iterator newIter; newIter = srcIter; ensure_equals(*newIter, layers[1]); } // Test move constructor { GDALDataset::Layers::Iterator srcIter(poDS->GetLayers().begin()); ++srcIter; GDALDataset::Layers::Iterator newIter(std::move(srcIter)); ensure_equals(*newIter, layers[1]); } // Test move assignment operator { GDALDataset::Layers::Iterator srcIter(poDS->GetLayers().begin()); ++srcIter; GDALDataset::Layers::Iterator newIter; newIter = std::move(srcIter); ensure_equals(*newIter, layers[1]); } } // Test field iterator template<> template<> void object::test<14>() { OGRFeatureDefn* poFeatureDefn = new OGRFeatureDefn(); poFeatureDefn->Reference(); { OGRFieldDefn oFieldDefn("str_field", OFTString); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("int_field", OFTInteger); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("int64_field", OFTInteger64); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("double_field", OFTReal); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("null_field", OFTReal); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("unset_field", OFTReal); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("dt_field", OFTDateTime); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("strlist_field", OFTStringList); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("intlist_field", OFTIntegerList); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("int64list_field", OFTInteger64List); poFeatureDefn->AddFieldDefn(&oFieldDefn); } { OGRFieldDefn oFieldDefn("doublelist_field", OFTRealList); poFeatureDefn->AddFieldDefn(&oFieldDefn); } OGRFeature oFeature(poFeatureDefn); { OGRFeature oFeatureTmp(poFeatureDefn); oFeatureTmp[0] = "bar"; ensure_equals( oFeatureTmp[0].GetString(), "bar" ); { // Proxy reference auto&& x= oFeatureTmp[0]; auto& xRef(x); x = xRef; ensure_equals( oFeatureTmp[0].GetString(), "bar" ); } { oFeatureTmp[0] = oFeatureTmp[0]; ensure_equals( oFeatureTmp[0].GetString(), "bar" ); } { // Proxy reference auto&& x= oFeatureTmp[0]; x = "baz"; ensure_equals( x.GetString(), "baz" ); } oFeatureTmp["str_field"] = std::string("foo"); oFeatureTmp["int_field"] = 123; oFeatureTmp["int64_field"] = oFeatureTmp["int_field"]; ensure_equals( oFeatureTmp["int64_field"].GetInteger(), 123 ); oFeatureTmp["int64_field"] = static_cast<GIntBig>(1234567890123); oFeatureTmp["double_field"] = 123.45; oFeatureTmp["null_field"].SetNull(); oFeatureTmp["unset_field"].clear(); oFeatureTmp["unset_field"].Unset(); oFeatureTmp["dt_field"].SetDateTime(2018, 4, 5, 12, 34, 56.75f, 0); oFeatureTmp["strlist_field"] = CPLStringList().List(); oFeatureTmp["strlist_field"] = std::vector<std::string>(); oFeatureTmp["strlist_field"] = std::vector<std::string>{ "foo", "bar" }; oFeatureTmp["strlist_field"] = static_cast<CSLConstList>(oFeatureTmp["strlist_field"]); ensure_equals( CSLCount(static_cast<CSLConstList>(oFeatureTmp["strlist_field"])), 2 ); oFeatureTmp["intlist_field"] = std::vector<int>(); oFeatureTmp["intlist_field"] = std::vector<int>{ 12, 34 }; oFeatureTmp["int64list_field"] = std::vector<GIntBig>(); oFeatureTmp["int64list_field"] = std::vector<GIntBig>{ 1234567890123,34 }; oFeatureTmp["doublelist_field"] = std::vector<double>(); oFeatureTmp["doublelist_field"] = std::vector<double>{ 12.25,56.75 }; for( const auto& oField: oFeatureTmp ) { oFeature[oField.GetIndex()] = oField; } } { int x = oFeature[1]; ensure_equals( x, 123 ); } { int x = oFeature["int_field"]; ensure_equals( x, 123 ); } { GIntBig x = oFeature["int64_field"]; ensure_equals( x, static_cast<GIntBig>(1234567890123) ); } { double x = oFeature["double_field"]; ensure_equals( x, 123.45 ); } { const char* x = oFeature["str_field"]; ensure_equals( x, "foo" ); } bool bExceptionHit = false; try { oFeature["inexisting_field"]; } catch( const OGRFeature::FieldNotFoundException& ) { bExceptionHit = true; } ensure(bExceptionHit); int iIter = 0; const OGRFeature* poConstFeature = &oFeature; for( const auto& oField: *poConstFeature ) { ensure_equals( oField.GetIndex(), iIter ); ensure_equals( oField.GetDefn(), poFeatureDefn->GetFieldDefn(iIter) ); ensure_equals( CPLString(oField.GetName()), CPLString(oField.GetDefn()->GetNameRef()) ); ensure_equals( oField.GetType(), oField.GetDefn()->GetType() ); ensure_equals( oField.GetSubType(), oField.GetDefn()->GetSubType() ); if( iIter == 0 ) { ensure_equals( oField.IsUnset(), false ); ensure_equals( oField.IsNull(), false ); ensure_equals( CPLString(oField.GetRawValue()->String), CPLString("foo") ); ensure_equals( CPLString(oField.GetString()), CPLString("foo") ); ensure_equals( CPLString(oField.GetAsString()), CPLString("foo") ); } else if( iIter == 1 ) { ensure_equals( oField.GetRawValue()->Integer, 123 ); ensure_equals( oField.GetInteger(), 123 ); ensure_equals( oField.GetAsInteger(), 123 ); ensure_equals( oField.GetAsInteger64(), 123 ); ensure_equals( oField.GetAsDouble(), 123.0 ); ensure_equals( CPLString(oField.GetAsString()), CPLString("123") ); } else if( iIter == 2 ) { ensure_equals( oField.GetRawValue()->Integer64, 1234567890123 ); ensure_equals( oField.GetInteger64(), 1234567890123 ); ensure_equals( oField.GetAsInteger(), 2147483647 ); ensure_equals( oField.GetAsInteger64(), 1234567890123 ); ensure_equals( oField.GetAsDouble(), 1234567890123.0 ); ensure_equals( CPLString(oField.GetAsString()), CPLString("1234567890123") ); } else if( iIter == 3 ) { ensure_equals( oField.GetRawValue()->Real, 123.45 ); ensure_equals( oField.GetDouble(), 123.45 ); ensure_equals( oField.GetAsInteger(), 123 ); ensure_equals( oField.GetAsInteger64(), 123 ); ensure_equals( oField.GetAsDouble(), 123.45 ); ensure_equals( CPLString(oField.GetAsString()), CPLString("123.45") ); } else if( iIter == 4 ) { ensure_equals( oField.IsUnset(), false ); ensure_equals( oField.IsNull(), true ); } else if( iIter == 5 ) { ensure_equals( oField.IsUnset(), true ); ensure_equals( oField.empty(), true ); ensure_equals( oField.IsNull(), false ); } else if( iIter == 6 ) { int nYear, nMonth, nDay, nHour, nMin, nTZFlag; float fSec; ensure_equals( oField.GetDateTime(&nYear, &nMonth, &nDay, &nHour, &nMin, &fSec, &nTZFlag), true ); ensure_equals( nYear, 2018 ); ensure_equals( nMonth, 4 ); ensure_equals( nDay, 5 ); ensure_equals( nHour, 12 ); ensure_equals( nMin, 34 ); ensure_equals( fSec, 56.75f ); ensure_equals( nTZFlag, 0 ); } else if( iIter == 7 ) { std::vector<std::string> oExpected{ std::string("foo"), std::string("bar") }; decltype(oExpected) oGot = oField; ensure_equals( oGot.size(), oExpected.size() ); for( size_t i = 0; i < oExpected.size(); i++ ) ensure_equals( oGot[i], oExpected[i] ); } else if( iIter == 8 ) { std::vector<int> oExpected{ 12, 34 }; decltype(oExpected) oGot = oField; ensure_equals( oGot.size(), oExpected.size() ); for( size_t i = 0; i < oExpected.size(); i++ ) ensure_equals( oGot[i], oExpected[i] ); } else if( iIter == 9 ) { std::vector<GIntBig> oExpected{ 1234567890123, 34 }; decltype(oExpected) oGot = oField; ensure_equals( oGot.size(), oExpected.size() ); for( size_t i = 0; i < oExpected.size(); i++ ) ensure_equals( oGot[i], oExpected[i] ); } else if( iIter == 10 ) { std::vector<double> oExpected{ 12.25, 56.75 }; decltype(oExpected) oGot = oField; ensure_equals( oGot.size(), oExpected.size() ); for( size_t i = 0; i < oExpected.size(); i++ ) ensure_equals( oGot[i], oExpected[i] ); } iIter ++; } poFeatureDefn->Release(); } // Test OGRGetXMLDateTime() template<> template<> void object::test<15>() { OGRField sField; char *pszDateTime; sField.Date.Year = 2001; sField.Date.Month = 2; sField.Date.Day = 3; sField.Date.Hour = 4; sField.Date.Minute = 5; // Unknown time zone (TZFlag = 0), no millisecond count sField.Date.TZFlag = 0; sField.Date.Second = 6.0f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "unknown time zone, no millisecond count", strcmp("2001-02-03T04:05:06", pszDateTime) == 0); CPLFree(pszDateTime); // Unknown time zone (TZFlag = 0), millisecond count sField.Date.TZFlag = 0; sField.Date.Second = 6.789f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "unknown time zone, millisecond count", strcmp("2001-02-03T04:05:06.789", pszDateTime) == 0); CPLFree(pszDateTime); // Local time zone (TZFlag = 1), no millisecond count sField.Date.TZFlag = 1; sField.Date.Second = 6.0f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "local time zone, no millisecond count", strcmp("2001-02-03T04:05:06", pszDateTime) == 0); CPLFree(pszDateTime); // Local time zone (TZFlag = 1), millisecond count sField.Date.TZFlag = 1; sField.Date.Second = 6.789f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "local time zone, millisecond count", strcmp("2001-02-03T04:05:06.789", pszDateTime) == 0); CPLFree(pszDateTime); // GMT time zone (TZFlag = 100), no millisecond count sField.Date.TZFlag = 100; sField.Date.Second = 6.0f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "GMT time zone, no millisecond count", strcmp("2001-02-03T04:05:06Z", pszDateTime) == 0); CPLFree(pszDateTime); // GMT time zone (TZFlag = 100), millisecond count sField.Date.TZFlag = 100; sField.Date.Second = 6.789f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "GMT time zone, millisecond count", strcmp("2001-02-03T04:05:06.789Z", pszDateTime) == 0); CPLFree(pszDateTime); // Positive time-zone offset, no millisecond count sField.Date.TZFlag = 111; sField.Date.Second = 6.0f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "positive time-zone offset, no millisecond count", strcmp("2001-02-03T04:05:06+02:45", pszDateTime) == 0); CPLFree(pszDateTime); // Positive time-zone offset, millisecond count sField.Date.TZFlag = 111; sField.Date.Second = 6.789f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "positive time-zone offset, millisecond count", strcmp("2001-02-03T04:05:06.789+02:45", pszDateTime) == 0); CPLFree(pszDateTime); // Negative time-zone offset, no millisecond count sField.Date.TZFlag = 88; sField.Date.Second = 6.0f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "negative time-zone offset, no millisecond count", strcmp("2001-02-03T04:05:06-03:00", pszDateTime) == 0); CPLFree(pszDateTime); // Negative time-zone offset, millisecond count sField.Date.TZFlag = 88; sField.Date.Second = 6.789f; pszDateTime = OGRGetXMLDateTime(&sField); ensure(nullptr != pszDateTime); ensure("OGRGetXMLDateTime formats date/time field with " "negative time-zone offset, millisecond count", strcmp("2001-02-03T04:05:06.789-03:00", pszDateTime) == 0); CPLFree(pszDateTime); } // Test OGRLinearRing::isPointOnRingBoundary() template<> template<> void object::test<16>() { OGRPolygon oPoly; const char* pszPoly = "POLYGON((10 9,11 10,10 11,9 10,10 9))"; oPoly.importFromWkt(&pszPoly); auto poRing = oPoly.getExteriorRing(); // On first vertex { OGRPoint p(10, 9); ensure(poRing->isPointOnRingBoundary(&p, false)); } // On second vertex { OGRPoint p(11, 10); ensure(poRing->isPointOnRingBoundary(&p, false)); } // Middle of first segment { OGRPoint p(10.5, 9.5); ensure(poRing->isPointOnRingBoundary(&p, false)); } // "Before" first segment { OGRPoint p(10-1, 9-1); ensure(!poRing->isPointOnRingBoundary(&p, false)); } // "After" first segment { OGRPoint p(11+1, 10+1); ensure(!poRing->isPointOnRingBoundary(&p, false)); } // On third vertex { OGRPoint p(10, 11); ensure(poRing->isPointOnRingBoundary(&p, false)); } // Middle of second segment { OGRPoint p(10.5, 10.5); ensure(poRing->isPointOnRingBoundary(&p, false)); } // On fourth vertex { OGRPoint p(9, 10); ensure(poRing->isPointOnRingBoundary(&p, false)); } // Middle of third segment { OGRPoint p(9.5, 10.5); ensure(poRing->isPointOnRingBoundary(&p, false)); } // Middle of fourth segment { OGRPoint p(9.5, 9.5); ensure(poRing->isPointOnRingBoundary(&p, false)); } } // Test OGRGeometry::exportToWkt() template<> template<> void object::test<17>() { char* pszWKT = nullptr; OGRPoint p(1, 2); p.exportToWkt(&pszWKT); ensure(pszWKT != nullptr); ensure_equals(std::string(pszWKT), "POINT (1 2)"); CPLFree(pszWKT); } } // namespace tut ���������������gdalautotest-3.1.2/cpp/testthreadcond.cpp�����������������������������������������������������������0000664�0001750�0001750�00000010677�13701057761�017216� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testthreadcond.cpp 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ * * Project: GDAL Core * Purpose: Test thread API * Author: Even Rouault, <even dot rouault at spatialys.com> * ****************************************************************************** * Copyright (c) 2012, Even Rouault <even dot rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #ifndef DEBUG #define DEBUG #endif #include "cpl_multiproc.h" CPLCond* hCond = nullptr; CPLCond* hCondJobFinished = nullptr; CPLMutex* hClientMutex = nullptr; struct _JobItem { int nJobNumber; struct _JobItem* psNext; }; typedef struct _JobItem JobItem; JobItem* psJobList = nullptr; int nJobListSize = 0; int nThreadTotal = 0; int bProducedFinished = 0; int bVerbose = FALSE; static void ProducerThread(void * /* unused */) { int i; int jobNumber = 0; JobItem* psItem; while(jobNumber < 1000) { CPLAcquireMutex(hClientMutex, 1000.0); for(i=0;i<nThreadTotal;i++) { jobNumber ++; nJobListSize ++; psItem = (JobItem*)malloc(sizeof(JobItem)); psItem->nJobNumber = jobNumber; psItem->psNext = psJobList; psJobList = psItem; } CPLCondBroadcast(hCond); while (nJobListSize > nThreadTotal) { CPLCondWait(hCondJobFinished, hClientMutex); } CPLReleaseMutex(hClientMutex); } CPLAcquireMutex(hClientMutex, 1000.0); bProducedFinished = 1; CPLCondBroadcast(hCond); CPLReleaseMutex(hClientMutex); } static void ConsumerThread(void* pIndex) { int nJobNumber; int nThreadIndex; JobItem* psNext; nThreadIndex = *(int*)pIndex; free(pIndex); if (bVerbose) printf("Thread %d created\n", nThreadIndex); nThreadTotal ++; while(TRUE) { CPLAcquireMutex(hClientMutex, 1000.0); while(psJobList == nullptr && !bProducedFinished) CPLCondWait(hCond, hClientMutex); if (bProducedFinished) { CPLReleaseMutex(hClientMutex); break; } nJobNumber = psJobList->nJobNumber; psNext = psJobList->psNext; free(psJobList); psJobList = psNext; CPLReleaseMutex(hClientMutex); if (bVerbose) printf("Thread %d consumed job %d\n", nThreadIndex, nJobNumber); CPLAcquireMutex(hClientMutex, 1000.0); nJobListSize --; CPLCondSignal(hCondJobFinished); CPLReleaseMutex(hClientMutex); } } int main(int argc, char* argv[]) { int i; CPLJoinableThread* apThreads[10]; for(i = 0; i < argc; i++) { if( EQUAL(argv[i], "-verbose") ) bVerbose = TRUE; } hCond = CPLCreateCond(); hCondJobFinished = CPLCreateCond(); hClientMutex = CPLCreateMutex(); CPLReleaseMutex(hClientMutex); CPLCreateThread(ProducerThread, nullptr); for(i = 0; i < 10;i++) { int* pi = (int*)malloc(sizeof(int)); *pi = i; apThreads[i] = CPLCreateJoinableThread(ConsumerThread, pi); } for(i = 0; i < 10;i++) { CPLJoinThread(apThreads[i]); } CPLDestroyCond(hCond); CPLDestroyCond(hCondJobFinished); CPLDestroyMutex(hClientMutex); return 0; } �����������������������������������������������������������������gdalautotest-3.1.2/cpp/test_gdal_dted.cpp�����������������������������������������������������������0000664�0001750�0001750�00000023671�13701057761�017147� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test DTED support. Ported from gdrivers/dted.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_string.h" #include "gdal_alg.h" #include "gdal_priv.h" #include "gdal.h" #include <sstream> #include <string> #include <vector> namespace tut { // Common fixture with test data struct test_dted_data { struct raster_t { std::string file_; int band_; int checksum_; raster_t(std::string const& f, int b, int c) : file_(f), band_(b), checksum_(c) {} }; typedef std::vector<raster_t> rasters_t; GDALDriverH drv_; std::string drv_name_; std::string data_; std::string data_tmp_; rasters_t rasters_; test_dted_data() : drv_(nullptr), drv_name_("DTED") { drv_ = GDALGetDriverByName(drv_name_.c_str()); // Compose data path for test group data_ = tut::common::data_basedir; data_tmp_ = tut::common::tmp_basedir; // Collection of test DEM datasets // TODO: Verify value of this checksum rasters_.push_back(raster_t("n43.dt0", 1, 49187)); } }; // Register test group typedef test_group<test_dted_data> group; typedef group::object object; group test_dted_group("GDAL::DTED"); // Test driver availability template<> template<> void object::test<1>() { ensure("GDAL::DTED driver not available", nullptr != drv_); } // Test open dataset template<> template<> void object::test<2>() { rasters_t::const_iterator it; for (it = rasters_.begin(); it != rasters_.end(); ++it) { std::string file(data_ + SEP); file += it->file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALClose(ds); } } // Test dataset checksums template<> template<> void object::test<3>() { rasters_t::const_iterator it; for (it = rasters_.begin(); it != rasters_.end(); ++it) { std::string file(data_ + SEP); file += it->file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, it->band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(ds); const int ysize = GDALGetRasterYSize(ds); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << file << "' not equal"; ensure_equals(os.str().c_str(), checksum, it->checksum_); GDALClose(ds); } } // Test affine transformation coefficients template<> template<> void object::test<4>() { // Index of test file being tested const std::size_t fileIdx = 0; std::string file(data_ + SEP); file += rasters_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); double geoTransform[6] = { 0 }; CPLErr err = GDALGetGeoTransform(ds, geoTransform); ensure_equals("Can't fetch affine transformation coefficients", err, CE_None); // Test affine transformation coefficients const double maxError = 0.000001; const double expect[6] = { -80.004166666666663, 0.0083333333333333332, 0, 44.00416666666667, 0, -0.0083333333333333332 }; const std::string msg("Geotransform is incorrect"); ensure_distance(msg.c_str(), expect[0], geoTransform[0], maxError); ensure_distance(msg.c_str(), expect[1], geoTransform[1], maxError); ensure_distance(msg.c_str(), expect[2], geoTransform[2], maxError); ensure_distance(msg.c_str(), expect[3], geoTransform[3], maxError); ensure_distance(msg.c_str(), expect[4], geoTransform[4], maxError); ensure_distance(msg.c_str(), expect[5], geoTransform[5], maxError); GDALClose(ds); } // Test projection definition template<> template<> void object::test<5>() { // Index of test file being tested const std::size_t fileIdx = 0; std::string file(data_ + SEP); file += rasters_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); std::string proj(GDALGetProjectionRef(ds)); ensure_equals("Projection definition is not available", proj.empty(), false); std::string expect("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]"); ensure_equals("Projection does not match expected", proj, expect); GDALClose(ds); } // Test band data type and NODATA value template<> template<> void object::test<6>() { // Index of test file being tested const std::size_t fileIdx = 0; std::string file(data_ + SEP); file += rasters_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); const double noData = GDALGetRasterNoDataValue(band, nullptr); ensure_equals("Grid NODATA value wrong or missing", noData, -32767); ensure_equals("Data type is not GDT_Int16", GDALGetRasterDataType(band), GDT_Int16); GDALClose(ds); } // Create simple copy and check template<> template<> void object::test<7>() { // Index of test file being tested const std::size_t fileIdx = 0; std::string src(data_ + SEP); src += rasters_.at(fileIdx).file_; GDALDatasetH dsSrc = GDALOpen(src.c_str(), GA_ReadOnly); ensure("Can't open source dataset: " + src, nullptr != dsSrc); std::string dst(data_tmp_ + SEP); dst += rasters_.at(fileIdx).file_; GDALDatasetH dsDst = nullptr; dsDst = GDALCreateCopy(drv_, dst.c_str(), dsSrc, FALSE, nullptr, nullptr, nullptr); GDALClose(dsSrc); ensure("Can't copy dataset", nullptr != dsDst); std::string proj(GDALGetProjectionRef(dsDst)); ensure_equals("Projection definition is not available", proj.empty(), false); std::string expect("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]"); ensure_equals("Projection does not match expected", proj, expect); GDALRasterBandH band = GDALGetRasterBand(dsDst, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(dsDst); const int ysize = GDALGetRasterYSize(dsDst); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << dst << "' not equal"; ensure_equals(os.str().c_str(), checksum, rasters_.at(fileIdx).checksum_); GDALClose(dsDst); } // Test subwindow read and the tail recursion problem. template<> template<> void object::test<8>() { // Index of test file being tested const std::size_t fileIdx = 0; std::string file(data_ + SEP); file += rasters_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); // Sub-windows size const int win[4] = { 5, 5, 5, 5 }; // subwindow checksum const int winChecksum = 305; const int checksum = GDALChecksumImage(band, win[0], win[1], win[2], win[3]); std::stringstream os; os << "Checksums for '" << file << "' not equal"; ensure_equals(os.str().c_str(), checksum, winChecksum); GDALClose(ds); } } // namespace tut �����������������������������������������������������������������������gdalautotest-3.1.2/cpp/makefile.vc������������������������������������������������������������������0000664�0001750�0001750�00000014371�13701057751�015600� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# $Id: makefile.vc,v 1.5 2006/12/06 15:38:16 mloskot Exp $ # # Makefile to build GDAL C++ Unit Tests (subset of Python tests) # # These tests are dedicated to Windows CE platform and cover features # supported by Windows CE port of GDAL. # Also, compatible and runnable on Windows 2000/XP. # ############################################################################# # CONFIGURATION # GDAL library !IFNDEF GDAL_ROOT !IF EXIST("..\..\gdal\nmake.opt") GDAL_ROOT = ..\..\gdal !ENDIF !ENDIF !INCLUDE $(GDAL_ROOT)\nmake.opt # Specification of enabled GDAL drivers #GDAL_SUPPORT = \ # -DHAVE_GEOS \ # -DOGR_ENABLED \ # -DSHAPE_ENABLED \ # -DFRMT_aaigrid \ # -DFRMT_dted \ # -DFRMT_gtiff GDAL_SUPPORT = \ -DOGR_ENABLED \ -DSHAPE_ENABLED \ -DFRMT_aaigrid \ -DFRMT_dted \ -DFRMT_gtiff # END OF CONFIGURATION ############################################################################# GDAL_LIB = $(GDAL_ROOT)\gdal_i.lib INCLUDE_DIR = \ -I. \ -Itut \ -I$(PROJ4_ROOT)\src OBJ = \ test_cpl.obj \ test_alg.obj \ test_gdal.obj \ test_gdal_aaigrid.obj \ test_gdal_dted.obj \ test_gdal_gtiff.obj \ test_triangulation.obj \ test_ogr.obj \ test_ogr_geos.obj \ test_ogr_shape.obj \ test_osr.obj \ test_osr_ct.obj \ test_osr_pci.obj \ test_osr_proj4.obj \ test_marching_squares_square.obj \ test_marching_squares_tile.obj \ test_marching_squares_contour.obj \ test_marching_squares_polygon.obj \ tut/tut_gdal.obj # Commands RM = -del # Complete set of compilation flags CFLAGS = $(CFLAGS) $(INCLUDE_DIR) CPPFLAGS = $(CFLAGS) GDAL_TEST_EXE = gdal_unit_test.exe default: $(GDAL_TEST_EXE) testcopywords.exe testperfcopywords.exe testclosedondestroydm.exe testthreadcond.exe testblockcache.exe testblockcachewrite.exe testblockcachelimits.exe testdestroy.exe testmultithreadedwriting.exe test_include_from_c_file.exe test_c_include_from_cpp_file.exe bug1488.exe check: $(GDAL_TEST_EXE) testblockcache.exe testblockcachewrite.exe testblockcachelimits.exe testmultithreadedwriting.exe bug1488.exe $(GDAL_TEST_EXE) testblockcache.exe -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES testblockcache.exe -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_RB_LOCK_TYPE SPIN testblockcache.exe -check -co TILED=YES -migrate testblockcache.exe -check -memdriver testblockcachewrite.exe --debug ON testblockcachelimits.exe --debug ON testdestroy.exe testmultithreadedwriting.exe bug1488.exe check-all: check testcopywords.exe testperfcopywords.exe testclosedondestroydm.exe testthreadcond.exe testcopywords.exe testperfcopywords.exe testclosedondestroydm.exe testthreadcond.exe $(GDAL_TEST_EXE): gdal_unit_test.cpp $(GDAL_DLL) $(OBJ) $(CC) gdal_unit_test.cpp $(CFLAGS) $(OBJ) $(GDAL_LIB) $(GEOS_LIB) $(PROJ4_LIB) if exist $(GDAL_TEST_EXE).manifest mt -manifest $(GDAL_TEST_EXE).manifest -outputresource:$(GDAL_TEST_EXE);1 testcopywords.exe: testcopywords.cpp $(CC) testcopywords.cpp $(CFLAGS) $(GDAL_LIB) if exist testcopywords.exe.manifest mt -manifest testcopywords.exe.manifest -outputresource:testcopywords.exe;1 testperfcopywords.exe: testperfcopywords.cpp $(CC) testperfcopywords.cpp $(CFLAGS) $(GDAL_LIB) if exist testperfcopywords.exe.manifest mt -manifest testperfcopywords.exe.manifest -outputresource:testperfcopywords.exe;1 testclosedondestroydm.exe: testclosedondestroydm.cpp $(CC) testclosedondestroydm.cpp $(CFLAGS) $(GDAL_LIB) if exist testclosedondestroydm.exe.manifest mt -manifest testclosedondestroydm.exe.manifest -outputresource:testclosedondestroydm.exe;1 testthreadcond.exe: testthreadcond.cpp $(CC) testthreadcond.cpp $(CFLAGS) $(GDAL_LIB) if exist testthreadcond.exe.manifest mt -manifest testthreadcond.exe.manifest -outputresource:testthreadcond.exe;1 testblockcache.exe: testblockcache.cpp $(CC) testblockcache.cpp $(CFLAGS) $(GDAL_LIB) if exist testblockcache.exe.manifest mt -manifest testblockcache.exe.manifest -outputresource:testblockcache.exe;1 testblockcachewrite.exe: testblockcachewrite.cpp $(CC) testblockcachewrite.cpp $(CFLAGS) $(GDAL_LIB) if exist testblockcachewrite.exe.manifest mt -manifest testblockcachewrite.exe.manifest -outputresource:testblockcachewrite.exe;1 testmultithreadedwriting.exe: testmultithreadedwriting.cpp $(CC) testmultithreadedwriting.cpp $(CFLAGS) $(GDAL_LIB) if exist testmultithreadedwriting.exe.manifest mt -manifest testmultithreadedwriting.exe.manifest -outputresource:testmultithreadedwriting.exe;1 testblockcachelimits.exe: testblockcachelimits.cpp $(CC) testblockcachelimits.cpp $(CFLAGS) $(GDAL_LIB) if exist testblockcachelimits.exe.manifest mt -manifest testblockcachelimits.exe.manifest -outputresource:testblockcachelimits.exe;1 testdestroy.exe: testdestroy.cpp $(CC) testdestroy.cpp $(CFLAGS) $(GDAL_LIB) if exist testdestroy.exe.manifest mt -manifest testdestroy.exe.manifest -outputresource:testdestroy.exe;1 test_include_from_c_file.exe: test_include_from_c_file.c $(CC) test_include_from_c_file.c $(CFLAGS) $(GDAL_LIB) if exist test_include_from_c_file.exe.manifest mt -manifest test_include_from_c_file.exe.manifest -outputresource:test_include_from_c_file.exe;1 test_c_include_from_cpp_file.exe: test_c_include_from_cpp_file.cpp $(CC) test_c_include_from_cpp_file.cpp $(CFLAGS) $(GDAL_LIB) if exist test_c_include_from_cpp_file.exe.manifest mt -manifest test_c_include_from_cpp_file.exe.manifest -outputresource:test_c_include_from_cpp_file.exe;1 bug1488.exe: bug1488.cpp $(CC) bug1488.cpp $(CFLAGS) $(GDAL_LIB) if exist bug1488.exe.manifest mt -manifest bug1488.exe.manifest -outputresource:bug1488.exe;1 copy-gdal-dll: $(GDAL_DLL) $(GDAL_DLL): $(GDAL_ROOT)\$(GDAL_DLL) copy /y $(GDAL_ROOT)\$(GDAL_DLL) . .cpp.obj: $(CC) $(CFLAGS) /c $*.cpp /Fo$@ .c.obj: $(CC) $(CFLAGS) /c $*.c /Fo$@ clean: $(RM) *~ $(RM) *.dll $(RM) *.exe $(RM) *.exp $(RM) *.ilk $(RM) *.lib $(RM) *.manifest $(RM) *.obj $(RM) *.pdb $(RM) tmp\*.dbf $(RM) tmp\*.dt0 $(RM) tmp\*.grd $(RM) tmp\*.shp $(RM) tmp\*.shx $(RM) tut\*.obj �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testblockcachewrite.cpp������������������������������������������������������0000664�0001750�0001750�00000012164�13701057761�020225� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testblockcachewrite.cpp 70958faaf0add95775dfe04b2c92a09af10a0322 2020-04-11 00:49:06 +0900 Hiroshi Miura $ * * Project: GDAL Core * Purpose: Test block cache & writing behaviour under multi-threading * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2015, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cpl_conv.h" #include "cpl_multiproc.h" #include "cpl_string.h" #include "gdal_priv.h" #include "test_data.h" #include <cassert> class MyRasterBand: public GDALRasterBand { int bBusy; public: MyRasterBand() { nBlockXSize = 1; nBlockYSize = 1; bBusy = FALSE; } CPLErr IReadBlock(int, int, void*) CPL_OVERRIDE { CPLAssert(FALSE); return CE_Failure; } CPLErr IWriteBlock(int nXBlock, int nYBlock, void*) CPL_OVERRIDE { printf("Entering IWriteBlock(%d, %d)\n", nXBlock, nYBlock); assert(!bBusy); bBusy = TRUE; CPLSleep(0.5); bBusy = FALSE; printf("Leaving IWriteBlock(%d, %d)\n", nXBlock, nYBlock); return CE_None; } }; class MyDataset: public GDALDataset { public: MyDataset() { eAccess = GA_Update; nRasterXSize = 2; nRasterYSize = 1; SetBand(1, new MyRasterBand()); } ~MyDataset() { FlushCache(); } }; static void thread_func1(void* /* unused */ ) { printf("begin thread\n"); GDALFlushCacheBlock(); printf("end of thread\n\n"); } static void test1() { CPLJoinableThread* hThread; printf("Start test1\n"); printf("main thread %p\n", (void*)CPLGetPID()); GDALSetCacheMax(0); MyDataset* poDS = new MyDataset(); char buf1[] = { 1 } ; CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(poDS, 1), GF_Write, 0, 0, 1, 1, buf1, 1, 1, GDT_Byte, 0, 0)); hThread = CPLCreateJoinableThread(thread_func1, nullptr); CPLSleep(0.3); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(poDS, 1), GF_Write, 1, 0, 1, 1, buf1, 1, 1, GDT_Byte, 0, 0)); GDALFlushCacheBlock(); CPLJoinThread(hThread); delete poDS; printf("End test1\n"); } static void thread_func2(void* /* unused */) { printf("begin thread %p\n", (void*)CPLGetPID()); GDALDatasetH hDS = GDALOpen(TUT_ROOT_DATA_DIR "/byte.tif", GA_ReadOnly); GByte c = 0; CPL_IGNORE_RET_VAL(GDALDataset::FromHandle(hDS)->GetRasterBand(1)->RasterIO(GF_Read, 0,0,1,1,&c,1,1,GDT_Byte,0,0,nullptr)); GDALClose(hDS); printf("end of thread\n\n"); } static void test2() { printf("Start test2\n"); printf("main thread %p\n", (void*)CPLGetPID()); CPLJoinableThread* hThread; CPLSetConfigOption("GDAL_RB_INTERNALIZE_SLEEP_AFTER_DETACH_BEFORE_WRITE", "0.5"); GDALSetCacheMax(1000*1000); auto poDS = GetGDALDriverManager()->GetDriverByName("GTiff")->Create("/vsimem/foo.tif", 1, 1, 2, GDT_Byte, nullptr); poDS->GetRasterBand(1)->Fill(0); poDS->GetRasterBand(2)->Fill(0); poDS->FlushCache(); GDALSetCacheMax(0); poDS->GetRasterBand(1)->Fill(1); hThread = CPLCreateJoinableThread(thread_func2, nullptr); CPLSleep(0.2); GByte c = 0; CPL_IGNORE_RET_VAL(poDS->GetRasterBand(1)->RasterIO(GF_Read,0,0,1,1,&c,1,1,GDT_Byte,0,0,nullptr)); printf("%d\n", c); assert(c == 1); CPLJoinThread(hThread); CPLSetConfigOption("GDAL_RB_INTERNALIZE_SLEEP_AFTER_DETACH_BEFORE_WRITE", nullptr); delete poDS; VSIUnlink("/vsimem/foo.tif"); printf("End test2\n"); } int main(int argc, char* argv[]) { argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 ); CPLSetConfigOption("GDAL_DEBUG_BLOCK_CACHE", "ON"); GDALGetCacheMax(); GDALAllRegister(); test1(); test2(); GDALDestroyDriverManager(); CSLDestroy( argv ); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testblockcachelimits.cpp�����������������������������������������������������0000664�0001750�0001750�00000013456�13701057761�020401� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: testblockcachelimits.cpp fea98cfa8bed15686abed8256ef1566f68e1568d 2017-12-28 17:57:32Z Even Rouault $ * * Project: GDAL Core * Purpose: Test block cache under multi-threading * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2015, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cpl_conv.h" #include "cpl_multiproc.h" #include "cpl_string.h" #include "gdal_priv.h" #include "gdal.h" #include <cassert> #include "test_data.h" static void thread_func(void* /* unused */) { printf("begin thread %p\n", (void*)CPLGetPID()); CPLSetThreadLocalConfigOption("GDAL_RB_INTERNALIZE_SLEEP_AFTER_DROP_LOCK", "0.6"); GDALDatasetH hDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); char buf[20*20]; CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); CPLSetThreadLocalConfigOption("GDAL_RB_INTERNALIZE_SLEEP_AFTER_DROP_LOCK", "0"); GDALClose(hDS); printf("end of thread\n\n"); } static void thread_func2(void* /* unused */) { printf("begin thread %p\n", (void*)CPLGetPID()); CPLSetThreadLocalConfigOption("GDAL_RB_FLUSHBLOCK_SLEEP_AFTER_DROP_LOCK", "0.6"); GDALFlushCacheBlock(); CPLSetThreadLocalConfigOption("GDAL_RB_FLUSHBLOCK_SLEEP_AFTER_DROP_LOCK", "0"); printf("end of thread\n\n"); } static void thread_func3(void* /* unused */) { printf("begin thread %p\n", (void*)CPLGetPID()); CPLSleep(0.3); printf("begin GDALFlushCacheBlock\n"); GDALFlushCacheBlock(); printf("end of thread\n\n"); } static void thread_func4(void* /* unused */) { printf("begin thread %p\n", (void*)CPLGetPID()); CPLSetThreadLocalConfigOption("GDAL_RB_FLUSHBLOCK_SLEEP_AFTER_RB_LOCK", "0.6"); GDALFlushCacheBlock(); CPLSetThreadLocalConfigOption("GDAL_RB_FLUSHBLOCK_SLEEP_AFTER_RB_LOCK", "0"); printf("end of thread\n\n"); } int main(int argc, char* argv[]) { CPLJoinableThread* hThread; printf("main thread %p\n", (void*)CPLGetPID()); argc = GDALGeneralCmdLineProcessor( argc, &argv, 0 ); CPLSetConfigOption("GDAL_CACHEMAX", "0"); CPLSetConfigOption("GDAL_DEBUG_BLOCK_CACHE", "ON"); GDALAllRegister(); GDALDatasetH hDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); char buf[20*20]; printf("cache fill\n"); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); printf("end of cache fill\n"); printf("buf[0]=%d\n\n", (int)buf[0]); hThread = CPLCreateJoinableThread(thread_func, nullptr); CPLSleep(0.3); printf("re read block\n"); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); printf("end of re read block\n"); printf("buf[0]=%d\n", (int)buf[0]); CPLJoinThread(hThread); hThread = CPLCreateJoinableThread(thread_func2, nullptr); CPLSleep(0.3); printf("re read block\n"); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); printf("end of re read block\n"); printf("buf[0]=%d\n", (int)buf[0]); CPLJoinThread(hThread); hThread = CPLCreateJoinableThread(thread_func3, nullptr); printf("re read block\n"); CPLSetThreadLocalConfigOption("GDAL_RB_TRYGET_SLEEP_AFTER_TAKE_LOCK", "0.6"); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); CPLSetThreadLocalConfigOption("GDAL_RB_TRYGET_SLEEP_AFTER_TAKE_LOCK", "0"); printf("end of re read block\n"); printf("buf[0]=%d\n", (int)buf[0]); CPLJoinThread(hThread); hThread = CPLCreateJoinableThread(thread_func2, nullptr); CPLSleep(0.3); printf("before GDALFlushRasterCache\n"); GDALFlushRasterCache(GDALGetRasterBand(hDS, 1)); printf("after GDALFlushRasterCache\n"); CPLJoinThread(hThread); assert( GDALGetCacheUsed64() == 0 ); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); hThread = CPLCreateJoinableThread(thread_func2, nullptr); CPLSleep(0.3); GDALClose(hDS); CPLJoinThread(hThread); hDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); CPL_IGNORE_RET_VAL(GDALRasterIO(GDALGetRasterBand(hDS, 1), GF_Read, 0, 0, 20, 20, buf, 20, 20, GDT_Byte, 0, 0)); hThread = CPLCreateJoinableThread(thread_func4, nullptr); CPLSleep(0.3); GDALClose(hDS); CPLJoinThread(hThread); GDALDestroyDriverManager(); CSLDestroy( argv ); return 0; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_gdal.cpp����������������������������������������������������������������0000664�0001750�0001750�00000202722�13701057761�016143� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test general GDAL features. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "gdal_priv.h" #include "gdal_utils.h" #include "gdal_priv_templates.hpp" #include "gdal.h" #include <limits> #include <string> #include "test_data.h" namespace tut { // Common fixture with test data struct test_gdal_data { // Expected number of drivers int drv_count_; test_gdal_data() : drv_count_(0) { // Windows CE port builds with fixed number of drivers #ifdef FRMT_aaigrid drv_count_++; #endif #ifdef FRMT_dted drv_count_++; #endif #ifdef FRMT_gtiff drv_count_++; #endif } }; // Register test group typedef test_group<test_gdal_data> group; typedef group::object object; group test_gdal_group("GDAL"); // Test GDAL driver manager access template<> template<> void object::test<1>() { GDALDriverManager* drv_mgr = nullptr; drv_mgr = GetGDALDriverManager(); ensure("GetGDALDriverManager() is NULL", nullptr != drv_mgr); } // Test number of registered GDAL drivers template<> template<> void object::test<2>() { #ifdef WIN32CE ensure_equals("GDAL registered drivers count doesn't match", GDALGetDriverCount(), drv_count_); #endif } // Test if AAIGrid driver is registered template<> template<> void object::test<3>() { GDALDriverH drv = GDALGetDriverByName("AAIGrid"); #ifdef FRMT_aaigrid ensure("AAIGrid driver is not registered", NULL != drv); #else (void)drv; ensure(true); // Skip #endif } // Test if DTED driver is registered template<> template<> void object::test<4>() { GDALDriverH drv = GDALGetDriverByName("DTED"); #ifdef FRMT_dted ensure("DTED driver is not registered", NULL != drv); #else (void)drv; ensure(true); // Skip #endif } // Test if GeoTIFF driver is registered template<> template<> void object::test<5>() { GDALDriverH drv = GDALGetDriverByName("GTiff"); #ifdef FRMT_gtiff ensure("GTiff driver is not registered", NULL != drv); #else (void)drv; ensure(true); // Skip #endif } #define ENSURE(cond) ensure(#cond, (cond)) #define ENSURE_EQUALS(a, b) ensure_equals(#a " == " #b, (a), (b)) // Test GDALDataTypeUnion() template<> template<> void object::test<6>() { for(int i=GDT_Byte;i<GDT_TypeCount;i++) { for(int j=GDT_Byte;j<GDT_TypeCount;j++) { GDALDataType eDT1 = static_cast<GDALDataType>(i); GDALDataType eDT2 = static_cast<GDALDataType>(j); GDALDataType eDT = GDALDataTypeUnion(eDT1,eDT2 ); ENSURE( eDT == GDALDataTypeUnion(eDT2,eDT1) ); ENSURE( GDALGetDataTypeSize(eDT) >= GDALGetDataTypeSize(eDT1) ); ENSURE( GDALGetDataTypeSize(eDT) >= GDALGetDataTypeSize(eDT2) ); ENSURE( (GDALDataTypeIsComplex(eDT) && (GDALDataTypeIsComplex(eDT1) || GDALDataTypeIsComplex(eDT2))) || (!GDALDataTypeIsComplex(eDT) && !GDALDataTypeIsComplex(eDT1) && !GDALDataTypeIsComplex(eDT2)) ); ENSURE( !(GDALDataTypeIsFloating(eDT1) || GDALDataTypeIsFloating(eDT2)) || GDALDataTypeIsFloating(eDT)); ENSURE( !(GDALDataTypeIsSigned(eDT1) || GDALDataTypeIsSigned(eDT2)) || GDALDataTypeIsSigned(eDT)); } } ENSURE_EQUALS(GDALDataTypeUnion(GDT_Int16, GDT_UInt16), GDT_Int32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_Int16, GDT_UInt32), GDT_Float64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_UInt32, GDT_Int16), GDT_Float64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_UInt32, GDT_CInt16), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_Float32, GDT_CInt32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt16, GDT_UInt32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt16, GDT_CFloat32), GDT_CFloat32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_Byte), GDT_CInt32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_UInt16), GDT_CInt32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_Int16), GDT_CInt32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_UInt32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_Int32), GDT_CInt32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_Float32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_CInt16), GDT_CInt32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CInt32, GDT_CFloat32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_Byte), GDT_CFloat32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_UInt16), GDT_CFloat32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_Int16), GDT_CFloat32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_UInt32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_Int32), GDT_CFloat64); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_Float32), GDT_CFloat32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_CInt16), GDT_CFloat32); ENSURE_EQUALS(GDALDataTypeUnion(GDT_CFloat32, GDT_CInt32), GDT_CFloat64); ENSURE_EQUALS(GDALFindDataType(0, false /* signed */, false /* floating */, false /* complex */), GDT_Byte); ENSURE_EQUALS(GDALFindDataType(0, true /* signed */, false /* floating */, false /* complex */), GDT_Int16); ENSURE_EQUALS(GDALFindDataType(0, false /* signed */, false /* floating */, true /* complex */), GDT_CInt32); ENSURE_EQUALS(GDALFindDataType(0, true /* signed */, false /* floating */, true /* complex */), GDT_CInt16); ENSURE_EQUALS(GDALFindDataType(0, false /* signed */, true /* floating */, false /* complex */), GDT_Float32); ENSURE_EQUALS(GDALFindDataType(0, true /* signed */, true /* floating */, false /* complex */), GDT_Float32); ENSURE_EQUALS(GDALFindDataType(0, false /* signed */, true /* floating */, true /* complex */), GDT_CFloat32); ENSURE_EQUALS(GDALFindDataType(0, true /* signed */, true /* floating */, true /* complex */), GDT_CFloat32); ENSURE_EQUALS(GDALFindDataType(8, false /* signed */, false /* floating */, false /* complex */), GDT_Byte); ENSURE_EQUALS(GDALFindDataType(8, true /* signed */, false /* floating */, false /* complex */), GDT_Int16); ENSURE_EQUALS(GDALFindDataType(16, false /* signed */, false /* floating */, false /* complex */), GDT_UInt16); ENSURE_EQUALS(GDALFindDataType(16, true /* signed */, false /* floating */, false /* complex */), GDT_Int16); ENSURE_EQUALS(GDALFindDataType(32, false /* signed */, false /* floating */, false /* complex */), GDT_UInt32); ENSURE_EQUALS(GDALFindDataType(32, true /* signed */, false /* floating */, false /* complex */), GDT_Int32); ENSURE_EQUALS(GDALFindDataType(64, false /* signed */, true /* floating */, false /* complex */), GDT_Float64); ENSURE_EQUALS(GDALFindDataType(64, false /* signed */, true /* floating */, true /* complex */), GDT_CFloat64); } #undef ENSURE #undef ENSURE_EQUALS // Test GDALAdjustValueToDataType() template<> template<> void object::test<7>() { int bClamped, bRounded; ensure( GDALAdjustValueToDataType(GDT_Byte,255.0,nullptr,nullptr) == 255.0); ensure( GDALAdjustValueToDataType(GDT_Byte,255.0,&bClamped,&bRounded) == 255.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Byte,254.4,&bClamped,&bRounded) == 254.0 && !bClamped && bRounded); ensure( GDALAdjustValueToDataType(GDT_Byte,-1,&bClamped,&bRounded) == 0.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Byte,256.0,&bClamped,&bRounded) == 255.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt16,65535.0,&bClamped,&bRounded) == 65535.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt16,65534.4,&bClamped,&bRounded) == 65534.0 && !bClamped && bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt16,-1,&bClamped,&bRounded) == 0.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt16,65536.0,&bClamped,&bRounded) == 65535.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Int16,-32768.0,&bClamped,&bRounded) == -32768.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Int16,32767.0,&bClamped,&bRounded) == 32767.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Int16,-32767.4,&bClamped,&bRounded) == -32767.0 && !bClamped && bRounded); ensure( GDALAdjustValueToDataType(GDT_Int16,32766.4,&bClamped,&bRounded) == 32766.0 && !bClamped && bRounded); ensure( GDALAdjustValueToDataType(GDT_Int16,-32769.0,&bClamped,&bRounded) == -32768.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Int16,32768.0,&bClamped,&bRounded) == 32767.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt32,10000000.0,&bClamped,&bRounded) == 10000000.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt32,10000000.4,&bClamped,&bRounded) == 10000000.0 && !bClamped && bRounded); ensure( GDALAdjustValueToDataType(GDT_UInt32,-1,&bClamped,&bRounded) == 0.0 && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Int32,-10000000.0,&bClamped,&bRounded) == -10000000.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Int32,10000000.0,&bClamped,&bRounded) == 10000000.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, 0.0,&bClamped,&bRounded) == 0.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, 1e-50,&bClamped,&bRounded) == 0.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, 1.23,&bClamped,&bRounded) == static_cast<double>(1.23f) && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, -1e300,&bClamped,&bRounded) == -std::numeric_limits<float>::max() && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, 1e300,&bClamped,&bRounded) == std::numeric_limits<float>::max() && bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, std::numeric_limits<float>::infinity(),&bClamped,&bRounded) == std::numeric_limits<float>::infinity() && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float32, -std::numeric_limits<float>::infinity(),&bClamped,&bRounded) == -std::numeric_limits<float>::infinity() && !bClamped && !bRounded); { double dfNan = std::numeric_limits<double>::quiet_NaN(); double dfGot = GDALAdjustValueToDataType(GDT_Float32, dfNan,&bClamped,&bRounded); ensure( memcmp(&dfNan, &dfGot, sizeof(double)) == 0 && !bClamped && !bRounded); } ensure( GDALAdjustValueToDataType(GDT_Float64, 0.0,&bClamped,&bRounded) == 0.0 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float64, 1e-50,&bClamped,&bRounded) == 1e-50 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float64, -1e40,&bClamped,&bRounded) == -1e40 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float64, 1e40,&bClamped,&bRounded) == 1e40 && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float64, std::numeric_limits<float>::infinity(),&bClamped,&bRounded) == std::numeric_limits<float>::infinity() && !bClamped && !bRounded); ensure( GDALAdjustValueToDataType(GDT_Float64, -std::numeric_limits<float>::infinity(),&bClamped,&bRounded) == -std::numeric_limits<float>::infinity() && !bClamped && !bRounded); { double dfNan = std::numeric_limits<double>::quiet_NaN(); double dfGot = GDALAdjustValueToDataType(GDT_Float64, dfNan,&bClamped,&bRounded); ensure( memcmp(&dfNan, &dfGot, sizeof(double)) == 0 && !bClamped && !bRounded); } } class FakeBand: public GDALRasterBand { protected: virtual CPLErr IReadBlock(int, int, void*) override { return CE_None; } virtual CPLErr IWriteBlock( int, int, void * ) override { return CE_None; } public: FakeBand(int nXSize, int nYSize) { nBlockXSize = nXSize; nBlockYSize = nYSize; } }; class DatasetWithErrorInFlushCache: public GDALDataset { bool bHasFlushCache; public: DatasetWithErrorInFlushCache() : bHasFlushCache(false) { } ~DatasetWithErrorInFlushCache() { FlushCache(); } virtual void FlushCache(void) override { if( !bHasFlushCache) CPLError(CE_Failure, CPLE_AppDefined, "some error"); GDALDataset::FlushCache(); bHasFlushCache = true; } virtual CPLErr _SetProjection(const char*) override { return CE_None; } CPLErr SetSpatialRef(const OGRSpatialReference* poSRS) override { return OldSetProjectionFromSetSpatialRef(poSRS); } virtual CPLErr SetGeoTransform(double*) override { return CE_None; } static GDALDataset* CreateCopy(const char*, GDALDataset*, int, char **, GDALProgressFunc, void *) { return new DatasetWithErrorInFlushCache(); } static GDALDataset* Create(const char*, int nXSize, int nYSize, int, GDALDataType, char ** ) { DatasetWithErrorInFlushCache* poDS = new DatasetWithErrorInFlushCache(); poDS->eAccess = GA_Update; poDS->nRasterXSize = nXSize; poDS->nRasterYSize = nYSize; poDS->SetBand(1, new FakeBand(nXSize, nYSize)); return poDS; } }; // Test that GDALTranslate() detects error in flush cache template<> template<> void object::test<8>() { GDALDriver* poDriver = new GDALDriver(); poDriver->SetDescription("DatasetWithErrorInFlushCache"); poDriver->pfnCreateCopy = DatasetWithErrorInFlushCache::CreateCopy; GetGDALDriverManager()->RegisterDriver( poDriver ); const char* args[] = { "-of", "DatasetWithErrorInFlushCache", nullptr }; GDALTranslateOptions* psOptions = GDALTranslateOptionsNew((char**)args, nullptr); GDALDatasetH hSrcDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); CPLErrorReset(); CPLPushErrorHandler(CPLQuietErrorHandler); GDALDatasetH hOutDS = GDALTranslate("", hSrcDS, psOptions, nullptr); CPLPopErrorHandler(); GDALClose(hSrcDS); GDALTranslateOptionsFree(psOptions); ensure(hOutDS == nullptr); ensure(CPLGetLastErrorType() != CE_None); GetGDALDriverManager()->DeregisterDriver( poDriver ); delete poDriver; } // Test that GDALWarp() detects error in flush cache template<> template<> void object::test<9>() { GDALDriver* poDriver = new GDALDriver(); poDriver->SetDescription("DatasetWithErrorInFlushCache"); poDriver->pfnCreate = DatasetWithErrorInFlushCache::Create; GetGDALDriverManager()->RegisterDriver( poDriver ); const char* args[] = { "-of", "DatasetWithErrorInFlushCache", nullptr }; GDALWarpAppOptions* psOptions = GDALWarpAppOptionsNew((char**)args, nullptr); GDALDatasetH hSrcDS = GDALOpen(GCORE_DATA_DIR "byte.tif", GA_ReadOnly); CPLErrorReset(); CPLPushErrorHandler(CPLQuietErrorHandler); GDALDatasetH hOutDS = GDALWarp("/", nullptr, 1, &hSrcDS, psOptions, nullptr); CPLPopErrorHandler(); GDALClose(hSrcDS); GDALWarpAppOptionsFree(psOptions); ensure(hOutDS == nullptr); ensure(CPLGetLastErrorType() != CE_None); GetGDALDriverManager()->DeregisterDriver( poDriver ); delete poDriver; } // Test that GDALSwapWords() with unaligned buffers template<> template<> void object::test<10>() { GByte abyBuffer[ 8 * 2 + 1 ] = { 0, 1, 2, 3, 4, 5, 6, 7, 255, 7, 6, 5, 4, 3, 2, 1, 0 }; GDALSwapWords(abyBuffer, 4, 2, 9 ); ensure( abyBuffer[0] == 3 ); ensure( abyBuffer[1] == 2 ); ensure( abyBuffer[2] == 1 ); ensure( abyBuffer[3] == 0 ); ensure( abyBuffer[9] == 4 ); ensure( abyBuffer[10] == 5 ); ensure( abyBuffer[11] == 6 ); ensure( abyBuffer[12] == 7 ); GDALSwapWords(abyBuffer, 4, 2, 9 ); GDALSwapWords(abyBuffer, 8, 2, 9 ); ensure( abyBuffer[0] == 7 ); ensure( abyBuffer[1] == 6 ); ensure( abyBuffer[2] == 5 ); ensure( abyBuffer[3] == 4 ); ensure( abyBuffer[4] == 3 ); ensure( abyBuffer[5] == 2 ); ensure( abyBuffer[6] == 1 ); ensure( abyBuffer[7] == 0 ); ensure( abyBuffer[9] == 0 ); ensure( abyBuffer[10] == 1 ); ensure( abyBuffer[11] == 2 ); ensure( abyBuffer[12] == 3 ); ensure( abyBuffer[13] == 4 ); ensure( abyBuffer[14] == 5 ); ensure( abyBuffer[15] == 6 ); ensure( abyBuffer[16] == 7 ); GDALSwapWords(abyBuffer, 4, 2, 9 ); } // Test ARE_REAL_EQUAL() template<> template<> void object::test<11>() { ensure( ARE_REAL_EQUAL(0.0, 0.0) ); ensure( !ARE_REAL_EQUAL(0.0, 0.1) ); ensure( !ARE_REAL_EQUAL(0.1, 0.0) ); ensure( ARE_REAL_EQUAL(1.0, 1.0) ); ensure( !ARE_REAL_EQUAL(1.0, 0.99) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<double>::min(), -std::numeric_limits<double>::min()) ); ensure( ARE_REAL_EQUAL(std::numeric_limits<double>::min(), std::numeric_limits<double>::min()) ); ensure( !ARE_REAL_EQUAL(std::numeric_limits<double>::min(), 0.0) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<double>::max(), -std::numeric_limits<double>::max()) ); ensure( ARE_REAL_EQUAL(std::numeric_limits<double>::max(), std::numeric_limits<double>::max()) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity()) ); ensure( ARE_REAL_EQUAL(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::infinity()) ); ensure( !ARE_REAL_EQUAL(std::numeric_limits<double>::infinity(), std::numeric_limits<double>::max()) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<double>::min(), -std::numeric_limits<double>::min()) ); ensure( ARE_REAL_EQUAL(0.0f, 0.0f) ); ensure( !ARE_REAL_EQUAL(0.0f, 0.1f) ); ensure( !ARE_REAL_EQUAL(0.1f, 0.0f) ); ensure( ARE_REAL_EQUAL(1.0f, 1.0f) ); ensure( !ARE_REAL_EQUAL(1.0f, 0.99f) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<float>::min(), -std::numeric_limits<float>::min()) ); ensure( ARE_REAL_EQUAL(std::numeric_limits<float>::min(), std::numeric_limits<float>::min()) ); ensure( !ARE_REAL_EQUAL(std::numeric_limits<float>::min(), 0.0f) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<float>::max(), -std::numeric_limits<float>::max()) ); ensure( ARE_REAL_EQUAL(std::numeric_limits<float>::max(), std::numeric_limits<float>::max()) ); ensure( ARE_REAL_EQUAL(-std::numeric_limits<float>::infinity(), -std::numeric_limits<float>::infinity()) ); ensure( ARE_REAL_EQUAL(std::numeric_limits<float>::infinity(), std::numeric_limits<float>::infinity()) ); ensure( !ARE_REAL_EQUAL(std::numeric_limits<float>::infinity(), std::numeric_limits<float>::max()) ); } // Test GDALIsValueInRange() template<> template<> void object::test<12>() { ensure( GDALIsValueInRange<GByte>(0) ); ensure( GDALIsValueInRange<GByte>(255) ); ensure( !GDALIsValueInRange<GByte>(-1) ); ensure( !GDALIsValueInRange<GByte>(256) ); ensure( GDALIsValueInRange<float>(std::numeric_limits<float>::max()) ); ensure( GDALIsValueInRange<float>(std::numeric_limits<float>::infinity()) ); ensure( !GDALIsValueInRange<float>(std::numeric_limits<double>::max()) ); ensure( GDALIsValueInRange<double>(std::numeric_limits<double>::infinity()) ); ensure( !GDALIsValueInRange<double>(CPLAtof("nan")) ); ensure( !GDALIsValueInRange<float>(CPLAtof("nan")) ); ensure( !GDALIsValueInRange<GByte>(CPLAtof("nan")) ); } // Test GDALDataTypeIsInteger() template<> template<> void object::test<13>() { ensure( !GDALDataTypeIsInteger(GDT_Unknown) ); ensure_equals( GDALDataTypeIsInteger(GDT_Byte), TRUE ); ensure_equals( GDALDataTypeIsInteger(GDT_UInt16), TRUE ); ensure_equals( GDALDataTypeIsInteger(GDT_Int16), TRUE ); ensure_equals( GDALDataTypeIsInteger(GDT_UInt32), TRUE ); ensure_equals( GDALDataTypeIsInteger(GDT_Int32), TRUE ); ensure( !GDALDataTypeIsInteger(GDT_Float32) ); ensure( !GDALDataTypeIsInteger(GDT_Float64) ); ensure_equals( GDALDataTypeIsInteger(GDT_CInt16), TRUE ); ensure_equals( GDALDataTypeIsInteger(GDT_CInt32), TRUE ); ensure( !GDALDataTypeIsInteger(GDT_CFloat32) ); ensure( !GDALDataTypeIsInteger(GDT_CFloat64) ); } // Test GDALDataTypeIsFloating() template<> template<> void object::test<14>() { ensure( !GDALDataTypeIsFloating(GDT_Unknown) ); ensure( !GDALDataTypeIsFloating(GDT_Byte) ); ensure( !GDALDataTypeIsFloating(GDT_UInt16) ); ensure( !GDALDataTypeIsFloating(GDT_Int16) ); ensure( !GDALDataTypeIsFloating(GDT_UInt32) ); ensure( !GDALDataTypeIsFloating(GDT_Int32) ); ensure_equals( GDALDataTypeIsFloating(GDT_Float32), TRUE ); ensure_equals( GDALDataTypeIsFloating(GDT_Float64), TRUE ); ensure( !GDALDataTypeIsFloating(GDT_CInt16) ); ensure( !GDALDataTypeIsFloating(GDT_CInt32) ); ensure_equals( GDALDataTypeIsFloating(GDT_CFloat32), TRUE ); ensure_equals( GDALDataTypeIsFloating(GDT_CFloat64), TRUE ); } // Test GDALDataTypeIsComplex() template<> template<> void object::test<15>() { ensure( !GDALDataTypeIsComplex(GDT_Unknown) ); ensure( !GDALDataTypeIsComplex(GDT_Byte) ); ensure( !GDALDataTypeIsComplex(GDT_UInt16) ); ensure( !GDALDataTypeIsComplex(GDT_Int16) ); ensure( !GDALDataTypeIsComplex(GDT_UInt32) ); ensure( !GDALDataTypeIsComplex(GDT_Int32) ); ensure( !GDALDataTypeIsComplex(GDT_Float32) ); ensure( !GDALDataTypeIsComplex(GDT_Float64) ); ensure_equals( GDALDataTypeIsComplex(GDT_CInt16), TRUE ); ensure_equals( GDALDataTypeIsComplex(GDT_CInt32), TRUE ); ensure_equals( GDALDataTypeIsComplex(GDT_CFloat32), TRUE ); ensure_equals( GDALDataTypeIsComplex(GDT_CFloat64), TRUE ); } // Test GDALDataTypeIsConversionLossy() template<> template<> void object::test<16>() { ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_Byte) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_UInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_Int16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_UInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_Int32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_Float64) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_CInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_CInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Byte, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_Byte) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_Int16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_UInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_Int32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_CInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_CInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt16, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int16, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int16, GDT_UInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int16, GDT_UInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_Int32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_Float64) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_CInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_CInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int16, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_Int16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_CInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_CInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_UInt32, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_UInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int32, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int32, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_CInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int32, GDT_CInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_Int32, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Int32, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_Int32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Float32, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Float32, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_CInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float32, GDT_CInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Float32, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Float32, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_Float32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Float64, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_CInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_CInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_Float64, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_Float64, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_Float32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_Float64) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_CInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_CInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CInt16, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_Float32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_CInt16) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_CInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CInt32, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_Float32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_CInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_CInt32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CFloat32, GDT_CFloat64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_Byte) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_UInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_Int16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_UInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_Int32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_Float32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_Float64) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_CInt16) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_CInt32) ); ensure( GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_CFloat32) ); ensure( !GDALDataTypeIsConversionLossy(GDT_CFloat64, GDT_CFloat64) ); } // Test GDALDataset::GetBands() template<> template<> void object::test<17>() { GDALDatasetUniquePtr poDS( GDALDriver::FromHandle( GDALGetDriverByName("MEM"))->Create("", 1, 1, 3, GDT_Byte, nullptr)); int nExpectedNumber = 1; for( auto&& poBand: poDS->GetBands() ) { ensure_equals( poBand->GetBand(), nExpectedNumber ); nExpectedNumber ++; } ensure_equals( nExpectedNumber, 3 + 1 ); ensure_equals( poDS->GetBands().size(), 3U ); ensure_equals( poDS->GetBands()[0], poDS->GetRasterBand(1) ); ensure_equals( poDS->GetBands()[static_cast<size_t>(0)], poDS->GetRasterBand(1) ); } template<> template<> void object::test<18>() { class myArray: public GDALMDArray { GDALExtendedDataType m_dt; std::vector<std::shared_ptr<GDALDimension>> m_dims; std::vector<GUInt64> m_blockSize; static std::vector<std::shared_ptr<GDALDimension>> BuildDims( const std::vector<GUInt64>& sizes) { std::vector<std::shared_ptr<GDALDimension>> dims; for( const auto sz: sizes ) { dims.emplace_back( std::make_shared<GDALDimension>("", "", "", "", sz)); } return dims; } protected: bool IRead(const GUInt64*, const size_t*, const GInt64*, const GPtrDiff_t*, const GDALExtendedDataType&, void*) const override { return false; } public: myArray(GDALDataType eDT, const std::vector<GUInt64>& sizes, const std::vector<GUInt64>& blocksizes): GDALAbstractMDArray("", "array"), GDALMDArray("", "array"), m_dt(GDALExtendedDataType::Create(eDT)), m_dims(BuildDims(sizes)), m_blockSize(blocksizes) { } myArray(const GDALExtendedDataType& dt, const std::vector<GUInt64>& sizes, const std::vector<GUInt64>& blocksizes): GDALAbstractMDArray("", "array"), GDALMDArray("", "array"), m_dt(dt), m_dims(BuildDims(sizes)), m_blockSize(blocksizes) { } bool IsWritable() const override { return true; } static std::shared_ptr<myArray> Create(GDALDataType eDT, const std::vector<GUInt64>& sizes, const std::vector<GUInt64>& blocksizes) { auto ar(std::shared_ptr<myArray>(new myArray(eDT, sizes, blocksizes))); ar->SetSelf(ar); return ar; } static std::shared_ptr<myArray> Create( const GDALExtendedDataType& dt, const std::vector<GUInt64>& sizes, const std::vector<GUInt64>& blocksizes) { auto ar(std::shared_ptr<myArray>(new myArray(dt, sizes, blocksizes))); ar->SetSelf(ar); return ar; } const std::vector<std::shared_ptr<GDALDimension>>& GetDimensions() const override { return m_dims; } const GDALExtendedDataType& GetDataType() const override { return m_dt; } std::vector<GUInt64> GetBlockSize() const override { return m_blockSize; } }; { auto ar(myArray::Create(GDT_UInt16, {3000,1000,2000},{32,64,128})); ensure_equals(ar->at(0)->GetDimensionCount(), 2U); ensure_equals(ar->at(2999,999,1999)->GetDimensionCount(), 0U); CPLPushErrorHandler(CPLQuietErrorHandler); ensure(ar->at(3000,0,0) == nullptr); ensure(ar->at(0,0,0,0) == nullptr); ensure((*ar)["foo"] == nullptr); CPLPopErrorHandler(); } { std::vector<std::unique_ptr<GDALEDTComponent>> comps; comps.emplace_back(std::unique_ptr<GDALEDTComponent>(new GDALEDTComponent("f\\o\"o", 0, GDALExtendedDataType::Create(GDT_Int32)))); auto dt(GDALExtendedDataType::Create("", 4, std::move(comps))); auto ar(myArray::Create(dt, {3000,1000,2000},{32,64,128})); ensure((*ar)["f\\o\"o"] != nullptr); } { myArray ar(GDT_UInt16, {}, {}); CPLPushErrorHandler(CPLQuietErrorHandler); ensure(ar.GetView("[...]") == nullptr); CPLPopErrorHandler(); auto cs = ar.GetProcessingChunkSize(0); ensure_equals( cs.size(), 0U ); struct TmpStructNoDim { static bool func(GDALAbstractMDArray* p_ar, const GUInt64* chunk_array_start_idx, const size_t* chunk_count, GUInt64 iCurChunk, GUInt64 nChunkCount, void* user_data) { ensure( p_ar->GetName() == "array" ); ensure(chunk_array_start_idx == nullptr); ensure(chunk_count == nullptr); ensure_equals(iCurChunk, 1U); ensure_equals(nChunkCount, 1U); *static_cast<bool*>(user_data) = true; return true; } }; bool b = false; ar.ProcessPerChunk(nullptr, nullptr, nullptr, TmpStructNoDim::func, &b); ensure(b); } struct ChunkDef { std::vector<GUInt64> array_start_idx; std::vector<GUInt64> count; }; struct TmpStruct { static bool func(GDALAbstractMDArray* p_ar, const GUInt64* chunk_array_start_idx, const size_t* chunk_count, GUInt64 iCurChunk, GUInt64 nChunkCount, void* user_data) { ensure( p_ar->GetName() == "array" ); std::vector<ChunkDef>* p_chunkDefs = static_cast<std::vector<ChunkDef>*>(user_data); std::vector<GUInt64> v_chunk_array_start_idx; v_chunk_array_start_idx.insert(v_chunk_array_start_idx.end(), chunk_array_start_idx, chunk_array_start_idx + p_ar->GetDimensionCount()); std::vector<GUInt64> v_chunk_count; v_chunk_count.insert(v_chunk_count.end(), chunk_count, chunk_count + p_ar->GetDimensionCount()); ChunkDef chunkDef; chunkDef.array_start_idx = std::move(v_chunk_array_start_idx); chunkDef.count = std::move(v_chunk_count); p_chunkDefs->emplace_back(std::move(chunkDef)); ensure_equals(p_chunkDefs->size(), iCurChunk); ensure( iCurChunk > 0 ); ensure( iCurChunk <= nChunkCount ); return true; } }; { myArray ar(GDT_UInt16, {3000,1000,2000},{32,64,128}); { auto cs = ar.GetProcessingChunkSize(0); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 32U ); ensure_equals( cs[1], 64U ); ensure_equals( cs[2], 128U ); } { auto cs = ar.GetProcessingChunkSize(40*1000*1000); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 32U ); ensure_equals( cs[1], 256U ); ensure_equals( cs[2], 2000U ); std::vector<ChunkDef> chunkDefs; // Error cases of input parameters of ProcessPerChunk() { // array_start_idx[0] + count[0] > 3000 std::vector<GUInt64> array_start_idx{ 1, 0, 0 }; std::vector<GUInt64> count{ 3000, 1000, 2000 }; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), cs.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } { // array_start_idx[0] >= 3000 std::vector<GUInt64> array_start_idx{ 3000, 0, 0 }; std::vector<GUInt64> count{ 1, 1000, 2000 }; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), cs.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } { // count[0] > 3000 std::vector<GUInt64> array_start_idx{ 0, 0, 0 }; std::vector<GUInt64> count{ 3001, 1000, 2000 }; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), cs.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } { // count[0] == 0 std::vector<GUInt64> array_start_idx{ 0, 0, 0 }; std::vector<GUInt64> count{ 0, 1000, 2000 }; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), cs.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } { // myCustomChunkSize[0] == 0 std::vector<GUInt64> array_start_idx{ 0, 0, 0 }; std::vector<GUInt64> count{ 3000, 1000, 2000 }; std::vector<size_t> myCustomChunkSize{ 0, 1000, 2000 }; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), myCustomChunkSize.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } { // myCustomChunkSize[0] > 3000 std::vector<GUInt64> array_start_idx{ 0, 0, 0 }; std::vector<GUInt64> count{ 3000, 1000, 2000 }; std::vector<size_t> myCustomChunkSize{ 3001, 1000, 2000 }; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), myCustomChunkSize.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } std::vector<GUInt64> array_start_idx{ 1500, 256, 0 }; std::vector<GUInt64> count{ 99, 512, 2000 }; ensure(ar.ProcessPerChunk( array_start_idx.data(), count.data(), cs.data(), TmpStruct::func, &chunkDefs)); size_t nExpectedChunks = 1; for( size_t i = 0; i < ar.GetDimensionCount(); i++ ) { nExpectedChunks *= static_cast<size_t>( 1+((array_start_idx[i]+count[i]-1)/cs[i])-(array_start_idx[i]/cs[i])); } ensure_equals( chunkDefs.size(), nExpectedChunks ); CPLString osChunks; for( const auto& chunkDef: chunkDefs ) { osChunks += CPLSPrintf( "{%u, %u, %u}, {%u, %u, %u}\n", (unsigned)chunkDef.array_start_idx[0], (unsigned)chunkDef.array_start_idx[1], (unsigned)chunkDef.array_start_idx[2], (unsigned)chunkDef.count[0], (unsigned)chunkDef.count[1], (unsigned)chunkDef.count[2]); } ensure_equals(osChunks, "{1500, 256, 0}, {4, 256, 2000}\n" "{1500, 512, 0}, {4, 256, 2000}\n" "{1504, 256, 0}, {32, 256, 2000}\n" "{1504, 512, 0}, {32, 256, 2000}\n" "{1536, 256, 0}, {32, 256, 2000}\n" "{1536, 512, 0}, {32, 256, 2000}\n" "{1568, 256, 0}, {31, 256, 2000}\n" "{1568, 512, 0}, {31, 256, 2000}\n"); } } // Another error case of ProcessPerChunk { const auto M64 = std::numeric_limits<GUInt64>::max(); const auto Msize_t = std::numeric_limits<size_t>::max(); myArray ar(GDT_UInt16, {M64,M64,M64},{32,256,128}); // Product of myCustomChunkSize[] > Msize_t std::vector<GUInt64> array_start_idx{ 0, 0, 0 }; std::vector<GUInt64> count{ 3000, 1000, 2000 }; std::vector<size_t> myCustomChunkSize{ Msize_t, Msize_t, Msize_t }; std::vector<ChunkDef> chunkDefs; CPLPushErrorHandler(CPLQuietErrorHandler); ensure(!ar.ProcessPerChunk( array_start_idx.data(), count.data(), myCustomChunkSize.data(), TmpStruct::func, &chunkDefs)); CPLPopErrorHandler(); } { const auto BIG = GUInt64(5000) * 1000* 1000; myArray ar(GDT_UInt16, {BIG + 3000,BIG + 1000,BIG + 2000},{32,256,128}); std::vector<GUInt64> array_start_idx{ BIG + 1500, BIG + 256, BIG + 0 }; std::vector<GUInt64> count{ 99, 512, 2000 }; std::vector<ChunkDef> chunkDefs; auto cs = ar.GetProcessingChunkSize(40*1000*1000); ensure(ar.ProcessPerChunk( array_start_idx.data(), count.data(), cs.data(), TmpStruct::func, &chunkDefs)); size_t nExpectedChunks = 1; for( size_t i = 0; i < ar.GetDimensionCount(); i++ ) { nExpectedChunks *= static_cast<size_t>( 1+((array_start_idx[i]+count[i]-1)/cs[i])-(array_start_idx[i]/cs[i])); } ensure_equals( chunkDefs.size(), nExpectedChunks ); CPLString osChunks; for( const auto& chunkDef: chunkDefs ) { osChunks += CPLSPrintf( "{" CPL_FRMT_GUIB ", " CPL_FRMT_GUIB ", " CPL_FRMT_GUIB "}, {%u, %u, %u}\n", (GUIntBig)chunkDef.array_start_idx[0], (GUIntBig)chunkDef.array_start_idx[1], (GUIntBig)chunkDef.array_start_idx[2], (unsigned)chunkDef.count[0], (unsigned)chunkDef.count[1], (unsigned)chunkDef.count[2]); } ensure_equals(osChunks, "{5000001500, 5000000256, 5000000000}, {4, 256, 2000}\n" "{5000001500, 5000000512, 5000000000}, {4, 256, 2000}\n" "{5000001504, 5000000256, 5000000000}, {32, 256, 2000}\n" "{5000001504, 5000000512, 5000000000}, {32, 256, 2000}\n" "{5000001536, 5000000256, 5000000000}, {32, 256, 2000}\n" "{5000001536, 5000000512, 5000000000}, {32, 256, 2000}\n" "{5000001568, 5000000256, 5000000000}, {31, 256, 2000}\n" "{5000001568, 5000000512, 5000000000}, {31, 256, 2000}\n"); } { // Test with 0 in GetBlockSize() myArray ar(GDT_UInt16, {500,1000,2000},{0,0,128}); { auto cs = ar.GetProcessingChunkSize(300*2); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 1U ); ensure_equals( cs[1], 1U ); ensure_equals( cs[2], 256U ); } { auto cs = ar.GetProcessingChunkSize(40*1000*1000); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 10U ); ensure_equals( cs[1], 1000U ); ensure_equals( cs[2], 2000U ); } { auto cs = ar.GetProcessingChunkSize(500U*1000*2000*2); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 500U ); ensure_equals( cs[1], 1000U ); ensure_equals( cs[2], 2000U ); } { auto cs = ar.GetProcessingChunkSize(500U*1000*2000*2 - 1); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 499U ); ensure_equals( cs[1], 1000U ); ensure_equals( cs[2], 2000U ); } } { const auto M = std::numeric_limits<GUInt64>::max(); myArray ar(GDT_UInt16,{M,M,M},{M,M,M/2}); { auto cs = ar.GetProcessingChunkSize(0); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 1U ); ensure_equals( cs[1], 1U ); #if SIZEOF_VOIDP == 8 ensure_equals( cs[2], static_cast<size_t>(M/2) ); #else ensure_equals( cs[2], 1U ); #endif } } #if SIZEOF_VOIDP == 8 { const auto M = std::numeric_limits<GUInt64>::max(); myArray ar(GDT_UInt16,{M,M,M},{M,M,M/4}); { auto cs = ar.GetProcessingChunkSize(std::numeric_limits<size_t>::max()); ensure_equals( cs.size(), 3U ); ensure_equals( cs[0], 1U ); ensure_equals( cs[1], 1U ); ensure_equals( cs[2], (std::numeric_limits<size_t>::max() / 4) * 2 ); } } #endif } // Test GDALDataset::GetRawBinaryLayout() implementations template<> template<> void object::test<19>() { // ENVI { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "envi_rgbsmall_bip.img")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BIP) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 0U ); ensure_equals( sLayout.nPixelOffset, 3 ); ensure_equals( sLayout.nLineOffset, 3 * 50 ); ensure_equals( sLayout.nBandOffset, 1 ); } { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "envi_rgbsmall_bil.img")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BIL) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 0U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 3 * 50 ); ensure_equals( sLayout.nBandOffset, 50 ); } { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "envi_rgbsmall_bsq.img")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BSQ) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 0U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 50 ); ensure_equals( sLayout.nBandOffset, 50 * 49 ); } // GTiff { GDALDatasetUniquePtr poDS( GDALDataset::Open(GCORE_DATA_DIR "byte.tif")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::UNKNOWN) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 8U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 20 ); ensure_equals( sLayout.nBandOffset, 0 ); } { GDALDatasetUniquePtr poDS( GDALDataset::Open(GCORE_DATA_DIR "rgbsmall.tif")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; // Compressed ensure( !poDS->GetRawBinaryLayout(sLayout) ); } { GDALDatasetUniquePtr poDS( GDALDataset::Open(GCORE_DATA_DIR "stefan_full_rgba.tif")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BIP) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 278U ); ensure_equals( sLayout.nPixelOffset, 4 ); ensure_equals( sLayout.nLineOffset, 162 * 4 ); ensure_equals( sLayout.nBandOffset, 1 ); } { GDALDatasetUniquePtr poSrcDS( GDALDataset::Open(GCORE_DATA_DIR "rgbsmall.tif")); ensure( poSrcDS != nullptr ); auto tmpFilename = "/vsimem/tmp.tif"; auto poDrv = GDALDriver::FromHandle(GDALGetDriverByName("GTiff")); const char* options [] = { "INTERLEAVE=BAND", nullptr }; auto poDS(GDALDatasetUniquePtr(poDrv->CreateCopy( tmpFilename, poSrcDS.get(), false, const_cast<char**>(options), nullptr, nullptr))); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BSQ) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure( sLayout.nImageOffset >= 396U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 50 ); ensure_equals( sLayout.nBandOffset, 50 * 50 ); poDS.reset(); VSIUnlink(tmpFilename); } { GDALDatasetUniquePtr poSrcDS( GDALDataset::Open(GCORE_DATA_DIR "rgbsmall.tif")); ensure( poSrcDS != nullptr ); auto tmpFilename = "/vsimem/tmp.tif"; const char* options [] = { "-srcwin", "0", "0", "48", "32", "-co", "TILED=YES", "-co", "BLOCKXSIZE=48", "-co", "BLOCKYSIZE=32", nullptr }; auto psOptions = GDALTranslateOptionsNew( const_cast<char**>(options), nullptr ); auto poDS(GDALDatasetUniquePtr(GDALDataset::FromHandle(GDALTranslate( tmpFilename, GDALDataset::ToHandle(poSrcDS.get()), psOptions, nullptr)))); GDALTranslateOptionsFree(psOptions); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BIP) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure( sLayout.nImageOffset >= 390U ); ensure_equals( sLayout.nPixelOffset, 3 ); ensure_equals( sLayout.nLineOffset, 48 * 3); ensure_equals( sLayout.nBandOffset, 1 ); poDS.reset(); VSIUnlink(tmpFilename); } { GDALDatasetUniquePtr poSrcDS( GDALDataset::Open(GCORE_DATA_DIR "rgbsmall.tif")); ensure( poSrcDS != nullptr ); auto tmpFilename = "/vsimem/tmp.tif"; const char* options [] = { "-srcwin", "0", "0", "48", "32", "-co", "TILED=YES", "-co", "BLOCKXSIZE=48", "-co", "BLOCKYSIZE=32", "-co", "INTERLEAVE=BAND", nullptr }; auto psOptions = GDALTranslateOptionsNew( const_cast<char**>(options), nullptr ); auto poDS(GDALDatasetUniquePtr(GDALDataset::FromHandle(GDALTranslate( tmpFilename, GDALDataset::ToHandle(poSrcDS.get()), psOptions, nullptr)))); GDALTranslateOptionsFree(psOptions); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::BSQ) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure( sLayout.nImageOffset >= 408U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 48); ensure_equals( sLayout.nBandOffset, 48 * 32 ); poDS.reset(); VSIUnlink(tmpFilename); } // ISIS3 { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "isis3_detached.lbl")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure( sLayout.osRawFilename.find("isis3_detached.cub") != std::string::npos ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::UNKNOWN) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 0U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 317 ); // ensure_equals( sLayout.nBandOffset, 9510 ); // doesn't matter on single band } // VICAR { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "test_vicar_truncated.bin")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::UNKNOWN) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 9680U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 400 ); ensure_equals( sLayout.nBandOffset, 0 ); // doesn't matter on single band } // FITS { GDALDatasetUniquePtr poSrcDS( GDALDataset::Open(GCORE_DATA_DIR "int16.tif")); ensure( poSrcDS != nullptr ); CPLString tmpFilename(CPLGenerateTempFilename(nullptr)); tmpFilename += ".fits"; auto poDrv = GDALDriver::FromHandle(GDALGetDriverByName("FITS")); if( poDrv ) { auto poDS(GDALDatasetUniquePtr(poDrv->CreateCopy( tmpFilename, poSrcDS.get(), false, nullptr, nullptr, nullptr))); ensure( poDS != nullptr ); poDS.reset(); poDS.reset(GDALDataset::Open(tmpFilename)); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::UNKNOWN) ); ensure_equals( sLayout.eDataType, GDT_Int16 ); ensure( !sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 2880U ); ensure_equals( sLayout.nPixelOffset, 2 ); ensure_equals( sLayout.nLineOffset, 2 * 20 ); ensure_equals( sLayout.nBandOffset, 2 * 20 * 20 ); poDS.reset(); VSIUnlink(tmpFilename); } } // PDS 3 { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "mc02_truncated.img")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure_equals( sLayout.osRawFilename, poDS->GetDescription() ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::UNKNOWN) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 3840U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 3840 ); ensure_equals( sLayout.nBandOffset, 0 ); // doesn't matter on single band } // PDS 4 { GDALDatasetUniquePtr poDS( GDALDataset::Open(GDRIVERS_DATA_DIR "byte_pds4_cart_1700.xml")); ensure( poDS != nullptr ); GDALDataset::RawBinaryLayout sLayout; ensure( poDS->GetRawBinaryLayout(sLayout) ); ensure( sLayout.osRawFilename.find("byte_pds4_cart_1700.img") != std::string::npos ); ensure_equals( static_cast<int>(sLayout.eInterleaving), static_cast<int>(GDALDataset::RawBinaryLayout::Interleaving::UNKNOWN) ); ensure_equals( sLayout.eDataType, GDT_Byte ); ensure( !sLayout.bLittleEndianOrder ); ensure_equals( sLayout.nImageOffset, 0U ); ensure_equals( sLayout.nPixelOffset, 1 ); ensure_equals( sLayout.nLineOffset, 20 ); ensure_equals( sLayout.nBandOffset, 0 ); // doesn't matter on single band } } } // namespace tut ����������������������������������������������gdalautotest-3.1.2/cpp/test_osr_proj4.cpp�����������������������������������������������������������0000664�0001750�0001750�00000007560�13701057761�017160� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test some PROJ.4 specific translation issues. // Ported from osr/osr_proj4.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_error.h" #include "ogr_api.h" #include "ogr_srs_api.h" #include <algorithm> #include <cmath> #include <string> namespace tut { // Common fixture with test data struct test_osr_proj4_data { OGRErr err_; OGRSpatialReferenceH srs_; test_osr_proj4_data() : err_(OGRERR_NONE), srs_(nullptr) { srs_ = OSRNewSpatialReference(nullptr); OSRSetAxisMappingStrategy(srs_, OAMS_TRADITIONAL_GIS_ORDER); } ~test_osr_proj4_data() { OSRDestroySpatialReference(srs_); } }; // Register test group typedef test_group<test_osr_proj4_data> group; typedef group::object object; group test_osr_proj4_group("OSR::PROJ.4"); // Test the +k_0 flag works as well as +k when // consuming PROJ.4 format template<> template<> void object::test<1>() { ensure("SRS handle is NULL", nullptr != srs_); std::string wkt("+proj=tmerc +lat_0=53.5000000000 +lon_0=-8.0000000000 " "+k_0=1.0000350000 +x_0=200000.0000000000 +y_0=250000.0000000000 " "+a=6377340.189000 +rf=299.324965 +towgs84=482.530," "-130.596,564.557,-1.042,-0.214,-0.631,8.15"); err_ = OSRImportFromProj4(srs_, wkt.c_str()); ensure_equals("OSRImportFromProj4)( failed", err_, OGRERR_NONE); // TODO: Check max error value const double maxError = 0.00005; // 0.0000005 double val = 0; val = OSRGetProjParm(srs_, SRS_PP_SCALE_FACTOR, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("+k_0 not supported on import from PROJ.4", std::fabs(val - 1.000035) <= maxError); } // Verify that we can import strings with parameter values // that are exponents and contain a plus sign template<> template<> void object::test<2>() { ensure("SRS handle is NULL", nullptr != srs_); std::string wkt("+proj=lcc +x_0=0.6096012192024384e+06 +y_0=0 " "+lon_0=90dw +lat_0=42dn +lat_1=44d4'n +lat_2=42d44'n " "+a=6378206.400000 +rf=294.978698 +nadgrids=conus,ntv1_can.dat"); err_ = OSRImportFromProj4(srs_, wkt.c_str()); ensure_equals("OSRImportFromProj4)( failed", err_, OGRERR_NONE); const double maxError = 0.0005; double val = 0; val = OSRGetProjParm(srs_, SRS_PP_FALSE_EASTING, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("Parsing exponents not supported", std::fabs(val - 609601.219) <= maxError); } } // namespace tut ������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/testmultithreadedwriting.cpp�������������������������������������������������0000664�0001750�0001750�00000007336�13701057761�021340� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * Project: GDAL Core * Purpose: Test block cache & writing behaviour under multi-threading * Author: Even Rouault, <even dot rouault at spatialys dot com> * ****************************************************************************** * Copyright (c) 2016, Even Rouault <even dot rouault at spatialys dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "cpl_multiproc.h" #include "gdal_alg.h" #include "gdal_priv.h" static void thread_func(void* ptr) { int num = *(int*)ptr; GDALDriver* poDriver = (GDALDriver*)GDALGetDriverByName("ENVI"); GDALDataset* poDSRef = (GDALDataset*)GDALOpen("/vsimem/test_ref", GA_ReadOnly); GDALDataset* poDS = poDriver->Create(CPLSPrintf("/vsimem/test%d", num), 100, 2000, 1, GDT_Byte, nullptr); GDALRasterBand* poBand = poDS->GetRasterBand(1); GDALRasterBand* poBandRef = poDSRef->GetRasterBand(1); for(int i=0; i<2000; i++) { GDALRasterBlock* poBlockRef = poBandRef->GetLockedBlockRef(0, i); GDALRasterBlock* poBlockRW = poBand->GetLockedBlockRef(0, i); poBlockRW->MarkDirty(); memset(poBlockRW->GetDataRef(), 0xFF, 100); poBlockRef->DropLock(); poBlockRW->DropLock(); } GDALClose(poDS); GDALClose(poDSRef); } int main(int argc, char** argv) { bool bEndlessLoop = false; if( argc == 2 && EQUAL(argv[1], "-endlessloops") ) bEndlessLoop = true; CPLJoinableThread* hThread1; CPLJoinableThread* hThread2; GDALAllRegister(); GDALSetCacheMax(10000); int one = 1; int two = 2; GDALDriver* poDriver = (GDALDriver*)GDALGetDriverByName("ENVI"); GDALDataset* poDS = poDriver->Create("/vsimem/test_ref", 100, 2000, 1, GDT_Byte, nullptr); GDALClose(poDS); int counter = 0; int cs = 0; do { ++counter; if( (counter % 20) == 0 ) printf("%d\n", counter); hThread1 = CPLCreateJoinableThread(thread_func, &one); hThread2 = CPLCreateJoinableThread(thread_func, &two); CPLJoinThread(hThread1); CPLJoinThread(hThread2); GDALDataset* poDSRef = (GDALDataset*)GDALOpen("/vsimem/test1", GA_ReadOnly); cs = GDALChecksumImage(poDSRef->GetRasterBand(1), 0, 0, 100, 2000); if( cs != 29689 ) { printf("Got cs=%d, expected=%d\n", cs, 29689); break; } GDALClose(poDSRef); poDriver->Delete("/vsimem/test1"); poDriver->Delete("/vsimem/test2"); } while( bEndlessLoop ); poDriver->Delete("/vsimem/test_ref"); GDALDestroyDriverManager(); return (cs == 29689) ? 0 : 1; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_cpl.cpp�����������������������������������������������������������������0000664�0001750�0001750�00000330170�13701057761�016011� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test general CPL features. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // Copyright (c) 2008-2012, Even Rouault <even dot rouault at spatialys.com> // Copyright (c) 2017, Dmitry Baryshnikov <polimax@mail.ru> // Copyright (c) 2017, NextGIS <info@nextgis.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #define GDAL_COMPILATION #include "gdal_unit_test.h" #include "cpl_error.h" #include "cpl_hash_set.h" #include "cpl_list.h" #include "cpl_sha256.h" #include "cpl_string.h" #include "cpl_safemaths.hpp" #include "cpl_time.h" #include "cpl_json.h" #include "cpl_json_streaming_parser.h" #include "cpl_json_streaming_writer.h" #include "cpl_mem_cache.h" #include "cpl_http.h" #include "cpl_auto_close.h" #include "cpl_minixml.h" #include <fstream> #include <string> static bool gbGotError = false; static void CPL_STDCALL myErrorHandler(CPLErr, CPLErrorNum, const char*) { gbGotError = true; } namespace tut { // Common fixture with test data struct test_cpl_data { std::string data_; test_cpl_data() { // Compose data path for test group data_ = tut::common::data_basedir; } }; // Register test group typedef test_group<test_cpl_data> group; typedef group::object object; group test_cpl_group("CPL"); // Test cpl_list API template<> template<> void object::test<1>() { CPLList* list; list = CPLListInsert(nullptr, (void*)nullptr, 0); ensure(CPLListCount(list) == 1); list = CPLListRemove(list, 2); ensure(CPLListCount(list) == 1); list = CPLListRemove(list, 1); ensure(CPLListCount(list) == 1); list = CPLListRemove(list, 0); ensure(CPLListCount(list) == 0); list = nullptr; list = CPLListInsert(nullptr, (void*)nullptr, 2); ensure(CPLListCount(list) == 3); list = CPLListRemove(list, 2); ensure(CPLListCount(list) == 2); list = CPLListRemove(list, 1); ensure(CPLListCount(list) == 1); list = CPLListRemove(list, 0); ensure(CPLListCount(list) == 0); list = nullptr; list = CPLListAppend(list, (void*)1); ensure(CPLListGet(list,0) == list); ensure(CPLListGet(list,1) == nullptr); list = CPLListAppend(list, (void*)2); list = CPLListInsert(list, (void*)3, 2); ensure(CPLListCount(list) == 3); CPLListDestroy(list); list = nullptr; list = CPLListAppend(list, (void*)1); list = CPLListAppend(list, (void*)2); list = CPLListInsert(list, (void*)4, 3); CPLListGet(list,2)->pData = (void*)3; ensure(CPLListCount(list) == 4); ensure(CPLListGet(list,0)->pData == (void*)1); ensure(CPLListGet(list,1)->pData == (void*)2); ensure(CPLListGet(list,2)->pData == (void*)3); ensure(CPLListGet(list,3)->pData == (void*)4); CPLListDestroy(list); list = nullptr; list = CPLListInsert(list, (void*)4, 1); CPLListGet(list,0)->pData = (void*)2; list = CPLListInsert(list, (void*)1, 0); list = CPLListInsert(list, (void*)3, 2); ensure(CPLListCount(list) == 4); ensure(CPLListGet(list,0)->pData == (void*)1); ensure(CPLListGet(list,1)->pData == (void*)2); ensure(CPLListGet(list,2)->pData == (void*)3); ensure(CPLListGet(list,3)->pData == (void*)4); list = CPLListRemove(list, 1); list = CPLListRemove(list, 1); list = CPLListRemove(list, 0); list = CPLListRemove(list, 0); ensure(list == nullptr); } typedef struct { const char* testString; CPLValueType expectedResult; } TestStringStruct; // Test CPLGetValueType template<> template<> void object::test<2>() { TestStringStruct apszTestStrings[] = { { "+25.e+3", CPL_VALUE_REAL }, { "-25.e-3", CPL_VALUE_REAL }, { "25.e3", CPL_VALUE_REAL }, { "25e3", CPL_VALUE_REAL }, { " 25e3 ", CPL_VALUE_REAL }, { ".1e3", CPL_VALUE_REAL }, { "25", CPL_VALUE_INTEGER }, { "-25", CPL_VALUE_INTEGER }, { "+25", CPL_VALUE_INTEGER }, { "25e 3", CPL_VALUE_STRING }, { "25e.3", CPL_VALUE_STRING }, { "-2-5e3", CPL_VALUE_STRING }, { "2-5e3", CPL_VALUE_STRING }, { "25.25.3", CPL_VALUE_STRING }, { "25e25e3", CPL_VALUE_STRING }, { "25e2500", CPL_VALUE_STRING }, /* #6128 */ { "d1", CPL_VALUE_STRING } /* #6305 */ }; size_t i; for(i=0;i < sizeof(apszTestStrings) / sizeof(apszTestStrings[0]); i++) { ensure(CPLGetValueType(apszTestStrings[i].testString) == apszTestStrings[i].expectedResult); if (CPLGetValueType(apszTestStrings[i].testString) != apszTestStrings[i].expectedResult) fprintf(stderr, "mismatch on item %d : value=\"%s\", expect_result=%d, result=%d\n", (int)i, apszTestStrings[i].testString, apszTestStrings[i].expectedResult, CPLGetValueType(apszTestStrings[i].testString)); } } // Test cpl_hash_set API template<> template<> void object::test<3>() { CPLHashSet* set = CPLHashSetNew(CPLHashSetHashStr, CPLHashSetEqualStr, CPLFree); ensure(CPLHashSetInsert(set, CPLStrdup("hello")) == TRUE); ensure(CPLHashSetInsert(set, CPLStrdup("good morning")) == TRUE); ensure(CPLHashSetInsert(set, CPLStrdup("bye bye")) == TRUE); ensure(CPLHashSetSize(set) == 3); ensure(CPLHashSetInsert(set, CPLStrdup("bye bye")) == FALSE); ensure(CPLHashSetSize(set) == 3); ensure(CPLHashSetRemove(set, "bye bye") == TRUE); ensure(CPLHashSetSize(set) == 2); ensure(CPLHashSetRemove(set, "good afternoon") == FALSE); ensure(CPLHashSetSize(set) == 2); CPLHashSetDestroy(set); } static int sumValues(void* elt, void* user_data) { int* pnSum = (int*)user_data; *pnSum += *(int*)elt; return TRUE; } // Test cpl_hash_set API template<> template<> void object::test<4>() { const int HASH_SET_SIZE = 1000; int data[HASH_SET_SIZE]; for(int i=0; i<HASH_SET_SIZE; ++i) { data[i] = i; } CPLHashSet* set = CPLHashSetNew(nullptr, nullptr, nullptr); for(int i=0;i<HASH_SET_SIZE;i++) { ensure(CPLHashSetInsert(set, (void*)&data[i]) == TRUE); } ensure(CPLHashSetSize(set) == HASH_SET_SIZE); for(int i=0;i<HASH_SET_SIZE;i++) { ensure(CPLHashSetInsert(set, (void*)&data[i]) == FALSE); } ensure(CPLHashSetSize(set) == HASH_SET_SIZE); for(int i=0;i<HASH_SET_SIZE;i++) { ensure(CPLHashSetLookup(set, (const void*)&data[i]) == (const void*)&data[i]); } int sum = 0; CPLHashSetForeach(set, sumValues, &sum); ensure(sum == (HASH_SET_SIZE-1) * HASH_SET_SIZE / 2); for(int i=0;i<HASH_SET_SIZE;i++) { ensure(CPLHashSetRemove(set, (void*)&data[i]) == TRUE); } ensure(CPLHashSetSize(set) == 0); CPLHashSetDestroy(set); } // Test cpl_string API template<> template<> void object::test<5>() { // CSLTokenizeString2(); char **papszStringList; papszStringList = CSLTokenizeString2("one two three", " ", 0); ensure(CSLCount(papszStringList) == 3); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "three")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one two, three;four,five; six", " ;,", 0); ensure(CSLCount(papszStringList) == 6); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "three")); ensure(EQUAL(papszStringList[3], "four")); ensure(EQUAL(papszStringList[4], "five")); ensure(EQUAL(papszStringList[5], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one two,,,five,six", " ,", CSLT_ALLOWEMPTYTOKENS); ensure(CSLCount(papszStringList) == 6); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "")); ensure(EQUAL(papszStringList[3], "")); ensure(EQUAL(papszStringList[4], "five")); ensure(EQUAL(papszStringList[5], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one two,\"three,four ,\",five,six", " ,", CSLT_HONOURSTRINGS); ensure(CSLCount(papszStringList) == 5); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "three,four ,")); ensure(EQUAL(papszStringList[3], "five")); ensure(EQUAL(papszStringList[4], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one two,\"three,four ,\",five,six", " ,", CSLT_PRESERVEQUOTES); ensure(CSLCount(papszStringList) == 7); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "\"three")); ensure(EQUAL(papszStringList[3], "four")); ensure(EQUAL(papszStringList[4], "\"")); ensure(EQUAL(papszStringList[5], "five")); ensure(EQUAL(papszStringList[6], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one two,\"three,four ,\",five,six", " ,", CSLT_HONOURSTRINGS | CSLT_PRESERVEQUOTES); ensure(CSLCount(papszStringList) == 5); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "\"three,four ,\"")); ensure(EQUAL(papszStringList[3], "five")); ensure(EQUAL(papszStringList[4], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one \\two,\"three,\\four ,\",five,six", " ,", CSLT_PRESERVEESCAPES); ensure(CSLCount(papszStringList) == 7); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "\\two")); ensure(EQUAL(papszStringList[2], "\"three")); ensure(EQUAL(papszStringList[3], "\\four")); ensure(EQUAL(papszStringList[4], "\"")); ensure(EQUAL(papszStringList[5], "five")); ensure(EQUAL(papszStringList[6], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one \\two,\"three,\\four ,\",five,six", " ,", CSLT_PRESERVEQUOTES | CSLT_PRESERVEESCAPES); ensure(CSLCount(papszStringList) == 7); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "\\two")); ensure(EQUAL(papszStringList[2], "\"three")); ensure(EQUAL(papszStringList[3], "\\four")); ensure(EQUAL(papszStringList[4], "\"")); ensure(EQUAL(papszStringList[5], "five")); ensure(EQUAL(papszStringList[6], "six")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one ,two, three, four ,five ", ",", 0); ensure(CSLCount(papszStringList) == 5); ensure(EQUAL(papszStringList[0], "one ")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], " three")); ensure(EQUAL(papszStringList[3], " four ")); ensure(EQUAL(papszStringList[4], "five ")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one ,two, three, four ,five ", ",", CSLT_STRIPLEADSPACES); ensure(CSLCount(papszStringList) == 5); ensure(EQUAL(papszStringList[0], "one ")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "three")); ensure(EQUAL(papszStringList[3], "four ")); ensure(EQUAL(papszStringList[4], "five ")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one ,two, three, four ,five ", ",", CSLT_STRIPENDSPACES); ensure(CSLCount(papszStringList) == 5); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], " three")); ensure(EQUAL(papszStringList[3], " four")); ensure(EQUAL(papszStringList[4], "five")); CSLDestroy(papszStringList); papszStringList = CSLTokenizeString2("one ,two, three, four ,five ", ",", CSLT_STRIPLEADSPACES | CSLT_STRIPENDSPACES); ensure(CSLCount(papszStringList) == 5); ensure(EQUAL(papszStringList[0], "one")); ensure(EQUAL(papszStringList[1], "two")); ensure(EQUAL(papszStringList[2], "three")); ensure(EQUAL(papszStringList[3], "four")); ensure(EQUAL(papszStringList[4], "five")); CSLDestroy(papszStringList); } typedef struct { char szEncoding[24]; char szString[1024 - 24]; } TestRecodeStruct; // Test cpl_recode API template<> template<> void object::test<6>() { /* * NOTE: This test will generally fail if iconv() is not * linked in. * * CPLRecode() will be tested using the test file containing * a list of strings of the same text in different encoding. The * string is non-ASCII to avoid trivial transformations. Test file * has a simple binary format: a table of records, each record * is 1024 bytes long. The first 24 bytes of each record contain * encoding name (ASCII, zero padded), the last 1000 bytes contain * encoded string, zero padded. * * NOTE 1: We can't use a test file in human readable text format * here because of multiple different encodings including * multibyte ones. * * The test file could be generated with the following simple shell * script: * * #!/bin/sh * * # List of encodings to convert the test string into * ENCODINGS="UTF-8 CP1251 KOI8-R UCS-2 UCS-2BE UCS-2LE UCS-4 UCS-4BE UCS-4LE UTF-16 UTF-32" * # The test string itself in UTF-8 encoding. * # This means "Improving GDAL internationalization." in Russian. * TESTSTRING="\u0423\u043b\u0443\u0447\u0448\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e GDAL." * * RECORDSIZE=1024 * ENCSIZE=24 * * i=0 * for enc in ${ENCODINGS}; do * env printf "${enc}" | dd ibs=${RECORDSIZE} conv=sync obs=1 seek=$((${RECORDSIZE}*${i})) of="recode-rus.dat" status=noxfer * env printf "${TESTSTRING}" | iconv -t ${enc} | dd ibs=${RECORDSIZE} conv=sync obs=1 seek=$((${RECORDSIZE}*${i}+${ENCSIZE})) of="recode-rus.dat" status=noxfer * i=$((i+1)) * done * * NOTE 2: The test string is encoded with the special format * "\uXXXX" sequences, so we able to paste it here. * * NOTE 3: We need a printf utility from the coreutils because of * that. "env printf" should work avoiding the shell * built-in. * * NOTE 4: "iconv" utility without the "-f" option will work with * encoding read from the current locale. * * TODO: 1. Add more encodings maybe more test files. * 2. Add test for CPLRecodeFromWChar()/CPLRecodeToWChar(). * 3. Test translation between each possible pair of * encodings in file, not only into the UTF-8. */ std::ifstream fin((data_ + SEP + "recode-rus.dat").c_str(), std::ifstream::binary); TestRecodeStruct oReferenceString; // Read reference string (which is the first one in the file) fin.read(oReferenceString.szEncoding, sizeof(oReferenceString.szEncoding)); oReferenceString.szEncoding[sizeof(oReferenceString.szEncoding) - 1] = '\0'; fin.read(oReferenceString.szString, sizeof(oReferenceString.szString)); oReferenceString.szString[sizeof(oReferenceString.szString) - 1] = '\0'; while ( !fin.eof() ) { TestRecodeStruct oTestString; fin.read(oTestString.szEncoding, sizeof(oTestString.szEncoding)); oTestString.szEncoding[sizeof(oTestString.szEncoding) - 1] = '\0'; fin.read(oTestString.szString, sizeof(oTestString.szString)); oTestString.szString[sizeof(oTestString.szString) - 1] = '\0'; // Compare each string with the reference one CPLErrorReset(); char *pszDecodedString = CPLRecode( oTestString.szString, oTestString.szEncoding, oReferenceString.szEncoding); if( strstr(CPLGetLastErrorMsg(), "Recode from KOI8-R to UTF-8 not supported") != nullptr ) { CPLFree( pszDecodedString ); break; } size_t nLength = MIN( strlen(pszDecodedString), sizeof(oReferenceString.szEncoding) ); bool bOK = (memcmp(pszDecodedString, oReferenceString.szString, nLength) == 0); // FIXME Some tests fail on Mac. Not sure why, but do not error out just for that if( !bOK && (strstr(CPLGetConfigOption("TRAVIS_OS_NAME", ""), "osx") != nullptr || strstr(CPLGetConfigOption("BUILD_NAME", ""), "osx") != nullptr || getenv("DO_NOT_FAIL_ON_RECODE_ERRORS") != nullptr)) { fprintf(stderr, "Recode from %s failed\n", oTestString.szEncoding); } else { ensure( std::string("Recode from ") + oTestString.szEncoding, bOK ); } CPLFree( pszDecodedString ); } fin.close(); } /************************************************************************/ /* CPLStringList tests */ /************************************************************************/ template<> template<> void object::test<7>() { CPLStringList oCSL; ensure( "7nil", oCSL.List() == nullptr ); oCSL.AddString( "def" ); oCSL.AddString( "abc" ); ensure_equals( "7", oCSL.Count(), 2 ); ensure( "70", EQUAL(oCSL[0], "def") ); ensure( "71", EQUAL(oCSL[1], "abc") ); ensure( "72", oCSL[17] == nullptr ); ensure( "73", oCSL[-1] == nullptr ); ensure_equals( "74", oCSL.FindString("abc"), 1 ); CSLDestroy( oCSL.StealList() ); ensure_equals( "75", oCSL.Count(), 0 ); ensure( "76", oCSL.List() == nullptr ); // Test that the list will make an internal copy when needed to // modify a read-only list. oCSL.AddString( "def" ); oCSL.AddString( "abc" ); CPLStringList oCopy( oCSL.List(), FALSE ); ensure_equals( "77", oCSL.List(), oCopy.List() ); ensure_equals( "78", oCSL.Count(), oCopy.Count() ); oCopy.AddString( "xyz" ); ensure( "79", oCSL.List() != oCopy.List() ); ensure_equals( "7a", oCopy.Count(), 3 ); ensure_equals( "7b", oCSL.Count(), 2 ); ensure( "7c", EQUAL(oCopy[2], "xyz") ); } template<> template<> void object::test<8>() { // Test some name=value handling stuff. CPLStringList oNVL; oNVL.AddNameValue( "KEY1", "VALUE1" ); oNVL.AddNameValue( "2KEY", "VALUE2" ); ensure_equals( oNVL.Count(), 2 ); ensure( EQUAL(oNVL.FetchNameValue("2KEY"),"VALUE2") ); ensure( oNVL.FetchNameValue("MISSING") == nullptr ); oNVL.AddNameValue( "KEY1", "VALUE3" ); ensure( EQUAL(oNVL.FetchNameValue("KEY1"),"VALUE1") ); ensure( EQUAL(oNVL[2],"KEY1=VALUE3") ); ensure( EQUAL(oNVL.FetchNameValueDef("MISSING","X"),"X") ); oNVL.SetNameValue( "2KEY", "VALUE4" ); ensure( EQUAL(oNVL.FetchNameValue("2KEY"),"VALUE4") ); ensure_equals( oNVL.Count(), 3 ); // make sure deletion works. oNVL.SetNameValue( "2KEY", nullptr ); ensure( oNVL.FetchNameValue("2KEY") == nullptr ); ensure_equals( oNVL.Count(), 2 ); // Test boolean support. ensure_equals( "b1", oNVL.FetchBoolean( "BOOL", TRUE ), TRUE ); ensure_equals( "b2", oNVL.FetchBoolean( "BOOL", FALSE ), FALSE ); oNVL.SetNameValue( "BOOL", "YES" ); ensure_equals( "b3", oNVL.FetchBoolean( "BOOL", TRUE ), TRUE ); ensure_equals( "b4", oNVL.FetchBoolean( "BOOL", FALSE ), TRUE ); oNVL.SetNameValue( "BOOL", "1" ); ensure_equals( "b5", oNVL.FetchBoolean( "BOOL", FALSE ), TRUE ); oNVL.SetNameValue( "BOOL", "0" ); ensure_equals( "b6", oNVL.FetchBoolean( "BOOL", TRUE ), FALSE ); oNVL.SetNameValue( "BOOL", "FALSE" ); ensure_equals( "b7", oNVL.FetchBoolean( "BOOL", TRUE ), FALSE ); oNVL.SetNameValue( "BOOL", "ON" ); ensure_equals( "b8", oNVL.FetchBoolean( "BOOL", FALSE ), TRUE ); // Test assignment operator. CPLStringList oCopy; { CPLStringList oTemp; oTemp.AddString("test"); oCopy = oTemp; } ensure( "c1", EQUAL(oCopy[0],"test") ); auto& oCopyRef(oCopy); oCopy = oCopyRef; ensure( "c2", EQUAL(oCopy[0],"test") ); // Test copy constructor. CPLStringList oCopy2(oCopy); oCopy.Clear(); ensure( "c3", EQUAL(oCopy2[0],"test") ); // Test sorting CPLStringList oTestSort; oTestSort.AddNameValue("Z", "1"); oTestSort.AddNameValue("L", "2"); oTestSort.AddNameValue("T", "3"); oTestSort.AddNameValue("A", "4"); oTestSort.Sort(); ensure( "c4", EQUAL(oTestSort[0],"A=4") ); ensure( "c5", EQUAL(oTestSort[1],"L=2") ); ensure( "c6", EQUAL(oTestSort[2],"T=3") ); ensure( "c7", EQUAL(oTestSort[3],"Z=1") ); ensure_equals( "c8", oTestSort[4], (const char*)nullptr ); // Test FetchNameValue() in a sorted list ensure( "c9", EQUAL(oTestSort.FetchNameValue("A"),"4") ); ensure( "c10", EQUAL(oTestSort.FetchNameValue("L"),"2") ); ensure( "c11", EQUAL(oTestSort.FetchNameValue("T"),"3") ); ensure( "c12", EQUAL(oTestSort.FetchNameValue("Z"),"1") ); // Test AddNameValue() in a sorted list oTestSort.AddNameValue("B", "5"); ensure( "c13", EQUAL(oTestSort[0],"A=4") ); ensure( "c14", EQUAL(oTestSort[1],"B=5") ); ensure( "c15", EQUAL(oTestSort[2],"L=2") ); ensure( "c16", EQUAL(oTestSort[3],"T=3") ); ensure( "c17", EQUAL(oTestSort[4],"Z=1") ); ensure_equals( "c18", oTestSort[5], (const char*)nullptr ); // Test SetNameValue() of an existing item in a sorted list oTestSort.SetNameValue("Z", "6"); ensure( "c19", EQUAL(oTestSort[4],"Z=6") ); // Test SetNameValue() of a non-existing item in a sorted list oTestSort.SetNameValue("W", "7"); ensure( "c20", EQUAL(oTestSort[0],"A=4") ); ensure( "c21", EQUAL(oTestSort[1],"B=5") ); ensure( "c22", EQUAL(oTestSort[2],"L=2") ); ensure( "c23", EQUAL(oTestSort[3],"T=3") ); ensure( "c24", EQUAL(oTestSort[4],"W=7") ); ensure( "c25", EQUAL(oTestSort[5],"Z=6") ); ensure_equals( "c26", oTestSort[6], (const char*)nullptr ); } template<> template<> void object::test<9>() { // Test some name=value handling stuff *with* sorting active. CPLStringList oNVL; oNVL.Sort(); oNVL.AddNameValue( "KEY1", "VALUE1" ); oNVL.AddNameValue( "2KEY", "VALUE2" ); ensure_equals( "91", oNVL.Count(), 2 ); ensure( "92", EQUAL(oNVL.FetchNameValue("KEY1"),"VALUE1") ); ensure( "93", EQUAL(oNVL.FetchNameValue("2KEY"),"VALUE2") ); ensure( "94", oNVL.FetchNameValue("MISSING") == nullptr ); oNVL.AddNameValue( "KEY1", "VALUE3" ); ensure_equals( "95", oNVL.Count(), 3 ); ensure( "96", EQUAL(oNVL.FetchNameValue("KEY1"),"VALUE1") ); ensure( "97", EQUAL(oNVL.FetchNameValueDef("MISSING","X"),"X") ); oNVL.SetNameValue( "2KEY", "VALUE4" ); ensure( "98", EQUAL(oNVL.FetchNameValue("2KEY"),"VALUE4") ); ensure_equals( "99", oNVL.Count(), 3 ); // make sure deletion works. oNVL.SetNameValue( "2KEY", nullptr ); ensure( "9a", oNVL.FetchNameValue("2KEY") == nullptr ); ensure_equals( "9b", oNVL.Count(), 2 ); // Test insertion logic pretty carefully. oNVL.Clear(); ensure( "9c", oNVL.IsSorted() == TRUE ); oNVL.SetNameValue( "B", "BB" ); oNVL.SetNameValue( "A", "AA" ); oNVL.SetNameValue( "D", "DD" ); oNVL.SetNameValue( "C", "CC" ); // items should be in sorted order. ensure( "9c1", EQUAL(oNVL[0],"A=AA") ); ensure( "9c2", EQUAL(oNVL[1],"B=BB") ); ensure( "9c3", EQUAL(oNVL[2],"C=CC") ); ensure( "9c4", EQUAL(oNVL[3],"D=DD") ); ensure( "9d", EQUAL(oNVL.FetchNameValue("A"),"AA") ); ensure( "9e", EQUAL(oNVL.FetchNameValue("B"),"BB") ); ensure( "9f", EQUAL(oNVL.FetchNameValue("C"),"CC") ); ensure( "9g", EQUAL(oNVL.FetchNameValue("D"),"DD") ); } template<> template<> void object::test<10>() { GByte abyDigest[CPL_SHA256_HASH_SIZE]; char szDigest[2*CPL_SHA256_HASH_SIZE+1]; CPL_HMAC_SHA256("key", 3, "The quick brown fox jumps over the lazy dog", strlen("The quick brown fox jumps over the lazy dog"), abyDigest); for(int i=0;i<CPL_SHA256_HASH_SIZE;i++) snprintf(szDigest + 2 * i, sizeof(szDigest)-2*i, "%02x", abyDigest[i]); //fprintf(stderr, "%s\n", szDigest); ensure( "10.1", EQUAL(szDigest, "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8") ); CPL_HMAC_SHA256("mysupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersuperlongkey", strlen("mysupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersupersuperlongkey"), "msg", 3, abyDigest); for(int i=0;i<CPL_SHA256_HASH_SIZE;i++) snprintf(szDigest + 2 * i, sizeof(szDigest)-2*i, "%02x", abyDigest[i]); //fprintf(stderr, "%s\n", szDigest); ensure( "10.2", EQUAL(szDigest, "a3051520761ed3cb43876b35ce2dd93ac5b332dc3bad898bb32086f7ac71ffc1") ); } template<> template<> void object::test<11>() { CPLPushErrorHandler(CPLQuietErrorHandler); // The following tests will fail because of overflows CPLErrorReset(); ensure( "11.1", VSIMalloc2( ~(size_t)0, ~(size_t)0 ) == nullptr ); ensure( "11.1bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.2", VSIMalloc3( 1, ~(size_t)0, ~(size_t)0 ) == nullptr ); ensure( "11.2bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.3", VSIMalloc3( ~(size_t)0, 1, ~(size_t)0 ) == nullptr ); ensure( "11.3bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.4", VSIMalloc3( ~(size_t)0, ~(size_t)0, 1 ) == nullptr ); ensure( "11.4bis", CPLGetLastErrorType() != CE_None ); if( !CSLTestBoolean(CPLGetConfigOption("SKIP_MEM_INTENSIVE_TEST", "NO")) ) { // The following tests will fail because such allocations cannot succeed #if SIZEOF_VOIDP == 8 CPLErrorReset(); ensure( "11.6", VSIMalloc( ~(size_t)0 ) == nullptr ); ensure( "11.6bis", CPLGetLastErrorType() == CE_None ); /* no error reported */ CPLErrorReset(); ensure( "11.7", VSIMalloc2( ~(size_t)0, 1 ) == nullptr ); ensure( "11.7bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.8", VSIMalloc3( ~(size_t)0, 1, 1 ) == nullptr ); ensure( "11.8bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.9", VSICalloc( ~(size_t)0, 1 ) == nullptr ); ensure( "11.9bis", CPLGetLastErrorType() == CE_None ); /* no error reported */ CPLErrorReset(); ensure( "11.10", VSIRealloc( nullptr, ~(size_t)0 ) == nullptr ); ensure( "11.10bis", CPLGetLastErrorType() == CE_None ); /* no error reported */ CPLErrorReset(); ensure( "11.11", VSI_MALLOC_VERBOSE( ~(size_t)0 ) == nullptr ); ensure( "11.11bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.12", VSI_MALLOC2_VERBOSE( ~(size_t)0, 1 ) == nullptr ); ensure( "11.12bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.13", VSI_MALLOC3_VERBOSE( ~(size_t)0, 1, 1 ) == nullptr ); ensure( "11.13bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.14", VSI_CALLOC_VERBOSE( ~(size_t)0, 1 ) == nullptr ); ensure( "11.14bis", CPLGetLastErrorType() != CE_None ); CPLErrorReset(); ensure( "11.15", VSI_REALLOC_VERBOSE( nullptr, ~(size_t)0 ) == nullptr ); ensure( "11.15bis", CPLGetLastErrorType() != CE_None ); #endif } CPLPopErrorHandler(); // The following allocs will return NULL because of 0 byte alloc CPLErrorReset(); ensure( "11.16", VSIMalloc2( 0, 1 ) == nullptr ); ensure( "11.16bis", CPLGetLastErrorType() == CE_None ); ensure( "11.17", VSIMalloc2( 1, 0 ) == nullptr ); CPLErrorReset(); ensure( "11.18", VSIMalloc3( 0, 1, 1 ) == nullptr ); ensure( "11.18bis", CPLGetLastErrorType() == CE_None ); ensure( "11.19", VSIMalloc3( 1, 0, 1 ) == nullptr ); ensure( "11.20", VSIMalloc3( 1, 1, 0 ) == nullptr ); } template<> template<> void object::test<12>() { ensure( strcmp(CPLFormFilename("a", "b", nullptr), "a/b") == 0 || strcmp(CPLFormFilename("a", "b", nullptr), "a\\b") == 0 ); ensure( strcmp(CPLFormFilename("a/", "b", nullptr), "a/b") == 0 || strcmp(CPLFormFilename("a/", "b", nullptr), "a\\b") == 0 ); ensure( strcmp(CPLFormFilename("a\\", "b", nullptr), "a/b") == 0 || strcmp(CPLFormFilename("a\\", "b", nullptr), "a\\b") == 0 ); ensure_equals( CPLFormFilename(nullptr, "a", "b"), "a.b"); ensure_equals( CPLFormFilename(nullptr, "a", ".b"), "a.b"); ensure_equals( CPLFormFilename("/a", "..", nullptr), "/"); ensure_equals( CPLFormFilename("/a/", "..", nullptr), "/"); ensure_equals( CPLFormFilename("/a/b", "..", nullptr), "/a"); ensure_equals( CPLFormFilename("/a/b/", "..", nullptr), "/a"); ensure( EQUAL(CPLFormFilename("c:", "..", nullptr), "c:/..") || EQUAL(CPLFormFilename("c:", "..", nullptr), "c:\\..") ); ensure( EQUAL(CPLFormFilename("c:\\", "..", nullptr), "c:/..") || EQUAL(CPLFormFilename("c:\\", "..", nullptr), "c:\\..") ); ensure_equals( CPLFormFilename("c:\\a", "..", nullptr), "c:"); ensure_equals( CPLFormFilename("c:\\a\\", "..", nullptr), "c:"); ensure_equals( CPLFormFilename("c:\\a\\b", "..", nullptr), "c:\\a"); ensure_equals( CPLFormFilename("\\\\$\\c:\\a", "..", nullptr), "\\\\$\\c:"); ensure( EQUAL(CPLFormFilename("\\\\$\\c:", "..", nullptr), "\\\\$\\c:/..") || EQUAL(CPLFormFilename("\\\\$\\c:", "..", nullptr), "\\\\$\\c:\\..") ); } template<> template<> void object::test<13>() { ensure( VSIGetDiskFreeSpace("/vsimem/") > 0 ); ensure( VSIGetDiskFreeSpace(".") == -1 || VSIGetDiskFreeSpace(".") >= 0 ); } template<> template<> void object::test<14>() { double a, b, c; a = b = 0; ensure_equals( CPLsscanf("1 2", "%lf %lf", &a, &b), 2 ); ensure_equals( a, 1.0 ); ensure_equals( b, 2.0 ); a = b = 0; ensure_equals( CPLsscanf("1\t2", "%lf %lf", &a, &b), 2 ); ensure_equals( a, 1.0 ); ensure_equals( b, 2.0 ); a = b = 0; ensure_equals( CPLsscanf("1 2", "%lf\t%lf", &a, &b), 2 ); ensure_equals( a, 1.0 ); ensure_equals( b, 2.0 ); a = b = 0; ensure_equals( CPLsscanf("1 2", "%lf %lf", &a, &b), 2 ); ensure_equals( a, 1.0 ); ensure_equals( b, 2.0 ); a = b = 0; ensure_equals( CPLsscanf("1 2", "%lf %lf", &a, &b), 2 ); ensure_equals( a, 1.0 ); ensure_equals( b, 2.0 ); a = b = c = 0; ensure_equals( CPLsscanf("1 2", "%lf %lf %lf", &a, &b, &c), 2 ); ensure_equals( a, 1.0 ); ensure_equals( b, 2.0 ); } template<> template<> void object::test<15>() { CPLString oldVal = CPLGetConfigOption("CPL_DEBUG", ""); CPLSetConfigOption("CPL_DEBUG", "TEST"); CPLErrorHandler oldHandler = CPLSetErrorHandler(myErrorHandler); gbGotError = false; CPLDebug("TEST", "Test"); ensure_equals( gbGotError, true ); gbGotError = false; CPLSetErrorHandler(oldHandler); CPLPushErrorHandler(myErrorHandler); gbGotError = false; CPLDebug("TEST", "Test"); ensure_equals( gbGotError, true ); gbGotError = false; CPLPopErrorHandler(); oldHandler = CPLSetErrorHandler(myErrorHandler); CPLSetCurrentErrorHandlerCatchDebug( FALSE ); gbGotError = false; CPLDebug("TEST", "Test"); ensure_equals( gbGotError, false ); gbGotError = false; CPLSetErrorHandler(oldHandler); CPLPushErrorHandler(myErrorHandler); CPLSetCurrentErrorHandlerCatchDebug( FALSE ); gbGotError = false; CPLDebug("TEST", "Test"); ensure_equals( gbGotError, false ); gbGotError = false; CPLPopErrorHandler(); CPLSetConfigOption("CPL_DEBUG", oldVal.size() ? oldVal.c_str() : nullptr); oldHandler = CPLSetErrorHandler(nullptr); CPLDebug("TEST", "Test"); CPLError(CE_Failure, CPLE_AppDefined, "test"); CPLErrorHandler newOldHandler = CPLSetErrorHandler(nullptr); ensure_equals(newOldHandler, static_cast<CPLErrorHandler>(nullptr)); CPLDebug("TEST", "Test"); CPLError(CE_Failure, CPLE_AppDefined, "test"); CPLSetErrorHandler(oldHandler); } /************************************************************************/ /* CPLString::replaceAll() */ /************************************************************************/ template<> template<> void object::test<16>() { CPLString osTest; osTest = "foobarbarfoo"; osTest.replaceAll("bar", "was_bar"); ensure_equals( osTest, "foowas_barwas_barfoo" ); osTest = "foobarbarfoo"; osTest.replaceAll("X", "was_bar"); ensure_equals( osTest, "foobarbarfoo" ); osTest = "foobarbarfoo"; osTest.replaceAll("", "was_bar"); ensure_equals( osTest, "foobarbarfoo" ); osTest = "foobarbarfoo"; osTest.replaceAll("bar", ""); ensure_equals( osTest, "foofoo" ); osTest = "foobarbarfoo"; osTest.replaceAll('b', 'B'); ensure_equals( osTest, "fooBarBarfoo" ); osTest = "foobarbarfoo"; osTest.replaceAll('b', "B"); ensure_equals( osTest, "fooBarBarfoo" ); osTest = "foobarbarfoo"; osTest.replaceAll("b", 'B'); ensure_equals( osTest, "fooBarBarfoo" ); } /************************************************************************/ /* VSIMallocAligned() */ /************************************************************************/ template<> template<> void object::test<17>() { GByte* ptr = static_cast<GByte*>(VSIMallocAligned(sizeof(void*), 1)); ensure( ptr != nullptr ); ensure( ((size_t)ptr % sizeof(void*)) == 0 ); *ptr = 1; VSIFreeAligned(ptr); ptr = static_cast<GByte*>(VSIMallocAligned(16, 1)); ensure( ptr != nullptr ); ensure( ((size_t)ptr % 16) == 0 ); *ptr = 1; VSIFreeAligned(ptr); VSIFreeAligned(nullptr); #ifndef WIN32 // Illegal use of API. Returns non NULL on Windows ptr = static_cast<GByte*>(VSIMallocAligned(2, 1)); ensure( ptr == nullptr ); // Illegal use of API. Crashes on Windows ptr = static_cast<GByte*>(VSIMallocAligned(5, 1)); ensure( ptr == nullptr ); #endif if( !CSLTestBoolean(CPLGetConfigOption("SKIP_MEM_INTENSIVE_TEST", "NO")) ) { // The following tests will fail because such allocations cannot succeed #if SIZEOF_VOIDP == 8 ptr = static_cast<GByte*>(VSIMallocAligned(sizeof(void*), ~((size_t)0))); ensure( ptr == nullptr ); ptr = static_cast<GByte*>(VSIMallocAligned(sizeof(void*), (~((size_t)0)) - sizeof(void*))); ensure( ptr == nullptr ); #endif } } /************************************************************************/ /* CPLGetConfigOptions() / CPLSetConfigOptions() */ /************************************************************************/ template<> template<> void object::test<18>() { CPLSetConfigOption("FOOFOO", "BAR"); char** options = CPLGetConfigOptions(); ensure_equals (CSLFetchNameValue(options, "FOOFOO"), "BAR"); CPLSetConfigOptions(nullptr); ensure_equals (CPLGetConfigOption("FOOFOO", "i_dont_exist"), "i_dont_exist"); CPLSetConfigOptions(options); ensure_equals (CPLGetConfigOption("FOOFOO", "i_dont_exist"), "BAR"); CSLDestroy(options); } /************************************************************************/ /* CPLGetThreadLocalConfigOptions() / CPLSetThreadLocalConfigOptions() */ /************************************************************************/ template<> template<> void object::test<19>() { CPLSetThreadLocalConfigOption("FOOFOO", "BAR"); char** options = CPLGetThreadLocalConfigOptions(); ensure_equals (CSLFetchNameValue(options, "FOOFOO"), "BAR"); CPLSetThreadLocalConfigOptions(nullptr); ensure_equals (CPLGetThreadLocalConfigOption("FOOFOO", "i_dont_exist"), "i_dont_exist"); CPLSetThreadLocalConfigOptions(options); ensure_equals (CPLGetThreadLocalConfigOption("FOOFOO", "i_dont_exist"), "BAR"); CSLDestroy(options); } template<> template<> void object::test<20>() { ensure_equals ( CPLExpandTilde("/foo/bar"), "/foo/bar" ); CPLSetConfigOption("HOME", "/foo"); ensure ( EQUAL(CPLExpandTilde("~/bar"), "/foo/bar") || EQUAL(CPLExpandTilde("~/bar"), "/foo\\bar") ); CPLSetConfigOption("HOME", nullptr); } template<> template<> void object::test<21>() { // CPLString(std::string) constructor ensure_equals ( CPLString(std::string("abc")).c_str(), "abc" ); // CPLString(const char*) constructor ensure_equals ( CPLString("abc").c_str(), "abc" ); // CPLString(const char*, n) constructor ensure_equals ( CPLString("abc",1).c_str(), "a" ); } template<> template<> void object::test<22>() { // NOTE: Assumes cpl_error.cpp defines DEFAULT_LAST_ERR_MSG_SIZE=500 char pszMsg[] = "0abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "1abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "2abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "3abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "4abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "5abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "6abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "7abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "8abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" "9abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" // 500 "0abcdefghijklmnopqrstuvwxyz0123456789!@#$%&*()_+=|" // 550 ; CPLErrorReset(); CPLErrorSetState(CE_Warning, 1, pszMsg); ensure_equals(strlen(pszMsg) - 50 - 1, // length - 50 - 1 (null-terminator) strlen(CPLGetLastErrorMsg())); // DEFAULT_LAST_ERR_MSG_SIZE - 1 } template<> template<> void object::test<23>() { char* pszText = CPLUnescapeString("<>&'"???", nullptr, CPLES_XML); ensure_equals( CPLString(pszText), "<>&'\"???"); CPLFree(pszText); // Integer overflow pszText = CPLUnescapeString("&10000000000000000;", nullptr, CPLES_XML); // We do not really care about the return value CPLFree(pszText); // Integer overflow pszText = CPLUnescapeString("�", nullptr, CPLES_XML); // We do not really care about the return value CPLFree(pszText); // Error case pszText = CPLUnescapeString("&foo", nullptr, CPLES_XML); ensure_equals( CPLString(pszText), ""); CPLFree(pszText); // Error case pszText = CPLUnescapeString("&#x", nullptr, CPLES_XML); ensure_equals( CPLString(pszText), ""); CPLFree(pszText); // Error case pszText = CPLUnescapeString("&#", nullptr, CPLES_XML); ensure_equals( CPLString(pszText), ""); CPLFree(pszText); } template<> template<> void object::test<24>() { // No longer used } // Test signed int safe maths template<> template<> void object::test<25>() { ensure_equals( (CPLSM(-2) + CPLSM(3)).v(), 1 ); ensure_equals( (CPLSM(-2) + CPLSM(1)).v(), -1 ); ensure_equals( (CPLSM(-2) + CPLSM(-1)).v(), -3 ); ensure_equals( (CPLSM(2) + CPLSM(-3)).v(), -1 ); ensure_equals( (CPLSM(2) + CPLSM(-1)).v(), 1 ); ensure_equals( (CPLSM(2) + CPLSM(1)).v(), 3 ); ensure_equals( (CPLSM(INT_MAX-1) + CPLSM(1)).v(), INT_MAX ); ensure_equals( (CPLSM(1) + CPLSM(INT_MAX-1)).v(), INT_MAX ); ensure_equals( (CPLSM(INT_MAX) + CPLSM(-1)).v(), INT_MAX - 1 ); ensure_equals( (CPLSM(-1) + CPLSM(INT_MAX)).v(), INT_MAX - 1 ); ensure_equals( (CPLSM(INT_MIN+1) + CPLSM(-1)).v(), INT_MIN ); ensure_equals( (CPLSM(-1) + CPLSM(INT_MIN+1)).v(), INT_MIN ); try { (CPLSM(INT_MAX) + CPLSM(1)).v(); ensure(false); } catch (...) {} try { (CPLSM(1) + CPLSM(INT_MAX)).v(); ensure(false); } catch (...) {} try { (CPLSM(INT_MIN) + CPLSM(-1)).v(); ensure(false); } catch (...) {} try { (CPLSM(-1) + CPLSM(INT_MIN)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(-2) - CPLSM(1)).v(), -3 ); ensure_equals( (CPLSM(-2) - CPLSM(-1)).v(), -1 ); ensure_equals( (CPLSM(-2) - CPLSM(-3)).v(), 1 ); ensure_equals( (CPLSM(2) - CPLSM(-1)).v(), 3 ); ensure_equals( (CPLSM(2) - CPLSM(1)).v(), 1 ); ensure_equals( (CPLSM(2) - CPLSM(3)).v(), -1 ); ensure_equals( (CPLSM(INT_MAX) - CPLSM(1)).v(), INT_MAX - 1 ); ensure_equals( (CPLSM(INT_MIN+1) - CPLSM(1)).v(), INT_MIN ); ensure_equals( (CPLSM(0) - CPLSM(INT_MIN+1)).v(), INT_MAX ); ensure_equals( (CPLSM(0) - CPLSM(INT_MAX)).v(), -INT_MAX ); try { (CPLSM(INT_MIN) - CPLSM(1)).v(); ensure(false); } catch (...) {} try { (CPLSM(0) - CPLSM(INT_MIN)).v(); ensure(false); } catch (...) {} try { (CPLSM(INT_MIN) - CPLSM(1)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(INT_MIN+1) * CPLSM(-1)).v(), INT_MAX ); ensure_equals( (CPLSM(-1) * CPLSM(INT_MIN+1)).v(), INT_MAX ); ensure_equals( (CPLSM(INT_MIN) * CPLSM(1)).v(), INT_MIN ); ensure_equals( (CPLSM(1) * CPLSM(INT_MIN)).v(), INT_MIN ); ensure_equals( (CPLSM(1) * CPLSM(INT_MAX)).v(), INT_MAX ); ensure_equals( (CPLSM(INT_MIN/2) * CPLSM(2)).v(), INT_MIN ); ensure_equals( (CPLSM(INT_MAX/2) * CPLSM(2)).v(), INT_MAX-1 ); ensure_equals( (CPLSM(INT_MAX/2+1) * CPLSM(-2)).v(), INT_MIN ); ensure_equals( (CPLSM(0) * CPLSM(INT_MIN)).v(), 0 ); ensure_equals( (CPLSM(INT_MIN) * CPLSM(0)).v(), 0 ); ensure_equals( (CPLSM(0) * CPLSM(INT_MAX)).v(), 0 ); ensure_equals( (CPLSM(INT_MAX) * CPLSM(0)).v(), 0 ); try { (CPLSM(INT_MAX/2+1) * CPLSM(2)).v(); ensure(false); } catch (...) {} try { (CPLSM(2) * CPLSM(INT_MAX/2+1)).v(); ensure(false); } catch (...) {} try { (CPLSM(INT_MIN) * CPLSM(-1)).v(); ensure(false); } catch (...) {} try { (CPLSM(INT_MIN) * CPLSM(2)).v(); ensure(false); } catch (...) {} try { (CPLSM(2) * CPLSM(INT_MIN)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(4) / CPLSM(2)).v(), 2 ); ensure_equals( (CPLSM(4) / CPLSM(-2)).v(), -2 ); ensure_equals( (CPLSM(-4) / CPLSM(2)).v(), -2 ); ensure_equals( (CPLSM(-4) / CPLSM(-2)).v(), 2 ); ensure_equals( (CPLSM(0) / CPLSM(2)).v(), 0 ); ensure_equals( (CPLSM(0) / CPLSM(-2)).v(), 0 ); ensure_equals( (CPLSM(INT_MAX) / CPLSM(1)).v(), INT_MAX ); ensure_equals( (CPLSM(INT_MAX) / CPLSM(-1)).v(), -INT_MAX ); ensure_equals( (CPLSM(INT_MIN) / CPLSM(1)).v(), INT_MIN ); try { (CPLSM(-1) * CPLSM(INT_MIN)).v(); ensure(false); } catch (...) {} try { (CPLSM(INT_MIN) / CPLSM(-1)).v(); ensure(false); } catch (...) {} try { (CPLSM(1) / CPLSM(0)).v(); ensure(false); } catch (...) {} ensure_equals( CPLSM_TO_UNSIGNED(1).v(), 1U ); try { CPLSM_TO_UNSIGNED(-1); ensure(false); } catch (...) {} } // Test unsigned int safe maths template<> template<> void object::test<26>() { ensure_equals( (CPLSM(2U) + CPLSM(3U)).v(), 5U ); ensure_equals( (CPLSM(UINT_MAX-1) + CPLSM(1U)).v(), UINT_MAX ); try { (CPLSM(UINT_MAX) + CPLSM(1U)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(4U) - CPLSM(3U)).v(), 1U ); ensure_equals( (CPLSM(4U) - CPLSM(4U)).v(), 0U ); ensure_equals( (CPLSM(UINT_MAX) - CPLSM(1U)).v(), UINT_MAX-1 ); try { (CPLSM(4U) - CPLSM(5U)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(0U) * CPLSM(UINT_MAX)).v(), 0U ); ensure_equals( (CPLSM(UINT_MAX) * CPLSM(0U)).v(), 0U ); ensure_equals( (CPLSM(UINT_MAX) * CPLSM(1U)).v(), UINT_MAX ); ensure_equals( (CPLSM(1U) * CPLSM(UINT_MAX)).v(), UINT_MAX ); try { (CPLSM(UINT_MAX) * CPLSM(2U)).v(); ensure(false); } catch (...) {} try { (CPLSM(2U) * CPLSM(UINT_MAX)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(4U) / CPLSM(2U)).v(), 2U ); ensure_equals( (CPLSM(UINT_MAX) / CPLSM(1U)).v(), UINT_MAX ); try { (CPLSM(1U) / CPLSM(0U)).v(); ensure(false); } catch (...) {} ensure_equals( (CPLSM(static_cast<GUInt64>(2)*1000*1000*1000) + CPLSM(static_cast<GUInt64>(3)*1000*1000*1000)).v(), static_cast<GUInt64>(5)*1000*1000*1000 ); ensure_equals( (CPLSM(std::numeric_limits<GUInt64>::max() - 1) + CPLSM(static_cast<GUInt64>(1))).v(), std::numeric_limits<GUInt64>::max() ); try { (CPLSM(std::numeric_limits<GUInt64>::max()) + CPLSM(static_cast<GUInt64>(1))); } catch (...) {} ensure_equals( (CPLSM(static_cast<GUInt64>(2)*1000*1000*1000) * CPLSM(static_cast<GUInt64>(3)*1000*1000*1000)).v(), static_cast<GUInt64>(6)*1000*1000*1000*1000*1000*1000 ); ensure_equals( (CPLSM(std::numeric_limits<GUInt64>::max()) * CPLSM(static_cast<GUInt64>(1))).v(), std::numeric_limits<GUInt64>::max() ); try { (CPLSM(std::numeric_limits<GUInt64>::max()) * CPLSM(static_cast<GUInt64>(2))); } catch (...) {} } // Test CPLParseRFC822DateTime() template<> template<> void object::test<27>() { int year, month, day, hour, min, sec, tz, weekday; ensure( !CPLParseRFC822DateTime("", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure_equals( CPLParseRFC822DateTime("Thu, 15 Jan 2017 12:34:56 +0015", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr), TRUE ); ensure_equals( CPLParseRFC822DateTime("Thu, 15 Jan 2017 12:34:56 +0015", &year, &month, &day, &hour, &min, &sec, &tz, &weekday), TRUE ); ensure_equals( year, 2017 ); ensure_equals( month, 1 ); ensure_equals( day, 15 ); ensure_equals( hour, 12 ); ensure_equals( min, 34 ); ensure_equals( sec, 56 ); ensure_equals( tz, 101 ); ensure_equals( weekday, 4 ); ensure_equals( CPLParseRFC822DateTime("Thu, 15 Jan 2017 12:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday), TRUE ); ensure_equals( year, 2017 ); ensure_equals( month, 1 ); ensure_equals( day, 15 ); ensure_equals( hour, 12 ); ensure_equals( min, 34 ); ensure_equals( sec, 56 ); ensure_equals( tz, 100 ); ensure_equals( weekday, 4 ); // Without day of week, second and timezone ensure_equals( CPLParseRFC822DateTime("15 Jan 2017 12:34", &year, &month, &day, &hour, &min, &sec, &tz, &weekday), TRUE ); ensure_equals( year, 2017 ); ensure_equals( month, 1 ); ensure_equals( day, 15 ); ensure_equals( hour, 12 ); ensure_equals( min, 34 ); ensure_equals( sec, -1 ); ensure_equals( tz, 0 ); ensure_equals( weekday, 0 ); ensure_equals( CPLParseRFC822DateTime("XXX, 15 Jan 2017 12:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday), TRUE ); ensure_equals( weekday, 0 ); ensure( !CPLParseRFC822DateTime("Sun, 01 Jan 2017 12", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("00 Jan 2017 12:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("32 Jan 2017 12:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 XXX 2017 12:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 Jan 2017 -1:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 Jan 2017 24:34:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 Jan 2017 12:-1:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 Jan 2017 12:60:56 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 Jan 2017 12:34:-1 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("01 Jan 2017 12:34:61 GMT", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("15 Jan 2017 12:34:56 XXX", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("15 Jan 2017 12:34:56 +-100", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); ensure( !CPLParseRFC822DateTime("15 Jan 2017 12:34:56 +9900", &year, &month, &day, &hour, &min, &sec, &tz, &weekday) ); } // Test CPLCopyTree() template<> template<> void object::test<28>() { CPLString osTmpPath(CPLGetDirname(CPLGenerateTempFilename(nullptr))); CPLString osSrcDir(CPLFormFilename(osTmpPath, "src_dir", nullptr)); CPLString osNewDir(CPLFormFilename(osTmpPath, "new_dir", nullptr)); ensure( VSIMkdir(osSrcDir, 0755) == 0 ); CPLString osSrcFile(CPLFormFilename(osSrcDir, "my.bin", nullptr)); VSILFILE* fp = VSIFOpenL(osSrcFile, "wb"); ensure( fp != nullptr ); VSIFCloseL(fp); CPLPushErrorHandler(CPLQuietErrorHandler); ensure( CPLCopyTree(osNewDir, "/i/do_not/exist") < 0 ); CPLPopErrorHandler(); ensure( CPLCopyTree(osNewDir, osSrcDir) == 0 ); VSIStatBufL sStat; CPLString osNewFile(CPLFormFilename(osNewDir, "my.bin", nullptr)); ensure( VSIStatL(osNewFile, &sStat) == 0 ); CPLPushErrorHandler(CPLQuietErrorHandler); ensure( CPLCopyTree(osNewDir, osSrcDir) < 0 ); CPLPopErrorHandler(); VSIUnlink( osNewFile ); VSIRmdir( osNewDir ); VSIUnlink( osSrcFile ); VSIRmdir( osSrcDir ); } class CPLJSonStreamingParserDump: public CPLJSonStreamingParser { std::vector<bool> m_abFirstMember; CPLString m_osSerialized; CPLString m_osException; public: CPLJSonStreamingParserDump() {} virtual void Reset() CPL_OVERRIDE { m_osSerialized.clear(); m_osException.clear(); CPLJSonStreamingParser::Reset(); } virtual void String(const char* pszValue, size_t) CPL_OVERRIDE; virtual void Number(const char* pszValue, size_t) CPL_OVERRIDE; virtual void Boolean(bool bVal) CPL_OVERRIDE; virtual void Null() CPL_OVERRIDE; virtual void StartObject() CPL_OVERRIDE; virtual void EndObject() CPL_OVERRIDE; virtual void StartObjectMember(const char* pszKey, size_t) CPL_OVERRIDE; virtual void StartArray() CPL_OVERRIDE; virtual void EndArray() CPL_OVERRIDE; virtual void StartArrayMember() CPL_OVERRIDE; virtual void Exception(const char* pszMessage) CPL_OVERRIDE; const CPLString& GetSerialized() const { return m_osSerialized; } const CPLString& GetException() const { return m_osException; } }; void CPLJSonStreamingParserDump::StartObject() { m_osSerialized += "{"; m_abFirstMember.push_back(true); } void CPLJSonStreamingParserDump::EndObject() { m_osSerialized += "}"; m_abFirstMember.pop_back(); } void CPLJSonStreamingParserDump::StartObjectMember(const char* pszKey, size_t) { if( !m_abFirstMember.back() ) m_osSerialized += ", "; m_osSerialized += CPLSPrintf("\"%s\": ", pszKey); m_abFirstMember.back() = false; } void CPLJSonStreamingParserDump::String(const char* pszValue, size_t) { m_osSerialized += GetSerializedString(pszValue); } void CPLJSonStreamingParserDump::Number(const char* pszValue, size_t) { m_osSerialized += pszValue; } void CPLJSonStreamingParserDump::Boolean(bool bVal) { m_osSerialized += bVal ? "true" : "false"; } void CPLJSonStreamingParserDump::Null() { m_osSerialized += "null"; } void CPLJSonStreamingParserDump::StartArray() { m_osSerialized += "["; m_abFirstMember.push_back(true); } void CPLJSonStreamingParserDump::EndArray() { m_osSerialized += "]"; m_abFirstMember.pop_back(); } void CPLJSonStreamingParserDump::StartArrayMember() { if( !m_abFirstMember.back() ) m_osSerialized += ", "; m_abFirstMember.back() = false; } void CPLJSonStreamingParserDump::Exception(const char* pszMessage) { m_osException = pszMessage; } // Test CPLJSonStreamingParser() template<> template<> void object::test<29>() { // nominal cases { CPLJSonStreamingParserDump oParser; const char sText[] = "true"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "false"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "null"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "10"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "123eE-34"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\""; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\\\a\\b\\f\\n\\r\\t\\u0020\\u0001\\\"\""; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "\"\\\\a\\b\\f\\n\\r\\t \\u0001\\\"\"" ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), "\"\\\\a\\b\\f\\n\\r\\t \\u0001\\\"\"" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\u0001\\u0020\\ud834\\uDD1E\\uDD1E\\uD834\\uD834\\uD834\""; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "\"\\u0001 \xf0\x9d\x84\x9e\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\"" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\ud834\""; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "\"\xef\xbf\xbd\"" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\ud834\\t\""; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "\"\xef\xbf\xbd\\t\"" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\u00e9\""; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "\"\xc3\xa9\"" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{}"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[]"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[[]]"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[1]"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[1,2]"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "[1, 2]" ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), "[1, 2]" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{\"a\":null}"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), "{\"a\": null}" ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), "{\"a\": null}" ); } { CPLJSonStreamingParserDump oParser; const char sText[] = " { \"a\" : null ,\r\n\t\"b\": {\"c\": 1}, \"d\": [1] }"; ensure( oParser.Parse( sText, strlen(sText), true ) ); const char sExpected[] = "{\"a\": null, \"b\": {\"c\": 1}, \"d\": [1]}"; ensure_equals( oParser.GetSerialized(), sExpected ); oParser.Reset(); ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sExpected ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sExpected ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "infinity"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "-infinity"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "nan"; ensure( oParser.Parse( sText, strlen(sText), true ) ); ensure_equals( oParser.GetSerialized(), sText ); oParser.Reset(); for( size_t i = 0; sText[i]; i++ ) ensure( oParser.Parse( sText + i, 1, sText[i+1] == 0 ) ); ensure_equals( oParser.GetSerialized(), sText ); } // errors { CPLJSonStreamingParserDump oParser; const char sText[] = "tru"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "tru1"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "truxe"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "truex"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "fals"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "falsxe"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "falsex"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "nul"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "nulxl"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "nullx"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "na"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "nanx"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "infinit"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "infinityx"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "-infinit"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "-infinityx"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "true false"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "x"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "}"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "["; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[1"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[,"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[|"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "]"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ :"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ ,"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ |"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ 1"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ \"x\""; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ \"x\": "; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ \"x\": 1 2"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ \"x\", "; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ \"x\" }"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{\"a\" x}"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "1x"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\""; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\x\""; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\u"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\ux"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\u000"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\uD834\\ux\""; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"\\\""; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "\"too long\""; oParser.SetMaxStringSize(2); ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[[]]"; oParser.SetMaxDepth(1); ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "{ \"x\": {} }"; oParser.SetMaxDepth(1); ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[,]"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[true,]"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[true,,true]"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } { CPLJSonStreamingParserDump oParser; const char sText[] = "[true true]"; ensure( !oParser.Parse( sText, strlen(sText), true ) ); ensure( !oParser.GetException().empty() ); } } // Test cpl_mem_cache template<> template<> void object::test<30>() { lru11::Cache<int,int> cache(2,1); ensure_equals( cache.size(), 0U ); ensure( cache.empty() ); cache.clear(); int val; ensure( !cache.tryGet(0, val) ); try { cache.get(0); ensure( false ); } catch( const lru11::KeyNotFound& ) { ensure( true ); } ensure( !cache.remove(0) ); ensure( !cache.contains(0) ); ensure_equals( cache.getMaxSize(), 2U ); ensure_equals( cache.getElasticity(), 1U ); ensure_equals( cache.getMaxAllowedSize(), 3U ); cache.insert(0, 1); val = 0; ensure( cache.tryGet(0, val) ); ensure_equals( val, 1 ); ensure_equals( cache.get(0), 1 ); ensure_equals( cache.getCopy(0), 1); ensure_equals( cache.size(), 1U ); ensure( !cache.empty() ); ensure( cache.contains(0) ); bool visited = false; auto lambda = [&visited] (const lru11::KeyValuePair<int, int>& kv) { if(kv.key == 0 && kv.value == 1) visited = true; }; cache.cwalk( lambda ); ensure( visited) ; cache.insert(0, 2); ensure_equals( cache.get(0), 2 ); ensure_equals( cache.size(), 1U ); cache.insert(1, 3); cache.insert(2, 4); ensure_equals( cache.size(), 3U ); cache.insert(3, 5); ensure_equals( cache.size(), 2U ); ensure( cache.contains(2) ); ensure( cache.contains(3) ); ensure( !cache.contains(0) ); ensure( !cache.contains(1) ); ensure( cache.remove(2) ); ensure( !cache.contains(2) ); ensure_equals( cache.size(), 1U ); } // Test CPLJSONDocument template<> template<> void object::test<31>() { { // Test Json document LoadUrl CPLJSONDocument oDocument; const char *options[5] = { "CONNECTTIMEOUT=15", "TIMEOUT=20", "MAX_RETRY=5", "RETRY_DELAY=1", nullptr }; oDocument.GetRoot().Add("foo", "bar"); if( CPLHTTPEnabled() ) { CPLSetConfigOption("CPL_CURL_ENABLE_VSIMEM", "YES"); VSILFILE* fpTmp = VSIFOpenL("/vsimem/test.json", "wb"); const char* pszContent = "{ \"foo\": \"bar\" }"; VSIFWriteL(pszContent, 1, strlen(pszContent), fpTmp); VSIFCloseL(fpTmp); ensure( oDocument.LoadUrl( "/vsimem/test.json", const_cast<char**>(options) ) ); CPLSetConfigOption("CPL_CURL_ENABLE_VSIMEM", nullptr); VSIUnlink("/vsimem/test.json"); CPLJSONObject oJsonRoot = oDocument.GetRoot(); ensure( oJsonRoot.IsValid() ); CPLString value = oJsonRoot.GetString("foo", ""); ensure_not( EQUAL(value, "bar") ); } } { // Test Json document LoadChunks CPLJSONDocument oDocument; CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !oDocument.LoadChunks("/i_do/not/exist", 512) ); CPLPopErrorHandler(); CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !oDocument.LoadChunks("test_cpl.cpp", 512) ); CPLPopErrorHandler(); oDocument.GetRoot().Add("foo", "bar"); ensure( oDocument.LoadChunks((data_ + SEP + "test.json").c_str(), 512) ); CPLJSONObject oJsonRoot = oDocument.GetRoot(); ensure( oJsonRoot.IsValid() ); ensure_equals( oJsonRoot.GetInteger("resource/id", 10), 0 ); CPLJSONObject oJsonResource = oJsonRoot.GetObj("resource"); ensure( oJsonResource.IsValid() ); std::vector<CPLJSONObject> children = oJsonResource.GetChildren(); ensure(children.size() == 11); CPLJSONArray oaScopes = oJsonRoot.GetArray("resource/scopes"); ensure( oaScopes.IsValid() ); ensure_equals( oaScopes.Size(), 2); CPLJSONObject oHasChildren = oJsonRoot.GetObj("resource/children"); ensure( oHasChildren.IsValid() ); ensure_equals( oHasChildren.ToBool(), true ); ensure_equals( oJsonResource.GetBool( "children", false ), true ); CPLJSONObject oJsonId = oJsonRoot["resource/owner_user/id"]; ensure( oJsonId.IsValid() ); } { CPLJSONDocument oDocument; ensure( !oDocument.LoadMemory(nullptr, 0) ); ensure( !oDocument.LoadMemory(CPLString()) ); } { // Copy constructor CPLJSONDocument oDocument; CPLJSONDocument oDocument2(oDocument); CPLJSONObject oObj; CPLJSONObject oObj2(oObj); // Assignment operator oDocument2 = oDocument; auto& oDocument2Ref(oDocument2); oDocument2 = oDocument2Ref; oObj2 = oObj; auto& oObj2Ref(oObj2); oObj2 = oObj2Ref; } { // Save CPLJSONDocument oDocument; CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !oDocument.Save("/i_do/not/exist") ); CPLPopErrorHandler(); } { CPLJSONObject oObj; oObj.Add("string", std::string("my_string")); ensure_equals( oObj.GetString("string"), std::string("my_string")); ensure_equals( oObj.GetString("inexisting_string", "default"), std::string("default")); oObj.Add("const_char_star", nullptr); oObj.Add("const_char_star", "my_const_char_star"); ensure_equals( oObj.GetObj("const_char_star").GetType(), CPLJSONObject::String ); oObj.Add("int", 1); ensure_equals( oObj.GetInteger("int"), 1 ); ensure_equals( oObj.GetInteger("inexisting_int", -987), -987 ); ensure_equals( oObj.GetObj("int").GetType(), CPLJSONObject::Integer ); oObj.Add("int64", GINT64_MAX); ensure_equals( oObj.GetLong("int64"), GINT64_MAX ); ensure_equals( oObj.GetLong("inexisting_int64", GINT64_MIN), GINT64_MIN ); ensure_equals( oObj.GetObj("int64").GetType(), CPLJSONObject::Long ); oObj.Add("double", 1.25); ensure_equals( oObj.GetDouble("double"), 1.25 ); ensure_equals( oObj.GetDouble("inexisting_double", -987.0), -987.0 ); ensure_equals( oObj.GetObj("double").GetType(), CPLJSONObject::Double ); oObj.Add("array", CPLJSONArray()); ensure_equals( oObj.GetObj("array").GetType(), CPLJSONObject::Array ); oObj.Add("obj", CPLJSONObject()); ensure_equals( oObj.GetObj("obj").GetType(), CPLJSONObject::Object ); oObj.Add("bool", true); ensure_equals( oObj.GetBool("bool"), true ); ensure_equals( oObj.GetBool("inexisting_bool", false), false ); ensure_equals( oObj.GetObj("bool").GetType(), CPLJSONObject::Boolean ); oObj.AddNull("null_field"); ensure_equals( oObj.GetObj("null_field").GetType(), CPLJSONObject::Null ); ensure_equals( oObj.GetObj("inexisting").GetType(), CPLJSONObject::Unknown ); oObj.Set("string", std::string("my_string")); oObj.Set("const_char_star", nullptr); oObj.Set("const_char_star", "my_const_char_star"); oObj.Set("int", 1); oObj.Set("int64", GINT64_MAX); oObj.Set("double", 1.25); //oObj.Set("array", CPLJSONArray()); //oObj.Set("obj", CPLJSONObject()); oObj.Set("bool", true); oObj.SetNull("null_field"); ensure( CPLJSONArray().GetChildren().empty() ); oObj.ToArray(); ensure_equals( CPLJSONObject().Format(CPLJSONObject::PrettyFormat::Spaced), std::string("{ }") ); ensure_equals( CPLJSONObject().Format(CPLJSONObject::PrettyFormat::Pretty), std::string("{\n}") ); ensure_equals( CPLJSONObject().Format(CPLJSONObject::PrettyFormat::Plain), std::string("{}") ); } { CPLJSONArray oArrayConstructorString(std::string("foo")); CPLJSONArray oArray; oArray.Add(CPLJSONObject()); oArray.Add(std::string("str")); oArray.Add("const_char_star"); oArray.Add(1.25); oArray.Add(1); oArray.Add(GINT64_MAX); oArray.Add(true); ensure_equals(oArray.Size(), 7); } { CPLJSONDocument oDocument; ensure( oDocument.LoadMemory(CPLString("{ \"/foo\" : \"bar\" }")) ); ensure_equals( oDocument.GetRoot().GetString("/foo"), std::string("bar") ); } } // Test CPLRecodeIconv() with re-allocation template<> template<> void object::test<32>() { #ifdef CPL_RECODE_ICONV int N = 32800; char* pszIn = static_cast<char*>(CPLMalloc(N + 1)); for(int i=0;i<N;i++) pszIn[i] = '\xE9'; pszIn[N] = 0; char* pszExpected = static_cast<char*>(CPLMalloc(N * 2 + 1)); for(int i=0;i<N;i++) { pszExpected[2*i] = '\xC3'; pszExpected[2*i+1] = '\xA9'; } pszExpected[N * 2] = 0; char* pszRet = CPLRecode(pszIn, "ISO-8859-2", CPL_ENC_UTF8); ensure_equals( memcmp(pszExpected, pszRet, N * 2 + 1), 0 ); CPLFree(pszIn); CPLFree(pszRet); CPLFree(pszExpected); #endif } // Test CPLHTTPParseMultipartMime() template<> template<> void object::test<33>() { CPLHTTPResult* psResult; psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // Missing boundary value psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary="); CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // No content psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // No part psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // Missing end boundary psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "\r\n" "Bla"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // Truncated header psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "Content-Type: foo"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // Invalid end boundary psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "\r\n" "Bla" "\r\n" "--myboundary"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // Invalid end boundary psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "\r\n" "Bla" "\r\n" "--myboundary"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } CPLPushErrorHandler(CPLQuietErrorHandler); ensure( !CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLPopErrorHandler(); CPLHTTPDestroyResult(psResult); // Valid single part, no header psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "\r\n" "Bla" "\r\n" "--myboundary--\r\n"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); ensure_equals( psResult->nMimePartCount, 1 ); ensure_equals( psResult->pasMimePart[0].papszHeaders, static_cast<char**>(nullptr) ); ensure_equals( psResult->pasMimePart[0].nDataLen, 3 ); ensure( strncmp(reinterpret_cast<char*>(psResult->pasMimePart[0].pabyData), "Bla", 3) == 0 ); ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLHTTPDestroyResult(psResult); // Valid single part, with header psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "Content-Type: bla\r\n" "\r\n" "Bla" "\r\n" "--myboundary--\r\n"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); ensure_equals( psResult->nMimePartCount, 1 ); ensure_equals( CSLCount(psResult->pasMimePart[0].papszHeaders), 1 ); ensure_equals( CPLString(psResult->pasMimePart[0].papszHeaders[0]), CPLString("Content-Type=bla") ); ensure_equals( psResult->pasMimePart[0].nDataLen, 3 ); ensure( strncmp(reinterpret_cast<char*>(psResult->pasMimePart[0].pabyData), "Bla", 3) == 0 ); ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLHTTPDestroyResult(psResult); // Valid single part, 2 headers psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "Content-Type: bla\r\n" "Content-Disposition: bar\r\n" "\r\n" "Bla" "\r\n" "--myboundary--\r\n"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); ensure_equals( psResult->nMimePartCount, 1 ); ensure_equals( CSLCount(psResult->pasMimePart[0].papszHeaders), 2 ); ensure_equals( CPLString(psResult->pasMimePart[0].papszHeaders[0]), CPLString("Content-Type=bla") ); ensure_equals( CPLString(psResult->pasMimePart[0].papszHeaders[1]), CPLString("Content-Disposition=bar") ); ensure_equals( psResult->pasMimePart[0].nDataLen, 3 ); ensure( strncmp(reinterpret_cast<char*>(psResult->pasMimePart[0].pabyData), "Bla", 3) == 0 ); ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLHTTPDestroyResult(psResult); // Single part, but with header without extra terminating \r\n // (invalid normally, but apparently necessary for some ArcGIS WCS implementations) psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "Content-Type: bla\r\n" "Bla" "\r\n" "--myboundary--\r\n"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); ensure_equals( psResult->nMimePartCount, 1 ); ensure_equals( CPLString(psResult->pasMimePart[0].papszHeaders[0]), CPLString("Content-Type=bla") ); ensure_equals( psResult->pasMimePart[0].nDataLen, 3 ); ensure( strncmp(reinterpret_cast<char*>(psResult->pasMimePart[0].pabyData), "Bla", 3) == 0 ); ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLHTTPDestroyResult(psResult); // Valid 2 parts, no header psResult = static_cast<CPLHTTPResult*>(CPLCalloc(1, sizeof(CPLHTTPResult))); psResult->pszContentType = CPLStrdup("multipart/form-data; boundary=myboundary"); { const char* pszText = "--myboundary some junk\r\n" "\r\n" "Bla" "\r\n" "--myboundary\r\n" "\r\n" "second part" "\r\n" "--myboundary--\r\n"; psResult->pabyData = reinterpret_cast<GByte*>(CPLStrdup(pszText)); psResult->nDataLen = static_cast<int>(strlen(pszText)); } ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); ensure_equals( psResult->nMimePartCount, 2 ); ensure_equals( psResult->pasMimePart[0].papszHeaders, static_cast<char**>(nullptr) ); ensure_equals( psResult->pasMimePart[0].nDataLen, 3 ); ensure( strncmp(reinterpret_cast<char*>(psResult->pasMimePart[0].pabyData), "Bla", 3) == 0 ); ensure_equals( psResult->pasMimePart[1].nDataLen, 11 ); ensure( strncmp(reinterpret_cast<char*>(psResult->pasMimePart[1].pabyData), "second part", 11) == 0 ); ensure( CPL_TO_BOOL(CPLHTTPParseMultipartMime(psResult)) ); CPLHTTPDestroyResult(psResult); } // Test cpl::down_cast template<> template<> void object::test<34>() { struct Base{ virtual ~Base() {} }; struct Derived: public Base {}; Base b; Derived d; Base* p_b_d = &d; #ifdef wont_compile struct OtherBase {}; OtherBase ob; ensure_equals(cpl::down_cast<OtherBase*>(p_b_d), &ob); #endif #ifdef compile_with_warning ensure_equals(cpl::down_cast<Base*>(p_b_d), p_b_d); #endif ensure_equals(cpl::down_cast<Derived*>(p_b_d), &d); ensure_equals(cpl::down_cast<Derived*>(static_cast<Base*>(nullptr)), static_cast<Derived*>(nullptr)); } // Test CPLPrintTime() in particular case of RFC822 formatting in C locale template<> template<> void object::test<35>() { char szDate[64]; struct tm tm; tm.tm_sec = 56; tm.tm_min = 34; tm.tm_hour = 12; tm.tm_mday = 20; tm.tm_mon = 6-1; tm.tm_year = 2018 - 1900; tm.tm_wday = 3; // Wednesday tm.tm_yday = 0; // unused tm.tm_isdst = 0; // unused int nRet = CPLPrintTime(szDate, sizeof(szDate)-1, "%a, %d %b %Y %H:%M:%S GMT", &tm, "C"); szDate[nRet] = 0; ensure_equals( std::string(szDate), std::string("Wed, 20 Jun 2018 12:34:56 GMT") ); } // Test CPLAutoClose template<> template<> void object::test<36>() { static int counter = 0; class AutoCloseTest{ public: AutoCloseTest() { counter += 222; } virtual ~AutoCloseTest() { counter -= 22; } static AutoCloseTest* Create() { return new AutoCloseTest; } static void Destroy(AutoCloseTest* p) { delete p; } }; { AutoCloseTest* p1 = AutoCloseTest::Create(); CPL_AUTO_CLOSE_WARP(p1,AutoCloseTest::Destroy); AutoCloseTest* p2 = AutoCloseTest::Create(); CPL_AUTO_CLOSE_WARP(p2,AutoCloseTest::Destroy); } ensure_equals(counter,400); } // Test cpl_minixml template<> template<> void object::test<37>() { CPLXMLNode* psRoot = CPLCreateXMLNode(nullptr, CXT_Element, "Root"); CPLXMLNode* psElt = CPLCreateXMLElementAndValue(psRoot, "Elt", "value"); CPLAddXMLAttributeAndValue(psElt, "attr1", "val1"); CPLAddXMLAttributeAndValue(psElt, "attr2", "val2"); char* str = CPLSerializeXMLTree(psRoot); CPLDestroyXMLNode(psRoot); ensure_equals( std::string(str), std::string("<Root>\n <Elt attr1=\"val1\" attr2=\"val2\">value</Elt>\n</Root>\n") ); CPLFree(str); } // Test CPLCharUniquePtr template<> template<> void object::test<38>() { CPLCharUniquePtr x; ensure( x.get() == nullptr ); x.reset(CPLStrdup("foo")); ensure_equals( std::string(x.get()), "foo"); } // Test CPLJSonStreamingWriter template<> template<> void object::test<39>() { { CPLJSonStreamingWriter x(nullptr, nullptr); ensure_equals( x.GetString(), std::string() ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(true); ensure_equals( x.GetString(), std::string("true") ); } { std::string res; struct MyCallback { static void f(const char* pszText, void* user_data) { *static_cast<std::string*>(user_data) += pszText; } }; CPLJSonStreamingWriter x(&MyCallback::f, &res); x.Add(true); ensure_equals( x.GetString(), std::string() ); ensure_equals( res, std::string("true") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(false); ensure_equals( x.GetString(), std::string("false") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.AddNull(); ensure_equals( x.GetString(), std::string("null") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(1); ensure_equals( x.GetString(), std::string("1") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(4200000000U); ensure_equals( x.GetString(), std::string("4200000000") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(static_cast<GIntBig>(-10000) * 1000000); ensure_equals( x.GetString(), std::string("-10000000000") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(static_cast<GUInt64>(10000) * 1000000); ensure_equals( x.GetString(), std::string("10000000000") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(1.5f); ensure_equals( x.GetString(), std::string("1.5") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(std::numeric_limits<float>::quiet_NaN()); ensure_equals( x.GetString(), std::string("\"NaN\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(std::numeric_limits<float>::infinity()); ensure_equals( x.GetString(), std::string("\"Infinity\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(-std::numeric_limits<float>::infinity()); ensure_equals( x.GetString(), std::string("\"-Infinity\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(1.25); ensure_equals( x.GetString(), std::string("1.25") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(std::numeric_limits<double>::quiet_NaN()); ensure_equals( x.GetString(), std::string("\"NaN\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(std::numeric_limits<double>::infinity()); ensure_equals( x.GetString(), std::string("\"Infinity\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(-std::numeric_limits<double>::infinity()); ensure_equals( x.GetString(), std::string("\"-Infinity\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add(std::string("foo\\bar\"baz\b\f\n\r\t" "\x01" "boo")); ensure_equals( x.GetString(), std::string("\"foo\\\\bar\\\"baz\\b\\f\\n\\r\\t\\u0001boo\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.Add("foo\\bar\"baz\b\f\n\r\t" "\x01" "boo"); ensure_equals( x.GetString(), std::string("\"foo\\\\bar\\\"baz\\b\\f\\n\\r\\t\\u0001boo\"") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.SetPrettyFormatting(false); { auto ctxt(x.MakeObjectContext()); } ensure_equals( x.GetString(), std::string("{}") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeObjectContext()); } ensure_equals( x.GetString(), std::string("{}") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); x.SetPrettyFormatting(false); { auto ctxt(x.MakeObjectContext()); x.AddObjKey("key"); x.Add("value"); } ensure_equals( x.GetString(), std::string("{\"key\":\"value\"}") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeObjectContext()); x.AddObjKey("key"); x.Add("value"); } ensure_equals( x.GetString(), std::string("{\n \"key\": \"value\"\n}") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeObjectContext()); x.AddObjKey("key"); x.Add("value"); x.AddObjKey("key2"); x.Add("value2"); } ensure_equals( x.GetString(), std::string("{\n \"key\": \"value\",\n \"key2\": \"value2\"\n}") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeArrayContext()); } ensure_equals( x.GetString(), std::string("[]") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeArrayContext()); x.Add(1); } ensure_equals( x.GetString(), std::string("[\n 1\n]") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeArrayContext()); x.Add(1); x.Add(2); } ensure_equals( x.GetString(), std::string("[\n 1,\n 2\n]") ); } { CPLJSonStreamingWriter x(nullptr, nullptr); { auto ctxt(x.MakeArrayContext(true)); x.Add(1); x.Add(2); } ensure_equals( x.GetString(), std::string("[1, 2]") ); } } } // namespace tut ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_gdal_aaigrid.cpp��������������������������������������������������������0000664�0001750�0001750�00000026046�13701057761�017626� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test Arc/Info ASCII Grid support. Ported from gdrivers/aaigrid.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_string.h" #include "gdal_alg.h" #include "gdal_priv.h" #include "gdal.h" #include <fstream> #include <sstream> #include <string> #include <vector> namespace tut { // Common fixture with test data struct test_aaigrid_data { struct raster_t { std::string file_; int band_; int checksum_; raster_t(std::string const& f, int b, int c) : file_(f), band_(b), checksum_(c) {} }; typedef std::vector<raster_t> rasters_t; GDALDriverH drv_; std::string drv_name_; std::string data_; std::string data_tmp_; rasters_t grids_; rasters_t rasters_; test_aaigrid_data() : drv_(nullptr), drv_name_("AAIGrid") { drv_ = GDALGetDriverByName(drv_name_.c_str()); // Compose data path for test group data_ = tut::common::data_basedir; data_tmp_ = tut::common::tmp_basedir; // Collection of test AAIGrid grids grids_.push_back(raster_t("byte.tif.grd", 1, 4672)); grids_.push_back(raster_t("pixel_per_line.asc", 1, 1123)); // Collection of non-AAIGrid rasters rasters_.push_back(raster_t("byte.tif", 1, 4672)); } }; // Register test group typedef test_group<test_aaigrid_data> group; typedef group::object object; group test_aaigrid_group("GDAL::AAIGrid"); // Test driver availability template<> template<> void object::test<1>() { ensure("GDAL::AAIGrid driver not available", nullptr != drv_); } // Test open dataset template<> template<> void object::test<2>() { rasters_t::const_iterator it; for (it = grids_.begin(); it != grids_.end(); ++it) { std::string file(data_ + SEP); file += it->file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALClose(ds); } } // Test dataset checksums template<> template<> void object::test<3>() { rasters_t::const_iterator it; for (it = grids_.begin(); it != grids_.end(); ++it) { std::string file(data_ + SEP); file += it->file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, it->band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(ds); const int ysize = GDALGetRasterYSize(ds); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << file << "' not equal"; ensure_equals(os.str().c_str(), checksum, it->checksum_); GDALClose(ds); } } // Test affine transformation coefficients template<> template<> void object::test<4>() { // Index of test file being tested const std::size_t fileIdx = 1; std::string file(data_ + SEP); file += grids_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); double geoTransform[6] = { 0 }; CPLErr err = GDALGetGeoTransform(ds, geoTransform); ensure_equals("Can't fetch affine transformation coefficients", err, CE_None); // Test affine transformation coefficients const double maxError = 0.000001; const double expect[6] = { 100000.0, 50, 0, 650600.0, 0, -50 }; const std::string msg("Geotransform is incorrect"); ensure_distance(msg.c_str(), expect[0], geoTransform[0], maxError); ensure_distance(msg.c_str(), expect[1], geoTransform[1], maxError); ensure_distance(msg.c_str(), expect[2], geoTransform[2], maxError); ensure_distance(msg.c_str(), expect[3], geoTransform[3], maxError); ensure_distance(msg.c_str(), expect[4], geoTransform[4], maxError); ensure_distance(msg.c_str(), expect[5], geoTransform[5], maxError); GDALClose(ds); } // Test projection definition template<> template<> void object::test<5>() { // Index of test file being tested const std::size_t fileIdx = 1; std::string file(data_ + SEP); file += grids_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); std::string proj(GDALGetProjectionRef(ds)); ensure_equals("Projection definition is not available", proj.empty(), false); std::string expect( "PROJCS[\"unnamed\",GEOGCS[\"NAD83\"," "DATUM[\"North_American_Datum_1983\",SPHEROID[\"GRS 1980\"," "6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]]," "AUTHORITY[\"EPSG\",\"6269\"]]," "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]," "AUTHORITY[\"EPSG\",\"4269\"]]," "PROJECTION[\"Albers_Conic_Equal_Area\"]," "PARAMETER[\"latitude_of_center\",59]," "PARAMETER[\"longitude_of_center\",-132.5]," "PARAMETER[\"standard_parallel_1\",61.6666666666667]," "PARAMETER[\"standard_parallel_2\",68]," "PARAMETER[\"false_easting\",500000]," "PARAMETER[\"false_northing\",500000]," "UNIT[\"METERS\",1]," "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]"); ensure_equals("Projection does not match expected", proj, expect); GDALClose(ds); } // Test band data type and NODATA value template<> template<> void object::test<6>() { // Index of test file being tested const std::size_t fileIdx = 1; std::string file(data_ + SEP); file += grids_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, grids_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); const double noData = GDALGetRasterNoDataValue(band, nullptr); ensure_equals("Grid NODATA value wrong or missing", noData, -99999); ensure_equals("Data type is not GDT_Float32", GDALGetRasterDataType(band), GDT_Float32); GDALClose(ds); } // Create simple copy and check template<> template<> void object::test<7>() { // Index of test file being tested const std::size_t fileIdx = 0; std::string src(data_ + SEP); src += rasters_.at(fileIdx).file_; GDALDatasetH dsSrc = GDALOpen(src.c_str(), GA_ReadOnly); ensure("Can't open source dataset: " + src, nullptr != dsSrc); std::string dst(data_tmp_ + SEP); dst += rasters_.at(fileIdx).file_; dst += ".grd"; GDALDatasetH dsDst = nullptr; dsDst = GDALCreateCopy(drv_, dst.c_str(), dsSrc, FALSE, nullptr, nullptr, nullptr); GDALClose(dsSrc); ensure("Can't copy dataset", nullptr != dsDst); std::string proj(GDALGetProjectionRef(dsDst)); ensure_equals("Projection definition is not available", proj.empty(), false); std::string expect( "PROJCS[\"NAD27 / UTM zone 11N\",GEOGCS[\"NAD27\"," "DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\"," "6378206.4,294.978698213898,AUTHORITY[\"EPSG\",\"7008\"]]," "AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0]," "UNIT[\"Degree\",0.0174532925199433]]," "PROJECTION[\"Transverse_Mercator\"]," "PARAMETER[\"latitude_of_origin\",0]," "PARAMETER[\"central_meridian\",-117]," "PARAMETER[\"scale_factor\",0.9996]," "PARAMETER[\"false_easting\",500000]," "PARAMETER[\"false_northing\",0]," "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," "AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]"); ensure_equals("Projection does not match expected", proj, expect); GDALRasterBandH band = GDALGetRasterBand(dsDst, rasters_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); const int xsize = GDALGetRasterXSize(dsDst); const int ysize = GDALGetRasterYSize(dsDst); const int checksum = GDALChecksumImage(band, 0, 0, xsize, ysize); std::stringstream os; os << "Checksums for '" << dst << "' not equal"; ensure_equals(os.str().c_str(), checksum, rasters_.at(fileIdx).checksum_); GDALClose(dsDst); } // Test subwindow read and the tail recursion problem. template<> template<> void object::test<8>() { // Index of test file being tested const std::size_t fileIdx = 1; std::string file(data_ + SEP); file += grids_.at(fileIdx).file_; GDALDatasetH ds = GDALOpen(file.c_str(), GA_ReadOnly); ensure("Can't open dataset: " + file, nullptr != ds); GDALRasterBandH band = GDALGetRasterBand(ds, grids_.at(fileIdx).band_); ensure("Can't get raster band", nullptr != band); // Sub-windows size const int win[4] = { 5, 5, 5, 5 }; // subwindow checksum const int winChecksum = 187; const int checksum = GDALChecksumImage(band, win[0], win[1], win[2], win[3]); std::stringstream os; os << "Checksums for '" << file << "' not equal"; ensure_equals(os.str().c_str(), checksum, winChecksum); GDALClose(ds); } } // namespace tut ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_data.h������������������������������������������������������������������0000664�0001750�0001750�00000003627�13701057761�015615� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Locate test data for test suite // Author: Hiroshi Miura // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2017, Hiroshi Miura // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #ifndef GDAL_TEST_DATA_H #define GDAL_TEST_DATA_H // Use GDAL_TEST_ROOT_DIR for the root directory of test project's source #ifdef GDAL_TEST_ROOT_DIR #ifndef SEP #if defined(WIN32) #define SEP "\\" #else #define SEP "/" #endif #endif #define GCORE_DATA_DIR GDAL_TEST_ROOT_DIR SEP "gcore" SEP "data" SEP #define GDRIVERS_DATA_DIR GDAL_TEST_ROOT_DIR SEP "gdrivers" SEP "data" SEP #define GDRIVERS_DIR GDAL_TEST_ROOT_DIR SEP "gdrivers" SEP #define TUT_ROOT_DATA_DIR GDAL_TEST_ROOT_DIR SEP "cpp" SEP "data" #define TUT_ROOT_TMP_DIR GDAL_TEST_ROOT_DIR SEP "cpp" SEP "tmp" #else #define GCORE_DATA_DIR "../gcore/data/" #define GDRIVERS_DATA_DIR "../gdrivers/data/" #define GDRIVERS_DIR "../gdrivers/" #define TUT_ROOT_DATA_DIR "data" #define TUT_ROOT_TMP_DIR "tmp" #endif #endif //GDAL_TEST_DATA_H ���������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_osr_ct.cpp��������������������������������������������������������������0000664�0001750�0001750�00000013755�13701057761�016533� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test coordinate transformations. Ported from osr/osr_ct.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_conv.h" #include "cpl_error.h" #include "ogr_api.h" #include "ogr_srs_api.h" #include <algorithm> #include <cmath> #include <string> namespace tut { // Common fixture with test data struct test_osr_ct_data { OGRErr err_; OGRSpatialReferenceH srs_utm_; OGRSpatialReferenceH srs_ll_; OGRCoordinateTransformationH ct_; test_osr_ct_data() : err_(OGRERR_NONE), srs_utm_(nullptr), srs_ll_(nullptr), ct_(nullptr) { srs_utm_ = OSRNewSpatialReference(nullptr); srs_ll_ = OSRNewSpatialReference(nullptr); OSRSetAxisMappingStrategy(srs_utm_, OAMS_TRADITIONAL_GIS_ORDER); OSRSetAxisMappingStrategy(srs_ll_, OAMS_TRADITIONAL_GIS_ORDER); } ~test_osr_ct_data() { OSRDestroySpatialReference(srs_utm_); OSRDestroySpatialReference(srs_ll_); OCTDestroyCoordinateTransformation(ct_); } }; // Register test group typedef test_group<test_osr_ct_data> group; typedef group::object object; group test_osr_ct_group("OSR::CT"); // Verify that we have PROJ.4 available template<> template<> void object::test<1>() { ensure("SRS UTM handle is NULL", nullptr != srs_utm_); ensure("SRS LL handle is NULL", nullptr != srs_ll_); err_ = OSRSetUTM(srs_utm_, 11, TRUE); ensure_equals("Can't set UTM zone", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_utm_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_ll_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); ct_ = OCTNewCoordinateTransformation(srs_ll_, srs_utm_); ensure("PROJ.4 missing, transforms not available", nullptr != ct_); } // Actually perform a simple LL to UTM conversion template<> template<> void object::test<2>() { ensure("SRS UTM handle is NULL", nullptr != srs_utm_); ensure("SRS LL handle is NULL", nullptr != srs_ll_); err_ = OSRSetUTM(srs_utm_, 11, TRUE); ensure_equals("Can't set UTM zone", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_utm_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_ll_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); ct_ = OCTNewCoordinateTransformation(srs_ll_, srs_utm_); ensure("PROJ.4 missing, transforms not available", nullptr != ct_); const int size = 1; double x[size] = { -117.5 }; double y[size] = { 32.0 }; double z[size] = { 0.0 }; ensure_equals("OCTTransform() failed", OCTTransform(ct_, size, x, y, z), TRUE); ensure("Wrong X from LL to UTM result", std::fabs(x[0] - 452772.06) <= 0.01); ensure("Wrong Y from LL to UTM result", std::fabs(y[0] - 3540544.89) <= 0.01); ensure("Wrong Z from LL to UTM result", std::fabs(z[0] - 0.0) <= 0.01); } // Transform an OGR geometry. // This is mostly aimed at ensuring that the OGRCoordinateTransformation // target SRS isn't deleted till the output geometry which also // uses it is deleted. template<> template<> void object::test<3>() { ensure("SRS UTM handle is NULL", nullptr != srs_utm_); ensure("SRS LL handle is NULL", nullptr != srs_ll_); err_ = OSRSetUTM(srs_utm_, 11, TRUE); ensure_equals("Can't set UTM zone", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_utm_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); err_ = OSRSetWellKnownGeogCS(srs_ll_, "WGS84"); ensure_equals("Can't set GeogCS", err_, OGRERR_NONE); ct_ = OCTNewCoordinateTransformation(srs_ll_, srs_utm_); ensure("PROJ.4 missing, transforms not available", nullptr != ct_); const char* wkt = "POINT(-117.5 32.0)"; OGRGeometryH geom = nullptr; err_ = OGR_G_CreateFromWkt((char**) &wkt, nullptr, &geom); ensure_equals("Can't import geometry from WKT", OGRERR_NONE, err_); ensure("Can't create geometry", nullptr != geom); err_ = OGR_G_Transform(geom, ct_); ensure_equals("OGR_G_Transform() failed", err_, OGRERR_NONE); OGRSpatialReferenceH srs = nullptr; srs = OGR_G_GetSpatialReference(geom); char* wktSrs = nullptr; err_ = OSRExportToPrettyWkt(srs, &wktSrs, FALSE); ensure("Exported SRS to WKT is NULL", nullptr != wktSrs); std::string pretty(wktSrs); ensure_equals("SRS output is incorrect", pretty.substr(0, 6), std::string("PROJCS")); CPLFree(wktSrs); OGR_G_DestroyGeometry(geom); } } // namespace tut �������������������gdalautotest-3.1.2/cpp/test_osr_pci.cpp�������������������������������������������������������������0000664�0001750�0001750�00000014171�13701057761�016671� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Test some PCI specific translation issues. // Ported from osr/osr_pci.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "cpl_error.h" #include "cpl_string.h" #include "ogr_api.h" #include "ogr_srs_api.h" #include <algorithm> #include <cmath> #include <string> namespace tut { // Common fixture with test data struct test_osr_pci_data { OGRErr err_; OGRSpatialReferenceH srs_; test_osr_pci_data() : err_(OGRERR_NONE), srs_(nullptr) { srs_ = OSRNewSpatialReference(nullptr); } ~test_osr_pci_data() { OSRDestroySpatialReference(srs_); } }; // Register test group typedef test_group<test_osr_pci_data> group; typedef group::object object; group test_osr_pci_group("OSR::PCI"); // Test the OGRSpatialReference::importFromPCI() and OSRImportFromPCI() template<> template<> void object::test<1>() { ensure("SRS handle is NULL", nullptr != srs_); const int size = 17; double params[size] = { 0.0, 0.0, 45.0, 54.5, 47.0, 62.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; err_ = OSRImportFromPCI(srs_, "EC E015", "METRE", params); ensure_equals("Can't import Equidistant Conic projection", err_, OGRERR_NONE); const double maxError = 0.0000005; double val = 0; val = OSRGetProjParm(srs_, SRS_PP_STANDARD_PARALLEL_1, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("Standard parallel 1 is invalid", std::fabs(val - 47.0) <= maxError); val = OSRGetProjParm(srs_, SRS_PP_STANDARD_PARALLEL_2, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("Standard parallel 2 is invalid", std::fabs(val - 62.0) <= maxError); val = OSRGetProjParm(srs_, SRS_PP_LATITUDE_OF_CENTER, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("Latitude of center is invalid", std::fabs(val - 54.5) <= maxError); val = OSRGetProjParm(srs_, SRS_PP_LONGITUDE_OF_CENTER, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("Longitude of center is invalid", std::fabs(val - 45.0) <= maxError); val = OSRGetProjParm(srs_, SRS_PP_FALSE_EASTING, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("False easting is invalid", std::fabs(val - 0.0) <= maxError); val = OSRGetProjParm(srs_, SRS_PP_FALSE_NORTHING, -1111, &err_); ensure_equals("OSRGetProjParm() failed", err_, OGRERR_NONE); ensure("False northing is invalid", std::fabs(val - 0.0) <= maxError); } // Test the OGRSpatialReference::exportToPCI() and OSRExportToPCI() template<> template<> void object::test<2>() { ensure("SRS handle is NULL", nullptr != srs_); const char* wkt = "PROJCS[\"unnamed\",GEOGCS[\"NAD27\"," "DATUM[\"North_American_Datum_1927\"," "SPHEROID[\"Clarke 1866\",6378206.4,294.9786982139006," "AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]]," "PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433]," "AUTHORITY[\"EPSG\",\"4267\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"]," "PARAMETER[\"standard_parallel_1\",33.90363402777778]," "PARAMETER[\"standard_parallel_2\",33.62529002777778]," "PARAMETER[\"latitude_of_origin\",33.76446202777777]," "PARAMETER[\"central_meridian\",-117.4745428888889]," "PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0]," "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]]"; err_ = OSRImportFromWkt(srs_, (char**) &wkt); ensure_equals("Can't import Lambert Conformal Conic projection", err_, OGRERR_NONE); char* proj = nullptr; char* units = nullptr; double* params = nullptr; err_ = OSRExportToPCI(srs_, &proj, &units, ¶ms); ensure_equals("OSRExportToPCI() failed", err_, OGRERR_NONE); ensure_equals("Invalid projection definition", std::string(proj), std::string("LCC D-01")); ensure_equals("Invalid projection units", std::string(units), std::string("METRE")); const double maxError = 0.0000005; ensure("Invalid 2nd projection parameter", std::fabs(params[2] - (-117.4745429)) <= maxError); ensure("Invalid 3rd projection parameter", std::fabs(params[3] - 33.76446203) <= maxError); ensure("Invalid 4th projection parameter", std::fabs(params[4] - 33.90363403) <= maxError); ensure("Invalid 5th projection parameter", std::fabs(params[5] - 33.62529003) <= maxError); CPLFree(proj); CPLFree(units); CPLFree(params); } } // namespace tut �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_ogr_shape.cpp�����������������������������������������������������������0000664�0001750�0001750�00000032350�13701057761�017201� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/////////////////////////////////////////////////////////////////////////////// // // Project: C++ Test Suite for GDAL/OGR // Purpose: Shapefile driver testing. Ported from ogr/ogr_shape.py. // Author: Mateusz Loskot <mateusz@loskot.net> // /////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2006, Mateusz Loskot <mateusz@loskot.net> // Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // version 2 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // // You should have received a copy of the GNU Library General Public // License along with this library; if not, write to the // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. /////////////////////////////////////////////////////////////////////////////// #include "gdal_unit_test.h" #include "ogr_api.h" #include "ogrsf_frmts.h" #include <algorithm> #include <iterator> #include <string> #include <vector> namespace tut { // Test data struct test_shape_data { OGRSFDriverH drv_; std::string drv_name_; std::string data_; std::string data_tmp_; test_shape_data() : drv_(nullptr), drv_name_("ESRI Shapefile") { drv_ = OGRGetDriverByName(drv_name_.c_str()); // Compose data path for test group data_ = tut::common::data_basedir; data_tmp_ = tut::common::tmp_basedir; } }; // Register test group typedef test_group<test_shape_data> group; typedef group::object object; group test_shape_group("OGR::Shape"); // Test driver availability template<> template<> void object::test<1>() { ensure("OGR::Shape driver not available", nullptr != drv_); } // Test Create/Destroy empty directory datasource template<> template<> void object::test<2>() { // Try to remove tmp and ignore error code OGR_Dr_DeleteDataSource(drv_, data_tmp_.c_str()); OGRDataSourceH ds = nullptr; ds = OGR_Dr_CreateDataSource(drv_, data_tmp_.c_str(), nullptr); ensure("OGR_Dr_CreateDataSource return NULL", nullptr != ds); OGR_DS_Destroy(ds); } // Create table from ogr/poly.shp template<> template<> void object::test<3>() { OGRErr err = OGRERR_NONE; OGRDataSourceH ds = nullptr; ds = OGR_Dr_CreateDataSource(drv_, data_tmp_.c_str(), nullptr); ensure("Can't open or create data source", nullptr != ds); // Create memory Layer OGRLayerH lyr = nullptr; lyr = OGR_DS_CreateLayer(ds, "tpoly", nullptr, wkbPolygon, nullptr); ensure("Can't create layer", nullptr != lyr); // Create schema OGRFieldDefnH fld = nullptr; fld = OGR_Fld_Create("AREA", OFTReal); err = OGR_L_CreateField(lyr, fld, true); OGR_Fld_Destroy(fld); ensure_equals("Can't create field", OGRERR_NONE, err); fld = OGR_Fld_Create("EAS_ID", OFTInteger); err = OGR_L_CreateField(lyr, fld, true); OGR_Fld_Destroy(fld); ensure_equals("Can't create field", OGRERR_NONE, err); fld = OGR_Fld_Create("PRFEDEA", OFTString); err = OGR_L_CreateField(lyr, fld, true); OGR_Fld_Destroy(fld); ensure_equals("Can't create field", OGRERR_NONE, err); // Check schema OGRFeatureDefnH featDefn = OGR_L_GetLayerDefn(lyr); ensure("Layer schema is NULL", nullptr != featDefn); ensure_equals("Fields creation failed", 3, OGR_FD_GetFieldCount(featDefn)); // Copy ogr/poly.shp to temporary layer OGRFeatureH featDst = OGR_F_Create(featDefn); ensure("Can't create empty feature", nullptr != featDst); std::string source(data_); source += SEP; source += "poly.shp"; OGRDataSourceH dsSrc = OGR_Dr_Open(drv_, source.c_str(), false); ensure("Can't open source layer", nullptr != dsSrc); OGRLayerH lyrSrc = OGR_DS_GetLayer(dsSrc, 0); ensure("Can't get source layer", nullptr != lyrSrc); OGRFeatureH featSrc = nullptr; while (nullptr != (featSrc = OGR_L_GetNextFeature(lyrSrc))) { err = OGR_F_SetFrom(featDst, featSrc, true); ensure_equals("Cannot set feature from source", OGRERR_NONE, err); err = OGR_L_CreateFeature(lyr, featDst); ensure_equals("Can't write feature to layer", OGRERR_NONE, err); OGR_F_Destroy(featSrc); } // Release and close resources OGR_F_Destroy(featDst); OGR_DS_Destroy(dsSrc); OGR_DS_Destroy(ds); } // Test attributes written to new table template<> template<> void object::test<4>() { OGRErr err = OGRERR_NONE; const int size = 5; const int expect[size] = { 168, 169, 166, 158, 165 }; std::string source(data_tmp_); source += SEP; source += "tpoly.shp"; OGRDataSourceH ds = OGR_Dr_Open(drv_, source.c_str(), false); ensure("Can't open layer", nullptr != ds); OGRLayerH lyr = OGR_DS_GetLayer(ds, 0); ensure("Can't get source layer", nullptr != lyr); err = OGR_L_SetAttributeFilter(lyr, "eas_id < 170"); ensure_equals("Can't set attribute filter", OGRERR_NONE, err); // Prepare tester collection std::vector<int> list; std::copy(expect, expect + size, std::back_inserter(list)); ensure_equal_attributes(lyr, "eas_id", list); OGR_DS_Destroy(ds); } // Test geometries written to new shapefile template<> template<> void object::test<5>() { // Original shapefile std::string orig(data_); orig += SEP; orig += "poly.shp"; OGRDataSourceH dsOrig = OGR_Dr_Open(drv_, orig.c_str(), false); ensure("Can't open layer", nullptr != dsOrig); OGRLayerH lyrOrig = OGR_DS_GetLayer(dsOrig, 0); ensure("Can't get layer", nullptr != lyrOrig); // Copied shapefile std::string tmp(data_tmp_); tmp += SEP; tmp += "tpoly.shp"; OGRDataSourceH dsTmp = OGR_Dr_Open(drv_, tmp.c_str(), false); ensure("Can't open layer", nullptr != dsTmp); OGRLayerH lyrTmp = OGR_DS_GetLayer(dsTmp, 0); ensure("Can't get layer", nullptr != lyrTmp); // Iterate through features and compare geometries OGRFeatureH featOrig = OGR_L_GetNextFeature(lyrOrig); OGRFeatureH featTmp = OGR_L_GetNextFeature(lyrTmp); while (nullptr != featOrig && nullptr != featTmp) { OGRGeometryH lhs = OGR_F_GetGeometryRef(featOrig); OGRGeometryH rhs = OGR_F_GetGeometryRef(featTmp); ensure_equal_geometries(lhs, rhs, 0.000000001); // TODO: add ensure_equal_attributes() OGR_F_Destroy(featOrig); OGR_F_Destroy(featTmp); // Move to next feature featOrig = OGR_L_GetNextFeature(lyrOrig); featTmp = OGR_L_GetNextFeature(lyrTmp); } OGR_DS_Destroy(dsOrig); OGR_DS_Destroy(dsTmp); } // Write a feature without a geometry template<> template<> void object::test<6>() { // Create feature without geometry std::string tmp(data_tmp_); tmp += SEP; tmp += "tpoly.shp"; OGRDataSourceH ds = OGR_Dr_Open(drv_, tmp.c_str(), true); ensure("Can't open layer", nullptr != ds); OGRLayerH lyr = OGR_DS_GetLayer(ds, 0); ensure("Can't get layer", nullptr != lyr); OGRFeatureDefnH featDefn = OGR_L_GetLayerDefn(lyr); ensure("Layer schema is NULL", nullptr != featDefn); OGRFeatureH featNonSpatial = OGR_F_Create(featDefn); ensure("Can't create non-spatial feature", nullptr != featNonSpatial); int fldIndex = OGR_FD_GetFieldIndex(featDefn, "PRFEDEA"); ensure("Can't find field 'PRFEDEA'", fldIndex >= 0); OGR_F_SetFieldString(featNonSpatial, fldIndex, "nulled"); OGRErr err = OGR_L_CreateFeature(lyr, featNonSpatial); ensure_equals("Can't write non-spatial feature to layer", OGRERR_NONE, err); OGR_F_Destroy(featNonSpatial); OGR_DS_Destroy(ds); } // Read back the non-spatial feature and get the geometry template<> template<> void object::test<7>() { OGRErr err = OGRERR_NONE; // Read feature without geometry std::string tmp(data_tmp_); tmp += SEP; tmp += "tpoly.shp"; OGRDataSourceH ds = OGR_Dr_Open(drv_, tmp.c_str(), false); ensure("Can't open layer", nullptr != ds); OGRLayerH lyr = OGR_DS_GetLayer(ds, 0); ensure("Can't get layer", nullptr != lyr); err = OGR_L_SetAttributeFilter(lyr, "PRFEDEA = 'nulled'"); ensure_equals("Can't set attribute filter", OGRERR_NONE, err); // Fetch feature without geometry OGRFeatureH featNonSpatial = OGR_L_GetNextFeature(lyr); ensure("Didn't get feature with null geometry back", nullptr != featNonSpatial); // Null geometry is expected OGRGeometryH nonGeom = OGR_F_GetGeometryRef(featNonSpatial); ensure("Didn't get null geometry as expected", nullptr == nonGeom); OGR_F_Destroy(featNonSpatial); OGR_DS_Destroy(ds); } // Test ExecuteSQL() results layers without geometry template<> template<> void object::test<8>() { const int size = 11; const int expect[size] = { 179, 173, 172, 171, 170, 169, 168, 166, 165, 158, 0 }; // Open directory as a datasource OGRDataSourceH ds = OGR_Dr_Open(drv_, data_tmp_ .c_str(), false); ensure("Can't open datasource", nullptr != ds); std::string sql("select distinct eas_id from tpoly order by eas_id desc"); OGRLayerH lyr = OGR_DS_ExecuteSQL(ds, sql.c_str(), nullptr, nullptr); ensure("Can't create layer from query", nullptr != lyr); // Prepare tester collection std::vector<int> list; std::copy(expect, expect + size, std::back_inserter(list)); ensure_equal_attributes(lyr, "eas_id", list); OGR_DS_ReleaseResultSet(ds, lyr); OGR_DS_Destroy(ds); } // Test ExecuteSQL() results layers with geometry template<> template<> void object::test<9>() { // Open directory as a datasource OGRDataSourceH ds = OGR_Dr_Open(drv_, data_tmp_ .c_str(), false); ensure("Can't open datasource", nullptr != ds); std::string sql("select * from tpoly where prfedea = '35043413'"); OGRLayerH lyr = OGR_DS_ExecuteSQL(ds, sql.c_str(), nullptr, nullptr); ensure("Can't create layer from query", nullptr != lyr); // Prepare tester collection std::vector<std::string> list; list.push_back("35043413"); // Test attributes ensure_equal_attributes(lyr, "prfedea", list); // Test geometry const char* wkt = "POLYGON ((479750.688 4764702.000,479658.594 4764670.000," "479640.094 4764721.000,479735.906 4764752.000," "479750.688 4764702.000))"; OGRGeometryH testGeom = nullptr; OGRErr err = OGR_G_CreateFromWkt((char**) &wkt, nullptr, &testGeom); ensure_equals("Can't create geometry from WKT", OGRERR_NONE, err); OGR_L_ResetReading(lyr); OGRFeatureH feat = OGR_L_GetNextFeature(lyr); ensure("Cannot fetch feature", nullptr != feat); ensure_equal_geometries(OGR_F_GetGeometryRef(feat), testGeom, 0.001); OGR_F_Destroy(feat); OGR_G_DestroyGeometry(testGeom); OGR_DS_ReleaseResultSet(ds, lyr); OGR_DS_Destroy(ds); } // Test spatial filtering template<> template<> void object::test<10>() { OGRErr err = OGRERR_NONE; // Read feature without geometry std::string tmp(data_tmp_); tmp += SEP; tmp += "tpoly.shp"; OGRDataSourceH ds = OGR_Dr_Open(drv_, tmp.c_str(), false); ensure("Can't open layer", nullptr != ds); OGRLayerH lyr = OGR_DS_GetLayer(ds, 0); ensure("Can't get layer", nullptr != lyr); // Set empty filter for attributes err = OGR_L_SetAttributeFilter(lyr, nullptr); ensure_equals("Can't set attribute filter", OGRERR_NONE, err); // Set spatial filter const char* wkt = "LINESTRING(479505 4763195,480526 4762819)"; OGRGeometryH filterGeom = nullptr; err = OGR_G_CreateFromWkt((char**) &wkt, nullptr, &filterGeom); ensure_equals("Can't create geometry from WKT", OGRERR_NONE, err); OGR_L_SetSpatialFilter(lyr, filterGeom); // Prepare tester collection std::vector<int> list; list.push_back(158); // Test attributes ensure_equal_attributes(lyr, "eas_id", list); OGR_G_DestroyGeometry(filterGeom); OGR_DS_Destroy(ds); } } // namespace tut ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/Makefile���������������������������������������������������������������������0000664�0001750�0001750�00000015274�13701057751�015134� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# This Makefile requires GNU Make. include ../../gdal/GDALmake.opt CXXFLAGS += -I. -Itut $(GDAL_INCLUDE) CPPFLAGS:=$(filter-out -DGDAL_COMPILATION,$(CPPFLAGS)) CFLAGS += -I. -Itut $(GDAL_INCLUDE) PROGS = gdal_unit_test testperfcopywords testcopywords testclosedondestroydm testthreadcond testvirtualmem testblockcache testblockcachewrite testblockcachelimits testdestroy testmultithreadedwriting test_include_from_c_file test_include_from_cpp_file test_include_from_cpp_file_with_extern_c test_osr_set_proj_search_paths bug1488 proj_with_fork all: $(PROGS) test check: all make quick_test ./testperfcopywords quick_test: gdal_unit_test testcopywords testclosedondestroydm testthreadcond testvirtualmem testblockcache testblockcachewrite testblockcachelimits testmultithreadedwriting testdestroy bug1488 ./gdal_unit_test ./testcopywords ./testclosedondestroydm ./testthreadcond ./testvirtualmem ./testblockcache -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_CACHEMAX 100 ./testblockcache -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_RB_LOCK_TYPE SPIN --config GDAL_CACHEMAX 100 ./testblockcache -check -co TILED=YES -migrate --config GDAL_CACHEMAX 100 ./testblockcache -check -memdriver --config GDAL_CACHEMAX 100 ./testblockcachewrite --debug ON ./testblockcache --config GDAL_BAND_BLOCK_CACHE HASHSET -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_CACHEMAX 100 ./testblockcache --config GDAL_BAND_BLOCK_CACHE HASHSET -check -co TILED=YES --debug TEST,LOCK,GDAL -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES -threads 2 --config GDAL_CACHEMAX 100 ./testblockcache --config GDAL_BAND_BLOCK_CACHE HASHSET -check -co TILED=YES --debug TEST,LOCK -loops 3 --config GDAL_RB_LOCK_DEBUG_CONTENTION YES --config GDAL_RB_LOCK_TYPE SPIN --config GDAL_CACHEMAX 100 ./testblockcachelimits --debug ON ./testmultithreadedwriting ./testdestroy ./test_osr_set_proj_search_paths ./bug1488 ./proj_with_fork test_sse: $(CXX) -g -O2 testsse.cpp -o testsse -I../../gdal/port -I../../gdal/gcore ./testsse $(CXX) -g -O2 -mssse3 testsse.cpp -o testsse -I../../gdal/port -I../../gdal/gcore ./testsse $(CXX) -g -O2 -mssse3 -msse4.1 testsse.cpp -o testsse -I../../gdal/port -I../../gdal/gcore ./testsse $(CXX) -g -O2 -mavx2 testsse.cpp -o testsse -I../../gdal/port -I../../gdal/gcore ./testsse $(CXX) -g -O2 -DUSE_SSE2_EMULATION testsse.cpp -o testsse -I../../gdal/port -I../../gdal/gcore ./testsse OBJ = \ gdal_unit_test.o \ test_alg.o \ test_cpl.o \ test_gdal.o \ test_gdal_aaigrid.o \ test_gdal_dted.o \ test_gdal_gtiff.o \ test_triangulation.o \ test_ogr.o \ test_ogr_geos.o \ test_ogr_shape.o \ test_osr.o \ test_osr_ct.o \ test_osr_pci.o \ test_osr_proj4.o \ test_marching_squares_square.o \ test_marching_squares_tile.o \ test_marching_squares_contour.o \ test_marching_squares_polygon.o \ tut/tut_gdal.o gdal_unit_test: $(OBJ) $(LD) $(LDFLAGS) $^ $(CONFIG_LIBS) -o $@ testperfcopywords.o: testperfcopywords.cpp $(CXX) $(CXXFLAGS) -O2 -c $< testperfcopywords: testperfcopywords.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testcopywords.o: testcopywords.cpp $(CXX) $(CXXFLAGS) -O2 -c $< testcopywords: testcopywords.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testclosedondestroydm: testclosedondestroydm.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testthreadcond: testthreadcond.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testvirtualmem: testvirtualmem.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testblockcache.o: testblockcache.cpp $(CXX) $(CXXFLAGS) -O2 -c $< testblockcache: testblockcache.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testblockcachewrite.o: testblockcachewrite.cpp $(CXX) $(CXXFLAGS) -O2 -c $< testblockcachewrite: testblockcachewrite.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testmultithreadedwriting.o: testmultithreadedwriting.cpp $(CXX) $(CXXFLAGS) -O2 -c $< testmultithreadedwriting: testmultithreadedwriting.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testblockcachelimits.o: testblockcachelimits.cpp $(CXX) $(CXXFLAGS) -O2 -c $< testblockcachelimits: testblockcachelimits.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ testdestroy: testdestroy.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ test_osr_set_proj_search_paths.o: test_osr_set_proj_search_paths.cpp $(CXX) $(CXXFLAGS) $(PROJ_INCLUDE) $(PROJ_CFLAGS) -c $< test_osr_set_proj_search_paths: test_osr_set_proj_search_paths.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ bug1488: bug1488.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ proj_with_fork: proj_with_fork.o $(LD) $(LDFLAGS) $< $(CONFIG_LIBS) -o $@ vsipreload.so: ../../gdal/port/vsipreload.o $(CXX) -fPIC -g $(CXXFLAGS) $< $(CONFIG_LIBS) $(LDFLAGS) -shared -o $@ test_include_from_c_file: for HEADER_FILE in cpl_atomic_ops.h cpl_conv.h cpl_csv.h cpl_error.h cpl_hash_set.h cpl_list.h cpl_minixml.h cpl_port.h cpl_progress.h cpl_quad_tree.h cpl_vsi.h gdal_alg.h gdal_version.h gdal.h gdal_utils.h ogr_api.h ogr_core.h ogr_srs_api.h; do \ echo "#include \"$$HEADER_FILE\"" > tmp_include_from_c_file.c; \ $(CC) $(CFLAGS) -c tmp_include_from_c_file.c; \ rm -f tmp_include_from_c_file.*; \ rm -f .libs/tmp_include_from_c_file.*; \ done; \ $(CC) $(CFLAGS) -c test_include_from_c_file.c test_include_from_cpp_file: for HEADER_FILE in cpl_atomic_ops.h cpl_conv.h cpl_csv.h cpl_error.h cpl_hash_set.h cpl_list.h cpl_minixml.h cpl_port.h cpl_progress.h cpl_quad_tree.h cpl_vsi.h gdal_alg.h gdal_version.h gdal.h gdal_utils.h ogr_api.h ogr_core.h ogr_srs_api.h ogr_feature.h ogr_geometry.h ogrsf_frmts.h ogr_spatialref.h; do \ echo "#include \"$$HEADER_FILE\"" > tmp_include_from_cpp_file.cpp; \ $(CXX) $(CXXFLAGS) -c tmp_include_from_cpp_file.cpp; \ rm -f tmp_include_from_cpp_file.*; \ rm -f .libs/tmp_include_from_cpp_file.*; \ done; \ $(CXX) $(CXXFLAGS) -c test_c_include_from_cpp_file.cpp test_include_from_cpp_file_with_extern_c: for HEADER_FILE in cpl_atomic_ops.h cpl_conv.h cpl_csv.h cpl_error.h cpl_hash_set.h cpl_list.h cpl_minixml.h cpl_port.h cpl_progress.h cpl_quad_tree.h cpl_vsi.h gdal_alg.h gdal_version.h gdal.h gdal_utils.h ogr_api.h ogr_core.h ogr_srs_api.h; do \ echo "extern \"C\" {" > test_include_from_cpp_file_with_extern_c.cpp; \ echo "#include \"$$HEADER_FILE\"" >> test_include_from_cpp_file_with_extern_c.cpp; \ echo "}" >> test_include_from_cpp_file_with_extern_c.cpp; \ $(CXX) $(CXXFLAGS) -c test_include_from_cpp_file_with_extern_c.cpp; \ rm -f test_include_from_cpp_file_with_extern_c.*; \ rm -f .libs/test_include_from_cpp_file_with_extern_c.*; \ done clean: $(RM) $(PROGS) testsse $(RM) $(OBJ) $(RM) *.a $(RM) *.out $(RM) *~ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/cpp/test_marching_squares_tile.cpp�����������������������������������������������0000664�0001750�0001750�00000055724�13701057761�021614� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_marching_squares_tile.cpp 25d6f6f3485f45a339ed5097cbcaab4f8d2921ce 2018-12-14 22:28:23 +0100 Even Rouault $ * * Project: GDAL algorithms * Purpose: Tests for the marching squares algorithm * Author: Hugo Mercier, <hugo dot mercier at oslandia dot com> * ****************************************************************************** * Copyright (c) 2018, Hugo Mercier, <hugo dot mercier at oslandia dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal_unit_test.h" #include "gdal_alg.h" #include "marching_squares/point.h" #include "marching_squares/level_generator.h" #include "marching_squares/contour_generator.h" #include <map> #include <fstream> namespace marching_squares { struct Writer { typedef std::pair< Point, Point > Segment; static bool coordEquals( double a, double b ) { return (a-b)*(a-b) < 0.001; } void addSegment(int levelIdx, const Point &first, const Point &second) { contours[levelIdx].push_back(Segment(first, second)); } void addBorderSegment(int levelIdx, const Point &first, const Point &second) { borders[levelIdx].push_back(Segment(first, second)); } // check if a segment is in a set of borders bool segmentInBorders( int levelIdx, const Segment& segmentToTest ) const { std::vector<Segment> segments = borders.find( levelIdx )->second; for ( Segment& s : segments ) { // (A,B) == (A,B) || (A,B) == (B,A) if ( ( ( coordEquals( s.first.x, segmentToTest.first.x ) ) && ( coordEquals( s.first.y, segmentToTest.first.y ) ) && ( coordEquals( s.second.x, segmentToTest.second.x ) ) && ( coordEquals( s.second.y, segmentToTest.second.y ) ) ) || ( ( coordEquals( s.second.x, segmentToTest.first.x ) ) && ( coordEquals( s.second.y, segmentToTest.first.y ) ) && ( coordEquals( s.first.x, segmentToTest.second.x ) ) && ( coordEquals( s.first.y, segmentToTest.second.y ) ) ) ) return true; } return false; } // check if a segment is in a set of contours bool segmentInContours( int levelIdx, const Segment& segmentToTest ) const { std::vector<Segment> segments = contours.find( levelIdx )->second; for ( Segment& s : segments ) { // (A,B) == (A,B) || (A,B) == (B,A) if ( ( ( coordEquals( s.first.x, segmentToTest.first.x ) ) && ( coordEquals( s.first.y, segmentToTest.first.y ) ) && ( coordEquals( s.second.x, segmentToTest.second.x ) ) && ( coordEquals( s.second.y, segmentToTest.second.y ) ) ) || ( ( coordEquals( s.second.x, segmentToTest.first.x ) ) && ( coordEquals( s.second.y, segmentToTest.first.y ) ) && ( coordEquals( s.first.x, segmentToTest.second.x ) ) && ( coordEquals( s.first.y, segmentToTest.second.y ) ) ) ) return true; } return false; } void beginningOfLine() {} void endOfLine() {} std::map< int, std::vector< Segment > > contours; std::map< int, std::vector< Segment > > borders; const bool polygonize = true; }; } namespace tut { using namespace marching_squares; // Common fixture with test data struct test_ms_tile_data { }; // Register test group typedef test_group<test_ms_tile_data> group; typedef group::object object; group test_ms_tile_group("MarchingSquares:Tile"); // Dummy test template<> template<> void object::test<1>() { // only one pixel of value 2.0 // levels = 0, 10 std::vector<double> data = { 2.0 }; IntervalLevelRangeIterator levels( 0.0, 10.0 ); Writer writer; ContourGenerator<Writer, IntervalLevelRangeIterator> cg( 1, 1, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); ensure_equals( "There is 1 border", writer.borders.size(), size_t(1) ); ensure_equals( "It has 8 segments", writer.borders[1].size(), size_t(8) ); ensure( "Check border segment #1", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.0 ), Point( 0.5, 0.0 )) ) ); ensure( "Check border segment #2", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 0.0 ), Point( 1.0, 0.0 )) ) ); ensure( "Check border segment #3", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.0 ), Point( 1.0, 0.5 )) ) ); ensure( "Check border segment #4", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.5 ), Point( 1.0, 1.0 )) ) ); ensure( "Check border segment #5", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 1.0 ), Point( 0.5, 1.0 )) ) ); ensure( "Check border segment #6", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 1.0 ), Point( 0.0, 1.0 )) ) ); ensure( "Check border segment #7", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 1.0 ), Point( 0.0, 0.5 )) ) ); ensure( "Check border segment #8", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.5 ), Point( 0.0, 0.0 )) ) ); } template<> template<> void object::test<2>() { // Tile with one pixel, value below // only one pixel of value 2.0 // levels = 0, 10 std::vector<double> data = { 2.0 }; const double levels[] = { 0.0 }; FixedLevelRangeIterator levelGenerator( levels, 1 ); Writer writer; ContourGenerator<Writer, FixedLevelRangeIterator> cg( 1, 1, /* hasNoData */ false, NaN, writer, levelGenerator ); cg.feedLine( &data[0] ); ensure_equals( "There is 1 border", writer.borders.size(), size_t(1) ); ensure( "Level = inf", levelGenerator.level(1) == Inf ); ensure_equals( "It has 8 segments", writer.borders[1].size(), size_t(8) ); ensure( "Check border segment #1", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.0 ), Point( 0.5, 0.0 )) ) ); ensure( "Check border segment #2", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 0.0 ), Point( 1.0, 0.0 )) ) ); ensure( "Check border segment #3", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.0 ), Point( 1.0, 0.5 )) ) ); ensure( "Check border segment #4", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.5 ), Point( 1.0, 1.0 )) ) ); ensure( "Check border segment #5", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 1.0 ), Point( 0.5, 1.0 )) ) ); ensure( "Check border segment #6", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 1.0 ), Point( 0.0, 1.0 )) ) ); ensure( "Check border segment #7", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 1.0 ), Point( 0.0, 0.5 )) ) ); ensure( "Check border segment #8", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.5 ), Point( 0.0, 0.0 )) ) ); } template<> template<> void object::test<3>() { // Tile with one pixel (2) // only one pixel of value 2.0 // levels = 2, 10 std::vector<double> data = { 2.0 }; IntervalLevelRangeIterator levels( 2.0, 10.0 ); Writer writer; ContourGenerator<Writer, IntervalLevelRangeIterator> cg( 1, 1, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); ensure_equals( "1 border", writer.borders.size(), size_t(1)); ensure_equals( "It has 8 segments", writer.borders[1].size(), size_t(8) ); ensure( "Check border segment #1", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.0 ), Point( 0.5, 0.0 )) ) ); ensure( "Check border segment #2", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 0.0 ), Point( 1.0, 0.0 )) ) ); ensure( "Check border segment #3", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.0 ), Point( 1.0, 0.5 )) ) ); ensure( "Check border segment #4", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.5 ), Point( 1.0, 1.0 )) ) ); ensure( "Check border segment #5", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 1.0 ), Point( 0.5, 1.0 )) ) ); ensure( "Check border segment #6", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 1.0 ), Point( 0.0, 1.0 )) ) ); ensure( "Check border segment #7", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 1.0 ), Point( 0.0, 0.5 )) ) ); ensure( "Check border segment #8", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.5 ), Point( 0.0, 0.0 )) ) ); } template<> template<> void object::test<4>() { // Tile with two pixels // two pixels // 10 7 // levels = 8 // // pixels // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 10 | 7 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // // squares // +-----+-----+-----+-----+ // |NaN | NaN | NaN | NaN | // | +.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : |10: | 7: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | : | : | : | // | +.....+.....+.....+ | // | NaN | NaN | NaN | NaN | // +-----+-----+-----+-----+ // // subsquares // legend: // : contour // = border (level 8) // # border (level 18) // // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 10 10| 8.5 7| 7 | // | +#########+########+###o=====+========+ | // | # | | : | || | // | # | | : | || | // | # | | : | || | // +--------+---------+--------+---o-----+--------+|--------+ // |NaN 10# 10| 8.5 : 7| 7 || NaN| // | # | | : | || | // | # | | : | || | // | +#########+########+###o=====+========+ | // | 10 10| 8.5 7| 7 | // | (0,1) | (1,1) | (2,1) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 10.0, 7.0 }; { IntervalLevelRangeIterator levels( 8.0, 10.0 ); Writer writer; ContourGenerator<Writer, IntervalLevelRangeIterator> cg( 2, 1, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); // check borders ensure_equals( "There are 2 borders", writer.borders.size(), size_t(2) ); ensure_equals( "First border has 6 segments", writer.borders[0].size(), size_t(6) ); ensure_equals( "Second border has 8 segments", writer.borders[1].size(), size_t(8) ); ensure( "Check border segment #1.1", writer.segmentInBorders( 0, std::make_pair( Point( 1.166, 0.0 ), Point( 1.5, 0.0 )) ) ); ensure( "Check border segment #1.2", writer.segmentInBorders( 0, std::make_pair( Point( 1.5, 0.0 ), Point( 2.0, 0.0 )) ) ); ensure( "Check border segment #1.3", writer.segmentInBorders( 0, std::make_pair( Point( 2.0, 0.0 ), Point( 2.0, 0.5 )) ) ); ensure( "Check border segment #1.4", writer.segmentInBorders( 0, std::make_pair( Point( 2.0, 0.5 ), Point( 2.0, 1.0 )) ) ); ensure( "Check border segment #1.5", writer.segmentInBorders( 0, std::make_pair( Point( 2.0, 1.0 ), Point( 1.5, 1.0 )) ) ); ensure( "Check border segment #1.6", writer.segmentInBorders( 0, std::make_pair( Point( 1.5, 1.0 ), Point( 1.166, 1.0 )) ) ); ensure( "Check border segment #2.1", writer.segmentInBorders( 1, std::make_pair( Point( 1.166, 0.0 ), Point( 1.0, 0.0 )) ) ); ensure( "Check border segment #2.2", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.0 ), Point( 0.5, 0.0 )) ) ); ensure( "Check border segment #2.3", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 0.0 ), Point( 0.0, 0.0 )) ) ); ensure( "Check border segment #2.4", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.0 ), Point( 0.0, 0.5 )) ) ); ensure( "Check border segment #2.5", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.5 ), Point( 0.0, 1.0 )) ) ); ensure( "Check border segment #2.6", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 1.0 ), Point( 0.5, 1.0 )) ) ); ensure( "Check border segment #2.7", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 1.0 ), Point( 1.0, 1.0 )) ) ); ensure( "Check border segment #2.8", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 1.0 ), Point( 1.166, 1.0 )) ) ); } } template<> template<> void object::test<5>() { // four pixels // 10 7 // 4 5 // levels = 8 // pixels // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 10 | 7 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 4 | 5 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // // squares // +-----+-----+-----+-----+ // |NaN | NaN | NaN | NaN | // | +.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : |10: | 7: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | 4: | 5: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | : | : | : | // | +.....+.....+.....+ | // | NaN | NaN | NaN | NaN | // +-----+-----+-----+-----+ // // subsquares // legend: // : contour // = border (level 8) // # border (level 18) // // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 10 10| 8.5 7| 7 | // | +#########+########+###o=====+========++ | // | # | | : | || | // | # | | : | || | // | # | | : | || | // +--------+---------+--------+---o-----+--------++--------+ // |NaN 10# 10| ........: 7| 7 || NaN| // | o.........o..: | || | // | || | | || | // | 7++---------+ 7 6 +--------++ | // | || | | || | // | || | | || | // | || | 4.5 | || | // +-------++---------+--------+---------+--------++--------+ // |NaN 4|| 4 | | 5| 5 || NaN| // | || | | | || | // | || | | | || | // | ++=========+========+=========+========++ | // | 4 4 | 4.5 5| 5 | // | (0,2) | (1,2) | (2,2) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 10.0, 7.0, 4.0, 5.0 }; { IntervalLevelRangeIterator levels( 8.0, 10.0 ); Writer writer; ContourGenerator<Writer, IntervalLevelRangeIterator> cg( 2, 2, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); cg.feedLine( &data[2] ); // check borders ensure_equals( "2 borders", writer.borders.size(), size_t(2) ); ensure_equals( "13 segments on the first", writer.borders[0].size(), size_t(13) ); ensure_equals( "5 segments on the second", writer.borders[1].size(), size_t(5) ); ensure( "Check border segment #1", writer.segmentInBorders( 1, std::make_pair( Point( 1.166, 0.0 ), Point( 1.0, 0.0 )) ) ); ensure( "Check border segment #2", writer.segmentInBorders( 1, std::make_pair( Point( 1.0, 0.0 ), Point( 0.5, 0.0 )) ) ); ensure( "Check border segment #3", writer.segmentInBorders( 1, std::make_pair( Point( 0.5, 0.0 ), Point( 0.0, 0.0 )) ) ); ensure( "Check border segment #4", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.0 ), Point( 0.0, 0.5 )) ) ); ensure( "Check border segment #5", writer.segmentInBorders( 1, std::make_pair( Point( 0.0, 0.5 ), Point( 0.0, 0.833 )) ) ); // check contour ensure_equals( "2 contours", writer.contours.size(), size_t(2) ); ensure_equals( "3 segments in the first", writer.contours[0].size(), size_t(3) ); ensure( "Check contour segment #1", writer.segmentInContours( 0, std::make_pair( Point( 1.166, 0.0 ), Point( 1.166, 0.5 )) ) ); ensure( "Check contour segment #2", writer.segmentInContours( 0, std::make_pair( Point( 1.166, 0.5 ), Point( 0.5, 0.833 )) ) ); ensure( "Check contour segment #3", writer.segmentInContours( 0, std::make_pair( Point( 0.5, 0.833 ), Point( 0.0, 0.833 )) ) ); } } template<> template<> void object::test<6>() { // four pixels // 155 155.01 // 154.99 155 // levels = 155 // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 155 | 155.005 | 155.01 | // | +---------+--------+---------+---------+ | // | | 155 | 155.01 | | // | | | | | | | // | | | 155.005 | | | // +--------+---------+--------+---------+---------+--------+ // |NaN 155 155 155.01 155.01 NaN| // | | | | | | // | 154.995 | | 155.005 | // | +-------154.995 155.005------+ | // | | | | | | // | | | | | | // | | | | | | // +--------+---------+--------+---------+---------+--------+ // |NaN 154.99 154.99 154.995 155 155 NaN| // | | | | | | | // | | | | | | | // | +---------+--------+---------+---------+ | // | 154.99 154.99 154.995 155 155 | // | (0,2) | (1,2) | (2,2) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 155.0, 155.01, 154.99, 155.0 }; { const double levels[] = { 155.0 }; FixedLevelRangeIterator levelGenerator( levels, 1 ); Writer writer; ContourGenerator<Writer, FixedLevelRangeIterator> cg( 2, 2, /* hasNoData */ false, NaN, writer, levelGenerator ); cg.feedLine( &data[0] ); cg.feedLine( &data[2] ); // check borders ensure_equals( "2 borders", writer.borders.size(), size_t(2) ); ensure_equals( "1 border @ 155.0", levelGenerator.level(0), 155.0 ); ensure( "1 border @ Inf", levelGenerator.level(1) == Inf ); ensure_equals( "First border has 6 segments", writer.borders[0].size(), size_t(6) ); ensure_equals( "Second border has 12 segments", writer.borders[1].size(), size_t(12) ); } } } ��������������������������������������������gdalautotest-3.1.2/cpp/test_marching_squares_contour.cpp��������������������������������������������0000664�0001750�0001750�00000037427�13701057761�022350� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������/****************************************************************************** * $Id: test_marching_squares_contour.cpp 98906f740473968e60649eaf73b0138d814062bb 2018-10-29 13:53:48 +0100 Hugo Mercier $ * * Project: GDAL algorithms * Purpose: Tests for the marching squares algorithm * Author: Hugo Mercier, <hugo dot mercier at oslandia dot com> * ****************************************************************************** * Copyright (c) 2018, Hugo Mercier, <hugo dot mercier at oslandia dot com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include "gdal_unit_test.h" #include "gdal_alg.h" #include "marching_squares/level_generator.h" #include "marching_squares/segment_merger.h" #include "marching_squares/contour_generator.h" namespace marching_squares { class TestRingAppender { public: struct Point { Point( double xx, double yy ): x(xx), y(yy) {} double x; double y; bool operator<( const Point& b ) const { return x == b.x ? y < b.y : x < b.x; } bool operator==( const Point& b ) const { return std::fabs(x - b.x) < 0.001 && std::fabs(y - b.y) < 0.001; } bool operator!=( const Point& b ) const { return ! (*this == b); } }; void addLine( double level, LineString& ls, bool /* closed */ ) { auto& v = points_[level]; std::vector<Point> ring; for ( const auto& pt : ls ) { ring.push_back( Point( pt.x, pt.y ) ); } v.push_back( ring ); } bool hasRing( double level, const std::vector<Point>& other ) const { auto it = points_.find( level ); if ( it == points_.end() ) { return false; } const auto& rings = it->second; for ( const auto& ring: rings ) { if ( ringEquals_( ring, other ) ) { return true; } else { // test also the reverse ring auto rev = other; std::reverse( rev.begin(), rev.end() ); if ( ringEquals_( ring, rev ) ) { return true; } } } return false; } void out( std::ostream& o, double level ) { for ( const auto& p : points_[level] ) { out_( o, p ); } } private: // level -> vector of rings std::map<double, std::vector<std::vector<Point>>> points_; bool ringEquals_( const std::vector<Point>& aRing, const std::vector<Point>& bRing ) const { if ( aRing.size() - 1 != bRing.size() ) { return false; } // rings do not really have a "first" point, but since // we represent them with a vector, we need to find a common "first" point Point pfirst = aRing[0]; size_t offset = 0; while ( offset < bRing.size() && pfirst != bRing[offset] ) offset++; if ( offset >= bRing.size() ) { // can't find a common point return false; } // now compare each point of the two rings for ( size_t i = 0; i < aRing.size(); i++ ) { const Point& p2 = bRing[( i + offset ) % bRing.size()]; if ( aRing[i] != p2 ) { return false; } } return true; } void out_( std::ostream& o, const std::vector<Point>& points ) const { o << "{ "; for ( const auto& pt: points ) { o << "{" << pt.x << "," << pt.y << "}, "; } o << "}, "; } }; } namespace tut { using namespace marching_squares; // Common fixture with test data struct test_ms_contour_data { }; // Register test group typedef test_group<test_ms_contour_data> group; typedef group::object object; group test_ms_contour_group("MarchingSquares:Contour"); // Dummy test template<> template<> void object::test<1>() { // one pixel std::vector<double> data = { 2.0 }; TestRingAppender w; { IntervalLevelRangeIterator levels( 0.0, 10.0 ); SegmentMerger<TestRingAppender, IntervalLevelRangeIterator> writer( w, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 1, 1, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); ensure( "Polygon ring", w.hasRing( 10.0, {{0.0, 0.0}, {0.5, 0.0}, {1.0, 0.0}, {1.0, 0.5}, {1.0, 1.0}, {0.5, 1.0}, {0.0, 1.0}, {0.0, 0.5}} ) ); } } template<> template<> void object::test<2>() { // two pixels // 10 7 // levels = 8 std::vector<double> data = { 10.0, 7.0 }; TestRingAppender w; { IntervalLevelRangeIterator levels( 8.0, 10.0 ); SegmentMerger<TestRingAppender, IntervalLevelRangeIterator> writer( w, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 2, 1, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); ensure( "Polygon #0", w.hasRing( 8.0, {{1.166, 0.0}, {1.5, 0.0}, {2.0, 0.0}, {2.0, 0.5}, {2.0, 1.0}, {1.5, 1.0}, {1.166, 1.0}, {1.166, 0.5}} ) ); ensure( "Polygon #1", w.hasRing( 18.0, {{1.166, 0.0}, {1.0, 0.0}, {0.5, 0.0}, {0.0, 0.0}, {0.0, 0.5}, {0.0, 1.0}, {0.5, 1.0}, {1.0, 1.0}, {1.166, 1.0}, {1.166, 0.5}} ) ); } } template<> template<> void object::test<3>() { // four pixels // 10 7 // 4 5 // levels = 8 // pixels // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 10 | 7 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 4 | 5 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // // squares // +-----+-----+-----+-----+ // |NaN | NaN | NaN | NaN | // | +.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : |10: | 7: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | 4: | 5: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | : | : | : | // | +.....+.....+.....+ | // | NaN | NaN | NaN | NaN | // +-----+-----+-----+-----+ // // subsquares // legend: // : contour // = border (level 8) // # border (level 18) // // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 10 10| 8.5 7| 7 | // | +#########+########+###o=====+========++ | // | # | | : | || | // | # | | : | || | // | # | | : | || | // +--------+---------+--------+---o-----+--------++--------+ // |NaN 10# 10| ........: 7| 7 || NaN| // | o.........o..: | || | // | || | | || | // | 7++---------+ 7 6 +--------++ | // | || | | || | // | || | | || | // | || | 4.5 | || | // +-------++---------+--------+---------+--------++--------+ // |NaN 4|| 4 | | 5| 5 || NaN| // | || | | | || | // | || | | | || | // | ++=========+========+=========+========++ | // | 4 4 | 4.5 5| 5 | // | (0,2) | (1,2) | (2,2) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 10.0, 7.0, 4.0, 5.0 }; TestRingAppender w; { IntervalLevelRangeIterator levels( 8.0, 10.0 ); SegmentMerger<TestRingAppender, IntervalLevelRangeIterator> writer( w, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 2, 2, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); cg.feedLine( &data[2] ); ensure( "Polygon #0", w.hasRing( 8.0, {{2.0, 0.0}, {2.0, 0.5}, {2.0, 1.0}, {2.0, 1.5}, {2.0, 2.0}, {1.5, 2.0}, {1.0, 2.0}, {0.5, 2.0}, {0.0, 2.0}, {0.0, 1.5}, {0.0, 1.0}, {0.0, 0.833}, {0.5, 0.833}, {1.167, 0.5}, {1.167, 0.0}, {1.5, 0.0}} ) ); ensure( "Polygon #1", w.hasRing( 18.0, {{0.0, 0.0}, {0.5, 0.0}, {1.0, 0.0}, {1.167, 0.0}, {1.167, 0.5}, {0.5, 0.833}, {0, 0.833}, {0.0, 0.5}} ) ); } } template<> template<> void object::test<4>() { // four pixels // two rings // with a saddle point // 5 10 // 10 5 // levels = 8 // pixels // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 5 | 10 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | 10 | 5 | NaN | // | | | | | // +-----+-----+-----+-----+ // | | | | | // | NaN | NaN | NaN | NaN | // | | | | | // +-----+-----+-----+-----+ // // squares // +-----+-----+-----+-----+ // |NaN | NaN | NaN | NaN | // | +.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | 5: |10: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : |10: | 5: |NaN | // NaN+.....+.....+.....+ | // | : | : | : | : | // +--:--+--:--+--:--+--:--+ // | : | : | : | : | // | +.....+.....+.....+ | // | NaN | NaN | NaN | NaN | // +-----+-----+-----+-----+ // // subsquares // legend: // : contour // # border (level 8) // = border (level 18) // // NaN NaN NaN // +------------------+------------------+------------------+ // | | | | // | (0,0) | (1,0) | (2,0) | // | 5 5| 7.5 10| 10 | // | +#########+########+###o=====+========++ | // | # | | : | || | // | # | | : | || | // | # | | : | || | // +--------+---------+--------+---o-----+--------++--------+ // |NaN 5 # 5| \ 10| 10|| NaN| // | # | \___o........o | // | # | | # | // | 7.5++---------+7.5 7.5+--------+ | // | # | | # | // | o.........o\_ | # | // | || | \_ 7.5 | # | // +-------++---------+----\o--+---------+--------+---------+ // |NaN 10|| 10| : | 5| 5 # NaN| // | || | : | | # | // | || | : | | # | // | ++=========+=====o##+#########+########+ | // | 10 10| 7.5 5| 5 | // | (0,2) | (1,2) | (2,2) | // | | | | // +------------------+------------------+------------------+ // NaN NaN NaN NaN std::vector<double> data = { 5.0, 10.0, 10.0, 5.0 }; TestRingAppender w; { IntervalLevelRangeIterator levels( 8.0, 10.0 ); SegmentMerger<TestRingAppender, IntervalLevelRangeIterator> writer( w, levels, /* polygonize */ true ); ContourGenerator<decltype(writer), IntervalLevelRangeIterator> cg( 2, 2, /* hasNoData */ false, NaN, writer, levels ); cg.feedLine( &data[0] ); cg.feedLine( &data[2] ); ensure( "Polygon #0", w.hasRing( 8.0, { {1.5,2}, {2,2}, {2,1.5}, {2,1}, {2,0.9}, {1.5,0.9}, {1.1,0.5}, {1.1,0}, {1,0}, {0.5,0}, {0,0}, {0,0.5}, {0,1}, {0,1.1}, {0.5,1.1}, {0.9,1.5}, {0.9,2}, {1,2} } ) ); ensure( "Polygon #1, Ring #0", w.hasRing( 18.0, { {2,0.9}, {2,0.5}, {2,0}, {1.5,0}, {1.1,0}, {1.1,0.5}, {1.5,0.9} } ) ); ensure( "Polygon #1, Ring #1", w.hasRing( 18.0, { {0.9,1.5}, {0.5,1.1}, {0,1.1}, {0,1.5}, {0,2}, {0.5,2}, {0.9,2} } ) ); } } } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/�����������������������������������������������������������������������������0000775�0001750�0001750�00000000000�13701060013�013451� 5����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_geos.py������������������������������������������������������������������0000775�0001750�0001750�00000041153�13701057761�015656� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_geos.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test GEOS integration in OGR - geometric operations. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2004, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2009-2012, Even Rouault <even dot rouault at spatialys.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Establish whether we have GEOS support integrated, testing simple Union. def test_ogr_geos_union(): if not ogrtest.have_geos(): pytest.skip() pnt1 = ogr.CreateGeometryFromWkt('POINT(10 20)') pnt2 = ogr.CreateGeometryFromWkt('POINT(30 20)') result = pnt1.Union(pnt2) assert not ogrtest.check_feature_geometry(result, 'MULTIPOINT (10 20,30 20)') ############################################################################### # Test polygon intersection. def test_ogr_geos_intersection(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 0 10, 10 0, 0 0))') result = g1.Intersection(g2) assert not ogrtest.check_feature_geometry(result, 'POLYGON ((0 0,5 5,10 0,0 0))'), \ ('Got: %s' % result.ExportToWkt()) ############################################################################### # Test polygon difference. def test_ogr_geos_difference(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 0 10, 10 0, 0 0))') result = g1.Difference(g2) assert (not ogrtest.check_feature_geometry(result, 'POLYGON ((5 5,10 10,10 0,5 5))')), \ ('Got: %s' % result.ExportToWkt()) ############################################################################### # Test polygon symmetric difference. def test_ogr_geos_symmetric_difference(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 0 10, 10 0, 0 0))') result = g1.SymmetricDifference(g2) assert (not ogrtest.check_feature_geometry(result, 'MULTIPOLYGON (((5 5,0 0,0 10,5 5)),((5 5,10 10,10 0,5 5)))')), \ ('Got: %s' % result.ExportToWkt()) ############################################################################### # Test polygon symmetric difference. def test_ogr_geos_sym_difference(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 0 10, 10 0, 0 0))') result = g1.SymDifference(g2) assert (not ogrtest.check_feature_geometry(result, 'MULTIPOLYGON (((5 5,0 0,0 10,5 5)),((5 5,10 10,10 0,5 5)))')), \ ('Got: %s' % result.ExportToWkt()) ############################################################################### # Test Intersect(). def test_ogr_geos_intersect(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('LINESTRING(10 0, 0 10)') result = g1.Intersect(g2) assert result != 0, 'wrong result (got false)' g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('POLYGON((20 20, 20 30, 30 20, 20 20))') result = g1.Intersect(g2) assert result == 0, 'wrong result (got true)' ############################################################################### # Test disjoint(). def test_ogr_geos_disjoint(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('LINESTRING(10 0, 0 10)') result = g1.Disjoint(g2) assert result == 0, 'wrong result (got true)' g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('POLYGON((20 20, 20 30, 30 20, 20 20))') result = g1.Disjoint(g2) assert result != 0, 'wrong result (got false)' ############################################################################### # Test touches. def test_ogr_geos_touches(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 0 10)') result = g1.Touches(g2) assert result != 0, 'wrong result (got false)' g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('POLYGON((20 20, 20 30, 30 20, 20 20))') result = g1.Touches(g2) assert result == 0, 'wrong result (got true)' ############################################################################### # Test crosses. def test_ogr_geos_crosses(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('LINESTRING(10 0, 0 10)') result = g1.Crosses(g2) assert result != 0, 'wrong result (got false)' g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 10 10)') g2 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 0 10)') result = g1.Crosses(g2) assert result == 0, 'wrong result (got true)' ############################################################################### def test_ogr_geos_within(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))') result = g1.Within(g2) assert result != 0, 'wrong result (got false)' result = g2.Within(g1) assert result == 0, 'wrong result (got true)' ############################################################################### def test_ogr_geos_contains(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))') result = g2.Contains(g1) assert result != 0, 'wrong result (got false)' result = g1.Contains(g2) assert result == 0, 'wrong result (got true)' ############################################################################### def test_ogr_geos_overlaps(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))') result = g2.Overlaps(g1) # g1 and g2 intersect, but their intersection is equal to g1 assert result == 0, 'wrong result (got true)' g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') g2 = ogr.CreateGeometryFromWkt('POLYGON((0 -5,10 5,10 -5,0 -5))') result = g2.Overlaps(g1) assert result != 0, 'wrong result (got false)' ############################################################################### def test_ogr_geos_buffer(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') result = g1.Buffer(1.0, 3) assert (ogrtest.check_feature_geometry(result, 'POLYGON ((0 -1,-0.555570233019607 -0.831469612302542,-0.923879532511288 -0.382683432365087,-0.98078528040323 0.19509032201613,-0.707106781186547 0.707106781186547,9.292893218813452 10.707106781186548,9.690983005625053 10.951056516295154,10.156434465040231 10.987688340595138,10.587785252292473 10.809016994374947,10.891006524188368 10.453990499739547,11 10,11 0,10.866025403784439 -0.5,10.5 -0.866025403784439,10 -1,0 -1))') == 0), \ ('Got: %s' % result.ExportToWkt()) ############################################################################### def test_ogr_geos_centroid(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') centroid = g1.Centroid() assert (ogrtest.check_feature_geometry(centroid, 'POINT(6.666666667 3.333333333)') == 0), \ ('Got: %s' % centroid.ExportToWkt()) # Test with a self intersecting polygon too. # This particular polygon has two triangles. The right triangle is larger. g2 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 0 2, 2 -0.1, 2 2.1, 0 0))') centroid2 = g2.Centroid() assert ogrtest.check_feature_geometry(centroid2, 'POINT (8.0 1.0)') == 0, \ ('Got: %s' % centroid2.ExportToWkt()) ############################################################################### def test_ogr_geos_centroid_multipolygon(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)),((2 0,2 1,3 1,3 0,2 0)))') centroid = g1.Centroid() assert (ogrtest.check_feature_geometry(centroid, 'POINT (1.5 0.5)') == 0), \ ('Got: %s' % centroid.ExportToWkt()) ############################################################################### def test_ogr_geos_centroid_point_empty(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POINT EMPTY') centroid = g1.Centroid() assert centroid.ExportToWkt() == 'POINT EMPTY', ('Got: %s' % centroid.ExportToWkt()) ############################################################################### def test_ogr_geos_simplify_linestring(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 0,10 0)') gdal.ErrorReset() simplify = g1.Simplify(5) assert simplify.ExportToWkt() == 'LINESTRING (0 0,10 0)', \ ('Got: %s' % simplify.ExportToWkt()) ############################################################################### def test_ogr_geos_simplifypreservetopology_linestring(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 0,10 0)') gdal.ErrorReset() simplify = g1.SimplifyPreserveTopology(5) assert simplify.ExportToWkt() == 'LINESTRING (0 0,10 0)', \ ('Got: %s' % simplify.ExportToWkt()) ############################################################################### def test_ogr_geos_unioncascaded(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 1,1 1,1 0,0 0)),((0.5 0.5,0.5 1.5,1.5 1.5,1.5 0.5,0.5 0.5)))') gdal.ErrorReset() cascadedunion = g1.UnionCascaded() assert cascadedunion.ExportToWkt() == 'POLYGON ((0 0,0 1,0.5 1.0,0.5 1.5,1.5 1.5,1.5 0.5,1.0 0.5,1 0,0 0))', \ ('Got: %s' % cascadedunion.ExportToWkt()) ############################################################################### def test_ogr_geos_convexhull(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 1), POINT(0 0), POINT(1 0), POINT(1 1))') convexhull = g1.ConvexHull() assert convexhull.ExportToWkt() == 'POLYGON ((0 0,0 1,1 1,1 0,0 0))', \ ('Got: %s' % convexhull.ExportToWkt()) ############################################################################### def test_ogr_geos_distance(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POINT(0 0)') g2 = ogr.CreateGeometryFromWkt('POINT(1 0)') distance = g1.Distance(g2) assert distance == pytest.approx(1, abs=0.00000000001), \ ('Distance() result wrong, got %g.' % distance) ############################################################################### def test_ogr_geos_isring(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0,0 1,1 1,0 0)') isring = g1.IsRing() assert isring == 1 ############################################################################### def test_ogr_geos_issimple_true(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,1 0,0 0))') isring = g1.IsSimple() assert isring == 1 ############################################################################### def test_ogr_geos_issimple_false(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2 1)') isring = g1.IsSimple() assert isring == 0 ############################################################################### def test_ogr_geos_isvalid_true(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING(0 0, 1 1)') isring = g1.IsValid() assert isring == 1 ############################################################################### def test_ogr_geos_isvalid_true_linestringM(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('LINESTRING M(0 0 10, 1 1 20)') isring = g1.IsValid() assert isring == 1 ############################################################################### def test_ogr_geos_isvalid_true_circularStringM(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('CIRCULARSTRING M(0 0 10, 1 1 20,2 0 30)') isring = g1.IsValid() assert isring == 1 ############################################################################### def test_ogr_geos_isvalid_true_triangle(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('TRIANGLE ((0 0,0 1,1 1,0 0))') isring = g1.IsValid() assert isring == 1 ############################################################################### def test_ogr_geos_isvalid_false(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0,1 1,1 2,1 1,0 0))') with gdaltest.error_handler(): isring = g1.IsValid() assert isring == 0 ############################################################################### def test_ogr_geos_pointonsurface(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('POLYGON((0 0, 10 10, 10 0, 0 0))') pointonsurface = g1.PointOnSurface() assert pointonsurface.Within(g1) == 1 ############################################################################### def test_ogr_geos_DelaunayTriangulation(): if not ogrtest.have_geos(): pytest.skip() g1 = ogr.CreateGeometryFromWkt('MULTIPOINT(0 0,0 1,1 1,1 0)') gdal.ErrorReset() triangulation = g1.DelaunayTriangulation() if triangulation is None: assert gdal.GetLastErrorMsg() != '' pytest.skip() assert triangulation.ExportToWkt() == 'GEOMETRYCOLLECTION (POLYGON ((0 1,0 0,1 0,0 1)),POLYGON ((0 1,1 0,1 1,0 1)))', \ ('Got: %s' % triangulation.ExportToWkt()) ############################################################################### def test_ogr_geos_polygonize(): if not ogrtest.have_geos(): pytest.skip() g = ogr.CreateGeometryFromWkt('MULTILINESTRING((0 0,0 1,1 1),(1 1,0 0))') got = g.Polygonize() assert got.ExportToWkt() == 'GEOMETRYCOLLECTION (POLYGON ((0 0,0 1,1 1,0 0)))', \ ('Got: %s' % got.ExportToWkt()) g = ogr.CreateGeometryFromWkt('POINT EMPTY') got = g.Polygonize() assert got is None, ('Got: %s' % got.ExportToWkt()) g = ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT EMPTY)') got = g.Polygonize() assert got is None, ('Got: %s' % got.ExportToWkt()) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_bna.py�������������������������������������������������������������������0000775�0001750�0001750�00000016257�13701057761�015470� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_bna.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test BNA driver functionality. # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2008-2010, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest import ogrtest from osgeo import ogr ############################################################################### # Test points bna layer. def test_ogr_bna_1(): gdaltest.bna_ds = ogr.Open('data/test.bna') lyr = gdaltest.bna_ds.GetLayerByName('test_points') expect = ['PID5', 'PID4'] tr = ogrtest.check_features_against_list(lyr, 'Primary ID', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT (573.736 476.563)', max_error=0.0001) == 0) feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT (532.991 429.121)', max_error=0.0001) == 0) ############################################################################### # Test lines bna layer. def test_ogr_bna_2(): gdaltest.bna_ds = ogr.Open('data/test.bna') lyr = gdaltest.bna_ds.GetLayerByName('test_lines') expect = ['PID3'] tr = ogrtest.check_features_against_list(lyr, 'Primary ID', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'LINESTRING (224.598 307.425,333.043 341.461,396.629 304.952)', max_error=0.0001) == 0 ############################################################################### # Test polygons bna layer. def test_ogr_bna_3(): gdaltest.bna_ds = ogr.Open('data/test.bna') lyr = gdaltest.bna_ds.GetLayerByName('test_polygons') expect = ['PID2', 'PID1', 'PID7', 'PID8', 'PID9', 'PID10'] tr = ogrtest.check_features_against_list(lyr, 'Primary ID', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON (((0 0,1 0,1 1,0 1,0 0)))', max_error=0.0001) == 0 feat = lyr.GetFeature(2) assert ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON (((0 0,1 0,1 1,0 1,0 0)))', max_error=0.0001) == 0 feat = lyr.GetFeature(3) assert ogrtest.check_feature_geometry(feat, 'POLYGON ((0 0,0 10,10 10,10 0,0 0),(2 2,2 8,8 8,8 2,2 2))', max_error=0.0001) == 0 feat = lyr.GetFeature(4) assert ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON (((0 0,0 10,10 10,10 0,0 0)))', max_error=0.0001) == 0 feat = lyr.GetFeature(5) assert ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON (((0 0,0 10,10 10,10 0,0 0)))', max_error=0.0001) == 0 ############################################################################### # Test ellipses bna layer. def test_ogr_bna_4(): gdaltest.bna_ds = ogr.Open('data/test.bna') lyr = gdaltest.bna_ds.GetLayerByName('test_ellipses') expect = ['PID6'] tr = ogrtest.check_features_against_list(lyr, 'Primary ID', expect) assert tr lyr.ResetReading() lyr.GetNextFeature() ############################################################################### # Test write support def ogr_bna_check_content(lyr1, lyr2): assert lyr1.GetFeatureCount() == lyr2.GetFeatureCount() feat1 = lyr1.GetNextFeature() feat2 = lyr2.GetNextFeature() while feat1 is not None: for i in range(lyr1.GetLayerDefn().GetFieldCount()): assert feat1.GetField(i) == feat2.GetField(i) assert (ogrtest.check_feature_geometry(feat1, feat2.GetGeometryRef(), max_error=0.000000001) == 0) feat1 = lyr1.GetNextFeature() feat2 = lyr2.GetNextFeature() def ogr_bna_write(creation_options): output_ds = ogr.GetDriverByName('BNA').CreateDataSource('tmp/out.bna', options=creation_options) # Duplicate data/test.bna into tmp/out.bna for layer_name in ['points', 'lines', 'polygons', 'ellipses']: src_lyr = gdaltest.bna_ds.GetLayerByName('test_' + layer_name) dst_lyr = output_ds.CreateLayer(layer_name, geom_type=src_lyr.GetLayerDefn().GetGeomType()) for i in range(src_lyr.GetLayerDefn().GetFieldCount()): field_defn = src_lyr.GetLayerDefn().GetFieldDefn(i) dst_lyr.CreateField(field_defn) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) src_lyr.ResetReading() feat = src_lyr.GetNextFeature() while feat is not None: dst_feat.SetFrom(feat) assert dst_lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' feat = src_lyr.GetNextFeature() output_ds = None # Check features output_ds = ogr.Open('tmp/out.bna') for layer_name in ['points', 'lines', 'polygons', 'ellipses']: src_lyr = gdaltest.bna_ds.GetLayerByName('test_' + layer_name) dst_lyr = output_ds.GetLayerByName('out_' + layer_name) ogr_bna_check_content(src_lyr, dst_lyr) def test_ogr_bna_5(): return ogr_bna_write(['ELLIPSES_AS_ELLIPSES=YES']) def test_ogr_bna_6(): try: os.remove('tmp/out.bna') except OSError: pass ogr_bna_write(['LINEFORMAT=LF', 'MULTILINE=NO', 'COORDINATE_PRECISION=3']) size = os.stat('tmp/out.bna').st_size assert size == 1601, ('Got size %d. Expected %d' % (size, 1601)) os.remove('tmp/out.bna') ogr_bna_write(['LINEFORMAT=CRLF', 'MULTILINE=NO', 'COORDINATE_PRECISION=3']) size = os.stat('tmp/out.bna').st_size assert size == 1611, ('Got size %d. Expected %d' % (size, 1611)) ############################################################################### # def test_ogr_bna_cleanup(): gdaltest.bna_ds = None try: os.remove('tmp/out.bna') except OSError: pass �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_selafin.py���������������������������������������������������������������0000775�0001750�0001750�00000015041�13701057761�016337� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # # Project: GDAL/OGR Test Suite # Purpose: Selafin driver testing. # Author: François Hissel <francois.hissel@gmail.com> # ############################################################################### # Copyright (c) 2014, François Hissel <francois.hissel@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import math import gdaltest from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Create wasp datasource def test_ogr_selafin_create_ds(): gdaltest.selafin_ds = None try: os.remove('tmp/tmp.slf') except OSError: pass selafin_drv = ogr.GetDriverByName('Selafin') gdaltest.selafin_ds = selafin_drv.CreateDataSource('tmp/tmp.slf') if gdaltest.selafin_ds is not None: return pytest.fail() ############################################################################### # Add a few points to the datasource def test_ogr_selafin_create_nodes(): test_ogr_selafin_create_ds() ref = osr.SpatialReference() ref.ImportFromEPSG(4326) layer = gdaltest.selafin_ds.CreateLayer('name', ref, geom_type=ogr.wkbPoint) assert layer is not None, 'unable to create layer' layer.CreateField(ogr.FieldDefn('value', ogr.OFTReal)) dfn = layer.GetLayerDefn() for i in range(5): for j in range(5): pt = ogr.Geometry(type=ogr.wkbPoint) pt.AddPoint_2D(float(i), float(j)) feat = ogr.Feature(dfn) feat.SetGeometry(pt) feat.SetField(0, (float)(i * 5 + j)) assert layer.CreateFeature(feat) == 0, 'unable to create node feature' # do some checks assert layer.GetFeatureCount() == 25, \ 'wrong number of features after point layer creation' # return del gdaltest.selafin_ds del layer ############################################################################### # Add a set of elements to the datasource def test_ogr_selafin_create_elements(): gdaltest.selafin_ds = ogr.Open('tmp/tmp.slf', 1) if gdaltest.selafin_ds is None: pytest.skip() layerCount = gdaltest.selafin_ds.GetLayerCount() assert layerCount >= 2, 'elements layer not created with nodes layer' for i in range(layerCount): name = gdaltest.selafin_ds.GetLayer(i).GetName() if '_e' in name: j = i if '_p' in name: k = i layere = gdaltest.selafin_ds.GetLayer(j) dfn = layere.GetLayerDefn() for i in range(4): for j in range(4): pol = ogr.Geometry(type=ogr.wkbPolygon) poll = ogr.Geometry(type=ogr.wkbLinearRing) poll.AddPoint_2D(float(i), float(j)) poll.AddPoint_2D(float(i), float(j + 1)) poll.AddPoint_2D(float(i + 1), float(j + 1)) poll.AddPoint_2D(float(i + 1), float(j)) poll.AddPoint_2D(float(i), float(j)) pol.AddGeometry(poll) feat = ogr.Feature(dfn) feat.SetGeometry(pol) assert layere.CreateFeature(feat) == 0, 'unable to create element feature' pol = ogr.Geometry(type=ogr.wkbPolygon) poll = ogr.Geometry(type=ogr.wkbLinearRing) poll.AddPoint_2D(4.0, 4.0) poll.AddPoint_2D(4.0, 5.0) poll.AddPoint_2D(5.0, 5.0) poll.AddPoint_2D(5.0, 4.0) poll.AddPoint_2D(4.0, 4.0) pol.AddGeometry(poll) feat = ogr.Feature(dfn) feat.SetGeometry(pol) assert layere.CreateFeature(feat) == 0, 'unable to create element feature' # do some checks assert gdaltest.selafin_ds.GetLayer(k).GetFeatureCount() == 28, \ 'wrong number of point features after elements layer creation' assert math.fabs(layere.GetFeature(5).GetFieldAsDouble(0) - 9) <= 0.01, \ 'wrong value of attribute in element layer' assert math.fabs(layere.GetFeature(10).GetFieldAsDouble(0) - 15) <= 0.01, \ 'wrong value of attribute in element layer' # return del gdaltest.selafin_ds ############################################################################### # Add a field and set its values for point features def test_ogr_selafin_set_field(): gdaltest.selafin_ds = ogr.Open('tmp/tmp.slf', 1) if gdaltest.selafin_ds is None: pytest.skip() layerCount = gdaltest.selafin_ds.GetLayerCount() assert layerCount >= 2, 'elements layer not created with nodes layer' for i in range(layerCount): name = gdaltest.selafin_ds.GetLayer(i).GetName() if '_e' in name: j = i if '_p' in name: k = i layern = gdaltest.selafin_ds.GetLayer(k) gdaltest.selafin_ds.GetLayer(j) layern.CreateField(ogr.FieldDefn('reverse', ogr.OFTReal)) layern.AlterFieldDefn(0, ogr.FieldDefn('new', ogr.OFTReal), ogr.ALTER_NAME_FLAG) layern.ReorderFields([1, 0]) layern.GetLayerDefn() for i in range(28): feat = layern.GetFeature(i) val = feat.GetFieldAsDouble(1) feat.SetField(0, (float)(val * 10)) layern.SetFeature(feat) # do some checks assert math.fabs(layern.GetFeature(11).GetFieldAsDouble(0) - 110) <= 0.01, \ 'wrong value of attribute in point layer' # return del gdaltest.selafin_ds ############################################################################### # Cleanup def test_ogr_selafin_cleanup(): selafin_drv = ogr.GetDriverByName('Selafin') selafin_drv.DeleteDataSource('tmp/tmp.slf') �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_rfc35_mem.py�������������������������������������������������������������0000775�0001750�0001750�00000024671�13701057761�016507� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: ogr_rfc35_mem.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC35 for Memory driver # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2011, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Initiate the test file def test_ogr_rfc35_mem_1(): gdaltest.rfc35_mem_ds = ogr.GetDriverByName('Memory').CreateDataSource('rfc35_test') lyr = gdaltest.rfc35_mem_ds.CreateLayer('rfc35_test') lyr.ReorderFields([]) fd = ogr.FieldDefn('foo5', ogr.OFTString) fd.SetWidth(5) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo0') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('bar10', ogr.OFTString) fd.SetWidth(10) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo1') feat.SetField(1, 'bar1') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('baz15', ogr.OFTString) fd.SetWidth(15) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo2') feat.SetField(1, 'bar2_01234') feat.SetField(2, 'baz2_0123456789') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('baw20', ogr.OFTString) fd.SetWidth(20) lyr.CreateField(fd) ############################################################################### # Test ReorderField() def Truncate(val, lyr_defn, fieldname): # pylint: disable=unused-argument # if val is None: # return val # return val[0:lyr_defn.GetFieldDefn(lyr_defn.GetFieldIndex(fieldname)).GetWidth()] # Mem driver doesn't actually truncate return val def CheckFeatures(lyr, field1='foo5', field2='bar10', field3='baz15', field4='baw20'): expected_values = [ ['foo0', None, None, None], ['foo1', 'bar1', None, None], ['foo2', 'bar2_01234', 'baz2_0123456789', None], ['foo3', 'bar3_01234', 'baz3_0123456789', 'baw3_012345678901234'] ] lyr_defn = lyr.GetLayerDefn() lyr.ResetReading() feat = lyr.GetNextFeature() i = 0 while feat is not None: if (field1 is not None and feat.GetField(field1) != Truncate(expected_values[i][0], lyr_defn, field1)) or \ (field2 is not None and feat.GetField(field2) != Truncate(expected_values[i][1], lyr_defn, field2)) or \ (field3 is not None and feat.GetField(field3) != Truncate(expected_values[i][2], lyr_defn, field3)) or \ (field4 is not None and feat.GetField(field4) != Truncate(expected_values[i][3], lyr_defn, field4)): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() i = i + 1 def CheckColumnOrder(lyr, expected_order): lyr_defn = lyr.GetLayerDefn() for i, exp_order in enumerate(expected_order): assert lyr_defn.GetFieldDefn(i).GetName() == exp_order def Check(lyr, expected_order): CheckColumnOrder(lyr, expected_order) CheckFeatures(lyr) def test_ogr_rfc35_mem_2(): lyr = gdaltest.rfc35_mem_ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCReorderFields) == 1 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo3') feat.SetField(1, 'bar3_01234') feat.SetField(2, 'baz3_0123456789') feat.SetField(3, 'baw3_012345678901234') lyr.CreateFeature(feat) feat = None assert lyr.ReorderField(1, 3) == 0 ret = Check(lyr, ['foo5', 'baz15', 'baw20', 'bar10']) lyr.ReorderField(3, 1) ret = Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderField(0, 2) ret = Check(lyr, ['bar10', 'baz15', 'foo5', 'baw20']) lyr.ReorderField(2, 0) ret = Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderField(0, 1) ret = Check(lyr, ['bar10', 'foo5', 'baz15', 'baw20']) lyr.ReorderField(1, 0) ret = Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderFields([3, 2, 1, 0]) ret = Check(lyr, ['baw20', 'baz15', 'bar10', 'foo5']) lyr.ReorderFields([3, 2, 1, 0]) ret = Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.ReorderFields([0, 0, 0, 0]) gdal.PopErrorHandler() assert ret != 0 ############################################################################### # Test AlterFieldDefn() for change of name and width def test_ogr_rfc35_mem_3(): lyr = gdaltest.rfc35_mem_ds.GetLayer(0) fd = ogr.FieldDefn("baz25", ogr.OFTString) fd.SetWidth(25) lyr_defn = lyr.GetLayerDefn() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(-1, fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(lyr_defn.GetFieldCount(), fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("baz15"), fd, ogr.ALTER_ALL_FLAG) ret = CheckFeatures(lyr, field3='baz25') fd = ogr.FieldDefn("baz5", ogr.OFTString) fd.SetWidth(5) lyr_defn = lyr.GetLayerDefn() lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("baz25"), fd, ogr.ALTER_ALL_FLAG) ret = CheckFeatures(lyr, field3='baz5') lyr_defn = lyr.GetLayerDefn() fld_defn = lyr_defn.GetFieldDefn(lyr_defn.GetFieldIndex('baz5')) assert fld_defn.GetWidth() == 5 ret = CheckFeatures(lyr, field3='baz5') ############################################################################### # Test AlterFieldDefn() for change of type def test_ogr_rfc35_mem_4(): lyr = gdaltest.rfc35_mem_ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr.TestCapability(ogr.OLCAlterFieldDefn) == 1 fd = ogr.FieldDefn("intfield", ogr.OFTInteger) lyr.CreateField(fd) lyr.ReorderField(lyr_defn.GetFieldIndex("intfield"), 0) lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField("intfield", 12345) lyr.SetFeature(feat) feat = None fd.SetWidth(10) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') fd.SetWidth(5) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') fd.SetWidth(4) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() # if feat.GetField("intfield") != 1234: assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') fd = ogr.FieldDefn("oldintfld", ogr.OFTString) fd.SetWidth(15) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() # if feat.GetField("oldintfld") != '1234': assert feat.GetField("oldintfld") == '12345' feat = None CheckFeatures(lyr, field3='baz5') lyr.DeleteField(lyr_defn.GetFieldIndex("oldintfld")) fd = ogr.FieldDefn("intfield", ogr.OFTInteger) fd.SetWidth(10) assert lyr.CreateField(fd) == 0 assert lyr.ReorderField(lyr_defn.GetFieldIndex("intfield"), 0) == 0 lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField("intfield", 98765) assert lyr.SetFeature(feat) == 0 feat = None fd = ogr.FieldDefn("oldintfld", ogr.OFTString) fd.SetWidth(6) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("oldintfld") == '98765' feat = None CheckFeatures(lyr, field3='baz5') ############################################################################### # Test DeleteField() def test_ogr_rfc35_mem_5(): lyr = gdaltest.rfc35_mem_ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr.TestCapability(ogr.OLCDeleteField) == 1 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(-1) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(lyr.GetLayerDefn().GetFieldCount()) gdal.PopErrorHandler() assert ret != 0 assert lyr.DeleteField(0) == 0 ret = CheckFeatures(lyr, field3='baz5') assert lyr.DeleteField(lyr_defn.GetFieldIndex('baw20')) == 0 ret = CheckFeatures(lyr, field3='baz5', field4=None) assert lyr.DeleteField(lyr_defn.GetFieldIndex('baz5')) == 0 ret = CheckFeatures(lyr, field3=None, field4=None) assert lyr.DeleteField(lyr_defn.GetFieldIndex('foo5')) == 0 assert lyr.DeleteField(lyr_defn.GetFieldIndex('bar10')) == 0 ret = CheckFeatures(lyr, field1=None, field2=None, field3=None, field4=None) ############################################################################### # Initiate the test file def test_ogr_rfc35_mem_cleanup(): gdaltest.rfc35_mem_ds = None �����������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_ngw.py�������������������������������������������������������������������0000775�0001750�0001750�00000062053�13701057761�015516� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ################################################################################ # Project: OGR NextGIS Web Driver # Purpose: Tests OGR NGW Driver capabilities # Author: Dmitry Baryshnikov, polimax@mail.ru # Language: Python ################################################################################ # The MIT License (MIT) # # Copyright (c) 2018-2020, NextGIS <info@nextgis.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. ################################################################################ import sys sys.path.append('../pymod') import gdaltest from osgeo import gdal from osgeo import ogr from osgeo import osr import time import json import pytest import random from datetime import datetime def check_availability(url): # Sandbox cleans at 1:05 on monday (UTC) now = datetime.utcnow() if now.weekday() == 0: if now.hour >= 1 and now.hour < 3: return False version_url = url + '/api/component/pyramid/pkg_version' if gdaltest.gdalurlopen(version_url) is None: return False # Check quota quota_url = url + '/api/resource/quota' quota_conn = gdaltest.gdalurlopen(quota_url) try: quota_json = json.loads(quota_conn.read()) quota_conn.close() if quota_json is None: return False limit = quota_json['limit'] count = quota_json['count'] if limit is None or count is None: return True return limit - count > 10 except: return False def get_new_name(): return 'gdaltest_group_' + str(int(time.time())) + '_' + str(random.randint(10, 99)) ############################################################################### # Check driver existence. def test_ogr_ngw_1(): gdaltest.ngw_ds = None gdaltest.ngw_drv = None gdaltest.ngw_drv = gdal.GetDriverByName('NGW') if gdaltest.ngw_drv is None: pytest.skip() gdaltest.ngw_test_server = 'https://sandbox.nextgis.com' # 'http://dev.nextgis.com/sandbox' if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() ############################################################################### # Check create datasource. def test_ogr_ngw_2(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() create_url = 'NGW:' + gdaltest.ngw_test_server + '/resource/0/' + get_new_name() gdal.PushErrorHandler() gdaltest.ngw_ds = gdaltest.ngw_drv.Create(create_url, 0, 0, 0, gdal.GDT_Unknown, \ options=['DESCRIPTION=GDAL Test group',]) gdal.PopErrorHandler() assert gdaltest.ngw_ds is not None, 'Create datasource failed.' assert gdaltest.ngw_ds.GetMetadataItem('description', '') == 'GDAL Test group', \ 'Did not get expected datasource description.' assert int(gdaltest.ngw_ds.GetMetadataItem('id', '')) > 0, \ 'Did not get expected datasource identifier.' gdaltest.group_id = gdaltest.ngw_ds.GetMetadataItem('id', '') ############################################################################### # Check rename datasource. def test_ogr_ngw_3(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() new_name = get_new_name() + '_2' ds_resource_id = gdaltest.ngw_ds.GetMetadataItem('id', '') rename_url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + ds_resource_id assert gdaltest.ngw_drv.Rename(new_name, rename_url) == gdal.CE_None, \ 'Rename datasource failed.' ############################################################################### # Check datasource metadata. def test_ogr_ngw_4(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() ds_resource_id = gdaltest.ngw_ds.GetMetadataItem('id', '') gdaltest.ngw_ds.SetMetadataItem('test_int.d', '777', 'NGW') gdaltest.ngw_ds.SetMetadataItem('test_float.f', '777.555', 'NGW') gdaltest.ngw_ds.SetMetadataItem('test_string', 'metadata test', 'NGW') gdaltest.ngw_ds = None url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + ds_resource_id gdaltest.ngw_ds = gdal.OpenEx(url, gdal.OF_UPDATE) # gdaltest.ngw_drv.Open(url, update=1) assert gdaltest.ngw_ds is not None, \ 'Open datasource failed.' md_item = gdaltest.ngw_ds.GetMetadataItem('test_int.d', 'NGW') assert md_item == '777', \ 'Did not get expected datasource metadata item. test_int.d is equal {}, but should {}.'.format(md_item, '777') md_item = gdaltest.ngw_ds.GetMetadataItem('test_float.f', 'NGW') assert float(md_item) == pytest.approx(777.555, abs=0.00001), \ 'Did not get expected datasource metadata item. test_float.f is equal {}, but should {}.'.format(md_item, '777.555') md_item = gdaltest.ngw_ds.GetMetadataItem('test_string', 'NGW') assert md_item == 'metadata test', \ 'Did not get expected datasource metadata item. test_string is equal {}, but should {}.'.format(md_item, 'metadata test') resource_type = gdaltest.ngw_ds.GetMetadataItem('resource_type', '') assert resource_type is not None, 'Did not get expected datasource metadata item. Resourse type should be present.' def create_fields(lyr): fld_defn = ogr.FieldDefn('STRFIELD', ogr.OFTString) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_0_ALIAS', 'String field test') fld_defn = ogr.FieldDefn('DECFIELD', ogr.OFTInteger) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_1_ALIAS', 'Integer field test') fld_defn = ogr.FieldDefn('BIGDECFIELD', ogr.OFTInteger64) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_2_ALIAS', 'Integer64 field test') fld_defn = ogr.FieldDefn('REALFIELD', ogr.OFTReal) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_3_ALIAS', 'Real field test') fld_defn = ogr.FieldDefn('DATEFIELD', ogr.OFTDate) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_4_ALIAS', 'Date field test') fld_defn = ogr.FieldDefn('TIMEFIELD', ogr.OFTTime) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_5_ALIAS', 'Time field test') fld_defn = ogr.FieldDefn('DATETIMEFLD', ogr.OFTDateTime) lyr.CreateField(fld_defn) lyr.SetMetadataItem('FIELD_6_ALIAS', 'Date & time field test') def fill_fields(f): f.SetField('STRFIELD', "fo_o") f.SetField('DECFIELD', 123) f.SetField('BIGDECFIELD', 12345678901234) f.SetField('REALFIELD', 1.23) f.SetField('DATETIMEFLD', '2014/12/04 12:34:56') def fill_fields2(f): f.SetField('STRFIELD', "русский") f.SetField('DECFIELD', 321) f.SetField('BIGDECFIELD', 32145678901234) f.SetField('REALFIELD', 21.32) f.SetField('DATETIMEFLD', '2019/12/31 21:43:56') def add_metadata(lyr): lyr.SetMetadataItem('test_int.d', '777', 'NGW') lyr.SetMetadataItem('test_float.f', '777,555', 'NGW') lyr.SetMetadataItem('test_string', 'metadata test', 'NGW') ############################################################################### # Check create vector layers. def test_ogr_ngw_5(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() sr = osr.SpatialReference() sr.ImportFromEPSG(3857) lyr = gdaltest.ngw_ds.CreateLayer('test_pt_layer', srs=sr, geom_type=ogr.wkbMultiPoint, options=['OVERWRITE=YES', 'DESCRIPTION=Test point layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) # Test duplicated names. fld_defn = ogr.FieldDefn('STRFIELD', ogr.OFTString) assert lyr.CreateField(fld_defn) != 0, 'Expected not to create duplicated field' # Test forbidden field names. gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') fld_defn = ogr.FieldDefn('id', ogr.OFTInteger) lyr.CreateField(fld_defn) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'Expecting a warning' add_metadata(lyr) lyr = gdaltest.ngw_ds.CreateLayer('test_ln_layer', srs=sr, geom_type=ogr.wkbMultiLineString, options=['OVERWRITE=YES', 'DESCRIPTION=Test line layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) add_metadata(lyr) lyr = gdaltest.ngw_ds.CreateLayer('test_pl_layer', srs=sr, geom_type=ogr.wkbMultiPolygon, options=['OVERWRITE=YES', 'DESCRIPTION=Test polygon layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) add_metadata(lyr) # Test overwrite lyr = gdaltest.ngw_ds.CreateLayer('test_pt_layer', srs=sr, geom_type=ogr.wkbPoint, options=['OVERWRITE=YES', 'DESCRIPTION=Test point layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) add_metadata(lyr) lyr = gdaltest.ngw_ds.CreateLayer('test_ln_layer', srs=sr, geom_type=ogr.wkbLineString, options=['OVERWRITE=YES', 'DESCRIPTION=Test line layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) add_metadata(lyr) lyr = gdaltest.ngw_ds.CreateLayer('test_pl_layer', srs=sr, geom_type=ogr.wkbPolygon, options=['OVERWRITE=YES', 'DESCRIPTION=Test polygon layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) add_metadata(lyr) # Test without overwrite lyr = gdaltest.ngw_ds.CreateLayer('test_pl_layer', srs=sr, geom_type=ogr.wkbMultiPolygon, options=['OVERWRITE=NO', 'DESCRIPTION=Test polygon layer 1']) assert lyr is None, 'Create layer without overwrite should fail.' lyr = gdaltest.ngw_ds.CreateLayer('test_pl_layer', srs=sr, geom_type=ogr.wkbMultiPolygon, options=['DESCRIPTION=Test point layer 1']) assert lyr is None, 'Create layer without overwrite should fail.' # Test geometry with Z lyr = gdaltest.ngw_ds.CreateLayer('test_plz_layer', srs=sr, geom_type=ogr.wkbMultiPolygon25D, options=['OVERWRITE=YES', 'DESCRIPTION=Test polygonz layer']) assert lyr is not None, 'Create layer failed.' create_fields(lyr) add_metadata(lyr) ds_resource_id = gdaltest.ngw_ds.GetMetadataItem('id', '') gdaltest.ngw_ds = None url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + ds_resource_id gdaltest.ngw_ds = gdal.OpenEx(url, gdal.OF_UPDATE) # gdaltest.ngw_drv.Open(url, update=1) assert gdaltest.ngw_ds is not None, 'Open datasource failed.' for layer_name in ['test_pt_layer', 'test_ln_layer', 'test_pl_layer', 'test_plz_layer']: lyr = gdaltest.ngw_ds.GetLayerByName(layer_name) assert lyr is not None, 'Get layer {} failed.'.format(layer_name) md_item = lyr.GetMetadataItem('test_int.d', 'NGW') assert md_item == '777', \ 'Did not get expected layer metadata item. test_int.d is equal {}, but should {}.'.format(md_item, '777') md_item = lyr.GetMetadataItem('test_float.f', 'NGW') assert float(md_item) == pytest.approx(777.555, abs=0.00001), \ 'Did not get expected layer metadata item. test_float.f is equal {}, but should {}.'.format(md_item, '777.555') md_item = lyr.GetMetadataItem('test_string', 'NGW') assert md_item == 'metadata test', \ 'Did not get expected layer metadata item. test_string is equal {}, but should {}.'.format(md_item, 'metadata test') resource_type = lyr.GetMetadataItem('resource_type', '') assert resource_type is not None, 'Did not get expected layer metadata item. Resourse type should be present.' assert lyr.GetGeomType() != ogr.wkbUnknown and lyr.GetGeomType() != ogr.wkbNone ############################################################################### # Check open single vector layer. def test_ogr_ngw_6(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') lyr_resource_id = lyr.GetMetadataItem('id', '') url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + lyr_resource_id ds = gdal.OpenEx(url) assert ds is not None and ds.GetLayerCount() == 1, \ 'Failed to open single vector layer.' ############################################################################### # Check insert, update and delete features. def test_ogr_ngw_7(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') f = ogr.Feature(lyr.GetLayerDefn()) fill_fields(f) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) ret = lyr.CreateFeature(f) assert ret == 0 and f.GetFID() >= 0, \ 'Create feature failed. Expected FID greater or equal 0, got {}.'.format(f.GetFID()) fill_fields2(f) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (3 4)')) ret = lyr.SetFeature(f) assert ret == 0, 'Failed to update feature #{}.'.format(f.GetFID()) lyr.DeleteFeature(f.GetFID()) # Expected fail to get feature gdal.PushErrorHandler() f = lyr.GetFeature(f.GetFID()) gdal.PopErrorHandler() assert f is None, 'Failed to delete feature #{}.'.format(f.GetFID()) ############################################################################### # Check insert, update features in batch mode. def test_ogr_ngw_8(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() ds_resource_id = gdaltest.ngw_ds.GetMetadataItem('id', '') gdaltest.ngw_ds = None url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + ds_resource_id gdaltest.ngw_ds = gdal.OpenEx(url, gdal.OF_UPDATE, open_options=['BATCH_SIZE=2']) lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') f1 = ogr.Feature(lyr.GetLayerDefn()) fill_fields(f1) f1.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) ret = lyr.CreateFeature(f1) assert ret == 0 and f1.GetFID() < 0 f2 = ogr.Feature(lyr.GetLayerDefn()) fill_fields2(f2) f2.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 3)')) ret = lyr.CreateFeature(f2) assert ret == 0 and f2.GetFID() < 0 f3 = ogr.Feature(lyr.GetLayerDefn()) fill_fields(f3) f3.SetGeometry(ogr.CreateGeometryFromWkt('POINT (3 4)')) ret = lyr.CreateFeature(f3) assert ret == 0 ret = lyr.SyncToDisk() assert ret == 0 lyr.ResetReading() feat = lyr.GetNextFeature() counter = 0 while feat is not None: counter += 1 assert feat.GetFID() >= 0, 'Expected FID greater or equal 0, got {}.'.format(feat.GetFID()) feat = lyr.GetNextFeature() assert counter >= 3, 'Expected 3 or greater feature count, got {}.'.format(counter) ############################################################################### # Check paging while GetNextFeature. def test_ogr_ngw_9(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() ds_resource_id = gdaltest.ngw_ds.GetMetadataItem('id', '') gdaltest.ngw_ds = None url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + ds_resource_id gdaltest.ngw_ds = gdal.OpenEx(url, gdal.OF_UPDATE, open_options=['PAGE_SIZE=2']) lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') lyr.ResetReading() feat = lyr.GetNextFeature() counter = 0 while feat is not None: counter += 1 assert feat.GetFID() >= 0, 'Expected FID greater or equal 0, got {}.'.format(feat.GetFID()) feat = lyr.GetNextFeature() assert counter >= 3, 'Expected 3 or greater feature count, got {}.'.format(counter) ############################################################################### # Check native data. def test_ogr_ngw_10(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() ds_resource_id = gdaltest.ngw_ds.GetMetadataItem('id', '') gdaltest.ngw_ds = None url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + ds_resource_id gdaltest.ngw_ds = gdal.OpenEx(url, gdal.OF_UPDATE, open_options=['NATIVE_DATA=YES']) lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') lyr.ResetReading() feat = lyr.GetNextFeature() feature_id = feat.GetFID() native_data = feat.GetNativeData() assert native_data is not None, 'Feature #{} native data should not be empty'.format(feature_id) # {"description":null,"attachment":null} assert feat.GetNativeMediaType() == 'application/json', 'Unsupported native media type' # Set description feat.SetNativeData('{"description":"Test feature description"}') ret = lyr.SetFeature(feat) assert ret == 0, 'Failed to update feature #{}.'.format(feature_id) feat = lyr.GetFeature(feature_id) native_data = feat.GetNativeData() assert native_data is not None and native_data.find('Test feature description') != -1, 'Expected feature description text, got {}'.format(native_data) ############################################################################### # Check ignored fields works ok def test_ogr_ngw_11(): if gdaltest.ngw_drv is None or gdaltest.ngw_ds is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') lyr.SetIgnoredFields(['STRFIELD']) feat = lyr.GetNextFeature() assert not feat.IsFieldSet('STRFIELD'), 'got STRFIELD despite request to ignore it.' assert feat.GetFieldAsInteger('DECFIELD') == 123, 'missing or wrong DECFIELD' fd = lyr.GetLayerDefn() fld = fd.GetFieldDefn(0) # STRFIELD assert fld.IsIgnored(), 'STRFIELD unexpectedly not marked as ignored.' fld = fd.GetFieldDefn(1) # DECFIELD assert not fld.IsIgnored(), 'DECFIELD unexpectedly marked as ignored.' assert not fd.IsGeometryIgnored(), 'geometry unexpectedly ignored.' assert not fd.IsStyleIgnored(), 'style unexpectedly ignored.' feat = None lyr = None ############################################################################### # Check attribute filter. def test_ogr_ngw_12(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') lyr.SetAttributeFilter("STRFIELD = 'русский'") fc = lyr.GetFeatureCount() assert fc == 1, 'Expected feature count is 1, got {}.'.format(fc) lyr.SetAttributeFilter("STRFIELD = 'fo_o' AND DECFIELD = 321") fc = lyr.GetFeatureCount() assert fc == 0, 'Expected feature count is 0, got {}.'.format(fc) lyr.SetAttributeFilter('NGW:fld_STRFIELD=fo_o&fld_DECFIELD=123') fc = lyr.GetFeatureCount() assert fc == 2, 'Expected feature count is 2, got {}.'.format(fc) lyr.SetAttributeFilter("DECFIELD < 321") fc = lyr.GetFeatureCount() assert fc == 2, 'Expected feature count is 2, got {}.'.format(fc) lyr.SetAttributeFilter('NGW:fld_REALFIELD__gt=1.5') fc = lyr.GetFeatureCount() assert fc == 1, 'Expected feature count is 1, got {}.'.format(fc) lyr.SetAttributeFilter("STRFIELD ILIKE '%O_O'") fc = lyr.GetFeatureCount() assert fc == 2, 'Expected feature count is 2, got {}.'.format(fc) ############################################################################### # Check spatial filter. def test_ogr_ngw_13(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() lyr = gdaltest.ngw_ds.GetLayerByName('test_pt_layer') # Reset any attribute filters lyr.SetAttributeFilter(None) # Check intersecting POINT(3 4) lyr.SetSpatialFilter(ogr.CreateGeometryFromWkt('POLYGON ((2.5 3.5,2.5 6,6 6,6 3.5,2.5 3.5))')) fc = lyr.GetFeatureCount() assert fc == 1, 'Expected feature count is 1, got {}.'.format(fc) ############################################################################### # Check ExecuteSQL. def test_ogr_ngw_14(): if gdaltest.ngw_drv is None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() gdaltest.ngw_ds.ExecuteSQL('DELLAYER:test_ln_layer') lyr = gdaltest.ngw_ds.GetLayerByName('test_ln_layer') assert lyr is None, 'Expected fail to get layer test_ln_layer.' lyr = gdaltest.ngw_ds.GetLayerByName('test_pl_layer') f = ogr.Feature(lyr.GetLayerDefn()) fill_fields(f) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 0,0 0))')) ret = lyr.CreateFeature(f) assert ret == 0, 'Failed to create feature in test_pl_layer.' assert lyr.GetFeatureCount() == 1, 'Expected feature count is 1, got {}.'.format(lyr.GetFeatureCount()) gdaltest.ngw_ds.ExecuteSQL('DELETE FROM test_pl_layer') assert lyr.GetFeatureCount() == 0, 'Expected feature count is 0, got {}.'.format(lyr.GetFeatureCount()) gdaltest.ngw_ds.ExecuteSQL('ALTER TABLE test_pl_layer RENAME TO test_pl_layer777') lyr = gdaltest.ngw_ds.GetLayerByName('test_pl_layer777') assert lyr is not None, 'Get layer test_pl_layer777 failed.' # Create 2 new features f = ogr.Feature(lyr.GetLayerDefn()) fill_fields(f) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 0,0 0))')) ret = lyr.CreateFeature(f) assert ret == 0, 'Failed to create feature in test_pl_layer777.' f = ogr.Feature(lyr.GetLayerDefn()) fill_fields2(f) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((1 1,1 2,2 1,1 1))')) ret = lyr.CreateFeature(f) assert ret == 0, 'Failed to create feature in test_pl_layer777.' lyr = gdaltest.ngw_ds.ExecuteSQL("SELECT STRFIELD,DECFIELD FROM test_pl_layer777 WHERE STRFIELD = 'fo_o'") assert lyr is not None, 'ExecuteSQL: SELECT STRFIELD,DECFIELD FROM test_pl_layer777 WHERE STRFIELD = "fo_o"; failed.' assert lyr.GetFeatureCount() == 2, 'Expected feature count is 2, got {}.'.format(lyr.GetFeatureCount()) gdaltest.ngw_ds.ReleaseResultSet(lyr) ############################################################################### # Run test_ogrsf def test_ogr_ngw_test_ogrsf(): if gdaltest.ngw_drv is None or gdal.GetConfigOption('SKIP_SLOW') is not None: pytest.skip() if check_availability(gdaltest.ngw_test_server) == False: gdaltest.ngw_drv = None pytest.skip() if gdaltest.skip_on_travis(): pytest.skip() if gdaltest.ngw_ds is None: pytest.skip() url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + gdaltest.group_id import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url) assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url + ' -oo PAGE_SIZE=100') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url + ' -oo BATCH_SIZE=5') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url + ' -oo BATCH_SIZE=5 -oo PAGE_SIZE=100') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Cleanup def test_ogr_ngw_cleanup(): if gdaltest.ngw_drv is None: pytest.skip() if gdaltest.group_id is not None: delete_url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + gdaltest.group_id gdaltest.ngw_layer = None gdaltest.ngw_ds = None assert gdaltest.ngw_drv.Delete(delete_url) == gdal.CE_None, \ 'Failed to delete datasource ' + delete_url + '.' gdaltest.ngw_ds = None �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_sqlite.py����������������������������������������������������������������0000775�0001750�0001750�00000320275�13701057761�016227� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_sqlite.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test SQLite driver functionality. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2004, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2008-2014, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import pytest from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest import ogrtest pytestmark = [ pytest.mark.require_driver('SQLite'), ] ############################################################################### # Test if SpatiaLite is available @pytest.fixture(autouse=True, scope='module') def setup(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/foo.db', options=['SPATIALITE=YES']) gdaltest.spatialite_version = None if ds is not None: sql_lyr = ds.ExecuteSQL("SELECT spatialite_version()") feat = sql_lyr.GetNextFeature() gdaltest.spatialite_version = feat.GetFieldAsString(0) print('Spatialite : %s' % gdaltest.spatialite_version) ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/foo.db') gdal.PopErrorHandler() @pytest.fixture() def require_spatialite(setup): if gdaltest.spatialite_version is None: pytest.skip('Spatialite not available') return gdaltest.spatialite_version @pytest.fixture(params=['no-spatialite', 'spatialite']) def with_and_without_spatialite(request): if request.param == 'spatialite': return gdaltest.spatialite_version else: return None ############################################################################### # Create a fresh database. def test_ogr_sqlite_1(): gdaltest.sl_ds = None sqlite_dr = ogr.GetDriverByName('SQLite') if sqlite_dr is None: pytest.skip() try: os.remove('tmp/sqlite_test.db') except OSError: pass # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') gdaltest.sl_ds = sqlite_dr.CreateDataSource('tmp/sqlite_test.db') assert gdaltest.sl_ds is not None ############################################################################### # Create table from data/poly.shp def test_ogr_sqlite_2(): if gdaltest.sl_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.sl_ds.ExecuteSQL('DELLAYER:tpoly') gdal.PopErrorHandler() # Test invalid FORMAT gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.sl_ds.CreateLayer('will_fail', options=['FORMAT=FOO']) gdal.PopErrorHandler() assert lyr is None, 'layer creation should have failed' # Test creating a layer with an existing name lyr = gdaltest.sl_ds.CreateLayer('a_layer') gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.sl_ds.CreateLayer('a_layer') gdal.PopErrorHandler() assert lyr is None, 'layer creation should have failed' # Test OVERWRITE=YES lyr = gdaltest.sl_ds.CreateLayer('a_layer', options=['FID=my_fid', 'GEOMETRY_NAME=mygeom', 'OVERWRITE=YES']) assert lyr is not None, 'layer creation should have succeeded' ###################################################### # Create Layer gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('tpoly') ###################################################### # Setup Schema fields = [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('BINCONTENT', ogr.OFTBinary), ('INT64', ogr.OFTInteger64)] ogrtest.quick_create_layer_def(gdaltest.sl_lyr, fields) fld_defn = ogr.FieldDefn('fld_boolean', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) gdaltest.sl_lyr.CreateField(fld_defn) ###################################################### # Reopen database to be sure that the data types are properly read # even if no record are written gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('tpoly') assert gdaltest.sl_lyr.GetGeometryColumn() == 'GEOMETRY' for field_desc in fields: feature_def = gdaltest.sl_lyr.GetLayerDefn() field_defn = feature_def.GetFieldDefn(feature_def.GetFieldIndex(field_desc[0])) if field_defn.GetType() != field_desc[1]: print('Expected type for %s is %s, not %s' % (field_desc[0], field_defn.GetFieldTypeName(field_defn.GetType()), field_defn.GetFieldTypeName(field_desc[1]))) field_defn = feature_def.GetFieldDefn(feature_def.GetFieldIndex('fld_boolean')) assert field_defn.GetType() == ogr.OFTInteger and field_defn.GetSubType() == ogr.OFSTBoolean field_defn = feature_def.GetFieldDefn(feature_def.GetFieldIndex('INT64')) assert field_defn.GetType() == ogr.OFTInteger64 assert gdaltest.sl_ds.GetLayerByName('a_layer').GetGeometryColumn() == 'mygeom' assert gdaltest.sl_ds.GetLayerByName('a_layer').GetFIDColumn() == 'my_fid' ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] gdaltest.sl_lyr.StartTransaction() while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) dst_feat.SetField('int64', 1234567890123) gdaltest.sl_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() gdaltest.sl_lyr.CommitTransaction() ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_sqlite_3(): if gdaltest.sl_ds is None: pytest.skip() assert gdaltest.sl_lyr.GetFeatureCount() == 10 expect = [168, 169, 166, 158, 165] gdaltest.sl_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.sl_lyr, 'eas_id', expect) assert gdaltest.sl_lyr.GetFeatureCount() == 5 gdaltest.sl_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.sl_lyr.GetNextFeature() assert read_feat is not None, 'Did not get as many features as expected.' assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) if read_feat.GetField('int64') != 1234567890123: read_feat.DumpReadable() pytest.fail() gdaltest.poly_feat = None gdaltest.shp_ds = None assert tr ############################################################################### # Write more features with a bunch of different geometries, and verify the # geometries are still OK. def test_ogr_sqlite_4(): if gdaltest.sl_ds is None: pytest.skip() dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) wkt_list = ['10', '2', '1', '3d_1', '4', '5', '6'] for item in wkt_list: wkt = open('data/wkb_wkt/' + item + '.wkt').read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Write geometry as a new feature. dst_feat.SetGeometryDirectly(geom) dst_feat.SetField('PRFEDEA', item) dst_feat.SetFID(-1) gdaltest.sl_lyr.CreateFeature(dst_feat) ###################################################################### # Read back the feature and get the geometry. gdaltest.sl_lyr.SetAttributeFilter("PRFEDEA = '%s'" % item) feat_read = gdaltest.sl_lyr.GetNextFeature() assert feat_read is not None, 'Did not get as many features as expected.' assert ogrtest.check_feature_geometry(feat_read, geom) == 0 ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_sqlite_5(): if gdaltest.sl_ds is None: pytest.skip() expect = [179, 173, 172, 171, 170, 169, 168, 166, 165, 158, None] sql_lyr = gdaltest.sl_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') assert sql_lyr.GetFeatureCount() == 11 tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_sqlite_6(): if gdaltest.sl_ds is None: pytest.skip() sql_lyr = gdaltest.sl_ds.ExecuteSQL("select * from tpoly where prfedea = '2'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['2']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'MULTILINESTRING ((5.00121349 2.99853132,5.00121349 1.99853133),(5.00121349 1.99853133,5.00121349 0.99853133),(3.00121351 1.99853127,5.00121349 1.99853133),(5.00121349 1.99853133,6.00121348 1.99853135))') != 0: tr = 0 gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_sqlite_7(): if gdaltest.sl_ds is None: pytest.skip() gdaltest.sl_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.sl_lyr.SetSpatialFilter(geom) geom.Destroy() assert gdaltest.sl_lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(gdaltest.sl_lyr, 'eas_id', [158]) gdaltest.sl_lyr.SetAttributeFilter('eas_id = 158') assert gdaltest.sl_lyr.GetFeatureCount() == 1 gdaltest.sl_lyr.SetAttributeFilter(None) gdaltest.sl_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Test transactions with rollback. def test_ogr_sqlite_8(): if gdaltest.sl_ds is None: pytest.skip() ###################################################################### # Prepare working feature. dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(10 20)')) dst_feat.SetField('PRFEDEA', 'rollbacktest') ###################################################################### # Create it, but rollback the transaction. gdaltest.sl_lyr.StartTransaction() gdaltest.sl_lyr.CreateFeature(dst_feat) gdaltest.sl_lyr.RollbackTransaction() ###################################################################### # Verify that it is not in the layer. gdaltest.sl_lyr.SetAttributeFilter("PRFEDEA = 'rollbacktest'") feat_read = gdaltest.sl_lyr.GetNextFeature() gdaltest.sl_lyr.SetAttributeFilter(None) assert feat_read is None, 'Unexpectedly got rollbacktest feature.' ###################################################################### # Create it, and commit the transaction. gdaltest.sl_lyr.StartTransaction() gdaltest.sl_lyr.CreateFeature(dst_feat) gdaltest.sl_lyr.CommitTransaction() ###################################################################### # Verify that it is not in the layer. gdaltest.sl_lyr.SetAttributeFilter("PRFEDEA = 'rollbacktest'") feat_read = gdaltest.sl_lyr.GetNextFeature() gdaltest.sl_lyr.SetAttributeFilter(None) assert feat_read is not None, 'Failed to get committed feature.' feat_read.Destroy() dst_feat.Destroy() ############################################################################### # Test SetFeature() def test_ogr_sqlite_9(): if gdaltest.sl_ds is None: pytest.skip() ###################################################################### # Read feature with EAS_ID 158. gdaltest.sl_lyr.SetAttributeFilter("eas_id = 158") feat_read = gdaltest.sl_lyr.GetNextFeature() gdaltest.sl_lyr.SetAttributeFilter(None) assert feat_read is not None, 'did not find eas_id 158!' ###################################################################### # Modify the PRFEDEA value, and reset it. feat_read.SetField('PRFEDEA', 'SetWorked') err = gdaltest.sl_lyr.SetFeature(feat_read) assert err == 0, ('SetFeature() reported error %d' % err) ###################################################################### # Read feature with EAS_ID 158 and check that PRFEDEA was altered. gdaltest.sl_lyr.SetAttributeFilter("eas_id = 158") feat_read_2 = gdaltest.sl_lyr.GetNextFeature() gdaltest.sl_lyr.SetAttributeFilter(None) assert feat_read_2 is not None, 'did not find eas_id 158!' if feat_read_2.GetField('PRFEDEA') != 'SetWorked': feat_read_2.DumpReadable() pytest.fail('PRFEDEA apparently not reset as expected.') # Test updating non-existing feature feat_read.SetFID(-10) assert gdaltest.sl_lyr.SetFeature(feat_read) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of SetFeature().' # Test deleting non-existing feature assert gdaltest.sl_lyr.DeleteFeature(-10) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of DeleteFeature().' feat_read.Destroy() feat_read_2.Destroy() ############################################################################### # Test GetFeature() def test_ogr_sqlite_10(): if gdaltest.sl_ds is None: pytest.skip() ###################################################################### # Read feature with EAS_ID 158. gdaltest.sl_lyr.SetAttributeFilter("eas_id = 158") feat_read = gdaltest.sl_lyr.GetNextFeature() gdaltest.sl_lyr.SetAttributeFilter(None) assert feat_read is not None, 'did not find eas_id 158!' ###################################################################### # Now read the feature by FID. feat_read_2 = gdaltest.sl_lyr.GetFeature(feat_read.GetFID()) assert feat_read_2 is not None, ('did not find FID %d' % feat_read.GetFID()) if feat_read_2.GetField('PRFEDEA') != feat_read.GetField('PRFEDEA'): feat_read.DumpReadable() feat_read_2.DumpReadable() pytest.fail('GetFeature() result seems to not match expected.') ############################################################################### # Test FORMAT=WKB creation option def test_ogr_sqlite_11(): if gdaltest.sl_ds is None: pytest.skip() ###################################################### # Create Layer with WKB geometry gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('geomwkb', options=['FORMAT=WKB']) geom = ogr.CreateGeometryFromWkt('POINT(0 1)') dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) gdaltest.sl_lyr.CreateFeature(dst_feat) dst_feat = None # Test adding a column to see if geometry is preserved (#3471) gdaltest.sl_lyr.CreateField(ogr.FieldDefn("foo", ogr.OFTString)) ###################################################### # Reopen DB gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('geomwkb') feat_read = gdaltest.sl_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom, max_error=0.001) == 0 gdaltest.sl_lyr.ResetReading() ############################################################################### # Test FORMAT=WKT creation option def test_ogr_sqlite_12(): if gdaltest.sl_ds is None: pytest.skip() ###################################################### # Create Layer with WKT geometry gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('geomwkt', options=['FORMAT=WKT']) geom = ogr.CreateGeometryFromWkt('POINT(0 1)') dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) gdaltest.sl_lyr.CreateFeature(dst_feat) dst_feat = None # Test adding a column to see if geometry is preserved (#3471) gdaltest.sl_lyr.CreateField(ogr.FieldDefn("foo", ogr.OFTString)) ###################################################### # Reopen DB gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('geomwkt') feat_read = gdaltest.sl_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom, max_error=0.001) == 0 feat_read = None gdaltest.sl_lyr.ResetReading() sql_lyr = gdaltest.sl_ds.ExecuteSQL("select * from geomwkt") feat_read = sql_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom, max_error=0.001) == 0 feat_read = None feat_read = sql_lyr.GetFeature(0) assert ogrtest.check_feature_geometry(feat_read, geom, max_error=0.001) == 0 feat_read = None gdaltest.sl_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test SRID support def test_ogr_sqlite_13(): if gdaltest.sl_ds is None: pytest.skip() ###################################################### # Create Layer with EPSG:4326 srs = osr.SpatialReference() srs.ImportFromEPSG(4326) gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('wgs84layer', srs=srs) ###################################################### # Reopen DB gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('wgs84layer') assert gdaltest.sl_lyr.GetSpatialRef().IsSame(srs, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']), 'SRS is not the one expected.' ###################################################### # Create second layer with very approximative EPSG:4326 srs = osr.SpatialReference() srs.SetFromUserInput('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]') gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('wgs84layer_approx', srs=srs) # Must still be 1 sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT COUNT(*) AS count FROM spatial_ref_sys") feat = sql_lyr.GetNextFeature() assert feat.GetFieldAsInteger('count') == 1 gdaltest.sl_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test all column types def test_ogr_sqlite_14(): if gdaltest.sl_ds is None: pytest.skip() gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('testtypes') ogrtest.quick_create_layer_def(gdaltest.sl_lyr, [('INTEGER', ogr.OFTInteger), ('FLOAT', ogr.OFTReal), ('STRING', ogr.OFTString), ('BLOB', ogr.OFTBinary), ('BLOB2', ogr.OFTBinary)]) dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) dst_feat.SetField('INTEGER', 1) dst_feat.SetField('FLOAT', 1.2) dst_feat.SetField('STRING', 'myString\'a') dst_feat.SetFieldBinaryFromHexString('BLOB', '0001FF') gdaltest.sl_lyr.CreateFeature(dst_feat) ###################################################### # Reopen DB gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('testtypes') # Duplicate the first record dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) feat_read = gdaltest.sl_lyr.GetNextFeature() dst_feat.SetFrom(feat_read) gdaltest.sl_lyr.CreateFeature(dst_feat) # Check the 2 records gdaltest.sl_lyr.ResetReading() for _ in range(2): feat_read = gdaltest.sl_lyr.GetNextFeature() assert (feat_read.GetField('INTEGER') == 1 and \ feat_read.GetField('FLOAT') == 1.2 and \ feat_read.GetField('STRING') == 'myString\'a' and \ feat_read.GetFieldAsString('BLOB') == '0001FF') gdaltest.sl_lyr.ResetReading() ############################################################################### # Test FORMAT=SPATIALITE layer creation option def test_ogr_sqlite_15(): if gdaltest.sl_ds is None: pytest.skip() ###################################################### # Create Layer with SPATIALITE geometry with gdaltest.error_handler(): gdaltest.sl_lyr = gdaltest.sl_ds.CreateLayer('geomspatialite', options=['FORMAT=SPATIALITE']) geoms = [ogr.CreateGeometryFromWkt('POINT(0 1)'), ogr.CreateGeometryFromWkt('MULTIPOINT EMPTY'), ogr.CreateGeometryFromWkt('MULTIPOINT (0 1,2 3)'), ogr.CreateGeometryFromWkt('LINESTRING EMPTY'), ogr.CreateGeometryFromWkt('LINESTRING (1 2,3 4)'), ogr.CreateGeometryFromWkt('MULTILINESTRING EMPTY'), ogr.CreateGeometryFromWkt('MULTILINESTRING ((1 2,3 4),(5 6,7 8))'), ogr.CreateGeometryFromWkt('POLYGON EMPTY'), ogr.CreateGeometryFromWkt('POLYGON ((1 2,3 4))'), ogr.CreateGeometryFromWkt('POLYGON ((1 2,3 4),(5 6,7 8))'), ogr.CreateGeometryFromWkt('MULTIPOLYGON EMPTY'), ogr.CreateGeometryFromWkt('MULTIPOLYGON (((1 2,3 4)),((5 6,7 8)))'), ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION EMPTY'), ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POLYGON ((1 2,3 4)),POLYGON ((5 6,7 8)))'), ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POLYGON ((1 2,3 4)),POINT(0 1))')] gdaltest.sl_lyr.StartTransaction() for geom in geoms: dst_feat = ogr.Feature(feature_def=gdaltest.sl_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) gdaltest.sl_lyr.CreateFeature(dst_feat) gdaltest.sl_lyr.CommitTransaction() ###################################################### # Reopen DB gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db') # Test creating a layer on a read-only DB gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.sl_ds.CreateLayer('will_fail') gdal.PopErrorHandler() assert lyr is None, 'layer creation should have failed' gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('geomspatialite') for geom in geoms: feat_read = gdaltest.sl_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom, max_error=0.001) == 0 gdaltest.sl_lyr.ResetReading() sql_lyr = gdaltest.sl_ds.ExecuteSQL("select * from geomspatialite") feat_read = sql_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geoms[0], max_error=0.001) == 0 feat_read = sql_lyr.GetFeature(0) assert ogrtest.check_feature_geometry(feat_read, geoms[0], max_error=0.001) == 0 gdaltest.sl_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test reading geometries in FGF (FDO Geometry Format) binary representation. def test_ogr_sqlite_16(): if gdaltest.sl_ds is None: pytest.skip() ###################################################### # Reopen DB in update gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) # Hand create a table with FGF geometry gdaltest.sl_ds.ExecuteSQL("INSERT INTO geometry_columns (f_table_name, f_geometry_column, geometry_type, coord_dimension, geometry_format) VALUES ('fgf_table', 'GEOMETRY', 0, 2, 'FGF')") gdaltest.sl_ds.ExecuteSQL("CREATE TABLE fgf_table (OGC_FID INTEGER PRIMARY KEY, GEOMETRY BLOB)") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (1, X'0100000000000000000000000000F03F0000000000000040')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (2, X'020000000000000000000000')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (3, X'020000000000000002000000000000000000F03F000000000000004000000000000008400000000000001040')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (4, X'030000000000000000000000')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (5, X'03000000000000000200000002000000000000000000F03F00000000000000400000000000000840000000000000104000000000')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (6, X'0700000000000000')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (7, X'070000000200000003000000000000000200000002000000000000000000F03F0000000000000040000000000000084000000000000010400000000003000000000000000200000002000000000000000000F03F00000000000000400000000000000840000000000000104000000000')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (8, X'0100000001000000000000000000F03F00000000000000400000000000000840')") # invalid geometries gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (9, X'0700000001000000')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (10,X'060000000100000001')") gdaltest.sl_ds.ExecuteSQL("INSERT INTO fgf_table (OGC_FID, GEOMETRY) VALUES (11,X'06000000010000000100000000000000000000000000F03F0000000000000040')") ###################################################### # Reopen DB gdaltest.sl_ds = None gdaltest.sl_ds = ogr.Open('tmp/sqlite_test.db', update=1) gdaltest.sl_lyr = gdaltest.sl_ds.GetLayerByName('fgf_table') feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (1 2)' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'LINESTRING EMPTY' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'LINESTRING (1 2,3 4)' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POLYGON EMPTY' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POLYGON ((1 2,3 4))' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'GEOMETRYCOLLECTION EMPTY' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'GEOMETRYCOLLECTION (POLYGON ((1 2,3 4)),POLYGON ((1 2,3 4)))' feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (1 2 3)' # Test invalid geometries for _ in range(3): feat = gdaltest.sl_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom is None gdaltest.sl_lyr.ResetReading() ############################################################################### # Test SPATIALITE dataset creation option def test_ogr_sqlite_17(require_spatialite): if gdaltest.sl_ds is None: pytest.skip() ###################################################### # Create dataset with SPATIALITE geometry with gdaltest.error_handler(): ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/spatialite_test.db', options=['SPATIALITE=YES']) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('will_fail', options=['FORMAT=WKB']) gdal.PopErrorHandler() assert lyr is None, 'layer creation should have failed' srs = osr.SpatialReference() srs.SetFromUserInput("""GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]""") lyr = ds.CreateLayer('geomspatialite', srs=srs) geom = ogr.CreateGeometryFromWkt('POINT(0 1)') dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) lyr.CreateFeature(dst_feat) ###################################################### # Reopen DB ds = None ds = ogr.Open('tmp/spatialite_test.db') lyr = ds.GetLayerByName('geomspatialite') feat_read = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom, max_error=0.001) == 0 srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('4326') != -1, 'did not identify correctly SRS' ############################################################################### # Create a layer with a non EPSG SRS into a SPATIALITE DB (#3506) def test_ogr_sqlite_18(require_spatialite): if gdaltest.sl_ds is None: pytest.skip() ds = ogr.Open('tmp/spatialite_test.db', update=1) srs = osr.SpatialReference() srs.SetFromUserInput('+proj=vandg') lyr = ds.CreateLayer('nonepsgsrs', srs=srs) ###################################################### # Reopen DB ds = None ds = ogr.Open('tmp/spatialite_test.db') lyr = ds.GetLayerByName('nonepsgsrs') srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('VanDerGrinten') != -1, 'did not identify correctly SRS' sql_lyr = ds.ExecuteSQL("SELECT * FROM spatial_ref_sys ORDER BY srid DESC LIMIT 1") feat = sql_lyr.GetNextFeature() if feat.GetField('auth_name') != 'OGR' or \ feat.GetField('proj4text').find('+proj=vandg') != 0: feat.DumpReadable() pytest.fail() gdaltest.sl_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Create a SpatiaLite DB with INIT_WITH_EPSG=YES def test_ogr_sqlite_19(require_spatialite): if gdaltest.sl_ds is None: pytest.skip() if int(gdal.VersionInfo('VERSION_NUM')) < 1800: pytest.skip() if require_spatialite != '2.3.1': pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/spatialite_test_with_epsg.db', options=['SPATIALITE=YES', 'INIT_WITH_EPSG=YES']) # EPSG:26632 has a ' character in it's WKT representation srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:26632') ds.CreateLayer('test', srs=srs) ds = None ds = ogr.Open('tmp/spatialite_test_with_epsg.db') sql_lyr = ds.ExecuteSQL("select count(*) from spatial_ref_sys") feat = sql_lyr.GetNextFeature() nb_srs = feat.GetFieldAsInteger(0) ds.ReleaseResultSet(sql_lyr) # Currently the injection of the EPSG DB as proj.4 strings adds 3915 entries assert nb_srs >= 3915, 'did not get expected SRS count' ############################################################################### # Create a SpatiaLite DB with INIT_WITH_EPSG=NO def test_ogr_sqlite_19_bis(require_spatialite): if gdaltest.sl_ds is None: pytest.skip() spatialite_major_ver = int(require_spatialite.split('.')[0]) if spatialite_major_ver < 4: pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/spatialite_test_without_epsg.db', options=['SPATIALITE=YES', 'INIT_WITH_EPSG=NO']) # EPSG:26632 has a ' character in it's WKT representation srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:26632') ds.CreateLayer('test', srs=srs) ds = None ds = ogr.Open('/vsimem/spatialite_test_without_epsg.db') sql_lyr = ds.ExecuteSQL("select count(*) from spatial_ref_sys") feat = sql_lyr.GetNextFeature() nb_srs = feat.GetFieldAsInteger(0) ds.ReleaseResultSet(sql_lyr) assert nb_srs == 1, 'did not get expected SRS count' gdal.Unlink('/vsimem/spatialite_test_without_epsg.db') ############################################################################### # Create a regular DB with INIT_WITH_EPSG=YES def test_ogr_sqlite_20(): if gdaltest.sl_ds is None: pytest.skip() gdal.Unlink('tmp/non_spatialite_test_with_epsg.db') ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/non_spatialite_test_with_epsg.db', options=['INIT_WITH_EPSG=YES']) # EPSG:26632 has a ' character in it's WKT representation srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:26632') ds.CreateLayer('test', srs=srs) ds = None ds = ogr.Open('tmp/non_spatialite_test_with_epsg.db') sql_lyr = ds.ExecuteSQL("select count(*) from spatial_ref_sys") feat = sql_lyr.GetNextFeature() nb_srs = feat.GetFieldAsInteger(0) ds.ReleaseResultSet(sql_lyr) # Currently the injection of the EPSG DB as proj.4 strings adds 3945 entries assert nb_srs >= 3945, 'did not get expected SRS count' ############################################################################### # Test CopyLayer() from a table layer (#3617) def test_ogr_sqlite_21(): if gdaltest.sl_ds is None: pytest.skip() src_lyr = gdaltest.sl_ds.GetLayerByName('tpoly') copy_lyr = gdaltest.sl_ds.CopyLayer(src_lyr, 'tpoly_2') src_lyr_count = src_lyr.GetFeatureCount() copy_lyr_count = copy_lyr.GetFeatureCount() assert src_lyr_count == copy_lyr_count, 'did not get same number of features' ############################################################################### # Test CopyLayer() from a result layer (#3617) def test_ogr_sqlite_22(): if gdaltest.sl_ds is None: pytest.skip() src_lyr = gdaltest.sl_ds.ExecuteSQL('select * from tpoly') copy_lyr = gdaltest.sl_ds.CopyLayer(src_lyr, 'tpoly_3') src_lyr_count = src_lyr.GetFeatureCount() copy_lyr_count = copy_lyr.GetFeatureCount() assert src_lyr_count == copy_lyr_count, 'did not get same number of features' gdaltest.sl_ds.ReleaseResultSet(src_lyr) ############################################################################### # Test ignored fields works ok def test_ogr_sqlite_23(): if gdaltest.sl_ds is None: pytest.skip() shp_layer = gdaltest.sl_ds.GetLayerByName('tpoly') shp_layer.SetIgnoredFields(['AREA']) feat = shp_layer.GetNextFeature() assert not feat.IsFieldSet('AREA'), 'got area despite request to ignore it.' assert feat.GetFieldAsInteger('EAS_ID') == 168, 'missing or wrong eas_id' wkt = 'POLYGON ((479819.84375 4765180.5,479690.1875 4765259.5,479647.0 4765369.5,479730.375 4765400.5,480039.03125 4765539.5,480035.34375 4765558.5,480159.78125 4765610.5,480202.28125 4765482.0,480365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))' assert (ogrtest.check_feature_geometry(feat, wkt, max_error=0.00000001) == 0) fd = shp_layer.GetLayerDefn() fld = fd.GetFieldDefn(0) # area assert fld.IsIgnored(), 'AREA unexpectedly not marked as ignored.' fld = fd.GetFieldDefn(1) # eas_id assert not fld.IsIgnored(), 'EASI unexpectedly marked as ignored.' assert not fd.IsGeometryIgnored(), 'geometry unexpectedly ignored.' assert not fd.IsStyleIgnored(), 'style unexpectedly ignored.' fd.SetGeometryIgnored(1) assert fd.IsGeometryIgnored(), 'geometry unexpectedly not ignored.' feat = shp_layer.GetNextFeature() assert feat.GetGeometryRef() is None, 'Unexpectedly got a geometry on feature 2.' assert not feat.IsFieldSet('AREA'), 'got area despite request to ignore it.' assert feat.GetFieldAsInteger('EAS_ID') == 179, 'missing or wrong eas_id' ############################################################################### # Test that ExecuteSQL() with OGRSQL dialect doesn't forward the where clause to sqlite (#4022) def test_ogr_sqlite_24(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/test24.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/test24.sqlite') lyr = ds.CreateLayer('test') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2 3)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((4 5,6 7))')) lyr.CreateFeature(feat) ds = None ds = ogr.Open('tmp/test24.sqlite') gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.ExecuteSQL('select OGR_GEOMETRY from test') gdal.PopErrorHandler() if lyr is not None: ds.ReleaseResultSet(lyr) pytest.fail('this should not work (1)') lyr = ds.ExecuteSQL('select * from test') lyr.SetAttributeFilter("OGR_GEOMETRY = 'POLYGON'") feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) assert feat is not None, 'a feature was expected (2)' lyr = ds.GetLayerByName('test') lyr.SetAttributeFilter("OGR_GEOMETRY = 'POLYGON'") gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() assert feat is None, 'a feature was not expected (3)' lyr = ds.ExecuteSQL('select OGR_GEOMETRY from test', dialect='OGRSQL') lyr.SetAttributeFilter("OGR_GEOMETRY = 'POLYGON'") feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) assert feat is not None, 'a feature was expected (4)' lyr = ds.ExecuteSQL("select OGR_GEOMETRY from test WHERE OGR_GEOMETRY = 'POLYGON'", dialect='OGRSQL') feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) assert feat is not None, 'a feature was expected (5)' ds = None ############################################################################### # Test opening a /vsicurl/ DB def test_ogr_sqlite_25(): if gdaltest.sl_ds is None: pytest.skip() sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT sqlite_version()") feat = sql_lyr.GetNextFeature() ogrtest.sqlite_version = feat.GetFieldAsString(0) print('SQLite version : %s' % ogrtest.sqlite_version) feat = None gdaltest.sl_ds.ReleaseResultSet(sql_lyr) drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() # Check that we have SQLite VFS support gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_sqlite_25.db') gdal.PopErrorHandler() if ds is None: pytest.skip() ds = None gdal.Unlink('/vsimem/ogr_sqlite_25.db') gdal.SetConfigOption('GDAL_HTTP_TIMEOUT', '5') ds = ogr.Open('/vsicurl/http://download.osgeo.org/gdal/data/sqlite3/polygon.db') gdal.SetConfigOption('GDAL_HTTP_TIMEOUT', None) if ds is None: if gdaltest.gdalurlopen('http://download.osgeo.org/gdal/data/sqlite3/polygon.db', timeout=4) is None: pytest.skip('cannot open URL') pytest.fail() lyr = ds.GetLayerByName('polygon') assert lyr is not None assert lyr.GetLayerDefn().GetFieldCount() != 0 ############################################################################### # Test creating a :memory: DB def test_ogr_sqlite_26(): if gdaltest.sl_ds is None: pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource(':memory:') sql_lyr = ds.ExecuteSQL('select count(*) from geometry_columns') assert sql_lyr is not None, 'expected existing geometry_columns' count = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds = None assert count == 1, 'expected existing geometry_columns' ############################################################################### # Run test_ogrsf def test_ogr_sqlite_27(): if gdaltest.sl_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f SQLite tmp/ogr_sqlite_27.sqlite data/poly.shp --config OGR_SQLITE_SYNCHRONOUS OFF') ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/ogr_sqlite_27.sqlite') pos = ret.find('ERROR: poLayerFeatSRS != NULL && poSQLFeatSRS == NULL.') if pos != -1: # Detect if libsqlite3 has been built with SQLITE_HAS_COLUMN_METADATA # If not, that explains the error. ds = ogr.Open(':memory:') sql_lyr = ds.ExecuteSQL('SQLITE_HAS_COLUMN_METADATA()') feat = sql_lyr.GetNextFeature() val = feat.GetField(0) ds.ReleaseResultSet(sql_lyr) if val == 0: ret = ret[0:pos] + ret[pos + len('ERROR: poLayerFeatSRS != NULL && poSQLFeatSRS == NULL.'):] # And remove ERROR ret code consequently pos = ret.find('ERROR ret code = 1') if pos != -1: ret = ret[0:pos] assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Test on a result SQL layer ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_sqlite_27.sqlite -sql "SELECT * FROM poly"') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Run test_ogrsf on a spatialite enabled DB def test_ogr_sqlite_28(): if gdaltest.sl_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() # Test with a Spatialite 3.0 DB shutil.copy('data/poly_spatialite.sqlite', 'tmp/poly_spatialite.sqlite') ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/poly_spatialite.sqlite') os.unlink('tmp/poly_spatialite.sqlite') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Test on a result SQL layer ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/poly_spatialite.sqlite -sql "SELECT * FROM poly"') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Test with a Spatialite 4.0 DB shutil.copy('data/poly_spatialite4.sqlite', 'tmp/poly_spatialite4.sqlite') ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/poly_spatialite4.sqlite') os.unlink('tmp/poly_spatialite4.sqlite') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Generic test ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -driver SQLite -dsco SPATIALITE=YES') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test CreateFeature() with empty feature def test_ogr_sqlite_29(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_29.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_29.sqlite') lyr = ds.CreateLayer('test') feat = ogr.Feature(lyr.GetLayerDefn()) assert lyr.CreateFeature(feat) == 0 ds = None ############################################################################### # Test ExecuteSQL() with empty result set (#4684) def test_ogr_sqlite_30(): if gdaltest.sl_ds is None: pytest.skip() sql_lyr = gdaltest.sl_ds.ExecuteSQL('SELECT * FROM tpoly WHERE eas_id = 12345') if sql_lyr is None: pytest.skip() # Test fix added in r24768 feat = sql_lyr.GetNextFeature() assert feat is None gdaltest.sl_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test spatial filter when SpatiaLite is available def test_ogr_spatialite_2(require_spatialite): ds = ogr.Open('tmp/spatialite_test.db', update=1) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') lyr = ds.CreateLayer('test_spatialfilter', srs=srs) lyr.CreateField(ogr.FieldDefn('intcol', ogr.OFTInteger)) lyr.StartTransaction() for i in range(10): for j in range(10): geom = ogr.CreateGeometryFromWkt('POINT(%d %d)' % (i, j)) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) lyr.CreateFeature(dst_feat) dst_feat.Destroy() geom = ogr.CreateGeometryFromWkt('POLYGON((0 0,0 3,3 3,3 0,0 0))') dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) lyr.CreateFeature(dst_feat) dst_feat.Destroy() lyr.CommitTransaction() ds = None # Test OLCFastFeatureCount with spatial index (created by default) ds = ogr.Open('tmp/spatialite_test.db', update=0) lyr = ds.GetLayerByName('test_spatialfilter') extent = lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' # Test caching extent = lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' geom = ogr.CreateGeometryFromWkt( 'POLYGON((2 2,2 8,8 8,8 2,2 2))') lyr.SetSpatialFilter(geom) assert lyr.TestCapability(ogr.OLCFastFeatureCount) is not False, \ 'OLCFastFeatureCount failed' assert lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' assert lyr.GetFeatureCount() == 50, 'did not get expected feature count' # Test spatial filter with a SQL result layer without WHERE clause sql_lyr = ds.ExecuteSQL("SELECT * FROM 'test_spatialfilter'") extent = sql_lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' # Test caching extent = sql_lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' sql_lyr.SetSpatialFilter(geom) assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' assert sql_lyr.GetFeatureCount() == 50, 'did not get expected feature count' ds.ReleaseResultSet(sql_lyr) # Test spatial filter with a SQL result layer with WHERE clause sql_lyr = ds.ExecuteSQL('SELECT * FROM test_spatialfilter WHERE 1=1') assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' sql_lyr.SetSpatialFilter(geom) assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' assert sql_lyr.GetFeatureCount() == 50, 'did not get expected feature count' ds.ReleaseResultSet(sql_lyr) # Test spatial filter with a SQL result layer with ORDER BY clause sql_lyr = ds.ExecuteSQL('SELECT * FROM test_spatialfilter ORDER BY intcol') extent = sql_lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' # Test caching extent = sql_lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' sql_lyr.SetSpatialFilter(geom) assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' assert sql_lyr.GetFeatureCount() == 50, 'did not get expected feature count' ds.ReleaseResultSet(sql_lyr) # Test spatial filter with a SQL result layer with WHERE and ORDER BY clause sql_lyr = ds.ExecuteSQL('SELECT * FROM test_spatialfilter WHERE 1 = 1 ORDER BY intcol') extent = sql_lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' # Test caching extent = sql_lyr.GetExtent() assert extent == (0.0, 9.0, 0.0, 9.0), 'got bad extent' assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' sql_lyr.SetSpatialFilter(geom) assert sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) is not False, \ 'OLCFastSpatialFilter failed' assert sql_lyr.GetFeatureCount() == 50, 'did not get expected feature count' ds.ReleaseResultSet(sql_lyr) # Remove spatial index ds = None ds = ogr.Open('tmp/spatialite_test.db', update=1) sql_lyr = ds.ExecuteSQL("SELECT DisableSpatialIndex('test_spatialfilter', 'Geometry')") sql_lyr.GetFeatureCount() feat = sql_lyr.GetNextFeature() ret = feat.GetFieldAsInteger(0) ds.ReleaseResultSet(sql_lyr) assert ret == 1, 'DisableSpatialIndex failed' ds.ExecuteSQL("VACUUM") ds.Destroy() # Test OLCFastFeatureCount without spatial index ds = ogr.Open('tmp/spatialite_test.db') lyr = ds.GetLayerByName('test_spatialfilter') geom = ogr.CreateGeometryFromWkt( 'POLYGON((2 2,2 8,8 8,8 2,2 2))') lyr.SetSpatialFilter(geom) geom.Destroy() assert lyr.TestCapability(ogr.OLCFastFeatureCount) is not True assert lyr.TestCapability(ogr.OLCFastSpatialFilter) is not True assert lyr.GetFeatureCount() == 50 ds.Destroy() ############################################################################### # Test VirtualShape feature of SpatiaLite def test_ogr_spatialite_3(require_spatialite): ds = ogr.Open('tmp/spatialite_test.db', update=1) ds.ExecuteSQL('CREATE VIRTUAL TABLE testpoly USING VirtualShape(data/testpoly, CP1252, -1)') ds.Destroy() ds = ogr.Open('tmp/spatialite_test.db') lyr = ds.GetLayerByName('testpoly') assert lyr is not None lyr.SetSpatialFilterRect(-400, 22, -120, 400) tr = ogrtest.check_features_against_list(lyr, 'FID', [0, 4, 8]) ds.Destroy() assert tr ############################################################################### # Test updating a spatialite DB (#3471 and #3474) def test_ogr_spatialite_4(require_spatialite): ds = ogr.Open('tmp/spatialite_test.db', update=1) lyr = ds.ExecuteSQL('SELECT * FROM sqlite_master') nb_sqlite_master_objects_before = lyr.GetFeatureCount() ds.ReleaseResultSet(lyr) lyr = ds.ExecuteSQL('SELECT * FROM idx_geomspatialite_GEOMETRY') nb_idx_before = lyr.GetFeatureCount() ds.ReleaseResultSet(lyr) lyr = ds.GetLayerByName('geomspatialite') lyr.CreateField(ogr.FieldDefn("foo", ogr.OFTString)) lyr = ds.ExecuteSQL('SELECT * FROM geomspatialite') feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom is not None and geom.ExportToWkt() == 'POINT (0 1)' feat.Destroy() ds.ReleaseResultSet(lyr) # Check that triggers and index are restored (#3474) lyr = ds.ExecuteSQL('SELECT * FROM sqlite_master') nb_sqlite_master_objects_after = lyr.GetFeatureCount() ds.ReleaseResultSet(lyr) assert nb_sqlite_master_objects_before == nb_sqlite_master_objects_after, \ ('nb_sqlite_master_objects_before=%d, nb_sqlite_master_objects_after=%d' % (nb_sqlite_master_objects_before, nb_sqlite_master_objects_after)) # Add new feature lyr = ds.GetLayerByName('geomspatialite') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(100 -100)')) lyr.CreateFeature(feat) feat.Destroy() # Check that the trigger is functional (#3474). lyr = ds.ExecuteSQL('SELECT * FROM idx_geomspatialite_GEOMETRY') nb_idx_after = lyr.GetFeatureCount() ds.ReleaseResultSet(lyr) assert nb_idx_before + 1 == nb_idx_after, \ ('nb_idx_before=%d, nb_idx_after=%d' % (nb_idx_before, nb_idx_after)) ############################################################################### # Test writing and reading back spatialite geometries (#4092) # Test writing and reading back spatialite geometries in compressed form @pytest.mark.parametrize( 'bUseComprGeom', [False, True], ids=['dont-compress-geometries', 'compress-geometries'] ) def test_ogr_spatialite_5(require_spatialite, bUseComprGeom): if bUseComprGeom and require_spatialite == '2.3.1': pytest.skip() try: os.remove('tmp/ogr_spatialite_5.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_spatialite_5.sqlite', options=['SPATIALITE=YES']) geometries = [ # 'POINT EMPTY', 'POINT (1 2)', 'POINT Z (1 2 3)', 'POINT M (1 2 3)', 'POINT ZM (1 2 3 4)', 'LINESTRING EMPTY', 'LINESTRING (1 2)', 'LINESTRING (1 2,3 4)', 'LINESTRING (1 2,3 4,5 6)', 'LINESTRING Z (1 2 3,4 5 6)', 'LINESTRING Z (1 2 3,4 5 6,7 8 9)', 'LINESTRING M (1 2 3,4 5 6)', 'LINESTRING M (1 2 3,4 5 6,7 8 9)', 'LINESTRING ZM (1 2 3 4,5 6 7 8)', 'LINESTRING ZM (1 2 3 4,5 6 7 8,9 10 11 12)', 'POLYGON EMPTY', 'POLYGON ((1 2,1 3,2 3,2 2,1 2))', 'POLYGON Z ((1 2 10,1 3 -10,2 3 20,2 2 -20,1 2 10))', 'POLYGON M ((1 2 10,1 3 -10,2 3 20,2 2 -20,1 2 10))', 'POLYGON ZM ((1 2 10 20,1 3 -10 -20,2 3 20 30,2 2 -20 -30,1 2 10 20))', 'POLYGON ((1 2,1 3,2 3,2 2,1 2),(1.25 2.25,1.25 2.75,1.75 2.75,1.75 2.25,1.25 2.25))', 'MULTIPOINT EMPTY', 'MULTIPOINT ((1 2),(3 4))', 'MULTIPOINT Z ((1 2 3),(4 5 6))', 'MULTIPOINT M ((1 2 3),(4 5 6))', 'MULTIPOINT ZM ((1 2 3 4),(5 6 7 8))', 'MULTILINESTRING EMPTY', 'MULTILINESTRING ((1 2,3 4),(5 6,7 8))', 'MULTILINESTRING Z ((1 2 3,4 5 6),(7 8 9,10 11 12))', 'MULTILINESTRING M ((1 2 3,4 5 6),(7 8 9,10 11 12))', 'MULTILINESTRING ZM ((1 2 3 4,5 6 7 8),(9 10 11 12,13 14 15 16))', 'MULTIPOLYGON EMPTY', 'MULTIPOLYGON (((1 2,1 3,2 3,2 2,1 2)),((-1 -2,-1 -3,-2 -3,-2 -2,-1 -2)))', 'MULTIPOLYGON (((1 2,1 3,2 3,2 2,1 2),(1.25 2.25,1.25 2.75,1.75 2.75,1.75 2.25,1.25 2.25)),((-1 -2,-1 -3,-2 -3,-2 -2,-1 -2)))', 'MULTIPOLYGON Z (((1 2 -4,1 3 -3,2 3 -3,2 2 -3,1 2 -6)),((-1 -2 0,-1 -3 0,-2 -3 0,-2 -2 0,-1 -2 0)))', 'MULTIPOLYGON M (((1 2 -4,1 3 -3,2 3 -3,2 2 -3,1 2 -6)),((-1 -2 0,-1 -3 0,-2 -3 0,-2 -2 0,-1 -2 0)))', 'MULTIPOLYGON ZM (((1 2 -4 -40,1 3 -3 -30,2 3 -3 -30,2 2 -3 30,1 2 -6 -60)),((-1 -2 0 0,-1 -3 0 0,-2 -3 0 0,-2 -2 0 0,-1 -2 0 0)))', 'GEOMETRYCOLLECTION EMPTY', # 'GEOMETRYCOLLECTION (GEOMETRYCOLLECTION EMPTY)', 'GEOMETRYCOLLECTION (POINT (1 2))', 'GEOMETRYCOLLECTION Z (POINT Z (1 2 3))', 'GEOMETRYCOLLECTION M (POINT M (1 2 3))', 'GEOMETRYCOLLECTION ZM (POINT ZM (1 2 3 4))', 'GEOMETRYCOLLECTION (LINESTRING (1 2,3 4))', 'GEOMETRYCOLLECTION Z (LINESTRING Z (1 2 3,4 5 6))', 'GEOMETRYCOLLECTION (POLYGON ((1 2,1 3,2 3,2 2,1 2)))', 'GEOMETRYCOLLECTION Z (POLYGON Z ((1 2 10,1 3 -10,2 3 20,2 2 -20,1 2 10)))', 'GEOMETRYCOLLECTION (POINT (1 2),LINESTRING (1 2,3 4),POLYGON ((1 2,1 3,2 3,2 2,1 2)))', 'GEOMETRYCOLLECTION Z (POINT Z (1 2 3),LINESTRING Z (1 2 3,4 5 6),POLYGON Z ((1 2 10,1 3 -10,2 3 20,2 2 -20,1 2 10)))', ] srs = osr.SpatialReference() srs.ImportFromEPSG(4326) num_layer = 0 for wkt in geometries: # print(wkt) geom = ogr.CreateGeometryFromWkt(wkt) if bUseComprGeom: options = ['COMPRESS_GEOM=YES'] else: options = [] lyr = ds.CreateLayer('test%d' % num_layer, geom_type=geom.GetGeometryType(), srs=srs, options=options) feat = ogr.Feature(lyr.GetLayerDefn()) # print(geom) feat.SetGeometry(geom) lyr.CreateFeature(feat) num_layer = num_layer + 1 ds = None ds = ogr.Open('tmp/ogr_spatialite_5.sqlite') num_layer = 0 for wkt in geometries: geom = ogr.CreateGeometryFromWkt(wkt) lyr = ds.GetLayer(num_layer) assert lyr.GetGeomType() == geom.GetGeometryType() feat = lyr.GetNextFeature() got_wkt = feat.GetGeometryRef().ExportToIsoWkt() # Spatialite < 2.4 only supports 2D geometries if gdaltest.spatialite_version == '2.3.1' and (geom.GetGeometryType() & ogr.wkb25DBit) != 0: geom.SetCoordinateDimension(2) expected_wkt = geom.ExportToIsoWkt() assert got_wkt == expected_wkt elif got_wkt != wkt: pytest.fail('got %s, expected %s' % (got_wkt, wkt)) num_layer = num_layer + 1 if bUseComprGeom: num_layer = 0 for wkt in geometries: if wkt.find('EMPTY') == -1 and wkt.find('POINT') == -1: sql_lyr = ds.ExecuteSQL("SELECT GEOMETRY == CompressGeometry(GEOMETRY) FROM test%d" % num_layer) feat = sql_lyr.GetNextFeature() val = feat.GetFieldAsInteger(0) if wkt != 'LINESTRING (1 2)': if val != 1: print(wkt) print(val) ds.ReleaseResultSet(sql_lyr) pytest.fail('did not get expected compressed geometry') else: if val != 0: print(val) ds.ReleaseResultSet(sql_lyr) pytest.fail(wkt) feat = None ds.ReleaseResultSet(sql_lyr) num_layer = num_layer + 1 ds = None ############################################################################### # Test spatialite spatial views def test_ogr_spatialite_6(require_spatialite): if gdaltest.spatialite_version.startswith('2.3'): pytest.skip() try: os.remove('tmp/ogr_spatialite_6.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_spatialite_6.sqlite', options=['SPATIALITE=YES']) if int(gdaltest.spatialite_version[0:gdaltest.spatialite_version.find('.')]) >= 4: layername = 'regular_layer' layername_single = 'regular_layer' viewname = 'view_of_regular_layer' viewname_single = 'view_of_regular_layer' thegeom_single = 'the_geom' pkid_single = 'pk_id' else: layername = 'regular_\'layer' layername_single = 'regular_\'\'layer' viewname = 'view_of_\'regular_layer' viewname_single = 'view_of_\'\'regular_layer' thegeom_single = 'the_"''geom' pkid_single = 'pk_"''id' # Create regular layer srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer(layername, geom_type=ogr.wkbPoint, srs=srs, options=['LAUNDER=NO']) geometryname = lyr.GetGeometryColumn() lyr.CreateField(ogr.FieldDefn("int'col", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("realcol", ogr.OFTReal)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 12) feat.SetField(1, 34.56) geom = ogr.CreateGeometryFromWkt('POINT(2 49)') feat.SetGeometryDirectly(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 12) feat.SetField(1, 34.56) geom = ogr.CreateGeometryFromWkt('POINT(3 50)') feat.SetGeometryDirectly(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 34) feat.SetField(1, 56.78) geom = ogr.CreateGeometryFromWkt('POINT(-30000 -50000)') feat.SetGeometryDirectly(geom) lyr.CreateFeature(feat) geom = ogr.CreateGeometryFromWkt('POINT(3 50)') feat.SetGeometryDirectly(geom) lyr.SetFeature(feat) # Create spatial view ds.ExecuteSQL("CREATE VIEW \"%s\" AS SELECT OGC_FID AS '%s', %s AS '%s', \"int'col\", realcol FROM \"%s\"" % (viewname, pkid_single, geometryname, thegeom_single, layername)) if int(gdaltest.spatialite_version[0:gdaltest.spatialite_version.find('.')]) >= 4: ds.ExecuteSQL("INSERT INTO views_geometry_columns(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column, read_only) VALUES " + "('%s', '%s', '%s', '%s', Lower('%s'), 1)" % (viewname_single, thegeom_single, pkid_single, layername_single, geometryname)) else: ds.ExecuteSQL("INSERT INTO views_geometry_columns(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column) VALUES " + "('%s', '%s', '%s', '%s', '%s')" % (viewname_single, thegeom_single, pkid_single, layername_single, geometryname)) ds = None # Test spatial view ds = ogr.Open('tmp/ogr_spatialite_6.sqlite') lyr = ds.GetLayerByName(layername) view_lyr = ds.GetLayerByName(viewname) assert view_lyr.GetFIDColumn() == pkid_single, view_lyr.GetGeometryColumn() assert view_lyr.GetGeometryColumn() == thegeom_single assert view_lyr.GetLayerDefn().GetFieldDefn(0).GetName() == "int'col" assert view_lyr.GetGeomType() == lyr.GetGeomType() assert view_lyr.GetFeatureCount() == lyr.GetFeatureCount() assert view_lyr.GetSpatialRef().IsSame(lyr.GetSpatialRef()) == 1 feat = view_lyr.GetFeature(3) if feat.GetFieldAsInteger(0) != 34: feat.DumpReadable() pytest.fail() if feat.GetFieldAsDouble(1) != 56.78: feat.DumpReadable() pytest.fail() view_lyr.SetAttributeFilter('"int\'col" = 34') view_lyr.SetSpatialFilterRect(2.5, 49.5, 3.5, 50.5) feat = view_lyr.GetNextFeature() if feat.GetFID() != 3: feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POINT (3 50)': feat.DumpReadable() pytest.fail() ds = None # Remove spatial index ds = ogr.Open('tmp/ogr_spatialite_6.sqlite', update=1) sql_lyr = ds.ExecuteSQL("SELECT DisableSpatialIndex('%s', '%s')" % (layername_single, geometryname)) ds.ReleaseResultSet(sql_lyr) ds.ExecuteSQL("DROP TABLE \"idx_%s_%s\"" % (layername, geometryname)) ds = None # Test spatial view again ds = ogr.Open('tmp/ogr_spatialite_6.sqlite') view_lyr = ds.GetLayerByName(viewname) view_lyr.SetAttributeFilter('"int\'col" = 34') view_lyr.SetSpatialFilterRect(2.5, 49.5, 3.5, 50.5) feat = view_lyr.GetNextFeature() if feat.GetFID() != 3: feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test VirtualShape:xxx.shp def test_ogr_spatialite_7(require_spatialite): ds = ogr.Open('VirtualShape:data/poly.shp') assert ds is not None lyr = ds.GetLayerByName('poly') assert lyr is not None assert lyr.GetGeomType() == ogr.wkbPolygon f = lyr.GetNextFeature() assert f.GetGeometryRef() is not None ############################################################################### # Test tables with multiple geometry columns (#4768) def test_ogr_spatialite_8(require_spatialite): if require_spatialite.startswith('2.3'): pytest.skip() try: os.remove('tmp/ogr_spatialite_8.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_spatialite_8.sqlite', options=['SPATIALITE=YES']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) fld = ogr.GeomFieldDefn('geom1', ogr.wkbPoint) fld.SetSpatialRef(srs) lyr.CreateGeomField(fld) fld = ogr.GeomFieldDefn('geom2', ogr.wkbLineString) fld.SetSpatialRef(srs) lyr.CreateGeomField(fld) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('foo', 'bar') f.SetGeomFieldDirectly(0, ogr.CreateGeometryFromWkt('POINT(0 -1)')) f.SetGeomFieldDirectly(1, ogr.CreateGeometryFromWkt('LINESTRING(0 -1,2 3)')) lyr.CreateFeature(f) lyr.ResetReading() f = lyr.GetNextFeature() if f.GetGeomFieldRef('geom1').ExportToWkt() != 'POINT (0 -1)' or \ f.GetGeomFieldRef('geom2').ExportToWkt() != 'LINESTRING (0 -1,2 3)': f.DumpReadable() pytest.fail() f.SetGeomFieldDirectly(0, ogr.CreateGeometryFromWkt('POINT(0 1)')) f.SetGeomFieldDirectly(1, ogr.CreateGeometryFromWkt('LINESTRING(0 1,2 3)')) lyr.SetFeature(f) f = None ds.ExecuteSQL('CREATE VIEW view_test_geom1 AS SELECT OGC_FID AS pk_id, foo, geom1 AS renamed_geom1 FROM test') if int(gdaltest.spatialite_version[0:gdaltest.spatialite_version.find('.')]) >= 4: readonly_col = ', read_only' readonly_val = ', 1' else: readonly_col = '' readonly_val = '' ds.ExecuteSQL(("INSERT INTO views_geometry_columns(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column%s) VALUES " % readonly_col) + ("('view_test_geom1', 'renamed_geom1', 'pk_id', 'test', 'geom1'%s)" % readonly_val)) ds.ExecuteSQL('CREATE VIEW view_test_geom2 AS SELECT OGC_FID AS pk_id, foo, geom2 AS renamed_geom2 FROM test') ds.ExecuteSQL(("INSERT INTO views_geometry_columns(view_name, view_geometry, view_rowid, f_table_name, f_geometry_column%s) VALUES " % readonly_col) + ("('view_test_geom2', 'renamed_geom2', 'pk_id', 'test', 'geom2'%s)" % readonly_val)) ds = None ds = ogr.Open('tmp/ogr_spatialite_8.sqlite') lyr = ds.GetLayerByName('test(geom1)') view_lyr = ds.GetLayerByName('view_test_geom1') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert view_lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetGeometryColumn() == 'geom1' assert view_lyr.GetGeometryColumn() == 'renamed_geom1' assert lyr.GetGeomType() == ogr.wkbPoint assert view_lyr.GetGeomType() == lyr.GetGeomType() assert view_lyr.GetFeatureCount() == lyr.GetFeatureCount() feat = view_lyr.GetFeature(1) if feat.GetFieldAsString(0) != 'bar': feat.DumpReadable() pytest.fail() feat = None view_lyr.SetSpatialFilterRect(-1, -1, 10, 10) feat = view_lyr.GetNextFeature() if feat.GetFID() != 1: feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() feat = None lyr = ds.GetLayerByName('test(geom2)') view_lyr = ds.GetLayerByName('view_test_geom2') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert view_lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetGeometryColumn() == 'geom2' assert view_lyr.GetGeometryColumn() == 'renamed_geom2' assert lyr.GetGeomType() == ogr.wkbLineString assert view_lyr.GetGeomType() == lyr.GetGeomType() assert view_lyr.GetFeatureCount() == lyr.GetFeatureCount() feat = view_lyr.GetFeature(1) if feat.GetFieldAsString(0) != 'bar': feat.DumpReadable() pytest.fail() feat = None view_lyr.SetSpatialFilterRect(-1, -1, 10, 10) feat = view_lyr.GetNextFeature() if feat.GetFID() != 1: feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (0 1,2 3)': feat.DumpReadable() pytest.fail() feat = None sql_lyr = ds.ExecuteSQL('SELECT foo, geom2 FROM test') sql_lyr.SetSpatialFilterRect(-1, -1, 10, 10) feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (0 1,2 3)': feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) with gdaltest.error_handler(): lyr = ds.GetLayerByName('invalid_layer_name(geom1)') assert lyr is None lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetLayerDefn().GetGeomFieldCount() == 2 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetName() == 'geom1' assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetName() == 'geom2' assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbPoint assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetType() == ogr.wkbLineString lyr.SetSpatialFilterRect(-1, -1, 10, 10) feat = lyr.GetNextFeature() if feat.GetFID() != 1: feat.DumpReadable() pytest.fail() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() if feat.GetGeomFieldRef(1).ExportToWkt() != 'LINESTRING (0 1,2 3)': feat.DumpReadable() pytest.fail() feat = None lyr.SetSpatialFilterRect(1, -1, -1, 10, 10) feat = lyr.GetNextFeature() if feat.GetFID() != 1: feat.DumpReadable() pytest.fail() feat = None ds = None ############################################################################### # Test tables with multiple geometry columns (#4768) def test_ogr_sqlite_31(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_31.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_31.sqlite') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) fld = ogr.GeomFieldDefn('geom1', ogr.wkbPoint) fld.SetSpatialRef(srs) lyr.CreateGeomField(fld) fld = ogr.GeomFieldDefn('geom2', ogr.wkbLineString) fld.SetSpatialRef(srs) lyr.CreateGeomField(fld) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('foo', 'bar') f.SetGeomFieldDirectly(0, ogr.CreateGeometryFromWkt('POINT(0 1)')) f.SetGeomFieldDirectly(1, ogr.CreateGeometryFromWkt('LINESTRING(0 1,2 3)')) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('tmp/ogr_sqlite_31.sqlite') lyr = ds.GetLayerByName('test(geom1)') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetGeometryColumn() == 'geom1' assert lyr.GetGeomType() == ogr.wkbPoint lyr.SetSpatialFilterRect(-1, -1, 10, 10) feat = lyr.GetNextFeature() if feat.GetFID() != 1: feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() feat = None lyr = ds.GetLayerByName('test(geom2)') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetGeometryColumn() == 'geom2' assert lyr.GetGeomType() == ogr.wkbLineString lyr.SetSpatialFilterRect(-1, -1, 10, 10) feat = lyr.GetNextFeature() if feat.GetFID() != 1: feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (0 1,2 3)': feat.DumpReadable() pytest.fail() feat = None ds = None ############################################################################### # Test datetime support def test_ogr_sqlite_32(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_32.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_32.sqlite') lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn('datetimefield', ogr.OFTDateTime) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('datefield', ogr.OFTDate) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('timefield', ogr.OFTTime) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('datetimefield', '2012/08/23 21:24:00 ') feat.SetField('datefield', '2012/08/23 ') feat.SetField('timefield', '21:24:00 ') lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('tmp/ogr_sqlite_32.sqlite') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTDateTime assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTDate assert lyr.GetLayerDefn().GetFieldDefn(2).GetType() == ogr.OFTTime feat = lyr.GetNextFeature() if feat.GetField('datetimefield') != '2012/08/23 21:24:00' or \ feat.GetField('datefield') != '2012/08/23' or \ feat.GetField('timefield') != '21:24:00': feat.DumpReadable() pytest.fail() feat = None ds = None ############################################################################### # Test SRID layer creation option def test_ogr_sqlite_33(with_and_without_spatialite): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_33.sqlite') except OSError: pass if not with_and_without_spatialite: options = [] else: if gdaltest.spatialite_version.find('2.3') == 0: return options = ['SPATIALITE=YES'] ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_33.sqlite', options=options) if not with_and_without_spatialite: # To make sure that the entry is added in spatial_ref_sys srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer('test1', srs=srs) # Test with existing entry lyr = ds.CreateLayer('test2', options=['SRID=4326']) # Test with non-existing entry gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('test3', options=['SRID=123456']) gdal.PopErrorHandler() ds = None ds = ogr.Open('tmp/ogr_sqlite_33.sqlite') lyr = ds.GetLayerByName('test2') srs = lyr.GetSpatialRef() if srs.ExportToWkt().find('4326') == -1: pytest.fail('failure') # 123456 should be referenced in geometry_columns... sql_lyr = ds.ExecuteSQL('SELECT * from geometry_columns WHERE srid=123456') feat = sql_lyr.GetNextFeature() is_none = feat is None feat = None ds.ReleaseResultSet(sql_lyr) assert not is_none # ... but not in spatial_ref_sys sql_lyr = ds.ExecuteSQL('SELECT * from spatial_ref_sys WHERE srid=123456') feat = sql_lyr.GetNextFeature() is_none = feat is None feat = None ds.ReleaseResultSet(sql_lyr) assert is_none ############################################################################### # Test REGEXP support (#4823) def test_ogr_sqlite_34(): if gdaltest.sl_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT 'a' REGEXP 'a'") gdal.PopErrorHandler() if sql_lyr is None: pytest.skip() feat = sql_lyr.GetNextFeature() val = feat.GetField(0) gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert val == 1 # Evaluates to FALSE sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT 'b' REGEXP 'a'") feat = sql_lyr.GetNextFeature() val = feat.GetField(0) gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert val == 0 # NULL left-member sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT NULL REGEXP 'a'") feat = sql_lyr.GetNextFeature() val = feat.GetField(0) gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert val == 0 # NULL regexp gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT 'a' REGEXP NULL") gdal.PopErrorHandler() assert sql_lyr is None # Invalid regexp gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT 'a' REGEXP '['") gdal.PopErrorHandler() assert sql_lyr is None # Adds another pattern sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT 'b' REGEXP 'b'") feat = sql_lyr.GetNextFeature() val = feat.GetField(0) gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert val == 1 # Test cache for _ in range(2): for i in range(17): regexp = chr(ord('a') + i) sql_lyr = gdaltest.sl_ds.ExecuteSQL("SELECT '%s' REGEXP '%s'" % (regexp, regexp)) feat = sql_lyr.GetNextFeature() val = feat.GetField(0) gdaltest.sl_ds.ReleaseResultSet(sql_lyr) assert val == 1 ############################################################################### # Test SetAttributeFilter() on SQL result layer def test_ogr_sqlite_35(with_and_without_spatialite): if gdaltest.sl_ds is None: pytest.skip() if with_and_without_spatialite: if gdaltest.spatialite_version.find('2.3') >= 0: pytest.skip() options = ['SPATIALITE=YES'] else: options = [] try: os.remove('tmp/ogr_sqlite_35.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_35.sqlite', options=options) lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn('foo', ogr.OFTString) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', 'bar') feat.SetGeometry(ogr.CreateGeometryFromWkt("POINT (1 1)")) lyr.CreateFeature(feat) feat = None for sql in ["SELECT * FROM test", "SELECT * FROM test GROUP BY foo", "SELECT * FROM test ORDER BY foo", "SELECT * FROM test LIMIT 1", "SELECT * FROM test WHERE 1=1", "SELECT * FROM test WHERE 1=1 GROUP BY foo", "SELECT * FROM test WHERE 1=1 ORDER BY foo", "SELECT * FROM test WHERE 1=1 LIMIT 1"]: sql_lyr = ds.ExecuteSQL(sql) sql_lyr.SetAttributeFilter("foo = 'bar'") sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is not None feat = None sql_lyr.SetAttributeFilter("foo = 'baz'") sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is None feat = None sql_lyr.SetAttributeFilter(None) sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is not None feat = None sql_lyr.SetSpatialFilterRect(0, 0, 2, 2) sql_lyr.SetAttributeFilter("foo = 'bar'") sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is not None feat = None sql_lyr.SetSpatialFilterRect(1.5, 1.5, 2, 2) sql_lyr.SetAttributeFilter("foo = 'bar'") sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is None feat = None sql_lyr.SetSpatialFilterRect(0, 0, 2, 2) sql_lyr.SetAttributeFilter(None) sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is not None feat = None ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test FID64 support def test_ogr_sqlite_36(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_36.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_36.sqlite') lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn('foo', ogr.OFTString) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', 'bar') feat.SetFID(1234567890123) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('tmp/ogr_sqlite_36.sqlite') lyr = ds.GetLayer(0) assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None f = lyr.GetNextFeature() assert f.GetFID() == 1234567890123 ############################################################################### # Test not nullable fields def test_ogr_sqlite_37(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_37.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_37.sqlite') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_nullable', ogr.wkbPoint) lyr.CreateGeomField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None ds = None ds = ogr.Open('tmp/ogr_sqlite_37.sqlite', update=1) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_nullable')).IsNullable() == 1 # Turn not null into nullable src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')) fd = ogr.FieldDefn('now_nullable', src_fd.GetType()) fd.SetNullable(1) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable'), fd, ogr.ALTER_ALL_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('now_nullable')).IsNullable() == 1 # Turn nullable into not null, but remove NULL values first ds.ExecuteSQL("UPDATE test SET field_nullable = '' WHERE field_nullable IS NULL") src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')) fd = ogr.FieldDefn('now_nullable', src_fd.GetType()) fd.SetName('now_not_nullable') fd.SetNullable(0) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable'), fd, ogr.ALTER_ALL_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('now_not_nullable')).IsNullable() == 0 ds = None ds = ogr.Open('tmp/ogr_sqlite_37.sqlite') lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('now_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('now_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_nullable')).IsNullable() == 1 ds = None ############################################################################### # Test default values def test_ogr_sqlite_38(): if gdaltest.sl_ds is None: pytest.skip() try: os.remove('tmp/ogr_sqlite_38.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_38.sqlite') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime3', ogr.OFTDateTime) field_defn.SetDefault("(strftime('%Y-%m-%dT%H:%M:%fZ','now'))") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime4', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56.123'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_date', ogr.OFTDate) field_defn.SetDefault("CURRENT_DATE") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_time', ogr.OFTTime) field_defn.SetDefault("CURRENT_TIME") lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None ds = ogr.Open('tmp/ogr_sqlite_38.sqlite', update=1) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'a''b'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() == '123' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_real')).GetDefault() == '1.23' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nodefault')).GetDefault() is None assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime')).GetDefault() == 'CURRENT_TIMESTAMP' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault() == "'2015/06/30 12:34:56'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime3')).GetDefault() == "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime4')).GetDefault() == "'2015/06/30 12:34:56.123'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault() == "CURRENT_DATE" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_time')).GetDefault() == "CURRENT_TIME" f = lyr.GetNextFeature() if f.GetField('field_string') != 'a\'b' or f.GetField('field_int') != 123 or \ f.GetField('field_real') != 1.23 or \ not f.IsFieldNull('field_nodefault') or not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56' or \ f.GetField('field_datetime4') != '2015/06/30 12:34:56.123' or \ not f.IsFieldSet('field_datetime3') or \ not f.IsFieldSet('field_date') or not f.IsFieldSet('field_time'): f.DumpReadable() pytest.fail() # Change DEFAULT value src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')) fd = ogr.FieldDefn('field_string', src_fd.GetType()) fd.SetDefault("'c'") lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string'), fd, ogr.ALTER_DEFAULT_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'c'" # Drop DEFAULT value src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')) fd = ogr.FieldDefn('field_int', src_fd.GetType()) fd.SetDefault(None) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int'), fd, ogr.ALTER_DEFAULT_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() is None ds = None ds = ogr.Open('tmp/ogr_sqlite_38.sqlite', update=1) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'c'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() is None ds = None ############################################################################### # Test spatial filters with point extent def test_ogr_spatialite_9(require_spatialite): ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_spatialite_9.sqlite', options=['SPATIALITE=YES']) lyr = ds.CreateLayer('point', geom_type=ogr.wkbPoint) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(feat) lyr.SetSpatialFilterRect(1, 2, 1, 2) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('/vsimem/ogr_spatialite_9.sqlite') ############################################################################### # Test not nullable fields def test_ogr_spatialite_10(require_spatialite): try: os.remove('tmp/ogr_spatialite_10.sqlite') except OSError: pass ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_spatialite_10.sqlite', options=['SPATIALITE=YES']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_nullable', ogr.wkbPoint) lyr.CreateGeomField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('tmp/ogr_spatialite_10.sqlite') lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_nullable')).IsNullable() == 1 ds = None ############################################################################### # Test creating a field with the fid name def test_ogr_sqlite_39(): if gdaltest.sl_ds is None: pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_sqlite_39.sqlite') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['FID=myfid']) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTInteger)) assert ret == 0 lyr.CreateField(ogr.FieldDefn('str2', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 10) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat.GetFID() == 10 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 if feat.GetFID() < 0: feat.DumpReadable() pytest.fail() if feat.GetField('myfid') != feat.GetFID(): feat.DumpReadable() pytest.fail() feat.SetField('str', 'foo') ret = lyr.SetFeature(feat) assert ret == 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1) feat.SetField('myfid', 10) gdal.PushErrorHandler() ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat.UnsetField('myfid') gdal.PushErrorHandler() ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 10 or f.GetField('str') != 'first string' or f.GetField('str2') != 'second string' or f.GetField('myfid') != 10: f.DumpReadable() pytest.fail() f = None ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('/vsimem/ogr_sqlite_39.sqlite') ############################################################################### # Test dataset transactions def test_ogr_sqlite_40(with_and_without_spatialite): if gdaltest.sl_ds is None: pytest.skip() if with_and_without_spatialite: options = ['SPATIALITE=YES'] else: options = [] ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_sqlite_40.sqlite', options=options) assert ds.TestCapability(ogr.ODsCTransactions) == 1 ret = ds.StartTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.StartTransaction() gdal.PopErrorHandler() assert ret != 0 lyr = ds.CreateLayer('test', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ret = ds.RollbackTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.RollbackTransaction() gdal.PopErrorHandler() assert ret != 0 ds = None ds = ogr.Open('/vsimem/ogr_sqlite_40.sqlite', update=1) assert ds.GetLayerCount() == 0 ret = ds.StartTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.StartTransaction() gdal.PopErrorHandler() assert ret != 0 lyr = ds.CreateLayer('test', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ret = ds.CommitTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() assert ret != 0 ds = None ds = ogr.Open('/vsimem/ogr_sqlite_40.sqlite', update=1) assert ds.GetLayerCount() == 1 lyr = ds.GetLayerByName('test') ds.StartTransaction() lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None assert lyr.GetFeatureCount() == 1 ds.RollbackTransaction() assert lyr.GetFeatureCount() == 0 ds.StartTransaction() lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 ds.CommitTransaction() # the cursor is still valid after CommitTransaction(), which isn't the case for other backends such as PG ! f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 2 assert lyr.GetFeatureCount() == 2 ds.StartTransaction() lyr = ds.CreateLayer('test2', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) ds.CommitTransaction() assert ret == 0 ds.StartTransaction() f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) ds.CommitTransaction() assert ret == 0 ds.StartTransaction() lyr = ds.CreateLayer('test3', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) # ds.CommitTransaction() ds.ReleaseResultSet(ds.ExecuteSQL('SELECT 1')) # ds = None # ds = ogr.Open('/vsimem/ogr_gpkg_26.gpkg', update = 1) # lyr = ds.GetLayerByName('test3') # ds.StartTransaction() f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) ds.CommitTransaction() assert ret == 0 ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('/vsimem/ogr_sqlite_40.sqlite') ############################################################################### # Test reading dates from Julian day floating point representation def test_ogr_sqlite_41(): if gdaltest.sl_ds is None: pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_sqlite_41.sqlite', options=['METADATA=NO']) ds.ExecuteSQL('CREATE TABLE test(a_date DATETIME);') ds.ExecuteSQL("INSERT INTO test(a_date) VALUES (strftime('%J', '2015-04-30 12:34:56'))") ds = None ds = ogr.Open('/vsimem/ogr_sqlite_41.sqlite') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['a_date'] == '2015/04/30 12:34:56' ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('/vsimem/ogr_sqlite_41.sqlite') ############################################################################### # Test ExecuteSQL() heuristics (#6107) def test_ogr_sqlite_42(): if gdaltest.sl_ds is None: pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_sqlite_42.sqlite') lyr = ds.CreateLayer("aab") lyr.CreateField(ogr.FieldDefn("id", ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 1 lyr.CreateFeature(f) lyr = None sql_lyr = ds.ExecuteSQL('SELECT id FROM aab') sql_lyr.SetAttributeFilter('id = 1') f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT id FROM "aab"') sql_lyr.SetAttributeFilter('id = 1') f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) lyr = ds.CreateLayer('with"quotes') lyr.CreateField(ogr.FieldDefn("id", ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 1 lyr.CreateFeature(f) lyr = None sql_lyr = ds.ExecuteSQL('SELECT id FROM "with""quotes"') sql_lyr.SetAttributeFilter('id = 1') f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) # Too complex to analyze sql_lyr = ds.ExecuteSQL('SELECT id FROM "with""quotes" UNION ALL SELECT id FROM aab') sql_lyr.SetAttributeFilter('id = 1') f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('/vsimem/ogr_sqlite_42.sqlite') ############################################################################### # Test file:foo?mode=memory&cache=shared (#6150) def test_ogr_sqlite_43(): if gdaltest.sl_ds is None: pytest.skip() # Only available since sqlite 3.8.0 version = ogrtest.sqlite_version.split('.') if not (len(version) >= 3 and int(version[0]) * 10000 + int(version[1]) * 100 + int(version[2]) >= 30800): pytest.skip() ds = ogr.Open('file:foo?mode=memory&cache=shared') assert ds is not None ############################################################################### # Test reading/writing StringList, etc.. def test_ogr_sqlite_44(): if gdaltest.sl_ds is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_sqlite_44.csvt', 'JsonStringList,JsonIntegerList,JsonInteger64List,JsonRealList,WKT') gdal.FileFromMemBuffer('/vsimem/ogr_sqlite_44.csv', """stringlist,intlist,int64list,reallist,WKT "[""a"",null]","[1]","[1234567890123]","[0.125]", """) gdal.VectorTranslate('/vsimem/ogr_sqlite_44.sqlite', '/vsimem/ogr_sqlite_44.csv', format='SQLite') gdal.VectorTranslate('/vsimem/ogr_sqlite_44_out.csv', '/vsimem/ogr_sqlite_44.sqlite', format='CSV', layerCreationOptions=['CREATE_CSVT=YES', 'LINEFORMAT=LF']) f = gdal.VSIFOpenL('/vsimem/ogr_sqlite_44_out.csv', 'rb') assert f is not None data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert data.startswith('stringlist,intlist,int64list,reallist,wkt\n"[ ""a"", """" ]",[ 1 ],[ 1234567890123 ],[ 0.125') f = gdal.VSIFOpenL('/vsimem/ogr_sqlite_44_out.csvt', 'rb') data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert data.startswith('JSonStringList,JSonIntegerList,JSonInteger64List,JSonRealList') gdal.Unlink('/vsimem/ogr_sqlite_44.csv') gdal.Unlink('/vsimem/ogr_sqlite_44.csvt') gdal.Unlink('/vsimem/ogr_sqlite_44.sqlite') gdal.Unlink('/vsimem/ogr_sqlite_44_out.csv') gdal.Unlink('/vsimem/ogr_sqlite_44_out.csvt') ############################################################################### # Test WAL and opening in read-only (#6776) def test_ogr_sqlite_45(): if gdaltest.sl_ds is None: pytest.skip() # Only available since sqlite 3.7.0 version = ogrtest.sqlite_version.split('.') if not (len(version) >= 3 and int(version[0]) * 10000 + int(version[1]) * 100 + int(version[2]) >= 30700): pytest.skip() ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/ogr_sqlite_45.db') sql_lyr = ds.ExecuteSQL('PRAGMA journal_mode = WAL') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT * FROM sqlite_master') ds.ReleaseResultSet(sql_lyr) assert os.path.exists('tmp/ogr_sqlite_45.db-wal') shutil.copy('tmp/ogr_sqlite_45.db', 'tmp/ogr_sqlite_45_bis.db') shutil.copy('tmp/ogr_sqlite_45.db-shm', 'tmp/ogr_sqlite_45_bis.db-shm') shutil.copy('tmp/ogr_sqlite_45.db-wal', 'tmp/ogr_sqlite_45_bis.db-wal') ds = None assert not os.path.exists('tmp/ogr_sqlite_45.db-wal') ds = ogr.Open('tmp/ogr_sqlite_45_bis.db') ds = None assert not os.path.exists('tmp/ogr_sqlite_45_bis.db-wal') gdal.Unlink('tmp/ogr_sqlite_45.db') gdal.Unlink('tmp/ogr_sqlite_45_bis.db') ############################################################################### # Test creating unsupported geometry types def test_ogr_spatialite_11(require_spatialite): ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_spatialite_11.sqlite', options=['SPATIALITE=YES']) # Will be converted to LineString lyr = ds.CreateLayer('test', geom_type=ogr.wkbCurve) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('test2', geom_type=ogr.wkbNone) with gdaltest.error_handler(): res = lyr.CreateGeomField(ogr.GeomFieldDefn('foo', ogr.wkbCurvePolygon)) assert res != 0 ds = None gdal.Unlink('/vsimem/ogr_spatialite_11.sqlite') ############################################################################### # Test opening a .sql file def test_ogr_spatialite_12(require_spatialite): if gdal.GetDriverByName('SQLite').GetMetadataItem("ENABLE_SQL_SQLITE_FORMAT") != 'YES': pytest.skip() ds = ogr.Open('data/poly_spatialite.sqlite.sql') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_sqlite_iterate_and_update(): if gdaltest.sl_ds is None: pytest.skip() filename = "/vsimem/ogr_sqlite_iterate_and_update.db" ds = ogr.GetDriverByName('SQLite').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('strfield')) f = ogr.Feature(lyr.GetLayerDefn()) f['strfield'] = 'foo' lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['strfield'] = 'bar' lyr.CreateFeature(f) lyr.ResetReading() for f in lyr: f['strfield'] += "_updated" lyr.SetFeature(f) lyr.ResetReading() for f in lyr: assert f['strfield'].endswith('_updated') ds = None gdal.Unlink(filename) ############################################################################### # def test_ogr_sqlite_cleanup(): if gdaltest.sl_ds is None: pytest.skip() gdaltest.sl_ds.ExecuteSQL('DELLAYER:tpoly') gdaltest.sl_ds.ExecuteSQL('DELLAYER:tpoly_2') gdaltest.sl_ds.ExecuteSQL('DELLAYER:tpoly_3') gdaltest.sl_ds.ExecuteSQL('DELLAYER:geomwkb') gdaltest.sl_ds.ExecuteSQL('DELLAYER:geomwkt') gdaltest.sl_ds.ExecuteSQL('DELLAYER:geomspatialite') gdaltest.sl_ds.ExecuteSQL('DELLAYER:wgs84layer') gdaltest.sl_ds.ExecuteSQL('DELLAYER:wgs84layer_approx') gdaltest.sl_ds.ExecuteSQL('DELLAYER:testtypes') gdaltest.sl_ds.ExecuteSQL('DELLAYER:fgf_table') gdaltest.sl_ds = None gdaltest.shp_ds = None �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_ods.py�������������������������������������������������������������������0000775�0001750�0001750�00000033542�13701057761�015511� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: ogr_ods.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR ODS driver. # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2012, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import gdaltest from osgeo import gdal from osgeo import ogr import pytest ############################################################################### # Check def ogr_ods_check(ds): assert ds.TestCapability("foo") == 0 assert ds.GetLayerCount() == 8, 'bad layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'Feuille1', 'bad layer name' assert lyr.GetGeomType() == ogr.wkbNone, 'bad layer geometry type' assert lyr.GetSpatialRef() is None, 'bad spatial ref' assert lyr.GetFeatureCount() == 26 assert lyr.TestCapability("foo") == 0 lyr = ds.GetLayer(6) assert lyr.GetName() == 'Feuille7', 'bad layer name' assert lyr.GetLayerDefn().GetFieldCount() == 12 type_array = [ogr.OFTString, ogr.OFTInteger, ogr.OFTReal, ogr.OFTReal, ogr.OFTDate, ogr.OFTDateTime, ogr.OFTReal, ogr.OFTTime, ogr.OFTReal, ogr.OFTInteger, ogr.OFTReal, ogr.OFTDateTime] for i, typ in enumerate(type_array): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == typ feat = lyr.GetNextFeature() if feat.GetFieldAsString(0) != 'val' or \ feat.GetFieldAsInteger(1) != 23 or \ feat.GetFieldAsDouble(2) != 3.45 or \ feat.GetFieldAsDouble(3) != 0.52 or \ feat.GetFieldAsString(4) != '2012/01/22' or \ feat.GetFieldAsString(5) != '2012/01/22 18:49:00': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.IsFieldSet(2): feat.DumpReadable() pytest.fail() ############################################################################### # Basic tests def test_ogr_ods_1(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() assert drv.TestCapability("foo") == 0 ds = ogr.Open('data/test.ods') assert ds is not None, 'cannot open dataset' return ogr_ods_check(ds) ############################################################################### # Basic tests def test_ogr_ods_kspread_1(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() assert drv.TestCapability("foo") == 0 ds = ogr.Open('data/test_kspread.ods') assert ds is not None, 'cannot open dataset' assert ds.TestCapability("foo") == 0 assert ds.GetLayerCount() == 8, 'bad layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'Feuille1', 'bad layer name' assert lyr.GetGeomType() == ogr.wkbNone, 'bad layer geometry type' assert lyr.GetSpatialRef() is None, 'bad spatial ref' assert lyr.GetFeatureCount() == 26 assert lyr.TestCapability("foo") == 0 lyr = ds.GetLayer(6) assert lyr.GetName() == 'Feuille7', 'bad layer name' assert lyr.GetLayerDefn().GetFieldCount() == 12 type_array = [ogr.OFTString, ogr.OFTInteger, ogr.OFTReal, ogr.OFTReal, ogr.OFTDate, ogr.OFTString, # ogr.OFTDateTime, ogr.OFTReal, ogr.OFTTime, ogr.OFTReal, ogr.OFTInteger, ogr.OFTReal, ogr.OFTString, # ogr.OFTDateTime ] for i, typ in enumerate(type_array): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == typ feat = lyr.GetNextFeature() if feat.GetFieldAsString(0) != 'val' or \ feat.GetFieldAsInteger(1) != 23 or \ feat.GetFieldAsDouble(2) != 3.45 or \ feat.GetFieldAsDouble(3) != 0.52 or \ feat.GetFieldAsString(4) != '2012/01/22' or \ feat.GetFieldAsString(5) != '22/01/2012 18:49:00': # 2012/01/22 18:49:00 feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.IsFieldSet(2): feat.DumpReadable() pytest.fail() ############################################################################### # Test OGR_ODS_HEADERS = DISABLE def test_ogr_ods_2(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() gdal.SetConfigOption('OGR_ODS_HEADERS', 'DISABLE') ds = ogr.Open('data/test.ods') lyr = ds.GetLayerByName('Feuille7') assert lyr.GetFeatureCount() == 3 gdal.SetConfigOption('OGR_ODS_HEADERS', None) ############################################################################### # Test OGR_ODS_FIELD_TYPES = STRING def test_ogr_ods_3(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() gdal.SetConfigOption('OGR_ODS_FIELD_TYPES', 'STRING') ds = ogr.Open('data/test.ods') lyr = ds.GetLayerByName('Feuille7') assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTString gdal.SetConfigOption('OGR_ODS_FIELD_TYPES', None) ############################################################################### # Run test_ogrsf def test_ogr_ods_4(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.ods') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test write support def test_ogr_ods_5(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f ODS tmp/test.ods data/test.ods') ds = ogr.Open('tmp/test.ods') ret = ogr_ods_check(ds) ds = None os.unlink('tmp/test.ods') return ret ############################################################################### # Test formula evaluation def test_ogr_ods_6(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() src_ds = ogr.Open('ODS:data/content_formulas.xml') filepath = '/vsimem/content_formulas.csv' with gdaltest.error_handler(): out_ds = ogr.GetDriverByName('CSV').CopyDataSource(src_ds, filepath) assert out_ds is not None, ('Unable to create %s.' % filepath) out_ds = None src_ds = None fp = gdal.VSIFOpenL('/vsimem/content_formulas.csv', 'rb') res = gdal.VSIFReadL(1, 10000, fp) gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/content_formulas.csv') res = res.decode('ascii').split() expected_res = """Field1,Field2,Field3,Field4,Field5,Field6,Field7,Field8,Field9,Field10,Field11,Field12,Field13,Field14,Field15,Field16,Field17,Field18,Field19,Field20,Field21,Field22,Field23,Field24,Field25,Field26,Field27,Field28,Field29,Field30,Field31,Field32 of:=[.B1],of:=[.C1],of:=[.A1],,,,,,,,,,,,,,,,,,,,,,,,,,,,, "1","1","1",,,,,,,,,,,,,,,,,,,,,,,,,,,,, ab,ab,ab,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "1",a,,"3.5",MIN,"1",MIN,"3.5",SUM,"4.5",AVERAGE,"2.25",COUNT,"2",COUNTA,"3",,,,,,,,,,,,,,,, abcdef,"6",,a,abcdef,,f,abcdef,"of:=MID([.A5];0;1)",,a,abcdef,,a,ef,ef,,,,,,,,,,,,,,,, "1",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, AB,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "2","2","0","3","1","0","0","1","1","1","0","0","0","1","1","0",,,,,,,,,,,,,,,, "1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1" "0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0" """.split() assert res == expected_res, ('did not get expected result: %s' % res) ############################################################################### # Test update support def test_ogr_ods_7(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() filepath = 'tmp/ogr_ods_7.ods' if os.path.exists(filepath): os.unlink(filepath) shutil.copy('data/test.ods', filepath) ds = ogr.Open(filepath, update=1) lyr = ds.GetLayerByName('Feuille7') feat = lyr.GetNextFeature() if feat.GetFID() != 2: feat.DumpReadable() pytest.fail('did not get expected FID') feat.SetField(0, 'modified_value') lyr.SetFeature(feat) feat = None ds = None ds = ogr.Open('tmp/ogr_ods_7.ods') lyr = ds.GetLayerByName('Feuille7') feat = lyr.GetNextFeature() if feat.GetFID() != 2: feat.DumpReadable() pytest.fail('did not get expected FID') if feat.GetField(0) != 'modified_value': feat.DumpReadable() pytest.fail('did not get expected value') feat = None ds = None os.unlink(filepath) ############################################################################### # Test Integer64 def test_ogr_ods_8(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() ds = drv.CreateDataSource('/vsimem/ogr_ods_8.ods') lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('Field1', ogr.OFTInteger64)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 12345678901234) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_ods_8.ods') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger64 f = lyr.GetNextFeature() f = lyr.GetNextFeature() assert f.GetField(0) == 12345678901234 ds = None gdal.Unlink('/vsimem/ogr_ods_8.ods') ############################################################################### # Test DateTime with milliseconds def test_ogr_ods_9(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() ds = drv.CreateDataSource('/vsimem/ogr_ods_9.ods') lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('Field1', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('Field2', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('Field3', ogr.OFTDateTime)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, '2015/12/23 12:34:56.789') f.SetField(1, '2015/12/23 12:34:56.000') f.SetField(2, '2015/12/23 12:34:56') lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_ods_9.ods') lyr = ds.GetLayer(0) for i in range(3): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == ogr.OFTDateTime f = lyr.GetNextFeature() if f.GetField(0) != '2015/12/23 12:34:56.789': f.DumpReadable() pytest.fail() if f.GetField(1) != '2015/12/23 12:34:56': f.DumpReadable() pytest.fail() if f.GetField(2) != '2015/12/23 12:34:56': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_ods_9.ods') ############################################################################### # Test Boolean def test_ogr_ods_boolean(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() out_filename = '/vsimem/ogr_ods_boolean.ods' ds = drv.CreateDataSource(out_filename) lyr = ds.CreateLayer('foo') fld_defn = ogr.FieldDefn('Field1', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, True) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, False) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open(out_filename) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTBoolean f = lyr.GetNextFeature() assert f.GetField(0) f = lyr.GetNextFeature() assert not f.GetField(0) ds = None gdal.Unlink(out_filename) ############################################################################### # Test number-columns-repeated at end of row. def test_ogr_ods_number_columns_repeated_at_end_of_row(): drv = ogr.GetDriverByName('ODS') if drv is None: pytest.skip() ds = ogr.Open('data/testrepeatedcolatendofrow.ods') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() f = lyr.GetNextFeature() assert f['vbz'] == 1002 assert f['b'] == 0 ��������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_mongodbv3.py�������������������������������������������������������������0000775�0001750�0001750�00000075025�13701057761�016624� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_mongodbv3.py d9f7fa611bf09986ea4695f4c5b36be798bf9a17 2019-01-13 13:53:53 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: MongoDBv3 driver testing. # Author: Even Rouault <even dot rouault at spatialys dot com> # ############################################################################### # Copyright (c) 2015-2019, Even Rouault <even dot rouault at spatialys dot com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import uuid import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test if driver is available def test_ogr_mongodbv3_init(): ogrtest.mongodbv3_drv = ogr.GetDriverByName('MongoDBv3') if ogrtest.mongodbv3_drv is None: pytest.skip() ogrtest.mongodbv3_test_uri = None ogrtest.mongodbv3_test_host = None ogrtest.mongodbv3_test_port = None ogrtest.mongodbv3_test_dbname = None ogrtest.mongodbv3_test_user = None ogrtest.mongodbv3_test_password = None if 'MONGODBV3_TEST_URI' in os.environ: ogrtest.mongodbv3_test_uri = os.environ['MONGODBV3_TEST_URI'] pos = ogrtest.mongodbv3_test_uri.rfind('/') assert pos > 0 ogrtest.mongodbv3_test_dbname = ogrtest.mongodbv3_test_uri[pos+1:] elif 'MONGODBV3_TEST_HOST' in os.environ: ogrtest.mongodbv3_test_host = os.environ['MONGODBV3_TEST_HOST'] if 'MONGODBV3_TEST_PORT' in os.environ: ogrtest.mongodbv3_test_port = int(os.environ['MONGODBV3_TEST_PORT']) else: ogrtest.mongodbv3_test_port = 27017 if 'MONGODBV3_TEST_DBNAME' in os.environ: ogrtest.mongodbv3_test_dbname = os.environ['MONGODBV3_TEST_DBNAME'] else: ogrtest.mongodbv3_test_dbname = 'gdalautotest' if 'MONGODBV3_TEST_USER' in os.environ: ogrtest.mongodbv3_test_user = os.environ['MONGODBV3_TEST_USER'] else: ogrtest.mongodbv3_test_user = None if 'MONGODBV3_TEST_PASSWORD' in os.environ: ogrtest.mongodbv3_test_password = os.environ['MONGODBV3_TEST_PASSWORD'] else: ogrtest.mongodbv3_test_password = None else: ogrtest.mongodbv3_drv = None pytest.skip() if ogrtest.mongodbv3_test_uri is None: if ogrtest.mongodbv3_test_user is not None: ogrtest.mongodbv3_test_uri = "mongodbv3:mongodb://%s:%s@%s:%d/%s" % (ogrtest.mongodbv3_test_user, ogrtest.mongodbv3_test_password, ogrtest.mongodbv3_test_host, ogrtest.mongodbv3_test_port, ogrtest.mongodbv3_test_dbname) else: ogrtest.mongodbv3_test_uri = "mongodbv3:mongodb://%s:%d/%s" % (ogrtest.mongodbv3_test_host, ogrtest.mongodbv3_test_port, ogrtest.mongodbv3_test_dbname) ogrtest.mongodbv3_layer_name = None ogrtest.mongodbv3_layer_name_no_ogr_metadata = None ogrtest.mongodbv3_layer_name_guess_types = None ogrtest.mongodbv3_layer_name_with_2d_index = None ogrtest.mongodbv3_layer_name_no_spatial_index = None ds = ogr.Open(ogrtest.mongodbv3_test_uri) if ds is None: ogrtest.mongodbv3_drv = None pytest.skip('cannot open %s' % ogrtest.mongodbv3_test_uri) ############################################################################### # Test various open methods def test_ogr_mongodbv3_1(): if ogrtest.mongodbv3_drv is None: pytest.skip() # Might work or not depending on how the db is set up gdal.PushErrorHandler() ds = ogr.Open("mongodbv3:") gdal.PopErrorHandler() # Wrong URI gdal.PushErrorHandler() ds = ogr.Open("mongodbv3:mongodb://") gdal.PopErrorHandler() assert ds is None # URI to non existent host. gdal.PushErrorHandler() ds = ogr.Open("mongodbv3:mongodb://non_existing") gdal.PopErrorHandler() assert ds is None # Connect to non existent host. gdal.PushErrorHandler() ds = gdal.OpenEx('mongodbv3:', open_options=['HOST=non_existing']) gdal.PopErrorHandler() assert ds is None if ogrtest.mongodbv3_test_host is None: return # All arguments split up open_options = [] open_options += ['HOST=' + ogrtest.mongodbv3_test_host] open_options += ['PORT=' + str(ogrtest.mongodbv3_test_port)] open_options += ['DBNAME=' + ogrtest.mongodbv3_test_dbname] if ogrtest.mongodbv3_test_user is not None: open_options += ['USER=' + ogrtest.mongodbv3_test_user] open_options += ['PASSWORD=' + ogrtest.mongodbv3_test_password] ds = gdal.OpenEx('mongodbv3:', open_options=open_options) assert ds is not None # Without DBNAME open_options = [] open_options += ['HOST=' + ogrtest.mongodbv3_test_host] open_options += ['PORT=' + str(ogrtest.mongodbv3_test_port)] if ogrtest.mongodbv3_test_user is not None: open_options += ['AUTH_DBNAME=' + ogrtest.mongodbv3_test_dbname] open_options += ['USER=' + ogrtest.mongodbv3_test_user] open_options += ['PASSWORD=' + ogrtest.mongodbv3_test_password] gdal.PushErrorHandler() # Will succeed only against server in single mode ds = gdal.OpenEx('mongodbv3:', open_options=open_options) gdal.PopErrorHandler() # A few error cases with authentication if ogrtest.mongodbv3_test_user is not None: open_options = [] open_options += ['HOST=' + ogrtest.mongodbv3_test_host] open_options += ['PORT=' + str(ogrtest.mongodbv3_test_port)] open_options += ['DBNAME=' + ogrtest.mongodbv3_test_dbname] # Missing user and password gdal.PushErrorHandler() ds = gdal.OpenEx('mongodbv3:', open_options=open_options) gdal.PopErrorHandler() assert ds is None open_options = [] open_options += ['HOST=' + ogrtest.mongodbv3_test_host] open_options += ['PORT=' + str(ogrtest.mongodbv3_test_port)] open_options += ['DBNAME=' + ogrtest.mongodbv3_test_dbname] open_options += ['USER=' + ogrtest.mongodbv3_test_user] # Missing password gdal.PushErrorHandler() ds = gdal.OpenEx('mongodbv3:', open_options=open_options) gdal.PopErrorHandler() assert ds is None open_options = [] open_options += ['HOST=' + ogrtest.mongodbv3_test_host] open_options += ['PORT=' + str(ogrtest.mongodbv3_test_port)] open_options += ['USER=' + ogrtest.mongodbv3_test_user] open_options += ['PASSWORD=' + ogrtest.mongodbv3_test_password] # Missing DBNAME gdal.PushErrorHandler() ds = gdal.OpenEx('mongodbv3:', open_options=open_options) gdal.PopErrorHandler() assert ds is None open_options = [] open_options += ['HOST=' + ogrtest.mongodbv3_test_host] open_options += ['PORT=' + str(ogrtest.mongodbv3_test_port)] open_options += ['DBNAME=' + ogrtest.mongodbv3_test_dbname] open_options += ['USER=' + ogrtest.mongodbv3_test_user] open_options += ['PASSWORDv3=' + ogrtest.mongodbv3_test_password + '_wrong'] # Wrong password gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None ############################################################################### # Basic tests def test_ogr_mongodbv3_2(): if ogrtest.mongodbv3_drv is None: pytest.skip() ogrtest.mongodbv3_ds = ogr.Open(ogrtest.mongodbv3_test_uri, update=1) assert ogrtest.mongodbv3_ds.GetLayerByName('not_existing') is None assert ogrtest.mongodbv3_ds.TestCapability(ogr.ODsCCreateLayer) == 1 assert ogrtest.mongodbv3_ds.TestCapability(ogr.ODsCDeleteLayer) == 1 assert ogrtest.mongodbv3_ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) == 1 # Create layer a_uuid = str(uuid.uuid1()).replace('-', '_') ogrtest.mongodbv3_layer_name = 'test_' + a_uuid srs = osr.SpatialReference() srs.SetFromUserInput('+proj=longlat +ellps=WGS84 +towgs84=0,0,0') lyr = ogrtest.mongodbv3_ds.CreateLayer(ogrtest.mongodbv3_layer_name, geom_type=ogr.wkbPolygon, srs=srs, options=['GEOMETRY_NAME=location.mygeom', 'FID=']) gdal.PushErrorHandler() ret = lyr.CreateGeomField(ogr.GeomFieldDefn('location.mygeom', ogr.wkbPoint)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) assert ret == 0 gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 lyr.CreateField(ogr.FieldDefn('location.name', ogr.OFTString)) bool_field = ogr.FieldDefn('bool', ogr.OFTInteger) bool_field.SetSubType(ogr.OFSTBoolean) lyr.CreateField(bool_field) lyr.CreateField(ogr.FieldDefn('int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('real', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('dt', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('embed.str', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('binary', ogr.OFTBinary)) lyr.CreateField(ogr.FieldDefn('strlist', ogr.OFTStringList)) lyr.CreateField(ogr.FieldDefn('intlist', ogr.OFTIntegerList)) lyr.CreateField(ogr.FieldDefn('int64list', ogr.OFTInteger64List)) lyr.CreateField(ogr.FieldDefn('realist', ogr.OFTRealList)) lyr.CreateField(ogr.FieldDefn('embed.embed2.int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('embed.embed2.real', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('str_is_null', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('str_is_unset', ogr.OFTString)) # Test CreateFeature() f = ogr.Feature(lyr.GetLayerDefn()) f['str'] = 'str' f['location.name'] = 'Paris' f['bool'] = 1 f['int'] = 1 f['int64'] = 1234567890123456 # put a number larger than 1 << 40 so that fromjson() doesn't pick double f['real'] = 1.23 f['dt'] = '1234/12/31 23:59:59.123+00' f.SetFieldBinaryFromHexString('binary', '00FF') f['strlist'] = ['a', 'b'] f['intlist'] = [1, 2] f['int64list'] = [1234567890123456, 1234567890123456] f['realist'] = [1.23, 4.56] f['embed.str'] = 'foo' f['embed.embed2.int'] = 3 f['embed.embed2.real'] = 3.45 f.SetFieldNull('str_is_null') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((2 49,2 50,3 50,3 49,2 49))')) assert lyr.CreateFeature(f) == 0 assert f['_id'] is not None f_ref = f.Clone() # Test GetFeatureCount() assert lyr.GetFeatureCount() == 1 # Test GetNextFeature() lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() f_ref.DumpReadable() print(ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef(), max_error=0)) print(gdaltest.reason) pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # Test GetFeature() f = lyr.GetFeature(1) if not f.Equal(f_ref): f.DumpReadable() pytest.fail() # Test SetFeature() f['bool'] = 0 assert lyr.SetFeature(f) == 0 f_ref = f.Clone() f = lyr.GetFeature(1) if f['bool'] != 0: f.DumpReadable() pytest.fail() # Test (not working) DeleteFeature() gdal.PushErrorHandler() ret = lyr.DeleteFeature(1) gdal.PopErrorHandler() assert ret != 0 # Test Mongo filter lyr.SetAttributeFilter('{ "int": 1 }') lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() lyr.SetAttributeFilter('{ "int": 2 }') lyr.ResetReading() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # Test OGR filter lyr.SetAttributeFilter('int = 1') lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() lyr.SetAttributeFilter('int = 2') lyr.ResetReading() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # Test geometry filter lyr.SetAttributeFilter(None) lyr.SetSpatialFilterRect(2.1, 49.1, 2.9, 49.9) lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(1.1, 49.1, 1.9, 49.9) lyr.ResetReading() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() f = f_ref.Clone() f.SetFID(-1) f.SetGeometryDirectly(None) assert lyr.CreateFeature(f) == 0 # Duplicate key gdal.PushErrorHandler() ret = lyr.SyncToDisk() gdal.PopErrorHandler() assert ret != 0 f['_id'] = None lyr.CreateFeature(f) ret = lyr.SyncToDisk() assert ret == 0 # Missing _id f.UnsetField('_id') with gdaltest.error_handler(): ret = lyr.SetFeature(f) assert ret != 0 # MongoDB dialect of ExecuteSQL() with invalid JSON with gdaltest.error_handler(): sql_lyr = ogrtest.mongodbv3_ds.ExecuteSQL('{', dialect='MongoDB') # MongoDB dialect of ExecuteSQL() with nonexistent command. with gdaltest.error_handler(): sql_lyr = ogrtest.mongodbv3_ds.ExecuteSQL('{ "foo": 1 }', dialect='MongoDB') assert sql_lyr is None # MongoDB dialect of ExecuteSQL() with existing commnand sql_lyr = ogrtest.mongodbv3_ds.ExecuteSQL('{ "listCommands" : 1 }', dialect='MongoDB') assert sql_lyr is not None f = sql_lyr.GetNextFeature() assert f is not None f = sql_lyr.GetNextFeature() assert f is None sql_lyr.GetLayerDefn() sql_lyr.ResetReading() sql_lyr.TestCapability('') ogrtest.mongodbv3_ds.ReleaseResultSet(sql_lyr) # Regular ExecuteSQL() sql_lyr = ogrtest.mongodbv3_ds.ExecuteSQL('SELECT * FROM ' + ogrtest.mongodbv3_layer_name) assert sql_lyr is not None ogrtest.mongodbv3_ds.ReleaseResultSet(sql_lyr) # Test CreateLayer again with same name with gdaltest.error_handler(): lyr = ogrtest.mongodbv3_ds.CreateLayer(ogrtest.mongodbv3_layer_name) assert lyr is None ogrtest.mongodbv3_ds = gdal.OpenEx(ogrtest.mongodbv3_test_uri, gdal.OF_UPDATE, open_options=['FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=-1', 'BULK_INSERT=NO', 'JSON_FIELD=TRUE']) # Check after reopening lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_layer_name) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) != 0 f = lyr.GetNextFeature() json_field = f['_json'] # We cannot use feature.Equal() has the C++ layer defn has changed for i in range(f_ref.GetDefnRef().GetFieldCount()): if f.GetField(i) != f_ref.GetField(i) or \ f.GetFieldDefnRef(i).GetType() != f_ref.GetFieldDefnRef(i).GetType() or \ f.GetFieldDefnRef(i).GetSubType() != f_ref.GetFieldDefnRef(i).GetSubType(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() for i in range(f_ref.GetDefnRef().GetGeomFieldCount()): if not f.GetGeomFieldRef(i).Equals(f_ref.GetGeomFieldRef(i)) or \ f.GetGeomFieldDefnRef(i).GetName() != f_ref.GetGeomFieldDefnRef(i).GetName() or \ f.GetGeomFieldDefnRef(i).GetType() != f_ref.GetGeomFieldDefnRef(i).GetType(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(2.1, 49.1, 2.9, 49.9) lyr.ResetReading() if f is None: f.DumpReadable() pytest.fail() # Create a feature only from its _json content and do not store any ogr metadata related to the layer ogrtest.mongodbv3_layer_name_no_ogr_metadata = ogrtest.mongodbv3_layer_name + "_no_ogr_metadata" lyr = ogrtest.mongodbv3_ds.CreateLayer(ogrtest.mongodbv3_layer_name_no_ogr_metadata, options=['GEOMETRY_NAME=location.mygeom', 'FID=', 'WRITE_OGR_METADATA=NO']) f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = json_field assert lyr.CreateFeature(f) == 0 ogrtest.mongodbv3_layer_name_guess_types = ogrtest.mongodbv3_layer_name + "_guess_types" lyr = ogrtest.mongodbv3_ds.CreateLayer(ogrtest.mongodbv3_layer_name_guess_types, geom_type=ogr.wkbNone, options=['FID=', 'WRITE_OGR_METADATA=NO']) f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int": 2, ' f['_json'] += '"int64": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"real": 2.34, ' f['_json'] += '"intlist" : [2], ' f['_json'] += '"reallist" : [2.34], ' f['_json'] += '"int64list" : [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"int_str" : 2, ' f['_json'] += '"str_int" : "2", ' f['_json'] += '"int64_str" : { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"str_int64" : "2", ' f['_json'] += '"int_int64": 2, ' f['_json'] += '"int64_int": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"int_real": 2, ' f['_json'] += '"real_int": 3.45, ' f['_json'] += '"int64_real": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"real_int64": 3.45, ' f['_json'] += '"real_str": 3.45, ' f['_json'] += '"str_real": "3.45", ' f['_json'] += '"int_bool" : 2, ' f['_json'] += '"bool_int" : true, ' f['_json'] += '"intlist_strlist" : [2], ' f['_json'] += '"strlist_intlist" : ["2"], ' f['_json'] += '"intlist_int64list": [2], ' f['_json'] += '"int64list_intlist": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"intlist_reallist": [2], ' f['_json'] += '"reallist_intlist": [3.45], ' f['_json'] += '"int64list_reallist": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"reallist_int64list": [3.45], ' f['_json'] += '"intlist_boollist" : [2], ' f['_json'] += '"boollist_intlist" : [true], ' f['_json'] += '"mixedlist": [true,1,{ "$numberLong" : "1234567890123456" },3.45],' f['_json'] += '"mixedlist2": [true,1,{ "$numberLong" : "1234567890123456" },3.45,"str"]' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int_str" : "3", ' f['_json'] += '"str_int" : 3, ' f['_json'] += '"int64_str" : "2", ' f['_json'] += '"str_int64" : { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"int_int64": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"int64_int": 2, ' f['_json'] += '"int_real" : 3.45, ' f['_json'] += '"real_int": 2, ' f['_json'] += '"int64_real": 3.45, ' f['_json'] += '"real_int64": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"real_str": "3.45", ' f['_json'] += '"str_real": 3.45, ' f['_json'] += '"int_bool" : true, ' f['_json'] += '"bool_int" : 2, ' f['_json'] += '"intlist_strlist" : ["3"], ' f['_json'] += '"strlist_intlist" : [3], ' f['_json'] += '"intlist_int64list": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"int64list_intlist": [2], ' f['_json'] += '"intlist_reallist": [3.45], ' f['_json'] += '"reallist_intlist": [2], ' f['_json'] += '"int64list_reallist": [3.45], ' f['_json'] += '"reallist_int64list": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"intlist_boollist" : [true], ' f['_json'] += '"boollist_intlist" : [2]' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 # This new features will not be taken into account by below the FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=2 f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int": { "$minKey": 1 }, ' f['_json'] += '"int64": { "$minKey": 1 }, ' f['_json'] += '"real": { "$minKey": 1 }, ' f['_json'] += '"intlist" : [1, "1", { "$minKey": 1 },{ "$maxKey": 1 },{ "$numberLong" : "-1234567890123456" }, { "$numberLong" : "1234567890123456" }, -1234567890123456.1, 1234567890123456.1, { "$numberLong" : "1" }, 1.23 ], ' f['_json'] += '"int64list" : [1, { "$numberLong" : "1234567890123456" }, "1", { "$minKey": 1 },{ "$maxKey": 1 }, -1e300, 1e300, 1.23 ], ' f['_json'] += '"reallist" : [1, { "$numberLong" : "1234567890123456" }, 1.0, "1", { "$minKey": 1 },{ "$maxKey": 1 }, { "$numberLong" : "1234567890123456" } ] ' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int": { "$maxKey": 1 }, ' f['_json'] += '"int64": { "$maxKey": 1 }, ' f['_json'] += '"real": { "$maxKey": 1 } ' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 ogrtest.mongodbv3_layer_name_with_2d_index = ogrtest.mongodbv3_layer_name + "_with_2d_index" gdal.SetConfigOption('OGR_MONGODB_SPAT_INDEX_TYPE', '2d') lyr = ogrtest.mongodbv3_ds.CreateLayer(ogrtest.mongodbv3_layer_name_with_2d_index, geom_type=ogr.wkbPoint, options=['FID=', 'WRITE_OGR_METADATA=NO']) gdal.SetConfigOption('OGR_MONGODB_SPAT_INDEX_TYPE', None) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(2 49)')) assert lyr.CreateFeature(f) == 0 ogrtest.mongodbv3_layer_name_no_spatial_index = ogrtest.mongodbv3_layer_name + "_no_spatial_index" for i in range(2): lyr = ogrtest.mongodbv3_ds.CreateLayer(ogrtest.mongodbv3_layer_name_no_spatial_index, options=['SPATIAL_INDEX=NO', 'OVERWRITE=YES']) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(2 49)')) assert lyr.CreateFeature(f) == 0 ogrtest.mongodbv3_ds.ExecuteSQL('WRITE_OGR_METADATA ' + ogrtest.mongodbv3_layer_name_no_spatial_index) # Open "ghost" layer lyr = ogrtest.mongodbv3_ds.GetLayerByName('_ogr_metadata') assert lyr is not None lyr.SetAttributeFilter("layer LIKE '%s%%'" % ogrtest.mongodbv3_layer_name) assert lyr.GetFeatureCount() == 2 assert ogrtest.mongodbv3_ds.DeleteLayer(-1) != 0 lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_test_dbname + '.' + '_ogr_metadata') assert lyr is not None ogrtest.mongodbv3_ds = None # Reopen in read-only ogrtest.mongodbv3_ds = gdal.OpenEx(ogrtest.mongodbv3_test_uri, 0, open_options=['FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=2', 'JSON_FIELD=TRUE']) lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_layer_name_no_ogr_metadata) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 f = lyr.GetNextFeature() for i in range(f_ref.GetDefnRef().GetFieldCount()): if f_ref.GetFieldDefnRef(i).GetNameRef() == "str_is_null": continue if f_ref.GetFieldDefnRef(i).GetNameRef() == "str_is_unset": continue # Order might be a bit different... j = f.GetDefnRef().GetFieldIndex(f_ref.GetFieldDefnRef(i).GetNameRef()) if f.GetField(j) != f_ref.GetField(i) or \ f.GetFieldDefnRef(j).GetType() != f_ref.GetFieldDefnRef(i).GetType() or \ f.GetFieldDefnRef(j).GetSubType() != f_ref.GetFieldDefnRef(i).GetSubType(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() for i in range(f_ref.GetDefnRef().GetGeomFieldCount()): # Order might be a bit different... j = f.GetDefnRef().GetGeomFieldIndex(f_ref.GetGeomFieldDefnRef(i).GetNameRef()) if not f.GetGeomFieldRef(j).Equals(f_ref.GetGeomFieldRef(i)) or \ f.GetGeomFieldDefnRef(j).GetName() != f_ref.GetGeomFieldDefnRef(i).GetName() or \ f.GetGeomFieldDefnRef(j).GetType() != f_ref.GetGeomFieldDefnRef(i).GetType(): f.DumpReadable() f_ref.DumpReadable() print(f_ref.GetGeomFieldDefnRef(i).GetType()) pytest.fail(f.GetGeomFieldDefnRef(j).GetType()) lyr.SetSpatialFilterRect(2.1, 49.1, 2.9, 49.9) lyr.ResetReading() if f is None: f.DumpReadable() pytest.fail() lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_layer_name_guess_types) expected_fields = [ ("int", ogr.OFTInteger), ("int64", ogr.OFTInteger64), ("real", ogr.OFTReal), ("intlist", ogr.OFTIntegerList), ("reallist", ogr.OFTRealList), ("int64list", ogr.OFTInteger64List), ("int_str", ogr.OFTString), ("str_int", ogr.OFTString), ("int64_str", ogr.OFTString), ("str_int64", ogr.OFTString), ("int_int64", ogr.OFTInteger64), ("int64_int", ogr.OFTInteger64), ("int_real", ogr.OFTReal), ("real_int", ogr.OFTReal), ("int64_real", ogr.OFTReal), ("real_int64", ogr.OFTReal), ("real_str", ogr.OFTString), ("str_real", ogr.OFTString), ("int_bool", ogr.OFTInteger), ("bool_int", ogr.OFTInteger), ("intlist_strlist", ogr.OFTStringList), ("strlist_intlist", ogr.OFTStringList), ("intlist_int64list", ogr.OFTInteger64List), ("int64list_intlist", ogr.OFTInteger64List), ("intlist_reallist", ogr.OFTRealList), ("reallist_intlist", ogr.OFTRealList), ("int64list_reallist", ogr.OFTRealList), ("reallist_int64list", ogr.OFTRealList), ("intlist_boollist", ogr.OFTIntegerList), ("boollist_intlist", ogr.OFTIntegerList), ("mixedlist", ogr.OFTRealList), ("mixedlist2", ogr.OFTStringList)] for (fieldname, fieldtype) in expected_fields: fld_defn = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex(fieldname)) assert fld_defn.GetType() == fieldtype, fieldname assert fld_defn.GetSubType() == ogr.OFSTNone f = lyr.GetNextFeature() f = lyr.GetNextFeature() f = lyr.GetNextFeature() if f['intlist'] != [1, 1, -2147483648, 2147483647, -2147483648, 2147483647, -2147483648, 2147483647, 1, 1] or \ f['int64list'] != [1, 1234567890123456, 1, -9223372036854775808, 9223372036854775807, -9223372036854775808, 9223372036854775807, 1] or \ f['int'] != -2147483648 or f['int64'] != -9223372036854775808 or f['real'] - 1 != f['real']: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['int'] != 2147483647 or f['int64'] != 9223372036854775807 or f['real'] + 1 != f['real']: f.DumpReadable() pytest.fail() lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_layer_name_with_2d_index) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) != 0 lyr.SetSpatialFilterRect(1.9, 48.9, 2.1, 49.1) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None lyr.SetSpatialFilterRect(1.9, 48.9, 1.95, 48.95) lyr.ResetReading() f = lyr.GetNextFeature() assert f is None lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_layer_name_no_spatial_index) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 lyr.SetSpatialFilterRect(1.9, 48.9, 2.1, 49.1) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None gdal.PushErrorHandler() lyr = ogrtest.mongodbv3_ds.CreateLayer('foo') gdal.PopErrorHandler() assert lyr is None gdal.ErrorReset() gdal.PushErrorHandler() ogrtest.mongodbv3_ds.ExecuteSQL('WRITE_OGR_METADATA ' + ogrtest.mongodbv3_layer_name) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' lyr_count_before = ogrtest.mongodbv3_ds.GetLayerCount() gdal.PushErrorHandler() ogrtest.mongodbv3_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodbv3_layer_name) gdal.PopErrorHandler() assert ogrtest.mongodbv3_ds.GetLayerCount() == lyr_count_before lyr = ogrtest.mongodbv3_ds.GetLayerByName(ogrtest.mongodbv3_layer_name) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.CreateGeomField(ogr.GeomFieldDefn('foo', ogr.wkbPoint)) gdal.PopErrorHandler() assert ret != 0 f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.DeleteFeature(1) gdal.PopErrorHandler() assert ret != 0 ############################################################################### # test_ogrsf def test_ogr_mongodbv3_3(): if ogrtest.mongodbv3_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro ' + ogrtest.mongodbv3_test_uri) assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Cleanup def test_ogr_mongodbv3_cleanup(): if ogrtest.mongodbv3_drv is None: pytest.skip() ogrtest.mongodbv3_ds = None # Reopen in read-write ogrtest.mongodbv3_ds = ogr.Open(ogrtest.mongodbv3_test_uri, update=1) if ogrtest.mongodbv3_layer_name is not None: ogrtest.mongodbv3_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodbv3_layer_name) if ogrtest.mongodbv3_layer_name_no_ogr_metadata is not None: ogrtest.mongodbv3_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodbv3_layer_name_no_ogr_metadata) if ogrtest.mongodbv3_layer_name_guess_types is not None: ogrtest.mongodbv3_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodbv3_layer_name_guess_types) if ogrtest.mongodbv3_layer_name_with_2d_index is not None: ogrtest.mongodbv3_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodbv3_layer_name_with_2d_index) if ogrtest.mongodbv3_layer_name_no_spatial_index is not None: ogrtest.mongodbv3_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodbv3_layer_name_no_spatial_index) ogrtest.mongodbv3_ds = None �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_dxf.py�������������������������������������������������������������������0000664�0001750�0001750�00001473034�13701057761�015507� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_dxf.py f722e742a6963701692ad111819225355a14a3c6 2020-03-29 21:41:09 +1100 Alan Thomas $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR DXF driver functionality. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2009, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2009-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from sys import version_info import ogrtest import gdaltest from osgeo import gdal from osgeo import ogr import pytest ############################################################################### # Check some general things to see if they meet expectations. def test_ogr_dxf_1(): gdaltest.dxf_ds = ogr.Open('data/assorted.dxf') assert gdaltest.dxf_ds is not None assert gdaltest.dxf_ds.GetLayerCount() == 1, 'expected exactly one layer!' gdaltest.dxf_layer = gdaltest.dxf_ds.GetLayer(0) assert gdaltest.dxf_layer.GetName() == 'entities', \ 'did not get expected layer name.' defn = gdaltest.dxf_layer.GetLayerDefn() assert defn.GetFieldCount() == 6, 'did not get expected number of fields.' fc = gdaltest.dxf_layer.GetFeatureCount() assert fc == 22, ('did not get expected feature count, got %d' % fc) # Setup the utf-8 string. if version_info >= (3, 0, 0): gdaltest.sample_text = 'Text Sample1\u00BF\u03BB\n"abc"' gdaltest.sample_style = 'Text Sample1\u00BF\u03BB\n\\"abc\\"' else: exec("gdaltest.sample_text = u'Text Sample1\u00BF\u03BB'") gdaltest.sample_text += chr(10) gdaltest.sample_style = gdaltest.sample_text + '\\"abc\\"' gdaltest.sample_style = gdaltest.sample_style.encode('utf-8') gdaltest.sample_text += '"abc"' gdaltest.sample_text = gdaltest.sample_text.encode('utf-8') ############################################################################### # Read the first feature, an ellipse and see if it generally meets expectations. def test_ogr_dxf_2(): gdaltest.dxf_layer.ResetReading() feat = gdaltest.dxf_layer.GetNextFeature() assert feat.Layer == '0', 'did not get expected layer for feature 0' assert feat.PaperSpace == None, 'did not get expected PaperSpace for feature 0' assert feat.GetFID() == 0, 'did not get expected fid for feature 0' assert feat.SubClasses == 'AcDbEntity:AcDbEllipse', \ 'did not get expected SubClasses on feature 0.' assert feat.LineType == 'ByLayer', 'Did not get expected LineType' assert feat.EntityHandle == '43', 'did not get expected EntityHandle' if feat.GetStyleString() != 'PEN(c:#000000)': print('%s' % feat.GetStyleString()) pytest.fail('did not get expected style string on feat 0.') geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString25D, \ 'did not get expected geometry type.' envelope = geom.GetEnvelope() area = (envelope[1] - envelope[0]) * (envelope[3] - envelope[2]) exp_area = 1596.12 assert area >= exp_area - 0.5 and area <= exp_area + 0.5, \ ('envelope area not as expected, got %g.' % area) assert geom.GetX(0) == pytest.approx(73.25, abs=0.001) and geom.GetY(0) == pytest.approx(139.75, abs=0.001), \ ('first point (%g,%g) not expected location.' % (geom.GetX(0), geom.GetY(0))) ############################################################################### # Second feature should be a partial ellipse. def test_ogr_dxf_3(): feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() envelope = geom.GetEnvelope() area = (envelope[1] - envelope[0]) * (envelope[3] - envelope[2]) exp_area = 311.864 assert area >= exp_area - 0.5 and area <= exp_area + 0.5, \ ('envelope area not as expected, got %g.' % area) assert geom.GetX(0) == pytest.approx(61.133, abs=0.01) and geom.GetY(0) == pytest.approx(103.592, abs=0.01), \ ('first point (%g,%g) not expected location.' % (geom.GetX(0), geom.GetY(0))) ############################################################################### # Third feature: POINT with RGB true color def test_ogr_dxf_4(): feat = gdaltest.dxf_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT (83.5 160.0 0)') assert feat.GetStyleString() == 'PEN(c:#ffbeb8)', \ 'got wrong color on POINT' ############################################################################### # Fourth feature: LINE def test_ogr_dxf_5(): feat = gdaltest.dxf_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (97.0 159.5 0,108.5 132.25 0)') assert feat.GetGeometryRef().GetGeometryType() != ogr.wkbLineString, \ 'not keeping 3D linestring as 3D' ############################################################################### # Fourth feature: MTEXT def test_ogr_dxf_6(): feat = gdaltest.dxf_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT (84 126)') assert feat.GetGeometryRef().GetGeometryType() != ogr.wkbPoint25D, \ 'not keeping 2D text as 2D' assert feat.GetStyleString() == 'LABEL(f:"Arial",t:"Test",a:30,s:5g,p:7,c:#000000)', \ 'got wrong style string' ############################################################################### # Partial CIRCLE def test_ogr_dxf_7(): feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() envelope = geom.GetEnvelope() area = (envelope[1] - envelope[0]) * (envelope[3] - envelope[2]) exp_area = 445.748 if area < exp_area - 0.5 or area > exp_area + 0.5: print(envelope) pytest.fail('envelope area not as expected, got %g.' % area) assert geom.GetX(0) == pytest.approx(115.258, abs=0.01) and geom.GetY(0) == pytest.approx(107.791, abs=0.01), \ ('first point (%g,%g) not expected location.' % (geom.GetX(0), geom.GetY(0))) ############################################################################### # PaperSpace and dimension def test_ogr_dxf_8(): # Check that this line is in PaperSpace feat = gdaltest.dxf_layer.GetNextFeature() assert feat.GetField('PaperSpace') == 1, 'did not get expected PaperSpace' # Dimension lines feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbMultiLineString, \ 'did not get expected geometry type.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((63.8628719444825 149.209935992088,24.3419606685507 111.934531038653),(72.3255686642474 140.237438265109,63.0051995752285 150.119275371538),(32.8046573883157 102.962033311673,23.4842882992968 112.843870418103))') # Dimension arrowheads feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbPolygon25D, \ 'did not get expected geometry type.' assert not ogrtest.check_feature_geometry(feat, 'POLYGON Z ((61.7583023958313 147.797704380064 0,63.8628719444825 149.209935992088 0,62.3300839753339 147.191478127097 0,61.7583023958313 147.797704380064 0))') feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbPolygon25D, \ 'did not get expected geometry type.' assert not ogrtest.check_feature_geometry(feat, 'POLYGON Z ((26.4465302172018 113.346762650677 0,24.3419606685507 111.934531038653 0,25.8747486376992 113.952988903644 0,26.4465302172018 113.346762650677 0))') # Dimension text feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() assert not ogrtest.check_feature_geometry(feat, 'POINT (42.815907752635709 131.936242584545397)') expected_style = 'LABEL(f:"Arial",t:"54.33",p:5,a:43.3,s:2.5g,c:#000000)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string:\n%s\ninstead of:\n%s' % (feat.GetStyleString(), expected_style)) ############################################################################### # BLOCK (inlined) def test_ogr_dxf_9(): # Skip two dimensions each with a line, two arrowheads and text. for _ in range(8): feat = gdaltest.dxf_layer.GetNextFeature() # block (merged geometries) feat = gdaltest.dxf_layer.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbMultiLineString25D, \ 'did not get expected geometry type.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((79.069506278985116 121.003652476272777 0,79.716898725419625 118.892590150942851 0),(79.716898725419625 118.892590150942851 0,78.140638855839953 120.440702522851453 0),(78.140638855839953 120.440702522851453 0,80.139111190485622 120.328112532167196 0),(80.139111190485622 120.328112532167196 0,78.619146316248077 118.920737648613908 0),(78.619146316248077 118.920737648613908 0,79.041358781314059 120.975504978601705 0))') # First of two MTEXTs feat = gdaltest.dxf_layer.GetNextFeature() assert feat.GetField('Text') == gdaltest.sample_text, \ 'Did not get expected first mtext.' expected_style = 'LABEL(f:"Arial",t:"' + gdaltest.sample_style + '",a:45,s:0.5g,p:5,c:#000000)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) assert not ogrtest.check_feature_geometry(feat, 'POINT (77.602201427662891 120.775897075866169 0)') # Second of two MTEXTs feat = gdaltest.dxf_layer.GetNextFeature() assert feat.GetField('Text') == 'Second', 'Did not get expected second mtext.' assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbMText', \ 'Did not get expected subclasses.' assert not ogrtest.check_feature_geometry(feat, 'POINT (79.977331629005178 119.698291706738644 0)') ############################################################################### # LWPOLYLINE in an Object Coordinate System. def test_ogr_dxf_10(): ocs_ds = ogr.Open('data/LWPOLYLINE-OCS.dxf') ocs_lyr = ocs_ds.GetLayer(0) # Skip boring line. feat = ocs_lyr.GetNextFeature() # LWPOLYLINE in OCS feat = ocs_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString25D, \ 'did not get expected geometry type.' assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (600325.567999998573214 3153021.253000000491738 562.760000000052969,600255.215999998385087 3151973.98600000096485 536.950000000069849,597873.927999997511506 3152247.628000000491738 602.705000000089058)') # LWPOLYLINE in OCS with bulge feat = ocs_lyr.GetFeature(12) assert (not ogrtest.check_feature_geometry(feat, 'LINESTRING Z (611415.459819656 3139300.00002682 1807.37309215522,611245.079665823 3139720.59876424 1807.37309215522,611245.079665823 3139720.59876424 1807.37309215522,611244.054791235 3139723.12875936 1807.27984293229,611243.034695086 3139725.64695847 1807.00053001486,611242.024133533 3139728.14162057 1806.53645568869,611241.027818282 3139730.6011144 1805.88978368251,611240.050394615 3139733.01397265 1805.06352907972,611239.096419732 3139735.36894547 1804.06154426071,611238.170341503 3139737.65505289 1802.88850094122,611237.276477734 3139739.86163602 1801.54986839073,611236.418996029 3139741.97840675 1800.0518879321,611235.601894365 3139743.99549572 1798.40154384175,611234.828982446 3139745.90349832 1796.60653078564,611234.103863944 3139747.69351857 1794.67521794327,611233.429919697 3139749.35721058 1792.61660998662,611232.810291944 3139750.88681743 1790.44030509629,611232.247869676 3139752.27520739 1788.15645021029,611231.745275164 3139753.51590716 1785.77569371438,611231.304851737 3139754.60313201 1783.30913579435,611230.928652852 3139755.5318128 1780.76827668182,611230.618432521 3139756.29761959 1778.16496303489,611230.375637135 3139756.89698184 1775.51133270351,611230.201398719 3139757.32710505 1772.81975813727,611230.096529651 3139757.58598378 1770.10278869926,611230.06151888 3139757.67241101 1767.37309215522,611230.06151892 3139757.67241089 1661.18408370228,611230.06151892 3139757.67241089 1661.18408370228,611230.026508154 3139757.75883812 1658.45438717061,611229.921639091 3139758.01771683 1655.73741774404,611229.74740068 3139758.44784002 1653.04584318824,611229.5046053 3139759.04720226 1650.39221286628,611229.194384975 3139759.81300904 1647.78889922769,611228.818186096 3139760.74168982 1645.24804012238,611228.377762675 3139761.82891465 1642.78148220841,611227.87516817 3139763.0696144 1640.40072571739,611227.312745909 3139764.45800435 1638.11687083509,611226.693118163 3139765.98761118 1635.94056594722,611226.019173923 3139767.65130317 1633.88195799181,611225.294055428 3139769.4413234 1631.95064514943,611224.521143516 3139771.34932599 1630.15563209209,611223.704041858 3139773.36641494 1628.50528799927,611222.84656016 3139775.48318565 1627.00730753696,611221.952696397 3139777.68976876 1625.66867498157,611221.026618175 3139779.97587617 1624.49563165602,611220.072643298 3139782.33084897 1623.49364682979,611219.095219637 3139784.74370721 1622.66739221866,611218.098904392 3139787.20320102 1622.02072020306,611217.088342845 3139789.69786311 1621.55664586644,' + '611216.0682467 3139792.21606221 1621.27733293758,611215.043372117 3139794.74605732 1621.18408370228,610905.973331759 3140557.71325641 1621.18408370228,610905.973331759 3140557.71325641 1621.18408370228,610904.948457176 3140560.24325151 1621.2773329396,610903.928361033 3140562.76145061 1621.55664587034,610902.917799487 3140565.2561127 1622.02072020868,610901.921484243 3140567.71560651 1622.66739222582,610900.944060583 3140570.12846474 1623.49364683831,610899.990085707 3140572.48343755 1624.49563166573,610899.064007486 3140574.76954495 1625.66867499227,610898.170143725 3140576.97612806 1627.00730754846,610897.312662028 3140579.09289877 1628.50528801138,610896.495560372 3140581.10998771 1630.1556321046,610895.722648461 3140583.0179903 1631.95064516215,610894.997529967 3140584.80801053 1633.88195800453,610894.323585729 3140586.47170251 1635.94056595974,610893.703957984 3140588.00130935 1638.1168708472,610893.141535724 3140589.38969929 1640.4007257289,610892.63894122 3140590.63039904 1642.78148221912,610892.198517801 3140591.71762387 1645.2480401321,610891.822318923 3140592.64630464 1647.78889923622,610891.5120986 3140593.41211142 1650.39221287345,610891.269303221 3140594.01147366 1653.04584319386,610891.095064811 3140594.44159685 1655.73741774794,610890.99019575 3140594.70047556 1658.45438717264,610890.955184986 3140594.78690278 1661.18408370228,610890.955185021 3140594.78690272 1752.31638281001,610890.955185021 3140594.78690271 1752.31638281001,610890.920174252 3140594.87332995 1755.04607934987,610890.815305187 3140595.13220867 1757.76304878401,610890.641066773 3140595.56233187 1760.45462334672,610890.398271389 3140596.16169412 1763.10825367492,610890.088051061 3140596.92750091 1765.71156731903,610889.711852178 3140597.85618169 1768.25242642912,610889.271428753 3140598.94340654 1770.71898434711,610888.768834244 3140600.1841063 1773.09974084137,610888.206411978 3140601.57249626 1775.38359572612,610887.586784228 3140603.1021031 1777.55990061562,610886.912839984 3140604.7657951 1779.61850857185,610886.187721485 3140606.55581535 1781.54982141423,610885.414809569 3140608.46381795 1783.34483447076,610884.597707907 3140610.48090691 1784.99517856195,610883.740226205 3140612.59767763 1786.49315902182,610882.846362438 3140614.80426075 1787.83179157397,610881.920284211 3140617.09036817 1789.0048348955,610880.96630933 3140619.44534098 1790.00681971696,610879.988885665 3140621.85819923 1790.83307432256,610878.992570417 3140624.31769305 1791.47974633192,610877.982008866 3140626.81235515 1791.94382066162,610876.961912718 3140629.33055426 1792.22313358291,610875.937038132 3140631.86054938 1792.31638281001,610699.99993399 3141066.17711854 1792.31638281001)')) ocs_lyr = None ocs_ds = None ############################################################################### # Test reading from an entities-only dxf file (#3412) def test_ogr_dxf_11(): eo_ds = ogr.Open('data/entities_only.dxf') eo_lyr = eo_ds.GetLayer(0) # Check first point. feat = eo_lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'POINT (672500.0 242000.0 539.986)')) # Check second point. feat = eo_lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'POINT (672750.0 242000.0 558.974)')) eo_lyr = None eo_ds = None ############################################################################### # Write a simple file with a polygon and a line, and read back. def test_ogr_dxf_12(): ds = ogr.GetDriverByName('DXF').CreateDataSource('tmp/dxf_11.dxf') lyr = ds.CreateLayer('entities') dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(10 12, 60 65)')) lyr.CreateFeature(dst_feat) dst_feat = None dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((0 0,100 0,100 100,0 0))')) lyr.CreateFeature(dst_feat) dst_feat = None # Test 25D linestring with constant Z (#5210) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(1 2 10,3 4 10)')) lyr.CreateFeature(dst_feat) dst_feat = None # Test 25D linestring with different Z (#5210) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(1 2 -10,3 4 10)')) lyr.CreateFeature(dst_feat) dst_feat = None lyr = None ds = None # Read back. ds = ogr.Open('tmp/dxf_11.dxf') lyr = ds.GetLayer(0) # Check first feature feat = lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'LINESTRING(10 12, 60 65)')), \ feat.GetGeometryRef().ExportToWkt() assert feat.GetGeometryRef().GetGeometryType() == ogr.wkbLineString, \ 'not linestring 2D' feat = None # Check second feature feat = lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'POLYGON((0 0,100 0,100 100,0 0))')), \ feat.GetGeometryRef().ExportToWkt() assert feat.GetGeometryRef().GetGeometryType() == ogr.wkbPolygon, \ 'not keeping polygon 2D' feat = None # Check third feature feat = lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'LINESTRING(1 2 10,3 4 10)')), \ feat.GetGeometryRef().ExportToWkt() feat = None # Check fourth feature feat = lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'LINESTRING(1 2 -10,3 4 10)')), \ feat.GetGeometryRef().ExportToWkt() feat = None lyr = None ds = None ds = None os.unlink('tmp/dxf_11.dxf') ############################################################################### # Check smoothed polyline. def test_ogr_dxf_13(): ds = ogr.Open('data/polyline_smooth.dxf') layer = ds.GetLayer(0) feat = layer.GetNextFeature() assert feat.Layer == '1', 'did not get expected layer for feature 0' geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString25D, \ 'did not get expected geometry type.' envelope = geom.GetEnvelope() area = (envelope[1] - envelope[0]) * (envelope[3] - envelope[2]) exp_area = 1350.43 assert area >= exp_area - 0.5 and area <= exp_area + 0.5, \ ('envelope area not as expected, got %g.' % area) # Check for specific number of points from tessellated arc(s). # Note that this number depends on the tessellation algorithm and # possibly the default global arc_stepsize variable; therefore it is # not guaranteed to remain constant even if the input DXF file is constant. # If you retain this test, you may need to update the point count if # changes are made to the aforementioned items. Ideally, one would test # only that more points are returned than in the original polyline, and # that the points lie along (or reasonably close to) said path. assert geom.GetPointCount() == 146, \ ('did not get expected number of points, got %d' % geom.GetPointCount()) assert geom.GetX(0) == pytest.approx(251297.8179, abs=0.001) and geom.GetY(0) == pytest.approx(412226.8286, abs=0.001), \ ('first point (%g,%g) not expected location.' % (geom.GetX(0), geom.GetY(0))) # Other possible tests: # Polylines with no explicit Z coordinates (e.g., no attribute 38 for # LWPOLYLINE and no attribute 30 for POLYLINE) should always return # geometry type ogr.wkbPolygon. Otherwise, ogr.wkbPolygon25D should be # returned even if the Z coordinate values are zero. # If the arc_stepsize global is used, one could test that returned adjacent # points do not slope-diverge greater than that value. ds = None ############################################################################### # Check smooth LWPOLYLINE entity. def test_ogr_dxf_14(): # This test is identical to the previous one except the # newer lwpolyline entity is used. See the comments in the # previous test regarding caveats, etc. ds = ogr.Open('data/lwpolyline_smooth.dxf') layer = ds.GetLayer(0) feat = layer.GetNextFeature() assert feat.Layer == '1', 'did not get expected layer for feature 0' geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString, \ 'did not get expected geometry type.' envelope = geom.GetEnvelope() area = (envelope[1] - envelope[0]) * (envelope[3] - envelope[2]) exp_area = 1350.43 assert area >= exp_area - 0.5 and area <= exp_area + 0.5, \ ('envelope area not as expected, got %g.' % area) assert geom.GetPointCount() == 146, \ ('did not get expected number of points, got %d' % geom.GetPointCount()) assert geom.GetX(0) == pytest.approx(251297.8179, abs=0.001) and geom.GetY(0) == pytest.approx(412226.8286, abs=0.001), \ ('first point (%g,%g) not expected location.' % (geom.GetX(0), geom.GetY(0))) ds = None ############################################################################### # Write a file with dynamic layer creation and confirm that the # dynamically created layer 'abc' matches the definition of the default # layer '0'. def test_ogr_dxf_15(): ds = ogr.GetDriverByName('DXF').CreateDataSource('tmp/dxf_14.dxf', ['FIRST_ENTITY=80']) lyr = ds.CreateLayer('entities') dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(10 12, 60 65)')) dst_feat.SetField('Layer', 'abc') lyr.CreateFeature(dst_feat) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((0 0,100 0,100 100,0 0))')) lyr.CreateFeature(dst_feat) lyr = None ds = None # Read back. ds = ogr.Open('tmp/dxf_14.dxf') lyr = ds.GetLayer(0) # Check first feature feat = lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'LINESTRING(10 12, 60 65)')), \ feat.GetGeometryRef().ExportToWkt() assert feat.GetGeometryRef().GetGeometryType() != ogr.wkbLineString25D, \ 'not linestring 2D' assert feat.GetField('Layer') == 'abc', 'Did not get expected layer, abc.' # Check second point. feat = lyr.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'POLYGON((0 0,100 0,100 100,0 0))')), \ feat.GetGeometryRef().ExportToWkt() assert feat.GetGeometryRef().GetGeometryType() != ogr.wkbPolygon25D, \ 'not keeping polygon 2D' assert feat.GetField('Layer') == '0', 'Did not get expected layer, 0.' lyr = None ds = None # Check the DXF file itself to try and ensure that the layer # is defined essentially as we expect. We assume the only thing # that will be different is the layer name is 'abc' instead of '0' # and the entity id. outdxf = open('tmp/dxf_14.dxf').read() start_1 = outdxf.find(' 0\nLAYER') start_2 = outdxf.find(' 0\nLAYER', start_1 + 10) txt_1 = outdxf[start_1:start_2] txt_2 = outdxf[start_2:start_2 + len(txt_1) + 2] abc_off = txt_2.find('abc\n') assert txt_2[16:abc_off] + '0' + txt_2[abc_off + 3:] == txt_1[16:], \ 'Layer abc does not seem to match layer 0.' # Check that $HANDSEED was set as expected. start_seed = outdxf.find('$HANDSEED') handseed = outdxf[start_seed + 10 + 4:start_seed + 10 + 4 + 8] assert handseed == '00000053', ('Did not get expected HANDSEED, got %s.' % handseed) os.unlink('tmp/dxf_14.dxf') ############################################################################### # Test reading without DXF blocks inlined. def test_ogr_dxf_16(): gdal.SetConfigOption('DXF_INLINE_BLOCKS', 'FALSE') dxf_ds = ogr.Open('data/assorted.dxf') assert dxf_ds is not None assert dxf_ds.GetLayerCount() == 2, 'expected exactly two layers!' dxf_layer = dxf_ds.GetLayer(1) assert dxf_layer.GetName() == 'entities', 'did not get expected layer name.' # read through till we encounter the block reference. feat = dxf_layer.GetNextFeature() while feat.GetField('EntityHandle') != '55': feat = dxf_layer.GetNextFeature() # check contents. assert feat.GetField('BlockName') == 'STAR', 'Did not get blockname!' assert feat.GetField('BlockAngle') == 0.0, 'Did not get expected angle.' assert feat.GetField('BlockScale') == [1.0, 1.0, 1.0], \ 'Did not get expected BlockScale' assert not ogrtest.check_feature_geometry(feat, 'POINT (79.097653776656188 119.962195062443342 0)') feat = None # Now we need to check the blocks layer and ensure it is as expected. dxf_layer = dxf_ds.GetLayer(0) assert dxf_layer.GetName() == 'blocks', 'did not get expected layer name.' # STAR geometry feat = dxf_layer.GetNextFeature() assert feat.GetField('Block') == 'STAR', 'Did not get expected block name.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((-0.028147497671066 1.041457413829428 0,0.619244948763444 -1.069604911500494 0),(0.619244948763444 -1.069604911500494 0,-0.957014920816232 0.478507460408116 0),(-0.957014920816232 0.478507460408116 0,1.041457413829428 0.365917469723853 0),(1.041457413829428 0.365917469723853 0,-0.478507460408116 -1.041457413829428 0),(-0.478507460408116 -1.041457413829428 0,-0.056294995342131 1.013309916158363 0))') # First MTEXT feat = dxf_layer.GetNextFeature() assert feat.GetField('Text') == gdaltest.sample_text, \ 'Did not get expected first mtext.' expected_style = 'LABEL(f:"Arial",t:"' + gdaltest.sample_style + '",a:45,s:0.5g,p:5,c:#000000)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) assert not ogrtest.check_feature_geometry(feat, 'POINT (-1.495452348993292 0.813702013422821 0)') # Second MTEXT feat = dxf_layer.GetNextFeature() assert feat.GetField('Text') == 'Second', 'Did not get expected second mtext.' assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbMText', \ 'Did not get expected subclasses.' assert not ogrtest.check_feature_geometry(feat, 'POINT (0.879677852348995 -0.263903355704699 0)') feat = None # cleanup gdal.SetConfigOption('DXF_INLINE_BLOCKS', 'TRUE') ############################################################################### # Write a file with blocks defined from a source blocks layer. def test_ogr_dxf_17(): ds = ogr.GetDriverByName('DXF').CreateDataSource('tmp/dxf_17.dxf', ['HEADER=data/header_extended.dxf']) blyr = ds.CreateLayer('blocks') lyr = ds.CreateLayer('entities') dst_feat = ogr.Feature(feature_def=blyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt( 'GEOMETRYCOLLECTION( LINESTRING(0 0,1 1),LINESTRING(1 0,0 1))')) dst_feat.SetField('Block', 'XMark') blyr.CreateFeature(dst_feat) # Block with 2 polygons dst_feat = ogr.Feature(feature_def=blyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt( 'GEOMETRYCOLLECTION( POLYGON((10 10,10 20,20 20,20 10,10 10)),POLYGON((10 -10,10 -20,20 -20,20 -10,10 -10)))')) dst_feat.SetField('Block', 'Block2') blyr.CreateFeature(dst_feat) # Block with point and line dst_feat = ogr.Feature(feature_def=blyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt( 'GEOMETRYCOLLECTION( POINT(1 2),LINESTRING(0 0,1 1))')) dst_feat.SetField('Block', 'Block3') blyr.CreateFeature(dst_feat) # Write a block reference feature. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(200 100)')) dst_feat.SetField('Layer', 'abc') dst_feat.SetField('BlockName', 'XMark') lyr.CreateFeature(dst_feat) # Write a block reference feature for a non-existent block. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(300 50)')) dst_feat.SetField('Layer', 'abc') dst_feat.SetField('BlockName', 'DoesNotExist') lyr.CreateFeature(dst_feat) # Write a block reference feature for a template defined block dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(250 200)')) dst_feat.SetField('Layer', 'abc') dst_feat.SetField('BlockName', 'STAR') lyr.CreateFeature(dst_feat) # Write a block reference feature with scaling and rotation dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(300 100)')) dst_feat.SetField('BlockName', 'XMark') dst_feat.SetField('BlockAngle', '30') dst_feat.SetFieldDoubleList(lyr.GetLayerDefn().GetFieldIndex('BlockScale'), [4.0, 5.0, 6.0]) lyr.CreateFeature(dst_feat) # Write a Block2 reference feature. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(350 100)')) dst_feat.SetField('Layer', 'abc') dst_feat.SetField('BlockName', 'Block2') lyr.CreateFeature(dst_feat) # Write a Block3 reference feature. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(400 100)')) dst_feat.SetField('Layer', 'abc') dst_feat.SetField('BlockName', 'Block3') lyr.CreateFeature(dst_feat) ds = None # Reopen and check contents. ds = ogr.Open('tmp/dxf_17.dxf') lyr = ds.GetLayer(0) # Check first feature. feat = lyr.GetNextFeature() assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbBlockReference', \ 'Got wrong subclasses for feature 1.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((200 100,201 101),(201 100,200 101))'), \ 'Feature 1' # Check 2nd feature. feat = lyr.GetNextFeature() assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbPoint', \ 'Got wrong subclasses for feature 2.' assert not ogrtest.check_feature_geometry(feat, 'POINT (300 50)'), 'Feature 2' # Check 3rd feature. feat = lyr.GetNextFeature() assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbBlockReference', \ 'Got wrong subclasses for feature 3.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((249.971852502328943 201.04145741382942 0,250.619244948763452 198.930395088499495 0),(250.619244948763452 198.930395088499495 0,249.042985079183779 200.47850746040811 0),(249.042985079183779 200.47850746040811 0,251.04145741382942 200.365917469723854 0),(251.04145741382942 200.365917469723854 0,249.52149253959189 198.95854258617058 0),(249.52149253959189 198.95854258617058 0,249.943705004657858 201.013309916158363 0))'), \ 'Feature 3' # Check 4th feature (scaled and rotated) feat = lyr.GetNextFeature() assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbBlockReference', \ 'Got wrong subclasses for feature 4.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((300 100,300.964101615137736 106.330127018922198), (303.464101615137736 102.0,297.5 104.330127018922198))'), \ 'Feature 4' # Check 5th feature feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON (((360 110,360 120,370 120,370 110,360 110)),((360 90,360 80,370 80,370 90,360 90)))'), \ 'Feature 5' # Check 6th feature feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'GEOMETRYCOLLECTION (POINT (401 102),LINESTRING (400 100,401 101))'), \ 'Feature 5' # Cleanup lyr = None ds = None os.unlink('tmp/dxf_17.dxf') ############################################################################### # Write a file with line patterns, and make sure corresponding Linetypes are # created. def test_ogr_dxf_18(): ds = ogr.GetDriverByName('DXF').CreateDataSource('tmp/dxf_18.dxf', ['HEADER=data/header_extended.dxf']) lyr = ds.CreateLayer('entities') # Write a feature with a predefined LTYPE in the header. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(0 0,25 25)')) dst_feat.SetField('Linetype', 'DASHED') dst_feat.SetStyleString('PEN(c:#ffff00,w:2g,p:"12.0g 6.0g")') lyr.CreateFeature(dst_feat) # Write a feature with a named linetype but that isn't predefined in the header. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(5 5,30 30)')) dst_feat.SetField('Linetype', 'DOTTED') dst_feat.SetStyleString('PEN(c:#ffff00,w:2g,p:"0.0g 4.0g")') lyr.CreateFeature(dst_feat) # Write a feature without a linetype name - it will be created. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(5 5,40 30)')) dst_feat.SetStyleString('PEN(c:#ffff00,w:2g,p:"3.0g 4.0g")') lyr.CreateFeature(dst_feat) # Write a feature with a linetype proportional to a predefined one. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(5 5,40 20)')) dst_feat.SetStyleString('PEN(c:#ffff00,w:0.3mm,p:"6.35g 3.0617284g")') lyr.CreateFeature(dst_feat) # Write a feature with a linetype proportional to an auto-created one. dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(5 5,40 10)')) dst_feat.SetStyleString('PEN(c:#ffff00,w:20px,p:"6.0g 8.0g")') lyr.CreateFeature(dst_feat) ds = None # Reopen and check contents. ds = ogr.Open('tmp/dxf_18.dxf') lyr = ds.GetLayer(0) # Check first feature. feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'DASHED', 'Got wrong linetype. (1)' assert feat.GetStyleString() == 'PEN(c:#ffff00,w:2g,p:"12.7g 6.1234567892g")', \ "got wrong style string (1)" assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (0 0,25 25)') # Check second feature. feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'DOTTED', 'Got wrong linetype. (2)' assert feat.GetStyleString() == 'PEN(c:#ffff00,w:2g,p:"0g 4g")', \ "got wrong style string (2)" assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (5 5,30 30)') # Check third feature. feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'AutoLineType-1', 'Got wrong linetype. (3)' assert feat.GetStyleString() == 'PEN(c:#ffff00,w:2g,p:"3g 4g")', \ "got wrong style string (3)" assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (5 5,40 30)') # Check fourth feature. feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'DASHED', 'Got wrong linetype. (4)' # TODO why did the lineweight go AWOL here? assert feat.GetStyleString() == 'PEN(c:#ffff00,p:"6.35g 3.0617283946g")', \ "got wrong style string (4)" # Check fifth feature. feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'AutoLineType-1', 'Got wrong linetype. (5)' assert feat.GetStyleString() == 'PEN(c:#ffff00,w:0.01g,p:"6g 8g")', \ "got wrong style string (5)" # Cleanup lyr = None ds = None os.unlink('tmp/dxf_18.dxf') ############################################################################### # Test writing a file using references to blocks defined entirely in the # template - no blocks layer transferred. def test_ogr_dxf_19(): ds = ogr.GetDriverByName('DXF').CreateDataSource('tmp/dxf_19.dxf', ['HEADER=data/header_extended.dxf']) lyr = ds.CreateLayer('entities') # Write a block reference feature for a template defined block dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(250 200)')) dst_feat.SetField('Layer', 'abc') dst_feat.SetField('BlockName', 'STAR') lyr.CreateFeature(dst_feat) ds = None # Reopen and check contents. ds = ogr.Open('tmp/dxf_19.dxf') lyr = ds.GetLayer(0) # Check first feature. feat = lyr.GetNextFeature() assert feat.GetField('SubClasses') == 'AcDbEntity:AcDbBlockReference', \ 'Got wrong subclasses for feature 1.' assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((249.971852502328943 201.04145741382942 0,250.619244948763452 198.930395088499495 0),(250.619244948763452 198.930395088499495 0,249.042985079183779 200.47850746040811 0),(249.042985079183779 200.47850746040811 0,251.04145741382942 200.365917469723854 0),(251.04145741382942 200.365917469723854 0,249.52149253959189 198.95854258617058 0),(249.52149253959189 198.95854258617058 0,249.943705004657858 201.013309916158363 0))') # Cleanup lyr = None ds = None os.unlink('tmp/dxf_19.dxf') ############################################################################### # SPLINE def test_ogr_dxf_20(): ds = ogr.Open('data/spline_qcad.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (10.75 62.75,20.637752769146068 63.434832501489716,29.283239084385464 63.396838394381845,36.766943814562865 62.711565975596599,43.169351828522906 61.454563542054103,48.570947995110252 59.70137939067456,53.05221718316956 57.527561818378146,56.693644261545501 55.008659122085049,59.575714099082703 52.220219598715438,61.778911564625851 49.237791545189509,63.383721527019588 46.136923258427423,64.470628855108572 42.993163035349369,65.120118417737459 39.882059172875508,65.412419131869868 36.878358785215056,65.417809785093752 34.025663008687722,65.193643595004147 31.327113252708507,64.796409941597645 28.783146935042897,64.282598204870823 26.394201473456341,63.708697764820236 24.16071428571431,63.131198001442392 22.083122789582241,62.606588294733939 20.161864402825621,62.191358024691354 18.397376543209894,61.941996571311265 16.790096628500525,61.914993314590184 15.340462076462975,62.166837634524704 14.0489103048627,62.754018911111373 12.915878731465167,63.723652286703427 11.940700981548817,65.053571428571416 11.114552964042769,66.690557841792398 10.424954275262921,68.581246558980226 9.859407264767562,70.672272612748785 9.405414282114966,72.910271035711943 9.050477676863418,75.241876860483572 8.782099798571203,77.613725119677511 8.587782996796603,79.97245084590763 8.4550296210979,82.264689071787842 8.371342021033378,84.437074829931987 8.324222546161321,86.436243152953921 8.301173546040012,88.208926721776336 8.289771106365336,89.722559658784164 8.293223374005688,90.990763736417563 8.349615688917151,92.033410218878885 8.501752503862612,92.870370370370395 8.792438271604945,93.521515455094473 9.264477444907039,94.006716737253413 9.960674476531764,94.345845481049565 10.923833819242011,94.558772950685281 12.196759925800654,94.665370410362868 13.82225724897058,94.685509124284636 15.843130241514663,94.639060356652948 18.302183356195791,94.545895371670113 21.242221045776841,94.421471763308503 24.702030018356666,94.215205541358216 28.660279617432039,93.825673773330607 33.049360720184715,93.15014577259474 37.800473760933045,92.085890852519697 42.844819173995376,90.530178326474584 48.113597393690064,88.380277507828495 53.538008854335445,85.533457709950525 59.049253990249873,81.886988246209697 64.578533235751706,77.338138429975174 70.057047025159264,71.784177574615995 75.415995792790937,65.122374993501282 80.586579972965055,57.25 85.5)') ds = None ############################################################################### # CIRCLE and long ARC with specified maximum interval between vertices def test_ogr_dxf_21(): ds = ogr.Open('data/circle.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (5 2 3,4.990256201039297 1.720974105023499 3,4.961072274966281 1.443307596159738 3,4.912590402935223 1.168353236728963 3,4.845046783753276 0.897450576732003 3,4.758770483143634 0.631919426697325 3,4.654181830570403 0.373053427696799 3,4.531790371435708 0.122113748856437 3,4.392192384625703 -0.11967705693282 3,4.23606797749979 -0.351141009169893 3,4.064177772475912 -0.571150438746157 3,3.877359201354605 -0.778633481835989 3,3.676522425435433 -0.972579301909577 3,3.462645901302633 -1.152043014426888 3,3.236771613882987 -1.316150290220167 3,3.0 -1.464101615137754 3,2.75348458715631 -1.595176185196668 3,2.498426373663648 -1.70873541826715 3,2.23606797749979 -1.804226065180614 3,1.967687582398672 -1.881182905103986 3,1.694592710667722 -1.939231012048832 3,1.418113853070614 -1.978087581473093 3,1.139597986810004 -1.997563308076383 3,0.860402013189997 -1.997563308076383 3,0.581886146929387 -1.978087581473094 3,0.305407289332279 -1.939231012048832 3,0.032312417601329 -1.881182905103986 3,-0.236067977499789 -1.804226065180615 3,-0.498426373663648 -1.70873541826715 3,-0.75348458715631 -1.595176185196668 3,-1.0 -1.464101615137755 3,-1.236771613882987 -1.316150290220167 3,-1.462645901302633 -1.152043014426888 3,-1.676522425435433 -0.972579301909577 3,-1.877359201354605 -0.778633481835989 3,-2.064177772475912 -0.571150438746158 3,-2.236067977499789 -0.351141009169893 3,-2.392192384625704 -0.11967705693282 3,-2.531790371435707 0.122113748856436 3,-2.654181830570403 0.373053427696798 3,-2.758770483143633 0.631919426697324 3,-2.845046783753275 0.897450576732001 3,-2.912590402935223 1.168353236728963 3,-2.961072274966281 1.443307596159737 3,-2.990256201039297 1.720974105023498 3,-3.0 2.0 3,-2.990256201039297 2.279025894976499 3,-2.961072274966281 2.556692403840262 3,-2.912590402935223 2.831646763271036 3,-2.845046783753276 3.102549423267996 3,-2.758770483143634 3.368080573302675 3,-2.654181830570404 3.626946572303199 3,-2.531790371435708 3.877886251143563 3,-2.392192384625704 4.119677056932819 3,-2.23606797749979 4.351141009169892 3,-2.064177772475912 4.571150438746157 3,-1.877359201354604 4.778633481835989 3,-1.676522425435434 4.972579301909576 3,-1.462645901302632 5.152043014426889 3,-1.236771613882989 5.316150290220166 3,-1.0 5.464101615137753 3,-0.753484587156311 5.595176185196667 3,-0.498426373663649 5.70873541826715 3,-0.23606797749979 5.804226065180615 3,0.032312417601329 5.881182905103985 3,0.305407289332279 5.939231012048833 3,0.581886146929387 5.978087581473094 3,0.860402013189993 5.997563308076383 3,1.139597986810005 5.997563308076383 3,1.418113853070612 5.978087581473094 3,1.69459271066772 5.939231012048833 3,1.96768758239867 5.881182905103986 3,2.236067977499789 5.804226065180615 3,2.498426373663648 5.70873541826715 3,2.75348458715631 5.595176185196668 3,3.0 5.464101615137754 3,3.236771613882985 5.316150290220168 3,3.462645901302634 5.152043014426887 3,3.676522425435431 4.972579301909578 3,3.877359201354603 4.778633481835991 3,4.064177772475912 4.571150438746159 3,4.23606797749979 4.351141009169893 3,4.392192384625702 4.119677056932823 3,4.531790371435708 3.877886251143563 3,4.654181830570404 3.626946572303201 3,4.758770483143634 3.368080573302675 3,4.845046783753275 3.102549423267999 3,4.912590402935223 2.831646763271039 3,4.961072274966281 2.556692403840263 3,4.990256201039298 2.279025894976499 3,5.0 2.0 3)') gdal.SetConfigOption('OGR_ARC_MAX_GAP', '80') feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() gdal.SetConfigOption('OGR_ARC_MAX_GAP', None) assert geom.GetPointCount() == 4, \ ('did not get expected number of points, got %d' % geom.GetPointCount()) ds = None ############################################################################### # TEXT def test_ogr_dxf_22(): # Read MTEXT feature ds = ogr.Open('data/text.dxf') lyr = ds.GetLayer(0) if version_info >= (3, 0, 0): test_text = 'test\ttext ab/c~d\u00B1ef^g.h#i jklm' else: exec("test_text = u'test\ttext ab/c~d\u00B1ef^g.h#i jklm'") test_text = test_text.encode('utf-8') feat = lyr.GetNextFeature() if feat.GetFieldAsString('Text') != test_text: feat.DumpReadable() pytest.fail('bad attribute') style = feat.GetStyleString() if style != 'LABEL(f:"SwissCheese",bo:1,t:"' + test_text + '",a:45,s:10g,w:51,c:#ff0000)': feat.DumpReadable() print(style) pytest.fail('bad style') if ogrtest.check_feature_geometry(feat, 'POINT(1 2 3)'): feat.DumpReadable() pytest.fail('bad geometry') # Write text feature out_ds = ogr.GetDriverByName('DXF').CreateDataSource('/vsimem/ogr_dxf_22.dxf') out_lyr = out_ds.CreateLayer('entities') out_feat = ogr.Feature(out_lyr.GetLayerDefn()) out_feat.SetStyleString(style) out_feat.SetGeometry(feat.GetGeometryRef()) out_lyr.CreateFeature(out_feat) out_feat = None out_lyr = None out_ds = None ds = None # Check written file ds = ogr.Open('/vsimem/ogr_dxf_22.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('Text') != test_text: feat.DumpReadable() pytest.fail('bad attribute') style = feat.GetStyleString() if style != 'LABEL(f:"SwissCheese",bo:1,t:"' + test_text + '",a:45,s:10g,w:51,c:#ff0000)': feat.DumpReadable() print(style) pytest.fail('bad style') if ogrtest.check_feature_geometry(feat, 'POINT(1 2 3)'): feat.DumpReadable() pytest.fail('bad geometry') ds = None gdal.Unlink('/vsimem/ogr_dxf_22.dxf') # Now try reading in the MTEXT feature without translating escape sequences gdal.SetConfigOption('DXF_TRANSLATE_ESCAPE_SEQUENCES', 'FALSE') ds = ogr.Open('data/text.dxf') gdal.SetConfigOption('DXF_TRANSLATE_ESCAPE_SEQUENCES', None) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('Text') != r'\A1;test^Itext\~\pt0.2;{\H0.7x;\Sab\/c\~d%%p^ ef\^ g.h\#i;} j{\L\Ok\ol}m': feat.DumpReadable() pytest.fail('bad attribute with DXF_TRANSLATE_ESCAPE_SEQUENCES = FALSE') ds = None ############################################################################### # POLYGON with hole def test_ogr_dxf_23(): # Write polygon out_ds = ogr.GetDriverByName('DXF').CreateDataSource('/vsimem/ogr_dxf_23.dxf') out_lyr = out_ds.CreateLayer('entities') out_feat = ogr.Feature(out_lyr.GetLayerDefn()) out_feat.SetStyleString('BRUSH(fc:#ff0000)') wkt = 'POLYGON ((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1))' out_feat.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) out_lyr.CreateFeature(out_feat) out_feat = None out_lyr = None out_ds = None ds = None # Check written file ds = ogr.Open('/vsimem/ogr_dxf_23.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() style = feat.GetStyleString() assert style == 'BRUSH(fc:#ff0000)', 'bad style' assert not ogrtest.check_feature_geometry(feat, wkt), 'bad geometry' ds = None gdal.Unlink('/vsimem/ogr_dxf_23.dxf') ############################################################################### # HATCH def test_ogr_dxf_24(): ds = ogr.Open('data/hatch.dxf') lyr = ds.GetLayer(0) gdal.SetConfigOption('OGR_ARC_STEPSIZE', '45') feat = lyr.GetNextFeature() gdal.SetConfigOption('OGR_ARC_STEPSIZE', None) assert not ogrtest.check_feature_geometry(feat, 'POLYGON ((2 1,1.646446609406726 0.853553390593274,1.5 0.5,1.646446609406726 0.146446609406726,2 0,2.146446609406726 -0.353553390593274,2.5 -0.5,2.853553390593274 -0.353553390593274,3.0 -0.0,3.353553390593274 0.146446609406726,3.5 0.5,3.353553390593274 0.853553390593273,3 1,2.853553390593274 1.353553390593274,2.5 1.5,2.146446609406726 1.353553390593274,2 1))') gdal.SetConfigOption('OGR_ARC_STEPSIZE', '45') feat = lyr.GetNextFeature() gdal.SetConfigOption('OGR_ARC_STEPSIZE', None) assert not ogrtest.check_feature_geometry(feat, 'POLYGON ((0.0 0.0 0,-0.353553390593274 0.146446609406726 0,-0.5 0.5 0,-0.353553390593274 0.853553390593274 0,-0.0 1.0 0,0.146446609406726 1.353553390593274 0,0.5 1.5 0,0.853553390593274 1.353553390593274 0,1.0 1.0 0,1.353553390593274 0.853553390593274 0,1.5 0.5 0,1.353553390593274 0.146446609406727 0,1.0 0.0 0,0.853553390593274 -0.353553390593274 0,0.5 -0.5 0,0.146446609406726 -0.353553390593274 0,0.0 0.0 0))') feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POLYGON ((-1 -1,-1 0,0 0,-1 -1))') ds = None ############################################################################### # 3DFACE def test_ogr_dxf_25(): ds = ogr.Open('data/3dface.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((10 20 30,11 21 31,12 22 32,10 20 30))'): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((10 20 30,11 21 31,12 22 32,13 23 33,10 20 30))'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # SOLID (#5380) def test_ogr_dxf_26(): ds = ogr.Open('data/solid.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((2.716846 2.762514,2.393674 1.647962,4.391042 1.06881,4.714214 2.183362,2.716846 2.762514))'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test reading a DXF file without .dxf extensions (#5994) def test_ogr_dxf_27(): gdal.FileFromMemBuffer('/vsimem/a_dxf_without_extension', open('data/solid.dxf').read()) ds = ogr.Open('/vsimem/a_dxf_without_extension') assert ds is not None gdal.Unlink('/vsimem/a_dxf_without_extension') ############################################################################### # Test reading a ELLIPSE with Z extrusion axis value of -1.0 (#5075) def test_ogr_dxf_28(): ds = ogr.Open('data/ellipse_z_extrusion_minus_1.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (247.379588068074 525.677518653024 0,247.560245171261 525.685592896308 0,247.739941456101 525.705876573267 0,247.917852718752 525.738276649788 0,248.09316294264 525.782644518081 0,248.265068041245 525.838776678293 0,248.432779546163 525.90641567189 0,248.595528223532 525.985251262527 0,248.752567602242 526.074921858996 0,248.903177397731 526.175016173715 0,249.046666815684 526.285075109164 0,249.182377720457 526.404593863601 0,249.309687653722 526.533024246411 0,249.428012689458 526.669777192466 0,249.536810112221 526.814225463957 0,249.635580906384 526.965706527318 0,249.723872044951 527.123525592032 0)'): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (290.988651614349 531.01336644407 0,290.900681473157 531.171364661134 0,290.823607338001 531.334954880971 0,290.757782720911 531.503386772611 0,290.703509536322 531.675887798031 0,290.661036716299 531.85166675552 0,290.630559068775 532.029917408641 0,290.612216384031 532.209822184155 0,290.606092793529 532.390555921946 0,290.612216384031 532.571289659737 0,290.630559068775 532.751194435252 0,290.661036716299 532.929445088373 0,290.703509536321 533.105224045862 0,290.75778272091 533.277725071282 0,290.823607338 533.446156962922 0,290.900681473156 533.60974718276 0,290.988651614348 533.767745399824 0)'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # SPLINE with weights def test_ogr_dxf_29(): ds = ogr.Open('data/spline_weight.dxf') lyr = ds.GetLayer(0) # spline 227, no weight feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 2, 2.10256409645081 2.15371131896973, 2.20512819290161 2.3066132068634, 2.307692527771 2.4578971862793, 2.41025638580322 2.6067533493042, 2.51282024383545 2.75237274169922, 2.61538457870483 2.89394640922546, 2.71794891357422 3.03066444396973, 2.82051301002502 3.16171884536743, 2.92307710647583 3.28629970550537, 3.02564096450806 3.40359783172607, 3.12820529937744 3.51280379295349, 3.23076939582825 3.61310863494873, 3.33333325386047 3.70370388031006, 3.43589782714844 3.78377938270569, 3.53846144676208 3.85252642631531, 3.64102602005005 3.90913581848145, 3.74358987808228 3.95279765129089, 3.84615445137024 3.98270392417908, 3.94871830940247 3.99804472923279, 4.05128240585327 3.99804425239563, 4.15384674072266 3.9827036857605, 4.25641107559204 3.95279765129089, 4.35897541046143 3.90913534164429, 4.46153926849365 3.85252571105957, 4.56410360336304 3.78377866744995, 4.66666793823242 3.70370292663574, 4.76923179626465 3.61310815811157, 4.87179613113403 3.51280236244202, 4.97436046600342 3.40359592437744, 5.07692432403564 3.2862982749939, 5.17948865890503 3.16171741485596, 5.28205299377441 3.03066277503967, 5.38461685180664 2.89394426345825, 5.48718070983887 2.75237035751343, 5.58974552154541 2.60675096511841, 5.69230937957764 2.45789456367493, 5.79487323760986 2.30661058425903, 5.89743757247925 2.15370845794678, 6 2)'): feat.DumpReadable() pytest.fail() # spline 261, weight(3) = 2.0 feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 2, 2.10976576805115 2.16451454162598, 2.23113083839417 2.34563326835632, 2.35994720458984 2.53639197349548, 2.49239826202393 2.73041176795959, 2.62522411346436 2.92225241661072, 2.75582838058472 3.10756635665894, 2.88229131698608 3.2831084728241, 3.00331926345825 3.44663000106812, 3.11815142631531 3.59672045707703, 3.2264621257782 3.73262500762939, 3.32825922966003 3.85407567024231, 3.42379808425903 3.96113181114197, 3.51351404190063 4.05405473709106, 3.59796214103699 4.13319540023804, 3.67778849601746 4.19891929626465, 3.75369834899902 4.25152969360352, 3.82645153999329 4.29121112823486, 3.89685702323914 4.31797361373901, 3.96579027175903 4.33159732818604, 4.03421020507812 4.33159732818604, 4.1031436920166 4.31797361373901, 4.17354917526245 4.29121017456055, 4.24630165100098 4.2515287399292, 4.32221221923828 4.19891929626465, 4.40203857421875 4.13319492340088, 4.48648738861084 4.05405378341675, 4.57620286941528 3.96113133430481, 4.67174291610718 3.85407471656799, 4.77353954315186 3.73262333869934, 4.88184928894043 3.59671831130981, 4.99668216705322 3.44662809371948, 5.11771011352539 3.28310608863831, 5.24417400360107 3.10756373405457, 5.37477827072144 2.92224931716919, 5.50760412216187 2.73040890693665, 5.64005517959595 2.5363883972168, 5.76887130737305 2.34562969207764, 5.89023685455322 2.16451120376587, 6 2)'): feat.DumpReadable() pytest.fail() # spline 262, weight(3) = 0.5 feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 2, 2.09894275665283 2.14827871322632, 2.19183802604675 2.28667020797729, 2.28029608726501 2.41674375534058, 2.36573505401611 2.53972935676575, 2.4494321346283 2.65657186508179, 2.53256177902222 2.76796913146973, 2.61621570587158 2.87439489364624, 2.70142364501953 2.97611308097839, 2.78915071487427 3.07318329811096, 2.88029623031616 3.16546249389648, 2.97567653656006 3.25260472297668, 3.07599782943726 3.33406257629395, 3.18181824684143 3.40909075737, 3.29349946975708 3.4767644405365, 3.4111499786377 3.53600478172302, 3.53456783294678 3.58562660217285, 3.66318273544312 3.62440752983093, 3.79601716995239 3.6511766910553, 3.93166828155518 3.66492199897766, 4.06833267211914 3.66492199897766, 4.20398426055908 3.65117692947388, 4.33681774139404 3.62440729141235, 4.4654335975647 3.58562660217285, 4.58885097503662 3.53600406646729, 4.70650196075439 3.47676372528076, 4.81818294525146 3.40909028053284, 4.92400360107422 3.33406162261963, 5.02432489395142 3.25260376930237, 5.11970520019531 3.16546106338501, 5.21085071563721 3.07318210601807, 5.29857730865479 2.9761118888855, 5.38378524780273 2.87439346313477, 5.46744012832642 2.76796770095825, 5.55056858062744 2.65656995773315, 5.63426637649536 2.53972721099854, 5.71970558166504 2.41674160957336, 5.8081636428833 2.2866678237915, 5.9010591506958 2.14827609062195, 6 2)'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # SPLINE closed def test_ogr_dxf_30(): ds = ogr.Open('data/spline_closed.dxf') lyr = ds.GetLayer(0) # spline 24b, closed feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (14 2, 13.9043273925781 2.11115527153015, 13.82310962677 2.23728489875793, 13.7564849853516 2.3759388923645, 13.7045974731445 2.52466750144958, 13.6675891876221 2.68102264404297, 13.6455984115601 2.84255337715149, 13.6387672424316 3.00681042671204, 13.6472396850586 3.17134499549866, 13.6711559295654 3.33370733261108, 13.7106552124023 3.49144792556763, 13.7658815383911 3.64211750030518, 13.8369770050049 3.78326630592346, 13.9240808486938 3.9124448299408, 14.0273275375366 4.0272102355957, 14.1460762023926 4.125901222229, 14.2781581878662 4.20836925506592, 14.4212408065796 4.27464532852173, 14.5729866027832 4.32475566864014, 14.7310619354248 4.35873079299927, 14.8931264877319 4.37659645080566, 15.056845664978 4.37838315963745, 15.2198839187622 4.36411762237549, 15.3799018859863 4.33382892608643, 15.5345678329468 4.2875452041626, 15.681544303894 4.22529458999634, 15.8184909820557 4.14710569381714, 15.9430751800537 4.05300617218018, 16.0530071258545 3.94307255744934, 16.1471080780029 3.81848883628845, 16.2252960205078 3.68154096603394, 16.2875461578369 3.53456616401672, 16.3338298797607 3.37990093231201, 16.3641166687012 3.219881772995, 16.3783836364746 3.05684399604797, 16.3765964508057 2.89312481880188, 16.3587284088135 2.73106050491333, 16.3247547149658 2.57298684120178, 16.2746448516846 2.42124080657959, 16.2083702087402 2.27815842628479, 16.1259021759033 2.146075963974, 16.0272102355957 2.02732920646667, 15.9124450683594 1.92408156394958, 15.7832660675049 1.83697760105133, 15.6421175003052 1.7658828496933, 15.4914503097534 1.71065592765808, 15.3337097167969 1.67115533351898, 15.1713457107544 1.6472395658493, 15.0068111419678 1.63876724243164, 14.8425559997559 1.64559710025787, 14.681022644043 1.66758728027344, 14.5246696472168 1.70459699630737, 14.375940322876 1.75648427009583, 14.2372856140137 1.82310783863068, 14.1111574172974 1.90432631969452, 14 2)'): feat.DumpReadable() pytest.fail() # spline 24c, closed, recalculate knots feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (14 2, 13.9043273925781 2.11115527153015, 13.82310962677 2.23728489875793, 13.7564849853516 2.3759388923645, 13.7045974731445 2.52466750144958, 13.6675891876221 2.68102264404297, 13.6455984115601 2.84255337715149, 13.6387672424316 3.00681042671204, 13.6472396850586 3.17134499549866, 13.6711559295654 3.33370733261108, 13.7106552124023 3.49144792556763, 13.7658815383911 3.64211750030518, 13.8369770050049 3.78326630592346, 13.9240808486938 3.9124448299408, 14.0273275375366 4.0272102355957, 14.1460762023926 4.125901222229, 14.2781581878662 4.20836925506592, 14.4212408065796 4.27464532852173, 14.5729866027832 4.32475566864014, 14.7310619354248 4.35873079299927, 14.8931264877319 4.37659645080566, 15.056845664978 4.37838315963745, 15.2198839187622 4.36411762237549, 15.3799018859863 4.33382892608643, 15.5345678329468 4.2875452041626, 15.681544303894 4.22529458999634, 15.8184909820557 4.14710569381714, 15.9430751800537 4.05300617218018, 16.0530071258545 3.94307255744934, 16.1471080780029 3.81848883628845, 16.2252960205078 3.68154096603394, 16.2875461578369 3.53456616401672, 16.3338298797607 3.37990093231201, 16.3641166687012 3.219881772995, 16.3783836364746 3.05684399604797, 16.3765964508057 2.89312481880188, 16.3587284088135 2.73106050491333, 16.3247547149658 2.57298684120178, 16.2746448516846 2.42124080657959, 16.2083702087402 2.27815842628479, 16.1259021759033 2.146075963974, 16.0272102355957 2.02732920646667, 15.9124450683594 1.92408156394958, 15.7832660675049 1.83697760105133, 15.6421175003052 1.7658828496933, 15.4914503097534 1.71065592765808, 15.3337097167969 1.67115533351898, 15.1713457107544 1.6472395658493, 15.0068111419678 1.63876724243164, 14.8425559997559 1.64559710025787, 14.681022644043 1.66758728027344, 14.5246696472168 1.70459699630737, 14.375940322876 1.75648427009583, 14.2372856140137 1.82310783863068, 14.1111574172974 1.90432631969452, 14 2)'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # OCS2WCS transformations 1 def test_ogr_dxf_31(): ds = ogr.Open('data/ocs2wcs1.dxf') lyr = ds.GetLayer(0) # INFO: Open of `ocs2wcs1.dxf' using driver `DXF' successful. # OGRFeature(entities):0 # EntityHandle (String) = 1EF # POINT Z (4 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (4 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):1 # EntityHandle (String) = 1F0 # LINESTRING Z (0 0 0,1 1 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,1 1 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):2 # EntityHandle (String) = 1F1 # LINESTRING (1 1,2 1,1 2,1 1) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (1 1,2 1,1 2,1 1)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):3 # EntityHandle (String) = 1F2 # LINESTRING Z (1 1 0,1 2 0,2 2 0,1 1 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1 1 0,1 2 0,2 2 0,1 1 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):4 # EntityHandle (String) = 1F7 # LINESTRING Z (6 4 0,5.99512810051965 3.86048705251175 0,5.98053613748314 3.72165379807987 0,5.95629520146761 3.58417661836448 0,5.92252339187664 3.448725288366 0,5.87938524157182 3.31595971334866 0,5.8270909152852 3.1865267138484 0,5.76589518571785 3.06105687442822 0,5.69609619231285 2.94016147153359 0,5.61803398874989 2.82442949541505 0,5.53208888623796 2.71442478062692 0,5.4386796006773 2.61068325908201 0,5.33826121271772 2.51371034904521 0,5.23132295065132 2.42397849278656 0,5.11838580694149 2.34192485488992 0,5.0 2.26794919243112 0,4.87674229357815 2.20241190740167 0,4.74921318683182 2.14563229086643 0,4.61803398874989 2.09788696740969 0,4.48384379119934 2.05940854744801 0,4.34729635533386 2.03038449397558 0,4.20905692653531 2.01095620926345 0,4.069798993405 2.00121834596181 0,3.930201006595 2.00121834596181 0,3.79094307346469 2.01095620926345 0,3.65270364466614 2.03038449397558 0,3.51615620880066 2.05940854744801 0,3.38196601125011 2.09788696740969 0,3.25078681316818 2.14563229086643 0,3.12325770642185 2.20241190740167 0,3.0 2.26794919243112 0,2.88161419305851 2.34192485488992 0,2.76867704934868 2.42397849278656 0,2.66173878728228 2.51371034904521 0,2.5613203993227 2.61068325908201 0,2.46791111376204 2.71442478062692 0,2.38196601125011 2.82442949541505 0,2.30390380768715 2.94016147153359 0,2.23410481428215 3.06105687442822 0,2.1729090847148 3.1865267138484 0,2.12061475842818 3.31595971334866 0,2.07747660812336 3.448725288366 0,2.04370479853239 3.58417661836448 0,2.01946386251686 3.72165379807987 0,2.00487189948035 3.86048705251175 0,2.0 4.0 0,2.00487189948035 4.13951294748825 0,2.01946386251686 4.27834620192013 0,2.04370479853239 4.41582338163552 0,2.07747660812336 4.551274711634 0,2.12061475842818 4.68404028665134 0,2.1729090847148 4.8134732861516 0,2.23410481428215 4.93894312557178 0,2.30390380768715 5.05983852846641 0,2.38196601125011 5.17557050458495 0,2.46791111376204 5.28557521937308 0,2.5613203993227 5.38931674091799 0,2.66173878728228 5.48628965095479 0,2.76867704934868 5.57602150721344 0,2.88161419305851 5.65807514511008 0,3.0 5.73205080756888 0,3.12325770642184 5.79758809259833 0,3.25078681316818 5.85436770913357 0,3.38196601125011 5.90211303259031 0,3.51615620880066 5.94059145255199 0,3.65270364466614 5.96961550602442 0,3.79094307346469 5.98904379073655 0,3.930201006595 5.99878165403819 0,4.069798993405 5.99878165403819 0,4.20905692653531 5.98904379073655 0,4.34729635533386 5.96961550602442 0,4.48384379119933 5.94059145255199 0,4.61803398874989 5.90211303259031 0,4.74921318683182 5.85436770913357 0,4.87674229357815 5.79758809259833 0,5.0 5.73205080756888 0,5.11838580694149 5.65807514511008 0,5.23132295065132 5.57602150721344 0,5.33826121271772 5.48628965095479 0,5.4386796006773 5.389316740918 0,5.53208888623796 5.28557521937308 0,5.61803398874989 5.17557050458495 0,5.69609619231285 5.05983852846641 0,5.76589518571785 4.93894312557178 0,5.8270909152852 4.8134732861516 0,5.87938524157182 4.68404028665134 0,5.92252339187664 4.551274711634 0,5.95629520146761 4.41582338163552 0,5.98053613748314 4.27834620192013 0,5.99512810051965 4.13951294748825 0,6.0 4.0 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (6 4 0,5.99512810051965 3.86048705251175 0,5.98053613748314 3.72165379807987 0,5.95629520146761 3.58417661836448 0,5.92252339187664 3.448725288366 0,5.87938524157182 3.31595971334866 0,5.8270909152852 3.1865267138484 0,5.76589518571785 3.06105687442822 0,5.69609619231285 2.94016147153359 0,5.61803398874989 2.82442949541505 0,5.53208888623796 2.71442478062692 0,5.4386796006773 2.61068325908201 0,5.33826121271772 2.51371034904521 0,5.23132295065132 2.42397849278656 0,5.11838580694149 2.34192485488992 0,5.0 2.26794919243112 0,4.87674229357815 2.20241190740167 0,4.74921318683182 2.14563229086643 0,4.61803398874989 2.09788696740969 0,4.48384379119934 2.05940854744801 0,4.34729635533386 2.03038449397558 0,4.20905692653531 2.01095620926345 0,4.069798993405 2.00121834596181 0,3.930201006595 2.00121834596181 0,3.79094307346469 2.01095620926345 0,3.65270364466614 2.03038449397558 0,3.51615620880066 2.05940854744801 0,3.38196601125011 2.09788696740969 0,3.25078681316818 2.14563229086643 0,3.12325770642185 2.20241190740167 0,3.0 2.26794919243112 0,2.88161419305851 2.34192485488992 0,2.76867704934868 2.42397849278656 0,2.66173878728228 2.51371034904521 0,2.5613203993227 2.61068325908201 0,2.46791111376204 2.71442478062692 0,2.38196601125011 2.82442949541505 0,2.30390380768715 2.94016147153359 0,2.23410481428215 3.06105687442822 0,2.1729090847148 3.1865267138484 0,2.12061475842818 3.31595971334866 0,2.07747660812336 3.448725288366 0,2.04370479853239 3.58417661836448 0,2.01946386251686 3.72165379807987 0,2.00487189948035 3.86048705251175 0,2.0 4.0 0,2.00487189948035 4.13951294748825 0,2.01946386251686 4.27834620192013 0,2.04370479853239 4.41582338163552 0,2.07747660812336 4.551274711634 0,2.12061475842818 4.68404028665134 0,2.1729090847148 4.8134732861516 0,2.23410481428215 4.93894312557178 0,2.30390380768715 5.05983852846641 0,2.38196601125011 5.17557050458495 0,2.46791111376204 5.28557521937308 0,2.5613203993227 5.38931674091799 0,2.66173878728228 5.48628965095479 0,2.76867704934868 5.57602150721344 0,2.88161419305851 5.65807514511008 0,3.0 5.73205080756888 0,3.12325770642184 5.79758809259833 0,3.25078681316818 5.85436770913357 0,3.38196601125011 5.90211303259031 0,3.51615620880066 5.94059145255199 0,3.65270364466614 5.96961550602442 0,3.79094307346469 5.98904379073655 0,3.930201006595 5.99878165403819 0,4.069798993405 5.99878165403819 0,4.20905692653531 5.98904379073655 0,4.34729635533386 5.96961550602442 0,4.48384379119933 5.94059145255199 0,4.61803398874989 5.90211303259031 0,4.74921318683182 5.85436770913357 0,4.87674229357815 5.79758809259833 0,5.0 5.73205080756888 0,5.11838580694149 5.65807514511008 0,5.23132295065132 5.57602150721344 0,5.33826121271772 5.48628965095479 0,5.4386796006773 5.389316740918 0,5.53208888623796 5.28557521937308 0,5.61803398874989 5.17557050458495 0,5.69609619231285 5.05983852846641 0,5.76589518571785 4.93894312557178 0,5.8270909152852 4.8134732861516 0,5.87938524157182 4.68404028665134 0,5.92252339187664 4.551274711634 0,5.95629520146761 4.41582338163552 0,5.98053613748314 4.27834620192013 0,5.99512810051965 4.13951294748825 0,6.0 4.0 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):5 # EntityHandle (String) = 1F8 # LINESTRING Z (2 4 0,2.00487189948035 4.06975647374412 0,2.01946386251686 4.13917310096007 0,2.04370479853239 4.20791169081776 0,2.07747660812336 4.275637355817 0,2.12061475842818 4.34202014332567 0,2.1729090847148 4.4067366430758 0,2.23410481428215 4.46947156278589 0,2.30390380768715 4.52991926423321 0,2.38196601125011 4.58778525229247 0,2.46791111376204 4.64278760968654 0,2.5613203993227 4.694658370459 0,2.66173878728228 4.74314482547739 0,2.76867704934868 4.78801075360672 0,2.88161419305851 4.82903757255504 0,3.0 4.86602540378444 0,3.12325770642185 4.89879404629917 0,3.25078681316818 4.92718385456679 0,3.38196601125011 4.95105651629515 0,3.51615620880067 4.970295726276 0,3.65270364466614 4.98480775301221 0,3.79094307346469 4.99452189536827 0,3.930201006595 4.9993908270191 0,4.069798993405 4.9993908270191 0,4.20905692653531 4.99452189536827 0,4.34729635533386 4.98480775301221 0,4.48384379119934 4.970295726276 0,4.61803398874989 4.95105651629515 0,4.74921318683182 4.92718385456679 0,4.87674229357816 4.89879404629917 0,5.0 4.86602540378444 0,5.11838580694149 4.82903757255504 0,5.23132295065132 4.78801075360672 0,5.33826121271772 4.74314482547739 0,5.4386796006773 4.694658370459 0,5.53208888623796 4.64278760968654 0,5.61803398874989 4.58778525229247 0,5.69609619231285 4.5299192642332 0,5.76589518571785 4.46947156278589 0,5.8270909152852 4.4067366430758 0,5.87938524157182 4.34202014332567 0,5.92252339187664 4.275637355817 0,5.95629520146761 4.20791169081776 0,5.98053613748314 4.13917310096006 0,5.99512810051965 4.06975647374412 0,6.0 4.0 0,5.99512810051965 3.93024352625587 0,5.98053613748314 3.86082689903993 0,5.95629520146761 3.79208830918224 0,5.92252339187664 3.724362644183 0,5.87938524157182 3.65797985667433 0,5.8270909152852 3.5932633569242 0,5.76589518571785 3.53052843721411 0,5.69609619231285 3.4700807357668 0,5.61803398874989 3.41221474770753 0,5.53208888623796 3.35721239031346 0,5.4386796006773 3.305341629541 0,5.33826121271772 3.25685517452261 0,5.23132295065132 3.21198924639328 0,5.11838580694149 3.17096242744496 0,5.0 3.13397459621556 0,4.87674229357815 3.10120595370083 0,4.74921318683182 3.07281614543321 0,4.61803398874989 3.04894348370485 0,4.48384379119934 3.029704273724 0,4.34729635533386 3.01519224698779 0,4.20905692653531 3.00547810463173 0,4.069798993405 3.0006091729809 0,3.930201006595 3.0006091729809 0,3.79094307346469 3.00547810463173 0,3.65270364466614 3.01519224698779 0,3.51615620880066 3.029704273724 0,3.38196601125011 3.04894348370485 0,3.25078681316818 3.07281614543321 0,3.12325770642185 3.10120595370083 0,3.0 3.13397459621556 0,2.88161419305851 3.17096242744496 0,2.76867704934868 3.21198924639328 0,2.66173878728228 3.25685517452261 0,2.5613203993227 3.305341629541 0,2.46791111376204 3.35721239031346 0,2.38196601125011 3.41221474770753 0,2.30390380768715 3.4700807357668 0,2.23410481428215 3.53052843721411 0,2.1729090847148 3.5932633569242 0,2.12061475842818 3.65797985667433 0,2.07747660812336 3.724362644183 0,2.04370479853239 3.79208830918224 0,2.01946386251686 3.86082689903993 0,2.00487189948035 3.93024352625587 0,2 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2 4 0,2.00487189948035 4.06975647374412 0,2.01946386251686 4.13917310096007 0,2.04370479853239 4.20791169081776 0,2.07747660812336 4.275637355817 0,2.12061475842818 4.34202014332567 0,2.1729090847148 4.4067366430758 0,2.23410481428215 4.46947156278589 0,2.30390380768715 4.52991926423321 0,2.38196601125011 4.58778525229247 0,2.46791111376204 4.64278760968654 0,2.5613203993227 4.694658370459 0,2.66173878728228 4.74314482547739 0,2.76867704934868 4.78801075360672 0,2.88161419305851 4.82903757255504 0,3.0 4.86602540378444 0,3.12325770642185 4.89879404629917 0,3.25078681316818 4.92718385456679 0,3.38196601125011 4.95105651629515 0,3.51615620880067 4.970295726276 0,3.65270364466614 4.98480775301221 0,3.79094307346469 4.99452189536827 0,3.930201006595 4.9993908270191 0,4.069798993405 4.9993908270191 0,4.20905692653531 4.99452189536827 0,4.34729635533386 4.98480775301221 0,4.48384379119934 4.970295726276 0,4.61803398874989 4.95105651629515 0,4.74921318683182 4.92718385456679 0,4.87674229357816 4.89879404629917 0,5.0 4.86602540378444 0,5.11838580694149 4.82903757255504 0,5.23132295065132 4.78801075360672 0,5.33826121271772 4.74314482547739 0,5.4386796006773 4.694658370459 0,5.53208888623796 4.64278760968654 0,5.61803398874989 4.58778525229247 0,5.69609619231285 4.5299192642332 0,5.76589518571785 4.46947156278589 0,5.8270909152852 4.4067366430758 0,5.87938524157182 4.34202014332567 0,5.92252339187664 4.275637355817 0,5.95629520146761 4.20791169081776 0,5.98053613748314 4.13917310096006 0,5.99512810051965 4.06975647374412 0,6.0 4.0 0,5.99512810051965 3.93024352625587 0,5.98053613748314 3.86082689903993 0,5.95629520146761 3.79208830918224 0,5.92252339187664 3.724362644183 0,5.87938524157182 3.65797985667433 0,5.8270909152852 3.5932633569242 0,5.76589518571785 3.53052843721411 0,5.69609619231285 3.4700807357668 0,5.61803398874989 3.41221474770753 0,5.53208888623796 3.35721239031346 0,5.4386796006773 3.305341629541 0,5.33826121271772 3.25685517452261 0,5.23132295065132 3.21198924639328 0,5.11838580694149 3.17096242744496 0,5.0 3.13397459621556 0,4.87674229357815 3.10120595370083 0,4.74921318683182 3.07281614543321 0,4.61803398874989 3.04894348370485 0,4.48384379119934 3.029704273724 0,4.34729635533386 3.01519224698779 0,4.20905692653531 3.00547810463173 0,4.069798993405 3.0006091729809 0,3.930201006595 3.0006091729809 0,3.79094307346469 3.00547810463173 0,3.65270364466614 3.01519224698779 0,3.51615620880066 3.029704273724 0,3.38196601125011 3.04894348370485 0,3.25078681316818 3.07281614543321 0,3.12325770642185 3.10120595370083 0,3.0 3.13397459621556 0,2.88161419305851 3.17096242744496 0,2.76867704934868 3.21198924639328 0,2.66173878728228 3.25685517452261 0,2.5613203993227 3.305341629541 0,2.46791111376204 3.35721239031346 0,2.38196601125011 3.41221474770753 0,2.30390380768715 3.4700807357668 0,2.23410481428215 3.53052843721411 0,2.1729090847148 3.5932633569242 0,2.12061475842818 3.65797985667433 0,2.07747660812336 3.724362644183 0,2.04370479853239 3.79208830918224 0,2.01946386251686 3.86082689903993 0,2.00487189948035 3.93024352625587 0,2 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):6 # EntityHandle (String) = 1F9 # LINESTRING Z (2.0 2.0 0,1.96657794502105 2.03582232791524 0,1.93571660708646 2.07387296203834 0,1.90756413746468 2.11396923855471 0,1.88225568337755 2.15591867344963 0,1.85991273921989 2.19951988653655 0,1.84064256332004 2.24456356819194 0,1.8245376630414 2.29083348415575 0,1.81167535069652 2.33810751357387 0,1.80211737240583 2.38615871529951 0,1.79590961168258 2.43475641733454 0,1.79308186916688 2.48366732418105 0,1.79364771956639 2.53265663678705 0,1.79760444649032 2.58148917971011 0,1.80493305548955 2.62993053008785 0,1.81559836524041 2.67774814299566 0,1.8295491764342 2.72471246778926 0,1.84671851756181 2.7705980500731 0,1.86702396641357 2.81518461400453 0,1.89036804575079 2.85825811973811 0,1.91663869124976 2.89961179093366 0,1.94570978947168 2.93904710739563 0,1.97744178327594 2.97637475807832 0,2.01168234177068 3.01141554988232 0,2.04826709158413 3.04400126787917 0,2.08702040594658 3.07397548283483 0,2.12775624779472 3.10119430215541 0,2.17027906285109 3.12552706065018 0,2.2143847183914 3.14685694779575 0,2.25986148319297 3.16508156849045 0,2.30649104396024 3.18011343460661 0,2.35404955334774 3.1918803849814 0,2.40230870454951 3.20032593182975 0,2.45103682729644 3.2054095319166 0,2.5 3.20710678118655 0,2.54896317270356 3.2054095319166 0,2.59769129545049 3.20032593182975 0,2.64595044665226 3.1918803849814 0,2.69350895603976 3.18011343460661 0,2.74013851680703 3.16508156849045 0,2.7856152816086 3.14685694779575 0,2.8297209371489 3.12552706065018 0,2.87224375220528 3.10119430215541 0,2.91297959405342 3.07397548283483 0,2.95173290841587 3.04400126787917 0,2.98831765822932 3.01141554988232 0,3.02255821672406 2.97637475807832 0,3.05429021052832 2.93904710739563 0,3.08336130875024 2.89961179093367 0,3.10963195424921 2.85825811973811 0,3.13297603358643 2.81518461400453 0,3.15328148243819 2.7705980500731 0,3.1704508235658 2.72471246778926 0,3.18440163475959 2.67774814299567 0,3.19506694451045 2.62993053008786 0,3.20239555350968 2.58148917971011 0,3.20635228043361 2.53265663678705 0,3.20691813083312 2.48366732418105 0,3.20409038831742 2.43475641733454 0,3.19788262759417 2.38615871529951 0,3.18832464930348 2.33810751357387 0,3.1754623369586 2.29083348415575 0,3.15935743667996 2.24456356819194 0,3.14008726078011 2.19951988653655 0,3.11774431662245 2.15591867344963 0,3.09243586253532 2.11396923855472 0,3.06428339291354 2.07387296203834 0,3.03342205497895 2.03582232791524 0,3 2 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2.0 2.0 0,1.96657794502105 2.03582232791524 0,1.93571660708646 2.07387296203834 0,1.90756413746468 2.11396923855471 0,1.88225568337755 2.15591867344963 0,1.85991273921989 2.19951988653655 0,1.84064256332004 2.24456356819194 0,1.8245376630414 2.29083348415575 0,1.81167535069652 2.33810751357387 0,1.80211737240583 2.38615871529951 0,1.79590961168258 2.43475641733454 0,1.79308186916688 2.48366732418105 0,1.79364771956639 2.53265663678705 0,1.79760444649032 2.58148917971011 0,1.80493305548955 2.62993053008785 0,1.81559836524041 2.67774814299566 0,1.8295491764342 2.72471246778926 0,1.84671851756181 2.7705980500731 0,1.86702396641357 2.81518461400453 0,1.89036804575079 2.85825811973811 0,1.91663869124976 2.89961179093366 0,1.94570978947168 2.93904710739563 0,1.97744178327594 2.97637475807832 0,2.01168234177068 3.01141554988232 0,2.04826709158413 3.04400126787917 0,2.08702040594658 3.07397548283483 0,2.12775624779472 3.10119430215541 0,2.17027906285109 3.12552706065018 0,2.2143847183914 3.14685694779575 0,2.25986148319297 3.16508156849045 0,2.30649104396024 3.18011343460661 0,2.35404955334774 3.1918803849814 0,2.40230870454951 3.20032593182975 0,2.45103682729644 3.2054095319166 0,2.5 3.20710678118655 0,2.54896317270356 3.2054095319166 0,2.59769129545049 3.20032593182975 0,2.64595044665226 3.1918803849814 0,2.69350895603976 3.18011343460661 0,2.74013851680703 3.16508156849045 0,2.7856152816086 3.14685694779575 0,2.8297209371489 3.12552706065018 0,2.87224375220528 3.10119430215541 0,2.91297959405342 3.07397548283483 0,2.95173290841587 3.04400126787917 0,2.98831765822932 3.01141554988232 0,3.02255821672406 2.97637475807832 0,3.05429021052832 2.93904710739563 0,3.08336130875024 2.89961179093367 0,3.10963195424921 2.85825811973811 0,3.13297603358643 2.81518461400453 0,3.15328148243819 2.7705980500731 0,3.1704508235658 2.72471246778926 0,3.18440163475959 2.67774814299567 0,3.19506694451045 2.62993053008786 0,3.20239555350968 2.58148917971011 0,3.20635228043361 2.53265663678705 0,3.20691813083312 2.48366732418105 0,3.20409038831742 2.43475641733454 0,3.19788262759417 2.38615871529951 0,3.18832464930348 2.33810751357387 0,3.1754623369586 2.29083348415575 0,3.15935743667996 2.24456356819194 0,3.14008726078011 2.19951988653655 0,3.11774431662245 2.15591867344963 0,3.09243586253532 2.11396923855472 0,3.06428339291354 2.07387296203834 0,3.03342205497895 2.03582232791524 0,3 2 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):7 # EntityHandle (String) = 1FA # POLYGON Z ((1 2 0,1 3 0,2 3 0,2 2 0,1 2 0)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((1 2 0,1 3 0,2 3 0,2 2 0,1 2 0))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):8 # EntityHandle (String) = 1FB # POLYGON ((3 4,4 4,4 3,3 3,3 4)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((3 4,4 4,4 3,3 3,3 4))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):9 # EntityHandle (String) = 1FD # POLYGON ((8 8,9 8,9 9,8 9,8 8)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((8 8,9 8,9 9,8 9,8 8))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):10 # EntityHandle (String) = 200 # LINESTRING (2 2,2.15384615384615 2.15384615384615,2.30769230769231 2.30769230769231,2.46153846153846 2.46153846153846,2.61538461538461 2.61538461538461,2.76923076923077 2.76923076923077,2.92307692307692 2.92307692307692,3.07692307692308 3.07692307692308,3.23076923076923 3.23076923076923,3.38461538461538 3.38461538461538,3.53846153846154 3.53846153846154,3.69230769230769 3.69230769230769,3.84615384615385 3.84615384615385,4 4,4.15384615384615 4.15384615384615,4.30769230769231 4.30769230769231,4.46153846153846 4.46153846153846,4.61538461538462 4.61538461538462,4.76923076923077 4.76923076923077,4.92307692307692 4.92307692307692,5.07692307692308 5.07692307692308,5.23076923076923 5.23076923076923,5.38461538461538 5.38461538461538,5.53846153846154 5.53846153846154,5.69230769230769 5.69230769230769,5.84615384615385 5.84615384615385,6.0 6.0,6.15384615384615 6.15384615384615,6.30769230769231 6.30769230769231,6.46153846153846 6.46153846153846,6.61538461538462 6.61538461538462,6.76923076923077 6.76923076923077,6.92307692307692 6.92307692307692,7.07692307692308 7.07692307692308,7.23076923076923 7.23076923076923,7.38461538461539 7.38461538461539,7.53846153846154 7.53846153846154,7.69230769230769 7.69230769230769,7.84615384615385 7.84615384615385,8 8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 2,2.15384615384615 2.15384615384615,2.30769230769231 2.30769230769231,2.46153846153846 2.46153846153846,2.61538461538461 2.61538461538461,2.76923076923077 2.76923076923077,2.92307692307692 2.92307692307692,3.07692307692308 3.07692307692308,3.23076923076923 3.23076923076923,3.38461538461538 3.38461538461538,3.53846153846154 3.53846153846154,3.69230769230769 3.69230769230769,3.84615384615385 3.84615384615385,4 4,4.15384615384615 4.15384615384615,4.30769230769231 4.30769230769231,4.46153846153846 4.46153846153846,4.61538461538462 4.61538461538462,4.76923076923077 4.76923076923077,4.92307692307692 4.92307692307692,5.07692307692308 5.07692307692308,5.23076923076923 5.23076923076923,5.38461538461538 5.38461538461538,5.53846153846154 5.53846153846154,5.69230769230769 5.69230769230769,5.84615384615385 5.84615384615385,6.0 6.0,6.15384615384615 6.15384615384615,6.30769230769231 6.30769230769231,6.46153846153846 6.46153846153846,6.61538461538462 6.61538461538462,6.76923076923077 6.76923076923077,6.92307692307692 6.92307692307692,7.07692307692308 7.07692307692308,7.23076923076923 7.23076923076923,7.38461538461539 7.38461538461539,7.53846153846154 7.53846153846154,7.69230769230769 7.69230769230769,7.84615384615385 7.84615384615385,8 8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):11 # EntityHandle (String) = 201 # LINESTRING (8 1,7.62837370825536 0.987348067229724,7.25775889681215 0.975707614760869,6.88916704597178 0.966090122894857,6.52360963603567 0.959507071933107,6.16209814730525 0.956969942177043,5.80564406008193 0.959490213928084,5.45525885466714 0.968079367487651,5.11195401136229 0.983748883157167,4.77674101046882 1.00751024123805,4.45063133228814 1.04037492203173,4.13463645712167 1.08335440583961,3.82976786527082 1.13746017296313,3.53703703703704 1.2037037037037,3.25745545272173 1.28309647836275,2.99203459262631 1.37664997724169,2.74178593705221 1.48537568064195,2.50772096630085 1.61028506886495,2.29085116067365 1.75238962221211,2.09218800047203 1.91270082098484,1.91270082098485 2.09218800047202,1.75238962221211 2.29085116067364,1.61028506886495 2.50772096630085,1.48537568064195 2.74178593705221,1.37664997724169 2.99203459262631,1.28309647836275 3.25745545272172,1.2037037037037 3.53703703703703,1.13746017296313 3.82976786527082,1.08335440583961 4.13463645712166,1.04037492203173 4.45063133228814,1.00751024123805 4.77674101046882,0.983748883157167 5.11195401136229,0.968079367487652 5.45525885466714,0.959490213928084 5.80564406008193,0.956969942177043 6.16209814730525,0.959507071933108 6.52360963603567,0.966090122894857 6.88916704597178,0.975707614760869 7.25775889681216,0.987348067229724 7.62837370825537,1 8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (8 1,7.62837370825536 0.987348067229724,7.25775889681215 0.975707614760869,6.88916704597178 0.966090122894857,6.52360963603567 0.959507071933107,6.16209814730525 0.956969942177043,5.80564406008193 0.959490213928084,5.45525885466714 0.968079367487651,5.11195401136229 0.983748883157167,4.77674101046882 1.00751024123805,4.45063133228814 1.04037492203173,4.13463645712167 1.08335440583961,3.82976786527082 1.13746017296313,3.53703703703704 1.2037037037037,3.25745545272173 1.28309647836275,2.99203459262631 1.37664997724169,2.74178593705221 1.48537568064195,2.50772096630085 1.61028506886495,2.29085116067365 1.75238962221211,2.09218800047203 1.91270082098484,1.91270082098485 2.09218800047202,1.75238962221211 2.29085116067364,1.61028506886495 2.50772096630085,1.48537568064195 2.74178593705221,1.37664997724169 2.99203459262631,1.28309647836275 3.25745545272172,1.2037037037037 3.53703703703703,1.13746017296313 3.82976786527082,1.08335440583961 4.13463645712166,1.04037492203173 4.45063133228814,1.00751024123805 4.77674101046882,0.983748883157167 5.11195401136229,0.968079367487652 5.45525885466714,0.959490213928084 5.80564406008193,0.956969942177043 6.16209814730525,0.959507071933108 6.52360963603567,0.966090122894857 6.88916704597178,0.975707614760869 7.25775889681216,0.987348067229724 7.62837370825537,1 8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):12 # EntityHandle (String) = 202 # POINT Z (7 7 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (7 7 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):13 # EntityHandle (String) = 203 # POINT Z (-4 4 -5e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (-4 4 -5e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):14 # EntityHandle (String) = 204 # LINESTRING Z (0 0 0,-1 1 -1e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,-1 1 -1e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):15 # EntityHandle (String) = 205 # LINESTRING (-1 1,-2 1,-1 2,-1 1) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-1 1,-2 1,-1 2,-1 1)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):16 # EntityHandle (String) = 206 # LINESTRING Z (-1 1 -1e-16,-1 2 -1e-16,-2 2 -2e-16,-1 1 -1e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-1 1 -1e-16,-1 2 -1e-16,-2 2 -2e-16,-1 1 -1e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):17 # EntityHandle (String) = 20B # LINESTRING Z (-6 4 -6e-16,-5.99512810051965 3.86048705251175 -5.99512810051965e-16,-5.98053613748314 3.72165379807987 -5.98053613748314e-16,-5.95629520146761 3.58417661836448 -5.95629520146761e-16,-5.92252339187664 3.448725288366 -5.92252339187664e-16,-5.87938524157182 3.31595971334866 -5.87938524157182e-16,-5.8270909152852 3.1865267138484 -5.8270909152852e-16,-5.76589518571785 3.06105687442822 -5.76589518571785e-16,-5.69609619231285 2.94016147153359 -5.69609619231285e-16,-5.61803398874989 2.82442949541505 -5.61803398874989e-16,-5.53208888623796 2.71442478062692 -5.53208888623796e-16,-5.4386796006773 2.61068325908201 -5.4386796006773e-16,-5.33826121271772 2.51371034904521 -5.33826121271772e-16,-5.23132295065132 2.42397849278656 -5.23132295065132e-16,-5.11838580694149 2.34192485488992 -5.11838580694149e-16,-5.0 2.26794919243112 -5e-16,-4.87674229357815 2.20241190740167 -4.87674229357815e-16,-4.74921318683182 2.14563229086643 -4.74921318683182e-16,-4.61803398874989 2.09788696740969 -4.61803398874989e-16,-4.48384379119934 2.05940854744801 -4.48384379119934e-16,-4.34729635533386 2.03038449397558 -4.34729635533386e-16,-4.20905692653531 2.01095620926345 -4.20905692653531e-16,-4.069798993405 2.00121834596181 -4.069798993405e-16,-3.930201006595 2.00121834596181 -3.930201006595e-16,-3.79094307346469 2.01095620926345 -3.79094307346469e-16,-3.65270364466614 2.03038449397558 -3.65270364466614e-16,-3.51615620880066 2.05940854744801 -3.51615620880066e-16,-3.38196601125011 2.09788696740969 -3.3819660112501e-16,-3.25078681316818 2.14563229086643 -3.25078681316818e-16,-3.12325770642185 2.20241190740167 -3.12325770642185e-16,-3.0 2.26794919243112 -3e-16,-2.88161419305851 2.34192485488992 -2.88161419305851e-16,-2.76867704934868 2.42397849278656 -2.76867704934868e-16,-2.66173878728228 2.51371034904521 -2.66173878728228e-16,-2.5613203993227 2.61068325908201 -2.5613203993227e-16,-2.46791111376204 2.71442478062692 -2.46791111376204e-16,-2.38196601125011 2.82442949541505 -2.3819660112501e-16,-2.30390380768715 2.94016147153359 -2.30390380768715e-16,-2.23410481428215 3.06105687442822 -2.23410481428215e-16,-2.1729090847148 3.1865267138484 -2.1729090847148e-16,-2.12061475842818 3.31595971334866 -2.12061475842818e-16,-2.07747660812336 3.448725288366 -2.07747660812336e-16,-2.04370479853239 3.58417661836448 -2.04370479853239e-16,-2.01946386251686 3.72165379807987 -2.01946386251686e-16,-2.00487189948035 3.86048705251175 -2.00487189948035e-16,-2.0 4.0 -2e-16,-2.00487189948035 4.13951294748825 -2.00487189948035e-16,-2.01946386251686 4.27834620192013 -2.01946386251686e-16,-2.04370479853239 4.41582338163552 -2.04370479853239e-16,-2.07747660812336 4.551274711634 -2.07747660812336e-16, # -2.12061475842818 4.68404028665134 -2.12061475842818e-16,-2.1729090847148 4.8134732861516 -2.1729090847148e-16,-2.23410481428215 4.93894312557178 -2.23410481428215e-16,-2.30390380768715 5.05983852846641 -2.30390380768715e-16,-2.38196601125011 5.17557050458495 -2.3819660112501e-16,-2.46791111376204 5.28557521937308 -2.46791111376204e-16,-2.5613203993227 5.38931674091799 -2.5613203993227e-16,-2.66173878728228 5.48628965095479 -2.66173878728228e-16,-2.76867704934868 5.57602150721344 -2.76867704934868e-16,-2.88161419305851 5.65807514511008 -2.88161419305851e-16,-3.0 5.73205080756888 -3e-16,-3.12325770642184 5.79758809259833 -3.12325770642184e-16,-3.25078681316818 5.85436770913357 -3.25078681316817e-16,-3.38196601125011 5.90211303259031 -3.3819660112501e-16,-3.51615620880066 5.94059145255199 -3.51615620880066e-16,-3.65270364466614 5.96961550602442 -3.65270364466614e-16,-3.79094307346469 5.98904379073655 -3.79094307346469e-16,-3.930201006595 5.99878165403819 -3.930201006595e-16,-4.069798993405 5.99878165403819 -4.069798993405e-16,-4.20905692653531 5.98904379073655 -4.20905692653531e-16,-4.34729635533386 5.96961550602442 -4.34729635533386e-16,-4.48384379119933 5.94059145255199 -4.48384379119933e-16,-4.61803398874989 5.90211303259031 -4.61803398874989e-16,-4.74921318683182 5.85436770913357 -4.74921318683182e-16,-4.87674229357815 5.79758809259833 -4.87674229357815e-16,-5.0 5.73205080756888 -5e-16,-5.11838580694149 5.65807514511008 -5.11838580694149e-16,-5.23132295065132 5.57602150721344 -5.23132295065132e-16,-5.33826121271772 5.48628965095479 -5.33826121271772e-16,-5.4386796006773 5.389316740918 -5.4386796006773e-16,-5.53208888623796 5.28557521937308 -5.53208888623796e-16,-5.61803398874989 5.17557050458495 -5.61803398874989e-16,-5.69609619231285 5.05983852846641 -5.69609619231285e-16,-5.76589518571785 4.93894312557178 -5.76589518571785e-16,-5.8270909152852 4.8134732861516 -5.8270909152852e-16,-5.87938524157182 4.68404028665134 -5.87938524157182e-16,-5.92252339187664 4.551274711634 -5.92252339187664e-16,-5.95629520146761 4.41582338163552 -5.95629520146761e-16,-5.98053613748314 4.27834620192013 -5.98053613748314e-16,-5.99512810051965 4.13951294748825 -5.99512810051965e-16,-6.0 4.0 -6e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-6 4 -6e-16,-5.99512810051965 3.86048705251175 -5.99512810051965e-16,-5.98053613748314 3.72165379807987 -5.98053613748314e-16,-5.95629520146761 3.58417661836448 -5.95629520146761e-16,-5.92252339187664 3.448725288366 -5.92252339187664e-16,-5.87938524157182 3.31595971334866 -5.87938524157182e-16,-5.8270909152852 3.1865267138484 -5.8270909152852e-16,-5.76589518571785 3.06105687442822 -5.76589518571785e-16,-5.69609619231285 2.94016147153359 -5.69609619231285e-16,-5.61803398874989 2.82442949541505 -5.61803398874989e-16,-5.53208888623796 2.71442478062692 -5.53208888623796e-16,-5.4386796006773 2.61068325908201 -5.4386796006773e-16,-5.33826121271772 2.51371034904521 -5.33826121271772e-16,-5.23132295065132 2.42397849278656 -5.23132295065132e-16,-5.11838580694149 2.34192485488992 -5.11838580694149e-16,-5.0 2.26794919243112 -5e-16,-4.87674229357815 2.20241190740167 -4.87674229357815e-16,-4.74921318683182 2.14563229086643 -4.74921318683182e-16,-4.61803398874989 2.09788696740969 -4.61803398874989e-16,-4.48384379119934 2.05940854744801 -4.48384379119934e-16,-4.34729635533386 2.03038449397558 -4.34729635533386e-16,-4.20905692653531 2.01095620926345 -4.20905692653531e-16,-4.069798993405 2.00121834596181 -4.069798993405e-16,-3.930201006595 2.00121834596181 -3.930201006595e-16,-3.79094307346469 2.01095620926345 -3.79094307346469e-16,-3.65270364466614 2.03038449397558 -3.65270364466614e-16,-3.51615620880066 2.05940854744801 -3.51615620880066e-16,-3.38196601125011 2.09788696740969 -3.3819660112501e-16,-3.25078681316818 2.14563229086643 -3.25078681316818e-16,-3.12325770642185 2.20241190740167 -3.12325770642185e-16,-3.0 2.26794919243112 -3e-16,-2.88161419305851 2.34192485488992 -2.88161419305851e-16,-2.76867704934868 2.42397849278656 -2.76867704934868e-16,-2.66173878728228 2.51371034904521 -2.66173878728228e-16,-2.5613203993227 2.61068325908201 -2.5613203993227e-16,-2.46791111376204 2.71442478062692 -2.46791111376204e-16,-2.38196601125011 2.82442949541505 -2.3819660112501e-16,-2.30390380768715 2.94016147153359 -2.30390380768715e-16,-2.23410481428215 3.06105687442822 -2.23410481428215e-16,-2.1729090847148 3.1865267138484 -2.1729090847148e-16,-2.12061475842818 3.31595971334866 -2.12061475842818e-16,-2.07747660812336 3.448725288366 -2.07747660812336e-16,-2.04370479853239 3.58417661836448 -2.04370479853239e-16,-2.01946386251686 3.72165379807987 -2.01946386251686e-16,-2.00487189948035 3.86048705251175 -2.00487189948035e-16,-2.0 4.0 -2e-16,-2.00487189948035 4.13951294748825 -2.00487189948035e-16,-2.01946386251686 4.27834620192013 -2.01946386251686e-16,-2.04370479853239 4.41582338163552 -2.04370479853239e-16,' + '-2.07747660812336 4.551274711634 -2.07747660812336e-16,-2.12061475842818 4.68404028665134 -2.12061475842818e-16,-2.1729090847148 4.8134732861516 -2.1729090847148e-16,-2.23410481428215 4.93894312557178 -2.23410481428215e-16,-2.30390380768715 5.05983852846641 -2.30390380768715e-16,-2.38196601125011 5.17557050458495 -2.3819660112501e-16,-2.46791111376204 5.28557521937308 -2.46791111376204e-16,-2.5613203993227 5.38931674091799 -2.5613203993227e-16,-2.66173878728228 5.48628965095479 -2.66173878728228e-16,-2.76867704934868 5.57602150721344 -2.76867704934868e-16,-2.88161419305851 5.65807514511008 -2.88161419305851e-16,-3.0 5.73205080756888 -3e-16,-3.12325770642184 5.79758809259833 -3.12325770642184e-16,-3.25078681316818 5.85436770913357 -3.25078681316817e-16,-3.38196601125011 5.90211303259031 -3.3819660112501e-16,-3.51615620880066 5.94059145255199 -3.51615620880066e-16,-3.65270364466614 5.96961550602442 -3.65270364466614e-16,-3.79094307346469 5.98904379073655 -3.79094307346469e-16,-3.930201006595 5.99878165403819 -3.930201006595e-16,-4.069798993405 5.99878165403819 -4.069798993405e-16,-4.20905692653531 5.98904379073655 -4.20905692653531e-16,-4.34729635533386 5.96961550602442 -4.34729635533386e-16,-4.48384379119933 5.94059145255199 -4.48384379119933e-16,-4.61803398874989 5.90211303259031 -4.61803398874989e-16,-4.74921318683182 5.85436770913357 -4.74921318683182e-16,-4.87674229357815 5.79758809259833 -4.87674229357815e-16,-5.0 5.73205080756888 -5e-16,-5.11838580694149 5.65807514511008 -5.11838580694149e-16,-5.23132295065132 5.57602150721344 -5.23132295065132e-16,-5.33826121271772 5.48628965095479 -5.33826121271772e-16,-5.4386796006773 5.389316740918 -5.4386796006773e-16,-5.53208888623796 5.28557521937308 -5.53208888623796e-16,-5.61803398874989 5.17557050458495 -5.61803398874989e-16,-5.69609619231285 5.05983852846641 -5.69609619231285e-16,-5.76589518571785 4.93894312557178 -5.76589518571785e-16,-5.8270909152852 4.8134732861516 -5.8270909152852e-16,-5.87938524157182 4.68404028665134 -5.87938524157182e-16,-5.92252339187664 4.551274711634 -5.92252339187664e-16,-5.95629520146761 4.41582338163552 -5.95629520146761e-16,-5.98053613748314 4.27834620192013 -5.98053613748314e-16,-5.99512810051965 4.13951294748825 -5.99512810051965e-16,-6.0 4.0 -6e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):18 # EntityHandle (String) = 20C # LINESTRING Z (-2 4 -3e-16,-2.00487189948035 4.06975647374412 -3.00487189948035e-16,-2.01946386251686 4.13917310096007 -3.01946386251686e-16,-2.04370479853239 4.20791169081776 -3.04370479853239e-16,-2.07747660812336 4.275637355817 -3.07747660812336e-16,-2.12061475842818 4.34202014332567 -3.12061475842818e-16,-2.1729090847148 4.4067366430758 -3.1729090847148e-16,-2.23410481428215 4.46947156278589 -3.23410481428215e-16,-2.30390380768715 4.52991926423321 -3.30390380768715e-16,-2.38196601125011 4.58778525229247 -3.38196601125011e-16,-2.46791111376204 4.64278760968654 -3.46791111376204e-16,-2.5613203993227 4.694658370459 -3.5613203993227e-16,-2.66173878728228 4.74314482547739 -3.66173878728228e-16,-2.76867704934868 4.78801075360672 -3.76867704934868e-16,-2.88161419305851 4.82903757255504 -3.88161419305851e-16,-3.0 4.86602540378444 -4e-16,-3.12325770642185 4.89879404629917 -4.12325770642185e-16,-3.25078681316818 4.92718385456679 -4.25078681316818e-16,-3.38196601125011 4.95105651629515 -4.38196601125011e-16,-3.51615620880067 4.970295726276 -4.51615620880067e-16,-3.65270364466614 4.98480775301221 -4.65270364466614e-16,-3.79094307346469 4.99452189536827 -4.79094307346469e-16,-3.930201006595 4.9993908270191 -4.930201006595e-16,-4.069798993405 4.9993908270191 -5.069798993405e-16,-4.20905692653531 4.99452189536827 -5.20905692653531e-16,-4.34729635533386 4.98480775301221 -5.34729635533386e-16,-4.48384379119934 4.970295726276 -5.48384379119934e-16,-4.61803398874989 4.95105651629515 -5.6180339887499e-16,-4.74921318683182 4.92718385456679 -5.74921318683183e-16,-4.87674229357816 4.89879404629917 -5.87674229357816e-16,-5.0 4.86602540378444 -6e-16,-5.11838580694149 4.82903757255504 -6.1183858069415e-16,-5.23132295065132 4.78801075360672 -6.23132295065132e-16,-5.33826121271772 4.74314482547739 -6.33826121271772e-16,-5.4386796006773 4.694658370459 -6.4386796006773e-16,-5.53208888623796 4.64278760968654 -6.53208888623796e-16,-5.61803398874989 4.58778525229247 -6.61803398874989e-16,-5.69609619231285 4.5299192642332 -6.69609619231285e-16,-5.76589518571785 4.46947156278589 -6.76589518571785e-16,-5.8270909152852 4.4067366430758 -6.8270909152852e-16,-5.87938524157182 4.34202014332567 -6.87938524157182e-16,-5.92252339187664 4.275637355817 -6.92252339187664e-16,-5.95629520146761 4.20791169081776 -6.95629520146761e-16,-5.98053613748314 4.13917310096006 -6.98053613748314e-16,-5.99512810051965 4.06975647374412 -6.99512810051965e-16,-6.0 4.0 -7e-16,-5.99512810051965 3.93024352625587 -6.99512810051965e-16,-5.98053613748314 3.86082689903993 -6.98053613748314e-16,-5.95629520146761 3.79208830918224 -6.95629520146761e-16, # -5.92252339187664 3.724362644183 -6.92252339187664e-16,-5.87938524157182 3.65797985667433 -6.87938524157182e-16,-5.8270909152852 3.5932633569242 -6.8270909152852e-16,-5.76589518571785 3.53052843721411 -6.76589518571785e-16,-5.69609619231285 3.4700807357668 -6.69609619231285e-16,-5.61803398874989 3.41221474770753 -6.61803398874989e-16,-5.53208888623796 3.35721239031346 -6.53208888623796e-16,-5.4386796006773 3.305341629541 -6.4386796006773e-16,-5.33826121271772 3.25685517452261 -6.33826121271772e-16,-5.23132295065132 3.21198924639328 -6.23132295065132e-16,-5.11838580694149 3.17096242744496 -6.11838580694149e-16,-5.0 3.13397459621556 -6e-16,-4.87674229357815 3.10120595370083 -5.87674229357816e-16,-4.74921318683182 3.07281614543321 -5.74921318683182e-16,-4.61803398874989 3.04894348370485 -5.6180339887499e-16,-4.48384379119934 3.029704273724 -5.48384379119934e-16,-4.34729635533386 3.01519224698779 -5.34729635533386e-16,-4.20905692653531 3.00547810463173 -5.20905692653531e-16,-4.069798993405 3.0006091729809 -5.069798993405e-16,-3.930201006595 3.0006091729809 -4.930201006595e-16,-3.79094307346469 3.00547810463173 -4.79094307346469e-16,-3.65270364466614 3.01519224698779 -4.65270364466614e-16,-3.51615620880066 3.029704273724 -4.51615620880066e-16,-3.38196601125011 3.04894348370485 -4.38196601125011e-16,-3.25078681316818 3.07281614543321 -4.25078681316818e-16,-3.12325770642185 3.10120595370083 -4.12325770642185e-16,-3.0 3.13397459621556 -4e-16,-2.88161419305851 3.17096242744496 -3.88161419305851e-16,-2.76867704934868 3.21198924639328 -3.76867704934868e-16,-2.66173878728228 3.25685517452261 -3.66173878728228e-16,-2.5613203993227 3.305341629541 -3.5613203993227e-16,-2.46791111376204 3.35721239031346 -3.46791111376204e-16,-2.38196601125011 3.41221474770753 -3.38196601125011e-16,-2.30390380768715 3.4700807357668 -3.30390380768715e-16,-2.23410481428215 3.53052843721411 -3.23410481428215e-16,-2.1729090847148 3.5932633569242 -3.1729090847148e-16,-2.12061475842818 3.65797985667433 -3.12061475842818e-16,-2.07747660812336 3.724362644183 -3.07747660812336e-16,-2.04370479853239 3.79208830918224 -3.04370479853239e-16,-2.01946386251686 3.86082689903993 -3.01946386251686e-16,-2.00487189948035 3.93024352625587 -3.00487189948035e-16,-2 4 -3e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2 4 -3e-16,-2.00487189948035 4.06975647374412 -3.00487189948035e-16,-2.01946386251686 4.13917310096007 -3.01946386251686e-16,-2.04370479853239 4.20791169081776 -3.04370479853239e-16,-2.07747660812336 4.275637355817 -3.07747660812336e-16,-2.12061475842818 4.34202014332567 -3.12061475842818e-16,-2.1729090847148 4.4067366430758 -3.1729090847148e-16,-2.23410481428215 4.46947156278589 -3.23410481428215e-16,-2.30390380768715 4.52991926423321 -3.30390380768715e-16,-2.38196601125011 4.58778525229247 -3.38196601125011e-16,-2.46791111376204 4.64278760968654 -3.46791111376204e-16,-2.5613203993227 4.694658370459 -3.5613203993227e-16,-2.66173878728228 4.74314482547739 -3.66173878728228e-16,-2.76867704934868 4.78801075360672 -3.76867704934868e-16,-2.88161419305851 4.82903757255504 -3.88161419305851e-16,-3.0 4.86602540378444 -4e-16,-3.12325770642185 4.89879404629917 -4.12325770642185e-16,-3.25078681316818 4.92718385456679 -4.25078681316818e-16,-3.38196601125011 4.95105651629515 -4.38196601125011e-16,-3.51615620880067 4.970295726276 -4.51615620880067e-16,-3.65270364466614 4.98480775301221 -4.65270364466614e-16,-3.79094307346469 4.99452189536827 -4.79094307346469e-16,-3.930201006595 4.9993908270191 -4.930201006595e-16,-4.069798993405 4.9993908270191 -5.069798993405e-16,-4.20905692653531 4.99452189536827 -5.20905692653531e-16,-4.34729635533386 4.98480775301221 -5.34729635533386e-16,-4.48384379119934 4.970295726276 -5.48384379119934e-16,-4.61803398874989 4.95105651629515 -5.6180339887499e-16,-4.74921318683182 4.92718385456679 -5.74921318683183e-16,-4.87674229357816 4.89879404629917 -5.87674229357816e-16,-5.0 4.86602540378444 -6e-16,-5.11838580694149 4.82903757255504 -6.1183858069415e-16,-5.23132295065132 4.78801075360672 -6.23132295065132e-16,-5.33826121271772 4.74314482547739 -6.33826121271772e-16,-5.4386796006773 4.694658370459 -6.4386796006773e-16,-5.53208888623796 4.64278760968654 -6.53208888623796e-16,-5.61803398874989 4.58778525229247 -6.61803398874989e-16,-5.69609619231285 4.5299192642332 -6.69609619231285e-16,-5.76589518571785 4.46947156278589 -6.76589518571785e-16,-5.8270909152852 4.4067366430758 -6.8270909152852e-16,-5.87938524157182 4.34202014332567 -6.87938524157182e-16,-5.92252339187664 4.275637355817 -6.92252339187664e-16,-5.95629520146761 4.20791169081776 -6.95629520146761e-16,-5.98053613748314 4.13917310096006 -6.98053613748314e-16,-5.99512810051965 4.06975647374412 -6.99512810051965e-16,-6.0 4.0 -7e-16,-5.99512810051965 3.93024352625587 -6.99512810051965e-16,-5.98053613748314 3.86082689903993 -6.98053613748314e-16,-5.95629520146761 3.79208830918224 -6.95629520146761e-16,' + '-5.92252339187664 3.724362644183 -6.92252339187664e-16,-5.87938524157182 3.65797985667433 -6.87938524157182e-16,-5.8270909152852 3.5932633569242 -6.8270909152852e-16,-5.76589518571785 3.53052843721411 -6.76589518571785e-16,-5.69609619231285 3.4700807357668 -6.69609619231285e-16,-5.61803398874989 3.41221474770753 -6.61803398874989e-16,-5.53208888623796 3.35721239031346 -6.53208888623796e-16,-5.4386796006773 3.305341629541 -6.4386796006773e-16,-5.33826121271772 3.25685517452261 -6.33826121271772e-16,-5.23132295065132 3.21198924639328 -6.23132295065132e-16,-5.11838580694149 3.17096242744496 -6.11838580694149e-16,-5.0 3.13397459621556 -6e-16,-4.87674229357815 3.10120595370083 -5.87674229357816e-16,-4.74921318683182 3.07281614543321 -5.74921318683182e-16,-4.61803398874989 3.04894348370485 -5.6180339887499e-16,-4.48384379119934 3.029704273724 -5.48384379119934e-16,-4.34729635533386 3.01519224698779 -5.34729635533386e-16,-4.20905692653531 3.00547810463173 -5.20905692653531e-16,-4.069798993405 3.0006091729809 -5.069798993405e-16,-3.930201006595 3.0006091729809 -4.930201006595e-16,-3.79094307346469 3.00547810463173 -4.79094307346469e-16,-3.65270364466614 3.01519224698779 -4.65270364466614e-16,-3.51615620880066 3.029704273724 -4.51615620880066e-16,-3.38196601125011 3.04894348370485 -4.38196601125011e-16,-3.25078681316818 3.07281614543321 -4.25078681316818e-16,-3.12325770642185 3.10120595370083 -4.12325770642185e-16,-3.0 3.13397459621556 -4e-16,-2.88161419305851 3.17096242744496 -3.88161419305851e-16,-2.76867704934868 3.21198924639328 -3.76867704934868e-16,-2.66173878728228 3.25685517452261 -3.66173878728228e-16,-2.5613203993227 3.305341629541 -3.5613203993227e-16,-2.46791111376204 3.35721239031346 -3.46791111376204e-16,-2.38196601125011 3.41221474770753 -3.38196601125011e-16,-2.30390380768715 3.4700807357668 -3.30390380768715e-16,-2.23410481428215 3.53052843721411 -3.23410481428215e-16,-2.1729090847148 3.5932633569242 -3.1729090847148e-16,-2.12061475842818 3.65797985667433 -3.12061475842818e-16,-2.07747660812336 3.724362644183 -3.07747660812336e-16,-2.04370479853239 3.79208830918224 -3.04370479853239e-16,-2.01946386251686 3.86082689903993 -3.01946386251686e-16,-2.00487189948035 3.93024352625587 -3.00487189948035e-16,-2 4 -3e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):19 # EntityHandle (String) = 20D # LINESTRING Z (-2.0 2.0 -2e-16,-1.96657794502105 2.03582232791524 -1.96657794502105e-16,-1.93571660708646 2.07387296203834 -1.93571660708646e-16,-1.90756413746468 2.11396923855471 -1.90756413746468e-16,-1.88225568337755 2.15591867344963 -1.88225568337755e-16,-1.85991273921989 2.19951988653655 -1.85991273921989e-16,-1.84064256332004 2.24456356819194 -1.84064256332004e-16,-1.8245376630414 2.29083348415575 -1.8245376630414e-16,-1.81167535069652 2.33810751357387 -1.81167535069652e-16,-1.80211737240583 2.38615871529951 -1.80211737240583e-16,-1.79590961168258 2.43475641733454 -1.79590961168258e-16,-1.79308186916688 2.48366732418105 -1.79308186916688e-16,-1.79364771956639 2.53265663678705 -1.79364771956639e-16,-1.79760444649032 2.58148917971011 -1.79760444649032e-16,-1.80493305548955 2.62993053008785 -1.80493305548955e-16,-1.81559836524041 2.67774814299566 -1.81559836524041e-16,-1.8295491764342 2.72471246778926 -1.8295491764342e-16,-1.84671851756181 2.7705980500731 -1.84671851756181e-16,-1.86702396641357 2.81518461400453 -1.86702396641357e-16,-1.89036804575079 2.85825811973811 -1.89036804575079e-16,-1.91663869124976 2.89961179093366 -1.91663869124976e-16,-1.94570978947168 2.93904710739563 -1.94570978947168e-16,-1.97744178327594 2.97637475807832 -1.97744178327594e-16,-2.01168234177068 3.01141554988232 -2.01168234177068e-16,-2.04826709158413 3.04400126787917 -2.04826709158413e-16,-2.08702040594658 3.07397548283483 -2.08702040594658e-16,-2.12775624779472 3.10119430215541 -2.12775624779472e-16,-2.17027906285109 3.12552706065018 -2.17027906285109e-16,-2.2143847183914 3.14685694779575 -2.2143847183914e-16,-2.25986148319297 3.16508156849045 -2.25986148319297e-16,-2.30649104396024 3.18011343460661 -2.30649104396024e-16,-2.35404955334774 3.1918803849814 -2.35404955334774e-16,-2.40230870454951 3.20032593182975 -2.40230870454951e-16,-2.45103682729644 3.2054095319166 -2.45103682729644e-16,-2.5 3.20710678118655 -2.5e-16,-2.54896317270356 3.2054095319166 -2.54896317270356e-16,-2.59769129545049 3.20032593182975 -2.59769129545049e-16,-2.64595044665226 3.1918803849814 -2.64595044665226e-16,-2.69350895603976 3.18011343460661 -2.69350895603976e-16,-2.74013851680703 3.16508156849045 -2.74013851680703e-16,-2.7856152816086 3.14685694779575 -2.7856152816086e-16,-2.8297209371489 3.12552706065018 -2.8297209371489e-16,-2.87224375220528 3.10119430215541 -2.87224375220528e-16,-2.91297959405342 3.07397548283483 -2.91297959405342e-16,-2.95173290841587 3.04400126787917 -2.95173290841587e-16,-2.98831765822932 3.01141554988232 -2.98831765822932e-16,-3.02255821672406 2.97637475807832 -3.02255821672406e-16,-3.05429021052832 2.93904710739563 -3.05429021052832e-16,-3.08336130875024 2.89961179093367 -3.08336130875024e-16,-3.10963195424921 2.85825811973811 -3.10963195424921e-16,-3.13297603358643 2.81518461400453 -3.13297603358643e-16,-3.15328148243819 2.7705980500731 -3.15328148243819e-16,-3.1704508235658 2.72471246778926 -3.1704508235658e-16,-3.18440163475959 2.67774814299567 -3.18440163475959e-16,-3.19506694451045 2.62993053008786 -3.19506694451045e-16,-3.20239555350968 2.58148917971011 -3.20239555350968e-16,-3.20635228043361 2.53265663678705 -3.20635228043361e-16,-3.20691813083312 2.48366732418105 -3.20691813083312e-16,-3.20409038831742 2.43475641733454 -3.20409038831742e-16,-3.19788262759417 2.38615871529951 -3.19788262759417e-16,-3.18832464930348 2.33810751357387 -3.18832464930349e-16,-3.1754623369586 2.29083348415575 -3.1754623369586e-16,-3.15935743667996 2.24456356819194 -3.15935743667996e-16,-3.14008726078011 2.19951988653655 -3.14008726078011e-16,-3.11774431662245 2.15591867344963 -3.11774431662245e-16,-3.09243586253532 2.11396923855472 -3.09243586253532e-16,-3.06428339291354 2.07387296203834 -3.06428339291354e-16,-3.03342205497895 2.03582232791524 -3.03342205497895e-16,-3 2 -3e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2.0 2.0 -2e-16,-1.96657794502105 2.03582232791524 -1.96657794502105e-16,-1.93571660708646 2.07387296203834 -1.93571660708646e-16,-1.90756413746468 2.11396923855471 -1.90756413746468e-16,-1.88225568337755 2.15591867344963 -1.88225568337755e-16,-1.85991273921989 2.19951988653655 -1.85991273921989e-16,-1.84064256332004 2.24456356819194 -1.84064256332004e-16,-1.8245376630414 2.29083348415575 -1.8245376630414e-16,-1.81167535069652 2.33810751357387 -1.81167535069652e-16,-1.80211737240583 2.38615871529951 -1.80211737240583e-16,-1.79590961168258 2.43475641733454 -1.79590961168258e-16,-1.79308186916688 2.48366732418105 -1.79308186916688e-16,-1.79364771956639 2.53265663678705 -1.79364771956639e-16,-1.79760444649032 2.58148917971011 -1.79760444649032e-16,-1.80493305548955 2.62993053008785 -1.80493305548955e-16,-1.81559836524041 2.67774814299566 -1.81559836524041e-16,-1.8295491764342 2.72471246778926 -1.8295491764342e-16,-1.84671851756181 2.7705980500731 -1.84671851756181e-16,-1.86702396641357 2.81518461400453 -1.86702396641357e-16,-1.89036804575079 2.85825811973811 -1.89036804575079e-16,-1.91663869124976 2.89961179093366 -1.91663869124976e-16,-1.94570978947168 2.93904710739563 -1.94570978947168e-16,-1.97744178327594 2.97637475807832 -1.97744178327594e-16,-2.01168234177068 3.01141554988232 -2.01168234177068e-16,-2.04826709158413 3.04400126787917 -2.04826709158413e-16,-2.08702040594658 3.07397548283483 -2.08702040594658e-16,-2.12775624779472 3.10119430215541 -2.12775624779472e-16,-2.17027906285109 3.12552706065018 -2.17027906285109e-16,-2.2143847183914 3.14685694779575 -2.2143847183914e-16,-2.25986148319297 3.16508156849045 -2.25986148319297e-16,-2.30649104396024 3.18011343460661 -2.30649104396024e-16,-2.35404955334774 3.1918803849814 -2.35404955334774e-16,-2.40230870454951 3.20032593182975 -2.40230870454951e-16,-2.45103682729644 3.2054095319166 -2.45103682729644e-16,' + '-2.5 3.20710678118655 -2.5e-16,-2.54896317270356 3.2054095319166 -2.54896317270356e-16,-2.59769129545049 3.20032593182975 -2.59769129545049e-16,-2.64595044665226 3.1918803849814 -2.64595044665226e-16,-2.69350895603976 3.18011343460661 -2.69350895603976e-16,-2.74013851680703 3.16508156849045 -2.74013851680703e-16,-2.7856152816086 3.14685694779575 -2.7856152816086e-16,-2.8297209371489 3.12552706065018 -2.8297209371489e-16,-2.87224375220528 3.10119430215541 -2.87224375220528e-16,-2.91297959405342 3.07397548283483 -2.91297959405342e-16,-2.95173290841587 3.04400126787917 -2.95173290841587e-16,-2.98831765822932 3.01141554988232 -2.98831765822932e-16,-3.02255821672406 2.97637475807832 -3.02255821672406e-16,-3.05429021052832 2.93904710739563 -3.05429021052832e-16,-3.08336130875024 2.89961179093367 -3.08336130875024e-16,-3.10963195424921 2.85825811973811 -3.10963195424921e-16,-3.13297603358643 2.81518461400453 -3.13297603358643e-16,-3.15328148243819 2.7705980500731 -3.15328148243819e-16,-3.1704508235658 2.72471246778926 -3.1704508235658e-16,-3.18440163475959 2.67774814299567 -3.18440163475959e-16,-3.19506694451045 2.62993053008786 -3.19506694451045e-16,-3.20239555350968 2.58148917971011 -3.20239555350968e-16,-3.20635228043361 2.53265663678705 -3.20635228043361e-16,-3.20691813083312 2.48366732418105 -3.20691813083312e-16,-3.20409038831742 2.43475641733454 -3.20409038831742e-16,-3.19788262759417 2.38615871529951 -3.19788262759417e-16,-3.18832464930348 2.33810751357387 -3.18832464930349e-16,-3.1754623369586 2.29083348415575 -3.1754623369586e-16,-3.15935743667996 2.24456356819194 -3.15935743667996e-16,-3.14008726078011 2.19951988653655 -3.14008726078011e-16,-3.11774431662245 2.15591867344963 -3.11774431662245e-16,-3.09243586253532 2.11396923855472 -3.09243586253532e-16,-3.06428339291354 2.07387296203834 -3.06428339291354e-16,-3.03342205497895 2.03582232791524 -3.03342205497895e-16,-3 2 -3e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):20 # EntityHandle (String) = 20E # POLYGON Z ((-1 2 -1e-16,-1 3 -1e-16,-2 3 -2e-16,-2 2 -2e-16,-1 2 -1e-16)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((-1 2 -1e-16,-1 3 -1e-16,-2 3 -2e-16,-2 2 -2e-16,-1 2 -1e-16))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):21 # EntityHandle (String) = 20F # POLYGON ((-3 4,-4 4,-4 3,-3 3,-3 4)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((-3 4,-4 4,-4 3,-3 3,-3 4))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):22 # EntityHandle (String) = 211 # POLYGON ((-8 8,-9 8,-9 9,-8 9,-8 8)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((-8 8,-9 8,-9 9,-8 9,-8 8))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):23 # EntityHandle (String) = 212 # LINESTRING (-2 2,-2.15384615384615 2.15384615384615,-2.30769230769231 2.30769230769231,-2.46153846153846 2.46153846153846,-2.61538461538461 2.61538461538461,-2.76923076923077 2.76923076923077,-2.92307692307692 2.92307692307692,-3.07692307692308 3.07692307692308,-3.23076923076923 3.23076923076923,-3.38461538461538 3.38461538461538,-3.53846153846154 3.53846153846154,-3.69230769230769 3.69230769230769,-3.84615384615385 3.84615384615385,-4 4,-4.15384615384615 4.15384615384615,-4.30769230769231 4.30769230769231,-4.46153846153846 4.46153846153846,-4.61538461538462 4.61538461538462,-4.76923076923077 4.76923076923077,-4.92307692307692 4.92307692307692,-5.07692307692308 5.07692307692308,-5.23076923076923 5.23076923076923,-5.38461538461538 5.38461538461538,-5.53846153846154 5.53846153846154,-5.69230769230769 5.69230769230769,-5.84615384615385 5.84615384615385,-6.0 6.0,-6.15384615384615 6.15384615384615,-6.30769230769231 6.30769230769231,-6.46153846153846 6.46153846153846,-6.61538461538462 6.61538461538462,-6.76923076923077 6.76923076923077,-6.92307692307692 6.92307692307692,-7.07692307692308 7.07692307692308,-7.23076923076923 7.23076923076923,-7.38461538461539 7.38461538461539,-7.53846153846154 7.53846153846154,-7.69230769230769 7.69230769230769,-7.84615384615385 7.84615384615385,-8 8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-2 2,-2.15384615384615 2.15384615384615,-2.30769230769231 2.30769230769231,-2.46153846153846 2.46153846153846,-2.61538461538461 2.61538461538461,-2.76923076923077 2.76923076923077,-2.92307692307692 2.92307692307692,-3.07692307692308 3.07692307692308,-3.23076923076923 3.23076923076923,-3.38461538461538 3.38461538461538,-3.53846153846154 3.53846153846154,-3.69230769230769 3.69230769230769,-3.84615384615385 3.84615384615385,-4 4,-4.15384615384615 4.15384615384615,-4.30769230769231 4.30769230769231,-4.46153846153846 4.46153846153846,-4.61538461538462 4.61538461538462,-4.76923076923077 4.76923076923077,-4.92307692307692 4.92307692307692,-5.07692307692308 5.07692307692308,-5.23076923076923 5.23076923076923,-5.38461538461538 5.38461538461538,-5.53846153846154 5.53846153846154,-5.69230769230769 5.69230769230769,-5.84615384615385 5.84615384615385,-6.0 6.0,-6.15384615384615 6.15384615384615,-6.30769230769231 6.30769230769231,-6.46153846153846 6.46153846153846,-6.61538461538462 6.61538461538462,-6.76923076923077 6.76923076923077,-6.92307692307692 6.92307692307692,-7.07692307692308 7.07692307692308,-7.23076923076923 7.23076923076923,-7.38461538461539 7.38461538461539,-7.53846153846154 7.53846153846154,-7.69230769230769 7.69230769230769,-7.84615384615385 7.84615384615385,-8 8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):24 # EntityHandle (String) = 213 # LINESTRING (-8 1,-7.62837370825536 0.987348067229724,-7.25775889681215 0.975707614760869,-6.88916704597178 0.966090122894857,-6.52360963603567 0.959507071933107,-6.16209814730525 0.956969942177043,-5.80564406008193 0.959490213928084,-5.45525885466714 0.968079367487651,-5.11195401136229 0.983748883157167,-4.77674101046882 1.00751024123805,-4.45063133228814 1.04037492203173,-4.13463645712167 1.08335440583961,-3.82976786527082 1.13746017296313,-3.53703703703704 1.2037037037037,-3.25745545272173 1.28309647836275,-2.99203459262631 1.37664997724169,-2.74178593705221 1.48537568064195,-2.50772096630085 1.61028506886495,-2.29085116067365 1.75238962221211,-2.09218800047203 1.91270082098484,-1.91270082098485 2.09218800047202,-1.75238962221211 2.29085116067364,-1.61028506886495 2.50772096630085,-1.48537568064195 2.74178593705221,-1.37664997724169 2.99203459262631,-1.28309647836275 3.25745545272172,-1.2037037037037 3.53703703703703,-1.13746017296313 3.82976786527082,-1.08335440583961 4.13463645712166,-1.04037492203173 4.45063133228814,-1.00751024123805 4.77674101046882,-0.983748883157167 5.11195401136229,-0.968079367487652 5.45525885466714,-0.959490213928084 5.80564406008193,-0.956969942177043 6.16209814730525,-0.959507071933108 6.52360963603567,-0.966090122894857 6.88916704597178,-0.975707614760869 7.25775889681216,-0.987348067229724 7.62837370825537,-1 8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-8 1,-7.62837370825536 0.987348067229724,-7.25775889681215 0.975707614760869,-6.88916704597178 0.966090122894857,-6.52360963603567 0.959507071933107,-6.16209814730525 0.956969942177043,-5.80564406008193 0.959490213928084,-5.45525885466714 0.968079367487651,-5.11195401136229 0.983748883157167,-4.77674101046882 1.00751024123805,-4.45063133228814 1.04037492203173,-4.13463645712167 1.08335440583961,-3.82976786527082 1.13746017296313,-3.53703703703704 1.2037037037037,-3.25745545272173 1.28309647836275,-2.99203459262631 1.37664997724169,-2.74178593705221 1.48537568064195,-2.50772096630085 1.61028506886495,-2.29085116067365 1.75238962221211,-2.09218800047203 1.91270082098484,-1.91270082098485 2.09218800047202,-1.75238962221211 2.29085116067364,-1.61028506886495 2.50772096630085,-1.48537568064195 2.74178593705221,-1.37664997724169 2.99203459262631,-1.28309647836275 3.25745545272172,-1.2037037037037 3.53703703703703,-1.13746017296313 3.82976786527082,-1.08335440583961 4.13463645712166,-1.04037492203173 4.45063133228814,-1.00751024123805 4.77674101046882,-0.983748883157167 5.11195401136229,-0.968079367487652 5.45525885466714,-0.959490213928084 5.80564406008193,-0.956969942177043 6.16209814730525,-0.959507071933108 6.52360963603567,-0.966090122894857 6.88916704597178,-0.975707614760869 7.25775889681216,-0.987348067229724 7.62837370825537,-1 8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):25 # EntityHandle (String) = 214 # POINT Z (-7 7 -7e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (-7 7 -7e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):26 # EntityHandle (String) = 215 # POINT Z (-4 -4 -1e-15) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (-4 -4 -1e-15)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):27 # EntityHandle (String) = 216 # LINESTRING Z (0 0 -2e-16,-1 -1 -5e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 -2e-16,-1 -1 -5e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):28 # EntityHandle (String) = 217 # LINESTRING (-1 -1,-2 -1,-1 -2,-1 -1) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-1 -1,-2 -1,-1 -2,-1 -1)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):29 # EntityHandle (String) = 218 # LINESTRING Z (-1 -1 -2e-16,-1 -2 -4e-16,-2 -2 -5e-16,-1 -1 -2e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-1 -1 -2e-16,-1 -2 -4e-16,-2 -2 -5e-16,-1 -1 -2e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):30 # EntityHandle (String) = 21D # LINESTRING Z (-2 -4 0,-2.00487189948035 -4.13951294748825 0,-2.01946386251686 -4.27834620192013 0,-2.04370479853239 -4.41582338163552 0,-2.07747660812336 -4.551274711634 0,-2.12061475842818 -4.68404028665134 0,-2.1729090847148 -4.8134732861516 0,-2.23410481428215 -4.93894312557178 0,-2.30390380768715 -5.05983852846641 0,-2.38196601125011 -5.17557050458495 0,-2.46791111376204 -5.28557521937308 0,-2.5613203993227 -5.38931674091799 0,-2.66173878728228 -5.48628965095479 0,-2.76867704934868 -5.57602150721344 0,-2.88161419305851 -5.65807514511008 0,-3.0 -5.73205080756888 0,-3.12325770642185 -5.79758809259833 0,-3.25078681316818 -5.85436770913357 0,-3.38196601125011 -5.90211303259031 0,-3.51615620880066 -5.94059145255199 0,-3.65270364466614 -5.96961550602442 0,-3.79094307346469 -5.98904379073655 0,-3.930201006595 -5.99878165403819 0,-4.069798993405 -5.99878165403819 0,-4.20905692653531 -5.98904379073655 0,-4.34729635533386 -5.96961550602442 0,-4.48384379119934 -5.94059145255199 0,-4.61803398874989 -5.90211303259031 0,-4.74921318683182 -5.85436770913357 0,-4.87674229357815 -5.79758809259833 0,-5.0 -5.73205080756888 0,-5.11838580694149 -5.65807514511008 0,-5.23132295065132 -5.57602150721344 0,-5.33826121271772 -5.48628965095479 0,-5.4386796006773 -5.38931674091799 0,-5.53208888623796 -5.28557521937308 0,-5.61803398874989 -5.17557050458495 0,-5.69609619231285 -5.05983852846641 0,-5.76589518571785 -4.93894312557178 0,-5.8270909152852 -4.8134732861516 0,-5.87938524157182 -4.68404028665134 0,-5.92252339187664 -4.551274711634 0,-5.95629520146761 -4.41582338163552 0,-5.98053613748314 -4.27834620192013 0,-5.99512810051965 -4.13951294748825 0,-6 -4 0,-5.99512810051965 -3.86048705251175 0,-5.98053613748314 -3.72165379807987 0,-5.95629520146761 -3.58417661836448 0,-5.92252339187664 -3.448725288366 0,-5.87938524157182 -3.31595971334866 0,-5.8270909152852 -3.1865267138484 0,-5.76589518571785 -3.06105687442822 0,-5.69609619231285 -2.94016147153359 0,-5.61803398874989 -2.82442949541505 0,-5.53208888623796 -2.71442478062692 0,-5.4386796006773 -2.61068325908201 0,-5.33826121271772 -2.51371034904521 0,-5.23132295065132 -2.42397849278656 0,-5.11838580694149 -2.34192485488992 0,-5.0 -2.26794919243112 0,-4.87674229357816 -2.20241190740167 0,-4.74921318683182 -2.14563229086643 0,-4.61803398874989 -2.09788696740969 0,-4.48384379119934 -2.05940854744801 0,-4.34729635533386 -2.03038449397558 0,-4.20905692653531 -2.01095620926345 0,-4.069798993405 -2.00121834596181 0,-3.930201006595 -2.00121834596181 0,-3.79094307346469 -2.01095620926345 0,-3.65270364466614 -2.03038449397558 0,-3.51615620880067 -2.05940854744801 0,-3.38196601125011 -2.09788696740969 0,-3.25078681316818 -2.14563229086643 0,-3.12325770642185 -2.20241190740167 0,-3.0 -2.26794919243112 0,-2.88161419305851 -2.34192485488992 0,-2.76867704934868 -2.42397849278656 0,-2.66173878728228 -2.51371034904521 0,-2.5613203993227 -2.610683259082 0,-2.46791111376204 -2.71442478062692 0,-2.38196601125011 -2.82442949541505 0,-2.30390380768715 -2.94016147153359 0,-2.23410481428215 -3.06105687442822 0,-2.1729090847148 -3.1865267138484 0,-2.12061475842818 -3.31595971334866 0,-2.07747660812336 -3.448725288366 0,-2.04370479853239 -3.58417661836448 0,-2.01946386251686 -3.72165379807987 0,-2.00487189948035 -3.86048705251175 0,-2.0 -4.0 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2 -4 0,-2.00487189948035 -4.13951294748825 0,-2.01946386251686 -4.27834620192013 0,-2.04370479853239 -4.41582338163552 0,-2.07747660812336 -4.551274711634 0,-2.12061475842818 -4.68404028665134 0,-2.1729090847148 -4.8134732861516 0,-2.23410481428215 -4.93894312557178 0,-2.30390380768715 -5.05983852846641 0,-2.38196601125011 -5.17557050458495 0,-2.46791111376204 -5.28557521937308 0,-2.5613203993227 -5.38931674091799 0,-2.66173878728228 -5.48628965095479 0,-2.76867704934868 -5.57602150721344 0,-2.88161419305851 -5.65807514511008 0,-3.0 -5.73205080756888 0,-3.12325770642185 -5.79758809259833 0,-3.25078681316818 -5.85436770913357 0,-3.38196601125011 -5.90211303259031 0,-3.51615620880066 -5.94059145255199 0,-3.65270364466614 -5.96961550602442 0,-3.79094307346469 -5.98904379073655 0,-3.930201006595 -5.99878165403819 0,-4.069798993405 -5.99878165403819 0,-4.20905692653531 -5.98904379073655 0,-4.34729635533386 -5.96961550602442 0,-4.48384379119934 -5.94059145255199 0,-4.61803398874989 -5.90211303259031 0,-4.74921318683182 -5.85436770913357 0,-4.87674229357815 -5.79758809259833 0,-5.0 -5.73205080756888 0,-5.11838580694149 -5.65807514511008 0,-5.23132295065132 -5.57602150721344 0,-5.33826121271772 -5.48628965095479 0,-5.4386796006773 -5.38931674091799 0,-5.53208888623796 -5.28557521937308 0,-5.61803398874989 -5.17557050458495 0,-5.69609619231285 -5.05983852846641 0,-5.76589518571785 -4.93894312557178 0,-5.8270909152852 -4.8134732861516 0,-5.87938524157182 -4.68404028665134 0,-5.92252339187664 -4.551274711634 0,-5.95629520146761 -4.41582338163552 0,-5.98053613748314 -4.27834620192013 0,-5.99512810051965 -4.13951294748825 0,-6 -4 0,-5.99512810051965 -3.86048705251175 0,-5.98053613748314 -3.72165379807987 0,-5.95629520146761 -3.58417661836448 0,-5.92252339187664 -3.448725288366 0,-5.87938524157182 -3.31595971334866 0,-5.8270909152852 -3.1865267138484 0,-5.76589518571785 -3.06105687442822 0,-5.69609619231285 -2.94016147153359 0,-5.61803398874989 -2.82442949541505 0,-5.53208888623796 -2.71442478062692 0,-5.4386796006773 -2.61068325908201 0,-5.33826121271772 -2.51371034904521 0,-5.23132295065132 -2.42397849278656 0,-5.11838580694149 -2.34192485488992 0,-5.0 -2.26794919243112 0,-4.87674229357816 -2.20241190740167 0,-4.74921318683182 -2.14563229086643 0,-4.61803398874989 -2.09788696740969 0,-4.48384379119934 -2.05940854744801 0,-4.34729635533386 -2.03038449397558 0,-4.20905692653531 -2.01095620926345 0,-4.069798993405 -2.00121834596181 0,-3.930201006595 -2.00121834596181 0,-3.79094307346469 -2.01095620926345 0,-3.65270364466614 -2.03038449397558 0,-3.51615620880067 -2.05940854744801 0,-3.38196601125011 -2.09788696740969 0,-3.25078681316818 -2.14563229086643 0,-3.12325770642185 -2.20241190740167 0,-3.0 -2.26794919243112 0,-2.88161419305851 -2.34192485488992 0,-2.76867704934868 -2.42397849278656 0,-2.66173878728228 -2.51371034904521 0,-2.5613203993227 -2.610683259082 0,-2.46791111376204 -2.71442478062692 0,-2.38196601125011 -2.82442949541505 0,-2.30390380768715 -2.94016147153359 0,-2.23410481428215 -3.06105687442822 0,-2.1729090847148 -3.1865267138484 0,-2.12061475842818 -3.31595971334866 0,-2.07747660812336 -3.448725288366 0,-2.04370479853239 -3.58417661836448 0,-2.01946386251686 -3.72165379807987 0,-2.00487189948035 -3.86048705251175 0,-2.0 -4.0 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):31 # EntityHandle (String) = 21E # LINESTRING Z (-2 -4 -8e-16,-2.00487189948035 -4.06975647374412 -8.07462837322448e-16,-2.01946386251686 -4.13917310096007 -8.15863696347693e-16,-2.04370479853239 -4.20791169081776 -8.25161648935015e-16,-2.07747660812336 -4.275637355817 -8.35311396394036e-16,-2.12061475842818 -4.34202014332567 -8.46263490175385e-16,-2.1729090847148 -4.4067366430758 -8.5796457277906e-16,-2.23410481428215 -4.46947156278589 -8.70357637706804e-16,-2.30390380768715 -4.52991926423321 -8.83382307192036e-16,-2.38196601125011 -4.58778525229247 -8.96975126354258e-16,-2.46791111376204 -4.64278760968654 -9.11069872344859e-16,-2.5613203993227 -4.694658370459 -9.2559787697817e-16,-2.66173878728228 -4.74314482547739 -9.40488361275968e-16,-2.76867704934868 -4.78801075360672 -9.5566878029554e-16,-2.88161419305851 -4.82903757255504 -9.71065176561355e-16,-3.0 -4.86602540378444 -9.86602540378444e-16,-3.12325770642185 -4.89879404629917 -1.0022051752721e-15,-3.25078681316818 -4.92718385456679 -1.0177970667735e-15,-3.38196601125011 -4.95105651629515 -1.03330225275453e-15,-3.51615620880067 -4.970295726276 -1.04864519350767e-15,-3.65270364466614 -4.98480775301221 -1.06375113976783e-15,-3.79094307346469 -4.99452189536827 -1.0785464968833e-15,-3.930201006595 -4.9993908270191 -1.09295918336141e-15,-4.069798993405 -4.9993908270191 -1.10691898204241e-15,-4.20905692653531 -4.99452189536827 -1.12035788219036e-15,-4.34729635533386 -4.98480775301221 -1.13321041083461e-15,-4.48384379119934 -4.970295726276 -1.14541395174753e-15,-4.61803398874989 -4.95105651629515 -1.1569090505045e-15,-4.74921318683182 -4.92718385456679 -1.16763970413986e-15,-4.87674229357816 -4.89879404629917 -1.17755363398773e-15,-5.0 -4.86602540378444 -1.18660254037844e-15,-5.11838580694149 -4.82903757255504 -1.19474233794965e-15,-5.23132295065132 -4.78801075360672 -1.2019333704258e-15,-5.33826121271772 -4.74314482547739 -1.20814060381951e-15,-5.4386796006773 -4.694658370459 -1.21333379711363e-15,-5.53208888623796 -4.64278760968654 -1.21748764959245e-15,-5.61803398874989 -4.58778525229247 -1.22058192410424e-15,-5.69609619231285 -4.5299192642332 -1.22260154565461e-15,-5.76589518571785 -4.46947156278589 -1.22353667485037e-15,-5.8270909152852 -4.4067366430758 -1.2233827558361e-15,-5.87938524157182 -4.34202014332567 -1.22214053848975e-15,-5.92252339187664 -4.275637355817 -1.21981607476936e-15,-5.95629520146761 -4.20791169081776 -1.21642068922854e-15,-5.98053613748314 -4.13917310096007 -1.21197092384432e-15,-5.99512810051965 -4.06975647374412 -1.20648845742638e-15,-6 -4 -1.2e-15,-5.99512810051965 -3.93024352625587 -1.19253716267755e-15, # -5.98053613748314 -3.86082689903993 -1.18413630365231e-15,-5.95629520146761 -3.79208830918224 -1.17483835106499e-15,-5.92252339187664 -3.724362644183 -1.16468860360596e-15,-5.87938524157182 -3.65797985667433 -1.15373650982461e-15,-5.8270909152852 -3.5932633569242 -1.14203542722094e-15,-5.76589518571785 -3.53052843721411 -1.1296423622932e-15,-5.69609619231285 -3.4700807357668 -1.11661769280796e-15,-5.61803398874989 -3.41221474770753 -1.10302487364574e-15,-5.53208888623796 -3.35721239031346 -1.08893012765514e-15,-5.4386796006773 -3.305341629541 -1.07440212302183e-15,-5.33826121271772 -3.25685517452261 -1.05951163872403e-15,-5.23132295065132 -3.21198924639328 -1.04433121970446e-15,-5.11838580694149 -3.17096242744496 -1.02893482343865e-15,-5.0 -3.13397459621556 -1.01339745962156e-15,-4.87674229357815 -3.10120595370083 -9.97794824727899e-16,-4.74921318683182 -3.07281614543321 -9.82202933226504e-16,-4.61803398874989 -3.04894348370485 -9.66697747245474e-16,-4.48384379119934 -3.029704273724 -9.51354806492334e-16,-4.34729635533386 -3.01519224698779 -9.36248860232165e-16,-4.20905692653531 -3.00547810463173 -9.21453503116703e-16,-4.069798993405 -3.0006091729809 -9.07040816638591e-16,-3.930201006595 -3.0006091729809 -8.9308101795759e-16,-3.79094307346469 -3.00547810463173 -8.79642117809642e-16,-3.65270364466614 -3.01519224698779 -8.66789589165393e-16,-3.51615620880066 -3.029704273724 -8.54586048252467e-16,-3.38196601125011 -3.04894348370485 -8.43090949495495e-16,-3.25078681316818 -3.07281614543321 -8.32360295860139e-16,-3.12325770642185 -3.10120595370083 -8.22446366012268e-16,-3.0 -3.13397459621556 -8.13397459621556e-16,-2.88161419305851 -3.17096242744496 -8.05257662050347e-16,-2.76867704934868 -3.21198924639328 -7.98066629574196e-16,-2.66173878728228 -3.25685517452261 -7.91859396180489e-16,-2.5613203993227 -3.305341629541 -7.8666620288637e-16,-2.46791111376204 -3.35721239031346 -7.82512350407551e-16,-2.38196601125011 -3.41221474770753 -7.79418075895763e-16,-2.30390380768715 -3.4700807357668 -7.77398454345394e-16,-2.23410481428215 -3.53052843721411 -7.76463325149626e-16,-2.1729090847148 -3.5932633569242 -7.766172441639e-16,-2.12061475842818 -3.65797985667433 -7.77859461510252e-16,-2.07747660812336 -3.724362644183 -7.80183925230636e-16,-2.04370479853239 -3.79208830918224 -7.83579310771463e-16,-2.01946386251686 -3.86082689903993 -7.88029076155679e-16,-2.00487189948035 -3.93024352625587 -7.93511542573623e-16,-2 -4 -8e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2 -4 -8e-16,-2.00487189948035 -4.06975647374412 -8.07462837322448e-16,-2.01946386251686 -4.13917310096007 -8.15863696347693e-16,-2.04370479853239 -4.20791169081776 -8.25161648935015e-16,-2.07747660812336 -4.275637355817 -8.35311396394036e-16,-2.12061475842818 -4.34202014332567 -8.46263490175385e-16,-2.1729090847148 -4.4067366430758 -8.5796457277906e-16,-2.23410481428215 -4.46947156278589 -8.70357637706804e-16,-2.30390380768715 -4.52991926423321 -8.83382307192036e-16,-2.38196601125011 -4.58778525229247 -8.96975126354258e-16,-2.46791111376204 -4.64278760968654 -9.11069872344859e-16,-2.5613203993227 -4.694658370459 -9.2559787697817e-16,-2.66173878728228 -4.74314482547739 -9.40488361275968e-16,-2.76867704934868 -4.78801075360672 -9.5566878029554e-16,-2.88161419305851 -4.82903757255504 -9.71065176561355e-16,-3.0 -4.86602540378444 -9.86602540378444e-16,-3.12325770642185 -4.89879404629917 -1.0022051752721e-15,-3.25078681316818 -4.92718385456679 -1.0177970667735e-15,-3.38196601125011 -4.95105651629515 -1.03330225275453e-15,-3.51615620880067 -4.970295726276 -1.04864519350767e-15,-3.65270364466614 -4.98480775301221 -1.06375113976783e-15,-3.79094307346469 -4.99452189536827 -1.0785464968833e-15,-3.930201006595 -4.9993908270191 -1.09295918336141e-15,-4.069798993405 -4.9993908270191 -1.10691898204241e-15,-4.20905692653531 -4.99452189536827 -1.12035788219036e-15,-4.34729635533386 -4.98480775301221 -1.13321041083461e-15,-4.48384379119934 -4.970295726276 -1.14541395174753e-15,-4.61803398874989 -4.95105651629515 -1.1569090505045e-15,-4.74921318683182 -4.92718385456679 -1.16763970413986e-15,-4.87674229357816 -4.89879404629917 -1.17755363398773e-15,-5.0 -4.86602540378444 -1.18660254037844e-15,-5.11838580694149 -4.82903757255504 -1.19474233794965e-15,-5.23132295065132 -4.78801075360672 -1.2019333704258e-15,-5.33826121271772 -4.74314482547739 -1.20814060381951e-15,-5.4386796006773 -4.694658370459 -1.21333379711363e-15,-5.53208888623796 -4.64278760968654 -1.21748764959245e-15,-5.61803398874989 -4.58778525229247 -1.22058192410424e-15,-5.69609619231285 -4.5299192642332 -1.22260154565461e-15,-5.76589518571785 -4.46947156278589 -1.22353667485037e-15,-5.8270909152852 -4.4067366430758 -1.2233827558361e-15,-5.87938524157182 -4.34202014332567 -1.22214053848975e-15,-5.92252339187664 -4.275637355817 -1.21981607476936e-15,-5.95629520146761 -4.20791169081776 -1.21642068922854e-15,-5.98053613748314 -4.13917310096007 -1.21197092384432e-15,-5.99512810051965 -4.06975647374412 -1.20648845742638e-15,-6 -4 -1.2e-15,-5.99512810051965 -3.93024352625587 -1.19253716267755e-15,' + '-5.98053613748314 -3.86082689903993 -1.18413630365231e-15,-5.95629520146761 -3.79208830918224 -1.17483835106499e-15,-5.92252339187664 -3.724362644183 -1.16468860360596e-15,-5.87938524157182 -3.65797985667433 -1.15373650982461e-15,-5.8270909152852 -3.5932633569242 -1.14203542722094e-15,-5.76589518571785 -3.53052843721411 -1.1296423622932e-15,-5.69609619231285 -3.4700807357668 -1.11661769280796e-15,-5.61803398874989 -3.41221474770753 -1.10302487364574e-15,-5.53208888623796 -3.35721239031346 -1.08893012765514e-15,-5.4386796006773 -3.305341629541 -1.07440212302183e-15,-5.33826121271772 -3.25685517452261 -1.05951163872403e-15,-5.23132295065132 -3.21198924639328 -1.04433121970446e-15,-5.11838580694149 -3.17096242744496 -1.02893482343865e-15,-5.0 -3.13397459621556 -1.01339745962156e-15,-4.87674229357815 -3.10120595370083 -9.97794824727899e-16,-4.74921318683182 -3.07281614543321 -9.82202933226504e-16,-4.61803398874989 -3.04894348370485 -9.66697747245474e-16,-4.48384379119934 -3.029704273724 -9.51354806492334e-16,-4.34729635533386 -3.01519224698779 -9.36248860232165e-16,-4.20905692653531 -3.00547810463173 -9.21453503116703e-16,-4.069798993405 -3.0006091729809 -9.07040816638591e-16,-3.930201006595 -3.0006091729809 -8.9308101795759e-16,-3.79094307346469 -3.00547810463173 -8.79642117809642e-16,-3.65270364466614 -3.01519224698779 -8.66789589165393e-16,-3.51615620880066 -3.029704273724 -8.54586048252467e-16,-3.38196601125011 -3.04894348370485 -8.43090949495495e-16,-3.25078681316818 -3.07281614543321 -8.32360295860139e-16,-3.12325770642185 -3.10120595370083 -8.22446366012268e-16,-3.0 -3.13397459621556 -8.13397459621556e-16,-2.88161419305851 -3.17096242744496 -8.05257662050347e-16,-2.76867704934868 -3.21198924639328 -7.98066629574196e-16,-2.66173878728228 -3.25685517452261 -7.91859396180489e-16,-2.5613203993227 -3.305341629541 -7.8666620288637e-16,-2.46791111376204 -3.35721239031346 -7.82512350407551e-16,-2.38196601125011 -3.41221474770753 -7.79418075895763e-16,-2.30390380768715 -3.4700807357668 -7.77398454345394e-16,-2.23410481428215 -3.53052843721411 -7.76463325149626e-16,-2.1729090847148 -3.5932633569242 -7.766172441639e-16,-2.12061475842818 -3.65797985667433 -7.77859461510252e-16,-2.07747660812336 -3.724362644183 -7.80183925230636e-16,-2.04370479853239 -3.79208830918224 -7.83579310771463e-16,-2.01946386251686 -3.86082689903993 -7.88029076155679e-16,-2.00487189948035 -3.93024352625587 -7.93511542573623e-16,-2 -4 -8e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):32 # EntityHandle (String) = 21F # LINESTRING Z (-2 -2 0,-1.96657794502105 -2.03582232791524 0,-1.93571660708646 -2.07387296203834 0,-1.90756413746468 -2.11396923855472 0,-1.88225568337755 -2.15591867344963 0,-1.85991273921989 -2.19951988653655 0,-1.84064256332004 -2.24456356819194 0,-1.8245376630414 -2.29083348415575 0,-1.81167535069652 -2.33810751357387 0,-1.80211737240583 -2.38615871529951 0,-1.79590961168258 -2.43475641733454 0,-1.79308186916688 -2.48366732418105 0,-1.79364771956639 -2.53265663678705 0,-1.79760444649032 -2.58148917971011 0,-1.80493305548955 -2.62993053008786 0,-1.81559836524041 -2.67774814299567 0,-1.8295491764342 -2.72471246778926 0,-1.84671851756181 -2.7705980500731 0,-1.86702396641357 -2.81518461400453 0,-1.89036804575079 -2.85825811973811 0,-1.91663869124976 -2.89961179093367 0,-1.94570978947168 -2.93904710739563 0,-1.97744178327594 -2.97637475807832 0,-2.01168234177068 -3.01141554988232 0,-2.04826709158413 -3.04400126787917 0,-2.08702040594658 -3.07397548283483 0,-2.12775624779472 -3.10119430215541 0,-2.1702790628511 -3.12552706065018 0,-2.2143847183914 -3.14685694779575 0,-2.25986148319297 -3.16508156849045 0,-2.30649104396024 -3.18011343460661 0,-2.35404955334774 -3.1918803849814 0,-2.40230870454951 -3.20032593182975 0,-2.45103682729644 -3.2054095319166 0,-2.5 -3.20710678118655 0,-2.54896317270356 -3.2054095319166 0,-2.59769129545049 -3.20032593182975 0,-2.64595044665226 -3.1918803849814 0,-2.69350895603976 -3.18011343460661 0,-2.74013851680703 -3.16508156849045 0,-2.7856152816086 -3.14685694779575 0,-2.8297209371489 -3.12552706065018 0,-2.87224375220528 -3.10119430215541 0,-2.91297959405342 -3.07397548283483 0,-2.95173290841587 -3.04400126787917 0,-2.98831765822932 -3.01141554988232 0,-3.02255821672406 -2.97637475807832 0,-3.05429021052832 -2.93904710739563 0,-3.08336130875024 -2.89961179093367 0,-3.10963195424921 -2.85825811973811 0,-3.13297603358643 -2.81518461400453 0,-3.15328148243819 -2.7705980500731 0,-3.1704508235658 -2.72471246778926 0,-3.18440163475959 -2.67774814299567 0,-3.19506694451045 -2.62993053008786 0,-3.20239555350968 -2.58148917971011 0,-3.20635228043361 -2.53265663678705 0,-3.20691813083312 -2.48366732418105 0,-3.20409038831742 -2.43475641733454 0,-3.19788262759417 -2.38615871529951 0,-3.18832464930348 -2.33810751357387 0,-3.1754623369586 -2.29083348415575 0,-3.15935743667996 -2.24456356819194 0,-3.14008726078011 -2.19951988653655 0,-3.11774431662245 -2.15591867344963 0,-3.09243586253532 -2.11396923855472 0,-3.06428339291354 -2.07387296203834 0,-3.03342205497895 -2.03582232791524 0,-3 -2 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2 -2 0,-1.96657794502105 -2.03582232791524 0,-1.93571660708646 -2.07387296203834 0,-1.90756413746468 -2.11396923855472 0,-1.88225568337755 -2.15591867344963 0,-1.85991273921989 -2.19951988653655 0,-1.84064256332004 -2.24456356819194 0,-1.8245376630414 -2.29083348415575 0,-1.81167535069652 -2.33810751357387 0,-1.80211737240583 -2.38615871529951 0,-1.79590961168258 -2.43475641733454 0,-1.79308186916688 -2.48366732418105 0,-1.79364771956639 -2.53265663678705 0,-1.79760444649032 -2.58148917971011 0,-1.80493305548955 -2.62993053008786 0,-1.81559836524041 -2.67774814299567 0,-1.8295491764342 -2.72471246778926 0,-1.84671851756181 -2.7705980500731 0,-1.86702396641357 -2.81518461400453 0,-1.89036804575079 -2.85825811973811 0,-1.91663869124976 -2.89961179093367 0,-1.94570978947168 -2.93904710739563 0,-1.97744178327594 -2.97637475807832 0,-2.01168234177068 -3.01141554988232 0,-2.04826709158413 -3.04400126787917 0,-2.08702040594658 -3.07397548283483 0,-2.12775624779472 -3.10119430215541 0,-2.1702790628511 -3.12552706065018 0,-2.2143847183914 -3.14685694779575 0,-2.25986148319297 -3.16508156849045 0,-2.30649104396024 -3.18011343460661 0,-2.35404955334774 -3.1918803849814 0,-2.40230870454951 -3.20032593182975 0,-2.45103682729644 -3.2054095319166 0,-2.5 -3.20710678118655 0,-2.54896317270356 -3.2054095319166 0,-2.59769129545049 -3.20032593182975 0,-2.64595044665226 -3.1918803849814 0,-2.69350895603976 -3.18011343460661 0,-2.74013851680703 -3.16508156849045 0,-2.7856152816086 -3.14685694779575 0,-2.8297209371489 -3.12552706065018 0,-2.87224375220528 -3.10119430215541 0,-2.91297959405342 -3.07397548283483 0,-2.95173290841587 -3.04400126787917 0,-2.98831765822932 -3.01141554988232 0,-3.02255821672406 -2.97637475807832 0,-3.05429021052832 -2.93904710739563 0,-3.08336130875024 -2.89961179093367 0,-3.10963195424921 -2.85825811973811 0,-3.13297603358643 -2.81518461400453 0,-3.15328148243819 -2.7705980500731 0,-3.1704508235658 -2.72471246778926 0,-3.18440163475959 -2.67774814299567 0,-3.19506694451045 -2.62993053008786 0,-3.20239555350968 -2.58148917971011 0,-3.20635228043361 -2.53265663678705 0,-3.20691813083312 -2.48366732418105 0,-3.20409038831742 -2.43475641733454 0,-3.19788262759417 -2.38615871529951 0,-3.18832464930348 -2.33810751357387 0,-3.1754623369586 -2.29083348415575 0,-3.15935743667996 -2.24456356819194 0,-3.14008726078011 -2.19951988653655 0,-3.11774431662245 -2.15591867344963 0,-3.09243586253532 -2.11396923855472 0,-3.06428339291354 -2.07387296203834 0,-3.03342205497895 -2.03582232791524 0,-3 -2 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):33 # EntityHandle (String) = 220 # POLYGON Z ((-1 -2 -4e-16,-1 -3 -5e-16,-2 -3 -6e-16,-2 -2 -5e-16,-1 -2 -4e-16)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((-1 -2 -4e-16,-1 -3 -5e-16,-2 -3 -6e-16,-2 -2 -5e-16,-1 -2 -4e-16))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):34 # EntityHandle (String) = 221 # POLYGON ((-3 -4,-4 -4,-4 -3,-3 -3,-3 -4)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((-3 -4,-4 -4,-4 -3,-3 -3,-3 -4))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):35 # EntityHandle (String) = 223 # POLYGON ((-8 -8,-9 -8,-9 -9,-8 -9,-8 -8)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((-8 -8,-9 -8,-9 -9,-8 -9,-8 -8))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):36 # EntityHandle (String) = 224 # LINESTRING (-2 -2,-2.15384615384615 -2.15384615384615,-2.30769230769231 -2.30769230769231,-2.46153846153846 -2.46153846153846,-2.61538461538461 -2.61538461538461,-2.76923076923077 -2.76923076923077,-2.92307692307692 -2.92307692307692,-3.07692307692308 -3.07692307692308,-3.23076923076923 -3.23076923076923,-3.38461538461538 -3.38461538461538,-3.53846153846154 -3.53846153846154,-3.69230769230769 -3.69230769230769,-3.84615384615385 -3.84615384615385,-4 -4,-4.15384615384615 -4.15384615384615,-4.30769230769231 -4.30769230769231,-4.46153846153846 -4.46153846153846,-4.61538461538462 -4.61538461538462,-4.76923076923077 -4.76923076923077,-4.92307692307692 -4.92307692307692,-5.07692307692308 -5.07692307692308,-5.23076923076923 -5.23076923076923,-5.38461538461538 -5.38461538461538,-5.53846153846154 -5.53846153846154,-5.69230769230769 -5.69230769230769,-5.84615384615385 -5.84615384615385,-6.0 -6.0,-6.15384615384615 -6.15384615384615,-6.30769230769231 -6.30769230769231,-6.46153846153846 -6.46153846153846,-6.61538461538462 -6.61538461538462,-6.76923076923077 -6.76923076923077,-6.92307692307692 -6.92307692307692,-7.07692307692308 -7.07692307692308,-7.23076923076923 -7.23076923076923,-7.38461538461539 -7.38461538461539,-7.53846153846154 -7.53846153846154,-7.69230769230769 -7.69230769230769,-7.84615384615385 -7.84615384615385,-8 -8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-2 -2,-2.15384615384615 -2.15384615384615,-2.30769230769231 -2.30769230769231,-2.46153846153846 -2.46153846153846,-2.61538461538461 -2.61538461538461,-2.76923076923077 -2.76923076923077,-2.92307692307692 -2.92307692307692,-3.07692307692308 -3.07692307692308,-3.23076923076923 -3.23076923076923,-3.38461538461538 -3.38461538461538,-3.53846153846154 -3.53846153846154,-3.69230769230769 -3.69230769230769,-3.84615384615385 -3.84615384615385,-4 -4,-4.15384615384615 -4.15384615384615,-4.30769230769231 -4.30769230769231,-4.46153846153846 -4.46153846153846,-4.61538461538462 -4.61538461538462,-4.76923076923077 -4.76923076923077,-4.92307692307692 -4.92307692307692,-5.07692307692308 -5.07692307692308,-5.23076923076923 -5.23076923076923,-5.38461538461538 -5.38461538461538,-5.53846153846154 -5.53846153846154,-5.69230769230769 -5.69230769230769,-5.84615384615385 -5.84615384615385,-6.0 -6.0,-6.15384615384615 -6.15384615384615,-6.30769230769231 -6.30769230769231,-6.46153846153846 -6.46153846153846,-6.61538461538462 -6.61538461538462,-6.76923076923077 -6.76923076923077,-6.92307692307692 -6.92307692307692,-7.07692307692308 -7.07692307692308,-7.23076923076923 -7.23076923076923,-7.38461538461539 -7.38461538461539,-7.53846153846154 -7.53846153846154,-7.69230769230769 -7.69230769230769,-7.84615384615385 -7.84615384615385,-8 -8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):37 # EntityHandle (String) = 225 # LINESTRING (-8 -1,-7.62837370825536 -0.987348067229724,-7.25775889681215 -0.975707614760869,-6.88916704597178 -0.966090122894857,-6.52360963603567 -0.959507071933107,-6.16209814730525 -0.956969942177043,-5.80564406008193 -0.959490213928084,-5.45525885466714 -0.968079367487651,-5.11195401136229 -0.983748883157167,-4.77674101046882 -1.00751024123805,-4.45063133228814 -1.04037492203173,-4.13463645712167 -1.08335440583961,-3.82976786527082 -1.13746017296313,-3.53703703703704 -1.2037037037037,-3.25745545272173 -1.28309647836275,-2.99203459262631 -1.37664997724169,-2.74178593705221 -1.48537568064195,-2.50772096630085 -1.61028506886495,-2.29085116067365 -1.75238962221211,-2.09218800047203 -1.91270082098484,-1.91270082098485 -2.09218800047202,-1.75238962221211 -2.29085116067364,-1.61028506886495 -2.50772096630085,-1.48537568064195 -2.74178593705221,-1.37664997724169 -2.99203459262631,-1.28309647836275 -3.25745545272172,-1.2037037037037 -3.53703703703703,-1.13746017296313 -3.82976786527082,-1.08335440583961 -4.13463645712166,-1.04037492203173 -4.45063133228814,-1.00751024123805 -4.77674101046882,-0.983748883157167 -5.11195401136229,-0.968079367487652 -5.45525885466714,-0.959490213928084 -5.80564406008193,-0.956969942177043 -6.16209814730525,-0.959507071933108 -6.52360963603567,-0.966090122894857 -6.88916704597178,-0.975707614760869 -7.25775889681216,-0.987348067229724 -7.62837370825537,-1 -8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-8 -1,-7.62837370825536 -0.987348067229724,-7.25775889681215 -0.975707614760869,-6.88916704597178 -0.966090122894857,-6.52360963603567 -0.959507071933107,-6.16209814730525 -0.956969942177043,-5.80564406008193 -0.959490213928084,-5.45525885466714 -0.968079367487651,-5.11195401136229 -0.983748883157167,-4.77674101046882 -1.00751024123805,-4.45063133228814 -1.04037492203173,-4.13463645712167 -1.08335440583961,-3.82976786527082 -1.13746017296313,-3.53703703703704 -1.2037037037037,-3.25745545272173 -1.28309647836275,-2.99203459262631 -1.37664997724169,-2.74178593705221 -1.48537568064195,-2.50772096630085 -1.61028506886495,-2.29085116067365 -1.75238962221211,-2.09218800047203 -1.91270082098484,-1.91270082098485 -2.09218800047202,-1.75238962221211 -2.29085116067364,-1.61028506886495 -2.50772096630085,-1.48537568064195 -2.74178593705221,-1.37664997724169 -2.99203459262631,-1.28309647836275 -3.25745545272172,-1.2037037037037 -3.53703703703703,-1.13746017296313 -3.82976786527082,-1.08335440583961 -4.13463645712166,-1.04037492203173 -4.45063133228814,-1.00751024123805 -4.77674101046882,-0.983748883157167 -5.11195401136229,-0.968079367487652 -5.45525885466714,-0.959490213928084 -5.80564406008193,-0.956969942177043 -6.16209814730525,-0.959507071933108 -6.52360963603567,-0.966090122894857 -6.88916704597178,-0.975707614760869 -7.25775889681216,-0.987348067229724 -7.62837370825537,-1 -8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):38 # EntityHandle (String) = 226 # POINT Z (-7 -7 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (-7 -7 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):39 # EntityHandle (String) = 227 # POINT Z (4 -4 -5e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (4 -4 -5e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):40 # EntityHandle (String) = 228 # LINESTRING Z (0 0 0,1 -1 -1e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,1 -1 -1e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):41 # EntityHandle (String) = 229 # LINESTRING (1 -1,2 -1,1 -2,1 -1) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (1 -1,2 -1,1 -2,1 -1)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):42 # EntityHandle (String) = 22A # LINESTRING Z (1 -1 -1e-16,1 -2 -2e-16,2 -2 -2e-16,1 -1 -1e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1 -1 -1e-16,1 -2 -2e-16,2 -2 -2e-16,1 -1 -1e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):43 # EntityHandle (String) = 22F # LINESTRING Z (2 -4 -4e-16,2.00487189948035 -4.13951294748825 -4.13951294748825e-16,2.01946386251686 -4.27834620192013 -4.27834620192013e-16,2.04370479853239 -4.41582338163552 -4.41582338163552e-16,2.07747660812336 -4.551274711634 -4.551274711634e-16,2.12061475842818 -4.68404028665134 -4.68404028665134e-16,2.1729090847148 -4.8134732861516 -4.8134732861516e-16,2.23410481428215 -4.93894312557178 -4.93894312557178e-16,2.30390380768715 -5.05983852846641 -5.05983852846641e-16,2.38196601125011 -5.17557050458495 -5.17557050458495e-16,2.46791111376204 -5.28557521937308 -5.28557521937308e-16,2.5613203993227 -5.38931674091799 -5.38931674091799e-16,2.66173878728228 -5.48628965095479 -5.48628965095479e-16,2.76867704934868 -5.57602150721344 -5.57602150721344e-16,2.88161419305851 -5.65807514511008 -5.65807514511008e-16,3.0 -5.73205080756888 -5.73205080756888e-16,3.12325770642185 -5.79758809259833 -5.79758809259833e-16,3.25078681316818 -5.85436770913357 -5.85436770913357e-16,3.38196601125011 -5.90211303259031 -5.90211303259031e-16,3.51615620880066 -5.94059145255199 -5.94059145255199e-16,3.65270364466614 -5.96961550602442 -5.96961550602442e-16,3.79094307346469 -5.98904379073655 -5.98904379073655e-16,3.930201006595 -5.99878165403819 -5.99878165403819e-16,4.069798993405 -5.99878165403819 -5.99878165403819e-16,4.20905692653531 -5.98904379073655 -5.98904379073655e-16,4.34729635533386 -5.96961550602442 -5.96961550602442e-16,4.48384379119934 -5.94059145255199 -5.94059145255199e-16,4.61803398874989 -5.90211303259031 -5.90211303259031e-16,4.74921318683182 -5.85436770913357 -5.85436770913357e-16,4.87674229357815 -5.79758809259833 -5.79758809259833e-16,5.0 -5.73205080756888 -5.73205080756888e-16,5.11838580694149 -5.65807514511008 -5.65807514511008e-16,5.23132295065132 -5.57602150721344 -5.57602150721344e-16,5.33826121271772 -5.48628965095479 -5.48628965095479e-16,5.4386796006773 -5.38931674091799 -5.38931674091799e-16,5.53208888623796 -5.28557521937308 -5.28557521937308e-16,5.61803398874989 -5.17557050458495 -5.17557050458495e-16,5.69609619231285 -5.05983852846641 -5.05983852846641e-16,5.76589518571785 -4.93894312557178 -4.93894312557178e-16,5.8270909152852 -4.8134732861516 -4.8134732861516e-16,5.87938524157182 -4.68404028665134 -4.68404028665134e-16,5.92252339187664 -4.551274711634 -4.551274711634e-16,5.95629520146761 -4.41582338163552 -4.41582338163552e-16,5.98053613748314 -4.27834620192013 -4.27834620192013e-16,5.99512810051965 -4.13951294748825 -4.13951294748825e-16,6 -4 -4e-16,5.99512810051965 -3.86048705251175 -3.86048705251175e-16,5.98053613748314 -3.72165379807987 -3.72165379807987e-16,5.95629520146761 -3.58417661836448 -3.58417661836448e-16,5.92252339187664 -3.448725288366 -3.448725288366e-16, # 5.87938524157182 -3.31595971334866 -3.31595971334866e-16,5.8270909152852 -3.1865267138484 -3.1865267138484e-16,5.76589518571785 -3.06105687442822 -3.06105687442822e-16,5.69609619231285 -2.94016147153359 -2.94016147153359e-16,5.61803398874989 -2.82442949541505 -2.82442949541505e-16,5.53208888623796 -2.71442478062692 -2.71442478062692e-16,5.4386796006773 -2.61068325908201 -2.61068325908201e-16,5.33826121271772 -2.51371034904521 -2.51371034904521e-16,5.23132295065132 -2.42397849278656 -2.42397849278656e-16,5.11838580694149 -2.34192485488992 -2.34192485488992e-16,5.0 -2.26794919243112 -2.26794919243112e-16,4.87674229357816 -2.20241190740167 -2.20241190740167e-16,4.74921318683182 -2.14563229086643 -2.14563229086643e-16,4.61803398874989 -2.09788696740969 -2.09788696740969e-16,4.48384379119934 -2.05940854744801 -2.05940854744801e-16,4.34729635533386 -2.03038449397558 -2.03038449397558e-16,4.20905692653531 -2.01095620926345 -2.01095620926345e-16,4.069798993405 -2.00121834596181 -2.00121834596181e-16,3.930201006595 -2.00121834596181 -2.00121834596181e-16,3.79094307346469 -2.01095620926345 -2.01095620926345e-16,3.65270364466614 -2.03038449397558 -2.03038449397558e-16,3.51615620880067 -2.05940854744801 -2.05940854744801e-16,3.38196601125011 -2.09788696740969 -2.09788696740969e-16,3.25078681316818 -2.14563229086643 -2.14563229086643e-16,3.12325770642185 -2.20241190740167 -2.20241190740167e-16,3.0 -2.26794919243112 -2.26794919243112e-16,2.88161419305851 -2.34192485488992 -2.34192485488992e-16,2.76867704934868 -2.42397849278656 -2.42397849278656e-16,2.66173878728228 -2.51371034904521 -2.51371034904521e-16,2.5613203993227 -2.610683259082 -2.610683259082e-16,2.46791111376204 -2.71442478062692 -2.71442478062692e-16,2.38196601125011 -2.82442949541505 -2.82442949541505e-16,2.30390380768715 -2.94016147153359 -2.94016147153359e-16,2.23410481428215 -3.06105687442822 -3.06105687442822e-16,2.1729090847148 -3.1865267138484 -3.1865267138484e-16,2.12061475842818 -3.31595971334866 -3.31595971334866e-16,2.07747660812336 -3.448725288366 -3.448725288366e-16,2.04370479853239 -3.58417661836448 -3.58417661836448e-16,2.01946386251686 -3.72165379807987 -3.72165379807987e-16,2.00487189948035 -3.86048705251175 -3.86048705251175e-16,2.0 -4.0 -4e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2 -4 -4e-16,2.00487189948035 -4.13951294748825 -4.13951294748825e-16,2.01946386251686 -4.27834620192013 -4.27834620192013e-16,2.04370479853239 -4.41582338163552 -4.41582338163552e-16,2.07747660812336 -4.551274711634 -4.551274711634e-16,2.12061475842818 -4.68404028665134 -4.68404028665134e-16,2.1729090847148 -4.8134732861516 -4.8134732861516e-16,2.23410481428215 -4.93894312557178 -4.93894312557178e-16,2.30390380768715 -5.05983852846641 -5.05983852846641e-16,2.38196601125011 -5.17557050458495 -5.17557050458495e-16,2.46791111376204 -5.28557521937308 -5.28557521937308e-16,2.5613203993227 -5.38931674091799 -5.38931674091799e-16,2.66173878728228 -5.48628965095479 -5.48628965095479e-16,2.76867704934868 -5.57602150721344 -5.57602150721344e-16,2.88161419305851 -5.65807514511008 -5.65807514511008e-16,3.0 -5.73205080756888 -5.73205080756888e-16,3.12325770642185 -5.79758809259833 -5.79758809259833e-16,3.25078681316818 -5.85436770913357 -5.85436770913357e-16,3.38196601125011 -5.90211303259031 -5.90211303259031e-16,3.51615620880066 -5.94059145255199 -5.94059145255199e-16,3.65270364466614 -5.96961550602442 -5.96961550602442e-16,3.79094307346469 -5.98904379073655 -5.98904379073655e-16,3.930201006595 -5.99878165403819 -5.99878165403819e-16,4.069798993405 -5.99878165403819 -5.99878165403819e-16,4.20905692653531 -5.98904379073655 -5.98904379073655e-16,4.34729635533386 -5.96961550602442 -5.96961550602442e-16,4.48384379119934 -5.94059145255199 -5.94059145255199e-16,4.61803398874989 -5.90211303259031 -5.90211303259031e-16,4.74921318683182 -5.85436770913357 -5.85436770913357e-16,4.87674229357815 -5.79758809259833 -5.79758809259833e-16,5.0 -5.73205080756888 -5.73205080756888e-16,5.11838580694149 -5.65807514511008 -5.65807514511008e-16,5.23132295065132 -5.57602150721344 -5.57602150721344e-16,5.33826121271772 -5.48628965095479 -5.48628965095479e-16,5.4386796006773 -5.38931674091799 -5.38931674091799e-16,5.53208888623796 -5.28557521937308 -5.28557521937308e-16,5.61803398874989 -5.17557050458495 -5.17557050458495e-16,5.69609619231285 -5.05983852846641 -5.05983852846641e-16,5.76589518571785 -4.93894312557178 -4.93894312557178e-16,5.8270909152852 -4.8134732861516 -4.8134732861516e-16,5.87938524157182 -4.68404028665134 -4.68404028665134e-16,5.92252339187664 -4.551274711634 -4.551274711634e-16,5.95629520146761 -4.41582338163552 -4.41582338163552e-16,5.98053613748314 -4.27834620192013 -4.27834620192013e-16,5.99512810051965 -4.13951294748825 -4.13951294748825e-16,6 -4 -4e-16,5.99512810051965 -3.86048705251175 -3.86048705251175e-16,5.98053613748314 -3.72165379807987 -3.72165379807987e-16,5.95629520146761 -3.58417661836448 -3.58417661836448e-16,5.92252339187664 -3.448725288366 -3.448725288366e-16,5.87938524157182 -3.31595971334866 -3.31595971334866e-16,5.8270909152852 -3.1865267138484 -3.1865267138484e-16,5.76589518571785 -3.06105687442822 -3.06105687442822e-16,5.69609619231285 -2.94016147153359 -2.94016147153359e-16,5.61803398874989 -2.82442949541505 -2.82442949541505e-16,5.53208888623796 -2.71442478062692 -2.71442478062692e-16,5.4386796006773 -2.61068325908201 -2.61068325908201e-16,5.33826121271772 -2.51371034904521 -2.51371034904521e-16,' + '5.23132295065132 -2.42397849278656 -2.42397849278656e-16,5.11838580694149 -2.34192485488992 -2.34192485488992e-16,5.0 -2.26794919243112 -2.26794919243112e-16,4.87674229357816 -2.20241190740167 -2.20241190740167e-16,4.74921318683182 -2.14563229086643 -2.14563229086643e-16,4.61803398874989 -2.09788696740969 -2.09788696740969e-16,4.48384379119934 -2.05940854744801 -2.05940854744801e-16,4.34729635533386 -2.03038449397558 -2.03038449397558e-16,4.20905692653531 -2.01095620926345 -2.01095620926345e-16,4.069798993405 -2.00121834596181 -2.00121834596181e-16,3.930201006595 -2.00121834596181 -2.00121834596181e-16,3.79094307346469 -2.01095620926345 -2.01095620926345e-16,3.65270364466614 -2.03038449397558 -2.03038449397558e-16,3.51615620880067 -2.05940854744801 -2.05940854744801e-16,3.38196601125011 -2.09788696740969 -2.09788696740969e-16,3.25078681316818 -2.14563229086643 -2.14563229086643e-16,3.12325770642185 -2.20241190740167 -2.20241190740167e-16,3.0 -2.26794919243112 -2.26794919243112e-16,2.88161419305851 -2.34192485488992 -2.34192485488992e-16,2.76867704934868 -2.42397849278656 -2.42397849278656e-16,2.66173878728228 -2.51371034904521 -2.51371034904521e-16,2.5613203993227 -2.610683259082 -2.610683259082e-16,2.46791111376204 -2.71442478062692 -2.71442478062692e-16,2.38196601125011 -2.82442949541505 -2.82442949541505e-16,2.30390380768715 -2.94016147153359 -2.94016147153359e-16,2.23410481428215 -3.06105687442822 -3.06105687442822e-16,2.1729090847148 -3.1865267138484 -3.1865267138484e-16,2.12061475842818 -3.31595971334866 -3.31595971334866e-16,2.07747660812336 -3.448725288366 -3.448725288366e-16,2.04370479853239 -3.58417661836448 -3.58417661836448e-16,2.01946386251686 -3.72165379807987 -3.72165379807987e-16,2.00487189948035 -3.86048705251175 -3.86048705251175e-16,2.0 -4.0 -4e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):44 # EntityHandle (String) = 230 # LINESTRING Z (2 -4 -5e-16,2.00487189948035 -4.06975647374412 -5.06975647374413e-16,2.01946386251686 -4.13917310096007 -5.13917310096007e-16,2.04370479853239 -4.20791169081776 -5.20791169081776e-16,2.07747660812336 -4.275637355817 -5.275637355817e-16,2.12061475842818 -4.34202014332567 -5.34202014332567e-16,2.1729090847148 -4.4067366430758 -5.4067366430758e-16,2.23410481428215 -4.46947156278589 -5.46947156278589e-16,2.30390380768715 -4.52991926423321 -5.52991926423321e-16,2.38196601125011 -4.58778525229247 -5.58778525229247e-16,2.46791111376204 -4.64278760968654 -5.64278760968654e-16,2.5613203993227 -4.694658370459 -5.694658370459e-16,2.66173878728228 -4.74314482547739 -5.7431448254774e-16,2.76867704934868 -4.78801075360672 -5.78801075360672e-16,2.88161419305851 -4.82903757255504 -5.82903757255504e-16,3.0 -4.86602540378444 -5.86602540378444e-16,3.12325770642185 -4.89879404629917 -5.89879404629917e-16,3.25078681316818 -4.92718385456679 -5.92718385456679e-16,3.38196601125011 -4.95105651629515 -5.95105651629515e-16,3.51615620880067 -4.970295726276 -5.970295726276e-16,3.65270364466614 -4.98480775301221 -5.98480775301221e-16,3.79094307346469 -4.99452189536827 -5.99452189536827e-16,3.930201006595 -4.9993908270191 -5.9993908270191e-16,4.069798993405 -4.9993908270191 -5.9993908270191e-16,4.20905692653531 -4.99452189536827 -5.99452189536827e-16,4.34729635533386 -4.98480775301221 -5.98480775301221e-16,4.48384379119934 -4.970295726276 -5.970295726276e-16,4.61803398874989 -4.95105651629515 -5.95105651629515e-16,4.74921318683182 -4.92718385456679 -5.92718385456679e-16,4.87674229357816 -4.89879404629917 -5.89879404629917e-16,5.0 -4.86602540378444 -5.86602540378444e-16,5.11838580694149 -4.82903757255504 -5.82903757255504e-16,5.23132295065132 -4.78801075360672 -5.78801075360672e-16,5.33826121271772 -4.74314482547739 -5.74314482547739e-16,5.4386796006773 -4.694658370459 -5.694658370459e-16,5.53208888623796 -4.64278760968654 -5.64278760968654e-16,5.61803398874989 -4.58778525229247 -5.58778525229247e-16,5.69609619231285 -4.5299192642332 -5.52991926423321e-16,5.76589518571785 -4.46947156278589 -5.46947156278589e-16,5.8270909152852 -4.4067366430758 -5.4067366430758e-16,5.87938524157182 -4.34202014332567 -5.34202014332567e-16,5.92252339187664 -4.275637355817 -5.275637355817e-16,5.95629520146761 -4.20791169081776 -5.20791169081776e-16,5.98053613748314 -4.13917310096007 -5.13917310096007e-16,5.99512810051965 -4.06975647374412 -5.06975647374413e-16,6 -4 -5e-16,5.99512810051965 -3.93024352625587 -4.93024352625588e-16,5.98053613748314 -3.86082689903993 -4.86082689903993e-16,5.95629520146761 -3.79208830918224 -4.79208830918224e-16,5.92252339187664 -3.724362644183 -4.724362644183e-16,5.87938524157182 -3.65797985667433 -4.65797985667433e-16,5.8270909152852 -3.5932633569242 -4.5932633569242e-16,5.76589518571785 -3.53052843721411 -4.53052843721411e-16, # 5.69609619231285 -3.4700807357668 -4.4700807357668e-16,5.61803398874989 -3.41221474770753 -4.41221474770753e-16,5.53208888623796 -3.35721239031346 -4.35721239031346e-16,5.4386796006773 -3.305341629541 -4.305341629541e-16,5.33826121271772 -3.25685517452261 -4.25685517452261e-16,5.23132295065132 -3.21198924639328 -4.21198924639328e-16,5.11838580694149 -3.17096242744496 -4.17096242744496e-16,5.0 -3.13397459621556 -4.13397459621556e-16,4.87674229357815 -3.10120595370083 -4.10120595370083e-16,4.74921318683182 -3.07281614543321 -4.07281614543321e-16,4.61803398874989 -3.04894348370485 -4.04894348370485e-16,4.48384379119934 -3.029704273724 -4.029704273724e-16,4.34729635533386 -3.01519224698779 -4.01519224698779e-16,4.20905692653531 -3.00547810463173 -4.00547810463173e-16,4.069798993405 -3.0006091729809 -4.0006091729809e-16,3.930201006595 -3.0006091729809 -4.0006091729809e-16,3.79094307346469 -3.00547810463173 -4.00547810463173e-16,3.65270364466614 -3.01519224698779 -4.01519224698779e-16,3.51615620880066 -3.029704273724 -4.029704273724e-16,3.38196601125011 -3.04894348370485 -4.04894348370485e-16,3.25078681316818 -3.07281614543321 -4.07281614543321e-16,3.12325770642185 -3.10120595370083 -4.10120595370083e-16,3.0 -3.13397459621556 -4.13397459621556e-16,2.88161419305851 -3.17096242744496 -4.17096242744496e-16,2.76867704934868 -3.21198924639328 -4.21198924639328e-16,2.66173878728228 -3.25685517452261 -4.25685517452261e-16,2.5613203993227 -3.305341629541 -4.305341629541e-16,2.46791111376204 -3.35721239031346 -4.35721239031346e-16,2.38196601125011 -3.41221474770753 -4.41221474770753e-16,2.30390380768715 -3.4700807357668 -4.4700807357668e-16,2.23410481428215 -3.53052843721411 -4.53052843721411e-16,2.1729090847148 -3.5932633569242 -4.5932633569242e-16,2.12061475842818 -3.65797985667433 -4.65797985667433e-16,2.07747660812336 -3.724362644183 -4.724362644183e-16,2.04370479853239 -3.79208830918224 -4.79208830918224e-16,2.01946386251686 -3.86082689903993 -4.86082689903993e-16,2.00487189948035 -3.93024352625587 -4.93024352625588e-16,2 -4 -5e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2 -4 -5e-16,2.00487189948035 -4.06975647374412 -5.06975647374413e-16,2.01946386251686 -4.13917310096007 -5.13917310096007e-16,2.04370479853239 -4.20791169081776 -5.20791169081776e-16,2.07747660812336 -4.275637355817 -5.275637355817e-16,2.12061475842818 -4.34202014332567 -5.34202014332567e-16,2.1729090847148 -4.4067366430758 -5.4067366430758e-16,2.23410481428215 -4.46947156278589 -5.46947156278589e-16,2.30390380768715 -4.52991926423321 -5.52991926423321e-16,2.38196601125011 -4.58778525229247 -5.58778525229247e-16,2.46791111376204 -4.64278760968654 -5.64278760968654e-16,2.5613203993227 -4.694658370459 -5.694658370459e-16,2.66173878728228 -4.74314482547739 -5.7431448254774e-16,2.76867704934868 -4.78801075360672 -5.78801075360672e-16,2.88161419305851 -4.82903757255504 -5.82903757255504e-16,3.0 -4.86602540378444 -5.86602540378444e-16,3.12325770642185 -4.89879404629917 -5.89879404629917e-16,3.25078681316818 -4.92718385456679 -5.92718385456679e-16,3.38196601125011 -4.95105651629515 -5.95105651629515e-16,3.51615620880067 -4.970295726276 -5.970295726276e-16,3.65270364466614 -4.98480775301221 -5.98480775301221e-16,3.79094307346469 -4.99452189536827 -5.99452189536827e-16,3.930201006595 -4.9993908270191 -5.9993908270191e-16,4.069798993405 -4.9993908270191 -5.9993908270191e-16,4.20905692653531 -4.99452189536827 -5.99452189536827e-16,4.34729635533386 -4.98480775301221 -5.98480775301221e-16,4.48384379119934 -4.970295726276 -5.970295726276e-16,4.61803398874989 -4.95105651629515 -5.95105651629515e-16,4.74921318683182 -4.92718385456679 -5.92718385456679e-16,4.87674229357816 -4.89879404629917 -5.89879404629917e-16,5.0 -4.86602540378444 -5.86602540378444e-16,5.11838580694149 -4.82903757255504 -5.82903757255504e-16,5.23132295065132 -4.78801075360672 -5.78801075360672e-16,5.33826121271772 -4.74314482547739 -5.74314482547739e-16,5.4386796006773 -4.694658370459 -5.694658370459e-16,5.53208888623796 -4.64278760968654 -5.64278760968654e-16,5.61803398874989 -4.58778525229247 -5.58778525229247e-16,5.69609619231285 -4.5299192642332 -5.52991926423321e-16,5.76589518571785 -4.46947156278589 -5.46947156278589e-16,5.8270909152852 -4.4067366430758 -5.4067366430758e-16,5.87938524157182 -4.34202014332567 -5.34202014332567e-16,5.92252339187664 -4.275637355817 -5.275637355817e-16,5.95629520146761 -4.20791169081776 -5.20791169081776e-16,5.98053613748314 -4.13917310096007 -5.13917310096007e-16,5.99512810051965 -4.06975647374412 -5.06975647374413e-16,6 -4 -5e-16,5.99512810051965 -3.93024352625587 -4.93024352625588e-16,5.98053613748314 -3.86082689903993 -4.86082689903993e-16,5.95629520146761 -3.79208830918224 -4.79208830918224e-16,5.92252339187664 -3.724362644183 -4.724362644183e-16,5.87938524157182 -3.65797985667433 -4.65797985667433e-16,5.8270909152852 -3.5932633569242 -4.5932633569242e-16,5.76589518571785 -3.53052843721411 -4.53052843721411e-16,5.69609619231285 -3.4700807357668 -4.4700807357668e-16,5.61803398874989 -3.41221474770753 -4.41221474770753e-16,' + '5.53208888623796 -3.35721239031346 -4.35721239031346e-16,5.4386796006773 -3.305341629541 -4.305341629541e-16,5.33826121271772 -3.25685517452261 -4.25685517452261e-16,5.23132295065132 -3.21198924639328 -4.21198924639328e-16,5.11838580694149 -3.17096242744496 -4.17096242744496e-16,5.0 -3.13397459621556 -4.13397459621556e-16,4.87674229357815 -3.10120595370083 -4.10120595370083e-16,4.74921318683182 -3.07281614543321 -4.07281614543321e-16,4.61803398874989 -3.04894348370485 -4.04894348370485e-16,4.48384379119934 -3.029704273724 -4.029704273724e-16,4.34729635533386 -3.01519224698779 -4.01519224698779e-16,4.20905692653531 -3.00547810463173 -4.00547810463173e-16,4.069798993405 -3.0006091729809 -4.0006091729809e-16,3.930201006595 -3.0006091729809 -4.0006091729809e-16,3.79094307346469 -3.00547810463173 -4.00547810463173e-16,3.65270364466614 -3.01519224698779 -4.01519224698779e-16,3.51615620880066 -3.029704273724 -4.029704273724e-16,3.38196601125011 -3.04894348370485 -4.04894348370485e-16,3.25078681316818 -3.07281614543321 -4.07281614543321e-16,3.12325770642185 -3.10120595370083 -4.10120595370083e-16,3.0 -3.13397459621556 -4.13397459621556e-16,2.88161419305851 -3.17096242744496 -4.17096242744496e-16,2.76867704934868 -3.21198924639328 -4.21198924639328e-16,2.66173878728228 -3.25685517452261 -4.25685517452261e-16,2.5613203993227 -3.305341629541 -4.305341629541e-16,2.46791111376204 -3.35721239031346 -4.35721239031346e-16,2.38196601125011 -3.41221474770753 -4.41221474770753e-16,2.30390380768715 -3.4700807357668 -4.4700807357668e-16,2.23410481428215 -3.53052843721411 -4.53052843721411e-16,2.1729090847148 -3.5932633569242 -4.5932633569242e-16,2.12061475842818 -3.65797985667433 -4.65797985667433e-16,2.07747660812336 -3.724362644183 -4.724362644183e-16,2.04370479853239 -3.79208830918224 -4.79208830918224e-16,2.01946386251686 -3.86082689903993 -4.86082689903993e-16,2.00487189948035 -3.93024352625587 -4.93024352625588e-16,2 -4 -5e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):45 # EntityHandle (String) = 231 # LINESTRING Z (2 -2 -2e-16,1.96657794502105 -2.03582232791524 -2.03582232791524e-16,1.93571660708646 -2.07387296203834 -2.07387296203834e-16,1.90756413746468 -2.11396923855472 -2.11396923855472e-16,1.88225568337755 -2.15591867344963 -2.15591867344963e-16,1.85991273921989 -2.19951988653655 -2.19951988653655e-16,1.84064256332004 -2.24456356819194 -2.24456356819194e-16,1.8245376630414 -2.29083348415575 -2.29083348415575e-16,1.81167535069652 -2.33810751357387 -2.33810751357387e-16,1.80211737240583 -2.38615871529951 -2.38615871529951e-16,1.79590961168258 -2.43475641733454 -2.43475641733454e-16,1.79308186916688 -2.48366732418105 -2.48366732418105e-16,1.79364771956639 -2.53265663678705 -2.53265663678705e-16,1.79760444649032 -2.58148917971011 -2.58148917971011e-16,1.80493305548955 -2.62993053008786 -2.62993053008786e-16,1.81559836524041 -2.67774814299567 -2.67774814299567e-16,1.8295491764342 -2.72471246778926 -2.72471246778926e-16,1.84671851756181 -2.7705980500731 -2.7705980500731e-16,1.86702396641357 -2.81518461400453 -2.81518461400453e-16,1.89036804575079 -2.85825811973811 -2.85825811973811e-16,1.91663869124976 -2.89961179093367 -2.89961179093367e-16,1.94570978947168 -2.93904710739563 -2.93904710739563e-16,1.97744178327594 -2.97637475807832 -2.97637475807832e-16,2.01168234177068 -3.01141554988232 -3.01141554988232e-16,2.04826709158413 -3.04400126787917 -3.04400126787917e-16,2.08702040594658 -3.07397548283483 -3.07397548283483e-16,2.12775624779472 -3.10119430215541 -3.10119430215541e-16,2.1702790628511 -3.12552706065018 -3.12552706065018e-16,2.2143847183914 -3.14685694779575 -3.14685694779575e-16,2.25986148319297 -3.16508156849045 -3.16508156849045e-16,2.30649104396024 -3.18011343460661 -3.18011343460661e-16,2.35404955334774 -3.1918803849814 -3.1918803849814e-16,2.40230870454951 -3.20032593182975 -3.20032593182975e-16,2.45103682729644 -3.2054095319166 -3.2054095319166e-16,2.5 -3.20710678118655 -3.20710678118655e-16,2.54896317270356 -3.2054095319166 -3.2054095319166e-16,2.59769129545049 -3.20032593182975 -3.20032593182975e-16,2.64595044665226 -3.1918803849814 -3.1918803849814e-16,2.69350895603976 -3.18011343460661 -3.18011343460661e-16,2.74013851680703 -3.16508156849045 -3.16508156849045e-16,2.7856152816086 -3.14685694779575 -3.14685694779575e-16,2.8297209371489 -3.12552706065018 -3.12552706065018e-16,2.87224375220528 -3.10119430215541 -3.10119430215541e-16,2.91297959405342 -3.07397548283483 -3.07397548283483e-16,2.95173290841587 -3.04400126787917 -3.04400126787917e-16,2.98831765822932 -3.01141554988232 -3.01141554988232e-16,3.02255821672406 -2.97637475807832 -2.97637475807832e-16,3.05429021052832 -2.93904710739563 -2.93904710739563e-16,3.08336130875024 -2.89961179093367 -2.89961179093367e-16,3.10963195424921 -2.85825811973811 -2.85825811973811e-16,3.13297603358643 -2.81518461400453 -2.81518461400453e-16,3.15328148243819 -2.7705980500731 -2.7705980500731e-16,3.1704508235658 -2.72471246778926 -2.72471246778926e-16,3.18440163475959 -2.67774814299567 -2.67774814299567e-16,3.19506694451045 -2.62993053008786 -2.62993053008786e-16,3.20239555350968 -2.58148917971011 -2.58148917971011e-16,3.20635228043361 -2.53265663678705 -2.53265663678705e-16,3.20691813083312 -2.48366732418105 -2.48366732418105e-16,3.20409038831742 -2.43475641733454 -2.43475641733454e-16,3.19788262759417 -2.38615871529951 -2.38615871529951e-16,3.18832464930348 -2.33810751357387 -2.33810751357387e-16,3.1754623369586 -2.29083348415575 -2.29083348415575e-16,3.15935743667996 -2.24456356819194 -2.24456356819194e-16,3.14008726078011 -2.19951988653655 -2.19951988653655e-16,3.11774431662245 -2.15591867344963 -2.15591867344963e-16,3.09243586253532 -2.11396923855472 -2.11396923855471e-16,3.06428339291354 -2.07387296203834 -2.07387296203834e-16,3.03342205497895 -2.03582232791524 -2.03582232791524e-16,3 -2 -2e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2 -2 -2e-16,1.96657794502105 -2.03582232791524 -2.03582232791524e-16,1.93571660708646 -2.07387296203834 -2.07387296203834e-16,1.90756413746468 -2.11396923855472 -2.11396923855472e-16,1.88225568337755 -2.15591867344963 -2.15591867344963e-16,1.85991273921989 -2.19951988653655 -2.19951988653655e-16,1.84064256332004 -2.24456356819194 -2.24456356819194e-16,1.8245376630414 -2.29083348415575 -2.29083348415575e-16,1.81167535069652 -2.33810751357387 -2.33810751357387e-16,1.80211737240583 -2.38615871529951 -2.38615871529951e-16,1.79590961168258 -2.43475641733454 -2.43475641733454e-16,1.79308186916688 -2.48366732418105 -2.48366732418105e-16,1.79364771956639 -2.53265663678705 -2.53265663678705e-16,1.79760444649032 -2.58148917971011 -2.58148917971011e-16,1.80493305548955 -2.62993053008786 -2.62993053008786e-16,1.81559836524041 -2.67774814299567 -2.67774814299567e-16,1.8295491764342 -2.72471246778926 -2.72471246778926e-16,1.84671851756181 -2.7705980500731 -2.7705980500731e-16,1.86702396641357 -2.81518461400453 -2.81518461400453e-16,1.89036804575079 -2.85825811973811 -2.85825811973811e-16,1.91663869124976 -2.89961179093367 -2.89961179093367e-16,1.94570978947168 -2.93904710739563 -2.93904710739563e-16,1.97744178327594 -2.97637475807832 -2.97637475807832e-16,2.01168234177068 -3.01141554988232 -3.01141554988232e-16,2.04826709158413 -3.04400126787917 -3.04400126787917e-16,2.08702040594658 -3.07397548283483 -3.07397548283483e-16,2.12775624779472 -3.10119430215541 -3.10119430215541e-16,2.1702790628511 -3.12552706065018 -3.12552706065018e-16,2.2143847183914 -3.14685694779575 -3.14685694779575e-16,2.25986148319297 -3.16508156849045 -3.16508156849045e-16,2.30649104396024 -3.18011343460661 -3.18011343460661e-16,2.35404955334774 -3.1918803849814 -3.1918803849814e-16,2.40230870454951 -3.20032593182975 -3.20032593182975e-16,2.45103682729644 -3.2054095319166 -3.2054095319166e-16,2.5 -3.20710678118655 -3.20710678118655e-16,2.54896317270356 -3.2054095319166 -3.2054095319166e-16,2.59769129545049 -3.20032593182975 -3.20032593182975e-16,2.64595044665226 -3.1918803849814 -3.1918803849814e-16,2.69350895603976 -3.18011343460661 -3.18011343460661e-16,2.74013851680703 -3.16508156849045 -3.16508156849045e-16,2.7856152816086 -3.14685694779575 -3.14685694779575e-16,2.8297209371489 -3.12552706065018 -3.12552706065018e-16,2.87224375220528 -3.10119430215541 -3.10119430215541e-16,2.91297959405342 -3.07397548283483 -3.07397548283483e-16,2.95173290841587 -3.04400126787917 -3.04400126787917e-16,2.98831765822932 -3.01141554988232 -3.01141554988232e-16,3.02255821672406 -2.97637475807832 -2.97637475807832e-16,3.05429021052832 -2.93904710739563 -2.93904710739563e-16,3.08336130875024 -2.89961179093367 -2.89961179093367e-16,3.10963195424921 -2.85825811973811 -2.85825811973811e-16,3.13297603358643 -2.81518461400453 -2.81518461400453e-16,3.15328148243819 -2.7705980500731 -2.7705980500731e-16,3.1704508235658 -2.72471246778926 -2.72471246778926e-16,3.18440163475959 -2.67774814299567 -2.67774814299567e-16,3.19506694451045 -2.62993053008786 -2.62993053008786e-16,3.20239555350968 -2.58148917971011 -2.58148917971011e-16,3.20635228043361 -2.53265663678705 -2.53265663678705e-16,3.20691813083312 -2.48366732418105 -2.48366732418105e-16,3.20409038831742 -2.43475641733454 -2.43475641733454e-16,3.19788262759417 -2.38615871529951 -2.38615871529951e-16,3.18832464930348 -2.33810751357387 -2.33810751357387e-16,3.1754623369586 -2.29083348415575 -2.29083348415575e-16,3.15935743667996 -2.24456356819194 -2.24456356819194e-16,3.14008726078011 -2.19951988653655 -2.19951988653655e-16,3.11774431662245 -2.15591867344963 -2.15591867344963e-16,3.09243586253532 -2.11396923855472 -2.11396923855471e-16,3.06428339291354 -2.07387296203834 -2.07387296203834e-16,3.03342205497895 -2.03582232791524 -2.03582232791524e-16,3 -2 -2e-16)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):46 # EntityHandle (String) = 232 # POLYGON Z ((1 -2 -2e-16,1 -3 -4e-16,2 -3 -4e-16,2 -2 -2e-16,1 -2 -2e-16)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((1 -2 -2e-16,1 -3 -4e-16,2 -3 -4e-16,2 -2 -2e-16,1 -2 -2e-16))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):47 # EntityHandle (String) = 233 # POLYGON ((3 -4,4 -4,4 -3,3 -3,3 -4)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((3 -4,4 -4,4 -3,3 -3,3 -4))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):48 # EntityHandle (String) = 235 # POLYGON ((8 -8,9 -8,9 -9,8 -9,8 -8)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((8 -8,9 -8,9 -9,8 -9,8 -8))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):49 # EntityHandle (String) = 236 # LINESTRING (2 -2,2.15384615384615 -2.15384615384615,2.30769230769231 -2.30769230769231,2.46153846153846 -2.46153846153846,2.61538461538461 -2.61538461538461,2.76923076923077 -2.76923076923077,2.92307692307692 -2.92307692307692,3.07692307692308 -3.07692307692308,3.23076923076923 -3.23076923076923,3.38461538461538 -3.38461538461538,3.53846153846154 -3.53846153846154,3.69230769230769 -3.69230769230769,3.84615384615385 -3.84615384615385,4 -4,4.15384615384615 -4.15384615384615,4.30769230769231 -4.30769230769231,4.46153846153846 -4.46153846153846,4.61538461538462 -4.61538461538462,4.76923076923077 -4.76923076923077,4.92307692307692 -4.92307692307692,5.07692307692308 -5.07692307692308,5.23076923076923 -5.23076923076923,5.38461538461538 -5.38461538461538,5.53846153846154 -5.53846153846154,5.69230769230769 -5.69230769230769,5.84615384615385 -5.84615384615385,6.0 -6.0,6.15384615384615 -6.15384615384615,6.30769230769231 -6.30769230769231,6.46153846153846 -6.46153846153846,6.61538461538462 -6.61538461538462,6.76923076923077 -6.76923076923077,6.92307692307692 -6.92307692307692,7.07692307692308 -7.07692307692308,7.23076923076923 -7.23076923076923,7.38461538461539 -7.38461538461539,7.53846153846154 -7.53846153846154,7.69230769230769 -7.69230769230769,7.84615384615385 -7.84615384615385,8 -8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 -2,2.15384615384615 -2.15384615384615,2.30769230769231 -2.30769230769231,2.46153846153846 -2.46153846153846,2.61538461538461 -2.61538461538461,2.76923076923077 -2.76923076923077,2.92307692307692 -2.92307692307692,3.07692307692308 -3.07692307692308,3.23076923076923 -3.23076923076923,3.38461538461538 -3.38461538461538,3.53846153846154 -3.53846153846154,3.69230769230769 -3.69230769230769,3.84615384615385 -3.84615384615385,4 -4,4.15384615384615 -4.15384615384615,4.30769230769231 -4.30769230769231,4.46153846153846 -4.46153846153846,4.61538461538462 -4.61538461538462,4.76923076923077 -4.76923076923077,4.92307692307692 -4.92307692307692,5.07692307692308 -5.07692307692308,5.23076923076923 -5.23076923076923,5.38461538461538 -5.38461538461538,5.53846153846154 -5.53846153846154,5.69230769230769 -5.69230769230769,5.84615384615385 -5.84615384615385,6.0 -6.0,6.15384615384615 -6.15384615384615,6.30769230769231 -6.30769230769231,6.46153846153846 -6.46153846153846,6.61538461538462 -6.61538461538462,6.76923076923077 -6.76923076923077,6.92307692307692 -6.92307692307692,7.07692307692308 -7.07692307692308,7.23076923076923 -7.23076923076923,7.38461538461539 -7.38461538461539,7.53846153846154 -7.53846153846154,7.69230769230769 -7.69230769230769,7.84615384615385 -7.84615384615385,8 -8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):50 # EntityHandle (String) = 237 # LINESTRING (8 -1,7.62837370825536 -0.987348067229724,7.25775889681215 -0.975707614760869,6.88916704597178 -0.966090122894857,6.52360963603567 -0.959507071933107,6.16209814730525 -0.956969942177043,5.80564406008193 -0.959490213928084,5.45525885466714 -0.968079367487651,5.11195401136229 -0.983748883157167,4.77674101046882 -1.00751024123805,4.45063133228814 -1.04037492203173,4.13463645712167 -1.08335440583961,3.82976786527082 -1.13746017296313,3.53703703703704 -1.2037037037037,3.25745545272173 -1.28309647836275,2.99203459262631 -1.37664997724169,2.74178593705221 -1.48537568064195,2.50772096630085 -1.61028506886495,2.29085116067365 -1.75238962221211,2.09218800047203 -1.91270082098484,1.91270082098485 -2.09218800047202,1.75238962221211 -2.29085116067364,1.61028506886495 -2.50772096630085,1.48537568064195 -2.74178593705221,1.37664997724169 -2.99203459262631,1.28309647836275 -3.25745545272172,1.2037037037037 -3.53703703703703,1.13746017296313 -3.82976786527082,1.08335440583961 -4.13463645712166,1.04037492203173 -4.45063133228814,1.00751024123805 -4.77674101046882,0.983748883157167 -5.11195401136229,0.968079367487652 -5.45525885466714,0.959490213928084 -5.80564406008193,0.956969942177043 -6.16209814730525,0.959507071933108 -6.52360963603567,0.966090122894857 -6.88916704597178,0.975707614760869 -7.25775889681216,0.987348067229724 -7.62837370825537,1 -8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (8 -1,7.62837370825536 -0.987348067229724,7.25775889681215 -0.975707614760869,6.88916704597178 -0.966090122894857,6.52360963603567 -0.959507071933107,6.16209814730525 -0.956969942177043,5.80564406008193 -0.959490213928084,5.45525885466714 -0.968079367487651,5.11195401136229 -0.983748883157167,4.77674101046882 -1.00751024123805,4.45063133228814 -1.04037492203173,4.13463645712167 -1.08335440583961,3.82976786527082 -1.13746017296313,3.53703703703704 -1.2037037037037,3.25745545272173 -1.28309647836275,2.99203459262631 -1.37664997724169,2.74178593705221 -1.48537568064195,2.50772096630085 -1.61028506886495,2.29085116067365 -1.75238962221211,2.09218800047203 -1.91270082098484,1.91270082098485 -2.09218800047202,1.75238962221211 -2.29085116067364,1.61028506886495 -2.50772096630085,1.48537568064195 -2.74178593705221,1.37664997724169 -2.99203459262631,1.28309647836275 -3.25745545272172,1.2037037037037 -3.53703703703703,1.13746017296313 -3.82976786527082,1.08335440583961 -4.13463645712166,1.04037492203173 -4.45063133228814,1.00751024123805 -4.77674101046882,0.983748883157167 -5.11195401136229,0.968079367487652 -5.45525885466714,0.959490213928084 -5.80564406008193,0.956969942177043 -6.16209814730525,0.959507071933108 -6.52360963603567,0.966090122894857 -6.88916704597178,0.975707614760869 -7.25775889681216,0.987348067229724 -7.62837370825537,1 -8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):51 # EntityHandle (String) = 238 # POINT Z (7 -7 -7e-16) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (7 -7 -7e-16)'): feat.DumpReadable() pytest.fail() ############################################################################### # OCS2WCS transformations 2. Also test RawCodeValues def test_ogr_dxf_32(): gdal.SetConfigOption('DXF_INCLUDE_RAW_CODE_VALUES', 'TRUE') ds = ogr.Open('data/ocs2wcs2.dxf') gdal.SetConfigOption('DXF_INCLUDE_RAW_CODE_VALUES', None) lyr = ds.GetLayer(0) # INFO: Open of `ocs2wcs2.dxf' using driver `DXF' successful. # OGRFeature(entities):0 # EntityHandle (String) = 1B1 # POINT Z (4 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (4 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):1 # EntityHandle (String) = 1B2 # LINESTRING Z (0 0 0,1 1 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,1 1 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):2 # EntityHandle (String) = 1B3 # LINESTRING (1 1,2 1,1 2,1 1) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (1 1,2 1,1 2,1 1)') \ or feat.GetField('RawCodeValues') != ['330 1F','43 0.0']: feat.DumpReadable() pytest.fail() # OGRFeature(entities):3 # EntityHandle (String) = 1B4 # LINESTRING Z (1 1 0,1 2 0,2 2 0,1 1 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1 1 0,1 2 0,2 2 0,1 1 0)') \ or feat.GetField('RawCodeValues') != ['330 1F','66 1','10 0.0','20 0.0','30 0.0']: feat.DumpReadable() pytest.fail() # OGRFeature(entities):4 # EntityHandle (String) = 1B9 # LINESTRING Z (6 4 0,5.99512810051965 3.86048705251175 0,5.98053613748314 3.72165379807987 0,5.95629520146761 3.58417661836448 0,5.92252339187664 3.448725288366 0,5.87938524157182 3.31595971334866 0,5.8270909152852 3.1865267138484 0,5.76589518571785 3.06105687442822 0,5.69609619231285 2.94016147153359 0,5.61803398874989 2.82442949541505 0,5.53208888623796 2.71442478062692 0,5.4386796006773 2.61068325908201 0,5.33826121271772 2.51371034904521 0,5.23132295065132 2.42397849278656 0,5.11838580694149 2.34192485488992 0,5.0 2.26794919243112 0,4.87674229357815 2.20241190740167 0,4.74921318683182 2.14563229086643 0,4.61803398874989 2.09788696740969 0,4.48384379119934 2.05940854744801 0,4.34729635533386 2.03038449397558 0,4.20905692653531 2.01095620926345 0,4.069798993405 2.00121834596181 0,3.930201006595 2.00121834596181 0,3.79094307346469 2.01095620926345 0,3.65270364466614 2.03038449397558 0,3.51615620880066 2.05940854744801 0,3.38196601125011 2.09788696740969 0,3.25078681316818 2.14563229086643 0,3.12325770642185 2.20241190740167 0,3.0 2.26794919243112 0,2.88161419305851 2.34192485488992 0,2.76867704934868 2.42397849278656 0,2.66173878728228 2.51371034904521 0,2.5613203993227 2.61068325908201 0,2.46791111376204 2.71442478062692 0,2.38196601125011 2.82442949541505 0,2.30390380768715 2.94016147153359 0,2.23410481428215 3.06105687442822 0,2.1729090847148 3.1865267138484 0,2.12061475842818 3.31595971334866 0,2.07747660812336 3.448725288366 0,2.04370479853239 3.58417661836448 0,2.01946386251686 3.72165379807987 0,2.00487189948035 3.86048705251175 0,2.0 4.0 0,2.00487189948035 4.13951294748825 0,2.01946386251686 4.27834620192013 0,2.04370479853239 4.41582338163552 0,2.07747660812336 4.551274711634 0,2.12061475842818 4.68404028665134 0,2.1729090847148 4.8134732861516 0,2.23410481428215 4.93894312557178 0,2.30390380768715 5.05983852846641 0,2.38196601125011 5.17557050458495 0,2.46791111376204 5.28557521937308 0,2.5613203993227 5.38931674091799 0,2.66173878728228 5.48628965095479 0,2.76867704934868 5.57602150721344 0,2.88161419305851 5.65807514511008 0,3.0 5.73205080756888 0,3.12325770642184 5.79758809259833 0,3.25078681316818 5.85436770913357 0,3.38196601125011 5.90211303259031 0,3.51615620880066 5.94059145255199 0,3.65270364466614 5.96961550602442 0,3.79094307346469 5.98904379073655 0,3.930201006595 5.99878165403819 0,4.069798993405 5.99878165403819 0,4.20905692653531 5.98904379073655 0,4.34729635533386 5.96961550602442 0,4.48384379119933 5.94059145255199 0,4.61803398874989 5.90211303259031 0,4.74921318683182 5.85436770913357 0,4.87674229357815 5.79758809259833 0,5.0 5.73205080756888 0,5.11838580694149 5.65807514511008 0,5.23132295065132 5.57602150721344 0,5.33826121271772 5.48628965095479 0,5.4386796006773 5.389316740918 0,5.53208888623796 5.28557521937308 0,5.61803398874989 5.17557050458495 0,5.69609619231285 5.05983852846641 0,5.76589518571785 4.93894312557178 0,5.8270909152852 4.8134732861516 0,5.87938524157182 4.68404028665134 0,5.92252339187664 4.551274711634 0,5.95629520146761 4.41582338163552 0,5.98053613748314 4.27834620192013 0,5.99512810051965 4.13951294748825 0,6.0 4.0 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (6 4 0,5.99512810051965 3.86048705251175 0,5.98053613748314 3.72165379807987 0,5.95629520146761 3.58417661836448 0,5.92252339187664 3.448725288366 0,5.87938524157182 3.31595971334866 0,5.8270909152852 3.1865267138484 0,5.76589518571785 3.06105687442822 0,5.69609619231285 2.94016147153359 0,5.61803398874989 2.82442949541505 0,5.53208888623796 2.71442478062692 0,5.4386796006773 2.61068325908201 0,5.33826121271772 2.51371034904521 0,5.23132295065132 2.42397849278656 0,5.11838580694149 2.34192485488992 0,5.0 2.26794919243112 0,4.87674229357815 2.20241190740167 0,4.74921318683182 2.14563229086643 0,4.61803398874989 2.09788696740969 0,4.48384379119934 2.05940854744801 0,4.34729635533386 2.03038449397558 0,4.20905692653531 2.01095620926345 0,4.069798993405 2.00121834596181 0,3.930201006595 2.00121834596181 0,3.79094307346469 2.01095620926345 0,3.65270364466614 2.03038449397558 0,3.51615620880066 2.05940854744801 0,3.38196601125011 2.09788696740969 0,3.25078681316818 2.14563229086643 0,3.12325770642185 2.20241190740167 0,3.0 2.26794919243112 0,2.88161419305851 2.34192485488992 0,2.76867704934868 2.42397849278656 0,2.66173878728228 2.51371034904521 0,2.5613203993227 2.61068325908201 0,2.46791111376204 2.71442478062692 0,2.38196601125011 2.82442949541505 0,2.30390380768715 2.94016147153359 0,2.23410481428215 3.06105687442822 0,2.1729090847148 3.1865267138484 0,2.12061475842818 3.31595971334866 0,2.07747660812336 3.448725288366 0,2.04370479853239 3.58417661836448 0,2.01946386251686 3.72165379807987 0,2.00487189948035 3.86048705251175 0,2.0 4.0 0,2.00487189948035 4.13951294748825 0,2.01946386251686 4.27834620192013 0,2.04370479853239 4.41582338163552 0,2.07747660812336 4.551274711634 0,2.12061475842818 4.68404028665134 0,2.1729090847148 4.8134732861516 0,2.23410481428215 4.93894312557178 0,2.30390380768715 5.05983852846641 0,2.38196601125011 5.17557050458495 0,2.46791111376204 5.28557521937308 0,2.5613203993227 5.38931674091799 0,2.66173878728228 5.48628965095479 0,2.76867704934868 5.57602150721344 0,2.88161419305851 5.65807514511008 0,3.0 5.73205080756888 0,3.12325770642184 5.79758809259833 0,3.25078681316818 5.85436770913357 0,3.38196601125011 5.90211303259031 0,3.51615620880066 5.94059145255199 0,3.65270364466614 5.96961550602442 0,3.79094307346469 5.98904379073655 0,3.930201006595 5.99878165403819 0,4.069798993405 5.99878165403819 0,4.20905692653531 5.98904379073655 0,4.34729635533386 5.96961550602442 0,4.48384379119933 5.94059145255199 0,4.61803398874989 5.90211303259031 0,4.74921318683182 5.85436770913357 0,4.87674229357815 5.79758809259833 0,5.0 5.73205080756888 0,5.11838580694149 5.65807514511008 0,5.23132295065132 5.57602150721344 0,5.33826121271772 5.48628965095479 0,5.4386796006773 5.389316740918 0,5.53208888623796 5.28557521937308 0,5.61803398874989 5.17557050458495 0,5.69609619231285 5.05983852846641 0,5.76589518571785 4.93894312557178 0,5.8270909152852 4.8134732861516 0,5.87938524157182 4.68404028665134 0,5.92252339187664 4.551274711634 0,5.95629520146761 4.41582338163552 0,5.98053613748314 4.27834620192013 0,5.99512810051965 4.13951294748825 0,6.0 4.0 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):5 # EntityHandle (String) = 1BA # LINESTRING Z (2 4 0,4 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2 4 0,4 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):6 # EntityHandle (String) = 1BB # LINESTRING Z (4 4 0,6 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (4 4 0,6 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):7 # EntityHandle (String) = 1BC # LINESTRING Z (4 3 0,4 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (4 3 0,4 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):8 # EntityHandle (String) = 1BD # LINESTRING Z (4 4 0,4 5 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (4 4 0,4 5 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):9 # EntityHandle (String) = 1BE # LINESTRING Z (2 4 0,2.00487189948035 4.06975647374412 0,2.01946386251686 4.13917310096007 0,2.04370479853239 4.20791169081776 0,2.07747660812336 4.275637355817 0,2.12061475842818 4.34202014332567 0,2.1729090847148 4.4067366430758 0,2.23410481428215 4.46947156278589 0,2.30390380768715 4.52991926423321 0,2.38196601125011 4.58778525229247 0,2.46791111376204 4.64278760968654 0,2.5613203993227 4.694658370459 0,2.66173878728228 4.74314482547739 0,2.76867704934868 4.78801075360672 0,2.88161419305851 4.82903757255504 0,3.0 4.86602540378444 0,3.12325770642185 4.89879404629917 0,3.25078681316818 4.92718385456679 0,3.38196601125011 4.95105651629515 0,3.51615620880067 4.970295726276 0,3.65270364466614 4.98480775301221 0,3.79094307346469 4.99452189536827 0,3.930201006595 4.9993908270191 0,4.069798993405 4.9993908270191 0,4.20905692653531 4.99452189536827 0,4.34729635533386 4.98480775301221 0,4.48384379119934 4.970295726276 0,4.61803398874989 4.95105651629515 0,4.74921318683182 4.92718385456679 0,4.87674229357816 4.89879404629917 0,5.0 4.86602540378444 0,5.11838580694149 4.82903757255504 0,5.23132295065132 4.78801075360672 0,5.33826121271772 4.74314482547739 0,5.4386796006773 4.694658370459 0,5.53208888623796 4.64278760968654 0,5.61803398874989 4.58778525229247 0,5.69609619231285 4.5299192642332 0,5.76589518571785 4.46947156278589 0,5.8270909152852 4.4067366430758 0,5.87938524157182 4.34202014332567 0,5.92252339187664 4.275637355817 0,5.95629520146761 4.20791169081776 0,5.98053613748314 4.13917310096006 0,5.99512810051965 4.06975647374412 0,6.0 4.0 0,5.99512810051965 3.93024352625587 0,5.98053613748314 3.86082689903993 0,5.95629520146761 3.79208830918224 0,5.92252339187664 3.724362644183 0,5.87938524157182 3.65797985667433 0,5.8270909152852 3.5932633569242 0,5.76589518571785 3.53052843721411 0,5.69609619231285 3.4700807357668 0,5.61803398874989 3.41221474770753 0,5.53208888623796 3.35721239031346 0,5.4386796006773 3.305341629541 0,5.33826121271772 3.25685517452261 0,5.23132295065132 3.21198924639328 0,5.11838580694149 3.17096242744496 0,5.0 3.13397459621556 0,4.87674229357815 3.10120595370083 0,4.74921318683182 3.07281614543321 0,4.61803398874989 3.04894348370485 0,4.48384379119934 3.029704273724 0,4.34729635533386 3.01519224698779 0,4.20905692653531 3.00547810463173 0,4.069798993405 3.0006091729809 0,3.930201006595 3.0006091729809 0,3.79094307346469 3.00547810463173 0,3.65270364466614 3.01519224698779 0,3.51615620880066 3.029704273724 0,3.38196601125011 3.04894348370485 0,3.25078681316818 3.07281614543321 0,3.12325770642185 3.10120595370083 0,3.0 3.13397459621556 0,2.88161419305851 3.17096242744496 0,2.76867704934868 3.21198924639328 0,2.66173878728228 3.25685517452261 0,2.5613203993227 3.305341629541 0,2.46791111376204 3.35721239031346 0,2.38196601125011 3.41221474770753 0,2.30390380768715 3.4700807357668 0,2.23410481428215 3.53052843721411 0,2.1729090847148 3.5932633569242 0,2.12061475842818 3.65797985667433 0,2.07747660812336 3.724362644183 0,2.04370479853239 3.79208830918224 0,2.01946386251686 3.86082689903993 0,2.00487189948035 3.93024352625587 0,2 4 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2 4 0,2.00487189948035 4.06975647374412 0,2.01946386251686 4.13917310096007 0,2.04370479853239 4.20791169081776 0,2.07747660812336 4.275637355817 0,2.12061475842818 4.34202014332567 0,2.1729090847148 4.4067366430758 0,2.23410481428215 4.46947156278589 0,2.30390380768715 4.52991926423321 0,2.38196601125011 4.58778525229247 0,2.46791111376204 4.64278760968654 0,2.5613203993227 4.694658370459 0,2.66173878728228 4.74314482547739 0,2.76867704934868 4.78801075360672 0,2.88161419305851 4.82903757255504 0,3.0 4.86602540378444 0,3.12325770642185 4.89879404629917 0,3.25078681316818 4.92718385456679 0,3.38196601125011 4.95105651629515 0,3.51615620880067 4.970295726276 0,3.65270364466614 4.98480775301221 0,3.79094307346469 4.99452189536827 0,3.930201006595 4.9993908270191 0,4.069798993405 4.9993908270191 0,4.20905692653531 4.99452189536827 0,4.34729635533386 4.98480775301221 0,4.48384379119934 4.970295726276 0,4.61803398874989 4.95105651629515 0,4.74921318683182 4.92718385456679 0,4.87674229357816 4.89879404629917 0,5.0 4.86602540378444 0,5.11838580694149 4.82903757255504 0,5.23132295065132 4.78801075360672 0,5.33826121271772 4.74314482547739 0,5.4386796006773 4.694658370459 0,5.53208888623796 4.64278760968654 0,5.61803398874989 4.58778525229247 0,5.69609619231285 4.5299192642332 0,5.76589518571785 4.46947156278589 0,5.8270909152852 4.4067366430758 0,5.87938524157182 4.34202014332567 0,5.92252339187664 4.275637355817 0,5.95629520146761 4.20791169081776 0,5.98053613748314 4.13917310096006 0,5.99512810051965 4.06975647374412 0,6.0 4.0 0,5.99512810051965 3.93024352625587 0,5.98053613748314 3.86082689903993 0,5.95629520146761 3.79208830918224 0,5.92252339187664 3.724362644183 0,5.87938524157182 3.65797985667433 0,5.8270909152852 3.5932633569242 0,5.76589518571785 3.53052843721411 0,5.69609619231285 3.4700807357668 0,5.61803398874989 3.41221474770753 0,5.53208888623796 3.35721239031346 0,5.4386796006773 3.305341629541 0,5.33826121271772 3.25685517452261 0,5.23132295065132 3.21198924639328 0,5.11838580694149 3.17096242744496 0,5.0 3.13397459621556 0,4.87674229357815 3.10120595370083 0,4.74921318683182 3.07281614543321 0,4.61803398874989 3.04894348370485 0,4.48384379119934 3.029704273724 0,4.34729635533386 3.01519224698779 0,4.20905692653531 3.00547810463173 0,4.069798993405 3.0006091729809 0,3.930201006595 3.0006091729809 0,3.79094307346469 3.00547810463173 0,3.65270364466614 3.01519224698779 0,3.51615620880066 3.029704273724 0,3.38196601125011 3.04894348370485 0,3.25078681316818 3.07281614543321 0,3.12325770642185 3.10120595370083 0,3.0 3.13397459621556 0,2.88161419305851 3.17096242744496 0,2.76867704934868 3.21198924639328 0,2.66173878728228 3.25685517452261 0,2.5613203993227 3.305341629541 0,2.46791111376204 3.35721239031346 0,2.38196601125011 3.41221474770753 0,2.30390380768715 3.4700807357668 0,2.23410481428215 3.53052843721411 0,2.1729090847148 3.5932633569242 0,2.12061475842818 3.65797985667433 0,2.07747660812336 3.724362644183 0,2.04370479853239 3.79208830918224 0,2.01946386251686 3.86082689903993 0,2.00487189948035 3.93024352625587 0,2 4 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):10 # EntityHandle (String) = 1BF # LINESTRING Z (2.0 2.0 0,1.96657794502105 2.03582232791524 0,1.93571660708646 2.07387296203834 0,1.90756413746468 2.11396923855471 0,1.88225568337755 2.15591867344963 0,1.85991273921989 2.19951988653655 0,1.84064256332004 2.24456356819194 0,1.8245376630414 2.29083348415575 0,1.81167535069652 2.33810751357387 0,1.80211737240583 2.38615871529951 0,1.79590961168258 2.43475641733454 0,1.79308186916688 2.48366732418105 0,1.79364771956639 2.53265663678705 0,1.79760444649032 2.58148917971011 0,1.80493305548955 2.62993053008785 0,1.81559836524041 2.67774814299566 0,1.8295491764342 2.72471246778926 0,1.84671851756181 2.7705980500731 0,1.86702396641357 2.81518461400453 0,1.89036804575079 2.85825811973811 0,1.91663869124976 2.89961179093366 0,1.94570978947168 2.93904710739563 0,1.97744178327594 2.97637475807832 0,2.01168234177068 3.01141554988232 0,2.04826709158413 3.04400126787917 0,2.08702040594658 3.07397548283483 0,2.12775624779472 3.10119430215541 0,2.17027906285109 3.12552706065018 0,2.2143847183914 3.14685694779575 0,2.25986148319297 3.16508156849045 0,2.30649104396024 3.18011343460661 0,2.35404955334774 3.1918803849814 0,2.40230870454951 3.20032593182975 0,2.45103682729644 3.2054095319166 0,2.5 3.20710678118655 0,2.54896317270356 3.2054095319166 0,2.59769129545049 3.20032593182975 0,2.64595044665226 3.1918803849814 0,2.69350895603976 3.18011343460661 0,2.74013851680703 3.16508156849045 0,2.7856152816086 3.14685694779575 0,2.8297209371489 3.12552706065018 0,2.87224375220528 3.10119430215541 0,2.91297959405342 3.07397548283483 0,2.95173290841587 3.04400126787917 0,2.98831765822932 3.01141554988232 0,3.02255821672406 2.97637475807832 0,3.05429021052832 2.93904710739563 0,3.08336130875024 2.89961179093367 0,3.10963195424921 2.85825811973811 0,3.13297603358643 2.81518461400453 0,3.15328148243819 2.7705980500731 0,3.1704508235658 2.72471246778926 0,3.18440163475959 2.67774814299567 0,3.19506694451045 2.62993053008786 0,3.20239555350968 2.58148917971011 0,3.20635228043361 2.53265663678705 0,3.20691813083312 2.48366732418105 0,3.20409038831742 2.43475641733454 0,3.19788262759417 2.38615871529951 0,3.18832464930348 2.33810751357387 0,3.1754623369586 2.29083348415575 0,3.15935743667996 2.24456356819194 0,3.14008726078011 2.19951988653655 0,3.11774431662245 2.15591867344963 0,3.09243586253532 2.11396923855472 0,3.06428339291354 2.07387296203834 0,3.03342205497895 2.03582232791524 0,3 2 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2.0 2.0 0,1.96657794502105 2.03582232791524 0,1.93571660708646 2.07387296203834 0,1.90756413746468 2.11396923855471 0,1.88225568337755 2.15591867344963 0,1.85991273921989 2.19951988653655 0,1.84064256332004 2.24456356819194 0,1.8245376630414 2.29083348415575 0,1.81167535069652 2.33810751357387 0,1.80211737240583 2.38615871529951 0,1.79590961168258 2.43475641733454 0,1.79308186916688 2.48366732418105 0,1.79364771956639 2.53265663678705 0,1.79760444649032 2.58148917971011 0,1.80493305548955 2.62993053008785 0,1.81559836524041 2.67774814299566 0,1.8295491764342 2.72471246778926 0,1.84671851756181 2.7705980500731 0,1.86702396641357 2.81518461400453 0,1.89036804575079 2.85825811973811 0,1.91663869124976 2.89961179093366 0,1.94570978947168 2.93904710739563 0,1.97744178327594 2.97637475807832 0,2.01168234177068 3.01141554988232 0,2.04826709158413 3.04400126787917 0,2.08702040594658 3.07397548283483 0,2.12775624779472 3.10119430215541 0,2.17027906285109 3.12552706065018 0,2.2143847183914 3.14685694779575 0,2.25986148319297 3.16508156849045 0,2.30649104396024 3.18011343460661 0,2.35404955334774 3.1918803849814 0,2.40230870454951 3.20032593182975 0,2.45103682729644 3.2054095319166 0,2.5 3.20710678118655 0,2.54896317270356 3.2054095319166 0,2.59769129545049 3.20032593182975 0,2.64595044665226 3.1918803849814 0,2.69350895603976 3.18011343460661 0,2.74013851680703 3.16508156849045 0,2.7856152816086 3.14685694779575 0,2.8297209371489 3.12552706065018 0,2.87224375220528 3.10119430215541 0,2.91297959405342 3.07397548283483 0,2.95173290841587 3.04400126787917 0,2.98831765822932 3.01141554988232 0,3.02255821672406 2.97637475807832 0,3.05429021052832 2.93904710739563 0,3.08336130875024 2.89961179093367 0,3.10963195424921 2.85825811973811 0,3.13297603358643 2.81518461400453 0,3.15328148243819 2.7705980500731 0,3.1704508235658 2.72471246778926 0,3.18440163475959 2.67774814299567 0,3.19506694451045 2.62993053008786 0,3.20239555350968 2.58148917971011 0,3.20635228043361 2.53265663678705 0,3.20691813083312 2.48366732418105 0,3.20409038831742 2.43475641733454 0,3.19788262759417 2.38615871529951 0,3.18832464930348 2.33810751357387 0,3.1754623369586 2.29083348415575 0,3.15935743667996 2.24456356819194 0,3.14008726078011 2.19951988653655 0,3.11774431662245 2.15591867344963 0,3.09243586253532 2.11396923855472 0,3.06428339291354 2.07387296203834 0,3.03342205497895 2.03582232791524 0,3 2 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):11 # EntityHandle (String) = 1C0 # POLYGON Z ((1 2 0,1 3 0,2 3 0,2 2 0,1 2 0)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((1 2 0,1 3 0,2 3 0,2 2 0,1 2 0))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):12 # EntityHandle (String) = 1C1 # POLYGON ((3 4,4 4,4 3,3 3,3 4)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((3 4,4 4,4 3,3 3,3 4))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):13 # EntityHandle (String) = 1C3 # POLYGON ((8 8,9 8,9 9,8 9,8 8)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((8 8,9 8,9 9,8 9,8 8))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):14 # EntityHandle (String) = 1C6 # LINESTRING (2 2,2.15384615384615 2.15384615384615,2.30769230769231 2.30769230769231,2.46153846153846 2.46153846153846,2.61538461538461 2.61538461538461,2.76923076923077 2.76923076923077,2.92307692307692 2.92307692307692,3.07692307692308 3.07692307692308,3.23076923076923 3.23076923076923,3.38461538461538 3.38461538461538,3.53846153846154 3.53846153846154,3.69230769230769 3.69230769230769,3.84615384615385 3.84615384615385,4 4,4.15384615384615 4.15384615384615,4.30769230769231 4.30769230769231,4.46153846153846 4.46153846153846,4.61538461538462 4.61538461538462,4.76923076923077 4.76923076923077,4.92307692307692 4.92307692307692,5.07692307692308 5.07692307692308,5.23076923076923 5.23076923076923,5.38461538461538 5.38461538461538,5.53846153846154 5.53846153846154,5.69230769230769 5.69230769230769,5.84615384615385 5.84615384615385,6.0 6.0,6.15384615384615 6.15384615384615,6.30769230769231 6.30769230769231,6.46153846153846 6.46153846153846,6.61538461538462 6.61538461538462,6.76923076923077 6.76923076923077,6.92307692307692 6.92307692307692,7.07692307692308 7.07692307692308,7.23076923076923 7.23076923076923,7.38461538461539 7.38461538461539,7.53846153846154 7.53846153846154,7.69230769230769 7.69230769230769,7.84615384615385 7.84615384615385,8 8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 2,2.15384615384615 2.15384615384615,2.30769230769231 2.30769230769231,2.46153846153846 2.46153846153846,2.61538461538461 2.61538461538461,2.76923076923077 2.76923076923077,2.92307692307692 2.92307692307692,3.07692307692308 3.07692307692308,3.23076923076923 3.23076923076923,3.38461538461538 3.38461538461538,3.53846153846154 3.53846153846154,3.69230769230769 3.69230769230769,3.84615384615385 3.84615384615385,4 4,4.15384615384615 4.15384615384615,4.30769230769231 4.30769230769231,4.46153846153846 4.46153846153846,4.61538461538462 4.61538461538462,4.76923076923077 4.76923076923077,4.92307692307692 4.92307692307692,5.07692307692308 5.07692307692308,5.23076923076923 5.23076923076923,5.38461538461538 5.38461538461538,5.53846153846154 5.53846153846154,5.69230769230769 5.69230769230769,5.84615384615385 5.84615384615385,6.0 6.0,6.15384615384615 6.15384615384615,6.30769230769231 6.30769230769231,6.46153846153846 6.46153846153846,6.61538461538462 6.61538461538462,6.76923076923077 6.76923076923077,6.92307692307692 6.92307692307692,7.07692307692308 7.07692307692308,7.23076923076923 7.23076923076923,7.38461538461539 7.38461538461539,7.53846153846154 7.53846153846154,7.69230769230769 7.69230769230769,7.84615384615385 7.84615384615385,8 8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):15 # EntityHandle (String) = 1C7 # LINESTRING (8 1,7.62837370825536 0.987348067229724,7.25775889681215 0.975707614760869,6.88916704597178 0.966090122894857,6.52360963603567 0.959507071933107,6.16209814730525 0.956969942177043,5.80564406008193 0.959490213928084,5.45525885466714 0.968079367487651,5.11195401136229 0.983748883157167,4.77674101046882 1.00751024123805,4.45063133228814 1.04037492203173,4.13463645712167 1.08335440583961,3.82976786527082 1.13746017296313,3.53703703703704 1.2037037037037,3.25745545272173 1.28309647836275,2.99203459262631 1.37664997724169,2.74178593705221 1.48537568064195,2.50772096630085 1.61028506886495,2.29085116067365 1.75238962221211,2.09218800047203 1.91270082098484,1.91270082098485 2.09218800047202,1.75238962221211 2.29085116067364,1.61028506886495 2.50772096630085,1.48537568064195 2.74178593705221,1.37664997724169 2.99203459262631,1.28309647836275 3.25745545272172,1.2037037037037 3.53703703703703,1.13746017296313 3.82976786527082,1.08335440583961 4.13463645712166,1.04037492203173 4.45063133228814,1.00751024123805 4.77674101046882,0.983748883157167 5.11195401136229,0.968079367487652 5.45525885466714,0.959490213928084 5.80564406008193,0.956969942177043 6.16209814730525,0.959507071933108 6.52360963603567,0.966090122894857 6.88916704597178,0.975707614760869 7.25775889681216,0.987348067229724 7.62837370825537,1 8) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (8 1,7.62837370825536 0.987348067229724,7.25775889681215 0.975707614760869,6.88916704597178 0.966090122894857,6.52360963603567 0.959507071933107,6.16209814730525 0.956969942177043,5.80564406008193 0.959490213928084,5.45525885466714 0.968079367487651,5.11195401136229 0.983748883157167,4.77674101046882 1.00751024123805,4.45063133228814 1.04037492203173,4.13463645712167 1.08335440583961,3.82976786527082 1.13746017296313,3.53703703703704 1.2037037037037,3.25745545272173 1.28309647836275,2.99203459262631 1.37664997724169,2.74178593705221 1.48537568064195,2.50772096630085 1.61028506886495,2.29085116067365 1.75238962221211,2.09218800047203 1.91270082098484,1.91270082098485 2.09218800047202,1.75238962221211 2.29085116067364,1.61028506886495 2.50772096630085,1.48537568064195 2.74178593705221,1.37664997724169 2.99203459262631,1.28309647836275 3.25745545272172,1.2037037037037 3.53703703703703,1.13746017296313 3.82976786527082,1.08335440583961 4.13463645712166,1.04037492203173 4.45063133228814,1.00751024123805 4.77674101046882,0.983748883157167 5.11195401136229,0.968079367487652 5.45525885466714,0.959490213928084 5.80564406008193,0.956969942177043 6.16209814730525,0.959507071933108 6.52360963603567,0.966090122894857 6.88916704597178,0.975707614760869 7.25775889681216,0.987348067229724 7.62837370825537,1 8)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):16 # EntityHandle (String) = 1C8 # POINT Z (7 7 0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (7 7 0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):17 # EntityHandle (String) = 1C9 # POINT Z (-2.0 4.0 -3.46410161513775) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (-2.0 4.0 -3.46410161513775)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):18 # EntityHandle (String) = 1CA # LINESTRING Z (0 0 0,-0.5 1.0 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,-0.5 1.0 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):19 # EntityHandle (String) = 1CB # LINESTRING Z (-0.5 1.0 -0.866025403784439,-1.0 1.0 -1.73205080756888,-0.5 2.0 -0.866025403784439,-0.5 1.0 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-0.5 1.0 -0.866025403784439,-1.0 1.0 -1.73205080756888,-0.5 2.0 -0.866025403784439,-0.5 1.0 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):20 # EntityHandle (String) = 1CC # LINESTRING Z (-0.5 1.0 -0.866025403784439,-0.5 2.0 -0.866025403784439,-1.0 2.0 -1.73205080756888,-0.5 1.0 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-0.5 1.0 -0.866025403784439,-0.5 2.0 -0.866025403784439,-1.0 2.0 -1.73205080756888,-0.5 1.0 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):21 # EntityHandle (String) = 1D1 # LINESTRING Z (-2.0 6.0 -3.46410161513776,-2.06975647374412 5.99512810051965 -3.58492337181942,-2.13917310096006 5.98053613748314 -3.7051564970475,-2.20791169081776 5.95629520146761 -3.82421522712167,-2.275637355817 5.92252339187664 -3.94151951987674,-2.34202014332567 5.87938524157182 -4.0564978805898,-2.4067366430758 5.8270909152852 -4.16859014624505,-2.46947156278589 5.76589518571785 -4.27725021459168,-2.5299192642332 5.69609619231285 -4.38194870469918,-2.58778525229247 5.61803398874989 -4.48217553604801,-2.64278760968654 5.53208888623796 -4.57744241359059,-2.694658370459 5.4386796006773 -4.66728520667574,-2.74314482547739 5.33826121271772 -4.75126621024651,-2.78801075360672 5.23132295065132 -4.82897627729524,-2.82903757255504 5.11838580694149 -4.90003681218666,-2.86602540378444 5.0 -4.96410161513776,-2.89879404629917 4.87674229357815 -5.02085856886833,-2.92718385456679 4.74921318683182 -5.07003115920498,-2.95105651629515 4.61803398874989 -5.11137982223042,-2.970295726276 4.48384379119934 -5.14470311141473,-2.98480775301221 4.34729635533386 -5.16983867904264,-2.99452189536827 4.20905692653531 -5.1866640671553,-2.99939082701909 4.069798993405 -5.19509730415311,-2.99939082701909 3.930201006595 -5.19509730415311,-2.99452189536827 3.79094307346469 -5.1866640671553,-2.98480775301221 3.65270364466614 -5.16983867904264,-2.970295726276 3.51615620880066 -5.14470311141473,-2.95105651629515 3.38196601125011 -5.11137982223042,-2.92718385456679 3.25078681316818 -5.07003115920498,-2.89879404629917 3.12325770642185 -5.02085856886833,-2.86602540378444 3.0 -4.96410161513776,-2.82903757255504 2.88161419305851 -4.90003681218666,-2.78801075360672 2.76867704934868 -4.82897627729524,-2.74314482547739 2.66173878728228 -4.75126621024651,-2.694658370459 2.5613203993227 -4.66728520667574,-2.64278760968654 2.46791111376204 -4.5774424135906,-2.58778525229247 2.38196601125011 -4.48217553604801,-2.5299192642332 2.30390380768715 -4.38194870469918,-2.46947156278589 2.23410481428215 -4.27725021459168,-2.4067366430758 2.1729090847148 -4.16859014624505,-2.34202014332567 2.12061475842818 -4.0564978805898,-2.275637355817 2.07747660812336 -3.94151951987674,-2.20791169081776 2.04370479853239 -3.82421522712167,-2.13917310096006 2.01946386251686 -3.7051564970475,-2.06975647374412 2.00487189948035 -3.58492337181943,-2.0 2.0 -3.46410161513776,-1.93024352625587 2.00487189948035 -3.34327985845609,-1.86082689903993 2.01946386251686 -3.22304673322801,-1.79208830918224 2.04370479853239 -3.10398800315384,-1.724362644183 2.07747660812336 -2.98668371039877,-1.65797985667433 2.12061475842818 -2.87170534968571,-1.5932633569242 2.1729090847148 -2.75961308403046,-1.53052843721411 2.23410481428215 -2.65095301568383, # -1.47008073576679 2.30390380768715 -2.54625452557633,-1.41221474770753 2.38196601125011 -2.4460276942275,-1.35721239031346 2.46791111376204 -2.35076081668492,-1.305341629541 2.5613203993227 -2.26091802359977,-1.25685517452261 2.66173878728228 -2.176937020029,-1.21198924639328 2.76867704934868 -2.09922695298027,-1.17096242744496 2.88161419305851 -2.02816641808885,-1.13397459621556 3.0 -1.96410161513776,-1.10120595370083 3.12325770642184 -1.90734466140718,-1.07281614543321 3.25078681316818 -1.85817207107053,-1.04894348370485 3.38196601125011 -1.81682340804509,-1.029704273724 3.51615620880066 -1.78350011886079,-1.01519224698779 3.65270364466614 -1.75836455123287,-1.00547810463173 3.79094307346469 -1.74153916312021,-1.0006091729809 3.930201006595 -1.7331059261224,-1.0006091729809 4.069798993405 -1.7331059261224,-1.00547810463173 4.20905692653531 -1.74153916312021,-1.01519224698779 4.34729635533386 -1.75836455123287,-1.029704273724 4.48384379119933 -1.78350011886078,-1.04894348370485 4.61803398874989 -1.81682340804509,-1.07281614543321 4.74921318683182 -1.85817207107053,-1.10120595370083 4.87674229357815 -1.90734466140718,-1.13397459621556 5.0 -1.96410161513776,-1.17096242744496 5.11838580694149 -2.02816641808885,-1.21198924639328 5.23132295065132 -2.09922695298027,-1.25685517452261 5.33826121271772 -2.176937020029,-1.305341629541 5.4386796006773 -2.26091802359977,-1.35721239031346 5.53208888623796 -2.35076081668492,-1.41221474770753 5.61803398874989 -2.4460276942275,-1.47008073576679 5.69609619231285 -2.54625452557633,-1.53052843721411 5.76589518571785 -2.65095301568383,-1.5932633569242 5.8270909152852 -2.75961308403046,-1.65797985667433 5.87938524157182 -2.87170534968571,-1.724362644183 5.92252339187664 -2.98668371039877,-1.79208830918224 5.95629520146761 -3.10398800315384,-1.86082689903993 5.98053613748314 -3.22304673322801,-1.93024352625587 5.99512810051965 -3.34327985845609,-2.0 6.0 -3.46410161513775) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2.0 6.0 -3.46410161513776,-2.06975647374412 5.99512810051965 -3.58492337181942,-2.13917310096006 5.98053613748314 -3.7051564970475,-2.20791169081776 5.95629520146761 -3.82421522712167,-2.275637355817 5.92252339187664 -3.94151951987674,-2.34202014332567 5.87938524157182 -4.0564978805898,-2.4067366430758 5.8270909152852 -4.16859014624505,-2.46947156278589 5.76589518571785 -4.27725021459168,-2.5299192642332 5.69609619231285 -4.38194870469918,-2.58778525229247 5.61803398874989 -4.48217553604801,-2.64278760968654 5.53208888623796 -4.57744241359059,-2.694658370459 5.4386796006773 -4.66728520667574,-2.74314482547739 5.33826121271772 -4.75126621024651,-2.78801075360672 5.23132295065132 -4.82897627729524,-2.82903757255504 5.11838580694149 -4.90003681218666,-2.86602540378444 5.0 -4.96410161513776,-2.89879404629917 4.87674229357815 -5.02085856886833,-2.92718385456679 4.74921318683182 -5.07003115920498,-2.95105651629515 4.61803398874989 -5.11137982223042,-2.970295726276 4.48384379119934 -5.14470311141473,-2.98480775301221 4.34729635533386 -5.16983867904264,-2.99452189536827 4.20905692653531 -5.1866640671553,-2.99939082701909 4.069798993405 -5.19509730415311,-2.99939082701909 3.930201006595 -5.19509730415311,-2.99452189536827 3.79094307346469 -5.1866640671553,-2.98480775301221 3.65270364466614 -5.16983867904264,-2.970295726276 3.51615620880066 -5.14470311141473,-2.95105651629515 3.38196601125011 -5.11137982223042,-2.92718385456679 3.25078681316818 -5.07003115920498,-2.89879404629917 3.12325770642185 -5.02085856886833,-2.86602540378444 3.0 -4.96410161513776,-2.82903757255504 2.88161419305851 -4.90003681218666,-2.78801075360672 2.76867704934868 -4.82897627729524,-2.74314482547739 2.66173878728228 -4.75126621024651,-2.694658370459 2.5613203993227 -4.66728520667574,-2.64278760968654 2.46791111376204 -4.5774424135906,-2.58778525229247 2.38196601125011 -4.48217553604801,-2.5299192642332 2.30390380768715 -4.38194870469918,-2.46947156278589 2.23410481428215 -4.27725021459168,-2.4067366430758 2.1729090847148 -4.16859014624505,-2.34202014332567 2.12061475842818 -4.0564978805898,-2.275637355817 2.07747660812336 -3.94151951987674,-2.20791169081776 2.04370479853239 -3.82421522712167,-2.13917310096006 2.01946386251686 -3.7051564970475,-2.06975647374412 2.00487189948035 -3.58492337181943,-2.0 2.0 -3.46410161513776,-1.93024352625587 2.00487189948035 -3.34327985845609,-1.86082689903993 2.01946386251686 -3.22304673322801,-1.79208830918224 2.04370479853239 -3.10398800315384,-1.724362644183 2.07747660812336 -2.98668371039877,' + '-1.65797985667433 2.12061475842818 -2.87170534968571,-1.5932633569242 2.1729090847148 -2.75961308403046,-1.53052843721411 2.23410481428215 -2.65095301568383,-1.47008073576679 2.30390380768715 -2.54625452557633,-1.41221474770753 2.38196601125011 -2.4460276942275,-1.35721239031346 2.46791111376204 -2.35076081668492,-1.305341629541 2.5613203993227 -2.26091802359977,-1.25685517452261 2.66173878728228 -2.176937020029,-1.21198924639328 2.76867704934868 -2.09922695298027,-1.17096242744496 2.88161419305851 -2.02816641808885,-1.13397459621556 3.0 -1.96410161513776,-1.10120595370083 3.12325770642184 -1.90734466140718,-1.07281614543321 3.25078681316818 -1.85817207107053,-1.04894348370485 3.38196601125011 -1.81682340804509,-1.029704273724 3.51615620880066 -1.78350011886079,-1.01519224698779 3.65270364466614 -1.75836455123287,-1.00547810463173 3.79094307346469 -1.74153916312021,-1.0006091729809 3.930201006595 -1.7331059261224,-1.0006091729809 4.069798993405 -1.7331059261224,-1.00547810463173 4.20905692653531 -1.74153916312021,-1.01519224698779 4.34729635533386 -1.75836455123287,-1.029704273724 4.48384379119933 -1.78350011886078,-1.04894348370485 4.61803398874989 -1.81682340804509,-1.07281614543321 4.74921318683182 -1.85817207107053,-1.10120595370083 4.87674229357815 -1.90734466140718,-1.13397459621556 5.0 -1.96410161513776,-1.17096242744496 5.11838580694149 -2.02816641808885,-1.21198924639328 5.23132295065132 -2.09922695298027,-1.25685517452261 5.33826121271772 -2.176937020029,-1.305341629541 5.4386796006773 -2.26091802359977,-1.35721239031346 5.53208888623796 -2.35076081668492,-1.41221474770753 5.61803398874989 -2.4460276942275,-1.47008073576679 5.69609619231285 -2.54625452557633,-1.53052843721411 5.76589518571785 -2.65095301568383,-1.5932633569242 5.8270909152852 -2.75961308403046,-1.65797985667433 5.87938524157182 -2.87170534968571,-1.724362644183 5.92252339187664 -2.98668371039877,-1.79208830918224 5.95629520146761 -3.10398800315384,-1.86082689903993 5.98053613748314 -3.22304673322801,-1.93024352625587 5.99512810051965 -3.34327985845609,-2.0 6.0 -3.46410161513775)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):22 # EntityHandle (String) = 1D2 # LINESTRING Z (-1.0 4.0 -1.73205080756888,-2.0 4.0 -3.46410161513775) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-1.0 4.0 -1.73205080756888,-2.0 4.0 -3.46410161513775)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):23 # EntityHandle (String) = 1D3 # LINESTRING Z (-2.0 4.0 -3.46410161513775,-3.0 4.0 -5.19615242270663) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2.0 4.0 -3.46410161513775,-3.0 4.0 -5.19615242270663)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):24 # EntityHandle (String) = 1D4 # LINESTRING Z (-2.0 3.0 -3.46410161513775,-2.0 4.0 -3.46410161513775) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2.0 3.0 -3.46410161513775,-2.0 4.0 -3.46410161513775)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):25 # EntityHandle (String) = 1D5 # LINESTRING Z (-2.0 4.0 -3.46410161513775,-2.0 5.0 -3.46410161513775) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-2.0 4.0 -3.46410161513775,-2.0 5.0 -3.46410161513775)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):26 # EntityHandle (String) = 1D6 # LINESTRING Z (-1.0 4.0 -1.73205080756888,-1.00243594974018 4.06975647374412 -1.73626999628355,-1.00973193125843 4.13917310096007 -1.74890700696425,-1.02185239926619 4.20791169081776 -1.76990027336521,-1.03873830406168 4.275637355817 -1.79914751840276,-1.06030737921409 4.34202014332567 -1.83650625243901,-1.0864545423574 4.4067366430758 -1.88179446747701,-1.11705240714107 4.46947156278589 -1.93479152388545,-1.15195190384357 4.52991926423321 -1.99523922533277,-1.19098300562505 4.58778525229247 -2.06284307669368,-1.23395555688102 4.64278760968654 -2.13727371879988,-1.28066019966135 4.694658370459 -2.21816853304476,-1.33086939364114 4.74314482547739 -2.30513340802484,-1.38433852467434 4.78801075360672 -2.3977446596109,-1.44080709652925 4.82903757255504 -2.49555109509446,-1.5 4.86602540378444 -2.59807621135332,-1.56162885321092 4.89879404629917 -2.70482051632684,-1.62539340658409 4.92718385456679 -2.8152639624911,-1.69098300562505 4.95105651629515 -2.92886848047812,-1.75807810440033 4.970295726276 -3.04508060049576,-1.82635182233307 4.98480775301221 -3.16333414877688,-1.89547153673235 4.99452189536827 -3.28305300592108,-1.9651005032975 4.99939082701909 -3.40365391369044,-2.0348994967025 4.99939082701909 -3.52454931658507,-2.10452846326765 4.99452189536827 -3.64515022435443,-2.17364817766693 4.98480775301221 -3.76486908149863,-2.24192189559967 4.970295726276 -3.88312262977975,-2.30901699437495 4.95105651629515 -3.99933474979739,-2.37460659341591 4.92718385456679 -4.11293926778441,-2.43837114678908 4.89879404629917 -4.22338271394867,-2.5 4.86602540378444 -4.33012701892219,-2.55919290347075 4.82903757255504 -4.43265213518105,-2.61566147532566 4.78801075360672 -4.53045857066461,-2.66913060635886 4.74314482547739 -4.62306982225067,-2.71933980033865 4.694658370459 -4.71003469723075,-2.76604444311898 4.64278760968654 -4.79092951147563,-2.80901699437495 4.58778525229247 -4.86536015358183,-2.84804809615642 4.5299192642332 -4.93296400494274,-2.88294759285893 4.46947156278589 -4.99341170639005,-2.9135454576426 4.4067366430758 -5.0464087627985,-2.93969262078591 4.34202014332567 -5.0916969778365,-2.96126169593832 4.275637355817 -5.12905571187275,-2.9781476007338 4.20791169081776 -5.1583029569103,-2.99026806874157 4.13917310096007 -5.17929622331126,-2.99756405025982 4.06975647374412 -5.19193323399196,-3.0 4.0 -5.19615242270663,-2.99756405025982 3.93024352625587 -5.19193323399196,-2.99026806874157 3.86082689903993 -5.17929622331126,-2.9781476007338 3.79208830918224 -5.1583029569103,-2.96126169593832 3.724362644183 -5.12905571187275, # -2.93969262078591 3.65797985667433 -5.0916969778365,-2.9135454576426 3.5932633569242 -5.0464087627985,-2.88294759285893 3.53052843721411 -4.99341170639005,-2.84804809615642 3.4700807357668 -4.93296400494274,-2.80901699437495 3.41221474770753 -4.86536015358183,-2.76604444311898 3.35721239031346 -4.79092951147563,-2.71933980033865 3.305341629541 -4.71003469723075,-2.66913060635886 3.25685517452261 -4.62306982225067,-2.61566147532566 3.21198924639328 -4.53045857066461,-2.55919290347075 3.17096242744496 -4.43265213518105,-2.5 3.13397459621556 -4.33012701892219,-2.43837114678908 3.10120595370083 -4.22338271394867,-2.37460659341591 3.07281614543321 -4.11293926778441,-2.30901699437495 3.04894348370485 -3.99933474979739,-2.24192189559967 3.029704273724 -3.88312262977975,-2.17364817766693 3.01519224698779 -3.76486908149863,-2.10452846326765 3.00547810463173 -3.64515022435443,-2.0348994967025 3.0006091729809 -3.52454931658507,-1.9651005032975 3.0006091729809 -3.40365391369044,-1.89547153673235 3.00547810463173 -3.28305300592108,-1.82635182233307 3.01519224698779 -3.16333414877688,-1.75807810440033 3.029704273724 -3.04508060049576,-1.69098300562505 3.04894348370485 -2.92886848047812,-1.62539340658409 3.07281614543321 -2.8152639624911,-1.56162885321092 3.10120595370083 -2.70482051632684,-1.5 3.13397459621556 -2.59807621135332,-1.44080709652925 3.17096242744496 -2.49555109509446,-1.38433852467434 3.21198924639328 -2.3977446596109,-1.33086939364114 3.25685517452261 -2.30513340802484,-1.28066019966135 3.305341629541 -2.21816853304476,-1.23395555688102 3.35721239031346 -2.13727371879988,-1.19098300562505 3.41221474770753 -2.06284307669368,-1.15195190384357 3.4700807357668 -1.99523922533277,-1.11705240714107 3.53052843721411 -1.93479152388545,-1.0864545423574 3.5932633569242 -1.88179446747701,-1.06030737921409 3.65797985667433 -1.83650625243901,-1.03873830406168 3.724362644183 -1.79914751840276,-1.02185239926619 3.79208830918224 -1.76990027336521,-1.00973193125843 3.86082689903993 -1.74890700696425,-1.00243594974018 3.93024352625587 -1.73626999628355,-1.0 4.0 -1.73205080756888) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-1.0 4.0 -1.73205080756888,-1.00243594974018 4.06975647374412 -1.73626999628355,-1.00973193125843 4.13917310096007 -1.74890700696425,-1.02185239926619 4.20791169081776 -1.76990027336521,-1.03873830406168 4.275637355817 -1.79914751840276,-1.06030737921409 4.34202014332567 -1.83650625243901,-1.0864545423574 4.4067366430758 -1.88179446747701,-1.11705240714107 4.46947156278589 -1.93479152388545,-1.15195190384357 4.52991926423321 -1.99523922533277,-1.19098300562505 4.58778525229247 -2.06284307669368,-1.23395555688102 4.64278760968654 -2.13727371879988,-1.28066019966135 4.694658370459 -2.21816853304476,-1.33086939364114 4.74314482547739 -2.30513340802484,-1.38433852467434 4.78801075360672 -2.3977446596109,-1.44080709652925 4.82903757255504 -2.49555109509446,-1.5 4.86602540378444 -2.59807621135332,-1.56162885321092 4.89879404629917 -2.70482051632684,-1.62539340658409 4.92718385456679 -2.8152639624911,-1.69098300562505 4.95105651629515 -2.92886848047812,-1.75807810440033 4.970295726276 -3.04508060049576,-1.82635182233307 4.98480775301221 -3.16333414877688,-1.89547153673235 4.99452189536827 -3.28305300592108,-1.9651005032975 4.99939082701909 -3.40365391369044,-2.0348994967025 4.99939082701909 -3.52454931658507,-2.10452846326765 4.99452189536827 -3.64515022435443,-2.17364817766693 4.98480775301221 -3.76486908149863,-2.24192189559967 4.970295726276 -3.88312262977975,-2.30901699437495 4.95105651629515 -3.99933474979739,-2.37460659341591 4.92718385456679 -4.11293926778441,-2.43837114678908 4.89879404629917 -4.22338271394867,-2.5 4.86602540378444 -4.33012701892219,-2.55919290347075 4.82903757255504 -4.43265213518105,-2.61566147532566 4.78801075360672 -4.53045857066461,-2.66913060635886 4.74314482547739 -4.62306982225067,-2.71933980033865 4.694658370459 -4.71003469723075,-2.76604444311898 4.64278760968654 -4.79092951147563,-2.80901699437495 4.58778525229247 -4.86536015358183,-2.84804809615642 4.5299192642332 -4.93296400494274,-2.88294759285893 4.46947156278589 -4.99341170639005,-2.9135454576426 4.4067366430758 -5.0464087627985,-2.93969262078591 4.34202014332567 -5.0916969778365,-2.96126169593832 4.275637355817 -5.12905571187275,-2.9781476007338 4.20791169081776 -5.1583029569103,-2.99026806874157 4.13917310096007 -5.17929622331126,-2.99756405025982 4.06975647374412 -5.19193323399196,-3.0 4.0 -5.19615242270663,-2.99756405025982 3.93024352625587 -5.19193323399196,-2.99026806874157 3.86082689903993 -5.17929622331126,-2.9781476007338 3.79208830918224 -5.1583029569103,-2.96126169593832 3.724362644183 -5.12905571187275,' + '-2.93969262078591 3.65797985667433 -5.0916969778365,-2.9135454576426 3.5932633569242 -5.0464087627985,-2.88294759285893 3.53052843721411 -4.99341170639005,-2.84804809615642 3.4700807357668 -4.93296400494274,-2.80901699437495 3.41221474770753 -4.86536015358183,-2.76604444311898 3.35721239031346 -4.79092951147563,-2.71933980033865 3.305341629541 -4.71003469723075,-2.66913060635886 3.25685517452261 -4.62306982225067,-2.61566147532566 3.21198924639328 -4.53045857066461,-2.55919290347075 3.17096242744496 -4.43265213518105,-2.5 3.13397459621556 -4.33012701892219,-2.43837114678908 3.10120595370083 -4.22338271394867,-2.37460659341591 3.07281614543321 -4.11293926778441,-2.30901699437495 3.04894348370485 -3.99933474979739,-2.24192189559967 3.029704273724 -3.88312262977975,-2.17364817766693 3.01519224698779 -3.76486908149863,-2.10452846326765 3.00547810463173 -3.64515022435443,-2.0348994967025 3.0006091729809 -3.52454931658507,-1.9651005032975 3.0006091729809 -3.40365391369044,-1.89547153673235 3.00547810463173 -3.28305300592108,-1.82635182233307 3.01519224698779 -3.16333414877688,-1.75807810440033 3.029704273724 -3.04508060049576,-1.69098300562505 3.04894348370485 -2.92886848047812,-1.62539340658409 3.07281614543321 -2.8152639624911,-1.56162885321092 3.10120595370083 -2.70482051632684,-1.5 3.13397459621556 -2.59807621135332,-1.44080709652925 3.17096242744496 -2.49555109509446,-1.38433852467434 3.21198924639328 -2.3977446596109,-1.33086939364114 3.25685517452261 -2.30513340802484,-1.28066019966135 3.305341629541 -2.21816853304476,-1.23395555688102 3.35721239031346 -2.13727371879988,-1.19098300562505 3.41221474770753 -2.06284307669368,-1.15195190384357 3.4700807357668 -1.99523922533277,-1.11705240714107 3.53052843721411 -1.93479152388545,-1.0864545423574 3.5932633569242 -1.88179446747701,-1.06030737921409 3.65797985667433 -1.83650625243901,-1.03873830406168 3.724362644183 -1.79914751840276,-1.02185239926619 3.79208830918224 -1.76990027336521,-1.00973193125843 3.86082689903993 -1.74890700696425,-1.00243594974018 3.93024352625587 -1.73626999628355,-1.0 4.0 -1.73205080756888)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):27 # EntityHandle (String) = 1D7 # LINESTRING Z (-1.0 2.0 -1.73205080756888,-0.983288972510522 2.03582232791524 -1.70310645891042,-0.967858303543227 2.07387296203834 -1.67637975626429,-0.953782068732337 2.11396923855472 -1.65199900239256,-0.941127841688774 2.15591867344963 -1.6300812382226,-0.929956369609942 2.19951988653655 -1.61073168098672,-0.92032128166002 2.24456356819194 -1.59404321912206,-0.912268831520699 2.29083348415575 -1.58009596635534,-0.905837675348257 2.33810751357387 -1.56895687711326,-0.901058686202915 2.38615871529951 -1.56067942510471,-0.89795480584129 2.43475641733454 -1.55530334661776,-0.896540934583439 2.48366732418105 -1.5528544497638,-0.896823859783196 2.53265663678705 -1.55334449058452,-0.898802223245158 2.58148917971011 -1.55677111661648,-0.902466527744776 2.62993053008786 -1.56311787818422,-0.907799182620207 2.67774814299567 -1.5723543073677,-0.9147745882171 2.72471246778926 -1.58443606426492,-0.923359258780906 2.7705980500731 -1.59930514984767,-0.933511983206783 2.81518461400453 -1.61689018438853,-0.945184022875394 2.85825811973811 -1.63710675012253,-0.958319345624882 2.89961179093367 -1.65985779649846,-0.972854894735838 2.93904710739563 -1.68503410607454,-0.988720891637972 2.97637475807832 -1.71251481882177,-1.00584117088534 3.01141554988232 -1.74216801231798,-1.02413354579207 3.04400126787917 -1.77385133504753,-1.04351020297329 3.07397548283483 -1.80741268976625,-1.06387812389736 3.10119430215541 -1.84269096365129,-1.08513953142555 3.12552706065018 -1.87951680173053,-1.1071923591957 3.14685694779575 -1.917713419879,-1.12993074159648 3.16508156849045 -1.95709745347909,-1.15324552198012 3.18011343460661 -1.99747983767086,-1.17702477667387 3.1918803849814 -2.03866671496655,-1.20115435227475 3.20032593182975 -2.08046036587236,-1.22551841364822 3.2054095319166 -2.12266015804993,-1.25 3.20710678118655 -2.1650635094611,-1.27448158635178 3.2054095319166 -2.20746686087227,-1.29884564772525 3.20032593182975 -2.24966665304983,-1.32297522332613 3.1918803849814 -2.29146030395564,-1.34675447801988 3.18011343460661 -2.33264718125133,-1.37006925840352 3.16508156849045 -2.3730295654431,-1.3928076408043 3.14685694779575 -2.41241359904319,-1.41486046857445 3.12552706065018 -2.45061021719166,-1.43612187610264 3.10119430215541 -2.48743605527091,-1.45648979702671 3.07397548283483 -2.52271432915594,-1.47586645420793 3.04400126787917 -2.55627568387467,-1.49415882911466 3.01141554988232 -2.58795900660421,-1.51127910836203 2.97637475807832 -2.61761220010042,-1.52714510526416 2.93904710739563 -2.64509291284765,-1.54168065437512 2.89961179093367 -2.67026922242374,-1.55481597712461 2.85825811973811 -2.69302026879967,-1.56648801679322 2.81518461400453 -2.71323683453366,-1.57664074121909 2.7705980500731 -2.73082186907453,-1.5852254117829 2.72471246778926 -2.74569095465728,-1.59220081737979 2.67774814299567 -2.7577727115545,-1.59753347225522 2.62993053008785 -2.76700914073797,-1.60119777675484 2.58148917971011 -2.77335590230571,-1.6031761402168 2.53265663678705 -2.77678252833767,-1.60345906541656 2.48366732418105 -2.77727256915839,-1.60204519415871 2.43475641733454 -2.77482367230443,-1.59894131379708 2.38615871529951 -2.76944759381748,-1.59416232465174 2.33810751357387 -2.76117014180893,-1.5877311684793 2.29083348415575 -2.75003105256685,-1.57967871833998 2.24456356819194 -2.73608379980013,-1.57004363039006 2.19951988653655 -2.71939533793547,-1.55887215831123 2.15591867344963 -2.7000457806996,-1.54621793126766 2.11396923855472 -2.67812801652963,-1.53214169645677 2.07387296203834 -2.6537472626579,-1.51671102748948 2.03582232791524 -2.62702056001177,-1.5 2.0 -2.59807621135332) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (-1.0 2.0 -1.73205080756888,-0.983288972510522 2.03582232791524 -1.70310645891042,-0.967858303543227 2.07387296203834 -1.67637975626429,-0.953782068732337 2.11396923855472 -1.65199900239256,-0.941127841688774 2.15591867344963 -1.6300812382226,-0.929956369609942 2.19951988653655 -1.61073168098672,-0.92032128166002 2.24456356819194 -1.59404321912206,-0.912268831520699 2.29083348415575 -1.58009596635534,-0.905837675348257 2.33810751357387 -1.56895687711326,-0.901058686202915 2.38615871529951 -1.56067942510471,-0.89795480584129 2.43475641733454 -1.55530334661776,-0.896540934583439 2.48366732418105 -1.5528544497638,-0.896823859783196 2.53265663678705 -1.55334449058452,-0.898802223245158 2.58148917971011 -1.55677111661648,-0.902466527744776 2.62993053008786 -1.56311787818422,-0.907799182620207 2.67774814299567 -1.5723543073677,-0.9147745882171 2.72471246778926 -1.58443606426492,-0.923359258780906 2.7705980500731 -1.59930514984767,-0.933511983206783 2.81518461400453 -1.61689018438853,-0.945184022875394 2.85825811973811 -1.63710675012253,-0.958319345624882 2.89961179093367 -1.65985779649846,-0.972854894735838 2.93904710739563 -1.68503410607454,-0.988720891637972 2.97637475807832 -1.71251481882177,-1.00584117088534 3.01141554988232 -1.74216801231798,-1.02413354579207 3.04400126787917 -1.77385133504753,-1.04351020297329 3.07397548283483 -1.80741268976625,-1.06387812389736 3.10119430215541 -1.84269096365129,-1.08513953142555 3.12552706065018 -1.87951680173053,-1.1071923591957 3.14685694779575 -1.917713419879,-1.12993074159648 3.16508156849045 -1.95709745347909,-1.15324552198012 3.18011343460661 -1.99747983767086,-1.17702477667387 3.1918803849814 -2.03866671496655,-1.20115435227475 3.20032593182975 -2.08046036587236,-1.22551841364822 3.2054095319166 -2.12266015804993,-1.25 3.20710678118655 -2.1650635094611,-1.27448158635178 3.2054095319166 -2.20746686087227,-1.29884564772525 3.20032593182975 -2.24966665304983,-1.32297522332613 3.1918803849814 -2.29146030395564,-1.34675447801988 3.18011343460661 -2.33264718125133,-1.37006925840352 3.16508156849045 -2.3730295654431,-1.3928076408043 3.14685694779575 -2.41241359904319,-1.41486046857445 3.12552706065018 -2.45061021719166,-1.43612187610264 3.10119430215541 -2.48743605527091,-1.45648979702671 3.07397548283483 -2.52271432915594,-1.47586645420793 3.04400126787917 -2.55627568387467,-1.49415882911466 3.01141554988232 -2.58795900660421,-1.51127910836203 2.97637475807832 -2.61761220010042,-1.52714510526416 2.93904710739563 -2.64509291284765,-1.54168065437512 2.89961179093367 -2.67026922242374,-1.55481597712461 2.85825811973811 -2.69302026879967,-1.56648801679322 2.81518461400453 -2.71323683453366,-1.57664074121909 2.7705980500731 -2.73082186907453,-1.5852254117829 2.72471246778926 -2.74569095465728,-1.59220081737979 2.67774814299567 -2.7577727115545,-1.59753347225522 2.62993053008785 -2.76700914073797,-1.60119777675484 2.58148917971011 -2.77335590230571,-1.6031761402168 2.53265663678705 -2.77678252833767,-1.60345906541656 2.48366732418105 -2.77727256915839,-1.60204519415871 2.43475641733454 -2.77482367230443,-1.59894131379708 2.38615871529951 -2.76944759381748,-1.59416232465174 2.33810751357387 -2.76117014180893,-1.5877311684793 2.29083348415575 -2.75003105256685,-1.57967871833998 2.24456356819194 -2.73608379980013,-1.57004363039006 2.19951988653655 -2.71939533793547,-1.55887215831123 2.15591867344963 -2.7000457806996,-1.54621793126766 2.11396923855472 -2.67812801652963,-1.53214169645677 2.07387296203834 -2.6537472626579,-1.51671102748948 2.03582232791524 -2.62702056001177,-1.5 2.0 -2.59807621135332)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):28 # EntityHandle (String) = 1D8 # POLYGON Z ((-0.5 2.0 -0.866025403784439,-0.5 3.0 -0.866025403784439,-1.0 3.0 -1.73205080756888,-1.0 2.0 -1.73205080756888,-0.5 2.0 -0.866025403784439)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((-0.5 2.0 -0.866025403784439,-0.5 3.0 -0.866025403784439,-1.0 3.0 -1.73205080756888,-1.0 2.0 -1.73205080756888,-0.5 2.0 -0.866025403784439))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):29 # EntityHandle (String) = 1D9 # POLYGON Z ((-1.5 4.0 -2.59807621135332,-2.0 4.0 -3.46410161513776,-2.0 3.0 -3.46410161513776,-1.5 3.0 -2.59807621135332,-1.5 4.0 -2.59807621135332)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((-1.5 4.0 -2.59807621135332,-2.0 4.0 -3.46410161513776,-2.0 3.0 -3.46410161513776,-1.5 3.0 -2.59807621135332,-1.5 4.0 -2.59807621135332))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):30 # EntityHandle (String) = 1DB # POLYGON Z ((-4.0 8.0 -6.92820323027551,-4.5 8.0 -7.79422863405995,-4.5 9.0 -7.79422863405995,-4.0 9.0 -6.92820323027551,-4.0 8.0 -6.92820323027551)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((-4.0 8.0 -6.92820323027551,-4.5 8.0 -7.79422863405995,-4.5 9.0 -7.79422863405995,-4.0 9.0 -6.92820323027551,-4.0 8.0 -6.92820323027551))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):31 # EntityHandle (String) = 1DC # LINESTRING (-1.0 2.0,-1.07692307692308 2.15384615384615,-1.15384615384615 2.30769230769231,-1.23076923076923 2.46153846153846,-1.30769230769231 2.61538461538461,-1.38461538461538 2.76923076923077,-1.46153846153846 2.92307692307692,-1.53846153846154 3.07692307692308,-1.61538461538461 3.23076923076923,-1.69230769230769 3.38461538461538,-1.76923076923077 3.53846153846154,-1.84615384615384 3.69230769230769,-1.92307692307692 3.84615384615385,-2.0 4.0,-2.07692307692307 4.15384615384615,-2.15384615384615 4.30769230769231,-2.23076923076923 4.46153846153846,-2.30769230769231 4.61538461538462,-2.38461538461538 4.76923076923077,-2.46153846153846 4.92307692307692,-2.53846153846154 5.07692307692308,-2.61538461538461 5.23076923076923,-2.69230769230769 5.38461538461538,-2.76923076923077 5.53846153846154,-2.84615384615384 5.69230769230769,-2.92307692307692 5.84615384615385,-3.0 6.0,-3.07692307692308 6.15384615384615,-3.15384615384615 6.30769230769231,-3.23076923076923 6.46153846153846,-3.30769230769231 6.61538461538462,-3.38461538461538 6.76923076923077,-3.46153846153846 6.92307692307692,-3.53846153846154 7.07692307692308,-3.61538461538461 7.23076923076923,-3.69230769230769 7.38461538461539,-3.76923076923077 7.53846153846154,-3.84615384615384 7.69230769230769,-3.92307692307692 7.84615384615385,-4.0 8.0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-1.0 2.0,-1.07692307692308 2.15384615384615,-1.15384615384615 2.30769230769231,-1.23076923076923 2.46153846153846,-1.30769230769231 2.61538461538461,-1.38461538461538 2.76923076923077,-1.46153846153846 2.92307692307692,-1.53846153846154 3.07692307692308,-1.61538461538461 3.23076923076923,-1.69230769230769 3.38461538461538,-1.76923076923077 3.53846153846154,-1.84615384615384 3.69230769230769,-1.92307692307692 3.84615384615385,-2.0 4.0,-2.07692307692307 4.15384615384615,-2.15384615384615 4.30769230769231,-2.23076923076923 4.46153846153846,-2.30769230769231 4.61538461538462,-2.38461538461538 4.76923076923077,-2.46153846153846 4.92307692307692,-2.53846153846154 5.07692307692308,-2.61538461538461 5.23076923076923,-2.69230769230769 5.38461538461538,-2.76923076923077 5.53846153846154,-2.84615384615384 5.69230769230769,-2.92307692307692 5.84615384615385,-3.0 6.0,-3.07692307692308 6.15384615384615,-3.15384615384615 6.30769230769231,-3.23076923076923 6.46153846153846,-3.30769230769231 6.61538461538462,-3.38461538461538 6.76923076923077,-3.46153846153846 6.92307692307692,-3.53846153846154 7.07692307692308,-3.61538461538461 7.23076923076923,-3.69230769230769 7.38461538461539,-3.76923076923077 7.53846153846154,-3.84615384615384 7.69230769230769,-3.92307692307692 7.84615384615385,-4.0 8.0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):32 # EntityHandle (String) = 1DD # LINESTRING (-4.0 1.0,-3.81418685412768 0.987348067229724,-3.62887944840607 0.975707614760869,-3.44458352298589 0.966090122894857,-3.26180481801783 0.959507071933107,-3.08104907365262 0.956969942177043,-2.90282203004096 0.959490213928084,-2.72762942733357 0.968079367487651,-2.55597700568115 0.983748883157167,-2.38837050523441 1.00751024123805,-2.22531566614407 1.04037492203173,-2.06731822856083 1.08335440583961,-1.91488393263541 1.13746017296313,-1.76851851851852 1.2037037037037,-1.62872772636086 1.28309647836275,-1.49601729631315 1.37664997724169,-1.3708929685261 1.48537568064195,-1.25386048315042 1.61028506886495,-1.14542558033682 1.75238962221211,-1.04609400023601 1.91270082098484,-0.956350410492422 2.09218800047202,-0.876194811106054 2.29085116067364,-0.805142534432475 2.50772096630085,-0.742687840320977 2.74178593705221,-0.688324988620847 2.99203459262631,-0.641548239181376 3.25745545272172,-0.601851851851852 3.53703703703703,-0.568730086481566 3.82976786527082,-0.541677202919806 4.13463645712166,-0.520187461015863 4.45063133228814,-0.503755120619026 4.77674101046882,-0.491874441578583 5.11195401136229,-0.484039683743826 5.45525885466714,-0.479745106964042 5.80564406008193,-0.478484971088521 6.16209814730525,-0.479753535966554 6.52360963603567,-0.483045061447428 6.88916704597178,-0.487853807380435 7.25775889681216,-0.493674033614862 7.62837370825537,-0.5 8.0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-4.0 1.0,-3.81418685412768 0.987348067229724,-3.62887944840607 0.975707614760869,-3.44458352298589 0.966090122894857,-3.26180481801783 0.959507071933107,-3.08104907365262 0.956969942177043,-2.90282203004096 0.959490213928084,-2.72762942733357 0.968079367487651,-2.55597700568115 0.983748883157167,-2.38837050523441 1.00751024123805,-2.22531566614407 1.04037492203173,-2.06731822856083 1.08335440583961,-1.91488393263541 1.13746017296313,-1.76851851851852 1.2037037037037,-1.62872772636086 1.28309647836275,-1.49601729631315 1.37664997724169,-1.3708929685261 1.48537568064195,-1.25386048315042 1.61028506886495,-1.14542558033682 1.75238962221211,-1.04609400023601 1.91270082098484,-0.956350410492422 2.09218800047202,-0.876194811106054 2.29085116067364,-0.805142534432475 2.50772096630085,-0.742687840320977 2.74178593705221,-0.688324988620847 2.99203459262631,-0.641548239181376 3.25745545272172,-0.601851851851852 3.53703703703703,-0.568730086481566 3.82976786527082,-0.541677202919806 4.13463645712166,-0.520187461015863 4.45063133228814,-0.503755120619026 4.77674101046882,-0.491874441578583 5.11195401136229,-0.484039683743826 5.45525885466714,-0.479745106964042 5.80564406008193,-0.478484971088521 6.16209814730525,-0.479753535966554 6.52360963603567,-0.483045061447428 6.88916704597178,-0.487853807380435 7.25775889681216,-0.493674033614862 7.62837370825537,-0.5 8.0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):33 # EntityHandle (String) = 1DE # POINT Z (-3.5 7.0 -6.06217782649107) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (-3.5 7.0 -6.06217782649107)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):34 # EntityHandle (String) = 1DF # POINT Z (1.0 -2.0 -5.19615242270663) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (1.0 -2.0 -5.19615242270663)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):35 # EntityHandle (String) = 1E0 # LINESTRING Z (0 0 0,0.25 -0.5 -1.29903810567666) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,0.25 -0.5 -1.29903810567666)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):36 # EntityHandle (String) = 1E1 # LINESTRING Z (0.25 -0.5 -1.29903810567666,-0.25 -0.5 -2.1650635094611,1.0 -1.0 -1.73205080756888,0.25 -0.5 -1.29903810567666) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0.25 -0.5 -1.29903810567666,-0.25 -0.5 -2.1650635094611,1.0 -1.0 -1.73205080756888,0.25 -0.5 -1.29903810567666)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):37 # EntityHandle (String) = 1E2 # LINESTRING Z (0.25 -0.5 -1.29903810567666,1 -1 -1.73205080756888,0.5 -1.0 -2.59807621135332,0.25 -0.5 -1.29903810567666) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0.25 -0.5 -1.29903810567666,1 -1 -1.73205080756888,0.5 -1.0 -2.59807621135332,0.25 -0.5 -1.29903810567666)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):38 # EntityHandle (String) = 1E7 # LINESTRING Z (2.78885438199983 -2.89442719099992 -5.19615242270663,2.76889880091653 -2.9234444547489 -5.33123525325721,2.74032532268425 -2.94796278993866 -5.46565997383582,2.70327315441675 -2.96786274570473 -5.59877168071614,2.65792281055334 -2.98304737146295 -5.72992186704258,2.60449523341074 -2.99344268924297 -5.85847158229053,2.54325071677425 -2.99899805410152 -5.98379454516908,2.47448763777266 -2.99968640085941 -6.1052801948005,2.39854100321483 -2.99550437596044 -6.22233666531148,2.31578081747018 -2.98647235380955 -6.33439366934417,2.22661027984464 -2.97263433751074 -6.44090527643885,2.13146382023413 -2.95405774448845 -6.54135257275227,2.03080498262578 -2.93083307803656 -6.63524618915372,1.92512416675824 -2.90307348639549 -6.72212868538223,1.81493623894341 -2.87091421150532 -6.80157677864958,1.70077802368955 -2.8345119301207 -6.87320340583148,1.58320568834623 -2.79404399049737 -6.93665960920016,1.46279203351292 -2.74970754836936 -6.99163623651142,1.34012370241203 -2.70171860642604 -7.03786544716322,1.21579832282211 -2.65031096196872 -7.07512201708822,1.09042159549536 -2.59573506787371 -7.10322443602275,0.964604343244512 -2.5382568124111 -7.12203579180661,0.838959535075416 -2.47815622386382 -7.13146443740534,0.714099299863701 -2.41572610625796 -7.13146443740534,0.590631944124412 -2.35127061285105 -7.12203579180661,0.469158988403815 -2.28510376432794 -7.10322443602275,0.350272236731764 -2.21754791892355 -7.07512201708822,0.234550893411949 -2.148932201926 -7.03786544716322,0.122558741196756 -2.07959090221128 -6.99163623651142,0.014841394594365 -2.00986184362144 -6.93665960920016,-0.088076358310285 -1.94008473912078 -6.87320340583148,-0.185693112570302 -1.87059953574847 -6.80157677864958,-0.277533289171331 -1.8017447584307 -6.72212868538223,-0.363149452004714 -1.73385586072131 -6.63524618915372,-0.442124487731234 -1.66726359050577 -6.54135257275227,-0.514073637915374 -1.60229237863074 -6.44090527643885,-0.57864637352974 -1.53925875830959 -6.33439366934417,-0.635528102697248 -1.47846982300441 -6.22233666531148,-0.684441703351125 -1.42022173029752 -6.1052801948005,-0.725148873345763 -1.36479825904151 -5.98379454516908,-0.757451291440819 -1.31246942681719 -5.85847158229053,-0.781191583502361 -1.2634901744351 -5.72992186704258,-0.796254089213832 -1.21809912388944 -5.59877168071614,-0.802565425561482 -1.1765174158158 -5.46565997383582,-0.80009484434904 -1.13894763211612 -5.33123525325721,-0.788854381999831 -1.10557280900008 -5.19615242270663,-0.768898800916532 -1.0765555452511 -5.06106959215606,-0.740325322684253 -1.05203721006134 -4.92664487157745,-0.703273154416746 -1.03213725429527 -4.79353316469713, # -0.65792281055334 -1.01695262853705 -4.66238297837069,-0.604495233410736 -1.00655731075703 -4.53383326312274,-0.543250716774252 -1.00100194589848 -4.40851030024419,-0.474487637772662 -1.00031359914059 -4.28702465061277,-0.398541003214825 -1.00449562403956 -4.16996818010179,-0.315780817470174 -1.01352764619045 -4.0579111760691,-0.226610279844633 -1.02736566248926 -3.95139956897441,-0.131463820234124 -1.04594225551155 -3.85095227266099,-0.03080498262578 -1.06916692196344 -3.75705865625955,0.074875833241763 -1.09692651360451 -3.67017616003104,0.185063761056595 -1.12908578849468 -3.59072806676368,0.299221976310455 -1.1654880698793 -3.51910143958179,0.416794311653771 -1.20595600950263 -3.45564523621311,0.537207966487078 -1.25029245163064 -3.40066860890185,0.659876297587969 -1.29828139357396 -3.35443939825005,0.784201677177895 -1.34968903803128 -3.31718282832505,0.909578404504639 -1.40426493212629 -3.28908040939052,1.03539565675549 -1.4617431875889 -3.27026905360665,1.16104046492459 -1.52184377613619 -3.26084040800793,1.2859007001363 -1.58427389374204 -3.26084040800793,1.40936805587559 -1.64872938714895 -3.27026905360665,1.53084101159619 -1.71489623567206 -3.28908040939052,1.64972776326824 -1.78245208107646 -3.31718282832505,1.76544910658805 -1.851067798074 -3.35443939825005,1.87744125880325 -1.92040909778872 -3.40066860890185,1.98515860540564 -1.99013815637856 -3.45564523621311,2.08807635831029 -2.05991526087922 -3.51910143958179,2.1856931125703 -2.12940046425153 -3.59072806676368,2.27753328917133 -2.1982552415693 -3.67017616003104,2.36314945200472 -2.26614413927869 -3.75705865625955,2.44212448773124 -2.33273640949423 -3.85095227266099,2.51407363791538 -2.39770762136926 -3.95139956897441,2.57864637352974 -2.46074124169041 -4.0579111760691,2.63552810269725 -2.52153017699559 -4.16996818010179,2.68444170335113 -2.57977826970249 -4.28702465061277,2.72514887334576 -2.63520174095849 -4.40851030024419,2.75745129144082 -2.68753057318281 -4.53383326312274,2.78119158350236 -2.7365098255649 -4.66238297837069,2.79625408921383 -2.78190087611056 -4.79353316469713,2.80256542556148 -2.82348258418421 -4.92664487157744,2.80009484434904 -2.86105236788389 -5.06106959215606,2.78885438199983 -2.89442719099992 -5.19615242270663) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2.78885438199983 -2.89442719099992 -5.19615242270663,2.76889880091653 -2.9234444547489 -5.33123525325721,2.74032532268425 -2.94796278993866 -5.46565997383582,2.70327315441675 -2.96786274570473 -5.59877168071614,2.65792281055334 -2.98304737146295 -5.72992186704258,2.60449523341074 -2.99344268924297 -5.85847158229053,2.54325071677425 -2.99899805410152 -5.98379454516908,2.47448763777266 -2.99968640085941 -6.1052801948005,2.39854100321483 -2.99550437596044 -6.22233666531148,2.31578081747018 -2.98647235380955 -6.33439366934417,2.22661027984464 -2.97263433751074 -6.44090527643885,2.13146382023413 -2.95405774448845 -6.54135257275227,2.03080498262578 -2.93083307803656 -6.63524618915372,1.92512416675824 -2.90307348639549 -6.72212868538223,1.81493623894341 -2.87091421150532 -6.80157677864958,1.70077802368955 -2.8345119301207 -6.87320340583148,1.58320568834623 -2.79404399049737 -6.93665960920016,1.46279203351292 -2.74970754836936 -6.99163623651142,1.34012370241203 -2.70171860642604 -7.03786544716322,1.21579832282211 -2.65031096196872 -7.07512201708822,1.09042159549536 -2.59573506787371 -7.10322443602275,0.964604343244512 -2.5382568124111 -7.12203579180661,0.838959535075416 -2.47815622386382 -7.13146443740534,0.714099299863701 -2.41572610625796 -7.13146443740534,0.590631944124412 -2.35127061285105 -7.12203579180661,0.469158988403815 -2.28510376432794 -7.10322443602275,0.350272236731764 -2.21754791892355 -7.07512201708822,0.234550893411949 -2.148932201926 -7.03786544716322,0.122558741196756 -2.07959090221128 -6.99163623651142,0.014841394594365 -2.00986184362144 -6.93665960920016,-0.088076358310285 -1.94008473912078 -6.87320340583148,-0.185693112570302 -1.87059953574847 -6.80157677864958,-0.277533289171331 -1.8017447584307 -6.72212868538223,-0.363149452004714 -1.73385586072131 -6.63524618915372,-0.442124487731234 -1.66726359050577 -6.54135257275227,-0.514073637915374 -1.60229237863074 -6.44090527643885,-0.57864637352974 -1.53925875830959 -6.33439366934417,-0.635528102697248 -1.47846982300441 -6.22233666531148,-0.684441703351125 -1.42022173029752 -6.1052801948005,-0.725148873345763 -1.36479825904151 -5.98379454516908,-0.757451291440819 -1.31246942681719 -5.85847158229053,-0.781191583502361 -1.2634901744351 -5.72992186704258,-0.796254089213832 -1.21809912388944 -5.59877168071614,-0.802565425561482 -1.1765174158158 -5.46565997383582,-0.80009484434904 -1.13894763211612 -5.33123525325721,-0.788854381999831 -1.10557280900008 -5.19615242270663,-0.768898800916532 -1.0765555452511 -5.06106959215606,-0.740325322684253 -1.05203721006134 -4.92664487157745,-0.703273154416746 -1.03213725429527 -4.79353316469713,-0.65792281055334 -1.01695262853705 -4.66238297837069,-0.604495233410736 -1.00655731075703 -4.53383326312274,-0.543250716774252 -1.00100194589848 -4.40851030024419,-0.474487637772662 -1.00031359914059 -4.28702465061277,-0.398541003214825 -1.00449562403956 -4.16996818010179,-0.315780817470174 -1.01352764619045 -4.0579111760691,' + '-0.226610279844633 -1.02736566248926 -3.95139956897441,-0.131463820234124 -1.04594225551155 -3.85095227266099,-0.03080498262578 -1.06916692196344 -3.75705865625955,0.074875833241763 -1.09692651360451 -3.67017616003104,0.185063761056595 -1.12908578849468 -3.59072806676368,0.299221976310455 -1.1654880698793 -3.51910143958179,0.416794311653771 -1.20595600950263 -3.45564523621311,0.537207966487078 -1.25029245163064 -3.40066860890185,0.659876297587969 -1.29828139357396 -3.35443939825005,0.784201677177895 -1.34968903803128 -3.31718282832505,0.909578404504639 -1.40426493212629 -3.28908040939052,1.03539565675549 -1.4617431875889 -3.27026905360665,1.16104046492459 -1.52184377613619 -3.26084040800793,1.2859007001363 -1.58427389374204 -3.26084040800793,1.40936805587559 -1.64872938714895 -3.27026905360665,1.53084101159619 -1.71489623567206 -3.28908040939052,1.64972776326824 -1.78245208107646 -3.31718282832505,1.76544910658805 -1.851067798074 -3.35443939825005,1.87744125880325 -1.92040909778872 -3.40066860890185,1.98515860540564 -1.99013815637856 -3.45564523621311,2.08807635831029 -2.05991526087922 -3.51910143958179,2.1856931125703 -2.12940046425153 -3.59072806676368,2.27753328917133 -2.1982552415693 -3.67017616003104,2.36314945200472 -2.26614413927869 -3.75705865625955,2.44212448773124 -2.33273640949423 -3.85095227266099,2.51407363791538 -2.39770762136926 -3.95139956897441,2.57864637352974 -2.46074124169041 -4.0579111760691,2.63552810269725 -2.52153017699559 -4.16996818010179,2.68444170335113 -2.57977826970249 -4.28702465061277,2.72514887334576 -2.63520174095849 -4.40851030024419,2.75745129144082 -2.68753057318281 -4.53383326312274,2.78119158350236 -2.7365098255649 -4.66238297837069,2.79625408921383 -2.78190087611056 -4.79353316469713,2.80256542556148 -2.82348258418421 -4.92664487157744,2.80009484434904 -2.86105236788389 -5.06106959215606,2.78885438199983 -2.89442719099992 -5.19615242270663)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):39 # EntityHandle (String) = 1E8 # LINESTRING Z (2.0 -2.0 -3.46410161513775,1.0 -2.0 -5.19615242270663) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2.0 -2.0 -3.46410161513775,1.0 -2.0 -5.19615242270663)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):40 # EntityHandle (String) = 1E9 # LINESTRING Z (1.0 -2.0 -5.19615242270663,0.0 -2.0 -6.92820323027551) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1.0 -2.0 -5.19615242270663,0.0 -2.0 -6.92820323027551)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):41 # EntityHandle (String) = 1EA # LINESTRING Z (0.25 -1.5 -4.76313972081441,1.0 -2.0 -5.19615242270663) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0.25 -1.5 -4.76313972081441,1.0 -2.0 -5.19615242270663)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):42 # EntityHandle (String) = 1EB # LINESTRING Z (1.0 -2.0 -5.19615242270663,1.75 -2.5 -5.62916512459885) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1.0 -2.0 -5.19615242270663,1.75 -2.5 -5.62916512459885)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):43 # EntityHandle (String) = 1EC # LINESTRING Z (2.0 -2.0 -3.46410161513775,2.04988140556792 -2.03487823687206 -3.49852624302284,2.09464789446162 -2.06958655048003 -3.54122153501056,2.13408136884713 -2.10395584540888 -3.59197948393006,2.16798971280107 -2.1378186779085 -3.65055280215638,2.19620772828016 -2.17101007166283 -3.7166561263709,2.21859793994945 -2.2033683215379 -3.78996740782271,2.23505126494835 -2.23473578139294 -3.87012948131781,2.24548754433133 -2.2649596321166 -3.956751805292,2.2498559335943 -2.29389262614624 -4.04941236449012,2.24813515038388 -2.32139380484327 -4.14765972598196,2.2403335781829 -2.3473291852295 -4.25101523849813,2.2264892254669 -2.3715724127387 -4.35897536437091,2.2066695405307 -2.39400537680336 -4.47101413271915,2.18097108288703 -2.41451878627752 -4.58658570192556,2.14951905283833 -2.43301270189222 -4.70512701892219,2.11246668151345 -2.44939702314958 -4.82606056232836,2.069994484341 -2.46359192728339 -4.94879715607678,2.02230938159631 -2.47552825814758 -5.07273883982016,1.96964369030667 -2.485147863138 -5.19728178213388,1.91225399242609 -2.4924038765061 -5.32181922232198,1.85041988479386 -2.49726094768414 -5.44574442649435,1.78444261696682 -2.49969541350955 -5.56845364351315,1.71464362356182 -2.49969541350955 -5.68934904640778,1.64136295825855 -2.49726094768414 -5.80784164492769,1.56495763709223 -2.4924038765061 -5.92335415504372,1.48579989910733 -2.485147863138 -6.03532381141787,1.40427539284642 -2.47552825814758 -6.14320510913943,1.32078129750918 -2.46359192728339 -6.24647246137009,1.2357243879353 -2.44939702314958 -6.34462275995019,1.14951905283833 -2.43301270189222 -6.43717782649107,1.06258527594554 -2.41451878627752 -6.52368674201215,0.975346589879385 -2.39400537680336 -6.60372804377285,0.888228012749189 -2.3715724127387 -6.67691177859673,0.801653977505599 -2.3473291852295 -6.74288140268412,0.716046264145928 -2.32139380484327 -6.80131551865772,0.631821944844409 -2.29389262614623 -6.85192944137827,0.549391352018479 -2.2649596321166 -6.89447658490197,0.469156079230493 -2.23473578139294 -6.92874966382241,0.391507024664251 -2.2033683215379 -6.9545817031442,0.316822486708345 -2.17101007166283 -6.97184685176839,0.245466320924432 -2.1378186779085 -6.98046099562637,0.177786167379516 -2.10395584540888 -6.98038216747516,0.114111756978481 -2.06958655048003 -6.97161075135758,0.054753305048271 -2.03487823687206 -6.95418948073126,0.0 -2.0 -6.92820323027551,-0.049881405567917 -1.96512176312794 -6.89377860239042,-0.094647894461618 -1.93041344951997 -6.8510833104027,-0.134081368847123 -1.89604415459112 -6.8003253614832,-0.167989712801067 -1.8621813220915 -6.74175204325688,-0.196207728280158 -1.82898992833716 -6.67564871904237,-0.218597939949449 -1.7966316784621 -6.60233743759055,-0.235051264948343 -1.76526421860705 -6.52217536409545, # -0.245487544331328 -1.7350403678834 -6.43555304012126,-0.2498559335943 -1.70610737385376 -6.34289248092314,-0.248135150383881 -1.67860619515673 -6.2446451194313,-0.240333578182897 -1.6526708147705 -6.14128960691513,-0.226489225466902 -1.6284275872613 -6.03332948104236,-0.206669540530698 -1.60599462319664 -5.92129071269411,-0.180971082887026 -1.58548121372248 -5.8057191434877,-0.149519052838327 -1.56698729810778 -5.68717782649107,-0.112466681513451 -1.55060297685042 -5.5662442830849,-0.069994484341001 -1.5364080727166 -5.44350768933648,-0.022309381596311 -1.52447174185242 -5.3195660055931,0.030356309693336 -1.514852136862 -5.19502306327939,0.087746007573915 -1.50759612349389 -5.07048562309128,0.149580115206143 -1.50273905231586 -4.94656041891892,0.215557383033179 -1.50030458649045 -4.82385120190011,0.28535637643818 -1.50030458649045 -4.70295579900548,0.35863704174145 -1.50273905231586 -4.58446320048557,0.435042362907775 -1.50759612349389 -4.46895069036954,0.514200100892672 -1.514852136862 -4.35698103399539,0.595724607153583 -1.52447174185242 -4.24909973627383,0.679218702490823 -1.5364080727166 -4.14583238404317,0.764275612064703 -1.55060297685042 -4.04768208546307,0.850480947161672 -1.56698729810778 -3.95512701892219,0.937414724054466 -1.58548121372248 -3.86861810340111,1.02465341012062 -1.60599462319664 -3.78857680164041,1.11177198725081 -1.6284275872613 -3.71539306681653,1.1983460224944 -1.6526708147705 -3.64942344272914,1.28395373585407 -1.67860619515673 -3.59098932675554,1.36817805515559 -1.70610737385376 -3.54037540403499,1.45060864798152 -1.7350403678834 -3.49782826051129,1.53084392076951 -1.76526421860705 -3.46355518159085,1.60849297533575 -1.7966316784621 -3.43772314226906,1.68317751329166 -1.82898992833716 -3.42045799364487,1.75453367907557 -1.8621813220915 -3.41184384978689,1.82221383262049 -1.89604415459112 -3.4119226779381,1.88588824302152 -1.93041344951997 -3.42069409405568,1.94524669495173 -1.96512176312794 -3.438115364682,2.0 -2.0 -3.46410161513775) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2.0 -2.0 -3.46410161513775,2.04988140556792 -2.03487823687206 -3.49852624302284,2.09464789446162 -2.06958655048003 -3.54122153501056,2.13408136884713 -2.10395584540888 -3.59197948393006,2.16798971280107 -2.1378186779085 -3.65055280215638,2.19620772828016 -2.17101007166283 -3.7166561263709,2.21859793994945 -2.2033683215379 -3.78996740782271,2.23505126494835 -2.23473578139294 -3.87012948131781,2.24548754433133 -2.2649596321166 -3.956751805292,2.2498559335943 -2.29389262614624 -4.04941236449012,2.24813515038388 -2.32139380484327 -4.14765972598196,2.2403335781829 -2.3473291852295 -4.25101523849813,2.2264892254669 -2.3715724127387 -4.35897536437091,2.2066695405307 -2.39400537680336 -4.47101413271915,2.18097108288703 -2.41451878627752 -4.58658570192556,2.14951905283833 -2.43301270189222 -4.70512701892219,2.11246668151345 -2.44939702314958 -4.82606056232836,2.069994484341 -2.46359192728339 -4.94879715607678,2.02230938159631 -2.47552825814758 -5.07273883982016,1.96964369030667 -2.485147863138 -5.19728178213388,1.91225399242609 -2.4924038765061 -5.32181922232198,1.85041988479386 -2.49726094768414 -5.44574442649435,1.78444261696682 -2.49969541350955 -5.56845364351315,1.71464362356182 -2.49969541350955 -5.68934904640778,1.64136295825855 -2.49726094768414 -5.80784164492769,1.56495763709223 -2.4924038765061 -5.92335415504372,1.48579989910733 -2.485147863138 -6.03532381141787,1.40427539284642 -2.47552825814758 -6.14320510913943,1.32078129750918 -2.46359192728339 -6.24647246137009,1.2357243879353 -2.44939702314958 -6.34462275995019,1.14951905283833 -2.43301270189222 -6.43717782649107,1.06258527594554 -2.41451878627752 -6.52368674201215,0.975346589879385 -2.39400537680336 -6.60372804377285,0.888228012749189 -2.3715724127387 -6.67691177859673,0.801653977505599 -2.3473291852295 -6.74288140268412,0.716046264145928 -2.32139380484327 -6.80131551865772,0.631821944844409 -2.29389262614623 -6.85192944137827,0.549391352018479 -2.2649596321166 -6.89447658490197,0.469156079230493 -2.23473578139294 -6.92874966382241,0.391507024664251 -2.2033683215379 -6.9545817031442,0.316822486708345 -2.17101007166283 -6.97184685176839,0.245466320924432 -2.1378186779085 -6.98046099562637,0.177786167379516 -2.10395584540888 -6.98038216747516,0.114111756978481 -2.06958655048003 -6.97161075135758,0.054753305048271 -2.03487823687206 -6.95418948073126,0.0 -2.0 -6.92820323027551,-0.049881405567917 -1.96512176312794 -6.89377860239042,-0.094647894461618 -1.93041344951997 -6.8510833104027,-0.134081368847123 -1.89604415459112 -6.8003253614832,-0.167989712801067 -1.8621813220915 -6.74175204325688,-0.196207728280158 -1.82898992833716 -6.67564871904237,-0.218597939949449 -1.7966316784621 -6.60233743759055,' + '-0.235051264948343 -1.76526421860705 -6.52217536409545,-0.245487544331328 -1.7350403678834 -6.43555304012126,-0.2498559335943 -1.70610737385376 -6.34289248092314,-0.248135150383881 -1.67860619515673 -6.2446451194313,-0.240333578182897 -1.6526708147705 -6.14128960691513,-0.226489225466902 -1.6284275872613 -6.03332948104236,-0.206669540530698 -1.60599462319664 -5.92129071269411,-0.180971082887026 -1.58548121372248 -5.8057191434877,-0.149519052838327 -1.56698729810778 -5.68717782649107,-0.112466681513451 -1.55060297685042 -5.5662442830849,-0.069994484341001 -1.5364080727166 -5.44350768933648,-0.022309381596311 -1.52447174185242 -5.3195660055931,0.030356309693336 -1.514852136862 -5.19502306327939,0.087746007573915 -1.50759612349389 -5.07048562309128,0.149580115206143 -1.50273905231586 -4.94656041891892,0.215557383033179 -1.50030458649045 -4.82385120190011,0.28535637643818 -1.50030458649045 -4.70295579900548,0.35863704174145 -1.50273905231586 -4.58446320048557,0.435042362907775 -1.50759612349389 -4.46895069036954,0.514200100892672 -1.514852136862 -4.35698103399539,0.595724607153583 -1.52447174185242 -4.24909973627383,0.679218702490823 -1.5364080727166 -4.14583238404317,0.764275612064703 -1.55060297685042 -4.04768208546307,0.850480947161672 -1.56698729810778 -3.95512701892219,0.937414724054466 -1.58548121372248 -3.86861810340111,1.02465341012062 -1.60599462319664 -3.78857680164041,1.11177198725081 -1.6284275872613 -3.71539306681653,1.1983460224944 -1.6526708147705 -3.64942344272914,1.28395373585407 -1.67860619515673 -3.59098932675554,1.36817805515559 -1.70610737385376 -3.54037540403499,1.45060864798152 -1.7350403678834 -3.49782826051129,1.53084392076951 -1.76526421860705 -3.46355518159085,1.60849297533575 -1.7966316784621 -3.43772314226906,1.68317751329166 -1.82898992833716 -3.42045799364487,1.75453367907557 -1.8621813220915 -3.41184384978689,1.82221383262049 -1.89604415459112 -3.4119226779381,1.88588824302152 -1.93041344951997 -3.42069409405568,1.94524669495173 -1.96512176312794 -3.438115364682,2.0 -2.0 -3.46410161513775)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):44 # EntityHandle (String) = 1ED # LINESTRING Z (0.5 -1.0 -2.59807621135332,0.543577773425908 -1.01791116395762 -2.58464338569351,0.587546417985528 -1.03693648101917 -2.57439309093773,0.631694860183701 -1.05698461927736 -2.56737453409618,0.675811163398452 -1.07795933672482 -2.56362140807291,0.719683545292469 -1.09975994326827 -2.56315172992158,0.763101394483934 -1.12228178409597 -2.5659677543537,0.805856281596113 -1.14541674207787 -2.57205596291479,0.847742959832148 -1.16905375678694 -2.58138712888039,0.888560350271717 -1.19307935764976 -2.59391645756022,0.928112507159618 -1.21737820866727 -2.60958380133721,0.96620955855235 -1.24183366209053 -2.62831394840886,1.00266861780709 -1.26632831839353 -2.65001698384495,1.03731466153743 -1.29074458985506 -2.67458872122829,1.06998136982112 -1.31496526504393 -2.7019112028064,1.10051192462654 -1.33887407149783 -2.73185326575312,1.12875976262485 -1.36235623389463 -2.76427117182176,1.15458927877392 -1.38529902503655 -2.79900929736714,1.17787647729662 -1.40759230700227 -2.83590088042404,1.19850956692819 -1.42912905986906 -2.8747688212557,1.21638949757537 -1.44980589546683 -2.91542653252918,1.23143043581088 -1.46952355369781 -2.95767883503644,1.24356017692077 -1.48818737903916 -3.00132289466106,1.2527204915264 -1.50570777494116 -3.04614919609277,1.25886740511731 -1.52200063393958 -3.09194254861523,1.26197140915283 -1.53698774141742 -3.138483119139,1.2620176027192 -1.55059715107771 -3.18554748752036,1.25900576406208 -1.56276353032509 -3.23290971909991,1.25295035165112 -1.57342847389788 -3.28034244931235,1.24388043477135 -1.58254078424523 -3.32761797516041,1.23183955397484 -1.59005671730331 -3.37450934831362,1.21688551206218 -1.5959401924907 -3.42079146458413,1.19909009659756 -1.60016296591487 -3.46624214454969,1.17853873528923 -1.6027047659583 -3.51064320013621,1.15533008588991 -1.60355339059327 -3.55378148203954,1.12957556258567 -1.6027047659583 -3.59544990295855,1.10139880114707 -1.60016296591487 -3.63544843172717,1.07093506540992 -1.5959401924907 -3.67358505357321,1.03833059793508 -1.59005671730331 -3.70967669189409,1.00374191796432 -1.58254078424523 -3.74355008712442,0.967335070042516 -1.57342847389788 -3.77504262847653,0.929284826913179 -1.56276353032509 -3.80400313456104,0.889773850513921 -1.55059715107771 -3.83029257913998,0.848991815099414 -1.53698774141741 -3.85378475852869,0.807134496701444 -1.52200063393958 -3.87436689744237,0.764402833297081 -1.50570777494116 -3.891940190379,0.72100196019671 -1.48818737903916 -3.90642027593972,0.677140225282558 -1.46952355369781 -3.91773764180954,0.633028188825132 -1.44980589546683 -3.92583795845446,0.588877612678977 -1.42912905986906 -3.93068233993284,0.544900443710183 -1.40759230700227 -3.93224753056917,0.501307796335731 -1.38529902503655 -3.93052601659399,0.458308939059047 -1.36235623389463 -3.92552606221412,0.416110289866958 -1.33887407149783 -3.91727166993992,0.374914425310669 -1.31496526504393 -3.90580246536015,0.334919108027743 -1.29074458985506 -3.89117350691752,0.296316337373485 -1.26632831839353 -3.87345502159809,0.259291427719229 -1.24183366209053 -3.85273206780345,0.224022118842197 -1.21737820866727 -3.82910412702388,0.190677722677547 -1.19307935764975 -3.80268462627299,0.159418310528662 -1.16905375678694 -3.77360039357605,0.13039394463751 -1.14541674207787 -3.7419910491263,0.103743957803975 -1.12228178409597 -3.70800833503176,0.079596284512354 -1.09975994326827 -3.67181538687033,0.058066846776 -1.07795933672482 -3.63358595054991,0.039258997648375 -1.05698461927736 -3.59350354823325,0.023263025071983 -1.03693648101917 -3.55176059733134,0.010155718446952 -1.01791116395762 -3.50855748679486,0.0 -1.0 -3.46410161513776) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0.5 -1.0 -2.59807621135332,0.543577773425908 -1.01791116395762 -2.58464338569351,0.587546417985528 -1.03693648101917 -2.57439309093773,0.631694860183701 -1.05698461927736 -2.56737453409618,0.675811163398452 -1.07795933672482 -2.56362140807291,0.719683545292469 -1.09975994326827 -2.56315172992158,0.763101394483934 -1.12228178409597 -2.5659677543537,0.805856281596113 -1.14541674207787 -2.57205596291479,0.847742959832148 -1.16905375678694 -2.58138712888039,0.888560350271717 -1.19307935764976 -2.59391645756022,0.928112507159618 -1.21737820866727 -2.60958380133721,0.96620955855235 -1.24183366209053 -2.62831394840886,1.00266861780709 -1.26632831839353 -2.65001698384495,1.03731466153743 -1.29074458985506 -2.67458872122829,1.06998136982112 -1.31496526504393 -2.7019112028064,1.10051192462654 -1.33887407149783 -2.73185326575312,1.12875976262485 -1.36235623389463 -2.76427117182176,1.15458927877392 -1.38529902503655 -2.79900929736714,1.17787647729662 -1.40759230700227 -2.83590088042404,1.19850956692819 -1.42912905986906 -2.8747688212557,1.21638949757537 -1.44980589546683 -2.91542653252918,1.23143043581088 -1.46952355369781 -2.95767883503644,1.24356017692077 -1.48818737903916 -3.00132289466106,1.2527204915264 -1.50570777494116 -3.04614919609277,1.25886740511731 -1.52200063393958 -3.09194254861523,1.26197140915283 -1.53698774141742 -3.138483119139,1.2620176027192 -1.55059715107771 -3.18554748752036,1.25900576406208 -1.56276353032509 -3.23290971909991,1.25295035165112 -1.57342847389788 -3.28034244931235,1.24388043477135 -1.58254078424523 -3.32761797516041,1.23183955397484 -1.59005671730331 -3.37450934831362,1.21688551206218 -1.5959401924907 -3.42079146458413,1.19909009659756 -1.60016296591487 -3.46624214454969,1.17853873528923 -1.6027047659583 -3.51064320013621,1.15533008588991 -1.60355339059327 -3.55378148203954,1.12957556258567 -1.6027047659583 -3.59544990295855,1.10139880114707 -1.60016296591487 -3.63544843172717,1.07093506540992 -1.5959401924907 -3.67358505357321,1.03833059793508 -1.59005671730331 -3.70967669189409,1.00374191796432 -1.58254078424523 -3.74355008712442,0.967335070042516 -1.57342847389788 -3.77504262847653,0.929284826913179 -1.56276353032509 -3.80400313456104,0.889773850513921 -1.55059715107771 -3.83029257913998,0.848991815099414 -1.53698774141741 -3.85378475852869,0.807134496701444 -1.52200063393958 -3.87436689744237,0.764402833297081 -1.50570777494116 -3.891940190379,0.72100196019671 -1.48818737903916 -3.90642027593972,0.677140225282558 -1.46952355369781 -3.91773764180954,0.633028188825132 -1.44980589546683 -3.92583795845446,0.588877612678977 -1.42912905986906 -3.93068233993284,0.544900443710183 -1.40759230700227 -3.93224753056917,0.501307796335731 -1.38529902503655 -3.93052601659399,0.458308939059047 -1.36235623389463 -3.92552606221412,0.416110289866958 -1.33887407149783 -3.91727166993992,0.374914425310669 -1.31496526504393 -3.90580246536015,0.334919108027743 -1.29074458985506 -3.89117350691752,0.296316337373485 -1.26632831839353 -3.87345502159809,0.259291427719229 -1.24183366209053 -3.85273206780345,0.224022118842197 -1.21737820866727 -3.82910412702388,0.190677722677547 -1.19307935764975 -3.80268462627299,0.159418310528662 -1.16905375678694 -3.77360039357605,0.13039394463751 -1.14541674207787 -3.7419910491263,0.103743957803975 -1.12228178409597 -3.70800833503176,0.079596284512354 -1.09975994326827 -3.67181538687033,0.058066846776 -1.07795933672482 -3.63358595054991,0.039258997648375 -1.05698461927736 -3.59350354823325,0.023263025071983 -1.03693648101917 -3.55176059733134,0.010155718446952 -1.01791116395762 -3.50855748679486,0.0 -1.0 -3.46410161513776)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):45 # EntityHandle (String) = 1EE # POLYGON Z ((1 -1 -1.73205080756888,1.75 -1.5 -2.1650635094611,1.25 -1.5 -3.03108891324553,0.5 -1.0 -2.59807621135332,1 -1 -1.73205080756888)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((1 -1 -1.73205080756888,1.75 -1.5 -2.1650635094611,1.25 -1.5 -3.03108891324553,0.5 -1.0 -2.59807621135332,1 -1 -1.73205080756888))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):46 # EntityHandle (String) = 1EF # POLYGON Z ((1.5 -2.0 -4.33012701892219,1.0 -2.0 -5.19615242270663,0.25 -1.5 -4.76313972081441,0.75 -1.5 -3.89711431702997,1.5 -2.0 -4.33012701892219)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((1.5 -2.0 -4.33012701892219,1.0 -2.0 -5.19615242270663,0.25 -1.5 -4.76313972081441,0.75 -1.5 -3.89711431702997,1.5 -2.0 -4.33012701892219))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):47 # EntityHandle (String) = 1F1 # POLYGON Z ((2.0 -4.0 -10.3923048454133,1.5 -4.0 -11.2583302491977,2.25 -4.5 -11.6913429510899,2.75 -4.5 -10.8253175473055,2.0 -4.0 -10.3923048454133)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((2.0 -4.0 -10.3923048454133,1.5 -4.0 -11.2583302491977,2.25 -4.5 -11.6913429510899,2.75 -4.5 -10.8253175473055,2.0 -4.0 -10.3923048454133))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):48 # EntityHandle (String) = 1F2 # LINESTRING (0.5 -1.0,0.53846153846154 -1.07692307692308,0.576923076923078 -1.15384615384615,0.615384615384617 -1.23076923076923,0.653846153846155 -1.30769230769231,0.692307692307694 -1.38461538461538,0.730769230769232 -1.46153846153846,0.769230769230771 -1.53846153846154,0.807692307692309 -1.61538461538462,0.846153846153848 -1.69230769230769,0.884615384615386 -1.76923076923077,0.923076923076924 -1.84615384615385,0.961538461538463 -1.92307692307692,1.0 -2.0,1.03846153846154 -2.07692307692308,1.07692307692308 -2.15384615384615,1.11538461538462 -2.23076923076923,1.15384615384616 -2.30769230769231,1.19230769230769 -2.38461538461538,1.23076923076923 -2.46153846153846,1.26923076923077 -2.53846153846154,1.30769230769231 -2.61538461538461,1.34615384615385 -2.69230769230769,1.38461538461539 -2.76923076923077,1.42307692307693 -2.84615384615385,1.46153846153846 -2.92307692307692,1.5 -3.0,1.53846153846154 -3.07692307692308,1.57692307692308 -3.15384615384615,1.61538461538462 -3.23076923076923,1.65384615384616 -3.30769230769231,1.6923076923077 -3.38461538461539,1.73076923076923 -3.46153846153846,1.76923076923077 -3.53846153846154,1.80769230769231 -3.61538461538461,1.84615384615385 -3.69230769230769,1.88461538461539 -3.76923076923077,1.92307692307693 -3.84615384615385,1.96153846153847 -3.92307692307692,2.0 -4.0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (0.5 -1.0,0.53846153846154 -1.07692307692308,0.576923076923078 -1.15384615384615,0.615384615384617 -1.23076923076923,0.653846153846155 -1.30769230769231,0.692307692307694 -1.38461538461538,0.730769230769232 -1.46153846153846,0.769230769230771 -1.53846153846154,0.807692307692309 -1.61538461538462,0.846153846153848 -1.69230769230769,0.884615384615386 -1.76923076923077,0.923076923076924 -1.84615384615385,0.961538461538463 -1.92307692307692,1.0 -2.0,1.03846153846154 -2.07692307692308,1.07692307692308 -2.15384615384615,1.11538461538462 -2.23076923076923,1.15384615384616 -2.30769230769231,1.19230769230769 -2.38461538461538,1.23076923076923 -2.46153846153846,1.26923076923077 -2.53846153846154,1.30769230769231 -2.61538461538461,1.34615384615385 -2.69230769230769,1.38461538461539 -2.76923076923077,1.42307692307693 -2.84615384615385,1.46153846153846 -2.92307692307692,1.5 -3.0,1.53846153846154 -3.07692307692308,1.57692307692308 -3.15384615384615,1.61538461538462 -3.23076923076923,1.65384615384616 -3.30769230769231,1.6923076923077 -3.38461538461539,1.73076923076923 -3.46153846153846,1.76923076923077 -3.53846153846154,1.80769230769231 -3.61538461538461,1.84615384615385 -3.69230769230769,1.88461538461539 -3.76923076923077,1.92307692307693 -3.84615384615385,1.96153846153847 -3.92307692307692,2.0 -4.0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):49 # EntityHandle (String) = 1F3 # LINESTRING (-3.25 -0.5,-3.07367580370539 -0.493674033614862,-2.89709873733542 -0.487853807380434,-2.72001593081474 -0.483045061447428,-2.542174514068 -0.479753535966554,-2.36332161701984 -0.478484971088521,-2.1832043695949 -0.479745106964042,-2.00156990171783 -0.484039683743825,-1.81816534331327 -0.491874441578583,-1.63273782430587 -0.503755120619026,-1.44503447462027 -0.520187461015863,-1.25480242418112 -0.541677202919806,-1.06178880291306 -0.568730086481565,-0.865740740740739 -0.601851851851852,-0.666405367588798 -0.641548239181375,-0.463529813381883 -0.688324988620846,-0.256861208044639 -0.742687840320976,-0.04614668150171 -0.805142534432475,0.168866636322258 -0.876194811106053,0.388431615502622 -0.956350410492422,0.612790589861596 -1.04609400023601,0.841943559399181 -1.14542558033682,1.07564819029316 -1.25386048315042,1.31365161246818 -1.3708929685261,1.55570095584888 -1.49601729631315,1.80154335035992 -1.62872772636086,2.05092592592592 -1.76851851851852,2.30359581247155 -1.91488393263541,2.55930013992144 -2.06731822856083,2.81778603820024 -2.22531566614407,3.07880063723259 -2.38837050523441,3.34209106694314 -2.55597700568115,3.60740445725653 -2.72762942733357,3.87448793809741 -2.90282203004097,4.14308863939042 -3.08104907365262,4.4129536910602 -3.26180481801784,4.68383022303141 -3.44458352298589,4.95546536522868 -3.62887944840608,5.22760624757667 -3.81418685412768,5.5 -4.0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-3.25 -0.5,-3.07367580370539 -0.493674033614862,-2.89709873733542 -0.487853807380434,-2.72001593081474 -0.483045061447428,-2.542174514068 -0.479753535966554,-2.36332161701984 -0.478484971088521,-2.1832043695949 -0.479745106964042,-2.00156990171783 -0.484039683743825,-1.81816534331327 -0.491874441578583,-1.63273782430587 -0.503755120619026,-1.44503447462027 -0.520187461015863,-1.25480242418112 -0.541677202919806,-1.06178880291306 -0.568730086481565,-0.865740740740739 -0.601851851851852,-0.666405367588798 -0.641548239181375,-0.463529813381883 -0.688324988620846,-0.256861208044639 -0.742687840320976,-0.04614668150171 -0.805142534432475,0.168866636322258 -0.876194811106053,0.388431615502622 -0.956350410492422,0.612790589861596 -1.04609400023601,0.841943559399181 -1.14542558033682,1.07564819029316 -1.25386048315042,1.31365161246818 -1.3708929685261,1.55570095584888 -1.49601729631315,1.80154335035992 -1.62872772636086,2.05092592592592 -1.76851851851852,2.30359581247155 -1.91488393263541,2.55930013992144 -2.06731822856083,2.81778603820024 -2.22531566614407,3.07880063723259 -2.38837050523441,3.34209106694314 -2.55597700568115,3.60740445725653 -2.72762942733357,3.87448793809741 -2.90282203004097,4.14308863939042 -3.08104907365262,4.4129536910602 -3.26180481801784,4.68383022303141 -3.44458352298589,4.95546536522868 -3.62887944840608,5.22760624757667 -3.81418685412768,5.5 -4.0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):50 # EntityHandle (String) = 1F4 # POINT Z (1.75 -3.5 -9.09326673973661) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (1.75 -3.5 -9.09326673973661)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):51 # EntityHandle (String) = 1F5 # POINT Z (5.5 1.0 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (5.5 1.0 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):52 # EntityHandle (String) = 1F6 # LINESTRING Z (0 0 0,1.375 0.25 -0.21650635094611) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (0 0 0,1.375 0.25 -0.21650635094611)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):53 # EntityHandle (String) = 1F7 # LINESTRING Z (1.375 0.25 -0.21650635094611,2.0 1.0 -9.68245836551854e-17,2.125 -0.25 -0.649519052838329,1.375 0.25 -0.21650635094611) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1.375 0.25 -0.21650635094611,2.0 1.0 -9.68245836551854e-17,2.125 -0.25 -0.649519052838329,1.375 0.25 -0.21650635094611)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):54 # EntityHandle (String) = 1F8 # LINESTRING Z (1.375 0.25 -0.21650635094611,2.125 -0.25 -0.649519052838329,2.75 0.5 -0.43301270189222,1.375 0.25 -0.21650635094611) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (1.375 0.25 -0.21650635094611,2.125 -0.25 -0.649519052838329,2.75 0.5 -0.43301270189222,1.375 0.25 -0.21650635094611)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):55 # EntityHandle (String) = 1FD # LINESTRING Z (3.71114561800017 0.105572809000085 -0.866025403784439,3.77009625337411 -0.001434563330173 -0.933566819059727,3.83747480591229 -0.103563047131737 -1.00077917934903,3.91295301407961 -0.200315082697444 -1.06733503278919,3.99616315563294 -0.2912193038355 -1.13291012595241,4.08669983912687 -0.37583283431818 -1.19718498357639,4.18412197894014 -0.453743445530294 -1.25984646501566,4.28795494420042 -0.524571564805566 -1.32058928983137,4.39769287113821 -0.587972124666501 -1.37911752508686,4.51280112760429 -0.643636243958462 -1.43514602710321,4.6327189177438 -0.691292732687594 -1.48840183065055,4.75686201413727 -0.730709413231224 -1.53862547880726,4.88462560409789 -0.761694251483893 -1.58557228700798,5.01538723625813 -0.784096292428219 -1.62901353512224,5.14850985309022 -0.797806395572568 -1.66873758175591,5.28334489458639 -0.802757766672552 -1.70455089534686,5.41923545797803 -0.798926283145887 -1.7362789970312,5.55551949809999 -0.786330611595171 -1.76376731068683,5.691533052808 -0.76503211686609 -1.78688191601273,5.82661347773556 -0.735134563084044 -1.80551020097523,5.96010267463067 -0.69678360812577 -1.8195614104425,6.09135029754434 -0.650166093988798 -1.82896708833443,6.2197169212507 -0.595509136516029 -1.83368141113379,6.34457715646241 -0.533079018910172 -1.83368141113379,6.46532269666444 -0.463179894428748 -1.82896708833443,6.58136528172222 -0.386152304579996 -1.8195614104425,6.69213956382591 -0.302371520038872 -1.80551020097523,6.79710586180808 -0.212245712366048 -1.78688191601273,6.89575279041615 -0.116213965437088 -1.76376731068683,6.9875997517299 -0.014744136269953 -1.7362789970312,7.07219927658622 0.091669424327363 -1.70455089534686,7.14913920460393 0.202508280184287 -1.66873758175591,7.2180446921877 0.317232435536567 -1.62901353512224,7.27858003872839 0.435282965831356 -1.58557228700798,7.33045032210263 0.556084740751457 -1.53862547880726,7.37340283550381 0.679049226192411 -1.48840183065055,7.4072283186042 0.803577351541497 -1.43514602710321,7.43176197705028 0.929062428289537 -1.37911752508686,7.44688428532421 1.05489310575633 -1.32058928983137,7.45252156906016 1.18045634952971 -1.25984646501566,7.44864636397843 1.3051404281076 -1.19718498357639,7.43527754968864 1.42833789319235 -1.13291012595241,7.41248025771019 1.54944853911785 -1.06733503278919,7.38036555415802 1.66788232699113 -1.00077917934903,7.33908989863968 1.78306225930261 -0.933566819059728,7.28885438199984 1.89442719099992 -0.86602540378444, # 7.2299037466259 2.00143456333018 -0.798483988509152,7.16252519408772 2.10356304713174 -0.731271628219845,7.08704698592039 2.20031508269745 -0.664715774779688,7.00383684436707 2.2912193038355 -0.599140681616468,6.91330016087314 2.37583283431818 -0.534865823992492,6.81587802105987 2.4537434455303 -0.472204342553219,6.71204505579959 2.52457156480557 -0.411461517737508,6.6023071288618 2.5879721246665 -0.352933282482017,6.48719887239572 2.64363624395846 -0.296904780465671,6.36728108225621 2.6912927326876 -0.24364897691833,6.24313798586274 2.73070941323123 -0.19342532876162,6.11537439590212 2.7616942514839 -0.146478520560899,5.98461276374187 2.78409629242822 -0.103037272446642,5.85149014690979 2.79780639557257 -0.0633132258129652,5.71665510541362 2.80275776667256 -0.0274999122220189,5.58076454202198 2.79892628314589 0.00422818946232298,5.44448050190002 2.78633061159517 0.0317165031179519,5.30846694719201 2.76503211686609 0.0548311084438533,5.17338652226444 2.73513456308405 0.0734593934063514,5.03989732536933 2.69678360812577 0.0875106028736174,4.90864970245567 2.6501660939888 0.0969162807655497,4.78028307874931 2.59550913651603 0.101630603564914,4.6554228435376 2.53307901891017 0.101630603564914,4.53467730333557 2.46317989442875 0.0969162807655497,4.41863471827779 2.38615230458 0.0875106028736175,4.3078604361741 2.30237152003888 0.0734593934063515,4.20289413819193 2.21224571236605 0.0548311084438534,4.10424720958385 2.11621396543709 0.031716503117952,4.01240024827011 2.01474413626996 0.00422818946232319,3.92780072341379 1.90833057567264 -0.0274999122220187,3.85086079539608 1.79749171981572 -0.0633132258129645,3.7819553078123 1.68276756446344 -0.103037272446642,3.72141996127162 1.56471703416865 -0.146478520560898,3.66954967789738 1.44391525924855 -0.19342532876162,3.6265971644962 1.32095077380759 -0.243648976918329,3.5927716813958 1.19642264845851 -0.296904780465671,3.56823802294973 1.07093757171047 -0.352933282482016,3.5531157146758 0.945106894243672 -0.411461517737508,3.54747843093985 0.819543650470287 -0.472204342553219,3.55135363602158 0.694859571892403 -0.534865823992493,3.56472245031136 0.571662106807651 -0.599140681616467,3.58751974228981 0.450551460882157 -0.664715774779687,3.61963444584198 0.332117673008871 -0.731271628219845,3.66091010136033 0.216937740697387 -0.798483988509152,3.71114561800017 0.105572809000085 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (3.71114561800017 0.105572809000085 -0.866025403784439,3.77009625337411 -0.001434563330173 -0.933566819059727,3.83747480591229 -0.103563047131737 -1.00077917934903,3.91295301407961 -0.200315082697444 -1.06733503278919,3.99616315563294 -0.2912193038355 -1.13291012595241,4.08669983912687 -0.37583283431818 -1.19718498357639,4.18412197894014 -0.453743445530294 -1.25984646501566,4.28795494420042 -0.524571564805566 -1.32058928983137,4.39769287113821 -0.587972124666501 -1.37911752508686,4.51280112760429 -0.643636243958462 -1.43514602710321,4.6327189177438 -0.691292732687594 -1.48840183065055,4.75686201413727 -0.730709413231224 -1.53862547880726,4.88462560409789 -0.761694251483893 -1.58557228700798,5.01538723625813 -0.784096292428219 -1.62901353512224,5.14850985309022 -0.797806395572568 -1.66873758175591,5.28334489458639 -0.802757766672552 -1.70455089534686,5.41923545797803 -0.798926283145887 -1.7362789970312,5.55551949809999 -0.786330611595171 -1.76376731068683,5.691533052808 -0.76503211686609 -1.78688191601273,5.82661347773556 -0.735134563084044 -1.80551020097523,5.96010267463067 -0.69678360812577 -1.8195614104425,6.09135029754434 -0.650166093988798 -1.82896708833443,6.2197169212507 -0.595509136516029 -1.83368141113379,6.34457715646241 -0.533079018910172 -1.83368141113379,6.46532269666444 -0.463179894428748 -1.82896708833443,6.58136528172222 -0.386152304579996 -1.8195614104425,6.69213956382591 -0.302371520038872 -1.80551020097523,6.79710586180808 -0.212245712366048 -1.78688191601273,6.89575279041615 -0.116213965437088 -1.76376731068683,6.9875997517299 -0.014744136269953 -1.7362789970312,7.07219927658622 0.091669424327363 -1.70455089534686,7.14913920460393 0.202508280184287 -1.66873758175591,7.2180446921877 0.317232435536567 -1.62901353512224,7.27858003872839 0.435282965831356 -1.58557228700798,7.33045032210263 0.556084740751457 -1.53862547880726,7.37340283550381 0.679049226192411 -1.48840183065055,7.4072283186042 0.803577351541497 -1.43514602710321,7.43176197705028 0.929062428289537 -1.37911752508686,7.44688428532421 1.05489310575633 -1.32058928983137,7.45252156906016 1.18045634952971 -1.25984646501566,7.44864636397843 1.3051404281076 -1.19718498357639,7.43527754968864 1.42833789319235 -1.13291012595241,7.41248025771019 1.54944853911785 -1.06733503278919,7.38036555415802 1.66788232699113 -1.00077917934903,7.33908989863968 1.78306225930261 -0.933566819059728,7.28885438199984 1.89442719099992 -0.86602540378444,7.2299037466259 2.00143456333018 -0.798483988509152,7.16252519408772 2.10356304713174 -0.731271628219845,7.08704698592039 2.20031508269745 -0.664715774779688,' + '7.00383684436707 2.2912193038355 -0.599140681616468,6.91330016087314 2.37583283431818 -0.534865823992492,6.81587802105987 2.4537434455303 -0.472204342553219,6.71204505579959 2.52457156480557 -0.411461517737508,6.6023071288618 2.5879721246665 -0.352933282482017,6.48719887239572 2.64363624395846 -0.296904780465671,6.36728108225621 2.6912927326876 -0.24364897691833,6.24313798586274 2.73070941323123 -0.19342532876162,6.11537439590212 2.7616942514839 -0.146478520560899,5.98461276374187 2.78409629242822 -0.103037272446642,5.85149014690979 2.79780639557257 -0.0633132258129652,5.71665510541362 2.80275776667256 -0.0274999122220189,5.58076454202198 2.79892628314589 0.00422818946232298,5.44448050190002 2.78633061159517 0.0317165031179519,5.30846694719201 2.76503211686609 0.0548311084438533,5.17338652226444 2.73513456308405 0.0734593934063514,5.03989732536933 2.69678360812577 0.0875106028736174,4.90864970245567 2.6501660939888 0.0969162807655497,4.78028307874931 2.59550913651603 0.101630603564914,4.6554228435376 2.53307901891017 0.101630603564914,4.53467730333557 2.46317989442875 0.0969162807655497,4.41863471827779 2.38615230458 0.0875106028736175,4.3078604361741 2.30237152003888 0.0734593934063515,4.20289413819193 2.21224571236605 0.0548311084438534,4.10424720958385 2.11621396543709 0.031716503117952,4.01240024827011 2.01474413626996 0.00422818946232319,3.92780072341379 1.90833057567264 -0.0274999122220187,3.85086079539608 1.79749171981572 -0.0633132258129645,3.7819553078123 1.68276756446344 -0.103037272446642,3.72141996127162 1.56471703416865 -0.146478520560898,3.66954967789738 1.44391525924855 -0.19342532876162,3.6265971644962 1.32095077380759 -0.243648976918329,3.5927716813958 1.19642264845851 -0.296904780465671,3.56823802294973 1.07093757171047 -0.352933282482016,3.5531157146758 0.945106894243672 -0.411461517737508,3.54747843093985 0.819543650470287 -0.472204342553219,3.55135363602158 0.694859571892403 -0.534865823992493,3.56472245031136 0.571662106807651 -0.599140681616467,3.58751974228981 0.450551460882157 -0.664715774779687,3.61963444584198 0.332117673008871 -0.731271628219845,3.66091010136033 0.216937740697387 -0.798483988509152,3.71114561800017 0.105572809000085 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):56 # EntityHandle (String) = 1FE # LINESTRING Z (4.25 -0.5 -1.29903810567666,5.5 1.0 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (4.25 -0.5 -1.29903810567666,5.5 1.0 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):57 # EntityHandle (String) = 1FF # LINESTRING Z (5.5 1.0 -0.866025403784439,6.75 2.5 -0.43301270189222) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (5.5 1.0 -0.866025403784439,6.75 2.5 -0.43301270189222)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):58 # EntityHandle (String) = 200 # LINESTRING Z (4.75 1.5 -0.43301270189222,5.5 1.0 -0.866025403784439) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (4.75 1.5 -0.43301270189222,5.5 1.0 -0.866025403784439)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):59 # EntityHandle (String) = 201 # LINESTRING Z (5.5 1.0 -0.866025403784439,6.25 0.5 -1.29903810567666) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (5.5 1.0 -0.866025403784439,6.25 0.5 -1.29903810567666)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):60 # EntityHandle (String) = 202 # LINESTRING Z (4.25 -0.5 -1.29903810567666,4.30536229248331 -0.531224312261799 -1.32818874766841,4.36654473979309 -0.554988653592388 -1.35508777630525,4.43324926719606 -0.571177246509588 -1.37960414222355,4.50515089693985 -0.579711221815978 -1.40161840415293,4.58189933151187 -0.580549002841697 -1.42102331082214,4.6631206602536 -0.573686508001801 -1.43772432347645,4.74841918101576 -0.559157170681335 -1.451640076461,4.83737932797937 -0.53703177635124 -1.46270277362604,4.92956769625067 -0.507418117708657 -1.47085851862302,5.02453515336618 -0.470460469521736 -1.47606757748212,5.12181902742094 -0.426338885737475 -1.47830457219218,5.22094536115948 -0.375268322276984 -1.47755860433986,5.32143122104797 -0.317497589791849 -1.47383330820552,5.42278705007785 -0.253308141483641 -1.46714683305749,5.52451905283833 -0.183012701892219 -1.45753175473055,5.62613160123803 -0.106953743333199 -1.44503491691981,5.7271296491552 -0.025501817407262 -1.42971720296291,5.82702114425268 0.060946250290002 -1.41165323922251,5.92531942520741 0.151969293462501 -1.39093103151418,6.02154559267549 0.247123856993501 -1.36765153635088,6.11523084244164 0.345946357414384 -1.34192816909299,6.2059187493862 0.4479553414367 -1.31388625140011,6.29316749114245 0.552653831544204 -1.28366240067645,6.37655200061077 0.659531747217344 -1.25140386448466,6.45566603684282 0.768068389994292 -1.21726780317044,6.53012416420658 0.877734980261504 -1.18142052419318,6.59956363019005 0.987997233414845 -1.1440366718927,6.66364613269498 1.09831796284048 -1.10529837663958,6.72205946821072 1.20815969703403 -1.06539436751435,6.77451905283833 1.31698729810778 -1.02451905283833,6.82076930875472 1.4242705689286 -0.982871573035841,6.86058490936212 1.52948683618513 -0.940654830442097,6.89377187705662 1.63212349679959 -0.898074500783399,6.92016852826756 1.73168051527848 -0.855338031145687,6.93964626116363 1.8276728598352 -0.81265362931318,6.95211018218804 1.91963286541618 -0.770229249400985,6.95749956837044 2.00711251211804 -0.72827157872355,6.95578816316308 2.08968560789544 -0.686985030834846,6.9469843043601 2.166949864926 -0.646570749646076,6.93113088347664 2.23852885951603 -0.607225629472764,6.90830513678565 2.30407386599898 -0.569141355785437,6.87861826903058 2.36326555569183 -0.53250347133728,6.84221491164701 2.41581555263232 -0.497490472218499,6.79927241813288 2.46146783851767 -0.464272938241304,6.75 2.5 -0.43301270189222,6.69463770751669 2.5312243122618 -0.40386205990047,6.63345526020692 2.55498865359239 -0.376963031263626, # 6.56675073280394 2.57117724650959 -0.352446665345325,6.49484910306015 2.57971122181598 -0.330432403415945,6.41810066848813 2.5805490028417 -0.311027496746741,6.3368793397464 2.5736865080018 -0.294326484092429,6.25158081898424 2.55915717068134 -0.280410731107883,6.16262067202063 2.53703177635124 -0.269348033942836,6.07043230374933 2.50741811770866 -0.261192288945857,5.97546484663382 2.47046046952174 -0.255983230086761,5.87818097257907 2.42633888573748 -0.253746235376694,5.77905463884053 2.37526832227698 -0.254492203229023,5.67856877895203 2.31749758979185 -0.258217499363356,5.57721294992215 2.25330814148364 -0.264903974511391,5.47548094716167 2.18301270189222 -0.27451905283833,5.37386839876197 2.1069537433332 -0.287015890649068,5.2728703508448 2.02550181740726 -0.302333604605968,5.17297885574732 1.93905374971 -0.320397568346365,5.07468057479259 1.8480307065375 -0.341119776054697,4.97845440732451 1.7528761430065 -0.364399271218,4.88476915755836 1.65405364258562 -0.390122638475884,4.79408125061381 1.5520446585633 -0.418164556168773,4.70683250885755 1.4473461684558 -0.44838840689243,4.62344799938923 1.34046825278266 -0.48064694308422,4.54433396315718 1.23193161000571 -0.514783004398435,4.46987583579342 1.1222650197385 -0.550630283375696,4.40043636980995 1.01200276658516 -0.588014135676182,4.33635386730502 0.901682037159526 -0.626752430929296,4.27794053178928 0.791840302965968 -0.666656440054525,4.22548094716167 0.68301270189222 -0.707531754730549,4.17923069124529 0.575729431071401 -0.749179234533037,4.13941509063789 0.470513163814874 -0.791395977126782,4.10622812294338 0.36787650320041 -0.833976306785479,4.07983147173244 0.268319484721523 -0.876712776423191,4.06035373883638 0.172327140164803 -0.919397178255699,4.04788981781196 0.080367134583816 -0.961821558167894,4.04250043162957 -0.007112512118036 -1.00377922884533,4.04421183683692 -0.089685607895445 -1.04506577673403,4.0530156956399 -0.166949864926001 -1.0854800579228,4.06886911652336 -0.238528859516028 -1.12482517809611,4.09169486321435 -0.304073865998978 -1.16290945178344,4.12138173096942 -0.363265555691829 -1.1995473362316,4.15778508835299 -0.415815552632322 -1.23456033535038,4.20072758186713 -0.461467838517673 -1.26777786932757,4.25 -0.5 -1.29903810567666) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (4.25 -0.5 -1.29903810567666,4.30536229248331 -0.531224312261799 -1.32818874766841,4.36654473979309 -0.554988653592388 -1.35508777630525,4.43324926719606 -0.571177246509588 -1.37960414222355,4.50515089693985 -0.579711221815978 -1.40161840415293,4.58189933151187 -0.580549002841697 -1.42102331082214,4.6631206602536 -0.573686508001801 -1.43772432347645,4.74841918101576 -0.559157170681335 -1.451640076461,4.83737932797937 -0.53703177635124 -1.46270277362604,4.92956769625067 -0.507418117708657 -1.47085851862302,5.02453515336618 -0.470460469521736 -1.47606757748212,5.12181902742094 -0.426338885737475 -1.47830457219218,5.22094536115948 -0.375268322276984 -1.47755860433986,5.32143122104797 -0.317497589791849 -1.47383330820552,5.42278705007785 -0.253308141483641 -1.46714683305749,5.52451905283833 -0.183012701892219 -1.45753175473055,5.62613160123803 -0.106953743333199 -1.44503491691981,5.7271296491552 -0.025501817407262 -1.42971720296291,5.82702114425268 0.060946250290002 -1.41165323922251,5.92531942520741 0.151969293462501 -1.39093103151418,6.02154559267549 0.247123856993501 -1.36765153635088,6.11523084244164 0.345946357414384 -1.34192816909299,6.2059187493862 0.4479553414367 -1.31388625140011,6.29316749114245 0.552653831544204 -1.28366240067645,6.37655200061077 0.659531747217344 -1.25140386448466,6.45566603684282 0.768068389994292 -1.21726780317044,6.53012416420658 0.877734980261504 -1.18142052419318,6.59956363019005 0.987997233414845 -1.1440366718927,6.66364613269498 1.09831796284048 -1.10529837663958,6.72205946821072 1.20815969703403 -1.06539436751435,6.77451905283833 1.31698729810778 -1.02451905283833,6.82076930875472 1.4242705689286 -0.982871573035841,6.86058490936212 1.52948683618513 -0.940654830442097,6.89377187705662 1.63212349679959 -0.898074500783399,6.92016852826756 1.73168051527848 -0.855338031145687,6.93964626116363 1.8276728598352 -0.81265362931318,6.95211018218804 1.91963286541618 -0.770229249400985,6.95749956837044 2.00711251211804 -0.72827157872355,6.95578816316308 2.08968560789544 -0.686985030834846,6.9469843043601 2.166949864926 -0.646570749646076,6.93113088347664 2.23852885951603 -0.607225629472764,6.90830513678565 2.30407386599898 -0.569141355785437,6.87861826903058 2.36326555569183 -0.53250347133728,6.84221491164701 2.41581555263232 -0.497490472218499,6.79927241813288 2.46146783851767 -0.464272938241304,6.75 2.5 -0.43301270189222,6.69463770751669 2.5312243122618 -0.40386205990047,' + '6.63345526020692 2.55498865359239 -0.376963031263626,6.56675073280394 2.57117724650959 -0.352446665345325,6.49484910306015 2.57971122181598 -0.330432403415945,6.41810066848813 2.5805490028417 -0.311027496746741,6.3368793397464 2.5736865080018 -0.294326484092429,6.25158081898424 2.55915717068134 -0.280410731107883,6.16262067202063 2.53703177635124 -0.269348033942836,6.07043230374933 2.50741811770866 -0.261192288945857,5.97546484663382 2.47046046952174 -0.255983230086761,5.87818097257907 2.42633888573748 -0.253746235376694,5.77905463884053 2.37526832227698 -0.254492203229023,5.67856877895203 2.31749758979185 -0.258217499363356,5.57721294992215 2.25330814148364 -0.264903974511391,5.47548094716167 2.18301270189222 -0.27451905283833,5.37386839876197 2.1069537433332 -0.287015890649068,5.2728703508448 2.02550181740726 -0.302333604605968,5.17297885574732 1.93905374971 -0.320397568346365,5.07468057479259 1.8480307065375 -0.341119776054697,4.97845440732451 1.7528761430065 -0.364399271218,4.88476915755836 1.65405364258562 -0.390122638475884,4.79408125061381 1.5520446585633 -0.418164556168773,4.70683250885755 1.4473461684558 -0.44838840689243,4.62344799938923 1.34046825278266 -0.48064694308422,4.54433396315718 1.23193161000571 -0.514783004398435,4.46987583579342 1.1222650197385 -0.550630283375696,4.40043636980995 1.01200276658516 -0.588014135676182,4.33635386730502 0.901682037159526 -0.626752430929296,4.27794053178928 0.791840302965968 -0.666656440054525,4.22548094716167 0.68301270189222 -0.707531754730549,4.17923069124529 0.575729431071401 -0.749179234533037,4.13941509063789 0.470513163814874 -0.791395977126782,4.10622812294338 0.36787650320041 -0.833976306785479,4.07983147173244 0.268319484721523 -0.876712776423191,4.06035373883638 0.172327140164803 -0.919397178255699,4.04788981781196 0.080367134583816 -0.961821558167894,4.04250043162957 -0.007112512118036 -1.00377922884533,4.04421183683692 -0.089685607895445 -1.04506577673403,4.0530156956399 -0.166949864926001 -1.0854800579228,4.06886911652336 -0.238528859516028 -1.12482517809611,4.09169486321435 -0.304073865998978 -1.16290945178344,4.12138173096942 -0.363265555691829 -1.1995473362316,4.15778508835299 -0.415815552632322 -1.23456033535038,4.20072758186713 -0.461467838517673 -1.26777786932757,4.25 -0.5 -1.29903810567666)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):61 # EntityHandle (String) = 203 # LINESTRING Z (2.75 0.5 -0.43301270189222,2.75597796157458 0.457022294808167 -0.455760312055479,2.76522760095779 0.414850974295674 -0.478918395607368,2.77770451483146 0.37368848382115 -0.502375781105475,2.79334880719819 0.333732425808347 -0.526019860294666,2.81208537691484 0.295174611146642 -0.549737128688177,2.83382427821898 0.258200138394064 -0.573413730451116,2.85846115251769 0.222986505203176 -0.596936004970611,2.88587772936573 0.189702756235451 -0.620191032488805,2.91594239422828 0.15850867165462 -0.643067176179329,2.94851082030252 0.129554000094665 -0.66545461806501,2.98342666136509 0.102977739784634 -0.687245886204105,3.02052230231928 0.078907471281269 -0.708336370614292,3.05961966383903 0.057458745012683 -0.728624825457685,3.10053105724686 0.038734526573237 -0.748013855076124,3.14306008552201 0.022824702432479 -0.766410381543502,3.18700258611332 0.009805648431019 -0.783726091490617,3.23214761103096 -0.00026013686519 -0.79987786005755,3.27827843951188 -0.007324332192091 -0.814788149938374,3.32517361839783 -0.011353025555964 -0.828385383602543,3.37260802523135 -0.012326877029509 -0.84060428690611,3.42035394896652 -0.010241211594056 -0.851386202443257,3.46818218310621 -0.0051060415822 -0.860679371133851,3.51586312601842 0.003053981386852 -0.868439180695292,3.56316788314946 0.014199684748517 -0.874628379805819,3.60986936584274 0.028277563042523 -0.879217256931186,3.65574338148826 0.045220034768334 -0.882183782956251,3.70056970976957 0.064945766813234 -0.883513716936746,3.74413315984144 0.087360064895672 -0.883200674463593,3.78622460336345 0.112355328149502 -0.881246158311542,3.82664197843012 0.139811565666877 -0.87765955122504,3.86519125957839 0.169596972520106 -0.872458070875934,3.90168738921576 0.201568562497258 -0.865666687209244,3.93595516599773 0.235572854514029 -0.857318002573801,3.96783008588991 0.271446609406727 -0.847452095213172,3.99715913187718 0.30901761356937 -0.836116326868217,4.02380150852887 0.348105505672996 -0.823365115414876,4.04762931789371 0.3885226424985 -0.809259673628662,4.06852817347981 0.430074999726512 -0.793867715329923,4.08639774937224 0.472563103360048 -0.777263130320539,4.10115226185219 0.515782987308575 -0.759525629672545,4.1127208812057 0.559527172536592 -0.740740363071464,4.12104807174486 0.603585663076254 -0.720997510051345,4.12609385840951 0.647746954122649 -0.700391847083764,4.1278340186693 0.691799047372318 -0.679022292599034,4.12626019880507 0.735530468730831 -0.656991432123733,4.12137995401128 0.778731283503886 -0.634405025814187,4.11321671212692 0.821194104198432 -0.61137150074998,4.10180966116915 0.862715086095846 -0.588001430424789,4.08721356120934 0.903094905817856 -0.564407003933257,4.06949848149492 0.942139718187561 -0.540701487402092,4.04874946407869 0.979662086792094 -0.516998680250836,4.02506611557057 1.01548188377972 -0.493412368892526,3.99856212897149 1.04942715457186 -0.470055780496802,3.96936473788492 1.08133494333891 -0.447041039437686,3.93761410572614 1.11105207527721 -0.424478629035376,3.9034626528613 1.13843589193168 -0.402476861176005,3.86707432490649 1.16335493603432 -0.381141356355458,3.8286238056993 1.1856895825708 -0.360574536643342,3.78829567872099 1.20533261304587 -0.340875134001137,3.74628354099508 1.22218973019068 -0.322137716314888,3.70278907371594 1.23618001064108 -0.304452233417734,3.65802107406893 1.247236293414 -0.287903585281599,3.61219445288998 1.25530550231681 -0.27257121445099,3.56552920297626 1.26034890074202 -0.258528724675415,3.51824934300062 1.26234227762414 -0.245843527571206,3.47058184209972 1.26127606366599 -0.234576519008966,3.42275553029828 1.2571553772766 -0.224781786780142,3.375 1.25 -0.21650635094611) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING Z (2.75 0.5 -0.43301270189222,2.75597796157458 0.457022294808167 -0.455760312055479,2.76522760095779 0.414850974295674 -0.478918395607368,2.77770451483146 0.37368848382115 -0.502375781105475,2.79334880719819 0.333732425808347 -0.526019860294666,2.81208537691484 0.295174611146642 -0.549737128688177,2.83382427821898 0.258200138394064 -0.573413730451116,2.85846115251769 0.222986505203176 -0.596936004970611,2.88587772936573 0.189702756235451 -0.620191032488805,2.91594239422828 0.15850867165462 -0.643067176179329,2.94851082030252 0.129554000094665 -0.66545461806501,2.98342666136509 0.102977739784634 -0.687245886204105,3.02052230231928 0.078907471281269 -0.708336370614292,3.05961966383903 0.057458745012683 -0.728624825457685,3.10053105724686 0.038734526573237 -0.748013855076124,3.14306008552201 0.022824702432479 -0.766410381543502,3.18700258611332 0.009805648431019 -0.783726091490617,3.23214761103096 -0.00026013686519 -0.79987786005755,3.27827843951188 -0.007324332192091 -0.814788149938374,3.32517361839783 -0.011353025555964 -0.828385383602543,3.37260802523135 -0.012326877029509 -0.84060428690611,3.42035394896652 -0.010241211594056 -0.851386202443257,3.46818218310621 -0.0051060415822 -0.860679371133851,3.51586312601842 0.003053981386852 -0.868439180695292,3.56316788314946 0.014199684748517 -0.874628379805819,3.60986936584274 0.028277563042523 -0.879217256931186,3.65574338148826 0.045220034768334 -0.882183782956251,3.70056970976957 0.064945766813234 -0.883513716936746,3.74413315984144 0.087360064895672 -0.883200674463593,3.78622460336345 0.112355328149502 -0.881246158311542,3.82664197843012 0.139811565666877 -0.87765955122504,3.86519125957839 0.169596972520106 -0.872458070875934,3.90168738921576 0.201568562497258 -0.865666687209244,3.93595516599773 0.235572854514029 -0.857318002573801,3.96783008588991 0.271446609406727 -0.847452095213172,3.99715913187718 0.30901761356937 -0.836116326868217,4.02380150852887 0.348105505672996 -0.823365115414876,4.04762931789371 0.3885226424985 -0.809259673628662,4.06852817347981 0.430074999726512 -0.793867715329923,4.08639774937224 0.472563103360048 -0.777263130320539,4.10115226185219 0.515782987308575 -0.759525629672545,4.1127208812057 0.559527172536592 -0.740740363071464,4.12104807174486 0.603585663076254 -0.720997510051345,4.12609385840951 0.647746954122649 -0.700391847083764,4.1278340186693 0.691799047372318 -0.679022292599034,4.12626019880507 0.735530468730831 -0.656991432123733,4.12137995401128 0.778731283503886 -0.634405025814187,4.11321671212692 0.821194104198432 -0.61137150074998,4.10180966116915 0.862715086095846 -0.588001430424789,4.08721356120934 0.903094905817856 -0.564407003933257,4.06949848149492 0.942139718187561 -0.540701487402092,4.04874946407869 0.979662086792094 -0.516998680250836,4.02506611557057 1.01548188377972 -0.493412368892526,3.99856212897149 1.04942715457186 -0.470055780496802,3.96936473788492 1.08133494333891 -0.447041039437686,3.93761410572614 1.11105207527721 -0.424478629035376,3.9034626528613 1.13843589193168 -0.402476861176005,3.86707432490649 1.16335493603432 -0.381141356355458,3.8286238056993 1.1856895825708 -0.360574536643342,3.78829567872099 1.20533261304587 -0.340875134001137,3.74628354099508 1.22218973019068 -0.322137716314888,3.70278907371594 1.23618001064108 -0.304452233417734,3.65802107406893 1.247236293414 -0.287903585281599,3.61219445288998 1.25530550231681 -0.27257121445099,3.56552920297626 1.26034890074202 -0.258528724675415,3.51824934300062 1.26234227762414 -0.245843527571206,3.47058184209972 1.26127606366599 -0.234576519008966,3.42275553029828 1.2571553772766 -0.224781786780142,3.375 1.25 -0.21650635094611)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):62 # EntityHandle (String) = 204 # POLYGON Z ((2.125 -0.25 -0.649519052838329,2.875 -0.75 -1.08253175473055,3.5 0.0 -0.866025403784439,2.75 0.5 -0.43301270189222,2.125 -0.25 -0.649519052838329)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((2.125 -0.25 -0.649519052838329,2.875 -0.75 -1.08253175473055,3.5 0.0 -0.866025403784439,2.75 0.5 -0.43301270189222,2.125 -0.25 -0.649519052838329))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):63 # EntityHandle (String) = 205 # POLYGON Z ((4.875 0.25 -1.08253175473055,5.5 1.0 -0.866025403784439,4.75 1.5 -0.43301270189222,4.125 0.75 -0.649519052838329,4.875 0.25 -1.08253175473055)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((4.875 0.25 -1.08253175473055,5.5 1.0 -0.866025403784439,4.75 1.5 -0.43301270189222,4.125 0.75 -0.649519052838329,4.875 0.25 -1.08253175473055))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):64 # EntityHandle (String) = 207 # POLYGON Z ((11 2 -1.73205080756888,11.625 2.75 -1.51554445662277,12.375 2.25 -1.94855715851499,11.75 1.5 -2.1650635094611,11 2 -1.73205080756888)) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON Z ((11 2 -1.73205080756888,11.625 2.75 -1.51554445662277,12.375 2.25 -1.94855715851499,11.75 1.5 -2.1650635094611,11 2 -1.73205080756888))'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):65 # EntityHandle (String) = 208 # LINESTRING (2.75 0.5,2.96153846153846 0.538461538461539,3.17307692307692 0.576923076923077,3.38461538461539 0.615384615384616,3.59615384615385 0.653846153846154,3.80769230769231 0.692307692307693,4.01923076923077 0.730769230769231,4.23076923076923 0.76923076923077,4.44230769230769 0.807692307692308,4.65384615384616 0.846153846153847,4.86538461538462 0.884615384615385,5.07692307692308 0.923076923076924,5.28846153846154 0.961538461538462,5.5 1.0,5.71153846153846 1.03846153846154,5.92307692307693 1.07692307692308,6.13461538461539 1.11538461538462,6.34615384615385 1.15384615384615,6.55769230769231 1.19230769230769,6.76923076923077 1.23076923076923,6.98076923076923 1.26923076923077,7.19230769230769 1.30769230769231,7.40384615384616 1.34615384615385,7.61538461538462 1.38461538461539,7.82692307692308 1.42307692307692,8.03846153846154 1.46153846153846,8.25 1.5,8.46153846153846 1.53846153846154,8.67307692307693 1.57692307692308,8.88461538461539 1.61538461538462,9.09615384615385 1.65384615384615,9.30769230769231 1.69230769230769,9.51923076923077 1.73076923076923,9.73076923076923 1.76923076923077,9.94230769230769 1.80769230769231,10.1538461538462 1.84615384615385,10.3653846153846 1.88461538461539,10.5769230769231 1.92307692307692,10.7884615384615 1.96153846153846,11.0 2.0) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (2.75 0.5,2.96153846153846 0.538461538461539,3.17307692307692 0.576923076923077,3.38461538461539 0.615384615384616,3.59615384615385 0.653846153846154,3.80769230769231 0.692307692307693,4.01923076923077 0.730769230769231,4.23076923076923 0.76923076923077,4.44230769230769 0.807692307692308,4.65384615384616 0.846153846153847,4.86538461538462 0.884615384615385,5.07692307692308 0.923076923076924,5.28846153846154 0.961538461538462,5.5 1.0,5.71153846153846 1.03846153846154,5.92307692307693 1.07692307692308,6.13461538461539 1.11538461538462,6.34615384615385 1.15384615384615,6.55769230769231 1.19230769230769,6.76923076923077 1.23076923076923,6.98076923076923 1.26923076923077,7.19230769230769 1.30769230769231,7.40384615384616 1.34615384615385,7.61538461538462 1.38461538461539,7.82692307692308 1.42307692307692,8.03846153846154 1.46153846153846,8.25 1.5,8.46153846153846 1.53846153846154,8.67307692307693 1.57692307692308,8.88461538461539 1.61538461538462,9.09615384615385 1.65384615384615,9.30769230769231 1.69230769230769,9.51923076923077 1.73076923076923,9.73076923076923 1.76923076923077,9.94230769230769 1.80769230769231,10.1538461538462 1.84615384615385,10.3653846153846 1.88461538461539,10.5769230769231 1.92307692307692,10.7884615384615 1.96153846153846,11.0 2.0)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):66 # EntityHandle (String) = 209 # LINESTRING (5.75 5.5,5.5082446180819 5.22760624757667,5.26788002157825 4.95546536522868,5.03029699590351 4.68383022303141,4.79688632647213 4.4129536910602,4.56903879869856 4.14308863939042,4.34814519799727 3.87448793809741,4.1355963097827 3.60740445725653,3.93278291946931 3.34209106694314,3.74109581247155 3.07880063723259,3.56192577420388 2.81778603820024,3.39666359008075 2.55930013992144,3.24670004551661 2.30359581247155,3.11342592592593 2.05092592592593,2.99823201672314 1.80154335035992,2.90250910332271 1.55570095584889,2.8276479711391 1.31365161246818,2.77503940558674 1.07564819029316,2.74607419208011 0.84194355939918,2.74214311603365 0.612790589861594,2.76457901346955 0.38843161550262,2.8133818843878 0.168866636322256,2.88721889276623 -0.046146681501713,2.98469925319038 -0.256861208044643,3.10443218024579 -0.463529813381887,3.24502688851802 -0.666405367588803,3.4050925925926 -0.865740740740744,3.58323850705508 -1.06178880291307,3.77807384649101 -1.25480242418113,3.98820782548594 -1.44503447462028,4.21224965862541 -1.63273782430588,4.44880856049496 -1.81816534331328,4.69649374568015 -2.00156990171784,4.95391442876651 -2.18320436959491,5.2196798243396 -2.36332161701985,5.49239914698496 -2.54217451406801,5.77068161128813 -2.72001593081475,6.05313643183467 -2.89709873733543,6.33837282321012 -3.0736758037054,6.625 -3.25) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (5.75 5.5,5.5082446180819 5.22760624757667,5.26788002157825 4.95546536522868,5.03029699590351 4.68383022303141,4.79688632647213 4.4129536910602,4.56903879869856 4.14308863939042,4.34814519799727 3.87448793809741,4.1355963097827 3.60740445725653,3.93278291946931 3.34209106694314,3.74109581247155 3.07880063723259,3.56192577420388 2.81778603820024,3.39666359008075 2.55930013992144,3.24670004551661 2.30359581247155,3.11342592592593 2.05092592592593,2.99823201672314 1.80154335035992,2.90250910332271 1.55570095584889,2.8276479711391 1.31365161246818,2.77503940558674 1.07564819029316,2.74607419208011 0.84194355939918,2.74214311603365 0.612790589861594,2.76457901346955 0.38843161550262,2.8133818843878 0.168866636322256,2.88721889276623 -0.046146681501713,2.98469925319038 -0.256861208044643,3.10443218024579 -0.463529813381887,3.24502688851802 -0.666405367588803,3.4050925925926 -0.865740740740744,3.58323850705508 -1.06178880291307,3.77807384649101 -1.25480242418113,3.98820782548594 -1.44503447462028,4.21224965862541 -1.63273782430588,4.44880856049496 -1.81816534331328,4.69649374568015 -2.00156990171784,4.95391442876651 -2.18320436959491,5.2196798243396 -2.36332161701985,5.49239914698496 -2.54217451406801,5.77068161128813 -2.72001593081475,6.05313643183467 -2.89709873733543,6.33837282321012 -3.0736758037054,6.625 -3.25)'): feat.DumpReadable() pytest.fail() # OGRFeature(entities):67 # EntityHandle (String) = 20A # POINT Z (9.625 1.75 -1.51554445662277) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT Z (9.625 1.75 -1.51554445662277)'): feat.DumpReadable() pytest.fail() ############################################################################### # Test 3D entities (polyface mesh, cylinder, 3D solid) def test_ogr_dxf_33(): gdal.SetConfigOption('DXF_3D_EXTENSIBLE_MODE', 'TRUE') ds = ogr.Open('data/3d.dxf') gdal.SetConfigOption('DXF_3D_EXTENSIBLE_MODE', None) layer = ds.GetLayer(0) # Polyface mesh (POLYLINE) feat = layer.GetNextFeature() assert feat.Layer == '0' geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbPolyhedralSurfaceZ, \ ('did not get expected geometry type; got %s instead of wkbPolyhedralSurface' % geom.GetGeometryType()) wkt_string = geom.ExportToIsoWkt() wkt_string_expected = 'POLYHEDRALSURFACE Z (((0 0 0,1 0 0,1 1 0,0 1 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),((1 0 0,1 1 0,1 1 1,1 0 1,1 0 0)),((1 1 0,1 1 1,0 1 1,0 1 0,1 1 0)),((0 0 0,0 1 0,0 1 1,0 0 1,0 0 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)))' if wkt_string != wkt_string_expected: feat.DumpReadable() pytest.fail('wrong geometry for polyface mesh') faces = geom.GetGeometryCount() assert faces == 6, \ ('did not get expected number of faces, got %d instead of %d' % (faces, 6)) # Cylinder (CIRCLE with thickness) feat = layer.GetNextFeature() assert (not ogrtest.check_feature_geometry(feat, 'POLYHEDRALSURFACE Z (((2.8 -0.0 1e-31,2.79902562010393 -0.0 -0.0279025894976501,2.79610722749663 -0.0 -0.0556692403840262,2.79125904029352 -0.0 -0.0831646763271037,2.78450467837533 -0.0 -0.1102549423268,2.77587704831436 -0.0 -0.136808057330267,2.76541818305704 -0.0 -0.16269465723032,2.75317903714357 -0.0 -0.187788625114356,2.73921923846257 -0.0 -0.211967705693282,2.72360679774998 0.0 -0.235114100916989,2.70641777724759 0.0 -0.257115043874616,2.68773592013546 0.0 -0.277863348183599,2.66765224254354 0.0 -0.297257930190958,2.64626459013026 0.0 -0.315204301442689,2.6236771613883 0.0 -0.331615029022017,2.6 0.0 -0.346410161513775,2.57534845871563 0.0 -0.359517618519667,2.54984263736636 0.0 -0.370873541826715,2.52360679774998 0.0 -0.380422606518061,2.49676875823987 0.0 -0.388118290510399,2.46945927106677 0.0 -0.393923101204883,2.44181138530706 0.0 -0.397808758147309,2.413959798681 0.0 -0.399756330807638,2.386040201319 0.0 -0.399756330807638,2.35818861469294 0.0 -0.397808758147309,2.33054072893323 0.0 -0.393923101204883,2.30323124176013 0.0 -0.388118290510399,2.27639320225002 0.0 -0.380422606518061,2.25015736263363 0.0 -0.370873541826715,2.22465154128437 0.0 -0.359517618519667,2.2 0.0 -0.346410161513776,2.1763228386117 0.0 -0.331615029022017,2.15373540986974 0.0 -0.315204301442689,2.13234775745646 0.0 -0.297257930190958,2.11226407986454 0.0 -0.277863348183599,2.09358222275241 0.0 -0.257115043874616,2.07639320225002 0.0 -0.235114100916989,2.06078076153743 0.0 -0.211967705693282,2.04682096285643 0.0 -0.187788625114356,2.03458181694296 0.0 -0.16269465723032,2.02412295168564 0.0 -0.136808057330268,2.01549532162467 0.0 -0.1102549423268,2.00874095970648 0.0 -0.0831646763271037,2.00389277250337 0.0 -0.0556692403840263,2.00097437989607 0.0 -0.0279025894976502,' + '2.0 0.0 -4.8985871965894e-17,2.00097437989607 0.0 0.0279025894976499,2.00389277250337 0.0 0.0556692403840262,2.00874095970648 0.0 0.0831646763271036,2.01549532162467 0.0 0.1102549423268,2.02412295168564 0.0 0.136808057330267,2.03458181694296 0.0 0.16269465723032,2.04682096285643 0.0 0.187788625114356,2.06078076153743 0.0 0.211967705693282,2.07639320225002 0.0 0.235114100916989,2.09358222275241 0.0 0.257115043874616,2.11226407986454 0.0 0.277863348183599,2.13234775745646 0.0 0.297257930190958,2.15373540986974 0.0 0.315204301442689,2.1763228386117 -0.0 0.331615029022017,2.2 -0.0 0.346410161513775,2.22465154128437 -0.0 0.359517618519667,2.25015736263363 -0.0 0.370873541826715,2.27639320225002 -0.0 0.380422606518061,2.30323124176013 -0.0 0.388118290510399,2.33054072893323 -0.0 0.393923101204883,2.35818861469294 -0.0 0.397808758147309,2.386040201319 -0.0 0.399756330807638,2.413959798681 -0.0 0.399756330807638,2.44181138530706 -0.0 0.397808758147309,2.46945927106677 -0.0 0.393923101204883,2.49676875823987 -0.0 0.388118290510399,2.52360679774998 -0.0 0.380422606518061,2.54984263736636 -0.0 0.370873541826715,2.57534845871563 -0.0 0.359517618519667,2.6 -0.0 0.346410161513775,2.6236771613883 -0.0 0.331615029022017,2.64626459013026 -0.0 0.315204301442689,2.66765224254354 -0.0 0.297257930190958,2.68773592013546 -0.0 0.277863348183599,2.70641777724759 -0.0 0.257115043874616,2.72360679774998 -0.0 0.235114100916989,2.73921923846257 -0.0 0.211967705693282,2.75317903714357 -0.0 0.187788625114356,2.76541818305704 -0.0 0.16269465723032,2.77587704831436 -0.0 0.136808057330267,2.78450467837533 -0.0 0.1102549423268,2.79125904029352 -0.0 0.0831646763271039,2.79610722749663 -0.0 0.0556692403840264,2.79902562010393 -0.0 0.0279025894976499,2.8 -0.0 1e-31)),' + '((2.8 1.8 3.6e-16,2.79902562010393 1.8 -0.0279025894976498,2.79610722749663 1.8 -0.0556692403840258,2.79125904029352 1.8 -0.0831646763271034,2.78450467837533 1.8 -0.110254942326799,2.77587704831436 1.8 -0.136808057330267,2.76541818305704 1.8 -0.16269465723032,2.75317903714357 1.8 -0.187788625114356,2.73921923846257 1.8 -0.211967705693282,2.72360679774998 1.8 -0.235114100916989,2.70641777724759 1.8 -0.257115043874615,2.68773592013546 1.8 -0.277863348183599,2.66765224254354 1.8 -0.297257930190957,2.64626459013026 1.8 -0.315204301442689,2.6236771613883 1.8 -0.331615029022016,2.6 1.8 -0.346410161513775,2.57534845871563 1.8 -0.359517618519667,2.54984263736636 1.8 -0.370873541826715,2.52360679774998 1.8 -0.380422606518061,2.49676875823987 1.8 -0.388118290510398,2.46945927106677 1.8 -0.393923101204883,2.44181138530706 1.8 -0.397808758147309,2.413959798681 1.8 -0.399756330807638,2.386040201319 1.8 -0.399756330807638,2.35818861469294 1.8 -0.397808758147309,2.33054072893323 1.8 -0.393923101204883,2.30323124176013 1.8 -0.388118290510398,2.27639320225002 1.8 -0.380422606518061,2.25015736263363 1.8 -0.370873541826715,2.22465154128437 1.8 -0.359517618519666,2.2 1.8 -0.346410161513775,2.1763228386117 1.8 -0.331615029022016,2.15373540986974 1.8 -0.315204301442689,2.13234775745646 1.8 -0.297257930190957,2.11226407986454 1.8 -0.277863348183599,2.09358222275241 1.8 -0.257115043874615,2.07639320225002 1.8 -0.235114100916989,2.06078076153743 1.8 -0.211967705693282,2.04682096285643 1.8 -0.187788625114356,2.03458181694296 1.8 -0.16269465723032,2.02412295168564 1.8 -0.136808057330267,2.01549532162467 1.8 -0.1102549423268,2.00874095970648 1.8 -0.0831646763271034,2.00389277250337 1.8 -0.0556692403840259,2.00097437989607 1.8 -0.0279025894976499,2.0 1.8 3.11014128034106e-16,' + '2.00097437989607 1.8 0.0279025894976503,2.00389277250337 1.8 0.0556692403840266,2.00874095970648 1.8 0.083164676327104,2.01549532162467 1.8 0.1102549423268,2.02412295168564 1.8 0.136808057330268,2.03458181694296 1.8 0.16269465723032,2.04682096285643 1.8 0.187788625114357,2.06078076153743 1.8 0.211967705693282,2.07639320225002 1.8 0.23511410091699,2.09358222275241 1.8 0.257115043874616,2.11226407986454 1.8 0.277863348183599,2.13234775745646 1.8 0.297257930190958,2.15373540986974 1.8 0.315204301442689,2.1763228386117 1.8 0.331615029022017,2.2 1.8 0.346410161513776,2.22465154128437 1.8 0.359517618519667,2.25015736263363 1.8 0.370873541826715,2.27639320225002 1.8 0.380422606518062,2.30323124176013 1.8 0.388118290510399,2.33054072893323 1.8 0.393923101204884,2.35818861469294 1.8 0.39780875814731,2.386040201319 1.8 0.399756330807639,2.413959798681 1.8 0.399756330807639,2.44181138530706 1.8 0.39780875814731,2.46945927106677 1.8 0.393923101204884,2.49676875823987 1.8 0.388118290510399,2.52360679774998 1.8 0.380422606518062,2.54984263736636 1.8 0.370873541826715,2.57534845871563 1.8 0.359517618519667,2.6 1.8 0.346410161513776,2.6236771613883 1.8 0.331615029022017,2.64626459013026 1.8 0.315204301442689,2.66765224254354 1.8 0.297257930190958,2.68773592013546 1.8 0.277863348183599,2.70641777724759 1.8 0.257115043874616,2.72360679774998 1.8 0.23511410091699,2.73921923846257 1.8 0.211967705693283,2.75317903714357 1.8 0.187788625114357,2.76541818305704 1.8 0.16269465723032,2.77587704831436 1.8 0.136808057330268,2.78450467837533 1.8 0.1102549423268,2.79125904029352 1.8 0.0831646763271043,2.79610722749663 1.8 0.0556692403840267,2.79902562010393 1.8 0.0279025894976503,2.8 1.8 3.6e-16)),' + '((2.0 0.0 -4.8985871965894e-17,2.00097437989607 0.0 -0.0279025894976502,2.00389277250337 0.0 -0.0556692403840263,2.00874095970648 0.0 -0.0831646763271037,2.01549532162467 0.0 -0.1102549423268,2.02412295168564 0.0 -0.136808057330268,2.03458181694296 0.0 -0.16269465723032,2.04682096285643 0.0 -0.187788625114356,2.06078076153743 0.0 -0.211967705693282,2.07639320225002 0.0 -0.235114100916989,2.09358222275241 0.0 -0.257115043874616,2.11226407986454 0.0 -0.277863348183599,2.13234775745646 0.0 -0.297257930190958,2.15373540986974 0.0 -0.315204301442689,2.1763228386117 0.0 -0.331615029022017,2.2 0.0 -0.346410161513776,2.22465154128437 0.0 -0.359517618519667,2.25015736263363 0.0 -0.370873541826715,2.27639320225002 0.0 -0.380422606518061,2.30323124176013 0.0 -0.388118290510399,2.33054072893323 0.0 -0.393923101204883,2.35818861469294 0.0 -0.397808758147309,2.386040201319 0.0 -0.399756330807638,2.413959798681 0.0 -0.399756330807638,2.44181138530706 0.0 -0.397808758147309,2.46945927106677 0.0 -0.393923101204883,2.49676875823987 0.0 -0.388118290510399,2.52360679774998 0.0 -0.380422606518061,2.54984263736636 0.0 -0.370873541826715,2.57534845871563 0.0 -0.359517618519667,2.6 0.0 -0.346410161513775,2.6236771613883 0.0 -0.331615029022017,2.64626459013026 0.0 -0.315204301442689,2.66765224254354 0.0 -0.297257930190958,2.68773592013546 0.0 -0.277863348183599,2.70641777724759 0.0 -0.257115043874616,2.72360679774998 0.0 -0.235114100916989,2.73921923846257 -0.0 -0.211967705693282,2.75317903714357 -0.0 -0.187788625114356,2.76541818305704 -0.0 -0.16269465723032,2.77587704831436 -0.0 -0.136808057330267,2.78450467837533 -0.0 -0.1102549423268,2.79125904029352 -0.0 -0.0831646763271037,2.79610722749663 -0.0 -0.0556692403840262,2.79902562010393 -0.0 -0.0279025894976501,' + '2.8 -0.0 1e-31,2.8 1.8 3.6e-16,2.79902562010393 1.8 -0.0279025894976498,2.79610722749663 1.8 -0.0556692403840258,2.79125904029352 1.8 -0.0831646763271034,2.78450467837533 1.8 -0.110254942326799,2.77587704831436 1.8 -0.136808057330267,2.76541818305704 1.8 -0.16269465723032,2.75317903714357 1.8 -0.187788625114356,2.73921923846257 1.8 -0.211967705693282,2.72360679774998 1.8 -0.235114100916989,2.70641777724759 1.8 -0.257115043874615,2.68773592013546 1.8 -0.277863348183599,2.66765224254354 1.8 -0.297257930190957,2.64626459013026 1.8 -0.315204301442689,2.6236771613883 1.8 -0.331615029022016,2.6 1.8 -0.346410161513775,2.57534845871563 1.8 -0.359517618519667,2.54984263736636 1.8 -0.370873541826715,2.52360679774998 1.8 -0.380422606518061,2.49676875823987 1.8 -0.388118290510398,2.46945927106677 1.8 -0.393923101204883,2.44181138530706 1.8 -0.397808758147309,2.413959798681 1.8 -0.399756330807638,2.386040201319 1.8 -0.399756330807638,2.35818861469294 1.8 -0.397808758147309,2.33054072893323 1.8 -0.393923101204883,2.30323124176013 1.8 -0.388118290510398,2.27639320225002 1.8 -0.380422606518061,2.25015736263363 1.8 -0.370873541826715,2.22465154128437 1.8 -0.359517618519666,2.2 1.8 -0.346410161513775,2.1763228386117 1.8 -0.331615029022016,2.15373540986974 1.8 -0.315204301442689,2.13234775745646 1.8 -0.297257930190957,2.11226407986454 1.8 -0.277863348183599,2.09358222275241 1.8 -0.257115043874615,2.07639320225002 1.8 -0.235114100916989,2.06078076153743 1.8 -0.211967705693282,2.04682096285643 1.8 -0.187788625114356,2.03458181694296 1.8 -0.16269465723032,2.02412295168564 1.8 -0.136808057330267,2.01549532162467 1.8 -0.1102549423268,2.00874095970648 1.8 -0.0831646763271034,2.00389277250337 1.8 -0.0556692403840259,2.00097437989607 1.8 -0.0279025894976499,2.0 1.8 3.11014128034106e-16,2.0 0.0 -4.8985871965894e-17)),' + '((2.8 -0.0 1e-31,2.79902562010393 -0.0 0.0279025894976499,2.79610722749663 -0.0 0.0556692403840264,2.79125904029352 -0.0 0.0831646763271039,2.78450467837533 -0.0 0.1102549423268,2.77587704831436 -0.0 0.136808057330267,2.76541818305704 -0.0 0.16269465723032,2.75317903714357 -0.0 0.187788625114356,2.73921923846257 -0.0 0.211967705693282,2.72360679774998 -0.0 0.235114100916989,2.70641777724759 -0.0 0.257115043874616,2.68773592013546 -0.0 0.277863348183599,2.66765224254354 -0.0 0.297257930190958,2.64626459013026 -0.0 0.315204301442689,2.6236771613883 -0.0 0.331615029022017,2.6 -0.0 0.346410161513775,2.57534845871563 -0.0 0.359517618519667,2.54984263736636 -0.0 0.370873541826715,2.52360679774998 -0.0 0.380422606518061,2.49676875823987 -0.0 0.388118290510399,2.46945927106677 -0.0 0.393923101204883,2.44181138530706 -0.0 0.397808758147309,2.413959798681 -0.0 0.399756330807638,2.386040201319 -0.0 0.399756330807638,2.35818861469294 -0.0 0.397808758147309,2.33054072893323 -0.0 0.393923101204883,2.30323124176013 -0.0 0.388118290510399,2.27639320225002 -0.0 0.380422606518061,2.25015736263363 -0.0 0.370873541826715,2.22465154128437 -0.0 0.359517618519667,2.2 -0.0 0.346410161513775,2.1763228386117 -0.0 0.331615029022017,2.15373540986974 0.0 0.315204301442689,2.13234775745646 0.0 0.297257930190958,2.11226407986454 0.0 0.277863348183599,2.09358222275241 0.0 0.257115043874616,2.07639320225002 0.0 0.235114100916989,2.06078076153743 0.0 0.211967705693282,2.04682096285643 0.0 0.187788625114356,2.03458181694296 0.0 0.16269465723032,2.02412295168564 0.0 0.136808057330267,2.01549532162467 0.0 0.1102549423268,2.00874095970648 0.0 0.0831646763271036,2.00389277250337 0.0 0.0556692403840262,2.00097437989607 0.0 0.0279025894976499,' + '2.0 0.0 -4.8985871965894e-17,2.0 1.8 3.11014128034106e-16,2.00097437989607 1.8 0.0279025894976503,2.00389277250337 1.8 0.0556692403840266,2.00874095970648 1.8 0.083164676327104,2.01549532162467 1.8 0.1102549423268,2.02412295168564 1.8 0.136808057330268,2.03458181694296 1.8 0.16269465723032,2.04682096285643 1.8 0.187788625114357,2.06078076153743 1.8 0.211967705693282,2.07639320225002 1.8 0.23511410091699,2.09358222275241 1.8 0.257115043874616,2.11226407986454 1.8 0.277863348183599,2.13234775745646 1.8 0.297257930190958,2.15373540986974 1.8 0.315204301442689,2.1763228386117 1.8 0.331615029022017,2.2 1.8 0.346410161513776,2.22465154128437 1.8 0.359517618519667,2.25015736263363 1.8 0.370873541826715,2.27639320225002 1.8 0.380422606518062,2.30323124176013 1.8 0.388118290510399,2.33054072893323 1.8 0.393923101204884,2.35818861469294 1.8 0.39780875814731,2.386040201319 1.8 0.399756330807639,2.413959798681 1.8 0.399756330807639,2.44181138530706 1.8 0.39780875814731,2.46945927106677 1.8 0.393923101204884,2.49676875823987 1.8 0.388118290510399,2.52360679774998 1.8 0.380422606518062,2.54984263736636 1.8 0.370873541826715,2.57534845871563 1.8 0.359517618519667,2.6 1.8 0.346410161513776,2.6236771613883 1.8 0.331615029022017,2.64626459013026 1.8 0.315204301442689,2.66765224254354 1.8 0.297257930190958,2.68773592013546 1.8 0.277863348183599,2.70641777724759 1.8 0.257115043874616,2.72360679774998 1.8 0.23511410091699,2.73921923846257 1.8 0.211967705693283,2.75317903714357 1.8 0.187788625114357,2.76541818305704 1.8 0.16269465723032,2.77587704831436 1.8 0.136808057330268,2.78450467837533 1.8 0.1102549423268,2.79125904029352 1.8 0.0831646763271043,2.79610722749663 1.8 0.0556692403840267,2.79902562010393 1.8 0.0279025894976503,2.8 1.8 3.6e-16,2.8 -0.0 1e-31)))')), \ 'wrong geometry for cylinder' # 3DSOLID, plain feat = layer.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail('geometry on first 3DSOLID was not empty') if feat.GetFieldAsBinary('ASMData') != b'ACIS BinaryFile(U\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x07\x10Autodesk AutoCAD\x07\x13ASM 221.0.0.1871 NT\x07\x18Sun Mar 04 15:10:20 2018\x06ffffff9@\x06\x8d\xed\xb5\xa0\xf7\xc6\xb0>\x06\xbb\xbd\xd7\xd9\xdf|\xdb=\r\tasmheader\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x07\x0c221.0.0.1871\x11\r\x04body\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x02\x00\x00\x00\x0c\xff\xff\xff\xff\x0c\x03\x00\x00\x00\x11\r\x04lump\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x04\x00\x00\x00\x0c\x01\x00\x00\x00\x11\r\ttransform\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x14\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x14\x00\x00\x00\x00\x00\x00\x10@\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\xf0?\x0b\x0b\x0b\x11\r\x05shell\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x05\x00\x00\x00\x0c\xff\xff\xff\xff\x0c\x02\x00\x00\x00\x11\r\x04face\x0c\x06\x00\x00\x00\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x04\x00\x00\x00\x0c\xff\xff\xff\xff\x0c\x07\x00\x00\x00\x0b\x0b\x11\x0e\tpersubent\x0e\x10acadSolidHistory\r\x06attrib\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x05\x00\x00\x00\x04\x01\x00\x00\x00\x04\x02\x00\x00\x00\x04\x01\x00\x00\x00\x04\x00\x00\x00\x00\x11\x0e\x06sphere\r\x07surface\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\xcd;\x7ff\x9e\xa0\xe6?\x14\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x0b\x0b\x0b\x0b\x0b\x11\x0e\x03End\x0e\x02of\x0e\x03ASM\r\x04data': feat.DumpReadable() pytest.fail('wrong ASMData on first 3DSOLID') if feat.GetField('ASMTransform') != [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0]: feat.DumpReadable() pytest.fail('wrong ASMTransform on first 3DSOLID') if feat.GetStyleString() != 'BRUSH(fc:#000000)': feat.DumpReadable() pytest.fail('wrong style string on first 3DSOLID') # 3DSOLID inside a block feat = layer.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail('geometry on second 3DSOLID was not empty') if feat.GetFieldAsBinary('ASMData') != b'ACIS BinaryFile(U\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x0c\x00\x00\x00\x07\x10Autodesk AutoCAD\x07\x13ASM 221.0.0.1871 NT\x07\x18Sun Mar 04 15:10:20 2018\x06ffffff9@\x06\x8d\xed\xb5\xa0\xf7\xc6\xb0>\x06\xbb\xbd\xd7\xd9\xdf|\xdb=\r\tasmheader\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x07\x0c221.0.0.1871\x11\r\x04body\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x02\x00\x00\x00\x0c\xff\xff\xff\xff\x0c\x03\x00\x00\x00\x11\r\x04lump\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x04\x00\x00\x00\x0c\x01\x00\x00\x00\x11\r\ttransform\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x14\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\xf0?\x0b\x0b\x0b\x11\r\x05shell\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x05\x00\x00\x00\x0c\xff\xff\xff\xff\x0c\x02\x00\x00\x00\x11\r\x04face\x0c\x06\x00\x00\x00\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x04\x00\x00\x00\x0c\xff\xff\xff\xff\x0c\x07\x00\x00\x00\x0b\x0b\x11\x0e\tpersubent\x0e\x10acadSolidHistory\r\x06attrib\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x0c\x05\x00\x00\x00\x04\x01\x00\x00\x00\x04\x04\x00\x00\x00\x04\x01\x00\x00\x00\x04\x00\x00\x00\x00\x11\x0e\x06sphere\r\x07surface\x0c\xff\xff\xff\xff\x04\xff\xff\xff\xff\x0c\xff\xff\xff\xff\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00@\x14\x00\x00\x00\x00\x00\x00\xf0?\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?\x0b\x0b\x0b\x0b\x0b\x11\x0e\x03End\x0e\x02of\x0e\x03ASM\r\x04data': feat.DumpReadable() pytest.fail('wrong ASMData on second 3DSOLID') if feat.GetField('ASMTransform') != [-0.18750000000000006, 0.08660254037844387, 0.0, 0.3247595264191645, 0.05000000000000002, 0.0, 0.0, 0.0, -1.0, 5.75, 1.125, 0.0]: feat.DumpReadable() pytest.fail('wrong ASMTransform on second 3DSOLID') if feat.GetStyleString() != 'BRUSH(fc:#ff0000)': feat.DumpReadable() pytest.fail('wrong style string on second 3DSOLID') ############################################################################### # Writing Triangle geometry and checking if it is written properly def test_ogr_dxf_34(): ds = ogr.GetDriverByName('DXF').CreateDataSource('tmp/triangle_test.dxf') lyr = ds.CreateLayer('entities') dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('TRIANGLE ((0 0,0 1,1 0,0 0))')) lyr.CreateFeature(dst_feat) dst_feat = None lyr = None ds = None # Read back. ds = ogr.Open('tmp/triangle_test.dxf') lyr = ds.GetLayer(0) # Check first feature feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() expected_wkt = 'POLYGON ((0 0,0 1,1 0,0 0))' received_wkt = geom.ExportToWkt() assert expected_wkt == received_wkt, \ ('did not get expected geometry back: got %s' % received_wkt) ds = None gdal.Unlink('tmp/triangle_test.dxf') ############################################################################### # Test reading hatch with elliptical harts def test_ogr_dxf_35(): ds = ogr.Open('data/elliptical-arc-hatch-min.dxf') lyr = ds.GetLayer(0) expected_wkt = "POLYGON Z ((10.0 5.0 0,10.0121275732481 0.823574944937595 0," + \ "10.0484514617793 -3.3325901498166 0," + \ "10.1087954573461 -7.44833360561541 0," + \ "10.1928668294578 -11.5036898303666 0," + \ "10.3002577454253 -15.478986172205 0," + \ "10.4304472487686 -19.3549383521031 0," + \ "10.5828037863926 -23.1127440124738 0," + \ "10.7565882722693 -26.7341739279578 0," + \ "10.950957672766 -30.2016604359299 0," + \ "11.164969096226 -33.4983826577451 0," + \ "11.3975843669637 -36.6083480973141 0," + \ "11.6476750614854 -39.5164702211696 0," + \ "11.9140279825044 -42.2086416436832 0," + \ "12.1953510441969 -44.6718025624057 0," + \ "12.4902795401481 -46.8940041115515 0," + \ "12.797382763583 -48.8644663262969 0," + \ "13.1151709477668 -50.5736304367052 0," + \ "13.442102492907 -52.0132052375995 0," + \ "13.7765914444993 -53.1762073094422 0," + \ "14.1170151868394 -54.0569948951078 0," + \ "14.4617223143788 -54.6512952682117 0," + \ "14.8090406427424 -54.9562254602315 0," + \ "15.1572853205429 -54.9703062458714 0," + \ "15.5047670026452 -54.6934693188278 0," + \ "15.8498000452284 -54.1270576231449 0," + \ "16.1907106828936 -53.2738188385539 0," + \ "16.5258451481492 -52.137892051398 0," + \ "16.853577693885 -50.7247876758036 0," + \ "17.1723184799194 -49.0413607224995 0," + \ "17.4805212853603 -47.0957775449594 0," + \ "17.7766910093686 -44.8974762241817 0," + \ "18.0593909239355 -42.457120784282 0," + \ "18.3272496434925 -39.7865494609998 0," + \ "18.578967777543 -36.8987172740701 0," + \ "18.8133242340436 -33.8076331820431 0," + \ "19.0291821429573 -30.5282921244156 0," + \ "19.2254943712436 -27.0766022807403 0," + \ "19.4013086025311 -23.4693078995808 0," + \ "19.5557719568327 -19.7239080716712 0," + \ "19.6881351278911 -15.8585718413141 0," + \ "19.7977560180852 -11.8920500678142 0," + \ "19.8841028532649 -7.84358446451107 0," + \ "19.9467567624029 -3.73281425666327 0," + \ "19.9854138095503 0.420319089008591 0," + \ "19.9998864682387 4.59566860096071 0," + \ "19.9901045311767 8.77297953637629 0," + \ "19.9561154508277 12.9319876375154 0," + \ "19.8980841092162 17.0525174342237 0," + \ "19.8162920180808 21.1145801157289 0," + \ "19.7111359532519 25.0984704969476 0," + \ "19.5831260298811 28.9848626089156 0," + \ "19.4328832278572 32.7549034496293 0," + \ "19.2611363794148 36.390304440511 0," + \ "19.0687186335478 39.8734301448397 0," + \ "18.856563414379 43.1873838177704 0," + \ "18.6256998930927 46.3160893729396 0," + \ "18.3772479953948 49.2443693680303 0," + \ "18.1124129687203 51.9580186309899 0," + \ "17.8324795355432 54.4438731697361 0," + \ "17.5388056611497 56.6898740310677 0," + \ "17.2328159661089 58.6851257990001 0," + \ "16.9159948153966 60.4199494487478 0," + \ "16.5898791176976 61.8859292999569 0," + \ "16.2560508698165 63.075953841417 0," + \ "15.9161294823645 63.9842502292107 0," + \ "15.5717639239516 64.6064122909483 0," + \ "15.2246247219914 64.9394219002396 0," + \ "14.8763958589235 64.9816636177129 0," + \ "14.5287666031655 64.7329325275591 0," + \ "14.1834233144223 64.1944352315841 0," + \ "13.8420412631059 63.3687839959484 0," + \ "13.5062765035495 62.2599840789869 0," + \ "13.1777578404393 60.8734143015838 0," + \ "12.8580789274355 59.2158009543548 0," + \ "12.5487905363114 57.2951851682141 0," + \ "12.2513930341143 55.1208839066128 0," + \ "11.9673291048407 52.7034447686764 0," + \ "11.6979767509346 50.0545948224921 0," + \ "11.4446426085565 47.1871837167582 0," + \ "11.2085556090535 44.1151213467616 0," + \ "10.9908610173775 40.8533103770683 0," + \ "10.792614876371 37.4175739482608 0," + \ "10.6147788838724 33.8245789184198 0," + \ "10.4582157274918 30.0917550117071 0," + \ "10.323684899688 26.2372102662631 0," + \ "10.2118390134483 22.2796431915832 0," + \ "10.1232206364439 18.2382520615003 0," + \ "10.0582596590181 14.1326417827963 0," + \ "10.0172712087756 9.98272879122447 0," + \ "13.3027626235603 8.26630944469236 0," + \ "10.0 5.0 0))""" feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, expected_wkt) == 0, \ 'Wrong boundary on hatch 1' expected_wkt = "POLYGON Z ((10.0172712087756 9.98272879122439 0," + \ "10.0582596590181 14.1326417827963 0," + \ "10.1232206364439 18.2382520615002 0," + \ "10.2118390134483 22.2796431915831 0," + \ "10.323684899688 26.237210266263 0," + \ "10.4582157274918 30.0917550117071 0," + \ "10.6147788838723 33.8245789184198 0," + \ "10.792614876371 37.4175739482608 0," + \ "10.9908610173775 40.8533103770683 0," + \ "11.2085556090535 44.1151213467616 0," + \ "11.4446426085564 47.1871837167582 0," + \ "11.6979767509346 50.0545948224921 0," + \ "11.9673291048407 52.7034447686763 0," + \ "12.2513930341143 55.1208839066127 0," + \ "12.5487905363114 57.295185168214 0," + \ "12.8580789274355 59.2158009543548 0," + \ "13.1777578404393 60.8734143015838 0," + \ "13.5062765035495 62.2599840789869 0," + \ "13.8420412631059 63.3687839959484 0," + \ "14.1834233144223 64.1944352315841 0," + \ "14.5287666031655 64.7329325275591 0," + \ "14.8763958589235 64.9816636177129 0," + \ "15.2246247219914 64.9394219002396 0," + \ "15.5717639239516 64.6064122909483 0," + \ "15.9161294823645 63.9842502292107 0," + \ "16.2560508698165 63.075953841417 0," + \ "16.5898791176976 61.8859292999569 0," + \ "16.9159948153966 60.4199494487478 0," + \ "17.2328159661089 58.6851257990001 0," + \ "17.5388056611497 56.6898740310677 0," + \ "17.8324795355432 54.4438731697361 0," + \ "18.1124129687203 51.95801863099 0," + \ "18.3772479953948 49.2443693680303 0," + \ "18.6256998930927 46.3160893729396 0," + \ "18.856563414379 43.1873838177704 0," + \ "19.0687186335478 39.8734301448397 0," + \ "19.2611363794148 36.3903044405111 0," + \ "19.4328832278572 32.7549034496293 0," + \ "19.5831260298811 28.9848626089156 0," + \ "19.7111359532519 25.0984704969477 0," + \ "19.8162920180808 21.1145801157289 0," + \ "19.8980841092162 17.0525174342238 0," + \ "19.9561154508277 12.9319876375155 0," + \ "19.9901045311767 8.77297953637629 0," + \ "19.9998864682387 4.59566860096075 0," + \ "19.9854138095503 0.420319089008538 0," + \ "19.9467567624029 -3.73281425666325 0," + \ "19.8841028532649 -7.84358446451108 0," + \ "19.7977560180852 -11.8920500678142 0," + \ "19.6881351278911 -15.8585718413141 0," + \ "19.5557719568327 -19.7239080716712 0," + \ "19.4013086025311 -23.4693078995808 0," + \ "19.2254943712436 -27.0766022807403 0," + \ "19.0291821429573 -30.5282921244156 0," + \ "18.8133242340436 -33.8076331820431 0," + \ "18.578967777543 -36.8987172740701 0," + \ "18.3272496434925 -39.7865494609998 0," + \ "18.0593909239355 -42.457120784282 0," + \ "17.7766910093686 -44.8974762241817 0," + \ "17.4805212853603 -47.0957775449594 0," + \ "17.1723184799194 -49.0413607224995 0," + \ "16.853577693885 -50.7247876758035 0," + \ "16.5258451481492 -52.137892051398 0," + \ "16.1907106828936 -53.2738188385539 0," + \ "15.8498000452284 -54.1270576231449 0," + \ "15.5047670026452 -54.6934693188278 0," + \ "15.1572853205429 -54.9703062458714 0," + \ "14.8090406427424 -54.9562254602315 0," + \ "14.4617223143788 -54.6512952682117 0," + \ "14.1170151868394 -54.0569948951078 0," + \ "13.7765914444993 -53.1762073094422 0," + \ "13.442102492907 -52.0132052375995 0," + \ "13.1151709477668 -50.5736304367052 0," + \ "12.797382763583 -48.8644663262969 0," + \ "12.4902795401481 -46.8940041115515 0," + \ "12.1953510441969 -44.6718025624057 0," + \ "11.9140279825044 -42.2086416436832 0," + \ "11.6476750614854 -39.5164702211696 0," + \ "11.3975843669637 -36.6083480973141 0," + \ "11.164969096226 -33.4983826577452 0," + \ "10.950957672766 -30.2016604359299 0," + \ "10.7565882722693 -26.7341739279578 0," + \ "10.5828037863926 -23.1127440124739 0," + \ "10.4304472487686 -19.3549383521031 0," + \ "10.3002577454253 -15.4789861722049 0," + \ "10.1928668294578 -11.5036898303666 0," + \ "10.1087954573461 -7.44833360561536 0," + \ "10.0484514617793 -3.33259014981659 0," + \ "10.0121275732481 0.823574944937621 0," + \ "10.0 5.0 0," + \ "13.3027626235603 8.26630944469236 0," + \ "10.0172712087756 9.98272879122439 0))" feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, expected_wkt) == 0, \ 'Wrong boundary on hatch 2' ############################################################################### # Test reading files with only INSERT content (#7006) def test_ogr_dxf_36(): gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', 'FALSE') ds = ogr.Open('data/insert_only.dxf') gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', None) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 5 ############################################################################### # Create a blocks layer only def test_ogr_dxf_37(): ds = ogr.GetDriverByName('DXF').CreateDataSource('/vsimem/ogr_dxf_37.dxf') lyr = ds.CreateLayer('blocks') dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr.CreateFeature(dst_feat) dst_feat = None lyr = None ds = None # Read back. gdal.SetConfigOption('DXF_INLINE_BLOCKS', 'FALSE') ds = ogr.Open('/vsimem/ogr_dxf_37.dxf') gdal.SetConfigOption('DXF_INLINE_BLOCKS', None) lyr = ds.GetLayerByName('blocks') # Check first feature feat = lyr.GetNextFeature() assert feat is not None ds = None gdal.Unlink('/vsimem/ogr_dxf_37.dxf') ############################################################################### # Test degenerated cases of SOLID (#7038) def test_ogr_dxf_38(): ds = ogr.Open('data/solid-less-than-4-vertices.dxf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (0 2)' \ or f.GetStyleString() != 'PEN(c:#000000)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'LINESTRING (0.5 2.0,1 2)' \ or f.GetStyleString() != 'PEN(c:#000000)': f.DumpReadable() pytest.fail() ############################################################################### # Test correct reordering of vertices in SOLID (#7038, #7089) def test_ogr_dxf_39(): ds = ogr.Open('data/solid-vertex-ordering.dxf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 5,1.5 2.5,1.5 0.0,0.0 2.5,0 5))': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != 'POLYGON Z ((-10 13 123,10 10 123,5 12 123,8 13 123,-10 13 123))': f.DumpReadable() pytest.fail() ############################################################################### # Test handing of OCS vs WCS for MTEXT (#7049) def test_ogr_dxf_40(): ds = ogr.Open('data/mtext-ocs-reduced.dxf') lyr = ds.GetLayer(0) f = lyr.GetFeature(5) if ogrtest.check_feature_geometry(f, 'POINT (320000.0 5815007.5 0)') != 0: f.DumpReadable() pytest.fail() ############################################################################### # Test handing of OCS vs WCS for SOLID, HATCH and INSERT (#7077, #7098) def test_ogr_dxf_41(): ds = ogr.Open('data/ocs2wcs3.dxf') lyr = ds.GetLayer(0) # INSERT #1: OCS normal vector (0,0,-1) f = lyr.GetFeature(1) if ogrtest.check_feature_geometry(f, 'LINESTRING (45 20,25 20,25 40,45 40,45 20)') != 0: f.DumpReadable() pytest.fail() # INSERT #2: OCS normal vector (0,1/sqrt(2),-1/sqrt(2)) f = lyr.GetFeature(3) if ogrtest.check_feature_geometry(f, 'LINESTRING Z (10.0 18.0 -76.3675323681472,-10.0 18.0 -76.3675323681472,-10.0 32.142135623731 -62.2253967444162,10.0 32.142135623731 -62.2253967444162,10.0 18.0 -76.3675323681472)') != 0: f.DumpReadable() pytest.fail() # INSERT #3: OCS normal vector (0.6,sqrt(8)/5,sqrt(8)/5) with # Y scale factor of 2 and rotation angle of 45 degrees f = lyr.GetFeature(5) if ogrtest.check_feature_geometry(f, 'LINESTRING Z (49.7198871869889 -21.8420670839387 75.1721817670195,34.1976071850546 -17.0401066991021 86.8340855568821,41.9587471852111 -48.595846365317 110.157893136607,57.4810271871454 -53.3978067501536 98.4959893467447,49.7198871869889 -21.8420670839387 75.1721817670195)') != 0: f.DumpReadable() pytest.fail() # HATCH f = lyr.GetFeature(7) expected_wkt = "POLYGON Z ((-4.0 41.0121933088198 -132.936074863071," + \ "-4.40490904691695 41.0186412752948 -132.929626896596," + \ "-4.80797195119362 41.0379557758564 -132.910312396034," + \ "-5.20735098749398 41.0700487479548 -132.878219423936," + \ "-5.60122522671268 41.1147738668667 -132.833494305024," + \ "-5.98779883832069 41.1719272128483 -132.776340959042," + \ "-6.3653092782765 41.2412482008871 -132.707019971004," + \ "-6.73203532517085 41.3224207688135 -132.625847403077," + \ "-7.08630492796504 41.4150748183547 -132.533193353536," + \ "-7.42650282954181 41.5187879025613 -132.429480269329," + \ "-7.75107793130996 41.6330871519123 -132.315181019978," + \ "-8.05855036528454 41.7574514303164 -132.190816741574," + \ "-8.34751824139814 41.8913137111809 -132.05695446071," + \ "-8.61666403927964 42.0340636627126 -131.914204509178," + \ "-8.86476061535765 42.1850504306657 -131.763217741225," + \ "-9.09067679789991 42.3435856058464 -131.604682566044," + \ "-9.29338254447862 42.5089463628474 -131.439321809043," + \ "-9.47195363834675 42.6803787556975 -131.267889416193," + \ "-9.62557590231259 42.8571011554044 -131.091167016486," + \ "-9.75354891089994 43.0383078137139 -130.909960358177," + \ "-9.85528918386859 43.2231725368399 -130.725095635051," + \ "-9.9303328465346 43.4108524524121 -130.537415719479," + \ "-9.97833774476093 43.6004918524697 -130.347776319421," + \ "-9.99908500497526 43.7912260949768 -130.157042076914," + \ "-9.99248003210238 43.9821855460716 -129.966082625819," + \ "-9.95855294086101 44.1724995450765 -129.775768626814," + \ "-9.89745841845876 44.3613003741885 -129.586967797702," + \ "-9.80947501931113 44.5477272147525 -129.400540957138," + \ "1.0 44.5477272147525 -129.400540957138," + \ "0.988343845952696 44.306453848479 -129.641814323412," + \ "0.953429730181654 44.0663054100155 -129.881962761875," + \ "0.895420438411614 43.828401582239 -130.119866589652," + \ "0.814586436738996 43.5938515826157 -130.354416589275," + \ "0.711304610594103 43.3637489915164 -130.584519180374," + \ "0.586056507527265 43.1391666534406 -130.80910151845," + \ "0.439426092011876 42.9211516749198 -131.027116496971," + \ "0.272097022732443 42.7107205424238 -131.237547629467," + \ "0.084849465052212 42.5088543830312 -131.43941378886," + \ "-0.1214435464779 42.3164943899624 -131.631773781928," + \ "-0.34582017860938 42.134537434302 -131.813730737589," + \ "-0.587234283906729 41.9638318833721 -131.984436288519," + \ "-0.844560278369735 41.8051736452522 -132.143094526639," + \ "-1.11659838942566 41.6593024578878 -132.288965714003," + \ "-1.40208024982283 41.5268984400915 -132.421369731799," + \ "-1.69967481134424 41.4085789205144 -132.539689251376," + \ "-2.00799455076879 41.3048955593753 -132.643372612515," + \ "-2.32560193914507 41.216331776366 -132.731936395525," + \ "-2.65101614421488 41.1433004967256 -132.804967675165," + \ "-2.98271993473683 41.0861422259924 -132.862125945898," + \ "-3.31916675451876 41.04512346241 -132.903144709481," + \ "-3.65878793317664 41.0204354543892 -132.927832717502," + \ "-4.0 41.0121933088198 -132.936074863071))" if ogrtest.check_feature_geometry(f, expected_wkt) != 0: f.DumpReadable() pytest.fail() # SOLID f = lyr.GetFeature(9) if ogrtest.check_feature_geometry(f, 'POLYGON Z ((-10.0 13.0 124,8.0 13.0 124,5.0 12.0 123,10.0 10.0 121,-10.0 13.0 124))') != 0: f.DumpReadable() pytest.fail() ############################################################################### # Test insertion of blocks within blocks (#7106) def test_ogr_dxf_42(): # Inlining, merging ds = ogr.Open('data/block-insert-order.dxf') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2, \ ('Defaults: Expected 2 features, found %d' % lyr.GetFeatureCount()) # No inlining, merging gdal.SetConfigOption('DXF_INLINE_BLOCKS', 'FALSE') ds = ogr.Open('data/block-insert-order.dxf') gdal.SetConfigOption('DXF_INLINE_BLOCKS', None) lyr = ds.GetLayerByName('entities') assert lyr.GetFeatureCount() == 2, \ ('No inlining: Expected 2 features on entities, found %d' % lyr.GetFeatureCount()) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (8.0 2.5 6)') != 0: f.DumpReadable() pytest.fail('Wrong geometry for first insertion point') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (-1 -2 -3)') != 0: f.DumpReadable() pytest.fail('Wrong geometry for second insertion point') lyr = ds.GetLayerByName('blocks') assert lyr.GetFeatureCount() == 6, \ ('No inlining: Expected 6 feature on blocks, found %d' % lyr.GetFeatureCount()) f = lyr.GetFeature(3) if ogrtest.check_feature_geometry(f, 'POINT Z (5 5 0)') != 0: f.DumpReadable() pytest.fail('Wrong geometry for second insertion of BLOCK4 on BLOCK3') f = lyr.GetFeature(4) if ogrtest.check_feature_geometry(f, 'POINT Z (-5.48795472456028 1.69774937525433 4.12310562561766)') != 0: f.DumpReadable() pytest.fail('Wrong geometry for third insertion of BLOCK4 on BLOCK3') assert f.GetField('BlockName') == 'BLOCK4', 'Wrong BlockName' assert f.GetField('BlockScale') == [0.4, 1.0, 1.5], 'Wrong BlockScale' assert f.GetField('BlockAngle') == 40, 'Wrong BlockAngle' assert f.GetField('BlockOCSNormal') == [0.6, 0.565685424949238, 0.565685424949238], \ 'Wrong BlockOCSNormal' assert f.GetField('BlockOCSCoords') == [5, 5, 0], 'Wrong BlockOCSCoords' assert f.GetField('Block') == 'BLOCK3', 'Wrong Block' # Inlining, no merging gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', 'FALSE') ds = ogr.Open('data/block-insert-order.dxf') gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', None) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 4, \ ('Merging: Expected 4 features, found %d' % lyr.GetFeatureCount()) ############################################################################### # Ensure recursively-included blocks don't fail badly def test_ogr_dxf_43(): ds = ogr.Open('data/insert-recursive-pair.dxf') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ############################################################################### # General tests of LEADER and MULTILEADER entities (#7111) def test_ogr_dxf_44(): with gdaltest.config_option('DXF_MAX_BSPLINE_CONTROL_POINTS', '1'): ds = ogr.Open('data/leader-mleader.dxf') lyr = ds.GetLayer(0) with gdaltest.error_handler(): lyr.GetFeatureCount() assert gdal.GetLastErrorMsg().find('DXF_MAX_BSPLINE_CONTROL_POINTS') >= 0 ds = ogr.Open('data/leader-mleader.dxf') lyr = ds.GetLayer(0) # LEADER with default arrowhead, plus a couple of DIMSTYLE overrides # (6.0 arrowhead size and 1.5 scale factor) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (21 40 0,10 40 0,19.3125 34.6875 0,10.3125 34.6875 0,-13.5990791268758 34.6875 0)') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((21.0 41.5,30 40,21.0 38.5,21.0 41.5))') != 0: f.DumpReadable() pytest.fail() # Skip text f = lyr.GetNextFeature() # Basic LEADER with no dimension style or override information f = lyr.GetNextFeature() if f.GetStyleString() != 'PEN(c:#ff0000)' \ or ogrtest.check_feature_geometry(f, 'LINESTRING Z (-20.9782552979609 38.1443878852919 30,-12.2152357926375 44.793971841437 30,-13.7256166009765 49.0748560186272 30,-13.9025293262723 49.0416613258524 30)') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#ff0000)' \ or ogrtest.check_feature_geometry(f, 'POLYGON Z ((-20.9601206293303 38.1204894796201 30,-21.121645731992 38.035579873508 30,-20.9963899665916 38.1682862909638 30,-20.9601206293303 38.1204894796201 30))') != 0: f.DumpReadable() pytest.fail() # LEADER with a custom arrowhead that consists of a polygon and line f = lyr.GetNextFeature() if f.GetStyleString() != 'PEN(c:#00ff00)' \ or ogrtest.check_feature_geometry(f, 'LINESTRING Z (26.8 77.6 0,10 65 0,25 55 0,25 50 0,40 65 0,48 65 0,169.282571623465 65.0 0)') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#00ff00)' \ or ogrtest.check_feature_geometry(f, 'POLYGON ((27.2 80.4,30.4 82.8,32.8 79.6,29.6 77.2,27.2 80.4))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'PEN(c:#00ff00)' \ or ogrtest.check_feature_geometry(f, 'LINESTRING Z (28.4 78.8 0,26.8 77.6 0)') != 0: f.DumpReadable() pytest.fail() # Check that the very long text string in the MTEXT entity associated # to this LEADER is captured correctly f = lyr.GetNextFeature() assert len(f.GetField('Text')) == 319, \ ('Wrong text length: got %d' % len(f.GetField('Text'))) # MULTILEADER with custom arrowhead f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((26.8 32.6,10 20,25 10,25 5,40 20),(40 20,48 20))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((27.2 35.4,30.4 37.8,32.8 34.6,29.6 32.2,27.2 35.4))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (28.4 33.8 0,26.8 32.6 0)') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT (50.0 22.0327421555252)') != 0: f.DumpReadable() pytest.fail() if f.GetStyleString() != 'LABEL(f:"Arial",t:"Basic Multileader",p:7,s:4g,c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on MULTILEADER text') # There are three LEADERs, followed by two MULTILEADERs, without arrowheads. # In the first LEADER/MULTILEADER, the arrowhead is set to an empty block. # In the second LEADER/MULTILEADER, the arrowhead is too large to be displayed. # The third LEADER has the arrow turned off (this isn't possible for MULTILEADER). # We just check each of these to make sure there is no polygon (arrowhead) feature. for x in range(3): f = lyr.GetNextFeature() geom = f.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString25D, \ ('Unexpected LEADER geometry, expected wkbLineString25D on iteration %d' % x) for x in range(2): f = lyr.GetNextFeature() geom = f.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbMultiLineString, \ ('Unexpected MULTILEADER geometry, expected wkbMultiLineString on iteration %d' % x) f = lyr.GetNextFeature() geom = f.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbPoint, \ ('Unexpected MULTILEADER geometry, expected wkbPoint on iteration %d' % x) # MULTILEADER with multiple leader lines and formatted text f = lyr.GetNextFeature() if f.GetStyleString() != 'PEN(c:#0000ff)' \ or ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((7.6425115795681 -8.00285406769102,18.2 -20.0),(19.2913880067389 -13.9367332958948,18.2 -20.0),(18.2 -20.0,38 -20),(54.8204921137545 -22.5800753657327,60.2227692307692 -20.0),(60.2227692307692 -20.0,52.2227692307692 -20.0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#0000ff)' \ or ogrtest.check_feature_geometry(f, 'POLYGON Z ((7.1420359016196 -8.4432726642857 0,5 -5 0,8.1429872575166 -7.56243547109634 0,7.1420359016196 -8.4432726642857 0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#0000ff)' \ or ogrtest.check_feature_geometry(f, 'POLYGON Z ((18.6352657907565 -13.8186312970179 0,20 -10 0,19.9475102227214 -14.0548352947716 0,18.6352657907565 -13.8186312970179 0))') != 0: f.DumpReadable() pytest.fail() # Note, the text actually is nine question marks, this is not an encoding error f = lyr.GetNextFeature() if f.GetStyleString() != 'LABEL(f:"Calibri",it:1,t:"?????????",p:7,s:4g,w:40,c:#0000ff)' \ or ogrtest.check_feature_geometry(f, 'POINT (40.0 -17.9846153846154)') != 0: f.DumpReadable() pytest.fail() # Rotated MULTILEADER with scaled block content, block attributes, and # different leader color f = lyr.GetNextFeature() if f.GetStyleString() != 'PEN(c:#ff00ff)' \ or ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((-41.8919467995818 -22.8930851139176,-36.1215379759023 -17.6108145786645),(-36.1215379759023 -17.6108145786645,-44.0 -19.0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((-40.7553616986189 -14.3661762772835,-44.6945927106677 -15.0607689879512,-44 -19,-40.0607689879512 -18.3054072893323,-40.7553616986189 -14.3661762772835),(-41.9142984770378 -17.0075519687798,-41.126452274628 -16.8686334266463,-40.9875337324945 -17.6564796290561,-41.7753799349043 -17.7953981711896,-41.9142984770378 -17.0075519687798),(-42.0532170191713 -16.2197057663701,-42.1921355613049 -15.4318595639603,-41.4042893588951 -15.2929410218268,-41.2653708167616 -16.0807872242365,-42.0532170191713 -16.2197057663701),(-42.7021446794476 -17.1464705109134,-42.563226137314 -17.9343167133231,-43.3510723397238 -18.0732352554567,-43.4899908818573 -17.2853890530469,-42.7021446794476 -17.1464705109134),(-42.8410632215811 -16.3586243085036,-43.6289094239909 -16.4975428506372,-43.7678279661244 -15.7096966482274,-42.9799817637146 -15.5707781060938,-42.8410632215811 -16.3586243085036))') != 0: f.DumpReadable() pytest.fail() if version_info >= (3, 0, 0): test_text = 'Apples\u00B1' else: exec("test_text = u'Apples\u00B1'") test_text = test_text.encode('utf-8') f = lyr.GetNextFeature() if f.GetStyleString() != 'LABEL(f:"Arial",t:"' + test_text + '",p:2,s:1g,c:#ff0000,a:10)' \ or f.GetField('Text') != test_text \ or ogrtest.check_feature_geometry(f, 'POINT Z (-42.7597068401767 -14.5165110820149 0)') != 0: f.DumpReadable() pytest.fail() # MULTILEADER with no dogleg f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((-2.39659963256204 -14.5201521575302,-3.98423252456234 -23.1105237601191),(-26.0282877045921 -20.4748699216691,-3.98423252456233 -23.1105237601191))') != 0: f.DumpReadable() pytest.fail() for x in range(4): f = lyr.GetNextFeature() # MULTILEADER with no leader lines (block content only) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING EMPTY') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((-4.98423252456234 -22.1105237601191,-6.98423252456234 -22.1105237601191,-6.98423252456234 -24.1105237601191,-4.98423252456234 -24.1105237601191,-4.98423252456234 -22.1105237601191),(-5.78423252456234 -23.3105237601191,-5.38423252456234 -23.3105237601191,-5.38423252456234 -23.7105237601191,-5.78423252456234 -23.7105237601191,-5.78423252456234 -23.3105237601191),(-5.78423252456234 -22.9105237601191,-5.78423252456234 -22.5105237601191,-5.38423252456234 -22.5105237601191,-5.38423252456234 -22.9105237601191,-5.78423252456234 -22.9105237601191),(-6.18423252456234 -23.3105237601191,-6.18423252456234 -23.7105237601191,-6.58423252456234 -23.7105237601191,-6.58423252456234 -23.3105237601191,-6.18423252456234 -23.3105237601191),(-6.18423252456234 -22.9105237601191,-6.58423252456234 -22.9105237601191,-6.58423252456234 -22.5105237601191,-6.18423252456234 -22.5105237601191,-6.18423252456234 -22.9105237601191))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() # LEADER with spline path f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (75 -5 0,75.3293039686015 -5.27450166567948 0,75.686184437139 -5.54808513378289 0,76.0669570707518 -5.8208730793178 0,76.4679375345795 -6.09298817729179 0,76.8854414937615 -6.36455310271241 0,77.3157846134373 -6.63569053058724 0,77.7552825587464 -6.90652313592384 0,78.2002509948283 -7.17717359372979 0,78.6470055868223 -7.44776457901266 0,79.091861999868 -7.71841876678001 0,79.5311358991048 -7.98925883203941 0,79.9611429496723 -8.26040744979843 0,80.3781988167098 -8.53198729506465 0,80.7786191653568 -8.80412104284562 0,81.1587196607529 -9.07693136814892 0,81.5148159680374 -9.35054094598211 0,81.8432237523498 -9.62507245135277 0,82.1402586788297 -9.90064855926846 0,82.4022364126165 -10.1773919447368 0,82.6254726188496 -10.4554252827652 0,82.8062829626685 -10.7348712483614 0,82.9409831092127 -11.0158525165329 0,83.0258887236216 -11.2984917622873 0,83.0573154710347 -11.5829116606322 0,83.0315790165916 -11.869234886575 0,82.9452821800198 -12.1575745539156 0,82.8004070385963 -12.447864666659 0,82.603711185096 -12.7398802214393 0,82.3621180817583 -13.033390692038 0,82.0825511908225 -13.3281655522369 0,81.7719339745283 -13.6239742758175 0,81.4371898951149 -13.9205863365615 0,81.0852424148219 -14.2177712082505 0,80.7230149958886 -14.515298364666 0,80.3574311005547 -14.8129372795898 0,79.9954141910594 -15.1104574268035 0,79.6438877296422 -15.4076282800887 0,79.3097751785426 -15.704219313227 0,79 -16 0)') != 0: f.DumpReadable() pytest.fail() # MULTILEADER with spline path including an arrowhead on one leader line, # and text on an angle f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((97.9154085227223 -24.4884177083425,98.2307499443399 -23.8667044316857,98.5274844683239 -23.1977407715784,98.8076056908493 -22.4865892691047,99.0731072080911 -21.7383124653484,99.3259826162243 -20.9579729013935,99.568225511424 -20.1506331183241,99.8018294898652 -19.3213556572241,100.028788147723 -18.4752030591775,100.251095081172 -17.6172378652682,100.470743886388 -16.7525226165803,100.689728159546 -15.8861198541978,100.91004149682 -15.0230921192046,101.133677494386 -14.1685019526847,101.362629748419 -13.327411895722,101.598891855094 -12.5048844894007,101.844457410585 -11.7059822748045,102.101320011068 -10.9357677930177,102.371473252719 -10.199303585124,102.656910731711 -9.50165219220749,102.95962604422 -8.84787615535218,103.281612786421 -8.24303801564202,103.624864554489 -7.69220031416101,103.991374944599 -7.20042559199311,104.383137552927 -6.77277639022231,104.802145975646 -6.41431524993259,105.250393808933 -6.13010471220794,105.729874648962 -5.92520731813233,106.242582091908 -5.80468560878975,106.790509733946 -5.77360212526418,107.375651171252 -5.8370194086396,108.0 -6.0),(99.0 -4.0,99.2390786191346 -4.00918383080352,99.4787687119818 -4.01534615590692,99.7189331856537 -4.01916439926796,99.9594349472622 -4.02131598484443,100.200136903919 -4.02247833659411,100.440901962737 -4.02332887847475,100.681593030828 -4.02454503444416,100.922073015303 -4.02680422846008,101.162204823276 -4.03078388448032,101.401851361856 -4.03716142646263,101.640875538158 -4.0466142783648,101.879140259293 -4.0598198641446,102.116508432372 -4.07745560775981,102.352842964508 -4.1001989331682,102.588006762813 -4.12872726432755,102.821862734399 -4.16371802519564,103.054283542724 -4.20580126092676,103.285277318696 -4.25494915918985,103.514951346557 -4.31065239888725,103.743415181632 -4.37239063008777,103.970778379245 -4.43964350286021,104.19715049472 -4.51189066727337,104.422641083382 -4.58861177339606,104.647359700555 -4.66928647129708,104.871415901564 -4.75339441104525,105.094919241732 -4.84041524270936,105.317979276384 -4.92982861635822,105.540705560844 -5.02111418206063,105.763207650437 -5.11375158988541,105.985595100486 -5.20722048990135,106.207977466317 -5.30100053217725,106.430464303253 -5.39457136678194,106.653165166619 -5.4874126437842,106.876189611739 -5.57900401325284,107.099647193937 -5.66882512525668,107.323647468538 -5.7563556298645,107.548299990866 -5.84107517714513,107.773714316245 -5.92246341716736,108.0 -6.0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((98.5006722379985 -24.8076524621295 0,96 -28 0,97.330144807446 -24.1691829545554 0,98.5006722379985 -24.8076524621295 0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'LABEL(f:"Arial",t:"Splines",p:7,a:342,s:2g,c:#000000)' \ or ogrtest.check_feature_geometry(f, 'POINT (110.7043505591 -4.20673403616296)') != 0: f.DumpReadable() pytest.fail() # MULTILEADER with DIMBREAK f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((50.8917622404846 41.5635728657296,51.2877903403879 42.2579494192141),(51.9070696740577 43.3437639093041,54.3108962133801 47.5585173269448,55.9270734326513 48.2521008552884),(57.0757636753042 48.7450620367561,59.4256548786735 49.7535194092661),(60 50,60 50),(60 50,60 50),(60.625 50.0,61.875 50.0),(63.125 50.0,63.6 50.0))') != 0: f.DumpReadable() pytest.fail() ############################################################################### # Test linetype scaling (#7129) and parsing of complex linetypes (#7134) def test_ogr_dxf_45(): ds = ogr.Open('data/linetypes.dxf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'DASHED2', 'Got wrong linetype (1)' assert feat.GetStyleString() == 'PEN(c:#000000,p:"12.5g 6.25g")', \ 'Got wrong style string (1)' feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'DASHED2', 'Got wrong linetype (2)' assert feat.GetStyleString() == 'PEN(c:#000000,p:"0.625g 0.3125g")', \ 'Got wrong style string (2)' feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'DASHED2_FLIPPED', 'Got wrong linetype (3)' assert feat.GetStyleString() == 'PEN(c:#000000,p:"0.625g 0.3125g")', \ 'Got wrong style string (3)' feat = lyr.GetNextFeature() assert feat.GetField('Linetype') == 'Drain_Pipe_Inv_100', 'Got wrong linetype (4)' assert feat.GetStyleString() == 'PEN(c:#000000,p:"35g 22.5g")', \ 'Got wrong style string (4)' ############################################################################### # Test handling of DIMENSION anonymous block insertion (#7120) def test_ogr_dxf_46(): ds = ogr.Open('data/dimension.dxf') lyr = ds.GetLayer(0) # Extension lines f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (320000.0 5820010.0625 0,320000.0 5820010.43087258 0)') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (320010.0 5820010.0625 0,320010.0 5820010.43087258 0)') != 0: f.DumpReadable() pytest.fail() # Dimension arrow lines f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (320000.18 5820010.25087258 0,320004.475225102 5820010.25087258 0)') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING Z (320009.82 5820010.25087258 0,320005.524774898 5820010.25087258 0)') != 0: f.DumpReadable() pytest.fail() # Arrowheads f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((320000.18 5820010.28087259,320000.18 5820010.22087258,320000.0 5820010.25087258,320000.18 5820010.28087259))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((320009.82 5820010.28087259,320009.82 5820010.22087258,320010.0 5820010.25087258,320009.82 5820010.28087259))') != 0: f.DumpReadable() pytest.fail() # Text f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (320004.537844475 5820010.16240737 0)') != 0: f.DumpReadable() pytest.fail() if f.GetStyleString() != 'LABEL(f:"Arial",t:"10.0000",p:1,s:0.18g,c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on DIMENSION text from block') ############################################################################### # Test handling of DIMENSION fallback when there is no anonymous block (#7120) def test_ogr_dxf_47(): ds = ogr.Open('data/dimension-entities-only.dxf') lyr = ds.GetLayer(0) # Basic DIMENSION inheriting default styling # Dimension line and extension lines f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((320010.0 5820010.25087258,320000.0 5820010.25087258),(320010.0 5820010.0625,320010.0 5820010.43087258),(320000.0 5820010.0625,320000.0 5820010.43087258))') != 0: f.DumpReadable() pytest.fail() # Arrowheads f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((320009.82 5820010.28087259 0,320010.0 5820010.25087258 0,320009.82 5820010.22087258 0,320009.82 5820010.28087259 0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((320000.18 5820010.22087258 0,320000.0 5820010.25087258 0,320000.18 5820010.28087259 0,320000.18 5820010.22087258 0))') != 0: f.DumpReadable() pytest.fail() # Text f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT (320005.0 5820010.25087258)') != 0: f.DumpReadable() pytest.fail() if f.GetStyleString() != 'LABEL(f:"Arial",t:"10.0000",p:11,s:0.18g,c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on first DIMENSION text') # DIMENSION with style overrides # Dimension line f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((320005 5820005,320000 5820010))') != 0: f.DumpReadable() pytest.fail() # Arrowheads f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((320004.116116524 5820006.23743687 0,320005 5820005 0,320003.762563133 5820005.88388348 0,320004.116116524 5820006.23743687 0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((320000.883883476 5820008.76256313 0,320000 5820010 0,320001.237436867 5820009.11611652 0,320000.883883476 5820008.76256313 0))') != 0: f.DumpReadable() pytest.fail() # Text f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT (320002.5 5820007.5)') != 0: f.DumpReadable() pytest.fail() if f.GetStyleString() != 'LABEL(f:"Arial",t:"7.1",p:11,a:-45,s:0.48g,c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on second DIMENSION text') # DIMENSION inheriting styles from a custom DIMSTYLE # Dimension line f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((320000.0 5820001.5,320005.0 5820001.5),(320000.0 5820002.4,320000 5820001),(320005.0 5820002.4,320005 5820001))') != 0: f.DumpReadable() pytest.fail() # Arrowheads f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((320000.18 5820001.47 0,320000.0 5820001.5 0,320000.18 5820001.53 0,320000.18 5820001.47 0))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((320004.82 5820001.53 0,320005.0 5820001.5 0,320004.82 5820001.47 0,320004.82 5820001.53 0))') != 0: f.DumpReadable() pytest.fail() # Text f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT (320001.5 5820001.5)') != 0: f.DumpReadable() pytest.fail() if f.GetStyleString() != 'LABEL(f:"Arial",t:"±2 3\n\\P4 5.0000",p:11,s:0.18g,c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on third DIMENSION text') ############################################################################### # Test ByLayer and ByBlock color values (#7130) def test_ogr_dxf_48(): gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', 'FALSE') ds = ogr.Open('data/byblock-bylayer.dxf') gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', None) lyr = ds.GetLayer(0) # First insert an anonymous dimension block (this is NOT a test of our # basic "dimension" renderer) # The dimension extension lines are ByBlock; the INSERT is magenta f = lyr.GetFeature(0) if f.GetStyleString() != 'PEN(c:#ff00ff,p:"1.5875g 1.5875g")': f.DumpReadable() pytest.fail('Wrong style string on feature 0') # The dimension line is set directly to blue f = lyr.GetFeature(2) if f.GetStyleString() != 'PEN(c:#0000ff)': f.DumpReadable() pytest.fail('Wrong style string on feature 2') # The first arrowhead is a custom block; the SOLID in this block is # colored ByLayer; the layer the block is inserted on (_K_POINTS) # is colored red f = lyr.GetFeature(4) if f.GetStyleString() != 'BRUSH(fc:#ff0000)': f.DumpReadable() pytest.fail('Wrong style string on feature 4') # The first arrowhead block also contains a line colored ByBlock. # The arrowhead INSERT is blue, so the line should be blue. # Because this INSERT is within another block, we need to make # sure the ByBlock colouring isn't handled again for the outer # block, which is magenta. f = lyr.GetFeature(5) if f.GetStyleString() != 'PEN(c:#0000ff)': f.DumpReadable() pytest.fail('Wrong style string on feature 5') # The second arrowhead, like the dimension line, is set directly # to blue f = lyr.GetFeature(6) if f.GetStyleString() != 'BRUSH(fc:#0000ff)': f.DumpReadable() pytest.fail('Wrong style string on feature 6') # Like the dimension extension lines, the text is ByBlock (#7099) f = lyr.GetFeature(7) if f.GetStyleString() != 'LABEL(f:"Arial",t:"10.141 (2C)",s:0.4g,p:5,c:#ff00ff)': f.DumpReadable() pytest.fail('Wrong style string on feature 7') # ByLayer feature in block f = lyr.GetFeature(11) if f.GetStyleString() != 'PEN(c:#ff0000)': f.DumpReadable() pytest.fail('Wrong style string on feature 11') # ByBlock feature in block f = lyr.GetFeature(12) if f.GetStyleString() != 'PEN(c:#a552a5)': f.DumpReadable() pytest.fail('Wrong style string on feature 12') # ByLayer feature inserted via an INSERT on yellow layer in block # inserted via an INSERT on red layer: should be yellow f = lyr.GetFeature(13) if f.GetStyleString() != 'PEN(c:#ffff00)': f.DumpReadable() pytest.fail('Wrong style string on feature 13') # ByBlock feature inserted via a ByBlock INSERT in block inserted # via a color213 INSERT: should be color213 f = lyr.GetFeature(14) if f.GetStyleString() != 'PEN(c:#a552a5)': f.DumpReadable() pytest.fail('Wrong style string on feature 14') # ByBlock entities directly on the canvas show up as black f = lyr.GetFeature(15) if f.GetStyleString() != 'PEN(c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on feature 15') # ByBlock feature inserted via a true-color INSERT f = lyr.GetFeature(16) if f.GetStyleString() != 'PEN(c:#18dce1)': f.DumpReadable() pytest.fail('Wrong style string on feature 16') # True-color feature in block f = lyr.GetFeature(17) if f.GetStyleString() != 'PEN(c:#5e089b)': f.DumpReadable() pytest.fail('Wrong style string on feature 17') # ByBlock feature inserted via a ByLayer INSERT on true-color layer f = lyr.GetFeature(18) if f.GetStyleString() != 'PEN(c:#8ef19c)': f.DumpReadable() pytest.fail('Wrong style string on feature 18') ############################################################################### # Test block attributes (ATTRIB entities) (#7139) def test_ogr_dxf_49(): # Inline blocks mode ds = ogr.Open('data/attrib.dxf') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 6, \ ('Wrong feature count, got %d' % lyr.GetFeatureCount()) f = lyr.GetFeature(1) if f.GetField('Text') != 'super test': f.DumpReadable() pytest.fail('Wrong Text value on first ATTRIB on first INSERT') if f.GetStyleString() != 'LABEL(f:"Arial",t:"super test",p:2,s:8g,w:234.6,dx:30.293g,c:#ff0000)': f.DumpReadable() pytest.fail('Wrong style string on first ATTRIB on first INSERT') f = lyr.GetFeature(4) geom = f.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString25D, 'Expected LINESTRING Z' f = lyr.GetFeature(5) if f.GetField('Text') != '': f.DumpReadable() pytest.fail('Wrong Text value on ATTRIB on second INSERT') # No inlining gdal.SetConfigOption('DXF_INLINE_BLOCKS', 'FALSE') ds = ogr.Open('data/attrib.dxf') gdal.SetConfigOption('DXF_INLINE_BLOCKS', None) lyr = ds.GetLayerByName('entities') f = lyr.GetFeature(0) if f.GetField('BlockAttributes') != ['MYATT1 super test', 'MYATTMULTI_001 Corps', 'MYATTMULTI_002 plpl']: f.DumpReadable() pytest.fail('Wrong BlockAttributes value on first INSERT') f = lyr.GetFeature(1) if f.GetField('BlockAttributes') != ['MYATTMULTI ']: f.DumpReadable() pytest.fail('Wrong BlockAttributes value on second INSERT') lyr = ds.GetLayerByName('blocks') f = lyr.GetFeature(1) if f.GetField('AttributeTag') != 'MYATT1': f.DumpReadable() pytest.fail('Wrong AttributeTag value on first ATTDEF') f = lyr.GetFeature(2) if f.GetField('AttributeTag') != 'MYATTMULTI': f.DumpReadable() pytest.fail('Wrong AttributeTag value on second ATTDEF') ############################################################################### # Test extended text styling (#7151) and additional ByBlock/ByLayer tests (#7130) def test_ogr_dxf_50(): gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', 'FALSE') ds = ogr.Open('data/text-fancy.dxf') gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', None) lyr = ds.GetLayer(0) # Text in Times New Roman bold italic, stretched 190%, color ByLayer # inside block inserted on a blue layer f = lyr.GetFeature(0) if f.GetStyleString() != 'LABEL(f:"Times New Roman",bo:1,it:1,t:"Some nice text",p:5,s:10g,w:190,dx:84.3151g,dy:4.88825g,c:#0000ff)': f.DumpReadable() pytest.fail('Wrong style string on feature 0') # Polyline, color and linetype ByBlock inside block with red color # and ByLayer linetype inserted on a layer with DASHED2 linetype f = lyr.GetFeature(1) if f.GetStyleString() != 'PEN(c:#ff0000,w:2.1g,p:"2.5g 1.25g")': f.DumpReadable() pytest.fail('Wrong style string on feature 1') # Make sure TEXT objects don't inherit anything other than font name, # bold and italic from their parent STYLE f = lyr.GetFeature(2) if f.GetStyleString() != 'LABEL(f:"Times New Roman",bo:1,it:1,t:"Good text",p:1,s:5g,c:#000000)': f.DumpReadable() pytest.fail('Wrong style string on feature 2') # Polyline, color ByBlock, inside block inserted on a blue layer f = lyr.GetFeature(3) if f.GetStyleString() != 'PEN(c:#0000ff,w:2.1g)': f.DumpReadable() pytest.fail('Wrong style string on feature 3') # MTEXT stretched 250%, color ByLayer inside block inserted on a blue layer f = lyr.GetFeature(4) if f.GetStyleString() != 'LABEL(f:"Times New Roman",bo:1,it:1,t:"Some nice MTEXT",s:10g,w:250,p:8,c:#0000ff)': f.DumpReadable() pytest.fail('Wrong style string on feature 4') # Individually invisible object should be invisible f = lyr.GetFeature(5) if f.GetStyleString() != 'LABEL(f:"Times New Roman",bo:1,it:1,t:"Invisible text",p:1,s:5g,c:#00000000)': f.DumpReadable() pytest.fail('Wrong style string on feature 5') ############################################################################### # Test transformation of text inside blocks (ACAdjustText function) def test_ogr_dxf_51(): ds = ogr.Open('data/text-block-transform.dxf') lyr = ds.GetLayer(0) wanted_style = ['a:330', 'c:#000000', 'dx:1.96672g', 'dy:-1.13549g', 'f:"Arial"', 'p:2', 's:3g', 't:"some text"', 'w:25'] # Three text features, all with the same effective geometry and style for x in range(3): f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (2.83231568033604 5.98356393304499 0)') != 0: f.DumpReadable() pytest.fail('Wrong geometry on feature %d' % x) if sorted(f.GetStyleString()[6:-1].split(',')) != wanted_style: f.DumpReadable() pytest.fail('Wrong style string on feature %d' % x) ############################################################################### # Test HELIX, TRACE, HATCH with spline boundary, MLINE, and INSERT with rows/columns def test_ogr_dxf_52(): ds = ogr.Open('data/additional-entities.dxf') lyr = ds.GetLayer(0) # HELIX f = lyr.GetNextFeature() if f.GetField('SubClasses') != 'AcDbEntity:AcDbSpline:AcDbHelix': f.DumpReadable() pytest.fail('Wrong SubClasses on HELIX') if ogrtest.check_feature_geometry(f, 'LINESTRING (150 120,149.345876458438 119.778561209114,148.706627788813 119.535836602547,148.082773142501 119.272634882071,147.474831670876 118.989764749454,146.883322525316 118.688034906466,146.308764857195 118.368254054878,145.75167781789 118.03123089646,145.212580558776 117.677774132981,144.691992231228 117.308692466212,144.190431986623 116.924794597921,143.708418976337 116.52688922988,143.246472351745 116.115785063858,142.805226682224 115.692350328976,142.385468357145 115.257680939095,141.987209053809 114.8126724387,141.610382578047 114.358190780749,141.254922735687 113.895101918197,140.920763332559 113.424271804003,140.607838174492 112.946566391121,140.316081067316 112.46285163251,140.04542581686 111.973993481125,139.795806228954 111.480857889924,139.567156109426 110.984310811863,139.359409264107 110.4852181999,139.172499498825 109.98444600699,139.00636061941 109.482860186091,138.860926431692 108.981326690159,138.7361307415 108.480711472151,138.631907354662 107.981880485024,138.54819007701 107.485699681734,138.484912714371 106.993035015239,138.442009072576 106.504752438495,138.419412957453 106.021717904458,138.41678542913 105.544991394258,138.433333223564 105.075482938615,138.468434844937 104.613670677827,138.521471087835 104.160029888371,138.59182274684 103.715035846723,138.678870616536 103.27916382936,138.781995491508 102.852889112758,138.900578166339 102.436686973394,139.033999435614 102.031032687745,139.181640093916 101.636401532287,139.342880935829 101.253268783496,139.517102755937 100.882109717849,139.703686348824 100.523399611823,139.902012509075 100.177613741895,140.111462031272 99.8452273845396,140.33141571 99.5267158162348,140.561254339843 99.2225543134567,140.800358715385 98.933218152682,141.04810963121 98.6591826103871,141.303887881901 98.4009229630486,141.567055122443 98.1589144355755,141.836465751876 97.9334729764931,142.111203876514 97.7245055448538,142.390570491032 97.5318567084626,142.673866590107 97.3553710351246,142.960393168413 97.194893092645,143.249451220625 97.0502674488286,143.54034174142 96.9213386714808,143.832365725473 96.8079513284064,144.124824167458 96.7099499874106,144.417018062052 96.6271792162984,144.708248403929 96.5594835828749,144.997816187765 96.5067076549452,145.285022408236 96.4686960003143,145.569168060017 96.4452931867873,145.849554137782 96.4363437821692,146.125481636209 96.4416923542652,146.396251549971 96.4611834708803,146.661164873745 96.4946616998195,146.919522602205 96.5419716088879,147.170625730027 96.6029577658907,147.413708536343 96.6773765373194,147.64790100184 96.7644518356677,147.872845806317 96.8635266377703,148.088244263586 96.9739879715066,148.293797687463 97.0952228647559,148.48920739176 97.2266183453974,148.674174690292 97.3675614413103,148.848400896871 97.5174391803741,149.011587325312 97.675638590468,149.163435289429 97.8415466994713,149.303646103034 98.0145505352631,149.431921079943 98.194037125723,149.547961533967 98.37939349873,149.651468778922 98.5700066821635,149.742144128621 98.7652637039028,149.819688896877 98.9645515918272,149.883804397505 99.1672573738159,149.934191944317 99.3727680777483,149.970552851128 99.5804707315036,149.992588431751 99.7897523629611,150 100)') != 0: f.DumpReadable() pytest.fail('Wrong geometry on HELIX') # TRACE f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((150.0 120.5,150.0 119.5,200.0 119.5,200.0 120.5,150.0 120.5))') != 0: f.DumpReadable() pytest.fail('Wrong geometry on TRACE') # HATCH with a spline boundary path (and OCS as well, just for fun) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON Z ((47.6969600708475 60.0 15,47.6969600708475 0.0 15,46.1103652823066 -0.466958240734954 14.5010390223444,44.5309994192688 -0.919910449553494 14.0043514365868,42.9660914072371 -1.34485059453921 13.5122106346236,41.4228701717145 -1.72777264377568 13.0268900083519,39.9085646382042 -2.0546705653465 12.5506629496691,38.4304037322091 -2.31153832733525 12.0858028504722,36.9956163792324 -2.48436989782552 11.6345831026584,35.6114315047771 -2.55915924490089 11.1992770981251,34.2850780343463 -2.52190033664495 10.7821582287693,33.0237848934429 -2.3585871411413 10.3854998864882,31.8347810075701 -2.0552136264735 10.011575463179,30.725295302231 -1.59777376072516 9.66265835073903,29.7025567029285 -0.972261511979859 9.34102194106535,28.7737941351658 -0.164670848321179 9.04893962605519,27.9445456607789 0.835923776643351 8.78815304558283,27.2086691364137 2.01916842728349 8.55673058492536,26.5550905172208 3.36572402537053 8.35118961809371,25.9727183005027 4.85621968724478 8.1680420288596,25.450460983562 6.47128452924656 8.00379970099481,24.9772270637013 8.19154766771616 7.85497451827107,24.5419250382231 9.99763821899391 7.71807836446012,24.1334634044299 11.8701852994201 7.58962312333373,23.7407506596245 13.7898180253351 7.46612067866363,23.3526953011092 15.7371655130791 7.34408291422158,22.9582058261868 17.6928568789925 7.22002171377933,22.5461907321598 19.6375212394157 7.09044896110861,22.1055585163308 21.5517877106888 6.95187653998118,21.6252176760022 23.4162854091522 6.80081633416879,21.0940767084768 25.2116434511463 6.63378022744318,20.501044111057 26.9184909530113 6.44728010357611,19.8350283810455 28.5174570310876 6.23782784633932,19.0849380157448 29.9891708017154 6.00193533950455,18.2425220975445 31.3190096857923 5.73700778952582,17.3111586046656 32.5117898949509 5.44410752140743,16.2972009340528 33.5773013324584 5.12523258605305,15.2070024839932 34.5253339038266 4.7823810347885,14.046916652774 35.3656775145671 4.41755091893963,12.8232968386826 36.1081220701913 4.0327402898323,11.5424964400062 36.7624574762111 3.62994719879235,10.2108688550319 37.338473638138 3.21116969714562,8.834767482047 37.8459604614835 2.77840583621797,7.42054571933875 38.2947078517594 2.33365366733523,5.97455696519436 38.6945057144772 1.87891124182326,4.50315461790106 39.0551439551486 1.41617661100791,3.01269207574607 39.3864124792851 0.947447826215011,1.50952273701662 39.6981011923983 0.474722938770421,0 40 0,47.6969600708475 60.0 15))') != 0: f.DumpReadable() pytest.fail('Wrong geometry on HATCH 1') # Another HATCH with a spline boundary path f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((77.2409948093467 172.430072843974,75.261065049518 171.643815908613,73.2981627172517 170.696359298076,71.3875263981659 169.604375316261,69.5631545040892 168.388782317518,67.8563613292361 167.073645833116,66.2946346031063 165.684923719356,64.9008927779373 164.249191641798,63.6931834376534 162.792474868402,62.6848095284188 161.339284018754,61.8848281190297 159.911914493846,61.298843085132 158.530030785262,60.9300095654357 157.21052494952,60.7801817312349 155.967617443343,60.8511622391671 154.813159397702,61.1453506194465 153.756315627339,61.664528568996 152.803726831033,62.4105189258065 151.964301284269,63.3843801494824 151.249807149788,64.5850174245011 150.674379748575,66.0076885629501 150.253830592488,67.6424701411086 150.004704104407,69.4728079995063 149.943055679116,71.4743351228068 150.082969908572,73.6141841756299 150.434899728198,75.8510314766708 151.003978292885,78.1360638882735 151.788519596984,80.41494916904 152.778958906121,82.6307223520159 153.957467932202,84.7273090430607 155.298400731333,86.6532441052495 156.769592674546,88.3650659486779 158.334376895018,89.8299059955281 159.954044613131,91.0272387483612 161.589690168686,91.957368361883 163.189390065386,92.6421956980388 164.701128484532,93.1110835351921 166.094608264522,93.3942229550992 167.356341648662,93.5189493216415 168.483994478151,93.5079031853763 169.481912548033,93.3782987206629 170.357905428604,93.1417233193846 171.121075154443,92.8040593119231 171.78040251468,92.3652285565357 172.343822183981,91.8186752047856 172.817679470437,91.1571081487304 173.20986823606,90.3766844995721 173.528608818345,89.4716123962251 173.777329886712,88.4346297478537 173.955199520934,87.2580461173156 174.057607166253,85.9350751682361 174.076420167619,84.4616595153474 174.000186427787,82.8389797200317 173.814465060529,81.0767853391384 173.502507153586,79.1975328516125 173.04655812613,77.2409948093467 172.430072843974))') != 0: f.DumpReadable() pytest.fail('Wrong geometry on HATCH 2') # Three MLINE objects f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING Z ((-3.92232270276368 270.388386486182 0,44.2014737139232 260.763627202844 0),(0 290 0,50 280 0),(50 280 0,54.2440667916678 280.848813358334 0),(66.6666666666666 283.333333333333 0,87.2937093466817 287.458741869336 0),(55.335512192016 260.671024384032 0,83.0445264186877 266.212827229366 0),(97.9166666666667 289.583333333333 0,150 300 0),(93.6674837386727 268.337418693363 0,122.93205511402 274.190332968433 0),(150 300 0,140 260 0),(122.93205511402 274.190332968433 0,120.597149997093 264.850712500727 0))') != 0: f.DumpReadable() pytest.fail('Wrong geometry on MLINE 1') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING Z ((70 290 0,50 250 0),(61.0557280900008 294.472135955 0,41.0557280900008 254.472135955 0))') != 0: f.DumpReadable() pytest.fail('Wrong geometry on MLINE 2') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING Z ((100 300 0,97.9166666666667 289.583333333333 0),(95.7739043877141 304.364619506534 0,92.6051880066742 288.521037601335 0),(91.5478087754281 308.729239013068 0,87.2937093466817 287.458741869336 0),(93.6674837386727 268.337418693363 0,90 250 0),(88.3560050786802 267.275122961365 0,83.7111464107331 244.050829621629 0),(83.0445264186877 266.212827229366 0,77.4222928214662 238.101659243259 0),(90 250 0,160 260 0),(83.7111464107331 244.050829621629 0,165.0 255.663522991525 0),(77.4222928214662 238.101659243259 0,170.0 251.327045983049 0),(160 260 0,160 310 0),(165.0 255.663522991525 0,165.0 315.902302108582 0),(170.0 251.327045983049 0,170.0 321.804604217164 0),(160 310 0,100 300 0),(165.0 315.902302108582 0,95.7739043877141 304.364619506534 0),(170.0 321.804604217164 0,91.5478087754281 308.729239013068 0))') != 0: f.DumpReadable() pytest.fail('Wrong geometry on MLINE 3') # INSERT with rows/columns (MInsert) minsert_attrib_style = 'LABEL(f:"Arial",t:"N",p:5,a:13,s:8g,w:120,dx:2.21818g,dy:4.61732g,c:#000000)' f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (57.7504894565613 50.7437006478524,69.4429302339842 53.4431132999787,71.6924407774228 43.6994126521264,60 41,57.7504894565613 50.7437006478524)') != 0: f.DumpReadable() pytest.fail('Wrong geometry on INSERT polyline 1') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (62.5032851270548 42.604233016948 0)') != 0 \ or f.GetStyleString() != minsert_attrib_style: f.DumpReadable() pytest.fail('Wrong geometry on INSERT attribute 1') for _ in range(2): f = lyr.GetNextFeature() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (116.212693343675 64.2407639084843,127.905134121098 66.9401765606106,130.154644664537 57.1964759127583,118.462203887114 54.4970632606319,116.212693343675 64.2407639084843)') != 0: f.DumpReadable() pytest.fail('Wrong geometry on INSERT polyline 3') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (120.965489014169 56.1012962775799 0)') != 0 \ or f.GetStyleString() != minsert_attrib_style: f.DumpReadable() pytest.fail('Wrong geometry on INSERT attribute 3') for _ in range(8): f = lyr.GetNextFeature() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (140.944774200355 90.4766968345049,152.637214977778 93.1761094866313,154.886725521217 83.4324088387789,143.194284743794 80.7329961866526,140.944774200355 90.4766968345049)') != 0: f.DumpReadable() pytest.fail('Wrong geometry on INSERT polyline 8') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT Z (145.697569870849 82.3372292036006 0)') != 0 \ or f.GetStyleString() != minsert_attrib_style: f.DumpReadable() pytest.fail('Wrong geometry on INSERT attribute 8') # Also throw in a test of a weird SPLINE generated by a certain CAD package # with a knot vector that does not start at zero f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (0 20,0.513272464826192 19.8251653183892,1.00815682586353 19.629626397244,1.48499546839613 19.4132825350102,1.94413077770813 19.1760330301337,2.38590513908363 18.9177771810603,2.81066093780676 18.6384142862359,3.21874055916165 18.3378436441062,3.61048638843241 18.0159645531172,3.98624081090316 17.6726763117148,4.34634621185803 17.3078782183446,4.69114497658114 16.9214695714527,5.02097949035661 16.5133496694848,5.33619213846856 16.0834178108867,5.63712530620111 15.6315732941045,5.92412137883838 15.1577154175837,6.1975227416645 14.6617434797705,6.45767177996359 14.1435567791104,6.70491087901976 13.6030546140496,6.93958242411715 13.0401362830336,7.16202880053986 12.4547010845085,7.37259239357203 11.8466483169201,7.57161558849776 11.2158772787141,7.7594407706012 10.5622872683365,7.93641032516645 9.88577758423314,8.10286663747763 9.18624752484979,8.25915209281888 8.46359638863234,8.4056090764743 7.71772347402662,8.54257997372803 6.94852807947849,8.67040716986418 6.1559095034338,8.78943305016688 5.33976704433838,8.9 4.5)') != 0: f.DumpReadable() pytest.fail('Wrong geometry on SPLINE') ############################################################################### # Test block base points def test_ogr_dxf_53(): ds = ogr.Open('data/block-basepoint.dxf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING Z ((290 160 0,310 140 0),(310 160 0,290 140 0))') != 0: f.DumpReadable() pytest.fail('Wrong feature geometry') ############################################################################### # Test frozen and off layers def test_ogr_dxf_54(): gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', 'FALSE') ds = ogr.Open('data/frozen-off.dxf') gdal.SetConfigOption('DXF_MERGE_BLOCK_GEOMETRIES', None) lyr = ds.GetLayer(0) # Features should be visible/hidden in the following order: featureVisibility = '.hhh..hhh..hhhhhhhhhhhhhh.hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.hhh..hhhhhhhhhhhhhh.hhh' for number, h in enumerate(featureVisibility): f = lyr.GetNextFeature() isFeatureVisible = '#000000)' in f.GetStyleString() or '#ff0000)' in f.GetStyleString() if isFeatureVisible == (h == 'h'): f.DumpReadable() pytest.fail('Wrong visibility on feature %d' % number) ############################################################################### def test_ogr_dxf_insert_too_many_errors(): with gdaltest.error_handler(): ogr.Open('data/insert-too-many-errors.dxf') ############################################################################### def test_ogr_dxf_write_geometry_collection_of_unsupported_type(): tmpfile = '/vsimem/ogr_dxf_write_geometry_collection_of_unsupported_type.dxf' ds = ogr.GetDriverByName('DXF').CreateDataSource(tmpfile) lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(TIN EMPTY)')) with gdaltest.error_handler(): ret = lyr.CreateFeature(f) assert ret != 0 ds = None gdal.Unlink(tmpfile) ############################################################################### # Test fix for https://github.com/OSGeo/gdal/issues/1969 # with a SPLINE whose first knot is a very close to zero negative value. def test_ogr_dxf_very_close_neg_to_zero_knot(): ds = ogr.Open('data/spline_with_very_close_neg_to_zero_knot.dxf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() extent = g.GetEnvelope() assert extent == pytest.approx((163.0306017054786, 166.6530957511469, 78.40469559017359, 81.82569418640966), abs=1e-5) ############################################################################### def test_ogr_dxf_polygon_3D(): tmpfile = '/vsimem/test_ogr_dxf_polygon_3D.dxf' ds = ogr.GetDriverByName('DXF').CreateDataSource(tmpfile) lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) g = ogr.CreateGeometryFromWkt('POLYGON((0 0 10,0 1 10,1 1 10,0 0 10))') f.SetGeometry(g) lyr.CreateFeature(f) ds = None ds = ogr.Open(tmpfile) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() got_g = f.GetGeometryRef() assert got_g.Equals(g) gdal.Unlink(tmpfile) ############################################################################### # cleanup def test_ogr_dxf_cleanup(): gdaltest.dxf_layer = None gdaltest.dxf_ds = None ############################################################################### # ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_gtm.py�������������������������������������������������������������������0000775�0001750�0001750�00000027726�13701057761�015522� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest ############################################################################### # $Id: ogr_gtm.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GTM driver functionality. # Author: Leonardo de Paula Rosa Piga <leonardo dot piga at gmail dot com> # ############################################################################### # Copyright (c) 2009, Leonardo de P. R. Piga <leonardo dot piga at gmail dot com> # Copyright (c) 2009, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest import ogrtest from osgeo import ogr import pytest def test_ogr_gtm_init(): gdaltest.gtm_ds = None gdaltest.gtm_ds = ogr.Open('data/samplemap.gtm') if gdaltest.gtm_ds is None: gdaltest.have_gtm = 0 else: gdaltest.have_gtm = 1 if not gdaltest.have_gtm: pytest.skip() assert gdaltest.gtm_ds.GetLayerCount() == 2, 'wrong number of layers' ############################################################################### # Test waypoints gtm layer. def test_ogr_gtm_read_1(): if not gdaltest.have_gtm: pytest.skip() assert gdaltest.gtm_ds is not None lyr = gdaltest.gtm_ds.GetLayerByName('samplemap_waypoints') assert lyr.GetFeatureCount() == 3, 'wrong number of features' # Test 1st feature feat = lyr.GetNextFeature() assert feat.GetField('name') == 'WAY6', 'Wrong name field value' assert feat.GetField('comment') == 'Santa Cruz Stadium', 'Wrong comment field value' assert feat.GetField('icon') == 92, 'Wrong icon field value' assert feat.GetField('time') == '2009/12/18 17:32:41', 'Wrong time field value' wkt = 'POINT (-47.789974212646484 -21.201919555664062)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 2nd feature feat = lyr.GetNextFeature() assert feat.GetField('name') == 'WAY6', 'Wrong name field value' assert feat.GetField('comment') == 'Joe\'s Goalkeeper Pub', \ 'Wrong comment field value' assert feat.GetField('icon') == 4, 'Wrong icon field value' assert feat.GetField('time') == '2009/12/18 17:34:46', 'Wrong time field value' wkt = 'POINT (-47.909481048583984 -21.294229507446289)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 3rd feature feat = lyr.GetNextFeature() assert feat.GetField('name') == '33543400', 'Wrong name field value' assert feat.GetField('comment') == 'City Hall', 'Wrong comment field value' assert feat.GetField('icon') == 61, 'Wrong icon field value' assert feat.GetField('time') is None, 'Wrong time field value' wkt = 'POINT (-47.806097491943362 -21.176849600708007)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' ############################################################################### # Test tracks gtm layer. def test_ogr_gtm_read_2(): if not gdaltest.have_gtm: pytest.skip() assert gdaltest.gtm_ds is not None lyr = gdaltest.gtm_ds.GetLayerByName('samplemap_tracks') assert lyr.GetFeatureCount() == 3, 'wrong number of features' # Test 1st feature feat = lyr.GetNextFeature() assert feat.GetField('name') == 'San Sebastian Street', 'Wrong name field value' assert feat.GetField('type') == 2, 'Wrong type field value' assert feat.GetField('color') == 0, 'Wrong color field value' # if feat.GetField('time') is not None: # gdaltest.post_reason( 'Wrong time field value' ) # return 'fail' wkt = 'LINESTRING (-47.807481607448054 -21.177795963939211,' + \ '-47.808151245117188 -21.177299499511719,' + \ '-47.809136624130645 -21.176562836150087,' + \ '-47.809931418108405 -21.175971104366582)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 2nd feature feat = lyr.GetNextFeature() assert feat.GetField('name') == 'Barao do Amazonas Street', 'Wrong name field value' assert feat.GetField('type') == 1, 'Wrong type field value' assert feat.GetField('color') == 0, 'Wrong color field value' # if feat.GetField('time') is not None: # gdaltest.post_reason( 'Wrong time field value' ) # return 'fail' wkt = 'LINESTRING (-47.808751751608561 -21.178029550275486,' + \ '-47.808151245117188 -21.177299499511719,' + \ '-47.807561550927701 -21.176617693474089,' + \ '-47.806959118447779 -21.175900153727685)' assert not ogrtest.check_feature_geometry(feat, wkt) # Test 3rd feature feat = lyr.GetNextFeature() assert feat.GetField('name') == 'Curupira Park', 'Wrong name field value' assert feat.GetField('type') == 17, 'Wrong type field value' assert feat.GetField('color') == 46848, 'Wrong color field value' # if feat.GetField('time') is not None: # gdaltest.post_reason( 'Wrong time field value' ) # return 'fail' wkt = 'LINESTRING (-47.7894287109375 -21.194473266601562,' + \ '-47.793514591064451 -21.197530536743162,' + \ '-47.797027587890625 -21.19483757019043,' + \ '-47.794818878173828 -21.192028045654297,' + \ '-47.794120788574219 -21.193340301513672,' + \ '-47.792263031005859 -21.194267272949219,' + \ '-47.7894287109375 -21.194473266601562)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' ############################################################################### # Write test ############################################################################### # Waypoint write def test_ogr_gtm_write_1(): ds = ogr.GetDriverByName('GPSTrackMaker').CreateDataSource('tmp/gtm.gtm') lyr = ds.CreateLayer('gtm_waypoints', geom_type=ogr.wkbPoint) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', 'WAY0000000') dst_feat.SetField('comment', 'Waypoint 0') dst_feat.SetField('icon', 10) dst_feat.SetField('time', '2009/12/23 14:25:46') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (-21 -47)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', 'WAY0000001') dst_feat.SetField('comment', 'Waypoint 1') dst_feat.SetField('icon', 31) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (-21.123 -47.231 800)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' lyr = ds.CreateLayer('gtm_tracks', geom_type=ogr.wkbLineString) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', '1st Street') dst_feat.SetField('type', 2) dst_feat.SetField('color', 0x0000FF) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (-21.1 -47.1, -21.2 -47.2, -21.3 -47.3, -21.4 -47.4)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', '2nd Street') dst_feat.SetField('type', 1) dst_feat.SetField('color', 0x000000) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (-21.11 -47.1, -21.21 -47.2, -21.31 -47.3, -21.41 -47.4)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', '3rd Street') dst_feat.SetField('type', 2) dst_feat.SetField('color', 0x000000) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((-21.12 -47.1, -21.22 -47.2, -21.32 -47.3, -21.42 -47.4),' + '(-21.12 -47.1, -21.02 -47.0, -20.92 -46.9))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None ############################################################################### # Check previous test def test_ogr_gtm_check_write_1(): if not gdaltest.have_gtm: pytest.skip() ds = ogr.Open('tmp/gtm.gtm') lyr = ds.GetLayerByName('gtm_waypoints') assert lyr.GetFeatureCount() == 2, 'Bad feature count.' # Test 1st waypoint feat = lyr.GetNextFeature() assert feat.GetField('name') == 'WAY0000000', 'Wrong name field value' assert feat.GetField('comment') == 'Waypoint 0', 'Wrong comment field value' assert feat.GetField('icon') == 10, 'Wrong icon field value' assert feat.GetField('time') == '2009/12/23 14:25:46', 'Wrong time field value' wkt = 'POINT (-21 -47)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 2nd waypoint feat = lyr.GetNextFeature() assert feat.GetField('name') == 'WAY0000001', 'Wrong name field value' assert feat.GetField('comment') == 'Waypoint 1', 'Wrong comment field value' assert feat.GetField('icon') == 31, 'Wrong icon field value' assert feat.GetField('time') is None, 'Wrong time field value' wkt = 'POINT (-21.123 -47.231 800)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test tracks lyr = ds.GetLayerByName('gtm_tracks') assert lyr.GetFeatureCount() == 4, 'Bad feature count.' # Test 1st track feat = lyr.GetNextFeature() assert feat.GetField('name') == '1st Street', 'Wrong name field value' assert feat.GetField('type') == 2, 'Wrong type field value' assert feat.GetField('color') == 0x0000FF, 'Wrong color field value' wkt = 'LINESTRING (-21.1 -47.1, -21.2 -47.2, -21.3 -47.3, -21.4 -47.4)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 2nd track feat = lyr.GetNextFeature() assert feat.GetField('name') == '2nd Street', 'Wrong name field value' assert feat.GetField('type') == 1, 'Wrong type field value' assert feat.GetField('color') == 0x000000, 'Wrong color field value' wkt = 'LINESTRING (-21.11 -47.1, -21.21 -47.2, -21.31 -47.3, -21.41 -47.4)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 3rd track feat = lyr.GetNextFeature() assert feat.GetField('name') == '3rd Street', 'Wrong name field value' assert feat.GetField('type') == 2, 'Wrong type field value' assert feat.GetField('color') == 0x000000, 'Wrong color field value' wkt = 'LINESTRING (-21.12 -47.1, -21.22 -47.2, -21.32 -47.3, -21.42 -47.4)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' # Test 4th track feat = lyr.GetNextFeature() assert feat.GetField('name') == '3rd Street', 'Wrong name field value' assert feat.GetField('type') == 2, 'Wrong type field value' assert feat.GetField('color') == 0x000000, 'Wrong color field value' wkt = 'LINESTRING (-21.12 -47.1, -21.02 -47.0, -20.92 -46.9)' assert not ogrtest.check_feature_geometry(feat, wkt), 'Unexpected geometry' ############################################################################### # def test_ogr_gtm_cleanup(): gdaltest.gtm_ds = None os.remove('tmp/gtm.gtm') ������������������������������������������gdalautotest-3.1.2/ogr/ogr_sql_rfc28.py�������������������������������������������������������������0000775�0001750�0001750�00000135271�13701057761�016531� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_sql_rfc28.py 179a4cd205b07d8a798ad10c5edc6bb95581f956 2020-03-27 13:14:01 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR SQL capabilities added as part of RFC 28 implementation. # Author: Frank Warmerdam <warmerdam@pobox.com> # ############################################################################### # Copyright (c) 2010, Frank Warmerdam <warmerdam@pobox.com> # Copyright (c) 2010-2014, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import ogr import gdaltest import ogrtest import pytest ############################################################################### # Test an expression with a left side value and right side column and an \ # expression for the value. def test_ogr_rfc28_1(): gdaltest.ds = ogr.Open('data') gdaltest.lyr = gdaltest.ds.GetLayerByName('poly') gdaltest.lyr.SetAttributeFilter('160+7 > eas_id') count = gdaltest.lyr.GetFeatureCount() assert count == 3, \ ('Got wrong count with GetFeatureCount() - %d, expecting 3' % count) ############################################################################### # Test CONCAT operator in the context of a WHERE clause. def test_ogr_rfc28_2(): gdaltest.lyr.SetAttributeFilter("CONCAT('x',PRFEDEA) = 'x35043423'") count = gdaltest.lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.lyr.SetAttributeFilter('') ############################################################################### # Test '+' operator on strings. def test_ogr_rfc28_3(): gdaltest.lyr.SetAttributeFilter("'x'+PRFEDEA = 'x35043423'") count = gdaltest.lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.lyr.SetAttributeFilter('') ############################################################################### # Test '%' operator. def test_ogr_rfc28_4(): gdaltest.lyr.SetAttributeFilter("EAS_ID % 5 = 1") count = gdaltest.lyr.GetFeatureCount() assert count == 2, \ ('Got wrong count with GetFeatureCount() - %d, expecting 2' % count) gdaltest.lyr.SetAttributeFilter('') ############################################################################### # Test '%' operator. def test_ogr_rfc28_5(): gdaltest.lyr.SetAttributeFilter("EAS_ID % 5 = 1") count = gdaltest.lyr.GetFeatureCount() assert count == 2, \ ('Got wrong count with GetFeatureCount() - %d, expecting 2' % count) gdaltest.lyr.SetAttributeFilter('') ############################################################################### # Test support for a quoted field name. def test_ogr_rfc28_6(): gdaltest.lyr.SetAttributeFilter("\"EAS_ID\" = 166") count = gdaltest.lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.lyr.SetAttributeFilter('') ############################################################################### # test with distinguished name for field in where clause. def test_ogr_rfc28_7_wrong_quoting(): with gdaltest.error_handler(): ql = gdaltest.ds.ExecuteSQL("select eas_id from idlink where \"idlink.eas_id\" = 166") count = ql.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.ds.ReleaseResultSet(ql) def test_ogr_rfc28_7_good_quoting(): ql = gdaltest.ds.ExecuteSQL("select eas_id from idlink where idlink.eas_id = 166") count = ql.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.ds.ReleaseResultSet(ql) ############################################################################### # test with distinguished name for field in target columns. def test_ogr_rfc28_8_wrong_quoting(): with gdaltest.error_handler(): ql = gdaltest.ds.ExecuteSQL("select \"idlink.eas_id\" from idlink where \"idlink.eas_id\" = 166") count = ql.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) expect = [166] tr = ogrtest.check_features_against_list(ql, 'idlink.eas_id', expect) gdaltest.ds.ReleaseResultSet(ql) assert tr def test_ogr_rfc28_8_good_quoting(): ql = gdaltest.ds.ExecuteSQL("select idlink.eas_id from idlink where idlink.eas_id = 166") count = ql.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) expect = [166] tr = ogrtest.check_features_against_list(ql, 'idlink.eas_id', expect) gdaltest.ds.ReleaseResultSet(ql) assert tr ############################################################################### # Test with quoted funky (non-identifier) name. def test_ogr_rfc28_9(): ds = ogr.Open('data/oddname.csv') lyr = ds.GetLayer(0) lyr.SetAttributeFilter("\"Funky @Name\" = '32'") count = lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) expect = ['8902'] tr = ogrtest.check_features_against_list(lyr, 'PRIME_MERIDIAN_CODE', expect) assert tr # TODO: unparse quoting? ############################################################################### # test quoted names for funky columns in SELECT WHERE (confirm unparse quoting) def test_ogr_rfc28_10(): ds = ogr.Open('data/oddname.csv') lyr = ds.ExecuteSQL("SELECT * from oddname where \"Funky @Name\" = '32'") count = lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) expect = ['8902'] tr = ogrtest.check_features_against_list(lyr, 'PRIME_MERIDIAN_CODE', expect) ds.ReleaseResultSet(lyr) assert tr ############################################################################### # test quoted funky names in output columns list. def test_ogr_rfc28_11(): ds = ogr.Open('data/oddname.csv') lyr = ds.ExecuteSQL("SELECT \"Funky @Name\" from oddname where prime_meridian_code = '8902'") count = lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) expect = ['32'] tr = ogrtest.check_features_against_list(lyr, 'Funky @Name', expect) ds.ReleaseResultSet(lyr) assert tr ############################################################################### # test selecting fixed string fields. def test_ogr_rfc28_12(): lyr = gdaltest.ds.ExecuteSQL("SELECT 'constant string', 'other' as abc, eas_id from idlink where eas_id = 165") count = lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) expect = ['other'] tr = ogrtest.check_features_against_list(lyr, 'abc', expect) expect = [165] if tr: lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'eas_id', expect) expect = ['constant string'] if tr: lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_1', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test SUBSTR operator in the context of a WHERE clause. def test_ogr_rfc28_13(): gdaltest.lyr.SetAttributeFilter("SUBSTR(PRFEDEA,5,4) = '3423'") count = gdaltest.lyr.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.lyr.SetAttributeFilter('') ############################################################################### # test selecting fixed string fields. def test_ogr_rfc28_14(): lyr = gdaltest.ds.ExecuteSQL("SELECT SUBSTR(PRFEDEA,4,5) from poly where eas_id in (168,179)") expect = ['43411', '43423'] tr = ogrtest.check_features_against_list(lyr, 'substr_prfedea', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test CONCAT with more than two arguments. def test_ogr_rfc28_15(): lyr = gdaltest.ds.ExecuteSQL("SELECT CONCAT(PRFEDEA,' ',CAST(EAS_ID AS CHARACTER(3))) from poly where eas_id in (168,179)") expect = ['35043411 168', '35043423 179'] tr = ogrtest.check_features_against_list(lyr, 'concat_prfedea', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test parse support for negative numbers (#3724) def test_ogr_rfc28_16(): lyr = gdaltest.ds.ExecuteSQL("SELECT -1, 3--1,3*-1,2e-1,3-1 from poly where eas_id = 168") expect = [-1] tr = ogrtest.check_features_against_list(lyr, 'field_1', expect) expect = [4] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_2', expect) expect = [-3] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_3', expect) expect = [0.2] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_4', expect) expect = [2] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_5', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test evaluation of division - had a problem with type conversion. def test_ogr_rfc28_17(): lyr = gdaltest.ds.ExecuteSQL("SELECT 5/2, 5.0/2.0, 5/2.0, 5.0/2 from poly where eas_id = 168") expect = [2] tr = ogrtest.check_features_against_list(lyr, 'field_1', expect) expect = [2.5] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_2', expect) expect = [2.5] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_3', expect) expect = [2.5] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'field_4', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test some special distinct cases. def test_ogr_rfc28_18(): lyr = gdaltest.ds.ExecuteSQL("SELECT COUNT(distinct id), COUNT(distinct id) as \"xx\" from departs") expect = [1] tr = ogrtest.check_features_against_list(lyr, 'COUNT_id', expect) expect = [1] lyr.ResetReading() tr = ogrtest.check_features_against_list(lyr, 'xx', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Verify that NOT IN ( list ) works def test_ogr_rfc28_19(): sql_lyr = gdaltest.ds.ExecuteSQL('select * from poly where eas_id not in (158,165)') count = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) assert count == 8, \ ('Got wrong count with GetFeatureCount() - %d, expecting 8' % count) ############################################################################### # Verify arithmetic operator precedence and unary minus def test_ogr_rfc28_20(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") lyr = ds.CreateLayer("my_layer") field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 2) lyr.CreateFeature(feat) sql_lyr = ds.ExecuteSQL('select -intfield + 1 + 2 * 3 + 5 - 3 * 2 from my_layer') feat = sql_lyr.GetNextFeature() assert feat.GetField('FIELD_1') == 4 ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Verify that BETWEEN works def test_ogr_rfc28_21(): sql_lyr = gdaltest.ds.ExecuteSQL('select * from poly where eas_id between 165 and 169') count_between = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.ds.ExecuteSQL('select * from poly where eas_id >= 165 and eas_id <= 169') count_ge_and_le = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) assert count_between == count_ge_and_le, \ ('Got wrong count with GetFeatureCount() - %d, expecting %d' % (count_between, count_ge_and_le)) ############################################################################### # Verify that NOT BETWEEN works def test_ogr_rfc28_22(): sql_lyr = gdaltest.ds.ExecuteSQL('select * from poly where eas_id not between 165 and 169') count_not_between = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.ds.ExecuteSQL('select * from poly where not(eas_id >= 165 and eas_id <= 169)') count_not_ge_and_le = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) assert count_not_between == count_not_ge_and_le, \ ('Got wrong count with GetFeatureCount() - %d, expecting %d' % (count_not_between, count_not_ge_and_le)) ############################################################################### # Verify that NOT LIKE works def test_ogr_rfc28_23(): sql_lyr = gdaltest.ds.ExecuteSQL("select * from poly where PRFEDEA NOT LIKE '35043413'") count_not_like1 = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.ds.ExecuteSQL("select * from poly where NOT (PRFEDEA LIKE '35043413')") count_not_like2 = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) assert count_not_like1 == count_not_like2, \ ('Got wrong count with GetFeatureCount() - %d, expecting %d' % (count_not_like1, count_not_like2)) ############################################################################### # Verify that NULL works def test_ogr_rfc28_24(): sql_lyr = gdaltest.ds.ExecuteSQL("select *, NULL, NULL as nullstrfield, CAST(null as integer) as nullintfield from poly where NULL IS NULL") feat = sql_lyr.GetNextFeature() if feat.IsFieldSet('FIELD_4'): feat.DumpReadable() gdaltest.ds.ReleaseResultSet(sql_lyr) pytest.fail() if feat.IsFieldSet('nullstrfield'): feat.DumpReadable() gdaltest.ds.ReleaseResultSet(sql_lyr) pytest.fail() if feat.IsFieldSet('nullintfield'): feat.DumpReadable() gdaltest.ds.ReleaseResultSet(sql_lyr) pytest.fail() count = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) assert count == 10, \ ('Got wrong count with GetFeatureCount() - %d, expecting %d' % (count, 10)) ############################################################################### # Verify that LIKE pattern ESCAPE escape_char works def test_ogr_rfc28_25(): sql_lyr = gdaltest.ds.ExecuteSQL("select * from poly where prfedea LIKE 'x35043408' ESCAPE 'x'") count = sql_lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(sql_lyr) assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) ############################################################################### # Test SUBSTR with negative offsets def test_ogr_rfc28_26(): lyr = gdaltest.ds.ExecuteSQL("SELECT SUBSTR(PRFEDEA,-2) from poly where eas_id in (168,179)") expect = ['11', '23'] tr = ogrtest.check_features_against_list(lyr, 'substr_prfedea', expect) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test that we correctly let floating point values as floating point, and not as integer (#4634)" def test_ogr_rfc28_27(): lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM poly WHERE 4000000000. > 2000000000.") count = lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(lyr) assert count == 10 ############################################################################### # Extensive test of the evaluation of arithmetic and logical operators def ogr_rfc28_28_test(formula, expected_val): sql_lyr = gdaltest.ds.ExecuteSQL("SELECT " + formula + " from poly where fid = 0") f = sql_lyr.GetNextFeature() got = f.GetField(0) gdaltest.ds.ReleaseResultSet(sql_lyr) assert got == expected_val, \ ('bad result for %s : %s' % (formula, str(expected_val))) def test_ogr_rfc28_28(): operators = ['+', '-', '*', '/', '%'] formulas = [] for operator in operators: formulas.append('6' + operator + '3') formulas.append('5.1' + operator + '3.2') formulas.append('5' + operator + '3.2') formulas.append('5.1' + operator + '3') formulas.append('3000000000000' + operator + '3') if operator != '/': formulas.append('3' + operator + '3000000000000') formulas.append('3000000000000' + operator + '3.') if operator != '/': formulas.append('3.' + operator + '3000000000000') for formula in formulas: expected_val = eval(formula) ret = ogr_rfc28_28_test(formula, expected_val) if ret == 'fail': return ret operators = ['<', '<=', '>', '>=', ' = ', '<>'] formulas = [] for operator in operators: formulas.append('3' + operator + '3') formulas.append('3.' + operator + '3.') formulas.append('3' + operator + '6') formulas.append('3.' + operator + '6.') formulas.append('3' + operator + '6.') formulas.append('3.' + operator + '6') formulas.append('6' + operator + '3') formulas.append('6.' + operator + '3.') formulas.append('6' + operator + '3.') formulas.append('6.' + operator + '3') formulas.append("'a'" + operator + "'a'") formulas.append("'a'" + operator + "'b'") formulas.append("'b'" + operator + "'a'") formulas.append('3' + operator + '1000000000000') formulas.append('1000000000000' + operator + '3') formulas.append('1000000000000' + operator + '1000000000000') for formula in formulas: expected_bool = eval(formula.replace(' = ', '==').replace('<>', '!=')) ret = ogr_rfc28_28_test(formula, expected_bool) if ret == 'fail': return ret formulas_and_expected_val = [['3 in (3,5)', True], ['1000000000000 in (1000000000000, 1000000000001)', True], ['4 in (3,5)', False], ['3. in (3.,4.)', True], ['4. in (3.,5.)', False], ["'c' in ('c','e')", True], ["'d' in ('c','e')", False], ['2 between 2 and 4', True], ['3 between 2 and 4', True], ['4 between 2 and 4', True], ['1 between 2 and 4', False], ['5 between 2 and 4', False], ['2. between 2. and 4.', True], ['3. between 2. and 4.', True], ['4. between 2. and 4.', True], ['1. between 2. and 4.', False], ['5. between 2. and 4.', False], ["'b' between 'b' and 'd'", True], ["'c' between 'b' and 'd'", True], ["'d' between 'b' and 'd'", True], ["'a' between 'b' and 'd'", False], ["'e' between 'b' and 'd'", False], ["null is null", True], ["1 is null", False], ["1.0 is null", False]] for [formula, expected_val] in formulas_and_expected_val: ret = ogr_rfc28_28_test(formula, expected_val) if ret == 'fail': return ret ############################################################################### # Test behaviour of binary operations when one operand is a NULL value def test_ogr_rfc28_29(): lyr = gdaltest.ds.ExecuteSQL("select * from idlink where (eas_id + cast(null as integer)) is not null or eas_id = 170 + cast(null as integer) or (eas_id + cast(null as float)) is not null or eas_id = 170.0 + cast(null as float)") count = lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(lyr) assert count == 0 ############################################################################### # Test behaviour of binary operations on strings when one operand is a NULL value def test_ogr_rfc28_30(): lyr = gdaltest.ds.ExecuteSQL("select * from idlink2 where F1 <> 'foo' or concat(F1,cast(null as character(32))) is not null") count = lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(lyr) assert count == 0 ############################################################################### # Test UNION ALL def test_ogr_rfc28_31(): lyr = gdaltest.ds.ExecuteSQL("select * from idlink union all select * from idlink2") count = lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(lyr) assert count != 6 + 7 ############################################################################### # Test UNION ALL with parenthesis def test_ogr_rfc28_32(): lyr = gdaltest.ds.ExecuteSQL("(select * from idlink) union all (select * from idlink2 order by eas_id)") count = lyr.GetFeatureCount() gdaltest.ds.ReleaseResultSet(lyr) assert count != 6 + 7 ############################################################################### # Test lack of end-of-string character def test_ogr_rfc28_33(): gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select * from idlink where name='foo") gdal.PopErrorHandler() assert lyr is None ############################################################################### # Test wildcard expansion of an unknown table. def test_ogr_rfc28_34(): gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select foo.* from idlink") gdal.PopErrorHandler() assert (gdal.GetLastErrorMsg().find( 'Table foo not recognised from foo.* definition') == 0) assert lyr is None ############################################################################### # Test selecting more than one distinct def test_ogr_rfc28_35(): gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select distinct eas_id, distinct name from idlink") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('SQL Expression Parsing Error') == 0 assert lyr is None ############################################################################### # Test selecting more than one distinct def test_ogr_rfc28_35_bis(): gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select distinct eas_id, name from idlink") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('SELECT DISTINCT not supported on multiple columns') == 0 assert lyr is None ############################################################################### # Test selecting more than one distinct def test_ogr_rfc28_35_ter(): gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select distinct * from idlink") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('SELECT DISTINCT not supported on multiple columns') == 0 assert lyr is None ############################################################################### # Test ORDER BY a DISTINCT list by more than one key def test_ogr_rfc28_36(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select distinct eas_id from idlink order by eas_id, name") if lyr is not None: lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find("Can't ORDER BY a DISTINCT list by more than one key") == 0 gdaltest.ds.ReleaseResultSet(lyr) ############################################################################### # Test different fields for ORDER BY and DISTINCT def test_ogr_rfc28_37(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("select distinct eas_id from idlink order by name") if lyr is not None: lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find("Only selected DISTINCT field can be used for ORDER BY") == 0 gdaltest.ds.ReleaseResultSet(lyr) ############################################################################### # Test invalid SUBSTR def test_ogr_rfc28_38(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("SELECT SUBSTR(PRFEDEA) from poly") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find("Expected 2 or 3 arguments to SUBSTR(), but got 1") == 0 assert lyr is None gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.ds.ExecuteSQL("SELECT SUBSTR(1,2) from poly") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find("Wrong argument type for SUBSTR()") == 0 assert lyr is None ############################################################################### # Test COUNT() on a 0-row result def test_ogr_rfc28_39(): lyr = gdaltest.ds.ExecuteSQL("SELECT COUNT(*) from poly where 0 = 1") tr = ogrtest.check_features_against_list(lyr, 'count_*', [0]) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test MIN(), MAX() and AVG() on a date (#5333) def test_ogr_rfc28_40(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('DATE', ogr.OFTDateTime)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '2013/12/31 23:59:59') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '2013/01/01 00:00:00') lyr.CreateFeature(feat) lyr = ds.ExecuteSQL("SELECT MIN(DATE), MAX(DATE), AVG(DATE) from test") tr = ogrtest.check_features_against_list(lyr, 'MIN_DATE', ['2013/01/01 00:00:00']) lyr.ResetReading() tr2 = ogrtest.check_features_against_list(lyr, 'MAX_DATE', ['2013/12/31 23:59:59']) lyr.ResetReading() tr3 = ogrtest.check_features_against_list(lyr, 'AVG_DATE', ['2013/07/02 11:59:59.500']) gdaltest.ds.ReleaseResultSet(lyr) assert tr assert tr2 assert tr3 ############################################################################### # Verify that SELECT * works on a layer with a field that has a dot character (#5379) def test_ogr_rfc28_41(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") lyr = ds.CreateLayer("my_layer") field_defn = ogr.FieldDefn('a.b', ogr.OFTInteger) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 2) lyr.CreateFeature(feat) sql_lyr = ds.ExecuteSQL('select * from my_layer') feat = sql_lyr.GetNextFeature() assert feat.GetField('a.b') == 2 ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('select l.* from my_layer l') feat = sql_lyr.GetNextFeature() assert feat.GetField('l.a.b') == 2 ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test boolean and int16 support def test_ogr_rfc28_42(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test') fld_defn = ogr.FieldDefn('b', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('short', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 0) feat.SetField(1, 32000) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 1) lyr.CreateFeature(feat) # To b OR NOT to b... that's the question lyr = ds.ExecuteSQL("SELECT b, NOT b, 1 + b, CAST(1 AS BOOLEAN), b IS NOT NULL, short, 1 + short, CAST(1 + short as SMALLINT) FROM test WHERE b OR NOT b") assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(1).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(2).GetSubType() == ogr.OFSTNone assert lyr.GetLayerDefn().GetFieldDefn(3).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(4).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(5).GetSubType() == ogr.OFSTInt16 assert lyr.GetLayerDefn().GetFieldDefn(6).GetSubType() == ogr.OFSTNone assert lyr.GetLayerDefn().GetFieldDefn(7).GetSubType() == ogr.OFSTInt16 f = lyr.GetNextFeature() if f.GetField('b') != 0 or f.GetField(1) != 1 or f.GetField(2) != 1 or \ f.GetField(3) != 1 or f.GetField(4) != 1 or \ f.GetField(5) != 32000 or f.GetField(6) != 32001 or f.GetField(7) != 32001: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('b') != 1 or f.GetField(1) != 0 or f.GetField(2) != 2 or f.GetField(3) != 1 or f.GetField(4) != 1: f.DumpReadable() pytest.fail() gdaltest.ds.ReleaseResultSet(lyr) lyr = ds.ExecuteSQL("SELECT MIN(b), MAX(b), SUM(b) FROM test") assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(1).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(2).GetSubType() == ogr.OFSTNone f = lyr.GetNextFeature() assert f.GetField('MIN_b') == 0 assert f.GetField('MAX_b') == 1 assert f.GetField('SUM_b') == 1 gdaltest.ds.ReleaseResultSet(lyr) ############################################################################### # Test integer64 support def test_ogr_rfc28_43(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test') fld_defn = ogr.FieldDefn('myint64', ogr.OFTInteger64) lyr.CreateField(fld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, -1000000000000) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 100000000000) lyr.CreateFeature(feat) lyr = ds.ExecuteSQL("SELECT 1000000000000, myint64, CAST(1 AS bigint), CAST(100000000000 AS bigint), CAST(1 AS numeric(15,0)) FROM test WHERE myint64 < -9999999999 or myint64 > 9999999999") f = lyr.GetNextFeature() assert lyr.GetLayerDefn().GetFieldDefn(2).GetType() == ogr.OFTInteger64 assert lyr.GetLayerDefn().GetFieldDefn(3).GetType() == ogr.OFTInteger64 if f.GetField(0) != 1000000000000 or f.GetField(1) != -1000000000000 or f.GetField(2) != 1 or f.GetField(3) != 100000000000 or f.GetField(4) != 1.0: f.DumpReadable() pytest.fail() gdaltest.ds.ReleaseResultSet(lyr) lyr = ds.ExecuteSQL("SELECT MIN(myint64), MAX(myint64), SUM(myint64) FROM test") f = lyr.GetNextFeature() if f.GetField('MIN_myint64') != -1000000000000: f.DumpReadable() pytest.fail() if f.GetField('MAX_myint64') != 100000000000: f.DumpReadable() pytest.fail() if f.GetField('SUM_myint64') != -1000000000000 + 100000000000: f.DumpReadable() pytest.fail() gdaltest.ds.ReleaseResultSet(lyr) lyr = ds.ExecuteSQL("SELECT DISTINCT myint64 FROM test ORDER BY myint64") f = lyr.GetNextFeature() if f.GetField('myint64') != -1000000000000: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('myint64') != 100000000000: f.DumpReadable() pytest.fail() gdaltest.ds.ReleaseResultSet(lyr) ############################################################################### # Test crazy quoting of table and fields def test_ogr_rfc28_44(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('lyr.withpoint') fld_defn = ogr.FieldDefn('field.withpoint', ogr.OFTInteger) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('foo', ogr.OFTInteger) lyr.CreateField(fld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, -1) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 1) feat.SetField(1, 2) lyr.CreateFeature(feat) gdal.ErrorReset() lyr = ds.ExecuteSQL("SELECT * FROM \"lyr.withpoint\" WHERE \"field.withpoint\" = 1") assert gdal.GetLastErrorMsg() == '' f = lyr.GetNextFeature() assert f is not None gdaltest.ds.ReleaseResultSet(lyr) gdal.ErrorReset() lyr = ds.ExecuteSQL("SELECT \"lyr.withpoint\".\"field.withpoint\", \"field.withpoint\" FROM \"lyr.withpoint\" WHERE \"lyr.withpoint\".\"field.withpoint\" = 1") assert gdal.GetLastErrorMsg() == '' f = lyr.GetNextFeature() assert f is not None gdaltest.ds.ReleaseResultSet(lyr) # Test our tolerance against lack of necessary quoting gdal.ErrorReset() gdal.PushErrorHandler() lyr = ds.ExecuteSQL("SELECT * FROM \"lyr.withpoint\" WHERE field.withpoint = 1") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() == 'Passed field name field.withpoint should have been surrounded by double quotes. Accepted since there is no ambiguity...' f = lyr.GetNextFeature() assert f is not None gdaltest.ds.ReleaseResultSet(lyr) # Againg, but in a situation where there IS ambiguity lyr = ds.CreateLayer('field') fld_defn = ogr.FieldDefn('id', ogr.OFTInteger) lyr.CreateField(fld_defn) gdal.ErrorReset() gdal.PushErrorHandler() lyr = ds.ExecuteSQL("SELECT * FROM \"lyr.withpoint\" JOIN field ON \"lyr.withpoint\".foo = field.id WHERE field.withpoint = 1") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() == '"field"."withpoint" not recognised as an available field.' assert lyr is None # Test our tolerance against unnecessary quoting gdal.ErrorReset() gdal.PushErrorHandler() lyr = ds.ExecuteSQL("SELECT * FROM \"lyr.withpoint\" f WHERE \"f.foo\" = 2") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() == 'Passed field name f.foo should NOT have been surrounded by double quotes. Accepted since there is no ambiguity...' f = lyr.GetNextFeature() assert f is not None gdaltest.ds.ReleaseResultSet(lyr) ############################################################################### # Test 'FROM table_name AS alias' def test_ogr_rfc28_45(): ql = gdaltest.ds.ExecuteSQL("select eas_id from idlink as il where il.eas_id = 166") count = ql.GetFeatureCount() assert count == 1, \ ('Got wrong count with GetFeatureCount() - %d, expecting 1' % count) gdaltest.ds.ReleaseResultSet(ql) ############################################################################### # Test fid special column and 64 bit def test_ogr_rfc28_46(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('lyr') fld_defn = ogr.FieldDefn('val', ogr.OFTInteger) lyr.CreateField(fld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(3000000000) feat.SetField('val', 1) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(2500000000) feat.SetField('val', 2) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(2200000000) feat.SetField('val', 3) lyr.CreateFeature(feat) lyr.SetAttributeFilter('fid >= 2500000000') assert lyr.GetFeatureCount() == 2 lyr.SetAttributeFilter(None) # Explicit cast of fid to bigint needed in SELECT columns sql_lyr = ds.ExecuteSQL('SELECT CAST(fid AS bigint) AS outfid, val FROM lyr WHERE fid >= 2500000000 ORDER BY fid') f = sql_lyr.GetNextFeature() if f.GetFID() != 2500000000 or f['outfid'] != 2500000000 or f['val'] != 2: f.DumpReadable() pytest.fail() f = sql_lyr.GetNextFeature() if f.GetFID() != 3000000000 or f['outfid'] != 3000000000 or f['val'] != 1: f.DumpReadable() pytest.fail() f = sql_lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) # Explicit cast of fid to bigint no longer needed if the layer is declared OLMD_FID64=YES lyr.SetMetadataItem('OLMD_FID64', 'YES') sql_lyr = ds.ExecuteSQL('SELECT fid AS outfid, val FROM lyr WHERE fid >= 2500000000 ORDER BY fid') f = sql_lyr.GetNextFeature() if f.GetFID() != 2500000000 or f['outfid'] != 2500000000 or f['val'] != 2: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test LIMIT and OFFSET def test_ogr_rfc28_47(): lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY LIMIT 0") tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', []) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY LIMIT 1") assert lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [168]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY ORDER BY EAS_ID LIMIT 1") assert lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [158]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY ORDER BY PRFEDEA LIMIT 1") assert lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(lyr, 'PRFEDEA', ['35043369']) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY WHERE 0 ORDER BY EAS_ID LIMIT 1") assert lyr.GetNextFeature() is None gdaltest.ds.ReleaseResultSet(lyr) lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY WHERE EAS_ID = 168 LIMIT 11") assert lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [168]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY WHERE EAS_ID = 168 OFFSET 0") tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [168]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY WHERE EAS_ID = 168 OFFSET 1") assert lyr.GetFeatureCount() == 0 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', []) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY OFFSET 10") assert lyr.GetFeatureCount() == 0 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', []) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY OFFSET 8") assert lyr.GetFeatureCount() == 2 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [165, 170]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY LIMIT 1 OFFSET 8") assert lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [165]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY LIMIT 2 OFFSET 8") lyr.SetNextByIndex(1) f = lyr.GetNextFeature() assert f['EAS_ID'] == 170 f = lyr.GetNextFeature() assert f is None gdaltest.ds.ReleaseResultSet(lyr) lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY ORDER BY EAS_ID DESC LIMIT 2") tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [179, 173]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT * FROM POLY ORDER BY EAS_ID DESC LIMIT 1 OFFSET 1") tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [173]) gdaltest.ds.ReleaseResultSet(lyr) assert tr lyr = gdaltest.ds.ExecuteSQL("SELECT DISTINCT EAS_ID FROM POLY ORDER BY EAS_ID DESC LIMIT 2 OFFSET 3") tr = ogrtest.check_features_against_list(lyr, 'EAS_ID', [171, 170]) gdaltest.ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test date/datetime comparisons (#6810) def test_ogr_rfc28_48(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('lyr') fld_defn = ogr.FieldDefn('dt', ogr.OFTDateTime) lyr.CreateField(fld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('dt', '2017/02/17 11:06:34') lyr.CreateFeature(feat) with gdaltest.error_handler(): assert lyr.SetAttributeFilter('dt >= 2500000000') != 0 lyr.SetAttributeFilter("dt >= 'a'") with gdaltest.error_handler(): assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("'a' <= dt") with gdaltest.error_handler(): assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt BETWEEN dt AND 'a'") with gdaltest.error_handler(): assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt >= '2017/02/17 11:06:34'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt >= '2017/02/17'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt >= '2017/02/17 11:06:35'") assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt > '2017/02/17 11:06:33'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt > '2017/02/17 11:06:34'") assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt <= '2017/02/17 11:06:34'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt <= '2017/02/17 11:06:33'") assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt < '2017/02/17 11:06:35'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt < '2017/02/17 11:06:34'") assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt = '2017/02/17 11:06:34'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt = '2017/02/17 11:06:34.001'") assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt BETWEEN dt AND dt") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt BETWEEN '2017/02/17 11:06:33.999' AND '2017/02/17 11:06:34.001'") assert lyr.GetFeatureCount() == 1 lyr.SetAttributeFilter("dt BETWEEN '2017/02/17 11:06:34.001' AND dt") assert lyr.GetFeatureCount() == 0 lyr.SetAttributeFilter("dt BETWEEN dt AND '2017/02/17 11:06:33.999'") assert lyr.GetFeatureCount() == 0 ############################################################################### def test_ogr_rfc28_int_overflows(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('lyr') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) tests = [('SELECT -9223372036854775808 FROM lyr', -9223372036854775808), ('SELECT -(-9223372036854775808) FROM lyr', -9223372036854775808), # we could argue about the expected result... ('SELECT -9223372036854775808/1 FROM lyr', -9223372036854775808), ('SELECT 9223372036854775807 FROM lyr', 9223372036854775807), ('SELECT 9223372036854775807*1 FROM lyr', 9223372036854775807), ('SELECT 9223372036854775807/1 FROM lyr', 9223372036854775807), ('SELECT 9223372036854775807/-1 FROM lyr', -9223372036854775807), ('SELECT 9223372036854775807*-1 FROM lyr', -9223372036854775807), ('SELECT -1*9223372036854775807 FROM lyr', -9223372036854775807), ('SELECT 1*(-9223372036854775808) FROM lyr', -9223372036854775808), ('SELECT 0*(-9223372036854775808) FROM lyr', 0), ('SELECT 9223372036854775806+1 FROM lyr', 9223372036854775807), ('SELECT -9223372036854775807-1 FROM lyr', -9223372036854775808), ('SELECT 9223372036854775808 FROM lyr', 9223372036854775808.0), ('SELECT -9223372036854775809 FROM lyr', -9223372036854775809.0), ('SELECT 9223372036854775807+1 FROM lyr', None), ('SELECT 9223372036854775807 - (-1) FROM lyr', None), ('SELECT -9223372036854775808-1 FROM lyr', None), ('SELECT -9223372036854775808 + (-1) FROM lyr', None), ('SELECT 9223372036854775807*2 FROM lyr', None), ('SELECT -9223372036854775807*2 FROM lyr', None), ('SELECT -1*(-9223372036854775808) FROM lyr', None), ('SELECT 2 * (-9223372036854775807) FROM lyr', None), ('SELECT 9223372036854775807*-2 FROM lyr', None), ('SELECT -9223372036854775807*-2 FROM lyr', None), ('SELECT -9223372036854775808*-1 FROM lyr', None), ('SELECT -9223372036854775808/-1 FROM lyr', None), ('SELECT 1/0 FROM lyr', 2147483647), ] for sql, res in tests: sql_lyr = ds.ExecuteSQL(sql) if res is None: with gdaltest.error_handler(): f = sql_lyr.GetNextFeature() else: f = sql_lyr.GetNextFeature() assert f.GetField(0) == res, (sql, res, f.GetField(0)) ds.ReleaseResultSet(sql_lyr) ############################################################################### def test_ogr_rfc28_many_or(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('lyr') fld_defn = ogr.FieldDefn('val', ogr.OFTInteger) lyr.CreateField(fld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('val', -15) lyr.CreateFeature(feat) sql = '1 = 1 AND (' + ' OR '.join('val = %d' % i for i in range(1024)) + ')' assert lyr.SetAttributeFilter(sql) == 0 f = lyr.GetNextFeature() assert f is None sql = '1 = 1 AND (' + ' OR '.join('val = %d' % (i - 100) for i in range(1024)) + ')' assert lyr.SetAttributeFilter(sql) == 0 f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_rfc28_cleanup(): gdaltest.lyr = None gdaltest.ds = None ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������gdalautotest-3.1.2/ogr/ogr_georss.py����������������������������������������������������������������0000775�0001750�0001750�00000050652�13701057761�016227� 0����������������������������������������������������������������������������������������������������ustar �even����������������������������even�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_georss.py 15604 2008-10-26 11:21:34Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GeoRSS driver functionality. # Author: Even Rouault <even dot rouault at spatialys.com> # ############################################################################### # Copyright (c) 2008-2013, Even Rouault <even dot rouault at spatialys.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest def test_ogr_georss_init(): ds = ogr.Open('data/atom_rfc_sample.xml') if ds is None: gdaltest.georss_read_support = 0 else: gdaltest.georss_read_support = 1 ds = None gdaltest.have_gml_reader = 0 try: ds = ogr.Open('data/ionic_wfs.gml') if ds is not None: gdaltest.have_gml_reader = 1 ds = None except: pass gdaltest.atom_field_values = [('title', 'Atom draft-07 snapshot', ogr.OFTString), ('link_rel', 'alternate', ogr.OFTString), ('link_type', 'text/html', ogr.OFTString), ('link_href', 'http://example.org/2005/04/02/atom', ogr.OFTString), ('link2_rel', 'enclosure', ogr.OFTString), ('link2_type', 'audio/mpeg', ogr.OFTString), ('link2_length', '1337', ogr.OFTInteger), ('link2_href', 'http://example.org/audio/ph34r_my_podcast.mp3', ogr.OFTString), ('id', 'tag:example.org,2003:3.2397', ogr.OFTString), ('updated', '2005/07/31 12:29:29+00', ogr.OFTDateTime), ('published', '2003/12/13 08:29:29-04', ogr.OFTDateTime), ('author_name', 'Mark Pilgrim', ogr.OFTString), ('author_uri', 'http://example.org/', ogr.OFTString), ('author_email', 'f8dy@example.com', ogr.OFTString), ('contributor_name', 'Sam Ruby', ogr.OFTString), ('contributor2_name', 'Joe Gregorio', ogr.OFTString), ('content_type', 'xhtml', ogr.OFTString), ('content_xml_lang', 'en', ogr.OFTString), ('content_xml_base', 'http://diveintomark.org/', ogr.OFTString)] ############################################################################### # Used by ogr_georss_1 and ogr_georss_1ter def ogr_georss_test_atom(filename): if not gdaltest.georss_read_support: pytest.skip() ds = ogr.Open(filename) lyr = ds.GetLayerByName('georss') assert lyr.GetSpatialRef() is None, 'No spatial ref expected' feat = lyr.GetNextFeature() for field_value in gdaltest.atom_field_values: assert feat.GetFieldAsString(field_value[0]) == field_value[1], \ ('For field "%s", got "%s" instead of "%s"' % (field_value[0], feat.GetFieldAsString(field_value[0]), field_value[1])) assert feat.GetFieldAsString('content').find('<div xmlns="http://www.w3.org/1999/xhtml">') != -1, \ ('For field "%s", got "%s"' % ('content', feat.GetFieldAsString('content'))) ############################################################################### # Test reading an ATOM document without any geometry def test_ogr_georss_1(): return ogr_georss_test_atom('data/atom_rfc_sample.xml') ############################################################################### # Test reading an ATOM document with atom: prefiw def test_ogr_georss_1_atom_ns(): return ogr_georss_test_atom('data/atom_rfc_sample_atom_ns.xml') ############################################################################### # Test writing a Atom 1.0 document (doesn't need read support) def test_ogr_georss_1bis(): try: os.remove('tmp/test_atom.xml') except OSError: pass ds = ogr.GetDriverByName('GeoRSS').CreateDataSource('tmp/test_atom.xml', options=['FORMAT=ATOM']) lyr = ds.CreateLayer('georss') for field_value in gdaltest.atom_field_values: lyr.CreateField(ogr.FieldDefn(field_value[0], field_value[2])) lyr.CreateField(ogr.FieldDefn('content', ogr.OFTString)) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) for field_value in gdaltest.atom_field_values: dst_feat.SetField(field_value[0], field_value[1]) dst_feat.SetField('content', '<div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Update: The Atom draft is finished.]</i></p></div>') assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None ############################################################################### # Test reading document created at previous step def test_ogr_georss_1ter(): return ogr_georss_test_atom('tmp/test_atom.xml') ############################################################################### # Common for ogr_georss_2 and ogr_georss_3 def ogr_georss_test_rss(filename, only_first_feature): if not gdaltest.georss_read_support: pytest.skip() ds = ogr.Open(filename) assert ds is not None lyr = ds.GetLayer(0) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') assert lyr.GetSpatialRef() is not None and lyr.GetSpatialRef().IsSame(srs, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']), \ 'SRS is not the one expected.' assert lyr.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [2, 1] feat = lyr.GetNextFeature() expected_wkt = 'POINT (2 49)' assert feat.GetGeometryRef().ExportToWkt() == expected_wkt, \ ('%s' % feat.GetGeometryRef().ExportToWkt()) assert feat.GetFieldAsString('title') == 'A point' assert feat.GetFieldAsString('author') == 'Author' assert feat.GetFieldAsString('link') == 'http://gdal.org' assert feat.GetFieldAsString('pubDate') == '2008/12/07 20:13:00+02' assert feat.GetFieldAsString('category') == 'First category' assert feat.GetFieldAsString('category_domain') == 'first_domain' assert feat.GetFieldAsString('category2') == 'Second category' assert feat.GetFieldAsString('category2_domain') == 'second_domain' feat = lyr.GetNextFeature() expected_wkt = 'LINESTRING (2 48,2.1 48.1,2.2 48.0)' assert only_first_feature is not False or feat.GetGeometryRef().ExportToWkt() == expected_wkt, \ ('%s' % feat.GetGeometryRef().ExportToWkt()) assert feat.GetFieldAsString('title') == 'A line' feat = lyr.GetNextFeature() expected_wkt = 'POLYGON ((2 50,2.1 50.1,2.2 48.1,2.1 46.1,2 50))' assert only_first_feature is not False or feat.GetGeometryRef().ExportToWkt() == expected_wkt, \ ('%s' % feat.GetGeometryRef().ExportToWkt()) assert feat.GetFieldAsString('title') == 'A polygon' feat = lyr.GetNextFeature() expected_wkt = 'POLYGON ((2 49,2.0 49.5,2.2 49.5,2.2 49.0,2 49))' assert only_first_feature is not False or feat.GetGeometryRef().ExportToWkt() == expected_wkt, \ ('%s' % feat.GetGeometryRef().ExportToWkt()) assert feat.GetFieldAsString('title') == 'A box' ############################################################################### # Test reading a RSS 2.0 document with GeoRSS simple geometries def test_ogr_georss_2(): return ogr_georss_test_rss('data/test_georss_simple.xml', False) ############################################################################### # Test reading a RSS 2.0 document with GeoRSS GML geometries def test_ogr_georss_3(): if not gdaltest.have_gml_reader: pytest.skip() return ogr_georss_test_rss('data/test_georss_gml.xml', False) ############################################################################### # Test writing a RSS 2.0 document (doesn't need read support) def ogr_georss_create(filename, options): try: os.remove(filename) except OSError: pass ds = ogr.GetDriverByName('GeoRSS').CreateDataSource(filename, options=options) lyr = ds.CreateLayer('georss') lyr.CreateField(ogr.FieldDefn('title', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('author', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('link', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('pubDate', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('description', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('category', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('category_domain', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('category2', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('category2_domain', ogr.OFTString)) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetField('title', 'A point') dst_feat.SetField('author', 'Author') dst_feat.SetField('link', 'http://gdal.org') dst_feat.SetField('pubDate', '2008/12/07 20:13:00+02') dst_feat.SetField('category', 'First category') dst_feat.SetField('category_domain', 'first_domain') dst_feat.SetField('category2', 'Second category') dst_feat.SetField('category2_domain', 'second_domain') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetField('title', 'A line') dst_feat.SetField('author', 'Author') dst_feat.SetField('link', 'http://gdal.org') dst_feat.SetField('pubDate', '2008/12/07 20:13:00+02') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (2 48,2.1 48.1,2.2 48.0)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetField('title', 'A polygon') dst_feat.SetField('author', 'Author') dst_feat.SetField('link', 'http://gdal.org') dst_feat.SetField('pubDate', '2008/12/07 20:13:00+02') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((2 50,2.1 50.1,2.2 48.1,2.1 46.1,2 50))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetField('title', 'A box') dst_feat.SetField('author', 'Author') dst_feat.SetField('link', 'http://gdal.org') dst_feat.SetField('pubDate', '2008/12/07 20:13:00+02') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((2 49,2.0 49.5,2.2 49.5,2.2 49.0,2 49))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None ############################################################################### # Test writing a RSS 2.0 document in Simple dialect (doesn't need read support) def test_ogr_georss_4(): ogr_georss_create('tmp/test_rss2.xml', []) content = open('tmp/test_rss2.xml').read() assert content.find('<georss:point>49 2') != -1, ('%s' % content) ############################################################################### # Test reading document created at previous step def test_ogr_georss_5(): return ogr_georss_test_rss('tmp/test_rss2.xml', False) ############################################################################### # Test writing a RSS 2.0 document in GML dialect (doesn't need read support) def test_ogr_georss_6(): ogr_georss_create('tmp/test_rss2.xml', ['GEOM_DIALECT=GML']) content = open('tmp/test_rss2.xml').read() assert content.find('<georss:where><gml:Point><gml:pos>49 2') != -1, \ ('%s' % content) ############################################################################### # Test reading document created at previous step def test_ogr_georss_7(): if not gdaltest.have_gml_reader: pytest.skip() return ogr_georss_test_rss('tmp/test_rss2.xml', False) ############################################################################### # Test writing a RSS 2.0 document in W3C Geo dialect (doesn't need read support) def test_ogr_georss_8(): ogr_georss_create('tmp/test_rss2.xml', ['GEOM_DIALECT=W3C_GEO']) content = open('tmp/test_rss2.xml').read() assert not (content.find('<geo:lat>49') == -1 or content.find('<geo:long>2') == -1), \ ('%s' % content) ############################################################################### # Test reading document created at previous step def test_ogr_georss_9(): return ogr_georss_test_rss('tmp/test_rss2.xml', True) ############################################################################### # Test writing a RSS 2.0 document in GML dialect with EPSG:32631 def test_ogr_georss_10(): try: os.remove('tmp/test32631.rss') except OSError: pass srs = osr.SpatialReference() srs.ImportFromEPSG(32631) ds = ogr.GetDriverByName('GeoRSS').CreateDataSource('tmp/test32631.rss') gdal.PushErrorHandler('CPLQuietErrorHandler') try: lyr = ds.CreateLayer('georss', srs=srs) except: lyr = None gdal.PopErrorHandler() assert lyr is None, 'should not have accepted EPSG:32631 with GEOM_DIALECT != GML' ds = None try: os.remove('tmp/test32631.rss') except OSError: pass ds = ogr.GetDriverByName('GeoRSS').CreateDataSource('tmp/test32631.rss', options=['GEOM_DIALECT=GML']) lyr = ds.CreateLayer('georss', srs=srs) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (500000 4000000)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None content = open('tmp/test32631.rss').read() assert content.find('<georss:where><gml:Point srsName="urn:ogc:def:crs:EPSG::32631"><gml:pos>500000 4000000') != -1, \ ('%s' % content) ############################################################################### # Test reading document created at previous step def test_ogr_georss_11(): if not gdaltest.georss_read_support: pytest.skip() if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('tmp/test32631.rss') lyr = ds.GetLayer(0) srs = osr.SpatialReference() srs.ImportFromEPSG(32631) assert lyr.GetSpatialRef() is not None and lyr.GetSpatialRef().IsSame(srs), \ 'SRS is not the one expected.' if lyr.GetSpatialRef().ExportToWkt().find('AXIS["Easting",EAST],AXIS["Northing",NORTH]') == -1: print(('%s' % lyr.GetSpatialRef().ExportToWkt())) pytest.fail('AXIS definition expected is AXIS["Easting",EAST],AXIS["Northing",NORTH]!') feat = lyr.GetNextFeature() expected_wkt = 'POINT (500000 4000000)' assert feat.GetGeometryRef().ExportToWkt() == expected_wkt, \ ('%s' % feat.GetGeometryRef().ExportToWkt()) ############################################################################### # Test various broken documents def test_ogr_georss_12(): if not gdaltest.georss_read_support: pytest.skip() open('tmp/broken.rss', 'wt').write('<?xml version="1.0"?><rss><item><a></item></rss>') gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open('tmp/broken.rss') gdal.PopErrorHandler() assert ds is None open('tmp/broken.rss', 'wt').write('<?xml version="1.0"?><rss><channel><item><georss:box>49 2 49.5</georss:box></item></channel></rss>') ds = ogr.Open('tmp/broken.rss') gdal.PushErrorHandler('CPLQuietErrorHandler') feat = ds.GetLayer(0).GetNextFeature() gdal.PopErrorHandler() assert feat.GetGeometryRef() is None open('tmp/broken.rss', 'wt').write('<?xml version="1.0"?><rss><channel><item><georss:where><gml:LineString><gml:posList>48 2 48.1 2.1 48</gml:posList></gml:LineString></georss:where></item></channel></rss>') ds = ogr.Open('tmp/broken.rss') gdal.PushErrorHandler('CPLQuietErrorHandler') feat = ds.GetLayer(0).GetNextFeature() gdal.PopErrorHandler() assert feat.GetGeometryRef() is None ############################################################################### # Test writing non standard fields def test_ogr_georss_13(): try: os.remove('tmp/nonstandard.rss') except OSError: pass ds = ogr.GetDriverByName('GeoRSS').CreateDataSource('tmp/nonstandard.rss', options=['USE_EXTENSIONS=YES']) lyr = ds.CreateLayer('georss') lyr.CreateField(ogr.FieldDefn('myns_field', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('field2', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('ogr_field3', ogr.OFTString)) dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) dst_feat.SetField('myns_field', 'val') dst_feat.SetField('field2', 'val2') dst_feat.SetField('ogr_field3', 'val3') assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None content = open('tmp/nonstandard.rss').read() assert content.find('<myns:field>val</myns:field>') != -1, ('%s' % content) assert content.find('<ogr:field2>val2</ogr:field2>') != -1, ('%s' % content) assert content.find('<ogr:field3>val3</ogr:field3>') != -1, ('%s' % content) ############################################################################### # Test reading document created at previous step def test_ogr_georss_14(): if not gdaltest.georss_read_support: pytest.skip() ds = ogr.Open('tmp/nonstandard.rss') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetFieldAsString('myns_field') == 'val', \ ('Expected %s. Got %s' % ('val', feat.GetFieldAsString('myns_field'))) assert feat.GetFieldAsString('ogr_field2') == 'val2', \ ('Expected %s. Got %s' % ('val2', feat.GetFieldAsString('ogr_field2'))) assert feat.GetFieldAsString('ogr_field3') == 'val3', \ ('Expected %s. Got %s' % ('val3', feat.GetFieldAsString('ogr_field3'))) ############################################################################### # Test reading an in memory file (#2931) def test_ogr_georss_15(): if not gdaltest.georss_read_support: pytest.skip() try: gdal.FileFromMemBuffer except AttributeError: pytest.skip() content = """<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"> <channel> <link>http://mylink.com</link> <title>channel title 0 Thu, 2 Apr 2009 23:03:00 +0000 item title 49 2 """ # Create in-memory file gdal.FileFromMemBuffer('/vsimem/georssinmem', content) ds = ogr.Open('/vsimem/georssinmem') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetFieldAsString('title') == 'item title', \ ('Expected %s. Got %s' % ('item title', feat.GetFieldAsString('title'))) # Release memory associated to the in-memory file gdal.Unlink('/vsimem/georssinmem') ############################################################################### # def test_ogr_georss_cleanup(): list_files = ['tmp/test_rss2.xml', 'tmp/test_atom.xml', 'tmp/test32631.rss', 'tmp/broken.rss', 'tmp/nonstandard.rss'] for filename in list_files: try: os.remove(filename) except OSError: pass files = os.listdir('data') for filename in files: if len(filename) > 13 and filename[-13:] == '.resolved.gml': os.unlink('data/' + filename) gdalautotest-3.1.2/ogr/ogr_wasp.py0000775000175000017500000003500613701057761015673 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_shape.py 26794 2014-01-08 16:02:22Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: WAsP driver testing. # Author: Vincent Mora # ############################################################################### # Copyright (c) 2014, Oslandia # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import math import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Create wasp datasource def test_ogr_wasp_create_ds(): wasp_drv = ogr.GetDriverByName('WAsP') wasp_drv.DeleteDataSource('tmp.map') gdaltest.wasp_ds = wasp_drv.CreateDataSource('tmp.map') if gdaltest.wasp_ds is not None: return pytest.fail() ############################################################################### # Create elevation .map from linestrings z def test_ogr_wasp_elevation_from_linestring_z(): test_ogr_wasp_create_ds() ref = osr.SpatialReference() ref.ImportFromProj4('+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999978254 +pm=2.337229167 +units=m +no_defs') layer = gdaltest.wasp_ds.CreateLayer('mylayer', ref, geom_type=ogr.wkbLineString25D) assert layer is not None, 'unable to create layer' dfn = ogr.FeatureDefn() for i in range(10): feat = ogr.Feature(dfn) line = ogr.Geometry(type=ogr.wkbLineString25D) line.AddPoint(i, 0, i) line.AddPoint(i, 0.5, i) line.AddPoint(i, 1, i) feat.SetGeometry(line) assert layer.CreateFeature(feat) == 0, 'unable to create feature' del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 for line in f: if not i % 2: [h, n] = line.split() assert int(n) == 3, ('number of points should be 3 and is %s' % n) assert float(h) == j, ('altitude should be %d and is %s' % (j, h)) j += 1 i += 1 assert j == 10, ('nb of feature should be 10 and is %d' % j) ############################################################################### # Create elevation .map from linestrings z with simplification def test_ogr_wasp_elevation_from_linestring_z_toler(): test_ogr_wasp_create_ds() ref = osr.SpatialReference() ref.ImportFromProj4('+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356514.999978254 +pm=2.337229167 +units=m +no_defs') if not ogrtest.have_geos(): gdal.PushErrorHandler('CPLQuietErrorHandler') layer = gdaltest.wasp_ds.CreateLayer('mylayer', ref, options=['WASP_TOLERANCE=.1'], geom_type=ogr.wkbLineString25D) if not ogrtest.have_geos(): gdal.PopErrorHandler() assert layer is not None, 'unable to create layer' dfn = ogr.FeatureDefn() for i in range(10): feat = ogr.Feature(dfn) line = ogr.Geometry(type=ogr.wkbLineString25D) line.AddPoint(i, 0, i) line.AddPoint(i, 0.5, i) line.AddPoint(i, 1, i) feat.SetGeometry(line) assert layer.CreateFeature(feat) == 0, 'unable to create feature' del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 for line in f: if not i % 2: [h, n] = line.split() if int(n) != 2: if ogrtest.have_geos(): pytest.fail('number of points should be 2 and is %s' % n) elif int(n) != 3: pytest.fail('number of points should be 3 and is %s' % n) assert float(h) == j, ('altitude should be %d and is %s' % (j, h)) j += 1 i += 1 assert j == 10, ('nb of feature should be 10 and is %d' % j) ############################################################################### # Create elevation .map from linestrings field def test_ogr_wasp_elevation_from_linestring_field(): test_ogr_wasp_create_ds() layer = gdaltest.wasp_ds.CreateLayer('mylayer', options=['WASP_FIELDS=elevation'], geom_type=ogr.wkbLineString) assert layer is not None, 'unable to create layer' layer.CreateField(ogr.FieldDefn('elevation', ogr.OFTReal)) for i in range(10): feat = ogr.Feature(layer.GetLayerDefn()) feat.SetField(0, float(i)) line = ogr.Geometry(type=ogr.wkbLineString) line.AddPoint(i, 0) line.AddPoint(i, 0.5) line.AddPoint(i, 1) feat.SetGeometry(line) assert layer.CreateFeature(feat) == 0, 'unable to create feature' del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 for line in f: if not i % 2: [h, n] = line.split() assert int(n) == 3, ('number of points should be 3 and is %s' % n) assert float(h) == j, ('altitude should be %d and is %s' % (j, h)) j += 1 i += 1 ############################################################################### # Create roughness .map from linestrings fields def test_ogr_wasp_roughness_from_linestring_fields(): test_ogr_wasp_create_ds() layer = gdaltest.wasp_ds.CreateLayer('mylayer', options=['WASP_FIELDS=z_left,z_right'], geom_type=ogr.wkbLineString) assert layer is not None, 'unable to create layer' layer.CreateField(ogr.FieldDefn('dummy', ogr.OFTString)) layer.CreateField(ogr.FieldDefn('z_left', ogr.OFTReal)) layer.CreateField(ogr.FieldDefn('z_right', ogr.OFTReal)) for i in range(10): feat = ogr.Feature(layer.GetLayerDefn()) feat.SetField(0, 'dummy_' + str(i)) feat.SetField(1, float(i) - 1) feat.SetField(2, float(i)) line = ogr.Geometry(type=ogr.wkbLineString) line.AddPoint(i, 0) line.AddPoint(i, 0.5) line.AddPoint(i, 1) feat.SetGeometry(line) assert layer.CreateFeature(feat) == 0, ('unable to create feature %d' % i) del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 for line in f: if not i % 2: [l, r, n] = line.split() assert int(n) == 3, ('number of points should be 3 and is %s' % n) assert float(r) == j and float(l) == j - 1, \ ('roughness should be %d and %d and is %s and %s' % (j - 1, j, l, r)) j += 1 i += 1 assert j == 10, ('nb of feature should be 10 and is %d' % j) ############################################################################### # Create .map from polygons z def test_ogr_wasp_roughness_from_polygon_z(): test_ogr_wasp_create_ds() if not ogrtest.have_geos(): gdal.PushErrorHandler('CPLQuietErrorHandler') layer = gdaltest.wasp_ds.CreateLayer('mylayer', geom_type=ogr.wkbPolygon25D) if not ogrtest.have_geos(): gdal.PopErrorHandler() if layer is None: assert not ogrtest.have_geos(), 'unable to create layer' return dfn = ogr.FeatureDefn() for i in range(6): feat = ogr.Feature(dfn) ring = ogr.Geometry(type=ogr.wkbLinearRing) ring.AddPoint(0, 0, i) ring.AddPoint(round(math.cos(i * math.pi / 3), 6), round(math.sin(i * math.pi / 3), 6), i) ring.AddPoint(round(math.cos((i + 1) * math.pi / 3), 6), round(math.sin((i + 1) * math.pi / 3), 6), i) ring.AddPoint(0, 0, i) poly = ogr.Geometry(type=ogr.wkbPolygon25D) poly.AddGeometry(ring) feat.SetGeometry(poly) assert layer.CreateFeature(feat) == 0, 'unable to create feature' del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 res = set() for line in f: if not i % 2: [l, r, n] = [v for v in line.split()] assert int(n) == 2, ('number of points should be 2 and is %d' % int(n)) if float(r) > float(l): res.add((float(l), float(r))) else: res.add((float(r), float(l))) j += 1 i += 1 assert j == 6, ('there should be 6 boundaries and there are %d' % j) assert res == set([(0, 1), (0, 5), (1, 2), (2, 3), (3, 4), (4, 5)]), \ 'wrong values f=in boundaries' ############################################################################### # Create .map from polygons field def test_ogr_wasp_roughness_from_polygon_field(): test_ogr_wasp_create_ds() if not ogrtest.have_geos(): gdal.PushErrorHandler('CPLQuietErrorHandler') layer = gdaltest.wasp_ds.CreateLayer('mylayer', options=['WASP_FIELDS=roughness'], geom_type=ogr.wkbPolygon) if not ogrtest.have_geos(): gdal.PopErrorHandler() if layer is None: assert not ogrtest.have_geos(), 'unable to create layer' return layer.CreateField(ogr.FieldDefn('roughness', ogr.OFTReal)) layer.CreateField(ogr.FieldDefn('dummy', ogr.OFTString)) for i in range(6): feat = ogr.Feature(layer.GetLayerDefn()) feat.SetField(0, float(i)) ring = ogr.Geometry(type=ogr.wkbLinearRing) ring.AddPoint(0, 0) ring.AddPoint(round(math.cos(i * math.pi / 3), 6), round(math.sin(i * math.pi / 3), 6)) ring.AddPoint(round(math.cos((i + 1) * math.pi / 3), 6), round(math.sin((i + 1) * math.pi / 3), 6)) ring.AddPoint(0, 0) poly = ogr.Geometry(type=ogr.wkbPolygon) poly.AddGeometry(ring) feat.SetGeometry(poly) assert layer.CreateFeature(feat) == 0, 'unable to create feature' del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 res = set() for line in f: if not i % 2: [l, r, n] = [v for v in line.split()] assert int(n) == 2, ('number of points should be 2 and is %d' % int(n)) if float(r) > float(l): res.add((float(l), float(r))) else: res.add((float(r), float(l))) j += 1 i += 1 assert j == 6, ('there should be 6 boundaries and there are %d' % j) assert res == set([(0, 1), (0, 5), (1, 2), (2, 3), (3, 4), (4, 5)]), \ 'wrong values f=in boundaries' ############################################################################### # Test merging of linestrings # especially the unwanted merging of a corner point that could be merged with # a continuing line (pichart map) def test_ogr_wasp_merge(): test_ogr_wasp_create_ds() if not ogrtest.have_geos(): gdal.PushErrorHandler('CPLQuietErrorHandler') layer = gdaltest.wasp_ds.CreateLayer('mylayer', geom_type=ogr.wkbPolygon25D) if not ogrtest.have_geos(): gdal.PopErrorHandler() if layer is None: assert not ogrtest.have_geos(), 'unable to create layer' return dfn = ogr.FeatureDefn() for i in range(6): feat = ogr.Feature(dfn) ring = ogr.Geometry(type=ogr.wkbLinearRing) h = i % 2 ring.AddPoint(0, 0, h) ring.AddPoint(round(math.cos(i * math.pi / 3), 6), round(math.sin(i * math.pi / 3), 6), h) ring.AddPoint(round(math.cos((i + 1) * math.pi / 3), 6), round(math.sin((i + 1) * math.pi / 3), 6), h) ring.AddPoint(0, 0, h) poly = ogr.Geometry(type=ogr.wkbPolygon25D) poly.AddGeometry(ring) feat.SetGeometry(poly) assert layer.CreateFeature(feat) == 0, 'unable to create feature' del gdaltest.wasp_ds del layer f = open('tmp.map') for i in range(4): f.readline() i = 0 j = 0 res = [] for line in f: if not i % 2: [l, r, n] = [v for v in line.split()] assert int(n) == 2, \ ('number of points should be 2 and is %d (unwanted merge ?)' % int(n)) if float(r) > float(l): res.append((float(l), float(r))) else: res.append((float(r), float(l))) j += 1 i += 1 assert j == 6, ('there should be 6 boundaries and there are %d' % j) assert res == [(0, 1)] * 6, 'wrong values f=in boundaries' ############################################################################### # Read map file def test_ogr_wasp_reading(): test_ogr_wasp_elevation_from_linestring_z() gdaltest.wasp_ds = None ds = ogr.Open('tmp.map') assert ds is not None and ds.GetLayerCount() == 1 layer = ds.GetLayer(0) feat = layer.GetNextFeature() i = 0 while feat: feat = layer.GetNextFeature() i += 1 assert i == 10 ############################################################################### # Cleanup def test_ogr_wasp_cleanup(): wasp_drv = ogr.GetDriverByName('WAsP') wasp_drv.DeleteDataSource('tmp.map') gdalautotest-3.1.2/ogr/ogr_gmlas.py0000775000175000017500000033521013701057762016025 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_gmlas.py 74d67acbfdb033d1e062c214f8041ee578b1bd29 2019-04-17 22:56:53 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: GMLAS driver testing. # Author: Even Rouault, # # Initial development funded by the European Earth observation programme # Copernicus # # ****************************************************************************** # Copyright (c) 2016, Even Rouault, # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### try: from BaseHTTPServer import BaseHTTPRequestHandler except ImportError: from http.server import BaseHTTPRequestHandler import os import os.path import sys import gdaltest import ogrtest import webserver from osgeo import gdal from osgeo import ogr import pytest ############################################################################### def compare_ogrinfo_output(gmlfile, reffile, options=''): import test_cli_utilities if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() tmpfilename = 'tmp/' + os.path.basename(gmlfile) + '.txt' ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro -al GMLAS:' + gmlfile + ' -oo EXPOSE_METADATA_LAYERS=YES ' + '-oo @KEEP_RELATIVE_PATHS_FOR_METADATA=YES ' + '-oo @EXPOSE_SCHEMAS_NAME_IN_METADATA=NO ' + '-oo @EXPOSE_CONFIGURATION_IN_METADATA=NO' + ' ' + options, encoding='utf-8') ret = ret.replace('\r\n', '\n') ret = ret.replace('data\\gmlas\\', 'data/gmlas/') # Windows expected = open(reffile, 'rb').read().decode('utf-8') expected = expected.replace('\r\n', '\n') if ret != expected: print(ret.encode('utf-8')) open(tmpfilename, 'wb').write(ret.encode('utf-8')) print('Diff:') os.system('diff -u ' + reffile + ' ' + tmpfilename) # os.unlink(tmpfilename) pytest.fail('Got:') ############################################################################### # Basic test def test_ogr_gmlas_basic(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() gdal.SetConfigOption('GMLAS_WARN_UNEXPECTED', 'YES') # FileGDB embedded libxml2 cause random crashes with CPLValidateXML() use of external libxml2 ogrtest.old_val_GDAL_XML_VALIDATION = gdal.GetConfigOption('GDAL_XML_VALIDATION') if ogr.GetDriverByName('FileGDB') is not None and ogrtest.old_val_GDAL_XML_VALIDATION is None: gdal.SetConfigOption('GDAL_XML_VALIDATION', 'NO') ds = ogr.Open('GMLAS:data/gmlas/gmlas_test1.xml') assert ds is not None ds = None # Skip tests when -fsanitize is used if gdaltest.is_travis_branch('sanitize'): pytest.skip('Skipping because of -sanitize') return compare_ogrinfo_output('data/gmlas/gmlas_test1.xml', 'data/gmlas/gmlas_test1.txt') ############################################################################### # Run test_ogrsf def test_ogr_gmlas_test_ogrsf(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # Skip tests when -fsanitize is used if gdaltest.is_travis_branch('sanitize'): pytest.skip('Skipping because of -sanitize') import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro GMLAS:data/gmlas/gmlas_test1.xml') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test virtual file support def test_ogr_gmlas_virtual_file(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_8.xml', """""") gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_8.xsd', """ """) ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_8.xml') assert ds is not None gdal.Unlink('/vsimem/ogr_gmlas_8.xml') gdal.Unlink('/vsimem/ogr_gmlas_8.xsd') ############################################################################### # Test opening with XSD option def test_ogr_gmlas_datafile_with_xsd_option(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['XSD=data/gmlas/gmlas_test1.xsd']) assert ds is not None ############################################################################### # Test opening with just XSD option def test_ogr_gmlas_no_datafile_with_xsd_option(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_test1.xsd']) assert ds is not None ############################################################################### # Test opening with just XSD option but pointing to a non-xsd filename def test_ogr_gmlas_no_datafile_xsd_which_is_not_xsd(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_test1.xml']) assert ds is None assert gdal.GetLastErrorMsg().find("invalid content in 'schema' element") >= 0 ############################################################################### # Test opening with nothing def test_ogr_gmlas_no_datafile_no_xsd(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:') assert ds is None assert gdal.GetLastErrorMsg().find('XSD open option must be provided when no XML data file is passed') >= 0 ############################################################################### # Test opening an inexisting GML file def test_ogr_gmlas_non_existing_gml(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:/vsimem/i_do_not_exist.gml') assert ds is None assert gdal.GetLastErrorMsg().find('Cannot open /vsimem/i_do_not_exist.gml') >= 0 ############################################################################### # Test opening with just XSD option but pointing to a non existing file def test_ogr_gmlas_non_existing_xsd(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:', open_options=['XSD=/vsimem/i_do_not_exist.xsd']) assert ds is None assert gdal.GetLastErrorMsg().find('Cannot resolve /vsimem/i_do_not_exist.xsd') >= 0 ############################################################################### # Test opening a GML file without schemaLocation def test_ogr_gmlas_gml_without_schema_location(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_gml_without_schema_location.xml', """""") with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_gml_without_schema_location.xml') assert ds is None assert gdal.GetLastErrorMsg().find('No schema locations found when analyzing data file: XSD open option must be provided') >= 0 gdal.Unlink('/vsimem/ogr_gmlas_gml_without_schema_location.xml') ############################################################################### # Test invalid schema def test_ogr_gmlas_invalid_schema(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_invalid_schema.xml') assert ds is None assert gdal.GetLastErrorMsg().find('invalid content') >= 0 ############################################################################### # Test invalid XML def test_ogr_gmlas_invalid_xml(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_invalid_xml.xml') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() assert f is None assert gdal.GetLastErrorMsg().find('input ended before all started tags were ended') >= 0 ############################################################################### # Test links with gml:ReferenceType def test_ogr_gmlas_gml_Reference(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = ogr.Open('GMLAS:data/gmlas/gmlas_test_targetelement.xml') assert ds.GetLayerCount() == 3 lyr = ds.GetLayerByName('main_elt') with gdaltest.error_handler(): f = lyr.GetNextFeature() if f['reference_existing_target_elt_with_required_id_href'] != '#BAZ' or \ f['reference_existing_target_elt_with_required_id_pkid'] != 'BAZ' or \ f['reference_existing_target_elt_with_optional_id_href'] != '#BAZ2' or \ f['refe_exis_targ_elt_with_opti_id_targe_elt_with_optio_id_pkid'] != 'F36BAD21BD2F14DDCA8852DBF8C90DBC_target_elt_with_optional_id_1' or \ f['reference_existing_abstract_target_elt_href'] != '#BAW' or \ f.IsFieldSet('reference_existing_abstract_target_elt_nillable_href') or \ f['reference_existing_abstract_target_elt_nillable_nil'] != 1: f.DumpReadable() pytest.fail() ############################################################################### # Test that we fix ambiguities in class names def test_ogr_gmlas_same_element_in_different_ns(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_same_element_in_different_ns.xml') assert ds is not None # for i in range(ds.GetLayerCount()): # print(ds.GetLayer(i).GetName()) assert ds.GetLayerCount() == 5 lyr = ds.GetLayerByName('elt') f = lyr.GetNextFeature() if f.IsFieldSet('abstractElt_other_ns_realizationOfAbstractElt_pkid') == 0: f.DumpReadable() pytest.fail() assert ds.GetLayerByName('myns_realizationOfAbstractElt') is not None assert ds.GetLayerByName('other_ns_realizationOfAbstractElt') is not None assert ds.GetLayerByName('elt_elt2_abstractElt_myns_realizationOfAbstractElt') is not None assert ds.GetLayerByName('elt_elt2_abstractElt_other_ns_realizationOfAbstractElt') is not None ############################################################################### # Test a corner case of relative path resolution def test_ogr_gmlas_corner_case_relative_path(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = ogr.Open('GMLAS:../ogr/data/gmlas/gmlas_test1.xml') assert ds is not None ############################################################################### # Test unexpected repeated element def test_ogr_gmlas_unexpected_repeated_element(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_unexpected_repeated_element.xml') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() if f is None or f['foo'] != 'foo_again': # somewhat arbitrary to keep the latest one! f.DumpReadable() pytest.fail() assert gdal.GetLastErrorMsg().find('Unexpected element myns:main_elt/myns:foo') >= 0 f = lyr.GetNextFeature() assert f is None ds = None ############################################################################### # Test unexpected repeated element def test_ogr_gmlas_unexpected_repeated_element_variant(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_unexpected_repeated_element_variant.xml') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() if f is None or f['foo'] != 'foo_again': # somewhat arbitrary to keep the latest one! f.DumpReadable() pytest.fail() assert gdal.GetLastErrorMsg().find('Unexpected element myns:main_elt/myns:foo') >= 0 f = lyr.GetNextFeature() assert f is None ds = None ############################################################################### # Test reading geometries embedded in a geometry property element def test_ogr_gmlas_geometryproperty(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32.gml', open_options=[ 'CONFIG_FILE=true']) lyr = ds.GetLayer(0) with gdaltest.error_handler(): geom_field_count = lyr.GetLayerDefn().GetGeomFieldCount() assert geom_field_count == 15 f = lyr.GetNextFeature() if f['geometryProperty_xml'] != ' 49 2 ': f.DumpReadable() pytest.fail() if not f.IsFieldNull('geometryPropertyEmpty_xml'): f.DumpReadable() pytest.fail() if f['pointProperty_xml'] != '50 3': f.DumpReadable() pytest.fail() if f['pointPropertyRepeated_xml'] != [ '0 1', '1 2', '3 4']: f.DumpReadable() pytest.fail(f['pointPropertyRepeated_xml']) geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryProperty') sr = lyr.GetLayerDefn().GetGeomFieldDefn(geom_idx).GetSpatialRef() assert not (sr is None or sr.ExportToWkt().find('4326') < 0) wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() # Axis swapping if wkt != 'POINT (2 49)': f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryPropertyEmpty') if f.GetGeomFieldRef(geom_idx) is not None: f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('pointProperty') sr = lyr.GetLayerDefn().GetGeomFieldDefn(geom_idx).GetSpatialRef() assert not (sr is None or sr.ExportToWkt().find('4326') < 0) wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() if wkt != 'POINT (3 50)': f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('lineStringProperty') sr = lyr.GetLayerDefn().GetGeomFieldDefn(geom_idx).GetSpatialRef() assert not (sr is None or sr.ExportToWkt().find('4326') < 0) assert lyr.GetLayerDefn().GetGeomFieldDefn(geom_idx).GetType() == ogr.wkbLineString wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() if wkt != 'LINESTRING (2 49)': f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('pointPropertyRepeated') assert lyr.GetLayerDefn().GetGeomFieldDefn(geom_idx).GetType() == ogr.wkbUnknown wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() if wkt != 'GEOMETRYCOLLECTION (POINT (0 1),POINT (1 2),POINT (3 4))': f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('mycustompointproperty_point') wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() if wkt != 'POINT (5 6)': f.DumpReadable() pytest.fail() # Test that on-the-fly reprojection works f = lyr.GetNextFeature() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryProperty') geom = f.GetGeomFieldRef(geom_idx) if ogrtest.check_feature_geometry(geom, 'POINT (3.0 0.0)') != 0: f.DumpReadable() pytest.fail() # Failed reprojection with gdaltest.error_handler(): f = lyr.GetNextFeature() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryProperty') if f.GetGeomFieldRef(geom_idx) is not None: f.DumpReadable() pytest.fail() # Test SWAP_COORDINATES=NO ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32.gml', open_options=['SWAP_COORDINATES=NO']) lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryProperty') wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() # Axis swapping if wkt != 'POINT (49 2)': f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('lineStringProperty') wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() # Axis swapping if wkt != 'LINESTRING (2 49)': f.DumpReadable() pytest.fail() # Test SWAP_COORDINATES=YES ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32.gml', open_options=['SWAP_COORDINATES=YES']) lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryProperty') wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() # Axis swapping if wkt != 'POINT (2 49)': f.DumpReadable() pytest.fail() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('lineStringProperty') wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() # Axis swapping if wkt != 'LINESTRING (49 2)': f.DumpReadable() pytest.fail() ############################################################################### # Test reading geometries referenced by a AbstractGeometry element def test_ogr_gmlas_abstractgeometry(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_abstractgeometry_gml32.gml', open_options=[ 'CONFIG_FILE=true']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetGeomFieldCount() == 2 f = lyr.GetNextFeature() if f['AbstractGeometry_xml'] != '0 1': f.DumpReadable() pytest.fail() if f['repeated_AbstractGeometry_xml'] != [ '0 1', '1 2']: f.DumpReadable() pytest.fail(f['repeated_AbstractGeometry_xml']) wkt = f.GetGeomFieldRef(0).ExportToWkt() if wkt != 'POINT (0 1)': f.DumpReadable() pytest.fail() wkt = f.GetGeomFieldRef(1).ExportToWkt() if wkt != 'GEOMETRYCOLLECTION (POINT (0 1),POINT (1 2))': f.DumpReadable() pytest.fail() ############################################################################### # Test validation against schema class MyHandler(object): def __init__(self): self.error_list = [] def error_handler(self, err_type, err_no, err_msg): if err_type != 1: # 1 == Debug self.error_list.append((err_type, err_no, err_msg)) def test_ogr_gmlas_validate(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # By default check we are silent about validation error ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_validate.xml') assert ds is not None myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) gdal.SetConfigOption('GMLAS_WARN_UNEXPECTED', None) lyr = ds.GetLayer(0) lyr.GetFeatureCount() gdal.SetConfigOption('GMLAS_WARN_UNEXPECTED', 'YES') gdal.PopErrorHandler() assert not myhandler.error_list ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_validate.xml') assert ds is not None myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) lyr = ds.GetLayer(0) lyr.GetFeatureCount() gdal.PopErrorHandler() # Unexpected element with xpath=myns:main_elt/myns:bar (subxpath=myns:main_elt/myns:bar) found assert len(myhandler.error_list) >= 2 # Enable validation on a doc without validation errors myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['VALIDATE=YES']) gdal.PopErrorHandler() assert ds is not None, myhandler.error_list assert not myhandler.error_list # Enable validation on a doc without validation error, and with explicit XSD gdal.FileFromMemBuffer('/vsimem/gmlas_test1.xml', open('data/gmlas/gmlas_test1.xml').read()) myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) ds = gdal.OpenEx('GMLAS:/vsimem/gmlas_test1.xml', open_options=[ 'XSD=' + os.getcwd() + '/data/gmlas/gmlas_test1.xsd', 'VALIDATE=YES']) gdal.PopErrorHandler() gdal.Unlink('/vsimem/gmlas_test1.xml') assert ds is not None, myhandler.error_list assert not myhandler.error_list # Validation errors, but do not prevent dataset opening myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_validate.xml', open_options=['VALIDATE=YES']) gdal.PopErrorHandler() assert ds is not None assert len(myhandler.error_list) == 5 # Validation errors and do prevent dataset opening myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_validate.xml', open_options=['VALIDATE=YES', 'FAIL_IF_VALIDATION_ERROR=YES']) gdal.PopErrorHandler() assert ds is None assert len(myhandler.error_list) == 6 # Test that validation without doc doesn't crash myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_test1.xsd', 'VALIDATE=YES']) gdal.PopErrorHandler() assert ds is not None, myhandler.error_list assert not myhandler.error_list ############################################################################### # Test correct namespace prefix handling def test_ogr_gmlas_test_ns_prefix(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # The schema doesn't directly import xlink, but indirectly references it ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_test_targetelement.xsd']) lyr = ds.GetLayerByName('_ogr_fields_metadata') f = lyr.GetNextFeature() if f['field_xpath'] != 'myns:main_elt/myns:reference_missing_target_elt/@xlink:href': f.DumpReadable() pytest.fail() ############################################################################### # Test parsing documents without namespace def test_ogr_gmlas_no_namespace(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = ogr.Open('GMLAS:data/gmlas/gmlas_no_namespace.xml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['foo'] != 'bar': f.DumpReadable() pytest.fail() ############################################################################### # Test CONFIG_FILE def test_ogr_gmlas_conf(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # Non existing file with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['CONFIG_FILE=not_existing']) assert ds is None # Broken conf file gdal.FileFromMemBuffer('/vsimem/my_conf.xml', "") with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['CONFIG_FILE=/vsimem/my_conf.xml']) gdal.Unlink('/vsimem/my_conf.xml') assert ds is None # Valid XML, but not validating gdal.FileFromMemBuffer('/vsimem/my_conf.xml', "") with gdaltest.error_handler(): gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['CONFIG_FILE=/vsimem/my_conf.xml']) gdal.Unlink('/vsimem/my_conf.xml') # Inlined conf file + UseArrays = false ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=[ 'CONFIG_FILE=false']) assert ds is not None lyr = ds.GetLayerByName('main_elt_string_array') assert lyr.GetFeatureCount() == 2 # AlwaysGenerateOGRId = true ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=[ 'CONFIG_FILE=true']) assert ds is not None lyr = ds.GetLayerByName('main_elt') f = lyr.GetNextFeature() if f['ogr_pkid'].find('main_elt_1') < 0 or \ f['otherns_id'] != 'otherns_id': f.DumpReadable() pytest.fail() # IncludeGeometryXML = false ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32.gml', open_options=[ 'CONFIG_FILE=false']) assert ds is not None lyr = ds.GetLayer(0) with gdaltest.error_handler(): assert lyr.GetLayerDefn().GetFieldIndex('geometryProperty_xml') < 0 f = lyr.GetNextFeature() geom_idx = lyr.GetLayerDefn().GetGeomFieldIndex('geometryProperty') wkt = f.GetGeomFieldRef(geom_idx).ExportToWkt() if wkt != 'POINT (2 49)': f.DumpReadable() pytest.fail() # ExposeMetadataLayers = true ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_abstractgeometry_gml32.gml', open_options=[ 'CONFIG_FILE=true']) assert ds is not None assert ds.GetLayerCount() == 5 # Test override with open option ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_abstractgeometry_gml32.gml', open_options=[ 'EXPOSE_METADATA_LAYERS=NO', 'CONFIG_FILE=true']) assert ds is not None assert ds.GetLayerCount() == 1 # Turn on validation and error on validation with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_validate.xml', open_options=[ 'CONFIG_FILE=true']) assert ds is None and gdal.GetLastErrorMsg().find('Validation') >= 0 ############################################################################### # Test IgnoredXPaths aspect of config file def test_ogr_gmlas_conf_ignored_xpath(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # Test unsupported and invalid XPaths for xpath in ['', '1', '@', '@/', '.', ':', '/:', 'a:', 'a:1', 'foo[1]', "foo[@bar='baz']"]: with gdaltest.error_handler(): gdal.OpenEx('GMLAS:', open_options=[ 'XSD=data/gmlas/gmlas_test1.xsd', """CONFIG_FILE= true %s """ % xpath]) assert gdal.GetLastErrorMsg().find('XPath syntax') >= 0, xpath # Test duplicating mapping with gdaltest.error_handler(): gdal.OpenEx('GMLAS:', open_options=[ 'XSD=data/gmlas/gmlas_test1.xsd', """CONFIG_FILE= """]) assert gdal.GetLastErrorMsg().find('Prefix ns was already mapped') >= 0 # Test XPath with implicit namespace, and warning ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=[ """CONFIG_FILE= true @otherns:id """]) assert ds is not None lyr = ds.GetLayerByName('main_elt') assert lyr.GetLayerDefn().GetFieldIndex('otherns_id') < 0 with gdaltest.error_handler(): lyr.GetNextFeature() assert gdal.GetLastErrorMsg().find('Attribute with xpath=myns:main_elt/@otherns:id found in document but ignored') >= 0 # Test XPath with explicit namespace, and warning suppression ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=[ """CONFIG_FILE= @other_ns:id """]) assert ds is not None lyr = ds.GetLayerByName('main_elt') lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == '' # Test various XPath syntaxes ds = gdal.OpenEx('GMLAS:', open_options=[ 'XSD=data/gmlas/gmlas_test1.xsd', """CONFIG_FILE= false myns:main_elt/@optionalStrAttr myns:main_elt//@fixedValUnset myns:main_elt/myns:base_int //myns:string myns:main_elt//myns:string_array a unknown_ns:foo myns:main_elt/myns:int_arra foo/myns:long """]) assert ds is not None lyr = ds.GetLayerByName('main_elt') # Ignored fields assert lyr.GetLayerDefn().GetFieldIndex('optionalStrAttr') < 0 assert lyr.GetLayerDefn().GetFieldIndex('fixedValUnset') < 0 assert lyr.GetLayerDefn().GetFieldIndex('base_int') < 0 assert lyr.GetLayerDefn().GetFieldIndex('string') < 0 assert lyr.GetLayerDefn().GetFieldIndex('string_array') < 0 # Present fields assert lyr.GetLayerDefn().GetFieldIndex('int_array') >= 0 assert lyr.GetLayerDefn().GetFieldIndex('long') >= 0 ############################################################################### do_log = False class GMLASHTTPHandler(BaseHTTPRequestHandler): def log_request(self, code='-', size='-'): pass def do_GET(self): try: if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() if self.path.startswith('/vsimem/'): f = gdal.VSIFOpenL(self.path, "rb") if f is None: self.send_response(404) self.end_headers() else: gdal.VSIFSeekL(f, 0, 2) size = gdal.VSIFTellL(f) gdal.VSIFSeekL(f, 0, 0) content = gdal.VSIFReadL(1, size, f) gdal.VSIFCloseL(f) self.protocol_version = 'HTTP/1.0' self.send_response(200) self.end_headers() self.wfile.write(content) return return except IOError: pass self.send_error(404, 'File Not Found: %s' % self.path) ############################################################################### # Test schema caching def test_ogr_gmlas_cache(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() (webserver_process, webserver_port) = webserver.launch(handler=GMLASHTTPHandler) if webserver_port == 0: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_cache.xml', """ bar """ % webserver_port) gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_cache.xsd', """ """) gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_cache_2.xsd', """ """) # First try with remote schema download disabled with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'CONFIG_FILE=false/vsimem/my/gmlas_cache']) assert ds is None and gdal.GetLastErrorMsg().find('Cannot resolve') >= 0 # Test invalid cache directory with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'CONFIG_FILE=/inexisting_directory/not/exist']) if ds is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() if ds.GetLayerCount() != 1: webserver.server_stop(webserver_process, webserver_port) pytest.fail(ds.GetLayerCount()) # Will create the directory and download and cache ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'CONFIG_FILE=/vsimem/my/gmlas_cache']) if ds is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() if ds.GetLayerCount() != 1: webserver.server_stop(webserver_process, webserver_port) pytest.fail(ds.GetLayerCount()) gdal.Unlink('/vsimem/my/gmlas_cache/' + gdal.ReadDir('/vsimem/my/gmlas_cache')[0]) # Will reuse the directory and download and cache ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'CONFIG_FILE=/vsimem/my/gmlas_cache']) if ds is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() if ds.GetLayerCount() != 1: webserver.server_stop(webserver_process, webserver_port) pytest.fail() # With XSD open option ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'XSD=http://localhost:%d/vsimem/ogr_gmlas_cache.xsd' % webserver_port, 'CONFIG_FILE=/vsimem/my/gmlas_cache']) if ds is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() if ds.GetLayerCount() != 1: webserver.server_stop(webserver_process, webserver_port) pytest.fail() webserver.server_stop(webserver_process, webserver_port) # Now re-open with the webserver turned off ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'CONFIG_FILE=/vsimem/my/gmlas_cache']) assert ds is not None assert ds.GetLayerCount() == 1 # Re try but ask for refresh with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'REFRESH_CACHE=YES', 'CONFIG_FILE=/vsimem/my/gmlas_cache']) if ds is not None or gdal.GetLastErrorMsg().find('Cannot resolve') < 0: webserver.server_stop(webserver_process, webserver_port) pytest.fail(gdal.GetLastErrorMsg()) # Re try with non existing cached schema gdal.Unlink('/vsimem/my/gmlas_cache/' + gdal.ReadDir('/vsimem/my/gmlas_cache')[0]) with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_cache.xml', open_options=[ 'CONFIG_FILE=/vsimem/my/gmlas_cache']) assert ds is None and gdal.GetLastErrorMsg().find('Cannot resolve') >= 0 # Cleanup gdal.Unlink('/vsimem/ogr_gmlas_cache.xml') gdal.Unlink('/vsimem/ogr_gmlas_cache.xsd') gdal.Unlink('/vsimem/ogr_gmlas_cache_2.xsd') files = gdal.ReadDir('/vsimem/my/gmlas_cache') for my_file in files: gdal.Unlink('/vsimem/my/gmlas_cache/' + my_file) gdal.Rmdir('/vsimem/my/gmlas_cache') gdal.Rmdir('/vsimem/my') ############################################################################### # Test good working of linking to a child through its id attribute def test_ogr_gmlas_link_nested_independant_child(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = ogr.Open('GMLAS:data/gmlas/gmlas_link_nested_independant_child.xml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['second_my_id'] != 'second_id': f.DumpReadable() pytest.fail() ############################################################################### # Test some pattern found in geosciml schemas def test_ogr_gmlas_composition_compositionPart(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = ogr.Open('GMLAS:data/gmlas/gmlas_composition_compositionPart.xml') lyr = ds.GetLayerByName('first_composition') f = lyr.GetNextFeature() if f.IsFieldSet('parent_ogr_pkid') == 0 or f.IsFieldSet('CompositionPart_pkid') == 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.IsFieldSet('parent_ogr_pkid') == 0 or f.IsFieldSet('CompositionPart_pkid') == 0: f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('CompositionPart') f = lyr.GetNextFeature() if f.IsFieldSet('my_id') == 0 or f.IsFieldSet('a') == 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.IsFieldSet('my_id') == 0 or f.IsFieldSet('a') == 0: f.DumpReadable() pytest.fail() ############################################################################### # Test that when importing GML we expose by default only elements deriving # from _Feature/AbstractFeature def test_ogr_gmlas_instantiate_only_gml_feature(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.tempfile('/vsimem/with space/gmlas_instantiate_only_gml_feature.xsd', open('data/gmlas/gmlas_instantiate_only_gml_feature.xsd', 'rb').read()): with gdaltest.tempfile('/vsimem/with space/gmlas_fake_gml32.xsd', open('data/gmlas/gmlas_fake_gml32.xsd', 'rb').read()): ds = gdal.OpenEx('GMLAS:', open_options=['XSD=/vsimem/with space/gmlas_instantiate_only_gml_feature.xsd']) assert ds.GetLayerCount() == 1 ds = None ############################################################################### # Test that WFS style timeStamp are ignored for hash generation def test_ogr_gmlas_timestamp_ignored_for_hash(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = ogr.Open('GMLAS:data/gmlas/gmlas_timestamp_ignored_for_hash_foo.xml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() pkid = f['ogr_pkid'] ds = ogr.Open('GMLAS:data/gmlas/gmlas_timestamp_ignored_for_hash_bar.xml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['ogr_pkid'] != pkid: f.DumpReadable() pytest.fail(pkid) ############################################################################### # Test dataset GetNextFeature() def test_ogr_gmlas_dataset_getnextfeature(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml') assert ds.TestCapability(ogr.ODsCRandomLayerRead) == 1 count = 0 last_l = None while True: f, lyr = ds.GetNextFeature() if f is None: assert lyr is None break count += 1 last_l = lyr base_count = 59 assert count == base_count assert last_l.GetName() == 'main_elt' f, lyr = ds.GetNextFeature() assert f is None and lyr is None ds.ResetReading() last_pct = 0 while True: f, l, pct = ds.GetNextFeature(include_pct=True) last_pct = pct if f is None: assert l is None break assert last_pct == 1.0 ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['EXPOSE_METADATA_LAYERS=YES']) fc_map = {} for layer_name in ('_ogr_fields_metadata', '_ogr_layers_metadata', '_ogr_layer_relationships', '_ogr_other_metadata'): fc_map[layer_name] = ds.GetLayerByName(layer_name).GetFeatureCount() ds = None ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['EXPOSE_METADATA_LAYERS=YES']) count = 0 while True: f, lyr = ds.GetNextFeature() if f is None: assert lyr is None break count += 1 expected_count = base_count expected_count += fc_map['_ogr_fields_metadata'] expected_count += fc_map['_ogr_layers_metadata'] expected_count += fc_map['_ogr_layer_relationships'] expected_count += fc_map['_ogr_other_metadata'] assert count == expected_count f, lyr = ds.GetNextFeature() assert f is None and lyr is None ds.ResetReading() count = 0 while True: f, lyr = ds.GetNextFeature() if f is None: assert lyr is None break count += 1 assert count == expected_count for layers in [['_ogr_fields_metadata'], ['_ogr_layers_metadata'], ['_ogr_layer_relationships'], ['_ogr_fields_metadata', '_ogr_layers_metadata'], ['_ogr_fields_metadata', '_ogr_layer_relationships'], ['_ogr_layers_metadata', '_ogr_layer_relationships'], ]: ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml') expected_count = base_count for layer in layers: ds.GetLayerByName(layer) expected_count += fc_map[layer] count = 0 while True: f, lyr = ds.GetNextFeature() if f is None: assert lyr is None break count += 1 assert count == expected_count f, lyr = ds.GetNextFeature() assert f is None and lyr is None # Test iterating over metadata layers on XSD-only based dataset ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_test1.xsd', 'EXPOSE_METADATA_LAYERS=YES']) count = 0 last_l = None while True: f, lyr = ds.GetNextFeature() if f is None: assert lyr is None break count += 1 last_l = lyr assert count != 0 ############################################################################### # Test that with schemas that have a structure like a base:identifier, we # will inline it. def test_ogr_gmlas_inline_identifier(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_inline_identifier.xsd']) if ds.GetLayerCount() != 2: for i in range(ds.GetLayerCount()): print(ds.GetLayer(i).GetName()) pytest.fail(ds.GetLayerCount()) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldIndex('identifier_foo') >= 0 ############################################################################### # Test that we can handle things like gml:name and au:name def test_ogr_gmlas_avoid_same_name_inlined_classes(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_avoid_same_name_inlined_classes.xsd']) assert ds.GetLayerCount() == 3 lyr = ds.GetLayerByName('myFeature_ns1_dt') assert lyr is not None lyr = ds.GetLayerByName('myFeature_ns2_dt') assert lyr is not None ############################################################################### # Test validation with an optional fixed attribute that is ignored def test_ogr_gmlas_validate_ignored_fixed_attribute(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() myhandler = MyHandler() gdal.PushErrorHandler(myhandler.error_handler) gdal.OpenEx('GMLAS:data/gmlas/gmlas_validate_ignored_fixed_attribute.xml', open_options=['VALIDATE=YES', 'CONFIG_FILE=@bar']) gdal.PopErrorHandler() assert not myhandler.error_list ############################################################################### # Test REMOVE_UNUSED_LAYERS and REMOVE_UNUSED_FIELDS options def test_ogr_gmlas_remove_unused_layers_and_fields(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_remove_unused_layers_and_fields.xml', open_options=['REMOVE_UNUSED_LAYERS=YES', 'REMOVE_UNUSED_FIELDS=YES']) assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if lyr.GetLayerDefn().GetFieldCount() != 4: f.DumpReadable() pytest.fail(lyr.GetLayerDefn().GetFieldCount()) assert f['used1'] == 'foo' and f['used2'] == 'bar' and f['nillable_nilReason'] == 'unknown' lyr = ds.GetLayerByName('_ogr_layers_metadata') if lyr.GetFeatureCount() != 1: for f in lyr: f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('_ogr_fields_metadata') if lyr.GetFeatureCount() != 7: for f in lyr: f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('_ogr_layer_relationships') if lyr.GetFeatureCount() != 0: for f in lyr: f.DumpReadable() pytest.fail() ############################################################################### # Test xlink resolution def test_ogr_gmlas_xlink_resolver(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() (webserver_process, webserver_port) = webserver.launch(handler=GMLASHTTPHandler) if webserver_port == 0: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_xlink_resolver.xsd', """ """) gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_xlink_resolver_fake_xlink.xsd', open('data/gmlas/gmlas_fake_xlink.xsd', 'rb').read()) gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_xlink_resolver.xml', """ """ % (webserver_port, webserver_port)) # By default, no resolution ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml') lyr = ds.GetLayer(0) if lyr.GetLayerDefn().GetFieldIndex('my_link_rawcontent') >= 0: webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Enable resolution, but only from local cache ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=["""CONFIG_FILE= /vsimem/gmlas_xlink_cache false """]) lyr = ds.GetLayer(0) if lyr.GetLayerDefn().GetFieldIndex('my_link_rawcontent') < 0: webserver.server_stop(webserver_process, webserver_port) pytest.fail() f = lyr.GetNextFeature() if f.IsFieldSet('my_link_rawcontent'): webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Try again but this time with the cached file cached_file = '/vsimem/gmlas_xlink_cache/localhost_%d_vsimem_resource.xml' % webserver_port gdal.FileFromMemBuffer(cached_file, 'foo') lyr.ResetReading() f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'foo': webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None gdal.Unlink(cached_file) # Enable remote resolution (but local caching disabled) gdal.FileFromMemBuffer('/vsimem/resource.xml', 'bar') gdal.FileFromMemBuffer('/vsimem/resource2.xml', 'baz') gdal.SetConfigOption('GMLAS_XLINK_RAM_CACHE_SIZE', '5') ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=["""CONFIG_FILE= /vsimem/gmlas_xlink_cache true """]) gdal.SetConfigOption('GMLAS_XLINK_RAM_CACHE_SIZE', None) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'bar': webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Check that the content is not cached if gdal.VSIStatL(cached_file) is not None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Delete the remote file and check that we can retrieve it from RAM cache gdal.Unlink('/vsimem/resource.xml') lyr.ResetReading() f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'bar': webserver.server_stop(webserver_process, webserver_port) pytest.fail() f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'baz': webserver.server_stop(webserver_process, webserver_port) pytest.fail() gdal.Unlink('/vsimem/resource2.xml') lyr.ResetReading() # /vsimem/resource.xml has been evicted from the cache with gdaltest.error_handler(): f = lyr.GetNextFeature() if f['my_link_rawcontent'] is not None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'baz': webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Enable remote resolution and caching gdal.FileFromMemBuffer('/vsimem/resource.xml', 'bar') ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=["""CONFIG_FILE= /vsimem/gmlas_xlink_cache true true """]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'bar': webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Check that the content is cached if gdal.VSIStatL(cached_file) is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Enable remote resolution and caching and REFRESH_CACHE gdal.FileFromMemBuffer('/vsimem/resource.xml', 'baz') ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=['REFRESH_CACHE=YES', """CONFIG_FILE= /vsimem/gmlas_xlink_cache true true """]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['my_link_rawcontent'] != 'baz': webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Check that the content is cached if gdal.VSIStatL(cached_file) is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Test absent remote resource gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_xlink_resolver_absent_resource.xml', """ """ % webserver_port) ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver_absent_resource.xml', open_options=["""CONFIG_FILE= /vsimem/gmlas_xlink_cache true """]) lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() if f.IsFieldSet('my_link_rawcontent'): f.DumpReadable() webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Test file size limit gdal.Unlink(cached_file) ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=["""CONFIG_FILE= 1 /vsimem/gmlas_xlink_cache true true """]) lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() if gdal.GetLastErrorMsg() == '': webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Check that the content is not cached if gdal.VSIStatL(cached_file) is not None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Test with URL specific rule with RawContent resolution gdal.FileFromMemBuffer('/vsimem/resource.xml', 'bar') ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=["""CONFIG_FILE= /vsimem/gmlas_xlink_cache http://localhost:%d/vsimem/ true RawContent true """ % webserver_port]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['my_link_attr_before'] != 'a' or \ f['my_link_href'] != 'http://localhost:%d/vsimem/resource.xml' % webserver_port or \ f['my_link_rawcontent'] != 'bar' or \ f['my_link_attr_after'] != 'b': f.DumpReadable() webserver.server_stop(webserver_process, webserver_port) pytest.fail() # Check that the content is cached if gdal.VSIStatL(cached_file) is None: webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None # Test with URL specific rule with FieldsFromXPath resolution gdal.FileFromMemBuffer('/vsimem/subdir1/resource.xml', """ fooVal 123 """) gdal.FileFromMemBuffer('/vsimem/subdir2/resource2_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_very_long.xml', """ fooVal2 fooVal3 foobar 1234567890123 1.25 2016-10-07T12:34:56Z """) gdal.FileFromMemBuffer('/vsimem/non_matching_resource.xml', 'foo') gdal.FileFromMemBuffer('/vsimem/ogr_gmlas_xlink_resolver.xml', """ """ % (webserver_port, webserver_port, webserver_port, webserver_port)) config_file = """ /vsimem/gmlas_xlink_cache http://localhost:%d/vsimem/subdir1 Accept application/x-iso19135+xml Accept-Language en true FieldsFromXPath true foo string myns:top/myns:foo bar integer myns:top/myns:bar http://localhost:%d/vsimem/subdir2 true FieldsFromXPath true foo string myns:top/myns:foo baz integer /myns:top/myns:baz/@val xml_blob string //myns:xml_blob long long //long double double //double datetime dateTime //datetime """ % (webserver_port, webserver_port) ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=['CONFIG_FILE=' + config_file]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['my_link_attr_before'] != 'a' or \ f['my_link_href'] != 'http://localhost:%d/vsimem/subdir1/resource.xml' % webserver_port or \ f['my_link_foo'] != 'fooVal' or \ f['my_link_bar'] != 123 or \ f['my_link_attr_after'] != 'b' or \ f['my_link2_attr_before'] != 'a2' or \ f['my_link2_href'] != 'http://localhost:%d/vsimem/subdir2/resource2_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_very_long.xml' % webserver_port or \ f['my_link2_foo'] != 'fooVal2 fooVal3' or \ f['my_link2_baz'] != 345 or \ f['my_link2_xml_blob'] != """foo bar""" or \ f['my_link2_long'] != 1234567890123 or \ f['my_link2_double'] != 1.25 or \ f['my_link2_datetime'] != '2016/10/07 12:34:56+00' or \ f['my_link2_bar'] is not None or \ f['my_link2_attr_after'] != 'b2': f.DumpReadable() webserver.server_stop(webserver_process, webserver_port) pytest.fail() f = lyr.GetNextFeature() if f['my_link2_bar'] != 123: f.DumpReadable() webserver.server_stop(webserver_process, webserver_port) pytest.fail() gdal.Unlink('/vsimem/subdir1/resource.xml') gdal.Unlink('/vsimem/subdir2/resource2_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_very_long.xml') # Test caching ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_xlink_resolver.xml', open_options=['CONFIG_FILE=' + config_file]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['my_link_attr_before'] != 'a' or \ f['my_link_href'] != 'http://localhost:%d/vsimem/subdir1/resource.xml' % webserver_port or \ f['my_link_foo'] != 'fooVal' or \ f['my_link_bar'] != 123 or \ f['my_link_attr_after'] != 'b' or \ f['my_link2_attr_before'] != 'a2' or \ f['my_link2_href'] != 'http://localhost:%d/vsimem/subdir2/resource2_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_very_long.xml' % webserver_port or \ f['my_link2_foo'] != 'fooVal2 fooVal3' or \ f['my_link2_baz'] != 345 or \ f['my_link2_bar'] is not None or \ f['my_link2_attr_after'] != 'b2': f.DumpReadable() webserver.server_stop(webserver_process, webserver_port) pytest.fail() ds = None webserver.server_stop(webserver_process, webserver_port) gdal.Unlink('/vsimem/ogr_gmlas_xlink_resolver.xsd') gdal.Unlink('/vsimem/ogr_gmlas_xlink_resolver_fake_xlink.xsd') gdal.Unlink('/vsimem/ogr_gmlas_xlink_resolver.xml') gdal.Unlink('/vsimem/ogr_gmlas_xlink_resolver_absent_resource.xml') fl = gdal.ReadDir('/vsimem/gmlas_xlink_cache') if fl is not None: for filename in fl: gdal.Unlink('/vsimem/gmlas_xlink_cache/' + filename) gdal.Unlink('/vsimem/gmlas_xlink_cache') gdal.Unlink('/vsimem/resource.xml') gdal.Unlink('/vsimem/resource2.xml') gdal.Unlink('/vsimem/subdir1/resource.xml') gdal.Unlink('/vsimem/subdir2/resource2_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_super_very_long.xml') gdal.Unlink('/vsimem/non_matching_resource.xml') ############################################################################### # Test UTF-8 support def test_ogr_gmlas_recoding(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() if sys.version_info >= (3, 0, 0): accent = '\u00e9' else: exec("accent = u'\\u00e9'") accent = accent.encode('UTF-8') ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_recoding.xml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['attr'] != accent: f.DumpReadable() pytest.fail() ############################################################################### # Test schema without namespace prefix def test_ogr_gmlas_schema_without_namespace_prefix(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # Generic http:// namespace URI ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_schema_without_namespace_prefix_generic_http_uri.xsd']) lyr = ds.GetLayerByName('_ogr_layers_metadata') f = lyr.GetNextFeature() if f['layer_xpath'] != 'my_ns:main_elt': f.DumpReadable() pytest.fail() gdal.Unlink('/vsimem/ogr_gmlas_schema_without_namespace_prefix.xsd') # http://www.opengis.net/ namespace URI ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_schema_without_namespace_prefix_opengis_uri.xsd']) lyr = ds.GetLayerByName('_ogr_layers_metadata') f = lyr.GetNextFeature() if f['layer_xpath'] != 'fake_3_0:main_elt': f.DumpReadable() pytest.fail() gdal.Unlink('/vsimem/ogr_gmlas_schema_without_namespace_prefix.xsd') # Non http:// namespace URI ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_schema_without_namespace_prefix_non_http_uri.xsd']) lyr = ds.GetLayerByName('_ogr_layers_metadata') f = lyr.GetNextFeature() if f['layer_xpath'] != 'my_namespace:main_elt': f.DumpReadable() pytest.fail() ############################################################################### # Test parsing truncated XML def test_ogr_gmlas_truncated_xml(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_truncated_xml.xml') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() ############################################################################### # Test identifier truncation def test_ogr_gmlas_identifier_truncation(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:', open_options=[ 'XSD=data/gmlas/gmlas_identifier_truncation.xsd', 'CONFIG_FILE=10false']) lyr = ds.GetLayerByName('v_l_i_clas') assert lyr is not None, ds.GetLayer(0).GetName() s = lyr.GetLayerDefn().GetFieldDefn(1).GetName() assert s == 'v_l_idTifi' s = lyr.GetLayerDefn().GetFieldDefn(2).GetName() assert s == 'an_lo_ide1' s = lyr.GetLayerDefn().GetFieldDefn(3).GetName() assert s == 'an_lo_ide2' s = lyr.GetLayerDefn().GetFieldDefn(4).GetName() assert s == 'x' s = lyr.GetLayerDefn().GetFieldDefn(5).GetName() assert s == 'noTCAMELCa' s = lyr.GetLayerDefn().GetFieldDefn(6).GetName() assert s == 'suuuuuuuuu' s = lyr.GetLayerDefn().GetFieldDefn(7).GetName() assert s == '_r_l_o_n_g' lyr = ds.GetLayerByName('a_l_i_cla1') assert lyr is not None, ds.GetLayer(1).GetName() lyr = ds.GetLayerByName('a_l_i_cla2') assert lyr is not None, ds.GetLayer(2).GetName() lyr = ds.GetLayerByName('y') assert lyr is not None, ds.GetLayer(3).GetName() ds = None ############################################################################### # Test behaviour when identifiers have same case def test_ogr_gmlas_identifier_case_ambiguity(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:', open_options=[ 'XSD=data/gmlas/gmlas_identifier_case_ambiguity.xsd', 'CONFIG_FILE=false']) lyr = ds.GetLayerByName('differentcase1') assert lyr is not None, ds.GetLayer(0).GetName() s = lyr.GetLayerDefn().GetFieldDefn(1).GetName() assert s == 'differentcase1' s = lyr.GetLayerDefn().GetFieldDefn(2).GetName() assert s == 'DifferentCASE2' lyr = ds.GetLayerByName('DifferentCASE2') assert lyr is not None, ds.GetLayer(0).GetName() ds = None ############################################################################### # Test writing support def test_ogr_gmlas_writer(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() if ogr.GetDriverByName('SQLite') is None: pytest.skip() src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['EXPOSE_METADATA_LAYERS=YES']) tmp_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer.db', src_ds, format='SQLite') src_ds = None ret_ds = gdal.VectorTranslate('tmp/gmlas_test1_generated.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['WRAPPING=GMLAS_FEATURECOLLECTION']) tmp_ds = None gdal.Unlink('/vsimem/ogr_gmlas_writer.db') assert ret_ds is not None ############################################################################### # Check the generated .xml and .xsd def test_ogr_gmlas_writer_check_xml_xsd(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() if ogr.GetDriverByName('SQLite') is None: pytest.skip() got = open('tmp/gmlas_test1_generated.xml', 'rt').read() got = got.replace('\r\n', '\n') pos = got.find('http://myns ') + len('http://myns ') pos_end = got.find('"', pos) absolute_xsd = got[pos:pos_end] assert absolute_xsd.endswith('gmlas_test1.xsd') and os.path.exists(absolute_xsd) got = got.replace(absolute_xsd, 'gmlas_test1.xsd') expected = open('data/gmlas/gmlas_test1_generated.xml', 'rt').read() expected = expected.replace('\r\n', '\n') if got != expected: print(got) print('') print('Diff:') os.system('diff -u data/gmlas/gmlas_test1_generated.xml tmp/gmlas_test1_generated.xml') pytest.fail('Got:') got = open('tmp/gmlas_test1_generated.xsd', 'rt').read() got = got.replace('\r\n', '\n') pos = got.find('schemaLocation="') + len('schemaLocation="') pos_end = got.find('"', pos) absolute_xsd = got[pos:pos_end] assert absolute_xsd.endswith('gmlas_test1.xsd') and os.path.exists(absolute_xsd) got = got.replace(absolute_xsd, 'gmlas_test1.xsd') expected = open('data/gmlas/gmlas_test1_generated.xsd', 'rt').read() expected = expected.replace('\r\n', '\n') if got != expected: print(got) print('') print('Diff:') os.system('diff -u data/gmlas/gmlas_test1_generated.xsd tmp/gmlas_test1_generated.xsd') pytest.fail('Got:') ############################################################################### # Check that the .xml read back by the GMLAS driver has the same content # as the original one. def test_ogr_gmlas_writer_check_xml_read_back(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() if ogr.GetDriverByName('SQLite') is None: pytest.skip() # Skip tests when -fsanitize is used if gdaltest.is_travis_branch('sanitize'): pytest.skip('Skipping because of -sanitize') import test_cli_utilities if test_cli_utilities.get_ogrinfo_path() is None: gdal.Unlink('tmp/gmlas_test1_generated.xml') gdal.Unlink('tmp/gmlas_test1_generated.xsd') pytest.skip() # Compare the ogrinfo dump of the generated .xml with a reference one ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro -al GMLAS:tmp/gmlas_test1_generated.xml -oo VALIDATE=YES ' + '-oo EXPOSE_METADATA_LAYERS=YES ' + '-oo @KEEP_RELATIVE_PATHS_FOR_METADATA=YES ' + '-oo @EXPOSE_SCHEMAS_NAME_IN_METADATA=NO ' + '-oo @EXPOSE_CONFIGURATION_IN_METADATA=NO -oo @HASH=fake_hash') expected = open('data/gmlas/gmlas_test1.txt', 'rt').read() expected = expected.replace('\r\n', '\n') expected = expected.replace('data/gmlas/gmlas_test1.xml', 'tmp/gmlas_test1_generated.xml') expected = expected.replace('data/gmlas/gmlas_test1.xsd', os.path.join(os.getcwd(), 'data/gmlas/gmlas_test1.xsd')) expected = expected.replace('\\', '/') ret_for_comparison = ret.replace('\r\n', '\n') ret_for_comparison = ret_for_comparison.replace('\\', '/') ret_for_comparison = ret_for_comparison.replace('fake_hash', '3CF9893502A592E8CF5EA6EF3D8F8C7B') if ret_for_comparison != expected: print(open('tmp/gmlas_test1_generated.xml', 'rt').read()) print('') print('XSD:') print(open('tmp/gmlas_test1_generated.xsd', 'rt').read()) print('') print('ogrinfo dump:') print(ret) print('') open('tmp/gmlas_test1_generated_got.txt', 'wt').write(ret_for_comparison) open('tmp/gmlas_test1_generated_expected.txt', 'wt').write(expected) print('Diff:') os.system('diff -u tmp/gmlas_test1_generated_expected.txt tmp/gmlas_test1_generated_got.txt') os.unlink('tmp/gmlas_test1_generated_expected.txt') os.unlink('tmp/gmlas_test1_generated_got.txt') pytest.fail('XML:') gdal.Unlink('tmp/gmlas_test1_generated.xml') gdal.Unlink('tmp/gmlas_test1_generated.xsd') ############################################################################### # Test writing support with geometries def test_ogr_gmlas_writer_gml(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['EXPOSE_METADATA_LAYERS=YES', '@HASH=hash']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None # Test also with GMLAS: prefix as it is likely people might use it # as it is needed for the read side. ret_ds = gdal.VectorTranslate('GMLAS:/vsimem/ogr_gmlas_writer_gml.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['WRAPPING=GMLAS_FEATURECOLLECTION', 'LAYERS={SPATIAL_LAYERS}']) tmp_ds = None assert ret_ds is not None f = gdal.VSIFOpenL('/vsimem/ogr_gmlas_writer_gml.xml', 'rb') assert f is not None content = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_gmlas_writer_gml.xml') gdal.Unlink('/vsimem/ogr_gmlas_writer_gml.xsd') assert 'xmlns:gml="http://fake_gml32"' in content assert '49 2' in content assert '50 3' in content assert ' 0 1' in content assert ' 1 2' in content ############################################################################### # Test writing support with geometries and -a_srs def test_ogr_gmlas_writer_gml_assign_srs(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['EXPOSE_METADATA_LAYERS=YES', '@HASH=hash']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None ret_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer_gml.xml', tmp_ds, format='GMLAS', dstSRS='EPSG:32631', reproject=False) tmp_ds = None assert ret_ds is not None f = gdal.VSIFOpenL('/vsimem/ogr_gmlas_writer_gml.xml', 'rb') assert f is not None content = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_gmlas_writer_gml.xml') gdal.Unlink('/vsimem/ogr_gmlas_writer_gml.xsd') assert 'http://www.opengis.net/def/crs/EPSG/0/32631' in content # No geometry, but to test that the proxied ExecuteSQL() works src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_test1.xml', open_options=['EXPOSE_METADATA_LAYERS=YES']) tmp_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer.db', src_ds, format='SQLite') src_ds = None gdal.VectorTranslate('/vsimem/gmlas_test1_generated_ref0.xml', tmp_ds, format='GMLAS', dstSRS='EPSG:32631', reproject=False, datasetCreationOptions=['WRAPPING=GMLAS_FEATURECOLLECTION']) gdal.VectorTranslate('/vsimem/gmlas_test1_generated_asrs.xml', tmp_ds, format='GMLAS', dstSRS='EPSG:32631', reproject=False, datasetCreationOptions=['WRAPPING=GMLAS_FEATURECOLLECTION']) tmp_ds = None gdal.Unlink('/vsimem/ogr_gmlas_writer.db') assert gdal.VSIStatL('/vsimem/gmlas_test1_generated_ref0.xml').size == gdal.VSIStatL('/vsimem/gmlas_test1_generated_asrs.xml').size gdal.Unlink('/vsimem/gmlas_test1_generated_ref0.xml') gdal.Unlink('/vsimem/gmlas_test1_generated_ref0.xsd') gdal.Unlink('/vsimem/gmlas_test1_generated_asrs.xml') gdal.Unlink('/vsimem/gmlas_test1_generated_asrs.xsd') ############################################################################### # Test writing support with geometries with original XML content preserved def test_ogr_gmlas_writer_gml_original_xml(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['EXPOSE_METADATA_LAYERS=YES', 'CONFIG_FILE=true']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None ret_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer_gml.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['WRAPPING=GMLAS_FEATURECOLLECTION']) tmp_ds = None assert ret_ds is not None ret_ds = None ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_writer_gml.xml', open_options=['VALIDATE=YES']) assert ds is not None and gdal.GetLastErrorMsg() == '' ds = None f = gdal.VSIFOpenL('/vsimem/ogr_gmlas_writer_gml.xml', 'rb') assert f is not None content = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_gmlas_writer_gml.xml') gdal.Unlink('/vsimem/ogr_gmlas_writer_gml.xsd') assert ' 49 2 ' in content assert ' 0 1' in content assert ' 1 2' in content ############################################################################### # Test writing support with XSD, INDENT_SIZE, COMMENT, OUTPUT_XSD_FILENAME, TIMESTAMP options def test_ogr_gmlas_writer_options(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['@HASH=hash']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None ret_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer_options.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['LAYERS=test', 'WRAPPING=GMLAS_FEATURECOLLECTION', 'INPUT_XSD=data/gmlas/gmlas_geometryproperty_gml32.xsd', 'INDENT_SIZE=4', 'COMMENT=---a comment---', 'SRSNAME_FORMAT=OGC_URN', 'OUTPUT_XSD_FILENAME=/vsimem/my_schema.xsd']) tmp_ds = None assert ret_ds is not None f = gdal.VSIFOpenL('/vsimem/ogr_gmlas_writer_options.xml', 'rb') assert f is not None content = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_gmlas_writer_options.xml') assert gdal.VSIStatL('/vsimem/my_schema.xsd') is not None gdal.Unlink('/vsimem/my_schema.xsd') # Test indentation size assert '\n ' in content # Test comment assert '\n' in content # Test OUTPUT_XSD_FILENAME assert '/vsimem/my_schema.xsd' in content # Test SRSNAME_FORMAT=OGC_URN assert '49 2' in content # Test TIMESTAMP option src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['@HASH=hash', 'EXPOSE_METADATA_LAYERS=YES']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None ret_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer_options.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['TIMESTAMP=1970-01-01T12:34:56Z', '@REOPEN_DATASET_WITH_GMLAS=NO']) tmp_ds = None assert ret_ds is not None f = gdal.VSIFOpenL('/vsimem/ogr_gmlas_writer_options.xml', 'rb') assert f is not None content = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_gmlas_writer_options.xml') assert gdal.VSIStatL('/vsimem/my_schema.xsd') is None assert ('timeStamp="1970-01-01T12:34:56Z"' in content and \ 'xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd ' in content) # Test WFS20_SCHEMALOCATION option src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['@HASH=hash', 'EXPOSE_METADATA_LAYERS=YES']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None ret_ds = gdal.VectorTranslate('/vsimem/ogr_gmlas_writer_options.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['WFS20_SCHEMALOCATION=/vsimem/fake_wfs.xsd']) tmp_ds = None assert ret_ds is not None gdal.FileFromMemBuffer('/vsimem/fake_wfs.xsd', """ """) ds = gdal.OpenEx('GMLAS:/vsimem/ogr_gmlas_writer_options.xml', open_options=['VALIDATE=YES']) gdal.Unlink('/vsimem/fake_wfs.xsd') assert ds is not None and gdal.GetLastErrorMsg() == '' ds = None f = gdal.VSIFOpenL('/vsimem/ogr_gmlas_writer_options.xml', 'rb') assert f is not None content = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_gmlas_writer_options.xml') assert gdal.VSIStatL('/vsimem/my_schema.xsd') is None assert 'xsi:schemaLocation="http://www.opengis.net/wfs/2.0 /vsimem/fake_wfs.xsd ' in content ############################################################################### # Test writing support error handle def test_ogr_gmlas_writer_errors(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # Source dataset is empty with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', gdal.GetDriverByName('Memory').Create('', 0, 0, 0, 0), format='GMLAS') assert ret_ds is None and gdal.GetLastErrorMsg().find('Source dataset has no layers') >= 0 # Missing input schemas src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml') tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', tmp_ds, format='GMLAS') assert ret_ds is None and gdal.GetLastErrorMsg().find('Cannot establish schema since no INPUT_XSD creation option specified and no _ogr_other_metadata found in source dataset') >= 0 # Invalid input schema with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['INPUT_XSD=/i_do_not/exist.xsd']) assert ret_ds is None and gdal.GetLastErrorMsg().find('Cannot resolve /i_do_not/exist.xsd') >= 0 # Invalid output .xml name src_ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometryproperty_gml32_no_error.gml', open_options=['EXPOSE_METADATA_LAYERS=YES']) tmp_ds = gdal.VectorTranslate('', src_ds, format='Memory') src_ds = None with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/i_am/not/valid.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['GENERATE_XSD=NO']) assert ret_ds is None and gdal.GetLastErrorMsg().find('Cannot create /i_am/not/valid.xml') >= 0 # .xsd extension not allowed with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/i_am/not/valid.xsd', tmp_ds, format='GMLAS', datasetCreationOptions=['GENERATE_XSD=NO']) assert ret_ds is None and gdal.GetLastErrorMsg().find('.xsd extension is not valid') >= 0 # Invalid output .xsd name with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['WRAPPING=GMLAS_FEATURECOLLECTION', 'OUTPUT_XSD_FILENAME=/i_am/not/valid.xsd']) assert ret_ds is None and gdal.GetLastErrorMsg().find('Cannot create /i_am/not/valid.xsd') >= 0 gdal.Unlink('/vsimem/valid.xml') # Invalid CONFIG_FILE with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['CONFIG_FILE=/i/do_not/exist']) assert ret_ds is None and gdal.GetLastErrorMsg().find('Loading of configuration failed') >= 0 # Invalid layer name with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', tmp_ds, format='GMLAS', datasetCreationOptions=['LAYERS=foo']) assert ret_ds is None and gdal.GetLastErrorMsg().find('Layer foo specified in LAYERS option does not exist') >= 0 gdal.Unlink('/vsimem/valid.xml') # _ogr_layers_metadata not found src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, 0) src_ds.CreateLayer('_ogr_other_metadata') with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', src_ds, format='GMLAS') assert ret_ds is None and gdal.GetLastErrorMsg().find('_ogr_layers_metadata not found') >= 0 # _ogr_fields_metadata not found src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, 0) src_ds.CreateLayer('_ogr_other_metadata') src_ds.CreateLayer('_ogr_layers_metadata') with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', src_ds, format='GMLAS') assert ret_ds is None and gdal.GetLastErrorMsg().find('_ogr_fields_metadata not found') >= 0 # _ogr_layer_relationships not found src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, 0) src_ds.CreateLayer('_ogr_other_metadata') src_ds.CreateLayer('_ogr_layers_metadata') src_ds.CreateLayer('_ogr_fields_metadata') with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', src_ds, format='GMLAS') assert ret_ds is None and gdal.GetLastErrorMsg().find('_ogr_layer_relationships not found') >= 0 # Cannot find field layer_name in _ogr_layers_metadata layer src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, 0) src_ds.CreateLayer('_ogr_other_metadata') src_ds.CreateLayer('_ogr_layers_metadata') src_ds.CreateLayer('_ogr_fields_metadata') src_ds.CreateLayer('_ogr_layer_relationships') with gdaltest.error_handler(): ret_ds = gdal.VectorTranslate('/vsimem/valid.xml', src_ds, format='GMLAS') assert ret_ds is None and gdal.GetLastErrorMsg().find('Cannot find field layer_name in _ogr_layers_metadata layer') >= 0 gdal.Unlink('/vsimem/valid.xml') gdal.Unlink('/vsimem/valid.xsd') ############################################################################### # Test reading a particular construct with group, etc... that could cause # crashes def test_ogr_gmlas_read_fake_gmljp2(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/fake_gmljp2.xml') count = 0 while True: f, lyr = ds.GetNextFeature() if f is None: assert lyr is None break count += 1 assert count == 5 ############################################################################### # Test TypingConstraints def test_ogr_gmlas_typing_constraints(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # One substitution, no repetition ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_typing_constraints_one_subst_no_repetition.xml', open_options=["""CONFIG_FILE= myns_modified_for_fun:main_elt/myns_modified_for_fun:foo myns_modified_for_fun:bar """]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if not f.IsFieldSetAndNotNull('foo_bar_pkid'): f.DumpReadable() pytest.fail() lyr = ds.GetLayer(1) f = lyr.GetNextFeature() if f.GetField('value') != 'baz': f.DumpReadable() pytest.fail() ds = None # One substitution, with repetition ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_typing_constraints_one_subst_with_repetition.xml', open_options=["""CONFIG_FILE= myns_modified_for_fun:main_elt/myns_modified_for_fun:foo myns_modified_for_fun:bar """]) lyr = ds.GetLayer('main_elt_foo_bar') assert lyr.GetFeatureCount() == 2 lyr = ds.GetLayer('bar') f = lyr.GetNextFeature() if f.GetField('value') != 'baz': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('value') != 'baz2': f.DumpReadable() pytest.fail() ds = None # 2 substitutions ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_typing_constraints_two_subst.xml', open_options=["""CONFIG_FILE= myns_modified_for_fun:main_elt/myns_modified_for_fun:foo myns_modified_for_fun:bar myns_modified_for_fun:baz """]) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if not f.IsFieldSetAndNotNull('foo_bar_pkid'): f.DumpReadable() pytest.fail() if f.IsFieldSetAndNotNull('foo_baz_pkid'): f.DumpReadable() pytest.fail() lyr = ds.GetLayer(1) f = lyr.GetNextFeature() if f.GetField('value') != 'baz': f.DumpReadable() pytest.fail() ds = None ############################################################################### # Test swe:DataArray def test_ogr_gmlas_swe_dataarray(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_swe_dataarray.xml') lyr = ds.GetLayerByName('dataarray_1_components') f = lyr.GetNextFeature() if not f.IsFieldSetAndNotNull('parent_ogr_pkid') or \ f.GetField('myTime') != '2016/09/01 00:00:00+01' or \ f.GetField('myCategory') != '1' or \ f.GetField('myQuantity') != 2.34 or \ f.GetField('myCount') != 3 or \ f.GetField('myText') != 'foo' or \ f.GetField('myBoolean') is False: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('myTime') != '2017/09/01 00:00:00' or \ f.GetField('myCategory') != '2' or \ f.GetField('myQuantity') != 3.45: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('dataarray_2') f = lyr.GetNextFeature() if f.GetField('myTime') != '2016/09/01 00:00:00+01' or \ f.GetField('myCategory') != '1' or \ f.GetField('myQuantity') != 2.34: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('myTime') != '2017/09/01 00:00:00' or \ f.GetField('myCategory') is not None or \ f.GetField('myQuantity') != 3.45: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('dataarray_3') f = lyr.GetNextFeature() if f.GetField('myTime') != '2016/09/01 00:00:00+01' or \ f.GetField('myCategory') != '1' or \ f.GetField('myQuantity') != 2.34: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('myTime') != '2017/09/01 00:00:00' or \ f.GetField('myCategory') is not None or \ f.GetField('myQuantity') != 3.45: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() ds = None ############################################################################### # Test swe:DataRecord def test_ogr_gmlas_swe_datarecord(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() gdal.ErrorReset() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_swe_datarecord.xml', open_options=['VALIDATE=YES']) assert gdal.GetLastErrorMsg() == '' ds = None ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_swe_datarecord.xml') lyr = ds.GetLayerByName('main_elt_foo') assert lyr.GetLayerDefn().GetFieldCount() == 12 f = lyr.GetNextFeature() if f.GetField('mytime_value') != '2017/09/01 00:00:00' or \ f.GetField('mycategory_value') != 'myvalue' or \ f.GetField('mycategory_identifier') != 'myidentifier' or \ f.GetField('mycategory_codespace_href') != 'http://example.com' or \ f.GetField('myquantity_value') != 1.23 or \ f.GetField('mycount_value') != 2 or \ f.GetField('mytext_value') != 'foo' or \ f.GetField('myboolean_value') is False: f.DumpReadable() pytest.fail() ds = None ############################################################################### # Test a xs:any field at end of a type declaration def test_ogr_gmlas_any_field_at_end_of_declaration(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() # Simplified test case for # http://schemas.earthresourceml.org/earthresourceml-lite/1.0/erml-lite.xsd # http://services.ga.gov.au/earthresource/ows?service=wfs&version=2.0.0&request=GetFeature&typenames=erl:CommodityResourceView&count=10 ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_any_field_at_end_of_declaration.xml') lyr = ds.GetLayerByName('main_elt') # Will warn about 'Unexpected element with xpath=main_elt/extra (subxpath=main_elt/extra) found' # This should be fixed at some point gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() != '' if f.GetField('foo') != 'bar': f.DumpReadable() pytest.fail() if f.GetField('value') != 'baz': print('Expected fail: value != baz') ############################################################################### # Test auxiliary schema without namespace prefix def test_ogr_gmlas_aux_schema_without_namespace_prefix(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_aux_schema_without_namespace_prefix.xml') lyr = ds.GetLayerByName('main_elt') f = lyr.GetNextFeature() if not f.IsFieldSetAndNotNull('generic_pkid'): f.DumpReadable() pytest.fail() ############################################################################### # Test importing a GML geometry that is in an element that is a substitutionGroup # of another one (#6990) def test_ogr_gmlas_geometry_as_substitutiongroup(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_geometry_as_substitutiongroup.xml') lyr = ds.GetLayerByName('foo') f = lyr.GetNextFeature() if f.GetGeometryRef() is None: f.DumpReadable() pytest.fail() ds = None ############################################################################### @pytest.mark.require_run_on_demand def test_ogr_gmlas_extra_piezometre(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() return compare_ogrinfo_output('data/gmlas/real_world/Piezometre.06512X0037.STREMY.2.gml', 'data/gmlas/real_world/output/Piezometre.06512X0037.STREMY.2.txt', options='-oo REMOVE_UNUSED_LAYERS=YES') ############################################################################### @pytest.mark.require_run_on_demand def test_ogr_gmlas_extra_eureg(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() return compare_ogrinfo_output('data/gmlas/real_world/EUReg.example.gml', 'data/gmlas/real_world/output/EUReg.example.txt', options='-oo REMOVE_UNUSED_LAYERS=YES') ############################################################################### # Test a schema that has nothing interesting in it but imports another # schema def test_ogr_gmlas_no_element_in_first_choice_schema(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() ds = gdal.OpenEx('GMLAS:', open_options=['XSD=data/gmlas/gmlas_no_element_in_first_choice_schema.xsd']) lyr = ds.GetLayerByName('_ogr_layers_metadata') f = lyr.GetNextFeature() if f['layer_xpath'] != 'my_ns:main_elt': f.DumpReadable() pytest.fail() ############################################################################### # Test cross-layer links with xlink:href="#my_id" def test_ogr_gmlas_internal_xlink_href(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('GMLAS:data/gmlas/gmlas_internal_xlink_href.xml') lyr = ds.GetLayerByName('main_elt') f = lyr.GetNextFeature() if f['link_to_second_or_third_elt_href'] != '#does_not_exist' or \ f.IsFieldSet('link_to_second_or_third_elt_second_elt_pkid') or \ f.IsFieldSet('link_to_second_or_third_elt_third_elt_pkid') or \ f.IsFieldSet('link_to_third_elt_third_elt_pkid'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['link_to_second_or_third_elt_href'] != '#id2' or \ f['link_to_second_or_third_elt_second_elt_pkid'] != 'id2' or \ f.IsFieldSet('link_to_second_or_third_elt_third_elt_pkid') or \ f.IsFieldSet('link_to_third_elt_third_elt_pkid'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['link_to_second_or_third_elt_href'] != '#id3' or \ f['link_to_second_or_third_elt_second_elt_pkid'] != 'id3' or \ f.IsFieldSet('link_to_second_or_third_elt_third_elt_pkid') or \ f.IsFieldSet('link_to_third_elt_third_elt_pkid'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['link_to_second_or_third_elt_href'] != '#id4' or \ f.IsFieldSet('link_to_second_or_third_elt_second_elt_pkid') or \ f['link_to_second_or_third_elt_third_elt_pkid'] != 'D1013B7E44F28C976B976A4314FA4A09_third_elt_1' or \ f.IsFieldSet('link_to_third_elt_third_elt_pkid'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['link_to_third_elt_href'] != '#id4' or \ f.IsFieldSet('link_to_second_or_third_elt_second_elt_pkid') or \ f.IsFieldSet('link_to_second_or_third_elt_third_elt_pkid') or \ f['link_to_third_elt_third_elt_pkid'] != 'D1013B7E44F28C976B976A4314FA4A09_third_elt_1': f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('_ogr_fields_metadata') f = lyr.GetNextFeature() if f['layer_name'] != 'main_elt' or f['field_index'] != 1 or \ f['field_name'] != 'link_to_second_or_third_elt_href': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['layer_name'] != 'main_elt' or f['field_index'] != 2 or \ f['field_name'] != 'link_to_second_or_third_elt_second_elt_pkid' or \ f['field_xpath'] != 'main_elt/link_to_second_or_third_elt/second_elt' or \ f['field_type'] != 'string' or \ f['field_is_list'] != 0 or \ f['field_min_occurs'] != 0 or \ f['field_max_occurs'] != 1 or \ f['field_category'] != 'PATH_TO_CHILD_ELEMENT_WITH_LINK' or \ f['field_related_layer'] != 'second_elt': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['layer_name'] != 'main_elt' or f['field_index'] != 3 or \ f['field_name'] != 'link_to_second_or_third_elt_third_elt_pkid' or \ f['field_xpath'] != 'main_elt/link_to_second_or_third_elt/third_elt' or \ f['field_type'] != 'string' or \ f['field_is_list'] != 0 or \ f['field_min_occurs'] != 0 or \ f['field_max_occurs'] != 1 or \ f['field_category'] != 'PATH_TO_CHILD_ELEMENT_WITH_LINK' or \ f['field_related_layer'] != 'third_elt': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['layer_name'] != 'main_elt' or f['field_index'] != 4 or \ f['field_name'] != 'link_to_second_or_third_elt': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['layer_name'] != 'main_elt' or f['field_index'] != 5 or \ f['field_name'] != 'link_to_third_elt_href': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['layer_name'] != 'main_elt' or f['field_index'] != 6 or \ f['field_name'] != 'link_to_third_elt_third_elt_pkid': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['layer_name'] != 'third_elt' or f['field_index'] != 1 or \ f['field_name'] != 'id': f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('_ogr_layer_relationships') f = lyr.GetNextFeature() if f['parent_layer'] != 'main_elt' or \ f['parent_pkid'] != 'ogr_pkid' or \ f['parent_element_name'] != 'link_to_third_elt_third_elt_pkid' or \ f['child_layer'] != 'third_elt' or \ f['child_pkid'] != 'ogr_pkid': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['parent_layer'] != 'main_elt' or \ f['parent_pkid'] != 'ogr_pkid' or \ f['parent_element_name'] != 'link_to_second_or_third_elt_second_elt_pkid' or \ f['child_layer'] != 'second_elt' or \ f['child_pkid'] != 'id': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['parent_layer'] != 'main_elt' or \ f['parent_pkid'] != 'ogr_pkid' or \ f['parent_element_name'] != 'link_to_second_or_third_elt_third_elt_pkid' or \ f['child_layer'] != 'third_elt' or \ f['child_pkid'] != 'ogr_pkid': f.DumpReadable() pytest.fail() ############################################################################### # Cleanup def test_ogr_gmlas_cleanup(): if ogr.GetDriverByName('GMLAS') is None: pytest.skip() files = gdal.ReadDir('/vsimem/') if files is not None: print('Remaining files: ' + str(files)) gdal.SetConfigOption('GMLAS_WARN_UNEXPECTED', None) gdal.SetConfigOption('GDAL_XML_VALIDATION', ogrtest.old_val_GDAL_XML_VALIDATION) gdalautotest-3.1.2/ogr/ogr_libkml.py0000775000175000017500000022207413701057762016177 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_libkml.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: LIBKML Driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest ############################################################################### # Test basic open operation for KML datastore. # def test_ogr_libkml_datastore(): ogrtest.kml_ds = None ogrtest.have_read_libkml = 0 ogrtest.kml_drv = None ogrtest.libkml_drv = None ogrtest.kml_drv = ogr.GetDriverByName('LIBKML') if ogrtest.kml_drv is None: pytest.skip() ogrtest.kml_drv = ogr.GetDriverByName('KML') # Unregister KML driver if present as its behaviour is not identical # to new LIBKML driver if ogrtest.kml_drv is not None: print('Unregister KML driver') ogrtest.kml_drv.Deregister() ogrtest.kml_ds = ogr.Open('data/samples.kml') if ogrtest.kml_ds is not None: ogrtest.have_read_libkml = 1 if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds.GetLayerCount() == 10, 'wrong number of layers' ############################################################################### # Test reading attributes for first layer (point). # def test_ogr_libkml_attributes_1(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Placemarks') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Simple placemark', 'Wrong name field value' if feat.GetField('description')[:23] != 'Attached to the ground.': print('got: ', feat.GetField('description')[:23]) pytest.fail('Wrong description field value') feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' assert feat.GetField('Name') == 'Floating placemark', 'Wrong name field value' if feat.GetField('description')[:25] != 'Floats a defined distance': print('got: ', feat.GetField('description')[:25]) pytest.fail('Wrong description field value') feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' assert feat.GetField('Name') == 'Extruded placemark', 'Wrong name field value' if feat.GetField('description') != 'Tethered to the ground by a customizable\n \"tail\"': print('got: ', feat.GetField('description')) pytest.fail('Wrong description field value') ############################################################################### # Test reading attributes for another layer (point). # def test_ogr_libkml_attributes_2(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Highlighted Icon') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Roll over this icon', 'Wrong name field value' if feat.GetField('description') is not None: print("'%s'" % feat.GetField('description')) pytest.fail('Wrong description field value') feat = lyr.GetNextFeature() assert feat is None, 'unexpected feature found.' ############################################################################### # Test reading attributes for another layer (linestring). # def test_ogr_libkml_attributes_3(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Paths') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Tessellated', 'Wrong name field value' assert feat.GetField('description') == 'If the tag has a value of 1, the line will contour to the underlying terrain', \ 'Wrong description field value' feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' assert feat.GetField('Name') == 'Untessellated', 'Wrong name field value' assert feat.GetField('description') == 'If the tag has a value of 0, the line follow a simple straight-line path from point to point', \ 'Wrong description field value' feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' ############################################################################### # Test reading attributes for another layer (polygon). # def test_ogr_libkml_attributes_4(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Google Campus') feat = lyr.GetNextFeature() i = 40 while feat is not None: name = 'Building %d' % i if feat.GetField('Name') != name: print('Got: "%s"' % feat.GetField('name')) pytest.fail('Wrong name field value') assert feat.GetField('description') is None, 'Wrong description field value' i = i + 1 feat = lyr.GetNextFeature() ############################################################################### # Test reading of KML point geometry # def test_ogr_libkml_point_read(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Placemarks') lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'POINT(-122.0822035425683 37.42228990140251)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POINT(-122.084075 37.4220033612141 50)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POINT(-122.0857667006183 37.42156927867553 50)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Test reading of KML linestring geometry # def test_ogr_libkml_linestring_read(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Paths') lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'LINESTRING (-112.081423783034495 36.106778704771372 0, -112.087026775269294 36.0905099328766 0)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'LINESTRING (-112.080622229594994 36.106734600079953 0,-112.085242575314993 36.090495986124218 0)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'LINESTRING (-112.265654928602004 36.094476726025462 2357,-112.266038452823807 36.093426088386707 2357,-112.266813901345301 36.092510587768807 2357,-112.267782683444494 36.091898273579957 2357,-112.268855751095202 36.091313794118697 2357,-112.269481071721899 36.090367720752099 2357,-112.269526855561097 36.089321714872852 2357,-112.269014456727604 36.088509160604723 2357,-112.268152881533894 36.087538135979557 2357,-112.2670588176031 36.086826852625677 2357,-112.265737458732104 36.086463123013033 2357)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Test reading of KML polygon geometry # def test_ogr_libkml_polygon_read(): if not ogrtest.have_read_libkml: pytest.skip() assert ogrtest.kml_ds is not None, 'libkml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Google Campus') lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'POLYGON ((-122.084893845961204 37.422571240447859 17,-122.084958097919795 37.422119226268563 17,-122.084746957304702 37.42207183952619 17,-122.084572538096197 37.422090067296757 17,-122.084595488672306 37.422159327008949 17,-122.0838521118269 37.422272785643713 17,-122.083792243334997 37.422035391120843 17,-122.0835076656616 37.422090069571063 17,-122.083470946415204 37.422009873951609 17,-122.083122108574798 37.422104649494599 17,-122.082924737457205 37.422265039903863 17,-122.082933916938501 37.422312428430942 17,-122.083383735973698 37.422250460876178 17,-122.083360785424802 37.422341592287452 17,-122.083420455164202 37.42237075460644 17,-122.083659133885007 37.422512920110009 17,-122.083975843895203 37.422658730937812 17,-122.084237474333094 37.422651439725207 17,-122.0845036949503 37.422651438643499 17,-122.0848020460801 37.422611339163147 17,-122.084788275051494 37.422563950551208 17,-122.084893845961204 37.422571240447859 17))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POLYGON ((-122.085741277148301 37.422270331552568 17,-122.085816976848093 37.422314088323461 17,-122.085852582875006 37.422303374697442 17,-122.085879994563896 37.422256861387893 17,-122.085886010140896 37.422231107613797 17,-122.085806915728796 37.422202501738553 17,-122.085837954265301 37.42214027058678 17,-122.085673264051906 37.422086902144081 17,-122.085602292640701 37.42214885429042 17,-122.085590277843593 37.422128290487002 17,-122.085584167223701 37.422081719672462 17,-122.085485206574106 37.42210455874995 17,-122.085506726435199 37.422142679498243 17,-122.085443071291493 37.422127838461719 17,-122.085099071490404 37.42251282407603 17,-122.085676981863202 37.422818153236513 17,-122.086016227378295 37.422449188587223 17,-122.085726032700407 37.422292396042529 17,-122.085741277148301 37.422270331552568 17))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POLYGON ((-122.085786228724203 37.421362088869692 25,-122.085731299060299 37.421369359894811 25,-122.085731299291794 37.421409349109027 25,-122.085607707367899 37.421383901665649 25,-122.085580242651602 37.42137299550869 25,-122.085218622197104 37.421372995043157 25,-122.085227776563897 37.421616565082651 25,-122.085259818934702 37.421605658944031 25,-122.085259818549901 37.421682001560001 25,-122.085236931147804 37.421700178603459 25,-122.085264395782801 37.421761979825753 25,-122.085323903274599 37.421761980139067 25,-122.085355945432397 37.421852864451999 25,-122.085410875246296 37.421889218237339 25,-122.085479537935697 37.42189285337048 25,-122.085543622981902 37.421889217975462 25,-122.085626017804202 37.421860134999257 25,-122.085937287963006 37.421860134536047 25,-122.085942871866607 37.42160898590042 25,-122.085965546986102 37.421579927591438 25,-122.085864046234093 37.421471150029568 25,-122.0858548911215 37.421405713261841 25,-122.085809116276806 37.4214057134039 25,-122.085786228724203 37.421362088869692 25))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POLYGON ((-122.084437112828397 37.421772530030907 19,-122.084511885574599 37.421911115428962 19,-122.0850470999805 37.421787551215353 19,-122.085071991339106 37.421436630231611 19,-122.084916406231997 37.421372378221157 19,-122.084219386816699 37.421372378016258 19,-122.084219386589993 37.421476171614962 19,-122.083808641999099 37.4214613409357 19,-122.083789972856394 37.421313064107963 19,-122.083279653469802 37.421293288405927 19,-122.083260981920702 37.421392139442979 19,-122.082937362173695 37.421372363998763 19,-122.082906242566693 37.421515697788713 19,-122.082850226966499 37.421762825764652 19,-122.082943578863507 37.421767769696352 19,-122.083217411188002 37.421792485526858 19,-122.0835970430103 37.421748007445601 19,-122.083945555677104 37.421693642376027 19,-122.084007789463698 37.421762838158529 19,-122.084113587521003 37.421748011043917 19,-122.084076247378405 37.421713412923751 19,-122.084144704773905 37.421678815345693 19,-122.084144704222993 37.421817206601972 19,-122.084250333307395 37.421817070044597 19,-122.084437112828397 37.421772530030907 19))' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Write test def ogr_libkml_write(filename): if ogrtest.kml_drv is None: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource(filename) if filename != '/vsimem/libkml_use_doc_off.kmz': srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS72') lyr = ds.CreateLayer('test_wgs72', srs=srs) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' assert dst_feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49)', \ 'CreateFeature changed the geometry.' lyr = ds.CreateLayer('test_wgs84') fielddefn = ogr.FieldDefn('name', ogr.OFTString) lyr.CreateField(fielddefn) fielddefn = ogr.FieldDefn('description', ogr.OFTString) lyr.CreateField(fielddefn) fielddefn = ogr.FieldDefn('foo', ogr.OFTString) lyr.CreateField(fielddefn) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', 'my_name') dst_feat.SetField('description', 'my_description') dst_feat.SetField('foo', 'bar') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49 1)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 1,2 3)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0),(0.25 0.25 0,0.25 0.75 0,0.75 0.75 0,0.75 0.25 0,0.25 0.25 0))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT (2 49,2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((0 1,2 3),(0 1,2 3))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0),(0.25 0.25 0,0.25 0.75 0,0.75 0.75 0,0.75 0.25 0,0.25 0.25 0)),((-0.25 0.25 0,-0.25 0.75 0,-0.75 0.75 0,-0.75 0.25 0,-0.25 0.25 0)))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POINT (2 49 1),LINESTRING (0 1,2 3))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None ############################################################################### # Check previous test def ogr_libkml_check_write(filename): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open(filename) if filename != '/vsimem/libkml_use_doc_off.kmz': lyr = ds.GetLayerByName('test_wgs84') else: lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 8, 'Bad feature count.' feat = lyr.GetNextFeature() assert feat.GetField('name') == 'my_name', 'Unexpected name.' assert feat.GetField('description') == 'my_description', 'Unexpected description.' assert feat.GetField('foo') == 'bar', 'Unexpected foo.' assert feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49 0)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49 1)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'LINESTRING (0 1 0,2 3 0)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POLYGON ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0),(0.25 0.25 0,0.25 0.75 0,0.75 0.75 0,0.75 0.25 0,0.25 0.25 0))', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'MULTIPOINT (2 49 0,2 49 0)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'MULTILINESTRING ((0 1 0,2 3 0),(0 1 0,2 3 0))', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'MULTIPOLYGON (((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0),(0.25 0.25 0,0.25 0.75 0,0.75 0.75 0,0.75 0.25 0,0.25 0.25 0)),((-0.25 0.25 0,-0.25 0.75 0,-0.75 0.75 0,-0.75 0.25 0,-0.25 0.25 0)))', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'GEOMETRYCOLLECTION (POINT (2 49 1),LINESTRING (0 1 0,2 3 0))', \ 'Unexpected geometry.' ds = None ############################################################################### def test_ogr_libkml_write_kml(): return ogr_libkml_write('/vsimem/libkml.kml') def test_ogr_libkml_check_write_kml(): return ogr_libkml_check_write('/vsimem/libkml.kml') def test_ogr_libkml_write_kmz(): return ogr_libkml_write('/vsimem/libkml.kmz') def test_ogr_libkml_check_write_kmz(): return ogr_libkml_check_write('/vsimem/libkml.kmz') def test_ogr_libkml_write_kmz_use_doc_off(): gdal.SetConfigOption("LIBKML_USE_DOC.KML", "NO") ret = ogr_libkml_write('/vsimem/libkml_use_doc_off.kmz') gdal.SetConfigOption("LIBKML_USE_DOC.KML", None) return ret def test_ogr_libkml_check_write_kmz_use_doc_off(): return ogr_libkml_check_write('/vsimem/libkml_use_doc_off.kmz') def test_ogr_libkml_write_dir(): return ogr_libkml_write('/vsimem/libkmldir') def test_ogr_libkml_check_write_dir(): if not ogrtest.have_read_libkml: pytest.skip() ret = ogr_libkml_check_write('/vsimem/libkmldir') files = gdal.ReadDir('/vsimem/libkmldir') for filename in files: gdal.Unlink('/vsimem/libkmldir/' + filename) gdal.Rmdir('/vsimem/libkmldir') return ret ############################################################################### # Test reading attributes with XML content in them # def test_ogr_libkml_xml_attributes(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/description_with_xml.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('description').find('Description

Interesting

') != 0: print('got: %s ' % feat.GetField('description')) pytest.fail('Wrong description field value') ds = None ############################################################################### # Test reading all geometry types (#3558) # def test_ogr_libkml_read_geometries(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/geometries.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() while feat is not None: feat = lyr.GetNextFeature() ds = None ############################################################################### # Run test_ogrsf def test_ogr_libkml_test_ogrsf(): if not ogrtest.have_read_libkml: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' --config OGR_SKIP KML -ro data/samples.kml') assert not (ret.find("using driver `LIBKML'") == -1 or ret.find('INFO') == -1 or ret.find('ERROR') != -1) ############################################################################### # Test reading KML with only Placemark def test_ogr_libkml_read_placemark(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/placemark.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ds = None ############################################################################### # Test reading KML without any layer def test_ogr_libkml_read_empty(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/empty.kml') assert ds.GetLayerCount() == 0 ds = None ############################################################################### # Test reading KML with empty layers def test_ogr_libkml_read_emptylayers(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/emptylayers.kml') assert ds.GetLayerCount() == 2 # --> One difference with the old KML driver assert ds.GetLayer(0).GetFeatureCount() == 1 assert ds.GetLayer(1).GetFeatureCount() == 0 ds = None ############################################################################### # Test reading KML with empty layers ############################################################################### # Test reading KML with empty layers without folder def test_ogr_libkml_read_emptylayers_without_folder(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/emptylayers_without_folder.kml') assert ds.GetLayerCount() == 1 # --> One difference with the old KML driver assert ds.GetLayer(0).GetName() == 'Test', \ ("Layer name must be '" + ds.GetLayer(0).GetName() + "'.") ds = None ############################################################################### # Test reading KML with empty layers without_folder def test_ogr_libkml_read_schema(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/test_schema.kml') assert ds.GetLayerCount() == 4 lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('foo') != 'bar': feat.DumpReadable() pytest.fail() lyr = ds.GetLayer(1) feat = lyr.GetNextFeature() if feat.GetField('foo') != 'baz': feat.DumpReadable() pytest.fail() lyr = ds.GetLayer(2) assert lyr.GetLayerDefn().GetFieldIndex('foo') == -1 lyr = ds.GetLayer(3) assert lyr.GetLayerDefn().GetFieldIndex('foo') == -1 ds = None ############################################################################### # Test reading KML with elements of in case # doesn't use a (test changeset r22127) def test_ogr_libkml_extended_data_without_schema_data(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/extended_data_without_schema_data.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('field1') != '1_1': feat.DumpReadable() pytest.fail() if feat.GetField('field2') != '1_2': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetField('field1') != '2_1': feat.DumpReadable() pytest.fail() if feat.IsFieldSet('field2'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test reading KML with element (#5095) def test_ogr_libkml_gxtrack(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/gxtrack.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('begin') != '2013/05/28 12:00:00' or \ feat.GetField('end') != '2013/05/28 13:00:00' or \ feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (2 49,3 50)': feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test reading KML with element def test_ogr_libkml_gxmultitrack(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.Open('data/gxmultitrack.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('begin') != '2013/05/28 12:00:00' or \ feat.GetField('end') != '2013/05/28 13:00:00' or \ feat.GetGeometryRef().ExportToWkt() != 'MULTILINESTRING ((2 49,3 50))': feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test generating and reading KML with element def test_ogr_libkml_camera(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_camera.kml") lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn("heading", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("tilt", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("roll", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("altitudeMode", ogr.OFTString)) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) dst_feat.SetField("heading", 70) dst_feat.SetField("tilt", 75) dst_feat.SetField("roll", 10) with gdaltest.error_handler(): lyr.CreateFeature(dst_feat) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (3 50 1)')) dst_feat.SetField("heading", -70) dst_feat.SetField("altitudeMode", "relativeToGround") lyr.CreateFeature(dst_feat) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_camera.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('') == -1 or \ data.find('2') == -1 or \ data.find('49') == -1 or \ data.find('70') == -1 or \ data.find('75') == -1 or \ data.find('10') == -1 or \ data.find('relativeToGround') == -1)) ds = ogr.Open('/vsimem/ogr_libkml_camera.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if (feat.GetGeometryRef().ExportToWkt() != 'POINT (2 49 0)' or feat.GetField("heading") != 70.0 or feat.GetField("tilt") != 75.0 or feat.GetField("roll") != 10.0): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if (feat.GetGeometryRef().ExportToWkt() != 'POINT (3 50 1)' or feat.GetField("heading") != -70.0 or feat.IsFieldSet("tilt") or feat.IsFieldSet("roll") or feat.GetField("altitudeMode") != 'relativeToGround'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test generating a LookAt element at Document level def test_ogr_libkml_write_layer_lookat(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_layer_lookat.kml") options = ['LOOKAT_LONGITUDE=2', 'LOOKAT_LATITUDE=49', 'LOOKAT_RANGE=150'] ds.CreateLayer('test', options=options) options = ['LOOKAT_LONGITUDE=3', 'LOOKAT_LATITUDE=50', 'LOOKAT_RANGE=250', 'LOOKAT_ALTITUDE=100', 'LOOKAT_HEADING=70', 'LOOKAT_TILT=50', 'LOOKAT_ALTITUDEMODE=relativeToGround'] ds.CreateLayer('test2', options=options) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_write_layer_lookat.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('') == -1 or \ data.find('2') == -1 or \ data.find('49') == -1 or \ data.find('150') == -1)) assert (not (data.find('') == -1 or \ data.find('3') == -1 or \ data.find('50') == -1 or \ data.find('100') == -1 or \ data.find('70') == -1 or \ data.find('50') == -1 or \ data.find('150') == -1 or \ data.find('relativeToGround') == -1)) ############################################################################### # Test generating a Camera element at Document level def test_ogr_libkml_write_layer_camera(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_layer_camera.kml") options = ['CAMERA_LONGITUDE=3', 'CAMERA_LATITUDE=50', 'CAMERA_ALTITUDE=100', 'CAMERA_HEADING=70', 'CAMERA_TILT=50', 'CAMERA_ROLL=10', 'CAMERA_ALTITUDEMODE=relativeToGround'] ds.CreateLayer('test', options=options) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_write_layer_camera.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('') == -1 or \ data.find('3') == -1 or \ data.find('50') == -1 or \ data.find('100') == -1 or \ data.find('70') == -1 or \ data.find('50') == -1 or \ data.find('10') == -1 or \ data.find('relativeToGround') == -1)) ############################################################################### # Test writing MultiGeometry def test_ogr_libkml_write_multigeometry(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_multigeometry.kml") lyr = ds.CreateLayer('test') feat = ogr.Feature(lyr.GetLayerDefn()) # Transformed into POINT per ATC 66 feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) # Warning emitted per ATC 66 feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT EMPTY')) with gdaltest.error_handler(): lyr.CreateFeature(feat) ds = None ds = ogr.Open("/vsimem/ogr_libkml_write_multigeometry.kml") lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1 0)': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'GEOMETRYCOLLECTION EMPTY': feat.DumpReadable() pytest.fail() ############################################################################### # Test writing def test_ogr_libkml_write_snippet(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_snippet.kml") lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn("snippet", ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('snippet', 'test_snippet') feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) lyr.CreateFeature(feat) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_write_snippet.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert data.find('test_snippet') != -1 ds = ogr.Open("/vsimem/ogr_libkml_write_snippet.kml") lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('snippet') != 'test_snippet': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1 0)': feat.DumpReadable() pytest.fail() ############################################################################### # Test writing def test_ogr_libkml_write_atom_author(): if not ogrtest.have_read_libkml: pytest.skip() filepath = '/vsimem/ogr_libkml_write_atom_author.kml' ds = ogr.GetDriverByName('LIBKML').CreateDataSource(filepath, options=['author_name=name', 'author_uri=http://foo', 'author_email=foo@bar.com']) assert ds is not None, ('Unable to create %s.' % filepath) ds = None f = gdal.VSIFOpenL(filepath, 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('') == -1 or \ data.find('name') == -1 or \ data.find('http://foo') == -1 or \ data.find('foo@bar.com') == -1)), \ 'failure to find an atom string' ############################################################################### # Test writing def test_ogr_libkml_write_atom_link(): if not ogrtest.have_read_libkml: pytest.skip() filepath = '/vsimem/ogr_libkml_write_atom_link.kml' ds = ogr.GetDriverByName('LIBKML').CreateDataSource(filepath, options=['link=http://foo']) assert ds is not None, ('Unable to create %s.' % filepath) ds = None f = gdal.VSIFOpenL(filepath, 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('') == -1 or \ data.find('') == -1)) ############################################################################### # Test writing def test_ogr_libkml_write_phonenumber(): if not ogrtest.have_read_libkml: pytest.skip() filepath = '/vsimem/ogr_libkml_write_phonenumber.kml' ds = ogr.GetDriverByName('LIBKML').CreateDataSource(filepath, options=['phonenumber=tel:911']) assert ds is not None, ('Unable to create %s.' % filepath) ds = None f = gdal.VSIFOpenL(filepath, 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert data.find('tel:911') != -1 ############################################################################### # Test writing Region def test_ogr_libkml_write_region(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_region.kml") lyr = ds.CreateLayer('auto', options=['ADD_REGION=YES']) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2 48,2 49,3 49,3 48,2 48))')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('manual', options=['ADD_REGION=YES', 'REGION_XMIN=-180', 'REGION_XMAX=180', 'REGION_YMIN=-90', 'REGION_YMAX=90', 'REGION_MIN_LOD_PIXELS=128', 'REGION_MAX_LOD_PIXELS=10000000', 'REGION_MIN_FADE_EXTENT=1', 'REGION_MAX_FADE_EXTENT=2']) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_write_region.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('49') == -1 or \ data.find('48') == -1 or \ data.find('3') == -1 or \ data.find('2') == -1 or \ data.find('256') == -1 or \ data.find('-1') == -1)) assert (not (data.find('90') == -1 or \ data.find('-90') == -1 or \ data.find('180') == -1 or \ data.find('-180') == -1 or \ data.find('128') == -1 or \ data.find('10000000') == -1 or \ data.find('1') == -1 or \ data.find('2') == -1)) ############################################################################### # Test writing ScreenOverlay def test_ogr_libkml_write_screenoverlay(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_screenoverlay.kml") ds.CreateLayer('auto', options=['SO_HREF=http://foo']) ds.CreateLayer('manual', options=['SO_HREF=http://bar', 'SO_NAME=name', 'SO_DESCRIPTION=description', 'SO_OVERLAY_X=10', 'SO_OVERLAY_Y=20', 'SO_OVERLAY_XUNITS=pixels', 'SO_OVERLAY_YUNITS=pixels', 'SO_SCREEN_X=0.4', 'SO_SCREEN_Y=0.5', 'SO_SCREEN_XUNITS=fraction', 'SO_SCREEN_YUNITS=fraction', 'SO_SIZE_X=1.1', 'SO_SIZE_Y=1.2', 'SO_SIZE_XUNITS=fraction', 'SO_SIZE_YUNITS=fraction']) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_write_screenoverlay.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('http://foo') == -1 or \ data.find('') == -1)) assert (not (data.find('') == -1 or \ data.find('') == -1 or \ data.find('') == -1 or \ data.find('name') == -1 or \ data.find('description') == -1)) ############################################################################### # Test writing Model def test_ogr_libkml_write_model(): if not ogrtest.have_read_libkml: pytest.skip() ds = ogr.GetDriverByName('LIBKML').CreateDataSource("/vsimem/ogr_libkml_write_model.kml") lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn("model", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("heading", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("tilt", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("roll", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("altitudeMode", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("scale_x", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("scale_y", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("scale_z", ogr.OFTReal)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49 10)')) feat.SetField("tilt", 75) feat.SetField("roll", 10) feat.SetField("heading", -70) feat.SetField("scale_x", 2) feat.SetField("scale_y", 3) feat.SetField("scale_z", 4) feat.SetField("altitudeMode", "relativeToGround") feat.SetField("model", "http://makc.googlecode.com/svn/trunk/flash/sandy_flar2/cube.dae") lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) feat.SetField("model", "http://foo") lyr.CreateFeature(feat) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_write_model.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) assert (not (data.find('2') == -1 or \ data.find('49') == -1 or \ data.find('10') == -1 or \ data.find('relativeToGround') == -1 or \ data.find('-70') == -1 or \ data.find('75') == -1 or \ data.find('10') == -1 or \ data.find('2') == -1 or \ data.find('3') == -1 or \ data.find('4') == -1 or \ data.find('1') == -1 or \ data.find('1') == -1 or \ data.find('1') == -1 or \ data.find('http://makc.googlecode.com/svn/trunk/flash/sandy_flar2/cube.dae') == -1 or \ data.find('http://foo') == -1)) # This can only appear if HTTP resource is available and GDAL is built with curl/http support if gdal.GetDriverByName('HTTP') is not None and \ (data.find('http://makc.googlecode.com/svn/trunk/flash/sandy_flar2/cube.gif') == -1 or data.find('cube.gif') == -1): assert gdaltest.gdalurlopen('http://makc.googlecode.com/svn/trunk/flash/sandy_flar2/cube.dae') is None, \ data ############################################################################### # Test read / write of style def test_ogr_libkml_read_write_style(): if not ogrtest.have_read_libkml: pytest.skip() f = gdal.VSIFOpenL('/vsimem/ogr_libkml_read_write_style_read.kml', 'wb') styles = """ """ content = """ %s normal highlight #style2 """ % styles resolved_stylemap = """""" resolved_stylemap_highlight = """""" gdal.VSIFWriteL(content, 1, len(content), f) gdal.VSIFCloseL(f) src_ds = ogr.Open('/vsimem/ogr_libkml_read_write_style_read.kml') style_table = src_ds.GetStyleTable() options = ['style1_balloonstyle_bgcolor=#FFFF00', 'style1_balloonstyle_text=This is $[name], whose description is:
$[description]'] ds = ogr.GetDriverByName('LIBKML').CreateDataSource('/vsimem/ogr_libkml_read_write_style_write.kml', options=options) ds.SetStyleTable(style_table) ds = None src_ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_read_write_style_write.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) lines = [l.strip() for l in data.split('\n')] lines_got = lines[lines.index('""" lines = [l.strip() for l in data.split('\n')] lines_got = lines[lines.index('') + 1] lines_ref = [l.strip() for l in expected_style.split('\n')] if lines_got != lines_ref: print(data) pytest.fail(resolved_stylemap_highlight) # Automatic StyleMap creation testing ds = ogr.GetDriverByName('LIBKML').CreateDataSource('/vsimem/ogr_libkml_read_write_style_write.kml') style_table = ogr.StyleTable() style_table.AddStyle('style1_normal', 'SYMBOL(id:"http://style1_normal",c:#67452301)') style_table.AddStyle('style1_highlight', 'SYMBOL(id:"http://style1_highlight",c:#10325476)') ds.SetStyleTable(style_table) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_libkml_read_write_style_write.kml', 'rb') data = gdal.VSIFReadL(1, 2048, f) data = data.decode('ascii') gdal.VSIFCloseL(f) lines = [l.strip() for l in data.split('\n')] expected_styles = """ normal #style1_normal highlight #style1_highlight """ lines_got = lines[lines.index(' poly.shp poly.shp poly.shp poly.shp poly.shp poly.shp poly.shp poly.shp poly.shp poly.shp poly.shp foo poly.shp POINT (0 1) poly.shp gdalautotest-3.1.2/ogr/data/solid-vertex-ordering.dxf0000664000175000017500000000045313701057753021344 0ustar eveneven 0 SECTION 2 ENTITIES 0 SOLID 5 5BB 8 0 10 0.0 20 5.0 30 0.0 11 1.5 21 2.5 31 0.0 12 0.0 22 2.5 32 0.0 13 1.5 23 0.0 33 0.0 0 SOLID 5 5CC 8 0 10 -10.0 20 13.0 30 123.0 11 10.0 21 10.0 31 123.0 12 8.0 22 13.0 32 123.0 13 5.0 23 12.0 33 123.0 0 ENDSEC 0 EOF gdalautotest-3.1.2/ogr/data/ocs2wcs1.dxf0000664000175000017500000005704413701057753016564 0ustar eveneven 0 SECTION 2 HEADER 9 $ACADVER 1 AC1027 9 $HANDSEED 5 F0001 0 ENDSEC 0 SECTION 2 TABLES 0 TABLE 2 VPORT 5 EEEE1 330 0 100 AcDbSymbolTable 70 1 0 VPORT 5 EEEEB 330 EEEE1 100 AcDbSymbolTableRecord 100 AcDbViewportTableRecord 2 *ACTIVE 70 0 0 ENDTAB 0 TABLE 2 LTYPE 5 5 330 0 100 AcDbSymbolTable 70 4 0 LTYPE 5 14 330 5 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 ByBlock 70 0 3 72 65 73 0 40 0.0 0 LTYPE 5 15 330 5 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 ByLayer 70 0 3 72 65 73 0 40 0.0 0 LTYPE 5 16 330 5 100 AcDbSymbolTableRecord 100 AcDbLinetypeTableRecord 2 Continuous 70 0 3 Solid line 72 65 73 0 40 0.0 0 ENDTAB 0 TABLE 2 LAYER 5 2 330 0 100 AcDbSymbolTable 70 10 0 LAYER 5 10 330 2 100 AcDbSymbolTableRecord 100 AcDbLayerTableRecord 2 0 70 0 62 7 6 Continuous 370 -3 390 F 347 EE 348 0 0 ENDTAB 0 TABLE 2 STYLE 5 EEEE9 330 0 100 AcDbSymbolTable 70 3 0 STYLE 5 EEEF2 330 EEEE9 100 AcDbSymbolTableRecord 100 AcDbTextStyleTableRecord 2 STANDARD 70 0 40 0.0 41 1.0 50 0.0 71 0 42 0.2 3 txt 4 0 ENDTAB 0 TABLE 2 VIEW 5 EEEE3 100 AcDbSymbolTable 0 ENDTAB 0 TABLE 2 UCS 5 EEEE2 100 AcDbSymbolTable 0 ENDTAB 0 TABLE 2 APPID 5 EEEE5 330 0 100 AcDbSymbolTable 70 1 0 APPID 5 EEEF3 330 EEEE5 100 AcDbSymbolTableRecord 100 AcDbRegAppTableRecord 2 ACAD 70 0 0 ENDTAB 0 TABLE 2 DIMSTYLE 5 EEEE6 330 0 100 AcDbSymbolTable 70 2 100 AcDbDimStyleTable 71 0 0 DIMSTYLE 105 EEEF4 330 EEEE6 100 AcDbSymbolTableRecord 100 AcDbDimStyleTableRecord 2 STANDARD 70 0 279 2 340 EEEF2 0 ENDTAB 0 TABLE 2 BLOCK_RECORD 5 EEEE7 330 0 100 AcDbSymbolTable 70 3 0 BLOCK_RECORD 5 EEEEE 330 EEEE7 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Model_Space 340 EEEEA 70 0 280 1 281 0 0 BLOCK_RECORD 5 EEEF6 330 EEEE7 100 AcDbSymbolTableRecord 100 AcDbBlockTableRecord 2 *Paper_Space 340 EEEF5 70 0 280 1 281 0 0 ENDTAB 0 ENDSEC 0 SECTION 2 BLOCKS 0 BLOCK 5 EEEED 330 EEEEE 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 *Model_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Model_Space 1 0 ENDBLK 5 EEEEC 330 EEEEE 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 EEEF7 330 EEEF6 100 AcDbEntity 67 1 8 0 100 AcDbBlockBegin 2 *Paper_Space 70 0 10 0.0 20 0.0 30 0.0 3 *Paper_Space 1 0 ENDBLK 5 EEEF8 330 EEEF6 100 AcDbEntity 67 1 8 0 100 AcDbBlockEnd 0 ENDSEC 0 SECTION 2 ENTITIES 0 POINT 5 1EF 330 1F 100 AcDbEntity 8 0 100 AcDbPoint 10 4.0 20 4.0 30 0.0 0 LINE 5 1F0 330 1F 100 AcDbEntity 8 0 100 AcDbLine 10 0.0 20 0.0 30 0.0 11 1.0 21 1.0 31 0.0 0 LWPOLYLINE 5 1F1 330 1F 100 AcDbEntity 8 0 100 AcDbPolyline 90 3 70 1 43 0.0 10 1.0 20 1.0 10 2.0 20 1.0 10 1.0 20 2.0 0 POLYLINE 5 1F2 330 1F 100 AcDbEntity 8 0 100 AcDb3dPolyline 66 1 10 0.0 20 0.0 30 0.0 70 9 0 VERTEX 5 1F3 330 1F2 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 1.0 20 1.0 30 0.0 70 32 0 VERTEX 5 1F4 330 1F2 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 1.0 20 2.0 30 0.0 70 32 0 VERTEX 5 1F5 330 1F2 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 2.0 20 2.0 30 0.0 70 32 0 SEQEND 5 1F6 330 1F2 100 AcDbEntity 8 0 0 CIRCLE 5 1F7 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 4.0 20 4.0 30 0.0 40 2.0 0 ELLIPSE 5 1F8 330 1F 100 AcDbEntity 8 0 100 AcDbEllipse 10 4.0 20 4.0 30 0.0 11 -2.0 21 0.0 31 0.0 210 0.0 220 0.0 230 1.0 40 0.5 41 0.0 42 6.283185307179586 0 ARC 5 1F9 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 2.5 20 2.5 30 0.0 40 0.7071067811865476 100 AcDbArc 50 315.0 51 225.0000000000001 0 3DFACE 5 1FA 330 1F 100 AcDbEntity 8 0 100 AcDbFace 10 1.0 20 2.0 30 0.0 11 1.0 21 3.0 31 0.0 12 2.0 22 3.0 32 0.0 13 2.0 23 2.0 33 0.0 0 SOLID 5 1FB 330 1F 100 AcDbEntity 8 0 100 AcDbTrace 10 3.0 20 4.0 30 0.0 11 4.0 21 4.0 31 0.0 12 3.0 22 3.0 32 0.0 13 4.0 23 3.0 33 0.0 0 HATCH 5 1FD 330 1F 100 AcDbEntity 8 0 100 AcDbHatch 10 0.0 20 0.0 30 0.0 210 0.0 220 0.0 230 1.0 2 ANGLE 70 0 71 0 91 1 92 1 93 4 72 1 10 8.0 20 8.0 11 9.0 21 8.0 72 1 10 9.0 20 8.0 11 9.0 21 9.0 72 1 10 9.0 20 9.0 11 8.0 21 9.0 72 1 10 8.0 20 9.0 11 8.0 21 8.0 97 0 75 0 76 1 52 0.0 41 1.0 77 0 78 2 53 0.0 43 0.0 44 0.0 45 0.0 46 6.985 79 2 49 5.08 49 -1.905 53 90.0 43 0.0 44 0.0 45 -6.985 46 0.0000000000000004 79 2 49 5.08 49 -1.905 98 1 10 0.0 20 0.0 1001 ACAD 1010 0.0 1020 0.0 1030 0.0 0 SPLINE 5 200 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1080 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 2.82842712474619 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 10 2.0 20 2.0 30 0.0 10 2.666666666666666 20 2.666666666666666 30 0.0 10 4.666666666666666 20 4.666666666666666 30 0.0 10 6.666666666666666 20 6.666666666666666 30 0.0 10 8.0 20 8.0 30 0.0 11 2.0 21 2.0 31 0.0 11 4.0 21 4.0 31 0.0 11 8.0 21 8.0 31 0.0 0 SPLINE 5 201 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1064 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 6.082762530298219 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 10 8.0 20 1.0 30 0.0 10 5.583333333333333 20 0.9166666666666666 30 0.0 10 0.7500000000000002 20 0.75 30 0.0 10 0.9166666666666666 20 5.583333333333332 30 0.0 10 1.0 20 8.0 30 0.0 11 8.0 21 1.0 31 0.0 11 2.0 21 2.0 31 0.0 11 1.0 21 8.0 31 0.0 0 TEXT 5 202 330 1F 100 AcDbEntity 8 0 100 AcDbText 10 7.0 20 7.0 30 0.0 40 1.0 1 Text 100 AcDbText 0 POINT 5 203 330 1F 100 AcDbEntity 8 0 100 AcDbPoint 10 -4.0 20 4.0 30 -0.0000000000000005 210 0.0000000000000001 220 0.0 230 -1.0 0 LINE 5 204 330 1F 100 AcDbEntity 8 0 100 AcDbLine 10 0.0 20 0.0 30 0.0 11 -1.0 21 1.0 31 -0.0000000000000001 210 0.0000000000000001 220 0.0 230 -1.0 0 LWPOLYLINE 5 205 330 1F 100 AcDbEntity 8 0 100 AcDbPolyline 90 3 70 1 43 0.0 10 1.0 20 1.0 10 2.0 20 1.0 10 1.0 20 2.0 210 0.0000000000000001 220 0.0 230 -1.0 0 POLYLINE 5 206 330 1F 100 AcDbEntity 8 0 100 AcDb3dPolyline 66 1 10 0.0 20 0.0 30 0.0 70 9 0 VERTEX 5 207 330 206 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 -1.0 20 1.0 30 -0.0000000000000001 70 32 0 VERTEX 5 208 330 206 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 -1.0 20 2.0 30 -0.0000000000000001 70 32 0 VERTEX 5 209 330 206 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 -2.0 20 2.0 30 -0.0000000000000002 70 32 0 SEQEND 5 20A 330 206 100 AcDbEntity 8 0 0 CIRCLE 5 20B 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 4.0 20 4.0 30 0.0 40 2.0 210 0.0000000000000001 220 0.0 230 -1.0 0 ELLIPSE 5 20C 330 1F 100 AcDbEntity 8 0 100 AcDbEllipse 10 -4.0 20 4.0 30 -0.0000000000000005 11 2.0 21 0.0 31 0.0000000000000002 210 0.0000000000000001 220 0.0 230 -1.0 40 0.5 41 0.0 42 6.283185307179586 0 ARC 5 20D 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 2.5 20 2.5 30 0.0 40 0.7071067811865476 210 0.0000000000000001 220 0.0 230 -1.0 100 AcDbArc 50 315.0 51 225.0000000000001 0 3DFACE 5 20E 330 1F 100 AcDbEntity 8 0 100 AcDbFace 10 -1.0 20 2.0 30 -0.0000000000000001 11 -1.0 21 3.0 31 -0.0000000000000001 12 -2.0 22 3.0 32 -0.0000000000000002 13 -2.0 23 2.0 33 -0.0000000000000002 0 SOLID 5 20F 330 1F 100 AcDbEntity 8 0 100 AcDbTrace 10 3.0 20 4.0 30 0.0 11 4.0 21 4.0 31 0.0 12 3.0 22 3.0 32 0.0 13 4.0 23 3.0 33 0.0 210 0.0000000000000001 220 0.0 230 -1.0 0 HATCH 5 211 330 1F 100 AcDbEntity 8 0 100 AcDbHatch 10 0.0 20 0.0 30 0.0 210 0.0000000000000001 220 0.0 230 -1.0 2 ANGLE 70 0 71 0 91 1 92 1 93 4 72 1 10 8.0 20 8.0 11 9.0 21 8.0 72 1 10 9.0 20 8.0 11 9.0 21 9.0 72 1 10 9.0 20 9.0 11 8.0 21 9.0 72 1 10 8.0 20 9.0 11 8.0 21 8.0 97 0 75 0 76 1 52 0.0 41 1.0 77 0 78 2 53 0.0 43 0.0 44 0.0 45 0.0 46 6.985 79 2 49 5.08 49 -1.905 53 90.0 43 0.0 44 0.0 45 -6.985 46 0.0000000000000004 79 2 49 5.08 49 -1.905 98 1 10 0.0 20 0.0 1001 ACAD 1010 0.0 1020 0.0 1030 0.0 0 SPLINE 5 212 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1080 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 2.82842712474619 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 10 -2.0 20 2.0 30 -0.0000000000000002 10 -2.666666666666666 20 2.666666666666666 30 -0.0000000000000003 10 -4.666666666666666 20 4.666666666666666 30 -0.0000000000000006 10 -6.666666666666666 20 6.666666666666666 30 -0.0000000000000008 10 -8.0 20 8.0 30 -0.000000000000001 11 -2.0 21 2.0 31 -0.0000000000000002 11 -4.0 21 4.0 31 -0.0000000000000005 11 -8.0 21 8.0 31 -0.000000000000001 0 SPLINE 5 213 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1064 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 6.082762530298219 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 10 -8.0 20 1.0 30 -0.000000000000001 10 -5.583333333333333 20 0.9166666666666666 30 -0.0000000000000007 10 -0.7500000000000002 20 0.75 30 -0.0000000000000001 10 -0.9166666666666666 20 5.583333333333332 30 -0.0000000000000001 10 -1.0 20 8.0 30 -0.0000000000000001 11 -8.0 21 1.0 31 -0.000000000000001 11 -2.0 21 2.0 31 -0.0000000000000002 11 -1.0 21 8.0 31 -0.0000000000000001 0 TEXT 5 214 330 1F 100 AcDbEntity 8 0 100 AcDbText 10 7.0 20 7.0 30 0.0 40 1.0 1 Text 210 0.0000000000000001 220 0.0 230 -1.0 100 AcDbText 0 POINT 5 215 330 1F 100 AcDbEntity 8 0 100 AcDbPoint 10 -4.0 20 -4.0 30 -0.000000000000001 50 180.0 0 LINE 5 216 330 1F 100 AcDbEntity 8 0 100 AcDbLine 10 0.0 20 0.0 30 -0.0000000000000002 11 -1.0 21 -1.0 31 -0.0000000000000005 0 LWPOLYLINE 5 217 330 1F 100 AcDbEntity 8 0 100 AcDbPolyline 90 3 70 1 43 0.0 10 -1.0 20 -1.0 10 -2.0 20 -1.0 10 -1.0 20 -2.0 0 POLYLINE 5 218 330 1F 100 AcDbEntity 8 0 100 AcDb3dPolyline 66 1 10 0.0 20 0.0 30 0.0 70 9 0 VERTEX 5 219 330 218 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 -1.0 20 -1.0 30 -0.0000000000000002 70 32 0 VERTEX 5 21A 330 218 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 -1.0 20 -2.0 30 -0.0000000000000004 70 32 0 VERTEX 5 21B 330 218 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 -2.0 20 -2.0 30 -0.0000000000000005 70 32 0 SEQEND 5 21C 330 218 100 AcDbEntity 8 0 0 CIRCLE 5 21D 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 -4.0 20 -4.0 30 0.0 40 2.0 0 ELLIPSE 5 21E 330 1F 100 AcDbEntity 8 0 100 AcDbEllipse 10 -4.0 20 -4.0 30 -0.000000000000001 11 2.0 21 0.0 31 0.0000000000000002 210 -0.0000000000000001 220 -0.0000000000000001 230 1.0 40 0.5 41 0.0 42 6.283185307179586 0 ARC 5 21F 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 -2.5 20 -2.5 30 0.0 40 0.7071067811865476 100 AcDbArc 50 135.0 51 45.0 0 3DFACE 5 220 330 1F 100 AcDbEntity 8 0 100 AcDbFace 10 -1.0 20 -2.0 30 -0.0000000000000004 11 -1.0 21 -3.0 31 -0.0000000000000005 12 -2.0 22 -3.0 32 -0.0000000000000006 13 -2.0 23 -2.0 33 -0.0000000000000005 0 SOLID 5 221 330 1F 100 AcDbEntity 8 0 100 AcDbTrace 10 -3.0 20 -4.0 30 0.0 11 -4.0 21 -4.0 31 0.0 12 -3.0 22 -3.0 32 0.0 13 -4.0 23 -3.0 33 0.0 0 HATCH 5 223 330 1F 100 AcDbEntity 8 0 100 AcDbHatch 10 0.0 20 0.0 30 0.0 210 -0.0000000000000001 220 -0.0000000000000001 230 1.0 2 ANGLE 70 0 71 0 91 1 92 1 93 4 72 1 10 -8.0 20 -8.0 11 -9.0 21 -8.0 72 1 10 -9.0 20 -8.0 11 -9.0 21 -9.0 72 1 10 -9.0 20 -9.0 11 -8.0 21 -9.0 72 1 10 -8.0 20 -9.0 11 -8.0 21 -8.0 97 0 75 0 76 1 52 0.0 41 1.0 77 0 78 2 53 180.0 43 0.0 44 0.0 45 -0.0000000000000009 46 -6.985 79 2 49 5.08 49 -1.905 53 270.0 43 0.0 44 0.0 45 6.985 46 -0.0000000000000013 79 2 49 5.08 49 -1.905 98 1 10 0.0 20 0.0 1001 ACAD 1010 0.0 1020 0.0 1030 0.0 0 SPLINE 5 224 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1080 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 2.82842712474619 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 10 -2.0 20 -2.0 30 -0.0000000000000005 10 -2.666666666666666 20 -2.666666666666666 30 -0.0000000000000007 10 -4.666666666666666 20 -4.666666666666666 30 -0.0000000000000011 10 -6.666666666666666 20 -6.666666666666666 30 -0.0000000000000016 10 -8.0 20 -8.0 30 -0.000000000000002 11 -2.0 21 -2.0 31 -0.0000000000000005 11 -4.0 21 -4.0 31 -0.000000000000001 11 -8.0 21 -8.0 31 -0.000000000000002 0 SPLINE 5 225 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1064 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 6.082762530298219 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 10 -8.0 20 -1.0 30 -0.0000000000000011 10 -5.583333333333333 20 -0.9166666666666666 30 -0.0000000000000008 10 -0.7500000000000002 20 -0.75 30 -0.0000000000000002 10 -0.9166666666666666 20 -5.583333333333332 30 -0.0000000000000008 10 -1.0 20 -8.0 30 -0.0000000000000011 11 -8.0 21 -1.0 31 -0.0000000000000011 11 -2.0 21 -2.0 31 -0.0000000000000005 11 -1.0 21 -8.0 31 -0.0000000000000011 0 TEXT 5 226 330 1F 100 AcDbEntity 8 0 100 AcDbText 10 -7.0 20 -7.0 30 0.0 40 1.0 1 Text 50 180.0 100 AcDbText 0 POINT 5 227 330 1F 100 AcDbEntity 8 0 100 AcDbPoint 10 4.0 20 -4.0 30 -0.0000000000000005 210 0.0 220 0.0000000000000001 230 -1.0 50 180.0 0 LINE 5 228 330 1F 100 AcDbEntity 8 0 100 AcDbLine 10 0.0 20 0.0 30 0.0 11 1.0 21 -1.0 31 -0.0000000000000001 210 0.0 220 0.0000000000000001 230 -1.0 0 LWPOLYLINE 5 229 330 1F 100 AcDbEntity 8 0 100 AcDbPolyline 90 3 70 1 43 0.0 10 -1.0 20 -1.0 10 -2.0 20 -1.0 10 -1.0 20 -2.0 210 0.0 220 0.0000000000000001 230 -1.0 0 POLYLINE 5 22A 330 1F 100 AcDbEntity 8 0 100 AcDb3dPolyline 66 1 10 0.0 20 0.0 30 0.0 70 9 0 VERTEX 5 22B 330 22A 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 1.0 20 -1.0 30 -0.0000000000000001 70 32 0 VERTEX 5 22C 330 22A 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 1.0 20 -2.0 30 -0.0000000000000002 70 32 0 VERTEX 5 22D 330 22A 100 AcDbEntity 8 0 100 AcDbVertex 100 AcDb3dPolylineVertex 10 2.0 20 -2.0 30 -0.0000000000000002 70 32 0 SEQEND 5 22E 330 22A 100 AcDbEntity 8 0 0 CIRCLE 5 22F 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 -4.0 20 -4.0 30 0.0 40 2.0 210 0.0 220 0.0000000000000001 230 -1.0 0 ELLIPSE 5 230 330 1F 100 AcDbEntity 8 0 100 AcDbEllipse 10 4.0 20 -4.0 30 -0.0000000000000005 11 -2.0 21 0.0 31 0.0 210 0.0 220 0.0000000000000001 230 -1.0 40 0.5 41 0.0 42 6.283185307179586 0 ARC 5 231 330 1F 100 AcDbEntity 8 0 100 AcDbCircle 10 -2.5 20 -2.5 30 0.0 40 0.7071067811865476 210 0.0 220 0.0000000000000001 230 -1.0 100 AcDbArc 50 135.0 51 45.0 0 3DFACE 5 232 330 1F 100 AcDbEntity 8 0 100 AcDbFace 10 1.0 20 -2.0 30 -0.0000000000000002 11 1.0 21 -3.0 31 -0.0000000000000004 12 2.0 22 -3.0 32 -0.0000000000000004 13 2.0 23 -2.0 33 -0.0000000000000002 0 SOLID 5 233 330 1F 100 AcDbEntity 8 0 100 AcDbTrace 10 -3.0 20 -4.0 30 0.0 11 -4.0 21 -4.0 31 0.0 12 -3.0 22 -3.0 32 0.0 13 -4.0 23 -3.0 33 0.0 210 0.0 220 0.0000000000000001 230 -1.0 0 HATCH 5 235 330 1F 100 AcDbEntity 8 0 100 AcDbHatch 10 0.0 20 0.0 30 0.0 210 0.0 220 0.0000000000000001 230 -1.0 2 ANGLE 70 0 71 0 91 1 92 1 93 4 72 1 10 -8.0 20 -8.0 11 -9.0 21 -8.0 72 1 10 -9.0 20 -8.0 11 -9.0 21 -9.0 72 1 10 -9.0 20 -9.0 11 -8.0 21 -9.0 72 1 10 -8.0 20 -9.0 11 -8.0 21 -8.0 97 0 75 0 76 1 52 0.0 41 1.0 77 0 78 2 53 180.0 43 0.0 44 0.0 45 -0.0000000000000009 46 -6.985 79 2 49 5.08 49 -1.905 53 270.0 43 0.0 44 0.0 45 6.985 46 -0.0000000000000013 79 2 49 5.08 49 -1.905 98 1 10 0.0 20 0.0 1001 ACAD 1010 0.0 1020 0.0 1030 0.0 0 SPLINE 5 236 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0 220 0.0 230 1.0 70 1080 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 2.82842712474619 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 40 8.485281374238571 10 2.0 20 -2.0 30 -0.0000000000000002 10 2.666666666666666 20 -2.666666666666666 30 -0.0000000000000003 10 4.666666666666666 20 -4.666666666666666 30 -0.0000000000000006 10 6.666666666666666 20 -6.666666666666666 30 -0.0000000000000008 10 8.0 20 -8.0 30 -0.000000000000001 11 2.0 21 -2.0 31 -0.0000000000000002 11 4.0 21 -4.0 31 -0.0000000000000005 11 8.0 21 -8.0 31 -0.000000000000001 0 SPLINE 5 237 330 1F 100 AcDbEntity 8 0 100 AcDbSpline 210 0.0000000000000001 220 -0.0000000000000002 230 1.0 70 1064 71 3 72 9 73 5 74 3 42 0.0000000001 43 0.0000000001 44 0.0000000001 40 0.0 40 0.0 40 0.0 40 0.0 40 6.082762530298219 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 40 12.16552506059644 10 8.0 20 -1.0 30 -0.0000000000000001 10 5.583333333333333 20 -0.9166666666666666 30 -0.0000000000000001 10 0.7500000000000002 20 -0.75 30 -0.0000000000000001 10 0.9166666666666666 20 -5.583333333333332 30 -0.0000000000000007 10 1.0 20 -8.0 30 -0.000000000000001 11 8.0 21 -1.0 31 -0.0000000000000001 11 2.0 21 -2.0 31 -0.0000000000000002 11 1.0 21 -8.0 31 -0.000000000000001 0 TEXT 5 238 330 1F 100 AcDbEntity 8 0 100 AcDbText 10 -7.0 20 -7.0 30 0.0 40 1.0 1 Text 50 180.0 210 0.0 220 0.0000000000000001 230 -1.0 100 AcDbText 0 VIEWPORT 5 102 102 {ACAD_XDICTIONARY 360 373 102 } 330 23 100 AcDbEntity 67 1 8 0 100 AcDbViewport 10 128.5 20 98.14473144822969 30 0.0 40 654.7948017621146 41 223.4694628964594 68 1 69 1 12 128.5 22 98.14473144822969 13 0.0 23 0.0 14 10.0 24 10.0 15 10.0 25 10.0 16 0.0 26 0.0 36 1.0 17 0.0 27 0.0 37 0.0 42 50.0 43 0.0 44 0.0 45 223.4694628964594 50 0.0 51 0.0 72 1000 90 32800 1 281 0 71 1 74 0 110 0.0 120 0.0 130 0.0 111 1.0 121 0.0 131 0.0 112 0.0 122 1.0 132 0.0 79 0 146 0.0 0 VIEWPORT 5 104 102 {ACAD_XDICTIONARY 360 375 102 } 330 23 100 AcDbEntity 67 1 8 0 100 AcDbViewport 10 128.5 20 97.5 30 0.0 40 205.6 41 156.0 68 2 69 2 12 513.4868045686685 22 175.2385563380282 13 0.0 23 0.0 14 10.0 24 10.0 15 10.0 25 10.0 16 0.0 26 0.0 36 1.0 17 0.0 27 0.0 37 0.0 42 50.0 43 0.0 44 0.0 45 347.4734376308731 50 0.0 51 0.0 72 1000 90 32880 1 281 0 71 1 74 0 110 0.0 120 0.0 130 0.0 111 1.0 121 0.0 131 0.0 112 0.0 122 1.0 132 0.0 79 0 146 0.0 0 ENDSEC 0 SECTION 2 OBJECTS 0 DICTIONARY 5 4CC 330 0 100 AcDbDictionary 281 1 3 ACAD_GROUP 350 4CD 0 DICTIONARY 5 4CD 102 {ACAD_REACTORS 330 4CC 102 } 330 4CC 100 AcDbDictionary 281 1 0 ENDSEC 0 EOF gdalautotest-3.1.2/ogr/data/all_geoms.mif.golden.csv0000664000175000017500000006550513701057753021116 0ustar evenevenWKT,ogr_style "POINT (0 1)","SYMBOL(a:0,c:#000000,s:12pt,id:""mapinfo-sym-35,ogr-sym-10"")" "POINT (2 3)","SYMBOL(a:0,c:#000000,s:1pt,id:""mapinfo-sym-35,ogr-sym-10"")" "POINT (4 5)","SYMBOL(a:30,c:#000001,s:2pt,id:""font-sym-99,ogr-sym-9"",f:""foo"")" "LINESTRING (0 1,2 3)","PEN(w:1px,c:#000000,id:""mapinfo-pen-2,ogr-pen-0"")" "LINESTRING (0 1,2 3)","PEN(w:1px,c:#000000,id:""mapinfo-pen-2,ogr-pen-0"")" "LINESTRING (0 1,2 3)","PEN(w:1px,c:#000000,id:""mapinfo-pen-2,ogr-pen-0"")" "MULTILINESTRING ((0 1,2 3),(3 4,5 6))","PEN(w:1px,c:#000003,id:""mapinfo-pen-2,ogr-pen-0"")" "POLYGON ((-1 -1,1 -1,1 1,-1 1,-1 -1))","BRUSH(fc:#000002,bc:#000003,id:""mapinfo-brush-1,ogr-brush-1"");PEN(w:1px,c:#000003,id:""mapinfo-pen-2,ogr-pen-0"")" "POLYGON ((-1.0 -0.5,-0.999681412828496 -0.51784616691949,-0.998726057305127 -0.535669591599616,-0.997135150885949 -0.553447560782556,-0.994910720940466 -0.571157419136642,-0.992055602168058 -0.588776598127152,-0.98857343298558 -0.606282644776488,-0.984468650890754 -0.623653250277108,-0.979746486807249 -0.640866278420715,-0.97441295841866 -0.657899793807512,-0.968474862499881 -0.674732089799549,-0.961939766255643 -0.691341716182545,-0.954815997677259 -0.707707506500943,-0.947112634929856 -0.723808605031356,-0.938839494783628 -0.739624493360028,-0.93000712010385 -0.75513501653045,-0.920626766415591 -0.770320408727799,-0.910710387560246 -0.785161318467482,-0.90027062046218 -0.799638833255673,-0.889320769024878 -0.813734503690426,-0.877874787177129 -0.827430366972642,-0.865947261090863 -0.840708969796945,-0.853553390593274 -0.853553390593274,-0.840708969796946 -0.865947261090863,-0.827430366972643 -0.877874787177129,-0.813734503690426 -0.889320769024877,-0.799638833255674 -0.90027062046218,-0.785161318467482 -0.910710387560246,-0.770320408727799 -0.920626766415591,-0.75513501653045 -0.93000712010385,-0.739624493360029 -0.938839494783628,-0.723808605031356 -0.947112634929856,-0.707707506500943 -0.954815997677259,-0.691341716182545 -0.961939766255643,-0.674732089799549 -0.968474862499881,-0.657899793807513 -0.97441295841866,-0.640866278420715 -0.979746486807249,-0.623653250277108 -0.984468650890754,-0.606282644776488 -0.98857343298558,-0.588776598127152 -0.992055602168058,-0.571157419136643 -0.994910720940466,-0.553447560782556 -0.997135150885949,-0.535669591599616 -0.998726057305127,-0.51784616691949 -0.999681412828496,-0.5 -1.0,-0.5 -1.0,0.5 -1.0,0.51784616691949 -0.999681412828496,0.535669591599616 -0.998726057305127,0.553447560782556 -0.997135150885949,0.571157419136642 -0.994910720940466,0.588776598127152 -0.992055602168058,0.606282644776488 -0.98857343298558,0.623653250277107 -0.984468650890754,0.640866278420715 -0.979746486807249,0.657899793807512 -0.97441295841866,0.674732089799549 -0.968474862499881,0.691341716182545 -0.961939766255643,0.707707506500943 -0.954815997677259,0.723808605031356 -0.947112634929856,0.739624493360028 -0.938839494783628,0.75513501653045 -0.93000712010385,0.770320408727799 -0.920626766415591,0.785161318467482 -0.910710387560246,0.799638833255673 -0.90027062046218,0.813734503690426 -0.889320769024878,0.827430366972643 -0.877874787177129,0.840708969796945 -0.865947261090863,0.853553390593274 -0.853553390593274,0.865947261090863 -0.840708969796946,0.877874787177129 -0.827430366972643,0.889320769024877 -0.813734503690426,0.90027062046218 -0.799638833255674,0.910710387560246 -0.785161318467482,0.920626766415591 -0.770320408727799,0.93000712010385 -0.75513501653045,0.938839494783628 -0.739624493360029,0.947112634929856 -0.723808605031356,0.954815997677259 -0.707707506500943,0.961939766255643 -0.691341716182545,0.968474862499881 -0.674732089799549,0.97441295841866 -0.657899793807513,0.979746486807249 -0.640866278420715,0.984468650890754 -0.623653250277108,0.98857343298558 -0.606282644776488,0.992055602168058 -0.588776598127152,0.994910720940466 -0.571157419136643,0.997135150885949 -0.553447560782556,0.998726057305127 -0.535669591599616,0.999681412828496 -0.51784616691949,1.0 -0.5,1.0 -0.5,1.0 0.5,0.999681412828496 0.51784616691949,0.998726057305127 0.535669591599616,0.997135150885949 0.553447560782556,0.994910720940466 0.571157419136643,0.992055602168058 0.588776598127152,0.98857343298558 0.606282644776488,0.984468650890754 0.623653250277108,0.979746486807249 0.640866278420715,0.97441295841866 0.657899793807512,0.968474862499881 0.674732089799549,0.961939766255643 0.691341716182545,0.954815997677259 0.707707506500943,0.947112634929856 0.723808605031356,0.938839494783628 0.739624493360028,0.93000712010385 0.75513501653045,0.920626766415591 0.770320408727799,0.910710387560246 0.785161318467482,0.90027062046218 0.799638833255673,0.889320769024878 0.813734503690426,0.877874787177129 0.827430366972643,0.865947261090863 0.840708969796946,0.853553390593274 0.853553390593274,0.840708969796946 0.865947261090863,0.827430366972643 0.877874787177129,0.813734503690426 0.889320769024878,0.799638833255673 0.90027062046218,0.785161318467482 0.910710387560246,0.770320408727799 0.92062676641559,0.75513501653045 0.93000712010385,0.739624493360028 0.938839494783628,0.723808605031356 0.947112634929856,0.707707506500943 0.954815997677259,0.691341716182545 0.961939766255643,0.674732089799549 0.968474862499881,0.657899793807513 0.97441295841866,0.640866278420715 0.979746486807249,0.623653250277108 0.984468650890754,0.606282644776488 0.98857343298558,0.588776598127152 0.992055602168058,0.571157419136643 0.994910720940466,0.553447560782556 0.997135150885949,0.535669591599616 0.998726057305127,0.51784616691949 0.999681412828496,0.5 1.0,0.5 1.0,-0.5 1.0,-0.51784616691949 0.999681412828496,-0.535669591599616 0.998726057305127,-0.553447560782556 0.997135150885949,-0.571157419136643 0.994910720940466,-0.588776598127152 0.992055602168058,-0.606282644776488 0.98857343298558,-0.623653250277108 0.984468650890754,-0.640866278420715 0.979746486807249,-0.657899793807512 0.97441295841866,-0.674732089799549 0.968474862499881,-0.691341716182545 0.961939766255643,-0.707707506500943 0.954815997677259,-0.723808605031356 0.947112634929856,-0.739624493360028 0.938839494783628,-0.75513501653045 0.93000712010385,-0.770320408727799 0.92062676641559,-0.785161318467482 0.910710387560246,-0.799638833255673 0.90027062046218,-0.813734503690426 0.889320769024877,-0.827430366972642 0.877874787177129,-0.840708969796945 0.865947261090863,-0.853553390593274 0.853553390593274,-0.865947261090863 0.840708969796946,-0.877874787177129 0.827430366972643,-0.889320769024878 0.813734503690426,-0.90027062046218 0.799638833255674,-0.910710387560246 0.785161318467482,-0.92062676641559 0.770320408727799,-0.93000712010385 0.75513501653045,-0.938839494783628 0.739624493360029,-0.947112634929856 0.723808605031356,-0.954815997677259 0.707707506500943,-0.961939766255643 0.691341716182545,-0.968474862499881 0.674732089799549,-0.97441295841866 0.657899793807513,-0.979746486807249 0.640866278420715,-0.984468650890754 0.623653250277108,-0.98857343298558 0.606282644776488,-0.992055602168058 0.588776598127152,-0.994910720940466 0.571157419136643,-0.997135150885949 0.553447560782556,-0.998726057305127 0.535669591599616,-0.999681412828496 0.51784616691949,-1.0 0.5,-1.0 0.5,-1.0 -0.5))","BRUSH(fc:#000002,bc:#000003,id:""mapinfo-brush-1,ogr-brush-1"");PEN(w:1px,c:#000003,id:""mapinfo-pen-2,ogr-pen-0"")" "POLYGON ((1 0,0.999384002305604 0.035094386098525,0.997536768128735 0.070145536075204,0.994460573253382 0.105110267074894,0.990159207537445 0.139945502710232,0.984637970243652 0.17460832613155,0.977903663510889 0.209056032900229,0.969964583973999 0.243246183600376,0.960830512542361 0.277136656123986,0.95051270234986 0.310685697565186,0.939023864891076 0.343851975659622,0.926378154360781 0.376594629705619,0.912591150216036 0.408873320904375,0.897679837982373 0.440648282057176,0.881662588327704 0.471880366558404,0.864559134429745 0.50253109662397,0.846390547664831 0.532562710695771,0.827179211648077 0.561938209963753,0.806948794656867 0.590621403948273,0.78572422047165 0.618576955086607,0.763531637669949 0.645770422268662,0.740398387411442 0.672168303268263,0.716352969753775 0.697738076017747,0.691425008540625 0.722448238674991,0.665645214905257 0.746268348433547,0.639045349434554 0.769169059028032,0.611658183040119 0.791122156888593,0.583517456584662 0.812100595899896,0.554657839313413 0.832078530721816,0.525114886141773 0.851031348630773,0.49492499385182 0.8689356998425,0.464125356251644 0.885769526278865,0.432753918352745 0.901512088743321,0.400849329621953 0.916143992471506,0.368450896365467 0.929647211025497,0.335598533303662 0.9420051085023,0.302332714396342 0.953202460029211,0.268694422979004 0.963225470520781,0.234725101271563 0.972061791674302,0.200466599321721 0.97970053718286,0.165961123445908 0.986132296147212,0.131251184231291 0.991349144669971,0.096379544162927 0.995344655617815,0.061389164940581 0.998113906539678,0.026323154550107 0.999653485731196,-0.008775285845392 0.999961496437904,-0.043862915129194 0.99903755919203,-0.078896505503818 0.996882812280002,-0.113832895747469 0.993499910340079,-0.148629044388467 0.988893021091853,-0.183242082732137 0.983067820201632,-0.217629367674849 0.976031484290054,-0.25174853424012 0.967792682090514,-0.285557547772072 0.958361563769333,-0.319014755721933 0.947749748420792,-0.352078938963789 0.935970309752469,-0.384709362576352 0.923037759978484,-0.416865826028194 0.908968031940525,-0.448508712704625 0.893778459478656,-0.479599038715171 0.877487756076108,-0.510098500921552 0.860115991804353,-0.539969524126966 0.841684568596869,-0.569175307368569 0.822216193882056,-0.597679869256079 0.801734852607791,-0.625448092300692 0.780265777692079,-0.652445766179662 0.757835418936218,-0.678639629883262 0.734471410438765,-0.703997412692194 0.710202536550452,-0.728487873934968 0.685058696412001,-0.752080841476264 0.659070867118518,-0.774747248888862 0.632271065555858,-0.79645917126335 0.604692308955966,-0.81718985961148 0.576368574219804,-0.836913773820802 0.547334756057957,-0.85560661411996 0.517626624000523,-0.873245351015902 0.487280778329203,-0.889808253666109 0.456334604985935,-0.905274916650891 0.424826229513578,-0.919626285112769 0.392794470085423,-0.932844678231977 0.360278789681379,-0.944913811009144 0.327319247469768,-0.955818814328342 0.293956449454612,-0.965546253275767 0.260231498449222,-0.974084143691492 0.226185943437725,-0.981421966933893 0.191861728386902,-0.987550682838572 0.157301140571421,-0.992462740855796 0.122546758476105,-0.996152089352738 0.087641399339435,-0.998614183069062 0.052628066402911,-0.999845988716663 0.017549895931258,-0.999845988716663 -0.017549895931257,-0.998614183069062 -0.05262806640291,-0.996152089352738 -0.087641399339434,-0.992462740855796 -0.122546758476104,-0.987550682838572 -0.157301140571421,-0.981421966933893 -0.191861728386901,-0.974084143691492 -0.226185943437724,-0.965546253275767 -0.260231498449222,-0.955818814328342 -0.293956449454612,-0.944913811009144 -0.327319247469768,-0.932844678231977 -0.360278789681378,-0.919626285112769 -0.392794470085422,-0.905274916650891 -0.424826229513577,-0.889808253666109 -0.456334604985934,-0.873245351015903 -0.487280778329202,-0.85560661411996 -0.517626624000522,-0.836913773820802 -0.547334756057957,-0.81718985961148 -0.576368574219803,-0.79645917126335 -0.604692308955966,-0.774747248888862 -0.632271065555857,-0.752080841476264 -0.659070867118517,-0.728487873934969 -0.685058696412,-0.703997412692195 -0.710202536550452,-0.678639629883263 -0.734471410438765,-0.652445766179663 -0.757835418936218,-0.625448092300692 -0.780265777692079,-0.59767986925608 -0.801734852607791,-0.56917530736857 -0.822216193882056,-0.539969524126967 -0.841684568596868,-0.510098500921552 -0.860115991804353,-0.479599038715172 -0.877487756076108,-0.448508712704626 -0.893778459478656,-0.416865826028195 -0.908968031940525,-0.384709362576352 -0.923037759978484,-0.35207893896379 -0.935970309752468,-0.319014755721934 -0.947749748420792,-0.285557547772073 -0.958361563769333,-0.25174853424012 -0.967792682090514,-0.21762936767485 -0.976031484290054,-0.183242082732138 -0.983067820201632,-0.148629044388467 -0.988893021091853,-0.113832895747469 -0.993499910340079,-0.078896505503818 -0.996882812280002,-0.043862915129195 -0.99903755919203,-0.008775285845392 -0.999961496437904,0.026323154550106 -0.999653485731196,0.061389164940581 -0.998113906539679,0.096379544162927 -0.995344655617815,0.131251184231291 -0.991349144669971,0.165961123445907 -0.986132296147212,0.20046659932172 -0.97970053718286,0.234725101271562 -0.972061791674303,0.268694422979004 -0.963225470520781,0.302332714396341 -0.953202460029211,0.335598533303661 -0.942005108502301,0.368450896365466 -0.929647211025497,0.400849329621952 -0.916143992471506,0.432753918352744 -0.901512088743322,0.464125356251643 -0.885769526278865,0.49492499385182 -0.8689356998425,0.525114886141773 -0.851031348630773,0.554657839313413 -0.832078530721816,0.583517456584661 -0.812100595899897,0.611658183040119 -0.791122156888593,0.639045349434554 -0.769169059028033,0.665645214905256 -0.746268348433548,0.691425008540624 -0.722448238674992,0.716352969753775 -0.697738076017747,0.740398387411442 -0.672168303268264,0.763531637669948 -0.645770422268663,0.785724220471649 -0.618576955086608,0.806948794656867 -0.590621403948273,0.827179211648076 -0.561938209963753,0.84639054766483 -0.532562710695772,0.864559134429745 -0.50253109662397,0.881662588327704 -0.471880366558404,0.897679837982373 -0.440648282057176,0.912591150216036 -0.408873320904375,0.926378154360781 -0.376594629705619,0.939023864891076 -0.343851975659623,0.95051270234986 -0.310685697565187,0.96083051254236 -0.277136656123987,0.969964583973998 -0.243246183600377,0.977903663510889 -0.20905603290023,0.984637970243652 -0.174608326131551,0.990159207537444 -0.139945502710234,0.994460573253382 -0.105110267074894,0.997536768128735 -0.070145536075204,0.999384002305604 -0.035094386098526,1.0 -0.0,1.0 -0.0,1 0))","BRUSH(fc:#000002,bc:#000003,id:""mapinfo-brush-1,ogr-brush-1"");PEN(w:1px,c:#000003,id:""mapinfo-pen-2,ogr-pen-0"")" "LINESTRING (1 0,0.999390827019096 0.034899496702501,0.997564050259824 0.069756473744125,0.994521895368273 0.104528463267653,0.99026806874157 0.139173100960065,0.984807753012208 0.17364817766693,0.978147600733806 0.207911690817759,0.970295726275996 0.241921895599668,0.961261695938319 0.275637355816999,0.951056516295154 0.309016994374947,0.939692620785908 0.342020143325669,0.927183854566787 0.374606593415912,0.913545457642601 0.4067366430758,0.898794046299167 0.438371146789077,0.882947592858927 0.469471562785891,0.866025403784439 0.5,0.848048096156426 0.529919264233205,0.829037572555042 0.559192903470747,0.809016994374947 0.587785252292473,0.788010753606722 0.615661475325658,0.766044443118978 0.642787609686539,0.743144825477394 0.669130606358858,0.719339800338651 0.694658370458997,0.694658370458997 0.719339800338651,0.669130606358858 0.743144825477394,0.642787609686539 0.766044443118978,0.615661475325658 0.788010753606722,0.587785252292473 0.809016994374947,0.559192903470747 0.829037572555042,0.529919264233205 0.848048096156426,0.5 0.866025403784439,0.469471562785891 0.882947592858927,0.438371146789077 0.898794046299167,0.4067366430758 0.913545457642601,0.374606593415912 0.927183854566787,0.342020143325669 0.939692620785908,0.309016994374947 0.951056516295154,0.275637355816999 0.961261695938319,0.241921895599668 0.970295726275996,0.207911690817759 0.978147600733806,0.17364817766693 0.984807753012208,0.139173100960065 0.99026806874157,0.104528463267653 0.994521895368273,0.069756473744125 0.997564050259824,0.034899496702501 0.999390827019096,0.0 1.0,-0.034899496702501 0.999390827019096,-0.069756473744125 0.997564050259824,-0.104528463267654 0.994521895368273,-0.139173100960065 0.99026806874157,-0.17364817766693 0.984807753012208,-0.207911690817759 0.978147600733806,-0.241921895599668 0.970295726275996,-0.275637355816999 0.961261695938319,-0.309016994374947 0.951056516295154,-0.342020143325669 0.939692620785908,-0.374606593415912 0.927183854566787,-0.4067366430758 0.913545457642601,-0.438371146789078 0.898794046299167,-0.469471562785891 0.882947592858927,-0.5 0.866025403784439,-0.529919264233205 0.848048096156426,-0.559192903470747 0.829037572555042,-0.587785252292473 0.809016994374947,-0.615661475325658 0.788010753606722,-0.642787609686539 0.766044443118978,-0.669130606358858 0.743144825477394,-0.694658370458997 0.719339800338651,-0.719339800338651 0.694658370458997,-0.743144825477394 0.669130606358858,-0.766044443118978 0.642787609686539,-0.788010753606722 0.615661475325658,-0.809016994374947 0.587785252292473,-0.829037572555042 0.559192903470747,-0.848048096156426 0.529919264233205,-0.866025403784439 0.5,-0.882947592858927 0.469471562785891,-0.898794046299167 0.438371146789077,-0.913545457642601 0.4067366430758,-0.927183854566787 0.374606593415912,-0.939692620785908 0.342020143325669,-0.951056516295154 0.309016994374948,-0.961261695938319 0.275637355816999,-0.970295726275996 0.241921895599668,-0.978147600733806 0.207911690817759,-0.984807753012208 0.17364817766693,-0.99026806874157 0.139173100960065,-0.994521895368273 0.104528463267654,-0.997564050259824 0.069756473744126,-0.999390827019096 0.034899496702501,-1.0 0.0,-0.999390827019096 -0.034899496702501,-0.997564050259824 -0.069756473744125,-0.994521895368273 -0.104528463267653,-0.99026806874157 -0.139173100960066,-0.984807753012208 -0.17364817766693,-0.978147600733806 -0.20791169081776,-0.970295726275996 -0.241921895599668,-0.961261695938319 -0.275637355816999,-0.951056516295154 -0.309016994374947,-0.939692620785908 -0.342020143325669,-0.927183854566787 -0.374606593415912,-0.913545457642601 -0.4067366430758,-0.898794046299167 -0.438371146789077,-0.882947592858927 -0.469471562785891,-0.866025403784439 -0.5,-0.848048096156426 -0.529919264233205,-0.829037572555042 -0.559192903470747,-0.809016994374948 -0.587785252292473,-0.788010753606722 -0.615661475325658,-0.766044443118978 -0.642787609686539,-0.743144825477394 -0.669130606358858,-0.719339800338651 -0.694658370458997,-0.694658370458997 -0.719339800338651,-0.669130606358858 -0.743144825477394,-0.642787609686539 -0.766044443118978,-0.615661475325658 -0.788010753606722,-0.587785252292473 -0.809016994374947,-0.559192903470747 -0.829037572555042,-0.529919264233205 -0.848048096156426,-0.5 -0.866025403784438,-0.469471562785891 -0.882947592858927,-0.438371146789078 -0.898794046299167,-0.4067366430758 -0.913545457642601,-0.374606593415912 -0.927183854566787,-0.342020143325669 -0.939692620785908,-0.309016994374948 -0.951056516295154,-0.275637355816999 -0.961261695938319,-0.241921895599668 -0.970295726275996,-0.20791169081776 -0.978147600733806,-0.17364817766693 -0.984807753012208,-0.139173100960066 -0.99026806874157,-0.104528463267653 -0.994521895368273,-0.069756473744126 -0.997564050259824,-0.034899496702501 -0.999390827019096,-0.0 -1.0,0.034899496702501 -0.999390827019096,0.069756473744125 -0.997564050259824,0.104528463267653 -0.994521895368273,0.139173100960065 -0.99026806874157,0.17364817766693 -0.984807753012208,0.207911690817759 -0.978147600733806,0.241921895599667 -0.970295726275997,0.275637355816999 -0.961261695938319,0.309016994374947 -0.951056516295154,0.342020143325669 -0.939692620785908,0.374606593415912 -0.927183854566787,0.4067366430758 -0.913545457642601,0.438371146789077 -0.898794046299167,0.46947156278589 -0.882947592858927,0.5 -0.866025403784439,0.529919264233205 -0.848048096156426,0.559192903470747 -0.829037572555042,0.587785252292473 -0.809016994374948,0.615661475325659 -0.788010753606722,0.642787609686539 -0.766044443118978,0.669130606358858 -0.743144825477395,0.694658370458997 -0.719339800338651,0.719339800338651 -0.694658370458998,0.743144825477394 -0.669130606358858,0.766044443118978 -0.64278760968654,0.788010753606722 -0.615661475325658,0.809016994374947 -0.587785252292473,0.829037572555042 -0.559192903470747,0.848048096156426 -0.529919264233205,0.866025403784438 -0.5,0.882947592858927 -0.469471562785891,0.898794046299167 -0.438371146789078,0.913545457642601 -0.4067366430758,0.927183854566787 -0.374606593415912,0.939692620785908 -0.342020143325669,0.951056516295154 -0.309016994374948,0.961261695938319 -0.275637355816999,0.970295726275996 -0.241921895599668,0.978147600733806 -0.20791169081776,0.984807753012208 -0.17364817766693,0.99026806874157 -0.139173100960066,0.994521895368273 -0.104528463267653,0.997564050259824 -0.069756473744126,0.999390827019096 -0.034899496702501,1.0 -0.0,1.0 -0.0)","PEN(w:1px,c:#000003,id:""mapinfo-pen-2,ogr-pen-0"")" "LINESTRING (1 0,0.999390827019096 0.034899496702501,0.997564050259824 0.069756473744125,0.994521895368273 0.104528463267653,0.99026806874157 0.139173100960065,0.984807753012208 0.17364817766693,0.978147600733806 0.207911690817759,0.970295726275996 0.241921895599668,0.961261695938319 0.275637355816999,0.951056516295154 0.309016994374947,0.939692620785908 0.342020143325669,0.927183854566787 0.374606593415912,0.913545457642601 0.4067366430758,0.898794046299167 0.438371146789077,0.882947592858927 0.469471562785891,0.866025403784439 0.5,0.848048096156426 0.529919264233205,0.829037572555042 0.559192903470747,0.809016994374947 0.587785252292473,0.788010753606722 0.615661475325658,0.766044443118978 0.642787609686539,0.743144825477394 0.669130606358858,0.719339800338651 0.694658370458997,0.694658370458997 0.719339800338651,0.669130606358858 0.743144825477394,0.642787609686539 0.766044443118978,0.615661475325658 0.788010753606722,0.587785252292473 0.809016994374947,0.559192903470747 0.829037572555042,0.529919264233205 0.848048096156426,0.5 0.866025403784439,0.469471562785891 0.882947592858927,0.438371146789077 0.898794046299167,0.4067366430758 0.913545457642601,0.374606593415912 0.927183854566787,0.342020143325669 0.939692620785908,0.309016994374947 0.951056516295154,0.275637355816999 0.961261695938319,0.241921895599668 0.970295726275996,0.207911690817759 0.978147600733806,0.17364817766693 0.984807753012208,0.139173100960065 0.99026806874157,0.104528463267653 0.994521895368273,0.069756473744125 0.997564050259824,0.034899496702501 0.999390827019096,0.0 1.0,-0.034899496702501 0.999390827019096,-0.069756473744125 0.997564050259824,-0.104528463267654 0.994521895368273,-0.139173100960065 0.99026806874157,-0.17364817766693 0.984807753012208,-0.207911690817759 0.978147600733806,-0.241921895599668 0.970295726275996,-0.275637355816999 0.961261695938319,-0.309016994374947 0.951056516295154,-0.342020143325669 0.939692620785908,-0.374606593415912 0.927183854566787,-0.4067366430758 0.913545457642601,-0.438371146789078 0.898794046299167,-0.469471562785891 0.882947592858927,-0.5 0.866025403784439,-0.529919264233205 0.848048096156426,-0.559192903470747 0.829037572555042,-0.587785252292473 0.809016994374947,-0.615661475325658 0.788010753606722,-0.642787609686539 0.766044443118978,-0.669130606358858 0.743144825477394,-0.694658370458997 0.719339800338651,-0.719339800338651 0.694658370458997,-0.743144825477394 0.669130606358858,-0.766044443118978 0.642787609686539,-0.788010753606722 0.615661475325658,-0.809016994374947 0.587785252292473,-0.829037572555042 0.559192903470747,-0.848048096156426 0.529919264233205,-0.866025403784439 0.5,-0.882947592858927 0.469471562785891,-0.898794046299167 0.438371146789077,-0.913545457642601 0.4067366430758,-0.927183854566787 0.374606593415912,-0.939692620785908 0.342020143325669,-0.951056516295154 0.309016994374948,-0.961261695938319 0.275637355816999,-0.970295726275996 0.241921895599668,-0.978147600733806 0.207911690817759,-0.984807753012208 0.17364817766693,-0.99026806874157 0.139173100960065,-0.994521895368273 0.104528463267654,-0.997564050259824 0.069756473744126,-0.999390827019096 0.034899496702501,-1.0 0.0,-0.999390827019096 -0.034899496702501,-0.997564050259824 -0.069756473744125,-0.994521895368273 -0.104528463267653,-0.99026806874157 -0.139173100960066,-0.984807753012208 -0.17364817766693,-0.978147600733806 -0.20791169081776,-0.970295726275996 -0.241921895599668,-0.961261695938319 -0.275637355816999,-0.951056516295154 -0.309016994374947,-0.939692620785908 -0.342020143325669,-0.927183854566787 -0.374606593415912,-0.913545457642601 -0.4067366430758,-0.898794046299167 -0.438371146789077,-0.882947592858927 -0.469471562785891,-0.866025403784439 -0.5,-0.848048096156426 -0.529919264233205,-0.829037572555042 -0.559192903470747,-0.809016994374948 -0.587785252292473,-0.788010753606722 -0.615661475325658,-0.766044443118978 -0.642787609686539,-0.743144825477394 -0.669130606358858,-0.719339800338651 -0.694658370458997,-0.694658370458997 -0.719339800338651,-0.669130606358858 -0.743144825477394,-0.642787609686539 -0.766044443118978,-0.615661475325658 -0.788010753606722,-0.587785252292473 -0.809016994374947,-0.559192903470747 -0.829037572555042,-0.529919264233205 -0.848048096156426,-0.5 -0.866025403784438,-0.469471562785891 -0.882947592858927,-0.438371146789078 -0.898794046299167,-0.4067366430758 -0.913545457642601,-0.374606593415912 -0.927183854566787,-0.342020143325669 -0.939692620785908,-0.309016994374948 -0.951056516295154,-0.275637355816999 -0.961261695938319,-0.241921895599668 -0.970295726275996,-0.20791169081776 -0.978147600733806,-0.17364817766693 -0.984807753012208,-0.139173100960066 -0.99026806874157,-0.104528463267653 -0.994521895368273,-0.069756473744126 -0.997564050259824,-0.034899496702501 -0.999390827019096,-0.0 -1.0,0.034899496702501 -0.999390827019096,0.069756473744125 -0.997564050259824,0.104528463267653 -0.994521895368273,0.139173100960065 -0.99026806874157,0.17364817766693 -0.984807753012208,0.207911690817759 -0.978147600733806,0.241921895599667 -0.970295726275997,0.275637355816999 -0.961261695938319,0.309016994374947 -0.951056516295154,0.342020143325669 -0.939692620785908,0.374606593415912 -0.927183854566787,0.4067366430758 -0.913545457642601,0.438371146789077 -0.898794046299167,0.46947156278589 -0.882947592858927,0.5 -0.866025403784439,0.529919264233205 -0.848048096156426,0.559192903470747 -0.829037572555042,0.587785252292473 -0.809016994374948,0.615661475325659 -0.788010753606722,0.642787609686539 -0.766044443118978,0.669130606358858 -0.743144825477395,0.694658370458997 -0.719339800338651,0.719339800338651 -0.694658370458998,0.743144825477394 -0.669130606358858,0.766044443118978 -0.64278760968654,0.788010753606722 -0.615661475325658,0.809016994374947 -0.587785252292473,0.829037572555042 -0.559192903470747,0.848048096156426 -0.529919264233205,0.866025403784438 -0.5,0.882947592858927 -0.469471562785891,0.898794046299167 -0.438371146789078,0.913545457642601 -0.4067366430758,0.927183854566787 -0.374606593415912,0.939692620785908 -0.342020143325669,0.951056516295154 -0.309016994374948,0.961261695938319 -0.275637355816999,0.970295726275996 -0.241921895599668,0.978147600733806 -0.20791169081776,0.984807753012208 -0.17364817766693,0.99026806874157 -0.139173100960066,0.994521895368273 -0.104528463267653,0.997564050259824 -0.069756473744126,0.999390827019096 -0.034899496702501,1.0 -0.0,1.0 -0.0)","PEN(w:1px,c:#000000,id:""mapinfo-pen-2,ogr-pen-0"")" "POINT (1.0 1.0)","LABEL(t:""text"",a:30.000000,s:1.380000g,c:#00ffff,b:#00ffff,bo:1,p:2,f:""bla"")" "MULTIPOINT (0 1,2 3)","SYMBOL(a:0,c:#000000,s:12pt,id:""mapinfo-sym-35,ogr-sym-10"")" "POLYGON ((0 1,1 1,1 0,0 1))","BRUSH(fc:#000000,bc:#ffffff,id:""mapinfo-brush-1,ogr-brush-1"");PEN(w:1px,c:#000000,id:""mapinfo-pen-2,ogr-pen-0"")" "GEOMETRYCOLLECTION (POLYGON ((0 1,1 1,1 0,0 1)),LINESTRING (0 1,2 3),MULTIPOINT (0 1,2 3))","SYMBOL(a:0,c:#000000,s:12pt,id:""mapinfo-sym-35,ogr-sym-10"")" gdalautotest-3.1.2/ogr/data/aspatial-table.dat0000664000175000017500000000127013701057753017760 0ustar evenevenc  aCbCcCdC hello worldgdalautotest-3.1.2/ogr/data/segy/0000775000175000017500000000000013701057752015351 5ustar evenevengdalautotest-3.1.2/ogr/data/segy/ascii-header-with-nuls.sgy0000664000175000017500000006702013701057752022350 0ustar evenevenC1 COMPANY:SIOC2 LINE:1 AREA:La Jolla C3 TAPE NO:8 DAY:320 YEAR:2002 C4 INSTRUMENT: X-star Full Spectrum (tm) Profiler/Vehicle ID: C5 C6 SAMPLES/TRACE:3976 BYTES/SAMPLE:2C7C8 SAMPLE CODE: FIXED POINTC9 GAIN TYPE: FLOATING POINTC10C11 SOURCE: TYPE:FMC12C13C14C15C16C17C18C19 AMPLITUDE RECOVERY: SPHERICAL DIVERGENCE APPLIEDC20C21 PROCESSING: DATA IN ANALYTIC FORM:REAL(0),IMAG(0),...,REAL(2047),IMAG(2047)C22C23 ENVELOPE AMPL= TRACE SCALE FACTOR*SQRT(REAL*REAL+IMAG*IMAG)/32000*1.41e-14C24 CALIBRATED ENVELOPE AMPLITUDE= ENVELOPE AMPL*10^(SYSTEM CONSTANT/200)C25 ENVELOPE SAMPLE INTERVAL = A/D SAMPLE INTERVAL*2C26 SOURCE COORDINATES PROVIDE THE POSITION OF THE VEHICLEC27 IN SECONDS OF ARC (Bytes 73-80)C28 GROUP COORDINATES PROVIDE THE POSITION OF THE VEHICLEC29 IN 1/10000 MINUTES (Bytes 81-88)C30C31C32C33C34C35C36C37C38C39C40Fmi-TdU| a @+7W`4~+l#( ,67UF4@zfvyyg3]KWRdHb -l (k'7v0vZLeYrL?m+I!(w-4.@ҷ. !KAEK] 8$;{ y DijgTI 9G"[t  9%zl k)khAT!h ;}FkV6*HRRVXGJ ]cBS[r[1KjREkkh? A ', 735  H pPF  {0F[yW;0OQQM *"   Q , R yE& eQ'$R * y  c xF t S . 6' 29Lksl!!j"bu  Y,?vZ[7Z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} //$FIELDS Class=000_GRD;Subclass=000_GRD;Kind=4;Fields=Private#Identifier Private#Class Private#Subclass Private#Name Private#NbFields idSel nom withdata Private#X Private#Y Private#Graphics -1 000_GRD 000_GRD 000_GRD 3 000-2007-0050-7130-LAMB93 0 50000.00 7130000.00 4 600000.00 7130000.00 600000.00 6580000.00 50000.00 6580000.00 50000.00 7130000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0595-7130-LAMB93 0 595000.00 7130000.00 4 1145000.00 7130000.00 1145000.00 6580000.00 595000.00 6580000.00 595000.00 7130000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0595-6585-LAMB93 0 595000.00 6585000.00 4 1145000.00 6585000.00 1145000.00 6035000.00 595000.00 6035000.00 595000.00 6585000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-1145-6250-LAMB93 0 1145000.00 6250000.00 4 1265000.00 6250000.00 1265000.00 6030000.00 1145000.00 6030000.00 1145000.00 6250000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0050-6585-LAMB93 0 50000.00 6585000.00 4 600000.00 6585000.00 600000.00 6035000.00 50000.00 6035000.00 50000.00 6585000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0050-7130-LAMB93 0 50000.00 7130000.00 4 600000.00 7130000.00 600000.00 6580000.00 50000.00 6580000.00 50000.00 7130000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0595-7130-LAMB93 0 595000.00 7130000.00 4 1145000.00 7130000.00 1145000.00 6580000.00 595000.00 6580000.00 595000.00 7130000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0595-6585-LAMB93 0 595000.00 6585000.00 4 1145000.00 6585000.00 1145000.00 6035000.00 595000.00 6035000.00 595000.00 6585000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-1145-6250-LAMB93 0 1145000.00 6250000.00 4 1265000.00 6250000.00 1265000.00 6030000.00 1145000.00 6030000.00 1145000.00 6250000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0050-6585-LAMB93 0 50000.00 6585000.00 4 600000.00 6585000.00 600000.00 6035000.00 50000.00 6035000.00 50000.00 6585000.00 gdalautotest-3.1.2/ogr/data/testpointzm.shx0000664000175000017500000000015413701057753017527 0ustar eveneven' 6 ?@?@@@@@2gdalautotest-3.1.2/ogr/data/samples.kml0000664000175000017500000010763613701057753016571 0ustar eveneven KML Samples 1 Unleash your creativity with the help of these examples! Placemarks These are just some of the different kinds of placemarks with which you can mark your favorite places -122.0839597145766 37.42222904525232 0 500.6566641072245 40.5575073395506 -148.4122922628044 Simple placemark Attached to the ground. Intelligently places itself at the height of the underlying terrain. -122.0822035425683,37.42228990140251,0 Floating placemark 0 Floats a defined distance above the ground. -122.0839597145766 37.42222904525232 0 500.6566641072245 40.5575073395506 -148.4122922628044 #downArrowIcon relativeToGround -122.084075,37.4220033612141,50 Extruded placemark 0 Tethered to the ground by a customizable "tail" -122.0845787421525 37.42215078737763 0 365.2646606980322 40.55750733918048 -148.4126684946234 #globeIcon 1 relativeToGround -122.0857667006183,37.42156927867553,50 Styles and Markup 0 With KML it is easy to create rich, descriptive markup to annotate and enrich your placemarks -122.0845787422371 37.42215078726837 0 365.2646826292919 40.55750733930874 -148.4126777488172 #noDrivingDirections Highlighted Icon 0 Place your mouse over the icon to see it display the new icon -122.0856552124024 37.4224281311035 0 265.8520424250024 0 0 normal #normalPlacemark highlight #highlightPlacemark Roll over this icon 0 #exampleStyleMap -122.0856545755255,37.42243077405461,0 Descriptive HTML 0
Placemark descriptions can be enriched by using many standard HTML tags.
For example:


Styles:
Italics, Bold, Underlined, Strike Out, subscriptsubscript, superscriptsuperscript, Big, Small, Typewriter, Emphasized, Strong, Code
Fonts:
red by name, leaf green by hexadecimal RGB
size 1, size 2, size 3, size 4, size 5, size 6, size 7
Times, Verdana, Arial

Links:
Google Earth!
or: Check out our website at www.google.com
Alignment:

left

center

right


Ordered Lists:
  1. First
  2. Second
  3. Third
  1. First
  2. Second
  3. Third
  1. First
  2. Second
  3. Third

Unordered Lists:
  • A
  • B
  • C
  • A
  • B
  • C
  • A
  • B
  • C

Definitions:
Google:
The best thing since sliced bread

Centered:
Time present and time past
Are both perhaps present in time future,
And time future contained in time past.
If all time is eternally present
All time is unredeemable.

Block Quote:
We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time.
-- T.S. Eliot


Headings:

Header 1

Header 2

Header 3

Header 4

Header 5


Images:
Remote image

Scaled image


Simple Tables:
12345
abcde

[Did you notice that double-clicking on the placemark doesn't cause the viewer to take you anywhere? This is because it is possible to directly author a "placeless placemark". If you look at the code for this example, you will see that it has neither a point coordinate nor a LookAt element.]]]> Ground Overlays 0 Examples of ground overlays Large-scale overlay on terrain 0 Overlay shows Mount Etna erupting on July 13th, 2001. 15.02468937557116 37.67395167941667 0 30350.36838438907 58.31228652890705 -16.5581842842829 http://code.google.com/apis/kml/documentation/etna.jpg 37.91904192681665 37.46543388598137 15.35832653742206 14.60128369746704 -0.1556640799496235 Screen Overlays 0 Screen overlays have to be authored directly in KML. These examples illustrate absolute and dynamic positioning in screen space. Simple crosshairs 0 This screen overlay uses fractional positioning to put the image in the exact center of the screen http://code.google.com/apis/kml/documentation/crosshairs.png Absolute Positioning: Top left 0 http://code.google.com/apis/kml/documentation/top_left.jpg Absolute Positioning: Top right 0 http://code.google.com/apis/kml/documentation/top_right.jpg Absolute Positioning: Bottom left 0 http://code.google.com/apis/kml/documentation/bottom_left.jpg Absolute Positioning: Bottom right 0 http://code.google.com/apis/kml/documentation/bottom_right.jpg Dynamic Positioning: Top of screen 0 http://code.google.com/apis/kml/documentation/dynamic_screenoverlay.jpg Dynamic Positioning: Right of screen 0 http://code.google.com/apis/kml/documentation/dynamic_right.jpg Paths 0 Examples of paths. Note that the tessellate tag is by default set to 0. If you want to create tessellated lines, they must be authored (or edited) directly in KML. Tessellated 0 tag has a value of 1, the line will contour to the underlying terrain]]> -112.0822680013139 36.09825589333556 0 2889.145007690472 62.04855796276328 103.8120432044965 1 -112.0814237830345,36.10677870477137,0 -112.0870267752693,36.0905099328766,0 Untessellated 0 tag has a value of 0, the line follow a simple straight-line path from point to point]]> -112.0822680013139 36.09825589333556 0 2889.145007690472 62.04855796276328 103.8120432044965 0 -112.080622229595,36.10673460007995,0 -112.085242575315,36.09049598612422,0 Absolute 0 Transparent purple line -112.2719329043177 36.08890633450894 0 2569.386744398339 44.60763714063257 -106.8161545998597 #transPurpleLineGreenPoly 1 absolute -112.265654928602,36.09447672602546,2357 -112.2660384528238,36.09342608838671,2357 -112.2668139013453,36.09251058776881,2357 -112.2677826834445,36.09189827357996,2357 -112.2688557510952,36.0913137941187,2357 -112.2694810717219,36.0903677207521,2357 -112.2695268555611,36.08932171487285,2357 -112.2690144567276,36.08850916060472,2357 -112.2681528815339,36.08753813597956,2357 -112.2670588176031,36.08682685262568,2357 -112.2657374587321,36.08646312301303,2357 Absolute Extruded 0 Transparent green wall with yellow outlines -112.2643334742529 36.08563154742419 0 4451.842204068102 44.61038665812578 -125.7518698668815 #yellowLineGreenPoly 1 1 absolute -112.2550785337791,36.07954952145647,2357 -112.2549277039738,36.08117083492122,2357 -112.2552505069063,36.08260761307279,2357 -112.2564540158376,36.08395660588506,2357 -112.2580238976449,36.08511401044813,2357 -112.2595218489022,36.08584355239394,2357 -112.2608216347552,36.08612634548589,2357 -112.262073428656,36.08626019085147,2357 -112.2633204928495,36.08621519860091,2357 -112.2644963846444,36.08627897945274,2357 -112.2656969554589,36.08649599090644,2357 Relative 0 Black line (10 pixels wide), height tracks terrain -112.2580438551384 36.1072674824385 0 2927.61105910266 44.61324882043339 4.947421249553717 #thickBlackLine 1 relativeToGround -112.2532845153347,36.09886943729116,645 -112.2540466121145,36.09919570465255,645 -112.254734666947,36.09984998366178,645 -112.255493345654,36.10051310621746,645 -112.2563157098468,36.10108441943419,645 -112.2568033076439,36.10159722088088,645 -112.257494011321,36.10204323542867,645 -112.2584106072308,36.10229131995655,645 -112.2596588987972,36.10240001286358,645 -112.2610581199487,36.10213176873407,645 -112.2626285262793,36.10157011437219,645 Relative Extruded 0 Opaque blue walls with red outline, height tracks terrain -112.2683594333433 36.09884362144909 0 2184.193522571467 44.60855445139561 -72.24271551768405 #redLineBluePoly 1 1 relativeToGround -112.2656634181359,36.09445214722695,630 -112.2652238941097,36.09520916122063,630 -112.2645079986395,36.09580763864907,630 -112.2638827428817,36.09628572284063,630 -112.2635746835406,36.09679275951239,630 -112.2635711822407,36.09740038871899,630 -112.2640296531825,36.09804913435539,630 -112.264327720538,36.09880337400301,630 -112.2642436562271,36.09963644790288,630 -112.2639148687042,36.10055381117246,630 -112.2626894973474,36.10149062823369,630 Polygons 0 Examples of polygon shapes Google Campus 0 A collection showing how easy it is to create 3-dimensional buildings -122.084120030116 37.42174011925477 0 276.7870053764046 53.454348562403 -34.82469740081282 Building 40 0 #transRedPoly 1 relativeToGround -122.0848938459612,37.42257124044786,17 -122.0849580979198,37.42211922626856,17 -122.0847469573047,37.42207183952619,17 -122.0845725380962,37.42209006729676,17 -122.0845954886723,37.42215932700895,17 -122.0838521118269,37.42227278564371,17 -122.083792243335,37.42203539112084,17 -122.0835076656616,37.42209006957106,17 -122.0834709464152,37.42200987395161,17 -122.0831221085748,37.4221046494946,17 -122.0829247374572,37.42226503990386,17 -122.0829339169385,37.42231242843094,17 -122.0833837359737,37.42225046087618,17 -122.0833607854248,37.42234159228745,17 -122.0834204551642,37.42237075460644,17 -122.083659133885,37.42251292011001,17 -122.0839758438952,37.42265873093781,17 -122.0842374743331,37.42265143972521,17 -122.0845036949503,37.4226514386435,17 -122.0848020460801,37.42261133916315,17 -122.0847882750515,37.42256395055121,17 -122.0848938459612,37.42257124044786,17 Building 41 0 #transBluePoly 1 relativeToGround -122.0857412771483,37.42227033155257,17 -122.0858169768481,37.42231408832346,17 -122.085852582875,37.42230337469744,17 -122.0858799945639,37.42225686138789,17 -122.0858860101409,37.4222311076138,17 -122.0858069157288,37.42220250173855,17 -122.0858379542653,37.42214027058678,17 -122.0856732640519,37.42208690214408,17 -122.0856022926407,37.42214885429042,17 -122.0855902778436,37.422128290487,17 -122.0855841672237,37.42208171967246,17 -122.0854852065741,37.42210455874995,17 -122.0855067264352,37.42214267949824,17 -122.0854430712915,37.42212783846172,17 -122.0850990714904,37.42251282407603,17 -122.0856769818632,37.42281815323651,17 -122.0860162273783,37.42244918858722,17 -122.0857260327004,37.42229239604253,17 -122.0857412771483,37.42227033155257,17 Building 42 0 #transGreenPoly 1 relativeToGround -122.0857862287242,37.42136208886969,25 -122.0857312990603,37.42136935989481,25 -122.0857312992918,37.42140934910903,25 -122.0856077073679,37.42138390166565,25 -122.0855802426516,37.42137299550869,25 -122.0852186221971,37.42137299504316,25 -122.0852277765639,37.42161656508265,25 -122.0852598189347,37.42160565894403,25 -122.0852598185499,37.42168200156,25 -122.0852369311478,37.42170017860346,25 -122.0852643957828,37.42176197982575,25 -122.0853239032746,37.42176198013907,25 -122.0853559454324,37.421852864452,25 -122.0854108752463,37.42188921823734,25 -122.0854795379357,37.42189285337048,25 -122.0855436229819,37.42188921797546,25 -122.0856260178042,37.42186013499926,25 -122.085937287963,37.42186013453605,25 -122.0859428718666,37.42160898590042,25 -122.0859655469861,37.42157992759144,25 -122.0858640462341,37.42147115002957,25 -122.0858548911215,37.42140571326184,25 -122.0858091162768,37.4214057134039,25 -122.0857862287242,37.42136208886969,25 Building 43 0 #transYellowPoly 1 relativeToGround -122.0844371128284,37.42177253003091,19 -122.0845118855746,37.42191111542896,19 -122.0850470999805,37.42178755121535,19 -122.0850719913391,37.42143663023161,19 -122.084916406232,37.42137237822116,19 -122.0842193868167,37.42137237801626,19 -122.08421938659,37.42147617161496,19 -122.0838086419991,37.4214613409357,19 -122.0837899728564,37.42131306410796,19 -122.0832796534698,37.42129328840593,19 -122.0832609819207,37.42139213944298,19 -122.0829373621737,37.42137236399876,19 -122.0829062425667,37.42151569778871,19 -122.0828502269665,37.42176282576465,19 -122.0829435788635,37.42176776969635,19 -122.083217411188,37.42179248552686,19 -122.0835970430103,37.4217480074456,19 -122.0839455556771,37.42169364237603,19 -122.0840077894637,37.42176283815853,19 -122.084113587521,37.42174801104392,19 -122.0840762473784,37.42171341292375,19 -122.0841447047739,37.42167881534569,19 -122.084144704223,37.42181720660197,19 -122.0842503333074,37.4218170700446,19 -122.0844371128284,37.42177253003091,19 Extruded Polygon A simple way to model a building The Pentagon -77.05580139178142 38.870832443487 742.0552506670548 48.09646074797388 59.88865561738225 1 relativeToGround -77.05788457660967,38.87253259892824,100 -77.05465973756702,38.87291016281703,100 -77.05315536854791,38.87053267794386,100 -77.05552622493516,38.868757801256,100 -77.05844056290393,38.86996206506943,100 -77.05788457660967,38.87253259892824,100 -77.05668055019126,38.87154239798456,100 -77.05542625960818,38.87167890344077,100 -77.05485125901024,38.87076535397792,100 -77.05577677433152,38.87008686581446,100 -77.05691162017543,38.87054446963351,100 -77.05668055019126,38.87154239798456,100 Absolute and Relative 0 Four structures whose roofs meet exactly. Turn on/off terrain to see the difference between relative and absolute positioning. -112.3348969157552 36.14845533214919 0 990.6761201087104 49.30695423894192 -86.91235037566909 Absolute 0 #transBluePoly 1 absolute -112.3372510731295,36.14888505105317,1784 -112.3356128688403,36.14781540589019,1784 -112.3368169371048,36.14658677734382,1784 -112.3384408457543,36.14762778914076,1784 -112.3372510731295,36.14888505105317,1784 Absolute Extruded 0 #transRedPoly 1 1 absolute -112.3396586818843,36.14637618647505,1784 -112.3380597654315,36.14531751871353,1784 -112.3368254237788,36.14659596244607,1784 -112.3384555043203,36.14762621763982,1784 -112.3396586818843,36.14637618647505,1784 Relative 0 -112.3350152490417 36.14943123077423 0 345.5169113679813 37.92486261093203 -118.9214100848499 #transGreenPoly 1 relativeToGround -112.3349463145932,36.14988705767721,100 -112.3354019540677,36.14941108398372,100 -112.3344428289146,36.14878490381308,100 -112.3331289492913,36.14780840132443,100 -112.3317019516947,36.14680755678357,100 -112.331131440106,36.1474173426228,100 -112.332616324338,36.14845453364654,100 -112.3339876620524,36.14926570522069,100 -112.3349463145932,36.14988705767721,100 Relative Extruded 0 -112.3351587892382 36.14979247129029 0 401.0997279712519 56.10280503739589 -55.42811560891606 #transYellowPoly 1 1 relativeToGround -112.3348783983763,36.1514008468736,100 -112.3372535345629,36.14888517553886,100 -112.3356068927954,36.14781612679284,100 -112.3350034807972,36.14846469024177,100 -112.3358353861232,36.1489624162954,100 -112.3345888301373,36.15026229372507,100 -112.3337937856278,36.14978096026463,100 -112.3331798208424,36.1504472788618,100 -112.3348783983763,36.1514008468736,100 gdalautotest-3.1.2/ogr/data/testcondition.gml0000664000175000017500000000114513701057753017773 0ustar eveneven English name Nom francais Deutsche name gdalautotest-3.1.2/ogr/data/testopenfilegdb.gdb.zip0000664000175000017500000024754313701057753021057 0ustar evenevenPK |ZHtestopenfilegdb.gdb/UT aVaVux PK |ZH0#!testopenfilegdb.gdb/a0000001a.spxUT aVaVux ȱ @1~, cd(urPK |ZHlM!testopenfilegdb.gdb/a00000014.spxUT aVaVux c```aF fbf fbV F(``LD@ GchQ0 F(`FhyPK|ZHڔ3testopenfilegdb.gdb/a00000007.CatRelTypesByUUID.atxUT aVaVux XK! ?9Ev06`6KU٥K* jl`}n?n?_WW?y=|~]Jv0]uĩ,wgP a\Iv2)OsSy[zV Rma4[X݈ylBYA,IҳlAi+3]h4%߲Ht!>LQ/=* QkGjQDH{Bj'#Q`V'}!rv;wAaIUlNiFRщֺPUdu)Z>Yj- t"8Ԃl#RUXdY:)PلdM2go궨[GEe_q&!\e3LǞ}q&麗f.n؅ .\p… /~|?PK|ZHaw(704testopenfilegdb.gdb/a00000005.CatItemTypesByName.atxUT aVaVux ZNP}Q4>4B,-iAoTL/Q+c976!L!"')_B uȧ<#O|f0 `0 ø=O@vFn)xg>oSU _C_F_Sr"PD +9CK+y M GO_E'OGkԓX65T4.V/1eeii +8V9.W/{t{Gr1=X49uzt>ײz[*֓HE_ō:;״)V@V3g/u'mig cs2 .wrr򮚺jq %in/vB{%b;ZEY$JPM[^=CI_e~Ug TYmel/ J=ڢM_(V5e0  ?8 PK |ZH+ H!testopenfilegdb.gdb/a00000015.spxUT aVaVux 1 DD!e5BJπJҥ!vW\y kH뙍r=9x_/PK |ZHpzBt(testopenfilegdb.gdb/a00000027.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZH0 &testopenfilegdb.gdb/a0000001e.gdbtablxUT aVaVux ı !'\pw☁'I;8}Y[PK |ZHt:!testopenfilegdb.gdb/a00000025.spxUT aVaVux ر D XX:8jF5`p#\$h+g=,oij{v:?PK |ZH=u`6+testopenfilegdb.gdb/a0000000a.idx_float.atxUT aVaVux  ƺlR-̀>vv`?"ICE-ꑧ;h?P/{?PK |ZHs׶'g&testopenfilegdb.gdb/a00000012.gdbtableUT aVaVux RMH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openfilegdb.gdb/a00000026.gdbtablxUT aVaVux  SS;۬V PK|ZH¢ &testopenfilegdb.gdb/a00000002.gdbtablxUT aVaVux ͽ PFObim-:.a #.vb'Ik#w ؟|poRb `mk0+_(+|` P (XBgh,F?PK |ZHb*testopenfilegdb.gdb/a00000006.FDO_UUID.atxUT aVaVux Xٮd763L7$cc ^৮N'it6Ev?_o_% xx x ||>SI)G,:m]e V bF2O=vTwB;%ܪfby5W!`a'ݣњjrprc^[#R+F8O:JG+6^6 ٹv]}sԳ*7=uP§ιik{1vQ%V{V"Κ]$pNdԢfy: *^̯vu!wTڇdEVV<ɜeK]6: Bkjj jF9c Wڃi8e+TɤSQKWG6tk,l ^9C6ydCcm|آ*.X#V>4]֞Pd…UsiK]FsPX;[B$FԴnyK*_:%!ZNbq5:z!c)Ot+ߝDBq_o˂SՃD7f%(hqUhLj$M\s .qFt^;X1 VN]VR= fXvi9f4sj\-1(IaY( W+b8GaqKUG:ۂwC;ݪԼ4'D\׸X1LZbL>2ya̹(l-ٌb_+h⨍" (NM920i6/Vb6Z@ sZZq`F:VWUCD5z xjA}D˞#G<x>b\PK|ZH"B| &testopenfilegdb.gdb/a00000005.gdbtablxUT aVaVux ͡ `E῔b@baa (; QH T"x'a9/O)e*V.Jn[8@=|`37a:p;8ްy GE 쿲 PK |ZH*08testopenfilegdb.gdb/a00000004.CatItemsByPhysicalName.atxUT aVaVux NPE"хs-8BbX,bX,dϿ>@mR%dS*Y#g̓?jh>\C(!@^?;+%V>GM; $Z'{4̼ PK |ZHbk:&testopenfilegdb.gdb/a00000011.gdbtableUT aVaVux RKKQ=;Itt!܆D:#]׏nĐԹ( ͈R.Laq${YK`Gm@#s!]omb.'ȧ\d gq[0)ܨ?ħf1/QADڢ+gla.6ʶ'S,v?'q3|z|ꋵ-ݍ%:9q-WǾK멸^_?-/a  f٣ܸo/ 4K ח kybM&Բx-VsRX ;ӔaVȊ] i3i(pk}%m{';FG[Wm藑ۉԯha(X[<9 D _Vho'_{µ FT̪+X7pPK |ZH &testopenfilegdb.gdb/a00000020.gdbtablxUT aVaVux cf@VLPK |ZH0.o"&testopenfilegdb.gdb/a0000002d.gdbtableUT aVaVux NQE* B4 IF0D!> cek XVPྗK0F>=97xzJ8˱DrdD mv M:嵨S%‌ؗgЧEUee`ERoH#] 7|9l='\U ,+4Cn+K93jcOw/X#M_3cIuMx4ǩN4b<=ƟTYݜ ?^=K]RmZ@UeK*{}x|7PK |ZHQ/testopenfilegdb.gdb/a00000006.CatRelsByType.atxUT aVaVux ط0Fa{}DKfuRwHwR^E!( h衏a aXa a]-r]6:u؛wYJVwWJ$I$;=_/PK |ZHn(W5 &testopenfilegdb.gdb/a00000016.gdbtablxUT aVaVux  AH!,2 -QE4#~GDgʼ=*~[<0)My*Sԧ1iM{:ӕe CN<[KP2T 5CЂ6t E?1c͉4&s!Sk,ndXƭnVxl^-C> v?y)@JP Tuh@ZІt %s(HQJRT&uiHSZҖdҝg0ɜY\ĥ\ɵ\lrYmacyymۼG|ʗ|wįOM )JIRԤ. iJKґLӛ f8SU QRըE=ьVMn0! 1yLb.*q=s,as'kX˓3g/q]rA!QrTG#ъvt"aC͌3g"+f1c'{EQ(((NaoPK |ZH{C(ne&testopenfilegdb.gdb/a00000026.gdbtableUT aVaVux cf```/@R g X<\ؕ݁,wg`h%(+!ц  &@P_J{M  TRM19g bF`y= m 3Bc 2u& umC*13d2$3dM6RTuo*C:T=B!`Ah 3 0?=fwv@ÖlgKI0b( %4PZLPA'/`8 n6{k9=/cÕr78r&wÅ5 ĊW7\蜸Yag`bß;>4̼ PK |ZH9 &testopenfilegdb.gdb/a0000001c.gdbtablxUT aVaVux u{]׸lZY(dDY]eVV(d],BF"Tf"ߗsLmLD{`L,:l%A"=(hᘀX ؅#8+h8tA*l^Y@dT@JdE~DeA3Cw "c.6EFTE=D'0,؉8I-4r(G 7cLX؃ף:Ȃ|(JxM6@t,Z|+.$LQ^C tD/ ŧ ;p7"IȅgQ/!]G%6a7~H4 3FqTDm4[1 Ӱk ~/8[ Hl("^耞q%Xp/) ؀]83{I!bQ5q)U؂8"?J2ڡ;a f` qqi?@aAUCKtBo xAXXXXXXXXXXXXc!PK |ZH& &testopenfilegdb.gdb/a00000022.gdbtablxUT aVaVux  Uoz6! L3۬V PK |ZHJD&testopenfilegdb.gdb/a0000001a.gdbtableUT aVaVux R;K#Q=]OǮ >MK`"5.VV,/p`f;+ ;Wl,x; be{{;7Ria0(ذ;zA )̡0COlC?ܙ oJ}#J ^Fe\Pջi?3 <̓L=v<~E(&) >DzEFHi\UsܭmOZp_FƏϞxlp&VSfZuz'8181ump&aw`C!Nk"1uƦe5CbS16J2J$',OVg(a6Ȋ *w6ɌbqXF ;ENgϯHi:{.޷p',8tzkҙZEPK |ZH/N1 &testopenfilegdb.gdb/a0000001b.gdbtablxUT aVaVux  S C; ;0#"ZvϽ#7kvj/[PK |ZHpzBt(testopenfilegdb.gdb/a00000016.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK|ZHBPT?testopenfilegdb.gdb/a00000007.CatRelTypesByOriginItemTypeID.atxUT aVaVux 혹0 @+xTIIO-IRb0g ¾qm.~K?c)~{S*}s^g=VW[`pjS]+.аn]"S){8˞cޞ(q{*gp}lϊGf"^<*6,YkFќ0ABQc` #@N!s+ V> L5{,[SY=u a+GXr`x{RzZk XbYiͭDWZv=!1\%\5-=<# au%XS8?L2QtPZJ*#/x+^ꏯft9((J;7X\kqTjҗj <2eCRϮn]drTIѵLQ qq+'~oPK |ZHKptestopenfilegdb.gdb/gdbUT aVaVux ޭPK |ZHfD^'/`8 ^6{kJmrUGNfPK|ZHݦr((testopenfilegdb.gdb/a00000005.gdbindexesUT aVaVux ca``b7x NbbHeHf(a10@1兀ؙ!/20T2Y N@V(BT21$ FK0!(Wea2&[!7r0[Wј旙߿?:A<<9o&VR.jpH߾KHbq$jy|[f;?dJף栲/iJO'#EfHHC(W4[zfV4T[/PK |ZHt:!testopenfilegdb.gdb/a00000029.spxUT aVaVux ر D XX:8jF5`p#\$h+g=,oij{v:?PK |ZHt:!testopenfilegdb.gdb/a0000002c.spxUT aVaVux ر D XX:8jF5`p#\$h+g=,oij{v:?PK |ZHыmd&testopenfilegdb.gdb/a00000024.gdbtableUT aVaVux cf```/@R gL X<\ؕ݁,wg`h%(+!ц  &@P_J{M  TRM19g bF`y= m 3Bc 2u& umC*13d2$3dM6RTuo*C:T=B!`Ah 3 0?=fwv@ÖlgKI0b( %4PZLPA'/`8 n6{k)g'p /pag>b :'noXp,N, 3oiPK |ZHnb- &testopenfilegdb.gdb/a00000003.gdbtablxUT aVaVux  X]yL*dFDld3uV95gګ\PK |ZHpzBt(testopenfilegdb.gdb/a00000017.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZH& &testopenfilegdb.gdb/a00000029.gdbtablxUT aVaVux  Uoz6! L3۬V PK |ZH1*3(testopenfilegdb.gdb/a00000009.idx_id.atxUT aVaVux  C/KA  Hn{%w  PK |ZHpzBt(testopenfilegdb.gdb/a00000015.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHpzBt(testopenfilegdb.gdb/a00000018.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZH+ H!testopenfilegdb.gdb/a0000000e.spxUT aVaVux 1 DD!e5BJπJҥ!vW\y kH뙍r=9x_/PK |ZH& &testopenfilegdb.gdb/a0000002b.gdbtablxUT aVaVux  Uoz6! L3۬V PK |ZHpzBt(testopenfilegdb.gdb/a0000001b.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK|ZH`34testopenfilegdb.gdb/a00000005.CatItemTypesByUUID.atxUT aVaVux XI+7 <ʎ$R$R$!&P ,UE~z  x|~~>>>>>~~uճ6) C6DU侴$}g5hU)qĻiIRir~=p}7&W6E|=GE{;w1kQ_#xڈ2|T(q\yZddt1*ZD&Ƣ J 8sSD_gեs8Zp]VD1VXD_uhIvYX`u!.as>riWUh/aO䵠6rh {2vč~x],N2jp n#+cM i/d)S+RC}Yƪ[8uu]wu]wϿſPK |ZHI~2 &testopenfilegdb.gdb/a0000000a.gdbtablxUT aVaVux  2hT,wݧy垞j~PK |ZH0#!testopenfilegdb.gdb/a00000019.spxUT aVaVux ȱ @1~, cd(urPK |ZH\`8testopenfilegdb.gdb/a00000006.CatRelsByDestinationID.atxUT aVaVux X׎e9ٜs ~4T}˳߰HutS2P}xxxxxxx xx x x| ||| |X KY4:-Wwٞ-DP[<-&Ok3Lg[ U>'.,Ӭ GRY+v,-+${XhRiխ֌!܅FF9}x,;q)yBG[ZfdM'uSڳ=ck5.kr:@`iPo mejiA0. GGI<"ȍR՜,O}1kB/=;jBzc⍣N4e BhacP C;^ z&nNTNYيDgq+]3h4s/۴kRDddKfcEC/:Jv9su*(a}Ԓf& ּʏIQZ?&J`|NX^k.hT&,nNfVa;Fё1'u \8ԋJ~smrT͖c6W} %4k)vmP6/nq͊T˸g-ڶl`== yQ9k[ӣ62rk>/7`̾W岂3mӜ v3G"tY]17L,^j07*ʠ>nEXz*z50!VkfvLHk>Ro;)G(p빪 MtP=p՞'U`MHlҹv7 wx{8[N=qLKmz2aIaSэ&9999/PK |ZH8Gp(testopenfilegdb.gdb/a0000001c.gdbindexesUT aVaVux cb``b7x vbbpepfa10@1A ) @E 9@&bb8PK |ZHةE!testopenfilegdb.gdb/a00000018.spxUT aVaVux  0DщFO@KIM&? l$j[^noqzh5/{M+PK |ZHl5 &testopenfilegdb.gdb/a00000015.gdbtablxUT aVaVux  A3ťGt-QE4#~GDg|=̬uPK |ZHK;4&testopenfilegdb.gdb/a0000000c.gdbtableUT aVaVux RMHTQ޻M{Bԙyi?OЄ uHͲm#H(B0@D*n\\h̦0};(R]=+}u,@#я$&c(G 7Ѥ)\'m]  2q$r/ه:FޫDIpQDVs-򭴗ѓI23A}8汄[+Y&gCĿɛ+o/PK |ZHpzBt(testopenfilegdb.gdb/a00000012.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHDA &testopenfilegdb.gdb/a0000001f.gdbtablxUT aVaVux A PDn bX 1ELp̅[k6צښ'gr'Pْ#'~PK |ZH+&testopenfilegdb.gdb/a00000016.gdbtableUT aVaVux RMHTQ޻4ZL BGPgl,MѠ&ԉ4i,#("ZBPACx f6Eƅ0~;5\̽swsOlq_#P9n r5A$%.p0nB dcHiXQuRܽx'Iza^D;ǹr9;X11Yg_Yxu+{LYG(A;1aZb𙺞GL <xG5y\G3\yi :AsbM1 Ql"O؜"X2$'o\g(̫g <"+죠xw[k=kwAٗ [m[kws^i7+ b6BalsR)gT l==m2-VuBVwBhZy/ɊSb7Pe0omцQmцPK|ZHY%<testopenfilegdb.gdb/a00000007.CatRelTypesByBackwardLabel.atxUT aVaVux An0E?-Z|*.RCX(e.1'=䧱ƨCSwTz3BRCOp&BPHKò m_2Q"!dsΖ8Vc*e |hLڊm]RɊ\ WmO9W\y^٫$:h,yc`'Bz?[|w:_5җ˞`}^giߕ7 l8_~VT:ZӋdm0_hѢE NPK |ZHk| t& &testopenfilegdb.gdb/a0000002a.gdbtablxUT aVaVux  SS;۬V PK|ZHZ< &testopenfilegdb.gdb/a00000002.gdbtableUT aVaVux Un05BRѡѩTIti2%4%x'^Gx NJQ{νk6y)>X-Kc6;٣epH(/hQ!BUV])e9:R[ѥ/| b{q!: ɓ7o0Qt俄yXz:f0[ة!3KmefYWc8 ~b5'Q޽ aNꚡl tsOekoPK[=~}ƊJsAe i\R̈hr'U,\"u\N.*cdHj,;E bݿ.TaPUG5y$BV`Fi|_UPLjޯ˞\ ǿA)XfЅ)OțB LXG܈D2z|(J\O PK |ZHlL &testopenfilegdb.gdb/a0000001d.gdbtablxUT aVaVux ˱ 0 Qe6`** ,O%׈()7FwrI#/YA.fv$I$I+}PK|ZHdZ(testopenfilegdb.gdb/a00000007.gdbindexesUT aVaVux ] @EOCE=VgL #-+L~]WȰr:{̺[R س!$a,:RVnH4bL9w.89W%{:5>1;I|"?zm\%3*iV>Y{7cL Z/o\ZQ&CKPK|ZH-YW &testopenfilegdb.gdb/a00000007.gdbtablxUT aVaVux ; @D]_I4c;PLNIAqO27yK!uZ>VvB91)3dN˙q6^PK |ZHFQ z&testopenfilegdb.gdb/a0000000f.gdbtableUT aVaVux ROSQ=w0]ACb1 I!,jcjq`"qR0ӄĭ .`b"r}zo}{W۞\0;ԎC1p p[CF1ҸvcM&-E"tb'3GR#OA>L1^'JaO]FWB7c!X;LK!pwyI'M^#p4sfSq >cca{ 7J]׸rvgy'/l$J'ؑQ\/58sl`9bKb,&ꀜfH }N@͒X|T<.!EMi,K/~Hw i/;O~Gʕ/Z\Cx՛6OGW zBbqrscGUE[ 5/MDw՝>ﻨ@`,L8ԌǛ" ٵPK |ZHv2&testopenfilegdb.gdb/a00000015.gdbtableUT aVaVux RKhSA=y..\HqQjS'5BlH )Ij6b+JAERJ TDR)](h%. y,2ޜs=}O`}9XUePD] 3!E hU1\N`80=m12a%3v+E&{,4B8C+ < J;ς! gԌS=&;"iUo`0sdnWɳj9}-ױƑT9?X췫;hoDo-ppDQ1X.B6/g0Dy-^ M+ 4fxG]-<Ӹ sؤ i$0ɡ6DDt _?mc!yz$6tK S{ҊT^RP?l>Hz ygo_<$~b}tjˋ_ZsM#c]rownw韑H~nk)=YluR:jt:[ZW7|FWh wPK |ZHߥc"-testopenfilegdb.gdb/a0000000a.idx_nullint.atxUT aVaVux  @A+Y<W9PK |ZHpzBt(testopenfilegdb.gdb/a0000002a.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHOE#2 &testopenfilegdb.gdb/a00000012.gdbtablxUT aVaVux  2 @NhT,wݧ==7kȭ T6PK|ZHӰ 6(testopenfilegdb.gdb/a00000004.gdbindexesUT aVaVux u @F`d!tcvAB7>}[.gYfNd8q On\8*&Ok([.SR|l7:Ysԛ#k ;zRF*16xb˨Ciɵv?OPK |ZH9IF)testopenfilegdb.gdb/a0000000a.idx_str.atxUT aVaVux ػ =،X-b J;]ʭ-I`dn~JSTM_M}/ PK|ZH3 )&testopenfilegdb.gdb/a00000005.gdbtableUT aVaVux cf``P8 fe@lZɳ ß!!!!%!Rc `Hd(ad(a,~@\{ d]]Wݩ{m hų$5Wȷ|*UĵYe5礤i|0~ju#(8(9y4v=ژ^%$8DZߪ^fI9|Q\]/sHfP]+&ysh}0]cRqIQbrIHbRN1Plۢqn7G1]PPjNbIf~^qFfsNbqPgaq;N,;kwKM,)-JUz'x論q=TS@#螚ZRZR_ AeioUKxuqWs8 HH9 nI5zO_nf~B!Լpɀ(L_UWy{&C촭%S/ -'"2.(ˮ{ȮkwS'bļt`NBN۬Goa42_krOIMQK)iPK |ZH{+B(testopenfilegdb.gdb/a0000001e.gdbindexesUT aVaVux cd``b7x vbbpepfa10@1PK |ZH0#!testopenfilegdb.gdb/a0000001d.spxUT aVaVux ȱ @1~, cd(urPK |ZHO &testopenfilegdb.gdb/a00000006.gdbtableUT aVaVux u 4[𯌥)[h̐z!3=d Ed #bTJDeh敲xixP=7y|ιw=wU LUTE͞ziO iP0BQ"Cb&b e1|GTЩ AV w*pAadIPe~ Ej}9:Y_*4P^]=DQMj|a d{tU4Oe(//V WsL *¸n $ m!WZz][3|2<]o)C%Vjm@])7&Kꂁ][Js.vsHp(n&py5*n-o Anp6-btH, vcP\X[)t5 H1j<;~1#Mt@x9 Ж?6O_N.BxA;U۩0CFheH sEbxb,". ںs^¡č+ZqYYlj¢3,{p(sVsAռq1{\Mx/d[dH]C#ԉ9H)O֗bª%3eԠ#Ъ-EͿ굃CVN鮊o!?A_\ ywdtI8ݰ!&OE!`P (S>+eJjb{ڄ.B(l+50λu{ҟ\~¾cݐz7H4Spг:KF6*$cPjpVe-Y^&;rG5i_m#;j=53꘏a5VKV/v|o\O FI\#;ݸnphxEMهNy/:4h j{gyV …S6w |hӧf bD;^FGh3ZxBv_CmlCx ÷Y~X u|NP,=RxDaPÆE^̺p;1߳4h?y]{ [)[$+"9 Mi['l_ RkA4j41qWBph(AH=͝?3=6:FD]f1CY K$_Fka^ {־_hz hU|BêdA RWe6cy)Y-p%J=W/rmMλ0.& q1pHL˥ Mha;p`(vޱ(^WvoK9OݝűV"8t-ZOqBۜ퉌_'߽  cwEMrigRY:A+πPu߮5oZV)=wrz)kPK |ZH5 &testopenfilegdb.gdb/a0000000e.gdbtablxUT aVaVux  A#ťG9t-QE4#~GDgʼ=*X11Yg_Yxu+{LYG(A;1aZb𙺞GL <xG5y\G3\yi :AsbM1 Ql"O؜"X2$'o\g(̫g <"+죠xw[k=kwAٗ [m[kws^i7+ b6BalsR)gT l==m2-VuBVwBhZy/ɊSb7Pe0omцQmцPK |ZH2W*testopenfilegdb.gdb/a0000000a.idx_guid.atxUT aVaVux ع 05G+d+M!zg D0Oș#[D$%Ԗ=:Uݴ]?hYu5K_OqWw_PK |ZHpzBt(testopenfilegdb.gdb/a00000029.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZH0#!testopenfilegdb.gdb/a0000001b.spxUT aVaVux ȱ @1~, cd(urPK |ZHlM!testopenfilegdb.gdb/a0000000d.spxUT aVaVux c```aF fbf fbV F(``LD@ GchQ0 F(`FhyPK |ZH'2!testopenfilegdb.gdb/a00000011.spxUT aVaVux  DD,ʅ` {/l|Zիz;pڿ/PK |ZHpzBt(testopenfilegdb.gdb/a0000001a.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHlM!testopenfilegdb.gdb/a00000013.spxUT aVaVux c```aF fbf fbV F(``LD@ GchQ0 F(`FhyPK |ZH5 &testopenfilegdb.gdb/a00000018.gdbtablxUT aVaVux  D3bR%fIyUx [#d4Ys=D9m PK|ZHA&testopenfilegdb.gdb/a00000009.gdbtableUT aVaVux cf```;@ʀ3 g1x8\B<\f01e2YXJr32$2a&CP i`ML@>KC*X3P6h0H.F %l+spBV$@+8X YŎ}A~ +?{-BKv yPf"gև{B&aV}mag"3% 1Q8fB]Xe(PK |ZH0#!testopenfilegdb.gdb/a00000020.spxUT aVaVux ȱ @1~, cd(urPK|ZH0#!testopenfilegdb.gdb/a00000004.spxUT aVaVux ȱ @1~, cd(urPK |ZHt:!testopenfilegdb.gdb/a00000024.spxUT aVaVux ر D XX:8jF5`p#\$h+g=,oij{v:?PK |ZHpzBt(testopenfilegdb.gdb/a0000001d.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHpzBt(testopenfilegdb.gdb/a00000014.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHѦm&testopenfilegdb.gdb/a0000002a.gdbtableUT aVaVux uQ=KBQ~WACmN "~ᒖ& R)} -DA84PCRBBRzιGs}{{uOzkb⨊EJ[` i0 0Z^Q"c@'"|3ziΑ%xaG n漲"1%n'LP=n"vUKeTϪ=}ᓽE_qs>0[Wј旙߿?:A<<9o&VR.jpH߾KHbq$jy|[f;?dJף栲/iJO'#EfHHC(W4[zfV4T[/PK |ZH+&testopenfilegdb.gdb/a00000017.gdbtableUT aVaVux RMHTQ޻4ZL BGPgl,MѠ&ԉ4i,#("ZBPACx f6Eƅ0~;5\̽swsOlq_#P9n r5A$%.p0nB dcHiXQuRܽx'Iza^D;ǹr9;[+Y&gCĿɛ+o/PK |ZH&(testopenfilegdb.gdb/a0000000a.gdbindexesUT aVaVux m `E^ꦠC"(+mqlO F,f&zQ;z+YJv,l+a_oA۹.\ @݂DQρTτy Sb#ܩᬦn%2o;?ִ߿V٦sboQVPK |ZHdc d&testopenfilegdb.gdb/a00000018.gdbtableUT aVaVux SMHaؖBaCc6CM$dirF!:PARt^$uP!PËa}KaЭ=y;߄bq[FGzhE \vF]hGq֎q~4$BƓ *mAAn!J`#סc-d$}d&gQ7-dp %sd%>a7!sN3r+ZОt3[eze˪υwHυ@(]|w p  ©)J)4F;YGp I\PQr(ٱ8%\P&I,zi~d̵!܄VsXWs$'p/tOr&d*$lyúO[sXяE8La}e_s0ퟛ,ܖ%ۓM cp7} ȯ{y* wT6^VH/WEzJ_PK |ZH+ H!testopenfilegdb.gdb/a0000000f.spxUT aVaVux 1 DD!e5BJπJҥ!vW\y kH뙍r=9x_/PK|ZHO;testopenfilegdb.gdb/a00000007.CatRelTypesByForwardLabel.atxUT aVaVux Mn0B[~໴E. T.zqCe<"m)p ?&m~ϸ{:WD[ވx]"_j }0J!t&;,?*d~ PK |ZHc.rB9.testopenfilegdb.gdb/a0000000a.idx_smallint.atxUT aVaVux ر Du/_DM-l#\IԴY#%RS0v۹`PK |ZHL5&testopenfilegdb.gdb/a0000000a.gdbtableUT aVaVux RKK[A=ut!2`RK%.R8  +pf&*{j𻌪LvF3л!|ԋA@ ѿ5X$aPl CY8^ 'M(:Oqb$ ׂj-`Z2LQS:XSUcVMc$3ŝMzT4Okˬ2NSm˕I\QU6sBfuXCMbu=WQ\bjPdPNPGMyܺ:.e ׶֖1Mm/[)Sa{:eO1uO]#iid2Lh>]/+x7IxއB`>/=8KI_gɡi|I~O{&!lxׅeˏI)u1ʓ"{$*b3`-J w;P.&4ϹlR;d2x{>gex%w GzY?gI|L^ϹS3_,|_(]G—'Y<򿒿Οԩg~ӓǙw&d2^ $`U+PK |ZHo7)2 &testopenfilegdb.gdb/a0000000f.gdbtablxUT aVaVux  2@hT,wݧ==7kȭ T6PK |ZH/N1 &testopenfilegdb.gdb/a00000019.gdbtablxUT aVaVux  S C; ;0#"ZvϽ#7kvj/[PK |ZHЌ-i&testopenfilegdb.gdb/a00000004.gdbtableUT aVaVux  t՝'??I ,=IzږDd[d K&`{l IHI[$JeY. ,p=nRHJ<]X($BR HyH3zqlŏ9fϝ_s~33YH~cRFY..Wf0ɬgdX1603UUL2ktĄIS@je|L_QbI}|LT.R#AJ5/(> K^9-LS cfeB| xhtɀLcOXH\/y#Ybf3M_ФFVYR_Xb"d?ވ͒H܍ 5)(p 42Ӛ+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,yHpAпWhßk{玜6NeE*JӏB-yPuz~TtQʦ[~~S})Ċe`+st%aAz=w(VC|k M'hۜ4CJ;gyӂ(?57@!{Z j?;oݯ.~,EғE.(&Tϰ!V<x5,1\OH\~wF{/<崀Kڳ9X,)xě,404\HK0*E1 !E͇w[aX?Ax4 KEJsx7tnScz[v;s(Vv{^oI+o|)ģBzk5x8g\w Xq! Uʹ`b3 k xeIN0,OA)}a;Ȋ *˛U6=ZmոQs՗?ҹ_fqv{o?of#:;!_cN,1X:st֠PK |ZHpzBt(testopenfilegdb.gdb/a0000000f.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHpzBt(testopenfilegdb.gdb/a00000028.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK|ZH)!*(testopenfilegdb.gdb/a00000003.gdbindexesUT aVaVux cd```b7xO 3I& PK |ZHt:!testopenfilegdb.gdb/a0000002b.spxUT aVaVux ر D XX:8jF5`p#\$h+g=,oij{v:?PK |ZH(T 2 &testopenfilegdb.gdb/a00000011.gdbtablxUT aVaVux  2 C hT,wݧy垞j~PK |ZHA ^Ah(testopenfilegdb.gdb/a00000009.gdbindexesUT aVaVux cb``b7x vbbpepfa10@1ـ8!D3001#PK |ZH1*3(testopenfilegdb.gdb/a0000000a.idx_id.atxUT aVaVux  C/KA  Hn{%w  PK|ZH˖Pn(testopenfilegdb.gdb/a00000001.gdbindexesUT aVaVux cb```b7xO 3I& qC"CCC*C1C% A10tpЬpW  M8PK |ZH& &testopenfilegdb.gdb/a00000025.gdbtablxUT aVaVux  Uoz6! L3۬V PK |ZHi5c&testopenfilegdb.gdb/a0000001e.gdbtableUT aVaVux cf```be( PZJY@ Fgpbbpepfadpa``cav{,PK |ZHq%l*testopenfilegdb.gdb/a00000004.FDO_UUID.atxUT aVaVux XGn-6 tzdE@"HQ2|"Go,3C_/ +M;]O U'u3{KmGWCs75c=#S-[= |t]X"^ёtl VvaNeuedkWM*67Qw 5PٸQfN_*mN~޸ yDm"t8XT&ևݜFAFͬ Ʀ#S9u#0;I]D"|]Zh`HΘM/#j|V3Z5M6\[fEeܳ\[H{b IJ=o_1*V2vq>N5=m3M!67^ٓ1^g δMs*q`Cw ͂ !7ga9z ?{ 9BiYT5YbinaGԮi-ç՛#^PW4ɉɠǠ0gPy}ք6+-nw aG2b'^txoaO&2,1s=s=s=s=W_PK |ZHBL\d&testopenfilegdb.gdb/a00000029.gdbtableUT aVaVux cf```'@R g, L   J@?;3C0C4dhCK  PgC(/X U@=ŦΌ3z @1#61R :@fM!22&Me7!h c {AnCmecRΞus~@;;?aKr%ߤ{̀|N 8& g@to@~ ]→S^a w. +d @`pN s!fPK |ZHlM!testopenfilegdb.gdb/a00000012.spxUT aVaVux c```aF fbf fbV F(``LD@ GchQ0 F(`FhyPK |ZHS&testopenfilegdb.gdb/a0000000e.gdbtableUT aVaVux RMHTQ NEh!.%l&4arpF"dlflBP=ZU6hAb\!f 7Z-4fB{ȝ9|;yKz ڗq( +A#k 7@k#h8nҒF H`ILJS}#ԽN׉(. +lG"*NĻwdn5TOng#qrRQ ?cR¬c-xUmo kuq*~?;CPpFr"WGOg_#=8DI1$7ZI(85%Z !fflnahlgcdigdjnddljf 4(55<39CI@ V'3hnj:P,dhnbjldidjhiib : L79Y? o.~ݟ/&Q0?=KУty9cxQj'# 3g3'] sK]CC#]GGgG]g7Gccg#Z}"h얡-PK |ZHpzBt(testopenfilegdb.gdb/a00000011.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHKۅ!testopenfilegdb.gdb/a0000001f.spxUT aVaVux 1 0Nvty ?$OݧZ Q0r 툈3>$+}c;{:{ջ1ܘ1Jnqw9 _GOI?'/| _E_>/| c1~PK |ZHK.2 &testopenfilegdb.gdb/a00000013.gdbtablxUT aVaVux  2))@>hT,wݧ==7kȭ T6PK |ZHpzBt(testopenfilegdb.gdb/a0000002d.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHzX&testopenfilegdb.gdb/a00000004.freelistUT aVaVux ܱjAohL*b"I+>@RRYh VV@Ao,Om~? [Ln/"~~ /gxy-0btxa23/Ac9 {e;W;O϶_/9g@%үBSW_̰]vfxo`M_Nհl7.jQv}Y0!owWO2F|vY`b{,g= ۥ׾+M~r_0g35_sʽ2BA~yePK|ZH>(testopenfilegdb.gdb/a00000006.gdbindexesUT aVaVux m] AFؔ+%$uׯ3&vg3>4}`( rVdυ#^,`,Uqͤ][gT\=)tMR2əZj>MKW|{"q X%6MPK |ZHpzBt(testopenfilegdb.gdb/a00000024.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHH )+&testopenfilegdb.gdb/a0000001f.gdbtableUT aVaVux J@Oڽ!H!ZMOWayB|utBOI3ON=_n@{KLUy1vᡏm ZX.6ɷe-7᥷nMN..A 8~/ꡓz|xo3Bg0j~?{Ɯ]yZKt+%Ud+= ?&qVWX\S`qlBn@w1_*R&Ԝ@UFrhyEr]&ԼhBUFl_PK |ZHpzBt(testopenfilegdb.gdb/a0000000e.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHpzBt(testopenfilegdb.gdb/a0000002b.gdbindexesUT aVaVux eA 00Зw [oB v8yb'8(<`Mj+~ޙOCO-b4PK |ZHn(W5 &testopenfilegdb.gdb/a00000017.gdbtablxUT aVaVux  AH!,2 -QE4#~GDgʼ=*+ܬ=#_hPK|ZHA<testopenfilegdb.gdb/a00000005.CatItemTypesByParentTypeID.atxUT aVaVux عj0aO}*-U)K/5̻$4!EH79`c3 47u؀M؂m؁]؃}8C8c8S8k[{xX. ֆksh1wRsjHU q $@ܚl!W}UDZRn4IF٩OWf̵$UعHגk3{ ^6bXB̜ɖIK]UNȳ(ri*6$~cZM*NH[ēHBYI[/z^o?/ PK |ZH0`3&testopenfilegdb.gdb/a00000010.gdbtableUT aVaVux RMhAvgg74@.{6?&5Blh IkDS< xR"=EV ۓAh+=`A2C޼}od]Z}<*o-a8i5 ip7SFщH0ӆ>V1fQ}=An;80jlGb:N<ijwbn053T4 ZMGp|pV}׽U_uNŃs^\ZWSv`gsRfϞj{C6=w0'y i'a s hT,wݧ==7kȭ T6PK |ZH"HD7&testopenfilegdb.gdb/a0000001d.gdbtableUT aVaVux S;N@}8_1 @ " D !DKK Q7p.yגH)l(̳g "} 0'Cᝦ=FlB` 1LBBH`A"@DZgEM̌XF-aJaP#eMx8=^ӨZBd=FYKpm^.ps@s }E3bN)4dQ٦MK`"5.VV,/p`f;+ ;Wl,x; be{{;7Ria0(ذ;zA )̡0COlC?ܙ oJ}#J ^Fe\Pջi?3 <̓L=v<~E(&) >DzEFHi\UsܭmOZp_FƏϞxlp&VSfZuz'8181ump&aw`C!Nk"1uƦe5CbS16J2J$',OVg(a6Ȋ *w6ɌbqXF ;ENgϯHi:{.޷p',8tzkҙZEPK |ZHAtestopenfilegdb.gdb/UTaVux PK |ZH0#!Ntestopenfilegdb.gdb/a0000001a.spxUTaVux PK |ZHlM!testopenfilegdb.gdb/a00000014.spxUTaVux PK|ZHڔ3ttestopenfilegdb.gdb/a00000007.CatRelTypesByUUID.atxUTaVux PK|ZHaw(704testopenfilegdb.gdb/a00000005.CatItemTypesByName.atxUTaVux PK |ZH+ H!testopenfilegdb.gdb/a00000015.spxUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a00000027.gdbindexesUTaVux PK |ZH0 & testopenfilegdb.gdb/a0000001e.gdbtablxUTaVux PK |ZHt:!= testopenfilegdb.gdb/a00000025.spxUTaVux PK |ZH=u`6+ testopenfilegdb.gdb/a0000000a.idx_float.atxUTaVux PK |ZHs׶'g&m testopenfilegdb.gdb/a00000012.gdbtableUTaVux PK |ZHoH & testopenfilegdb.gdb/a00000004.gdbtablxUTaVux PK|ZH=I& testopenfilegdb.gdb/a00000007.gdbtableUTaVux PK |ZH\55 &testopenfilegdb.gdb/a00000010.gdbtablxUTaVux PK |ZHɐ &testopenfilegdb.gdb/a00000001.gdbtablxUTaVux PK |ZHk| t& &testopenfilegdb.gdb/a00000026.gdbtablxUTaVux PK|ZH¢ &testopenfilegdb.gdb/a00000002.gdbtablxUTaVux PK |ZHb*testopenfilegdb.gdb/a00000006.FDO_UUID.atxUTaVux PK|ZH"B| & testopenfilegdb.gdb/a00000005.gdbtablxUTaVux PK |ZH*08testopenfilegdb.gdb/a00000004.CatItemsByPhysicalName.atxUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a00000010.gdbindexesUTaVux PK |ZH{C(ne&testopenfilegdb.gdb/a00000028.gdbtableUTaVux PK |ZHbk:&v testopenfilegdb.gdb/a00000011.gdbtableUTaVux PK |ZH &"testopenfilegdb.gdb/a00000020.gdbtablxUTaVux PK |ZH0.o"&>#testopenfilegdb.gdb/a0000002d.gdbtableUTaVux PK |ZHQ/$testopenfilegdb.gdb/a00000006.CatRelsByType.atxUTaVux PK |ZHn(W5 &%testopenfilegdb.gdb/a00000016.gdbtablxUTaVux PK |ZHYJΚ0*N&testopenfilegdb.gdb/a0000001c.idx_real.atxUTaVux PK |ZH{C(ne&L)testopenfilegdb.gdb/a00000026.gdbtableUTaVux PK |ZH9 &+testopenfilegdb.gdb/a0000001c.gdbtablxUTaVux PK |ZH& &.testopenfilegdb.gdb/a00000022.gdbtablxUTaVux PK |ZHJD&.testopenfilegdb.gdb/a0000001a.gdbtableUTaVux PK |ZH/N1 &0testopenfilegdb.gdb/a0000001b.gdbtablxUTaVux PK |ZHpzBt(V1testopenfilegdb.gdb/a00000016.gdbindexesUTaVux PK|ZHBPT?1testopenfilegdb.gdb/a00000007.CatRelTypesByOriginItemTypeID.atxUTaVux PK |ZHk| t& &3testopenfilegdb.gdb/a00000024.gdbtablxUTaVux PK |ZHm:Q0M4testopenfilegdb.gdb/a00000004.CatItemsByType.atxUTaVux PK |ZHKp5testopenfilegdb.gdb/gdbUTaVux PK |ZHtestopenfilegdb.gdb/a0000002c.spxUTaVux PK |ZHыmd&>testopenfilegdb.gdb/a00000024.gdbtableUTaVux PK |ZHnb- &r@testopenfilegdb.gdb/a00000003.gdbtablxUTaVux PK |ZHpzBt(@testopenfilegdb.gdb/a00000017.gdbindexesUTaVux PK |ZH& &Atestopenfilegdb.gdb/a00000029.gdbtablxUTaVux PK |ZH1*3()Btestopenfilegdb.gdb/a00000009.idx_id.atxUTaVux PK |ZHpzBt(Btestopenfilegdb.gdb/a00000015.gdbindexesUTaVux PK |ZHpzBt(bCtestopenfilegdb.gdb/a00000018.gdbindexesUTaVux PK |ZH+ H!Dtestopenfilegdb.gdb/a0000000e.spxUTaVux PK |ZH& &Dtestopenfilegdb.gdb/a0000002b.gdbtablxUTaVux PK |ZHpzBt(/Etestopenfilegdb.gdb/a0000001b.gdbindexesUTaVux PK|ZH`34Etestopenfilegdb.gdb/a00000005.CatItemTypesByUUID.atxUTaVux PK |ZHI~2 &tItestopenfilegdb.gdb/a0000000a.gdbtablxUTaVux PK |ZH0#!Jtestopenfilegdb.gdb/a00000019.spxUTaVux PK |ZH\`8Jtestopenfilegdb.gdb/a00000006.CatRelsByDestinationID.atxUTaVux PK |ZH8Gp(Ntestopenfilegdb.gdb/a0000001c.gdbindexesUTaVux PK |ZHةE!;Otestopenfilegdb.gdb/a00000018.spxUTaVux PK |ZHl5 &Otestopenfilegdb.gdb/a00000015.gdbtablxUTaVux PK |ZHK;4&pPtestopenfilegdb.gdb/a0000000c.gdbtableUTaVux PK |ZHpzBt(Rtestopenfilegdb.gdb/a00000012.gdbindexesUTaVux PK |ZHDA &Stestopenfilegdb.gdb/a0000001f.gdbtablxUTaVux PK |ZH+&(Ttestopenfilegdb.gdb/a00000016.gdbtableUTaVux PK |ZHi2'l&Vtestopenfilegdb.gdb/a00000013.gdbtableUTaVux PK|ZHY%<)Ytestopenfilegdb.gdb/a00000007.CatRelTypesByBackwardLabel.atxUTaVux PK |ZHk| t& &Ztestopenfilegdb.gdb/a0000002a.gdbtablxUTaVux PK|ZHZ< &J[testopenfilegdb.gdb/a00000002.gdbtableUTaVux PK |ZHlL &9^testopenfilegdb.gdb/a0000001d.gdbtablxUTaVux PK|ZHdZ(^testopenfilegdb.gdb/a00000007.gdbindexesUTaVux PK|ZH-YW &_testopenfilegdb.gdb/a00000007.gdbtablxUTaVux PK |ZHFQ z&`testopenfilegdb.gdb/a0000000f.gdbtableUTaVux PK |ZH{ &ctestopenfilegdb.gdb/a00000006.gdbtablxUTaVux PK |ZHpzBt(ctestopenfilegdb.gdb/a0000000c.gdbindexesUTaVux PK |ZHˊD+dtestopenfilegdb.gdb/a0000000a.idx_adate.atxUTaVux PK |ZH<-B!>etestopenfilegdb.gdb/a00000010.spxUTaVux PK |ZHz&etestopenfilegdb.gdb/a0000001c.gdbtableUTaVux PK |ZHv2&ftestopenfilegdb.gdb/a00000015.gdbtableUTaVux PK |ZHߥc"-Gitestopenfilegdb.gdb/a0000000a.idx_nullint.atxUTaVux PK |ZHpzBt(itestopenfilegdb.gdb/a0000002a.gdbindexesUTaVux PK |ZHOE#2 &tjtestopenfilegdb.gdb/a00000012.gdbtablxUTaVux PK|ZHӰ 6(ktestopenfilegdb.gdb/a00000004.gdbindexesUTaVux PK |ZH9IF)ktestopenfilegdb.gdb/a0000000a.idx_str.atxUTaVux PK|ZH3 )&ltestopenfilegdb.gdb/a00000005.gdbtableUTaVux PK |ZH{+B(qtestopenfilegdb.gdb/a0000001e.gdbindexesUTaVux PK |ZH0#!qtestopenfilegdb.gdb/a0000001d.spxUTaVux PK |ZHO &(rtestopenfilegdb.gdb/a00000006.gdbtableUTaVux PK |ZH5 &xtestopenfilegdb.gdb/a0000000e.gdbtablxUTaVux PK |ZHpzBt(1ytestopenfilegdb.gdb/a00000021.gdbindexesUTaVux PK |ZH'2!ytestopenfilegdb.gdb/a0000000a.spxUTaVux PK |ZHpzBt(bztestopenfilegdb.gdb/a00000022.gdbindexesUTaVux PK |ZH+ H!{testopenfilegdb.gdb/a00000016.spxUTaVux PK |ZHt:!{testopenfilegdb.gdb/a00000028.spxUTaVux PK |ZHpzBt(>|testopenfilegdb.gdb/a00000025.gdbindexesUTaVux PK |ZHi2'l&|testopenfilegdb.gdb/a00000014.gdbtableUTaVux PK |ZH2W*itestopenfilegdb.gdb/a0000000a.idx_guid.atxUTaVux PK |ZHpzBt($testopenfilegdb.gdb/a00000029.gdbindexesUTaVux PK |ZH0#!Ȁtestopenfilegdb.gdb/a0000001b.spxUTaVux PK |ZHlM!Ftestopenfilegdb.gdb/a0000000d.spxUTaVux PK |ZH'2!testopenfilegdb.gdb/a00000011.spxUTaVux PK |ZHpzBt({testopenfilegdb.gdb/a0000001a.gdbindexesUTaVux PK |ZHlM!testopenfilegdb.gdb/a00000013.spxUTaVux PK |ZH5 &ǃtestopenfilegdb.gdb/a00000018.gdbtablxUTaVux PK|ZHA&\testopenfilegdb.gdb/a00000009.gdbtableUTaVux PK |ZH0#!ʅtestopenfilegdb.gdb/a00000020.spxUTaVux PK|ZH0#!Htestopenfilegdb.gdb/a00000004.spxUTaVux PK |ZHt:!Ɔtestopenfilegdb.gdb/a00000024.spxUTaVux PK |ZHpzBt([testopenfilegdb.gdb/a0000001d.gdbindexesUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a00000014.gdbindexesUTaVux PK |ZHѦm&testopenfilegdb.gdb/a0000002a.gdbtableUTaVux PK |ZH+&ptestopenfilegdb.gdb/a00000017.gdbtableUTaVux PK |ZHϩ(!testopenfilegdb.gdb/a00000021.spxUTaVux PK |ZH1cL&mtestopenfilegdb.gdb/a00000023.gdbtableUTaVux PK |ZH& &0testopenfilegdb.gdb/a00000023.gdbtablxUTaVux PK |ZHK;4&testopenfilegdb.gdb/a0000000d.gdbtableUTaVux PK |ZH&()testopenfilegdb.gdb/a0000000a.gdbindexesUTaVux PK |ZHdc d&=testopenfilegdb.gdb/a00000018.gdbtableUTaVux PK |ZH+ H!testopenfilegdb.gdb/a0000000f.spxUTaVux PK|ZHO;testopenfilegdb.gdb/a00000007.CatRelTypesByForwardLabel.atxUTaVux PK|ZH testopenfilegdb.gdb/timestampsUTaVux PK |ZHœަ3ltestopenfilegdb.gdb/a00000006.CatRelsByOriginID.atxUTaVux PK |ZH(testopenfilegdb.gdb/a00000006.gdbindexesUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a00000024.gdbindexesUTaVux PK |ZHH )+&testopenfilegdb.gdb/a0000001f.gdbtableUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a0000000e.gdbindexesUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a0000002b.gdbindexesUTaVux PK |ZHn(W5 &gtestopenfilegdb.gdb/a00000017.gdbtablxUTaVux PK |ZHB-&testopenfilegdb.gdb/a00000022.gdbtableUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a00000019.gdbindexesUTaVux PK |ZHt:!Btestopenfilegdb.gdb/a00000023.spxUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a00000020.gdbindexesUTaVux PK |ZHt:!{testopenfilegdb.gdb/a0000002a.spxUTaVux PK |ZHw~ 6 &testopenfilegdb.gdb/a00000009.gdbtablxUTaVux PK |ZH9H2 &testopenfilegdb.gdb/a0000000b.gdbtablxUTaVux PK|ZHA<8testopenfilegdb.gdb/a00000005.CatItemTypesByParentTypeID.atxUTaVux PK |ZH0`3&testopenfilegdb.gdb/a00000010.gdbtableUTaVux PK |ZHV/&Ttestopenfilegdb.gdb/a0000000b.gdbtableUTaVux PK |ZHk| t& &testopenfilegdb.gdb/a00000028.gdbtablxUTaVux PK |ZHK.2 &Mtestopenfilegdb.gdb/a00000014.gdbtablxUTaVux PK |ZH"HD7&testopenfilegdb.gdb/a0000001d.gdbtableUTaVux PK|ZHJ'3testopenfilegdb.gdb/a00000007.CatRelTypesByName.atxUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a0000001f.gdbindexesUTaVux PK |ZHpzBt(testopenfilegdb.gdb/a0000002c.gdbindexesUTaVux PK |ZH KT4)_testopenfilegdb.gdb/a0000000a.idx_int.atxUTaVux PK |ZH0#!testopenfilegdb.gdb/a0000002d.spxUTaVux PK |ZHJD&ttestopenfilegdb.gdb/a00000019.gdbtableUTaVux PKTgdalautotest-3.1.2/ogr/data/drawing.pdf0000664000175000017500000000256013701057753016534 0ustar eveneven%PDF-1.4 %äüöß 2 0 obj <> stream xRJ@ )rCL2O x[=E]+}}δ(xdhi1RK*S3<^! VPy: ^vFpX77(ȑ rU,Z)Hd9Jr\P٨Qػd!&x ʚb^r(rokkVgd?nutsu:[lTݻV'P&+ޫԋ~vDQ[.E-۽bޔ ҁ endstream endobj 3 0 obj 277 endobj 5 0 obj << >> endobj 6 0 obj <> endobj 1 0 obj <>/Contents 2 0 R>> endobj 4 0 obj <> endobj 7 0 obj <> endobj 8 0 obj < /Creator /Producer /CreationDate(D:20171124211158+01'00')>> endobj xref 0 9 0000000000 65535 f 0000000462 00000 n 0000000019 00000 n 0000000367 00000 n 0000000604 00000 n 0000000387 00000 n 0000000409 00000 n 0000000702 00000 n 0000000785 00000 n trailer < ] /DocChecksum /2EABC22B7C5C99CC14BCC45316306DC0 >> startxref 1013 %%EOF gdalautotest-3.1.2/ogr/data/emptymultipoly.dbf0000664000175000017500000000025113701057753020173 0ustar eveneven_aHFIDN NAMEC< 2 MultiPoly 1 gdalautotest-3.1.2/ogr/data/insert-recursive-pair.dxf0000664000175000017500000000223613701057753021353 0ustar eveneven 0 SECTION 2 TABLES 0 ENDSEC 0 SECTION 2 BLOCKS 0 BLOCK 5 ABC0 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 RecursiveBlock1 70 0 10 0.0 20 0.0 30 0.0 3 RecursiveBlock1 1 0 INSERT 5 ABC1 100 AcDbEntity 100 AcDbBlockReference 8 0 2 RecursiveBlock2 10 0.0 20 0.0 30 0.0 0 ENDBLK 5 ABC2 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 BLOCK 5 DEF0 100 AcDbEntity 8 0 100 AcDbBlockBegin 2 RecursiveBlock2 70 0 10 0.0 20 0.0 30 0.0 3 RecursiveBlock2 1 0 INSERT 5 DEF1 100 AcDbEntity 100 AcDbBlockReference 8 0 2 RecursiveBlock1 10 0.0 20 0.0 30 0.0 0 INSERT 5 DEF2 100 AcDbEntity 100 AcDbBlockReference 8 0 2 RecursiveBlock1 10 0.0 20 0.0 30 0.0 0 POINT 5 DEF3 100 AcDbEntity 100 AcDbPoint 8 0 10 0.0 20 0.0 30 0.0 0 ENDBLK 5 DEF4 100 AcDbEntity 8 0 100 AcDbBlockEnd 0 ENDSEC 0 SECTION 2 ENTITIES 0 INSERT 5 1234 100 AcDbEntity 100 AcDbBlockReference 8 0 2 RecursiveBlock1 10 0.0 20 0.0 30 0.0 0 ENDSEC 0 EOF gdalautotest-3.1.2/ogr/data/emptyshapefilewithsbn.sbx0000664000175000017500000000015413701057753021537 0ustar eveneven' p62gdalautotest-3.1.2/ogr/data/wfs20.xml0000664000175000017500000000701613701060007016054 0ustar eveneven 1 01 3020.0000000000000000 2004 MILFORD 302001.0000000000000000 0130202003 Milford 2 Milford 0 1451 50040 4178397.6250000000000000 10689.3287256000000000 Beaver 325218.003 4250567.050 324469.003 4250572.550 324449.503 4250572.550 323628.003 4250578.550 323628.503 4250991.050 323243.003 4250993.050 322872.003 4250995.550 322875.003 4251797.550 322874.003 4251920.550 323234.003 4251808.050 323249.003 4251803.550 323263.503 4251799.550 323278.503 4251795.550 323293.503 4251792.050 323308.503 4251788.550 323323.503 4251785.050 323339.003 4251782.550 323354.003 4251779.550 323369.003 4251777.550 323384.503 4251775.550 323400.003 4251773.550 323415.003 4251772.050 323430.503 4251770.550 323446.003 4251769.550 323461.503 4251769.050 323476.503 4251768.550 323498.003 4251768.050 323629.003 4251768.550 323629.003 4252187.550 323839.503 4252186.550 323859.503 4252186.550 323944.003 4252186.050 323970.003 4252186.050 324018.003 4252185.550 324018.503 4252205.050 324019.003 4252224.550 324029.503 4252611.550 324063.503 4252611.050 324510.503 4252602.550 324535.503 4252602.050 324582.003 4252601.050 324581.003 4252260.050 324568.003 4252182.550 324739.003 4252181.550 324760.503 4252181.050 325227.503 4252178.050 325284.503 4252176.550 325285.503 4251360.550 326099.003 4251360.050 326085.003 4250552.550 325271.503 4250552.050 325218.003 4250567.050 gdalautotest-3.1.2/ogr/data/gjline.dbf0000664000175000017500000000025113701057753016326 0ustar eveneven_aHFIDN NAMEC< 1 Line 1 gdalautotest-3.1.2/ogr/data/grenada.geojson0000664000175000017500000003117213701057753017376 0ustar eveneven{"features":[{"geometry":{"coordinates":[[[[-61.173214300000005,12.516654800000001],[-61.3827217,12.5301363],[-61.665747100000004,12.5966532],[-61.6661847,12.596],[-61.66814250000001,12.593],[-61.6700247,12.59],[-61.6718337,12.587],[-61.673571700000004,12.584],[-61.6752407,12.581],[-61.6768427,12.578],[-61.678379400000004,12.575000000000001],[-61.6803295,12.571],[-61.6830501,12.565000000000001],[-61.68553430000001,12.559000000000001],[-61.687063699999996,12.555000000000001],[-61.6884946,12.551],[-61.6898391,12.546999999999999],[-61.69209600000001,12.540999999999999],[-61.69413360000001,12.535],[-61.69595870000001,12.529],[-61.697577200000005,12.523],[-61.69899410000001,12.517],[-61.700213700000006,12.511],[-61.7012395,12.505],[-61.7020744,12.499],[-61.702626200000005,12.494],[-61.7033841,12.493],[-61.706211800000005,12.491],[-61.7089415,12.489],[-61.7141311,12.485000000000001],[-61.718995500000005,12.481],[-61.72356890000001,12.477],[-61.727879200000004,12.473],[-61.7319495,12.469000000000001],[-61.73579920000001,12.465000000000002],[-61.74032590000001,12.46],[-61.74373590000001,12.456000000000001],[-61.746971,12.452000000000002],[-61.7500412,12.447999999999999],[-61.75295580000001,12.443999999999999],[-61.753784499999995,12.443],[-61.756858300000005,12.44],[-61.7598054,12.437],[-61.762633400000006,12.434],[-61.76534870000001,12.431],[-61.767957200000005,12.427999999999999],[-61.7704641,12.425],[-61.7728741,12.422],[-61.775191500000005,12.419],[-61.7774201,12.416],[-61.7802595,12.412],[-61.782954800000006,12.408],[-61.78551270000001,12.404],[-61.7873446,12.401],[-61.789675900000006,12.397],[-61.7918847,12.393],[-61.79397550000001,12.389000000000001],[-61.794998400000004,12.388],[-61.79830060000001,12.386000000000001],[-61.8030062,12.383000000000001],[-61.8059936,12.381],[-61.810272399999995,12.378],[-61.8130009,12.376000000000001],[-61.815637599999995,12.374],[-61.8181882,12.372000000000002],[-61.82186339999999,12.369000000000002],[-61.8265048,12.365000000000002],[-61.830876599999996,12.361],[-61.8329692,12.359000000000002],[-61.835999,12.356000000000002],[-61.8413082,12.351],[-61.845319800000006,12.347],[-61.8464439,12.346],[-61.8501187,12.343],[-61.853625699999995,12.34],[-61.85697739999999,12.337],[-61.86122339999999,12.333],[-61.864252900000004,12.33],[-61.8671584,12.327],[-61.8699469,12.324],[-61.872645999999996,12.321],[-61.8754727,12.318],[-61.87906749999999,12.314],[-61.8833,12.309000000000001],[-61.88726319999999,12.304],[-61.88952,12.301],[-61.891690399999995,12.297999999999998],[-61.8937778,12.295],[-61.895785200000006,12.292],[-61.89771530000001,12.289],[-61.899570800000006,12.286],[-61.90251490000001,12.280999999999999],[-61.904753,12.277],[-61.9068719,12.273],[-61.908875900000005,12.269],[-61.911674299999994,12.263],[-61.9134062,12.259],[-61.9150578,12.255],[-61.9179797,12.248999999999999],[-61.920656900000004,12.242999999999999],[-61.92290190000001,12.238999999999999],[-61.925082,12.235],[-61.92666,12.232],[-61.9286637,12.227999999999998],[-61.930556100000004,12.223999999999998],[-61.9332651,12.217999999999998],[-61.936145100000005,12.212],[-61.938782200000006,12.206],[-61.943587599999994,12.193999999999999],[-61.94511500000001,12.19],[-61.9465439,12.186],[-61.9485074,12.18],[-61.95028749999999,12.174],[-61.95186999999999,12.168],[-61.9532519,12.162],[-61.95443739999999,12.156],[-61.954975999999995,12.154],[-61.9570107,12.147999999999998],[-61.9594482,12.139999999999999],[-61.961132600000006,12.133999999999999],[-61.962614,12.127999999999998],[-61.96295200000001,12.126999999999999],[-61.9668105,12.122],[-61.9704259,12.116999999999999],[-61.9738135,12.112],[-61.9769866,12.107],[-61.9799566,12.102],[-61.9827336,12.097],[-61.9853262,12.092],[-61.9882048,12.086],[-61.990875800000005,12.08],[-61.99252880000001,12.076],[-61.994819,12.07],[-61.996888999999996,12.064],[-61.99874590000001,12.058],[-62.000395600000004,12.052000000000001],[-62.0018433,12.046],[-62.0030933,12.04],[-62.003818700000004,12.036],[-62.0047472,12.03],[-62.0052609,12.026],[-62.005875200000006,12.02],[-62.0061812,12.016],[-62.0064861,12.01],[-62.0065868,12.006],[-62.006584499999995,12],[-62.006398100000006,11.994],[-62.0061714,11.99],[-62.0056768,11.984],[-62.0052436,11.98],[-62.004436999999996,11.974],[-62.003794,11.97],[-62.0026693,11.964],[-62.001811399999994,11.96],[-62.0003595,11.954],[-61.999279800000004,11.950000000000001],[-61.9974886,11.943999999999999],[-61.9961776,11.94],[-61.9940313,11.934],[-61.9924772,11.93],[-61.9908218,11.926],[-61.989062399999995,11.922],[-61.9871961,11.918],[-61.984707699999994,11.913],[-61.9825882,11.909],[-61.9803498,11.905000000000001],[-61.9773776,11.9],[-61.9748543,11.896],[-61.972195400000004,11.892000000000001],[-61.9693945,11.888],[-61.9664442,11.884],[-61.9641286,11.881],[-61.9617206,11.878],[-61.959215900000004,11.875000000000002],[-61.9557177,11.871],[-61.9520267,11.867],[-61.9496952,11.864],[-61.94728729999999,11.861],[-61.9430571,11.856000000000002],[-61.93853550000001,11.851],[-61.934690599999996,11.847],[-61.9306255,11.843],[-61.9274208,11.84],[-61.922921800000005,11.836],[-61.9193636,11.833],[-61.9156332,11.83],[-61.911715,11.827],[-61.9075906,11.824],[-61.903238,11.821],[-61.89863020000001,11.818],[-61.8937341,11.815000000000001],[-61.888507499999996,11.812000000000001],[-61.88481339999999,11.81],[-61.8789067,11.807],[-61.87468659999999,11.805000000000001],[-61.870200499999996,11.803],[-61.86540230000001,11.801],[-61.8602301,11.799],[-61.854597299999995,11.796999999999999],[-61.848375600000004,11.795],[-61.84498479999999,11.793999999999999],[-61.8413608,11.793],[-61.8374527,11.792],[-61.8331873,11.790999999999999],[-61.828452500000004,11.79],[-61.8230605,11.789],[-61.81664609999999,11.787999999999998],[-61.808274399999995,11.786999999999999],[-61.790283900000006,11.786],[-61.7840631,11.786],[-61.76607270000001,11.786999999999999],[-61.7573236,11.787999999999998],[-61.73933300000001,11.789],[-61.730961300000004,11.79],[-61.72079310000001,11.790999999999999],[-61.70280230000001,11.792],[-61.6944305,11.793],[-61.688016000000005,11.793999999999999],[-61.6826238,11.795],[-61.6732043,11.796999999999999],[-61.667812100000006,11.797999999999998],[-61.663077200000004,11.799],[-61.6588117,11.8],[-61.654903499999996,11.801],[-61.6512793,11.802000000000001],[-61.64788839999999,11.803],[-61.644693499999995,11.804],[-61.63878580000001,11.806000000000001],[-61.636033600000005,11.807],[-61.6308613,11.809000000000001],[-61.62841970000001,11.81],[-61.623784,11.812000000000001],[-61.621576700000006,11.813],[-61.6173564,11.815000000000001],[-61.6133668,11.817],[-61.60957990000001,11.819],[-61.6042318,11.822000000000001],[-61.6008621,11.824],[-61.5976324,11.826],[-61.5930244,11.829],[-61.590096,11.831],[-61.5872727,11.833],[-61.585739600000004,11.834],[-61.5816382,11.836],[-61.5758831,11.839],[-61.5705345,11.842],[-61.565532900000015,11.845],[-61.56375870000001,11.846],[-61.55785109999999,11.849],[-61.552374300000004,11.852000000000002],[-61.5472238,11.855000000000002],[-61.543925300000005,11.857000000000001],[-61.5407605,11.859000000000002],[-61.5362404,11.862000000000002],[-61.533365200000006,11.864],[-61.530591300000005,11.866000000000001],[-61.52791200000001,11.868],[-61.5240577,11.871],[-61.5215904,11.873000000000001],[-61.5180317,11.876000000000001],[-61.515748300000006,11.878],[-61.5124482,11.881],[-61.5103269,11.883000000000001],[-61.5072563,11.886000000000001],[-61.49835930000001,11.895000000000001],[-61.494617399999996,11.899000000000001],[-61.4902146,11.904],[-61.48533390000001,11.909],[-61.4816423,11.913],[-61.47729749999999,11.918],[-61.4732301,11.923],[-61.4694197,11.927999999999999],[-61.464353900000006,11.935],[-61.4615887,11.939],[-61.458328800000004,11.943999999999999],[-61.4552762,11.949],[-61.452420399999994,11.954],[-61.450271099999995,11.958],[-61.4482377,11.962000000000002],[-61.4454269,11.967],[-61.4438039,11.97],[-61.4412339,11.975000000000001],[-61.4388714,11.979000000000001],[-61.436091399999995,11.984],[-61.43451230000001,11.987],[-61.4329978,11.99],[-61.4310762,11.994],[-61.428396400000004,12],[-61.42595080000001,12.006],[-61.423730500000005,12.012],[-61.42313910000001,12.013],[-61.4211047,12.016],[-61.41851320000001,12.02],[-61.4166569,12.023],[-61.41487299999999,12.026],[-61.4131591,12.029],[-61.4109797,12.033],[-61.409422,12.036],[-61.40744449999999,12.04],[-61.405577300000004,12.043999999999999],[-61.4038171,12.047999999999998],[-61.402161,12.052000000000001],[-61.399865999999996,12.058],[-61.39845880000001,12.062000000000001],[-61.3971473,12.066],[-61.3959295,12.07],[-61.394275,12.076],[-61.393596300000006,12.078],[-61.3910564,12.081],[-61.38782199999999,12.085],[-61.3855047,12.088],[-61.382552100000005,12.092],[-61.3804362,12.095],[-61.37774039999999,12.099],[-61.3758089,12.102],[-61.3733493,12.106],[-61.37158839999999,12.109],[-61.369348200000005,12.113],[-61.367746499999996,12.116],[-61.36571180000001,12.12],[-61.3637893,12.123999999999999],[-61.3619754,12.127999999999998],[-61.360267099999994,12.132],[-61.35866139999999,12.136],[-61.35643999999999,12.142],[-61.35508039999999,12.145999999999999],[-61.3538123,12.15],[-61.3520543,12.156],[-61.3509963,12.16],[-61.35002769999999,12.164],[-61.3487397,12.17],[-61.34798939999999,12.174],[-61.34732449999999,12.177999999999999],[-61.3464859,12.184],[-61.346031399999994,12.187999999999999],[-61.345660099999996,12.192],[-61.3452579,12.197999999999999],[-61.3450925,12.202],[-61.3450091,12.206],[-61.345007599999995,12.209999999999999],[-61.345087899999996,12.213999999999999],[-61.3452502,12.217999999999998],[-61.345494599999995,12.222],[-61.34582149999999,12.225999999999999],[-61.3462313,12.229999999999999],[-61.347002499999995,12.235999999999999],[-61.34762189999999,12.239999999999998],[-61.3483264,12.243999999999998],[-61.3495448,12.25],[-61.345779300000004,12.253],[-61.3421596,12.256],[-61.339838,12.258],[-61.3364839,12.261],[-61.333273999999996,12.264],[-61.330199,12.267],[-61.3272505,12.27],[-61.324421099999995,12.273],[-61.3217043,12.276],[-61.31824699999999,12.28],[-61.3157713,12.283],[-61.3126179,12.286999999999999],[-61.30962449999999,12.290999999999999],[-61.3067826,12.295],[-61.30408469999999,12.299],[-61.301524099999995,12.303],[-61.300435,12.304],[-61.297963700000004,12.306000000000001],[-61.29439910000001,12.309000000000001],[-61.29211200000002,12.311],[-61.2888064,12.314],[-61.286681699999995,12.316],[-61.283606,12.319],[-61.280656900000004,12.322000000000001],[-61.277826999999995,12.325000000000001],[-61.27510960000001,12.328],[-61.272499,12.331],[-61.26999000000001,12.334],[-61.267577800000005,12.337],[-61.26525820000001,12.34],[-61.262302800000015,12.344],[-61.260184900000006,12.347],[-61.25748639999999,12.351],[-61.256502700000006,12.352000000000002],[-61.25251010000001,12.355000000000002],[-61.248711400000005,12.358],[-61.245090100000006,12.361],[-61.2416324,12.364],[-61.23832620000001,12.367],[-61.235161000000005,12.370000000000001],[-61.23212780000001,12.373000000000001],[-61.22827520000001,12.377],[-61.22552040000001,12.38],[-61.22287430000001,12.383000000000001],[-61.220331400000006,12.386000000000001],[-61.2170932,12.39],[-61.2147732,12.393],[-61.2118172,12.397],[-61.209698800000005,12.4],[-61.206999800000006,12.404],[-61.205066,12.407],[-61.20258810000001,12.411],[-61.2008015,12.414],[-61.199085100000005,12.417],[-61.19743690000001,12.42],[-61.19585520000001,12.423],[-61.19433810000001,12.426],[-61.19241330000001,12.43],[-61.1897291,12.436],[-61.1872793,12.442],[-61.18505530000001,12.447999999999999],[-61.1836941,12.452000000000002],[-61.1824277,12.456000000000001],[-61.18125439999999,12.46],[-61.180172500000005,12.464],[-61.1791805,12.468],[-61.178277,12.472000000000001],[-61.1770853,12.478],[-61.17603230000001,12.484],[-61.175387900000004,12.488],[-61.1745797,12.494],[-61.1741456,12.498],[-61.1737945,12.502],[-61.173526,12.506],[-61.17333980000001,12.51],[-61.17323580000001,12.514],[-61.173214300000005,12.516654800000001]]]],"type":"MultiPolygon"},"id":550727,"osm_type":"relation","type":"Feature","name":"Grenada","properties":{"flag":"http://upload.wikimedia.org/wikipedia/commons/b/bc/Flag_of_Grenada.svg","name":"Grenada","name:cs":"Grenada","name:de":"Grenada","name:en":"Grenada","name:eo":"Grenado","name:fr":"Grenade","name:fy":"Grenada","name:hr":"Grenada","name:nl":"Grenada","name:ru":"Гренада","name:sl":"Grenada","name:ta":"கிரெனடா","name:uk":"Гренада","boundary":"administrative","name:tzl":"Grenada","timezone":"America/Grenada","wikidata":"Q769","ISO3166-1":"GD","wikipedia":"en:Grenada","admin_level":"2","is_in:continent":"North America","ISO3166-1:alpha2":"GD","ISO3166-1:alpha3":"GRD","ISO3166-1:numeric":"308"}}],"type":"FeatureCollection","geocoding":{"creation_date":"2016-10-12","generator":{"author":{"name":"Mapzen"},"package":"fences-builder","version":"0.1.2"},"license":"ODbL (see http://www.openstreetmap.org/copyright)"}} gdalautotest-3.1.2/ogr/data/solid-less-than-4-vertices.dxf0000664000175000017500000000144213701057753022100 0ustar eveneven 0 SECTION 2 ENTITIES 0 SOLID 5 5BB 8 0 10 0.0 20 2.0 30 0.0 11 0.0 21 2.0 31 0.0 12 0.0 22 2.0 32 0.0 13 0.0 23 2.0 33 0.0 0 SOLID 5 5BC 8 0 10 1.0 20 2.0 30 0.0 11 0.5 21 2.0 31 0.0 12 1.0 22 2.0 32 0.0 13 0.5 23 2.0 33 0.0 0 SOLID 5 5BD 8 0 10 1.0 20 1.5 30 0.0 11 0.5 21 1.5 31 0.0 12 0.5 22 1.5 32 0.0 13 0.5 23 1.5 33 0.0 0 SOLID 5 5BE 8 0 10 1.0 20 1.0 30 0.0 11 1.0 21 1.0 31 0.0 12 0.5 22 1.0 32 0.0 13 0.5 23 1.0 33 0.0 0 SOLID 5 5BF 8 0 10 2.0 20 2.0 30 0.0 11 1.5 21 2.0 31 0.0 12 2.0 22 1.5 32 0.0 13 2.0 23 1.5 33 0.0 0 ENDSEC 0 EOF gdalautotest-3.1.2/ogr/data/testfmegml_interleaved.gml0000664000175000017500000000452713701057753021645 0ustar eveneven 49 2 50 3 49 2 49 2 49 3 50 3 50 2 49 2 49 2 50 3 49 2 49 2 49 3 50 3 50 2 49 2 49 2 50 3 gdalautotest-3.1.2/ogr/data/testlyrdef.xsd0000664000175000017500000000445613701060007017303 0ustar eveneven gdalautotest-3.1.2/ogr/data/extended_data_without_schema_data.kml0000664000175000017500000000125613701057753024001 0ustar eveneven layer_name feature1 1_1 1_2 2,48 feature2 2_1 2_3 3,49 gdalautotest-3.1.2/ogr/data/fake_gmljp2.xsd0000664000175000017500000000320613701060007017267 0ustar eveneven gdalautotest-3.1.2/ogr/data/gjmultipoly.shp0000664000175000017500000000062413701057753017500 0ustar eveneven' Y@Y@@Y@Y@@ Y@@Y@@Y@@Y@@Y@@Y@Y@?@Y@?@Y@Y@ Y@? Y@?333333Y@?333333Y@? Y@?gdalautotest-3.1.2/ogr/data/describe_feature_type.xml0000664000175000017500000000175613701060007021454 0ustar eveneven gdalautotest-3.1.2/ogr/data/testpointzm.shp0000664000175000017500000000022013701057753017511 0ustar eveneven' H ?@?@@@@@ ?@@@gdalautotest-3.1.2/ogr/data/all_geoms.tab0000664000175000017500000000016613701057753017040 0ustar eveneven!table !version 650 !charset Neutral Definition Table Type NATIVE Charset "Neutral" Fields 1 NAME Char (1) ; gdalautotest-3.1.2/ogr/data/all_geoms_block_32256.zip0000664000175000017500000000325213701057753021006 0ustar evenevenPK̬%HK!ball_geoms_block_32256.datUT )V)Vux cN```pd`b}]Lg&ϫJPK̬%H::h}-@all_geoms_block_32256.idUT )Vh)Vux c`Pbc d ~ ħ%330hqwn ~PK̬%HAvall_geoms_block_32256.mapUT )V)Vux kEwlISM ]mE*'=IZB{A<͋GEh/^J@A*E]b֙ۅ5 E*Xٝwfޙo{l|3>~[?Ypf,ҧ=TEo;r6bڽfzt:봗ݥUi3:ˇ53Sޥ}3ݿ滍CjJ)*+æ'%3kR8[Ky?OMvwRuf>O9:J_"'+lzV{oϵbKyRaT?= x[]"/UkKu\if%7(+Mh% 8Re7r?gig8,Bą< ׎>MUJ[UhUo}oϟoҡrm}'PK̬%HRkavall_geoms_block_32256.tabUT )Vq)Vux S,ILIR,K-*S035RLH,*N-QK--)JrIM,)WP,HUs sUpWjPʻe+ @uU  \PK̬%HK!ball_geoms_block_32256.datUT)Vux PK̬%H::h}-@tall_geoms_block_32256.idUT)Vux PK̬%HAvall_geoms_block_32256.mapUT)Vux PK̬%HRkaveall_geoms_block_32256.tabUT)Vux PK{gdalautotest-3.1.2/ogr/data/oapif_json_schema_eo.jsonschema0000664000175000017500000004741713701057753022626 0ustar eveneven{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "GeoJSON encoding of OGC 17-003 Earth Observation Metadata", "description": "Definition of EO Dataset document. Note that numbers in the instance should not be surrounded by double-quotes to validate against this schema.", "$ref": "#/definitions/EarthObservation", "definitions": { "MetadataInformation": { "description": "Subset of Properties", "type": "object", "properties": { "lang": { "description": "RFC3066", "type": "string", "minLength": 2, "maxLength": 3 }, "updated": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?(Z|[\\+\\-][0-9]{2}:[0-9]{2})$", "format": "date-time" }, "published": { "type": "string", "format": "date-time" }, "creationDate": { "type": "string", "format": "date-time" } }, "required": [ "updated" ] }, "DataIdentification": { "description": "Subset of Properties", "type": "object", "properties": { "parentIdentifier": { "type": "string" }, "doi": { "type": "string" }, "title": { "type": "string" }, "identifier": { "type": "string" }, "date": { "type": "string" }, "created": { "type": "string", "format": "date-time" }, "available": { "type": "string" }, "additionalAttributes": { "type": "object", "minProperties": 1 } }, "required": [ "title", "identifier", "date" ] }, "ProcessingInformation": { "description": "Subset of ProductInformation", "type": "object", "properties": { "processingLevel": { "type": "string", "enum": [ "1A", "1B", "1C", "2", "3" ] }, "processorName": { "type": "string" }, "processorVersion": { "type": "string" }, "processingCenter": { "description": "Codelist", "type": "string" }, "processingDate": { "type": "string", "format": "date-time" }, "processingMode": { "description": "Codelist", "type": "string" }, "compositeType": { "type": "string" }, "format": { "type": "string" }, "productContentsType": { "type": "string" }, "processingMethod": { "type": "string" }, "processingMethodVersion": { "type": "string" } } }, "Links": { "title": "Links", "description": "Objects with Links grouped by \"relation\" (i.e. Atom \"rel\" attribute).", "type": "object", "properties": { "type": { "type": "string", "enum": [ "Links" ] }, "qualityReport": { "type": "array", "items": { "$ref": "#/definitions/Link" } }, "previews": { "type": "array", "items": { "$ref": "#/definitions/Link" } }, "via": { "type": "array", "items": { "$ref": "#/definitions/Link" } }, "data": { "type": "array", "items": { "$ref": "#/definitions/Link" } }, "up": { "type": "array", "items": { "$ref": "#/definitions/Link" } }, "related": { "type": "array", "items": { "$ref": "#/definitions/Link" } }, "alternates": { "type": "array", "items": { "$ref": "#/definitions/Link" } } } }, "Properties": { "title": "Properties", "type": "object", "allOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "Properties" ] }, "status": { "type": "string", "enum": [ "ARCHIVED", "PLANNED", "ACQUIRED", "CANCELLED", "FAILED", "POTENTIAL", "REJECTED", "QUALITYDEGRADED" ] }, "acquisitionInformation": { "type": "array", "items": { "$ref": "#/definitions/AcquisitionInformation" } }, "productInformation": { "$ref": "#/definitions/ProductInformation" }, "links": { "$ref": "#/definitions/Links" }, "offerings": { "description": "OGC 14-055r2", "type": "array", "items": { "$ref": "http://schemas.opengis.net/eo-geojson/1.0/owc-geojson-schema.json#/definitions/Offering" } } }, "required": [ "status", "acquisitionInformation", "links" ] }, { "$ref": "#/definitions/DataIdentification" }, { "$ref": "#/definitions/MetadataInformation" } ] }, "EarthObservation": { "description": "GeoJSON Feature", "type": "object", "properties": { "@context": { "type": "string" }, "type": { "title": "type", "type": "string", "enum": [ "Feature" ] }, "id": { "type": "string", "format": "uri" }, "geometry": { "oneOf": [ { "$ref": "http://schemas.opengis.net/eo-geojson/1.0/owc-geojson-schema.json#/definitions/Geometry" }, { "type": "null" } ] }, "properties": { "$ref": "#/definitions/Properties" }, "bbox": { "type": "array", "minItems": 4, "maxItems": 4, "items": { "type": "number" } } }, "required": [ "type", "id", "geometry", "properties" ], "additionalProperties": false }, "Platform": { "type": "object", "minProperties": 1, "properties": { "type": { "type": "string", "enum": [ "Platform" ] }, "id": { "type": "string", "format": "uri" }, "platformShortName": { "type": "string" }, "platformSerialIdentifier": { "type": "string" }, "orbitType": { "type": "string", "enum": [ "GEO", "LEO" ] } }, "required": [ "platformShortName" ], "additionalProperties": false }, "Instrument": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "Instrument" ] }, "id": { "type": "string", "format": "uri" }, "sensorType": { "type": "string", "enum": [ "OPTICAL", "RADAR", "ATMOSPHERIC", "ALTIMETRIC", "LIMB" ] }, "instrumentShortName": { "type": "string" }, "description": { "type": "string" } }, "required": [ "instrumentShortName" ], "additionalProperties": false }, "AcquisitionParameters": { "type": "object", "allOf": [ { "type": "object", "properties": { "acquisitionType": { "type": "string", "enum": [ "NOMINAL", "CALIBRATION", "OTHER" ] }, "acquisitionSubType": { "type": "string" }, "startTimeFromAscendingNode": { "type": "integer", "minimum": 0 }, "completionTimeFromAscendingNode": { "type": "integer", "minimum": 0 }, "relativeOrbitNumber": { "type": "integer" }, "wrsLongitude": { "type": "string" }, "wrsLatitude": { "type": "string" }, "tileId": { "type": "string" }, "groundTrackUncertainty": { "type": "number" }, "cycleNumber": { "type": "integer", "minimum": 0 }, "antennaLookDirection": { "type": "string", "enum": [ "LEFT", "RIGHT" ] }, "acquisitionStation": { "type": "string" }, "acquisitionAngles": { "$ref": "#/definitions/AcquisitionAngles" }, "operationalMode": { "type": "string" }, "swathIdentifier": { "type": "string" }, "polarisationMode": { "description": "Sar", "type": "string", "enum": [ "S", "D", "T", "Q", "UNDEFINED" ] }, "polarisationChannels": { "description": "Sar", "type": "string" }, "resolution": { "type": "number" }, "verticalResolution": { "description": "Atm, Lmb", "type": "number" }, "waveLengths": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/WavelengthInformation" } }, "measurementType": { "type": "string", "enum": [ "ABSORPTION", "EMISSION" ] }, "dopplerFrequency": { "description": "Sar", "type": "number", "minimum": 0, "exclusiveMinimum": true }, "samplingRates": { "description": "Alt", "type": "array", "items": { "type": "number", "minimum": 0, "exclusiveMinimum": true } } }, "required": [ "acquisitionType" ] }, { "$ref": "#/definitions/TemporalInformation" }, { "$ref": "#/definitions/VerticalSpatialDomain" }, { "$ref": "#/definitions/OrbitParameters" } ] }, "Link": { "type": "object", "properties": { "href": { "type": "string", "format": "uri" }, "type": { "type": "string" }, "title": { "type": "string" }, "length": { "type": "integer", "minimum": 0 }, "category": { "description": "Media category property defined by MediaRSS.", "type": "string", "enum": [ "THUMBNAIL", "QUICKLOOK", "ALBUM", "CLOUD", "SNOW", "QUALITY" ] }, "expression": { "description": "Media expression property defined by MediaRSS.", "type": "string", "enum": [ "full", "sample" ] }, "conformsTo": { "type": "string", "format": "uri" } }, "required": [ "href" ], "additionalProperties": false }, "ProductInformation": { "type": "object", "allOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": [ "ProductInformation" ] }, "productType": { "type": "string" }, "size": { "type": "integer" }, "productVersion": { "type": "string" }, "statusSubType": { "type": "string", "enum": [ "ON-LINE", "OFF-LINE" ] }, "qualityInformation": { "$ref": "#/definitions/QualityInformation" }, "statusDetail": { "type": "string" }, "availabilityTime": { "type": "string", "format": "date-time" }, "timeliness": { "type": "string" }, "productGroupId": { "type": "string" }, "archivingCenter": { "type": "string" }, "referenceSystemIdentifier": { "type": "string" }, "archivingDate": { "type": "string", "format": "date-time" } }, "required": [ "availabilityTime" ] }, { "$ref": "#/definitions/ProcessingInformation" }, { "$ref": "#/definitions/CoverageDescription" } ] }, "AcquisitionAngles": { "type": "object", "properties": { "illuminationAzimuthAngle": { "type": "number" }, "illuminationZenithAngle": { "type": "number" }, "illuminationElevationAngle": { "type": "number" }, "incidenceAngle": { "type": "number" }, "minimumIncidenceAngle": { "type": "number" }, "maximumIncidenceAngle": { "type": "number" }, "incidenceAngleVariation": { "type": "number" }, "acrossTrackIncidenceAngle": { "type": "number" }, "alongTrackIncidenceAngle": { "type": "number" }, "instrumentAzimuthAngle": { "type": "number" }, "instrumentZenithAngle": { "type": "number" }, "instrumentElevationAngle": { "type": "number" }, "pitch": { "type": "number" }, "roll": { "type": "number" }, "yaw": { "type": "number" } }, "additionalProperties": false }, "QualityInformation": { "type": "object", "properties": { "qualityStatus": { "type": "string", "enum": [ "NOMINAL", "DEGRADED" ] }, "qualityDegradation": { "description": "Percentage", "type": "number" }, "qualityDegradationTag": { "type": "string" }, "qualityDegradationQuotationMode": { "type": "string", "enum": [ "AUTOMATIC", "MANUAL" ] } }, "additionalProperties": true }, "CoverageDescription": { "description": "Subset of ProductInformation", "type": "object", "properties": { "cloudCover": { "type": "number" }, "snowCover": { "type": "number" } } }, "FeatureCollection": { "description": "GeoJSON FeatureCollection", "type": "object", "properties": { "type": { "type": "string", "enum": [ "FeatureCollection" ] }, "bbox": { "type": "array" }, "features": { "type": "array", "minItems": 0, "items": { "$ref": "#/definitions/EarthObservation" } } }, "required": [ "type", "features" ] }, "WavelengthInformation": { "type": "object", "minProperties": 1, "properties": { "type": { "type": "string", "enum": [ "WavelengthInformation" ] }, "discreteWavelengths": { "type": "array", "minItems": 1, "items": { "type": "number", "minimum": 0, "exclusiveMinimum": true } }, "endWavelength": { "type": "number", "minimum": 0, "exclusiveMinimum": true }, "spectralRange": { "type": "string", "enum": [ "INFRARED", "NIR", "SWIR", "MWIR", "LWIR", "FIR", "UV", "VISIBLE", "MICROWAVE", "OTHER" ] }, "startWavelength": { "type": "number", "minimum": 0, "exclusiveMinimum": true }, "wavelengthResolution": { "type": "number" } }, "additionalProperties": false }, "VerticalSpatialDomain": { "description": "Subset of AcquisitionParameters", "type": "object", "properties": { "highestLocation": { "type": "string" }, "lowestLocation": { "type": "string" }, "locationUnit": { "type": "string", "enum": [ "bar", "m" ] } } }, "TemporalInformation": { "description": "Subset of AcquisitionParameters", "type": "object", "properties": { "beginningDateTime": { "type": "string", "format": "date-time" }, "endingDateTime": { "type": "string", "format": "date-time" } }, "required": [ "beginningDateTime", "endingDateTime" ] }, "AcquisitionInformation": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "AcquisitionInformation" ] }, "platform": { "$ref": "#/definitions/Platform" }, "instrument": { "$ref": "#/definitions/Instrument" }, "acquisitionParameters": { "$ref": "#/definitions/AcquisitionParameters" } } }, "OrbitParameters": { "description": "Subset of AcquisitionParameters", "type": "object", "properties": { "orbitDirection": { "type": "string", "enum": [ "ASCENDING", "DESCENDING" ] }, "lastOrbitDirection": { "type": "string", "enum": [ "ASCENDING", "DESCENDING" ] }, "orbitDuration": { "type": "integer" }, "ascendingNodeDate": { "type": "string", "format": "date-time" }, "ascendingNodeLongitude": { "type": "number" }, "orbitNumber": { "type": "integer", "minimum": 0 }, "lastOrbitNumber": { "type": "number" } } } } } gdalautotest-3.1.2/ogr/data/lambert93_francais.MAP0000664000175000017500000000200013701057753020402 0ustar eveneven */#+#OWc9 7ܽ+/UW?H!pNw猠!@أw猠!@^W ^@@G@F@H@\%AP-YA#y=B`<(> K@+=@LONG_INC>@GS_COUNTN>d@tU0d@㥛@d@㥛nQd@ ףad@1rd@1d@X9d@j+d@d@Cd@d@/;d@hd@o=u<}"O>3d@C =oe@t=C foo foo 2016-02-13T12:34:56Z foo foo 2016-02-13T00:00:00Z 2016-02-14T00:00:00Z gdalautotest-3.1.2/ogr/data/testpoly.shp0000664000175000017500000000415013701057753017002 0ustar eveneven' 4rhrr@Xr@@rp@pqXr@pqp@pqXr@rXr@rp@pqp@@p@p@pr@(r@pr@p@pr@(r@p@(r@p@p@pr@p@@Pq@hrr@qr@hrr@qPq@qPq@hrr@hr@rXrq(qqXrq(qr(qrXrqXr@h#@f?@f#@f?@h?@h#@f#@@@b`S@`@H@``S@`@H@b@H@b`S@``S@`@ Z@d@S@d@ Z@d@S`@S`@ Z@d@ Z@c@0j@ e@0l@ e@0j@ e@0l@c@0l@c@0j@ e@0j@ @gi@dm@di@dm@gm@gi@di@ @.3@P@S@P@3@P@S@.S@.3@P@3@ @DPj@H@0m@H@Pj@H@0m@D0m@DPj@H@Pj@ @l@`Yn@)@n@`Yn@)@l@)@l@`Yn@`Y j@\@8@p@pg@ \@pg@@\@8@p@;@`p@pg@\@pg@`c@pb@ m@b@`n@G@ c@F@`c@pb@`Sob@@N SkDpmCXT@WW@nb@oZ@@NQ`PSkgdalautotest-3.1.2/ogr/data/utm31.DAT0000664000175000017500000000010713701057753015704 0ustar evenevenrAidC gdalautotest-3.1.2/ogr/data/wfs_typefeature.gml0000664000175000017500000000250213701057753020317 0ustar eveneven 558750.703125 4402882.05558750.703125 4402882.05558750.703125 4402882.05558750.703125 4402882.05 558750.703125 4402882.051135552CFF99 gdalautotest-3.1.2/ogr/data/inspire_cadastralboundary.xml0000664000175000017500000000527413701060007022352 0ustar eveneven 49 2 50 3 2000-01-01T00:00:00.0Z 2001-01-01T00:00:00.0Z 1 49 2 50 3 CadastralBoundary-01-localId namespace 2002-01-01T00:00:00.0Z 2003-01-01T00:00:00.0Z 2000-01-01T00:00:00.0Z 49 2 50 3 CadastralBoundary-02-localId namespace gdalautotest-3.1.2/ogr/data/testpolyavc/0000775000175000017500000000000013701057753016760 5ustar evenevengdalautotest-3.1.2/ogr/data/testpolyavc/info/0000775000175000017500000000000013701057753017713 5ustar evenevengdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0000.nit0000664000175000017500000000220013701057753021466 0ustar evenevenLANDLICP-ID  XLABEL  YLABEL   SIZE   ANGLE  SZLBL  IFONTF  LABEL 44 gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0001.nit0000664000175000017500000000110013701057753021465 0ustar evenevenXMIN   YMIN   XMAX    YMAX    gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0002.dat0000664000175000017500000000012013701057753021445 0ustar eveneven../testpolyavc/pat.adf gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0000.dat0000664000175000017500000000106013701057753021447 0ustar eveneven       gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0001.dat0000664000175000017500000000012013701057753021444 0ustar eveneven../testpolyavc/bnd.adf gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0003.dat0000664000175000017500000000024013701057753021451 0ustar eveneven?p?x=\)LARGE ??t=\)SMALL gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0002.nit0000664000175000017500000000110013701057753021466 0ustar evenevenAREA   PERIMETER   TESTPOLYAVC#   TESTPOLYAVC-ID   gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0003.nit0000664000175000017500000000220013701057753021471 0ustar evenevenLANDLICP-ID  XLABEL  YLABEL   SIZE   ANGLE  SZLBL  IFONTF  LABEL 44 gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0004.dat0000664000175000017500000000012013701057753021447 0ustar eveneven../testpolyavc/tic.adf gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc0004.nit0000664000175000017500000000066013701057753021502 0ustar evenevenIDTIC  XTIC   YTIC    gdalautotest-3.1.2/ogr/data/testpolyavc/info/arc.dir0000664000175000017500000000355413701057753021167 0ustar evenevenLANDLICP.ACODE ARC0000 P  TESTPOLYAVC.BND ARC0001  XX TESTPOLYAVC.PAT ARC0002  XX LANDLICP.PCODE ARC0003 P  TESTPOLYAVC.TIC ARC0004  XX gdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/0000775000175000017500000000000013701057753021335 5ustar evenevengdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/pat.adf0000664000175000017500000000010013701057753022564 0ustar eveneven/ExGLDb_GDFLHJz>HJz>H)~JzAgdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/bnd.adf0000664000175000017500000000002013701057753022544 0ustar evenevenH|Jz>HtJzDgdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/tol.adf0000664000175000017500000000017013701057753022605 0ustar eveneven?QqA =?L/?L/ ?L/ ?L/gdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/lab.adf0000664000175000017500000000024413701057753022547 0ustar eveneven' RH>PJzBH>PJzBH>PJzBHAJz?HAJz?HAJz?gdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/pal.adf0000664000175000017500000000061013701057753022562 0ustar eveneven' (H|Jz>HtJzD"H|JzAHtJzD"HJz>HgJzAHBJz@H[JzAgdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/prj.adf0000664000175000017500000000026713701057753022611 0ustar evenevenProjection UTM Zone 13 Datum NAD27 Zunits NO Units METERS Spheroid CLARKE1866 Xshift 0.0000000000 Yshift 0.0000000000 Parameters gdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/cnt.adf0000664000175000017500000000027413701057753022600 0ustar eveneven' ^H@JzA)H>]JzBHAJz?HOJzAgdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/tic.adf0000664000175000017500000000006013701057753022564 0ustar evenevenHJz>HJzDHuqJzDHtwJz>Dgdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/pax.adf0000664000175000017500000000020413701057753022575 0ustar eveneven' B2(^""gdalautotest-3.1.2/ogr/data/testpolyavc/testpolyavc/arx.adf0000664000175000017500000000023413701057753022602 0ustar eveneven' N2Jbgdalautotest-3.1.2/ogr/data/lwpolyline_smooth.dxf0000664000175000017500000000071113701057753020674 0ustar eveneven 0 SECTION 2 ENTITIES 0 LWPOLYLINE 330 2 8 1 48 0.5 90 5 70 1 43 0.0 10 251297.8179190048 20 412226.8286400078 10 251297.8179190048 20 412226.8286400078 42 1.411054718161073 10 251308.8984362325 20 412208.9379316938 42 -0.2087839309652931 10 251316.5701423874 20 412213.1972117217 42 1.718125140479248 10 251303.570758 20 412231.7269082728 42 -0.2147205537362407 0 ENDSEC 0 EOF gdalautotest-3.1.2/ogr/data/openair_test.txt0000664000175000017500000000072013701057753017637 0ustar eveneven* Fake openair file * * * Styling for class C AC C SP 0,1,127,127,127 SB 255,0,255 AC C AN Airspace1 AL Floor AH Ceiling AT 2:30:15 N 49:15.50 E AT 2:30 N 49:20 E V X=2:30:15 N 49:15.50 E DC 5 AC R AN Airspace2 AL Floor AH Ceiling V X=3 N 50 E DA 10,270,290 DA 7,290,320 DA 10,320,200 V D=- DA 5,200,270 AC CTR AN Airspace3 AL Floor AH Ceiling SP 1,2,0,0,255 SB 0,255,0 DP 2:45 N 49:45 E DP 3:00 N 49.75 E DP 3:00 N 49:30 E DP 2.75 N 49:30 E DP 2:45 N 49:45 E gdalautotest-3.1.2/ogr/data/testcsvt.csvt0000664000175000017500000000013213701057753017157 0ustar eveneven"Integer(5)","Real (10.7)","String(15)","Integer","Real","String","DateTime","Date","Time"gdalautotest-3.1.2/ogr/data/testpoly.shx0000664000175000017500000000032413701057753017011 0ustar eveneven' jrhrr@Xr@2@v@@@B@@@@R@@@@bj`gdalautotest-3.1.2/ogr/data/testograpispy.py0000775000175000017500000001135713701060010017660 0ustar eveneven# This file is generated by the OGR_API_SPY mechanism. import os import shutil from osgeo import gdal from osgeo import ogr from osgeo import osr os.access shutil.copy gdal.SetConfigOption('FOO', 'BAR') ogr.Open('non_existing', update=0) ogr.Open('non_existing', update=1) ds1 = ogr.GetDriverByName('CSV').CreateDataSource('/vsimem/test.csv', options=['GEOMETRY=AS_WKT']) ds1_lyr1 = ds1.CreateLayer('test', srs=None, geom_type=ogr.wkbUnknown, options=[]) geom_fd = ogr.GeomFieldDefn('geomfield', ogr.wkbPolygon) geom_fd.SetSpatialRef(osr.SpatialReference("""GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]""")) geom_fd.SetNullable(0) ds1_lyr1.CreateGeomField(geom_fd, approx_ok=1) ds1 = None ds1 = ogr.Open('/vsimem/test.csv', update=1) ds1 = None ogr.GetDriverByName('CSV').DeleteDataSource('/vsimem/test.csv') ds1 = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/test', options=[]) ds1_lyr1 = ds1.CreateLayer('test', srs=osr.SpatialReference("""GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]"""), geom_type=ogr.wkbPoint, options=['ENCODING=UTF-8', 'ENCODING=UTF-8']) fdefn1 = ds1_lyr1.GetLayerDefn() f = ogr.Feature(fdefn1) ds1_lyr1.CreateFeature(f) f = None fd = ogr.FieldDefn('intfield', ogr.OFTInteger) ds1_lyr1.CreateField(fd, approx_ok=1) fd = ogr.FieldDefn('realfield', ogr.OFTReal) fd.SetWidth(24) fd.SetPrecision(15) fd.SetNullable(0) fd.SetDefault('3') ds1_lyr1.CreateField(fd, approx_ok=1) fd = ogr.FieldDefn('strfield', ogr.OFTString) ds1_lyr1.CreateField(fd, approx_ok=1) fdefn1 = ds1_lyr1.GetLayerDefn() fdefn1.GetGeomType() fdefn1.GetFieldCount() fdefn1.GetFieldIndex('foo') fdefn1_fielddefn1 = fdefn1.GetFieldDefn(1) fdefn1_fielddefn1.GetType() fdefn1_fielddefn1.GetNameRef() fdefn1_fielddefn1.GetSubType() fdefn1.GetGeomFieldCount() fdefn1.GetGeomFieldIndex('foo') fdefn1_geomfielddefn0 = fdefn1.GetGeomFieldDefn(0) fdefn1_geomfielddefn0.GetType() fdefn1_geomfielddefn0.GetNameRef() fdefn1_geomfielddefn0.GetSpatialRef() f = ogr.Feature(fdefn1) f.SetField(0, 1) f.SetField(1, 2.34) f.SetField(2, 'bla') ds1_lyr1.CreateFeature(f) f = None f = ogr.Feature(fdefn1) f.SetFID(1) f.SetField(0, 1) f.SetField(2, 'bla') f.SetGeomField(0, ogr.CreateGeometryFromWkt('POINT (1 2)')) f.SetStyleString('foo') ds1_lyr1.SetFeature(f) f = None ds1_lyr1.DeleteFeature(1) ds1_lyr1.ReorderField(0, 2) fdefn1 = ds1_lyr1.GetLayerDefn() fdefn1.GetFieldCount() ds1_lyr1.ReorderFields([2, 1, 0]) fdefn1 = ds1_lyr1.GetLayerDefn() ds1_lyr1.DeleteField(1) fd = ogr.FieldDefn('foo', ogr.OFTString) ds1_lyr1.AlterFieldDefn(0, fd, 65535) ds1_lyr1.StartTransaction() ds1_lyr1.CommitTransaction() ds1_lyr1.RollbackTransaction() ds1_lyr1.FindFieldIndex('foo', 1) ds1_lyr1.GetFeatureCount(force=1) ds1_lyr1.GetExtent(geom_field=0, force=0) ds1_lyr1.GetExtent(geom_field=0, force=1) ds1_lyr1.GetSpatialRef() ds1_lyr1.TestCapability('FastFeatureCount') ds1_lyr1.GetSpatialFilter() ds1_lyr1.SetAttributeFilter('foo = \'2\'') ds1_lyr1.SetAttributeFilter(None) ds1_lyr1.ResetReading() ds1_lyr1.GetFeature(0) ds1_lyr1.GetNextFeature() ds1_lyr1.SetNextByIndex(0) for i in range(3): ds1_lyr1.GetNextFeature() ds1_lyr1.SyncToDisk() ds1_lyr1.GetFIDColumn() ds1_lyr1.GetGeometryColumn() ds1_lyr1.GetName() ds1_lyr1.GetGeomType() ds1_lyr1.SetIgnoredFields([]) ds1_lyr1.SetSpatialFilter(None) ds1_lyr1.SetSpatialFilter(0, None) ds1_lyr1.SetSpatialFilter(ogr.CreateGeometryFromWkt('POINT (1 2)')) ds1_lyr1.SetSpatialFilterRect(0, 1, 2, 3) ds1_lyr1.SetSpatialFilterRect(0, 0, 1, 2, 3) ds1.GetLayerCount() ds1_lyr1 = ds1.GetLayer(0) ds1_lyr1 = ds1.GetLayerByName('test') ds1.GetLayerByName('foo') ds1_lyr2 = ds1.ExecuteSQL('SELECT * FROM test', None, '') ds1.ReleaseResultSet(ds1_lyr2) ds1_lyr2 = ds1.ExecuteSQL('SELECT * FROM test', ogr.CreateGeometryFromWkt('POINT (1 2)'), 'OGRSQL') ds1.ReleaseResultSet(ds1_lyr2) ds1.ReleaseResultSet(None) ds1_lyr2 = ds1.CreateLayer('foo', srs=None, geom_type=ogr.wkbUnknown, options=[]) fdefn2 = ds1_lyr2.GetLayerDefn() ds1.DeleteLayer(1) ds1.StartTransaction(0) ds1.CommitTransaction() ds1.RollbackTransaction() ds1 = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/test') ds1 = ogr.GetDriverByName('CSV').CreateDataSource('/vsimem/test2.csv', options=['GEOMETRY=AS_WKT']) ds1_lyr1 = ds1.CreateLayer('test2', srs=None, geom_type=ogr.wkbUnknown, options=[]) fdefn1 = ds1_lyr1.GetLayerDefn() ds1 = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/test2.csv') gdalautotest-3.1.2/ogr/data/multipolygon.geojson0000664000175000017500000000054413701057753020536 0ustar eveneven{ "type": "MultiPolygon", "coordinates": [ [ [ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ] ], [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ], [ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ] ] ] }gdalautotest-3.1.2/ogr/data/mixed_shape_type_non_conformant.shp0000664000175000017500000000133013701057753023543 0ustar eveneven' l&@@( @@8?????:@??@@?$@@@@@@@@Z&@?$@$@?&@?$@gdalautotest-3.1.2/ogr/data/testopenfilegdb93.gdb.zip0000664000175000017500000015236513701057753021230 0ustar evenevenPK l}Ftestopenfilegdb93.gdb/UT {"U"Uux PK-}FgX (testopenfilegdb93.gdb/a00000007.gdbtablxUT "U"Uux Q @ѻ%B0`!Cla Kxvg!Wy #B6r!)Ԥ%=LVH$I$IYPK/}F0##testopenfilegdb93.gdb/a0000003b.spxUT  "U+"Uux ȱ @1~, cd(urPK.}Fj*testopenfilegdb93.gdb/a0000002e.gdbindexesUT "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`diPX4TXvQv@ J@">=8DI1$7ZI(85%Z !fflnahlgcdigdjnddljf 4(55<39CI@ V'3hnj:P,dhnbjldidjhiib Ԋ=^@i+@r#"q[Jݟ/&h% TPK/}FB*testopenfilegdb93.gdb/a00000027.gdbindexesUT  "U*"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Y=d0b(bHeHdHg2 Phr @MĹAj&PK-}FhmzC(testopenfilegdb93.gdb/a00000026.gdbtableUT "U*"Uux cf```baFV5|<3y8\B<\f01e2YXJX@Y8rr0!(Te4j|& !(4$ t#ϒPKh8P!+[DՕ`~dLǗ wqZ]^nԽW7bޟ/?ehTaH63yrj&31n̰+F9?Z c,pg[<81r^6~fFBBlƙL0)%! JJABԪVPI .$lc A)7B};9-vy~W`yY>st0(Fpp(bT"F5R'IE6g' {ұ'k\SS*=bUg`ȷP]Y~[<\LK NA4#ꀻGPB|-)/50ÄށN# yʄE w3E$Ff#{0טR yZ^?2F%7nSݣ 6QxPe_'.^>:ݺooWM{>(uĽy$RFax*_υQ3IէIbnbpEf_ C7pj,TK4v>̻TF<~pzM|̭O#-Vg\M5#kT)a|nr`ˉ@w?yvK9(+:fڶf[Ll˚ۚmY3_i PK.}F o6 (testopenfilegdb93.gdb/a0000002e.gdbtablxUT "U+"Uux  0 A[^_)B([JhF{܈5Q<+]PK.}FU[ 4 (testopenfilegdb93.gdb/a00000031.gdbtablxUT "U+"Uux Q D# T QRSKP$~GDͻ3[uPK,}F,(testopen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93.gdb/a00000005.gdbindexesUT "U"Uux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPK.}FlO#testopenfilegdb93.gdb/a00000032.spxUT "U+"Uux c```aF fbf fbV F(``LD@ iQ0 F(`Q0XȣPK/}FKۅ#testopenfilegdb93.gdb/a0000003a.spxUT  "U+"Uux 1 0Nvty ?$OݧZ Q0r 툈3>$+}c;{:{ջ1ܘ1Jnqw9 _GOI?'/| _E_>/| c1~PKzF hR (testopenfilegdb93.gdb/a00000002.gdbtablxUT "U"Uux  @PӀ UX@hAZ&QŜ█r}ݹhyF"Lvrd&I$I$I?T} PK-}F7 (testopenfilegdb93.gdb/a00000026.gdbtablxUT "U*"Uux  PDf.ނ%V7sIs&w/PK-}F'2#testopenfilegdb93.gdb/a00000029.spxUT "U+"Uux  Dщ`Y_+؂v0$=j[}ۘ{/PK/}Fspl*testopenfilegdb93.gdb/a0000003a.gdbindexesUT  "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`d >؃"@ۦJKN1_l  ec|r *2 2D@qLg8ClQx7)FarPK/}F0##testopenfilegdb93.gdb/a00000037.spxUT  "U+"Uux ȱ @1~, cd(urPKzFW[*testopenfilegdb93.gdb/a00000006.gdbindexesUT "U"Uux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPK/}F-(testopenfilegdb93.gdb/a0000003b.gdbtableUT  "U+"Uux cf|FV5䙁4#`a` f`pd`pe``g`afpb0b`0cpf0N @ڂ2B.P#P#Xք 7Bg Z3A t֏0/&h<t ! @10 1d2200313RHC"CLh blXgZfK^4ʴ85>, ~w7SM~<&(<PK.}FU8h*testopenfilegdb93.gdb/a0000002b.gdbindexesUT "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`dDCՊee7 `PPZ0($݃ --Lt\CB}\<\=]bfz:FzFFFƦfƱ:A@܋RS33t buBfۅ@y㧆OiK]Ycc>[հ8u~lNg~X +1|[ wFy Raвf"imf3 Xp95 !13ID8& A#^ z7s;e8e3 Pbu1LrMN nRfW 7cL#oo\cNT/0QܕDrKͶ"2c龃I_.s9ŸlbeH=_xqŝrްԳkisk4}fP6=0б0~I5>)Xu(xH}p_`jumxb6]rXLdvߘvmk#V9έUPKzF z(testopenfilegdb93.gdb/a00000004.gdbtableUT "U"Uux cf```r fe@PZJ X},, ~&CPʐΐX205q:R.QR,sNdбzKS>-2ˑ`M' ~mbjbYPK.}Fsv(testopenfilegdb93.gdb/a00000034.gdbtableUT "U+"Uux RKhSA=y,qnKR&~M6~464@KMb[Mua"(E\ •%R.D]S%zfKDw{s=sש&{,[ASE7:`]"Q4X9ᡧ ! ’ +JnS, 8D%-\kf91&*S3Ly٧q)BR*H5 |HX-q<ᖱE\kn+aBl<\.zZx"/+M຿5h+wC'zyAK\/욢0 4,xFh4,8qaO(d}rh+5qAbT8m-y`5u5MqR1MbEXʨ$JZs,d33BQ\={ scn7'r#^=oC;&6^Fp_VvݖVk~T!wK9KYاffb+eYW93h$:2%8_^ mbTyE,o}TRYUVY+_PK-}FTh*testopenfilegdb93.gdb/a0000002a.gdbindexesUT "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`d@hZ& J_&E]ݝD|{pcHo PpkKB\@B86V' h{Qjj^yfrANgt8X{40U YG07D:./g?+?^M 0K PK/}Fs (testopenfilegdb93.gdb/a00000027.gdbtablxUT  "U*"Uux uq(*DE*Y=BWQQe^(BQdey\Wu[[X,V?6a،]8$/sJj!Z c&bc-b/bi’QP =QYX؁}8KH  .=zca a6a' 1!QQ C1ӱk{p q|^.܋jFw |'7NFi<:hW 1a.k"}@v܅b('Q/^xc!V[8Ș A<#34J"@?vGed``PJ^ cfGc Q"P$E#,DPK/}Ff*testopenfilegdb93.gdb/a00000036.gdbindexesUT  "U+"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;VPK/}F2 (testopenfilegdb93.gdb/a00000038.gdbtablxUT  "U+"Uux  2y9hT,wݧuޞj~PK.}F+ K#testopenfilegdb93.gdb/a0000002d.spxUT "U+"Uux 1 0DY`xQ`cSt)It 7<]m$ם->o=˽PK.}FlO#testopenfilegdb93.gdb/a00000031.spxUT "U+"Uux c```aF fbf fbV F(``LD@ iQ0 F(`Q0XȣPK/}F (testopenfilegdb93.gdb/a0000003b.gdbtablxUT  "U+"Uux cf@VLPK/}F 4(testopenfilegdb93.gdb/a00000036.gdbtableUT  "U+"Uux RMhA QPO=Hm6ML564i IӈmTL)EO VTP^ċP^*7=f޼o͛ ~uͶ!˼ #!Đi7Ađt8^#^D;3Piug#vk=ƵgD^$9-[NQMpӊGI(q-P~ꄨTRWZQ5>/7m#_Txe^_\n7dx>YVB~ƪ^~H_ 46lzz{vPK.}FwA/ (testopenfilegdb93.gdb/a0000002f.gdbtablxUT "U+"Uux  !> ♁-W;5rB{ PK{FW[*testopenfilegdb93.gdb/a0000001c.gdbindexesUT Ŋ"UŊ"Uux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPK/}Fه1 (testopenfilegdb93.gdb/a00000036.gdbtablxUT  "U+"Uux   F #h *GDmܮgN v+PK-}F KT4)testopenfilegdb93.gdb/a00000029.I4int.atxUT "U+"Uux  S/y!~xXIC$m=#ъ@? e'WVPK.}F b9(testopenfilegdb93.gdb/a0000002d.gdbtableUT "U+"Uux RKhSA={/ 64cCVhHLFj#c S\A! 7nD@A7 ݨ+BA[ "{Qt7{=s:6?Eǝ/ Q鄖 Bc?`lQQts&eLb1Ɍ UG{,o7 ZO! pBJd*hѤч]Z;BZWzӐ3;OH߁RJ6qu'Pń8a^("(#AyƋK_o̿.~׿|u//> 7>ч??:V0eKV,u%g*J!(5rɨ MՋ,A*SضXkjN]vpjꦶhvY18mU"qz^̂Zԇ9w3``3f,f;VN{TG/sծLVAvqpT 1U ]bD:s.9p'_5%lƌ/ޣ3V8']3ĺ/ 9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;7ⷚfhi'FW::2,URYUPK-}F1*3(testopenfilegdb93.gdb/a00000026.I1id.atxUT "U+"Uux  S/#~Aw%H5tE%Nտ PK.}F4 (testopenfilegdb93.gdb/a00000033.gdbtablxUT "U+"Uux Q D#T QP-KP$>GDͻgUߩPKzFW[*testopenfilegdb93.gdb/a00000001.gdbindexesUT "U"Uux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPK.}F\2 (testopenfilegdb93.gdb/a0000002a.gdbtablxUT "U+"Uux ı AȲ)2w F"{D>+ܬ=#_hPK.}Fk*testopenfilegdb93.gdb/a00000032.gdbindexesUT "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`dDCՊee7 `PPZ0($݃ --Lt\CB}\<\=]bfz:FzFFFƦfƱ:A@܋RS33t buBiכEԱWRWV5}\hG\n}}y3x0T'pud|a [:t\FpꚖGp<x& \A8l 4l_n0+Xcˆ.f$,c=E(1CIN sR)Yd )XKᚺR]ݜ ^W̛V&*/Nm? zyΛsGճeRT\n WyoO~-ʟokm^=/`F^k-h-ZzU{PK.}F4 (testopenfilegdb93.gdb/a00000034.gdbtablxUT "U+"Uux Q D#T QP-KP$>GDͻgUߩPK.}FlO#testopenfilegdb93.gdb/a00000030.spxUT "U+"Uux c```aF fbf fbV F(``LD@ iQ0 F(`Q0XȣPKzF}2(testopenfilegdb93.gdb/a00000005.gdbtableUT "U"Uux cf@ʀg<3RPI@\̐s4DVr<@\fP%!l"# %PžMqm}֍rk] .Tݑs]}d+;xe PK.}Fk*testopenfilegdb93.gdb/a00000031.gdbindexesUT "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`dDCՊee7 `PPZ0($݃ --Lt\CB}\<\=]bfz:FzFFFƦfƱ:A@܋RS33t buBo=˽PK-}F1*3(testopenfilegdb93.gdb/a00000029.I4id.atxUT "U+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ņs,+.óؿƦp?ѳc*6,Eۄ38~8cv¥j ިn@ ^gypĦ̐@%c21UƺhXjĢVbO"gUHN+/s s-B HX|0pc~'|?yӑ|1ťqϪw|i={?'qRtcm2iewn~+/G6WdݞSݾؓSަbڪ/4\⊞}⯡~McJrz+ɍ"PK/}F0##testopenfilegdb93.gdb/a00000039.spxUT  "U+"Uux ȱ @1~, cd(urPK/}F ky9K (testopenfilegdb93.gdb/a00000039.gdbtablxUT  "U+"Uux ȱ 0CQ%01 Q!4r2TrKnlSp.:kdvtn 2fPK/}F0##testopenfilegdb93.gdb/a00000038.spxUT  "U+"Uux ȱ @1~, cd(urPK.}F-4 (testopenfilegdb93.gdb/a0000002b.gdbtablxUT "U+"Uux  A#K~ Ɩ"n?#SyF:_hwPK/}Fه1 (testopenfilegdb93.gdb/a00000037.gdbtablxUT  "U+"Uux   F #h *GDmܮgN v+PK.}F+ K#testopenfilegdb93.gdb/a00000033.spxUT "U+"Uux 1 0DY`xQ`cSt)It 7<]m$ם->o=˽PK-}F ( (testopenfilegdb93.gdb/a00000008.gdbtablxUT "U"Uux ?sd`3mG70( L'ՠlR(`Efse\u,8k+B /$FZ0 U!4 Ё%\ `?Lh Qm M u5|RJ)RJ)z PK.}F3i*testopenfilegdb93.gdb/a0000002d.gdbindexesUT "U+"Uux ʼ` Ï2]F&Fe( d@?Ͽ 8CC|SPB@'/WgO$ c$Yx=@y2  @5@aGw`8:wE9ˁ`d >؃¢jŲr0((}-fguwwwV&J:.!J.HBA.J13cs Ccs=#K =#Ss##cS3X O_W EyJ:z:~!@sSӁ`!CsSc#K#SCKKcVҐvJ;UyFgܬRx7)F,`PK.}FlO#testopenfilegdb93.gdb/a0000002c.spxUT "U+"Uux c```aF fbf fbV F(``LD@ iQ0 F(`Q0XȣPK-}FH(Zf (testopenfilegdb93.gdb/a00000006.gdbtablxUT "U"Uux ̱ 0FaZ,@q<%uY\RFLR *f@='OJJ)s<ț\F:H-Yȇ\̫F:yzLID$I$Iҿ߰PK l}FAtestopenfilegdb93.gdb/UT{"Uux PK-}FgX (Ptestopenfilegdb93.gdb/a00000007.gdbtablxUT"Uux PK/}F0## testopenfilegdb93.gdb/a0000003b.spxUT "Uux PK.}Fj*testopenfilegdb93.gdb/a0000002e.gdbindexesUT"Uux PK/}FB*Xtestopenfilegdb93.gdb/a00000027.gdbindexesUT "Uux PK-}FhmzC(Utestopenfilegdb93.gdb/a00000026.gdbtableUT"Uux PK/}F rl*testopenfilegdb93.gdb/a0000003b.gdbindexesUT "Uux PK-}Fi(*Ttestopenfilegdb93.gdb/a00000026.gdbindexesUT"Uux PK.}Fw3Fx(Jtestopenfilegdb93.gdb/a00000031.gdbtableUT"Uux PK-}Fߥc"-$ testopenfilegdb93.gdb/a00000029.I4nullint.atxUT"Uux PK,}F@!) ( testopenfilegdb93.gdb/a00000003.gdbtablxUT"Uux PK.}F<-B#8 testopenfilegdb93.gdb/a0000002e.spxUT"Uux PK/}F r. ( testopenfilegdb93.gdb/a00000028.gdbtablxUT "Uux PK.}FlO#g testopenfilegdb93.gdb/a0000002a.spxUT"Uux PK.}F-4 (testopenfilegdb93.gdb/a0000002c.gdbtablxUT"Uux PKzFrNhFQtestopenfilegdb93.gdb/gdbUT"Uux PK.}F'2#Btestopenfilegdb93.gdb/a0000002f.spxUT"Uux PK-}F2 (testopenfilegdb93.gdb/a00000001.gdbtablxUT"Uux PK-}FtoE*testopenfilegdb93.gdb/a00000029.I4real.atxUT"Uux PK.}Fsס (testopenfilegdb93.gdb/a00000035.gdbtableUT"Uux PK.}F o6 (testopenfilegdb93.gdb/a0000002e.gdbtablxUT"Uux PK.}FU[ 4 (&testopenfilegdb93.gdb/a00000031.gdbtablxUT"Uux PK,}F,(testopenfilegdb93.gdb/a00000003.gdbtableUT"Uux PK%}FY< "X(testopenfilegdb93.gdb/a0000001c.freelistUT"Uux PK.}FU8h*@testopenfilegdb93.gdb/a0000002c.gdbindexesUT"Uux PK.}Fk* testopenfilegdb93.gdb/a00000034.gdbindexesUT"Uux PK-}FˊE+testopenfilegdb93.gdb/a00000029.I4adate.atxUT"Uux PK.}F)#[(testopenfilegdb93.gdb/a00000030.gdbtableUT"Uux PK/}F^D3 (Btestopenfilegdb93.gdb/a00000035.gdbtablxUT "Uux PK/}F{(testopenfilegdb93.gdb/a00000038.gdbtableUT "Uux PK-}FX{(S"testopenfilegdb93.gdb/a0000001c.gdbtableUT"Uux PKzFW[*0%testopenfilegdb93.gdb/a00000005.gdbindexesUT"Uux PK.}FlO#%testopenfilegdb93.gdb/a00000032.spxUT"Uux PK/}FKۅ#&testopenfilegdb93.gdb/a0000003a.spxUT "Uux PKzF hR (}'testopenfilegdb93.gdb/a00000002.gdbtablxUT"Uux PK-}F7 (1(testopenfilegdb93.gdb/a00000026.gdbtablxUT"Uux PK-}F'2#(testopenfilegdb93.gdb/a00000029.spxUT"Uux PK/}Fspl*Y)testopenfilegdb93.gdb/a0000003a.gdbindexesUT "Uux PK/}F0##*testopenfilegdb93.gdb/a00000037.spxUT "Uux PKzFW[*5+testopenfilegdb93.gdb/a00000006.gdbindexesUT"Uux PK/}F-(+testopenfilegdb93.gdb/a0000003b.gdbtableUT "Uux PK.}FU8h*^-testopenfilegdb93.gdb/a0000002b.gdbindexesUT"Uux PK-}F2X**/testopenfilegdb93.gdb/a00000029.I4guid.atxUT"Uux PK/}F&l*/testopenfilegdb93.gdb/a00000039.gdbindexesUT "Uux PK/}Fd(?1testopenfilegdb93.gdb/a00000027.gdbtableUT "Uux PK.}Fߑi*S2testopenfilegdb93.gdb/a0000002f.gdbindexesUT"Uux PK.}F0}s( 4testopenfilegdb93.gdb/a00000032.gdbtableUT"Uux PKzF z(6testopenfilegdb93.gdb/a00000004.gdbtableUT"Uux PK.}Fsv(7testopenfilegdb93.gdb/a00000034.gdbtableUT"Uux PK-}FTh*:testopenfilegdb93.gdb/a0000002a.gdbindexesUT"Uux PK/}Fs (w<testopenfilegdb93.gdb/a00000027.gdbtablxUT "Uux PK-}FlV *b?testopenfilegdb93.gdb/a00000029.gdbindexesUT"Uux PK/}Ff*Btestopenfilegdb93.gdb/a00000036.gdbindexesUT "Uux PK/}F>8f(Ctestopenfilegdb93.gdb/a00000039.gdbtableUT "Uux PK/}FYJΙ0*Etestopenfilegdb93.gdb/a00000027.I2real.atxUT "Uux PK.}F+ul*Htestopenfilegdb93.gdb/a00000035.gdbindexesUT"Uux PKzF, % ({Jtestopenfilegdb93.gdb/a00000004.gdbtablxUT"Uux PK/}Fk(Ktestopenfilegdb93.gdb/a00000028.gdbtableUT "Uux PK/}Ff*Ktestopenfilegdb93.gdb/a00000037.gdbindexesUT "Uux PKzFy(Mtestopenfilegdb93.gdb/a00000002.gdbtableUT"Uux PK.}Fk*Otestopenfilegdb93.gdb/a00000033.gdbindexesUT"Uux PK-}F=u`6+Qtestopenfilegdb93.gdb/a00000029.I4float.atxUT"Uux PK/}F2 (GRtestopenfilegdb93.gdb/a00000038.gdbtablxUT "Uux PK.}F+ K#Rtestopenfilegdb93.gdb/a0000002d.spxUT"Uux PK.}FlO#Stestopenfilegdb93.gdb/a00000031.spxUT"Uux PK/}F (/Ttestopenfilegdb93.gdb/a0000003b.gdbtablxUT "Uux PK/}F 4(Ttestopenfilegdb93.gdb/a00000036.gdbtableUT "Uux PK.}FwA/ (0Wtestopenfilegdb93.gdb/a0000002f.gdbtablxUT"Uux PK{FW[*Wtestopenfilegdb93.gdb/a0000001c.gdbindexesUTŊ"Uux PK/}Fه1 (Xtestopenfilegdb93.gdb/a00000036.gdbtablxUT "Uux PK-}F KT4)Ytestopenfilegdb93.gdb/a00000029.I4int.atxUT"Uux PK.}F b9(Ytestopenfilegdb93.gdb/a0000002d.gdbtableUT"Uux PK.}FU[ 4 (n\testopenfilegdb93.gdb/a00000032.gdbtablxUT"Uux PK.}FlO#]testopenfilegdb93.gdb/a0000002b.spxUT"Uux PK-}F9IF)]testopenfilegdb93.gdb/a00000029.I4str.atxUT"Uux PK.}Fvj*Y^testopenfilegdb93.gdb/a00000030.gdbindexesUT"Uux PKzF ('`testopenfilegdb93.gdb/a00000005.gdbtablxUT"Uux PK.}F6b2 (`testopenfilegdb93.gdb/a00000030.gdbtablxUT"Uux PK-}Fc.rB:.&atestopenfilegdb93.gdb/a00000029.I4smallint.atxUT"Uux PK-}F?I(atestopenfilegdb93.gdb/a00000006.gdbtableUT"Uux PK/}Fcً(idtestopenfilegdb93.gdb/a0000003a.gdbtableUT "Uux PK/}FةE#Vftestopenfilegdb93.gdb/a00000035.spxUT "Uux PK/}FD+h*ftestopenfilegdb93.gdb/a00000028.gdbindexesUT "Uux PKzFW[*gtestopenfilegdb93.gdb/a00000003.gdbindexesUT"Uux PK.}Fcf(htestopenfilegdb93.gdb/a0000002c.gdbtableUT"Uux PK/}F@A (Kktestopenfilegdb93.gdb/a0000003a.gdbtablxUT "Uux PK-}FbQ! ktestopenfilegdb93.gdb/timestampsUT"Uux PK.}F\:V9(iltestopenfilegdb93.gdb/a0000002f.gdbtableUT"Uux PK-}F_ (otestopenfilegdb93.gdb/a00000008.gdbtableUT"Uux PK.}F!yv(wqtestopenfilegdb93.gdb/a00000033.gdbtableUT"Uux PK-}F1*3(Rttestopenfilegdb93.gdb/a00000026.I1id.atxUT"Uux PK.}F4 (ttestopenfilegdb93.gdb/a00000033.gdbtablxUT"Uux PKzFW[*}utestopenfilegdb93.gdb/a00000001.gdbindexesUT"Uux PK.}F\2 (e (testopenfilegdb93.gdb/a00000001.gdbtableUT"Uux PK.}FΘaf(&testopenfilegdb93.gdb/a0000002b.gdbtableUT"Uux PK-}FiMf(testopenfilegdb93.gdb/a0000002a.gdbtableUT"Uux PK-}Fkq(testopenfilegdb93.gdb/a00000007.gdbtableUT"Uux PK/}Ftwg*testopenfilegdb93.gdb/a00000038.gdbindexesUT "Uux PK.}F (testopenfilegdb93.gdb/a0000002e.gdbtableUT"Uux PK-}FaJ-(֕testopenfilegdb93.gdb/a00000029.gdbtableUT"Uux PK/}F0##etestopenfilegdb93.gdb/a00000039.spxUT "Uux PK/}F ky9K (testopenfilegdb93.gdb/a00000039.gdbtablxUT "Uux PK/}F0##testopenfilegdb93.gdb/a00000038.spxUT "Uux PK.}F-4 (testopenfilegdb93.gdb/a0000002b.gdbtablxUT"Uux PK/}Fه1 (testopenfilegdb93.gdb/a00000037.gdbtablxUT "Uux PK.}F+ K#;testopenfilegdb93.gdb/a00000033.spxUT"Uux PK-}F ( (testopenfilegdb93.gdb/a00000008.gdbtablxUT"Uux PK.}F3i*testopenfilegdb93.gdb/a0000002d.gdbindexesUT"Uux PK.}FlO#ʞtestopenfilegdb93.gdb/a0000002c.spxUT"Uux PK-}FH(Zf (vtestopenfilegdb93.gdb/a00000006.gdbtablxUT"Uux PK{{4>gdalautotest-3.1.2/ogr/data/esrizpolygon.json0000664000175000017500000000124513701057753020044 0ustar eveneven{ "objectIdFieldName" : "objectid", "globalIdFieldName" : "", "geometryType" : "esriGeometryPolygon", "fields" : [ ], "features" : [ { "geometry" : { "rings" : [ [ [ 2, 49, 1 ], [ 2, 50, 2 ], [ 3, 50, 3 ], [ 3, 49, 4 ], [ 2, 49, 1 ] ] ] }, "attributes" : { } } ] } gdalautotest-3.1.2/ogr/data/3dface.dxf0000664000175000017500000000036613701057753016240 0ustar eveneven 0 SECTION 2 ENTITIES 0 3DFACE 8 0 10 10 20 20 30 30 11 11 21 21 31 31 12 12 22 22 32 32 13 12 23 22 33 32 0 3DFACE 8 0 10 10 20 20 30 30 11 11 21 21 31 31 12 12 22 22 32 32 13 13 23 23 33 33 0 ENDSEC 0 EOF gdalautotest-3.1.2/ogr/data/test.gpx0000664000175000017500000000315513701057753016106 0ustar eveneven 2 waypoint name waypoint comment waypoint description waypoint source texttype text2type2 text3type3 route name 7 route point name 10 13 empty route track name 16 track point name 19 22 25 empty track empty track 2 gdalautotest-3.1.2/ogr/data/nomid.mif0000664000175000017500000000066313701057753016213 0ustar evenevenVersion 300 Charset "WindowsLatin1" Columns 0 Data Region 1 6 407131.721 155322.441 407134.468 155329.616 407142.741 155327.242 407141.503 155322.467 407140.875 155320.049 407131.721 155322.441 Brush (1, 0, 16777215) Pen (1, 2, 0) Region 1 6 407128.974 155315.266 407131.721 155322.441 407140.875 155320.049 407139.552 155314.949 407138.932 155312.559 407128.974 155315.266 Brush (1, 0, 16777215) Pen (1, 2, 0) gdalautotest-3.1.2/ogr/data/gjmultipoint.shp0000664000175000017500000000026413701057753017646 0ustar eveneven' ZY@@Y@?$Y@@Y@?Y@@Y@?gdalautotest-3.1.2/ogr/data/esrizlinestring.json0000664000175000017500000000066613701057753020541 0ustar eveneven{ "objectIdFieldName" : "objectid", "globalIdFieldName" : "", "geometryType" : "esriGeometryPolyline", "fields" : [ ], "features" : [ { "geometry" : { "paths" : [ [ [ 2, 49, 1 ], [ 3, 50, 2 ] ] ] }, "attributes" : { } } ] } gdalautotest-3.1.2/ogr/data/empty.shp0000664000175000017500000000014413701057753016254 0ustar eveneven' 2gdalautotest-3.1.2/ogr/data/expected_000_GRD.txt0000664000175000017500000000215013701057753020016 0ustar eveneven//$DELIMITER " " //$QUOTED-TEXT "no" //$CHARSET ANSI //$UNIT Distance:m //$FORMAT 2 //$SYSCOORD {Type: 1006} //$FIELDS Class=000_GRD;Subclass=000_GRD;Kind=4;Fields=Private#Identifier Private#Class Private#Subclass Private#Name Private#NbFields idSel nom withdata Private#X Private#Y Private#Graphics -1 000_GRD 000_GRD 000_GRD 3 000-2007-0050-7130-LAMB93 0 50000.00 7130000.00 4 600000.00 7130000.00 600000.00 6580000.00 50000.00 6580000.00 50000.00 7130000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0595-7130-LAMB93 0 595000.00 7130000.00 4 1145000.00 7130000.00 1145000.00 6580000.00 595000.00 6580000.00 595000.00 7130000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0595-6585-LAMB93 0 595000.00 6585000.00 4 1145000.00 6585000.00 1145000.00 6035000.00 595000.00 6035000.00 595000.00 6585000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-1145-6250-LAMB93 0 1145000.00 6250000.00 4 1265000.00 6250000.00 1265000.00 6030000.00 1145000.00 6030000.00 1145000.00 6250000.00 -1 000_GRD 000_GRD 000_GRD 3 000-2007-0050-6585-LAMB93 0 50000.00 6585000.00 4 600000.00 6585000.00 600000.00 6035000.00 50000.00 6035000.00 50000.00 6585000.00 gdalautotest-3.1.2/ogr/data/ESSENCE_NAIPF_ORI_PROV_sub93.gdb.zip0000664000175000017500000004152013701057753022272 0ustar evenevenPK AE!ESSENCE_NAIPF_ORI_PROV_sub93.gdb/UT c0+T+Tux PKtD 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000007.gdbtablxUT ܑcS+Tux cf@VLPKMu>EW[5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000018.gdbindexesUT 2*T+Tux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPKt>ED+h5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000027.gdbindexesUT *T+Tux ʼ` Ï2]FFFeh31#i/;_dE!?+3C' g, FD PKOu>Ev74X3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.freelistUT 6*T+Tux ׹ ! EOB=s $ϒ݀K>ٯxP{PKtD 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000003.gdbtablxUT ܑcS+Tux cf@VLPKtD"EQ$ESSENCE_NAIPF_ORI_PROV_sub93.gdb/gdbUT ޑcS+Tux cb``T`@@Ć@!h1׉r+I{Sի25_Z̃Eg1^ef{`$PKOu>E伆 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.gdbtablxUT 6*T+Tux α a:p!hiV`#mp) >"*#ExyXA3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.freelistUT 6*T+Tux ױ B1Лظ#X885+?`%ZxEHzh (c3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.gdbtableUT 6*T+Tux Kƕ~C 2 ,Q'^9\kIQu%I ȑ]]AOSN9@ @ Ǣ豧{3CJql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RNsKI8PKMu>E%3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000018.gdbtableUT 2*T+Tux cf@ʀ'<3̐ÐP `!F`R$JTg| M7$Dzd%6≚\n>)},goĞ4Se:Ƽ"buV/[OK^PKtDໄ~~3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000004.gdbtableUT ޑcS+Tux cf```r fe@PZJ X}@, ~&CPʐΐX205\txr(SeRok;5_vˍtGU|x`PKt>E 2 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000027.gdbtablxUT *TO$+Tux  D/{4Bfa{UsvY ?PKtD, % 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000004.gdbtablxUT ޑcS+Tux  !,_Bf`KL2^uZ~?PKtDM3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000002.gdbtableUT ܑcS+Tux cf``@ʀ3! 1hvoTJr|" oC"P !(]E ~PL 3POCC&C:C0PQd8@Nd`*4Qj5Vk\KڑrZV>]}?Xyf?G05pqus fqQHUHIMK,)QHI,ILIUHKL/-J,S@)f5$(9?(85E 0 GwW6ϼ̼TEUN0%i E2(x}#<}\=\ C,A\ _hh `Ԋ4O+i6+XLxw'U: |Ċ\DgV*v<)FUhdjVd-X(5qj5+X cQx9p^2<SsSK*,6mzA6PKtDW[5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.gdbindexesUT cS+Tux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPKtD 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000005.gdbtablxUT ܑcS+Tux cf@VLPKOu>E\93ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000006.gdbtableUT 6*T+Tux cf```bg = 7#րA  L . l,L<. %@ ~@:H3(0Ldg(g XjX8r2J2p23r0X|.aQ€. `b  < @w0T2u:dO Pr@+d`?]iS8] /Y'_gïtJn kkp_g[g|XZk-qIPKtDW[5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000003.gdbindexesUT ܑcS+Tux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPKZu>Ekח'+ESSENCE_NAIPF_ORI_PROV_sub93.gdb/timestampsUT L*T+Tux 6 J3if fd(9l.  PKLu>E3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000008.gdbtableUT 0*T+Tux cf```&  Bk@ yfb.vgDb dp 0p1d2Sr@6#P8Uӗ!]JI %Ka(BUd٩ @^XK:a~@2! *y ( M:YV>L0P4 hB%CP ^W /".^%(l x\]QL[\=V ?CBzx Syڍ|W+Es &tXxPKtDW[5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.gdbindexesUT ڑcS+Tux ʼ` Ï2]FFFeh31#i/;_dE6' H#T? TR€`DbPKtD+G93ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000005.gdbtableUT ܑcS+Tux cf@ʀg<3RPI@\̐s4DVr<@\fP%!l"#g5q*/Wv8 g?9#s߅K-2:pPKMu>E 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000018.gdbtablxUT 2*T+Tux cf@VLPKOu>EP2 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.gdbtablxUT 6*T+Tux  DXY) L쉻1sVx?)PKLu>EY2X3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000008.freelistUT 0*T+Tux ׹ sGTN<d- #g{߼PKOu>Eʳ3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.gdbtableUT 6*T+Tux }yPWbU< r uFC6Ш L, d+3vH9 ǣ}kgJdeA8LJXiဂci 7: gTruCooo4^ |4_ m2,OǝlD=~~ KO%hǯҸYyVF!͏2 kC=־Jk leM>sc&'4LFݡ>CqY"W"N4x f:;R=w|,Q98NrKF|k2\-4e68ic;l)/^z=ԩ8Ύ)GekN@d÷$nġa^ݣͩŴճ/jf˖[#A+MYJ{󙗸/=o'I]6A1,bm,juʅm#ޫZyG5 }ǰ1Ҹ񧔾 sLa#vSnTe)Lҟ0} `!9?Z?m,OXȍoqV&悖5Q'N I w=CCVb'j5ɛƇ~ $cn 8}Nv)o"լ㓮s1vH3:~׷/`}obMźX!Jʷ]%kqT f[M,-pC/"JVo=wkMDw(cgFW'sgAtA"k/6Oۖ_nJLux5 G o[~XJ}0;a;|| $@~T/(3Y~H z)/??xbVэӞFXd{EزS:zGFF^#M&;[׫Ym~n/NPMwH?~MR9E^ₘ])ғPKtDTl N3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000007.gdbtableUT ܑcS+Tux cf@ʀ2ZI13$1d12$30830$2' H P.(WPd0T2i;ϐ $K\ @ C&aHa``q \d1dìee`wA3b L@@OWѢیt뼘|RgL^ ,Y,j=./tbPKLu>EZ3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000017.gdbtableUT 0*T+Tux cf@ʀߡ<3R̐ÐP .@AN7LTx P.f`q`a`f(eHb(ad( Yi@@-%@-@-I@"E@\ !hk-!oKqZV4Rk\_N*A˷KcL 99G6L bPKLu>EC$ 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000008.gdbtablxUT 0*T+Tux  { 6T}O^PKOu>E@$ 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000006.gdbtablxUT 6*T+Tux  {a, 6T}O^PK AE!AESSENCE_NAIPF_ORI_PROV_sub93.gdb/UTc0+Tux PKtD 3[ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000007.gdbtablxUTܑcSux PKMu>EW[5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000018.gdbindexesUT2*Tux PKt>ED+h5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000027.gdbindexesUT*Tux PKOu>Ev74X3rESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.freelistUT6*Tux PKtD 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000003.gdbtablxUTܑcSux PKtD"EQ$ESSENCE_NAIPF_ORI_PROV_sub93.gdb/gdbUTޑcSux PKOu>E伆 3,ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.gdbtablxUT6*Tux PKtD)_3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000003.gdbtableUTܑcSux PKOu>ExyXA3EESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.freelistUT6*Tux PKOu>EHzh (c3+ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.gdbtableUT6*Tux PKLu>E 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000017.gdbtablxUT0*Tux PKtDW[5vESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000005.gdbindexesUTܑcSux PKtDQO 3@ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000002.gdbtablxUTܑcSux PKOu>E`4X3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000006.freelistUT6*Tux PKtDW[5ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000006.gdbindexesUTܑcSux PKt>Ej)3gESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000027.gdbtableUT*Tux PKMu>E%3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000018.gdbtableUT2*Tux PKtDໄ~~3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000004.gdbtableUTޑcSux PKt>E 2 3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000027.gdbtablxUT*Tux PKtD, % 3lESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000004.gdbtablxUTޑcSux PKtDM3ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000002.gdbtableUTܑcSux PKtDW[5IESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.gdbindexesUTcSux PKtD 3 ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000005.gdbtablxUTܑcSux PKOu>E\93 ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000006.gdbtableUT6*Tux PKtDW[5/"ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000003.gdbindexesUTܑcSux PKZu>Ekח'+"ESSENCE_NAIPF_ORI_PROV_sub93.gdb/timestampsUTL*Tux PKLu>E3#ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000008.gdbtableUT0*Tux PKtDW[5%ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.gdbindexesUTڑcSux PKtD+G93%ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000005.gdbtableUTܑcSux PKMu>E 3&ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000018.gdbtablxUT2*Tux PKOu>EP2 3M'ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a0000001c.gdbtablxUT6*Tux PKLu>EY2X3'ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000008.freelistUT0*Tux PKOu>Eʳ3(ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000001.gdbtableUT6*Tux PKtDTl N3-ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000007.gdbtableUTܑcSux PKLu>EZ3/ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000017.gdbtableUT0*Tux PKLu>EC$ 3=0ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000008.gdbtablxUT0*Tux PKOu>E@$ 30ESSENCE_NAIPF_ORI_PROV_sub93.gdb/a00000006.gdbtablxUT6*Tux PK&&_1gdalautotest-3.1.2/ogr/data/poly.tar.gz0000664000175000017500000000420113701057753016512 0ustar evenevenKXl[W~][R46bi0{jWIhyXNIH L `+6V61'Ih HT l|W'n+ Risݼsfܧ,aSeM3kރh[ٖ"ԥT*Wr%!|Z~׳HlO=I%pfy= 4Y̶~2DŽfm[ivܰT05M4n:I\s\ӍV?[K9q!g:1-o[f9s?~Vr4ׁiznǃqmj䧺-lÌFp~Ű[ڶ hv/.Z%[>`K9u_ gZWoD͌ nkTʳb8W)ssbTDS#m@r|"=ϲllt{*3240IJgFĎeK-s1C7]۴tJ,ÅHTN ˸|1-CwuKs]Sa5H OFKbPTgt2_Hd&N29C3|PDMe:_rsyBN:m\>/7Dr]V5ќ6}99|\)Q$Q/Uf.}|h|%/Ц_=c\{ˍ/ml7mU$z+ Sں'wg{|ڗIv֖ b)_Fb׿=ӌ83Dw`׿q;Ezy}{µ ?2ܶO'ZM1ܶL}$%B.w?>A}SuSK'75lўF.xyXyyxǷ!NoRVoEo!y.oi_k^¨y<妆a{i:jy@y=Ph5 |eOمg@uKaԱ<}WVno5o%\OΣEG*6[pV7 GmDy֫|%ݎkhKP׏4u/; =+Ừ׃y"1?J ~/jEPyb I5\np]u5{tGڐȍ >o束'j3M EeeboES4Vm򬓿(^+꽅}:O'oНxXc4Q:O%~}l-W cGa?Av)<]X 8,.`UN^ȇrJu~>wUp$ c~?x^^7yyGa6+IZy*Sd{;K6uh!/JA~W}p"Uz?]}(Y'p:u9\'r:G[P+gp}G\_r}^\Y]՝Fyُ'J؟B'||%tN~󹙟9cx}o+ 9<q)s}C>?OՆ_ڮ_;|3nL?e.3zN'NɟKuT޷ɾxp?Oz^? '>Zۺۺۺ-h((gdalautotest-3.1.2/ogr/ogr_openair.py0000775000175000017500000000563613701060010016341 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_openair.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR OpenAir driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import ogr import pytest ############################################################################### # Basic test def test_ogr_openair_1(): ds = ogr.Open('data/openair_test.txt') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayerByName('airspaces') assert lyr is not None, 'cannot find layer airspaces' feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() if ogrtest.check_feature_geometry(feat, 'POLYGON ((49.75 2.75,49.75 3.0,49.5 3.0,49.5 2.75,49.75 2.75))', max_error=0.0000001) != 0: print('did not get expected first geom') pytest.fail(geom.ExportToWkt()) style = feat.GetStyleString() assert style == 'PEN(c:#0000FF,w:2pt,p:"5px 5px");BRUSH(fc:#00FF00)', \ 'did not get expected style' lyr = ds.GetLayerByName('labels') assert lyr is not None, 'cannot find layer labels' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() if ogrtest.check_feature_geometry(feat, 'POINT (49.2625 2.504166666666667)', max_error=0.0000001) != 0: print('did not get expected geom on labels layer') pytest.fail(geom.ExportToWkt()) gdalautotest-3.1.2/ogr/ogr_refcount.py0000775000175000017500000000724513701060010016527 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_refcount.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test "shared" open, and various refcount based stuff. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest from osgeo import ogr ############################################################################### # Open two datasets in shared mode. def test_ogr_refcount_1(): # if ogr.GetOpenDSCount() != 0: # gdaltest.post_reason( 'Initial Open DS count is not zero!' ) # return 'failed' gdaltest.ds_1 = ogr.OpenShared('data/idlink.dbf') gdaltest.ds_2 = ogr.OpenShared('data/poly.shp') # if ogr.GetOpenDSCount() != 2: # gdaltest.post_reason( 'Open DS count not 2 after shared opens.' ) # return 'failed' if gdaltest.ds_1.GetRefCount() != 1 or gdaltest.ds_2.GetRefCount() != 1: gdaltest.post_reason('Reference count not 1 on one of datasources.') return 'failed' ############################################################################### # Verify that reopening one of the datasets returns the existing shared handle. def test_ogr_refcount_2(): ds_3 = ogr.OpenShared('data/idlink.dbf') # if ogr.GetOpenDSCount() != 2: # gdaltest.post_reason( 'Open DS count not 2 after third open.' ) # return 'failed' # This test only works with the old bindings. try: if ds_3._o != gdaltest.ds_1._o: gdaltest.post_reason('We did not get the expected pointer.') return 'failed' except: pass if ds_3.GetRefCount() != 2: gdaltest.post_reason('Refcount not 2 after reopened.') return 'failed' gdaltest.ds_3 = ds_3 ############################################################################### # Verify that releasing the datasources has the expected behaviour. def test_ogr_refcount_3(): gdaltest.ds_3.Release() if gdaltest.ds_1.GetRefCount() != 1: gdaltest.post_reason('Refcount not decremented as expected.') return 'failed' gdaltest.ds_1.Release() ############################################################################### # Verify that we can walk the open datasource list. def test_ogr_refcount_4(): with gdaltest.error_handler(): ds = ogr.GetOpenDS(0) try: if ds._o != gdaltest.ds_2._o: gdaltest.post_reason('failed to fetch expected datasource') return 'failed' except: pass ############################################################################### def test_ogr_refcount_cleanup(): gdaltest.ds_2.Release() gdalautotest-3.1.2/ogr/ogr_db2.py0000775000175000017500000001567613701060010015360 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # # Project: GDAL/OGR Test Suite # Purpose: Test DB2 vector driver # # Author: David Adler # ############################################################################### # Copyright (c) 2015, David Adler # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### # Before this test is run with a real database connection, # set DB2_TEST_SERVER to point to the server and table to be used, like: # DB2_TEST_SERVER=Database=SAMP105;DSN=SAMP105A;tables=TEST.ZIPPOINT # or # DB2_TEST_SERVER=Database=SAMP105;Driver={IBM DB2 CLIDRIVER};Hostname=<>;Port=<>;PROTOCOL=TCPIP;UID=<>;PWD=<>;tables=TEST.ZIPPOINT # # Also before running, the db2 setup script must be run to create the # needed SRS and test tables # In a DB2 command window, connect to a database and issue a command like # db2 -tvf ogr\data\db2\db2_setup.sql # # These tests currently only run on Windows import os import ogrtest from osgeo import ogr import pytest ############################################################################### # Test if driver is available def test_ogr_db2_check_driver(): ogrtest.db2_drv = None ogrtest.db2_drv = ogr.GetDriverByName('DB2ODBC') if ogrtest.db2_drv is None: pytest.skip() ############################################################################### # Test if environment variable for DB2 connection is set and we can connect def test_ogr_db2_init(): if ogrtest.db2_drv is None: pytest.skip() if 'DB2_TEST_SERVER' in os.environ: ogrtest.db2_test_server = "DB2ODBC:" + os.environ['DB2_TEST_SERVER'] else: ogrtest.db2_drv = None pytest.skip('Environment variable DB2_TEST_SERVER not found') ############################################################################### # Test GetFeatureCount() def test_ogr_db2_GetFeatureCount(): if ogrtest.db2_drv is None: pytest.skip() ds = ogr.Open(ogrtest.db2_test_server) assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None count = lyr.GetFeatureCount() assert count == 5, 'did not get expected feature count' ############################################################################### # Test GetSpatialRef() def test_ogr_db2_GetSpatialRef(): if ogrtest.db2_drv is None: pytest.skip() ds = ogr.Open(ogrtest.db2_test_server) assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None sr = lyr.GetSpatialRef() assert sr is not None, 'did not get expected srs' txt = sr.ExportToWkt() assert txt.find('GEOGCS[\"GCS_WGS_1984') != -1, 'did not get expected srs' ############################################################################### # Test GetExtent() def test_ogr_db2_GetExtent(): if ogrtest.db2_drv is None: pytest.skip() ds = ogr.Open(ogrtest.db2_test_server) assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None extent = lyr.GetExtent() assert extent is not None, 'did not get extent' assert extent == (-122.030745, -121.95672, 37.278665, 37.440885), \ 'did not get expected extent' ############################################################################### # Test GetFeature() def test_ogr_db2_GetFeature(): if ogrtest.db2_drv is None: pytest.skip() ds = ogr.Open(ogrtest.db2_test_server) assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None feat = lyr.GetFeature(5) assert feat is not None, 'did not get a feature' if feat.GetField('ZIP') != '95008': feat.DumpReadable() pytest.fail('did not get expected feature') ############################################################################### # Test SetSpatialFilter() def test_ogr_db2_SetSpatialFilter(): if ogrtest.db2_drv is None: pytest.skip() ds = ogr.Open(ogrtest.db2_test_server) assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None # set a query envelope so we only get one feature lyr.SetSpatialFilterRect(-122.02, 37.42, -122.01, 37.43) count = lyr.GetFeatureCount() assert count == 1, 'did not get expected feature count (1)' feat = lyr.GetNextFeature() assert feat is not None, 'did not get a feature' if feat.GetField('ZIP') != '94089': feat.DumpReadable() pytest.fail('did not get expected feature') # start over with a larger envelope to get 3 out of 5 of the points lyr.ResetReading() lyr.SetSpatialFilterRect(-122.04, 37.30, -121.80, 37.43) count = lyr.GetFeatureCount() assert count == 3, 'did not get expected feature count (3)' # iterate through the features to make sure we get the same count count = 0 feat = lyr.GetNextFeature() while feat is not None: count = count + 1 feat = lyr.GetNextFeature() assert count == 3, 'did not get expected feature count (3)' # # test what capabilities the DB2 driver provides # def test_ogr_db2_capabilities(): if ogrtest.db2_drv is None: pytest.skip() ds = ogr.Open(ogrtest.db2_test_server) assert ds is not None layer = ds.GetLayer() capabilities = [ ogr.OLCRandomRead, ogr.OLCSequentialWrite, ogr.OLCRandomWrite, ogr.OLCFastSpatialFilter, ogr.OLCFastFeatureCount, ogr.OLCFastGetExtent, ogr.OLCCreateField, ogr.OLCDeleteField, ogr.OLCReorderFields, ogr.OLCAlterFieldDefn, ogr.OLCTransactions, ogr.OLCDeleteFeature, ogr.OLCFastSetNextByIndex, ogr.OLCStringsAsUTF8, ogr.OLCIgnoreFields ] print("Layer Capabilities:") for cap in capabilities: print(" %s = %s" % (cap, layer.TestCapability(cap))) def ogr_db2_listdrivers(): cnt = ogr.GetDriverCount() formatsList = [] # Empty List for i in range(cnt): driver = ogr.GetDriver(i) driverName = driver.GetName() # print driverName if driverName not in formatsList: formatsList.append(driverName) formatsList.sort() # Sorting the messy list of ogr drivers for i in formatsList: print(i) gdalautotest-3.1.2/ogr/ogr_shape_qix.py0000775000175000017500000002165313701060010016662 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_shape_qix.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test shapefile spatial index mechanism (.qix files). This can serve # as a test for the functionality of shapelib's shptree.c # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import random from osgeo import ogr ############################################################################### # def check_qix_non_overlapping_geoms(lyr): geoms = [] lyr.SetSpatialFilter(None) extents = lyr.GetExtent() fc_ref = lyr.GetFeatureCount() feat = lyr.GetNextFeature() while feat is not None: geom = feat.GetGeometryRef() geoms.append(geom.Clone()) feat = lyr.GetNextFeature() # Test getting each geom 1 by 1 for geom in geoms: bbox = geom.GetEnvelope() lyr.SetSpatialFilterRect(bbox[0], bbox[2], bbox[1], bbox[3]) lyr.ResetReading() feat = lyr.GetNextFeature() got_geom = feat.GetGeometryRef() assert got_geom.Equals(geom) != 0, \ ('expected %s. got %s' % (geom.ExportToWkt(), got_geom.ExportToWkt())) # Get all geoms in a single gulp. We do not use exactly the extent bounds, because # there is an optimization in the shapefile driver to skip the spatial index in that # case. That trick can only work with non point geometries of course lyr.SetSpatialFilterRect(extents[0] + 0.001, extents[2] + 0.001, extents[1] - 0.001, extents[3] - 0.001) lyr.ResetReading() fc = lyr.GetFeatureCount() assert fc == fc_ref, ('expected %d. got %d' % (fc_ref, fc)) ############################################################################### def build_rectangle_from_point(x, y, radius=0.1): return ogr.CreateGeometryFromWkt('POLYGON((%f %f,%f %f,%f %f,%f %f,%f %f))' % (x - radius, y - radius, x - radius, y + radius, x + radius, y + radius, x + radius, y - radius, x - radius, y - radius)) ############################################################################### # Test geoms on a 10x10 grid def test_ogr_shape_qix_1(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource('/vsimem/ogr_shape_qix.shp') lyr = ds.CreateLayer("ogr_shape_qix") for x in range(10): for y in range(10): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(build_rectangle_from_point(x, y)) lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('CREATE SPATIAL INDEX ON ogr_shape_qix') ds = None ds = ogr.Open('/vsimem/ogr_shape_qix.shp') lyr = ds.GetLayer(0) ret = check_qix_non_overlapping_geoms(lyr) shape_drv.DeleteDataSource('/vsimem/ogr_shape_qix.shp') return ret ############################################################################### # Test geoms on a 100x100 grid def test_ogr_shape_qix_2(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource('/vsimem/ogr_shape_qix.shp') lyr = ds.CreateLayer("ogr_shape_qix") for x in range(100): for y in range(100): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(build_rectangle_from_point(x, y)) lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('CREATE SPATIAL INDEX ON ogr_shape_qix') ds = None ds = ogr.Open('/vsimem/ogr_shape_qix.shp') lyr = ds.GetLayer(0) ret = check_qix_non_overlapping_geoms(lyr) shape_drv.DeleteDataSource('/vsimem/ogr_shape_qix.shp') return ret ############################################################################### # Test 2 separated regions of 10x10 geoms def test_ogr_shape_qix_3(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource('/vsimem/ogr_shape_qix.shp') lyr = ds.CreateLayer("ogr_shape_qix") for x in range(10): for y in range(10): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(build_rectangle_from_point(x, y)) lyr.CreateFeature(feat) feat = None for x in range(10): for y in range(10): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(build_rectangle_from_point(x + 1000, y)) lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('CREATE SPATIAL INDEX ON ogr_shape_qix') ds = None ds = ogr.Open('/vsimem/ogr_shape_qix.shp') lyr = ds.GetLayer(0) ret = check_qix_non_overlapping_geoms(lyr) shape_drv.DeleteDataSource('/vsimem/ogr_shape_qix.shp') return ret ############################################################################### # def check_qix_random_geoms(lyr): geoms = [] lyr.SetSpatialFilter(None) extents = lyr.GetExtent() fc_ref = lyr.GetFeatureCount() feat = lyr.GetNextFeature() while feat is not None: geom = feat.GetGeometryRef() geoms.append(geom.Clone()) feat = lyr.GetNextFeature() # Test getting each geom 1 by 1 for geom in geoms: bbox = geom.GetEnvelope() lyr.SetSpatialFilterRect(bbox[0], bbox[2], bbox[1], bbox[3]) lyr.ResetReading() found_geom = False feat = lyr.GetNextFeature() while feat is not None and found_geom is False: got_geom = feat.GetGeometryRef() if got_geom.Equals(geom) == 1: found_geom = True else: feat = lyr.GetNextFeature() assert found_geom, ('did not find geometry for %s' % (geom.ExportToWkt())) # Get all geoms in a single gulp. We do not use exactly the extent bounds, because # there is an optimization in the shapefile driver to skip the spatial index in that # case. That trick can only work with non point geometries of course lyr.SetSpatialFilterRect(extents[0] + 0.001, extents[2] + 0.001, extents[1] - 0.001, extents[3] - 0.001) lyr.ResetReading() fc = lyr.GetFeatureCount() assert fc == fc_ref, ('expected %d. got %d' % (fc_ref, fc)) ############################################################################### def build_rectangle(x1, y1, x2, y2): return ogr.CreateGeometryFromWkt('POLYGON((%f %f,%f %f,%f %f,%f %f,%f %f))' % (x1, y1, x1, y2, x2, y2, x2, y1, x1, y1)) ############################################################################### # Test random geometries def test_ogr_shape_qix_4(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource('/vsimem/ogr_shape_qix.shp') lyr = ds.CreateLayer("ogr_shape_qix") # The 1000,200,10 figures are such that there are # a bit of overlapping between the geometries for _ in range(1000): feat = ogr.Feature(lyr.GetLayerDefn()) x1 = random.randint(0, 200) y1 = random.randint(0, 200) x2 = x1 + random.randint(1, 10) y2 = y1 + random.randint(1, 10) feat.SetGeometry(build_rectangle(x1, y1, x2, y2)) lyr.CreateFeature(feat) feat = None # And add statistically non overlapping features for _ in range(1000): feat = ogr.Feature(lyr.GetLayerDefn()) x1 = random.randint(0, 10000) y1 = random.randint(0, 10000) x2 = x1 + random.randint(1, 10) y2 = y1 + random.randint(1, 10) feat.SetGeometry(build_rectangle(x1, y1, x2, y2)) lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('CREATE SPATIAL INDEX ON ogr_shape_qix') ret = check_qix_random_geoms(lyr) shape_drv.DeleteDataSource('/vsimem/ogr_shape_qix.shp') return ret gdalautotest-3.1.2/ogr/ogr_pg.py0000775000175000017500000052201513701060010015305 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_pg.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test PostGIS driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2008-2013, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import sys import shutil import pytest import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal pytestmark = pytest.mark.require_driver('PostgreSQL') ############################################################################### # Return true if 'layer_name' is one of the reported layers of pg_ds def ogr_pg_check_layer_in_list(ds, layer_name): for i in range(0, ds.GetLayerCount()): name = ds.GetLayer(i).GetName() if name == layer_name: return True return False # # To create the required PostGIS instance do something like: # # $ createdb autotest # $ createlang plpgsql autotest # $ psql autotest < ~/postgis.sql # ############################################################################### # Run tests with PostGIS enabled and then with PostGIS disabled @pytest.fixture( params=['postgis', 'no-postgis'], scope='module', autouse=True ) def with_and_without_postgis(request): test_ogr_pg_1() if gdaltest.pg_ds is None: pytest.skip() with_postgis = request.param == 'postgis' if with_postgis and not gdaltest.pg_has_postgis: pytest.skip() with gdaltest.config_option("PG_USE_POSTGIS", 'YES' if with_postgis else 'NO'): yield with_postgis ############################################################################### # Open Database. def test_ogr_pg_1(): gdaltest.pg_ds = None gdaltest.pg_use_copy = gdal.GetConfigOption('PG_USE_COPY', None) val = gdal.GetConfigOption('OGR_PG_CONNECTION_STRING', None) if val is not None: gdaltest.pg_connection_string = val else: gdaltest.pg_connection_string = 'dbname=autotest' # gdaltest.pg_connection_string='dbname=autotest-postgis1.4' # gdaltest.pg_connection_string='dbname=autotest port=5432' # gdaltest.pg_connection_string='dbname=autotest-postgis2.0' # gdaltest.pg_connection_string='dbname=autotest host=127.0.0.1 port=5433 user=postgres' # gdaltest.pg_connection_string='dbname=autotest host=127.0.0.1 port=5434 user=postgres' # gdaltest.pg_connection_string='dbname=autotest port=5435 host=127.0.0.1' # 7.4 # gdaltest.pg_connection_string='dbname=autotest port=5436 user=postgres' try: gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) gdal.PopErrorHandler() except: gdaltest.pg_ds = None gdal.PopErrorHandler() if gdaltest.pg_ds is None: pytest.skip() sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT version()') feat = sql_lyr.GetNextFeature() version_str = feat.GetFieldAsString('version') gdaltest.pg_ds.ReleaseResultSet(sql_lyr) gdaltest.pg_retrieve_fid = False if version_str[0:11] == "PostgreSQL ": v = version_str[11:14] if v.endswith('b'): v = v[0:-1] if float(v) >= 8.2: gdaltest.pg_retrieve_fid = True gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.pg_ds.ExecuteSQL('SHOW standard_conforming_strings') gdal.PopErrorHandler() gdaltest.pg_quote_with_E = sql_lyr is not None gdaltest.pg_ds.ReleaseResultSet(sql_lyr) gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT postgis_version()') gdaltest.pg_has_postgis = sql_lyr is not None gdaltest.pg_has_postgis_2 = False if gdaltest.pg_has_postgis: feat = sql_lyr.GetNextFeature() version_str = feat.GetFieldAsString('postgis_version') gdaltest.pg_has_postgis_2 = (float(version_str[0:3]) >= 2.0) gdaltest.pg_ds.ReleaseResultSet(sql_lyr) gdal.PopErrorHandler() if gdaltest.pg_has_postgis: if gdal.GetConfigOption('PG_USE_POSTGIS', 'YES') == 'YES': print('PostGIS available !') else: gdaltest.pg_has_postgis = False gdaltest.pg_has_postgis_2 = False print('PostGIS available but will NOT be used because of PG_USE_POSTGIS=NO !') else: gdaltest.pg_has_postgis = False print('PostGIS NOT available !') ############################################################################### # Create table from data/poly.shp def test_ogr_pg_2(): if gdaltest.pg_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds.ExecuteSQL('DELLAYER:tpoly') gdal.PopErrorHandler() ###################################################### # Create Layer gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('tpoly', options=['DIM=3']) ###################################################### # Check capabilities if gdaltest.pg_has_postgis: assert gdaltest.pg_lyr.TestCapability(ogr.OLCFastSpatialFilter) assert gdaltest.pg_lyr.TestCapability(ogr.OLCFastGetExtent) else: assert not gdaltest.pg_lyr.TestCapability(ogr.OLCFastSpatialFilter) assert not gdaltest.pg_lyr.TestCapability(ogr.OLCFastGetExtent) assert gdaltest.pg_lyr.TestCapability(ogr.OLCRandomRead) assert gdaltest.pg_lyr.TestCapability(ogr.OLCFastFeatureCount) assert gdaltest.pg_lyr.TestCapability(ogr.OLCFastSetNextByIndex) try: ogr.OLCStringsAsUTF8 assert gdaltest.pg_lyr.TestCapability(ogr.OLCStringsAsUTF8) except: pass assert gdaltest.pg_lyr.TestCapability(ogr.OLCSequentialWrite) assert gdaltest.pg_lyr.TestCapability(ogr.OLCCreateField) assert gdaltest.pg_lyr.TestCapability(ogr.OLCRandomWrite) assert gdaltest.pg_lyr.TestCapability(ogr.OLCTransactions) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.pg_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8), ('REALLIST', ogr.OFTRealList)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.pg_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] expected_fid = 1 while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.pg_lyr.CreateFeature(dst_feat) if gdaltest.pg_retrieve_fid: got_fid = dst_feat.GetFID() assert got_fid == expected_fid, \ ("didn't get expected fid : %d instead of %d" % (got_fid, expected_fid)) expected_fid = expected_fid + 1 feat = shp_lyr.GetNextFeature() dst_feat.Destroy() ############################################################################### # Test reading a layer extent def test_ogr_pg_19(): if gdaltest.pg_ds is None: pytest.skip() layer = gdaltest.pg_ds.GetLayerByName('tpoly') assert layer is not None, 'did not get tpoly layer' extent = layer.GetExtent() expect = (478315.53125, 481645.3125, 4762880.5, 4765610.5) minx = abs(extent[0] - expect[0]) maxx = abs(extent[1] - expect[1]) miny = abs(extent[2] - expect[2]) maxy = abs(extent[3] - expect[3]) if max(minx, maxx, miny, maxy) > 0.0001: print(extent) pytest.fail('Extents do not match') estimated_extent = layer.GetExtent(force=0) if not gdaltest.pg_has_postgis: # The OGRLayer default implementation in force = 0 returns error if estimated_extent != (0, 0, 0, 0): print(extent) pytest.fail('Wrong estimated extent') else: # Better testing needed ? if estimated_extent == (0, 0, 0, 0): print(extent) pytest.fail('Wrong estimated extent') ############################################################################### # Test reading a SQL result layer extent def test_ogr_pg_19_2(): if gdaltest.pg_ds is None: pytest.skip() sql_lyr = gdaltest.pg_ds.ExecuteSQL('select * from tpoly') extent = sql_lyr.GetExtent() expect = (478315.53125, 481645.3125, 4762880.5, 4765610.5) minx = abs(extent[0] - expect[0]) maxx = abs(extent[1] - expect[1]) miny = abs(extent[2] - expect[2]) maxy = abs(extent[3] - expect[3]) assert max(minx, maxx, miny, maxy) <= 0.0001, 'Extents do not match' gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_pg_3(): if gdaltest.pg_ds is None: pytest.skip() assert gdaltest.pg_lyr.GetFeatureCount() == 10 expect = [168, 169, 166, 158, 165] gdaltest.pg_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.pg_lyr, 'eas_id', expect) assert gdaltest.pg_lyr.GetFeatureCount() == 5 gdaltest.pg_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.pg_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) read_feat.Destroy() orig_feat.Destroy() gdaltest.poly_feat = None assert tr ############################################################################### # Write more features with a bunch of different geometries, and verify the # geometries are still OK. def test_ogr_pg_4(): if gdaltest.pg_ds is None: pytest.skip() dst_feat = ogr.Feature(feature_def=gdaltest.pg_lyr.GetLayerDefn()) wkt_list = ['10', '2', '1', '3d_1', '4', '5', '6'] for item in wkt_list: wkt = open('data/wkb_wkt/' + item + '.wkt').read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Write geometry as a new Oracle feature. dst_feat.SetGeometryDirectly(geom) dst_feat.SetField('PRFEDEA', item) dst_feat.SetFID(-1) gdaltest.pg_lyr.CreateFeature(dst_feat) ###################################################################### # Read back the feature and get the geometry. gdaltest.pg_lyr.SetAttributeFilter("PRFEDEA = '%s'" % item) feat_read = gdaltest.pg_lyr.GetNextFeature() geom_read = feat_read.GetGeometryRef() if ogrtest.check_feature_geometry(feat_read, geom) != 0: print(item) print(wkt) pytest.fail(geom_read) feat_read.Destroy() dst_feat.Destroy() gdaltest.pg_lyr.ResetReading() # to close implicit transaction ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_pg_5(): if gdaltest.pg_ds is None: pytest.skip() expect = [None, 179, 173, 172, 171, 170, 169, 168, 166, 165, 158] sql_lyr = gdaltest.pg_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') assert sql_lyr.GetFeatureCount() == 11 tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.pg_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_pg_6(): if gdaltest.pg_ds is None: pytest.skip() sql_lyr = gdaltest.pg_ds.ExecuteSQL("select * from tpoly where prfedea = '2'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['2']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'MULTILINESTRING ((5.00121349 2.99853132,5.00121349 1.99853133),(5.00121349 1.99853133,5.00121349 0.99853133),(3.00121351 1.99853127,5.00121349 1.99853133),(5.00121349 1.99853133,6.00121348 1.99853135))') != 0: tr = 0 feat_read.Destroy() sql_lyr.ResetReading() geom = ogr.CreateGeometryFromWkt( 'LINESTRING(-10 -10,0 0)') sql_lyr.SetSpatialFilter(geom) geom.Destroy() assert sql_lyr.GetFeatureCount() == 0 assert sql_lyr.GetNextFeature() is None, 'GetNextFeature() did not return None' gdaltest.pg_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_pg_7(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.pg_lyr.SetSpatialFilter(geom) geom.Destroy() assert gdaltest.pg_lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(gdaltest.pg_lyr, 'eas_id', [158]) gdaltest.pg_lyr.SetAttributeFilter('eas_id = 158') assert gdaltest.pg_lyr.GetFeatureCount() == 1 gdaltest.pg_lyr.SetAttributeFilter(None) gdaltest.pg_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Write a feature with too long a text value for a fixed length text field. # The driver should now truncate this (but with a debug message). Also, # put some crazy stuff in the value to verify that quoting and escaping # is working smoothly. # # No geometry in this test. def test_ogr_pg_8(): if gdaltest.pg_ds is None: pytest.skip() dst_feat = ogr.Feature(feature_def=gdaltest.pg_lyr.GetLayerDefn()) dst_feat.SetField('PRFEDEA', 'CrazyKey') dst_feat.SetField('SHORTNAME', 'Crazy"\'Long') gdaltest.pg_lyr.CreateFeature(dst_feat) dst_feat.Destroy() gdaltest.pg_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat_read = gdaltest.pg_lyr.GetNextFeature() assert feat_read is not None, 'creating crazy feature failed!' assert feat_read.GetField('shortname') == 'Crazy"\'L', \ ('Vvalue not properly escaped or truncated:' + feat_read.GetField('shortname')) feat_read.Destroy() ############################################################################### # Verify inplace update of a feature with SetFeature(). def test_ogr_pg_9(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat = gdaltest.pg_lyr.GetNextFeature() gdaltest.pg_lyr.SetAttributeFilter(None) feat.SetField('SHORTNAME', 'Reset') point = ogr.Geometry(ogr.wkbPoint25D) point.SetPoint(0, 5, 6, 7) feat.SetGeometryDirectly(point) if gdaltest.pg_lyr.SetFeature(feat) != 0: feat.Destroy() pytest.fail('SetFeature() method failed.') fid = feat.GetFID() feat.Destroy() feat = gdaltest.pg_lyr.GetFeature(fid) assert feat is not None, ('GetFeature(%d) failed.' % fid) shortname = feat.GetField('SHORTNAME') assert shortname[:5] == 'Reset', ('SetFeature() did not update SHORTNAME, got %s.' % shortname) if ogrtest.check_feature_geometry(feat, 'POINT(5 6 7)') != 0: print(feat.GetGeometryRef()) pytest.fail('Geometry update failed') feat.SetGeometryDirectly(None) if gdaltest.pg_lyr.SetFeature(feat) != 0: feat.Destroy() pytest.fail('SetFeature() method failed.') feat.Destroy() feat = gdaltest.pg_lyr.GetFeature(fid) assert feat.GetGeometryRef() is None, \ 'Geometry update failed. null geometry expected' feat.SetFieldNull('SHORTNAME') gdaltest.pg_lyr.SetFeature(feat) feat = gdaltest.pg_lyr.GetFeature(fid) assert feat.IsFieldNull('SHORTNAME'), 'SHORTNAME update failed. null value expected' # Test updating non-existing feature feat.SetFID(-10) if gdaltest.pg_lyr.SetFeature(feat) != ogr.OGRERR_NON_EXISTING_FEATURE: feat.Destroy() pytest.fail('Expected failure of SetFeature().') feat.Destroy() ############################################################################### # Verify that DeleteFeature() works properly. def test_ogr_pg_10(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat = gdaltest.pg_lyr.GetNextFeature() gdaltest.pg_lyr.SetAttributeFilter(None) fid = feat.GetFID() feat.Destroy() assert gdaltest.pg_lyr.DeleteFeature(fid) == 0, 'DeleteFeature() method failed.' gdaltest.pg_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat = gdaltest.pg_lyr.GetNextFeature() gdaltest.pg_lyr.SetAttributeFilter(None) if feat is not None: feat.Destroy() pytest.fail('DeleteFeature() seems to have had no effect.') # Test deleting non-existing feature assert gdaltest.pg_lyr.DeleteFeature(-10) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of DeleteFeature().' ############################################################################### # Create table from data/poly.shp in INSERT mode. def test_ogr_pg_11(): if gdaltest.pg_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds.ExecuteSQL('DELLAYER:tpolycopy') gdal.PopErrorHandler() gdal.SetConfigOption('PG_USE_COPY', 'NO') ###################################################### # Create Layer gdaltest.pgc_lyr = gdaltest.pg_ds.CreateLayer('tpolycopy', options=['DIM=3']) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.pgc_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.pgc_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.pgc_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_pg_12(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pgc_lyr.ResetReading() gdaltest.pgc_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.pgc_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) read_feat.Destroy() orig_feat.Destroy() gdaltest.poly_feat = None gdaltest.pgc_lyr.ResetReading() # to close implicit transaction ############################################################################### # Create a table with some date fields. def test_ogr_pg_13(): if gdaltest.pg_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds.ExecuteSQL('DELLAYER:datetest') gdal.PopErrorHandler() ###################################################### # Create Table lyr = gdaltest.pg_ds.CreateLayer('datetest') ###################################################### # Setup Schema ogrtest.quick_create_layer_def(lyr, [('ogrdate', ogr.OFTDate), ('ogrtime', ogr.OFTTime), ('ogrdatetime', ogr.OFTDateTime)]) ###################################################### # add some custom date fields. gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datetest ADD COLUMN tsz timestamp with time zone') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datetest ADD COLUMN ts timestamp without time zone') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datetest ADD COLUMN dt date') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datetest ADD COLUMN tm time') ###################################################### # Create a populated records. gdaltest.pg_ds.ExecuteSQL("INSERT INTO datetest ( ogrdate, ogrtime, ogrdatetime, tsz, ts, dt, tm) VALUES ( '2005-10-12 10:41:33-05', '2005-10-12 10:41:33-05', '2005-10-12 10:41:33-05', '2005-10-12 10:41:33-05','2005-10-12 10:41:33-05','2005-10-12 10:41:33-05','2005-10-12 10:41:33-05' )") ############################################################################### # Verify that stuff we just wrote is still OK. # Fetch in several timezones to test our timezone processing. def test_ogr_pg_14(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.ExecuteSQL('set timezone to "UTC"') lyr = ds.GetLayerByName('datetest') feat = lyr.GetNextFeature() if feat.GetFieldAsString('ogrdatetime') != '2005/10/12 15:41:33+00' \ or feat.GetFieldAsString('ogrdate') != '2005/10/12' \ or feat.GetFieldAsString('ogrtime') != '10:41:33' \ or feat.GetFieldAsString('tsz') != '2005/10/12 15:41:33+00' \ or feat.GetFieldAsString('ts') != '2005/10/12 10:41:33' \ or feat.GetFieldAsString('dt') != '2005/10/12' \ or feat.GetFieldAsString('tm') != '10:41:33': feat.DumpReadable() pytest.fail('UTC value wrong') sql_lyr = ds.ExecuteSQL("select * from pg_timezone_names where name = 'Canada/Newfoundland'") if sql_lyr is None: has_tz = True else: has_tz = sql_lyr.GetFeatureCount() != 0 ds.ReleaseResultSet(sql_lyr) if has_tz: ds.ExecuteSQL('set timezone to "Canada/Newfoundland"') lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetFieldAsString('ogrdatetime') != '2005/10/12 13:11:33-0230' \ or feat.GetFieldAsString('tsz') != '2005/10/12 13:11:33-0230' \ or feat.GetFieldAsString('ts') != '2005/10/12 10:41:33' \ or feat.GetFieldAsString('dt') != '2005/10/12' \ or feat.GetFieldAsString('tm') != '10:41:33': feat.DumpReadable() pytest.fail('Newfoundland value wrong') ds.ExecuteSQL('set timezone to "+5"') lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetFieldAsString('ogrdatetime') != '2005/10/12 20:41:33+05' \ or feat.GetFieldAsString('tsz') != '2005/10/12 20:41:33+05': feat.DumpReadable() pytest.fail('+5 value wrong') feat = None ds.Destroy() ############################################################################### # Test very large query. def test_ogr_pg_15(): if gdaltest.pg_ds is None: pytest.skip() expect = [169] query = 'eas_id = 169' for ident in range(1000): query = query + (' or eas_id = %d' % (ident + 1000)) gdaltest.pg_lyr.SetAttributeFilter(query) tr = ogrtest.check_features_against_list(gdaltest.pg_lyr, 'eas_id', expect) gdaltest.pg_lyr.SetAttributeFilter(None) assert tr ############################################################################### # Test very large statement. def test_ogr_pg_16(): if gdaltest.pg_ds is None: pytest.skip() expect = [169] query = 'eas_id = 169' for ident in range(1000): query = query + (' or eas_id = %d' % (ident + 1000)) statement = 'select eas_id from tpoly where ' + query lyr = gdaltest.pg_ds.ExecuteSQL(statement) tr = ogrtest.check_features_against_list(lyr, 'eas_id', expect) gdaltest.pg_ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test requesting a non-existent table by name (bug 1480). def test_ogr_pg_17(): if gdaltest.pg_ds is None: pytest.skip() count = gdaltest.pg_ds.GetLayerCount() try: layer = gdaltest.pg_ds.GetLayerByName('JunkTableName') except: layer = None assert layer is None, 'got layer for non-existent table!' assert count == gdaltest.pg_ds.GetLayerCount(), 'layer count changed unexpectedly.' ############################################################################### # Test getting a layer by name that was not previously a layer. def test_ogr_pg_18(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() count = gdaltest.pg_ds.GetLayerCount() layer = gdaltest.pg_ds.GetLayerByName('geometry_columns') assert layer is not None, 'did not get geometry_columns layer' assert count + 1 == gdaltest.pg_ds.GetLayerCount(), \ 'layer count unexpectedly unchanged.' ############################################################################### # Test reading 4-dim geometry in EWKT format def test_ogr_pg_20(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() # # Prepare test layer with 4-dim geometries. # # Collection of test geometry pairs: # ( , ) <=> ( , ) geometries = ( ('POINT (10 20 5 5)', 'POINT ZM (10 20 5 5)'), ('LINESTRING (10 10 1 2,20 20 3 4,30 30 5 6,40 40 7 8)', 'LINESTRING ZM (10 10 1 2,20 20 3 4,30 30 5 6,40 40 7 8)'), ('POLYGON ((0 0 1 2,4 0 3 4,4 4 5 6,0 4 7 8,0 0 1 2))', 'POLYGON ZM ((0 0 1 2,4 0 3 4,4 4 5 6,0 4 7 8,0 0 1 2))'), ('MULTIPOINT (10 20 5 5,30 30 7 7)', 'MULTIPOINT ZM ((10 20 5 5),(30 30 7 7))'), ('MULTILINESTRING ((10 10 1 2,20 20 3 4),(30 30 5 6,40 40 7 8))', 'MULTILINESTRING ZM ((10 10 1 2,20 20 3 4),(30 30 5 6,40 40 7 8))'), ('MULTIPOLYGON(((0 0 0 1,4 0 0 1,4 4 0 1,0 4 0 1,0 0 0 1),(1 1 0 5,2 1 0 5,2 2 0 5,1 2 0 5,1 1 0 5)),((-1 -1 0 10,-1 -2 0 10,-2 -2 0 10,-2 -1 0 10,-1 -1 0 10)))', 'MULTIPOLYGON ZM (((0 0 0 1,4 0 0 1,4 4 0 1,0 4 0 1,0 0 0 1),(1 1 0 5,2 1 0 5,2 2 0 5,1 2 0 5,1 1 0 5)),((-1 -1 0 10,-1 -2 0 10,-2 -2 0 10,-2 -1 0 10,-1 -1 0 10)))'), ('GEOMETRYCOLLECTION(POINT(2 3 11 101),LINESTRING(2 3 12 102,3 4 13 103))', 'GEOMETRYCOLLECTION ZM (POINT ZM (2 3 11 101),LINESTRING ZM (2 3 12 102,3 4 13 103))'), ('TRIANGLE ((0 0 0 0,100 0 100 1,0 100 100 0,0 0 0 0))', 'TRIANGLE ZM ((0 0 0 0,100 0 100 1,0 100 100 0,0 0 0 0))'), ('TIN (((0 0 0 0,0 0 1 0,0 1 0 0,0 0 0 0)),((0 0 0 0,0 1 0 0,1 1 0 0,0 0 0 0)))', 'TIN ZM (((0 0 0 0,0 0 1 0,0 1 0 0,0 0 0 0)),((0 0 0 0,0 1 0 0,1 1 0 0,0 0 0 0)))'), ('POLYHEDRALSURFACE (((0 0 0 0,0 0 1 0,0 1 1 0,0 1 0 0,0 0 0 0)),((0 0 0 0,0 1 0 0,1 1 0 0,1 0 0 0,0 0 0 0)),((0 0 0 0,1 0 0 0,1 0 1 0,0 0 1 0,0 0 0 0)),((1 1 0 0,1 1 1 0,1 0 1 0,1 0 0 0,1 1 0 0)),((0 1 0 0,0 1 1 0,1 1 1 0,1 1 0 0,0 1 0 0)),((0 0 1 0,1 0 1 0,1 1 1 0,0 1 1 0,0 0 1 0)))', 'POLYHEDRALSURFACE ZM (((0 0 0 0,0 0 1 0,0 1 1 0,0 1 0 0,0 0 0 0)),((0 0 0 0,0 1 0 0,1 1 0 0,1 0 0 0,0 0 0 0)),((0 0 0 0,1 0 0 0,1 0 1 0,0 0 1 0,0 0 0 0)),((1 1 0 0,1 1 1 0,1 0 1 0,1 0 0 0,1 1 0 0)),((0 1 0 0,0 1 1 0,1 1 1 0,1 1 0 0,0 1 0 0)),((0 0 1 0,1 0 1 0,1 1 1 0,0 1 1 0,0 0 1 0)))') ) # This layer is also used in ogr_pg_21() test. gdaltest.pg_ds.ExecuteSQL("CREATE TABLE testgeom (ogc_fid integer)") # XXX - mloskot - if 'public' is omitted, then OGRPGDataSource::DeleteLayer fails, line 438 sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT AddGeometryColumn('public','testgeom','wkb_geometry',-1,'GEOMETRY',4)") gdaltest.pg_ds.ReleaseResultSet(sql_lyr) for i, geom in enumerate(geometries): gdaltest.pg_ds.ExecuteSQL("INSERT INTO testgeom (ogc_fid,wkb_geometry) \ VALUES (%d,GeomFromEWKT('%s'))" % (i, geom[0])) # We need to re-read layers gdaltest.pg_ds.Destroy() gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) assert gdaltest.pg_ds is not None, 'can not re-open datasource' # # Test reading 4-dim geometries normalized to OGC WKT form. # layer = gdaltest.pg_ds.GetLayerByName('testgeom') assert layer is not None, 'did not get testgeom layer' # Test updating the geometries for i in range(len(geometries)): feat = layer.GetFeature(i) layer.SetFeature(feat) # Test we get them back as expected for i, geoms in enumerate(geometries): feat = layer.GetFeature(i) geom = feat.GetGeometryRef() assert geom is not None, ('did not get geometry, expected %s' % geoms[1]) wkt = geom.ExportToIsoWkt() feat.Destroy() feat = None assert wkt == geoms[1], \ ('WKT do not match: expected %s, got %s' % (geoms[1], wkt)) layer = None ############################################################################### # Test reading 4-dimension geometries in EWKB format def test_ogr_pg_21(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() layer = gdaltest.pg_ds.ExecuteSQL("SELECT wkb_geometry FROM testgeom") assert layer is not None, 'did not get testgeom layer' feat = layer.GetNextFeature() while feat is not None: geom = feat.GetGeometryRef() if ogr.GT_HasZ(geom.GetGeometryType()) == 0 or ogr.GT_HasM(geom.GetGeometryType()) == 0: feat.Destroy() feat = None gdaltest.pg_ds.ReleaseResultSet(layer) layer = None pytest.fail('expected feature with type >3000') feat.Destroy() feat = layer.GetNextFeature() feat = None gdaltest.pg_ds.ReleaseResultSet(layer) layer = None ############################################################################### # Check if the sub geometries of TIN and POLYHEDRALSURFACE are valid def test_ogr_pg_21_subgeoms(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() subgeom_PS = ['POLYGON ZM ((0 0 0 0,0 0 1 0,0 1 1 0,0 1 0 0,0 0 0 0))', 'POLYGON ZM ((0 0 0 0,0 1 0 0,1 1 0 0,1 0 0 0,0 0 0 0))', 'POLYGON ZM ((0 0 0 0,1 0 0 0,1 0 1 0,0 0 1 0,0 0 0 0))', 'POLYGON ZM ((1 1 0 0,1 1 1 0,1 0 1 0,1 0 0 0,1 1 0 0))', 'POLYGON ZM ((0 1 0 0,0 1 1 0,1 1 1 0,1 1 0 0,0 1 0 0))', 'POLYGON ZM ((0 0 1 0,1 0 1 0,1 1 1 0,0 1 1 0,0 0 1 0))'] subgeom_TIN = ['TRIANGLE ZM ((0 0 0 0,0 0 1 0,0 1 0 0,0 0 0 0))', 'TRIANGLE ZM ((0 0 0 0,0 1 0 0,1 1 0 0,0 0 0 0))'] layer = gdaltest.pg_ds.GetLayerByName('testgeom') for i in range(8, 10): feat = layer.GetFeature(i) geom = feat.GetGeometryRef() assert geom is not None, 'did not get the expected geometry' if geom.GetGeometryName() == "POLYHEDRALSURFACE": for j in range(0, geom.GetGeometryCount()): sub_geom = geom.GetGeometryRef(j) subgeom_wkt = sub_geom.ExportToIsoWkt() assert subgeom_wkt == subgeom_PS[j], \ ('did not get the expected subgeometry, expected %s' % (subgeom_PS[j])) if geom.GetGeometryName() == "TIN": for j in range(0, geom.GetGeometryCount()): sub_geom = geom.GetGeometryRef(j) subgeom_wkt = sub_geom.ExportToIsoWkt() assert subgeom_wkt == subgeom_TIN[j], \ ('did not get the expected subgeometry, expected %s' % (subgeom_TIN[j])) feat.Destroy() feat = None ############################################################################### # Check if the 3d geometries of TIN, Triangle and POLYHEDRALSURFACE are valid def test_ogr_pg_21_3d_geometries(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) gdaltest.pg_ds.ExecuteSQL("CREATE TABLE zgeoms (field_no integer)") sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT AddGeometryColumn('public','zgeoms','wkb_geometry',-1,'GEOMETRY',3)") gdaltest.pg_ds.ReleaseResultSet(sql_lyr) wkt_list = ['POLYHEDRALSURFACE (((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)))', 'TIN (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))', 'TRIANGLE ((48 36 84,32 54 64,86 11 54,48 36 84))'] wkt_expected = ['POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)))', 'TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))', 'TRIANGLE Z ((48 36 84,32 54 64,86 11 54,48 36 84))'] for i in range(0, 3): gdaltest.pg_ds.ExecuteSQL("INSERT INTO zgeoms (field_no, wkb_geometry) VALUES (%d,GeomFromEWKT('%s'))" % (i, wkt_list[i])) gdaltest.pg_ds.Destroy() gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) assert gdaltest.pg_ds is not None, 'Cannot open the dataset' layer = gdaltest.pg_ds.GetLayerByName('zgeoms') assert layer is not None, 'No layer received' for i in range(0, 3): feat = layer.GetFeature(i) geom = feat.GetGeometryRef() wkt = geom.ExportToIsoWkt() assert wkt == wkt_expected[i], \ ('Unexpected WKT, expected %s and got %s' % (wkt_expected[i], wkt)) gdaltest.pg_ds.ExecuteSQL("DROP TABLE zgeoms") ############################################################################### # Create table from data/poly.shp under specified SCHEMA # This test checks if schema support and schema name quoting works well. def test_ogr_pg_22(): if gdaltest.pg_ds is None: pytest.skip() ###################################################### # Create Schema schema_name = 'AutoTest-schema' layer_name = schema_name + '.tpoly' gdaltest.pg_ds.ExecuteSQL('CREATE SCHEMA \"' + schema_name + '\"') ###################################################### # Create Layer gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer(layer_name, options=[ 'DIM=3', 'SCHEMA=' + schema_name] ) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.pg_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8)]) ###################################################### # Copy 3 features from the poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.pg_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) # Insert 3 features only for ident in range(0, 3): feat = shp_lyr.GetFeature(ident) dst_feat.SetFrom(feat) gdaltest.pg_lyr.CreateFeature(dst_feat) dst_feat.Destroy() # Test if test layer under custom schema is listed found = ogr_pg_check_layer_in_list(gdaltest.pg_ds, layer_name) assert found is not False, ('layer from schema \'' + schema_name + '\' not listed') ############################################################################### # Create table with all data types def test_ogr_pg_23(): if gdaltest.pg_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds.ExecuteSQL('DELLAYER:datatypetest') gdal.PopErrorHandler() ###################################################### # Create Table lyr = gdaltest.pg_ds.CreateLayer('datatypetest') ###################################################### # Setup Schema # ogrtest.quick_create_layer_def( lyr, None ) ###################################################### # add some custom date fields. gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_numeric numeric') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_numeric5 numeric(5)') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_numeric5_3 numeric(5,3)') # gdaltest.pg_ds.ExecuteSQL( 'ALTER TABLE datatypetest ADD COLUMN my_bool bool' ) fld = ogr.FieldDefn('my_bool', ogr.OFTInteger) fld.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld) # gdaltest.pg_ds.ExecuteSQL( 'ALTER TABLE datatypetest ADD COLUMN my_int2 int2' ) fld = ogr.FieldDefn('my_int2', ogr.OFTInteger) fld.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld) gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_int4 int4') lyr.CreateField(ogr.FieldDefn('my_int8', ogr.OFTInteger64)) # gdaltest.pg_ds.ExecuteSQL( 'ALTER TABLE datatypetest ADD COLUMN my_float4 float4' ) fld = ogr.FieldDefn('my_float4', ogr.OFTReal) fld.SetSubType(ogr.OFSTFloat32) lyr.CreateField(fld) gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_float8 float8') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_real real') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_char char') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_varchar character varying') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_varchar10 character varying(10)') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_text text') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_bytea bytea') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_time time') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_date date') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_timestamp timestamp without time zone') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_timestamptz timestamp with time zone') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_chararray char(1)[]') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_textarray text[]') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_varchararray character varying[]') fld = ogr.FieldDefn('my_int2array', ogr.OFTIntegerList) fld.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld) gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_int4array int4[]') lyr.CreateField(ogr.FieldDefn('my_int8array', ogr.OFTInteger64List)) fld = ogr.FieldDefn('my_float4array', ogr.OFTRealList) fld.SetSubType(ogr.OFSTFloat32) lyr.CreateField(fld) gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_float8array float8[]') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_numericarray numeric[]') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_numeric5array numeric(5)[]') gdaltest.pg_ds.ExecuteSQL('ALTER TABLE datatypetest ADD COLUMN my_numeric5_3array numeric(5,3)[]') fld = ogr.FieldDefn('my_boolarray', ogr.OFTIntegerList) fld.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld) ###################################################### # Create a populated records. if gdaltest.pg_has_postgis: geom_str = "GeomFromEWKT('POINT(10 20)')" else: geom_str = "'\\\\001\\\\001\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000\\\\000$@\\\\000\\\\000\\\\000\\\\000\\\\000\\\\0004@'" if gdaltest.pg_quote_with_E: geom_str = "E" + geom_str sql = "INSERT INTO datatypetest ( my_numeric, my_numeric5, my_numeric5_3, my_bool, my_int2, " sql += "my_int4, my_int8, my_float4, my_float8, my_real, my_char, my_varchar, " sql += "my_varchar10, my_text, my_bytea, my_time, my_date, my_timestamp, my_timestamptz, " sql += "my_chararray, my_textarray, my_varchararray, my_int2array, my_int4array, " sql += "my_int8array, my_float4array, my_float8array, my_numericarray, my_numeric5array, my_numeric5_3array, my_boolarray, wkb_geometry) " sql += "VALUES ( 1.2, 12345, 0.123, 'T', 12345, 12345678, 1234567901234, 0.123, " sql += "0.12345678, 0.876, 'a', 'ab', 'varchar10 ', 'abc', 'xyz', '12:34:56', " sql += "'2000-01-01', '2000-01-01 00:00:00', '2000-01-01 00:00:00+00', " sql += "'{a,b}', " sql += "'{aa,bb}', '{cc,dd}', '{100,200}', '{100,200}', '{1234567901234}', " sql += "'{100.1,200.1}', '{100.12,200.12}', ARRAY[100.12,200.12], ARRAY[10,20], ARRAY[10.12,20.12], '{1,0}', " + geom_str + " )" gdaltest.pg_ds.ExecuteSQL(sql) ############################################################################### def check_value_23(layer_defn, feat): field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_numeric5")) assert field_defn.GetWidth() == 5 and field_defn.GetPrecision() == 0 and field_defn.GetType() == ogr.OFTInteger, \ ('Wrong field defn for my_numeric5 : %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_numeric5_3")) assert field_defn.GetWidth() == 5 and field_defn.GetPrecision() == 3 and field_defn.GetType() == ogr.OFTReal, \ ('Wrong field defn for my_numeric5_3 : %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_varchar10")) assert field_defn.GetWidth() == 10 and field_defn.GetPrecision() == 0, \ ('Wrong field defn for my_varchar10 : %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_bool")) assert field_defn.GetWidth() == 1 and field_defn.GetType() == ogr.OFTInteger and field_defn.GetSubType() == ogr.OFSTBoolean, \ ('Wrong field defn for my_bool : %d, %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType(), field_defn.GetSubType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_boolarray")) assert field_defn.GetType() == ogr.OFTIntegerList and field_defn.GetSubType() == ogr.OFSTBoolean, \ ('Wrong field defn for my_boolarray : %d, %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType(), field_defn.GetSubType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_int2")) assert field_defn.GetType() == ogr.OFTInteger and field_defn.GetSubType() == ogr.OFSTInt16, \ ('Wrong field defn for my_int2 : %d, %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType(), field_defn.GetSubType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_float4")) assert field_defn.GetType() == ogr.OFTReal and field_defn.GetSubType() == ogr.OFSTFloat32, \ ('Wrong field defn for my_float4 : %d, %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType(), field_defn.GetSubType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_int2array")) assert field_defn.GetType() == ogr.OFTIntegerList and field_defn.GetSubType() == ogr.OFSTInt16, \ ('Wrong field defn for my_int2array : %d, %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType(), field_defn.GetSubType())) field_defn = layer_defn.GetFieldDefn(layer_defn.GetFieldIndex("my_float4array")) assert field_defn.GetType() == ogr.OFTRealList and field_defn.GetSubType() == ogr.OFSTFloat32, \ ('Wrong field defn for my_float4array : %d, %d, %d, %d' % (field_defn.GetWidth(), field_defn.GetPrecision(), field_defn.GetType(), field_defn.GetSubType())) if feat.my_numeric != pytest.approx(1.2, abs=1e-8) or \ feat.my_numeric5 != 12345 or \ feat.my_numeric5_3 != 0.123 or \ feat.my_bool != 1 or \ feat.my_int2 != 12345 or \ feat.my_int4 != 12345678 or \ feat.my_int8 != 1234567901234 or \ feat.my_float4 != pytest.approx(0.123, abs=1e-8) or \ feat.my_float8 != 0.12345678 or \ feat.my_real != pytest.approx(0.876, abs=1e-6) or \ feat.my_char != 'a' or \ feat.my_varchar != 'ab' or \ feat.my_varchar10 != 'varchar10 ' or \ feat.my_text != 'abc' or \ feat.GetFieldAsString('my_bytea') != '78797A' or \ feat.GetFieldAsString('my_time') != '12:34:56' or \ feat.GetFieldAsString('my_date') != '2000/01/01' or \ (feat.GetFieldAsString('my_timestamp') != '2000/01/01 00:00:00' and feat.GetFieldAsString('my_timestamp') != '2000/01/01 00:00:00+00') or \ (layer_defn.GetFieldIndex('my_timestamptz') >= 0 and feat.GetFieldAsString('my_timestamptz') != '2000/01/01 00:00:00+00') or \ feat.GetFieldAsString('my_chararray') != '(2:a,b)' or \ feat.GetFieldAsString('my_textarray') != '(2:aa,bb)' or \ feat.GetFieldAsString('my_varchararray') != '(2:cc,dd)' or \ feat.GetFieldAsString('my_int2array') != '(2:100,200)' or \ feat.GetFieldAsString('my_int4array') != '(2:100,200)' or \ feat.my_int8array != [1234567901234] or \ feat.GetFieldAsString('my_boolarray') != '(2:1,0)' or \ feat.my_float4array[0] != pytest.approx(100.1, abs=1e-6) or \ feat.my_float8array[0] != pytest.approx(100.12, abs=1e-8) or \ feat.my_numericarray[0] != pytest.approx(100.12, abs=1e-8) or \ feat.my_numeric5array[0] != pytest.approx(10, abs=1e-8) or \ feat.my_numeric5_3array[0] != pytest.approx(10.12, abs=1e-8): feat.DumpReadable() pytest.fail('Wrong values') geom = feat.GetGeometryRef() assert geom is not None, 'geom is none' wkt = geom.ExportToWkt() assert wkt == 'POINT (10 20)', ('Wrong WKT :' + wkt) ############################################################################### # Test with PG: connection def test_ogr_pg_24(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.ExecuteSQL('set timezone to "UTC"') lyr = ds.GetLayerByName('datatypetest') feat = lyr.GetNextFeature() check_value_23(lyr.GetLayerDefn(), feat) feat = None ds.Destroy() ############################################################################### # Test with PG: connection and SELECT query def test_ogr_pg_25(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.ExecuteSQL('set timezone to "UTC"') sql_lyr = ds.ExecuteSQL('select * from datatypetest') feat = sql_lyr.GetNextFeature() check_value_23(sql_lyr.GetLayerDefn(), feat) ds.ReleaseResultSet(sql_lyr) feat = None ds.Destroy() ############################################################################### # Duplicate all data types in INSERT mode def test_ogr_pg_28(): if gdaltest.pg_ds is None: pytest.skip() gdal.SetConfigOption('PG_USE_COPY', "NO") ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) gdal.PushErrorHandler('CPLQuietErrorHandler') ds.ExecuteSQL('DELLAYER:datatypetest2') gdal.PopErrorHandler() ds.ExecuteSQL('set timezone to "UTC"') src_lyr = ds.GetLayerByName('datatypetest') dst_lyr = ds.CreateLayer('datatypetest2') src_lyr.ResetReading() for i in range(src_lyr.GetLayerDefn().GetFieldCount()): field_defn = src_lyr.GetLayerDefn().GetFieldDefn(i) dst_lyr.CreateField(field_defn) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) feat = src_lyr.GetNextFeature() assert feat is not None dst_feat.SetFrom(feat) assert dst_lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat.Destroy() src_lyr = None dst_lyr = None ds.Destroy() gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) ############################################################################### # Test with PG: connection def test_ogr_pg_29(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.ExecuteSQL('set timezone to "UTC"') lyr = ds.GetLayerByName('datatypetest2') # my_timestamp has now a time zone... feat = lyr.GetNextFeature() check_value_23(lyr.GetLayerDefn(), feat) geom = feat.GetGeometryRef() wkt = geom.ExportToWkt() assert wkt == 'POINT (10 20)', ('Wrong WKT :' + wkt) feat = None ds.Destroy() ############################################################################### # Duplicate all data types in PG_USE_COPY mode def test_ogr_pg_30(): if gdaltest.pg_ds is None: pytest.skip() gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) gdal.PushErrorHandler('CPLQuietErrorHandler') ds.ExecuteSQL('DELLAYER:datatypetest2') gdal.PopErrorHandler() ds.ExecuteSQL('set timezone to "UTC"') src_lyr = ds.GetLayerByName('datatypetest') dst_lyr = ds.CreateLayer('datatypetest2') src_lyr.ResetReading() for i in range(src_lyr.GetLayerDefn().GetFieldCount()): field_defn = src_lyr.GetLayerDefn().GetFieldDefn(i) dst_lyr.CreateField(field_defn) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) feat = src_lyr.GetNextFeature() assert feat is not None dst_feat.SetFrom(feat) assert dst_lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat.Destroy() ds.Destroy() gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) ############################################################################### # Test the tables= connection string option def test_ogr_pg_31(): if gdaltest.pg_ds is None: pytest.skip() srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = gdaltest.pg_ds.CreateLayer('test_for_tables_equal_param', geom_type=ogr.wkbPoint, srs=srs, options=['OVERWRITE=YES']) lyr.StartTransaction() for i in range(501): f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) lyr.CommitTransaction() ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' tables=tpoly,tpolycopy', update=1) assert ds is not None and ds.GetLayerCount() == 2 sql_lyr = ds.ExecuteSQL('SELECT * FROM test_for_tables_equal_param') i = 0 while True: f = sql_lyr.GetNextFeature() if f is None: break i = i + 1 ds.ReleaseResultSet(sql_lyr) assert i == 501 ds.Destroy() ############################################################################### # Test approximate srtext (#2123, #3508) def test_ogr_pg_32(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() gdaltest.pg_ds.ExecuteSQL("DELETE FROM spatial_ref_sys") ###################################################### # Create Layer with EPSG:4326 srs = osr.SpatialReference() srs.ImportFromEPSG(4326) gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testsrtext', srs=srs) sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM spatial_ref_sys") feat = sql_lyr.GetNextFeature() if feat.count != 1: feat.DumpReadable() pytest.fail('did not get expected count after step (1)') gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ###################################################### # Create second layer with very approximative EPSG:4326 srs = osr.SpatialReference() srs.SetFromUserInput('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]') gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testsrtext2', srs=srs) # Must still be 1 sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM spatial_ref_sys") feat = sql_lyr.GetNextFeature() if feat.count != 1: feat.DumpReadable() pytest.fail('did not get expected count after step (2)') gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ###################################################### # Create third layer with very approximative EPSG:4326 but without authority srs = osr.SpatialReference() srs.SetFromUserInput("""GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]""") gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testsrtext3', srs=srs) # Must still be 1 sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM spatial_ref_sys") feat = sql_lyr.GetNextFeature() if feat.count != 1: feat.DumpReadable() pytest.fail('did not get expected count after step (3)') gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ###################################################### # Create Layer with EPSG:26632 srs = osr.SpatialReference() srs.ImportFromEPSG(26632) gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testsrtext4', geom_type=ogr.wkbPoint, srs=srs) feat = ogr.Feature(gdaltest.pg_lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdaltest.pg_lyr.CreateFeature(feat) feat = None sr = gdaltest.pg_lyr.GetSpatialRef() assert sr.ExportToWkt().find('26632') != -1, 'did not get expected SRS' sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM spatial_ref_sys") feat = sql_lyr.GetNextFeature() # Must be 2 now if feat.count != 2: feat.DumpReadable() pytest.fail('did not get expected count after step (4)') gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ###################################################### # Test GetSpatialRef() on SQL layer (#4644) sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT * FROM testsrtext4') sr = sql_lyr.GetSpatialRef() assert sr.ExportToWkt().find('26632') != -1, 'did not get expected SRS' gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ###################################################### # Test getting SRS and geom type without requiring to fetch the layer defn for i in range(2): # sys.stderr.write('BEFORE OPEN\n') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) # sys.stderr.write('AFTER Open\n') lyr = ds.GetLayerByName('testsrtext4') # sys.stderr.write('AFTER GetLayerByName\n') if i == 0: sr = lyr.GetSpatialRef() # sys.stderr.write('AFTER GetSpatialRef\n') geom_type = lyr.GetGeomType() # sys.stderr.write('AFTER GetGeomType\n') else: geom_type = lyr.GetGeomType() # sys.stderr.write('AFTER GetGeomType\n') sr = lyr.GetSpatialRef() # sys.stderr.write('AFTER GetSpatialRef\n') assert sr.ExportToWkt().find('26632') != -1, 'did not get expected SRS' assert geom_type == ogr.wkbPoint, 'did not get expected geom type' ds = None ###################################################### # Create Layer with non EPSG SRS srs = osr.SpatialReference() srs.SetFromUserInput('+proj=vandg') gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testsrtext5', srs=srs) sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM spatial_ref_sys") feat = sql_lyr.GetNextFeature() # Must be 3 now if feat.count != 3: feat.DumpReadable() pytest.fail('did not get expected count after step (5)') gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test encoding as UTF8 def test_ogr_pg_33(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_lyr = gdaltest.pg_ds.GetLayerByName('tpoly') assert gdaltest.pg_lyr is not None, 'did not get tpoly layer' dst_feat = ogr.Feature(feature_def=gdaltest.pg_lyr.GetLayerDefn()) # eacute in UTF8 : 0xc3 0xa9 dst_feat.SetField('SHORTNAME', '\xc3\xa9') gdaltest.pg_lyr.CreateFeature(dst_feat) dst_feat.Destroy() ############################################################################### # Test encoding as Latin1 def test_ogr_pg_34(): if gdaltest.pg_ds is None: pytest.skip() # We only test that on Linux since setting os.environ['XXX'] # is not guaranteed to have effects on system not supporting putenv if sys.platform.startswith('linux'): os.environ['PGCLIENTENCODING'] = 'LATIN1' test_ogr_pg_1() del os.environ['PGCLIENTENCODING'] # For some unknown reasons, some servers don't like forcing LATIN1 # but prefer LATIN9 instead... if gdaltest.pg_ds is None: os.environ['PGCLIENTENCODING'] = 'LATIN9' test_ogr_pg_1() del os.environ['PGCLIENTENCODING'] else: gdaltest.pg_ds.ExecuteSQL('SET client_encoding = LATIN1') gdaltest.pg_lyr = gdaltest.pg_ds.GetLayerByName('tpoly') assert gdaltest.pg_lyr is not None, 'did not get tpoly layer' dst_feat = ogr.Feature(feature_def=gdaltest.pg_lyr.GetLayerDefn()) # eacute in Latin1 : 0xe9 dst_feat.SetField('SHORTNAME', '\xe9') gdaltest.pg_lyr.CreateFeature(dst_feat) dst_feat.Destroy() ############################################################################### # Test for buffer overflows def test_ogr_pg_35(): if gdaltest.pg_ds is None: pytest.skip() gdal.PushErrorHandler() try: gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testoverflows') ogrtest.quick_create_layer_def(gdaltest.pg_lyr, [('0123456789' * 1000, ogr.OFTReal)]) # To trigger actual layer creation gdaltest.pg_lyr.ResetReading() except: pass finally: gdal.PopErrorHandler() gdal.PushErrorHandler() try: gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('testoverflows', options=['OVERWRITE=YES', 'GEOMETRY_NAME=' + ('0123456789' * 1000)]) # To trigger actual layer creation gdaltest.pg_lyr.ResetReading() except: pass finally: gdal.PopErrorHandler() ############################################################################### # Test support for inherited tables : tables inherited from a Postgis Table def test_ogr_pg_36(): if gdaltest.pg_ds is None: pytest.skip() if gdaltest.pg_has_postgis: lyr = gdaltest.pg_ds.CreateLayer('table36_base', geom_type=ogr.wkbPoint) else: lyr = gdaltest.pg_ds.CreateLayer('table36_base') gdaltest.pg_ds.ExecuteSQL('CREATE TABLE table36_inherited ( col1 CHAR(1) ) INHERITS ( table36_base )') gdaltest.pg_ds.ExecuteSQL('CREATE TABLE table36_inherited2 ( col2 CHAR(1) ) INHERITS ( table36_inherited )') # Test fix for #3636 when 2 inherited tables with same name exist in 2 different schemas if gdaltest.pg_has_postgis: # lyr = gdaltest.pg_ds.CreateLayer( 'table36_base', geom_type = ogr.wkbLineString, options = ['SCHEMA=AutoTest-schema'] ) lyr = gdaltest.pg_ds.CreateLayer('AutoTest-schema.table36_base', geom_type=ogr.wkbLineString) else: lyr = gdaltest.pg_ds.CreateLayer('table36_base', options=['SCHEMA=AutoTest-schema']) gdaltest.pg_ds.ExecuteSQL('CREATE TABLE "AutoTest-schema"."table36_inherited" ( col3 CHAR(1) ) INHERITS ( "AutoTest-schema".table36_base )') gdaltest.pg_ds.ExecuteSQL('CREATE TABLE "AutoTest-schema"."table36_inherited2" ( col4 CHAR(1) ) INHERITS ( "AutoTest-schema".table36_inherited )') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) found = ogr_pg_check_layer_in_list(ds, 'table36_inherited') assert found is not False, 'layer table36_inherited not listed' found = ogr_pg_check_layer_in_list(ds, 'table36_inherited2') assert found is not False, 'layer table36_inherited2 not listed' lyr = ds.GetLayerByName('table36_inherited2') assert lyr is not None assert not gdaltest.pg_has_postgis or lyr.GetGeomType() == ogr.wkbPoint, \ 'wrong geometry type for layer table36_inherited2' lyr = ds.GetLayerByName('AutoTest-schema.table36_inherited2') assert lyr is not None assert not gdaltest.pg_has_postgis or lyr.GetGeomType() == ogr.wkbLineString, \ 'wrong geometry type for layer AutoTest-schema.table36_inherited2' ds.Destroy() def test_ogr_pg_36_bis(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' TABLES=table36_base', update=1) found = ogr_pg_check_layer_in_list(ds, 'table36_inherited') assert found is not True, 'layer table36_inherited is listed but it should not' lyr = ds.GetLayerByName('table36_inherited') assert lyr is not None assert not gdaltest.pg_has_postgis or lyr.GetGeomType() == ogr.wkbPoint ds.Destroy() ############################################################################### # Test support for inherited tables : Postgis table inherited from a non-Postgis table def test_ogr_pg_37(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() gdaltest.pg_ds.ExecuteSQL('CREATE TABLE table37_base ( col1 CHAR(1) )') gdaltest.pg_ds.ExecuteSQL('CREATE TABLE table37_inherited ( col2 CHAR(1) ) INHERITS ( table37_base )') sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT AddGeometryColumn('public','table37_inherited','wkb_geometry',-1,'POINT',2)") gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) found = ogr_pg_check_layer_in_list(ds, 'table37_inherited') assert found is not False, 'layer table37_inherited not listed' lyr = ds.GetLayerByName('table37_inherited') assert lyr is not None assert not gdaltest.pg_has_postgis or lyr.GetGeomType() == ogr.wkbPoint ds.Destroy() ############################################################################### # Test support for multiple geometry columns (RFC 41) def test_ogr_pg_38(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis: pytest.skip() sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT AddGeometryColumn('public','table37_base','pointBase',-1,'POINT',2)") gdaltest.pg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT AddGeometryColumn('public','table37_inherited','point25D',-1,'POINT',3)") gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) # Check for the layer with the wkb_geometry column found = ogr_pg_check_layer_in_list(ds, 'table37_inherited') assert found is not False, 'layer table37_inherited not listed' lyr = ds.GetLayerByName('table37_inherited') assert lyr is not None gfld_defn = lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex("wkb_geometry")) assert gfld_defn is not None assert gfld_defn.GetType() == ogr.wkbPoint if lyr.GetLayerDefn().GetGeomFieldCount() != 3: for i in range(lyr.GetLayerDefn().GetGeomFieldCount()): print(lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName()) pytest.fail(lyr.GetLayerDefn().GetGeomFieldCount()) # Explicit query to 'table37_inherited(wkb_geometry)' should also work lyr = ds.GetLayerByName('table37_inherited(wkb_geometry)') assert lyr is not None lyr = ds.GetLayerByName('table37_inherited(pointBase)') assert lyr is not None assert lyr.GetGeomType() == ogr.wkbPoint assert lyr.GetGeometryColumn() == 'pointBase', 'wrong geometry column name' lyr = ds.GetLayerByName('table37_inherited(point25D)') assert lyr is not None assert lyr.GetGeomType() == ogr.wkbPoint25D assert lyr.GetGeometryColumn() == 'point25D', 'wrong geometry column name' ds.Destroy() # Check for the layer with the new 'point25D' geometry column when tables= is specified ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' tables=table37_inherited(point25D)', update=1) lyr = ds.GetLayerByName('table37_inherited(point25D)') assert lyr is not None assert lyr.GetGeomType() == ogr.wkbPoint25D assert lyr.GetGeometryColumn() == 'point25D', 'wrong geometry column name' ds.Destroy() ############################################################################### # Test support for named views def test_ogr_pg_39(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: gdaltest.pg_ds.ExecuteSQL("CREATE VIEW testview AS SELECT * FROM table36_base") ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) found = ogr_pg_check_layer_in_list(ds, 'testview') assert found is not False, 'layer testview not listed' ds.Destroy() return gdaltest.pg_ds.ExecuteSQL("CREATE VIEW testview AS SELECT * FROM table37_inherited") if not gdaltest.pg_has_postgis_2: gdaltest.pg_ds.ExecuteSQL("INSERT INTO geometry_columns VALUES ( '', 'public', 'testview', 'wkb_geometry', 2, -1, 'POINT') ") gdaltest.pg_ds.ExecuteSQL("INSERT INTO table37_inherited (col1, col2, wkb_geometry) VALUES ( 'a', 'b', GeomFromEWKT('POINT (0 1)') )") # Check for the layer ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) found = ogr_pg_check_layer_in_list(ds, 'testview') assert found is not False, 'layer testview not listed' lyr = ds.GetLayerByName('testview') assert lyr is not None if gdaltest.pg_has_postgis: gfld_defn = lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex("wkb_geometry")) assert gfld_defn is not None assert gfld_defn.GetType() == ogr.wkbPoint feat = lyr.GetNextFeature() assert feat is not None, 'no feature' assert feat.GetGeomFieldRef("wkb_geometry") is not None and feat.GetGeomFieldRef("wkb_geometry").ExportToWkt() == 'POINT (0 1)', \ ('bad geometry %s' % feat.GetGeometryRef().ExportToWkt()) ds.Destroy() # Test another geometry column if not gdaltest.pg_has_postgis_2: gdaltest.pg_ds.ExecuteSQL("INSERT INTO geometry_columns VALUES ( '', 'public', 'testview', 'point25D', 3, -1, 'POINT') ") gdaltest.pg_ds.ExecuteSQL("UPDATE table37_inherited SET \"point25D\" = GeomFromEWKT('POINT (0 1 2)') ") # Check for the layer ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) found = ogr_pg_check_layer_in_list(ds, 'testview') assert found is not False, 'layer testview not listed' lyr = ds.GetLayerByName('testview(point25D)') assert lyr is not None assert not gdaltest.pg_has_postgis or lyr.GetGeomType() == ogr.wkbPoint25D try: assert lyr.GetGeometryColumn() == 'point25D', 'wrong geometry column name' except: pass feat = lyr.GetNextFeature() assert feat is not None, 'no feature' assert feat.GetGeometryRef() is not None and feat.GetGeometryRef().ExportToWkt() == 'POINT (0 1 2)', \ ('bad geometry %s' % feat.GetGeometryRef().ExportToWkt()) ds.Destroy() ############################################################################### # Test GetFeature() with an invalid id def test_ogr_pg_40(): if gdaltest.pg_ds is None: pytest.skip() layer = gdaltest.pg_ds.GetLayerByName('tpoly') assert layer.GetFeature(0) is None ############################################################################### # Test active_schema= option def test_ogr_pg_41(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' active_schema=AutoTest-schema', update=1) # tpoly without schema refers to the active schema, that is to say AutoTest-schema found = ogr_pg_check_layer_in_list(ds, 'tpoly') assert found is not False, 'layer tpoly not listed' layer = ds.GetLayerByName('tpoly') assert layer.GetFeatureCount() == 3, 'wrong feature count' found = ogr_pg_check_layer_in_list(ds, 'AutoTest-schema.tpoly') assert found is not True, 'layer AutoTest-schema.tpoly is listed, but should not' layer = ds.GetLayerByName('AutoTest-schema.tpoly') assert layer.GetFeatureCount() == 3, 'wrong feature count' found = ogr_pg_check_layer_in_list(ds, 'public.tpoly') assert found is not False, 'layer tpoly not listed' layer = ds.GetLayerByName('public.tpoly') assert layer.GetFeatureCount() == 19, 'wrong feature count' gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds.ExecuteSQL('DELLAYER:test41') gdal.PopErrorHandler() ds.CreateLayer('test41') found = ogr_pg_check_layer_in_list(ds, 'test41') assert found is not False, 'layer test41 not listed' layer = ds.GetLayerByName('test41') assert layer.GetFeatureCount() == 0, 'wrong feature count' layer = ds.GetLayerByName('AutoTest-schema.test41') assert layer.GetFeatureCount() == 0, 'wrong feature count' ds.Destroy() ############################################################################### # Test schemas= option def test_ogr_pg_42(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' schemas=AutoTest-schema', update=1) # tpoly without schema refers to the active schema, that is to say AutoTest-schema found = ogr_pg_check_layer_in_list(ds, 'tpoly') assert found is not False, 'layer tpoly not listed' layer = ds.GetLayerByName('tpoly') assert layer.GetFeatureCount() == 3, 'wrong feature count' found = ogr_pg_check_layer_in_list(ds, 'AutoTest-schema.tpoly') assert found is not True, 'layer AutoTest-schema.tpoly is listed, but should not' layer = ds.GetLayerByName('AutoTest-schema.tpoly') assert layer.GetFeatureCount() == 3, 'wrong feature count' found = ogr_pg_check_layer_in_list(ds, 'public.tpoly') assert found is not True, 'layer public.tpoly is listed, but should not' layer = ds.GetLayerByName('public.tpoly') assert layer.GetFeatureCount() == 19, 'wrong feature count' found = ogr_pg_check_layer_in_list(ds, 'test41') assert found is not False, 'layer test41 not listed' layer = ds.GetLayerByName('test41') assert layer.GetFeatureCount() == 0, 'wrong feature count' layer = ds.GetLayerByName('AutoTest-schema.test41') assert layer.GetFeatureCount() == 0, 'wrong feature count' ds.Destroy() ############################################################################### # Test schemas= option def test_ogr_pg_43(): if gdaltest.pg_ds is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' schemas=public,AutoTest-schema', update=1) # tpoly without schema refers to the active schema, that is to say public found = ogr_pg_check_layer_in_list(ds, 'tpoly') assert found is not False, 'layer tpoly not listed' layer = ds.GetLayerByName('tpoly') assert layer.GetFeatureCount() == 19, 'wrong feature count' found = ogr_pg_check_layer_in_list(ds, 'AutoTest-schema.tpoly') assert found is not False, 'layer AutoTest-schema.tpoly not listed' layer = ds.GetLayerByName('AutoTest-schema.tpoly') assert layer.GetFeatureCount() == 3, 'wrong feature count' ds.Destroy() ############################################################################### # Test for table and column names that need quoting (#2945) def test_ogr_pg_44(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_lyr = gdaltest.pg_ds.CreateLayer('select', options=['OVERWRITE=YES', 'GEOMETRY_NAME=where', 'DIM=3']) ogrtest.quick_create_layer_def(gdaltest.pg_lyr, [('from', ogr.OFTReal)]) feat = ogr.Feature(gdaltest.pg_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (0.5 0.5 1)')) gdaltest.pg_lyr.CreateFeature(feat) feat.Destroy() gdaltest.pg_ds.ExecuteSQL('ALTER TABLE "select" RENAME COLUMN "ogc_fid" to "AND"') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) layer = ds.GetLayerByName('select') geom = ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,1 0,0 0))') layer.SetSpatialFilter(geom) geom.Destroy() assert layer.GetFeatureCount() == 1 feat = layer.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (0.5 0.5 1)' feat = layer.GetFeature(1) assert feat.GetGeometryRef().ExportToWkt() == 'POINT (0.5 0.5 1)' sql_lyr = ds.ExecuteSQL('SELECT * FROM "select"') geom = ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,1 0,0 0))') sql_lyr.SetSpatialFilter(geom) geom.Destroy() assert sql_lyr.GetFeatureCount() == 1 feat = sql_lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (0.5 0.5 1)' ds.ReleaseResultSet(sql_lyr) ds.Destroy() ############################################################################### # Test SetNextByIndex (#3117) def test_ogr_pg_45(): if gdaltest.pg_ds is None: pytest.skip() lyr = gdaltest.pg_ds.GetLayerByName('tpoly') assert lyr.TestCapability(ogr.OLCFastSetNextByIndex), \ 'OLCFastSetNextByIndex returned false' nb_feat = lyr.GetFeatureCount() tab_feat = [None for i in range(nb_feat)] for i in range(nb_feat): tab_feat[i] = lyr.GetNextFeature() lyr.SetNextByIndex(2) feat = lyr.GetNextFeature() assert feat.GetFID() == tab_feat[2].GetFID(), \ 'SetNextByIndex(2) did not return expected feature' feat = lyr.GetNextFeature() assert feat.GetFID() == tab_feat[3].GetFID(), 'did not get expected feature' ############################################################################### # Test that we can read more than 500 features and update each one # with SetFeature() def test_ogr_pg_46(): if gdaltest.pg_ds is None: pytest.skip() nFeatures = 1000 # Create a table with nFeatures records lyr = gdaltest.pg_ds.CreateLayer('bigtable') field_defn = ogr.FieldDefn("field1", ogr.OFTInteger) lyr.CreateField(field_defn) field_defn.Destroy() feature_defn = lyr.GetLayerDefn() lyr.StartTransaction() for i in range(nFeatures): feat = ogr.Feature(feature_defn) feat.SetField(0, i) lyr.CreateFeature(feat) feat.Destroy() lyr.CommitTransaction() # Check that we can read more than 500 features and update each one # with SetFeature() count = 0 sqllyr = gdaltest.pg_ds.ExecuteSQL('SELECT * FROM bigtable ORDER BY OGC_FID ASC') feat = sqllyr.GetNextFeature() while feat is not None: expected_val = count assert feat.GetFieldAsInteger(0) == expected_val, \ ('expected value was %d. Got %d' % (expected_val, feat.GetFieldAsInteger(0))) feat.SetField(0, -count) lyr.SetFeature(feat) feat.Destroy() count = count + 1 feat = sqllyr.GetNextFeature() assert count == nFeatures, ('did not get expected %d features' % nFeatures) # Check that 1 feature has been correctly updated sqllyr.SetNextByIndex(1) feat = sqllyr.GetNextFeature() expected_val = -1 assert feat.GetFieldAsInteger(0) == expected_val, \ ('expected value was %d. Got %d' % (expected_val, feat.GetFieldAsInteger(0))) feat.Destroy() gdaltest.pg_ds.ReleaseResultSet(sqllyr) ############################################################################### # Test that we can handle 'geography' column type introduced in PostGIS 1.5 def test_ogr_pg_47(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() # Create table with geography column gdaltest.pg_ds.ExecuteSQL("DELETE FROM spatial_ref_sys") gdaltest.pg_ds.ExecuteSQL("""INSERT INTO "spatial_ref_sys" ("srid","auth_name","auth_srid","srtext","proj4text") VALUES (4326,'EPSG',4326,'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]','+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ')""") if gdaltest.pg_ds.GetLayerByName('geography_columns') is None: pytest.skip('autotest database must be created with PostGIS >= 1.5') gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = gdaltest.pg_ds.CreateLayer('test_geog', srs=srs, options=['GEOM_TYPE=geography', 'GEOMETRY_NAME=my_geog']) field_defn = ogr.FieldDefn("test_string", ogr.OFTString) lyr.CreateField(field_defn) field_defn.Destroy() feature_defn = lyr.GetLayerDefn() # Create feature feat = ogr.Feature(feature_defn) feat.SetField(0, "test_string") geom = ogr.CreateGeometryFromWkt('POINT (3 50)') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat.Destroy() # Update feature lyr.ResetReading() feat = lyr.GetNextFeature() geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometry(geom) lyr.SetFeature(feat) feat.Destroy() # Re-open DB gdaltest.pg_ds.Destroy() gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) # Check if the layer is listed found = ogr_pg_check_layer_in_list(gdaltest.pg_ds, 'test_geog') assert found is not False, 'layer test_geog not listed' # Check that the layer is recorder in geometry_columns table geography_columns_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT * FROM geography_columns WHERE f_table_name = 'test_geog'") feat = geography_columns_lyr.GetNextFeature() if feat.GetFieldAsString('f_geography_column') != 'my_geog': feat.DumpReadable() pytest.fail() gdaltest.pg_ds.ReleaseResultSet(geography_columns_lyr) # Get the layer by name lyr = gdaltest.pg_ds.GetLayerByName('test_geog') assert lyr.GetExtent() == (2.0, 2.0, 49.0, 49.0), 'bad extent for test_geog' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)', 'bad geometry for test_geog' feat.Destroy() # Check with result set sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT * FROM test_geog') assert sql_lyr.GetExtent() == (2.0, 2.0, 49.0, 49.0), \ 'bad extent for SELECT * FROM test_geog' feat = sql_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)', \ 'bad geometry for SELECT * FROM test_geog' feat.Destroy() gdaltest.pg_ds.ReleaseResultSet(sql_lyr) # Check ST_AsText sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT ST_AsText(my_geog) FROM test_geog') feat = sql_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)', \ 'bad geometry for SELECT ST_AsText(my_geog) FROM test_geog' feat.Destroy() gdaltest.pg_ds.ReleaseResultSet(sql_lyr) # Check ST_AsBinary sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT ST_AsBinary(my_geog) FROM test_geog') feat = sql_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)', \ 'bad geometry for SELECT ST_AsBinary(my_geog) FROM test_geog' feat.Destroy() gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test that we can read a table without any primary key (#2082) # Test also the effect of PG_LIST_ALL_TABLES with a non spatial table in a # PostGIS DB. def test_ogr_pg_48(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds.ExecuteSQL("CREATE TABLE no_pk_table (gid serial NOT NULL, other_id INTEGER)") gdaltest.pg_ds.ExecuteSQL("INSERT INTO no_pk_table (gid, other_id) VALUES (1, 10)") gdaltest.pg_ds.Destroy() gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) found = ogr_pg_check_layer_in_list(gdaltest.pg_ds, 'no_pk_table') if gdaltest.pg_has_postgis: # Non spatial table in a PostGIS db -> not listed ... assert not found, 'layer no_pk_table unexpectedly listed' # ... but should be found on explicit request lyr = gdaltest.pg_ds.GetLayer('no_pk_table') assert lyr is not None, 'could not get no_pk_table' # Try again by setting PG_LIST_ALL_TABLES=YES gdal.SetConfigOption('PG_LIST_ALL_TABLES', 'YES') gdaltest.pg_ds.Destroy() gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) gdal.SetConfigOption('PG_LIST_ALL_TABLES', None) found = ogr_pg_check_layer_in_list(gdaltest.pg_ds, 'no_pk_table') assert found is not False, 'layer no_pk_table not listed' # Test LIST_ALL_TABLES=YES open option gdaltest.pg_ds.Destroy() gdaltest.pg_ds = gdal.OpenEx('PG:' + gdaltest.pg_connection_string, gdal.OF_VECTOR | gdal.OF_UPDATE, open_options=['LIST_ALL_TABLES=YES']) found = ogr_pg_check_layer_in_list(gdaltest.pg_ds, 'no_pk_table') assert found is not False, 'layer no_pk_table not listed' lyr = gdaltest.pg_ds.GetLayer('no_pk_table') assert lyr is not None, 'could not get no_pk_table' sr = lyr.GetSpatialRef() assert sr is None, 'did not get expected SRS' feat = lyr.GetNextFeature() assert feat is not None, 'did not get feature' assert lyr.GetFIDColumn() == '', 'got a non NULL FID column' if feat.GetFID() != 0: feat.DumpReadable() pytest.fail('did not get expected FID') if feat.GetFieldAsInteger('gid') != 1: feat.DumpReadable() pytest.fail('did not get expected gid') if feat.GetFieldAsInteger('other_id') != 10: feat.DumpReadable() pytest.fail('did not get expected other_id') ############################################################################### # Go on with previous test but set PGSQL_OGR_FID this time def test_ogr_pg_49(): if gdaltest.pg_ds is None: pytest.skip() gdal.SetConfigOption('PGSQL_OGR_FID', 'other_id') gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayer('no_pk_table') gdal.SetConfigOption('PGSQL_OGR_FID', None) feat = lyr.GetNextFeature() lyr.ResetReading() # to close implicit transaction assert lyr.GetFIDColumn() == 'other_id', 'did not get expected FID column' if feat.GetFID() != 10: feat.DumpReadable() pytest.fail('did not get expected FID') ############################################################################### # Write and read NaN values (#3667) # This tests writing using COPY and INSERT def test_ogr_pg_50(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_lyr = gdaltest.pg_ds.GetLayerByName('tpoly') assert gdaltest.pg_lyr is not None, 'did not get tpoly layer' feature_def = gdaltest.pg_lyr.GetLayerDefn() dst_feat = ogr.Feature(feature_def) try: dst_feat.SetFieldDoubleList bHasSetFieldDoubleList = True except: bHasSetFieldDoubleList = False for option in ['NO', 'YES']: gdal.SetConfigOption('PG_USE_COPY', option) gdaltest.pg_lyr.ResetReading() for value in ['NaN', 'Inf', '-Inf']: dst_feat.SetField('AREA', float(value)) dst_feat.SetField('PRFEDEA', value) dst_feat.SetField('SHORTNAME', option) if bHasSetFieldDoubleList: dst_feat.SetFieldDoubleList(feature_def.GetFieldIndex('REALLIST'), [float(value), float(value)]) dst_feat.SetFID(-1) gdaltest.pg_lyr.CreateFeature(dst_feat) gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) dst_feat.Destroy() for option in ['NO', 'YES']: for value in ['NaN', 'Inf', '-Inf']: gdaltest.pg_lyr.SetAttributeFilter('PRFEDEA = \'' + value + '\' AND SHORTNAME = \'' + option + '\'') feat = gdaltest.pg_lyr.GetNextFeature() got_val = feat.GetField('AREA') if value == 'NaN': if not gdaltest.isnan(got_val): gdaltest.pg_lyr.ResetReading() # to close implicit transaction pytest.fail(feat.GetFieldAsString('AREA') + ' returned for AREA instead of ' + value) elif got_val != float(value): gdaltest.pg_lyr.ResetReading() # to close implicit transaction pytest.fail(feat.GetFieldAsString('AREA') + ' returned for AREA instead of ' + value) if bHasSetFieldDoubleList: got_val = feat.GetFieldAsDoubleList(feature_def.GetFieldIndex('REALLIST')) if value == 'NaN': if not gdaltest.isnan(got_val[0]) or not gdaltest.isnan(got_val[1]): gdaltest.pg_lyr.ResetReading() # to close implicit transaction pytest.fail(feat.GetFieldAsString('REALLIST') + ' returned for REALLIST instead of ' + value) elif got_val[0] != float(value) or got_val[1] != float(value): gdaltest.pg_lyr.ResetReading() # to close implicit transaction pytest.fail(feat.GetFieldAsString('REALLIST') + ' returned for REALLIST instead of ' + value) gdaltest.pg_lyr.ResetReading() # to close implicit transaction ############################################################################### # Run test_ogrsf def test_ogr_pg_51(): if gdaltest.pg_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' "' + 'PG:' + gdaltest.pg_connection_string + '" tpoly testview') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Run test_ogrsf with -sql def test_ogr_pg_52(): if gdaltest.pg_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' "' + 'PG:' + gdaltest.pg_connection_string + '" -sql "SELECT * FROM tpoly"') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test creating a layer with explicitly wkbNone geometry type. def test_ogr_pg_53(): if gdaltest.pg_ds is None: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('no_geometry_table', geom_type=ogr.wkbNone, options=['OVERWRITE=YES']) field_defn = ogr.FieldDefn('foo') lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'bar') lyr.CreateFeature(feat) lyr.ResetReading() # force above feature to be committed ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert not (gdaltest.pg_has_postgis is True and ogr_pg_check_layer_in_list(ds, 'no_geometry_table') is True), \ 'did not expected no_geometry_table to be listed at that point' lyr = ds.GetLayerByName('no_geometry_table') feat = lyr.GetNextFeature() assert feat.GetField(0) == 'bar' gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('no_geometry_table', geom_type=ogr.wkbNone) gdal.PopErrorHandler() assert lyr is None, 'layer creation should have failed' lyr = ds.CreateLayer('no_geometry_table', geom_type=ogr.wkbNone, options=['OVERWRITE=YES']) field_defn = ogr.FieldDefn('baz') lyr.CreateField(field_defn) ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.CreateLayer('no_geometry_table', geom_type=ogr.wkbNone, options=['OVERWRITE=YES']) field_defn = ogr.FieldDefn('bar') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('baz') lyr.CreateField(field_defn) assert lyr is not None ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('no_geometry_table') assert lyr.GetLayerDefn().GetFieldCount() == 2 ############################################################################### # Check that we can overwrite a non-spatial geometry table (#4012) def test_ogr_pg_53_bis(): import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/no_geometry_table.csv', 'wt') f.write('foo,bar\n') f.write('"baz","foo"\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PostgreSQL "' + 'PG:' + gdaltest.pg_connection_string + '" tmp/no_geometry_table.csv -overwrite') os.unlink('tmp/no_geometry_table.csv') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('no_geometry_table') feat = lyr.GetNextFeature() assert feat.GetField(0) == 'baz' ############################################################################### # Test reading AsEWKB() def test_ogr_pg_54(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() if gdaltest.pg_has_postgis_2: sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT ST_AsEWKB(GeomFromEWKT('POINT (0 1 2)'))") else: sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT AsEWKB(GeomFromEWKT('POINT (0 1 2)'))") feat = sql_lyr.GetNextFeature() gdaltest.pg_ds.ReleaseResultSet(sql_lyr) geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (0 1 2)' ############################################################################### # Test reading geoms as Base64 encoded strings def test_ogr_pg_55(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() layer = gdaltest.pg_ds.CreateLayer('ogr_pg_55', options=['DIM=3']) feat = ogr.Feature(layer.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (1 2 3)')) layer.CreateFeature(feat) feat = None layer.ResetReading() # force above feature to be committed old_val = gdal.GetConfigOption('PG_USE_BASE64') gdal.SetConfigOption('PG_USE_BASE64', 'YES') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) layer = ds.GetLayerByName('ogr_pg_55') feat = layer.GetNextFeature() gdal.SetConfigOption('PG_USE_BASE64', old_val) assert feat.GetGeometryRef().ExportToWkt() == 'POINT (1 2 3)' ds = None ############################################################################### # Test insertion of features with first field being a 0-character string in a # non-spatial table and without FID in COPY mode (#4040) def test_ogr_pg_56(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds.ExecuteSQL('CREATE TABLE ogr_pg_56 ( bar varchar, baz varchar ) WITH (OIDS=FALSE)') gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_56') feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(1, '') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '') feat.SetField(1, '') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'bar') feat.SetField(1, '') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '') feat.SetField(1, 'baz') lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_56') feat = lyr.GetNextFeature() if feat.GetField(0) is not None or feat.GetField(1) is not None: feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) feat = lyr.GetNextFeature() if feat.GetField(0) != '' or feat.GetField(1) is not None: feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) feat = lyr.GetNextFeature() if feat.GetField(0) is not None or feat.GetField(1) != '': feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) feat = lyr.GetNextFeature() if feat.GetField(0) != '' or feat.GetField(1) != '': feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) feat = lyr.GetNextFeature() if feat.GetField(0) != 'bar' or feat.GetField(1) != '': feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) feat = lyr.GetNextFeature() if feat.GetField(0) != '' or feat.GetField(1) != 'baz': feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) ds = None ############################################################################### # Test inserting an empty feature def test_ogr_pg_57(): if gdaltest.pg_ds is None: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_57') lyr.CreateField(ogr.FieldDefn('acolumn', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(feat) feat = None assert ret == 0 ############################################################################### # Test RFC35 def test_ogr_pg_58(): if gdaltest.pg_ds is None: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_58') lyr.CreateField(ogr.FieldDefn('strcolumn', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('aintcolumn', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('aintcolumn', 12345) lyr.CreateFeature(feat) feat = None assert lyr.TestCapability(ogr.OLCReorderFields) == 0 assert lyr.TestCapability(ogr.OLCAlterFieldDefn) == 1 assert lyr.TestCapability(ogr.OLCDeleteField) == 1 fd = ogr.FieldDefn('anotherstrcolumn', ogr.OFTString) fd.SetWidth(5) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('aintcolumn'), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField('anotherstrcolumn') == '12345', 'failed (1)' gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayer('ogr_pg_58') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField('anotherstrcolumn') == '12345', 'failed (2)' feat = None lyr.ResetReading() # to close implicit transaction assert lyr.DeleteField(lyr.GetLayerDefn().GetFieldIndex('anotherstrcolumn')) == 0, \ 'failed (3)' gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayer('ogr_pg_58') assert lyr.GetLayerDefn().GetFieldCount() == 1, 'failed (4)' ############################################################################### # Check that we can use -nln with a layer name that is recognized by GetLayerByName() # but which is not the layer name. def test_ogr_pg_59(): if gdaltest.pg_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal( test_cli_utilities.get_ogr2ogr_path() + ' -append -f PostgreSQL "' + 'PG:' + gdaltest.pg_connection_string + '" data/poly.shp -nln public.tpoly') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('tpoly') fc = lyr.GetFeatureCount() ds = None assert fc == 35, 'did not get expected feature count' ############################################################################### # Test that we can insert a feature that has a FID on a table with a # non-incrementing PK. def test_ogr_pg_60(): if gdaltest.pg_ds is None: pytest.skip() sql_lyr = gdaltest.pg_ds.ExecuteSQL("CREATE TABLE ogr_pg_60(id integer," "name varchar(50),primary key (id)) " "without oids") gdaltest.pg_ds.ReleaseResultSet(sql_lyr) gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayerByName('ogr_pg_60') assert lyr.GetFIDColumn() == 'id', 'did not get expected name for FID column' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(100) feat.SetField('name', 'a_name') lyr.CreateFeature(feat) assert feat.GetFID() == 100, 'bad FID value' feat = lyr.GetFeature(100) assert feat is not None, 'did not get feature' ############################################################################### # Test insertion of features with FID set in COPY mode (#4495) def test_ogr_pg_61(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds.ExecuteSQL('CREATE TABLE ogr_pg_61 ( id integer NOT NULL PRIMARY KEY, bar varchar )') gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_61') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(10) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(20) feat.SetField(0, 'baz') lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_61') feat = lyr.GetFeature(10) if not feat.IsFieldNull(0): feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) feat = lyr.GetFeature(20) if feat.GetField(0) != 'baz': feat.DumpReadable() pytest.fail('did not get expected value for feat %d' % feat.GetFID()) ds = None ############################################################################### # Test ExecuteSQL() and getting SRID of the request (#4699) def test_ogr_pg_62(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() # Test on a regular request in a table srs = osr.SpatialReference() srs.ImportFromEPSG(32631) gdaltest.pg_ds.ExecuteSQL('DELLAYER:testsrtext2') gdaltest.pg_ds.CreateLayer('testsrtext2', srs=srs) sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT * FROM testsrtext2') got_srs = sql_lyr.GetSpatialRef() gdaltest.pg_ds.ReleaseResultSet(sql_lyr) assert not (got_srs is None or got_srs.ExportToWkt().find('32631') == -1) # Test a request on a table, but with a geometry column not in the table sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT eas_id, GeomFromEWKT('SRID=4326;POINT(0 1)') FROM tpoly") got_srs = sql_lyr.GetSpatialRef() gdaltest.pg_ds.ReleaseResultSet(sql_lyr) assert not (got_srs is None or got_srs.ExportToWkt().find('4326') == -1) ############################################################################### # Test COLUMN_TYPES layer creation option (#4788) def test_ogr_pg_63(): if gdaltest.pg_ds is None: pytest.skip() # No need to test it in the non PostGIS case if not gdaltest.pg_has_postgis: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_63', options=['COLUMN_TYPES=foo=int8,bar=numeric(10,5),baz=hstore,baw=numeric(20,0)']) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('bar', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('baw', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', '123') feat.SetField('baw', '123456789012345') lyr.StartTransaction() lyr.CreateFeature(feat) lyr.CommitTransaction() feat = None lyr = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_63') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('foo')).GetType() == ogr.OFTInteger64 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('bar')).GetType() == ogr.OFTReal feat = lyr.GetNextFeature() assert feat.GetField('foo') == 123 assert feat.GetField('baw') == 123456789012345 ############################################################################### # Test OGR_TRUNCATE config. option (#5091) def test_ogr_pg_64(): if gdaltest.pg_ds is None: pytest.skip() # No need to test it in the non PostGIS case if not gdaltest.pg_has_postgis: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_63') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', '124') lyr.CreateFeature(feat) assert lyr.GetFeatureCount() == 2 ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_63') gdal.SetConfigOption('OGR_TRUNCATE', 'YES') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', '125') lyr.CreateFeature(feat) gdal.SetConfigOption('OGR_TRUNCATE', None) # Just one feature because of truncation assert lyr.GetFeatureCount() == 1 ############################################################################### # Test RFC 41 def test_ogr_pg_65(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) assert ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) != 0 lyr = ds.CreateLayer('ogr_pg_65', geom_type=ogr.wkbNone) assert lyr.TestCapability(ogr.OLCCreateGeomField) != 0 gfld_defn = ogr.GeomFieldDefn('geom1', ogr.wkbPoint) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) gfld_defn.SetSpatialRef(srs) assert lyr.CreateGeomField(gfld_defn) == 0 gfld_defn = ogr.GeomFieldDefn('geom2', ogr.wkbLineString25D) assert lyr.CreateGeomField(gfld_defn) == 0 gfld_defn = ogr.GeomFieldDefn('geom3', ogr.wkbPoint) srs = osr.SpatialReference() srs.ImportFromEPSG(32631) gfld_defn.SetSpatialRef(srs) assert lyr.CreateGeomField(gfld_defn) == 0 lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('intfield', 123) feat.SetGeomFieldDirectly('geom1', ogr.CreateGeometryFromWkt('POINT (1 2)')) feat.SetGeomFieldDirectly('geom2', ogr.CreateGeometryFromWkt('LINESTRING (3 4 5,6 7 8)')) assert lyr.CreateFeature(feat) == 0 feat = ogr.Feature(lyr.GetLayerDefn()) assert lyr.CreateFeature(feat) == 0 lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetField('intfield') != 123 or \ feat.GetGeomFieldRef('geom1').ExportToWkt() != 'POINT (1 2)' or \ feat.GetGeomFieldRef('geom2').ExportToWkt() != 'LINESTRING (3 4 5,6 7 8)': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef('geom1') is not None or \ feat.GetGeomFieldRef('geom2') is not None: feat.DumpReadable() pytest.fail() ds = None for i in range(2): ds = ogr.Open('PG:' + gdaltest.pg_connection_string) if i == 0: lyr = ds.GetLayerByName('ogr_pg_65') else: lyr = ds.ExecuteSQL('SELECT * FROM ogr_pg_65') assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetName() == 'geom1' assert i != 0 or lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbPoint assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef().ExportToWkt().find('4326') >= 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetName() == 'geom2' assert i != 0 or lyr.GetLayerDefn().GetGeomFieldDefn(1).GetType() == ogr.wkbLineString25D assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetSpatialRef() is None assert not (i == 0 and lyr.GetLayerDefn().GetGeomFieldDefn(2).GetSpatialRef().ExportToWkt().find('32631') < 0) feat = lyr.GetNextFeature() if feat.GetField('intfield') != 123 or \ feat.GetGeomFieldRef('geom1').ExportToWkt() != 'POINT (1 2)' or \ feat.GetGeomFieldRef('geom2').ExportToWkt() != 'LINESTRING (3 4 5,6 7 8)': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef('geom1') is not None or \ feat.GetGeomFieldRef('geom2') is not None: feat.DumpReadable() pytest.fail() if i == 1: ds.ReleaseResultSet(lyr) gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_65') lyr.DeleteFeature(1) lyr.DeleteFeature(2) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeomFieldDirectly('geom1', ogr.CreateGeometryFromWkt('POINT (3 4)')) feat.SetGeomFieldDirectly('geom2', ogr.CreateGeometryFromWkt('LINESTRING (4 5 6,7 8 9)')) assert lyr.CreateFeature(feat) == 0 feat = ogr.Feature(lyr.GetLayerDefn()) assert lyr.CreateFeature(feat) == 0 gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_65') feat = lyr.GetNextFeature() if feat.GetGeomFieldRef('geom1').ExportToWkt() != 'POINT (3 4)' or \ feat.GetGeomFieldRef('geom2').ExportToWkt() != 'LINESTRING (4 5 6,7 8 9)': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef('geom1') is not None or \ feat.GetGeomFieldRef('geom2') is not None: feat.DumpReadable() pytest.fail() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is not None: gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -update "' + 'PG:' + gdaltest.pg_connection_string + '" "' + 'PG:' + gdaltest.pg_connection_string + '" ogr_pg_65 -nln ogr_pg_65_copied -overwrite') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_65_copied') assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef().ExportToWkt().find('4326') >= 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetSpatialRef() is None assert lyr.GetLayerDefn().GetGeomFieldDefn(2).GetSpatialRef().ExportToWkt().find('32631') >= 0 ############################################################################### # Run test_ogrsf def test_ogr_pg_66(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' "' + 'PG:' + gdaltest.pg_connection_string + '" ogr_pg_65') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test retrieving SRID from values (#5131) def test_ogr_pg_67(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_67') lyr.ResetReading() # to trigger layer creation lyr = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_67') assert lyr.GetSpatialRef() is None feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_67') assert lyr.GetSpatialRef() is None ds.ExecuteSQL("ALTER TABLE ogr_pg_67 DROP CONSTRAINT enforce_srid_wkb_geometry") ds.ExecuteSQL("UPDATE ogr_pg_67 SET wkb_geometry = ST_GeomFromEWKT('SRID=4326;POINT(0 1)')") ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_67') assert lyr.GetSpatialRef() is not None ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' tables=fake', update=1) lyr = ds.GetLayerByName('ogr_pg_67') assert lyr.GetSpatialRef() is not None ds = None ############################################################################### # Test retrieving SRID from values even if we don't have select rights on geometry_columns (#5131) def test_ogr_pg_68(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_68', srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(feat) lyr = None sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT current_user') feat = sql_lyr.GetNextFeature() current_user = feat.GetField(0) gdaltest.pg_ds.ReleaseResultSet(sql_lyr) gdaltest.pg_ds.ExecuteSQL("REVOKE SELECT ON geometry_columns FROM %s" % current_user) ds = ogr.Open('PG:' + gdaltest.pg_connection_string + ' tables=fake', update=1) lyr = ds.GetLayerByName('ogr_pg_68') got_srs = None if lyr is not None: got_srs = lyr.GetSpatialRef() sql_lyr = ds.ExecuteSQL("select * from ( select 'SRID=4326;POINT(0 0)'::geometry as g ) as _xx") got_srs2 = None if sql_lyr is not None: got_srs2 = sql_lyr.GetSpatialRef() ds.ReleaseResultSet(sql_lyr) ds = None gdaltest.pg_ds.ExecuteSQL("GRANT SELECT ON geometry_columns TO %s" % current_user) assert got_srs is not None assert got_srs2 is not None ############################################################################### # Test deferred loading of tables (#5450) def has_run_load_tables(ds): return int(ds.GetMetadataItem("bHasLoadTables", "_DEBUG_")) def test_ogr_pg_69(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert not has_run_load_tables(gdaltest.pg_ds) gdaltest.pg_ds.GetLayerByName('tpoly') assert not has_run_load_tables(gdaltest.pg_ds) sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT * FROM tpoly') assert not has_run_load_tables(gdaltest.pg_ds) feat = sql_lyr.GetNextFeature() assert not has_run_load_tables(gdaltest.pg_ds) del feat gdaltest.pg_ds.ReleaseResultSet(sql_lyr) gdaltest.pg_ds.GetLayer(0) assert has_run_load_tables(gdaltest.pg_ds) # Test that we can find a layer with non lowercase gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert gdaltest.pg_ds.GetLayerByName('TPOLY') is not None ############################################################################### # Test historical non-differed creation of tables (#5547) def test_ogr_pg_70(): if gdaltest.pg_ds is None: pytest.skip() gdal.SetConfigOption('OGR_PG_DEFERRED_CREATION', 'NO') lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_70') gdal.SetConfigOption('OGR_PG_DEFERRED_CREATION', None) ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr2 = ds.GetLayerByName('ogr_pg_70') assert lyr2 is not None ds = None lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr2 = ds.GetLayerByName('ogr_pg_70') assert lyr2.GetLayerDefn().GetFieldCount() == 1 ds = None gfld_defn = ogr.GeomFieldDefn('geom', ogr.wkbPoint) lyr.CreateGeomField(gfld_defn) ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr2 = ds.GetLayerByName('ogr_pg_70') assert lyr2.GetLayerDefn().GetGeomFieldCount() == 2 ds = None if gdaltest.pg_has_postgis and gdaltest.pg_ds.GetLayerByName('geography_columns') is not None: print('Trying geography') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_70') gdal.SetConfigOption('OGR_PG_DEFERRED_CREATION', 'NO') lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_70', options=['GEOM_TYPE=geography', 'GEOMETRY_NAME=my_geog']) gdal.SetConfigOption('OGR_PG_DEFERRED_CREATION', None) ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr2 = ds.GetLayerByName('ogr_pg_70') assert lyr2.GetLayerDefn().GetGeomFieldCount() == 1 geography_columns_lyr = ds.ExecuteSQL("SELECT * FROM geography_columns WHERE f_table_name = 'ogr_pg_70' AND f_geography_column = 'my_geog'") assert geography_columns_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(geography_columns_lyr) ds = None ############################################################################### # Test interoperability of WKT/WKB with PostGIS. def test_ogr_pg_71(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() curve_lyr = gdaltest.pg_ds.CreateLayer('test_curve') curve_lyr2 = gdaltest.pg_ds.CreateLayer('test_curve_3d', geom_type=ogr.wkbUnknown | ogr.wkb25DBit) # FIXME: the ResetReading() should not be necessary curve_lyr.ResetReading() curve_lyr2.ResetReading() for wkt in ['CIRCULARSTRING EMPTY', 'CIRCULARSTRING Z EMPTY', 'CIRCULARSTRING (0 1,2 3,4 5)', 'CIRCULARSTRING Z (0 1 2,4 5 6,7 8 9)', 'COMPOUNDCURVE EMPTY', 'TRIANGLE ((0 0 0,100 0 100,0 100 100,0 0 0))', 'COMPOUNDCURVE ((0 1,2 3,4 5))', 'COMPOUNDCURVE Z ((0 1 2,4 5 6,7 8 9))', 'COMPOUNDCURVE ((0 1,2 3,4 5),CIRCULARSTRING (4 5,6 7,8 9))', 'COMPOUNDCURVE Z ((0 1 2,4 5 6,7 8 9),CIRCULARSTRING Z (7 8 9,10 11 12,13 14 15))', 'CURVEPOLYGON EMPTY', 'CURVEPOLYGON ((0 0,0 1,1 1,1 0,0 0))', 'CURVEPOLYGON Z ((0 0 2,0 1 3,1 1 4,1 0 5,0 0 2))', 'CURVEPOLYGON (COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0)))', 'CURVEPOLYGON Z (COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 2,1 0 3,0 0 2)))', 'MULTICURVE EMPTY', 'MULTICURVE (CIRCULARSTRING (0 0,1 0,0 0),(0 0,1 1))', 'MULTICURVE Z (CIRCULARSTRING Z (0 0 1,1 0 1,0 0 1),(0 0 1,1 1 1))', 'MULTICURVE (CIRCULARSTRING (0 0,1 0,0 0),(0 0,1 1),COMPOUNDCURVE ((0 0,1 1),CIRCULARSTRING (1 1,2 2,3 3)))', 'MULTISURFACE EMPTY', 'MULTISURFACE (((0 0,0 10,10 10,10 0,0 0)),CURVEPOLYGON (CIRCULARSTRING (0 0,1 0,0 0)))', 'MULTISURFACE Z (((0 0 1,0 10 1,10 10 1,10 0 1,0 0 1)),CURVEPOLYGON Z (CIRCULARSTRING Z (0 0 1,1 0 1,0 0 1)))', 'GEOMETRYCOLLECTION (CIRCULARSTRING (0 1,2 3,4 5),COMPOUNDCURVE ((0 1,2 3,4 5)),CURVEPOLYGON ((0 0,0 1,1 1,1 0,0 0)),MULTICURVE ((0 0,1 1)),MULTISURFACE (((0 0,0 10,10 10,10 0,0 0))))', ]: # would cause PostGIS 1.X to crash if not gdaltest.pg_has_postgis_2 and wkt == 'CURVEPOLYGON EMPTY': continue # Parsing error of WKT by PostGIS 1.X if not gdaltest.pg_has_postgis_2 and 'MULTICURVE' in wkt and 'CIRCULARSTRING' in wkt: continue postgis_in_wkt = wkt while True: z_pos = postgis_in_wkt.find('Z ') # PostGIS 1.X doesn't like Z in WKT if not gdaltest.pg_has_postgis_2 and z_pos >= 0: postgis_in_wkt = postgis_in_wkt[0:z_pos] + postgis_in_wkt[z_pos + 2:] else: break # Test parsing PostGIS WKB lyr = gdaltest.pg_ds.ExecuteSQL("SELECT ST_GeomFromText('%s')" % postgis_in_wkt) f = lyr.GetNextFeature() g = f.GetGeometryRef() out_wkt = g.ExportToWkt() g = None f = None gdaltest.pg_ds.ReleaseResultSet(lyr) expected_wkt = wkt if not gdaltest.pg_has_postgis_2 and 'EMPTY' in wkt: expected_wkt = 'GEOMETRYCOLLECTION EMPTY' assert out_wkt == expected_wkt # Test parsing PostGIS WKT if gdaltest.pg_has_postgis_2: fct = 'ST_AsText' else: fct = 'AsEWKT' lyr = gdaltest.pg_ds.ExecuteSQL("SELECT %s(ST_GeomFromText('%s'))" % (fct, postgis_in_wkt)) f = lyr.GetNextFeature() g = f.GetGeometryRef() out_wkt = g.ExportToWkt() g = None f = None gdaltest.pg_ds.ReleaseResultSet(lyr) expected_wkt = wkt if not gdaltest.pg_has_postgis_2 and 'EMPTY' in wkt: expected_wkt = 'GEOMETRYCOLLECTION EMPTY' assert out_wkt == expected_wkt g = ogr.CreateGeometryFromWkt(wkt) if g.GetCoordinateDimension() == 2: active_lyr = curve_lyr else: active_lyr = curve_lyr2 # Use our WKB export to inject into PostGIS and check that # PostGIS interprets it correctly by checking with ST_AsText f = ogr.Feature(active_lyr.GetLayerDefn()) f.SetGeometry(g) ret = active_lyr.CreateFeature(f) assert ret == 0, wkt fid = f.GetFID() # AsEWKT() in PostGIS 1.X does not like CIRCULARSTRING EMPTY if not gdaltest.pg_has_postgis_2 and 'CIRCULARSTRING' in wkt and 'EMPTY' in wkt: continue lyr = gdaltest.pg_ds.ExecuteSQL("SELECT %s(wkb_geometry) FROM %s WHERE ogc_fid = %d" % (fct, active_lyr.GetName(), fid)) f = lyr.GetNextFeature() g = f.GetGeometryRef() out_wkt = g.ExportToWkt() gdaltest.pg_ds.ReleaseResultSet(lyr) g = None f = None assert out_wkt == wkt ############################################################################### # Test 64 bit FID def test_ogr_pg_72(): if gdaltest.pg_ds is None: pytest.skip() # Regular layer with 32 bit IDs lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_72') assert lyr.GetMetadataItem(ogr.OLMD_FID64) is None lyr.CreateField(ogr.FieldDefn('foo')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(123456789012345) f.SetField(0, 'bar') assert lyr.CreateFeature(f) == 0 f = lyr.GetFeature(123456789012345) assert f is not None lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_72', options=['FID64=YES', 'OVERWRITE=YES']) assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None lyr.CreateField(ogr.FieldDefn('foo')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(123456789012345) f.SetField(0, 'bar') assert lyr.CreateFeature(f) == 0 assert lyr.SetFeature(f) == 0 gdaltest.pg_ds = None # Test with binary protocol # gdaltest.pg_ds = ogr.Open( 'PGB:' + gdaltest.pg_connection_string, update = 1 ) # lyr = gdaltest.pg_ds.GetLayerByName('ogr_pg_72') # if lyr.GetMetadataItem(ogr.OLMD_FID64) is None: # gdaltest.post_reason('fail') # return 'fail' # f = lyr.GetNextFeature() # if f.GetFID() != 123456789012345: # gdaltest.post_reason('fail') # f.DumpReadable() # return 'fail' # gdaltest.pg_ds = None # Test with normal protocol gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayerByName('ogr_pg_72') assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None f = lyr.GetNextFeature() if f.GetFID() != 123456789012345: f.DumpReadable() pytest.fail() lyr.ResetReading() # to close implicit transaction ############################################################################### # Test not nullable fields def test_ogr_pg_73(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() gdal.SetConfigOption('PG_USE_COPY', 'NO') lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_73', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_nullable', ogr.wkbPoint) lyr.CreateGeomField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None gdal.SetConfigOption('PG_USE_COPY', gdaltest.pg_use_copy) lyr.ResetReading() # force above feature to be committed ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_73') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_nullable')).IsNullable() == 1 # Turn not null into nullable src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')) fd = ogr.FieldDefn('now_nullable', src_fd.GetType()) fd.SetNullable(1) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable'), fd, ogr.ALTER_ALL_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('now_nullable')).IsNullable() == 1 # Turn nullable into not null, but remove NULL values first ds.ExecuteSQL("UPDATE ogr_pg_73 SET field_nullable = '' WHERE field_nullable IS NULL") src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')) fd = ogr.FieldDefn('now_nullable', src_fd.GetType()) fd.SetName('now_not_nullable') fd.SetNullable(0) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable'), fd, ogr.ALTER_ALL_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('now_not_nullable')).IsNullable() == 0 sql_lyr = ds.ExecuteSQL('SELECT * FROM ogr_pg_73') assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('now_not_nullable')).IsNullable() == 0 assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('now_nullable')).IsNullable() == 1 assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(sql_lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(sql_lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_nullable')).IsNullable() == 1 ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test default values def test_ogr_pg_74(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_74', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime3', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56.123'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_date', ogr.OFTDate) field_defn.SetDefault("CURRENT_DATE") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_time', ogr.OFTTime) field_defn.SetDefault("CURRENT_TIME") lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldNull('field_string') f.SetField('field_int', 456) f.SetField('field_real', 4.56) f.SetField('field_datetime', '2015/06/30 12:34:56') f.SetField('field_datetime2', '2015/06/30 12:34:56') f.SetField('field_datetime3', '2015/06/30 12:34:56.123') f.SetField('field_date', '2015/06/30') f.SetField('field_time', '12:34:56') lyr.CreateFeature(f) f = None # Transition from COPY to INSERT f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None # Transition from INSERT to COPY f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_string', 'b') f.SetField('field_int', 456) f.SetField('field_real', 4.56) f.SetField('field_datetime', '2015/06/30 12:34:56') f.SetField('field_datetime2', '2015/06/30 12:34:56') f.SetField('field_datetime3', '2015/06/30 12:34:56.123') f.SetField('field_date', '2015/06/30') f.SetField('field_time', '12:34:56') lyr.CreateFeature(f) f = None lyr.ResetReading() # force above feature to be committed ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.ExecuteSQL('set timezone to "UTC"') lyr = ds.GetLayerByName('ogr_pg_74') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'a''b'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() == '123' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_real')).GetDefault() == '1.23' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nodefault')).GetDefault() is None assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime')).GetDefault() == 'CURRENT_TIMESTAMP' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault() == "'2015/06/30 12:34:56'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime3')).GetDefault() == "'2015/06/30 12:34:56.123'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault() == "CURRENT_DATE" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_time')).GetDefault() == "CURRENT_TIME" f = lyr.GetNextFeature() if not f.IsFieldNull('field_string'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('field_string') != 'a\'b' or f.GetField('field_int') != 123 or \ f.GetField('field_real') != 1.23 or \ not f.IsFieldNull('field_nodefault') or not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56+00' or \ f.GetField('field_datetime3') != '2015/06/30 12:34:56.123+00' or \ not f.IsFieldSet('field_date') or not f.IsFieldSet('field_time'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('field_string') != 'b': f.DumpReadable() pytest.fail() lyr.ResetReading() # to close implicit transaction # Change DEFAULT value src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')) fd = ogr.FieldDefn('field_string', src_fd.GetType()) fd.SetDefault("'c'") lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string'), fd, ogr.ALTER_DEFAULT_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'c'" # Drop DEFAULT value src_fd = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')) fd = ogr.FieldDefn('field_int', src_fd.GetType()) fd.SetDefault(None) lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int'), fd, ogr.ALTER_DEFAULT_FLAG) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() is None ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.ExecuteSQL('set timezone to "UTC"') lyr = ds.GetLayerByName('ogr_pg_74') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'c'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() is None ############################################################################### # Test creating a field with the fid name def test_ogr_pg_75(): if gdaltest.pg_ds is None: pytest.skip() if not gdaltest.pg_has_postgis: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_75', geom_type=ogr.wkbNone, options=['FID=myfid']) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTInteger)) assert ret == 0 lyr.CreateField(ogr.FieldDefn('str2', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 10) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat.GetFID() == 10 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 if feat.GetFID() < 0: feat.DumpReadable() pytest.fail() if feat.GetField('myfid') != feat.GetFID(): feat.DumpReadable() pytest.fail() feat.SetField('str', 'foo') ret = lyr.SetFeature(feat) assert ret == 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1) feat.SetField('myfid', 10) gdal.PushErrorHandler() ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat.UnsetField('myfid') gdal.PushErrorHandler() ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 12) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat.GetFID() == 12 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 10 or f.GetField('str') != 'first string' or f.GetField('str2') != 'second string' or f.GetField('myfid') != 10: f.DumpReadable() pytest.fail() f = lyr.GetFeature(f.GetFID()) if f.GetFID() != 10 or f.GetField('str') != 'first string' or f.GetField('str2') != 'second string' or f.GetField('myfid') != 10: f.DumpReadable() pytest.fail() f = None lyr.ResetReading() # to close implicit transaction ############################################################################### # Test transactions RFC 54 def ogr_pg_76_get_transaction_state(ds): return (ds.GetMetadataItem("osDebugLastTransactionCommand", "_DEBUG_"), int(ds.GetMetadataItem("nSoftTransactionLevel", "_DEBUG_")), int(ds.GetMetadataItem("bSavePointActive", "_DEBUG_")), int(ds.GetMetadataItem("bUserTransactionActive", "_DEBUG_"))) def test_ogr_pg_76(): if gdaltest.pg_ds is None: pytest.skip() assert gdaltest.pg_ds.TestCapability(ogr.ODsCTransactions) == 1 level = int(gdaltest.pg_ds.GetMetadataItem("nSoftTransactionLevel", "_DEBUG_")) assert level == 0 if gdaltest.pg_has_postgis_2: gdaltest.pg_ds.StartTransaction() lyr = gdaltest.pg_ds.CreateLayer('will_not_be_created', options=['OVERWRITE=YES']) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM geometry_columns WHERE f_table_name = 'will_not_be_created'") f = sql_lyr.GetNextFeature() res = f.GetField(0) gdaltest.pg_ds.ReleaseResultSet(sql_lyr) assert res == 1 gdaltest.pg_ds.RollbackTransaction() # Rollback doesn't rollback the insertion in geometry_columns if done through the AddGeometryColumn() sql_lyr = gdaltest.pg_ds.ExecuteSQL("SELECT COUNT(*) FROM geometry_columns WHERE f_table_name = 'will_not_be_created'") f = sql_lyr.GetNextFeature() res = f.GetField(0) gdaltest.pg_ds.ReleaseResultSet(sql_lyr) assert res == 0 gdal.SetConfigOption('OGR_PG_CURSOR_PAGE', '1') lyr1 = gdaltest.pg_ds.CreateLayer('ogr_pg_76_lyr1', geom_type=ogr.wkbNone, options=['OVERWRITE=YES']) lyr2 = gdaltest.pg_ds.CreateLayer('ogr_pg_76_lyr2', geom_type=ogr.wkbNone, options=['OVERWRITE=YES']) gdal.SetConfigOption('OGR_PG_CURSOR_PAGE', None) lyr1.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) # lyr2.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) lyr2.CreateFeature(ogr.Feature(lyr2.GetLayerDefn())) lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) lyr2.CreateFeature(ogr.Feature(lyr2.GetLayerDefn())) level = int(gdaltest.pg_ds.GetMetadataItem("nSoftTransactionLevel", "_DEBUG_")) assert level == 0 ret = ogr_pg_76_scenario1(lyr1, lyr2) ret = ogr_pg_76_scenario2(lyr1, lyr2) ret = ogr_pg_76_scenario3(lyr1, lyr2) ret = ogr_pg_76_scenario4(lyr1, lyr2) return ret # Scenario 1 : a CreateFeature done in the middle of GetNextFeature() def ogr_pg_76_scenario1(lyr1, lyr2): (_, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (level, savepoint, usertransac) == (0, 0, 0) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('BEGIN', 1, 0, 0) lyr1.SetAttributeFilter("foo is NULL") (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('COMMIT', 0, 0, 0) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('BEGIN', 1, 0, 0) f = lyr2.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 2, 0, 0) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 2 # Check that GetFeature() doesn't reset the cursor f = lyr1.GetFeature(f.GetFID()) assert f is not None and f.GetFID() == 2 f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 3 f = lyr2.GetNextFeature() assert f is not None and f.GetFID() == 2 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 2, 0, 0) lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) lyr1.ResetReading() (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 1, 0, 0) lyr2.ResetReading() (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('COMMIT', 0, 0, 0) assert lyr1.GetFeatureCount() == 4 # Scenario 2 : a CreateFeature done in the middle of GetNextFeature(), themselves between a user transaction def ogr_pg_76_scenario2(lyr1, lyr2): assert gdaltest.pg_ds.StartTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('BEGIN', 1, 0, 1) # Try to re-enter a transaction gdal.ErrorReset() gdal.PushErrorHandler() ret = gdaltest.pg_ds.StartTransaction() gdal.PopErrorHandler() assert not (gdal.GetLastErrorMsg() == '' or ret == 0) (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 1, 0, 1) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 2, 0, 1) f = lyr2.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 3, 0, 1) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 2 f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 3 f = lyr2.GetNextFeature() assert f is not None and f.GetFID() == 2 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 3, 0, 1) lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) lyr1.ResetReading() (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 2, 0, 1) lyr2.ResetReading() (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 1, 0, 1) assert gdaltest.pg_ds.CommitTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('COMMIT', 0, 0, 0) assert gdaltest.pg_ds.StartTransaction() == 0 assert gdaltest.pg_ds.RollbackTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('ROLLBACK', 0, 0, 0) # Try to re-commit a transaction gdal.ErrorReset() gdal.PushErrorHandler() ret = gdaltest.pg_ds.CommitTransaction() gdal.PopErrorHandler() assert not (gdal.GetLastErrorMsg() == '' or ret == 0) (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 0, 0, 0) # Try to rollback a non-transaction gdal.ErrorReset() gdal.PushErrorHandler() ret = gdaltest.pg_ds.RollbackTransaction() gdal.PopErrorHandler() assert not (gdal.GetLastErrorMsg() == '' or ret == 0) (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 0, 0, 0) # Scenario 3 : StartTransaction(), GetNextFeature(), CommitTransaction(), GetNextFeature() def ogr_pg_76_scenario3(lyr1, lyr2): assert gdaltest.pg_ds.StartTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('BEGIN', 1, 0, 1) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 2, 0, 1) assert gdaltest.pg_ds.CommitTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('COMMIT', 0, 0, 0) gdal.ErrorReset() gdal.PushErrorHandler() f = lyr1.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' and f is None # Must re-issue an explicit ResetReading() lyr1.ResetReading() f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('BEGIN', 1, 0, 0) lyr1.ResetReading() (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('COMMIT', 0, 0, 0) lyr2.ResetReading() # Scenario 4 : GetNextFeature(), StartTransaction(), CreateFeature(), CommitTransaction(), GetNextFeature(), ResetReading() def ogr_pg_76_scenario4(lyr1, lyr2): (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 0, 0, 0) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('BEGIN', 1, 0, 0) assert gdaltest.pg_ds.StartTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('SAVEPOINT ogr_savepoint', 2, 1, 1) lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 2 f = lyr2.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 3, 1, 1) # Check that it doesn't commit the transaction lyr1.SetAttributeFilter("foo is NULL") (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 2, 1, 1) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 1 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('', 3, 1, 1) f = lyr2.GetNextFeature() assert f is not None and f.GetFID() == 2 assert gdaltest.pg_ds.CommitTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('RELEASE SAVEPOINT ogr_savepoint', 2, 0, 0) lyr2.ResetReading() assert gdaltest.pg_ds.StartTransaction() == 0 assert gdaltest.pg_ds.RollbackTransaction() == 0 (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('ROLLBACK TO SAVEPOINT ogr_savepoint', 1, 0, 0) f = lyr1.GetNextFeature() assert f is not None and f.GetFID() == 2 lyr1.ResetReading() (lastcmd, level, savepoint, usertransac) = ogr_pg_76_get_transaction_state(gdaltest.pg_ds) assert (lastcmd, level, savepoint, usertransac) == ('COMMIT', 0, 0, 0) ############################################################################### # Test ogr2ogr can insert multiple layers at once def test_ogr_pg_77(): import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_77_1') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_77_2') try: shutil.rmtree('tmp/ogr_pg_77') except OSError: pass os.mkdir('tmp/ogr_pg_77') f = open('tmp/ogr_pg_77/ogr_pg_77_1.csv', 'wt') f.write('id,WKT\n') f.write('1,POINT(1 2)\n') f.close() f = open('tmp/ogr_pg_77/ogr_pg_77_2.csv', 'wt') f.write('id,WKT\n') f.write('2,POINT(1 2)\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PostgreSQL "' + 'PG:' + gdaltest.pg_connection_string + '" tmp/ogr_pg_77') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_77_1') feat = lyr.GetNextFeature() assert feat.GetField(0) == '1' feat.SetField(0, 10) lyr.SetFeature(feat) lyr = ds.GetLayerByName('ogr_pg_77_2') feat = lyr.GetNextFeature() assert feat.GetField(0) == '2' ds = None # Test fix for #6018 gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PostgreSQL "' + 'PG:' + gdaltest.pg_connection_string + '" tmp/ogr_pg_77 -overwrite') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_77_1') feat = lyr.GetNextFeature() assert feat.GetField(0) == '1' ds = None try: shutil.rmtree('tmp/ogr_pg_77') except OSError: pass ############################################################################### # Test manually added geometry constraints def test_ogr_pg_78(): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis_2: pytest.skip() gdaltest.pg_ds.ExecuteSQL("CREATE TABLE ogr_pg_78 (ID INTEGER PRIMARY KEY)") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78 ADD COLUMN my_geom GEOMETRY") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78 ADD CONSTRAINT ogr_pg_78_my_geom_type CHECK (geometrytype(my_geom)='POINT')") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78 ADD CONSTRAINT ogr_pg_78_my_geom_dim CHECK (st_ndims(my_geom)=3)") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78 ADD CONSTRAINT ogr_pg_78_my_geom_srid CHECK (st_srid(my_geom)=4326)") gdaltest.pg_ds.ExecuteSQL("CREATE TABLE ogr_pg_78_2 (ID INTEGER PRIMARY KEY)") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78_2 ADD COLUMN my_geog GEOGRAPHY") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78_2 ADD CONSTRAINT ogr_pg_78_2_my_geog_type CHECK (geometrytype(my_geog::geometry)='POINT')") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78_2 ADD CONSTRAINT ogr_pg_78_2_my_geog_dim CHECK (st_ndims(my_geog::geometry)=3)") gdaltest.pg_ds.ExecuteSQL("ALTER TABLE ogr_pg_78_2 ADD CONSTRAINT ogr_pg_78_2_my_geog_srid CHECK (st_srid(my_geog::geometry)=4326)") gdaltest.pg_ds = None gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lc = gdaltest.pg_ds.GetLayerCount() # force discovery of all tables ogr_pg_78_found = False ogr_pg_78_2_found = False for i in range(lc): lyr = gdaltest.pg_ds.GetLayer(i) if lyr.GetName() == 'ogr_pg_78': ogr_pg_78_found = True assert lyr.GetGeomType() == ogr.wkbPoint25D assert lyr.GetSpatialRef().ExportToWkt().find('4326') >= 0 if lyr.GetName() == 'ogr_pg_78_2': ogr_pg_78_2_found = True assert lyr.GetGeomType() == ogr.wkbPoint25D assert lyr.GetSpatialRef().ExportToWkt().find('4326') >= 0 assert ogr_pg_78_found assert ogr_pg_78_2_found gdaltest.pg_ds = None # Test with slow method gdal.SetConfigOption('PG_USE_POSTGIS2_OPTIM', 'NO') gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lc = gdaltest.pg_ds.GetLayerCount() # force discovery of all tables ogr_pg_78_found = False ogr_pg_78_2_found = False for i in range(lc): lyr = gdaltest.pg_ds.GetLayer(i) if lyr.GetName() == 'ogr_pg_78': ogr_pg_78_found = True if lyr.GetGeomType() != ogr.wkbPoint25D: # FIXME: why does it fail suddenly on Travis ? Change of PostGIS version ? # But apparently not : # Last good: https://travis-ci.org/OSGeo/gdal/builds/60211881 # First bad: https://travis-ci.org/OSGeo/gdal/builds/60290209 val = gdal.GetConfigOption('TRAVIS', None) if val is not None: print('Fails on Travis. geom_type = %d' % lyr.GetGeomType()) else: pytest.fail() if lyr.GetSpatialRef() is None or lyr.GetSpatialRef().ExportToWkt().find('4326') < 0: val = gdal.GetConfigOption('TRAVIS', None) if val is not None: print('Fails on Travis. GetSpatialRef() = %s' % str(lyr.GetSpatialRef())) else: pytest.fail() if lyr.GetName() == 'ogr_pg_78_2': ogr_pg_78_2_found = True # No logic in geography_columns to get type/coordim/srid from constraints # if lyr.GetGeomType() != ogr.wkbPoint25D: # gdaltest.post_reason('fail') # return 'fail' # if lyr.GetSpatialRef().ExportToWkt().find('4326') < 0: # gdaltest.post_reason('fail') # return 'fail' assert ogr_pg_78_found assert ogr_pg_78_2_found ############################################################################### # Test PRELUDE_STATEMENTS and CLOSING_STATEMENTS open options def test_ogr_pg_79(): if gdaltest.pg_ds is None: pytest.skip() # PRELUDE_STATEMENTS starting with BEGIN (use case: pg_bouncer in transaction pooling) ds = gdal.OpenEx('PG:' + gdaltest.pg_connection_string, gdal.OF_VECTOR | gdal.OF_UPDATE, open_options=['PRELUDE_STATEMENTS=BEGIN; SET LOCAL statement_timeout TO "1h";', 'CLOSING_STATEMENTS=COMMIT;']) sql_lyr = ds.ExecuteSQL('SHOW statement_timeout') f = sql_lyr.GetNextFeature() if f.GetField(0) != '1h': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ret = ds.StartTransaction() assert ret == 0 ret = ds.CommitTransaction() assert ret == 0 gdal.ErrorReset() ds = None assert gdal.GetLastErrorMsg() == '' # random PRELUDE_STATEMENTS ds = gdal.OpenEx('PG:' + gdaltest.pg_connection_string, gdal.OF_VECTOR | gdal.OF_UPDATE, open_options=['PRELUDE_STATEMENTS=SET statement_timeout TO "1h"']) sql_lyr = ds.ExecuteSQL('SHOW statement_timeout') f = sql_lyr.GetNextFeature() if f.GetField(0) != '1h': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ret = ds.StartTransaction() assert ret == 0 ret = ds.CommitTransaction() assert ret == 0 gdal.ErrorReset() ds = None assert gdal.GetLastErrorMsg() == '' # Test wrong PRELUDE_STATEMENTS with gdaltest.error_handler(): ds = gdal.OpenEx('PG:' + gdaltest.pg_connection_string, gdal.OF_VECTOR | gdal.OF_UPDATE, open_options=['PRELUDE_STATEMENTS=BEGIN;error SET LOCAL statement_timeout TO "1h";', 'CLOSING_STATEMENTS=COMMIT;']) assert ds is None # Test wrong CLOSING_STATEMENTS ds = gdal.OpenEx('PG:' + gdaltest.pg_connection_string, gdal.OF_VECTOR | gdal.OF_UPDATE, open_options=['PRELUDE_STATEMENTS=BEGIN; SET LOCAL statement_timeout TO "1h";', 'CLOSING_STATEMENTS=COMMIT;error']) gdal.ErrorReset() with gdaltest.error_handler(): ds = None assert gdal.GetLastErrorMsg() != '' ############################################################################### # Test retrieving an error from ExecuteSQL() (#6194) def test_ogr_pg_80(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() gdal.ErrorReset() with gdaltest.error_handler(): sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT FROM') assert gdal.GetLastErrorMsg() != '' assert sql_lyr is None ############################################################################### # Test that ogr2ogr -skip properly rollbacks transactions (#6328) def test_ogr_pg_81(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() gdaltest.pg_ds.ReleaseResultSet(gdaltest.pg_ds.ExecuteSQL("create table ogr_pg_81_1(id varchar unique, foo varchar); SELECT AddGeometryColumn('ogr_pg_81_1','dummy',-1,'POINT',2);")) gdaltest.pg_ds.ReleaseResultSet(gdaltest.pg_ds.ExecuteSQL("create table ogr_pg_81_2(id varchar unique, foo varchar); SELECT AddGeometryColumn('ogr_pg_81_2','dummy',-1,'POINT',2);")) # 0755 = 493 gdal.Mkdir('/vsimem/ogr_pg_81', 493) gdal.FileFromMemBuffer('/vsimem/ogr_pg_81/ogr_pg_81_1.csv', """id,foo 1,1""") gdal.FileFromMemBuffer('/vsimem/ogr_pg_81/ogr_pg_81_2.csv', """id,foo 1,1""") gdal.VectorTranslate('PG:' + gdaltest.pg_connection_string, '/vsimem/ogr_pg_81', accessMode='append') gdal.FileFromMemBuffer('/vsimem/ogr_pg_81/ogr_pg_81_2.csv', """id,foo 2,2""") with gdaltest.error_handler(): gdal.VectorTranslate('PG:' + gdaltest.pg_connection_string, '/vsimem/ogr_pg_81', accessMode='append', skipFailures=True) gdal.Unlink('/vsimem/ogr_pg_81/ogr_pg_81_1.csv') gdal.Unlink('/vsimem/ogr_pg_81/ogr_pg_81_2.csv') gdal.Unlink('/vsimem/ogr_pg_81') lyr = gdaltest.pg_ds.GetLayer('ogr_pg_81_2') f = lyr.GetNextFeature() f = lyr.GetNextFeature() if f['id'] != '2': f.DumpReadable() pytest.fail() lyr.ResetReading() # flushes implicit transaction ############################################################################### # Test that GEOMETRY_NAME works even when the geometry column creation is # done through CreateGeomField (#6366) # This is important for the ogr2ogr use case when the source geometry column # is not-nullable, and hence the CreateGeomField() interface is used. def test_ogr_pg_82(with_and_without_postgis): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis or not with_and_without_postgis: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_82', geom_type=ogr.wkbNone, options=['GEOMETRY_NAME=another_name']) lyr.CreateGeomField(ogr.GeomFieldDefn('my_geom', ogr.wkbPoint)) assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetName() == 'another_name' ############################################################################### # Test ZM support def test_ogr_pg_83(with_and_without_postgis): if gdaltest.pg_ds is None or not gdaltest.pg_has_postgis or not with_and_without_postgis: pytest.skip() tests = [[ogr.wkbUnknown, [], 'POINT ZM (1 2 3 4)', 'POINT (1 2)'], [ogr.wkbUnknown, ['DIM=XYZM'], 'POINT ZM (1 2 3 4)', 'POINT ZM (1 2 3 4)'], [ogr.wkbUnknown, ['DIM=XYZ'], 'POINT ZM (1 2 3 4)', 'POINT Z (1 2 3)'], [ogr.wkbUnknown, ['DIM=XYM'], 'POINT M (1 2 4)', 'POINT M (1 2 4)'], [ogr.wkbPointZM, [], 'POINT ZM (1 2 3 4)', 'POINT ZM (1 2 3 4)'], [ogr.wkbPoint25D, [], 'POINT ZM (1 2 3 4)', 'POINT Z (1 2 3)'], [ogr.wkbPointM, [], 'POINT ZM (1 2 3 4)', 'POINT M (1 2 4)'], [ogr.wkbUnknown, ['GEOM_TYPE=geography', 'DIM=XYM'], 'POINT ZM (1 2 3 4)', 'POINT M (1 2 4)'], ] for (geom_type, options, wkt, expected_wkt) in tests: lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_83', geom_type=geom_type, options=options + ['OVERWRITE=YES']) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt(wkt)) lyr.CreateFeature(f) f = None lyr.ResetReading() f = lyr.GetNextFeature() got_wkt = '' if f is not None: geom = f.GetGeometryRef() if geom is not None: got_wkt = geom.ExportToIsoWkt() assert got_wkt == expected_wkt, (geom_type, options, wkt, expected_wkt, got_wkt) lyr.ResetReading() # flushes implicit transaction if 'GEOM_TYPE=geography' in options: continue # Cannot do AddGeometryColumn( 'GEOMETRYM', 3 ) with PostGIS 2, and doesn't accept inserting a XYM geometry if gdaltest.pg_has_postgis_2 and geom_type == ogr.wkbUnknown and options == ['DIM=XYM']: continue lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_83', geom_type=ogr.wkbNone, options=options + ['OVERWRITE=YES']) # To force table creation to happen now so that following # CreateGeomField() is done through a AddGeometryColumn() call lyr.ResetReading() lyr.GetNextFeature() lyr.CreateGeomField(ogr.GeomFieldDefn("my_geom", geom_type)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt(wkt)) lyr.CreateFeature(f) f = None lyr.ResetReading() f = lyr.GetNextFeature() got_wkt = '' if f is not None: geom = f.GetGeometryRef() if geom is not None: got_wkt = geom.ExportToIsoWkt() assert got_wkt == expected_wkt, (geom_type, options, wkt, expected_wkt, got_wkt) lyr.ResetReading() # flushes implicit transaction ############################################################################### # Test description def test_ogr_pg_84(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.CreateLayer('ogr_pg_84', geom_type=ogr.wkbPoint, options=['OVERWRITE=YES', 'DESCRIPTION=foo']) # Test that SetMetadata() and SetMetadataItem() are without effect lyr.SetMetadata({'DESCRIPTION': 'bar'}) lyr.SetMetadataItem('DESCRIPTION', 'baz') assert lyr.GetMetadataItem('DESCRIPTION') == 'foo' assert lyr.GetMetadata_List() == ['DESCRIPTION=foo'], lyr.GetMetadata() ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.GetLayerCount() # load all layers lyr = ds.GetLayerByName('ogr_pg_84') assert lyr.GetMetadataItem('DESCRIPTION') == 'foo' assert lyr.GetMetadata_List() == ['DESCRIPTION=foo'], lyr.GetMetadata() # Set with SetMetadata() lyr.SetMetadata(['DESCRIPTION=bar']) ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_84') # load just this layer assert lyr.GetMetadataItem('DESCRIPTION') == 'bar' assert lyr.GetMetadataDomainList() is not None # Set with SetMetadataItem() lyr.SetMetadataItem('DESCRIPTION', 'baz') ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = ds.GetLayerByName('ogr_pg_84') assert lyr.GetMetadataDomainList() is not None assert lyr.GetMetadataItem('DESCRIPTION') == 'baz' # Unset with SetMetadataItem() lyr.SetMetadataItem('DESCRIPTION', None) ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('ogr_pg_84') # load just this layer assert lyr.GetMetadataDomainList() is None assert lyr.GetMetadataItem('DESCRIPTION') is None ds = None ds = ogr.Open('PG:' + gdaltest.pg_connection_string) ds.GetLayerCount() # load all layers lyr = ds.GetLayerByName('ogr_pg_84') # load just this layer assert lyr.GetMetadataItem('DESCRIPTION') is None ds = None ############################################################################### # Test append of several layers in PG_USE_COPY mode (#6411) def test_ogr_pg_85(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() gdaltest.pg_ds.CreateLayer('ogr_pg_85_1') lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_85_2') lyr.CreateField(ogr.FieldDefn('foo')) gdaltest.pg_ds.ReleaseResultSet(gdaltest.pg_ds.ExecuteSQL('SELECT 1')) # make sure the layers are well created old_val = gdal.GetConfigOption('PG_USE_COPY') gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) ds.GetLayerCount() ds.StartTransaction() lyr = ds.GetLayerByName('ogr_pg_85_1') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) lyr = ds.GetLayerByName('ogr_pg_85_2') feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldCount() == 1 f = ogr.Feature(feat_defn) assert lyr.CreateFeature(f) == 0 ds.CommitTransaction() ds = None # Although test real ogr2ogr scenario # 0755 = 493 gdal.Mkdir('/vsimem/ogr_pg_85', 493) gdal.FileFromMemBuffer('/vsimem/ogr_pg_85/ogr_pg_85_1.csv', """id,foo 1,1""") gdal.FileFromMemBuffer('/vsimem/ogr_pg_85/ogr_pg_85_2.csv', """id,foo 1,1""") gdal.VectorTranslate('PG:' + gdaltest.pg_connection_string, '/vsimem/ogr_pg_85', accessMode='append') gdal.Unlink('/vsimem/ogr_pg_85/ogr_pg_85_1.csv') gdal.Unlink('/vsimem/ogr_pg_85/ogr_pg_85_2.csv') gdal.Unlink('/vsimem/ogr_pg_85') gdal.SetConfigOption('PG_USE_COPY', old_val) lyr = gdaltest.pg_ds.GetLayerByName('ogr_pg_85_2') assert lyr.GetFeatureCount() == 2 ############################################################################### # Test OFTBinary def test_ogr_pg_86(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() old_val = gdal.GetConfigOption('PG_USE_COPY') gdal.SetConfigOption('PG_USE_COPY', 'YES') lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_86') lyr.CreateField(ogr.FieldDefn('test', ogr.OFTBinary)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldBinaryFromHexString('test', '3020') lyr.CreateFeature(f) lyr.ResetReading() f = lyr.GetNextFeature() if f.GetField(0) != '3020': gdal.SetConfigOption('PG_USE_COPY', old_val) pytest.fail() gdal.SetConfigOption('PG_USE_COPY', 'NO') lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_86', options=['OVERWRITE=YES']) lyr.CreateField(ogr.FieldDefn('test', ogr.OFTBinary)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldBinaryFromHexString('test', '3020') lyr.CreateFeature(f) lyr.ResetReading() f = lyr.GetNextFeature() if f.GetField(0) != '3020': gdal.SetConfigOption('PG_USE_COPY', old_val) pytest.fail() gdal.SetConfigOption('PG_USE_COPY', old_val) ############################################################################### # Test sequence updating (#7032) def test_ogr_pg_87(with_and_without_postgis): if gdaltest.pg_ds is None or not with_and_without_postgis: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_87') lyr.CreateField(ogr.FieldDefn('test', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(10) lyr.CreateFeature(f) # Test updating of sequence after CreateFeatureViaCopy gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayerByName('ogr_pg_87') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) assert f.GetFID() == 11 # Test updating of sequence after CreateFeatureViaInsert gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayerByName('ogr_pg_87') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) assert f.GetFID() == 12 ############################################################################### # Test JSON subtype def test_ogr_pg_json(): if gdaltest.pg_ds is None: pytest.skip() lyr = gdaltest.pg_ds.CreateLayer('ogr_pg_json') fld_defn = ogr.FieldDefn('test_json', ogr.OFTString) fld_defn.SetSubType(ogr.OFSTJSON) lyr.CreateField(fld_defn) f = ogr.Feature(lyr.GetLayerDefn()) f['test_json'] = '{"a": "b"}' lyr.CreateFeature(f) gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) lyr = gdaltest.pg_ds.GetLayer('ogr_pg_json') assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTJSON f = lyr.GetNextFeature() if f.GetField(0) != '{"a": "b"}': f.DumpReadable() pytest.fail() sql_lyr = gdaltest.pg_ds.ExecuteSQL('SELECT * FROM ogr_pg_json') assert sql_lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTJSON gdaltest.pg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # def test_ogr_pg_table_cleanup(): if gdaltest.pg_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.pg_ds.ExecuteSQL('DELLAYER:tpoly') gdaltest.pg_ds.ExecuteSQL('DELLAYER:tpolycopy') gdaltest.pg_ds.ExecuteSQL('DELLAYER:test_for_tables_equal_param') gdaltest.pg_ds.ExecuteSQL('DELLAYER:datetest') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testgeom') gdaltest.pg_ds.ExecuteSQL('DELLAYER:datatypetest') # gdaltest.pg_ds.ExecuteSQL( 'DELLAYER:datatypetest_withouttimestamptz' ) gdaltest.pg_ds.ExecuteSQL('DELLAYER:datatypetest2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testsrtext') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testsrtext2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testsrtext3') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testsrtext4') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testsrtext5') gdaltest.pg_ds.ExecuteSQL('DELLAYER:testoverflows') gdaltest.pg_ds.ExecuteSQL('DELLAYER:table36_inherited2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:table36_inherited') gdaltest.pg_ds.ExecuteSQL('DELLAYER:table36_base') gdaltest.pg_ds.ExecuteSQL('DELLAYER:table37_inherited') gdaltest.pg_ds.ExecuteSQL('DROP TABLE table37_base CASCADE') gdaltest.pg_ds.ExecuteSQL('DROP VIEW testview') gdaltest.pg_ds.ExecuteSQL("DELETE FROM geometry_columns WHERE f_table_name='testview'") gdaltest.pg_ds.ExecuteSQL('DELLAYER:select') gdaltest.pg_ds.ExecuteSQL('DELLAYER:bigtable') gdaltest.pg_ds.ExecuteSQL('DELLAYER:test_geog') gdaltest.pg_ds.ExecuteSQL('DELLAYER:no_pk_table') gdaltest.pg_ds.ExecuteSQL('DELLAYER:no_geometry_table') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_55') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_56') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_57') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_58') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_60') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_61') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_63') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_65') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_65_copied') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_67') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_68') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_70') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_72') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_73') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_74') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_75') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_76_lyr1') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_76_lyr2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:test_curve') gdaltest.pg_ds.ExecuteSQL('DELLAYER:test_curve_3d') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_77_1') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_77_2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_78') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_78_2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_81_1') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_81_2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_82') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_83') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_84') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_85_1') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_85_2') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_86') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_87') gdaltest.pg_ds.ExecuteSQL('DELLAYER:ogr_pg_json') # Drop second 'tpoly' from schema 'AutoTest-schema' (do NOT quote names here) gdaltest.pg_ds.ExecuteSQL('DELLAYER:AutoTest-schema.tpoly') gdaltest.pg_ds.ExecuteSQL('DELLAYER:AutoTest-schema.test41') gdaltest.pg_ds.ExecuteSQL('DELLAYER:AutoTest-schema.table36_base') gdaltest.pg_ds.ExecuteSQL('DELLAYER:AutoTest-schema.table36_inherited') # Drop 'AutoTest-schema' (here, double quotes are required) gdaltest.pg_ds.ExecuteSQL('DROP SCHEMA \"AutoTest-schema\" CASCADE') gdal.PopErrorHandler() def test_ogr_pg_cleanup(): if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds = ogr.Open('PG:' + gdaltest.pg_connection_string, update=1) test_ogr_pg_table_cleanup() gdaltest.pg_ds.Destroy() gdaltest.pg_ds = None # NOTE: The ogr_pg_19 intentionally executed after ogr_pg_2 gdalautotest-3.1.2/ogr/ogr_pgdump.py0000775000175000017500000011030313701060010016164 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_pgdump.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR PGDump driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest ############################################################################### # Create table from data/poly.shp def test_ogr_pgdump_1(): try: os.remove('tmp/tpoly.sql') except OSError: pass ds = ogr.GetDriverByName('PGDump').CreateDataSource('tmp/tpoly.sql') ###################################################### # Create Layer lyr = ds.CreateLayer('tpoly', options=['DIM=3']) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() ds.Destroy() f = open('tmp/tpoly.sql') sql = f.read() f.close() assert (not (sql.find("""DROP TABLE IF EXISTS "public"."tpoly" CASCADE;""") == -1 or \ sql.find("""DELETE FROM geometry_columns WHERE f_table_name = 'tpoly' AND f_table_schema = 'public';""") == -1 or \ sql.find("""BEGIN;""") == -1 or \ sql.find("""CREATE TABLE "public"."tpoly" ( "ogc_fid" SERIAL, CONSTRAINT "tpoly_pk" PRIMARY KEY ("ogc_fid") );""") == -1 or \ sql.find("""SELECT AddGeometryColumn('public','tpoly','wkb_geometry',-1,'GEOMETRY',3);""") == -1 or \ sql.find("""CREATE INDEX "tpoly_wkb_geometry_geom_idx" ON "public"."tpoly" USING GIST ("wkb_geometry");""") == -1 or \ sql.find("""ALTER TABLE "public"."tpoly" ADD COLUMN "area" FLOAT8;""") == -1 or \ sql.find("""ALTER TABLE "public"."tpoly" ADD COLUMN "eas_id" INTEGER;""") == -1 or \ sql.find("""ALTER TABLE "public"."tpoly" ADD COLUMN "prfedea" VARCHAR;""") == -1 or \ sql.find("""ALTER TABLE "public"."tpoly" ADD COLUMN "shortname" VARCHAR(8);""") == -1 or \ sql.find("""INSERT INTO "public"."tpoly" ("wkb_geometry" , "area", "eas_id", "prfedea") VALUES ('01030000800100000005000000000000C01A481D4100000080072D5241000000000000000000000060AA461D4100000080FF2C524100000000000000000000006060461D41000000400C2D52410000000000000000000000A0DF471D4100000000142D52410000000000000000000000C01A481D4100000080072D52410000000000000000', 5268.813, 170, '35043413');""") == -1 or \ sql.find("""COMMIT;""") == -1)) ############################################################################### # Create table from data/poly.shp with PG_USE_COPY=YES def test_ogr_pgdump_2(): try: os.remove('tmp/tpoly.sql') except OSError: pass gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.GetDriverByName('PGDump').CreateDataSource('tmp/tpoly.sql', options=['LINEFORMAT=CRLF']) ###################################################### # Create Layer lyr = ds.CreateLayer('tpoly', geom_type=ogr.wkbPolygon, options=['SCHEMA=another_schema', 'SRID=4326', 'GEOMETRY_NAME=the_geom']) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() ds.Destroy() gdal.SetConfigOption('PG_USE_COPY', 'NO') f = open('tmp/tpoly.sql') sql = f.read() f.close() assert (not (sql.find("""DROP TABLE IF EXISTS "another_schema"."tpoly" CASCADE;""") == -1 or \ sql.find("""DELETE FROM geometry_columns WHERE f_table_name = 'tpoly' AND f_table_schema = 'another_schema';""") == -1 or \ sql.find("""BEGIN;""") == -1 or \ sql.find("""CREATE TABLE "another_schema"."tpoly" ( "ogc_fid" SERIAL, CONSTRAINT "tpoly_pk" PRIMARY KEY ("ogc_fid") );""") == -1 or \ sql.find("""SELECT AddGeometryColumn('another_schema','tpoly','the_geom',4326,'POLYGON',2);""") == -1 or \ sql.find("""CREATE INDEX "tpoly_the_geom_geom_idx" ON "another_schema"."tpoly" USING GIST ("the_geom");""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "area" FLOAT8;""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "eas_id" INTEGER;""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "prfedea" VARCHAR;""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "shortname" VARCHAR(8);""") == -1 or \ sql.find("""COPY "another_schema"."tpoly" ("the_geom", "area", "eas_id", "prfedea", "shortname") FROM STDIN;""") == -1 or \ sql.find("0103000020E61000000100000005000000000000C01A481D4100000080072D524100000060AA461D4100000080FF2C52410000006060461D41000000400C2D5241000000A0DF471D4100000000142D5241000000C01A481D4100000080072D5241 5268.813 170 35043413 \\N") == -1 or \ sql.find("""\.""") == -1 or \ sql.find("""COMMIT;""") == -1)) ############################################################################### # Create table from data/poly.shp without any geometry def test_ogr_pgdump_3(): try: os.remove('tmp/tpoly.sql') except OSError: pass gdal.SetConfigOption('PG_USE_COPY', 'YES') ds = ogr.GetDriverByName('PGDump').CreateDataSource('tmp/tpoly.sql', options=['LINEFORMAT=LF']) ###################################################### # Create Layer lyr = ds.CreateLayer('tpoly', geom_type=ogr.wkbNone, options=['SCHEMA=another_schema']) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(lyr, [('EMPTYCHAR', ogr.OFTString), ('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] i = 0 while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) if i == 0: # Be perverse and test the case where a feature has a geometry # even if it's a wkbNone layer ! (#4040) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) elif i == 1: # Field with 0 character (not empty!) (#4040) dst_feat.SetField(0, '') i = i + 1 lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() ds.Destroy() gdal.SetConfigOption('PG_USE_COPY', 'NO') f = open('tmp/tpoly.sql') sql = f.read() f.close() assert (not (sql.find("""DROP TABLE IF EXISTS "another_schema"."tpoly" CASCADE;""") == -1 or \ sql.find("""DELETE FROM geometry_columns""") != -1 or \ sql.find("""BEGIN;""") == -1 or \ sql.find("""CREATE TABLE "another_schema"."tpoly" ( "ogc_fid" SERIAL, CONSTRAINT "tpoly_pk" PRIMARY KEY ("ogc_fid") );""") == -1 or \ sql.find("""SELECT AddGeometryColumn""") != -1 or \ sql.find("""CREATE INDEX "tpoly_wkb_geometry_geom_idx""") != -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "area" FLOAT8;""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "eas_id" INTEGER;""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "prfedea" VARCHAR;""") == -1 or \ sql.find("""ALTER TABLE "another_schema"."tpoly" ADD COLUMN "shortname" VARCHAR(8);""") == -1 or \ sql.find("""COPY "another_schema"."tpoly" ("emptychar", "area", "eas_id", "prfedea", "shortname") FROM STDIN;""") == -1 or \ sql.find("""\\N 215229.266 168 35043411 \\N""") == -1 or \ sql.find(""" 5268.813 170 35043413 \\N""") == -1 or \ sql.find("""\\.""") == -1 or \ sql.find("""COMMIT;""") == -1)) ############################################################################### # Test multi-geometry support def test_ogr_pgdump_4(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('tmp/ogr_pgdump_4.sql', options=['LINEFORMAT=LF']) assert ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) != 0 ###################################################### # Create Layer lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['WRITE_EWKT_GEOM=YES']) assert lyr.TestCapability(ogr.OLCCreateGeomField) != 0 gfld_defn = ogr.GeomFieldDefn("point_nosrs", ogr.wkbPoint) lyr.CreateGeomField(gfld_defn) gfld_defn = ogr.GeomFieldDefn("poly", ogr.wkbPolygon25D) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) gfld_defn.SetSpatialRef(srs) lyr.CreateGeomField(gfld_defn) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeomFieldDirectly("point_nosrs", ogr.CreateGeometryFromWkt('POINT (1 2)')) feat.SetGeomFieldDirectly("poly", ogr.CreateGeometryFromWkt('POLYGON Z ((0 0 0,0 1 0,1 1 0,1 0 0, 0 0 0))')) lyr.CreateFeature(feat) ds = None f = open('tmp/ogr_pgdump_4.sql') sql = f.read() f.close() assert (not (sql.find("""CREATE TABLE "public"."test" ( "ogc_fid" SERIAL, CONSTRAINT "test_pk" PRIMARY KEY ("ogc_fid") )""") == -1 or \ sql.find("""SELECT AddGeometryColumn('public','test','point_nosrs',-1,'POINT',2)""") == -1 or \ sql.find("""CREATE INDEX "test_point_nosrs_geom_idx" ON "public"."test" USING GIST ("point_nosrs")""") == -1 or \ sql.find("""SELECT AddGeometryColumn('public','test','poly',4326,'POLYGON',3)""") == -1 or \ sql.find("""CREATE INDEX "test_poly_geom_idx" ON "public"."test" USING GIST ("poly")""") == -1 or \ sql.find("""INSERT INTO "public"."test" DEFAULT VALUES""") == -1 or \ sql.find("""INSERT INTO "public"."test" ("point_nosrs" , "poly" ) VALUES (GeomFromEWKT('SRID=-1;POINT (1 2)'::TEXT) , GeomFromEWKT('SRID=4326;POLYGON Z ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))'::TEXT) )""") == -1)) ############################################################################### # Test non nullable field support def test_ogr_pgdump_5(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_5.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_nullable', ogr.wkbPoint) lyr.CreateGeomField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_5.sql', 'rb') sql = gdal.VSIFReadL(1, 1000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_5.sql') assert (not (sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_not_nullable" VARCHAR NOT NULL;""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_nullable" VARCHAR;""") == -1 or \ sql.find("""ALTER TABLE "test" ALTER COLUMN "geomfield_not_nullable" SET NOT NULL;""") == -1)) ############################################################################### # Test default values def test_ogr_pgdump_6(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_6.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_date', ogr.OFTDate) field_defn.SetDefault("CURRENT_DATE") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_time', ogr.OFTTime) field_defn.SetDefault("CURRENT_TIME") lyr.CreateField(field_defn) gdal.SetConfigOption('PG_USE_COPY', 'YES') f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_string', 'a') f.SetField('field_int', 456) f.SetField('field_real', 4.56) f.SetField('field_datetime', '2015/06/30 12:34:56') f.SetField('field_datetime2', '2015/06/30 12:34:56') f.SetField('field_date', '2015/06/30') f.SetField('field_time', '12:34:56') lyr.CreateFeature(f) f = None # Transition from COPY to INSERT f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None # Transition from INSERT to COPY f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_string', 'b') f.SetField('field_int', 456) f.SetField('field_real', 4.56) f.SetField('field_datetime', '2015/06/30 12:34:56') f.SetField('field_datetime2', '2015/06/30 12:34:56') f.SetField('field_date', '2015/06/30') f.SetField('field_time', '12:34:56') lyr.CreateFeature(f) f = None gdal.SetConfigOption('PG_USE_COPY', None) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_6.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_6.sql') assert (not ("""a\t456\t4.56\t\\N\t2015/06/30 12:34:56\t2015/06/30 12:34:56\t2015/06/30\t12:34:56""" not in sql or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_string" VARCHAR DEFAULT 'a''b';""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_int" INTEGER DEFAULT 123;""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_real" FLOAT8 DEFAULT 1.23;""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_datetime" timestamp with time zone DEFAULT CURRENT_TIMESTAMP;""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_datetime2" timestamp with time zone DEFAULT '2015/06/30 12:34:56+00'::timestamp with time zone;""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_date" date DEFAULT CURRENT_DATE;""") == -1 or \ sql.find("""ALTER TABLE "public"."test" ADD COLUMN "field_time" time DEFAULT CURRENT_TIME;""") == -1 or \ """b\t456\t4.56\t\\N\t2015/06/30 12:34:56\t2015/06/30 12:34:56\t2015/06/30\t12:34:56""" not in sql)) ############################################################################### # Test creating a field with the fid name (PG_USE_COPY=NO) def test_ogr_pgdump_7(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_7.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['FID=myfid']) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTInteger)) assert ret == 0 lyr.CreateField(ogr.FieldDefn('str2', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 10) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat.GetFID() == 10 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 if feat.GetFID() < 0: feat.DumpReadable() pytest.fail() if feat.GetField('myfid') != feat.GetFID(): feat.DumpReadable() pytest.fail() # feat.SetField('str', 'foo') # ret = lyr.SetFeature(feat) # if ret != 0: # gdaltest.post_reason('fail') # return 'fail' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1) feat.SetField('myfid', 10) gdal.PushErrorHandler() ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 # gdal.PushErrorHandler() # ret = lyr.SetFeature(feat) # gdal.PopErrorHandler() # if ret == 0: # gdaltest.post_reason('fail') # return 'fail' # feat.UnsetField('myfid') # gdal.PushErrorHandler() # ret = lyr.SetFeature(feat) # gdal.PopErrorHandler() # if ret == 0: # gdaltest.post_reason('fail') # return 'fail' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 12) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat.GetFID() == 12 ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_7.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_7.sql') assert (not ("""CREATE TABLE "public"."test" ( "myfid" SERIAL, CONSTRAINT "test_pk" PRIMARY KEY ("myfid") )""" not in sql or \ """ALTER TABLE "public"."test" ADD COLUMN "myfid" """ in sql or \ sql.find("""INSERT INTO "public"."test" ("myfid" , "str", "str2") VALUES (10, 'first string', 'second string');""") == -1 or \ sql.find("""INSERT INTO "public"."test" ("str2") VALUES ('second string');""") == -1 or \ sql.find("""INSERT INTO "public"."test" ("myfid" , "str", "str2") VALUES (12, 'first string', 'second string');""") == -1)) ############################################################################### # Test creating a field with the fid name (PG_USE_COPY=NO) def test_ogr_pgdump_8(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_8.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['FID=myfid']) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTInteger)) assert ret == 0 lyr.CreateField(ogr.FieldDefn('str2', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 10) feat.SetField('str2', 'second string') gdal.SetConfigOption('PG_USE_COPY', 'YES') ret = lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', None) assert ret == 0 assert feat.GetFID() == 10 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str2', 'second string') gdal.SetConfigOption('PG_USE_COPY', 'YES') ret = lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', None) assert ret == 0 if feat.GetFID() < 0: feat.DumpReadable() pytest.fail() if feat.GetField('myfid') != feat.GetFID(): feat.DumpReadable() pytest.fail() # feat.SetField('str', 'foo') # ret = lyr.SetFeature(feat) # if ret != 0: # gdaltest.post_reason('fail') # return 'fail' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1) feat.SetField('myfid', 10) gdal.PushErrorHandler() gdal.SetConfigOption('PG_USE_COPY', 'YES') ret = lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', None) gdal.PopErrorHandler() assert ret != 0 # gdal.PushErrorHandler() # ret = lyr.SetFeature(feat) # gdal.PopErrorHandler() # if ret == 0: # gdaltest.post_reason('fail') # return 'fail' # feat.UnsetField('myfid') # gdal.PushErrorHandler() # ret = lyr.SetFeature(feat) # gdal.PopErrorHandler() # if ret == 0: # gdaltest.post_reason('fail') # return 'fail' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 12) feat.SetField('str2', 'second string') gdal.SetConfigOption('PG_USE_COPY', 'YES') ret = lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', None) assert ret == 0 assert feat.GetFID() == 12 ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_8.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_8.sql') assert (not ("""CREATE TABLE "public"."test" ( "myfid" SERIAL, CONSTRAINT "test_pk" PRIMARY KEY ("myfid") )""" not in sql or \ """ALTER TABLE "public"."test" ADD COLUMN "myfid" """ in sql or \ sql.find("""10\tfirst string\tsecond string""") == -1 or \ sql.find("""INSERT INTO "public"."test" ("str2") VALUES ('second string');""") == -1 or \ sql.find("""12\tfirst string\tsecond string""") == -1)) ############################################################################### # Test creating a field with the fid name (PG_USE_COPY=NO) def test_ogr_pgdump_9(pg_use_copy='YES'): gdal.SetConfigOption('PG_USE_COPY', pg_use_copy) ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_9.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) fld = ogr.FieldDefn('str', ogr.OFTString) fld.SetWidth(5) lyr.CreateField(fld) fld = ogr.FieldDefn('str2', ogr.OFTString) lyr.CreateField(fld) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', '01234') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'ABCDEF') lyr.CreateFeature(feat) if sys.version_info >= (3, 0, 0): val4 = '\u00e9\u00e9\u00e9\u00e9' val5 = val4 + '\u00e9' val6 = val5 + '\u00e9' else: exec("val4 = u'\\u00e9\\u00e9\\u00e9\\u00e9'") exec("val5 = val4 + u'\\u00e9'") exec("val6 = val5 + u'\\u00e9'") feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', val6) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'a' + val5) lyr.CreateFeature(feat) gdal.SetConfigOption('PG_USE_COPY', None) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_9.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_9.sql') if pg_use_copy == 'YES': eofield = '\t' else: eofield = "'" assert ("""01234%s""" % eofield in sql and \ """ABCDE%s""" % eofield in sql and \ """%s%s""" % (val5, eofield) in sql and \ """%s%s""" % ('a' + val4, eofield) in sql) def test_ogr_pgdump_10(): return test_ogr_pgdump_9('NO') ############################################################################### # Export POINT EMPTY for PostGIS 2.2 def test_ogr_pgdump_11(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_11.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbPoint, options=['POSTGIS_VERSION=2.2']) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT EMPTY')) lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_11.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_11.sql') # clang -m32 generates F8FF..., instead of F87F... for all other systems assert ('0101000000000000000000F87F000000000000F87F' in sql or \ '0101000000000000000000F8FF000000000000F8FF' in sql) ############################################################################### # Test that GEOMETRY_NAME works even when the geometry column creation is # done through CreateGeomField (#6366) # This is important for the ogr2ogr use case when the source geometry column # is not-nullable, and hence the CreateGeomField() interface is used. def test_ogr_pgdump_12(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_12.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['GEOMETRY_NAME=another_name']) lyr.CreateGeomField(ogr.GeomFieldDefn('my_geom', ogr.wkbPoint)) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_12.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_12.sql') assert 'another_name' in sql ############################################################################### # Test ZM support def test_ogr_pgdump_13(): tests = [[ogr.wkbUnknown, [], 'POINT ZM (1 2 3 4)', ["'GEOMETRY',2)", "0101000000000000000000F03F0000000000000040"]], [ogr.wkbUnknown, ['GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(GEOMETRY", "0101000000000000000000F03F0000000000000040"]], [ogr.wkbUnknown, ['DIM=XYZ'], 'POINT ZM (1 2 3 4)', ["'GEOMETRY',3)", "0101000080000000000000F03F00000000000000400000000000000840"]], [ogr.wkbUnknown, ['DIM=XYZ', 'GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(GEOMETRYZ,", "0101000080000000000000F03F00000000000000400000000000000840"]], [ogr.wkbPoint, ['DIM=XYZ'], 'POINT ZM (1 2 3 4)', ["'POINT',3)", "0101000080000000000000F03F00000000000000400000000000000840"]], [ogr.wkbPoint25D, [], 'POINT ZM (1 2 3 4)', ["'POINT',3)", "0101000080000000000000F03F00000000000000400000000000000840"]], [ogr.wkbPoint, ['DIM=XYZ', 'GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(POINTZ,", "0101000080000000000000F03F00000000000000400000000000000840"]], [ogr.wkbUnknown, ['DIM=XYM'], 'POINT ZM (1 2 3 4)', ["'GEOMETRY',3)", "0101000040000000000000F03F00000000000000400000000000001040"]], [ogr.wkbUnknown, ['DIM=XYM', 'GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(GEOMETRYM,", "0101000040000000000000F03F00000000000000400000000000001040"]], [ogr.wkbPoint, ['DIM=XYM'], 'POINT ZM (1 2 3 4)', ["'POINTM',3)", "0101000040000000000000F03F00000000000000400000000000001040"]], [ogr.wkbPointM, [], 'POINT ZM (1 2 3 4)', ["'POINTM',3)", "0101000040000000000000F03F00000000000000400000000000001040"]], [ogr.wkbPoint, ['DIM=XYM', 'GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(POINTM,", "0101000040000000000000F03F00000000000000400000000000001040"]], [ogr.wkbUnknown, ['DIM=XYZM'], 'POINT ZM (1 2 3 4)', ["'GEOMETRY',4)", "01010000C0000000000000F03F000000000000004000000000000008400000000000001040"]], [ogr.wkbUnknown, ['DIM=XYZM', 'GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(GEOMETRYZM,", "01010000C0000000000000F03F000000000000004000000000000008400000000000001040"]], [ogr.wkbPoint, ['DIM=XYZM'], 'POINT ZM (1 2 3 4)', ["'POINT',4)", "01010000C0000000000000F03F000000000000004000000000000008400000000000001040"]], [ogr.wkbPointZM, [], 'POINT ZM (1 2 3 4)', ["'POINT',4)", "01010000C0000000000000F03F000000000000004000000000000008400000000000001040"]], [ogr.wkbPoint, ['DIM=XYZM', 'GEOM_TYPE=geography'], 'POINT ZM (1 2 3 4)', ["geography(POINTZM,", "01010000C0000000000000F03F000000000000004000000000000008400000000000001040"]], ] for (geom_type, options, wkt, expected_strings) in tests: ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_13.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=geom_type, options=options) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt(wkt)) lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_13.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_13.sql') for expected_string in expected_strings: assert expected_string in sql, (geom_type, options, wkt, expected_string) if 'GEOM_TYPE=geography' in options: continue ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_13.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=options) lyr.CreateGeomField(ogr.GeomFieldDefn("my_geom", geom_type)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt(wkt)) lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_13.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_13.sql') for expected_string in expected_strings: assert expected_string in sql, (geom_type, options, wkt, expected_string) ############################################################################### # Test description def test_ogr_pgdump_14(): # Set with DESCRIPTION layer creation option ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_14.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('ogr_pgdump_14', geom_type=ogr.wkbPoint, options=['DESCRIPTION=foo']) # Test that SetMetadata() and SetMetadataItem() are without effect lyr.SetMetadata({'DESCRIPTION': 'bar'}) lyr.SetMetadataItem('DESCRIPTION', 'baz') ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_14.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_14.sql') assert """COMMENT ON TABLE "public"."ogr_pgdump_14" IS 'foo';""" in sql and 'bar' not in sql and 'baz' not in sql # Set with SetMetadataItem() ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_14.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('ogr_pgdump_14', geom_type=ogr.wkbPoint) lyr.SetMetadataItem('DESCRIPTION', 'bar') ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_14.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_14.sql') assert """COMMENT ON TABLE "public"."ogr_pgdump_14" IS 'bar';""" in sql # Set with SetMetadata() ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_14.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('ogr_pgdump_14', geom_type=ogr.wkbPoint) lyr.SetMetadata({'DESCRIPTION': 'baz'}) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_14.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_14.sql') assert """COMMENT ON TABLE "public"."ogr_pgdump_14" IS 'baz';""" in sql ############################################################################### # NULL vs unset def test_ogr_pgdump_15(): ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_15.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldNull(0) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_15.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_15.sql') assert ('INSERT INTO "public"."test" ("str") VALUES (NULL)' in sql or \ 'INSERT INTO "public"."test" DEFAULT VALUES' in sql) ############################################################################### # Test sequence updating def test_ogr_pgdump_16(): for pg_use_copy in ('YES', 'NO'): gdal.SetConfigOption('PG_USE_COPY', pg_use_copy) ds = ogr.GetDriverByName('PGDump').CreateDataSource('/vsimem/ogr_pgdump_16.sql', options=['LINEFORMAT=LF']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(1) lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_pgdump_16.sql', 'rb') sql = gdal.VSIFReadL(1, 10000, f).decode('utf8') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_pgdump_16.sql') assert """SELECT setval(pg_get_serial_sequence('"public"."test"', 'ogc_fid'), MAX("ogc_fid")) FROM "public"."test";""" in sql gdal.SetConfigOption('PG_USE_COPY', None) ############################################################################### # Cleanup def test_ogr_pgdump_cleanup(): try: os.remove('tmp/tpoly.sql') except OSError: pass try: os.remove('tmp/ogr_pgdump_4.sql') except OSError: pass gdalautotest-3.1.2/ogr/ogr_gml_geom.py0000775000175000017500000032023513701060010016465 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_gml_geom.py 27abfaab99b3c3b3d57cb2ab0a309d91d2942e3a 2020-04-07 18:23:08 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic OGR translation of WKT and WKB geometries. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2014, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import pytest import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal ############################################################################### @pytest.mark.parametrize( 'filename', [ f for f in os.listdir(os.path.join(os.path.dirname(__file__), 'data/wkb_wkt')) if f[-4:] == '.wkt' ] ) def test_gml_geom(filename): raw_wkt = open('data/wkb_wkt/' + filename).read() ###################################################################### # Convert WKT to GML. geom_wkt = ogr.CreateGeometryFromWkt(raw_wkt) gml = geom_wkt.ExportToGML() assert gml is not None and gml, 'Conversion to GML failed.' ###################################################################### # Create geometry from GML. geom_gml = ogr.CreateGeometryFromGML(gml) if ogrtest.check_feature_geometry(geom_wkt, geom_gml, 0.0000000000001) == 1: clean_wkt = geom_wkt.ExportToWkt() gml_wkt = geom_gml.ExportToWkt() pytest.fail('WKT from GML (%s) does not match clean WKT (%s).\ngml was (%s)' % (gml_wkt, clean_wkt, gml)) ############################################################################### # Test geometries with extra spaces at the end, as sometimes are generated # by ESRI WFS software. def test_gml_space_test(): gml = '189999.99995605,624999.99998375 200000.00005735,624999.99998375 200000.00005735,612499.99997125 195791.3593843,612499.99997125 193327.3749823,612499.99997125 189999.99995605,612499.99997125 189999.99995605,619462.31247125 189999.99995605,624999.99998375 \n' geom = ogr.CreateGeometryFromGML(gml) assert geom is not None and geom.GetGeometryType() is ogr.wkbLineString and geom.GetPointCount() == 8, \ 'GML not correctly parsed' ############################################################################### # Test GML 3.x "pos" element for a point. def test_gml_pos_point(): gml = '31 29 16' geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POINT (31 29 16)', ' not correctly parsed' ############################################################################### # Test GML 3.1.1 "pos" element for a polygon. (ticket #3244) def test_gml_pos_polygon(): gml = ''' 0 0 4 0 4 4 0 4 0 0 1 1 2 1 2 2 1 2 1 1 ''' geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0,4 0,4 4,0 4,0 0),(1 1,2 1,2 2,1 2,1 1))', \ ' not correctly parsed' ############################################################################### # Test GML 3.x "posList" element for a linestring. def test_gml_posList_line(): gml = '31 42 53 64 55 76' geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'LINESTRING (31 42,53 64,55 76)', \ ' not correctly parsed' ############################################################################### # Test GML 3.x "posList" element for a 3D linestring. def test_gml_posList_line3d(): gml = '31 42 1 53 64 2 55 76 3' geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'LINESTRING (31 42 1,53 64 2,55 76 3)', \ ' not correctly parsed' ############################################################################### # Test GML 3.x "posList" element for a 3D linestring, but with srsDimension # set on LineString, not posList def test_gml_posList_line3d_2(): gml = '31 42 1 53 64 2 55 76 3' geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'LINESTRING (31 42 1,53 64 2,55 76 3)', \ ' not correctly parsed' ############################################################################### # Test GML 3.x "polygon" element for a point. def test_gml_polygon(): gml = '0 0 4 0 4 4 0 4 0 01 1 2 1 2 2 1 2 1 1' geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0,4 0,4 4,0 4,0 0),(1 1,2 1,2 2,1 2,1 1))', \ ' not correctly parsed' ############################################################################### # Private utility function to convert WKT to GML with assigned WGS 84 as SRS. def _CreateGMLWithSRSFromWkt(wkt, epsg): geom = ogr.CreateGeometryFromWkt(wkt) if geom is None: gdaltest.post_reason('Import geometry from WKT failed') return None # Assign SRS from given EPSG code srs = osr.SpatialReference() srs.ImportFromEPSG(epsg) if srs is None: gdaltest.post_reason('SRS import from EPSG failed') return None geom.AssignSpatialReference(srs) return geom.ExportToGML() ############################################################################### # Test of Point geometry with SRS assigned def test_gml_out_point_srs(): wkt = 'POINT(21.675 53.763)' gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:31] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test of Point 3D geometry with SRS assigned def test_gml_out_point3d_srs(): wkt = 'POINT(21.675 53.763 100)' gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:31] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test of LineString geometry with SRS assigned def test_gml_out_linestring_srs(): wkt = open('data/wkb_wkt/5.wkt').read() gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:36] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test of Polygon geometry with SRS assigned def test_gml_out_polygon_srs(): wkt = open('data/wkb_wkt/6.wkt').read() gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:33] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test of MultiPoint geometry with SRS assigned def test_gml_out_multipoint_srs(): wkt = open('data/wkb_wkt/11.wkt').read() gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:36] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test of MultiLineString geometry with SRS assigned def test_gml_out_multilinestring_srs(): wkt = open('data/wkb_wkt/2.wkt').read() gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:41] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test of MultiPolygon geometry with SRS assigned def test_gml_out_multipolygon_srs(): wkt = open('data/wkb_wkt/4.wkt').read() gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:38] == '', \ 'No srsName attribute in GML output' # Verify we have no other srsName's on subelements. assert gml[39:].find('srsName') == -1, \ 'Got extra srsName attributes on subelements.' ############################################################################### # Test of GeometryCollection with SRS assigned def test_gml_out_geometrycollection_srs(): wkt = open('data/wkb_wkt/3.wkt').read() gml = _CreateGMLWithSRSFromWkt(wkt, 4326) assert gml is not None and gml, 'Conversion to GML failed.' assert gml[0:39] == '', \ 'No srsName attribute in GML output' ############################################################################### # Test GML Box def test_gml_Box(): gml = """ 1 2 3 4 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((1 2 0,3 2 0,3 4 0,1 4 0,1 2 0))', \ ' not correctly parsed' ############################################################################### # Test GML Envelope def test_gml_Envelope(): gml = """ 1 2 3 4 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((1 2,3 2,3 4,1 4,1 2))', \ ' not correctly parsed' ############################################################################### # Test GML Curve def test_gml_Curve(): gml = """ 1 2 3 4 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'LINESTRING (1 2,3 4)', \ ' not correctly parsed' ############################################################################### # Test GML Curve with pointProperty elements def test_gml_Curve_with_pointProperty(): gml = """ 1 2 3 4 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'LINESTRING (1 2,3 4)', \ ' not correctly parsed' ############################################################################### # Test GML MultiCurve def test_gml_MultiCurve(): gml = """ 1 2 2 3 3 4 4 5 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTILINESTRING ((1 2,2 3),(3 4,4 5))', \ ' not correctly parsed' ############################################################################### # Test GML MultiSurface with PolygonPatch def test_gml_MultiSurface(): gml = """ 1 2 3 4 5 6 1 2 2 3 4 5 6 7 2 3 3 4 5 6 7 8 3 4 4 5 6 7 6 7 8 9 8 9 4 5 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTIPOLYGON (((1 2,3 4,5 6,1 2),(2 3,4 5,6 7,2 3),(3 4,5 6,7 8,3 4)),((4 5,6 7,8 9,4 5)))', \ ' not correctly parsed' ############################################################################### # Test GML MultiSurface with surfaceMembers def test_gml_MultiSurface_surfaceMembers(): gml = """ 1 2 3 4 5 6 1 2 2 3 4 5 6 7 2 3 3 4 5 6 7 8 3 4 30 40 50 60 70 80 30 40 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTIPOLYGON (((1 2,3 4,5 6,1 2),(2 3,4 5,6 7,2 3)),((3 4,5 6,7 8,3 4)),((30 40,50 60,70 80,30 40)))', \ ' not correctly parsed' ############################################################################### # Test GML MultiCurve with curveMembers def test_gml_MultiCurve_curveMembers(): gml = """ 0 0 1 1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTILINESTRING ((0 0,1 1))', \ ' not correctly parsed' ############################################################################### # Test GML MultiGeometry with geometryMembers def test_gml_MultiGeometry_geometryMembers(): gml = """ 0 0 1 1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'GEOMETRYCOLLECTION (LINESTRING (0 0,1 1))', \ ' not correctly parsed' ############################################################################### # Test GML CompositeCurve with curveMembers def test_gml_CompositeCurve_curveMembers(): gml = """ 0 0 1 1 1 1 2 2 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'LINESTRING (0 0,1 1,2 2)', \ ' not correctly parsed' ############################################################################### # Test GML MultiPoint with pointMembers def test_gml_MultiCurve_pointMembers(): gml = """ 0 0 1 1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTIPOINT (0 0,1 1)', \ ' not correctly parsed' ############################################################################### # Test GML Solid def test_gml_Solid(): gml = """ 1 2 0 3 4 0 5 6 0 1 2 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYHEDRALSURFACE Z (((1 2 0,3 4 0,5 6 0,1 2 0)))', \ ' not correctly parsed' ############################################################################### # Test GML OrientableSurface def test_gml_OrientableSurface(): gml = """ -213.475 24.989 0 -213.475 24.989 8.0 -215.704 25.077 8.0 -215.704 25.077 0 -213.475 24.989 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((-213.475 24.989 0,-213.475 24.989 8,-215.704 25.077 8,-215.704 25.077 0,-213.475 24.989 0))', \ ' not correctly parsed' ############################################################################### # Test GML Triangle def test_gml_Triangle(): gml = """ 0 0 0 1 1 1 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'TRIANGLE ((0 0,0 1,1 1,0 0))', \ ' not correctly parsed' # check the conversion of Triangle from OGR -> GML wkt_original = 'TRIANGLE ((0 0,0 1,0 1,0 0))' triangle = ogr.CreateGeometryFromWkt(wkt_original) opts = ["FORMAT=GML3"] gml_string = triangle.ExportToGML(opts) if gml_string != '0 0 0 1 0 1 0 0': print(geom.ExportToWkt()) pytest.fail('incorrect conversion from OGR -> GML for OGRTriangle') ############################################################################### # Test GML Rectangle def test_gml_Rectangle(): gml = """ 0 0 0 1 1 1 1 0 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0,0 1,1 1,1 0,0 0))', \ ' not correctly parsed' ############################################################################### # Test GML PolyhedralSurface def test_gml_PolyhedralSurface(): # Conversion from GML -> OGR # 2 patches and 2 rings gml = """ 1 2 3 4 5 6 7 8 9 1 2 3 10 11 12 13 14 15 16 17 18 10 11 12 19 20 21 22 23 24 25 26 27 19 20 21 """ geom = ogr.CreateGeometryFromGML(gml) # NOTE - this is actually an invalid PolyhedralSurface # need to assert geom.IsValid() == True to determine the validity of the geometry assert geom.ExportToWkt() == 'POLYHEDRALSURFACE Z (((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12),(19 20 21,22 23 24,25 26 27,19 20 21)))', \ ' not correctly parsed' # 1 patch and 2 rings gml = """ 1 2 3 4 5 6 7 8 9 1 2 3 10 11 12 13 14 15 16 17 18 10 11 12 """ geom = ogr.CreateGeometryFromGML(gml) # NOTE - this is actually an invalid PolyhedralSurface # need to assert geom.IsValid() == True to determine the validity of the geometry assert geom.ExportToWkt() == 'POLYHEDRALSURFACE Z (((1 2 3,4 5 6,7 8 9,1 2 3)),((10 11 12,13 14 15,16 17 18,10 11 12)))', \ ' not correctly parsed' # Variations of empty PolyhedralSurface gml_strings = ['', '', """ """] for string in gml_strings: geom = ogr.CreateGeometryFromGML(string) assert geom.ExportToWkt() == 'POLYHEDRALSURFACE EMPTY', \ 'Empty not correctly parsed' # Conversion from OGR -> GML wkt_original = 'POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),\ ((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),\ ((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),\ ((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),\ ((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),\ ((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1)))' ps = ogr.CreateGeometryFromWkt(wkt_original) opts = ["FORMAT=GML3"] string = ps.ExportToGML(opts) if string != '0 0 0 0 0 1 0 1 1 0 1 0 0 0 00 0 0 0 1 0 1 1 0 1 0 0 0 0 00 0 0 1 0 0 1 0 1 0 0 1 0 0 01 1 0 1 1 1 1 0 1 1 0 0 1 1 00 1 0 0 1 1 1 1 1 1 1 0 0 1 00 0 1 1 0 1 1 1 1 0 1 1 0 0 1': print(geom.ExportToWkt()) pytest.fail('incorrect parsing of OGR -> GML for PolyhedralSurface') g2 = ogr.CreateGeometryFromGML(string) if g2.Equals(ps) != 1: print(geom.ExportToWkt()) pytest.fail('incorrect round-tripping') # empty geometry wkt_original = 'POLYHEDRALSURFACE EMPTY' ps = ogr.CreateGeometryFromWkt(wkt_original) opts = ["FORMAT=GML3"] string = ps.ExportToGML(opts) if string != '': print(geom.ExportToWkt()) pytest.fail('incorrect parsing of OGR -> GML for empty PolyhedralSurface') # several polygon patches (and test that non elements such as comments are parsed OK) gml = """ 1 2 3 4 5 6 7 8 9 1 2 3 1 2 3 4 5 6 7 8 9 1 2 3 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'GEOMETRYCOLLECTION (POLYHEDRALSURFACE (((1 2 3,4 5 6,7 8 9,1 2 3))),POLYHEDRALSURFACE (((1 2 3,4 5 6,7 8 9,1 2 3))))', \ ' not correctly parsed' # Test PolyhedralSurface with curve section (which we linearize since the SF PolyhedralSurface doesn't support curves) gml = """ 0 -1 0 1 0 1 1 0 0 -1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt().find('POLYHEDRALSURFACE (((0 -1,0 1,') >= 0, \ ' not correctly parsed' ############################################################################### # Test GML Tin def test_gml_Tin(): gml = """ 0 0 1 0 1 1 1 1 1 1 0 1 0 0 1 """ geom = ogr.CreateGeometryFromGML(gml) # NOTE - this is actually an invalid TIN surface, as the triangle is incorrect # need to assert geom.IsValid() == True to determine the validity of the geometry assert geom.ExportToWkt() == 'TIN Z (((0 0 1,0 1 1,1 1 1,1 0 1,0 0 1)))', \ ' not correctly parsed' # Test for gml:TriangulatedSurface gml = """ 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))', \ ' not correctly parsed' # substituting gml:trianglePatches for gml:patches gml = """ 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))', \ ' not correctly parsed' # Part 2 - Create GML File from OGR Geometries wkt_original = 'TIN Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,0 0 0)))' tin = ogr.CreateGeometryFromWkt(wkt_original) opts = ["FORMAT=GML3"] gml_string = tin.ExportToGML(opts) if gml_string != '0 0 0 0 0 1 0 1 0 0 0 00 0 0 0 1 0 1 1 0 0 0 0': print(geom.ExportToWkt()) pytest.fail('OGRGeometry::TriangulatedSurface incorrectly converted') ############################################################################### # Test concatenated sections (#4451) def test_gml_ConcatenatedDeduplication(): gml = """ 0 -1 0 1 0 1 1 0 0 -1 """ geom = ogr.CreateGeometryFromGML(gml) expected_wkt = 'CURVEPOLYGON (COMPOUNDCURVE ((0 -1,0 1),CIRCULARSTRING (0 1,1 0,0 -1)))' assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt(expected_wkt)) == 0 assert not ogrtest.have_geos() or geom.IsValid(), 'geometry not valid' ############################################################################### # Test OGRFormatDouble() to check for rounding errors (would also apply for KML output, or ogrinfo output) def gml_out_precision(): geom = ogr.CreateGeometryFromWkt('POINT(93538.15 1.23456789)') expected_gml = '93538.15,1.23456789' got_gml = geom.ExportToGML() assert got_gml == expected_gml, 'did not get expected gml' geom = ogr.CreateGeometryFromWkt('POINT(93538.55 1234567.89)') expected_gml = '93538.55,1234567.89' got_gml = geom.ExportToGML() assert got_gml == expected_gml, 'did not get expected gml' ############################################################################### # Test various error cases of gml2ogrgeometry.cpp def test_gml_invalid_geoms(): gml_expected_wkt_list = [ ('', None), ('', None), ('', None), ('31 29 1631 29 16', None), ('', 'POINT EMPTY'), # This is valid GML actually ('0', None), ('0 1', 'POINT (0 1)'), # Support for uncommon formatting of coordinates ('0 1 2', 'POINT (0 1 2)'), # Support for uncommon formatting of coordinates ('0,1 2,3', None), ('0', None), ('', 'POINT EMPTY'), # This is valid GML actually ('', None), ('', None), ('', None), ('', None), ('', 'LINESTRING EMPTY'), # This is valid GML actually ('0', None), ('0 1 2 3', None), ('0 1 2 3', None), ('', None), ('', None), ('0', None), ('', 'POLYGON EMPTY'), # valid GML3, but invalid GML2. Be tolerant ('', 'POLYGON EMPTY'), # valid GML2 ('', None), ('31 29 16', None), ('0 1 2 3 4 5 0 1', None), ('', None), ('0 1 2 3 4 5 0 131 29 16', None), ('', None), ('', None), ('', None), ('', None), ('31 29 16', None), ('', None), ('31 29 16', None), ('', 'MULTIPOLYGON EMPTY'), # valid GML3, but invalid GML2. Be tolerant ('', 'MULTIPOLYGON EMPTY'), # illegal GML, but we are tolerant ('', 'MULTIPOLYGON EMPTY'), # valid in GML3 (accepted by PostGIS too) ('', None), ('31 29 16', None), ('', 'MULTIPOLYGON EMPTY'), # valid GML ('', 'MULTIPOLYGON EMPTY'), # illegal GML, but we are tolerant ('', 'MULTIPOLYGON EMPTY'), # valid GML3 ('', 'MULTIPOINT EMPTY'), ('', 'MULTIPOINT EMPTY'), ('', 'MULTIPOINT EMPTY'), # valid in GML3 (accepted by PostGIS too) ('0 1 2 3', None), ('', 'MULTIPOINT EMPTY'), ('', 'MULTIPOINT EMPTY'), ('', None), ('', 'MULTILINESTRING EMPTY'), ('', 'MULTILINESTRING EMPTY'), ('', None), ('31 29 16', None), ('', 'MULTILINESTRING EMPTY'), ('', 'MULTILINESTRING EMPTY'), ('', 'MULTILINESTRING EMPTY'), # valid in GML3 (accepted by PostGIS too) ('', None), ('', None), ('', None), ('31 29 16', None), ('', 'MULTILINESTRING EMPTY'), ('', None), ('', None), ('', None), ('', None), ('', None), ('', None), ('31 29 16', None), ('', None), ('0 0 0 1', None), ('0 0 0 1 1 0 2 0', None), ('', None), ('0 0 0 1', None), ('0 0 0 1 1 0 2 0', None), ('', None), ('0 0 0 1', None), ('', None), ('', None), ('', None), ('', None), ('31 29 16', None), ('', 'GEOMETRYCOLLECTION EMPTY'), ('', 'GEOMETRYCOLLECTION EMPTY'), ('', 'GEOMETRYCOLLECTION EMPTY'), # valid in GML3 (accepted by PostGIS too) ('', None), ('', None), ('', 'POLYGON EMPTY'), # valid GML3 ('', 'POLYGON EMPTY'), # invalid GML3, but we are tolerant ('', 'POLYGON EMPTY'), # valid GML3 ('', None), ('', 'POLYGON EMPTY'), # valid GML3 ('', 'POLYHEDRALSURFACE EMPTY'), # valid GML3 ('', 'POLYHEDRALSURFACE EMPTY'), # invalid GML3, but we are tolerant ('', 'POLYHEDRALSURFACE EMPTY'), # valid GML3 ('', None), ('0 0 4 0 4 4 0 4 0 0', 'POLYGON ((0 0,4 0,4 4,0 4,0 0))'), ('', None), ('', None), ('', None), ('', None), ('', None), # invalid ('', None), # invalid GML3, but we are tolerant ('', 'POLYGON EMPTY'), # validates the schema ('', None), # invalid ('', None), # invalid GML3, but we are tolerant ('', 'MULTIPOINT EMPTY'), # validates the schema ('', None), ('', None), ('13 4', None), ('1bla2', None), ('1bla2', None), ('1bla2', None), ('1,2', None), ('1,2', None), ('1,2', None), ('1,2', None), ('1,2', None), ('1,2', None), (""" 0 0 1 0 0 0 -10 0 -1 0 0 0 """, "COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0),(0 0,-1 0,-10 0))"), # non contiguous segments (""" 0 0 1 0 0 0 -10 0 1 0 0 0 0 0 -1 0 0 0 """, None), # non contiguous segments ("2-1", None), ("2 02-1", None), ("2 0 -2 0-1", None), ("2 0 -2 0-1", None), ("", None), ("290270", None), ("1 290270", None), ("1 22270", None), ("1 2290", None), ("2", None), ("1 2", None), ('', None), ('', None), ('', None), ] for (gml, expected_wkt) in gml_expected_wkt_list: gdal.PushErrorHandler('CPLQuietErrorHandler') # print gml geom = ogr.CreateGeometryFromGML(gml) gdal.PopErrorHandler() if geom is None: assert expected_wkt is None, \ ('did not get expected result for %s. Got None instead of %s' % (gml, expected_wkt)) else: wkt = geom.ExportToWkt() if expected_wkt is None: pytest.fail('did not get expected result for %s. Got %s instead of None' % (gml, wkt)) else: assert wkt == expected_wkt, \ ('did not get expected result for %s. Got %s instead of %s' % (gml, wkt, expected_wkt)) ############################################################################### # Test write support for GML3 def test_gml_write_gml3_geometries(): gml_list = ['2 3', '2 3 4', '2 3 4 5', '2 3 4 5', '2 3 10 4 5 20', '2 3 10 4 5 20', '0 0 0 1 1 1 1 0 0 0', '0 0 0 1 1 1 1 0 0 010 10 10 11 11 11 10 10', '2 34 5', '0 1 2 3 4 56 7 8 9 10 11', '0 1 2 3 4 56 7 8 9 10 11', '0 1 2 3 4 5 0 16 7 8 9 10 11 6 7', '0 12 3 4 5'] for gml_in in gml_list: geom = ogr.CreateGeometryFromGML(gml_in) if gml_in.find('0 0 1 0 1 1 0 1""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0,1 0,1 1,0 1,0 0))', \ ' not correctly parsed' ############################################################################### # Test GML 3.3 SimpleRectangle def test_gml_SimpleRectangle(): gml = """0 0 1 0 1 1 0 1""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0,1 0,1 1,0 1,0 0))', \ ' not correctly parsed' ############################################################################### # Test GML 3.3 SimpleTriangle def test_gml_SimpleTriangle(): gml = """0 0 1 0 1 1""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'TRIANGLE ((0 0,1 0,1 1,0 0))', \ ' not correctly parsed' ############################################################################### # Test GML 3.3 SimpleMultiPoint def test_gml_SimpleMultiPoint(): gml = """0 1 2 3""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTIPOINT (0 1,2 3)', \ ' not correctly parsed' ############################################################################### # Test gml:CompositeCurve> in def test_gml_CompositeCurveInRing(): gml = """ 0 0 0 1 0 1 1 1 1 1 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0,0 1,1 1,0 0))' ############################################################################### # Test in (#5369) def test_gml_CompositeSurface_in_surfaceMembers(): gml = """ 0 0 0 1 1 1 1 0 0 0 2 0 2 1 3 1 3 0 2 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)),((2 0,2 1,3 1,3 0,2 0)))' ############################################################################### # Test with only Interior ring (#5421) def test_gml_MultiSurfaceOfSurfaceOfPolygonPatchWithInteriorRing(): gml = """ 0 0 0 1 1 1 1 0 0 0 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.25 0.25 0.25 0 0 0 -1 -1 -1 -1 0 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.75 0.25,0.25 0.25)),((0 0,0 -1,-1 -1,-1 0,0 0)))' ############################################################################### # Test ts, cs and decimal attributes of gml:coordinates def test_gml_Coordinates_ts_cs_decimal(): gml_expected_wkt_list = [ ('1,2', 'POINT (1 2)'), # default values ('1,2', 'POINT (1 2)'), # default values ('1,2,3', 'POINT (1 2 3)'), # default values (' 1,2 ', 'POINT (1 2)'), # we accept that... ('1 2', 'POINT (1 2)'), # this is completely out of specification ! but we accept that too ! ('1;2', 'POINT (1 2)'), ('1,2;3,4', 'POINT (1.2 3.4)'), ('1,2;3,4;5,6', 'POINT (1.2 3.4 5.6)'), ('1,2 3,4', 'LINESTRING (1 2,3 4)'), # default values ('1,2 3,4', 'LINESTRING (1 2,3 4)'), # default values ('1,2,2.5 3,4', 'LINESTRING (1 2 2.5,3 4 0)'), # default values ('1,2-3,4', 'LINESTRING (1 2,3 4)'), ('1 2,3 4', 'LINESTRING (1 2,3 4)'), ('1 2 2.5,3 4', 'LINESTRING (1 2 2.5,3 4 0)'), ] for (gml, expected_wkt) in gml_expected_wkt_list: geom = ogr.CreateGeometryFromGML(gml) wkt = geom.ExportToWkt() if expected_wkt is None: pytest.fail('did not get expected result for %s. Got %s instead of None' % (gml, wkt)) else: assert wkt == expected_wkt, \ ('did not get expected result for %s. Got %s instead of %s' % (gml, wkt, expected_wkt)) ############################################################################### # Test gml with XML header and comments def test_gml_with_xml_header_and_comments(): gml_expected_wkt_list = [ (' 1,2', 'POINT (1 2)'), (""" 0 0 0 1 1 1 1 0 0 0 0.25 0.25 0.25 0.75 0.75 0.75 0.75 0.25 0.25 0.25 """, 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.75 0.25,0.25 0.25)))'), ] for (gml, expected_wkt) in gml_expected_wkt_list: geom = ogr.CreateGeometryFromGML(gml) wkt = geom.ExportToWkt() if expected_wkt is None: pytest.fail('did not get expected result for %s. Got %s instead of None' % (gml, wkt)) else: assert wkt == expected_wkt, \ ('did not get expected result for %s. Got %s instead of %s' % (gml, wkt, expected_wkt)) ############################################################################### # Test srsDimension attribute on top-level geometry and not on posList (#5606) def test_gml_srsDimension_topgeometry(): gml = """ 0 0 10 0 1 10 1 1 10 1 0 10 0 0 10 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'POLYGON ((0 0 10,0 1 10,1 1 10,1 0 10,0 0 10))' ############################################################################### # Test GML Arc def test_gml_Arc(): gml = "1 0 0 1 -1 0" geom = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('CIRCULARSTRING (1 0,0 1,-1 0)')) == 0 gml2 = geom.ExportToGML(['FORMAT=GML3']) expected_gml2 = '1 0 0 1 -1 0' assert gml2 == expected_gml2 geom2 = ogr.CreateGeometryFromGML(gml2) assert geom.Equals(geom2) ############################################################################### # Test GML ArcByBulge def test_gml_ArcByBulge(): gml = "2 0 -2 02-1" geom = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('CIRCULARSTRING (2 0,0 2,-2 0)')) == 0 ############################################################################### # Test GML ArcByCenterPoint def test_gml_ArcByCenterPoint(): gml = "1 2290270" geom = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('CIRCULARSTRING (1 4,-1 2,1 0)')) == 0 ############################################################################### # Test compound curve of ArcByCenterPoint whose ends don't exactly match # with ends of neighbouring curves, as found in some AIXM files def test_gml_CompoundCurve_of_ArcByCenterPoint(): gml = """ -80.40 33.86 -80.27 33.63 -80.47 33.98 23 295 249 -80.63 33.62 -80.39 33.85 """ geom = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('POLYGON ((-80.4 33.86,-80.27 33.63,-80.305028054229538 33.622017309598967,-80.335422529369936 33.613343178471617,-80.366464292754429 33.606448070493634,-80.398003921948742 33.601365147653873,-80.429889693662162 33.598118851265042,-80.461968286017793 33.596724788982847,-80.494085487001527 33.597189662699385,-80.52608690656875 33.599511237590342,-80.557818688893789 33.603678352435914,-80.589128223167393 33.609670971175497,-80.619864849221443 33.617460275496377,-80.63 33.62,-80.39 33.85))')) == 0 ############################################################################### # Test GML CircleByCenterPoint def test_gml_CircleByCenterPoint(): gml = "1 22" geom = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('CIRCULARSTRING (-1 2,3 2,-1 2)')) == 0 ############################################################################### # Test GML CircleByCenterPoint with uom="m" def test_gml_CircleByCenterPoint_srs_geog_uom_m(): gml = '49 22000' geom1 = ogr.CreateGeometryFromGML(gml) geom1.SwapXY() gml = '2 492000' geom2 = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom1, geom2) == 0 ############################################################################### # Test compound curve of ArcByCenterPoint whose ends don't exactly match # with ends of neighbouring curves, as found in some AIXM files # with all curves in the same element as found in #2356) def test_gml_CompoundCurve_of_ArcByCenterPoint_curve_in_same_segments(): geom = ogr.CreateGeometryFromGML(""" 55.233333333333334 -36.166666666666664 55.23116372807667 -36.89437337916484 55.2333333333333 -36.166666666666664 25.0 270.0 497.0 54.92816350530716 -35.674116070018954 55.233333333333334 -36.166666666666664 2.0 """) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('POLYGON ((55.2333333333333 -36.1666666666667,55.2311637280767 -36.8943733791648,55.2602248071013 -36.8960852160185,55.2891782700249 -36.8912782655051,55.3178697537514 -36.88292675789,55.3461587637071 -36.8710639413776,55.3739064765608 -36.8557405708675,55.4009764350458 -36.8370248014709,55.4272352367262 -36.8150019876212,55.4525532129231 -36.7897743859994,55.476805093957 -36.7614607612323,55.4998706568286 -36.7301958939182,55.5216353514589 -36.6961299915025,55.5419909016414 -36.6594280032268,55.5608358769213 -36.6202688413925,55.5780762317212 -36.5788445119267,55.5936258081681 -36.5353591583435,55.6074067992521 -36.4900280239174,55.6193501691593 -36.4430763379496,55.6293960278662 -36.3947381326996,55.6374939573672 -36.3452549984946,55.6436032872147 -36.2948747851727,55.6476933173936 -36.2438502586493,55.6497434869178 -36.19243772209,55.6497434869178 -36.1408956112433,55.6476933173936 -36.089483074684,55.6436032872147 -36.0384585481606,55.6374939573672 -35.9880783348387,55.6293960278662 -35.9385952006337,55.6193501691593 -35.8902569953837,55.6074067992521 -35.8433053094159,55.5936258081681 -35.7979741749898,55.5780762317212 -35.7544888214066,55.5608358769213 -35.7130644919408,55.5419909016414 -35.6739053301065,55.5216353514589 -35.6372033418322,55.4998706568286 -35.6031374394151,55.476805093957 -35.571872572101,55.4525532129231 -35.5435589473339,55.4272352367262 -35.5183313457121,55.4009764350458 -35.4963085318624,55.3739064765608 -35.4775927624659,55.3461587637071 -35.4622693919557,55.3178697537514 -35.4504065754433,55.2891782700249 -35.4420550678282,55.2602248071013 -35.4372481173149,55.2311508336186 -35.4360014509317,55.2020980963355 -35.4383133491681,55.1732079288891 -35.4441648063421,55.1446205685763 -35.4535197729773,55.1164744843283 -35.4663254761286,55.0889057188812 -35.4825128133848,55.0620472479757 -35.5019968161103,55.0360283592393 -35.524677177381,55.0109740532301 -35.5504388400636,54.9870044689367 -35.5791526404379,54.9642343358562 -35.6106760028906,54.9427724545944 -35.6448536812344,54.9281635053072 -35.674116070019,55.2333333333333 -36.1666666666667))')) == 0 ############################################################################### # Test Ring starting with ArcByCenterPoint def test_gml_Ring_starting_with_ArcByCenterPoint(): geom = ogr.CreateGeometryFromGML(""" 46.5875 0.3066666666666666 9.5 6.295729688631284 67.38797951888118 46.64833333333333 0.5194444444444445 46.43861111111111 0.33805555555555555 46.42305555555555 0.28944444444444445 46.581388888888895 0.2980555555555556 9.5 -177.84615335400528 -120.68835384474265 46.500277777777775 0.10055555555555556 46.54083333333333 0.10555555555555556 46.575 0.225 46.59444444444445 0.25833333333333336 46.65833333333333 0.2833333333333333 46.69555555555555 0.25555555555555554 46.745 0.33194444444444443 """) #print(g) assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt('POLYGON ((46.745 0.331944444444444,46.7432764927165 0.347962462754535,46.7409162535525 0.363717281627594,46.7378065348593 0.3791917846605,46.7339626150092 0.394310000163572,46.7294033759096 0.408997750371246,46.7241512079629 0.423183023082575,46.7182318974714 0.436796331344972,46.7116744971061 0.449771059387196,46.7045111801497 0.462043792829896,46.6967770793052 0.473554631563425,46.6885101109471 0.484247483569652,46.6797507857586 0.494070338341013,46.6705420067727 0.502975518511247,46.6609288558889 0.5109199085045,46.6509583699943 0.517865159176619,46.6483333333333 0.519444444444444,46.4386111111111 0.338055555555556,46.4230555555555 0.289444444444444,46.4239652827541 0.273432507330975,46.4255282239253 0.25756088338307,46.4278483647801 0.241884857622964,46.4309144976449 0.226480183207377,46.4347118090807 0.21142133567082,46.4392219496614 0.196781161237034,46.4444231204746 0.18263053185483,46.450290175977 0.169038008752016,46.4567947427662 0.156069515749848,46.4639053537626 0.143788023916768,46.4715875972233 0.132253248900933,46.4798042799442 0.121521362391196,46.4885156039408 0.111644719041597,46.4976793558324 0.102671600158084,46.5002777777778 0.100555555555556,46.5408333333333 0.105555555555556,46.575 0.225,46.5944444444444 0.258333333333333,46.6583333333333 0.283333333333333,46.6955555555556 0.255555555555556,46.745 0.331944444444444))')) == 0 ############################################################################### # Test GML Circle def test_gml_Circle(): gml = """ -1 0 0 1 -0.707106781186547 -0.707106781186548 """ geom = ogr.CreateGeometryFromGML(gml) expected_wkt = 'CIRCULARSTRING (-1 0,0 1,-0.707106781186547 -0.707106781186548,-0.923879532511287 -0.38268343236509,-1 0)' assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt(expected_wkt)) == 0 geom = ogr.CreateGeometryFromWkt('CIRCULARSTRING (0 0,2 0,0 0)') gml2 = geom.ExportToGML(['FORMAT=GML3']) expected_gml2 = '0 0 1 1 2 0' assert gml2 == expected_gml2 geom2 = ogr.CreateGeometryFromGML(gml2) assert geom2.ExportToWkt() == 'CIRCULARSTRING (0 0,1 1,2 0,1 -1,0 0)' geom = ogr.CreateGeometryFromWkt('CIRCULARSTRING (0 0 10,2 0 10,0 0 10)') gml2 = geom.ExportToGML(['FORMAT=GML3']) expected_gml2 = '0 0 10 1 1 10 2 0 10' assert gml2 == expected_gml2 gml = """ -1 0 0 1 -0.707106781186547 -0.707106781186548 """ geom = ogr.CreateGeometryFromGML(gml) expected_wkt = 'CURVEPOLYGON ( CIRCULARSTRING (-1 0,0 1,-0.707106781186547 -0.707106781186548,-0.923879532511287 -0.38268343236509,-1 0))' assert ogrtest.check_feature_geometry(geom, ogr.CreateGeometryFromWkt(expected_wkt)) == 0 ############################################################################### # Test ArcString def test_gml_ArcString(): gml = """-2 0 -1 -1 0 0""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'CIRCULARSTRING (-2 0,-1 -1,0 0)' gml = """-2 0 -1 -1 0 0 1 -1 2 0 0 2 -2 0""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'CIRCULARSTRING (-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0)' gml2 = geom.ExportToGML(['FORMAT=GML3']) expected_gml2 = '-2 0 -1 -1 0 0 1 -1 2 0 0 2 -2 0' assert gml2 == expected_gml2 geom2 = ogr.CreateGeometryFromGML(gml2) assert geom2.ExportToWkt() == 'CIRCULARSTRING (-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0)' ############################################################################### # Test OGRCompoundCurve def test_gml_OGRCompoundCurve(): wkt = 'COMPOUNDCURVE ((0 0,1 1,2 0))' geom = ogr.CreateGeometryFromWkt(wkt) gml = geom.ExportToGML(['FORMAT=GML3']) expected_gml = '0 0 1 1 2 0' assert gml == expected_gml # CompositeCurve of LineStringSegment gml = expected_gml geom = ogr.CreateGeometryFromGML(gml) # We simplify it in LINESTRING assert geom.ExportToWkt() == 'LINESTRING (0 0,1 1,2 0)' # CompositeCurve of Arc gml = """0 0 1 1 2 0""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0))' gml2 = geom.ExportToGML(['FORMAT=GML3']) assert gml2 == gml # CompositeCurve of 3 arcs gml = """ 0 0 1 1 2 0 2 0 3 1 4 0 4 0 5 1 6 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0),CIRCULARSTRING (2 0,3 1,4 0),CIRCULARSTRING (4 0,5 1,6 0))' # Alternative syntax : Curve with 3 Arc segments gml = """ 0 0 1 1 2 0 2 0 3 1 4 0 4 0 5 1 6 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0),CIRCULARSTRING (2 0,3 1,4 0),CIRCULARSTRING (4 0,5 1,6 0))' # Curve with LineStringSegment and Arc segments gml = """ 0 0 1 0 0 0 0 0 -1 0 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0),(0 0,-1 0,0 0))' # Composite curve of a LineString and a (Composite) Curve with an Arc and a LineString gml = """ 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'COMPOUNDCURVE ((0 0,1 0,0 0),CIRCULARSTRING (0 0,1 0,0 0),(0 0,-1 0,0 0))' ############################################################################### # Test OGRCurvePolygon def test_gml_OGRCurvePolygon(): # Test one CircularString gml = """0 0 1 0 0 0""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'CURVEPOLYGON (CIRCULARSTRING (0 0,1 0,0 0))' gml2 = geom.ExportToGML(['FORMAT=GML3']) expected_gml2 = '0 0 0.5 0.5 1 0' assert gml2 == expected_gml2 # Test two CircularString gml = """0 0 1 0 0 00.25 0 0.75 0 0.25 0""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'CURVEPOLYGON (CIRCULARSTRING (0 0,1 0,0 0),CIRCULARSTRING (0.25 0.0,0.75 0.0,0.25 0.0))' # Test a LinearRing followed by a CircularString gml = """-2 -2 -2 2 2 2 2 -2 -2 -20.25 0 0.75 0 0.25 0""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'CURVEPOLYGON ((-2 -2,-2 2,2 2,2 -2,-2 -2),CIRCULARSTRING (0.25 0.0,0.75 0.0,0.25 0.0))' # Test a CircularString followed by a LinearRing gml = """-1 0 1 2 3 0-2 -2 -2 2 2 2 2 -2 -2 -2""" geom = ogr.CreateGeometryFromGML(gml) assert ogrtest.check_feature_geometry(geom, 'CURVEPOLYGON (CIRCULARSTRING (-1 0,1 2,3 0,1.0 -2.0,-1 0),(-2 -2,-2 2,2 2,2 -2,-2 -2))') == 0, \ geom.ExportToWkt() gml2 = geom.ExportToGML(['FORMAT=GML3']) geom2 = ogr.CreateGeometryFromGML(gml) expected_gml2 = '-1 0 1 2 3 0 1 -2 -1 0-2 -2 -2 2 2 2 2 -2 -2 -2' expected_geom2 = ogr.CreateGeometryFromGML(expected_gml2) assert ogrtest.check_feature_geometry(geom2, expected_geom2) == 0, gml2 ############################################################################### # Test OGRMultiSurface def test_gml_OGRMultiSurface(): # MultiSurface of CurvePolygon gml = """ 0 0 1 1 1 -1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (0 0,1 1,1 -1,0.292893218813453 -0.707106781186548,0 0)))', \ ' not correctly parsed' # MultiSurface of Polygon and CurvePolygon gml = """ 0 0 0 1 1 1 0 0 0 0 1 1 1 -1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTISURFACE (((0 0,0 1,1 1,0 0)),CURVEPOLYGON (CIRCULARSTRING (0 0,1 1,1 -1,0.292893218813453 -0.707106781186548,0 0)))', \ ' not correctly parsed' # MultiSurface of CurvePolygon and Polygon gml = """ 0 0 1 1 1 -1 0 0 0 1 1 1 0 0 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (0 0,1 1,1 -1,0.292893218813453 -0.707106781186548,0 0)),((0 0,0 1,1 1,0 0)))', \ ' not correctly parsed' geom = ogr.CreateGeometryFromWkt('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,1 0,0 0)))') gml2 = geom.ExportToGML(['FORMAT=GML3']) expected_gml2 = '0 0 0 1 1 1 1 0 0 0' assert gml2 == expected_gml2 ############################################################################### # Test OGRMultiCurve def test_gml_OGRMultiCurve(): # MultiCurve of Arc gml = """0 0 1 1 1 -1""" geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTICURVE (CIRCULARSTRING (0 0,1 1,1 -1))', \ ' not correctly parsed' gml2 = geom.ExportToGML(['FORMAT=GML3']) assert gml2 == gml # MultiCurve of LineString and Arc gml = """ 0 0 1 1 1 -1 0 0 1 1 1 -1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTICURVE ((0 0,1 1,1 -1),CIRCULARSTRING (0 0,1 1,1 -1))', \ ' not correctly parsed' # MultiCurve of Arc and LineString gml = """ 0 0 1 1 1 -1 0 0 1 1 1 -1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTICURVE (CIRCULARSTRING (0 0,1 1,1 -1),(0 0,1 1,1 -1))', \ ' not correctly parsed' # MultiCurve of CompositeCurve gml = """ 0 0 1 1 1 -1 1 -1 1 1 1 -1 """ geom = ogr.CreateGeometryFromGML(gml) assert geom.ExportToWkt() == 'MULTICURVE (COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,1 -1),(1 -1,1 1,1 -1)))', \ ' not correctly parsed' ############################################################################### # Test write support for GML namespace declaration def test_gml_write_gml_ns(): geom = ogr.CreateGeometryFromWkt('POINT(500000 4500000)') gml = geom.ExportToGML(options=['NAMESPACE_DECL=YES']) expected_gml = '500000,4500000' assert gml == expected_gml, ('got %s, instead of %s' % (gml, expected_gml)) geom = ogr.CreateGeometryFromWkt('POINT(500000 4500000)') gml = geom.ExportToGML(options=['FORMAT=GML3', 'NAMESPACE_DECL=YES']) expected_gml = '500000 4500000' assert gml == expected_gml, ('got %s, instead of %s' % (gml, expected_gml)) geom = ogr.CreateGeometryFromWkt('POINT(500000 4500000)') gml = geom.ExportToGML(options=['FORMAT=GML32', 'GMLID=foo', 'NAMESPACE_DECL=YES']) expected_gml = '500000 4500000' assert gml == expected_gml, ('got %s, instead of %s' % (gml, expected_gml)) ############################################################################### # When imported build a list of units based on the files available. # print 'hit enter' # sys.stdin.readline() gdalautotest-3.1.2/ogr/ogr_mongodb.py0000775000175000017500000007725213701060010016334 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_mongodb.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: MongoDB driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import uuid import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test if driver is available def test_ogr_mongodb_init(): ogrtest.mongodb_drv = None ogrtest.mongodb_drv = ogr.GetDriverByName('MongoDB') if ogrtest.mongodb_drv is None: pytest.skip() if 'MONGODB_TEST_HOST' in os.environ: ogrtest.mongodb_test_host = os.environ['MONGODB_TEST_HOST'] if 'MONGODB_TEST_PORT' in os.environ: ogrtest.mongodb_test_port = os.environ['MONGODB_TEST_PORT'] else: ogrtest.mongodb_test_port = 27017 if 'MONGODB_TEST_DBNAME' in os.environ: ogrtest.mongodb_test_dbname = os.environ['MONGODB_TEST_DBNAME'] else: ogrtest.mongodb_test_dbname = 'gdalautotest' if 'MONGODB_TEST_USER' in os.environ: ogrtest.mongodb_test_user = os.environ['MONGODB_TEST_USER'] else: ogrtest.mongodb_test_user = None if 'MONGODB_TEST_PASSWORD' in os.environ: ogrtest.mongodb_test_password = os.environ['MONGODB_TEST_PASSWORD'] else: ogrtest.mongodb_test_password = None else: ogrtest.mongodb_test_host = 'ds047612.mongolab.com' ogrtest.mongodb_test_port = 47612 ogrtest.mongodb_test_dbname = 'gdalautotest' ogrtest.mongodb_test_user = 'user' ogrtest.mongodb_test_password = 'password' if ogrtest.mongodb_test_user is not None: ogrtest.mongodb_test_uri = "mongodb://%s:%s@%s:%d/%s" % (ogrtest.mongodb_test_user, ogrtest.mongodb_test_password, ogrtest.mongodb_test_host, ogrtest.mongodb_test_port, ogrtest.mongodb_test_dbname) else: ogrtest.mongodb_test_uri = "mongodb://%s:%d/%s" % (ogrtest.mongodb_test_host, ogrtest.mongodb_test_port, ogrtest.mongodb_test_dbname) ogrtest.mongodb_layer_name = None ogrtest.mongodb_layer_name_no_ogr_metadata = None ogrtest.mongodb_layer_name_guess_types = None ogrtest.mongodb_layer_name_with_2d_index = None ogrtest.mongodb_layer_name_no_spatial_index = None ds = ogr.Open(ogrtest.mongodb_test_uri) if ds is None: ogrtest.mongodb_drv = None pytest.skip('cannot open %s' % ogrtest.mongodb_test_uri) ############################################################################### # Test various open methods def test_ogr_mongodb_1(): if ogrtest.mongodb_drv is None: pytest.skip() # The below options must be used the very first time mongoDB is initialized # otherwise they will get ignored open_options = [] open_options += ['SSL_PEM_KEY_FILE=bla'] open_options += ['SSL_PEM_KEY_PASSWORD=bla'] open_options += ['SSL_CA_FILE=bla'] open_options += ['SSL_CRL_FILE=bla'] open_options += ['SSL_ALLOW_INVALID_CERTIFICATES=YES'] open_options += ['SSL_ALLOW_INVALID_HOSTNAMES=YES'] open_options += ['FIPS_MODE=YES'] gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() # Might work or not depending on how the db is set up gdal.PushErrorHandler() ds = ogr.Open("mongodb:") gdal.PopErrorHandler() # Wrong URI gdal.PushErrorHandler() ds = ogr.Open("mongodb://") gdal.PopErrorHandler() assert ds is None # URI to non existent host. gdal.PushErrorHandler() ds = ogr.Open("mongodb://non_existing") gdal.PopErrorHandler() assert ds is None # Connect to non existent host. gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=['HOST=non_existing']) gdal.PopErrorHandler() assert ds is None # All arguments split up open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] if ogrtest.mongodb_test_user is not None: open_options += ['USER=' + ogrtest.mongodb_test_user] open_options += ['PASSWORD=' + ogrtest.mongodb_test_password] ds = gdal.OpenEx('mongodb:', open_options=open_options) assert ds is not None # Without DBNAME open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] if ogrtest.mongodb_test_user is not None: open_options += ['AUTH_DBNAME=' + ogrtest.mongodb_test_dbname] open_options += ['USER=' + ogrtest.mongodb_test_user] open_options += ['PASSWORD=' + ogrtest.mongodb_test_password] gdal.PushErrorHandler() # Will succeed only against server in single mode ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() # A few error cases with authentication if ogrtest.mongodb_test_user is not None: open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] # Missing user and password gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] open_options += ['USER=' + ogrtest.mongodb_test_user] # Missing password gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['USER=' + ogrtest.mongodb_test_user] open_options += ['PASSWORD=' + ogrtest.mongodb_test_password] # Missing DBNAME gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] open_options += ['USER=' + ogrtest.mongodb_test_user] open_options += ['PASSWORD=' + ogrtest.mongodb_test_password + '_wrong'] # Wrong password gdal.PushErrorHandler() ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None # Test AUTH_JSON: invalid JSon gdal.PushErrorHandler() open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] open_options += ['AUTH_JSON={'] ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None # Test AUTH_JSON: missing mechanism gdal.PushErrorHandler() open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] open_options += ['AUTH_JSON={}'] ds = gdal.OpenEx('mongodb:', open_options=open_options) gdal.PopErrorHandler() assert ds is None # Successful AUTH_JSON use if ogrtest.mongodb_test_user is not None: open_options = [] open_options += ['HOST=' + ogrtest.mongodb_test_host] open_options += ['PORT=' + str(ogrtest.mongodb_test_port)] open_options += ['DBNAME=' + ogrtest.mongodb_test_dbname] open_options += ['AUTH_JSON={ "mechanism" : "SCRAM-SHA-1", "db": "%s", "user": "%s", "pwd": "%s" }' % (ogrtest.mongodb_test_dbname, ogrtest.mongodb_test_user, ogrtest.mongodb_test_password)] ds = gdal.OpenEx('mongodb:', open_options=open_options) assert ds is not None ############################################################################### # Basic tests def test_ogr_mongodb_2(): if ogrtest.mongodb_drv is None: pytest.skip() ogrtest.mongodb_ds = ogr.Open(ogrtest.mongodb_test_uri, update=1) assert ogrtest.mongodb_ds.GetLayerByName('not_existing') is None assert ogrtest.mongodb_ds.TestCapability(ogr.ODsCCreateLayer) == 1 assert ogrtest.mongodb_ds.TestCapability(ogr.ODsCDeleteLayer) == 1 assert ogrtest.mongodb_ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) == 1 # Create layer a_uuid = str(uuid.uuid1()).replace('-', '_') ogrtest.mongodb_layer_name = 'test_' + a_uuid srs = osr.SpatialReference() srs.ImportFromEPSG(4258) # ETRS 89 will reproject identically to EPSG:4326 lyr = ogrtest.mongodb_ds.CreateLayer(ogrtest.mongodb_layer_name, geom_type=ogr.wkbPolygon, srs=srs, options=['GEOMETRY_NAME=location.mygeom', 'FID=']) gdal.PushErrorHandler() ret = lyr.CreateGeomField(ogr.GeomFieldDefn('location.mygeom', ogr.wkbPoint)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) assert ret == 0 gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 lyr.CreateField(ogr.FieldDefn('location.name', ogr.OFTString)) bool_field = ogr.FieldDefn('bool', ogr.OFTInteger) bool_field.SetSubType(ogr.OFSTBoolean) lyr.CreateField(bool_field) lyr.CreateField(ogr.FieldDefn('int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('real', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('dt', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('embed.str', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('binary', ogr.OFTBinary)) lyr.CreateField(ogr.FieldDefn('strlist', ogr.OFTStringList)) lyr.CreateField(ogr.FieldDefn('intlist', ogr.OFTIntegerList)) lyr.CreateField(ogr.FieldDefn('int64list', ogr.OFTInteger64List)) lyr.CreateField(ogr.FieldDefn('realist', ogr.OFTRealList)) lyr.CreateField(ogr.FieldDefn('embed.embed2.int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('embed.embed2.real', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('str_is_null', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('str_is_unset', ogr.OFTString)) # Test CreateFeature() f = ogr.Feature(lyr.GetLayerDefn()) f['str'] = 'str' f['location.name'] = 'Paris' f['bool'] = 1 f['int'] = 1 f['int64'] = 1234567890123456 # put a number larger than 1 << 40 so that fromjson() doesn't pick double f['real'] = 1.23 f['dt'] = '1234/12/31 23:59:59.123+00' f.SetFieldBinaryFromHexString('binary', '00FF') f['strlist'] = ['a', 'b'] f['intlist'] = [1, 2] f['int64list'] = [1234567890123456, 1234567890123456] f['realist'] = [1.23, 4.56] f['embed.str'] = 'foo' f['embed.embed2.int'] = 3 f['embed.embed2.real'] = 3.45 f.SetFieldNull('str_is_null') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((2 49,2 50,3 50,3 49,2 49))')) assert lyr.CreateFeature(f) == 0 assert f['_id'] is not None f_ref = f.Clone() # Test GetFeatureCount() assert lyr.GetFeatureCount() == 1 # Test GetNextFeature() lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # Test GetFeature() f = lyr.GetFeature(1) if not f.Equal(f_ref): f.DumpReadable() pytest.fail() # Test SetFeature() f['bool'] = 0 assert lyr.SetFeature(f) == 0 f_ref = f.Clone() f = lyr.GetFeature(1) if f['bool'] != 0: f.DumpReadable() pytest.fail() # Test (not working) DeleteFeature() gdal.PushErrorHandler() ret = lyr.DeleteFeature(1) gdal.PopErrorHandler() assert ret != 0 # Test Mongo filter lyr.SetAttributeFilter('{ "int": 1 }') lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() lyr.SetAttributeFilter('{ "int": 2 }') lyr.ResetReading() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # Test OGR filter lyr.SetAttributeFilter('int = 1') lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() lyr.SetAttributeFilter('int = 2') lyr.ResetReading() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # Test geometry filter lyr.SetAttributeFilter(None) lyr.SetSpatialFilterRect(2.1, 49.1, 2.9, 49.9) lyr.ResetReading() f = lyr.GetNextFeature() if not f.Equal(f_ref): f.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(1.1, 49.1, 1.9, 49.9) lyr.ResetReading() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() f = f_ref.Clone() f.SetFID(-1) f.SetGeometryDirectly(None) assert lyr.CreateFeature(f) == 0 # Duplicate key gdal.PushErrorHandler() ret = lyr.SyncToDisk() gdal.PopErrorHandler() assert ret != 0 f['_id'] = None lyr.CreateFeature(f) ret = lyr.SyncToDisk() assert ret == 0 # Missing _id f.UnsetField('_id') gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0 # MongoDB dialect of ExecuteSQL() with invalid JSON gdal.PushErrorHandler() sql_lyr = ogrtest.mongodb_ds.ExecuteSQL('{', dialect='MongoDB') gdal.PopErrorHandler() # MongoDB dialect of ExecuteSQL() with nonexistent command. sql_lyr = ogrtest.mongodb_ds.ExecuteSQL('{ "foo": 1 }', dialect='MongoDB') assert sql_lyr is not None ogrtest.mongodb_ds.ReleaseResultSet(sql_lyr) # MongoDB dialect of ExecuteSQL() with existing commnand sql_lyr = ogrtest.mongodb_ds.ExecuteSQL('{ "listCommands" : 1 }', dialect='MongoDB') assert sql_lyr is not None f = sql_lyr.GetNextFeature() assert f is not None f = sql_lyr.GetNextFeature() assert f is None sql_lyr.GetLayerDefn() sql_lyr.ResetReading() sql_lyr.TestCapability('') ogrtest.mongodb_ds.ReleaseResultSet(sql_lyr) # Regular ExecuteSQL() sql_lyr = ogrtest.mongodb_ds.ExecuteSQL('SELECT * FROM ' + ogrtest.mongodb_layer_name) assert sql_lyr is not None ogrtest.mongodb_ds.ReleaseResultSet(sql_lyr) # Test CreateLayer again with same name gdal.PushErrorHandler() lyr = ogrtest.mongodb_ds.CreateLayer(ogrtest.mongodb_layer_name) gdal.PopErrorHandler() assert lyr is None ogrtest.mongodb_ds = gdal.OpenEx(ogrtest.mongodb_test_uri, gdal.OF_UPDATE, open_options=['FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=-1', 'BULK_INSERT=NO', 'JSON_FIELD=TRUE']) # Check after reopening lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_layer_name) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) != 0 f = lyr.GetNextFeature() json_field = f['_json'] # We cannot use feature.Equal() has the C++ layer defn has changed for i in range(f_ref.GetDefnRef().GetFieldCount()): if f.GetField(i) != f_ref.GetField(i) or \ f.GetFieldDefnRef(i).GetType() != f_ref.GetFieldDefnRef(i).GetType() or \ f.GetFieldDefnRef(i).GetSubType() != f_ref.GetFieldDefnRef(i).GetSubType(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() for i in range(f_ref.GetDefnRef().GetGeomFieldCount()): if not f.GetGeomFieldRef(i).Equals(f_ref.GetGeomFieldRef(i)) or \ f.GetGeomFieldDefnRef(i).GetName() != f_ref.GetGeomFieldDefnRef(i).GetName() or \ f.GetGeomFieldDefnRef(i).GetType() != f_ref.GetGeomFieldDefnRef(i).GetType(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(2.1, 49.1, 2.9, 49.9) lyr.ResetReading() if f is None: f.DumpReadable() pytest.fail() # Create a feature only from its _json content and do not store any ogr metadata related to the layer ogrtest.mongodb_layer_name_no_ogr_metadata = ogrtest.mongodb_layer_name + "_no_ogr_metadata" lyr = ogrtest.mongodb_ds.CreateLayer(ogrtest.mongodb_layer_name_no_ogr_metadata, options=['GEOMETRY_NAME=location.mygeom', 'FID=', 'WRITE_OGR_METADATA=NO']) f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = json_field assert lyr.CreateFeature(f) == 0 ogrtest.mongodb_layer_name_guess_types = ogrtest.mongodb_layer_name + "_guess_types" lyr = ogrtest.mongodb_ds.CreateLayer(ogrtest.mongodb_layer_name_guess_types, geom_type=ogr.wkbNone, options=['FID=', 'WRITE_OGR_METADATA=NO']) f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int": 2, ' f['_json'] += '"int64": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"real": 2.34, ' f['_json'] += '"intlist" : [2], ' f['_json'] += '"reallist" : [2.34], ' f['_json'] += '"int64list" : [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"int_str" : 2, ' f['_json'] += '"str_int" : "2", ' f['_json'] += '"int64_str" : { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"str_int64" : "2", ' f['_json'] += '"int_int64": 2, ' f['_json'] += '"int64_int": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"int_real": 2, ' f['_json'] += '"real_int": 3.45, ' f['_json'] += '"int64_real": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"real_int64": 3.45, ' f['_json'] += '"real_str": 3.45, ' f['_json'] += '"str_real": "3.45", ' f['_json'] += '"int_bool" : 2, ' f['_json'] += '"bool_int" : true, ' f['_json'] += '"intlist_strlist" : [2], ' f['_json'] += '"strlist_intlist" : ["2"], ' f['_json'] += '"intlist_int64list": [2], ' f['_json'] += '"int64list_intlist": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"intlist_reallist": [2], ' f['_json'] += '"reallist_intlist": [3.45], ' f['_json'] += '"int64list_reallist": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"reallist_int64list": [3.45], ' f['_json'] += '"intlist_boollist" : [2], ' f['_json'] += '"boollist_intlist" : [true], ' f['_json'] += '"mixedlist": [true,1,{ "$numberLong" : "1234567890123456" },3.45],' f['_json'] += '"mixedlist2": [true,1,{ "$numberLong" : "1234567890123456" },3.45,"str"]' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int_str" : "3", ' f['_json'] += '"str_int" : 3, ' f['_json'] += '"int64_str" : "2", ' f['_json'] += '"str_int64" : { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"int_int64": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"int64_int": 2, ' f['_json'] += '"int_real" : 3.45, ' f['_json'] += '"real_int": 2, ' f['_json'] += '"int64_real": 3.45, ' f['_json'] += '"real_int64": { "$numberLong" : "1234567890123456" }, ' f['_json'] += '"real_str": "3.45", ' f['_json'] += '"str_real": 3.45, ' f['_json'] += '"int_bool" : true, ' f['_json'] += '"bool_int" : 2, ' f['_json'] += '"intlist_strlist" : ["3"], ' f['_json'] += '"strlist_intlist" : [3], ' f['_json'] += '"intlist_int64list": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"int64list_intlist": [2], ' f['_json'] += '"intlist_reallist": [3.45], ' f['_json'] += '"reallist_intlist": [2], ' f['_json'] += '"int64list_reallist": [3.45], ' f['_json'] += '"reallist_int64list": [{ "$numberLong" : "1234567890123456" }], ' f['_json'] += '"intlist_boollist" : [true], ' f['_json'] += '"boollist_intlist" : [2]' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 # This new features will not be taken into account by below the FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=2 f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int": { "$minKey": 1 }, ' f['_json'] += '"int64": { "$minKey": 1 }, ' f['_json'] += '"real": { "$minKey": 1 }, ' f['_json'] += '"intlist" : [1, "1", { "$minKey": 1 },{ "$maxKey": 1 },{ "$numberLong" : "-1234567890123456" }, { "$numberLong" : "1234567890123456" }, -1234567890123456.1, 1234567890123456.1, { "$numberLong" : "1" }, 1.23 ], ' f['_json'] += '"int64list" : [1, { "$numberLong" : "1234567890123456" }, "1", { "$minKey": 1 },{ "$maxKey": 1 }, -1e300, 1e300, 1.23 ], ' f['_json'] += '"reallist" : [1, { "$numberLong" : "1234567890123456" }, 1.0, "1", { "$minKey": 1 },{ "$maxKey": 1 }, { "$numberLong" : "1234567890123456" } ] ' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 f = ogr.Feature(lyr.GetLayerDefn()) f['_json'] = '{' f['_json'] += '"int": { "$maxKey": 1 }, ' f['_json'] += '"int64": { "$maxKey": 1 }, ' f['_json'] += '"real": { "$maxKey": 1 } ' f['_json'] += '}' assert lyr.CreateFeature(f) == 0 ogrtest.mongodb_layer_name_with_2d_index = ogrtest.mongodb_layer_name + "_with_2d_index" gdal.SetConfigOption('OGR_MONGODB_SPAT_INDEX_TYPE', '2d') lyr = ogrtest.mongodb_ds.CreateLayer(ogrtest.mongodb_layer_name_with_2d_index, geom_type=ogr.wkbPoint, options=['FID=', 'WRITE_OGR_METADATA=NO']) gdal.SetConfigOption('OGR_MONGODB_SPAT_INDEX_TYPE', None) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(2 49)')) assert lyr.CreateFeature(f) == 0 ogrtest.mongodb_layer_name_no_spatial_index = ogrtest.mongodb_layer_name + "_no_spatial_index" for i in range(2): lyr = ogrtest.mongodb_ds.CreateLayer(ogrtest.mongodb_layer_name_no_spatial_index, options=['SPATIAL_INDEX=NO', 'OVERWRITE=YES']) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(2 49)')) assert lyr.CreateFeature(f) == 0 ogrtest.mongodb_ds.ExecuteSQL('WRITE_OGR_METADATA ' + ogrtest.mongodb_layer_name_no_spatial_index) # Open "ghost" layer lyr = ogrtest.mongodb_ds.GetLayerByName('_ogr_metadata') assert lyr is not None lyr.SetAttributeFilter("layer LIKE '%s%%'" % ogrtest.mongodb_layer_name) assert lyr.GetFeatureCount() == 2 assert ogrtest.mongodb_ds.DeleteLayer(-1) != 0 lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_test_dbname + '.' + '_ogr_metadata') assert lyr is not None ogrtest.mongodb_ds = None # Reopen in read-only ogrtest.mongodb_ds = gdal.OpenEx(ogrtest.mongodb_test_uri, 0, open_options=['FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=2', 'JSON_FIELD=TRUE']) lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_layer_name_no_ogr_metadata) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 f = lyr.GetNextFeature() for i in range(f_ref.GetDefnRef().GetFieldCount()): if f_ref.GetFieldDefnRef(i).GetNameRef() == "str_is_null": continue if f_ref.GetFieldDefnRef(i).GetNameRef() == "str_is_unset": continue # Order might be a bit different... j = f.GetDefnRef().GetFieldIndex(f_ref.GetFieldDefnRef(i).GetNameRef()) if f.GetField(j) != f_ref.GetField(i) or \ f.GetFieldDefnRef(j).GetType() != f_ref.GetFieldDefnRef(i).GetType() or \ f.GetFieldDefnRef(j).GetSubType() != f_ref.GetFieldDefnRef(i).GetSubType(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() for i in range(f_ref.GetDefnRef().GetGeomFieldCount()): # Order might be a bit different... j = f.GetDefnRef().GetGeomFieldIndex(f_ref.GetGeomFieldDefnRef(i).GetNameRef()) if not f.GetGeomFieldRef(j).Equals(f_ref.GetGeomFieldRef(i)) or \ f.GetGeomFieldDefnRef(j).GetName() != f_ref.GetGeomFieldDefnRef(i).GetName() or \ f.GetGeomFieldDefnRef(j).GetType() != f_ref.GetGeomFieldDefnRef(i).GetType(): f.DumpReadable() f_ref.DumpReadable() print(f_ref.GetGeomFieldDefnRef(i).GetType()) pytest.fail(f.GetGeomFieldDefnRef(j).GetType()) lyr.SetSpatialFilterRect(2.1, 49.1, 2.9, 49.9) lyr.ResetReading() if f is None: f.DumpReadable() pytest.fail() lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_layer_name_guess_types) expected_fields = [ ("int", ogr.OFTInteger), ("int64", ogr.OFTInteger64), ("real", ogr.OFTReal), ("intlist", ogr.OFTIntegerList), ("reallist", ogr.OFTRealList), ("int64list", ogr.OFTInteger64List), ("int_str", ogr.OFTString), ("str_int", ogr.OFTString), ("int64_str", ogr.OFTString), ("str_int64", ogr.OFTString), ("int_int64", ogr.OFTInteger64), ("int64_int", ogr.OFTInteger64), ("int_real", ogr.OFTReal), ("real_int", ogr.OFTReal), ("int64_real", ogr.OFTReal), ("real_int64", ogr.OFTReal), ("real_str", ogr.OFTString), ("str_real", ogr.OFTString), ("int_bool", ogr.OFTInteger), ("bool_int", ogr.OFTInteger), ("intlist_strlist", ogr.OFTStringList), ("strlist_intlist", ogr.OFTStringList), ("intlist_int64list", ogr.OFTInteger64List), ("int64list_intlist", ogr.OFTInteger64List), ("intlist_reallist", ogr.OFTRealList), ("reallist_intlist", ogr.OFTRealList), ("int64list_reallist", ogr.OFTRealList), ("reallist_int64list", ogr.OFTRealList), ("intlist_boollist", ogr.OFTIntegerList), ("boollist_intlist", ogr.OFTIntegerList), ("mixedlist", ogr.OFTRealList), ("mixedlist2", ogr.OFTStringList)] for (fieldname, fieldtype) in expected_fields: fld_defn = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex(fieldname)) assert fld_defn.GetType() == fieldtype, fieldname assert fld_defn.GetSubType() == ogr.OFSTNone f = lyr.GetNextFeature() f = lyr.GetNextFeature() f = lyr.GetNextFeature() if f['intlist'] != [1, 1, -2147483648, 2147483647, -2147483648, 2147483647, -2147483648, 2147483647, 1, 1] or \ f['int64list'] != [1, 1234567890123456, 1, -9223372036854775808, 9223372036854775807, -9223372036854775808, 9223372036854775807, 1] or \ f['int'] != -2147483648 or f['int64'] != -9223372036854775808 or f['real'] - 1 != f['real']: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['int'] != 2147483647 or f['int64'] != 9223372036854775807 or f['real'] + 1 != f['real']: f.DumpReadable() pytest.fail() lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_layer_name_with_2d_index) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) != 0 lyr.SetSpatialFilterRect(1.9, 48.9, 2.1, 49.1) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None lyr.SetSpatialFilterRect(1.9, 48.9, 1.95, 48.95) lyr.ResetReading() f = lyr.GetNextFeature() assert f is None lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_layer_name_no_spatial_index) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 lyr.SetSpatialFilterRect(1.9, 48.9, 2.1, 49.1) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None gdal.PushErrorHandler() lyr = ogrtest.mongodb_ds.CreateLayer('foo') gdal.PopErrorHandler() assert lyr is None gdal.ErrorReset() gdal.PushErrorHandler() ogrtest.mongodb_ds.ExecuteSQL('WRITE_OGR_METADATA ' + ogrtest.mongodb_layer_name) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' lyr_count_before = ogrtest.mongodb_ds.GetLayerCount() gdal.PushErrorHandler() ogrtest.mongodb_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodb_layer_name) gdal.PopErrorHandler() assert ogrtest.mongodb_ds.GetLayerCount() == lyr_count_before lyr = ogrtest.mongodb_ds.GetLayerByName(ogrtest.mongodb_layer_name) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.CreateGeomField(ogr.GeomFieldDefn('foo', ogr.wkbPoint)) gdal.PopErrorHandler() assert ret != 0 f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.DeleteFeature(1) gdal.PopErrorHandler() assert ret != 0 ############################################################################### # test_ogrsf def test_ogr_mongodb_3(): if ogrtest.mongodb_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro ' + ogrtest.mongodb_test_uri) assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Cleanup def test_ogr_mongodb_cleanup(): if ogrtest.mongodb_drv is None: pytest.skip() ogrtest.mongodb_ds = None # Reopen in read-write ogrtest.mongodb_ds = ogr.Open(ogrtest.mongodb_test_uri, update=1) if ogrtest.mongodb_layer_name is not None: ogrtest.mongodb_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodb_layer_name) if ogrtest.mongodb_layer_name_no_ogr_metadata is not None: ogrtest.mongodb_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodb_layer_name_no_ogr_metadata) if ogrtest.mongodb_layer_name_guess_types is not None: ogrtest.mongodb_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodb_layer_name_guess_types) if ogrtest.mongodb_layer_name_with_2d_index is not None: ogrtest.mongodb_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodb_layer_name_with_2d_index) if ogrtest.mongodb_layer_name_no_spatial_index is not None: ogrtest.mongodb_ds.ExecuteSQL('DELLAYER:' + ogrtest.mongodb_layer_name_no_spatial_index) ogrtest.mongodb_ds = None gdalautotest-3.1.2/ogr/ogr_ingres.py0000775000175000017500000002235413701060010016167 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_ingres.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR Ingres driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr import pytest ############################################################################### # Open INGRES test datasource. def test_ogr_ingres_1(): gdaltest.ingres_ds = None drv = ogr.GetDriverByName('Ingres') if drv is None: pytest.skip() gdaltest.ingres_ds = ogr.Open('@driver=ingres,dbname=test', update=1) if gdaltest.ingres_ds is None: pytest.skip() ############################################################################### # Create table from data/poly.shp def test_ogr_ingres_2(): if gdaltest.ingres_ds is None: pytest.skip() ####################################################### # Create Layer gdaltest.ingres_lyr = gdaltest.ingres_ds.CreateLayer( 'tpoly', geom_type=ogr.wkbPolygon, options=['OVERWRITE=YES']) ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.ingres_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.ingres_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.ingres_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_ingres_3(): if gdaltest.ingres_ds is None: pytest.skip() expect = [168, 169, 166, 158, 165] gdaltest.ingres_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.ingres_lyr, 'eas_id', expect) gdaltest.ingres_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.ingres_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.000000001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) gdaltest.poly_feat = None gdaltest.shp_ds.Destroy() # This is to force cleanup of the transaction. We need a way of # automating this in the driver. read_feat = gdaltest.ingres_lyr.GetNextFeature() assert tr ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_ingres_4(): if gdaltest.ingres_ds is None: pytest.skip() expect = [179, 173, 172, 171, 170, 169, 168, 166, 165, 158] sql_lyr = gdaltest.ingres_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.ingres_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. # # Unfortunately, for now an executesql result that includes new geometries # fails to ever get any result records as executed by ogringresstatement.cpp, # so we disable this test. def test_ogr_ingres_5(): if gdaltest.ingres_ds is None: pytest.skip() pytest.skip() # pylint: disable=unreachable sql_lyr = gdaltest.ingres_ds.ExecuteSQL( "select * from tpoly where prfedea = '35043413'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['35043413']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0))') != 0: tr = 0 feat_read.Destroy() gdaltest.ingres_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_ingres_6(): if gdaltest.ingres_ds is None: pytest.skip() gdaltest.ingres_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.ingres_lyr.SetSpatialFilter(geom) geom.Destroy() tr = ogrtest.check_features_against_list(gdaltest.ingres_lyr, 'eas_id', [158]) gdaltest.ingres_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Test adding a new field. def test_ogr_ingres_7(): if gdaltest.ingres_ds is None: pytest.skip() #################################################################### # Add new string field. field_defn = ogr.FieldDefn('new_string', ogr.OFTString) result = gdaltest.ingres_lyr.CreateField(field_defn) field_defn.Destroy() assert result == 0, 'CreateField failed!' #################################################################### # Apply a value to this field in one feature. gdaltest.ingres_lyr.SetAttributeFilter("prfedea = '35043423'") feat_read = gdaltest.ingres_lyr.GetNextFeature() assert feat_read is not None, 'failed to read target feature!' gdaltest.ingres_fid = feat_read.GetFID() feat_read.SetField('new_string', 'test1') gdaltest.ingres_lyr.SetFeature(feat_read) feat_read.Destroy() #################################################################### # Now fetch two features and verify the new column works OK. gdaltest.ingres_lyr.SetAttributeFilter( "PRFEDEA IN ( '35043423', '35043414' )") tr = ogrtest.check_features_against_list(gdaltest.ingres_lyr, 'new_string', [None, 'test1']) gdaltest.ingres_lyr.SetAttributeFilter(None) assert tr ############################################################################### # Test deleting a feature. def test_ogr_ingres_8(): if gdaltest.ingres_ds is None: pytest.skip() assert gdaltest.ingres_lyr.TestCapability('DeleteFeature'), \ 'DeleteFeature capability test failed.' old_count = gdaltest.ingres_lyr.GetFeatureCount() #################################################################### # Delete target feature. target_fid = gdaltest.ingres_fid assert gdaltest.ingres_lyr.DeleteFeature(target_fid) == 0, \ 'DeleteFeature returned error code.' #################################################################### # Verify that count has dropped by one, and that the feature in question # can't be fetched. new_count = gdaltest.ingres_lyr.GetFeatureCount() if new_count != old_count - 1: gdaltest.post_reason('got feature count of %d, not expected %d.' % (new_count, old_count - 1)) assert gdaltest.ingres_lyr.GetFeature(target_fid) is None, 'Got deleted feature!' ############################################################################### # def test_ogr_ingres_cleanup(): if gdaltest.ingres_ds is None: pytest.skip() gdaltest.ingres_ds.Destroy() gdaltest.ingres_ds = None gdalautotest-3.1.2/ogr/ogr_oapif.py0000775000175000017500000011461713701060010016002 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_oapif.py 628fe6b565be58bc304d7565a86bcdeef41eb37e 2019-11-07 13:10:17 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: OAPIF driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2018, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import ogr import webserver import pytest ############################################################################### # Init # def test_ogr_opaif_init(): gdaltest.opaif_drv = ogr.GetDriverByName('OAPIF') if gdaltest.opaif_drv is None: pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = \ webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() ############################################################################### def test_ogr_opaif_errors(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None # No Content-Type handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {}, 'foo') with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None # Unexpected Content-Type handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'text/html'}, 'foo') with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None # Invalid JSON handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, 'foo bar') with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None # Valid JSON but not collections array handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, '{}') with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None # Valid JSON but collections is not an array handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, '{ "collections" : null }') with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, '{ "collections" : [ null, {} ] }') with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is None ############################################################################### def test_ogr_opaif_collections_paging(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "id": "foo" } ], "links": [ { "rel": "next", "href": "http://localhost:%d/oapif/collections?next=my_mark", "type": "application/json" } ]}""" % gdaltest.webserver_port) handler.add('GET', '/oapif/collections?next=my_mark', 200, {'Content-Type': 'application/json'}, '{ "collections" : [ { "id": "bar" } ]}') with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) assert ds is not None assert ds.GetLayerCount() == 2 assert ds.GetLayer(0).GetName() == 'foo' assert ds.GetLayer(1).GetName() == 'bar' ############################################################################### def test_ogr_opaif_empty_layer_and_user_query_parameters(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections?FOO=BAR', 200, {'Content-Type': 'application/json'}, '{ "collections" : [ { "name": "foo" }] }') with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif?FOO=BAR' % gdaltest.webserver_port) assert ds is not None assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) assert lyr.GetName() == 'foo' handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&FOO=BAR', 200, {'Content-Type': 'application/geo+json'}, '{ "type": "FeatureCollection", "features": [] }') with webserver.install_http_handler(handler): assert lyr.GetLayerDefn().GetFieldCount() == 0 ############################################################################### def test_ogr_opaif_open_by_collection_and_legacy_wfs3_prefix(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo', 200, {'Content-Type': 'application/json'}, '{ "id": "foo" }') with webserver.install_http_handler(handler): ds = ogr.Open('WFS3:http://localhost:%d/oapif/collections/foo' % gdaltest.webserver_port) assert ds is not None assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) assert lyr.GetName() == 'foo' handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, '{ "type": "FeatureCollection", "features": [] }') with webserver.install_http_handler(handler): assert lyr.GetLayerDefn().GetFieldCount() == 0 ############################################################################### def test_ogr_opaif_fc_links_next_geojson(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, '{ "collections" : [ { "name": "foo" }] }') with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar" } } ] }""") with webserver.install_http_handler(handler): assert lyr.GetLayerDefn().GetFieldCount() == 1 handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "links" : [ { "rel": "next", "type": "application/geo+json", "href": "http://localhost:%d/oapif/foo_next" } ], "features": [ { "type": "Feature", "properties": { "foo": "bar" } } ] }""" % gdaltest.webserver_port) with webserver.install_http_handler(handler): f = lyr.GetNextFeature() if f['foo'] != 'bar': f.DumpReadable() pytest.fail() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/foo_next', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "baz" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() if f['foo'] != 'baz': f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_opaif_id_is_integer(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, '{ "collections" : [ { "name": "foo" }] }') with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "id": 100, "type": "Feature", "properties": { "foo": "bar" } } ] }""") with webserver.install_http_handler(handler): assert lyr.GetLayerDefn().GetFieldCount() == 1 handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "id": 100, "type": "Feature", "properties": { "foo": "bar" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f.GetFID() == 100 handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items/100', 200, {'Content-Type': 'application/geo+json'}, """{ "id": 100, "type": "Feature", "properties": { "foo": "bar" } }""") with webserver.install_http_handler(handler): f = lyr.GetFeature(100) assert f ############################################################################### def NO_LONGER_USED_test_ogr_opaif_fc_links_next_headers(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, '{ "collections" : [ { "name": "foo" }] }') with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar" } } ] }""") with webserver.install_http_handler(handler): assert lyr.GetLayerDefn().GetFieldCount() == 1 handler = webserver.SequentialHandler() link_val = '; rel="self"; type="application/geo+json"\r\nLink: ; rel="next"; type="application/geo+json"' % gdaltest.webserver_port handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json', 'Link': link_val}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() if f['foo'] != 'bar': f.DumpReadable() pytest.fail() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/foo_next', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "baz" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() if f['foo'] != 'baz': f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_opaif_spatial_filter(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # Deprecated API handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "name": "foo", "extent": { "spatial": [ -10, 40, 15, 50 ] } }] }""") with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCFastGetExtent) assert lyr.GetExtent() == (-10.0, 15.0, 40.0, 50.0) # Nominal API handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "id": "foo", "extent": { "spatial": { "bbox": [ [ -10, 40, -100, 15, 50, 100 ] ] } } }] }""") with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) assert lyr.GetExtent() == (-10.0, 15.0, 40.0, 50.0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar" } } ] }""") with webserver.install_http_handler(handler): assert lyr.GetLayerDefn().GetFieldCount() == 1 lyr.SetSpatialFilterRect(2, 49, 3, 50) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&bbox=2,49,3,50', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar", }, "geometry": { "type": "Point", "coordinates": [ 2.5, 49.5 ] } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None # Test clamping of bounds lyr.SetSpatialFilterRect(-200, 49, 200, 50) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&bbox=-180,49,180,50', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar", }, "geometry": { "type": "Point", "coordinates": [ 2.5, 49.5 ] } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None lyr.SetSpatialFilterRect(2, -100, 3, 100) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&bbox=2,-90,3,90', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar", }, "geometry": { "type": "Point", "coordinates": [ 2.5, 49.5 ] } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None lyr.SetSpatialFilterRect(-200, -100, 200, 100) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar", }, "geometry": { "type": "Point", "coordinates": [ 2.5, 49.5 ] } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None lyr.SetSpatialFilter(None) lyr.ResetReading() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "foo": "bar", } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_opaif_get_feature_count(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "id": "foo" }] }""") with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/json'}, '{}') handler.add('GET', '/oapif', 200, {'Content-Type': 'application/json'}, """{ "links" : [ { "rel": "service-desc", "href" : "http://localhost:%d/oapif/my_api", "type": "application/vnd.oai.openapi+json;version=3.0" } ] }""" % gdaltest.webserver_port ) # Fake openapi response handler.add('GET', '/oapif/my_api', 200, {'Content-Type': 'application/vnd.oai.openapi+json; charset=utf-8; version=3.0'}, """{ "openapi": "3.0.0", "paths" : { "/collections/foo/items": { "get": { "parameters": [ { "$ref" : "#/components/parameters/resultType" } ] } } }, "components": { "parameters": { "resultType": { "name": "resultType", "in": "query", "schema" : { "type" : "string", "enum" : [ "hits", "results" ] } } } } }""") handler.add('GET', '/oapif/collections/foo/items?resultType=hits', 200, {'Content-Type': 'application/json'}, '{ "numberMatched": 1234 }') with webserver.install_http_handler(handler): assert lyr.GetFeatureCount() == 1234 handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?resultType=hits', 200, {'Content-Type': 'application/json'}, '{ "numberMatched": 1234 }') with webserver.install_http_handler(handler): assert lyr.GetFeatureCount() == 1234 ############################################################################### def test_ogr_opaif_get_feature_count_from_numberMatched(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "id": "foo" }] }""") with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, '{ "type": "FeatureCollection", "features": [], "numberMatched": 1234 }') with webserver.install_http_handler(handler): assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0 # Cannot know yet assert lyr.GetFeatureCount() == 1234 assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 ############################################################################### def test_ogr_opaif_attribute_filter(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "name": "foo" }] }""") with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) lyr.SetAttributeFilter(None) # should not cause network request handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "id": "my_id", "type": "Feature", "properties": { "attr1": "", "attr2": 0, "attr3": "", "mydatetime": "2019-10-01T12:34:56Z" } } ] }""") # Fake openapi response handler.add('GET', '/oapif', 200, {'Content-Type': 'application/json'}, """{ "links" : [ { "rel": "service-desc", "href" : "http://localhost:%d/oapif/my_api", "type": "application/vnd.oai.openapi+json;version=3.0" } ] }""" % gdaltest.webserver_port ) handler.add('GET', '/oapif/my_api', 200, {'Content-Type': 'application/json'}, """{ "openapi": "3.0.0", "paths" : { "/collections/foo/items": { "get": { "parameters": [ { "name": "attr1", "in": "query" }, { "name": "attr2", "in": "query" } ] } } } }""") with webserver.install_http_handler(handler): lyr.SetAttributeFilter("(attr1 = 'foo' AND attr2 = 2) AND attr3 = 'bar'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&attr1=foo&attr2=2', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "attr1": "foo", "attr2": 2, "attr3": "foo" } }, { "type": "Feature", "properties": { "attr1": "foo", "attr2": 2, "attr3": "bar" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None lyr.ResetReading() lyr.SetAttributeFilter("attr1 = 'foo' OR attr3 = 'bar'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "attr1": "foo", "attr3": "foo" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None # Date = lyr.ResetReading() lyr.SetAttributeFilter("mydatetime = '2019-10-01T12:34:56Z'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&datetime=2019-10-01T12:34:56Z', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "mydatetime": "2019-10-01T12:34:56Z" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None # Date >= lyr.ResetReading() lyr.SetAttributeFilter("mydatetime >= '2019-10-01T12:34:56Z'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&datetime=2019-10-01T12:34:56Z%2F..', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "mydatetime": "2019-10-01T12:34:56Z" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None # Date <= lyr.ResetReading() lyr.SetAttributeFilter("mydatetime <= '2019-10-01T12:34:56Z'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&datetime=..%2F2019-10-01T12:34:56Z', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "mydatetime": "2019-10-01T12:34:56Z" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None # Date >= and <= lyr.ResetReading() lyr.SetAttributeFilter("mydatetime BETWEEN '2019-10-01T' AND '2019-10-02T'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10&datetime=2019-10-01T%2F2019-10-02T', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "mydatetime": "2019-10-01T12:34:56Z" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None # id lyr.ResetReading() lyr.SetAttributeFilter("id = 'my_id'") handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items/my_id', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "Feature", "id": "my_id", "properties": { } }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None lyr.ResetReading() lyr.SetAttributeFilter(None) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "attr1": "foo", "attr3": "foo" } } ] }""") with webserver.install_http_handler(handler): f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_opaif_schema_from_xml_schema(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "name": "foo", "links": [ { "rel": "describedBy", "type": "application/xml", "href": "http://localhost:%d/oapif/collections/foo/xmlschema" } ] } ] }""" % gdaltest.webserver_port) with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/xmlschema', 200, {'Content-Type': 'application/xml'}, """ """) handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, '{ "type": "FeatureCollection", "features": [], "numberMatched": 1234 }') with webserver.install_http_handler(handler): feat_defn = lyr.GetLayerDefn() assert feat_defn.GetGeomType() == ogr.wkbPolygon assert feat_defn.GetFieldCount() == 1 assert feat_defn.GetFieldDefn(0).GetName() == 'some_int' ############################################################################### def test_ogr_opaif_schema_from_json_schema(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections', 200, {'Content-Type': 'application/json'}, """{ "collections" : [ { "name": "foo", "links": [ { "rel": "describedBy", "type": "application/schema+json", "href": "http://localhost:%d/oapif/collections/foo/jsonschema" } ] } ] }""" % gdaltest.webserver_port) with webserver.install_http_handler(handler): ds = ogr.Open('OAPIF:http://localhost:%d/oapif' % gdaltest.webserver_port) lyr = ds.GetLayer(0) handler = webserver.SequentialHandler() handler.add('GET', '/oapif/collections/foo/jsonschema', 200, {'Content-Type': 'application/schema+json'}, open('data/oapif_json_schema_eo.jsonschema', 'rt').read()) handler.add('GET', '/oapif/collections/foo/items?limit=10', 200, {'Content-Type': 'application/geo+json'}, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "unexpected": 123 } } ] }""") with webserver.install_http_handler(handler): feat_defn = lyr.GetLayerDefn() assert feat_defn.GetGeomType() == ogr.wkbUnknown assert feat_defn.GetFieldCount() == 19 idx = feat_defn.GetFieldIndex("type") assert idx >= 0 assert feat_defn.GetFieldDefn(idx).GetType() == ogr.OFTString idx = feat_defn.GetFieldIndex("updated") assert idx >= 0 assert feat_defn.GetFieldDefn(idx).GetType() == ogr.OFTDateTime idx = feat_defn.GetFieldIndex("unexpected") assert idx >= 0 assert feat_defn.GetFieldDefn(idx).GetType() == ogr.OFTInteger ############################################################################### def test_ogr_opaif_cleanup(): if gdaltest.opaif_drv is None: pytest.skip() if gdaltest.webserver_port != 0: webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) gdalautotest-3.1.2/ogr/ogr_eeda.py0000775000175000017500000004014213701060010015571 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_eeda.py 8709134f3bd2b775e7a17d98d617517a489e191f 2019-05-11 14:03:22 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Earth Engine Data API driver test suite. # Author: Even Rouault, even dot rouault at spatialys.com # ############################################################################### # Copyright (c) 2017, Planet Labs # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import json from osgeo import gdal, ogr import ogrtest import pytest ############################################################################### # Find EEDA driver def test_eeda_1(): ogrtest.eeda_drv = ogr.GetDriverByName('EEDA') if ogrtest.eeda_drv is None: pytest.skip() gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ############################################################################### # Nominal case def test_eeda_2(): if ogrtest.eeda_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ee/projects/earthengine-public/assets/collection:listImages?pageSize=1', json.dumps({ 'images': [ { 'properties': { 'string_field': 'bar', 'int_field': 1, 'int64_field': 123456789012, 'double_field': 1.23 } } ] })) # To please the unregistering of the persistent connection gdal.FileFromMemBuffer('/vsimem/ee/', '') gdal.SetConfigOption('EEDA_BEARER', 'mybearer') gdal.SetConfigOption('EEDA_URL', '/vsimem/ee/') ds = ogr.Open('EEDA:collection') gdal.SetConfigOption('EEDA_URL', None) lyr = ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1 assert lyr.TestCapability('foo') == 0 assert lyr.GetLayerDefn().GetFieldCount() == 8 + 7 + 4 assert lyr.GetExtent() == (-180.0, 180.0, -90.0, 90.0) assert lyr.GetFeatureCount() == -1 gdal.FileFromMemBuffer('/vsimem/ee/projects/earthengine-public/assets/collection:listImages', json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/collection/first_feature', 'id': 'collection/first_feature', 'updateTime': '2017-01-04T12:34:56.789Z', 'startTime': '2017-01-02T12:34:56.789Z', 'endTime': '2017-01-03T12:34:56.789Z', 'sizeBytes': 1, 'geometry': {'type': 'Polygon', 'coordinates': [[[2, 49], [2.1, 49], [2.1, 49.1], [2, 49.1], [2, 49]]]}, 'properties': { 'string_field': 'bar', 'int_field': 1, 'int64_field': 123456789012, 'double_field': 1.23, 'another_prop': 3 }, 'bands': [ { "id": "B1", "dataType": { "precision": "INT", "range": { "max": 255 } }, "grid": { "crsCode": "EPSG:32610", "affineTransform": { "translateX": 499980, "translateY": 4200000, "scaleX": 60, "scaleY": -60 }, "dimensions": { "width": 1830, "height": 1831 } } } ] }, { 'name': 'projects/earthengine-public/assets/collection/second_feature' } ], 'nextPageToken': 'myToken' })) f = lyr.GetNextFeature() if f.GetField('name') != 'projects/earthengine-public/assets/collection/first_feature' or \ f.GetField('id') != 'collection/first_feature' or \ f.GetField('gdal_dataset') != 'EEDAI:projects/earthengine-public/assets/collection/first_feature' or \ f.GetField('updateTime') != '2017/01/04 12:34:56.789+00' or \ f.GetField('startTime') != '2017/01/02 12:34:56.789+00' or \ f.GetField('endTime') != '2017/01/03 12:34:56.789+00' or \ f.GetField('sizeBytes') != 1 or \ f.GetField('band_count') != 1 or \ f.GetField('band_max_width') != 1830 or \ f.GetField('band_max_height') != 1831 or \ f.GetField('band_min_pixel_size') != 60 or \ f.GetField('band_upper_left_x') != 499980 or \ f.GetField('band_upper_left_y') != 4200000 or \ f.GetField('band_crs') != 'EPSG:32610' or \ f.GetField('string_field') != 'bar' or \ f.GetField('int_field') != 1 or \ f.GetField('int64_field') != 123456789012 or \ f.GetField('double_field') != 1.23 or \ f.GetField('other_properties') != '{ "another_prop": 3 }' or \ f.GetGeometryRef().ExportToWkt() != 'MULTIPOLYGON (((2 49,2.1 49.0,2.1 49.1,2.0 49.1,2 49)))': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('name') != 'projects/earthengine-public/assets/collection/second_feature': f.DumpReadable() pytest.fail() gdal.FileFromMemBuffer('/vsimem/ee/projects/earthengine-public/assets/collection:listImages?pageToken=myToken', json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/collection/third_feature' } ] })) f = lyr.GetNextFeature() if f.GetField('name') != 'projects/earthengine-public/assets/collection/third_feature': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() assert f is None lyr.ResetReading() f = lyr.GetNextFeature() if f.GetField('name') != 'projects/earthengine-public/assets/collection/first_feature': f.DumpReadable() pytest.fail() lyr.SetAttributeFilter('EEDA:raw_filter') gdal.FileFromMemBuffer('/vsimem/ee/projects/earthengine-public/assets/collection:listImages?filter=raw%5Ffilter', json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/collection/raw_filter' } ] })) f = lyr.GetNextFeature() assert f.GetField('name') == 'projects/earthengine-public/assets/collection/raw_filter' lyr.SetAttributeFilter(None) lyr.SetAttributeFilter("startTime >= '1980-01-01T00:00:00Z' AND " + "string_field = 'bar' AND " + "int_field > 0 AND " + "int_field < 2 AND " + "int64_field >= 0 AND " + "int64_field <= 9999999999999 AND " + "double_field != 3.5 AND " + "string_field IN ('bar', 'baz') AND " + "NOT( int_field IN (0) OR double_field IN (3.5) )") ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-public/assets/collection:listImages?region=%7B%20%22type%22%3A%20%22Polygon%22%2C%20%22coordinates%22%3A%20%5B%20%5B%20%5B%20%2D180%2E0%2C%20%2D90%2E0%20%5D%2C%20%5B%20%2D180%2E0%2C%2090%2E0%20%5D%2C%20%5B%20180%2E0%2C%2090%2E0%20%5D%2C%20%5B%20180%2E0%2C%20%2D90%2E0%20%5D%2C%20%5B%20%2D180%2E0%2C%20%2D90%2E0%20%5D%20%5D%20%5D%20%7D&filter=%28%28%28%28%28%28%28string%5Ffield%20%3D%20%22bar%22%20AND%20int%5Ffield%20%3E%200%29%20AND%20int%5Ffield%20%3C%202%29%20AND%20int64%5Ffield%20%3E%3D%200%29%20AND%20int64%5Ffield%20%3C%3D%209999999999999%29%20AND%20double%5Ffield%20%21%3D%203%2E5%29%20AND%20string%5Ffield%20%3D%20%22bar%22%20OR%20string%5Ffield%20%3D%20%22baz%22%29%20AND%20%28NOT%20%28int%5Ffield%20%3D%200%20OR%20double%5Ffield%20%3D%203%2E5%29%29%29&startTime=1980%2D01%2D01T00%3A00%3A00Z' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/collection/filtered_feature', 'updateTime': '2017-01-03T12:34:56.789Z', 'startTime': '2017-01-02T12:34:56.789Z', 'sizeBytes': 1, 'geometry': {'type': 'Polygon', 'coordinates': [[[2, 49], [2.1, 49], [2.1, 49.1], [2, 49.1], [2, 49]]]}, 'properties': { 'string_field': 'bar', 'int_field': 1, 'int64_field': 123456789012, 'double_field': 1.23, 'another_prop': 3 } }, { 'name': 'projects/earthengine-public/assets/collection/second_feature' } ] })) lyr.SetSpatialFilterRect(-180, -90, 180, 90) f = lyr.GetNextFeature() gdal.Unlink(ogrtest.eeda_drv_tmpfile) assert f.GetField('name') == 'projects/earthengine-public/assets/collection/filtered_feature' lyr.SetSpatialFilter(None) # Test time equality with second granularity lyr.SetAttributeFilter("startTime >= '1980-01-01T00:00:00Z' AND endTime <= '1980-01-02T23:59:59Z'") ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-public/assets/collection:listImages?startTime=1980%2D01%2D01T00%3A00%3A00Z&endTime=1980%2D01%2D02T23%3A59%3A59Z' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/collection/filtered_feature', 'startTime': '1980-01-01T00:00:00Z', 'endTime': '1980-01-02T23:59:59Z' }, { 'name': 'projects/earthengine-public/assets/collection/second_feature' } ] })) f = lyr.GetNextFeature() gdal.Unlink(ogrtest.eeda_drv_tmpfile) assert f.GetField('name') == 'projects/earthengine-public/assets/collection/filtered_feature' # Test time equality with day granularity lyr.SetAttributeFilter("startTime = '1980-01-01' AND endTime = '1980-01-02'") ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-public/assets/collection:listImages?startTime=1980%2D01%2D01T00%3A00%3A00Z&endTime=1980%2D01%2D02T23%3A59%3A59Z' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/collection/filtered_feature', 'startTime': '1980-01-01T12:00:00Z', 'endTime': '1980-01-02T23:59:59Z' }, { 'name': 'projects/earthengine-public/assets/collection/second_feature' } ] })) f = lyr.GetNextFeature() gdal.Unlink(ogrtest.eeda_drv_tmpfile) assert f.GetField('name') == 'projects/earthengine-public/assets/collection/filtered_feature' ds = None gdal.SetConfigOption('EEDA_BEARER', None) ############################################################################### # Nominal case where collection is in eedaconf.json def test_eeda_3(): if ogrtest.eeda_drv is None: pytest.skip() gdal.SetConfigOption('EEDA_BEARER', 'mybearer') gdal.SetConfigOption('EEDA_URL', '/vsimem/ee/') ds = ogr.Open('EEDA:##example_collection/example_subcollection') gdal.SetConfigOption('EEDA_URL', None) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 8 + 7 + 4 ds = None gdal.SetConfigOption('EEDA_BEARER', None) ############################################################################### # Test that name and id variants are handled correctly. def test_eeda_4(): if ogrtest.eeda_drv is None: pytest.skip() gdal.SetConfigOption('EEDA_BEARER', 'mybearer') gdal.SetConfigOption('EEDA_URL', '/vsimem/ee/') # User asset ID ("users/**"). ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-legacy/assets/users/foo:listImages?pageSize=1' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-legacy/assets/users/foo/bar' } ] })) assert ogr.Open('EEDA:users/foo').GetLayer(0) gdal.Unlink(ogrtest.eeda_drv_tmpfile) # Project asset ID ("projects/**"). ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-legacy/assets/projects/foo:listImages?pageSize=1' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-legacy/assets/projects/foo/bar' } ] })) ds = ogr.Open('EEDA:projects/foo') assert ds.GetLayer(0) gdal.Unlink(ogrtest.eeda_drv_tmpfile) ds = None # Multi-folder project asset ID ("projects/foo/bar/baz"). ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-legacy/assets/projects/foo/bar/baz:listImages?pageSize=1' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-legacy/assets/projects/foo/bar/baz/qux' } ] })) ds = ogr.Open('EEDA:projects/foo/bar/baz') assert ds.GetLayer(0) gdal.Unlink(ogrtest.eeda_drv_tmpfile) ds = None # Public-catalog asset ID (e.g. "LANDSAT"). ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/earthengine-public/assets/foo:listImages?pageSize=1' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/earthengine-public/assets/foo/bar' } ] })) ds = ogr.Open('EEDA:foo') assert ds.GetLayer(0) gdal.Unlink(ogrtest.eeda_drv_tmpfile) ds = None # Asset name ("projects/*/assets/**"). ogrtest.eeda_drv_tmpfile = '/vsimem/ee/projects/foo/assets/bar:listImages?pageSize=1' gdal.FileFromMemBuffer(ogrtest.eeda_drv_tmpfile, json.dumps({ 'images': [ { 'name': 'projects/foo/assets/bar/baz' } ] })) ds = ogr.Open('EEDA:projects/foo/assets/bar') assert ds.GetLayer(0) gdal.Unlink(ogrtest.eeda_drv_tmpfile) ds = None gdal.SetConfigOption('EEDA_BEARER', None) gdal.SetConfigOption('EEDA_URL', None) ############################################################################### # def test_eeda_cleanup(): if ogrtest.eeda_drv is None: pytest.skip() gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', None) gdal.SetConfigOption('EEDA_BEARER', None) gdal.SetConfigOption('EEDA_URL', None) gdal.SetConfigOption('EEDA_PRIVATE_KEY', None) gdal.SetConfigOption('EEDA_CLIENT_EMAIL', None) gdal.SetConfigOption('GO2A_AUD', None) gdal.SetConfigOption('GOA2_NOW', None) gdal.Unlink('/vsimem/ee/') gdal.Unlink('/vsimem/ee/projects/earthengine-public/assets/collection:listImages?pageSize=1') gdal.Unlink('/vsimem/ee/projects/earthengine-public/assets/collection:listImages?pageToken=myToken') gdal.Unlink('/vsimem/ee/projects/earthengine-public/assets/collection:listImages?filter=raw%5Ffilter') gdalautotest-3.1.2/ogr/ogr_gpkg.py0000775000175000017500000043714313701060010015636 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_gpkg.py 8a31698d1a421c99c51b45e6fc72553817177c6a 2020-06-05 20:35:35 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GeoPackage driver functionality. # Author: Paul Ramsey # ############################################################################### # Copyright (c) 2004, Paul Ramsey # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import struct import sys import pytest from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest pytestmark = pytest.mark.require_driver('GPKG') ############################################################################### # Validate a geopackage def _validate_check(filename): path = '../../gdal/swig/python/samples' if path not in sys.path: sys.path.append(path) try: import validate_gpkg except ImportError: print('Cannot import validate_gpkg') return validate_gpkg.check(filename) def validate(filename, quiet=False): my_filename = filename if my_filename.startswith('/vsimem/'): my_filename = 'tmp/validate.gpkg' f = gdal.VSIFOpenL(filename, 'rb') if f is None: print('Cannot open %s' % filename) return False content = gdal.VSIFReadL(1, 10000000, f) gdal.VSIFCloseL(f) open(my_filename, 'wb').write(content) try: _validate_check(my_filename) except Exception as e: if not quiet: print(e) return False finally: if my_filename != filename: os.unlink(my_filename) return True ############################################################################### # Create a fresh database. def test_ogr_gpkg_1(): gdaltest.gpkg_ds = None gdaltest.gpkg_dr = None gdaltest.gpkg_dr = ogr.GetDriverByName('GPKG') try: os.remove('tmp/gpkg_test.gpkg') except OSError: pass # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') gdaltest.gpkg_ds = gdaltest.gpkg_dr.CreateDataSource('tmp/gpkg_test.gpkg') assert gdaltest.gpkg_ds is not None gdaltest.gpkg_ds = None assert validate('tmp/gpkg_test.gpkg'), 'validation failed' ############################################################################### # Re-open database to test validity def test_ogr_gpkg_2(): gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) # Check there a ogr_empty_table sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT COUNT(*) FROM sqlite_master WHERE name = 'ogr_empty_table'") f = sql_lyr.GetNextFeature() assert f.GetField(0) == 1 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Should default to GPKG 1.2 sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('PRAGMA application_id') f = sql_lyr.GetNextFeature() if f['application_id'] != 1196444487: f.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('PRAGMA user_version') f = sql_lyr.GetNextFeature() if f['user_version'] != 10200: f.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Create a layer def test_ogr_gpkg_3(): # Test invalid FORMAT # gdal.PushErrorHandler('CPLQuietErrorHandler') srs4326 = osr.SpatialReference() srs4326.ImportFromEPSG(4326) lyr = gdaltest.gpkg_ds.CreateLayer('first_layer', geom_type=ogr.wkbPoint, srs=srs4326, options=['GEOMETRY_NAME=gpkg_geometry', 'SPATIAL_INDEX=NO']) # gdal.PopErrorHandler() assert lyr is not None # Test creating a layer with an existing name gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = gdaltest.gpkg_ds.CreateLayer('a_layer', options=['SPATIAL_INDEX=NO']) lyr = gdaltest.gpkg_ds.CreateLayer('a_layer', options=['SPATIAL_INDEX=NO']) gdal.PopErrorHandler() assert lyr is None, 'layer creation should have failed' ############################################################################### # Close and re-open to test the layer registration def test_ogr_gpkg_4(): gdaltest.gpkg_ds = None assert validate('tmp/gpkg_test.gpkg'), 'validation failed' gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) gdal.PopErrorHandler() assert gdaltest.gpkg_ds is not None # Check there no ogr_empty_table sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT COUNT(*) FROM sqlite_master WHERE name = 'ogr_empty_table'") f = sql_lyr.GetNextFeature() assert f.GetField(0) == 0 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) assert gdaltest.gpkg_ds.GetLayerCount() == 2, 'unexpected number of layers' lyr0 = gdaltest.gpkg_ds.GetLayer(0) assert lyr0.GetFIDColumn() == 'fid', 'unexpected FID name for layer 0' gdaltest.gpkg_ds = None gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) lyr0 = gdaltest.gpkg_ds.GetLayer(0) assert lyr0.GetName() == 'first_layer', 'unexpected layer name for layer 0' gdaltest.gpkg_ds = None gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) lyr0 = gdaltest.gpkg_ds.GetLayer(0) lyr1 = gdaltest.gpkg_ds.GetLayer(1) assert lyr0.GetLayerDefn().GetGeomFieldDefn(0).GetName() == 'gpkg_geometry', \ 'unexpected geometry field name for layer 0' assert lyr1.GetName() == 'a_layer', 'unexpected layer name for layer 1' sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Delete a layer def test_ogr_gpkg_5(): assert gdaltest.gpkg_ds.GetLayerCount() == 2, 'unexpected number of layers' with gdaltest.error_handler(): ret = gdaltest.gpkg_ds.DeleteLayer(-1) assert ret != 0, 'expected error' with gdaltest.error_handler(): ret = gdaltest.gpkg_ds.DeleteLayer(gdaltest.gpkg_ds.GetLayerCount()) assert ret != 0, 'expected error' assert gdaltest.gpkg_ds.DeleteLayer(1) == 0, 'got error code from DeleteLayer(1)' assert gdaltest.gpkg_ds.DeleteLayer(0) == 0, 'got error code from DeleteLayer(0)' assert gdaltest.gpkg_ds.GetLayerCount() == 0, 'unexpected number of layers (not 0)' ############################################################################### # Add fields def test_ogr_gpkg_6(): srs4326 = osr.SpatialReference() srs4326.ImportFromEPSG(4326) lyr = gdaltest.gpkg_ds.CreateLayer('field_test_layer', geom_type=ogr.wkbPoint, srs=srs4326) assert lyr is not None field_defn = ogr.FieldDefn('dummy', ogr.OFTString) lyr.CreateField(field_defn) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTString, \ 'wrong field type' gdaltest.gpkg_ds = None assert validate('tmp/gpkg_test.gpkg'), 'validation failed' gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) gdal.PopErrorHandler() assert gdaltest.gpkg_ds is not None assert gdaltest.gpkg_ds.GetLayerCount() == 1 lyr = gdaltest.gpkg_ds.GetLayer(0) assert lyr.GetName() == 'field_test_layer' field_defn_out = lyr.GetLayerDefn().GetFieldDefn(0) assert field_defn_out.GetType() == ogr.OFTString, 'wrong field type after reopen' assert field_defn_out.GetName() == 'dummy', 'wrong field name after reopen' ############################################################################### # Add a feature / read a feature / delete a feature def test_ogr_gpkg_7(): lyr = gdaltest.gpkg_ds.GetLayerByName('field_test_layer') geom = ogr.CreateGeometryFromWkt('POINT(10 10)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) feat.SetField('dummy', 'a dummy value') assert lyr.TestCapability(ogr.OLCSequentialWrite) == 1, \ 'lyr.TestCapability(ogr.OLCSequentialWrite) != 1' assert lyr.CreateFeature(feat) == 0, 'cannot create feature' # Read back what we just inserted lyr.ResetReading() feat_read = lyr.GetNextFeature() assert feat_read.GetField('dummy') == 'a dummy value', 'output does not match input' # Only inserted one thing, so second feature should return NULL feat_read = lyr.GetNextFeature() assert feat_read is None, 'last call should return NULL' # Add another feature geom = ogr.CreateGeometryFromWkt('POINT(100 100)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) feat.SetField('dummy', 'who you calling a dummy?') assert lyr.CreateFeature(feat) == 0, 'cannot create feature' assert lyr.TestCapability(ogr.OLCRandomRead) == 1, \ 'lyr.TestCapability(ogr.OLCRandomRead) != 1' # Random read a feature feat_read_random = lyr.GetFeature(feat.GetFID()) assert feat_read_random.GetField('dummy') == 'who you calling a dummy?', \ 'random read output does not match input' assert lyr.TestCapability(ogr.OLCRandomWrite) == 1, \ 'lyr.TestCapability(ogr.OLCRandomWrite) != 1' # Random write a feature feat.SetField('dummy', 'i am no dummy') lyr.SetFeature(feat) feat_read_random = lyr.GetFeature(feat.GetFID()) assert feat_read_random.GetField('dummy') == 'i am no dummy', \ 'random read output does not match random write input' assert lyr.TestCapability(ogr.OLCDeleteFeature) == 1, \ 'lyr.TestCapability(ogr.OLCDeleteFeature) != 1' # Delete a feature lyr.DeleteFeature(feat.GetFID()) assert lyr.GetFeatureCount() == 1, 'delete feature did not delete' # Test updating non-existing feature feat.SetFID(-10) assert lyr.SetFeature(feat) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of SetFeature().' # Test deleting non-existing feature assert lyr.DeleteFeature(-10) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of DeleteFeature().' # Delete the layer if gdaltest.gpkg_ds.DeleteLayer('field_test_layer') != 0: gdaltest.post_reason('got error code from DeleteLayer(field_test_layer)') ############################################################################### # Test a variety of geometry feature types and attribute types def test_ogr_gpkg_8(): # try: # os.remove( 'tmp/gpkg_test.gpkg' ) # except: # pass # gdaltest.gpkg_dr = ogr.GetDriverByName( 'GPKG' ) # gdaltest.gpkg_ds = gdaltest.gpkg_dr.CreateDataSource( 'tmp/gpkg_test.gpkg' ) srs = osr.SpatialReference() # Test a non-default SRS srs.ImportFromEPSG(32631) lyr = gdaltest.gpkg_ds.CreateLayer('tbl_linestring', geom_type=ogr.wkbLineString, srs=srs) assert lyr is not None lyr.StartTransaction() lyr.CreateField(ogr.FieldDefn('fld_integer', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('fld_string', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('fld_real', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('fld_date', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('fld_datetime', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('fld_binary', ogr.OFTBinary)) fld_defn = ogr.FieldDefn('fld_boolean', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('fld_smallint', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('fld_float', ogr.OFTReal) fld_defn.SetSubType(ogr.OFSTFloat32) lyr.CreateField(fld_defn) lyr.CreateField(ogr.FieldDefn('fld_integer64', ogr.OFTInteger64)) geom = ogr.CreateGeometryFromWkt('LINESTRING(5 5,10 5,10 10,5 10)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) for i in range(10): feat.SetFID(-1) feat.SetField('fld_integer', 10 + i) feat.SetField('fld_real', 3.14159 / (i + 1)) feat.SetField('fld_string', 'test string %d test' % i) feat.SetField('fld_date', '2014/05/17 ') feat.SetField('fld_datetime', '2014/05/17 12:34:56') feat.SetFieldBinaryFromHexString('fld_binary', 'fffe') feat.SetField('fld_boolean', 1) feat.SetField('fld_smallint', -32768) feat.SetField('fld_float', 1.23) feat.SetField('fld_integer64', 1000000000000 + i) assert lyr.CreateFeature(feat) == 0, ('cannot create feature %d' % i) lyr.CommitTransaction() feat = ogr.Feature(lyr.GetLayerDefn()) assert lyr.CreateFeature(feat) == 0, 'cannot insert empty' feat.SetFID(6) assert lyr.SetFeature(feat) == 0, 'cannot update with empty' gdaltest.gpkg_ds = None gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) lyr = gdaltest.gpkg_ds.GetLayerByName('tbl_linestring') assert lyr.GetLayerDefn().GetFieldDefn(6).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(7).GetSubType() == ogr.OFSTInt16 assert lyr.GetLayerDefn().GetFieldDefn(8).GetSubType() == ogr.OFSTFloat32 feat = lyr.GetNextFeature() if feat.GetField(0) != 10 or feat.GetField(1) != 'test string 0 test' or \ feat.GetField(2) != 3.14159 or feat.GetField(3) != '2014/05/17' or \ feat.GetField(4) != '2014/05/17 12:34:56+00' or feat.GetField(5) != 'FFFE' or \ feat.GetField(6) != 1 or feat.GetField(7) != -32768 or feat.GetField(8) != 1.23 or \ feat.GetField(9) != 1000000000000: feat.DumpReadable() pytest.fail() lyr = gdaltest.gpkg_ds.CreateLayer('tbl_polygon', geom_type=ogr.wkbPolygon, srs=srs) assert lyr is not None lyr.StartTransaction() lyr.CreateField(ogr.FieldDefn('fld_datetime', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('fld_string', ogr.OFTString)) geom = ogr.CreateGeometryFromWkt('POLYGON((5 5, 10 5, 10 10, 5 10, 5 5),(6 6, 6 7, 7 7, 7 6, 6 6))') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) for i in range(10): feat.SetFID(-1) feat.SetField('fld_string', 'my super string %d' % i) feat.SetField('fld_datetime', '2010-01-01') assert lyr.CreateFeature(feat) == 0, ('cannot create polygon feature %d' % i) lyr.CommitTransaction() feat = lyr.GetFeature(3) geom_read = feat.GetGeometryRef() assert geom.ExportToWkt() == geom_read.ExportToWkt(), \ 'geom output not equal to geom input' # Test out the 3D support... lyr = gdaltest.gpkg_ds.CreateLayer('tbl_polygon25d', geom_type=ogr.wkbPolygon25D, srs=srs) assert lyr is not None lyr.CreateField(ogr.FieldDefn('fld_string', ogr.OFTString)) geom = ogr.CreateGeometryFromWkt('POLYGON((5 5 1, 10 5 2, 10 10 3, 5 104 , 5 5 1),(6 6 4, 6 7 5, 7 7 6, 7 6 7, 6 6 4))') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) lyr.CreateFeature(feat) lyr.ResetReading() feat = lyr.GetNextFeature() geom_read = feat.GetGeometryRef() assert geom.ExportToWkt() == geom_read.ExportToWkt(), \ '3d geom output not equal to geom input' ############################################################################### # Test support for extents and counts def test_ogr_gpkg_9(): lyr = gdaltest.gpkg_ds.GetLayerByName('tbl_linestring') extent = lyr.GetExtent() assert extent == (5.0, 10.0, 5.0, 10.0), 'got bad extent' fcount = lyr.GetFeatureCount() assert fcount == 11, 'got bad featurecount' ############################################################################### # Test non-SELECT SQL commands def test_ogr_gpkg_11(): gdaltest.gpkg_ds = None gdaltest.gpkg_ds = ogr.Open('tmp/gpkg_test.gpkg', update=1) gdaltest.gpkg_ds.ExecuteSQL('CREATE INDEX tbl_linestring_fld_integer_idx ON tbl_linestring(fld_integer)') gdaltest.gpkg_ds.ExecuteSQL('ALTER TABLE tbl_linestring RENAME TO tbl_linestring_renamed;') gdaltest.gpkg_ds.ExecuteSQL('VACUUM') gdaltest.gpkg_ds = None gdaltest.gpkg_ds = ogr.Open('tmp/gpkg_test.gpkg', update=1) lyr = gdaltest.gpkg_ds.GetLayerByName('tbl_linestring_renamed') assert lyr is not None lyr.SetAttributeFilter('fld_integer = 10') assert lyr.GetFeatureCount() == 1 ############################################################################### # Test SELECT SQL commands def test_ogr_gpkg_12(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('SELECT * FROM tbl_linestring_renamed') assert sql_lyr.GetFIDColumn() == 'fid' assert sql_lyr.GetGeomType() == ogr.wkbLineString assert sql_lyr.GetGeometryColumn() == 'geom' assert sql_lyr.GetSpatialRef().ExportToWkt().find('32631') >= 0 feat = sql_lyr.GetNextFeature() assert feat.GetFID() == 1 assert sql_lyr.GetFeatureCount() == 11 assert sql_lyr.GetLayerDefn().GetFieldCount() == 10 assert sql_lyr.GetLayerDefn().GetFieldDefn(6).GetSubType() == ogr.OFSTBoolean assert sql_lyr.GetLayerDefn().GetFieldDefn(7).GetSubType() == ogr.OFSTInt16 assert sql_lyr.GetLayerDefn().GetFieldDefn(8).GetSubType() == ogr.OFSTFloat32 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL( 'SELECT ' 'CAST(fid AS INTEGER) AS FID, ' 'CAST(fid AS INTEGER) AS FID, ' '_rowid_ ,' 'CAST(geom AS BLOB) AS GEOM, ' 'CAST(geom AS BLOB) AS GEOM, ' 'CAST(fld_integer AS INTEGER) AS FLD_INTEGER, ' 'CAST(fld_integer AS INTEGER) AS FLD_INTEGER, ' 'CAST(fld_string AS TEXT) AS FLD_STRING, ' 'CAST(fld_real AS REAL) AS FLD_REAL, ' 'CAST(fld_binary as BLOB) as FLD_BINARY, ' 'CAST(fld_integer64 AS INTEGER) AS FLD_INTEGER64 ' 'FROM tbl_linestring_renamed') assert sql_lyr.GetFIDColumn() == 'FID' assert sql_lyr.GetGeometryColumn() == 'GEOM' assert sql_lyr.GetLayerDefn().GetFieldCount() == 5 assert sql_lyr.GetLayerDefn().GetFieldDefn(0).GetName() == 'FLD_INTEGER' assert sql_lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger assert sql_lyr.GetLayerDefn().GetFieldDefn(1).GetName() == 'FLD_STRING' assert sql_lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTString assert sql_lyr.GetLayerDefn().GetFieldDefn(2).GetName() == 'FLD_REAL' assert sql_lyr.GetLayerDefn().GetFieldDefn(2).GetType() == ogr.OFTReal assert sql_lyr.GetLayerDefn().GetFieldDefn(3).GetName() == 'FLD_BINARY' assert sql_lyr.GetLayerDefn().GetFieldDefn(3).GetType() == ogr.OFTBinary assert sql_lyr.GetLayerDefn().GetFieldDefn(4).GetName() == 'FLD_INTEGER64' assert sql_lyr.GetLayerDefn().GetFieldDefn(4).GetType() == ogr.OFTInteger64 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('SELECT * FROM tbl_linestring_renamed WHERE 0=1') feat = sql_lyr.GetNextFeature() assert feat is None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) for sql in ['SELECT * FROM tbl_linestring_renamed LIMIT 1', 'SELECT * FROM tbl_linestring_renamed ORDER BY fld_integer LIMIT 1', 'SELECT * FROM tbl_linestring_renamed UNION ALL SELECT * FROM tbl_linestring_renamed ORDER BY fld_integer LIMIT 1']: sql_lyr = gdaltest.gpkg_ds.ExecuteSQL(sql) feat = sql_lyr.GetNextFeature() assert feat is not None feat = sql_lyr.GetNextFeature() assert feat is None assert sql_lyr.GetFeatureCount() == 1 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('SELECT sqlite_version()') feat = sql_lyr.GetNextFeature() assert feat is not None assert sql_lyr.GetLayerDefn().GetFieldCount() == 1 assert sql_lyr.GetLayerDefn().GetGeomFieldCount() == 0 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test non-spatial tables def test_ogr_gpkg_13(): lyr = gdaltest.gpkg_ds.CreateLayer('non_spatial', geom_type=ogr.wkbNone, options=['ASPATIAL_VARIANT=OGR_ASPATIAL']) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None lyr.CreateField(ogr.FieldDefn('fld_integer', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('fld_integer', 1) lyr.CreateFeature(feat) feat = None lyr.ResetReading() feat = lyr.GetNextFeature() if not feat.IsFieldNull('fld_integer'): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetField('fld_integer') != 1: feat.DumpReadable() pytest.fail() # Test second aspatial layer lyr = gdaltest.gpkg_ds.CreateLayer('non_spatial2', geom_type=ogr.wkbNone, options=['ASPATIAL_VARIANT=OGR_ASPATIAL']) gdaltest.gpkg_ds = None gdaltest.gpkg_ds = ogr.Open('tmp/gpkg_test.gpkg', update=1) assert gdal.GetLastErrorMsg() == '', 'fail : warning NOT expected' assert gdaltest.gpkg_ds.GetLayerCount() == 5 lyr = gdaltest.gpkg_ds.GetLayer('non_spatial') assert lyr.GetGeomType() == ogr.wkbNone feat = lyr.GetNextFeature() assert feat.IsFieldNull('fld_integer') feat = lyr.GetNextFeature() if feat.GetField('fld_integer') != 1: feat.DumpReadable() pytest.fail() sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name IS NULL AND extension_name = 'gdal_aspatial'") assert sql_lyr.GetFeatureCount() == 1 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Add various geometries to test spatial filtering def test_ogr_gpkg_14(): sr = osr.SpatialReference() sr.ImportFromEPSG(32631) lyr = gdaltest.gpkg_ds.CreateLayer('point_no_spi-but-with-dashes', geom_type=ogr.wkbPoint, options=['SPATIAL_INDEX=NO'], srs=sr) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1000 30000000)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-1000 30000000)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1000 -30000000)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-1000 -30000000)')) lyr.CreateFeature(feat) # Test null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) # Test empty geometry feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT EMPTY')) lyr.CreateFeature(feat) f = lyr.GetFeature(5) if f.GetGeometryRef() is not None: f.DumpReadable() pytest.fail() f = lyr.GetFeature(6) if f.GetGeometryRef().ExportToWkt() != 'POINT EMPTY': f.DumpReadable() pytest.fail() f = None sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('SELECT * FROM "point_no_spi-but-with-dashes"') res = sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) assert res == 0 lyr = gdaltest.gpkg_ds.CreateLayer('point-with-spi-and-dashes', geom_type=ogr.wkbPoint) assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 1 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1000 30000000)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-1000 30000000)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1000 -30000000)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-1000 -30000000)')) lyr.CreateFeature(feat) # Test null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) # Test empty geometry feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT EMPTY')) lyr.CreateFeature(feat) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL('SELECT * FROM "point-with-spi-and-dashes"') res = sql_lyr.TestCapability(ogr.OLCFastSpatialFilter) gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) assert res == 1 # Test spatial filer right away lyr.SetSpatialFilterRect(1000, 30000000, 1000, 30000000) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None f = lyr.GetNextFeature() assert f is None ############################################################################### # Test SQL functions def test_ogr_gpkg_15(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL( 'SELECT ST_IsEmpty(geom), ST_SRID(geom), ST_GeometryType(geom), ' + 'ST_MinX(geom), ST_MinY(geom), ST_MaxX(geom), ST_MaxY(geom) FROM \"point_no_spi-but-with-dashes\" WHERE fid = 1') feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 0 or feat.GetField(1) != 32631 or \ feat.GetField(2) != 'POINT' or \ feat.GetField(3) != 1000 or feat.GetField(4) != 30000000 or \ feat.GetField(5) != 1000 or feat.GetField(6) != 30000000: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL( 'SELECT ST_IsEmpty(geom), ST_SRID(geom), ST_GeometryType(geom), ' + 'ST_MinX(geom), ST_MinY(geom), ST_MaxX(geom), ST_MaxY(geom) FROM tbl_linestring_renamed WHERE geom IS NULL') feat = sql_lyr.GetNextFeature() if not feat.IsFieldNull(0) or not feat.IsFieldNull(1) or not feat.IsFieldNull(2) or \ not feat.IsFieldNull(3) or not feat.IsFieldNull(4) or not feat.IsFieldNull(5) or not feat.IsFieldNull(6): feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) for (expected_type, actual_type, expected_result) in [ ('POINT', 'POINT', 1), ('LINESTRING', 'POINT', 0), ('GEOMETRY', 'POINT', 1), ('POINT', 'GEOMETRY', 0), ('GEOMETRYCOLLECTION', 'MULTIPOINT', 1), ('GEOMETRYCOLLECTION', 'POINT', 0)]: sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT GPKG_IsAssignable('%s', '%s')" % (expected_type, actual_type)) feat = sql_lyr.GetNextFeature() got_result = feat.GetField(0) gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) assert got_result == expected_result, \ ("expected_type=%s actual_type=%s expected_result=%d got_result=%d" % (expected_type, actual_type, expected_result, got_result)) for (sql, expected_result) in [ ("SELECT HasSpatialIndex('point-with-spi-and-dashes', 'geom')", 1), ("SELECT DisableSpatialIndex('point-with-spi-and-dashes', 'geom')", 1), ("SELECT HasSpatialIndex('point-with-spi-and-dashes', 'geom')", 0), ("SELECT DisableSpatialIndex('point-with-spi-and-dashes', 'geom')", 0), ("SELECT CreateSpatialIndex('point-with-spi-and-dashes', 'geom')", 1), ("SELECT HasSpatialIndex('point-with-spi-and-dashes', 'geom')", 1), ("SELECT CreateSpatialIndex('point-with-spi-and-dashes', 'geom')", 0), ("SELECT CreateSpatialIndex('point-with-spi-and-dashes', NULL)", 0), ("SELECT HasSpatialIndex('point-with-spi-and-dashes', NULL)", 0), ("SELECT CreateSpatialIndex(NULL, 'geom')", 0), ("SELECT CreateSpatialIndex('bla', 'geom')", 0), ("SELECT CreateSpatialIndex('point-with-spi-and-dashes', 'bla')", 0), ("SELECT DisableSpatialIndex('point-with-spi-and-dashes', NULL)", 0), ("SELECT DisableSpatialIndex(NULL, 'geom')", 0), ("SELECT DisableSpatialIndex('bla', 'geom')", 0), ("SELECT DisableSpatialIndex('point-with-spi-and-dashes', 'bla')", 0), ("SELECT HasSpatialIndex(NULL, 'geom')", 0), ("SELECT HasSpatialIndex('bla', 'geom')", 0), ("SELECT HasSpatialIndex('point-with-spi-and-dashes', 'bla')", 0), ("SELECT CreateSpatialIndex('non_spatial', '')", 0), ("SELECT CreateSpatialIndex('point_no_spi-but-with-dashes', 'geom')", 1), # Final DisableSpatialIndex: will be effectively deleted at dataset closing ("SELECT DisableSpatialIndex('point_no_spi-but-with-dashes', 'geom')", 1), ]: if expected_result == 0: gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.gpkg_ds.ExecuteSQL(sql) if expected_result == 0: gdal.PopErrorHandler() feat = sql_lyr.GetNextFeature() got_result = feat.GetField(0) gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) assert got_result == expected_result, sql # NULL argument sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT SridFromAuthCRS(NULL, 4326)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != -1: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # NULL argument sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT SridFromAuthCRS('epsg', NULL)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != -1: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Existing entry sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT SridFromAuthCRS('epsg', 4326)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 4326: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Non existing entry sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT SridFromAuthCRS('epsg', 1234)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != -1: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # NULL argument sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ImportFromEPSG(NULL)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != -1: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Existing entry in gpkg_spatial_ref_sys sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ImportFromEPSG(4326)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 4326: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # New entry in gpkg_spatial_ref_sys sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ImportFromEPSG(32633)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 32633: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Invalid code with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ImportFromEPSG(0)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != -1: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # NULL argument sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(NULL, 4326)") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Invalid geometry with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(x'00', 4326)") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # NULL argument sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(geom, NULL) FROM tbl_linestring_renamed") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Invalid target SRID with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(geom, 0) FROM tbl_linestring_renamed") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Invalid source SRID with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(geom, 4326) FROM \"point-with-spi-and-dashes\"") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Invalid spatialite geometry: SRID=4326,MULTIPOINT EMPTY truncated with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(x'0001E610000000000000000000000000000000000000000000000000000000000000000000007C04000000000000FE', 4326) FROM tbl_linestring_renamed") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_Transform(geom, ST_SRID(geom)) FROM tbl_linestring_renamed") feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (5 5,10 5,10 10,5 10)': feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_SRID(ST_Transform(geom, 4326)) FROM tbl_linestring_renamed") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 4326: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Spatialite geometry: SRID=4326,MULTIPOINT EMPTY sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_SRID(ST_Transform(x'0001E610000000000000000000000000000000000000000000000000000000000000000000007C0400000000000000FE', 4326)) FROM tbl_linestring_renamed") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 4326: feat.DumpReadable() pytest.fail() gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: less than 8 bytes sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_MinX(x'00')") feat = sql_lyr.GetNextFeature() if feat.IsFieldSetAndNotNull(0): feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: 8 wrong bytes sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_MinX(x'0001020304050607')") feat = sql_lyr.GetNextFeature() if feat.IsFieldSetAndNotNull(0): feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: too short blob sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_GeometryType(x'4750001100000000')") feat = sql_lyr.GetNextFeature() if feat.IsFieldSetAndNotNull(0): feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: too short blob sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_GeometryType(x'475000110000000001040000')") feat = sql_lyr.GetNextFeature() if feat.IsFieldSetAndNotNull(0): feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Invalid geometry, but long enough for our purpose... sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_GeometryType(x'47500011000000000104000000')") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 'MULTIPOINT': feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Spatialite geometry (MULTIPOINT EMPTY) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_GeometryType(x'00010000000000000000000000000000000000000000000000000000000000000000000000007C0400000000000000FE')") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 'MULTIPOINT': feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Spatialite geometry (MULTIPOINT EMPTY) sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_IsEmpty(x'00010000000000000000000000000000000000000000000000000000000000000000000000007C0400000000000000FE')") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: invalid geometry with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT ST_GeometryType(x'475000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')") feat = sql_lyr.GetNextFeature() if feat.IsFieldSetAndNotNull(0): feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: invalid type sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT GPKG_IsAssignable('POINT', NULL)") feat = sql_lyr.GetNextFeature() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: invalid type sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT GPKG_IsAssignable(NULL, 'POINT')") feat = sql_lyr.GetNextFeature() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Test hstore_get_value sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT hstore_get_value('a=>b', 'a')") feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 'b': feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Test hstore_get_value sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT hstore_get_value('a=>b', 'x')") feat = sql_lyr.GetNextFeature() if feat.GetField(0) is not None: feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: invalid type sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT hstore_get_value('a=>b', NULL)") feat = sql_lyr.GetNextFeature() if feat.GetField(0) is not None: feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) # Error case: invalid type sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT hstore_get_value(NULL, 'a')") feat = sql_lyr.GetNextFeature() if feat.GetField(0) is not None: feat.DumpReadable() pytest.fail() feat = None gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) has_spatialite_4_3_or_later = False with gdaltest.error_handler(): sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("SELECT spatialite_version()") if sql_lyr: f = sql_lyr.GetNextFeature() version = f.GetField(0) version = '.'.join(version.split('.')[0:2]) version = float(version) if version >= 4.3: has_spatialite_4_3_or_later = True # print('Spatialite 4.3 or later found') gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) if has_spatialite_4_3_or_later: sql_lyr = gdaltest.gpkg_ds.ExecuteSQL( "SELECT ST_Buffer(geom, 0) FROM tbl_linestring_renamed") assert sql_lyr.GetGeomType() == ogr.wkbPolygon assert sql_lyr.GetSpatialRef().ExportToWkt().find('32631') >= 0 gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) gdaltest.gpkg_ds = None gdaltest.gpkg_ds = gdaltest.gpkg_dr.Open('tmp/gpkg_test.gpkg', update=1) ############################################################################### # Test unknown extensions def test_ogr_gpkg_16(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpk_16.gpkg') ds.CreateLayer('foo') ds.ExecuteSQL("INSERT INTO gpkg_extensions ( table_name, column_name, " + "extension_name, definition, scope ) VALUES ( 'foo', 'geom', 'myext', 'some ext', 'write-only' ) ") ds = None # No warning since we open as read-only ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg') lyr = ds.GetLayer(0) lyr.GetLayerDefn() ds = None assert gdal.GetLastErrorMsg() == '', 'fail : warning NOT expected' # Warning since we open as read-write ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg', update=1) lyr = ds.GetLayer(0) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.GetLayerDefn() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' ds.ExecuteSQL("UPDATE gpkg_extensions SET scope = 'read-write' WHERE extension_name = 'myext'") ds = None # Warning since we open as read-only ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg') lyr = ds.GetLayer(0) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.GetLayerDefn() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' # and also as read-write ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg', update=1) lyr = ds.GetLayer(0) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.GetLayerDefn() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' ds = None gdal.Unlink('/vsimem/ogr_gpk_16.gpkg') # Test with unsupported geometry type ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpk_16.gpkg') ds.CreateLayer('foo') ds.ExecuteSQL("INSERT INTO gpkg_extensions ( table_name, column_name, " + "extension_name, definition, scope ) VALUES ( 'foo', 'geom', 'gpkg_geom_XXXX', 'some ext', 'read-write' ) ") ds = None ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg') lyr = ds.GetLayer(0) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.GetLayerDefn() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' gdal.Unlink('/vsimem/ogr_gpk_16.gpkg') # Test with database wide unknown extension ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpk_16.gpkg') ds.CreateLayer('foo') ds.ExecuteSQL("INSERT INTO gpkg_extensions ( " + "extension_name, definition, scope ) VALUES ( 'myext', 'some ext', 'write-only' ) ") ds = None # No warning since we open as read-only ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg') lyr = ds.GetLayer(0) lyr.GetLayerDefn() assert gdal.GetLastErrorMsg() == '', 'fail : warning NOT expected' # Warning since we open as read-write gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg', update=1) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' ds.ExecuteSQL("UPDATE gpkg_extensions SET scope = 'read-write' WHERE extension_name = 'myext'") ds = None # Warning since we open as read-only gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' # and also as read-write gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open('/vsimem/ogr_gpk_16.gpkg', update=1) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'fail : warning expected' ds = None gdal.Unlink('/vsimem/ogr_gpk_16.gpkg') ############################################################################### # Run INDIRECT_SQLITE dialect def test_ogr_gpkg_17(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_17.gpkg') sql_lyr = ds.ExecuteSQL("SELECT ogr_version()", dialect='INDIRECT_SQLITE') f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_gpkg_17.gpkg') ############################################################################### # Test geometry type extension def test_ogr_gpkg_18(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_18.gpkg') lyr = ds.CreateLayer('wkbCircularString', geom_type=ogr.wkbCircularString) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 0,0 0)')) lyr.CreateFeature(f) f = None ds = None assert validate('/vsimem/ogr_gpkg_18.gpkg'), 'validation failed' ds = ogr.Open('/vsimem/ogr_gpkg_18.gpkg') assert gdal.GetLastErrorMsg() == '', 'fail : warning NOT expected' lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbCircularString f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetGeometryType() == ogr.wkbCircularString sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'wkbCircularString' AND extension_name = 'gpkg_geom_CIRCULARSTRING'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_gpkg_18.gpkg') # Also test with a wkbUnknown layer and add curve geometries afterwards ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_18.gpkg') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 0,0 0)')) lyr.CreateFeature(f) f = None sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'test' AND extension_name = 'gpkg_geom_CIRCULARSTRING'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_18.gpkg') assert gdal.GetLastErrorMsg() == '', 'fail : warning NOT expected' lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetGeometryType() == ogr.wkbCircularString ds = None ds = ogr.Open('/vsimem/ogr_gpkg_18.gpkg', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 0,0 0)')) ret = lyr.CreateFeature(f) assert ret == 0 and gdal.GetLastErrorMsg() == '' f = None ds = None ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_18.gpkg') lyr = ds.CreateLayer('test', geom_type=ogr.wkbTriangle) with gdaltest.error_handler(): # Warning 1: Registering non-standard gpkg_geom_TRIANGLE extension ds.FlushCache() sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'test' AND extension_name = 'gpkg_geom_TRIANGLE'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) ds = None ret = validate('/vsimem/ogr_gpkg_18.gpkg', quiet=True) assert not ret, 'validation unexpectedly succeeded' # Test non-linear geometry in GeometryCollection ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_18.gpkg') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(CIRCULARSTRING(0 0,1 0,0 0))')) lyr.CreateFeature(f) f = None sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'test' AND extension_name LIKE 'gpkg_geom_%'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_gpkg_18.gpkg') ############################################################################### # Test metadata def test_ogr_gpkg_19(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_19.gpkg') assert not ds.GetMetadata() lyr = ds.CreateLayer('test_without_md') assert not lyr.GetMetadata() ds.SetMetadataItem('foo', 'bar') # GEOPACKAGE metadata domain is not allowed in a non-raster context gdal.PushErrorHandler() ds.SetMetadata(ds.GetMetadata('GEOPACKAGE'), 'GEOPACKAGE') ds.SetMetadataItem('foo', ds.GetMetadataItem('foo', 'GEOPACKAGE'), 'GEOPACKAGE') gdal.PopErrorHandler() ds = None ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg') assert ds.GetMetadataDomainList() == [''] ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg') assert len(ds.GetMetadata()) == 1 ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg') assert ds.GetMetadataItem('foo') == 'bar', ds.GetMetadata() ds = None ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg', update=1) lyr = ds.CreateLayer('test_with_md', options=['IDENTIFIER=ident', 'DESCRIPTION=desc']) lyr.SetMetadataItem('IDENTIFIER', 'ignored_because_of_lco') lyr.SetMetadataItem('DESCRIPTION', 'ignored_because_of_lco') lyr.SetMetadata({'IDENTIFIER': 'ignored_because_of_lco', 'DESCRIPTION': 'ignored_because_of_lco'}) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg') lyr = ds.GetLayer('test_with_md') assert lyr.GetMetadataItem('IDENTIFIER') == 'ident' assert lyr.GetMetadataItem('DESCRIPTION') == 'desc' ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg', update=1) lyr = ds.GetLayer('test_with_md') assert lyr.GetMetadata() == {'IDENTIFIER': 'ident', 'DESCRIPTION': 'desc'} lyr.SetMetadataItem('IDENTIFIER', 'another_ident') lyr.SetMetadataItem('DESCRIPTION', 'another_desc') ds = None # FIXME? Is it expected to have a .aux.xml here ? gdal.Unlink('/vsimem/ogr_gpkg_19.gpkg.aux.xml') ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg', update=1) lyr = ds.GetLayer('test_with_md') assert lyr.GetMetadata() == {'IDENTIFIER': 'another_ident', 'DESCRIPTION': 'another_desc'} lyr.SetMetadataItem('foo', 'bar') lyr.SetMetadataItem('bar', 'baz', 'another_domain') ds = None ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg', update=1) lyr = ds.GetLayer('test_with_md') assert lyr.GetMetadataDomainList() == ['', 'another_domain'] ds = None ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg', update=1) lyr = ds.GetLayer('test_with_md') assert lyr.GetMetadata() == {'IDENTIFIER': 'another_ident', 'foo': 'bar', 'DESCRIPTION': 'another_desc'} assert lyr.GetMetadata('another_domain') == {'bar': 'baz'} lyr.SetMetadata(None) lyr.SetMetadata(None, 'another_domain') ds = None ds = ogr.Open('/vsimem/ogr_gpkg_19.gpkg', update=1) lyr = ds.GetLayer('test_with_md') assert lyr.GetMetadata() == {'IDENTIFIER': 'another_ident', 'DESCRIPTION': 'another_desc'} assert lyr.GetMetadataDomainList() == [''] ds = None assert validate('/vsimem/ogr_gpkg_19.gpkg'), 'validation failed' gdal.Unlink('/vsimem/ogr_gpkg_19.gpkg') gdal.Unlink('/vsimem/ogr_gpkg_19.gpkg.aux.xml') ############################################################################### # Test spatial reference system def test_ogr_gpkg_20(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_20.gpkg') # "Conflict" with EPSG:4326 srs = osr.SpatialReference() srs.SetFromUserInput("""GEOGCS["my geogcs", DATUM["my datum", SPHEROID["my spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433], AUTHORITY["my_org","4326"]]""") lyr = ds.CreateLayer('my_org_4326', srs=srs) # No authority node srs = osr.SpatialReference() srs.SetFromUserInput("""GEOGCS["another geogcs", DATUM["another datum", SPHEROID["another spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]""") lyr = ds.CreateLayer('without_org', srs=srs) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_20.gpkg') sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='my geogcs' AND srs_id = 100000 AND organization='MY_ORG' AND organization_coordsys_id=4326 AND description is NULL") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 1 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='another geogcs' AND srs_id = 100001 AND organization='NONE' AND organization_coordsys_id=100001 AND description is NULL") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 1 lyr = ds.GetLayer('my_org_4326') assert lyr.GetSpatialRef().ExportToWkt().find('my geogcs') >= 0 lyr = ds.GetLayer('without_org') assert lyr.GetSpatialRef().ExportToWkt().find('another geogcs') >= 0 ds = None assert validate('/vsimem/ogr_gpkg_20.gpkg'), 'validation failed' gdal.Unlink('/vsimem/ogr_gpkg_20.gpkg') ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_20.gpkg') srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer('foo4326', srs=srs) ds.ExecuteSQL("UPDATE gpkg_spatial_ref_sys SET definition='invalid', " "organization='', organization_coordsys_id = 0 " "WHERE srs_id = 4326") ds = None # Unable to parse srs_id '4326' well-known text 'invalid' with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_20.gpkg', update=1) ds.ExecuteSQL('DELETE FROM gpkg_spatial_ref_sys WHERE srs_id = 4326') ds = None gdal.SetConfigOption('OGR_GPKG_FOREIGN_KEY_CHECK', 'NO') # Warning 1: unable to read srs_id '4326' from gpkg_spatial_ref_sys with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_20.gpkg', update=1) gdal.SetConfigOption('OGR_GPKG_FOREIGN_KEY_CHECK', None) ds = None gdal.Unlink('/vsimem/ogr_gpkg_20.gpkg') ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_20.gpkg') srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer('foo4326', srs=srs) ds.ExecuteSQL('DROP TABLE gpkg_spatial_ref_sys') ds.ExecuteSQL('CREATE TABLE gpkg_spatial_ref_sys (srs_name TEXT, ' 'srs_id INTEGER, organization TEXT, ' 'organization_coordsys_id INTEGER, definition TEXT)') ds.ExecuteSQL("INSERT INTO gpkg_spatial_ref_sys " "(srs_name,srs_id,organization,organization_coordsys_id," "definition) VALUES (NULL,4326,NULL,NULL,NULL)") ds = None gdal.SetConfigOption('OGR_GPKG_FOREIGN_KEY_CHECK', 'NO') # Warning 1: null definition for srs_id '4326' in gpkg_spatial_ref_sys with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_20.gpkg', update=1) ds = None gdal.Unlink('/vsimem/ogr_gpkg_20.gpkg') def test_ogr_gpkg_srs_non_duplication_custom_crs(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_20.gpkg') srs = osr.SpatialReference() srs.SetFromUserInput("""GEOGCS["my custom geogcs", DATUM["my datum", SPHEROID["my spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]""") lyr = ds.CreateLayer('test', srs=srs) assert lyr lyr = ds.CreateLayer('test2', srs=srs) assert lyr sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 4 # srs_id 0, 1, 4326 + custom one sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='my custom geogcs'") assert sql_lyr.GetFeatureCount() == 1 f = sql_lyr.GetNextFeature() assert f['srs_id'] == 100000 assert f['organization'] == 'NONE' assert f['organization_coordsys_id'] == 100000 ds.ReleaseResultSet(sql_lyr) # Test now transitionning to definition_12_063 / WKT2 database structure... srs_3d = osr.SpatialReference() srs_3d.SetFromUserInput("""GEOGCRS["srs 3d", DATUM["some datum", ELLIPSOID["some ellipsoid",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,3], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], AXIS["ellipsoidal height (h)",up, ORDER[3], LENGTHUNIT["metre",1]]]""") lyr = ds.CreateLayer('test_3d', srs=srs_3d) assert lyr lyr = ds.CreateLayer('test_3d_bis', srs=srs_3d) assert lyr sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='srs 3d'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) # Test again with SRS that can be represented in WKT1 lyr = ds.CreateLayer('test3', srs=srs) assert lyr sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='my custom geogcs'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_gpkg_20.gpkg') def test_ogr_gpkg_srs_non_consistent_with_official_definition(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_20.gpkg') test_fake_4267 = osr.SpatialReference() test_fake_4267.SetFromUserInput("""GEOGCS["my geogcs 4267", DATUM["WGS_1984", SPHEROID["my spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]]""") with gdaltest.error_handler(): lyr = ds.CreateLayer('test_fake_4267', srs=test_fake_4267) assert gdal.GetLastErrorMsg() == 'Passed SRS uses EPSG:4267 identification, but its definition is not compatible with the official definition of the object. Registering it as a non-EPSG entry into the database.' assert lyr # EPSG:4326 already in the database test_fake_4326 = osr.SpatialReference() test_fake_4326.SetFromUserInput("""GEOGCS["my geogcs 4326", DATUM["WGS_1984", SPHEROID["my spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]]""") with gdaltest.error_handler(): lyr = ds.CreateLayer('test_fake_4326', srs=test_fake_4326) assert gdal.GetLastErrorMsg() == 'Passed SRS uses EPSG:4326 identification, but its definition is not compatible with the definition of that object already in the database. Registering it as a new entry into the database.' assert lyr ds = None ds = ogr.Open('/vsimem/ogr_gpkg_20.gpkg', update = 1) lyr = ds.GetLayer('test_fake_4267') assert lyr.GetSpatialRef().ExportToWkt() == 'GEOGCS["my geogcs 4267",DATUM["WGS_1984",SPHEROID["my spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4267"]]' sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='my geogcs 4267'") assert sql_lyr.GetFeatureCount() == 1 f = sql_lyr.GetNextFeature() assert f['srs_id'] == 100000 assert f['organization'] == 'NONE' assert f['organization_coordsys_id'] == 100000 ds.ReleaseResultSet(sql_lyr) lyr = ds.GetLayer('test_fake_4326') assert lyr.GetSpatialRef().ExportToWkt() == 'GEOGCS["my geogcs 4326",DATUM["WGS_1984",SPHEROID["my spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys WHERE srs_name='my geogcs 4326'") assert sql_lyr.GetFeatureCount() == 1 f = sql_lyr.GetNextFeature() assert f['srs_id'] == 100001 assert f['organization'] == 'NONE' assert f['organization_coordsys_id'] == 100001 ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys") fc_before = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) gdal.ErrorReset() lyr = ds.CreateLayer('test_fake_4267_bis', srs=test_fake_4267) assert gdal.GetLastErrorMsg() == '' sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_spatial_ref_sys") fc_after = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc_before == fc_after ds = None gdal.Unlink('/vsimem/ogr_gpkg_20.gpkg') ############################################################################### # Test maximum width of text fields def test_ogr_gpkg_21(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_21.gpkg') lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn('str', ogr.OFTString) field_defn.SetWidth(2) lyr.CreateField(field_defn) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_21.gpkg', update=1) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetWidth() == 2 f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 'ab') gdal.ErrorReset() lyr.CreateFeature(f) assert gdal.GetLastErrorMsg() == '' f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldBinaryFromHexString(0, '41E9') gdal.ErrorReset() gdal.PushErrorHandler() lyr.CreateFeature(f) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 'abc') gdal.ErrorReset() gdal.PushErrorHandler() lyr.CreateFeature(f) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' f = lyr.GetFeature(f.GetFID()) assert f.GetField(0) == 'abc' gdal.Unlink('/vsimem/ogr_gpkg_21.gpkg') ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_21.gpkg') lyr = ds.CreateLayer('test', options=['TRUNCATE_FIELDS=YES']) field_defn = ogr.FieldDefn('str', ogr.OFTString) field_defn.SetWidth(2) lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldBinaryFromHexString(0, '41E9') gdal.ErrorReset() gdal.PushErrorHandler() lyr.CreateFeature(f) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' f = lyr.GetFeature(f.GetFID()) assert f.GetField(0) == 'A_' f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 'abc') gdal.ErrorReset() gdal.PushErrorHandler() lyr.CreateFeature(f) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' f = lyr.GetFeature(f.GetFID()) if f.GetField(0) != 'ab': gdal.Unlink('/vsimem/ogr_gpkg_21.gpkg') ############################################################################### # Test FID64 support def test_ogr_gpkg_22(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_22.gpkg') lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn('foo', ogr.OFTString) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', 'bar') feat.SetFID(1234567890123) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('/vsimem/ogr_gpkg_22.gpkg') lyr = ds.GetLayerByName('test') assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None f = lyr.GetNextFeature() assert f.GetFID() == 1234567890123 gdal.Unlink('/vsimem/ogr_gpkg_22.gpkg') ############################################################################### # Test not nullable fields def test_ogr_gpkg_23(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_23.gpkg') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Nullable geometry field lyr = ds.CreateLayer('test2', geom_type=ogr.wkbPoint) # Cannot add more than one geometry field gdal.PushErrorHandler() ret = lyr.CreateGeomField(ogr.GeomFieldDefn('foo', ogr.wkbPoint)) gdal.PopErrorHandler() assert ret != 0 f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None # Not-nullable fields and geometry fields created after table creation lyr = ds.CreateLayer('test3', geom_type=ogr.wkbNone, options=['ASPATIAL_VARIANT=OGR_ASPATIAL']) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_contents WHERE data_type = 'features'") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 2 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions") fc = sql_lyr.GetFeatureCount() f = sql_lyr.GetNextFeature() ds.ReleaseResultSet(sql_lyr) assert fc == 2 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_geometry_columns") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 2 field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_contents WHERE data_type = 'features'") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 3 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions") fc = sql_lyr.GetFeatureCount() f = sql_lyr.GetNextFeature() ds.ReleaseResultSet(sql_lyr) assert fc == 1 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_geometry_columns") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 3 f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Not Nullable geometry field lyr = ds.CreateLayer('test4', geom_type=ogr.wkbPoint, options=['GEOMETRY_NULLABLE=NO']) assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None ds.CreateLayer('test5', geom_type=ogr.wkbNone) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_23.gpkg') lyr = ds.GetLayerByName('test5') field_defn = ogr.GeomFieldDefn('', ogr.wkbPoint) with gdaltest.error_handler(): assert lyr.CreateGeomField(field_defn) != 0 lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 lyr = ds.GetLayerByName('test2') assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 1 lyr = ds.GetLayerByName('test3') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 lyr = ds.GetLayerByName('test4') assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 ds = None gdal.Unlink('/vsimem/ogr_gpkg_23.gpkg') ############################################################################### # Test default values def test_ogr_gpkg_24(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_24.gpkg') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) # This will be translated as "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))" field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime3', ogr.OFTDateTime) field_defn.SetDefault("(strftime('%Y-%m-%dT%H:%M:%fZ','now'))") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime4', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56.123'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_date', ogr.OFTDate) field_defn.SetDefault("CURRENT_DATE") lyr.CreateField(field_defn) # field_defn = ogr.FieldDefn( 'field_time', ogr.OFTTime ) # field_defn.SetDefault("CURRENT_TIME") # lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None # Test adding columns after "crystallization" field_defn = ogr.FieldDefn('field_datetime5', ogr.OFTDateTime) field_defn.SetDefault("'2016/06/30 12:34:56.123'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime6', ogr.OFTDateTime) field_defn.SetDefault("'2016/06/30 12:34:56'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_string2', ogr.OFTString) field_defn.SetDefault("'X'") lyr.CreateField(field_defn) # Doesn't work currently. Would require rewriting the whole table # field_defn = ogr.FieldDefn( 'field_datetimeX', ogr.OFTDateTime ) # field_defn.SetDefault("CURRENT_TIMESTAMP") # lyr.CreateField(field_defn) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_24.gpkg', update=1) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'a''b'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() == '123' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_real')).GetDefault() == '1.23' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nodefault')).GetDefault() is None # Translated from "(strftime('%Y-%m-%dT%H:%M:%fZ','now'))" to CURRENT_TIMESTAMP assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime')).GetDefault() == 'CURRENT_TIMESTAMP' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault() == "'2015/06/30 12:34:56'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime3')).GetDefault() == "CURRENT_TIMESTAMP" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime4')).GetDefault() == "'2015/06/30 12:34:56.123'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault() == "CURRENT_DATE" # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_time')).GetDefault() != "CURRENT_TIME": # gdaltest.post_reason('fail') # return 'fail' f = lyr.GetNextFeature() if f.GetField('field_string') != 'a\'b' or f.GetField('field_int') != 123 or \ f.GetField('field_real') != 1.23 or \ not f.IsFieldNull('field_nodefault') or not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56+00' or \ f.GetField('field_datetime4') != '2015/06/30 12:34:56.123+00' or \ not f.IsFieldSet('field_datetime3') or \ not f.IsFieldSet('field_date') or \ f.GetField('field_datetime5') != '2016/06/30 12:34:56.123+00' or \ f.GetField('field_datetime6') != '2016/06/30 12:34:56+00' or \ f.GetField('field_string2') != 'X': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_gpkg_24.gpkg') ############################################################################### # Test creating a field with the fid name def test_ogr_gpkg_25(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_25.gpkg') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['FID=myfid']) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 ret = lyr.CreateField(ogr.FieldDefn('myfid', ogr.OFTInteger)) assert ret == 0 lyr.CreateField(ogr.FieldDefn('str2', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str', 'first string') feat.SetField('myfid', 10) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat.GetFID() == 10 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str2', 'second string') ret = lyr.CreateFeature(feat) assert ret == 0 if feat.GetFID() < 0: feat.DumpReadable() pytest.fail() if feat.GetField('myfid') != feat.GetFID(): feat.DumpReadable() pytest.fail() feat.SetField('str', 'foo') ret = lyr.SetFeature(feat) assert ret == 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1) feat.SetField('myfid', 10) gdal.PushErrorHandler() ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat.UnsetField('myfid') gdal.PushErrorHandler() ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 10 or f.GetField('str') != 'first string' or f.GetField('str2') != 'second string' or f.GetField('myfid') != 10: f.DumpReadable() pytest.fail() f = lyr.GetFeature(f.GetFID()) if f.GetFID() != 10 or f.GetField('str') != 'first string' or f.GetField('str2') != 'second string' or f.GetField('myfid') != 10: f.DumpReadable() pytest.fail() f = None ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_25.gpkg') ############################################################################### # Test dataset transactions def test_ogr_gpkg_26(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_26.gpkg') assert ds.TestCapability(ogr.ODsCTransactions) == 1 ret = ds.StartTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.StartTransaction() gdal.PopErrorHandler() assert ret != 0 lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ret = ds.RollbackTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.RollbackTransaction() gdal.PopErrorHandler() assert ret != 0 ds = None ds = ogr.Open('/vsimem/ogr_gpkg_26.gpkg', update=1) assert ds.GetLayerCount() == 0 ret = ds.StartTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.StartTransaction() gdal.PopErrorHandler() assert ret != 0 lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ret = ds.CommitTransaction() assert ret == 0 gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() assert ret != 0 ds = None ds = ogr.Open('/vsimem/ogr_gpkg_26.gpkg', update=1) assert ds.GetLayerCount() == 1 lyr = ds.GetLayerByName('test') ds.StartTransaction() lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None assert lyr.GetFeatureCount() == 1 ds.RollbackTransaction() assert lyr.GetFeatureCount() == 0 ds.StartTransaction() lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 ds.CommitTransaction() # the cursor is still valid after CommitTransaction(), which isn't the case for other backends such as PG ! f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 2 assert lyr.GetFeatureCount() == 2 ds.StartTransaction() lyr = ds.CreateLayer('test2', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) ds.CommitTransaction() assert ret == 0 ds.StartTransaction() f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) ds.CommitTransaction() assert ret == 0 if False: # pylint: disable=using-constant-test ds.StartTransaction() lyr = ds.CreateLayer('test3', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) # ds.CommitTransaction() ds.ReleaseResultSet(ds.ExecuteSQL('SELECT 1')) # ds = None # ds = ogr.Open('/vsimem/ogr_gpkg_26.gpkg', update = 1) # lyr = ds.GetLayerByName('test3') # ds.StartTransaction() f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) ds.CommitTransaction() # For some reason fails with SQLite 3.6.X with 'failed to execute insert : callback requested query abort' # but not with later versions... assert ret == 0 ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_26.gpkg') ############################################################################### # Test interface with Spatialite def test_ogr_gpkg_27(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_27.gpkg') gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("SELECT GeomFromGPB(null)") gdal.PopErrorHandler() if sql_lyr is None: ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_27.gpkg') pytest.skip() ds.ReleaseResultSet(sql_lyr) lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) lyr.CreateFeature(f) sql_lyr = ds.ExecuteSQL('SELECT GeomFromGPB(geom) FROM test') f = sql_lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_27.gpkg') ############################################################################### # Test ogr2ogr -a_srs (as the geopackage driver doesn't clone the passed SRS # but inc/dec its ref count, which can exhibit issues in GDALVectorTanslate()) def test_ogr_gpkg_28(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('/vsimem/ogr_gpkg_28.gpkg', srcDS, format='GPKG', dstSRS='EPSG:4326') assert str(ds.GetLayer(0).GetSpatialRef()).find('1984') != -1 ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_28.gpkg') ############################################################################### # Test XYM / XYZM support def test_ogr_gpkg_29(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_29.gpkg') assert ds.TestCapability(ogr.ODsCMeasuredGeometries) == 1 lyr = ds.CreateLayer('pointm', geom_type=ogr.wkbPointM) assert lyr.TestCapability(ogr.OLCMeasuredGeometries) == 1 f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT M (1 2 3)')) lyr.CreateFeature(f) lyr = ds.CreateLayer('pointzm', geom_type=ogr.wkbPointZM) assert lyr.TestCapability(ogr.OLCMeasuredGeometries) == 1 f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT ZM (1 2 3 4)')) lyr.CreateFeature(f) ds = None assert validate('/vsimem/ogr_gpkg_29.gpkg'), 'validation failed' ds = ogr.Open('/vsimem/ogr_gpkg_29.gpkg', update=1) lyr = ds.GetLayerByName('pointm') assert lyr.GetGeomType() == ogr.wkbPointM f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != 'POINT M (1 2 3)': f.DumpReadable() pytest.fail() # Generate a XYM envelope ds.ExecuteSQL("UPDATE pointm SET geom = x'4750000700000000000000000000F03F000000000000F03F000000000000004000000000000000400000000000000840000000000000084001D1070000000000000000F03F00000000000000400000000000000840'") lyr = ds.GetLayerByName('pointzm') assert lyr.GetGeomType() == ogr.wkbPointZM f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != 'POINT ZM (1 2 3 4)': f.DumpReadable() pytest.fail() # Generate a XYZM envelope ds.ExecuteSQL("UPDATE pointzm SET geom = x'4750000900000000000000000000F03F000000000000F03F00000000000000400000000000000040000000000000084000000000000008400000000000001040000000000000104001B90B0000000000000000F03F000000000000004000000000000008400000000000001040'") ds = None # Check again ds = ogr.Open('/vsimem/ogr_gpkg_29.gpkg') lyr = ds.GetLayerByName('pointm') assert lyr.GetGeomType() == ogr.wkbPointM f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != 'POINT M (1 2 3)': f.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('pointzm') assert lyr.GetGeomType() == ogr.wkbPointZM f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != 'POINT ZM (1 2 3 4)': f.DumpReadable() pytest.fail() ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_29.gpkg') ############################################################################### # Test non standard file extension (#6396) def test_ogr_gpkg_30(): with gdaltest.error_handler(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_30.geopkg') assert ds is not None assert gdal.GetLastErrorMsg() != '' ds = None with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_30.geopkg', update=1) assert ds is not None assert gdal.GetLastErrorMsg() != '' ds = None with gdaltest.error_handler(): gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_30.geopkg') ############################################################################### # Test CURVE and SURFACE types def test_ogr_gpkg_31(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_31.gpkg') lyr = ds.CreateLayer('curve', geom_type=ogr.wkbCurve) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (1 2,3 4)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('COMPOUNDCURVE ((1 2,3 4))')) lyr.CreateFeature(f) lyr = ds.CreateLayer('surface', geom_type=ogr.wkbSurface) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('CURVEPOLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_31.gpkg') lyr = ds.GetLayerByName('curve') assert lyr.GetGeomType() == ogr.wkbCurve lyr = ds.GetLayerByName('surface') assert lyr.GetGeomType() == ogr.wkbSurface ds = None assert validate('/vsimem/ogr_gpkg_31.gpkg'), 'validation failed' gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_31.gpkg') ############################################################################### # Run creating a non-spatial layer that isn't registered as 'aspatial' and # read it back def test_ogr_gpkg_32(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_32.gpkg') ds.CreateLayer('aspatial', geom_type=ogr.wkbNone, options=['ASPATIAL_VARIANT=NOT_REGISTERED']) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_32.gpkg') assert ds.GetLayerCount() == 1 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_contents WHERE table_name != 'ogr_empty_table'") assert sql_lyr.GetFeatureCount() == 0 ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_geometry_columns WHERE table_name != 'ogr_empty_table'") assert sql_lyr.GetFeatureCount() == 0 ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 ds.ReleaseResultSet(sql_lyr) ds = None assert validate('/vsimem/ogr_gpkg_32.gpkg'), 'validation failed' gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_32.gpkg') ############################################################################### # Test OGR_CURRENT_DATE def test_ogr_gpkg_33(): gdal.SetConfigOption('OGR_CURRENT_DATE', '2000-01-01T:00:00:00.000Z') ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_33.gpkg') ds.CreateLayer('test', geom_type=ogr.wkbNone) ds = None gdal.SetConfigOption('OGR_CURRENT_DATE', None) ds = ogr.Open('/vsimem/ogr_gpkg_33.gpkg') sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_contents WHERE last_change = '2000-01-01T:00:00:00.000Z' AND table_name != 'ogr_empty_table'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_33.gpkg') ############################################################################### # Test rename and delete a layer registered in extensions, metadata, spatial index etc def test_ogr_gpkg_34(): layer_name = """weird'layer"name""" dbname = '/vsimem/ogr_gpkg_34.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer(layer_name, geom_type=ogr.wkbCurvePolygon) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('CURVEPOLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) lyr.SetMetadataItem('FOO', 'BAR') ds.ExecuteSQL("""CREATE TABLE gpkg_data_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, name TEXT UNIQUE, title TEXT, description TEXT, mime_type TEXT, constraint_name TEXT, CONSTRAINT pk_gdc PRIMARY KEY (table_name, column_name), CONSTRAINT fk_gdc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name) )""") ds.ExecuteSQL("INSERT INTO gpkg_data_columns VALUES('weird''layer\"name', 'foo', 'foo_constraints', NULL, NULL, NULL, NULL)") ds = None # Check that there are reference to the layer f = gdal.VSIFOpenL(dbname, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert layer_name in content ds = ogr.Open(dbname, update=1) new_layer_name = """weird2'layer"name""" with gdaltest.error_handler(): ds.ExecuteSQL('ALTER TABLE "weird\'layer""name" RENAME TO gpkg_contents') assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() ds.ExecuteSQL('ALTER TABLE "weird\'layer""name" RENAME TO "weird2\'layer""name"') ds.ExecuteSQL('VACUUM') ds = None # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(dbname, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert layer_name not in content layer_name = new_layer_name ds = ogr.Open(dbname, update=1) with gdaltest.error_handler(): ds.ExecuteSQL('DELLAYER:does_not_exist') assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() ds.ExecuteSQL('DELLAYER:' + layer_name) assert gdal.GetLastErrorMsg() == '' ds.ExecuteSQL('VACUUM') ds = None # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(dbname, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert layer_name not in content gdaltest.gpkg_dr.DeleteDataSource(dbname) # Try again with DROP TABLE syntax ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer(layer_name, geom_type=ogr.wkbCurvePolygon) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('CURVEPOLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) lyr.SetMetadataItem('FOO', 'BAR') lyr = ds.CreateLayer('another_layer_name') ds = None ds = ogr.Open(dbname, update=1) ds.ExecuteSQL('DROP TABLE "weird2\'layer""name"') assert gdal.GetLastErrorMsg() == '' ds.ExecuteSQL('DROP TABLE another_layer_name') assert gdal.GetLastErrorMsg() == '' with gdaltest.error_handler(): ds.ExecuteSQL('DROP TABLE "foobar"') assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() ds.ExecuteSQL('VACUUM') ds = None # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(dbname, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert layer_name not in content assert 'another_layer_name' not in content gdaltest.gpkg_dr.DeleteDataSource(dbname) ############################################################################### # Test DeleteField() def test_ogr_gpkg_35(): dbname = '/vsimem/ogr_gpkg_35.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer('test', geom_type=ogr.wkbPolygon) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('bar_i_will_disappear', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('baz', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(10) f.SetField('foo', 'fooval') f.SetField('bar_i_will_disappear', 'barval') f.SetField('baz', 'bazval') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) lyr_nonspatial = ds.CreateLayer('test_nonspatial', geom_type=ogr.wkbNone) lyr_nonspatial.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr_nonspatial.CreateField(ogr.FieldDefn('bar_i_will_disappear', ogr.OFTString)) lyr_nonspatial.CreateField(ogr.FieldDefn('baz', ogr.OFTString)) f = ogr.Feature(lyr_nonspatial.GetLayerDefn()) f.SetFID(10) f.SetField('foo', 'fooval') f.SetField('bar_i_will_disappear', 'barval') f.SetField('baz', 'bazval') lyr_nonspatial.CreateFeature(f) ds.ExecuteSQL("""CREATE TABLE gpkg_data_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, name TEXT UNIQUE, title TEXT, description TEXT, mime_type TEXT, constraint_name TEXT, CONSTRAINT pk_gdc PRIMARY KEY (table_name, column_name), CONSTRAINT fk_gdc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name) )""") ds.ExecuteSQL("INSERT INTO gpkg_data_columns VALUES('test', 'bar_i_will_disappear', 'bar_constraints', NULL, NULL, NULL, NULL)") ds.ExecuteSQL("INSERT INTO gpkg_extensions VALUES('test', 'bar_i_will_disappear', 'extension_name', 'definition', 'scope')") assert lyr.TestCapability(ogr.OLCDeleteField) == 1 with gdaltest.error_handler(): ret = lyr.DeleteField(-1) assert ret != 0 with gdaltest.error_handler(): ret = lyr.DeleteField(lyr.GetLayerDefn().GetFieldCount()) assert ret != 0 assert lyr.DeleteField(1) == 0 assert lyr.GetLayerDefn().GetFieldCount() == 2 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 10 or f['foo'] != 'fooval' or f['baz'] != 'bazval' or \ f.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,0 0))': f.DumpReadable() pytest.fail() lyr.StartTransaction() ret = lyr_nonspatial.DeleteField(1) lyr.CommitTransaction() assert ret == 0 lyr_nonspatial.ResetReading() f = lyr_nonspatial.GetNextFeature() if f.GetFID() != 10 or f['foo'] != 'fooval' or f['baz'] != 'bazval': f.DumpReadable() pytest.fail() ds.ExecuteSQL('VACUUM') ds = None # Try on read-only dataset ds = ogr.Open(dbname) lyr = ds.GetLayer(0) with gdaltest.error_handler(): ret = lyr.DeleteField(0) assert ret != 0 ds = None # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(dbname, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert 'bar_i_will_disappear' not in content gdaltest.gpkg_dr.DeleteDataSource(dbname) ############################################################################### # Test AlterFieldDefn() def test_ogr_gpkg_36(): dbname = '/vsimem/ogr_gpkg_36.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer('test', geom_type=ogr.wkbPolygon) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('baz', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(10) f.SetField('foo', '10.5') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None ds.ExecuteSQL("""CREATE TABLE gpkg_data_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, name TEXT UNIQUE, title TEXT, description TEXT, mime_type TEXT, constraint_name TEXT, CONSTRAINT pk_gdc PRIMARY KEY (table_name, column_name), CONSTRAINT fk_gdc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name) )""") ds.ExecuteSQL("INSERT INTO gpkg_data_columns VALUES('test', 'foo', 'constraint', NULL, NULL, NULL, NULL)") ds.ExecuteSQL("INSERT INTO gpkg_extensions VALUES('test', 'foo', 'extension_name', 'definition', 'scope')") ds.ExecuteSQL("CREATE INDEX my_idx ON test(foo)") assert lyr.TestCapability(ogr.OLCAlterFieldDefn) == 1 with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(-1, ogr.FieldDefn('foo'), ogr.ALTER_ALL_FLAG) assert ret != 0 with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(1, ogr.FieldDefn('foo'), ogr.ALTER_ALL_FLAG) assert ret != 0 with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(0, ogr.FieldDefn(lyr.GetGeometryColumn()), ogr.ALTER_ALL_FLAG) assert ret != 0 with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(0, ogr.FieldDefn(lyr.GetFIDColumn()), ogr.ALTER_ALL_FLAG) assert ret != 0 with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(0, ogr.FieldDefn('baz'), ogr.ALTER_ALL_FLAG) assert ret != 0 new_field_defn = ogr.FieldDefn('bar', ogr.OFTReal) new_field_defn.SetSubType(ogr.OFSTFloat32) assert lyr.AlterFieldDefn(0, new_field_defn, ogr.ALTER_ALL_FLAG) == 0 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 10 or f['bar'] != 10.5 or \ f.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,0 0))': f.DumpReadable() pytest.fail() f = None lyr.StartTransaction() new_field_defn = ogr.FieldDefn('baw', ogr.OFTString) assert lyr.AlterFieldDefn(0, new_field_defn, ogr.ALTER_ALL_FLAG) == 0 lyr.CommitTransaction() lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 10 or f['baw'] != '10.5' or \ f.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,0 0))': f.DumpReadable() pytest.fail() f = None # Check that index has been recreated sql_lyr = ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE name = 'my_idx'") f = sql_lyr.GetNextFeature() assert f is not None f = None ds.ReleaseResultSet(sql_lyr) ds.ExecuteSQL('VACUUM') ds = None # Try on read-only dataset ds = ogr.Open(dbname) lyr = ds.GetLayer(0) with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(0, ogr.FieldDefn('foo'), ogr.ALTER_ALL_FLAG) assert ret != 0 ds = None # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(dbname, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert 'foo' not in content gdaltest.gpkg_dr.DeleteDataSource(dbname) # Test failed DB re-opening ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer('test', geom_type=ogr.wkbPolygon) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) # Unlink before AlterFieldDefn gdal.Unlink(dbname) with gdaltest.error_handler(): ret = lyr.AlterFieldDefn(0, ogr.FieldDefn('bar'), ogr.ALTER_ALL_FLAG) assert ret != 0 with gdaltest.error_handler(): ds = None gdaltest.gpkg_dr.DeleteDataSource(dbname) ############################################################################### # Test ReorderFields() def test_ogr_gpkg_37(): dbname = '/vsimem/ogr_gpkg_37.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer('test', geom_type=ogr.wkbPolygon) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('bar', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(10) f.SetField('foo', 'fooval') f.SetField('bar', 'barval') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) ds.ExecuteSQL("""CREATE TABLE gpkg_data_columns ( table_name TEXT NOT NULL, column_name TEXT NOT NULL, name TEXT UNIQUE, title TEXT, description TEXT, mime_type TEXT, constraint_name TEXT, CONSTRAINT pk_gdc PRIMARY KEY (table_name, column_name), CONSTRAINT fk_gdc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name) )""") ds.ExecuteSQL("INSERT INTO gpkg_data_columns VALUES('test', 'foo', 'constraint', NULL, NULL, NULL, NULL)") ds.ExecuteSQL("INSERT INTO gpkg_extensions VALUES('test', 'foo', 'extension_name', 'definition', 'scope')") ds.ExecuteSQL("CREATE INDEX my_idx_foo ON test(foo)") ds.ExecuteSQL("CREATE INDEX my_idx_bar ON test(bar)") assert lyr.TestCapability(ogr.OLCReorderFields) == 1 with gdaltest.error_handler(): ret = lyr.ReorderFields([-1, -1]) assert ret != 0 assert lyr.ReorderFields([1, 0]) == 0 lyr.ResetReading() assert lyr.GetLayerDefn().GetFieldIndex('foo') == 1 and lyr.GetLayerDefn().GetFieldIndex('bar') == 0 f = lyr.GetNextFeature() if f.GetFID() != 10 or f['foo'] != 'fooval' or f['bar'] != 'barval' or \ f.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,0 0))': f.DumpReadable() pytest.fail() # Check that index has been recreated sql_lyr = ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE name = 'my_idx_foo' OR name = 'my_idx_bar'") assert sql_lyr.GetFeatureCount() == 2 ds.ReleaseResultSet(sql_lyr) ds = None # Try on read-only dataset ds = ogr.Open(dbname) lyr = ds.GetLayer(0) with gdaltest.error_handler(): ret = lyr.ReorderFields([1, 0]) assert ret != 0 ds = None gdaltest.gpkg_dr.DeleteDataSource(dbname) ############################################################################### # Test GetExtent() and RECOMPUTE EXTENT ON def test_ogr_gpkg_38(options=['SPATIAL_INDEX=YES']): dbname = '/vsimem/ogr_gpkg_38.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(dbname) lyr = ds.CreateLayer('test', geom_type=ogr.wkbLineString, options=options) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (1 2,3 4)')) lyr.CreateFeature(f) ds = None # Simulate that extent is not recorded ds = ogr.Open(dbname, update=1) ds.ExecuteSQL('UPDATE gpkg_contents SET min_x = NULL, min_y = NULL, max_x = NULL, max_y = NULL') ds = None ds = ogr.Open(dbname, update=1) lyr = ds.GetLayer(0) extent = lyr.GetExtent(force=0, can_return_null=True) assert extent is None # Test that we can compute the extent of a layer that has none registered in gpkg_contents extent = lyr.GetExtent(force=1) assert extent == (1, 3, 2, 4) sql_lyr = ds.ExecuteSQL('SELECT min_x, min_y, max_x, max_y FROM gpkg_contents') f = sql_lyr.GetNextFeature() if f['min_x'] != 1 or f['min_y'] != 2 or f['max_x'] != 3 or f['max_y'] != 4: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) extent = lyr.GetExtent(force=0) assert extent == (1, 3, 2, 4) # Modify feature f = lyr.GetFeature(1) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (-1 -2,-3 -4)')) lyr.SetFeature(f) # The extent has grown extent = lyr.GetExtent(force=0) assert extent == (-3.0, 3.0, -4.0, 4.0) ds.ExecuteSQL('RECOMPUTE EXTENT ON test') extent = lyr.GetExtent(force=0) assert extent == (-3.0, -1.0, -4.0, -2.0) ds = None ds = ogr.Open(dbname) lyr = ds.GetLayer(0) extent = lyr.GetExtent(force=0) assert extent == (-3.0, -1.0, -4.0, -2.0) ds = None ds = ogr.Open(dbname, update=1) lyr = ds.GetLayer(0) # Delete last feature lyr.DeleteFeature(1) # This should cancel NULLify the extent in gpkg_contents ds.ExecuteSQL('RECOMPUTE EXTENT ON test') extent = lyr.GetExtent(force=0, can_return_null=True) assert extent is None ds = None ds = ogr.Open(dbname) lyr = ds.GetLayer(0) extent = lyr.GetExtent(force=0, can_return_null=True) assert extent is None ds = None gdaltest.gpkg_dr.DeleteDataSource(dbname) def test_ogr_gpkg_38_nospi(): return test_ogr_gpkg_38(options=['SPATIAL_INDEX=NO']) ############################################################################### # Test checking of IDENTIFIER unicity def test_ogr_gpkg_39(): dbname = '/vsimem/ogr_gpkg_39.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(dbname) ds.CreateLayer('test') lyr = ds.CreateLayer('test_with_explicit_identifier', options=['IDENTIFIER=explicit_identifier']) assert lyr is not None # Allow overwriting lyr = ds.CreateLayer('test_with_explicit_identifier', options=['IDENTIFIER=explicit_identifier', 'OVERWRITE=YES']) assert lyr is not None with gdaltest.error_handler(): lyr = ds.CreateLayer('test2', options=['IDENTIFIER=test']) assert lyr is None with gdaltest.error_handler(): lyr = ds.CreateLayer('test2', options=['IDENTIFIER=explicit_identifier']) assert lyr is None ds.ExecuteSQL("INSERT INTO gpkg_contents ( table_name, identifier, data_type ) VALUES ( 'some_table', 'another_identifier', 'some_data_type' )") with gdaltest.error_handler(): lyr = ds.CreateLayer('test2', options=['IDENTIFIER=another_identifier']) assert lyr is None ds = None gdaltest.gpkg_dr.DeleteDataSource(dbname) ############################################################################### # Run creating a non-spatial layer that is registered as 'attributes' and # read it back def test_ogr_gpkg_40(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_40.gpkg') ds.CreateLayer('aspatial', geom_type=ogr.wkbNone, options=['ASPATIAL_VARIANT=GPKG_ATTRIBUTES']) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_40.gpkg') assert ds.GetLayerCount() == 1 sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_contents WHERE table_name != 'ogr_empty_table'") assert sql_lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_geometry_columns WHERE table_name != 'ogr_empty_table'") assert sql_lyr.GetFeatureCount() == 0 ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 ds.ReleaseResultSet(sql_lyr) ds = None assert validate('/vsimem/ogr_gpkg_40.gpkg'), 'validation failed' gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_40.gpkg') ############################################################################### # Test tables without integer primary key (#6799), and unrecognized column type def test_ogr_gpkg_41(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_41.gpkg') ds.ExecuteSQL('CREATE TABLE foo (mycol VARCHAR_ILLEGAL)') ds.ExecuteSQL("INSERT INTO foo VALUES ('myval')") ds.ExecuteSQL("INSERT INTO gpkg_contents (table_name,data_type,identifier,description,last_change,srs_id) VALUES ('foo','attributes','foo','','',0)") ds = None ds = ogr.Open('/vsimem/ogr_gpkg_41.gpkg') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() if f['mycol'] != 'myval' or f.GetFID() != 1: f.DumpReadable() pytest.fail() ds = None ds = ogr.Open('/vsimem/ogr_gpkg_41.gpkg') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetFeature(1) if f['mycol'] != 'myval' or f.GetFID() != 1: f.DumpReadable() pytest.fail() ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_41.gpkg') ############################################################################### # Test feature_count def foo_has_trigger(ds): sql_lyr = ds.ExecuteSQL( "SELECT COUNT(*) FROM sqlite_master WHERE name = 'trigger_insert_feature_count_foo'", dialect='DEBUG') f = sql_lyr.GetNextFeature() has_trigger = f.GetField(0) == 1 f = None ds.ReleaseResultSet(sql_lyr) return has_trigger def get_feature_count_from_gpkg_contents(ds): sql_lyr = ds.ExecuteSQL('SELECT feature_count FROM gpkg_ogr_contents', dialect='DEBUG') f = sql_lyr.GetNextFeature() val = f.GetField(0) f = None ds.ReleaseResultSet(sql_lyr) return val def test_ogr_gpkg_42(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_42.gpkg') lyr = ds.CreateLayer('foo', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('i', ogr.OFTInteger)) for i in range(5): f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, i) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg') lyr = ds.GetLayer(0) assert get_feature_count_from_gpkg_contents(ds) == 5 assert foo_has_trigger(ds) assert lyr.TestCapability(ogr.OLCFastFeatureCount) != 0 ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 10) lyr.CreateFeature(f) # Has been invalidated for now assert get_feature_count_from_gpkg_contents(ds) is None assert not foo_has_trigger(ds) fc = lyr.GetFeatureCount() assert fc == 6 ds.ExecuteSQL('DELETE FROM foo WHERE i = 1') assert foo_has_trigger(ds) assert get_feature_count_from_gpkg_contents(ds) is None fc = lyr.GetFeatureCount() assert fc == 5 assert get_feature_count_from_gpkg_contents(ds) == 5 ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) lyr = ds.GetLayer(0) fc = lyr.GetFeatureCount() assert fc == 5 ds.ExecuteSQL('UPDATE gpkg_ogr_contents SET feature_count = NULL') ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) lyr = ds.GetLayer(0) assert get_feature_count_from_gpkg_contents(ds) is None fc = lyr.GetFeatureCount() assert fc == 5 ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) assert get_feature_count_from_gpkg_contents(ds) == 5 # So as to test that we really read from gpkg_ogr_contents ds.ExecuteSQL('UPDATE gpkg_ogr_contents SET feature_count = 5000') ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) lyr = ds.GetLayer(0) fc = lyr.GetFeatureCount() assert fc == 5000 # Test renaming ds.ExecuteSQL('ALTER TABLE foo RENAME TO bar') ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) sql_lyr = ds.ExecuteSQL("SELECT feature_count FROM gpkg_ogr_contents WHERE table_name = 'bar'", dialect='DEBUG') f = sql_lyr.GetNextFeature() val = f.GetField(0) f = None ds.ReleaseResultSet(sql_lyr) assert val == 5000 # Test layer deletion ds.DeleteLayer(0) sql_lyr = ds.ExecuteSQL("SELECT feature_count FROM gpkg_ogr_contents WHERE table_name != 'ogr_empty_table'", dialect='DEBUG') f = sql_lyr.GetNextFeature() assert f is None ds.ReleaseResultSet(sql_lyr) ds = None # Test without feature_count column ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_42.gpkg', options=['ADD_GPKG_OGR_CONTENTS=FALSE']) lyr = ds.CreateLayer('foo', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('i', ogr.OFTInteger)) for i in range(5): f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, i) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_gpkg_42.gpkg', update=1) # Check that feature_count column is missing sql_lyr = ds.ExecuteSQL('PRAGMA table_info(gpkg_contents)') fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 10 assert not foo_has_trigger(ds) lyr = ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0 fc = lyr.GetFeatureCount() assert fc == 5 f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 10) lyr.CreateFeature(f) lyr = ds.GetLayer(0) fc = lyr.GetFeatureCount() assert fc == 6 ds.ExecuteSQL('DELETE FROM foo WHERE i = 1') fc = lyr.GetFeatureCount() assert fc == 5 ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_42.gpkg') ############################################################################### # Test limitations on number of tables def test_ogr_gpkg_43(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_43.gpkg') ds.StartTransaction() for i in range(1001): ds.ExecuteSQL("INSERT INTO gpkg_contents (table_name, data_type, identifier) " + "VALUES ('tiles%d', 'tiles', 'tiles%d')" % (i + 1, i + 1)) ds.ExecuteSQL("INSERT INTO gpkg_tile_matrix_set VALUES " + "('tiles%d', 0, 440720, 3750120, 441920, 3751320)" % (i + 1)) for i in range(1001): ds.ExecuteSQL("INSERT INTO gpkg_contents (table_name, data_type, identifier) " + "VALUES ('attr%d', 'attributes', 'attr%d')" % (i + 1, i + 1)) ds.ExecuteSQL("CREATE TABLE attr%d (id INTEGER PRIMARY KEY AUTOINCREMENT)" % (i + 1)) ds.CommitTransaction() ds = None ds = gdal.OpenEx('/vsimem/ogr_gpkg_43.gpkg') assert len(ds.GetMetadata_List('SUBDATASETS')) == 2 * 1001 assert ds.GetLayerCount() == 1001 with gdaltest.config_option('OGR_TABLE_LIMIT', '1000'): with gdaltest.error_handler(): ds = gdal.OpenEx('/vsimem/ogr_gpkg_43.gpkg') assert len(ds.GetMetadata_List('SUBDATASETS')) == 2 * 1000 assert ds.GetLayerCount() == 1000 ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_43.gpkg') ############################################################################### # Test GeoPackage without metadata table def test_ogr_gpkg_44(): gdal.SetConfigOption('CREATE_METADATA_TABLES', 'NO') ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_44.gpkg') ds.CreateLayer('foo') ds = None gdal.SetConfigOption('CREATE_METADATA_TABLES', None) assert validate('/vsimem/ogr_gpkg_44.gpkg'), 'validation failed' ds = ogr.Open('/vsimem/ogr_gpkg_44.gpkg') md = ds.GetMetadata() assert md == {} md = ds.GetLayer(0).GetMetadata() assert md == {} sql_lyr = ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE name = 'gpkg_metadata'") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 0 ds = None ds = ogr.Open('/vsimem/ogr_gpkg_44.gpkg', update=1) ds.SetMetadataItem('FOO', 'BAR') ds = None ds = ogr.Open('/vsimem/ogr_gpkg_44.gpkg') md = ds.GetMetadata() assert md == {'FOO': 'BAR'} ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_44.gpkg') ############################################################################### # Test non conformant GeoPackage: table with non INTEGER PRIMARY KEY def test_ogr_gpkg_45(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_45.gpkg') ds.ExecuteSQL('CREATE TABLE test (a INTEGER, b INTEGER, CONSTRAINT pkid_constraint PRIMARY KEY (a, b))') ds.ExecuteSQL("INSERT INTO gpkg_contents ( table_name, identifier, data_type ) VALUES ( 'test', 'test', 'attributes' )") ds = None ds = ogr.Open('/vsimem/ogr_gpkg_45.gpkg') lyr = ds.GetLayer(0) assert lyr.GetFIDColumn() == '' assert lyr.GetLayerDefn().GetFieldCount() == 2 ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_45.gpkg') ############################################################################### # Test spatial view and spatial index def test_ogr_gpkg_46(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_46.gpkg') lyr = ds.CreateLayer('foo') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 1)')) lyr.CreateFeature(f) ds.ExecuteSQL('CREATE VIEW my_view AS SELECT geom AS my_geom, fid AS my_fid FROM foo') ds.ExecuteSQL("INSERT INTO gpkg_contents (table_name, identifier, data_type, srs_id) VALUES ( 'my_view', 'my_view', 'features', 0 )") ds.ExecuteSQL("INSERT INTO gpkg_geometry_columns (table_name, column_name, geometry_type_name, srs_id, z, m) values ('my_view', 'my_geom', 'GEOMETRY', 0, 0, 0)") ds.ExecuteSQL("CREATE VIEW my_view2 AS SELECT geom, fid AS OGC_FID, 'bla' as another_column FROM foo") ds.ExecuteSQL("INSERT INTO gpkg_contents (table_name, identifier, data_type, srs_id) VALUES ( 'my_view2', 'my_view2', 'features', 0 )") ds.ExecuteSQL("INSERT INTO gpkg_geometry_columns (table_name, column_name, geometry_type_name, srs_id, z, m) values ('my_view2', 'geom', 'GEOMETRY', 0, 0, 0)") ds.ExecuteSQL('CREATE VIEW my_view3 AS SELECT a.fid, a.geom, b.fid as fid2 FROM foo a, foo b') ds.ExecuteSQL("INSERT INTO gpkg_contents (table_name, identifier, data_type, srs_id) VALUES ( 'my_view3', 'my_view3', 'features', 0 )") ds.ExecuteSQL("INSERT INTO gpkg_geometry_columns (table_name, column_name, geometry_type_name, srs_id, z, m) values ('my_view3', 'geom', 'GEOMETRY', 0, 0, 0)") ds = None ds = ogr.Open('/vsimem/ogr_gpkg_46.gpkg', update=1) lyr = ds.GetLayerByName('my_view') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetGeometryColumn() == 'my_geom' # Operations not valid on a view with gdaltest.error_handler(): ds.ReleaseResultSet(ds.ExecuteSQL("SELECT CreateSpatialIndex('my_view', 'my_geom')")) ds.ReleaseResultSet(ds.ExecuteSQL("SELECT DisableSpatialIndex('my_view', 'my_geom')")) lyr.AlterFieldDefn(0, lyr.GetLayerDefn().GetFieldDefn(0), ogr.ALTER_ALL_FLAG) lyr.DeleteField(0) lyr.ReorderFields([0]) lyr.CreateField(ogr.FieldDefn('bar')) # Check if spatial index is recognized sql_lyr = ds.ExecuteSQL("SELECT HasSpatialIndex('my_view', 'my_geom')") f = sql_lyr.GetNextFeature() has_spatial_index = f.GetField(0) == 1 ds.ReleaseResultSet(sql_lyr) if not has_spatial_index: ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_46.gpkg') pytest.skip('SQLite likely built without SQLITE_HAS_COLUMN_METADATA') # Effectively test spatial index lyr.SetSpatialFilterRect(-0.5, -0.5, 0.5, 0.5) assert lyr.GetFeatureCount() == 1 f = lyr.GetNextFeature() assert f is not None f = lyr.GetNextFeature() assert f is None # View with FID lyr = ds.GetLayerByName('my_view2') assert lyr.GetLayerDefn().GetFieldCount() == 1 assert lyr.GetFIDColumn() == 'OGC_FID' f = lyr.GetNextFeature() if f.GetFID() != 1 or f.GetField(0) != 'bla': f.DumpReadable() pytest.fail() # View without valid rowid lyr = ds.GetLayerByName('my_view3') assert lyr.GetLayerDefn().GetFieldCount() == 2 f = lyr.GetNextFeature() if f.GetFID() != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetFID() != 1: f.DumpReadable() pytest.fail() f2 = lyr.GetFeature(1) if not f.Equal(f2): f.DumpReadable() f2.DumpReadable() pytest.fail() ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_46.gpkg') ############################################################################### # Test corner case of Identify() def test_ogr_gpkg_47(): gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_47.gpkg') # Set wrong application_id fp = gdal.VSIFOpenL('/vsimem/ogr_gpkg_47.gpkg', 'rb+') gdal.VSIFSeekL(fp, 68, 0) gdal.VSIFWriteL(struct.pack('B' * 4, 0, 0, 0, 0), 4, 1, fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_47.gpkg', update=1) assert ds is not None assert gdal.GetLastErrorMsg() != '' gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', 'NO') ogr.Open('/vsimem/ogr_gpkg_47.gpkg') gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', None) assert gdal.GetLastErrorMsg() == '' gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_47.gpkg', options=['VERSION=1.2']) # Set wrong user_version fp = gdal.VSIFOpenL('/vsimem/ogr_gpkg_47.gpkg', 'rb+') gdal.VSIFSeekL(fp, 60, 0) gdal.VSIFWriteL(struct.pack('B' * 4, 0, 0, 0, 0), 4, 1, fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_47.gpkg', update=1) assert ds is not None assert gdal.GetLastErrorMsg() != '' ds = None gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', 'NO') ogr.Open('/vsimem/ogr_gpkg_47.gpkg') gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', None) assert gdal.GetLastErrorMsg() == '' # Set GPKG 1.2.1 gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_47.gpkg', options=['VERSION=1.2']) # Set user_version fp = gdal.VSIFOpenL('/vsimem/ogr_gpkg_47.gpkg', 'rb+') gdal.VSIFSeekL(fp, 60, 0) gdal.VSIFWriteL(struct.pack('B' * 4, 0, 0, 0x27, 0xD9), 4, 1, fp) gdal.VSIFCloseL(fp) ds = ogr.Open('/vsimem/ogr_gpkg_47.gpkg', update=1) assert ds is not None assert gdal.GetLastErrorMsg() == '' ds = None gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', 'NO') ogr.Open('/vsimem/ogr_gpkg_47.gpkg') gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', None) assert gdal.GetLastErrorMsg() == '' # Set GPKG 1.3.0 gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_47.gpkg', options=['VERSION=1.2']) # Set user_version fp = gdal.VSIFOpenL('/vsimem/ogr_gpkg_47.gpkg', 'rb+') gdal.VSIFSeekL(fp, 60, 0) gdal.VSIFWriteL(struct.pack('B' * 4, 0, 0, 0x28, 0x3C), 4, 1, fp) gdal.VSIFCloseL(fp) with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_gpkg_47.gpkg', update=1) assert ds is not None assert gdal.GetLastErrorMsg() != '' gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', 'NO') ogr.Open('/vsimem/ogr_gpkg_47.gpkg') gdal.SetConfigOption('GPKG_WARN_UNRECOGNIZED_APPLICATION_ID', None) assert gdal.GetLastErrorMsg() == '' # Just for the sake of coverage testing in DEBUG mode with gdaltest.error_handler(): gdaltest.gpkg_dr.CreateDataSource('/vsimem/.cur_input') # Set wrong application_id fp = gdal.VSIFOpenL('/vsimem/.cur_input', 'rb+') gdal.VSIFSeekL(fp, 68, 0) gdal.VSIFWriteL(struct.pack('B' * 4, 0, 0, 0, 0), 4, 1, fp) gdal.VSIFCloseL(fp) ogr.Open('/vsimem/.cur_input') gdal.Unlink('/vsimem/.cur_input') with gdaltest.error_handler(): gdaltest.gpkg_dr.CreateDataSource('/vsimem/.cur_input', options=['VERSION=1.2']) # Set wrong user_version fp = gdal.VSIFOpenL('/vsimem/.cur_input', 'rb+') gdal.VSIFSeekL(fp, 60, 0) gdal.VSIFWriteL(struct.pack('B' * 4, 0, 0, 0, 0), 4, 1, fp) gdal.VSIFCloseL(fp) ogr.Open('/vsimem/.cur_input') gdal.Unlink('/vsimem/.cur_input') # Test reading in a zip ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_47.gpkg') ds.CreateLayer('foo') ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_gpkg_47.gpkg', 'rb') content = gdal.VSIFReadL(1, 1000000, fp) gdal.VSIFCloseL(fp) fzip = gdal.VSIFOpenL('/vsizip//vsimem/ogr_gpkg_47.zip', 'wb') fp = gdal.VSIFOpenL('/vsizip//vsimem/ogr_gpkg_47.zip/my.gpkg', 'wb') gdal.VSIFWriteL(content, 1, len(content), fp) gdal.VSIFCloseL(fp) gdal.VSIFCloseL(fzip) ds = ogr.Open('/vsizip//vsimem/ogr_gpkg_47.zip') assert ds.GetDriver().GetName() == 'GPKG' ds = None gdal.Unlink('/vsimem/ogr_gpkg_47.zip') gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_47.gpkg') ############################################################################### # Test insertion of features with unset fields def test_ogr_gpkg_48(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_48.gpkg') lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('a')) lyr.CreateField(ogr.FieldDefn('b')) lyr.CreateField(ogr.FieldDefn('c')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('a', 'a') lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('b', 'b') f.SetField('c', 'c') lyr.CreateFeature(f) lyr.ResetReading() f = lyr.GetNextFeature() if f.GetField('a') != 'a' or f.GetField('b') is not None: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('b') != 'b' or f.GetField('c') != 'c' or f.GetField('a') is not None: f.DumpReadable() pytest.fail() # No geom field, one single field with default value lyr = ds.CreateLayer('default_field_no_geom', geom_type=ogr.wkbNone) fld_defn = ogr.FieldDefn('foo') fld_defn.SetDefault('x') lyr.CreateField(fld_defn) f = ogr.Feature(lyr.GetLayerDefn()) assert lyr.CreateFeature(f) == 0 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetField('foo') != 'x': f.DumpReadable() pytest.fail() f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(1) assert lyr.SetFeature(f) == 0 lyr.ResetReading() f = lyr.GetNextFeature() if f.GetField('foo') != 'x': f.DumpReadable() pytest.fail() ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_48.gpkg') ############################################################################### # Test CreateGeomField() on a attributes layer def test_ogr_gpkg_49(): ds = gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_49.gpkg') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['ASPATIAL_VARIANT=GPKG_ATTRIBUTES']) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None field_defn = ogr.GeomFieldDefn('', ogr.wkbPoint) assert lyr.CreateGeomField(field_defn) == 0 ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_49.gpkg') ############################################################################### # Test minimalistic support of definition_12_063 def test_ogr_gpkg_50(): gdal.SetConfigOption('GPKG_ADD_DEFINITION_12_063', 'YES') gdaltest.gpkg_dr.CreateDataSource('/vsimem/ogr_gpkg_50.gpkg') gdal.SetConfigOption('GPKG_ADD_DEFINITION_12_063', None) ds = ogr.Open('/vsimem/ogr_gpkg_50.gpkg', update=1) srs32631 = osr.SpatialReference() srs32631.ImportFromEPSG(32631) ds.CreateLayer('test', srs=srs32631) # No authority node srs_without_org = osr.SpatialReference() srs_without_org.SetFromUserInput("""GEOGCS["another geogcs", DATUM["another datum", SPHEROID["another spheroid",1000,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]""") lyr = ds.CreateLayer('without_org', srs=srs_without_org) ds = None assert validate('/vsimem/ogr_gpkg_50.gpkg'), 'validation failed' ds = ogr.Open('/vsimem/ogr_gpkg_50.gpkg') lyr = ds.GetLayer('test') assert lyr.GetSpatialRef().IsSame(srs32631) lyr = ds.GetLayer('without_org') assert lyr.GetSpatialRef().IsSame(srs_without_org) sql_lyr = ds.ExecuteSQL('SELECT definition_12_063 FROM gpkg_spatial_ref_sys WHERE srs_id = 32631') f = sql_lyr.GetNextFeature() assert f.GetField(0).startswith('PROJCRS["WGS 84 / UTM zone 31N"') ds.ReleaseResultSet(sql_lyr) ds = None gdaltest.gpkg_dr.DeleteDataSource('/vsimem/ogr_gpkg_50.gpkg') ############################################################################### # Test opening a .gpkg.sql file def test_ogr_gpkg_51(): if gdaltest.gpkg_dr.GetMetadataItem("ENABLE_SQL_GPKG_FORMAT") != 'YES': pytest.skip() ds = ogr.Open('data/poly.gpkg.sql') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None ############################################################################### # Test opening a .gpkg file def test_ogr_gpkg_52(): ds = ogr.Open('data/poly_non_conformant.gpkg') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() assert f is not None ############################################################################### # Test opening a .gpkg file with inconsistency regarding table case (#6916) def test_ogr_gpkg_53(): if gdaltest.gpkg_dr.GetMetadataItem("ENABLE_SQL_GPKG_FORMAT") != 'YES': pytest.skip() ds = ogr.Open('data/poly_inconsistent_case.gpkg.sql') assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' data/poly_inconsistent_case.gpkg.sql') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test editing of a database with 2 layers (https://issues.qgis.org/issues/17034) def test_ogr_gpkg_54(): # Must be on a real file system to demonstrate potential locking # issue tmpfile = 'tmp/ogr_gpkg_54.gpkg' ds = ogr.GetDriverByName('GPKG').CreateDataSource(tmpfile) lyr = ds.CreateLayer('layer1', geom_type=ogr.wkbPoint) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('layer2', geom_type=ogr.wkbPoint) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 1)')) lyr.CreateFeature(f) f = None ds = None ds1 = ogr.Open(tmpfile, update=1) ds2 = ogr.Open(tmpfile, update=1) lyr1 = ds1.GetLayer(0) lyr2 = ds2.GetLayer(1) f1 = lyr1.GetFeature(1) f1.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr1.SetFeature(f1) f2 = lyr2.GetFeature(1) f2.SetGeometry(ogr.CreateGeometryFromWkt('POINT (3 4)')) lyr2.SetFeature(f2) f1 = lyr1.GetFeature(1) f1.SetGeometry(ogr.CreateGeometryFromWkt('POINT (5 6)')) lyr1.SetFeature(f1) f2 = lyr2.GetFeature(1) f2.SetGeometry(ogr.CreateGeometryFromWkt('POINT (7 8)')) lyr2.SetFeature(f2) ds1 = None ds2 = None ds = ogr.Open(tmpfile) lyr1 = ds.GetLayer(0) f = lyr1.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (5 6)': f.DumpReadable() pytest.fail() lyr2 = ds.GetLayer(1) f = lyr2.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (7 8)': f.DumpReadable() pytest.fail() ds = None gdal.Unlink(tmpfile) ############################################################################### # Test inserting geometries incompatible with declared layer geometry type def test_ogr_gpkg_55(): tmpfile = '/vsimem/ogr_gpkg_55.gpkg' ds = ogr.GetDriverByName('GPKG').CreateDataSource(tmpfile) lyr = ds.CreateLayer('layer1', geom_type=ogr.wkbLineString) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.ErrorReset() with gdaltest.error_handler(): lyr.CreateFeature(f) assert gdal.GetLastErrorMsg() != '', 'should have warned' f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 1)')) gdal.ErrorReset() lyr.CreateFeature(f) assert gdal.GetLastErrorMsg() == '', 'should NOT have warned' f = None ds = None gdal.Unlink(tmpfile) ############################################################################### # Test FID identification on SQL result layer def test_ogr_gpkg_56(): ds = gdal.VectorTranslate('/vsimem/ogr_gpkg_56.gpkg', 'data/poly.shp', format='GPKG') lyr = ds.ExecuteSQL('select a.fid as fid1, b.fid as fid2 from poly a, poly b order by fid1, fid2') lyr.GetNextFeature() f = lyr.GetNextFeature() if f.GetField('fid1') != 1 or f.GetField('fid2') != 2: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(lyr) ds = None gdal.Unlink('/vsimem/ogr_gpkg_56.gpkg') ############################################################################### # Test opening a corrupted gpkg with duplicated layer names def test_ogr_gpkg_57(): if gdaltest.gpkg_dr.GetMetadataItem("ENABLE_SQL_GPKG_FORMAT") != 'YES': pytest.skip() tmpfile = '/vsimem/tmp.gpkg.txt' gdal.FileFromMemBuffer(tmpfile, """-- SQL GPKG CREATE TABLE gpkg_spatial_ref_sys (srs_name,srs_id,organization,organization_coordsys_id,definition,description); INSERT INTO "gpkg_spatial_ref_sys" VALUES('',0,'NONE',0,'undefined',''); CREATE TABLE gpkg_contents (table_name,data_type,identifier,description,last_change,min_x, min_y,max_x, max_y,srs_id); INSERT INTO "gpkg_contents" VALUES('poly','features','poly','','',NULL,NULL,NULL,NULL,0); INSERT INTO "gpkg_contents" VALUES('poly','features','poly','','',NULL,NULL,NULL,NULL,0); CREATE TABLE gpkg_geometry_columns (table_name,column_name,geometry_type_name,srs_id,z,m); INSERT INTO "gpkg_geometry_columns" VALUES('poly','geom','POLYGON',0,0,0); CREATE TABLE "poly"("fid" INTEGER PRIMARY KEY, "geom" POLYGON); """) with gdaltest.error_handler(): ds = ogr.Open(tmpfile) assert ds.GetLayerCount() == 1, 'bad layer count' assert gdal.GetLastErrorMsg().find('Table poly appearing several times') >= 0, \ 'should NOT have warned' ds = None gdal.Unlink(tmpfile) ############################################################################### # Test overwriting a layer def test_ogr_gpkg_58(): out_filename = '/vsimem/ogr_gpkg_58.gpkg' gdal.VectorTranslate(out_filename, 'data/poly.shp', format='GPKG') gdal.VectorTranslate(out_filename, 'data/poly.shp', format='GPKG', accessMode='overwrite') ds = ogr.Open(out_filename) sql_lyr = ds.ExecuteSQL("SELECT HasSpatialIndex('poly', 'geom')") f = sql_lyr.GetNextFeature() assert f.GetField(0) == 1 ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink(out_filename) ############################################################################### # Test CreateSpatialIndex() def test_ogr_gpkg_59(): out_filename = '/vsimem/ogr_gpkg_59.gpkg' gdal.VectorTranslate(out_filename, 'data/poly.shp', format='GPKG', layerCreationOptions=['SPATIAL_INDEX=NO']) ds = ogr.Open(out_filename, update=1) sql_lyr = ds.ExecuteSQL("SELECT CreateSpatialIndex('poly', 'geom')") f = sql_lyr.GetNextFeature() assert f.GetField(0) == 1 ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink(out_filename) ############################################################################### # Test savepoints def test_ogr_gpkg_savepoint(): filename = '/vsimem/ogr_gpkg_savepoint.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(filename) lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f['str'] = 'foo' lyr.CreateFeature(f) ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) ds.StartTransaction() ds.ExecuteSQL('SAVEPOINT pt') lyr.DeleteFeature(1) ds.ExecuteSQL('ROLLBACK TO SAVEPOINT pt') f = ogr.Feature(lyr.GetLayerDefn()) f['str'] = 'bar' lyr.CreateFeature(f) ds.CommitTransaction() ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 ds = None gdal.Unlink(filename) ############################################################################### # Test that we don't open file handles behind the back of sqlite3 def test_ogr_gpkg_wal(): import test_cli_utilities if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() # needs to be a real file filename = 'tmp/ogr_gpkg_wal.gpkg' with gdaltest.config_option('OGR_SQLITE_JOURNAL', 'WAL'): ds = gdaltest.gpkg_dr.CreateDataSource(filename) ds.CreateLayer('foo') ds = None ds = ogr.Open(filename, update=1) os.stat(filename + '-wal') # Re-open in read-only mode ds_ro = ogr.Open(filename) ds_ro.GetName() os.stat(filename + '-wal') # Test external process to read the file gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ' + filename) # The file must still exist os.stat(filename + '-wal') ds = None ds_ro = None gdal.Unlink(filename) gdal.Unlink(filename + '-wal') gdal.Unlink(filename + '-shm') ############################################################################### # Run test_ogrsf def test_ogr_gpkg_test_ogrsf(): # Do integrity check first sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("PRAGMA integrity_check") feat = sql_lyr.GetNextFeature() assert feat.GetField(0) == 'ok', 'integrity check failed' gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr) import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() gdaltest.gpkg_ds = None # sys.exit(0) ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/gpkg_test.gpkg --config OGR_SQLITE_SYNCHRONOUS OFF') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/gpkg_test.gpkg -sql "select * from tbl_linestring_renamed" --config OGR_SQLITE_SYNCHRONOUS OFF') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test JSon subtype support def test_ogr_gpkg_json(): filename = '/vsimem/ogr_gpkg_json.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(filename) lyr = ds.CreateLayer('test') fld_defn = ogr.FieldDefn('test_json', ogr.OFTString) fld_defn.SetSubType(ogr.OFSTJSON) lyr.CreateField(fld_defn) assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTJSON ds.ReleaseResultSet(ds.ExecuteSQL('SELECT 1 FROM test')) # will crystalize fld_defn = ogr.FieldDefn('test2_json', ogr.OFTString) fld_defn.SetSubType(ogr.OFSTJSON) lyr.CreateField(fld_defn) assert lyr.GetLayerDefn().GetFieldDefn(1).GetSubType() == ogr.OFSTJSON fld_defn = ogr.FieldDefn('test_string', ogr.OFTString) lyr.CreateField(fld_defn) ds = None ds = ogr.Open(filename, update = 1) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTJSON assert lyr.GetLayerDefn().GetFieldDefn(1).GetSubType() == ogr.OFSTJSON # Demote field from JSON new_defn = ogr.FieldDefn('test_was_json_now_string', ogr.OFTString) assert lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('test2_json'), new_defn, ogr.ALTER_ALL_FLAG) == 0 # Alter field to JSON new_defn = ogr.FieldDefn('test_was_string_now_json', ogr.OFTString) new_defn.SetSubType(ogr.OFSTJSON) assert lyr.AlterFieldDefn(lyr.GetLayerDefn().GetFieldIndex('test_string'), new_defn, ogr.ALTER_ALL_FLAG) == 0 # Delete JSON field assert lyr.DeleteField(lyr.GetLayerDefn().GetFieldIndex('test_json')) == 0 ds = None assert validate(filename), 'validation failed' ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert (lyr.GetLayerDefn().GetFieldDefn( lyr.GetLayerDefn().GetFieldIndex('test_was_json_now_string')).GetSubType() == ogr.OFSTNone) assert (lyr.GetLayerDefn().GetFieldDefn( lyr.GetLayerDefn().GetFieldIndex('test_was_string_now_json')).GetSubType() == ogr.OFSTJSON) sql_lyr = ds.ExecuteSQL("SELECT 1 FROM gpkg_data_columns WHERE table_name = 'test'") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 1 ds = None gdal.Unlink(filename) ############################################################################### # Test invalid/non-standard content in records def test_ogr_gpkg_invalid_values_in_records(): filename = '/vsimem/test_ogr_gpkg_invalid_date_content.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(filename) lyr = ds.CreateLayer('test') fld_defn = ogr.FieldDefn('dt', ogr.OFTDateTime) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('d', ogr.OFTDate) lyr.CreateField(fld_defn) for i in range(6): f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds.ExecuteSQL("UPDATE test SET dt = 'foo' WHERE fid = 1") ds.ExecuteSQL("UPDATE test SET d = 'bar' WHERE fid = 2") ds.ExecuteSQL("UPDATE test SET dt = 3 WHERE fid = 3") ds.ExecuteSQL("UPDATE test SET d = 4 WHERE fid = 4") ds.ExecuteSQL("UPDATE test SET dt = '2020/01/21 12:34:56+01' WHERE fid = 5") ds.ExecuteSQL("UPDATE test SET d = '2020/01/21' WHERE fid = 6") lyr.ResetReading() gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == 'Invalid content for record 1 in column dt: foo' assert not f.IsFieldSet('dt') gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == 'Invalid content for record 2 in column d: bar' assert not f.IsFieldSet('d') gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == 'Unexpected data type for record 3 in column dt' assert not f.IsFieldSet('dt') gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == 'Unexpected data type for record 4 in column d' assert not f.IsFieldSet('d') gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == 'Non-conformant content for record 5 in column dt, 2020/01/21 12:34:56+01, successfully parsed' assert f.IsFieldSet('dt') assert f['dt'] == '2020/01/21 12:34:56+01' gdal.ErrorReset() with gdaltest.error_handler(): f = lyr.GetNextFeature() assert gdal.GetLastErrorMsg() == 'Non-conformant content for record 6 in column d, 2020/01/21, successfully parsed' assert f.IsFieldSet('d') assert f['d'] == '2020/01/21' ds = None gdal.Unlink(filename) ############################################################################### # Test creating a table with layer geometry type unknown/GEOMETRY and # geometries of mixed dimensionality def test_ogr_gpkg_mixed_dimensionality_unknown_layer_geometry_type(): filename = '/vsimem/test_ogr_gpkg_mixed_dimensionality_unknown_layer_geometry_type.gpkg' ds = gdaltest.gpkg_dr.CreateDataSource(filename) lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2 3)')) lyr.CreateFeature(f) ds = None assert validate(filename), 'validation failed' ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbUnknown sql_lyr = ds.ExecuteSQL('SELECT z FROM gpkg_geometry_columns') f = sql_lyr.GetNextFeature() assert f.GetField(0) == 2 ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink(filename) ############################################################################### # Test fixing up wrong RTree update3 trigger from GeoPackage < 1.2.1 def test_ogr_gpkg_fixup_wrong_rtree_trigger(): filename = '/vsimem/test_ogr_gpkg_fixup_wrong_rtree_trigger.gpkg' ds = ogr.GetDriverByName('GPKG').CreateDataSource(filename) ds.CreateLayer('test') ds.CreateLayer('test2') ds = None ds = ogr.Open(filename, update = 1) # inject wrong trigger on purpose with the wrong 'OF "geometry" ' part ds.ExecuteSQL('DROP TRIGGER rtree_test_geometry_update3') wrong_trigger = 'CREATE TRIGGER "rtree_test_geometry_update3" AFTER UPDATE OF "geometry" ON "test" WHEN OLD."fid" != NEW."fid" AND (NEW."geometry" NOTNULL AND NOT ST_IsEmpty(NEW."geometry")) BEGIN DELETE FROM "rtree_test_geometry" WHERE id = OLD."fid"; INSERT OR REPLACE INTO "rtree_test_geometry" VALUES (NEW."fid",ST_MinX(NEW."geometry"), ST_MaxX(NEW."geometry"),ST_MinY(NEW."geometry"), ST_MaxY(NEW."geometry")); END' ds.ExecuteSQL(wrong_trigger) ds.ExecuteSQL('DROP TRIGGER rtree_test2_geometry_update3') # Test another potential variant (although not generated by OGR) wrong_trigger2 = 'CREATE TRIGGER "rtree_test2_geometry_update3" AFTER UPDATE OF geometry ON test2 WHEN OLD."fid" != NEW."fid" AND (NEW."geometry" NOTNULL AND NOT ST_IsEmpty(NEW."geometry")) BEGIN DELETE FROM "rtree_test_geometry" WHERE id = OLD."fid"; INSERT OR REPLACE INTO "rtree_test_geometry" VALUES (NEW."fid",ST_MinX(NEW."geometry"), ST_MaxX(NEW."geometry"),ST_MinY(NEW."geometry"), ST_MaxY(NEW."geometry")); END' ds.ExecuteSQL(wrong_trigger2) ds = None # Open in read-only mode ds = ogr.Open(filename) sql_lyr = ds.ExecuteSQL("SELECT sql FROM sqlite_master WHERE type = 'trigger' AND name = 'rtree_test_geometry_update3'") f = sql_lyr.GetNextFeature() sql = f['sql'] ds.ReleaseResultSet(sql_lyr) ds = None assert sql == wrong_trigger # Open in update mode ds = ogr.Open(filename, update = 1) sql_lyr = ds.ExecuteSQL("SELECT sql FROM sqlite_master WHERE type = 'trigger' AND name = 'rtree_test_geometry_update3'") f = sql_lyr.GetNextFeature() sql = f['sql'] ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT sql FROM sqlite_master WHERE type = 'trigger' AND name = 'rtree_test2_geometry_update3'") f = sql_lyr.GetNextFeature() sql2 = f['sql'] ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink(filename) assert sql == 'CREATE TRIGGER "rtree_test_geometry_update3" AFTER UPDATE ON "test" WHEN OLD."fid" != NEW."fid" AND (NEW."geometry" NOTNULL AND NOT ST_IsEmpty(NEW."geometry")) BEGIN DELETE FROM "rtree_test_geometry" WHERE id = OLD."fid"; INSERT OR REPLACE INTO "rtree_test_geometry" VALUES (NEW."fid",ST_MinX(NEW."geometry"), ST_MaxX(NEW."geometry"),ST_MinY(NEW."geometry"), ST_MaxY(NEW."geometry")); END' assert sql2 == 'CREATE TRIGGER "rtree_test2_geometry_update3" AFTER UPDATE ON test2 WHEN OLD."fid" != NEW."fid" AND (NEW."geometry" NOTNULL AND NOT ST_IsEmpty(NEW."geometry")) BEGIN DELETE FROM "rtree_test_geometry" WHERE id = OLD."fid"; INSERT OR REPLACE INTO "rtree_test_geometry" VALUES (NEW."fid",ST_MinX(NEW."geometry"), ST_MaxX(NEW."geometry"),ST_MinY(NEW."geometry"), ST_MaxY(NEW."geometry")); END' ############################################################################### # Remove the test db from the tmp directory def test_ogr_gpkg_cleanup(): gdaltest.gpkg_ds = None if gdal.ReadDir('/vsimem') is not None: print(gdal.ReadDir('/vsimem')) for f in gdal.ReadDir('/vsimem'): gdal.Unlink('/vsimem/' + f) try: os.remove('tmp/gpkg_test.gpkg') except OSError: pass ############################################################################### gdalautotest-3.1.2/ogr/tmp/0000775000175000017500000000000013701057752014271 5ustar evenevengdalautotest-3.1.2/ogr/tmp/do-not-remove0000664000175000017500000000000013701057752016675 0ustar evenevengdalautotest-3.1.2/ogr/ogr_rec.py0000775000175000017500000000403613701060010015446 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_rec.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR REC driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import pytest ############################################################################### def test_ogr_rec_1(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.rec') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 gdalautotest-3.1.2/ogr/ogr_avc.py0000775000175000017500000001304113701060010015442 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_avc.py 79184515dce9423c42e128d82d1d3136018d79b6 2019-08-17 11:53:00 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR AVCE00 and AVCBin drivers # Author: Even Rouault, # ############################################################################### # Copyright (c) 2008-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # def check_content(ds): lyr = ds.GetLayerByName('ARC') expect = ['1', '2', '3', '4', '5', '6', '7'] tr = ogrtest.check_features_against_list(lyr, 'UserID', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'LINESTRING (340099.875 4100200.0,340400.0625 4100399.5,340900.125 4100200.0,340700.03125 4100199.5)', max_error=0.01) == 0) ############################################################################### # Open AVCE00 datasource. def test_ogr_avc_1(): # Example given at Annex A of http://avce00.maptools.org/docs/v7_e00_cover.html avc_ds = ogr.Open('data/test.e00') assert avc_ds.GetLayer(0).GetSpatialRef() is not None, 'expected SRS' if avc_ds is not None: return check_content(avc_ds) pytest.fail() ############################################################################### # Open AVCBin datasource. def test_ogr_avc_2(): avc_ds = ogr.Open('data/testavc/testavc') assert avc_ds.GetLayer(0).GetSpatialRef() is not None, 'expected SRS' if avc_ds is not None: return check_content(avc_ds) pytest.fail() ############################################################################### # Try opening a compressed E00 (which is not supported) def test_ogr_avc_3(): gdal.PushErrorHandler('CPLQuietErrorHandler') avc_ds = ogr.Open('data/compressed.e00') gdal.PopErrorHandler() last_error_msg = gdal.GetLastErrorMsg() assert avc_ds is None, 'expected failure' assert last_error_msg != '', 'expected error message' ############################################################################### # Open larger AVCBin datasource. def test_ogr_avc_4(): for filename in ['data/testpointavc/testpointavc', 'data/testpoint.e00']: avc_ds = ogr.Open(filename) lyr = avc_ds.GetLayer(0) last_feature = None count = 0 for f in lyr: count += 1 last_feature = f assert count == 80, filename count = lyr.GetFeatureCount() assert count == 80, filename if last_feature.GetFieldCount() != 7: f.DumpReadable() pytest.fail(filename) if filename == 'data/testpointavc/testpointavc': fld_name = 'TESTPOINTAVC-ID' else: fld_name = 'WELLS-ID' if last_feature.GetField('ValueId') != 80 or last_feature.GetField(fld_name) != 80: f.DumpReadable() pytest.fail(filename) ############################################################################### # Open AVCBin datasource with polygon def test_ogr_avc_5(): for filename in ['data/testpolyavc/testpolyavc', 'data/testpoly.e00']: avc_ds = ogr.Open(filename) lyr = avc_ds.GetLayerByName('PAL') last_feature = None count = 0 for f in lyr: count += 1 last_feature = f assert count == 3, filename count = lyr.GetFeatureCount() assert count == 3, filename if last_feature.GetFieldCount() != 5: f.DumpReadable() pytest.fail(filename) if last_feature.GetField('ArcIds') != [-4, -5] or last_feature.GetField('AREA') != pytest.approx(9939.059, abs=1e-3): f.DumpReadable() pytest.fail(filename) if filename == 'data/testpolyavc/testpolyavc': expected_wkt = 'POLYGON ((340700.03125 4100199.5,340500.0 4100199.75,340599.96875 4100100.25,340700.03125 4100199.5))' else: expected_wkt = 'POLYGON ((340700.03 4100199.5,340500.0 4100199.8,340599.97 4100100.2,340700.03 4100199.5))' if last_feature.GetGeometryRef().ExportToWkt() != expected_wkt: f.DumpReadable() pytest.fail(filename) gdalautotest-3.1.2/ogr/ogr_esrijson.py0000775000175000017500000005115413701060010016534 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_esrijson.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ESRIJson driver test suite. # Author: Even Rouault # ############################################################################### # Copyright (c) 2009-2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import contextlib from osgeo import ogr from osgeo import gdal import gdaltest import ogrtest import pytest pytestmark = pytest.mark.require_driver('ESRIJson') ############################################################################### # Test utilities def validate_layer(lyr, name, features, typ, fields, box): if name is not None and name != lyr.GetName(): print('Wrong layer name') return False if features != lyr.GetFeatureCount(): print('Wrong number of features') return False lyrDefn = lyr.GetLayerDefn() if lyrDefn is None: print('Layer definition is none') return False if typ != lyrDefn.GetGeomType(): print('Wrong geometry type') print(lyrDefn.GetGeomType()) return False if fields != lyrDefn.GetFieldCount(): print('Wrong number of fields') return False extent = lyr.GetExtent() minx = abs(extent[0] - box[0]) maxx = abs(extent[1] - box[1]) miny = abs(extent[2] - box[2]) maxy = abs(extent[3] - box[3]) if max(minx, maxx, miny, maxy) > 0.0001: print('Wrong spatial extent of layer') print(extent) return False return True ############################################################################### # Test reading ESRI point file def test_ogr_esrijson_read_point(): ds = ogr.Open('data/esripoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('esripoint') assert lyr is not None, 'Missing layer called esripoint' extent = (2, 2, 49, 49) rc = validate_layer(lyr, 'esripoint', 1, ogr.wkbPoint, 4, extent) assert rc ref = lyr.GetSpatialRef() gcs = int(ref.GetAuthorityCode('GEOGCS')) assert gcs == 4326, "Spatial reference was not valid" feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT(2 49)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() if feature.GetFID() != 1: feature.DumpReadable() pytest.fail() if feature.GetFieldAsInteger('fooInt') != 2: feature.DumpReadable() pytest.fail() if feature.GetFieldAsDouble('fooDouble') != 3.4: feature.DumpReadable() pytest.fail() if feature.GetFieldAsString('fooString') != '56': feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI linestring file def test_ogr_esrijson_read_linestring(): ds = ogr.Open('data/esrilinestring.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) extent = (2, 3, 49, 50) rc = validate_layer(lyr, None, 1, ogr.wkbLineString, 0, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('LINESTRING (2 49,3 50)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None # MultiLineString ds = ogr.Open("""{ "geometryType": "esriGeometryPolyline", "fields": [], "features": [ { "geometry": { "paths" : [ [ [2,49],[2.1,49.1] ], [ [3,50],[3.1,50.1] ] ] } } ] }""") lyr = ds.GetLayer(0) feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTILINESTRING ((2 49,2.1 49.1),(3 50,3.1 50.1))') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() ############################################################################### # Test reading ESRI polygon file def test_ogr_esrijson_read_polygon(): ds = ogr.Open('data/esripolygon.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) extent = (-3, 3, 49, 50) rc = validate_layer(lyr, None, 1, ogr.wkbPolygon, 0, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOLYGON (((2 49,2 50,3 50,3 49,2 49),(2.1 49.1,2.1 49.9,2.9 49.9,2.9 49.1,2.1 49.1)),((-2 49,-2 50,-3 50,-3 49,-2 49)))') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ds = ogr.Open('data/esripolygonempty.json') assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayer(0) feature = lyr.GetNextFeature() if feature.GetGeometryRef().ExportToWkt() != 'POLYGON EMPTY': feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI multipoint file def test_ogr_esrijson_read_multipoint(): ds = ogr.Open('data/esrimultipoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) extent = (2, 3, 49, 50) rc = validate_layer(lyr, None, 1, ogr.wkbMultiPoint, 4, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOINT (2 49,3 50)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI point file with z value def test_ogr_esrijson_read_pointz(): ds = ogr.Open('data/esrizpoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) # validate layer doesn't check z, but put it in extent = (2, 2, 49, 49, 1, 1) rc = validate_layer(lyr, None, 1, ogr.wkbPoint, 4, extent) assert rc ref = lyr.GetSpatialRef() gcs = int(ref.GetAuthorityCode('GEOGCS')) assert gcs == 4326, "Spatial reference was not valid" feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT(2 49 1)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() if feature.GetFID() != 1: feature.DumpReadable() pytest.fail() if feature.GetFieldAsInteger('fooInt') != 2: feature.DumpReadable() pytest.fail() if feature.GetFieldAsDouble('fooDouble') != 3.4: feature.DumpReadable() pytest.fail() if feature.GetFieldAsString('fooString') != '56': feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI linestring file with z def test_ogr_esrijson_read_linestringz(): ds = ogr.Open('data/esrizlinestring.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) # validate layer doesn't check z, but put it in extent = (2, 3, 49, 50, 1, 2) rc = validate_layer(lyr, None, 1, ogr.wkbLineString, 0, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('LINESTRING (2 49 1,3 50 2)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI multipoint file with z def test_ogr_esrijson_read_multipointz(): ds = ogr.Open('data/esrizmultipoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) # validate layer doesn't check z, but put it in extent = (2, 3, 49, 50, 1, 2) rc = validate_layer(lyr, None, 1, ogr.wkbMultiPoint, 4, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOINT (2 49 1,3 50 2)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI polygon file with z def test_ogr_esrijson_read_polygonz(): ds = ogr.Open('data/esrizpolygon.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) # validate layer doesn't check z, but put it in extent = (2, 3, 49, 50, 1, 4) rc = validate_layer(lyr, None, 1, ogr.wkbPolygon, 0, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POLYGON ((2 49 1,2 50 2,3 50 3,3 49 4,2 49 1))') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI multipoint file with m, but no z (hasM=true, hasZ omitted) def test_ogr_esrijson_read_multipointm(): ds = ogr.Open('data/esrihasmnozmultipoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) extent = (2, 3, 49, 50) rc = validate_layer(lyr, None, 1, ogr.wkbMultiPoint, 4, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOINT M ((2 49 1),(3 50 2))') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI multipoint file with hasZ=true, but only 2 components. def test_ogr_esrijson_read_pointz_withou_z(): ds = ogr.Open('data/esriinvalidhaszmultipoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) extent = (2, 3, 49, 50) rc = validate_layer(lyr, None, 1, ogr.wkbMultiPoint, 4, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOINT (2 49,3 50)') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test reading ESRI multipoint file with z and m def test_ogr_esrijson_read_multipointzm(): ds = ogr.Open('data/esrizmmultipoint.json') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayer(0) extent = (2, 3, 49, 50) rc = validate_layer(lyr, None, 1, ogr.wkbMultiPoint, 4, extent) assert rc feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOINT ZM ((2 49 1 100),(3 50 2 100))') if ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test ESRI FeatureService scrolling def test_ogr_esrijson_featureservice_scrolling(): @contextlib.contextmanager def cleanup_after_me(): yield files = gdal.ReadDir('/vsimem/esrijson') if files: for f in files: gdal.Unlink('/vsimem/esrijson/' + f) with cleanup_after_me(): with gdaltest.config_option('CPL_CURL_ENABLE_VSIMEM', 'YES'): resultOffset0 = """ { "type":"FeatureCollection", "properties" : { "exceededTransferLimit" : true }, "features" : [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 2, 49 ] }, "properties": { "id": 1, "a_property": 1, } } ] }""" gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1', resultOffset0) ds = ogr.Open('/vsimem/esrijson/test.json?resultRecordCount=1') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 f = lyr.GetNextFeature() assert f is None ds = None gdal.Unlink('/vsimem/esrijson/test.json?resultRecordCount=1') gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=10', resultOffset0) gdal.PushErrorHandler() ds = ogr.Open('/vsimem/esrijson/test.json?resultRecordCount=10') gdal.PopErrorHandler() lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 f = lyr.GetNextFeature() assert f is None ds = None gdal.Unlink('/vsimem/esrijson/test.json?resultRecordCount=10') gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?', resultOffset0) gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1&resultOffset=0', resultOffset0) ds = ogr.Open('/vsimem/esrijson/test.json?') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 f = lyr.GetNextFeature() assert f is None lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 resultOffset1 = """ { "type":"FeatureCollection", "features" : [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 2, 49 ] }, "properties": { "id": 2, "a_property": 1, } } ] }""" gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1&resultOffset=1', resultOffset1) f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 2 f = lyr.GetNextFeature() assert f is None gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2 gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1&returnCountOnly=true', """{ "count": 123456}""") fc = lyr.GetFeatureCount() assert fc == 123456 gdal.PushErrorHandler() extent = lyr.GetExtent() gdal.PopErrorHandler() assert extent == (2, 2, 49, 49) gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1&returnExtentOnly=true&f=geojson', """{"type":"FeatureCollection","bbox":[1, 2, 3, 4],"features":[]}""") extent = lyr.GetExtent() assert extent == (1.0, 3.0, 2.0, 4.0) assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 assert lyr.TestCapability(ogr.OLCFastGetExtent) == 0 assert lyr.TestCapability('foo') == 0 # Test scrolling with ESRI json resultOffset0 = """ { "objectIdFieldName" : "objectid", "geometryType" : "esriGeometryPoint", "fields" : [ { "name" : "objectid", "alias" : "Object ID", "type" : "esriFieldTypeOID" }, ], "features" : [ { "geometry" : { "x" : 2, "y" : 49, "z" : 1 }, "attributes" : { "objectid" : 1 } } ], "exceededTransferLimit": true } """ resultOffset1 = """ { "objectIdFieldName" : "objectid", "geometryType" : "esriGeometryPoint", "fields" : [ { "name" : "objectid", "alias" : "Object ID", "type" : "esriFieldTypeOID" }, ], "features" : [ { "geometry": null, "attributes" : { "objectid" : 20 } } ] } """ gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1', resultOffset0) gdal.FileFromMemBuffer('/vsimem/esrijson/test.json?resultRecordCount=1&resultOffset=1', resultOffset1) ds = ogr.Open('/vsimem/esrijson/test.json?resultRecordCount=1') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 1 f = lyr.GetNextFeature() assert f is not None and f.GetFID() == 20 ds = None gdal.Unlink('/vsimem/esrijson/test.json?resultRecordCount=1') gdal.Unlink('/vsimem/esrijson/test.json?resultRecordCount=1&resultOffset=1') ############################################################################### # Test reading ESRIJSON files starting with {"features":[{"geometry":.... (#7198) def test_ogr_esrijson_read_starting_with_features_geometry(): ds = ogr.Open('data/esrijsonstartingwithfeaturesgeometry.json') assert ds is not None assert ds.GetDriver().GetName() == 'ESRIJSON' lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ############################################################################### # Test ogr.CreateGeometryFromEsriJson() def test_ogr_esrijson_create_geometry_from_esri_json(): with gdaltest.error_handler(): assert not ogr.CreateGeometryFromEsriJson('error') g = ogr.CreateGeometryFromEsriJson('{ "x": 2, "y": 49 }') assert g.ExportToWkt() == 'POINT (2 49)' ############################################################################### # Test for https://github.com/OSGeo/gdal/issues/2007 def test_ogr_esrijson_identify_srs(): data = """ { "objectIdFieldName" : "objectid", "geometryType" : "esriGeometryPoint", "spatialReference":{"wkt":"PROJCS[\\"NAD_1983_StatePlane_Arizona_Central_FIPS_0202_IntlFeet\\",GEOGCS[\\"GCS_North_American_1983\\",DATUM[\\"D_North_American_1983\\",SPHEROID[\\"GRS_1980\\",6378137.0,298.257222101]],PRIMEM[\\"Greenwich\\",0.0],UNIT[\\"Degree\\",0.0174532925199433]],PROJECTION[\\"Transverse_Mercator\\"],PARAMETER[\\"False_Easting\\",700000.0],PARAMETER[\\"False_Northing\\",0.0],PARAMETER[\\"Central_Meridian\\",-111.9166666666667],PARAMETER[\\"Scale_Factor\\",0.9999],PARAMETER[\\"Latitude_Of_Origin\\",31.0],UNIT[\\"Foot\\",0.3048]]"}, "fields" : [], "features" : [] } """ ds = ogr.Open(data) assert ds is not None lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() assert sr assert sr.GetAuthorityCode(None) == '2223' gdalautotest-3.1.2/ogr/ogr_flatgeobuf.py0000664000175000017500000005515113701060010017014 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_flatgeobuf.py a7ac94a34e98c3d126e8fb00d24ed60526e59d8b 2020-02-29 20:10:15 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: FlatGeobuf driver test suite. # Author: Björn Harrtell # ############################################################################### # Copyright (c) 2018-2019, Björn Harrtell # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### try: from BaseHTTPServer import BaseHTTPRequestHandler except ImportError: from http.server import BaseHTTPRequestHandler import os from osgeo import ogr from osgeo import osr from osgeo import gdal import gdaltest import ogrtest import pytest import webserver ### utils def verify_flatgeobuf_copy(name, fids, names): if gdaltest.features is None: print('Missing features collection') return False fname = os.path.join('tmp', name + '.fgb') ds = ogr.Open(fname) if ds is None: print('Can not open \'' + fname + '\'') return False lyr = ds.GetLayer(0) if lyr is None: print('Missing layer') return False ###################################################### # Test attributes ret = ogrtest.check_features_against_list(lyr, 'FID', fids) if ret != 1: print('Wrong values in \'FID\' field') return False lyr.ResetReading() ret = ogrtest.check_features_against_list(lyr, 'NAME', names) if ret != 1: print('Wrong values in \'NAME\' field') return False ###################################################### # Test geometries lyr.ResetReading() for i in range(len(gdaltest.features)): orig_feat = gdaltest.features[i] feat = lyr.GetNextFeature() if feat is None: print('Failed trying to read feature') return False if ogrtest.check_feature_geometry(feat, orig_feat.GetGeometryRef(), max_error=0.001) != 0: print('Geometry test failed') gdaltest.features = None return False gdaltest.features = None lyr = None return True def copy_shape_to_flatgeobuf(name, wkbType, compress=None, options=[]): if gdaltest.flatgeobuf_drv is None: return False if compress is not None: if compress[0:5] == '/vsig': dst_name = os.path.join('/vsigzip/', 'tmp', name + '.fgb' + '.gz') elif compress[0:4] == '/vsiz': dst_name = os.path.join('/vsizip/', 'tmp', name + '.fgb' + '.zip') elif compress == '/vsistdout/': dst_name = compress else: return False else: dst_name = os.path.join('tmp', name + '.fgb') ds = gdaltest.flatgeobuf_drv.CreateDataSource(dst_name) if ds is None: return False ###################################################### # Create layer lyr = ds.CreateLayer(name, None, wkbType, options) if lyr is None: return False ###################################################### # Setup schema (all test shapefiles use common schmea) ogrtest.quick_create_layer_def(lyr, [('FID', ogr.OFTReal), ('NAME', ogr.OFTString)]) ###################################################### # Copy in shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) src_name = os.path.join('data', name + '.shp') shp_ds = ogr.Open(src_name) shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.features = [] while feat is not None: gdaltest.features.append(feat) dst_feat.SetFrom(feat) lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() shp_lyr = None lyr = None ds = None return True ### tests def test_ogr_flatgeobuf_1(): gdaltest.flatgeobuf_drv = ogr.GetDriverByName('FlatGeobuf') if gdaltest.flatgeobuf_drv is not None: return pytest.fail() def test_ogr_flatgeobuf_2(): fgb_ds = ogr.Open('data/testfgb/poly.fgb') fgb_lyr = fgb_ds.GetLayer(0) assert fgb_lyr.TestCapability(ogr.OLCFastGetExtent) assert fgb_lyr.GetExtent() == (478315.53125, 481645.3125, 4762880.5, 4765610.5) # test expected spatial filter feature count consistency assert fgb_lyr.TestCapability(ogr.OLCFastFeatureCount) c = fgb_lyr.GetFeatureCount() assert c == 10 c = fgb_lyr.SetSpatialFilterRect(478315.531250, 4762880.500000, 481645.312500, 4765610.500000) c = fgb_lyr.GetFeatureCount() assert c == 10 c = fgb_lyr.SetSpatialFilterRect(878315.531250, 4762880.500000, 881645.312500, 4765610.500000) c = fgb_lyr.GetFeatureCount() assert c == 0 c = fgb_lyr.SetSpatialFilterRect(479586.0,4764618.6,479808.2,4764797.8) c = fgb_lyr.GetFeatureCount() if ogrtest.have_geos(): assert c == 4 else: assert c == 5 # check that ResetReading does not affect subsequent enumeration or filtering num = len(list([x for x in fgb_lyr])) if ogrtest.have_geos(): assert num == 4 else: assert num == 5 fgb_lyr.ResetReading() c = fgb_lyr.GetFeatureCount() if ogrtest.have_geos(): assert c == 4 else: assert c == 5 fgb_lyr.ResetReading() num = len(list([x for x in fgb_lyr])) if ogrtest.have_geos(): assert num == 4 else: assert num == 5 def test_ogr_flatgeobuf_2_1(): fgb_ds = ogr.Open('data/testfgb/poly_no_index.fgb') fgb_lyr = fgb_ds.GetLayer(0) assert fgb_lyr.TestCapability(ogr.OLCFastGetExtent) is False assert fgb_lyr.GetExtent() == (478315.53125, 481645.3125, 4762880.5, 4765610.5) # test expected spatial filter feature count consistency assert fgb_lyr.TestCapability(ogr.OLCFastFeatureCount) is False c = fgb_lyr.GetFeatureCount() assert c == 10 c = fgb_lyr.SetSpatialFilterRect(478315.531250, 4762880.500000, 481645.312500, 4765610.500000) c = fgb_lyr.GetFeatureCount() assert c == 10 c = fgb_lyr.SetSpatialFilterRect(878315.531250, 4762880.500000, 881645.312500, 4765610.500000) c = fgb_lyr.GetFeatureCount() assert c == 0 c = fgb_lyr.SetSpatialFilterRect(479586.0,4764618.6,479808.2,4764797.8) c = fgb_lyr.GetFeatureCount() if ogrtest.have_geos(): assert c == 4 else: assert c == 5 # check that ResetReading does not affect subsequent enumeration or filtering num = len(list([x for x in fgb_lyr])) if ogrtest.have_geos(): assert num == 4 else: assert num == 5 fgb_lyr.ResetReading() c = fgb_lyr.GetFeatureCount() if ogrtest.have_geos(): assert c == 4 else: assert c == 5 fgb_lyr.ResetReading() num = len(list([x for x in fgb_lyr])) if ogrtest.have_geos(): assert num == 4 else: assert num == 5 def wktRoundtrip(expected): ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/test.fgb') g = ogr.CreateGeometryFromWkt(expected) lyr = ds.CreateLayer('test', None, g.GetGeometryType(), []) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(g) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/test.fgb') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() actual = g.ExportToIsoWkt() ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') assert not gdal.VSIStatL('/vsimem/test.fgb') assert actual == expected def test_ogr_flatgeobuf_3(): if gdaltest.flatgeobuf_drv is None: pytest.skip() wkts = ogrtest.get_wkt_data_series(with_z=True, with_m=True, with_gc=True, with_circular=True, with_surface=True) for wkt in wkts: wktRoundtrip(wkt) # Run test_ogrsf def test_ogr_flatgeobuf_8(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/testfgb/poly.fgb') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 def test_ogr_flatgeobuf_9(): if gdaltest.flatgeobuf_drv is None: pytest.skip() gdaltest.tests = [ ['gjpoint', [1], ['Point 1'], ogr.wkbPoint], ['gjline', [1], ['Line 1'], ogr.wkbLineString], ['gjpoly', [1], ['Polygon 1'], ogr.wkbPolygon], ['gjmultipoint', [1], ['MultiPoint 1'], ogr.wkbMultiPoint], ['gjmultiline', [2], ['MultiLine 1'], ogr.wkbMultiLineString], ['gjmultipoly', [2], ['MultiPoly 1'], ogr.wkbMultiPolygon] ] for i in range(len(gdaltest.tests)): test = gdaltest.tests[i] rc = copy_shape_to_flatgeobuf(test[0], test[3]) assert rc, ('Failed making copy of ' + test[0] + '.shp') rc = verify_flatgeobuf_copy(test[0], test[1], test[2]) assert rc, ('Verification of copy of ' + test[0] + '.shp failed') for i in range(len(gdaltest.tests)): test = gdaltest.tests[i] rc = copy_shape_to_flatgeobuf(test[0], test[3], None, ['SPATIAL_INDEX=NO']) assert rc, ('Failed making copy of ' + test[0] + '.shp') rc = verify_flatgeobuf_copy(test[0], test[1], test[2]) assert rc, ('Verification of copy of ' + test[0] + '.shp failed') # Test support for multiple layers in a directory def test_ogr_flatgeobuf_directory(): if gdaltest.flatgeobuf_drv is None: pytest.skip() ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/multi_layer') with gdaltest.error_handler(): # name will be laundered ds.CreateLayer('foo<', geom_type = ogr.wkbPoint) ds.CreateLayer('bar', geom_type = ogr.wkbPoint) ds = None ds = gdal.OpenEx('/vsimem/multi_layer') assert set(ds.GetFileList()) == set(['/vsimem/multi_layer/bar.fgb', '/vsimem/multi_layer/foo_.fgb']) assert ds.GetLayer('foo<') assert ds.GetLayer('bar') ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/multi_layer') assert not gdal.VSIStatL('/vsimem/multi_layer') def test_ogr_flatgeobuf_srs_epsg(): ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/test.fgb') srs = osr.SpatialReference() srs.ImportFromEPSG(32631) ds.CreateLayer('test', srs = srs, geom_type = ogr.wkbPoint) ds = None ds = ogr.Open('/vsimem/test.fgb') lyr = ds.GetLayer(0) srs_got = lyr.GetSpatialRef() assert srs_got.IsSame(srs) assert srs_got.GetAuthorityName(None) == 'EPSG' assert srs_got.GetAuthorityCode(None) == '32631' ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') assert not gdal.VSIStatL('/vsimem/test.fgb') def test_ogr_flatgeobuf_srs_other_authority(): ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/test.fgb') srs = osr.SpatialReference() srs.SetFromUserInput("ESRI:104009") srs.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ds.CreateLayer('test', srs = srs, geom_type = ogr.wkbPoint) ds = None ds = ogr.Open('/vsimem/test.fgb') lyr = ds.GetLayer(0) srs_got = lyr.GetSpatialRef() assert srs_got.IsSame(srs) assert srs_got.GetAuthorityName(None) == 'ESRI' assert srs_got.GetAuthorityCode(None) == '104009' ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') assert not gdal.VSIStatL('/vsimem/test.fgb') def test_ogr_flatgeobuf_srs_no_authority(): ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/test.fgb') srs = osr.SpatialReference() srs.SetFromUserInput("+proj=longlat +ellps=clrk66") ds.CreateLayer('test', srs = srs, geom_type = ogr.wkbPoint) ds = None ds = ogr.Open('/vsimem/test.fgb') lyr = ds.GetLayer(0) srs_got = lyr.GetSpatialRef() assert srs_got.IsSame(srs) assert srs_got.GetAuthorityName(None) is None ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') assert not gdal.VSIStatL('/vsimem/test.fgb') def test_ogr_flatgeobuf_datatypes(): ds = ogr.Open('data/testfgb/testdatatypes.fgb') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['int'] == 1 assert f['int64'] == 1234567890123 assert f['double'] == 1.25 assert f['string'] == 'my string' assert f['datetime'] == '2019/10/15 12:34:56.789+00' def test_ogr_flatgeobuf_alldatatypes(): ds = ogr.Open('data/testfgb/alldatatypes.fgb') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['byte'] == -1 assert f['ubyte'] == 255 assert f['bool'] == 1 assert f['short'] == -1 assert f['ushort'] == 65535 assert f['int'] == -1 assert f['uint'] == 4294967295 assert f['long'] == -1 assert f['ulong'] == float(2**64 - 1) assert f['float'] == 0 assert f['double'] == 0 assert f['string'] == 'X' assert f['json'] == 'X' assert f['datetime'] == '2020/02/29 12:34:56+00' assert f.GetFieldAsBinary('binary') == b'\x58' def test_ogr_flatgeobuf_mixed(): srcDS = gdal.OpenEx('data/testfgb/testmixed.geojson') destDS = gdal.VectorTranslate('/vsimem/test.fgb', srcDS=srcDS, format = 'FlatGeobuf', layerCreationOptions = ['SPATIAL_INDEX=NO']) srcDS = None destDS = None srcDS = ogr.Open('data/testfgb/testmixed.geojson') destDS = ogr.Open('/vsimem/test.fgb') srcLyr = srcDS.GetLayer(0) destLyr = destDS.GetLayer(0) ogrtest.compare_layers(srcLyr, destLyr) ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') assert not gdal.VSIStatL('/vsimem/test.fgb') ############################################################################### do_log = False class WFSHTTPHandler(BaseHTTPRequestHandler): def log_request(self, code='-', size='-'): pass def do_GET(self): try: if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() if self.path.find('/fakewfs') != -1: if self.path == '/fakewfs?SERVICE=WFS&REQUEST=GetCapabilities' or \ self.path == '/fakewfs?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() f = open('data/testfgb/wfs/get_capabilities.xml', 'rb') content = f.read() f.close() self.wfile.write(content) return if self.path == '/fakewfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=topp:tasmania_water_bodies': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() f = open('data/testfgb/wfs/describe_feature_type.xml', 'rb') content = f.read() f.close() self.wfile.write(content) return if self.path == '/fakewfs?OUTPUTFORMAT=application/flatgeobuf&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=topp:tasmania_water_bodies': self.send_response(200) self.send_header('Content-type', 'application/flatgeobuf') self.end_headers() f = open('data/testfgb/wfs/get_feature.fgb', 'rb') content = f.read() f.close() self.wfile.write(content) return return except IOError: pass self.send_error(404, 'File Not Found: %s' % self.path) @pytest.fixture(autouse=True, scope='module') def ogr_wfs_init(): gdaltest.wfs_drv = ogr.GetDriverByName('WFS') def test_ogr_wfs_fake_wfs_server(): if gdaltest.wfs_drv is None: pytest.skip() (process, port) = webserver.launch(handler=WFSHTTPHandler) if port == 0: pytest.skip() gdal.SetConfigOption('OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN', 'NO') ds = ogr.Open("WFS:http://127.0.0.1:%d/fakewfs?OUTPUTFORMAT=application/flatgeobuf" % port) gdal.SetConfigOption('OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN', None) if ds is None: webserver.server_stop(process, port) pytest.fail('did not managed to open WFS datastore') lyr = ds.GetLayerByName('topp:tasmania_water_bodies') if lyr == None: webserver.server_stop(process, port) pytest.fail('did not get expected layer') name = lyr.GetName() if name != 'topp:tasmania_water_bodies': print(name) webserver.server_stop(process, port) pytest.fail('did not get expected layer name (got %s)' % name) feat = lyr.GetNextFeature() if feat.GetField('CONTINENT') != 'Australia' or \ ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON (((146.232727 -42.157501,146.238007 -42.16111,146.24411 -42.169724,146.257202 -42.193329,146.272217 -42.209442,146.274689 -42.214165,146.27832 -42.21833,146.282471 -42.228882,146.282745 -42.241943,146.291351 -42.255836,146.290253 -42.261948,146.288025 -42.267502,146.282471 -42.269997,146.274994 -42.271111,146.266663 -42.270279,146.251373 -42.262505,146.246918 -42.258057,146.241333 -42.256111,146.23468 -42.257782,146.221344 -42.269165,146.210785 -42.274445,146.20163 -42.27417,146.196075 -42.271385,146.186646 -42.258057,146.188568 -42.252785,146.193298 -42.249443,146.200806 -42.248055,146.209137 -42.249168,146.217468 -42.248611,146.222473 -42.245277,146.22525 -42.240555,146.224121 -42.22805,146.224396 -42.221382,146.228302 -42.217216,146.231354 -42.212502,146.231628 -42.205559,146.219421 -42.186943,146.21637 -42.17028,146.216644 -42.16333,146.219696 -42.158607,146.225525 -42.156105,146.232727 -42.157501)))', max_error=0.00001) != 0: feat.DumpReadable() webserver.server_stop(process, port) pytest.fail('did not get expected feature') webserver.server_stop(process, port) def test_ogr_flatgeobuf_bool_short_float_binary(): ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/test.fgb') lyr = ds.CreateLayer('test', geom_type = ogr.wkbPoint) fld_defn = ogr.FieldDefn('bool', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('short', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('float', ogr.OFTReal) fld_defn.SetSubType(ogr.OFSTFloat32) lyr.CreateField(fld_defn) lyr.CreateField(ogr.FieldDefn('bin', ogr.OFTBinary)) f = ogr.Feature(lyr.GetLayerDefn()) f['bool'] = True f['short'] = -32768; f['float'] = 1.5; f.SetFieldBinaryFromHexString('bin', '01FF') f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (0 0)')) lyr.CreateFeature(f) # Field of size 0 f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldBinaryFromHexString('bin', '') f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (0 0)')) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/test.fgb') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTBoolean assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(1).GetSubType() == ogr.OFSTInt16 assert lyr.GetLayerDefn().GetFieldDefn(2).GetType() == ogr.OFTReal assert lyr.GetLayerDefn().GetFieldDefn(2).GetSubType() == ogr.OFSTFloat32 assert lyr.GetLayerDefn().GetFieldDefn(3).GetType() == ogr.OFTBinary f = lyr.GetNextFeature() assert f['bool'] == True assert f['short'] == -32768 assert f['float'] == 1.5 assert f.GetFieldAsBinary('bin') == b'\x01\xFF' f = lyr.GetNextFeature() assert f.GetFieldAsBinary('bin') == b'' ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') assert not gdal.VSIStatL('/vsimem/test.fgb') @pytest.mark.parametrize("options", [[], ['SPATIAL_INDEX=NO']], ids=['spatial_index', 'no_spatial_index']) def test_ogr_flatgeobuf_write_to_vsizip(options): srcDS = gdal.OpenEx('data/poly.shp') destDS = gdal.VectorTranslate('/vsizip//vsimem/test.fgb.zip/test.fgb', srcDS=srcDS, format='FlatGeobuf', layerCreationOptions=options) assert destDS is not None destDS = None destDS = ogr.Open('/vsizip//vsimem/test.fgb.zip/test.fgb') srcLyr = srcDS.GetLayer(0) dstLyr = destDS.GetLayer(0) assert dstLyr.GetFeatureCount() == srcLyr.GetFeatureCount() dstF = dstLyr.GetNextFeature() assert dstF is not None destDS = None gdal.Unlink('/vsimem/test.fgb.zip') def test_ogr_flatgeobuf_huge_number_of_columns(): ds = ogr.GetDriverByName('FlatGeobuf').CreateDataSource('/vsimem/test.fgb') lyr = ds.CreateLayer('test', geom_type = ogr.wkbPoint) for i in range(65536): assert lyr.CreateField(ogr.FieldDefn('col%d' % i, ogr.OFTInteger)) == ogr.OGRERR_NONE, i with gdaltest.error_handler(): assert lyr.CreateField(ogr.FieldDefn('col65536', ogr.OFTInteger)) == ogr.OGRERR_FAILURE f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (0 0)')) for i in range(65536): f.SetField(i, i) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/test.fgb') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() for i in range(65536): assert f.GetField(i) == i ds = None ogr.GetDriverByName('FlatGeobuf').DeleteDataSource('/vsimem/test.fgb') gdalautotest-3.1.2/ogr/ogr_sua.py0000775000175000017500000007642613701060010015501 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_sua.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR SUA driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import ogr import pytest ############################################################################### # Basic test def test_ogr_sua_1(): ds = ogr.Open('data/za.sua') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() if ogrtest.check_feature_geometry(feat, 'POLYGON ((24.760277777777777 -28.466666666666683,24.766895312434809 -28.46671727367243,24.773510850527718 -28.466869079419723,24.780122395865373 -28.467122038103,24.786727953485673 -28.467476073394735,24.793325530310469 -28.467931078467672,24.799913135516679 -28.468486916026166,24.806488781187785 -28.469143418346533,24.813050482985464 -28.469900387326192,24.819596260561802 -28.47075759454188,24.826124138325216 -28.47171478131645,24.832632145879771 -28.472771658795054,24.839118318703743 -28.47392790802968,24.845580698630823 -28.475183180072875,24.852017334528803 -28.476537096080108,24.858426282776776 -28.47798924742105,24.86480560789666 -28.479539195799475,24.871153383126547 -28.481186473381939,24.877467690931773 -28.482930582935339,24.883746623625481 -28.48477099797276,24.889988283903538 -28.486707162908274,24.896190785431472 -28.48873849322014,24.902352253349676 -28.490864375622735,24.908470824878808 -28.493084168246597,24.914544649847166 -28.495397200827426,24.920571891246279 -28.497802774903008,24.926550725747585 -28.500300164018839,24.932479344288705 -28.502888613941764,24.938355952571698 -28.505567342882131,24.944178771610126 -28.508335541723795,24.949946038264724 -28.511192374262492,24.955656005751909 -28.514136977452182,24.961306944165695 -28.517168461659423,24.966897141013046 -28.520285910925423,24.972424901704478 -28.523488383236369,24.977888550056022 -28.526774910801166,24.983286428814758 -28.530144500336959,24.988616900132001 -28.533596133362522,24.99387834606733 -28.537128766498796,24.999069169069763 -28.540741331777156,25.004187792453038 -28.544432736955102,25.009232660883608 -28.548201865839104,25.014202240830937 -28.552047578614662,25.019095021044684 -28.555968712183585,25.02390951301135 -28.559964080508252,25.028644251401499 -28.564032474962829,25.033297794511821 -28.568172664691346,25.037868724701763 -28.572383396972441,25.042355648839958 -28.576663397590849,25.046757198702647 -28.581011371215411,25.051072031428639 -28.585426001783489,25.055298829890791 -28.589905952891769,25.059436303127992 -28.594449868193294,25.063483186732412 -28.599056371800572,25.067438243238151 -28.603724068694731,25.071300262513763 -28.608451545140568,25.075068062113562 -28.613237369107495,25.078740487674832 -28.618080090695855,25.082316413248837 -28.622978242569175,25.085794741684015 -28.627930340391472,25.089174404927817 -28.632934883270281,25.092454364404489 -28.637990354204419,25.095633611313403 -28.643095220537134,25.098711166955503 -28.64824793441413,25.10168608305365 -28.653446933246229,25.104557442038406 -28.658690640176914,25.107324357344936 -28.663977464554407,25.109985973715663 -28.669305802407834,25.112541467439499 -28.674674036928209,25.114990046654459 -28.680080538952993,25.117330951578985 -28.685523667455101,25.119563454781961 -28.691001770035456,25.121686861395737 -28.696513183419484,25.123700509365641 -28.702056233957038,25.125603769666306 -28.707629238125719,25.127396046506441 -28.713230503037792,25.129076777527761 -28.718858326949757,25.130645434008265 -28.724510999775319,25.13210152102771 -28.730186803601043,25.133444577652867 -28.735884013204668,25.134674177090211 -28.741600896576003,25.135789926836566 -28.7473357154403,25.136791468828061 -28.753086725783632,25.137678479562659 -28.758852178380579,25.138450670228519 -28.764630319323757,25.139107786806342 -28.770419390555091,25.139649610175514 -28.776217630398676,25.140075956205322 -28.782023274095195,25.140386675823155 -28.787834554337508,25.140581655100206 -28.793649701807396,25.140660815291394 -28.799466945713419,25.140624112899374 -28.805284514329315,25.140471539698027 -28.811100635533307,25.140203122769478 -28.816913537347659,25.139818924509857 -28.822721448478802,25.139319042644907 -28.828522598857376,25.138703610206345 -28.834315220178425,25.137972795537667 -28.840097546441314,25.137126802248048 -28.845867814489324,25.136165869182687 -28.85162426454886,25.135090270371048 -28.857365140767754,25.133900314962272 -28.863088691752992,25.132596347160835 -28.868793171107171,25.131178746139458 -28.874476837963954,25.129647925945786 -28.880137957522209,25.128004335404732 -28.885774801578492,25.126248457993494 -28.891385649057952,25.124380811721167 -28.896968786543397,25.122401948989488 -28.902522508802292,25.120312456446726 -28.908045119311723,25.118112954838665 -28.913534930780742,25.11580409880861 -28.918990265670601,25.113386576755399 -28.924409456711885,25.110861110617904 -28.92979084741917,25.108228455676212 -28.935132792602516,25.105489400347579 -28.940433658875676,25.102644765960211 -28.94569182516129,25.099695406505884 -28.950905683192275,25.096642208420011 -28.956073638009698,25.093486090307582 -28.961194108456937,25.090228002679709 -28.96626552766962,25.086868927687608 -28.97128634356163,25.083409878829617 -28.976255019306763,25.079851900655964 -28.981170033815886,25.076196068457499 -28.986029882209536,25.072443487959553 -28.990833076285767,25.068595294982366 -28.995578144983043,25.064652655115509 -29.000263634838049,25.060616763368554 -29.004888110438372,25.05648884380911 -29.009450154869668,25.052270149197888 -29.013948370157522,25.04796196062637 -29.018381377703292,25.043565587113235 -29.022747818714564,25.039082365218423 -29.027046354629377,25.034513658643014 -29.031275667534388,25.029860857809823 -29.035434460576823,25.025125379446433 -29.039521458370103,25.020308666156058 -29.043535407392909,25.015412185972465 -29.047475076381517,25.010437431908937 -29.051339256715593,25.005385921523313 -29.055126762796746,25.000259196426232 -29.05883643242025,24.995058821820685 -29.062467127139698,24.98978638601983 -29.066017732624076,24.984443499974287 -29.069487159007593,24.979031796736475 -29.072874341232009,24.973552930996892 -29.076178239381264,24.96800857854516 -29.079397839008323,24.962400435777845 -29.082532151454132,24.95673021914298 -29.085580214158654,24.950999664626245 -29.088541090963787,24.945210527202558 -29.09141387240804,24.939364580306272 -29.094197676012925,24.933463615254794 -29.096891646561062,24.927509440705947 -29.09949495636549,24.921503882088025 -29.102006805530834,24.915448781031092 -29.104426422205322,24.909345994796006 -29.10675306282441,24.90319739567629 -29.108986012345341,24.897004870446018 -29.11112458447279,24.890770319697953 -29.113168121875631,24.884495657344228 -29.115115996394422,24.878182809944395 -29.116967609239822,24.871833716110423 -29.11872239118189,24.865450325918069 -29.120379802729857,24.859034600277788 -29.121939334302667,24.852588510335149 -29.123400506390141,24.846114036796582 -29.124762869704583,24.83961316938128 -29.1260260053228,24.8330879061436 -29.127189524818803,24.826540252848378 -29.128253070386421,24.819972222345168 -29.129216314952828,24.813385833911177 -29.1300789622818,24.806783112687896 -29.130840747067623,24.800166088946376 -29.131501435018961,24.793536797471898 -29.132060822933184,24.786897276912615 -29.132518738760538,24.780249569276663 -29.132875041658693,24.773595719053805 -29.133129622037345,24.766937772515039 -29.133282401592936,24.760277777777777 -29.13333333333334,24.753617783040514 -29.133282401592936,24.746959836501748 -29.133129622037345,24.740305986278891 -29.132875041658693,24.733658278642938 -29.132518738760538,24.727018758083656 -29.132060822933184,24.720389466609177 -29.131501435018961,24.713772442867658 -29.130840747067623,24.707169721644377 -29.1300789622818,24.700583333210385 -29.129216314952828,24.694015302707175 -29.128253070386421,24.687467649411953 -29.127189524818803,24.680942386174273 -29.1260260053228,24.674441518758972 -29.124762869704583,24.667967045220404 -29.123400506390141,24.661520955277766 -29.121939334302667,24.655105229637485 -29.120379802729857,24.64872183944513 -29.11872239118189,24.642372745611159 -29.116967609239822,24.636059898211325 -29.115115996394422,24.6297852358576 -29.113168121875631,24.623550685109535 -29.11112458447279,24.617358159879263 -29.108986012345341,24.611209560759548 -29.10675306282441,24.605106774524462 -29.104426422205322,24.599051673467528 -29.102006805530834,24.593046114849606 -29.09949495636549,24.587091940300759 -29.096891646561062,24.581190975249282 -29.094197676012925,24.575345028352995 -29.09141387240804,24.569555890929308 -29.088541090963787,24.563825336412574 -29.085580214158654,24.558155119777709 -29.082532151454132,24.552546977010394 -29.079397839008323,24.547002624558662 -29.076178239381264,24.541523758819078 -29.072874341232009,24.536112055581267 -29.069487159007593,24.530769169535724 -29.066017732624076,24.525496733734869 -29.062467127139698,24.520296359129322 -29.05883643242025,24.51516963403224 -29.055126762796746,24.510118123646617 -29.051339256715593,24.505143369583088 -29.047475076381517,24.500246889399495 -29.043535407392909,24.495430176109121 -29.039521458370103,24.490694697745731 -29.035434460576823,24.486041896912539 -29.031275667534388,24.48147319033713 -29.027046354629377,24.476989968442318 -29.022747818714564,24.472593594929183 -29.018381377703292,24.468285406357666 -29.013948370157522,24.464066711746444 -29.009450154869668,24.459938792187 -29.004888110438372,24.455902900440044 -29.000263634838049,24.451960260573188 -28.995578144983043,24.448112067596 -28.990833076285767,24.444359487098055 -28.986029882209536,24.44070365489959 -28.981170033815886,24.437145676725937 -28.976255019306763,24.433686627867946 -28.97128634356163,24.430327552875845 -28.96626552766962,24.427069465247971 -28.961194108456937,24.423913347135542 -28.956073638009698,24.42086014904967 -28.950905683192275,24.417910789595343 -28.94569182516129,24.415066155207974 -28.940433658875676,24.412327099879342 -28.935132792602516,24.409694444937649 -28.92979084741917,24.407168978800154 -28.924409456711885,24.404751456746943 -28.918990265670601,24.402442600716888 -28.913534930780742,24.400243099108827 -28.908045119311723,24.398153606566066 -28.902522508802292,24.396174743834386 -28.896968786543397,24.394307097562059 -28.891385649057952,24.392551220150821 -28.885774801578492,24.390907629609767 -28.880137957522209,24.389376809416095 -28.874476837963954,24.387959208394719 -28.868793171107171,24.386655240593281 -28.863088691752992,24.385465285184505 -28.857365140767754,24.384389686372867 -28.85162426454886,24.383428753306539 -28.845867814489324,24.382582760017886 -28.840097546441314,24.381851945350171 -28.834315220178425,24.381236512910647 -28.828522598857376,24.380736631045696 -28.822721448478802,24.380352432786076 -28.816913537347659,24.380084015857527 -28.811100635533307,24.379931442656179 -28.805284514329315,24.379894740264159 -28.799466945713419,24.379973900455347 -28.793649701807396,24.380168879732398 -28.787834554337508,24.380479599350231 -28.782023274095195,24.380905945380039 -28.776217630398676,24.381447768749211 -28.770419390555091,24.382104885327035 -28.764630319323757,24.382877075992894 -28.758852178380579,24.383764086727492 -28.753086725783632,24.384765628718988 -28.7473357154403,24.385881378465342 -28.741600896576003,24.387110977902687 -28.735884013204668,24.388454034527843 -28.730186803601043,24.389910121547288 -28.724510999775319,24.391478778027793 -28.718858326949757,24.393159509049113 -28.713230503037792,24.394951785889248 -28.707629238125719,24.396855046189913 -28.702056233957038,24.398868694159816 -28.696513183419484,24.400992100773593 -28.691001770035456,24.403224603976568 -28.685523667455101,24.405565508901095 -28.680080538952993,24.408014088116055 -28.674674036928209,24.410569581839891 -28.669305802407834,24.413231198210617 -28.663977464554407,24.415998113517148 -28.658690640176914,24.418869472501903 -28.653446933246229,24.42184438860005 -28.64824793441413,24.424921944242151 -28.643095220537134,24.428101191151065 -28.637990354204419,24.431381150627736 -28.632934883270281,24.434760813871538 -28.627930340391472,24.438239142306717 -28.622978242569175,24.441815067880722 -28.618080090695855,24.445487493441991 -28.613237369107495,24.449255293041791 -28.608451545140568,24.453117312317403 -28.603724068694731,24.457072368823141 -28.599056371800572,24.461119252427562 -28.594449868193294,24.465256725664762 -28.589905952891769,24.469483524126915 -28.585426001783489,24.473798356852907 -28.581011371215411,24.478199906715595 -28.576663397590849,24.48268683085379 -28.572383396972441,24.487257761043733 -28.568172664691346,24.491911304154055 -28.564032474962829,24.496646042544203 -28.559964080508252,24.501460534510869 -28.555968712183585,24.506353314724617 -28.552047578614662,24.511322894671945 -28.548201865839104,24.516367763102515 -28.544432736955102,24.52148638648579 -28.540741331777156,24.526677209488223 -28.537128766498796,24.531938655423552 -28.533596133362522,24.537269126740796 -28.530144500336959,24.542667005499531 -28.526774910801166,24.548130653851075 -28.523488383236369,24.553658414542507 -28.520285910925423,24.559248611389858 -28.517168461659423,24.564899549803645 -28.514136977452182,24.57060951729083 -28.511192374262492,24.576376783945427 -28.508335541723795,24.582199602983856 -28.505567342882131,24.588076211266849 -28.502888613941764,24.594004829807968 -28.500300164018839,24.599983664309274 -28.497802774903008,24.606010905708388 -28.495397200827426,24.612084730676745 -28.493084168246597,24.618203302205877 -28.490864375622735,24.624364770124082 -28.48873849322014,24.630567271652016 -28.486707162908274,24.636808931930073 -28.48477099797276,24.64308786462378 -28.482930582935339,24.649402172429006 -28.481186473381939,24.655749947658894 -28.479539195799475,24.662129272778778 -28.47798924742105,24.668538221026751 -28.476537096080108,24.674974856924731 -28.475183180072875,24.68143723685181 -28.47392790802968,24.687923409675783 -28.472771658795054,24.694431417230337 -28.47171478131645,24.700959294993751 -28.47075759454188,24.70750507257009 -28.469900387326192,24.714066774367769 -28.469143418346533,24.720642420038875 -28.468486916026166,24.727230025245085 -28.467931078467672,24.73382760206988 -28.467476073394735,24.740433159690181 -28.467122038103,24.747044705027836 -28.466869079419723,24.753660243120745 -28.46671727367243,24.760277777777777 -28.466666666666683))', max_error=0.0000001) != 0: print('did not get expected first geom') pytest.fail(geom.ExportToWkt()) feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() if ogrtest.check_feature_geometry(feat, 'POLYGON ((25.324444444444445 -28.735,25.324444444444445 -28.735,25.324444444444747 -28.735,25.3256844012835 -28.743637219488093,25.326752458414518 -28.752292221672775,25.327648242989319 -28.760962374913134,25.328371434292126 -28.769645042225264,25.328921763884399 -28.778337582080368,25.329299015739096 -28.787037349205164,25.329503026367707 -28.795741695383924,25.329533684919237 -28.804447970262672,25.329390933266499 -28.813153522154423,25.329074766083266 -28.821855698846022,25.328585230899417 -28.830551848405761,25.32792242813515 -28.839239319991876,25.327086511130251 -28.847915464661341,25.326077686158602 -28.856577636179196,25.324896212403537 -28.865223191827752,25.323542401945843 -28.873849493215474,25.322016619719491 -28.882453907085591,25.320319283456154 -28.891033806123644,25.31845086360034 -28.899586569764509,25.316411883234647 -28.908109584997732,25.314202917960664 -28.916600247171544,25.311824595781452 -28.925055960795305,25.309277596961152 -28.933474140339584,25.306562653857945 -28.941852211034359,25.303680550768494 -28.950187609664397,25.300632123720742 -28.958477785362163,25.29741826027432 -28.966720200397404,25.294039899300181 -28.974912330963704,25.290498030727949 -28.983051667961448,25.286793695305345 -28.991135717776984,25.282927984310767 -28.999162003057677,25.278902039273312 -29.007128063482853,25.274717051653134 -29.015031456530025,25.270374262533323 -29.022869758236496,25.265874962270246 -29.030640563955714,25.26122049013696 -29.038341489108532,25.256412233959036 -29.045970169928736,25.251451629715206 -29.053524264202991,25.246340161140221 -29.06100145200449,25.241079359298173 -29.068399436420506,25.23567080214746 -29.075715944273327,25.230116114090873 -29.082948726834402,25.224416965497046 -29.090095560531509,25.218575072228933 -29.097154247648504,25.212592195130505 -29.10412261701785,25.206470139518853 -29.110998524705039,25.200210754651753 -29.11777985468531,25.193815933175109 -29.124464519512046,25.187287610571182 -29.131050460976667,25.180627764570215 -29.137535650759972,25.173838414570472 -29.143918091074411,25.166921621027861 -29.150195815297337,25.159879484826497 -29.156366888594846,25.152714146662561 -29.162429408536127,25.145427786377269 -29.168381505697866,25.138022622300941 -29.174221344258754,25.130500910584292 -29.179947122583698,25.122864944495355 -29.185557073797725,25.115117053723321 -29.191049466349057,25.107259603657024 -29.196422604561548,25.099294994669837 -29.201674829175872,25.091225661355146 -29.206804517879718,25.083054071794677 -29.211810085826329,25.074782726776942 -29.216689986141546,25.066414159022649 -29.221442710419112,25.057950932399795 -29.226066789203841,25.049395641117307 -29.230560792462668,25.040750908918767 -29.234923330043529,25.032019388244304 -29.239153052121523,25.023203759421683 -29.243248649632577,25.014306729794193 -29.247208854694165,25.005331032890854 -29.251032441013166,24.996279427553059 -29.254718224280467,24.987154697052485 -29.258265062552468,24.977959648227149 -29.261671856618946,24.96869711057434 -29.264937550357544,24.959369935370919 -29.268061131074475,24.949980994740844 -29.271041629831515,24.940533180755306 -29.273878121758855,24.931029404524764 -29.276569726354225,24.921472595226302 -29.27911560776748,24.911865699212655 -29.281514975071246,24.902211679051732 -29.283767082516917,24.892513512561873 -29.285871229776419,24.882774191884664 -29.287826762169175,24.872996722502361 -29.289633070874672,24.863184122310912 -29.291289593130031,24.853339420578315 -29.292795812413047,24.843465657046142 -29.294151258610142,24.833565880890973 -29.295355508169479,24.823643149820615 -29.296408184238985,24.813700528987738 -29.297308956789578,24.803741090085058 -29.298057542722887,24.793767910343536 -29.298653705964284,24.783784071443542 -29.299097257540382,24.773792658660838 -29.299388055641543,24.763796759952577 -29.299526005669037,24.753799464358973 -29.299511060267122,24.743803861918728 -29.299343219339562,24.733813042177051 -29.299022530051275,24.723830092997549 -29.298549086814461,24.713858099961822 -29.297923031259401,24.703900145183407 -29.297144552190304,24.693959306309406 -29.296213885525674,24.684038655567267 -29.295131314223482,24.674141258801942 -29.293897168191322,24.664270174416327 -29.292511824181247,24.65442845241142 -29.290975705669538,24.644619133445421 -29.289289282721541,24.634845247808041 -29.287453071841185,24.625109814448344 -29.285467635805958,24.615415840038214 -29.283333583486638,24.605766317960285 -29.281051569652291,24.596164227391593 -29.278622294760709,24.586612532310763 -29.276046504733856,24.577114180572615 -29.273324990718947,24.567672102945274 -29.270458588834956,24.558289212193195 -29.267448179904818,24.548968402128249 -29.264294689173013,24.539712546687348 -29.260999086009392,24.530524499021816 -29.257562383598525,24.521407090592227 -29.253985638615347,24.512363130253711 -29.250269950886775,24.503395403389867 -29.246416463039765,24.494506670979664 -29.242426360135497,24.485699668772813 -29.238300869290413,24.476977106411617 -29.234041259283813,24.468341666547062 -29.229648840152166,24.459796004019395 -29.225124962770508,24.451342745027716 -29.220471018421009,24.442984486277584 -29.215688438348721,24.434723794192617 -29.210778693304832,24.426563204089472 -29.205743293077461,24.418505219398092 -29.200583786010426,24.410552310879975 -29.195301758509814,24.402706915859742 -29.189898834538667,24.394971437455574 -29.184376675100097,24.387348243856902 -29.178736977708979,24.379839667567335 -29.172981475852069,24.372448004707099 -29.167111938437387,24.365175514288836 -29.161130169232337,24.358024417543742 -29.155038006291477,24.350996897226008 -29.14883732137352,24.34409509694385 -29.142530019348044,24.337321120532131 -29.136118037592439,24.33067703138671 -29.129603345378626,24.324164851854118 -29.122987943250237,24.317786562621645 -29.116273862390543,24.311544102121797 -29.109463163980905,24.30543936594934 -29.10255793855049,24.2994742062996 -29.095560305316994,24.293650431416442 -29.088472411518978,24.287969805061284 -29.081296431740057,24.282434045985305 -29.074034567224615,24.277044827435564 -29.06668904518618,24.271803776659787 -29.059262118107824,24.266712474439807 -29.051756063035484,24.261772454629462 -29.044173180864007,24.256985203708833 -29.036515795616396,24.252352160375441 -29.02878625371649,24.247874715121878 -29.02098692325518,24.24355420984503 -29.013120193250629,24.239391937478619 -29.00518847290239,24.235389141624353 -28.997194190840176,24.231547016208346 -28.989139794367077,24.227866705162754 -28.981027748697628,24.224349302108447 -28.972860536191234,24.220995850059293 -28.964640655580638,24.217807341153009 -28.956370621196328,24.214784716384329 -28.948052962186651,24.211928865360008 -28.939690221734097,24.209240626079428 -28.931284956268058,24.206720784716541 -28.92283973467417,24.204370075425757 -28.914357137500531,24.202189180171864 -28.905839756161143,24.200178728561479 -28.897290192136808,24.198339297705129 -28.888711056173534,24.196671412087511 -28.880104967479028,24.195175543457147 -28.871474552917306,24.19385211072877 -28.862822446201619,24.192701479915275 -28.854151287086367,24.19172396405807 -28.845463720557575,24.190919823186178 -28.836762396022849,24.190289264288399 -28.828049966500572,24.189832441300496 -28.819329087808967,24.189549455112285 -28.810602417754893,24.189440353583787 -28.801872615323049,24.189505131591886 -28.793142339865469,24.189743731066635 -28.784414250291647,24.190156041080773 -28.775691004259812,24.190741897919008 -28.766975257369026,24.191501085191938 -28.758269662353158,24.192433333936325 -28.74957686827598,24.193538322762858 -28.740899519728529,24.194815678001433 -28.732240256028561,24.196264973852333 -28.723601710422116,24.197885732583238 -28.714986509287982,24.19967742470579 -28.706397271344827,24.201639469198703 -28.697836606861372,24.203771233721888 -28.68930711687004,24.206072034858177 -28.680811392383887,24.208541138376447 -28.672352013617413,24.211177759476751 -28.663931549211355,24.213981063100391 -28.655552555461597,24.2169501642021 -28.647217575552503,24.220084128082078 -28.638929138794964,24.223381970696099 -28.630689759869227,24.226842659002589 -28.622501938072631,24.230465111308209 -28.614368156572979,24.234248197645979 -28.606290881666965,24.238190740140944 -28.598272562044642,24.242291513417509 -28.590315628059457,24.246549244988177 -28.582422491004635,24.250962615689375 -28.574595542395741,24.255530260106084 -28.566837153259698,24.260250767015116 -28.559149673430525,24.265122679844414 -28.551535430851899,24.270144497143669 -28.543996730886917,24.275314673058389 -28.536535855634881,24.280631617835351 -28.529155063255686,24.286093698316382 -28.521856587301826,24.291699238459888 -28.514642636057971,24.297446519871226 -28.507515391888845,24.303333782336477 -28.500477010594921,24.309359224380383 -28.493529620776712,24.31552100381996 -28.486675323207294,24.321817238338735 -28.479916190213615,24.328246006069861 -28.473254265066558,24.334805346194791 -28.466691561380145,24.341493259533799 -28.4602300625194,24.348307709170513 -28.453871721018132,24.355246621064914 -28.447618458005579,24.362307884696193 -28.441472162642967,24.369489353694416 -28.435434691569711,24.376788846495483 -28.429507868359337,24.384204147000045 -28.423693482985684,24.391733005249641 -28.417993291298984,24.399373138086929 -28.412409014512306,24.407122229850941 -28.406942338698542,24.414977933080777 -28.401594914297746,24.422937869201576 -28.396368355635119,24.430999629236783 -28.391264240449956,24.43916077453795 -28.38628410943538,24.447418837487788 -28.381429465788997,24.455771322249223 -28.37670177477483,24.464215705504113 -28.372102463296528,24.472749437186824 -28.367632919481679,24.481369941250147 -28.363294492277845,24.490074616410581 -28.359088491059879,24.498860836925523 -28.355016185249198,24.50772595334951 -28.351078803944461,24.516667293338532 -28.347277535564402,24.525682162385579 -28.343613527502299,24.534767844672221 -28.340087885792698,24.543921603800779 -28.336701674789964,24.553140683623202 -28.333455916859251,24.562422309051517 -28.330351592079595,24.57176368682665 -28.327389637959214,24.581162006386851 -28.324570949163544,24.590614440635008 -28.3218963772552,24.60011814677102 -28.31936673044703,24.609670267145127 -28.316982773367286,24.619267930032869 -28.314745226837644,24.628908250528362 -28.312654767663972,24.63858833131291 -28.310712028439568,24.648305263544835 -28.308917597361543,24.658056127663254 -28.30727201805972,24.667837994267057 -28.305775789438641,24.677647924917796 -28.304429365532272,24.687482973026292 -28.303233155371913,24.697340184664604 -28.302187522866816,24.707216599457116 -28.301292786698056,24.717109251382755 -28.300549220225193,24.727015169673113 -28.299957051406295,24.736931379690652 -28.299516462730722,24.746854903656409 -28.299227591165192,24.756782761632255 -28.29909052811297,24.766711972434599 -28.299105319386072,24.776639554240347 -28.299271965190698,24.786562525734769 -28.299590420125625,24.796477906700915 -28.300060593194004,24.806382719171182 -28.300682347828001,24.816273988013755 -28.301455501926711,24.826148741958701 -28.302379827907302,24.836004014361414 -28.303455052768882,24.845836844098478 -28.304680858169917,24.855644276402057 -28.306056880518398,24.865423363765725 -28.307582711075085,24.875171166708189 -28.309257896070051,24.884884754678925 -28.311081936831783,24.894561206900327 -28.313054289929653,24.904197613154185 -28.315174367329107,24.913791074742456 -28.317441536559656,24.92333870518836 -28.31985512089615,24.932837631161526 -28.322414399552244,24.93611111111111 -28.323333333333334,24.93611111111111 -28.323333333333334,24.74 -28.466111111111111,24.74 -28.466111111111111,24.740000000006798 -28.466111111112809,24.746632430249097 -28.465871637044913,24.753268187622954 -28.465733642679226,24.759905272118928 -28.465697157550323,24.766541673734942 -28.465762180560702,24.77317539772077 -28.4659286799847,24.779804440348542 -28.466196593481584,24.786426802076775 -28.466565828117496,24.793040485511163 -28.467036260396483,24.799643496136763 -28.467607736300309,24.806233842740653 -28.468280071337446,24.812809538018556 -28.46905305060092,24.819368599277652 -28.469926428834924,24.825909048903572 -28.470899930510456,24.832428914991102 -28.471973249910022,24.838926231930369 -28.473146051220724,24.845399040894488 -28.474417968636757,24.85184539057164 -28.475788606470175,24.85826333757198 -28.477257539270838,24.864650947139452 -28.478824311954796,24.871006293602161 -28.480488439941709,24.877327461036565 -28.482249409300493,24.883612543751585 -28.484106676904105,24.889859646912562 -28.486059670592425,24.896066887037229 -28.488107789344113,24.902232392611545 -28.490250403456642,24.908354304611503 -28.492486854734935,24.91443077703882 -28.494816456688355,24.920459977479492 -28.49723849473618,24.926440087661302 -28.499752226420981,24.932369303955355 -28.502356881630817,24.938245837939125 -28.505051662829032,24.944067916906295 -28.50783574529251,24.949833784410384 -28.510708277357907,24.955541700766702 -28.51366838067581,24.961189943568936 -28.516715150472848,24.966776808222054 -28.519847655821607,24.972300608432882 -28.523064939918342,24.9777596767074 -28.526366020368442,24.983152364848348 -28.529749889479419,24.988477044467242 -28.533215514561434,24.993732107439818 -28.536761838235364,24.998915966414472 -28.540387778748141,25.004027055264203 -28.544092230295462,25.009063829563729 -28.547874063351784,25.014024767071181 -28.551732125007007,25.018908368153632 -28.555665239310756,25.023713156252619 -28.559672207623251,25.028437678344208 -28.563751808972938,25.033080505346668 -28.567902800421166,25.03764023257828 -28.572123917433132,25.042115480170764 -28.576413874255621,25.046504893485697 -28.580771364301086,25.050807143534044 -28.585195060537998,25.055020927375441 -28.589683615887409,25.059144968510566 -28.594235663625824,25.063178017286948 -28.598849817793635,25.067118851257888 -28.603524673609968,25.070966275578758 -28.608258807892824,25.074719123363518 -28.61305077948515,25.078376256041661 -28.617899129686265,25.081936563715608 -28.622802382688874,25.085398965501863 -28.627759046021239,25.088762409872622 -28.632767610994421,25.092025874965881 -28.637826553154852,25.095188368924873 -28.642934332741433,25.098248930184742 -28.648089395147835,25.101206627805809 -28.653290171388974,25.104060561732403 -28.658535078572456,25.106809863101081 -28.663822520374055,25.109453694502864 -28.669150887517645,25.111991250254196 -28.674518558259152,25.114421756659766 -28.679923898874449,25.116744472249401 -28.685365264151244,25.118958688020527 -28.690840997884379,25.121063727672666 -28.696349433375019,25.123058947821914 -28.701888893932889,25.124943738219745 -28.707457693382054,25.126717521933593 -28.713054136569667,25.128379755560044 -28.718676519877718,25.129929929402699 -28.724323131737549,25.131367567623556 -28.729992253147103,25.132692228430109 -28.735682158190684,25.13390350421783 -28.741391114561011,25.135001021699754 -28.747117384083495,25.135984442057644 -28.752859223242652,25.136853461048599 -28.75861488371028,25.137607809118133 -28.764382612875551,25.138247251504847 -28.770160654376411,25.138771588331661 -28.775947248632733,25.139180654678363 -28.781740633380437,25.139474320653182 -28.787539044207037,25.139652491459525 -28.793340715087666,25.139715107429993 -28.79914387892245,25.139662144076386 -28.804946768074032,25.139493612107152 -28.810747614905807,25.139444444444443 -28.811944444444446,25.139444444444443 -28.811944444444446,25.324444444444445 -28.735))', max_error=0.0000001) != 0: print('did not get expected second geom') pytest.fail(geom.ExportToWkt()) gdalautotest-3.1.2/ogr/ogr_grass.py0000775000175000017500000000467713701060010016027 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_grass.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: GRASS Testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr import gdaltest import pytest ############################################################################### # Test if GRASS driver is present def test_ogr_grass_1(): gdaltest.ogr_grass_drv = ogr.GetDriverByName('GRASS') if gdaltest.ogr_grass_drv is None: pytest.skip() ############################################################################### # Read 'point' datasource def test_ogr_grass_2(): if gdaltest.ogr_grass_drv is None: pytest.skip() ds = ogr.Open('./data/PERMANENT/vector/point/head') assert ds is not None, 'Cannot open datasource' lyr = ds.GetLayerByName('1') assert lyr is not None, 'Cannot find layer' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (0 0)' assert feat.GetFieldAsString('name') == 'my point' ds = None gdalautotest-3.1.2/ogr/ogr_plscenes.py0000775000175000017500000010011713701060010016506 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_plscenes.py d24c169720c70f0f9f4f1139c610343dd076103d 2019-04-23 23:29:54 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: PlanetLabs scene driver test suite. # Author: Even Rouault, even dot rouault at spatialys.com # ############################################################################### # Copyright (c) 2015, Planet Labs # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr from osgeo import gdal import gdaltest import pytest ############################################################################### # Find PLScenes driver def test_ogr_plscenes_init(): gdaltest.plscenes_drv = ogr.GetDriverByName('PLScenes') if gdaltest.plscenes_drv is not None: return pytest.skip() ############################################################################### # Test Data V1 API catalog listing with a single catalog def test_ogr_plscenes_data_v1_catalog_no_paging(): if gdaltest.plscenes_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{ "item_types": [ { "id": "PSScene3Band" } ] }') gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is not None with gdaltest.error_handler(): assert ds.GetLayerByName('non_existing') is None assert ds.GetLayerByName('PSScene3Band') is not None assert ds.GetLayerCount() == 1 with gdaltest.error_handler(): assert ds.GetLayerByName('non_existing') is None gdal.Unlink('/vsimem/data_v1/item-types') ############################################################################### # Test Data V1 API catalog listing with catalog paging def test_ogr_plscenes_data_v1_catalog_paging(): if gdaltest.plscenes_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{"_links": { "_next" : "/vsimem/data_v1/item-types/page_2"}, "item_types": [ { "id": "PSScene3Band" } ] }') gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/page_2', '{ "item_types": [ { "id": "PSScene4Band" } ] }') gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is not None with gdaltest.error_handler(): assert ds.GetLayerByName('non_existing') is None assert ds.GetLayerByName('PSScene3Band') is not None gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSScene4Band', '{ "id": "PSScene4Band"} }') assert ds.GetLayerByName('PSScene4Band') is not None assert ds.GetLayerCount() == 2 assert ds.GetLayerByName('PSScene4Band') is not None with gdaltest.error_handler(): assert ds.GetLayerByName('non_existing') is None gdal.Unlink('/vsimem/data_v1/item-types') gdal.Unlink('/vsimem/data_v1/item-types/page_2') gdal.Unlink('/vsimem/data_v1/item-types/PSScene4Band') ############################################################################### # Test Data V1 API def test_ogr_plscenes_data_v1_nominal(): if gdaltest.plscenes_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', """{ "item_types": [ {"display_description" : "display_description", "display_name" : "display_name", "id": "PSOrthoTile"} ]}""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is not None gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:version=data_v1,api_key=foo,FOLLOW_LINKS=YES', gdal.OF_VECTOR) gdal.SetConfigOption('PL_URL', None) assert ds is not None lyr = ds.GetLayer(0) assert lyr.GetName() == 'PSOrthoTile' assert (lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 and \ lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1 and \ lyr.TestCapability(ogr.OLCRandomRead) == 0) # Different serialization depending on libjson versions gdal.FileFromMemBuffer("""/vsimem/data_v1/stats&POSTFIELDS={"interval":"year","item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"RangeFilter","field_name":"cloud_cover","config":{"gte":0.000000}}]}}""", """{ "buckets": [ { "count": 1 }, { "count": 1} ] }""") gdal.FileFromMemBuffer("""/vsimem/data_v1/stats&POSTFIELDS={"interval":"year","item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"RangeFilter","field_name":"cloud_cover","config":{"gte":0}}]}}""", """{ "buckets": [ { "count": 1 }, { "count": 1} ] }""") gdal.FileFromMemBuffer("""/vsimem/data_v1/stats&POSTFIELDS={"interval":"year","item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"RangeFilter","field_name":"cloud_cover","config":{"gte":0.0}}]}}""", """{ "buckets": [ { "count": 1 }, { "count": 1} ] }""") assert lyr.GetFeatureCount() == 2 assert lyr.GetGeomType() == ogr.wkbMultiPolygon ext = lyr.GetExtent() assert ext == (-180.0, 180.0, -90.0, 90.0) field_count = lyr.GetLayerDefn().GetFieldCount() assert field_count == 78 # Regular /items/ fetching gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[]}}""", """{ "_links": { "_next": "/vsimem/data_v1/quick-search?page=2" }, "features" : [ { "id": "id", "_links" : { "_self" : "self", "assets" : "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets" }, "_permissions" : [ "download" ], "properties": { "acquired": "2016/02/11 12:34:56.789+00", "anomalous_pixels": 1.23, "columns": 1, "item_type": "foo", "ground_control": true }, "geometry": { "type": "Polygon", "coordinates" : [ [ [2,49],[2,49.1],[2.1,49.1],[2.1,49],[2,49] ] ] } } ] }""") gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets', """{ "analytic" : { "_permissions": ["download"], "_links": { "_self": "analytic_links_self", "activate": "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/activate", }, "location": "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff", "status": "active", "expires_at": "2016-02-11T12:34:56.789" } }""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo', 'FOLLOW_LINKS=YES']) gdal.SetConfigOption('PL_URL', None) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetFID() != 1 or f['id'] != 'id' or f['self_link'] != 'self' or \ f['assets_link'] != '/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets' or \ f['acquired'] != '2016/02/11 12:34:56.789+00' or \ f['anomalous_pixels'] != 1.23 or f['item_type'] != 'foo' or f['columns'] != 1 or \ not f['ground_control'] or \ f['asset_analytic_self_link'] != 'analytic_links_self' or \ f['asset_analytic_activate_link'] != '/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/activate' or \ f['asset_analytic_permissions'] != ['download'] or \ f['asset_analytic_expires_at'] != '2016/02/11 12:34:56.789' or \ f['asset_analytic_location'] != '/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff' or \ f['asset_analytic_status'] != 'active' or \ f.GetGeometryRef().ExportToWkt() != 'MULTIPOLYGON (((2 49,2.0 49.1,2.1 49.1,2.1 49.0,2 49)))': f.DumpReadable() pytest.fail() lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 1: f.DumpReadable() pytest.fail() gdal.FileFromMemBuffer('/vsimem/data_v1/quick-search?page=2', """{ "features" : [ { "id": "id2" } ] }""") f = lyr.GetNextFeature() if f.GetFID() != 2 or f['id'] != 'id2': f.DumpReadable() pytest.fail() lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 1: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetFID() != 2: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() assert f is None f = lyr.GetNextFeature() assert f is None gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"GeometryFilter","field_name":"geometry","config":{"type":"Point","coordinates":[2.0,49.0]}}]}}""", """{"features" : [ { "id": "id3", "geometry": { "type": "Point", "coordinates": [2,49]} } ] }""") # POINT spatial filter lyr.SetSpatialFilterRect(2, 49, 2, 49) f = lyr.GetNextFeature() if f['id'] != 'id3': f.DumpReadable() pytest.fail() # Cannot find /vsimem/data_v1/stats&POSTFIELDS={"interval":"year","item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"GeometryFilter","field_name":"geometry","config":{"type":"Point","coordinates":[2.0,49.0]}}]}} with gdaltest.error_handler(): assert lyr.GetFeatureCount() == 1 # Reset spatial filter lyr.SetSpatialFilter(0, None) f = lyr.GetNextFeature() if f['id'] != 'id': f.DumpReadable() pytest.fail() # Test attribute filter on id lyr.SetAttributeFilter("id = 'filtered_id'") gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"StringInFilter","field_name":"id","config":["filtered_id"]}]}}""", """{ "id": "filtered_id", "properties": {} }""") f = lyr.GetNextFeature() if f['id'] != 'filtered_id': f.DumpReadable() pytest.fail() # Test attribute filter fully evaluated on server side. lyr.SetAttributeFilter("id != 'a' AND acquired >= '2016/02/11' AND acquired <= '2016/02/12' AND acquired > '1970/01/01 01:23:45' AND acquired < '2100/01/01 01:23:45' AND anomalous_pixels = 1.234567 AND (NOT id = 'b') AND columns > 0 AND columns < 2 AND columns = 1 AND columns IN (1, 2) AND (id IN ('filtered_2') OR id = 'foo') AND permissions = 'download' AND permissions IN ('download')") content = """{ "features" : [ { "id": "filtered_2", "_links" : { "_self" : "self", "assets" : "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets" }, "_permissions" : [ "download" ], "properties": { "acquired": "2016/02/11 12:34:56.789+00", "anomalous_pixels": 1.23, "columns": 1, "item_type": "foo" }, "geometry": { "type": "Polygon", "coordinates" : [ [ [2,49],[2,49.1],[2.1,49.1],[2.1,49],[2,49] ] ] } } ] }""" gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"NotFilter","config":{"type":"StringInFilter","field_name":"id","config":["a"]}},{"type":"DateRangeFilter","field_name":"acquired","config":{"gte":"2016-02-11T00:00:00Z"}}]},{"type":"DateRangeFilter","field_name":"acquired","config":{"lte":"2016-02-12T00:00:00Z"}}]},{"type":"DateRangeFilter","field_name":"acquired","config":{"gt":"1970-01-01T01:23:45Z"}}]},{"type":"DateRangeFilter","field_name":"acquired","config":{"lt":"2100-01-01T01:23:45Z"}}]},{"type":"RangeFilter","field_name":"anomalous_pixels","config":{"gte":1.234567,"lte":1.234567}}]},{"type":"NotFilter","config":{"type":"StringInFilter","field_name":"id","config":["b"]}}]},{"type":"RangeFilter","field_name":"columns","config":{"gt":0}}]},{"type":"RangeFilter","field_name":"columns","config":{"lt":2}}]},{"type":"NumberInFilter","field_name":"columns","config":[1]}]},{"type":"NumberInFilter","field_name":"columns","config":[1,2]}]},{"type":"OrFilter","config":[{"type":"StringInFilter","field_name":"id","config":["filtered_2"]},{"type":"StringInFilter","field_name":"id","config":["foo"]}]}]},{"type":"PermissionFilter","config":["download"]}]},{"type":"PermissionFilter","config":["download"]}]}]}}""", content) gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"AndFilter","config":[{"type":"NotFilter","config":{"type":"StringInFilter","field_name":"id","config":["a"]}},{"type":"DateRangeFilter","field_name":"acquired","config":{"gte":"2016-02-11T00:00:00Z"}}]},{"type":"DateRangeFilter","field_name":"acquired","config":{"lte":"2016-02-12T00:00:00Z"}}]},{"type":"DateRangeFilter","field_name":"acquired","config":{"gt":"1970-01-01T01:23:45Z"}}]},{"type":"DateRangeFilter","field_name":"acquired","config":{"lt":"2100-01-01T01:23:45Z"}}]},{"type":"RangeFilter","field_name":"anomalous_pixels","config":{"gte":1.23456699,"lte":1.2345670099999999}}]},{"type":"NotFilter","config":{"type":"StringInFilter","field_name":"id","config":["b"]}}]},{"type":"RangeFilter","field_name":"columns","config":{"gt":0}}]},{"type":"RangeFilter","field_name":"columns","config":{"lt":2}}]},{"type":"NumberInFilter","field_name":"columns","config":[1]}]},{"type":"NumberInFilter","field_name":"columns","config":[1,2]}]},{"type":"OrFilter","config":[{"type":"StringInFilter","field_name":"id","config":["filtered_2"]},{"type":"StringInFilter","field_name":"id","config":["foo"]}]}]},{"type":"PermissionFilter","config":["download"]}]},{"type":"PermissionFilter","config":["download"]}]}]}}""", content) f = lyr.GetNextFeature() if f['id'] != 'filtered_2': f.DumpReadable() pytest.fail() # Partly server / partly client lyr.SetAttributeFilter("id = 'filtered_3' AND id > 'a'") gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"StringInFilter","field_name":"id","config":["filtered_3"]}]}}""", """{ "features" : [ { "id": "filtered_3", "properties": { } } ] }""") f = lyr.GetNextFeature() if f['id'] != 'filtered_3': f.DumpReadable() pytest.fail() lyr.SetAttributeFilter("id > 'a' AND id = 'filtered_3'") f = lyr.GetNextFeature() if f['id'] != 'filtered_3': f.DumpReadable() pytest.fail() # Completely client side lyr.SetAttributeFilter("id > 'a' OR id = 'id'") f = lyr.GetNextFeature() if f['id'] != 'id': f.DumpReadable() pytest.fail() # Completely client side lyr.SetAttributeFilter("NOT id > 'z'") f = lyr.GetNextFeature() if f['id'] != 'id': f.DumpReadable() pytest.fail() # Reset attribute filter lyr.SetAttributeFilter(None) f = lyr.GetNextFeature() if f['id'] != 'id': f.DumpReadable() pytest.fail() # Try raster access # Missing catalog gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'SCENE=id']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None and gdal.GetLastErrorMsg().find('Missing catalog') >= 0 # Invalid catalog gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=invalid', 'SCENE=id']) gdal.SetConfigOption('PL_URL', None) # visual not an object gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets', """{ "visual": false }""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None # Inactive file, and activation link not working gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets', """{ "analytic" : { "_links": { "_self": "analytic_links_self", "activate": "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/activate", }, "_permissions": ["download"], "status": "inactive", } }""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None # File in activation gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets', """{ "analytic" : { "_links": { "_self": "analytic_links_self", "activate": "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/activate", }, "_permissions": ["download"], "status": "activating", } }""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets', """{ "analytic" : { "_permissions": ["download"], "_links": { "_self": "analytic_links_self", "activate": "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/activate", }, "location": "/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff", "status": "active", "expires_at": "2016-02-11T12:34:56.789" } }""") # Missing /vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None # JSon content for /vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff', """{}""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None # Missing metadata gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile/items/id/assets/analytic/my.tiff', open('../gcore/data/byte.tif', 'rb').read()) gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is not None ds_raster = None # Failed filter by scene id gdal.FileFromMemBuffer('/vsimem/data_v1/item-types/PSOrthoTile', """{"id": "PSOrthoTile"}""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is not None ds_raster = None # Test metadata items attached to dataset gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[{"type":"StringInFilter","field_name":"id","config":["id"]}]}}""", """{ "id": "id", "properties": { "anomalous_pixels": 1.23 }, }""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=analytic']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is not None assert ds_raster.GetMetadataItem('anomalous_pixels') == '1.23' ds_raster = None # Test invalid ASSET gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id', 'ACTIVATION_TIMEOUT=1', 'ASSET=invalid']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None # Test subdatasets gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds_raster = gdal.OpenEx('PLScenes:', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'ASSET=list', 'SCENE=id']) gdal.SetConfigOption('PL_URL', None) assert len(ds_raster.GetSubDatasets()) == 1 ds_raster = None # Unsupported option gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds_raster = gdal.OpenEx('PLScenes:unsupported=yes', gdal.OF_RASTER, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile', 'SCENE=id']) gdal.SetConfigOption('PL_URL', None) assert ds_raster is None # Test catalog with vector access gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds2 = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=PSOrthoTile']) gdal.SetConfigOption('PL_URL', None) assert ds2 is not None and ds2.GetLayerCount() == 1 gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') with gdaltest.error_handler(): ds2 = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo', 'ITEMTYPES=invalid']) gdal.SetConfigOption('PL_URL', None) assert ds2 is None fl = gdal.ReadDir('/vsimem/data_v1') for filename in fl: gdal.Unlink(filename) ############################################################################### # Test robustness to errors in Data V1 API def test_ogr_plscenes_data_v1_errors(): if gdaltest.plscenes_drv is None: pytest.skip() # No PL_API_KEY gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') old_key = gdal.GetConfigOption('PL_API_KEY') if old_key: gdal.SetConfigOption('PL_API_KEY', '') with gdaltest.error_handler(): ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1']) if old_key: gdal.SetConfigOption('PL_API_KEY', old_key) gdal.SetConfigOption('PL_URL', None) assert ds is None # Invalid option gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{ "item-types": [] }') with gdaltest.error_handler(): gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:version=data_v1,api_key=foo,invalid=invalid', gdal.OF_VECTOR) gdal.SetConfigOption('PL_URL', None) assert ds is None # Invalid JSON gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{invalid_json') with gdaltest.error_handler(): gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is None # Not an object gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', 'false') with gdaltest.error_handler(): gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is None # Lack of "item_types" gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{}') with gdaltest.error_handler(): gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is None # Invalid catalog objects gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', """{"item_types": [{}, [], null, {"id":null}, {"id":"foo"}]}""") gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds.GetLayerCount() == 1 # Invalid next URL gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{"_links": { "_next": "/vsimem/inexisting" }, "item_types": [{"id": "my_catalog"}]}') gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) with gdaltest.error_handler(): lyr_count = ds.GetLayerCount() assert lyr_count == 1 gdal.FileFromMemBuffer('/vsimem/data_v1/item-types', '{"item_types": [{"id": "PSScene3Band"}]}') gdal.SetConfigOption('PL_URL', '/vsimem/data_v1/') ds = gdal.OpenEx('PLScenes:', gdal.OF_VECTOR, open_options=['VERSION=data_v1', 'API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) lyr = ds.GetLayer(0) # Invalid index ds.GetLayer(-1) ds.GetLayer(1) with gdaltest.error_handler(): ds.GetLayerByName('invalid_name') # Cannot find /vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSScene3Band"],"filter":{"type":"AndFilter","config":[]}} with gdaltest.error_handler(): lyr.GetNextFeature() # Empty object gdal.FileFromMemBuffer('/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSScene3Band"],"filter":{"type":"AndFilter","config":[]}}', '{}') lyr.ResetReading() lyr.GetNextFeature() # null feature gdal.FileFromMemBuffer('/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSScene3Band"],"filter":{"type":"AndFilter","config":[]}}', '{ "features": [ null ] }') lyr.ResetReading() lyr.GetNextFeature() gdal.Unlink('/vsimem/data_v1/item-types') gdal.Unlink('/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSScene3Band"],"filter":{"type":"AndFilter","config":[]}}') ############################################################################### # Test Data V1 API against real server def test_ogr_plscenes_data_v1_live(): if gdaltest.plscenes_drv is None: pytest.skip() api_key = gdal.GetConfigOption('PL_API_KEY') if api_key is None: pytest.skip('Skipping test as PL_API_KEY not defined') gdal.SetConfigOption('PLSCENES_PAGE_SIZE', '10') ds = ogr.Open('PLScenes:version=data_v1,FOLLOW_LINKS=YES') gdal.SetConfigOption('PLSCENES_PAGE_SIZE', None) assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None lyr.SetAttributeFilter("permissions = 'assets:download'") f = lyr.GetNextFeature() assert f is not None catalog = lyr.GetName() scene = f['id'] f.DumpReadable() lyr_defn = lyr.GetLayerDefn() asset_name = None for i in range(lyr_defn.GetFieldCount()): fld_defn = lyr_defn.GetFieldDefn(i) name = fld_defn.GetName() if name.startswith('asset_') and name.endswith('_activate_link') and f.GetFieldAsString(i) != '': asset_name = name[len('asset_'):-len('_activate_link')] break elif name.startswith('asset_') and name.endswith('_location') and f.GetFieldAsString(i) != '': asset_name = name[len('asset_'):-len('_location')] break assert asset_name is not None acquired_field = lyr_defn.GetFieldIndex('acquired') assert acquired_field >= 0 and lyr_defn.GetFieldDefn(acquired_field).GetType() == ogr.OFTDateTime if not f.IsFieldSet(acquired_field): f.DumpReadable() pytest.fail() int_field = -1 float_field = -1 string_field = -1 for i in range(lyr_defn.GetFieldCount()): typ = lyr_defn.GetFieldDefn(i).GetType() if int_field < 0 and typ == ogr.OFTInteger and f.IsFieldSet(i): int_field = i elif float_field < 0 and typ == ogr.OFTReal and f.IsFieldSet(i): float_field = i elif string_field < 0 and typ == ogr.OFTString and f.IsFieldSet(i): string_field = i filtr = "acquired='%s'" % f.GetFieldAsString(acquired_field) if int_field >= 0: name = lyr_defn.GetFieldDefn(int_field).GetName() mini = f.GetField(int_field) - 1 maxi = f.GetField(int_field) + 1 filtr += ' AND %s >= %d AND %s <= %d' % (name, mini, name, maxi) if float_field >= 0: name = lyr_defn.GetFieldDefn(float_field).GetName() mini = f.GetField(float_field) - 0.01 maxi = f.GetField(float_field) + 0.01 filtr += ' AND %s BETWEEN %f AND %f' % (name, mini, maxi) if string_field >= 0: name = lyr_defn.GetFieldDefn(string_field).GetName() value = f.GetField(string_field) filtr += " AND %s = '%s'" % (name, value) lyr.SetAttributeFilter(filtr) f = lyr.GetNextFeature() assert f is not None ds = None ds = gdal.Open('PLScenes:version=data_v1,itemtypes=%s,scene=%s,asset=%s' % (catalog, scene, asset_name)) assert ds is not None assert ds.RasterCount != 0 gdalautotest-3.1.2/ogr/ogr_sql_sqlite.py0000775000175000017500000021516313701060010017062 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_sql_sqlite.py 0536038c7e0b969f54957699d240911ec20e7a77 2020-04-18 20:48:53 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: SQLite SQL dialect testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2012-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### try: from BaseHTTPServer import BaseHTTPRequestHandler except ImportError: from http.server import BaseHTTPRequestHandler from osgeo import ogr from osgeo import osr from osgeo import gdal import gdaltest import ogrtest import webserver import pytest @pytest.fixture(autouse=True) def clear_config_options(): gdal.SetConfigOption('OGR_GEOCODE_CACHE_FILE', None) gdal.SetConfigOption('OGR_GEOCODE_APPLICATION', None) gdal.SetConfigOption('OGR_GEOCODE_EMAIL', None) gdal.SetConfigOption('OGR_GEOCODE_QUERY_TEMPLATE', None) gdal.SetConfigOption('OGR_GEOCODE_DELAY', None) gdal.SetConfigOption('OGR_GEOCODE_SERVICE', None) gdal.SetConfigOption('OGR_GEOCODE_USERNAME', None) gdal.SetConfigOption('OGR_GEOCODE_KEY', None) gdal.SetConfigOption('OGR_SQLITE_DIALECT_USE_SPATIALITE', None) ############################################################################### # Detect OGR SQLite dialect availability @pytest.fixture(autouse=True, scope='module') def require_ogr_sql_sqlite(): if ogr.GetDriverByName('SQLite') is None: pytest.skip() # If we have SQLite VFS support, then SQLite dialect should be available ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_sql_sqlite_available.db') if ds is None: pytest.skip() ds = None gdal.Unlink('/vsimem/ogr_sql_sqlite_available.db') ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") sql_lyr = ds.ExecuteSQL("SELECT * FROM sqlite_master", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) assert sql_lyr is not None ############################################################################### # Tests that don't involve geometry def test_ogr_sql_sqlite_1(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") for geom in [ogr.wkbNone, ogr.wkbUnknown]: lyr = ds.CreateLayer("my_layer", geom_type=geom) field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('int64field', ogr.OFTInteger64) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('doublefield', ogr.OFTReal) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('strfield', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('binaryfield', ogr.OFTBinary) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('nullablefield', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('datetimefield', ogr.OFTDateTime) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('datefield', ogr.OFTDate) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('timefield', ogr.OFTTime) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('from', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('boolfield', ogr.OFTInteger) field_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('int16field', ogr.OFTInteger) field_defn.SetSubType(ogr.OFSTInt16) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('float32field', ogr.OFTReal) field_defn.SetSubType(ogr.OFSTFloat32) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('intlistfield', ogr.OFTIntegerList) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('int64listfield', ogr.OFTInteger64List) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('doublelistfield', ogr.OFTRealList) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('strlistfield', ogr.OFTStringList) lyr.CreateField(field_defn) # Test INSERT sql_lyr = ds.ExecuteSQL("INSERT INTO my_layer (intfield, int64field, nullablefield, doublefield, strfield, binaryfield, datetimefield, datefield, timefield, \"from\", boolfield, int16field, float32field, intlistfield, int64listfield, doublelistfield, strlistfield) VALUES (1,1234567890123456,NULL,2.34,'foo',x'0001FF', '2012-08-23 21:24', '2012-08-23', '21:24', 'from_val', 1, -32768, 1.23, '(2:2,3)', '(1:1234567890123456)', '(1:1.23)', '(1:a)')", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetField('intfield') != 1 or \ feat.GetField('int64field') != 1234567890123456 or \ feat.GetField('nullablefield') is not None or \ feat.GetField('doublefield') != 2.34 or \ feat.GetField('strfield') != 'foo' or \ feat.GetField('binaryfield') != '0001FF' or \ feat.GetField('datetimefield') != '2012/08/23 21:24:00' or \ feat.GetField('datefield') != '2012/08/23' or \ feat.GetField('timefield') != '21:24:00' or \ feat.GetField('from') != 'from_val': feat.DumpReadable() pytest.fail() feat = None # Test UPDATE sql_lyr = ds.ExecuteSQL("UPDATE my_layer SET intfield = 2, int64field = 234567890123, doublefield = 3.45, strfield = 'bar', timefield = '12:34' WHERE ROWID = 0", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetField('intfield') != 2 or \ feat.GetField('int64field') != 234567890123 or \ feat.GetField('doublefield') != 3.45 or \ feat.GetField('strfield') != 'bar' or \ feat.GetField('datetimefield') != '2012/08/23 21:24:00' or \ feat.GetField('datefield') != '2012/08/23' or \ feat.GetField('timefield') != '12:34:00': feat.DumpReadable() pytest.fail() feat.SetStyleString('cool_style') lyr.SetFeature(feat) feat = None # Test SELECT sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer", dialect='SQLite') assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('boolfield')).GetSubType() == ogr.OFSTBoolean assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('int16field')).GetSubType() == ogr.OFSTInt16 assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('float32field')).GetSubType() == ogr.OFSTFloat32 assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('intlistfield')).GetType() == ogr.OFTIntegerList assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('doublelistfield')).GetType() == ogr.OFTRealList assert sql_lyr.GetLayerDefn().GetFieldDefn(sql_lyr.GetLayerDefn().GetFieldIndex('strlistfield')).GetType() == ogr.OFTStringList feat = sql_lyr.GetNextFeature() if feat.GetField('intfield') != 2 or \ feat.GetField('int64field') != 234567890123 or \ feat.GetField('nullablefield') is not None or \ feat.GetField('doublefield') != 3.45 or \ feat.GetField('strfield') != 'bar' or \ feat.GetField('datetimefield') != '2012/08/23 21:24:00' or \ feat.GetField('datefield') != '2012/08/23' or \ feat.GetField('timefield') != '12:34:00' or \ feat.GetField('boolfield') != 1 or \ feat.GetField('int16field') != -32768 or \ feat.GetField('float32field') != 1.23 or \ feat.GetField('intlistfield') != [2, 3] or \ feat.GetField('int64listfield') != [1234567890123456] or \ feat.GetField('doublelistfield') != [1.23] or \ feat.GetField('strlistfield') != ['a']: feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) # Test SELECT with OGR_STYLE sql_lyr = ds.ExecuteSQL("SELECT *, OGR_STYLE FROM my_layer", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetField('intfield') != 2 or \ feat.GetField('nullablefield') is not None or \ feat.GetField('doublefield') != 3.45 or \ feat.GetField('strfield') != 'bar' or \ feat.GetStyleString() != 'cool_style': feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) # Test SELECT with filters # Success filters for cond in ['intfield = 2', 'intfield > 1', 'intfield >= 2', 'intfield < 3', 'intfield <= 2', 'int64field = 234567890123', 'doublefield = 3.45', 'doublefield > 3', 'doublefield >= 3.45', 'doublefield < 3.46', 'doublefield <= 3.45', "strfield = 'bar'", "strfield > 'baq'", "strfield >= 'bar'", "strfield < 'bas'", "strfield <= 'bar'", 'nullablefield IS NULL', "binaryfield = x'0001FF'", "OGR_STYLE = 'cool_style'", 'intfield = 2 AND doublefield = 3.45', 'ROWID = 0', 'intfield IS 2', 'intfield IS NOT 10000', 'intfield IS NOT NULL', "\"from\" = 'from_val'"]: sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer WHERE " + cond, dialect='SQLite') feat = sql_lyr.GetNextFeature() assert feat is not None, cond feat = None ds.ReleaseResultSet(sql_lyr) # Failed filters for cond in ['intfield = 0', 'intfield > 3', 'intfield >= 3', 'intfield < 0', 'intfield <= 0', 'doublefield = 0', 'doublefield > 3.46', 'doublefield >= 3.46', 'doublefield < 3.45', 'doublefield <= 0', "strfield = 'XXX'", "strfield > 'bas'", "strfield >= 'bas'", "strfield < 'bar'", "strfield <= 'baq'", 'intfield = 2 AND doublefield = 0', 'ROWID = 10000', 'intfield IS 10000', 'intfield IS NOT 2', "\"from\" = 'other_val'"]: sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer WHERE " + cond, dialect='SQLite') feat = sql_lyr.GetNextFeature() assert feat is None feat = None ds.ReleaseResultSet(sql_lyr) if geom != ogr.wkbNone: # Test a filter on geometry, to check that we won't try to optimize that sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer WHERE GEOMETRY = x'00'", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) # Test INSERT with specified ROWID/FID sql_lyr = ds.ExecuteSQL("INSERT INTO my_layer (intfield, ROWID) VALUES (100, 1000)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) feat = lyr.GetFeature(1000) if feat.GetField('intfield') != 100: feat.DumpReadable() pytest.fail() feat = None # Test DELETE sql_lyr = ds.ExecuteSQL("DELETE FROM my_layer WHERE intfield = 2", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("DELETE FROM my_layer WHERE ROWID = 1000", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) lyr.ResetReading() feat = lyr.GetNextFeature() if feat is not None: feat.DumpReadable() pytest.fail() feat = None ds.DeleteLayer(0) ds = None ############################################################################### # Tests that involve geometry (but without needing Spatialite) def test_ogr_sql_sqlite_2(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer("my_layer", srs=srs) field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('doublefield', ogr.OFTReal) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('strfield', ogr.OFTString) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('intfield', 1) feat.SetField('doublefield', 2.34) feat.SetField('strfield', 'foo') feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (0 1)')) feat.SetStyleString('cool_style') lyr.CreateFeature(feat) feat = None # Test UPDATE sql_lyr = ds.ExecuteSQL("UPDATE my_layer SET intfield = 2, doublefield = 3.45, strfield = 'bar' WHERE ROWID = 0", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetField('intfield') != 2 or \ feat.GetField('doublefield') != 3.45 or \ feat.GetField('strfield') != 'bar' or \ feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() feat = None # Test SELECT sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetField('intfield') != 2 or \ feat.GetField('doublefield') != 3.45 or \ feat.GetField('strfield') != 'bar' or \ feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() got_srs = feat.GetGeometryRef().GetSpatialReference() assert not (got_srs is None or srs.IsSame(got_srs, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']) == 0) feat = None ds.ReleaseResultSet(sql_lyr) # Test SELECT with OGR_STYLE sql_lyr = ds.ExecuteSQL("SELECT *, OGR_STYLE FROM my_layer", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetField('intfield') != 2 or \ feat.GetField('doublefield') != 3.45 or \ feat.GetField('strfield') != 'bar' or \ feat.GetStyleString() != 'cool_style' or \ feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() got_srs = feat.GetGeometryRef().GetSpatialReference() assert not (got_srs is None or srs.IsSame(got_srs, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']) == 0) feat = None ds.ReleaseResultSet(sql_lyr) # Test with a custom SRS srs = osr.SpatialReference() srs.SetFromUserInput("""LOCAL_CS["foo"]""") lyr = ds.CreateLayer("my_layer2", srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (0 1)')) lyr.CreateFeature(feat) feat = None feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (0 1)')) lyr.CreateFeature(feat) feat = None # Test SELECT sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer2", dialect='SQLite') layer_srs = sql_lyr.GetSpatialRef() assert not (layer_srs is None or srs.IsSame(layer_srs) == 0) for _ in range(2): feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() got_srs = feat.GetGeometryRef().GetSpatialReference() assert not (got_srs is None or srs.IsSame(got_srs) == 0) feat = None ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test that involves a left join def test_ogr_sql_sqlite_left_join(): ds = ogr.Open('data') sql_lyr = ds.ExecuteSQL("SELECT p.*, idlink.* FROM poly p LEFT JOIN idlink USING (EAS_ID) ORDER BY EAS_ID", dialect='SQLite') count = sql_lyr.GetFeatureCount() sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() if feat.GetField('NAME') != '_158_': feat.DumpReadable() pytest.fail() geom = feat.GetGeometryRef() p = geom.GetGeometryRef(0).GetPoint_2D(0) if p != (480701.0625, 4764738.0): feat.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) assert count == 10 ds = None ############################################################################### # Test that involves a join on layers without fast feature count def test_ogr_sql_sqlite_join_layers_without_fast_feature_count(): gdal.FileFromMemBuffer('/vsimem/tblmain.csv', """id,attr1 1,one 2,two 3,three """) gdal.FileFromMemBuffer('/vsimem/tblaux.csv', """id,attr2 1,ipsum 2,lorem 3,amet """) ds = ogr.Open('/vsimem/tblmain.csv') sql_lyr = ds.ExecuteSQL("SELECT tblmain.id, tblmain.attr1, tblaux.attr2 FROM tblmain JOIN '/vsimem/tblaux.csv'.tblaux AS tblaux USING (id) ORDER BY id", dialect='SQLite') count = sql_lyr.GetFeatureCount() sql_lyr.ResetReading() f = sql_lyr.GetNextFeature() assert f['id'] == '1' assert f['attr1'] == 'one' assert f['attr2'] == 'ipsum' f = sql_lyr.GetNextFeature() assert f['id'] == '2' assert f['attr1'] == 'two' assert f['attr2'] == 'lorem' f = sql_lyr.GetNextFeature() assert f['id'] == '3' assert f['attr1'] == 'three' assert f['attr2'] == 'amet' ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/tblmain.csv') gdal.Unlink('/vsimem/tblaux.csv') assert count == 3 ############################################################################### # Test that involves a self-join (to check that we can open twice the same table) def test_ogr_sql_sqlite_4(): ds = ogr.Open('data') sql_lyr = ds.ExecuteSQL("SELECT p.* FROM poly p JOIN poly USING (EAS_ID)", dialect='SQLite') count = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert count == 10 ds = None ############################################################################### # Test that involves spatialite def test_ogr_sql_sqlite_5(): gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/foo.db', options=['SPATIALITE=YES']) ogrtest.has_spatialite = ds is not None if ogrtest.has_spatialite: sql_lyr = ds.ExecuteSQL("SELECT spatialite_version()") feat = sql_lyr.GetNextFeature() gdaltest.spatialite_version = feat.GetFieldAsString(0) ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/foo.db') gdal.PopErrorHandler() if ogrtest.has_spatialite is False: pytest.skip('Spatialite not available') ds = ogr.Open('data') sql_lyr = ds.ExecuteSQL("SELECT MAX(ST_Length(GEOMETRY)) FROM POLY", dialect='SQLite') count = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds = None assert count == 1 ############################################################################### # If Spatialite available, retry some tests without it, to check that # we are fully compatible with regular SQLite def test_ogr_sql_sqlite_6(): if ogrtest.has_spatialite is False: pytest.skip() gdal.SetConfigOption('OGR_SQLITE_DIALECT_USE_SPATIALITE', 'NO') test_ogr_sql_sqlite_1() test_ogr_sql_sqlite_2() test_ogr_sql_sqlite_4() ############################################################################### # Test if there's a text column called GEOMETRY already in the table def test_ogr_sql_sqlite_7(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") lyr = ds.CreateLayer("my_layer") field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('geometry', ogr.OFTString) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('intfield', 1) feat.SetField('geometry', 'BLA') feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (0 1)')) lyr.CreateFeature(feat) feat = None # Test SELECT sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer", dialect='SQLite') assert sql_lyr.GetGeometryColumn() == 'GEOMETRY2' feat = sql_lyr.GetNextFeature() if feat.GetField('intfield') != 1 or \ feat.GetField('geometry') != 'BLA' or \ feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) # Test SELECT sql_lyr = ds.ExecuteSQL("SELECT GEOMETRY2 FROM my_layer", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test join with an external datasource def test_ogr_sql_sqlite_8(): ds = ogr.Open('data') expect = [171, 172, 173, 179] sql_lyr = ds.ExecuteSQL( 'SELECT p.*, il.name FROM poly p ' + 'LEFT JOIN "data/idlink.dbf".idlink il USING (eas_id) ' + 'WHERE eas_id > 170 ORDER BY eas_id', dialect='SQLite') tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Check parsing of sub-selects def test_ogr_sql_sqlite_9(): ds = ogr.Open('data') sql_lyr = ds.ExecuteSQL("SELECT count(*) as cnt FROM (SELECT * FROM (SELECT * FROM\n'data'.poly my_alias))p,(SELECT * FROM 'data'.idlink) il WHERE p.EAS_ID = il.EAS_id", dialect='SQLite') feat = sql_lyr.GetNextFeature() cnt = feat.GetField('cnt') feat = None ds.ReleaseResultSet(sql_lyr) if cnt != 7: return' fail' ############################################################################### # Test optimized count(*) def test_ogr_sql_sqlite_10(): ds = ogr.Open('data') sql_lyr = ds.ExecuteSQL("SELECT count(*) as cnt FROM poly", dialect='SQLite') feat = sql_lyr.GetNextFeature() cnt = feat.GetField('cnt') feat = None ds.ReleaseResultSet(sql_lyr) if cnt != 10: return' fail' ############################################################################### # Test correct parsing of litterals def test_ogr_sql_sqlite_11(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") lyr = ds.CreateLayer("my_layer") field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('intfield', 1) lyr.CreateFeature(feat) feat = None sql_lyr = ds.ExecuteSQL("SELECT 'a' FROM \"my_layer\"", dialect='SQLite') cnt = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds = None if cnt != 1: return' fail' ############################################################################### # Test various error conditions def test_ogr_sql_sqlite_12(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") # Invalid SQL gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("qdfdfdf", dialect='SQLite') gdal.PopErrorHandler() ds.ReleaseResultSet(sql_lyr) # Non existing external datasource gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT * FROM 'foo'.'bar'", dialect='SQLite') gdal.PopErrorHandler() ds.ReleaseResultSet(sql_lyr) # Non existing layer in existing external datasource gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT * FROM 'data'.'azertyuio'", dialect='SQLite') gdal.PopErrorHandler() ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test ogr_layer_Extent(), ogr_layer_SRID() and ogr_layer_GeometryType() def test_ogr_sql_sqlite_13(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer("non_spatial", geom_type=ogr.wkbNone) lyr = ds.CreateLayer("my_layer", geom_type=ogr.wkbLineString, srs=srs) field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (0 1,2 3)')) lyr.CreateFeature(feat) feat = None # Test with invalid parameter gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_Extent(12)", dialect='SQLite') gdal.PopErrorHandler() feat = sql_lyr.GetNextFeature() geom = feat.GetGeometryRef() ds.ReleaseResultSet(sql_lyr) assert geom is None # Test on non existing layer gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_Extent('foo')", dialect='SQLite') gdal.PopErrorHandler() feat = sql_lyr.GetNextFeature() geom = feat.GetGeometryRef() ds.ReleaseResultSet(sql_lyr) assert geom is None # Test ogr_layer_Extent() sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_Extent('my_layer')", dialect='SQLite') feat = sql_lyr.GetNextFeature() geom_wkt = feat.GetGeometryRef().ExportToWkt() feat = None ds.ReleaseResultSet(sql_lyr) assert geom_wkt == 'POLYGON ((0 1,2 1,2 3,0 3,0 1))' # Test ogr_layer_FeatureCount() sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_FeatureCount('my_layer') AS the_count", dialect='SQLite') feat = sql_lyr.GetNextFeature() count = feat.GetField('the_count') feat = None ds.ReleaseResultSet(sql_lyr) assert count == 1 # Test ogr_layer_Extent() on a non spatial layer sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_Extent('non_spatial')", dialect='SQLite') feat = sql_lyr.GetNextFeature() geom = feat.GetGeometryRef() ds.ReleaseResultSet(sql_lyr) assert geom is None # Test ogr_layer_SRID() sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_SRID('my_layer') AS the_srid", dialect='SQLite') feat = sql_lyr.GetNextFeature() the_srid = feat.GetField('the_srid') feat = None ds.ReleaseResultSet(sql_lyr) assert the_srid == 4326 # Test ogr_layer_SRID() on a non spatial layer sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_SRID('non_spatial') AS the_srid", dialect='SQLite') feat = sql_lyr.GetNextFeature() the_srid = feat.GetField('the_srid') feat = None ds.ReleaseResultSet(sql_lyr) assert the_srid is None # Test ogr_layer_GeometryType() sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_GeometryType('my_layer') AS the_geometrytype", dialect='SQLite') feat = sql_lyr.GetNextFeature() the_geometrytype = feat.GetField('the_geometrytype') feat = None ds.ReleaseResultSet(sql_lyr) assert the_geometrytype == 'LINESTRING' # Test ogr_layer_GeometryType() on a non spatial layer sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_GeometryType('non_spatial') AS the_geometrytype", dialect='SQLite') feat = sql_lyr.GetNextFeature() the_geometrytype = feat.GetField('the_geometrytype') feat = None ds.ReleaseResultSet(sql_lyr) assert the_geometrytype is None # Test on a external virtual table ds_shape = ogr.GetDriverByName("ESRI Shapefile").CreateDataSource('/vsimem/ogr_sql_sqlite_13.shp') srs = osr.SpatialReference() srs.ImportFromEPSG(32631) lyr = ds_shape.CreateLayer('ogr_sql_sqlite_13', srs=srs) ds_shape = None sql_lyr = ds.ExecuteSQL("SELECT ogr_layer_SRID('/vsimem/ogr_sql_sqlite_13.shp'.ogr_sql_sqlite_13) AS the_srid_shp", dialect='SQLite') feat = sql_lyr.GetNextFeature() the_srid_shp = feat.GetField('the_srid_shp') feat = None ds.ReleaseResultSet(sql_lyr) ogr.GetDriverByName("ESRI Shapefile").DeleteDataSource('/vsimem/ogr_sql_sqlite_13.shp') assert the_srid_shp == 32631 ds = None ############################################################################### # def ogr_sql_sqlite_14_and_15(sql): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer("my_layer", geom_type=ogr.wkbLineString, srs=srs) field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (0 0,1 1)')) lyr.CreateFeature(feat) feat = None feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 2) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (10 0,11 1)')) lyr.CreateFeature(feat) feat = None lyr2 = ds.CreateLayer("my_layer2", geom_type=ogr.wkbLineString, srs=srs) field_defn = ogr.FieldDefn('intfield2', ogr.OFTInteger) lyr2.CreateField(field_defn) feat = ogr.Feature(lyr2.GetLayerDefn()) feat.SetField(0, 11) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (10 1,11 0)')) lyr2.CreateFeature(feat) feat = None feat = ogr.Feature(lyr2.GetLayerDefn()) feat.SetField(0, 12) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING (0 1,1 0)')) lyr2.CreateFeature(feat) feat = None got_one = False got_two = False sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') for _ in range(2): feat = sql_lyr.GetNextFeature() i1 = feat.GetField('intfield') i2 = feat.GetField('intfield2') if (i1 == 1 and i2 == 12): got_one = True if (i1 == 2 and i2 == 11): got_two = True feat = None feat = sql_lyr.GetNextFeature() assert feat is None ds.ReleaseResultSet(sql_lyr) assert (got_one and got_two) ############################################################################### # Test 'idx_layername_geometryname' spatial index recognition def test_ogr_sql_sqlite_14(): if ogrtest.has_spatialite is False: pytest.skip() sql = "SELECT intfield, intfield2 FROM my_layer, my_layer2 WHERE " + \ "my_layer2.rowid IN (SELECT pkid FROM idx_my_layer2_geometry WHERE " + \ "xmax > MbrMinX(my_layer.geometry) AND xmin < MbrMaxX(my_layer.geometry) AND " + \ "ymax >= MbrMinY(my_layer.geometry) AND ymin <= MbrMaxY(my_layer.geometry) )" return ogr_sql_sqlite_14_and_15(sql) ############################################################################### # Test 'SpatialIndex' spatial index recognition def test_ogr_sql_sqlite_15(): if ogrtest.has_spatialite is False: pytest.skip() if int(gdaltest.spatialite_version[0:gdaltest.spatialite_version.find('.')]) < 3: pytest.skip() sql = "SELECT intfield, intfield2 FROM my_layer, my_layer2 WHERE " + \ "my_layer2.rowid IN (SELECT ROWID FROM SpatialIndex WHERE f_table_name = 'my_layer2' AND search_frame = my_layer.geometry)" return ogr_sql_sqlite_14_and_15(sql) ############################################################################### do_log = False class GeocodingHTTPHandler(BaseHTTPRequestHandler): def log_request(self, code='-', size='-'): pass def do_GET(self): try: if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() if self.path.find('/geocoding') != -1: if self.path == '/geocoding?q=Paris&addressdetails=1&limit=1&email=foo%40bar': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" Paris Ile-de-France France metropolitaine fr """.encode('ascii')) return if self.path == '/geocoding?q=NonExistingPlace&addressdetails=1&limit=1&email=foo%40bar': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write("""""".encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return elif self.path.find('/yahoogeocoding') != -1: if self.path == '/yahoogeocoding?q=Paris': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write("""0No erroren-US1404048.856932.341248.856932.34129200ParisFranceParisParisIle-de-FranceFranceFR75750016157027 """.encode('ascii')) return if self.path == '/yahoogeocoding?q=NonExistingPlace': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write("""7No resulten-US00 """.encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return elif self.path.find('/geonamesgeocoding') != -1: if self.path == '/geonamesgeocoding?q=Paris&username=demo': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" 2356 Paris Paris 48.85341 2.3488 2988507 FR France P PPLC """.encode('ascii')) return if self.path == '/geonamesgeocoding?q=NonExistingPlace&username=demo': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" 0 """.encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return elif self.path.find('/binggeocoding') != -1: if self.path == '/binggeocoding?q=Paris&key=fakekey': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" 1 Paris, Paris, France 48 2 48 2 48 2
IdF Paris France Paris, Paris, France Paris
48 2 Random Display
""".encode('ascii')) return if self.path == '/binggeocoding?q=NonExistingPlace&key=fakekey': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" 0 """.encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return # Below is for reverse geocoding elif self.path.find('/reversegeocoding') != -1: if self.path == '/reversegeocoding?lon=2.00000000&lat=49.00000000&email=foo%40bar' or \ self.path == '/reversegeocoding?lon=2.00000000&lat=49.00000000&zoom=12&email=foo%40bar': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" Chemin du Cordon, Foret de l'Hautil, Triel-sur-Seine, Saint-Germain-en-Laye, Yvelines, Ile-de-France, 78510, France metropolitaine Chemin du Cordon Foret de l'Hautil Triel-sur-Seine Saint-Germain-en-Laye Ile-de-France 78510 France metropolitaine fr """.encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return elif self.path.find('/yahooreversegeocoding') != -1: if self.path == '/yahooreversegeocoding?q=49.00000000,2.00000000&gflags=R': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write("""0No erroren-US1997249.0011.99986449.0011.99986440049.00000000,2.00000000Chemin de Menucourt78510 Triel-sur-SeineFranceChemin de Menucourt78510Triel-sur-SeineYvelinesIle-de-FranceFranceFR78785101272751811 """.encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return elif self.path.find('/geonamesreversegeocoding') != -1: if self.path == '/geonamesreversegeocoding?lat=49.00000000&lng=2.00000000&username=demo': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" Paris Basin Paris Basin 49 2 2988503 FR France T DPR 0 """.encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return elif self.path.find('/bingreversegeocoding') != -1: if self.path == '/bingreversegeocoding?49.00000000,2.00000000&key=fakekey': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() self.wfile.write(""" 1 Paris, Paris, France 48 2 48 2 48 2
IdF Paris France Paris, Paris, France Paris
48 2 Random Display
""".encode('ascii')) return self.send_error(404, 'File Not Found: %s' % self.path) return return except IOError: pass self.send_error(404, 'File Not Found: %s' % self.path) ############################################################################### def test_ogr_sql_sqlite_start_webserver(): ogrtest.webserver_process = None ogrtest.webserver_port = 0 if gdal.GetDriverByName('HTTP') is None: pytest.skip() (ogrtest.webserver_process, ogrtest.webserver_port) = webserver.launch(handler=GeocodingHTTPHandler) if ogrtest.webserver_port == 0: pytest.skip() ############################################################################### # Test ogr_geocode() def test_ogr_sql_sqlite_16(service=None, template='http://127.0.0.1:%d/geocoding?q=%%s'): if ogrtest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('OGR_GEOCODE_APPLICATION', 'GDAL/OGR autotest suite') gdal.SetConfigOption('OGR_GEOCODE_EMAIL', 'foo@bar') gdal.SetConfigOption('OGR_GEOCODE_QUERY_TEMPLATE', template % ogrtest.webserver_port) gdal.SetConfigOption('OGR_GEOCODE_DELAY', '0.1') gdal.SetConfigOption('OGR_GEOCODE_SERVICE', service) if service == 'GEONAMES': gdal.SetConfigOption('OGR_GEOCODE_USERNAME', 'demo') elif service == 'BING': gdal.SetConfigOption('OGR_GEOCODE_KEY', 'fakekey') for cache_filename in ['tmp/ogr_geocode_cache.sqlite', 'tmp/ogr_geocode_cache.csv']: gdal.Unlink(cache_filename) gdal.SetConfigOption('OGR_GEOCODE_CACHE_FILE', cache_filename) ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") if service == 'BING': name_field = "Name" else: name_field = "display_name" for sql in ["SELECT ogr_geocode('Paris')", "SELECT ogr_geocode('Paris', 'geometry')", "SELECT ogr_geocode('Paris', '%s') AS %s" % (name_field, name_field), "SELECT ogr_geocode('Paris', 'raw') AS raw"]: sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat is None: print(sql) ds.ReleaseResultSet(sql_lyr) pytest.fail() if ((sql == "SELECT ogr_geocode('Paris')" or sql == "SELECT ogr_geocode('Paris', 'geometry')") and feat.GetGeometryRef() is None) or \ (sql == "SELECT ogr_geocode('Paris', '%s')" % name_field and not feat.IsFieldSet(name_field)) or \ (sql == "SELECT ogr_geocode('Paris', 'raw')" and not feat.IsFieldSet('raw')): feat.DumpReadable() print(sql) ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) for sql in ["SELECT ogr_geocode('NonExistingPlace')", "SELECT ogr_geocode('Error')"]: sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat is None: ds.ReleaseResultSet(sql_lyr) pytest.fail() if feat.GetGeometryRef() is not None: feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Test various syntax errors sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode()", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode(5)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode('Paris', 5)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode('Paris', 'geometry', 5)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) ds = None # Check cache existence cache_ds = ogr.Open(cache_filename) assert cache_ds is not None if cache_ds.GetDriver().GetName().lower() != cache_filename[cache_filename.find('.') + 1:].lower(): print(cache_ds.GetDriver().GetName()) print(cache_filename) pytest.fail() cache_ds = None gdal.Unlink(cache_filename) ds = None ############################################################################### # Test ogr_geocode_reverse() def test_ogr_sql_sqlite_17(service=None, template='http://127.0.0.1:%d/reversegeocoding?lon={lon}&lat={lat}'): if ogrtest.webserver_port == 0: pytest.skip() gdal.SetConfigOption('OGR_GEOCODE_APPLICATION', 'GDAL/OGR autotest suite') gdal.SetConfigOption('OGR_GEOCODE_EMAIL', 'foo@bar') gdal.SetConfigOption('OGR_GEOCODE_REVERSE_QUERY_TEMPLATE', template % ogrtest.webserver_port) gdal.SetConfigOption('OGR_GEOCODE_DELAY', '0.1') gdal.SetConfigOption('OGR_GEOCODE_SERVICE', service) if service == 'GEONAMES': gdal.SetConfigOption('OGR_GEOCODE_USERNAME', 'demo') elif service == 'BING': gdal.SetConfigOption('OGR_GEOCODE_KEY', 'fakekey') for cache_filename in ['tmp/ogr_geocode_cache.sqlite', 'tmp/ogr_geocode_cache.csv']: gdal.Unlink(cache_filename) gdal.SetConfigOption('OGR_GEOCODE_CACHE_FILE', cache_filename) ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") if service == 'GEONAMES': name_field = "name" elif service == 'BING': name_field = "Name" else: name_field = "display_name" sql_list = ["SELECT ogr_geocode_reverse(2,49,'%s') AS %s" % (name_field, name_field), "SELECT ogr_geocode_reverse(2,49,'%s','zoom=12') AS %s" % (name_field, name_field), "SELECT ogr_geocode_reverse(2.0,49.0,'%s') AS %s" % (name_field, name_field), "SELECT ogr_geocode_reverse(2.0,49.0,'raw') AS raw"] if ogrtest.has_spatialite: sql_list.append("SELECT ogr_geocode_reverse(MakePoint(2,49),'%s') AS %s" % (name_field, name_field)) sql_list.append("SELECT ogr_geocode_reverse(MakePoint(2,49),'%s','zoom=12') AS %s" % (name_field, name_field)) for sql in sql_list: sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat is None: print(sql) ds.ReleaseResultSet(sql_lyr) pytest.fail() if sql.find('raw') != -1: field_to_test = 'raw' else: field_to_test = name_field if not feat.IsFieldSet(field_to_test): feat.DumpReadable() print(sql) ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Test various syntax errors sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode_reverse()", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode_reverse(2)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode_reverse(2, 'foo')", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode_reverse(2, 49)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) if ogrtest.has_spatialite: sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode_reverse(MakePoint(2,49))", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_geocode_reverse(MakePoint(2,49), 5)", dialect='SQLite') ds.ReleaseResultSet(sql_lyr) ds = None # Check cache existence cache_ds = ogr.Open(cache_filename) assert cache_ds is not None cache_ds = None gdal.Unlink(cache_filename) ds = None ############################################################################### # Test ogr_geocode() with Yahoo geocoding service def test_ogr_sql_sqlite_18(): return test_ogr_sql_sqlite_16('YAHOO', 'http://127.0.0.1:%d/yahoogeocoding?q=%%s') ############################################################################### # Test ogr_geocode_reverse() with Yahoo geocoding service def test_ogr_sql_sqlite_19(): return test_ogr_sql_sqlite_17('YAHOO', 'http://127.0.0.1:%d/yahooreversegeocoding?q={lat},{lon}&gflags=R') ############################################################################### # Test ogr_geocode() with GeoNames.org geocoding service def test_ogr_sql_sqlite_20(): return test_ogr_sql_sqlite_16('GEONAMES', 'http://127.0.0.1:%d/geonamesgeocoding?q=%%s') ############################################################################### # Test ogr_geocode_reverse() with GeoNames.org geocoding service def test_ogr_sql_sqlite_21(): return test_ogr_sql_sqlite_17('GEONAMES', 'http://127.0.0.1:%d/geonamesreversegeocoding?lat={lat}&lng={lon}') ############################################################################### # Test ogr_geocode() with Bing geocoding service def test_ogr_sql_sqlite_22(): return test_ogr_sql_sqlite_16('BING', 'http://127.0.0.1:%d/binggeocoding?q=%%s') ############################################################################### # Test ogr_geocode_reverse() with Bing geocoding service def test_ogr_sql_sqlite_23(): return test_ogr_sql_sqlite_17('BING', 'http://127.0.0.1:%d/bingreversegeocoding?{lat},{lon}') ############################################################################### # Test ogr_deflate() and ogr_inflate() def test_ogr_sql_sqlite_24(): ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") # Very short string sql_lyr = ds.ExecuteSQL("SELECT CAST(ogr_inflate(ogr_deflate('ab')) AS VARCHAR)", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetField(0) != 'ab': feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Big very compressible string bigstr = 'a' * 10000 sql_lyr = ds.ExecuteSQL("SELECT CAST(ogr_inflate(ogr_deflate('%s')) AS VARCHAR)" % bigstr, dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetField(0) != bigstr: feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Blob sql_lyr = ds.ExecuteSQL("SELECT ogr_inflate(ogr_deflate(x'0203', 5))", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetField(0) != '0203': feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Test inflating a random binary blob sql_lyr = ds.ExecuteSQL("SELECT ogr_inflate(x'0203')", dialect='SQLite') feat = sql_lyr.GetNextFeature() if not feat.IsFieldNull(0): feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Error case gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT ogr_deflate()", dialect='SQLite') gdal.PopErrorHandler() if sql_lyr is not None: ds.ReleaseResultSet(sql_lyr) pytest.fail() # Error case sql_lyr = ds.ExecuteSQL("SELECT ogr_deflate('a', 'b')", dialect='SQLite') feat = sql_lyr.GetNextFeature() if not feat.IsFieldNull(0): feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) # Error case gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT ogr_inflate()", dialect='SQLite') gdal.PopErrorHandler() if sql_lyr is not None: ds.ReleaseResultSet(sql_lyr) pytest.fail() # Error case sql_lyr = ds.ExecuteSQL("SELECT ogr_inflate('a')", dialect='SQLite') feat = sql_lyr.GetNextFeature() if not feat.IsFieldNull(0): feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) ############################################################################### def test_ogr_sql_sqlite_stop_webserver(): if ogrtest.webserver_port == 0: pytest.skip() webserver.server_stop(ogrtest.webserver_process, ogrtest.webserver_port) ############################################################################### # If Spatialite is NOT available, test some of the minimal spatial functions # implemented. Test it also if spatialite is available, so we have a cross # validation... def ogr_sql_sqlite_25_test_errors(ds, fct): for val in ['null', "'foo'", "x'00010203'"]: sql_lyr = ds.ExecuteSQL("SELECT %s(%s)" % (fct, val), dialect='SQLite') feat = sql_lyr.GetNextFeature() if not feat.IsFieldNull(0): feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) print(val) return False ds.ReleaseResultSet(sql_lyr) return True def test_ogr_sql_sqlite_25(): # if ogrtest.has_spatialite is True: # return 'skip' ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") # Test ST_AsText, ST_GeomFromText, ST_AsBinary, ST_GeomFromWKB sql_lyr = ds.ExecuteSQL("SELECT ST_GeomFromWKB(ST_AsBinary(ST_GeomFromText(ST_AsText(ST_GeomFromText('POINT (0 1)')),4326)))", dialect='SQLite') feat = sql_lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'POINT (0 1)': feat.DumpReadable() ds.ReleaseResultSet(sql_lyr) pytest.fail() ds.ReleaseResultSet(sql_lyr) for fct in ["ST_AsText", "ST_GeomFromText", "ST_AsBinary", "ST_GeomFromWKB"]: assert ogr_sql_sqlite_25_test_errors(ds, fct), ('fail with %s' % fct) # Test ST_SRID sql_lyr = ds.ExecuteSQL("SELECT ST_SRID(ST_GeomFromText('POINT(0 0)',4326))", dialect='SQLite') feat = sql_lyr.GetNextFeature() val_sql = feat.GetField(0) ds.ReleaseResultSet(sql_lyr) assert val_sql == 4326 # Test ST_Area sql_lyr = ds.ExecuteSQL("SELECT ST_Area(ST_GeomFromText('%s')), ST_Area(null), ST_Area(x'00')" % 'POLYGON((0 0,0 1,1 1,1 0,0 0))', dialect='SQLite') feat = sql_lyr.GetNextFeature() val_sql = feat.GetField(0) val1_sql = feat.GetField(1) val2_sql = feat.GetField(2) ds.ReleaseResultSet(sql_lyr) geomA = ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,1 0,0 0))') val_ogr = geomA.GetArea() assert val_sql == pytest.approx(val_ogr, abs=1e-5) assert val1_sql is None assert val2_sql is None def test_ogr_sql_sqlite_26(): if not ogrtest.have_geos(): pytest.skip() # if ogrtest.has_spatialite is True: # return 'skip' ds = ogr.GetDriverByName("Memory").CreateDataSource("my_ds") geom1_wkt = 'POLYGON((0 0,0 1,1 1,1 0,0 0))' geom2_wkt = 'POLYGON((0.5 0.5,0.5 1.5,1.5 1.5,1.5 0.5,0.5 0.5))' geom3_wkt = 'POLYGON((0.25 0.25,0.25 0.75,0.75 0.75,0.75 0.25,0.25 0.25))' geom4_wkt = 'POLYGON((1 0,1 1,2 1,2 0,1 0))' # Test ST_Buffer op_str = 'Buffer' sql_lyr = ds.ExecuteSQL("SELECT %s(ST_GeomFromText('%s'),0.1)" % (op_str, geom1_wkt), dialect='SQLite') feat = sql_lyr.GetNextFeature() geom_sql = feat.GetGeometryRef() ds.ReleaseResultSet(sql_lyr) geom = ogr.CreateGeometryFromWkt(geom1_wkt) geom_geos = geom.Buffer(0.1) assert geom_sql.Equals(geom_geos) != 0, ('fail with %s' % op_str) for op_str in ["IsEmpty", "IsSimple", "IsValid"]: for wkt in ['POLYGON EMPTY', 'POINT(0 1)', 'POLYGON((0 0,1 1,0 1,1 0,0 0))']: sql_lyr = ds.ExecuteSQL("SELECT ST_%s(ST_GeomFromText('%s'))" % (op_str, wkt), dialect='SQLite') feat = sql_lyr.GetNextFeature() b_sql = feat.GetField(0) ds.ReleaseResultSet(sql_lyr) b_sql = bool(b_sql == 1) geom = ogr.CreateGeometryFromWkt(wkt) op = getattr(geom, op_str) b_geos = op() if b_sql != b_geos: if wkt == 'POLYGON EMPTY': print('difference with op = %s and wkt = POLYGON EMPTY' % op_str) else: print(wkt) print(b_sql) print(b_geos) pytest.fail('fail with %s' % op_str) for op_str in ["Intersects", "Equals", "Disjoint", "Touches", "Crosses", "Within", "Contains", "Overlaps"]: for (geomA_wkt, geomB_wkt) in [(geom1_wkt, geom1_wkt), (geom1_wkt, geom2_wkt), (geom1_wkt, geom3_wkt), (geom1_wkt, geom4_wkt)]: sql_lyr = ds.ExecuteSQL("SELECT ST_%s(ST_GeomFromText('%s'), ST_GeomFromText('%s'))" % (op_str, geomA_wkt, geomB_wkt), dialect='SQLite') feat = sql_lyr.GetNextFeature() b_sql = feat.GetField(0) ds.ReleaseResultSet(sql_lyr) b_sql = bool(b_sql == 1) geomA = ogr.CreateGeometryFromWkt(geomA_wkt) geomB = ogr.CreateGeometryFromWkt(geomB_wkt) op = getattr(geomA, op_str) b_geos = op(geomB) assert b_sql == b_geos, ('fail with %s' % op_str) for op_str in ["Intersection", "Difference", "Union", "SymDifference"]: for (geomA_wkt, geomB_wkt) in [(geom1_wkt, geom1_wkt), (geom1_wkt, geom2_wkt), (geom1_wkt, geom3_wkt), (geom1_wkt, geom4_wkt)]: sql_lyr = ds.ExecuteSQL("SELECT ST_%s(ST_GeomFromText('%s'), ST_GeomFromText('%s'))" % (op_str, geomA_wkt, geomB_wkt), dialect='SQLite') feat = sql_lyr.GetNextFeature() geom_sql = feat.GetGeometryRef() if geom_sql is not None: geom_sql = geom_sql.Clone() ds.ReleaseResultSet(sql_lyr) geomA = ogr.CreateGeometryFromWkt(geomA_wkt) geomB = ogr.CreateGeometryFromWkt(geomB_wkt) op = getattr(geomA, op_str) geom_geos = op(geomB) if geom_sql is None: # GEOS can return empty geometry collection, while spatialite # does not if geom_geos is not None and geom_geos.IsEmpty() == 0: print(geomA_wkt) print(geomB_wkt) print(geom_geos.ExportToWkt()) pytest.fail('fail with %s' % op_str) elif geom_sql.IsEmpty() and geom_geos.IsEmpty(): # geom_sql might be a POLYGON made of an empty ring # while geom_geos is a POLYGON without a ring #import struct #print struct.unpack('B' * len(geom_sql.ExportToWkb()), geom_sql.ExportToWkb()) #print struct.unpack('B' * len(geom_geos.ExportToWkb()), geom_geos.ExportToWkb()) pass else: assert geom_sql.Equals(geom_geos) != 0, ('fail with %s: %s %s %s %s' % (op_str, geomA_wkt, geomB_wkt, geom_sql.ExportToWkt(), geom_geos.ExportToWkt())) # Error cases op_str = 'Intersects' for val in ['null', "'foo'", "x'00010203'"]: sql_lyr = ds.ExecuteSQL("SELECT ST_%s(ST_GeomFromText('%s'), %s), ST_%s(%s, ST_GeomFromText('%s'))" % (op_str, geom1_wkt, val, op_str, val, geom1_wkt), dialect='SQLite') feat = sql_lyr.GetNextFeature() b0_sql = feat.GetField(0) b1_sql = feat.GetField(1) ds.ReleaseResultSet(sql_lyr) assert b0_sql <= 0 and b1_sql <= 0, ('fail with %s' % op_str) op_str = 'Intersection' for val in ['null', "'foo'", "x'00010203'"]: sql_lyr = ds.ExecuteSQL("SELECT ST_%s(ST_GeomFromText('%s'), %s)" % (op_str, geom1_wkt, val), dialect='SQLite') feat = sql_lyr.GetNextFeature() geom_sql = feat.GetGeometryRef() ds.ReleaseResultSet(sql_lyr) assert geom_sql is None, ('fail with %s' % op_str) sql_lyr = ds.ExecuteSQL("SELECT ST_%s(%s, ST_GeomFromText('%s'))" % (op_str, val, geom1_wkt), dialect='SQLite') feat = sql_lyr.GetNextFeature() geom_sql = feat.GetGeometryRef() ds.ReleaseResultSet(sql_lyr) assert geom_sql is None, ('fail with %s' % op_str) ############################################################################### # Test MIN(), MAX() on a date def test_ogr_sql_sqlite_27(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('DATE', ogr.OFTDateTime)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '2013/12/31 23:59:59') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '2013/01/01 00:00:00') lyr.CreateFeature(feat) lyr = ds.ExecuteSQL("SELECT MIN(DATE), MAX(DATE) from test", dialect='SQLite') assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTDateTime assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTDateTime tr = ogrtest.check_features_against_list(lyr, 'MIN(DATE)', ['2013/01/01 00:00:00']) lyr.ResetReading() tr2 = ogrtest.check_features_against_list(lyr, 'MAX(DATE)', ['2013/12/31 23:59:59']) ds.ReleaseResultSet(lyr) assert tr assert tr2 ############################################################################### # Test hstore_get_value() def test_ogr_sql_sqlite_28(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') # Invalid parameters for sql in ["SELECT hstore_get_value('a')"]: gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') gdal.PopErrorHandler() assert sql_lyr is None, sql # Invalid hstore syntax or empty result for sql in ["SELECT hstore_get_value('a', null)", "SELECT hstore_get_value(null, 'a')", "SELECT hstore_get_value(1,'a')", "SELECT hstore_get_value('a',1)", "SELECT hstore_get_value('a=>b','c')"]: sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') f = sql_lyr.GetNextFeature() if not f.IsFieldNull(0): f.DumpReadable() pytest.fail(sql) ds.ReleaseResultSet(sql_lyr) # Valid hstore syntax for (sql, expected) in [("SELECT hstore_get_value('a=>b', 'a')", 'b'), ]: sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') f = sql_lyr.GetNextFeature() if f.GetField(0) != expected: f.DumpReadable() pytest.fail(sql) ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test compat with curve geometries def test_ogr_sql_sqlite_29(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test', geom_type=ogr.wkbCircularString) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 0,0 0)')) lyr.CreateFeature(f) f = None sql_lyr = ds.ExecuteSQL('select * from test', dialect='SQLite') geom_type = sql_lyr.GetGeomType() f = sql_lyr.GetNextFeature() got_wkt = f.GetGeometryRef().ExportToWkt() ds.ReleaseResultSet(sql_lyr) ds = None assert geom_type == ogr.wkbCircularString assert got_wkt == 'CIRCULARSTRING (0 0,1 0,0 0)' ############################################################################### # Test compat with M geometries def test_ogr_sql_sqlite_30(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('testm', geom_type=ogr.wkbLineStringM) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING M (1 2 3)')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('testzm', geom_type=ogr.wkbLineStringZM) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING ZM (1 2 3 4)')) lyr.CreateFeature(f) f = None sql_lyr = ds.ExecuteSQL('select * from testm', dialect='SQLite') geom_type = sql_lyr.GetGeomType() f = sql_lyr.GetNextFeature() got_wkt = f.GetGeometryRef().ExportToIsoWkt() ds.ReleaseResultSet(sql_lyr) assert geom_type == ogr.wkbLineStringM assert got_wkt == 'LINESTRING M (1 2 3)' sql_lyr = ds.ExecuteSQL('select * from testzm', dialect='SQLite') geom_type = sql_lyr.GetGeomType() f = sql_lyr.GetNextFeature() got_wkt = f.GetGeometryRef().ExportToIsoWkt() ds.ReleaseResultSet(sql_lyr) assert geom_type == ogr.wkbLineStringZM assert got_wkt == 'LINESTRING ZM (1 2 3 4)' ############################################################################### # Test filtering complex field name def test_ogr_sql_sqlite_31(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('50M3 @w35Om3 N@M3', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 25) lyr.CreateFeature(f) f = None sql_lyr = ds.ExecuteSQL('select * from test where "50M3 @w35Om3 N@M3" = 25', dialect='SQLite') f = sql_lyr.GetNextFeature() value = f.GetField(0) ds.ReleaseResultSet(sql_lyr) assert value == 25 ############################################################################### # Test flattening of geometry collection inside geometry collection def test_ogr_sql_sqlite_geomcollection_in_geomcollection(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test', geom_type=ogr.wkbLineStringM) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (MULTIPOINT(1 2,3 4),MULTILINESTRING((5 6,7 8),(9 10,11 12)))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((5 6,7 8),(9 10,11 12))')) lyr.CreateFeature(f) f = None sql_lyr = ds.ExecuteSQL('select * from test', dialect='SQLite') f = sql_lyr.GetNextFeature() got_wkt_1 = f.GetGeometryRef().ExportToIsoWkt() f = sql_lyr.GetNextFeature() got_wkt_2 = f.GetGeometryRef().ExportToIsoWkt() ds.ReleaseResultSet(sql_lyr) assert got_wkt_1 == 'GEOMETRYCOLLECTION (POINT (1 2),POINT (3 4),LINESTRING (5 6,7 8),LINESTRING (9 10,11 12))' assert got_wkt_2 == 'MULTILINESTRING ((5 6,7 8),(9 10,11 12))' ############################################################################### # Test ST_MakeValid() def test_ogr_sql_sqlite_st_makevalid(): # Check if MakeValid() is available g = ogr.CreateGeometryFromWkt('POLYGON ((0 0,10 10,0 10,10 0,0 0))') with gdaltest.error_handler(): make_valid_available = g.MakeValid() is not None ds = ogr.GetDriverByName('Memory').CreateDataSource('') sql = "SELECT ST_MakeValid(ST_GeomFromText('POLYGON ((0 0,1 1,1 0,0 1,0 0))'))" sql_lyr = ds.ExecuteSQL(sql, dialect='SQLite') f = sql_lyr.GetNextFeature() g = f.GetGeometryRef() wkt = g.ExportToWkt() if g is not None else None ds.ReleaseResultSet(sql_lyr) if make_valid_available: assert wkt == 'MULTIPOLYGON (((0.5 0.5,0 0,0 1,0.5 0.5)),((0.5 0.5,1 1,1 0,0.5 0.5)))' gdalautotest-3.1.2/ogr/ogr_segy.py0000775000175000017500000000641213701060010015644 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_segy.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR SEG-Y driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import ogr import pytest ############################################################################### # Read SEG-Y def test_ogr_segy_1(): ds = ogr.Open('data/segy/testsegy.segy') assert ds is not None, 'cannot open dataset' assert ds.TestCapability("foo") == 0 assert ds.GetLayerCount() == 2, 'bad layer count' lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint, 'bad layer geometry type' assert lyr.GetSpatialRef() is None, 'bad spatial ref' assert lyr.TestCapability("foo") == 0 assert lyr.GetLayerDefn().GetFieldCount() == 71 feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT (500000 4500000)', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') feat = lyr.GetNextFeature() assert feat is None lyr = ds.GetLayer(1) assert lyr.GetGeomType() == ogr.wkbNone, 'bad layer geometry type' assert lyr.GetSpatialRef() is None, 'bad spatial ref' assert lyr.TestCapability("foo") == 0 assert lyr.GetLayerDefn().GetFieldCount() == 32 feat = lyr.GetNextFeature() assert feat is not None feat = lyr.GetNextFeature() assert feat is None ############################################################################### # Read ASCII header SEG-Y def test_ogr_segy_2(): ds = ogr.Open('data/segy/ascii-header-with-nuls.sgy') assert ds is not None, 'cannot open dataset' assert ds.GetLayerCount() == 2, 'bad layer count' lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint, 'bad layer geometry type' gdalautotest-3.1.2/ogr/__init__.py0000775000175000017500000000000013701060010015550 0ustar evenevengdalautotest-3.1.2/ogr/ogr_osm.py0000775000175000017500000006054413701060010015501 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_osm.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR OSM driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2012-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import ogr from osgeo import gdal import gdaltest import ogrtest import pytest ############################################################################### # Test .pbf def test_ogr_osm_1(filename='data/test.pbf'): ogrtest.osm_drv = ogr.GetDriverByName('OSM') if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open(filename) if ds is None: if filename == 'data/test.osm': ogrtest.osm_drv_parse_osm = False if gdal.GetLastErrorMsg().find('OSM XML detected, but Expat parser not available') == 0: pytest.skip() pytest.fail() else: if filename == 'data/test.osm': ogrtest.osm_drv_parse_osm = True # Test points lyr = ds.GetLayer('points') assert lyr.GetGeomType() == ogr.wkbPoint sr = lyr.GetSpatialRef() assert (sr.ExportToWkt().find('GEOGCS["WGS 84",DATUM["WGS_1984",') == 0 or \ sr.ExportToWkt().find('GEOGCS["GCS_WGS_1984",DATUM["WGS_1984"') == 0) if filename == 'data/test.osm': assert lyr.GetExtent() == (2.0, 3.0, 49.0, 50.0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '3' or \ feat.GetFieldAsString('name') != 'Some interesting point' or \ feat.GetFieldAsString('other_tags') != '"foo"=>"bar","bar"=>"baz"': feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT (3.0 49.5)')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat is not None: feat.DumpReadable() pytest.fail() # Test lines lyr = ds.GetLayer('lines') assert lyr.GetGeomType() == ogr.wkbLineString feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '1' or \ feat.GetFieldAsString('highway') != 'motorway' or \ feat.GetFieldAsInteger('z_order') != 9 or \ feat.GetFieldAsString('other_tags') != '"foo"=>"bar"': feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('LINESTRING (2 49,3 50)')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '6': feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('LINESTRING (2 49,3 49,3 50,2 50,2 49)')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat is not None: feat.DumpReadable() pytest.fail() # Test multipolygons lyr = ds.GetLayer('multipolygons') if filename == 'tmp/ogr_osm_3': assert lyr.GetGeomType() == ogr.wkbPolygon else: assert lyr.GetGeomType() == ogr.wkbMultiPolygon feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '1' or \ feat.GetFieldAsString('type') != 'multipolygon' or \ feat.GetFieldAsString('natural') != 'forest': feat.DumpReadable() pytest.fail() if filename == 'tmp/ogr_osm_3': if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POLYGON ((2 49,2 50,3 50,3 49,2 49),(2.1 49.1,2.2 49.1,2.2 49.2,2.1 49.2,2.1 49.1))')) != 0: feat.DumpReadable() pytest.fail() else: if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('MULTIPOLYGON (((2 49,3 49,3 50,2 50,2 49),(2.1 49.1,2.2 49.1,2.2 49.2,2.1 49.2,2.1 49.1)))')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '5' or \ feat.GetFieldAsString('type') != 'multipolygon' or \ feat.GetFieldAsString('natural') != 'wood': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_way_id') != '8' or \ feat.GetFieldAsString('name') != 'standalone_polygon': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat is not None: feat.DumpReadable() pytest.fail() # Test multilinestrings lyr = ds.GetLayer('multilinestrings') if filename == 'tmp/ogr_osm_3': assert lyr.GetGeomType() == ogr.wkbLineString else: assert lyr.GetGeomType() == ogr.wkbMultiLineString feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '3' or \ feat.GetFieldAsString('type') != 'route': feat.DumpReadable() pytest.fail() if filename == 'tmp/ogr_osm_3': if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('LINESTRING (2 49,3 50)')) != 0: feat.DumpReadable() pytest.fail() else: if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('MULTILINESTRING ((2 49,3 50))')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat is not None: feat.DumpReadable() pytest.fail() # Test other_relations lyr = ds.GetLayer('other_relations') if filename == 'tmp/ogr_osm_3': assert lyr is None else: assert lyr.GetGeomType() == ogr.wkbGeometryCollection feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '4' or \ feat.GetFieldAsString('type') != 'other_type': feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POINT (2 49),LINESTRING (2 49,3 50))')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat is not None: feat.DumpReadable() pytest.fail() if ds.GetDriver().GetName() == 'OSM': sql_lyr = ds.ExecuteSQL("GetBytesRead()") assert sql_lyr is not None feat = sql_lyr.GetNextFeature() assert feat is not None feat = sql_lyr.GetNextFeature() assert feat is None sql_lyr.ResetReading() feat = sql_lyr.GetNextFeature() assert feat is not None sql_lyr.GetLayerDefn() sql_lyr.TestCapability("foo") ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test .osm def test_ogr_osm_2(): return test_ogr_osm_1('data/test.osm') ############################################################################### # Test ogr2ogr def test_ogr_osm_3(options=None, all_layers=False): if ogrtest.osm_drv is None: pytest.skip() filepath = 'tmp/ogr_osm_3' if os.path.exists(filepath): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filepath) if options is not None: options = ' ' + options else: options = '' if all_layers: layers = '' else: layers = 'points lines multipolygons multilinestrings ' with gdaltest.error_handler(): gdal.VectorTranslate('tmp/ogr_osm_3', 'data/test.pbf', options=layers + options) ret = test_ogr_osm_1(filepath) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filepath) return ret ############################################################################### # Test ogr2ogr with --config OSM_USE_CUSTOM_INDEXING NO and -skip def test_ogr_osm_3_sqlite_nodes(): gdal.SetConfigOption('OSM_USE_CUSTOM_INDEXING', 'NO') ret = test_ogr_osm_3(options='-skip') gdal.SetConfigOption('OSM_USE_CUSTOM_INDEXING', None) return ret ############################################################################### # Test ogr2ogr with --config OSM_COMPRESS_NODES YES def test_ogr_osm_3_custom_compress_nodes(): gdal.SetConfigOption('OSM_COMPRESS_NODES', 'YES') ret = test_ogr_osm_3() gdal.SetConfigOption('OSM_COMPRESS_NODES', None) return ret ############################################################################### # Test ogr2ogr with all layers def test_ogr_osm_3_all_layers(): return test_ogr_osm_3(options='-skip', all_layers=True) ############################################################################### # Test optimization when reading only the points layer through a SQL request def test_ogr_osm_4(): if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open('data/test.pbf') assert ds is not None sql_lyr = ds.ExecuteSQL('SELECT * FROM points') feat = sql_lyr.GetNextFeature() is_none = feat is None ds.ReleaseResultSet(sql_lyr) assert not is_none # Test spatial filter lyr = ds.GetLayerByName('points') lyr.SetSpatialFilterRect(0, 0, 0, 0) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None, 'Zero filter ' with gdaltest.error_handler(): lyr.SetSpatialFilter(None) # Change layer sql_lyr = ds.ExecuteSQL('SELECT * FROM lines') feat = sql_lyr.GetNextFeature() is_none = feat is None ds.ReleaseResultSet(sql_lyr) assert not is_none # Change layer sql_lyr = ds.ExecuteSQL('SELECT * FROM points') feat = sql_lyr.GetNextFeature() is_none = feat is None ds.ReleaseResultSet(sql_lyr) assert not is_none ############################################################################### # Test optimizations for early attribute filter evaluation def test_ogr_osm_5(): if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open('data/test.pbf') assert ds is not None tests = [['points', '3', True], ['points', 'foo', False], ['lines', '1', True], ['lines', 'foo', False], ['multipolygons', '1', True], ['multipolygons', 'foo', False], ['multilinestrings', '3', True], ['multilinestrings', 'foo', False]] for test in tests: sql_lyr = ds.ExecuteSQL("SELECT * FROM %s WHERE osm_id = '%s'" % (test[0], test[1])) feat = sql_lyr.GetNextFeature() is_none = feat is None feat = None ds.ReleaseResultSet(sql_lyr) assert (test[2] ^ is_none) sql_lyr = ds.ExecuteSQL("select * from multipolygons where type = 'multipolygon'") feat = sql_lyr.GetNextFeature() is_none = feat is None feat = None ds.ReleaseResultSet(sql_lyr) assert not is_none, test ############################################################################### # Test ogr2ogr -sql def test_ogr_osm_6(): if ogrtest.osm_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/ogr_osm_6') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/ogr_osm_6') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/ogr_osm_6 data/test.pbf -sql "select * from multipolygons" -progress') ds = ogr.Open('tmp/ogr_osm_6') lyr = ds.GetLayer(0) count = lyr.GetFeatureCount() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/ogr_osm_6') assert count == 3 ############################################################################### # Test optimization when reading only the points layer through a SQL request # with SQLite dialect (#4825) def test_ogr_osm_7(): if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open('data/test.pbf') assert ds is not None sql_lyr = ds.ExecuteSQL('SELECT * FROM points LIMIT 10', dialect='SQLite') if sql_lyr is None and gdal.GetLastErrorMsg().find('automatic extension loading failed') != 0: pytest.skip() count = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert count == 1 ############################################################################### # Test 64-bit ids def test_ogr_osm_8(): if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open('data/base-64.osm.pbf') assert ds is not None lyr = ds.GetLayerByName('points') lyr.SetAttributeFilter("osm_id = '4294967934'") feat = lyr.GetNextFeature() if feat.GetField('name') != 'Treetops' or \ ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT (-61.7964321 17.1498319)')) != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multipolygons') feat = lyr.GetFeature(1113) if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('MULTIPOLYGON (((-61.7780345 17.140634,-61.7777002 17.1406069,-61.7776854 17.1407739,-61.7779131 17.1407923,-61.7779158 17.1407624,-61.7780224 17.140771,-61.7780345 17.140634)))')) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # Same as ogr_osm_8 but with OSM_USE_CUSTOM_INDEXING=NO def test_ogr_osm_9(): if ogrtest.osm_drv is None: pytest.skip() old_val = gdal.GetConfigOption('OSM_USE_CUSTOM_INDEXING') gdal.SetConfigOption('OSM_USE_CUSTOM_INDEXING', 'NO') ret = test_ogr_osm_8() gdal.SetConfigOption('OSM_USE_CUSTOM_INDEXING', old_val) return ret ############################################################################### # Some error conditions def test_ogr_osm_10(): if ogrtest.osm_drv is None: pytest.skip() # A file that does not exist. ds = ogr.Open('/nonexistent/foo.osm') assert ds is None # Empty .osm file f = gdal.VSIFOpenL('/vsimem/foo.osm', 'wb') gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/foo.osm') assert ds is None gdal.Unlink('/vsimem/foo.osm') # Empty .pbf file f = gdal.VSIFOpenL('/vsimem/foo.pbf', 'wb') gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/foo.pbf') assert ds is None gdal.Unlink('/vsimem/foo.pbf') if ogrtest.osm_drv_parse_osm: # Invalid .osm file f = gdal.VSIFOpenL('/vsimem/foo.osm', 'wb') data = "" gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/foo.osm') lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' ds = None gdal.Unlink('/vsimem/foo.osm') # Invalid .pbf file f = gdal.VSIFOpenL('/vsimem/foo.pbf', 'wb') data = "OSMHeader\n" gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/foo.pbf') lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' ds = None gdal.Unlink('/vsimem/foo.pbf') # Test million laugh pattern if ogrtest.osm_drv_parse_osm: ds = ogr.Open('data/billionlaugh.osm') lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() assert feat is None and gdal.GetLastErrorMsg() != '' ############################################################################### # Test all_tags def test_ogr_osm_11(): if ogrtest.osm_drv is None: pytest.skip() gdal.SetConfigOption('OSM_CONFIG_FILE', 'data/osmconf_alltags.ini') ds = ogr.Open('data/test.pbf') gdal.SetConfigOption('OSM_CONFIG_FILE', None) lyr = ds.GetLayerByName('points') feat = lyr.GetNextFeature() if feat.GetFieldAsString('osm_id') != '3' or \ feat.GetFieldAsString('name') != 'Some interesting point' or \ feat.GetFieldAsString('all_tags') != '"name"=>"Some interesting point","foo"=>"bar","bar"=>"baz"': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('lines') feat = lyr.GetNextFeature() if feat.GetField('z_order') != 9: feat.DumpReadable() pytest.fail() ############################################################################### # Test that attribute filter set on a line layer is well taken into # account def test_ogr_osm_12(): if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open('data/test.pbf') for i in range(2): lay = ds.GetLayerByIndex(i) lay.SetAttributeFilter("highway IS NOT NULL") # lay.GetNextFeature() lay.ResetReading() feat = lay.GetNextFeature() count = 0 while feat is not None: count = count + 1 feat = lay.GetNextFeature() assert i != 1 or count == 1 ds = None ############################################################################### # Test test_uncompressed_dense_true_nometadata.pbf def test_ogr_osm_test_uncompressed_dense_true_nometadata_pbf(): return test_ogr_osm_1('data/test_uncompressed_dense_true_nometadata.pbf') ############################################################################### # Test test_uncompressed_dense_false.pbf def test_ogr_osm_test_uncompressed_dense_false_pbf(): return test_ogr_osm_1('data/test_uncompressed_dense_false.pbf') # Special case: if an object has a 'osm_id' key, then do not use it to override # "our" osm_id field. But put it in other_fields (#6347) def test_ogr_osm_13(): if ogrtest.osm_drv is None or not ogrtest.osm_drv_parse_osm: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_osm_13.osm', """""") with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_osm_13.osm') if ds is None: gdal.Unlink('/vsimem/ogr_osm_13.osm') pytest.skip() lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['osm_id'] != '123' or f['other_tags'] != '"osm_id"=>"0"': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_osm_13.osm') ############################################################################### # Test that we handle polygons in other_relations (#6475) def test_ogr_osm_14(): if ogrtest.osm_drv is None or not ogrtest.osm_drv_parse_osm: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_osm_14.osm', """ """) with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_osm_14.osm') if ds is None: gdal.Unlink('/vsimem/ogr_osm_14.osm') pytest.skip() sql_lyr = ds.ExecuteSQL('SELECT * FROM other_relations') f = sql_lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'GEOMETRYCOLLECTION (POLYGON ((49 2,49.0 2.1,49.1 2.1,49 2)))': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_osm_14.osm') ############################################################################### # Test Dataset.GetNextFeature() def ogr_osm_15_progresscbk_return_true(pct, msg, user_data): # pylint: disable=unused-argument user_data[0] = pct return 1 def ogr_osm_15_progresscbk_return_false(pct, msg, user_data): # pylint: disable=unused-argument return 0 def test_ogr_osm_15(): if ogrtest.osm_drv is None: pytest.skip() ds = gdal.OpenEx('data/test.pbf') assert ds.TestCapability(ogr.ODsCRandomLayerRead) == 1 count = 0 last_pct = 0 while True: f, l, pct = ds.GetNextFeature(include_pct=True) assert pct >= last_pct last_pct = pct if f is None: assert l is None break # f.DumpReadable() count += 1 if f.GetDefnRef().GetName() != l.GetName(): f.DumpReadable() pytest.fail(l.GetName()) assert count == 8 assert last_pct == 1.0 f, l, pct = ds.GetNextFeature(include_pct=True) assert f is None and l is None and pct == 1.0 ds.ResetReading() for i in range(count): f, lyr = ds.GetNextFeature() # f.DumpReadable() assert not (f is None or lyr is None), i ds.ResetReading() f, lyr = ds.GetNextFeature(callback=ogr_osm_15_progresscbk_return_false) assert f is None and lyr is None ds.ResetReading() pct_array = [0] f, lyr = ds.GetNextFeature(callback=ogr_osm_15_progresscbk_return_true, callback_data=pct_array) assert not (f is None or lyr is None) assert pct_array[0] == 1.0 # ds = gdal.OpenEx('/home/even/gdal/data/osm/france.osm.pbf') # ds.ExecuteSQL('SET interest_layers = relations') # def test(pct, msg, unused): # print(pct) # f, l = ds.GetNextFeature( callback = test) # print(f) ds = None ############################################################################### # Test laundering of tags (https://github.com/OSGeo/gdal/pull/161) def test_ogr_osm_16(): if ogrtest.osm_drv is None or not ogrtest.osm_drv_parse_osm: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_osm_16.osm', """ """) gdal.FileFromMemBuffer('/vsimem/ogr_osm_16_conf.ini', """# attribute_name_laundering=yes [points] attributes=foo:baar,foo:bar """) ds = gdal.OpenEx('/vsimem/ogr_osm_16.osm', open_options=['CONFIG_FILE=/vsimem/ogr_osm_16_conf.ini']) lyr = ds.GetLayerByName('points') f = lyr.GetNextFeature() if f['foo_baar'] != 'val' or f['foo_bar'] != 'val2': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_osm_16.osm') gdal.Unlink('/vsimem/ogr_osm_16_conf.ini') ############################################################################### # Test converting an empty OSM file (this essentially tests the behaviour of # GDALVectorTranslate() in random feature mode, when there is no feature) def test_ogr_osm_17(): if ogrtest.osm_drv is None or not ogrtest.osm_drv_parse_osm: pytest.skip() with gdaltest.error_handler(): gdal.VectorTranslate('/vsimem/ogr_osm_17', 'data/empty.osm', options='-skip') ds = ogr.Open('/vsimem/ogr_osm_17') layer_count = ds.GetLayerCount() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_osm_17') assert layer_count == 4 ############################################################################### # Test correct reading of .pbf files with multiple densenode blocks and # regarding EOF def test_ogr_osm_18(): if ogrtest.osm_drv is None: pytest.skip() ds = ogr.Open('data/two_points.pbf') lyr = ds.GetLayerByName('points') count = 0 for f in lyr: count += 1 ds = None assert count == 2 gdalautotest-3.1.2/ogr/ogr_odbc.py0000775000175000017500000001245513701060010015610 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_odbc.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR ODBC driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import shutil from osgeo import ogr from osgeo import gdal import gdaltest import ogrtest import pytest ############################################################################### # Basic testing def test_ogr_odbc_1(): ogrtest.odbc_drv = None if sys.platform != 'win32': pytest.skip() ogrtest.odbc_drv = ogr.GetDriverByName('ODBC') if ogrtest.odbc_drv is None: pytest.skip() ds = ogrtest.odbc_drv.Open('data/empty.mdb') if ds is None: ogrtest.odbc_drv = None pytest.skip() ds = None shutil.copy('data/empty.mdb', 'tmp/odbc.mdb') # Create and fill tables ds = ogrtest.odbc_drv.Open('tmp/odbc.mdb') ds.ExecuteSQL("CREATE TABLE test (intfield INT, doublefield DOUBLE, stringfield VARCHAR)") ds.ExecuteSQL("INSERT INTO test (intfield, doublefield, stringfield) VALUES (1, 2.34, 'foo')") ds.ExecuteSQL("CREATE TABLE test_with_pk (OGR_FID INT PRIMARY KEY, intfield INT, doublefield DOUBLE, stringfield VARCHAR)") ds.ExecuteSQL("INSERT INTO test_with_pk (OGR_FID, intfield) VALUES (1, 2)") ds.ExecuteSQL("INSERT INTO test_with_pk (OGR_FID, intfield) VALUES (2, 3)") ds.ExecuteSQL("INSERT INTO test_with_pk (OGR_FID, intfield) VALUES (3, 4)") ds.ExecuteSQL("INSERT INTO test_with_pk (OGR_FID, intfield) VALUES (4, 5)") ds.ExecuteSQL("INSERT INTO test_with_pk (OGR_FID, intfield) VALUES (5, 6)") ds = None # Test with ODBC:user/pwd@dsn syntax ds = ogrtest.odbc_drv.Open('ODBC:user/pwd@DRIVER=Microsoft Access Driver (*.mdb);DBQ=tmp/odbc.mdb') assert ds is not None ds = None # Test with ODBC:dsn syntax ds = ogrtest.odbc_drv.Open('ODBC:DRIVER=Microsoft Access Driver (*.mdb);DBQ=tmp/odbc.mdb') assert ds is not None ds = None # Test with ODBC:dsn,table_list syntax ds = ogrtest.odbc_drv.Open('ODBC:DRIVER=Microsoft Access Driver (*.mdb);DBQ=tmp/odbc.mdb,test') assert ds is not None assert ds.GetLayerCount() == 1 ds = None # Reopen and check ds = ogrtest.odbc_drv.Open('tmp/odbc.mdb') assert ds.GetLayerCount() == 2 lyr = ds.GetLayerByName('test') feat = lyr.GetNextFeature() if feat.GetField('intfield') != 1 or feat.GetField('doublefield') != 2.34 or feat.GetField('stringfield') != 'foo': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('test_with_pk') # Test GetFeatureCount() assert lyr.GetFeatureCount() == 5 # Test GetFeature() feat = lyr.GetFeature(4) if feat.GetField('intfield') != 5: feat.DumpReadable() pytest.fail() # Test SetAttributeFilter() lyr.SetAttributeFilter('intfield = 6') feat = lyr.GetNextFeature() if feat.GetFID() != 5: feat.DumpReadable() pytest.fail() # Test ExecuteSQL() sql_lyr = ds.ExecuteSQL("SELECT * FROM test") feat = sql_lyr.GetNextFeature() if feat.GetField('intfield') != 1 or feat.GetField('doublefield') != 2.34 or feat.GetField('stringfield') != 'foo': feat.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Run test_ogrsf def test_ogr_odbc_2(): if ogrtest.odbc_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/odbc.mdb') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Cleanup def test_ogr_odbc_cleanup(): if ogrtest.odbc_drv is None: pytest.skip() gdal.Unlink('tmp/odbc.mdb') gdalautotest-3.1.2/ogr/ogr_xplane.py0000775000175000017500000001660013701060010016164 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_xplane.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR XPlane driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr ############################################################################### # Test apt.dat reading def test_ogr_xplane_apt_dat(): xplane_apt_ds = ogr.Open('data/apt.dat') assert xplane_apt_ds is not None layers = [('APT', 8, [('apt_icao', 'E46')]), ('RunwayPolygon', 19, [('apt_icao', 'E46')]), ('RunwayThreshold', 44, [('apt_icao', 'E46')]), ('WaterRunwayPolygon', 1, [('apt_icao', 'I38')]), ('WaterRunwayThreshold', 2, [('apt_icao', 'I38')]), ('Helipad', 2, [('apt_icao', 'CYXX')]), ('HelipadPolygon', 2, [('apt_icao', 'CYXX')]), ('TaxiwayRectangle', 437, [('apt_icao', 'LFPG')]), ('Pavement', 11, [('apt_icao', 'CYXX')]), ('APTBoundary', 1, [('apt_icao', 'VTX2')]), ('APTLinearFeature', 45, [('apt_icao', 'CYXX')]), ('ATCFreq', 42, [('apt_icao', 'CYXX')]), ('StartupLocation', 110, [('apt_icao', 'CYXX')]), ('APTLightBeacon', 3, [('apt_icao', 'CYXX')]), ('APTWindsock', 25, [('apt_icao', 'E46')]), ('TaxiwaySign', 17, [('apt_icao', 'CYXX')]), ('VASI_PAPI_WIGWAG', 30, [('apt_icao', 'CYXX')]), ('Stopway', 6, [('apt_icao', 'LFPM')]), ] for layer in layers: lyr = xplane_apt_ds.GetLayerByName(layer[0]) assert lyr.GetFeatureCount() == layer[1], \ ('wrong number of features for layer %s : %d. %d were expected ' % (layer[0], lyr.GetFeatureCount(), layer[1])) feat_read = lyr.GetNextFeature() for item in layer[2]: assert feat_read.GetField(item[0]) == item[1], layer[0] ############################################################################### # Test apt.dat v810 reading def test_ogr_xplane_apt_v810_dat(): xplane_apt_ds = ogr.Open('data/apt810/apt.dat') assert xplane_apt_ds is not None layers = [('APT', 6, [('apt_icao', 'UHP1')]), ('RunwayPolygon', 6, [('apt_icao', 'UHP1')]), ('RunwayThreshold', 13, [('apt_icao', 'UHP1')]), ('WaterRunwayPolygon', 2, [('apt_icao', '6MA8')]), ('WaterRunwayThreshold', 4, [('apt_icao', '6MA8')]), ('Helipad', 1, [('apt_icao', '9FD6')]), ('HelipadPolygon', 1, [('apt_icao', '9FD6')]), ('TaxiwayRectangle', 54, [('apt_icao', 'UHP1')]), ('Pavement', 0, []), ('APTBoundary', 0, []), ('APTLinearFeature', 0, []), ('ATCFreq', 10, [('apt_icao', 'EHVB')]), ('StartupLocation', 0, []), ('APTLightBeacon', 2, [('apt_icao', '7I6')]), ('APTWindsock', 9, [('apt_icao', 'UHP1')]), ('TaxiwaySign', 0, []), ('VASI_PAPI_WIGWAG', 12, [('apt_icao', 'UHP1')]), ('Stopway', 4, [('apt_icao', 'EKYT')]), ] for layer in layers: lyr = xplane_apt_ds.GetLayerByName(layer[0]) assert lyr.GetFeatureCount() == layer[1], \ ('wrong number of features for layer %s : %d. %d were expected ' % (layer[0], lyr.GetFeatureCount(), layer[1])) feat_read = lyr.GetNextFeature() for item in layer[2]: assert feat_read.GetField(item[0]) == item[1], layer[0] ############################################################################### # Test nav.dat reading def test_ogr_xplane_nav_dat(): xplane_nav_ds = ogr.Open('data/nav.dat') assert xplane_nav_ds is not None layers = [('ILS', 6, [('navaid_id', 'IMQS')]), ('VOR', 3, [('navaid_id', 'AAL')]), ('NDB', 4, [('navaid_id', 'APH')]), ('GS', 1, [('navaid_id', 'IMQS')]), ('Marker', 3, [('apt_icao', '40N')]), ('DME', 6, [('navaid_id', 'AAL')]), ('DMEILS', 1, [('navaid_id', 'IWG')]) ] for layer in layers: lyr = xplane_nav_ds.GetLayerByName(layer[0]) assert lyr.GetFeatureCount() == layer[1], \ ('wrong number of features for layer %s : %d. %d were expected ' % (layer[0], lyr.GetFeatureCount(), layer[1])) feat_read = lyr.GetNextFeature() for item in layer[2]: assert feat_read.GetField(item[0]) == item[1], layer[0] xplane_nav_ds = None ############################################################################### # Test awy.dat reading def test_ogr_xplane_awy_dat(): xplane_awy_ds = ogr.Open('data/awy.dat') assert xplane_awy_ds is not None layers = [('AirwaySegment', 11, [('segment_name', 'R464')]), ('AirwayIntersection', 14, [('name', '00MKK')]) ] for layer in layers: lyr = xplane_awy_ds.GetLayerByName(layer[0]) assert lyr.GetFeatureCount() == layer[1], \ ('wrong number of features for layer %s : %d. %d were expected ' % (layer[0], lyr.GetFeatureCount(), layer[1])) feat_read = lyr.GetNextFeature() for item in layer[2]: assert feat_read.GetField(item[0]) == item[1], layer[0] ############################################################################### # Test fix.dat reading def test_ogr_xplane_fix_dat(): xplane_fix_ds = ogr.Open('data/fix.dat') assert xplane_fix_ds is not None layers = [('FIX', 1, [('fix_name', '00MKK')]) ] for layer in layers: lyr = xplane_fix_ds.GetLayerByName(layer[0]) assert lyr.GetFeatureCount() == layer[1], \ ('wrong number of features for layer %s : %d. %d were expected ' % (layer[0], lyr.GetFeatureCount(), layer[1])) feat_read = lyr.GetNextFeature() for item in layer[2]: assert feat_read.GetField(item[0]) == item[1], layer[0] ############################################################################### # gdalautotest-3.1.2/ogr/ogr_arcgen.py0000775000175000017500000001415013701060010016132 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_arcgen.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR Arc/Info generate driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import ogr import pytest ############################################################################### # Read points def test_ogr_arcgen_points(): ds = ogr.Open('data/points.gen') assert ds is not None, 'cannot open dataset' assert ds.GetLayerCount() == 1, 'bad layer count' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' assert lyr.GetGeomType() == ogr.wkbPoint, 'bad layer geometry type' feat = lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail('did not get expected ID') if ogrtest.check_feature_geometry(feat, 'POINT (2 49)', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') ############################################################################### # Read points25d def test_ogr_arcgen_points25d(): ds = ogr.Open('data/points25d.gen') assert ds is not None, 'cannot open dataset' assert ds.GetLayerCount() == 1, 'bad layer count' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' assert lyr.GetGeomType() == ogr.wkbPoint25D, 'bad layer geometry type' feat = lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail('did not get expected ID') if ogrtest.check_feature_geometry(feat, 'POINT (2 49 10)', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') ############################################################################### # Read lines def test_ogr_arcgen_lines(): ds = ogr.Open('data/lines.gen') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' assert lyr.GetGeomType() == ogr.wkbLineString, 'bad layer geometry type' feat = lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail('did not get expected ID') if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 49,3 50)', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') ############################################################################### # Read lines25d def test_ogr_arcgen_lines25d(): ds = ogr.Open('data/lines25d.gen') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' assert lyr.GetGeomType() == ogr.wkbLineString25D, 'bad layer geometry type' feat = lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail('did not get expected ID') if ogrtest.check_feature_geometry(feat, 'LINESTRING (2 49 10,3 50 10)', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') ############################################################################### # Read polygons def test_ogr_arcgen_polygons(): ds = ogr.Open('data/polygons.gen') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' assert lyr.GetGeomType() == ogr.wkbPolygon, 'bad layer geometry type' feat = lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail('did not get expected ID') if ogrtest.check_feature_geometry(feat, 'POLYGON ((2 49,2 50,3 50,3 49,2 49))', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') ############################################################################### # Read polygons25d def test_ogr_arcgen_polygons25d(): ds = ogr.Open('data/polygons25d.gen') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayer(0) assert lyr is not None, 'cannot find layer' assert lyr.GetGeomType() == ogr.wkbPolygon25D, 'bad layer geometry type' feat = lyr.GetNextFeature() if feat.GetField(0) != 1: feat.DumpReadable() pytest.fail('did not get expected ID') if ogrtest.check_feature_geometry(feat, 'POLYGON ((2 49 10,2 50 10,3 50 10,3 49 10,2 49 10))', max_error=0.0000001) != 0: feat.DumpReadable() pytest.fail('did not get expected first geom') gdalautotest-3.1.2/ogr/ogr_svg.py0000775000175000017500000001720213701060010015473 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_svg.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test SVG driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr import pytest def test_ogr_svg_init(): gdaltest.svg_ds = None gdaltest.svg_ds = ogr.Open('data/test.svg') if gdaltest.svg_ds is None: gdaltest.have_svg = 0 else: gdaltest.have_svg = 1 if not gdaltest.have_svg: pytest.skip() assert gdaltest.svg_ds.GetLayerCount() == 3, 'wrong number of layers' ############################################################################### # Test def test_ogr_svg_1(): if not gdaltest.have_svg: pytest.skip() assert gdaltest.svg_ds is not None lyr = gdaltest.svg_ds.GetLayerByName('points') assert lyr.GetFeatureCount() == 1, 'wrong number of features' feat = lyr.GetNextFeature() if feat.GetFieldAsString('building') != 'yes': feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, 'POINT (-13610535.695141600444913 4561593.930507560260594)', max_error=0.0001) != 0: feat.DumpReadable() pytest.fail() lyr = gdaltest.svg_ds.GetLayerByName('lines') assert lyr.GetFeatureCount() == 1, 'wrong number of features' feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (-13609855.59 4561479.26,-13609856.21 4561474.27,-13609860.03 4561468.87,-13609865.74 4561465.69,-13609869.54 4561465.06)', max_error=0.0001) != 0: feat.DumpReadable() pytest.fail() lyr = gdaltest.svg_ds.GetLayerByName('polygons') assert lyr.GetFeatureCount() == 1, 'wrong number of features' feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((-13610027.72 4562403.66,-13609661.58 4562462.95,-13609671.33 4562516.4,-13609676.11 4562532.65,-13609692.36 4562552.71,-13609711.46 4562609.08,-13609721.97 4562634.89,-13609727.7 4562650.16,-13609727.7 4562666.41,-13609716.23 4562699.85,-13609698.09 4562758.14,-13609697.13 4562771.51,-13609706.68 4562811.64,-13609720.06 4562843.18,-13609723.88 4562863.23,-13609725.8 4562891.91,-13609721.02 4562919.61,-13609713.37 4562938.72,-13609701.91 4562954.97,-13609688.53 4562968.34,-13609668.47 4562979.8,-13609614.96 4562993.17,-13609589.16 4563005.6,-13609552.85 4563037.14,-13609530.88 4563053.37,-13609474.5 4563076.3,-13609487.81 4563109.75,-13609491.89 4563149.38,-13609478.48 4563157.66,-13609467.67 4563171.31,-13609462.25 4563189.21,-13609420.46 4563189.32,-13609401.89 4563191.92,-13609395.2 4563201.47,-13609287.23 4563264.53,-13609303.48 4563291.29,-13609330.23 4563313.26,-13609339.78 4563326.63,-13609342.66 4563340.96,-13609344.56 4563458.48,-13609341.7 4563482.38,-13609322.59 4563518.68,-13609304.43 4563574.1,-13609290.1 4563592.26,-13609289.15 4563615.19,-13609290.1 4563655.32,-13609287.23 4563675.38,-13609271.95 4563703.09,-13609263.35 4563739.4,-13609258.57 4563762.32,-13609250.73 4563760.48,-13609226.84 4563718.43,-13609214.42 4563688.81,-13609204.87 4563661.1,-13609191.49 4563641.03,-13609170.47 4563629.56,-13609137.03 4563632.44,-13609109.32 4563648.68,-13609097.85 4563676.39,-13609100.72 4563712.7,-13609102.63 4563800.59,-13609116.0 4563819.7,-13609156.13 4563850.28,-13609151.55 4563861.7,-13609044.54 4563885.58,-13609057.92 4563945.78,-13609058.88 4563959.15,-13609031.17 4563987.81,-13609014.93 4563969.66,-13608988.17 4563981.13,-13608918.43 4563946.74,-13608834.46 4563870.62,-13608756.43 4563811.52,-13608716.02 4563488.23,-13608439.74 4563228.22,-13608483.69 4563167.08,-13608471.27 4563156.56,-13608461.72 4563132.68,-13608457.89 4563102.1,-13608460.76 4563077.26,-13608464.58 4563054.33,-13608444.52 4563044.78,-13608428.02 4562925.57,-13608408.91 4562672.38,-13608471.97 4562671.42,-13608514.96 4562653.27,-13608586.63 4562653.27,-13608728.76 4562628.85,-13609304.17 4562530.01,-13609354.81 4562401.98,-13609349.2 4562281.92,-13609401.52 4562278.13,-13609426.46 4562253.26,-13609385.39 4562165.98,-13609374.88 4561992.09,-13609361.7 4561946.97,-13609413.36 4561935.48,-13609402.85 4561884.85,-13609429.6 4561890.57,-13609487.88 4561880.07,-13609495.53 4561931.65,-13609442.02 4561942.18,-13609454.44 4562017.65,-13609601.59 4561997.59,-13609881.1 4561949.97,-13609858.97 4561817.17,-13609878.07 4561814.31,-13609891.08 4561883.51,-13609912.1 4561880.63,-13609918.79 4561924.59,-13609922.03 4561942.33,-13609949.37 4561938.35,-13609971.5 4562072.19,-13610108.74 4562049.23,-13610117.33 4562098.92,-13610151.73 4562094.14,-13610154.59 4562109.42,-13610224.34 4562097.96,-13610222.43 4562079.81,-13610381.03 4562053.05,-13610401.1 4562051.15,-13610386.77 4561907.82,-13610286.45 4561921.2,-13610210.01 4561869.6,-13610188.04 4561873.42,-13610173.7 4561778.84,-13610177.52 4561770.24,-13610184.21 4561764.51,-13610403.97 4561729.15,-13610429.77 4561711.0,-13610442.18 4561704.31,-13610574.04 4561683.29,-13610579.77 4561748.26,-13610620.86 4561745.4,-13610652.39 4562062.61,-13610802.4 4562037.77,-13610765.13 4561654.62,-13610860.68 4561641.25,-13610892.21 4562001.46,-13610848.26 4562007.19,-13610850.37 4562027.78,-13610870.24 4562264.22,-13610821.87 4562270.93,-13610819.96 4562245.14,-13610749.26 4562250.86,-13610754.03 4562306.29,-13610861.04 4562285.26,-13610864.69 4562319.19,-13610873.3 4562318.24,-13610882.85 4562463.47,-13610835.12 4562470.5,-13610816.0 4562473.37,-13610816.96 4562481.96,-13610737.66 4562493.43,-13610746.26 4562564.13,-13610782.56 4562558.4,-13610784.48 4562580.38,-13610826.52 4562575.6,-13610828.43 4562590.89,-13610845.63 4562588.98,-13610891.49 4562583.24,-13610895.3 4562621.46,-13610829.38 4562629.11,-13610844.67 4562786.76,-13610613.45 4562823.06,-13610570.46 4562334.82,-13610699.56 4562312.97,-13610695.75 4562293.86,-13610689.66 4562256.58,-13610543.47 4562263.26,-13610548.25 4562316.77,-13610487.1 4562326.32,-13610483.27 4562297.66,-13610443.14 4562303.38,-13610446.97 4562333.96,-13610027.72 4562403.66))', max_error=0.0001) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # def test_ogr_svg_cleanup(): gdaltest.svg_ds = None gdalautotest-3.1.2/ogr/ogr_mysql.py0000775000175000017500000010173113701060010016042 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_mysql.py f91bb87ed0c44ba23956d12c7b420899a2f8523a 2020-03-12 08:47:54 +0900 Hiroshi Miura $ # # Project: GDAL/OGR Test Suite # Purpose: Test MySQL driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2008-2013, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import gdal from osgeo import osr import pytest # E. Rouault : this is almost a copy & paste from ogr_pg.py # # To create the required MySQL instance do something like: # # $ mysql -u root -p # mysql> CREATE DATABASE autotest; # mysql> GRANT ALL ON autotest.* TO 'THE_USER_THAT_RUNS_AUTOTEST'@'localhost'; # ############################################################################### # Open Database. def test_ogr_mysql_1(): gdaltest.mysql_ds = None try: ogr.GetDriverByName('MySQL') except: pytest.skip() val = gdal.GetConfigOption('OGR_MYSQL_CONNECTION_STRING', None) if val is not None: gdaltest.mysql_connection_string = val else: gdaltest.mysql_connection_string = 'MYSQL:autotest' gdaltest.mysql_ds = ogr.Open(gdaltest.mysql_connection_string, update=1) if gdaltest.mysql_ds is None: pytest.skip() sql_lyr = gdaltest.mysql_ds.ExecuteSQL("SELECT VERSION()") f = sql_lyr.GetNextFeature() print('Version: ' + f.GetField(0)) gdaltest.is_mysql_8_or_later = int(f.GetField(0).split('.')[0]) >= 8 and f.GetField(0).find('MariaDB') < 0 gdaltest.mysql_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Create table from data/poly.shp def test_ogr_mysql_2(): if gdaltest.mysql_ds is None: pytest.skip() shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) ###################################################### # Create Layer gdaltest.mysql_lyr = gdaltest.mysql_ds.CreateLayer('tpoly', srs=shp_lyr.GetSpatialRef(), options=[]) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.mysql_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8), ('INT64', ogr.OFTInteger64)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.mysql_lyr.GetLayerDefn()) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) dst_feat.SetField('INT64', 1234567890123) gdaltest.mysql_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() assert gdaltest.mysql_lyr.GetFeatureCount() == shp_lyr.GetFeatureCount(), \ 'not matching feature count' assert gdaltest.mysql_lyr.GetSpatialRef().GetAuthorityCode(None) == shp_lyr.GetSpatialRef().GetAuthorityCode(None), \ 'not matching spatial ref' ############################################################################### # Test reading a layer extent def test_ogr_mysql_19(): if gdaltest.mysql_ds is None: pytest.skip() layer = gdaltest.mysql_ds.GetLayerByName('tpoly') if layer is None: pytest.fail('did not get tpoly layer') extent = layer.GetExtent() expect = (478315.53125, 481645.3125, 4762880.5, 4765610.5) minx = abs(extent[0] - expect[0]) maxx = abs(extent[1] - expect[1]) miny = abs(extent[2] - expect[2]) maxy = abs(extent[3] - expect[3]) if max(minx, maxx, miny, maxy) > 0.0001: print(extent) pytest.fail('Extents do not match') ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_mysql_3(): if gdaltest.mysql_ds is None: pytest.skip() assert gdaltest.mysql_lyr.GetGeometryColumn() == 'SHAPE' assert gdaltest.mysql_lyr.GetFeatureCount() == 10 expect = [168, 169, 166, 158, 165] gdaltest.mysql_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.mysql_lyr, 'eas_id', expect) assert gdaltest.mysql_lyr.GetFeatureCount() == 5 gdaltest.mysql_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.mysql_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) assert read_feat.GetField('INT64') == 1234567890123 read_feat.Destroy() orig_feat.Destroy() gdaltest.poly_feat = None gdaltest.shp_ds.Destroy() assert tr ############################################################################### # Write more features with a bunch of different geometries, and verify the # geometries are still OK. def test_ogr_mysql_4(): if gdaltest.mysql_ds is None: pytest.skip() # E. Rouault : the mySQL driver doesn't seem to like adding new features and # iterating over a query at the same time. # If trying to do so, we get the 'Commands out of sync' error. wkt_list = ['10', '2', '1', '4', '5', '6'] gdaltest.mysql_lyr.ResetReading() feature_def = gdaltest.mysql_lyr.GetLayerDefn() for item in wkt_list: dst_feat = ogr.Feature(feature_def) wkt = open('data/wkb_wkt/' + item + '.wkt').read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Write geometry as a new Oracle feature. dst_feat.SetGeometryDirectly(geom) dst_feat.SetField('PRFEDEA', item) gdaltest.mysql_lyr.CreateFeature(dst_feat) dst_feat.Destroy() # FIXME : The source wkt polygons of '4' and '6' are not closed and # mySQL return them as closed, so the check_feature_geometry returns FALSE # Checking them after closing the rings again returns TRUE. wkt_list = ['10', '2', '1', '5', '4', '6'] for item in wkt_list: wkt = open('data/wkb_wkt/' + item + '.wkt').read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Read back the feature and get the geometry. gdaltest.mysql_lyr.SetAttributeFilter("PRFEDEA = '%s'" % item) feat_read = gdaltest.mysql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, geom) != 0: print('Geometry changed. Closing rings before trying again for wkt #', item) print('(before):', geom.ExportToWkt()) geom.CloseRings() print('(after) :', geom.ExportToWkt()) assert ogrtest.check_feature_geometry(feat_read, geom) == 0 feat_read.Destroy() ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_mysql_5(): if gdaltest.mysql_ds is None: pytest.skip() # E. Rouault : unlike PostgreSQL driver : None is sorted in last position expect = [179, 173, 172, 171, 170, 169, 168, 166, 165, 158, None] sql_lyr = gdaltest.mysql_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') assert sql_lyr.GetFeatureCount() == 11 tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.mysql_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_mysql_6(): if gdaltest.mysql_ds is None: pytest.skip() sql_lyr = gdaltest.mysql_ds.ExecuteSQL("select * from tpoly where prfedea = '2'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['2']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'MULTILINESTRING ((5.00121349 2.99853132,5.00121349 1.99853133),(5.00121349 1.99853133,5.00121349 0.99853133),(3.00121351 1.99853127,5.00121349 1.99853133),(5.00121349 1.99853133,6.00121348 1.99853135))') != 0: tr = 0 feat_read.Destroy() sql_lyr.ResetReading() geom = ogr.CreateGeometryFromWkt( 'LINESTRING(-10 -10,0 0)') sql_lyr.SetSpatialFilter(geom) geom.Destroy() assert sql_lyr.GetFeatureCount() == 0 assert sql_lyr.GetNextFeature() is None, 'GetNextFeature() did not return None' gdaltest.mysql_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_mysql_7(): if gdaltest.mysql_ds is None: pytest.skip() gdaltest.mysql_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.mysql_lyr.SetSpatialFilter(geom) geom.Destroy() assert gdaltest.mysql_lyr.GetFeatureCount() == 1 tr = ogrtest.check_features_against_list(gdaltest.mysql_lyr, 'eas_id', [158]) gdaltest.mysql_lyr.SetAttributeFilter('eas_id = 158') assert gdaltest.mysql_lyr.GetFeatureCount() == 1 gdaltest.mysql_lyr.SetAttributeFilter(None) gdaltest.mysql_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Write a feature with too long a text value for a fixed length text field. # The driver should now truncate this (but with a debug message). Also, # put some crazy stuff in the value to verify that quoting and escaping # is working smoothly. # # No geometry in this test. def test_ogr_mysql_8(): if gdaltest.mysql_ds is None: pytest.skip() dst_feat = ogr.Feature(feature_def=gdaltest.mysql_lyr.GetLayerDefn()) dst_feat.SetField('PRFEDEA', 'CrazyKey') dst_feat.SetField('SHORTNAME', 'Crazy"\'Long') # We are obliged to create a fake geometry dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdaltest.mysql_lyr.CreateFeature(dst_feat) dst_feat.Destroy() gdaltest.mysql_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat_read = gdaltest.mysql_lyr.GetNextFeature() assert feat_read is not None, 'creating crazy feature failed!' assert feat_read.GetField('shortname') == 'Crazy"\'L', \ ('Vvalue not properly escaped or truncated:' + feat_read.GetField('shortname')) feat_read.Destroy() ############################################################################### # Verify inplace update of a feature with SetFeature(). def test_ogr_mysql_9(): if gdaltest.mysql_ds is None: pytest.skip() gdaltest.mysql_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat = gdaltest.mysql_lyr.GetNextFeature() gdaltest.mysql_lyr.SetAttributeFilter(None) feat.SetField('SHORTNAME', 'Reset') point = ogr.Geometry(ogr.wkbPoint25D) point.SetPoint(0, 5, 6) feat.SetGeometryDirectly(point) if gdaltest.mysql_lyr.SetFeature(feat) != 0: feat.Destroy() pytest.fail('SetFeature() method failed.') fid = feat.GetFID() feat.Destroy() feat = gdaltest.mysql_lyr.GetFeature(fid) assert feat is not None, ('GetFeature(%d) failed.' % fid) shortname = feat.GetField('SHORTNAME') assert shortname[:5] == 'Reset', ('SetFeature() did not update SHORTNAME, got %s.' % shortname) if ogrtest.check_feature_geometry(feat, 'POINT(5 6)') != 0: print(feat.GetGeometryRef()) pytest.fail('Geometry update failed') # Test updating non-existing feature feat.SetFID(-10) if gdaltest.mysql_lyr.SetFeature(feat) != ogr.OGRERR_NON_EXISTING_FEATURE: feat.Destroy() pytest.fail('Expected failure of SetFeature().') # Test deleting non-existing feature if gdaltest.mysql_lyr.DeleteFeature(-10) != ogr.OGRERR_NON_EXISTING_FEATURE: feat.Destroy() pytest.fail('Expected failure of DeleteFeature().') feat.Destroy() ############################################################################### # Verify that DeleteFeature() works properly. def test_ogr_mysql_10(): if gdaltest.mysql_ds is None: pytest.skip() gdaltest.mysql_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat = gdaltest.mysql_lyr.GetNextFeature() gdaltest.mysql_lyr.SetAttributeFilter(None) fid = feat.GetFID() feat.Destroy() assert gdaltest.mysql_lyr.DeleteFeature(fid) == 0, 'DeleteFeature() method failed.' gdaltest.mysql_lyr.SetAttributeFilter("PRFEDEA = 'CrazyKey'") feat = gdaltest.mysql_lyr.GetNextFeature() gdaltest.mysql_lyr.SetAttributeFilter(None) if feat is None: return feat.Destroy() pytest.fail('DeleteFeature() seems to have had no effect.') ############################################################################### # Test very large query. def test_ogr_mysql_15(): if gdaltest.mysql_ds is None: pytest.skip() expect = [169] query = 'eas_id = 169' for i in range(1000): query = query + (' or eas_id = %d' % (i + 1000)) gdaltest.mysql_lyr.SetAttributeFilter(query) tr = ogrtest.check_features_against_list(gdaltest.mysql_lyr, 'eas_id', expect) gdaltest.mysql_lyr.SetAttributeFilter(None) assert tr ############################################################################### # Test very large statement. def test_ogr_mysql_16(): if gdaltest.mysql_ds is None: pytest.skip() expect = [169] query = 'eas_id = 169' for ident in range(1000): query = query + (' or eas_id = %d' % (ident + 1000)) statement = 'select eas_id from tpoly where ' + query lyr = gdaltest.mysql_ds.ExecuteSQL(statement) tr = ogrtest.check_features_against_list(lyr, 'eas_id', expect) gdaltest.mysql_ds.ReleaseResultSet(lyr) assert tr ############################################################################### # Test requesting a non-existent table by name (bug 1480). def test_ogr_mysql_17(): if gdaltest.mysql_ds is None: pytest.skip() count = gdaltest.mysql_ds.GetLayerCount() layer = gdaltest.mysql_ds.GetLayerByName('JunkTableName') assert layer is None, 'got layer for non-existent table!' assert count == gdaltest.mysql_ds.GetLayerCount(), \ 'layer count changed unexpectedly.' ############################################################################### # Test getting a layer by name that was not previously a layer. def ogr_mysql_18(): if gdaltest.mysql_ds is None: pytest.skip() count = gdaltest.mysql_ds.GetLayerCount() layer = gdaltest.mysql_ds.GetLayerByName('geometry_columns') assert layer is not None, 'did not get geometry_columns layer' assert count + 1 == gdaltest.mysql_ds.GetLayerCount(), \ 'layer count unexpectedly unchanged.' ############################################################################### def test_ogr_mysql_20(): if gdaltest.mysql_ds is None: pytest.skip() layer = gdaltest.mysql_ds.CreateLayer('select', options=[]) ogrtest.quick_create_layer_def(layer, [('desc', ogr.OFTString), ('select', ogr.OFTString)]) dst_feat = ogr.Feature(feature_def=layer.GetLayerDefn()) dst_feat.SetField('desc', 'desc') dst_feat.SetField('select', 'select') # We are obliged to create a fake geometry dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 1)')) layer.CreateFeature(dst_feat) dst_feat.Destroy() layer = gdaltest.mysql_ds.GetLayerByName('select') layer.ResetReading() feat = layer.GetNextFeature() if feat.desc == 'desc' and feat.select == 'select': return pytest.fail() ############################################################################### # Test inserting NULL geometries into a table with a spatial index -> must FAIL def test_ogr_mysql_21(): if gdaltest.mysql_ds is None: pytest.skip() layer = gdaltest.mysql_ds.CreateLayer('tablewithspatialindex', geom_type=ogr.wkbPoint, options=[]) ogrtest.quick_create_layer_def(layer, [('name', ogr.OFTString)]) dst_feat = ogr.Feature(feature_def=layer.GetLayerDefn()) dst_feat.SetField('name', 'name') # The insertion MUST fail gdal.PushErrorHandler('CPLQuietErrorHandler') layer.CreateFeature(dst_feat) gdal.PopErrorHandler() dst_feat.Destroy() layer.ResetReading() feat = layer.GetNextFeature() assert feat is None ############################################################################### # Test inserting NULL geometries into a table without a spatial index def test_ogr_mysql_22(): if gdaltest.mysql_ds is None: pytest.skip() layer = gdaltest.mysql_ds.CreateLayer('tablewithoutspatialindex', geom_type=ogr.wkbPoint, options=['SPATIAL_INDEX=NO']) ogrtest.quick_create_layer_def(layer, [('name', ogr.OFTString)]) dst_feat = ogr.Feature(feature_def=layer.GetLayerDefn()) dst_feat.SetField('name', 'name') layer.CreateFeature(dst_feat) dst_feat.Destroy() layer.ResetReading() feat = layer.GetNextFeature() assert feat is not None ############################################################################### # Check for right precision def test_ogr_mysql_23(): if gdaltest.mysql_ds is None: pytest.skip() fields = ('zero', 'widthonly', 'onedecimal', 'twentynine', 'thirtyone') values = (1, 2, 1.1, 0.12345678901234567890123456789, 0.1234567890123456789012345678901) precision = (0, 0, 1, 29, 0) ###################################################### # Create a layer with a single feature through SQL if gdaltest.is_mysql_8_or_later: gdaltest.mysql_lyr = gdaltest.mysql_ds.ExecuteSQL("SELECT ROUND(1.1,0) AS zero, ROUND(2.0, 0) AS widthonly, ROUND(1.1,1) AS onedecimal, ROUND(0.12345678901234567890123456789,29) AS twentynine, ST_GeomFromText(CONVERT('POINT(1.0 2.0)',CHAR)) as the_geom;") else: gdaltest.mysql_lyr = gdaltest.mysql_ds.ExecuteSQL("SELECT ROUND(1.1,0) AS zero, ROUND(2.0, 0) AS widthonly, ROUND(1.1,1) AS onedecimal, ROUND(0.12345678901234567890123456789,29) AS twentynine, GeomFromText(CONVERT('POINT(1.0 2.0)',CHAR)) as the_geom;") feat = gdaltest.mysql_lyr.GetNextFeature() assert feat is not None ###################################################### # Check the values and the precisions for i in range(4): assert feat.GetFieldIndex(fields[i]) >= 0, 'field not found' assert feat.GetField(feat.GetFieldIndex(fields[i])) == values[i], \ 'value not right' assert feat.GetFieldDefnRef(feat.GetFieldIndex(fields[i])).GetPrecision() == precision[i], \ 'precision not right' gdaltest.mysql_ds.ReleaseResultSet(gdaltest.mysql_lyr) gdaltest.mysql_lyr = None ############################################################################### # Run test_ogrsf def test_ogr_mysql_24(): if gdaltest.mysql_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + " '" + gdaltest.mysql_connection_string + "' tpoly") assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test 64 bit FID def test_ogr_mysql_72(): if gdaltest.mysql_ds is None: pytest.skip() # Regular layer with 32 bit IDs lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_72', geom_type=ogr.wkbNone) assert lyr.GetMetadataItem(ogr.OLMD_FID64) is None lyr.CreateField(ogr.FieldDefn('foo')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(123456789012345) f.SetField(0, 'bar') assert lyr.CreateFeature(f) == 0 f = lyr.GetFeature(123456789012345) assert f is not None lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_72', geom_type=ogr.wkbNone, options=['FID64=YES', 'OVERWRITE=YES']) assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None lyr.CreateField(ogr.FieldDefn('foo')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(123456789012345) f.SetField(0, 'bar') assert lyr.CreateFeature(f) == 0 assert lyr.SetFeature(f) == 0 gdaltest.mysql_ds = None # Test with normal protocol gdaltest.mysql_ds = ogr.Open(gdaltest.mysql_connection_string, update=1) lyr = gdaltest.mysql_ds.GetLayerByName('ogr_mysql_72') assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None f = lyr.GetNextFeature() if f.GetFID() != 123456789012345: f.DumpReadable() pytest.fail() ############################################################################### # Test nullable def test_ogr_mysql_25(): if gdaltest.mysql_ds is None: pytest.skip() lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_25', geom_type=ogr.wkbPoint, options=[]) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field if False: # pylint: disable=using-constant-test # hum mysql seems OK with unset non-nullable fields ?? f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None gdaltest.mysql_ds = None gdaltest.mysql_ds = ogr.Open(gdaltest.mysql_connection_string, update=1) lyr = gdaltest.mysql_ds.GetLayerByName('ogr_mysql_25') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 ############################################################################### # Test default values def test_ogr_mysql_26(): if gdaltest.mysql_ds is None: pytest.skip() lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_26', geom_type=ogr.wkbPoint, options=[]) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_string_null', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) # field_defn = ogr.FieldDefn( 'field_date', ogr.OFTDate ) # field_defn.SetDefault("CURRENT_DATE") # lyr.CreateField(field_defn) # field_defn = ogr.FieldDefn( 'field_time', ogr.OFTTime ) # field_defn.SetDefault("CURRENT_TIME") # lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldNull('field_string_null') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None gdaltest.mysql_ds = None gdaltest.mysql_ds = ogr.Open(gdaltest.mysql_connection_string, update=1) lyr = gdaltest.mysql_ds.GetLayerByName('ogr_mysql_26') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'a''b'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() == '123' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_real')).GetDefault() == '1.23' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nodefault')).GetDefault() is None assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime')).GetDefault() == 'CURRENT_TIMESTAMP' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault() == "'2015/06/30 12:34:56'" # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault() != "CURRENT_DATE": # gdaltest.post_reason('fail') # print(lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault()) # return 'fail' # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_time')).GetDefault() != "CURRENT_TIME": # gdaltest.post_reason('fail') # return 'fail' f = lyr.GetNextFeature() if f.GetField('field_string') != 'a\'b' or f.GetField('field_int') != 123 or \ f.GetField('field_real') != 1.23 or \ not f.IsFieldNull('field_string_null') or \ not f.IsFieldNull('field_nodefault') or not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56': f.DumpReadable() pytest.fail() gdal.Unlink('/vsimem/ogr_gpkg_24.gpkg') ############################################################################### # Test created table indecs def test_ogr_mysql_27(): if gdaltest.mysql_ds is None: pytest.skip() if not gdaltest.is_mysql_8_or_later: pytest.skip() layer = gdaltest.mysql_ds.GetLayerByName('tpoly') if layer is None: pytest.skip('did not get tpoly layer') sql_lyr = gdaltest.mysql_ds.ExecuteSQL('SHOW CREATE TABLE tpoly') f = sql_lyr.GetNextFeature() field = f.GetField(1) res = False for line in field.splitlines(): if 'geometry' in line: if "SRID" in line: res = True else: res = False if not res: print('{}'.format(field)) pytest.fail("Not found SRID definition with GEOMETORY field.") gdaltest.mysql_ds.ReleaseResultSet(sql_lyr) ############################################################################### # def test_ogr_mysql_longlat(): if gdaltest.mysql_ds is None: pytest.skip() srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_longlat', geom_type=ogr.wkbPoint, srs=srs, options=[]) f = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT(150 2)') f.SetGeometry(geom) lyr.CreateFeature(f) lyr.SetSpatialFilterRect(149.5, 1.5, 150.5, 2.5) f = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(f, geom) == 0 extent = lyr.GetExtent() expect = (150.0, 150.0, 2.0, 2.0) minx = abs(extent[0] - expect[0]) maxx = abs(extent[1] - expect[1]) miny = abs(extent[2] - expect[2]) maxy = abs(extent[3] - expect[3]) if max(minx, maxx, miny, maxy) > 0.0001: print(extent) pytest.fail('Extents do not match') if gdaltest.is_mysql_8_or_later: sql_lyr = gdaltest.mysql_ds.ExecuteSQL('SHOW CREATE TABLE ogr_mysql_longlat') f = sql_lyr.GetNextFeature() field = f.GetField(1) res = False for line in field.splitlines(): if 'geometry' in line: if "SRID" in line: res = True else: res = False if not res: print('{}'.format(field)) pytest.fail("Not found SRID definition with GEOMETORY field.") gdaltest.mysql_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test writing and reading back geometries @pytest.mark.xfail(reason="MariaDB has a known issue MDEV-21401") def test_ogr_mysql_28(): if gdaltest.mysql_ds is None: pytest.skip() wkts = ogrtest.get_wkt_data_series(with_z=True, with_m=True, with_gc=True, with_circular=True, with_surface=False) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) for i, wkt in enumerate(wkts): gdaltest.num_mysql_28 = i + 1 geom = ogr.CreateGeometryFromWkt(wkt) lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_28_%d' % i, geom_type=geom.GetGeometryType(), srs=srs) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(geom) lyr.CreateFeature(f) f = None # layer = gdaltest.mysql_ds.GetLayerByName('ogr_mysql_28_%d' % i) if layer is None: pytest.fail('did not get ogr_mysql_28_%d layer' % i) feat = layer.GetNextFeature() assert feat is not None feat = None @pytest.mark.xfail(reason='MySQL does not support POLYHEDRALSURFACE.') def test_ogr_mysql_29(): if gdaltest.mysql_ds is None: pytest.skip() wkts = ogrtest.get_wkt_data_series(with_z=False, with_m=False, with_gc=False, with_circular=False, with_surface=True) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) for i, wkt in enumerate(wkts): gdaltest.num_mysql_29 = i + 1 geom = ogr.CreateGeometryFromWkt(wkt) lyr = gdaltest.mysql_ds.CreateLayer('ogr_mysql_29_%d' % i, geom_type=geom.GetGeometryType(), srs=srs) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(geom) lyr.CreateFeature(f) f = None # layer = gdaltest.mysql_ds.GetLayerByName('ogr_mysql_29_%d' % i) if layer is None: pytest.fail('did not get ogr_mysql_29_%d layer' % i) feat = layer.GetNextFeature() assert feat is not None feat = None ############################################################################### # def test_ogr_mysql_cleanup(): if gdaltest.mysql_ds is None: pytest.skip() gdaltest.mysql_ds.ExecuteSQL('DROP TABLE tpoly') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE `select`') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE tablewithspatialindex') with gdaltest.error_handler(): gdaltest.mysql_ds.ExecuteSQL('DROP TABLE tablewithoutspatialindex') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE geometry_columns') if not gdaltest.is_mysql_8_or_later: gdaltest.mysql_ds.ExecuteSQL('DROP TABLE spatial_ref_sys') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE ogr_mysql_72') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE ogr_mysql_25') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE ogr_mysql_26') gdaltest.mysql_ds.ExecuteSQL('DROP TABLE ogr_mysql_longlat') for i in range(gdaltest.num_mysql_28): gdaltest.mysql_ds.ExecuteSQL('DROP TABLE ogr_mysql_28_%d' % i) for i in range(gdaltest.num_mysql_29): gdaltest.mysql_ds.ExecuteSQL('DROP TABLE ogr_mysql_29_%d' % i) gdaltest.mysql_ds.Destroy() gdaltest.mysql_ds = None gdalautotest-3.1.2/ogr/ogr_mem.py0000775000175000017500000005063613701060010015462 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_mem.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR Memory driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2008-2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Open Memory datasource. def test_ogr_mem_1(): mem_drv = ogr.GetDriverByName('Memory') gdaltest.mem_ds = mem_drv.CreateDataSource('wrk_in_memory') assert gdaltest.mem_ds is not None ############################################################################### # Create table from data/poly.shp def test_ogr_mem_2(): if gdaltest.mem_ds is None: pytest.skip() assert gdaltest.mem_ds.TestCapability(ogr.ODsCCreateLayer) != 0, \ 'ODsCCreateLayer TestCapability failed.' ####################################################### # Create memory Layer gdaltest.mem_lyr = gdaltest.mem_ds.CreateLayer('tpoly') ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.mem_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('WHEN', ogr.OFTDateTime)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.mem_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) ret = gdaltest.mem_lyr.CreateFeature(dst_feat) assert ret == 0, 'CreateFeature() failed.' feat = shp_lyr.GetNextFeature() ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_mem_3(): if gdaltest.mem_ds is None: pytest.skip() expect = [168, 169, 166, 158, 165] gdaltest.mem_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.mem_lyr, 'eas_id', expect) gdaltest.mem_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.mem_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.000000001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) gdaltest.poly_feat = None gdaltest.shp_ds = None assert tr ############################################################################### # Write more features with a bunch of different geometries, and verify the # geometries are still OK. def test_ogr_mem_4(): if gdaltest.mem_ds is None: pytest.skip() dst_feat = ogr.Feature(feature_def=gdaltest.mem_lyr.GetLayerDefn()) wkt_list = ['10', '2', '1', '3d_1', '4', '5', '6'] for item in wkt_list: wkt = open('data/wkb_wkt/' + item + '.wkt').read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Write geometry as a new memory feature. dst_feat.SetGeometryDirectly(geom) dst_feat.SetField('PRFEDEA', item) gdaltest.mem_lyr.CreateFeature(dst_feat) ###################################################################### # Read back the feature and get the geometry. gdaltest.mem_lyr.SetAttributeFilter("PRFEDEA = '%s'" % item) feat_read = gdaltest.mem_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom) == 0 ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_mem_5(): if gdaltest.mem_ds is None: pytest.skip() expect = [179, 173, 172, 171, 170, 169, 168, 166, 165, 158, None] sql_lyr = gdaltest.mem_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.mem_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_mem_6(): if gdaltest.mem_ds is None: pytest.skip() sql_lyr = gdaltest.mem_ds.ExecuteSQL( "select * from tpoly where prfedea = '2'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['2']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'MULTILINESTRING ((5.00121349 2.99853132,5.00121349 1.99853133),(5.00121349 1.99853133,5.00121349 0.99853133),(3.00121351 1.99853127,5.00121349 1.99853133),(5.00121349 1.99853133,6.00121348 1.99853135))') != 0: tr = 0 gdaltest.mem_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_mem_7(): if gdaltest.mem_ds is None: pytest.skip() gdaltest.mem_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.mem_lyr.SetSpatialFilter(geom) geom.Destroy() assert not gdaltest.mem_lyr.TestCapability(ogr.OLCFastSpatialFilter), \ 'OLCFastSpatialFilter capability test should have failed.' tr = ogrtest.check_features_against_list(gdaltest.mem_lyr, 'eas_id', [158]) gdaltest.mem_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Test adding a new field. def test_ogr_mem_8(): #################################################################### # Add new string field. field_defn = ogr.FieldDefn('new_string', ogr.OFTString) gdaltest.mem_lyr.CreateField(field_defn) #################################################################### # Apply a value to this field in one feature. gdaltest.mem_lyr.SetAttributeFilter("PRFEDEA = '2'") feat_read = gdaltest.mem_lyr.GetNextFeature() feat_read.SetField('new_string', 'test1') gdaltest.mem_lyr.SetFeature(feat_read) # Test expected failed case of SetFeature() new_feat = ogr.Feature(gdaltest.mem_lyr.GetLayerDefn()) new_feat.SetFID(-2) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = gdaltest.mem_lyr.SetFeature(new_feat) gdal.PopErrorHandler() assert ret != 0 new_feat = None #################################################################### # Now fetch two features and verify the new column works OK. gdaltest.mem_lyr.SetAttributeFilter("PRFEDEA IN ( '2', '1' )") tr = ogrtest.check_features_against_list(gdaltest.mem_lyr, 'new_string', ['test1', None]) gdaltest.mem_lyr.SetAttributeFilter(None) assert tr ############################################################################### # Test deleting a feature. def test_ogr_mem_9(): assert gdaltest.mem_lyr.TestCapability(ogr.OLCDeleteFeature), \ 'OLCDeleteFeature capability test failed.' assert gdaltest.mem_lyr.TestCapability(ogr.OLCFastFeatureCount), \ 'OLCFastFeatureCount capability test failed.' old_count = gdaltest.mem_lyr.GetFeatureCount() #################################################################### # Delete target feature. target_fid = 2 assert gdaltest.mem_lyr.DeleteFeature(target_fid) == 0, \ 'DeleteFeature returned error code.' assert gdaltest.mem_lyr.DeleteFeature(target_fid) != 0, \ 'DeleteFeature should have returned error code.' #################################################################### # Verify that count has dropped by one, and that the feature in question # can't be fetched. new_count = gdaltest.mem_lyr.GetFeatureCount() if new_count != old_count - 1: gdaltest.post_reason('got feature count of %d, not expected %d.' % (new_count, old_count - 1)) assert gdaltest.mem_lyr.TestCapability(ogr.OLCRandomRead), \ 'OLCRandomRead capability test failed.' assert gdaltest.mem_lyr.GetFeature(target_fid) is None, 'Got deleted feature!' assert gdaltest.mem_lyr.GetFeature(-1) is None, 'GetFeature() should have failed' assert gdaltest.mem_lyr.GetFeature(1000) is None, 'GetFeature() should have failed' ############################################################################### # Test GetDriver() / name bug (#1674) # # Mostly we are verifying that this doesn't still cause a crash. def test_ogr_mem_10(): d = ogr.GetDriverByName('Memory') ds = d.CreateDataSource('xxxxxx') d2 = ds.GetDriver() assert d2 is not None and d2.GetName() == 'Memory', \ 'Did not get expected driver name.' ############################################################################### # Verify that we can delete layers properly def test_ogr_mem_11(): assert gdaltest.mem_ds.TestCapability('DeleteLayer') != 0, \ 'Deletelayer TestCapability failed.' gdaltest.mem_ds.CreateLayer('extra') gdaltest.mem_ds.CreateLayer('extra2') layer_count = gdaltest.mem_ds.GetLayerCount() gdaltest.mem_lyr = None # Delete extra layer assert gdaltest.mem_ds.DeleteLayer(layer_count - 2) == 0, 'DeleteLayer() failed' assert gdaltest.mem_ds.DeleteLayer(-1) != 0, 'DeleteLayer() should have failed' assert gdaltest.mem_ds.DeleteLayer(gdaltest.mem_ds.GetLayerCount()) != 0, \ 'DeleteLayer() should have failed' assert gdaltest.mem_ds.GetLayer(-1) is None, 'GetLayer() should have failed' assert gdaltest.mem_ds.GetLayer(gdaltest.mem_ds.GetLayerCount()) is None, \ 'GetLayer() should have failed' lyr = gdaltest.mem_ds.GetLayer(gdaltest.mem_ds.GetLayerCount() - 1) assert lyr.GetName() == 'extra2', 'delete layer seems iffy' ############################################################################### # Test some date handling def test_ogr_mem_12(): if gdaltest.mem_ds is None: pytest.skip() ####################################################### # Create memory Layer lyr = gdaltest.mem_ds.GetLayerByName('tpoly') assert lyr is not None # Set the date of the first feature f = lyr.GetFeature(1) f.SetField("WHEN", 2008, 3, 19, 16, 15, 00, 0) lyr.SetFeature(f) f = lyr.GetFeature(1) idx = f.GetFieldIndex('WHEN') expected = [2008, 3, 19, 16, 15, 0.0, 0] result = f.GetFieldAsDateTime(idx) for i, value in enumerate(result): assert value == expected[i], ('%s != %s' % (result, expected)) ############################################################################### # Test Get/Set on StringList, IntegerList, RealList def test_ogr_mem_13(): if gdaltest.mem_ds is None: pytest.skip() lyr = gdaltest.mem_ds.CreateLayer('listlayer') field_defn = ogr.FieldDefn('stringlist', ogr.OFTStringList) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('intlist', ogr.OFTIntegerList) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('reallist', ogr.OFTRealList) lyr.CreateField(field_defn) feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) try: feat.SetFieldStringList except AttributeError: # OG python bindings pytest.skip() feat.SetFieldStringList(0, ['a', 'b']) assert feat.GetFieldAsStringList(0) == ['a', 'b'] feat.SetFieldIntegerList(1, [2, 3]) assert feat.GetFieldAsIntegerList(1) == [2, 3] feat.SetFieldDoubleList(2, [4., 5.]) assert feat.GetFieldAsDoubleList(2) == [4., 5.] ############################################################################### # Test SetNextByIndex def test_ogr_mem_14(): if gdaltest.mem_ds is None: pytest.skip() lyr = gdaltest.mem_ds.CreateLayer('SetNextByIndex') field_defn = ogr.FieldDefn('foo', ogr.OFTString) lyr.CreateField(field_defn) feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) feat.SetField(0, 'first feature') lyr.CreateFeature(feat) feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) feat.SetField(0, 'second feature') lyr.CreateFeature(feat) feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) feat.SetField(0, 'third feature') lyr.CreateFeature(feat) assert lyr.TestCapability(ogr.OLCFastSetNextByIndex), \ 'OLCFastSetNextByIndex capability test failed.' assert lyr.SetNextByIndex(1) == 0, 'SetNextByIndex() failed' feat = lyr.GetNextFeature() assert feat.GetFieldAsString(0) == 'second feature', 'did not get expected feature' assert lyr.SetNextByIndex(-1) != 0, 'SetNextByIndex() should have failed' assert lyr.SetNextByIndex(100) != 0, 'SetNextByIndex() should have failed' lyr.SetAttributeFilter("foo != 'second feature'") assert not lyr.TestCapability(ogr.OLCFastSetNextByIndex), \ 'OLCFastSetNextByIndex capability test should have failed.' assert lyr.SetNextByIndex(1) == 0, 'SetNextByIndex() failed' feat = lyr.GetNextFeature() assert feat.GetFieldAsString(0) == 'third feature', 'did not get expected feature' ############################################################################### # Test non-linear geometries def test_ogr_mem_15(): lyr = gdaltest.mem_ds.CreateLayer('wkbCircularString', geom_type=ogr.wkbCircularString) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 0,0 0)')) lyr.CreateFeature(f) f = None assert lyr.GetGeomType() == ogr.wkbCircularString assert lyr.GetLayerDefn().GetGeomType() == ogr.wkbCircularString assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbCircularString f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetGeometryType() == ogr.wkbCircularString # Test SetNonLinearGeometriesEnabledFlag(False) old_val = ogr.GetNonLinearGeometriesEnabledFlag() ogr.SetNonLinearGeometriesEnabledFlag(False) assert lyr.GetGeomType() == ogr.wkbLineString assert lyr.GetLayerDefn().GetGeomType() == ogr.wkbLineString assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbLineString lyr.ResetReading() f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetGeometryType() == ogr.wkbLineString lyr.ResetReading() f = lyr.GetNextFeature() g = f.GetGeomFieldRef(0) assert g.GetGeometryType() == ogr.wkbLineString ogr.SetNonLinearGeometriesEnabledFlag(old_val) ############################################################################### # Test map implementation def test_ogr_mem_16(): lyr = gdaltest.mem_ds.CreateLayer('ogr_mem_16') f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 assert f.GetFID() == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 assert f.GetFID() == 1 f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(100000000) ret = lyr.CreateFeature(f) assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(100000000) ret = lyr.SetFeature(f) assert ret == 0 assert lyr.GetFeatureCount() == 3 assert lyr.GetFeature(0) is not None assert lyr.GetFeature(1) is not None assert lyr.GetFeature(2) is None assert lyr.GetFeature(100000000) is not None lyr.ResetReading() f = lyr.GetNextFeature() assert f.GetFID() == 0 f = lyr.GetNextFeature() assert f.GetFID() == 1 f = lyr.GetNextFeature() assert f.GetFID() == 100000000 f = lyr.GetNextFeature() assert f is None f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(100000000) ret = lyr.CreateFeature(f) assert ret == 0 assert f.GetFID() == 2 assert lyr.GetFeatureCount() == 4 ret = lyr.DeleteFeature(1) assert ret == 0 assert lyr.GetFeatureCount() == 3 ret = lyr.DeleteFeature(1) assert ret != 0 assert lyr.GetFeatureCount() == 3 # Test first feature with huge ID lyr = gdaltest.mem_ds.CreateLayer('ogr_mem_16_bis') f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(1234567890123) ret = lyr.CreateFeature(f) assert ret == 0 assert f.GetFID() == 1234567890123 f = None # Important we must not have dangling references before modifying the schema ! # Create a field so as to test OGRMemLayerIteratorMap lyr.CreateField(ogr.FieldDefn('foo')) ############################################################################### # Test Dataset.GetNextFeature() implementation def test_ogr_mem_17(): ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = ds.CreateLayer('ogr_mem_1') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) lyr = ds.CreateLayer('ogr_mem_2') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) lyr = ds.CreateLayer('ogr_mem_3') # Empty layer lyr = ds.CreateLayer('ogr_mem_4') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f, lyr = ds.GetNextFeature() assert f is not None and lyr.GetName() == 'ogr_mem_1' f, lyr = ds.GetNextFeature() assert f is not None and lyr.GetName() == 'ogr_mem_1' f, lyr = ds.GetNextFeature() assert f is not None and lyr.GetName() == 'ogr_mem_2' f, lyr = ds.GetNextFeature() assert f is not None and lyr.GetName() == 'ogr_mem_4' f, lyr = ds.GetNextFeature() assert f is None and lyr is None f, lyr = ds.GetNextFeature() assert f is None and lyr is None ds.ResetReading() f, lyr = ds.GetNextFeature() assert f is not None and lyr.GetName() == 'ogr_mem_1' ds.ResetReading() f, lyr, pct = ds.GetNextFeature(include_pct=True) assert f is not None and lyr.GetName() == 'ogr_mem_1' and pct == 0.25 f, pct = ds.GetNextFeature(include_layer=False, include_pct=True) assert f is not None and pct == 0.50 f, pct = ds.GetNextFeature(include_layer=False, include_pct=True) assert f is not None and pct == 0.75 f, pct = ds.GetNextFeature(include_layer=False, include_pct=True) assert f is not None and pct == 1.0 f, pct = ds.GetNextFeature(include_layer=False, include_pct=True) assert f is None and pct == 1.0 f, pct = ds.GetNextFeature(include_layer=False, include_pct=True) assert f is None and pct == 1.0 ds.ResetReading() f = ds.GetNextFeature(include_layer=False) assert f is not None def test_ogr_mem_cleanup(): if gdaltest.mem_ds is None: pytest.skip() ogr.SetNonLinearGeometriesEnabledFlag(True) gdaltest.mem_ds = None gdalautotest-3.1.2/ogr/ogr_pcidsk.py0000775000175000017500000002400513701060010016150 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_pcidsk.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test PCIDSK driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest wkts = [('POINT (0 1 2)', 'points', 0), ('LINESTRING (0 1 2,3 4 5)', 'lines', 0), ('POINT (0 1 2)', 'points2', 4326), ('LINESTRING (0 1 2,3 4 5)', 'lines2', 32631), ] ############################################################################### # Test creation def test_ogr_pcidsk_1(): ogr_drv = ogr.GetDriverByName('PCIDSK') if ogr_drv is None: pytest.skip() ds = ogr_drv.CreateDataSource('tmp/ogr_pcidsk_1.pix') lyr = ds.CreateLayer('nothing', geom_type=ogr.wkbNone) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr = ds.CreateLayer('fields', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo2') feat.SetField(1, 1) feat.SetField(2, 3.45) lyr.CreateFeature(feat) feat.SetField(0, 'foo') lyr.SetFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'bar') lyr.CreateFeature(feat) assert lyr.GetFeatureCount() == 2 lyr.DeleteFeature(1) assert lyr.GetFeatureCount() == 1 lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None assert feat.GetField(0) == 'foo' assert feat.GetField(1) == 1 assert feat.GetField(2) == 3.45 for (wkt, layername, epsgcode) in wkts: geom = ogr.CreateGeometryFromWkt(wkt) if epsgcode != 0: srs = osr.SpatialReference() srs.ImportFromEPSG(epsgcode) else: srs = None lyr = ds.CreateLayer(layername, geom_type=geom.GetGeometryType(), srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) lyr.CreateFeature(feat) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None, layername if feat.GetGeometryRef().ExportToWkt() != wkt: feat.DumpReadable() pytest.fail(layername) ds = None ############################################################################### # Test reading def test_ogr_pcidsk_2(): ogr_drv = ogr.GetDriverByName('PCIDSK') if ogr_drv is None: pytest.skip() ds = ogr.Open('tmp/ogr_pcidsk_1.pix') assert ds.GetLayerCount() == 2 + len(wkts) lyr = ds.GetLayerByName('nothing') assert lyr.GetGeomType() == ogr.wkbNone feat = lyr.GetNextFeature() assert feat is not None lyr = ds.GetLayerByName('fields') feat = lyr.GetNextFeature() assert feat is not None assert feat.GetField(0) == 'foo' assert feat.GetField(1) == 1 assert feat.GetField(2) == 3.45 for (wkt, layername, epsgcode) in wkts: geom = ogr.CreateGeometryFromWkt(wkt) lyr = ds.GetLayerByName(layername) assert lyr.GetGeomType() == geom.GetGeometryType(), layername srs = lyr.GetSpatialRef() if epsgcode != 0: ref_srs = osr.SpatialReference() ref_srs.ImportFromEPSG(epsgcode) assert srs is not None and ref_srs.IsSame(srs) == 1, layername feat = lyr.GetNextFeature() assert feat is not None, layername if feat.GetGeometryRef().ExportToWkt() != wkt: feat.DumpReadable() pytest.fail(layername) ds = None ############################################################################### # Check with test_ogrsf def test_ogr_pcidsk_3(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/ogr_pcidsk_1.pix') ret_str = 'success' if ret.find("ERROR: The feature was not deleted") != -1: # Expected fail for now print("ERROR: The feature was not deleted") ret = ret.replace("ERROR: The feature was not deleted", "ARGHH: The feature was not deleted") ret_str = 'expected_fail' if ret.find('ERROR') == ret.find('ERROR ret code = 1'): ret = ret.replace("ERROR ret code = 1", "") if ret.find('INFO') == -1 or ret.find('ERROR') != -1: print(ret) ret_str = 'fail' return ret_str ############################################################################### # Test that we cannot open a raster only pcidsk in read-only mode def test_ogr_pcidsk_4(): if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() if gdal.GetDriverByName('PCIDSK') is None: pytest.skip() ds = ogr.Open('../gdrivers/data/utm.pix') assert ds is None ds = None ############################################################################### # Test that we can open a raster only pcidsk in update mode def test_ogr_pcidsk_5(): if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() if gdal.GetDriverByName('PCIDSK') is None: pytest.skip() ds = ogr.Open('../gdrivers/data/utm.pix', update=1) assert ds is not None ds = None ############################################################################### def test_ogr_pcidsk_add_field_to_non_empty_layer(): if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() tmpfile = '/vsimem/tmp.pix' ds = ogr.GetDriverByName('PCIDSK').CreateDataSource(tmpfile) lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'bar' lyr.CreateFeature(f) f = None with gdaltest.error_handler(): assert lyr.CreateField(ogr.FieldDefn('bar', ogr.OFTString)) != 0 f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'bar2' lyr.CreateFeature(f) f = None ds = None ogr.GetDriverByName('PCIDSK').DeleteDataSource(tmpfile) ############################################################################### def test_ogr_pcidsk_too_many_layers(): if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() tmpfile = '/vsimem/tmp.pix' ds = ogr.GetDriverByName('PCIDSK').CreateDataSource(tmpfile) for i in range(1023): ds.CreateLayer('foo%d' % i) with gdaltest.error_handler(): assert ds.CreateLayer('foo') is None ds = None ogr.GetDriverByName('PCIDSK').DeleteDataSource(tmpfile) ############################################################################### # Check a polygon layer def test_ogr_pcidsk_online_1(): if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/pcidsk/sdk_testsuite/polygon.pix', 'polygon.pix'): pytest.skip() ds = ogr.Open('tmp/cache/polygon.pix') assert ds is not None lyr = ds.GetLayer(0) assert lyr is not None feat = lyr.GetNextFeature() assert feat is not None geom = 'POLYGON ((479819.84375 4765180.5 0,479690.1875 4765259.5 0,479647.0 4765369.5 0,479730.375 4765400.5 0,480039.03125 4765539.5 0,480035.34375 4765558.5 0,480159.78125 4765610.5 0,480202.28125 4765482.0 0,480365.0 4765015.5 0,480389.6875 4764950.0 0,480133.96875 4764856.5 0,480080.28125 4764979.5 0,480082.96875 4765049.5 0,480088.8125 4765139.5 0,480059.90625 4765239.5 0,480019.71875 4765319.5 0,479980.21875 4765409.5 0,479909.875 4765370.0 0,479859.875 4765270.0 0,479819.84375 4765180.5 0))' if ogrtest.check_feature_geometry(feat, geom) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # Check a polygon layer def test_ogr_pcidsk_online_2(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() if ogr.GetDriverByName('PCIDSK') is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/pcidsk/sdk_testsuite/polygon.pix', 'polygon.pix'): pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/cache/polygon.pix') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Cleanup def test_ogr_pcidsk_cleanup(): gdal.Unlink('tmp/ogr_pcidsk_1.pix') gdalautotest-3.1.2/ogr/ogr_sosi.py0000775000175000017500000000774313701060010015662 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_sosi.py 71c7fae6728b5b7b4d745d7147292f5b7beb4dbd 2019-08-26 21:57:49 +0200 Lars Aksel Opsahl $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR SOSI driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr from osgeo import gdal import gdaltest import pytest ############################################################################### def test_ogr_sosi_1(): if ogr.GetDriverByName('SOSI') is None: pytest.skip() if not gdaltest.download_file('http://trac.osgeo.org/gdal/raw-attachment/ticket/3638/20BygnAnlegg.SOS', '20BygnAnlegg.SOS'): pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal( test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/cache/20BygnAnlegg.SOS') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # test using no appendFieldsMap def test_ogr_sosi_2(): if ogr.GetDriverByName('SOSI') is None: pytest.skip() ds = gdal.OpenEx('data/test_duplicate_fields.sos', open_options=[]) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 17 lyr = ds.GetLayer(1) assert lyr.GetFeatureCount() == 1 f = lyr.GetNextFeature() assert f['REINBEITEBRUKERID'] == 'YD' ############################################################################### # test using simple open_options appendFieldsMap def test_ogr_sosi_3(): if ogr.GetDriverByName('SOSI') is None: pytest.skip() ds = gdal.OpenEx('data/test_duplicate_fields.sos', open_options=['appendFieldsMap=BEITEBRUKERID&OPPHAV']) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 17 lyr = ds.GetLayer(1) assert lyr.GetFeatureCount() == 1 f = lyr.GetNextFeature() assert f['REINBEITEBRUKERID'] == 'YD,YG' ############################################################################### # test using simple open_options appendFieldsMap with semicolumns def test_ogr_sosi_4(): if ogr.GetDriverByName('SOSI') is None: pytest.skip() ds = gdal.OpenEx('data/test_duplicate_fields.sos', open_options=['appendFieldsMap=BEITEBRUKERID:;&OPPHAV:;']) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 17 lyr = ds.GetLayer(1) assert lyr.GetFeatureCount() == 1 f = lyr.GetNextFeature() assert f['REINBEITEBRUKERID'] == 'YD;YG' gdalautotest-3.1.2/ogr/ogr_index_test.py0000775000175000017500000003235513701060010017050 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_index_test.py 010860a7429f4a21ba9ccb8034afbc3a2b61575a 2019-06-29 23:31:46 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR INDEX support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2010-2012, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import gdaltest from osgeo import ogr import ogrtest import pytest ############################################################################### # Create a MIF file to be our primary table. def test_ogr_index_1(): from osgeo import gdal gdal.PushErrorHandler('CPLQuietErrorHandler') try: ogr.GetDriverByName('MapInfo File').DeleteDataSource('index_p.mif') except AttributeError: pass try: ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('join_t.dbf') except AttributeError: pass gdal.PopErrorHandler() drv = ogr.GetDriverByName('MapInfo File') gdaltest.p_ds = drv.CreateDataSource('index_p.mif') gdaltest.p_lyr = gdaltest.p_ds.CreateLayer('index_p') ogrtest.quick_create_layer_def(gdaltest.p_lyr, [('PKEY', ogr.OFTInteger)]) ogrtest.quick_create_feature(gdaltest.p_lyr, [5], None) ogrtest.quick_create_feature(gdaltest.p_lyr, [10], None) ogrtest.quick_create_feature(gdaltest.p_lyr, [9], None) ogrtest.quick_create_feature(gdaltest.p_lyr, [4], None) ogrtest.quick_create_feature(gdaltest.p_lyr, [3], None) ogrtest.quick_create_feature(gdaltest.p_lyr, [1], None) # It turns out mapinfo format doesn't allow GetFeatureCount() calls while # writing ... it just blows an assert! # if gdaltest.p_lyr.GetFeatureCount() != 7: # gdaltest.post_reason( 'FeatureCount wrong' ) # return 'fail' # Close and reopen, since it seems the .mif driver does not allow reading # from a newly created (updatable) file. gdaltest.p_ds = None gdaltest.p_ds = ogr.OpenShared('index_p.mif', update=0) gdaltest.p_lyr = gdaltest.p_ds.GetLayerByName('index_p') ############################################################################### # Create a dbf file to be our secondary table. Close it, and reopen shared. def test_ogr_index_2(): drv = ogr.GetDriverByName('ESRI Shapefile') gdaltest.s_ds = drv.CreateDataSource('join_t.dbf') gdaltest.s_lyr = gdaltest.s_ds.CreateLayer('join_t', geom_type=ogr.wkbNone) ogrtest.quick_create_layer_def(gdaltest.s_lyr, [('SKEY', ogr.OFTInteger), ('VALUE', ogr.OFTString, 16)]) for i in range(20): ogrtest.quick_create_feature(gdaltest.s_lyr, [i, 'Value ' + str(i)], None) assert gdaltest.s_lyr.GetFeatureCount() == 20, 'FeatureCount wrong' gdaltest.s_ds.Release() gdaltest.s_lyr = None gdaltest.s_ds = None gdaltest.s_ds = ogr.OpenShared('join_t.dbf', update=1) gdaltest.s_lyr = gdaltest.s_ds.GetLayerByName('join_t') ############################################################################### # Verify a simple join without indexing. def test_ogr_index_3(): expect = ['Value 5', 'Value 10', 'Value 9', 'Value 4', 'Value 3', 'Value 1'] sql_lyr = gdaltest.p_ds.ExecuteSQL( 'SELECT * FROM index_p p ' + 'LEFT JOIN "join_t.dbf".join_t j ON p.PKEY = j.SKEY ') tr = ogrtest.check_features_against_list(sql_lyr, 'VALUE', expect) gdaltest.p_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Create an INDEX on the SKEY and VALUE field in the join table. def test_ogr_index_4(): gdaltest.s_ds.ExecuteSQL('CREATE INDEX ON join_t USING value') gdaltest.s_ds.ExecuteSQL('CREATE INDEX ON join_t USING skey') ############################################################################### # Check that indexable single int lookup works. def test_ogr_index_5(): gdaltest.s_lyr.SetAttributeFilter('SKEY = 5') expect = ['Value 5'] tr = ogrtest.check_features_against_list(gdaltest.s_lyr, 'VALUE', expect) assert tr ############################################################################### # Check that indexable single string lookup works. # # We also close the datasource and reopen to ensure that reloaded indexes # work OK too. def test_ogr_index_6(): gdaltest.s_ds.Release() gdaltest.s_ds = ogr.OpenShared('join_t.dbf', update=1) gdaltest.s_lyr = gdaltest.s_ds.GetLayerByName('join_t') gdaltest.s_lyr.SetAttributeFilter("VALUE='Value 5'") expect = [5] tr = ogrtest.check_features_against_list(gdaltest.s_lyr, 'SKEY', expect) assert tr ############################################################################### # Check that range query that isn't currently implemented using index works. def test_ogr_index_7(): gdaltest.s_lyr.SetAttributeFilter('SKEY < 3') expect = [0, 1, 2] tr = ogrtest.check_features_against_list(gdaltest.s_lyr, 'SKEY', expect) assert tr ############################################################################### # Try join again. def test_ogr_index_8(): expect = ['Value 5', 'Value 10', 'Value 9', 'Value 4', 'Value 3', 'Value 1'] sql_lyr = gdaltest.p_ds.ExecuteSQL( 'SELECT * FROM index_p p ' + 'LEFT JOIN "join_t.dbf".join_t j ON p.PKEY = j.SKEY ') tr = ogrtest.check_features_against_list(sql_lyr, 'VALUE', expect) gdaltest.p_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Verify that dropping both indexes gets rid of them, and that results still # work. def test_ogr_index_9(): gdaltest.s_ds.ExecuteSQL('DROP INDEX ON join_t USING value') gdaltest.s_ds.ExecuteSQL('DROP INDEX ON join_t USING skey') gdaltest.s_lyr.SetAttributeFilter('SKEY = 5') expect = ['Value 5'] tr = ogrtest.check_features_against_list(gdaltest.s_lyr, 'VALUE', expect) assert tr gdaltest.s_ds.Release() # After dataset closing, check that the index files do not exist after # dropping the index for filename in ['join_t.idm', 'join_t.ind']: assert not os.path.exists(filename) # Re-create an index gdaltest.s_ds = ogr.OpenShared('join_t.dbf', update=1) gdaltest.s_ds.ExecuteSQL('CREATE INDEX ON join_t USING value') gdaltest.s_ds.Release() for filename in ['join_t.idm', 'join_t.ind']: try: os.stat(filename) except OSError: pytest.fail("%s should exist" % filename) f = open('join_t.idm', 'rt') xml = f.read() f.close() assert xml.find('VALUE') != -1, 'VALUE column is not indexed (1)' # Close the dataset and re-open gdaltest.s_ds = ogr.OpenShared('join_t.dbf', update=1) # At this point the .ind was opened in read-only. Now it # will be re-opened in read-write mode gdaltest.s_ds.ExecuteSQL('CREATE INDEX ON join_t USING skey') gdaltest.s_ds.Release() f = open('join_t.idm', 'rt') xml = f.read() f.close() assert xml.find('VALUE') != -1, 'VALUE column is not indexed (2)' assert xml.find('SKEY') != -1, 'SKEY column is not indexed (2)' ############################################################################### # Test fix for #4326 def test_ogr_index_10(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_index_10.shp') lyr = ds.CreateLayer('ogr_index_10') lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 1) feat.SetField(1, 1) feat.SetField(2, "foo") lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('create index on ogr_index_10 using intfield') ds.ExecuteSQL('create index on ogr_index_10 using realfield') lyr.SetAttributeFilter('intfield IN (1)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('intfield = 1') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('intfield IN (2)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None lyr.SetAttributeFilter('intfield IN (1.0)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('intfield = 1.0') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('intfield IN (1.1)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None lyr.SetAttributeFilter("intfield IN ('1')") lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('realfield IN (1.0)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('realfield = 1.0') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('realfield IN (1.1)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None lyr.SetAttributeFilter('realfield IN (1)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('realfield = 1') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter('realfield IN (2)') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None lyr.SetAttributeFilter("realfield IN ('1')") lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter("strfield IN ('foo')") lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter("strfield = 'foo'") lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetAttributeFilter("strfield IN ('bar')") lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None ds = None ############################################################################### # Test support for OR and AND expression def ogr_index_11_check(lyr, expected_fids): lyr.ResetReading() for expected_fid in expected_fids: feat = lyr.GetNextFeature() assert feat is not None assert feat.GetFID() == expected_fid def test_ogr_index_11(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_index_11.dbf') lyr = ds.CreateLayer('ogr_index_11', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) ogrtest.quick_create_feature(lyr, [1, "foo"], None) ogrtest.quick_create_feature(lyr, [1, "bar"], None) ogrtest.quick_create_feature(lyr, [2, "foo"], None) ogrtest.quick_create_feature(lyr, [2, "bar"], None) ogrtest.quick_create_feature(lyr, [3, "bar"], None) ds.ExecuteSQL('CREATE INDEX ON ogr_index_11 USING intfield') ds.ExecuteSQL('CREATE INDEX ON ogr_index_11 USING strfield') lyr.SetAttributeFilter("intfield = 1 OR strfield = 'bar'") ogr_index_11_check(lyr, [0, 1, 3]) lyr.SetAttributeFilter("intfield = 1 AND strfield = 'bar'") ogr_index_11_check(lyr, [1]) lyr.SetAttributeFilter("intfield = 1 AND strfield = 'foo'") ogr_index_11_check(lyr, [0]) lyr.SetAttributeFilter("intfield = 3 AND strfield = 'foo'") ogr_index_11_check(lyr, []) lyr.SetAttributeFilter("intfield IN (1, 2, 3)") ogr_index_11_check(lyr, [0, 1, 2, 3, 4]) ds = None ############################################################################### def test_ogr_index_cleanup(): try: gdaltest.p_ds.Release() except: pass gdaltest.p_ds = None gdaltest.s_ds = None gdaltest.p_lyr = None gdaltest.s_lyr = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('index_p.mif') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('join_t.dbf') for filename in ['join_t.idm', 'join_t.ind']: assert not os.path.exists(filename) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource( 'tmp/ogr_index_10.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource( 'tmp/ogr_index_11.dbf') gdalautotest-3.1.2/ogr/ogr_s57.py0000775000175000017500000003721113701060010015314 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_s57.py bd0ba53e34de9ea1dcdf3f6d7046016c7de6b353 2020-05-08 20:11:55 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR S-57 driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # Copyright (c) 2011-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import shutil import gdaltest import ogrtest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Verify we can open the test file. def test_ogr_s57_1(): gdaltest.s57_ds = None # Clear S57 options if set or our results will be messed up. if gdal.GetConfigOption('OGR_S57_OPTIONS', '') != '': gdal.SetConfigOption('OGR_S57_OPTIONS', '') gdaltest.s57_ds = ogr.Open('data/1B5X02NE.000') assert gdaltest.s57_ds is not None, 'failed to open test file.' ############################################################################### # Verify we have the set of expected layers and that some rough information # matches our expectations. def test_ogr_s57_2(): if gdaltest.s57_ds is None: pytest.skip() layer_list = [('DSID', ogr.wkbNone, 1), ('COALNE', ogr.wkbUnknown, 1), ('DEPARE', ogr.wkbUnknown, 4), ('DEPCNT', ogr.wkbUnknown, 4), ('LNDARE', ogr.wkbUnknown, 1), ('LNDELV', ogr.wkbUnknown, 2), ('SBDARE', ogr.wkbUnknown, 2), ('SLCONS', ogr.wkbUnknown, 1), ('SLOTOP', ogr.wkbUnknown, 1), ('SOUNDG', ogr.wkbMultiPoint25D, 2), ('M_COVR', ogr.wkbPolygon, 1), ('M_NSYS', ogr.wkbPolygon, 1), ('M_QUAL', ogr.wkbPolygon, 1)] assert gdaltest.s57_ds.GetLayerCount() == len(layer_list), \ 'Did not get expected number of layers, likely cannot find support files.' for i, lyr_info in enumerate(layer_list): lyr = gdaltest.s57_ds.GetLayer(i) assert lyr.GetName() == lyr_info[0], \ ('Expected layer %d to be %s but it was %s.' % (i + 1, lyr_info[0], lyr.GetName())) count = lyr.GetFeatureCount(force=1) assert count == lyr_info[2], \ ('Expected %d features in layer %s, but got %d.' % (lyr_info[2], lyr_info[0], count)) assert lyr.GetLayerDefn().GetGeomType() == lyr_info[1], \ ('Expected %d layer type in layer %s, but got %d.' % (lyr_info[1], lyr_info[0], lyr.GetLayerDefn().GetGeomType())) ############################################################################### # Check the COALNE feature. def test_ogr_s57_3(): if gdaltest.s57_ds is None: pytest.skip() feat = gdaltest.s57_ds.GetLayerByName('COALNE').GetNextFeature() assert feat is not None, 'Did not get expected COALNE feature at all.' assert feat.GetField('RCID') == 1 and feat.GetField('LNAM') == 'FFFF7F4F0FB002D3' and feat.GetField('OBJL') == 30 and feat.GetField('AGEN') == 65535, \ 'COALNE: did not get expected attributes' wkt = 'LINESTRING (60.97683400 -32.49442600,60.97718200 -32.49453800,60.97742400 -32.49477400,60.97774800 -32.49504000,60.97791600 -32.49547200,60.97793000 -32.49581800,60.97794400 -32.49617800,60.97804400 -32.49647600,60.97800200 -32.49703800,60.97800200 -32.49726600,60.97805800 -32.49749400,60.97812800 -32.49773200,60.97827000 -32.49794800,60.97910200 -32.49848600,60.97942600 -32.49866600)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Check the M_QUAL feature. def test_ogr_s57_4(): if gdaltest.s57_ds is None: pytest.skip() feat = gdaltest.s57_ds.GetLayerByName('M_QUAL').GetNextFeature() assert feat is not None, 'Did not get expected M_QUAL feature at all.' assert feat.GetField('RCID') == 15 and feat.GetField('OBJL') == 308 and feat.GetField('AGEN') == 65535, \ 'M_QUAL: did not get expected attributes' wkt = 'POLYGON ((60.97683400 -32.49534000,60.97683400 -32.49762000,60.97683400 -32.49866600,60.97869000 -32.49866600,60.97942600 -32.49866600,60.98215200 -32.49866600,60.98316600 -32.49866600,60.98316600 -32.49755800,60.98316600 -32.49477000,60.98316600 -32.49350000,60.98146800 -32.49350000,60.98029800 -32.49350000,60.97947400 -32.49350000,60.97901600 -32.49350000,60.97683400 -32.49350000,60.97683400 -32.49442600,60.97683400 -32.49469800,60.97683400 -32.49534000))' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Check the SOUNDG feature. def test_ogr_s57_5(): if gdaltest.s57_ds is None: pytest.skip() feat = gdaltest.s57_ds.GetLayerByName('SOUNDG').GetNextFeature() assert feat is not None, 'Did not get expected SOUNDG feature at all.' assert feat.GetField('RCID') == 20 and feat.GetField('OBJL') == 129 and feat.GetField('AGEN') == 65535, \ 'SOUNDG: did not get expected attributes' wkt = 'MULTIPOINT (60.98164400 -32.49449000 3.400,60.98134400 -32.49642400 1.400,60.97814200 -32.49487400 -3.200,60.98071200 -32.49519600 1.200)' assert not ogrtest.check_feature_geometry(feat, wkt) gdaltest.s57_ds = None ############################################################################### # Test reading features from dataset with some double byte attributes. (#1526) def test_ogr_s57_6(): ds = ogr.Open('data/bug1526.000') feat = ds.GetLayerByName('FOGSIG').GetNextFeature() assert feat is not None, 'Did not get expected FOGSIG feature at all.' assert feat.GetField('INFORM') == 'During South winds nautophone is not always heard in S direction from lighthouse' and len(feat.GetField('NINFOM')) >= 1, \ 'FOGSIG: did not get expected attributes' ############################################################################### # Test handling of a dataset with a multilinestring feature (#2147). def test_ogr_s57_7(): ds = ogr.Open('data/bug2147_3R7D0889.000') feat = ds.GetLayerByName('ROADWY').GetNextFeature() assert feat is not None, 'Did not get expected feature at all.' exp_wkt = 'MULTILINESTRING ((22.5659615 44.5541942,22.5652045 44.5531651,22.5654315 44.5517774,22.5663008 44.5510096,22.5656187 44.5500822,22.5654462 44.5495941,22.5637522 44.5486793,22.563408 44.5477286,22.5654087 44.5471198,22.5670327 44.5463937,22.5667729 44.5456512,22.5657613 44.544027,22.5636273 44.5411638,22.5623421 44.5400398,22.559403 44.5367489,22.5579112 44.534544,22.5566466 44.5309514,22.5563888 44.5295231,22.5549946 44.5285915,22.5541939 44.5259331,22.5526434 44.5237888),(22.5656187 44.5500822,22.5670219 44.5493519,22.5684077 44.5491452),(22.5350702 44.4918838,22.5329111 44.4935825,22.5318719 44.4964337,22.5249608 44.5027089,22.5254709 44.5031914,22.5295138 44.5052214,22.5331359 44.5077711,22.5362468 44.5092751,22.5408091 44.5115306,22.5441312 44.5127374,22.5461053 44.5132675,22.5465694 44.5149956),(22.5094658 44.4989464,22.5105135 44.4992481,22.5158217 44.4994216,22.5206067 44.4998907,22.523096 44.5009452,22.5249608 44.5027089),(22.5762962 44.4645734,22.5767653 44.4773213,22.5769802 44.4796618,22.5775485 44.4815858,22.5762434 44.4842544,22.5765836 44.4855091,22.5775087 44.4865991,22.5769145 44.4879336,22.5708196 44.4910838,22.5694028 44.4930833,22.5692354 44.4958977),(22.5763768 44.5029527,22.5799605 44.501315,22.5831172 44.5007428,22.584524 44.4999964,22.5848604 44.4999039),(22.5731362 44.5129105,22.5801378 44.5261859,22.5825748 44.5301187),(22.5093748 44.5311182,22.5107969 44.5285258,22.5108905 44.5267978,22.5076679 44.5223309))' assert not ogrtest.check_feature_geometry(feat, exp_wkt) ############################################################################### # Run test_ogrsf def test_ogr_s57_8(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/1B5X02NE.000') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test S57 to S57 conversion def test_ogr_s57_9(): gdal.Unlink('tmp/ogr_s57_9.000') gdal.SetConfigOption('OGR_S57_OPTIONS', 'RETURN_PRIMITIVES=ON,RETURN_LINKAGES=ON,LNAM_REFS=ON') ds = ogr.GetDriverByName('S57').CreateDataSource('tmp/ogr_s57_9.000') src_ds = ogr.Open('data/1B5X02NE.000') gdal.SetConfigOption('OGR_S57_OPTIONS', None) for src_lyr in src_ds: if src_lyr.GetName() == 'DSID': continue lyr = ds.GetLayerByName(src_lyr.GetName()) for src_feat in src_lyr: feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFrom(src_feat) lyr.CreateFeature(feat) src_ds = None ds = None ds = ogr.Open('tmp/ogr_s57_9.000') assert ds is not None gdaltest.s57_ds = ds test_ogr_s57_2() test_ogr_s57_3() test_ogr_s57_4() test_ogr_s57_5() gdaltest.s57_ds = None gdal.Unlink('tmp/ogr_s57_9.000') gdal.SetConfigOption('OGR_S57_OPTIONS', 'RETURN_PRIMITIVES=ON,RETURN_LINKAGES=ON,LNAM_REFS=ON') gdal.VectorTranslate('tmp/ogr_s57_9.000', 'data/1B5X02NE.000', options="-f S57 IsolatedNode ConnectedNode Edge Face M_QUAL") gdal.SetConfigOption('OGR_S57_OPTIONS', None) ds = gdal.OpenEx('tmp/ogr_s57_9.000', open_options=['RETURN_PRIMITIVES=ON']) assert ds is not None assert ds.GetLayerByName('IsolatedNode') is not None gdaltest.s57_ds = ds test_ogr_s57_4() gdaltest.s57_ds = None gdal.Unlink('tmp/ogr_s57_9.000') ############################################################################### # Test opening a fake very small S57 file def test_ogr_s57_10(): ds = ogr.Open('data/fake_s57.000') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['DSID_EXPP'] == 2 ############################################################################### # Test opening a fake very small S57 file with ISO8211 record with zero length, # using variant (C.1.5.1) logic. def test_ogr_s57_11(): ds = ogr.Open('data/fake_s57_variant_C151.000') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['DSID_EXPP'] == 2 ############################################################################### # Test decoding of Dutch inland ENCs (#3881). def test_ogr_s57_online_1(): if not gdaltest.download_file('ftp://sdg.ivs90.nl/ENC/1R5MK050.000', '1R5MK050.000'): pytest.skip() ds = ogr.Open('tmp/cache/1R5MK050.000') assert ds is not None lyr = ds.GetLayerByName('BUISGL') feat = lyr.GetNextFeature() assert feat is not None, 'Did not get expected feature at all.' exp_wkt = 'POLYGON ((5.6666667 53.0279027,5.6666667 53.0281667,5.6667012 53.0281685,5.666673 53.0282377,5.666788 53.0282616,5.6669018 53.0281507,5.6668145 53.0281138,5.6668121 53.0280649,5.6666686 53.0280248,5.6666713 53.0279647,5.6667572 53.0279713,5.6667568 53.0279089,5.6666667 53.0279027))' assert not ogrtest.check_feature_geometry(feat, exp_wkt) feat = None ds = None ############################################################################### # Test with ENC 3.0 TDS - tile without updates. def test_ogr_s57_online_2(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/s57/enctds/GB5X01SW.000', 'GB5X01SW.000'): pytest.skip() gdaltest.clean_tmp() shutil.copy('tmp/cache/GB5X01SW.000', 'tmp/GB5X01SW.000') ds = ogr.Open('tmp/GB5X01SW.000') assert ds is not None lyr = ds.GetLayerByName('LIGHTS') feat = lyr.GetFeature(542) assert feat is not None, 'Did not get expected feature at all.' assert feat.rver == 1, ('Did not get expected RVER value (%d).' % feat.rver) lyr = ds.GetLayerByName('BOYCAR') feat = lyr.GetFeature(975) assert feat is None, 'unexpected got feature id 975 before update!' feat = None ds = None ############################################################################### # Test with ENC 3.0 TDS - tile with updates. def test_ogr_s57_online_3(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/s57/enctds/GB5X01SW.001', 'GB5X01SW.001'): pytest.skip() shutil.copy('tmp/cache/GB5X01SW.001', 'tmp/GB5X01SW.001') ds = ogr.Open('tmp/GB5X01SW.000') assert ds is not None lyr = ds.GetLayerByName('LIGHTS') feat = lyr.GetFeature(542) assert feat is not None, 'Did not get expected feature at all.' assert feat.rver == 2, ('Did not get expected RVER value (%d).' % feat.rver) lyr = ds.GetLayerByName('BOYCAR') feat = lyr.GetFeature(975) assert feat is not None, ('unexpected did not get feature id 975 ' 'after update!') feat = None ds = None gdaltest.clean_tmp() ############################################################################### # Test ENC LL2 (#5048) def test_ogr_s57_online_4(): if not gdaltest.download_file('http://www1.kaiho.mlit.go.jp/KOKAI/ENC/images/sample/sample.zip', 'sample.zip'): pytest.skip() try: os.stat('tmp/cache/ENC_ROOT/JP34NC94.000') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/sample.zip') try: os.stat('tmp/cache/ENC_ROOT/JP34NC94.000') except OSError: pytest.skip() except OSError: pytest.skip() gdal.SetConfigOption('OGR_S57_OPTIONS', 'RETURN_PRIMITIVES=ON,RETURN_LINKAGES=ON,LNAM_REFS=ON,RECODE_BY_DSSI=ON') ds = ogr.Open('tmp/cache/ENC_ROOT/JP34NC94.000') gdal.SetConfigOption('OGR_S57_OPTIONS', None) lyr = ds.GetLayerByName('LNDMRK') for feat in lyr: mystr = feat.NOBJNM if mystr and sys.version_info < (3, 0, 0): mystr.decode('UTF-8').encode('UTF-8') ############################################################################### # Test updates of DSID (#2498) def test_ogr_s57_update_dsid(): ds = ogr.Open('data/s57/fake_s57_update_dsid.000') lyr = ds.GetLayerByName('DSID') f = lyr.GetNextFeature() assert f['DSID_EDTN'] == '0' assert f['DSID_UPDN'] == '1' assert f['DSID_UADT'] == '20190211' assert f['DSID_ISDT'] == '20190212' ############################################################################### # Cleanup def test_ogr_s57_cleanup(): gdaltest.s57_ds = None gdalautotest-3.1.2/ogr/ogr_kml.py0000775000175000017500000006763413701060010015475 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_kml.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: KML Driver testing. # Author: Matuesz Loskot # ############################################################################### # Copyright (c) 2007, Matuesz Loskot # Copyright (c) 2008-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest ############################################################################### # Test basic open operation for KML datastore. # def test_ogr_kml_datastore(): ogrtest.kml_ds = None ogrtest.have_read_kml = 0 ogrtest.kml_drv = None ogrtest.libkml_drv = None ogrtest.kml_drv = ogr.GetDriverByName('KML') if ogrtest.kml_drv is None: pytest.skip() ogrtest.libkml_drv = ogr.GetDriverByName('LIBKML') # Unregister LIBKML driver if present as it's behaviour is not identical # to old KML driver if ogrtest.libkml_drv is not None: print('Unregister LIBKML driver') ogrtest.libkml_drv.Deregister() ogrtest.kml_ds = ogr.Open('data/samples.kml') if ogrtest.kml_ds is not None: ogrtest.have_read_kml = 1 if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds.GetLayerCount() == 6, 'wrong number of layers' ############################################################################### # Test reading attributes for first layer (point). # def test_ogr_kml_attributes_1(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Placemarks') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Simple placemark', 'Wrong name field value' if feat.GetField('description')[:23] != 'Attached to the ground.': print('got: ', feat.GetField('description')[:23]) pytest.fail('Wrong description field value') feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' assert feat.GetField('Name') == 'Floating placemark', 'Wrong name field value' if feat.GetField('description')[:25] != 'Floats a defined distance': print('got: ', feat.GetField('description')[:25]) pytest.fail('Wrong description field value') feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' assert feat.GetField('Name') == 'Extruded placemark', 'Wrong name field value' if feat.GetField('description') != 'Tethered to the ground by a customizable \"tail\"': print('got: ', feat.GetField('description')) pytest.fail('Wrong description field value') ############################################################################### # Test reading attributes for another layer (point). # def test_ogr_kml_attributes_2(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Highlighted Icon') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Roll over this icon', 'Wrong name field value' assert feat.GetField('description') == '', 'Wrong description field value' feat = lyr.GetNextFeature() assert feat is None, 'unexpected feature found.' ############################################################################### # Test reading attributes for another layer (linestring). # def test_ogr_kml_attributes_3(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Paths') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Tessellated', 'Wrong name field value' assert feat.GetField('description') == 'If the tag has a value of 1, the line will contour to the underlying terrain', \ 'Wrong description field value' feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' assert feat.GetField('Name') == 'Untessellated', 'Wrong name field value' assert feat.GetField('description') == 'If the tag has a value of 0, the line follow a simple straight-line path from point to point', \ 'Wrong description field value' feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' ############################################################################### # Test reading attributes for another layer (polygon). # def test_ogr_kml_attributes_4(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Google Campus') feat = lyr.GetNextFeature() i = 40 while feat is not None: name = 'Building %d' % i if feat.GetField('Name') != name: print('Got: "%s"' % feat.GetField('name')) pytest.fail('Wrong name field value') assert feat.GetField('description') == '', 'Wrong description field value' i = i + 1 feat = lyr.GetNextFeature() ############################################################################### # Test reading of KML point geometry # def test_ogr_kml_point_read(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Placemarks') lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'POINT(-122.0822035425683 37.42228990140251)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POINT(-122.084075 37.4220033612141 50)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POINT(-122.0857667006183 37.42156927867553 50)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Test reading of KML linestring geometry # def test_ogr_kml_linestring_read(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Paths') lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'LINESTRING (-112.081423783034495 36.106778704771372 0, -112.087026775269294 36.0905099328766 0)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'LINESTRING (-112.080622229594994 36.106734600079953 0,-112.085242575314993 36.090495986124218 0)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'LINESTRING (-112.265654928602004 36.094476726025462 2357,-112.266038452823807 36.093426088386707 2357,-112.266813901345301 36.092510587768807 2357,-112.267782683444494 36.091898273579957 2357,-112.268855751095202 36.091313794118697 2357,-112.269481071721899 36.090367720752099 2357,-112.269526855561097 36.089321714872852 2357,-112.269014456727604 36.088509160604723 2357,-112.268152881533894 36.087538135979557 2357,-112.2670588176031 36.086826852625677 2357,-112.265737458732104 36.086463123013033 2357)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Test reading of KML polygon geometry # def test_ogr_kml_polygon_read(): if not ogrtest.have_read_kml: pytest.skip() assert ogrtest.kml_ds is not None, 'kml_ds is none' lyr = ogrtest.kml_ds.GetLayerByName('Google Campus') lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'POLYGON ((-122.084893845961204 37.422571240447859 17,-122.084958097919795 37.422119226268563 17,-122.084746957304702 37.42207183952619 17,-122.084572538096197 37.422090067296757 17,-122.084595488672306 37.422159327008949 17,-122.0838521118269 37.422272785643713 17,-122.083792243334997 37.422035391120843 17,-122.0835076656616 37.422090069571063 17,-122.083470946415204 37.422009873951609 17,-122.083122108574798 37.422104649494599 17,-122.082924737457205 37.422265039903863 17,-122.082933916938501 37.422312428430942 17,-122.083383735973698 37.422250460876178 17,-122.083360785424802 37.422341592287452 17,-122.083420455164202 37.42237075460644 17,-122.083659133885007 37.422512920110009 17,-122.083975843895203 37.422658730937812 17,-122.084237474333094 37.422651439725207 17,-122.0845036949503 37.422651438643499 17,-122.0848020460801 37.422611339163147 17,-122.084788275051494 37.422563950551208 17,-122.084893845961204 37.422571240447859 17))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POLYGON ((-122.085741277148301 37.422270331552568 17,-122.085816976848093 37.422314088323461 17,-122.085852582875006 37.422303374697442 17,-122.085879994563896 37.422256861387893 17,-122.085886010140896 37.422231107613797 17,-122.085806915728796 37.422202501738553 17,-122.085837954265301 37.42214027058678 17,-122.085673264051906 37.422086902144081 17,-122.085602292640701 37.42214885429042 17,-122.085590277843593 37.422128290487002 17,-122.085584167223701 37.422081719672462 17,-122.085485206574106 37.42210455874995 17,-122.085506726435199 37.422142679498243 17,-122.085443071291493 37.422127838461719 17,-122.085099071490404 37.42251282407603 17,-122.085676981863202 37.422818153236513 17,-122.086016227378295 37.422449188587223 17,-122.085726032700407 37.422292396042529 17,-122.085741277148301 37.422270331552568 17))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POLYGON ((-122.085786228724203 37.421362088869692 25,-122.085731299060299 37.421369359894811 25,-122.085731299291794 37.421409349109027 25,-122.085607707367899 37.421383901665649 25,-122.085580242651602 37.42137299550869 25,-122.085218622197104 37.421372995043157 25,-122.085227776563897 37.421616565082651 25,-122.085259818934702 37.421605658944031 25,-122.085259818549901 37.421682001560001 25,-122.085236931147804 37.421700178603459 25,-122.085264395782801 37.421761979825753 25,-122.085323903274599 37.421761980139067 25,-122.085355945432397 37.421852864451999 25,-122.085410875246296 37.421889218237339 25,-122.085479537935697 37.42189285337048 25,-122.085543622981902 37.421889217975462 25,-122.085626017804202 37.421860134999257 25,-122.085937287963006 37.421860134536047 25,-122.085942871866607 37.42160898590042 25,-122.085965546986102 37.421579927591438 25,-122.085864046234093 37.421471150029568 25,-122.0858548911215 37.421405713261841 25,-122.085809116276806 37.4214057134039 25,-122.085786228724203 37.421362088869692 25))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is not None, 'expected feature not found.' wkt = 'POLYGON ((-122.084437112828397 37.421772530030907 19,-122.084511885574599 37.421911115428962 19,-122.0850470999805 37.421787551215353 19,-122.085071991339106 37.421436630231611 19,-122.084916406231997 37.421372378221157 19,-122.084219386816699 37.421372378016258 19,-122.084219386589993 37.421476171614962 19,-122.083808641999099 37.4214613409357 19,-122.083789972856394 37.421313064107963 19,-122.083279653469802 37.421293288405927 19,-122.083260981920702 37.421392139442979 19,-122.082937362173695 37.421372363998763 19,-122.082906242566693 37.421515697788713 19,-122.082850226966499 37.421762825764652 19,-122.082943578863507 37.421767769696352 19,-122.083217411188002 37.421792485526858 19,-122.0835970430103 37.421748007445601 19,-122.083945555677104 37.421693642376027 19,-122.084007789463698 37.421762838158529 19,-122.084113587521003 37.421748011043917 19,-122.084076247378405 37.421713412923751 19,-122.084144704773905 37.421678815345693 19,-122.084144704222993 37.421817206601972 19,-122.084250333307395 37.421817070044597 19,-122.084437112828397 37.421772530030907 19))' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Write test def test_ogr_kml_write_1(): if ogrtest.kml_drv is None: pytest.skip() srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS72') ds = ogr.GetDriverByName('KML').CreateDataSource('tmp/kml.kml') lyr = ds.CreateLayer('test_wgs72', srs=srs) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' assert dst_feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49)', \ 'CreateFeature changed the geometry.' lyr = ds.CreateLayer('test_wgs84') dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('name', 'my_name') dst_feat.SetField('description', 'my_description') dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49 1)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 1,2 3)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 1,2 3,4 5,0 1),(0 1,2 3,4 5,0 1))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT (2 49,2 49)')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((0 1,2 3),(0 1,2 3))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 1,2 3,4 5,0 1),(0 1,2 3,4 5,0 1)),((0 1,2 3,4 5,0 1),(0 1,2 3,4 5,0 1)))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POINT (2 49 1),LINESTRING (0 1 0,2 3 0))')) assert lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' ds = None ############################################################################### # Check previous test def test_ogr_kml_check_write_1(): if not ogrtest.have_read_kml: pytest.skip() content = open('tmp/kml.kml').read() assert 'Schema' not in content, 'Did not expect Schema tags.' ds = ogr.Open('tmp/kml.kml') lyr = ds.GetLayerByName('test_wgs84') assert lyr.GetFeatureCount() == 8, 'Bad feature count.' feat = lyr.GetNextFeature() assert feat.GetField('name') == 'my_name', 'Unexpected name.' assert feat.GetField('description') == 'my_description', 'Unexpected description.' assert feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49)', 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49 1)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'LINESTRING (0 1,2 3)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POLYGON ((0 1,2 3,4 5,0 1),(0 1,2 3,4 5,0 1))', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'MULTIPOINT (2 49,2 49)', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'MULTILINESTRING ((0 1,2 3),(0 1,2 3))', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'MULTIPOLYGON (((0 1,2 3,4 5,0 1),(0 1,2 3,4 5,0 1)),((0 1,2 3,4 5,0 1),(0 1,2 3,4 5,0 1)))', \ 'Unexpected geometry.' feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'GEOMETRYCOLLECTION (POINT (2 49 1),LINESTRING (0 1 0,2 3 0))', \ 'Unexpected geometry.' ############################################################################### # Test reading attributes with XML content in them # def test_ogr_kml_xml_attributes(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/description_with_xml.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('description') != 'Description

Interesting

': print('got: ', feat.GetField('description')) pytest.fail('Wrong description field value') ############################################################################### # Test reading all geometry types (#3558) def test_ogr_kml_read_geometries(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/geometries.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() while feat is not None: feat = lyr.GetNextFeature() ############################################################################### # Run test_ogrsf def test_ogr_kml_test_ogrsf(): if not ogrtest.have_read_kml: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' --config OGR_SKIP LIBKML -ro data/samples.kml') assert not (ret.find("using driver `KML'") == -1 or ret.find('INFO') == -1 or ret.find('ERROR') != -1) ############################################################################### # Test fix for #2772 def test_ogr_kml_interleaved_writing(): ds = ogr.GetDriverByName('KML').CreateDataSource('/vsimem/ogr_kml_interleaved_writing.kml') lyr1 = ds.CreateLayer("lyr1") ds.CreateLayer("lyr2") feat = ogr.Feature(lyr1.GetLayerDefn()) with gdaltest.error_handler(): ret = lyr1.CreateFeature(feat) ds = None gdal.Unlink('/vsimem/ogr_kml_interleaved_writing.kml') # CreateFeature() should fail assert ret != 0 ############################################################################### # Test reading KML with only Placemark def test_ogr_kml_read_placemark(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/placemark.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ############################################################################### # Test reading KML without any layer def test_ogr_kml_read_empty(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/empty.kml') assert ds.GetLayerCount() == 0 ############################################################################### # Test reading KML with empty layers def test_ogr_kml_read_emptylayers(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/emptylayers.kml') assert ds.GetLayerCount() == 2 assert ds.GetLayer(0).GetFeatureCount() == 0 assert ds.GetLayer(1).GetFeatureCount() == 0 ############################################################################### def compare_output(content, expected_content): content_lines = content.strip().split('\n') expected_lines = expected_content.strip().split('\n') assert len(content_lines) == len(expected_lines), content for i, content_line in enumerate(content_lines): assert content_line.strip() == expected_lines[i].strip(), content ############################################################################### # Test that we can write a schema def test_ogr_kml_write_schema(): ds = ogr.GetDriverByName('KML').CreateDataSource('/vsimem/ogr_kml_write_schema.kml') lyr = ds.CreateLayer("lyr") lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('strfield', 'strfield_val') feat.SetField('intfield', '1') feat.SetField('realfield', '2.34') lyr.CreateFeature(feat) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_kml_write_schema.kml', 'rb') content = gdal.VSIFReadL(1, 1000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_kml_write_schema.kml') expected_content = """ lyr strfield_val 1 2.34 """ return compare_output(content, expected_content) ############################################################################### # def test_ogr_kml_empty_layer(): ds = ogr.GetDriverByName('KML').CreateDataSource('/vsimem/ogr_kml_empty_layer.kml') ds.CreateLayer("empty") ds = None f = gdal.VSIFOpenL('/vsimem/ogr_kml_empty_layer.kml', 'rb') content = gdal.VSIFReadL(1, 1000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_kml_empty_layer.kml') expected_content = """ empty """ return compare_output(content, expected_content) ############################################################################### # Empty layer followed by regular layer def test_ogr_kml_two_layers(): ds = ogr.GetDriverByName('KML').CreateDataSource('/vsimem/ogr_kml_two_layers.kml') ds.CreateLayer("empty") lyr = ds.CreateLayer("lyr") lyr.CreateField(ogr.FieldDefn("foo", ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("foo", "bar") lyr.CreateFeature(feat) ds = None f = gdal.VSIFOpenL('/vsimem/ogr_kml_two_layers.kml', 'rb') content = gdal.VSIFReadL(1, 1000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/ogr_kml_two_layers.kml') # FIXME: the schema for lyr should be written before the first Folter for XML compliance expected_content = """ empty lyr bar """ return compare_output(content, expected_content) ############################################################################### # Cleanup def test_ogr_kml_cleanup(): os.remove('tmp/kml.kml') if not ogrtest.have_read_kml: pytest.skip() if ogrtest.kml_ds is not None: ogrtest.kml_ds = None # Re-register LIBKML driver if necessary if ogrtest.libkml_drv is not None: print('Re-register LIBKML driver') ogrtest.libkml_drv.Register() ############################################################################### # Test reading KML with folder with empty subfolder and placemark def test_ogr_kml_read_folder_with_subfolder_placemark(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/folder_with_subfolder_placemark.kml') assert ds.GetLayerCount() == 1 assert ds.GetLayer(0).GetFeatureCount() == 0 ############################################################################### # Test reading invalid KML (#6878) def test_ogr_kml_read_truncated(): if not ogrtest.have_read_kml: pytest.skip() with gdaltest.error_handler(): ds = ogr.Open('data/truncated.kml') assert ds is None ############################################################################### # Test fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1591 def test_ogr_kml_read_weird_empty_folders(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/weird_empty_folders.kml') assert ds.GetLayerCount() == 1 assert ds.GetLayer(0).GetFeatureCount() == 0 ############################################################################### # Test fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1683 def test_ogr_kml_read_junk_content_after_valid_doc(): if not ogrtest.have_read_kml: pytest.skip() with gdaltest.error_handler(): ds = ogr.Open('data/junk_content_after_valid_doc.kml') assert ds is None ############################################################################### # Test reading KML with kml: prefix def test_ogr_kml_read_placemark_with_kml_prefix(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/placemark_with_kml_prefix.kml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ############################################################################### # Test reading KML with duplicated folder name def test_ogr_kml_read_duplicate_folder_name(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/duplicate_folder_name.kml') lyr = ds.GetLayer(0) assert lyr.GetName() == 'layer' lyr = ds.GetLayer(1) assert lyr.GetName() == 'layer (#2)' ############################################################################### # Test reading KML with a placemark in root document, and a subfolder (#7221) def test_ogr_kml_read_placemark_in_root_and_subfolder(): if not ogrtest.have_read_kml: pytest.skip() ds = ogr.Open('data/placemark_in_root_and_subfolder.kml') lyr = ds.GetLayerByName('TopLevel') assert lyr is not None assert lyr.GetFeatureCount() == 1 lyr = ds.GetLayerByName('SubFolder1') assert lyr is not None assert lyr.GetFeatureCount() == 1 ############################################################################### # Build tests runner gdalautotest-3.1.2/ogr/ogr_virtualogr.py0000775000175000017500000002600213701060010017070 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_virtualogr.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: VirtualOGR testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2012-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import ogr from osgeo import gdal import gdaltest import pytest # Linter says this isn't used, but it actually is via pytest magic :) from ogr.ogr_sql_sqlite import require_ogr_sql_sqlite # noqa require_ogr_sql_sqlite; # to make pyflakes happy ############################################################################### pytestmark = pytest.mark.usefixtures('require_ogr_sql_sqlite') def ogr_virtualogr_run_sql(sql_statement): ds = ogr.GetDriverByName('SQLite').CreateDataSource(':memory:') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL(sql_statement) gdal.PopErrorHandler() success = gdal.GetLastErrorMsg() == '' ds.ReleaseResultSet(sql_lyr) ds = None if not success: return success ds = ogr.GetDriverByName('Memory').CreateDataSource('') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL(sql_statement, dialect='SQLITE') gdal.PopErrorHandler() success = gdal.GetLastErrorMsg() == '' ds.ReleaseResultSet(sql_lyr) ds = None return success ############################################################################### # Basic tests def test_ogr_virtualogr_1(): # Invalid syntax assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR()") # Nonexistent dataset assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('foo')") # Dataset with 0 layer assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('')") # Dataset with more than 1 layer assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data')") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp')") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0)") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 1)") # Invalid value for update_mode assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 'foo')") # Nonexistent layer assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0, 'foo')") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0, 'poly')") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0, 'poly', 0)") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0, 'poly', 1)") assert ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0, 'poly', 1, 1)") # Too many arguments assert not ogr_virtualogr_run_sql("CREATE VIRTUAL TABLE poly USING VirtualOGR('data/poly.shp', 0, 'poly', 1, 1, bla)") ############################################################################### # Test detection of suspicious use of VirtualOGR def test_ogr_virtualogr_2(): ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_virtualogr_2.db') ds.ExecuteSQL("CREATE VIRTUAL TABLE foo USING VirtualOGR('data/poly.shp')") ds.ExecuteSQL("CREATE TABLE spy_table (spy_content VARCHAR)") ds.ExecuteSQL("CREATE TABLE regular_table (bar VARCHAR)") ds = None # Check that foo isn't listed ds = ogr.Open('/vsimem/ogr_virtualogr_2.db') for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() != 'foo' ds = None # Check that it is listed if OGR_SQLITE_LIST_VIRTUAL_OGR=YES gdal.SetConfigOption('OGR_SQLITE_LIST_VIRTUAL_OGR', 'YES') ds = ogr.Open('/vsimem/ogr_virtualogr_2.db') gdal.SetConfigOption('OGR_SQLITE_LIST_VIRTUAL_OGR', None) found = False for i in range(ds.GetLayerCount()): if ds.GetLayer(i).GetName() == 'foo': found = True assert found ds = None # Add suspicious trigger ds = ogr.Open('/vsimem/ogr_virtualogr_2.db', update=1) ds.ExecuteSQL("CREATE TRIGGER spy_trigger INSERT ON regular_table BEGIN " + "INSERT OR REPLACE INTO spy_table (spy_content) " + "SELECT OGR_STYLE FROM foo; END;") ds = None gdal.ErrorReset() ds = ogr.Open('/vsimem/ogr_virtualogr_2.db') for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() != 'foo' # An error will be triggered at the time the trigger is used gdal.PushErrorHandler('CPLQuietErrorHandler') ds.ExecuteSQL("INSERT INTO regular_table (bar) VALUES ('bar')") gdal.PopErrorHandler() did_not_get_error = gdal.GetLastErrorMsg() == '' ds = None if did_not_get_error: gdal.Unlink('/vsimem/ogr_virtualogr_2.db') pytest.fail('expected a failure') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') gdal.SetConfigOption('OGR_SQLITE_LIST_VIRTUAL_OGR', 'YES') ds = ogr.Open('/vsimem/ogr_virtualogr_2.db') gdal.SetConfigOption('OGR_SQLITE_LIST_VIRTUAL_OGR', None) gdal.PopErrorHandler() if gdal.GetLastErrorMsg() == '': ds = None gdal.Unlink('/vsimem/ogr_virtualogr_2.db') pytest.fail('expected an error message') did_not_get_error = gdal.GetLastErrorMsg() == '' ds = None gdal.Unlink('/vsimem/ogr_virtualogr_2.db') assert not did_not_get_error, 'expected a failure' ############################################################################### # Test GDAL as a SQLite3 dynamically loaded extension def test_ogr_virtualogr_3(): # Find path of libgdal libgdal_name = gdaltest.find_lib('gdal') if libgdal_name is None: pytest.skip() print('Found ' + libgdal_name) # Find path of libsqlite3 or libspatialite libsqlite_name = gdaltest.find_lib('sqlite3') if libsqlite_name is None: libsqlite_name = gdaltest.find_lib('spatialite') if libsqlite_name is None: pytest.skip() print('Found ' + libsqlite_name) python_exe = sys.executable if sys.platform == 'win32': python_exe = python_exe.replace('\\', '/') libgdal_name = libgdal_name.replace('\\', '/') libsqlite_name = libsqlite_name.replace('\\', '/') ret = gdaltest.runexternal(python_exe + ' ogr_as_sqlite_extension.py "%s" "%s"' % (libsqlite_name, libgdal_name), check_memleak=False) if ret.startswith('skip'): pytest.skip() assert gdal.VersionInfo('RELEASE_NAME') in ret ############################################################################### # Test ogr_datasource_load_layers() def test_ogr_virtualogr_4(): ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_virtualogr_4.db') sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('data/poly.shp')") ds.ReleaseResultSet(sql_lyr) gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('data/poly.shp')") gdal.PopErrorHandler() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT * FROM poly') ret = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_virtualogr_4.db') assert ret == 10 ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_virtualogr_4.db') sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('data/poly.shp', 0)") ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT * FROM poly') ret = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_virtualogr_4.db') assert ret == 10 ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_virtualogr_4.db') sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('data/poly.shp', 0, 'prefix')") ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT * FROM prefix_poly') ret = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_virtualogr_4.db') assert ret == 10 # Various error conditions ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_virtualogr_4.db') gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers(0)") ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('foo')") ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('data/poly.shp','a')") ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT ogr_datasource_load_layers('data/poly.shp', 0, 0)") ds.ReleaseResultSet(sql_lyr) gdal.PopErrorHandler() ds = None gdal.Unlink('/vsimem/ogr_virtualogr_4.db') ############################################################################### # Test failed CREATE VIRTUAL TABLE USING VirtualOGR def test_ogr_virtualogr_5(): # Create a CSV with duplicate column name fp = gdal.VSIFOpenL('/vsimem/ogr_virtualogr_5.csv', 'wt') line = 'foo,foo\n' gdal.VSIFWriteL(line, 1, len(line), fp) line = 'bar,baz\n' gdal.VSIFWriteL(line, 1, len(line), fp) gdal.VSIFCloseL(fp) ds = ogr.GetDriverByName('Memory').CreateDataSource('') gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL("CREATE VIRTUAL TABLE lyr2 USING VirtualOGR('/vsimem/ogr_virtualogr_5.csv')", dialect='SQLITE') gdal.PopErrorHandler() assert sql_lyr is None ds = None gdal.Unlink('/vsimem/ogr_virtualogr_5.csv') gdalautotest-3.1.2/ogr/ogr_mvt.py0000775000175000017500000016305013701060010015505 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_mvt.py e5192a81937c9dfeb23c5f95db190cdae0a5c3df 2020-05-17 19:21:08 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR MVT driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2018, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import json import gdaltest import ogrtest import webserver from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### def test_ogr_mvt_datatypes(): # With metadata.json ds = ogr.Open('data/mvt/datatypes/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['bool_false'] != 0 or \ f['bool_true'] != 1 or \ f['pos_int_value'] != 1 or \ f['pos_int64_value'] != 123456789012345 or \ f['neg_int_value'] != -1 or \ f['neg_int64_value'] != -123456789012345 or \ f['pos_sint_value'] != 1 or \ f['pos_sint64_value'] != 123456789012345 or \ f['neg_sint_value'] != -1 or \ f['neg_sint64_value'] != -123456789012345 or \ f['uint_value'] != 2000000000 or \ f['uint64_value'] != 4000000000 or \ f['float_value'] != 1.25 or \ f['real_value'] != 1.23456789 or \ f['string_value'] != 'str': f.DumpReadable() pytest.fail() # Without metadata.json ds = gdal.OpenEx('data/mvt/datatypes/0/0/0.pbf', open_options=['METADATA_FILE=']) lyr = ds.GetLayer(0) count = lyr.GetLayerDefn().GetFieldCount() assert count == 16 tab = [] for i in range(lyr.GetLayerDefn().GetFieldCount()): fld_defn = lyr.GetLayerDefn().GetFieldDefn(i) tab += [(fld_defn.GetName(), fld_defn.GetType(), fld_defn.GetSubType())] expected_tab = [ ('mvt_id', ogr.OFTInteger64, ogr.OFSTNone), ('bool_true', ogr.OFTInteger, ogr.OFSTBoolean), ('bool_false', ogr.OFTInteger, ogr.OFSTBoolean), ('pos_int_value', ogr.OFTInteger, ogr.OFSTNone), ('pos_int64_value', ogr.OFTInteger64, ogr.OFSTNone), ('neg_int_value', ogr.OFTInteger, ogr.OFSTNone), ('neg_int64_value', ogr.OFTInteger64, ogr.OFSTNone), ('pos_sint_value', ogr.OFTInteger, ogr.OFSTNone), ('pos_sint64_value', ogr.OFTInteger64, ogr.OFSTNone), ('neg_sint_value', ogr.OFTInteger, ogr.OFSTNone), ('neg_sint64_value', ogr.OFTInteger64, ogr.OFSTNone), ('uint_value', ogr.OFTInteger, ogr.OFSTNone), ('uint64_value', ogr.OFTInteger64, ogr.OFSTNone), ('float_value', ogr.OFTReal, ogr.OFSTFloat32), ('real_value', ogr.OFTReal, ogr.OFSTNone), ('string_value', ogr.OFTString, ogr.OFSTNone), ] assert tab == expected_tab f = lyr.GetNextFeature() if f['bool_false'] != 0 or \ f['bool_true'] != 1 or \ f['pos_int_value'] != 1 or \ f['pos_int64_value'] != 123456789012345 or \ f['neg_int_value'] != -1 or \ f['neg_int64_value'] != -123456789012345 or \ f['pos_sint_value'] != 1 or \ f['pos_sint64_value'] != 123456789012345 or \ f['neg_sint_value'] != -1 or \ f['neg_sint64_value'] != -123456789012345 or \ f['uint_value'] != 2000000000 or \ f['uint64_value'] != 4000000000 or \ f['float_value'] != 1.25 or \ f['real_value'] != 1.23456789 or \ f['string_value'] != 'str': f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_datatype_promotion(): ds = ogr.Open('data/mvt/datatype_promotion.pbf') tab = [('int_to_int64', ogr.OFTInteger64), ('int_to_real', ogr.OFTReal), ('int64_to_real', ogr.OFTReal), ('bool_to_int', ogr.OFTInteger), ('bool_to_str', ogr.OFTString), ('float_to_double', ogr.OFTReal)] for layer_name, dt in tab: lyr = ds.GetLayerByName(layer_name) fld_defn = lyr.GetLayerDefn().GetFieldDefn(1) assert fld_defn.GetType() == dt, layer_name assert fld_defn.GetSubType() == ogr.OFSTNone, layer_name ############################################################################### def test_ogr_mvt_limit_cases(): with gdaltest.error_handler(): ds = ogr.Open('data/mvt/limit_cases.pbf') lyr = ds.GetLayerByName('empty') assert lyr.GetFeatureCount() == 0 lyr = ds.GetLayerByName('layer1') assert lyr.GetFeatureCount() == 7 f = lyr.GetFeature(1) assert f['mvt_id'] == 1 with gdaltest.error_handler(): f = lyr.GetFeature(6) assert f['b'] == 1 lyr = ds.GetLayerByName('layer2') assert lyr.GetFeatureCount() == 0 lyr = ds.GetLayerByName('layer3') assert lyr.GetFeatureCount() == 0 lyr = ds.GetLayerByName('layer4') assert lyr.GetFeatureCount() == 0 lyr = ds.GetLayerByName('layer5') assert lyr.GetFeatureCount() == 1 f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (2070 2690)' ############################################################################### def test_ogr_mvt_with_extension_fields(): ds = ogr.Open('data/mvt/with_extension_fields.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (2070 2690,2082 2707)') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_mixed(): ds = ogr.Open('data/mvt/mixed/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOINT ((215246.671651058 6281289.23636264),(332653.947097085 6447616.20991119))') != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (215246.671651058 6281289.23636264,332653.947097085 6447616.20991119)') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_linestring(): ds = ogr.Open('data/mvt/linestring/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((215246.671651058 6281289.23636264,332653.947097085 6447616.20991119))') != 0: f.DumpReadable() pytest.fail() ds = gdal.OpenEx('data/mvt/linestring/0/0/0.pbf', open_options=['METADATA_FILE=']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (215246.671651058 6281289.23636264,332653.947097085 6447616.20991119)') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_multilinestring(): ds = ogr.Open('data/mvt/multilinestring/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((215246.671651058 6281289.23636264,332653.947097085 6447616.20991119),(440277.282922614 6623727.12308023,547900.618748143 6809621.97586978),(665307.894194175 6985732.88903883,772931.230019704 7171627.74182838))') != 0: f.DumpReadable() pytest.fail() ds = gdal.OpenEx('data/mvt/multilinestring/0/0/0.pbf', open_options=['METADATA_FILE=']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTILINESTRING ((215246.671651058 6281289.23636264,332653.947097085 6447616.20991119),(440277.282922614 6623727.12308023,547900.618748143 6809621.97586978),(665307.894194175 6985732.88903883,772931.230019704 7171627.74182838))') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_polygon(): ds = ogr.Open('data/mvt/polygon/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOLYGON (((332653.947097085 6447616.20991119,332653.947097085 6281289.23636264,215246.671651058 6281289.23636264,215246.671651058 6447616.20991119,332653.947097085 6447616.20991119)))') != 0: f.DumpReadable() pytest.fail() ds = gdal.OpenEx('data/mvt/polygon/0/0/0.pbf', open_options=['METADATA_FILE=']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POLYGON ((332653.947097085 6447616.20991119,332653.947097085 6281289.23636264,215246.671651058 6281289.23636264,215246.671651058 6447616.20991119,332653.947097085 6447616.20991119))') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_point_polygon(): ds = ogr.Open('data/mvt/point_polygon/0') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOINT ((215246.671651058 6281289.23636264))') != 0: f.DumpReadable() pytest.fail() lyr = ds.GetLayer(1) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOLYGON (((440277.282922614 450061.222543117,440277.282922614 -440277.282922614,0.0 -440277.282922614,0.0 -215246.671651058,215246.671651058 -215246.671651058,215246.671651058 225030.61127156,0.0 225030.61127156,0.0 450061.222543117,440277.282922614 450061.222543117)),((0.0 117407.275446031,0.0 -107623.335825529,-117407.275446031 -107623.335825529,-117407.275446031 117407.275446031,0.0 117407.275446031)),((107623.335825529 58703.6377230138,107623.335825529 -48919.6981025115,48919.6981025115 -48919.6981025115,48919.6981025115 58703.6377230138,107623.335825529 58703.6377230138)))') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_point_polygon_clip(): if not ogrtest.have_geos() or gdal.GetConfigOption('OGR_MVT_CLIP') is not None: pytest.skip() ds = ogr.Open('data/mvt/point_polygon/1') lyr = ds.GetLayer(1) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOLYGON (((0.0 112515.30563578,0 0,-112515.30563578 0.0,-112515.30563578 112515.30563578,0.0 112515.30563578)))') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_tileset_without_readdir(): with gdaltest.config_option('MVT_USE_READDIR', 'NO'): ds = gdal.OpenEx('data/mvt/linestring/0') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_mvt_tileset_tilegl(): ds = ogr.Open('data/mvt/linestring_tilejson_gl/0') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_mvt_tileset_without_metadata_file(): ds = gdal.OpenEx('data/mvt/point_polygon/1', open_options=['METADATA_FILE=', 'CLIP=NO']) lyr = ds.GetLayerByName('point') assert lyr.GetGeomType() == ogr.wkbMultiPoint lyr = ds.GetLayerByName('polygon2') assert lyr.GetGeomType() == ogr.wkbMultiPolygon assert lyr.GetLayerDefn().GetFieldCount() == 2 ############################################################################### def test_ogr_mvt_tileset_json_field(): ds = gdal.OpenEx('data/mvt/datatypes/0', open_options=['METADATA_FILE=', 'JSON_FIELD=YES', 'CLIP=NO']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 f = lyr.GetNextFeature() d = json.loads(f.GetFieldAsString("json")) assert (d == { "bool_true": True, "bool_false": False, "pos_int_value": 1, "pos_int64_value": 123456789012345, "neg_int_value": -1, "neg_int64_value": -123456789012345, "pos_sint_value": 1, "pos_sint64_value": 123456789012345, "neg_sint_value": -1, "neg_sint64_value": -123456789012345, "uint_value": 2000000000, "uint64_value": 4000000000, "float_value": 1.25, "real_value": 1.23456789, "string_value": "str" }), f.GetFieldAsString("json") ############################################################################### def test_ogr_mvt_open_variants(): expected_geom = 'MULTILINESTRING ((215246.671651058 6281289.23636264,332653.947097085 6447616.20991119))' ds = ogr.Open('MVT:data/mvt/linestring/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, expected_geom) != 0: f.DumpReadable() pytest.fail() ds = ogr.Open('MVT:data/mvt/linestring/0') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, expected_geom) != 0: f.DumpReadable() pytest.fail() ds = ogr.Open('/vsigzip/data/mvt/linestring/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, expected_geom) != 0: f.DumpReadable() pytest.fail() ds = ogr.Open('MVT:/vsigzip/data/mvt/linestring/0/0/0.pbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, expected_geom) != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_xyz_options(): ds = gdal.OpenEx('data/mvt/datatypes/0/0/0.pbf', open_options=['X=1', 'Y=2', 'Z=3']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'POINT (-12496536.8802869 8299226.7830913)') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_test_ogrsf_pbf(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/mvt/datatypes/0/0/0.pbf') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### def test_ogr_mvt_test_ogrsf_directory(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/mvt/datatypes/0') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### def test_ogr_mvt_mbtiles(): if ogr.GetDriverByName('MBTILES') is None: pytest.skip() ds = ogr.Open('data/mvt/point_polygon.mbtiles') lyr = ds.GetLayerByName('point') f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOINT ((220138.641461308 6276397.26655239))') != 0: f.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(0, 0, 10000000, 10000000) lyr.ResetReading() f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'MULTIPOINT ((220138.641461308 6276397.26655239))') != 0: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_mvt_mbtiles_json_field(): if ogr.GetDriverByName('MBTILES') is None: pytest.skip() ds = gdal.OpenEx('data/mvt/datatypes.mbtiles', open_options=['JSON_FIELD=YES', 'CLIP=NO']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 f = lyr.GetNextFeature() d = json.loads(f.GetFieldAsString("json")) assert (d == {'int64_value': 123456789012345, 'string_value': 'str', 'real_value': 1.23456789, 'bool_false': False, 'pos_int_value': 1, 'neg_int_value': -1, 'bool_true': True, 'float_value': 1.25 }), f.GetFieldAsString("json") ############################################################################### def test_ogr_mvt_mbtiles_json_field_auto(): if ogr.GetDriverByName('MBTILES') is None: pytest.skip() ds = gdal.OpenEx('data/mvt/datatypes_json_field_auto.mbtiles', open_options=['CLIP=NO']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 f = lyr.GetNextFeature() d = json.loads(f.GetFieldAsString("json")) assert (d == {'int64_value': 123456789012345, 'string_value': 'str', 'real_value': 1.23456789, 'bool_false': False, 'pos_int_value': 1, 'neg_int_value': -1, 'bool_true': True, 'float_value': 1.25 }), f.GetFieldAsString("json") ############################################################################### def test_ogr_mvt_mbtiles_test_ogrsf(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() if ogr.GetDriverByName('MBTILES') is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/mvt/point_polygon.mbtiles polygon2') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### def test_ogr_mvt_mbtiles_open_vector_in_raster_mode(): if ogr.GetDriverByName('MBTILES') is None: pytest.skip() ds = gdal.OpenEx('data/mvt/datatypes.mbtiles', gdal.OF_RASTER) assert ds is None ############################################################################### def test_ogr_mvt_x_y_z_filename_scheme(): tmpfilename = '/vsimem/0-0-0.pbf' gdal.FileFromMemBuffer(tmpfilename, open('data/mvt/linestring/0/0/0.pbf', 'rb').read()) ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f, 'LINESTRING (215246.671651058 6281289.23636264,332653.947097085 6447616.20991119)') != 0: f.DumpReadable() pytest.fail() ds = None gdal.Unlink(tmpfilename) ############################################################################### def test_ogr_mvt_polygon_larger_than_header(): ds = gdal.OpenEx('data/mvt/polygon_larger_than_header.pbf', open_options=['CLIP=NO']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_mvt_errors(): assert ogr.Open('MVT:/i_do_not/exist') is None # Cannot detect Z in directory name assert ogr.Open('MVT:data') is None # Invalid Z gdal.Mkdir('/vsimem/33', 0) assert ogr.Open('MVT:/vsimem/33') is None gdal.Rmdir('/vsimem/33') # Inexisting metadata with gdaltest.error_handler(): assert (gdal.OpenEx('data/mvt/linestring/0/0/0.pbf', open_options=['METADATA_FILE=/i_do_not/exist']) is not None) # Invalid metadata with gdaltest.error_handler(): assert (gdal.OpenEx('data/mvt/linestring/0/0/0.pbf', open_options=['METADATA_FILE=ogr_mvt.py']) is not None) # Invalid metadata gdal.FileFromMemBuffer('/vsimem/my.json', '{}') with gdaltest.error_handler(): assert (gdal.OpenEx('data/mvt/linestring/0/0/0.pbf', open_options=['METADATA_FILE=/vsimem/my.json']) is not None) gdal.Unlink('/vsimem/my.json') # Invalid metadata gdal.FileFromMemBuffer('/vsimem/my.json', '{ "json": "x y" }') with gdaltest.error_handler(): assert (gdal.OpenEx('data/mvt/linestring/0/0/0.pbf', open_options=['METADATA_FILE=/vsimem/my.json']) is not None) gdal.Unlink('/vsimem/my.json') # Too big file tmpfilename = '/vsimem/foo.pbf' gdal.FileFromMemBuffer(tmpfilename, open('data/mvt/polygon_larger_than_header.pbf', 'rb').read()) f = gdal.VSIFOpenL(tmpfilename, 'rb+') gdal.VSIFSeekL(f, 20 * 1024 * 1024, 0) gdal.VSIFWriteL(' ', 1, 1, f) gdal.VSIFCloseL(f) ds = ogr.Open(tmpfilename) gdal.Unlink(tmpfilename) assert ds is None ############################################################################### def test_ogr_mvt_http_start(): gdaltest.webserver_process = None gdaltest.webserver_port = 0 if not gdaltest.built_against_curl(): pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() ############################################################################### def test_ogr_mvt_http(): if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/linestring/metadata.json', 200, {}, open('data/mvt/linestring/metadata.json', 'rb').read()) handler.add('GET', '/linestring/0/0/0.pbf', 200, {}, open('data/mvt/linestring/0/0/0.pbf', 'rb').read()) handler.add('GET', '/linestring/0/0/0.pbf', 200, {}, open('data/mvt/linestring/0/0/0.pbf', 'rb').read()) with webserver.install_http_handler(handler): ds = ogr.Open('MVT:http://127.0.0.1:%d/linestring/0' % gdaltest.webserver_port) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None # No metadata file nor tile handler = webserver.SequentialHandler() handler.add('GET', '/linestring/metadata.json', 404, {}) handler.add('GET', '/linestring.json', 404, {}) handler.add('GET', '/linestring/0/0/0.pbf', 404, {}) with webserver.install_http_handler(handler): with gdaltest.error_handler(): ds = ogr.Open('MVT:http://127.0.0.1:%d/linestring/0' % gdaltest.webserver_port) assert ds is None # No metadata file, but tiles handler = webserver.SequentialHandler() handler.add('GET', '/linestring/metadata.json', 404, {}) handler.add('GET', '/linestring.json', 404, {}) handler.add('GET', '/linestring/0/0/0.pbf', 200, {}, open('data/mvt/linestring/0/0/0.pbf', 'rb').read()) handler.add('GET', '/linestring/0/0/0.pbf', 200, {}, open('data/mvt/linestring/0/0/0.pbf', 'rb').read()) with webserver.install_http_handler(handler): ds = ogr.Open('MVT:http://127.0.0.1:%d/linestring/0' % gdaltest.webserver_port) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None # metadata.json file, but no tiles handler = webserver.SequentialHandler() handler.add('GET', '/linestring/metadata.json', 200, {}, open('data/mvt/linestring/metadata.json', 'rb').read()) handler.add('GET', '/linestring/0/0/0.pbf', 404, {}) handler.add('GET', '/linestring/0/0/0.pbf', 404, {}) with webserver.install_http_handler(handler): ds = ogr.Open('MVT:http://127.0.0.1:%d/linestring/0' % gdaltest.webserver_port) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is None # No metadata.json file, but a linestring.json and no tiles handler = webserver.SequentialHandler() handler.add('GET', '/linestring/metadata.json', 404, {}) handler.add('GET', '/linestring.json', 200, {}, open('data/mvt/linestring/metadata.json', 'rb').read()) handler.add('GET', '/linestring/0/0/0.pbf', 404, {}) handler.add('GET', '/linestring/0/0/0.pbf', 404, {}) with webserver.install_http_handler(handler): ds = ogr.Open('MVT:http://127.0.0.1:%d/linestring/0' % gdaltest.webserver_port) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is None # Open pbf file handler = webserver.SequentialHandler() handler.add('GET', '/linestring/0/0/0.pbf', 200, {}, open('data/mvt/linestring/0/0/0.pbf', 'rb').read()) with webserver.install_http_handler(handler): ds = ogr.Open('MVT:http://127.0.0.1:%d/linestring/0/0/0.pbf' % gdaltest.webserver_port) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_mvt_http_stop(): if gdaltest.webserver_port == 0: pytest.skip() webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### def test_ogr_mvt_write_one_layer(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64field', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('datefield', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('datetimefield', ogr.OFTDateTime)) boolfield = ogr.FieldDefn('boolfield', ogr.OFTInteger) boolfield.SetSubType(ogr.OFSTBoolean) lyr.CreateField(boolfield) # Test empty layer: OK with gdaltest.error_handler(): out_ds = gdal.VectorTranslate('/vsimem/outmvt', src_ds, format='MVT') assert out_ds is not None # Cannot create directory with gdaltest.error_handler(): out_ds = gdal.VectorTranslate('/i_dont/exist/outmvt', src_ds, format='MVT') assert out_ds is None # Directory already exists with gdaltest.error_handler(): out_ds = gdal.VectorTranslate('/vsimem/outmvt', src_ds, format='MVT') assert out_ds is None gdal.RmdirRecursive('/vsimem/outmvt') f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(123) f['strfield'] = 'foo' f['intfield'] = -1 f['int64field'] = 123456789012345 f['realfield'] = 1.25 f['datefield'] = '2018/02/01' f['datetimefield'] = '2018/02/01 12:34:56' f['boolfield'] = True f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 1000000)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(124) f['strfield'] = 'foo' f['intfield'] = -1 f['int64field'] = 123456789012345 f['realfield'] = 1.25 f['datefield'] = '2018/02/01' f['datetimefield'] = '2018/02/01 12:34:56' f['boolfield'] = True f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(500000 1000000,510000 1010000,520000 1020000)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(125) f['strfield'] = 'foobarbazbaw' f['intfield'] = 1 f['int64field'] = -123456789012345 f['realfield'] = -1.25678 f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((500000 1000000,510000 1000000,510000 1010000,500000 1000000))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(126) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(500000 1000000,510000 1010000)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(127) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((500000 1000000,510000 1010000),(510000 1010000,510000 1000000))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(128) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((500000 1000000,510000 1000000,510000 1010000,500000 1000000)),((-500000 1000000,-510000 1000000,-510000 1010000,-500000 1000000),(-502000 1001000,-509000 1001000,-509000 1008500,-502000 1001000)))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(129) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(500000 1000000),LINESTRING(500000 1000000,510000 1010000,520000 1020000))')) lyr.CreateFeature(f) with gdaltest.error_handler(): out_ds = gdal.VectorTranslate('/vsimem/outmvt', src_ds, options='-f MVT -preserve_fid') assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/outmvt/0') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if out_f['mvt_id'] != 123 or \ out_f['strfield'] != 'foo' or \ out_f['intfield'] != -1 or \ out_f['int64field'] != 123456789012345 or \ out_f['realfield'] != 1.25 or \ out_f['datefield'] != '2018-02-01' or \ out_f['datetimefield'] != '2018-02-01T12:34:56' or \ out_f['boolfield'] is False or \ ogrtest.check_feature_geometry(out_f, 'POINT (498980.920645632 997961.84129126)') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if out_f['strfield'] != 'foo' or \ out_f['intfield'] != -1 or \ out_f['int64field'] != 123456789012345 or \ out_f['realfield'] != 1.25 or \ out_f['datefield'] != '2018-02-01' or \ out_f['datetimefield'] != '2018-02-01T12:34:56' or \ out_f['boolfield'] is False or \ ogrtest.check_feature_geometry(out_f, 'MULTILINESTRING ((498980.920645632 997961.84129126,508764.860266134 1007745.78091176,518548.799886636 1017529.72053226))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if out_f['strfield'] != 'foobarbazbaw' or \ out_f['intfield'] != 1 or \ out_f['int64field'] != -123456789012345 or \ out_f['realfield'] != -1.25678 or \ out_f.IsFieldSet('datefield') or \ out_f.IsFieldSet('datetimefield') or \ out_f.IsFieldSet('boolfield') or \ ogrtest.check_feature_geometry(out_f, 'POLYGON ((498980.920645632 997961.84129126,508764.860266134 1007745.78091176,508764.860266134 997961.84129126,498980.920645632 997961.84129126))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOINT ((498980.920645632 997961.84129126),(508764.860266134 1007745.78091176))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTILINESTRING ((498980.920645632 997961.84129126,508764.860266134 1007745.78091176),(508764.860266134 1007745.78091176,508764.860266134 997961.84129126))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOLYGON (((498980.920645632 997961.84129126,508764.860266134 1007745.78091176,508764.860266134 997961.84129126,498980.920645632 997961.84129126)),((-498980.920645632 997961.84129126,-508764.860266134 997961.84129126,-508764.860266134 1007745.78091176,-498980.920645632 997961.84129126)))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if (out_f.GetGeometryRef().GetGeometryType() == ogr.wkbPoint and ogrtest.check_feature_geometry(out_f, 'POINT (498980.920645632 997961.84129126)') != 0) or \ (out_f.GetGeometryRef().GetGeometryType() == ogr.wkbMultiLineString and ogrtest.check_feature_geometry(out_f, 'MULTILINESTRING ((498980.920645632 997961.84129126,508764.860266134 1007745.78091176,518548.799886636 1017529.72053226))') != 0) or \ out_f.GetGeometryRef().GetGeometryType() not in (ogr.wkbPoint, ogr.wkbMultiLineString): out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if (out_f.GetGeometryRef().GetGeometryType() == ogr.wkbPoint and ogrtest.check_feature_geometry(out_f, 'POINT (498980.920645632 997961.84129126)') != 0) or \ (out_f.GetGeometryRef().GetGeometryType() == ogr.wkbMultiLineString and ogrtest.check_feature_geometry(out_f, 'MULTILINESTRING ((498980.920645632 997961.84129126,508764.860266134 1007745.78091176,518548.799886636 1017529.72053226))') != 0) or \ out_f.GetGeometryRef().GetGeometryType() not in (ogr.wkbPoint, ogr.wkbMultiLineString): out_f.DumpReadable() pytest.fail() out_ds = ogr.Open('/vsimem/outmvt/5') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') assert out_lyr.GetFeatureCount() == 9 f = gdal.VSIFOpenL('/vsimem/outmvt/metadata.json', 'rb') assert f is not None data = gdal.VSIFReadL(1, 100000, f).decode('ASCII') gdal.VSIFCloseL(f) data_json = json.loads(data) expected_json = { "name": "outmvt", "description": "", "version": 2, "minzoom": 0, "maxzoom": 5, "center": "0.0449158,9.0352907,0", "bounds": "-4.5814079,8.9465739,4.6712395,9.1240075", "type": "overlay", "format": "pbf", } for k in expected_json: assert k in data_json and data_json[k] == expected_json[k], data json_json = json.loads(data_json['json']) expected_json_json = { "vector_layers": [ { "id": "mylayer", "description": "", "minzoom": 0, "maxzoom": 5, "fields": { "strfield": "String", "intfield": "Number", "int64field": "Number", "realfield": "Number", "datefield": "String", "datetimefield": "String", "boolfield": "Boolean" } } ], "tilestats": { "layerCount": 1, "layers": [ { "layer": "mylayer", "count": 7, "geometry": "LineString", "attributeCount": 7, "attributes": [ { "attribute": "strfield", "count": 2, "type": "string", "values": [ "foo", "foobarbazbaw" ] }, { "attribute": "intfield", "count": 2, "type": "numeric", "values": [ -1, 1 ], "min":-1, "max":1 }, { "attribute": "int64field", "count": 2, "type": "numeric", "values": [ -123456789012345, 123456789012345 ], "min":-123456789012345, "max":123456789012345 }, { "attribute": "realfield", "count": 2, "type": "numeric", "values": [ -1.256780, 1.250000 ], "min":-1.25678, "max":1.25 }, { "attribute": "datefield", "count": 1, "type": "string", "values": [ "2018-02-01" ] }, { "attribute": "datetimefield", "count": 1, "type": "string", "values": [ "2018-02-01T12:34:56" ] }, { "attribute": "boolfield", "count": 1, "type": "boolean", "values": [ True ] } ] } ] } } assert json_json == expected_json_json, data_json['json'] gdal.RmdirRecursive('/vsimem/outmvt') ############################################################################### def test_ogr_mvt_write_conf(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 1000000)')) lyr.CreateFeature(f) conf = {'mylayer': {'target_name': 'TheLayer', 'description': 'the layer', 'minzoom': 1, 'maxzoom': 2}} with gdaltest.tempfile('/vsimem/conf.json', json.dumps(conf)): out_ds = gdal.VectorTranslate('/vsimem/outmvt', src_ds, format='MVT', datasetCreationOptions=["CONF=/vsimem/conf.json"]) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/outmvt/1') assert out_ds is not None out_lyr = out_ds.GetLayerByName('TheLayer') assert out_lyr out_ds = None gdal.RmdirRecursive('/vsimem/outmvt') out_ds = gdal.VectorTranslate('/vsimem/outmvt', src_ds, format='MVT', datasetCreationOptions=["CONF=%s" % json.dumps(conf)]) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/outmvt/1') assert out_ds is not None out_lyr = out_ds.GetLayerByName('TheLayer') assert out_lyr out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOINT (498980.920645632 997961.84129126)') != 0: out_f.DumpReadable() pytest.fail() f = gdal.VSIFOpenL('/vsimem/outmvt/metadata.json', 'rb') assert f is not None data = gdal.VSIFReadL(1, 100000, f).decode('ASCII') gdal.VSIFCloseL(f) data_json = json.loads(data) json_json = json.loads(data_json['json']) expected_json_json = { "vector_layers": [ { "id": "TheLayer", "description": "the layer", "minzoom": 1, "maxzoom": 2, "fields": { } } ], "tilestats": { "layerCount": 1, "layers": [ { "layer": "TheLayer", "count": 1, "geometry": "Point", "attributeCount": 0, "attributes": [ ] } ] } } assert json_json == expected_json_json, data_json['json'] gdal.RmdirRecursive('/vsimem/outmvt') ############################################################################### def test_ogr_mvt_write_mbtiles(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 1000000)')) lyr.CreateFeature(f) out_ds = gdal.VectorTranslate('/vsimem/out.mbtiles', src_ds) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out.mbtiles') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOINT ((499898.164985053 1000102.07808325))') != 0: out_f.DumpReadable() pytest.fail() out_ds = None gdal.Unlink('/vsimem/out.mbtiles') ############################################################################### def test_ogr_mvt_write_limitations_max_size(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') lyr.CreateField(ogr.FieldDefn('field')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 1000000)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(500000 1000000,510000 1000000)')) lyr.CreateFeature(f) # Also test single threaded execution with gdaltest.config_option('GDAL_NUM_THREADS', '1'): out_ds = gdal.VectorTranslate('/vsimem/out.mbtiles', src_ds, datasetCreationOptions=['MAX_SIZE=100', 'SIMPLIFICATION=1']) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out.mbtiles') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTILINESTRING ((498980.920645631 1007745.78091176,508764.860266133 1007745.78091176))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'POINT (498980.920645631 1007745.78091176)') != 0: out_f.DumpReadable() pytest.fail() out_ds = None gdal.Unlink('/vsimem/out.mbtiles') ############################################################################### def test_ogr_mvt_write_polygon_repaired(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') lyr.CreateField(ogr.FieldDefn('field')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 500000,100000 500000,100000 200000,100500 200000,100500 500000,500000 500000,500000 0,0 0))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 500000,100000 500000,100000 200000,100500 200000,100500 500000,500000 500000,500000 0,0 0)),((1000000 0,1000000 1000000,2000000 1000000,1000000 0)))')) lyr.CreateFeature(f) # Cannot be repaired f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) out_ds = gdal.VectorTranslate('/vsimem/out.mbtiles', src_ds, datasetCreationOptions=['MAXZOOM=0']) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out.mbtiles') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOLYGON (((0 0,0.0 498980.920645632,498980.920645632 498980.920645632,498980.920645632 0.0,0 0)))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOLYGON (((0 0,0.0 498980.920645632,498980.920645632 498980.920645632,498980.920645632 0.0,0 0)),((997961.84129126 0.0,997961.84129126 997961.84129126,1995923.68258252 997961.84129126,997961.84129126 0.0)))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if out_f is not None: out_f.DumpReadable() pytest.fail() out_ds = None gdal.Unlink('/vsimem/out.mbtiles') ############################################################################### def test_ogr_mvt_write_conflicting_innner_ring(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') lyr.CreateField(ogr.FieldDefn('field')) f = ogr.Feature(lyr.GetLayerDefn()) # the second inner ring conflicts with the first one once transformed to integer coordinates f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((-500000 1000000,-510000 1000000,-510000 1010000,-500000 1000000),(-502000 1001000,-509000 1001000,-509000 1008500,-502000 1001000),(-502000 1000900,-509000 1000900,-509000 1000800,-502000 1000900))')) lyr.CreateFeature(f) out_ds = gdal.VectorTranslate('/vsimem/out.mbtiles', src_ds) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out.mbtiles') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOLYGON (((-499898.164985052 1000102.07808325,-509987.852718695 1000102.07808325,-509987.852718695 1009886.01770375,-499898.164985052 1000102.07808325),(-502038.401777037 1001019.32242267,-509070.608379273 1008357.27713804,-509070.608379273 1001019.32242267,-502038.401777037 1001019.32242267)))') != 0: out_f.DumpReadable() pytest.fail() out_ds = None gdal.Unlink('/vsimem/out.mbtiles') ############################################################################### def test_ogr_mvt_write_limitations_max_size_polygon(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') lyr.CreateField(ogr.FieldDefn('field')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field', '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((500000 1000000,510000 1000000,510000 1010000,500000 1000000),(503000 1003000,507000 1003000,507000 1005000,503000 1003000))')) lyr.CreateFeature(f) out_ds = gdal.VectorTranslate('/vsimem/out.mbtiles', src_ds, datasetCreationOptions=['MAX_SIZE=100']) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out.mbtiles') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTIPOLYGON (((498980.920645631 1007745.78091176,508764.860266133 1017529.72053227,508764.860266133 1007745.78091176,498980.920645631 1007745.78091176)))') != 0: out_f.DumpReadable() pytest.fail() out_ds = None gdal.Unlink('/vsimem/out.mbtiles') ############################################################################### def test_ogr_mvt_write_limitations_max_features(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 1000000)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((500000 1000000,510000 1000000,510000 1100000,500000 1000000))')) lyr.CreateFeature(f) out_ds = gdal.VectorTranslate('/vsimem/out.mbtiles', src_ds, format='MVT', datasetCreationOptions=['MAX_FEATURES=1']) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out.mbtiles') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'POLYGON ((499898.164985053 1000102.07808325,509987.852718696 1100081.71108026,509987.852718696 1000102.07808325,499898.164985053 1000102.07808325))') != 0: out_f.DumpReadable() pytest.fail() out_f = out_lyr.GetNextFeature() if out_f is not None: out_f.DumpReadable() pytest.fail() out_ds = None gdal.Unlink('/vsimem/out.mbtiles') ############################################################################### def test_ogr_mvt_write_custom_tiling_scheme(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") lyr = src_ds.CreateLayer('mylayer', srs=srs) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(12 71,13 72)')) lyr.CreateFeature(f) out_ds = gdal.VectorTranslate('/vsimem/out', src_ds, format='MVT', datasetCreationOptions=['TILING_SCHEME=EPSG:3067,-548576,8388608,2097152']) assert out_ds is not None out_ds = None out_ds = ogr.Open('/vsimem/out/1') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') assert out_lyr.GetSpatialRef().ExportToWkt().find('3067') >= 0 out_f = out_lyr.GetNextFeature() if ogrtest.check_feature_geometry(out_f, 'MULTILINESTRING ((-40160 7944704,21024 8044800))') != 0: out_f.DumpReadable() pytest.fail() out_ds = None gdal.RmdirRecursive('/vsimem/out') ############################################################################### def test_ogr_mvt_write_errors(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() # Raster creation attempt gdal.RmdirRecursive('/vsimem/foo') with gdaltest.error_handler(): ds = gdal.GetDriverByName('MVT').Create('/vsimem/foo', 1, 1) assert ds is None # should have mbtiles extension gdal.RmdirRecursive('/vsimem/foo.bar') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo.bar', options=['FORMAT=MBTILES']) assert ds is None # Cannot create temporary database gdal.RmdirRecursive('/vsimem/foo') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['TEMPORARY_DB=/i/do_not/exist.db']) assert ds is None # cannot create mbtiles file with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/i/do_not/exist.mbtiles', options=['TEMPORARY_DB=/vsimem/temp.db']) assert ds is None gdal.Unlink('/vsimem/temp.db') # invalid MINZOOM gdal.RmdirRecursive('/vsimem/foo') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['MINZOOM=-1']) assert ds is None with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['MINZOOM=30']) assert ds is None # invalid MAXZOOM gdal.RmdirRecursive('/vsimem/foo') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['MAXZOOM=-1']) assert ds is None with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['MAXZOOM=30']) assert ds is None # invalid MINZOOM vs MAXZOOM gdal.RmdirRecursive('/vsimem/foo') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['MINZOOM=1', 'MAXZOOM=0']) assert ds is None # invalid MINZOOM for layer gdal.RmdirRecursive('/vsimem/foo') ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo') with gdaltest.error_handler(): lyr = ds.CreateLayer('foo', options=['MINZOOM=-1']) assert lyr is None # invalid CONF gdal.RmdirRecursive('/vsimem/foo') gdal.FileFromMemBuffer('/vsimem/invalid.json', 'foo bar') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['CONF=/vsimem/invalid.json']) gdal.Unlink('/vsimem/invalid.json') assert ds is None # TILING_SCHEME not allowed with MBTILES with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo.mbtiles', options=['TILING_SCHEME=EPSG:4326,-180,180,360']) assert ds is None # Invalid TILING_SCHEME gdal.RmdirRecursive('/vsimem/foo') with gdaltest.error_handler(): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo', options=['TILING_SCHEME=EPSG:4326']) assert ds is None # Test failure in creating tile gdal.RmdirRecursive('tmp/tmpmvt') ds = ogr.GetDriverByName('MVT').CreateDataSource('tmp/tmpmvt') gdal.RmdirRecursive('tmp/tmpmvt') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) with gdaltest.error_handler(): ds = None assert gdal.GetLastErrorMsg() != '' gdal.RmdirRecursive('tmp/tmpmvt') # Test failure in writing in temp db (multi-threaded) gdal.RmdirRecursive('/vsimem/foo') with gdaltest.config_option('OGR_MVT_REMOVE_TEMP_FILE', 'NO'): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo') temp_ds = ogr.Open('/vsimem/foo.temp.db', update=1) temp_ds.ExecuteSQL('DROP TABLE temp') temp_ds = None gdal.Unlink('/vsimem/foo.temp.db') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 0))')) with gdaltest.error_handler(): lyr.CreateFeature(f) ds = None assert gdal.GetLastErrorMsg() != '' gdal.RmdirRecursive('tmp/tmpmvt') # Test failure in writing in temp db (single-threaded) gdal.RmdirRecursive('/vsimem/foo') with gdaltest.config_option('OGR_MVT_REMOVE_TEMP_FILE', 'NO'): with gdaltest.config_option('GDAL_NUM_THREADS', '1'): ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo') temp_ds = ogr.Open('/vsimem/foo.temp.db', update=1) temp_ds.ExecuteSQL('DROP TABLE temp') temp_ds = None gdal.Unlink('/vsimem/foo.temp.db') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 0))')) with gdaltest.error_handler(): lyr.CreateFeature(f) ds = None assert gdal.GetLastErrorMsg() != '' gdal.RmdirRecursive('tmp/tmpmvt') # Test reprojection failure gdal.RmdirRecursive('/vsimem/foo') ds = ogr.GetDriverByName('MVT').CreateDataSource('/vsimem/foo') with gdaltest.error_handler(): lyr = ds.CreateLayer('test', srs=osr.SpatialReference()) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) ds = None gdal.RmdirRecursive('/vsimem/foo') ############################################################################### # def test_ogr_mvt_write_reuse_temp_db(): if not ogrtest.have_geos() or ogr.GetDriverByName('SQLITE') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0, gdal.GDT_Unknown) lyr = src_ds.CreateLayer('mylayer') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,100000 100000,200000 0)')) lyr.CreateFeature(f) with gdaltest.config_option('OGR_MVT_REMOVE_TEMP_FILE', 'NO'): gdal.VectorTranslate('/vsimem/out', src_ds, format='MVT') assert gdal.VSIStatL('/vsimem/out.temp.db') is not None gdal.RmdirRecursive('/vsimem/out') with gdaltest.config_option('OGR_MVT_REUSE_TEMP_FILE', 'YES'): gdal.VectorTranslate('/vsimem/out', src_ds, format='MVT') out_ds = ogr.Open('/vsimem/out/5') assert out_ds is not None out_lyr = out_ds.GetLayerByName('mylayer') out_f = out_lyr.GetNextFeature() assert out_f is not None out_ds = None gdal.RmdirRecursive('/vsimem/out') gdal.Unlink('/vsimem/out.temp.db') ############################################################################### # gdalautotest-3.1.2/ogr/ogr_mitab.py0000775000175000017500000027131213701060010015774 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_mitab.py e9605fc9c629e461953c44e744c03f79ee7ff435 2020-05-26 10:29:40 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: MapInfo driver testing. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2012-2014, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import random import sys import shutil import time import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import test_cli_utilities import pytest ############################################################################### # Create TAB file. def test_ogr_mitab_1(): gdaltest.mapinfo_drv = ogr.GetDriverByName('MapInfo File') gdaltest.mapinfo_ds = gdaltest.mapinfo_drv.CreateDataSource('tmp') if gdaltest.mapinfo_ds is not None: return pytest.fail() ############################################################################### # Create table from data/poly.shp def test_ogr_mitab_2(): if gdaltest.mapinfo_ds is None: pytest.skip() # This should convert to MapInfo datum name 'New_Zealand_GD49' WEIRD_SRS = 'PROJCS["NZGD49 / UTM zone 59S",GEOGCS["NZGD49",DATUM["NZGD49",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",171],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","27259"]]' gdaltest.mapinfo_srs = osr.SpatialReference() gdaltest.mapinfo_srs.ImportFromWkt(WEIRD_SRS) ####################################################### # Create memory Layer gdaltest.mapinfo_lyr = gdaltest.mapinfo_ds.CreateLayer('tpoly', gdaltest.mapinfo_srs) ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.mapinfo_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.mapinfo_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.mapinfo_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() ####################################################### # Close file. gdaltest.mapinfo_ds = None ############################################################################### # Verify that stuff we just wrote is still OK. # # Note that we allow a fairly significant error since projected # coordinates are not stored with much precision in Mapinfo format. def test_ogr_mitab_3(): if gdaltest.mapinfo_drv is None: pytest.skip() gdaltest.mapinfo_ds = ogr.Open('tmp') gdaltest.mapinfo_lyr = gdaltest.mapinfo_ds.GetLayer(0) expect = [168, 169, 166, 158, 165] gdaltest.mapinfo_lyr.SetAttributeFilter('EAS_ID < 170') tr = ogrtest.check_features_against_list(gdaltest.mapinfo_lyr, 'EAS_ID', expect) gdaltest.mapinfo_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.mapinfo_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.02) == 0), \ ('Geometry check fail. i=%d' % i) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) gdaltest.poly_feat = None gdaltest.shp_ds = None assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_mitab_4(): if gdaltest.mapinfo_ds is None: pytest.skip() sql_lyr = gdaltest.mapinfo_ds.ExecuteSQL( "select * from tpoly where prfedea = '35043413'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['35043413']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'POLYGON ((479750.688 4764702.000,479658.594 4764670.000,479640.094 4764721.000,479735.906 4764752.000,479750.688 4764702.000))', max_error=0.02) != 0: tr = 0 gdaltest.mapinfo_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_mitab_5(): if gdaltest.mapinfo_ds is None: pytest.skip() gdaltest.mapinfo_lyr.SetAttributeFilter(None) gdaltest.mapinfo_lyr.SetSpatialFilterRect(479505, 4763195, 480526, 4762819) tr = ogrtest.check_features_against_list(gdaltest.mapinfo_lyr, 'eas_id', [158]) gdaltest.mapinfo_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Verify that Non-WGS84 datums are populated correctly def test_ogr_mitab_6(): if gdaltest.mapinfo_drv is None: pytest.skip() srs = gdaltest.mapinfo_lyr.GetSpatialRef() datum_name = srs.GetAttrValue('PROJCS|GEOGCS|DATUM') assert datum_name == "New_Zealand_GD49", \ ("Datum name does not match (expected 'New_Zealand_GD49', got '%s')" % datum_name) ############################################################################### # Create MIF file. def test_ogr_mitab_7(): gdaltest.mapinfo_ds = None gdaltest.mapinfo_drv.DeleteDataSource('tmp') gdaltest.mapinfo_ds = gdaltest.mapinfo_drv.CreateDataSource('tmp/wrk.mif') if gdaltest.mapinfo_ds is not None: return pytest.fail() ############################################################################### # Create table from data/poly.shp def test_ogr_mitab_8(): if gdaltest.mapinfo_ds is None: pytest.skip() ####################################################### # Create memory Layer gdaltest.mapinfo_lyr = gdaltest.mapinfo_ds.CreateLayer('tpoly') ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.mapinfo_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.mapinfo_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.mapinfo_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() ####################################################### # Close file. gdaltest.mapinfo_ds = None ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_mitab_9(): if gdaltest.mapinfo_drv is None: pytest.skip() gdaltest.mapinfo_ds = ogr.Open('tmp') gdaltest.mapinfo_lyr = gdaltest.mapinfo_ds.GetLayer(0) expect = [168, 169, 166, 158, 165] gdaltest.mapinfo_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.mapinfo_lyr, 'eas_id', expect) gdaltest.mapinfo_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.mapinfo_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.000000001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) gdaltest.poly_feat = None gdaltest.shp_ds = None assert tr ############################################################################### # Read mif file with 2 character .mid delimiter and verify operation. def test_ogr_mitab_10(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.Open('data/small.mif') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.NAME == " S. 11th St.", 'name attribute wrong.' assert feat.FLOODZONE == 10, 'FLOODZONE attribute wrong.' assert (ogrtest.check_feature_geometry(feat, 'POLYGON ((407131.721 155322.441,407134.468 155329.616,407142.741 155327.242,407141.503 155322.467,407140.875 155320.049,407131.721 155322.441))', max_error=0.000000001) == 0) feat = lyr.GetNextFeature() assert feat.OWNER == 'Guarino "Chucky" Sandra', 'owner attribute wrong.' lyr = None ds = None ############################################################################### # Verify support for NTF datum with non-greenwich datum per # http://trac.osgeo.org/gdal/ticket/1416 # # This test also exercises SRS reference counting as described in issue: # http://trac.osgeo.org/gdal/ticket/1680 def test_ogr_mitab_11(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.Open('data/small_ntf.mif') srs = ds.GetLayer(0).GetSpatialRef() ds = None pm_value = srs.GetAttrValue('PROJCS|GEOGCS|PRIMEM', 1) assert pm_value[:6] == '2.3372', \ ('got unexpected prime meridian, not paris: ' + pm_value) ############################################################################### # Verify that a newly created mif layer returns a non null layer definition def test_ogr_mitab_12(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = gdaltest.mapinfo_drv.CreateDataSource('tmp', options=['FORMAT=MIF']) lyr = ds.CreateLayer('testlyrdef') defn = lyr.GetLayerDefn() assert defn is not None ogrtest.quick_create_layer_def(lyr, [('AREA', ogr.OFTReal)]) ds = None ############################################################################### # Verify that field widths and precisions are propagated correctly in TAB. def test_ogr_mitab_13(): if gdaltest.mapinfo_drv is None: pytest.skip() import ogr_gml_read ogr_gml_read.test_ogr_gml_1() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/testlyrdef.tab') ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testlyrdef.tab') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f "MapInfo File" tmp/testlyrdef.tab ../ogr/data/testlyrdef.gml') ds = ogr.Open('tmp/testlyrdef.tab') # Check if the width and precision are as preserved. lyr = ds.GetLayer('testlyrdef') assert lyr is not None, 'Layer missing.' defn = lyr.GetLayerDefn() data = [['AREA', ogr.OFTReal, 7, 4], ['VOLUME', ogr.OFTReal, 0, 0], ['LENGTH', ogr.OFTInteger, 10, 0], ['WIDTH', ogr.OFTInteger, 4, 0]] for field in data: fld = defn.GetFieldDefn(defn.GetFieldIndex(field[0])) assert fld.GetType() == field[1] and fld.GetWidth() == field[2] and fld.GetPrecision() == field[3], \ (field[0] + ' field definition wrong.') ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testlyrdef.tab') ############################################################################### # Verify that field widths and precisions are propagated correctly in MIF. def test_ogr_mitab_14(): if gdaltest.mapinfo_drv is None: pytest.skip() import ogr_gml_read ogr_gml_read.test_ogr_gml_1() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/testlyrdef.mif') ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testlyrdef.mif') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f "MapInfo File" -dsco FORMAT=MIF tmp/testlyrdef.mif ../ogr/data/testlyrdef.gml') ds = ogr.Open('tmp/testlyrdef.mif') # Check if the width and precision are as preserved. lyr = ds.GetLayer('testlyrdef') assert lyr is not None, 'Layer missing.' defn = lyr.GetLayerDefn() data = [['AREA', ogr.OFTReal, 7, 4], ['VOLUME', ogr.OFTReal, 0, 0], ['LENGTH', ogr.OFTInteger, 254, 0], ['WIDTH', ogr.OFTInteger, 254, 0]] for field in data: fld = defn.GetFieldDefn(defn.GetFieldIndex(field[0])) expected_with = field[2] if fld.GetType() == ogr.OFTInteger: expected_with = 0 assert fld.GetType() == field[1] and fld.GetWidth() == expected_with and fld.GetPrecision() == field[3], \ (field[0] + ' field definition wrong.') ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testlyrdef.mif') ############################################################################### # Test .mif without .mid (#5141) def test_ogr_mitab_15(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.Open('data/nomid.mif') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ds = None # Test opening .mif without .mid even if there are declared attributes ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('/vsimem/nomid.mif') lyr = ds.CreateLayer('empty') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(f) ds = None gdal.Unlink('/vsimem/nomid.mid') ds = ogr.Open('/vsimem/nomid.mif') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.IsFieldSet(0) or f.GetGeometryRef() is None: f.DumpReadable() pytest.fail() gdal.Unlink('/vsimem/nomid.mif') ############################################################################### # Test empty .mif def test_ogr_mitab_16(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('tmp/empty.mif') lyr = ds.CreateLayer('empty') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) ds = None ds = ogr.Open('tmp/empty.mif') assert ds is not None ds = None ############################################################################### # Run test_ogrsf def test_ogr_mitab_17(): if gdaltest.mapinfo_drv is None: pytest.skip() import ogr_gml_read ogr_gml_read.test_ogr_gml_1() if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/wrk.mif') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test EPSG:2154 # (https://github.com/mapgears/mitab/issues/1) def test_ogr_mitab_18(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('/vsimem/ogr_mitab_18.tab') sr = osr.SpatialReference() sr.ImportFromEPSG(2154) lyr = ds.CreateLayer('test', srs=sr) lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) ds = None # Test with our generated file, and with one generated by MapInfo for filename in ['/vsimem/ogr_mitab_18.tab', 'data/lambert93_francais.TAB']: ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) sr_got = lyr.GetSpatialRef() wkt = sr_got.ExportToWkt() if '2154' not in wkt: print(filename) pytest.fail(sr_got) proj4 = sr_got.ExportToProj4() assert proj4.startswith('+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs') ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('/vsimem/ogr_mitab_18.tab') ############################################################################### # Check that we correctly round coordinate to the appropriate precision # (https://github.com/mapgears/mitab/issues/2) def test_ogr_mitab_19(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.Open('data/utm31.TAB') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() # Strict text comparison to check precision if feat.GetGeometryRef().ExportToWkt() != 'POINT (485248.12 2261.45)': feat.DumpReadable() pytest.fail() ############################################################################### # Check that we take into account the user defined bound file # (https://github.com/mapgears/mitab/issues/3) # Also test BOUNDS layer creation option (http://trac.osgeo.org/gdal/ticket/5642) def test_ogr_mitab_20(): if gdaltest.mapinfo_drv is None: pytest.skip() # Pass i==0: without MITAB_BOUNDS_FILE # Pass i==1: with MITAB_BOUNDS_FILE and French bounds : first load # Pass i==2: with MITAB_BOUNDS_FILE and French bounds : should use already loaded file # Pass i==3: without MITAB_BOUNDS_FILE : should unload the file # Pass i==4: use BOUNDS layer creation option # Pass i==5: with MITAB_BOUNDS_FILE and European bounds # Pass i==6: with MITAB_BOUNDS_FILE and generic EPSG:2154 (Europe bounds expected) for fmt in ['tab', 'mif']: for i in range(7): if i == 1 or i == 2 or i == 5 or i == 6: gdal.SetConfigOption('MITAB_BOUNDS_FILE', 'data/mitab_bounds.txt') ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('/vsimem/ogr_mitab_20.' + fmt) sr = osr.SpatialReference() if i == 1 or i == 2: # French bounds sr.SetFromUserInput("""PROJCS["RGF93 / Lambert-93", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 80",6378137,298.257222101], TOWGS84[0,0,0,0,0,0,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",49.00000000002], PARAMETER["standard_parallel_2",44], PARAMETER["latitude_of_origin",46.5], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["Meter",1.0], AUTHORITY["EPSG","2154"]]""") elif i == 5: # European bounds sr.SetFromUserInput("""PROJCS["RGF93 / Lambert-93", GEOGCS["RGF93", DATUM["Reseau_Geodesique_Francais_1993", SPHEROID["GRS 80",6378137,298.257222101], TOWGS84[0,0,0,0,0,0,0]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",49.00000000001], PARAMETER["standard_parallel_2",44], PARAMETER["latitude_of_origin",46.5], PARAMETER["central_meridian",3], PARAMETER["false_easting",700000], PARAMETER["false_northing",6600000], UNIT["Meter",1.0], AUTHORITY["EPSG","2154"]]""") else: sr.ImportFromEPSG(2154) if i == 4: lyr = ds.CreateLayer('test', srs=sr, options=['BOUNDS=75000,6000000,1275000,7200000']) else: lyr = ds.CreateLayer('test', srs=sr) lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (700000.001 6600000.001)")) lyr.CreateFeature(feat) ds = None gdal.SetConfigOption('MITAB_BOUNDS_FILE', None) ds = ogr.Open('/vsimem/ogr_mitab_20.' + fmt) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert not (i == 6 and lyr.GetSpatialRef().ExportToWkt().find('49.00000000001') < 0), \ fmt # Strict text comparison to check precision if fmt == 'tab': if i == 1 or i == 2 or i == 4: if feat.GetGeometryRef().ExportToWkt() != 'POINT (700000.001 6600000.001)': print(i) feat.DumpReadable() pytest.fail(fmt) else: if feat.GetGeometryRef().ExportToWkt() == 'POINT (700000.001 6600000.001)': print(i) feat.DumpReadable() pytest.fail(fmt) ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('/vsimem/ogr_mitab_20.' + fmt) gdal.SetConfigOption('MITAB_BOUNDS_FILE', 'tmp/mitab_bounds.txt') for i in range(2): if i == 1 and not sys.platform.startswith('linux'): time.sleep(1) f = open('tmp/mitab_bounds.txt', 'wb') if i == 0: f.write( """Source = CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49, 700000, 6600000 Destination=CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49.00000000001, 700000, 6600000 Bounds (-792421, 5278231) (3520778, 9741029)""".encode('ascii')) else: f.write( """Source = CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49, 700000, 6600000 Destination=CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49.00000000002, 700000, 6600000 Bounds (75000, 6000000) (1275000, 7200000)""".encode('ascii')) f.close() if i == 1 and sys.platform.startswith('linux'): os.system('touch -d "1 minute ago" tmp/mitab_bounds.txt') ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('/vsimem/ogr_mitab_20.tab') sr = osr.SpatialReference() sr.ImportFromEPSG(2154) lyr = ds.CreateLayer('test', srs=sr) lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (700000.001 6600000.001)")) lyr.CreateFeature(feat) ds = None ds = ogr.Open('/vsimem/ogr_mitab_20.tab') lyr = ds.GetLayer(0) if i == 0: expected = '49.00000000001' else: expected = '49.00000000002' if lyr.GetSpatialRef().ExportToWkt().find(expected) < 0: print(i) gdal.SetConfigOption('MITAB_BOUNDS_FILE', None) os.unlink('tmp/mitab_bounds.txt') pytest.fail(lyr.GetSpatialRef().ExportToWkt()) ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('/vsimem/ogr_mitab_20.tab') gdal.SetConfigOption('MITAB_BOUNDS_FILE', None) os.unlink('tmp/mitab_bounds.txt') ############################################################################### # Create .tab without explicit field def test_ogr_mitab_21(): if gdaltest.mapinfo_drv is None: pytest.skip() ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('/vsimem/ogr_mitab_21.tab') lyr = ds.CreateLayer('test') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (0 0)")) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.CreateFeature(feat) gdal.PopErrorHandler() ds = None ds = ogr.Open('/vsimem/ogr_mitab_21.tab') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('FID') != 1: feat.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('/vsimem/ogr_mitab_21.tab') ############################################################################### # Test append in update mode def test_ogr_mitab_22(): filename = '/vsimem/ogr_mitab_22.tab' for nb_features in (2, 1000): if nb_features == 2: nb_runs = 2 else: nb_runs = 1 # When doing 2 runs, in the second one, we create an empty # .tab and then open it for update. This can trigger specific bugs for j in range(nb_runs): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) if j == 0: i = 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', i + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (%d %d)" % (i, i))) if lyr.CreateFeature(feat) != 0: print(i) pytest.fail(nb_features) ds = None for i in range(nb_features - (1 - j)): ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', i + 1 + (1 - j)) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (%d %d)" % (i + (1 - j), i + (1 - j)))) if lyr.CreateFeature(feat) != 0: print(i) pytest.fail(nb_features) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) for i in range(nb_features): f = lyr.GetNextFeature() assert f is not None and f.GetField('ID') == i + 1, nb_features ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test creating features then reading def test_ogr_mitab_23(): filename = '/vsimem/ogr_mitab_23.tab' for nb_features in (0, 1, 2, 100, 1000): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) for i in range(nb_features): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', i + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (0 0)")) lyr.CreateFeature(feat) lyr.ResetReading() for i in range(nb_features): f = lyr.GetNextFeature() assert f is not None and f.GetField('ID') == i + 1, nb_features f = lyr.GetNextFeature() assert f is None ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test creating features then reading then creating again then reading def test_ogr_mitab_24(): filename = '/vsimem/ogr_mitab_24.tab' for nb_features in (2, 100, 1000): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) for i in range(int(nb_features / 2)): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', i + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (0 0)")) lyr.CreateFeature(feat) lyr.ResetReading() for i in range(int(nb_features / 2)): f = lyr.GetNextFeature() assert f is not None and f.GetField('ID') == i + 1, nb_features f = lyr.GetNextFeature() assert f is None for i in range(int(nb_features / 2)): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', nb_features / 2 + i + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (0 0)")) lyr.CreateFeature(feat) lyr.ResetReading() for i in range(nb_features): f = lyr.GetNextFeature() assert f is not None and f.GetField('ID') == i + 1, nb_features f = lyr.GetNextFeature() assert f is None ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test that opening in update mode without doing any change does not alter # file def test_ogr_mitab_25(): filename = 'tmp/ogr_mitab_25.tab' for nb_features in (2, 1000): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) for i in range(int(nb_features / 2)): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', i + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (%d %d)" % (i, i))) lyr.CreateFeature(feat) ds = None if sys.platform.startswith('linux'): for ext in ('map', 'tab', 'dat', 'id'): os.system('touch -d "1 minute ago" %s' % filename[0:-3] + ext) mtime_dict = {} for ext in ('map', 'tab', 'dat', 'id'): mtime_dict[ext] = os.stat(filename[0:-3] + ext).st_mtime if not sys.platform.startswith('linux'): time.sleep(1) # Try without doing anything ds = ogr.Open(filename, update=1) ds = None for ext in ('map', 'tab', 'dat', 'id'): mtime = os.stat(filename[0:-3] + ext).st_mtime assert mtime_dict[ext] == mtime, ('mtime of .%s has changed !' % ext) # Try by reading all features ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) lyr.GetFeatureCount(1) ds = None for ext in ('map', 'tab', 'dat', 'id'): mtime = os.stat(filename[0:-3] + ext).st_mtime assert mtime_dict[ext] == mtime, ('mtime of .%s has changed !' % ext) # Try by reading all features with a spatial index ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) lyr.SetSpatialFilterRect(0.5, 0.5, 1.5, 1.5) lyr.GetFeatureCount(1) ds = None for ext in ('map', 'tab', 'dat', 'id'): mtime = os.stat(filename[0:-3] + ext).st_mtime assert mtime_dict[ext] == mtime, ('mtime of .%s has changed !' % ext) if test_cli_utilities.get_test_ogrsf_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro -fsf ' + filename) assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test DeleteFeature() def test_ogr_mitab_26(): filename = '/vsimem/ogr_mitab_26.tab' for nb_features in (2, 1000): if nb_features == 2: nb_runs = 2 else: nb_runs = 1 for j in range(nb_runs): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) for i in range(nb_features): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', i + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (%d %d)" % (i, i))) lyr.CreateFeature(feat) if nb_features == 2: assert lyr.DeleteFeature(int(nb_features / 2)) == 0, j else: for k in range(int(nb_features / 2)): assert lyr.DeleteFeature(int(nb_features / 4) + k) == 0, j if j == 1: # Expected failure : already deleted feature ret = lyr.DeleteFeature(int(nb_features / 2)) if ret != ogr.OGRERR_NON_EXISTING_FEATURE: print(j) pytest.fail(nb_features) feat = lyr.GetFeature(int(nb_features / 2)) if feat is not None: print(j) pytest.fail(nb_features) # Expected failure : illegal feature id ret = lyr.DeleteFeature(nb_features + 1) if ret != ogr.OGRERR_NON_EXISTING_FEATURE: print(j) pytest.fail(nb_features) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == nb_features / 2 ds = None # This used to trigger a bug in DAT record deletion during implementation... if nb_features == 1000: ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) lyr.DeleteFeature(245) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == nb_features / 2 - 1 ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test SetFeature() def test_ogr_mitab_27(): filename = '/vsimem/ogr_mitab_27.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('stringfield', ogr.OFTString)) # Invalid call : feature without FID f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0 # Invalid call : feature with FID <= 0 f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(0) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0 f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('intfield', 1) f.SetField('realfield', 2.34) f.SetField('stringfield', "foo") f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr.CreateFeature(f) fid = f.GetFID() # Invalid call : feature with FID > feature_count f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(2) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0 # Update previously created object with blank feature f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(fid) lyr.SetFeature(f) ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetField('intfield') != 0 or f.GetField('realfield') != 0 or f.GetField('stringfield') != '' or \ f.GetGeometryRef() is not None: f.DumpReadable() pytest.fail() f.SetField('intfield', 1) f.SetField('realfield', 2.34) f.SetField('stringfield', "foo") f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (2 3)')) lyr.SetFeature(f) ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetField('intfield') != 1 or f.GetField('realfield') != 2.34 or f.GetField('stringfield') != 'foo' or \ f.GetGeometryRef() is None: f.DumpReadable() pytest.fail() lyr.DeleteFeature(f.GetFID()) ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) # SetFeature() on a deleted feature lyr.SetFeature(f) f = lyr.GetFeature(1) if f.GetField('intfield') != 1 or f.GetField('realfield') != 2.34 or f.GetField('stringfield') != 'foo' or \ f.GetGeometryRef() is None: f.DumpReadable() pytest.fail() ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) f = lyr.GetFeature(1) # SetFeature() with identical feature : no-op assert lyr.SetFeature(f) == 0 ds = None stat = gdal.VSIStatL(filename[0:-3] + "map") old_size = stat.size # This used to trigger a bug: when using SetFeature() repeatedly, we # can create object blocks in the .map that are made only of deleted # objects. ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) f = lyr.GetFeature(1) for _ in range(100): f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (2 3)')) assert lyr.SetFeature(f) == 0 ds = None stat = gdal.VSIStatL(filename[0:-3] + "map") assert stat.size == old_size ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) f = lyr.GetFeature(1) # SetFeature() with identical geometry : rewrite only attributes f.SetField('intfield', -1) assert lyr.SetFeature(f) == 0 f = lyr.GetFeature(1) if f.GetField('intfield') != -1 or f.GetField('realfield') != 2.34 or f.GetField('stringfield') != 'foo' or \ f.GetGeometryRef() is None: f.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### def generate_permutation(n): tab = [i for i in range(n)] for _ in range(10 * n): ind = random.randint(0, n - 1) tmp = tab[0] tab[0] = tab[ind] tab[ind] = tmp return tab ############################################################################### # Test updating object blocks with deleted objects def test_ogr_mitab_28(): filename = '/vsimem/ogr_mitab_28.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) # Generate 10x10 grid N2 = 10 N = N2 * N2 for n in generate_permutation(N): x = int(n / N2) y = n % N2 f = ogr.Feature(lyr.GetLayerDefn()) # f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%d %d)' % (x,y))) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(%d %d,%f %f,%f %f)' % (x, y, x + 0.1, y, x + 0.2, y))) lyr.CreateFeature(f) # Delete all features for i in range(N): lyr.DeleteFeature(i + 1) # Set deleted features i = 0 permutation = generate_permutation(N) for n in permutation: x = int(n / N2) y = n % N2 f = ogr.Feature(lyr.GetLayerDefn()) # f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%d %d)' % (x,y))) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(%d %d,%f %f,%f %f)' % (x, y, x + 0.1, y, x + 0.2, y))) f.SetFID(i + 1) i = i + 1 lyr.SetFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) i = 0 # Check sequential enumeration for f in lyr: g = f.GetGeometryRef() (x, y, _) = g.GetPoint(0) n = permutation[i] x_ref = int(n / N2) y_ref = n % N2 assert abs(x - x_ref) + abs(y - y_ref) <= 0.1 i = i + 1 # Check spatial index integrity for n in range(N): x = int(n / N2) y = n % N2 lyr.SetSpatialFilterRect(x - 0.5, y - 0.5, x + 0.5, y + 0.5) assert lyr.GetFeatureCount() == 1 ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test updating a file with compressed geometries. def test_ogr_mitab_29(): try: os.stat('tmp/cache/compr_symb_deleted_records.tab') except OSError: try: gdaltest.unzip('tmp/cache', 'data/compr_symb_deleted_records.zip') try: os.stat('tmp/cache/compr_symb_deleted_records.tab') except OSError: pytest.skip() except OSError: pytest.skip() shutil.copy('tmp/cache/compr_symb_deleted_records.tab', 'tmp') shutil.copy('tmp/cache/compr_symb_deleted_records.dat', 'tmp') shutil.copy('tmp/cache/compr_symb_deleted_records.id', 'tmp') shutil.copy('tmp/cache/compr_symb_deleted_records.map', 'tmp') # Is a 100x100 point grid with only the 4 edge lines left (compressed points) ds = ogr.Open('tmp/compr_symb_deleted_records.tab', update=1) lyr = ds.GetLayer(0) # Re-add the 98x98 interior points N2 = 98 N = N2 * N2 permutation = generate_permutation(N) for n in permutation: x = 1 + int(n / N2) y = 1 + n % N2 f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%d %d)' % (x, y))) lyr.CreateFeature(f) ds = None # Check grid integrity that after reopening ds = ogr.Open('tmp/compr_symb_deleted_records.tab') lyr = ds.GetLayer(0) N2 = 100 N = N2 * N2 for n in range(N): x = int(n / N2) y = n % N2 lyr.SetSpatialFilterRect(x - 0.01, y - 0.01, x + 0.01, y + 0.01) if lyr.GetFeatureCount() != 1: print(n) pytest.fail(x - 0.01, y - 0.01, x + 0.01, y + 0.01) ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/compr_symb_deleted_records.tab') ############################################################################### # Test SyncToDisk() in create mode def test_ogr_mitab_30(update=0): filename = 'tmp/ogr_mitab_30.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test', options=['BOUNDS=0,0,100,100']) lyr.CreateField(ogr.FieldDefn('ID', ogr.OFTInteger)) assert lyr.SyncToDisk() == 0 ds2 = ogr.Open(filename) lyr2 = ds2.GetLayer(0) assert lyr2.GetFeatureCount() == 0 and lyr2.GetLayerDefn().GetFieldCount() == 1 ds2 = None # Check that the files are not updated in between if sys.platform.startswith('linux'): for ext in ('map', 'tab', 'dat', 'id'): os.system('touch -d "1 minute ago" %s' % filename[0:-3] + ext) stat = {} for ext in ('map', 'tab', 'dat', 'id'): stat[ext] = gdal.VSIStatL(filename[0:-3] + ext) if not sys.platform.startswith('linux'): time.sleep(1) assert lyr.SyncToDisk() == 0 for ext in ('map', 'tab', 'dat', 'id'): stat2 = gdal.VSIStatL(filename[0:-3] + ext) assert stat[ext].size == stat2.size and stat[ext].mtime == stat2.mtime if update == 1: ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) for j in range(100): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('ID', j + 1) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (%d %d)' % (j, j))) lyr.CreateFeature(feat) feat = None if not (j <= 10 or (j % 5) == 0): continue for i in range(2): ret = lyr.SyncToDisk() assert ret == 0 if i == 0: for ext in ('map', 'tab', 'dat', 'id'): stat[ext] = gdal.VSIStatL(filename[0:-3] + ext) else: for ext in ('map', 'tab', 'dat', 'id'): stat2 = gdal.VSIStatL(filename[0:-3] + ext) if stat[ext].size != stat2.size: print(j) pytest.fail(i) ds2 = ogr.Open(filename) lyr2 = ds2.GetLayer(0) assert lyr2.GetFeatureCount() == j + 1, i feat2 = lyr2.GetFeature(j + 1) if feat2.GetField('ID') != j + 1 or feat2.GetGeometryRef().ExportToWkt() != 'POINT (%d %d)' % (j, j): print(i) feat2.DumpReadable() pytest.fail(j) lyr2.ResetReading() for _ in range(j + 1): feat2 = lyr2.GetNextFeature() if feat2.GetField('ID') != j + 1 or feat2.GetGeometryRef().ExportToWkt() != 'POINT (%d %d)' % (j, j): print(i) feat2.DumpReadable() pytest.fail(j) ds2 = None ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test SyncToDisk() in update mode def test_ogr_mitab_31(): return test_ogr_mitab_30(update=1) ############################################################################### # Check read support of non-spatial .tab/.data without .map or .id (#5718) # We only check read-only behaviour though. def test_ogr_mitab_32(): for update in (0, 1): ds = ogr.Open('data/aspatial-table.tab', update=update) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2, update f = lyr.GetNextFeature() assert f.GetField('a') == 1 and f.GetField('b') == 2 and f.GetField('d') == 'hello', \ update f = lyr.GetFeature(2) assert f.GetField('a') == 4, update ds = None ############################################################################### # Test opening and modifying a file created with MapInfo that consists of # a single object block, without index block def test_ogr_mitab_33(): for update in (0, 1): ds = ogr.Open('data/single_point_mapinfo.tab', update=update) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1, update f = lyr.GetNextFeature() assert f.GetField('toto') == '', update ds = None # Test adding a new object shutil.copy('data/single_point_mapinfo.tab', 'tmp') shutil.copy('data/single_point_mapinfo.dat', 'tmp') shutil.copy('data/single_point_mapinfo.id', 'tmp') shutil.copy('data/single_point_mapinfo.map', 'tmp') ds = ogr.Open('tmp/single_point_mapinfo.tab', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(1363180 7509810)')) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('tmp/single_point_mapinfo.tab') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 f = lyr.GetNextFeature() assert f is not None f = lyr.GetNextFeature() assert f is not None ds = None # Test replacing the existing object shutil.copy('data/single_point_mapinfo.tab', 'tmp') shutil.copy('data/single_point_mapinfo.dat', 'tmp') shutil.copy('data/single_point_mapinfo.id', 'tmp') shutil.copy('data/single_point_mapinfo.map', 'tmp') ds = ogr.Open('tmp/single_point_mapinfo.tab', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(1) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(1363180 7509810)')) lyr.SetFeature(f) f = None ds = None ds = ogr.Open('tmp/single_point_mapinfo.tab') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 f = lyr.GetNextFeature() assert f is not None ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/single_point_mapinfo.tab') ############################################################################### # Test updating a line that spans over several coordinate blocks def test_ogr_mitab_34(): filename = '/vsimem/ogr_mitab_34.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_mitab_34', options=['BOUNDS=-1000,0,1000,3000']) lyr.CreateField(ogr.FieldDefn('dummy', ogr.OFTString)) geom = ogr.Geometry(ogr.wkbLineString) for i in range(1000): geom.AddPoint_2D(i, i) for _ in range(2): f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(geom) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() lyr.GetNextFeature() # seek to another object geom = f.GetGeometryRef() geom.SetPoint_2D(0, -1000, 3000) lyr.SetFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() geom = f.GetGeometryRef() assert geom.GetX(0) == pytest.approx(-1000, abs=1e-2) and geom.GetY(0) == pytest.approx(3000, abs=1e-2) for i in range(999): assert geom.GetX(i + 1) == pytest.approx((i + 1), abs=1e-2) and geom.GetY(i + 1) == pytest.approx((i + 1), abs=1e-2) f = lyr.GetNextFeature() geom = f.GetGeometryRef() for i in range(1000): assert geom.GetX(i) == pytest.approx((i), abs=1e-2) and geom.GetY(i) == pytest.approx((i), abs=1e-2) ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test SRS support def get_srs_from_coordsys(coordsys): mif_filename = '/vsimem/foo.mif' f = gdal.VSIFOpenL(mif_filename, "wb") content = """Version 300 Charset "Neutral" Delimiter "," %s Columns 1 foo Char(254) Data NONE """ % coordsys content = content.encode('ascii') gdal.VSIFWriteL(content, 1, len(content), f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL(mif_filename[0:-3] + "mid", "wb") content = '""\n' content = content.encode('ascii') gdal.VSIFWriteL(content, 1, len(content), f) gdal.VSIFCloseL(f) ds = ogr.Open(mif_filename) srs = ds.GetLayer(0).GetSpatialRef() if srs is not None: srs = srs.Clone() gdal.Unlink(mif_filename) gdal.Unlink(mif_filename[0:-3] + "mid") return srs def get_coordsys_from_srs(srs): mif_filename = '/vsimem/foo.mif' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(mif_filename) lyr = ds.CreateLayer('foo', srs=srs) lyr.CreateField(ogr.FieldDefn('foo')) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) ds = None f = gdal.VSIFOpenL(mif_filename, "rb") data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink(mif_filename) gdal.Unlink(mif_filename[0:-3] + "mid") data = data[data.find('CoordSys'):] data = data[0:data.find('\n')] return data def test_ogr_mitab_35(): # Local/non-earth srs = osr.SpatialReference() coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys NonEarth Units "m"' srs = osr.SpatialReference('LOCAL_CS["foo"]') coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys NonEarth Units "m"' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt in ('LOCAL_CS["Nonearth",UNIT["Meter",1]]', 'LOCAL_CS["Nonearth",UNIT["Meter",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]') # Test units for mif_unit in ['mi', 'km', 'in', 'ft', 'yd', 'mm', 'cm', 'm', 'survey ft', 'nmi', 'li', 'ch', 'rd']: coordsys = 'CoordSys NonEarth Units "%s"' % mif_unit srs = get_srs_from_coordsys(coordsys) # print(srs) got_coordsys = get_coordsys_from_srs(srs) assert coordsys == got_coordsys, srs # Geographic srs = osr.SpatialReference() srs.ImportFromEPSG(4326) coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 1, 104' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt == 'GEOGCS["unnamed",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]' coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 1, 104' # Projected srs = osr.SpatialReference() srs.ImportFromEPSG(32631) coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 8, 104, "m", 3, 0, 0.9996, 500000, 0' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt == 'PROJCS["unnamed",GEOGCS["unnamed",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 8, 104, "m", 3, 0, 0.9996, 500000, 0' # Test round-tripping of projection methods for coordsys in ['CoordSys Earth Projection 1, 104', 'CoordSys Earth Projection 2, 104, "m", 1, 2', 'CoordSys Earth Projection 3, 104, "m", 1, 2, 3, 4, 5, 6', 'CoordSys Earth Projection 4, 104, "m", 1, 90, 90', 'CoordSys Earth Projection 5, 104, "m", 1, 90, 90', 'CoordSys Earth Projection 6, 104, "m", 1, 2, 3, 4, 5, 6', 'CoordSys Earth Projection 7, 104, "m", 1, 2, 3, 4, 5, 6', 'CoordSys Earth Projection 8, 104, "m", 1, 2, 3, 4, 5', 'CoordSys Earth Projection 9, 104, "m", 1, 2, 3, 4, 5, 6', 'CoordSys Earth Projection 10, 104, "m", 1', 'CoordSys Earth Projection 11, 104, "m", 1', 'CoordSys Earth Projection 12, 104, "m", 1', 'CoordSys Earth Projection 13, 104, "m", 1', 'CoordSys Earth Projection 14, 104, "m", 1', 'CoordSys Earth Projection 15, 104, "m", 1', 'CoordSys Earth Projection 16, 104, "m", 1', 'CoordSys Earth Projection 17, 104, "m", 1', 'CoordSys Earth Projection 18, 104, "m", 1, 2, 3, 4', 'CoordSys Earth Projection 19, 104, "m", 1, 2, 3, 4, 5, 6', 'CoordSys Earth Projection 20, 104, "m", 1, 2, 3, 4, 5', #'CoordSys Earth Projection 21, 104, "m", 1, 2, 3, 4, 5', #'CoordSys Earth Projection 22, 104, "m", 1, 2, 3, 4, 5', #'CoordSys Earth Projection 23, 104, "m", 1, 2, 3, 4, 5', #'CoordSys Earth Projection 24, 104, "m", 1, 2, 3, 4, 5', 'CoordSys Earth Projection 25, 104, "m", 1, 2, 3, 4', 'CoordSys Earth Projection 26, 104, "m", 1, 2', 'CoordSys Earth Projection 27, 104, "m", 1, 2, 3, 4', 'CoordSys Earth Projection 28, 104, "m", 1, 2, 90', # 'CoordSys Earth Projection 29, 104, "m", 1, 90, 90', # alias of 4 'CoordSys Earth Projection 30, 104, "m", 1, 2, 3, 4', 'CoordSys Earth Projection 31, 104, "m", 1, 2, 3, 4, 5', 'CoordSys Earth Projection 32, 104, "m", 1, 2, 3, 4, 5, 6', 'CoordSys Earth Projection 33, 104, "m", 1, 2, 3, 4', ]: srs = get_srs_from_coordsys(coordsys) # print(srs) got_coordsys = get_coordsys_from_srs(srs) # if got_coordsys.find(' Bounds') >= 0: # got_coordsys = got_coordsys[0:got_coordsys.find(' Bounds')] assert coordsys == got_coordsys, srs # Test TOWGS84 srs = osr.SpatialReference() srs.ImportFromEPSG(4322) coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 1, 103' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt in ('GEOGCS["unnamed",DATUM["WGS_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]', 'GEOGCS["unnamed",DATUM["World_Geodetic_System_1972",SPHEROID["WGS 72",6378135,298.26]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]') coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 1, 103' # Test Lambert 93 srs = osr.SpatialReference() srs.ImportFromEPSG(2154) coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49, 700000, 6600000' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt == 'PROJCS["RGF93 / Lambert-93",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 80",6378137,298.257222101],AUTHORITY["EPSG","6171"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["standard_parallel_1",49],PARAMETER["standard_parallel_2",44],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2154"]]' coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49, 700000, 6600000' srs = osr.SpatialReference('PROJCS["RGF93 / Lambert-93",GEOGCS["RGF93",DATUM["Reseau_Geodesique_Francais_1993",SPHEROID["GRS 80",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",49.00000000002],PARAMETER["standard_parallel_2",44],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",3],PARAMETER["false_easting",700000],PARAMETER["false_northing",6600000],UNIT["Meter",1.0],AUTHORITY["EPSG","2154"]]') coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49.00000000002, 700000, 6600000' gdal.SetConfigOption('MITAB_BOUNDS_FILE', 'data/mitab_bounds.txt') coordsys = get_coordsys_from_srs(srs) gdal.SetConfigOption('MITAB_BOUNDS_FILE', None) assert coordsys == 'CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49.00000000002, 700000, 6600000 Bounds (75000, 6000000) (1275000, 7200000)' # http://trac.osgeo.org/gdal/ticket/4115 srs = get_srs_from_coordsys('CoordSys Earth Projection 10, 157, "m", 0') wkt = srs.ExportToWkt() assert wkt == 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs"]]' # We don't round-trip currently # MIF 999 srs = osr.SpatialReference("""GEOGCS["unnamed", DATUM["MIF 999,1,1,2,3", SPHEROID["WGS 72",6378135,298.26]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""") coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 1, 999, 1, 1, 2, 3' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt == 'GEOGCS["unnamed",DATUM["MIF 999,1,1,2,3",SPHEROID["WGS 72",6378135,298.26],TOWGS84[1,2,3,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]' # MIF 9999 srs = osr.SpatialReference("""GEOGCS["unnamed", DATUM["MIF 9999,1,1,2,3,4,5,6,7,3", SPHEROID["WGS 72",6378135,298.26]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""") coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 1, 9999, 1, 1, 2, 3, 4, 5, 6, 7, 3' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt == 'GEOGCS["unnamed",DATUM["MIF 9999,1,1,2,3,4,5,6,7,3",SPHEROID["WGS 72",6378135,298.26],TOWGS84[1,2,3,-4,-5,-6,7]],PRIMEM["non-Greenwich",3],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]' # Test EPSG:2393 / KKJ srs = osr.SpatialReference("""PROJCS["KKJ / Finland Uniform Coordinate System",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Northing",NORTH],AXIS["Easting",EAST],AUTHORITY["EPSG","2393"]]""") coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 24, 1016, "m", 27, 0, 1, 3500000, 0' srs = get_srs_from_coordsys(coordsys) wkt = srs.ExportToWkt() assert wkt == 'PROJCS["unnamed",GEOGCS["unnamed",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",1],PARAMETER["false_easting",3500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' coordsys = get_coordsys_from_srs(srs) assert coordsys == 'CoordSys Earth Projection 24, 1016, "m", 27, 0, 1, 3500000, 0' ############################################################################### # Test opening and modifying a file with polygons created with MapInfo that consists of # a single object block, without index block def test_ogr_mitab_36(): # Test modifying a new object shutil.copy('data/polygon_without_index.tab', 'tmp') shutil.copy('data/polygon_without_index.dat', 'tmp') shutil.copy('data/polygon_without_index.id', 'tmp') shutil.copy('data/polygon_without_index.map', 'tmp') ds = ogr.Open('tmp/polygon_without_index.tab', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() ring = g.GetGeometryRef(0) ring.SetPoint_2D(1, ring.GetX(1) + 100, ring.GetY()) g = g.Clone() f.SetGeometry(g) lyr.SetFeature(f) f = None ds = None ds = ogr.Open('tmp/polygon_without_index.tab') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() got_g = f.GetGeometryRef() if ogrtest.check_feature_geometry(f, got_g, max_error=0.1): f.DumpReadable() pytest.fail(g) while True: f = lyr.GetNextFeature() if f is None: break ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/polygon_without_index.tab') ############################################################################### # Simple testing of Seamless tables def test_ogr_mitab_37(): ds = ogr.Open('data/seamless.tab') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 4 f = lyr.GetNextFeature() assert f.GetFID() == 4294967297 and f.id == '1' f = lyr.GetNextFeature() assert f.GetFID() == 4294967298 and f.id == '2' f = lyr.GetNextFeature() assert f.GetFID() == 8589934593 and f.id == '3' f = lyr.GetNextFeature() assert f.GetFID() == 8589934594 and f.id == '4' f = lyr.GetFeature(4294967297) assert f.GetFID() == 4294967297 and f.id == '1' f = lyr.GetFeature(8589934594) assert f.GetFID() == 8589934594 and f.id == '4' f = lyr.GetFeature(8589934594 + 1) assert f is None f = lyr.GetFeature(4294967297 * 2 + 1) assert f is None ############################################################################### # Open MIF with MID with TAB delimiter and empty first field (#5405) def test_ogr_mitab_38(): ds = ogr.Open('data/empty_first_field_with_tab_delimiter.mif') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['field1'] != '' or f['field2'] != 'foo': f.DumpReadable() pytest.fail() ############################################################################### # Read various geometry types from .mif def test_ogr_mitab_39(): ds = ogr.Open('data/all_geoms.mif') lyr = ds.GetLayer(0) ds_ref = ogr.Open('data/all_geoms.mif.golden.csv') lyr_ref = ds_ref.GetLayer(0) while True: f = lyr.GetNextFeature() f_ref = lyr_ref.GetNextFeature() if f is None: assert f_ref is None break if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0 or \ f.GetStyleString() != f_ref.GetStyleString(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() ############################################################################### # Read various geometry types from .mif but potentially truncated def test_ogr_mitab_40(): content = open('data/all_geoms.mif', 'rt').read() for i in range(len(content)): gdal.FileFromMemBuffer('/vsimem/ogr_mitab_40.mif', content[0:i]) with gdaltest.error_handler(): ds = ogr.Open('/vsimem/ogr_mitab_40.mif') if ds is not None: lyr = ds.GetLayer(0) for _ in lyr: pass gdal.Unlink('/vsimem/ogr_mitab_40.mif') ############################################################################### # Read various geometry types from .tab def test_ogr_mitab_41(): ds = ogr.Open('data/all_geoms.tab') lyr = ds.GetLayer(0) ds_ref = ogr.Open('data/all_geoms.mif.golden.csv') lyr_ref = ds_ref.GetLayer(0) while True: f = lyr.GetNextFeature() f_ref = lyr_ref.GetNextFeature() if f is None: assert f_ref is None break if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0 or \ f.GetStyleString() != f_ref.GetStyleString(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() ############################################################################### # Read various geometry types from .tab with block size = 32256 def test_ogr_mitab_42(): ds = ogr.Open('/vsizip/data/all_geoms_block_32256.zip') lyr = ds.GetLayer(0) ds_ref = ogr.Open('data/all_geoms.mif.golden.csv') lyr_ref = ds_ref.GetLayer(0) while True: f = lyr.GetNextFeature() f_ref = lyr_ref.GetNextFeature() if f is None: assert f_ref is None break if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0 or \ f.GetStyleString() != f_ref.GetStyleString(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() ############################################################################### # Test creating tab with block size = 32256 def test_ogr_mitab_43(): src_ds = gdal.OpenEx('/vsizip/data/all_geoms_block_32256.zip') gdal.VectorTranslate('/vsimem/all_geoms_block_512.tab', src_ds, format='MapInfo File') gdal.VectorTranslate('/vsimem/all_geoms_block_32256.tab', src_ds, format='MapInfo File', datasetCreationOptions=['BLOCKSIZE=32256']) with gdaltest.error_handler(): out_ds = gdal.VectorTranslate('/vsimem/all_geoms_block_invalid.tab', src_ds, format='MapInfo File', datasetCreationOptions=['BLOCKSIZE=32768']) assert out_ds is None gdal.Unlink('/vsimem/all_geoms_block_invalid.dat') src_ds = None size = gdal.VSIStatL('/vsimem/all_geoms_block_512.map').size assert size == 6144 size = gdal.VSIStatL('/vsimem/all_geoms_block_32256.map').size assert size == 161280 ds = ogr.Open('/vsimem/all_geoms_block_32256.tab') lyr = ds.GetLayer(0) ds_ref = ogr.Open('/vsimem/all_geoms_block_512.tab') lyr_ref = ds_ref.GetLayer(0) while True: f = lyr.GetNextFeature() f_ref = lyr_ref.GetNextFeature() if f is None: assert f_ref is None break if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0 or \ f.GetStyleString() != f_ref.GetStyleString(): f.DumpReadable() f_ref.DumpReadable() pytest.fail() gdaltest.mapinfo_drv.DeleteDataSource('/vsimem/all_geoms_block_512.tab') gdaltest.mapinfo_drv.DeleteDataSource('/vsimem/all_geoms_block_32256.tab') gdal.Unlink('/vsimem/all_geoms_block_32768.dat') ############################################################################### # Test limitation on width and precision of numeric fields in creation (#6392) def test_ogr_mitab_44(): ds = gdaltest.mapinfo_drv.CreateDataSource('/vsimem/ogr_mitab_44.mif') lyr = ds.CreateLayer('test') fld_defn = ogr.FieldDefn('test', ogr.OFTReal) fld_defn.SetWidth(30) fld_defn.SetPrecision(29) lyr.CreateField(fld_defn) ds = None ds = ogr.Open('/vsimem/ogr_mitab_44.mif') lyr = ds.GetLayer(0) fld_defn = lyr.GetLayerDefn().GetFieldDefn(0) assert fld_defn.GetWidth() == 20 and fld_defn.GetPrecision() == 16 ds = None gdaltest.mapinfo_drv.DeleteDataSource('/vsimem/ogr_mitab_44.mif') ############################################################################### # Test read/write MapInfo layers with encoding specified def test_ogr_mitab_45(): lyrNames = ['lyr1', 'lyr2'] # 0 1 2 3 # 012345678901234567890123456789012 fldNames = ['field1', 'абвгдежзийклмнопрстуфхцчшщьъэюя'] featNames = ['аз', 'буки', 'веди'] formats = ['MIF', 'TAB', 'MIF', 'TAB'] lyrNums = [1, 1, 2, 2] dsExts = ['.mif', '.tab', '', ''] for formatN, frmt in enumerate(formats): lyrCount = lyrNums[formatN] ext = dsExts[formatN] dsName = '/vsimem/45/ogr_mitab_45_%s_%s%s' % (frmt, lyrCount, ext) ds = gdaltest.mapinfo_drv.CreateDataSource(dsName, options=['FORMAT=' + frmt]) assert ds is not None, ('Can\'t create dataset: ' + dsName) for i in range(lyrCount): lyr = ds.CreateLayer(lyrNames[i], options=['ENCODING=CP1251']) assert lyr is not None, ('Can\'t create layer ' + lyrNames[i] + ' for ' + dsName) if lyr.TestCapability(ogr.OLCStringsAsUTF8) != 1: pytest.skip('skipping test: recode is not possible') for fldName in fldNames: fld_defn = ogr.FieldDefn(fldName, ogr.OFTString) fld_defn.SetWidth(254) lyr.CreateField(fld_defn) for featName in featNames: feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt("POINT (25 72)")) for fldName in fldNames: featValue = fldName + ' ' + featName feat.SetField(fldName, featValue) lyr.CreateFeature(feat) ds = None # reopen and check ds = ogr.Open(dsName) assert ds is not None, ('Can\'t reopen dataset: ' + dsName) for i in range(lyrCount): lyr = ds.GetLayer(i) assert lyr is not None, ('Can\'t get layer ' + lyrNames[i] + ' from ' + dsName) for fldN, expectedName in enumerate(fldNames): fldName = lyr.GetLayerDefn().GetFieldDefn(fldN).GetName() assert fldName == expectedName, ('Can\'t get field name\n' + ' result name: "' + fldName + '"\n' ' expected name: "' + expectedName + '"\n' ' from layer : ' + lyrNames[i] + ' from dataset :' + dsName) for featName in featNames: feat = lyr.GetNextFeature() for fldN, fldName in enumerate(fldNames): expectedValue = fldName + ' ' + featName # column value by number value = feat.GetField(fldN) assert value == expectedValue, \ ('Can\'t get field value by number\n' + ' result value: "' + value + '"\n' ' expected value: "' + expectedValue + '"\n' ' from layer : ' + lyrNames[i] + ' from dataset :' + dsName) # column value by name value = feat.GetField(fldNames[fldN]) assert value == expectedValue, \ ('Can\'t get field value by name\n' + ' result value: "' + value + '"\n' ' expected value: "' + expectedValue + '"\n' ' from layer : ' + lyrNames[i] + ' from dataset :' + dsName) gdaltest.mapinfo_drv.DeleteDataSource(dsName) ############################################################################### # Test read MapInfo layers with encoding specified def test_ogr_mitab_46(): dsNames = ['data/mitab/tab-win1251.TAB', 'data/mitab/win1251.mif'] fldNames = ['Поле_А', 'Поле_Б', 'Поле_В', 'Поле_Г', 'Поле_Д'] fldVal = [['Значение А', 'Значение Б', 'Значение В', 'Значение Г', 'Значение Д'], ['Значение 1', 'Значение 2', 'Значение 3', 'Значение 4', 'Значение 5'], ['Полигон', 'Синий', 'Заливка', 'А а Б б', 'ЪЫЁЩ']] for dsName in dsNames: ds = ogr.Open(dsName) assert ds is not None, ('Can\'t open dataset: ' + dsName) lyr = ds.GetLayer(0) assert lyr is not None, ('Can\'t get layer 0 from ' + dsName) if lyr.TestCapability(ogr.OLCStringsAsUTF8) != 1: pytest.skip('skipping test: recode is not possible') for fldN, expectedName in enumerate(fldNames): fldName = lyr.GetLayerDefn().GetFieldDefn(fldN).GetName() assert fldName == expectedName, ('Can\'t get field\n' + ' result name: "' + fldName + '"\n' ' expected name: "' + expectedName + '"\n' ' from dataset :' + dsName) for featFldVal in fldVal: feat = lyr.GetNextFeature() for fldN, fldName in enumerate(fldNames): expectedValue = featFldVal[fldN] # column value by number value = feat.GetField(fldN) assert value == expectedValue, ('Can\'t get field value by number\n' + ' result value: "' + value + '"\n' ' expected value: "' + expectedValue + '"\n' ' from dataset :' + dsName) # column value by name value = feat.GetField(fldName) assert value == expectedValue, ('Can\'t get field value by name\n' + ' result value: "' + value + '"\n' ' expected value: "' + expectedValue + '"\n' ' from dataset :' + dsName) ############################################################################### # Test opening a dataset with a .ind file def test_ogr_mitab_47(): ds = ogr.Open('data/poly_indexed.tab') lyr = ds.GetLayer(0) lyr.SetAttributeFilter("PRFEDEA = '35043413'") assert lyr.GetFeatureCount() == 1 for ext in ('tab', 'dat', 'map', 'id'): gdal.FileFromMemBuffer('/vsimem/poly_indexed.' + ext, open('data/poly_indexed.' + ext, 'rb').read()) ds = ogr.Open('/vsimem/poly_indexed.tab') lyr = ds.GetLayer(0) lyr.SetAttributeFilter("PRFEDEA = '35043413'") assert lyr.GetFeatureCount() == 1 ds = None for ext in ('tab', 'dat', 'map', 'id'): gdal.Unlink('/vsimem/poly_indexed.' + ext) ############################################################################### # Test writing and reading LCC_1SP def test_ogr_mitab_48(): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('/vsimem/test.mif') sr = osr.SpatialReference() sr.SetFromUserInput("""PROJCS["NTF (Paris) / France IV (deprecated)", GEOGCS["NTF (Paris)", DATUM["Nouvelle_Triangulation_Francaise_Paris", SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269, AUTHORITY["EPSG","7011"]], TOWGS84[-168,-60,320,0,0,0,0], AUTHORITY["EPSG","6807"]], PRIMEM["Paris",2.33722917, AUTHORITY["EPSG","8903"]], UNIT["grad",0.01570796326794897, AUTHORITY["EPSG","9105"]], AUTHORITY["EPSG","4807"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",46.85], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","27584"]]""") lyr = ds.CreateLayer('foo', srs=sr) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ds = None ds = ogr.Open('/vsimem/test.mif') lyr = ds.GetLayer(0) sr_got = lyr.GetSpatialRef() ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource('/vsimem/test.mif') sr_expected = osr.SpatialReference() sr_expected.SetFromUserInput("""PROJCS["unnamed", GEOGCS["unnamed", DATUM["NTF_Paris_Meridian", SPHEROID["Clarke 1880 (modified for IGN)",6378249.2,293.4660213], TOWGS84[-168,-60,320,0,0,0,0]], PRIMEM["Paris",2.33722917], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",42.165], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.99994471], PARAMETER["false_easting",234.358], PARAMETER["false_northing",4185861.369], UNIT["metre",1]]""") assert sr_got.IsSame(sr_expected) != 0, sr_got.ExportToPrettyWkt() ############################################################################### # Test reading an aspatial TAB file. def test_ogr_mitab_49_aspatial(): ds = ogr.GetDriverByName('MapInfo File').Open('data/mitab/aspatial.tab') lyr = ds.GetLayer(0) geom_type = lyr.GetLayerDefn().GetGeomType() assert geom_type == ogr.wkbNone assert lyr.GetSpatialRef() is None assert lyr.GetExtent(can_return_null=True) is None ############################################################################### # Test creating an indexed field def test_ogr_mitab_tab_field_index_creation(): layername = 'ogr_mitab_tab_field_index_creation' filename = '/vsimem/' + layername + '.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer(layername) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('other_field', ogr.OFTInteger)) with gdaltest.error_handler(): ds.ExecuteSQL('CREATE INDEX ON foo USING id') ds.ExecuteSQL('CREATE INDEX ON ' + layername + ' USING foo') ds.ExecuteSQL('CREATE INDEX ON ' + layername + ' USING id') ds.ExecuteSQL('CREATE INDEX ON ' + layername + ' USING id') f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 100) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 200) lyr.CreateFeature(f) ds = None assert gdal.VSIStatL('/vsimem/' + layername + '.ind') is not None, 'no ind file' ds = ogr.Open(filename) with gdaltest.error_handler(): ds.ExecuteSQL('CREATE INDEX ON ' + layername + ' USING other_field') lyr = ds.GetLayer(0) lyr.SetAttributeFilter('id = 200') assert lyr.GetFeatureCount() == 1, 'bad feature count' ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test reading a tab_view file def test_ogr_mitab_tab_view(): ds = ogr.Open('data/mitab/view_first_table_second_table.tab') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2, 'bad field count' f = lyr.GetNextFeature() if f['ID'] != 100 or f['foo'] != 'foo': f.DumpReadable() pytest.fail('bad feature') ds = None ds = ogr.Open('data/mitab/view_select_all_first_table_second_table.tab') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 3, 'bad field count' f = lyr.GetNextFeature() if f['joint_field'] != 1 or f['ID'] != 100 or f['foo'] != 'foo': f.DumpReadable() pytest.fail('bad feature') ds = None ############################################################################### def test_ogr_mitab_style(): tmpfile = '/vsimem/ogr_mitab_style.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(tmpfile) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) f.SetStyleString("BRUSH(fc:#AABBCC,bc:#DDEEFF);PEN(c:#DDEEFF)") lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) f.SetStyleString('BRUSH(fc:#AABBCC,id:"mapinfo-brush-1")') lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) f.SetStyleString('BRUSH(fc:#AABBCC00,bc:#ddeeff00)') lyr.CreateFeature(f) ds = None ds = ogr.Open(tmpfile) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#aabbcc,bc:#ddeeff,id:"mapinfo-brush-2,ogr-brush-0");PEN(w:1px,c:#ddeeff,id:"mapinfo-pen-2,ogr-pen-0")': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#aabbcc,id:"mapinfo-brush-1,ogr-brush-1");PEN(w:1px,c:#000000,id:"mapinfo-pen-2,ogr-pen-0")': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetStyleString() != 'BRUSH(fc:#aabbcc,id:"mapinfo-brush-1,ogr-brush-1");PEN(w:1px,c:#000000,id:"mapinfo-pen-2,ogr-pen-0")': f.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(tmpfile) ############################################################################### def test_ogr_mitab_tab_write_field_name_with_dot(): tmpfile = '/vsimem/ogr_mitab_tab_write_field_name_with_dot.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(tmpfile) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('with.dot', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f['with.dot'] = 1 f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(2 3)')) lyr.CreateFeature(f) with gdaltest.error_handler(): ds = None ds = ogr.Open(tmpfile) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['with_dot'] == 1 ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(tmpfile) ############################################################################### # Test read text labels with local encoding from mif/mid file def test_ogr_mitab_local_encoding_label(): dsNames = ['data/mitab/win1251_text.mif', 'data/mitab/tab-win1251_text.tab'] expectedStyles = ['LABEL(t:"Поле",a:0.000000,s:2.070000g,c:#ff0000,p:2,f:"DejaVu Serif")', 'LABEL(t:"Поле",a:0.000000,s:0.015375g,c:#000000,p:1,f:"Times New Roman")'] for (dsName, expectedStyle) in zip(dsNames, expectedStyles): ds = ogr.Open(dsName) assert ds is not None, ('Can\'t open dataset: ' + dsName) lyr = ds.GetLayer(0) assert lyr is not None, ('Can\'t get layer 0 from ' + dsName) if lyr.TestCapability(ogr.OLCStringsAsUTF8) != 1: pytest.skip('skipping test: recode is not possible') feat = lyr.GetNextFeature() assert lyr is not None, ('Can\'t find text feature in' + dsName) assert feat.GetStyleString() == expectedStyle, (feat.GetStyleString(), expectedStyle) ############################################################################### # Check fix for https://github.com/OSGeo/gdal/issues/1232 def test_ogr_mitab_delete_feature_no_geometry(): filename = '/vsimem/test.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test', geom_type = ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 1 lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 2 lyr.CreateFeature(f) ds = None ds = ogr.Open(filename, update=1) lyr = ds.GetLayer(0) assert lyr.DeleteFeature(1) == 0 ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['id'] == 2 ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Check fix for https://github.com/OSGeo/gdal/issues/1636 def test_ogr_mitab_too_large_value_for_decimal_field(): filename = '/vsimem/test.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer('test', geom_type = ogr.wkbNone) fld = ogr.FieldDefn('f', ogr.OFTReal) fld.SetWidth(20) fld.SetPrecision(12) lyr.CreateField(fld) f = ogr.Feature(lyr.GetLayerDefn()) f['f'] = 1234567.012 assert lyr.CreateFeature(f) == ogr.OGRERR_NONE f = None f = ogr.Feature(lyr.GetLayerDefn()) f['f'] = 123456789.012 with gdaltest.error_handler(): assert lyr.CreateFeature(f) != ogr.OGRERR_NONE f = None ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Check custom datum/spheroid parameters export def test_ogr_mitab_custom_datum_export(): sr = osr.SpatialReference() sr.SetGeogCS('Custom', 'Custom', 'Sphere', 6370997.0, 0.0) sr.SetTOWGS84(1, 2, 3, 4, 5, 6, 7) proj = sr.ExportToMICoordSys() assert proj == 'Earth Projection 1, 9999, 12, 1, 2, 3, -4, -5, -6, -7, 0' sr = osr.SpatialReference() sr.SetGeogCS('Custom', 'Custom', 'NWL-9D or WGS-66', 6378145.0, 298.25) sr.SetTOWGS84(1, 2, 3, 4, 5, 6, 7) sr.SetUTM(33) proj = sr.ExportToMICoordSys() assert proj == 'Earth Projection 8, 9999, 42, 1, 2, 3, -4, -5, -6, -7, 0, "m", 15, 0, 0.9996, 500000, 0' ############################################################################### # Check write/read description def test_ogr_mitab_description(): filename = '/vsimem/test_description.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) assert ds is not None, ('Can\'t create dataset: ' + filename) test_description = 'Состав данных: Топокарты (растр) 1:50К, 100К, 250К, 500К, Топокарты (вектор) 1:100К, 1:250К, ЦМР 10м, Реестр географических названий 1:100000, АТД 1:10000, лидарная съемка, ортофото. Лицензия: на геоданные - ограничительная, не соответствующая определению "открытых данных", так как запрещено распространение данных.' lyr = ds.CreateLayer('test_description', options=['ENCODING=CP1251', 'DESCRIPTION={}'.format(test_description)]) assert lyr is not None, ('Can\'t create layer "test_description"') if lyr.TestCapability(ogr.OLCStringsAsUTF8) != 1: pytest.skip('skipping test: recode is not possible') lyr.CreateField(ogr.FieldDefn('feature_id', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('other_field', ogr.OFTInteger)) # Check description truncate. check_text = 'Состав данных: Топокарты (растр) 1:50К, 100К, 250К, 500К, Топокарты (вектор) 1:100К, 1:250К, ЦМР 10м, Реестр географических названий 1:100000, АТД 1:10000, лидарная съемка, ортофото. Лицензия: на геоданные - ограничительная, не соответствующая определению "открытых данных", так как запрещено распростр' assert check_text == lyr.GetMetadataItem('DESCRIPTION') ds = None # Check storing description in tab file. ds = ogr.Open(filename, update=1) assert ds is not None, ('Can\'t open dataset: ' + filename) lyr = ds.GetLayer(0) assert lyr is not None, ('Can\'t get layer 0 from ' + filename) assert check_text == lyr.GetMetadataItem('DESCRIPTION') # Check update description in tab file. check_short_text = 'Состав данных: Топокарты (растр) 1:50К, 100К, 250К, 500К' lyr.SetMetadataItem('DESCRIPTION', check_short_text) ds = None ds = ogr.Open(filename) assert ds is not None, ('Can\'t open dataset: ' + filename) lyr = ds.GetLayer(0) assert lyr is not None, ('Can\'t get layer 0 from ' + filename) assert check_short_text == lyr.GetMetadataItem('DESCRIPTION') ds = None # Check line breaks and double quotes test_description = 'Состав данных: "Топокарты (растр)"\n1:50К,\n100К,\n250К,\n500К\r\n"new line"' check_description = 'Состав данных: "Топокарты (растр)" 1:50К, 100К, 250К, 500К "new line"' ds = ogr.Open(filename, update=1) assert ds is not None, ('Can\'t open dataset: ' + filename) lyr = ds.GetLayer(0) assert lyr is not None, ('Can\'t get layer 0 from ' + filename) lyr.SetMetadataItem('DESCRIPTION', test_description) ds = None ds = ogr.Open(filename) assert ds is not None, ('Can\'t open dataset: ' + filename) lyr = ds.GetLayer(0) assert lyr is not None, ('Can\'t get layer 0 from ' + filename) assert check_description == lyr.GetMetadataItem('DESCRIPTION') ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # Test writing and reading back unset/null date, time, datetime def test_ogr_mitab_nulldatetime(): filename = '/vsimem/nulldatetime.tab' ds = ogr.GetDriverByName('MapInfo File').CreateDataSource(filename) lyr = ds.CreateLayer("nulldatetime") lyr.CreateField(ogr.FieldDefn("time", ogr.OFTTime)) lyr.CreateField(ogr.FieldDefn("date", ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn("datetime", ogr.OFTDateTime)) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert not f.IsFieldSet("time") assert not f.IsFieldSet("date") assert not f.IsFieldSet("datetime") ds = None ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename) ############################################################################### # def test_ogr_mitab_cleanup(): if gdaltest.mapinfo_ds is None: pytest.skip() fl = gdal.ReadDir('/vsimem/') if fl is not None: print(fl) gdaltest.mapinfo_ds = None gdaltest.mapinfo_drv.DeleteDataSource('tmp') gdalautotest-3.1.2/ogr/ogr_nas.py0000775000175000017500000002345713701060010015466 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_nas.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: NAS Reading Driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest import ogrtest from osgeo import ogr import pytest # Other test data : # http://www.lv-bw.de/alkis.info/nas-bsp.html # http://www.lv-bw.de/lvshop2/Produktinfo/AAA/AAA.html # http://www.gll.niedersachsen.de/live/live.php?navigation_id=10640&article_id=51644&_psmand=34 ############################################################################### # Test reading a NAS file # def test_ogr_nas_1(): drv = ogr.GetDriverByName('NAS') if drv is None: pytest.skip() if not gdaltest.download_file('http://www.geodatenzentrum.de/gdz1/abgabe/testdaten/vektor/nas_testdaten_peine.zip', 'nas_testdaten_peine.zip'): pytest.skip() try: os.stat('tmp/cache/BKG_NAS_Peine.xml') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/nas_testdaten_peine.zip') try: os.stat('tmp/cache/BKG_NAS_Peine.xml') except OSError: pytest.skip() except OSError: pytest.skip() try: os.remove('tmp/cache/BKG_NAS_Peine.gfs') except OSError: pass ds = ogr.Open('tmp/cache/BKG_NAS_Peine.xml') assert ds is not None, 'could not open dataset' assert ds.GetLayerCount() == 41, 'did not get expected layer count' lyr = ds.GetLayerByName('AX_Wohnplatz') feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() if feat.GetField('name') != 'Ziegelei' or geom.ExportToWkt() != 'POINT (3575300 5805100)': feat.DumpReadable() pytest.fail() relation_lyr = ds.GetLayerByName('ALKIS_beziehungen') feat = relation_lyr.GetNextFeature() if feat.GetField('beziehung_von') != 'DENIBKG1000001UG' or \ feat.GetField('beziehungsart') != 'istTeilVon' or \ feat.GetField('beziehung_zu') != 'DENIBKG1000000T6': feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test reading a sample NAS file from PostNAS # def test_ogr_nas_2(): drv = ogr.GetDriverByName('NAS') if drv is None: pytest.skip() if not gdaltest.download_file('http://trac.wheregroup.com/PostNAS/browser/trunk/demodaten/lverm_geo_rlp/gid-6.0/gm2566-testdaten-gid60-2008-11-11.xml.zip?format=raw', 'gm2566-testdaten-gid60-2008-11-11.xml.zip'): pytest.skip() try: os.stat('tmp/cache/gm2566-testdaten-gid60-2008-11-11.xml') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/gm2566-testdaten-gid60-2008-11-11.xml.zip') try: os.stat('tmp/cache/gm2566-testdaten-gid60-2008-11-11.xml') except OSError: pytest.skip() except OSError: pytest.skip() try: os.remove('tmp/cache/gm2566-testdaten-gid60-2008-11-11.gfs') except OSError: pass ds = ogr.Open('tmp/cache/gm2566-testdaten-gid60-2008-11-11.xml') assert ds is not None, 'could not open dataset' assert ds.GetLayerCount() == 85, 'did not get expected layer count' lyr = ds.GetLayerByName('AX_Flurstueck') # Loop until a feature that has a complex geometry including feat = lyr.GetNextFeature() while feat is not None and feat.GetField('identifier') != 'urn:adv:oid:DERP1234000002Iz': feat = lyr.GetNextFeature() assert feat is not None # expected_geom = 'POLYGON ((350821.045 5532031.37,350924.309 5532029.513,350938.493 5532026.622,350951.435 5532021.471,350978.7 5532007.18,351026.406 5531971.088,351032.251 5531951.162,351080.623 5531942.67,351154.886 5531963.718,351207.689 5532019.797,351211.063 5532044.067,351203.83 5532074.034,351165.959 5532114.315,351152.85 5532135.774,351141.396 5532140.355,351110.659 5532137.542,351080.17 5532132.742,351002.887 5532120.75,350925.682 5532108.264,350848.556 5532095.285,350771.515 5532081.814,350769.548 5532071.196,350812.194 5532034.716,350821.045 5532031.37))' expected_geom = 'CURVEPOLYGON (COMPOUNDCURVE ((350821.045 5532031.37,350924.309 5532029.513,350938.493 5532026.622,350951.435 5532021.471,350978.7 5532007.18,351026.406 5531971.088,351032.251 5531951.16199999955),(351032.251 5531951.16199999955,351080.623 5531942.67,351154.886 5531963.718),(351154.886 5531963.718,351207.689 5532019.797),(351207.689 5532019.797,351211.063 5532044.06699999981,351203.83 5532074.034,351165.959 5532114.315,351152.85 5532135.774),(351152.85 5532135.774,351141.396 5532140.355),CIRCULARSTRING (351141.396 5532140.355,351110.659 5532137.542,351080.17 5532132.74199999962),CIRCULARSTRING (351080.17 5532132.74199999962,351002.887 5532120.75,350925.682 5532108.264),CIRCULARSTRING (350925.682 5532108.264,350848.556 5532095.285,350771.515 5532081.814),(350771.515 5532081.814,350769.548 5532071.196,350812.194 5532034.716,350821.045 5532031.37)))' if ogrtest.check_feature_geometry(feat, expected_geom) != 0: geom = feat.GetGeometryRef() pytest.fail(geom) ds = None ############################################################################### # Test that we can open and read empty files successfully. # def test_ogr_nas_3(): drv = ogr.GetDriverByName('NAS') if drv is None: pytest.skip() ds = ogr.Open('data/empty_nas.xml') assert ds is not None, 'could not open dataset' assert ds.GetLayerCount() == 1, 'did not get expected layer count' ds = None ############################################################################### # Test that we can read files with wfs:Delete transactions in them properly. # def test_ogr_nas_4(): drv = ogr.GetDriverByName('NAS') if drv is None: pytest.skip() try: os.remove('data/delete_nas.gfs') except OSError: pass ds = ogr.Open('data/delete_nas.xml') assert ds is not None, 'could not open dataset' assert ds.GetLayerCount() == 2, 'did not get expected layer count' del_lyr = ds.GetLayerByName('Delete') assert del_lyr.GetFeatureCount() == 3, 'did not get expected number of features' del_lyr.ResetReading() feat = del_lyr.GetNextFeature() assert feat.GetField('context') == 'Delete', 'did not get expected context' assert feat.GetField('typeName') == 'AX_Namensnummer', \ 'did not get expected typeName' assert feat.GetField('FeatureId') == 'DENW44AL00000HJU20100730T092847Z', \ 'did not get expected FeatureId' del_lyr = None ds = None try: os.remove('data/delete_nas.gfs') except OSError: pass ############################################################################### # Test that we can read files with wfsext:Replace transactions properly # def test_ogr_nas_5(): drv = ogr.GetDriverByName('NAS') if drv is None: pytest.skip() try: os.remove('data/replace_nas.gfs') except OSError: pass ds = ogr.Open('data/replace_nas.xml') assert ds is not None, 'could not open dataset' assert ds.GetLayerCount() == 3, 'did not get expected layer count' # Check the delete operation created for the replace del_lyr = ds.GetLayerByName('Delete') assert del_lyr.GetFeatureCount() == 1, 'did not get expected number of features' del_lyr.ResetReading() feat = del_lyr.GetNextFeature() assert feat.GetField('context') == 'Replace', 'did not get expected context' assert feat.GetField('replacedBy') == 'DENW44AL00003IkM20110429T070635Z', \ 'did not get expected replacedBy' assert feat.GetField('safeToIgnore') == 'false', 'did not get expected safeToIgnore' assert feat.GetField('typeName') == 'AX_Flurstueck', 'did not get expected typeName' assert feat.GetField('FeatureId') == 'DENW44AL00003IkM20100809T071726Z', \ 'did not get expected FeatureId' del_lyr = None # Check also the feature created by the Replace lyr = ds.GetLayerByName('AX_Flurstueck') assert lyr.GetFeatureCount() == 1, 'did not get expected number of features' lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField('gml_id') == 'DENW44AL00003IkM20110429T070635Z', \ 'did not get expected gml_id' assert feat.GetField('stelle') == 5212, 'did not get expected stelle' lyr = None ds = None try: os.remove('data/replace_nas.gfs') except OSError: pass gdalautotest-3.1.2/ogr/ogr_fgdb.py0000775000175000017500000022422013701060010015576 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_fgdb.py 63303d76d675c795cf21eee89e9666605b4ea483 2020-06-26 19:37:27 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: FGDB driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test if driver is available def test_ogr_fgdb_init(): ogrtest.fgdb_drv = None ogrtest.fgdb_drv = ogr.GetDriverByName('FileGDB') if ogrtest.fgdb_drv is None: pytest.skip() ogrtest.openfilegdb_drv = ogr.GetDriverByName('OpenFileGDB') if ogrtest.openfilegdb_drv is not None: ogrtest.openfilegdb_drv.Deregister() try: shutil.rmtree("tmp/test.gdb") except OSError: pass ############################################################################### def ogr_fgdb_is_sdk_1_4_or_later(): if ogrtest.fgdb_drv is None: return False if hasattr(ogrtest, 'fgdb_is_sdk_1_4'): return ogrtest.fgdb_is_sdk_1_4 ogrtest.fgdb_is_sdk_1_4 = False try: shutil.rmtree("tmp/ogr_fgdb_is_sdk_1_4_or_later.gdb") except OSError: pass ds = ogrtest.fgdb_drv.CreateDataSource("tmp/ogr_fgdb_is_sdk_1_4_or_later.gdb") srs = osr.SpatialReference() srs.ImportFromProj4('+proj=tmerc +datum=WGS84 +no_defs') with gdaltest.error_handler(): lyr = ds.CreateLayer('test', srs=srs, geom_type=ogr.wkbPoint) if lyr is not None: ogrtest.fgdb_is_sdk_1_4 = True ds = None shutil.rmtree("tmp/ogr_fgdb_is_sdk_1_4_or_later.gdb") return ogrtest.fgdb_is_sdk_1_4 ############################################################################### # Write and read back various geometry types def test_ogr_fgdb_1(): if ogrtest.fgdb_drv is None: pytest.skip() srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") ds = ogrtest.fgdb_drv.CreateDataSource("tmp/test.gdb") datalist = [["none", ogr.wkbNone, None], ["point", ogr.wkbPoint, "POINT (1 2)"], ["multipoint", ogr.wkbMultiPoint, "MULTIPOINT (1 2,3 4)"], ["linestring", ogr.wkbLineString, "LINESTRING (1 2,3 4)", "MULTILINESTRING ((1 2,3 4))"], ["multilinestring", ogr.wkbMultiLineString, "MULTILINESTRING ((1 2,3 4),(5 6,7 8))"], ["polygon", ogr.wkbPolygon, "POLYGON ((0 0,0 1,1 1,1 0,0 0))", "MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))"], ["multipolygon", ogr.wkbMultiPolygon, "MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0),(0.25 0.25,0.75 0.25,0.75 0.75,0.25 0.75,0.25 0.25)),((2 0,2 1,3 1,3 0,2 0)))"], ["point25D", ogr.wkbPoint25D, "POINT (1 2 3)"], ["multipoint25D", ogr.wkbMultiPoint25D, "MULTIPOINT (1 2 -10,3 4 -20)"], ["linestring25D", ogr.wkbLineString25D, "LINESTRING (1 2 -10,3 4 -20)", "MULTILINESTRING ((1 2 -10,3 4 -20))"], ["multilinestring25D", ogr.wkbMultiLineString25D, "MULTILINESTRING ((1 2 -10,3 4 -20))"], ["polygon25D", ogr.wkbPolygon25D, "POLYGON ((0 0 -10,0 1 -10,1 1 -10,1 0 -10,0 0 -10))", "MULTIPOLYGON (((0 0 -10,0 1 -10,1 1 -10,1 0 -10,0 0 -10)))"], ["multipolygon25D", ogr.wkbMultiPolygon25D, "MULTIPOLYGON (((0 0 -10,0 1 -10,1 1 -10,1 0 -10,0 0 -10)))"], ["multipatch", ogr.wkbMultiPolygon25D, "GEOMETRYCOLLECTION Z (TIN Z (((0.0 0.0 0,0.0 1.0 0,1.0 0.0 0,0.0 0.0 0)),((0.0 1.0 0,1.0 0.0 0,1.0 1.0 0,0.0 1.0 0))),TIN Z (((10.0 0.0 0,10.0 1.0 0,11.0 0.0 0,10.0 0.0 0)),((10.0 0.0 0,11.0 0.0 0,10.0 -1.0 0,10.0 0.0 0))),TIN Z (((5.0 0.0 0,5.0 1.0 0,6.0 0.0 0,5.0 0.0 0))),MULTIPOLYGON Z (((100.0 0.0 0,100.0 1.0 0,101.0 1.0 0,101.0 0.0 0,100.0 0.0 0),(100.25 0.25 0,100.75 0.25 0,100.75 0.75 0,100.75 0.25 0,100.25 0.25 0))))"], ["tin", ogr.wkbTINZ, "TIN Z (((0.0 0.0 0,0.0 1.0 0,1.0 0.0 0,0.0 0.0 0)),((0.0 1.0 0,1.0 0.0 0,1.0 1.0 0,0.0 1.0 0)))"], ["null_polygon", ogr.wkbPolygon, None], ["empty_polygon", ogr.wkbPolygon, "POLYGON EMPTY", None], ] options = ['COLUMN_TYPES=smallint=esriFieldTypeSmallInteger,float=esriFieldTypeSingle,guid=esriFieldTypeGUID,xml=esriFieldTypeXML'] for data in datalist: if data[1] == ogr.wkbNone: lyr = ds.CreateLayer(data[0], geom_type=data[1], options=options) elif data[0] == 'multipatch': lyr = ds.CreateLayer(data[0], geom_type=data[1], srs=srs, options=['CREATE_MULTIPATCH=YES', options[0]]) else: lyr = ds.CreateLayer(data[0], geom_type=data[1], srs=srs, options=options) lyr.CreateField(ogr.FieldDefn("id", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("str", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("smallint", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("int", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("float", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("real", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("adate", ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn("guid", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("xml", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("binary", ogr.OFTBinary)) lyr.CreateField(ogr.FieldDefn("binary2", ogr.OFTBinary)) fld_defn = ogr.FieldDefn("smallint2", ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn("float2", ogr.OFTReal) fld_defn.SetSubType(ogr.OFSTFloat32) lyr.CreateField(fld_defn) # We need at least 5 features so that test_ogrsf can test SetFeature() for i in range(5): feat = ogr.Feature(lyr.GetLayerDefn()) if data[1] != ogr.wkbNone and data[2] is not None: feat.SetGeometry(ogr.CreateGeometryFromWkt(data[2])) feat.SetField("id", i + 1) feat.SetField("str", "foo_\xc3\xa9") feat.SetField("smallint", -13) feat.SetField("int", 123) feat.SetField("float", 1.5) feat.SetField("real", 4.56) feat.SetField("adate", "2013/12/26 12:34:56") feat.SetField("guid", "{12345678-9abc-DEF0-1234-567890ABCDEF}") feat.SetField("xml", "") feat.SetFieldBinaryFromHexString("binary", "00FF7F") feat.SetFieldBinaryFromHexString("binary2", "123456") feat.SetField("smallint2", -32768) feat.SetField("float2", 1.5) lyr.CreateFeature(feat) for data in datalist: lyr = ds.GetLayerByName(data[0]) if data[1] != ogr.wkbNone: assert lyr.GetSpatialRef().IsSame(srs, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']) == 1 feat = lyr.GetNextFeature() if data[1] != ogr.wkbNone: try: expected_wkt = data[3] except IndexError: expected_wkt = data[2] if expected_wkt is None: if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail(data) elif ogrtest.check_feature_geometry(feat, expected_wkt) != 0: feat.DumpReadable() pytest.fail(data) if feat.GetField('id') != 1 or \ feat.GetField('smallint') != -13 or \ feat.GetField('int') != 123 or \ feat.GetField('float') != 1.5 or \ feat.GetField('real') != 4.56 or \ feat.GetField('adate') != "2013/12/26 12:34:56" or \ feat.GetField('guid') != "{12345678-9ABC-DEF0-1234-567890ABCDEF}" or \ feat.GetField('xml') != "" or \ feat.GetField('binary') != "00FF7F" or \ feat.GetField('binary2') != "123456" or \ feat.GetField('smallint2') != -32768: feat.DumpReadable() pytest.fail() sql_lyr = ds.ExecuteSQL("GetLayerDefinition %s" % lyr.GetName()) assert sql_lyr is not None feat = sql_lyr.GetNextFeature() assert feat is not None feat = sql_lyr.GetNextFeature() assert feat is None lyr.ResetReading() lyr.TestCapability("foo") ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("GetLayerMetadata %s" % lyr.GetName()) assert sql_lyr is not None feat = sql_lyr.GetNextFeature() assert feat is not None ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("GetLayerDefinition foo") assert sql_lyr is None sql_lyr = ds.ExecuteSQL("GetLayerMetadata foo") assert sql_lyr is None ds = None ############################################################################### # Test DeleteField() def test_ogr_fgdb_DeleteField(): if ogrtest.fgdb_drv is None: pytest.skip() ds = ogr.Open("tmp/test.gdb", update=1) lyr = ds.GetLayerByIndex(0) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('smallint')).GetSubType() == ogr.OFSTInt16 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('smallint2')).GetSubType() == ogr.OFSTInt16 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('float')).GetSubType() == ogr.OFSTFloat32 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('float2')).GetSubType() == ogr.OFSTFloat32 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('smallint')).GetWidth() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('str')).GetWidth() == 0 assert lyr.DeleteField(lyr.GetLayerDefn().GetFieldIndex('str')) == 0 # Needed since FileGDB v1.4, otherwise crash/error ... if True: # pylint: disable=using-constant-test ds = ogr.Open("tmp/test.gdb", update=1) lyr = ds.GetLayerByIndex(0) fld_defn = ogr.FieldDefn("str2", ogr.OFTString) fld_defn.SetWidth(80) lyr.CreateField(fld_defn) feat = lyr.GetNextFeature() feat.SetField("str2", "foo2_\xc3\xa9") lyr.SetFeature(feat) # Test updating non-existing feature feat.SetFID(-10) assert lyr.SetFeature(feat) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of SetFeature().' # Test deleting non-existing feature assert lyr.DeleteFeature(-10) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of DeleteFeature().' feat = None ds = None ds = ogr.Open("tmp/test.gdb") lyr = ds.GetLayerByIndex(0) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('str2')).GetWidth() == 80 assert lyr.GetLayerDefn().GetFieldIndex('str') == -1 feat = lyr.GetNextFeature() assert feat.GetFieldAsString("str2") == "foo2_\xc3\xa9" ds = None ############################################################################### # Run test_ogrsf def test_ogr_fgdb_2(): if ogrtest.fgdb_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/test.gdb --config OGR_SKIP OpenFileGDB') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Run ogr2ogr def test_ogr_fgdb_3(): if ogrtest.fgdb_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: shutil.rmtree("tmp/poly.gdb") except OSError: pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f filegdb tmp/poly.gdb data/poly.shp -nlt MULTIPOLYGON -a_srs None') ds = ogr.Open('tmp/poly.gdb') assert not (ds is None or ds.GetLayerCount() == 0), 'ogr2ogr failed' ds = None if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/poly.gdb') # print ret assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test SQL support def test_ogr_fgdb_sql(): if ogrtest.fgdb_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() ds = ogr.Open('tmp/poly.gdb') ds.ExecuteSQL("CREATE INDEX idx_poly_eas_id ON poly(EAS_ID)") sql_lyr = ds.ExecuteSQL("SELECT * FROM POLY WHERE EAS_ID = 170", dialect='FileGDB') feat = sql_lyr.GetNextFeature() assert feat is not None feat = sql_lyr.GetNextFeature() assert feat is None feat = None ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test delete layer def test_ogr_fgdb_4(): if ogrtest.fgdb_drv is None: pytest.skip() for j in range(2): # Create a layer ds = ogr.Open("tmp/test.gdb", update=1) srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") lyr = ds.CreateLayer("layer_to_remove", geom_type=ogr.wkbPoint, srs=srs) lyr.CreateField(ogr.FieldDefn("str", ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2 49)')) feat.SetField("str", "foo") feat = None lyr = None if j == 1: ds = None ds = ogr.Open("tmp/test.gdb", update=1) # Delete it for i in range(ds.GetLayerCount()): if ds.GetLayer(i).GetName() == 'layer_to_remove': ds.DeleteLayer(i) break # Check it no longer exists lyr = ds.GetLayerByName('layer_to_remove') ds = None assert lyr is None, ('failed at iteration %d' % j) ############################################################################### # Test DeleteDataSource() def test_ogr_fgdb_5(): if ogrtest.fgdb_drv is None: pytest.skip() assert ogrtest.fgdb_drv.DeleteDataSource("tmp/test.gdb") == 0, \ 'DeleteDataSource() failed' assert not os.path.exists("tmp/test.gdb") ############################################################################### # Test adding a layer to an existing feature dataset def test_ogr_fgdb_6(): if ogrtest.fgdb_drv is None: pytest.skip() srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') ds.CreateLayer('layer1', srs=srs, geom_type=ogr.wkbPoint, options=['FEATURE_DATASET=featuredataset']) ds.CreateLayer('layer2', srs=srs, geom_type=ogr.wkbPoint, options=['FEATURE_DATASET=featuredataset']) ds = None ds = ogr.Open('tmp/test.gdb') assert ds.GetLayerCount() == 2 ds = None ############################################################################### # Test bulk loading (#4420) def test_ogr_fgdb_7(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') lyr = ds.CreateLayer('test', srs=srs, geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) gdal.SetConfigOption('FGDB_BULK_LOAD', 'YES') for i in range(1000): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, i) geom = ogr.CreateGeometryFromWkt('POINT(0 1)') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = None lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField(0) == 0 ds = None gdal.SetConfigOption('FGDB_BULK_LOAD', None) ############################################################################### # Test field name laundering (#4458) def test_ogr_fgdb_8(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') lyr = ds.CreateLayer('test', srs=srs, geom_type=ogr.wkbPoint) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.CreateField(ogr.FieldDefn('FROM', ogr.OFTInteger)) # reserved keyword lyr.CreateField(ogr.FieldDefn('1NUMBER', ogr.OFTInteger)) # starting with a number lyr.CreateField(ogr.FieldDefn('WITH SPACE AND !$*!- special characters', ogr.OFTInteger)) # unallowed characters lyr.CreateField(ogr.FieldDefn('A123456789012345678901234567890123456789012345678901234567890123', ogr.OFTInteger)) # 64 characters : ok lyr.CreateField(ogr.FieldDefn('A1234567890123456789012345678901234567890123456789012345678901234', ogr.OFTInteger)) # 65 characters : nok lyr.CreateField(ogr.FieldDefn('A12345678901234567890123456789012345678901234567890123456789012345', ogr.OFTInteger)) # 66 characters : nok gdal.PopErrorHandler() lyr_defn = lyr.GetLayerDefn() expected_names = ['FROM_', '_1NUMBER', 'WITH_SPACE_AND_______special_characters', 'A123456789012345678901234567890123456789012345678901234567890123', 'A1234567890123456789012345678901234567890123456789012345678901_1', 'A1234567890123456789012345678901234567890123456789012345678901_2'] for i in range(5): assert lyr_defn.GetFieldIndex(expected_names[i]) == i, \ ('did not find %s' % expected_names[i]) ############################################################################### # Test layer name laundering (#4466) def test_ogr_fgdb_9(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") _160char = 'A123456789' * 16 in_names = ['FROM', # reserved keyword '1NUMBER', # starting with a number 'WITH SPACE AND !$*!- special characters', # banned characters 'sde_foo', # reserved prefixes _160char, # OK _160char + 'A', # too long _160char + 'B', # still too long ] ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') gdal.PushErrorHandler('CPLQuietErrorHandler') for in_name in in_names: lyr = ds.CreateLayer(in_name, srs=srs, geom_type=ogr.wkbPoint) gdal.PopErrorHandler() lyr.GetLayerDefn() expected_names = ['FROM_', '_1NUMBER', 'WITH_SPACE_AND_______special_characters', '_sde_foo', _160char, _160char[0:158] + '_1', _160char[0:158] + '_2'] for i, exp_name in enumerate(expected_names): assert ds.GetLayerByIndex(i).GetName() == exp_name, ('did not find %s' % exp_name) ############################################################################### # Test SRS support def test_ogr_fgdb_10(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass srs_exact_4326 = osr.SpatialReference() srs_exact_4326.ImportFromEPSG(4326) srs_approx_4326 = srs_exact_4326.Clone() srs_approx_4326.MorphToESRI() srs_approx_4326.MorphFromESRI() srs_exact_2193 = osr.SpatialReference() srs_exact_2193.ImportFromEPSG(2193) srs_approx_2193 = srs_exact_2193.Clone() srs_approx_2193.MorphToESRI() srs_approx_2193.MorphFromESRI() srs_not_in_db = osr.SpatialReference("""PROJCS["foo", GEOGCS["foo", DATUM["foo", SPHEROID["foo",6000000,300]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1]]""") srs_exact_4230 = osr.SpatialReference() srs_exact_4230.ImportFromEPSG(4230) srs_approx_4230 = srs_exact_4230.Clone() srs_approx_4230.MorphToESRI() srs_approx_4230.MorphFromESRI() srs_approx_intl = osr.SpatialReference() srs_approx_intl.ImportFromProj4('+proj=longlat +ellps=intl +no_defs') srs_exact_4233 = osr.SpatialReference() srs_exact_4233.ImportFromEPSG(4233) ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') lyr = ds.CreateLayer("srs_exact_4326", srs=srs_exact_4326, geom_type=ogr.wkbPoint) lyr = ds.CreateLayer("srs_approx_4326", srs=srs_approx_4326, geom_type=ogr.wkbPoint) lyr = ds.CreateLayer("srs_exact_2193", srs=srs_exact_2193, geom_type=ogr.wkbPoint) lyr = ds.CreateLayer("srs_approx_2193", srs=srs_approx_2193, geom_type=ogr.wkbPoint) lyr = ds.CreateLayer("srs_approx_4230", srs=srs_approx_4230, geom_type=ogr.wkbPoint) # will fail gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer("srs_approx_intl", srs=srs_approx_intl, geom_type=ogr.wkbPoint) gdal.PopErrorHandler() # will fail: 4233 doesn't exist in DB gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer("srs_exact_4233", srs=srs_exact_4233, geom_type=ogr.wkbPoint) gdal.PopErrorHandler() # will fail gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer("srs_not_in_db", srs=srs_not_in_db, geom_type=ogr.wkbPoint) gdal.PopErrorHandler() ds = None ds = ogr.Open('tmp/test.gdb') lyr = ds.GetLayerByName("srs_exact_4326") assert lyr.GetSpatialRef().ExportToWkt().find('4326') != -1 lyr = ds.GetLayerByName("srs_approx_4326") assert lyr.GetSpatialRef().ExportToWkt().find('4326') != -1 lyr = ds.GetLayerByName("srs_exact_2193") assert lyr.GetSpatialRef().ExportToWkt().find('2193') != -1 lyr = ds.GetLayerByName("srs_approx_2193") assert lyr.GetSpatialRef().ExportToWkt().find('2193') != -1 lyr = ds.GetLayerByName("srs_approx_4230") assert lyr.GetSpatialRef().ExportToWkt().find('4230') != -1 ds = None ############################################################################### # Test all data types def test_ogr_fgdb_11(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass f = open('data/test_filegdb_field_types.xml', 'rt') xml_def = f.read() f.close() ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') lyr = ds.CreateLayer("test", geom_type=ogr.wkbNone, options=['XML_DEFINITION=%s' % xml_def]) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("esriFieldTypeSmallInteger", 12) feat.SetField("esriFieldTypeInteger", 3456) feat.SetField("esriFieldTypeSingle", 78.9) feat.SetField("esriFieldTypeDouble", 1.23) feat.SetField("esriFieldTypeDate", "2012/12/31 12:34:56") feat.SetField("esriFieldTypeString", "astr") feat.SetField("esriFieldTypeGlobalID", "{12345678-9ABC-DEF0-1234-567890ABCDEF}") # This is ignored and value is generated by FileGDB SDK itself feat.SetField("esriFieldTypeGUID", "{12345678-9abc-DEF0-1234-567890ABCDEF}") lyr.CreateFeature(feat) feat = None feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None # Create a esriFieldTypeGlobalID field lyr = ds.CreateLayer('test2', geom_type=ogr.wkbNone, options=['COLUMN_TYPES=global_id=esriFieldTypeGlobalID']) lyr.CreateField(ogr.FieldDefn('global_id', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('tmp/test.gdb') lyr = ds.GetLayerByName('test') feat = lyr.GetNextFeature() if feat.GetField('esriFieldTypeSmallInteger') != 12 or \ feat.GetField('esriFieldTypeInteger') != 3456 or \ feat.GetField('esriFieldTypeSingle') != pytest.approx(78.9, abs=1e-2) or \ feat.GetField('esriFieldTypeDouble') != 1.23 or \ feat.GetField('esriFieldTypeDate') != '2012/12/31 12:34:56' or \ feat.GetField('esriFieldTypeString') != 'astr' or \ feat.GetField('esriFieldTypeGUID') != '{12345678-9ABC-DEF0-1234-567890ABCDEF}' or \ (not feat.IsFieldSet('esriFieldTypeGlobalID')): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if not feat.IsFieldSet('esriFieldTypeGlobalID'): feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('test2') feat = lyr.GetNextFeature() if not feat.IsFieldSet('global_id'): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test failed Open() def test_ogr_fgdb_12(): if ogrtest.fgdb_drv is None: pytest.skip() ds = ogr.Open('tmp/non_existing.gdb') assert ds is None gdal.Unlink('tmp/dummy.gdb') try: shutil.rmtree('tmp/dummy.gdb') except OSError: pass f = open('tmp/dummy.gdb', 'wb') f.close() ds = ogr.Open('tmp/dummy.gdb') assert ds is None os.unlink('tmp/dummy.gdb') os.mkdir('tmp/dummy.gdb') gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open('tmp/dummy.gdb') gdal.PopErrorHandler() assert ds is None shutil.rmtree('tmp/dummy.gdb') ############################################################################### # Test failed CreateDataSource() and DeleteDataSource() def test_ogr_fgdb_13(): if ogrtest.fgdb_drv is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogrtest.fgdb_drv.CreateDataSource('tmp/foo') gdal.PopErrorHandler() assert ds is None f = open('tmp/dummy.gdb', 'wb') f.close() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogrtest.fgdb_drv.CreateDataSource('tmp/dummy.gdb') gdal.PopErrorHandler() assert ds is None os.unlink('tmp/dummy.gdb') try: shutil.rmtree("/nonexistingdir") except OSError: pass name = '/nonexistingdrive:/nonexistingdir/dummy.gdb' gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogrtest.fgdb_drv.CreateDataSource(name) gdal.PopErrorHandler() assert ds is None gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ogrtest.fgdb_drv.DeleteDataSource(name) gdal.PopErrorHandler() assert ret != 0 ############################################################################### # Test interleaved opening and closing of databases (#4270) def test_ogr_fgdb_14(): if ogrtest.fgdb_drv is None: pytest.skip() for _ in range(3): ds1 = ogr.Open("tmp/test.gdb") assert ds1 is not None ds2 = ogr.Open("tmp/test.gdb") assert ds2 is not None ds2 = None ds1 = None ############################################################################### # Test opening a FGDB with both SRID and LatestSRID set (#5638) def test_ogr_fgdb_15(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree('tmp/test3005.gdb') except OSError: pass gdaltest.unzip('tmp', 'data/test3005.gdb.zip') ds = ogr.Open('tmp/test3005.gdb') lyr = ds.GetLayer(0) got_wkt = lyr.GetSpatialRef().ExportToWkt() sr = osr.SpatialReference() sr.ImportFromEPSG(3005) expected_wkt = sr.ExportToWkt() assert got_wkt == expected_wkt ds = None ############################################################################### # Test fix for #5674 def test_ogr_fgdb_16(): if ogrtest.fgdb_drv is None or ogrtest.openfilegdb_drv is None: pytest.skip() try: gdaltest.unzip('tmp/cache', 'data/ESSENCE_NAIPF_ORI_PROV_sub93.gdb.zip') except OSError: pass try: os.stat('tmp/cache/ESSENCE_NAIPF_ORI_PROV_sub93.gdb') except OSError: pytest.skip() ogrtest.fgdb_drv.Deregister() # Force FileGDB first ogrtest.fgdb_drv.Register() ogrtest.openfilegdb_drv.Register() ds = ogr.Open('tmp/cache/ESSENCE_NAIPF_ORI_PROV_sub93.gdb') if ds is None: ret = 'fail' else: ret = 'success' # Deregister OpenFileGDB again ogrtest.openfilegdb_drv.Deregister() shutil.rmtree('tmp/cache/ESSENCE_NAIPF_ORI_PROV_sub93.gdb') return ret ############################################################################### # Test not nullable fields def test_ogr_fgdb_17(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') sr = osr.SpatialReference() sr.ImportFromEPSG(4326) lyr = ds.CreateLayer('test', geom_type=ogr.wkbPoint, srs=sr, options=['GEOMETRY_NULLABLE=NO']) assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) ret = lyr.CreateFeature(f) assert ret == 0 f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None ds = None ds = ogr.Open('tmp/test.gdb', update=1) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 ds = None ############################################################################### # Test default values def test_ogr_fgdb_18(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None ds = None if ogrtest.openfilegdb_drv is not None: ogrtest.openfilegdb_drv.Register() ret = ogr_fgdb_18_test_results() if ogrtest.openfilegdb_drv is not None: ogrtest.openfilegdb_drv.Deregister() return ret def ogr_fgdb_18_test_results(): ds = ogr.Open('tmp/test.gdb', update=1) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'a''b'" if ogrtest.openfilegdb_drv is not None: assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() == '123' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_real')).GetDefault() == '1.23' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nodefault')).GetDefault() is None # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime')).GetDefault() != 'CURRENT_TIMESTAMP': # gdaltest.post_reason('fail') # return 'fail' # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault() != "'2015/06/30 12:34:56'": # gdaltest.post_reason('fail') # print(lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault()) # return 'fail' f = lyr.GetNextFeature() if f.GetField('field_string') != 'a\'b' or f.GetField('field_int') != 123 or \ f.GetField('field_real') != 1.23 or \ not f.IsFieldNull('field_nodefault') or not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56': f.DumpReadable() pytest.fail() ds = None ############################################################################### # Test transaction support def ogr_fgdb_19_open_update(filename): # We need the OpenFileGDB driver for Linux improved StartTransaction() bPerLayerCopyingForTransaction = False if ogrtest.openfilegdb_drv is not None: ogrtest.openfilegdb_drv.Register() if os.name != 'nt': val = gdal.GetConfigOption('FGDB_PER_LAYER_COPYING_TRANSACTION', 'TRUE') if val == 'TRUE' or val == 'YES' or val == 'ON': bPerLayerCopyingForTransaction = True ds = ogr.Open(filename, update=1) if ogrtest.openfilegdb_drv is not None: ogrtest.openfilegdb_drv.Deregister() ogrtest.fgdb_drv.Deregister() # Force OpenFileGDB first ogrtest.openfilegdb_drv.Register() ogrtest.fgdb_drv.Register() return (bPerLayerCopyingForTransaction, ds) def test_ogr_fgdb_19(): if ogrtest.fgdb_drv is None: pytest.skip() # FIXME likely due to too old FileGDB SDK on those targets # fails with ERROR 1: Failed to open Geodatabase (The system cannot find the file specified.) # File "ogr_fgdb.py", line 1664, in ogr_fgdb_19 # if ds.StartTransaction(force=True) != 0: if gdaltest.is_travis_branch('ubuntu_1804') or gdaltest.is_travis_branch('ubuntu_1604') or gdaltest.is_travis_branch('trusty_clang') or gdaltest.is_travis_branch('python3') or gdaltest.is_travis_branch('trunk_with_coverage'): pytest.skip() try: shutil.rmtree("tmp/test.gdb.ogrtmp") except OSError: pass try: shutil.rmtree("tmp/test.gdb.ogredited") except OSError: pass # Error case: try in read-only ds = ogr.Open('tmp/test.gdb') gdal.PushErrorHandler() ret = ds.StartTransaction(force=True) gdal.PopErrorHandler() assert ret != 0 ds = None (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') assert ds.TestCapability(ogr.ODsCEmulatedTransactions) == 1 # Error case: try in non-forced mode gdal.PushErrorHandler() ret = ds.StartTransaction(force=False) gdal.PopErrorHandler() assert ret != 0 # Error case: try StartTransaction() with a ExecuteSQL layer still active sql_lyr = ds.ExecuteSQL('SELECT * FROM test') gdal.PushErrorHandler() ret = ds.StartTransaction(force=True) gdal.PopErrorHandler() assert ret != 0 ds.ReleaseResultSet(sql_lyr) # Error case: call CommitTransaction() while there is no transaction gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() assert ret != 0 # Error case: call RollbackTransaction() while there is no transaction gdal.PushErrorHandler() ret = ds.RollbackTransaction() gdal.PopErrorHandler() assert ret != 0 # Error case: try StartTransaction() with another active connection ds2 = ogr.Open('tmp/test.gdb', update=1) gdal.PushErrorHandler() ret = ds2.StartTransaction(force=True) gdal.PopErrorHandler() assert ret != 0 ds2 = None # Successful StartTransaction() finally! lyr = ds.GetLayer(0) lyr = ds.GetLayer(0) # again old_count = lyr.GetFeatureCount() lyr_defn = lyr.GetLayerDefn() layer_created_before_transaction = ds.CreateLayer('layer_created_before_transaction', geom_type=ogr.wkbNone) layer_created_before_transaction_defn = layer_created_before_transaction.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 assert os.path.exists('tmp/test.gdb.ogredited') assert not os.path.exists('tmp/test.gdb.ogrtmp') ret = lyr.CreateField(ogr.FieldDefn('foobar', ogr.OFTString)) assert ret == 0 ret = lyr.DeleteField(lyr.GetLayerDefn().GetFieldIndex('foobar')) assert ret == 0 gdal.PushErrorHandler() ret = lyr.CreateGeomField(ogr.GeomFieldDefn('foobar', ogr.wkbPoint)) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.ReorderFields([i for i in range(lyr.GetLayerDefn().GetFieldCount())]) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = lyr.AlterFieldDefn(0, ogr.FieldDefn('foo', ogr.OFTString), 0) gdal.PopErrorHandler() assert ret != 0 f = ogr.Feature(lyr_defn) f.SetField('field_string', 'foo') lyr.CreateFeature(f) lyr.SetFeature(f) fid = f.GetFID() assert fid > 0 lyr.ResetReading() for i in range(fid): f = lyr.GetNextFeature() assert f.GetFID() == fid and f.GetField('field_string') == 'foo' f = lyr.GetFeature(fid) assert f.GetFID() == fid and f.GetField('field_string') == 'foo' f = ogr.Feature(layer_created_before_transaction_defn) layer_created_before_transaction.CreateFeature(f) # Error case: call StartTransaction() while there is an active transaction gdal.PushErrorHandler() ret = ds.StartTransaction(force=True) gdal.PopErrorHandler() assert ret != 0 # Error case: try CommitTransaction() with a ExecuteSQL layer still active sql_lyr = ds.ExecuteSQL('SELECT * FROM test') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() assert ret != 0 ds.ReleaseResultSet(sql_lyr) # Error case: try RollbackTransaction() with a ExecuteSQL layer still active sql_lyr = ds.ExecuteSQL('SELECT * FROM test') gdal.PushErrorHandler() ret = ds.RollbackTransaction() gdal.PopErrorHandler() assert ret != 0 ds.ReleaseResultSet(sql_lyr) # Test that CommitTransaction() works assert ds.CommitTransaction() == 0 assert not os.path.exists('tmp/test.gdb.ogredited') assert not os.path.exists('tmp/test.gdb.ogrtmp') lst = gdal.ReadDir('tmp/test.gdb') for filename in lst: assert '.tmp' not in filename, lst lyr_tmp = ds.GetLayer(0) lyr_tmp = ds.GetLayer(0) new_count = lyr_tmp.GetFeatureCount() assert new_count == old_count + 1 old_count = new_count assert layer_created_before_transaction.GetFeatureCount() == 1 for i in range(ds.GetLayerCount()): if ds.GetLayer(i).GetName() == layer_created_before_transaction.GetName(): ds.DeleteLayer(i) break layer_created_before_transaction = None # Test suppression of layer within transaction lyr_count = ds.GetLayerCount() ds.CreateLayer('layer_tmp', geom_type=ogr.wkbNone) ret = ds.StartTransaction(force=True) assert ret == 0 ds.DeleteLayer(ds.GetLayerCount() - 1) assert ds.CommitTransaction() == 0 new_lyr_count = ds.GetLayerCount() assert new_lyr_count == lyr_count # Test that RollbackTransaction() works ret = ds.StartTransaction(force=True) assert ret == 0 f = ogr.Feature(lyr_defn) lyr.CreateFeature(f) layer_created_during_transaction = ds.CreateLayer('layer_created_during_transaction', geom_type=ogr.wkbNone) layer_created_during_transaction.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) assert ds.RollbackTransaction() == 0 assert not os.path.exists('tmp/test.gdb.ogredited') assert not os.path.exists('tmp/test.gdb.ogrtmp') assert lyr.GetFeatureCount() == old_count # Cannot retrieve the layer any more from fresh assert ds.GetLayerByName('layer_created_during_transaction') is None # Pointer is in ghost state assert layer_created_during_transaction.GetLayerDefn().GetFieldCount() == 0 # Simulate an error case where StartTransaction() cannot copy backup files lyr_count = ds.GetLayerCount() gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE1') gdal.PushErrorHandler() ret = ds.StartTransaction(force=True) gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 assert ds.GetLayerCount() == lyr_count # Simulate an error case where StartTransaction() cannot reopen database gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE2') gdal.PushErrorHandler() ret = ds.StartTransaction(force=True) gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 assert ds.GetLayerCount() == 0 shutil.rmtree('tmp/test.gdb.ogredited') # Test method on ghost datasource and layer ds.GetName() ds.GetLayerCount() ds.GetLayer(0) ds.GetLayerByName("test") ds.DeleteLayer(0) ds.TestCapability('foo') ds.CreateLayer('bar', geom_type=ogr.wkbNone) ds.CopyLayer(lyr, 'baz') ds.GetStyleTable() # ds.SetStyleTableDirectly(None) ds.SetStyleTable(None) sql_lyr = ds.ExecuteSQL('SELECT * FROM test') ds.ReleaseResultSet(sql_lyr) ds.FlushCache() ds.GetMetadata() ds.GetMetadataItem('foo') ds.SetMetadata(None) ds.SetMetadataItem('foo', None) lyr.GetSpatialFilter() lyr.SetSpatialFilter(None) lyr.SetSpatialFilterRect(0, 0, 0, 0) lyr.SetSpatialFilter(0, None) lyr.SetSpatialFilterRect(0, 0, 0, 0, 0) lyr.SetAttributeFilter(None) lyr.ResetReading() lyr.GetNextFeature() lyr.SetNextByIndex(0) lyr.GetFeature(0) lyr.SetFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.DeleteFeature(0) lyr.GetName() lyr.GetGeomType() lyr.GetLayerDefn() lyr.GetSpatialRef() lyr.GetFeatureCount() lyr.GetExtent() lyr.GetExtent(0) lyr.TestCapability('foo') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.DeleteField(0) lyr.ReorderFields([i for i in range(lyr.GetLayerDefn().GetFieldCount())]) lyr.AlterFieldDefn(0, ogr.FieldDefn('foo', ogr.OFTString), 0) lyr.SyncToDisk() lyr.GetStyleTable() # lyr.SetStyleTableDirectly(None) lyr.SetStyleTable(None) lyr.StartTransaction() lyr.CommitTransaction() lyr.RollbackTransaction() lyr.SetIgnoredFields([]) lyr.GetMetadata() lyr.GetMetadataItem('foo') lyr.SetMetadata(None) lyr.SetMetadataItem('foo', None) ds = None if bPerLayerCopyingForTransaction: # Test an error case where we simulate a failure of destroying a # layer destroyed during transaction (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') layer_tmp = ds.CreateLayer('layer_tmp', geom_type=ogr.wkbNone) layer_tmp.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) assert ds.StartTransaction(force=True) == 0 ds.DeleteLayer(ds.GetLayerCount() - 1) gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE1') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 ds = None shutil.rmtree('tmp/test.gdb.ogredited') lst = gdal.ReadDir('tmp/test.gdb') for filename in lst: assert '.tmp' not in filename, lst # Test an error case where we simulate a failure in renaming # a file in original directory (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') for i in range(ds.GetLayerCount()): if ds.GetLayer(i).GetName() == 'layer_tmp': ds.DeleteLayer(i) break assert ds.StartTransaction(force=True) == 0 lyr = ds.GetLayer(0) f = lyr.GetNextFeature() lyr.SetFeature(f) f = None gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE2') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 ds = None shutil.rmtree('tmp/test.gdb.ogredited') lst = gdal.ReadDir('tmp/test.gdb') for filename in lst: assert '.tmp' not in filename, lst # Test an error case where we simulate a failure in moving # a file into original directory (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') assert ds.StartTransaction(force=True) == 0 lyr = ds.GetLayer(0) f = lyr.GetNextFeature() lyr.SetFeature(f) f = None gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE3') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 ds = None shutil.rmtree('tmp/test.gdb.ogredited') # Remove left over .tmp files lst = gdal.ReadDir('tmp/test.gdb') for filename in lst: if '.tmp' in filename: os.remove('tmp/test.gdb/' + filename) # Test not critical error in removing a temporary file for case in ('CASE4', 'CASE5'): (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') assert ds.StartTransaction(force=True) == 0 lyr = ds.GetLayer(0) f = lyr.GetNextFeature() lyr.SetFeature(f) f = None gdal.SetConfigOption('FGDB_SIMUL_FAIL', case) gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret == 0, case ds = None if case == 'CASE4': assert not os.path.exists('tmp/test.gdb.ogredited'), case else: shutil.rmtree('tmp/test.gdb.ogredited') # Remove left over .tmp files lst = gdal.ReadDir('tmp/test.gdb') for filename in lst: if '.tmp' in filename: os.remove('tmp/test.gdb/' + filename) else: # Test an error case where we simulate a failure of rename from .gdb to .gdb.ogrtmp during commit (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE1') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 ds = None # Test an error case where we simulate a failure of rename from .gdb.ogredited to .gdb during commit (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE2') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 ds = None os.rename('tmp/test.gdb.ogrtmp', 'tmp/test.gdb') # Test an error case where we simulate a failure of removing from .gdb.ogrtmp during commit (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE3') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret == 0 ds = None shutil.rmtree('tmp/test.gdb.ogrtmp') # Test an error case where we simulate a failure of reopening the committed DB (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE_REOPEN') gdal.PushErrorHandler() ret = ds.CommitTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 assert ds.GetLayerCount() == 0 ds = None # Test an error case where we simulate a failure of removing from .gdb.ogredited during rollback (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE1') gdal.PushErrorHandler() ret = ds.RollbackTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 ds = None shutil.rmtree('tmp/test.gdb.ogredited') # Test an error case where we simulate a failure of reopening the rollbacked DB (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert ds.StartTransaction(force=True) == 0 gdal.SetConfigOption('FGDB_SIMUL_FAIL', 'CASE2') gdal.PushErrorHandler() ret = ds.RollbackTransaction() gdal.PopErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL', None) assert ret != 0 assert ds.GetLayerCount() == 0 ds = None if ogrtest.openfilegdb_drv is not None: ogrtest.openfilegdb_drv.Deregister() # Same, but retry without per-layer copying optimization (in the case # this was what was tested in previous step) def test_ogr_fgdb_19bis(): if ogrtest.fgdb_drv is None: pytest.skip() if gdaltest.is_travis_branch('ubuntu_1804') or gdaltest.is_travis_branch('ubuntu_1604') or gdaltest.is_travis_branch('trusty_clang') or gdaltest.is_travis_branch('python3') or gdaltest.is_travis_branch('trunk_with_coverage'): pytest.skip() (bPerLayerCopyingForTransaction, ds) = ogr_fgdb_19_open_update('tmp/test.gdb') del ds if not bPerLayerCopyingForTransaction: pytest.skip() gdal.SetConfigOption('FGDB_PER_LAYER_COPYING_TRANSACTION', 'FALSE') ret = test_ogr_fgdb_19() gdal.SetConfigOption('FGDB_PER_LAYER_COPYING_TRANSACTION', None) return ret ############################################################################### # Test CreateFeature() with user defined FID def test_ogr_fgdb_20(): if ogrtest.fgdb_drv is None: pytest.skip() if ogrtest.openfilegdb_drv is None: pytest.skip() if gdaltest.is_travis_branch('ubuntu_1804') or gdaltest.is_travis_branch('ubuntu_1604') or gdaltest.is_travis_branch('trusty_clang') or gdaltest.is_travis_branch('python3') or gdaltest.is_travis_branch('trunk_with_coverage'): pytest.skip() if not os.path.exists('tmp/test.gdb'): ds = ogrtest.fgdb_drv.CreateDataSource("tmp/test.gdb") ds = None # We need the OpenFileGDB driver for CreateFeature() with user defined FID ogrtest.openfilegdb_drv.Register() ds = ogr.Open('tmp/test.gdb', update=1) ogrtest.openfilegdb_drv.Deregister() ogrtest.fgdb_drv.Deregister() # Force OpenFileGDB first ogrtest.openfilegdb_drv.Register() ogrtest.fgdb_drv.Register() lyr = ds.CreateLayer('ogr_fgdb_20', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) ds.ExecuteSQL('CREATE INDEX ogr_fgdb_20_id ON ogr_fgdb_20(id)') f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('id', 1) ret = lyr.CreateFeature(f) assert ret == 0 and f.GetFID() == 1 and lyr.GetMetadataItem('1', 'MAP_OGR_FID_TO_FGDB_FID') is None # Existing FID gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 for invalid_fid in [-2, 0, 9876543210]: f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(invalid_fid) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0, invalid_fid f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(2) f.SetField('id', 2) ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != 2 or lyr.GetMetadataItem('2', 'MAP_OGR_FID_TO_FGDB_FID') is not None: f.DumpReadable() pytest.fail() # OGR FID = 4, FileGDB FID = 3 f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(4) f.SetField('id', 4) # Cannot call CreateFeature() with a set FID when a dataset is opened more than once ds2 = ogr.Open('tmp/test.gdb', update=1) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 ds2 = None ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != 4 or lyr.GetMetadataItem('4', 'MAP_OGR_FID_TO_FGDB_FID') != '3': f.DumpReadable() pytest.fail(lyr.GetMetadataItem('4', 'MAP_OGR_FID_TO_FGDB_FID')) # Cannot open geodatabase at the moment since it is in 'FID hack mode' gdal.PushErrorHandler() ds2 = ogr.Open('tmp/test.gdb', update=1) gdal.PopErrorHandler() assert ds2 is None ds2 = None # Existing FID, but only in OGR space gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 # This FID exists as a FGDB ID, but should not be user visible. f.SetFID(3) ret = lyr.SetFeature(f) assert ret == ogr.OGRERR_NON_EXISTING_FEATURE ret = lyr.DeleteFeature(3) assert ret == ogr.OGRERR_NON_EXISTING_FEATURE ret = lyr.GetFeature(3) assert ret is None # Trying to set OGR FID = 3 --> FileGDB FID = 4 f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(3) f.SetField('id', 3) ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != 3 or lyr.GetMetadataItem('3', 'MAP_OGR_FID_TO_FGDB_FID') != '4': f.DumpReadable() pytest.fail() lyr.ResetReading() expected = [(1, None), (2, None), (4, 3), (3, 4)] for i in range(2): for (fid, fgdb_fid) in expected: if i == 0: f = lyr.GetNextFeature() else: f = lyr.GetFeature(fid) assert f is not None if f.GetFID() != fid or f.GetField('id') != fid: f.DumpReadable() pytest.fail(fid) got_fgdb_fid = lyr.GetMetadataItem(str(f.GetFID()), 'MAP_OGR_FID_TO_FGDB_FID') if got_fgdb_fid is None: assert fgdb_fid is None elif int(got_fgdb_fid) != fgdb_fid: print(fgdb_fid) pytest.fail(got_fgdb_fid) for fid in [-9876543210, 0, 100]: f = lyr.GetFeature(fid) if f is not None: f.DumpReadable() pytest.fail() for invalid_fid in [-2, 0, 9876543210]: f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(invalid_fid) ret = lyr.SetFeature(f) assert ret == ogr.OGRERR_NON_EXISTING_FEATURE ret = lyr.DeleteFeature(invalid_fid) assert ret == ogr.OGRERR_NON_EXISTING_FEATURE f = lyr.GetFeature(3) f.SetField('str', '3') ret = lyr.SetFeature(f) assert ret == 0 f = lyr.GetFeature(3) assert f.GetField('str') == '3' ret = lyr.DeleteFeature(1) assert ret == 0 ret = lyr.DeleteFeature(3) assert ret == 0 for (fid, fgdb_fid) in [(3, 5), (2049, 6), (10, 7), (7, 8), (9, None), (8, 10), (12, 11)]: f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(fid) f.SetField('id', fid) ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != fid or str(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) != str(fgdb_fid): f.DumpReadable() print(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) pytest.fail(fid) # Normally 12 should be attributed, but it has already been reserved f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != 13: f.DumpReadable() pytest.fail() f.SetField('id', f.GetFID()) lyr.SetFeature(f) lyr.ResetReading() expected = [(2, None), (4, 3), (3, 5), (2049, 6), (10, 7), (7, 8), (9, None), (8, 10)] for (fid, fgdb_fid) in expected: f = lyr.GetNextFeature() assert f is not None if f.GetFID() != fid or f.GetField('id') != fid or str(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) != str(fgdb_fid): f.DumpReadable() print(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) pytest.fail(fid) lyr.SetAttributeFilter('id = 3') lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 3: f.DumpReadable() pytest.fail() # This will cause a resync of indexes lyr.SetAttributeFilter('OBJECTID = 3') lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != 3: f.DumpReadable() pytest.fail() # No sparse pages lyr = ds.CreateLayer('ogr_fgdb_20_simple', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(2) f.SetField('id', 2) lyr.CreateFeature(f) # This will cause a resync of indexes sql_lyr = ds.ExecuteSQL('SELECT * FROM ogr_fgdb_20_simple') f = sql_lyr.GetNextFeature() if f.GetFID() != 2: f.DumpReadable() pytest.fail() # Do not allow user set FID while a select layer is in progress f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(3) f.SetField('id', 3) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 ds.ReleaseResultSet(sql_lyr) # Do it in transaction, but this is completely orthogonal ds.StartTransaction(force=True) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(3) f.SetField('id', 3) lyr.CreateFeature(f) f = None ds.CommitTransaction() # Multi-page indexes srs = osr.SpatialReference() srs.ImportFromEPSG(32630) gdal.SetConfigOption('FGDB_RESYNC_THRESHOLD', '600') lyr = ds.CreateLayer('ogr_fgdb_20_indexes', geom_type=ogr.wkbPoint, srs=srs) gdal.SetConfigOption('FGDB_RESYNC_THRESHOLD', None) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) ds.ExecuteSQL('CREATE INDEX ogr_fgdb_20_indexes_id ON ogr_fgdb_20_indexes(id)') gdal.SetConfigOption('FGDB_BULK_LOAD', 'YES') for i in range(1000): f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(i + 2) f.SetField('id', i + 2) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (%d 0)' % i)) lyr.CreateFeature(f) gdal.SetConfigOption('FGDB_BULK_LOAD', None) ds = None # Check consistency after re-opening gdal.ErrorReset() for update in [0, 1]: ds = ogr.Open('tmp/test.gdb', update=update) lyr = ds.GetLayerByName('ogr_fgdb_20') assert lyr.GetFeatureCount() == 10 lyr.ResetReading() expected = [2, 3, 4, 7, 8, 9, 10, 12, 13, 2049] for fid in expected: f = lyr.GetNextFeature() assert gdal.GetLastErrorType() == 0 assert f is not None, fid if f.GetFID() != fid or f.GetField('id') != fid: f.DumpReadable() pytest.fail(fid) for fid in expected: lyr.SetAttributeFilter('id = %d' % fid) lyr.ResetReading() f = lyr.GetNextFeature() if f.GetFID() != fid or f.GetField('id') != fid: f.DumpReadable() pytest.fail(fid) lyr = ds.GetLayerByName('ogr_fgdb_20_simple') f = lyr.GetNextFeature() assert f.GetFID() == 2 f = lyr.GetNextFeature() assert f.GetFID() == 3 # Check attribute index lyr = ds.GetLayerByName('ogr_fgdb_20_indexes') for i in range(1000): fid = i + 2 lyr.SetAttributeFilter('id = %d' % fid) lyr.ResetReading() f = lyr.GetNextFeature() assert f.GetFID() == fid # Check spatial index lyr.SetAttributeFilter(None) if update == 1: for i in range(1000): fid = i + 2 lyr.SetSpatialFilterRect(i - 0.01, -0.01, i + 0.01, 0.01) lyr.ResetReading() f = lyr.GetNextFeature() assert f.GetFID() == fid # Insert new features ds = ogr.Open('tmp/test.gdb', update=1) lyr = ds.GetLayerByName('ogr_fgdb_20') for (fid, fgdb_fid) in [(10000000, 2050), (10000001, 2051), (8191, 2052), (16384, 2053)]: f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(fid) f.SetField('id', fid) ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != fid or str(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) != str(fgdb_fid): f.DumpReadable() pytest.fail(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) ds = None # Insert a new intermediate FIDs for (fid, fgdb_fid) in [(1000000, 10000002), (1000001, 10000002)]: ds = ogr.Open('tmp/test.gdb', update=1) lyr = ds.GetLayerByName('ogr_fgdb_20') f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(fid) f.SetField('id', fid) ret = lyr.CreateFeature(f) if ret != 0 or f.GetFID() != fid or lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID') != str(fgdb_fid): f.DumpReadable() pytest.fail(lyr.GetMetadataItem(str(fid), 'MAP_OGR_FID_TO_FGDB_FID')) ds = None # Check consistency after re-opening gdal.ErrorReset() for update in [0, 1]: ds = ogr.Open('tmp/test.gdb', update=update) lyr = ds.GetLayerByName('ogr_fgdb_20') assert lyr.GetFeatureCount() == 16 lyr.ResetReading() expected = [2, 3, 4, 7, 8, 9, 10, 12, 13, 2049, 8191, 16384, 1000000, 1000001, 10000000, 10000001] for fid in expected: f = lyr.GetNextFeature() assert gdal.GetLastErrorType() == 0 assert f is not None, fid if f.GetFID() != fid or f.GetField('id') != fid: f.DumpReadable() pytest.fail(fid) # Simulate different errors when database reopening is done # to sync ids for case in ('CASE1', 'CASE2', 'CASE3'): try: shutil.rmtree("tmp/test2.gdb") except OSError: pass ds = ogrtest.fgdb_drv.CreateDataSource("tmp/test2.gdb") lyr = ds.CreateLayer('foo', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(2) f.SetField('id', 2) lyr.CreateFeature(f) gdal.PushErrorHandler() gdal.SetConfigOption('FGDB_SIMUL_FAIL_REOPEN', case) sql_lyr = ds.ExecuteSQL('SELECT * FROM foo') gdal.SetConfigOption('FGDB_SIMUL_FAIL_REOPEN', None) gdal.PopErrorHandler() if case == 'CASE3': assert sql_lyr is not None, case ds.ReleaseResultSet(sql_lyr) else: assert sql_lyr is None, case # Everything will fail, but hopefully without crashing lyr.ResetReading() assert lyr.GetNextFeature() is None assert lyr.GetFeature(1) is None assert lyr.DeleteFeature(1) != 0 assert lyr.CreateFeature(f) != 0 assert lyr.SetFeature(f) != 0 if case != 'CASE3': assert ds.CreateLayer('bar', geom_type=ogr.wkbNone) is None assert ds.DeleteLayer(0) != 0 sql_lyr = ds.ExecuteSQL('SELECT * FROM foo') assert case == 'CASE3' or sql_lyr is None ds.ReleaseResultSet(sql_lyr) ds = None # sys.exit(0) ############################################################################### # Test M support def test_ogr_fgdb_21(): if ogrtest.fgdb_drv is None: pytest.skip() if not ogr_fgdb_is_sdk_1_4_or_later(): pytest.skip('SDK 1.4 required') # Fails on MULTIPOINT ZM if gdaltest.is_travis_branch('ubuntu_1804') or gdaltest.is_travis_branch('ubuntu_1604') or gdaltest.is_travis_branch('python3'): pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass ds = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') datalist = [["pointm", ogr.wkbPointM, "POINT M (1 2 3)"], ["pointzm", ogr.wkbPointM, "POINT ZM (1 2 3 4)"], ["multipointm", ogr.wkbMultiPointM, "MULTIPOINT M ((1 2 3),(4 5 6))"], ["multipointzm", ogr.wkbMultiPointZM, "MULTIPOINT ZM ((1 2 3 4),(5 6 7 8))"], ["linestringm", ogr.wkbLineStringM, "LINESTRING M (1 2 3,4 5 6)", "MULTILINESTRING M ((1 2 3,4 5 6))"], ["linestringzm", ogr.wkbLineStringZM, "LINESTRING ZM (1 2 3 4,5 6 7 8)", "MULTILINESTRING ZM ((1 2 3 4,5 6 7 8))"], ["multilinestringm", ogr.wkbMultiLineStringM, "MULTILINESTRING M ((1 2 3,4 5 6))"], ["multilinestringzm", ogr.wkbMultiLineStringZM, "MULTILINESTRING ZM ((1 2 3 4,5 6 7 8))"], ["polygonm", ogr.wkbPolygonM, "POLYGON M ((0 0 1,0 1 2,1 1 3,1 0 4,0 0 1))", "MULTIPOLYGON M (((0 0 1,0 1 2,1 1 3,1 0 4,0 0 1)))"], ["polygonzm", ogr.wkbPolygonZM, "POLYGON ZM ((0 0 1 -1,0 1 2 -2,1 1 3 -3,1 0 4 -4,0 0 1 -1))", "MULTIPOLYGON ZM (((0 0 1 -1,0 1 2 -2,1 1 3 -3,1 0 4 -4,0 0 1 -1)))"], ["multipolygonm", ogr.wkbMultiPolygonM, "MULTIPOLYGON M (((0 0 1,0 1 2,1 1 3,1 0 4,0 0 1)))"], ["multipolygonzm", ogr.wkbMultiPolygonZM, "MULTIPOLYGON ZM (((0 0 1 -1,0 1 2 -2,1 1 3 -3,1 0 4 -4,0 0 1 -1)))"], ["empty_polygonm", ogr.wkbPolygonM, 'POLYGON M EMPTY', None], ] srs = osr.SpatialReference() srs.SetFromUserInput("WGS84") for data in datalist: lyr = ds.CreateLayer(data[0], geom_type=data[1], srs=srs, options=[]) feat = ogr.Feature(lyr.GetLayerDefn()) # print(data[2]) feat.SetGeometry(ogr.CreateGeometryFromWkt(data[2])) lyr.CreateFeature(feat) ds = None ds = ogr.Open('tmp/test.gdb') for data in datalist: lyr = ds.GetLayerByName(data[0]) expected_geom_type = data[1] if expected_geom_type == ogr.wkbLineStringM: expected_geom_type = ogr.wkbMultiLineStringM elif expected_geom_type == ogr.wkbLineStringZM: expected_geom_type = ogr.wkbMultiLineStringZM elif expected_geom_type == ogr.wkbPolygonM: expected_geom_type = ogr.wkbMultiPolygonM elif expected_geom_type == ogr.wkbPolygonZM: expected_geom_type = ogr.wkbMultiPolygonZM assert lyr.GetGeomType() == expected_geom_type, data feat = lyr.GetNextFeature() try: expected_wkt = data[3] except IndexError: expected_wkt = data[2] if expected_wkt is None: if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail(data) elif ogrtest.check_feature_geometry(feat, expected_wkt) != 0: feat.DumpReadable() pytest.fail(data) ############################################################################### # Read curves def test_ogr_fgdb_22(): if ogrtest.fgdb_drv is None: pytest.skip() ds = ogr.Open('data/curves.gdb') lyr = ds.GetLayerByName('line') ds_ref = ogr.Open('data/curves_line.csv') lyr_ref = ds_ref.GetLayer(0) for f in lyr: f_ref = lyr_ref.GetNextFeature() if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0: print(f.GetGeometryRef().ExportToWkt()) pytest.fail(f_ref.GetGeometryRef().ExportToWkt()) lyr = ds.GetLayerByName('polygon') ds_ref = ogr.Open('data/curves_polygon.csv') lyr_ref = ds_ref.GetLayer(0) for f in lyr: f_ref = lyr_ref.GetNextFeature() if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0: print(f.GetGeometryRef().ExportToWkt()) pytest.fail(f_ref.GetGeometryRef().ExportToWkt()) ds = ogr.Open('data/curve_circle_by_center.gdb') lyr = ds.GetLayer(0) ds_ref = ogr.Open('data/curve_circle_by_center.csv') lyr_ref = ds_ref.GetLayer(0) for f in lyr: f_ref = lyr_ref.GetNextFeature() if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0: print(f.GetGeometryRef().ExportToWkt()) pytest.fail(f_ref.GetGeometryRef().ExportToWkt()) ############################################################################### # Test opening '.' def test_ogr_fgdb_23(): if ogrtest.fgdb_drv is None: pytest.skip() os.chdir('data/curves.gdb') ds = ogr.Open('.') os.chdir('../..') assert ds is not None ############################################################################### # Read polygons with M component where the M of the closing point is not the # one of the starting point (#7017) def test_ogr_fgdb_24(): if ogrtest.fgdb_drv is None: pytest.skip() ds = ogr.Open('data/filegdb_polygonzm_m_not_closing_with_curves.gdb') lyr = ds.GetLayer(0) ds_ref = ogr.Open('data/filegdb_polygonzm_m_not_closing_with_curves.gdb.csv') lyr_ref = ds_ref.GetLayer(0) for f in lyr: f_ref = lyr_ref.GetNextFeature() if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0: print(f.GetGeometryRef().ExportToIsoWkt()) pytest.fail(f_ref.GetGeometryRef().ExportToIsoWkt()) ds = ogr.Open('data/filegdb_polygonzm_nan_m_with_curves.gdb') lyr = ds.GetLayer(0) ds_ref = ogr.Open('data/filegdb_polygonzm_nan_m_with_curves.gdb.csv') lyr_ref = ds_ref.GetLayer(0) for f in lyr: f_ref = lyr_ref.GetNextFeature() if ogrtest.check_feature_geometry(f, f_ref.GetGeometryRef()) != 0: print(f.GetGeometryRef().ExportToIsoWkt()) pytest.fail(f_ref.GetGeometryRef().ExportToIsoWkt()) ############################################################################### # Test selecting FID column with OGRSQL def test_ogr_fgdb_25(): if ogrtest.fgdb_drv is None: pytest.skip() ds = ogr.Open('data/curves.gdb') sql_lyr = ds.ExecuteSQL('SELECT OBJECTID FROM polygon WHERE OBJECTID = 2') assert sql_lyr is not None f = sql_lyr.GetNextFeature() if f.GetFID() != 2: f.DumpReadable() pytest.fail() f = sql_lyr.GetNextFeature() assert f is None ds.ReleaseResultSet(sql_lyr) lyr = ds.GetLayerByName('polygon') lyr.SetAttributeFilter('OBJECTID = 2') f = lyr.GetNextFeature() if f.GetFID() != 2: f.DumpReadable() pytest.fail() ############################################################################### # Test bugfix for https://github.com/OSGeo/gdal/issues/1369 # where a polygon with inner rings has its exterior ring with wrong orientation def test_ogr_fgdb_weird_winding_order(): if ogrtest.fgdb_drv is None: pytest.skip() if not ogr_fgdb_is_sdk_1_4_or_later(): pytest.skip('SDK 1.4 required') if not ogrtest.have_geos(): pytest.skip() try: shutil.rmtree('tmp/roads_clip Drawing.gdb') except OSError: pass gdaltest.unzip('tmp', 'data/weird_winding_order_fgdb.zip') ds = ogr.Open('tmp/roads_clip Drawing.gdb') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetGeometryCount() == 1 assert g.GetGeometryRef(0).GetGeometryCount() == 17 ############################################################################### # Test bugfix for https://github.com/OSGeo/gdal/issues/1369 # where a polygon with inner rings has its exterior ring with wrong orientation def test_ogr_fgdb_utc_datetime(): if ogrtest.fgdb_drv is None: pytest.skip() ds = ogr.Open('data/filegdb/testdatetimeutc.gdb') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() # Check that the timezone +00 is present assert f.GetFieldAsString('EditDate') == '2020/06/22 07:49:36+00' ############################################################################### # Cleanup def test_ogr_fgdb_cleanup(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass try: shutil.rmtree("tmp/test2.gdb") except OSError: pass try: shutil.rmtree("tmp/poly.gdb") except OSError: pass try: shutil.rmtree('tmp/test3005.gdb') except OSError: pass try: shutil.rmtree('tmp/roads_clip Drawing.gdb') except OSError: pass if ogrtest.openfilegdb_drv is not None: ogrtest.fgdb_drv.Deregister() # Force OpenFileGDB first ogrtest.openfilegdb_drv.Register() ogrtest.fgdb_drv.Register() gdalautotest-3.1.2/ogr/ogr_xlsx.py0000775000175000017500000003634013701060010015676 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_xlsx.py 457dd4172a9f656f0a757cc2432119f4c0b63ea6 2020-06-19 16:18:31 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR XLSX driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import gdaltest from osgeo import gdal from osgeo import ogr import pytest pytestmark = pytest.mark.require_driver('XLSX') ############################################################################### # Check def ogr_xlsx_check(ds): assert ds.TestCapability("foo") == 0 assert ds.GetLayerCount() == 8, 'bad layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'Feuille1', 'bad layer name' assert lyr.GetGeomType() == ogr.wkbNone, 'bad layer geometry type' assert lyr.GetSpatialRef() is None, 'bad spatial ref' assert lyr.GetFeatureCount() == 26 assert lyr.TestCapability("foo") == 0 lyr = ds.GetLayer(6) assert lyr.GetName() == 'Feuille7', 'bad layer name' assert lyr.GetLayerDefn().GetFieldCount() == 12 type_array = [ogr.OFTString, ogr.OFTInteger, ogr.OFTReal, ogr.OFTReal, ogr.OFTDate, ogr.OFTDateTime, ogr.OFTReal, ogr.OFTTime, ogr.OFTReal, ogr.OFTInteger, ogr.OFTReal, ogr.OFTDateTime] for i, typ in enumerate(type_array): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == typ feat = lyr.GetNextFeature() if feat.GetFieldAsString(0) != 'val' or \ feat.GetFieldAsInteger(1) != 23 or \ feat.GetFieldAsDouble(2) != 3.45 or \ feat.GetFieldAsDouble(3) != 0.52 or \ feat.GetFieldAsString(4) != '2012/01/22' or \ feat.GetFieldAsString(5) != '2012/01/22 18:49:00': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.IsFieldSet(2): feat.DumpReadable() pytest.fail() ############################################################################### # Basic tests def test_ogr_xlsx_1(): assert ogr.GetDriverByName('XLSX').TestCapability("foo") == 0 ds = ogr.Open('data/test.xlsx') assert ds is not None, 'cannot open dataset' return ogr_xlsx_check(ds) ############################################################################### # Test OGR_XLSX_HEADERS = DISABLE def test_ogr_xlsx_2(): gdal.SetConfigOption('OGR_XLSX_HEADERS', 'DISABLE') ds = ogr.Open('data/test.xlsx') lyr = ds.GetLayerByName('Feuille7') assert lyr.GetFeatureCount() == 3 gdal.SetConfigOption('OGR_XLSX_HEADERS', None) ############################################################################### # Test OGR_XLSX_FIELD_TYPES = STRING def test_ogr_xlsx_3(): gdal.SetConfigOption('OGR_XLSX_FIELD_TYPES', 'STRING') ds = ogr.Open('data/test.xlsx') lyr = ds.GetLayerByName('Feuille7') assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTString gdal.SetConfigOption('OGR_XLSX_FIELD_TYPES', None) ############################################################################### # Run test_ogrsf def test_ogr_xlsx_4(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.xlsx') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test write support def test_ogr_xlsx_5(): import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f XLSX tmp/test.xlsx data/test.xlsx') ds = ogr.Open('tmp/test.xlsx') ret = ogr_xlsx_check(ds) ds = None os.unlink('tmp/test.xlsx') return ret ############################################################################### # Test reading a file using inlineStr representation. def test_ogr_xlsx_6(): # In this dataset the column titles are not recognised by default. gdal.SetConfigOption('OGR_XLSX_HEADERS', 'FORCE') ds = ogr.Open('data/inlineStr.xlsx') lyr = ds.GetLayerByName('inlineStr') assert lyr.GetFeatureCount() == 1 lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.Bl_District_t == 'text6', 'Did not get expected value(1)' assert float(feat.GetField('Lat')) == pytest.approx(23.6247122, abs=0.00001), \ 'Did not get expected value(2)' gdal.SetConfigOption('OGR_XLSX_HEADERS', None) ############################################################################### # Test update support def test_ogr_xlsx_7(): gdal.Unlink('tmp/ogr_xlsx_7.xlsx') shutil.copy('data/test.xlsx', 'tmp/ogr_xlsx_7.xlsx') ds = ogr.Open('tmp/ogr_xlsx_7.xlsx', update=1) lyr = ds.GetLayerByName('Feuille7') feat = lyr.GetNextFeature() if feat.GetFID() != 2: feat.DumpReadable() pytest.fail('did not get expected FID') feat.SetField(0, 'modified_value') lyr.SetFeature(feat) feat = None ds = None ds = ogr.Open('tmp/ogr_xlsx_7.xlsx') lyr = ds.GetLayerByName('Feuille7') feat = lyr.GetNextFeature() if feat.GetFID() != 2: feat.DumpReadable() pytest.fail('did not get expected FID') if feat.GetField(0) != 'modified_value': feat.DumpReadable() pytest.fail('did not get expected value') feat = None ds = None os.unlink('tmp/ogr_xlsx_7.xlsx') ############################################################################### # Test number of columns > 26 (#5774) def test_ogr_xlsx_8(): ds = ogr.GetDriverByName('XLSX').CreateDataSource('/vsimem/ogr_xlsx_8.xlsx') lyr = ds.CreateLayer('foo') for i in range(30): lyr.CreateField(ogr.FieldDefn('Field%d' % (i + 1))) f = ogr.Feature(lyr.GetLayerDefn()) for i in range(30): f.SetField(i, 'val%d' % (i + 1)) lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL('/vsizip//vsimem/ogr_xlsx_8.xlsx/xl/worksheets/sheet1.xml', 'rb') content = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) assert str(content).find('') >= 0 gdal.Unlink('/vsimem/ogr_xlsx_8.xlsx') ############################################################################### # Test Integer64 def test_ogr_xlsx_9(): ds = ogr.GetDriverByName('XLSX').CreateDataSource('/vsimem/ogr_xlsx_9.xlsx') lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('Field1', ogr.OFTInteger64)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 12345678901234) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_xlsx_9.xlsx') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger64 f = lyr.GetNextFeature() f = lyr.GetNextFeature() assert f.GetField(0) == 12345678901234 ds = None gdal.Unlink('/vsimem/ogr_xlsx_9.xlsx') ############################################################################### # Test DateTime with milliseconds def test_ogr_xlsx_10(): ds = ogr.GetDriverByName('XLSX').CreateDataSource('/vsimem/ogr_xlsx_10.xlsx') lyr = ds.CreateLayer('foo') lyr.CreateField(ogr.FieldDefn('Field1', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('Field2', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('Field3', ogr.OFTDateTime)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, '2015/12/23 12:34:56.789') f.SetField(1, '2015/12/23 12:34:56.000') f.SetField(2, '2015/12/23 12:34:56') lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_xlsx_10.xlsx') lyr = ds.GetLayer(0) for i in range(3): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == ogr.OFTDateTime f = lyr.GetNextFeature() if f.GetField(0) != '2015/12/23 12:34:56.789': f.DumpReadable() pytest.fail() if f.GetField(1) != '2015/12/23 12:34:56': f.DumpReadable() pytest.fail() if f.GetField(2) != '2015/12/23 12:34:56': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_xlsx_10.xlsx') ############################################################################### # Test reading sheet with more than 26 columns with holes (#6363)" def test_ogr_xlsx_11(): ds = ogr.Open('data/not_all_columns_present.xlsx') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() for i in (0, 27, 28, 29): if f['Field%d' % (i + 1)] != 'val%d' % (i + 1): f.DumpReadable() pytest.fail() ds = None ############################################################################### # Test reading a sheet whose file is stored as "absolute" in # workbook.xml.rels (#6733) def test_ogr_xlsx_12(): ds = ogr.Open('data/absolute_sheet_filename.xlsx') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None ds = None ############################################################################### # Test that data types are correctly picked up even if first row is missing data def test_ogr_xlsx_13(): gdal.SetConfigOption('OGR_XLSX_FIELD_TYPES', None) ds = ogr.Open('data/test_missing_row1_data.xlsx') lyr = ds.GetLayer(0) assert lyr.GetName() == 'Sheet1', 'bad layer name' assert lyr.GetLayerDefn().GetFieldDefn(0).GetName() == 'Asset Reference', \ 'invalid field name' assert lyr.GetLayerDefn().GetFieldCount() == 18, \ 'invalid field count ({})'.format(lyr.GetLayerDefn().GetFieldCount()) type_array = [ogr.OFTInteger, ogr.OFTString, ogr.OFTString, ogr.OFTInteger, ogr.OFTString, ogr.OFTDate, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTDate, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString] for i, typ in enumerate(type_array): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == typ, \ 'invalid type for field {}'.format(i + 1) ############################################################################### # Test that field names are picked up even if last field has no data def test_ogr_xlsx_14(): gdal.SetConfigOption('OGR_XLSX_FIELD_TYPES', None) ds = ogr.Open('data/test_empty_last_field.xlsx') lyr = ds.GetLayer(0) assert lyr.GetName() == 'Sheet1', 'bad layer name' assert lyr.GetLayerDefn().GetFieldDefn(0).GetName() == 'Asset Reference', \ 'invalid field name' assert lyr.GetLayerDefn().GetFieldCount() == 18, \ 'invalid field count ({})'.format(lyr.GetLayerDefn().GetFieldCount()) type_array = [ogr.OFTInteger, ogr.OFTString, ogr.OFTString, ogr.OFTInteger, ogr.OFTString, ogr.OFTDate, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTDate, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString, ogr.OFTString] for i, typ in enumerate(type_array): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == typ, \ 'invalid type for field {}'.format(i + 1) ############################################################################### # Test appending a layer to an existing document def test_ogr_xlsx_15(): out_filename = '/vsimem/ogr_xlsx_15.xlsx' gdal.VectorTranslate(out_filename, 'data/poly.shp', options='-f XLSX -nln first') gdal.VectorTranslate(out_filename, 'data/poly.shp', options='-update -nln second') ds = ogr.Open(out_filename) assert ds.GetLayerByName('first').GetFeatureCount() != 0 assert ds.GetLayerByName('second').GetFeatureCount() != 0 ds = None gdal.Unlink(out_filename) ############################################################################### # Test Boolean def test_ogr_xlsx_boolean(): out_filename = '/vsimem/ogr_xlsx_boolean.xlsx' ds = ogr.GetDriverByName('XLSX').CreateDataSource(out_filename) lyr = ds.CreateLayer('foo') fld_defn = ogr.FieldDefn('Field1', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open(out_filename) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(0).GetSubType() == ogr.OFSTBoolean f = lyr.GetNextFeature() assert f.GetField(0) == 1 ds = None gdal.Unlink(out_filename) ############################################################################### # Test reading DateTime, and numeric precision issues (#2683) def test_ogr_xlsx_read_datetime(): ds = ogr.Open('data/xlsx/datetime.xlsx') lyr = ds.GetLayer(0) got = [ f.GetFieldAsString(0) for f in lyr ] assert got == ['2020/04/07 09:58:00', '2020/04/07 09:58:01', '2020/04/07 09:58:02', '2020/04/07 09:58:03', '2020/04/07 09:58:04', '2020/04/07 09:58:05', '2020/04/07 10:03:00', '2020/04/07 10:10:00', '2020/04/07 10:29:00', '2020/04/07 10:42:00'] gdalautotest-3.1.2/ogr/ogr_elasticsearch.py0000775000175000017500000025163413701060010017517 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_elasticsearch.py c017dbc2e0f83ca1f7fedb61f325888721dfc206 2020-03-24 10:49:16 -0400 Tom Kralidis $ # # Project: GDAL/OGR Test Suite # Purpose: Elasticsearch driver testing (with fake server) # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest import gdaltest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test driver availability # def test_ogr_elasticsearch_init(): ogrtest.elasticsearch_drv = None ogrtest.srs_wgs84 = osr.SpatialReference() ogrtest.srs_wgs84.SetFromUserInput('WGS84') ogrtest.elasticsearch_drv = ogr.GetDriverByName('Elasticsearch') if ogrtest.elasticsearch_drv is None: pytest.skip() gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ############################################################################### # Test writing into an nonexistent Elasticsearch datastore. def test_ogr_elasticsearch_nonexistent_server(): if ogrtest.elasticsearch_drv is None: pytest.skip() with gdaltest.error_handler(): ds = ogrtest.elasticsearch_drv.CreateDataSource( '/vsimem/nonexistent_host') assert ds is None, 'managed to open nonexistent Elasticsearch datastore.' with gdaltest.error_handler(): ds = ogrtest.elasticsearch_drv.Open('ES:/vsimem/nonexistent_host') assert ds is None, 'managed to open nonexistent Elasticsearch datastore.' gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{}""") with gdaltest.error_handler(): ds = ogrtest.elasticsearch_drv.Open('ES:/vsimem/fakeelasticsearch') assert ds is None, 'managed to open invalid Elasticsearch datastore.' gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":null}""") with gdaltest.error_handler(): ds = ogrtest.elasticsearch_drv.Open('ES:/vsimem/fakeelasticsearch') assert ds is None, 'managed to open invalid Elasticsearch datastore.' gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{}}""") with gdaltest.error_handler(): ds = ogrtest.elasticsearch_drv.Open('ES:/vsimem/fakeelasticsearch') assert ds is None, 'managed to open invalid Elasticsearch datastore.' gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{"number":null}}""") with gdaltest.error_handler(): ds = ogrtest.elasticsearch_drv.Open('ES:/vsimem/fakeelasticsearch') assert ds is None, 'managed to open invalid Elasticsearch datastore.' ############################################################################### # Simple test def test_ogr_elasticsearch_1(): if ogrtest.elasticsearch_drv is None: pytest.skip() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{"number":"2.0.0"}}""") ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") assert ds is not None, 'did not managed to open Elasticsearch datastore' assert ds.TestCapability(ogr.ODsCCreateLayer) != 0 assert ds.TestCapability(ogr.ODsCDeleteLayer) != 0 assert ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) != 0 # Failed index creation with gdaltest.error_handler(): lyr = ds.CreateLayer('foo', srs=ogrtest.srs_wgs84, options=['FID=']) assert lyr is None assert gdal.GetLastErrorType() == gdal.CE_Failure gdal.ErrorReset() # Successful index creation gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo&CUSTOMREQUEST=PUT', '{}') lyr = ds.CreateLayer('foo', srs=ogrtest.srs_wgs84, options=['FID=']) assert lyr is not None assert gdal.GetLastErrorType() == gdal.CE_None gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo/_mapping/FeatureCollection&POSTFIELDS' '={ "FeatureCollection": { "properties": { "type": ' '{ "type": "string" }, "properties": { } } } }', '{}') # OVERWRITE an nonexistent layer. lyr = ds.CreateLayer('foo', geom_type=ogr.wkbNone, options=['OVERWRITE=TRUE', 'FID=']) assert gdal.GetLastErrorType() == gdal.CE_None # Simulate failed overwrite gdal.FileFromMemBuffer('/vsimem/fakeelasticsearch/foo', '{"foo":{"mappings":{"FeatureCollection":{}}}}') with gdaltest.error_handler(): lyr = ds.CreateLayer('foo', geom_type=ogr.wkbNone, options=['OVERWRITE=TRUE']) assert gdal.GetLastErrorType() == gdal.CE_Failure gdal.ErrorReset() # Successful overwrite gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo&CUSTOMREQUEST=DELETE', '{}') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo/FeatureCollection&POSTFIELDS={ }', '{}') lyr = ds.CreateLayer('foo', geom_type=ogr.wkbNone, options=[ 'OVERWRITE=TRUE', 'BULK_INSERT=NO', 'FID=']) assert gdal.GetLastErrorType() == gdal.CE_None assert lyr.TestCapability(ogr.OLCFastFeatureCount) != 0 assert lyr.TestCapability(ogr.OLCStringsAsUTF8) != 0 assert lyr.TestCapability(ogr.OLCSequentialWrite) != 0 assert lyr.TestCapability(ogr.OLCCreateField) != 0 assert lyr.TestCapability(ogr.OLCCreateGeomField) != 0 feat = ogr.Feature(lyr.GetLayerDefn()) gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo/FeatureCollection&POSTFIELDS={ "properties": { } }', '{}') ret = lyr.CreateFeature(feat) assert ret == 0 feat = None gdal.FileFromMemBuffer('/vsimem/fakeelasticsearch/foo&CUSTOMREQUEST=PUT', '{"error":"IndexAlreadyExistsException[[foo] already exists]","status":400}') with gdaltest.error_handler(): lyr = ds.CreateLayer('foo', srs=ogrtest.srs_wgs84) assert gdal.GetLastErrorType() == gdal.CE_Failure assert lyr is None gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/foo/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "type": "geo_shape" } } } }""", "") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", '') ds.DeleteLayer(-1) ds.DeleteLayer(10) ret = ds.DeleteLayer(0) assert ret == 0 gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo2&CUSTOMREQUEST=PUT', '{}') gdal.FileFromMemBuffer('/vsimem/fakeelasticsearch/foo2/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { "str_field": { "type": "string", "index": "not_analyzed" }, "int_field": { "type": "integer", "store": "yes" }, "int64_field": { "type": "long", "index": "no" }, "real_field": { "type": "double" }, "real_field_unset": { "type": "double" }, "boolean_field": { "type": "boolean" }, "strlist_field": { "type": "string" }, "intlist_field": { "type": "integer" }, "int64list_field": { "type": "long" }, "reallist_field": { "type": "double" }, "date_field": { "type": "date", "format": "yyyy\/MM\/dd HH:mm:ss.SSSZZ||yyyy\/MM\/dd HH:mm:ss.SSS||yyyy\/MM\/dd" }, "datetime_field": { "type": "date", "format": "yyyy\/MM\/dd HH:mm:ss.SSSZZ||yyyy\/MM\/dd HH:mm:ss.SSS||yyyy\/MM\/dd" }, "time_field": { "type": "date", "format": "HH:mm:ss.SSS" }, "binary_field": { "type": "binary" } } }, "geometry": { "properties": { "type": { "type": "string" }, "coordinates": { "type": "geo_point" } } } }, "_meta": { "fields": { "strlist_field": "StringList", "intlist_field": "IntegerList", "int64list_field": "Integer64List", "reallist_field": "RealList" } } } }', '{}') lyr = ds.CreateLayer('foo2', srs=ogrtest.srs_wgs84, geom_type=ogr.wkbPoint, options=['BULK_INSERT=NO', 'FID=', 'STORED_FIELDS=int_field', 'NOT_ANALYZED_FIELDS=str_field', 'NOT_INDEXED_FIELDS=int64_field']) lyr.CreateField(ogr.FieldDefn('str_field', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('int_field', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64_field', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('real_field', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('real_field_unset', ogr.OFTReal)) fld_defn = ogr.FieldDefn('boolean_field', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) lyr.CreateField(ogr.FieldDefn('strlist_field', ogr.OFTStringList)) lyr.CreateField(ogr.FieldDefn('intlist_field', ogr.OFTIntegerList)) lyr.CreateField(ogr.FieldDefn('int64list_field', ogr.OFTInteger64List)) lyr.CreateField(ogr.FieldDefn('reallist_field', ogr.OFTRealList)) lyr.CreateField(ogr.FieldDefn('date_field', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('datetime_field', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('time_field', ogr.OFTTime)) lyr.CreateField(ogr.FieldDefn('binary_field', ogr.OFTBinary)) ret = lyr.SyncToDisk() assert ret == 0 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('str_field', 'a') feat.SetField('int_field', 1) feat.SetField('int64_field', 123456789012) feat.SetField('real_field', 2.34) feat.SetField('boolean_field', 1) feat['strlist_field'] = ['a', 'b'] feat['intlist_field'] = [1, 2] feat['int64list_field'] = [123456789012, 2] feat['reallist_field'] = [1.23, 4.56] feat['date_field'] = '2015/08/12' feat['datetime_field'] = '2015/08/12 12:34:56.789' feat['time_field'] = '12:34:56.789' feat.SetFieldBinaryFromHexString('binary_field', '0123465789ABCDEF') feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) # Simulate server error with gdaltest.error_handler(): ret = lyr.CreateFeature(feat) assert ret != 0 # Success gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo2/FeatureCollection&POSTFIELDS={ "geometry": { "type": "Point", "coordinates": [ 0.0, 1.0 ] }, "type": "Feature", "properties": { "str_field": "a", "int_field": 1, "int64_field": 123456789012, "real_field": 2.34, "boolean_field": true, "strlist_field": [ "a", "b" ], "intlist_field": [ 1, 2 ], "int64list_field": [ 123456789012, 2 ], "reallist_field": [ 1.23, 4.56 ], "date_field": "2015\/08\/12", "datetime_field": "2015\/08\/12 12:34:56.789", "time_field": "12:34:56.789", "binary_field": "ASNGV4mrze8=" } }', '{ "_id": "my_id" }') ret = lyr.CreateFeature(feat) assert ret == 0 assert feat['_id'] == 'my_id' # DateTime with TZ gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo2/FeatureCollection&POSTFIELDS={ "properties": { "datetime_field": "2015\/08\/12 12:34:56.789+03:00" } }', '{}') feat = ogr.Feature(lyr.GetLayerDefn()) feat['datetime_field'] = '2015/08/12 12:34:56.789+0300' ret = lyr.CreateFeature(feat) assert ret == 0 # CreateFeature() with _id set gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo2/FeatureCollection/my_id2&POSTFIELDS={ "properties": { } }', '{}') feat = ogr.Feature(lyr.GetLayerDefn()) feat['_id'] = 'my_id2' ret = lyr.CreateFeature(feat) assert ret == 0 # Failed SetFeature because of missing _id feat = ogr.Feature(lyr.GetLayerDefn()) with gdaltest.error_handler(): ret = lyr.SetFeature(feat) assert ret != 0 # Simulate server error feat['_id'] = 'my_id' with gdaltest.error_handler(): ret = lyr.SetFeature(feat) assert ret != 0 gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo2/FeatureCollection/my_id&POSTFIELDS={ "properties": { } }', '{}') ret = lyr.SetFeature(feat) assert ret == 0 # With explicit GEOM_MAPPING_TYPE=GEO_POINT gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo3&CUSTOMREQUEST=PUT', '{}') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo3/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "properties": { "type": { "type": "string" }, "coordinates": { "type": "geo_point", "fielddata": { "format": "compressed", "precision": "1m" } } } } }, "_meta": { "fid": "ogc_fid" } } }', '{}') lyr = ds.CreateLayer('foo3', srs=ogrtest.srs_wgs84, options=[ 'GEOM_MAPPING_TYPE=GEO_POINT', 'GEOM_PRECISION=1m', 'BULK_INSERT=NO']) gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo3/FeatureCollection&POSTFIELDS={ "ogc_fid": 1, "geometry": { "type": "Point", "coordinates": [ 0.5, 0.5 ] }, "type": "Feature", "properties": { } }', '{}') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1)')) ret = lyr.CreateFeature(feat) assert ret == 0 feat = None # Test explicit MAPPING first with error case gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo4&CUSTOMREQUEST=PUT', '{}') with gdaltest.error_handler(): lyr = ds.CreateLayer('foo4', srs=ogrtest.srs_wgs84, options=[ 'MAPPING={ "FeatureCollection": { "properties": {} }}']) assert lyr is None # Test successful explicit MAPPING with inline JSon mapping gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo4/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": {} }}', '{}') lyr = ds.CreateLayer('foo4', srs=ogrtest.srs_wgs84, options=[ 'MAPPING={ "FeatureCollection": { "properties": {} }}']) assert lyr is not None # Test successful explicit MAPPING with reference to file with mapping gdal.FileFromMemBuffer( '/vsimem/map.txt', '{ "FeatureCollection": { "properties": { "foo": { "type": "string" } } }}') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo4/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "foo": { "type": "string" } } }}', '{}') lyr = ds.CreateLayer('foo4', srs=ogrtest.srs_wgs84, options=['MAPPING=/vsimem/map.txt']) gdal.Unlink('/vsimem/map.txt') assert lyr is not None # Test successful explicit INDEX_DEFINITION with inline JSon mapping gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo4&CUSTOMREQUEST=PUT&POSTFIELDS={}', '{}') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo4/_mapping/FeatureCollection&POSTFIELDS={}', '{}') lyr = ds.CreateLayer('foo4', srs=ogrtest.srs_wgs84, options=[ 'INDEX_DEFINITION={}', 'MAPPING={}']) assert lyr is not None # Test successful explicit INDEX_DEFINITION with reference to file gdal.FileFromMemBuffer('/vsimem/map.txt', '{"foo":"bar"}') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo4&CUSTOMREQUEST=PUT&POSTFIELDS={"foo":"bar"}', '{}') lyr = ds.CreateLayer('foo4', srs=ogrtest.srs_wgs84, options=['INDEX_DEFINITION=/vsimem/map.txt', 'MAPPING={}']) gdal.Unlink('/vsimem/map.txt') assert lyr is not None ############################################################################### # Geo_shape geometries def test_ogr_elasticsearch_2(): if ogrtest.elasticsearch_drv is None: pytest.skip() ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") assert ds is not None, 'did not managed to open Elasticsearch datastore' gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo&CUSTOMREQUEST=PUT', '{}') gdal.Unlink('/vsimem/fakeelasticsearch/foo') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { }, "geometry": { "type": "geo_shape" } } } }', '{}') lyr = ds.CreateLayer('foo', srs=ogrtest.srs_wgs84, options=['BULK_INSERT=NO', 'FID=']) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt( 'GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(0 1,2 3),POLYGON((0 0,0 10,10 10,0 0),(1 1,1 9,9 9,1 1)),MULTIPOINT(0 1, 2 3),MULTILINESTRING((0 1,2 3),(4 5,6 7)),MULTIPOLYGON(((0 0,0 10,10 10,0 0),(1 1,1 9,9 9,1 1)),((-1 -1,-1 -9,-9 -9,-1 -1))))')) gdal.FileFromMemBuffer('/vsimem/fakeelasticsearch/foo/FeatureCollection&POSTFIELDS={ "geometry": { "type": "geometrycollection", "geometries": [ { "type": "point", "coordinates": [ 0.0, 1.0 ] }, { "type": "linestring", "coordinates": [ [ 0.0, 1.0 ], [ 2.0, 3.0 ] ] }, { "type": "polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ 0.0, 10.0 ], [ 10.0, 10.0 ], [ 0.0, 0.0 ] ], [ [ 1.0, 1.0 ], [ 1.0, 9.0 ], [ 9.0, 9.0 ], [ 1.0, 1.0 ] ] ] }, { "type": "multipoint", "coordinates": [ [ 0.0, 1.0 ], [ 2.0, 3.0 ] ] }, { "type": "multilinestring", "coordinates": [ [ [ 0.0, 1.0 ], [ 2.0, 3.0 ] ], [ [ 4.0, 5.0 ], [ 6.0, 7.0 ] ] ] }, { "type": "multipolygon", "coordinates": [ [ [ [ 0.0, 0.0 ], [ 0.0, 10.0 ], [ 10.0, 10.0 ], [ 0.0, 0.0 ] ], [ [ 1.0, 1.0 ], [ 1.0, 9.0 ], [ 9.0, 9.0 ], [ 1.0, 1.0 ] ] ], [ [ [ -1.0, -1.0 ], [ -1.0, -9.0 ], [ -9.0, -9.0 ], [ -1.0, -1.0 ] ] ] ] } ] }, "type": "Feature", "properties": { } }', '{}') ret = lyr.CreateFeature(feat) assert ret == 0 feat = None # Same but with explicit GEOM_MAPPING_TYPE=GEO_SHAPE lyr = ds.CreateLayer('foo', srs=ogrtest.srs_wgs84, options=[ 'GEOM_MAPPING_TYPE=GEO_SHAPE', 'GEOM_PRECISION=1m', 'BULK_INSERT=NO', 'FID=']) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt( 'GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(0 1,2 3),POLYGON((0 0,0 10,10 10,0 0),(1 1,1 9,9 9,1 1)),MULTIPOINT(0 1, 2 3),MULTILINESTRING((0 1,2 3),(4 5,6 7)),MULTIPOLYGON(((0 0,0 10,10 10,0 0),(1 1,1 9,9 9,1 1)),((-1 -1,-1 -9,-9 -9,-1 -1))))')) gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "type": "geo_shape", "precision": "1m" } } } }', '{}') ret = lyr.CreateFeature(feat) assert ret == 0 feat = None ############################################################################### # Test bulk insert and layer name laundering def test_ogr_elasticsearch_3(): if ogrtest.elasticsearch_drv is None: pytest.skip() ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") assert ds is not None, 'did not managed to open Elasticsearch datastore' gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/name_laundering&CUSTOMREQUEST=PUT', '{}') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/name_laundering/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "type": "geo_shape" } } } }', '{}') lyr = ds.CreateLayer( 'NAME/laundering', srs=ogrtest.srs_wgs84, options=['FID=']) feat = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(feat) assert ret == 0 feat = None with gdaltest.error_handler(): ret = lyr.SyncToDisk() assert ret != 0 feat = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(feat) assert ret == 0 feat = None gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_bulk&POSTFIELDS={"index" :{"_index":"name_laundering", "_type":"FeatureCollection"}} { "properties": { } } """, '{}') ret = lyr.SyncToDisk() assert ret == 0 ds = None ############################################################################### # Test basic read functionality def test_ogr_elasticsearch_4(): if ogrtest.elasticsearch_drv is None: pytest.skip() with gdaltest.error_handler(): ds = ogr.Open('ES:/vsimem/fakeelasticsearch') assert ds is not None # Test case where there's no index gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", '\n') ds = ogr.Open('ES:/vsimem/fakeelasticsearch') assert ds is not None assert ds.GetLayerCount() == 0 # Test opening a layer by name gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/_mapping?pretty""", """ { "a_layer": { "mappings": { "FeatureCollection": { "_meta": { "fid": "my_fid", "geomfields": { "a_geoshape": "LINESTRING" }, "fields": { "strlist_field": "StringList", "intlist_field": "IntegerList", "int64list_field": "Integer64List", "doublelist_field": "RealList" } }, "properties": { "type": { "type": "string" }, "a_geoshape": { "type": "geo_shape", }, "a_geopoint": { "properties": { "coordinates": { "type": "geo_point" } } }, "my_fid": { "type": "long" }, "properties" : { "properties": { "str_field": { "type": "string"}, "int_field": { "type": "integer"}, "int64_field": { "type": "long"}, "double_field": { "type": "double"}, "float_field": { "type": "float"}, "boolean_field": { "type": "boolean"}, "binary_field": { "type": "binary"}, "dt_field": { "type": "date"}, "date_field": { "type": "date", "format": "yyyy\/MM\/dd"}, "time_field": { "type": "date", "format": "HH:mm:ss.SSS"}, "strlist_field": { "type": "string"}, "intlist_field": { "type": "integer"}, "int64list_field": { "type": "long"}, "doublelist_field": { "type": "double"} } } } } } } } """) ds = ogr.Open('ES:/vsimem/fakeelasticsearch') assert ds is not None lyr = ds.GetLayerByName('a_layer') assert lyr is not None lyr = ds.GetLayerByName('a_layer') assert lyr is not None with gdaltest.error_handler(): lyr = ds.GetLayerByName('not_a_layer') assert lyr is None ds = None # Test LAYER open option ds = gdal.OpenEx('ES:/vsimem/fakeelasticsearch', open_options=['LAYER=a_layer']) assert ds.GetLayerCount() == 1 ds = None with gdaltest.error_handler(): ds = gdal.OpenEx('ES:/vsimem/fakeelasticsearch', open_options=['LAYER=not_a_layer']) assert ds is None ds = None # Test GetLayerByName() and GetLayerCount() ds = ogr.Open('ES:/vsimem/fakeelasticsearch') lyr = ds.GetLayerByName('a_layer') lyr = ds.GetLayerByName('a_layer') assert ds.GetLayerCount() == 1 ds = None # Test GetLayerCount() gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", 'a_layer \n') ds = ogr.Open('ES:/vsimem/fakeelasticsearch') assert ds is not None assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) with gdaltest.error_handler(): lyr_defn = lyr.GetLayerDefn() idx = lyr_defn.GetFieldIndex("strlist_field") assert lyr_defn.GetFieldDefn(idx).GetType() == ogr.OFTStringList idx = lyr_defn.GetGeomFieldIndex("a_geoshape") assert lyr_defn.GetGeomFieldDefn(idx).GetType() == ogr.wkbLineString assert lyr.GetFIDColumn() == 'my_fid' gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_count?pretty""", """{ }""") with gdaltest.error_handler(): lyr.GetFeatureCount() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_count?pretty""", """{ "hits": null }""") with gdaltest.error_handler(): lyr.GetFeatureCount() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_count?pretty""", """{ "hits": { "count": null } }""") with gdaltest.error_handler(): lyr.GetFeatureCount() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_count?pretty""", """{ "hits": { "count": 3 } }""") fc = lyr.GetFeatureCount() assert fc == 3 with gdaltest.error_handler(): f = lyr.GetNextFeature() assert f is None gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ }""") lyr.ResetReading() f = lyr.GetNextFeature() assert f is None gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "hits": null }""") lyr.ResetReading() lyr.GetNextFeature() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "hits": { "hits": null } }""") lyr.ResetReading() lyr.GetNextFeature() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "hits": { "hits": [ null, {}, { "_source":null } ] } }""") lyr.ResetReading() lyr.GetNextFeature() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "my_fid": 5, "a_geopoint" : { "type": "Point", "coordinates": [2,49] }, "a_geoshape": { "type": "linestring", "coordinates": [[2,49],[3,50]] }, "properties": { "str_field": "foo", "int_field": 1, "int64_field": 123456789012, "double_field": 1.23, "float_field": 3.45, "boolean_field": true, "binary_field": "ASNGV4mrze8=", "dt_field": "2015\/08\/12 12:34:56.789", "date_field": "2015\/08\/12", "time_field": "12:34:56.789", "strlist_field": ["foo"], "intlist_field": [1], "int64list_field": [123456789012], "doublelist_field": [1.23] } }, }] } }""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_search/scroll?scroll=1m&scroll_id=my_scrollid""", "{}") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_search/scroll?scroll_id=my_scrollid&CUSTOMREQUEST=DELETE""", '{}') ds = ogr.Open('ES:/vsimem/fakeelasticsearch') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 15 gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "a_geopoint" : { "type": "Point", "coordinates": [2,49] }, "a_geoshape": { "type": "linestring", "coordinates": [[2,49],[3,50]] }, "my_fid": 5, "properties": { "str_field": "foo", "int_field": 1, "int64_field": 123456789012, "double_field": 1.23, "float_field": 3.45, "boolean_field": true, "binary_field": "ASNGV4mrze8=", "dt_field": "2015\/08\/12 12:34:56.789", "date_field": "2015\/08\/12", "time_field": "12:34:56.789", "strlist_field": ["foo"], "intlist_field": [1], "int64list_field": [123456789012], "doublelist_field": [1.23] } }, }, { "_source": { "type": "Feature", "properties": { "non_existing": "foo" } }, } ] } }""") lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None if f.GetFID() != 5 or f['_id'] != 'my_id' or f['str_field'] != 'foo' or f['int_field'] != 1 or f['int64_field'] != 123456789012 or \ f['double_field'] != 1.23 or f['float_field'] != 3.45 or f['boolean_field'] != 1 or \ f['binary_field'] != '0123465789ABCDEF' or f['dt_field'] != '2015/08/12 12:34:56.789' or \ f['date_field'] != '2015/08/12' or f['time_field'] != '12:34:56.789' or \ f['strlist_field'] != ['foo'] or \ f['intlist_field'] != [1] or \ f['int64list_field'] != [123456789012] or \ f['doublelist_field'] != [1.23] or \ f['a_geopoint'].ExportToWkt() != 'POINT (2 49)' or \ f['a_geoshape'].ExportToWkt() != 'LINESTRING (2 49,3 50)': f.DumpReadable() pytest.fail() lyr.ResetReading() lyr.GetNextFeature() f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_search/scroll?scroll=1m&scroll_id=my_scrollid""", """{ "hits": { "hits":[ { "_source": { "type": "Feature", "properties": { "int_field": 2, } }, } ] } }""") f = lyr.GetNextFeature() assert f['int_field'] == 2 gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_search/scroll?scroll=1m&scroll_id=my_scrollid""", """{ "hits": { "hits":[] } }""") f = lyr.GetNextFeature() assert f is None f = lyr.GetNextFeature() assert f is None lyr.SetSpatialFilterRect(1, 48, 3, 50) lyr.ResetReading() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "geo_shape": { "a_geoshape": { "shape": { "type": "envelope", "coordinates": [ [ 1.0, 50.0 ], [ 3.0, 48.0 ] ] } } } } } } }""", """{ "hits": { "hits":[ { "_source": { "type": "Feature", "a_geoshape" : { "type": "Point", "coordinates": [2,49] }, "properties": { "int_field": 3, } }, } ] } }""") f = lyr.GetNextFeature() assert f['int_field'] == 3 lyr.SetSpatialFilterRect(1, 1, 48, 3, 50) lyr.ResetReading() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "geo_bounding_box": { "a_geopoint.coordinates": { "top_left": { "lat": 50.0, "lon": 1.0 }, "bottom_right": { "lat": 48.0, "lon": 3.0 } } } } } } }""", """{ "hits": { "hits":[ { "_source": { "type": "Feature", "a_geopoint" : { "type": "Point", "coordinates": [2,49] }, "properties": { "int_field": 4, } }, } ] } }""") f = lyr.GetNextFeature() assert f['int_field'] == 4 gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?pretty&POSTFIELDS={ "size": 0, "query": { "constant_score" : { "filter": { "geo_bounding_box": { "a_geopoint.coordinates": { "top_left": { "lat": 50.0, "lon": 1.0 }, "bottom_right": { "lat": 48.0, "lon": 3.0 } } } } } } }""", """{ "hits": { "total": 10 } }""") fc = lyr.GetFeatureCount() assert fc == 10 lyr.SetSpatialFilter(None) lyr.SetSpatialFilterRect(-180, -90, 180, 90) with gdaltest.error_handler(): lyr.SetSpatialFilter(-1, None) lyr.SetSpatialFilter(2, None) lyr.SetAttributeFilter("{ 'FOO' : 'BAR' }") lyr.ResetReading() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ 'FOO' : 'BAR' }""", """{ "hits": { "hits":[ { "_source": { "type": "Feature", "a_geoshape" : { "type": "Point", "coordinates": [2,49] }, "properties": { "int_field": 5, } }, } ] } }""") f = lyr.GetNextFeature() assert f['int_field'] == 5 lyr.SetAttributeFilter(None) sql_lyr = ds.ExecuteSQL("{ 'FOO' : 'BAR' }", dialect='ES') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_search?scroll=1m&size=100&POSTFIELDS={ 'FOO' : 'BAR' }""", """{ "hits": { "hits":[ { "_index": "some_layer", "_type": "some_type", "_source": { "some_field": 5 }, } ] } }""") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/some_layer/_mapping/some_type?pretty""", """ { "some_layer": { "mappings": { "some_type": { "properties": { "some_field": { "type": "string"} } } } } } """) f = sql_lyr.GetNextFeature() if f['some_field'] != '5': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) # Invalid index with gdaltest.error_handler(): bbox = lyr.GetExtent(geom_field=-1) # geo_shape bbox = lyr.GetExtent(geom_field=0) # Invalid index with gdaltest.error_handler(): bbox = lyr.GetExtent(geom_field=2) # No response with gdaltest.error_handler(): bbox = lyr.GetExtent(geom_field=1) # Invalid response gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?search_type=count&pretty&POSTFIELDS={ "aggs" : { "bbox" : { "geo_bounds" : { "field" : "a_geopoint.coordinates" } } } }""", """{ "aggregations" : { "bbox" : { "bounds" : { "top_left" : { }, "bottom_right" : { } } } } }""") with gdaltest.error_handler(): bbox = lyr.GetExtent(geom_field=1) # Valid response gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?pretty&POSTFIELDS={ "size": 0, "aggs" : { "bbox" : { "geo_bounds" : { "field" : "a_geopoint.coordinates" } } } }""", """{ "aggregations" : { "bbox" : { "bounds" : { "top_left" : { "lat" : 10, "lon" : 1 }, "bottom_right" : { "lat" : 9, "lon" : 2 } } } } }""") bbox = lyr.GetExtent(geom_field=1) assert bbox == (1.0, 2.0, 9.0, 10.0) # Operations not available in read-only mode with gdaltest.error_handler(): ret = lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) assert ret != 0 with gdaltest.error_handler(): ret = lyr.CreateGeomField(ogr.GeomFieldDefn('shape', ogr.wkbPoint)) assert ret != 0 with gdaltest.error_handler(): ret = lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) assert ret != 0 lyr.ResetReading() with gdaltest.error_handler(): ret = lyr.SetFeature(lyr.GetNextFeature()) assert ret != 0 with gdaltest.error_handler(): lyr = ds.CreateLayer('will_not_work') assert lyr is None with gdaltest.error_handler(): ret = ds.DeleteLayer(0) assert ret != 0 ############################################################################### # Write documents with non geojson structure def test_ogr_elasticsearch_5(): if ogrtest.elasticsearch_drv is None: pytest.skip() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch/_stats", """{"_shards":{"total":0,"successful":0,"failed":0},"indices":{}}""") ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/non_geojson&CUSTOMREQUEST=PUT', '') gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/non_geojson/_mapping/my_mapping&POSTFIELDS={ "my_mapping": { "properties": { "str": { "type": "string", "store": "yes" }, "geometry": { "type": "geo_shape" } }, "_meta": { "fid": "ogc_fid" } } }', '{}') lyr = ds.CreateLayer('non_geojson', srs=ogrtest.srs_wgs84, options=[ 'MAPPING_NAME=my_mapping', 'BULK_INSERT=NO', 'STORE_FIELDS=YES']) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(5) feat['str'] = 'foo' gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/non_geojson/my_mapping&POSTFIELDS={ "ogc_fid": 5, "str": "foo" }', '{}') ret = lyr.CreateFeature(feat) assert ret == 0 feat = None ds = None gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", 'non_geojson\n') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/non_geojson/_mapping?pretty""", """ { "non_geojson": { "mappings": { "my_mapping": { "properties": { "a_geoshape": { "type": "geo_shape", }, "a_geopoint": { "properties": { "type": "string", "coordinates": { "type": "geo_point" } } }, "another_geopoint": { "type": "geo_point" }, "str_field": { "type": "string"}, "superobject": { "properties": { "subfield": { "type": "string" }, "subobject": { "properties": { "subfield": { "type": "string" } } }, "another_geoshape": { "type": "geo_shape" } } } } } } } } """) ds = gdal.OpenEx("ES:/vsimem/fakeelasticsearch", gdal.OF_UPDATE, open_options=['BULK_INSERT=NO']) lyr = ds.GetLayer(0) gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/non_geojson/my_mapping/_search?scroll=1m&size=100""", """{ "hits": { "hits":[ { "_source": { "a_geopoint" : { "type": "Point", "coordinates": [2,49] }, "a_geoshape": { "type": "linestring", "coordinates": [[2,49],[3,50]] }, "another_geopoint": "49.5,2.5", "str_field": "foo", "superobject": { "subfield": 5, "subobject": { "subfield": "foo", "another_subfield": 6 }, "another_geoshape": { "type": "point", "coordinates": [3,50] }, "another_geoshape2": { "type": "point", "coordinates": [2,50] } } } }, { "_source": { "another_field": "foo", "another_geopoint": { "lat": 49.1, "lon": 2.1 } } }, { "_source": { "another_geopoint": "49.2,2.2" } }, { "_source": {""" + # "this is the geohash format", """ "another_geopoint": "u09qv80meqh16ve02equ" } }] } }""") index = lyr.GetLayerDefn().GetFieldIndex('another_field') assert index >= 0 f = lyr.GetNextFeature() if f['str_field'] != 'foo' or \ f['superobject.subfield'] != '5' or \ f['superobject.subobject.subfield'] != 'foo' or \ f['superobject.subobject.another_subfield'] != 6 or \ f['a_geopoint'].ExportToWkt() != 'POINT (2 49)' or \ f['another_geopoint'].ExportToWkt() != 'POINT (2.5 49.5)' or \ f['a_geoshape'].ExportToWkt() != 'LINESTRING (2 49,3 50)' or \ f['superobject.another_geoshape'].ExportToWkt() != 'POINT (3 50)' or \ f['superobject.another_geoshape2'].ExportToWkt() != 'POINT (2 50)': f.DumpReadable() pytest.fail() f['_id'] = 'my_id' gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/non_geojson/my_mapping/my_id&POSTFIELDS={ "a_geoshape": { "type": "linestring", "coordinates": [ [ 2.0, 49.0 ], [ 3.0, 50.0 ] ] }, "a_geopoint": { "type": "Point", "coordinates": [ 2.0, 49.0 ] }, "another_geopoint": [ 2.5, 49.5 ], "superobject": { "another_geoshape": { "type": "point", "coordinates": [ 3.0, 50.0 ] }, "another_geoshape2": { "type": "point", "coordinates": [ 2.0, 50.0 ] }, "subfield": "5", "subobject": { "subfield": "foo", "another_subfield": 6 } }, "str_field": "foo" }""", "{}") ret = lyr.SetFeature(f) assert ret == 0 f = lyr.GetNextFeature() if f['another_geopoint'].ExportToWkt() != 'POINT (2.1 49.1)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['another_geopoint'].ExportToWkt() != 'POINT (2.2 49.2)': f.DumpReadable() pytest.fail() # Test geohash f = lyr.GetNextFeature() if ogrtest.check_feature_geometry(f['another_geopoint'], 'POINT (2 49)') != 0: f.DumpReadable() pytest.fail() f = None lyr.CreateField(ogr.FieldDefn('superobject.subfield2', ogr.OFTString)) with gdaltest.error_handler(): lyr.CreateGeomField(ogr.GeomFieldDefn( 'superobject.another_geoshape3', ogr.wkbPoint)) f = ogr.Feature(lyr.GetLayerDefn()) f['superobject.subfield2'] = 'foo' f['superobject.another_geoshape3'] = ogr.CreateGeometryFromWkt( 'POINT (3 50)') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/non_geojson/_mapping/my_mapping&POSTFIELDS={ "my_mapping": { "properties": { "str_field": { "type": "string" }, "superobject": { "properties": { "subfield": { "type": "string" }, "subobject": { "properties": { "subfield": { "type": "string" }, "another_subfield": { "type": "integer" } } }, "subfield2": { "type": "string" }, "another_geoshape": { "type": "geo_shape" }, "another_geoshape2": { "type": "geo_shape" }, "another_geoshape3": { "properties": { "type": { "type": "string" }, "coordinates": { "type": "geo_point" } } } } }, "another_field": { "type": "string" }, "a_geoshape": { "type": "geo_shape" }, "a_geopoint": { "properties": { "type": { "type": "string" }, "coordinates": { "type": "geo_point" } } }, "another_geopoint": { "type": "geo_point" } }, "_meta": { "geomfields": { "superobject.another_geoshape2": "Point" } } } }""", '{}') gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/non_geojson/my_mapping&POSTFIELDS={ "superobject": { "another_geoshape3": { "type": "Point", "coordinates": [ 3.0, 50.0 ] }, "subfield2": "foo" } }""", "{}") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/non_geojson/my_mapping/_count?pretty""", "{}") lyr.CreateFeature(f) ds = gdal.OpenEx("ES:/vsimem/fakeelasticsearch", open_options=['FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=0']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['str_field'] != 'foo' or \ f['superobject.subfield'] != '5' or \ f['a_geopoint'].ExportToWkt() != 'POINT (2 49)' or \ f['a_geoshape'].ExportToWkt() != 'LINESTRING (2 49,3 50)' or \ f['superobject.another_geoshape'].ExportToWkt() != 'POINT (3 50)': f.DumpReadable() pytest.fail() ds = gdal.OpenEx("ES:/vsimem/fakeelasticsearch", open_options=[ 'FEATURE_COUNT_TO_ESTABLISH_FEATURE_DEFN=0', 'FLATTEN_NESTED_ATTRIBUTES=FALSE']) lyr = ds.GetLayer(0) index = lyr.GetLayerDefn().GetFieldIndex('another_field') assert index < 0 f = lyr.GetNextFeature() if f['str_field'] != 'foo' or \ f['superobject'] != '{ "subfield": 5, "subobject": { "subfield": "foo", "another_subfield": 6 }, "another_geoshape": { "type": "point", "coordinates": [ 3, 50 ] }, "another_geoshape2": { "type": "point", "coordinates": [ 2, 50 ] } }' or \ f['a_geopoint'].ExportToWkt() != 'POINT (2 49)' or \ f['a_geoshape'].ExportToWkt() != 'LINESTRING (2 49,3 50)': f.DumpReadable() pytest.fail() ds = gdal.OpenEx("ES:/vsimem/fakeelasticsearch", gdal.OF_UPDATE, open_options=['JSON_FIELD=YES']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['str_field'] != 'foo' or \ f['superobject.subfield'] != '5' or \ f['_json'].find('{') != 0 or \ f['a_geopoint'].ExportToWkt() != 'POINT (2 49)' or \ f['a_geoshape'].ExportToWkt() != 'LINESTRING (2 49,3 50)' or \ f['superobject.another_geoshape'].ExportToWkt() != 'POINT (3 50)': f.DumpReadable() pytest.fail() f['_id'] = 'my_id' f['_json'] = '{ "foo": "bar" }' gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/non_geojson/my_mapping/my_id&POSTFIELDS={ "foo": "bar" }""", "{}") ret = lyr.SetFeature(f) assert ret == 0 ############################################################################### # Test reading circle and envelope geometries def test_ogr_elasticsearch_6(): if ogrtest.elasticsearch_drv is None: pytest.skip() gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", 'non_standard_geometries\n') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/non_standard_geometries/_mapping?pretty""", """ { "non_standard_geometries": { "mappings": { "my_mapping": { "properties": { "geometry": { "type": "geo_shape", } } } } } } """) ds = gdal.OpenEx("ES:/vsimem/fakeelasticsearch") lyr = ds.GetLayer(0) gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/non_standard_geometries/my_mapping/_search?scroll=1m&size=100""", """{ "hits": { "hits":[ { "_source": { "geometry": { "type": "envelope", "coordinates": [[2,49],[3,50]] } } }, { "_source": { "geometry": { "type": "circle", "coordinates": [2,49], "radius": 100 } } }, { "_source": { "geometry": { "type": "circle", "coordinates": [2,49], "radius": "100m" } } }, { "_source": { "geometry": { "type": "circle", "coordinates": [2,49], "radius": "0.1km" } } }] } }""") f = lyr.GetNextFeature() if f['geometry'].ExportToWkt() != 'POLYGON ((2 49,3 49,3 50,2 50,2 49))': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() ref_txt = f['geometry'].ExportToWkt() if not ref_txt.startswith('POLYGON (('): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['geometry'].ExportToWkt() != ref_txt: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['geometry'].ExportToWkt() != ref_txt: f.DumpReadable() pytest.fail() ############################################################################### # Test WRITE_MAPPING option def test_ogr_elasticsearch_7(): if ogrtest.elasticsearch_drv is None: pytest.skip() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch/_stats", """{"_shards":{"total":0,"successful":0,"failed":0},"indices":{}}""") ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/test_write_mapping&CUSTOMREQUEST=PUT', '{}') lyr = ds.CreateLayer('test_write_mapping', srs=ogrtest.srs_wgs84, options=[ 'WRITE_MAPPING=/vsimem/map.txt', 'FID=']) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None f = gdal.VSIFOpenL('/vsimem/map.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/map.txt') assert data == '{ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "type": "geo_shape" } } } }' ############################################################################### # Test SRS support def test_ogr_elasticsearch_8(): if ogrtest.elasticsearch_drv is None: pytest.skip() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch/_stats", """{"_shards":{"total":0,"successful":0,"failed":0},"indices":{}}""") ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") # No SRS gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/no_srs&CUSTOMREQUEST=PUT', '{}') # Will emit a warning gdal.ErrorReset() with gdaltest.error_handler(): lyr = ds.CreateLayer('no_srs') assert gdal.GetLastErrorType() == gdal.CE_Warning, 'warning expected' f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (-100 -200)')) gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/no_srs/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "type": "geo_shape" } }, "_meta": { "fid": "ogc_fid" } } }""", '{}') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_bulk&POSTFIELDS={"index" :{"_index":"no_srs", "_type":"FeatureCollection"}} { "ogc_fid": 1, "geometry": { "type": "point", "coordinates": [ -100.0, -200.0 ] }, "type": "Feature", "properties": { } } """, "{}") # Will emit a warning gdal.ErrorReset() with gdaltest.error_handler(): ret = lyr.CreateFeature(f) assert gdal.GetLastErrorType() == gdal.CE_Warning, 'warning expected' assert ret == 0 # Non EPSG-4326 SRS other_srs = osr.SpatialReference() other_srs.ImportFromEPSG(32631) gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/other_srs&CUSTOMREQUEST=PUT', "{}") lyr = ds.CreateLayer('other_srs', srs=other_srs) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (500000 0)')) gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/other_srs/_mapping/FeatureCollection&POSTFIELDS={ "FeatureCollection": { "properties": { "type": { "type": "string" }, "properties": { "properties": { } }, "geometry": { "type": "geo_shape" } }, "_meta": { "fid": "ogc_fid" } } }""", '{}') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_bulk&POSTFIELDS={"index" :{"_index":"other_srs", "_type":"FeatureCollection"}} { "ogc_fid": 1, "geometry": { "type": "point", "coordinates": [ 3.0, 0.0 ] }, "type": "Feature", "properties": { } } """, "{}") ret = lyr.CreateFeature(f) assert ret == 0 ############################################################################### # Test Elasticsearch 5.X def test_ogr_elasticsearch_9(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{"number":"5.0.0"}}""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", 'a_layer \n') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/_mapping?pretty""", """ { "a_layer": { "mappings": { "FeatureCollection": { "properties": { "type": { "type": "text" }, "a_geoshape": { "type": "geo_shape", }, "properties" : { "properties": { "str_field": { "type": "text"} } } } } } } } """) gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "a_geoshape": { "type": "point", "coordinates": [2.5,49.5] }, "str_field": "foo" } } }] } }""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_search/scroll?scroll=1m&scroll_id=my_scrollid""", """{}""") gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/_search/scroll?scroll_id=my_scrollid&CUSTOMREQUEST=DELETE', '{}') ds = ogr.Open('ES:/vsimem/fakeelasticsearch') lyr = ds.GetLayer(0) lyr.SetSpatialFilterRect(2, 49, 3, 50) gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_count?pretty&POSTFIELDS={ "query": { "constant_score" : { "filter": { "geo_shape": { "a_geoshape": { "shape": { "type": "envelope", "coordinates": [ [ 2.0, 50.0 ], [ 3.0, 49.0 ] ] } } } } } } }""", """{ "count" : 2 }""") count = lyr.GetFeatureCount() assert count == 2 gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "geo_shape": { "a_geoshape": { "shape": { "type": "envelope", "coordinates": [ [ 2.0, 50.0 ], [ 3.0, 49.0 ] ] } } } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "a_geoshape": { "type": "point", "coordinates": [2.5,49.5] }, "properties": { "str_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None ############################################################################### # Test SQL def test_ogr_elasticsearch_10(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{"number":"5.0.0"}}""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", 'a_layer \n') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/_mapping?pretty""", """ { "a_layer": { "mappings": { "FeatureCollection": { "properties": { "type": { "type": "text" }, "a_geoshape": { "type": "geo_shape", }, "properties" : { "properties": { "text_field": { "type": "text"}, "text_field_with_raw": { "type": "text", "fields" : { "raw" : { "type": "keyword" } } }, "keyword_field": { "type": "keyword"}, "int_field": { "type": "integer"}, "long_field": { "type": "long"}, "double_field": { "type": "double"}, "dt_field": { "type": "date"}, "date_field": { "type": "date", "format": "yyyy\/MM\/dd"}, "time_field": { "type": "date", "format": "HH:mm:ss.SSS"}, } } } } } } } """) gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{}""") gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/_search/scroll?scroll_id=my_scrollid&CUSTOMREQUEST=DELETE', '{}') ds = ogr.Open('ES:/vsimem/fakeelasticsearch') lyr = ds.GetLayer(0) lyr.SetAttributeFilter( "keyword_field = 'foo' AND keyword_field IS NOT NULL") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool": { "must": [ { "term": { "properties.keyword_field": "foo" } }, { "exists": { "field": "properties.keyword_field" } } ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("text_field = 'foo'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "match": { "properties.text_field": "foo" } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("CAST(text_field AS CHARACTER) = 'foo_cast'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "match": { "properties.text_field": "foo_cast" } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field": "foo_cast" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("text_field_with_raw = 'foo'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "term": { "properties.text_field_with_raw.raw": "foo" } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field_with_raw": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("\"_id\" = 'my_id2'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "ids": { "values": [ "my_id2" ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id2", "_source": { "type": "Feature", "properties": { } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field != 'foo'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool": { "must_not": { "term": { "properties.keyword_field": "foo" } } } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "bar" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field IS NULL") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool": { "must_not": { "exists": { "field": "properties.keyword_field" } } } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field BETWEEN 'bar' AND 'foo'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "range": { "properties.keyword_field": { "gte": "bar", "lte": "foo" } } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "baz" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field IN ('foo', 'bar')") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "terms": { "properties.keyword_field": [ "foo", "bar" ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("text_field IN ('foo', 'bar')") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool": { "should": [ { "match": { "properties.text_field": "foo" } }, { "match": { "properties.text_field": "bar" } } ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("text_field_with_raw IN ('foo', 'bar')") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "terms": { "properties.text_field_with_raw.raw": [ "foo", "bar" ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field_with_raw": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("\"_id\" IN ('my_id', 'bar')") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "ids": { "values": [ "my_id", "bar" ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter( "int_field >= 2 OR long_field >= 9876543210 OR double_field <= 3.123456") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool": { "should": [ { "bool": { "should": [ { "range": { "properties.int_field": { "gte": 2 } } }, { "range": { "properties.long_field": { "gte": 9876543210 } } } ] } }, { "range": { "properties.double_field": { "lte": 3.123456 } } } ] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "double_field": 3, "int_field": 2, "long_field": 9876543210 } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("dt_field > '2016/01/01 12:34:56.123'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "range": { "properties.dt_field": { "gt": "2016\/01\/01 12:34:56.123" } } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "dt_field": '2016/01/01 12:34:56.124' } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("NOT dt_field < '2016/01/01 12:34:56.123'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool": { "must_not": { "range": { "properties.dt_field": { "lt": "2016\/01\/01 12:34:56.123" } } } } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "dt_field": '2016/01/01 12:34:56.123' } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field LIKE '_o%'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "wildcard": { "properties.keyword_field": "?o*" } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None # Evaluated client-side since the pattern uses ? or * lyr.SetAttributeFilter("text_field LIKE '?*'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field": "?*" } } }] } }""") f = lyr.GetNextFeature() assert f is not None # Evaluated client-side since the field is analyzed lyr.SetAttributeFilter("text_field LIKE '_Z%'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field": "fZo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("text_field_with_raw LIKE '_xo%' ESCAPE 'x'") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "wildcard": { "properties.text_field_with_raw.raw": "?o*" } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "text_field_with_raw": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field = 'foo' AND 1 = 1") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "term": { "properties.keyword_field": "foo" } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "foo" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("1 = 1 AND keyword_field = 'foo'") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field = 'bar' OR 1 = 0") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "bar" } } }] } }""") f = lyr.GetNextFeature() assert f is not None lyr.SetAttributeFilter("keyword_field = 'foo2'") lyr.SetSpatialFilterRect(2, 49, 2, 49) gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "bool" : { "must" : [{ "geo_shape": { "a_geoshape": { "shape": { "type": "envelope", "coordinates": [ [ 2.0, 49.0 ], [ 2.0, 49.0 ] ] } } } }, { "term": { "properties.keyword_field": "foo2" } }] } } } } }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "a_geoshape": { "type": "point", "coordinates": [2.0,49.0] }, "properties": { "keyword_field": "foo2" } } }] } }""") f = lyr.GetNextFeature() assert f is not None # SQL with WHERE sql_lyr = ds.ExecuteSQL( "SELECT * FROM a_layer WHERE keyword_field = 'foo'") f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) # SQL with WHERE and ORDER BY sql_lyr = ds.ExecuteSQL( "SELECT * FROM a_layer WHERE keyword_field = 'foo' ORDER BY keyword_field, int_field DESC, \"_id\"") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "query": { "constant_score" : { "filter": { "term": { "properties.keyword_field": "foo" } } } }, "sort" : [ { "properties.keyword_field": { "order": "asc" } }, { "properties.int_field": { "order": "desc" } }, { "_uid": { "order": "asc" } } ] }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "foo" } } }] } }""") f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) # SQL with ORDER BY only sql_lyr = ds.ExecuteSQL("SELECT * FROM a_layer ORDER BY keyword_field") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "sort": [ { "properties.keyword_field": { "order": "asc" } } ] }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "keyword_field": "foo" } } }] } }""") f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) # SQL with ORDER BY on a text field with a raw sub-field sql_lyr = ds.ExecuteSQL( "SELECT * FROM a_layer ORDER BY text_field_with_raw") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100&POSTFIELDS={ "sort": [ { "properties.text_field_with_raw.raw": { "order": "asc" } } ] }""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { } } }] } }""") f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test isnull and unset def test_ogr_elasticsearch_11(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{"number":"5.0.0"}}""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i""", 'a_layer \n') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/_mapping?pretty""", """ { "a_layer": { "mappings": { "FeatureCollection": { "properties": { "type": { "type": "text" }, "properties" : { "properties": { "str_field": { "type": "text"} } } } } } } } """) gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{}""") gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/_search/scroll?scroll_id=my_scrollid&CUSTOMREQUEST=DELETE', '{}') ds = ogr.Open('ES:/vsimem/fakeelasticsearch', update=1) lyr = ds.GetLayer(0) gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_search?scroll=1m&size=100""", """{ "_scroll_id": "my_scrollid", "hits": { "hits":[ { "_id": "my_id", "_source": { "type": "Feature", "properties": { "str_field": "foo" } } }, { "_id": "my_id", "_source": { "type": "Feature", "properties": { "str_field": null } } }, { "_id": "my_id", "_source": { "type": "Feature", "properties": { } } } ] } }""") gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/_search/scroll?scroll=1m&scroll_id=my_scrollid', '{}') f = lyr.GetNextFeature() if f['str_field'] != 'foo': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['str_field'] is not None: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.IsFieldSet('str_field'): f.DumpReadable() pytest.fail() gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/FeatureCollection/_count?pretty""", """{ "hits": { "count": 0 } }""") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_bulk&POSTFIELDS={"index" :{"_index":"a_layer", "_type":"FeatureCollection"}} { "properties": { "str_field": null } } {"index" :{"_index":"a_layer", "_type":"FeatureCollection"}} { "properties": { } } """, '{}') f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldNull('str_field') ret = lyr.CreateFeature(f) assert ret == 0 f = None f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 f = None assert lyr.SyncToDisk() == 0 ############################################################################### # Test Elasticsearch 7.x (ignore MAPPING_NAME) def test_ogr_elasticsearch_12(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch", """{"version":{"number":"7.0.0"}}""") ds = ogrtest.elasticsearch_drv.CreateDataSource( "/vsimem/fakeelasticsearch") assert ds is not None gdal.FileFromMemBuffer( '/vsimem/fakeelasticsearch/foo&CUSTOMREQUEST=PUT', '{}') lyr = ds.CreateLayer('foo', srs=ogrtest.srs_wgs84, options=[ 'WRITE_MAPPING=/vsimem/map.txt', 'FID=']) assert lyr is not None f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None f = gdal.VSIFOpenL('/vsimem/map.txt', 'rb') assert f is not None data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) gdal.Unlink('/vsimem/map.txt') assert data == '{ "properties": { "geometry": { "type": "geo_shape" } } }' ############################################################################### # Test authentication def test_ogr_elasticsearch_authentication(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.FileFromMemBuffer( "/vsimem/fakeelasticsearch&USERPWD=user:pwd", """{"version":{"number":"5.0.0"}}""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i&USERPWD=user:pwd""", 'a_layer \n') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/a_layer/_mapping?pretty&USERPWD=user:pwd""", """ { "a_layer": { "mappings": { "FeatureCollection": { "properties": { "type": { "type": "text" }, "properties" : { "properties": { "str_field": { "type": "text"} } } } } } } } """) ds = gdal.OpenEx('ES:/vsimem/fakeelasticsearch', open_options=['USERPWD=user:pwd']) assert ds is not None ############################################################################### # Test FORWARD_HTTP_HEADERS_FROM_ENV def test_ogr_elasticsearch_http_headers_from_env(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.FileFromMemBuffer("/vsimem/fakeelasticsearch&HEADERS=Bar: value_of_bar\nFoo: value_of_foo\n", """{"version":{"number":"5.0.0"}}""") gdal.FileFromMemBuffer( """/vsimem/fakeelasticsearch/_cat/indices?h=i&HEADERS=Bar: value_of_bar\nFoo: value_of_foo\n""", '') gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/_search?scroll=1m&size=100&POSTFIELDS={ 'FOO' : 'BAR' }&HEADERS=Content-Type: application/json; charset=UTF-8\nBar: value_of_bar\nFoo: value_of_foo\n""", """{ "hits": { "hits":[ { "_index": "some_layer", "_type": "some_type", "_source": { "some_field": 5 }, } ] } }""") gdal.FileFromMemBuffer("""/vsimem/fakeelasticsearch/some_layer/_mapping/some_type?pretty&HEADERS=Bar: value_of_bar\nFoo: value_of_foo\n""", """ { "some_layer": { "mappings": { "some_type": { "properties": { "some_field": { "type": "string"} } } } } } """) with gdaltest.config_options({ 'CPL_CURL_VSIMEM_PRINT_HEADERS': 'YES', 'FOO': 'value_of_foo', 'BAR': 'value_of_bar' }): ds = gdal.OpenEx('ES:/vsimem/fakeelasticsearch', open_options=['FORWARD_HTTP_HEADERS_FROM_ENV=Foo=FOO,Bar=BAR,Baz=I_AM_NOT_SET']) assert ds is not None sql_lyr = ds.ExecuteSQL("{ 'FOO' : 'BAR' }", dialect='ES') f = sql_lyr.GetNextFeature() assert f['some_field'] == '5' ds.ReleaseResultSet(sql_lyr) ############################################################################### # Cleanup def ogr_elasticsearch_delete_files(): for subdir in ['_search', '_cat', 'no_srs', 'non_standard_geometries', 'other_srs', 'a_layer']: lst = gdal.ReadDir('/vsimem/fakeelasticsearch/' + subdir) if lst: for f in lst: gdal.Unlink('/vsimem/fakeelasticsearch/' + subdir + '/' + f) lst = gdal.ReadDir('/vsimem/fakeelasticsearch/' + subdir + '/FeatureCollection') if lst: for f in lst: gdal.Unlink('/vsimem/fakeelasticsearch/' + subdir + '/FeatureCollection/' + f) lst = gdal.ReadDir('/vsimem/fakeelasticsearch') if lst: for f in lst: gdal.Unlink('/vsimem/fakeelasticsearch/' + f) gdal.Unlink('/vsimem/fakeelasticsearch') gdal.Unlink('/vsimem/fakeelasticsearch&USERPWD=user:pwd') def test_ogr_elasticsearch_cleanup(): if ogrtest.elasticsearch_drv is None: pytest.skip() ogr_elasticsearch_delete_files() gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', None) gdalautotest-3.1.2/ogr/ogr_rfc35_mitab.py0000775000175000017500000003417313701060010017000 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_rfc35_mitab.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC35 for MITAB driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # def CheckFileSize(src_filename): import test_py_scripts script_path = test_py_scripts.get_py_script('ogr2ogr') if script_path is None: pytest.skip() test_py_scripts.run_py_script(script_path, 'ogr2ogr', '-f "MapInfo File" tmp/CheckFileSize.tab ' + src_filename) statBufSrc = gdal.VSIStatL(src_filename[0:-3] + "dat", gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) statBufDst = gdal.VSIStatL('tmp/CheckFileSize.dat', gdal.VSI_STAT_EXISTS_FLAG | gdal.VSI_STAT_NATURE_FLAG | gdal.VSI_STAT_SIZE_FLAG) ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/CheckFileSize.tab') assert statBufSrc.size == statBufDst.size ############################################################################### # Initiate the test file def test_ogr_rfc35_mitab_1(): ds = ogr.GetDriverByName('MapInfo File').CreateDataSource('tmp/rfc35_test.tab') lyr = ds.CreateLayer('rfc35_test') lyr.ReorderFields([]) fd = ogr.FieldDefn('foo5', ogr.OFTString) fd.SetWidth(5) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo0') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('bar10', ogr.OFTString) fd.SetWidth(10) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo1') feat.SetField(1, 'bar1') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('baz15', ogr.OFTString) fd.SetWidth(15) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo2') feat.SetField(1, 'bar2_01234') feat.SetField(2, 'baz2_0123456789') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('baw20', ogr.OFTString) fd.SetWidth(20) lyr.CreateField(fd) ############################################################################### # Test ReorderField() def Truncate(val, lyr_defn, fieldname): if val is None: return val return val[0:lyr_defn.GetFieldDefn(lyr_defn.GetFieldIndex(fieldname)).GetWidth()] def CheckFeatures(lyr, field1='foo5', field2='bar10', field3='baz15', field4='baw20'): expected_values = [ ['foo0', '', '', ''], ['foo1', 'bar1', '', ''], ['foo2', 'bar2_01234', 'baz2_0123456789', ''], ['foo3', 'bar3_01234', 'baz3_0123456789', 'baw3_012345678901234'] ] lyr_defn = lyr.GetLayerDefn() lyr.ResetReading() feat = lyr.GetNextFeature() i = 0 while feat is not None: if (field1 is not None and feat.GetField(field1) != Truncate(expected_values[i][0], lyr_defn, field1)) or \ (field2 is not None and feat.GetField(field2) != Truncate(expected_values[i][1], lyr_defn, field2)) or \ (field3 is not None and feat.GetField(field3) != Truncate(expected_values[i][2], lyr_defn, field3)) or \ (field4 is not None and feat.GetField(field4) != Truncate(expected_values[i][3], lyr_defn, field4)): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() i = i + 1 def CheckColumnOrder(lyr, expected_order): lyr_defn = lyr.GetLayerDefn() for i, exp_order in enumerate(expected_order): assert lyr_defn.GetFieldDefn(i).GetName() == exp_order def Check(lyr, expected_order): CheckColumnOrder(lyr, expected_order) CheckFeatures(lyr) ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr_reopen = ds.GetLayer(0) CheckColumnOrder(lyr_reopen, expected_order) CheckFeatures(lyr_reopen) def test_ogr_rfc35_mitab_2(): ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCReorderFields) == 1 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo3') feat.SetField(1, 'bar3_01234') feat.SetField(2, 'baz3_0123456789') feat.SetField(3, 'baw3_012345678901234') lyr.CreateFeature(feat) feat = None assert lyr.ReorderField(1, 3) == 0 # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['foo5', 'baz15', 'baw20', 'bar10']) lyr.ReorderField(3, 1) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderField(0, 2) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['bar10', 'baz15', 'foo5', 'baw20']) lyr.ReorderField(2, 0) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderField(0, 1) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['bar10', 'foo5', 'baz15', 'baw20']) lyr.ReorderField(1, 0) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderFields([3, 2, 1, 0]) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['baw20', 'baz15', 'bar10', 'foo5']) lyr.ReorderFields([3, 2, 1, 0]) # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) # lyr = ds.GetLayer(0) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.ReorderFields([0, 0, 0, 0]) gdal.PopErrorHandler() assert ret != 0 # ds = None # ds = ogr.Open('tmp/rfc35_test.tab', update = 1) lyr = ds.GetLayer(0) CheckColumnOrder(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) CheckFeatures(lyr) ############################################################################### # Test AlterFieldDefn() for change of name and width def test_ogr_rfc35_mitab_3(): ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) fd = ogr.FieldDefn("baz25", ogr.OFTString) fd.SetWidth(25) lyr_defn = lyr.GetLayerDefn() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(-1, fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(lyr_defn.GetFieldCount(), fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("baz15"), fd, ogr.ALTER_ALL_FLAG) CheckFeatures(lyr, field3='baz25') fd = ogr.FieldDefn("baz5", ogr.OFTString) fd.SetWidth(5) lyr_defn = lyr.GetLayerDefn() lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("baz25"), fd, ogr.ALTER_ALL_FLAG) CheckFeatures(lyr, field3='baz5') ds = None ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() fld_defn = lyr_defn.GetFieldDefn(lyr_defn.GetFieldIndex('baz5')) assert fld_defn.GetWidth() == 5 CheckFeatures(lyr, field3='baz5') ############################################################################### # Test AlterFieldDefn() for change of type def test_ogr_rfc35_mitab_4(): ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr.TestCapability(ogr.OLCAlterFieldDefn) == 1 fd = ogr.FieldDefn("intfield", ogr.OFTInteger) lyr.CreateField(fd) lyr.ReorderField(lyr_defn.GetFieldIndex("intfield"), 0) lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField("intfield", 12345) lyr.SetFeature(feat) feat = None fd.SetWidth(10) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') if False: # pylint: disable=using-constant-test fd.SetWidth(5) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') ds = None if False: # pylint: disable=using-constant-test ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() fd.SetWidth(4) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 1234 feat = None CheckFeatures(lyr, field3='baz5') ds = None # Check that the file size has decreased after column shrinking CheckFileSize('tmp/rfc35_test.tab') ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() fd = ogr.FieldDefn("oldintfld", ogr.OFTString) fd.SetWidth(15) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("oldintfld") == '12345' feat = None CheckFeatures(lyr, field3='baz5') ds = None ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("oldintfld") == '12345' feat = None CheckFeatures(lyr, field3='baz5') lyr.DeleteField(lyr_defn.GetFieldIndex("oldintfld")) fd = ogr.FieldDefn("intfield", ogr.OFTInteger) fd.SetWidth(10) assert lyr.CreateField(fd) == 0 assert lyr.ReorderField(lyr_defn.GetFieldIndex("intfield"), 0) == 0 lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField("intfield", 98765) assert lyr.SetFeature(feat) == 0 feat = None fd = ogr.FieldDefn("oldintfld", ogr.OFTString) fd.SetWidth(6) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("oldintfld") == '98765' feat = None CheckFeatures(lyr, field3='baz5') ds = None ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("oldintfld") == '98765' feat = None CheckFeatures(lyr, field3='baz5') ############################################################################### # Test DeleteField() def test_ogr_rfc35_mitab_5(): ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr.TestCapability(ogr.OLCDeleteField) == 1 assert lyr.DeleteField(0) == 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(-1) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(lyr.GetLayerDefn().GetFieldCount()) gdal.PopErrorHandler() assert ret != 0 CheckFeatures(lyr, field3='baz5') assert lyr.DeleteField(lyr_defn.GetFieldIndex('baw20')) == 0 ds = None # Check that the file size has decreased after column removing CheckFileSize('tmp/rfc35_test.tab') if ret == 'fail': gdaltest.post_reason(ret) return ret ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() CheckFeatures(lyr, field3='baz5', field4=None) assert lyr.DeleteField(lyr_defn.GetFieldIndex('baz5')) == 0 CheckFeatures(lyr, field3=None, field4=None) assert lyr.DeleteField(lyr_defn.GetFieldIndex('foo5')) == 0 # We cannot delete the only one remaining field (well MapInfo prohibits that) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(lyr_defn.GetFieldIndex('bar10')) gdal.PopErrorHandler() assert ret != 0 CheckFeatures(lyr, field1=None, field2=None, field3=None, field4=None) ds = None ds = ogr.Open('tmp/rfc35_test.tab', update=1) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() CheckFeatures(lyr, field1=None, field2=None, field3=None, field4=None) ############################################################################### # Initiate the test file def test_ogr_rfc35_mitab_cleanup(): ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/rfc35_test.tab') gdalautotest-3.1.2/ogr/ogr_join_test.py0000775000175000017500000003552113701060010016676 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_join_test.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR JOIN support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2008-2013, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest from osgeo import gdal from osgeo import ogr import ogrtest import pytest ############################################################################### # Test a join. def test_ogr_join_1(): gdaltest.ds = ogr.Open('data') sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly LEFT JOIN idlink ON poly.eas_id = idlink.eas_id') count = sql_lyr.GetFeatureCount() assert count == 10, \ ('Got wrong count with GetFeatureCount() - %d, expecting 10' % count) gdaltest.ds.ReleaseResultSet(sql_lyr) ############################################################################### # Check the values we are actually getting back (restricting the search a bit) def test_ogr_join_2(): expect = ['_166_', '_158_', '_165_'] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly ' 'LEFT JOIN idlink ON poly.eas_id = idlink.eas_id ' 'WHERE eas_id < 168') tr = ogrtest.check_features_against_list(sql_lyr, 'NAME', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Try various naming conversions for the selected fields. def test_ogr_join_3(): expect = ['_166_', '_158_', '_165_'] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT poly.area, idlink.* FROM poly ' 'LEFT JOIN idlink ON poly.eas_id = idlink.eas_id ' 'WHERE eas_id < 168') tr = ogrtest.check_features_against_list(sql_lyr, 'idlink.NAME', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Verify that records for which a join can't be found work ok. def test_ogr_join_4(): expect = ['_179_', '_171_', None, None] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT poly.*, name FROM poly ' + 'LEFT JOIN idlink ON poly.eas_id = idlink.eas_id ' + 'WHERE eas_id > 170') tr = ogrtest.check_features_against_list(sql_lyr, 'NAME', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Verify that table aliases work def test_ogr_join_5(): expect = [179, 171, 173, 172] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT p.*, il.name FROM poly p ' + 'LEFT JOIN idlink il ON p.eas_id = il.eas_id ' + 'WHERE eas_id > 170') tr = ogrtest.check_features_against_list(sql_lyr, 'p.eas_id', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Again, ordering by a primary field. def test_ogr_join_6(): expect = [171, 172, 173, 179] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT p.*, il.name FROM poly p ' + 'LEFT JOIN idlink il ON p.eas_id = il.eas_id ' + 'WHERE eas_id > 170 ORDER BY p.eas_id') tr = ogrtest.check_features_against_list(sql_lyr, 'p.eas_id', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test joining to an external datasource. def test_ogr_join_7(): expect = [171, 172, 173, 179] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT p.*, il.name FROM poly p ' + 'LEFT JOIN "data/idlink.dbf".idlink il ON p.eas_id = il.eas_id ' + 'WHERE eas_id > 170 ORDER BY p.eas_id') tr = ogrtest.check_features_against_list(sql_lyr, 'p.eas_id', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test doing two joins at once. def test_ogr_join_8(): expect = [171, None, None, 179] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT p.*, il.name, il2.eas_id FROM poly p ' + 'LEFT JOIN "data/idlink.dbf".idlink il ON p.eas_id = il.eas_id ' + 'LEFT JOIN idlink il2 ON p.eas_id = il2.eas_id ' + 'WHERE eas_id > 170 ORDER BY p.eas_id') tr = ogrtest.check_features_against_list(sql_lyr, 'il2.eas_id', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Verify fix for #2788 (memory corruption on wildcard expansion in SQL request # with join clauses) def test_ogr_join_9(): expect = [179, 171, 173, 172] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT poly.* FROM poly ' + 'LEFT JOIN idlink ON poly.eas_id = idlink.eas_id ' + 'WHERE eas_id > 170') tr = ogrtest.check_features_against_list(sql_lyr, 'poly.EAS_ID', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### def test_ogr_join_10(): expect = [None, None, None, None, None, None, None, None, None, None] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly ' + 'LEFT JOIN idlink2 ON poly.eas_id = idlink2.name ') tr = ogrtest.check_features_against_list(sql_lyr, 'F3', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test join on string field def test_ogr_join_11(): expect = ['_168_', '_179_', '_171_', '_170_', '_165_', '_158_', '_166_'] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT il.*, il2.* FROM idlink il LEFT JOIN idlink2 il2 ON il.NAME = il2.NAME') tr = ogrtest.check_features_against_list(sql_lyr, 'il2.NAME', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test fix for #4112 (join between 2 datasources) def test_ogr_join_12(): ds = ogr.Open('data/poly.shp') sql_lyr = ds.ExecuteSQL( "SELECT * FROM poly LEFT JOIN 'data/idlink.dbf'.idlink ON poly.eas_id = idlink.eas_id") count = sql_lyr.GetFeatureCount() assert count == 10, \ ('Got wrong count with GetFeatureCount() - %d, expecting 10' % count) ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test joining a float column with a string column (#4321) def test_ogr_join_13(): expect = ['_168_', '_179_', '_171_', None, None, None, '_166_', '_158_', '_165_', '_170_'] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly ' + 'LEFT JOIN idlink2 ON poly.eas_id = idlink2.eas_id') tr = ogrtest.check_features_against_list(sql_lyr, 'name', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test joining a string column with a float column (#4321, actually addressed by #4259) def test_ogr_join_14(): expect = [168, 179, 171, 170, 165, 158, 166] sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM idlink2 ' + 'LEFT JOIN poly ON idlink2.eas_id = poly.eas_id') tr = ogrtest.check_features_against_list(sql_lyr, 'poly.EAS_ID', expect) gdaltest.ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test multiple joins with expressions (#4521) def test_ogr_join_15(): ds = ogr.GetDriverByName('CSV').CreateDataSource('/vsimem/ogr_join_14') lyr = ds.CreateLayer('first') ogrtest.quick_create_layer_def(lyr, [['id']]) ogrtest.quick_create_feature(lyr, ['key'], None) lyr = ds.CreateLayer('second') ogrtest.quick_create_layer_def(lyr, [['col1_2'], ['id'], ['col3_2']]) ogrtest.quick_create_feature(lyr, ['a2', 'key', 'c2'], None) lyr = ds.CreateLayer('third') ogrtest.quick_create_layer_def(lyr, [['col1_3'], ['id'], ['col3_3']]) ogrtest.quick_create_feature(lyr, ['a3', 'key', 'c3'], None) sql_lyr = ds.ExecuteSQL("SELECT concat(col3_2, ''), col3_2 FROM first JOIN second ON first.id = second.id JOIN third ON first.id = third.id") feat = sql_lyr.GetNextFeature() val1 = feat.GetFieldAsString(0) val2 = feat.GetFieldAsString(1) ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/ogr_join_14/first.csv') gdal.Unlink('/vsimem/ogr_join_14/second.csv') gdal.Unlink('/vsimem/ogr_join_14/third.csv') gdal.Unlink('/vsimem/ogr_join_14') assert val1 == 'c2' assert val2 == 'c2' ############################################################################### # Test non-support of a secondarytable.fieldname in a where clause def test_ogr_join_16(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly ' + 'LEFT JOIN idlink ON poly.eas_id = idlink.eas_id ' + 'WHERE idlink.name = \'_165\'') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Cannot use field') == 0 if sql_lyr is None: return pytest.fail() ############################################################################### # Test non-support of a secondarytable.fieldname in a order by clause def test_ogr_join_17(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly ' + 'LEFT JOIN idlink ON poly.eas_id = idlink.eas_id ' + 'ORDER BY name') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Cannot use field') == 0 if sql_lyr is None: return pytest.fail() ############################################################################### # Test inverted order of fields in ON def test_ogr_join_18(): sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly LEFT JOIN idlink ON idlink.eas_id = poly.eas_id') count = sql_lyr.GetFeatureCount() assert count == 10, \ ('Got wrong count with GetFeatureCount() - %d, expecting 10' % count) gdaltest.ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test unrecognized primary field def test_ogr_join_19(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly LEFT JOIN idlink ON poly.foo = idlink.eas_id') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('"poly"."foo" not recognised as an available field') == 0 if sql_lyr is None: return pytest.fail() ############################################################################### # Test unrecognized secondary field def test_ogr_join_20(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT * FROM poly LEFT JOIN idlink ON poly.eas_id = idlink.foo') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('"idlink"."foo" not recognised as an available field') == 0 if sql_lyr is None: return pytest.fail() ############################################################################### # Test unexpected secondary table def test_ogr_join_21(): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = gdaltest.ds.ExecuteSQL( 'SELECT p.*, il.name, il2.eas_id FROM poly p ' + 'LEFT JOIN "data/idlink.dbf".idlink il ON p.eas_id = il2.eas_id ' + 'LEFT JOIN idlink il2 ON p.eas_id = il2.eas_id') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Field il2.eas_id in JOIN clause does not correspond to the primary table nor the joint (secondary) table') == 0 if sql_lyr is None: return pytest.fail() ############################################################################### # Test join with a complex expression as ON def test_ogr_join_22(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('first') ogrtest.quick_create_layer_def(lyr, [['id.1'], ['id2']]) ogrtest.quick_create_feature(lyr, ['key1', 'key2'], None) lyr = ds.CreateLayer('second') ogrtest.quick_create_layer_def(lyr, [['id.1'], ['id2'], ['val']]) ogrtest.quick_create_feature(lyr, ['key1', 'keyX', '1'], None) ogrtest.quick_create_feature(lyr, ['key1', 'key2', '2'], None) ogrtest.quick_create_feature(lyr, ['key1', 'keyY', '3'], None) sql_lyr = ds.ExecuteSQL("SELECT val FROM first JOIN second ON first.\"id.1\" = second.\"id.1\" AND first.id2 = second.id2") feat = sql_lyr.GetNextFeature() val = feat.GetFieldAsString(0) ds.ReleaseResultSet(sql_lyr) ds = None assert val == '2' ############################################################################### # Test join with NULL keys def test_ogr_join_23(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('first') ogrtest.quick_create_layer_def(lyr, [['f']]) ogrtest.quick_create_feature(lyr, [None], None) ogrtest.quick_create_feature(lyr, ['key1'], None) lyr = ds.CreateLayer('second') ogrtest.quick_create_layer_def(lyr, [['f']]) ogrtest.quick_create_feature(lyr, ['key1'], None) ogrtest.quick_create_feature(lyr, [None], None) sql_lyr = ds.ExecuteSQL("SELECT * FROM first JOIN second ON first.f = second.f") feat = sql_lyr.GetNextFeature() if feat.IsFieldSetAndNotNull('second.f'): feat.DumpReadable() pytest.fail() feat = sql_lyr.GetNextFeature() if feat['f'] != 'key1' or feat['second.f'] != 'key1': feat.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### def test_ogr_join_cleanup(): gdaltest.lyr = None gdaltest.ds = None gdalautotest-3.1.2/ogr/ogr_style.py0000775000175000017500000000761213701060010016040 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_style.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Style testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr from osgeo import gdal ############################################################################### # # def test_ogr_style_styletable(): style_table = ogr.StyleTable() style_table.AddStyle("style1_normal", 'SYMBOL(id:"http://style1_normal",c:#67452301)') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = style_table.SaveStyleTable('/nonexistingdir/nonexistingfile') gdal.PopErrorHandler() assert ret == 0 assert style_table.SaveStyleTable("/vsimem/out.txt") == 1 style_table = None style_table = ogr.StyleTable() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = style_table.LoadStyleTable('/nonexistent') gdal.PopErrorHandler() assert ret == 0 assert style_table.LoadStyleTable('/vsimem/out.txt') == 1 gdal.Unlink('/vsimem/out.txt') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = style_table.Find("non_existing_style") gdal.PopErrorHandler() assert ret is None assert style_table.Find("style1_normal") == 'SYMBOL(id:"http://style1_normal",c:#67452301)' style = style_table.GetNextStyle() assert style == 'SYMBOL(id:"http://style1_normal",c:#67452301)' style_name = style_table.GetLastStyleName() assert style_name == 'style1_normal' style = style_table.GetNextStyle() assert style is None style_table.ResetStyleStringReading() style = style_table.GetNextStyle() assert style is not None # GetStyleTable()/SetStyleTable() on data source ds = ogr.GetDriverByName('Memory').CreateDataSource('') assert ds.GetStyleTable() is None ds.SetStyleTable(None) assert ds.GetStyleTable() is None ds.SetStyleTable(style_table) style_table2 = ds.GetStyleTable() style = style_table2.GetNextStyle() assert style == 'SYMBOL(id:"http://style1_normal",c:#67452301)' # GetStyleTable()/SetStyleTable() on layer lyr = ds.CreateLayer('foo') assert lyr.GetStyleTable() is None lyr.SetStyleTable(None) assert lyr.GetStyleTable() is None lyr.SetStyleTable(style_table) style_table2 = lyr.GetStyleTable() style = style_table2.GetNextStyle() assert style == 'SYMBOL(id:"http://style1_normal",c:#67452301)' ds = None ############################################################################### # Build tests runner gdalautotest-3.1.2/ogr/ogr_fgdb_stress_test.py0000775000175000017500000001714413701060010020245 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_fgdb_stress_test.py 508bb9112f816ef21b6feadafd39ca4aef80248f 2018-12-31 15:22:26 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: FGDB driver stress testing of CreateFeature() with user set FID # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import random import shutil import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test if driver is available @pytest.mark.require_run_on_demand def test_ogr_fgdb_stress_init(): ogrtest.fgdb_drv = None ogrtest.openfilegdb_drv = None ogrtest.fgdb_drv = ogr.GetDriverByName('FileGDB') ogrtest.reference_drv = ogr.GetDriverByName('GPKG') ogrtest.reference_ext = 'gpkg' ogrtest.openfilegdb_drv = ogr.GetDriverByName('OpenFileGDB') if ogrtest.fgdb_drv is None: pytest.skip() if ogrtest.reference_drv is None: pytest.skip() if ogrtest.openfilegdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass gdal.Unlink("tmp/test." + ogrtest.reference_ext) ############################################################################### # Generate databases from random operations @pytest.mark.require_run_on_demand def test_ogr_fgdb_stress_1(): if ogrtest.fgdb_drv is None: pytest.skip() verbose = False ds_test = ogrtest.fgdb_drv.CreateDataSource('tmp/test.gdb') ds_ref = ogrtest.reference_drv.CreateDataSource('tmp/test.' + ogrtest.reference_ext) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) lyr_test = ds_test.CreateLayer("test", geom_type=ogr.wkbPoint, srs=sr) lyr_ref = ds_ref.CreateLayer("test", geom_type=ogr.wkbPoint, srs=sr) for lyr in [lyr_test, lyr_ref]: lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) ds_test.ExecuteSQL("CREATE INDEX idx_test_str ON test(str)") ds_ref.ExecuteSQL("CREATE INDEX idx_test_str ON test(str)") random.seed(0) in_transaction = False nfeatures_created = 0 for _ in range(100000): function = random.randrange(0, 500) if function == 0: if not in_transaction: if verbose: print('StartTransaction') ds_test.StartTransaction(force=1) else: if verbose: print('CommitTransaction') ds_test.CommitTransaction() in_transaction = not in_transaction elif function < 500 / 3: ret = [] fid = -1 if random.randrange(0, 2) == 0: fid = 1 + random.randrange(0, 1000) wkt = 'POINT (%d %d)' % (random.randrange(0, 100), random.randrange(0, 100)) if verbose: print('Create(%d)' % fid) for lyr in [lyr_test, lyr_ref]: f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(fid) f.SetField(0, '%d' % random.randrange(0, 1000)) f.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) gdal.PushErrorHandler() ret.append(lyr.CreateFeature(f)) gdal.PopErrorHandler() # So to ensure lyr_ref will use the same FID as the tested layer fid = f.GetFID() # print("created %d" % fid) assert ret[0] == ret[1] if ret[0] == 0: nfeatures_created += 1 # For some odd reason, the .spx file is no longer updated when doing # a SetFeature() before having creating at least 2 features ! elif function < 500 * 2 / 3 and nfeatures_created >= 2: ret = [] fid = 1 + random.randrange(0, 1000) if verbose: print('Update(%d)' % fid) wkt = 'POINT (%d %d)' % (random.randrange(0, 100), random.randrange(0, 100)) for lyr in [lyr_test, lyr_ref]: f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(fid) f.SetField(0, '%d' % random.randrange(0, 1000)) f.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) # gdal.PushErrorHandler() ret.append(lyr.SetFeature(f)) # gdal.PopErrorHandler() assert ret[0] == ret[1] # Same for DeleteFeature() elif nfeatures_created >= 2: ret = [] fid = 1 + random.randrange(0, 1000) if verbose: print('Delete(%d)' % fid) for lyr in [lyr_test, lyr_ref]: # gdal.PushErrorHandler() ret.append(lyr.DeleteFeature(fid)) # gdal.PopErrorHandler() assert ret[0] == ret[1] if in_transaction: ds_test.CommitTransaction() ############################################################################### # Compare databases @pytest.mark.require_run_on_demand def test_ogr_fgdb_stress_2(): if ogrtest.fgdb_drv is None: pytest.skip() ds_test = ogr.Open('tmp/test.gdb') ds_ref = ogr.Open('tmp/test.' + ogrtest.reference_ext) lyr_test = ds_test.GetLayer(0) lyr_ref = ds_ref.GetLayer(0) while True: f_test = lyr_test.GetNextFeature() f_ref = lyr_ref.GetNextFeature() assert not (f_test is None and f_ref is not None) or (f_test is not None and f_ref is None) if f_test is None: break if f_test.GetFID() != f_ref.GetFID() or \ f_test['str'] != f_ref['str'] or \ ogrtest.check_feature_geometry(f_test, f_ref.GetGeometryRef()) != 0: f_test.DumpReadable() f_ref.DumpReadable() pytest.fail() for val in range(1000): lyr_test.SetAttributeFilter("str = '%d'" % val) lyr_ref.SetAttributeFilter("str = '%d'" % val) assert lyr_test.GetFeatureCount() == lyr_ref.GetFeatureCount(), val # sys.exit(0) ############################################################################### # Cleanup @pytest.mark.require_run_on_demand def test_ogr_fgdb_stress_cleanup(): if ogrtest.fgdb_drv is None: pytest.skip() try: shutil.rmtree("tmp/test.gdb") except OSError: pass gdal.Unlink("tmp/test." + ogrtest.reference_ext) gdalautotest-3.1.2/ogr/ogr_shape_sbn.py0000775000175000017500000001172013701060011016636 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_shape_sbn.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test ESRI shapefile spatial index mechanism (.sbn files). This can serve # as a test for the functionality of shapelib's sbnsearch.c # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import ogr import pytest ############################################################################### # def search_all_features(lyr): geoms = [] lyr.SetSpatialFilter(None) extents = lyr.GetExtent() fc_ref = lyr.GetFeatureCount() feat = lyr.GetNextFeature() while feat is not None: geom = feat.GetGeometryRef() geoms.append(geom.Clone()) feat = lyr.GetNextFeature() # Test getting each geom 1 by 1 for geom in geoms: bbox = geom.GetEnvelope() lyr.SetSpatialFilterRect(bbox[0], bbox[2], bbox[1], bbox[3]) lyr.ResetReading() found_geom = False feat = lyr.GetNextFeature() while feat is not None and found_geom is False: got_geom = feat.GetGeometryRef() if got_geom.Equals(geom) == 1: found_geom = True else: feat = lyr.GetNextFeature() assert found_geom, ('did not find geometry for %s' % (geom.ExportToWkt())) # Get all geoms in a single gulp. We do not use exactly the extent bounds, because # there is an optimization in the shapefile driver to skip the spatial index in that # case. eps = 0.0001 lyr.SetSpatialFilterRect(extents[0] + eps, extents[2] + eps, extents[1] - eps, extents[3] - eps) lyr.ResetReading() fc = lyr.GetFeatureCount() # For point layers, we need a special case since there may be points on the border # of the extent if lyr.GetGeomType() == ogr.wkbPoint: lyr.SetSpatialFilterRect(extents[0], extents[2] + eps, extents[0] + eps, extents[3] - eps) lyr.ResetReading() fc = fc + lyr.GetFeatureCount() lyr.SetSpatialFilterRect(extents[1] - eps, extents[2] + eps, extents[1], extents[3] - eps) lyr.ResetReading() fc = fc + lyr.GetFeatureCount() lyr.SetSpatialFilterRect(extents[0], extents[2], extents[1], extents[2] + eps) lyr.ResetReading() fc = fc + lyr.GetFeatureCount() lyr.SetSpatialFilterRect(extents[0], extents[3] - eps, extents[1], extents[3]) lyr.ResetReading() fc = fc + lyr.GetFeatureCount() assert fc == fc_ref, ('layer %s: expected %d. got %d' % (lyr.GetName(), fc_ref, fc)) ############################################################################### # Test def test_ogr_shape_sbn_1(): if not gdaltest.download_file('http://pubs.usgs.gov/sim/3194/contents/Cochiti_shapefiles.zip', 'Cochiti_shapefiles.zip'): pytest.skip() try: os.stat('tmp/cache/CochitiDamShapeFiles/CochitiBoundary.shp') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/Cochiti_shapefiles.zip') try: os.stat('tmp/cache/CochitiDamShapeFiles/CochitiBoundary.shp') except OSError: pytest.skip() except OSError: pytest.skip() ds = ogr.Open('tmp/cache/CochitiDamShapeFiles') for i in range(ds.GetLayerCount()): lyr = ds.GetLayer(i) search_all_features(lyr) ############################################################################### # Test def test_ogr_shape_sbn_2(): ds = ogr.Open('data/CoHI_GCS12.shp') lyr = ds.GetLayer(0) return search_all_features(lyr) gdalautotest-3.1.2/ogr/ogr_rfc35_sqlite.py0000775000175000017500000002676413701060011017215 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_rfc35_sqlite.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC35 for SQLite driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Initiate the test file def test_ogr_rfc35_sqlite_1(): gdaltest.rfc35_sqlite_ds = None gdaltest.rfc35_sqlite_ds_name = None sqlite_dr = ogr.GetDriverByName('SQLite') if sqlite_dr is None: pytest.skip() gdal.Unlink('tmp/rfc35_test.sqlite') # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') gdaltest.rfc35_sqlite_ds_name = '/vsimem/rfc35_test.sqlite' gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.rfc35_sqlite_ds = ogr.GetDriverByName('SQLite').CreateDataSource(gdaltest.rfc35_sqlite_ds_name) gdal.PopErrorHandler() if gdaltest.rfc35_sqlite_ds is None: gdaltest.rfc35_sqlite_ds_name = 'tmp/rfc35_test.sqlite' gdaltest.rfc35_sqlite_ds = ogr.GetDriverByName('SQLite').CreateDataSource(gdaltest.rfc35_sqlite_ds_name) lyr = gdaltest.rfc35_sqlite_ds.CreateLayer('rfc35_test') lyr.ReorderFields([]) fd = ogr.FieldDefn('foo5', ogr.OFTString) fd.SetWidth(5) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo0') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('bar10', ogr.OFTString) fd.SetWidth(10) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo1') feat.SetField(1, 'bar1') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('baz15', ogr.OFTString) fd.SetWidth(15) lyr.CreateField(fd) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo2') feat.SetField(1, 'bar2_01234') feat.SetField(2, 'baz2_0123456789') lyr.CreateFeature(feat) feat = None fd = ogr.FieldDefn('baw20', ogr.OFTString) fd.SetWidth(20) lyr.CreateField(fd) ############################################################################### # Test ReorderField() def Truncate(val, lyr_defn, fieldname): # pylint: disable=unused-argument # Mem driver doesn't actually truncate return val def CheckFeatures(lyr, field1='foo5', field2='bar10', field3='baz15', field4='baw20'): expected_values = [ ['foo0', None, None, None], ['foo1', 'bar1', None, None], ['foo2', 'bar2_01234', 'baz2_0123456789', None], ['foo3', 'bar3_01234', 'baz3_0123456789', 'baw3_012345678901234'] ] lyr_defn = lyr.GetLayerDefn() lyr.ResetReading() feat = lyr.GetNextFeature() i = 0 while feat is not None: if (field1 is not None and feat.GetField(field1) != Truncate(expected_values[i][0], lyr_defn, field1)) or \ (field2 is not None and feat.GetField(field2) != Truncate(expected_values[i][1], lyr_defn, field2)) or \ (field3 is not None and feat.GetField(field3) != Truncate(expected_values[i][2], lyr_defn, field3)) or \ (field4 is not None and feat.GetField(field4) != Truncate(expected_values[i][3], lyr_defn, field4)): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() i = i + 1 def CheckColumnOrder(lyr, expected_order): lyr_defn = lyr.GetLayerDefn() for i, exp_order in enumerate(expected_order): assert lyr_defn.GetFieldDefn(i).GetName() == exp_order def Check(lyr, expected_order): CheckColumnOrder(lyr, expected_order) CheckFeatures(lyr) def test_ogr_rfc35_sqlite_2(): if gdaltest.rfc35_sqlite_ds is None: pytest.skip() lyr = gdaltest.rfc35_sqlite_ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCReorderFields) == 1 feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo3') feat.SetField(1, 'bar3_01234') feat.SetField(2, 'baz3_0123456789') feat.SetField(3, 'baw3_012345678901234') lyr.CreateFeature(feat) feat = None assert lyr.ReorderField(1, 3) == 0 Check(lyr, ['foo5', 'baz15', 'baw20', 'bar10']) lyr.ReorderField(3, 1) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderField(0, 2) Check(lyr, ['bar10', 'baz15', 'foo5', 'baw20']) lyr.ReorderField(2, 0) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderField(0, 1) Check(lyr, ['bar10', 'foo5', 'baz15', 'baw20']) lyr.ReorderField(1, 0) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) lyr.ReorderFields([3, 2, 1, 0]) Check(lyr, ['baw20', 'baz15', 'bar10', 'foo5']) lyr.ReorderFields([3, 2, 1, 0]) Check(lyr, ['foo5', 'bar10', 'baz15', 'baw20']) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.ReorderFields([0, 0, 0, 0]) gdal.PopErrorHandler() assert ret != 0 ############################################################################### # Test AlterFieldDefn() for change of name and width def test_ogr_rfc35_sqlite_3(): if gdaltest.rfc35_sqlite_ds is None: pytest.skip() lyr = gdaltest.rfc35_sqlite_ds.GetLayer(0) fd = ogr.FieldDefn("baz25", ogr.OFTString) fd.SetWidth(25) lyr_defn = lyr.GetLayerDefn() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(-1, fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(lyr_defn.GetFieldCount(), fd, ogr.ALTER_ALL_FLAG) gdal.PopErrorHandler() assert ret != 0 lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("baz15"), fd, ogr.ALTER_ALL_FLAG) CheckFeatures(lyr, field3='baz25') fd = ogr.FieldDefn("baz5", ogr.OFTString) fd.SetWidth(5) lyr_defn = lyr.GetLayerDefn() lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("baz25"), fd, ogr.ALTER_ALL_FLAG) CheckFeatures(lyr, field3='baz5') lyr_defn = lyr.GetLayerDefn() fld_defn = lyr_defn.GetFieldDefn(lyr_defn.GetFieldIndex('baz5')) assert fld_defn.GetWidth() == 5 CheckFeatures(lyr, field3='baz5') ############################################################################### # Test AlterFieldDefn() for change of type def test_ogr_rfc35_sqlite_4(): if gdaltest.rfc35_sqlite_ds is None: pytest.skip() lyr = gdaltest.rfc35_sqlite_ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr.TestCapability(ogr.OLCAlterFieldDefn) == 1 fd = ogr.FieldDefn("intfield", ogr.OFTInteger) lyr.CreateField(fd) lyr.ReorderField(lyr_defn.GetFieldIndex("intfield"), 0) lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField("intfield", 12345) lyr.SetFeature(feat) feat = None fd.SetWidth(10) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') fd.SetWidth(5) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') fd.SetWidth(4) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() # if feat.GetField("intfield") != 1234: assert feat.GetField("intfield") == 12345 feat = None CheckFeatures(lyr, field3='baz5') fd = ogr.FieldDefn("oldintfld", ogr.OFTString) fd.SetWidth(15) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() # if feat.GetField("oldintfld") != '1234': assert feat.GetField("oldintfld") == '12345' feat = None CheckFeatures(lyr, field3='baz5') lyr.DeleteField(lyr_defn.GetFieldIndex("oldintfld")) fd = ogr.FieldDefn("intfield", ogr.OFTInteger) fd.SetWidth(10) assert lyr.CreateField(fd) == 0 assert lyr.ReorderField(lyr_defn.GetFieldIndex("intfield"), 0) == 0 lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField("intfield", 98765) assert lyr.SetFeature(feat) == 0 feat = None fd = ogr.FieldDefn("oldintfld", ogr.OFTString) fd.SetWidth(6) lyr.AlterFieldDefn(lyr_defn.GetFieldIndex("intfield"), fd, ogr.ALTER_ALL_FLAG) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField("oldintfld") == '98765' feat = None CheckFeatures(lyr, field3='baz5') ############################################################################### # Test DeleteField() def test_ogr_rfc35_sqlite_5(): if gdaltest.rfc35_sqlite_ds is None: pytest.skip() lyr = gdaltest.rfc35_sqlite_ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr.TestCapability(ogr.OLCDeleteField) == 1 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(-1) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(lyr.GetLayerDefn().GetFieldCount()) gdal.PopErrorHandler() assert ret != 0 assert lyr.DeleteField(0) == 0 CheckFeatures(lyr, field3='baz5') assert lyr.DeleteField(lyr_defn.GetFieldIndex('baw20')) == 0 CheckFeatures(lyr, field3='baz5', field4=None) assert lyr.DeleteField(lyr_defn.GetFieldIndex('baz5')) == 0 CheckFeatures(lyr, field3=None, field4=None) assert lyr.DeleteField(lyr_defn.GetFieldIndex('foo5')) == 0 assert lyr.DeleteField(lyr_defn.GetFieldIndex('bar10')) == 0 CheckFeatures(lyr, field1=None, field2=None, field3=None, field4=None) ############################################################################### # Initiate the test file def test_ogr_rfc35_sqlite_cleanup(): if gdaltest.rfc35_sqlite_ds_name is None: pytest.skip() gdaltest.rfc35_sqlite_ds = None ogr.GetDriverByName('SQLite').DeleteDataSource(gdaltest.rfc35_sqlite_ds_name) gdalautotest-3.1.2/ogr/ogr_basic_test.py0000775000175000017500000005411613701060011017022 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_basic_test.py 54feba955191861000fb3e8dd5a1a2e199211713 2020-02-11 21:54:09 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic OGR functionality against test shapefiles. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2008-2014, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import sys import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### def test_ogr_basic_1(): gdaltest.ds = ogr.Open('data/poly.shp') assert gdaltest.ds is not None ############################################################################### # Test Feature counting. def test_ogr_basic_2(): gdaltest.lyr = gdaltest.ds.GetLayerByName('poly') assert gdaltest.lyr.GetName() == 'poly' assert gdaltest.lyr.GetGeomType() == ogr.wkbPolygon assert gdaltest.lyr.GetLayerDefn().GetName() == 'poly' assert gdaltest.lyr.GetLayerDefn().GetGeomType() == ogr.wkbPolygon count = gdaltest.lyr.GetFeatureCount() assert count == 10, \ ('Got wrong count with GetFeatureCount() - %d, expecting 10' % count) # Now actually iterate through counting the features and ensure they agree. gdaltest.lyr.ResetReading() count2 = 0 feat = gdaltest.lyr.GetNextFeature() while feat is not None: count2 = count2 + 1 feat = gdaltest.lyr.GetNextFeature() assert count2 == 10, \ ('Got wrong count with GetNextFeature() - %d, expecting 10' % count2) ############################################################################### # Test Spatial Query. def test_ogr_basic_3(): minx = 479405 miny = 4762826 maxx = 480732 maxy = 4763590 ########################################################################### # Create query geometry. ring = ogr.Geometry(type=ogr.wkbLinearRing) ring.AddPoint(minx, miny) ring.AddPoint(maxx, miny) ring.AddPoint(maxx, maxy) ring.AddPoint(minx, maxy) ring.AddPoint(minx, miny) poly = ogr.Geometry(type=ogr.wkbPolygon) poly.AddGeometryDirectly(ring) gdaltest.lyr.SetSpatialFilter(poly) gdaltest.lyr.SetSpatialFilter(gdaltest.lyr.GetSpatialFilter()) gdaltest.lyr.ResetReading() count = gdaltest.lyr.GetFeatureCount() assert count == 1, \ ('Got wrong feature count with spatial filter, expected 1, got %d' % count) feat1 = gdaltest.lyr.GetNextFeature() feat2 = gdaltest.lyr.GetNextFeature() assert feat1 is not None and feat2 is None, \ 'Got too few or too many features with spatial filter.' gdaltest.lyr.SetSpatialFilter(None) count = gdaltest.lyr.GetFeatureCount() assert count == 10, \ ('Clearing spatial query may not have worked properly, getting\n%d features instead of expected 10 features.' % count) ############################################################################### # Test GetDriver(). def test_ogr_basic_4(): driver = gdaltest.ds.GetDriver() assert driver is not None, 'GetDriver() returns None' assert driver.GetName() == 'ESRI Shapefile', \ ('Got wrong driver name: ' + driver.GetName()) ############################################################################### # Test attribute query on special field fid - per bug 1468. def test_ogr_basic_5(): gdaltest.lyr.SetAttributeFilter('FID = 3') gdaltest.lyr.ResetReading() feat1 = gdaltest.lyr.GetNextFeature() feat2 = gdaltest.lyr.GetNextFeature() gdaltest.lyr.SetAttributeFilter(None) assert feat1 is not None and feat2 is None, 'unexpected result count.' assert feat1.GetFID() == 3, 'got wrong feature.' ############################################################################### # Test opening a dataset with an empty string and a non existing dataset def test_ogr_basic_6(): # Put inside try/except for OG python bindings assert ogr.Open('') is None assert ogr.Open('non_existing') is None ############################################################################### # Test ogr.Feature.Equal() def test_ogr_basic_7(): feat_defn = ogr.FeatureDefn() feat = ogr.Feature(feat_defn) assert feat.Equal(feat) try: feat.SetFieldIntegerList except AttributeError: pytest.skip() feat_clone = feat.Clone() assert feat.Equal(feat_clone) # We MUST delete now as we are changing the feature defn afterwards! # Crash guaranteed otherwise feat = None feat_clone = None field_defn = ogr.FieldDefn('field1', ogr.OFTInteger) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field2', ogr.OFTReal) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field3', ogr.OFTString) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field4', ogr.OFTIntegerList) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field5', ogr.OFTRealList) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field6', ogr.OFTStringList) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field7', ogr.OFTDate) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field8', ogr.OFTTime) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field9', ogr.OFTDateTime) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field10', ogr.OFTBinary) feat_defn.AddFieldDefn(field_defn) field_defn = ogr.FieldDefn('field11', ogr.OFTInteger64) feat_defn.AddFieldDefn(field_defn) feat = ogr.Feature(feat_defn) feat.SetFID(100) feat.SetField(0, 1) feat.SetField(1, 1.2) feat.SetField(2, "A") feat.SetFieldIntegerList(3, [1, 2]) feat.SetFieldDoubleList(4, [1.2, 3.4]) feat.SetFieldStringList(5, ["A", "B"]) feat.SetField(6, 2010, 1, 8, 22, 48, 15, 4) feat.SetField(7, 2010, 1, 8, 22, 48, 15, 4) feat.SetField(8, 2010, 1, 8, 22, 48, 15, 4) feat.SetFieldBinaryFromHexString(9, '012345678ABCDEF') feat.SetField(10, 1234567890123) feat_clone = feat.Clone() if not feat.Equal(feat_clone): feat.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() geom = ogr.CreateGeometryFromWkt('POINT(0 1)') feat_almost_clone.SetGeometry(geom) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() geom = ogr.CreateGeometryFromWkt('POINT(0 1)') feat.SetGeometry(geom) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_clone = feat.Clone() if not feat.Equal(feat_clone): feat.DumpReadable() feat_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFID(99) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetField(0, 2) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetField(1, 2.2) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetField(2, "B") if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldIntegerList(3, [1, 2, 3]) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldIntegerList(3, [1, 3]) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldDoubleList(4, [1.2, 3.4, 5.6]) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldDoubleList(4, [1.2, 3.5]) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldStringList(5, ["A", "B", "C"]) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldStringList(5, ["A", "D"]) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() for num_field in [6, 7, 8]: for i in range(7): feat_almost_clone = feat.Clone() feat_almost_clone.SetField(num_field, 2010 + (i == 0), 1 + (i == 1), 8 + (i == 2), 22 + (i == 3), 48 + (i == 4), 15 + (i == 5), 4 + (i == 6)) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetFieldBinaryFromHexString(9, '00') if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetField(10, 2) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() feat_almost_clone = feat.Clone() feat_almost_clone.SetField(10, 2) if feat.Equal(feat_almost_clone): feat.DumpReadable() feat_almost_clone.DumpReadable() pytest.fail() ############################################################################### # Issue several RegisterAll() to check that OGR drivers are good citizens def test_ogr_basic_8(): ogr.RegisterAll() ogr.RegisterAll() ogr.RegisterAll() ############################################################################### # Test ogr.GeometryTypeToName (#4871) def test_ogr_basic_9(): geom_type_tuples = [[ogr.wkbUnknown, "Unknown (any)"], [ogr.wkbPoint, "Point"], [ogr.wkbLineString, "Line String"], [ogr.wkbPolygon, "Polygon"], [ogr.wkbMultiPoint, "Multi Point"], [ogr.wkbMultiLineString, "Multi Line String"], [ogr.wkbMultiPolygon, "Multi Polygon"], [ogr.wkbGeometryCollection, "Geometry Collection"], [ogr.wkbNone, "None"], [ogr.wkbUnknown | ogr.wkb25DBit, "3D Unknown (any)"], [ogr.wkbPoint25D, "3D Point"], [ogr.wkbLineString25D, "3D Line String"], [ogr.wkbPolygon25D, "3D Polygon"], [ogr.wkbMultiPoint25D, "3D Multi Point"], [ogr.wkbMultiLineString25D, "3D Multi Line String"], [ogr.wkbMultiPolygon25D, "3D Multi Polygon"], [ogr.wkbGeometryCollection25D, "3D Geometry Collection"], [123456, "Unrecognized: 123456"] ] for geom_type_tuple in geom_type_tuples: assert ogr.GeometryTypeToName(geom_type_tuple[0]) == geom_type_tuple[1] ############################################################################### # Run test_ogrsf -all_drivers def test_ogr_basic_10(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -all_drivers') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test double call to UseExceptions() (#5704) def test_ogr_basic_11(): if not ogrtest.have_geos(): pytest.skip() used_exceptions_before = ogr.GetUseExceptions() for _ in range(2): ogr.UseExceptions() geom = ogr.CreateGeometryFromWkt('POLYGON ((-65 0, -30 -30, -30 0, -65 -30, -65 0))') with gdaltest.error_handler(): geom.IsValid() if used_exceptions_before == 0: ogr.DontUseExceptions() ############################################################################### # Test OFSTBoolean, OFSTInt16 and OFSTFloat32 def test_ogr_basic_12(): # boolean integer feat_def = ogr.FeatureDefn() assert ogr.GetFieldSubTypeName(ogr.OFSTBoolean) == 'Boolean' field_def = ogr.FieldDefn('fld', ogr.OFTInteger) field_def.SetSubType(ogr.OFSTBoolean) assert field_def.GetSubType() == ogr.OFSTBoolean feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetField('fld', 0) f.SetField('fld', 1) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f.SetField('fld', 2) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f.GetField('fld') == 1 f.SetField('fld', '0') f.SetField('fld', '1') gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f.SetField('fld', '2') gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f.GetField('fld') == 1 gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') field_def = ogr.FieldDefn('fld', ogr.OFTString) field_def.SetSubType(ogr.OFSTBoolean) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert field_def.GetSubType() == ogr.OFSTNone # boolean list feat_def = ogr.FeatureDefn() field_def = ogr.FieldDefn('fld', ogr.OFTIntegerList) field_def.SetSubType(ogr.OFSTBoolean) assert field_def.GetSubType() == ogr.OFSTBoolean feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetFieldIntegerList(0, [0, 1]) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f.SetFieldIntegerList(0, [0, 1, 2, 1]) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f.GetField('fld') == [0, 1, 1, 1] # int16 integer feat_def = ogr.FeatureDefn() assert ogr.GetFieldSubTypeName(ogr.OFSTInt16) == 'Int16' field_def = ogr.FieldDefn('fld', ogr.OFTInteger) field_def.SetSubType(ogr.OFSTInt16) assert field_def.GetSubType() == ogr.OFSTInt16 feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetField('fld', -32768) f.SetField('fld', 32767) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f.SetField('fld', -32769) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f.GetField('fld') == -32768 gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f.SetField('fld', 32768) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f.GetField('fld') == 32767 gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') field_def = ogr.FieldDefn('fld', ogr.OFTString) field_def.SetSubType(ogr.OFSTInt16) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert field_def.GetSubType() == ogr.OFSTNone # float32 feat_def = ogr.FeatureDefn() assert ogr.GetFieldSubTypeName(ogr.OFSTFloat32) == 'Float32' field_def = ogr.FieldDefn('fld', ogr.OFTReal) field_def.SetSubType(ogr.OFSTFloat32) assert field_def.GetSubType() == ogr.OFSTFloat32 feat_def.AddFieldDefn(field_def) if False: # pylint: disable=using-constant-test f = ogr.Feature(feat_def) gdal.ErrorReset() f.SetField('fld', '1.23') assert gdal.GetLastErrorMsg() == '' gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') f.SetField('fld', 1.230000000001) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' if f.GetField('fld') == pytest.approx(1.23, abs=1e-8): f.DumpReadable() pytest.fail() gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') field_def = ogr.FieldDefn('fld', ogr.OFSTFloat32) field_def.SetSubType(ogr.OFSTInt16) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert field_def.GetSubType() == ogr.OFSTNone ############################################################################### # Test OGRParseDate (#6452) def test_ogr_basic_13(): feat_defn = ogr.FeatureDefn('test') field_defn = ogr.FieldDefn('date', ogr.OFTDateTime) feat_defn.AddFieldDefn(field_defn) tests = [('2016/1/1', '2016/01/01 00:00:00'), ('2016/1/1 12:34', '2016/01/01 12:34:00'), ('2016/1/1 12:34:56', '2016/01/01 12:34:56'), ('2016/1/1 12:34:56.789', '2016/01/01 12:34:56.789'), ('2016/12/31', '2016/12/31 00:00:00'), ('-2016/12/31', '-2016/12/31 00:00:00'), ('2016-12-31', '2016/12/31 00:00:00'), ('0080/1/1', '0080/01/01 00:00:00'), ('80/1/1', '1980/01/01 00:00:00'), ('0010/1/1', '0010/01/01 00:00:00'), ('9/1/1', '2009/01/01 00:00:00'), ('10/1/1', '2010/01/01 00:00:00'), ('2016-13-31', None), ('2016-0-31', None), ('2016-1-32', None), ('2016-1-0', None), ('0/1/1', '2000/01/01 00:00:00'), ('00/1/1', '2000/01/01 00:00:00'), ('00/00/00', None), ('000/00/00', None), ('0000/00/00', None), ('//foo', None)] for (val, expected_ret) in tests: f = ogr.Feature(feat_defn) f.SetField('date', val) assert f.GetField('date') == expected_ret, val ############################################################################### # Test ogr.Open(.) in an empty directory def test_ogr_basic_14(): os.mkdir('tmp/ogr_basic_14') os.chdir('tmp/ogr_basic_14') ds = ogr.Open('.') os.chdir('../..') assert ds is None os.rmdir('tmp/ogr_basic_14') ############################################################################### # Test exceptions with OGRErr return code def test_ogr_basic_15(): ds = ogr.Open('data/poly.shp') lyr = ds.GetLayer(0) used_exceptions_before = ogr.GetUseExceptions() ogr.UseExceptions() try: lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) except RuntimeError as e: ok = str(e).find('CreateFeature : unsupported operation on a read-only datasource') >= 0 assert ok, ('Got: %s' + str(e)) return finally: if used_exceptions_before == 0: ogr.DontUseExceptions() pytest.fail('Expected exception') ############################################################################### # Test issue with Python 3.5 and older SWIG (#6749) def ogr_basic_16_make_geom(): geom = ogr.Geometry(ogr.wkbPoint) geom.AddPoint_2D(0, 0) return geom def ogr_basic_16_gen_list(N): for i in range(N): ogr_basic_16_make_geom() yield i def test_ogr_basic_16(): assert list(ogr_basic_16_gen_list(2)) == [0, 1] def test_ogr_basic_invalid_unicode(): if sys.version_info >= (3, 0, 0): val = '\udcfc' else: exec("val = u'\\udcfc'") try: ogr.Open(val) except: pass data_source = ogr.GetDriverByName('Memory').CreateDataSource('') layer = data_source.CreateLayer("test") layer.CreateField(ogr.FieldDefn('attr', ogr.OFTString)) feature = ogr.Feature(layer.GetLayerDefn()) try: feature.SetField('attr', val) except: pass def test_ogr_basic_dataset_slice(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') ds.CreateLayer('lyr1') ds.CreateLayer('lyr2') ds.CreateLayer('lyr3') lyrs = [lyr.GetName() for lyr in ds[1:3]] assert lyrs == ['lyr2', 'lyr3'] lyrs = [lyr.GetName() for lyr in ds[0:4]] assert lyrs == ['lyr1', 'lyr2', 'lyr3'] lyrs = [lyr.GetName() for lyr in ds[0:3:2]] assert lyrs == ['lyr1', 'lyr3'] def test_ogr_basic_feature_iterator(): lyr = gdaltest.ds.GetLayer(0) count = 0 for f in lyr: count += 1 assert count == 10 count = 0 for f in lyr: count += 1 assert count == 10 def test_ogr_basic_dataset_copy_layer_dst_srswkt(): ds = ogr.GetDriverByName('Memory').CreateDataSource('') src_lyr = ds.CreateLayer('lyr1') sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) out_lyr = ds.CopyLayer(src_lyr, 'lyr2', options=['DST_SRSWKT=' + sr.ExportToWkt()]) assert out_lyr.GetSpatialRef() is not None assert out_lyr.GetSpatialRef().IsSame(sr) ############################################################################### # cleanup def test_ogr_basic_cleanup(): gdaltest.lyr = None gdaltest.ds = None gdalautotest-3.1.2/ogr/ogr_oci.py0000775000175000017500000012103413701060011015446 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_oci.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test Oracle OCI driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest pytestmark = [ pytest.mark.skipif('OCI_DSNAME' not in os.environ, reason='no OCI_DSNAME in environment'), pytest.mark.require_driver('OCI'), ] ############################################################################### # Open ORACLE. def test_ogr_oci_1(): gdaltest.oci_ds = None gdaltest.oci_ds = ogr.Open(os.environ['OCI_DSNAME']) if gdaltest.oci_ds is not None: return pytest.fail() ############################################################################### # Create Oracle table from data/poly.shp def test_ogr_oci_2(): if gdaltest.oci_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.oci_ds.ExecuteSQL('DELLAYER:tpoly') gdal.PopErrorHandler() ###################################################### # Create Oracle Layer gdaltest.oci_lyr = gdaltest.oci_ds.CreateLayer('tpoly', options=['DIM=3']) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.oci_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.oci_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.oci_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() # Test updating non-existing feature shp_lyr.ResetReading() feat = shp_lyr.GetNextFeature() feat.SetFID(-10) assert gdaltest.oci_lyr.SetFeature(feat) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of SetFeature().' # Test deleting non-existing feature assert gdaltest.oci_lyr.DeleteFeature(-10) == ogr.OGRERR_NON_EXISTING_FEATURE, \ 'Expected failure of DeleteFeature().' ############################################################################### # Helper method to reverse ring winding. This is needed because the # winding direction in shapefiles, and in Oracle is opposite for polygons. def reverse_rings(poly): for i_ring in range(poly.GetGeometryCount()): ring = poly.GetGeometryRef(i_ring) v_count = ring.GetPointCount() for i_vert in range(v_count / 2): i_other = v_count - i_vert - 1 p1 = (ring.GetX(i_vert), ring.GetY(i_vert), ring.GetZ(i_vert)) ring.SetPoint(i_vert, ring.GetX(i_other), ring.GetY(i_other), ring.GetZ(i_other)) ring.SetPoint(i_other, p1[0], p1[1], p1[2]) ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_oci_3(): if gdaltest.oci_ds is None: pytest.skip() expect = [168, 169, 166, 158, 165] gdaltest.oci_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.oci_lyr, 'eas_id', expect) gdaltest.oci_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.oci_lyr.GetNextFeature() reverse_rings(orig_feat.GetGeometryRef()) if ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.000000001) != 0: print('expected:', orig_feat.GetGeometryRef().ExportToWkt()) pytest.fail('got:', read_feat.GetGeometryRef().ExportToWkt()) for fld in range(3): if orig_feat.GetField(fld) != read_feat.GetField(fld): print('expected:') print(orig_feat.DumpReadable()) print('got:') print(read_feat.DumpReadable()) pytest.fail('Attribute %d does not match' % fld) read_feat.Destroy() orig_feat.Destroy() gdaltest.poly_feat = None gdaltest.shp_ds.Destroy() assert tr ############################################################################### # Write more features with a bunch of different geometries, and verify the # geometries are still OK. def test_ogr_oci_4(): if gdaltest.oci_ds is None: pytest.skip() wkt_list = ['10', '2', '1', '3d_1', '4', '5', '6'] for item in wkt_list: wkt = open('data/wkb_wkt/' + item + '.wkt').read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Write geometry as a new Oracle feature. dst_feat = ogr.Feature(feature_def=gdaltest.oci_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(geom) dst_feat.SetField('PRFEDEA', item) gdaltest.oci_lyr.CreateFeature(dst_feat) ###################################################################### # Read back the feature and get the geometry. gdaltest.oci_lyr.SetAttributeFilter("PRFEDEA = '%s'" % item) feat_read = gdaltest.oci_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat_read, geom) == 0 feat_read.Destroy() dst_feat.Destroy() ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_oci_5(): if gdaltest.oci_ds is None: pytest.skip() expect = [None, 179, 173, 172, 171, 170, 169, 168, 166, 165, 158] sql_lyr = gdaltest.oci_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') assert sql_lyr.GetLayerDefn().GetGeomFieldCount() == 0 tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_oci_6(): if gdaltest.oci_ds is None: pytest.skip() sql_lyr = gdaltest.oci_ds.ExecuteSQL("select * from tpoly where prfedea = '2'") assert sql_lyr.GetLayerDefn().GetGeomFieldCount() == 1 tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['2']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'MULTILINESTRING ((5.00121349 2.99853132,5.00121349 1.99853133),(5.00121349 1.99853133,5.00121349 0.99853133),(3.00121351 1.99853127,5.00121349 1.99853133),(5.00121349 1.99853133,6.00121348 1.99853135))') != 0: tr = 0 feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_oci_7(): if gdaltest.oci_ds is None: pytest.skip() gdaltest.oci_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.oci_lyr.SetSpatialFilter(geom) geom.Destroy() tr = ogrtest.check_features_against_list(gdaltest.oci_lyr, 'eas_id', [158]) gdaltest.oci_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Test that we can create a layer with a coordinate system that is mapped # to an oracle coordinate system using the ORACLE authority code. def test_ogr_oci_8(): if gdaltest.oci_ds is None: pytest.skip() ####################################################### # Preclean. gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.oci_ds.ExecuteSQL('DELLAYER:testsrs') gdal.PopErrorHandler() ####################################################### # Prepare an SRS with an ORACLE authority code. srs = osr.SpatialReference() srs.SetGeogCS("gcs_dummy", "datum_dummy", "ellipse_dummy", osr.SRS_WGS84_SEMIMAJOR, osr.SRS_WGS84_INVFLATTENING) srs.SetAuthority('GEOGCS', 'Oracle', 8241) ####################################################### # Create Oracle Layer oci_lyr2 = gdaltest.oci_ds.CreateLayer('testsrs', srs=srs, options=['INDEX=FALSE']) ####################################################### # Now check that the srs for the layer is really the built-in # oracle SRS. srs2 = oci_lyr2.GetSpatialRef() assert srs2.GetAuthorityCode('GEOGCS') == '8241', \ 'Did not get expected authority code' assert srs2.GetAuthorityName('GEOGCS') == 'Oracle', \ 'Did not get expected authority name' assert srs2.GetAttrValue('GEOGCS|DATUM') == 'Kertau 1948', \ 'Did not get expected datum name' ############################################################################### # This time we create a layer with a EPSG marked GEOGCS, and verify that # the coordinate system gets properly remapped to the Oracle WGS84. def test_ogr_oci_9(): if gdaltest.oci_ds is None: pytest.skip() ####################################################### # Preclean. gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.oci_ds.ExecuteSQL('DELLAYER:testsrs2') gdal.PopErrorHandler() ####################################################### # Prepare an SRS with an EPSG authority code. srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') ####################################################### # Create Oracle Layer oci_lyr2 = gdaltest.oci_ds.CreateLayer('testsrs2', srs=srs, options=['INDEX=FALSE']) ####################################################### # Now check that the srs for the layer is really the built-in # oracle SRS we expect. srs2 = oci_lyr2.GetSpatialRef() assert srs2.GetAuthorityCode('GEOGCS') == '4326', \ 'Did not get expected authority code' assert srs2.GetAuthorityName('GEOGCS') == 'EPSG', \ 'Did not get expected authority name' assert srs2.GetAttrValue('GEOGCS|DATUM') == 'WGS 84', \ 'Did not get expected datum name' ############################################################################### # Test handling of specialized Oracle Rectangle Geometries. def test_ogr_oci_10(): if gdaltest.oci_ds is None: pytest.skip() # Create a test table. gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.oci_ds.ExecuteSQL('drop table geom_test') gdal.PopErrorHandler() gdaltest.oci_ds.ExecuteSQL('CREATE TABLE geom_test(ora_fid number primary key, shape sdo_geometry)') # insert a rectangle geometry. gdaltest.oci_ds.ExecuteSQL(""" INSERT INTO geom_test VALUES( 1, SDO_GEOMETRY( 2003, -- two-dimensional polygon NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), -- one rectangle (1003 = exterior) SDO_ORDINATE_ARRAY(1,1, 5,7) -- only 2 points needed to -- define rectangle (lower left and upper right) with -- Cartesian-coordinate data ) ) """) sql_lyr = gdaltest.oci_ds.ExecuteSQL('select * from geom_test where ora_fid = 1') feat_read = sql_lyr.GetNextFeature() expected_wkt = 'POLYGON ((1 1 0,5 1 0,5 7 0,1 7 0,1 1 0))' tr = 1 if ogrtest.check_feature_geometry(feat_read, expected_wkt) != 0: tr = 0 print(feat_read.GetGeometryRef().ExportToWkt()) feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test handling of specialized Oracle circle Geometries. def test_ogr_oci_11(): if gdaltest.oci_ds is None: pytest.skip() # insert a rectangle geometry. gdaltest.oci_ds.ExecuteSQL(""" INSERT INTO geom_test VALUES( 4, SDO_GEOMETRY( 2003, -- two-dimensional polygon NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,4), -- one circle SDO_ORDINATE_ARRAY(8,7, 10,9, 8,11) ) ) """) sql_lyr = gdaltest.oci_ds.ExecuteSQL('select * from geom_test where ora_fid = 4') feat_read = sql_lyr.GetNextFeature() expected_wkt = 'POLYGON ((10 9,9.989043790736547 9.209056926535308,9.956295201467611 9.415823381635519,9.902113032590307 9.618033988749895,9.827090915285202 9.8134732861516,9.732050807568877 10.0,9.618033988749895 10.175570504584947,9.486289650954788 10.338261212717716,9.338261212717717 10.486289650954788,9.175570504584947 10.618033988749895,9.0 10.732050807568877,8.8134732861516 10.827090915285202,8.618033988749895 10.902113032590307,8.415823381635519 10.956295201467611,8.209056926535308 10.989043790736547,8 11,7.790943073464693 10.989043790736547,7.584176618364482 10.956295201467611,7.381966011250105 10.902113032590307,7.1865267138484 10.827090915285202,7.0 10.732050807568877,6.824429495415054 10.618033988749895,6.661738787282284 10.486289650954788,6.513710349045212 10.338261212717716,6.381966011250105 10.175570504584947,6.267949192431122 10.0,6.172909084714799 9.8134732861516,6.097886967409693 9.618033988749895,6.043704798532389 9.415823381635519,6.010956209263453 9.209056926535308,6 9,6.010956209263453 8.790943073464694,6.043704798532389 8.584176618364483,6.097886967409693 8.381966011250105,6.172909084714798 8.1865267138484,6.267949192431123 8.0,6.381966011250105 7.824429495415054,6.513710349045212 7.661738787282284,6.661738787282284 7.513710349045212,6.824429495415053 7.381966011250105,7 7.267949192431123,7.1865267138484 7.172909084714798,7.381966011250105 7.097886967409693,7.584176618364481 7.043704798532389,7.790943073464693 7.010956209263453,8 7,8.209056926535306 7.010956209263453,8.415823381635518 7.043704798532389,8.618033988749895 7.097886967409693,8.8134732861516 7.172909084714799,9.0 7.267949192431123,9.175570504584947 7.381966011250105,9.338261212717715 7.513710349045211,9.486289650954788 7.661738787282284,9.618033988749895 7.824429495415053,9.732050807568877 8,9.827090915285202 8.1865267138484,9.902113032590307 8.381966011250105,9.956295201467611 8.584176618364481,9.989043790736547 8.790943073464693,10 9))' tr = 1 if ogrtest.check_feature_geometry(feat_read, expected_wkt) != 0: tr = 0 print(feat_read.GetGeometryRef().ExportToWkt()) feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test handling of specialized Oracle circular arc linestring Geometries. def test_ogr_oci_12(): if gdaltest.oci_ds is None: pytest.skip() # insert a rectangle geometry. gdaltest.oci_ds.ExecuteSQL(""" INSERT INTO geom_test VALUES( 12, SDO_GEOMETRY( 2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,2,2), -- compound line string SDO_ORDINATE_ARRAY(0,0, 1,1, 0,2, -1,3, 0,4, 2,2, 0,0 ) ) ) """) sql_lyr = gdaltest.oci_ds.ExecuteSQL('select * from geom_test where ora_fid = 12') feat_read = sql_lyr.GetNextFeature() expected_wkt = 'LINESTRING (0.0 0.0,0.104528463267653 0.005478104631727,0.207911690817759 0.021852399266194,0.309016994374947 0.048943483704846,0.4067366430758 0.086454542357399,0.5 0.133974596215561,0.587785252292473 0.190983005625053,0.669130606358858 0.256855174522606,0.743144825477394 0.330869393641142,0.809016994374947 0.412214747707527,0.866025403784439 0.5,0.913545457642601 0.5932633569242,0.951056516295154 0.690983005625053,0.978147600733806 0.792088309182241,0.994521895368273 0.895471536732347,1 1,0.994521895368273 1.104528463267654,0.978147600733806 1.207911690817759,0.951056516295154 1.309016994374948,0.913545457642601 1.4067366430758,0.866025403784439 1.5,0.809016994374947 1.587785252292473,0.743144825477394 1.669130606358858,0.669130606358858 1.743144825477394,0.587785252292473 1.809016994374948,0.5 1.866025403784439,0.4067366430758 1.913545457642601,0.309016994374947 1.951056516295154,0.207911690817759 1.978147600733806,0.104528463267653 1.994521895368273,0 2,-0.104528463267653 2.005478104631727,-0.207911690817759 2.021852399266194,-0.309016994374947 2.048943483704846,-0.4067366430758 2.086454542357399,-0.5 2.133974596215561,-0.587785252292473 2.190983005625053,-0.669130606358858 2.256855174522606,-0.743144825477394 2.330869393641142,-0.809016994374947 2.412214747707527,-0.866025403784439 2.5,-0.913545457642601 2.593263356924199,-0.951056516295154 2.690983005625053,-0.978147600733806 2.792088309182241,-0.994521895368273 2.895471536732346,-1 3,-0.994521895368273 3.104528463267653,-0.978147600733806 3.207911690817759,-0.951056516295154 3.309016994374948,-0.913545457642601 3.4067366430758,-0.866025403784439 3.5,-0.809016994374948 3.587785252292473,-0.743144825477394 3.669130606358858,-0.669130606358858 3.743144825477394,-0.587785252292473 3.809016994374948,-0.5 3.866025403784438,-0.4067366430758 3.913545457642601,-0.309016994374948 3.951056516295154,-0.20791169081776 3.978147600733806,-0.104528463267653 3.994521895368274,0 4,0.209056926535307 3.989043790736547,0.415823381635519 3.956295201467611,0.618033988749895 3.902113032590307,0.8134732861516 3.827090915285202,1.0 3.732050807568877,1.175570504584946 3.618033988749895,1.338261212717717 3.486289650954788,1.486289650954789 3.338261212717717,1.618033988749895 3.175570504584946,1.732050807568877 3.0,1.827090915285202 2.8134732861516,1.902113032590307 2.618033988749895,1.956295201467611 2.415823381635519,1.989043790736547 2.209056926535307,2 2,1.989043790736547 1.790943073464693,1.956295201467611 1.584176618364481,1.902113032590307 1.381966011250105,1.827090915285202 1.1865267138484,1.732050807568877 1.0,1.618033988749895 0.824429495415054,1.486289650954789 0.661738787282284,1.338261212717717 0.513710349045212,1.175570504584946 0.381966011250105,1.0 0.267949192431123,0.8134732861516 0.172909084714798,0.618033988749895 0.097886967409693,0.415823381635519 0.043704798532389,0.209056926535307 0.010956209263453,0.0 0.0)' tr = 1 if ogrtest.check_feature_geometry(feat_read, expected_wkt) != 0: tr = 0 print(feat_read.GetGeometryRef().ExportToWkt()) feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test handling of specialized Oracle circular arc polygon Geometries. def test_ogr_oci_13(): if gdaltest.oci_ds is None: pytest.skip() # insert a rectangle geometry. gdaltest.oci_ds.ExecuteSQL(""" INSERT INTO geom_test VALUES( 13, SDO_GEOMETRY( 2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1003,2), -- compound line string SDO_ORDINATE_ARRAY(0,0, 1,1, 0,2, -1,3, 0,4, 2,2, 0,0 ) ) ) """) sql_lyr = gdaltest.oci_ds.ExecuteSQL('select * from geom_test where ora_fid = 13') feat_read = sql_lyr.GetNextFeature() expected_wkt = 'POLYGON ((0.0 0.0,0.104528463267653 0.005478104631727,0.207911690817759 0.021852399266194,0.309016994374947 0.048943483704846,0.4067366430758 0.086454542357399,0.5 0.133974596215561,0.587785252292473 0.190983005625053,0.669130606358858 0.256855174522606,0.743144825477394 0.330869393641142,0.809016994374947 0.412214747707527,0.866025403784439 0.5,0.913545457642601 0.5932633569242,0.951056516295154 0.690983005625053,0.978147600733806 0.792088309182241,0.994521895368273 0.895471536732347,1 1,0.994521895368273 1.104528463267654,0.978147600733806 1.207911690817759,0.951056516295154 1.309016994374948,0.913545457642601 1.4067366430758,0.866025403784439 1.5,0.809016994374947 1.587785252292473,0.743144825477394 1.669130606358858,0.669130606358858 1.743144825477394,0.587785252292473 1.809016994374948,0.5 1.866025403784439,0.4067366430758 1.913545457642601,0.309016994374947 1.951056516295154,0.207911690817759 1.978147600733806,0.104528463267653 1.994521895368273,0 2,-0.104528463267653 2.005478104631727,-0.207911690817759 2.021852399266194,-0.309016994374947 2.048943483704846,-0.4067366430758 2.086454542357399,-0.5 2.133974596215561,-0.587785252292473 2.190983005625053,-0.669130606358858 2.256855174522606,-0.743144825477394 2.330869393641142,-0.809016994374947 2.412214747707527,-0.866025403784439 2.5,-0.913545457642601 2.593263356924199,-0.951056516295154 2.690983005625053,-0.978147600733806 2.792088309182241,-0.994521895368273 2.895471536732346,-1 3,-0.994521895368273 3.104528463267653,-0.978147600733806 3.207911690817759,-0.951056516295154 3.309016994374948,-0.913545457642601 3.4067366430758,-0.866025403784439 3.5,-0.809016994374948 3.587785252292473,-0.743144825477394 3.669130606358858,-0.669130606358858 3.743144825477394,-0.587785252292473 3.809016994374948,-0.5 3.866025403784438,-0.4067366430758 3.913545457642601,-0.309016994374948 3.951056516295154,-0.20791169081776 3.978147600733806,-0.104528463267653 3.994521895368274,0 4,0.209056926535307 3.989043790736547,0.415823381635519 3.956295201467611,0.618033988749895 3.902113032590307,0.8134732861516 3.827090915285202,1.0 3.732050807568877,1.175570504584946 3.618033988749895,1.338261212717717 3.486289650954788,1.486289650954789 3.338261212717717,1.618033988749895 3.175570504584946,1.732050807568877 3.0,1.827090915285202 2.8134732861516,1.902113032590307 2.618033988749895,1.956295201467611 2.415823381635519,1.989043790736547 2.209056926535307,2 2,1.989043790736547 1.790943073464693,1.956295201467611 1.584176618364481,1.902113032590307 1.381966011250105,1.827090915285202 1.1865267138484,1.732050807568877 1.0,1.618033988749895 0.824429495415054,1.486289650954789 0.661738787282284,1.338261212717717 0.513710349045212,1.175570504584946 0.381966011250105,1.0 0.267949192431123,0.8134732861516 0.172909084714798,0.618033988749895 0.097886967409693,0.415823381635519 0.043704798532389,0.209056926535307 0.010956209263453,0.0 0.0))' tr = 1 if ogrtest.check_feature_geometry(feat_read, expected_wkt) != 0: tr = 0 print(feat_read.GetGeometryRef().ExportToWkt()) feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test handling of compount linestring. def test_ogr_oci_14(): if gdaltest.oci_ds is None: pytest.skip() # insert a rectangle geometry. gdaltest.oci_ds.ExecuteSQL(""" INSERT INTO geom_test VALUES( 11, SDO_GEOMETRY( 2002, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,4,2, 1,2,1, 3,2,2), -- compound line string SDO_ORDINATE_ARRAY(10,10, 10,14, 6,10, 14,10) ) ) """) sql_lyr = gdaltest.oci_ds.ExecuteSQL('select * from geom_test where ora_fid = 11') feat_read = sql_lyr.GetNextFeature() expected_wkt = 'LINESTRING (10 10 0,10 14 0,9.581886146929387 13.978087581473094 0,9.168353236728963 13.912590402935223 0,8.76393202250021 13.804226065180615 0,8.373053427696799 13.654181830570405 0,8.0 13.464101615137755 0,7.648858990830108 13.23606797749979 0,7.323477574564567 12.972579301909576 0,7.027420698090424 12.676522425435433 0,6.76393202250021 12.351141009169893 0,6.535898384862245 12.0 0,6.345818169429597 11.626946572303202 0,6.195773934819385 11.23606797749979 0,6.087409597064777 10.831646763271037 0,6.021912418526907 10.418113853070615 0,6 10 0,6.021912418526906 9.581886146929389 0,6.087409597064777 9.168353236728963 0,6.195773934819385 8.763932022500208 0,6.345818169429595 8.373053427696801 0,6.535898384862246 8.0 0,6.76393202250021 7.648858990830108 0,7.027420698090423 7.323477574564567 0,7.323477574564566 7.027420698090424 0,7.648858990830107 6.76393202250021 0,8 6.535898384862247 0,8.373053427696799 6.345818169429596 0,8.76393202250021 6.195773934819385 0,9.168353236728962 6.087409597064777 0,9.581886146929387 6.021912418526906 0,10 6 0,10.418113853070611 6.021912418526906 0,10.831646763271035 6.087409597064777 0,11.23606797749979 6.195773934819385 0,11.626946572303202 6.345818169429597 0,12.0 6.535898384862246 0,12.351141009169892 6.76393202250021 0,12.676522425435431 7.027420698090422 0,12.972579301909576 7.323477574564567 0,13.23606797749979 7.648858990830107 0,13.464101615137753 8 0,13.654181830570405 8.373053427696799 0,13.804226065180615 8.76393202250021 0,13.912590402935223 9.16835323672896 0,13.978087581473094 9.581886146929387 0,14.0 10 0)' tr = 1 if ogrtest.check_feature_geometry(feat_read, expected_wkt) != 0: tr = 0 print(feat_read.GetGeometryRef().ExportToWkt()) feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test handling of compount polygon. def test_ogr_oci_15(): if gdaltest.oci_ds is None: pytest.skip() # insert a rectangle geometry. gdaltest.oci_ds.ExecuteSQL(""" INSERT INTO geom_test VALUES( 21, SDO_GEOMETRY( 2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1,1005,2, 1,1003,1, 3,1003,2), SDO_ORDINATE_ARRAY(-10,10, 10,10, 0,0, -10,10) ) ) """) sql_lyr = gdaltest.oci_ds.ExecuteSQL('select * from geom_test where ora_fid = 21') feat_read = sql_lyr.GetNextFeature() expected_wkt = 'POLYGON ((-10 10 0,10 10 0,9.945218953682733 8.954715367323466 0,9.781476007338057 7.920883091822407 0,9.510565162951535 6.909830056250526 0,9.135454576426008 5.932633569241999 0,8.660254037844387 5.0 0,8.090169943749475 4.122147477075268 0,7.431448254773942 3.308693936411418 0,6.691306063588582 2.568551745226059 0,5.877852522924732 1.909830056250526 0,5.0 1.339745962155615 0,4.067366430758002 0.864545423573992 0,3.090169943749475 0.489434837048465 0,2.079116908177594 0.218523992661945 0,1.045284632676535 0.054781046317267 0,0.0 0.0 0,-1.045284632676533 0.054781046317267 0,-2.079116908177591 0.218523992661943 0,-3.090169943749474 0.489434837048464 0,-4.067366430758001 0.86454542357399 0,-5 1.339745962155613 0,-5.87785252292473 1.909830056250526 0,-6.691306063588582 2.568551745226058 0,-7.43144825477394 3.308693936411417 0,-8.090169943749473 4.122147477075267 0,-8.660254037844387 5.0 0,-9.135454576426007 5.932633569241996 0,-9.510565162951535 6.909830056250526 0,-9.781476007338057 7.920883091822407 0,-9.945218953682733 8.954715367323463 0,-10 10 0))' tr = 1 if ogrtest.check_feature_geometry(feat_read, expected_wkt) != 0: tr = 0 print(feat_read.GetGeometryRef().ExportToWkt()) feat_read.Destroy() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test deleting an existing layer. def test_ogr_oci_16(): if gdaltest.oci_ds is None: pytest.skip() target_index = -1 lc = gdaltest.oci_ds.GetLayerCount() for i in range(lc): lyr = gdaltest.oci_ds.GetLayer(i) if lyr.GetName() == 'TESTSRS2': target_index = i break lyr = None assert target_index != -1, 'did not find testsrs2 layer' result = gdaltest.oci_ds.DeleteLayer(target_index) assert result == 0, 'DeleteLayer() failed.' lyr = gdaltest.oci_ds.GetLayerByName('testsrs2') assert lyr is None, 'apparently failed to remove testsrs2 layer' ############################################################################### # Test that synctodisk actually sets the layer bounds metadata. def test_ogr_oci_17(): if gdaltest.oci_ds is None: pytest.skip() gdaltest.oci_ds.ExecuteSQL('DELLAYER:xpoly') ###################################################### # Create Oracle Layer gdaltest.oci_lyr = gdaltest.oci_ds.CreateLayer('xpoly') ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.oci_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.oci_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.oci_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() ###################################################### # Create a distinct connection to the same database to monitor the # metadata table. oci_ds2 = ogr.Open(os.environ['OCI_DSNAME']) sql_lyr = oci_ds2.ExecuteSQL("select column_name from user_sdo_geom_metadata where table_name = 'XPOLY'") assert sql_lyr.GetFeatureCount() <= 0, 'user_sdo_geom_metadata already populated!' oci_ds2.ReleaseResultSet(sql_lyr) result = gdaltest.oci_ds.SyncToDisk() assert result == 0, 'SyncToDisk() failed.' sql_lyr = oci_ds2.ExecuteSQL("select column_name from user_sdo_geom_metadata where table_name = 'XPOLY'") assert sql_lyr.GetFeatureCount() != 0, 'user_sdo_geom_metadata still not populated!' oci_ds2.ReleaseResultSet(sql_lyr) oci_ds2 = None ############################################################################### # Test layer geometry types def test_ogr_oci_18(): if gdaltest.oci_ds is None: pytest.skip() wkts = ['POINT (0 1)', 'LINESTRING (0 1,2 3)', 'POLYGON ((0 0,1 0,1 1,0 1,0 0))', 'MULTIPOINT (0 1)', 'MULTILINESTRING ((0 1,2 3))', 'MULTIPOLYGON (((0 0,1 0,1 1,0 1,0 0)))', 'GEOMETRYCOLLECTION (POINT (0 1))', 'POINT (0 1 2)', 'LINESTRING (0 1 2,3 4 5)', 'POLYGON ((0 0 10,1 0 10,1 1 10,0 1 10,0 0 10))'] for wkt in wkts: g = ogr.CreateGeometryFromWkt(wkt) geomtype = g.GetGeometryType() strgeomtype = wkt[0:wkt.find(' ')] if geomtype & ogr.wkb25DBit: dim = 3 strgeomtype = strgeomtype + '3' else: dim = 2 lyr = gdaltest.oci_ds.CreateLayer('test_%s' % strgeomtype, geom_type=geomtype, options=['DIM=%d' % dim]) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(g) lyr.CreateFeature(feat) lyr.SyncToDisk() lyr = gdaltest.oci_ds.CreateLayer('test_NONE', geom_type=ogr.wkbNone) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr.SyncToDisk() oci_ds2 = ogr.Open(os.environ['OCI_DSNAME']) for wkt in wkts: g = ogr.CreateGeometryFromWkt(wkt) strgeomtype = wkt[0:wkt.find(' ')] if strgeomtype == 'GEOMETRYCOLLECTION': geomtype = ogr.wkbUnknown else: geomtype = g.GetGeometryType() if geomtype & ogr.wkb25DBit: strgeomtype = strgeomtype + '3' lyr = oci_ds2.GetLayerByName('test_%s' % strgeomtype) assert lyr.GetGeomType() == geomtype, wkt feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == wkt dsname = os.environ['OCI_DSNAME'] if '@' not in dsname: dsname = dsname + '@:test_NONE' else: dsname = dsname + ':test_NONE' oci_ds2 = ogr.Open(dsname) lyr = oci_ds2.GetLayerByName('test_NONE') assert lyr.GetGeomType() == ogr.wkbNone ############################################################################### # Test date / datetime def test_ogr_oci_19(): if gdaltest.oci_ds is None: pytest.skip() lyr = gdaltest.oci_ds.CreateLayer('testdate', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('MYDATE', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('MYDATETIME', ogr.OFTDateTime)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('MYDATE', '2015/02/03') feat.SetField('MYDATETIME', '2015/02/03 11:33:44') lyr.CreateFeature(feat) lyr.SyncToDisk() sql_lyr = gdaltest.oci_ds.ExecuteSQL('SELECT MYDATE, MYDATETIME FROM testdate') assert sql_lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTDate assert sql_lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTDateTime f = sql_lyr.GetNextFeature() if f.GetField(0) != '2015/02/03' or f.GetField(1) != '2015/02/03 11:33:44': f.DumpReadable() pytest.fail() gdaltest.oci_ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test not nullable fields def test_ogr_oci_20(): if gdaltest.oci_ds is None: pytest.skip() lyr = gdaltest.oci_ds.CreateLayer('ogr_oci_20', geom_type=ogr.wkbPoint, options=['GEOMETRY_NULLABLE=NO', 'DIM=2']) assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 1)')) ret = lyr.CreateFeature(f) f = None assert ret == 0 # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None lyr.SyncToDisk() # Test with nullable geometry lyr = gdaltest.oci_ds.CreateLayer('ogr_oci_20bis', geom_type=ogr.wkbPoint, options=['DIM=2']) assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 1 f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 1)')) ret = lyr.CreateFeature(f) f = None assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) f = None assert ret == 0 lyr.SyncToDisk() oci_ds2 = ogr.Open(os.environ['OCI_DSNAME']) lyr = oci_ds2.GetLayerByName('ogr_oci_20') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 lyr = oci_ds2.GetLayerByName('ogr_oci_20bis') assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 1 feat = lyr.GetNextFeature() assert feat.GetGeometryRef() is not None feat = lyr.GetNextFeature() assert feat.GetGeometryRef() is None ############################################################################### # Test default values def test_ogr_oci_21(): if gdaltest.oci_ds is None: pytest.skip() lyr = gdaltest.oci_ds.CreateLayer('ogr_oci_21', geom_type=ogr.wkbPoint, options=['DIM=2']) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a''b'") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_int', ogr.OFTInteger) field_defn.SetDefault('123') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_real', ogr.OFTReal) field_defn.SetDefault('1.23') lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_defn.SetDefault("CURRENT_TIMESTAMP") lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_defn.SetDefault("'2015/06/30 12:34:56'") lyr.CreateField(field_defn) # field_defn = ogr.FieldDefn( 'field_date', ogr.OFTDate ) # field_defn.SetDefault("CURRENT_DATE") # lyr.CreateField(field_defn) # field_defn = ogr.FieldDefn( 'field_time', ogr.OFTTime ) # field_defn.SetDefault("CURRENT_TIME") # lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_string', 'c') f.SetField('field_int', 456) f.SetField('field_real', 4.56) f.SetField('field_datetime', '2015/06/30 12:34:56') f.SetField('field_datetime2', '2015/06/30 12:34:56') f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 1)')) lyr.CreateFeature(f) f = None # Transition from BoundCopy to UnboundCopy f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 1)')) lyr.CreateFeature(f) f = None lyr.SyncToDisk() oci_ds2 = ogr.Open(os.environ['OCI_DSNAME']) lyr = oci_ds2.GetLayerByName('ogr_oci_21') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_string')).GetDefault() == "'a''b'" assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_int')).GetDefault() == '123' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_real')).GetDefault() == '1.23' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nodefault')).GetDefault() is None assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime')).GetDefault() == 'CURRENT_TIMESTAMP' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_datetime2')).GetDefault() == "'2015/06/30 12:34:56'" # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault() != "CURRENT_DATE": # gdaltest.post_reason('fail') # print(lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_date')).GetDefault()) # return 'fail' # if lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_time')).GetDefault() != "CURRENT_TIME": # gdaltest.post_reason('fail') # return 'fail' f = lyr.GetNextFeature() if f.GetField('field_string') != 'c': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('field_string') != 'a\'b' or f.GetField('field_int') != 123 or \ f.GetField('field_real') != 1.23 or \ not f.IsFieldNull('field_nodefault') or not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56': f.DumpReadable() pytest.fail() gdal.Unlink('/vsimem/ogr_gpkg_24.gpkg') ############################################################################### # def test_ogr_oci_cleanup(): if gdaltest.oci_ds is None: pytest.skip() gdaltest.oci_ds.ExecuteSQL('DELLAYER:tpoly') gdaltest.oci_ds.ExecuteSQL('DELLAYER:xpoly') gdaltest.oci_ds.ExecuteSQL('DELLAYER:testsrs') gdaltest.oci_ds.ExecuteSQL('DELLAYER:testsrs2') gdaltest.oci_ds.ExecuteSQL('drop table geom_test') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_POINT') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_POINT3') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_LINESTRING') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_LINESTRING3') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_POLYGON') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_POLYGON3') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_MULTIPOINT') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_MULTILINESTRING') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_MULTIPOLYGON') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_GEOMETRYCOLLECTION') gdaltest.oci_ds.ExecuteSQL('DELLAYER:test_NONE') gdaltest.oci_ds.ExecuteSQL('DELLAYER:testdate') gdaltest.oci_ds.ExecuteSQL('DELLAYER:ogr_oci_20') gdaltest.oci_ds.ExecuteSQL('DELLAYER:ogr_oci_20bis') gdaltest.oci_ds.ExecuteSQL('DELLAYER:ogr_oci_21') gdaltest.oci_ds.Destroy() gdaltest.oci_ds = None gdaltest.shp_ds = None gdalautotest-3.1.2/ogr/ogr_feature.py0000775000175000017500000007333213701060011016336 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_mem.py 23065 2011-09-05 20:41:03Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR Feature facilities, particularly SetFrom() # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2011, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal from osgeo import ogr import gdaltest import pytest ############################################################################### # Create a destination feature type with one field for each field in the source # feature, with the same names, but all the field types of a specific type. def mk_dst_feature(src_feature, field_type): dst_feat_defn = ogr.FeatureDefn('dst') src_feat_defn = src_feature.GetDefnRef() for i in range(src_feat_defn.GetFieldCount()): src_field_defn = src_feat_defn.GetFieldDefn(i) dst_field_defn = ogr.FieldDefn(src_field_defn.GetName(), field_type) dst_feat_defn.AddFieldDefn(dst_field_defn) return ogr.Feature(dst_feat_defn) ############################################################################### # Create a source feature def mk_src_feature(): feat_def = ogr.FeatureDefn('src') field_def = ogr.FieldDefn('field_integer', ogr.OFTInteger) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_integer64', ogr.OFTInteger64) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_real', ogr.OFTReal) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_string', ogr.OFTString) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_binary', ogr.OFTBinary) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_date', ogr.OFTDate) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_time', ogr.OFTTime) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_integerlist', ogr.OFTIntegerList) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_integer64list', ogr.OFTInteger64List) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_reallist', ogr.OFTRealList) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_stringlist', ogr.OFTStringList) feat_def.AddFieldDefn(field_def) src_feature = ogr.Feature(feat_def) src_feature.SetField('field_integer', 17) src_feature.SetField('field_integer64', 9876543210) src_feature.SetField('field_real', 18.4) src_feature.SetField('field_string', 'abc def') src_feature.SetFieldBinaryFromHexString('field_binary', '0123465789ABCDEF') src_feature.SetField('field_date', '2011/11/11') src_feature.SetField('field_time', '14:10:35') src_feature.SetField('field_datetime', 2011, 11, 11, 14, 10, 35.123, 0) got_vals = src_feature.GetFieldAsDateTime(feat_def.GetFieldIndex('field_datetime')) expected_vals = [2011, 11, 11, 14, 10, 35.123, 0] for i, exp_val in enumerate(expected_vals): if got_vals[i] != pytest.approx(exp_val, abs=1e-4): print(got_vals) print(expected_vals) src_feature.field_integerlist = '(3:10,20,30)' src_feature.field_integer64list = [9876543210] src_feature.field_reallist = [123.5, 567.0] src_feature.field_stringlist = ['abc', 'def'] return src_feature ############################################################################### # Helper function to check a single field value def check(feat, fieldname, value): if feat.GetField(fieldname) != value: gdaltest.post_reason('did not get value %s for field %s, got %s.' % (str(value), fieldname, str(feat.GetField(fieldname))), frames=3) feat.DumpReadable() return 0 return 1 ############################################################################### # Copy to Integer def test_ogr_feature_cp_integer(): src_feature = mk_src_feature() src_feature.field_integerlist = [15] src_feature.field_reallist = [17.5] dst_feature = mk_dst_feature(src_feature, ogr.OFTInteger) gdal.PushErrorHandler() dst_feature.SetFrom(src_feature) gdal.PopErrorHandler() assert check(dst_feature, 'field_integer', 17) assert check(dst_feature, 'field_integer64', 2147483647) assert check(dst_feature, 'field_real', 18) assert check(dst_feature, 'field_string', 0) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', 15) assert check(dst_feature, 'field_integer64list', 2147483647) assert check(dst_feature, 'field_reallist', 17) assert check(dst_feature, 'field_stringlist', None) vals = [] for val in dst_feature: vals.append(val) assert (vals == [17, 2147483647, 18, 0, None, None, None, None, 15, 2147483647, 17, None]) ############################################################################### # Copy to Integer64 def test_ogr_feature_cp_integer64(): src_feature = mk_src_feature() src_feature.field_integerlist = [15] src_feature.field_reallist = [17.5] dst_feature = mk_dst_feature(src_feature, ogr.OFTInteger64) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', 17) assert check(dst_feature, 'field_integer64', 9876543210) gdal.PushErrorHandler() int32_ovflw = dst_feature.GetFieldAsInteger('field_integer64') gdal.PopErrorHandler() assert int32_ovflw == 2147483647 assert check(dst_feature, 'field_real', 18) assert check(dst_feature, 'field_string', 0) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', 15) assert check(dst_feature, 'field_integer64list', 9876543210) assert check(dst_feature, 'field_reallist', 17) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to Real def test_ogr_feature_cp_real(): src_feature = mk_src_feature() src_feature.field_integerlist = [15] src_feature.field_reallist = [17.5] dst_feature = mk_dst_feature(src_feature, ogr.OFTReal) with gdaltest.error_handler(): dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', 17.0) assert check(dst_feature, 'field_real', 18.4) assert check(dst_feature, 'field_string', 0) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', 15.0) assert check(dst_feature, 'field_reallist', 17.5) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to String def test_ogr_feature_cp_string(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTString) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', '17') assert check(dst_feature, 'field_integer64', '9876543210') assert check(dst_feature, 'field_real', '18.4') assert check(dst_feature, 'field_string', 'abc def') assert check(dst_feature, 'field_binary', '0123465789ABCDEF') assert check(dst_feature, 'field_date', '2011/11/11') assert check(dst_feature, 'field_time', '14:10:35') assert check(dst_feature, 'field_datetime', '2011/11/11 14:10:35.123') assert check(dst_feature, 'field_integerlist', '(3:10,20,30)') assert check(dst_feature, 'field_integer64list', '(1:9876543210)') assert check(dst_feature, 'field_reallist', '(2:123.5,567)') assert check(dst_feature, 'field_stringlist', '(2:abc,def)') ############################################################################### # Copy to Binary def test_ogr_feature_cp_binary(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTBinary) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', None) assert check(dst_feature, 'field_integer64', None) assert check(dst_feature, 'field_real', None) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', '0123465789ABCDEF') expected = '\x01\x23\x46\x57\x89\xAB\xCD\xEF' if sys.version_info >= (3, 0, 0): expected = expected.encode('LATIN1') assert dst_feature.GetFieldAsBinary('field_binary') == expected assert dst_feature.GetFieldAsBinary(dst_feature.GetDefnRef().GetFieldIndex('field_binary')) == expected assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', None) assert check(dst_feature, 'field_integer64list', None) assert check(dst_feature, 'field_reallist', None) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to date def test_ogr_feature_cp_date(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTDate) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', None) assert check(dst_feature, 'field_integer64', None) assert check(dst_feature, 'field_real', None) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', '2011/11/11') assert check(dst_feature, 'field_time', '0000/00/00') assert check(dst_feature, 'field_datetime', '2011/11/11') assert check(dst_feature, 'field_integerlist', None) assert check(dst_feature, 'field_integer64list', None) assert check(dst_feature, 'field_reallist', None) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to time def test_ogr_feature_cp_time(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTTime) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', None) assert check(dst_feature, 'field_integer64', None) assert check(dst_feature, 'field_real', None) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', '00:00:00') assert check(dst_feature, 'field_time', '14:10:35') assert check(dst_feature, 'field_datetime', '14:10:35.123') assert check(dst_feature, 'field_integerlist', None) assert check(dst_feature, 'field_integer64list', None) assert check(dst_feature, 'field_reallist', None) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to datetime def test_ogr_feature_cp_datetime(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTDateTime) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', None) assert check(dst_feature, 'field_integer64', None) assert check(dst_feature, 'field_real', None) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', '2011/11/11 00:00:00') assert check(dst_feature, 'field_time', '0000/00/00 14:10:35') assert check(dst_feature, 'field_datetime', '2011/11/11 14:10:35.123') assert check(dst_feature, 'field_integerlist', None) assert check(dst_feature, 'field_integer64list', None) assert check(dst_feature, 'field_reallist', None) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to integerlist def test_ogr_feature_cp_integerlist(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTIntegerList) gdal.PushErrorHandler() dst_feature.SetFrom(src_feature) gdal.PopErrorHandler() assert check(dst_feature, 'field_integer', [17]) assert check(dst_feature, 'field_integer64', [2147483647]) assert check(dst_feature, 'field_real', [18]) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', [10, 20, 30]) assert check(dst_feature, 'field_integer64list', [2147483647]) assert check(dst_feature, 'field_reallist', [123, 567]) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to integer64list def test_ogr_feature_cp_integer64list(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTInteger64List) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', [17]) assert check(dst_feature, 'field_integer64', [9876543210]) assert check(dst_feature, 'field_real', [18]) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', [10, 20, 30]) assert check(dst_feature, 'field_integer64list', [9876543210]) assert check(dst_feature, 'field_reallist', [123, 567]) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to reallist def test_ogr_feature_cp_reallist(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTRealList) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', [17.0]) assert check(dst_feature, 'field_integer64', [9876543210.0]) assert check(dst_feature, 'field_real', [18.4]) assert check(dst_feature, 'field_string', None) assert check(dst_feature, 'field_binary', None) assert check(dst_feature, 'field_date', None) assert check(dst_feature, 'field_time', None) assert check(dst_feature, 'field_datetime', None) assert check(dst_feature, 'field_integerlist', [10.0, 20.0, 30.0]) assert check(dst_feature, 'field_integer64list', [9876543210.0]) assert check(dst_feature, 'field_reallist', [123.5, 567.0]) assert check(dst_feature, 'field_stringlist', None) ############################################################################### # Copy to stringlist def test_ogr_feature_cp_stringlist(): src_feature = mk_src_feature() dst_feature = mk_dst_feature(src_feature, ogr.OFTStringList) dst_feature.SetFrom(src_feature) assert check(dst_feature, 'field_integer', ["17"]) assert check(dst_feature, 'field_integer64', ["9876543210"]) assert check(dst_feature, 'field_real', ["18.4"]) assert check(dst_feature, 'field_string', ['abc def']) assert check(dst_feature, 'field_binary', ['0123465789ABCDEF']) assert check(dst_feature, 'field_date', ['2011/11/11']) assert check(dst_feature, 'field_time', ['14:10:35']) assert check(dst_feature, 'field_datetime', ['2011/11/11 14:10:35.123']) assert check(dst_feature, 'field_integerlist', ['10', '20', '30']) assert check(dst_feature, 'field_integer64list', ['9876543210']) assert check(dst_feature, 'field_reallist', ['123.5', '567']) assert check(dst_feature, 'field_stringlist', ['abc', 'def']) ############################################################################### # Test SetField() / GetField() with unicode string def test_ogr_feature_unicode(): if sys.version_info >= (3, 0, 0): pytest.skip() feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_integer64', ogr.OFTInteger64) feat_def.AddFieldDefn(field_def) src_feature = ogr.Feature(feat_def) src_feature.SetField('field_string', 'abc def'.decode('utf-8')) assert src_feature.GetField('field_string') == 'abc def' assert src_feature.GetField('field_string'.decode('utf-8')) == 'abc def' src_feature = ogr.Feature(feat_def) src_feature.SetField('field_string'.decode('utf-8'), 'abc def'.decode('utf-8')) assert src_feature.GetField('field_string') == 'abc def' src_feature = ogr.Feature(feat_def) src_feature.SetField('field_integer64'.decode('utf-8'), 1) assert src_feature.GetField('field_integer64') == 1 ############################################################################### # Test 64bit FID def test_ogr_feature_64bit_fid(): feat_def = ogr.FeatureDefn('test') f = ogr.Feature(feat_def) f.SetFID(123456789012345) assert f.GetFID() == 123456789012345 ############################################################################### # Test 64bit integer def test_ogr_feature_overflow_64bit_integer(): feat_def = ogr.FeatureDefn('test') feat_def.AddFieldDefn(ogr.FieldDefn('test', ogr.OFTInteger64)) f = ogr.Feature(feat_def) gdal.PushErrorHandler() f.SetField(0, '9999999999999999999') gdal.PopErrorHandler() if f.GetField(0) != 9223372036854775807: f.DumpReadable() pytest.fail() gdal.PushErrorHandler() f.SetField(0, '-9999999999999999999') gdal.PopErrorHandler() if f.GetField(0) != -9223372036854775808: f.DumpReadable() pytest.fail() ############################################################################### # Test SetNullable(), IsNullable() and Validate() def test_ogr_feature_nullable_validate(): # No fields feat_def = ogr.FeatureDefn('test') f = ogr.Feature(feat_def) assert f.Validate() == 1 # Field with default parameter and empty feature feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) assert field_def.IsNullable() == 1 assert feat_def.GetGeomFieldDefn(0).IsNullable() == 1 feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) assert f.Validate() == 1 # Field with not NULL constraint and empty feature feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) field_def.SetNullable(0) assert field_def.IsNullable() == 0 feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) gdal.PushErrorHandler() ret = f.Validate() gdal.PopErrorHandler() assert ret == 0 # Field with not NULL constraint and non-empty feature feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) field_def.SetNullable(0) feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetField(0, 'foo') assert f.Validate() == 1 # Field with width constraint that is met feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) field_def.SetWidth(3) feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetField(0, 'foo') assert f.Validate() == 1 # Field with width constraint that is not met feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) field_def.SetWidth(2) feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetField(0, 'foo') gdal.PushErrorHandler() ret = f.Validate() gdal.PopErrorHandler() assert ret == 0 # Geometry field with not-null geometry constraint that is met feat_def = ogr.FeatureDefn('test') feat_def.SetGeomType(ogr.wkbNone) gfield_def = ogr.GeomFieldDefn('test', ogr.wkbUnknown) gfield_def.SetNullable(0) assert gfield_def.IsNullable() == 0 feat_def.AddGeomFieldDefn(gfield_def) f = ogr.Feature(feat_def) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) assert f.Validate() == 1 # Geometry field with not-null geometry constraint that is not met feat_def = ogr.FeatureDefn('test') feat_def.SetGeomType(ogr.wkbNone) gfield_def = ogr.GeomFieldDefn('test', ogr.wkbPoint) gfield_def.SetNullable(0) feat_def.AddGeomFieldDefn(gfield_def) f = ogr.Feature(feat_def) gdal.PushErrorHandler() ret = f.Validate() gdal.PopErrorHandler() assert ret == 0 # Geometry field with Point geometry type that is met feat_def = ogr.FeatureDefn('test') feat_def.SetGeomType(ogr.wkbPoint) f = ogr.Feature(feat_def) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) assert f.Validate() == 1 # Geometry field with LineString geometry type that is not met feat_def = ogr.FeatureDefn('test') feat_def.SetGeomType(ogr.wkbLineString) f = ogr.Feature(feat_def) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 1)')) gdal.PushErrorHandler() ret = f.Validate() gdal.PopErrorHandler() assert ret == 0 ############################################################################### # Test SetDefault(), GetDefault(), IsDefaultDriverSpecific() and FillUnsetWithDefault() def test_ogr_feature_default(): feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) assert field_def.GetDefault() is None assert not field_def.IsDefaultDriverSpecific() field_def.SetDefault("(some_expr)") assert field_def.GetDefault() == "(some_expr)" assert field_def.IsDefaultDriverSpecific() field_def.SetDefault("'a") assert field_def.GetDefault() == "'a" gdal.PushErrorHandler() field_def.SetDefault("'a''") gdal.PopErrorHandler() assert field_def.GetDefault() is None gdal.PushErrorHandler() field_def.SetDefault("'a'b'") gdal.PopErrorHandler() assert field_def.GetDefault() is None field_def.SetDefault("'a''b'''") assert field_def.GetDefault() == "'a''b'''" assert not field_def.IsDefaultDriverSpecific() feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_datetime', ogr.OFTDateTime) field_def.SetDefault("CURRENT_TIMESTAMP") feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_datetime2', ogr.OFTDateTime) field_def.SetDefault("'2015/06/30 12:34:56'") feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_int', ogr.OFTInteger) field_def.SetDefault('123') feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_nodefault', ogr.OFTInteger) feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.FillUnsetWithDefault() if f.GetField('field_string') != 'a\'b\'' or \ not f.IsFieldSet('field_datetime') or \ f.GetField('field_datetime2') != '2015/06/30 12:34:56+00' or \ f.GetField('field_int') != 123 or \ f.IsFieldSet('field_nodefault'): f.DumpReadable() pytest.fail() f = ogr.Feature(feat_def) f.SetField('field_string', 'b') f.FillUnsetWithDefault() if f.GetField('field_string') != 'b': f.DumpReadable() pytest.fail() ############################################################################### # Test GetNativeData(), SetNativeData(), GetNativeMediaType(), SetNativeMediaType(): def test_ogr_feature_native_data(): feat_def = ogr.FeatureDefn('test') f = ogr.Feature(feat_def) assert f.GetNativeData() is None assert f.GetNativeMediaType() is None f.SetNativeData('native_data') assert f.GetNativeData() == 'native_data' f.SetNativeMediaType('native_media_type') assert f.GetNativeMediaType() == 'native_media_type' f2 = ogr.Feature(feat_def) f2.SetFrom(f) assert f2.GetNativeData() == 'native_data' assert f2.GetNativeMediaType() == 'native_media_type' f_clone = f.Clone() assert f_clone.GetNativeData() == 'native_data' assert f_clone.GetNativeMediaType() == 'native_media_type' f_clone.SetNativeData(None) f_clone.SetNativeMediaType(None) assert f_clone.GetNativeData() is None assert f_clone.GetNativeMediaType() is None ds = ogr.GetDriverByName('Memory').CreateDataSource('') lyr = ds.CreateLayer('test') lyr.SetMetadataItem('NATIVE_DATA', 'native_data', 'NATIVE_DATA') lyr.SetMetadataItem('NATIVE_MEDIA_TYPE', 'native_media_type', 'NATIVE_DATA') f = ogr.Feature(lyr.GetLayerDefn()) f.SetNativeData('native_data') f.SetNativeMediaType('native_media_type') lyr.CreateFeature(f) f = None dialects = ['OGR_SQL'] if gdal.GetDriverByName('SQLITE') is not None: dialects += ['OGR_SQLITE'] for dialect in dialects: sql_lyr = ds.ExecuteSQL('SELECT * FROM %s' % lyr.GetName(), dialect=dialect) native_data = sql_lyr.GetMetadataItem('NATIVE_DATA', 'NATIVE_DATA') assert native_data == 'native_data', dialect native_media_type = sql_lyr.GetMetadataItem('NATIVE_MEDIA_TYPE', 'NATIVE_DATA') assert native_media_type == 'native_media_type', dialect f = sql_lyr.GetNextFeature() assert f.GetNativeData() == 'native_data', dialect assert f.GetNativeMediaType() == 'native_media_type', dialect ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test assigning our geometry to ourselves def test_ogr_feature_set_geometry_self(): feat_def = ogr.FeatureDefn('test') f = ogr.Feature(feat_def) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (2 49)')) f.SetGeometryDirectly(f.GetGeometryRef()) f.SetGeometryDirectly(f.GetGeometryRef()) f.SetGeometry(f.GetGeometryRef()) f.SetGeometry(f.GetGeometryRef()) assert f.GetGeometryRef().ExportToWkt() == 'POINT (2 49)' ############################################################################### # Test SetFieldNull(), IsFieldNull() def test_ogr_feature_null_field(): feat_def = ogr.FeatureDefn('test') field_def = ogr.FieldDefn('field_string', ogr.OFTString) feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) assert not f.IsFieldNull(feat_def.GetFieldIndex("field_string")) assert not f.IsFieldNull("field_string") f.SetFieldNull(feat_def.GetFieldIndex("field_string")) assert f.IsFieldNull(feat_def.GetFieldIndex("field_string")) != 0 f.SetField("field_string", "foo") assert not f.IsFieldNull("field_string") f.SetFieldNull("field_string") assert f.IsFieldNull(feat_def.GetFieldIndex("field_string")) != 0 f = None field_def = ogr.FieldDefn('field_binary', ogr.OFTBinary) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_integerlist', ogr.OFTIntegerList) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_integer64list', ogr.OFTInteger64List) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_reallist', ogr.OFTRealList) feat_def.AddFieldDefn(field_def) field_def = ogr.FieldDefn('field_stringlist', ogr.OFTStringList) feat_def.AddFieldDefn(field_def) f = ogr.Feature(feat_def) f.SetFieldBinaryFromHexString('field_binary', '0123465789ABCDEF') f.field_integerlist = '(3:10,20,30)' f.field_integer64list = [9876543210] f.field_reallist = [123.5, 567.0] f.field_stringlist = ['abc', 'def'] assert f.IsFieldNull('field_binary') == 0 assert f.IsFieldNull('field_integerlist') == 0 assert f.IsFieldNull('field_integer64list') == 0 assert f.IsFieldNull('field_reallist') == 0 assert f.IsFieldNull('field_stringlist') == 0 f.SetField('field_binary', None) f.SetFieldNull('field_integerlist') f.SetFieldNull('field_integer64list') f.SetFieldNull('field_reallist') f.SetFieldNull('field_stringlist') assert f.IsFieldNull('field_binary') != 0 assert f.IsFieldNull('field_integerlist') != 0 assert f.IsFieldNull('field_integer64list') != 0 assert f.IsFieldNull('field_reallist') != 0 assert f.IsFieldNull('field_stringlist') != 0 f_clone = f.Clone() assert f_clone.IsFieldNull('field_binary') != 0 assert f.Equal(f_clone) f = None def test_ogr_feature_cleanup(): gdaltest.src_feature = None gdalautotest-3.1.2/ogr/ogr_csw.py0000775000175000017500000011027413701060011015474 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_csw.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: CSW driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest import gdaltest from osgeo import ogr from osgeo import gdal ############################################################################### # Test underlying OGR drivers # pytestmark = pytest.mark.require_driver('CSW') @pytest.fixture(autouse=True, scope='module') def ogr_csw_init(): gdaltest.csw_drv = ogr.GetDriverByName('CSW') gml_ds = ogr.Open('data/ionic_wfs.gml') if gml_ds is None: gdaltest.csw_drv = None if gdal.GetLastErrorMsg().find('Xerces') != -1: pytest.skip() pytest.skip('failed to open test file.') ############################################################################### # Test reading a pyCSW server @pytest.mark.skip() def test_ogr_csw_pycsw(): ds = ogr.Open('CSW:http://catalog.data.gov/csw') if ds is None: if gdaltest.gdalurlopen('http://catalog.data.gov/csw') is None: pytest.skip('cannot open URL') pytest.skip('did not managed to open CSW datastore') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f is not None, 'did not get expected layer name' ############################################################################### def test_ogr_csw_vsimem_fail_because_not_enabled(): gdal.PushErrorHandler() ds = ogr.Open('CSW:/vsimem/csw_endpoint') gdal.PopErrorHandler() assert ds is None ############################################################################### def test_ogr_csw_vsimem_fail_because_no_get_capabilities(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.PushErrorHandler() ds = ogr.Open('CSW:/vsimem/csw_endpoint') gdal.PopErrorHandler() assert ds is None ############################################################################### def test_ogr_csw_vsimem_fail_because_empty_response(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/csw_endpoint?SERVICE=CSW&REQUEST=GetCapabilities', '') gdal.PushErrorHandler() ds = ogr.Open('CSW:/vsimem/csw_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Empty content returned by server') >= 0 ############################################################################### def test_ogr_csw_vsimem_fail_because_no_CSW_Capabilities(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/csw_endpoint?SERVICE=CSW&REQUEST=GetCapabilities', '') gdal.PushErrorHandler() ds = ogr.Open('CSW:/vsimem/csw_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Cannot find Capabilities.version') >= 0 ############################################################################### def test_ogr_csw_vsimem_fail_because_exception(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/csw_endpoint?SERVICE=CSW&REQUEST=GetCapabilities', '') gdal.PushErrorHandler() ds = ogr.Open('CSW:/vsimem/csw_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Error returned by server : ') >= 0 ############################################################################### def test_ogr_csw_vsimem_fail_because_invalid_xml_capabilities(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/csw_endpoint?SERVICE=CSW&REQUEST=GetCapabilities', '= 0 ############################################################################### def test_ogr_csw_vsimem_fail_because_missing_version(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/csw_endpoint?SERVICE=CSW&REQUEST=GetCapabilities', """ """) gdal.PushErrorHandler() ds = ogr.Open('CSW:/vsimem/csw_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Cannot find Capabilities.version') >= 0 ############################################################################### def test_ogr_csw_vsimem_csw_minimal_instance(): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') # Invalid response, but enough for use gdal.FileFromMemBuffer('/vsimem/csw_endpoint?SERVICE=CSW&REQUEST=GetCapabilities', """ """) ds = ogr.Open('CSW:/vsimem/csw_endpoint') assert ds is not None ds.TestCapability('foo') assert ds.GetLayerCount() == 1 assert ds.GetLayer(-1) is None and ds.GetLayer(1) is None lyr = ds.GetLayer(0) lyr.TestCapability('foo') gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 0 gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") lyr.ResetReading() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None and gdal.GetLastErrorMsg().find('Empty content returned by server') >= 0 gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """= 0 gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") lyr.ResetReading() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None and gdal.GetLastErrorMsg().find('Error: cannot parse') >= 0 gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") lyr.ResetReading() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None and gdal.GetLastErrorMsg().find('Error returned by server') >= 0 gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """ an_identifier another_identifier a_title dataset a_subject another_subject http://foo/ http://bar/ 2015-04-27 an_abstract 2015-04-27 eng a_format another_format -90 -180 90 180 """) lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None if f['identifier'] != 'an_identifier' or f['other_identifiers'] != ['another_identifier'] or \ f['subject'] != 'a_subject' or f['other_subjects'] != ['another_subject'] or \ f['references'] != 'http://foo/' or f['other_references'] != ['http://bar/'] or \ f['format'] != 'a_format' or f['other_formats'] != ['another_format'] or \ f['boundingbox'].ExportToWkt() != 'POLYGON ((-180 -90,-180 90,180 90,180 -90,-180 -90))': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() assert f is not None gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2 lyr.ResetReading() f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """ """) f = lyr.GetNextFeature() assert f is not None f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """ """) f = lyr.GetNextFeature() assert f is None gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 3, gdal.GetLastErrorMsg() gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 3, gdal.GetLastErrorMsg() gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 3, gdal.GetLastErrorMsg() gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """""") gdal.PushErrorHandler() fc = lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 3, gdal.GetLastErrorMsg() gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """ """) fc = lyr.GetFeatureCount() assert fc == 200 lyr.SetAttributeFilter("identifier = 'an_identifier'") lyr.SetSpatialFilterRect(-180, -90, 180, 90) gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=fullows:BoundingBox-90 -18090 180dc:identifieran_identifier""", """ """) f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=fullows:BoundingBox-90 -18090 180dc:identifieran_identifier""", """ """) fc = lyr.GetFeatureCount() assert fc == 300 lyr.SetAttributeFilter("identifier = 'an_identifier' AND " + "references = 'http://foo/' AND " + "anytext LIKE '%%foo%%' AND " + "other_identifiers = '' AND " + "other_subjects = '' AND " + "other_formats = '' AND " + "other_references = '' AND " + "ST_Intersects(boundingbox, ST_MakeEnvelope(2,49,2,49,4326))") lyr.SetAttributeFilter(None) lyr.SetSpatialFilter(None) ############################################################################### def test_ogr_csw_vsimem_csw_output_schema_csw(): ds = gdal.OpenEx('CSW:/vsimem/csw_endpoint', open_options=['OUTPUT_SCHEMA=CSW']) lyr = ds.GetLayer(0) gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """full""", """""") lyr.ResetReading() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None gdal.FileFromMemBuffer("""/vsimem/csw_endpoint&POSTFIELDS=full""", """ -90 -180 90 180 """) lyr.ResetReading() f = lyr.GetNextFeature() if f['raw_xml'].find('full""", """ -180 180 -90 90 """) f = lyr.GetNextFeature() if f['raw_xml'].find('full""", """ -180 180 90 -90 """) f = lyr.GetNextFeature() if f['raw_xml'].find(' # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. ################################################################################ import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr import pytest ############################################################################### # Check driver existence. def test_ogr_cad_1(): gdaltest.cad_ds = None gdaltest.cad_dr = None gdaltest.cad_dr = ogr.GetDriverByName('CAD') if gdaltest.cad_dr is None: pytest.skip() ############################################################################### # Check driver properly opens simple file, reads correct feature (ellipse). def test_ogr_cad_2(): if gdaltest.cad_dr is None: pytest.skip() gdaltest.cad_ds = gdal.OpenEx('data/cad/ellipse_r2000.dwg', allowed_drivers=['CAD']) assert gdaltest.cad_ds is not None assert gdaltest.cad_ds.GetLayerCount() == 1, 'expected exactly one layer.' gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(0) assert gdaltest.cad_layer.GetName() == '0', \ 'layer name is expected to be default = 0.' defn = gdaltest.cad_layer.GetLayerDefn() assert defn.GetFieldCount() == 5, \ ('did not get expected number of fields in defn. got %d' % defn.GetFieldCount()) fc = gdaltest.cad_layer.GetFeatureCount() assert fc == 1, ('did not get expected feature count, got %d' % fc) gdaltest.cad_layer.ResetReading() feat = gdaltest.cad_layer.GetNextFeature() assert feat is not None, 'cad feature 0 get failed.' assert feat.cadgeom_type == 'CADEllipse', \ ('cad geometry type is wrong. Expected CADEllipse, got: %s' % feat.cadgeom_type) assert feat.GetFID() == 0, 'did not get expected FID for feature 0.' assert feat.thickness == 0, ('did not get expected thickness. expected 0, got: %f' % feat.thickness) assert feat.extentity_data is None, \ 'expected feature ExtendedEntityData to be null.' expected_style = 'PEN(c:#FFFFFFFF,w:5px)' assert feat.GetStyleString() == expected_style, \ ('got unexpected style string on feature 0:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) geom = feat.GetGeometryRef() assert geom is not None, 'cad geometry is None.' assert geom.GetGeometryType() == ogr.wkbLineString25D, \ 'did not get expected geometry type.' assert geom.GetPointCount() > 2, 'cad geometry is invalid' gdaltest.cad_ds = None ############################################################################### # Check proper read of 3 layers (one circle on each) with different parameters. def test_ogr_cad_3(): if gdaltest.cad_dr is None: pytest.skip() gdaltest.cad_ds = gdal.OpenEx('data/cad/triple_circles_r2000.dwg', allowed_drivers=['CAD']) assert gdaltest.cad_ds is not None assert gdaltest.cad_ds.GetLayerCount() == 3, 'expected 3 layers.' # test first layer and circle gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(0) assert gdaltest.cad_layer.GetName() == '0', \ 'layer name is expected to be default = 0.' defn = gdaltest.cad_layer.GetLayerDefn() assert defn.GetFieldCount() == 5, \ ('did not get expected number of fields in defn. got %d' % defn.GetFieldCount()) fc = gdaltest.cad_layer.GetFeatureCount() assert fc == 1, ('did not get expected feature count, got %d' % fc) gdaltest.cad_layer.ResetReading() feat = gdaltest.cad_layer.GetNextFeature() assert feat.cadgeom_type == 'CADCircle', \ ('cad geometry type is wrong. Expected CADCircle, got: %s' % feat.cadgeom_type) assert feat.thickness == 1.2, \ ('did not get expected thickness. expected 1.2, got: %f' % feat.thickness) assert feat.extentity_data is None, \ 'expected feature ExtendedEntityData to be null.' expected_style = 'PEN(c:#FFFFFFFF,w:5px)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string on feature 0:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbCircularStringZ, \ 'did not get expected geometry type.' # test second layer and circle gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(1) assert gdaltest.cad_layer.GetName() == '1', 'layer name is expected to be 1.' defn = gdaltest.cad_layer.GetLayerDefn() assert defn.GetFieldCount() == 5, \ ('did not get expected number of fields in defn. got %d' % defn.GetFieldCount()) fc = gdaltest.cad_layer.GetFeatureCount() assert fc == 1, ('did not get expected feature count, got %d' % fc) gdaltest.cad_layer.ResetReading() feat = gdaltest.cad_layer.GetNextFeature() assert feat.cadgeom_type == 'CADCircle', \ ('cad geometry type is wrong. Expected CADCircle, got: %s' % feat.cadgeom_type) assert feat.thickness == 0.8, \ ('did not get expected thickness. expected 0.8, got: %f' % feat.thickness) assert feat.extentity_data is None, \ 'expected feature ExtendedEntityData to be null.' expected_style = 'PEN(c:#FFFFFFFF,w:5px)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string on feature 0:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbCircularStringZ, \ 'did not get expected geometry type.' # test third layer and circle gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(2) assert gdaltest.cad_layer.GetName() == '2', 'layer name is expected to be 2.' defn = gdaltest.cad_layer.GetLayerDefn() assert defn.GetFieldCount() == 5, \ ('did not get expected number of fields in defn. got %d' % defn.GetFieldCount()) fc = gdaltest.cad_layer.GetFeatureCount() assert fc == 1, ('did not get expected feature count, got %d' % fc) gdaltest.cad_layer.ResetReading() feat = gdaltest.cad_layer.GetNextFeature() assert feat.cadgeom_type == 'CADCircle', \ ('cad geometry type is wrong. Expected CADCircle, got: %s' % feat.cadgeom_type) assert feat.thickness == 1.8, \ ('did not get expected thickness. expected 1.8, got: %f' % feat.thickness) assert feat.extentity_data is None, \ 'expected feature ExtendedEntityData to be null.' expected_style = 'PEN(c:#FFFFFFFF,w:5px)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string on feature 0:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbCircularStringZ, \ 'did not get expected geometry type.' gdaltest.cad_ds = None ############################################################################### # Check reading of a single point. def test_ogr_cad_4(): if gdaltest.cad_dr is None: pytest.skip() gdaltest.cad_ds = gdal.OpenEx('data/cad/point2d_r2000.dwg', allowed_drivers=['CAD']) assert gdaltest.cad_ds.GetLayerCount() == 1, 'expected exactly one layer.' gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(0) assert gdaltest.cad_layer.GetFeatureCount() == 1, 'expected exactly one feature.' feat = gdaltest.cad_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT (50 50 0)'), \ 'got feature which does not fit expectations.' gdaltest.cad_ds = None ############################################################################### # Check reading of a simple line. def test_ogr_cad_5(): if gdaltest.cad_dr is None: pytest.skip() gdaltest.cad_ds = gdal.OpenEx('data/cad/line_r2000.dwg', allowed_drivers=['CAD']) assert gdaltest.cad_ds.GetLayerCount() == 1, 'expected exactly one layer.' gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(0) assert gdaltest.cad_layer.GetFeatureCount() == 1, 'expected exactly one feature.' feat = gdaltest.cad_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'LINESTRING (50 50 0,100 100 0)'), \ 'got feature which does not fit expectations.' gdaltest.cad_ds = None ############################################################################### # Check reading of a text (point with attached 'text' attribute, and set up # OGR feature style string to LABEL. def test_ogr_cad_6(): if gdaltest.cad_dr is None: pytest.skip() gdaltest.cad_ds = gdal.OpenEx('data/cad/text_mtext_attdef_r2000.dwg', allowed_drivers=['CAD']) assert gdaltest.cad_ds.GetLayerCount() == 1, 'expected exactly one layer.' gdaltest.cad_layer = gdaltest.cad_ds.GetLayer(0) assert gdaltest.cad_layer.GetFeatureCount() == 3, ('expected 3 features, got: %d' % gdaltest.cad_layer.GetFeatureCount()) feat = gdaltest.cad_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT(0.7413 1.7794 0)') expected_style = 'LABEL(f:"Arial",t:"Русские буквы",c:#FFFFFFFF)' if feat.GetStyleString() != expected_style: gdaltest.post_reason('Got unexpected style string:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) return 'expected_fail' # cannot sure iconv is buildin ############################################################################### # Check MTEXT as TEXT geometry. def test_ogr_cad_7(): if gdaltest.cad_dr is None: pytest.skip() feat = gdaltest.cad_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT(2.8139 5.7963 0)') expected_style = 'LABEL(f:"Arial",t:"English letters",c:#FFFFFFFF)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) ############################################################################### # Check ATTDEF as TEXT geometry. def test_ogr_cad_8(): if gdaltest.cad_dr is None: pytest.skip() feat = gdaltest.cad_layer.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT(4.98953601938918 2.62670161690571 0)') expected_style = 'LABEL(f:"Arial",t:"TESTTAG",c:#FFFFFFFF)' assert feat.GetStyleString() == expected_style, \ ('Got unexpected style string:\n%s\ninstead of:\n%s.' % (feat.GetStyleString(), expected_style)) ############################################################################### # Open a not handled DWG version def test_ogr_cad_9(): if gdaltest.cad_dr is None: pytest.skip() with gdaltest.error_handler(): ds = gdal.OpenEx('data/AC1018_signature.dwg', allowed_drivers=['CAD']) assert ds is None msg = gdal.GetLastErrorMsg() assert 'does not support this version' in msg ############################################################################### # Cleanup def test_ogr_cad_cleanup(): gdaltest.cad_layer = None gdaltest.cad_ds = None gdalautotest-3.1.2/ogr/ogr_pythondrivers.py0000664000175000017500000001226613701060011017617 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_pythondrivers.py 7cf5b3a5f04481d17143138fd736e7eb9d757603 2019-11-16 00:04:12 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test Python drivers # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal from osgeo import ogr def test_pythondrivers_init(): with gdaltest.config_option('GDAL_PYTHON_DRIVER_PATH', 'data/pydrivers'): gdal.AllRegister() assert ogr.GetDriverByName('DUMMY') def test_pythondrivers_test_dummy(): assert not ogr.Open('UNRELATED:') ds = ogr.Open('DUMMY:') assert ds assert ds.GetLayerCount() == 1 assert not ds.GetLayer(-1) assert not ds.GetLayer(1) lyr = ds.GetLayer(0) assert lyr assert lyr.GetName() == 'my_layer' assert lyr.GetFIDColumn() == 'my_fid' assert lyr.GetLayerDefn() assert lyr.GetLayerDefn().GetFieldCount() == 13 assert lyr.GetLayerDefn().GetGeomFieldCount() == 1 assert lyr.GetFeatureCount() == 5 count = 0 for f in lyr: assert f.GetFID() == count + 1 assert f['boolField'] assert f['int16Field'] == 32767 assert f['int32Field'] == count + 2 assert f['int64Field'] == 1234567890123 assert f['realField'] == 1.23 assert f['floatField'] == 1.2 assert f['strField'] == 'foo' assert f['strNullField'] is None assert f.GetFieldAsBinary('binaryField') == b'\x01\x00\x02' assert f['timeField'] == '12:34:56.789' assert f['dateField'] == '2017/04/26' assert f['datetimeField'] == '2017/04/26 12:34:56.789+00' assert f.GetGeometryRef() count += 1 assert count == 5 assert lyr.TestCapability(ogr.OLCFastFeatureCount) assert lyr.GetFeature(1).GetFID() == 1 lyr.SetAttributeFilter('1 = 0') assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0 assert lyr.GetFeatureCount() == 0 count = 0 for f in lyr: count += 1 assert count == 0 lyr.SetAttributeFilter(None) lyr.SetSpatialFilter(ogr.CreateGeometryFromWkt('POINT (-100 -100)')) assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0 assert lyr.GetFeatureCount() == 0 count = 0 for f in lyr: count += 1 assert count == 0 lyr.SetSpatialFilter(None) def test_pythondrivers_missing_metadata(): count_before = gdal.GetDriverCount() with gdaltest.config_option('GDAL_PYTHON_DRIVER_PATH', 'data/pydrivers/missingmetadata'): with gdaltest.error_handler(): gdal.AllRegister() assert gdal.GetLastErrorMsg() != '' assert gdal.GetDriverCount() == count_before def test_pythondrivers_unsupported_api_version(): count_before = gdal.GetDriverCount() with gdaltest.config_option('GDAL_PYTHON_DRIVER_PATH', 'data/pydrivers/unsupportedapiversion'): gdal.AllRegister() assert gdal.GetDriverCount() == count_before def test_pythondrivers_no_driver_class(): with gdaltest.config_option('GDAL_PYTHON_DRIVER_PATH', 'data/pydrivers/nodriverclass'): gdal.AllRegister() drv = ogr.GetDriverByName('NO_DRIVER_CLASS') assert drv with gdaltest.error_handler(): ogr.Open('FOO:') assert gdal.GetLastErrorMsg() != '' with gdaltest.config_option('GDAL_SKIP', 'NO_DRIVER_CLASS'): gdal.AllRegister() def test_pythondrivers_missing_identify(): with gdaltest.config_option('GDAL_PYTHON_DRIVER_PATH', 'data/pydrivers/missingidentify'): gdal.AllRegister() drv = ogr.GetDriverByName('MISSING_IDENTIFY') assert drv with gdaltest.error_handler(): ogr.Open('FOO:') assert gdal.GetLastErrorMsg() != '' with gdaltest.config_option('GDAL_SKIP', 'MISSING_IDENTIFY'): gdal.AllRegister() def test_pythondrivers_cleanup(): with gdaltest.config_option('GDAL_SKIP', 'DUMMY'): gdal.AllRegister() assert not ogr.GetDriverByName('DUMMY') gdalautotest-3.1.2/ogr/ogr_rfc41.py0000775000175000017500000007363613701060011015631 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_rfc41.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC41 # Author: Even Rouault # ############################################################################### # Copyright (c) 2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest from ogr.ogr_sql_sqlite import require_ogr_sql_sqlite # noqa require_ogr_sql_sqlite; # to make pyflakes happy ############################################################################### # Test OGRGeomFieldDefn class def test_ogr_rfc41_1(): gfld_defn = ogr.GeomFieldDefn() # Check default values assert gfld_defn.GetName() == '' assert gfld_defn.GetType() == ogr.wkbUnknown assert gfld_defn.GetSpatialRef() is None assert gfld_defn.IsIgnored() == 0 # Test SetName() / GetName() gfld_defn.SetName('foo') assert gfld_defn.GetName() == 'foo' # Test SetType() / GetType() gfld_defn.SetType(ogr.wkbPoint) assert gfld_defn.GetType() == ogr.wkbPoint # Test SetSpatialRef() / GetSpatialRef() sr = osr.SpatialReference() gfld_defn.SetSpatialRef(sr) got_sr = gfld_defn.GetSpatialRef() assert got_sr.IsSame(sr) != 0 gfld_defn.SetSpatialRef(None) assert gfld_defn.GetSpatialRef() is None gfld_defn.SetSpatialRef(sr) # Test SetIgnored() / IsIgnored() gfld_defn.SetIgnored(1) assert gfld_defn.IsIgnored() == 1 # Test setting invalid value old_val = gfld_defn.GetType() gdal.PushErrorHandler('CPLQuietErrorHandler') gfld_defn.SetType(-3) gdal.PopErrorHandler() assert gfld_defn.GetType() == old_val gfld_defn = None ############################################################################### # Test OGRFeatureDefn methods related to OGRGeomFieldDefn class def test_ogr_rfc41_2(): # Check implicit geometry field creation feature_defn = ogr.FeatureDefn() assert feature_defn.GetGeomFieldCount() == 1 assert feature_defn.GetGeomType() == ogr.wkbUnknown # Test IsSame() assert feature_defn.IsSame(feature_defn) == 1 other_feature_defn = ogr.FeatureDefn() assert feature_defn.IsSame(other_feature_defn) == 1 other_feature_defn.GetGeomFieldDefn(0).SetSpatialRef(osr.SpatialReference()) assert feature_defn.IsSame(other_feature_defn) == 0 feature_defn.GetGeomFieldDefn(0).SetSpatialRef(osr.SpatialReference()) assert feature_defn.IsSame(other_feature_defn) == 1 other_feature_defn.GetGeomFieldDefn(0).SetSpatialRef(None) assert feature_defn.IsSame(other_feature_defn) == 0 feature_defn = None feature_defn = ogr.FeatureDefn() # Check changing geometry type feature_defn.SetGeomType(ogr.wkbPoint) assert feature_defn.GetGeomType() == ogr.wkbPoint assert feature_defn.GetGeomFieldDefn(0).GetType() == ogr.wkbPoint # Check setting to wkbNone and implicitly destroying the field. for _ in range(2): feature_defn.SetGeomType(ogr.wkbNone) assert feature_defn.GetGeomFieldCount() == 0 assert feature_defn.GetGeomType() == ogr.wkbNone # Recreate the field for t in [ogr.wkbPoint, ogr.wkbLineString]: feature_defn.SetGeomType(t) assert feature_defn.GetGeomFieldCount() == 1 assert feature_defn.GetGeomType() == t assert feature_defn.GetGeomFieldDefn(0).GetType() == t # Test setting invalid value old_val = feature_defn.GetGeomType() gdal.PushErrorHandler('CPLQuietErrorHandler') feature_defn.SetGeomType(-3) gdal.PopErrorHandler() assert feature_defn.GetGeomType() == old_val # Test SetIgnored() / IsIgnored() assert feature_defn.IsGeometryIgnored() == 0 assert feature_defn.GetGeomFieldDefn(0).IsIgnored() == 0 feature_defn.SetGeometryIgnored(1) assert feature_defn.IsGeometryIgnored() == 1 assert feature_defn.GetGeomFieldDefn(0).IsIgnored() == 1 # Test wrong index values for GetGeomFieldDefn() for idx in [-1, 1]: gdal.PushErrorHandler('CPLQuietErrorHandler') ret = feature_defn.GetGeomFieldDefn(idx) gdal.PopErrorHandler() assert ret is None # Test GetGeomFieldIndex() assert feature_defn.GetGeomFieldIndex("") == 0 assert feature_defn.GetGeomFieldIndex("invalid") == -1 # Test AddGeomFieldDefn() gfld_defn = ogr.GeomFieldDefn('polygon_field', ogr.wkbPolygon) feature_defn.AddGeomFieldDefn(gfld_defn) assert feature_defn.GetGeomFieldCount() == 2 assert feature_defn.GetGeomFieldIndex("polygon_field") == 1 assert feature_defn.GetGeomFieldDefn(1).GetName() == 'polygon_field' # Test DeleteGeomFieldDefn() : error cases assert feature_defn.DeleteGeomFieldDefn(-1) != 0 assert feature_defn.DeleteGeomFieldDefn(2) != 0 assert feature_defn.GetGeomFieldCount() == 2 # Test DeleteGeomFieldDefn() : valid cases assert feature_defn.DeleteGeomFieldDefn(0) == 0 assert feature_defn.GetGeomFieldCount() == 1 assert feature_defn.GetGeomFieldIndex("polygon_field") == 0 assert feature_defn.DeleteGeomFieldDefn(0) == 0 assert feature_defn.GetGeomFieldCount() == 0 assert feature_defn.IsSame(feature_defn) == 1 assert feature_defn.IsSame(ogr.FeatureDefn()) == 0 feature_defn = None ############################################################################### # Test OGRFeature methods def test_ogr_rfc41_3(): # Test with just one geometry field feature_defn = ogr.FeatureDefn() feature = ogr.Feature(feature_defn) assert feature.GetGeomFieldCount() == 1 assert feature.GetGeomFieldDefnRef(0).GetName() == '' assert feature.GetGeomFieldDefnRef(0).GetType() == ogr.wkbUnknown assert feature.GetGeomFieldIndex('') == 0 assert feature.GetGeomFieldIndex('non_existing') == -1 assert feature.GetGeomFieldRef(-1) is None assert feature.GetGeomFieldRef(0) is None assert feature.GetGeomFieldRef(1) is None feature_clone_without_geom = feature.Clone() assert feature.Equal(feature_clone_without_geom) assert feature.SetGeomField(0, ogr.Geometry(ogr.wkbPoint)) == 0 assert feature.GetGeomFieldRef(0).ExportToWkt() == 'POINT EMPTY' assert feature.Equal(feature.Clone()) assert not feature.Equal(feature_clone_without_geom) feature_clone_with_other_geom = feature.Clone() feature_clone_with_other_geom.SetGeometry(ogr.Geometry(ogr.wkbLineString)) assert not feature.Equal(feature_clone_with_other_geom) assert feature.SetGeomFieldDirectly(-1, None) != 0 assert feature.SetGeomFieldDirectly(0, ogr.Geometry(ogr.wkbLineString)) == 0 assert feature.GetGeomFieldRef(0).ExportToWkt() == 'LINESTRING EMPTY' feature_clone_with_geom = feature.Clone() assert feature.SetGeomFieldDirectly(0, None) == 0 assert feature.GetGeomFieldRef(0) is None assert not feature.Equal(feature_clone_with_geom) feature = None # Test one a feature with 0 geometry field feature_defn = ogr.FeatureDefn() feature_defn.SetGeomType(ogr.wkbNone) feature = ogr.Feature(feature_defn) assert feature.Equal(feature.Clone()) assert feature.GetGeomFieldCount() == 0 # This used to work before RFC 41, but it no longer will assert feature.SetGeometry(ogr.Geometry(ogr.wkbPoint)) != 0 assert feature.SetGeomField(0, ogr.Geometry(ogr.wkbPoint)) != 0 assert feature.GetGeometryRef() is None assert feature.GetGeomFieldRef(0) is None assert feature.SetGeometryDirectly(ogr.Geometry(ogr.wkbPoint)) != 0 assert feature.SetGeomFieldDirectly(0, ogr.Geometry(ogr.wkbPoint)) != 0 feature = None # Test one a feature with several geometry fields feature_defn = ogr.FeatureDefn() feature_defn.SetGeomType(ogr.wkbNone) gfld_defn = ogr.GeomFieldDefn('polygon_field', ogr.wkbPolygon) feature_defn.AddGeomFieldDefn(gfld_defn) gfld_defn = ogr.GeomFieldDefn('point_field', ogr.wkbPoint) feature_defn.AddGeomFieldDefn(gfld_defn) feature = ogr.Feature(feature_defn) feature.SetGeomField(0, ogr.Geometry(ogr.wkbPolygon)) feature.SetGeomField(1, ogr.Geometry(ogr.wkbPoint)) assert feature.GetGeomFieldRef(0).ExportToWkt() == 'POLYGON EMPTY' assert feature.GetGeomFieldRef(1).ExportToWkt() == 'POINT EMPTY' assert feature.Equal(feature.Clone()) other_feature = ogr.Feature(feature_defn) assert not feature.Equal(other_feature) other_feature.SetFrom(feature) assert feature.Equal(other_feature) # Test that in SetFrom() where target has a single geometry field, # we get the first geometry of the source even if we cannot find a # source geometry field with the right name. feature_defn_default = ogr.FeatureDefn() feature_default = ogr.Feature(feature_defn_default) feature_default.SetFrom(feature) assert feature_default.GetGeomFieldRef(0).ExportToWkt() == 'POLYGON EMPTY' ############################################################################### # Test OGRLayer methods def test_ogr_rfc41_4(): ds = ogr.GetDriverByName('memory').CreateDataSource('') assert ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) != 0 sr = osr.SpatialReference() lyr = ds.CreateLayer('test', geom_type=ogr.wkbPoint, srs=sr) assert lyr.TestCapability(ogr.OLCCreateGeomField) != 0 assert lyr.GetSpatialRef().IsSame(sr) != 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef().IsSame(sr) != 0 lyr.GetLayerDefn().GetGeomFieldDefn(0).SetName('a_name') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr.CreateFeature(feat) lyr.ResetReading() feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetSpatialReference().IsSame(sr) != 0 feat = None lyr.CreateGeomField(ogr.GeomFieldDefn('another_geom_field', ogr.wkbPolygon)) lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetGeomField(1, ogr.CreateGeometryFromWkt('POLYGON ((10 10,10 11,11 11,11 10,10 10))')) lyr.SetFeature(feat) lyr.ResetReading() feat = lyr.GetNextFeature() geom = feat.GetGeomFieldRef(0) assert geom.ExportToWkt() == 'POINT (1 2)' geom = feat.GetGeomFieldRef('another_geom_field') assert geom.ExportToWkt() == 'POLYGON ((10 10,10 11,11 11,11 10,10 10))' # Test GetExtent() got_extent = lyr.GetExtent(geom_field=1) assert got_extent == (10.0, 11.0, 10.0, 11.0) # Test invalid geometry field index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') got_extent = lyr.GetExtent(geom_field=2) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Test SetSpatialFilter() lyr.SetSpatialFilter(1, ogr.CreateGeometryFromWkt('POLYGON ((-10 10,-10 11,-11 11,-11 10,-10 10))')) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None lyr.SetSpatialFilter(1, ogr.CreateGeometryFromWkt('POLYGON ((10 10,10 11,11 11,11 10,10 10))')) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None lyr.SetSpatialFilterRect(1, 10, 10, 11, 11) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None # Test invalid spatial filter index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.SetSpatialFilterRect(2, 0, 0, 0, 0) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' lyr.SetSpatialFilter(None) another_lyr = ds.CopyLayer(lyr, 'dup_test') dup_feat = another_lyr.GetNextFeature() geom = dup_feat.GetGeomFieldRef('a_name') assert geom.ExportToWkt() == 'POINT (1 2)' geom = dup_feat.GetGeomFieldRef('another_geom_field') assert geom.ExportToWkt() == 'POLYGON ((10 10,10 11,11 11,11 10,10 10))' ############################################################################### # Test Python field accessors facilities def test_ogr_rfc41_5(): feature_defn = ogr.FeatureDefn() field_defn = ogr.FieldDefn('strfield', ogr.OFTString) feature_defn.AddFieldDefn(field_defn) feature_defn.GetGeomFieldDefn(0).SetName('geomfield') f = ogr.Feature(feature_defn) assert f['strfield'] is None assert f.strfield is None assert f['geomfield'] is None assert f.geomfield is None with pytest.raises(KeyError): f['nonexistent_field'] with pytest.raises(AttributeError): f.nonexistent_field with pytest.raises(KeyError): f['nonexistent_field'] = 'foo' # This works. Default Python behaviour. Stored in a dictionary f.nonexistent_field = 'bar' assert f.nonexistent_field == 'bar' f['strfield'] = 'foo' assert f['strfield'] == 'foo' assert f.strfield == 'foo' f.strfield = 'bar' assert f['strfield'] == 'bar' assert f.strfield == 'bar' wkt = 'POINT EMPTY' f['geomfield'] = ogr.CreateGeometryFromWkt(wkt) assert f['geomfield'].ExportToWkt() == wkt assert f.geomfield.ExportToWkt() == wkt wkt2 = 'POLYGON EMPTY' f.geomfield = ogr.CreateGeometryFromWkt(wkt2) assert f['geomfield'].ExportToWkt() == wkt2 assert f.geomfield.ExportToWkt() == wkt2 ############################################################################### # Test OGRSQL with geometries def test_ogr_rfc41_6(): ds = ogr.GetDriverByName('memory').CreateDataSource('') sr = osr.SpatialReference() lyr = ds.CreateLayer('poly', geom_type=ogr.wkbPolygon, srs=sr) lyr.GetLayerDefn().GetGeomFieldDefn(0).SetName('geomfield') lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('wkt', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('intfield', 1) feat.SetField('wkt', 'POINT (0 0)') feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON EMPTY')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None # Test implicit geometry column (since poly has one single geometry column) # then explicit geometry column for sql in ['SELECT intfield FROM poly', 'SELECT * FROM poly', 'SELECT intfield, geomfield FROM poly', 'SELECT geomfield, intfield FROM poly']: sql_lyr = ds.ExecuteSQL(sql) assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbPolygon assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef() is not None feat = sql_lyr.GetNextFeature() assert feat.GetField('intfield') == 1 assert feat.GetGeomFieldRef('geomfield') is not None feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('geomfield') is None feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(geometry_field AS GEOMETRY) sql_lyr = ds.ExecuteSQL('SELECT CAST(geomfield AS GEOMETRY) AS mygeom FROM poly WHERE CAST(geomfield AS GEOMETRY) IS NOT NULL') assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbUnknown assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef() is None feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom') is not None feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(xxx AS GEOMETRY(POLYGON)) sql_lyr = ds.ExecuteSQL('SELECT CAST(geomfield AS GEOMETRY(POLYGON)) AS mygeom FROM poly WHERE CAST(geomfield AS GEOMETRY(POLYGON)) IS NOT NULL') assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbPolygon assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef() is None feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom') is not None feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(xxx AS GEOMETRY(POLYGON,4326)) sql_lyr = ds.ExecuteSQL('SELECT CAST(geomfield AS GEOMETRY(POLYGON,4326)) AS mygeom FROM poly WHERE CAST(geomfield AS GEOMETRY(POLYGON,4326)) IS NOT NULL') assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbPolygon assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef().ExportToWkt().find('4326') >= 0 feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom') is not None feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(a_multipolygon AS GEOMETRY(POLYGON)) sql_lyr = ds.ExecuteSQL("SELECT CAST('MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))' AS GEOMETRY(POLYGON)) AS mygeom FROM poly") feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom').ExportToWkt() == 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(a_polygon AS GEOMETRY(MULTIPOLYGON)) sql_lyr = ds.ExecuteSQL("SELECT CAST('POLYGON ((0 0,0 1,1 1,1 0,0 0))' AS GEOMETRY(MULTIPOLYGON)) AS mygeom FROM poly") feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom').ExportToWkt() == 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))' feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(a_multilinestring AS GEOMETRY(LINESTRING)) sql_lyr = ds.ExecuteSQL("SELECT CAST('MULTILINESTRING ((0 0,0 1,1 1,1 0,0 0))' AS GEOMETRY(LINESTRING)) AS mygeom FROM poly") feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom').ExportToWkt() == 'LINESTRING (0 0,0 1,1 1,1 0,0 0)' feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(a_linestring AS GEOMETRY(MULTILINESTRING)) sql_lyr = ds.ExecuteSQL("SELECT CAST('LINESTRING (0 0,0 1,1 1,1 0,0 0)' AS GEOMETRY(MULTILINESTRING)) AS mygeom FROM poly") feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('mygeom').ExportToWkt() == 'MULTILINESTRING ((0 0,0 1,1 1,1 0,0 0))' feat = None ds.ReleaseResultSet(sql_lyr) # Test expression with cast CHARACTER <--> GEOMETRY sql_lyr = ds.ExecuteSQL('SELECT CAST(CAST(geomfield AS CHARACTER) AS GEOMETRY) AS mygeom, intfield FROM poly') assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbUnknown assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef() is None feat = sql_lyr.GetNextFeature() assert feat.GetField('intfield') == 1 assert feat.GetGeomFieldRef('mygeom') is not None feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(NULL AS GEOMETRY) sql_lyr = ds.ExecuteSQL('SELECT CAST(NULL AS GEOMETRY) FROM poly') assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbUnknown feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('') is None feat = None ds.ReleaseResultSet(sql_lyr) # Test CAST(stringfield AS GEOMETRY) sql_lyr = ds.ExecuteSQL('SELECT CAST(wkt AS GEOMETRY) FROM poly') assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbUnknown feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('wkt').ExportToWkt() == 'POINT (0 0)' feat = None ds.ReleaseResultSet(sql_lyr) # Test COUNT(geometry) sql_lyr = ds.ExecuteSQL('SELECT COUNT(geomfield) FROM poly') feat = sql_lyr.GetNextFeature() assert feat is not None assert feat.GetField(0) == 1 feat = None ds.ReleaseResultSet(sql_lyr) wrong_sql_list = [ ('SELECT DISTINCT geomfield FROM poly', 'SELECT DISTINCT on a geometry not supported'), ('SELECT COUNT(DISTINCT geomfield) FROM poly', 'SELECT COUNT DISTINCT on a geometry not supported'), ('SELECT MAX(geomfield) FROM poly', 'Use of field function MAX() on geometry field'), ('SELECT CAST(5 AS GEOMETRY) FROM poly', 'Cannot cast integer to geometry'), ('SELECT CAST(geomfield AS integer) FROM poly', 'Cannot cast geometry to integer'), ('SELECT CAST(geomfield AS GEOMETRY(2)) FROM poly', 'First argument of CAST operator should be a geometry type identifier'), ('SELECT CAST(geomfield AS GEOMETRY(UNSUPPORTED_TYPE)) FROM poly', 'SQL Expression Parsing Error: syntax error'), ('SELECT CAST(geomfield AS GEOMETRY(UNSUPPORTED_TYPE,5)) FROM poly', 'SQL Expression Parsing Error: syntax error'), ] for (sql, error_msg) in wrong_sql_list: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL(sql) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find(error_msg) == 0, \ ('For %s, expected error %s, got %s' % (sql, error_msg, gdal.GetLastErrorMsg())) assert sql_lyr is None # Test invalid expressions with geometry for sql in ["SELECT geomfield + 'a' FROM poly", "SELECT geomfield * 'a' FROM poly", "SELECT geomfield + 'a' FROM poly", "SELECT geomfield - 'a' FROM poly", "SELECT geomfield % 'a' FROM poly", "SELECT CONCAT(geomfield, 'a') FROM poly", "SELECT SUBSTR(geomfield, 0, 1) FROM poly", "SELECT * FROM poly WHERE geomfield = CAST('POINT EMPTY' AS GEOMETRY)", "SELECT * FROM poly WHERE geomfield LIKE 'a'", "SELECT * FROM poly WHERE geomfield IN( 'a' )"]: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr = ds.ExecuteSQL(sql) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Cannot use geometry field in this operation') == 0 assert sql_lyr is None # Test expression with geometry in WHERE sql_lyr = ds.ExecuteSQL('SELECT * FROM poly WHERE geomfield IS NOT NULL') feat = sql_lyr.GetNextFeature() assert feat.GetField('intfield') == 1 feat = sql_lyr.GetNextFeature() assert feat is None feat = None ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT * FROM poly WHERE geomfield IS NULL') feat = sql_lyr.GetNextFeature() assert not feat.IsFieldSet(0) feat = sql_lyr.GetNextFeature() assert feat is None feat = None ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL("SELECT * FROM poly WHERE CAST(geomfield AS CHARACTER) = 'POLYGON EMPTY'") feat = sql_lyr.GetNextFeature() assert feat is not None feat = sql_lyr.GetNextFeature() assert feat is None feat = None ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT count(*) FROM poly WHERE geomfield IS NULL') feat = sql_lyr.GetNextFeature() assert feat.GetField(0) == 1 feat = None ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT count(*) FROM poly WHERE geomfield IS NOT NULL') feat = sql_lyr.GetNextFeature() assert feat.GetField(0) == 1 feat = None ds.ReleaseResultSet(sql_lyr) # Test spatial filter feat = lyr.GetFeature(0) feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.SetFeature(feat) feat = None lyr.DeleteFeature(1) sql_lyr = ds.ExecuteSQL("SELECT * FROM poly") sql_lyr.SetSpatialFilterRect(0, 0, 0, 0) feat = sql_lyr.GetNextFeature() assert feat is None feat = None sql_lyr.SetSpatialFilterRect(0, 1, 2, 1, 2) feat = sql_lyr.GetNextFeature() assert feat is not None feat = None # Test invalid spatial filter index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr.SetSpatialFilterRect(2, 0, 0, 0, 0) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Test invalid geometry field index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') sql_lyr.GetExtent(geom_field=2) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' ds.ReleaseResultSet(sql_lyr) # Test querying several geometry fields sql_lyr = ds.ExecuteSQL('SELECT geomfield as geom1, geomfield as geom2 FROM poly') feat = sql_lyr.GetNextFeature() assert feat is not None assert feat.GetGeomFieldRef('geom1') is not None assert feat.GetGeomFieldRef('geom2') is not None feat = None ds.ReleaseResultSet(sql_lyr) # Test querying a layer with several geometry fields lyr.CreateGeomField(ogr.GeomFieldDefn('secondarygeom', ogr.wkbPoint)) lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetGeomField('secondarygeom', ogr.CreateGeometryFromWkt('POINT (10 100)')) lyr.SetFeature(feat) feat = None for sql in ['SELECT * FROM poly', 'SELECT geomfield, secondarygeom FROM poly', 'SELECT secondarygeom, geomfield FROM poly']: sql_lyr = ds.ExecuteSQL(sql) feat = sql_lyr.GetNextFeature() assert feat.GetGeomFieldRef('geomfield').ExportToWkt() == 'POINT (1 2)' assert feat.GetGeomFieldRef('secondarygeom').ExportToWkt() == 'POINT (10 100)' feat = None ds.ReleaseResultSet(sql_lyr) # Check that we don't get an implicit geometry field sql_lyr = ds.ExecuteSQL('SELECT intfield FROM poly') assert sql_lyr.GetLayerDefn().GetGeomFieldCount() == 0 ds.ReleaseResultSet(sql_lyr) # Check GetExtent() and SetSpatialFilter() sql_lyr = ds.ExecuteSQL('SELECT * FROM poly') assert sql_lyr.GetExtent(geom_field=0) == (1.0, 1.0, 2.0, 2.0) assert sql_lyr.GetExtent(geom_field=1) == (10.0, 10.0, 100.0, 100.0) sql_lyr.SetSpatialFilterRect(0, 0.5, 1.5, 1.5, 2.5) assert sql_lyr.GetFeatureCount() == 1 sql_lyr.SetSpatialFilterRect(0, 0, 0, 0.5, 0.5) assert sql_lyr.GetFeatureCount() == 0 sql_lyr.SetSpatialFilterRect(1, 9, 99, 11, 101) assert sql_lyr.GetFeatureCount() == 1 sql_lyr.SetSpatialFilterRect(1, 0, 0, 0.5, 0.5) assert sql_lyr.GetFeatureCount() == 0 ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test crazy OGRSQL def test_ogr_rfc41_7(): ds = ogr.Open('data') sql = "select eas_id, \"_ogr_geometry_\" as geom1, cast(null as geometry) as geom2, " + \ "'a', cast('POINT(3 4)' as geometry) as geom3, fid, \"_ogr_geometry_\" as geom4, " +\ "'c', p.eas_id, cast(area as integer) as area_int, \"_ogr_geometry_\", area from " +\ "poly join \"data\".poly p on poly.eas_id = p.eas_id" sql_lyr = ds.ExecuteSQL(sql) feat = sql_lyr.GetNextFeature() if feat.eas_id != 168 or \ feat.FIELD_2 != 'a' or \ feat.fid != 0 or \ feat.FIELD_4 != 'c' or \ feat['p.eas_id'] != 168 or \ feat.area_int != 215229 or \ feat.area != pytest.approx(215229.266, abs=1e-5) or \ feat.geom1.GetGeometryType() != ogr.wkbPolygon or \ feat.geom2 is not None or \ feat.geom3.GetGeometryType() != ogr.wkbPoint or \ feat.geom4.GetGeometryType() != ogr.wkbPolygon or \ feat['_ogr_geometry_'].GetGeometryType() != ogr.wkbPolygon: feat.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test SQLite dialect def test_ogr_rfc41_8(require_ogr_sql_sqlite): # noqa ds = ogr.GetDriverByName('memory').CreateDataSource('') lyr = ds.CreateLayer('mytable', geom_type=ogr.wkbPolygon) lyr.GetLayerDefn().GetGeomFieldDefn(0).SetName('geomfield') gfld_defn = ogr.GeomFieldDefn('geomfield2', ogr.wkbPoint25D) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) gfld_defn.SetSpatialRef(sr) lyr.CreateGeomField(gfld_defn) # Check that we get the geometry columns, even with no features sql_lyr = ds.ExecuteSQL('SELECT * FROM mytable', dialect='SQLite') assert sql_lyr.GetLayerDefn().GetGeomFieldCount() == 2 assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetType() == ogr.wkbPolygon assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(0).GetSpatialRef() is None assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(1).GetType() == ogr.wkbPoint25D srs = sql_lyr.GetLayerDefn().GetGeomFieldDefn(1).GetSpatialRef() assert srs.GetAuthorityCode(None) == '4326' ds.ReleaseResultSet(sql_lyr) # Test INSERT INTO request ds.ExecuteSQL("INSERT INTO mytable (geomfield, geomfield2) VALUES (" + "GeomFromText('POLYGON ((0 0,0 1,1 1,1 0,0 0))'), " + "GeomFromText('POINT Z(0 1 2)') )", dialect='SQLite') # Check output sql_lyr = ds.ExecuteSQL('SELECT geomfield2, geomfield FROM mytable', dialect='SQLite') feat = sql_lyr.GetNextFeature() geom = feat.GetGeomFieldRef('geomfield') if geom.ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() geom = feat.GetGeomFieldRef('geomfield2') if geom.ExportToWkt() != 'POINT (0 1 2)': feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) # Test UPDATE ds.ExecuteSQL("UPDATE mytable SET geomfield2 = " + "GeomFromText('POINT Z(3 4 5)')", dialect='SQLite') # Check output sql_lyr = ds.ExecuteSQL('SELECT geomfield2, geomfield FROM mytable', dialect='SQLite') feat = sql_lyr.GetNextFeature() geom = feat.GetGeomFieldRef('geomfield') if geom.ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() geom = feat.GetGeomFieldRef('geomfield2') if geom.ExportToWkt() != 'POINT (3 4 5)': feat.DumpReadable() pytest.fail() feat = None ds.ReleaseResultSet(sql_lyr) gdalautotest-3.1.2/ogr/ogr_pds.py0000775000175000017500000000613213701060011015463 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_pds.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR PDS driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr import pytest ############################################################################### # Basic test def test_ogr_pds_1(): ds = ogr.Open('data/ap01578l.lbl') assert ds is not None, 'cannot open dataset' lyr = ds.GetLayerByName('RAMAPPING') assert lyr is not None, 'cannot find layer' assert lyr.GetFeatureCount() == 74786, 'did not get expected feature count' with gdaltest.error_handler(): feat = lyr.GetNextFeature() if feat.GetField('NOISE_COUNTS_1') != 96: feat.DumpReadable() pytest.fail() geom = feat.GetGeometryRef() if ogrtest.check_feature_geometry(feat, 'POINT (146.1325 -55.648)', max_error=0.000000001) != 0: print('did not get expected geom') pytest.fail(geom.ExportToWkt()) with gdaltest.error_handler(): feat = lyr.GetFeature(1) if feat.GetField('MARS_RADIUS') != 3385310.2: feat.DumpReadable() pytest.fail() ############################################################################### # Read IEEE_FLOAT columns (see https://github.com/OSGeo/gdal/issues/570) def test_ogr_pds_2(): ds = ogr.Open('data/virsvd_orb_11187_050618.lbl') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['INCIDENCE_ANGLE'] != pytest.approx(3.56775538, abs=1e-7) or f['TEMP_2'] != pytest.approx(28.1240005493164, abs=1e-7): f.DumpReadable() pytest.fail() gdalautotest-3.1.2/ogr/ogr_sde.py0000775000175000017500000002305013701060011015446 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_sde.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR ArcSDE driver. # Author: Howard Butler # ############################################################################### # Copyright (c) 2008, Howard Butler # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import pytest ############################################################################### # Open ArcSDE datasource. sde_server = '172.16.1.193' sde_port = '5151' sde_db = 'sde' sde_user = 'sde' sde_password = 'sde' gdaltest.sde_dr = None try: gdaltest.sde_dr = ogr.GetDriverByName('SDE') except: pass def test_ogr_sde_1(): "Test basic opening of a database" if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password) ds = ogr.Open(base) if ds is None: gdaltest.sde_dr = None pytest.skip("Could not open %s" % base) ds.Destroy() ds = ogr.Open(base, update=1) ds.Destroy() def test_ogr_sde_2(): "Test creation of a layer" if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) ds = ogr.Open(base, update=1) lyr = ds.CreateLayer('SDE.TPOLY', geom_type=ogr.wkbPolygon, srs=shp_lyr.GetSpatialRef(), options=['OVERWRITE=YES']) # lyr = ds.CreateLayer( 'SDE.TPOLY' ,geom_type=ogr.wkbPolygon) ogrtest.quick_create_layer_def(lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('WHEN', ogr.OFTDateTime)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() def test_ogr_sde_3(): "Test basic version locking" if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT' % (sde_server, sde_port, sde_db, sde_user, sde_password) ds = ogr.Open(base, update=1) ds2 = ogr.Open(base, update=1) assert ds2 is None, 'A locked version was able to be opened' ds.Destroy() def test_ogr_sde_4(): "Test basic version creation" if gdaltest.sde_dr is None: pytest.skip() version_name = 'TESTING' gdal.SetConfigOption('SDE_VERSIONOVERWRITE', 'TRUE') base = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password, version_name) ds = ogr.Open(base, update=1) ds.Destroy() gdal.SetConfigOption('SDE_VERSIONOVERWRITE', 'FALSE') base = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password, version_name) ds = ogr.Open(base, update=1) ds.Destroy() def test_ogr_sde_5(): "Test versioned editing" if gdaltest.sde_dr is None: pytest.skip() version_name = 'TESTING' gdal.SetConfigOption('SDE_VERSIONOVERWRITE', 'TRUE') base = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password, version_name) ds = ogr.Open(base, update=1) l1 = ds.GetLayerByName('SDE.TPOLY') f1 = l1.GetFeature(1) f1.SetField("PRFEDEA", 'SDE.TESTING') l1.SetFeature(f1) ds.Destroy() del ds default = 'DEFAULT' gdal.SetConfigOption('SDE_VERSIONOVERWRITE', 'FALSE') default = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password, default) # print default ds2 = ogr.Open(default, update=1) l2 = ds2.GetLayerByName('SDE.TPOLY') f2 = l2.GetFeature(1) f2.SetField("PRFEDEA", 'SDE.DEFAULT') f2.SetField("WHEN", 2008, 3, 19, 16, 15, 00, 0) l2.SetFeature(f2) ds2.Destroy() del ds2 ds3 = ogr.Open(base) l3 = ds3.GetLayerByName('SDE.TPOLY') f3 = l3.GetFeature(1) assert f3.GetField("PRFEDEA") == "SDE.TESTING", \ 'versioned editing failed for child version SDE.TESTING' ds3.Destroy() del ds3 ds4 = ogr.Open(default) l4 = ds4.GetLayerByName('SDE.TPOLY') f4 = l4.GetFeature(1) assert f4.GetField("PRFEDEA") == "SDE.DEFAULT", \ 'versioned editing failed for parent version SDE.DEFAULT' idx = f4.GetFieldIndex('WHEN') df = f4.GetField(idx) if df != '2008/03/19 16:15:00': gdaltest.post_reason("datetime handling did not work -- expected '2008/03/19 16:15:00' got '%s' " % df) ds4.Destroy() del ds4 def test_ogr_sde_6(): "Extent fetching" if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT' % ( sde_server, sde_port, sde_db, sde_user, sde_password) ds = ogr.Open(base, update=1) l1 = ds.GetLayerByName('SDE.TPOLY') extent = l1.GetExtent(force=0) if extent != (0.0, 2147483645.0, 0.0, 2147483645.0): gdaltest.post_reason("unforced extent did not equal expected value") extent = l1.GetExtent(force=1) if extent != (478316.0, 481645.0, 4762881.0, 4765611.0): gdaltest.post_reason("forced extent did not equal expected value") def test_ogr_sde_7(): "Bad layer test" if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT' % ( sde_server, sde_port, sde_db, sde_user, sde_password) ds = ogr.Open(base, update=1) l1 = ds.GetLayerByName('SDE.TPOLY2') if l1: gdaltest.post_reason("we got a layer when we should not have") ds.Destroy() default = 'DEFAULT' gdal.SetConfigOption('SDE_VERSIONOVERWRITE', 'FALSE') default = 'SDE:%s,%s,%s,%s,%s,SDE.TPOLY,SDE.DEFAULT,%s' % ( sde_server, sde_port, sde_db, sde_user, sde_password, default) ds = ogr.Open(default, update=1) l1 = ds.GetLayerByName('SDE.TPOLY2') if l1: gdaltest.post_reason("we got a layer when we should not have") ds.Destroy() default = 'DEFAULT' gdal.SetConfigOption('SDE_VERSIONOVERWRITE', 'FALSE') default = 'SDE:%s,%s,%s,%s,%s' % ( sde_server, sde_port, sde_db, sde_user, sde_password) ds = ogr.Open(default) l1 = ds.GetLayerByName('SDE.TPOLY2') if l1: gdaltest.post_reason("we got a layer when we should not have") ds.Destroy() def test_ogr_sde_8(): "Test spatial references" if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) ref = osr.SpatialReference() ref.ImportFromWkt('LOCAL_CS["IMAGE"]') ds = ogr.Open(base, update=1) lyr = ds.CreateLayer('SDE.TPOLY', geom_type=ogr.wkbPolygon, srs=ref, options=['OVERWRITE=YES']) ref.ImportFromEPSG(4326) lyr = ds.CreateLayer('SDE.TPOLY', geom_type=ogr.wkbPolygon, srs=ref, options=['OVERWRITE=YES']) ogrtest.quick_create_layer_def(lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('WHEN', ogr.OFTDateTime)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat.Destroy() def test_ogr_sde_cleanup(): if gdaltest.sde_dr is None: pytest.skip() base = 'SDE:%s,%s,%s,%s,%s' % (sde_server, sde_port, sde_db, sde_user, sde_password) ds = ogr.Open(base, update=1) ds.DeleteLayer('%s.%s' % (sde_user.upper(), 'TPOLY')) ds.Destroy() gdalautotest-3.1.2/ogr/ogr_wktempty.py0000775000175000017500000001335613701060011016567 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_wktempty.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test support for the various "EMPTY" WKT geometry representations. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2008, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import pytest from osgeo import ogr wkt_list = [ ('GEOMETRYCOLLECTION(EMPTY)', 'GEOMETRYCOLLECTION EMPTY'), ('MULTIPOLYGON( EMPTY )', 'MULTIPOLYGON EMPTY'), ('MULTILINESTRING(EMPTY)', 'MULTILINESTRING EMPTY'), ('MULTIPOINT(EMPTY)', 'MULTIPOINT EMPTY'), ('POINT ( EMPTY )', 'POINT EMPTY'), ('LINESTRING(EMPTY)', 'LINESTRING EMPTY'), ('POLYGON ( EMPTY )', 'POLYGON EMPTY'), ('GEOMETRYCOLLECTION EMPTY', 'GEOMETRYCOLLECTION EMPTY'), ('MULTIPOLYGON EMPTY', 'MULTIPOLYGON EMPTY'), ('MULTILINESTRING EMPTY', 'MULTILINESTRING EMPTY'), ('MULTIPOINT EMPTY', 'MULTIPOINT EMPTY'), ('POINT EMPTY', 'POINT EMPTY'), ('LINESTRING EMPTY', 'LINESTRING EMPTY'), ('POLYGON EMPTY', 'POLYGON EMPTY') ] @pytest.mark.parametrize( "test_input,expected", wkt_list, ids=[r[0] for r in wkt_list] ) def test_empty_wkt(test_input, expected): geom = ogr.CreateGeometryFromWkt(test_input) wkt = geom.ExportToWkt() if expected != 'POINT EMPTY': assert ogr.CreateGeometryFromWkb(geom.ExportToWkb()).ExportToWkt() == wkt assert wkt == expected try: ogr.Geometry.IsEmpty except AttributeError: pytest.skip() try: assert geom.IsEmpty(), "IsEmpty returning false for an empty geometry" finally: geom.Destroy() def test_ogr_wktempty_test_partial_empty_geoms(): # Multipoint with a valid point and an empty point wkt = 'MULTIPOINT (1 1)' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbPoint)) assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Multipoint with an empty point and a valid point geom = ogr.CreateGeometryFromWkt('MULTIPOINT EMPTY') geom.AddGeometry(ogr.Geometry(type=ogr.wkbPoint)) geom.AddGeometry(ogr.CreateGeometryFromWkt('POINT (1 1)')) wkt = 'MULTIPOINT (1 1)' assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Multilinestring with a valid string and an empty linestring wkt = 'MULTILINESTRING ((0 1,2 3,4 5,0 1))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbLineString)) assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Multilinestring with an empty linestring and a valid linestring geom = ogr.CreateGeometryFromWkt('MULTILINESTRING EMPTY') geom.AddGeometry(ogr.Geometry(type=ogr.wkbLineString)) geom.AddGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 1,2 3,4 5,0 1)')) wkt = 'MULTILINESTRING ((0 1,2 3,4 5,0 1))' assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Polygon with a valid external ring and an empty internal ring wkt = 'POLYGON ((100 0,100 10,110 10,100 0))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbLinearRing)) assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Polygon with an empty external ring and a valid internal ring wkt = 'POLYGON EMPTY' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbLinearRing)) ring = ogr.Geometry(type=ogr.wkbLinearRing) ring.AddPoint_2D(0, 0) ring.AddPoint_2D(10, 0) ring.AddPoint_2D(10, 10) ring.AddPoint_2D(0, 10) ring.AddPoint_2D(0, 0) geom.AddGeometry(ring) assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Multipolygon with a valid polygon and an empty polygon wkt = 'MULTIPOLYGON (((0 0,0 10,10 10,0 0)))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbPolygon)) assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) # Multipolygon with an empty polygon and a valid polygon geom = ogr.CreateGeometryFromWkt('MULTIPOLYGON EMPTY') geom.AddGeometry(ogr.Geometry(type=ogr.wkbPolygon)) geom.AddGeometry(ogr.CreateGeometryFromWkt('POLYGON ((100 0,100 10,110 10,100 0))')) wkt = 'MULTIPOLYGON (((100 0,100 10,110 10,100 0)))' assert geom.ExportToWkt() == wkt, \ ('WKT is wrong: ' + geom.ExportToWkt() + '. Expected value is: ' + wkt) gdalautotest-3.1.2/ogr/ogr_dgn.py0000775000175000017500000002156313701060011015452 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_dgn.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test Some DGN Driver features. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest import ogrtest from osgeo import ogr import pytest ############################################################################### # Verify we can open the test file. def test_ogr_dgn_1(): gdaltest.dgn_ds = ogr.Open('data/smalltest.dgn') assert gdaltest.dgn_ds is not None, 'failed to open test file.' gdaltest.dgn_lyr = gdaltest.dgn_ds.GetLayer(0) ############################################################################### # Check first feature, a text element. def test_ogr_dgn_2(): if gdaltest.dgn_ds is None: pytest.skip() feat = gdaltest.dgn_lyr.GetNextFeature() assert feat.GetField('Type') == 17 and feat.GetField('Level') == 1, \ 'feature 1: expected attributes' assert feat.GetField('Text') == 'Demo Text', 'feature 1: expected text' assert not ogrtest.check_feature_geometry(feat, 'POINT (0.73650000 4.21980000)') assert feat.GetStyleString() == 'LABEL(t:"Demo Text",c:#ffffff,s:1.000g,f:ENGINEERING)', \ 'Style string different than expected.' ############################################################################### # Check second feature, a circle. def test_ogr_dgn_3(): if gdaltest.dgn_ds is None: pytest.skip() feat = gdaltest.dgn_lyr.GetNextFeature() assert feat.GetField('Type') == 15 and feat.GetField('Level') == 2, \ 'feature 2: expected attributes' geom = feat.GetGeometryRef() assert geom.GetCoordinateDimension() == 2, 'expected 2d circle.' assert geom.GetGeometryName() == 'LINESTRING', \ 'Expected circle to be translated as LINESTRING.' assert geom.GetPointCount() >= 15, \ 'Unexpected small number of circle interpolation points.' genvelope = geom.GetEnvelope() assert genvelope[0] >= 0.328593 and genvelope[0] <= 0.328594 and genvelope[1] >= 9.68780 and genvelope[1] <= 9.68781 and genvelope[2] >= -0.09611 and genvelope[2] <= -0.09610 and genvelope[3] >= 9.26310 and genvelope[3] <= 9.26311, \ 'geometry extents seem odd' ############################################################################### # Check third feature, a polygon with fill styling. def test_ogr_dgn_4(): if gdaltest.dgn_ds is None: pytest.skip() feat = gdaltest.dgn_lyr.GetNextFeature() assert feat.GetField('Type') == 6 and feat.GetField('Level') == 2 and feat.GetField('ColorIndex') == 83, \ 'feature 3: expected attributes' wkt = 'POLYGON ((4.53550000 3.31700000,4.38320000 2.65170000,4.94410000 2.52350000,4.83200000 3.33310000,4.53550000 3.31700000))' assert not ogrtest.check_feature_geometry(feat, wkt) assert feat.GetStyleString() == 'BRUSH(fc:#b40000,id:"ogr-brush-0")', \ 'Style string different than expected.' gdaltest.dgn_lyr.ResetReading() ############################################################################### # Use attribute query to pick just the type 15 level 2 object. def test_ogr_dgn_5(): if gdaltest.dgn_ds is None: pytest.skip() gdaltest.dgn_lyr.SetAttributeFilter('Type = 15 and Level = 2') tr = ogrtest.check_features_against_list(gdaltest.dgn_lyr, 'Type', [15]) gdaltest.dgn_lyr.SetAttributeFilter(None) assert tr ############################################################################### # Use spatial filter to just pick the big circle. def test_ogr_dgn_6(): if gdaltest.dgn_ds is None: pytest.skip() geom = ogr.CreateGeometryFromWkt('LINESTRING(1.0 8.55, 2.5 6.86)') gdaltest.dgn_lyr.SetSpatialFilter(geom) geom.Destroy() tr = ogrtest.check_features_against_list(gdaltest.dgn_lyr, 'Type', [15]) gdaltest.dgn_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Copy our small dgn file to a new dgn file. def test_ogr_dgn_7(): if gdaltest.dgn_ds is None: pytest.skip() co_opts = ['UOR_PER_SUB_UNIT=100', 'SUB_UNITS_PER_MASTER_UNIT=100', 'ORIGIN=-50,-50,0'] dgn2_ds = ogr.GetDriverByName('DGN').CreateDataSource('tmp/dgn7.dgn', options=co_opts) dgn2_lyr = dgn2_ds.CreateLayer('elements') gdaltest.dgn_lyr.ResetReading() dst_feat = ogr.Feature(feature_def=dgn2_lyr.GetLayerDefn()) feat = gdaltest.dgn_lyr.GetNextFeature() while feat is not None: dst_feat.SetFrom(feat) assert dgn2_lyr.CreateFeature(dst_feat) == 0, 'CreateFeature failed.' feat = gdaltest.dgn_lyr.GetNextFeature() dgn2_lyr = None dgn2_ds = None ############################################################################### # Verify that our copy is pretty similar. # # Currently the styling information is not well preserved. Eventually # this should be fixed up and the test made more stringent. # def test_ogr_dgn_8(): if gdaltest.dgn_ds is None: pytest.skip() dgn2_ds = ogr.Open('tmp/dgn7.dgn') dgn2_lyr = dgn2_ds.GetLayerByName('elements') # Test first first, a text element. feat = dgn2_lyr.GetNextFeature() assert feat.GetField('Type') == 17 and feat.GetField('Level') == 1, \ 'feature 1: expected attributes' assert feat.GetField('Text') == 'Demo Text', 'feature 1: expected text' assert not ogrtest.check_feature_geometry(feat, 'POINT (0.73650000 4.21980000)') assert feat.GetStyleString() == 'LABEL(t:"Demo Text",c:#ffffff,s:1.000g,f:ENGINEERING)', \ 'feature 1: Style string different than expected.' # Check second element, a circle. feat = dgn2_lyr.GetNextFeature() assert feat.GetField('Type') == 12 and feat.GetField('Level') == 2, \ 'feature 2: expected attributes' geom = feat.GetGeometryRef() assert geom.GetCoordinateDimension() == 2, 'feature 2: expected 2d circle.' assert geom.GetGeometryName() == 'MULTILINESTRING', \ 'feature 2: Expected MULTILINESTRING.' genvelope = geom.GetEnvelope() assert genvelope[0] >= 0.3285 and genvelope[0] <= 0.3287 and genvelope[1] >= 9.6878 and genvelope[1] <= 9.6879 and genvelope[2] >= -0.0962 and genvelope[2] <= -0.0960 and genvelope[3] >= 9.26310 and genvelope[3] <= 9.2632, \ 'feature 2: geometry extents seem odd' # Check 3rd feature, a polygon feat = dgn2_lyr.GetNextFeature() assert feat.GetField('Type') == 6 and feat.GetField('Level') == 2 and feat.GetField('ColorIndex') == 83, \ 'feature 3: expected attributes' wkt = 'POLYGON ((4.53550000 3.31700000,4.38320000 2.65170000,4.94410000 2.52350000,4.83200000 3.33310000,4.53550000 3.31700000))' assert not ogrtest.check_feature_geometry(feat, wkt) # should be: 'BRUSH(fc:#b40000,id:"ogr-brush-0")' assert feat.GetStyleString() == 'PEN(id:"ogr-pen-0",c:#b40000)', \ ('feature 3: Style string different than expected: ' + feat.GetStyleString()) dgn2_ds = None ############################################################################### # Test delta encoding (#6806) def test_ogr_dgn_online_1(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/dgn/DGNSample_v7.dgn', 'DGNSample_v7.dgn'): pytest.skip() ds = ogr.Open('tmp/cache/DGNSample_v7.dgn') assert ds is not None lyr = ds.GetLayer(0) feat = lyr.GetFeature(35) wkt = 'LINESTRING (82.9999500717185 23.2084166997284,83.0007450788903 23.2084495986816,83.00081490524 23.2068095339824,82.9999503769036 23.2067737968078)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Cleanup def test_ogr_dgn_cleanup(): if gdaltest.dgn_ds is not None: gdaltest.dgn_lyr = None gdaltest.dgn_ds = None gdaltest.clean_tmp() gdalautotest-3.1.2/ogr/ogr_ili.py0000775000175000017500000014326513701060011015463 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_ili.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Interlis driver testing. # Author: Pirmin Kalberer # ############################################################################### # Copyright (c) 2012, Pirmin Kalberer # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr import pytest def cpl_debug_on(): gdaltest.cpl_debug = gdal.GetConfigOption('CPL_DEBUG') gdal.SetConfigOption('CPL_DEBUG', 'ON') def cpl_debug_reset(): gdal.SetConfigOption('CPL_DEBUG', gdaltest.cpl_debug) ############################################################################### # Open Driver def test_ogr_interlis1_1(): gdaltest.have_ili_reader = 0 driver = ogr.GetDriverByName('Interlis 1') if driver is None: pytest.skip() gdaltest.have_ili_reader = 1 ############################################################################### # Check that Ili1 point layer is properly read. def test_ogr_interlis1_2(): if not gdaltest.have_ili_reader: pytest.skip() if not ogrtest.have_geos(): pytest.skip() ds = ogr.Open('data/ili/Beispiel.itf,data/ili/Beispiel.imd') layers = ['Bodenbedeckung__BoFlaechen', 'Bodenbedeckung__BoFlaechen_Form', 'Bodenbedeckung__Strasse', 'Bodenbedeckung__Gebaeude'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('Bodenbedeckung__BoFlaechen') assert lyr.GetFeatureCount() == 3, 'feature count wrong.' # Get 2nd feature feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() field_values = [20, 1, 168.27, 170.85] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') geom = feat.GetGeomFieldRef(0) assert geom.GetCoordinateDimension() == 2, 'dimension wrong.' geom = feat.GetGeomFieldRef(1) assert geom.GetCoordinateDimension() == 2, 'dimension wrong.' geom = feat.GetGeometryRef() assert geom.GetGeometryName() == 'POLYGON', 'Geometry of wrong type.' ############################################################################### # Ili1 FORMAT DEFAULT test. def test_ogr_interlis1_3(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/format-default.itf,data/ili/format-default.imd') layers = ['FormatTests__FormatTable'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('FormatTests__FormatTable') assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = [0, 'aa bb', 'cc^dd', '', 1] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') ############################################################################### # Ili1 FORMAT test. def test_ogr_interlis1_4(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/format-test.itf,data/ili/format-test.imd') layers = ['FormatTests__FormatTable'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('FormatTests__FormatTable') assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = [0, 'aa_bb', 'cc dd', '', 1] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') ############################################################################### # Write Ili1 transfer file without model. def test_ogr_interlis1_5(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/format-default.itf,data/ili/format-default.imd') lyr = ds.GetLayerByName('FormatTests__FormatTable') feat = lyr.GetNextFeature() driver = ogr.GetDriverByName('Interlis 1') outfile = "tmp/interlis1_5.itf" with gdaltest.error_handler(): dst_ds = driver.CreateDataSource(outfile) dst_lyr = dst_ds.CreateLayer('FormatTests__FormatTable') layer_defn = lyr.GetLayerDefn() for i in range(layer_defn.GetFieldCount()): dst_lyr.CreateField(layer_defn.GetFieldDefn(i)) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) dst_feat.SetFrom(feat) dst_lyr.CreateFeature(dst_feat) dst_ds = None with open(outfile) as f: itf = f.read() expected = """MTID INTERLIS1 MODL OGR ETOP TOPI FormatTests TABL FormatTable OBJE 0 0 aa_bb cc^dd @ 1 ETAB ETOP EMOD ENDE""" assert expected in itf, "Interlis output doesn't match." ############################################################################### # Write Ili1 transfer file. def test_ogr_interlis1_6(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/format-default.itf,data/ili/format-default.imd') lyr = ds.GetLayerByName('FormatTests__FormatTable') feat = lyr.GetNextFeature() driver = ogr.GetDriverByName('Interlis 1') outfile = "tmp/interlis1_6.itf" dst_ds = driver.CreateDataSource(outfile + ",data/ili/format-default.imd") dst_lyr = dst_ds.CreateLayer('test') layer_defn = lyr.GetLayerDefn() for i in range(layer_defn.GetFieldCount()): dst_lyr.CreateField(layer_defn.GetFieldDefn(i)) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) dst_feat.SetFrom(feat) dst_lyr.CreateFeature(dst_feat) dst_ds = None with open(outfile) as f: itf = f.read() expected = """MTID INTERLIS1 MODL FormatDefault TOPI FormatTests TABL test OBJE 1 0 aa_bb cc^dd @ 1 ETAB ETOP EMOD ENDE""" assert expected in itf, "Interlis output doesn't match." ############################################################################### # Ili1 character encoding test. def test_ogr_interlis1_7(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/encoding-test.itf,data/ili/format-default.imd') layers = ['FormatTests__FormatTable'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('FormatTests__FormatTable') assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() # Interlis 1 Encoding is ISO 8859-1 (Latin1) # Python source code is UTF-8 encoded field_values = [0, 'äöü', 'ÄÖÜ', '', 1] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') # Write back driver = ogr.GetDriverByName('Interlis 1') outfile = "tmp/interlis1_7.itf" dst_ds = driver.CreateDataSource(outfile + ",data/ili/format-default.imd") dst_lyr = dst_ds.CreateLayer('FormatTests__FormatTable') layer_defn = lyr.GetLayerDefn() for i in range(layer_defn.GetFieldCount()): dst_lyr.CreateField(layer_defn.GetFieldDefn(i)) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) dst_feat.SetFrom(feat) dst_lyr.CreateFeature(dst_feat) dst_ds = None try: # Python 3 f = open(outfile, encoding='iso-8859-1') except TypeError: f = open(outfile) itf = f.read() expected = """MTID INTERLIS1 MODL FormatDefault TABL FormatTable OBJE 2 0 äöü ÄÖÜ @ 1 ETAB ETOP EMOD ENDE""" try: # Python 2 expected = expected.decode('utf8').encode('iso-8859-1') except: pass assert expected in itf, "Interlis output doesn't match." ############################################################################### # Ili1 VRT rename def test_ogr_interlis1_9(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/Beispiel-rename.vrt') layers = ['BoGebaeude'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('BoGebaeude') assert lyr.GetLayerDefn().GetFieldDefn(0).GetNameRef() == 'AssekuranzNr', \ ('Wrong field name: ' + lyr.GetLayerDefn().GetFieldDefn(0).GetNameRef()) assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = ['958', 10, 'POINT (148.41 175.96)'] assert feat.GetFieldCount() == len(field_values) - 1, 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') ############################################################################### # Ili1 Area with polygonizing def test_ogr_interlis1_10(): if not gdaltest.have_ili_reader: pytest.skip() if not ogrtest.have_geos(): pytest.skip() ds = ogr.Open('data/ili/Beispiel.itf,data/ili/Beispiel.imd') lyr = ds.GetLayerByName('Bodenbedeckung__BoFlaechen') assert lyr.GetFeatureCount() == 3, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['POLYGON ((146.92 174.98,138.68 187.51,147.04 193.0,149.79 188.82,158.15 194.31,163.64 185.96,146.92 174.98))', 'POINT (148.2 183.48)'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # Ili1 multi-geom test (RFC41) def test_ogr_interlis1_11(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/multigeom.itf,data/ili/multigeom.imd') layers = ['MultigeomTests__MultigeomTable'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('MultigeomTests__MultigeomTable') assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() # feat.DumpReadable() # _TID (String) = 0 # Text1 (String) = aa bb # Number (Real) = 40 # MULTILINESTRING ((190.26 208.0 0, ... # GeomPoint_0 (Real) = 148.41 # GeomPoint_1 (Real) = 175.96 assert feat.GetFieldCount() == 5, 'field count wrong.' geom_columns = ['GeomLine', 'GeomPoint'] assert feat.GetGeomFieldCount() == len(geom_columns), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): defn = lyr.GetLayerDefn().GetGeomFieldDefn(i) assert defn.GetName() == str(geom_columns[i]), ("Geom field: " + defn.GetName()) ############################################################################### # Ili1 multi-geom test (RFC41) def test_ogr_interlis1_12(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/multicoord.itf,data/ili/multicoord.imd') layers = ['MulticoordTests__MulticoordTable'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('MulticoordTests__MulticoordTable') assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() if feat.GetFieldCount() != 6: feat.DumpReadable() pytest.fail('field count wrong.') geom_columns = ['coordPoint1', 'coordPoint2'] assert feat.GetGeomFieldCount() == len(geom_columns), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): defn = lyr.GetLayerDefn().GetGeomFieldDefn(i) assert defn.GetName() == str(geom_columns[i]), ("Geom field: " + defn.GetName()) ############################################################################### # Ili1 Surface test. def test_ogr_interlis1_13(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/surface.itf,data/ili/surface.imd') layers = ['SURFC_TOP__SURFC_TBL', 'SURFC_TOP__SURFC_TBL_SHAPE', 'SURFC_TOP__SURFC_TBL_TEXT_ID', 'SURFC_TOP__SURFC_TBL_TEXT_ID_SHAPE', 'SURFC_TOP__LineAttrib1', 'SURFC_TOP__Flaechenelement', 'SURFC_TOP__Flaechenelement_Geometrie' ] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL_SHAPE') assert lyr.GetFeatureCount() == 5, 'feature count wrong.' lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL') assert lyr.GetFeatureCount() == 4, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = ['103', 1, 3, 1, 23, 25000, 20060111] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') geom_field_values = ['CURVEPOLYGON (COMPOUNDCURVE ((598600.961 249487.174,598608.899 249538.768,598624.774 249594.331,598648.586 249630.05,598684.305 249661.8,598763.68 249685.612,598850.993 249685.612,598854.962 249618.143,598843.055 249550.675,598819.243 249514.956,598763.68 249479.237,598692.243 249447.487,598612.868 249427.643,598600.961 249487.174)))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() # --- test curved polygon feat = lyr.GetNextFeature() geom_field_values = ['CURVEPOLYGON (COMPOUNDCURVE ((598131.445 249100.621,598170.131 249095.094,598200.448 249085.393),CIRCULARSTRING (598200.448 249085.393,598239.253 249062.352,598246.529 249044.162),(598246.529 249044.162,598245.316 249025.972,598229.552 249017.483,598165.28 249035.673,598134.963 249049.013,598130.273 249052.095,598131.445 249100.621)))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() # --- test multi-ring polygon feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() field_values = ['106', 3, 3, 1, 23, 25000, 20060111] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') # FIXME: note this is an invalid curve polygon. The two rings are completely disjoint, so this should be a multisurface instead. geom_field_values = ['CURVEPOLYGON (COMPOUNDCURVE ((747951.24 265833.326,747955.101 265828.716,747954.975 265827.862,747951.166 265828.348,747951.24 265833.326)),COMPOUNDCURVE ((747925.762 265857.606,747927.618 265861.533,747928.237 265860.794,747930.956 265857.547,747925.762 265857.606)))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() # --- same with text IDENT field # TODO: Surface with text IDENT field not supported yet # lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL_TEXT_ID_SHAPE') # if lyr.GetFeatureCount() != 5: # gdaltest.post_reason('feature count wrong.') # return 'fail' # lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL_TEXT_ID') # if lyr.GetFeatureCount() != 4: # gdaltest.post_reason('feature count wrong.') # return 'fail' # feat = lyr.GetNextFeature() # # Note: original value 'AAA_EZ20156' includes blank-symbol # field_values = ['AAA EZ20156', 1, 3, 1, 23, 25000, 20060111] # if feat.GetFieldCount() != len(field_values): # gdaltest.post_reason( 'field count wrong.' ) # return 'fail' # for i in range(feat.GetFieldCount()): # if feat.GetFieldAsString(i) != str(field_values[i]): # feat.DumpReadable() # print(feat.GetFieldAsString(i)) # gdaltest.post_reason( 'field value wrong.' ) # return 'fail' # geom_field_values = ['POLYGON ((598600.961 249487.174,598608.899 249538.768,598624.774 249594.331,598648.586 249630.05,598684.305 249661.8,598763.68 249685.612,598850.993 249685.612,598854.962 249618.143,598843.055 249550.675,598819.243 249514.956,598763.68 249479.237,598692.243 249447.487,598612.868 249427.643,598600.961 249487.174))'] # if feat.GetGeomFieldCount() != len(geom_field_values): # gdaltest.post_reason( 'geom field count wrong.' ) # print(feat.GetGeomFieldCount()) # return 'fail' # for i in range(feat.GetGeomFieldCount()): # geom = feat.GetGeomFieldRef(i) # if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: # feat.DumpReadable() # return 'fail' # # --- test multi-ring polygon # feat = lyr.GetNextFeature() # feat = lyr.GetNextFeature() # feat = lyr.GetNextFeature() # field_values = ['AAA EZ36360', 3, 3, 1, 23, 25000, 20060111] # if feat.GetFieldCount() != len(field_values): # gdaltest.post_reason( 'field count wrong.' ) # return 'fail' # for i in range(feat.GetFieldCount()): # if feat.GetFieldAsString(i) != str(field_values[i]): # feat.DumpReadable() # print(feat.GetFieldAsString(i)) # gdaltest.post_reason( 'field value wrong.' ) # return 'fail' # geom_field_values = ['POLYGON ((747925.762 265857.606,747927.618 265861.533,747928.237 265860.794,747930.956 265857.547,747925.762 265857.606),(747951.24 265833.326,747955.101 265828.716,747954.975 265827.862,747951.166 265828.348,747951.24 265833.326))'] # if feat.GetGeomFieldCount() != len(geom_field_values): # gdaltest.post_reason( 'geom field count wrong.' ) # print(feat.GetGeomFieldCount()) # return 'fail' # for i in range(feat.GetGeomFieldCount()): # geom = feat.GetGeomFieldRef(i) # if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: # feat.DumpReadable() # return 'fail' lyr = ds.GetLayerByName('SURFC_TOP__Flaechenelement_Geometrie') assert lyr.GetFeatureCount() == 3, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['MULTICURVE (COMPOUNDCURVE ((697064.616 245051.751,697064.773 245052.007,697067.63 245050.258,697067.473 245050.002,697064.616 245051.751)))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() geom_field_values = ['MULTICURVE (COMPOUNDCURVE ((698298.028 246754.897,698295.899 246752.775,698293.113 246755.525,698295.243 246757.648)))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('SURFC_TOP__Flaechenelement') assert lyr.GetFeatureCount() == 2, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['CURVEPOLYGON (COMPOUNDCURVE ((697064.616 245051.751,697064.773 245052.007,697067.63 245050.258,697067.473 245050.002,697064.616 245051.751))))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() geom_field_values = ['CURVEPOLYGON (COMPOUNDCURVE ((698298.028 246754.897,698295.899 246752.775,698293.113 246755.525,698295.243 246757.648),(698295.243 246757.648,698298.028 246754.897)))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() # Test assembling curves not in "right" order ds = ogr.Open('data/ili/surface_complex.itf,data/ili/surface.imd') lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL') feat = lyr.GetNextFeature() geom_field_values = ['CURVEPOLYGON (COMPOUNDCURVE ((747955.101 265828.716,747954.975 265827.862),(747954.975 265827.862,747951.166 265828.348,747951.24 265833.326),(747951.24 265833.326,747955.101 265828.716)))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # Ili1 Surface test with linear conversion. def test_ogr_interlis1_13_linear(): if not gdaltest.have_ili_reader: pytest.skip() gdal.SetConfigOption('OGR_STROKE_CURVE', 'YES') ds = ogr.Open('data/ili/surface.itf,data/ili/surface.imd') layers = ['SURFC_TOP__SURFC_TBL', 'SURFC_TOP__SURFC_TBL_SHAPE', 'SURFC_TOP__SURFC_TBL_TEXT_ID', 'SURFC_TOP__SURFC_TBL_TEXT_ID_SHAPE', 'SURFC_TOP__LineAttrib1', 'SURFC_TOP__Flaechenelement', 'SURFC_TOP__Flaechenelement_Geometrie' ] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL_SHAPE') assert lyr.GetFeatureCount() == 5, 'feature count wrong.' lyr = ds.GetLayerByName('SURFC_TOP__SURFC_TBL') assert lyr.GetFeatureCount() == 4, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = ['103', 1, 3, 1, 23, 25000, 20060111] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') geom_field_values = ['POLYGON ((598600.961 249487.174,598608.899 249538.768,598624.774 249594.331,598648.586 249630.05,598684.305 249661.8,598763.68 249685.612,598850.993 249685.612,598854.962 249618.143,598843.055 249550.675,598819.243 249514.956,598763.68 249479.237,598692.243 249447.487,598612.868 249427.643,598600.961 249487.174))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() # --- test curved polygon geom_field_values = ['POLYGON ((598600.961 249487.174,598608.899 249538.768,598624.774 249594.331,598648.586 249630.05,598684.305 249661.8,598763.68 249685.612,598850.993 249685.612,598854.962 249618.143,598843.055 249550.675,598819.243 249514.956,598763.68 249479.237,598692.243 249447.487,598612.868 249427.643,598600.961 249487.174))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() # --- test multi-ring polygon feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() # field_values = ['106', 3, 3, 1, 23, 25000, 20060111] field_values = ['105', 3, 3, 1, 23, 25000, 20060111] assert feat.GetFieldCount() == len(field_values), 'field count wrong.' for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') geom_field_values = ['POLYGON ((598330.204 249028.397,598344.756 249057.501,598390.838 249074.479,598422.367 249081.755,598459.96 249093.882,598493.915 249101.158,598523.019 249106.008,598563.038 249084.18,598589.716 249042.949,598603.056 249011.42,598607.907 248966.551,598577.59 248960.487,598493.915 248983.528,598424.793 248996.868,598359.308 249010.207,598330.204 249028.397))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('SURFC_TOP__Flaechenelement_Geometrie') assert lyr.GetFeatureCount() == 3, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['MULTICURVE (COMPOUNDCURVE ((697064.616 245051.751,697064.773 245052.007,697067.63 245050.258,697067.473 245050.002,697064.616 245051.751)))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() geom_field_values = ['MULTICURVE (COMPOUNDCURVE ((698298.028 246754.897,698295.899 246752.775,698293.113 246755.525,698295.243 246757.648)))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('SURFC_TOP__Flaechenelement') assert lyr.GetFeatureCount() == 2, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['POLYGON ((697064.616 245051.751,697064.773 245052.007,697067.63 245050.258,697067.473 245050.002,697064.616 245051.751))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() geom_field_values = ['POLYGON ((698298.028 246754.897,698295.899 246752.775,698293.113 246755.525,698295.243 246757.648,698298.028 246754.897))'] for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() gdal.SetConfigOption('OGR_STROKE_CURVE', None) ############################################################################### # Write Ili1 Arcs. def test_ogr_interlis1_14(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/Beispiel.itf,data/ili/Beispiel.imd') lyr = ds.GetLayerByName('Bodenbedeckung__Strasse') feat = lyr.GetNextFeature() driver = ogr.GetDriverByName('Interlis 1') outfile = "tmp/interlis1_14.itf" dst_ds = driver.CreateDataSource(outfile + ",data/ili/Beispiel.imd") dst_lyr = dst_ds.CreateLayer('Bodenbedeckung__Strasse', None, ogr.wkbMultiCurve) layer_defn = lyr.GetLayerDefn() for i in range(layer_defn.GetFieldCount()): dst_lyr.CreateField(layer_defn.GetFieldDefn(i)) dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) dst_feat.SetFrom(feat) dst_lyr.CreateFeature(dst_feat) dst_ds = None with open(outfile) as f: itf = f.read() expected = """//// MTID INTERLIS1 MODL Beispiel TABL Strasse OBJE 3 100 STPT 190.26 208 ARCP 187 186 LIPT 173.1 171 LIPT 141.08 152.94 ELIN ETAB ETOP EMOD ENDE """ assert expected in itf, "Interlis output doesn't match." ############################################################################### # Reading Ili2 without model def test_ogr_interlis2_1(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/RoadsExdm2ien.xml') assert ds is not None layers = ['RoadsExdm2ben.Roads.LandCover', 'RoadsExdm2ben.Roads.Street', 'RoadsExdm2ien.RoadsExtended.StreetAxis', 'RoadsExdm2ben.Roads.StreetNamePosition', 'RoadsExdm2ien.RoadsExtended.RoadSign'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' ############################################################################### # Reading Ili2 def test_ogr_interlis2_2(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/RoadsExdm2ien.xml,data/ili/RoadsExdm2ien.imd') assert ds is not None layers = ['RoadsExdm2ben.Roads.LAttrs', 'RoadsExdm2ben.Roads.LandCover', 'RoadsExdm2ben.Roads.Street', 'RoadsExdm2ben.Roads.StreetNamePosition', 'RoadsExdm2ien.RoadsExtended.StreetAxis', 'RoadsExdm2ien.RoadsExtended.RoadSign'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('RoadsExdm2ien.RoadsExtended.RoadSign') assert lyr.GetFeatureCount() == 4, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = [501, 'prohibition.noparking'] if feat.GetFieldCount() != len(field_values): feat.DumpReadable() pytest.fail('field count wrong.') for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') geom = feat.GetGeometryRef() assert geom.GetCoordinateDimension() == 2, 'dimension wrong.' geom_field_values = ['POINT (69.389 92.056)'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('RoadsExdm2ien.RoadsExtended.StreetAxis') assert lyr.GetFeatureCount() == 7, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['LINESTRING (55.6 37.649,15.573 25.785)'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('RoadsExdm2ben.Roads.LandCover') assert lyr.GetFeatureCount() == 12, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['POLYGON ((39.038 60.315,41.2 59.302,43.362 60.315,44.713 66.268,45.794 67.662,48.766 67.408,53.36 64.115,56.197 62.595,57.818 63.862,58.899 68.928,55.927 72.348,47.955 75.515,42.281 75.388,39.308 73.235,36.741 69.688,35.525 66.268,35.661 63.735,37.957 61.455,39.038 60.315))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # Write Ili2 transfer file. def test_ogr_interlis2_3(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/RoadsExdm2ien.xml,data/ili/RoadsExdm2ien.imd') lyr = ds.GetLayerByName('RoadsExdm2ien.RoadsExtended.RoadSign') feat = lyr.GetNextFeature() driver = ogr.GetDriverByName('Interlis 2') outfile = "tmp/interlis2_3.xtf" dst_ds = driver.CreateDataSource(outfile + ",data/ili/RoadsExdm2ien.imd") dst_lyr = dst_ds.CreateLayer('RoadsExdm2ien.RoadsExtended.RoadSign') dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) dst_feat.SetFrom(feat) dst_lyr.CreateFeature(dst_feat) lyr = ds.GetLayerByName('RoadsExdm2ben.Roads.LandCover') feat = lyr.GetNextFeature() dst_lyr = dst_ds.CreateLayer('RoadsExdm2ben.Roads.LandCover') dst_feat = ogr.Feature(feature_def=dst_lyr.GetLayerDefn()) dst_feat.SetFrom(feat) dst_lyr.CreateFeature(dst_feat) dst_ds = None with open(outfile) as f: xtf = f.read() expected = """ 69.38992.056 prohibition.noparking 39.03860.315 41.259.302 43.36260.315 44.71366.268 45.79467.66200000000001 48.76667.408 53.3664.11499999999999 56.19762.595 57.81863.862 58.89968.928 55.92772.348 47.95575.515 42.28175.38800000000001 39.30873.235 36.74169.688 35.52566.268 35.66163.735 37.95761.455 39.03860.315 water """ expected = expected.replace('.11499999999999', '.115') xtf = xtf.replace('.11499999999999', '.115') assert expected in xtf, "Interlis output doesn't match." ############################################################################### # Ili2 Oereb model def test_ogr_interlis2_4(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/ch.bazl.sicherheitszonenplan.oereb_20131118.xtf,data/ili/ch.bazl.sicherheitszonenplan.oereb_20131118.imd') assert ds is not None layers = ['chGeoId10.BFSNr_', 'chGeoId10.Kanton_', 'chGeoId10.KantonInklFl_', 'CodeISO.CountryCodeISO_', 'CodeISO.LanguageCodeISO_', 'MultilingualText09.LocalizedMText', 'MultilingualText09.LocalizedText', 'MultilingualText09.LocalizedURI', 'MultilingualText09.MultilingualText', 'MultilingualText09.MultilingualURI', 'OeREBKRM09.ArtikelNummer_', 'OeREBKRM09.Datum_', 'OeREBKRM09.Thema_', 'OeREBKRM09.WebReferenz_', 'OeREBKRM09.ArtikelInhaltMehrsprachig', 'OeREBKRM09vs.Vorschriften.Amt', 'OeREBKRM09vs.Vorschriften.Artikel', 'OeREBKRM09vs.Vorschriften.Rechtsvorschrift', 'OeREBKRM09vs.Vorschriften.HinweisWeitereDokumente', 'OeREBKRM09trsfr.Transferstruktur.DarstellungsDienst', 'OeREBKRM09trsfr.Transferstruktur.Eigentumsbeschraenkung', 'OeREBKRM09trsfr.Transferstruktur.Geometrie', 'OeREBKRM09trsfr.Transferstruktur.HinweisDefinition', 'OeREBKRM09trsfr.Transferstruktur.GrundlageVerfeinerung', 'OeREBKRM09trsfr.Transferstruktur.HinweisDefinitionDokument', 'OeREBKRM09trsfr.Transferstruktur.HinweisVorschrift', 'OeREBKRM09vs.Vorschriften.Dokument'] assert ds.GetLayerCount() == len(layers), 'layer count wrong.' for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() in layers, 'Did not get right layers' lyr = ds.GetLayerByName('OeREBKRM09trsfr.Transferstruktur.Geometrie') assert lyr.GetFeatureCount() == 36, 'feature count wrong.' feat = lyr.GetNextFeature() field_values = ['108-G-0002', 'inKraft', '1975-06-27', 'http://www.geocat.ch/geonetwork/srv/ger/metadata.show?fileIdentifier=ff218384-7251-4e68-85e7-c163dd366616', '108-Z-0002', 'ch.admin.bazl'] if feat.GetFieldCount() != len(field_values): feat.DumpReadable() pytest.fail('field count wrong.') for i in range(feat.GetFieldCount()): if feat.GetFieldAsString(i) != str(field_values[i]): feat.DumpReadable() print(feat.GetFieldAsString(i)) pytest.fail('field value wrong.') geom_field_values = [None, None, 'CURVEPOLYGON (COMPOUNDCURVE ((658593.928 254957.714,658511.628 254948.614,658418.028 254938.516,658106.426 254913.918,658192.222 254445.914,658771.228 254619.412,659667.232 254699.606,660369.238 254827.202,661016.442 255010.1,661279.644 255090.198,661866.648 255138.094,661784.45 255601.798,661211.146 255432.8,660320.54 255352.806,659523.436 255206.71,658703.528 254966.814,658624.228 254961.014,658593.928 254957.714)))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) val = geom_field_values[i] if val is None: ok = geom is None else: ok = ogrtest.check_feature_geometry(geom, val) == 0 if not ok: print(geom) pytest.fail('geom check failed.') ############################################################################### # Check arc segmentation def test_ogr_interlis_arc1(): if not gdaltest.have_ili_reader: pytest.skip() gdal.SetConfigOption('OGR_STROKE_CURVE', 'TRUE') # gdal.SetConfigOption('OGR_ARC_STEPSIZE', '0.96') ds = ogr.Open('data/ili/Beispiel.itf,data/ili/Beispiel.imd') gdal.SetConfigOption('OGR_STROKE_CURVE', None) length_0_1_deg = 72.7181992353 # Line length with 0.1 degree segments # Read Area lines lyr = ds.GetLayerByName('Bodenbedeckung__BoFlaechen_Form') assert lyr.GetFeatureCount() == 4, 'feature count wrong.' # Get 3rd feature feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() length = geom.Length() assert length == pytest.approx(length_0_1_deg, abs=0.001), \ ('Length() result wrong, got %g.' % length) if ogrtest.check_feature_geometry(geom, 'MULTILINESTRING ((186.38 206.82,186.456637039593772 206.352374385077951,186.525513501820711 205.883542875348297,186.586610467027612 205.413634254015022,186.639911152487883 204.942777600139351,186.685400917071064 204.471102253228281,186.72306726518579 203.998737777656032,186.752899850289367 203.525813927088137,186.774890477674461 203.05246060886563,186.789033106731921 202.578807848280093,186.795323852631526 202.104985752892361,186.793760987376999 201.631124476756639,186.784344940257114 201.157354184717377,186.76707829777294 200.683805016597006,186.741965802895692 200.210607051507367,186.709014353764331 199.737890272066551,186.668233001808375 199.265784528717603,186.619632949244959 198.79441950407633,186.563227546008392 198.323924677271833,186.499032286083064 197.854429288403452,186.427064803254297 197.386062303034095,186.347344866240718 196.918952376778151,186.259894373302785 196.453227819933062,186.164737346189185 195.989016562249134,186.06189992355209 195.52644611780849,185.951410353787622 195.065643549954956,185.83329898723602 194.606735436434946,185.70759826788705 194.149847834589281,185.574342724430579 193.695106246756012,185.433568960797828 193.242635585782381,185.285315646106 192.792560140718678,185.129623504006275 192.345003542672174,184.966535301544326 191.900088730850229,184.796095837373258 191.457937918770739,184.618351929457248 191.018672560741805,184.433352402229474 190.582413318443258,184.241148073160701 190.149280027813774,184.04179173881127 189.71939166611989,183.835338160315558 189.292866319286958,183.621844048349857 188.869821149441094,183.401368047569093 188.450372362771276,183.173970720454207 188.03463517752968,182.939714530730242 187.622723792475853,182.698663826158707 187.214751355422749,182.450884820893378 186.810829932226596,182.196445577297681 186.411070475951391,181.935415987201822 186.015582796419011,181.667867752774299 185.624475530035824,181.3938743667604 185.237856109953981,181.113511092327798 184.855830736560137,180.826854942395556 184.478504348306132,180.53398465846837 184.105980592874374,180.234980689005141 183.73836179872157,179.929925167336449 183.375748946964421,179.618901889065427 183.018241643621849,179.301996289112111 182.665938092286495,178.979295418190276 182.318935067130923,178.650887918905909 181.977327886313986,178.316864001440962 181.64121038583832,177.97731541873506 181.310674893720687,177.632335441296135 180.985812204678922,177.282018831589056 180.666711555153569,176.9264618179877 180.353460598817009,176.565762068363227 180.046145382490039,176.200018663221243 179.744850322516839,175.829332068533375 179.449658181561944,175.453804108095909 179.160650045865594,175.073537935597386 178.877905303001143,174.688638006242371 178.601501620054449,174.299210048091453 178.331514922276227,173.905361033015623 178.068019372236421,173.507199147294131 177.811087349466078,173.104833761914023 177.560789430557605,172.698375402513165 177.317194369767066,172.28793571903222 177.080369080176723,171.873627455046488 176.850378615250492,171.455564416777605 176.627286151007837,171.033861441848018 176.411152968667096,170.60863436775486 176.202038437793476,170.18 176.0,140.69 156.63))') != 0: print(geom.ExportToWkt()) pytest.fail('Ili curve not correctly read') line = geom.GetGeometryRef(0) points = line.GetPoints() assert len(points) == 81, 'line point count wrong.' # Get 4th feature feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() length = geom.Length() assert length == pytest.approx(98.0243498288, abs=0.001), \ ('Length() result wrong, got %g.' % length) if ogrtest.check_feature_geometry(geom, 'MULTILINESTRING ((186.38 206.82,194.26 208.19,194.360118941290381 207.583863387608318,194.450034548441351 206.976129417129414,194.52972141151983 206.366969832830335,194.599157011165488 205.756556781867374,194.658321725044487 205.145062765608571,194.707198833340925 204.532660590913991,194.745774523486006 203.919523321273999,194.774037894087058 203.305824227936654,194.791980957968889 202.691736740889581,194.799598644465704 202.077434399900056,194.796888800832647 201.463090805460496,194.783852192864259 200.848879569690297,194.760492504683469 200.234974267339538,194.72681633767931 199.621548386683543,194.682833208673372 199.00877528050475,194.628555547191326 198.396828117140075,194.56399869197773 197.785879831499159,194.489180886659568 197.176103076206317,194.40412327458759 196.567670172822517,194.308849892848201 195.960753063147394,194.203387665489544 195.355523260601302,194.087766395903571 194.752151801789267,193.962018758407766 194.150809198152245,193.826180289004668 193.55166538777118,193.680289375348337 192.954889687360236,193.524387245874067 192.360650744412823,193.358517958193232 191.769116489536799,193.182728386585921 191.180454089007952,192.997068208809623 190.594829897498101,192.80158989201297 190.012409411123343,192.596348677929171 189.433357220623265,192.381402567276353 188.857836964845745,192.156812303357555 188.28601128455918,191.922641354867636 187.718041776424769,191.678955898001703 187.15408894736899,191.425824797734066 186.594312169210724,191.163319588355051 186.038869633623079,190.891514453251119 185.48791830744446,190.610486203950103 184.941613888295223,190.320314258417028 184.400110760594515,190.021080618593231 183.863561951926357,189.71286984725154 183.332119089784072,189.395769044065645 182.805932358758554,189.069867821024644 182.285150458053948,188.735258277090878 181.769920559469,188.392034972181108 181.260388265836781,188.040294900434645 180.756697569857323,187.680137462819374 180.258990813403187,187.311664439032 179.767408647305245,186.934979958736193 179.282089991582296,186.550190472116782 178.803171996223654,186.157404719844607 178.330790002393741,185.756733702299215 177.865077504182381,185.348290648216761 177.406166110929888,184.932190982704896 176.954185509959615,184.508552294610098 176.50926343000171,184.077494303273824 176.071525605046162,183.639138824742957 175.641095738836128,183.193609737303603 175.218095469892404,182.741032946476452 174.802644337149076,182.281536349473726 174.394859746185801,181.815249799001293 173.994856936020341,181.34230506662422 173.60274894655592,180.86283580545566 173.21864658665433,180.376977512460115 172.84265840277655,179.884867490109144 172.47489064835824,179.38664480760778 172.115447253752762,178.882450261575258 171.764429796865414,178.372426336281904 171.421937474442501,177.856717163354887 171.08806707407345,177.335468481061952 170.762912946782279,176.808827593129507 170.446566980404867,176.276943327102316 170.13911857360651,175.739965992295737 169.840654610641622,175.198047337304331 169.551259436742839,174.651340507162928 169.271014834364934,174.1 169.0,145.08 149.94,140.69 156.63))') != 0: print(geom.ExportToWkt()) pytest.fail('Ili curve not correctly read') line = geom.GetGeometryRef(0) points = line.GetPoints() assert len(points) == 81, 'line point count wrong.' ############################################################################### # Check polyline with arc def test_ogr_interlis_arc2(): if not gdaltest.have_ili_reader: pytest.skip() ds = ogr.Open('data/ili/Beispiel.itf,data/ili/Beispiel.imd') lyr = ds.GetLayerByName('Bodenbedeckung__Strasse') assert lyr.GetFeatureCount() == 1, 'feature count wrong.' feat = lyr.GetNextFeature() geom_field_values = ['MULTICURVE (COMPOUNDCURVE (CIRCULARSTRING (190.26 208.0,187 186,173.1 171.0),(173.1 171.0,141.08 152.94)))'] assert feat.GetGeomFieldCount() == len(geom_field_values), 'geom field count wrong.' for i in range(feat.GetGeomFieldCount()): geom = feat.GetGeomFieldRef(i) if ogrtest.check_feature_geometry(geom, geom_field_values[i]) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # def test_ogr_interlis_cleanup(): if not gdaltest.have_ili_reader: pytest.skip() gdal.SetConfigOption('OGR_STROKE_CURVE', None) gdaltest.clean_tmp() gdalautotest-3.1.2/ogr/ogr_gml_read.py0000775000175000017500000037053213701060011016457 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_gml_read.py 978ba46f732b27073d5bbc30f427a311d9daed28 2020-04-08 01:11:41 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: GML Reading Driver testing. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2006, Frank Warmerdam # Copyright (c) 2008-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import shutil import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test reading geometry and attribute from ionic wfs gml file. # def test_ogr_gml_1(): gdaltest.have_gml_reader = 0 gml_ds = ogr.Open('data/ionic_wfs.gml') if gml_ds is None: if gdal.GetLastErrorMsg().find('Xerces') != -1: pytest.skip() pytest.fail('failed to open test file.') gdaltest.have_gml_reader = 1 assert gml_ds.GetLayerCount() == 1, 'wrong number of layers' lyr = gml_ds.GetLayerByName('GEM') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Aartselaar', 'Wrong name field value' wkt = 'POLYGON ((44038 511549,44015 511548,43994 511522,43941 511539,43844 511514,43754 511479,43685 511521,43594 511505,43619 511452,43645 511417,4363 511387,437 511346,43749 511298,43808 511229,43819 511205,4379 511185,43728 511167,43617 511175,43604 511151,43655 511125,43746 511143,43886 511154,43885 511178,43928 511186,43977 511217,4404 511223,44008 511229,44099 51131,44095 511335,44106 51135,44127 511379,44124 511435,44137 511455,44105 511467,44098 511484,44086 511499,4407 511506,44067 511535,44038 511549))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is None, 'got unexpected feature.' ############################################################################### # Do the same test somewhere without a .gfs file. def test_ogr_gml_2(): if not gdaltest.have_gml_reader: pytest.skip() # copy gml file (but not .gfs file) open('tmp/ionic_wfs.gml', 'w').write(open('data/ionic_wfs.gml').read()) gml_ds = ogr.Open('tmp/ionic_wfs.gml') assert gml_ds.GetLayerCount() == 1, 'wrong number of layers' lyr = gml_ds.GetLayerByName('GEM') feat = lyr.GetNextFeature() assert feat.GetField('Name') == 'Aartselaar', 'Wrong name field value' wkt = 'POLYGON ((44038 511549,44015 511548,43994 511522,43941 511539,43844 511514,43754 511479,43685 511521,43594 511505,43619 511452,43645 511417,4363 511387,437 511346,43749 511298,43808 511229,43819 511205,4379 511185,43728 511167,43617 511175,43604 511151,43655 511125,43746 511143,43886 511154,43885 511178,43928 511186,43977 511217,4404 511223,44008 511229,44099 51131,44095 511335,44106 51135,44127 511379,44124 511435,44137 511455,44105 511467,44098 511484,44086 511499,4407 511506,44067 511535,44038 511549))' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is None, 'got unexpected feature.' ############################################################################### # Similar test for RNF style line data. def test_ogr_gml_3(): if not gdaltest.have_gml_reader: pytest.skip() gml_ds = ogr.Open('data/rnf_eg.gml') assert gml_ds.GetLayerCount() == 1, 'wrong number of layers' lyr = gml_ds.GetLayerByName('RoadSegment') feat = lyr.GetNextFeature() assert feat.GetField('ngd_id') == 817792, 'Wrong ngd_id field value' assert feat.GetField('type') == 'HWY', 'Wrong type field value' wkt = 'LINESTRING (-63.500411040289066 46.240122507771368,-63.501009714909742 46.240344881690326,-63.502170462373471 46.241041855639622,-63.505862621395394 46.24195250605576,-63.506719184531178 46.242002742901576,-63.507197272602212 46.241931577811606,-63.508403092799554 46.241752283460158,-63.509946573455622 46.241745397977233)' assert not ogrtest.check_feature_geometry(feat, wkt) feat = lyr.GetNextFeature() assert feat is None, 'got unexpected feature.' ############################################################################### # Test of read GML file with UTF-8 BOM indicator. # Test also support for nested GML elements (#3680) def test_ogr_gml_4(): if not gdaltest.have_gml_reader: pytest.skip() gml_ds = ogr.Open('data/bom.gml') assert gml_ds.GetLayerCount() == 1, 'wrong number of layers' lyr = gml_ds.GetLayerByName('CartographicText') assert lyr.GetFeatureCount() == 3, 'wrong number of features' # Test 1st feature feat = lyr.GetNextFeature() assert feat.GetField('featureCode') == 10198, 'Wrong featureCode field value' assert feat.GetField('anchorPosition') == 8, 'Wrong anchorPosition field value' wkt = 'POINT (347243.85 461299.5)' assert not ogrtest.check_feature_geometry(feat, wkt) # Test 2nd feature feat = lyr.GetNextFeature() assert feat.GetField('featureCode') == 10069, 'Wrong featureCode field value' wkt = 'POINT (347251.45 461250.85)' assert not ogrtest.check_feature_geometry(feat, wkt) ############################################################################### # Test of read GML file that triggeered bug #2349 def test_ogr_gml_5(): if not gdaltest.have_gml_reader: pytest.skip() gml_ds = ogr.Open('data/ticket_2349_test_1.gml') lyr = gml_ds.GetLayerByName('MyPolyline') lyr.SetAttributeFilter('height > 300') lyr.GetNextFeature() ############################################################################### # Test of various FIDs (various prefixes and lengths) (Ticket#1017) def test_ogr_gml_6(): if not gdaltest.have_gml_reader: pytest.skip() files = ['test_point1', 'test_point2', 'test_point3', 'test_point4'] fids = [] for filename in files: fids[:] = [] gml_ds = ogr.Open('data' + os.sep + filename + '.gml') lyr = gml_ds.GetLayer() feat = lyr.GetNextFeature() while feat is not None: if (feat.GetFID() < 0) or (feat.GetFID() in fids): gml_ds = None os.remove('data' + os.sep + filename + '.gfs') pytest.fail('Wrong FID value') fids.append(feat.GetFID()) feat = lyr.GetNextFeature() gml_ds = None os.remove('data' + os.sep + filename + '.gfs') ############################################################################### # Test of colon terminated prefixes for attribute values (Ticket#2493) def test_ogr_gml_7(): if not gdaltest.have_gml_reader: pytest.skip() gdal.SetConfigOption('GML_EXPOSE_FID', 'FALSE') gml_ds = ogr.Open('data/test_point.gml') gdal.SetConfigOption('GML_EXPOSE_FID', None) lyr = gml_ds.GetLayer() ldefn = lyr.GetLayerDefn() # Test fix for #2969 assert lyr.GetFeatureCount() == 5, 'Bad feature count' try: ldefn.GetFieldDefn(0).GetFieldTypeName except: pytest.skip() assert ldefn.GetFieldDefn(0).GetFieldTypeName(ldefn.GetFieldDefn(0).GetType()) == 'Real' assert ldefn.GetFieldDefn(1).GetFieldTypeName(ldefn.GetFieldDefn(1).GetType()) == 'Integer' assert ldefn.GetFieldDefn(2).GetFieldTypeName(ldefn.GetFieldDefn(2).GetType()) == 'String' ############################################################################### # Test a GML file with some non-ASCII UTF-8 content that triggered a bug (Ticket#2948) def test_ogr_gml_8(): if not gdaltest.have_gml_reader: pytest.skip() gml_ds = ogr.Open('data/utf8.gml') lyr = gml_ds.GetLayer() feat = lyr.GetNextFeature() if sys.version_info >= (3, 0, 0): assert feat.GetFieldAsString('name') == '\xc4\x80liamanu'.encode('latin1').decode('utf-8') else: assert feat.GetFieldAsString('name') == '\xc4\x80liamanu' ############################################################################### # Test writing invalid UTF-8 content in a GML file (ticket #2971) def test_ogr_gml_9(): if not gdaltest.have_gml_reader: pytest.skip() drv = ogr.GetDriverByName('GML') ds = drv.CreateDataSource('tmp/broken_utf8.gml') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('test', ogr.OFTString)) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetFieldBinaryFromHexString('test', '80626164') # \x80bad' # Avoid the warning gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(dst_feat) gdal.PopErrorHandler() assert ret == 0, 'CreateFeature failed.' ds = None ds = ogr.Open('tmp/broken_utf8.gml') lyr = ds.GetLayerByName('test') feat = lyr.GetNextFeature() assert feat.GetField('test') == '?bad', 'Unexpected content.' ds = None os.remove('tmp/broken_utf8.gml') os.remove('tmp/broken_utf8.xsd') ############################################################################### # Test writing different data types in a GML file (ticket #2857) # TODO: Add test for other data types as they are added to the driver. def test_ogr_gml_10(): if not gdaltest.have_gml_reader: pytest.skip() drv = ogr.GetDriverByName('GML') ds = drv.CreateDataSource('tmp/fields.gml') lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn('string', ogr.OFTString) field_defn.SetWidth(100) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('real', ogr.OFTReal) field_defn.SetWidth(4) field_defn.SetPrecision(2) lyr.CreateField(field_defn) lyr.CreateField(ogr.FieldDefn('float', ogr.OFTReal)) field_defn = ogr.FieldDefn('integer', ogr.OFTInteger) field_defn.SetWidth(5) lyr.CreateField(field_defn) lyr.CreateField(ogr.FieldDefn('date', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('time', ogr.OFTTime)) lyr.CreateField(ogr.FieldDefn('datetime', ogr.OFTDateTime)) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('string', 'test string of length 24') dst_feat.SetField('real', 12.34) dst_feat.SetField('float', 1234.5678) dst_feat.SetField('integer', '1234') dst_feat.SetField('date', '2019/11/06') dst_feat.SetField('time', '12:34:56') dst_feat.SetField('datetime', '2019/11/06 12:34:56+00') ret = lyr.CreateFeature(dst_feat) assert ret == 0, 'CreateFeature failed.' ds = None ds = ogr.Open('tmp/fields.gml') lyr = ds.GetLayerByName('test') feat = lyr.GetNextFeature() assert feat.GetFieldDefnRef(feat.GetFieldIndex('string')).GetType() == ogr.OFTString, \ ('String type is reported wrong. Got ' + str(feat.GetFieldDefnRef(feat.GetFieldIndex('string')).GetType())) assert feat.GetFieldDefnRef(feat.GetFieldIndex('real')).GetType() == ogr.OFTReal, \ ('Real type is reported wrong. Got ' + str(feat.GetFieldDefnRef(feat.GetFieldIndex('real')).GetType())) assert feat.GetFieldDefnRef(feat.GetFieldIndex('float')).GetType() == ogr.OFTReal, \ ('Float type is not reported as OFTReal. Got ' + str(feat.GetFieldDefnRef(feat.GetFieldIndex('float')).GetType())) assert feat.GetFieldDefnRef(feat.GetFieldIndex('integer')).GetType() == ogr.OFTInteger, \ ('Integer type is reported wrong. Got ' + str(feat.GetFieldDefnRef(feat.GetFieldIndex('integer')).GetType())) assert feat.GetFieldDefnRef(feat.GetFieldIndex('date')).GetType() == ogr.OFTDate assert feat.GetFieldDefnRef(feat.GetFieldIndex('time')).GetType() == ogr.OFTTime assert feat.GetFieldDefnRef(feat.GetFieldIndex('datetime')).GetType() == ogr.OFTDateTime assert feat.GetField('string') == 'test string of length 24', \ ('Unexpected string content.' + feat.GetField('string')) assert feat.GetFieldAsDouble('real') == 12.34, 'Unexpected real content.' assert feat.GetField('float') == 1234.5678, 'Unexpected float content.' assert feat.GetField('integer') == 1234, 'Unexpected integer content.' assert feat.GetField('date') == '2019/11/06' assert feat.GetField('time') == '12:34:56' assert feat.GetField('datetime') == '2019/11/06 12:34:56+00' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('string')).GetWidth() == 100, \ 'Unexpected width of string field.' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('real')).GetWidth() == 4, \ 'Unexpected width of real field.' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('real')).GetPrecision() == 2, \ 'Unexpected precision of real field.' assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('integer')).GetWidth() == 5, \ 'Unexpected width of integer field.' ds = None os.remove('tmp/fields.gml') os.remove('tmp/fields.xsd') ############################################################################### # Test reading a geometry element specified with def test_ogr_gml_11(): if not gdaltest.have_gml_reader: pytest.skip() # Make sure the .gfs file is more recent that the .gml one try: gml_mtime = os.stat('data/testgeometryelementpath.gml').st_mtime gfs_mtime = os.stat('data/testgeometryelementpath.gfs').st_mtime touch_gfs = gfs_mtime <= gml_mtime except: touch_gfs = True if touch_gfs: print('Touching .gfs file') f = open('data/testgeometryelementpath.gfs', 'rb+') data = f.read(1) f.seek(0, 0) f.write(data) f.close() ds = ogr.Open('data/testgeometryelementpath.gml') lyr = ds.GetLayer(0) assert lyr.GetGeometryColumn() == 'location1container|location1', \ 'did not get expected geometry column name' feat = lyr.GetNextFeature() assert feat.GetField('attrib1') == 'attrib1_value', \ 'did not get expected value for attrib1' assert feat.GetField('attrib2') == 'attrib2_value', \ 'did not get expected value for attrib2' geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (3 50)', 'did not get expected geometry' ds = None ############################################################################### # Test reading a virtual GML file def test_ogr_gml_12(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('/vsizip/data/testgeometryelementpath.zip/testgeometryelementpath.gml') lyr = ds.GetLayer(0) assert lyr.GetGeometryColumn() == 'location1container|location1', \ 'did not get expected geometry column name' feat = lyr.GetNextFeature() assert feat.GetField('attrib1') == 'attrib1_value', \ 'did not get expected value for attrib1' assert feat.GetField('attrib2') == 'attrib2_value', \ 'did not get expected value for attrib2' geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (3 50)', 'did not get expected geometry' ds = None ############################################################################### # Test reading GML with StringList, IntegerList and RealList fields def test_ogr_gml_13(): if not gdaltest.have_gml_reader: pytest.skip() for _ in range(2): ds = ogr.Open('data/testlistfields.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetFieldAsStringList(feat.GetFieldIndex('attrib1')) == ['value1', 'value2'], \ 'did not get expected value for attrib1' assert feat.GetField(feat.GetFieldIndex('attrib2')) == 'value3', \ 'did not get expected value for attrib2' assert feat.GetFieldAsIntegerList(feat.GetFieldIndex('attrib3')) == [4, 5], \ 'did not get expected value for attrib3' assert feat.GetFieldAsDoubleList(feat.GetFieldIndex('attrib4')) == [6.1, 7.1], \ 'did not get expected value for attrib4' ds = None gdal.Unlink('data/testlistfields.gfs') ############################################################################### # Test xlink resolution def test_ogr_gml_14(): if not gdaltest.have_gml_reader: pytest.skip() # We need CURL for xlink resolution, and a sign that Curl is available # is the availability of the WMS driver gdaltest.wms_drv = gdal.GetDriverByName('WMS') if gdaltest.wms_drv is None: pytest.skip() if gdaltest.gdalurlopen('http://download.osgeo.org/gdal/data/gml/xlink3.gml') is None: pytest.skip('cannot open URL') files = ['xlink1.gml', 'xlink2.gml', 'expected1.gml', 'expected2.gml'] for f in files: if not gdaltest.download_file('http://download.osgeo.org/gdal/data/gml/' + f, f): pytest.skip() gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', 'NONE') gdal.SetConfigOption('GML_SAVE_RESOLVED_TO', 'tmp/cache/xlink1resolved.gml') with gdaltest.error_handler(): gml_ds = ogr.Open('tmp/cache/xlink1.gml') gml_ds = None gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', 'gml:directedNode') gdal.SetConfigOption('GML_SAVE_RESOLVED_TO', 'tmp/cache/xlink2resolved.gml') gml_ds = ogr.Open('tmp/cache/xlink1.gml') del gml_ds gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', None) gdal.SetConfigOption('GML_SAVE_RESOLVED_TO', None) try: fp = open('tmp/cache/xlink1resolved.gml', 'r') text = fp.read() fp.close() os.remove('tmp/cache/xlink1resolved.gml') fp = open('tmp/cache/expected1.gml', 'r') expectedtext = fp.read() fp.close() except (IOError, OSError): pytest.fail() assert text == expectedtext, 'Problem with file 1' try: fp = open('tmp/cache/xlink2resolved.gml', 'r') text = fp.read() fp.close() os.remove('tmp/cache/xlink2resolved.gml') fp = open('tmp/cache/expected2.gml', 'r') expectedtext = fp.read() fp.close() except (IOError, OSError): pytest.fail() assert text == expectedtext, 'Problem with file 2' ############################################################################### # Run test_ogrsf def test_ogr_gml_15(): if not gdaltest.have_gml_reader: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test_point.gml') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Read CityGML generic attributes def test_ogr_gml_16(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/citygml.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('Name_') != 'aname' or \ feat.GetField('a_int_attr') != 2 or \ feat.GetField('a_double_attr') != 3.45: feat.DumpReadable() pytest.fail('did not get expected values') ############################################################################### # Read layer SRS for WFS 1.0.0 return def test_ogr_gml_17(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/gnis_pop_100.gml') lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert got_wkt.find('GEOGCS["WGS 84"') != -1, 'did not get expected SRS' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POINT (2.09 34.12)', 'did not get expected geometry' ############################################################################### # Read layer SRS for WFS 1.1.0 return def test_ogr_gml_18(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/gnis_pop_110.gml') lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert got_wkt.find('GEOGCS["WGS 84"') != -1, 'did not get expected SRS' assert sr.GetDataAxisToSRSAxisMapping() == [2, 1] feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POINT (2.09 34.12)', 'did not get expected geometry' ############################################################################### # Read layer SRS for WFS 1.1.0 return, but without trying to restore # (long, lat) order. So we should get EPSGA:4326 and (lat, long) order def test_ogr_gml_19(): if not gdaltest.have_gml_reader: pytest.skip() try: os.remove('data/gnis_pop_110.gfs') except OSError: pass gdal.SetConfigOption('GML_INVERT_AXIS_ORDER_IF_LAT_LONG', 'NO') ds = ogr.Open('data/gnis_pop_110.gml') gdal.SetConfigOption('GML_INVERT_AXIS_ORDER_IF_LAT_LONG', None) lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert 'GEOGCS["WGS 84"' in got_wkt, \ 'did not get expected SRS' assert sr.GetDataAxisToSRSAxisMapping() == [1, 2] feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POINT (34.12 2.09)', 'did not get expected geometry' ############################################################################### # Test parsing a .xsd where the type definition is before its reference def test_ogr_gml_20(): if not gdaltest.have_gml_reader: pytest.skip() try: os.remove('data/archsites.gfs') except OSError: pass ds = ogr.Open('data/archsites.gml') lyr = ds.GetLayer(0) ldefn = lyr.GetLayerDefn() try: ldefn.GetFieldDefn(0).GetFieldTypeName except: pytest.skip() idx = ldefn.GetFieldIndex("gml_id") assert idx != -1, 'did not get expected column "gml_id"' idx = ldefn.GetFieldIndex("cat") fddefn = ldefn.GetFieldDefn(idx) assert fddefn.GetFieldTypeName(fddefn.GetType()) == 'Integer64', \ 'did not get expected column type for col "cat"' idx = ldefn.GetFieldIndex("str1") fddefn = ldefn.GetFieldDefn(idx) assert fddefn.GetFieldTypeName(fddefn.GetType()) == 'String', \ 'did not get expected column type for col "str1"' assert lyr.GetGeometryColumn() == 'the_geom', \ 'did not get expected geometry column name' assert ldefn.GetGeomType() == ogr.wkbPoint, 'did not get expected geometry type' ds = None try: os.stat('data/archsites.gfs') pytest.fail('did not expected .gfs -> XSD parsing failed') except OSError: return ############################################################################### # Test writing GML3 def test_ogr_gml_21(frmt='GML3'): if not gdaltest.have_gml_reader: pytest.skip() # Create GML3 file sr = osr.SpatialReference() sr.ImportFromEPSG(4326) for filename in ['tmp/gml_21.gml', 'tmp/gml_21.xsd', 'tmp/gml_21.gfs']: try: os.remove(filename) except OSError: pass ds = ogr.GetDriverByName('GML').CreateDataSource('tmp/gml_21.gml', options=['FORMAT=' + frmt]) lyr = ds.CreateLayer('firstlayer', srs=sr) lyr.CreateField(ogr.FieldDefn('string_field', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo') geom = ogr.CreateGeometryFromWkt('POINT (3 48)') feat.SetGeometry(geom) lyr.CreateFeature(feat) ds = None # Reopen the file ds = ogr.Open('tmp/gml_21.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (2 49)', \ 'did not get expected geometry' ds = None # Test that .gml and .xsd are identical to what is expected f1 = open('tmp/gml_21.gml', 'rt') if frmt == 'GML3.2': f2 = open('data/expected_gml_gml32.gml', 'rt') else: f2 = open('data/expected_gml_21.gml', 'rt') line1 = f1.readline() line2 = f2.readline() while line1 != '': line1 = line1.strip() line2 = line2.strip() if line1 != line2: print(open('tmp/gml_21.gml', 'rt').read()) pytest.fail('.gml file not identical to expected') line1 = f1.readline() line2 = f2.readline() f1.close() f2.close() f1 = open('tmp/gml_21.xsd', 'rt') if frmt == 'GML3': f2 = open('data/expected_gml_21.xsd', 'rt') elif frmt == 'GML3.2': f2 = open('data/expected_gml_gml32.xsd', 'rt') else: f2 = open('data/expected_gml_21_deegree3.xsd', 'rt') line1 = f1.readline() line2 = f2.readline() while line1 != '': line1 = line1.strip() line2 = line2.strip() if line1 != line2: print(open('tmp/gml_21.xsd', 'rt').read()) pytest.fail('.xsd file not identical to expected') line1 = f1.readline() line2 = f2.readline() f1.close() f2.close() def test_ogr_gml_21_deegree3(): return test_ogr_gml_21('GML3Deegree') def test_ogr_gml_21_gml32(): return test_ogr_gml_21('GML3.2') ############################################################################### # Read a OpenLS DetermineRouteResponse document def test_ogr_gml_22(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/paris_typical_strike_demonstration.xml') lyr = ds.GetLayerByName('RouteGeometry') assert lyr is not None, 'cannot find RouteGeometry' lyr = ds.GetLayerByName('RouteInstruction') assert lyr is not None, 'cannot find RouteInstruction' count = lyr.GetFeatureCount() assert count == 9, 'did not get expected feature count' ds = None ############################################################################### # Test that use SRS defined in global gml:Envelope if no SRS is set for any # feature geometry def test_ogr_gml_23(): if not gdaltest.have_gml_reader: pytest.skip() try: os.remove('tmp/global_geometry.gfs') except OSError: pass shutil.copy('data/global_geometry.xml', 'tmp/global_geometry.xml') # Here we use only the .xml file ds = ogr.Open('tmp/global_geometry.xml') lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert 'GEOGCS["WGS 84"' in got_wkt, \ 'did not get expected SRS' assert lyr.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [2, 1] feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POINT (2 49)', 'did not get expected geometry' extent = lyr.GetExtent() assert extent == (2.0, 3.0, 49.0, 50.0), 'did not get expected layer extent' ############################################################################### # Test that use SRS defined in global gml:Envelope if no SRS is set for any # feature geometry def test_ogr_gml_24(): if not gdaltest.have_gml_reader: pytest.skip() try: os.remove('data/global_geometry.gfs') except OSError: pass # Here we use only the .xml file and the .xsd file ds = ogr.Open('data/global_geometry.xml') lyr = ds.GetLayer(0) # Because we read the .xsd, we (currently) don't find the SRS # sr = lyr.GetSpatialRef() # got_wkt = sr.ExportToWkt() # if got_wkt.find('GEOGCS["WGS 84"') == -1 or \ # got_wkt.find('AXIS["Latitude",NORTH],AXIS["Longitude",EAST]') != -1: # gdaltest.post_reason('did not get expected SRS') # print(got_wkt) # return 'fail' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POINT (2 49)', 'did not get expected geometry' extent = lyr.GetExtent() assert extent == (2.0, 3.0, 49.0, 50.0), 'did not get expected layer extent' ############################################################################### # Test fixes for #3934 and #3935 def test_ogr_gml_25(): if not gdaltest.have_gml_reader: pytest.skip() if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would crash') try: os.remove('data/curveProperty.gfs') except OSError: pass gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', 'YES') ds = ogr.Open('data/curveProperty.xml') gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', None) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POLYGON ((14 21,6 21,6 9,14 9,22 9,22 21,14 21))', \ 'did not get expected geometry' ############################################################################### # Test writing and reading 3D geoms (GML2) def test_ogr_gml_26(): if not gdaltest.have_gml_reader: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/ogr_gml_26.gml data/poly.shp -zfield eas_id') f = open('tmp/ogr_gml_26.gml', 'rt') content = f.read() f.close() assert content.find("478315.531254762880.5158") != -1 ds = ogr.Open('tmp/ogr_gml_26.gml') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPolygon25D ds = None ############################################################################### # Test writing and reading 3D geoms (GML3) def test_ogr_gml_27(): if not gdaltest.have_gml_reader: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/ogr_gml_27.gml data/poly.shp -zfield eas_id -dsco FORMAT=GML3') f = open('tmp/ogr_gml_27.gml', 'rt') content = f.read() f.close() assert content.find("478315.53125 4762880.5 158") != -1 ds = ogr.Open('tmp/ogr_gml_27.gml') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPolygon25D ds = None ############################################################################### # Test writing and reading layers of type wkbNone (#4154) def test_ogr_gml_28(): if not gdaltest.have_gml_reader: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/ogr_gml_28.gml data/idlink.dbf') # Try with .xsd ds = ogr.Open('tmp/ogr_gml_28.gml') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbNone ds = None os.unlink('tmp/ogr_gml_28.xsd') ds = ogr.Open('tmp/ogr_gml_28.gml') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbNone ds = None # Try with .gfs ds = ogr.Open('tmp/ogr_gml_28.gml') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbNone ds = None ############################################################################### # Test reading FME GMLs def test_ogr_gml_29(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/testfmegml.gml') expected_results = [[ogr.wkbMultiPoint, 'MULTIPOINT (2 49)'], [ogr.wkbMultiPolygon, 'MULTIPOLYGON (((2 49,3 49,3 50,2 50,2 49)))'], [ogr.wkbMultiLineString, 'MULTILINESTRING ((2 49,3 50))'], ] for j, expected_result in enumerate(expected_results): lyr = ds.GetLayer(j) assert lyr.GetGeomType() == expected_result[0], \ ('layer %d, did not get expected layer geometry type' % j) for _ in range(2): feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == expected_result[1], \ ('layer %d, did not get expected geometry' % j) ds = None ############################################################################### # Test reading a big field and a big geometry def test_ogr_gml_30(): if not gdaltest.have_gml_reader: pytest.skip() field1 = " " for _ in range(11): field1 = field1 + field1 geom = "0 1 " * 512 data = """ %s A%sZ """ % (geom, field1) f = gdal.VSIFOpenL("/vsimem/ogr_gml_30.gml", "wb") gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) ds = ogr.Open("/vsimem/ogr_gml_30.gml") lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() field1 = feat.GetField(0) geom_wkt = feat.GetGeometryRef().ExportToWkt() ds = None gdal.Unlink("/vsimem/ogr_gml_30.gml") gdal.Unlink("/vsimem/ogr_gml_30.gfs") assert len(field1) == 2050, 'did not get expected len(field1)' assert len(geom_wkt) == 2060, 'did not get expected len(geom_wkt)' ############################################################################### # Test SEQUENTIAL_LAYERS def test_ogr_gml_31(): if not gdaltest.have_gml_reader: pytest.skip() gdal.SetConfigOption('GML_READ_MODE', 'SEQUENTIAL_LAYERS') test_ogr_gml_29() gdal.SetConfigOption('GML_READ_MODE', None) # Test reading second layer and then first layer gdal.SetConfigOption('GML_READ_MODE', 'SEQUENTIAL_LAYERS') ds = ogr.Open('data/testfmegml.gml') gdal.SetConfigOption('GML_READ_MODE', None) lyr = ds.GetLayer(1) feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() assert feat.GetFID() == 1, 'did not get feature when reading directly second layer' lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() assert feat.GetFID() == 1, 'did not get feature when reading back first layer' ############################################################################### # Test SEQUENTIAL_LAYERS without a .gfs def test_ogr_gml_32(): if not gdaltest.have_gml_reader: pytest.skip() # Test without .xsd or .gfs f = gdal.VSIFOpenL("data/testfmegml.gml", "rb") data = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) f = gdal.VSIFOpenL("/vsimem/ogr_gml_31.gml", "wb") gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/ogr_gml_31.gml') lyr = ds.GetLayer(1) feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() assert feat.GetFID() == 1, 'did not get feature when reading directly second layer' ds = None f = gdal.VSIFOpenL("/vsimem/ogr_gml_31.gfs", "rb") data = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) data = str(data) assert data.find("true") != -1, \ 'did not find true in .gfs' gdal.Unlink("/vsimem/ogr_gml_31.gml") gdal.Unlink("/vsimem/ogr_gml_31.gfs") ############################################################################### # Test INTERLEAVED_LAYERS def test_ogr_gml_33(): if not gdaltest.have_gml_reader: pytest.skip() # Test reading second layer and then first layer gdal.SetConfigOption('GML_READ_MODE', 'INTERLEAVED_LAYERS') ds = ogr.Open('data/testfmegml_interleaved.gml') gdal.SetConfigOption('GML_READ_MODE', None) read_sequence = [[0, 1], [0, None], [1, 3], [2, 5], [2, None], [0, 2], [1, 4], [1, None], [2, 6], [2, None], [0, None], [1, None], [2, None]] for i, read_seq in enumerate(read_sequence): lyr = ds.GetLayer(read_seq[0]) feat = lyr.GetNextFeature() if feat is None: fid = None else: fid = feat.GetFID() expected_fid = read_seq[1] assert fid == expected_fid, ('failed at step %d' % i) ############################################################################### # Test writing non-ASCII UTF-8 content (#4117, #4299) def test_ogr_gml_34(): if not gdaltest.have_gml_reader: pytest.skip() drv = ogr.GetDriverByName('GML') ds = drv.CreateDataSource('/vsimem/ogr_gml_34.gml') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn("name", ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '\xc4\x80liamanu<&') lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('/vsimem/ogr_gml_34.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetFieldAsString('name') == '\xc4\x80liamanu<&' ds = None gdal.Unlink('/vsimem/ogr_gml_34.gml') gdal.Unlink('/vsimem/ogr_gml_34.xsd') ############################################################################### # Test GML_SKIP_RESOLVE_ELEMS=HUGE (#4380) def test_ogr_gml_35(): if not gdaltest.have_gml_reader: pytest.skip() if ogr.GetDriverByName('SQLite') is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.remove('tmp/GmlTopo-sample.sqlite') except OSError: pass try: os.remove('tmp/GmlTopo-sample.gfs') except OSError: pass try: os.remove('tmp/GmlTopo-sample.resolved.gml') except OSError: pass shutil.copy('data/GmlTopo-sample.xml', 'tmp/GmlTopo-sample.xml') gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', 'HUGE') ds = ogr.Open('tmp/GmlTopo-sample.xml') gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', None) assert not os.path.exists('tmp/GmlTopo-sample.sqlite') assert gdal.GetLastErrorMsg() == '', 'did not expect error' assert ds.GetLayerCount() == 3, ('expected 3 layers, got %d' % ds.GetLayerCount()) lyr = ds.GetLayerByName('Suolo') feat = lyr.GetNextFeature() wkt = 'MULTIPOLYGON (((-0.1 0.6,-0.0 0.7,0.2 0.7,0.3 0.6,0.5 0.6,0.5 0.8,0.7 0.8,0.8 0.6,0.9 0.6,0.9 0.4,0.7 0.3,0.7 0.2,0.9 0.1,0.9 -0.1,0.6 -0.2,0.3 -0.2,0.2 -0.2,-0.1 0.0,-0.1 0.1,-0.1 0.2,0.1 0.3,0.1 0.4,-0.0 0.4,-0.1 0.5,-0.1 0.6)))' assert not ogrtest.check_feature_geometry(feat, wkt), feat.GetGeometryRef() ds = None ds = ogr.Open('tmp/GmlTopo-sample.xml') lyr = ds.GetLayerByName('Suolo') feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, wkt), feat.GetGeometryRef() ds = None ############################################################################### # Test GML_SKIP_RESOLVE_ELEMS=NONE (and new GMLTopoSurface interpretation) def test_ogr_gml_36(GML_FACE_HOLE_NEGATIVE='NO'): if not gdaltest.have_gml_reader: pytest.skip() if GML_FACE_HOLE_NEGATIVE == 'NO': if not ogrtest.have_geos(): pytest.skip() try: os.remove('tmp/GmlTopo-sample.gfs') except OSError: pass try: os.remove('tmp/GmlTopo-sample.resolved.gml') except OSError: pass shutil.copy('data/GmlTopo-sample.xml', 'tmp/GmlTopo-sample.xml') gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', 'NONE') gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', GML_FACE_HOLE_NEGATIVE) ds = ogr.Open('tmp/GmlTopo-sample.xml') gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', None) gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', None) assert gdal.GetLastErrorMsg() == '', 'did not expect error' lyr = ds.GetLayerByName('Suolo') feat = lyr.GetNextFeature() if GML_FACE_HOLE_NEGATIVE == 'NO': wkt = 'MULTIPOLYGON (((-0.1 0.6,-0.0 0.7,0.2 0.7,0.3 0.6,0.5 0.6,0.5 0.8,0.7 0.8,0.8 0.6,0.9 0.6,0.9 0.4,0.7 0.3,0.7 0.2,0.9 0.1,0.9 -0.1,0.6 -0.2,0.3 -0.2,0.2 -0.2,-0.1 0.0,-0.1 0.1,-0.1 0.2,0.1 0.3,0.1 0.4,-0.0 0.4,-0.1 0.5,-0.1 0.6)))' else: wkt = 'POLYGON ((-0.1 0.6,-0.0 0.7,0.2 0.7,0.3 0.6,0.5 0.6,0.5 0.8,0.7 0.8,0.8 0.6,0.9 0.6,0.9 0.4,0.7 0.3,0.7 0.2,0.9 0.1,0.9 -0.1,0.6 -0.2,0.3 -0.2,0.2 -0.2,-0.1 0.0,-0.1 0.1,-0.1 0.2,0.1 0.3,0.1 0.4,-0.0 0.4,-0.1 0.5,-0.1 0.6),(0.2 0.2,0.2 0.4,0.4 0.4,0.5 0.2,0.5 0.1,0.5 0.0,0.2 0.0,0.2 0.2),(0.6 0.1,0.8 0.1,0.8 -0.1,0.6 -0.1,0.6 0.1))' assert not ogrtest.check_feature_geometry(feat, wkt), feat.GetGeometryRef() ds = None gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', GML_FACE_HOLE_NEGATIVE) ds = ogr.Open('tmp/GmlTopo-sample.xml') gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', None) lyr = ds.GetLayerByName('Suolo') feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, wkt), feat.GetGeometryRef() ds = None ############################################################################### # Test GML_SKIP_RESOLVE_ELEMS=NONE with old GMLTopoSurface interpretation def test_ogr_gml_37(): return test_ogr_gml_36('YES') ############################################################################### # Test new GMLTopoSurface interpretation (#3934) with HUGE xlink resolver def test_ogr_gml_38(resolver='HUGE'): if not gdaltest.have_gml_reader: pytest.skip() if resolver == 'HUGE': if ogr.GetDriverByName('SQLite') is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.remove('tmp/sample_gml_face_hole_negative_no.sqlite') except OSError: pass try: os.remove('tmp/sample_gml_face_hole_negative_no.gfs') except OSError: pass try: os.remove('tmp/sample_gml_face_hole_negative_no.resolved.gml') except OSError: pass shutil.copy('data/sample_gml_face_hole_negative_no.xml', 'tmp/sample_gml_face_hole_negative_no.xml') gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', resolver) ds = ogr.Open('tmp/sample_gml_face_hole_negative_no.xml') gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', None) gdal.SetConfigOption('GML_FACE_HOLE_NEGATIVE', None) if resolver == 'HUGE': assert not os.path.exists('tmp/sample_gml_face_hole_negative_no.sqlite') assert gdal.GetLastErrorMsg() == '', 'did not expect error' lyr = ds.GetLayerByName('Suolo') feat = lyr.GetNextFeature() wkt = 'MULTIPOLYGON (((0.9 0.6,0.9 0.4,0.7 0.3,0.7 0.2,0.9 0.1,0.9 -0.1,0.6 -0.2,0.3 -0.2,0.2 -0.2,-0.1 0.0,-0.1 0.1,-0.1 0.2,0.1 0.3,0.1 0.4,-0.0 0.4,-0.1 0.5,-0.1 0.6,-0.0 0.7,0.2 0.7,0.3 0.6,0.5 0.6,0.5 0.8,0.7 0.8,0.8 0.6,0.9 0.6),(0.6 0.1,0.6 -0.1,0.8 -0.1,0.8 0.1,0.6 0.1),(0.2 0.4,0.2 0.2,0.2 0.0,0.5 0.0,0.5 0.1,0.5 0.2,0.4 0.4,0.2 0.4)))' assert not ogrtest.check_feature_geometry(feat, wkt), feat.GetGeometryRef() ds = None ############################################################################### # Test new GMLTopoSurface interpretation (#3934) with standard xlink resolver def test_ogr_gml_39(): return test_ogr_gml_38('NONE') ############################################################################### # Test parsing XSD where simpleTypes not inlined, but defined elsewhere in the .xsd (#4328) def test_ogr_gml_40(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/testLookForSimpleType.xml') lyr = ds.GetLayer(0) fld_defn = lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('CITYNAME')) assert fld_defn.GetWidth() == 26 ############################################################################### # Test validating against .xsd def test_ogr_gml_41(): gdaltest.have_gml_validation = False if not gdaltest.have_gml_reader: pytest.skip() if not gdaltest.download_file('http://schemas.opengis.net/SCHEMAS_OPENGIS_NET.zip', 'SCHEMAS_OPENGIS_NET.zip'): pytest.skip() ds = ogr.Open('data/expected_gml_21.gml') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', '/vsizip/./tmp/cache/SCHEMAS_OPENGIS_NET.zip') lyr = ds.ExecuteSQL('SELECT ValidateSchema()') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', None) feat = lyr.GetNextFeature() val = feat.GetFieldAsInteger(0) feat = None ds.ReleaseResultSet(lyr) if val == 0: assert gdal.GetLastErrorMsg().find('not implemented due to missing libxml2 support') != -1 pytest.skip() gdaltest.have_gml_validation = True ############################################################################### # Test validating against .xsd def test_ogr_gml_42(): if not gdaltest.have_gml_validation: pytest.skip() try: os.mkdir('tmp/cache/SCHEMAS_OPENGIS_NET') except OSError: pass try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET/gml') except OSError: gdaltest.unzip('tmp/cache/SCHEMAS_OPENGIS_NET', 'tmp/cache/SCHEMAS_OPENGIS_NET.zip') ds = ogr.Open('data/expected_gml_gml32.gml') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', './tmp/cache/SCHEMAS_OPENGIS_NET') lyr = ds.ExecuteSQL('SELECT ValidateSchema()') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', None) feat = lyr.GetNextFeature() val = feat.GetFieldAsInteger(0) feat = None ds.ReleaseResultSet(lyr) assert val != 0 ############################################################################### # Test automated downloading of WFS schema def test_ogr_gml_43(): # The service times out pytest.skip() # pylint: disable=unreachable if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/wfs_typefeature.gml') assert ds is not None ds = None try: os.stat('data/wfs_typefeature.gfs') gfs_found = True except OSError: gfs_found = False if gfs_found: if gdaltest.gdalurlopen('http://testing.deegree.org:80/deegree-wfs/services?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=app:Springs&NAMESPACE=xmlns(app=http://www.deegree.org/app)') is None: can_download_schema = False else: can_download_schema = gdal.GetDriverByName('HTTP') is not None assert not can_download_schema, '.gfs found, but schema could be downloaded' ############################################################################### # Test providing a custom XSD filename def test_ogr_gml_44(): if not gdaltest.have_gml_reader: pytest.skip() xsd_content = """ """ gdal.FileFromMemBuffer('/vsimem/ogr_gml_44.xsd', xsd_content) ds = ogr.Open('data/test_point.gml,xsd=/vsimem/ogr_gml_44.xsd') lyr = ds.GetLayer(0) # fid and dbl assert lyr.GetLayerDefn().GetFieldCount() == 2 ds = None gdal.Unlink('/vsimem/ogr_gml_44.xsd') ############################################################################### # Test PREFIX and TARGET_NAMESPACE creation options def test_ogr_gml_45(): if not gdaltest.have_gml_reader: pytest.skip() drv = ogr.GetDriverByName('GML') ds = drv.CreateDataSource('/vsimem/ogr_gml_45.gml', options=['PREFIX=foo', 'TARGET_NAMESPACE=http://bar/']) lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('dbl', ogr.OFTReal)) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('str', 'str') dst_feat.SetField('int', 1) dst_feat.SetField('dbl', 2.34) lyr.CreateFeature(dst_feat) dst_feat = None ds = None if not gdaltest.have_gml_validation: gdal.Unlink('/vsimem/ogr_gml_45.gml') gdal.Unlink('/vsimem/ogr_gml_45.xsd') pytest.skip() # Validate document ds = ogr.Open('/vsimem/ogr_gml_45.gml') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', './tmp/cache/SCHEMAS_OPENGIS_NET') lyr = ds.ExecuteSQL('SELECT ValidateSchema()') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', None) feat = lyr.GetNextFeature() val = feat.GetFieldAsInteger(0) feat = None ds.ReleaseResultSet(lyr) ds = None gdal.Unlink('/vsimem/ogr_gml_45.gml') gdal.Unlink('/vsimem/ogr_gml_45.xsd') assert val != 0 ############################################################################### # Validate different kinds of GML files def test_ogr_gml_46(): if not gdaltest.have_gml_validation: pytest.skip() wkt_list = ['', 'POINT (0 1)', # 'POINT (0 1 2)', 'LINESTRING (0 1,2 3)', # 'LINESTRING (0 1 2,3 4 5)', 'POLYGON ((0 0,0 1,1 1,1 0,0 0))', # 'POLYGON ((0 0 10,0 1 10,1 1 10,1 0 10,0 0 10))', 'MULTIPOINT (0 1)', # 'MULTIPOINT (0 1 2)', 'MULTILINESTRING ((0 1,2 3))', # 'MULTILINESTRING ((0 1 2,3 4 5))', 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))', # 'MULTIPOLYGON (((0 0 10,0 1 10,1 1 10,1 0 10,0 0 10)))', 'GEOMETRYCOLLECTION (POINT (0 1))', # 'GEOMETRYCOLLECTION (POINT (0 1 2))' ] format_list = ['GML2', 'GML3', 'GML3Deegree', 'GML3.2'] for wkt in wkt_list: for frmt in format_list: drv = ogr.GetDriverByName('GML') ds = drv.CreateDataSource('/vsimem/ogr_gml_46.gml', options=['FORMAT=%s' % frmt]) if wkt != '': geom = ogr.CreateGeometryFromWkt(wkt) geom_type = geom.GetGeometryType() srs = osr.SpatialReference() srs.ImportFromEPSG(4326) else: geom = None geom_type = ogr.wkbNone srs = None lyr = ds.CreateLayer('test', geom_type=geom_type, srs=srs) lyr.CreateField(ogr.FieldDefn('str', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('dbl', ogr.OFTReal)) dst_feat = ogr.Feature(lyr.GetLayerDefn()) dst_feat.SetField('str', 'str') dst_feat.SetField('int', 1) dst_feat.SetField('dbl', 2.34) dst_feat.SetGeometry(geom) lyr.CreateFeature(dst_feat) dst_feat = None ds = None # Validate document ds = ogr.Open('/vsimem/ogr_gml_46.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() got_geom = feat.GetGeometryRef() if got_geom is None: got_geom_wkt = '' else: got_geom_wkt = got_geom.ExportToWkt() if got_geom_wkt != wkt: gdaltest.post_reason('geometry do not match') print('got %s, expected %s' % (got_geom_wkt, wkt)) feat = None gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', './tmp/cache/SCHEMAS_OPENGIS_NET') lyr = ds.ExecuteSQL('SELECT ValidateSchema()') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', None) feat = lyr.GetNextFeature() val = feat.GetFieldAsInteger(0) feat = None ds.ReleaseResultSet(lyr) ds = None if val == 0: gdaltest.post_reason('validation failed for format=%s, wkt=%s' % (frmt, wkt)) f = gdal.VSIFOpenL('/vsimem/ogr_gml_46.gml', 'rb') content = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) print(content) f = gdal.VSIFOpenL('/vsimem/ogr_gml_46.xsd', 'rb') content = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) print(content) gdal.Unlink('/vsimem/ogr_gml_46.gml') gdal.Unlink('/vsimem/ogr_gml_46.xsd') assert val != 0 # Only minor schema changes if frmt == 'GML3Deegree': break ############################################################################### # Test validation of WFS GML documents def test_ogr_gml_47(): if not gdaltest.have_gml_validation: pytest.skip() filenames = ['data/wfs10.xml', 'data/wfs11.xml', 'data/wfs20.xml'] for filename in filenames: # Validate document ds = ogr.Open(filename) gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', './tmp/cache/SCHEMAS_OPENGIS_NET') lyr = ds.ExecuteSQL('SELECT ValidateSchema()') gdal.SetConfigOption('GDAL_OPENGIS_SCHEMAS', None) feat = lyr.GetNextFeature() val = feat.GetFieldAsInteger(0) feat = None ds.ReleaseResultSet(lyr) ds = None assert val != 0, ('validation failed for file=%s' % filename) ############################################################################### # Test that we can parse some particular .xsd files that have the geometry # field declared as : # # # # # # # def test_ogr_gml_48(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('data/schema_with_geom_in_complextype.gfs') ds = ogr.Open('data/schema_with_geom_in_complextype.xml') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbUnknown assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTString ds = None ############################################################################### # Test a pseudo Inspire GML file def test_ogr_gml_49(): if not gdaltest.have_gml_reader: pytest.skip() xsd_content = """ 2,49 2,50 3,50 3,49 2,49 -2 -49 """ gdal.FileFromMemBuffer('/vsimem/ogr_gml_49.gml', xsd_content) ds = ogr.Open('/vsimem/ogr_gml_49.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetGeometryRef().GetGeometryType() == ogr.wkbPolygon ds = None # Now with .gfs file present (#6247) ds = ogr.Open('/vsimem/ogr_gml_49.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetGeometryRef().GetGeometryType() == ogr.wkbPolygon ds = None gdal.Unlink('/vsimem/ogr_gml_49.gml') gdal.Unlink('/vsimem/ogr_gml_49.gfs') ############################################################################### # Test support for StringList, IntegerList, RealList def test_ogr_gml_50(): if not gdaltest.have_gml_reader: pytest.skip() drv = ogr.GetDriverByName('GML') ds = drv.CreateDataSource('/vsimem/ogr_gml_50.gml') lyr = ds.CreateLayer('listlayer') field_defn = ogr.FieldDefn('stringlist', ogr.OFTStringList) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('intlist', ogr.OFTIntegerList) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('reallist', ogr.OFTRealList) lyr.CreateField(field_defn) feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) feat.SetFieldStringList(0, ['a', 'b']) feat.SetFieldIntegerList(1, [2, 3]) feat.SetFieldDoubleList(2, [4.56, 5.67]) lyr.CreateFeature(feat) ds = None ds = ogr.Open('/vsimem/ogr_gml_50.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsStringList(lyr.GetLayerDefn().GetFieldIndex('stringlist')) != ['a', 'b']: feat.DumpReadable() pytest.fail() if feat.GetFieldAsIntegerList(lyr.GetLayerDefn().GetFieldIndex('intlist')) != [2, 3]: feat.DumpReadable() pytest.fail() if feat.GetFieldAsDoubleList(lyr.GetLayerDefn().GetFieldIndex('reallist')) != [4.56, 5.67]: feat.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_gml_50.gml') gdal.Unlink('/vsimem/ogr_gml_50.xsd') ############################################################################### # Test -dsco WRITE_FEATURE_BOUNDED_BY=no -dsco STRIP_PREFIX=YES def test_ogr_gml_51(): if not gdaltest.have_gml_reader: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() for frmt in ['GML2', 'GML3']: gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/ogr_gml_51.gml data/poly.shp -dsco FORMAT=%s -dsco WRITE_FEATURE_BOUNDED_BY=no -dsco STRIP_PREFIX=YES' % frmt) f = open('tmp/ogr_gml_51.gml', 'rt') content = f.read() f.close() assert content.find("") != -1 assert content.find("""215229.266""") != -1 assert content.find("""479647""") == -1 ds = ogr.Open('tmp/ogr_gml_51.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ds = None ############################################################################### # Test reading MTKGML files def test_ogr_gml_52(): if not gdaltest.have_gml_reader: pytest.skip() try: os.remove('data/fake_mtkgml.gfs') except OSError: pass for _ in range(2): ds = ogr.Open('data/fake_mtkgml.xml') lyr = ds.GetLayerByName('A') assert lyr.GetGeomType() == ogr.wkbPoint25D srs = lyr.GetSpatialRef() assert srs is not None wkt = srs.ExportToWkt() assert '3067' in wkt feat = lyr.GetNextFeature() if feat.GetField('gid') != '1' or \ feat.GetField('regular_attribute') != 5 or \ feat.GetField('foo_href') != 'some_ref' or \ feat.GetField('teksti') != 'En francais !' or \ feat.GetField('teksti_kieli') != 'fr' or \ ogrtest.check_feature_geometry(feat, 'POINT (280000 7000000 0)') != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('B') assert lyr.GetGeomType() == ogr.wkbPolygon25D srs = lyr.GetSpatialRef() assert srs is not None feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POLYGON ((280000 7000000 0,281000 7000000 0,281000 7001000 0,280000 7001000 0,280000 7000000 0))') != 0: feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('C') assert lyr.GetGeomType() == ogr.wkbLineString25D feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'LINESTRING (280000 7000000 0,281000 7000000 0,281000 7001000 0,280000 7001000 0,280000 7000000 0)') != 0: feat.DumpReadable() pytest.fail() ds = None os.remove('data/fake_mtkgml.gfs') ############################################################################### # Test that we don't recognize .xsd files themselves def test_ogr_gml_53(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/archsites.xsd') assert ds is None ds = None ############################################################################### # Test that we can open an empty GML datasource (#249, #5205) def test_ogr_gml_54(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('data/empty.gfs') ds = ogr.Open('data/empty.gml') assert ds is not None ds = None # with .gfs now ds = ogr.Open('data/empty.gml') assert ds is not None ds = None gdal.Unlink('data/empty.gfs') ############################################################################### # Test support for in schemas # Necessary for Finnish NLS data def test_ogr_gml_55(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/ogr_gml_55.gml') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTString ds = None with pytest.raises(OSError): os.unlink('data/ogr_gml_55.gfs') ############################################################################### # Test support for gml:FeaturePropertyType and multiple geometry field # Necessary for Finnish NLS data def test_ogr_gml_56(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('data/ogr_gml_56.gfs') gdal.SetConfigOption('GML_REGISTRY', 'data/ogr_gml_56_registry.xml') ds = ogr.Open('data/ogr_gml_56.gml') gdal.SetConfigOption('GML_REGISTRY', None) lyr = ds.GetLayerByName('mainFeature') assert lyr.GetSpatialRef() is not None feat = lyr.GetNextFeature() assert feat.GetFieldAsString(feat.GetFieldIndex('subFeatureProperty_href')) == '#subFeature.0' assert feat.GetFieldAsStringList(feat.GetFieldIndex('subFeatureRepeatedProperty_href')) == ['#subFeatureRepeated.0', '#subFeatureRepeated.1'] assert feat.GetGeomFieldRef(0).ExportToWkt() == 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' assert feat.GetGeomFieldRef(1).ExportToWkt() == 'POINT (10 10)' lyr = ds.GetLayerByName('subFeature') assert lyr.GetLayerDefn().GetGeomFieldCount() == 0 feat = lyr.GetNextFeature() assert feat.GetFieldAsStringList(feat.GetFieldIndex('subFeatureRepeatedProperty_href')) == ['#subFeatureRepeated.2'] assert feat.GetField('foo') == 'bar' lyr = ds.GetLayerByName('subFeatureRepeated') feat = lyr.GetNextFeature() assert feat.GetField('gml_id') == 'subFeatureRepeated.2' assert feat.GetField('bar') == 'baz' feat = lyr.GetNextFeature() assert feat.GetField('gml_id') == 'subFeatureRepeated.0' feat = lyr.GetNextFeature() assert feat.GetField('gml_id') == 'subFeatureRepeated.1' ds = None with pytest.raises(OSError): os.unlink('data/ogr_gml_56.gfs') ############################################################################### # Test write support for multiple geometry field def test_ogr_gml_57(): if not gdaltest.have_gml_reader: pytest.skip() for i in range(4): options = [] if i == 3: options = ['FORMAT=GML3.2'] ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_57.gml', options=options) assert ds.TestCapability(ogr.ODsCCreateGeomFieldAfterCreateLayer) == 1 lyr = ds.CreateLayer('myLayer', geom_type=ogr.wkbNone) assert lyr.TestCapability(ogr.OLCCreateGeomField) == 1 geomfielddefn = ogr.GeomFieldDefn('first_geometry', ogr.wkbPoint) if i == 1 or i == 2: sr = osr.SpatialReference() sr.ImportFromEPSG(32630) geomfielddefn.SetSpatialRef(sr) lyr.CreateGeomField(geomfielddefn) geomfielddefn = ogr.GeomFieldDefn('second_geometry', ogr.wkbLineString) if i == 1: sr = osr.SpatialReference() sr.ImportFromEPSG(32630) geomfielddefn.SetSpatialRef(sr) elif i == 2: sr = osr.SpatialReference() sr.ImportFromEPSG(32631) geomfielddefn.SetSpatialRef(sr) lyr.CreateGeomField(geomfielddefn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeomFieldDirectly(0, ogr.CreateGeometryFromWkt('POINT (0 1)')) feat.SetGeomFieldDirectly(1, ogr.CreateGeometryFromWkt('LINESTRING (2 3,4 5)')) lyr.CreateFeature(feat) feat = None ds = None if False: # pylint: disable=using-constant-test f = gdal.VSIFOpenL('/vsimem/ogr_gml_57.gml', 'rb') print(gdal.VSIFReadL(1, 1000, f)) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/ogr_gml_57.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert not (i == 1 and feat.GetGeomFieldRef(0).GetSpatialReference().ExportToWkt().find('32630') < 0) assert not (i == 1 and feat.GetGeomFieldRef(1).GetSpatialReference().ExportToWkt().find('32630') < 0) assert not (i == 2 and feat.GetGeomFieldRef(1).GetSpatialReference().ExportToWkt().find('32631') < 0) assert feat.GetGeomFieldRef(0).ExportToWkt() == 'POINT (0 1)' assert feat.GetGeomFieldRef(1).ExportToWkt() == 'LINESTRING (2 3,4 5)' ds = None gdal.Unlink('/vsimem/ogr_gml_57.gml') gdal.Unlink('/vsimem/ogr_gml_57.xsd') ############################################################################### # Test support for Inspire Cadastral schemas def test_ogr_gml_58(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('data/inspire_cadastralparcel.gfs') ds = ogr.Open('data/inspire_cadastralparcel.xml') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetGeomFieldCount() == 2 assert lyr_defn.GetGeomFieldDefn(0).GetName() == 'geometry' assert lyr_defn.GetGeomFieldDefn(0).GetType() == ogr.wkbMultiPolygon assert lyr_defn.GetGeomFieldDefn(1).GetName() == 'referencePoint' assert lyr_defn.GetGeomFieldDefn(1).GetType() == ogr.wkbPoint feat = lyr.GetNextFeature() expected = [('gml_id', 'CadastralParcel-01'), ('areaValue', 10.0), ('areaValue_uom', 'm2'), ('beginLifespanVersion', '2000-01-01T00:00:00.0Z'), ('endLifespanVersion', '2001-01-01T00:00:00.0Z'), ('inspireId_localId', 'CadastralParcel-01-localId'), ('inspireId_namespace', 'namespace'), ('label', 'label'), ('nationalCadastralReference', 'nationalCadastralReference'), ('validFrom', '2002-01-01T00:00:00.0Z'), ('validTo', '2003-01-01T00:00:00.0Z'), ('basicPropertyUnit_href', ['#BPU.1', '#BPU.2']), ('administrativeUnit_href', '#AU.1'), ('zoning_href', '#CZ.1')] for (key, val) in expected: assert feat.GetField(key) == val assert feat.GetGeomFieldRef(0).ExportToWkt() == 'MULTIPOLYGON (((2 49,2 50,3 50,3 49)))' assert feat.GetGeomFieldRef(1).ExportToWkt() == 'POINT (2.5 49.5)' feat = lyr.GetNextFeature() expected = [('gml_id', 'CadastralParcel-02'), ('areaValue', None), ('areaValue_uom', None), ('beginLifespanVersion', '2000-01-01T00:00:00.0Z'), ('endLifespanVersion', None), ('inspireId_localId', 'CadastralParcel-02-localId'), ('inspireId_namespace', 'namespace'), ('label', 'label'), ('nationalCadastralReference', 'nationalCadastralReference'), ('validFrom', None), ('validTo', None), ('basicPropertyUnit_href', None), ('administrativeUnit_href', None), ('zoning_href', None)] for (key, val) in expected: assert feat.GetField(key) == val assert feat.GetGeomFieldRef(0).ExportToWkt() == 'MULTIPOLYGON (((2 49,2 50,3 50,3 49)))' assert feat.GetGeomFieldRef(1) is None feat = None lyr = None ds = None ds = ogr.Open('data/inspire_basicpropertyunit.xml') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetGeomFieldCount() == 0 feat = lyr.GetNextFeature() expected = [('gml_id', 'BasicPropertyUnit-01'), ('inspireId_localId', 'BasicPropertyUnit-01-localId'), ('inspireId_namespace', 'namespace'), ('nationalCadastralReference', 'nationalCadastralReference'), ('areaValue', 10.0), ('areaValue_uom', 'm2'), ('validFrom', '2000-01-01T00:00:00.0Z'), ('validTo', '2001-01-01T00:00:00.0Z'), ('beginLifespanVersion', '2002-01-01T00:00:00.0Z'), ('endLifespanVersion', '2003-01-01T00:00:00.0Z'), ('administrativeUnit_href', '#AU.1')] for (key, val) in expected: assert feat.GetField(key) == val feat = lyr.GetNextFeature() expected = [('gml_id', 'BasicPropertyUnit-02'), ('inspireId_localId', 'BasicPropertyUnit-02-localId'), ('inspireId_namespace', 'namespace'), ('nationalCadastralReference', 'nationalCadastralReference'), ('areaValue', None), ('areaValue_uom', None), ('validFrom', '2000-01-01T00:00:00.0Z'), ('validTo', None), ('beginLifespanVersion', '2002-01-01T00:00:00.0Z'), ('endLifespanVersion', None), ('administrativeUnit_href', None)] for (key, val) in expected: assert feat.GetField(key) == val feat = None lyr = None ds = None ds = ogr.Open('data/inspire_cadastralboundary.xml') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetGeomFieldCount() == 1 assert lyr_defn.GetGeomFieldDefn(0).GetName() == 'geometry' assert lyr_defn.GetGeomFieldDefn(0).GetType() == ogr.wkbLineString feat = lyr.GetNextFeature() expected = [('gml_id', 'CadastralBoundary-01'), ('beginLifespanVersion', '2000-01-01T00:00:00.0Z'), ('endLifespanVersion', '2001-01-01T00:00:00.0Z'), ('estimatedAccuracy', 1.0), ('estimatedAccuracy_uom', 'm'), ('inspireId_localId', 'CadastralBoundary-01-localId'), ('inspireId_namespace', 'namespace'), ('validFrom', '2002-01-01T00:00:00.0Z'), ('validTo', '2003-01-01T00:00:00.0Z'), ('parcel_href', ['#Parcel.1', '#Parcel.2'])] for (key, val) in expected: assert feat.GetField(key) == val assert feat.GetGeomFieldRef(0).ExportToWkt() == 'LINESTRING (2 49,3 50)' feat = lyr.GetNextFeature() expected = [('gml_id', 'CadastralBoundary-02'), ('beginLifespanVersion', '2000-01-01T00:00:00.0Z'), ('endLifespanVersion', None), ('estimatedAccuracy', None), ('estimatedAccuracy_uom', None), ('inspireId_localId', 'CadastralBoundary-02-localId'), ('inspireId_namespace', 'namespace'), ('validFrom', None), ('validTo', None), ('parcel_href', None)] for (key, val) in expected: assert feat.GetField(key) == val assert feat.GetGeomFieldRef(0).ExportToWkt() == 'LINESTRING (2 49,3 50)' feat = None lyr = None ds = None ds = ogr.Open('data/inspire_cadastralzoning.xml') lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetGeomFieldCount() == 2 assert lyr_defn.GetGeomFieldDefn(0).GetName() == 'geometry' assert lyr_defn.GetGeomFieldDefn(0).GetType() == ogr.wkbMultiPolygon assert lyr_defn.GetGeomFieldDefn(1).GetName() == 'referencePoint' assert lyr_defn.GetGeomFieldDefn(1).GetType() == ogr.wkbPoint feat = lyr.GetNextFeature() expected = [('gml_id', 'CadastralZoning-01'), ('beginLifespanVersion', '2000-01-01T00:00:00.0Z'), ('endLifespanVersion', '2001-01-01T00:00:00.0Z'), ('estimatedAccuracy', 1.0), ('estimatedAccuracy_uom', 'm'), ('inspireId_localId', 'CadastralZoning-01-localId'), ('inspireId_namespace', 'namespace'), ('label', 'label'), ('level', '3'), ('levelName', ['English', 'Francais', 'Deutsch']), ('levelName_locale', ['en', 'fr', 'de']), ('name_language', ['language']), ('name_nativeness', ['nativeness']), ('name_nameStatus', ['nameStatus']), ('name_pronunciation', None), ('name_spelling_text', ['text']), ('name_spelling_script', ['script']), ('nationalCadastalZoningReference', 'nationalCadastalZoningReference'), ('validFrom', '2002-01-01T00:00:00.0Z'), ('validTo', '2003-01-01T00:00:00.0Z'), ('upperLevelUnit_href', '#ulu.1')] for (key, val) in expected: assert feat.GetField(key) == val assert feat.GetGeomFieldRef(0).ExportToWkt() == 'MULTIPOLYGON (((2 49,2 50,3 50,3 49)))' assert feat.GetGeomFieldRef(1).ExportToWkt() == 'POINT (2.5 49.5)' feat = lyr.GetNextFeature() expected = [('gml_id', 'CadastralZoning-02'), ('beginLifespanVersion', '2000-01-01T00:00:00.0Z'), ('endLifespanVersion', None), ('estimatedAccuracy', None), ('estimatedAccuracy_uom', None), ('inspireId_localId', None), ('inspireId_namespace', None), ('label', 'label'), ('level', '3'), ('levelName', ['English']), ('levelName_locale', ['en']), ('name_language', None), ('name_nativeness', None), ('name_nameStatus', None), ('name_pronunciation', None), ('name_spelling_text', None), ('name_spelling_script', None), ('nationalCadastalZoningReference', 'nationalCadastalZoningReference'), ('validFrom', None), ('validTo', None), ('upperLevelUnit_href', None)] for (key, val) in expected: assert feat.GetField(key) == val assert feat.GetGeomFieldRef(0).ExportToWkt() == 'MULTIPOLYGON (((2 49,2 50,3 50,3 49)))' assert feat.GetGeomFieldRef(1) is None feat = None lyr = None ds = None ############################################################################### # Test GFS conditions def test_ogr_gml_59(): if not gdaltest.have_gml_reader: pytest.skip() # Make sure the .gfs file is more recent that the .gml one try: gml_mtime = os.stat('data/testcondition.gml').st_mtime gfs_mtime = os.stat('data/testcondition.gfs').st_mtime touch_gfs = gfs_mtime <= gml_mtime except: touch_gfs = True if touch_gfs: print('Touching .gfs file') f = open('data/testcondition.gfs', 'rb+') data = f.read(1) f.seek(0, 0) f.write(data) f.close() ds = ogr.Open('data/testcondition.gml') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() expected = [('name_en', 'English name'), ('name_fr', 'Nom francais'), ('name_others_lang', ['de']), ('name_others', ['Deutsche name'])] for (key, val) in expected: assert feat.GetField(key) == val feat = None lyr = None ds = None ######################################################## # Test reading WFS 2.0 GetFeature documents with wfs:FeatureCollection # as a wfs:member of the top wfs:FeatureCollection def test_ogr_gml_60(): if not gdaltest.have_gml_reader: pytest.skip() # Make sure the .gfs file is more recent that the .gml one gdal.Unlink('data/wfs_200_multiplelayers.gfs') for _ in range(2): ds = ogr.Open('data/wfs_200_multiplelayers.gml') lyr = ds.GetLayerByName('road') assert lyr.GetFeatureCount() == 1 feat = lyr.GetNextFeature() assert feat.GetField('gml_id') == 'road.21' lyr = ds.GetLayerByName('popplace') assert lyr.GetFeatureCount() == 1 feat = lyr.GetNextFeature() assert feat.GetField('gml_id') == 'popplace.BACMK' ds = None gdal.Unlink('data/wfs_200_multiplelayers.gfs') ############################################################################### # Test reading a element specified with a full path in def test_ogr_gml_61(): if not gdaltest.have_gml_reader: pytest.skip() # Make sure the .gfs file is more recent that the .gml one try: gml_mtime = os.stat('data/gmlsubfeature.gml').st_mtime gfs_mtime = os.stat('data/gmlsubfeature.gfs').st_mtime touch_gfs = gfs_mtime <= gml_mtime except: touch_gfs = True if touch_gfs: print('Touching .gfs file') f = open('data/gmlsubfeature.gfs', 'rb+') data = f.read(1) f.seek(0, 0) f.write(data) f.close() ds = ogr.Open('data/gmlsubfeature.gml') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2, 'did not get expected geometry column name' feat = lyr.GetNextFeature() if feat.GetField('gml_id') != 'Object.1' or feat.GetField('foo') != 'bar': feat.DumpReadable() pytest.fail() geom = feat.GetGeometryRef() if geom.ExportToWkt() != 'POLYGON ((2 48,2 49,3 49,3 48,2 48))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetField('gml_id') != 'Object.2' or feat.GetField('foo') != 'baz': feat.DumpReadable() pytest.fail() geom = feat.GetGeometryRef() if geom.ExportToWkt() != 'POLYGON ((2 -48,2 -49,3 -49,3 -48,2 -48))': feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test GML_ATTRIBUTES_TO_OGR_FIELDS option def test_ogr_gml_62(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('tmp/gmlattributes.gfs') shutil.copy('data/gmlattributes.gml', 'tmp/gmlattributes.gml') # Default behaviour ds = ogr.Open('tmp/gmlattributes.gml') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 1 ds = None # Test GML_ATTRIBUTES_TO_OGR_FIELDS=YES gdal.Unlink('tmp/gmlattributes.gfs') # Without and then with .gfs for i in range(2): if i == 0: gdal.SetConfigOption('GML_ATTRIBUTES_TO_OGR_FIELDS', 'YES') ds = ogr.Open('tmp/gmlattributes.gml') if i == 0: gdal.SetConfigOption('GML_ATTRIBUTES_TO_OGR_FIELDS', None) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 4, i feat = lyr.GetNextFeature() if feat.GetField('element_attr1') != '1' or \ feat.GetField('element2_attr1') != 'a' or \ feat.GetField('element2') != 'foo' or \ feat.IsFieldSet('element3_attr1'): feat.DumpReadable() pytest.fail(i) feat = lyr.GetNextFeature() if feat.IsFieldSet('element_attr1') or \ feat.IsFieldSet('element2_attr1') or \ feat.IsFieldSet('element2') or \ feat.GetField('element3_attr1') != 1: feat.DumpReadable() pytest.fail(i) feat = lyr.GetNextFeature() if feat.GetField('element_attr1') != 'a' or \ feat.IsFieldSet('element2_attr1') or \ feat.IsFieldSet('element2') or \ feat.IsFieldSet('element3_attr1'): feat.DumpReadable() pytest.fail(i) feat = None ds = None ############################################################################### # Test reading RUIAN VFR files def test_ogr_gml_63(): if not gdaltest.have_gml_reader: pytest.skip() # test ST file type ds = ogr.Open('data/ruian_st_v1.xml.gz') # check number of layers nlayers = ds.GetLayerCount() assert nlayers == 14 # check name of first layer lyr = ds.GetLayer(0) assert lyr.GetName() == 'Staty' # check geometry column name assert lyr.GetGeometryColumn() == 'DefinicniBod' ds = None # test OB file type ds = ogr.Open('data/ruian_ob_v1.xml.gz') # check number of layers nlayers = ds.GetLayerCount() assert nlayers == 11 # check number of features nfeatures = 0 for i in range(nlayers): lyr = ds.GetLayer(i) nfeatures += lyr.GetFeatureCount() assert nfeatures == 7 ############################################################################### # Test multiple instances of parsers (#5571) def test_ogr_gml_64(): if not gdaltest.have_gml_reader: pytest.skip() for parser in ['XERCES', 'EXPAT']: for _ in range(2): gdal.SetConfigOption('GML_PARSER', parser) ds = ogr.Open('data/rnf_eg.gml') gdal.SetConfigOption('GML_PARSER', None) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None, parser ############################################################################### # Test SRSDIMENSION_LOC=GEOMETRY option (#5606) def test_ogr_gml_65(): if not gdaltest.have_gml_reader: pytest.skip() option_expected_list = [['SRSDIMENSION_LOC=GEOMETRY', '0 1 2 3 4 5 6 7 8 0 1 2'], ['SRSDIMENSION_LOC=POSLIST', '0 1 2 3 4 5 6 7 8 0 1 2'], ['SRSDIMENSION_LOC=GEOMETRY,POSLIST', '0 1 2 3 4 5 6 7 8 0 1 2'], ] for (option, expected) in option_expected_list: filename = '/vsimem/ogr_gml_65.gml' # filename = 'ogr_gml_65.gml' ds = ogr.GetDriverByName('GML').CreateDataSource(filename, options=['FORMAT=GML3', option]) lyr = ds.CreateLayer('lyr') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt("MULTIPOLYGON (((0 1 2,3 4 5,6 7 8,0 1 2)))")) lyr.CreateFeature(feat) ds = None f = gdal.VSIFOpenL(filename, 'rb') data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert expected in data ds = ogr.Open(filename) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != "MULTIPOLYGON (((0 1 2,3 4 5,6 7 8,0 1 2)))": feat.DumpReadable() pytest.fail() ds = None gdal.Unlink(filename) gdal.Unlink(filename[0:-3] + "xsd") ############################################################################### # Test curve geometries def test_ogr_gml_66(): if not gdaltest.have_gml_reader: pytest.skip() filename = '/vsimem/ogr_gml_66.gml' # filename = 'ogr_gml_66.gml' ds = ogr.GetDriverByName('GML').CreateDataSource(filename, options=['FORMAT=GML3']) lyr = ds.CreateLayer('compoundcurve', geom_type=ogr.wkbCompoundCurve) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING (0 0,1 1,2 0)')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 0,1 1,2 0)')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('curvepolygon', geom_type=ogr.wkbCurvePolygon) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CURVEPOLYGON ( CIRCULARSTRING(0 0,1 0,0 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('multisurface', geom_type=ogr.wkbMultiSurface) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTISURFACE (CURVEPOLYGON ( CIRCULARSTRING(0 0,1 0,0 0)))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('multicurve', geom_type=ogr.wkbMultiCurve) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTICURVE ( CIRCULARSTRING(0 0,1 0,0 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTICURVE ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('polygon', geom_type=ogr.wkbPolygon) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('linestring', geom_type=ogr.wkbLineString) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 0,0 1,1 1,0 0)')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('multipolygon', geom_type=ogr.wkbMultiPolygon) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('multilinestring', geom_type=ogr.wkbMultiLineString) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('compoundcurve_untyped') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 0,1 1,2 0)')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (0 0,1 1,2 0)')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('curvepolygon_untyped') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CURVEPOLYGON ( CIRCULARSTRING(0 0,1 0,0 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('multisurface_untyped') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTISURFACE (CURVEPOLYGON ( CIRCULARSTRING(0 0,1 0,0 0)))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))')) lyr.CreateFeature(f) f = None lyr = ds.CreateLayer('multicurve_untyped') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTICURVE (CIRCULARSTRING (0 0,1 1,2 0))')) lyr.CreateFeature(f) f = None f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(f) f = None ds = None # Test first with .xsd and then without for i in range(3): ds = ogr.Open(filename) lyr = ds.GetLayerByName('compoundcurve') assert lyr.GetGeomType() == ogr.wkbCompoundCurve feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'COMPOUNDCURVE ((0 0,1 1,2 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('curvepolygon') assert lyr.GetGeomType() == ogr.wkbCurvePolygon feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'CURVEPOLYGON (CIRCULARSTRING (0 0,0.5 0.5,1 0,0.5 -0.5,0 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multisurface') assert lyr.GetGeomType() == ogr.wkbMultiSurface feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (0 0,0.5 0.5,1 0,0.5 -0.5,0 0)))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTISURFACE (((0 0,0 1,1 1,0 0)))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multicurve') assert lyr.GetGeomType() == ogr.wkbMultiCurve feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTICURVE (CIRCULARSTRING (0 0,0.5 0.5,1 0,0.5 -0.5,0 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTICURVE ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('polygon') assert lyr.GetGeomType() == ogr.wkbPolygon feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('linestring') assert lyr.GetGeomType() == ogr.wkbLineString feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (0 0,0 1,1 1,0 0)': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multipolygon') assert lyr.GetGeomType() == ogr.wkbMultiPolygon feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multilinestring') assert lyr.GetGeomType() == ogr.wkbMultiLineString feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTILINESTRING ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('compoundcurve_untyped') if i != 0: assert lyr.GetGeomType() == ogr.wkbCompoundCurve feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'COMPOUNDCURVE ((0 0,1 1,2 0))': feat.DumpReadable() pytest.fail() else: feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'LINESTRING (0 0,1 1,2 0)': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 1,2 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('curvepolygon_untyped') if i != 0: assert lyr.GetGeomType() == ogr.wkbCurvePolygon feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() else: feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'CURVEPOLYGON (CIRCULARSTRING (0 0,0.5 0.5,1 0,0.5 -0.5,0 0))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multisurface_untyped') if i != 0: assert lyr.GetGeomType() == ogr.wkbMultiSurface feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTISURFACE (((0 0,0 1,1 1,0 0)))': feat.DumpReadable() pytest.fail() else: feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (0 0,0.5 0.5,1 0,0.5 -0.5,0 0)))': feat.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('multicurve_untyped') if i != 0: assert lyr.GetGeomType() == ogr.wkbMultiCurve feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTICURVE ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() else: feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTILINESTRING ((0 0,0 1,1 1,0 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeometryRef().ExportToWkt() != 'MULTICURVE (CIRCULARSTRING (0 0,1 1,2 0))': feat.DumpReadable() pytest.fail() ds = None gdal.Unlink(filename[0:-3] + "xsd") gdal.Unlink(filename) gdal.Unlink(filename[0:-3] + "gfs") ############################################################################### # Test boolean, int16, integer64 type def test_ogr_gml_67(): if not gdaltest.have_gml_reader: pytest.skip() filename = '/vsimem/ogr_gml_67.gml' ds = ogr.GetDriverByName('GML').CreateDataSource(filename) lyr = ds.CreateLayer('test') fld_defn = ogr.FieldDefn('b1', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('b2', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('bool_list', ogr.OFTIntegerList) fld_defn.SetSubType(ogr.OFSTBoolean) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('short', ogr.OFTInteger) fld_defn.SetSubType(ogr.OFSTInt16) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('float', ogr.OFTReal) fld_defn.SetSubType(ogr.OFSTFloat32) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('int64', ogr.OFTInteger64) lyr.CreateField(fld_defn) fld_defn = ogr.FieldDefn('int64list', ogr.OFTInteger64List) lyr.CreateField(fld_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 1) f.SetField(1, 0) f.SetFieldIntegerList(2, [1, 0]) f.SetField(3, -32768) f.SetField(4, 1.23) f.SetField(5, 1) f.SetFieldInteger64List(6, [1]) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(1234567890123) f.SetField(5, 1234567890123) f.SetFieldInteger64List(6, [1, 1234567890123]) lyr.CreateFeature(f) f = None ds = None # Test first with .xsd and then without for i in range(3): ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert (lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('b1')).GetType() == ogr.OFTInteger and \ lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('b1')).GetSubType() == ogr.OFSTBoolean), \ i assert (lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('bool_list')).GetType() == ogr.OFTIntegerList and \ lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('bool_list')).GetSubType() == ogr.OFSTBoolean), \ i if i == 0: assert (lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('short')).GetType() == ogr.OFTInteger and \ lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('short')).GetSubType() == ogr.OFSTInt16), \ i if i == 0: assert (lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('float')).GetType() == ogr.OFTReal and \ lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('float')).GetSubType() == ogr.OFSTFloat32), \ i assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('int64')).GetType() == ogr.OFTInteger64, \ i assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('int64list')).GetType() == ogr.OFTInteger64List, \ i f = lyr.GetNextFeature() if f.GetField('b1') != 1 or f.GetField('b2') != 0 or f.GetFieldAsString('bool_list') != '(2:1,0)' or f.GetField('short') != -32768 or f.GetField('float') != 1.23: f.DumpReadable() pytest.fail(i) f = lyr.GetNextFeature() if f.GetFID() != 1234567890123 or f.GetField('int64') != 1234567890123 or f.GetField('int64list') != [1, 1234567890123]: f.DumpReadable() pytest.fail(i) ds = None gdal.Unlink(filename[0:-3] + "xsd") gdal.Unlink(filename) gdal.Unlink(filename[0:-3] + "gfs") ############################################################################### # Test reading GML with xsd with a choice of geometry properites def test_ogr_gml_68(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/choicepolygonmultipolygon.gml') expected_results = ['MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)))', 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)),((10 0,10 1,11 1,11 0,10 0)))'] lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbMultiPolygon, \ ' did not get expected layer geometry type' for i in range(2): feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == expected_results[i], 'did not get expected geometry' ds = None ############################################################################### # Test not nullable fields def test_ogr_gml_69(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_69.gml') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_not_nullable', ogr.OFTString) field_defn.SetNullable(0) lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('field_nullable', ogr.OFTString) lyr.CreateField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_not_nullable', ogr.wkbPoint) field_defn.SetNullable(0) lyr.CreateGeomField(field_defn) field_defn = ogr.GeomFieldDefn('geomfield_nullable', ogr.wkbPoint) lyr.CreateGeomField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') f.SetGeomFieldDirectly('geomfield_not_nullable', ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None # Error case: missing geometry f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('field_not_nullable', 'not_null') gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None # Error case: missing non-nullable field f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT(0 0)')) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = None ds = None ds = gdal.OpenEx('/vsimem/ogr_gml_69.gml', open_options=['EMPTY_AS_NULL=NO']) lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('field_nullable')).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_not_nullable')).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(lyr.GetLayerDefn().GetGeomFieldIndex('geomfield_nullable')).IsNullable() == 1 ds = None gdal.Unlink("/vsimem/ogr_gml_69.gml") gdal.Unlink("/vsimem/ogr_gml_69.xsd") ############################################################################### # Test default fields (not really supported, but we must do something as we # support not nullable fields) def test_ogr_gml_70(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_70.gml') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) field_defn = ogr.FieldDefn('field_string', ogr.OFTString) field_defn.SetDefault("'a'") field_defn.SetNullable(0) lyr.CreateField(field_defn) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_gml_70.gml') lyr = ds.GetLayerByName('test') f = lyr.GetNextFeature() if f.GetField('field_string') != 'a': f.DumpReadable() pytest.fail() ds = None gdal.Unlink("/vsimem/ogr_gml_70.gml") gdal.Unlink("/vsimem/ogr_gml_70.xsd") ############################################################################### # Test reading WFS 2.0 layer resulting from a join operation def ogr_gml_71_helper(ds): assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) assert lyr.GetName() == 'join_table1_table2' fields = [('table1.gml_id', ogr.OFTString), ('table1.foo', ogr.OFTInteger), ('table1.bar', ogr.OFTInteger), ('table2.gml_id', ogr.OFTString), ('table2.bar', ogr.OFTInteger), ('table2.baz', ogr.OFTString)] layer_defn = lyr.GetLayerDefn() assert layer_defn.GetFieldCount() == len(fields) for i, field in enumerate(fields): fld_defn = layer_defn.GetFieldDefn(i) assert fld_defn.GetName() == field[0], i assert fld_defn.GetType() == field[1], i assert layer_defn.GetGeomFieldCount() == 2 assert layer_defn.GetGeomFieldDefn(0).GetName() == 'table1.geometry' assert layer_defn.GetGeomFieldDefn(1).GetName() == 'table2.geometry' f = lyr.GetNextFeature() if f.GetField('table1.gml_id') != 'table1-1' or \ f.GetField('table1.foo') != 1 or \ f.IsFieldSet('table1.bar') or \ f.GetField('table2.gml_id') != 'table2-1' or \ f.GetField('table2.bar') != 2 or \ f.GetField('table2.baz') != 'foo' or \ f.GetGeomFieldRef(0) is not None or \ f.GetGeomFieldRef(1).ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('table1.gml_id') != 'table1-2' or \ f.IsFieldSet('table1.foo') or \ f.GetField('table1.bar') != 2 or \ f.GetField('table2.gml_id') != 'table2-2' or \ f.GetField('table2.bar') != 2 or \ f.GetField('table2.baz') != 'bar' or \ f.GetGeomFieldRef(0).ExportToWkt() != 'POINT (3 50)' or \ f.GetGeomFieldRef(1).ExportToWkt() != 'POINT (2 50)': f.DumpReadable() pytest.fail() def test_ogr_gml_71(): if not gdaltest.have_gml_reader: pytest.skip() # With .xsd gdal.Unlink('data/wfsjointlayer.gfs') ds = ogr.Open('data/wfsjointlayer.gml') ogr_gml_71_helper(ds) ds = None with pytest.raises(OSError): os.unlink('data/wfsjointlayer.gfs') # With .xsd but that is only partially understood ds = gdal.OpenEx('data/wfsjointlayer.gml', open_options=['XSD=data/wfsjointlayer_not_understood.xsd']) ogr_gml_71_helper(ds) ds = None try: os.unlink('data/wfsjointlayer.gfs') except OSError: pytest.fail() # Without .xsd nor .gfs shutil.copy('data/wfsjointlayer.gml', 'tmp/wfsjointlayer.gml') gdal.Unlink('tmp/wfsjointlayer.gfs') ds = ogr.Open('tmp/wfsjointlayer.gml') ogr_gml_71_helper(ds) ds = None try: os.stat('tmp/wfsjointlayer.gfs') except OSError: pytest.fail() # With .gfs ds = ogr.Open('tmp/wfsjointlayer.gml') ogr_gml_71_helper(ds) ds = None ############################################################################### # Test name and description def test_ogr_gml_72(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_72.gml', options=['NAME=name', 'DESCRIPTION=description']) ds.SetMetadata({'NAME': 'ignored', 'DESCRIPTION': 'ignored'}) ds = None ds = ogr.Open('/vsimem/ogr_gml_72.gml') assert ds.GetMetadata() == {'NAME': 'name', 'DESCRIPTION': 'description'} ds = None gdal.Unlink("/vsimem/ogr_gml_72.gml") gdal.Unlink("/vsimem/ogr_gml_72.xsd") gdal.Unlink("/vsimem/ogr_gml_72.gfs") ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_72.gml') ds.SetMetadata({'NAME': 'name', 'DESCRIPTION': 'description'}) ds = None ds = ogr.Open('/vsimem/ogr_gml_72.gml') assert ds.GetMetadata() == {'NAME': 'name', 'DESCRIPTION': 'description'} ds = None gdal.Unlink("/vsimem/ogr_gml_72.gml") gdal.Unlink("/vsimem/ogr_gml_72.xsd") gdal.Unlink("/vsimem/ogr_gml_72.gfs") ############################################################################### # Read a CSW GetRecordsResponse document def test_ogr_gml_73(): if not gdaltest.have_gml_reader: pytest.skip() try: os.remove('data/cswresults.gfs') except OSError: pass ds = ogr.Open('data/cswresults.xml') for i in range(3): lyr = ds.GetLayer(i) sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert '4326' in got_wkt, 'did not get expected SRS' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() got_wkt = geom.ExportToWkt() assert got_wkt == 'POLYGON ((-180 -90,-180 90,180 90,180 -90,-180 -90))', \ 'did not get expected geometry' ds = None try: os.remove('data/cswresults.gfs') except OSError: pass ############################################################################### # Test FORCE_SRS_DETECTION open option def test_ogr_gml_74(): if not gdaltest.have_gml_reader: pytest.skip() # With .xsd ds = gdal.OpenEx('data/expected_gml_gml32.gml', open_options=['FORCE_SRS_DETECTION=YES']) lyr = ds.GetLayer(0) assert lyr.GetSpatialRef() is not None, 'did not get expected SRS' assert lyr.GetFeatureCount() == 2, 'did not get expected feature count' shutil.copy('data/expected_gml_gml32.gml', 'tmp/ogr_gml_74.gml') if os.path.exists('tmp/ogr_gml_74.gfs'): os.unlink('tmp/ogr_gml_74.gfs') # Without .xsd or .gfs ds = gdal.OpenEx('tmp/ogr_gml_74.gml', open_options=['FORCE_SRS_DETECTION=YES']) lyr = ds.GetLayer(0) assert lyr.GetSpatialRef() is not None, 'did not get expected SRS' assert lyr.GetFeatureCount() == 2, 'did not get expected feature count' # With .gfs ds = gdal.OpenEx('tmp/ogr_gml_74.gml', open_options=['FORCE_SRS_DETECTION=YES']) lyr = ds.GetLayer(0) assert lyr.GetSpatialRef() is not None, 'did not get expected SRS' assert lyr.GetFeatureCount() == 2, 'did not get expected feature count' ds = None os.unlink('tmp/ogr_gml_74.gml') os.unlink('tmp/ogr_gml_74.gfs') ############################################################################### # Test we don't open a WMTS Capabilities doc def test_ogr_gml_75(): if not gdaltest.have_gml_reader: pytest.skip() gdal.FileFromMemBuffer("/vsimem/ogr_gml_75.xml", """ """) ds = ogr.Open('/vsimem/ogr_gml_75.xml') assert ds is None gdal.Unlink('/vsimem/ogr_gml_75.xml') ############################################################################### # Test we are robust to content of XML elements bigger than 2 GB def test_ogr_gml_76(): if not gdaltest.have_gml_reader: pytest.skip() if not gdaltest.run_slow_tests(): pytest.skip() with gdaltest.error_handler(): ds = ogr.Open('/vsisparse/data/huge_attribute_gml_sparse.xml') if ds is not None: lyr = ds.GetLayer(0) lyr.GetNextFeature() ds = ogr.Open('/vsisparse/data/huge_geom_gml_sparse.xml') if ds is not None: lyr = ds.GetLayer(0) lyr.GetNextFeature() ############################################################################### # Test interpretation of http://www.opengis.net/def/crs/EPSG/0/ URLs (#6678) def test_ogr_gml_77(): if not gdaltest.have_gml_reader: pytest.skip() gdal.FileFromMemBuffer("/vsimem/ogr_gml_77.xml", """ 49 2 1 """) ds = ogr.Open('/vsimem/ogr_gml_77.xml') lyr = ds.GetLayer(0) assert lyr.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [2, 1] f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (2 49)' ds = None ds = gdal.OpenEx('/vsimem/ogr_gml_77.xml', open_options=['SWAP_COORDINATES=YES']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (2 49)' ds = None ds = gdal.OpenEx('/vsimem/ogr_gml_77.xml', open_options=['SWAP_COORDINATES=NO']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (49 2)' ds = None gdal.Unlink('/vsimem/ogr_gml_77.xml') gdal.Unlink('/vsimem/ogr_gml_77.gfs') ############################################################################### # Test effect of SWAP_COORDINATES (#6678) def test_ogr_gml_78(): if not gdaltest.have_gml_reader: pytest.skip() gdal.FileFromMemBuffer("/vsimem/ogr_gml_78.xml", """ 2 49 1 """) ds = ogr.Open('/vsimem/ogr_gml_78.xml') lyr = ds.GetLayer(0) assert lyr.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [2, 1] f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (2 49)' ds = None ds = gdal.OpenEx('/vsimem/ogr_gml_78.xml', open_options=['SWAP_COORDINATES=YES']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (49 2)' ds = None ds = gdal.OpenEx('/vsimem/ogr_gml_78.xml', open_options=['SWAP_COORDINATES=NO']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (2 49)' ds = None gdal.Unlink('/vsimem/ogr_gml_78.xml') gdal.Unlink('/vsimem/ogr_gml_78.gfs') ############################################################################### # Test SRSNAME_FORMAT def test_ogr_gml_79(): sr = osr.SpatialReference() sr.ImportFromEPSG(4326) tests = [['SHORT', 'EPSG:4326', '2 49'], ['OGC_URN', 'urn:ogc:def:crs:EPSG::4326', '49 2'], ['OGC_URL', 'http://www.opengis.net/def/crs/EPSG/0/4326', '49 2'] ] for (srsname_format, expected_srsname, expected_coords) in tests: ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_79.xml', options=['FORMAT=GML3', 'SRSNAME_FORMAT=' + srsname_format]) lyr = ds.CreateLayer('firstlayer', srs=sr) feat = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometry(geom) lyr.CreateFeature(feat) ds = None f = gdal.VSIFOpenL("/vsimem/ogr_gml_79.xml", "rb") if f is not None: data = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) assert expected_srsname in data and expected_coords in data, \ srsname_format gdal.Unlink('/vsimem/ogr_gml_79.xml') gdal.Unlink('/vsimem/ogr_gml_79.xsd') ############################################################################### # Test null / unset def test_ogr_gml_80(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_80.xml') lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('int_field', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f['int_field'] = 4 lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFieldNull('int_field') lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_gml_80.xml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['int_field'] != 4: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['int_field'] is not None: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.IsFieldSet('int_field'): f.DumpReadable() pytest.fail() f = None ds = None gdal.Unlink('/vsimem/ogr_gml_80.xml') gdal.Unlink('/vsimem/ogr_gml_80.xsd') ############################################################################### # Test building a .gfs with a field with xsi:nil="true" (#7027) def test_ogr_gml_81(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('data/test_xsi_nil_gfs.gfs') ds = ogr.Open('data/test_xsi_nil_gfs.gml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetField('intval') != 1: f.DumpReadable() pytest.fail() ds = None gdal.Unlink('data/test_xsi_nil_gfs.gfs') ############################################################################### # Test GML_FEATURE_COLLECTION=YES def test_ogr_gml_82(): if not gdaltest.have_gml_reader: pytest.skip() gdal.VectorTranslate('/vsimem/ogr_gml_82.gml', 'data/poly.shp', format='GML', datasetCreationOptions=['FORMAT=GML3', 'GML_FEATURE_COLLECTION=YES']) ds = ogr.Open('/vsimem/ogr_gml_82.gml') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 10 ds = None f = gdal.VSIFOpenL("/vsimem/ogr_gml_82.gml", "rb") if f is not None: data = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) assert 'gml:FeatureCollection' in data f = gdal.VSIFOpenL("/vsimem/ogr_gml_82.xsd", "rb") if f is not None: data = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) assert 'name = "FeatureCollection"' not in data assert 'gmlsf' not in data gdal.Unlink('/vsimem/ogr_gml_82.gml') gdal.Unlink('/vsimem/ogr_gml_82.xsd') ############################################################################### def test_ogr_gml_gml2_write_geometry_error(): ds = ogr.GetDriverByName('GML').CreateDataSource('/vsimem/ogr_gml_83.gml') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 0), TIN EMPTY)')) with gdaltest.error_handler(): lyr.CreateFeature(f) ds = None gdal.Unlink('/vsimem/ogr_gml_83.gml') gdal.Unlink('/vsimem/ogr_gml_83.xsd') ############################################################################### def test_ogr_gml_srsname_only_on_top_bounded_by(): if not gdaltest.have_gml_reader: pytest.skip() tmpname = '/vsimem/test_ogr_gml_srsname_only_on_top_bounded_by.xml' gdal.FileFromMemBuffer(tmpname, """ 0 0 1 1 0,0 0,1 1,1 1,0 0,0 """) # Open once to generate .gfs ds = ogr.Open(tmpname) lyr = ds.GetLayer(0) assert '27700' in lyr.GetSpatialRef().ExportToWkt() ds = None # Open another time to read .gfs ds = ogr.Open(tmpname) lyr = ds.GetLayer(0) assert '27700' in lyr.GetSpatialRef().ExportToWkt() ds = None gdal.Unlink(tmpname) gdal.Unlink(tmpname[0:-3] + "gfs") ############################################################################### # Test understanding of XSD that uses 'FeatureType' suffix instead of 'Type'. # If schema was understood, fields 2/3/4 will be 'Real' rather than 'Integer'. def test_ogr_gml_featuretype_suffix_in_xsd(): if not gdaltest.have_gml_reader: pytest.skip() gdal.Unlink('data/arcgis-world-wfs.gfs') ds = ogr.Open('data/arcgis-world-wfs.gml,xsd=data/arcgis-world-wfs.xsd') lyr = ds.GetLayer(0) for i in range(2, 4): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == ogr.OFTReal gdal.Unlink('data/arcgis-world-wfs.gfs') ############################################################################### def test_ogr_gml_standalone_geom(): if not gdaltest.have_gml_reader: pytest.skip() ds = ogr.Open('data/standalone_geometry.gml') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POLYGON ((2 49,3 49,3 48,2 48,2 49))' ############################################################################### # Cleanup def test_ogr_gml_cleanup(): if not gdaltest.have_gml_reader: pytest.skip() gdal.SetConfigOption('GML_SKIP_RESOLVE_ELEMS', None) gdal.SetConfigOption('GML_SAVE_RESOLVED_TO', None) gdaltest.clean_tmp() fl = gdal.ReadDir('/vsimem/') if fl is not None: print(fl) return test_ogr_gml_clean_files() def test_ogr_gml_clean_files(): try: os.remove('data/bom.gfs') except OSError: pass try: os.remove('data/utf8.gfs') except OSError: pass try: os.remove('data/ticket_2349_test_1.gfs') except OSError: pass try: os.remove('data/citygml.gfs') except OSError: pass try: os.remove('data/gnis_pop_100.gfs') except OSError: pass try: os.remove('data/gnis_pop_110.gfs') except OSError: pass try: os.remove('data/paris_typical_strike_demonstration.gfs') except OSError: pass try: os.remove('data/global_geometry.gfs') except OSError: pass try: os.remove('tmp/global_geometry.gfs') except OSError: pass try: os.remove('tmp/global_geometry.xml') except OSError: pass try: os.remove('data/curveProperty.gfs') except OSError: pass try: os.remove('tmp/ogr_gml_26.gml') os.remove('tmp/ogr_gml_26.xsd') except OSError: pass try: os.remove('tmp/ogr_gml_27.gml') os.remove('tmp/ogr_gml_27.xsd') except OSError: pass try: os.remove('tmp/ogr_gml_28.gml') os.remove('tmp/ogr_gml_28.gfs') except OSError: pass try: os.remove('tmp/GmlTopo-sample.sqlite') except OSError: pass try: os.remove('tmp/GmlTopo-sample.gfs') except OSError: pass try: os.remove('tmp/GmlTopo-sample.resolved.gml') except OSError: pass try: os.remove('tmp/GmlTopo-sample.xml') except OSError: pass try: os.remove('tmp/sample_gml_face_hole_negative_no.sqlite') except OSError: pass try: os.remove('tmp/sample_gml_face_hole_negative_no.gfs') except OSError: pass try: os.remove('tmp/sample_gml_face_hole_negative_no.resolved.gml') except OSError: pass try: os.remove('tmp/sample_gml_face_hole_negative_no.xml') except OSError: pass try: os.remove('data/wfs_typefeature.gfs') except OSError: pass try: os.remove('tmp/ogr_gml_51.gml') os.remove('tmp/ogr_gml_51.xsd') except OSError: pass try: os.remove('tmp/gmlattributes.gml') os.remove('tmp/gmlattributes.gfs') except OSError: pass files = os.listdir('data') for filename in files: if len(filename) > 13 and filename[-13:] == '.resolved.gml': os.unlink('data/' + filename) gdal.Unlink('data/test_xsi_nil_gfs.gfs') gdalautotest-3.1.2/ogr/ogr_ogdi.py0000775000175000017500000002344513701060011015625 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_ogdi.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR OGDI driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import ogr import gdaltest import ogrtest import pytest ############################################################################### def test_ogr_ogdi_1(): ogrtest.ogdi_ds = None # Skip tests when -fsanitize is used because of memleaks in libogdi if gdaltest.is_travis_branch('sanitize'): ogrtest.ogdi_drv = None pytest.skip('Skipping because of memory leaks in OGDI') ogrtest.ogdi_drv = ogr.GetDriverByName('OGDI') if ogrtest.ogdi_drv is None: pytest.skip() if not gdaltest.download_file('http://freefr.dl.sourceforge.net/project/ogdi/OGDI_Test_Suite/3.1/ogdits-3.1.0.zip', 'ogdits-3.1.0.zip'): pytest.skip() try: os.stat('tmp/cache/ogdits-3.1') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/ogdits-3.1.0.zip') try: os.stat('tmp/cache/ogdits-3.1') except OSError: pytest.skip() except OSError: pytest.skip() url_name = 'gltp:/vrf/' + os.getcwd() + '/tmp/cache/ogdits-3.1/data/vpf/vm2alv2/texash' ds = ogr.Open(url_name) ogrtest.ogdi_ds = ds assert ds is not None, ('cannot open ' + url_name) assert ds.GetLayerCount() == 57, 'did not get expected layer count' layers = [('libref@libref(*)_line', ogr.wkbLineString, 15), ('libreft@libref(*)_text', ogr.wkbPoint, 4), ('markersp@bnd(*)_point', ogr.wkbPoint, 40), ('polbnda@bnd(*)_area', ogr.wkbPolygon, 6)] for l in layers: lyr = ds.GetLayerByName(l[0]) assert lyr.GetLayerDefn().GetGeomType() == l[1] assert lyr.GetFeatureCount() == l[2] # if l[1] != ogr.wkbNone: # if lyr.GetSpatialRef().ExportToWkt().find('WGS 84') == -1: # return 'fail' lyr = ds.GetLayerByName('libref@libref(*)_line') feat = lyr.GetNextFeature() wkt = 'LINESTRING (-97.570159912109375 31.242000579833984,-97.569938659667969 31.242116928100586,-97.562828063964844 31.245765686035156,-97.558868408203125 31.247797012329102,-97.555778503417969 31.249361038208008,-97.55413818359375 31.250171661376953)' ref_geom = ogr.CreateGeometryFromWkt(wkt) assert ogrtest.check_feature_geometry(feat, ref_geom) == 0, \ feat.GetGeometryRef().ExportToWkt() ############################################################################### # Run test_ogrsf def test_ogr_ogdi_2(): if ogrtest.ogdi_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() url_name = 'gltp:/vrf/' + os.getcwd() + '/tmp/cache/ogdits-3.1/data/vpf/vm2alv2/texash' ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' --config OGR_OGDI_LAUNDER_LAYER_NAMES YES -ro "' + url_name + '" markersp_bnd contourl_elev polbnda_bnd extractp_ind') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test GetFeature() def test_ogr_ogdi_3(): if ogrtest.ogdi_ds is None: pytest.skip() lyr0 = ogrtest.ogdi_ds.GetLayer(0) lyr0.ResetReading() feat00_ref = lyr0.GetNextFeature() feat01_ref = lyr0.GetNextFeature() feat02_ref = lyr0.GetNextFeature() lyr1 = ogrtest.ogdi_ds.GetLayer(1) lyr1.ResetReading() feat10_ref = lyr1.GetNextFeature() feat11_ref = lyr1.GetNextFeature() feat02 = lyr0.GetFeature(2) feat00 = lyr0.GetFeature(0) feat01 = lyr0.GetFeature(1) feat10 = lyr1.GetFeature(0) feat11 = lyr1.GetFeature(1) assert feat00.Equal(feat00_ref), 'features not equal' assert feat01.Equal(feat01_ref), 'features not equal' assert feat02.Equal(feat02_ref), 'features not equal' assert feat10.Equal(feat10_ref), 'features not equal' assert feat11.Equal(feat11_ref), 'features not equal' ############################################################################### # Extract of full dataset def test_ogr_ogdi_4(): if ogrtest.ogdi_drv is None: pytest.skip() url_name = 'gltp:/vrf/' + os.getcwd() + '/data/vm2alv2_texash/texash' ds = ogr.Open(url_name) assert ds is not None, 'cannot open dataset' assert ds.GetLayerCount() == 6, 'did not get expected layer count' layers = [('polbnda@bnd(*)_area', ogr.wkbPolygon, 6)] for l in layers: lyr = ds.GetLayerByName(l[0]) assert lyr.GetLayerDefn().GetGeomType() == l[1] assert lyr.GetFeatureCount() == l[2] lyr = ds.GetLayerByName('polbnda@bnd(*)_area') feat = lyr.GetNextFeature() if feat['id'] != 1 or feat['f_code'] != 'FA001' or feat['acc'] != 1: feat.DumpReadable() pytest.fail('bad attributes') wkt = 'POLYGON ((-97.6672973632812 31.250171661377,-97.5832977294922 31.250171661377,-97.5780029296875 31.250171661377,-97.5780029296875 31.250171661377,-97.5780944824219 31.2494583129883,-97.5779724121094 31.2492084503174,-97.577751159668 31.24880027771,-97.5776443481445 31.2484683990479,-97.5775451660156 31.2482070922852,-97.5774078369141 31.2479457855225,-97.5772705078125 31.2477989196777,-97.5771331787109 31.2477321624756,-97.5768661499023 31.2476787567139,-97.5766830444336 31.2476959228516,-97.5763168334961 31.2477016448975,-97.576042175293 31.247673034668,-97.5757141113281 31.2475509643555,-97.5754852294922 31.2473278045654,-97.5752792358398 31.2470207214356,-97.5751190185547 31.2467250823975,-97.5750122070312 31.2465076446533,-97.5748443603516 31.2462825775147,-97.5746002197266 31.2460918426514,-97.5742874145508 31.2459144592285,-97.5739288330078 31.2458171844482,-97.5736083984375 31.2457542419434,-97.5731201171875 31.2456817626953,-97.5728302001953 31.245641708374,-97.5724792480469 31.2455806732178,-97.5721817016602 31.2454471588135,-97.5719223022461 31.2453022003174,-97.5717086791992 31.2450218200684,-97.5715408325195 31.2446899414062,-97.5713882446289 31.2445201873779,-97.5711669921875 31.2442722320557,-97.5710678100586 31.2440910339355,-97.5711975097656 31.2438926696777,-97.5713577270508 31.2437191009521,-97.5718154907227 31.2434253692627,-97.5724258422852 31.2431831359863,-97.5726470947266 31.2430419921875,-97.5728530883789 31.2427291870117,-97.5728759765625 31.2424869537354,-97.57275390625 31.2423858642578,-97.5727996826172 31.2423534393311,-97.5712738037109 31.2422771453857,-97.5710067749023 31.2422466278076,-97.5707092285156 31.2421951293945,-97.5702285766602 31.2420444488525,-97.5701599121094 31.242000579834,-97.5701599121094 31.242000579834,-97.5794296264648 31.2372093200684,-97.5909194946289 31.2314224243164,-97.6050415039062 31.2241363525391,-97.6213302612305 31.2157878875732,-97.6490707397461 31.201566696167,-97.6662445068359 31.1928386688232,-97.6803207397461 31.1855792999268,-97.6936721801758 31.1787204742432,-97.7042617797852 31.1732997894287,-97.7107391357422 31.1699485778809,-97.7178192138672 31.1663246154785,-97.7325134277344 31.1587982177734,-97.7502975463867 31.1499614715576,-97.7502975463867 31.1499614715576,-97.7502975463867 31.1671733856201,-97.7502975463867 31.1671733856201,-97.7502975463867 31.250171661377,-97.6672973632812 31.250171661377))' ref_geom = ogr.CreateGeometryFromWkt(wkt) assert ogrtest.check_feature_geometry(feat, ref_geom) == 0, \ feat.GetGeometryRef().ExportToWkt() ds = None # Test opening one single layer ds = ogr.Open(url_name + ':polbnda@bnd(*):area') assert ds is not None, 'cannot open dataset' assert ds.GetLayerCount() == 1, 'did not get expected layer count' ############################################################################### # Run test_ogrsf def test_ogr_ogdi_5(): if ogrtest.ogdi_drv is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() url_name = 'gltp:/vrf/' + os.getcwd() + '/data/vm2alv2_texash/texash' ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' --config OGR_OGDI_LAUNDER_LAYER_NAMES YES -ro "' + url_name + '"') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### def test_ogr_ogdi_cleanup(): if ogrtest.ogdi_ds is None: pytest.skip() ogrtest.ogdi_ds = None gdalautotest-3.1.2/ogr/ogr_vfk.py0000775000175000017500000002560513701060011015471 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_vfk.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR VFK driver functionality. # Author: Martin Landa # ############################################################################### # Copyright (c) 2009-2019 Martin Landa # Copyright (c) 2010-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import gdal from osgeo import ogr import pytest ############################################################################### # Open file, check number of layers, get first layer, # check number of fields and features def test_ogr_vfk_1(): gdaltest.vfk_drv = ogr.GetDriverByName('VFK') if gdaltest.vfk_drv is None: pytest.skip() gdal.SetConfigOption('OGR_VFK_DB_OVERWRITE', 'YES') gdaltest.vfk_ds = ogr.Open('data/bylany.vfk') assert gdaltest.vfk_ds is not None assert gdaltest.vfk_ds.GetLayerCount() == 61, 'expected exactly 61 layers!' gdaltest.vfk_layer_par = gdaltest.vfk_ds.GetLayer(0) assert gdaltest.vfk_layer_par is not None, 'cannot get first layer' assert gdaltest.vfk_layer_par.GetName() == 'PAR', \ 'did not get expected layer name "PAR"' defn = gdaltest.vfk_layer_par.GetLayerDefn() assert defn.GetFieldCount() == 28, \ ('did not get expected number of fields, got %d' % defn.GetFieldCount()) fc = gdaltest.vfk_layer_par.GetFeatureCount() assert fc == 1, ('did not get expected feature count, got %d' % fc) ############################################################################### # Read the first feature from layer 'PAR', check envelope def test_ogr_vfk_2(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_par.ResetReading() feat = gdaltest.vfk_layer_par.GetNextFeature() assert feat.GetFID() == 1, 'did not get expected fid for feature 1' geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbPolygon, \ 'did not get expected geometry type.' envelope = geom.GetEnvelope() area = (envelope[1] - envelope[0]) * (envelope[3] - envelope[2]) exp_area = 2010.5 assert area >= exp_area - 0.5 and area <= exp_area + 0.5, \ ('envelope area not as expected, got %g.' % area) ############################################################################### # Read features from layer 'SOBR', test attribute query def test_ogr_vfk_3(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_sobr = gdaltest.vfk_ds.GetLayer(43) assert gdaltest.vfk_layer_sobr.GetName() == 'SOBR', \ 'did not get expected layer name "SOBR"' gdaltest.vfk_layer_sobr.SetAttributeFilter("CISLO_BODU = '55'") gdaltest.vfk_layer_sobr.ResetReading() feat = gdaltest.vfk_layer_sobr.GetNextFeature() count = 0 while feat: feat = gdaltest.vfk_layer_sobr.GetNextFeature() count += 1 assert count == 1, ('did not get expected number of features, got %d' % count) ############################################################################### # Read features from layer 'SBP', test random access, check length def test_ogr_vfk_4(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_sbp = gdaltest.vfk_ds.GetLayerByName('SBP') assert gdaltest.vfk_layer_sbp, 'did not get expected layer name "SBP"' feat = gdaltest.vfk_layer_sbp.GetFeature(5) length = int(feat.geometry().Length()) assert length == 10, ('did not get expected length, got %d' % length) ############################################################################### # Read features from layer 'HP', check geometry type def test_ogr_vfk_5(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_hp = gdaltest.vfk_ds.GetLayerByName('HP') assert gdaltest.vfk_layer_hp != 'HP', 'did not get expected layer name "HP"' geom_type = gdaltest.vfk_layer_hp.GetGeomType() assert geom_type == ogr.wkbLineString, \ ('did not get expected geometry type, got %d' % geom_type) ############################################################################### # Re-Open file (test .db persistence) def test_ogr_vfk_6(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_par = None gdaltest.vfk_layer_sobr = None gdaltest.vfk_ds = None gdaltest.vfk_ds = ogr.Open('data/bylany.vfk') assert gdaltest.vfk_ds is not None assert gdaltest.vfk_ds.GetLayerCount() == 61, 'expected exactly 61 layers!' gdaltest.vfk_layer_par = gdaltest.vfk_ds.GetLayer(0) assert gdaltest.vfk_layer_par is not None, 'cannot get first layer' assert gdaltest.vfk_layer_par.GetName() == 'PAR', \ 'did not get expected layer name "PAR"' defn = gdaltest.vfk_layer_par.GetLayerDefn() assert defn.GetFieldCount() == 28, \ ('did not get expected number of fields, got %d' % defn.GetFieldCount()) fc = gdaltest.vfk_layer_par.GetFeatureCount() assert fc == 1, ('did not get expected feature count, got %d' % fc) ############################################################################### # Read PAR layer, check data types (Integer64 new in GDAL 2.2) def test_ogr_vfk_7(): if gdaltest.vfk_drv is None: pytest.skip() defn = gdaltest.vfk_layer_par.GetLayerDefn() for idx, name, ctype in ((0, "ID", ogr.OFTInteger64), (1, "STAV_DAT", ogr.OFTInteger), (2, "DATUM_VZNIKU", ogr.OFTString), (22, "CENA_NEMOVITOSTI", ogr.OFTReal)): col = defn.GetFieldDefn(idx) assert col.GetName() == name and col.GetType() == ctype, \ "PAR: '{}' column name/type mismatch".format(name) ############################################################################### # Open DB file as datasource (new in GDAL 2.2) def test_ogr_vfk_8(): if gdaltest.vfk_drv is None: pytest.skip() # open by SQLite driver first vfk_ds_db = ogr.Open('data/bylany.db') count1 = vfk_ds_db.GetLayerCount() vfk_ds_db = None # then open by VFK driver os.environ['OGR_VFK_DB_READ'] = 'YES' vfk_ds_db = ogr.Open('data/bylany.db') count2 = vfk_ds_db.GetLayerCount() vfk_ds_db = None assert count1 == count2, \ 'layer count differs when opening DB by SQLite and VFK drivers' del os.environ['OGR_VFK_DB_READ'] ############################################################################### # Open datasource with SUPPRESS_GEOMETRY open option (new in GDAL 2.3) def test_ogr_vfk_9(): if gdaltest.vfk_drv is None: pytest.skip() # open with suppressing geometry vfk_ds = None vfk_ds = gdal.OpenEx('data/bylany.vfk', open_options=['SUPPRESS_GEOMETRY=YES']) vfk_layer_par = vfk_ds.GetLayerByName('PAR') assert vfk_layer_par != 'PAR', 'did not get expected layer name "PAR"' geom_type = vfk_layer_par.GetGeomType() vfk_layer_par = None vfk_ds = None assert geom_type == ogr.wkbNone, \ ('did not get expected geometry type, got %d' % geom_type) ############################################################################### # Open datasource with FILE_FIELD open option (new in GDAL 2.4) def test_ogr_vfk_10(): if gdaltest.vfk_drv is None: pytest.skip() # open with suppressing geometry vfk_ds = None vfk_ds = gdal.OpenEx('data/bylany.vfk', open_options=['FILE_FIELD=YES']) vfk_layer_par = vfk_ds.GetLayerByName('PAR') assert vfk_layer_par != 'PAR', 'did not get expected layer name "PAR"' vfk_layer_par.ResetReading() feat = vfk_layer_par.GetNextFeature() file_field = feat.GetField('VFK_FILENAME') vfk_layer_par = None vfk_ds = None assert file_field == 'bylany.vfk', 'did not get expected file field value' ############################################################################### # Read PAR layer, check sequential feature access consistency def test_ogr_vfk_11(): def count_features(): gdaltest.vfk_layer_par.ResetReading() count = 0 while True: feat = gdaltest.vfk_layer_par.GetNextFeature() if not feat: break count += 1 return count if gdaltest.vfk_drv is None: pytest.skip() count = gdaltest.vfk_layer_par.GetFeatureCount() for i in range(2): # perform check twice, mix with random access if count != count_features(): feat = gdaltest.vfk_layer_par.GetFeature(i) feat.DumpReadable() pytest.fail('did not get expected number of features') ############################################################################### # Read SBP layer, check curved geometry def test_ogr_vfk_12(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_sbp = gdaltest.vfk_ds.GetLayerByName('SBP') gdaltest.vfk_layer_sbp.SetAttributeFilter("PARAMETRY_SPOJENI = '16'") feat = gdaltest.vfk_layer_sbp.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryType() == ogr.wkbLineString, \ 'did not get expected geometry type.' assert geom.GetPointCount() == 92, \ 'did not get expected number of points.' ############################################################################### # cleanup def test_ogr_vfk_cleanup(): if gdaltest.vfk_drv is None: pytest.skip() gdaltest.vfk_layer_par = None gdaltest.vfk_layer_hp = None gdaltest.vfk_layer_sobr = None gdaltest.vfk_ds = None try: os.remove('data/bylany.db') except OSError: pass ############################################################################### # gdalautotest-3.1.2/ogr/ogr_vrt.py0000775000175000017500000031252113701060012015513 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_vrt.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR VRT driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2014, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import test_cli_utilities import pytest ############################################################################### # Open VRT datasource. def test_ogr_vrt_1(): with gdaltest.error_handler(): # Complains about dummySrcDataSource as expected. gdaltest.vrt_ds = ogr.Open('data/vrt_test.vrt') if gdaltest.vrt_ds is not None: return pytest.fail() ############################################################################### # Verify the geometries, in the "test2" layer based on x,y,z columns. # # Also tests FID-copied-from-source. def test_ogr_vrt_2(): if gdaltest.vrt_ds is None: pytest.skip() lyr = gdaltest.vrt_ds.GetLayerByName('test2') extent = lyr.GetExtent() assert extent == (12.5, 100.0, 17.0, 200.0), 'wrong extent' expect = ['First', 'Second'] tr = ogrtest.check_features_against_list(lyr, 'other', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(12.5 17 1.2)', max_error=0.000000001) == 0) assert feat.GetFID() == 0, 'Unexpected fid' feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(100 200)', max_error=0.000000001) == 0) assert feat.GetFID() == 1, 'Unexpected fid' ############################################################################### # Same test on layer 3 derived from WKT column. # # Also tests FID-from-attribute. def test_ogr_vrt_3(): if gdaltest.vrt_ds is None: pytest.skip() lyr = gdaltest.vrt_ds.GetLayerByName('test3') expect = ['First', 'Second'] tr = ogrtest.check_features_against_list(lyr, 'other', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(12.5 17 1.2)', max_error=0.000000001) == 0) assert feat.GetFID() == 1, 'Unexpected fid' feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(100 200)', max_error=0.000000001) == 0) assert feat.GetFID() == 2, 'Unexpected fid' ############################################################################### # Test a spatial query. def test_ogr_vrt_4(): if gdaltest.vrt_ds is None: pytest.skip() lyr = gdaltest.vrt_ds.GetLayerByName('test3') lyr.ResetReading() lyr.SetSpatialFilterRect(90, 90, 300, 300) expect = ['Second'] tr = ogrtest.check_features_against_list(lyr, 'other', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(100 200)', max_error=0.000000001) == 0) lyr.SetSpatialFilter(None) ############################################################################### # Test an attribute query. def test_ogr_vrt_5(): lyr = gdaltest.vrt_ds.GetLayerByName('test3') lyr.ResetReading() lyr.SetAttributeFilter('x < 50') expect = ['First'] tr = ogrtest.check_features_against_list(lyr, 'other', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(12.5 17 1.2)', max_error=0.000000001) == 0) lyr.SetAttributeFilter(None) ############################################################################### # Test GetFeature() on layer with FID coming from a column. def test_ogr_vrt_6(): if gdaltest.vrt_ds is None: pytest.skip() lyr = gdaltest.vrt_ds.GetLayerByName('test3') lyr.ResetReading() feat = lyr.GetFeature(2) assert feat.GetField('other') == 'Second', 'GetFeature() did not work properly.' ############################################################################### # Same as test 3, but on the result of an SQL query. # def test_ogr_vrt_7(): if gdaltest.vrt_ds is None: pytest.skip() lyr = gdaltest.vrt_ds.GetLayerByName('test4') expect = ['First', 'Second'] tr = ogrtest.check_features_against_list(lyr, 'other', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(12.5 17 1.2)', max_error=0.000000001) == 0) assert feat.GetFID() == 1, 'Unexpected fid' feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(100 200)', max_error=0.000000001) == 0) assert feat.GetFID() == 2, 'Unexpected fid' ############################################################################### # Similar test, but now we put the whole VRT contents directly into the # "filename". # def test_ogr_vrt_8(): if gdaltest.vrt_ds is None: pytest.skip() vrt_xml = 'data/flat.dbfSELECT * FROM flatfidwkbPoint' ds = ogr.Open(vrt_xml) lyr = ds.GetLayerByName('test4') expect = ['First', 'Second'] tr = ogrtest.check_features_against_list(lyr, 'other', expect) assert tr lyr.ResetReading() feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(12.5 17 1.2)', max_error=0.000000001) == 0) assert feat.GetFID() == 1, 'Unexpected fid' feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, 'POINT(100 200)', max_error=0.000000001) == 0) assert feat.GetFID() == 2, 'Unexpected fid' ############################################################################### # Test that attribute filters are passed through to an underlying layer. def test_ogr_vrt_9(): if gdaltest.vrt_ds is None: pytest.skip() lyr = gdaltest.vrt_ds.GetLayerByName('test3') lyr.SetAttributeFilter("other = 'Second'") lyr.ResetReading() feat = lyr.GetNextFeature() assert feat.GetField('other') == 'Second', 'attribute filter did not work.' sub_ds = ogr.OpenShared('data/flat.dbf') sub_layer = sub_ds.GetLayerByName('flat') sub_layer.ResetReading() assert sub_layer.GetFeatureCount() == 1, 'attribute filter not passed to sublayer.' lyr.SetAttributeFilter(None) sub_ds.Release() sub_ds = None ############################################################################### # Test capabilities # def test_ogr_vrt_10(): if gdaltest.vrt_ds is None: pytest.skip() vrt_xml = 'data/testpoly.shptestpoly' vrt_ds = ogr.Open(vrt_xml) vrt_lyr = vrt_ds.GetLayerByName('test') src_ds = ogr.Open('data/testpoly.shp') src_lyr = src_ds.GetLayer(0) assert vrt_lyr.TestCapability(ogr.OLCFastFeatureCount) == src_lyr.TestCapability(ogr.OLCFastFeatureCount) assert vrt_lyr.TestCapability(ogr.OLCFastGetExtent) == src_lyr.TestCapability(ogr.OLCFastGetExtent) assert vrt_lyr.TestCapability(ogr.OLCRandomRead) == src_lyr.TestCapability(ogr.OLCRandomRead) ############################################################################### # Test VRT write capabilities with PointFromColumns geometries # Test also the reportGeomSrcColumn attribute def test_ogr_vrt_11(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csv', 'wb') f.write('x,val1,y,val2,style\n'.encode('ascii')) f.write('2,"val11",49,"val12","PEN(c:#FF0000,w:5pt,p:""2px 1pt"")"\n'.encode('ascii')) f.close() try: os.remove('tmp/test.csvt') except OSError: pass vrt_xml = """ tmp/test.csv test """ vrt_ds = ogr.Open(vrt_xml, update=1) vrt_lyr = vrt_ds.GetLayerByName('test') # Only val1, val2, style attributes should be reported assert vrt_lyr.GetLayerDefn().GetFieldCount() == 3 assert vrt_lyr.GetLayerDefn().GetFieldDefn(0).GetNameRef() == 'val1' assert vrt_lyr.GetLayerDefn().GetFieldDefn(1).GetNameRef() == 'val2' feat = vrt_lyr.GetNextFeature() if feat.GetStyleString() != 'PEN(c:#FF0000,w:5pt,p:"2px 1pt")': feat.DumpReadable() pytest.fail() feat = ogr.Feature(vrt_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (3 50)') feat.SetGeometryDirectly(geom) feat.SetField('val1', 'val21') vrt_lyr.CreateFeature(feat) vrt_lyr.ResetReading() feat = vrt_lyr.GetFeature(2) geom = feat.GetGeometryRef() if geom.ExportToWkt() != 'POINT (3 50)': feat.DumpReadable() pytest.fail() assert feat.GetFieldAsString('val1') == 'val21' # The x and y fields are considered as string by default, so spatial # filter cannot be turned into attribute filter gdal.PushErrorHandler('CPLQuietErrorHandler') vrt_lyr.SetSpatialFilterRect(0, 40, 10, 49.5) ret = vrt_lyr.GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('not declared as numeric fields') != -1 assert ret == 1 vrt_ds = None # Add a .csvt file to specify the x and y columns as reals f = open('tmp/test.csvt', 'wb') f.write('Real,String,Real,String\n'.encode('ascii')) f.close() vrt_ds = ogr.Open(vrt_xml, update=1) vrt_lyr = vrt_ds.GetLayerByName('test') vrt_lyr.SetSpatialFilterRect(0, 40, 10, 49.5) assert vrt_lyr.GetFeatureCount() == 1 assert gdal.GetLastErrorMsg() == '' vrt_lyr.SetAttributeFilter("1 = 1") assert vrt_lyr.GetFeatureCount() == 1 vrt_lyr.SetAttributeFilter("1 = 0") assert vrt_lyr.GetFeatureCount() == 0 vrt_ds = None os.remove('tmp/test.csv') os.remove('tmp/test.csvt') ############################################################################### # Test VRT write capabilities with WKT geometries def test_ogr_vrt_12(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csv', 'wb') f.write('wkt_geom,val1,val2\n'.encode('ascii')) f.write('POINT (2 49),"val11","val12"\n'.encode('ascii')) f.close() vrt_xml = """ tmp/test.csv test """ vrt_ds = ogr.Open(vrt_xml, update=1) vrt_lyr = vrt_ds.GetLayerByName('test') feat = ogr.Feature(vrt_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (3 50)') feat.SetGeometryDirectly(geom) feat.SetField('val1', 'val21') vrt_lyr.CreateFeature(feat) vrt_lyr.ResetReading() feat = vrt_lyr.GetFeature(2) geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (3 50)' assert feat.GetFieldAsString('val1') == 'val21' vrt_ds = None os.remove('tmp/test.csv') ############################################################################### # Test VRT write capabilities with WKB geometries def test_ogr_vrt_13(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csv', 'wb') f.write('wkb_geom,val1,val2\n'.encode('ascii')) f.close() vrt_xml = """ tmp/test.csv test """ vrt_ds = ogr.Open(vrt_xml, update=1) vrt_lyr = vrt_ds.GetLayerByName('test') feat = ogr.Feature(vrt_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (3 50)') feat.SetGeometryDirectly(geom) feat.SetField('val1', 'val21') vrt_lyr.CreateFeature(feat) vrt_lyr.ResetReading() feat = vrt_lyr.GetFeature(1) geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (3 50)' assert feat.GetFieldAsString('val1') == 'val21' vrt_ds = None os.remove('tmp/test.csv') ############################################################################### # Test SrcRegion element for VGS_Direct def test_ogr_vrt_14(): if gdaltest.vrt_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') try: ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') except AttributeError: pass gdal.PopErrorHandler() shp_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test.shp') shp_lyr = shp_ds.CreateLayer('test') feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) shp_ds.ExecuteSQL('CREATE SPATIAL INDEX on test') shp_ds = None vrt_xml = """ tmp/test.shp test POLYGON((0 40,0 50,10 50,10 40,0 40)) """ vrt_ds = ogr.Open(vrt_xml) vrt_lyr = vrt_ds.GetLayerByName('mytest') assert vrt_lyr.TestCapability(ogr.OLCFastSpatialFilter) == 1, 'Fast filter not set.' extent = vrt_lyr.GetExtent() assert extent == (2.0, 2.0, 49.0, 49.0), 'wrong extent' assert vrt_lyr.GetFeatureCount() == 1, 'Feature count not one as expected.' feat = vrt_lyr.GetNextFeature() assert feat.GetFID() == 2, 'did not get fid 2.' geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)', 'did not get expected point geometry.' vrt_lyr.SetSpatialFilterRect(1, 41, 3, 49.5) if vrt_lyr.GetFeatureCount() != 1: if gdal.GetLastErrorMsg().find('GEOS support not enabled') != -1: vrt_ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') pytest.skip() print(vrt_lyr.GetFeatureCount()) pytest.fail('did not get one feature on rect spatial filter.') vrt_lyr.SetSpatialFilterRect(1, 41, 3, 48.5) assert vrt_lyr.GetFeatureCount() == 0, 'Did not get expected zero feature count.' vrt_lyr.SetSpatialFilter(None) assert vrt_lyr.GetFeatureCount() == 1, \ 'Did not get expected one feature count with no filter.' vrt_ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') ############################################################################### # Test SrcRegion element for VGS_WKT def test_ogr_vrt_15(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csv', 'wb') f.write('wkt_geom,val1,val2\n'.encode('ascii')) f.write('POINT (-10 49),,\n'.encode('ascii')) f.write('POINT (-10 49),,\n'.encode('ascii')) f.write('POINT (2 49),,\n'.encode('ascii')) f.write('POINT (-10 49),,\n'.encode('ascii')) f.close() vrt_xml = """ tmp/test.csv test POLYGON((0 40,0 50,10 50,10 40,0 40)) """ vrt_ds = ogr.Open(vrt_xml) vrt_lyr = vrt_ds.GetLayerByName('test') assert vrt_lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 assert vrt_lyr.GetFeatureCount() == 1 feat = vrt_lyr.GetNextFeature() assert feat.GetFID() == 3 geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)' vrt_lyr.SetSpatialFilterRect(1, 41, 3, 49.5) assert vrt_lyr.GetFeatureCount() == 1 vrt_lyr.SetSpatialFilterRect(1, 41, 3, 48.5) assert vrt_lyr.GetFeatureCount() == 0 vrt_lyr.SetSpatialFilter(None) assert vrt_lyr.GetFeatureCount() == 1 vrt_ds = None os.remove('tmp/test.csv') ############################################################################### # Test SrcRegion element for VGS_PointFromColumns def test_ogr_vrt_16(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csvt', 'wb') f.write('Real,Real,String,String\n'.encode('ascii')) f.close() f = open('tmp/test.csv', 'wb') f.write('x,y,val1,val2\n'.encode('ascii')) f.write('-10,49,,\n'.encode('ascii')) f.write('-10,49,,\n'.encode('ascii')) f.write('2,49,,\n'.encode('ascii')) f.write('-10,49,,\n'.encode('ascii')) f.close() vrt_xml = """ tmp/test.csv test POLYGON((0 40,0 50,10 50,10 40,0 40)) """ vrt_ds = ogr.Open(vrt_xml) vrt_lyr = vrt_ds.GetLayerByName('test') assert vrt_lyr.TestCapability(ogr.OLCFastSpatialFilter) == 0 assert vrt_lyr.GetFeatureCount() == 1 feat = vrt_lyr.GetNextFeature() assert feat.GetFID() == 3 geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'POINT (2 49)' vrt_lyr.SetSpatialFilterRect(1, 41, 3, 49.5) if vrt_lyr.GetFeatureCount() != 1: if gdal.GetLastErrorMsg().find('GEOS support not enabled') != -1: vrt_ds = None os.remove('tmp/test.csv') os.remove('tmp/test.csvt') pytest.skip() pytest.fail() vrt_lyr.SetSpatialFilterRect(1, 41, 3, 48.5) assert vrt_lyr.GetFeatureCount() == 0 vrt_lyr.SetSpatialFilter(None) assert vrt_lyr.GetFeatureCount() == 1 vrt_ds = None os.remove('tmp/test.csv') os.remove('tmp/test.csvt') ############################################################################### # Test explicit field definitions. def test_ogr_vrt_17(): if gdaltest.vrt_ds is None: pytest.skip() vrt_xml = """ data/prime_meridian.csv prime_meridian """ vrt_ds = ogr.Open(vrt_xml) vrt_lyr = vrt_ds.GetLayerByName('test') assert vrt_lyr.GetLayerDefn().GetFieldCount() == 4, 'unexpected field count.' flddef = vrt_lyr.GetLayerDefn().GetFieldDefn(0) assert flddef.GetName() == 'pm_code' and flddef.GetType() == ogr.OFTInteger and flddef.GetWidth() == 4 and flddef.GetPrecision() == 0, \ 'pm_code field definition wrong.' flddef = vrt_lyr.GetLayerDefn().GetFieldDefn(1) assert flddef.GetName() == 'prime_meridian_name' and flddef.GetType() == ogr.OFTString and flddef.GetWidth() == 24 and flddef.GetPrecision() == 0, \ 'prime_meridian_name field definition wrong.' flddef = vrt_lyr.GetLayerDefn().GetFieldDefn(2) assert flddef.GetName() == 'new_col' and flddef.GetType() == ogr.OFTReal and flddef.GetWidth() == 12 and flddef.GetPrecision() == 3, \ 'new_col field definition wrong.' flddef = vrt_lyr.GetLayerDefn().GetFieldDefn(3) assert flddef.GetName() == 'DEPRECATED' and flddef.GetType() == ogr.OFTInteger and flddef.GetSubType() == ogr.OFSTBoolean, \ 'DEPRECATED field definition wrong.' feat = vrt_lyr.GetNextFeature() assert feat.GetField(0) == 8901 and feat.GetField(1) == "Greenwich" and feat.GetField(2) is None, \ 'did not get expected field value(s).' ############################################################################### # Test that attribute filters are *not* passed to sublayer by default # when explicit fields are defined. def test_ogr_vrt_18(): if gdaltest.vrt_ds is None: pytest.skip() vrt_xml = """ data/prime_meridian.csv prime_meridian """ vrt_ds = ogr.Open(vrt_xml) vrt_lyr = vrt_ds.GetLayerByName('test') vrt_lyr.SetAttributeFilter('pm_code=8904') feat = vrt_lyr.GetNextFeature() assert feat.GetField(0) == 8904, 'Attribute filter not working properly' ############################################################################### # Run test_ogrsf (optimized path) def test_ogr_vrt_19_optimized(): if gdaltest.vrt_ds is None: pytest.skip() if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/poly_vrt.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Run test_ogrsf (non optimized path) def test_ogr_vrt_19_nonoptimized(): if gdaltest.vrt_ds is None: pytest.skip() if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/poly_nonoptimized_vrt.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test VGS_Direct def test_ogr_vrt_20(): if gdaltest.vrt_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') try: ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') except AttributeError: pass gdal.PopErrorHandler() shp_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test.shp') shp_lyr = shp_ds.CreateLayer('test') feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 45)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (2 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) feat = ogr.Feature(shp_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (-10 49)') feat.SetGeometryDirectly(geom) shp_lyr.CreateFeature(feat) shp_ds.ExecuteSQL('CREATE SPATIAL INDEX on test') shp_ds = None vrt_xml = """ tmp/test.shp test """ vrt_ds = ogr.Open(vrt_xml, update=1) vrt_lyr = vrt_ds.GetLayerByName('mytest') assert vrt_lyr.TestCapability(ogr.OLCFastFeatureCount) == 1, \ 'Fast feature count not set.' assert vrt_lyr.TestCapability(ogr.OLCFastSpatialFilter) == 1, 'Fast filter not set.' assert vrt_lyr.TestCapability(ogr.OLCFastGetExtent) == 1, 'Fast extent not set.' extent = vrt_lyr.GetExtent() assert extent == (-10.0, 2.0, 45.0, 49.0), 'wrong extent' assert vrt_lyr.GetFeatureCount() == 4, 'Feature count not 4 as expected.' vrt_lyr.SetSpatialFilterRect(1, 48.5, 3, 49.5) if vrt_lyr.GetFeatureCount() != 1: if gdal.GetLastErrorMsg().find('GEOS support not enabled') != -1: vrt_ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') pytest.skip() print(vrt_lyr.GetFeatureCount()) pytest.fail('did not get one feature on rect spatial filter.') assert vrt_lyr.TestCapability(ogr.OLCFastFeatureCount) == 1, \ 'Fast feature count not set.' assert vrt_lyr.TestCapability(ogr.OLCFastGetExtent) == 1, 'Fast extent not set.' extent = vrt_lyr.GetExtent() # the shapefile driver currently doesn't change the extent even in the # presence of a spatial filter, so that could change in the future assert extent == (-10.0, 2.0, 45.0, 49.0), 'wrong extent' vrt_lyr.SetSpatialFilterRect(1, 48, 3, 48.5) assert vrt_lyr.GetFeatureCount() == 0, 'Did not get expected zero feature count.' vrt_lyr.SetSpatialFilter(None) assert vrt_lyr.GetFeatureCount() == 4, \ 'Feature count not 4 as expected with no filter.' vrt_lyr.ResetReading() feat = vrt_lyr.GetNextFeature() feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (1 2)')) vrt_lyr.SetFeature(feat) feat = None vrt_lyr.ResetReading() feat = vrt_lyr.GetNextFeature() if feat.GetGeometryRef() is None or \ feat.GetGeometryRef().ExportToWkt() != 'POINT (1 2)': feat.DumpReadable() pytest.fail() vrt_ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test.shp') ############################################################################### # Test lazy initialization with valid layer def ogr_vrt_21_internal(): if gdaltest.vrt_ds is None: pytest.skip() ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetName() == 'test3' ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetGeomType() == ogr.wkbPoint ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetSpatialRef().ExportToWkt().find('84') != -1 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') lyr.ResetReading() ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetNextFeature() is not None ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetFeature(1) is not None ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetFeatureCount() != 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.SetNextByIndex(1) == 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetLayerDefn().GetFieldCount() != 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.SetAttributeFilter('') == 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') lyr.SetSpatialFilter(None) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetExtent() is not None ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') assert lyr.GetFIDColumn() == 'fid' ds = None feature_defn = ogr.FeatureDefn() feat = ogr.Feature(feature_defn) ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') lyr.CreateFeature(feat) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') lyr.SetFeature(feat) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') lyr.DeleteFeature(0) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test3') lyr.SyncToDisk() ds = None def test_ogr_vrt_21(): gdal.PushErrorHandler('CPLQuietErrorHandler') try: ret = ogr_vrt_21_internal() except: ret = 'fail' gdal.PopErrorHandler() return ret ############################################################################### # Test lazy initialization with invalid layer def ogr_vrt_22_internal(): if gdaltest.vrt_ds is None: pytest.skip() ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetName() == 'test5' ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetGeomType() == ogr.wkbPoint ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetSpatialRef().ExportToWkt().find('84') != -1 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.ResetReading() ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetNextFeature() is None ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetFeature(1) is None ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetFeatureCount() == 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.SetNextByIndex(1) != 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetLayerDefn().GetFieldCount() == 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.SetAttributeFilter('') != 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.SetSpatialFilter(None) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0 ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') assert lyr.GetFIDColumn() == '' ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.GetExtent() ds = None feature_defn = ogr.FeatureDefn() feat = ogr.Feature(feature_defn) ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.CreateFeature(feat) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.SetFeature(feat) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.DeleteFeature(0) ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.SyncToDisk() ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.StartTransaction() ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.CommitTransaction() ds = None ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test5') lyr.RollbackTransaction() ds = None def test_ogr_vrt_22(): gdal.PushErrorHandler('CPLQuietErrorHandler') try: ret = ogr_vrt_22_internal() except: ret = 'fail' gdal.PopErrorHandler() return ret ############################################################################### # Test anti-recursion mechanism def test_ogr_vrt_23(shared_ds_flag=''): if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would crash') rec1 = """ /vsimem/rec2.vrt rec2 """ % shared_ds_flag rec2 = """ /vsimem/rec1.vrt rec1 """ % shared_ds_flag gdal.FileFromMemBuffer('/vsimem/rec1.vrt', rec1) gdal.FileFromMemBuffer('/vsimem/rec2.vrt', rec2) ds = ogr.Open('/vsimem/rec1.vrt') assert ds is not None gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetLayer(0).GetLayerDefn() ds.GetLayer(0).GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'error expected !' gdal.Unlink('/vsimem/rec1.vrt') gdal.Unlink('/vsimem/rec2.vrt') ############################################################################### # Test anti-recursion mechanism on shared DS def test_ogr_vrt_24(): test_ogr_vrt_23(' shared="1"') rec1 = """ /vsimem/rec2.vrt """ rec2 = """ /vsimem/rec2.vrt """ gdal.FileFromMemBuffer('/vsimem/rec1.vrt', rec1) gdal.FileFromMemBuffer('/vsimem/rec2.vrt', rec2) ds = ogr.Open('/vsimem/rec1.vrt') assert ds is not None gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetLayer(0).GetLayerDefn() ds.GetLayer(0).GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'error expected !' gdal.Unlink('/vsimem/rec1.vrt') gdal.Unlink('/vsimem/rec2.vrt') ############################################################################### # Test GetFIDColumn() def test_ogr_vrt_25(): with gdaltest.error_handler(): ds = ogr.Open('data/vrt_test.vrt') # test3 layer just declares fid, and implicit fields (so all source # fields are taken as VRT fields), we can report the fid column lyr = ds.GetLayerByName('test3') assert lyr.GetFIDColumn() == 'fid' # test6 layer declares fid, and explicit fields without the fid lyr = ds.GetLayerByName('test6') assert lyr.GetFIDColumn() == 'fid' # test7 layer just declares fid with an external visible name lyr = ds.GetLayerByName('test7') assert lyr.GetFIDColumn() == 'bar' # test2 layer does not declare fid, and source layer has no fid column # so nothing to report lyr = ds.GetLayerByName('test2') assert lyr.GetFIDColumn() == '' ds = None ############################################################################### # Test transaction support def test_ogr_vrt_26(): if ogr.GetDriverByName('SQLite') is None: pytest.skip() sqlite_ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/ogr_vrt_26.db') if sqlite_ds is None: pytest.skip() lyr = sqlite_ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr = None sqlite_ds.SyncToDisk() vrt_ds = ogr.Open(""" /vsimem/ogr_vrt_26.db """, update=1) lyr = vrt_ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCTransactions) != 0 lyr.StartTransaction() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'foo') lyr.CreateFeature(feat) feat = None assert lyr.GetFeatureCount() == 1 lyr.RollbackTransaction() assert lyr.GetFeatureCount() == 0 lyr.StartTransaction() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'bar') lyr.CreateFeature(feat) feat = None lyr.CommitTransaction() assert lyr.GetFeatureCount() == 1 vrt_ds = None sqlite_ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('/vsimem/ogr_vrt_26.db') ############################################################################### # Test shapebin geometry def test_ogr_vrt_27(): csv = """dummy,shapebin "dummy","01000000000000000000F03F0000000000000040" "dummy","0300000000000000000008400000000000001040000000000000144000000000000018400100000002000000000000000000000000000840000000000000104000000000000014400000000000001840" "dummy","0500000000000000000000000000000000000000000000000000F03F000000000000F03F010000000500000000000000000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F000000000000F03F000000000000F03F000000000000000000000000000000000000000000000000" """ gdal.FileFromMemBuffer('/vsimem/ogr_vrt_27.csv', csv) ds = ogr.Open(""" /vsimem/ogr_vrt_27.csv """) assert ds is not None lyr = ds.GetLayer(0) wkt_list = ['POINT (1 2)', 'LINESTRING (3 4,5 6)', 'POLYGON ((0 0,0 1,1 1,1 0,0 0))'] feat = lyr.GetNextFeature() i = 0 while feat is not None: assert ogrtest.check_feature_geometry(feat, wkt_list[i]) == 0 feat = lyr.GetNextFeature() i = i + 1 ds = None gdal.Unlink('/vsimem/ogr_vrt_27.csv') ############################################################################### # Invalid VRT testing def test_ogr_vrt_28(): with gdaltest.error_handler(): ds = ogr.Open("") assert ds is None gdal.FileFromMemBuffer('/vsimem/ogr_vrt_28_invalid.vrt', "") with gdaltest.error_handler(): ds = ogr.Open("/vsimem/ogr_vrt_28_invalid.vrt") assert ds is None gdal.Unlink("/vsimem/ogr_vrt_28_invalid.vrt") with gdaltest.error_handler(): ds = ogr.Open("data/invalid.vrt") assert ds is not None for i in range(ds.GetLayerCount()): gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.GetLayer(i) lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', \ ('expected failure for layer %d of datasource %s' % (i, ds.GetName())) ds = None gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open("") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'expected error message on datasource opening' gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open("data/invalid2.vrt") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'expected error message on datasource opening' gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open("data/invalid3.vrt") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'expected error message on datasource opening' ############################################################################### # Test OGRVRTWarpedLayer def test_ogr_vrt_29(): gdal.Unlink('tmp/ogr_vrt_29.shp') gdal.Unlink('tmp/ogr_vrt_29.shx') gdal.Unlink('tmp/ogr_vrt_29.dbf') gdal.Unlink('tmp/ogr_vrt_29.prj') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_vrt_29.shp') sr = osr.SpatialReference() sr.ImportFromEPSG(4326) lyr = ds.CreateLayer('ogr_vrt_29', srs=sr) lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) for i in range(5): for j in range(5): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, i * 5 + j) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%f %f)' % (2 + i / 5.0, 49 + j / 5.0))) lyr.CreateFeature(feat) feat = None ds = None # Invalid source layer gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open(""" tmp/non_existing.shp EPSG:32631 """) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Non-spatial layer gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open(""" data/flat.dbf EPSG:32631 """) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Missing TargetSRS gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open(""" tmp/ogr_vrt_29.shp """) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Invalid TargetSRS gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open(""" tmp/ogr_vrt_29.shp foo """) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Invalid SrcSRS gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open(""" tmp/ogr_vrt_29.shp foo EPSG:32631 """) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # TargetSRS == source SRS ds = ogr.Open(""" tmp/ogr_vrt_29.shp EPSG:4326 """) lyr = ds.GetLayer(0) ds = None # Forced extent ds = ogr.Open(""" tmp/ogr_vrt_29.shp EPSG:32631 426857 5427475 485608 5516874 """) lyr = ds.GetLayer(0) bb = lyr.GetExtent() assert bb == (426857, 485608, 5427475, 5516874) ds = None f = open('tmp/ogr_vrt_29.vrt', 'wt') f.write(""" ogr_vrt_29.shp EPSG:32631 \n""") f.close() # Check reprojection in both directions ds = ogr.Open('tmp/ogr_vrt_29.vrt', update=1) lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert got_wkt.find('32631') != -1, 'did not get expected WKT' bb = lyr.GetExtent() expected_bb = (426857.98771727527, 485607.2165091355, 5427475.0501426803, 5516873.8591036052) for i in range(4): assert bb[i] == pytest.approx(expected_bb[i], abs=1), 'did not get expected extent' feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT(426857.987717275274917 5427937.523466162383556)') != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() feat.SetGeometry(None) assert lyr.SetFeature(feat) == 0 feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 0)')) assert lyr.SetFeature(feat) == 0 feat = None lyr.SetSpatialFilterRect(499999, -1, 500001, 1) lyr.ResetReading() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT(500000 0)') != 0: feat.DumpReadable() pytest.fail() feat = None feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('id', -99) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 0)')) assert lyr.CreateFeature(feat) == 0 feat = None feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('id', -100) assert lyr.CreateFeature(feat) == 0 feat = None ds = None # Check failed operations in read-only ds = ogr.Open('tmp/ogr_vrt_29.vrt') lyr = ds.GetLayer(0) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteFeature(1) gdal.PopErrorHandler() assert ret != 0 feat = lyr.GetNextFeature() feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 0)')) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat = None feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 0)')) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat = None ds = None # Check in .shp file ds = ogr.Open('tmp/ogr_vrt_29.shp', update=1) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT(3.0 0.0)') != 0: feat.DumpReadable() pytest.fail() lyr.SetAttributeFilter('id = -99') lyr.ResetReading() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, 'POINT(3.0 0.0)') != 0: feat.DumpReadable() pytest.fail() lyr.SetAttributeFilter('id = -100') lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 1000) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-180 91)')) lyr.CreateFeature(feat) feat = None ds = None # Check failed reprojection when reading through VRT ds = ogr.Open('tmp/ogr_vrt_29.vrt', update=1) lyr = ds.GetLayer(0) lyr.SetAttributeFilter('id = 1000') # Reprojection will fail gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() fid = feat.GetFID() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetFeature(fid) gdal.PopErrorHandler() if feat.GetGeometryRef() is not None: feat.DumpReadable() pytest.fail() feat = None lyr.DeleteFeature(fid) ds = None f = open('tmp/ogr_vrt_29_2.vrt', 'wt') f.write(""" ogr_vrt_29.vrt EPSG:4326 \n""") f.close() # Check failed reprojection when writing through VRT ds = ogr.Open('tmp/ogr_vrt_29_2.vrt', update=1) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-180 91)')) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat = None feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(-180 91)')) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat = None ds = None # Some sanity operations before running test_ogrsf ds = ogr.Open('tmp/ogr_vrt_29.shp', update=1) ds.ExecuteSQL('REPACK ogr_vrt_29') ds.ExecuteSQL('RECOMPUTE EXTENT ON ogr_vrt_29') ds = None # Check with test_ogrsf if test_cli_utilities.get_test_ogrsf_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_29.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 gdal.Unlink('tmp/ogr_vrt_29.shp') gdal.Unlink('tmp/ogr_vrt_29.shx') gdal.Unlink('tmp/ogr_vrt_29.dbf') gdal.Unlink('tmp/ogr_vrt_29.prj') os.unlink('tmp/ogr_vrt_29.vrt') os.unlink('tmp/ogr_vrt_29_2.vrt') ############################################################################### # Test OGRVRTUnionLayer def test_ogr_vrt_30(): for filename in ['tmp/ogr_vrt_30_1.shp', 'tmp/ogr_vrt_30_1.shx', 'tmp/ogr_vrt_30_1.dbf', 'tmp/ogr_vrt_30_1.prj', 'tmp/ogr_vrt_30_1.qix', 'tmp/ogr_vrt_30_2.shp', 'tmp/ogr_vrt_30_2.shx', 'tmp/ogr_vrt_30_2.dbf', 'tmp/ogr_vrt_30_2.prj', 'tmp/ogr_vrt_30_2.qix']: gdal.Unlink(filename) ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_vrt_30_1.shp') sr = osr.SpatialReference() sr.ImportFromEPSG(4326) lyr = ds.CreateLayer('ogr_vrt_30_1', srs=sr) lyr.CreateField(ogr.FieldDefn('id1', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('id2', ogr.OFTInteger)) for i in range(5): for j in range(5): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, i * 5 + j) feat.SetField(1, 100 + i * 5 + j) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%f %f)' % (2 + i / 5.0, 49 + j / 5.0))) lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('CREATE SPATIAL INDEX ON ogr_vrt_30_1') ds = None ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_vrt_30_2.shp') sr = osr.SpatialReference() sr.ImportFromEPSG(4326) lyr = ds.CreateLayer('ogr_vrt_30_2', srs=sr) lyr.CreateField(ogr.FieldDefn('id2', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('id3', ogr.OFTInteger)) for i in range(5): for j in range(5): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 200 + i * 5 + j) feat.SetField(1, 300 + i * 5 + j) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%f %f)' % (4 + i / 5.0, 49 + j / 5.0))) lyr.CreateFeature(feat) feat = None ds.ExecuteSQL('CREATE SPATIAL INDEX ON ogr_vrt_30_2') ds = None f = open('tmp/ogr_vrt_30.vrt', 'wt') f.write(""" ogr_vrt_30_1.shp ogr_vrt_30_2.shp \n""") f.close() # Check for check in range(10): ds = ogr.Open('tmp/ogr_vrt_30.vrt', update=1) lyr = ds.GetLayer(0) if check == 0: sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert got_wkt.find('GEOGCS["WGS 84"') != -1, 'did not get expected WKT' elif check == 1: bb = lyr.GetExtent() expected_bb = (2.0, 4.7999999999999998, 49.0, 49.799999999999997) for i in range(4): assert bb[i] == pytest.approx(expected_bb[i], abs=1), 'did not get expected extent' elif check == 2: feat_count = lyr.GetFeatureCount() assert feat_count == 2 * 5 * 5, 'did not get expected feature count' elif check == 3: assert lyr.GetLayerDefn().GetFieldCount() == 3, 'did not get expected field count' assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTInteger64, \ 'did not get expected field type' elif check == 4: feat = lyr.GetNextFeature() i = 0 while feat is not None: if i < 5 * 5: assert feat.GetFID() == i, 'did not get expected value' assert feat.GetFieldAsInteger("id1") == i, \ 'did not get expected value' assert feat.GetFieldAsInteger("id2") == 100 + i, \ 'did not get expected value' assert not feat.IsFieldSet("id3"), 'did not get expected value' if ogrtest.check_feature_geometry(feat, 'POINT(%f %f)' % (2 + int(i / 5) / 5.0, 49 + int(i % 5) / 5.0)) != 0: feat.DumpReadable() pytest.fail('did not get expected value') else: assert feat.GetFID() == i, 'did not get expected value' assert not feat.IsFieldSet("id1"), 'did not get expected value' assert feat.GetFieldAsInteger("id2") == 200 + i - 5 * 5, \ 'did not get expected value' assert feat.GetFieldAsInteger("id3") == 300 + i - 5 * 5, \ 'did not get expected value' assert ogrtest.check_feature_geometry(feat, 'POINT(%f %f)' % (4 + int((i - 5 * 5) / 5) / 5.0, 49 + int((i - 5 * 5) % 5) / 5.0)) == 0, \ 'did not get expected value' i = i + 1 feat = lyr.GetNextFeature() elif check == 5: assert lyr.GetGeomType() == ogr.wkbPoint, 'did not get expected geom type' elif check == 6: assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCFastGetExtent) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCIgnoreFields) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCRandomWrite) == 0, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCSequentialWrite) == 0, \ 'did not get expected capability' elif check == 7: lyr.SetSpatialFilterRect(2.49, 49.29, 4.49, 49.69) assert lyr.GetFeatureCount() == 10, 'did not get expected feature count' elif check == 8: lyr.SetAttributeFilter('id1 = 0') assert lyr.GetFeatureCount() == 1, 'did not get expected feature count' elif check == 9: # CreateFeature() should fail feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('id2', 12345) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' feat = None # SetFeature() should fail lyr.ResetReading() feat = lyr.GetNextFeature() feat.SetField('id2', 45321) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' feat = None # Test feature existence : should fail lyr.SetAttributeFilter('id2 = 12345 or id2 = 45321') lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None, 'should have failed' ds = None # Check with test_ogrsf if test_cli_utilities.get_test_ogrsf_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_30.vrt --config OGR_VRT_MAX_OPENED 1') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/ogr_vrt_30.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Test various optional attributes f = open('tmp/ogr_vrt_30.vrt', 'wt') f.write(""" ogr_vrt_30_1.shp ogr_vrt_30_2.shp source_layer ON Intersection wkbPoint25D WGS72 100 -180 -90 180 90 \n""") f.close() for check in range(9): ds = ogr.Open('tmp/ogr_vrt_30.vrt', update=1) lyr = ds.GetLayer(0) if check == 0: sr = lyr.GetSpatialRef() got_wkt = sr.ExportToWkt() assert got_wkt.find('WGS 72') != -1, 'did not get expected WKT' elif check == 1: bb = lyr.GetExtent() expected_bb = (-180.0, 180.0, -90.0, 90.0) for i in range(4): assert bb[i] == pytest.approx(expected_bb[i], abs=1), 'did not get expected extent' elif check == 2: assert lyr.GetFeatureCount() == 100, 'did not get expected feature count' elif check == 3: assert lyr.GetLayerDefn().GetFieldCount() == 2, 'did not get expected field count' elif check == 4: feat = lyr.GetNextFeature() i = 0 while feat is not None: if i < 5 * 5: assert feat.GetFID() == i, 'did not get expected value' assert feat.GetFieldAsString("source_layer") == 'ogr_vrt_30_1', \ 'did not get expected value' assert feat.GetFieldAsInteger("id2") == 100 + i, \ 'did not get expected value' else: assert feat.GetFID() == i - 5 * 5, 'did not get expected value' assert feat.GetFieldAsString("source_layer") == 'ogr_vrt_30_2', \ 'did not get expected value' assert feat.GetFieldAsInteger("id2") == 200 + i - 5 * 5, \ 'did not get expected value' i = i + 1 feat = lyr.GetNextFeature() elif check == 5: assert lyr.GetGeomType() == ogr.wkbPoint25D, 'did not get expected geom type' elif check == 6: assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCFastGetExtent) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCFastSpatialFilter) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCIgnoreFields) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCRandomWrite) == 1, \ 'did not get expected capability' assert lyr.TestCapability(ogr.OLCSequentialWrite) == 1, \ 'did not get expected capability' elif check == 7: lyr.SetSpatialFilterRect(2.49, 49.29, 4.49, 49.69) assert lyr.GetFeatureCount() == 10, 'did not get expected feature count' elif check == 8: # invalid source_layer name with CreateFeature() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('source_layer', 'random_name') feat.SetField('id2', 12345) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' feat = None # unset source_layer name with CreateFeature() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('id2', 12345) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' feat = None # FID set with CreateFeature() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(999999) feat.SetField('source_layer', 'ogr_vrt_30_2') feat.SetField('id2', 12345) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' feat = None # CreateFeature() OK feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('source_layer', 'ogr_vrt_30_2') feat.SetField('id2', 12345) assert lyr.CreateFeature(feat) == 0, 'should have succeeded' # SetFeature() OK feat.SetField('id2', 45321) assert lyr.SetFeature(feat) == 0, 'should have succeeded' # invalid source_layer name with SetFeature() feat.SetField('source_layer', 'random_name') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' # unset source_layer name with SetFeature() feat.UnsetField('source_layer') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' # FID unset with SetFeature() feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('source_layer', 'ogr_vrt_30_2') feat.SetField('id2', 12345) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert ret != 0, 'should have failed' feat = None # Test feature existence (with passthru) lyr.SetAttributeFilter('id2 = 45321 AND OGR_GEOMETRY IS NULL') assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1, \ 'should have returned 1' lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None, 'should have succeeded' # Test feature existence (without passthru) lyr.SetAttributeFilter("id2 = 45321 AND OGR_GEOMETRY IS NULL AND source_layer = 'ogr_vrt_30_2'") assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0, \ 'should have returned 0' lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None, 'should have succeeded' # Test SyncToDisk() assert lyr.SyncToDisk() == 0, 'should have succeeded' ds = None for filename in ['tmp/ogr_vrt_30_1.shp', 'tmp/ogr_vrt_30_1.shx', 'tmp/ogr_vrt_30_1.dbf', 'tmp/ogr_vrt_30_1.prj', 'tmp/ogr_vrt_30_1.qix', 'tmp/ogr_vrt_30_2.shp', 'tmp/ogr_vrt_30_2.shx', 'tmp/ogr_vrt_30_2.dbf', 'tmp/ogr_vrt_30_2.prj', 'tmp/ogr_vrt_30_2.qix']: gdal.Unlink(filename) os.unlink('tmp/ogr_vrt_30.vrt') ############################################################################### # Test anti-recursion mechanism with union layer def test_ogr_vrt_31(shared_ds_flag=''): rec1 = """ /vsimem/rec2.vrt /vsimem/rec1.vrt """ % (shared_ds_flag, shared_ds_flag) rec2 = """ /vsimem/rec1.vrt /vsimem/rec2.vrt """ % (shared_ds_flag, shared_ds_flag) gdal.FileFromMemBuffer('/vsimem/rec1.vrt', rec1) gdal.FileFromMemBuffer('/vsimem/rec2.vrt', rec2) ds = ogr.Open('/vsimem/rec1.vrt') assert ds is not None gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ds.GetLayer(0).GetLayerDefn() ds.GetLayer(0).GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'error expected !' gdal.Unlink('/vsimem/rec1.vrt') gdal.Unlink('/vsimem/rec2.vrt') ############################################################################### # Test anti-recursion mechanism on shared DS def test_ogr_vrt_32(): return test_ogr_vrt_31(' shared="1"') ############################################################################### # Test multi-geometry support def test_ogr_vrt_33(): try: import shutil shutil.rmtree('tmp/ogr_vrt_33') except OSError: pass ds = ogr.GetDriverByName('CSV').CreateDataSource('tmp/ogr_vrt_33', options=['GEOMETRY=AS_WKT']) lyr = ds.CreateLayer('test', geom_type=ogr.wkbNone, options=['CREATE_CSVT=YES']) lyr.CreateGeomField(ogr.GeomFieldDefn("geom__WKT_EPSG_4326_POINT", ogr.wkbPoint)) lyr.CreateGeomField(ogr.GeomFieldDefn("geom__WKT_EPSG_32632_POLYGON", ogr.wkbPolygon)) lyr.CreateGeomField(ogr.GeomFieldDefn("geom__WKT_EPSG_4326_LINESTRING", ogr.wkbLineString)) lyr.CreateField(ogr.FieldDefn("X", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("Y", ogr.OFTReal)) lyr = ds.CreateLayer('test2', geom_type=ogr.wkbNone, options=['CREATE_CSVT=YES']) lyr.CreateGeomField(ogr.GeomFieldDefn("geom__WKT_EPSG_32632_POLYGON", ogr.wkbPolygon)) lyr.CreateGeomField(ogr.GeomFieldDefn("geom__WKT_EPSG_4326_POINT", ogr.wkbPoint)) lyr.CreateGeomField(ogr.GeomFieldDefn("geom__WKT_EPSG_32631_POINT", ogr.wkbPoint)) lyr.CreateField(ogr.FieldDefn("Y", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("X", ogr.OFTReal)) ds = None ds = ogr.Open('tmp/ogr_vrt_33', update=1) lyr = ds.GetLayerByName('test') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeomField(0, ogr.CreateGeometryFromWkt('POINT (1 2)')) feat.SetGeomField(1, ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,1 0,0 0))')) feat.SetField("X", -1) feat.SetField("Y", -2) lyr.CreateFeature(feat) lyr = ds.GetLayerByName('test2') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeomField(0, ogr.CreateGeometryFromWkt('POLYGON ((1 1,1 2,2 2,2 1,1 1))')) feat.SetGeomField(1, ogr.CreateGeometryFromWkt('POINT (3 4)')) feat.SetGeomField(2, ogr.CreateGeometryFromWkt('POINT (5 6)')) feat.SetField("X", -3) feat.SetField("Y", -4) lyr.CreateFeature(feat) ds = None for i in range(2): if i == 0: # Minimalist definition. ds_str = """ tmp/ogr_vrt_33 """ else: # Implicit fields ds_str = """ tmp/ogr_vrt_33 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) for j in range(5): if j == 0: assert lyr.GetGeomType() == ogr.wkbPoint elif j == 1: assert lyr.GetSpatialRef().ExportToWkt().find('GEOGCS') == 0 elif j == 2: assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetType() == ogr.wkbPolygon elif j == 3: assert lyr.GetExtent(geom_field=1) == (0, 1, 0, 1) elif j == 4: assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetSpatialRef().ExportToWkt().find('PROJCS') == 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)': feat.DumpReadable() pytest.fail() if feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 if ogrtest.have_geos(): # Select only second field and change various attributes ds_str = """ tmp/ogr_vrt_33 wkbPolygon25D +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs 1 2 3 4 POLYGON((0.5 0.5,1.5 0.5,1.5 1.5,0.5 1.5,0.5 0.5)) """ for i in range(6): ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) if i == 0: assert lyr.GetGeomType() == ogr.wkbPolygon25D elif i == 1: assert lyr.GetSpatialRef().ExportToWkt().find('+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +wktext +no_defs') >= 0 elif i == 2: assert lyr.GetGeometryColumn() == 'foo' elif i == 3: assert lyr.TestCapability(ogr.OLCFastGetExtent) == 1 assert lyr.GetExtent(geom_field=0) == (1, 3, 2, 4) elif i == 4: assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 0 elif i == 5: assert lyr.GetLayerDefn().GetGeomFieldCount() == 1 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POLYGON ((0.5 1.0,1 1,1.0 0.5,0.5 0.5,0.5 1.0))': feat.DumpReadable() pytest.fail() if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # No geometry fields ds_str = """ tmp/ogr_vrt_33 wkbNone """ for i in range(4): ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) if i == 0: assert lyr.GetGeomType() == ogr.wkbNone elif i == 1: assert lyr.GetSpatialRef() is None elif i == 2: lyr.TestCapability(ogr.OLCFastFeatureCount) lyr.TestCapability(ogr.OLCFastGetExtent) lyr.TestCapability(ogr.OLCFastSpatialFilter) elif i == 3: assert lyr.GetLayerDefn().GetGeomFieldCount() == 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0) is not None: feat.DumpReadable() pytest.fail() if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ds_str = """ tmp/ogr_vrt_33 EPSG:4326 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetType() == ogr.wkbPoint assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetSpatialRef().ExportToWkt().find('4326') >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)': feat.DumpReadable() pytest.fail() if feat.GetGeomFieldRef(1).ExportToWkt() != 'POINT (-1 -2)': feat.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(1, 0, 0, 0, 0) assert lyr.GetFeatureCount() == 0 lyr.SetSpatialFilterRect(1, -1.1, -2.1, -0.9, -1.9) assert lyr.GetFeatureCount() == 1 lyr.SetSpatialFilter(1, None) assert lyr.GetFeatureCount() == 1 lyr.SetIgnoredFields(['geom__WKT_EPSG_4326_POINT']) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0) is not None or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POINT (-1 -2)': feat.DumpReadable() pytest.fail() lyr.SetIgnoredFields(['foo']) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(1) is not None or \ feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)': feat.DumpReadable() pytest.fail() if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Warped layer without explicit WarpedGeomFieldName ds_str = """ tmp/ogr_vrt_33 EPSG:32631 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) assert lyr.GetSpatialRef().ExportToWkt().find('32631') >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt().find('POINT') < 0 or \ feat.GetGeomFieldRef(0).ExportToWkt() == 'POINT (1 2)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() # Warped layer with explicit WarpedGeomFieldName (that is the first field) ds_str = """ tmp/ogr_vrt_33 geom__WKT_EPSG_4326_POINT EPSG:32631 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) assert lyr.GetSpatialRef().ExportToWkt().find('32631') >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt().find('POINT') < 0 or \ feat.GetGeomFieldRef(0).ExportToWkt() == 'POINT (1 2)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() # Warped layer with explicit WarpedGeomFieldName (that does NOT exist) ds_str = """ tmp/ogr_vrt_33 foo EPSG:32631 """ gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.Open(ds_str) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Warped layer with explicit WarpedGeomFieldName (that is the second field) ds_str = """ tmp/ogr_vrt_33 geom__WKT_EPSG_32632_POLYGON EPSG:4326 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetGeomFieldDefn(1).GetSpatialRef().ExportToWkt().find('4326') >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(1).ExportToWkt().find('POLYGON') < 0 or \ feat.GetGeomFieldRef(1).ExportToWkt() == 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' or \ feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)': feat.DumpReadable() pytest.fail() # UnionLayer with default union strategy ds_str = """ tmp/ogr_vrt_33 tmp/ogr_vrt_33 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) geom_fields = [['geom__WKT_EPSG_4326_POINT', ogr.wkbPoint, '4326'], ['geom__WKT_EPSG_32632_POLYGON', ogr.wkbPolygon, '32632'], ['geom__WKT_EPSG_4326_LINESTRING', ogr.wkbLineString, '4326'], ['geom__WKT_EPSG_32631_POINT', ogr.wkbPoint, '32631']] assert lyr.GetLayerDefn().GetGeomFieldCount() == len(geom_fields) for i, geom_field in enumerate(geom_fields): assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName() == geom_field[0] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetType() == geom_field[1] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetSpatialRef().ExportToWkt().find(geom_field[2]) >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' or \ feat.GetGeomFieldRef(2) is not None or \ feat.GetGeomFieldRef(3) is not None: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (3 4)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((1 1,1 2,2 2,2 1,1 1))' or \ feat.GetGeomFieldRef(2) is not None or \ feat.GetGeomFieldRef(3).ExportToWkt() != 'POINT (5 6)': feat.DumpReadable() pytest.fail() ds = None if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # UnionLayer with intersection strategy ds_str = """ tmp/ogr_vrt_33 tmp/ogr_vrt_33 Intersection """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) geom_fields = [['geom__WKT_EPSG_4326_POINT', ogr.wkbPoint, '4326'], ['geom__WKT_EPSG_32632_POLYGON', ogr.wkbPolygon, '32632']] assert lyr.GetLayerDefn().GetGeomFieldCount() == len(geom_fields) for i, geom_field in enumerate(geom_fields): assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName() == geom_field[0] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetType() == geom_field[1] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetSpatialRef().ExportToWkt().find(geom_field[2]) >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (3 4)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((1 1,1 2,2 2,2 1,1 1))': feat.DumpReadable() pytest.fail() ds = None if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # UnionLayer with FirstLayer strategy ds_str = """ tmp/ogr_vrt_33 tmp/ogr_vrt_33 FirstLayer """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) geom_fields = [['geom__WKT_EPSG_4326_POINT', ogr.wkbPoint, '4326'], ['geom__WKT_EPSG_32632_POLYGON', ogr.wkbPolygon, '32632'], ['geom__WKT_EPSG_4326_LINESTRING', ogr.wkbLineString, '4326']] assert lyr.GetLayerDefn().GetGeomFieldCount() == len(geom_fields) for i, geom_field in enumerate(geom_fields): assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName() == geom_field[0] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetType() == geom_field[1] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetSpatialRef().ExportToWkt().find(geom_field[2]) >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (3 4)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((1 1,1 2,2 2,2 1,1 1))': feat.DumpReadable() pytest.fail() ds = None if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # UnionLayer with explicit fields but without further information ds_str = """ tmp/ogr_vrt_33 tmp/ogr_vrt_33 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) geom_fields = [['geom__WKT_EPSG_32632_POLYGON', ogr.wkbPolygon, '32632'], ['geom__WKT_EPSG_4326_POINT', ogr.wkbPoint, '4326']] assert lyr.GetLayerDefn().GetGeomFieldCount() == len(geom_fields) for i, geom_field in enumerate(geom_fields): assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName() == geom_field[0] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetType() == geom_field[1] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetSpatialRef().ExportToWkt().find(geom_field[2]) >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POINT (1 2)': feat.DumpReadable() pytest.fail() ds = None if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # UnionLayer with explicit fields with extra information ds_str = """ tmp/ogr_vrt_33 tmp/ogr_vrt_33 wkbPolygon25D EPSG:4322 1 2 3 4 """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) geom_fields = [['geom__WKT_EPSG_32632_POLYGON', ogr.wkbPolygon25D, '32632'], ['geom__WKT_EPSG_4326_POINT', ogr.wkbPoint, '4322']] assert lyr.GetLayerDefn().GetGeomFieldCount() == len(geom_fields) bb = lyr.GetExtent(geom_field=1) assert bb == (1, 3, 2, 4) for i, geom_field in enumerate(geom_fields): assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName() == geom_field[0] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetType() == geom_field[1] assert lyr.GetLayerDefn().GetGeomFieldDefn(i).GetSpatialRef().ExportToWkt().find(geom_field[2]) >= 0 feat = lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' or \ feat.GetGeomFieldRef(1).ExportToWkt().find('POINT (') != 0 or \ feat.GetGeomFieldRef(1).ExportToWkt() == 'POINT (1 2)': feat.DumpReadable() pytest.fail() ds = None if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # UnionLayer with geometry fields disabled ds_str = """ tmp/ogr_vrt_33 tmp/ogr_vrt_33 wkbNone """ ds = ogr.Open(ds_str) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetGeomFieldCount() == 0 assert lyr.GetLayerDefn().GetFieldCount() == 6, \ lyr.GetLayerDefn().GetGeomFieldCount() feat = lyr.GetNextFeature() assert feat is not None ds = None if test_cli_utilities.get_test_ogrsf_path() is not None: f = open('tmp/ogr_vrt_33.vrt', 'wb') f.write(ds_str.encode('ascii')) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/ogr_vrt_33.vrt') os.unlink('tmp/ogr_vrt_33.vrt') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ds = ogr.Open('tmp/ogr_vrt_33') sql_lyr = ds.ExecuteSQL('SELECT * FROM test UNION ALL SELECT * FROM test2') geom_fields = [['geom__WKT_EPSG_4326_POINT', ogr.wkbPoint, '4326'], ['geom__WKT_EPSG_32632_POLYGON', ogr.wkbPolygon, '32632'], ['geom__WKT_EPSG_4326_LINESTRING', ogr.wkbLineString, '4326'], ['geom__WKT_EPSG_32631_POINT', ogr.wkbPoint, '32631']] assert sql_lyr.GetLayerDefn().GetGeomFieldCount() == len(geom_fields) for i, geom_field in enumerate(geom_fields): assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(i).GetName() == geom_field[0] assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(i).GetType() == geom_field[1] assert sql_lyr.GetLayerDefn().GetGeomFieldDefn(i).GetSpatialRef().ExportToWkt().find(geom_field[2]) >= 0 feat = sql_lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (1 2)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' or \ feat.GetGeomFieldRef(2) is not None or \ feat.GetGeomFieldRef(3) is not None: feat.DumpReadable() pytest.fail() feat = sql_lyr.GetNextFeature() if feat.GetGeomFieldRef(0).ExportToWkt() != 'POINT (3 4)' or \ feat.GetGeomFieldRef(1).ExportToWkt() != 'POLYGON ((1 1,1 2,2 2,2 1,1 1))' or \ feat.GetGeomFieldRef(2) is not None or \ feat.GetGeomFieldRef(3).ExportToWkt() != 'POINT (5 6)': feat.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None ############################################################################### # Test SetIgnoredFields() with with PointFromColumns geometries def test_ogr_vrt_34(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csv', 'wb') f.write('x,y\n'.encode('ascii')) f.write('2,49\n'.encode('ascii')) f.close() try: os.remove('tmp/test.csvt') except OSError: pass vrt_xml = """ tmp/test.csv test """ ds = ogr.Open(vrt_xml) lyr = ds.GetLayerByName('test') lyr.SetIgnoredFields(['x', 'y']) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds = None os.unlink('tmp/test.csv') ############################################################################### # Test nullable fields def test_ogr_vrt_35(): if gdaltest.vrt_ds is None: pytest.skip() f = open('tmp/test.csv', 'wb') f.write('c1,c2,WKT,WKT2\n'.encode('ascii')) f.write('1,,"POINT(2 49),"\n'.encode('ascii')) f.close() try: os.remove('tmp/test.csvt') except OSError: pass # Explicit nullable f = open('tmp/test.vrt', 'wb') f.write(""" test.csv test """.encode('ascii')) f.close() ds = ogr.Open('tmp/test.vrt') lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(0).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(1).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(1).IsNullable() == 1 ds = None # Implicit nullable f = open('tmp/test2.vrt', 'wb') f.write(""" test.vrt test """.encode('ascii')) f.close() ds = ogr.Open('tmp/test2.vrt') lyr = ds.GetLayerByName('test') assert lyr.GetLayerDefn().GetFieldDefn(0).IsNullable() == 0 assert lyr.GetLayerDefn().GetFieldDefn(1).IsNullable() == 1 assert lyr.GetLayerDefn().GetGeomFieldDefn(0).IsNullable() == 0 assert lyr.GetLayerDefn().GetGeomFieldDefn(1).IsNullable() == 1 ds = None os.unlink('tmp/test.csv') os.unlink('tmp/test.vrt') os.unlink('tmp/test2.vrt') ############################################################################### # Test editing direct geometries def test_ogr_vrt_36(): if gdaltest.vrt_ds is None: pytest.skip() ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_vrt_36.shp') lyr = ds.CreateLayer('ogr_vrt_36', geom_type=ogr.wkbPoint) lyr.CreateField(ogr.FieldDefn('id')) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = '1' f.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (0 1)')) lyr.CreateFeature(f) f = None ds = None gdal.FileFromMemBuffer('/vsimem/ogr_vrt_36.vrt', """ /vsimem/ogr_vrt_36.shp wkbPoint WGS84 """) ds = ogr.Open('/vsimem/ogr_vrt_36.vrt', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() lyr.SetFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_vrt_36.shp') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['id'] != '1': f.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_vrt_36.shp') gdal.Unlink('/vsimem/ogr_vrt_36.vrt') ############################################################################### # Test implict non-spatial layers (#6336) def test_ogr_vrt_37(): with gdaltest.error_handler(): ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test6') assert lyr.GetGeomType() == ogr.wkbNone with gdaltest.error_handler(): ds = ogr.Open('data/vrt_test.vrt') lyr = ds.GetLayerByName('test6') assert lyr.GetLayerDefn().GetGeomFieldCount() == 0 ############################################################################### # Test reading geometry type def test_ogr_vrt_38(): if gdaltest.vrt_ds is None: pytest.skip() types = [['Point', ogr.wkbPoint], ['LineString', ogr.wkbLineString], ['Polygon', ogr.wkbPolygon], ['MultiPoint', ogr.wkbMultiPoint], ['MultiLineString', ogr.wkbMultiLineString], ['MultiPolygon', ogr.wkbMultiPolygon], ['GeometryCollection', ogr.wkbGeometryCollection], ['CircularString', ogr.wkbCircularString], ['CompoundCurve', ogr.wkbCompoundCurve], ['CurvePolygon', ogr.wkbCurvePolygon], ['MultiCurve', ogr.wkbMultiCurve], ['MultiSurface', ogr.wkbMultiSurface], ['Curve', ogr.wkbCurve], ['Surface', ogr.wkbSurface] ] for (type_str, ogr_type) in types: for qualifier in ['', 'Z', 'M', 'ZM', '25D']: if qualifier == 'Z' and ogr_type <= ogr.wkbGeometryCollection: continue if qualifier == '25D' and ogr_type > ogr.wkbGeometryCollection: continue gdal.FileFromMemBuffer('/vsimem/ogr_vrt_38.vrt', """ /vsimem/ogr_vrt_38.shp wkb%s%s """ % (type_str, qualifier)) expected_geom_type = ogr_type if qualifier == 'Z' or qualifier == 'ZM' or qualifier == '25D': expected_geom_type = ogr.GT_SetZ(expected_geom_type) if qualifier == 'M' or qualifier == 'ZM': expected_geom_type = ogr.GT_SetM(expected_geom_type) ds = ogr.Open('/vsimem/ogr_vrt_38.vrt', update=1) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == expected_geom_type, \ (type_str, qualifier, lyr.GetGeomType()) gdal.Unlink('/vsimem/ogr_vrt_38.vrt') ############################################################################### # Test that attribute filtering works with def test_ogr_vrt_39(): if gdaltest.vrt_ds is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_vrt_39.csv', """my_fid,val 30,1 25,2 """) gdal.FileFromMemBuffer('/vsimem/ogr_vrt_39.csvt', """Integer,Integer """) gdal.FileFromMemBuffer('/vsimem/ogr_vrt_39.vrt', """ /vsimem/ogr_vrt_39.csv wkbNone my_fid """) ds = ogr.Open('/vsimem/ogr_vrt_39.vrt') lyr = ds.GetLayer(0) lyr.SetAttributeFilter('fid = 25') f = lyr.GetNextFeature() if f['val'] != 2: f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_vrt_39.csv') gdal.Unlink('/vsimem/ogr_vrt_39.csvt') gdal.Unlink('/vsimem/ogr_vrt_39.vrt') ############################################################################### # Test PointZM support with encoding="PointFromColumns" def test_ogr_vrt_40(): if gdaltest.vrt_ds is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/ogr_vrt_40.csv', """id,x,y,z,m 1,1,2,3,4 """) gdal.FileFromMemBuffer('/vsimem/ogr_vrt_40.vrt', """ ogr_vrt_40.csv ogr_vrt_40 """) ds = ogr.Open('/vsimem/ogr_vrt_40.vrt') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPointZM f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != 'POINT ZM (1 2 3 4)': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_vrt_40.csv') gdal.Unlink('/vsimem/ogr_vrt_40.vrt') ############################################################################### # Test GetExtent() on erroneous definition def test_ogr_vrt_41(): ds = ogr.Open(""" /i_dont/exist """) lyr = ds.GetLayer(0) with gdaltest.error_handler(): lyr.GetExtent() ############################################################################### # def test_ogr_vrt_cleanup(): if gdaltest.vrt_ds is None: pytest.skip() gdal.Unlink('/vsimem/rec1.vrt') gdal.Unlink('/vsimem/rec2.vrt') try: os.unlink('tmp/ogr_vrt_33.vrt') except OSError: pass try: import shutil shutil.rmtree('tmp/ogr_vrt_33') except OSError: pass gdaltest.vrt_ds = None gdalautotest-3.1.2/ogr/ograpispy.py0000775000175000017500000001122713701060012016045 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ograpispy.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGRAPISPY # Author: Even Rouault # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from difflib import unified_diff import ogrtest import test_py_scripts from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Basic test without snapshoting def test_ograpispy_1(): gdal.SetConfigOption('OGR_API_SPY_FILE', 'tmp/ograpispy_1.py') test_py_scripts.run_py_script('data', 'testograpispy', '') gdal.SetConfigOption('OGR_API_SPY_FILE', None) try: os.stat('tmp/ograpispy_1.py') ogrtest.has_apispy = True except OSError: ogrtest.has_apispy = False pytest.skip() ref_data = open('data/testograpispy.py', 'rt').read() got_data = open('tmp/ograpispy_1.py', 'rt').read() if ref_data != got_data: print() for line in unified_diff(ref_data.splitlines(), got_data.splitlines(), fromfile='expected', tofile='got', lineterm=""): print(line) pytest.fail('did not get expected script') ############################################################################### # With snapshoting def test_ograpispy_2(): if not ogrtest.has_apispy: pytest.skip() try: shutil.rmtree('tmp/snapshot_1') except OSError: pass ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ograpispy_2.shp') lyr = ds.CreateLayer('ograpispy_2') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ds = None gdal.SetConfigOption('OGR_API_SPY_FILE', 'tmp/ograpispy_2.py') gdal.SetConfigOption('OGR_API_SPY_SNAPSHOT_PATH', 'tmp') ds = ogr.Open('tmp/ograpispy_2.shp', update=1) lyr = ds.GetLayer(0) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None gdal.SetConfigOption('OGR_API_SPY_FILE', None) gdal.SetConfigOption('OGR_API_SPY_SNAPSHOT_PATH', None) ds = ogr.Open('tmp/snapshot_1/source/ograpispy_2.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 0 ds = None ds = ogr.Open('tmp/snapshot_1/working/ograpispy_2.shp', update=1) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 # Add a feature to check that running the script will work lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None # Check script test_py_scripts.run_py_script('tmp', 'ograpispy_2', '') ds = ogr.Open('tmp/snapshot_1/working/ograpispy_2.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ds = None shutil.rmtree('tmp/snapshot_1/working') ############################################################################### # def test_ograpispy_cleanup(): gdal.Unlink('tmp/ograpispy_1.py') gdal.Unlink('tmp/ograpispy_2.py') gdal.Unlink('tmp/ograpispy_2.pyc') try: shutil.rmtree('tmp/snapshot_1') except OSError: pass try: os.stat('tmp/ograpispy_2.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/ograpispy_2.shp') except (OSError, AttributeError): pass gdal.Unlink('/vsimem/test2.csv') gdalautotest-3.1.2/ogr/ogr_tiger.py0000775000175000017500000001705013701060013016012 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_tiger.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR TIGER driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal from osgeo import ogr import gdaltest import ogrtest import pytest ############################################################################### def test_ogr_tiger_1(): ogrtest.tiger_ds = None if not gdaltest.download_file('http://www2.census.gov/geo/tiger/tiger2006se/AL/TGR01001.ZIP', 'TGR01001.ZIP'): pytest.skip() try: os.stat('tmp/cache/TGR01001/TGR01001.MET') except OSError: try: try: os.stat('tmp/cache/TGR01001') except OSError: os.mkdir('tmp/cache/TGR01001') gdaltest.unzip('tmp/cache/TGR01001', 'tmp/cache/TGR01001.ZIP') try: os.stat('tmp/cache/TGR01001/TGR01001.MET') except OSError: pytest.skip() except: pytest.skip() ogrtest.tiger_ds = ogr.Open('tmp/cache/TGR01001') assert ogrtest.tiger_ds is not None ogrtest.tiger_ds = None # also test opening with a filename (#4443) ogrtest.tiger_ds = ogr.Open('tmp/cache/TGR01001/TGR01001.RT1') assert ogrtest.tiger_ds is not None # Check a few features. cc_layer = ogrtest.tiger_ds.GetLayerByName('CompleteChain') assert cc_layer.GetFeatureCount() == 19289, 'wrong cc feature count' feat = cc_layer.GetNextFeature() feat = cc_layer.GetNextFeature() feat = cc_layer.GetNextFeature() assert feat.TLID == 2833200 and feat.FRIADDL is None and feat.BLOCKL == 5000, \ 'wrong attribute on cc feature.' assert ogrtest.check_feature_geometry(feat, 'LINESTRING (-86.4402 32.504137,-86.440313 32.504009,-86.440434 32.503884,-86.440491 32.503805,-86.44053 32.503757,-86.440578 32.503641,-86.440593 32.503515,-86.440588 32.503252,-86.440596 32.50298)', max_error=0.000001) == 0 feat = ogrtest.tiger_ds.GetLayerByName('TLIDRange').GetNextFeature() assert feat.MODULE == 'TGR01001' and feat.TLMINID == 2822718, \ 'got wrong TLIDRange attributes' ############################################################################### # Run test_ogrsf def test_ogr_tiger_2(): if ogrtest.tiger_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/cache/TGR01001') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test TIGER writing def test_ogr_tiger_3(): if ogrtest.tiger_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: shutil.rmtree('tmp/outtiger') except OSError: pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f TIGER tmp/outtiger tmp/cache/TGR01001 -dsco VERSION=1006') ret = 'success' filelist = os.listdir('tmp/cache/TGR01001') exceptions = ['TGR01001.RTA', 'TGR01001.RTC', 'TGR01001.MET', 'TGR01001.RTZ', 'TGR01001.RTS'] for filename in filelist: if filename in exceptions: continue f = open('tmp/cache/TGR01001/' + filename, 'rb') data1 = f.read() f.close() try: f = open('tmp/outtiger/' + filename, 'rb') data2 = f.read() f.close() if data1 != data2: # gdaltest.post_reason('%s is different' % filename) print('%s is different' % filename) ret = 'fail' except: # gdaltest.post_reason('could not find %s' % filename) print('could not find %s' % filename) ret = 'fail' try: shutil.rmtree('tmp/outtiger') except OSError: pass return ret ############################################################################### # Load into a /vsimem instance to test virtualization. def test_ogr_tiger_4(): if ogrtest.tiger_ds is None: pytest.skip() # load all the files into memory. for filename in gdal.ReadDir('tmp/cache/TGR01001'): if filename.startswith('.'): continue data = open('tmp/cache/TGR01001/' + filename, 'r').read() f = gdal.VSIFOpenL('/vsimem/tigertest/' + filename, 'wb') gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) # Try reading. ogrtest.tiger_ds = ogr.Open('/vsimem/tigertest/TGR01001.RT1') assert ogrtest.tiger_ds is not None, 'fail to open.' ogrtest.tiger_ds = None # also test opening with a filename (#4443) ogrtest.tiger_ds = ogr.Open('tmp/cache/TGR01001/TGR01001.RT1') assert ogrtest.tiger_ds is not None # Check a few features. cc_layer = ogrtest.tiger_ds.GetLayerByName('CompleteChain') assert cc_layer.GetFeatureCount() == 19289, 'wrong cc feature count' feat = cc_layer.GetNextFeature() feat = cc_layer.GetNextFeature() feat = cc_layer.GetNextFeature() assert feat.TLID == 2833200 and feat.FRIADDL is None and feat.BLOCKL == 5000, \ 'wrong attribute on cc feature.' assert ogrtest.check_feature_geometry(feat, 'LINESTRING (-86.4402 32.504137,-86.440313 32.504009,-86.440434 32.503884,-86.440491 32.503805,-86.44053 32.503757,-86.440578 32.503641,-86.440593 32.503515,-86.440588 32.503252,-86.440596 32.50298)', max_error=0.000001) == 0 feat = ogrtest.tiger_ds.GetLayerByName('TLIDRange').GetNextFeature() assert feat.MODULE == 'TGR01001' and feat.TLMINID == 2822718, \ 'got wrong TLIDRange attributes' # Try to recover memory from /vsimem. for filename in gdal.ReadDir('tmp/cache/TGR01001'): if filename.startswith('.'): continue gdal.Unlink('/vsimem/tigertest/' + filename) ############################################################################### def test_ogr_tiger_cleanup(): if ogrtest.tiger_ds is None: pytest.skip() ogrtest.tiger_ds = None gdalautotest-3.1.2/ogr/ogr_wfs.py0000775000175000017500000056242313701060013015510 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_wfs.py 179a4cd205b07d8a798ad10c5edc6bb95581f956 2020-03-27 13:14:01 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: WFS driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### try: from BaseHTTPServer import BaseHTTPRequestHandler except ImportError: from http.server import BaseHTTPRequestHandler import os import pytest import gdaltest import ogrtest from osgeo import ogr from osgeo import osr from osgeo import gdal import webserver ############################################################################### # Test underlying OGR drivers # pytestmark = pytest.mark.require_driver('WFS') @pytest.fixture(autouse=True, scope='module') def ogr_wfs_init(): gdaltest.wfs_drv = ogr.GetDriverByName('WFS') gdaltest.geoserver_wfs = None gdaltest.deegree_wfs = None gdaltest.ionic_wfs = None gml_ds = ogr.Open('data/ionic_wfs.gml') if gml_ds is None: gdaltest.wfs_drv = None if gdal.GetLastErrorMsg().find('Xerces') != -1: pytest.skip() pytest.skip('failed to open test file.') @pytest.fixture( params=['NO', None], scope='module', ids=['without-streaming', 'with-streaming'] ) def with_and_without_streaming(request): with gdaltest.config_option('OGR_WFS_USE_STREAMING', request.param): yield ############################################################################### # Test reading a MapServer WFS server @pytest.mark.skip() def test_ogr_wfs_mapserver(): if gdaltest.wfs_drv is None: pytest.skip() if gdaltest.gdalurlopen('http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap') is None: pytest.skip('cannot open URL') ds = ogr.Open('WFS:http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap') if ds is None: pytest.skip('did not managed to open WFS datastore') assert ds.GetLayerCount() == 2, 'did not get expected layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'park', 'did not get expected layer name' sr = lyr.GetSpatialRef() sr2 = osr.SpatialReference() sr2.ImportFromEPSG(42304) assert sr.IsSame(sr2), 'did not get expected SRS' feat_count = lyr.GetFeatureCount() assert feat_count == 46, 'did not get expected feature count' feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() geom_wkt = geom.ExportToWkt() if geom_wkt.find("POLYGON ((389366.84375 3791519.75") == -1: feat.DumpReadable() pytest.fail('did not get expected feature') ############################################################################### # Test reading a GeoServer WFS server @pytest.mark.skip('FIXME: re-enable after adapting test') def test_ogr_wfs_geoserver(): if gdaltest.wfs_drv is None: pytest.skip() if gdaltest.gdalurlopen('http://demo.opengeo.org/geoserver/wfs?TYPENAME=za:za_points&SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType') is None: gdaltest.geoserver_wfs = False pytest.skip('cannot open URL') gdaltest.geoserver_wfs = True ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=za:za_points') assert ds is not None, 'did not managed to open WFS datastore' assert ds.GetLayerCount() == 1, 'did not get expected layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'za:za_points', 'did not get expected layer name' sr = lyr.GetSpatialRef() sr2 = osr.SpatialReference() sr2.ImportFromEPSG(4326) assert sr.IsSame(sr2), 'did not get expected SRS' feat_count = lyr.GetFeatureCount() if feat_count < 14000: if gdal.GetLastErrorMsg().find('The connection attempt failed') != -1: gdaltest.geoserver_wfs = False pytest.skip('server probably in a broken state') print(feat_count) pytest.fail('did not get expected feature count') assert lyr.TestCapability(ogr.OLCFastFeatureCount), 'did not get OLCFastFeatureCount' ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=tiger:poi&MAXFEATURES=10&VERSION=1.1.0') if ds is None: pytest.skip('server perhaps overloaded') lyr = ds.GetLayer(0) gdal.ErrorReset() feat = lyr.GetNextFeature() # This error message is generally the sign of a server in a broken state if feat is None and gdal.GetLastErrorMsg().find('org.geoserver.platform.ServiceException') != -1: gdaltest.geoserver_wfs = False pytest.skip('server probably in a broken state') if feat.GetField('NAME') != 'museam' or \ ogrtest.check_feature_geometry(feat, 'POINT (-74.0104611 40.70758763)', max_error=0.000001) != 0: feat.DumpReadable() pytest.fail('did not get expected feature (1)') # Same with VERSION=1.0.0 ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=tiger:poi&MAXFEATURES=10&VERSION=1.0.0') if ds is None: pytest.skip('server perhaps overloaded') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('NAME') != 'museam' or \ ogrtest.check_feature_geometry(feat, 'POINT (-74.0104611 40.70758763)', max_error=0.000001) != 0: feat.DumpReadable() pytest.fail('did not get expected feature (2)') # Test attribute filter ds = ogr.Open("WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=tiger:poi") if ds is None: pytest.skip('server perhaps overloaded') lyr = ds.GetLayer(0) lyr.SetAttributeFilter("MAINPAGE is not null and NAME >= 'a' and NAME LIKE 'mu%%eam'") feat_count = lyr.GetFeatureCount() assert feat_count == 1, \ 'did not get expected feature count after SetAttributeFilter (1)' feat = lyr.GetNextFeature() if feat.GetField('gml_id') != 'poi.1': feat.DumpReadable() pytest.fail('did not get expected feature (3)') if False: # pylint: disable=using-constant-test # This GeoServer version doesn't understand lyr.SetAttributeFilter("gml_id = 'poi.1'") feat_count = lyr.GetFeatureCount() assert feat_count == 1, \ 'did not get expected feature count after SetAttributeFilter (2)' feat = lyr.GetNextFeature() if feat.GetField('gml_id') != 'poi.1': feat.DumpReadable() pytest.fail('did not get expected feature (4)') ############################################################################### # Test reading a GeoServer WFS server with OUTPUTFORMAT=json @pytest.mark.skip('FIXME: re-enable after adapting test') def test_ogr_wfs_geoserver_json(): if gdaltest.wfs_drv is None: pytest.skip() if not gdaltest.geoserver_wfs: pytest.skip() ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=za:za_points&MAXFEATURES=10&VERSION=1.1.0&OUTPUTFORMAT=json') assert ds is not None, 'did not managed to open WFS datastore' assert ds.GetLayerCount() == 1, 'did not get expected layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'za:za_points', 'did not get expected layer name' feat_count = lyr.GetFeatureCount() assert feat_count == 10, 'did not get expected feature count' assert lyr.TestCapability(ogr.OLCFastFeatureCount), \ 'did not get OLCFastFeatureCount' feat = lyr.GetNextFeature() # if feat.GetField('name') != 'Alexander Bay' or \ if ogrtest.check_feature_geometry(feat, 'POINT (16.4827778 -28.5947222)', max_error=0.000000001) != 0: feat.DumpReadable() pytest.fail('did not get expected feature') ############################################################################### # Test reading a GeoServer WFS server with OUTPUTFORMAT=SHAPE-ZIP @pytest.mark.skip('FIXME: re-enable after adapting test') def test_ogr_wfs_geoserver_shapezip(): if gdaltest.wfs_drv is None: pytest.skip() if not gdaltest.geoserver_wfs: pytest.skip() ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=za:za_points&MAXFEATURES=10&VERSION=1.1.0&OUTPUTFORMAT=SHAPE-ZIP') assert ds is not None, 'did not managed to open WFS datastore' assert ds.GetLayerCount() == 1, 'did not get expected layer count' lyr = ds.GetLayer(0) assert lyr.GetName() == 'za:za_points', 'did not get expected layer name' feat_count = lyr.GetFeatureCount() assert feat_count == 10, 'did not get expected feature count' assert lyr.TestCapability(ogr.OLCFastFeatureCount), \ 'did not get OLCFastFeatureCount' feat = lyr.GetNextFeature() # if feat.GetField('name') != 'Alexander Bay' or \ if ogrtest.check_feature_geometry(feat, 'POINT (16.4827778 -28.5947222)', max_error=0.000000001) != 0: feat.DumpReadable() pytest.fail('did not get expected feature') ############################################################################### # Test WFS paging @pytest.mark.skip('FIXME: re-enable after adapting test') def test_ogr_wfs_geoserver_paging(): if gdaltest.wfs_drv is None: pytest.skip() if not gdaltest.geoserver_wfs: pytest.skip() ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=og:bugsites&VERSION=1.1.0') lyr = ds.GetLayer(0) feature_count_ref = lyr.GetFeatureCount() page_size = (int)(feature_count_ref / 3) + 1 ds = None # Test with WFS 1.0.0 gdal.SetConfigOption('OGR_WFS_PAGING_ALLOWED', 'ON') gdal.SetConfigOption('OGR_WFS_PAGE_SIZE', '%d' % page_size) ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=og:bugsites&VERSION=1.0.0') gdal.SetConfigOption('OGR_WFS_PAGING_ALLOWED', None) gdal.SetConfigOption('OGR_WFS_PAGE_SIZE', None) assert ds is not None, 'did not managed to open WFS datastore' lyr = ds.GetLayer(0) feature_count_wfs100 = lyr.GetFeatureCount() ds = None assert feature_count_wfs100 == feature_count_ref # Test with WFS 1.1.0 gdal.SetConfigOption('OGR_WFS_PAGING_ALLOWED', 'ON') gdal.SetConfigOption('OGR_WFS_PAGE_SIZE', '%d' % page_size) ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?TYPENAME=og:bugsites&VERSION=1.1.0') gdal.SetConfigOption('OGR_WFS_PAGING_ALLOWED', None) gdal.SetConfigOption('OGR_WFS_PAGE_SIZE', None) assert ds is not None, 'did not managed to open WFS datastore' lyr = ds.GetLayer(0) feature_count_wfs110 = lyr.GetFeatureCount() feature_count_wfs110_at_hand = 0 lyr.ResetReading() feat = lyr.GetNextFeature() while feat is not None: feature_count_wfs110_at_hand = feature_count_wfs110_at_hand + 1 feat = lyr.GetNextFeature() ds = None assert feature_count_wfs110 == feature_count_ref, feature_count_wfs100 assert feature_count_wfs110_at_hand == feature_count_ref ############################################################################### # Test reading a Deegree WFS server @pytest.mark.skip() def test_ogr_wfs_deegree(): if gdaltest.wfs_drv is None: pytest.skip() if gdaltest.gdalurlopen('http://demo.deegree.org:80/utah-workspace') is None: gdaltest.deegree_wfs = False pytest.skip('cannot open URL') gdaltest.deegree_wfs = True ds = ogr.Open("WFS:http://demo.deegree.org:80/utah-workspace/services/wfs?ACCEPTVERSIONS=1.1.0&MAXFEATURES=10") if ds is None: if gdal.GetLastErrorMsg().find('Error returned by server') < 0: gdaltest.deegree_wfs = False pytest.skip() pytest.fail('did not managed to open WFS datastore') lyr = ds.GetLayerByName('app:SGID024_Springs') assert lyr.GetName() == 'app:SGID024_Springs', 'did not get expected layer name' sr = lyr.GetSpatialRef() sr2 = osr.SpatialReference() sr2.ImportFromEPSG(26912) assert sr.IsSame(sr2), 'did not get expected SRS' feat = lyr.GetNextFeature() if feat.GetField('OBJECTID') != 1 or \ ogrtest.check_feature_geometry(feat, 'POINT (558750.703 4402882.05)', max_error=0.000000001) != 0: feat.DumpReadable() pytest.fail('did not get expected feature') # Test attribute filter ds = ogr.Open("WFS:http://demo.deegree.org:80/utah-workspace/services/wfs?ACCEPTVERSIONS=1.1.0") lyr = ds.GetLayerByName('app:SGID024_Springs') lyr.SetAttributeFilter('OBJECTID = 9 or OBJECTID = 100 or (OBJECTID >= 20 and OBJECTID <= 30 and OBJECTID != 27)') feat_count = lyr.GetFeatureCount() if feat_count != 12: if gdal.GetLastErrorMsg().find('XML parsing of GML file failed') < 0 and \ gdal.GetLastErrorMsg().find('No suitable driver found') < 0: print(feat_count) pytest.fail('did not get expected feature count after SetAttributeFilter') # Test attribute filter with gml_id # lyr.SetAttributeFilter("gml_id = 'SGID024_Springs30' or gml_id = 'SGID024_Springs100'") # feat_count = lyr.GetFeatureCount() # if feat_count != 2: # gdaltest.post_reason('did not get expected feature count after SetAttributeFilter (2)') # print(feat_count) # return 'fail' ############################################################################### # Run test_ogrsf @pytest.mark.skip() def test_ogr_wfs_test_ogrsf(): if gdaltest.wfs_drv is None: pytest.skip() if not gdaltest.deegree_wfs: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro "WFS:http://demo.deegree.org:80/utah-workspace/services/wfs?ACCEPTVERSIONS=1.1.0&MAXFEATURES=10" app:SGID024_Springs') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### do_log = False class WFSHTTPHandler(BaseHTTPRequestHandler): def log_request(self, code='-', size='-'): pass def do_GET(self): try: if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() if self.path.find('/fakewfs') != -1: if self.path == '/fakewfs?SERVICE=WFS&REQUEST=GetCapabilities' or \ self.path == '/fakewfs?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() f = open('data/get_capabilities.xml', 'rb') content = f.read() f.close() self.wfile.write(content) return if self.path == '/fakewfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=rijkswegen': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() f = open('data/describe_feature_type.xml', 'rb') content = f.read() f.close() self.wfile.write(content) return if self.path == '/fakewfs?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=rijkswegen': self.send_response(200) self.send_header('Content-type', 'application/xml') self.end_headers() f = open('data/get_feature.xml', 'rb') content = f.read() f.close() self.wfile.write(content) return return except IOError: pass self.send_error(404, 'File Not Found: %s' % self.path) ############################################################################### # Test reading a local fake WFS server def test_ogr_wfs_fake_wfs_server(): if gdaltest.wfs_drv is None: pytest.skip() (process, port) = webserver.launch(handler=WFSHTTPHandler) if port == 0: pytest.skip() gdal.SetConfigOption('OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN', 'NO') ds = ogr.Open("WFS:http://127.0.0.1:%d/fakewfs" % port) gdal.SetConfigOption('OGR_WFS_LOAD_MULTIPLE_LAYER_DEFN', None) if ds is None: webserver.server_stop(process, port) pytest.fail('did not managed to open WFS datastore') lyr = ds.GetLayerByName('rijkswegen') if lyr.GetName() != 'rijkswegen': print(lyr.GetName()) webserver.server_stop(process, port) pytest.fail('did not get expected layer name') sr = lyr.GetSpatialRef() sr2 = osr.SpatialReference() sr2.ImportFromEPSG(28992) if not sr.IsSame(sr2): print(sr) webserver.server_stop(process, port) pytest.fail('did not get expected SRS') feat = lyr.GetNextFeature() if feat.GetField('MPLength') != '33513.' or \ ogrtest.check_feature_geometry(feat, 'MULTICURVE ((154898.65286 568054.62753,160108.36082 566076.78094,164239.254332 563024.70188,170523.31535 561231.219583,172676.42256 559253.37299,175912.80562 557459.89069,180043.699132 553508.779495,183294.491306 552250.182732))', max_error=0.00001) != 0: feat.DumpReadable() webserver.server_stop(process, port) pytest.fail('did not get expected feature') webserver.server_stop(process, port) ############################################################################### # Test CreateFeature() / UpdateFeature() / DeleteFeature() (WFS-T) @pytest.mark.skip('FIXME: re-enable after adapting test') def test_ogr_wfs_geoserver_wfst(): if gdaltest.wfs_drv is None: pytest.skip() if not gdaltest.geoserver_wfs: pytest.skip() ds = ogr.Open('WFS:http://demo.opengeo.org/geoserver/wfs?VERSION=1.1.0', update=1) assert ds is not None lyr = ds.GetLayerByName('za:za_points') geom = ogr.CreateGeometryFromWkt('POINT(0 89.5)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) # feat.SetField('name', 'name_set_by_ogr_wfs_8_test') feat.SetField('type', 'type_set_by_ogr_wfs_8_test') if lyr.CreateFeature(feat) != 0: # Likely a bug in the current GeoServer version ?? if gdal.GetLastErrorMsg().find("No such property 'typeName'") >= 0: pytest.skip() pytest.fail('cannot create feature') print('Feature %d created !' % feat.GetFID()) feat.SetField('type', 'type_modified_by_ogr_wfs_8_test') assert lyr.SetFeature(feat) == 0, 'cannot update feature' print('Feature %d updated !' % feat.GetFID()) assert lyr.DeleteFeature(feat.GetFID()) == 0, 'could not delete feature' print('Feature %d deleted !' % feat.GetFID()) # Test transactions assert lyr.StartTransaction() == 0, 'CommitTransaction() failed' geom = ogr.CreateGeometryFromWkt('POINT(0 89.5)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) # feat.SetField('name', 'name_set_by_ogr_wfs_8_test') feat.SetField('type', 'type_set_by_ogr_wfs_8_test') assert lyr.CreateFeature(feat) == 0, 'cannot create feature' geom = ogr.CreateGeometryFromWkt('POINT(0 89.5)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) # feat.SetField('name', 'name_set_by_ogr_wfs_8_test_2') feat.SetField('type', 'type_set_by_ogr_wfs_8_test_2') assert lyr.CreateFeature(feat) == 0, 'cannot create feature' assert lyr.CommitTransaction() == 0, 'CommitTransaction() failed' # Retrieve inserted features print('Retrieving created features gml:id') sql_lyr = ds.ExecuteSQL("SELECT _LAST_INSERTED_FIDS_ FROM za:za_points") feat = sql_lyr.GetNextFeature() while feat is not None: gml_id = feat.GetFieldAsString(0) print('Feature %s has been created in transaction !' % gml_id) feat = sql_lyr.GetNextFeature() feat = None count = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert count == 2, 'did not get expected feature count' # Delete a bunch of features print('Deleting created features') sql_lyr = ds.ExecuteSQL("DELETE FROM za:za_points WHERE type = 'type_set_by_ogr_wfs_8_test' OR type = 'type_set_by_ogr_wfs_8_test_2'") ds.ReleaseResultSet(sql_lyr) ############################################################################### # Test CreateFeature() / UpdateFeature() / DeleteFeature() with expected # failure due to server not allowing insert & delete @pytest.mark.skip() def test_ogr_wfs_deegree_wfst(): if gdaltest.gdalurlopen('http://testing.deegree.org/deegree-wfs/services') is None: pytest.skip('cannot open URL') ds = ogr.Open('WFS:http://testing.deegree.org/deegree-wfs/services', update=1) assert ds is not None lyr = ds.GetLayerByName('app:CountyBoundaries_edited') geom = ogr.CreateGeometryFromWkt('POINT(2 49)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) feat.SetField('name', 'nameSetByOGR') feat.SetField('fips', '10') feat.SetField('feature_id', '123456') feat.SetField('OBJECTID', '7890123') feat.SetField('shape_area', 12.34) feat.SetField('shape_len', 56.78) ret = lyr.CreateFeature(feat) if ret != 0: print('expected fail on CreateFeature') ret = lyr.DeleteFeature(1) if ret != 0: print('expected fail on DeleteFeature') feat = lyr.GetFeature(10) ret = lyr.SetFeature(feat) if ret != 0: print('expected fail on SetFeature') ############################################################################### # Test CreateFeature() / UpdateFeature() / DeleteFeature() on a WFS 1.0.0 server @pytest.mark.skip() def test_ogr_wfs_ionic_wfst(): if gdaltest.gdalurlopen('http://webservices.ionicsoft.com/ionicweb/wfs/BOSTON_ORA') is None: gdaltest.ionic_wfs = False pytest.skip('cannot open URL') gdaltest.ionic_wfs = True ds = ogr.Open('WFS:http://webservices.ionicsoft.com/ionicweb/wfs/BOSTON_ORA', update=1) if ds is None: if gdal.GetLastErrorMsg().find('HTTP error code : 403') != -1: gdaltest.ionic_wfs = False pytest.skip() pytest.fail() lyr = ds.GetLayerByName('wfs:BUSINESS') geom = ogr.CreateGeometryFromWkt('POINT(234000 890000)') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) feat.SetField('NAME', 'nameSetByOGR') feat.SetField('TOTAL_EMPLOYEES', '10') ret = lyr.CreateFeature(feat) assert ret == 0, 'fail on CreateFeature' gmlid = feat.GetField('gml_id') ret = lyr.SetFeature(feat) assert ret == 0, 'fail on SetFeature' ds.ExecuteSQL("DELETE FROM wfs:BUSINESS WHERE gml_id = '%s'" % gmlid) ############################################################################### # Test ExecuteSQL() where SQL should be turned into PROPERTYNAME and FILTER parameters @pytest.mark.skip() def test_ogr_wfs_ionic_sql(): if not gdaltest.ionic_wfs: pytest.skip() ds = ogr.Open('WFS:http://webservices.ionicsoft.com/ionicweb/wfs/BOSTON_ORA') assert ds is not None lyr = ds.ExecuteSQL("SELECT name FROM \"wfs:BUSINESS\" WHERE total_employees = 105") count = lyr.GetFeatureCount() ds.ReleaseResultSet(lyr) assert count == 1 ############################################################################### # Test opening a datasource from a XML description file # The following test should issue 0 WFS http request def test_ogr_wfs_xmldescriptionfile(): ds = ogr.Open('data/testwfs.xml') lyr = ds.GetLayer(0) feature_defn = lyr.GetLayerDefn() index = feature_defn.GetFieldIndex('name') sr = lyr.GetSpatialRef() assert index == 1 wkt = sr.ExportToWkt() assert wkt.find('WGS 84') != -1 layermetadata = ds.GetLayerByName('WFSLayerMetadata') count_layers = layermetadata.GetFeatureCount() assert count_layers == ds.GetLayerCount(), 'count_layers != ds.GetLayerCount()' getcapabilitieslayer = ds.GetLayerByName('WFSGetCapabilities') getcapabilitieslayer_feat = getcapabilitieslayer.GetNextFeature() getcapabilitieslayer_content = getcapabilitieslayer_feat.GetFieldAsString(0) assert getcapabilitieslayer_content.startswith('\n') f.write('http://demo.opengeo.org/geoserver/wfs\n') f.write('\n') f.close() # Should only emit GetCapabilities and serialize it ds = ogr.Open('tmp/ogr_wfs_xmldescriptionfile_to_be_updated.xml') assert ds is not None ds = None f = open('tmp/ogr_wfs_xmldescriptionfile_to_be_updated.xml', 'rt') content = f.read() assert content.find('WFS_Capabilities') != -1, \ 'XML description file was not filled as expected' assert content.find('') != -1, \ 'XML description file was not filled as expected' f.close() os.unlink('tmp/ogr_wfs_xmldescriptionfile_to_be_updated.xml') ############################################################################### # Test opening a datasource directly from a GetCapabilities answer XML file # The following test should issue 0 WFS http request def test_ogr_wfs_getcapabilitiesfile(): ds = ogr.Open('data/getcapabilities_wfs.xml') if ds is None: gdal.Unlink('data/getcapabilities_wfs.gfs') pytest.fail() ds = None gdal.Unlink('data/getcapabilities_wfs.gfs') ############################################################################### # Test opening a datastore which only support GML 3.2.1 output @pytest.mark.skip() def test_ogr_wfs_deegree_gml321(): ds = ogr.Open('WFS:http://demo.deegree.org:80/inspire-workspace/services/wfs?ACCEPTVERSIONS=1.1.0&MAXFEATURES=10') if ds is None: if gdaltest.gdalurlopen('http://demo.deegree.org:80/inspire-workspace/services/wfs?ACCEPTVERSIONS=1.1.0') is None: pytest.skip('cannot open URL') if gdal.GetLastErrorMsg().find("Unable to determine the subcontroller for request type 'GetCapabilities' and service type 'WFS'") != -1: pytest.skip() pytest.fail() lyr = ds.GetLayerByName("ad:Address") gdal.ErrorReset() lyr.GetFeatureCount() assert gdal.GetLastErrorMsg() == '' ############################################################################### # Test WFS 2.0.0 support @pytest.mark.skip() def test_ogr_wfs_deegree_wfs200(): ds = ogr.Open('WFS:http://demo.deegree.org:80/utah-workspace/services/wfs?ACCEPTVERSIONS=2.0.0') if ds is None: if gdaltest.gdalurlopen('http://demo.deegree.org:80/utah-workspace/services/wfs?ACCEPTVERSIONS=2.0.0') is None: pytest.skip('cannot open URL') pytest.fail() lyr = ds.GetLayerByName("app:SGID024_Municipalities2004_edited") lyr.SetAttributeFilter('OBJECTID = 5') count = lyr.GetFeatureCount() if count != 1: if gdal.GetLastErrorMsg().find('HTTP error code : 500') < 0: print(count) pytest.fail("OBJECTID = 5 filter failed") else: feat = lyr.GetNextFeature() if feat.GetFieldAsInteger('OBJECTID') != 5: feat.DumpReadable() pytest.fail("OBJECTID = 5 filter failed") lyr.SetAttributeFilter("gml_id = 'SGID024_MUNICIPALITIES2004_EDITED_5'") count = lyr.GetFeatureCount() if count != 1: # FIXME ! Avoid failure on ogr_wfs_deegree_wfs200 (the server is likely buggy since it worked before, but no longer whereas the WFS client code hasn't changed) print("gml_id = 'SGID024_MUNICIPALITIES2004_EDITED_5' filter failed") # gdaltest.post_reason("gml_id = 'SGID024_MUNICIPALITIES2004_EDITED_5' filter failed") # print(count) # return 'fail' else: feat = lyr.GetNextFeature() if feat.GetFieldAsInteger('OBJECTID') != 6: feat.DumpReadable() pytest.fail("gml_id = 'SGID024_MUNICIPALITIES2004_EDITED_5' filter failed") lyr.SetAttributeFilter(None) lyr.SetSpatialFilterRect(-1e8, -1e8, 1e8, 1e8) spatialfiltercount = lyr.GetFeatureCount() lyr.SetSpatialFilter(None) allcount = lyr.GetFeatureCount() assert allcount == spatialfiltercount and allcount != 0, \ 'spatialfiltercount != allcount' ############################################################################### # Test WFS SORTBY support @pytest.mark.skip() def test_ogr_wfs_deegree_sortby(): ds = ogr.Open('WFS:http://demo.deegree.org:80/utah-workspace/services/wfs?MAXFEATURES=10&VERSION=1.1.0') if ds is None: if gdaltest.gdalurlopen('http://demo.deegree.org:80/utah-workspace/services/wfs') is None: pytest.skip('cannot open URL') pytest.fail() lyr = ds.ExecuteSQL("SELECT * FROM \"app:SGID024_Municipalities2004_edited\" ORDER BY OBJECTID DESC") feat = lyr.GetNextFeature() if feat.GetFieldAsInteger('OBJECTID') != 240: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsInteger('OBJECTID') != 239: feat.DumpReadable() pytest.fail() ds.ReleaseResultSet(lyr) ############################################################################### def ogr_wfs_get_multiple_layer_defn(url): if not gdaltest.run_slow_tests(): pytest.skip() ds = ogr.Open('WFS:' + url) if ds is None: if gdaltest.gdalurlopen(url) is None: pytest.skip('cannot open URL') pytest.fail() # This should be slow only for the first layer for i in range(0, ds.GetLayerCount()): lyr = ds.GetLayer(i) print('Layer %s has %d fields' % (lyr.GetName(), lyr.GetLayerDefn().GetFieldCount())) ############################################################################### # Test a ESRI server @pytest.mark.skip() def test_ogr_wfs_esri(): return ogr_wfs_get_multiple_layer_defn('http://map.ngdc.noaa.gov/wfsconnector/com.esri.wfs.Esrimap/dart_atlantic_f') ############################################################################### # Test a ESRI server def test_ogr_wfs_esri_2(): return ogr_wfs_get_multiple_layer_defn('http://sentinel.ga.gov.au/wfsconnector/com.esri.wfs.Esrimap') ############################################################################### # Test a CubeWerx server def test_ogr_wfs_cubewerx(): return ogr_wfs_get_multiple_layer_defn('http://portal.cubewerx.com/cubewerx/cubeserv/cubeserv.cgi?CONFIG=haiti_vgi&DATASTORE=vgi') ############################################################################### # Test a TinyOWS server def test_ogr_wfs_tinyows(): return ogr_wfs_get_multiple_layer_defn('http://www.tinyows.org/cgi-bin/tinyows') ############################################################################### # Test a ERDAS Apollo server def test_ogr_wfs_erdas_apollo(): return ogr_wfs_get_multiple_layer_defn('http://apollo.erdas.com/erdas-apollo/vector/Cherokee') ############################################################################### # Test a Integraph server def test_ogr_wfs_intergraph(): return ogr_wfs_get_multiple_layer_defn('http://ideg.xunta.es/WFS_POL/request.aspx') ############################################################################### # Test a MapInfo server def test_ogr_wfs_mapinfo(): return ogr_wfs_get_multiple_layer_defn('http://www.mapinfo.com/miwfs') ############################################################################### def test_ogr_wfs_vsimem_fail_because_not_enabled(with_and_without_streaming): gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.PopErrorHandler() assert ds is None ############################################################################### def test_ogr_wfs_vsimem_fail_because_no_get_capabilities(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.PopErrorHandler() assert ds is None ############################################################################### def test_ogr_wfs_vsimem_fail_because_empty_response(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', '') gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Empty content returned by server') >= 0 ############################################################################### def test_ogr_wfs_vsimem_fail_because_no_WFS_Capabilities(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', '') gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Cannot find ') >= 0 ############################################################################### def test_ogr_wfs_vsimem_fail_because_exception(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', '') gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Error returned by server : ') >= 0 ############################################################################### def test_ogr_wfs_vsimem_fail_because_invalid_xml_capabilities(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', '= 0 ############################################################################### def test_ogr_wfs_vsimem_fail_because_missing_featuretypelist(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ """) gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Cannot find ') >= 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_open_getcapabilities_file(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/caps.xml', """= 0 gdal.FileFromMemBuffer('/vsimem/caps.xml', """ """) gdal.PushErrorHandler() ds = ogr.Open('/vsimem/caps.xml') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Cannot find ') >= 0 gdal.FileFromMemBuffer('/vsimem/caps.xml', """ my_layer """) gdal.PushErrorHandler() ds = ogr.Open('/vsimem/caps.xml') gdal.PopErrorHandler() assert ds is None assert gdal.GetLastErrorMsg().find('Cannot find base URL') >= 0 gdal.FileFromMemBuffer('/vsimem/caps.xml', """ my_layer """) ds = ogr.Open('/vsimem/caps.xml') assert ds is not None assert ds.GetLayerCount() == 1 ############################################################################### def test_ogr_wfs_vsimem_wfs110_minimal_instance(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') # Invalid response, but enough for use gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ LDS Testing """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint') assert ds is not None assert ds.GetLayerCount() == 0 assert ds.GetMetadataDomainList() == ['', 'xml:capabilities'] assert ds.GetMetadata() == {'TITLE': 'LDS Testing'} assert len(ds.GetMetadata_List("xml:capabilities")) == 1 gdal.PushErrorHandler() ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) gdal.PopErrorHandler() assert ds is None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_missing_describefeaturetype(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') # Invalid response, but enough for use gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint') assert ds is not None assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) assert lyr.GetName() == 'my_layer' # Missing DescribeFeatureType gdal.ErrorReset() gdal.PushErrorHandler() lyr_defn = lyr.GetLayerDefn() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert lyr_defn.GetFieldCount() == 0 lyr_defn = lyr.GetLayerDefn() ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_invalid_describefeaturetype(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer', """ """) gdal.ErrorReset() gdal.PushErrorHandler() lyr_defn = lyr.GetLayerDefn() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert lyr_defn.GetFieldCount() == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_describefeaturetype(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer', """ """) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 8 assert lyr_defn.GetGeomFieldCount() == 1 ds = gdal.OpenEx('WFS:/vsimem/wfs_endpoint', open_options=['EXPOSE_GML_ID=NO']) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 7 gdal.SetConfigOption('GML_EXPOSE_GML_ID', 'YES') ds = gdal.OpenEx('WFS:/vsimem/wfs_endpoint', open_options=['EXPOSE_GML_ID=NO']) gdal.SetConfigOption('GML_EXPOSE_GML_ID', None) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 7 gdal.SetConfigOption('GML_EXPOSE_GML_ID', 'NO') ds = gdal.OpenEx('WFS:/vsimem/wfs_endpoint', open_options=['EXPOSE_GML_ID=YES']) gdal.SetConfigOption('GML_EXPOSE_GML_ID', None) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 8 gdal.SetConfigOption('GML_EXPOSE_GML_ID', 'NO') ds = gdal.OpenEx('WFS:/vsimem/wfs_endpoint') gdal.SetConfigOption('GML_EXPOSE_GML_ID', None) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 7 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_xmldescriptionfile_to_be_updated(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml', """ /vsimem/wfs_endpoint """) ds = ogr.Open('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml') lyr = ds.GetLayer(0) assert lyr.GetName() == 'my_layer' ds = None f = gdal.VSIFOpenL('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml', 'rb') data = gdal.VSIFReadL(1, 100000, f).decode('ascii') gdal.VSIFCloseL(f) assert data == """ /vsimem/wfs_endpoint my_layer """ ds = ogr.Open('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml') lyr = ds.GetLayer(0) lyr.GetLayerDefn() ds = None f = gdal.VSIFOpenL('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml', 'rb') data = gdal.VSIFReadL(1, 100000, f).decode('ascii') gdal.VSIFCloseL(f) assert data == """ /vsimem/wfs_endpoint my_layer """ gdal.FileFromMemBuffer('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml', """ /vsimem/wfs_endpoint my_layer """) ds = ogr.Open('/vsimem/ogr_wfs_xmldescriptionfile_to_be_updated.xml') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 ds = None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_missing_getfeaturecount_no_hits(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler() count = lyr.GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert count == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_missing_getfeaturecount_with_hits(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ results hits my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler() count = lyr.GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert count == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_invalid_getfeaturecount_with_hits(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&RESULTTYPE=hits', """""") gdal.ErrorReset() gdal.PushErrorHandler() count = lyr.GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert count == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getfeaturecount_with_hits_invalid_xml(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&RESULTTYPE=hits', """""") gdal.ErrorReset() gdal.PushErrorHandler() count = lyr.GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert count == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getfeaturecount_with_hits_missing_numberOfFeatures(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&RESULTTYPE=hits', """""") gdal.ErrorReset() gdal.PushErrorHandler() count = lyr.GetFeatureCount() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert count == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getfeaturecount_with_hits(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&RESULTTYPE=hits', """ """) count = lyr.GetFeatureCount() assert count == 1 ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_missing_getfeature(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f is None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_invalid_getfeature(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer', """ """) gdal.ErrorReset() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Error returned by server') >= 0 assert f is None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getfeature(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer urn:ogc:def:crs:EPSG::4326 -170.0 -80.0 170.0 80.0 """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer', """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """) f = lyr.GetNextFeature() if f.gml_id != 'my_layer.1' or f.boolean != 1 or f.str != 'str' or f.short != 1 or \ f.int != 123456789 or f.float != 1.2 or f.double != 1.23 or f.dt != '2015/04/17 12:34:56+00' or \ f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() sql_lyr = ds.ExecuteSQL('SELECT * FROM my_layer') f = sql_lyr.GetNextFeature() if f.gml_id != 'my_layer.1': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getextent(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) assert lyr.GetExtent() == (2, 2, 49, 49) ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getextent_without_getfeature(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.Unlink('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.PushErrorHandler() extent = lyr.GetExtent() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert extent == (0, 0, 0, 0) ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getextent_optimized(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 my_layer2 urn:ogc:def:crs:EPSG::4326 -170.0 -80.0 170.0 80.0 my_layer3 urn:ogc:def:crs:EPSG::3857 -180.0 -85.0511287798065 180.0 85.0511287798065 my_layer4 urn:ogc:def:crs:EPSG::3857 -180.0 -90 180.0 90 abs_4 """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) assert lyr.GetExtent() == (-180.0, 180.0, -90.0, 90.0) lyr = ds.GetLayer(1) gdal.PushErrorHandler() got_extent = lyr.GetExtent() gdal.PopErrorHandler() assert got_extent == (0.0, 0.0, 0.0, 0.0) ds = gdal.OpenEx('WFS:/vsimem/wfs_endpoint', open_options=['TRUST_CAPABILITIES_BOUNDS=YES']) lyr = ds.GetLayer(1) assert lyr.GetExtent() == (-170.0, 170.0, -80.0, 80.0) gdal.SetConfigOption('OGR_WFS_TRUST_CAPABILITIES_BOUNDS', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') gdal.SetConfigOption('OGR_WFS_TRUST_CAPABILITIES_BOUNDS', None) lyr = ds.GetLayer(2) expected_extent = (-20037508.342789248, 20037508.342789248, -20037508.342789154, 20037508.342789147) got_extent = lyr.GetExtent() for i in range(4): assert expected_extent[i] == pytest.approx(got_extent[i], abs=1e-5) ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_getfeature_ogr_getfeature(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 gml:Envelope gml:Point gml:LineString gml:Polygon LessThan GreaterThan LessThanEqualTo GreaterThanEqualTo EqualTo NotEqualTo Like Between NullCheck """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3CGmlObjectId%20id%3D%22my_layer.100%22%2F%3E%3C%2FFilter%3E', """ """) f = lyr.GetFeature(100) if f.gml_id != 'my_layer.100': f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_filter_gml_id_failed(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer', """ """) lyr.SetAttributeFilter("gml_id = 'my_layer.1'") gdal.ErrorReset() gdal.PushErrorHandler() f = lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' assert f is None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_filter_gml_id_success(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3CGmlObjectId%20id%3D%22my_layer.1%22%2F%3E%3CGmlObjectId%20id%3D%22my_layer.1%22%2F%3E%3C%2FFilter%3E', """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """) lyr.SetAttributeFilter("gml_id = 'my_layer.1' OR gml_id = 'my_layer.1'") f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_filter(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3COr%3E%3COr%3E%3COr%3E%3CAnd%3E%3CAnd%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Estr%3C%2FPropertyName%3E%3CLiteral%3Estr%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Eshort%3C%2FPropertyName%3E%3CLiteral%3E1%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FAnd%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Efloat%3C%2FPropertyName%3E%3CLiteral%3E1.2%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FAnd%3E%3CPropertyIsLike%20wildCard%3D%27%2A%27%20singleChar%3D%27_%27%20escapeChar%3D%27%21%27%20matchCase%3D%27true%27%3E%3CPropertyName%3Estr%3C%2FPropertyName%3E%3CLiteral%3Est%2A%3C%2FLiteral%3E%3C%2FPropertyIsLike%3E%3C%2FOr%3E%3COr%3E%3CNot%3E%3CPropertyIsNull%3E%3CPropertyName%3Eboolean%3C%2FPropertyName%3E%3C%2FPropertyIsNull%3E%3C%2FNot%3E%3CPropertyIsGreaterThan%3E%3CPropertyName%3Eint%3C%2FPropertyName%3E%3CLiteral%3E1%3C%2FLiteral%3E%3C%2FPropertyIsGreaterThan%3E%3C%2FOr%3E%3C%2FOr%3E%3COr%3E%3COr%3E%3CPropertyIsGreaterThanOrEqualTo%3E%3CPropertyName%3Eint%3C%2FPropertyName%3E%3CLiteral%3E1%3C%2FLiteral%3E%3C%2FPropertyIsGreaterThanOrEqualTo%3E%3CPropertyIsNotEqualTo%3E%3CPropertyName%3Eint%3C%2FPropertyName%3E%3CLiteral%3E2%3C%2FLiteral%3E%3C%2FPropertyIsNotEqualTo%3E%3C%2FOr%3E%3COr%3E%3CPropertyIsLessThan%3E%3CPropertyName%3Eint%3C%2FPropertyName%3E%3CLiteral%3E2000000000%3C%2FLiteral%3E%3C%2FPropertyIsLessThan%3E%3CPropertyIsLessThanOrEqualTo%3E%3CPropertyName%3Eint%3C%2FPropertyName%3E%3CLiteral%3E2000000000%3C%2FLiteral%3E%3C%2FPropertyIsLessThanOrEqualTo%3E%3C%2FOr%3E%3C%2FOr%3E%3C%2FOr%3E%3C%2FFilter%3E', """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """) lyr.SetAttributeFilter("(str = 'str' AND short = 1 AND float = 1.2) OR str LIKE 'st%' OR boolean IS NOT NULL OR int > 1 OR int >= 1 or int != 2 or int < 2000000000 or int <= 2000000000") f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_filter_spatial_ops(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) content = """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """ # Invalid syntax gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape)") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong number of arguments for ST_Intersects') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, 5)") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong field type for argument 2 of ST_Intersects') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_MakeEnvelope(1))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong number of arguments for ST_MakeEnvelope') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_MakeEnvelope(1,1,1,'a'))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong field type for argument 4 of ST_MakeEnvelope') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_MakeEnvelope(1,1,1,1,3.5))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong field type for argument 5 of ST_MakeEnvelope') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_MakeEnvelope(1,1,1,1,'not_a_srs'))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong value for argument 5 of ST_MakeEnvelope') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_MakeEnvelope(1,1,1,1,-5))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong value for argument 5 of ST_MakeEnvelope') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_GeomFromText(1,2,3))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong number of arguments for ST_GeomFromText') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_GeomFromText(1))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong field type for argument 1 of ST_GeomFromText') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_GeomFromText('INVALID_GEOM'))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong value for argument 1 of ST_GeomFromText') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_Intersects(shape, ST_GeomFromText('POINT(0 0)', 'invalid_srs'))") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong value for argument 2 of ST_GeomFromText') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_DWithin(shape)") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong number of arguments for ST_DWithin') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_DWithin(shape,'a',5)") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong field type for argument 2 of ST_DWithin') < 0) gdal.PushErrorHandler() ret = lyr.SetAttributeFilter("ST_DWithin(shape,shape,'a')") gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Wrong field type for argument 3 of ST_DWithin') < 0) # Now valid requests gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3COr%3E%3COr%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Envelope%20srsName%3D%22urn:ogc:def:crs:EPSG::4326%22%3E%3Cgml:lowerCorner%3E48.5%201.5%3C%2Fgml:lowerCorner%3E%3Cgml:upperCorner%3E49.5%202.5%3C%2Fgml:upperCorner%3E%3C%2Fgml:Envelope%3E%3C%2FIntersects%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Envelope%20srsName%3D%22urn:ogc:def:crs:EPSG::4326%22%3E%3Cgml:lowerCorner%3E48.5%201.5%3C%2Fgml:lowerCorner%3E%3Cgml:upperCorner%3E49.5%202.5%3C%2Fgml:upperCorner%3E%3C%2Fgml:Envelope%3E%3C%2FIntersects%3E%3C%2FOr%3E%3COr%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Envelope%20srsName%3D%22EPSG:4326%22%3E%3Cgml:lowerCorner%3E1.5%2048.5%3C%2Fgml:lowerCorner%3E%3Cgml:upperCorner%3E2.5%2049.5%3C%2Fgml:upperCorner%3E%3C%2Fgml:Envelope%3E%3C%2FIntersects%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Envelope%20srsName%3D%22urn:ogc:def:crs:EPSG::32630%22%3E%3Cgml:lowerCorner%3E380000%205370000%3C%2Fgml:lowerCorner%3E%3Cgml:upperCorner%3E470000%205490000%3C%2Fgml:upperCorner%3E%3C%2Fgml:Envelope%3E%3C%2FIntersects%3E%3C%2FOr%3E%3C%2FOr%3E%3C%2FFilter%3E', content) lyr.SetAttributeFilter("ST_Intersects(shape, ST_MakeEnvelope(1.5,48.5,2.5,49.5)) OR " + "ST_Intersects(shape, ST_MakeEnvelope(1.5,48.5,2.5,49.5, 4326)) OR " + "ST_Intersects(shape, ST_MakeEnvelope(1.5,48.5,2.5,49.5, 'EPSG:4326')) OR " + "ST_Intersects(shape, ST_MakeEnvelope(380000,5370000,470000,5490000,32630))") f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3COr%3E%3COr%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Polygon%20srsName%3D%22urn:ogc:def:crs:EPSG::4326%22%20gml:id%3D%22id1%22%3E%3Cgml:exterior%3E%3Cgml:LinearRing%3E%3Cgml:posList%3E48.5%201.5%2049.5%202.5%2049.5%202.5%2048.5%202.5%2048.5%201.5%3C%2Fgml:posList%3E%3C%2Fgml:LinearRing%3E%3C%2Fgml:exterior%3E%3C%2Fgml:Polygon%3E%3C%2FIntersects%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Polygon%20srsName%3D%22urn:ogc:def:crs:EPSG::4326%22%20gml:id%3D%22id2%22%3E%3Cgml:exterior%3E%3Cgml:LinearRing%3E%3Cgml:posList%3E48.5%201.5%2049.5%202.5%2049.5%202.5%2048.5%202.5%2048.5%201.5%3C%2Fgml:posList%3E%3C%2Fgml:LinearRing%3E%3C%2Fgml:exterior%3E%3C%2Fgml:Polygon%3E%3C%2FIntersects%3E%3C%2FOr%3E%3CIntersects%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Polygon%20srsName%3D%22EPSG:4326%22%20gml:id%3D%22id3%22%3E%3Cgml:exterior%3E%3Cgml:LinearRing%3E%3Cgml:posList%3E1.5%2048.5%202.5%2049.5%202.5%2049.5%202.5%2048.5%201.5%2048.5%3C%2Fgml:posList%3E%3C%2Fgml:LinearRing%3E%3C%2Fgml:exterior%3E%3C%2Fgml:Polygon%3E%3C%2FIntersects%3E%3C%2FOr%3E%3C%2FFilter%3E', content) lyr.SetAttributeFilter("ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5)))')) OR " + "ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5)))', 4326)) OR " + "ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5)))', 'EPSG:4326'))") f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3CDWithin%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Envelope%20srsName%3D%22urn:ogc:def:crs:EPSG::4326%22%3E%3Cgml:lowerCorner%3E48.5%201.5%3C%2Fgml:lowerCorner%3E%3Cgml:upperCorner%3E49.5%202.5%3C%2Fgml:upperCorner%3E%3C%2Fgml:Envelope%3E%3CDistance%20unit%3D%22m%22%3E5%3C%2FDistance%3E%3C%2FDWithin%3E%3C%2FFilter%3E', content) lyr.SetAttributeFilter("ST_DWithin(shape,ST_MakeEnvelope(1.5,48.5,2.5,49.5),5)") f = lyr.GetNextFeature() assert f is not None sql_lyr = ds.ExecuteSQL("SELECT * FROM my_layer WHERE ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5)))')) OR " + "ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5)))', 4326)) OR " + "ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5)))', 'EPSG:4326'))") f = sql_lyr.GetNextFeature() assert f is not None ds.ReleaseResultSet(sql_lyr) # Error case sql_lyr = ds.ExecuteSQL("SELECT ST_Intersects(shape, ST_GeomFromText('POLYGON((1.5 48.5,2.5 49.5,2.5 49.5,2.5 48.5,1.5 48.5))')) FROM my_layer") gdal.PushErrorHandler() f = sql_lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None ds.ReleaseResultSet(sql_lyr) ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_spatial_filter(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3CBBOX%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Box%3E%3Cgml:coordinates%3E48.0000000000000000,1.0000000000000000%2050.0000000000000000,3.0000000000000000%3C%2Fgml:coordinates%3E%3C%2Fgml:Box%3E%3C%2FBBOX%3E%3C%2FFilter%3E', """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """) lyr.SetSpatialFilterRect(1, 48, 3, 50) f = lyr.GetNextFeature() assert f is not None if gdal.GetConfigOption('OGR_WFS_USE_STREAMING') == 'NO': lyr.SetSpatialFilterRect(1.5, 48.5, 2.5, 49.5) f = lyr.GetNextFeature() assert f is not None lyr.SetSpatialFilter(None) lyr.ResetReading() lyr.ResetReading() lyr.SetSpatialFilterRect(1, 48, 3, 50) f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_wfs_vsimem_wfs110_one_layer_spatial_filter_and_attribute_filter(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3CAnd%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Estr%3C%2FPropertyName%3E%3CLiteral%3Estr%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3CBBOX%3E%3CPropertyName%3Eshape%3C%2FPropertyName%3E%3Cgml:Box%3E%3Cgml:coordinates%3E48.0000000000000000,1.0000000000000000%2050.0000000000000000,3.0000000000000000%3C%2Fgml:coordinates%3E%3C%2Fgml:Box%3E%3C%2FBBOX%3E%3C%2FAnd%3E%3C%2FFilter%3E', """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """) lyr.SetSpatialFilterRect(1, 48, 3, 50) lyr.SetAttributeFilter("str = 'str'") f = lyr.GetNextFeature() assert f is not None ############################################################################### def test_ogr_wfs_vsimem_wfs110_insertfeature(with_and_without_streaming): wfs_insert_url = None gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 gml:Envelope gml:Point gml:LineString gml:Polygon LessThan GreaterThan LessThanEqualTo GreaterThanEqualTo EqualTo NotEqualTo Like Between NullCheck """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 wfs_insert_url = """/vsimem/wfs_endpoint&POSTFIELDS= """ gdal.FileFromMemBuffer(wfs_insert_url, "") f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.FileFromMemBuffer(wfs_insert_url, "") f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Error returned by server') < 0) gdal.FileFromMemBuffer(wfs_insert_url, "") f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot find ') < 0) gdal.FileFromMemBuffer(wfs_insert_url, """ """) f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.FileFromMemBuffer(wfs_insert_url, """ """) f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 gdal.FileFromMemBuffer(wfs_insert_url, """ """) gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL('SELECT _LAST_INSERTED_FIDS_ FROM not_existing_layer') gdal.PopErrorHandler() assert sql_lyr is None f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 assert f.GetFID() == 100 sql_lyr = ds.ExecuteSQL('SELECT _LAST_INSERTED_FIDS_ FROM my_layer') got_f = sql_lyr.GetNextFeature() assert got_f is None ds.ReleaseResultSet(sql_lyr) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot insert a feature when gml_id field is already set') < 0) # Empty StartTransaction + CommitTransaction ret = lyr.StartTransaction() assert ret == 0 ret = lyr.CommitTransaction() assert ret == 0 # Empty StartTransaction + RollbackTransaction ret = lyr.StartTransaction() assert ret == 0 ret = lyr.RollbackTransaction() assert ret == 0 # Isolated CommitTransaction gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert ret != 0 # Isolated RollbackTransaction gdal.PushErrorHandler() ret = lyr.RollbackTransaction() gdal.PopErrorHandler() assert ret != 0 # 2 StartTransaction in a row ret = lyr.StartTransaction() assert ret == 0 gdal.PushErrorHandler() ret = lyr.StartTransaction() gdal.PopErrorHandler() assert ret != 0 ret = lyr.RollbackTransaction() assert ret == 0 # Missing TransactionSummary ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Only 0 features were inserted whereas 1 where expected') < 0) ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.FileFromMemBuffer(wfs_insert_url, "") gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot find ') < 0) ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.FileFromMemBuffer(wfs_insert_url, "") gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Error returned by server') < 0) ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.FileFromMemBuffer(wfs_insert_url, """ """) gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot find node InsertResults') < 0) ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.FileFromMemBuffer(wfs_insert_url, """ """) gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Inconsistent InsertResults: did not get expected FID count') < 0) ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.FileFromMemBuffer(wfs_insert_url, """ """) gdal.PushErrorHandler() ret = lyr.CommitTransaction() gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot find fid') < 0) ret = lyr.StartTransaction() assert ret == 0 f = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.CreateFeature(f) assert ret == 0 gdal.FileFromMemBuffer(wfs_insert_url, """ """) ret = lyr.CommitTransaction() assert ret == 0 sql_lyr = ds.ExecuteSQL('SELECT _LAST_INSERTED_FIDS_ FROM my_layer') f = sql_lyr.GetNextFeature() assert f.gml_id == 'my_layer.100' sql_lyr.ResetReading() sql_lyr.SetNextByIndex(0) sql_lyr.GetFeature(0) sql_lyr.GetLayerDefn() sql_lyr.GetFeatureCount() sql_lyr.TestCapability('foo') ds.ReleaseResultSet(sql_lyr) gdal.Unlink(wfs_insert_url) wfs_insert_url = None wfs_insert_url = """/vsimem/wfs_endpoint&POSTFIELDS= foo 123456789 2.34 49 2 """ gdal.FileFromMemBuffer(wfs_insert_url, """ """) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('str', 'foo') f.SetField('int', 123456789) f.SetField('double', 2.34) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) ret = lyr.CreateFeature(f) assert ret == 0 gdal.Unlink(wfs_insert_url) wfs_insert_url = None ############################################################################### def test_ogr_wfs_vsimem_wfs110_updatefeature(with_and_without_streaming): wfs_update_url = None gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.CreateFeature(f) gdal.PopErrorHandler() assert ret != 0 f = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot update a feature when gml_id field is not set') < 0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('gml_id', 'my_layer.1') gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert ret != 0, gdal.GetLastErrorMsg() wfs_update_url = """/vsimem/wfs_endpoint&POSTFIELDS= shape str boolean short int float double dt """ gdal.FileFromMemBuffer(wfs_update_url, "") f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('gml_id', 'my_layer.1') gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Empty content returned by server') < 0) gdal.FileFromMemBuffer(wfs_update_url, "") f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('gml_id', 'my_layer.1') gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Error returned by server') < 0) gdal.FileFromMemBuffer(wfs_update_url, "") f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('gml_id', 'my_layer.1') gdal.PushErrorHandler() ret = lyr.SetFeature(f) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot find ') < 0) gdal.FileFromMemBuffer(wfs_update_url, "") f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('gml_id', 'my_layer.1') ret = lyr.SetFeature(f) assert ret == 0, gdal.GetLastErrorMsg() gdal.Unlink(wfs_update_url) wfs_update_url = """/vsimem/wfs_endpoint&POSTFIELDS= shape 49 2 str foo boolean short int 123456789 float double 2.34 dt """ gdal.FileFromMemBuffer(wfs_update_url, "") f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('gml_id', 'my_layer.1') f.SetField('str', 'foo') f.SetField('int', 123456789) f.SetField('double', 2.34) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (2 49)')) ret = lyr.SetFeature(f) assert ret == 0 ############################################################################### def test_ogr_wfs_vsimem_wfs110_deletefeature(with_and_without_streaming): wfs_delete_url = None gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) gdal.PushErrorHandler() ret = lyr.DeleteFeature(200) gdal.PopErrorHandler() assert ret != 0, gdal.GetLastErrorMsg() gdal.FileFromMemBuffer('/vsimem/wfs_endpoint?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%22%3E%3CGmlObjectId%20id%3D%22my_layer.200%22%2F%3E%3C%2FFilter%3E', """ """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) gdal.PushErrorHandler() ret = lyr.DeleteFeature(200) gdal.PopErrorHandler() assert ret != 0, gdal.GetLastErrorMsg() ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) wfs_delete_url = """/vsimem/wfs_endpoint&POSTFIELDS= """ gdal.FileFromMemBuffer(wfs_delete_url, "") gdal.PushErrorHandler() ret = lyr.DeleteFeature(200) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Empty content returned by server') < 0) ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) gdal.FileFromMemBuffer(wfs_delete_url, "") gdal.PushErrorHandler() ret = lyr.DeleteFeature(200) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Invalid XML content') < 0) ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) gdal.FileFromMemBuffer(wfs_delete_url, "") gdal.PushErrorHandler() ret = lyr.DeleteFeature(200) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg().find('Cannot find ') < 0) ds = ogr.Open('WFS:/vsimem/wfs_endpoint', update=1) lyr = ds.GetLayer(0) gdal.FileFromMemBuffer(wfs_delete_url, "") ret = lyr.DeleteFeature(200) assert ret == 0, gdal.GetLastErrorMsg() gdal.Unlink(wfs_delete_url) wfs_delete_url = """/vsimem/wfs_endpoint&POSTFIELDS= """ gdal.FileFromMemBuffer(wfs_delete_url, "") gdal.ErrorReset() sql_lyr = ds.ExecuteSQL("DELETE FROM my_layer WHERE gml_id = 'my_layer.200'") assert gdal.GetLastErrorMsg() == '' gdal.ErrorReset() gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("DELETE FROM ") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("DELETE FROM non_existing_layer WHERE truc") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Unknown layer') >= 0 gdal.ErrorReset() gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("DELETE FROM my_layer BLA") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('WHERE clause missing') >= 0 gdal.ErrorReset() gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("DELETE FROM my_layer WHERE -") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('SQL Expression Parsing Error') >= 0 gdal.ErrorReset() gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("DELETE FROM my_layer WHERE ogr_geometry = 'POINT'") gdal.PopErrorHandler() assert sql_lyr is None and gdal.GetLastErrorMsg() != '' ############################################################################### def test_ogr_wfs_vsimem_wfs110_schema_not_understood(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') # Invalid response, but enough for use gdal.FileFromMemBuffer('/vsimem/wfs_endpoint_schema_not_understood?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer """) ds = ogr.Open('WFS:/vsimem/wfs_endpoint_schema_not_understood') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs_endpoint_schema_not_understood?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer', """ """) gdal.PushErrorHandler() lyr_defn = lyr.GetLayerDefn() gdal.PopErrorHandler() assert lyr_defn.GetFieldCount() == 0 ds = ogr.Open('WFS:/vsimem/wfs_endpoint_schema_not_understood') lyr = ds.GetLayer(0) content = \ """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """ gdal.FileFromMemBuffer('/vsimem/wfs_endpoint_schema_not_understood?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer&MAXFEATURES=1', content) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 8 gdal.FileFromMemBuffer('/vsimem/wfs_endpoint_schema_not_understood?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=my_layer', content) f = lyr.GetNextFeature() if f.gml_id != 'my_layer.1' or f.boolean != 1 or f.str != 'str' or f.short != 1 or \ f.int != 123456789 or f.float != 1.2 or f.double != 1.23 or f.dt != '2015/04/17 12:34:56+00' or \ f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_wfs_vsimem_wfs110_multiple_layers(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 my_layer2 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs110_multiple_layers') lyr = ds.GetLayer(0) gdal.PushErrorHandler() lyr_defn = lyr.GetLayerDefn() gdal.PopErrorHandler() assert lyr_defn.GetFieldCount() == 0 ds = ogr.Open('WFS:/vsimem/wfs110_multiple_layers') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer,my_layer2', "") lyr = ds.GetLayer(0) gdal.PushErrorHandler() lyr_defn = lyr.GetLayerDefn() gdal.PopErrorHandler() assert lyr_defn.GetFieldCount() == 0 ds = ogr.Open('WFS:/vsimem/wfs110_multiple_layers') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer,my_layer2', "") lyr = ds.GetLayer(0) gdal.PushErrorHandler() lyr_defn = lyr.GetLayerDefn() gdal.PopErrorHandler() assert lyr_defn.GetFieldCount() == 0 ds = ogr.Open('WFS:/vsimem/wfs110_multiple_layers') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer,my_layer2', """ """) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 2 lyr = ds.GetLayer(1) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 2 ds = ogr.Open('WFS:/vsimem/wfs110_multiple_layers') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer,my_layer2', """ """) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 2 gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer2', """ """) lyr = ds.GetLayer(1) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 2 ############################################################################### def test_ogr_wfs_vsimem_wfs110_multiple_layers_same_name_different_ns(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers_different_ns?SERVICE=WFS&REQUEST=GetCapabilities', """ ns1:my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 ns2:my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs110_multiple_layers_different_ns') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers_different_ns?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=ns1:my_layer', """ """) lyr = ds.GetLayer(0) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 2 gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers_different_ns?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=ns1:my_layer', """ """) f = lyr.GetNextFeature() assert f is not None gdal.FileFromMemBuffer('/vsimem/wfs110_multiple_layers_different_ns?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=ns2:my_layer', """ """) lyr = ds.GetLayer(1) lyr_defn = lyr.GetLayerDefn() assert lyr_defn.GetFieldCount() == 3 ############################################################################### def test_ogr_wfs_vsimem_wfs200_paging(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_paging?SERVICE=WFS&REQUEST=GetCapabilities', """ 2 TRUE my_layer title abstract keyword urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 gml:Envelope gml:Point gml:LineString gml:Polygon LessThan GreaterThan LessThanEqualTo GreaterThanEqualTo EqualTo NotEqualTo Like Between NullCheck """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_paging') lyr = ds.GetLayer(0) assert lyr.GetMetadata() == {'ABSTRACT': 'abstract', 'KEYWORD_1': 'keyword', 'TITLE': 'title'} gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_paging?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer', """ """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_paging?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=my_layer&STARTINDEX=0&COUNT=2', """ str true 1 123456789 1.2 1.23 2015-04-17T12:34:56Z 49 2 """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_paging?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=my_layer&STARTINDEX=2&COUNT=2', """ """) f = lyr.GetNextFeature() assert f is not None if f.gml_id != 'my_layer.1': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() assert f is not None if f.gml_id != 'my_layer.2': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() assert f is not None if f.gml_id != 'my_layer.3': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() # if lyr.GetFeatureCount() != 3: # gdaltest.post_reason('fail') # print(lyr.GetFeatureCount()) # return 'fail' ############################################################################### def test_ogr_wfs_vsimem_wfs200_json(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_json?SERVICE=WFS&REQUEST=GetCapabilities', """ results hits application/json 2 TRUE my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 gml:Envelope gml:Point gml:LineString gml:Polygon LessThan GreaterThan LessThanEqualTo GreaterThanEqualTo EqualTo NotEqualTo Like Between NullCheck """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_json?OUTPUTFORMAT=application/json') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_json?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer', """ """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_json?OUTPUTFORMAT=application/json&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=my_layer&STARTINDEX=0&COUNT=2', """{"type":"FeatureCollection", "totalFeatures":"unknown", "features":[{"type":"Feature","id":"my_layer.1", "geometry":{"type":"Point","coordinates":[2, 49]}, "properties":{"str":"str"}}]} """) f = lyr.GetNextFeature() assert f is not None # We currently invert... A bit weird. See comment in code. Probably inappropriate if f.str != 'str' or f.GetGeometryRef().ExportToWkt() != 'POINT (49 2)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_wfs_vsimem_wfs200_multipart(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_multipart?SERVICE=WFS&REQUEST=GetCapabilities', """ my_layer urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_multipart?OUTPUTFORMAT=multipart') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_multipart?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=my_layer', """ """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_multipart?OUTPUTFORMAT=multipart&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=my_layer', """Content-Type: multipart/mixed; boundary="my_boundary" \r \r --my_boundary Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=my.json \r { "type":"FeatureCollection", "totalFeatures":"unknown", "features":[ { "type":"Feature", "id":"my_layer.1", "geometry":{"type":"Point","coordinates":[2, 49]}, "properties":{"str":"str"} } ] } --my_boundary-- """) f = lyr.GetNextFeature() assert f is not None # We currently invert... A bit weird. See comment in code. Probably inappropriate if f.str != 'str' or f.GetGeometryRef().ExportToWkt() != 'POINT (49 2)': f.DumpReadable() pytest.fail() ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_multipart?OUTPUTFORMAT=multipart') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_multipart?OUTPUTFORMAT=multipart&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=my_layer', """Content-Type: multipart/mixed; boundary="my_boundary" \r \r --my_boundary \r { "type":"FeatureCollection", "totalFeatures":"unknown", "features":[ { "type":"Feature", "id":"my_layer.1", "geometry":{"type":"Point","coordinates":[2, 49]}, "properties":{"str":"str"} } ] } --my_boundary-- """) f = lyr.GetNextFeature() assert f is not None ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_multipart?OUTPUTFORMAT=multipart') lyr = ds.GetLayer(0) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_multipart?OUTPUTFORMAT=multipart&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=my_layer', """Content-Type: multipart/mixed; boundary="my_boundary" \r \r --my_boundary Content-Disposition: attachment; filename=my.csvt \r String,String --my_boundary Content-Disposition: attachment; filename=my.csv \r str,WKT str,"POINT(2 49)" --my_boundary-- """) f = lyr.GetNextFeature() assert f is not None # We currently invert... A bit weird. See comment in code. Probably inappropriate if f.str != 'str' or f.GetGeometryRef().ExportToWkt() != 'POINT (49 2)': f.DumpReadable() pytest.fail() ############################################################################### def test_ogr_wfs_vsimem_wfs200_join(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&REQUEST=GetCapabilities', """ 1 TRUE TRUE lyr1 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 lyr2 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=lyr1,lyr2', """ """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.PushErrorHandler() f = sql_lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """""") gdal.PushErrorHandler() f = sql_lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None and gdal.GetLastErrorMsg().find('Empty content returned by server') >= 0 ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """""") gdal.PushErrorHandler() f = sql_lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None and gdal.GetLastErrorMsg().find('Error returned by server') >= 0 ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """= 0 ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """""") gdal.PushErrorHandler() f = sql_lyr.GetNextFeature() gdal.PopErrorHandler() assert f is None and gdal.GetLastErrorMsg().find('Error: cannot parse') >= 0 ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """ 123.4 48.5 2.5 123.4 49 2 """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=1&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """ foo 48.5 2.5 foo 49 2 """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=2&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """ """) f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100' or f['lyr1.str'] != '123.4' or \ f['lyr2.gml_id'] != 'lyr2-101' or f['lyr2.str2'] != '123.4' or \ f['lyr1.shape'].ExportToWkt() != 'POINT (2.5 48.5)' or \ f['lyr2.another_shape'].ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-101' or f['lyr1.str'] != 'foo' or \ f['lyr2.gml_id'] != 'lyr2-102' or f['lyr2.str2'] != 'foo' or \ f['lyr1.shape'].ExportToWkt() != 'POINT (2.5 48.5)' or \ f['lyr2.another_shape'].ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() f = sql_lyr.GetNextFeature() if f is not None: f.DumpReadable() pytest.fail() sql_lyr.ResetReading() sql_lyr.ResetReading() f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100': f.DumpReadable() pytest.fail() gdal.PushErrorHandler('CPLQuietErrorHandler') fc = sql_lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2, gdal.GetLastErrorMsg() # Empty content returned by server gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&RESULTTYPE=hits', """""") gdal.PushErrorHandler('CPLQuietErrorHandler') fc = sql_lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2, gdal.GetLastErrorMsg() # Invalid XML gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&RESULTTYPE=hits', """""") gdal.PushErrorHandler('CPLQuietErrorHandler') fc = sql_lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2, gdal.GetLastErrorMsg() # Missing FeatureCollection gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&RESULTTYPE=hits', """""") gdal.PushErrorHandler('CPLQuietErrorHandler') fc = sql_lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2, gdal.GetLastErrorMsg() # Missing FeatureCollection.numberMatched gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&RESULTTYPE=hits', """""") gdal.PushErrorHandler('CPLQuietErrorHandler') fc = sql_lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 2, gdal.GetLastErrorMsg() # Valid gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&RESULTTYPE=hits', """ """) gdal.PushErrorHandler('CPLQuietErrorHandler') fc = sql_lyr.GetFeatureCount() gdal.PopErrorHandler() assert fc == 3, gdal.GetLastErrorMsg() sql_lyr.TestCapability('foo') sql_lyr.GetLayerDefn() # Test filters (nt supported) sql_lyr.SetAttributeFilter(None) gdal.PushErrorHandler() sql_lyr.SetAttributeFilter('"lyr1.gml_id" IS NOT NULL') gdal.PopErrorHandler() sql_lyr.SetSpatialFilter(None) gdal.PushErrorHandler() sql_lyr.SetSpatialFilterRect(0, 0, 0, 0) gdal.PopErrorHandler() ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT lyr1.*, lyr2.* FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100' or f['lyr1.str'] != '123.4' or \ f['lyr2.gml_id'] != 'lyr2-101' or f['lyr2.str2'] != '123.4' or \ f['lyr1.shape'].ExportToWkt() != 'POINT (2.5 48.5)' or \ f['lyr2.another_shape'].ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 my_alias1 JOIN lyr2 ON my_alias1.str = lyr2.str2') f = sql_lyr.GetNextFeature() if f['my_alias1.gml_id'] != 'lyr1-100' or f['my_alias1.str'] != '123.4' or \ f['lyr2.gml_id'] != 'lyr2-101' or f['lyr2.str2'] != '123.4' or \ f['my_alias1.shape'].ExportToWkt() != 'POINT (2.5 48.5)' or \ f['lyr2.another_shape'].ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT my_alias1.gml_id as gml_id1, ' + 'CAST(my_alias1.str AS integer) AS str_int, ' + 'CAST(my_alias1.str AS bigint) AS str_bigint, ' + 'CAST(my_alias1.str AS float) AS str_float, ' + 'my_alias1.shape AS myshape ' + 'FROM lyr1 my_alias1 JOIN lyr2 ON my_alias1.str = lyr2.str2') f = sql_lyr.GetNextFeature() if f['gml_id1'] != 'lyr1-100' or \ f['str_int'] != 123 or \ f['str_bigint'] != 123 or \ f['str_float'] != 123.4 or \ f['myshape'].ExportToWkt() != 'POINT (2.5 48.5)': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL("SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2 WHERE lyr2.str2 = '123.4'") content = """ 123.4 48.5 2.5 123.4 49 2 """ gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CAnd%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3CLiteral%3E123.4%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FAnd%3E%3C%2FFilter%3E', content) f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100' or f['lyr1.str'] != '123.4' or \ f['lyr2.gml_id'] != 'lyr2-101' or f['lyr2.str2'] != '123.4' or \ f['lyr1.shape'].ExportToWkt() != 'POINT (2.5 48.5)' or \ f['lyr2.another_shape'].ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CAnd%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3CWithin%3E%3CValueReference%3Elyr2%2Fanother_shape%3C%2FValueReference%3E%3Cgml:Envelope%20srsName%3D%22urn:ogc:def:crs:EPSG::4326%22%3E%3Cgml:lowerCorner%3E%2D90%20%2D180%3C%2Fgml:lowerCorner%3E%3Cgml:upperCorner%3E90%20180%3C%2Fgml:upperCorner%3E%3C%2Fgml:Envelope%3E%3C%2FWithin%3E%3C%2FAnd%3E%3C%2FFilter%3E', content) sql_lyr = ds.ExecuteSQL("SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2 WHERE ST_Within(lyr2.another_shape, ST_MakeEnvelope(-180,-90,180,90))") f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28lyr1,lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Elyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Elyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E&SORTBY=str%20DESC', content) sql_lyr = ds.ExecuteSQL("SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2 ORDER BY lyr1.str DESC") f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2 WHERE lyr1.OGR_GEOMETRY IS NOT NULL") gdal.PopErrorHandler() assert sql_lyr is None and gdal.GetLastErrorMsg().find('Unsupported WHERE clause') >= 0 gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("SELECT * FROM lyr1 JOIN lyr2 ON lyr1.OGR_GEOMETRY IS NOT NULL") gdal.PopErrorHandler() assert sql_lyr is None and gdal.GetLastErrorMsg().find('Unsupported JOIN clause') >= 0 gdal.PushErrorHandler() sql_lyr = ds.ExecuteSQL("SELECT 1 FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2") gdal.PopErrorHandler() assert sql_lyr is None and gdal.GetLastErrorMsg().find('Only column names supported in column selection') >= 0 ds = None ############################################################################### def test_ogr_wfs_vsimem_wfs200_join_layer_with_namespace_prefix(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&REQUEST=GetCapabilities', """ 1 TRUE TRUE foo:lyr1 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 foo:lyr2 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=foo:lyr1,foo:lyr2', """ """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT * FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28foo:lyr1,foo:lyr2%29&STARTINDEX=0&COUNT=1&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:foo%3D%22http:%2F%2Ffoo%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Efoo:lyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Efoo:lyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """ 123.4 48.5 2.5 123.4 49 2 """) f = sql_lyr.GetNextFeature() if f['lyr1.gml_id'] != 'lyr1-100' or f['lyr1.str'] != '123.4' or \ f['lyr2.gml_id'] != 'lyr2-101' or f['lyr2.str2'] != '123.4' or \ f['lyr1.shape'].ExportToWkt() != 'POINT (2.5 48.5)' or \ f['lyr2.another_shape'].ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ############################################################################### def test_ogr_wfs_vsimem_wfs200_join_distinct(with_and_without_streaming): gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&REQUEST=GetCapabilities', """ 4 TRUE TRUE foo:lyr1 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 foo:lyr2 urn:ogc:def:crs:EPSG::4326 -180.0 -90.0 180.0 90.0 """) gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=foo:lyr1,foo:lyr2', """ """) gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', 'YES') ds = ogr.Open('WFS:/vsimem/wfs200_endpoint_join') sql_lyr = ds.ExecuteSQL('SELECT DISTINCT lyr1.str, lyr1.int, lyr1.int64, lyr1.double, lyr1.dt, lyr2.another_shape FROM lyr1 JOIN lyr2 ON lyr1.str = lyr2.str2') gdal.FileFromMemBuffer('/vsimem/wfs200_endpoint_join?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=%28foo:lyr1,foo:lyr2%29&STARTINDEX=0&COUNT=4&FILTER=%3CFilter%20xmlns%3D%22http:%2F%2Fwww.opengis.net%2Ffes%2F2.0%22%20xmlns:foo%3D%22http:%2F%2Ffoo%22%20xmlns:gml%3D%22http:%2F%2Fwww.opengis.net%2Fgml%2F3.2%22%3E%3CPropertyIsEqualTo%3E%3CValueReference%3Efoo:lyr1%2Fstr%3C%2FValueReference%3E%3CValueReference%3Efoo:lyr2%2Fstr2%3C%2FValueReference%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E', """ foo 1 9876543210 123.4 2015-04-17T12:34:56Z 48.5 2.5 foo foo 49 2 foo 1 9876543210 123.4 2015-04-17T12:34:56Z 48.5 2.5 foo bar 49 2 bar 1 9876543210 123.4 2015-04-17T12:34:56Z 48.5 2.5 bar bar 49 2 """) assert sql_lyr.GetFeatureCount() == 2 ds.ReleaseResultSet(sql_lyr) ############################################################################### def test_ogr_wfs_vsimem_cleanup(with_and_without_streaming): gdal.SetConfigOption('CPL_CURL_ENABLE_VSIMEM', None) for f in gdal.ReadDir('/vsimem/'): gdal.Unlink('/vsimem/' + f) gdalautotest-3.1.2/ogr/ogr_geojson.py0000775000175000017500000034735313701060013016360 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_geojson.py 15b25126b5d1c4c3f1be56cbda197a97750f1717 2020-06-25 14:04:47 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: GeoJSON driver test suite. # Author: Mateusz Loskot # ############################################################################### # Copyright (c) 2007, Mateusz Loskot # Copyright (c) 2009-2014, Even Rouault # Copyright (c) 2013, Kyle Shannon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import json import math import os from osgeo import osr from osgeo import ogr from osgeo import gdal import gdaltest import ogrtest import pytest pytestmark = [pytest.mark.require_driver('GeoJSON'), pytest.mark.usefixtures("startup_and_cleanup")] ############################################################################### @pytest.fixture(scope="module") def startup_and_cleanup(): gdaltest.geojson_drv = ogr.GetDriverByName('GeoJSON') yield ############################################################################### # Test utilities def validate_layer(lyr, name, features, typ, fields, box): if name is not None and name != lyr.GetName(): print('Wrong layer name') return False if features != lyr.GetFeatureCount(): print('Wrong number of features') return False lyrDefn = lyr.GetLayerDefn() if lyrDefn is None: print('Layer definition is none') return False if typ != lyrDefn.GetGeomType(): print('Wrong geometry type') print(lyrDefn.GetGeomType()) return False if fields != lyrDefn.GetFieldCount(): print('Wrong number of fields') return False extent = lyr.GetExtent() minx = abs(extent[0] - box[0]) maxx = abs(extent[1] - box[1]) miny = abs(extent[2] - box[2]) maxy = abs(extent[3] - box[3]) if max(minx, maxx, miny, maxy) > 0.0001: print('Wrong spatial extent of layer') print(extent) return False return True def verify_geojson_copy(fname, fids, names): if gdaltest.gjpoint_feat is None: print('Missing features collection') return False ds = ogr.Open(fname) if ds is None: print('Can not open \'' + fname + '\'') return False lyr = ds.GetLayer(0) if lyr is None: print('Missing layer') return False ###################################################### # Test attributes ret = ogrtest.check_features_against_list(lyr, 'FID', fids) if ret != 1: print('Wrong values in \'FID\' field') return False lyr.ResetReading() ret = ogrtest.check_features_against_list(lyr, 'NAME', names) if ret != 1: print('Wrong values in \'NAME\' field') return False ###################################################### # Test geometries lyr.ResetReading() for i in range(len(gdaltest.gjpoint_feat)): orig_feat = gdaltest.gjpoint_feat[i] feat = lyr.GetNextFeature() if feat is None: print('Failed trying to read feature') return False if ogrtest.check_feature_geometry(feat, orig_feat.GetGeometryRef(), max_error=0.001) != 0: print('Geometry test failed') gdaltest.gjpoint_feat = None return False gdaltest.gjpoint_feat = None lyr = None return True def copy_shape_to_geojson(gjname, compress=None): if compress is not None: if compress[0:5] == '/vsig': dst_name = os.path.join('/vsigzip/', 'tmp', gjname + '.geojson' + '.gz') elif compress[0:4] == '/vsiz': dst_name = os.path.join('/vsizip/', 'tmp', gjname + '.geojson' + '.zip') elif compress == '/vsistdout/': dst_name = compress else: return False, None else: dst_name = os.path.join('tmp', gjname + '.geojson') ds = gdaltest.geojson_drv.CreateDataSource(dst_name) if ds is None: return False, dst_name ###################################################### # Create layer lyr = ds.CreateLayer(gjname) if lyr is None: return False, dst_name ###################################################### # Setup schema (all test shapefiles use common schmea) ogrtest.quick_create_layer_def(lyr, [('FID', ogr.OFTReal), ('NAME', ogr.OFTString)]) ###################################################### # Copy in gjpoint.shp dst_feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) src_name = os.path.join('data', gjname + '.shp') shp_ds = ogr.Open(src_name) shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.gjpoint_feat = [] while feat is not None: gdaltest.gjpoint_feat.append(feat) dst_feat.SetFrom(feat) lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() shp_lyr = None lyr = None ds = None return True, dst_name ############################################################################### # Test file-based DS with standalone "Point" feature object. def test_ogr_geojson_2(): ds = ogr.Open('data/point.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('point') assert lyr is not None, 'Missing layer called point' extent = (100.0, 100.0, 0.0, 0.0) rc = validate_layer(lyr, 'point', 1, ogr.wkbPoint, 0, extent) assert rc lyr = None ############################################################################### # Test file-based DS with standalone "LineString" feature object. def test_ogr_geojson_3(): ds = ogr.Open('data/linestring.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('linestring') assert lyr is not None, 'Missing layer called linestring' extent = (100.0, 101.0, 0.0, 1.0) rc = validate_layer(lyr, 'linestring', 1, ogr.wkbLineString, 0, extent) assert rc lyr = None ############################################################################## # Test file-based DS with standalone "Polygon" feature object. def test_ogr_geojson_4(): ds = ogr.Open('data/polygon.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('polygon') assert lyr is not None, 'Missing layer called polygon' extent = (100.0, 101.0, 0.0, 1.0) rc = validate_layer(lyr, 'polygon', 1, ogr.wkbPolygon, 0, extent) assert rc lyr = None ############################################################################## # Test file-based DS with standalone "GeometryCollection" feature object. def test_ogr_geojson_5(): ds = ogr.Open('data/geometrycollection.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('geometrycollection') assert lyr is not None, 'Missing layer called geometrycollection' extent = (100.0, 102.0, 0.0, 1.0) rc = validate_layer(lyr, 'geometrycollection', 1, ogr.wkbGeometryCollection, 0, extent) assert rc lyr = None ############################################################################## # Test file-based DS with standalone "MultiPoint" feature object. def test_ogr_geojson_6(): ds = ogr.Open('data/multipoint.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('multipoint') assert lyr is not None, 'Missing layer called multipoint' extent = (100.0, 101.0, 0.0, 1.0) rc = validate_layer(lyr, 'multipoint', 1, ogr.wkbMultiPoint, 0, extent) assert rc lyr = None ############################################################################## # Test file-based DS with standalone "MultiLineString" feature object. def test_ogr_geojson_7(): ds = ogr.Open('data/multilinestring.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('multilinestring') assert lyr is not None, 'Missing layer called multilinestring' extent = (100.0, 103.0, 0.0, 3.0) rc = validate_layer(lyr, 'multilinestring', 1, ogr.wkbMultiLineString, 0, extent) assert rc lyr = None ############################################################################## # Test file-based DS with standalone "MultiPolygon" feature object. def test_ogr_geojson_8(): ds = ogr.Open('data/multipolygon.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('multipolygon') assert lyr is not None, 'Missing layer called multipolygon' extent = (100.0, 103.0, 0.0, 3.0) rc = validate_layer(lyr, 'multipolygon', 1, ogr.wkbMultiPolygon, 0, extent) assert rc lyr = None ############################################################################## # Test translation of data/gjpoint.shp to GeoJSON file def test_ogr_geojson_9(): tests = [ ['gjpoint', [1], ['Point 1']], ['gjline', [1], ['Line 1']], ['gjpoly', [1], ['Polygon 1']], ['gjmultipoint', [1], ['MultiPoint 1']], ['gjmultiline', [2], ['MultiLine 1']], ['gjmultipoly', [2], ['MultiPoly 1']] ] for test in tests: rc, dstname = copy_shape_to_geojson(test[0]) try: assert rc, ('Failed making copy of ' + test[0] + '.shp') rc = verify_geojson_copy(dstname, test[1], test[2]) assert rc, ('Verification of copy of ' + test[0] + '.shp failed') finally: if dstname: gdal.Unlink(dstname) ############################################################################## # Test translation of data/gjpoint.shp to GZip compressed GeoJSON file def test_ogr_geojson_10(): tests = [ ['gjpoint', [1], ['Point 1']], ['gjline', [1], ['Line 1']], ['gjpoly', [1], ['Polygon 1']], ['gjmultipoint', [1], ['MultiPoint 1']], ['gjmultiline', [2], ['MultiLine 1']], ['gjmultipoly', [2], ['MultiPoly 1']] ] for test in tests: rc, dstname = copy_shape_to_geojson(test[0], '/vsigzip/') try: assert rc, ('Failed making copy of ' + test[0] + '.shp') rc = verify_geojson_copy(dstname, test[1], test[2]) assert rc, ('Verification of copy of ' + test[0] + '.shp failed') finally: if dstname: dstname = dstname[len("/vsigzip/"):] gdal.Unlink(dstname) gdal.Unlink(dstname + ".properties") ############################################################################### def test_ogr_geojson_11(): ds = ogr.Open('data/srs_name.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('srs_name') assert lyr is not None, 'Missing layer called srs_name' extent = (100.0, 102.0, 0.0, 1.0) rc = validate_layer(lyr, 'srs_name', 1, ogr.wkbGeometryCollection, 0, extent) assert rc ref = lyr.GetSpatialRef() pcs = int(ref.GetAuthorityCode('PROJCS')) assert pcs == 26915, 'Spatial reference was not valid' feature = lyr.GetNextFeature() geometry = feature.GetGeometryRef().GetGeometryRef(0) srs = geometry.GetSpatialReference() pcs = int(srs.GetAuthorityCode('PROJCS')) assert pcs == 26916, 'Spatial reference for individual geometry was not valid' lyr = None ############################################################################### # Test DS passed as name with standalone "Point" feature object (#3377) def test_ogr_geojson_12(): if os.name == 'nt': pytest.skip() import test_cli_utilities if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro -al \'{"type": "Point","coordinates": [100.0, 0.0]}\'') assert ret.find(' POINT (100 0)') != -1 ############################################################################### # Test writing to stdout (#3381) def test_ogr_geojson_13(): test = ['gjpoint', [1], ['Point 1']] rc, _ = copy_shape_to_geojson(test[0], '/vsistdout/') assert rc, ('Failed making copy of ' + test[0] + '.shp') ############################################################################### # Test reading & writing various degenerated geometries def test_ogr_geojson_14(): with gdaltest.error_handler(): ds = ogr.Open('data/ogr_geojson_14.geojson') lyr = ds.GetLayer(0) try: out_ds = gdaltest.geojson_drv.CreateDataSource('tmp/out_ogr_geojson_14.geojson') out_lyr = out_ds.CreateLayer('lyr') with gdaltest.error_handler(): for feat in lyr: geom = feat.GetGeometryRef() if geom is not None: # print(geom) out_feat = ogr.Feature(feature_def=out_lyr.GetLayerDefn()) out_feat.SetGeometry(geom) out_lyr.CreateFeature(out_feat) out_ds = None finally: try: os.remove('tmp/out_ogr_geojson_14.geojson') except OSError: pass ############################################################################### # Test Feature.ExportToJson (#3870) def test_ogr_geojson_15(): feature_defn = ogr.FeatureDefn() feature_defn.AddFieldDefn(ogr.FieldDefn("foo")) field_defn = ogr.FieldDefn("boolfield", ogr.OFTInteger) field_defn.SetSubType(ogr.OFSTBoolean) feature_defn.AddFieldDefn(field_defn) feature = ogr.Feature(feature_defn) feature.SetField("foo", "bar") feature.SetField("boolfield", True) feature.SetFID(0) geom = ogr.CreateGeometryFromWkt("POINT(1 2)") feature.SetGeometry(geom) try: out = feature.ExportToJson() except ImportError: pytest.skip() expected_out = """{"geometry": {"type": "Point", "coordinates": [1.0, 2.0]}, "type": "Feature", "properties": {"foo": "bar", "boolfield": true}, "id": 0}""" if out != expected_out: out_json = json.loads(out) expected_out_json = json.loads(expected_out) assert out_json == expected_out_json, out out = feature.ExportToJson(as_object=True) expected_out = {'geometry': {'type': 'Point', 'coordinates': [1.0, 2.0]}, 'type': 'Feature', 'properties': {'foo': 'bar', "boolfield": True}, 'id': 0} assert out == expected_out ############################################################################### # Test reading files with no extension (#4314) def test_ogr_geojson_20(): from glob import glob geojson_files = glob('data/*.json') geojson_files.extend(glob('data/*.geojson')) for gj in geojson_files: # create tmp file with no file extension data = open(gj, 'rb').read() f = gdal.VSIFOpenL('/vsimem/testgj', 'wb') gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.Open('/vsimem/testgj') gdal.PopErrorHandler() if ds is None: print(gj) print(data.decode('LATIN1')) pytest.fail('Failed to open datasource') ds = None gdal.Unlink('/vsimem/testgj') ############################################################################### # Test reading output of geocouch spatiallist def test_ogr_geojson_21(): ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2]}, "properties": {"_id":"aid", "_rev":"arev", "type":"Feature", "properties":{"intvalue" : 2, "floatvalue" : 3.2, "strvalue" : "foo", "properties": { "foo": "bar"}}}}]}""") assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('OGRGeoJSON') feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT (1 2)') if feature.GetFieldAsString("_id") != 'aid' or \ feature.GetFieldAsString("_rev") != 'arev' or \ feature.GetFieldAsInteger("intvalue") != 2 or \ ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Same as ogr_geojson_21 with several features def test_ogr_geojson_22(): ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2]}, "properties": {"_id":"aid", "_rev":"arev", "type":"Feature", "properties":{"intvalue" : 2, "floatvalue" : 3.2, "strvalue" : "foo"}}}, {"type": "Feature", "geometry": {"type":"Point","coordinates":[3,4]}, "properties": {"_id":"aid2", "_rev":"arev2", "type":"Feature", "properties":{"intvalue" : 3.5, "str2value" : "bar"}}}]}""") assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('OGRGeoJSON') feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT (1 2)') if feature.GetFieldAsString("_id") != 'aid' or \ feature.GetFieldAsString("_rev") != 'arev' or \ feature.GetFieldAsDouble("intvalue") != 2 or \ ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT (3 4)') if feature.GetFieldAsString("_id") != 'aid2' or \ feature.GetFieldAsString("_rev") != 'arev2' or \ feature.GetFieldAsDouble("intvalue") != 3.5 or \ feature.GetFieldAsString("str2value") != 'bar' or \ ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Write GeoJSON with bbox and test SRS writing&reading back def test_ogr_geojson_23(): ds = gdaltest.geojson_drv.CreateDataSource('/vsimem/ogr_geojson_23.json') sr = osr.SpatialReference() sr.ImportFromEPSG(4322) lyr = ds.CreateLayer('foo', srs=sr, options=['WRITE_BBOX=YES']) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 10)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2 20)')) lyr.CreateFeature(feat) assert lyr.GetExtent() == (1.0, 2.0, 10.0, 20.0) assert lyr.GetExtent(geom_field=0) == (1.0, 2.0, 10.0, 20.0) assert lyr.GetExtent(geom_field=1, can_return_null=True) is None lyr = None ds = None ds = ogr.Open('/vsimem/ogr_geojson_23.json') lyr = ds.GetLayer(0) sr_got = lyr.GetSpatialRef() ds = None sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) assert sr_got.IsSame(sr), 'did not get expected SRS' fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_23.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_23.json') assert data.find('"bbox": [ 1, 10, 2, 20 ]') != -1, 'did not find global bbox' assert data.find('"bbox": [ 1.0, 10.0, 1.0, 10.0 ]') != -1, \ 'did not find first feature bbox' ############################################################################### # Test alternate form of geojson def test_ogr_geojson_24(): content = """loadGeoJSON({"layerFoo": { "type": "Feature", "geometry": { "type": "Point", "coordinates": [2, 49] }, "name": "bar" }, "layerBar": { "type": "FeatureCollection", "features" : [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [2, 49] }, "other_name": "baz" }]}})""" for i in range(2): if i == 0: ds = ogr.Open(content) else: gdal.FileFromMemBuffer('/vsimem/ogr_geojson_24.js', content) ds = ogr.Open('/vsimem/ogr_geojson_24.js') gdal.Unlink('/vsimem/ogr_geojson_24.js') assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('layerFoo') assert lyr is not None, 'cannot find layer' feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT (2 49)') if feature.GetFieldAsString("name") != 'bar' or \ ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() lyr = ds.GetLayerByName('layerBar') assert lyr is not None, 'cannot find layer' feature = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POINT (2 49)') if feature.GetFieldAsString("other_name") != 'baz' or \ ogrtest.check_feature_geometry(feature, ref_geom) != 0: feature.DumpReadable() pytest.fail() ds = None ############################################################################### # Test TopoJSON def test_ogr_geojson_25(): ds = ogr.Open('data/topojson1.topojson') lyr = ds.GetLayer(0) assert lyr.GetName() == 'a_layer' feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'LINESTRING (100 1000,110 1000,110 1100)') == 0 lyr = ds.GetLayer(1) assert lyr.GetName() == 'TopoJSON' expected_results = [ (None, None, 'POINT EMPTY'), (None, None, 'POINT EMPTY'), (None, None, 'POINT EMPTY'), (None, None, 'POINT (100 1010)'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, None, 'LINESTRING EMPTY'), (None, '0', 'LINESTRING EMPTY'), (None, 'foo', 'LINESTRING EMPTY'), ('1', None, 'LINESTRING (100 1000,110 1000,110 1100)'), ('2', None, 'LINESTRING (110 1100,110 1000,100 1000)'), (None, None, 'POLYGON EMPTY'), (None, None, 'POLYGON EMPTY'), (None, None, 'POLYGON EMPTY'), (None, None, 'POLYGON ((100 1000,110 1000,110 1100,100 1100,100 1000),(101 1010,101 1090,109 1090,109 1010,101 1010))'), (None, None, 'POLYGON ((110 1100,110 1000,100 1000,100 1100,110 1100),(101 1010,109 1010,109 1090,101 1090,101 1010))'), (None, None, 'MULTIPOINT EMPTY'), (None, None, 'MULTIPOINT EMPTY'), (None, None, 'MULTIPOINT EMPTY'), (None, None, 'MULTIPOINT EMPTY'), (None, None, 'MULTIPOINT (100 1010,101 1020)'), (None, None, 'MULTIPOLYGON EMPTY'), (None, None, 'MULTIPOLYGON EMPTY'), (None, None, 'MULTIPOLYGON EMPTY'), (None, None, 'MULTIPOLYGON (((110 1100,110 1000,100 1000,100 1100,110 1100)),((101 1010,109 1010,109 1090,101 1090,101 1010)))'), (None, None, 'MULTILINESTRING EMPTY'), (None, None, 'MULTILINESTRING EMPTY'), (None, None, 'MULTILINESTRING ((100 1000,110 1000,110 1100))'), (None, None, 'MULTILINESTRING ((100 1000,110 1000,110 1100,100 1100,100 1000))'), (None, None, 'MULTILINESTRING ((100 1000,110 1000,110 1100,100 1100,100 1000),(101 1010,101 1090,109 1090,109 1010,101 1010))'), ] assert lyr.GetFeatureCount() == len(expected_results) for i, exp_result in enumerate(expected_results): feat = lyr.GetNextFeature() if feat.GetField('id') != exp_result[0] or \ feat.GetField('name') != exp_result[1] or \ feat.GetGeometryRef().ExportToWkt() != exp_result[2]: feat.DumpReadable() print(exp_result) print(feat.GetField('name')) pytest.fail('failure at feat index %d' % i) ds = None ds = ogr.Open('data/topojson2.topojson') lyr = ds.GetLayer(0) assert lyr.GetName() == 'a_layer' feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'LINESTRING (100 1000,110 1000,110 1100)') == 0 lyr = ds.GetLayer(1) assert lyr.GetName() == 'TopoJSON' feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'LINESTRING (100 1000,110 1000,110 1100)') == 0 ds = None ds = ogr.Open('data/topojson3.topojson') lyr = ds.GetLayer(0) assert lyr.GetName() == 'a_layer' feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'LINESTRING (0 0,10 0,0 10,10 0,0 0)') == 0 lyr = ds.GetLayer(1) assert lyr.GetName() == 'TopoJSON' feat = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(feat, 'LINESTRING (0 0,10 0,0 10,10 0,0 0)') == 0 ds = None ############################################################################### # Test 64bit support def test_ogr_geojson_26(): ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "id": 1, "geometry": {"type":"Point","coordinates":[1,2]}, "properties": { "intvalue" : 1, "int64" : 1234567890123, "intlist" : [1] }}, {"type": "Feature", "id": 1234567890123, "geometry": {"type":"Point","coordinates":[3,4]}, "properties": { "intvalue" : 1234567890123, "intlist" : [1, 1234567890123] }}, ]}""") assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('OGRGeoJSON') assert lyr.GetMetadataItem(ogr.OLMD_FID64) is not None feature = lyr.GetNextFeature() if feature.GetFID() != 1: feature.DumpReadable() pytest.fail() if feature.GetField("intvalue") != 1: feature.DumpReadable() pytest.fail() if feature.GetField("int64") != 1234567890123: feature.DumpReadable() pytest.fail() feature = lyr.GetNextFeature() if feature.GetFID() != 1234567890123: feature.DumpReadable() pytest.fail() if feature.GetField("intvalue") != 1234567890123: feature.DumpReadable() pytest.fail() if feature.GetField("intlist") != [1, 1234567890123]: feature.DumpReadable() pytest.fail() lyr = None ds = None ds = gdaltest.geojson_drv.CreateDataSource('/vsimem/ogr_geojson_26.json') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('int64', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('int64list', ogr.OFTInteger64List)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetFID(1234567890123) f.SetField(0, 1234567890123) f.SetFieldInteger64List(1, [1234567890123]) lyr.CreateFeature(f) f = None ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_26.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_26.json') assert '{ "type": "Feature", "id": 1234567890123, "properties": { "int64": 1234567890123, "int64list": [ 1234567890123 ] }, "geometry": null }' in data ############################################################################### # Test workaround for 64bit values (returned as strings) def test_ogr_geojson_27(): gdal.PushErrorHandler('CPLQuietErrorHandler') # Warning 1: Integer values probably ranging out of 64bit integer range # have been found. Will be clamped to INT64_MIN/INT64_MAX ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2]}, "properties": { "intvalue" : 1 }}, {"type": "Feature", "geometry": {"type":"Point","coordinates":[3,4]}, "properties": { "intvalue" : 12345678901231234567890123 }}, ]}""") gdal.PopErrorHandler() assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('OGRGeoJSON') feature = lyr.GetNextFeature() if feature.GetField("intvalue") != 1: feature.DumpReadable() pytest.fail() feature = lyr.GetNextFeature() if feature.GetField("intvalue") != 9223372036854775807: feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test handling of huge coordinates (#5377) def test_ogr_geojson_35(): ds = gdaltest.geojson_drv.CreateDataSource('/vsimem/ogr_geojson_35.json') lyr = ds.CreateLayer('foo') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1) geom = ogr.Geometry(ogr.wkbPoint) geom.AddPoint_2D(-1.79769313486231571e+308, -1.79769313486231571e+308) feat.SetGeometry(geom) lyr.CreateFeature(feat) gdal.PushErrorHandler('CPLQuietErrorHandler') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(2) geom = ogr.Geometry(ogr.wkbPoint) geom.AddPoint(-1.7e308 * 2, 1.7e308 * 2, 1.7e308 * 2) # evaluates to -inf, inf feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(3) geom = ogr.Geometry(ogr.wkbLineString) geom.AddPoint_2D(0, 0) geom.AddPoint_2D(-1.7e308 * 2, 1.7e308 * 2) # evaluates to -inf, inf feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(4) geom = ogr.Geometry(ogr.wkbPolygon) geom2 = ogr.Geometry(ogr.wkbLinearRing) geom2.AddPoint_2D(0, 0) geom2.AddPoint_2D(-1.7e308 * 2, 1.7e308 * 2) # evaluates to -inf, inf geom.AddGeometry(geom2) feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(5) geom = ogr.Geometry(ogr.wkbMultiPoint) geom2 = ogr.Geometry(ogr.wkbPoint) geom2.AddPoint_2D(0, 0) geom2 = ogr.Geometry(ogr.wkbPoint) geom2.AddPoint_2D(-1.7e308 * 2, 1.7e308 * 2) # evaluates to -inf, inf geom.AddGeometry(geom2) feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(6) geom = ogr.Geometry(ogr.wkbMultiLineString) geom2 = ogr.Geometry(ogr.wkbLineString) geom2.AddPoint_2D(0, 0) geom2 = ogr.Geometry(ogr.wkbLineString) geom2.AddPoint_2D(-1.7e308 * 2, 1.7e308 * 2) # evaluates to -inf, inf geom.AddGeometry(geom2) feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(7) geom = ogr.Geometry(ogr.wkbMultiPolygon) geom2 = ogr.Geometry(ogr.wkbPolygon) geom3 = ogr.Geometry(ogr.wkbLinearRing) geom3.AddPoint_2D(0, 0) geom2.AddGeometry(geom3) geom2 = ogr.Geometry(ogr.wkbPolygon) geom3 = ogr.Geometry(ogr.wkbLinearRing) geom3.AddPoint_2D(-1.7e308 * 2, 1.7e308 * 2) # evaluates to -inf, inf geom2.AddGeometry(geom3) geom.AddGeometry(geom2) feat.SetGeometry(geom) lyr.CreateFeature(feat) gdal.PopErrorHandler() ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_35.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_35.json') assert '-1.79' in data and 'e+308' in data for ident in range(2, 8): assert data.find('{ "type": "Feature", "id": %d, "properties": { }, "geometry": null }' % ident) != -1 ############################################################################### # Test reading file with UTF-8 BOM (which is supposed to be illegal in JSON...) (#5630) def test_ogr_geojson_36(): ds = ogr.Open('data/point_with_utf8bom.json') assert ds is not None, 'Failed to open datasource' ds = None ######################################################################### # Test boolean type support def test_ogr_geojson_37(): # Test read support ds = ogr.Open("""{"type": "FeatureCollection","features": [ { "type": "Feature", "properties": { "bool" : false, "not_bool": false, "bool_list" : [false, true], "notbool_list" : [false, 3]}, "geometry": null }, { "type": "Feature", "properties": { "bool" : true, "not_bool": 2, "bool_list" : [true] }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert (feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('bool')).GetType() == ogr.OFTInteger and \ feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('bool')).GetSubType() == ogr.OFSTBoolean) assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('not_bool')).GetSubType() == ogr.OFSTNone assert (feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('bool_list')).GetType() == ogr.OFTIntegerList and \ feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('bool_list')).GetSubType() == ogr.OFSTBoolean) assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('notbool_list')).GetSubType() == ogr.OFSTNone f = lyr.GetNextFeature() if f.GetField('bool') != 0 or f.GetField('bool_list') != [0, 1]: f.DumpReadable() pytest.fail() out_ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_37.json') out_lyr = out_ds.CreateLayer('test') for i in range(feat_defn.GetFieldCount()): out_lyr.CreateField(feat_defn.GetFieldDefn(i)) out_f = ogr.Feature(out_lyr.GetLayerDefn()) out_f.SetFrom(f) out_lyr.CreateFeature(out_f) out_ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_37.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_37.json') assert '"bool": false, "not_bool": 0, "bool_list": [ false, true ], "notbool_list": [ 0, 3 ]' in data ############################################################################### # Test datetime/date/time type support def test_ogr_geojson_38(): # Test read support ds = gdal.OpenEx("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "dt": "2014-11-20 12:34:56+0100", "dt2": "2014\/11\/20", "date":"2014\/11\/20", "time":"12:34:56", "no_dt": "2014-11-20 12:34:56+0100", "no_dt2": "2014-11-20 12:34:56+0100" }, "geometry": null }, { "type": "Feature", "properties": { "dt": "2014\/11\/20", "dt2": "2014\/11\/20T12:34:56Z", "date":"2014-11-20", "time":"12:34:56", "no_dt": "foo", "no_dt2": 1 }, "geometry": null } ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('dt')).GetType() == ogr.OFTDateTime assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('dt2')).GetType() == ogr.OFTDateTime assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('date')).GetType() == ogr.OFTDate assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('time')).GetType() == ogr.OFTTime assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('no_dt')).GetType() == ogr.OFTString assert feat_defn.GetFieldDefn(feat_defn.GetFieldIndex('no_dt2')).GetType() == ogr.OFTString f = lyr.GetNextFeature() if f.GetField('dt') != '2014/11/20 12:34:56+01' or f.GetField('dt2') != '2014/11/20 00:00:00' or \ f.GetField('date') != '2014/11/20' or f.GetField('time') != '12:34:56': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetField('dt') != '2014/11/20 00:00:00' or f.GetField('dt2') != '2014/11/20 12:34:56+00' or \ f.GetField('date') != '2014/11/20' or f.GetField('time') != '12:34:56': f.DumpReadable() pytest.fail() tmpfilename = '/vsimem/out.json' gdal.VectorTranslate(tmpfilename, ds, options = '-lco NATIVE_DATA=dummy') # dummy NATIVE_DATA so that input values are not copied directly fp = gdal.VSIFOpenL(tmpfilename, 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink(tmpfilename) assert '"dt": "2014-11-20T12:34:56+01:00", "dt2": "2014-11-20T00:00:00", "date": "2014-11-20", "time": "12:34:56"' in data, data ds = gdal.OpenEx("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "dt": "2014-11-20 12:34:56+0100", "dt2": "2014\/11\/20", "date":"2014\/11\/20", "time":"12:34:56", "no_dt": "2014-11-20 12:34:56+0100", "no_dt2": "2014-11-20 12:34:56+0100" }, "geometry": null } ] }""", open_options = ['DATE_AS_STRING=YES']) lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() for i in range(feat_defn.GetFieldCount()): assert feat_defn.GetFieldDefn(i).GetType() == ogr.OFTString ############################################################################### # Test id top-object level def test_ogr_geojson_39(): ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : "foo", "properties": { "bar" : "baz" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTString feat = lyr.GetNextFeature() if feat.GetField('id') != 'foo' or feat.GetField('bar') != 'baz': feat.DumpReadable() pytest.fail() # Crazy case: properties.id has the precedence because we arbitrarily decided that... ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : "foo", "properties": { "id" : 6 }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTInteger feat = lyr.GetNextFeature() if feat.GetField('id') != 6: feat.DumpReadable() pytest.fail() # Same with 2 features ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : "foo", "properties": { "id" : 6 }, "geometry": null }, { "type": "Feature", "id" : "bar", "properties": { "id" : 7 }, "geometry": null } ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTInteger feat = lyr.GetNextFeature() if feat.GetField('id') != 6: feat.DumpReadable() pytest.fail() # Crazy case: properties.id has the precedence because we arbitrarily decided that... ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : "foo", "properties": { "id" : "baz" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTString feat = lyr.GetNextFeature() if feat.GetField('id') != 'baz': feat.DumpReadable() pytest.fail() # id and properties.ID (#6538) ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : 1, "properties": { "ID": 2 }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'ID' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTInteger feat = lyr.GetNextFeature() if feat.GetFID() != 1 or feat.GetField('ID') != 2: feat.DumpReadable() pytest.fail() # Test handling of duplicated id gdal.ErrorReset() with gdaltest.error_handler(): ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : 1, "properties": { "foo": "bar" }, "geometry": null }, { "type": "Feature", "id" : 1, "properties": { "foo": "baz" }, "geometry": null }, { "type": "Feature", "id" : 2, "properties": { "foo": "baw" }, "geometry": null } ] }""") assert gdal.GetLastErrorMsg() != '', 'expected warning' lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() feat = lyr.GetNextFeature() if feat.GetFID() != 1 or feat.GetField('foo') != 'bar': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFID() != 2 or feat.GetField('foo') != 'baz': feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFID() != 3 or feat.GetField('foo') != 'baw': feat.DumpReadable() pytest.fail() # negative id ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : -1, "properties": { "foo": "bar" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTInteger feat = lyr.GetNextFeature() if feat.GetField('id') != -1: feat.DumpReadable() pytest.fail() # negative id 64bit ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : -1234567890123, "properties": { "foo": "bar" }, "geometry": null }, { "type": "Feature", "id" : -2, "properties": { "foo": "baz" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTInteger64 feat = lyr.GetNextFeature() if feat.GetField('id') != -1234567890123: feat.DumpReadable() pytest.fail() # negative id ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : -2, "properties": { "foo": "baz" }, "geometry": null }, { "type": "Feature", "id" : -1234567890123, "properties": { "foo": "bar" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTInteger64 feat = lyr.GetNextFeature() if feat.GetField('id') != -2: feat.DumpReadable() pytest.fail() # positive and then negative id ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : 1, "properties": { "foo": "baz" }, "geometry": null }, { "type": "Feature", "id" : -1, "properties": { "foo": "bar" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(1).GetName() == 'id' and feat_defn.GetFieldDefn(1).GetType() == ogr.OFTInteger feat = lyr.GetNextFeature() if feat.GetField('id') != 1: feat.DumpReadable() pytest.fail() # mix of int and string id ds = ogr.Open("""{"type": "FeatureCollection", "features": [ { "type": "Feature", "id" : -2, "properties": { "foo": "baz" }, "geometry": null }, { "type": "Feature", "id" : "str", "properties": { "foo": "bar" }, "geometry": null }, { "type": "Feature", "id" : -3, "properties": { "foo": "baz" }, "geometry": null }, ] }""") lyr = ds.GetLayer(0) feat_defn = lyr.GetLayerDefn() assert feat_defn.GetFieldDefn(0).GetName() == 'id' and feat_defn.GetFieldDefn(0).GetType() == ogr.OFTString feat = lyr.GetNextFeature() if feat.GetField('id') != '-2': feat.DumpReadable() pytest.fail() ############################################################################### # Test nested attributes def test_ogr_geojson_40(): ds = gdal.OpenEx("""{ "type": "FeatureCollection", "features" : [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 2, 49 ] }, "properties": { "a_property": 1, "some_object": { "a_property": 1, "another_property": 2 } } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 2, 49 ] }, "properties": { "a_property": "foo", "some_object": { "a_property": 1, "another_property": 2.34 } } } ] }""", gdal.OF_VECTOR, open_options=['FLATTEN_NESTED_ATTRIBUTES=YES', 'NESTED_ATTRIBUTE_SEPARATOR=.']) lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() if feat.GetField('a_property') != 'foo' or feat.GetField('some_object.a_property') != 1 or \ feat.GetField('some_object.another_property') != 2.34: feat.DumpReadable() pytest.fail() ############################################################################### # Test ogr.CreateGeometryFromJson() def test_ogr_geojson_41(): # Check that by default we return a WGS 84 SRS g = ogr.CreateGeometryFromJson("{ 'type': 'Point', 'coordinates' : [ 2, 49] }") assert g.ExportToWkt() == 'POINT (2 49)' srs = g.GetSpatialReference() g = None assert srs.ExportToWkt().find('WGS 84') >= 0 # But if a crs object is set (allowed originally, but not recommended!), we use it g = ogr.CreateGeometryFromJson('{ "type": "Point", "coordinates" : [ 2, 49], "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::4322" } } }') srs = g.GetSpatialReference() assert srs.ExportToWkt().find('4322') >= 0 # But if a crs object is set to null, set no crs g = ogr.CreateGeometryFromJson('{ "type": "Point", "coordinates" : [ 2, 49], "crs": null }') srs = g.GetSpatialReference() assert not srs ############################################################################### # Test Feature without geometry def test_ogr_geojson_43(): ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "properties": {"foo": "bar"}}]}""") assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('OGRGeoJSON') feature = lyr.GetNextFeature() if feature.GetFieldAsString("foo") != 'bar': feature.DumpReadable() pytest.fail() lyr = None ds = None ############################################################################### # Test null Feature (#6166) def test_ogr_geojson_44(): with gdaltest.error_handler(): ogr.Open("""{"type": "FeatureCollection", "features":[ null ]}""") ############################################################################### # Test native data support def test_ogr_geojson_45(): # Test read support content = """{"type": "FeatureCollection", "foo": "bar", "bar": "baz", "features":[ { "type": "Feature", "foo": ["bar", "baz", 1.0, true, false,[],{}], "properties": { "myprop": "myvalue" }, "geometry": null } ]}""" for i in range(2): if i == 0: ds = gdal.OpenEx(content, gdal.OF_VECTOR, open_options=['NATIVE_DATA=YES']) else: gdal.FileFromMemBuffer('/vsimem/ogr_geojson_45.json', content) ds = gdal.OpenEx('/vsimem/ogr_geojson_45.json', gdal.OF_VECTOR, open_options=['NATIVE_DATA=YES']) lyr = ds.GetLayer(0) native_data = lyr.GetMetadataItem("NATIVE_DATA", "NATIVE_DATA") assert native_data == '{ "foo": "bar", "bar": "baz" }' native_media_type = lyr.GetMetadataItem("NATIVE_MEDIA_TYPE", "NATIVE_DATA") assert native_media_type == 'application/vnd.geo+json' f = lyr.GetNextFeature() native_data = f.GetNativeData() if i == 0: expected = [ '{ "type": "Feature", "foo": [ "bar", "baz", 1.000000, true, false, [ ], { } ], "properties": { "myprop": "myvalue" }, "geometry": null }', '{ "type": "Feature", "foo": [ "bar", "baz", 1.0, true, false, [ ], { } ], "properties": { "myprop": "myvalue" }, "geometry": null }'] else: expected = ['{"type":"Feature","foo":["bar","baz",1.0,true,false,[],{}],"properties":{"myprop":"myvalue"},"geometry":null}'] assert native_data in expected native_media_type = f.GetNativeMediaType() assert native_media_type == 'application/vnd.geo+json' ds = None if i == 1: gdal.Unlink('/vsimem/ogr_geojson_45.json') ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_45.json') lyr = ds.CreateLayer('test', options=[ 'NATIVE_DATA={ "type": "ignored", "bbox": [ 0, 0, 0, 0 ], "foo": "bar", "bar": "baz", "features": "ignored" }', 'NATIVE_MEDIA_TYPE=application/vnd.geo+json']) f = ogr.Feature(lyr.GetLayerDefn()) json_geom = """{ "type": "GeometryCollection", "foo_gc": "bar_gc", "geometries" : [ { "type": "Point", "foo_point": "bar_point", "coordinates": [0,1,2, 3] }, { "type": "LineString", "foo_linestring": "bar_linestring", "coordinates": [[0,1,2, 4]] }, { "type": "MultiPoint", "foo_multipoint": "bar_multipoint", "coordinates": [[0,1,2, 5]] }, { "type": "MultiLineString", "foo_multilinestring": "bar_multilinestring", "coordinates": [[[0,1,2, 6]]] }, { "type": "Polygon", "foo_polygon": "bar_polygon", "coordinates": [[[0,1,2, 7]]] }, { "type": "MultiPolygon", "foo_multipolygon": "bar_multipolygon", "coordinates": [[[[0,1,2, 8]]]] } ] }""" f.SetNativeData('{ "type": "ignored", "bbox": "ignored", "properties" : "ignored", "foo_feature": "bar_feature", "geometry": %s }' % json_geom) f.SetNativeMediaType('application/vnd.geo+json') f.SetGeometry(ogr.CreateGeometryFromJson(json_geom)) lyr.CreateFeature(f) ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_45.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_45.json') assert ('"bbox": [ 0, 1, 2, 0, 1, 2 ],' in data and \ '"foo": "bar"' in data and '"bar": "baz"' in data and \ '"foo_feature": "bar_feature"' in data and \ '"foo_gc": "bar_gc"' in data and \ '"foo_point": "bar_point"' in data and '3' in data and \ '"foo_linestring": "bar_linestring"' in data and '4' in data and \ '"foo_multipoint": "bar_multipoint"' in data and '5' in data and \ '"foo_multilinestring": "bar_multilinestring"' in data and '6' in data and \ '"foo_polygon": "bar_polygon"' in data and '7' in data and \ '"foo_multipolygon": "bar_multipolygon"' in data and '8' in data) # Test native support with string id src_ds = gdal.OpenEx("""{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "foobarbaz", "properties": {}, "geometry": null } ] } """, open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON') got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "foobarbaz", "properties": { }, "geometry": null } ] } """ assert json.loads(got) == json.loads(expected) # Test native support with numeric id src_ds = gdal.OpenEx("""{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 1234657890123, "properties": {}, "geometry": null } ] } """, open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON') got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 1234657890123, "properties": { }, "geometry": null } ] } """ assert json.loads(got) == json.loads(expected) ############################################################################### # Test that writing JSon content as value of a string field is serialized as it def test_ogr_geojson_46(): ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_46.json') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('myprop')) f = ogr.Feature(lyr.GetLayerDefn()) f['myprop'] = '{ "a": "b" }' lyr.CreateFeature(f) ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_46.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_46.json') assert '{ "myprop": { "a": "b" } }' in data ############################################################################### # Test update support def test_ogr_geojson_47(): # ERROR 6: Update from inline definition not supported with gdaltest.error_handler(): ds = ogr.Open('{"type": "FeatureCollection", "features":[]}', update=1) assert ds is None gdal.FileFromMemBuffer('/vsimem/ogr_geojson_47.json', """{"type": "FeatureCollection", "foo": "bar", "features":[ { "type": "Feature", "bar": "baz", "properties": { "myprop": "myvalue" }, "geometry": null } ]}""") # Test read support ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() f.SetField("myprop", "another_value") lyr.SetFeature(f) ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_47.json', 'rb') if fp is not None: data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) else: data = None # we don't want crs if there's no in the source assert ('"foo": "bar"' in data and '"bar": "baz"' in data and \ 'crs' not in data and \ '"myprop": "another_value"' in data) # Test append support ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(f) if f.GetFID() != 1: f.DumpReadable() pytest.fail() f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2 3)')) lyr.CreateFeature(f) f = lyr.GetNextFeature() if f.GetFID() != 0: f.DumpReadable() pytest.fail() ds = None # Test append support ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(4 5)')) lyr.CreateFeature(f) f.SetField("myprop", "value_of_point_4_5") lyr.SetFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_geojson_47.json') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 4 ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_47.json', 'rb') if fp is not None: data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) else: data = None # we don't want crs if there's no in the source assert ('"foo": "bar"' in data and '"bar": "baz"' in data and \ 'crs' not in data and \ '"myprop": "another_value"' in data and \ '"myprop": "value_of_point_4_5"' in data and \ 'id' not in data) gdal.Unlink('/vsimem/ogr_geojson_47.json') # Test appending to empty features array gdal.FileFromMemBuffer('/vsimem/ogr_geojson_47.json', """{ "type": "FeatureCollection", "features": []}""") ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_geojson_47.json') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ds = None # Test appending to array ending with non feature gdal.FileFromMemBuffer('/vsimem/ogr_geojson_47.json', """{ "type": "FeatureCollection", "features": [ null ]}""") ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_geojson_47.json') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ds = None # Test appending to feature collection not ending with "features" gdal.FileFromMemBuffer('/vsimem/ogr_geojson_47.json', """{ "type": "FeatureCollection", "features": [], "something": "else"}""") ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_geojson_47.json') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_47.json', 'rb') if fp is not None: data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) else: data = None assert 'something' in data with gdaltest.config_option('OGR_GEOJSON_REWRITE_IN_PLACE', 'YES'): # Test appending to feature collection with "bbox" gdal.FileFromMemBuffer('/vsimem/ogr_geojson_47.json', """{ "type": "FeatureCollection", "bbox": [0,0,0,0], "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [0,0]} } ]}""") ds = ogr.Open('/vsimem/ogr_geojson_47.json', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_geojson_47.json') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_47.json', 'rb') if fp is not None: data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) else: data = None assert 'bbox' in data gdal.Unlink('/vsimem/ogr_geojson_47.json') ############################################################################### # Test update support with file that has a single feature not in a FeatureCollection def test_ogr_geojson_48(): gdal.FileFromMemBuffer('/vsimem/ogr_geojson_48.json', """{ "type": "Feature", "bar": "baz", "bbox": [2,49,2,49], "properties": { "myprop": "myvalue" }, "geometry": {"type": "Point", "coordinates": [ 2, 49]} }""") # Test read support ds = ogr.Open('/vsimem/ogr_geojson_48.json', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() f.SetField("myprop", "another_value") f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (3 50)')) lyr.SetFeature(f) ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_48.json', 'rb') if fp is not None: data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) else: data = None gdal.Unlink('/vsimem/ogr_geojson_48.json') # we don't want crs if there's no in the source assert ('"bar": "baz"' in data and \ '"bbox": [ 3.0, 50.0, 3.0, 50.0 ]' in data and \ 'crs' not in data and \ 'FeatureCollection' not in data and \ '"myprop": "another_value"' in data) ############################################################################### # Test ARRAY_AS_STRING def test_ogr_geojson_49(): gdal.FileFromMemBuffer('/vsimem/ogr_geojson_49.json', """{ "type": "Feature", "properties": { "foo": ["bar"] }, "geometry": null }""") # Test read support ds = gdal.OpenEx('/vsimem/ogr_geojson_49.json', open_options=['ARRAY_AS_STRING=YES']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTString f = lyr.GetNextFeature() if f['foo'] != '[ "bar" ]': f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/ogr_geojson_49.json') ############################################################################### # Test that we serialize floating point values with enough significant figures def test_ogr_geojson_50(): ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_50.json') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('val', ogr.OFTReal)) f = ogr.Feature(lyr.GetLayerDefn()) f['val'] = 1.23456789012456 lyr.CreateFeature(f) # To test smart rounding f = ogr.Feature(lyr.GetLayerDefn()) f['val'] = 5268.813 lyr.CreateFeature(f) f = None ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_50.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_50.json') assert '1.23456789012456' in data or '5268.813 ' in data # If SIGNIFICANT_FIGURES is explicitly specified, and COORDINATE_PRECISION not, # then it also applies to coordinates ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_50.json') lyr = ds.CreateLayer('test', options=['SIGNIFICANT_FIGURES=17']) lyr.CreateField(ogr.FieldDefn('val', ogr.OFTReal)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (0.0000123456789012456 0)')) lyr.CreateFeature(f) f = None ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_50.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_50.json') assert '1.23456789012456' in data or '-5' in data # If SIGNIFICANT_FIGURES is explicitly specified, and COORDINATE_PRECISION too, # then SIGNIFICANT_FIGURES only applies to non-coordinates floating point values. ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_50.json') lyr = ds.CreateLayer('test', options=['COORDINATE_PRECISION=15', 'SIGNIFICANT_FIGURES=17']) lyr.CreateField(ogr.FieldDefn('val', ogr.OFTReal)) f = ogr.Feature(lyr.GetLayerDefn()) f['val'] = 1.23456789012456 f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (0.0000123456789012456 0)')) lyr.CreateFeature(f) f = None ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_50.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_50.json') assert '0.00001234' in data and '1.23456789012456' in data ############################################################################### # Test writing empty geometries def test_ogr_geojson_51(): ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_51.json') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('id', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 1 f.SetGeometry(ogr.CreateGeometryFromWkt('POINT EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 2 f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 3 f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 4 f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 5 f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 6 f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['id'] = 7 f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION EMPTY')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_51.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_51.json') assert '{ "id": 1 }, "geometry": null' in data assert '{ "id": 2 }, "geometry": { "type": "LineString", "coordinates": [ ] } }' in data assert '{ "id": 3 }, "geometry": { "type": "Polygon", "coordinates": [ ] } }' in data assert '{ "id": 4 }, "geometry": { "type": "MultiPoint", "coordinates": [ ] } }' in data assert '{ "id": 5 }, "geometry": { "type": "MultiLineString", "coordinates": [ ] } }' in data assert '{ "id": 6 }, "geometry": { "type": "MultiPolygon", "coordinates": [ ] } }' in data assert '{ "id": 7 }, "geometry": { "type": "GeometryCollection", "geometries": [ ] } }' in data ############################################################################### # Test NULL type detection def test_ogr_geojson_52(): ds = ogr.Open('data/nullvalues.geojson') assert ds is not None, 'Failed to open datasource' assert ds.GetLayerCount() == 1, 'Wrong number of layers' lyr = ds.GetLayerByName('nullvalues') assert lyr is not None, 'Missing layer called nullvalues' fld = lyr.GetLayerDefn().GetFieldDefn(0) assert fld.GetNameRef() == 'int' assert fld.GetType() == ogr.OFTInteger fld = lyr.GetLayerDefn().GetFieldDefn(1) assert fld.GetNameRef() == 'string' assert fld.GetType() == ogr.OFTString fld = lyr.GetLayerDefn().GetFieldDefn(2) assert fld.GetNameRef() == 'double' assert fld.GetType() == ogr.OFTReal ############################################################################### # Test that M is ignored (this is a test of OGRLayer::CreateFeature() actually) def test_ogr_geojson_53(): ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_53.json') lyr = ds.CreateLayer('test') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT ZM (1 2 3 4)')) lyr.CreateFeature(f) ds = None fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_53.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_53.json') assert '{ "type": "Point", "coordinates": [ 1.0, 2.0, 3.0 ] }' in data ############################################################################### # Test NULL type detection when first value is null def test_ogr_geojson_54(): ds = ogr.Open("""{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "int": null, "string": null, "double": null, "dt" : null, "boolean": null, "null": null }, "geometry": null }, { "type": "Feature", "properties": { "int": 168, "string": "string", "double": 1.23, "dt" : "2016-05-18T12:34:56Z", "boolean": true }, "geometry": null } ] } """) lyr = ds.GetLayer(0) fld = lyr.GetLayerDefn().GetFieldDefn(0) assert fld.GetType() == ogr.OFTInteger fld = lyr.GetLayerDefn().GetFieldDefn(1) assert fld.GetType() == ogr.OFTString fld = lyr.GetLayerDefn().GetFieldDefn(2) assert fld.GetType() == ogr.OFTReal fld = lyr.GetLayerDefn().GetFieldDefn(3) assert fld.GetType() == ogr.OFTDateTime fld = lyr.GetLayerDefn().GetFieldDefn(4) assert fld.GetType() == ogr.OFTInteger assert fld.GetSubType() == ogr.OFSTBoolean assert fld.GetWidth() == 1 fld = lyr.GetLayerDefn().GetFieldDefn(5) assert fld.GetType() == ogr.OFTString ############################################################################### # Test RFC 7946 def read_file(filename): f = gdal.VSIFOpenL(filename, "rb") if f is None: return None content = gdal.VSIFReadL(1, 10000, f).decode('UTF-8') gdal.VSIFCloseL(f) return content def test_ogr_geojson_55(): # Basic test for standard bbox and coordinate truncation gdal.VectorTranslate('/vsimem/out.json', """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 123, "properties": {}, "geometry": { "type": "Point", "coordinates": [2.123456789, 49] } }, { "type": "Feature", "id": 124, "properties": {}, "geometry": { "type": "Point", "coordinates": [3, 50] } } ] }""", options='-f GeoJSON -lco RFC7946=YES -lco WRITE_BBOX=YES -preserve_fid') got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 2.1234568, 49.0000000, 3.0000000, 50.0000000 ], "features": [ { "type": "Feature", "id": 123, "properties": { }, "bbox": [ 2.1234568, 49.0, 2.1234568, 49.0 ], "geometry": { "type": "Point", "coordinates": [ 2.1234568, 49.0 ] } }, { "type": "Feature", "id": 124, "properties": { }, "bbox": [ 3.0, 50.0, 3.0, 50.0 ], "geometry": { "type": "Point", "coordinates": [ 3.0, 50.0 ] } } ] } """ assert json.loads(got) == json.loads(expected) # Test polygon winding order gdal.VectorTranslate('/vsimem/out.json', """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[2,49],[3,49],[3,50],[2,50],[2,49]],[[2.1,49.1],[2.1,49.9],[2.9,49.9],[2.9,49.1],[2.1,49.1]]] } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[2,49],[2,50],[3,50],[3,49],[2,49]],[[2.1,49.1],[2.9,49.1],[2.9,49.9],[2.1,49.9],[2.1,49.1]]] } }, ] } """, format='GeoJSON', layerCreationOptions=['RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 2.0000000, 49.0000000, 3.0000000, 50.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 2.0, 49.0, 3.0, 50.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 2.0, 49.0 ], [ 3.0, 49.0 ], [ 3.0, 50.0 ], [ 2.0, 50.0 ], [ 2.0, 49.0 ] ], [ [ 2.1, 49.1 ], [ 2.1, 49.9 ], [ 2.9, 49.9 ], [ 2.9, 49.1 ], [ 2.1, 49.1 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 2.0, 49.0, 3.0, 50.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 2.0, 49.0 ], [ 3.0, 49.0 ], [ 3.0, 50.0 ], [ 2.0, 50.0 ], [ 2.0, 49.0 ] ], [ [ 2.1, 49.1 ], [ 2.1, 49.9 ], [ 2.9, 49.9 ], [ 2.9, 49.1 ], [ 2.1, 49.1 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Test foreign member src_ds = gdal.OpenEx("""{ "type": "FeatureCollection", "coordinates": "should not be found in output", "geometries": "should not be found in output", "geometry": "should not be found in output", "properties": "should not be found in output", "valid": "should be in output", "crs": "should not be found in output", "bbox": [0,0,0,0], "features": [ { "type": "Feature", "id": ["not expected as child of features"], "coordinates": "should not be found in output", "geometries": "should not be found in output", "features": "should not be found in output", "valid": "should be in output", "properties": { "foo": "bar" }, "geometry": { "type": "Point", "bbox": [0,0,0,0], "geometry": "should not be found in output", "properties": "should not be found in output", "features": "should not be found in output", "valid": "should be in output", "coordinates": [2,49] } } ] } """, open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['RFC7946=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "valid": "should be in output", "bbox": [ 2.0000000, 49.0000000, 2.0000000, 49.0000000 ], "features": [ { "type": "Feature", "valid": "should be in output", "properties": { "id": [ "not expected as child of features" ], "foo": "bar" }, "geometry": { "type": "Point", "coordinates": [ 2.0, 49.0 ], "valid": "should be in output" } } ] } """ assert json.loads(got) == json.loads(expected) ############################################################################### # Test RFC 7946 (that require geos) def test_ogr_geojson_56(): if not ogrtest.have_geos(): pytest.skip() # Test offsetting longitudes beyond antimeridian gdal.VectorTranslate('/vsimem/out.json', """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [182, 49] } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-183, 50] } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[-183, 51],[-182, 48]] } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[182, 52],[183, 47]] } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[-183, 51],[-183, 48],[-182, 48],[-183, 48],[-183, 51]]] } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[183, 51],[183, 48],[182, 48],[183, 48],[183, 51]]] } }, ] }""", format='GeoJSON', layerCreationOptions=['RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ -178.0000000, 47.0000000, 178.0000000, 52.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ -178.0, 49.0, -178.0, 49.0 ], "geometry": { "type": "Point", "coordinates": [ -178.0, 49.0 ] } }, { "type": "Feature", "properties": { }, "bbox": [ 177.0, 50.0, 177.0, 50.0 ], "geometry": { "type": "Point", "coordinates": [ 177.0, 50.0 ] } }, { "type": "Feature", "properties": { }, "bbox": [ 177.0, 48.0, 178.0, 51.0 ], "geometry": { "type": "LineString", "coordinates": [ [ 177.0, 51.0 ], [ 178.0, 48.0 ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ -178.0, 47.0, -177.0, 52.0 ], "geometry": { "type": "LineString", "coordinates": [ [ -178.0, 52.0 ], [ -177.0, 47.0 ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 177.0, 48.0, 178.0, 51.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 177.0, 51.0 ], [ 177.0, 48.0 ], [ 178.0, 48.0 ], [ 177.0, 48.0 ], [ 177.0, 51.0 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ -178.0, 48.0, -177.0, 51.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ -177.0, 51.0 ], [ -177.0, 48.0 ], [ -178.0, 48.0 ], [ -177.0, 48.0 ], [ -177.0, 51.0 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Test geometries across the antimeridian gdal.VectorTranslate('/vsimem/out.json', """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[179, 51],[-179, 48]] } }, { "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[-179, 52],[179, 47]] } }, { "type": "Feature", "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 179.0, 51.0 ], [ 180.0, 49.5 ] ], [ [ -180.0, 49.5 ], [ -179.0, 48.0 ] ] ] } }, { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[177, 51],[-175, 51],[-175, 48],[177, 48],[177, 51]]] } }, { "type": "Feature", "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 177.0, 51.0 ], [ 177.0, 48.0 ], [ 180.0, 48.0 ], [ 180.0, 51.0 ], [ 177.0, 51.0 ] ] ], [ [ [ -180.0, 51.0 ], [ -180.0, 48.0 ], [ -175.0, 48.0 ], [ -175.0, 51.0 ], [ -180.0, 51.0 ] ] ] ] } } ] }""", format='GeoJSON', layerCreationOptions=['RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 177.0000000, 47.0000000, -175.0000000, 52.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 179.0, 48.0, -179.0, 51.0 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 179.0, 51.0 ], [ 180.0, 49.5 ] ], [ [ -180.0, 49.5 ], [ -179.0, 48.0 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 179.0, 47.0, -179.0, 52.0 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ -179.0, 52.0 ], [ -180.0, 49.5 ] ], [ [ 180.0, 49.5 ], [ 179.0, 47.0 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 179.0, 48.0, -179.0, 51.0 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 179.0, 51.0 ], [ 180.0, 49.5 ] ], [ [ -180.0, 49.5 ], [ -179.0, 48.0 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 177.0, 48.0, -175.0, 51.0 ], "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 177.0, 51.0 ], [ 177.0, 48.0 ], [ 180.0, 48.0 ], [ 180.0, 51.0 ], [ 177.0, 51.0 ] ] ], [ [ [ -180.0, 51.0 ], [ -180.0, 48.0 ], [ -175.0, 48.0 ], [ -175.0, 51.0 ], [ -180.0, 51.0 ] ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 177.0, 48.0, -175.0, 51.0 ], "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 177.0, 51.0 ], [ 177.0, 48.0 ], [ 180.0, 48.0 ], [ 180.0, 51.0 ], [ 177.0, 51.0 ] ] ], [ [ [ -180.0, 51.0 ], [ -180.0, 48.0 ], [ -175.0, 48.0 ], [ -175.0, 51.0 ], [ -180.0, 51.0 ] ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) ############################################################################### # Test RFC 7946 and reprojection def test_ogr_geojson_57(): if not ogrtest.have_geos(): pytest.skip() # Standard case: EPSG:32662: WGS 84 / Plate Carre src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=eqc +lat_ts=0 +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2000000 2000000,2000000 -2000000,-2000000 -2000000,-2000000 2000000,2000000 2000000))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ -17.9663057, -17.9663057, 17.9663057, 17.9663057 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ -17.9663057, -17.9663057, 17.9663057, 17.9663057 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 17.9663057, 17.9663057 ], [ -17.9663057, 17.9663057 ], [ -17.9663057, -17.9663057 ], [ 17.9663057, -17.9663057 ], [ 17.9663057, 17.9663057 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Polar case: EPSG:3995: WGS 84 / Arctic Polar Stereographic src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2000000 2000000,2000000 -2000000,-2000000 -2000000,-2000000 2000000,2000000 2000000))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((-2000000 -2000000,-1000000 -2000000,-1000000 2000000,-2000000 2000000,-2000000 -2000000))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ -180.0000000, 64.3861643, 180.0000000, 90.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ -180.0, 64.3861643, 180.0, 90.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.0, 64.3861643 ], [ 180.0, 71.7425119 ], [ 180.0, 90.0 ], [ -180.0, 90.0 ], [ -180.0, 71.7425119 ], [ -135.0, 64.3861643 ], [ -45.0, 64.3861643 ], [ 45.0, 64.3861643 ], [ 135.0, 64.3861643 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ -153.4349488, 64.3861643, -26.5650512, 69.6286694 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ -45.0, 64.3861643 ], [ -26.5650512, 69.6286694 ], [ -153.4349488, 69.6286694 ], [ -135.0, 64.3861643 ], [ -45.0, 64.3861643 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Polar case: slice of spherical cap (not intersecting antimeridian, west hemisphere) src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((-2000000 2000000,0 0,-2000000 -2000000,-2000000 2000000))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ -135.0000000, 64.3861643, -45.0000000, 90.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ -135.0, 64.3861643, -45.0, 90.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ -135.0, 64.3861643 ], [ -45.0, 64.3861643 ], [ -45.0, 90.0 ], [ -135.0, 90.0 ], [ -135.0, 64.3861643 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Polar case: slice of spherical cap (not intersecting antimeridian, east hemisphere) src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((2000000 2000000,0 0,2000000 -2000000,2000000 2000000)))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 45.0000000, 64.3861643, 135.0000000, 90.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 45.0, 64.3861643, 135.0, 90.0 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 135.0, 64.3861643 ], [ 135.0, 90.0 ], [ 45.0, 90.0 ], [ 45.0, 64.3861643 ], [ 135.0, 64.3861643 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Polar case: slice of spherical cap crossing the antimeridian src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((100000 100000,-100000 100000,0 0,100000 100000))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 135.0000000, 88.6984598, -135.0000000, 90.0000000 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 135.0, 88.6984598, -135.0, 90.0 ], "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 180.0, 89.0796531 ], [ 180.0, 90.0 ], [ 135.0, 88.6984598 ], [ 180.0, 89.0796531 ] ] ], [ [ [ -180.0, 90.0 ], [ -180.0, 89.0796531 ], [ -135.0, 88.6984598 ] ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Polar case: EPSG:3031: WGS 84 / Antarctic Polar Stereographic src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((2000000 2000000,2000000 -2000000,-2000000 -2000000,-2000000 2000000,2000000 2000000)))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ -180.0000000, -90.0000000, 180.0000000, -64.3861643 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ -180.0, -90.0, 180.0, -64.3861643 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.0, -64.3861643 ], [ -45.0, -64.3861643 ], [ -135.0, -64.3861643 ], [ -180.0, -71.7425119 ], [ -180.0, -90.0 ], [ 180.0, -90.0 ], [ 180.0, -71.7425119 ], [ 135.0, -64.3861643 ], [ 45.0, -64.3861643 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) # Antimeridian case: EPSG:32660: WGS 84 / UTM zone 60N with polygon and line crossing src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=utm +zone=60 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((670000 4000000,850000 4000000,850000 4100000,670000 4100000,670000 4000000))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((670000 4000000,850000 4100000))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(670000 0,850000 0)')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 178.5275649, 0.0000000, -179.0681936, 37.0308258 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 178.8892102, 36.0816324, -179.0681936, 37.0308258 ], "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 180.0, 36.1071354 ], [ 180.0, 37.0082839 ], [ 178.9112998, 37.0308258 ], [ 178.8892102, 36.1298163 ], [ 180.0, 36.1071354 ] ] ], [ [ [ -179.0681936, 36.9810434 ], [ -180.0, 37.0082839 ], [ -180.0, 36.1071354 ], [ -179.1135277, 36.0816324 ], [ -179.0681936, 36.9810434 ] ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 178.8892102, 36.1298163, -179.0681936, 36.9810434 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 178.8892102, 36.1298163 ], [ 180.0, 36.5995612 ] ], [ [ -180.0, 36.5995612 ], [ -179.0681936, 36.9810434 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 178.5275649, 0.0, -179.8562277, 0.0 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 178.5275649, 0.0 ], [ 180.0, 0.0 ] ], [ [ -180.0, 0.0 ], [ -179.8562277, 0.0 ] ] ] } } ] } """ # with proj 4.9.3 expected2 = """{ "type": "FeatureCollection", "bbox": [ 178.5275649, 0.0000000, -179.0681936, 37.0308258 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 178.8892102, 36.0816324, -179.0681936, 37.0308258 ], "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -179.0681936, 36.9810434 ], [ -180.0, 37.0082839 ], [ -180.0, 36.1071354 ], [ -179.1135277, 36.0816324 ], [ -179.0681936, 36.9810434 ] ] ], [ [ [ 178.8892102, 36.1298163 ], [ 180.0, 36.1071354 ], [ 180.0, 37.0082839 ], [ 178.9112998, 37.0308258 ], [ 178.8892102, 36.1298163 ] ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 178.8892102, 36.1298163, -179.0681936, 36.9810434 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 178.8892102, 36.1298163 ], [ 180.0, 36.5995612 ] ], [ [ -180.0, 36.5995612 ], [ -179.0681936, 36.9810434 ] ] ] } }, { "type": "Feature", "properties": { }, "bbox": [ 178.5275649, 0.0, -179.8562277, 0.0 ], "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 178.5275649, 0.0 ], [ 180.0, 0.0 ] ], [ [ -180.0, 0.0 ], [ -179.8562277, 0.0 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) or json.loads(got) == json.loads(expected2) # Antimeridian case: EPSG:32660: WGS 84 / UTM zone 60N wit polygon on west of antimeridian src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=utm +zone=60 +datum=WGS84 +units=m +no_defs') lyr = src_ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((670000 4000000,700000 4000000,700000 4100000,670000 4100000,670000 4000000))')) lyr.CreateFeature(f) gdal.VectorTranslate('/vsimem/out.json', src_ds, format='GeoJSON', layerCreationOptions=['WRITE_NAME=NO', 'RFC7946=YES', 'WRITE_BBOX=YES']) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') expected = """{ "type": "FeatureCollection", "bbox": [ 178.8892102, 36.1240958, 179.2483693, 37.0308258 ], "features": [ { "type": "Feature", "properties": { }, "bbox": [ 178.8892102, 36.1240958, 179.2483693, 37.0308258 ], "geometry": { "type": "Polygon", "coordinates": [ [ [ 178.8892102, 36.1298163 ], [ 179.2223914, 36.1240958 ], [ 179.2483693, 37.0249155 ], [ 178.9112998, 37.0308258 ], [ 178.8892102, 36.1298163 ] ] ] } } ] } """ assert json.loads(got) == json.loads(expected) ############################################################################### # Test using the name member of FeatureCollection def test_ogr_geojson_58(): ds = ogr.Open('{ "type": "FeatureCollection", "name": "layer_name", "features": []}') assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayerByName('layer_name') assert lyr is not None, 'Missing layer called layer_name' ds = None ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_58.json') lyr = ds.CreateLayer('foo') ds = None ds = ogr.Open('/vsimem/ogr_geojson_58.json') assert ds.GetLayerByName('foo') is not None, 'Missing layer called foo' ds = None gdal.Unlink('/vsimem/ogr_geojson_58.json') ############################################################################### # Test using the description member of FeatureCollection def test_ogr_geojson_59(): ds = ogr.Open('{ "type": "FeatureCollection", "description": "my_description", "features": []}') assert ds is not None, 'Failed to open datasource' lyr = ds.GetLayer(0) assert lyr.GetMetadataItem('DESCRIPTION') == 'my_description', \ 'Did not get DESCRIPTION' ds = None ds = ogr.GetDriverByName('GeoJSON').CreateDataSource('/vsimem/ogr_geojson_59.json') lyr = ds.CreateLayer('foo', options=['DESCRIPTION=my desc']) ds = None ds = ogr.Open('/vsimem/ogr_geojson_59.json') lyr = ds.GetLayerByName('foo') assert lyr.GetMetadataItem('DESCRIPTION') == 'my desc', 'Did not get DESCRIPTION' ds = None gdal.Unlink('/vsimem/ogr_geojson_59.json') ############################################################################### # Test null vs unset field def test_ogr_geojson_60(): ds = gdal.OpenEx("""{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties" : { "foo" : "bar" } }, { "type": "Feature", "properties" : { "foo": null } }, { "type": "Feature", "properties" : { } } ] }""") lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['foo'] != 'bar': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if not f.IsFieldNull('foo'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.IsFieldSet('foo'): f.DumpReadable() pytest.fail() # Test writing side gdal.VectorTranslate('/vsimem/ogr_geojson_60.json', ds, format='GeoJSON') fp = gdal.VSIFOpenL('/vsimem/ogr_geojson_60.json', 'rb') data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) gdal.Unlink('/vsimem/ogr_geojson_60.json') assert ('"properties": { "foo": "bar" }' in data and \ '"properties": { "foo": null }' in data and \ '"properties": { }' in data) ############################################################################### # Test corner cases def test_ogr_geojson_61(): # Invalid JSon gdal.FileFromMemBuffer('/vsimem/ogr_geojson_61.json', """{ "type": "FeatureCollection", "features": [""") with gdaltest.error_handler(): ds = gdal.OpenEx('/vsimem/ogr_geojson_61.json') assert ds is None gdal.Unlink('/vsimem/ogr_geojson_61.json') # Invalid single geometry with gdaltest.error_handler(): ds = gdal.OpenEx("""{ "type": "Point", "x" : { "coordinates" : null } } """) assert ds is None # Empty property name gdal.FileFromMemBuffer('/vsimem/ogr_geojson_61.json', """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {"": 1}, "geometry": null }] }""") ds = gdal.OpenEx('/vsimem/ogr_geojson_61.json') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetField("") == 1 ds = None gdal.Unlink('/vsimem/ogr_geojson_61.json') ############################################################################### # Test crs object def test_ogr_geojson_62(): # crs type=name tests gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name" }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":null }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":1 }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":{"name":null} }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":{"name":1} }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":{"name":"x"} }, "features":[] }""") ds = gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":{"name": "urn:ogc:def:crs:EPSG::32631"} }, "features":[] }""") lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() assert srs.GetAuthorityCode(None) == '32631' assert srs.GetDataAxisToSRSAxisMapping() == [1, 2] # See https://github.com/OSGeo/gdal/issues/2035 ds = gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"name", "properties":{"name": "urn:ogc:def:crs:OGC:1.3:CRS84"} }, "features":[] }""") lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() assert srs.GetAuthorityCode(None) == '4326' assert srs.GetDataAxisToSRSAxisMapping() == [2, 1] # crs type=EPSG (not even documented in GJ2008 spec!) tests. Just for coverage completeness gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG" }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG", "properties":null }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG", "properties":1 }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG", "properties":{"code":null} }, "features":[] }""") with gdaltest.error_handler(): gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG", "properties":{"code":1} }, "features":[] }""") with gdaltest.error_handler(): gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG", "properties":{"code":"x"} }, "features":[] }""") ds = gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"EPSG", "properties":{"code": 32631} }, "features":[] }""") lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() assert srs.ExportToWkt().find('32631') >= 0 # crs type=link tests gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"link" }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"link", "properties":null }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"link", "properties":1 }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"link", "properties":{"href":null} }, "features":[] }""") with gdaltest.error_handler(): gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"link", "properties":{"href":1} }, "features":[] }""") with gdaltest.error_handler(): gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"link", "properties":{"href": "1"} }, "features":[] }""") # crs type=OGC (not even documented in GJ2008 spec!) tests. Just for coverage completeness gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC" }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC", "properties":null }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC", "properties":1 }, "features":[] }""") gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC", "properties":{"urn":null} }, "features":[] }""") with gdaltest.error_handler(): gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC", "properties":{"urn":1} }, "features":[] }""") with gdaltest.error_handler(): gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC", "properties":{"urn":"x"} }, "features":[] }""") ds = gdal.OpenEx("""{ "type": "FeatureCollection", "crs": { "type":"OGC", "properties":{"urn": "urn:ogc:def:crs:EPSG::32631"} }, "features":[] }""") lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() assert srs.ExportToWkt().find('32631') >= 0 ############################################################################### # Extensive test of field tye promotion def test_ogr_geojson_63(): ds_ref = ogr.Open('data/test_type_promotion_ref.json') lyr_ref = ds_ref.GetLayer(0) ds = ogr.Open('data/test_type_promotion.json') lyr = ds.GetLayer(0) return ogrtest.compare_layers(lyr, lyr_ref) ############################################################################### # Test exporting XYM / XYZM (#6935) def test_ogr_geojson_64(): g = ogr.CreateGeometryFromWkt('POINT ZM(1 2 3 4)') assert (ogrtest.check_feature_geometry(ogr.CreateGeometryFromJson(g.ExportToJson()), ogr.CreateGeometryFromWkt('POINT Z(1 2 3)')) == 0) g = ogr.CreateGeometryFromWkt('POINT M(1 2 3)') assert (ogrtest.check_feature_geometry(ogr.CreateGeometryFromJson(g.ExportToJson()), ogr.CreateGeometryFromWkt('POINT (1 2)')) == 0) g = ogr.CreateGeometryFromWkt('LINESTRING ZM(1 2 3 4,5 6 7 8)') assert (ogrtest.check_feature_geometry(ogr.CreateGeometryFromJson(g.ExportToJson()), ogr.CreateGeometryFromWkt('LINESTRING Z(1 2 3,5 6 7)')) == 0) g = ogr.CreateGeometryFromWkt('LINESTRING M(1 2 3,4 5 6)') assert (ogrtest.check_feature_geometry(ogr.CreateGeometryFromJson(g.ExportToJson()), ogr.CreateGeometryFromWkt('LINESTRING (1 2,4 5)')) == 0) ############################################################################### # Test feature geometry CRS when CRS set on the FeatureCollection # See https://github.com/r-spatial/sf/issues/449#issuecomment-319369945 def test_ogr_geojson_65(): ds = ogr.Open("""{ "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::32631" } }, "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [500000,4500000]}, "properties": { }}]}""") lyr = ds.GetLayer(0) f = lyr.GetNextFeature() srs = f.GetGeometryRef().GetSpatialReference() pcs = int(srs.GetAuthorityCode('PROJCS')) assert pcs == 32631, 'Spatial reference for individual geometry was not valid' ############################################################################### # Test features with properties not being a dictionary def test_ogr_geojson_66(): ds = ogr.Open("""{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": null, "properties": null }, { "type": "Feature", "geometry": null, "properties": [] } ]}""") lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 0 ############################################################################### # Test reading GeoJSON files starting with {"features":[{"geometry":.... (#7198) def test_ogr_geojson_67(): ds = ogr.Open('data/grenada.geojson') assert ds is not None assert ds.GetDriver().GetName() == 'GeoJSON' lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ############################################################################### def test_ogr_geojson_id_field_and_id_type(): gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', options='-f GeoJSON -lco ID_TYPE=String -preserve_fid -limit 1 -fid 2') got = read_file('/vsimem/out.json') assert '"id": "2", "properties": { "AREA": 261752.781, "EAS_ID": 171, "PRFEDEA": "35043414" }' in got gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', options='-f GeoJSON -lco ID_TYPE=Integer -preserve_fid -limit 1 -fid 2') got = read_file('/vsimem/out.json') assert '"id": 2, "properties": { "AREA": 261752.781, "EAS_ID": 171, "PRFEDEA": "35043414" }' in got gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_FIELD=EAS_ID'], limit=1) got = read_file('/vsimem/out.json') assert '"id": 168, "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got src_ds = gdal.OpenEx('/vsimem/out.json', open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out2.json', src_ds, format='GeoJSON') src_ds = None got = read_file('/vsimem/out2.json') gdal.Unlink('/vsimem/out2.json') assert '"id": 168, "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got src_ds = gdal.OpenEx('/vsimem/out.json', open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out2.json', src_ds, format='GeoJSON', layerCreationOptions=['ID_TYPE=String']) src_ds = None got = read_file('/vsimem/out2.json') gdal.Unlink('/vsimem/out2.json') assert '"id": "168", "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got src_ds = gdal.OpenEx('/vsimem/out.json', open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out2.json', src_ds, format='GeoJSON', layerCreationOptions=['ID_TYPE=Integer']) src_ds = None got = read_file('/vsimem/out2.json') gdal.Unlink('/vsimem/out2.json') assert '"id": 168, "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got gdal.Unlink('/vsimem/out.json') gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_FIELD=EAS_ID', 'ID_TYPE=String'], limit=1) got = read_file('/vsimem/out.json') assert '"id": "168", "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got src_ds = gdal.OpenEx('/vsimem/out.json', open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out2.json', src_ds, format='GeoJSON') src_ds = None got = read_file('/vsimem/out2.json') gdal.Unlink('/vsimem/out2.json') assert '"id": "168", "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got src_ds = gdal.OpenEx('/vsimem/out.json', open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out2.json', src_ds, format='GeoJSON', layerCreationOptions=['ID_TYPE=String']) src_ds = None got = read_file('/vsimem/out2.json') gdal.Unlink('/vsimem/out2.json') assert '"id": "168", "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got src_ds = gdal.OpenEx('/vsimem/out.json', open_options=['NATIVE_DATA=YES']) gdal.VectorTranslate('/vsimem/out2.json', src_ds, format='GeoJSON', layerCreationOptions=['ID_TYPE=Integer']) src_ds = None got = read_file('/vsimem/out2.json') gdal.Unlink('/vsimem/out2.json') assert '"id": 168, "properties": { "AREA": 215229.266, "PRFEDEA": "35043411" }' in got gdal.Unlink('/vsimem/out.json') gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_FIELD=PRFEDEA'], limit=1) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') assert '"id": "35043411", "properties": { "AREA": 215229.266, "EAS_ID": 168 }' in got gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_FIELD=PRFEDEA', 'ID_TYPE=Integer'], limit=1) got = read_file('/vsimem/out.json') gdal.Unlink('/vsimem/out.json') assert '"id": 35043411, "properties": { "AREA": 215229.266, "EAS_ID": 168 }' in got gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_GENERATE=YES'], limit=1) got = read_file('/vsimem/out.json') assert '"id": 0, "properties": { "AREA": 215229.266, "EAS_ID": 168, "PRFEDEA": "35043411" }' in got gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_GENERATE=YES', 'ID_TYPE=Integer'], limit=1) got = read_file('/vsimem/out.json') assert '"id": 0, "properties": { "AREA": 215229.266, "EAS_ID": 168, "PRFEDEA": "35043411" }' in got gdal.VectorTranslate('/vsimem/out.json', 'data/poly.shp', format='GeoJSON', layerCreationOptions=['ID_GENERATE=YES', 'ID_TYPE=String'], limit=1) got = read_file('/vsimem/out.json') assert '"id": "0", "properties": { "AREA": 215229.266, "EAS_ID": 168, "PRFEDEA": "35043411" }' in got ############################################################################### def test_ogr_geojson_geom_export_failure(): g = ogr.CreateGeometryFromWkt('POINT EMPTY') geojson = g.ExportToJson() assert geojson is None g = ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(TIN EMPTY)') geojson = json.loads(g.ExportToJson()) assert geojson == {"type": "GeometryCollection", "geometries": None} g = ogr.Geometry(ogr.wkbLineString) g.AddPoint_2D(float('nan'), 0) with gdaltest.error_handler(): geojson = g.ExportToJson() assert geojson is None g = ogr.Geometry(ogr.wkbPolygon) lr = ogr.Geometry(ogr.wkbLinearRing) lr.AddPoint_2D(0, 0) lr.AddPoint_2D(0, 1) lr.AddPoint_2D(1, 1) lr.AddPoint_2D(0, 0) g.AddGeometry(lr) lr = ogr.Geometry(ogr.wkbLinearRing) lr.AddPoint_2D(0, 0) lr.AddPoint_2D(float('nan'), 1) lr.AddPoint_2D(1, 1) lr.AddPoint_2D(0, 0) g.AddGeometry(lr) with gdaltest.error_handler(): geojson = g.ExportToJson() assert geojson is None ############################################################################### def test_ogr_geojson_starting_with_crs(): ds = ogr.Open("""{ "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::32631" } }, "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [500000,4500000]}, "properties": { }}]}""") assert ds is not None ############################################################################### # Test we properly flush the file in SyncToDisk() in append situations def test_ogr_geojson_append_flush(): tmpfilename = 'tmp/ogr_geojson_append_flush.json' f = gdal.VSIFOpenL(tmpfilename, 'wb') content = """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "x": 1, "y": 2, "z": 3, "w": 4 }, "geometry": { "type": "Point", "coordinates": [ 0, 0 ] } } ] }""" gdal.VSIFWriteL(content, 1, len(content), f) gdal.VSIFCloseL(f) ds = ogr.Open(tmpfilename, update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f['x'] = 10 lyr.CreateFeature(f) lyr.SyncToDisk() ds2 = ogr.Open(tmpfilename, update=1) lyr = ds2.GetLayer(0) lyr.GetNextFeature() f = lyr.GetNextFeature() assert f is not None and f['x'] == 10 ds = None ds2 = None gdal.Unlink(tmpfilename) ############################################################################### def test_ogr_geojson_empty_geometrycollection(): g = ogr.CreateGeometryFromJson('{"type": "GeometryCollection", "geometries": []}') assert g.ExportToWkt() == 'GEOMETRYCOLLECTION EMPTY' ############################################################################### def test_ogr_geojson_read_fields_with_different_case(): ds = ogr.Open("""{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": "my_id", "geometry": null, "properties": { "ID": "MY_ID", "x": "foo", "X": "FOO"} } ]}""") lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetField(0) != 'my_id' or f.GetField(1) != 'MY_ID' or f.GetField(2) != 'foo' or f.GetField(3) != 'FOO': f.DumpReadable() pytest.fail() ############################################################################### # Test bugfix for https://github.com/OSGeo/gdal/issues/1068 def test_ogr_geojson_clip_geometries_rfc7946(): if not ogrtest.have_geos(): pytest.skip() tmpfilename = '/vsimem/out.json' gdal.VectorTranslate(tmpfilename, """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": {"type":"Polygon","coordinates":[[[-220,-20],[-220,30],[16,30],[16,-20],[-220,-20]]]} }, { "type": "Feature", "geometry": {"type":"Polygon","coordinates":[[[220,40],[220,70],[-16,70],[-16,40],[220,40]]]} }, { "type": "Feature", "geometry": {"type":"Polygon","coordinates":[[[170,-40],[170,-70],[-16,70],[-16,-40],[170,-40]]]} } ] }""", options='-f GeoJSON -lco RFC7946=YES') ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOLYGON (((-180 30,-180 -20,16 -20,16 30,-180 30)),((140 -20,180 -20,180 30,140 30,140 -20)))') if ogrtest.check_feature_geometry(f, ref_geom) != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('MULTIPOLYGON (((180 40,180 70,-16 70,-16 40,180 40)),((-180 70,-180 40,-140 40,-140 70,-180 70)))') if ogrtest.check_feature_geometry(f, ref_geom) != 0: f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() ref_geom = ogr.CreateGeometryFromWkt('POLYGON ((170 -40,-16 -40,-16 70,170 -70,170 -40))') if ogrtest.check_feature_geometry(f, ref_geom) != 0: f.DumpReadable() pytest.fail() ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test bugfix for https://github.com/OSGeo/gdal/issues/1109 def test_ogr_geojson_non_finite(): json_content = """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "inf_prop": infinity, "minus_inf_prop": -infinity, "nan_prop": nan }, "geometry": null } ] }""" with gdaltest.error_handler(): ds = ogr.Open(json_content) if ds is None: # Might fail with older libjson-c versions pytest.skip() lyr = ds.GetLayer(0) f = lyr.GetNextFeature() for i in range(3): assert lyr.GetLayerDefn().GetFieldDefn(i).GetType() == ogr.OFTReal if f['inf_prop'] != float('inf'): f.DumpReadable() pytest.fail() if f['minus_inf_prop'] != float('-inf'): f.DumpReadable() pytest.fail() if not math.isnan(f['nan_prop']): f.DumpReadable() pytest.fail(str(f['nan_prop'])) ds = None tmpfilename = '/vsimem/out.json' with gdaltest.error_handler(): gdal.VectorTranslate(tmpfilename, json_content, options='-f GeoJSON') ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 0 ds = None gdal.VectorTranslate(tmpfilename, json_content, options='-f GeoJSON -lco WRITE_NON_FINITE_VALUES=YES') ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 3 f = lyr.GetNextFeature() if f['inf_prop'] != float('inf'): f.DumpReadable() pytest.fail() if f['minus_inf_prop'] != float('-inf'): f.DumpReadable() pytest.fail() if not math.isnan(f['nan_prop']): f.DumpReadable() pytest.fail(str(f['nan_prop'])) ds = None gdal.Unlink(tmpfilename) ############################################################################### def test_ogr_geojson_random_reading_with_id(): json_content = """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 1, "properties": { "a": "a" }, "geometry": null }, { "type": "Feature", "id": 2, "properties": { "a": "bc" }, "geometry": null } ] }""" tmpfilename = '/vsimem/temp.json' gdal.FileFromMemBuffer(tmpfilename, json_content) ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) f1_ref = lyr.GetNextFeature() f2_ref = lyr.GetNextFeature() f1 = lyr.GetFeature(1) f2 = lyr.GetFeature(2) assert f1.Equal(f1_ref) assert f2.Equal(f2_ref) assert not lyr.GetFeature(3) ds = None gdal.Unlink(tmpfilename) ############################################################################### def test_ogr_geojson_random_reading_without_id(): json_content = """{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "a": "a" }, "geometry": null }, { "type": "Feature", "properties": { "a": "bc" }, "geometry": null } ] }""" tmpfilename = '/vsimem/temp.json' gdal.FileFromMemBuffer(tmpfilename, json_content) ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) f1_ref = lyr.GetNextFeature() f2_ref = lyr.GetNextFeature() f1 = lyr.GetFeature(0) f2 = lyr.GetFeature(1) assert f1.Equal(f1_ref) assert f2.Equal(f2_ref) assert not lyr.GetFeature(2) ds = None gdal.Unlink(tmpfilename) ############################################################################### def test_ogr_geojson_single_feature_random_reading_with_id(): json_content = """ { "type": "Feature", "id": 1, "properties": { "a": "a" }, "geometry": null } }""" tmpfilename = '/vsimem/temp.json' gdal.FileFromMemBuffer(tmpfilename, json_content) ds = ogr.Open(tmpfilename) lyr = ds.GetLayer(0) f1_ref = lyr.GetNextFeature() f1 = lyr.GetFeature(1) assert f1.Equal(f1_ref) ds = None gdal.Unlink(tmpfilename) ############################################################################### def test_ogr_geojson_3D_geom_type(): ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2,3]}, "properties": null}, {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2,4]}, "properties": null} ]}""") lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint25D ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2,3]}, "properties": null}, {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2]}, "properties": null} ]}""") lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint25D ds = ogr.Open("""{"type": "FeatureCollection", "features":[ {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2]}, "properties": null}, {"type": "Feature", "geometry": {"type":"Point","coordinates":[1,2,4]}, "properties": null} ]}""") lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint25D ############################################################################### def test_ogr_geojson_update_in_loop(): tmpfilename = '/vsimem/temp.json' # No explicit id gdal.FileFromMemBuffer(tmpfilename, '{"type": "FeatureCollection", "name": "test", "features": [{ "type": "Feature", "properties": { "foo": 1 }, "geometry": null }, { "type": "Feature", "properties": { "foo": 2 }, "geometry": null }]}') ds = gdal.OpenEx(tmpfilename, gdal.OF_VECTOR | gdal.GA_Update) layer = ds.GetLayer() fids = [] for feature in layer: fids.append(feature.GetFID()) layer.SetFeature(feature) assert fids == [0, 1] ds = None # Explicit id no holes gdal.FileFromMemBuffer(tmpfilename, '{"type": "FeatureCollection", "name": "test", "features": [{ "type": "Feature", "id": 0, "properties": { "foo": 1 }, "geometry": null }, { "type": "Feature", "properties": { "foo": 2 }, "id": 1, "geometry": null }]}') ds = gdal.OpenEx(tmpfilename, gdal.OF_VECTOR | gdal.GA_Update) layer = ds.GetLayer() fids = [] for feature in layer: fids.append(feature.GetFID()) layer.SetFeature(feature) assert fids == [0, 1] ds = None # Explicit id with holes gdal.FileFromMemBuffer(tmpfilename, '{"type": "FeatureCollection", "name": "test", "features": [{ "type": "Feature", "id": 1, "properties": { "foo": 1 }, "geometry": null }, { "type": "Feature", "properties": { "foo": 2 }, "id": 3, "geometry": null }]}') ds = gdal.OpenEx(tmpfilename, gdal.OF_VECTOR | gdal.GA_Update) layer = ds.GetLayer() fids = [] for feature in layer: fids.append(feature.GetFID()) layer.SetFeature(feature) assert fids == [1, 3] ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test fix for https://github.com/OSGeo/gdal/issues/2720 def test_ogr_geojson_starting_with_coordinates(): tmpfilename = '/vsimem/temp.json' gdal.FileFromMemBuffer(tmpfilename, '{ "coordinates": [' + (' ' * 10000) + '2,49], "type": "Point"}') ds = gdal.OpenEx(tmpfilename, gdal.OF_VECTOR) assert ds is not None gdal.Unlink(tmpfilename) gdalautotest-3.1.2/ogr/ogr_vdv.py0000775000175000017500000003674313701060013015511 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_vdv.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR VDV driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import sys import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr import pytest ############################################################################### # Basic test of .idf file def test_ogr_idf_1(): ds = ogr.Open('data/test.idf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['NODE_ID'] != 1 or f['foo'] != 'U' or f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() lyr = ds.GetLayer(1) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'LINESTRING (2 49,2.5 49.5,2.7 49.7,3 50)': f.DumpReadable() pytest.fail() lyr = ds.GetLayer(2) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2.5 49.5)': f.DumpReadable() pytest.fail() lyr = ds.GetLayer(3) f = lyr.GetNextFeature() if f['FOO'] != 1: f.DumpReadable() pytest.fail() ############################################################################### # def test_ogr_idf_1_with_temp_sqlite_db(): if ogr.GetDriverByName('SQLite') is None: pytest.skip() with gdaltest.config_option('OGR_IDF_TEMP_DB_THRESHOLD', '0'): return test_ogr_idf_1() ############################################################################### # Basic test of .idf file def test_ogr_idf_3d(): ds = ogr.Open('data/test_3d.idf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['NODE_ID'] != 1 or f['foo'] != 'U' or f.GetGeometryRef().ExportToWkt() != 'POINT (2 49 10)': f.DumpReadable() pytest.fail() lyr = ds.GetLayer(1) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'LINESTRING (2 49 10,2.5 49.5 10,2.7 49.7 20,3 50 20)': f.DumpReadable() pytest.fail() lyr = ds.GetLayer(2) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2.5 49.5 10)': f.DumpReadable() pytest.fail() lyr = ds.GetLayer(3) f = lyr.GetNextFeature() if f['FOO'] != 1: f.DumpReadable() pytest.fail() ############################################################################### # Run test_ogrsf on .idf def test_ogr_idf_2(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.idf') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Create a VDV file def test_ogr_vdv_1(filename='tmp/test.x10', dsco=None, lco=None): dsco = [] if dsco is None else dsco lco = [] if lco is None else lco ds = ogr.GetDriverByName('VDV').CreateDataSource(filename, options=dsco) ds.CreateLayer('empty', options=lco) lyr = ds.CreateLayer('lyr_1', options=lco) lyr.CreateField(ogr.FieldDefn('str_field', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('int_field', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64_field', ogr.OFTInteger64)) bool_field = ogr.FieldDefn('bool_field', ogr.OFTInteger) bool_field.SetSubType(ogr.OFSTBoolean) lyr.CreateField(bool_field) fld = ogr.FieldDefn('str2_field', ogr.OFTString) fld.SetWidth(2) lyr.CreateField(fld) fld = ogr.FieldDefn('int2_field', ogr.OFTInteger) fld.SetWidth(2) lyr.CreateField(fld) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('str_field', 'a"b') f.SetField('int_field', 12) f.SetField('bool_field', 1) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) lyr = ds.CreateLayer('another_layer', options=lco) lyr.CreateField(ogr.FieldDefn('str_field', ogr.OFTString)) for i in range(5): f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('str_field', i) lyr.CreateFeature(f) ds = None # Do nothing ds = ogr.Open(filename, update=1) ds = None ds = ogr.Open(filename, update=1) ds.CreateLayer('empty2', options=lco) ds = None ############################################################################### # Read it def test_ogr_vdv_2(src_filename='tmp/test.x10'): out_filename = '/vsimem/vdv/ogr_vdv_2.x10' gdal.Unlink(out_filename) src_ds = ogr.Open(src_filename) out_ds = ogr.GetDriverByName('VDV').CreateDataSource(out_filename) layer_names = [src_ds.GetLayer(idx).GetName() for idx in range(src_ds.GetLayerCount())] layer_names.sort() for layer_name in layer_names: src_lyr = src_ds.GetLayer(layer_name) options = ['HEADER_SRC_DATE=01.01.1970', 'HEADER_SRC_TIME=00.00.00', 'HEADER_foo=bar'] dst_lyr = out_ds.CreateLayer(src_lyr.GetName(), options=options) for field_idx in range(src_lyr.GetLayerDefn().GetFieldCount()): dst_lyr.CreateField(src_lyr.GetLayerDefn().GetFieldDefn(field_idx)) for src_f in src_lyr: dst_f = ogr.Feature(dst_lyr.GetLayerDefn()) dst_f.SetFrom(src_f) dst_lyr.CreateFeature(dst_f) out_ds = None expected = """mod; DD.MM.YYYY; HH:MM:SS; free src; "UNKNOWN"; "01.01.1970"; "00.00.00" chs; "ISO8859-1" ver; "1.4" ifv; "1.4" dve; "1.4" fft; "" foo; "bar" tbl; another_layer atr; str_field frm; char[80] rec; "0" rec; "1" rec; "2" rec; "3" rec; "4" end; 5 tbl; lyr_1 atr; str_field; int_field; int64_field; bool_field; str2_field; int2_field frm; char[80]; num[10.0]; num[19.0]; boolean; char[2]; num[1.0] rec; "a""b"; 12; NULL; 1; NULL; NULL rec; NULL; NULL; NULL; NULL; NULL; NULL end; 2 tbl; empty atr; frm; end; 0 tbl; empty2 atr; frm; end; 0 eof; 4 """ f = gdal.VSIFOpenL(out_filename, 'rb') got = gdal.VSIFReadL(1, 10000, f).decode('latin1') gdal.VSIFCloseL(f) assert got == expected gdal.Unlink(out_filename) ############################################################################### # Run test_ogrsf on it def test_ogr_vdv_3(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/test.x10') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Create a VDV directory def test_ogr_vdv_4(): return test_ogr_vdv_1(filename='tmp/test_x10', dsco=['SINGLE_FILE=NO'], lco=['EXTENSION=txt']) ############################################################################### # Read it def test_ogr_vdv_5(): return test_ogr_vdv_2(src_filename='tmp/test_x10') ############################################################################### # Run test_ogrsf on it def test_ogr_vdv_6(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/test_x10') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Run VDV452 def test_ogr_vdv_7(): tests = [('VDV-452', 'STOP', 'POINT_LONGITUDE', 'POINT_LATITUDE'), ('VDV-452-ENGLISH', 'STOP', 'POINT_LONGITUDE', 'POINT_LATITUDE'), ('VDV-452', 'REC_ORT', 'ORT_POS_LAENGE', 'ORT_POS_BREITE'), ('VDV-452-GERMAN', 'REC_ORT', 'ORT_POS_LAENGE', 'ORT_POS_BREITE')] out_filename = '/vsimem/vdv/ogr_vdv_7.x10' for (profile, lyrname, longname, latname) in tests: ds = ogr.GetDriverByName('VDV').CreateDataSource(out_filename) lyr = ds.CreateLayer(lyrname, geom_type=ogr.wkbPoint, options=['PROFILE=' + profile]) f = ogr.Feature(lyr.GetLayerDefn()) lng = - (123 + 45. / 60 + 56.789 / 3600) lat = - (23 + 45. / 60 + 56.789 / 3600) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%.10f %.10f)' % (lng, lat))) lyr.CreateFeature(f) ds = None ds = ogr.Open(out_filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f[longname] != -1234556789 or \ f[latname] != -234556789 or \ ogrtest.check_feature_geometry(f, 'POINT (-123.765774722222 -23.7657747222222)') != 0: f.DumpReadable() pytest.fail() ds = None gdal.Unlink('/vsimem/vdv/ogr_vdv_7.x10') tests = [('VDV-452', True), ('VDV-452-ENGLISH', False), ('VDV-452-GERMAN', False)] for (profile, strict) in tests: ds = ogr.GetDriverByName('VDV').CreateDataSource(out_filename) gdal.ErrorReset() gdal.PushErrorHandler() lyr = ds.CreateLayer('UNKNOWN', options=['PROFILE=' + profile, 'PROFILE_STRICT=' + str(strict)]) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' if strict and lyr is not None: pytest.fail() elif not strict and lyr is None: pytest.fail() if profile == 'VDV-452-GERMAN': lyr_name = 'REC_ORT' else: lyr_name = 'STOP' lyr = ds.CreateLayer(lyr_name, options=['PROFILE=' + profile, 'PROFILE_STRICT=' + str(strict)]) gdal.ErrorReset() gdal.PushErrorHandler() ret = lyr.CreateField(ogr.FieldDefn('UNKNOWN')) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' if strict and ret == 0: pytest.fail() elif not strict and ret != 0: pytest.fail() ds = None gdal.Unlink('/vsimem/vdv/ogr_vdv_7.x10') ############################################################################### # Test a few error cases def test_ogr_vdv_8(): gdal.PushErrorHandler() ds = ogr.GetDriverByName('VDV').CreateDataSource('/does/not_exist') gdal.PopErrorHandler() assert ds is None gdal.PushErrorHandler() ds = ogr.GetDriverByName('VDV').CreateDataSource('/does/not_exist', options=['SINGLE_FILE=FALSE']) gdal.PopErrorHandler() assert ds is None # Add layer in non writable directory if sys.platform.startswith('linux'): os.mkdir('tmp/ogr_vdv_8') open('tmp/ogr_vdv_8/empty.x10', 'wb').write('tbl; foo\natr;\nfrm;\n'.encode('latin1')) # 0555 = 365 os.chmod('tmp/ogr_vdv_8', 365) try: open('tmp/ogr_vdv_8/another_file', 'wb').close() shutil.rmtree('tmp/ogr_vdv_8') do_test = False except: do_test = True if do_test: ds = ogr.Open('tmp/ogr_vdv_8', update=1) gdal.PushErrorHandler() lyr = ds.CreateLayer('another_layer') gdal.PopErrorHandler() # 0755 = 493 os.chmod('tmp/ogr_vdv_8', 493) ds = None shutil.rmtree('tmp/ogr_vdv_8') assert lyr is None out_filename = '/vsimem/vdv/ogr_vdv_8.x10' ds = ogr.GetDriverByName('VDV').CreateDataSource(out_filename) # File already exists gdal.PushErrorHandler() ds2 = ogr.GetDriverByName('VDV').CreateDataSource(out_filename) gdal.PopErrorHandler() assert ds2 is None assert ds.TestCapability(ogr.ODsCCreateLayer) == 1 lyr1 = ds.CreateLayer("lyr1") assert lyr1.TestCapability(ogr.OLCSequentialWrite) == 1 assert lyr1.TestCapability(ogr.OLCCreateField) == 1 lyr1.ResetReading() gdal.PushErrorHandler() lyr1.GetNextFeature() gdal.PopErrorHandler() lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) # Layer structure is now frozen assert lyr1.TestCapability(ogr.OLCCreateField) == 0 gdal.PushErrorHandler() ret = lyr1.CreateField(ogr.FieldDefn('not_allowed')) gdal.PopErrorHandler() assert ret != 0 lyr2 = ds.CreateLayer("lyr2") lyr2.CreateFeature(ogr.Feature(lyr2.GetLayerDefn())) # Test interleaved writing assert lyr1.TestCapability(ogr.OLCSequentialWrite) == 0 gdal.PushErrorHandler() ret = lyr1.CreateFeature(ogr.Feature(lyr1.GetLayerDefn())) gdal.PopErrorHandler() assert ret != 0 assert lyr1.GetFeatureCount() == 1 ds = None # Test appending new layer to file without eof gdal.FileFromMemBuffer(out_filename, 'tbl; foo\natr; atr\nfrm; char[40]\nrec; "foo"\n') ds = ogr.Open(out_filename, update=1) lyr = ds.CreateLayer('new_layer') lyr.CreateField(ogr.FieldDefn('atr')) f = ogr.Feature(lyr.GetLayerDefn()) f['atr'] = 'bar' lyr.CreateFeature(f) f = None ds = None expected = """tbl; foo atr; atr frm; char[40] rec; "foo" tbl; new_layer atr; atr frm; char[80] rec; "bar" end; 1 eof; 2 """ f = gdal.VSIFOpenL(out_filename, 'rb') got = gdal.VSIFReadL(1, 10000, f).decode('latin1') gdal.VSIFCloseL(f) assert got == expected # Test we are robust against missing end; ds = ogr.Open(out_filename) for i in range(2): lyr = ds.GetLayer(i) assert lyr.GetFeatureCount() == 1 lyr.ResetReading() fc = 0 for f in lyr: fc += 1 assert fc == 1 lyr = None ds = None # Test appending new layer to file without terminating \n gdal.FileFromMemBuffer(out_filename, 'tbl; foo\natr; atr\nfrm; char[40]\nrec; "foo"\neof; 1') ds = ogr.Open(out_filename, update=1) lyr = ds.CreateLayer('new_layer') lyr.CreateField(ogr.FieldDefn('atr')) f = ogr.Feature(lyr.GetLayerDefn()) f['atr'] = 'bar' lyr.CreateFeature(f) f = None ds = None f = gdal.VSIFOpenL(out_filename, 'rb') got = gdal.VSIFReadL(1, 10000, f).decode('latin1') gdal.VSIFCloseL(f) assert got == expected gdal.Unlink(out_filename) ############################################################################### # Cleanup def test_ogr_vdv_cleanup(): gdal.Unlink('tmp/test.x10') gdal.Unlink('/vsimem/vdv/ogr_vdv_2.x10') gdal.Unlink('/vsimem/vdv/ogr_vdv_7.x10') gdal.Unlink('/vsimem/vdv/ogr_vdv_8.x10') files = gdal.ReadDir('tmp/test_x10') if files is not None: for f in files: gdal.Unlink('tmp/test_x10/' + f) gdal.Rmdir('tmp/test_x10') gdalautotest-3.1.2/ogr/ogr_dods.py0000775000175000017500000001435613701060013015637 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_dods.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR DODS driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2009-2011, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Open DODS datasource. @pytest.mark.skip() def test_ogr_dods_1(): gdaltest.dods_ds = None ogrtest.dods_drv = ogr.GetDriverByName('DODS') if ogrtest.dods_drv is None: pytest.skip() gdal.SetConfigOption('DODS_AIS_FILE', 'data/ais.xml') srv = 'http://www.epic.noaa.gov:10100/dods/wod2001/natl_prof_bot.cdp?&_id=1' if gdaltest.gdalurlopen(srv) is None: gdaltest.dods_ds = None pytest.skip() gdaltest.dods_ds = ogr.Open('DODS:' + srv) assert gdaltest.dods_ds is not None try: gdaltest.dods_profiles = gdaltest.dods_ds.GetLayerByName('profiles') gdaltest.dods_normalized = gdaltest.dods_ds.GetLayerByName('normalized') gdaltest.dods_lines = gdaltest.dods_ds.GetLayerByName('lines') except: gdaltest.dods_profiles = None gdaltest.dods_normalized = None if gdaltest.dods_profiles is None: gdaltest.dods_ds = None pytest.fail('profiles layer missing, likely AIS stuff not working.') ############################################################################### # Read a single feature from the profiles layer and verify a few things. # @pytest.mark.skip() def test_ogr_dods_2(): if gdaltest.dods_ds is None: pytest.skip() gdaltest.dods_profiles.ResetReading() feat = gdaltest.dods_profiles.GetNextFeature() assert feat.GetField('time') == -1936483200000, 'time wrong' assert feat.GetField('profile.depth') == [0, 10, 20, 30, 39], 'depth wrong' assert ogrtest.check_feature_geometry(feat, 'POINT (4.30000019 5.36999989)') == 0 feat.Destroy() feat = gdaltest.dods_profiles.GetNextFeature() if feat is not None: feat.Destroy() pytest.fail('got more than expected number of features.') ############################################################################### # Read the normalized form of the same profile, and verify some values. # @pytest.mark.skip() def test_ogr_dods_3(): if gdaltest.dods_ds is None: pytest.skip() gdaltest.dods_normalized.ResetReading() expect = [0, 10, 20, 30, 39] tr = ogrtest.check_features_against_list(gdaltest.dods_normalized, 'depth', expect) assert tr != 0 expected = [14.8100004196167, 14.8100004196167, 14.8100004196167, 14.60999965667725, 14.60999965667725] gdaltest.dods_normalized.ResetReading() for i in range(5): feat = gdaltest.dods_normalized.GetNextFeature() assert feat.GetField('time') == -1936483200000, 'time wrong' assert feat.GetField('T_20') == pytest.approx(expected[i], abs=0.001), 'T_20 wrong' assert ogrtest.check_feature_geometry(feat, 'POINT (4.30000019 5.36999989)') == 0 feat.Destroy() feat = None feat = gdaltest.dods_normalized.GetNextFeature() if feat is not None: feat.Destroy() pytest.fail('got more than expected number of features.') ############################################################################### # Read the "lines" from from the same server and verify some values. # @pytest.mark.skip() def test_ogr_dods_4(): if gdaltest.dods_ds is None: pytest.skip() gdaltest.dods_lines.ResetReading() feat = gdaltest.dods_lines.GetNextFeature() assert feat.GetField('time') == -1936483200000, 'time wrong' assert feat.GetField('profile.depth') == [0, 10, 20, 30, 39], 'depth wrong' wkt_geom = 'LINESTRING (0.00000000 14.81000042,10.00000000 14.81000042,20.00000000 14.81000042,30.00000000 14.60999966,39.00000000 14.60999966)' assert ogrtest.check_feature_geometry(feat, wkt_geom) == 0, \ feat.GetGeometryRef().ExportToWkt() feat.Destroy() feat = gdaltest.dods_lines.GetNextFeature() if feat is not None: feat.Destroy() pytest.fail('got more than expected number of features.') ############################################################################### # Simple 1D Grid. # @pytest.mark.skip() def test_ogr_dods_5(): if ogrtest.dods_drv is None: pytest.skip() srv = 'http://uhslc1.soest.hawaii.edu/cgi-bin/nph-nc/fast/m004.nc.dds' if gdaltest.gdalurlopen(srv) is None: pytest.skip() grid_ds = ogr.Open('DODS:' + srv) assert grid_ds is not None lat_lyr = grid_ds.GetLayerByName('latitude') expect = [-0.53166663646698] tr = ogrtest.check_features_against_list(lat_lyr, 'latitude', expect) assert tr != 0 ############################################################################### # @pytest.mark.skip() def test_ogr_dods_cleanup(): if gdaltest.dods_ds is None: pytest.skip() gdaltest.dods_profiles = None gdaltest.dods_lines = None gdaltest.dods_normalized = None gdaltest.dods_ds.Destroy() gdaltest.dods_ds = None gdalautotest-3.1.2/ogr/ogr_db2_hack.py0000775000175000017500000000772413701060013016344 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_db2_hack.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test DB2 V7.2 WKB support. DB2 7.2 had a corrupt WKB format # and OGR supports reading and writing it for compatibility (done # on behalf of Safe Software). # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### from osgeo import ogr import pytest ############################################################################### # Create a point in DB2 format, and verify the byte order flag. def test_ogr_db2_hack_1(): if ogr.SetGenerate_DB2_V72_BYTE_ORDER(1) != 0: pytest.skip() # XDR Case. geom = ogr.CreateGeometryFromWkt('POINT(10 20)') wkb = geom.ExportToWkb(byte_order=ogr.wkbXDR).decode('latin1') geom.Destroy() assert wkb[0] == '0', 'WKB wkbXDR point geometry has wrong byte order' # NDR Case. geom = ogr.CreateGeometryFromWkt('POINT(10 20)') wkb = geom.ExportToWkb(byte_order=ogr.wkbNDR).decode('latin1') geom.Destroy() assert wkb[0] == '1', 'WKB wkbNDR point geometry has wrong byte order' ############################################################################### # Verify that we can turn DB2 V7.2 mode back off! def test_ogr_db2_hack_2(): assert ogr.SetGenerate_DB2_V72_BYTE_ORDER(0) == 0, \ 'SetGenerate to turn off hack failed!' # XDR Case. geom = ogr.CreateGeometryFromWkt('POINT(10 20)') wkb = geom.ExportToWkb(byte_order=ogr.wkbXDR).decode('latin1') geom.Destroy() assert wkb[0] == chr(0), 'WKB wkbXDR point geometry has wrong byte order' # NDR Case. geom = ogr.CreateGeometryFromWkt('POINT(10 20)') wkb = geom.ExportToWkb(byte_order=ogr.wkbNDR).decode('latin1') geom.Destroy() assert wkb[0] == chr(1), 'WKB wkbNDR point geometry has wrong byte order' ############################################################################### # Try a more complex geometry, and verify we can read it back. def test_ogr_db2_hack_3(): if ogr.SetGenerate_DB2_V72_BYTE_ORDER(1) != 0: pytest.skip() wkt = 'MULTIPOLYGON (((10.00121344 2.99853145,10.00121344 1.99853145,11.00121343 1.99853148,11.00121343 2.99853148)),((10.00121344 2.99853145,10.00121344 3.99853145,9.00121345 3.99853143,9.00121345 2.99853143)))' geom = ogr.CreateGeometryFromWkt(wkt) wkb = geom.ExportToWkb() geom.Destroy() # Check primary byte order value. assert wkb.decode('latin1')[0] == '0' or wkb.decode('latin1')[0] == '1', \ 'corrupt primary geometry byte order' # Check component geometry byte order assert wkb.decode('latin1')[9] == '0' or wkb.decode('latin1')[9] == '1', \ 'corrupt sub-geometry byte order' geom = ogr.CreateGeometryFromWkb(wkb) assert geom.ExportToWkt() == wkt, ('Conversion to/from DB2 format seems to have ' 'corrupted geometry.') geom.Destroy() ogr.SetGenerate_DB2_V72_BYTE_ORDER(0) gdalautotest-3.1.2/ogr/ogr_pdf.py0000775000175000017500000005662513701060013015464 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_pdf.py 8fef404f981b5830fad78f1023c1d0c0964ed142 2020-05-28 14:16:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR PDF driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest def has_read_support(): if ogr.GetDriverByName('PDF') is None: return False # Check read support gdal_pdf_drv = gdal.GetDriverByName('PDF') md = gdal_pdf_drv.GetMetadata() if 'HAVE_POPPLER' not in md and 'HAVE_PODOFO' not in md and 'HAVE_PDFIUM' not in md: return False return True ############################################################################### # Test write support def test_ogr_pdf_1(name='tmp/ogr_pdf_1.pdf', write_attributes='YES'): if ogr.GetDriverByName('PDF') is None: pytest.skip() sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds = ogr.GetDriverByName('PDF').CreateDataSource(name, options=['STREAM_COMPRESS=NONE', 'MARGIN=10', 'OGR_WRITE_ATTRIBUTES=%s' % write_attributes, 'OGR_LINK_FIELD=linkfield']) lyr = ds.CreateLayer('first_layer', srs=sr) lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('linkfield', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2 49)')) feat.SetField('strfield', 'super tex !') feat.SetField('linkfield', 'http://gdal.org/') feat.SetStyleString('LABEL(t:{strfield},dx:5,dy:10,a:45,p:4)') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2 48,3 50)')) feat.SetField('strfield', 'str') feat.SetField('intfield', 1) feat.SetField('realfield', 2.34) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2 48,2 49,3 49,3 48,2 48))')) feat.SetField('linkfield', 'http://gdal.org/') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2 48,2 49,3 49,3 48,2 48),(2.25 48.25,2.25 48.75,2.75 48.75,2.75 48.25,2.25 48.25))')) lyr.CreateFeature(feat) for i in range(10): feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetStyleString('SYMBOL(c:#FF0000,id:"ogr-sym-%d",s:10)' % i) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(%f 49.1)' % (2 + i * 0.05))) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetStyleString('SYMBOL(c:#000000,id:"../gcore/data/byte.tif")') feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2.5 49.1)')) lyr.CreateFeature(feat) ds = None # Do a quick test to make sure the text came out OK. wantedstream = 'BT\n' + \ '362.038672 362.038672 -362.038672 362.038672 18.039040 528.960960 Tm\n' + \ '0.000000 0.000000 0.000000 rg\n' + \ '/F1 0.023438 Tf\n' + \ '(super tex !) Tj\n' + \ 'ET' with open(name, 'rb') as f: data = f.read(8192) assert wantedstream.encode('utf-8') in data, \ 'Wrong text data in written PDF stream' ############################################################################### # Test read support def test_ogr_pdf_2(name='tmp/ogr_pdf_1.pdf', has_attributes=True): if not has_read_support(): pytest.skip() ds = ogr.Open(name) assert ds is not None lyr = ds.GetLayerByName('first_layer') assert lyr is not None if has_attributes: assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('strfield')).GetType() == ogr.OFTString assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('intfield')).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('realfield')).GetType() == ogr.OFTReal else: assert lyr.GetLayerDefn().GetFieldCount() == 0 if has_attributes: feat = lyr.GetNextFeature() # This won't work properly until text support is added to the # PDF vector feature reader # if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT(2 49)')) != 0: # feat.DumpReadable() # gdaltest.post_reason('fail') # return 'fail' feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('LINESTRING(2 48,3 50)')) != 0: feat.DumpReadable() pytest.fail() if has_attributes: if feat.GetField('strfield') != 'str': feat.DumpReadable() pytest.fail() if feat.GetField('intfield') != 1: feat.DumpReadable() pytest.fail() if feat.GetFieldAsDouble('realfield') != pytest.approx(2.34, abs=1e-10): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POLYGON((2 48,2 49,3 49,3 48,2 48))')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POLYGON((2 48,2 49,3 49,3 48,2 48),(2.25 48.25,2.25 48.75,2.75 48.75,2.75 48.25,2.25 48.25))')) != 0: feat.DumpReadable() pytest.fail() for i in range(10): feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT(%f 49.1)' % (2 + i * 0.05))) != 0: feat.DumpReadable() pytest.fail('fail with ogr-sym-%d' % i) feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT(2.5 49.1)')) != 0: feat.DumpReadable() pytest.fail('fail with raster icon') ds = None ############################################################################### # Test write support without writing attributes def test_ogr_pdf_3(): return test_ogr_pdf_1('tmp/ogr_pdf_2.pdf', 'NO') ############################################################################### # Check read support without writing attributes def test_ogr_pdf_4(): return test_ogr_pdf_2('tmp/ogr_pdf_2.pdf', False) ############################################################################### # Switch from poppler to podofo if both are available def test_ogr_pdf_4_podofo(): gdal_pdf_drv = gdal.GetDriverByName('PDF') if gdal_pdf_drv is None: pytest.skip() md = gdal_pdf_drv.GetMetadata() if 'HAVE_POPPLER' in md and 'HAVE_PODOFO' in md: gdal.SetConfigOption("GDAL_PDF_LIB", "PODOFO") print('Using podofo now') ret = test_ogr_pdf_4() gdal.SetConfigOption("GDAL_PDF_LIB", None) return ret pytest.skip() ############################################################################### # Test read support with OGR_PDF_READ_NON_STRUCTURED=YES def test_ogr_pdf_5(): if not has_read_support(): pytest.skip() with gdaltest.config_option('OGR_PDF_READ_NON_STRUCTURED', 'YES'): ds = ogr.Open('data/drawing.pdf') assert ds is not None lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 8 ############################################################################### # Test read support of polygon with holes and Bezier curves def test_ogr_pdf_bezier_curve_and_polygon_holes(): if not has_read_support(): pytest.skip() with gdaltest.config_option('OGR_PDF_READ_NON_STRUCTURED', 'YES'): ds = ogr.Open('data/bezier_curve_and_polygon_holes.pdf') assert ds is not None lyr = ds.GetLayer(0) feat = lyr.GetFeature(2) expected_wkt = """POLYGON ((8444.60213541667 6332.05489588889,8444.71174575 6331.98745444444,8444.82702558333 6331.926391,8444.94655754167 6331.87099688889,8445.06892425 6331.82056344444,8445.19270833333 6331.774382,8445.31649241667 6331.73174388889,8445.438859125 6331.69194044444,8445.55839108333 6331.654263,8445.67367091667 6331.61800288889,8445.78328125 6331.58245144444,8445.89289158333 6331.58256955556,8446.00817141667 6331.58339633334,8446.127703375 6331.58564044444,8446.25007008333 6331.59001055556,8446.37385416667 6331.59721533333,8446.49763825 6331.60796344444,8446.62000495833 6331.62296355556,8446.73953691667 6331.64292433333,8446.85481675 6331.66855444444,8446.96442708333 6331.70056255555,8447.17360801042 6331.77851588889,8447.37641075 6331.87064255556,8447.57354398958 6331.97694255555,8447.76571641667 6332.09741588889,8447.95363671875 6332.23206255555,8448.13801358333 6332.38088255556,8448.31955569792 6332.54387588889,8448.49897175 6332.72104255556,8448.67697042709 6332.91238255556,8448.85426041667 6333.11789588889,8449.02056575 6333.43679588889,8449.16419308334 6333.75569588889,8449.28372504167 6334.07459588889,8449.37774425 6334.39349588889,8449.44483333333 6334.71239588889,8449.48357491667 6335.03129588889,8449.492551625 6335.35019588889,8449.47034608333 6335.66909588889,8449.41554091667 6335.98799588889,8449.32671875 6336.30689588889,8449.19572967709 6336.69654444444,8449.01584116667 6337.08548433334,8448.78776190625 6337.47300688889,8448.51220058333 6337.85840344444,8448.18986588542 6338.24096533333,8447.8214665 6338.61998388889,8447.40771111458 6338.99475044445,8446.94930841667 6339.36455633333,8446.44696709375 6339.72869288889,8445.90139583333 6340.08645144444,8445.41240145833 6340.39082377778,8444.93758083334 6340.66472344445,8444.47693395833 6340.90602444444,8444.03046083333 6341.11260077778,8443.59816145833 6341.28232644444,8443.18003583333 6341.41307544444,8442.77608395833 6341.50272177778,8442.38630583334 6341.54913944444,8442.01070145833 6341.55020244444,8441.64927083333 6341.50378477778,8441.33402301042 6341.45429622222,8441.02657075 6341.37716966667,8440.72762273958 6341.27311377778,8440.43788766667 6341.14283722222,8440.15807421875 6340.98704866667,8439.88889108333 6340.80645677778,8439.63104694792 6340.60177022222,8439.3852505 6340.37369766667,8439.15221042708 6340.12294777778,8438.93263541667 6339.85022922222,8438.82999384375 6339.67294444445,8438.73514783333 6339.494951,8438.64880607291 6339.31554022222,8438.57167725 6339.13400344444,8438.50447005208 6338.949632,8438.44789316667 6338.76171722222,8438.40265528125 6338.56955044444,8438.36946508333 6338.372423,8438.34903126042 6338.16962622222,8438.3420625 6337.96045144444,8438.34572405208 6337.77997766667,8438.35718116667 6337.59383455556,8438.37714253125 6337.40343944444,8438.40631683333 6337.21020966667,8438.44541276042 6337.01556255555,8438.495139 6336.82091544444,8438.55620423958 6336.62768566667,8438.62931716667 6336.43729055555,8438.71518646875 6336.25114744444,8438.81452083333 6336.07067366667,8438.92436739584 6335.89693222222,8439.04130083334 6335.72956877778,8439.16532114583 6335.56787466666,8439.29642833334 6335.41114122222,8439.43462239583 6335.25865977778,8439.57990333333 6335.10972166667,8439.73227114583 6334.96361822222,8439.89172583333 6334.81964077778,8440.05826739583 6334.67708066667,8440.23189583333 6334.53522922222,8440.51537083333 6334.36881066667,8440.79884583333 6334.22436077778,8441.08232083333 6334.10258822222,8441.36579583334 6334.00420166667,8441.64927083333 6333.92990977778,8441.93274583333 6333.88042122222,8442.21622083333 6333.85644466667,8442.49969583333 6333.85868877778,8442.78317083333 6333.88786222222,8443.06664583333 6333.94467366667,8443.34634116667 6333.990737,8443.61753225 6334.05806033333,8443.87880170833 6334.14664366667,8444.12873216667 6334.256487,8444.36590625 6334.38759033333,8444.58890658333 6334.53995366667,8444.79631579167 6334.713577,8444.9867165 6334.90846033333,8445.15869133333 6335.12460366667,8445.31082291667 6335.362007,8445.41027539583 6335.50385844445,8445.4969715 6335.64641855556,8445.57232860417 6335.790396,8445.63776408334 6335.93649944444,8445.6946953125 6336.08543755556,8445.74453966666 6336.237919,8445.78871452083 6336.39465244444,8445.82863725 6336.55634655556,8445.86572522917 6336.72371,8445.90139583333 6336.89745144444,8445.90104148959 6337.0745,8445.89856108334 6337.25083988889,8445.89182855208 6337.42576244444,8445.87871783334 6337.598559,8445.85710286459 6337.76852088889,8445.82485758333 6337.93493944444,8445.77985592708 6338.097106,8445.71997183333 6338.25431188889,8445.64307923958 6338.40584844444,8445.54705208333 6338.551007,8445.54705208333 6338.551007,8445.85214205208 6338.37384033333,8446.13101058334 6338.19667366667,8446.38578373958 6338.019507,8446.61858758333 6337.84234033333,8446.83154817708 6337.66517366667,8447.02679158333 6337.488007,8447.20644386458 6337.31084033333,8447.37263108333 6337.13367366667,8447.52747930209 6336.956507,8447.67311458333 6336.77934033333,8447.77575615625 6336.60229177778,8447.87060216667 6336.42595188889,8447.95694392708 6336.25102933333,8448.03407275 6336.07823277778,8448.10127994792 6335.90827088889,8448.15785683334 6335.74185233333,8448.20309471875 6335.57968577778,8448.23628491667 6335.42247988889,8448.25671873958 6335.27094333333,8448.2636875 6335.12578477778,8448.2601440625 6334.98735855556,8448.24951375 6334.85460166667,8448.2317965625 6334.72609677778,8448.2069925 6334.60042655555,8448.1751015625 6334.47617366667,8448.13612375 6334.35192077778,8448.0900590625 6334.22625055555,8448.0369075 6334.09774566667,8447.9766690625 6333.96498877778,8447.90934375 6333.82656255556,8447.79961530208 6333.69179777778,8447.68350866667 6333.57049766667,8447.56173253125 6333.46195355555,8447.43499558333 6333.36545677778,8447.30400651042 6333.28029866667,8447.169474 6333.20577055555,8447.03210673958 6333.14116377778,8446.89261341667 6333.08576966667,8446.75170271875 6333.03887955556,8446.61008333333 6332.99978477778,8446.50035488542 6333.000021,8446.38424825 6333.00167455556,8446.26247211458 6333.00616277777,8446.13573516667 6333.014903,8446.00474609375 6333.02931255556,8445.87021358333 6333.05080877778,8445.73284632292 6333.080809,8445.593353 6333.12073055556,8445.45244230208 6333.17199077778,8445.31082291667 6333.236007,8444.60213541667 6332.05489588889),(8443.65721875 6339.614007,8443.82730375 6339.50085655556,8443.983215 6339.37495011111,8444.1249525 6339.237705,8444.25251625 6339.09053855556,8444.36590625 6338.93486811111,8444.4651225 6338.772111,8444.550165 6338.60368455556,8444.62103375 6338.43100611111,8444.67772875 6338.255493,8444.72025 6338.07856255556,8444.78060655209 6337.90139588889,8444.82041116667 6337.72422922222,8444.84037253125 6337.54706255555,8444.84119933333 6337.36989588889,8444.82360026042 6337.19272922222,8444.788284 6337.01556255555,8444.73595923958 6336.83839588889,8444.66733466667 6336.66122922222,8444.58311896875 6336.48406255556,8444.48402083333 6336.30689588889,8444.3708670625 6336.168824,8444.24495691667 6336.03854744445,8444.10770777083 6335.91677488889,8443.960537 6335.804215,8443.80486197917 6335.70157644444,8443.64210008333 6335.60956788889,8443.4736686875 6335.528898,8443.30098516667 6335.46027544444,8443.12546689583 6335.40440888889,8442.94853125 6335.362007,8442.76805216667 6335.33696744445,8442.58190358334 6335.33177055556,8442.391502875 6335.344999,8442.19826741667 6335.37523544444,8442.00361458333 6335.42106255555,8441.80896175 6335.481063,8441.61572629167 6335.55381944444,8441.42532558333 6335.63791455556,8441.239177 6335.731931,8441.05869791667 6335.83445144444,8440.85329665625 6335.97961,8440.66277783333 6336.13114655556,8440.48785013541 6336.28835244444,8440.32922225 6336.450519,8440.18760286458 6336.61693755556,8440.06370066667 6336.78689944444,8439.95822434375 6336.959696,8439.87188258333 6337.13461855556,8439.80538407292 6337.31095844444,8439.7594375 6337.488007,8439.69908094792 6337.69387466667,8439.65927633334 6337.887695,8439.63931496875 6338.071594,8439.63848816667 6338.24769766667,8439.65608723958 6338.418132,8439.6914035 6338.585023,8439.74372826042 6338.75049666667,8439.81235283333 6338.916679,8439.89656853125 6339.085696,8439.99566666667 6339.25967366667,8440.06677164583 6339.36243033333,8440.139294 6339.45810033333,8440.21465110416 6339.54668366666,8440.29426033333 6339.62818033333,8440.3795390625 6339.70259033333,8440.47190466667 6339.76991366667,8440.57277452083 6339.83015033333,8440.683566 6339.88330033333,8440.80569647917 6339.92936366667,8440.94058333333 6339.96834033333,8441.05031178125 6340.03235655556,8441.16641841667 6340.08361677778,8441.28819455208 6340.12353833333,8441.4149315 6340.15353855556,8441.54592057292 6340.17503477778,8441.68045308333 6340.18944433333,8441.81782034375 6340.19818455555,8441.95731366667 6340.20267277778,8442.09822436458 6340.20432633333,8442.23984375 6340.20456255555,8442.38158125 6340.168893,8442.52331875 6340.13180611111,8442.66505625 6340.09188455556,8442.80679375 6340.047711,8442.94853125 6339.99786811111,8443.09026875 6339.94093855556,8443.23200625 6339.875505,8443.37374375 6339.80015011111,8443.51548125 6339.71345655556,8443.65721875 6339.614007))""" if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt(expected_wkt)) != 0: feat.DumpReadable() pytest.fail() ############################################################################### # Test read support with a non-OGR datasource def test_ogr_pdf_online_1(): if not has_read_support(): pytest.skip() if not gdaltest.download_file('http://www.terragotech.com/images/pdf/webmap_urbansample.pdf', 'webmap_urbansample.pdf'): pytest.skip() expected_layers = [ ["Cadastral Boundaries", ogr.wkbPolygon], ["Water Lines", ogr.wkbLineString], ["Sewerage Lines", ogr.wkbLineString], ["Sewerage Jump-Ups", ogr.wkbLineString], ["Roads", ogr.wkbUnknown], ["Water Points", ogr.wkbPoint], ["Sewerage Pump Stations", ogr.wkbPoint], ["Sewerage Man Holes", ogr.wkbPoint], ["BPS - Buildings", ogr.wkbPolygon], ["BPS - Facilities", ogr.wkbPolygon], ["BPS - Water Sources", ogr.wkbPoint], ] ds = ogr.Open('tmp/cache/webmap_urbansample.pdf') assert ds is not None assert ds.GetLayerCount() == len(expected_layers) for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() == expected_layers[i][0], \ ('%d : %s' % (i, ds.GetLayer(i).GetName())) assert ds.GetLayer(i).GetGeomType() == expected_layers[i][1], \ ('%d : %d' % (i, ds.GetLayer(i).GetGeomType())) lyr = ds.GetLayerByName('Water Points') feat = lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT (724431.316665166523308 7672947.212302438914776)')) != 0: feat.DumpReadable() pytest.fail() assert feat.GetField('ID') == 'VL46' ############################################################################### # Test read support of non-structured content def test_ogr_pdf_online_2(): if not has_read_support(): pytest.skip() if not gdaltest.download_file('https://download.osgeo.org/gdal/data/pdf/340711752_Azusa_FSTopo.pdf', '340711752_Azusa_FSTopo.pdf'): pytest.skip() expected_layers = [ ['Other_5', 0], ['Quadrangle_Extent_Other_4', 0], ['Quadrangle_Extent_State_Outline', 0], ['Adjacent_Quadrangle_Diagram_Other_3', 0], ['Adjacent_Quadrangle_Diagram_Quadrangle_Extent', 0], ['Adjacent_Quadrangle_Diagram_Quad_Outlines', 0], ['Quadrangle_Other', 0], ['Quadrangle_Labels_Unplaced_Labels_Road_Shields_-_Vertical', 0], ['Quadrangle_Labels_Road_Shields_-_Horizontal', 0], ['Quadrangle_Labels_Road_Shields_-_Vertical', 0], ['Quadrangle_Neatline/Mask_Neatline', 0], ['Quadrangle_Neatline/Mask_Mask', 0], ['Quadrangle_Culture_Features', 0], ['Quadrangle_Large_Tanks', 0], ['Quadrangle_Linear_Transportation_Features', 0], ['Quadrangle_Railroads_', 0], ['Quadrangle_Linear_Culture_Features', 0], ['Quadrangle_Linear_Landform_Features', 0], ['Quadrangle_Boundaries', 0], ['Quadrangle_PLSS', 0], ['Quadrangle_Survey_Lines', 0], ['Quadrangle_Linear_Drainage_Features', 0], ['Quadrangle_Contour_Labels', 0], ['Quadrangle_Contours', 0], ['Quadrangle_2_5`_Tics_Interior_Grid_Intersections', 0], ['Quadrangle_2_5`_Tics_Grid_Tics_along_Neatline', 0], ['Quadrangle_UTM_Grid_Interior_Grid_Intersections', 0], ['Quadrangle_UTM_Grid_Grid_Tics_along_Neatline', 0], ['Quadrangle_UTM_Grid_UTM_Grid_Lines', 0], ['Quadrangle_Large_Buildings', 0], ['Quadrangle_Drainage_Polygons', 0], ['Quadrangle_Ownership', 0], ['Quadrangle_Builtup_Areas', 0], ['Quadrangle_WoodlandUSGS_P', 0], ] ds = ogr.Open('tmp/cache/340711752_Azusa_FSTopo.pdf') assert ds is not None if ds.GetLayerCount() != len(expected_layers): for lyr in ds: print(lyr.GetName(), lyr.GetGeomType()) pytest.fail(ds.GetLayerCount()) for i in range(ds.GetLayerCount()): assert ds.GetLayer(i).GetName() == expected_layers[i][0], \ ('%d : %s' % (i, ds.GetLayer(i).GetName())) assert ds.GetLayer(i).GetGeomType() == expected_layers[i][1], \ ('%d : %d' % (i, ds.GetLayer(i).GetGeomType())) ############################################################################### # Test PDF with no attributes def test_ogr_pdf_no_attributes(): if not has_read_support(): pytest.skip() sr = osr.SpatialReference() sr.ImportFromEPSG(4326) filename = '/vsimem/test_ogr_pdf_no_attributes.pdf' ds = ogr.GetDriverByName('PDF').CreateDataSource(filename, options=['STREAM_COMPRESS=NONE']) lyr = ds.CreateLayer('first_layer', srs=sr) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2 49,3 50)')) lyr.CreateFeature(feat) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ds = None gdal.Unlink(filename) ############################################################################### # Cleanup def test_ogr_pdf_cleanup(): if ogr.GetDriverByName('PDF') is None: pytest.skip() ogr.GetDriverByName('PDF').DeleteDataSource('tmp/ogr_pdf_1.pdf') ogr.GetDriverByName('PDF').DeleteDataSource('tmp/ogr_pdf_2.pdf') gdalautotest-3.1.2/ogr/ogr_sdts.py0000775000175000017500000000636313701060013015662 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_sdts.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR SDTS driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import ogr import pytest ############################################################################### # Test reading def test_ogr_sdts_1(): gdaltest.sdts_ds = ogr.Open('data/D3607551_rd0s_1_sdts_truncated/TR01CATD.DDF') assert gdaltest.sdts_ds is not None layers = [('ARDF', 164, ogr.wkbNone, [('ENTITY_LABEL', '1700005')]), ('ARDM', 21, ogr.wkbNone, [('ROUTE_NUMBER', 'SR 1200')]), ('AHDR', 1, ogr.wkbNone, [('BANNER', 'USGS-NMD DLG DATA - CHARACTER FORMAT - 09-29-87 VERSION ')]), ('NP01', 4, ogr.wkbPoint, [('RCID', '1')]), ('NA01', 34, ogr.wkbPoint, [('RCID', '2')]), ('NO01', 88, ogr.wkbPoint, [('RCID', '1')]), ('LE01', 27, ogr.wkbLineString, [('RCID', '1')]), ('PC01', 35, ogr.wkbPolygon, [('RCID', '1')]) ] for layer in layers: lyr = gdaltest.sdts_ds.GetLayerByName(layer[0]) assert lyr is not None, ('could not get layer %s' % (layer[0])) assert lyr.GetFeatureCount() == layer[1], \ ('wrong number of features for layer %s : %d. %d were expected ' % (layer[0], lyr.GetFeatureCount(), layer[1])) assert lyr.GetLayerDefn().GetGeomType() == layer[2] feat_read = lyr.GetNextFeature() for item in layer[3]: if feat_read.GetFieldAsString(item[0]) != item[1]: print(layer[0]) print('"%s"' % (item[1])) pytest.fail('"%s"' % (feat_read.GetField(item[0]))) gdaltest.sdts_ds = None ############################################################################### # gdalautotest-3.1.2/ogr/ogr_gmt.py0000775000175000017500000001752213701060013015473 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_gmt.py 73408e4a938d6fb45b1a01af4812236e464c7159 2019-04-19 22:20:14 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR GMT driver functionality. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr ############################################################################### # Open Memory datasource. def test_ogr_gmt_1(): gmt_drv = ogr.GetDriverByName('GMT') gdaltest.gmt_ds = gmt_drv.CreateDataSource('tmp/tpoly.gmt') assert gdaltest.gmt_ds is not None ############################################################################### # Create table from data/poly.shp def test_ogr_gmt_2(): ####################################################### # Create gmtory Layer gdaltest.gmt_lyr = gdaltest.gmt_ds.CreateLayer('tpoly') ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.gmt_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.gmt_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.gmt_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() gdaltest.gmt_lyr = None gdaltest.gmt_ds = None ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_gmt_3(): gdaltest.gmt_ds = ogr.Open('tmp/tpoly.gmt') gdaltest.gmt_lyr = gdaltest.gmt_ds.GetLayer(0) expect = [168, 169, 166, 158, 165] gdaltest.gmt_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.gmt_lyr, 'eas_id', expect) gdaltest.gmt_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.gmt_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.000000001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) gdaltest.poly_feat = None gdaltest.shp_ds = None gdaltest.gmt_lyr = None gdaltest.gmt_ds = None assert tr ############################################################################### # Verify reading of multilinestring file. (#3802) def test_ogr_gmt_4(): ds = ogr.Open('data/test_multi.gmt') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetGeomType() == ogr.wkbMultiLineString, \ 'did not get expected multilinestring type.' feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((175 -45,176 -45),(180.0 -45.3,179.0 -45.4))') assert feat.GetField('name') == 'feature 1', 'got wrong name, feature 1' feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'MULTILINESTRING ((175.1 -45.0,175.2 -45.1),(180.1 -45.3,180.0 -45.2))') assert feat.GetField('name') == 'feature 2', 'got wrong name, feature 2' feat = lyr.GetNextFeature() assert feat is None, 'did not get null feature when expected.' ############################################################################### # Write a multipolygon file and verify it. def test_ogr_gmt_5(): ####################################################### # Create gmtory Layer gmt_drv = ogr.GetDriverByName('GMT') gdaltest.gmt_ds = gmt_drv.CreateDataSource('tmp/mpoly.gmt') gdaltest.gmt_lyr = gdaltest.gmt_ds.CreateLayer('mpoly') ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.gmt_lyr, [('ID', ogr.OFTInteger)]) ####################################################### # Write a first multipolygon dst_feat = ogr.Feature(feature_def=gdaltest.gmt_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly( ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 10,10 10,0 10,0 0),(3 3,4 4, 3 4,3 3)),((12 0,14 0,12 3,12 0)))')) dst_feat.SetField('ID', 15) gdal.SetConfigOption('GMT_USE_TAB', 'TRUE') # Ticket #6453 gdaltest.gmt_lyr.CreateFeature(dst_feat) gdal.SetConfigOption('GMT_USE_TAB', None) dst_feat = ogr.Feature(feature_def=gdaltest.gmt_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly( ogr.CreateGeometryFromWkt('MULTIPOLYGON(((30 20,40 20,30 30,30 20)))')) dst_feat.SetField('ID', 16) gdaltest.gmt_lyr.CreateFeature(dst_feat) gdaltest.gmt_lyr = None gdaltest.gmt_ds = None # Reopen. ds = ogr.Open('tmp/mpoly.gmt') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetGeomType() == ogr.wkbMultiPolygon, \ 'did not get expected multipolygon type.' feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON(((0 0,0 10,10 10,0 10,0 0),(3 3,4 4, 3 4,3 3)),((12 0,14 0,12 3,12 0)))') assert feat.GetField('ID') == 15, 'got wrong id, first feature' feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'MULTIPOLYGON(((30 20,40 20,30 30,30 20)))') assert feat.GetField('ID') == 16, 'got wrong ID, second feature' feat = lyr.GetNextFeature() assert feat is None, 'did not get null feature when expected.' ############################################################################### # Test reading a file with just point coordinates def test_ogr_gmt_coord_only(): with gdaltest.tempfile('/vsimem/test.gmt', """1 2 3\n"""): ds = ogr.Open('/vsimem/test.gmt') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(f, 'POINT Z (1 2 3)'), f.GetGeometryRef().ExportToIsoWkt() ############################################################################### # def test_ogr_gmt_cleanup(): if gdaltest.gmt_ds is not None: gdaltest.gmt_lyr = None gdaltest.gmt_ds = None gdaltest.clean_tmp() gdalautotest-3.1.2/ogr/ogr_mssqlspatial.py0000775000175000017500000003055413701060013017421 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_mssqlspatial.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test MSSQLSpatial driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2018, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Open Database. def test_ogr_mssqlspatial_1(): gdaltest.mssqlspatial_ds = None if ogr.GetDriverByName('MSSQLSpatial') is None: pytest.skip() gdaltest.mssqlspatial_dsname = gdal.GetConfigOption( 'OGR_MSSQL_CONNECTION_STRING', # localhost doesn't work under chroot 'MSSQL:server=127.0.0.1;database=TestDB;driver=ODBC Driver 17 for SQL Server;UID=SA;PWD=DummyPassw0rd') gdaltest.mssqlspatial_ds = ogr.Open(gdaltest.mssqlspatial_dsname, update=1) if gdaltest.mssqlspatial_ds is None: pytest.skip() # Fetch and store the major-version number of the SQL Server engine in use sql_lyr = gdaltest.mssqlspatial_ds.ExecuteSQL( 'SELECT SERVERPROPERTY(\'ProductVersion\')') feat = sql_lyr.GetNextFeature() gdaltest.mssqlspatial_version = feat.GetFieldAsString(0) gdaltest.mssqlspatial_ds.ReleaseResultSet(sql_lyr) gdaltest.mssqlspatial_version_major = -1 if '.' in gdaltest.mssqlspatial_version: version_major_str = gdaltest.mssqlspatial_version[ 0:gdaltest.mssqlspatial_version.find('.')] if version_major_str.isdigit(): gdaltest.mssqlspatial_version_major = int(version_major_str) # Check whether the database server provides support for Z and M values, # available since SQL Server 2012 gdaltest.mssqlspatial_has_z_m = (gdaltest.mssqlspatial_version_major >= 11) ############################################################################### # Create table from data/poly.shp def test_ogr_mssqlspatial_2(): if gdaltest.mssqlspatial_ds is None: pytest.skip() shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) ###################################################### # Create Layer gdaltest.mssqlspatial_lyr = gdaltest.mssqlspatial_ds.CreateLayer( 'tpoly', srs=shp_lyr.GetSpatialRef()) ###################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.mssqlspatial_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString), ('SHORTNAME', ogr.OFTString, 8), ('INT64', ogr.OFTInteger64)]) ###################################################### # Copy in poly.shp dst_feat = ogr.Feature( feature_def=gdaltest.mssqlspatial_lyr.GetLayerDefn()) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) dst_feat.SetField('INT64', 1234567890123) gdaltest.mssqlspatial_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() dst_feat = None assert gdaltest.mssqlspatial_lyr.GetFeatureCount() == shp_lyr.GetFeatureCount(), \ 'not matching feature count' got_srs = gdaltest.mssqlspatial_lyr.GetSpatialRef() expected_srs = shp_lyr.GetSpatialRef() assert got_srs.GetAuthorityCode(None) == expected_srs.GetAuthorityCode(None), \ 'not matching spatial ref' ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_mssqlspatial_3(): if gdaltest.mssqlspatial_ds is None: pytest.skip() assert gdaltest.mssqlspatial_lyr.GetGeometryColumn() == 'ogr_geometry' assert gdaltest.mssqlspatial_lyr.GetFeatureCount() == 10 expect = [168, 169, 166, 158, 165] gdaltest.mssqlspatial_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.mssqlspatial_lyr, 'eas_id', expect) assert gdaltest.mssqlspatial_lyr.GetFeatureCount() == 5 gdaltest.mssqlspatial_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.mssqlspatial_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) assert read_feat.GetField('INT64') == 1234567890123 read_feat = None orig_feat = None gdaltest.poly_feat = None gdaltest.shp_ds = None assert tr ############################################################################### # Write more features with a bunch of different geometries, and verify the # geometries are still OK. def test_ogr_mssqlspatial_4(): if gdaltest.mssqlspatial_ds is None: pytest.skip() dst_feat = ogr.Feature( feature_def=gdaltest.mssqlspatial_lyr.GetLayerDefn()) wkt_list = ['10', '2', '1', '4', '5', '6'] # If the database engine supports 3D features, include one in the tests if gdaltest.mssqlspatial_has_z_m: wkt_list.append('3d_1') for item in wkt_list: wkt_filename = 'data/wkb_wkt/' + item + '.wkt' wkt = open(wkt_filename).read() geom = ogr.CreateGeometryFromWkt(wkt) ###################################################################### # Write geometry as a new feature. dst_feat.SetGeometryDirectly(geom) dst_feat.SetField('PRFEDEA', item) dst_feat.SetFID(-1) assert gdaltest.mssqlspatial_lyr.CreateFeature(dst_feat) == ogr.OGRERR_NONE, \ ('CreateFeature failed creating feature ' + 'from file "' + wkt_filename + '"') ###################################################################### # Before reading back the record, verify that the newly added feature # is returned from the CreateFeature method with a newly assigned FID. assert dst_feat.GetFID() != -1, \ 'Assigned FID was not returned in the new feature' ###################################################################### # Read back the feature and get the geometry. gdaltest.mssqlspatial_lyr.SetAttributeFilter("PRFEDEA = '%s'" % item) feat_read = gdaltest.mssqlspatial_lyr.GetNextFeature() geom_read = feat_read.GetGeometryRef() if ogrtest.check_feature_geometry(feat_read, geom) != 0: print(item) print(wkt) pytest.fail(geom_read) feat_read.Destroy() dst_feat.Destroy() gdaltest.mssqlspatial_lyr.ResetReading() # to close implicit transaction ############################################################################### # Run test_ogrsf def test_ogr_mssqlspatial_test_ogrsf(): if gdaltest.mssqlspatial_ds is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + " -ro '" + gdaltest.mssqlspatial_dsname + "' tpoly") assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Verify features can be created in an existing table that includes a geometry # column but is not registered in the "geometry_columns" table. def test_ogr_mssqlspatial_create_feature_in_unregistered_table(): if gdaltest.mssqlspatial_ds is None: pytest.skip() # Create a feature that specifies a spatial-reference system spatial_reference = osr.SpatialReference() spatial_reference.ImportFromEPSG(4326) feature = ogr.Feature(ogr.FeatureDefn('Unregistered')) feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POINT (10 20)', spatial_reference)) # Create a table that includes a geometry column but is not registered in # the "geometry_columns" table gdaltest.mssqlspatial_ds.ExecuteSQL( 'CREATE TABLE Unregistered' + '(' + 'ObjectID int IDENTITY(1,1) NOT NULL PRIMARY KEY,' + 'Shape geometry NOT NULL' + ');') # Create a new MSSQLSpatial data source, one that will find the table just # created and make it available via GetLayerByName() use_geometry_columns = gdal.GetConfigOption( 'MSSQLSPATIAL_USE_GEOMETRY_COLUMNS') gdal.SetConfigOption('MSSQLSPATIAL_USE_GEOMETRY_COLUMNS', 'NO') test_ds = ogr.Open(gdaltest.mssqlspatial_dsname, update=1) gdal.SetConfigOption('MSSQLSPATIAL_USE_GEOMETRY_COLUMNS', use_geometry_columns) assert test_ds is not None, 'cannot open data source' # Get a layer backed by the newly created table and verify that (as it is # unregistered) it has no associated spatial-reference system unregistered_layer = test_ds.GetLayerByName('Unregistered'); assert unregistered_layer is not None, 'did not get Unregistered layer' unregistered_spatial_reference = unregistered_layer.GetSpatialRef() assert unregistered_spatial_reference is None, \ 'layer Unregistered unexpectedly has an SRS' # Verify creating the feature in the layer succeeds despite the lack of an # associated spatial-reference system assert unregistered_layer.CreateFeature(feature) == ogr.OGRERR_NONE, \ 'CreateFeature failed' # Verify the created feature received the spatial-reference system of the # original, as none was associated with the table unregistered_layer.ResetReading() created_feature = unregistered_layer.GetNextFeature() assert created_feature is not None, 'did not get feature' created_feature_geometry = created_feature.GetGeometryRef() created_spatial_reference = created_feature_geometry.GetSpatialReference() assert ((created_spatial_reference == spatial_reference) or ((created_spatial_reference is not None) and created_spatial_reference.IsSame(spatial_reference, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES'] ))), \ 'created-feature SRS does not match original' # Clean up test_ds.Destroy() feature.Destroy() ############################################################################### # def test_ogr_mssqlspatial_cleanup(): if gdaltest.mssqlspatial_ds is None: pytest.skip() gdaltest.mssqlspatial_ds = None gdaltest.mssqlspatial_ds = ogr.Open(gdaltest.mssqlspatial_dsname, update=1) gdaltest.mssqlspatial_ds.ExecuteSQL('DROP TABLE Unregistered') gdaltest.mssqlspatial_ds.ExecuteSQL('DROP TABLE tpoly') gdaltest.mssqlspatial_ds = None gdalautotest-3.1.2/ogr/ogr_gpsbabel.py0000775000175000017500000001012113701060013016447 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_gpsbabel.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR GPSBabel driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import ogr from osgeo import gdal import pytest ############################################################################### # Check that dependencies are met def test_ogr_gpsbabel_init(): # Test if the gpsbabel is accessible ogrtest.have_gpsbabel = False ogrtest.have_read_gpsbabel = False try: ret = gdaltest.runexternal('gpsbabel -V') except OSError: ret = '' if ret.find('GPSBabel') == -1: pytest.skip('Cannot access GPSBabel utility') ds = ogr.Open('data/test.gpx') if ds is None: print('GPX driver not configured for read support') else: ogrtest.have_read_gpsbabel = True ogrtest.have_gpsbabel = True ############################################################################### # Test reading with explicit subdriver def test_ogr_gpsbabel_1(): if not ogrtest.have_read_gpsbabel: pytest.skip() ds = ogr.Open('GPSBabel:nmea:data/nmea.txt') assert ds is not None assert ds.GetLayerCount() == 2 ############################################################################### # Test reading with implicit subdriver def test_ogr_gpsbabel_2(): if not ogrtest.have_read_gpsbabel: pytest.skip() ds = ogr.Open('data/nmea.txt') assert ds is not None assert ds.GetLayerCount() == 2 ############################################################################### # Test writing def test_ogr_gpsbabel_3(): if not ogrtest.have_gpsbabel: pytest.skip() ds = ogr.GetDriverByName('GPSBabel').CreateDataSource('GPSBabel:nmea:tmp/nmea.txt') lyr = ds.CreateLayer('track_points', geom_type=ogr.wkbPoint) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('track_fid', 0) feat.SetField('track_seg_id', 0) feat.SetField('track_name', 'TRACK_NAME') feat.SetField('name', 'PT_NAME') feat.SetField('hdop', 123) feat.SetField('vdop', 456) feat.SetField('pdop', 789) feat.SetField('sat', 6) feat.SetField('time', '2010/06/03 12:34:56') feat.SetField('fix', '3d') geom = ogr.CreateGeometryFromWkt('POINT(2.50 49.25)') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = None lyr = None ds = None f = open('tmp/nmea.txt', 'rt') res = f.read() f.close() gdal.Unlink('tmp/nmea.txt') assert (not (res.find('$GPRMC') == -1 or \ res.find('$GPGGA') == -1 or \ res.find('$GPGSA') == -1)), 'did not get expected result' gdalautotest-3.1.2/ogr/ogr_factory.py0000775000175000017500000007410413701060013016352 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_factory.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test some geometry factory methods, like arc stroking. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2010-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import gdal from osgeo import ogr import pytest def save_as_csv(geom, filename): csv = 'ID,WKT\n0,"%s"\n' % geom.ExportToWkt() open('/home/warmerda/' + filename, 'w').write(csv) ############################################################################### # 30 degree rotated ellipse, just one quarter. def test_ogr_factory_1(): geom = ogr.ApproximateArcAngles(20, 30, 40, 7, 3.5, 30.0, 270.0, 360.0, 6.0) expected_geom = 'LINESTRING (21.75 33.031088913245533 40,22.374083449152831 32.648634669593925 40,22.972155943227843 32.237161430239802 40,23.537664874825239 31.801177382099848 40,24.064414409750082 31.345459257641004 40,24.546633369868303 30.875 40,24.979038463342047 30.394954059253475 40,25.356892169480634 29.910580919184319 40,25.676054644008637 29.427187473276717 40,25.933029076066084 28.95006988128063 40,26.125 28.484455543377237 40,26.249864142195264 28.035445827688662 40,26.306253464980482 27.607960178621322 40,26.293550155134998 27.206682218403525 40,26.211893392779814 26.836008432340218 40,26.062177826491073 26.5 40)' assert not ogrtest.check_feature_geometry(geom, expected_geom) ############################################################################### # Test forceToPolygon() def test_ogr_factory_2(): src_wkt = 'MULTIPOLYGON (((0 0,100 0,100 100,0 0)))' exp_wkt = 'POLYGON((0 0,100 0,100 100,0 0))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTISURFACE (((0 0,100 0,100 100,0 0)))' exp_wkt = 'POLYGON((0 0,100 0,100 100,0 0))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'CURVEPOLYGON ((0 0,100 0,100 100,0 0))' exp_wkt = 'POLYGON((0 0,100 0,100 100,0 0))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'CURVEPOLYGON (CIRCULARSTRING(0 0,0 1,0 2,1 2,2 2,2 1,2 0,1 0,0 0))' exp_wkt = 'POLYGON ((0 0,0 1,0 2,1 2,2 2,2 1,2 0,1 0,0 0))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() ############################################################################### # Test forceToMultiPolygon() def test_ogr_factory_3(): src_wkt = 'POLYGON((0 0,100 0,100 100,0 0))' exp_wkt = 'MULTIPOLYGON (((0 0,100 0,100 100,0 0)))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'GEOMETRYCOLLECTION(POLYGON((0 0,100 0,100 100,0 0)))' exp_wkt = 'MULTIPOLYGON (((0 0,100 0,100 100,0 0)))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'CURVEPOLYGON ((0 0,100 0,100 100,0 0))' exp_wkt = 'MULTIPOLYGON (((0 0,100 0,100 100,0 0)))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTISURFACE (((0 0,100 0,100 100,0 0)))' exp_wkt = 'MULTIPOLYGON (((0 0,100 0,100 100,0 0)))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiPolygon(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() ############################################################################### # Test forceToMultiPoint() def test_ogr_factory_4(): src_wkt = 'POINT(2 5 3)' exp_wkt = 'MULTIPOINT(2 5 3)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiPoint(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'GEOMETRYCOLLECTION(POINT(2 5 3),POINT(4 5 5))' exp_wkt = 'MULTIPOINT(2 5 3,4 5 5)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiPoint(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() ############################################################################### # Test forceToMultiLineString() def test_ogr_factory_5(): src_wkt = 'LINESTRING(2 5,10 20)' exp_wkt = 'MULTILINESTRING((2 5,10 20))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'GEOMETRYCOLLECTION(LINESTRING(2 5,10 20),LINESTRING(0 0,10 10))' exp_wkt = 'MULTILINESTRING((2 5,10 20),(0 0,10 10))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'POLYGON((2 5,10 20),(0 0,10 10))' exp_wkt = 'MULTILINESTRING((2 5,10 20),(0 0,10 10))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTIPOLYGON(((2 5,10 20),(0 0,10 10)),((2 5,10 20)))' exp_wkt = 'MULTILINESTRING((2 5,10 20),(0 0,10 10),(2 5,10 20))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToMultiLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() ############################################################################### # Test robustness of forceToXXX() primitives with various inputs (#3504) def test_ogr_factory_6(): src_wkt_list = [None, 'POINT EMPTY', 'LINESTRING EMPTY', 'POLYGON EMPTY', 'MULTIPOINT EMPTY', 'MULTILINESTRING EMPTY', 'MULTIPOLYGON EMPTY', 'GEOMETRYCOLLECTION EMPTY', 'POINT(0 0)', 'LINESTRING(0 0)', 'POLYGON((0 0))', 'POLYGON(EMPTY,(0 0),EMPTY,(1 1))', 'MULTIPOINT(EMPTY,(0 0),EMPTY,(1 1))', 'MULTILINESTRING(EMPTY,(0 0),EMPTY,(1 1))', 'MULTIPOLYGON(((0 0),EMPTY,(1 1)),EMPTY,((2 2)))', 'GEOMETRYCOLLECTION(POINT EMPTY)', 'GEOMETRYCOLLECTION(LINESTRING EMPTY)', 'GEOMETRYCOLLECTION(POLYGON EMPTY)', 'GEOMETRYCOLLECTION(MULTIPOINT EMPTY)', 'GEOMETRYCOLLECTION(MULTILINESTRING EMPTY)', 'GEOMETRYCOLLECTION(MULTIPOLYGON EMPTY)', 'GEOMETRYCOLLECTION(GEOMETRYCOLLECTION EMPTY)', 'GEOMETRYCOLLECTION(POINT(0 0))', 'GEOMETRYCOLLECTION(LINESTRING(0 0),LINESTRING(1 1))', 'GEOMETRYCOLLECTION(POLYGON((0 0),EMPTY,(2 2)), POLYGON((1 1)))', 'CURVEPOLYGON EMPTY', 'CURVEPOLYGON ((0 0,0 1,1 1,1 0,0 0))', 'CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'COMPOUNDCURVE EMPTY', 'COMPOUNDCURVE ((0 0,0 1,1 1,1 0,0 0))', 'COMPOUNDCURVE (CIRCULARSTRING(0 0,1 0,0 0))', 'CIRCULARSTRING EMPTY', 'CIRCULARSTRING (0 0,1 0,0 0)', 'MULTISURFACE EMPTY', 'MULTISURFACE (((0 0,0 1,1 1,1 0,0 0)))', 'MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,1 0,0 0)))', 'MULTICURVE EMPTY', 'MULTICURVE ((0 0,0 1))', 'MULTICURVE (COMPOUNDCURVE((0 0,0 1)))', 'MULTICURVE (CIRCULARSTRING (0 0,1 0,0 0))', ] for src_wkt in src_wkt_list: if src_wkt is None: src_geom = None else: src_geom = ogr.CreateGeometryFromWkt(src_wkt) ogr.ForceToPolygon(src_geom) ogr.ForceToMultiPolygon(src_geom) ogr.ForceToMultiPoint(src_geom) ogr.ForceToMultiLineString(src_geom) ogr.ForceToLineString(src_geom) for target_type in range(ogr.wkbMultiSurface): gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.ForceTo(src_geom, 1 + target_type) gdal.PopErrorHandler() # print(src_geom.ExportToWkt(), dst_geom1.ExportToWkt(), dst_geom2.ExportToWkt(), dst_geom3.ExportToWkt(), dst_geom4.ExportToWkt()) ############################################################################### # Test forceToLineString() def test_ogr_factory_7(): src_wkt = 'LINESTRING(2 5,10 20)' exp_wkt = 'LINESTRING(2 5,10 20)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTILINESTRING((2 5,10 20))' exp_wkt = 'LINESTRING(2 5,10 20)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTICURVE((2 5,10 20))' exp_wkt = 'LINESTRING(2 5,10 20)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTICURVE(COMPOUNDCURVE((2 5,10 20)))' exp_wkt = 'LINESTRING(2 5,10 20)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTILINESTRING((2 5,10 20),(3 4,30 40))' exp_wkt = 'MULTILINESTRING((2 5,10 20),(3 4,30 40))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTILINESTRING((2 5,10 20),(10 20,30 40))' exp_wkt = 'LINESTRING (2 5,10 20,30 40)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'GEOMETRYCOLLECTION(LINESTRING(2 5,10 20),LINESTRING(10 20,30 40))' exp_wkt = 'LINESTRING (2 5,10 20,30 40)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTILINESTRING((2 5,10 20),(10 20))' exp_wkt = 'MULTILINESTRING((2 5,10 20),(10 20))' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'MULTILINESTRING((2 5,10 20),(10 20,30 40),(30 40,50 60))' exp_wkt = 'LINESTRING (2 5,10 20,30 40,50 60)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'POLYGON ((0 0,0 1,1 1,1 0,0 0))' exp_wkt = 'LINESTRING (0 0,0 1,1 1,1 0,0 0)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'CURVEPOLYGON ((0 0,0 1,1 1,1 0,0 0))' exp_wkt = 'LINESTRING (0 0,0 1,1 1,1 0,0 0)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() src_wkt = 'CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,1 0,0 0)))' exp_wkt = 'LINESTRING (0 0,0 1,1 1,1 0,0 0)' src_geom = ogr.CreateGeometryFromWkt(src_wkt) dst_geom = ogr.ForceToLineString(src_geom) assert not ogrtest.check_feature_geometry(dst_geom, exp_wkt), dst_geom.ExportToWkt() ############################################################################### # Test forceTo() def test_ogr_factory_8(): tests = [('POINT(2 5)', 'MULTIPOINT (2 5)', ogr.wkbMultiPoint), ('LINESTRING(2 5,10 20)', 'LINESTRING(2 5,10 20)', ogr.wkbLineString), ('LINESTRING(2 5,10 20)', 'COMPOUNDCURVE ((2 5,10 20))', ogr.wkbCompoundCurve), ('LINESTRING(2 5,10 20)', 'MULTILINESTRING ((2 5,10 20))', ogr.wkbMultiLineString), ('LINESTRING(2 5,10 20)', 'MULTICURVE ((2 5,10 20))', ogr.wkbMultiCurve), ('LINESTRING(2 5,10 20)', None, ogr.wkbPolygon), ('LINESTRING(2 5,10 20)', None, ogr.wkbCurvePolygon), ('LINESTRING(2 5,10 20)', None, ogr.wkbMultiSurface), ('LINESTRING(2 5,10 20)', None, ogr.wkbMultiPolygon), ('LINESTRING(0 0,0 1,1 1,0 0)', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('LINESTRING(0 0,0 1,1 1,0 0)', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('LINESTRING(0 0,0 1,1 1,0 0)', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('LINESTRING(0 0,0 1,1 1,0 0)', 'MULTISURFACE (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiSurface), ('LINESTRING EMPTY', 'COMPOUNDCURVE EMPTY', ogr.wkbCompoundCurve), ('LINESTRING EMPTY', 'MULTILINESTRING EMPTY', ogr.wkbMultiLineString), ('LINESTRING EMPTY', 'MULTICURVE EMPTY', ogr.wkbMultiCurve), ('MULTILINESTRING ((2 5,10 20))', 'LINESTRING(2 5,10 20)', ogr.wkbLineString), ('MULTILINESTRING ((2 5,10 20))', 'COMPOUNDCURVE ((2 5,10 20))', ogr.wkbCompoundCurve), ('MULTILINESTRING ((2 5,10 20))', 'MULTICURVE ((2 5,10 20))', ogr.wkbMultiCurve), ('MULTILINESTRING ((2 5,10 20))', None, ogr.wkbPolygon), ('MULTILINESTRING ((2 5,10 20))', None, ogr.wkbCurvePolygon), ('MULTILINESTRING ((2 5,10 20))', None, ogr.wkbMultiPolygon), ('MULTILINESTRING ((2 5,10 20))', None, ogr.wkbMultiSurface), ('MULTILINESTRING ((0 0,0 1,1 1,0 0))', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('MULTILINESTRING ((0 0,0 1,1 1,0 0))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('MULTILINESTRING ((0 0,0 1,1 1,0 0))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('MULTILINESTRING ((0 0,0 1,1 1,0 0))', 'MULTISURFACE (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiSurface), ('MULTILINESTRING EMPTY', 'LINESTRING EMPTY', ogr.wkbLineString), ('MULTILINESTRING EMPTY', 'COMPOUNDCURVE EMPTY', ogr.wkbCompoundCurve), ('MULTILINESTRING EMPTY', 'MULTICURVE EMPTY', ogr.wkbMultiCurve), ('CIRCULARSTRING(0 0,1 0,0 0)', 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbCompoundCurve), ('CIRCULARSTRING(0 0,1 0,0 0)', 'MULTICURVE (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbMultiCurve), ('CIRCULARSTRING(0 0,1 0,0 0)', 'CURVEPOLYGON (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbCurvePolygon), ('CIRCULARSTRING(0 0,1 0,0 0)', 'POLYGON ((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0))', ogr.wkbPolygon), ('CIRCULARSTRING(0 0,1 0,0 0)', 'MULTIPOLYGON (((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0)))', ogr.wkbMultiPolygon), ('CIRCULARSTRING(0 0,1 0,0 0)', 'MULTISURFACE (CURVEPOLYGON (CIRCULARSTRING (0 0,1 0,0 0)))', ogr.wkbMultiSurface), ('CIRCULARSTRING(0 0,1 0,0 0)', 'LINESTRING (0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0)', ogr.wkbLineString), # Degenerated case ('CIRCULARSTRING(0 0,0 0,0 0)', 'LINESTRING (0 0,0 0,0 0)', ogr.wkbLineString), ('CIRCULARSTRING(0 0,1 1,2 2)', 'LINESTRING (0 0,1 1,2 2)', ogr.wkbLineString), ('CIRCULARSTRING(0 0,1 1,2 2)', 'MULTILINESTRING ((0 0,1 1,2 2))', ogr.wkbMultiLineString), ('CIRCULARSTRING(0 0,1 1,2 2)', None, ogr.wkbPolygon), ('CIRCULARSTRING(0 0,1 1,2 2)', None, ogr.wkbCurvePolygon), ('CIRCULARSTRING(0 0,1 1,2 2)', None, ogr.wkbMultiSurface), ('CIRCULARSTRING(0 0,1 1,2 2)', None, ogr.wkbMultiPolygon), ('COMPOUNDCURVE ((2 5,10 20))', 'LINESTRING(2 5,10 20)', ogr.wkbLineString), ('COMPOUNDCURVE (CIRCULARSTRING(0 0,1 1,2 2))', 'LINESTRING (0 0,1 1,2 2)', ogr.wkbLineString), ('COMPOUNDCURVE ((2 5,10 20),(10 20,30 40))', 'LINESTRING(2 5,10 20,30 40)', ogr.wkbLineString), ('COMPOUNDCURVE ((2 5,10 20),(10 20,30 40))', 'MULTILINESTRING((2 5,10 20,30 40))', ogr.wkbMultiLineString), ('COMPOUNDCURVE ((2 5,10 20),(10 20,30 40))', 'MULTICURVE (COMPOUNDCURVE ((2 5,10 20),(10 20,30 40)))', ogr.wkbMultiCurve), ('COMPOUNDCURVE (CIRCULARSTRING(0 0,1 0,0 0))', 'CURVEPOLYGON (COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0)))', ogr.wkbCurvePolygon), ('COMPOUNDCURVE (CIRCULARSTRING(0 0,1 0,0 0))', 'POLYGON ((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0))', ogr.wkbPolygon), ('COMPOUNDCURVE (CIRCULARSTRING(0 0,1 0,0 0))', 'MULTISURFACE (CURVEPOLYGON (COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0))))', ogr.wkbMultiSurface), ('COMPOUNDCURVE (CIRCULARSTRING(0 0,1 0,0 0))', 'MULTIPOLYGON (((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0)))', ogr.wkbMultiPolygon), ('COMPOUNDCURVE (CIRCULARSTRING(0 0,1 0,0 0))', 'LINESTRING (0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0)', ogr.wkbLineString), ('COMPOUNDCURVE((0 0,0 1,1 1,0 0))', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('COMPOUNDCURVE((0 0,0 1,1 1,0 0))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('COMPOUNDCURVE((0 0,0 1,1 1,0 0))', 'MULTISURFACE (CURVEPOLYGON (COMPOUNDCURVE ((0 0,0 1,1 1,0 0))))', ogr.wkbMultiSurface), ('COMPOUNDCURVE((0 0,0 1,1 1,0 0))', 'CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', ogr.wkbCurvePolygon), ('POLYGON ((0 0,0 1,1 1,0 0))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('POLYGON ((0 0,0 1,1 1,0 0))', 'MULTISURFACE (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiSurface), ('POLYGON ((0 0,0 1,1 1,0 0))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('POLYGON ((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25))', ogr.wkbCurvePolygon), ('POLYGON ((0 0,0 1,1 1,0 0))', 'LINESTRING (0 0,0 1,1 1,0 0)', ogr.wkbLineString), ('POLYGON ((0 0,0 1,1 1,0 0))', 'COMPOUNDCURVE ((0 0,0 1,1 1,0 0))', ogr.wkbCompoundCurve), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', ogr.wkbMultiSurface), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'LINESTRING (0 0,0 1,1 1,0 0)', ogr.wkbLineString), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'COMPOUNDCURVE ((0 0,0 1,1 1,0 0))', ogr.wkbCompoundCurve), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'MULTILINESTRING ((0 0,0 1,1 1,0 0))', ogr.wkbMultiLineString), ('CURVEPOLYGON ((0 0,0 1,1 1,0 0))', 'MULTICURVE ((0 0,0 1,1 1,0 0))', ogr.wkbMultiCurve), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'MULTISURFACE (CURVEPOLYGON (COMPOUNDCURVE ((0 0,0 1,1 1,0 0))))', ogr.wkbMultiSurface), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', ogr.wkbCurvePolygon), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'LINESTRING (0 0,0 1,1 1,0 0)', ogr.wkbLineString), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'COMPOUNDCURVE ((0 0,0 1,1 1,0 0))', ogr.wkbCompoundCurve), ('CURVEPOLYGON (COMPOUNDCURVE((0 0,0 1),(0 1,1 1,0 0)))', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'POLYGON ((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0))', ogr.wkbPolygon), ('CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'MULTISURFACE (CURVEPOLYGON ( CIRCULARSTRING (0 0,1 0,0 0)))', ogr.wkbMultiSurface), ('CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'MULTIPOLYGON (((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0)))', ogr.wkbMultiPolygon), ('CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbCompoundCurve), ('CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'MULTICURVE (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbMultiCurve), ('CURVEPOLYGON (CIRCULARSTRING(0 0,1 0,0 0))', 'MULTILINESTRING ((0 0,0.116977778440514 -0.321393804843282,0.413175911166547 -0.49240387650611,0.75 -0.433012701892224,0.969846310392967 -0.171010071662835,0.969846310392967 0.171010071662835,0.75 0.433012701892224,0.413175911166547 0.49240387650611,0.116977778440514 0.321393804843282,0 0))', ogr.wkbMultiLineString), ('MULTICURVE ((2 5,10 20))', 'LINESTRING(2 5,10 20)', ogr.wkbLineString), ('MULTICURVE ((2 5,10 20))', 'COMPOUNDCURVE ((2 5,10 20))', ogr.wkbCompoundCurve), ('MULTICURVE ((2 5,10 20))', 'MULTILINESTRING ((2 5,10 20))', ogr.wkbMultiLineString), ('MULTICURVE (COMPOUNDCURVE((2 5,10 20)))', 'LINESTRING(2 5,10 20)', ogr.wkbLineString), ('MULTICURVE (COMPOUNDCURVE((2 5,10 20)))', 'COMPOUNDCURVE ((2 5,10 20))', ogr.wkbCompoundCurve), ('MULTICURVE (COMPOUNDCURVE((2 5,10 20)))', 'MULTILINESTRING ((2 5,10 20))', ogr.wkbMultiLineString), ('MULTICURVE ((0 0,0 1,1 1,0 0))', 'POLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbPolygon), ('MULTICURVE ((0 0,0 1,1 1,0 0))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('MULTICURVE ((0 0,0 1,1 1,0 0))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('MULTICURVE ((0 0,0 1,1 1,0 0))', 'MULTISURFACE (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiSurface), ('MULTICURVE (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('MULTICURVE (COMPOUNDCURVE((0 0,0 1,1 1,0 0)))', 'MULTISURFACE (CURVEPOLYGON (COMPOUNDCURVE ((0 0,0 1,1 1,0 0))))', ogr.wkbMultiSurface), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbUnknown), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'MULTISURFACE (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiSurface), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25)))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25))', ogr.wkbCurvePolygon), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'LINESTRING (0 0,0 1,1 1,0 0)', ogr.wkbLineString), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'COMPOUNDCURVE ((0 0,0 1,1 1,0 0))', ogr.wkbCompoundCurve), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'MULTILINESTRING ((0 0,0 1,1 1,0 0))', ogr.wkbMultiLineString), ('MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', 'MULTICURVE ((0 0,0 1,1 1,0 0))', ogr.wkbMultiCurve), ('MULTISURFACE (((0 0,0 1,1 1,0 0)))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('MULTISURFACE (((0 0,0 1,1 1,0 0)))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('MULTISURFACE (((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25)))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25))', ogr.wkbCurvePolygon), ('MULTISURFACE (((0 0,0 1,1 1,0 0)))', 'LINESTRING (0 0,0 1,1 1,0 0)', ogr.wkbLineString), ('MULTISURFACE (((0 0,0 1,1 1,0 0)))', 'COMPOUNDCURVE ((0 0,0 1,1 1,0 0))', ogr.wkbCompoundCurve), ('MULTISURFACE (((0 0,0 1,1 1,0 0)))', 'MULTILINESTRING ((0 0,0 1,1 1,0 0))', ogr.wkbMultiLineString), ('MULTISURFACE (((0 0,0 1,1 1,0 0)))', 'MULTICURVE ((0 0,0 1,1 1,0 0))', ogr.wkbMultiCurve), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', 'MULTIPOLYGON (((0 0,0 1,1 1,0 0)))', ogr.wkbMultiPolygon), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0))', ogr.wkbCurvePolygon), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25)))', 'CURVEPOLYGON ((0 0,0 1,1 1,0 0),(0.25 0.25,0.25 0.75,0.75 0.75,0.25 0.25))', ogr.wkbCurvePolygon), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', 'LINESTRING (0 0,0 1,1 1,0 0)', ogr.wkbLineString), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', 'COMPOUNDCURVE ((0 0,0 1,1 1,0 0))', ogr.wkbCompoundCurve), ('MULTISURFACE (CURVEPOLYGON(CIRCULARSTRING(0 0,1 0,0 0)))', 'COMPOUNDCURVE (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbCompoundCurve), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', 'MULTILINESTRING ((0 0,0 1,1 1,0 0))', ogr.wkbMultiLineString), ('MULTISURFACE (CURVEPOLYGON((0 0,0 1,1 1,0 0)))', 'MULTICURVE ((0 0,0 1,1 1,0 0))', ogr.wkbMultiCurve), ('MULTISURFACE (CURVEPOLYGON(CIRCULARSTRING(0 0,1 0,0 0)))', 'MULTICURVE (CIRCULARSTRING (0 0,1 0,0 0))', ogr.wkbMultiCurve), ('MULTIPOINT (2 5)', 'POINT(2 5)', ogr.wkbPoint), ] for (src_wkt, exp_wkt, target_type) in tests: src_geom = ogr.CreateGeometryFromWkt(src_wkt) gdal.SetConfigOption('OGR_ARC_STEPSIZE', '45') dst_geom = ogr.ForceTo(src_geom, target_type) gdal.SetConfigOption('OGR_ARC_STEPSIZE', None) if exp_wkt is None: exp_wkt = src_wkt elif target_type != ogr.wkbUnknown and dst_geom.GetGeometryType() != target_type: print(target_type) print(dst_geom.ExportToWkt()) pytest.fail(src_wkt) if ogrtest.check_feature_geometry(dst_geom, exp_wkt): print(src_wkt) print(target_type) pytest.fail(dst_geom.ExportToWkt()) gdalautotest-3.1.2/ogr/ogr_rfc30.py0000775000175000017500000000616313701060013015620 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_rfc30.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RFC 30 (UTF filename handling) support. # Author: Even Rouault, # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from sys import version_info from osgeo import ogr import pytest ############################################################################### # Try ogr.Open(), Driver.CreateDataSource(), Driver.DeleteDataSource() def ogr_rfc30_1_internal(filename, layer_name): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('foo') ds = None ds = ogr.Open(filename) assert ds is not None, 'cannot reopen datasource' lyr = ds.GetLayerByName(layer_name) assert lyr is not None, 'cannot find layer' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) def test_ogr_rfc30_1(): if version_info >= (3, 0, 0): filename = '/vsimem/\u00e9.shp' layer_name = '\u00e9' else: # First try with Unicode string exec("filename = u'/vsimem/\u00e9.shp'") exec("layer_name = u'\u00e9'.encode( 'utf-8' )") # FIXME? we should perhaps accept Unicode strings for layernames as well return ogr_rfc30_1_internal(filename, layer_name) def test_ogr_rfc30_1_bis(): if version_info >= (3, 0, 0): pytest.skip() filename = None layer_name = None # Test that it also works with a regular string (non Unicode) with utf8 content on python 2.X exec("filename = u'/vsimem/\u00e9.shp'.encode( 'utf-8' )") exec("layer_name = u'\u00e9'.encode( 'utf-8' )") # FIXME? we should perhaps accept Unicode strings for layernames as well return ogr_rfc30_1_internal(filename, layer_name) gdalautotest-3.1.2/ogr/ogr_shape.py0000775000175000017500000052603513701060013016010 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_shape.py 4ff31588bfc722f1bd002af0ddc940ff158b3f38 2020-05-17 19:21:20 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Shapefile driver testing. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2008-2014, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import shutil import struct import sys import time import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Open Shapefile def test_ogr_shape_1(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_drv.DeleteDataSource('tmp') gdaltest.shape_ds = shape_drv.CreateDataSource('tmp') if gdaltest.shape_ds is not None: return pytest.fail() ############################################################################### # Create table from data/poly.shp def test_ogr_shape_2(): if gdaltest.shape_ds is None: pytest.skip() ####################################################### # Create memory Layer gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer('tpoly') ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.shape_lyr, [('AREA', ogr.OFTReal), ('EAS_ID', ogr.OFTInteger), ('PRFEDEA', ogr.OFTString)]) ####################################################### # Copy in poly.shp dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) shp_ds = ogr.Open('data/poly.shp') gdaltest.shp_ds = shp_ds shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() gdaltest.poly_feat = [] while feat is not None: gdaltest.poly_feat.append(feat) dst_feat.SetFrom(feat) gdaltest.shape_lyr.CreateFeature(dst_feat) feat = shp_lyr.GetNextFeature() # Destroy required. shp_ds.Destroy() ############################################################################### # Verify that stuff we just wrote is still OK. def test_ogr_shape_3(): if gdaltest.shape_ds is None: pytest.skip() expect = [168, 169, 166, 158, 165] gdaltest.shape_lyr.SetAttributeFilter('eas_id < 170') tr = ogrtest.check_features_against_list(gdaltest.shape_lyr, 'eas_id', expect) gdaltest.shape_lyr.SetAttributeFilter(None) for i in range(len(gdaltest.poly_feat)): orig_feat = gdaltest.poly_feat[i] read_feat = gdaltest.shape_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(read_feat, orig_feat.GetGeometryRef(), max_error=0.000000001) == 0) for fld in range(3): assert orig_feat.GetField(fld) == read_feat.GetField(fld), \ ('Attribute %d does not match' % fld) gdaltest.poly_feat = None assert tr ############################################################################### # Write a feature without a geometry, and verify that it works OK. def test_ogr_shape_4(): if gdaltest.shape_ds is None: pytest.skip() ###################################################################### # Create feature without geometry. dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetField('PRFEDEA', 'nulled') gdaltest.shape_lyr.CreateFeature(dst_feat) ###################################################################### # Read back the feature and get the geometry. gdaltest.shape_lyr.SetAttributeFilter("PRFEDEA = 'nulled'") feat_read = gdaltest.shape_lyr.GetNextFeature() assert feat_read is not None, 'Didnt get feature with null geometry back.' if feat_read.GetGeometryRef() is not None: print(feat_read.GetGeometryRef().ExportToWkt()) pytest.fail('Didnt get null geometry as expected.') ############################################################################### # Test ExecuteSQL() results layers without geometry. def test_ogr_shape_5(): if gdaltest.shape_ds is None: pytest.skip() expect = [179, 173, 172, 171, 170, 169, 168, 166, 165, 158, None] sql_lyr = gdaltest.shape_ds.ExecuteSQL('select distinct eas_id from tpoly order by eas_id desc') tr = ogrtest.check_features_against_list(sql_lyr, 'eas_id', expect) gdaltest.shape_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test ExecuteSQL() results layers with geometry. def test_ogr_shape_6(): if gdaltest.shape_ds is None: pytest.skip() sql_lyr = gdaltest.shape_ds.ExecuteSQL( "select * from tpoly where prfedea = '35043413'") tr = ogrtest.check_features_against_list(sql_lyr, 'prfedea', ['35043413']) if tr: sql_lyr.ResetReading() feat_read = sql_lyr.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'POLYGON ((479750.688 4764702.000,479658.594 4764670.000,479640.094 4764721.000,479735.906 4764752.000,479750.688 4764702.000))', max_error=0.001) != 0: tr = 0 gdaltest.shape_ds.ReleaseResultSet(sql_lyr) assert tr ############################################################################### # Test spatial filtering. def test_ogr_shape_7(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_lyr.SetAttributeFilter(None) geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.shape_lyr.SetSpatialFilter(geom) geom.Destroy() tr = ogrtest.check_features_against_list(gdaltest.shape_lyr, 'eas_id', [158]) gdaltest.shape_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Create spatial index, and verify we get the same results. def test_ogr_shape_8(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_lyr.SetAttributeFilter(None) gdaltest.shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON tpoly') assert os.access('tmp/tpoly.qix', os.F_OK), 'tpoly.qix not created' geom = ogr.CreateGeometryFromWkt( 'LINESTRING(479505 4763195,480526 4762819)') gdaltest.shape_lyr.SetSpatialFilter(geom) geom.Destroy() tr = ogrtest.check_features_against_list(gdaltest.shape_lyr, 'eas_id', [158]) gdaltest.shape_lyr.SetSpatialFilter(None) assert tr # Test recreating while already existing gdaltest.shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON tpoly') gdaltest.shape_ds.ExecuteSQL('DROP SPATIAL INDEX ON tpoly') assert not os.access('tmp/tpoly.qix', os.F_OK), 'tpoly.qix not deleted' ############################################################################### # Test that we don't return a polygon if we are "inside" but non-overlapping. def test_ogr_shape_9(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_ds = None gdaltest.shape_ds = ogr.Open('data/testpoly.shp') gdaltest.shape_lyr = gdaltest.shape_ds.GetLayer(0) gdaltest.shape_lyr.SetSpatialFilterRect(-10, -130, 10, -110) if ogrtest.have_geos() and gdaltest.shape_lyr.GetFeatureCount() == 0: return if not ogrtest.have_geos() and gdaltest.shape_lyr.GetFeatureCount() == 1: return pytest.fail() ############################################################################### # Do a fair size query that should pull in a few shapes. def test_ogr_shape_10(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_lyr.SetSpatialFilterRect(-400, 22, -120, 400) tr = ogrtest.check_features_against_list(gdaltest.shape_lyr, 'FID', [0, 4, 8]) assert tr ############################################################################### # Do a mixed indexed attribute and spatial query. def test_ogr_shape_11(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_lyr.SetAttributeFilter('FID = 5') gdaltest.shape_lyr.SetSpatialFilterRect(-400, 22, -120, 400) tr = ogrtest.check_features_against_list(gdaltest.shape_lyr, 'FID', []) assert tr gdaltest.shape_lyr.SetAttributeFilter('FID = 4') gdaltest.shape_lyr.SetSpatialFilterRect(-400, 22, -120, 400) tr = ogrtest.check_features_against_list(gdaltest.shape_lyr, 'FID', [4]) gdaltest.shape_lyr.SetAttributeFilter(None) gdaltest.shape_lyr.SetSpatialFilter(None) assert tr ############################################################################### # Check that multipolygon of asm.shp is properly returned. def test_ogr_shape_12(): if gdaltest.shape_ds is None: pytest.skip() asm_ds = ogr.Open('data/asm.shp') asm_lyr = asm_ds.GetLayer(0) feat = asm_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetCoordinateDimension() == 2, 'dimension wrong.' assert geom.GetGeometryName() == 'MULTIPOLYGON', 'Geometry of wrong type.' assert geom.GetGeometryCount() == 5, 'Did not get the expected number of polygons.' counts = [15, 11, 17, 20, 9] for i in range(5): poly = geom.GetGeometryRef(i) assert poly.GetGeometryName() == 'POLYGON', \ 'Did not get right type for polygons' assert poly.GetGeometryCount() == 1, 'polygon with more than one ring.' pnt_count = poly.GetGeometryRef(0).GetPointCount() assert pnt_count == counts[i], ('Polygon %d has %d points instead of %d.' % (i, pnt_count, counts[i])) ############################################################################### # Perform a SetFeature() on a couple features, resetting the size. def test_ogr_shape_13(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_ds = None gdaltest.shape_ds = ogr.Open('tmp/tpoly.shp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.GetLayer(0) ###################################################################### # Update FID 9 (EAS_ID=170), making the polygon larger. feat = gdaltest.shape_lyr.GetFeature(9) feat.SetField('AREA', '6000.00') geom = ogr.CreateGeometryFromWkt( 'POLYGON ((0 0, 0 60, 100 60, 100 0, 200 30, 0 0))') feat.SetGeometry(geom) assert gdaltest.shape_lyr.SetFeature(feat) == 0, 'SetFeature() failed.' ###################################################################### # Update FID 8 (EAS_ID=165), making the polygon smaller. feat = gdaltest.shape_lyr.GetFeature(8) feat.SetField('AREA', '7000.00') geom = ogr.CreateGeometryFromWkt( 'POLYGON ((0 0, 0 60, 100 60, 100 0, 0 0))') feat.SetGeometry(geom) assert gdaltest.shape_lyr.SetFeature(feat) == 0, 'SetFeature() failed.' ############################################################################### # Verify last changes. def test_ogr_shape_14(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_ds = None gdaltest.shape_ds = ogr.Open('tmp/tpoly.shp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.GetLayer(0) ###################################################################### # Check FID 9. feat = gdaltest.shape_lyr.GetFeature(9) assert feat.GetField('AREA') == 6000.0, 'AREA update failed, FID 9.' assert ogrtest.check_feature_geometry(feat, 'POLYGON ((0 0, 0 60, 100 60, 100 0, 200 30, 0 0))') == 0, \ 'Geometry update failed, FID 9.' ###################################################################### # Update FID 8 (EAS_ID=165), making the polygon smaller. feat = gdaltest.shape_lyr.GetFeature(8) assert feat.GetField('AREA') == 7000.0, 'AREA update failed, FID 8.' assert ogrtest.check_feature_geometry(feat, 'POLYGON ((0 0, 0 60, 100 60, 100 0, 0 0))') == 0, \ 'Geometry update failed, FID 8.' ############################################################################### # Delete a feature, and verify reduced count. def test_ogr_shape_15(): if gdaltest.shape_ds is None: pytest.skip() ###################################################################### # Delete FID 9. assert gdaltest.shape_lyr.DeleteFeature(9) == 0, 'DeleteFeature failed.' ###################################################################### # Count features, verifying that none are FID 9. count = 0 feat = gdaltest.shape_lyr.GetNextFeature() while feat is not None: assert feat.GetFID() != 9, 'Still an FID 9 in dataset.' count = count + 1 feat = gdaltest.shape_lyr.GetNextFeature() assert count == 10, 'Did not get expected FID count.' ############################################################################### # Repack and verify a few things. def test_ogr_shape_16(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_ds.ExecuteSQL('REPACK tpoly') ###################################################################### # Count features. got_9 = 0 count = 0 gdaltest.shape_lyr.ResetReading() feat = gdaltest.shape_lyr.GetNextFeature() while feat is not None: if feat.GetFID() == 9: got_9 = 1 count = count + 1 feat = gdaltest.shape_lyr.GetNextFeature() assert count == 10, 'Did not get expected FID count.' assert got_9 != 0, 'Did not get FID 9 as expected.' feat = gdaltest.shape_lyr.GetFeature(9) ############################################################################### # Test adding a field to the schema of a populated layer. def test_ogr_shape_16_1(): if gdaltest.shape_ds is None: pytest.skip() ###################################################################### # Add a new field. field_defn = ogr.FieldDefn('NEWFLD', ogr.OFTString) field_defn.SetWidth(12) result = gdaltest.shape_lyr.CreateField(field_defn) assert result == 0, 'failed to create new field.' ###################################################################### # Check at least one feature. feat = gdaltest.shape_lyr.GetFeature(8) assert feat.EAS_ID == 165, 'Got wrong EAS_ID' assert feat.IsFieldNull('NEWFLD'), 'Expected NULL NEWFLD value!' ############################################################################### # Simple test with point shapefile with no associated .dbf def test_ogr_shape_17(): if gdaltest.shape_ds is None: pytest.skip() shutil.copy('data/can_caps.shp', 'tmp/can_caps.shp') shutil.copy('data/can_caps.shx', 'tmp/can_caps.shx') shp_ds = ogr.Open('tmp/can_caps.shp', update=1) shp_lyr = shp_ds.GetLayer(0) assert shp_lyr.GetLayerDefn().GetFieldCount() == 0, \ 'Unexpectedly got attribute fields.' count = 0 while 1: feat = shp_lyr.GetNextFeature() if feat is None: break # Re-write feature to test that we can use SetFeature() without # a DBF shp_lyr.SetFeature(feat) count += 1 assert count == 13, 'Got wrong number of features.' # Create new feature without a DBF feat = ogr.Feature(shp_lyr.GetLayerDefn()) shp_lyr.CreateFeature(feat) assert feat.GetFID() == 13, 'Got wrong FID.' shp_lyr = None shp_ds = None os.remove('tmp/can_caps.shp') os.remove('tmp/can_caps.shx') ############################################################################### # Test reading data/poly.PRJ file with mixed-case file name def test_ogr_shape_18(): shp_ds = ogr.Open('data/poly.shp') shp_lyr = shp_ds.GetLayer(0) srs_lyr = shp_lyr.GetSpatialRef() assert srs_lyr is not None, 'Missing projection definition.' assert srs_lyr.GetAuthorityCode(None) == '27700' ############################################################################### # Test polygon formation logic - recognising what rings are inner/outer # and deciding on polygon vs. multipolygon (#1217) def test_ogr_shape_19(): ds = ogr.Open('data/Stacks.shp') lyr = ds.GetLayer(0) lyr.ResetReading() feat = lyr.GetNextFeature() wkt = 'MULTIPOLYGON (((3115478.809630727861077 13939288.008583962917328,3134266.47213465673849 13971973.394036004319787,3176989.101938112173229 13957303.575368551537395,3198607.7820796193555 13921787.172278933227062,3169010.779504936654121 13891675.439224690198898,3120368.749186545144767 13897852.204979406669736,3115478.809630727861077 13939288.008583962917328),(3130405.993537959177047 13935427.529987264424562,3135038.567853996530175 13902742.144535223022103,3167209.22282647760585 13902227.414055664092302,3184452.693891727831215 13922559.267998272553086,3172871.258101634215564 13947781.061496697366238,3144561.081725850701332 13957818.305848112329841,3130405.993537959177047 13935427.529987264424562)),((3143016.890287171583623 13932596.512349685654044,3152282.038919246289879 13947266.331017138436437,3166179.761867358349264 13940060.104303302243352,3172099.162382294889539 13928221.303273428231478,3169268.144744716584682 13916897.23272311501205,3158201.439434182830155 13911235.197447959333658,3144818.446965630631894 13911749.927927518263459,3139928.507409813348204 13916382.502243556082249,3143016.890287171583623 13932596.512349685654044),(3149193.65604188805446 13926677.11183474957943,3150737.84748056717217 13918698.789401574060321,3158458.804673962760717 13919728.250360693782568,3164892.935668459162116 13923331.36371761187911,3163863.474709339439869 13928736.033752989023924,3157171.978475063573569 13935427.529987264424562,3149193.65604188805446 13926677.11183474957943)))' assert (ogrtest.check_feature_geometry(feat, wkt, max_error=0.00000001) == 0) ############################################################################### # Test empty multipoint, multiline, multipolygon. # From GDAL 1.6.0, the expected behaviour is to return a feature with a NULL geometry def test_ogr_shape_20(): if gdaltest.shape_ds is None: pytest.skip() ds = ogr.Open('data/emptymultipoint.shp') lyr = ds.GetLayer(0) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None assert feat.GetGeometryRef() is None ds = ogr.Open('data/emptymultiline.shp') lyr = ds.GetLayer(0) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None assert feat.GetGeometryRef() is None ds = ogr.Open('data/emptymultipoly.shp') lyr = ds.GetLayer(0) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None assert feat.GetGeometryRef() is None ############################################################################### # Test robutness towards broken/unfriendly shapefiles def test_ogr_shape_21(): if gdaltest.shape_ds is None: pytest.skip() files = ['data/buggypoint.shp', 'data/buggymultipoint.shp', 'data/buggymultiline.shp', 'data/buggymultipoly.shp', 'data/buggymultipoly2.shp'] for f in files: ds = ogr.Open(f) lyr = ds.GetLayer(0) lyr.ResetReading() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() assert feat.GetGeometryRef() is None # Test fix for #3665 lyr.ResetReading() (minx, maxx, miny, maxy) = lyr.GetExtent() lyr.SetSpatialFilterRect(minx + 1e-9, miny + 1e-9, maxx - 1e-9, maxy - 1e-9) gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetNextFeature() gdal.PopErrorHandler() assert feat is None or feat.GetGeometryRef() is None ############################################################################### # Test writing and reading all handled data types def test_ogr_shape_22(): if gdaltest.shape_ds is None: pytest.skip() ####################################################### # Create memory Layer gdaltest.shape_ds = None gdaltest.shape_ds = ogr.GetDriverByName('ESRI Shapefile').Open('tmp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer('datatypes') ####################################################### # Setup Schema ogrtest.quick_create_layer_def(gdaltest.shape_lyr, [('REAL', ogr.OFTReal), ('INTEGER', ogr.OFTInteger), ('STRING', ogr.OFTString), ('DATE', ogr.OFTDate)]) ####################################################### # Create a feature dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetField('REAL', 1.2) dst_feat.SetField('INTEGER', 3) dst_feat.SetField('STRING', 'aString') dst_feat.SetField('DATE', '2005/10/12') gdaltest.shape_lyr.CreateFeature(dst_feat) gdaltest.shape_ds = None ####################################################### # Read back the feature gdaltest.shape_ds = ogr.GetDriverByName('ESRI Shapefile').Open('tmp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.GetLayerByName('datatypes') feat_read = gdaltest.shape_lyr.GetNextFeature() assert (feat_read.GetField('REAL') == 1.2 and \ feat_read.GetField('INTEGER') == 3 and \ feat_read.GetField('STRING') == 'aString' and \ feat_read.GetFieldAsString('DATE') == '2005/10/12') ############################################################################### # Function used internally by ogr_shape_23. def ogr_shape_23_write_valid_and_invalid(layer_name, wkt, invalid_wkt, wkbType, isEmpty): ####################################################### # Create a layer if wkbType == ogr.wkbUnknown: gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer(layer_name) else: gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer(layer_name, geom_type=wkbType) ####################################################### # Write a geometry dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt(wkt)) gdaltest.shape_lyr.CreateFeature(dst_feat) ####################################################### # Write an invalid geometry for this layer type dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetGeometryDirectly(ogr.CreateGeometryFromWkt(invalid_wkt)) gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.shape_lyr.CreateFeature(dst_feat) gdal.PopErrorHandler() ####################################################### # Check feature gdaltest.shape_ds = None gdaltest.shape_ds = ogr.GetDriverByName('ESRI Shapefile').Open('tmp', update=1) read_lyr = gdaltest.shape_ds.GetLayerByName(layer_name) assert read_lyr.GetFeatureCount() == 1, layer_name feat_read = read_lyr.GetNextFeature() if isEmpty and feat_read.GetGeometryRef() is None: return assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt(wkt), max_error=0.000000001) == 0), \ feat_read.GetGeometryRef().ExportToWkt() def ogr_shape_23_write_geom(layer_name, geom, expected_geom, wkbType): ####################################################### # Create a layer if wkbType == ogr.wkbUnknown: gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer(layer_name) else: gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer(layer_name, geom_type=wkbType) ####################################################### # Write a geometry dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) gdaltest.shape_lyr.CreateFeature(dst_feat) ####################################################### # Check feature gdaltest.shape_lyr = None gdaltest.shape_ds = None gdaltest.shape_ds = ogr.GetDriverByName('ESRI Shapefile').Open('tmp', update=1) read_lyr = gdaltest.shape_ds.GetLayerByName(layer_name) assert read_lyr.GetFeatureCount() == 1 feat_read = read_lyr.GetNextFeature() if expected_geom is None: assert feat_read.GetGeometryRef() is None, feat_read.GetGeometryRef().ExportToWkt() return assert (ogrtest.check_feature_geometry(feat_read, expected_geom, max_error=0.000000001) == 0), \ feat_read.GetGeometryRef().ExportToWkt() ############################################################################### # Test writing and reading all handled geometry types def test_ogr_shape_23(): if gdaltest.shape_ds is None: pytest.skip() test_geom_array = [ ('points', 'POINT(0 1)', 'LINESTRING(0 1)', ogr.wkbPoint), ('points25D', 'POINT(0 1 2)', 'LINESTRING(0 1)', ogr.wkbPoint25D), ('multipoints', 'MULTIPOINT(0 1,2 3)', 'POINT (0 1)', ogr.wkbMultiPoint), ('multipoints25D', 'MULTIPOINT(0 1 2,3 4 5)', 'POINT (0 1)', ogr.wkbMultiPoint25D), ('linestrings', 'LINESTRING(0 1,2 3,4 5,0 1)', 'POINT (0 1)', ogr.wkbLineString), ('linestrings25D', 'LINESTRING(0 1 2,3 4 5,6 7 8,0 1 2)', 'POINT (0 1)', ogr.wkbLineString25D), ('multilinestrings', 'MULTILINESTRING((0 1,2 3,4 5,0 1), (0 1,2 3,4 5,0 1))', 'POINT (0 1)', ogr.wkbMultiLineString), ('multilinestrings25D', 'MULTILINESTRING((0 1 2,3 4 5,6 7 8,0 1 2),(0 1 2,3 4 5,6 7 8,0 1 2))', 'POINT (0 1)', ogr.wkbMultiLineString25D), ('polygons', 'POLYGON((0 0,0 10,10 10,0 0),(0.25 0.5,1 1,0.5 1,0.25 0.5))', 'POINT (0 1)', ogr.wkbPolygon), ('polygons25D', 'POLYGON((0 0 2,0 10 5,10 10 8,0 1 2))', 'POINT (0 1)', ogr.wkbPolygon25D), ('multipolygons', 'MULTIPOLYGON(((0 0,0 10,10 10,0 0),(0.25 0.5,1 1,0.5 1,0.25 0.5)),((100 0,100 10,110 10,100 0),(100.25 0.5,100.5 1,100 1,100.25 0.5)))', 'POINT (0 1)', ogr.wkbMultiPolygon), ('multipolygons25D', 'MULTIPOLYGON(((0 0 0,0 10,10 10,0 0),(0.25 0.5,1 1,0.5 1,0.25 0.5)),((100 0,100 10,110 10,100 0),(100.25 0.5,100.5 1,100 1,100.25 0.5)))', 'POINT (0 1)', ogr.wkbMultiPolygon25D), ] test_empty_geom_array = [ ('emptypoints', 'POINT EMPTY', 'LINESTRING(0 1)', ogr.wkbPoint), ('emptymultipoints', 'MULTIPOINT EMPTY', 'POINT(0 1)', ogr.wkbMultiPoint), ('emptylinestrings', 'LINESTRING EMPTY', 'POINT(0 1)', ogr.wkbLineString), ('emptymultilinestrings', 'MULTILINESTRING EMPTY', 'POINT(0 1)', ogr.wkbMultiLineString), ('emptypolygons', 'POLYGON EMPTY', 'POINT(0 1)', ogr.wkbPolygon), ('emptymultipolygons', 'MULTIPOLYGON EMPTY', 'POINT(0 1)', ogr.wkbMultiPolygon), ] ####################################################### # Write a feature in a new layer (geometry type unset at layer creation) for item in test_geom_array: ogr_shape_23_write_valid_and_invalid(item[0], item[1], item[2], ogr.wkbUnknown, 0) for item in test_empty_geom_array: ogr_shape_23_write_valid_and_invalid(item[0], item[1], item[2], ogr.wkbUnknown, 1) ####################################################### # Same test but use the wkb type when creating the layer gdaltest.shape_ds = None shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_drv.DeleteDataSource('tmp') gdaltest.shape_ds = shape_drv.CreateDataSource('tmp') for item in test_geom_array: ogr_shape_23_write_valid_and_invalid(item[0], item[1], item[2], item[3], 0) for item in test_empty_geom_array: ogr_shape_23_write_valid_and_invalid(item[0], item[1], item[2], item[3], 1) ####################################################### # Test writing of a geometrycollection layer_name = 'geometrycollections' gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer(layer_name, geom_type=ogr.wkbMultiPolygon) # This geometry collection is not compatible with a multipolygon layer geom = ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT (0 0))') dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) gdal.PushErrorHandler('CPLQuietErrorHandler') gdaltest.shape_lyr.CreateFeature(dst_feat) gdal.PopErrorHandler() # This geometry will be dealt as a multipolygon wkt = 'GEOMETRYCOLLECTION(POLYGON((0 0,0 10,10 10,0 0),(0.25 0.5,1 1,0.5 1,0.25 0.5)),POLYGON((100 0,100 10,110 10,100 0),(100.25 0.5,100.5 1,100 1,100.25 0.5)))' geom = ogr.CreateGeometryFromWkt(wkt) dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) gdaltest.shape_lyr.CreateFeature(dst_feat) gdaltest.shape_ds = None gdaltest.shape_ds = ogr.GetDriverByName('ESRI Shapefile').Open('tmp', update=1) read_lyr = gdaltest.shape_ds.GetLayerByName(layer_name) feat_read = read_lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0 0,0 10,10 10,0 0),(0.25 0.5,1 1,0.5 1,0.25 0.5)),((100 0,100 10,110 10,100 0),(100.25 0.5,100.5 1,100 1,100.25 0.5)))'), max_error=0.000000001) == 0), \ feat_read.GetGeometryRef().ExportToWkt() ####################################################### # Test writing of a multipoint with an empty point inside layer_name = 'strangemultipoints' wkt = 'MULTIPOINT(0 1)' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbPoint)) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) ####################################################### # Test writing of a multilinestring with an empty linestring inside layer_name = 'strangemultilinestrings' wkt = 'MULTILINESTRING((0 1,2 3,4 5,0 1), (0 1,2 3,4 5,0 1))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbLineString)) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) ####################################################### # Test writing of a polygon with an empty external ring layer_name = 'polygonwithemptyexternalring' geom = ogr.CreateGeometryFromWkt('POLYGON EMPTY') geom.AddGeometry(ogr.Geometry(type=ogr.wkbLinearRing)) ring = ogr.Geometry(type=ogr.wkbLinearRing) ring.AddPoint_2D(0, 0) ring.AddPoint_2D(10, 0) ring.AddPoint_2D(10, 10) ring.AddPoint_2D(0, 10) ring.AddPoint_2D(0, 0) geom.AddGeometry(ring) ogr_shape_23_write_geom(layer_name, geom, None, ogr.wkbUnknown) ####################################################### # Test writing of a polygon with an empty external ring layer_name = 'polygonwithemptyinternalring' wkt = 'POLYGON((100 0,100 10,110 10,100 0))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbLinearRing)) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) ####################################################### # Test writing of a multipolygon with an empty polygon and a polygon with an empty external ring layer_name = 'strangemultipolygons' wkt = 'MULTIPOLYGON(((0 0,0 10,10 10,0 0)), ((100 0,100 10,110 10,100 0)))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbPolygon)) poly = ogr.CreateGeometryFromWkt('POLYGON((-100 0,-110 10,-100 10,-100 0))') poly.AddGeometry(ogr.Geometry(type=ogr.wkbLinearRing)) geom.AddGeometry(poly) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) ####################################################### # Test writing of a multipolygon with 2 parts touching by an edge (which is illegal simple features) (github #1787) layer_name = 'multipolygon_two_parts_touching_one_edge' wkt = 'MULTIPOLYGON (((1 1,1 2,2 2,2 1,1 1)),((2 1,2 2,3 2,3 1,2 1)))' geom = ogr.CreateGeometryFromWkt(wkt) ogr_shape_23_write_geom(layer_name, geom, geom, ogr.wkbUnknown) ############################################################################### # Test reading a polygon whose outer and the inner ring touches at one point (#2589) def test_ogr_shape_24(): if gdaltest.shape_ds is None: pytest.skip() layer_name = 'touchingrings' wkt = 'MULTIPOLYGON(((0 0,0 10,10 10,0 0), (0 0,1 1,0 1,0 0)), ((100 100,100 200,200 200,200 100,100 100)))' geom = ogr.CreateGeometryFromWkt(wkt) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) ############################################################################### # Test reading a multipolygon with one part inside the bounding box of the other # part, but not inside it, and sharing the same first point... (#2589) def test_ogr_shape_25(): layer_name = 'touchingrings2' wkt = 'MULTIPOLYGON(((10 5, 5 5,5 0,0 0,0 10,10 10,10 5)),((10 5,10 0,5 0,5 4.9,10 5)), ((100 100,100 200,200 200,200 100,100 100)))' geom = ogr.CreateGeometryFromWkt(wkt) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) # Same test, but use OGR_ORGANIZE_POLYGONS=DEFAULT to avoid relying only on the winding order layer_name = 'touchingrings3' wkt = 'MULTIPOLYGON(((10 5, 5 5,5 0,0 0,0 10,10 10,10 5)),((10 5,10 0,5 0,5 4.9,10 5)), ((100 100,100 200,200 200,200 100,100 100)))' geom = ogr.CreateGeometryFromWkt(wkt) gdal.SetConfigOption('OGR_ORGANIZE_POLYGONS', 'DEFAULT') ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) gdal.SetConfigOption('OGR_ORGANIZE_POLYGONS', '') ############################################################################### # Test a polygon made of one outer ring and two inner rings (special case # in organizePolygons() def test_ogr_shape_26(): layer_name = 'oneouterring' wkt = 'POLYGON ((100 100,100 200,200 200,200 100,100 100),(110 110,120 110,120 120,110 120,110 110),(130 110,140 110,140 120,130 120,130 110))' geom = ogr.CreateGeometryFromWkt(wkt) ogr_shape_23_write_geom(layer_name, geom, ogr.CreateGeometryFromWkt(geom.ExportToWkt()), ogr.wkbUnknown) ############################################################################### # Test alternate date formatting (#2746) def test_ogr_shape_27(): ds = ogr.Open('data/water_main_dist.dbf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.installe_1 == '1989/04/25', 'got wrong date result!' feat = None lyr = None ds = None ############################################################################### # Test reading a 3 GB .DBF (#3011) def test_ogr_shape_28(): # Determine if the filesystem supports sparse files (we don't want to create a real 3 GB # file ! if not gdaltest.filesystem_supports_sparse_files('tmp'): pytest.skip() for filename in ('tmp/hugedbf.dbf', 'tmp/hugedbf.shp', 'tmp/hugedbf.shx'): try: os.remove(filename) except OSError: pass ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/hugedbf.shp') lyr = ds.CreateLayer('test') field_defn = ogr.FieldDefn() field_defn.SetName('test') field_defn.SetWidth(99) lyr.CreateField(field_defn) ds = None os.remove('tmp/hugedbf.shp') os.remove('tmp/hugedbf.shx') f = open("tmp/hugedbf.dbf", "rb+") # Set record count to 24,000,000 f.seek(4, 0) f.write("\x00".encode('latin1')) f.write("\x36".encode('latin1')) f.write("\x6e".encode('latin1')) f.write("\x01".encode('latin1')) # Set value for record 23,900,000 at # offset 2,390,000,066 = (23,900,000 * (99 + 1) + 65) + 1 f.seek(2390000066, 0) f.write("value_over_2GB".encode('latin1')) # Extend to 3 GB file f.seek(3000000000, 0) f.write("0".encode('latin1')) f.close() ds = ogr.Open('tmp/hugedbf.dbf', update=1) assert ds is not None, 'Cannot open tmp/hugedbf.dbf' # Check that the hand-written value can be read back lyr = ds.GetLayer(0) feat = lyr.GetFeature(23900000) assert feat.GetFieldAsString(0) == 'value_over_2GB' # Update with a new value feat.SetField(0, 'updated_value') lyr.SetFeature(feat) feat = None # Test creating a feature over 2 GB file limit -> should work gdal.ErrorReset() feat = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret == 0 feat = None assert gdal.GetLastErrorMsg().find('2GB file size limit reached') >= 0, \ 'did not find expected warning' ds = None # Re-open and check the new value gdal.SetConfigOption('SHAPE_2GB_LIMIT', 'TRUE') ds = ogr.Open('tmp/hugedbf.dbf', 1) gdal.SetConfigOption('SHAPE_2GB_LIMIT', None) lyr = ds.GetLayer(0) feat = lyr.GetFeature(23900000) assert feat.GetFieldAsString(0) == 'updated_value' feat = None # Test creating a feature over 2 GB file limit -> should fail gdal.ErrorReset() feat = ogr.Feature(lyr.GetLayerDefn()) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 feat = None assert gdal.GetLastErrorMsg().find('2GB file size limit reached') >= 0, \ 'did not find expected warning' ds = None ############################################################################### # Test that REPACK doesn't change extension case (#3293) def test_ogr_shape_29(): os.mkdir('tmp/UPPERCASE') shutil.copy('data/poly.shp', 'tmp/UPPERCASE/UPPERCASE.SHP') shutil.copy('data/poly.shx', 'tmp/UPPERCASE/UPPERCASE.SHX') shutil.copy('data/poly.dbf', 'tmp/UPPERCASE/UPPERCASE.DBF') f = open('tmp/UPPERCASE/UPPERCASE.CPG', 'wb') f.write('UTF-8'.encode('ascii')) f.close() ds = ogr.Open('tmp/UPPERCASE', update=1) lyr = ds.GetLayer(0) assert lyr.GetMetadata_Dict('SHAPEFILE') == { 'CPG_VALUE': 'UTF-8', 'ENCODING_FROM_CPG': 'UTF-8', 'SOURCE_ENCODING': 'UTF-8' } lyr.DeleteFeature(0) ds.ExecuteSQL('REPACK UPPERCASE') ds = None lst = gdal.ReadDir('tmp/UPPERCASE') assert len(lst) == 6 for filename in lst: assert filename in ['.', '..', 'UPPERCASE.SHP', 'UPPERCASE.SHX', 'UPPERCASE.DBF', 'UPPERCASE.CPG'], \ lst assert 'packed' not in filename, lst ############################################################################### # Test that REPACK doesn't change extension case (#3293) def test_ogr_shape_30(): os.mkdir('tmp/lowercase') shutil.copy('data/poly.shp', 'tmp/lowercase/lowercase.shp') shutil.copy('data/poly.shx', 'tmp/lowercase/lowercase.shx') shutil.copy('data/poly.dbf', 'tmp/lowercase/lowercase.dbf') ds = ogr.Open('tmp/lowercase', update=1) lyr = ds.GetLayer(0) lyr.DeleteFeature(0) ds.ExecuteSQL('REPACK lowercase') ds = None lst = gdal.ReadDir('tmp/lowercase') assert len(lst) == 5 for filename in lst: assert filename in ['.', '..', 'lowercase.shp', 'lowercase.shx', 'lowercase.dbf'], lst ############################################################################### # Test truncation of long and duplicate field names. # FIXME: Empty field names are allowed now! def test_ogr_shape_31(): if gdaltest.shape_ds is None: pytest.skip() fields = [('a', ogr.OFTReal), ('A', ogr.OFTInteger), ('A_1', ogr.OFTInteger), ('A_1', ogr.OFTInteger), ('a_1_2', ogr.OFTInteger), ('aaaaaAAAAAb', ogr.OFTInteger), ('aAaaaAAAAAc', ogr.OFTInteger), ('aaaaaAAAABa', ogr.OFTInteger), ('aaaaaAAAABb', ogr.OFTInteger), ('aaaaaAAA_1', ogr.OFTInteger), ('aaaaaAAAABc', ogr.OFTInteger), ('aaaaaAAAABd', ogr.OFTInteger), ('aaaaaAAAABe', ogr.OFTInteger), ('aaaaaAAAABf', ogr.OFTInteger), ('aaaaaAAAABg', ogr.OFTInteger), ('aaaaaAAAABh', ogr.OFTInteger), ('aaaaaAAAABi', ogr.OFTInteger), ('aaaaaAAA10', ogr.OFTString), ('', ogr.OFTInteger), ('', ogr.OFTInteger)] expected_fields = ['a', 'A_1', 'A_1_1', 'A_1_2', 'a_1_2_1', 'aaaaaAAAAA', 'aAaaaAAA_1', 'aaaaaAAAAB', 'aaaaaAAA_2', 'aaaaaAAA_3', 'aaaaaAAA_4', 'aaaaaAAA_5', 'aaaaaAAA_6', 'aaaaaAAA_7', 'aaaaaAAA_8', 'aaaaaAAA_9', 'aaaaaAAA10', 'aaaaaAAA11', '', '_1'] ####################################################### # Create Layer gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer('Fields') ####################################################### # Setup Schema with weird field names gdal.PushErrorHandler('CPLQuietErrorHandler') ogrtest.quick_create_layer_def(gdaltest.shape_lyr, fields) gdal.PopErrorHandler() layer_defn = gdaltest.shape_lyr.GetLayerDefn() error_occurred = False for i in range(layer_defn.GetFieldCount()): if layer_defn.GetFieldDefn(i).GetNameRef() != expected_fields[i]: print('Expected ', expected_fields[i], ',but got', layer_defn.GetFieldDefn(i).GetNameRef()) error_occurred = True assert not error_occurred ############################################################################### # Test creating a nearly 4GB (2^32 Bytes) .shp (#3236) # Check for proper error report. # Assuming 2^32 is the max value for unsigned int. def test_ogr_shape_32(): # This test takes a few minutes and disk space. Hence, skipped by default. # To run this test, make sure that the directory BigFilePath points to has # 4.5 GB space available or give a new directory that does and delete the # directory afterwards. pytest.skip() # pylint: disable=unreachable # pylint: disable=unreachable from decimal import Decimal BigFilePath = '/tmp' ####################################################### # Create a layer shape_drv = ogr.GetDriverByName('ESRI Shapefile') gdaltest.shape_ds_big = shape_drv.CreateDataSource(BigFilePath) gdaltest.shape_lyr = gdaltest.shape_ds_big.CreateLayer("bigLayer", geom_type=ogr.wkbPolygon) ####################################################### # Write a geometry repeatedly. # File size is pre-calculated according to the geometry's size. wkt = 'POLYGON((0 0,0 10,10 10,0 0),(0.25 0.5,1 1.1,0.5 1,0.25 0.5))' geom = ogr.CreateGeometryFromWkt(wkt) geom.AddGeometry(ogr.Geometry(type=ogr.wkbPolygon)) ret = 0 n = 0 print('') for n in range(0, 22845571): dst_feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(geom) ret = gdaltest.shape_lyr.CreateFeature(dst_feat) assert ret == 0 or n >= 22845570, 'File limit reached before 4GB!' if (n % 22846) == 0: sys.stdout.write('\r%.1f%% ' % (n / Decimal('228460.0'))) sys.stdout.flush() ####################################################### # Check some features gdaltest.shape_ds_big = None gdaltest.shape_ds_big = ogr.GetDriverByName('ESRI Shapefile').Open(BigFilePath, update=0) read_lyr = gdaltest.shape_ds_big.GetLayerByName('bigLayer') for i in [0, 1, read_lyr.GetFeatureCount() - 1]: feat_read = read_lyr.GetFeature(i) assert feat_read is not None, ('Could not retrieve geometry at FID', i) assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POLYGON((0 0,0 10,10 10,0 0),(0.25 0.5,1 1.1,0.5 1,0.25 0.5))'), max_error=0.000000001) == 0), \ ('Wrong geometry encountered at FID', i, ':', (feat_read.GetGeometryRef().ExportToWkt())) ############################################################################### # Check that we can detect correct winding order even with polygons with big # coordinate offset (#3356) def test_ogr_shape_33(): ds = ogr.Open('data/bigoffset.shp') lyr = ds.GetLayer(0) feat_read = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('MULTIPOLYGON( ((0 0,0 1,1 1,1 0,0 0)),((100000000000 100000000000,100000000000 100000000001,100000000001 100000000001,100000000001 100000000000,100000000000 100000000000)) )'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ############################################################################### # Check that we can write correct winding order even with polygons with big # coordinate offset (#33XX) def test_ogr_shape_34(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/bigoffset.shp') lyr = ds.CreateLayer('bigoffset') feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) geom_wkt = 'MULTIPOLYGON( ((0 0,0 1,1 1,1 0,0 0)),((100000000000 100000000000,100000000000 100000000001,100000000001 100000000001,100000000001 100000000000,100000000000 100000000000)) )' geom = ogr.CreateGeometryFromWkt(geom_wkt) feat.SetGeometry(geom) lyr.CreateFeature(feat) ds = None ds = ogr.Open('tmp/bigoffset.shp') lyr = ds.GetLayer(0) feat_read = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('MULTIPOLYGON( ((0 0,0 1,1 1,1 0,0 0)),((100000000000 100000000000,100000000000 100000000001,100000000001 100000000001,100000000001 100000000000,100000000000 100000000000)) )'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ############################################################################### # Check that we can read & write a VSI*L dataset def test_ogr_shape_35(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/test35.shp') srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer('test35', srs=srs) feat = ogr.Feature(feature_def=lyr.GetLayerDefn()) geom_wkt = 'POINT(0 1)' geom = ogr.CreateGeometryFromWkt(geom_wkt) feat.SetGeometry(geom) lyr.CreateFeature(feat) ds = None ds = ogr.Open('/vsimem/test35.shp') lyr = ds.GetLayer(0) srs_read = lyr.GetSpatialRef() assert srs_read.ExportToWkt() == srs.ExportToWkt(), 'did not get expected SRS' feat_read = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POINT(0 1)'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ############################################################################### # Check that we can read from the root of a .ZIP file def test_ogr_shape_36(): ds = ogr.Open('/vsizip/data/poly.zip') assert ds is not None lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('OSGB') != -1, 'did not get expected SRS' feat_read = lyr.GetFeature(9) assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0))'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ############################################################################### # Check that we can read from the root of a .tar.gz file def test_ogr_shape_37(): ds = ogr.Open('/vsitar/data/poly.tar.gz') assert ds is not None lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('OSGB') != -1, 'did not get expected SRS' for i in range(10): feat_read = lyr.GetNextFeature() if i == 9: assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0))'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) lyr.ResetReading() feat_read = lyr.GetFeature(9) assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0))'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ds = None gdal.Unlink('data/poly.tar.gz.properties') ############################################################################### # Check that we can read from a .tar file def test_ogr_shape_37_bis(): ds = ogr.Open('/vsitar/data/poly.tar') assert ds is not None lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('OSGB') != -1, 'did not get expected SRS' for i in range(10): feat_read = lyr.GetNextFeature() if i == 9: assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0))'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) lyr.ResetReading() feat_read = lyr.GetFeature(9) assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0))'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ############################################################################### # Check that we cannot create duplicated layers def test_ogr_shape_38(): ds = ogr.Open('/vsimem/', update=1) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('test35') gdal.PopErrorHandler() ds = None assert lyr is None, 'should not have created a new layer' ############################################################################### # Check that we can detect correct winding order even with polygons with big # coordinate offset (#3356) def test_ogr_shape_39(): ds = ogr.Open('data/multipatch.shp') lyr = ds.GetLayer(0) feat_read = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat_read, ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (TIN (((5 4 10,0 0 5,10 0 5,5 4 10)),((5 4 10,10 0 5,10 8 5,5 4 10)),((5 4 10,10 8 5,0 8 5,5 4 10)),((5 4 10,0 8 5,0 0 5,5 4 10))),TIN (((10 0 5,10 0 0,10 8 5,10 0 5)),((10 0 0,10 8 5,10 8 0,10 0 0)),((10 8 5,10 8 0,0 8 5,10 8 5)),((10 8 0,0 8 5,0 8 0,10 8 0)),((0 8 5,0 8 0,0 0 5,0 8 5)),((0 8 0,0 0 5,0 0 0,0 8 0))),MULTIPOLYGON (((0 0 0,0 0 5,10 0 5,10 0 0,6 0 0,6 0 3,4 0 3,4 0 0,0 0 0),(1 0 2,3 0 2,3 0 4,1 0 4,1 0 2),(7 0 2,9 0 2,9 0 4,7 0 4,7 0 2))))'), max_error=0.000000001) == 0), \ ('Wrong geometry : %s' % feat_read.GetGeometryRef().ExportToWkt()) ############################################################################### # Make some changes to a shapefile and check the index files. qix, sbn & sbx def test_ogr_shape_40(): if gdaltest.shape_ds is None: pytest.skip() datafiles = ('gjpoint.dbf', 'gjpoint.shp', 'gjpoint.shx') indexfiles = ('gjpoint.sbn', 'gjpoint.sbx', 'gjpoint.qix') for f in datafiles: shutil.copy(os.path.join('data', f), os.path.join('tmp', f)) for i in range(2): shutil.copy(os.path.join('data', indexfiles[i]), os.path.join('tmp', indexfiles[i])) gdaltest.shape_ds = ogr.Open('tmp/gjpoint.shp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.GetLayer(0) gdaltest.shape_lyr.SetAttributeFilter(None) gdaltest.shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON gjpoint') # Check if updating a feature removes the indices feat = gdaltest.shape_lyr.GetFeature(0) geom = ogr.CreateGeometryFromWkt('POINT (99 1)') feat.SetGeometry(geom) for f in indexfiles: assert os.path.exists(os.path.join('tmp', f)), ('SetFeature(): ' + f) gdaltest.shape_lyr.SetFeature(feat) for f in indexfiles: assert not os.path.exists(os.path.join('tmp', f)), ('SetFeature(): ' + f) # Check if adding a feature removes the indices for i in range(2): shutil.copy(os.path.join('data', indexfiles[i]), os.path.join('tmp', indexfiles[i])) gdaltest.shape_ds = ogr.Open('tmp/gjpoint.shp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.GetLayer(0) gdaltest.shape_lyr.SetAttributeFilter(None) gdaltest.shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON gjpoint') feat = ogr.Feature(gdaltest.shape_lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POINT (98 2)') feat.SetGeometry(geom) feat.SetField('NAME', 'Point 2') feat.SetField('FID', '2') feat.SetFID(1) for f in indexfiles: assert os.path.exists(os.path.join('tmp', f)), ('CreateFeature(): ' + f) gdaltest.shape_lyr.CreateFeature(feat) for f in indexfiles: assert not os.path.exists(os.path.join('tmp', f)), ('CreateFeature(): ' + f) # Check if deleting a feature removes the indices for i in range(2): shutil.copy(os.path.join('data', indexfiles[i]), os.path.join('tmp', indexfiles[i])) gdaltest.shape_ds = ogr.Open('tmp/gjpoint.shp', update=1) gdaltest.shape_lyr = gdaltest.shape_ds.GetLayer(0) gdaltest.shape_lyr.SetAttributeFilter(None) gdaltest.shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON gjpoint') for f in indexfiles: assert os.path.exists(os.path.join('tmp', f)), ('DeleteFeature(): ' + f) assert gdaltest.shape_lyr.DeleteFeature(0) == 0, 'DeleteFeature failed.' for f in indexfiles: assert not os.path.exists(os.path.join('tmp', f)), ('DeleteFeature(): ' + f) ############################################################################### # Run test_ogrsf def test_ogr_shape_41(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() shutil.copy('data/poly.shp', 'tmp/poly.shp') shutil.copy('data/poly.shx', 'tmp/poly.shx') shutil.copy('data/poly.dbf', 'tmp/poly.dbf') ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -fsf tmp/poly.shp') os.remove('tmp/poly.shp') os.remove('tmp/poly.shx') os.remove('tmp/poly.dbf') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Run test_ogrsf with -sql def test_ogr_shape_42(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() shutil.copy('data/poly.shp', 'tmp/poly.shp') shutil.copy('data/poly.shx', 'tmp/poly.shx') shutil.copy('data/poly.dbf', 'tmp/poly.dbf') ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/poly.shp -sql "SELECT * FROM poly"') os.remove('tmp/poly.shp') os.remove('tmp/poly.shx') os.remove('tmp/poly.dbf') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Test /vsizip//vsicurl/ def test_ogr_shape_43(): drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() conn = gdaltest.gdalurlopen('https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip') if conn is None: pytest.skip('cannot open URL') conn.close() ds = ogr.Open('/vsizip//vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip') assert ds is not None lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('OSGB') != -1, 'did not get expected SRS' f = lyr.GetNextFeature() assert f is not None, 'did not get expected feature' ############################################################################### # Test /vsicurl/ on a directory def ogr_shape_44_DISABLED(): drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() conn = gdaltest.gdalurlopen('https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/poly.zip') if conn is None: pytest.skip('cannot open URL') conn.close() ds = ogr.Open('/vsicurl/https://raw.githubusercontent.com/OSGeo/gdal/release/3.1/autotest/ogr/data/testshp') assert ds is not None lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() wkt = srs.ExportToWkt() assert wkt.find('OSGB') != -1, 'did not get expected SRS' f = lyr.GetNextFeature() assert f is not None, 'did not get expected feature' ############################################################################### # Test ignored fields works ok on a shapefile. def test_ogr_shape_45(): shp_ds = ogr.Open('data/poly.shp') shp_layer = shp_ds.GetLayer(0) shp_layer.SetIgnoredFields(['AREA']) feat = shp_layer.GetNextFeature() assert not feat.IsFieldSet('AREA'), 'got area despite request to ignore it.' assert feat.GetFieldAsInteger('EAS_ID') == 168, 'missing or wrong eas_id' wkt = 'POLYGON ((479819.84375 4765180.5,479690.1875 4765259.5,479647.0 4765369.5,479730.375 4765400.5,480039.03125 4765539.5,480035.34375 4765558.5,480159.78125 4765610.5,480202.28125 4765482.0,480365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))' assert (ogrtest.check_feature_geometry(feat, wkt, max_error=0.00000001) == 0) fd = shp_layer.GetLayerDefn() fld = fd.GetFieldDefn(0) # area assert fld.IsIgnored(), 'AREA unexpectedly not marked as ignored.' fld = fd.GetFieldDefn(1) # eas_id assert not fld.IsIgnored(), 'EASI unexpectedly marked as ignored.' assert not fd.IsGeometryIgnored(), 'geometry unexpectedly ignored.' assert not fd.IsStyleIgnored(), 'style unexpectedly ignored.' fd.SetGeometryIgnored(1) assert fd.IsGeometryIgnored(), 'geometry unexpectedly not ignored.' feat = shp_layer.GetNextFeature() assert feat.GetGeometryRef() is None, 'Unexpectedly got a geometry on feature 2.' assert not feat.IsFieldSet('AREA'), 'got area despite request to ignore it.' assert feat.GetFieldAsInteger('EAS_ID') == 179, 'missing or wrong eas_id' feat = None shp_layer = None shp_ds = None ############################################################################### # This is a very weird use case : the user creates/open a datasource # made of a single shapefile 'foo.shp' and wants to add a new layer # to it, 'bar'. So we create a new shapefile 'bar.shp' in the same # directory as 'foo.shp' def test_ogr_shape_46(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_46.shp') ds.CreateLayer('you_can_put_here_what_you_want_i_dont_care') ds.CreateLayer('this_one_i_care_46') ds = None ds = ogr.Open('/vsimem/ogr_shape_46.shp') assert ds.GetLayerCount() == 1 ds = None ds = ogr.Open('/vsimem/this_one_i_care_46.shp') assert ds.GetLayerCount() == 1 ds = None ############################################################################### # Test that we can open a symlink whose pointed filename isn't a real # file, but a filename that OGR recognizes def test_ogr_shape_47(): if not gdaltest.support_symlink(): pytest.skip() gdal.Unlink('tmp/poly.zip') os.symlink('/vsizip/data/poly.zip', 'tmp/poly.zip') ds = ogr.Open('tmp/poly.zip') assert ds is not None, 'tmp/polyzip symlink does not open.' ds = None os.remove('tmp/poly.zip') ############################################################################### # Test RECOMPUTE EXTENT ON (#4027) def test_ogr_shape_48(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_48.shp') lyr = ds.CreateLayer('ogr_shape_48') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(feat) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(3 4)')) lyr.SetFeature(feat) extent = lyr.GetExtent() if extent != (1, 3, 2, 4): print(lyr.GetExtent()) pytest.fail('did not get expected extent (1)') ds.ExecuteSQL('RECOMPUTE EXTENT ON ogr_shape_48') extent = lyr.GetExtent() if extent != (3, 3, 4, 4): print(lyr.GetExtent()) pytest.fail('did not get expected extent (2)') ds = None ds = ogr.Open('/vsimem/ogr_shape_48.shp') lyr = ds.GetLayer(0) extent = lyr.GetExtent() if extent != (3, 3, 4, 4): print(lyr.GetExtent()) pytest.fail('did not get expected extent (3)') ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_48.shp') # Test with Polygon ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_48.shp') lyr = ds.CreateLayer('ogr_shape_48') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 -1,-1 -1,-1 0,0 0))')) lyr.CreateFeature(feat) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,1 0,0 0))')) lyr.SetFeature(feat) ds.ExecuteSQL('RECOMPUTE EXTENT ON ogr_shape_48') extent = lyr.GetExtent() if extent != (0, 1, 0, 1): print(lyr.GetExtent()) pytest.fail('did not get expected extent (4)') ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_48.shp') # Test with PolygonZ ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_48.shp') lyr = ds.CreateLayer('ogr_shape_48') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0 -2,0 -1 -2,-1 -1 -2,-1 0 -2,0 0 -2))')) lyr.CreateFeature(feat) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0 2,0 1 2,1 1 2,1 0 2,0 0 2))')) lyr.SetFeature(feat) ds.ExecuteSQL('RECOMPUTE EXTENT ON ogr_shape_48') # FIXME: when we have a GetExtent3D extent = lyr.GetExtent() if extent != (0, 1, 0, 1): print(lyr.GetExtent()) pytest.fail('did not get expected extent (4)') ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_48.shp') ############################################################################### # Test that we can read at an LDID/87 file and recode to UTF-8. def test_ogr_shape_49(): ds = ogr.Open('data/facility_surface_dd.dbf') lyr = ds.GetLayer(0) assert lyr.GetMetadata_Dict('SHAPEFILE') == { 'ENCODING_FROM_LDID': 'ISO-8859-1', 'LDID_VALUE': '87', 'SOURCE_ENCODING': 'ISO-8859-1' } feat = lyr.GetFeature(91) name = feat.GetField('NAME') # Setup the utf-8 string. if sys.version_info >= (3, 0, 0): gdaltest.exp_name = 'OSEBERG S\u00D8R' else: exec("gdaltest.exp_name = u'OSEBERG S\u00D8R'") gdaltest.exp_name = gdaltest.exp_name.encode('utf-8') assert name == gdaltest.exp_name, 'Did not get expected name, encoding problems?' ############################################################################### # Test that we can read encoded field names def test_ogr_shape_50(): ds = ogr.Open('data/chinese.dbf') if ds is None: pytest.skip() lyr = ds.GetLayer(0) reconv_possible = lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1 if gdal.GetLastErrorMsg().find('Recode from CP936 to UTF-8 not supported, treated as ISO-8859-1 to UTF-8.') != -1: assert not reconv_possible, \ 'Recode failed, but TestCapability(OLCStringsAsUTF8) returns TRUE' pytest.skip('skipping test: iconv support needed') assert lyr.GetMetadata_Dict('SHAPEFILE') == { 'ENCODING_FROM_LDID': 'CP936', 'LDID_VALUE': '77', 'SOURCE_ENCODING': 'CP936' } # Setup the utf-8 string. if sys.version_info >= (3, 0, 0): gdaltest.fieldname = '\u4e2d\u56fd' else: exec("gdaltest.fieldname = u'\u4e2d\u56fd'") gdaltest.fieldname = gdaltest.fieldname.encode('utf-8') assert lyr.GetLayerDefn().GetFieldIndex(gdaltest.fieldname) == 0, \ lyr.GetLayerDefn().GetFieldDefn(0).GetNameRef() assert reconv_possible, 'TestCapability(OLCStringsAsUTF8) should return TRUE' ############################################################################### # Test that we can add a field when there's no dbf file initially def test_ogr_shape_51(): if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would crash') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_51.shp') lyr = ds.CreateLayer('ogr_shape_51') feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) ds = None gdal.Unlink('/vsimem/ogr_shape_51.dbf') ds = ogr.Open('/vsimem/ogr_shape_51.shp', update=1) lyr = ds.GetLayer(0) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) feat = lyr.GetNextFeature() feat.SetField(0, 'bar') lyr.SetFeature(feat) ds = None ds = ogr.Open('/vsimem/ogr_shape_51.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() value = feat.GetFieldAsString(0) field_count = lyr.GetLayerDefn().GetFieldCount() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_51.shp') assert field_count == 1, 'did not get expected field count' assert value == 'bar', 'did not get expected value' ############################################################################### # Test fix for #3356 def test_ogr_shape_52(): expected_geom = ogr.CreateGeometryFromWkt('MULTIPOLYGON (((175.524709766699999 -40.17203475,175.524757883299998 -40.172050566700001,175.52480505 -40.1720663,175.524858766699992 -40.172091433299997,175.524913916700001 -40.172112966699999,175.524966049999989 -40.172136933300003,175.525030633299991 -40.17216185,175.5250873 -40.17218215,175.52515168330001 -40.1722011,175.525217666700001 -40.172221216700002,175.525269416700013 -40.172234466699997,175.5253165 -40.1722478,175.52535415 -40.1722577667,175.52538385 -40.17226365,175.525436816699994 -40.1722814333,175.525507016700004 -40.17229905,175.525594783299994 -40.172322033299999,175.525669933300009 -40.172339533299997,175.52574 -40.17235335,175.525807566699996 -40.1723672,175.52585005 -40.17237395,175.52588115 -40.172378683300003,175.525969816700012 -40.172388633300002,175.526057266700008 -40.1724020833,175.52723455 -40.17253515,175.527275583299996 -40.1725388,175.527324533300003 -40.17254675,175.527394866700007 -40.172552766700001,175.527473066699997 -40.172561616700001,175.527576666700014 -40.172572916699998,175.527678333300003 -40.172584266699999,175.527787883299993 -40.17259845,175.52789345 -40.172609716700002,175.527953933300012 -40.17261295,175.528028083300001 -40.1726174,175.52809835 -40.1726219333,175.528151650000012 -40.172625833300003,175.528190349999988 -40.17262725,175.528230900000011 -40.172631183299998,175.5282776 -40.1726338,175.528322800000012 -40.172637633299999,175.5283648 -40.17263915,175.5284115 -40.172641766700004,175.528452133299993 -40.17264435,175.528492133300006 -40.172646033299998,175.52856465 -40.17264805,175.528621733300014 -40.1726492,175.52868035 -40.172650333299998,175.528751333299994 -40.172652383299997,175.528814566699992 -40.1726534,175.528883933299994 -40.172653116699998,175.528939383300013 -40.17265195,175.529002566700001 -40.1726518,175.529070350000012 -40.172650366699997,175.529136633299998 -40.17265015,175.529193616700013 -40.17264895,175.529250616700011 -40.172647733300003,175.529313800000011 -40.172647583299998,175.529376783299995 -40.172647016699997,175.52895773329999 -40.172694633299997,175.528450866700013 -40.172752216699998,175.52835635 -40.172753466700001,175.52741181670001 -40.1727757333,175.52685245 -40.172532333299998,175.52627245 -40.172501266700003,175.5262405167 -40.172502816700003,175.5258356 -40.172522816700003,175.5256125 -40.172533833300001,175.525424433300003 -40.172543116699998,175.524834133300004 -40.1725533,175.524739033299994 -40.172414983300001,175.5247128 -40.17207405,175.524709766699999 -40.17203475)),((175.531267916699989 -40.17286525,175.5312654 -40.172863283300003,175.531252849999987 -40.172853516700002,175.531054566699993 -40.172822366699997,175.530193283300008 -40.172687333299997,175.529890266699994 -40.1726398,175.529916116700008 -40.172639383300002,175.529972483300014 -40.172639216699999,175.53002885 -40.1726398,175.530085183300002 -40.17264115,175.530141500000013 -40.17264325,175.530197733300014 -40.172646133299999,175.530253916699991 -40.172649766699998,175.530309983299986 -40.172654166699999,175.53036595 -40.172659333299997,175.5304218 -40.17266525,175.53047748329999 -40.172671916699997,175.530533016699991 -40.17267935,175.5305883833 -40.1726875333,175.530643533300008 -40.172696466700003,175.530722333299991 -40.172710633299999,175.530800633300004 -40.1727263167,175.5308541 -40.17273795,175.5309073 -40.1727503,175.530960216700009 -40.172763366700003,175.531012816700013 -40.172777133300002,175.5310651 -40.1727916,175.53111705 -40.172806766699999,175.531168650000012 -40.172822633300001,175.531219883299997 -40.172839183299999,175.531270733300005 -40.1728564,175.531267916699989 -40.17286525)))') ds = ogr.Open('data/test3356.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, expected_geom, max_error=0.000000001) == 0), \ 'failed reading geom' ds = None ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_52.shp') lyr = ds.CreateLayer('ogr_shape_52') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(expected_geom) lyr.CreateFeature(feat) ds = None ds = ogr.Open('/vsimem/ogr_shape_52.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert (ogrtest.check_feature_geometry(feat, expected_geom, max_error=0.000000001) == 0), \ 'failed writing and reading back geom' ds = None ############################################################################### # Test various expected error cases def test_ogr_shape_53(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_53.shp') lyr = ds.CreateLayer('ogr_shape_53') # Test ReorderFields() when there are no fields ret = lyr.ReorderFields([]) assert ret == 0 # Test REPACK when there are no features gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ExecuteSQL("REPACK ogr_shape_53") gdal.PopErrorHandler() # Should work without any error assert gdal.GetLastErrorMsg() == '' # Create a field fd = ogr.FieldDefn("foo", ogr.OFTString) lyr.CreateField(fd) # GetFeature() on a invalid FID gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = lyr.GetFeature(-1) gdal.PopErrorHandler() assert feat is None and gdal.GetLastErrorMsg() != '' # SetFeature() on a invalid FID gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = ogr.Feature(lyr.GetLayerDefn()) ret = lyr.SetFeature(feat) feat = None gdal.PopErrorHandler() assert ret != 0 # SetFeature() on a invalid FID gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(1000) ret = lyr.SetFeature(feat) feat = None gdal.PopErrorHandler() assert ret != 0 # DeleteFeature() on a invalid FID gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteFeature(-1) gdal.PopErrorHandler() assert ret != 0 feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None ret = lyr.DeleteFeature(0) assert ret == 0 # Try deleting an already deleted feature gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteFeature(0) gdal.PopErrorHandler() assert ret != 0 # Test DeleteField() on a invalid index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(-1) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test ReorderFields() with invalid permutation gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.ReorderFields([1]) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test AlterFieldDefn() on a invalid index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') fd = ogr.FieldDefn("foo2", ogr.OFTString) ret = lyr.AlterFieldDefn(-1, fd, 0) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test AlterFieldDefn() when attempting to convert from OFTString to something else gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') fd = ogr.FieldDefn("foo", ogr.OFTInteger) ret = lyr.AlterFieldDefn(0, fd, ogr.ALTER_TYPE_FLAG) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test DROP SPATIAL INDEX ON layer without index gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ExecuteSQL("DROP SPATIAL INDEX ON ogr_shape_53") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Re-create a feature feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) feat = None lyr = None ds = None # Test that some operations are not possible in read-only mode ds = ogr.Open('/vsimem/ogr_shape_53.shp') lyr = ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCSequentialWrite) == 0 assert lyr.TestCapability(ogr.OLCDeleteFeature) == 0 assert lyr.TestCapability(ogr.OLCCreateField) == 0 assert lyr.TestCapability(ogr.OLCDeleteField) == 0 assert lyr.TestCapability(ogr.OLCReorderFields) == 0 assert lyr.TestCapability(ogr.OLCAlterFieldDefn) == 0 # Test CreateField() fd = ogr.FieldDefn("bar", ogr.OFTString) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateField(fd) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test ReorderFields() gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.ReorderFields([0]) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test DeleteField() gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteField(0) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test AlterFieldDefn() gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') fd = ogr.FieldDefn("foo2", ogr.OFTString) ret = lyr.AlterFieldDefn(0, fd, 0) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test CreateFeature() feat = ogr.Feature(lyr.GetLayerDefn()) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test DeleteFeature() gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteFeature(0) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test SetFeature() feat = lyr.GetNextFeature() gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.SetFeature(feat) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test REPACK gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ExecuteSQL("REPACK ogr_shape_53") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' # Test RECOMPUTE EXTENT ON gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ExecuteSQL("RECOMPUTE EXTENT ON ogr_shape_53") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' feat = None lyr = None ds = None # Attempt to delete shape in shapefile with no .dbf file gdal.Unlink('/vsimem/ogr_shape_53.dbf') ds = ogr.Open('/vsimem/ogr_shape_53.shp', update=1) lyr = ds.GetLayer(0) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteFeature(0) gdal.PopErrorHandler() assert not (ret == 0 or gdal.GetLastErrorMsg() == '') # Test REPACK ds.ExecuteSQL("REPACK ogr_shape_53") lyr = None ds = None # Tests on a DBF only ds = ogr.Open('data/idlink.dbf') lyr = ds.GetLayer(0) # Test GetExtent() # FIXME : GetExtent() should fail. Currently we'll get garbage here lyr.GetExtent() # Test RECOMPUTE EXTENT ON gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.ExecuteSQL("RECOMPUTE EXTENT ON ogr_shape_53") gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' lyr = None ds = None ############################################################################### # Test accessing a shape datasource with hundreds of layers (#4306) def ogr_shape_54_create_layer(ds, layer_index): lyr = ds.CreateLayer('layer%03d' % layer_index) lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'val%d' % layer_index) if (layer_index % 2) == 0: feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (%d %d)' % (layer_index, layer_index + 1))) lyr.CreateFeature(feat) feat = None def ogr_shape_54_test_layer(ds, layer_index): lyr = ds.GetLayerByName('layer%03d' % layer_index) assert lyr is not None, ('failed for layer %d' % layer_index) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is not None, ('failed for layer %d' % layer_index) assert feat.GetField(0) == 'val%d' % layer_index, \ ('failed for layer %d' % layer_index) if (layer_index % 2) == 0: assert (feat.GetGeometryRef() is not None and \ feat.GetGeometryRef().ExportToWkt() == 'POINT (%d %d)' % (layer_index, layer_index + 1)), \ ('failed for layer %d' % layer_index) def test_ogr_shape_54(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_54' # ds_name = 'tmp/ogr_shape_54' N = 500 LRUListSize = 100 # Test creating N layers ds = shape_drv.CreateDataSource(ds_name) for i in range(N): ogr_shape_54_create_layer(ds, i) ds = None # Test access to the N layers in sequence ds = ogr.Open(ds_name) for i in range(N): ogr_shape_54_test_layer(ds, i) # Now some 'random' access ogr_shape_54_test_layer(ds, N - 1 - LRUListSize) ogr_shape_54_test_layer(ds, N - LRUListSize / 2) ogr_shape_54_test_layer(ds, N - LRUListSize / 4) ogr_shape_54_test_layer(ds, 0) ogr_shape_54_test_layer(ds, 0) ogr_shape_54_test_layer(ds, 2) ogr_shape_54_test_layer(ds, 1) ds = None # Test adding a new layer ds = ogr.Open(ds_name, update=1) ogr_shape_54_create_layer(ds, N) ds = None # Test accessing the new layer ds = ogr.Open(ds_name) ogr_shape_54_test_layer(ds, N) ds = None # Test deleting layers ds = ogr.Open(ds_name, update=1) for i in range(N): ogr_shape_54_test_layer(ds, i) for i in range(N - LRUListSize + 1, N): ds.ExecuteSQL('DROP TABLE layer%03d' % i) ogr_shape_54_test_layer(ds, N - LRUListSize) ogr_shape_54_create_layer(ds, N + 2) for i in range(0, N - LRUListSize + 1): ds.ExecuteSQL('DROP TABLE layer%03d' % i) ogr_shape_54_test_layer(ds, N) ogr_shape_54_test_layer(ds, N + 2) ds = None # Destroy and recreate datasource shape_drv.DeleteDataSource(ds_name) ds = shape_drv.CreateDataSource(ds_name) for i in range(N): ogr_shape_54_create_layer(ds, i) ds = None # Reopen in read-only so as to be able to delete files */ # if testing on a real filesystem. ds = ogr.Open(ds_name) # Test corner case where we cannot reopen a closed layer ideletedlayer = 0 gdal.Unlink(ds_name + '/' + 'layer%03d.shp' % ideletedlayer) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.GetLayerByName('layer%03d' % ideletedlayer) gdal.PopErrorHandler() if lyr is not None: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.ResetReading() lyr.GetNextFeature() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() ideletedlayer = 1 gdal.Unlink(ds_name + '/' + 'layer%03d.dbf' % ideletedlayer) lyr = ds.GetLayerByName('layer%03d' % ideletedlayer) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.ResetReading() lyr.GetNextFeature() gdal.PopErrorHandler() # if gdal.GetLastErrorMsg() == '': # gdaltest.post_reason('failed') # return 'fail' gdal.ErrorReset() ds = None ############################################################################### # Test that we cannot add more fields that the maximum allowed def test_ogr_shape_55(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_55' ds = shape_drv.CreateDataSource(ds_name) lyr = ds.CreateLayer('ogr_shape_55') max_field_count = int((65535 - 33) / 32) # 2046 for i in range(max_field_count): if i == 255: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateField(ogr.FieldDefn('foo%d' % i, ogr.OFTInteger)) if i == 255: gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', \ 'expecting a warning for 256th field added' assert ret == 0, ('failed creating field foo%d' % i) i = max_field_count gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateField(ogr.FieldDefn('foo%d' % i, ogr.OFTInteger)) gdal.PopErrorHandler() assert ret != 0, ('should have failed creating field foo%d' % i) feat = ogr.Feature(lyr.GetLayerDefn()) for i in range(max_field_count): feat.SetField(i, i) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) for i in range(max_field_count): feat.SetField(i, i) lyr.CreateFeature(feat) ds = None ############################################################################### # Test that we cannot add more fields that the maximum allowed record length def test_ogr_shape_56(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_56' ds = shape_drv.CreateDataSource(ds_name) lyr = ds.CreateLayer('ogr_shape_56') max_field_count = int(65535 / 80) # 819 for i in range(max_field_count): if i == 255: gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateField(ogr.FieldDefn('foo%d' % i, ogr.OFTString)) if i == 255: gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', \ 'expecting a warning for 256th field added' assert ret == 0, ('failed creating field foo%d' % i) i = max_field_count gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateField(ogr.FieldDefn('foo%d' % i, ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0, ('should have failed creating field foo%d' % i) feat = ogr.Feature(lyr.GetLayerDefn()) for i in range(max_field_count): feat.SetField(i, 'foo%d' % i) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) for i in range(max_field_count): feat.SetField(i, 'foo%d' % i) lyr.CreateFeature(feat) ds = None ############################################################################### # Test that we emit a warning if the truncation of a field value occurs def test_ogr_shape_57(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_57' ds = shape_drv.CreateDataSource(ds_name) lyr = ds.CreateLayer('ogr_shape_57') field_defn = ogr.FieldDefn('foo', ogr.OFTString) field_defn.SetWidth(1024) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.CreateField(field_defn) gdal.PopErrorHandler() # print(gdal.GetLastErrorMsg()) assert gdal.GetLastErrorMsg() != '', 'expecting a warning' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '0123456789' * 27) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.CreateFeature(feat) gdal.PopErrorHandler() # print(gdal.GetLastErrorMsg()) assert gdal.GetLastErrorMsg() != '', 'expecting a warning' ds = None ############################################################################### # Test creating and reading back all geometry types def test_ogr_shape_58(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_58' ds = shape_drv.CreateDataSource(ds_name) wkt_list = ['POINT (0 1)', 'POINT (0 1 2)', 'MULTIPOINT (0 1,2 3)', 'MULTIPOINT (0 1 2,3 4 5)', 'LINESTRING (0 1,2 3)', 'LINESTRING (0 1 2,3 4 5)', 'MULTILINESTRING ((0 1,2 3),(0 1,2 3))', 'MULTILINESTRING ((0 1 2,3 4 5),(0 1 2,3 4 5))', 'POLYGON ((0 0,0 1,1 1,1 0,0 0))', 'POLYGON ((0 0 2,0 1 2,1 1 2,1 0 2,0 0 2))', 'MULTIPOLYGON (((0 0,0 1,1 1,1 0,0 0)),((100 0,100 1,101 1,101 0,100 0)))', 'MULTIPOLYGON (((0 0 2,0 1 2,1 1 2,1 0 2,0 0 2)),((100 0 2,100 1 2,101 1 2,101 0 2,100 0 2)))'] for wkt in wkt_list: geom = ogr.CreateGeometryFromWkt(wkt) layer_name = geom.GetGeometryName() if geom.GetGeometryType() & ogr.wkb25Bit: layer_name = layer_name + "3D" lyr = ds.CreateLayer(layer_name) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(geom) lyr.CreateFeature(feat) ds = None ds = ogr.Open('/vsimem/ogr_shape_58') for wkt in wkt_list: geom = ogr.CreateGeometryFromWkt(wkt) layer_name = geom.GetGeometryName() if geom.GetGeometryType() & ogr.wkb25Bit: layer_name = layer_name + "3D" lyr = ds.GetLayerByName(layer_name) lyr.ResetReading() feat = lyr.GetNextFeature() geom_read = feat.GetGeometryRef() assert geom_read.ExportToWkt() == wkt, \ ('did not get expected geom for field %s' % layer_name) ds = None ############################################################################### # Test reading a shape with XYM geometries def test_ogr_shape_59(): if gdaltest.shape_ds is None: pytest.skip() shp_ds = ogr.Open('data/testpointm.shp') if shp_ds is None: pytest.skip() shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryName() == 'POINT', 'Geometry of wrong type.' assert geom.GetCoordinateDimension() == 2, 'dimension wrong.' if geom.GetPointZM(0) != (1.0, 2.0, 0.0, 3.0): print(geom.GetPoint(0)) pytest.fail('Did not get right point result.') shp_ds = ogr.Open('data/arcm_with_m.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToIsoWkt() == 'LINESTRING M (0 0 10,1 1 20)' feat = shp_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToIsoWkt() == 'MULTILINESTRING M ((0 0 10,1 1 20),(2 2 30,3 3 40))' geom = None feat = None shp_ds = ogr.Open('data/polygonm_with_m.shp') shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToIsoWkt() == 'POLYGON M ((0 0 10,0 1 20,1 1 30,0 0 40))' feat = shp_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToIsoWkt() == 'POLYGON M ((0 0 10,0 1 20,1 1 30,0 0 40),(0.25 0.25 50,0.75 0.75 60,0.25 0.75 70,0.25 0.25 80))' geom = None feat = None ############################################################################### # Test reading a shape with XYZM geometries def test_ogr_shape_60(): if gdaltest.shape_ds is None: pytest.skip() shp_ds = ogr.Open('data/testpointzm.shp') if shp_ds is None: pytest.skip() shp_lyr = shp_ds.GetLayer(0) feat = shp_lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.GetGeometryName() == 'POINT', 'Geometry of wrong type.' assert geom.GetCoordinateDimension() == 3, 'dimension wrong.' assert geom.GetPoint(0) == (1.0, 2.0, 3.0), 'Did not get right point result.' geom = None feat = None ############################################################################### # Test field auto-growing def test_ogr_shape_61(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_61' ds = shape_drv.CreateDataSource(ds_name) lyr = ds.CreateLayer('ogr_shape_61') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) field_defn.SetWidth(1) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '0123456789' * 8) feat.SetField(1, 2) lyr.CreateFeature(feat) feat = None field_defn = lyr.GetLayerDefn().GetFieldDefn(0) assert field_defn.GetWidth() == 80, 'did not get initial field size' feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, '0123456789' * 9) feat.SetField(1, 34) lyr.CreateFeature(feat) feat = None field_defn = lyr.GetLayerDefn().GetFieldDefn(0) assert field_defn.GetWidth() == 90, 'did not extend field' field_defn = lyr.GetLayerDefn().GetFieldDefn(1) assert field_defn.GetWidth() == 2, 'did not extend field' ds = None ds = ogr.Open(ds_name) lyr = ds.GetLayer(0) field_defn = lyr.GetLayerDefn().GetFieldDefn(0) assert field_defn.GetWidth() == 90, 'did not get expected field size' feat = lyr.GetFeature(1) val = feat.GetFieldAsString(0) assert val == '0123456789' * 9, 'did not get expected field value' val = feat.GetFieldAsInteger(1) assert val == 34, 'did not get expected field value' ############################################################################### # Test field resizing def test_ogr_shape_62(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds_name = '/vsimem/ogr_shape_62' ds = shape_drv.CreateDataSource(ds_name) lyr = ds.CreateLayer('ogr_shape_62', options=['RESIZE=YES']) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('bar', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('baz', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 'hugehugehugehuge') lyr.CreateFeature(feat) feat = None lyr.DeleteFeature(0) values = ['ab', 'deef', 'ghi'] for value in values: feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, value) feat.SetField(2, 12) lyr.CreateFeature(feat) feat = None ds = None # Reopen file ds = ogr.Open(ds_name) lyr = ds.GetLayer(0) # Check field_defn = lyr.GetLayerDefn().GetFieldDefn(0) assert field_defn.GetWidth() == 4, 'did not get expected field size' # Reopen file ds = ogr.Open(ds_name, update=1) lyr = ds.GetLayer(0) # Should do nothing ds.ExecuteSQL('RESIZE ogr_shape_62') # Check lyr.ResetReading() for expected_value in values: feat = lyr.GetNextFeature() got_val = feat.GetFieldAsString(0) assert got_val == expected_value, 'did not get expected value' got_val = feat.GetFieldAsInteger(2) assert got_val == 12, 'did not get expected value' ds = None ############################################################################### # More testing of recoding def test_ogr_shape_63(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_63.dbf') lyr = ds.CreateLayer('ogr_shape_63', geom_type=ogr.wkbNone) gdaltest.fieldname = '\xc3\xa9' assert lyr.CreateField(ogr.FieldDefn(gdaltest.fieldname, ogr.OFTString)) == 0 gdaltest.fieldname = '\xc3\xa9\xc3\xa9' assert lyr.AlterFieldDefn(0, ogr.FieldDefn(gdaltest.fieldname, ogr.OFTString), ogr.ALTER_NAME_FLAG) == 0 chinese_str = struct.pack('B' * 6, 229, 144, 141, 231, 167, 176) if sys.version_info >= (3, 0, 0): chinese_str = chinese_str.decode('UTF-8') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.AlterFieldDefn(0, ogr.FieldDefn(chinese_str, ogr.OFTString), ogr.ALTER_NAME_FLAG) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateField(ogr.FieldDefn(chinese_str, ogr.OFTString)) gdal.PopErrorHandler() assert ret != 0 ds = None ds = ogr.Open('/vsimem/ogr_shape_63.dbf') lyr = ds.GetLayer(0) assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 1 assert lyr.GetLayerDefn().GetFieldDefn(0).GetName() == gdaltest.fieldname ds = None # Set an invalid encoding gdal.FileFromMemBuffer('/vsimem/ogr_shape_63.cpg', 'FOO') ds = ogr.Open('/vsimem/ogr_shape_63.dbf') lyr = ds.GetLayer(0) # TestCapability(OLCStringsAsUTF8) should return FALSE assert lyr.TestCapability(ogr.OLCStringsAsUTF8) == 0 ds = None gdal.Unlink('/vsimem/ogr_shape_63.dbf') gdal.Unlink('/vsimem/ogr_shape_63.cpg') ############################################################################### # Test creating layers whose name include dot character def test_ogr_shape_64(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_64') lyr = ds.CreateLayer('a.b') assert lyr.GetName() == 'a.b' lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('foo', 'bar') lyr.CreateFeature(feat) feat = None lyr = ds.CreateLayer('a.c') assert lyr.GetName() == 'a.c' # Test that we cannot create a duplicate layer gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('a.b') gdal.PopErrorHandler() assert lyr is None ds = None ds = ogr.Open('/vsimem/ogr_shape_64/a.b.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat.GetFieldAsString('foo') == 'bar' ds = None gdal.Unlink('/vsimem/ogr_shape_64/a.b.shp') gdal.Unlink('/vsimem/ogr_shape_64/a.b.shx') gdal.Unlink('/vsimem/ogr_shape_64/a.b.dbf') gdal.Unlink('/vsimem/ogr_shape_64/a.c.shp') gdal.Unlink('/vsimem/ogr_shape_64/a.c.shx') gdal.Unlink('/vsimem/ogr_shape_64/a.c.dbf') gdal.Unlink('/vsimem/ogr_shape_64') ############################################################################### # Test reading a DBF with a 'nan' as a numeric value (#4799) def test_ogr_shape_65(): ds = ogr.Open('data/nan.dbf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() val = feat.GetFieldAsDouble(0) feat = None ds = None assert gdaltest.isnan(val) ############################################################################### # Test failures when creating files and datasources def test_ogr_shape_66(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/i_dont_exist/bar.dbf') gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('bar', geom_type=ogr.wkbNone) gdal.PopErrorHandler() assert lyr is None ds = None ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/i_dont_exist/bar.shp') gdal.PushErrorHandler('CPLQuietErrorHandler') lyr = ds.CreateLayer('bar', geom_type=ogr.wkbPoint) gdal.PopErrorHandler() assert lyr is None ds = None gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/i_dont_exist/bar') gdal.PopErrorHandler() assert ds is None f = open('tmp/foo', 'wb') f.close() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/foo') gdal.PopErrorHandler() assert ds is None os.unlink('tmp/foo') ############################################################################### # Test opening an empty .sbn spatial index def test_ogr_shape_67(): shutil.copy('data/emptyshapefilewithsbn.shp', 'tmp/emptyshapefilewithsbn.shp') shutil.copy('data/emptyshapefilewithsbn.shx', 'tmp/emptyshapefilewithsbn.shx') shutil.copy('data/emptyshapefilewithsbn.sbn', 'tmp/emptyshapefilewithsbn.sbn') shutil.copy('data/emptyshapefilewithsbn.sbx', 'tmp/emptyshapefilewithsbn.sbx') ds = ogr.Open('tmp/emptyshapefilewithsbn.shp', update=1) ds.ExecuteSQL('DROP SPATIAL INDEX ON emptyshapefilewithsbn') ds = None with pytest.raises(OSError): os.stat('tmp/emptyshapefilewithsbn.sbn') os.unlink('tmp/emptyshapefilewithsbn.shp') os.unlink('tmp/emptyshapefilewithsbn.shx') ############################################################################### # Test opening a shape datasource with files with mixed case and then REPACK def test_ogr_shape_68(): if sys.platform == 'darwin': pytest.skip("Fails on MacOSX. Not sure why.") for i in range(2): if i == 1 and sys.platform != 'win32': break try: shutil.rmtree('tmp/mixedcase') except OSError: pass os.mkdir('tmp/mixedcase') shutil.copy('data/poly.shp', 'tmp/mixedcase/mixedcase.shp') shutil.copy('data/poly.shx', 'tmp/mixedcase/mixedcase.shx') shutil.copy('data/poly.dbf', 'tmp/mixedcase/MIXEDCASE.DBF') # funny ! ds = ogr.Open('tmp/mixedcase', update=1) if sys.platform == 'win32': expected_layer_count = 1 else: expected_layer_count = 2 assert ds.GetLayerCount() == expected_layer_count, \ ('expected %d layers, got %d' % (expected_layer_count, ds.GetLayerCount())) if i == 1: lyr = ds.GetLayerByName('mixedcase') else: lyr = ds.GetLayerByName('MIXEDCASE') lyr.DeleteFeature(0) if i == 1: ds.ExecuteSQL('REPACK mixedcase') else: ds.ExecuteSQL('REPACK MIXEDCASE') if sys.platform == 'win32': assert lyr.GetGeomType() == ogr.wkbPolygon else: assert lyr.GetGeomType() == ogr.wkbNone lyr = ds.GetLayerByName('mixedcase') assert lyr.GetGeomType() == ogr.wkbPolygon gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.DeleteFeature(0) gdal.PopErrorHandler() assert ret != 0, 'expected failure on DeleteFeature()' # gdal.ErrorReset() # gdal.PushErrorHandler('CPLQuietErrorHandler') ds.ExecuteSQL('REPACK mixedcase') # gdal.PopErrorHandler() # if gdal.GetLastErrorMsg() == '': # gdaltest.post_reason('expected failure on REPACK mixedcase') # return 'fail' ds = None ori_shp_size = os.stat('data/poly.shp').st_size ori_shx_size = os.stat('data/poly.shx').st_size ori_dbf_size = os.stat('data/poly.dbf').st_size new_shp_size = os.stat('tmp/mixedcase/mixedcase.shp').st_size new_shx_size = os.stat('tmp/mixedcase/mixedcase.shx').st_size new_dbf_size = os.stat('tmp/mixedcase/MIXEDCASE.DBF').st_size assert new_dbf_size != ori_dbf_size if sys.platform == 'win32': assert new_shp_size != ori_shp_size assert new_shx_size != ori_shx_size else: assert new_shp_size == ori_shp_size assert new_shx_size == ori_shx_size ############################################################################### # Test fix for #5135 (creating a field of type Integer with a big width) def test_ogr_shape_69(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_69.shp') lyr = ds.CreateLayer('ogr_shape_69') field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) field_defn.SetWidth(64) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField(0, 123456) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('/vsimem/ogr_shape_69.shp') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTReal feat = lyr.GetNextFeature() assert feat.GetField(0) == 123456 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_69.shp') ############################################################################### # Test fix for https://github.com/OSGeo/gdal/pull/17 # (shapefile opened twice on Windows) def test_ogr_shape_70(): if sys.platform != 'win32': pytest.skip() ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_shape_70.shp') lyr = ds.CreateLayer('ogr_shape_70') field_defn = ogr.FieldDefn('intfield', ogr.OFTInteger) lyr.CreateField(field_defn) feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) fid = feat.GetFID() feat = None lyr.DeleteFeature(fid) # Locks the file. No way to do this on Unix easily f = open('tmp/ogr_shape_70.dbf', 'r+') gdal.ErrorReset() gdal.PushErrorHandler() old_val = gdal.GetConfigOption('OGR_SHAPE_PACK_IN_PLACE') gdal.SetConfigOption('OGR_SHAPE_PACK_IN_PLACE', 'NO') ds.ExecuteSQL('REPACK ogr_shape_70') gdal.SetConfigOption('OGR_SHAPE_PACK_IN_PLACE', old_val) gdal.PopErrorHandler() errmsg = gdal.GetLastErrorMsg() ds = None f.close() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/ogr_shape_70.shp') assert errmsg != '' ############################################################################### # Test heterogeneous file permissions on .shp and .dbf. def test_ogr_shape_71(): if sys.platform.find('linux') != 0: pytest.skip() if os.getuid() == 0: pytest.skip('running as root... skipping') import stat shutil.copy('data/poly.shp', 'tmp/ogr_shape_71.shp') shutil.copy('data/poly.shx', 'tmp/ogr_shape_71.shx') shutil.copy('data/poly.dbf', 'tmp/ogr_shape_71.dbf') old_mode = os.stat('tmp/ogr_shape_71.dbf').st_mode os.chmod('tmp/ogr_shape_71.dbf', stat.S_IREAD) with gdaltest.error_handler(): ds = ogr.Open('tmp/ogr_shape_71.shp', update=1) ok = ds is None ds = None os.chmod('tmp/ogr_shape_71.dbf', old_mode) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/ogr_shape_71.shp') assert ok ############################################################################### # Test shapefile size limit def test_ogr_shape_72(): # Determine if the filesystem supports sparse files (we don't want to create a real 3 GB # file ! if gdaltest.filesystem_supports_sparse_files('tmp') is False: pytest.skip() ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_shape_72.shp') lyr = ds.CreateLayer('2gb', geom_type=ogr.wkbPoint) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr.CreateFeature(feat) ds = None f = open('tmp/ogr_shape_72.shp', 'rb+') f.seek(24) f.write(struct.pack('B' * 4, 0x7f, 0xff, 0xff, 0xfe)) f.close() # Test creating a feature over 4 GB file limit -> should fail ds = ogr.Open('tmp/ogr_shape_72.shp', update=1) lyr = ds.GetLayer(0) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (3 4)')) gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 ds = None f = open('tmp/ogr_shape_72.shp', 'rb+') f.seek(24) f.write(struct.pack('B' * 4, 0x3f, 0xff, 0xff, 0xfe)) f.close() # Test creating a feature over 2 GB file limit -> should fail gdal.SetConfigOption('SHAPE_2GB_LIMIT', 'TRUE') ds = ogr.Open('tmp/ogr_shape_72.shp', update=1) gdal.SetConfigOption('SHAPE_2GB_LIMIT', None) lyr = ds.GetLayer(0) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (5 6)')) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret != 0 ds = None # Test creating a feature over 2 GB file limit -> should succeed with warning ds = ogr.Open('tmp/ogr_shape_72.shp', update=1) lyr = ds.GetLayer(0) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT (7 8)')) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') ret = lyr.CreateFeature(feat) gdal.PopErrorHandler() assert ret == 0 assert gdal.GetLastErrorMsg().find('2GB file size limit reached') >= 0, \ 'did not find expected warning' ds = None ds = ogr.Open('tmp/ogr_shape_72.shp') lyr = ds.GetLayer(0) feat = lyr.GetFeature(1) assert feat.GetGeometryRef().ExportToWkt() == 'POINT (7 8)' ds = None ############################################################################### # Test that isClockwise() works correctly on a degenerated ring that passes # twice by the same point (#5342) def test_ogr_shape_73(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_73.shp') lyr = ds.CreateLayer('ogr_shape_73', geom_type=ogr.wkbPolygon) feat = ogr.Feature(lyr.GetLayerDefn()) # (5 1) is the first(and last) point, and the pivot point selected by the # algorithm (lowest rightmost vertex), but it is also reused later in the # coordinate list # But the second ring is counter-clock-wise geom = ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 10,10 10,10 0,0 0),(5 1,4 3,4 2,5 1,6 2,6 3,5 1))') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('/vsimem/ogr_shape_73.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() got_geom = feat.GetGeometryRef() if geom.ExportToWkt() != got_geom.ExportToWkt(): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test organizePolygons() in OGR_ORGANIZE_POLYGONS=DEFAULT mode when # two outer rings are touching, by the first vertex of one. def test_ogr_shape_74(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_74.shp') lyr = ds.CreateLayer('ogr_shape_74', geom_type=ogr.wkbPolygon) feat = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 10,10 10,10 0,0 0,0 1,9 1,9 9,0 9,0 10)),((9 5,5 4,0 5,5 6, 9 5)))') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat = None ds = None ds = ogr.Open('/vsimem/ogr_shape_74.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() got_geom = feat.GetGeometryRef() if geom.ExportToWkt() != got_geom.ExportToWkt(): feat.DumpReadable() pytest.fail() lyr.ResetReading() gdal.SetConfigOption('OGR_ORGANIZE_POLYGONS', 'DEFAULT') feat = lyr.GetNextFeature() gdal.SetConfigOption('OGR_ORGANIZE_POLYGONS', None) got_geom = feat.GetGeometryRef() if geom.ExportToWkt() != got_geom.ExportToWkt(): feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test GetFileList() def test_ogr_shape_75(): ds = gdal.OpenEx('data/poly.shp') assert (ds.GetFileList() == ['data/poly.shp', 'data/poly.shx', 'data/poly.dbf', 'data/poly.PRJ'] or \ ds.GetFileList() == ['data/poly.shp', 'data/poly.shx', 'data/poly.dbf', 'data/poly.prj']) ds = None ds = gdal.OpenEx('data/idlink.dbf') assert ds.GetFileList() == ['data/idlink.dbf'] ds = None ds = gdal.OpenEx('data/testpoly.shp') assert ds.GetFileList() == ['data/testpoly.shp', 'data/testpoly.shx', 'data/testpoly.dbf', 'data/testpoly.qix'] ds = None ds = gdal.OpenEx('data/emptyshapefilewithsbn.shx') assert ds.GetFileList() == ['data/emptyshapefilewithsbn.shp', 'data/emptyshapefilewithsbn.shx', 'data/emptyshapefilewithsbn.sbn', 'data/emptyshapefilewithsbn.sbx'] ds = None ############################################################################### # Test opening shapefile whose .prj has a UTF-8 BOM marker def test_ogr_shape_76(): ds = ogr.Open('data/prjwithutf8bom.shp') lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() assert sr.ExportToWkt().find('GEOGCS["NAD83"') == 0 ############################################################################### # Test opening shapefile whose .shx doesn't follow the official shapefile spec (#5608) def test_ogr_shape_77(): ds = ogr.Open('data/nonconformant_shx_ticket5608.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() geom = feat.GetGeometryRef() assert geom.ExportToWkt() == 'LINESTRING (0 1,2 3)' ############################################################################### # Test writing integer values through double fields, and cases of truncation or # loss of precision (#5625) def test_ogr_shape_78(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_78.dbf') lyr = ds.CreateLayer('ogr_shape_78') fd = ogr.FieldDefn('dblfield', ogr.OFTReal) fd.SetWidth(20) lyr.CreateField(fd) fd = ogr.FieldDefn('dblfield2', ogr.OFTReal) fd.SetWidth(20) fd.SetPrecision(1) lyr.CreateField(fd) # Integer values up to 2^53 can be exactly converted into a double. gdal.ErrorReset() f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('dblfield', (2**53) * 1.0) lyr.CreateFeature(f) assert gdal.GetLastErrorMsg() == '', 'got unexpected error/warning' # Field width too small gdal.ErrorReset() f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('dblfield2', 1e21) gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.CreateFeature(f) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'did not get expected error/warning' # Likely precision loss gdal.ErrorReset() f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('dblfield', (2**53) * 1.0 + 2) # 2^53+1 == 2^53 ! gdal.PushErrorHandler('CPLQuietErrorHandler') lyr.CreateFeature(f) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '', 'did not get expected error/warning' gdal.ErrorReset() ds = None ds = ogr.Open('/vsimem/ogr_shape_78.dbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetField('dblfield') != 9007199254740992.: f.DumpReadable() pytest.fail('did not get expected value') ds = None ############################################################################### # Test adding a field after creating features with 0 field def test_ogr_shape_79(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_79.dbf') lyr = ds.CreateLayer('ogr_shape_79') # This will create a (for now) invisible 'FID' field lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) # This will delete the implicit field fd = ogr.FieldDefn('field1', ogr.OFTReal) lyr.CreateField(fd) fd = ogr.FieldDefn('field2', ogr.OFTReal) lyr.CreateField(fd) # If the implicit field isn't deleted, this will cause crash lyr.ReorderField(0, 1) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None ds = ogr.Open('/vsimem/ogr_shape_79.dbf') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 ds = None ############################################################################### # Test reading a shape with invalid extent (nan values) (#5702) def test_ogr_shape_80(): ds = ogr.Open('data/extentnan.shp') lyr = ds.GetLayer(0) extent = lyr.GetExtent() assert extent is None or extent[0] == extent[0] ds = None ############################################################################### # Test REPACK after SetFeature() and geometry change (#XXXX) def test_ogr_shape_81(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_81.shp') lyr = ds.CreateLayer('ogr_shape_81') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,-1 -1)')) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_shape_81.shp', update=1) lyr = ds.GetLayer(0) # Add junk behind our back f = gdal.VSIFOpenL('/vsimem/ogr_shape_81.shp', 'ab') gdal.VSIFWriteL('foo', 1, 3, f) gdal.VSIFCloseL(f) size_before = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size # Should be a no-op ds.ExecuteSQL('REPACK ogr_shape_81') size_after = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size assert size_after == size_before f = lyr.GetNextFeature() f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2 2,3 3)')) lyr.SetFeature(f) # Should be a no-op ds.ExecuteSQL('REPACK ogr_shape_81') size_after = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size assert size_after == size_before # Writes a longer geometry. So .shp will be extended f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2 2,3 3,4 4)')) lyr.SetFeature(f) size_after = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size assert size_after != size_before # Should do something size_before = size_after ds.ExecuteSQL('REPACK ogr_shape_81') size_after = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size assert size_after != size_before # Writes a shorter geometry, so .shp should not change size. size_before = size_after f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(3 3,4 4)')) lyr.SetFeature(f) size_after = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size assert size_after == size_before size_before = size_after # Should do something ds.ExecuteSQL('REPACK ogr_shape_81') size_after = gdal.VSIStatL('/vsimem/ogr_shape_81.shp').size assert size_after != size_before ds = None ############################################################################### # Test string length more than 254 bytes in UTF-8 encoding cut to 254 bytes def test_ogr_shape_82(): if gdaltest.shape_ds is None: pytest.skip() # create ogrlayer to test cut long strings with UTF-8 encoding gdaltest.shape_lyr = gdaltest.shape_ds.CreateLayer('test_utf_cut', geom_type=ogr.wkbPoint, options=['ENCODING=UTF-8']) # create field to put strings to automatic cut (254 is longest field length) field_defn = ogr.FieldDefn('cut_field', ogr.OFTString) field_defn.SetWidth(254) result = gdaltest.shape_lyr.CreateField(field_defn) assert result == 0, 'failed to create new field.' # Insert feature with long string in Russian. Shoe repair ad. feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) init_rus = ( 'работает два мастера, установка набоек, замена подошвы, замена ' 'каблуков, растяжка обуви, растяжка голенищ сапог, швейные работы, ' 'ушив голенища сапога, чистка обуви, чистка замшевой обуви, замена ' 'стелек' ) result_rus = ( 'работает два мастера, установка набоек, замена подошвы, замена ' 'каблуков, растяжка обуви, растяжка голенищ сапог, швейные работы, ' 'ушив голен' ) feat.SetField('cut_field', init_rus) with gdaltest.error_handler(): gdaltest.shape_lyr.CreateFeature(feat) # Insert feature with long a string in Russian. Shoe repair ad. init_en = ( 'Remont kablukov i ih zamena; zamena naboek; profilaktika i remont ' 'podoshvy; remont i zamena supinatorov; zamena stelek; zamena obuvnoj ' 'furnitury; remont golenishha; rastjazhka obuvi; chistka i pokraska ' 'obuvi. Smolenskaja oblast, p. Monastyrshhina, ulica Sovetskaja, ' 'd. 38. Rabotaet ponedelnik – chetverg s 9.00 do 18.00, pjatnica s ' '10.00 do 17.00, vyhodnoj: subbota' ) result_en = ( 'Remont kablukov i ih zamena; zamena naboek; profilaktika i remont ' 'podoshvy; remont i zamena supinatorov; zamena stelek; zamena ' 'obuvnoj furnitury; remont golenishha; rastjazhka obuvi; chistka ' 'i pokraska obuvi. Smolenskaja oblast, p. Monastyrshhina, ulica' ) feat = ogr.Feature(feature_def=gdaltest.shape_lyr.GetLayerDefn()) feat.SetField('cut_field', init_en) gdaltest.shape_lyr.CreateFeature(feat) # TODO: check your language # save layer? # Read strings and compare with correct values. feat = gdaltest.shape_lyr.GetFeature(0) # rus assert feat.cut_field == result_rus, 'Wrong rus string cut' feat = gdaltest.shape_lyr.GetFeature(1) # en assert feat.cut_field == result_en, 'Wrong en string cut' ############################################################################### # Test behaviour with curve geometries def test_ogr_shape_83(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_83.shp') lyr = ds.CreateLayer('ogr_shape_83', geom_type=ogr.wkbCurvePolygon) assert lyr.GetGeomType() == ogr.wkbPolygon f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CURVEPOLYGON((0 0,0 1,1 1,1 0,0 0))')) lyr.CreateFeature(f) f = None f = lyr.GetFeature(0) assert f.GetGeometryRef().GetGeometryType() == ogr.wkbPolygon ds = None ############################################################################### # Test SPATIAL_INDEX creation option def test_ogr_shape_84(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_84.shp') lyr = ds.CreateLayer('ogr_shape_84', options=['SPATIAL_INDEX=YES']) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,1 0,0 0))')) lyr.CreateFeature(f) f = None ds = None assert gdal.VSIStatL('/vsimem/ogr_shape_84.qix') is not None ############################################################################### # Test Integer64 def test_ogr_shape_85(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_85.shp') lyr = ds.CreateLayer('ogr_shape_85') lyr.CreateField(ogr.FieldDefn('int', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64', ogr.OFTInteger64)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 123456789) f.SetField(1, 123456789012345678) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_shape_85.shp', update=1) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTInteger64 f = lyr.GetNextFeature() assert f.GetField(0) == 123456789 and f.GetField(1) == 123456789012345678 # Passing from 9 to 10 figures causes "promotion" to Integer64 f.SetField(0, 2000000000) # Passing from 18 to 19 figures causes "promotion" to Real f.SetField(1, 9000000000000000000) lyr.SetFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_shape_85.shp') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger64 assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTReal f = lyr.GetNextFeature() assert f.GetField(0) == 2000000000 and f.GetField(1) == 9000000000000000000 ds = None # Test open option ADJUST_TYPE ds = gdal.OpenEx('/vsimem/ogr_shape_85.shp', gdal.OF_VECTOR, open_options=['ADJUST_TYPE=YES']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTInteger64 f = lyr.GetNextFeature() assert f.GetField(0) == 2000000000 and f.GetField(1) == 9000000000000000000 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_85.shp') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_85.shp') lyr = ds.CreateLayer('ogr_shape_85') lyr.CreateField(ogr.FieldDefn('int', ogr.OFTInteger)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField(0, 123456789) lyr.CreateFeature(f) fd = ogr.FieldDefn("foo", ogr.OFTInteger64) ret = lyr.AlterFieldDefn(0, fd, ogr.ALTER_TYPE_FLAG) assert ret == 0 f.SetField(0, 123456789012345678) lyr.SetFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_shape_85.shp', update=1) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetType() == ogr.OFTInteger64 f = lyr.GetNextFeature() assert f.GetField(0) == 123456789012345678 ds = None ############################################################################### # Robustness: test reading a non-conformant shapefile that mixes different shape type # OGR can not produce such a file (unless patched) def test_ogr_shape_86(): ds = ogr.Open('data/mixed_shape_type_non_conformant.shp') sql_lyr = ds.ExecuteSQL("select count(distinct ogr_geometry) from mixed_shape_type_non_conformant") f = sql_lyr.GetNextFeature() val = f.GetField(0) ds.ReleaseResultSet(sql_lyr) assert val == 6 ############################################################################### # Check we accept opening standalone .dbf files with weird header lengths (#6035) def test_ogr_shape_87(): ds = ogr.Open('data/weird_header_length.dbf') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetField(0) == 1 ############################################################################### # Test REPACK after SetFeature() and geometry change, without DBF def test_ogr_shape_88(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_88.shp') lyr = ds.CreateLayer('ogr_shape_88') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1)')) lyr.CreateFeature(f) f = None ds = None gdal.Unlink('/vsimem/ogr_shape_88.dbf') ds = ogr.Open('/vsimem/ogr_shape_88.shp', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1,2 2)')) lyr.SetFeature(f) ds.ExecuteSQL('REPACK ogr_shape_88') ds = None ############################################################################### # Test reading geometry bigger than 10 MB def test_ogr_shape_89(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_89.shp') lyr = ds.CreateLayer('ogr_shape_89') f = ogr.Feature(lyr.GetLayerDefn()) g = ogr.Geometry(ogr.wkbLineString) g.AddPoint_2D(0, 0) g.AddPoint_2D(1, 1) f.SetGeometryDirectly(g) lyr.CreateFeature(f) f = None ds = None gdal.Unlink('/vsimem/ogr_shape_89.dbf') # The declare file size doesn't match the real one f = gdal.VSIFOpenL('/vsimem/ogr_shape_89.shx', 'rb+') gdal.VSIFSeekL(f, 100 + 4, 0) gdal.VSIFWriteL(struct.pack('>i', int((10 * 1024 * 1024) / 2)), 1, 4, f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/ogr_shape_89.shp') lyr = ds.GetLayer(0) with gdaltest.error_handler(): f = lyr.GetNextFeature() assert f is None or f.GetGeometryRef() is None ds = None f = gdal.VSIFOpenL('/vsimem/ogr_shape_89.shp', 'rb+') gdal.VSIFSeekL(f, 100 + 8 + 10 * 1024 * 1024 - 1, 0) gdal.VSIFWriteL(struct.pack('B', 0), 1, 1, f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/ogr_shape_89.shp') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetPointCount() == 2 ds = None ############################################################################### # Test reading a lot of geometries def test_ogr_shape_90(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_90.shp') lyr = ds.CreateLayer('ogr_shape_90') g = ogr.CreateGeometryFromWkt('POINT(0 0)') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(g) lyr.CreateFeature(f) ds = None gdal.Unlink('/vsimem/ogr_shape_90.dbf') # The declare file size doesn't match the real one f = gdal.VSIFOpenL('/vsimem/ogr_shape_90.shx', 'rb+') filesize = int((100 + 8 * 1024 * 1024) / 2) gdal.VSIFSeekL(f, 24, 0) gdal.VSIFWriteL(struct.pack('>i', filesize), 1, 4, f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/ogr_shape_90.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 # Now it is consistent f = gdal.VSIFOpenL('/vsimem/ogr_shape_90.shx', 'rb+') gdal.VSIFSeekL(f, 100 + 8 * 1024 * 1024 - 1, 0) gdal.VSIFWriteL(struct.pack('B', 0), 1, 1, f) gdal.VSIFCloseL(f) ds = ogr.Open('/vsimem/ogr_shape_90.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1024 * 1024 ds = None ############################################################################### # Test reading XYM geometries but with missing M array (#6317) def test_ogr_shape_91(): ds = ogr.Open('data/arcm_without_m.shp') lyr = ds.GetLayer(0) for _ in lyr: pass ds = ogr.Open('data/polygonm_without_m.shp') lyr = ds.GetLayer(0) for _ in lyr: pass ############################################################################### # Test reading multipoint Z geometries without M def test_ogr_shape_92(): ds = ogr.Open('data/multipointz_without_m.shp') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() wkt = f.GetGeometryRef().ExportToIsoWkt() assert wkt == 'MULTIPOINT Z ((0 1 2),(3 4 5))' ############################################################################### # Test reading point Z geometries without M def test_ogr_shape_93(): ds = ogr.Open('data/pointz_without_m.shp') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() wkt = f.GetGeometryRef().ExportToIsoWkt() assert wkt == 'POINT Z (1 2 3)' ############################################################################### # Test SHPT creation option / CreateLayer(geom_type = xxx) def test_ogr_shape_94(): tests = [["POINT", ogr.wkbPoint, "POINT (1 2)"], ["POINTM", ogr.wkbPointM, "POINT M (1 2 3)"], ["POINTZ", ogr.wkbPoint25D, "POINT Z (1 2 3)"], ["POINTZM", ogr.wkbPointZM, "POINT ZM (1 2 3 4)"], ["MULTIPOINT", ogr.wkbMultiPoint, "MULTIPOINT ((1 2))"], ["MULTIPOINTM", ogr.wkbMultiPointM, "MULTIPOINT M ((1 2 3))"], ["MULTIPOINTZ", ogr.wkbMultiPoint25D, "MULTIPOINT Z ((1 2 3))"], ["MULTIPOINTZM", ogr.wkbMultiPointZM, "MULTIPOINT ZM ((1 2 3 4))"], ["ARC", ogr.wkbLineString, "LINESTRING (1 2,3 4)"], ["ARCM", ogr.wkbLineStringM, "LINESTRING M (1 2 3,5 6 7)"], ["ARCZ", ogr.wkbLineString25D, "LINESTRING Z (1 2 3,5 6 7)"], ["ARCZM", ogr.wkbLineStringZM, "LINESTRING ZM (1 2 3 4,5 6 7 8)"], ["ARC", ogr.wkbMultiLineString, "MULTILINESTRING ((1 2,3 4),(1 2,3 4))"], ["ARCM", ogr.wkbMultiLineStringM, "MULTILINESTRING M ((1 2 3,5 6 7),(1 2 3,5 6 7))"], ["ARCZ", ogr.wkbMultiLineString25D, "MULTILINESTRING Z ((1 2 3,5 6 7),(1 2 3,5 6 7))"], ["ARCZM", ogr.wkbMultiLineStringZM, "MULTILINESTRING ZM ((1 2 3 4,5 6 7 8),(1 2 3 4,5 6 7 8))"], ["POLYGON", ogr.wkbPolygon, "POLYGON ((0 0,0 1,1 1,1 0))"], ["POLYGONM", ogr.wkbPolygonM, "POLYGON M ((0 0 2,0 1 2,1 1 2,1 0 2))"], ["POLYGONZ", ogr.wkbPolygon25D, "POLYGON Z ((0 0 2,0 1 2,1 1 2,1 0 2))"], ["POLYGONZM", ogr.wkbPolygonZM, "POLYGON ZM ((0 0 2 3,0 1 2 3,1 1 2 3,1 0 2 3))"], ["POLYGON", ogr.wkbMultiPolygon, "MULTIPOLYGON (((0 0,0 1,1 1,1 0)),((100 0,100 1,101 1,101 0)))"], ["POLYGONM", ogr.wkbMultiPolygonM, "MULTIPOLYGON M (((0 0 2,0 1 2,1 1 2,1 0 2)),((100 0 2,100 1 2,101 1 2,101 0 2)))"], ["POLYGONZ", ogr.wkbMultiPolygon25D, "MULTIPOLYGON Z (((0 0 2,0 1 2,1 1 2,1 0 2)),((100 0 2,100 1 2,101 1 2,101 0 2)))"], ["POLYGONZM", ogr.wkbMultiPolygonZM, "MULTIPOLYGON ZM (((0 0 2 3,0 1 2 3,1 1 2 3,1 0 2 3)),((100 0 2 3,100 1 2 3,101 1 2 3,101 0 2 3)))"], ] for test in tests: try: (shpt, geom_type, wkt, expected_fail) = test except ValueError: (shpt, geom_type, wkt) = test expected_fail = False for i in range(2): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_94.shp') if i == 0: lyr = ds.CreateLayer('ogr_shape_94', options=['SHPT=' + shpt]) else: lyr = ds.CreateLayer('ogr_shape_94', geom_type=geom_type) test_lyr_geom_type = ogr.GT_Flatten(geom_type) != ogr.wkbMultiLineString and ogr.GT_Flatten(geom_type) != ogr.wkbMultiPolygon assert not test_lyr_geom_type or lyr.GetGeomType() == geom_type, \ (i, shpt, geom_type, wkt, lyr.GetGeomType()) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('/vsimem/ogr_shape_94.shp') lyr = ds.GetLayer(0) assert not test_lyr_geom_type or lyr.GetGeomType() == geom_type, \ (shpt, geom_type, wkt, lyr.GetGeomType()) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != wkt: if expected_fail: print('FIXME!:', i, shpt, geom_type, wkt, f.GetGeometryRef().ExportToIsoWkt()) else: pytest.fail(i, shpt, geom_type, wkt, f.GetGeometryRef().ExportToIsoWkt()) ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_94.shp') ############################################################################### # Test demoting of ZM to Z when the M values are nodata def test_ogr_shape_95(): ds = gdal.OpenEx('data/pointzm_with_all_nodata_m.shp') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint25D f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToIsoWkt() == 'POINT Z (1 2 3)', lyr.GetGeomType() ds = gdal.OpenEx('data/pointzm_with_all_nodata_m.shp', open_options=['ADJUST_GEOM_TYPE=NO']) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPointZM f = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(f, ogr.CreateGeometryFromWkt('POINT ZM (1 2 3 -1.79769313486232e+308)')) == 0, \ f.GetGeometryRef().ExportToIsoWkt() # The shape with a non nodata M is the second one ds = gdal.OpenEx('data/pointzm_with_one_valid_m.shp', open_options=['ADJUST_GEOM_TYPE=FIRST_SHAPE']) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint25D ds = gdal.OpenEx('data/pointzm_with_one_valid_m.shp', open_options=['ADJUST_GEOM_TYPE=ALL_SHAPES']) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPointZM ############################################################################### # Test updating a XYM shapefile (#6331) def test_ogr_shape_96(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_96.shp') lyr = ds.CreateLayer('ogr_shape_96') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT M (1 2 3)')) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_shape_96.shp', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToIsoWkt() == 'POINT M (1 2 3)' f.SetGeometry(ogr.CreateGeometryFromWkt('POINT M (1 2 4)')) lyr.SetFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_shape_96.shp') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToIsoWkt() == 'POINT M (1 2 4)' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_96.shp') ############################################################################### # Test updating a XYZM shapefile def test_ogr_shape_97(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_97.shp') lyr = ds.CreateLayer('ogr_shape_97') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT ZM (1 2 3 4)')) lyr.CreateFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_shape_97.shp', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToIsoWkt() == 'POINT ZM (1 2 3 4)' f.SetGeometry(ogr.CreateGeometryFromWkt('POINT ZM (1 2 5 6)')) lyr.SetFeature(f) ds = None ds = ogr.Open('/vsimem/ogr_shape_97.shp') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToIsoWkt() == 'POINT ZM (1 2 5 6)' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_97.shp') ############################################################################### # Test restore function when .shx file is missing def test_ogr_shape_98(): if gdaltest.shape_ds is None: pytest.skip() gdal.SetConfigOption('SHAPE_RESTORE_SHX', 'TRUE') shutil.copy('data/can_caps.shp', 'tmp/can_caps.shp') shp_ds = ogr.Open('tmp/can_caps.shp', update=1) shp_lyr = shp_ds.GetLayer(0) assert shp_lyr.GetFeatureCount() == 13, 'Got wrong number of features.' shp_lyr = None shp_ds = None gdal.SetConfigOption('SHAPE_RESTORE_SHX', None) ref_shx = open('data/can_caps.shx', 'rb').read() got_shx = open('tmp/can_caps.shx', 'rb').read() os.remove('tmp/can_caps.shp') os.remove('tmp/can_caps.shx') assert ref_shx == got_shx, 'Rebuilt shx is different from original shx.' ############################################################################### # Import TOWGS84 from EPSG when possible (#6485) def test_ogr_shape_99(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_99.shp') lyr = ds.CreateLayer('ogr_shape_99') ds = None gdal.FileFromMemBuffer('/vsimem/ogr_shape_99.prj', """PROJCS["CH1903_LV03",GEOGCS["GCS_CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["False_Easting",600000.0],PARAMETER["False_Northing",200000.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Azimuth",90.0],PARAMETER["Longitude_Of_Center",7.439583333333333],PARAMETER["Latitude_Of_Center",46.95240555555556],UNIT["Meter",1.0],AUTHORITY["EPSG",21781]]""") ds = ogr.Open('/vsimem/ogr_shape_99.shp') lyr = ds.GetLayer(0) got_wkt = lyr.GetSpatialRef().ExportToPrettyWkt() expected_wkt = """PROJCS["CH1903 / LV03", GEOGCS["CH1903", DATUM["CH1903", SPHEROID["Bessel 1841",6377397.155,299.1528128, AUTHORITY["EPSG","7004"]], AUTHORITY["EPSG","6149"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4149"]], PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"], PARAMETER["latitude_of_center",46.9524055555556], PARAMETER["longitude_of_center",7.43958333333333], PARAMETER["azimuth",90], PARAMETER["rectified_grid_angle",90], PARAMETER["scale_factor",1], PARAMETER["false_easting",600000], PARAMETER["false_northing",200000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","21781"]]""" ds = None assert got_wkt == expected_wkt, ('Projections differ: got %s' % got_wkt) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_99.shp') ############################################################################### # Test REPACK with both implementations def test_ogr_shape_100(): old_val = gdal.GetConfigOption('OGR_SHAPE_PACK_IN_PLACE') for variant in ['YES', 'NO']: ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/ogr_shape_100.shp') lyr = ds.CreateLayer('ogr_shape_100') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1)')) f.SetField('foo', '1') lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 1,2 2,3 3)')) f.SetField('foo', '2') lyr.CreateFeature(f) f = None lyr.DeleteFeature(0) gdal.SetConfigOption('OGR_SHAPE_PACK_IN_PLACE', variant) f_dbf = None f_shp = None f_shx = None if sys.platform == 'win32' and variant == 'YES': # Locks the files. No way to do this on Unix easily f_dbf = open('tmp/ogr_shape_100.dbf', 'rb') f_shp = open('tmp/ogr_shape_100.shp', 'rb') f_shx = open('tmp/ogr_shape_100.shx', 'rb') ds.ExecuteSQL('REPACK ogr_shape_100') del f_dbf del f_shp del f_shx gdal.SetConfigOption('OGR_SHAPE_PACK_IN_PLACE', old_val) assert gdal.GetLastErrorMsg() == '', variant for ext in ['dbf', 'shp', 'shx', 'cpg']: assert gdal.VSIStatL('tmp/ogr_shape_100_packed.' + ext) is None, variant f = lyr.GetFeature(0) if f['foo'] != '2' or f.GetGeometryRef().ExportToWkt() != 'LINESTRING (1 1,2 2,3 3)': f.DumpReadable() pytest.fail(variant) with gdaltest.error_handler(): f = lyr.GetFeature(1) assert f is None, variant lyr.ResetReading() assert lyr.GetFeatureCount() == 1, variant f = lyr.GetNextFeature() if f['foo'] != '2' or f.GetGeometryRef().ExportToWkt() != 'LINESTRING (1 1,2 2,3 3)': f.DumpReadable() pytest.fail(variant) f = lyr.GetNextFeature() assert f is None, variant f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (3 3,4 4,5 5,6 6)')) f.SetField('foo', '3') lyr.CreateFeature(f) f = None ds = None ds = ogr.Open('tmp/ogr_shape_100.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2, variant f = lyr.GetNextFeature() if f['foo'] != '2' or f.GetGeometryRef().ExportToWkt() != 'LINESTRING (1 1,2 2,3 3)': f.DumpReadable() pytest.fail(variant) f = lyr.GetNextFeature() if f['foo'] != '3' or f.GetGeometryRef().ExportToWkt() != 'LINESTRING (3 3,4 4,5 5,6 6)': f.DumpReadable() pytest.fail(variant) f = lyr.GetNextFeature() assert f is None, variant ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/ogr_shape_100.shp') ############################################################################### # Test auto repack def test_ogr_shape_101(): for i in range(2): # Auto-repack on create ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_101.shp') lyr = ds.CreateLayer('ogr_shape_101') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1)')) f.SetField('foo', '1') lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 1,2 2,3 3)')) f.SetField('foo', '2') lyr.CreateFeature(f) f = None lyr.DeleteFeature(0) if i == 0: ds = None else: ds.SyncToDisk() assert lyr.GetFeatureCount() == 1, i # No-op ds.ExecuteSQL('REPACK ogr_shape_101') ds_read = ogr.Open('/vsimem/ogr_shape_101.shp') lyr = ds_read.GetLayer(0) assert lyr.GetFeatureCount() == 1, i f = lyr.GetNextFeature() if f.GetFID() != 0 or f['foo'] != '2' or f.GetGeometryRef().ExportToWkt() != 'LINESTRING (1 1,2 2,3 3)': f.DumpReadable() pytest.fail(i) f = lyr.GetNextFeature() assert f is None, i ds = None ds_read = None if i == 0: # Auto-repack on update ds = ogr.Open('/vsimem/ogr_shape_101.shp', update=1) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (3 3,4 4,5 5,6 6)')) f.SetField('foo', '3') lyr.CreateFeature(f) lyr.DeleteFeature(0) ds = None ds = ogr.Open('/vsimem/ogr_shape_101.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1, i f = lyr.GetNextFeature() if f.GetFID() != 0 or f['foo'] != '3' or f.GetGeometryRef().ExportToWkt() != 'LINESTRING (3 3,4 4,5 5,6 6)': f.DumpReadable() pytest.fail(i) f = lyr.GetNextFeature() assert f is None, i ds = None # Test disabling auto-repack on update ds = gdal.OpenEx('/vsimem/ogr_shape_101.shp', gdal.OF_UPDATE, open_options=['AUTO_REPACK=NO']) lyr = ds.GetLayer(0) f = ogr.Feature(lyr.GetLayerDefn()) f.SetField('foo', '4') lyr.CreateFeature(f) lyr.DeleteFeature(0) ds = None ds = ogr.Open('/vsimem/ogr_shape_101.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2, i f = lyr.GetNextFeature() if f.GetFID() != 1 or f['foo'] != '4': f.DumpReadable() pytest.fail(i) ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_101.shp') ############################################################################### # Test reading invalid .prj def test_ogr_shape_102(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/ogr_shape_102.shp') lyr = ds.CreateLayer('ogr_shape_102', geom_type=ogr.wkbPoint) ds = None gdal.FileFromMemBuffer('/vsimem/ogr_shape_102.prj', 'invalid') ds = ogr.Open('/vsimem/ogr_shape_102.shp') lyr = ds.GetLayer(0) lyr.GetSpatialRef() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/ogr_shape_102.shp') ############################################################################### # Test handling of EOF character def check_EOF(filename, expected=True): f = gdal.VSIFOpenL(filename, 'rb') if f is None: print('%s does not exist' % filename) return False size = gdal.VSIStatL(filename).size content = gdal.VSIFReadL(1, size, f) gdal.VSIFCloseL(f) pos = content.find('\x1A'.encode('LATIN1')) if expected: if pos < 0: print('Did not find EOF char') return False if pos != size - 1: print('Found EOF char but not at end of file!') return False elif pos >= 0: print('Found EOF char but we did not expect that !') return False return True def test_ogr_shape_103(): filename = '/vsimem/ogr_shape_103.dbf' for (options, expected) in [(['DBF_EOF_CHAR=YES'], True), ([], True), (['DBF_EOF_CHAR=NO'], False)]: options += ['DBF_DATE_LAST_UPDATE=1970-01-01'] # Create empty file ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_shape_103', geom_type=ogr.wkbNone, options=options) ds = None assert check_EOF(filename, expected=expected), options # Add field ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ds = None assert check_EOF(filename, expected=expected) # Add record ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None assert check_EOF(filename, expected=expected) # Add another field ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.CreateField(ogr.FieldDefn('foo2', ogr.OFTString)) ds = None assert check_EOF(filename, expected=expected) # Grow a field ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) fd = lyr.GetLayerDefn().GetFieldDefn(0) new_fd = ogr.FieldDefn(fd.GetName(), fd.GetType()) new_fd.SetWidth(fd.GetWidth() + 1) lyr.AlterFieldDefn(0, fd, ogr.ALTER_ALL_FLAG) ds = None assert check_EOF(filename, expected=expected) # Reorder fields ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.ReorderFields([1, 0]) ds = None assert check_EOF(filename, expected=expected) # Shrink a field ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) fd = lyr.GetLayerDefn().GetFieldDefn(0) new_fd = ogr.FieldDefn(fd.GetName(), fd.GetType()) new_fd.SetWidth(fd.GetWidth() + 1) lyr.AlterFieldDefn(0, fd, ogr.ALTER_ALL_FLAG) ds = None assert check_EOF(filename, expected=expected) # Remove a field ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.DeleteField(0) ds = None assert check_EOF(filename, expected=expected) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) # Create file with one field but no record ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_shape_103', geom_type=ogr.wkbNone, options=options) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) ds = None assert check_EOF(filename, expected=expected) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) # Create file with two records ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_shape_103', geom_type=ogr.wkbNone, options=options) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None assert check_EOF(filename, expected=expected) # Test editing a record that is not the last one ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.SetFeature(lyr.GetNextFeature()) ds = None assert check_EOF(filename, expected=expected) # Test editing the last record ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=options) lyr = ds.GetLayer(0) lyr.GetNextFeature() lyr.SetFeature(lyr.GetNextFeature()) ds = None assert check_EOF(filename, expected=expected) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) # Test appending to a file without a EOF marker ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_shape_103', geom_type=ogr.wkbNone, options=['DBF_EOF_CHAR=NO'] + ['DBF_DATE_LAST_UPDATE=1970-01-01']) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=['DBF_DATE_LAST_UPDATE=1970-01-01']) lyr = ds.GetLayer(0) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds.FlushCache() assert check_EOF(filename) ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) # Test editing a record (that is not the last one ) in a file without a EOF marker ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_shape_103', geom_type=ogr.wkbNone, options=['DBF_EOF_CHAR=NO'] + ['DBF_DATE_LAST_UPDATE=1970-01-01']) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) lyr.CreateFeature(ogr.Feature(lyr.GetLayerDefn())) ds = None ds = gdal.OpenEx(filename, gdal.OF_UPDATE, open_options=['DBF_DATE_LAST_UPDATE=1970-01-01']) lyr = ds.GetLayer(0) lyr.SetFeature(lyr.GetNextFeature()) ds = None # To document our current behaviour. Could make sense to be changed. assert check_EOF(filename, expected=False) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) ############################################################################### # Test writing MULTIPATCH def test_ogr_shape_104(): for (wkt, lyr_type, options, expected_wkt) in \ [['TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))', ogr.wkbUnknown, [], None], ['TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)),((0 0 0,1 1 3,2 2 4,0 0 0)))', ogr.wkbUnknown, [], None], # triangle fan ['TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)),((0 1 2,1 1 3,4 4 5,0 1 2)))', ogr.wkbUnknown, [], None], # triangle strip ['TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)),((1 1 3,0 1 2,4 4 5,1 1 3)))', ogr.wkbUnknown, [], None], # no fan no strip ['TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)),((0 0 0,0 1 2,1 1 3,0 0 0)),((1 1 3,0 1 2,4 4 5,1 1 3)))', ogr.wkbUnknown, [], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)),((1 1 3,0 1 2,4 4 5,1 1 3)))'], # no fan no strip with duplicated triangle (as found in #5888) ['POLYHEDRALSURFACE Z (((0 0 0,0 1 2,1 1 3,0 0 0)))', ogr.wkbUnknown, [], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))'], ['GEOMETRYCOLLECTION Z (TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0))))', ogr.wkbUnknown, [], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))'], ['TRIANGLE Z ((0 0 0,0 1 2,1 1 3,0 0 0))', ogr.wkbUnknown, ['SHPT=MULTIPATCH'], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))'], ['TRIANGLE Z ((0 0 0,0 1 2,1 1 3,0 0 0))', ogr.wkbTINZ, [], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))'], ['POLYGON Z ((0 0 0,0 1 2,1 1 3,0 0 0))', ogr.wkbTINZ, [], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))'], ['MULTIPOLYGON Z (((0 0 0,0 1 2,1 1 3,0 0 0)))', ogr.wkbTINZ, [], 'TIN Z (((0 0 0,0 1 2,1 1 3,0 0 0)))'], ]: if expected_wkt is None: expected_wkt = wkt filename = '/vsimem/ogr_shape_104.shp' ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource(filename) lyr = ds.CreateLayer('ogr_shape_104', geom_type=lyr_type, options=options) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != expected_wkt: f.DumpReadable() pytest.fail(wkt, lyr_type, options) ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource(filename) ############################################################################### # Test reading .dbf with substantial padding after last field definition. def test_ogr_shape_105(): ds = ogr.Open('data/padding_after_field_defns.dbf') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 f = lyr.GetNextFeature() assert f['id'] == '1' and f['foo'] == '2' ############################################################################### # Test that rewriting the last shape reuses the space it took. (#6787) def test_ogr_shape_106(): shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource('/vsimem/ogr_shape_106.shp') lyr = ds.CreateLayer('ogr_shape_81') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1)')) lyr.CreateFeature(f) f = None ds = None size = gdal.VSIStatL('/vsimem/ogr_shape_106.shp').size assert size == 188 ds = ogr.Open('/vsimem/ogr_shape_106.shp', update=1) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() # Write larger shape f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2 2,3 3,4 4)')) lyr.SetFeature(f) ds = None size = gdal.VSIStatL('/vsimem/ogr_shape_106.shp').size assert size == 188 + 2 * 8 shape_drv.DeleteDataSource('/vsimem/ogr_shape_106.shp') ############################################################################### # Compare to VSI*L file def is_same(filename1, filename2, verbose=True): f1 = gdal.VSIFOpenL(filename1, "rb") if f1 is None: if verbose: print('%s does not exist' % filename1) return False f2 = gdal.VSIFOpenL(filename2, "rb") if f2 is None: if verbose: print('%s does not exist' % filename2) gdal.VSIFCloseL(f1) return False ret = True size1 = gdal.VSIStatL(filename1).size size2 = gdal.VSIStatL(filename2).size if size1 != size2: if verbose: print('%s size is %d, whereas %s size is %d' % (filename1, size1, filename2, size2)) ret = False if ret: data1 = gdal.VSIFReadL(1, size1, f1) data2 = gdal.VSIFReadL(1, size2, f2) if data1 != data2: if verbose: print('File content of %s and %s are different' % (filename1, filename2)) print(struct.unpack('B' * len(data1), data1)) print(struct.unpack('B' * len(data2), data2)) ret = False gdal.VSIFCloseL(f1) gdal.VSIFCloseL(f2) return ret ############################################################################### # Test that multiple edition of the last shape works properly (#7031) def test_ogr_shape_107(): layer_name = 'ogr_shape_107' filename = '/vsimem/' + layer_name + '.shp' copy_filename = '/vsimem/' + layer_name + '_copy.shp' shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(filename) lyr = ds.CreateLayer(layer_name) # Create a shape f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2.5 3.5)')) lyr.CreateFeature(f) # Modify it to be larger f = lyr.GetFeature(0) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (1 2,3 4)')) lyr.SetFeature(f) # Insert new feature f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (5 6)')) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'LINESTRING (1 2,3 4)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'LINESTRING (5 6)': f.DumpReadable() pytest.fail() ds = None gdal.VectorTranslate(copy_filename, filename) assert is_same(copy_filename, filename) shape_drv.DeleteDataSource(copy_filename) shape_drv.DeleteDataSource(filename) ds = shape_drv.CreateDataSource(filename) lyr = ds.CreateLayer(layer_name) # Create a shape f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (1 2,1.5 2.5,3 4)')) lyr.CreateFeature(f) # Modify it to be smaller f = lyr.GetFeature(0) f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 2,3 4)')) lyr.SetFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'LINESTRING (1 2,3 4)': f.DumpReadable() pytest.fail() ds = None gdal.VectorTranslate(copy_filename, filename) assert is_same(copy_filename, filename) shape_drv.DeleteDataSource(copy_filename) shape_drv.DeleteDataSource(filename) ############################################################################### # Test spatial + attribute filter def test_ogr_shape_108(): ds = ogr.Open('data/poly.shp') lyr = ds.GetLayer(0) lyr.SetSpatialFilterRect(479750.6875, 4764702.0, 479750.6875, 4764702.0) expected_fc = lyr.GetFeatureCount() lyr.SetAttributeFilter("1=1") assert lyr.GetFeatureCount() == expected_fc ############################################################################### # Test writing invalid polygon def test_ogr_shape_109(): layer_name = 'ogr_shape_109' filename = '/vsimem/' + layer_name + '.shp' shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(filename) lyr = ds.CreateLayer(layer_name) # Create a shape f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((1 2))')) lyr.CreateFeature(f) ds = None shape_drv.DeleteDataSource(filename) ############################################################################### def test_ogr_shape_110_write_invalid_multipatch(): layer_name = 'ogr_shape_110' filename = '/vsimem/' + layer_name + '.shp' shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(filename) lyr = ds.CreateLayer(layer_name, options=['SHPT=MULTIPATCH']) # Create a shape f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 0))')) lyr.CreateFeature(f) ds = None shape_drv.DeleteDataSource(filename) ############################################################################### def test_ogr_shape_111_delete_field_no_record(): layer_name = 'ogr_shape_111_delete_field_no_record' filename = '/vsimem/' + layer_name + '.shp' shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(filename) lyr = ds.CreateLayer(layer_name) lyr.CreateField(ogr.FieldDefn('field_1')) lyr.CreateField(ogr.FieldDefn('field_2')) ds = None ds = ogr.Open(filename, update = 1) lyr = ds.GetLayer(0) lyr.DeleteField(1) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldDefn(0).GetName() == 'field_1' ds = None shape_drv.DeleteDataSource(filename) ############################################################################### def test_ogr_shape_112_delete_layer(): dirname = '/vsimem/test_ogr_shape_112_delete_layer' shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(dirname) ds.CreateLayer("test") ds = None ds = ogr.Open(dirname) with gdaltest.error_handler(): assert ds.DeleteLayer(0) != 0 ds = None ds = ogr.Open(dirname, update = 1) with gdaltest.error_handler(): assert ds.DeleteLayer(-1) != 0 assert ds.DeleteLayer(1) != 0 gdal.FileFromMemBuffer(dirname + "/test.cpg", "foo") assert ds.DeleteLayer(0) == 0 assert not gdal.VSIStatL(dirname + "/test.shp") assert not gdal.VSIStatL(dirname + "/test.cpg") ds = None shape_drv.DeleteDataSource(dirname) ############################################################################### def test_ogr_shape_113_restore_shx_empty_shp_shx(): dirname = '/vsimem/test_ogr_shape_113_restore_shx_empty_shp_shx' dbfname = dirname + "/foo.dbf" shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(dbfname) lyr = ds.CreateLayer("test") lyr.CreateField(ogr.FieldDefn("foo")) f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'bar' lyr.CreateFeature(f) ds = None gdal.FileFromMemBuffer(dirname + '/foo.shp', '') gdal.FileFromMemBuffer(dirname + '/foo.shx', '') with gdaltest.config_option('SHAPE_RESTORE_SHX', 'YES'): with gdaltest.error_handler(): ds = ogr.Open(dbfname) assert ds lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert f['foo'] == 'bar' ds = None shape_drv.DeleteDataSource(dbfname) ############################################################################### def test_ogr_shape_layer_no_geom_but_srs(): filename = '/vsimem/test_ogr_shape_layer_no_geom_but_srs' shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(filename) sr = osr.SpatialReference() ds.CreateLayer("test", sr, ogr.wkbNone) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.CreateLayer("test2", sr, ogr.wkbNone) ds = None shape_drv.DeleteDataSource(filename) ############################################################################### def test_ogr_shape_114_shz(): shz_name = 'tmp/test_ogr_shape_114.shz' gdal.Unlink(shz_name) assert gdal.VectorTranslate(shz_name, 'data/poly.shp') # Add an extra unrelated file f = gdal.VSIFOpenL('/vsizip/{' + shz_name + '}/README.TXT', 'wb') assert f gdal.VSIFWriteL("hello", 1, len("hello"), f) gdal.VSIFCloseL(f) ds = ogr.Open(shz_name) lyr = ds.GetLayer(0) assert lyr.GetName() == 'test_ogr_shape_114' assert lyr.GetFeatureCount() == 10 ds = None ds = ogr.Open(shz_name, update = 1) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 10 assert ds.TestCapability(ogr.ODsCCreateLayer) == 0 with gdaltest.error_handler(): assert not ds.CreateLayer('foo') assert ds.TestCapability(ogr.ODsCDeleteLayer) == 0 with gdaltest.error_handler(): assert ds.DeleteLayer(0) == ogr.OGRERR_FAILURE assert lyr.DeleteFeature(1) == 0 ds = None ds = ogr.Open(shz_name) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 9 ds = None import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + shz_name) assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Check that our extra unrelated file is still there assert gdal.VSIStatL('/vsizip/{' + shz_name + '}/README.TXT') shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_drv.DeleteDataSource(shz_name) assert not gdal.VSIStatL(shz_name) with gdaltest.error_handler(): assert not shape_drv.CreateDataSource('/i_do/not_exist/my.shz') ############################################################################### def test_ogr_shape_115_shp_zip(): dirname = 'tmp/test_ogr_shape_115' gdal.RmdirRecursive(dirname) os.mkdir(dirname) filename = dirname + '/test_ogr_shape_115.shp.zip' tmp_uncompressed = 'test_ogr_shape_115.shp.zip_tmp_uncompressed' lockfile = 'test_ogr_shape_115.shp.zip.gdal.lock' with gdaltest.config_option('OGR_SHAPE_PACK_IN_PLACE', 'YES'): ds = gdal.VectorTranslate(filename, 'data/poly.shp') assert tmp_uncompressed in gdal.ReadDir(dirname) assert ds with gdaltest.config_option('OGR_SHAPE_PACK_IN_PLACE', 'NO'): assert gdal.VectorTranslate(ds, 'data/poly.shp', options = '-nln polyY') ds = None ds = gdal.OpenEx(filename, gdal.OF_VECTOR | gdal.OF_UPDATE) with gdaltest.config_option('OGR_SHAPE_USE_VSIMEM_FOR_TEMP', 'NO'): assert gdal.VectorTranslate(ds, 'data/poly.shp', options = '-nln polyX') assert tmp_uncompressed in gdal.ReadDir(dirname) ds = None ds = gdal.OpenEx(filename, gdal.OF_VECTOR | gdal.OF_UPDATE) assert gdal.VectorTranslate(ds, 'data/poly.shp', options = '-nln polyZ') assert tmp_uncompressed not in gdal.ReadDir(dirname) ds = None # Add an extra unrelated file f = gdal.VSIFOpenL('/vsizip/{' + filename + '}/README.TXT', 'wb') assert f gdal.VSIFWriteL("hello", 1, len("hello"), f) gdal.VSIFCloseL(f) with gdaltest.config_option('OGR_SHAPE_USE_VSIMEM_FOR_TEMP', 'NO'): ds = ogr.Open(filename) assert ds.GetLayerCount() == 4 assert [ds.GetLayer(i).GetName() for i in range(4)] == ['poly', 'polyY', 'polyX', 'polyZ'] assert [ds.GetLayer(i).GetFeatureCount() for i in range(4)] == [ 10, 10, 10, 10 ] assert not tmp_uncompressed in gdal.ReadDir(dirname) gdal.ErrorReset() ds.ExecuteSQL('UNCOMPRESS') assert gdal.GetLastErrorMsg() == '' assert not tmp_uncompressed in gdal.ReadDir(dirname) ds = None ds = gdal.OpenEx(filename, gdal.OF_VECTOR | gdal.OF_UPDATE) lyr = ds.GetLayer(0) assert not tmp_uncompressed in gdal.ReadDir(dirname) with gdaltest.config_option('OGR_SHAPE_LOCK_DELAY', '0.01'): ds.ExecuteSQL('UNCOMPRESS') assert tmp_uncompressed in gdal.ReadDir(dirname) assert lockfile in gdal.ReadDir(dirname) old_data = open(dirname + '/' + lockfile, 'rb').read() time.sleep(0.1) assert open(dirname + '/' + lockfile, 'rb').read() != old_data gdal.ErrorReset() ds.ExecuteSQL('UNCOMPRESS') assert gdal.GetLastErrorMsg() == '' assert len(ds.GetFileList()) == 1 ds.ExecuteSQL('RECOMPRESS') assert tmp_uncompressed not in gdal.ReadDir(dirname) assert lockfile not in gdal.ReadDir(dirname) gdal.ErrorReset() ds.ExecuteSQL('RECOMPRESS') assert gdal.GetLastErrorMsg() == '' assert lyr.DeleteFeature(1) == 0 assert tmp_uncompressed in gdal.ReadDir(dirname) assert lockfile in gdal.ReadDir(dirname) # Check lock file ds2 = ogr.Open(filename, update = 1) lyr2 = ds2.GetLayer(0) with gdaltest.error_handler(): assert lyr2.DeleteFeature(2) != 0 ds2 = None ds = None ds = ogr.Open(filename) assert [ds.GetLayer(i).GetFeatureCount() for i in range(4)] == [ 9, 10, 10, 10 ] ds = None ds = ogr.Open(filename, update = 1) assert ds.DeleteLayer(1) == 0 ds = None ds = ogr.Open(filename) assert ds.GetLayerCount() == 3 assert [ds.GetLayer(i).GetName() for i in range(3)] == ['poly', 'polyX', 'polyZ'] ds = None import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + filename) assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 # Check that our extra unrelated file is still there assert gdal.VSIStatL('/vsizip/{' + filename + '}/README.TXT') shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_drv.DeleteDataSource(filename) assert not gdal.VSIStatL(filename) assert set(gdal.ReadDir(dirname)) in (set(['.', '..']), set([])) gdal.RmdirRecursive(dirname) with gdaltest.error_handler(): assert not shape_drv.CreateDataSource('/i_do/not_exist/my.shp.zip') ############################################################################### def test_ogr_shape_116_invalid_layer_name(): dirname = 'tmp/test_ogr_shape_116_invalid_layer_name' gdal.RmdirRecursive(dirname) shape_drv = ogr.GetDriverByName('ESRI Shapefile') ds = shape_drv.CreateDataSource(dirname) with gdaltest.error_handler(): assert ds.CreateLayer('test<>:"/\\?*', None, ogr.wkbNone) ds = None ds = ogr.Open(dirname) assert ds.GetLayerCount() == 1 ds = None gdal.RmdirRecursive(dirname) ############################################################################### # Test case where a file with LDID/87 is overridden by a .cpg file def test_ogr_shape_ldid_and_cpg(): gdal.FileFromMemBuffer('/vsimem/tmp.dbf', open('data/facility_surface_dd.dbf', 'rb').read()) gdal.FileFromMemBuffer('/vsimem/tmp.cpg', 'UTF-8') ds = gdal.OpenEx('/vsimem/tmp.dbf') lyr = ds.GetLayer(0) assert lyr.GetMetadata_Dict('SHAPEFILE') == { 'CPG_VALUE': 'UTF-8', 'ENCODING_FROM_CPG': 'UTF-8', 'ENCODING_FROM_LDID': 'ISO-8859-1', 'LDID_VALUE': '87', 'SOURCE_ENCODING': 'UTF-8' } ds = None # Disable recoding ds = gdal.OpenEx('/vsimem/tmp.dbf', open_options = ['ENCODING=']) lyr = ds.GetLayer(0) assert lyr.GetMetadata_Dict('SHAPEFILE') == { 'CPG_VALUE': 'UTF-8', 'ENCODING_FROM_CPG': 'UTF-8', 'ENCODING_FROM_LDID': 'ISO-8859-1', 'LDID_VALUE': '87', 'SOURCE_ENCODING': '' } ds = None gdal.Unlink('/vsimem/tmp.dbf') gdal.Unlink('/vsimem/tmp.cpg') ############################################################################### def test_ogr_shape_cleanup(): if gdaltest.shape_ds is None: pytest.skip() gdaltest.shape_ds = None shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_drv.DeleteDataSource('tmp') shape_drv.DeleteDataSource('tmp/UPPERCASE') shape_drv.DeleteDataSource('tmp/lowercase') shape_drv.DeleteDataSource('tmp/mixedcase') shape_drv.DeleteDataSource('/vsimem/test35.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_46.shp') shape_drv.DeleteDataSource('/vsimem/this_one_i_care_46.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_52.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_53.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_54') shape_drv.DeleteDataSource('/vsimem/ogr_shape_55') shape_drv.DeleteDataSource('/vsimem/ogr_shape_56') shape_drv.DeleteDataSource('/vsimem/ogr_shape_57') shape_drv.DeleteDataSource('/vsimem/ogr_shape_58') shape_drv.DeleteDataSource('/vsimem/ogr_shape_61') shape_drv.DeleteDataSource('/vsimem/ogr_shape_62') shape_drv.DeleteDataSource('/vsimem/ogr_shape_73.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_74.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_78.dbf') shape_drv.DeleteDataSource('/vsimem/ogr_shape_79.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_81.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_83.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_84.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_85.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_88.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_89.shp') shape_drv.DeleteDataSource('/vsimem/ogr_shape_90.shp') if os.path.exists('tmp/ogr_shape_100.shp'): shape_drv.DeleteDataSource('tmp/ogr_shape_100.shp') gdalautotest-3.1.2/ogr/ogr_ntf.py0000775000175000017500000001701613701060013015471 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_ntf.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR NTF driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2009-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### # The following tests will download sample data from # http://www.ordnancesurvey.co.uk/oswebsite/products/meridian2/sampledata/meridian2ntf.exe # and http://www.ordnancesurvey.co.uk/oswebsite/products/strategi/sampledata/stratntf.exe # # That data is subject to the terms of the 'Discover' Data License, that can be found here : # http://www.ordnancesurvey.co.uk/oswebsite/products/sampledata/discoverdatalicense.html # # Verbatim copy of it : ############################################################################### # 'Discover' Data License # # Thank you for your interest in this Sample Data. The terms and conditions below set out a legal agreement # between you and Ordnance Survey for your use of the Sample Data. Please read these terms carefully. If you do # not agree to these terms and conditions, you should not use, download or access the Sample Data. # # 1 The Sample Data belongs to the Crown (or its suppliers). # # 2 Ordnance Survey grants you a limited, personal, non-exclusive, non-transferable, free-of-charge and fully terminable # licence to use the Sample Data for the purpose of internal testing and evaluation only. By way of example, this means # that you are not permitted to (i) sub-license, transfer, share or otherwise #distribute the Sample Data to any other # person; (ii) incorporate the Sample Data into your products or services (unless solely for the purposes of internal # testing and evaluation); or (iii) commercially exploit the Sample Data. # # 3 The Sample Data is provided "as is" and without any warranty as to quality, fitness for purpose, accuracy, availability # or otherwise. You acknowledge that it is your responsibility to ensure that the Sample Data is suitable for your intended # purposes. # # 4 To the fullest extent permitted by law, Ordnance Survey excludes all liability for any loss or damage of whatever nature # arising from any use of the Sample Data. # # 5 You agree that Ordnance Survey (and its suppliers) shall retain all rights, title and interest in the Sample Data, including # but not limited to any and all copyrights, patents, trade marks, trade secrets and all other intellectual property rights. # # 6 You agree not to tamper with or remove any copyright, trade mark, trade mark symbol or other proprietary notice of # Ordnance Survey (or its suppliers) contained in the Sample Data. # # 7 Ordnance Survey may terminate this agreement immediately if you breach any of the terms and conditions. # Ordnance Survey also reserves the right to terminate the agreement at any time on giving you thirty (30) days written # notice (which may be given by email or by posting a notification on Ordnance Survey's website). # # 8 These terms and conditions are governed by English law, and you agree to the exclusive jurisdiction of the English courts. # (C) Crown copyright and/or database right 2009 Ordnance Survey # # v1.0 May 2009 ############################################################################### import os from osgeo import ogr import gdaltest import pytest ############################################################################### def test_ogr_ntf_1(): if not gdaltest.download_file('http://www.ordnancesurvey.co.uk/oswebsite/products/strategi/sampledata/stratntf.exe', 'stratntf.exe'): pytest.skip() try: os.stat('tmp/cache/SS.ntf') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/stratntf.exe') try: os.stat('tmp/cache/SS.ntf') except OSError: pytest.skip() except OSError: pytest.skip() ds = ogr.Open('tmp/cache/SS.ntf') assert ds.GetLayerCount() == 5 layers = [('STRATEGI_POINT', ogr.wkbPoint, 9193), ('STRATEGI_LINE', ogr.wkbLineString, 8369), ('STRATEGI_TEXT', ogr.wkbPoint, 1335), ('STRATEGI_NODE', ogr.wkbNone, 10991), ('FEATURE_CLASSES', ogr.wkbNone, 224)] for l in layers: lyr = ds.GetLayerByName(l[0]) assert lyr.GetLayerDefn().GetGeomType() == l[1] assert lyr.GetFeatureCount() == l[2] if l[1] != ogr.wkbNone: assert lyr.GetSpatialRef().ExportToWkt().find('OSGB 1936') != -1 lyr = ds.GetLayerByName('STRATEGI_POINT') feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (222904 127850)' ds.Destroy() ############################################################################### def test_ogr_ntf_2(): if not gdaltest.download_file('http://www.ordnancesurvey.co.uk/oswebsite/products/meridian2/sampledata/meridian2ntf.exe', 'meridian2ntf.exe'): pytest.skip() try: os.stat('tmp/cache/Port_Talbot_NTF/SS78.ntf') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/meridian2ntf.exe') try: os.stat('tmp/cache/Port_Talbot_NTF/SS78.ntf') except OSError: pytest.skip() except OSError: pytest.skip() ds = ogr.Open('tmp/cache/Port_Talbot_NTF/SS78.ntf') assert ds.GetLayerCount() == 5 layers = [('MERIDIAN2_POINT', ogr.wkbPoint, 408), ('MERIDIAN2_LINE', ogr.wkbLineString, 513), ('MERIDIAN2_TEXT', ogr.wkbPoint, 7), ('MERIDIAN2_NODE', ogr.wkbNone, 397), ('FEATURE_CLASSES', ogr.wkbNone, 50)] for l in layers: lyr = ds.GetLayerByName(l[0]) assert lyr.GetLayerDefn().GetGeomType() == l[1] assert lyr.GetFeatureCount() == l[2] if l[1] != ogr.wkbNone: assert lyr.GetSpatialRef().ExportToWkt().find('OSGB 1936') != -1 lyr = ds.GetLayerByName('MERIDIAN2_POINT') feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (275324 189274)' lyr = ds.GetLayerByName('MERIDIAN2_LINE') feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'LINESTRING (275324 189274,275233 189114,275153 189048)' ds.Destroy() gdalautotest-3.1.2/ogr/ogr_gml_fgd_read.py0000775000175000017500000001012413701060013017265 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_gml_fgd_read.py 8e5eeb35bf76390e3134a4ea7076dab7d478ea0e 2018-11-14 22:55:13 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: GML Reading Driver for Japanese FGD GML v4 testing. # Author: Hiroshi Miura # ############################################################################### # Copyright (c) 2017, Hiroshi Miura # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import ogrtest from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest ############################################################################### # Test reading Japanese FGD GML (v4) files ############################################################################### _fgd_dir = 'data/gml_jpfgd/' ############################################################################### # Test reading Japanese FGD GML (v4) ElevPt file def test_ogr_gml_fgd_1(): gdaltest.have_gml_fgd_reader = 0 # open FGD GML file ds = ogr.Open(_fgd_dir + 'ElevPt.xml') if ds is None: if gdal.GetLastErrorMsg().find('Xerces') != -1: pytest.skip() pytest.fail('failed to open test file.') # we have gml reader for fgd gdaltest.have_gml_fgd_reader = 1 # check number of layers assert ds.GetLayerCount() == 1, 'Wrong layer count' lyr = ds.GetLayer(0) # check the SRS sr = osr.SpatialReference() sr.ImportFromEPSG(6668) # JGD2011 assert sr.IsSame(lyr.GetSpatialRef(), options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']), 'Wrong SRS' # check the first feature feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, 'POINT (133.123456789 34.123456789)'), \ 'Wrong geometry' assert feat.GetField('devDate') == '2015-01-07', 'Wrong attribute value' ############################################################################### # Test reading Japanese FGD GML (v4) BldA file def test_ogr_gml_fgd_2(): if not gdaltest.have_gml_fgd_reader: pytest.skip() # open FGD GML file ds = ogr.Open(_fgd_dir + 'BldA.xml') # check number of layers assert ds.GetLayerCount() == 1, 'Wrong layer count' lyr = ds.GetLayer(0) # check the SRS sr = osr.SpatialReference() sr.ImportFromEPSG(6668) # JGD2011 assert sr.IsSame(lyr.GetSpatialRef(), options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']), 'Wrong SRS' wkt = 'POLYGON ((139.718509733734 35.6952171397133,139.718444177734 35.6953121947133,139.718496754142 35.6953498949667,139.718550483734 35.6952359447133,139.718509733734 35.6952171397133))' # check the first feature feat = lyr.GetNextFeature() assert not ogrtest.check_feature_geometry(feat, wkt), 'Wrong geometry' assert feat.GetField('devDate') == '2017-03-07', 'Wrong attribute value' ############################################################################### # List test cases gdalautotest-3.1.2/ogr/ogr_idrisi.py0000775000175000017500000001445113701060013016165 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_idrisi.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR Idrisi driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import ogr import ogrtest import pytest ############################################################################### # Test point layer def test_ogr_idrisi_1(): ds = ogr.Open('data/points.vct') assert ds is not None lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint assert lyr.GetLayerDefn().GetFieldDefn(1).GetName() == 'IntegerField' assert lyr.GetLayerDefn().GetFieldDefn(1).GetType() == ogr.OFTInteger sr = lyr.GetSpatialRef() assert sr.ExportToWkt().find('PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0]') > 0 assert lyr.GetFeatureCount() == 2 assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 assert lyr.TestCapability(ogr.OLCFastGetExtent) == 1 assert lyr.GetExtent() == (400000.0, 600000.0, 4000000.0, 5000000.0) feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 1.0: feat.DumpReadable() pytest.fail() if feat.GetFieldAsInteger(1) != 2: feat.DumpReadable() pytest.fail() if feat.GetFieldAsDouble(2) != 3.45: feat.DumpReadable() pytest.fail() if feat.GetFieldAsString(3) != 'foo': feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT(400000 5000000)')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 2.0: feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POINT (600000 4000000)')) != 0: feat.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(600000 - 1, 4000000 - 1, 600000 + 1, 4000000 + 1) lyr.ResetReading() feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 2.0: feat.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(0, 0, 1, 1) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None ds = None ############################################################################### # Test linestring layer def test_ogr_idrisi_2(): ds = ogr.Open('data/lines.vct') assert ds is not None lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbLineString assert lyr.GetFeatureCount() == 2 assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 assert lyr.TestCapability(ogr.OLCFastGetExtent) == 1 assert lyr.GetExtent() == (400000.0, 600000.0, 4000000.0, 5000000.0) feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 10.0: feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('LINESTRING (400000 5000000,600000 4500000)')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 20.0: feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('LINESTRING (450000 4000000,550000 4500000)')) != 0: feat.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(0, 0, 1, 1) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None ds = None ############################################################################### # Test polygon layer def test_ogr_idrisi_3(): ds = ogr.Open('data/polygons.vct') assert ds is not None lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPolygon assert lyr.GetFeatureCount() == 2 assert lyr.TestCapability(ogr.OLCFastFeatureCount) == 1 assert lyr.TestCapability(ogr.OLCFastGetExtent) == 1 assert lyr.GetExtent() == (400000.0, 600000.0, 4000000.0, 5000000.0) feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 1.0: feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POLYGON ((400000 4000000,400000 5000000,600000 5000000,600000 4000000,400000 4000000),(450000 4250000,450000 4750000,550000 4750000,550000 4250000,450000 4250000))')) != 0: feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetFieldAsDouble(0) != 2.0: feat.DumpReadable() pytest.fail() if ogrtest.check_feature_geometry(feat, ogr.CreateGeometryFromWkt('POLYGON ((400000 4000000,400000 5000000,600000 5000000,600000 4000000,400000 4000000))')) != 0: feat.DumpReadable() pytest.fail() lyr.SetSpatialFilterRect(0, 0, 1, 1) lyr.ResetReading() feat = lyr.GetNextFeature() assert feat is None ds = None gdalautotest-3.1.2/ogr/ogr_geojsonseq.py0000775000175000017500000001500513701060013017053 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_geojsonseq.py cc22f70e70eb1aaf67807d67d2282105896d0a07 2019-03-17 16:04:54 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGRGeoJSONSeq driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2018, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import osr from osgeo import ogr import gdaltest import pytest def _ogr_geojsonseq_create(filename, lco, expect_rs): ds = ogr.GetDriverByName('GeoJSONSeq').CreateDataSource(filename) sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') lyr = ds.CreateLayer('test', srs=sr, options=lco) lyr.CreateField(ogr.FieldDefn('foo')) f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'bar"d' f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'baz' f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(3 4)')) lyr.CreateFeature(f) assert not ds.TestCapability(ogr.ODsCCreateLayer) with gdaltest.error_handler(): assert ds.CreateLayer('foo') is None ds = None f = gdal.VSIFOpenL(filename, 'rb') first = gdal.VSIFReadL(1, 1, f).decode('ascii') gdal.VSIFCloseL(f) if expect_rs: assert first == '\x1e' else: assert first == '{' ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['foo'] != 'bar"d' or \ f.GetGeometryRef().ExportToWkt() != 'POINT (1 2)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['foo'] != 'baz' or f.GetGeometryRef().ExportToWkt() != 'POINT (3 4)': f.DumpReadable() pytest.fail() assert lyr.GetNextFeature() is None ds = None ogr.GetDriverByName('GeoJSONSeq').DeleteDataSource(filename) def test_ogr_geojsonseq_lf(): return _ogr_geojsonseq_create('/vsimem/test', [], False) def test_ogr_geojsonseq_rs(): return _ogr_geojsonseq_create('/vsimem/test', ['RS=YES'], True) def test_ogr_geojsonseq_rs_auto(): return _ogr_geojsonseq_create('/vsimem/test.geojsons', [], True) def test_ogr_geojsonseq_inline(): ds = ogr.Open("""{"type":"Feature","properties":{},"geometry":null} {"type":"Feature","properties":{},"geometry":null}""") lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 def test_ogr_geojsonseq_prefix(): ds = ogr.Open("""GeoJSONSeq:data/test.geojsonl""") lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 def test_ogr_geojsonseq_seq_geometries(): with gdaltest.config_option('OGR_GEOJSONSEQ_CHUNK_SIZE', '10'): ds = ogr.Open("""{"type":"Point","coordinates":[2,49]} {"type":"Point","coordinates":[3,50]}""") lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() def test_ogr_geojsonseq_seq_geometries_with_errors(): with gdaltest.error_handler(): ds = ogr.Open("""{"type":"Point","coordinates":[2,49]} {"type":"Point","coordinates":[3,50]} foo "bar" null {"type":"Point","coordinates":[3,51]}""") lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 3 f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (3 50)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (3 51)': f.DumpReadable() pytest.fail() def test_ogr_geojsonseq_reprojection(): filename = '/vsimem/ogr_geojsonseq_reprojection.geojsonl' ds = ogr.GetDriverByName('GeoJSONSeq').CreateDataSource(filename) sr = osr.SpatialReference() sr.SetFromUserInput('+proj=merc +datum=WGS84') lyr = ds.CreateLayer('test', srs=sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt( 'POINT(222638.981586547 6242595.9999532)')) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToWkt() != 'POINT (2 49)': f.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('GeoJSONSeq').DeleteDataSource(filename) def test_ogr_geojsonseq_read_rs_json_pretty(): ds = ogr.Open('data/test.geojsons') lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['foo'] != 'bar' or \ f.GetGeometryRef().ExportToWkt() != 'POINT (1 2)': f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['foo'] != 'baz' or f.GetGeometryRef().ExportToWkt() != 'POINT (3 4)': f.DumpReadable() pytest.fail() assert lyr.GetNextFeature() is None def test_ogr_geojsonseq_test_ogrsf(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal( test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.geojsonl') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 gdalautotest-3.1.2/ogr/ogr_mapml.py0000775000175000017500000003361013701060013016006 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ogr_mapml.py 4757556ef6606fabee510945c6ed597efeb0857e 2020-04-17 20:26:55 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR MapML driver functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2020, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal, ogr, osr import gdaltest import pytest def test_ogr_mapml_basic(): filename = '/vsimem/out.mapml' # Write a MapML file ds = ogr.GetDriverByName('MapML').CreateDataSource(filename) assert ds.TestCapability(ogr.ODsCCreateLayer) assert not ds.TestCapability('foo') lyr = ds.CreateLayer('test') lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('int64field', ogr.OFTInteger64)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('stringfield', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('datetimefield', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('datefield', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('timefield', ogr.OFTTime)) f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['intfield'] = 1 f['int64field'] = 1 f['realfield'] = 1 f['stringfield'] = 1 f['datetimefield'] = '2020/03/31 12:34:56' f['datefield'] = '2020/03/31' f['timefield'] = '12:34:56' f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) f.SetFID(10) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['int64field'] = 1234567890123 f['realfield'] = 1.25 f['stringfield'] = 'x' f.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING (1 2,3 4)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f['int64field'] = 1 f['realfield'] = 1 f['stringfield'] = 1 f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 0,0 0),(0.1 0.1,0.1 0.7,0.7 0.1,0.1 0.1))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT (0 1,2 3)')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING ((1 2,3 4),(5 6,7 8))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0,0 1,1 0,0 0)),((10 0,10 1,11 0,10 0)))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POINT (1 2),GEOMETRYCOLLECTION(POINT(3 4)))')) lyr.CreateFeature(f) lyr.ResetReading() assert lyr.GetNextFeature() is None assert lyr.TestCapability('foo') == 0 assert ds.GetLayerCount() == 1 assert ds.GetLayer(-1) is None assert ds.GetLayer(0) is not None assert ds.GetLayer(1) is None ds = None # Read back the file ds = ogr.Open(filename) assert ds.GetLayerCount() == 1 assert ds.GetLayer(-1) is None assert ds.GetLayer(1) is None lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() assert srs assert srs.GetAuthorityCode(None) == '4326' assert lyr.GetGeomType() == ogr.wkbUnknown assert lyr.GetName() == 'test' assert lyr.TestCapability(ogr.OLCStringsAsUTF8) assert not lyr.TestCapability(ogr.OLCRandomRead) assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('datetimefield')).GetType() == ogr.OFTDateTime assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('datefield')).GetType() == ogr.OFTDate assert lyr.GetLayerDefn().GetFieldDefn(lyr.GetLayerDefn().GetFieldIndex('timefield')).GetType() == ogr.OFTTime f = lyr.GetNextFeature() assert f.GetFID() == 1 f = lyr.GetNextFeature() assert f.GetFID() == 10 assert f['intfield'] == 1 assert f['datetimefield'] == '2020/03/31 12:34:56' assert f['datefield'] == '2020/03/31' assert f['timefield'] == '12:34:56' assert f.GetGeometryRef().ExportToWkt() == 'POINT (1 2)' f = lyr.GetNextFeature() assert f['int64field'] == 1234567890123 assert f['realfield'] == 1.25 assert f['stringfield'] == 'x' assert f.GetGeometryRef().ExportToWkt() == 'LINESTRING (1 2,3 4)' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POLYGON ((0 0,1 0,0 1,0 0),(0.1 0.1,0.1 0.7,0.7 0.1,0.1 0.1))' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'MULTIPOINT (0 1,2 3)' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'MULTILINESTRING ((1 2,3 4),(5 6,7 8))' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'MULTIPOLYGON (((0 0,1 0,0 1,0 0)),((10 0,11 0,10 1,10 0)))' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'GEOMETRYCOLLECTION (POINT (1 2),POINT (3 4))' assert lyr.GetNextFeature() is None ds = None gdal.Unlink(filename) def test_ogr_mapml_multiple_layers(): filename = '/vsimem/out.mapml' # Write a MapML file ds = ogr.GetDriverByName('MapML').CreateDataSource(filename) lyr1 = ds.CreateLayer('lyr1') lyr2 = ds.CreateLayer('lyr2') f = ogr.Feature(lyr1.GetLayerDefn()) lyr1.CreateFeature(f) f = ogr.Feature(lyr2.GetLayerDefn()) lyr2.CreateFeature(f) f = ogr.Feature(lyr1.GetLayerDefn()) lyr1.CreateFeature(f) ds = None # Read back the file ds = ogr.Open(filename) assert ds.GetLayerCount() == 2 assert ds.GetLayer(0).GetFeatureCount() == 2 assert ds.GetLayer(1).GetFeatureCount() == 1 ds = None gdal.Unlink(filename) def test_ogr_mapml_creation_options(): # Write a MapML file options = [ "HEAD=My title", "EXTENT_UNITS=OSMTILE", "EXTENT_ACTION=action", "EXTENT_XMIN=-123456789", "EXTENT_YMIN=-234567890", "EXTENT_XMAX=123456789", "EXTENT_YMAX=234567890", "EXTENT_XMIN_MIN=0", "EXTENT_XMIN_MAX=1", "EXTENT_YMIN_MIN=2", "EXTENT_YMIN_MAX=3", "EXTENT_XMAX_MIN=4", "EXTENT_XMAX_MAX=5", "EXTENT_YMAX_MIN=6", "EXTENT_YMAX_MAX=7", "EXTENT_ZOOM=18", "EXTENT_ZOOM_MIN=15", "EXTENT_ZOOM_MAX=20", "EXTENT_EXTRA=", ] filename = '/vsimem/out.mapml' ds = ogr.GetDriverByName('MapML').CreateDataSource(filename, options=options) lyr = ds.CreateLayer('lyr') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (-180 0)')) lyr.CreateFeature(f) ds = None f = gdal.VSIFOpenL(filename, "rb") xml = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert xml == """ My title -20037508.34 0.00 """ gdal.Unlink(filename) def test_ogr_mapml_body_links_single(): options = [ 'BODY_LINKS=' ] filename = '/vsimem/out.mapml' ds = ogr.GetDriverByName('MapML').CreateDataSource(filename, options=options) lyr = ds.CreateLayer('lyr') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (-180 0)')) lyr.CreateFeature(f) ds = None f = gdal.VSIFOpenL(filename, "rb") xml = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert """ """ in xml gdal.Unlink(filename) def test_ogr_mapml_body_links_multiple(): options = [ 'BODY_LINKS=' ] filename = '/vsimem/out.mapml' ds = ogr.GetDriverByName('MapML').CreateDataSource(filename, options=options) lyr = ds.CreateLayer('lyr') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (-180 0)')) lyr.CreateFeature(f) ds = None f = gdal.VSIFOpenL(filename, "rb") xml = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) assert """ """ in xml gdal.Unlink(filename) def test_ogr_mapml_no_class(): filename = '/vsimem/out.mapml' gdal.FileFromMemBuffer(filename, "") ds = ogr.Open(filename) assert ds.GetLayerCount() == 1 lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2 assert lyr.GetSpatialRef() is None ds = None gdal.Unlink(filename) def test_ogr_mapml_errors(): with gdaltest.error_handler(): assert ogr.GetDriverByName('MapML').CreateDataSource("/i_do/not/exists.mapml") is None filename = '/vsimem/out.mapml' with gdaltest.error_handler(): assert ogr.GetDriverByName('MapML').CreateDataSource(filename, options=['EXTENT_UNITS=unsupported']) is None # Invalid XML gdal.FileFromMemBuffer(filename, "") with gdaltest.error_handler(): assert ogr.Open(filename) is None # Missing gdal.FileFromMemBuffer(filename, "") with gdaltest.error_handler(): assert ogr.Open(filename) is None # No gdal.FileFromMemBuffer(filename, "") with gdaltest.error_handler(): assert ogr.Open(filename) is None gdal.Unlink(filename) def test_ogr_mapml_reprojection_to_wgs84(): filename = '/vsimem/out.mapml' ds = ogr.GetDriverByName('MapML').CreateDataSource(filename) sr = osr.SpatialReference() sr.ImportFromEPSG(32631) lyr = ds.CreateLayer('lyr', srs = sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (500000 0)')) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPoint srs = lyr.GetSpatialRef() assert srs assert srs.GetAuthorityCode(None) == '4326' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (3 0)' ds = None gdal.Unlink(filename) def test_ogr_mapml_layer_srs_is_known(): filename = '/vsimem/out.mapml' ds = ogr.GetDriverByName('MapML').CreateDataSource(filename) sr = osr.SpatialReference() sr.ImportFromEPSG(3857) lyr = ds.CreateLayer('lyr', srs = sr) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT (1 2)')) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) srs = lyr.GetSpatialRef() assert srs assert srs.GetAuthorityCode(None) == '3857' f = lyr.GetNextFeature() assert f.GetGeometryRef().ExportToWkt() == 'POINT (1 2)' ds = None gdal.Unlink(filename) wkts = [ 'POINT (1 2)', 'LINESTRING (1 2,3 4)', 'POLYGON ((0 0,1 0,1 1,0 0))', 'MULTIPOINT ((1 2))', 'MULTILINESTRING ((1 2,3 4))', 'MULTIPOLYGON (((0 0,1 0,1 1,0 0)))', 'GEOMETRYCOLLECTION (POINT (1 2))', ] @pytest.mark.parametrize( 'wkt', wkts, ids=[ x[0:x.find(' ')].lower() for x in wkts ] ) def test_ogr_mapml_geomtypes(wkt): filename = '/vsimem/out.mapml' ds = ogr.GetDriverByName('MapML').CreateDataSource(filename) lyr = ds.CreateLayer('lyr') f = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt(wkt) f.SetGeometry(geom) lyr.CreateFeature(f) ds = None ds = ogr.Open(filename) lyr = ds.GetLayer(0) assert lyr.GetGeomType() == geom.GetGeometryType() ds = None gdal.Unlink(filename) def test_ogr_mapml_ogrsf(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/poly.mapml') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 gdalautotest-3.1.2/ogr/ogr_sxf.py0000775000175000017500000001025413701060013015477 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_sxf.py 26513 2013-10-02 11:59:50Z bishop $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR SXF driver functionality. # Author: Dmitry Baryshnikov # ############################################################################### # Copyright (c) 2013, NextGIS # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import shutil import gdaltest from osgeo import gdal from osgeo import ogr import pytest ############################################################################### # Open SXF datasource. def test_ogr_sxf_1(): gdaltest.sxf_ds = None with gdaltest.error_handler(): # Expect Warning 0 and Warning 6. gdaltest.sxf_ds = ogr.Open('data/100_test.sxf') if gdaltest.sxf_ds is not None: return pytest.fail() ############################################################################### # Run test_ogrsf def test_ogr_sxf_2(): import test_cli_utilities if test_cli_utilities.get_test_ogrsf_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' data/100_test.sxf') assert ret.find('INFO') != -1 and ret.find('ERROR') == -1 ############################################################################### # Open SXF datasource with custom RSC file. def test_ogr_sxf_3(): lyr_names = ['SYSTEM', 'Not_Classified'] sxf_name = 'tmp/test_ogr_sxf_3.sxf' rsc_name = 'tmp/test_ogr_sxf_3.rsc' fake_rsc = open(rsc_name, 'w') fake_rsc.close() shutil.copy('data/100_test.sxf', sxf_name) sxf_ds = gdal.OpenEx(sxf_name, gdal.OF_VECTOR, open_options=['SXF_RSC_FILENAME=' + rsc_name]) assert sxf_ds is not None for layer_n in range(sxf_ds.GetLayerCount()): lyr = sxf_ds.GetLayer(layer_n) assert lyr_names[layer_n] == lyr.GetName() ############################################################################### # Open SXF datasource with layers fullname. def test_ogr_sxf_4(capsys): lyr_names = ['СИСТЕМНЫЙ', 'ВОДНЫЕ ОБЪЕКТЫ', 'НАСЕЛЕННЫЕ ПУНКТЫ', 'ИНФРАСТРУКТУРА', 'ЗЕМЛЕПОЛЬЗОВАНИЕ', 'РЕЛЬЕФ СУШИ', 'ГИДРОГРАФИЯ (РЕЛЬЕФ)', 'МАТЕМАТИЧЕСКАЯ ОСНОВА', 'Not_Classified'] sxf_name = 'data/100_test.sxf' sxf_ds = gdal.OpenEx(sxf_name, gdal.OF_VECTOR, open_options=['SXF_LAYER_FULLNAME=YES']) assert sxf_ds is not None assert sxf_ds.GetLayerCount() == len(lyr_names) with capsys.disabled(): print('Expected:') for n in lyr_names: print(n) print('In fact:') for layer_n in range(sxf_ds.GetLayerCount()): lyr = sxf_ds.GetLayer(layer_n) print(lyr.GetName()) for layer_n in range(sxf_ds.GetLayerCount()): lyr = sxf_ds.GetLayer(layer_n) if lyr.TestCapability(ogr.OLCStringsAsUTF8) != 1: pytest.skip('skipping test: recode is not possible') assert lyr_names[layer_n] == lyr.GetName() ############################################################################### # def test_ogr_sxf_cleanup(): if gdaltest.sxf_ds is None: pytest.skip() gdaltest.sxf_ds = None gdalautotest-3.1.2/ogr/ogr_wkbwkt_geom.py0000775000175000017500000006666113701060013017234 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_wkbwkt_geom.py c7d51c5ead794772b42f3c58c394bfff6045f8d6 2019-08-22 09:59:35 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test basic OGR translation of WKT and WKB geometries. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2012, Even Rouault # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. ############################################################################### import os import pytest import gdaltest from osgeo import ogr from osgeo import gdal ############################################################################### @pytest.mark.parametrize( 'filename', [ f for f in os.listdir(os.path.join(os.path.dirname(__file__), 'data/wkb_wkt')) if f[-4:] == '.wkb' ] ) def test_wkbwkt_geom(filename): raw_wkb = open('data/wkb_wkt/' + filename, 'rb').read() raw_wkt = open('data/wkb_wkt/' + os.path.splitext(filename)[0] + '.wkt').read() ###################################################################### # Compare the WKT derived from the WKB file to the WKT provided # but reformatted (normalized). geom_wkb = ogr.CreateGeometryFromWkb(raw_wkb) wkb_wkt = geom_wkb.ExportToWkt() geom_wkt = ogr.CreateGeometryFromWkt(raw_wkt) normal_wkt = geom_wkt.ExportToWkt() # print(wkb_wkt) # print(normal_wkt) # print(raw_wkt) assert wkb_wkt == normal_wkt, \ ('WKT from WKB (%s) does not match clean WKT (%s).' % (wkb_wkt, normal_wkt)) ###################################################################### # Verify that the geometries appear to be the same. This is # intended to catch problems with the encoding too WKT that might # cause passes above but that are mistaken. assert geom_wkb.GetCoordinateDimension() == geom_wkt.GetCoordinateDimension(), \ 'Coordinate dimension differs!' assert geom_wkb.GetGeometryType() == geom_wkt.GetGeometryType(), \ 'Geometry type differs!' assert geom_wkb.GetGeometryName() == geom_wkt.GetGeometryName(), \ 'Geometry name differs!' # It turns out this test is too picky about coordinate precision. skip. # if geom_wkb.Equal( geom_wkt ) == 0: # gdaltest.post_reason( 'Geometries not equal!' ) # print geom_wkb.ExportToWkt() # print geom_wkt.ExportToWkt() # return 'fail' geom_wkb.Destroy() ###################################################################### # Convert geometry to WKB and back to verify that WKB encoding is # working smoothly. wkb_xdr = geom_wkt.ExportToWkb(ogr.wkbXDR) geom_wkb = ogr.CreateGeometryFromWkb(wkb_xdr) assert str(geom_wkb) == str(geom_wkt), 'XDR WKB encoding/decoding failure.' geom_wkb.Destroy() wkb_ndr = geom_wkt.ExportToWkb(ogr.wkbNDR) geom_wkb = ogr.CreateGeometryFromWkb(wkb_ndr) assert str(geom_wkb) == str(geom_wkt), 'NDR WKB encoding/decoding failure.' geom_wkb.Destroy() geom_wkt.Destroy() ############################################################################### # Test geometry with very large exponents of coordinate values. def test_ogr_wkbwkt_geom_bigexponents(): bigx = -1.79769313486e+308 bigy = -1.12345678901e+308 geom = ogr.Geometry(ogr.wkbPoint) geom.SetPoint(0, bigx, bigy) expect = 'POINT (-1.79769313486E+308 -1.12345678901E+308 0)' wkt = geom.ExportToWkt() assert str(wkt) == str(expect), 'trimming long float numbers failed.' ############################################################################### # Test importing broken/unhandled WKT. def test_ogr_wkbwkt_test_broken_geom(): list_broken = ['POINT', 'POINT UNKNOWN', 'POINT(', 'POINT()', 'POINT(,)', 'POINT(EMPTY', 'POINT(A)', 'POINT(0)', 'POINT(A 0)', 'POINT(0 A)', 'POINT(0 1', 'POINT(0 1,', 'POINT((0 1))', 'POINT Z', 'POINT Z UNKNOWN', 'POINT Z(', 'POINT Z()', 'POINT Z(EMPTY)', 'POINT Z(A)', 'POINT Z(0 1', 'LINESTRING', 'LINESTRING UNKNOWN', 'LINESTRING(', 'LINESTRING()', 'LINESTRING(,)', 'LINESTRING(())', 'LINESTRING(EMPTY', 'LINESTRING(A)', 'LINESTRING(0 1,', 'LINESTRING(0 1,2 3', 'LINESTRING(0 1,,2 3)', 'LINESTRING((0 1,2 3))', 'LINESTRING Z', 'LINESTRING Z UNKNOWN', 'LINESTRING Z(', 'LINESTRING Z()', 'LINESTRING Z(EMPTY)', 'LINESTRING Z(A)', 'LINESTRING Z(0 1', 'LINESTRING Z(0 1,2 3', 'POLYGON', 'POLYGON UNKNOWN', 'POLYGON(', 'POLYGON()', 'POLYGON(,)', 'POLYGON(())', 'POLYGON(EMPTY', 'POLYGON(A)', 'POLYGON(0 1)', 'POLYGON(0 1,2 3', 'POLYGON((0 1,2 3', 'POLYGON((0 1,2 3,', 'POLYGON((0 1,2 3)', 'POLYGON((0 1,2 3),', 'POLYGON((0 1,2 3),EMPTY', 'POLYGON(((0 1,2 3)))', 'POLYGON Z', 'POLYGON Z UNKNOWN', 'POLYGON Z(', 'POLYGON Z()', 'POLYGON Z(EMPTY', 'POLYGON Z(A)', 'POLYGON Z(0 1', 'POLYGON Z(0 1,2 3', 'POLYGON Z((0 1,2 3', 'POLYGON Z((0 1,2 3)', 'POLYGON Z(((0 1,2 3)))', 'MULTIPOINT', 'MULTIPOINT UNKNOWN', 'MULTIPOINT(', 'MULTIPOINT()', 'MULTIPOINT(())', 'MULTIPOINT(EMPTY', 'MULTIPOINT(EMPTY,', 'MULTIPOINT(EMPTY,(0 1)', 'MULTIPOINT(A)', 'MULTIPOINT(0 1', 'MULTIPOINT(0 1,', 'MULTIPOINT(0 1,2 3', 'MULTIPOINT((0 1),,(2 3))', 'MULTIPOINT(0 1,EMPTY', 'MULTIPOINT((0 1),EMPTY', 'MULTIPOINT((0 1)', # 'MULTIPOINT(0 1,2 3)', # This one is not SF compliant but supported for legacy 'MULTIPOINT((0 1),(2 3)', 'MULTIPOINT Z', 'MULTIPOINT Z UNKNOWN', 'MULTIPOINT Z(', 'MULTIPOINT Z()', 'MULTIPOINT Z(EMPTY', 'MULTIPOINT Z(A)', 'MULTIPOINT Z(0 1', 'MULTIPOINT Z((0 1)', 'MULTIPOINT Z(0 1,2 3)', 'MULTILINESTRING', 'MULTILINESTRING UNKNOWN', 'MULTILINESTRING(', 'MULTILINESTRING()', 'MULTILINESTRING(,)', 'MULTILINESTRING(())', 'MULTILINESTRING(EMPTY', 'MULTILINESTRING(EMPTY,', 'MULTILINESTRING(A)', 'MULTILINESTRING(0 1', 'MULTILINESTRING(0 1,', 'MULTILINESTRING(0 1,2 3)', 'MULTILINESTRING((0 1,2 3', 'MULTILINESTRING((0 1,2 3),)', 'MULTILINESTRING((0 1)', 'MULTILINESTRING((0 1),', 'MULTILINESTRING((0 1),EMPTY', 'MULTILINESTRING((0 1),(2 3)', 'MULTILINESTRING Z', 'MULTILINESTRING Z UNKNOWN', 'MULTILINESTRING Z(', 'MULTILINESTRING Z()', 'MULTILINESTRING Z(EMPTY', 'MULTILINESTRING Z(A)', 'MULTILINESTRING Z(0 1', 'MULTILINESTRING Z((0 1)', 'MULTILINESTRING Z((0 1),(2 3)', 'MULTIPOLYGON', 'MULTIPOLYGON UNKNOWN', 'MULTIPOLYGON(', 'MULTIPOLYGON()', 'MULTIPOLYGON(,)', 'MULTIPOLYGON(())', 'MULTIPOLYGON((()))', 'MULTIPOLYGON(EMPTY', 'MULTIPOLYGON(EMPTY,', 'MULTIPOLYGON(A)', 'MULTIPOLYGON(0 1', 'MULTIPOLYGON(0 1,', 'MULTIPOLYGON(0 1,2 3)', 'MULTIPOLYGON((0 1,2 3', 'MULTIPOLYGON((0 1,2 3),)', 'MULTIPOLYGON((0 1)', 'MULTIPOLYGON((0 1),', 'MULTIPOLYGON((0 1),EMPTY', 'MULTIPOLYGON((0 1),(2 3)', 'MULTIPOLYGON((0 1),(2 3))', 'MULTIPOLYGON(((0 1))', 'MULTIPOLYGON(((0 1)),', 'MULTIPOLYGON(((0 1)),,', 'MULTIPOLYGON(((0 1),(2 3))', 'MULTIPOLYGON(((0 1),EMPTY', 'MULTIPOLYGON(((0 1),EMPTY,', 'MULTIPOLYGON((((0 1)),)', 'MULTIPOLYGON Z', 'MULTIPOLYGON Z UNKNOWN', 'MULTIPOLYGON Z(', 'MULTIPOLYGON Z()', 'MULTIPOLYGON Z(EMPTY', 'MULTIPOLYGON Z(A)', 'MULTIPOLYGON Z(0 1', 'MULTIPOLYGON Z((0 1)', 'MULTIPOLYGON Z((0 1),(2 3)', 'GEOMETRYCOLLECTION', 'GEOMETRYCOLLECTION UNKNOWN', 'GEOMETRYCOLLECTION(', 'GEOMETRYCOLLECTION()', 'GEOMETRYCOLLECTION(,)', 'GEOMETRYCOLLECTION(())', 'GEOMETRYCOLLECTION(EMPTY', 'GEOMETRYCOLLECTION(EMPTY,', 'GEOMETRYCOLLECTION(A)', 'GEOMETRYCOLLECTION(POINT(0 1)', 'GEOMETRYCOLLECTION(POINT(0 1),', 'GEOMETRYCOLLECTION(POINT(0 1),)', 'GEOMETRYCOLLECTION(POINT(0 1),UNKNOWN)', 'GEOMETRYCOLLECTION Z', 'GEOMETRYCOLLECTION Z(', 'GEOMETRYCOLLECTION Z()', 'GEOMETRYCOLLECTION Z(EMPTY', 'GEOMETRYCOLLECTION Z(POINT(0 1)', 'COMPOUNDCURVE', 'COMPOUNDCURVE UNKNOWN', 'COMPOUNDCURVE(', 'COMPOUNDCURVE()', 'COMPOUNDCURVE(,)', 'COMPOUNDCURVE(())', 'COMPOUNDCURVE(EMPTY', 'COMPOUNDCURVE(EMPTY,', 'COMPOUNDCURVE(A)', 'COMPOUNDCURVE((0 1,2 3', 'COMPOUNDCURVE((0 1,2 3)', 'COMPOUNDCURVE((0 1,2 3)', 'COMPOUNDCURVE((0 1,2 3),', 'COMPOUNDCURVE((0 1,2 3),)', 'COMPOUNDCURVE((0 1,2 3),UNKNOWN)', 'COMPOUNDCURVE Z', 'COMPOUNDCURVE Z(', 'COMPOUNDCURVE Z()', 'COMPOUNDCURVE Z(EMPTY', 'COMPOUNDCURVE Z((0 1,2 3)', 'CURVEPOLYGON', 'CURVEPOLYGON UNKNOWN', 'CURVEPOLYGON(', 'CURVEPOLYGON()', 'CURVEPOLYGON(,)', 'CURVEPOLYGON(())', 'CURVEPOLYGON(EMPTY', 'CURVEPOLYGON(EMPTY,', 'CURVEPOLYGON(A)', 'CURVEPOLYGON((0 1,2 3', 'CURVEPOLYGON((0 1,2 3)', 'CURVEPOLYGON((0 1,2 3)', 'CURVEPOLYGON((0 1,2 3),', 'CURVEPOLYGON((0 1,2 3),)', 'CURVEPOLYGON((0 1,2 3),UNKNOWN)', 'CURVEPOLYGON Z', 'CURVEPOLYGON Z(', 'CURVEPOLYGON Z()', 'CURVEPOLYGON Z(EMPTY', 'CURVEPOLYGON Z((0 1,2 3)', ] for wkt in list_broken: gdal.PushErrorHandler('CPLQuietErrorHandler') geom = ogr.CreateGeometryFromWkt(wkt) gdal.PopErrorHandler() assert geom is None, ('geom %s instantiated but not expected' % wkt) ############################################################################### # Test importing WKT SF1.2 def test_ogr_wkbwkt_test_import_wkt_sf12(): list_wkt_tuples = [('POINT EMPTY', 'POINT EMPTY'), ('POINT Z EMPTY', 'POINT EMPTY'), ('POINT M EMPTY', 'POINT EMPTY'), ('POINT ZM EMPTY', 'POINT EMPTY'), ('POINT (0 1)', 'POINT (0 1)'), ('POINT Z (0 1 2)', 'POINT (0 1 2)'), ('POINT M (0 1 2)', 'POINT (0 1)'), ('POINT ZM (0 1 2 3)', 'POINT (0 1 2)'), ('LINESTRING EMPTY', 'LINESTRING EMPTY'), ('LINESTRING Z EMPTY', 'LINESTRING EMPTY'), ('LINESTRING M EMPTY', 'LINESTRING EMPTY'), ('LINESTRING ZM EMPTY', 'LINESTRING EMPTY'), ('LINESTRING (0 1,2 3)', 'LINESTRING (0 1,2 3)'), ('LINESTRING Z (0 1 2,3 4 5)', 'LINESTRING (0 1 2,3 4 5)'), ('LINESTRING M (0 1 2,3 4 5)', 'LINESTRING (0 1,3 4)'), ('LINESTRING ZM (0 1 2 3,4 5 6 7)', 'LINESTRING (0 1 2,4 5 6)'), ('POLYGON EMPTY', 'POLYGON EMPTY'), ('POLYGON (EMPTY)', 'POLYGON EMPTY'), ('POLYGON Z EMPTY', 'POLYGON EMPTY'), ('POLYGON Z (EMPTY)', 'POLYGON EMPTY'), ('POLYGON M EMPTY', 'POLYGON EMPTY'), ('POLYGON ZM EMPTY', 'POLYGON EMPTY'), ('POLYGON ((0 1,2 3,4 5,0 1))', 'POLYGON ((0 1,2 3,4 5,0 1))'), ('POLYGON ((0 1,2 3,4 5,0 1),EMPTY)', 'POLYGON ((0 1,2 3,4 5,0 1))'), ('POLYGON (EMPTY,(0 1,2 3,4 5,0 1))', 'POLYGON EMPTY'), ('POLYGON (EMPTY,(0 1,2 3,4 5,0 1),EMPTY)', 'POLYGON EMPTY'), ('POLYGON Z ((0 1 10,2 3 20,4 5 30,0 1 10),(0 1 10,2 3 20,4 5 30,0 1 10))', 'POLYGON ((0 1 10,2 3 20,4 5 30,0 1 10),(0 1 10,2 3 20,4 5 30,0 1 10))'), ('POLYGON M ((0 1 10,2 3 20,4 5 30,0 1 10))', 'POLYGON ((0 1,2 3,4 5,0 1))'), ('POLYGON ZM ((0 1 10 100,2 3 20 200,4 5 30 300,0 1 10 10))', 'POLYGON ((0 1 10,2 3 20,4 5 30,0 1 10))'), ('MULTIPOINT EMPTY', 'MULTIPOINT EMPTY'), ('MULTIPOINT (EMPTY)', 'MULTIPOINT EMPTY'), ('MULTIPOINT Z EMPTY', 'MULTIPOINT EMPTY'), ('MULTIPOINT Z (EMPTY)', 'MULTIPOINT EMPTY'), ('MULTIPOINT M EMPTY', 'MULTIPOINT EMPTY'), ('MULTIPOINT ZM EMPTY', 'MULTIPOINT EMPTY'), ('MULTIPOINT (0 1,2 3)', 'MULTIPOINT (0 1,2 3)'), # Not SF1.2 compliant but recognized ('MULTIPOINT ((0 1),(2 3))', 'MULTIPOINT (0 1,2 3)'), ('MULTIPOINT ((0 1),EMPTY)', 'MULTIPOINT (0 1)'), # We don't output empty points in multipoint ('MULTIPOINT (EMPTY,(0 1))', 'MULTIPOINT (0 1)'), # We don't output empty points in multipoint ('MULTIPOINT (EMPTY,(0 1),EMPTY)', 'MULTIPOINT (0 1)'), # We don't output empty points in multipoint ('MULTIPOINT Z ((0 1 2),(3 4 5))', 'MULTIPOINT (0 1 2,3 4 5)'), ('MULTIPOINT M ((0 1 2),(3 4 5))', 'MULTIPOINT (0 1,3 4)'), ('MULTIPOINT ZM ((0 1 2 3),(4 5 6 7))', 'MULTIPOINT (0 1 2,4 5 6)'), ('MULTILINESTRING EMPTY', 'MULTILINESTRING EMPTY'), ('MULTILINESTRING (EMPTY)', 'MULTILINESTRING EMPTY'), ('MULTILINESTRING Z EMPTY', 'MULTILINESTRING EMPTY'), ('MULTILINESTRING Z (EMPTY)', 'MULTILINESTRING EMPTY'), ('MULTILINESTRING M EMPTY', 'MULTILINESTRING EMPTY'), ('MULTILINESTRING ZM EMPTY', 'MULTILINESTRING EMPTY'), ('MULTILINESTRING ((0 1,2 3,4 5,0 1))', 'MULTILINESTRING ((0 1,2 3,4 5,0 1))'), ('MULTILINESTRING ((0 1,2 3,4 5,0 1),EMPTY)', 'MULTILINESTRING ((0 1,2 3,4 5,0 1))'), ('MULTILINESTRING (EMPTY,(0 1,2 3,4 5,0 1))', 'MULTILINESTRING ((0 1,2 3,4 5,0 1))'), ('MULTILINESTRING (EMPTY,(0 1,2 3,4 5,0 1),EMPTY)', 'MULTILINESTRING ((0 1,2 3,4 5,0 1))'), ('MULTILINESTRING Z ((0 1 10,2 3 20,4 5 30,0 1 10),(0 1 10,2 3 20,4 5 30,0 1 10))', 'MULTILINESTRING ((0 1 10,2 3 20,4 5 30,0 1 10),(0 1 10,2 3 20,4 5 30,0 1 10))'), ('MULTILINESTRING M ((0 1 10,2 3 20,4 5 30,0 1 10))', 'MULTILINESTRING ((0 1,2 3,4 5,0 1))'), ('MULTILINESTRING ZM ((0 1 10 100,2 3 20 200,4 5 30 300,0 1 10 10))', 'MULTILINESTRING ((0 1 10,2 3 20,4 5 30,0 1 10))'), ('MULTIPOLYGON EMPTY', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON (EMPTY)', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON Z EMPTY', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON Z (EMPTY)', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON M EMPTY', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON ZM EMPTY', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON ((EMPTY))', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)))'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1)),((2 3,4 5,6 7,2 3)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)),((2 3,4 5,6 7,2 3)))'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1),(2 3,4 5,6 7,2 3)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1),(2 3,4 5,6 7,2 3)))'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1)),EMPTY)', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)))'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1),EMPTY))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)))'), ('MULTIPOLYGON ((EMPTY,(0 1,2 3,4 5,0 1)))', 'MULTIPOLYGON EMPTY'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1),EMPTY,(2 3,4 5,6 7,2 3)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1),(2 3,4 5,6 7,2 3)))'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1)),((0 1,2 3,4 5,0 1),(2 3,4 5,6 7,2 3)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)),((0 1,2 3,4 5,0 1),(2 3,4 5,6 7,2 3)))'), ('MULTIPOLYGON (EMPTY,((0 1,2 3,4 5,0 1)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)))'), ('MULTIPOLYGON (((0 1,2 3,4 5,0 1)),EMPTY)', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)))'), ('MULTIPOLYGON Z (((0 1 10,2 3 20,4 5 30,0 1 10)),((0 1 10,2 3 20,4 5 30,0 1 10)))', 'MULTIPOLYGON (((0 1 10,2 3 20,4 5 30,0 1 10)),((0 1 10,2 3 20,4 5 30,0 1 10)))'), ('MULTIPOLYGON M (((0 1 10,2 3 20,4 5 30,0 1 10)))', 'MULTIPOLYGON (((0 1,2 3,4 5,0 1)))'), ('MULTIPOLYGON ZM (((0 1 10 100,2 3 20 200,4 5 30 300,0 1 10 10)))', 'MULTIPOLYGON (((0 1 10,2 3 20,4 5 30,0 1 10)))'), ('GEOMETRYCOLLECTION EMPTY', 'GEOMETRYCOLLECTION EMPTY'), ('GEOMETRYCOLLECTION Z EMPTY', 'GEOMETRYCOLLECTION EMPTY'), ('GEOMETRYCOLLECTION M EMPTY', 'GEOMETRYCOLLECTION EMPTY'), ('GEOMETRYCOLLECTION ZM EMPTY', 'GEOMETRYCOLLECTION EMPTY'), ('GEOMETRYCOLLECTION Z (POINT Z (0 1 2),LINESTRING Z (0 1 2,3 4 5))', 'GEOMETRYCOLLECTION (POINT (0 1 2),LINESTRING (0 1 2,3 4 5))'), ('GEOMETRYCOLLECTION M (POINT M (0 1 2),LINESTRING M (0 1 2,3 4 5))', 'GEOMETRYCOLLECTION (POINT (0 1),LINESTRING (0 1,3 4))'), ('GEOMETRYCOLLECTION ZM (POINT ZM (0 1 2 10),LINESTRING ZM (0 1 2 10,3 4 5 20))', 'GEOMETRYCOLLECTION (POINT (0 1 2),LINESTRING (0 1 2,3 4 5))'), ('GEOMETRYCOLLECTION (POINT EMPTY,LINESTRING EMPTY,POLYGON EMPTY,MULTIPOINT EMPTY,MULTILINESTRING EMPTY,MULTIPOLYGON EMPTY,GEOMETRYCOLLECTION EMPTY)', 'GEOMETRYCOLLECTION (POINT EMPTY,LINESTRING EMPTY,POLYGON EMPTY,MULTIPOINT EMPTY,MULTILINESTRING EMPTY,MULTIPOLYGON EMPTY,GEOMETRYCOLLECTION EMPTY)'), ('GEOMETRYCOLLECTION (POINT Z EMPTY,LINESTRING Z EMPTY,POLYGON Z EMPTY,MULTIPOINT Z EMPTY,MULTILINESTRING Z EMPTY,MULTIPOLYGON Z EMPTY,GEOMETRYCOLLECTION Z EMPTY)', 'GEOMETRYCOLLECTION (POINT EMPTY,LINESTRING EMPTY,POLYGON EMPTY,MULTIPOINT EMPTY,MULTILINESTRING EMPTY,MULTIPOLYGON EMPTY,GEOMETRYCOLLECTION EMPTY)'), # Not SF1.2 compliant but recognized ('GEOMETRYCOLLECTION (POINT(EMPTY),LINESTRING(EMPTY),POLYGON(EMPTY),MULTIPOINT(EMPTY),MULTILINESTRING(EMPTY),MULTIPOLYGON(EMPTY),GEOMETRYCOLLECTION(EMPTY))', 'GEOMETRYCOLLECTION (POINT EMPTY,LINESTRING EMPTY,POLYGON EMPTY,MULTIPOINT EMPTY,MULTILINESTRING EMPTY,MULTIPOLYGON EMPTY,GEOMETRYCOLLECTION EMPTY)'), ('CURVEPOLYGON EMPTY', 'CURVEPOLYGON EMPTY'), ('CURVEPOLYGON (EMPTY)', 'CURVEPOLYGON EMPTY'), ('MULTICURVE EMPTY', 'MULTICURVE EMPTY'), ('MULTICURVE (EMPTY)', 'MULTICURVE EMPTY'), ('MULTISURFACE EMPTY', 'MULTISURFACE EMPTY'), ('MULTISURFACE (EMPTY)', 'MULTISURFACE EMPTY'), ] for wkt_tuple in list_wkt_tuples: geom = ogr.CreateGeometryFromWkt(wkt_tuple[0]) assert geom is not None, ('could not instantiate geometry %s' % wkt_tuple[0]) out_wkt = geom.ExportToWkt() assert out_wkt == wkt_tuple[1], \ ('in=%s, out=%s, expected=%s.' % (wkt_tuple[0], out_wkt, wkt_tuple[1])) ############################################################################### # Test that importing the wkb that would be equivalent to MULTIPOINT(POLYGON((0 0)) # doesn't work def test_ogr_wkbwkt_test_import_bad_multipoint_wkb(): import struct wkb = struct.pack('B' * 30, 0, 0, 0, 0, 6, 0, 0, 0, 1, 0, 0, 0, 0, 1, 64, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0) gdal.PushErrorHandler('CPLQuietErrorHandler') geom = ogr.CreateGeometryFromWkb(wkb) gdal.PopErrorHandler() assert geom is None ############################################################################### # Test WKT -> WKB -> WKT roundtripping for GEOMETRYCOLLECTION def test_ogr_wkbwkt_test_geometrycollection_wktwkb(): wkt_list = ['GEOMETRYCOLLECTION (POINT (0 1))', 'GEOMETRYCOLLECTION (LINESTRING (0 1,2 3))', 'GEOMETRYCOLLECTION (POLYGON ((0 0,0 1,1 1,0 0)))', 'GEOMETRYCOLLECTION (MULTIPOINT (0 1))', 'GEOMETRYCOLLECTION (MULTILINESTRING ((0 1,2 3)))', 'GEOMETRYCOLLECTION (MULTIPOLYGON (((0 0,0 1,1 1,0 0))))', 'GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (0 1)))', 'GEOMETRYCOLLECTION (CIRCULARSTRING (0 0,1 0,0 0))', 'GEOMETRYCOLLECTION (COMPOUNDCURVE ((0 0,1 0,0 0)))', 'GEOMETRYCOLLECTION (CURVEPOLYGON ((0 0,0 1,1 1,0 0)))', 'GEOMETRYCOLLECTION (MULTICURVE ((0 0,0 1,1 1,0 0)))', 'GEOMETRYCOLLECTION (MULTISURFACE (((0 0,0 1,1 1,0 0))))', ] for wkt in wkt_list: g = ogr.CreateGeometryFromWkt(wkt) wkb = g.ExportToWkb() g = ogr.CreateGeometryFromWkb(wkb) wkt2 = g.ExportToWkt() assert wkt == wkt2, ('fail for %s' % wkt) ############################################################################### # Test that importing too nested WKT doesn't cause stack overflows def test_ogr_wkbwkt_test_geometrycollection_wkt_recursion(): wkt = 'GEOMETRYCOLLECTION (' * 31 + 'GEOMETRYCOLLECTION EMPTY' + ')' * 31 geom = ogr.CreateGeometryFromWkt(wkt) assert geom.ExportToWkt() == wkt, ('expected %s' % wkt) wkt = 'GEOMETRYCOLLECTION (' * 32 + 'GEOMETRYCOLLECTION EMPTY' + ')' * 32 gdal.PushErrorHandler('CPLQuietErrorHandler') geom = ogr.CreateGeometryFromWkt(wkt) gdal.PopErrorHandler() assert geom is None, 'expected None' ############################################################################### # Test that importing too nested WKB doesn't cause stack overflows def test_ogr_wkbwkt_test_geometrycollection_wkb_recursion(): import struct wkb_repeat = struct.pack('B' * 9, 0, 0, 0, 0, 7, 0, 0, 0, 1) wkb_end = struct.pack('B' * 9, 0, 0, 0, 0, 7, 0, 0, 0, 0) wkb = wkb_repeat * 31 + wkb_end geom = ogr.CreateGeometryFromWkb(wkb) assert geom is not None, 'expected a geometry' wkb = struct.pack('B' * 0) + wkb_repeat * 32 + wkb_end gdal.PushErrorHandler('CPLQuietErrorHandler') geom = ogr.CreateGeometryFromWkb(wkb) gdal.PopErrorHandler() assert geom is None, 'expected None' ############################################################################### # Test ISO WKT compliant export of MULTIPOINT def test_ogr_wkbwkt_export_wkt_iso_multipoint(): wkt = 'MULTIPOINT ((0 0),(1 1))' g = ogr.CreateGeometryFromWkt(wkt) out_wkt = g.ExportToIsoWkt() assert out_wkt == wkt ############################################################################### # Test exporting WKT with non finite values (#6319) def test_ogr_wkt_inf_nan(): g = ogr.Geometry(ogr.wkbPoint) g.AddPoint(float('inf'), float('-inf'), float('nan')) out_wkt = g.ExportToWkt() assert out_wkt == 'POINT (inf -inf nan)' ############################################################################### # Test corrupted WKT def test_ogr_wkt_multicurve_compoundcurve_corrupted(): with gdaltest.error_handler(): g = ogr.CreateGeometryFromWkt('MULTICURVE(COMPOUNDCURVE') assert g is None ############################################################################### # Test corrupted WKT def test_ogr_wkt_multipolygon_corrupted(): with gdaltest.error_handler(): g = ogr.CreateGeometryFromWkt('MULTIPOLYGON(POLYGON((N') assert g is None ############################################################################### # When imported build a list of units based on the files available. # print 'hit enter' # sys.stdin.readline() gdalautotest-3.1.2/kml_generate_test_files.py0000775000175000017500000003712413701060013020124 0ustar eveneven#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: kml_generate_test_files.py 8b8a83258342cf7e69909de0fba2cb902300ebff 2019-12-24 18:05:12 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Generate test files that can be used to exercise the points tested # by the OGC KML 2.2 – Abstract Test Suite # (http://portal.opengeospatial.org/files/?artifact_id=27811) # Author: Even Rouault # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import ogr ############################################################################### # Generate a .kml/.kmz file with OGR LIBKML driver covering most requirements # # Following steps are covered : # ATC 1: Root element # ATC 2: XML Schema constraints # ATC 3: Geometry coordinates # ATC 4: TimeSpan # ATC 5: TimeStamp # ATC 6: Style reference # ATC 7: Shared style definition # ATC 8: Region – LatLonAltBox # ATC 9: Link elements # ATC 10: Link referent # ATC 12: Geometry - extrude # ATC 13: Geometry - tessellate --> test currently broken. # ATC 14: Point # ATC 15: LineString # ATC 16: LinearRing - control points # ATC 17: Polygon boundary # ATC 18: Icon - href # ATC 19: ViewVolume - minimal content # ATC 20: NetworkLinkControl - minRefreshPeriod # ATC 21: Empty object # ATC 24: PhoneNumber # ATC 25: Schema # ATC 26: Schema - SimpleField # ATC 27: ExtendedData - SchemaData # ATC 28: ExtendedData - Data # ATC 29: Alias # ATC 30: atom:author # ATC 31: atom:link # ATC 32: Orientation - minimal content # ATC 34: Model # ATC 35: PhotoOverlay - minimal content # ATC 36: Pair # ATC 37: ItemIcon # ATC 38: LookAt # ATC 39: Lod # ATC 40: Link # ATC 41: Region # ATC 42: PolyStyle # ATC 43: Coordinates - altitudeMode # ATC 44: Scale - minimal content # ATC 45: KML - minimal content # ATC 46: ViewFormat # ATC 47: httpQuery # ATC 48: LinearRing in Polygon # ATC 49: Data # ATC 50: ResourceMap - Alias # ATC 51: Link refresh values # ATC 52: PhotoOverlay # ATC 54: Camera # ATC 55: Location # ATC 56: Overlay # ATC 57: ScreenOverlay # ATC 58: BalloonStyle # ATC 59: ExtendedData # ATC 60: Folder # ATC 61: IconStyle # ATC 62: ImagePyramid # ATC 63: LabelStyle # ATC 64: ListStyle # ATC 65: Style # ATC 66: MultiGeometry # ATC 67: Placemark # ATC 68: StyleMap # ATC 69: Polygon - rings # ATC 70: LinearRing - Simple # ATC 71: BalloonStyle - color # ATC 72: Metadata # ATC 73: Scale - full content # ATC 74: Lod - fade extents # ATC 75: Orientation - full content # ATC 76: Snippet # ATC 77: NetworkLink-Url def generate_libkml(filename): gdal.Unlink(filename) content = """eiffel_tower_normal:SYMBOL(id:"http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Eiffel_Tower_from_north_Avenue_de_New_York%2C_Aug_2010.jpg/220px-Eiffel_Tower_from_north_Avenue_de_New_York%2C_Aug_2010.jpg");LABEL(c:#FF0000FF) eiffel_tower_highlight:SYMBOL(id:"http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Eiffel_Tower_from_north_Avenue_de_New_York%2C_Aug_2010.jpg/220px-Eiffel_Tower_from_north_Avenue_de_New_York%2C_Aug_2010.jpg");LABEL(c:#0000FFFF)""" gdal.FileFromMemBuffer("/vsimem/style.txt", content) style_table = ogr.StyleTable() style_table.LoadStyleTable("/vsimem/style.txt") gdal.Unlink("/vsimem/style.txt") ds_options = ['author_name=Even Rouault', 'author_uri=http://gdal.org', 'author_email=foo@bar.com', 'link=http://gdal.org', 'phonenumber=tel:12345678', 'NLC_MINREFRESHPERIOD=3600', 'NLC_MAXSESSIONLENGTH=-1', 'NLC_COOKIE=cookie', 'NLC_MESSAGE=message', 'NLC_LINKNAME=linkname', 'NLC_LINKDESCRIPTION=linkdescription', 'NLC_LINKSNIPPET=linksnippet', 'NLC_EXPIRES=2014-12-31T23:59:59Z', 'LISTSTYLE_ICON_HREF=http://www.gdal.org/gdalicon.png', 'eiffel_tower_normal_balloonstyle_bgcolor=#FFFF00'] ds = ogr.GetDriverByName('LIBKML').CreateDataSource(filename, options=ds_options) ds.SetStyleTable(style_table) lyr_options = ['LOOKAT_LONGITUDE=2.2945', 'LOOKAT_LATITUDE=48.85825', 'LOOKAT_RANGE=300', 'LOOKAT_ALTITUDE=30', 'LOOKAT_HEADING=0', 'LOOKAT_TILT=70', 'LOOKAT_ALTITUDEMODE=relativeToGround', 'ADD_REGION=YES', 'REGION_MIN_LOD_PIXELS=128', 'REGION_MAX_LOD_PIXELS=10000000', 'REGION_MIN_FADE_EXTENT=1', 'REGION_MAX_FADE_EXTENT=2', 'SO_HREF=http://www.gdal.org/gdalicon.png', 'LISTSTYLE_ICON_HREF=http://www.gdal.org/gdalicon.png'] lyr = ds.CreateLayer('test', options=lyr_options) lyr.CreateField(ogr.FieldDefn('name', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('description', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('nom_francais', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('int_value', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('double_value', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('timestamp', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('begin', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('end', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('snippet', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('altitudeMode', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('extrude', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('tessellate', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('model', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("scale_x", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("scale_y", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("scale_z", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("heading", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("tilt", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("roll", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("networklink", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("networklink_refreshvisibility", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("networklink_flytoview", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("networklink_refreshMode", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("networklink_refreshInterval", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("networklink_viewRefreshMode", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("networklink_viewRefreshTime", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("networklink_viewBoundScale", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("networklink_viewFormat", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("networklink_httpQuery", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("camera_longitude", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("camera_latitude", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("camera_altitude", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("camera_altitudemode", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("photooverlay", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("leftfov", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("rightfov", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("bottomfov", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("topfov", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("near", ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn("photooverlay_shape", ogr.OFTString)) lyr.CreateField(ogr.FieldDefn("imagepyramid_tilesize", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("imagepyramid_maxwidth", ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn("imagepyramid_maxheight", ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('name', 'Eiffel tower') feat.SetField('description', 'Famous Paris attraction. Built by Gustave Eiffel in 1889.') feat.SetField('nom_francais', 'Tour Eiffel') feat.SetField('int_value', 12) feat.SetField('double_value', 34.56) feat.SetField('snippet', 'Very cool snippet') feat.SetField('begin', '1889/05/06') feat.SetField('end', '9999/12/31') feat.SetStyleString('@eiffel_tower') feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2.2945 48.85825)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('name', 'Avenue Gustave Eiffel') feat.SetField('timestamp', '2014/02/22') feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(2.29420 48.85746,2.29540 48.85833)')) feat.SetStyleString('PEN(c:#00FF00)') feat.SetField('tessellate', 1) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('name', 'Ecole Militaire') feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2.30383 48.85162 15,2.30460 48.85220 15,2.30581 48.85152 15,2.30507 48.85083 15,2.30383 48.85162 15))')) feat.SetField('altitudeMode', 'relativeToGround') feat.SetField('extrude', 1) feat.SetStyleString('BRUSH(fc:#0000FF)') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField('name', 'Champ de Mars') feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((2.29413 48.85703,2.29606 48.85847,2.29837 48.85679,2.29676 48.85543,2.29413 48.85703)),((2.29656 48.85504,2.29929 48.85674,2.30359 48.85364,2.30164 48.85226,2.29656 48.85504)))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2.2945 48.85825 10)')) feat.SetField("tilt", 75) feat.SetField("roll", 10) feat.SetField("heading", -70) feat.SetField("scale_x", 2) feat.SetField("scale_y", 3) feat.SetField("scale_z", 4) feat.SetField("altitudeMode", "relativeToGround") feat.SetField("model", "http://even.rouault.free.fr/kml/gdal_2.1/dummy.dae") lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("name", "a network link") feat.SetField("networklink", "http://developers.google.com/kml/documentation/Point.kml") feat.SetField("networklink_refreshVisibility", 1) feat.SetField("networklink_flyToView", 1) feat.SetField("networklink_refreshInterval", 60) feat.SetField("networklink_httpQuery", "[clientVersion]") lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("networklink", "http://developers.google.com/kml/documentation/Point.kml") feat.SetField("networklink_viewRefreshTime", 30) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("networklink", "http://developers.google.com/kml/documentation/Point.kml") feat.SetField("networklink_refreshMode", 'onExpire') feat.SetField("networklink_viewRefreshMode", 'onRegion') feat.SetField("networklink_viewBoundScale", 0.5) feat.SetField("networklink_viewFormat", 'BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]') lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("photooverlay", "http://even.rouault.free.fr/kml/gdalicon_$[level]_$[x]_$[y].png") feat.SetField("imagepyramid_tilesize", 256) feat.SetField("imagepyramid_maxwidth", 512) feat.SetField("imagepyramid_maxheight", 512) feat.SetField("camera_longitude", 2.2946) feat.SetField("camera_latitude", 48.8583) feat.SetField("camera_altitude", 20) feat.SetField("camera_altitudemode", "relativeToGround") feat.SetField("leftfov", -60) feat.SetField("rightfov", 60) feat.SetField("bottomfov", -60) feat.SetField("topfov", 60) feat.SetField("near", 100) feat.SetField("heading", 0) feat.SetField("tilt", 90) feat.SetField("roll", 0) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2.2945 48.85825)')) lyr.CreateFeature(feat) # feat = ogr.Feature(lyr.GetLayerDefn()) # feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT EMPTY')) # lyr.CreateFeature(feat) # feat = ogr.Feature(lyr.GetLayerDefn()) # # feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING EMPTY')) # lyr.CreateFeature(feat) # feat = ogr.Feature(lyr.GetLayerDefn()) # feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON EMPTY')) # lyr.CreateFeature(feat) # feat = ogr.Feature(lyr.GetLayerDefn()) # feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION (POINT EMPTY,POINT(1 2))')) # lyr.CreateFeature(feat) lyr_options = ['CAMERA_LONGITUDE=2.2945', 'CAMERA_LATITUDE=48.85825', 'CAMERA_ALTITUDE=30', 'CAMERA_HEADING=120', 'CAMERA_TILT=70', 'CAMERA_ROLL=10', 'CAMERA_ALTITUDEMODE=relativeToGround', 'FOLDER=YES', 'NAME=layer_name', 'DESCRIPTION=description', 'OPEN=1', 'VISIBILITY=1', 'SNIPPET=snippet'] ds.CreateLayer('test2', options=lyr_options) gdal.SetConfigOption('LIBKML_USE_SIMPLEFIELD', 'NO') lyr = ds.CreateLayer('test_data') gdal.SetConfigOption('LIBKML_USE_SIMPLEFIELD', None) lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetField("foo", "bar") feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2.2945 48.85825)')) lyr.CreateFeature(feat) ds = None ############################################################################### # Generate a .kml file with OGR LIBKML driver covering the Update KML features # # Following steps are covered : # ATC 22: Update - targetHref # ATC 23: Identification of update target def generate_libkml_update(filename): gdal.Unlink(filename) ds = ogr.GetDriverByName('LIBKML').CreateDataSource(filename, options=['UPDATE_TARGETHREF=http://even.rouault.free.fr/kml/gdal_2.1/test_ogrlibkml.kml']) lyr = ds.CreateLayer('test') feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetFID(100) lyr.CreateFeature(feat) feat.SetFID(1) lyr.SetFeature(feat) lyr.DeleteFeature(1) ds = None ############################################################################### # Generate a .kml file with GDAL KMLSuperOverlay driver covering the GroundOverlay KML features # # Following steps are covered : # ATC 11: LatLonBox # ATC 33: GroundOverlay # ATC 53: GroundOverlay - minimal content def generate_kmlsuperoverlay(filename): src_ds = gdal.GetDriverByName('MEM').Create('', 512, 256, 3) src_ds.SetGeoTransform([-180, 360. / 512, 0, 90, 0, -180. / 256]) ds = gdal.GetDriverByName('KMLSuperOverlay').CreateCopy(filename, src_ds) del ds src_ds = None if __name__ == '__main__': generate_libkml('test_ogrlibkml.kml') generate_libkml('test_ogrlibkml.kmz') generate_libkml_update('test_ogrlibkml_update.kml') generate_kmlsuperoverlay('test_superoverlay.kmz') gdalautotest-3.1.2/utilities/0000775000175000017500000000000013701060014014676 5ustar evenevengdalautotest-3.1.2/utilities/test_gdaladdo.py0000775000175000017500000001310613701060013020051 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdaladdo.py 010860a7429f4a21ba9ccb8034afbc3a2b61575a 2019-06-29 23:31:46 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdaladdo testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import pytest from osgeo import gdal import gdaltest import test_cli_utilities from gcore import tiff_ovr ############################################################################### # Similar to tiff_ovr_1 def test_gdaladdo_1(): if test_cli_utilities.get_gdaladdo_path() is None: pytest.skip() shutil.copy('../gcore/data/mfloat32.vrt', 'tmp/mfloat32.vrt') shutil.copy('../gcore/data/float32.tif', 'tmp/float32.tif') (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaladdo_path() + ' tmp/mfloat32.vrt 2 4') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/mfloat32.vrt') ret = tiff_ovr.tiff_ovr_check(ds) ds = None os.remove('tmp/mfloat32.vrt') os.remove('tmp/mfloat32.vrt.ovr') os.remove('tmp/float32.tif') return ret ############################################################################### # Test -r average. Similar to tiff_ovr_5 def test_gdaladdo_2(): if test_cli_utilities.get_gdaladdo_path() is None: pytest.skip() shutil.copyfile('../gcore/data/nodata_byte.tif', 'tmp/ovr5.tif') gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' -r average tmp/ovr5.tif 2') ds = gdal.Open('tmp/ovr5.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 1130 assert cs == exp_cs, 'got wrong overview checksum.' ds = None os.remove('tmp/ovr5.tif') ############################################################################### # Test -ro def test_gdaladdo_3(): if test_cli_utilities.get_gdaladdo_path() is None: pytest.skip() gdal.Translate('tmp/test_gdaladdo_3.tif', '../gcore/data/nodata_byte.tif', options='-outsize 1024 1024') gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' -ro tmp/test_gdaladdo_3.tif 2') ds = gdal.Open('tmp/test_gdaladdo_3.tif') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() exp_cs = 20683 assert cs == exp_cs, 'got wrong overview checksum.' ds = None try: os.stat('tmp/test_gdaladdo_3.tif.ovr') except OSError: pytest.fail('no external overview.') ############################################################################### # Test -clean def test_gdaladdo_4(): if test_cli_utilities.get_gdaladdo_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' -clean tmp/test_gdaladdo_3.tif') ds = gdal.Open('tmp/test_gdaladdo_3.tif') cnt = ds.GetRasterBand(1).GetOverviewCount() ds = None assert cnt == 0, 'did not clean overviews.' assert not os.path.exists('tmp/test_gdaladdo_3.tif.ovr') os.remove('tmp/test_gdaladdo_3.tif') ############################################################################### # Test implicit levels def test_gdaladdo_5(): if test_cli_utilities.get_gdaladdo_path() is None: pytest.skip() shutil.copyfile('../gcore/data/nodata_byte.tif', 'tmp/test_gdaladdo_5.tif') # Will not do anything given than the file is smaller than 256x256 already gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' tmp/test_gdaladdo_5.tif') ds = gdal.Open('tmp/test_gdaladdo_5.tif') cnt = ds.GetRasterBand(1).GetOverviewCount() ds = None assert cnt == 0 # Will generate overviews of size 10 5 3 2 1 gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' -minsize 1 tmp/test_gdaladdo_5.tif') ds = gdal.Open('tmp/test_gdaladdo_5.tif') cnt = ds.GetRasterBand(1).GetOverviewCount() ds = None assert cnt == 5 gdal.Translate('tmp/test_gdaladdo_5.tif', '../gcore/data/nodata_byte.tif', options='-outsize 257 257') # Will generate overviews of size 129x129 gdaltest.runexternal(test_cli_utilities.get_gdaladdo_path() + ' tmp/test_gdaladdo_5.tif') ds = gdal.Open('tmp/test_gdaladdo_5.tif') cnt = ds.GetRasterBand(1).GetOverviewCount() ds = None assert cnt == 1 os.remove('tmp/test_gdaladdo_5.tif') gdalautotest-3.1.2/utilities/test_gdal_rasterize_lib.py0000775000175000017500000003551213701060013022144 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_rasterize_lib.py 225923a5caa782d1543b7c0d7248b92dcc0bc8bf 2020-04-06 12:59:27 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_rasterize testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # Copyright (c) 2008, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal, ogr, osr import gdaltest import pytest ############################################################################### # Simple polygon rasterization (adapted from alg/rasterize.py). def test_gdal_rasterize_lib_1(): # Setup working spatial reference # sr_wkt = 'LOCAL_CS["arbitrary"]' # sr = osr.SpatialReference( sr_wkt ) sr = osr.SpatialReference() sr.ImportFromEPSG(32631) sr_wkt = sr.ExportToWkt() # Create a raster to rasterize into. target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a layer to rasterize from. vector_ds = \ gdal.GetDriverByName('Memory').Create('', 0, 0, 0) rast_lyr = vector_ds.CreateLayer('rast1', srs=sr) rast_lyr.GetLayerDefn() field_defn = ogr.FieldDefn('foo') rast_lyr.CreateField(field_defn) # Add a polygon. wkt_geom = 'POLYGON((1020 1030,1020 1045,1050 1045,1050 1030,1020 1030))' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) # Add feature without geometry to test fix for #3310 feat = ogr.Feature(rast_lyr.GetLayerDefn()) rast_lyr.CreateFeature(feat) # Add a linestring. wkt_geom = 'LINESTRING(1000 1000, 1100 1050)' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) ret = gdal.Rasterize(target_ds, vector_ds, bands=[3, 2, 1], burnValues=[200, 220, 240], layers='rast1') assert ret == 1 # Check results. expected = 6452 checksum = target_ds.GetRasterBand(2).Checksum() assert checksum == expected, 'Did not get expected image checksum' target_ds = None ############################################################################### # Test creating an output file def test_gdal_rasterize_lib_3(): import test_cli_utilities if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_contour_path() + ' ../gdrivers/data/n43.dt0 tmp/n43dt0.shp -i 10 -3d') with gdaltest.error_handler(): ds = gdal.Rasterize('/vsimem/bogus.tif', 'tmp/n43dt0.shp') assert ds is None, 'did not expected success' ds = gdal.Rasterize('', 'tmp/n43dt0.shp', format='MEM', outputType=gdal.GDT_Byte, useZ=True, layers=['n43dt0'], width=121, height=121, noData=0) ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/n43dt0.shp') ds_ref = gdal.Open('../gdrivers/data/n43.dt0') assert ds.GetRasterBand(1).GetNoDataValue() == 0.0, \ 'did not get expected nodata value' assert ds.RasterXSize == 121 and ds.RasterYSize == 121, \ 'did not get expected dimensions' gt_ref = ds_ref.GetGeoTransform() gt = ds.GetGeoTransform() for i in range(6): assert gt[i] == pytest.approx(gt_ref[i], abs=1e-6), 'did not get expected geotransform' wkt = ds.GetProjectionRef() assert wkt.find("WGS_1984") != -1, 'did not get expected SRS' ############################################################################### # Rasterization without georeferencing def test_gdal_rasterize_lib_100(): target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100) # Create a layer to rasterize from. vector_ds = \ gdal.GetDriverByName('Memory').Create('', 0, 0, 0) rast_lyr = vector_ds.CreateLayer('rast1') wkt_geom = 'POLYGON((20 20,20 80,80 80,80 20,20 20))' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) ret = gdal.Rasterize(target_ds, vector_ds, burnValues=[255]) assert ret == 1 # Check results. expected = 44190 checksum = target_ds.GetRasterBand(1).Checksum() assert checksum == expected, 'Did not get expected image checksum' target_ds = None ############################################################################### # Rasterization on empty geometry def test_gdal_rasterize_lib_101(): target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100) # Create a layer to rasterize from. vector_ds = \ gdal.GetDriverByName('Memory').Create('', 0, 0, 0) rast_lyr = vector_ds.CreateLayer('rast1') # polygon with empty exterior ring geom = ogr.CreateGeometryFromJson('{ "type": "Polygon", "coordinates": [ [ ] ] }') feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(geom) rast_lyr.CreateFeature(feat) ret = gdal.Rasterize(target_ds, vector_ds, burnValues=[255]) assert ret == 1 # Check results. checksum = target_ds.GetRasterBand(1).Checksum() assert checksum == 0, 'Did not get expected image checksum' target_ds = None ############################################################################### # Rasterization on raster with RPC def test_gdal_rasterize_lib_102(): target_ds = gdal.GetDriverByName('MEM').Create('', 353, 226) target_ds.GetRasterBand(1).Fill(255) md = { 'HEIGHT_OFF': '430', 'HEIGHT_SCALE': '501', 'LAT_OFF': '-0.0734', 'LAT_SCALE': '0.2883', 'LINE_DEN_COEFF': '1 0.0002790015 0.001434672 1.481312e-07 5.866139e-06 1.878347e-07 -7.1677e-08 -1.099383e-05 1.968371e-06 -5.50509e-06 0 -1.227539e-08 0 0 2.40682e-07 -1.144941e-08 0 -1.884406e-08 0 0', 'LINE_NUM_COEFF': '0.002744972 -0.382552 -1.279674 -0.0001147828 0.001140472 1.262068e-07 -1.69402e-07 -0.005830625 -0.001964747 0 -2.006924e-07 3.066144e-07 3.005069e-06 2.103552e-06 -1.981401e-06 -1.636042e-06 7.045145e-06 -5.699422e-08 1.169591e-07 0', 'LINE_OFF': '112.98500331785', 'LINE_SCALE': '113.01499668215', 'LONG_OFF': '-4.498', 'LONG_SCALE': '0.5511', 'SAMP_DEN_COEFF': '1 0.001297913 0.0005878427 -0.0004554233 -7.353773e-05 7.928584e-06 -1.826261e-06 9.516839e-05 5.332457e-07 -4.236274e-05 -1.89316e-08 -1.520878e-06 -8.941367e-07 -7.770314e-07 1.413225e-06 9.681702e-08 -4.724849e-08 -2.244317e-07 1.0665e-08 4.212225e-08', 'SAMP_NUM_COEFF': '0.01819195 1.091934 -0.1976373 0.003166136 0.002648549 0.0003527143 -6.27017e-05 -0.01889831 -0.0005888535 1.729232e-07 3.037208e-06 0.000174218 -3.129558e-05 -4.602708e-05 2.724941e-05 -9.314161e-07 8.328574e-06 -1.240182e-05 -4.652876e-07 -1.322223e-07', 'SAMP_OFF': '176.619681301916', 'SAMP_SCALE': '177.068486184099' } target_ds.SetMetadata(md, "RPC") vector_ds = \ gdal.GetDriverByName('Memory').Create('', 0, 0, 0) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) rast_lyr = vector_ds.CreateLayer('', srs=sr) # polygon with empty exterior ring geom = ogr.CreateGeometryFromWkt("""POLYGON ((-3.967081661665 0.0003251483162,-4.976841813513 0.0003251483162,-4.904140485134 0.2151010973779,-4.904124933286 0.2151433982916,-4.904107210626 0.2151848366149,-4.904087364764 0.2152253010321,-4.904065449011 0.2152646828438,-4.904041522241 0.2153028762585,-4.904015648726 0.2153397786774,-4.903987897971 0.2153752909697,-4.903958344523 0.2154093177387,-4.903927067771 0.2154417675784,-4.903894151734 0.2154725533188,-4.903859684834 0.2155015922603,-4.90382375966 0.2155288063955,-4.903786472717 0.2155541226193,-4.903747924169 0.2155774729247,-4.90370821757 0.2155987945858,-4.903667459582 0.2156180303263,-4.903625759694 0.2156351284732,-4.903583229924 0.2156500430959,-4.90353998452 0.2156627341291,-4.903496139651 0.2156731674811,-4.9034518131 0.2156813151247,-4.903407123938 0.2156871551729,-4.903362192216 0.2156906719376,-4.903317138633 0.2156918559717,-4.903272084216 0.2156907040946,-4.903227149995 0.2156872194006,-4.903182456677 0.2156814112505,-3.945022212098 0.0658193544758,-3.94497805444 0.0658112751384,-3.944934372574 0.0658009277184,-3.944891282916 0.0657883397923,-3.944848900303 0.0657735449078,-3.944807337687 0.0657565824944,-3.944766705836 0.0657374977579,-3.944727113036 0.0657163415606,-3.944688664805 0.0656931702851,-3.94465146361 0.0656680456844,-3.944615608594 0.0656410347174,-3.944581195314 0.0656122093701,-3.944548315483 0.065581646464,-3.944517056729 0.0655494274513,-3.944487502358 0.065515638198,-3.944459731134 0.0654803687547,-3.944433817071 0.0654437131168,-3.944409829229 0.0654057689742,-3.94438783154 0.0653666374506,-3.944367882627 0.0653264228341,-3.944350035657 0.0652852322995,-3.944334338192 0.0652431756223,-3.944320832068 0.0652003648864,-3.944309553279 0.0651569141855,-3.944300531884 0.0651129393185,-3.944293791926 0.0650685574815,-3.944289351367 0.0650238869551,-3.944287222041 0.0649790467894,-3.944287409623 0.0649341564864,-3.944289913614 0.0648893356818,-3.94429472734 0.0648447038262,-3.944301837972 0.0648003798665,-3.94431122656 0.064756481929,-3.944322868082 0.0647131270048,-3.944336731513 0.0646704306378,-3.967081661665 0.0003251483162))""") feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(geom) rast_lyr.CreateFeature(feat) ret = gdal.Rasterize(target_ds, vector_ds, burnValues=[0]) assert ret == 1 # Check results. checksum = target_ds.GetRasterBand(1).Checksum() assert checksum == 1604, 'Did not get expected image checksum' # Re-try with transformer options target_ds.GetRasterBand(1).Fill(255) ret = gdal.Rasterize(target_ds, vector_ds, burnValues=[0], transformerOptions=['RPC_HEIGHT=1000']) assert ret == 1 # Check results. checksum = target_ds.GetRasterBand(1).Checksum() assert checksum == 2003, 'Did not get expected image checksum' target_ds = None ############################################################################### # Simple rasterization with all values of the optim option def test_gdal_rasterize_lib_4(): # Setup working spatial reference # sr_wkt = 'LOCAL_CS["arbitrary"]' # sr = osr.SpatialReference( sr_wkt ) sr = osr.SpatialReference() sr.ImportFromEPSG(32631) sr_wkt = sr.ExportToWkt() # Create a raster to rasterize into. for optim in ['RASTER', 'VECTOR', 'AUTO']: target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a layer to rasterize from. vector_ds = \ gdal.GetDriverByName('Memory').Create('', 0, 0, 0) rast_lyr = vector_ds.CreateLayer('rast1', srs=sr) rast_lyr.GetLayerDefn() field_defn = ogr.FieldDefn('foo') rast_lyr.CreateField(field_defn) # Add a polygon. wkt_geom = 'POLYGON((1020 1030,1020 1045,1050 1045,1050 1030,1020 1030))' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) # Add feature without geometry to test fix for #3310 feat = ogr.Feature(rast_lyr.GetLayerDefn()) rast_lyr.CreateFeature(feat) # Add a linestring. wkt_geom = 'LINESTRING(1000 1000, 1100 1050)' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) ret = gdal.Rasterize(target_ds, vector_ds, bands=[3, 2, 1], burnValues=[200, 220, 240], layers='rast1', optim=optim) assert ret == 1 # Check results. expected = 6452 checksum = target_ds.GetRasterBand(2).Checksum() if checksum != expected: print(checksum, optim) pytest.fail('Did not get expected image checksum') target_ds = None def test_gdal_rasterize_lib_multipolygon(): sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) # Try rasterizing a multipolygon vector_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) layer = vector_ds.CreateLayer('', sr) feature = ogr.Feature(layer.GetLayerDefn()) feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt('MULTIPOLYGON (((0 0,0 1,1 1,0 0)),((1 1,2 1,2 0,1 1)))')) layer.CreateFeature(feature) target_ds = gdal.GetDriverByName('MEM').Create('', 3, 2) target_ds.SetGeoTransform((-0.5, 1, 0, 1.5, 0, -1)) target_ds.SetSpatialRef(sr) ret = gdal.Rasterize(target_ds, vector_ds, burnValues=[10]) assert ret == 1 cs1 = target_ds.GetRasterBand(1).Checksum() # And now each of its parts vector_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) layer = vector_ds.CreateLayer('', sr) feature = ogr.Feature(layer.GetLayerDefn()) feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON ((0 0,0 1,1 1,0 0))')) layer.CreateFeature(feature) feature = ogr.Feature(layer.GetLayerDefn()) feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt('POLYGON ((1 1,2 1,2 0,1 1))')) layer.CreateFeature(feature) target_ds = gdal.GetDriverByName('MEM').Create('', 3, 2) target_ds.SetGeoTransform((-0.5, 1, 0, 1.5, 0, -1)) target_ds.SetSpatialRef(sr) ret = gdal.Rasterize(target_ds, vector_ds, burnValues=[10]) assert ret == 1 cs2 = target_ds.GetRasterBand(1).Checksum() # Check that results are the same assert cs1 == cs2 gdalautotest-3.1.2/utilities/test_gdalbuildvrt_lib.py0000775000175000017500000000677413701060013021640 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalbuildvrt_lib.py 43a5dfc5e9aada854bac4d8c5a415f3e2f3ad3d5 2020-02-07 12:32:02 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: test librarified gdalbuildvrt # Author: Even Rouault # ############################################################################### # Copyright (c) 2016, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal ############################################################################### # Simple test def test_gdalbuildvrt_lib_1(): # Source = String ds = gdal.BuildVRT('', '../gcore/data/byte.tif') assert ds is not None, 'got error/warning' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' # Source = Array of string ds = gdal.BuildVRT('', ['../gcore/data/byte.tif']) assert ds is not None, 'got error/warning' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' # Source = Dataset ds = gdal.BuildVRT('', gdal.Open('../gcore/data/byte.tif')) assert ds is not None, 'got error/warning' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' # Source = Array of dataset ds = gdal.BuildVRT('', [gdal.Open('../gcore/data/byte.tif')]) assert ds is not None, 'got error/warning' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ############################################################################### # Test callback def mycallback(pct, msg, user_data): # pylint: disable=unused-argument user_data[0] = pct return 1 def test_gdalbuildvrt_lib_2(): tab = [0] ds = gdal.BuildVRT('', '../gcore/data/byte.tif', callback=mycallback, callback_data=tab) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert tab[0] == 1.0, 'Bad percentage' ds = None ############################################################################### # Test creating overviews def test_gdalbuildvrt_lib_ovr(): tmpfilename = '/vsimem/my.vrt' ds = gdal.BuildVRT(tmpfilename, '../gcore/data/byte.tif') ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open(tmpfilename) assert ds.GetRasterBand(1).GetOverviewCount() == 1 ds = None gdal.GetDriverByName('VRT').Delete(tmpfilename) gdalautotest-3.1.2/utilities/test_ogrtindex.py0000775000175000017500000002203213701060014020314 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_ogrtindex.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ogrtindex testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import ogr from osgeo import osr import ogrtest import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_ogrtindex_1(srs=None): if test_cli_utilities.get_ogrtindex_path() is None: pytest.skip() shape_drv = ogr.GetDriverByName('ESRI Shapefile') for basename in ['tileindex', 'point1', 'point2', 'point3', 'point4']: for extension in ['shp', 'dbf', 'shx', 'prj']: try: os.remove('tmp/%s.%s' % (basename, extension)) except OSError: pass shape_ds = shape_drv.CreateDataSource('tmp') shape_lyr = shape_ds.CreateLayer('point1', srs=srs) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(49 2)')) shape_lyr.CreateFeature(dst_feat) dst_feat.Destroy() shape_lyr = shape_ds.CreateLayer('point2', srs=srs) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(49 3)')) shape_lyr.CreateFeature(dst_feat) dst_feat.Destroy() shape_lyr = shape_ds.CreateLayer('point3', srs=srs) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(48 2)')) shape_lyr.CreateFeature(dst_feat) dst_feat.Destroy() shape_lyr = shape_ds.CreateLayer('point4', srs=srs) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(48 3)')) shape_lyr.CreateFeature(dst_feat) dst_feat.Destroy() shape_ds.Destroy() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrtindex_path() + ' -skip_different_projection tmp/tileindex.shp tmp/point1.shp tmp/point2.shp tmp/point3.shp tmp/point4.shp') assert (err is None or err == ''), 'got error/warning' ds = ogr.Open('tmp/tileindex.shp') assert ds.GetLayer(0).GetFeatureCount() == 4, 'did not get expected feature count' if srs is not None: assert ds.GetLayer(0).GetSpatialRef() is not None and ds.GetLayer(0).GetSpatialRef().IsSame(srs, options = ['IGNORE_DATA_AXIS_TO_SRS_AXIS_MAPPING=YES']), \ 'did not get expected spatial ref' else: assert ds.GetLayer(0).GetSpatialRef() is None, 'did not get expected spatial ref' expected_wkts = ['POLYGON ((49 2,49 2,49 2,49 2,49 2))', 'POLYGON ((49 3,49 3,49 3,49 3,49 3))', 'POLYGON ((48 2,48 2,48 2,48 2,48 2))', 'POLYGON ((48 3,48 3,48 3,48 3,48 3))'] i = 0 feat = ds.GetLayer(0).GetNextFeature() while feat is not None: assert feat.GetGeometryRef().ExportToWkt() == expected_wkts[i], \ ('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) i = i + 1 feat = ds.GetLayer(0).GetNextFeature() ds.Destroy() ############################################################################### # Same test but with a SRS set on the different tiles to index def test_ogrtindex_2(): srs = osr.SpatialReference() srs.ImportFromEPSG(4326) return test_ogrtindex_1(srs) ############################################################################### # Test -src_srs_name, -src_srs_format and -t_srs def test_ogrtindex_3(): if test_cli_utilities.get_ogrtindex_path() is None: pytest.skip() shape_drv = ogr.GetDriverByName('ESRI Shapefile') for basename in ['tileindex', 'point1', 'point2', 'point3', 'point4']: for extension in ['shp', 'dbf', 'shx', 'prj']: try: os.remove('tmp/%s.%s' % (basename, extension)) except OSError: pass shape_ds = shape_drv.CreateDataSource('tmp') srs_4326 = osr.SpatialReference() srs_4326.ImportFromEPSG(4326) wkt_epsg_4326 = srs_4326.ExportToWkt() srs_32631 = osr.SpatialReference() srs_32631.ImportFromEPSG(32631) wkt_epsg_32631 = srs_32631.ExportToWkt() shape_lyr = shape_ds.CreateLayer('point1', srs=srs_4326) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(2 49)')) shape_lyr.CreateFeature(dst_feat) shape_lyr = shape_ds.CreateLayer('point2', srs=srs_32631) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(500000 5538630.70286887)')) shape_lyr.CreateFeature(dst_feat) shape_ds = None for (src_srs_format, expected_srss) in [ ('', ['EPSG:4326', 'EPSG:32631']), ('-src_srs_format AUTO', ['EPSG:4326', 'EPSG:32631']), ('-src_srs_format EPSG', ['EPSG:4326', 'EPSG:32631']), ('-src_srs_format PROJ', ['+proj=longlat +datum=WGS84 +no_defs', '+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs']), ('-src_srs_format WKT', [wkt_epsg_4326, wkt_epsg_32631]) ]: if os.path.exists('tmp/tileindex.shp'): shape_drv.DeleteDataSource('tmp/tileindex.shp') if os.path.exists('tmp/tileindex.db'): os.unlink('tmp/tileindex.db') output_filename = 'tmp/tileindex.shp' output_format = '' if src_srs_format == '-src_srs_format WKT': if ogr.GetDriverByName('SQLite') is None: continue output_filename = 'tmp/tileindex.db' output_format = ' -f SQLite' (_, err) = gdaltest.runexternal_out_and_err( test_cli_utilities.get_ogrtindex_path() + ' -src_srs_name src_srs -t_srs EPSG:4326 ' + output_filename + ' tmp/point1.shp tmp/point2.shp ' + src_srs_format + output_format) assert src_srs_format == '-src_srs_format WKT' or (err is None or err == ''), \ 'got error/warning' ds = ogr.Open(output_filename) assert ds.GetLayer(0).GetFeatureCount() == 2, \ 'did not get expected feature count' assert ds.GetLayer(0).GetSpatialRef().GetAuthorityCode(None) == '4326', \ 'did not get expected spatial ref' expected_wkts = ['POLYGON ((2 49,2 49,2 49,2 49,2 49))', 'POLYGON ((3 50,3 50,3 50,3 50,3 50))'] i = 0 feat = ds.GetLayer(0).GetNextFeature() while feat is not None: if feat.GetField('src_srs') != expected_srss[i]: feat.DumpReadable() pytest.fail(i, src_srs_format) assert ogrtest.check_feature_geometry(feat, expected_wkts[i]) == 0, \ ('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) i = i + 1 feat = ds.GetLayer(0).GetNextFeature() ds = None if os.path.exists('tmp/tileindex.shp'): shape_drv.DeleteDataSource('tmp/tileindex.shp') if os.path.exists('tmp/tileindex.db'): os.unlink('tmp/tileindex.db') ############################################################################### # Cleanup def test_ogrtindex_cleanup(): if test_cli_utilities.get_ogrtindex_path() is None: pytest.skip() shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_drv.DeleteDataSource('tmp/tileindex.shp') shape_drv.DeleteDataSource('tmp/point1.shp') shape_drv.DeleteDataSource('tmp/point2.shp') if os.path.exists('tmp/point3.shp'): shape_drv.DeleteDataSource('tmp/point3.shp') if os.path.exists('tmp/point4.shp'): shape_drv.DeleteDataSource('tmp/point4.shp') gdalautotest-3.1.2/utilities/test_nearblack_lib.py0000775000175000017500000001224713701060014021070 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_nearblack_lib.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: nearblack testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest ############################################################################### # Basic test def test_nearblack_lib_1(): src_ds = gdal.Open('../gdrivers/data/rgbsmall.tif') ds = gdal.Nearblack('', src_ds, format='MEM', maxNonBlack=0, nearDist=15) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 21106, 'Bad checksum band 1' assert ds.GetRasterBand(2).Checksum() == 20736, 'Bad checksum band 2' assert ds.GetRasterBand(3).Checksum() == 21309, 'Bad checksum band 3' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' src_ds = None ds = None ############################################################################### # Add alpha band def test_nearblack_lib_2(): ds = gdal.Nearblack('', '../gdrivers/data/rgbsmall.tif', format='MEM', maxNonBlack=0, setAlpha=True) assert ds is not None assert ds.GetRasterBand(4).Checksum() == 22002, 'Bad checksum band 0' ds = None ############################################################################### # Set existing alpha band def test_nearblack_lib_3(): src_ds = gdal.Nearblack('', '../gdrivers/data/rgbsmall.tif', format='MEM', maxNonBlack=0, setAlpha=True) ds = gdal.Nearblack('', src_ds, format='MEM', maxNonBlack=0, setAlpha=True) assert ds is not None assert ds.GetRasterBand(4).Checksum() == 22002, 'Bad checksum band 0' ds = None ############################################################################### # Test -white def test_nearblack_lib_4(): src_ds = gdal.Warp('', '../gdrivers/data/rgbsmall.tif', format='MEM', warpOptions=["INIT_DEST=255"], srcNodata=0) ds = gdal.Nearblack('', src_ds, format='MEM', white=True, maxNonBlack=0, setAlpha=True) assert ds is not None assert ds.GetRasterBand(4).Checksum() == 24151, 'Bad checksum band 0' ds = None ############################################################################### # Add mask band def test_nearblack_lib_5(): ds = gdal.Nearblack('/vsimem/test_nearblack_lib_5.tif', '../gdrivers/data/rgbsmall.tif', format='GTiff', maxNonBlack=0, setMask=True) assert ds is not None assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 22002, \ 'Bad checksum mask band' ds = None gdal.Unlink('/vsimem/test_nearblack_lib_5.tif') gdal.Unlink('/vsimem/test_nearblack_lib_5.tif.msk') ############################################################################### # Test -color def test_nearblack_lib_7(): ds = gdal.Nearblack('', 'data/whiteblackred.tif', format='MEM', colors=((0, 0, 0), (255, 255, 255))) assert ds is not None assert (ds.GetRasterBand(1).Checksum() == 418 and \ ds.GetRasterBand(2).Checksum() == 0 and \ ds.GetRasterBand(3).Checksum() == 0), 'Bad checksum' ds = None ############################################################################### # Test in-place update def test_nearblack_lib_8(): src_ds = gdal.Open('../gdrivers/data/rgbsmall.tif') ds = gdal.GetDriverByName('MEM').CreateCopy('', src_ds) ret = gdal.Nearblack(ds, ds, maxNonBlack=0) assert ret == 1 assert ds.GetRasterBand(1).Checksum() == 21106, 'Bad checksum band 1' assert ds.GetRasterBand(2).Checksum() == 20736, 'Bad checksum band 2' assert ds.GetRasterBand(3).Checksum() == 21309, 'Bad checksum band 3' gdalautotest-3.1.2/utilities/test_gdalwarp_lib.py0000775000175000017500000023436013701060014020751 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalwarp_lib.py 7294a96e7747b442cd7033280c2780cfd2bca572 2020-06-12 16:43:48 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: test librarified gdalwarp # Author: Faza Mahamood # ############################################################################### # Copyright (c) 2015, Faza Mahamood # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct import os from osgeo import gdal, ogr, osr import gdaltest import ogrtest import pytest ############################################################################### # Simple test def test_gdalwarp_lib_1(): ds1 = gdal.Open('../gcore/data/byte.tif') dstDS = gdal.Warp('tmp/testgdalwarp1.tif', ds1) assert dstDS.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' dstDS = None ############################################################################### # Test -of option def test_gdalwarp_lib_2(): ds1 = gdal.Open('../gcore/data/byte.tif') dstDS = gdal.Warp('tmp/testgdalwarp2.tif'.encode('ascii').decode('ascii'), [ds1], format='GTiff') assert dstDS.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' dstDS = None ############################################################################### # Test -ot option def test_gdalwarp_lib_3(): ds1 = gdal.Open('../gcore/data/byte.tif') dstDS = gdal.Warp('', ds1, format='MEM', outputType=gdal.GDT_Int16) assert dstDS.GetRasterBand(1).DataType == gdal.GDT_Int16, 'Bad data type' assert dstDS.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' dstDS = None ############################################################################### # Test -t_srs option def test_gdalwarp_lib_4(): ds1 = gdal.Open('../gcore/data/byte.tif') dstDS = gdal.Warp('', ds1, format='MEM', dstSRS='EPSG:32611') assert dstDS.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' dstDS = None ############################################################################### # Test warping from GCPs without any explicit option def test_gdalwarp_lib_5(): ds = gdal.Open('../gcore/data/byte.tif') gcpList = [gdal.GCP(440720.000, 3751320.000, 0, 0, 0), gdal.GCP(441920.000, 3751320.000, 0, 20, 0), gdal.GCP(441920.000, 3750120.000, 0, 20, 20), gdal.GCP(440720.000, 3750120.000, 0, 0, 20)] ds1 = gdal.Translate('tmp/testgdalwarp_gcp.tif', ds, outputSRS='EPSG:26711', GCPs=gcpList) dstDS = gdal.Warp('', ds1, format='MEM', tps=True) assert dstDS.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(ds.GetGeoTransform(), dstDS.GetGeoTransform(), 1e-9), \ 'Bad geotransform' dstDS = None ############################################################################### # Test warping from GCPs with -tps def test_gdalwarp_lib_6(): ds1 = gdal.Open('tmp/testgdalwarp_gcp.tif') dstDS = gdal.Warp('', ds1, format='MEM', tps=True) assert dstDS.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), dstDS.GetGeoTransform(), 1e-9), \ 'Bad geotransform' dstDS = None ############################################################################### # Test -tr def test_gdalwarp_lib_7(): ds1 = gdal.Open('tmp/testgdalwarp_gcp.tif') dstDS = gdal.Warp('', [ds1], format='MEM', xRes=120, yRes=120) assert dstDS is not None expected_gt = (440720.0, 120.0, 0.0, 3751320.0, 0.0, -120.0) assert gdaltest.geotransform_equals(expected_gt, dstDS.GetGeoTransform(), 1e-9), \ 'Bad geotransform' dstDS = None ############################################################################### # Test -ts def test_gdalwarp_lib_8(): ds1 = gdal.Open('tmp/testgdalwarp_gcp.tif') dstDS = gdal.Warp('', [ds1], format='MEM', width=10, height=10) assert dstDS is not None expected_gt = (440720.0, 120.0, 0.0, 3751320.0, 0.0, -120.0) assert gdaltest.geotransform_equals(expected_gt, dstDS.GetGeoTransform(), 1e-9), \ 'Bad geotransform' dstDS = None ############################################################################### # Test -te def test_gdalwarp_lib_9(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', outputBounds=[440720.000, 3750120.000, 441920.000, 3751320.000]) assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -rn def test_gdalwarp_lib_10(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', width=40, height=40, resampleAlg=gdal.GRIORA_NearestNeighbour) assert ds.GetRasterBand(1).Checksum() == 18784, 'Bad checksum' ds = None ############################################################################### # Test -rb def test_gdalwarp_lib_11(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', width=40, height=40, resampleAlg=gdal.GRIORA_Bilinear) ref_ds = gdal.Open('ref_data/testgdalwarp11.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds, verbose=0) ref_ds = None if maxdiff > 1: gdaltest.compare_ds(ds, ref_ds, verbose=1) pytest.fail('Image too different from reference') ds = None ############################################################################### # Test -rc def test_gdalwarp_lib_12(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', width=40, height=40, resampleAlg=gdal.GRIORA_Cubic) ref_ds = gdal.Open('ref_data/testgdalwarp12.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds, verbose=0) ref_ds = None if maxdiff > 1: gdaltest.compare_ds(ds, ref_ds, verbose=1) pytest.fail('Image too different from reference') ds = None ############################################################################### # Test -rcs def test_gdalwarp_lib_13(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', width=40, height=40, resampleAlg=gdal.GRIORA_CubicSpline) ref_ds = gdal.Open('ref_data/testgdalwarp13.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds, verbose=0) ref_ds = None if maxdiff > 1: gdaltest.compare_ds(ds, ref_ds, verbose=1) pytest.fail('Image too different from reference') ds = None ############################################################################### # Test -r lanczos def test_gdalwarp_lib_14(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', width=40, height=40, resampleAlg=gdal.GRIORA_Lanczos) ref_ds = gdal.Open('ref_data/testgdalwarp14.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds, verbose=0) ref_ds = None if maxdiff > 1: gdaltest.compare_ds(ds, ref_ds, verbose=1) pytest.fail('Image too different from reference') ds = None ############################################################################### # Test -dstnodata def test_gdalwarp_lib_15(): ds = gdal.Warp('', 'tmp/testgdalwarp_gcp.tif', format='MEM', dstSRS='EPSG:32610', dstNodata=1) assert ds.GetRasterBand(1).GetNoDataValue() == 1, 'Bad nodata value' assert ds.GetRasterBand(1).Checksum() == 4523, 'Bad checksum' ds = None ############################################################################### # Test -of VRT which is a special case def test_gdalwarp_lib_16(): ds = gdal.Warp('/vsimem/test_gdalwarp_lib_16.vrt', 'tmp/testgdalwarp_gcp.tif', format='VRT') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None gdal.Unlink('/vsimem/test_gdalwarp_lib_16.vrt') # Cannot write file with gdaltest.error_handler(): ds = gdal.Warp('/i_dont/exist/test_gdalwarp_lib_16.vrt', 'tmp/testgdalwarp_gcp.tif', format='VRT') assert ds is None ############################################################################### # Test -dstalpha def test_gdalwarp_lib_17(): ds = gdal.Warp('', '../gcore/data/rgbsmall.tif', format='MEM', dstAlpha=True) assert ds is not None assert ds.GetRasterBand(4) is not None, 'No alpha band generated' ds = None ############################################################################### # Test -et 0 which is a special case def test_gdalwarp_lib_19(): ds = gdal.Warp('', 'tmp/testgdalwarp_gcp.tif', format='MEM', errorThreshold=0) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test cutline from OGR datasource. def test_gdalwarp_lib_21(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='cutline') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 19139, 'Bad checksum' ds = None ############################################################################### # Test cutline with ALL_TOUCHED enabled. def test_gdalwarp_lib_23(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', warpOptions=['CUTLINE_ALL_TOUCHED=TRUE'], cutlineDSName='data/cutline.vrt', cutlineLayer='cutline') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 20123, 'Bad checksum' ds = None ############################################################################### # Test -tap def test_gdalwarp_lib_32(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', targetAlignedPixels=True, xRes=100, yRes=50) assert ds is not None expected_gt = (440700.0, 100.0, 0.0, 3751350.0, 0.0, -50.0) got_gt = ds.GetGeoTransform() assert gdaltest.geotransform_equals(expected_gt, got_gt, 1e-9), 'Bad geotransform' assert ds.RasterXSize == 13 and ds.RasterYSize == 25, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) ds = None ############################################################################### # Test warping multiple sources def test_gdalwarp_lib_34(): srcds1 = gdal.Translate('', '../gcore/data/byte.tif', format='MEM', srcWin=[0, 0, 10, 20]) srcds2 = gdal.Translate('', '../gcore/data/byte.tif', format='MEM', srcWin=[10, 0, 10, 20]) ds = gdal.Warp('', [srcds1, srcds2], format='MEM') cs = ds.GetRasterBand(1).Checksum() gt = ds.GetGeoTransform() xsize = ds.RasterXSize ysize = ds.RasterYSize ds = None assert xsize == 20 and ysize == 20, 'bad dimensions' assert cs == 4672, 'bad checksum' expected_gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-5), 'bad gt' ############################################################################### # Test -te_srs def test_gdalwarp_lib_45(): ds = gdal.Warp('', ['../gcore/data/byte.tif'], format='MEM', outputBounds=[-117.641087629972, 33.8915301685897, -117.628190189534, 33.9024195619201], outputBoundsSRS='EPSG:4267') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None ############################################################################### # Test -crop_to_cutline def test_gdalwarp_lib_46(): ds = gdal.Warp('', ['../gcore/data/utmsmall.tif'], format='MEM', cutlineDSName='data/cutline.vrt', cropToCutline=True) assert ds.GetRasterBand(1).Checksum() == 18837, 'Bad checksum' ds = None # Precisely test output raster bounds in no raster reprojection ccase src_ds = gdal.Translate('', '../gcore/data/byte.tif', format='MEM', outputBounds=[2, 49, 3, 48], outputSRS='EPSG:4326') cutlineDSName = '/vsimem/test_gdalwarp_lib_46.json' cutline_ds = ogr.GetDriverByName('GeoJSON').CreateDataSource(cutlineDSName) cutline_lyr = cutline_ds.CreateLayer('cutline') f = ogr.Feature(cutline_lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2.13 48.13,2.83 48.13,2.83 48.83,2.13 48.83,2.13 48.13))')) cutline_lyr.CreateFeature(f) f = None cutline_lyr = None cutline_ds = None # No CUTLINE_ALL_TOUCHED: the extent should be smaller than the cutline ds = gdal.Warp('', src_ds, format='MEM', cutlineDSName=cutlineDSName, cropToCutline=True) got_gt = ds.GetGeoTransform() expected_gt = (2.15, 0.05, 0.0, 48.8, 0.0, -0.05) assert max([abs(got_gt[i]-expected_gt[i]) for i in range(6)]) <= 1e-8 assert ds.RasterXSize == 13 and ds.RasterYSize == 13 # Same but with CUTLINE_ALL_TOUCHED=YES: the extent should be larger # than the cutline ds = gdal.Warp('', src_ds, format='MEM', cutlineDSName=cutlineDSName, cropToCutline=True, warpOptions=['CUTLINE_ALL_TOUCHED=YES']) got_gt = ds.GetGeoTransform() expected_gt = (2.1, 0.05, 0.0, 48.85, 0.0, -0.05) assert max([abs(got_gt[i]-expected_gt[i]) for i in range(6)]) <= 1e-8 assert ds.RasterXSize == 15 and ds.RasterYSize == 15 # Test numeric stability when the cutline is exactly on pixel boundaries cutline_ds = ogr.GetDriverByName('GeoJSON').CreateDataSource(cutlineDSName) cutline_lyr = cutline_ds.CreateLayer('cutline') f = ogr.Feature(cutline_lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2.15 48.15,2.85 48.15,2.85 48.85,2.15 48.85,2.15 48.15))')) cutline_lyr.CreateFeature(f) f = None cutline_lyr = None cutline_ds = None for warpOptions in [[], ['CUTLINE_ALL_TOUCHED=YES']]: ds = gdal.Warp('', src_ds, format='MEM', cutlineDSName=cutlineDSName, cropToCutline=True, warpOptions=warpOptions) got_gt = ds.GetGeoTransform() expected_gt = (2.15, 0.05, 0.0, 48.85, 0.0, -0.05) assert max([abs(got_gt[i]-expected_gt[i]) for i in range(6)]) <= 1e-8 assert ds.RasterXSize == 14 and ds.RasterYSize == 14 gdal.Unlink(cutlineDSName) ############################################################################### # Test -crop_to_cutline -tr X Y -wo CUTLINE_ALL_TOUCHED=YES (fixes for #1360) def test_gdalwarp_lib_cutline_all_touched_single_pixel(): cutlineDSName = '/vsimem/test_gdalwarp_lib_cutline_all_touched_single_pixel.json' cutline_ds = ogr.GetDriverByName('GeoJSON').CreateDataSource(cutlineDSName) cutline_lyr = cutline_ds.CreateLayer('cutline') f = ogr.Feature(cutline_lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2.15 48.15,2.15000001 48.15000001,2.15 48.15000001,2.15 48.15))')) cutline_lyr.CreateFeature(f) f = None cutline_lyr = None cutline_ds = None src_ds = gdal.Translate('', '../gcore/data/byte.tif', format='MEM', outputBounds=[2, 49, 3, 48], outputSRS='EPSG:4326') ds = gdal.Warp('', src_ds, format='MEM', cutlineDSName=cutlineDSName, cropToCutline=True, warpOptions=['CUTLINE_ALL_TOUCHED=YES'], xRes=0.001, yRes=0.001) got_gt = ds.GetGeoTransform() expected_gt = (2.15, 0.001, 0.0, 48.151, 0.0, -0.001) assert max([abs(got_gt[i]-expected_gt[i]) for i in range(6)]) <= 1e-8, got_gt assert ds.RasterXSize == 1 and ds.RasterYSize == 1 gdal.Unlink(cutlineDSName) ############################################################################### # Test callback def mycallback(pct, msg, user_data): # pylint: disable=unused-argument user_data[0] = pct return 1 def test_gdalwarp_lib_100(): tab = [0] ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', callback=mycallback, callback_data=tab) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert tab[0] == 1.0, 'Bad percentage' ds = None ############################################################################### # Test with color table def test_gdalwarp_lib_101(): ds = gdal.Warp('', '../gdrivers/data/small_world_pct.tif', format='MEM') assert ds.GetRasterBand(1).GetColorTable() is not None, 'Did not get color table' ############################################################################### # Test with a dataset with no bands def test_gdalwarp_lib_102(): no_band_ds = gdal.GetDriverByName('MEM').Create('no band', 1, 1, 0) with gdaltest.error_handler(): ds = gdal.Warp('', ['../gdrivers/data/small_world_pct.tif', no_band_ds], format='MEM') assert ds is None, 'Did not expected dataset' ############################################################################### # Test failed transformer def test_gdalwarp_lib_103(): with gdaltest.error_handler(): ds = gdal.Warp('', ['../gdrivers/data/small_world_pct.tif', '../gcore/data/stefan_full_rgba.tif'], format='MEM') assert ds is None, 'Did not expected dataset' ############################################################################### # Test no usable source image def test_gdalwarp_lib_104(): with gdaltest.error_handler(): ds = gdal.Warp('', [], format='MEM') assert ds is None, 'Did not expected dataset' ############################################################################### # Test failure in GDALSuggestedWarpOutput2 def test_gdalwarp_lib_105(): # with proj 4.9.3 this will success. We limit the width and height # otherwise a very big raster will be created with 4.9.3 which may cause # hangups in Travis MacOSX with gdaltest.error_handler(): gdal.Warp('', ['../gdrivers/data/small_world_pct.tif', '../gcore/data/byte.tif'], format='MEM', dstSRS='EPSG:32645', width=100, height=100) ############################################################################### # Test failure in creation def test_gdalwarp_lib_106(): with gdaltest.error_handler(): ds = gdal.Warp('/not_existing_dir/not_existing_file', ['../gdrivers/data/small_world_pct.tif', '../gcore/data/byte.tif']) assert ds is None, 'Did not expected dataset' ############################################################################### # Test forced width only def test_gdalwarp_lib_107(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', width=20) assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ############################################################################### # Test forced height only def test_gdalwarp_lib_108(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', height=20) assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ############################################################################### # Test wrong cutline name def test_gdalwarp_lib_109(): with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', cutlineDSName='/does/not/exist') assert ds is None, 'Did not expected dataset' ############################################################################### # Test wrong cutline layer name def test_gdalwarp_lib_110(): with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='wrong_name') assert ds is None, 'Did not expected dataset' ############################################################################### # Test cutline SQL def test_gdalwarp_lib_111(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='data/cutline.vrt', cutlineSQL='SELECT * FROM cutline', cutlineWhere='1 = 1') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 19139, 'Bad checksum' ds = None ############################################################################### # Test cutline without geometry def test_gdalwarp_lib_112(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/cutline.shp') lyr = ds.CreateLayer('cutline') f = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(f) f = None ds = None with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='/vsimem/cutline.shp', cutlineSQL='SELECT * FROM cutline') assert ds is None, 'Did not expected dataset' ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/cutline.shp') ############################################################################### # Test cutline with non polygon geometry def test_gdalwarp_lib_113(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/cutline.shp') lyr = ds.CreateLayer('cutline') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(f) f = None ds = None with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='/vsimem/cutline.shp') assert ds is None, 'Did not expected dataset' ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/cutline.shp') ############################################################################### # Test cutline without feature def test_gdalwarp_lib_114(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/cutline.shp') ds.CreateLayer('cutline') ds = None with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='/vsimem/cutline.shp') assert ds is None, 'Did not expected dataset' ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/cutline.shp') ############################################################################### # Test source dataset without band def test_gdalwarp_lib_115(): no_band_ds = gdal.GetDriverByName('MEM').Create('no band', 1, 1, 0) out_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 0) with gdaltest.error_handler(): ret = gdal.Warp(out_ds, no_band_ds, cutlineDSName='data/cutline.vrt', cutlineLayer='cutline') assert ret == 0, 'Expected failure' ############################################################################### # Test failed cropToCutline due to invalid SRC_SRS def test_gdalwarp_lib_116(): with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='cutline', cropToCutline=True, transformerOptions=['SRC_SRS=invalid']) assert ds is None, 'Did not expected dataset' ############################################################################### # Test failed cropToCutline due to invalid DST_SRS def test_gdalwarp_lib_117(): with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='cutline', cropToCutline=True, transformerOptions=['DST_SRS=invalid']) assert ds is None, 'Did not expected dataset' ############################################################################### # Test failed cropToCutline due to no source raster def test_gdalwarp_lib_118(): with gdaltest.error_handler(): ds = gdal.Warp('', [], format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='cutline', cropToCutline=True) assert ds is None, 'Did not expected dataset' ############################################################################### # Test failed cropToCutline due to source raster without projection def test_gdalwarp_lib_119(): no_proj_ds = gdal.GetDriverByName('MEM').Create('no_proj_ds', 1, 1) with gdaltest.error_handler(): ds = gdal.Warp('', no_proj_ds, format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='cutline', cropToCutline=True) assert ds is None, 'Did not expected dataset' ############################################################################### # Test failed cropToCutline due to source raster with dummy projection def test_gdalwarp_lib_120(): dummy_proj_ds = gdal.GetDriverByName('MEM').Create('no_proj_ds', 1, 1) dummy_proj_ds.SetProjection('dummy') with gdaltest.error_handler(): ds = gdal.Warp('', dummy_proj_ds, format='MEM', cutlineDSName='data/cutline.vrt', cutlineLayer='cutline', cropToCutline=True) assert ds is None, 'Did not expected dataset' ############################################################################### # Test internal wrappers def test_gdalwarp_lib_121(): # No option with gdaltest.error_handler(): gdal.wrapper_GDALWarpDestName('', [], None) # Will create an implicit options structure with gdaltest.error_handler(): gdal.wrapper_GDALWarpDestName('', [], None, gdal.TermProgress) # Null dest name try: gdal.wrapper_GDALWarpDestName(None, [], None) except: pass # No option with gdaltest.error_handler(): gdal.wrapper_GDALWarpDestDS(gdal.GetDriverByName('MEM').Create('', 1, 1), [], None) # Will create an implicit options structure with gdaltest.error_handler(): gdal.wrapper_GDALWarpDestDS(gdal.GetDriverByName('MEM').Create('', 1, 1), [], None, gdal.TermProgress) ############################################################################### # Test unnamed output VRT def test_gdalwarp_lib_122(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='VRT') assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ############################################################################### # Test failure during warping def test_gdalwarp_lib_123(): with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/byte_truncated.tif', format='MEM') assert ds is None ############################################################################### # Test warping to dataset with existing nodata def test_gdalwarp_lib_124(): src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetGeoTransform([10, 1, 0, 10, 0, -1]) src_ds.GetRasterBand(1).SetNoDataValue(12) src_ds.GetRasterBand(1).Fill(12) out_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) out_ds.SetGeoTransform([10, 1, 0, 10, 0, -1]) out_ds.GetRasterBand(1).SetNoDataValue(21) out_ds.GetRasterBand(1).Fill(21) expected_cs = out_ds.GetRasterBand(1).Checksum() gdal.Warp(out_ds, src_ds) cs = out_ds.GetRasterBand(1).Checksum() assert cs == expected_cs, 'Bad checksum' ############################################################################### # Test that statistics are not propagated def test_gdalwarp_lib_125(): for i in range(3): src_ds_1 = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds_1.SetGeoTransform([10, 1, 0, 10, 0, -1]) if i == 1 or i == 3: src_ds_1.GetRasterBand(1).SetMetadataItem('STATISTICS_MINIUM', '5') src_ds_2 = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds_2.SetGeoTransform([10, 1, 0, 10, 0, -1]) if i == 2 or i == 3: src_ds_2.GetRasterBand(1).SetMetadataItem('STATISTICS_MINIUM', '5') out_ds = gdal.Warp('', [src_ds_1, src_ds_2], format='MEM') assert out_ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIUM') is None, i ############################################################################### # Test cutline with invalid geometry def test_gdalwarp_lib_126(): if not ogrtest.have_geos(): pytest.skip() ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/cutline.shp') lyr = ds.CreateLayer('cutline') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,1 1,0 1,1 0,0 0))')) # Self intersecting lyr.CreateFeature(f) f = None ds = None with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', cutlineDSName='/vsimem/cutline.shp') assert ds is None, 'Did not expected dataset' ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/cutline.shp') ############################################################################### # Test -srcnodata (#6315) def test_gdalwarp_lib_127(): ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', srcNodata=1) assert ds.GetRasterBand(1).GetNoDataValue() == 1, 'bad nodata value' assert ds.GetRasterBand(1).Checksum() == 4672, 'bad checksum' ############################################################################### # Test automatic densification of cutline (#6375) def test_gdalwarp_lib_128(): mem_ds = gdal.GetDriverByName('MEM').Create('', 1177, 4719) rpc = ["HEIGHT_OFF=109", "LINE_NUM_COEFF=-0.001245683 -0.09427649 -1.006342 -1.954469e-05 0.001033926 2.020534e-08 -3.845472e-07 -0.002075817 0.0005520694 0 -4.642442e-06 -3.271793e-06 2.705977e-05 -7.634384e-07 -2.132832e-05 -3.248862e-05 -8.17894e-06 -3.678094e-07 2.002032e-06 3.693162e-08", "LONG_OFF=7.1477", "SAMP_DEN_COEFF=1 0.01415176 -0.003715018 -0.001205632 -0.0007738299 4.057763e-05 -1.649126e-05 0.0001453584 0.0001628194 -7.354731e-05 4.821444e-07 -4.927701e-06 -1.942371e-05 -2.817499e-06 1.946396e-06 3.04243e-06 2.362282e-07 -2.5371e-07 -1.36993e-07 1.132432e-07", "LINE_SCALE=2360", "SAMP_NUM_COEFF=0.04337163 1.775948 -0.87108 0.007425391 0.01783631 0.0004057179 -0.000184695 -0.04257537 -0.01127869 -1.531228e-06 1.017961e-05 0.000572344 -0.0002941 -0.0001301705 -0.0003289546 5.394918e-05 6.388447e-05 -4.038289e-06 -7.525785e-06 -5.431241e-07", "LONG_SCALE=0.8383", "SAMP_SCALE=593", "SAMP_OFF=589", "LAT_SCALE=1.4127", "LAT_OFF=33.8992", "LINE_OFF=2359", "LINE_DEN_COEFF=1 0.0007273139 -0.0006006867 -4.272095e-07 2.578717e-05 4.718479e-06 -2.116976e-06 -1.347805e-05 -2.209958e-05 8.131258e-06 -7.290143e-08 5.105109e-08 -7.353388e-07 0 2.131142e-06 9.697701e-08 1.237039e-08 7.153246e-08 6.758015e-08 5.811124e-08", "HEIGHT_SCALE=96.3"] mem_ds.SetMetadata(rpc, "RPC") mem_ds.GetRasterBand(1).Fill(255) cutlineDSName = '/vsimem/test_gdalwarp_lib_128.json' cutline_ds = ogr.GetDriverByName('GeoJSON').CreateDataSource(cutlineDSName) cutline_lyr = cutline_ds.CreateLayer('cutline') f = ogr.Feature(cutline_lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((7.2151 32.51930,7.214316 32.58116,7.216043 32.59476,7.21666 32.5193,7.2151 32.51930))')) cutline_lyr.CreateFeature(f) f = None cutline_lyr = None cutline_ds = None # Default is GDALWARP_DENSIFY_CUTLINE=YES ds = gdal.Warp('', mem_ds, format='MEM', cutlineDSName=cutlineDSName, dstSRS='EPSG:4326', outputBounds=[7.2, 32.52, 7.217, 32.59], xRes=0.000226555, yRes=0.000226555, transformerOptions=['RPC_DEM=data/test_gdalwarp_lib_128_dem.tif']) cs = ds.GetRasterBand(1).Checksum() assert cs == 4248, 'bad checksum' # Below steps depend on GEOS if not ogrtest.have_geos(): gdal.Unlink(cutlineDSName) return gdal.SetConfigOption('GDALWARP_DENSIFY_CUTLINE', 'ONLY_IF_INVALID') ds = gdal.Warp('', mem_ds, format='MEM', cutlineDSName=cutlineDSName, dstSRS='EPSG:4326', outputBounds=[7.2, 32.52, 7.217, 32.59], xRes=0.000226555, yRes=0.000226555, transformerOptions=['RPC_DEM=data/test_gdalwarp_lib_128_dem.tif']) gdal.SetConfigOption('GDALWARP_DENSIFY_CUTLINE', None) cs = ds.GetRasterBand(1).Checksum() assert cs == 4248, 'bad checksum' gdal.SetConfigOption('GDALWARP_DENSIFY_CUTLINE', 'NO') with gdaltest.error_handler(): ds = gdal.Warp('', mem_ds, format='MEM', cutlineDSName=cutlineDSName, dstSRS='EPSG:4326', outputBounds=[7.2, 32.52, 7.217, 32.59], xRes=0.000226555, yRes=0.000226555, transformerOptions=['RPC_DEM=data/test_gdalwarp_lib_128_dem.tif']) gdal.SetConfigOption('GDALWARP_DENSIFY_CUTLINE', None) assert ds is None, 'expected none return' gdal.Unlink(cutlineDSName) ############################################################################### # Test automatic densification of cutline, but with initial guess leading # to an invalid geometry (#6375) def test_gdalwarp_lib_129(): if not ogrtest.have_geos(): pytest.skip() mem_ds = gdal.GetDriverByName('MEM').Create('', 1000, 2000) rpc = ["HEIGHT_OFF=1767", "LINE_NUM_COEFF=0.0004430579 -0.06200816 -1.007087 1.614683e-05 0.0009263463 -1.003745e-07 -2.346893e-06 -0.001179024 -0.0007413534 0 9.41488e-08 -4.566652e-07 2.895947e-05 -2.925327e-07 -2.308839e-05 -1.502702e-05 -4.775127e-06 0 4.290483e-07 2.850458e-08", "LONG_OFF=-.2282", "SAMP_DEN_COEFF=1 -0.01907542 0.01651069 -0.001340671 -0.0005495095 -1.072863e-05 -1.157626e-05 0.0003737224 0.0002712591 -0.0001363199 3.614417e-08 3.584749e-06 9.175671e-06 2.661593e-06 -1.045511e-05 -1.293648e-06 -2.769964e-06 5.931109e-07 -1.018687e-07 2.366109e-07", "LINE_SCALE=11886", "SAMP_NUM_COEFF=0.007334337 1.737166 -0.7954719 -0.004635387 -0.007478255 0.0006381186 -0.0003313475 0.0002313095 -0.002883101 -1.625925e-06 -6.409095e-06 -0.000403506 -0.0004441055 -0.0002360882 8.940442e-06 -0.0001780485 0.0001081517 -6.592931e-06 2.642496e-06 6.316508e-07", "LONG_SCALE=0.6996", "SAMP_SCALE=2945", "SAMP_OFF=2926", "LAT_SCALE=1.4116", "LAT_OFF=.4344", "LINE_OFF=-115", "LINE_DEN_COEFF=1 0.0008882352 -0.0002437686 -2.380782e-06 2.69128e-05 0 2.144654e-07 -2.093549e-05 -7.055149e-06 4.740057e-06 0 -1.588607e-08 -1.397592e-05 0 -7.717698e-07 6.505002e-06 0 -1.225041e-08 3.608499e-08 -4.463376e-08", "HEIGHT_SCALE=1024"] mem_ds.SetMetadata(rpc, "RPC") mem_ds.GetRasterBand(1).Fill(255) cutlineDSName = '/vsimem/test_gdalwarp_lib_129.json' cutline_ds = ogr.GetDriverByName('GeoJSON').CreateDataSource(cutlineDSName) cutline_lyr = cutline_ds.CreateLayer('cutline') f = ogr.Feature(cutline_lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON ((-0.873086 0.511332,-0.626502 0.507654,-0.630715 0.282053,-0.876863 0.285693,-0.873086 0.511332))')) cutline_lyr.CreateFeature(f) f = None cutline_lyr = None cutline_ds = None ds = gdal.Warp('', mem_ds, format='MEM', cutlineDSName=cutlineDSName, dstSRS='EPSG:4326', outputBounds=[-1, 0, 0, 1], xRes=0.01, yRes=0.01, transformerOptions=['RPC_DEM=data/test_gdalwarp_lib_129_dem.vrt']) cs = ds.GetRasterBand(1).Checksum() assert cs == 399, 'bad checksum' gdal.Unlink(cutlineDSName) ############################################################################### # Test automatic detection and setting of alpha channel, and setting RGB on # GTiff output def test_gdalwarp_lib_130(): src_ds = gdal.GetDriverByName('GTiff').Create( '/vsimem/test_gdalwarp_lib_130.tif', 1, 1, 5, options=['PHOTOMETRIC=RGB']) src_ds.SetGeoTransform([100, 1, 0, 200, 0, -1]) src_ds.GetRasterBand(5).SetColorInterpretation(gdal.GCI_AlphaBand) src_ds.GetRasterBand(1).Fill(1) src_ds.GetRasterBand(2).Fill(2) src_ds.GetRasterBand(3).Fill(3) src_ds.GetRasterBand(4).Fill(4) src_ds.GetRasterBand(5).Fill(255) ds = gdal.Warp('/vsimem/test_gdalwarp_lib_130_dst.tif', src_ds) assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand, \ 'bad color interpretation' assert ds.GetRasterBand(5).GetColorInterpretation() == gdal.GCI_AlphaBand, \ 'bad color interpretation' expected_val = [1, 2, 3, 4, 255] for i in range(5): data = struct.unpack('B' * 1, ds.GetRasterBand(i + 1).ReadRaster())[0] assert data == expected_val[i], 'bad checksum' # Wrap onto existing file for i in range(5): ds.GetRasterBand(i + 1).Fill(0) gdal.Warp(ds, src_ds) for i in range(5): data = struct.unpack('B' * 1, ds.GetRasterBand(i + 1).ReadRaster())[0] assert data == expected_val[i], 'bad checksum' src_ds = None ds = None assert gdal.VSIStatL('/vsimem/test_gdalwarp_lib_130_dst.tif.aux.xml') is None, \ 'got PAM file' gdal.Unlink('/vsimem/test_gdalwarp_lib_130.tif') gdal.Unlink('/vsimem/test_gdalwarp_lib_130_dst.tif') ############################################################################### # Test -nosrcalpha def test_gdalwarp_lib_131(): src_ds = gdal.GetDriverByName('GTiff').Create( '/vsimem/test_gdalwarp_lib_131.tif', 1, 1, 2) src_ds.SetGeoTransform([100, 1, 0, 200, 0, -1]) src_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_AlphaBand) src_ds.GetRasterBand(1).Fill(1) src_ds.GetRasterBand(2).Fill(0) ds = gdal.Warp('/vsimem/test_gdalwarp_lib_131_dst.tif', src_ds, options='-nosrcalpha') expected_val = [1, 0] for i in range(2): data = struct.unpack('B' * 1, ds.GetRasterBand(i + 1).ReadRaster())[0] assert data == expected_val[i], 'bad checksum' src_ds = None ds = None gdal.Unlink('/vsimem/test_gdalwarp_lib_131.tif') gdal.Unlink('/vsimem/test_gdalwarp_lib_131_dst.tif') gdal.Unlink('/vsimem/test_gdalwarp_lib_131_dst.tif.aux.xml') ############################################################################### # Test that alpha blending works by warping onto an existing dataset # with alpha > 0 and < 255 def test_gdalwarp_lib_132(): for dt in [gdal.GDT_Byte, gdal.GDT_Float32]: src_ds = gdal.GetDriverByName('GTiff').Create( '/vsimem/test_gdalwarp_lib_132.tif', 33, 1, 2, dt) src_ds.SetGeoTransform([100, 1, 0, 200, 0, -1]) src_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_AlphaBand) ds = gdal.Translate('/vsimem/test_gdalwarp_lib_132_dst.tif', src_ds) dst_grey = 60 dst_alpha = 100 ds.GetRasterBand(1).Fill(dst_grey) ds.GetRasterBand(2).Fill(dst_alpha) src_grey = 170 src_alpha = 200 src_ds.GetRasterBand(1).Fill(src_grey) src_ds.GetRasterBand(2).Fill(src_alpha) gdal.Warp(ds, src_ds) expected_alpha = int(src_alpha + dst_alpha * (255 - src_alpha) / 255. + 0.5) expected_grey = int((src_grey * src_alpha + dst_grey * dst_alpha * (255 - src_alpha) / 255.) / expected_alpha + 0.5) expected_val = [expected_grey, expected_alpha] for i in range(2): for x in range(33): data = struct.unpack('B' * 1, ds.GetRasterBand(i + 1).ReadRaster(i, 0, 1, 1, buf_type=gdal.GDT_Byte))[0] if data != pytest.approx(expected_val[i], abs=1): print(dt) print(x) pytest.fail('bad checksum') ds = None src_ds = None gdal.Unlink('/vsimem/test_gdalwarp_lib_132.tif') gdal.Unlink('/vsimem/test_gdalwarp_lib_132_dst.tif') gdal.Unlink('/vsimem/test_gdalwarp_lib_132_dst.tif.aux.xml') ############################################################################### # Test cutline with multiple touching polygons def test_gdalwarp_lib_133(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/test_gdalwarp_lib_133.shp') lyr = ds.CreateLayer('cutline') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,1 0,1 1,0 1,0 0))')) lyr.CreateFeature(f) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((1 0,2 0,2 1,1 1,1 0))')) lyr.CreateFeature(f) f = None ds = None src_ds = gdal.GetDriverByName('MEM').Create('', 4, 1) src_ds.SetGeoTransform([0, 1, 0, 1, 0, -1]) src_ds.GetRasterBand(1).Fill(255) ds = gdal.Warp('', src_ds, format='MEM', cutlineDSName='/vsimem/test_gdalwarp_lib_133.shp') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 5, 'Bad checksum' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/test_gdalwarp_lib_133.shp') ############################################################################### # Test SRC_METHOD=NO_GEOTRANSFORM and DST_METHOD=NO_GEOTRANSFORM (#6721) def test_gdalwarp_lib_134(): ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/test_gdalwarp_lib_134.shp') lyr = ds.CreateLayer('cutline') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((2 2,2 18,18 18,18 2,2 2))')) lyr.CreateFeature(f) f = None ds = None src_src_ds = gdal.Open('../gcore/data/byte.tif') src_ds = gdal.GetDriverByName('MEM').Create('', 20, 20) src_ds.GetRasterBand(1).WriteRaster(0, 0, 20, 20, src_src_ds.GetRasterBand(1).ReadRaster()) ds = gdal.Warp('', src_ds, format='MEM', transformerOptions=['SRC_METHOD=NO_GEOTRANSFORM', 'DST_METHOD=NO_GEOTRANSFORM'], outputBounds=[1, 2, 4, 6]) assert ds is not None assert ds.GetRasterBand(1).ReadRaster() == src_src_ds.GetRasterBand(1).ReadRaster(1, 2, 4 - 1, 6 - 2), \ 'Bad checksum' ds = None ds = gdal.Warp('', src_ds, format='MEM', transformerOptions=['SRC_METHOD=NO_GEOTRANSFORM', 'DST_METHOD=NO_GEOTRANSFORM'], cutlineDSName='/vsimem/test_gdalwarp_lib_134.shp', cropToCutline=True) assert ds is not None assert ds.GetRasterBand(1).ReadRaster() == src_src_ds.GetRasterBand(1).ReadRaster(2, 2, 16, 16), \ 'Bad checksum' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/test_gdalwarp_lib_134.shp') ############################################################################### # Test vertical datum shift def test_gdalwarp_lib_135(): src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([500000, 1, 0, 4000000, 0, -1]) src_ds.GetRasterBand(1).Fill(100) sr = osr.SpatialReference() sr.SetFromUserInput("WGS84") src_ds_longlat = gdal.GetDriverByName('MEM').Create('', 2, 1) src_ds_longlat.SetProjection(sr.ExportToWkt()) src_ds_longlat.SetGeoTransform([-180, 180, 0, 90, 0, -180]) src_ds_longlat.GetRasterBand(1).Fill(100) grid_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/grid.tif', 1, 1) grid_ds.SetProjection(sr.ExportToWkt()) grid_ds.SetGeoTransform([-180, 360, 0, 90, 0, -180]) grid_ds.GetRasterBand(1).Fill(20) grid_ds = None grid_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/grid2.tif', 1, 1) grid_ds.SetProjection(sr.ExportToWkt()) grid_ds.SetGeoTransform([-180, 360, 0, 90, 0, -180]) grid_ds.GetRasterBand(1).Fill(5) grid_ds = None gdal.GetDriverByName('GTiff').Create('/vsimem/ungeoref_grid.tif', 1, 1) # Forward transform ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' ds = gdal.Warp('', src_ds_longlat, format='MEM', srcSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979') assert ds.GetGeoTransform() == (-180, 180, 0, 90, 0, -180) data = struct.unpack('B' * 2, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' # Inverse transform ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 80, 'Bad value' ds = gdal.Warp('', src_ds_longlat, format='MEM', srcSRS='EPSG:4979', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs') assert ds.GetGeoTransform() == (-180, 180, 0, 90, 0, -180) data = struct.unpack('B' * 2, ds.GetRasterBand(1).ReadRaster())[0] assert data == 80, 'Bad value' # Both transforms ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid2.tif +vunits=m +no_defs') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 115, 'Bad value' # Both transforms, but none of them have geoidgrids ds = gdal.Warp('', src_ds, format='MEM', srcSRS='EPSG:32631+5730', dstSRS='EPSG:4326+5621') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 100, 'Bad value' # Both transforms being a no-op ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 100, 'Bad value' # Both transforms to anonymous VRT ds = gdal.Warp('', src_ds, format='VRT', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid2.tif +vunits=m +no_defs') src_ds = None # drop the ref to src_ds before for fun data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 115, 'Bad value' src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([500000, 1, 0, 4000000, 0, -1]) src_ds.GetRasterBand(1).Fill(100) # Both transforms to regular VRT gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/dem.tif', src_ds) gdal.Warp('/vsimem/tmp.vrt', '/vsimem/dem.tif', format='VRT', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/grid2.tif +vunits=m +no_defs') ds = gdal.Open('/vsimem/tmp.vrt') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] ds = None gdal.Unlink('/vsimem/dem.tif') gdal.Unlink('/vsimem/tmp.vrt') assert data == 115, 'Bad value' # Missing grid in forward path with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=i_dont_exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') assert ds is None # Missing grid in forward path with PROJ_LIB old_proj_lib = os.environ.get('PROJ_LIB', None) os.environ['PROJ_LIB'] = '/i_dont/exist' with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=i_dont_exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') if old_proj_lib: os.environ['PROJ_LIB'] = old_proj_lib else: del os.environ['PROJ_LIB'] assert ds is None # Missing grid in forward path with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=~/i_dont_exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') assert ds is None # Missing grid in forward path with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/i_dont/exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') assert ds is None # Ungeoref grid in forward path with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/ungeoref_grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979') assert ds is None # Missing grid in inverse path with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=i_dont_exist.tif +vunits=m +no_defs') assert ds is None # Ungeoref grid in inverse path with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=/vsimem/ungeoref_grid.tif +vunits=m +no_defs') assert ds is None # Missing grid in forward path, but this is OK ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=@i_dont_exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 100, 'Bad value' # Missing grid in inverse path but this is OK ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs', dstSRS='+proj=longlat +datum=WGS84 +geoidgrids=@i_dont_exist.tif +vunits=m +no_defs') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 100, 'Bad value' # Forward transform with explicit m unit src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([500000, 1, 0, 4000000, 0, -1]) sr = osr.SpatialReference() sr.ImportFromProj4('+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs') src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(100) src_ds.GetRasterBand(1).SetUnitType('m') ds = gdal.Warp('', src_ds, format='MEM', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' # Forward transform with explicit ft unit src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 1, gdal.GDT_Float32) src_ds.SetGeoTransform([500000, 1, 0, 4000000, 0, -1]) sr = osr.SpatialReference() sr.ImportFromProj4('+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs') src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(100 / 0.3048) src_ds.GetRasterBand(1).SetUnitType('ft') ds = gdal.Warp('', src_ds, format='MEM', dstSRS='EPSG:4979', outputType=gdal.GDT_Byte) data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' # Forward transform with explicit unhandled unit src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([500000, 1, 0, 4000000, 0, -1]) sr = osr.SpatialReference() sr.ImportFromProj4('+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif +vunits=m +no_defs') src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(100) src_ds.GetRasterBand(1).SetUnitType('unhandled') with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' grid_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/empty_grid.tif', 1, 1) sr = osr.SpatialReference() sr.SetFromUserInput("WGS84") grid_ds.SetProjection(sr.ExportToWkt()) grid_ds.SetGeoTransform([-180, 360, 0, 90, 0, -180]) grid_ds.GetRasterBand(1).Fill(255) grid_ds.GetRasterBand(1).SetNoDataValue(255) grid_ds = None src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([500000, 1, 0, 4000000, 0, -1]) src_ds.GetRasterBand(1).Fill(100) # Test missing shift values in area of interest ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/empty_grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 100, 'Bad value' # Same, but make it an error with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/empty_grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979', transformerOptions=['ERROR_ON_MISSING_VERT_SHIFT=YES']) if ds is not None: print(data) pytest.fail('Bad value') # Test several grids ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif,/vsimem/empty_grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' # Same, but different order ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/empty_grid.tif,/vsimem/grid.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' # Test several grids, with some missing with gdaltest.error_handler(): ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif,i_dont_exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') if ds is not None: print(data) pytest.fail('Bad value') # Test several grids, with some missing, but that's OK ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=/vsimem/grid.tif,@i_dont_exist.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 120, 'Bad value' # Test several grids, with all missing, but that's OK ds = gdal.Warp('', src_ds, format='MEM', srcSRS='+proj=utm +zone=31 +datum=WGS84 +units=m +geoidgrids=@i_dont_exist.tif,@i_dont_exist_either.tif +vunits=m +no_defs', dstSRS='EPSG:4979') data = struct.unpack('B' * 1, ds.GetRasterBand(1).ReadRaster())[0] assert data == 100, 'Bad value' gdal.GetDriverByName('GTiff').Delete('/vsimem/grid.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/grid2.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/ungeoref_grid.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/empty_grid.tif') ############################################################################### # Test error code path linked with failed warper initialization def test_gdalwarp_lib_136(): with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='MEM', warpOptions=['CUTLINE=invalid']) assert ds is None with gdaltest.error_handler(): ds = gdal.Warp('', '../gcore/data/utmsmall.tif', format='VRT', warpOptions=['CUTLINE=invalid']) assert ds is None ############################################################################### # Test warping two input datasets with different SRS, with no explicit target SRS def test_gdalwarp_lib_several_sources_with_different_srs_no_explicit_target_srs(): src_ds = gdal.Open('../gcore/data/byte.tif') src_ds_32611_left = gdal.Translate('', src_ds, format='MEM', srcWin=[0, 0, 10, 20], outputSRS='EPSG:32611') src_ds_32611_right = gdal.Translate('', src_ds, format='MEM', srcWin=[10, 0, 10, 20], outputSRS='EPSG:32611') src_ds_4326_right = gdal.Warp('', src_ds_32611_right, format='MEM', dstSRS='EPSG:4326') out_ds = gdal.Warp('', [src_ds_4326_right, src_ds_32611_left], format='MEM') assert out_ds is not None assert out_ds.RasterXSize == 23 cs = out_ds.GetRasterBand(1).Checksum() assert cs == 5048 ############################################################################### # Test fix for https://trac.osgeo.org/gdal/ticket/7243 def test_gdalwarp_lib_touching_dateline(): src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100) src_ds.SetGeoTransform([-2050000, 500, 0, 2100000, 0, -500]) sr = osr.SpatialReference() sr.ImportFromEPSG(3411) src_ds.SetProjection(sr.ExportToWkt()) out_ds = gdal.Warp('', src_ds, dstSRS='EPSG:4326', format='MEM') assert out_ds.RasterXSize == 319 ############################################################################### # Test fix for https://trac.osgeo.org/gdal/ticket/7245 def test_gdalwarp_lib_override_default_output_nodata(): drv = gdal.GetDriverByName('netCDF') if drv is None: pytest.skip() creationoptionlist = drv.GetMetadataItem('DMD_CREATIONOPTIONLIST') formats = ['NC'] if 'NC2' in creationoptionlist: formats += ['NC2'] if 'NC4' in creationoptionlist: formats += ['NC4', 'NC4C'] for frmt in formats: gdal.Warp('tmp/out.nc', '../gcore/data/byte.tif', srcNodata=255, format='netCDF', creationOptions=['FORMAT=' + frmt]) ds = gdal.Open('tmp/out.nc') assert ds.GetRasterBand(1).GetNoDataValue() == 255, frmt assert ds.GetProjection() != '', frmt ds = None os.unlink('tmp/out.nc') ############################################################################### # Test automatting setting (or not) of SKIP_NOSOURCE=YES def test_gdalwarp_lib_auto_skip_nosource(): sr = osr.SpatialReference() sr.ImportFromEPSG(4326) src_ds = gdal.GetDriverByName('MEM').Create('', 1000, 500) src_ds.GetRasterBand(1).Fill(255) src_ds.SetGeoTransform([2, 0.001, 0, 49, 0, -0.001]) src_ds.SetProjection(sr.ExportToWkt()) tmpfilename = '/vsimem/test_gdalwarp_lib_auto_skip_nosource.tif' for options in ['-wo SKIP_NOSOURCE=NO', '', '-wo INIT_DEST=0', '-wo INIT_DEST=NO_DATA', '-dstnodata 0']: gdal.Unlink(tmpfilename) out_ds = gdal.Warp(tmpfilename, src_ds, options='-te 1.5 48 3.5 49.5 -wm 100000 ' + '-of GTiff ' + options) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 41500, (options, cs) # Same with MEM for options in ['', '-wo INIT_DEST=0', '-dstnodata 0']: gdal.Unlink(tmpfilename) out_ds = gdal.Warp(tmpfilename, src_ds, options='-te 1.5 48 3.5 49.5 -wm 100000 ' + '-of MEM ' + options) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 41500, (options, cs) # Use fill/nodata at 1 for options in [ # '-wo SKIP_NOSOURCE=NO -dstnodata 1', '-dstnodata 1', '-dstnodata 1 -wo INIT_DEST=NO_DATA', '-dstnodata 1 -wo INIT_DEST=1']: gdal.Unlink(tmpfilename) out_ds = gdal.Warp(tmpfilename, src_ds, options='-te 1.5 48 3.5 49.5 -wm 100000 ' + '-of GTiff ' + options) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 51132, (options, cs) # Same with MEM for options in [ # '-wo SKIP_NOSOURCE=NO -dstnodata 1', '-dstnodata 1', '-dstnodata 1 -wo INIT_DEST=NO_DATA', '-dstnodata 1 -wo INIT_DEST=1']: gdal.Unlink(tmpfilename) out_ds = gdal.Warp(tmpfilename, src_ds, options='-te 1.5 48 3.5 49.5 -wm 100000 ' + '-of MEM ' + options) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 51132, (options, cs) # Rather dummy: use a INIT_DEST different of the target dstnodata for options in [ # '-wo SKIP_NOSOURCE=NO -dstnodata 1 -wo INIT_DEST=0', '-dstnodata 127 -wo INIT_DEST=0']: gdal.Unlink(tmpfilename) out_ds = gdal.Warp(tmpfilename, src_ds, options='-te 1.5 48 3.5 49.5 -wm 100000 ' + '-of GTiff ' + options) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 41500, (options, cs) # Test with 2 input datasets src_ds1 = gdal.GetDriverByName('MEM').Create('', 500, 500) src_ds1.GetRasterBand(1).Fill(255) src_ds1.SetGeoTransform([2, 0.001, 0, 49, 0, -0.001]) src_ds1.SetProjection(sr.ExportToWkt()) src_ds2 = gdal.GetDriverByName('MEM').Create('', 500, 500) src_ds2.GetRasterBand(1).Fill(255) src_ds2.SetGeoTransform([2.5, 0.001, 0, 49, 0, -0.001]) src_ds2.SetProjection(sr.ExportToWkt()) for options in ['']: gdal.Unlink(tmpfilename) out_ds = gdal.Warp(tmpfilename, [src_ds1, src_ds2], options='-te 1.5 48 3.5 49.5 -wm 100000 ' + '-of GTiff ' + options) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 41500, (options, cs) gdal.Unlink(tmpfilename) ############################################################################### # Test warping a full EPSG:4326 extent to +proj=ortho # (https://github.com/OSGeo/gdal/issues/862) def test_gdalwarp_lib_to_ortho(): out_ds = gdal.Warp("/tmp/out.tif", "../gdrivers/data/small_world.tif", options='-of MEM -t_srs "+proj=ortho +datum=WGS84" -ts 1024 1024') line = out_ds.GetRasterBand(1).ReadRaster(0, 0, out_ds.RasterXSize, 1) line = struct.unpack('B' * out_ds.RasterXSize, line) # Fail if the first line is completely black assert line.count(0) != out_ds.RasterXSize, 'first line is completely black' line = out_ds.GetRasterBand(1).ReadRaster(0, out_ds.RasterYSize - 1, out_ds.RasterXSize, 1) line = struct.unpack('B' * out_ds.RasterXSize, line) # Fail if the last line is completely black assert line.count(0) != out_ds.RasterXSize, 'last line is completely black' ############################################################################### def test_gdalwarp_lib_insufficient_dst_band_count(): src_ds = gdal.Translate('', '../gcore/data/byte.tif', options='-of MEM -b 1 -b 1') dst_ds = gdal.Translate('', '../gcore/data/byte.tif', options='-of MEM') with gdaltest.error_handler(): assert gdal.Warp(dst_ds, src_ds) == 0 ############################################################################### # Test -ct def test_gdalwarp_lib_ct(): dstDS = gdal.Warp('', '../gcore/data/byte.tif', options = '-r cubic -f MEM -t_srs EPSG:4326 -ct "proj=pipeline step inv proj=utm zone=11 ellps=clrk66 step proj=unitconvert xy_in=rad xy_out=deg step proj=axisswap order=2,1"') assert dstDS.GetRasterBand(1).Checksum() == 4705, 'Bad checksum' def test_gdalwarp_lib_ct_wkt(): wkt = """CONCATENATEDOPERATION["Inverse of UTM zone 11N + Null geographic offset from NAD27 to WGS 84", SOURCECRS[ PROJCRS["NAD27 / UTM zone 11N", BASEGEOGCRS["NAD27", DATUM["North American Datum 1927", ELLIPSOID["Clarke 1866",6378206.4,294.978698213898, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]]], CONVERSION["UTM zone 11N", METHOD["Transverse Mercator", ID["EPSG",9807]], PARAMETER["Latitude of natural origin",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8801]], PARAMETER["Longitude of natural origin",-117, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8802]], PARAMETER["Scale factor at natural origin",0.9996, SCALEUNIT["unity",1], ID["EPSG",8805]], PARAMETER["False easting",500000, LENGTHUNIT["metre",1], ID["EPSG",8806]], PARAMETER["False northing",0, LENGTHUNIT["metre",1], ID["EPSG",8807]]], CS[Cartesian,2], AXIS["(E)",east, ORDER[1], LENGTHUNIT["metre",1]], AXIS["(N)",north, ORDER[2], LENGTHUNIT["metre",1]], USAGE[ SCOPE["unknown"], AREA["North America - 120°W to 114°W and NAD27 by country - onshore"], BBOX[26.93,-120,78.13,-114]], ID["EPSG",26711]]], TARGETCRS[ GEOGCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], USAGE[ SCOPE["unknown"], AREA["World"], BBOX[-90,-180,90,180]], ID["EPSG",4326]]], STEP[ CONVERSION["Inverse of UTM zone 11N", METHOD["Inverse of Transverse Mercator", ID["INVERSE(EPSG)",9807]], PARAMETER["Latitude of natural origin",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8801]], PARAMETER["Longitude of natural origin",-117, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8802]], PARAMETER["Scale factor at natural origin",0.9996, SCALEUNIT["unity",1], ID["EPSG",8805]], PARAMETER["False easting",500000, LENGTHUNIT["metre",1], ID["EPSG",8806]], PARAMETER["False northing",0, LENGTHUNIT["metre",1], ID["EPSG",8807]], ID["INVERSE(EPSG)",16011]]], STEP[ COORDINATEOPERATION["Null geographic offset from NAD27 to WGS 84", SOURCECRS[ GEOGCRS["NAD27", DATUM["North American Datum 1927", ELLIPSOID["Clarke 1866",6378206.4,294.978698213898, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], USAGE[ SCOPE["unknown"], AREA["North America - NAD27"], BBOX[7.15,167.65,83.17,-47.74]], ID["EPSG",4267]]], TARGETCRS[ GEOGCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563, LENGTHUNIT["metre",1]]], PRIMEM["Greenwich",0, ANGLEUNIT["degree",0.0174532925199433]], CS[ellipsoidal,2], AXIS["geodetic latitude (Lat)",north, ORDER[1], ANGLEUNIT["degree",0.0174532925199433]], AXIS["geodetic longitude (Lon)",east, ORDER[2], ANGLEUNIT["degree",0.0174532925199433]], USAGE[ SCOPE["unknown"], AREA["World"], BBOX[-90,-180,90,180]], ID["EPSG",4326]]], METHOD["Geographic2D offsets", ID["EPSG",9619]], PARAMETER["Latitude offset",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8601]], PARAMETER["Longitude offset",0, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8602]], USAGE[ SCOPE["unknown"], AREA["World"], BBOX[-90,-180,90,180]]]], USAGE[ SCOPE["unknown"], AREA["World"], BBOX[-90,-180,90,180]]]""" dstDS = gdal.Warp('', '../gcore/data/byte.tif', resampleAlg=gdal.GRIORA_Cubic, format='MEM', dstSRS='EPSG:4326', coordinateOperation=wkt) assert dstDS.GetRasterBand(1).Checksum() == 4705, 'Bad checksum' ############################################################################### # Test warping from a RPC dataset to a new dataset larger than needed def test_gdalwarp_lib_restrict_output_dataset_warp_rpc_new(): dstDS = gdal.Warp('', 'data/unstable_rpc_with_dem_source.tif', options = '-f MEM -et 0 -to RPC_DEM=data/unstable_rpc_with_dem_elevation.tif -to RPC_MAX_ITERATIONS=40 -to RPC_DEM_MISSING_VALUE=0 -t_srs EPSG:3857 -te 12693400.445 2547311.740 12700666.740 2553269.051 -ts 380 311') cs = dstDS.GetRasterBand(1).Checksum() assert cs == 53230 with gdaltest.config_option('RESTRICT_OUTPUT_DATASET_UPDATE', 'NO'): dstDS = gdal.Warp('', 'data/unstable_rpc_with_dem_source.tif', options = '-f MEM -et 0 -to RPC_DEM=data/unstable_rpc_with_dem_elevation.tif -to RPC_MAX_ITERATIONS=40 -to RPC_DEM_MISSING_VALUE=0 -t_srs EPSG:3857 -te 12693400.445 2547311.740 12700666.740 2553269.051 -ts 380 311') cs = dstDS.GetRasterBand(1).Checksum() assert cs != 53230 ############################################################################### # Test warping from a RPC dataset to an existing dataset def test_gdalwarp_lib_restrict_output_dataset_warp_rpc_existing(): dstDS = gdal.Translate('', 'data/unstable_rpc_with_dem_blank_output.tif', format = 'MEM') gdal.Warp(dstDS, 'data/unstable_rpc_with_dem_source.tif', options = '-et 0 -to RPC_DEM=data/unstable_rpc_with_dem_elevation.tif -to RPC_MAX_ITERATIONS=40 -to RPC_DEM_MISSING_VALUE=0') cs = dstDS.GetRasterBand(1).Checksum() assert cs == 53230 ############################################################################### # Test warping from a RPC dataset to an existing dataset, with using RPC_FOOTPRINT def test_gdalwarp_lib_restrict_output_dataset_warp_rpc_existing_RPC_FOOTPRINT(): if not ogrtest.have_geos(): pytest.skip() with gdaltest.config_option('RESTRICT_OUTPUT_DATASET_UPDATE', 'NO'): dstDS = gdal.Translate('', 'data/unstable_rpc_with_dem_blank_output.tif', format = 'MEM') gdal.Warp(dstDS, 'data/unstable_rpc_with_dem_source.tif', options = '-et 0 -to RPC_DEM=data/unstable_rpc_with_dem_elevation.tif -to RPC_MAX_ITERATIONS=40 -to RPC_DEM_MISSING_VALUE=0 -to "RPC_FOOTPRINT=POLYGON ((114.070906445526 22.329620213341,114.085953272341 22.3088955493586,114.075520805749 22.3027084861851,114.060942102434 22.3236815197571,114.060942102434 22.3236815197571,114.060942102434 22.3236815197571,114.060942102434 22.3236815197571,114.070906445526 22.329620213341))"') cs = dstDS.GetRasterBand(1).Checksum() assert cs == 53230 ############################################################################### # Test warping from EPSG:4326 to EPSG:3857 def test_gdalwarp_lib_bug_4326_to_3857(): ds = gdal.Warp('', 'data/test_bug_4326_to_3857.tif', options = '-f MEM -t_srs EPSG:3857 -ts 20 20') cs = ds.GetRasterBand(1).Checksum() assert cs == 4672 ############################################################################### # Test warping of single source to COG def test_gdalwarp_lib_to_cog(): tmpfilename = '/vsimem/cog.tif' ds = gdal.Warp(tmpfilename, '../gcore/data/byte.tif', options = '-f COG -t_srs EPSG:3857 -ts 20 20') assert ds.RasterCount == 1 assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test warping of single source to COG with reprojection options def test_gdalwarp_lib_to_cog_reprojection_options(): tmpfilename = '/vsimem/cog.tif' ds = gdal.Warp(tmpfilename, '../gcore/data/byte.tif', options = '-f COG -co TILING_SCHEME=GoogleMapsCompatible') assert ds.RasterCount == 2 assert ds.GetRasterBand(1).Checksum() in (4187, 4300) # 4300 on Mac assert ds.GetRasterBand(2).Checksum() == 4415 ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test warping of multiple source, compatible of BuildVRT mosaicing, to COG def test_gdalwarp_lib_multiple_source_compatible_buildvrt_to_cog(): tmpfilename = '/vsimem/cog.tif' left_ds = gdal.Translate('/vsimem/left.tif', '../gcore/data/byte.tif', options='-srcwin 0 0 10 20') right_ds = gdal.Translate('/vsimem/right.tif', '../gcore/data/byte.tif', options='-srcwin 10 0 10 20') ds = gdal.Warp(tmpfilename, [left_ds, right_ds], options = '-f COG') assert ds.RasterCount == 1 assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdal.Unlink(tmpfilename) gdal.Unlink('/vsimem/left.tif') gdal.Unlink('/vsimem/right.tif') ############################################################################### # Test warping of multiple source, compatible of BuildVRT mosaicing, to COG, # with reprojection options def test_gdalwarp_lib_multiple_source_compatible_buildvrt_to_cog_reprojection_options(): tmpfilename = '/vsimem/cog.tif' left_ds = gdal.Translate('/vsimem/left.tif', '../gcore/data/byte.tif', options='-srcwin 0 0 10 20') right_ds = gdal.Translate('/vsimem/right.tif', '../gcore/data/byte.tif', options='-srcwin 10 0 10 20') ds = gdal.Warp(tmpfilename, [left_ds, right_ds], options = '-f COG -co TILING_SCHEME=GoogleMapsCompatible') assert ds.RasterCount == 2 assert ds.GetRasterBand(1).Checksum() in (4187, 4300) # 4300 on Mac assert ds.GetRasterBand(2).Checksum() == 4415 ds = None gdal.Unlink(tmpfilename) gdal.Unlink('/vsimem/left.tif') gdal.Unlink('/vsimem/right.tif') ############################################################################### # Test warping of multiple source, incompatible of BuildVRT mosaicing, to COG def test_gdalwarp_lib_multiple_source_incompatible_buildvrt_to_cog(): tmpfilename = '/vsimem/cog.tif' left_ds = gdal.Translate('/vsimem/left.tif', '../gcore/data/byte.tif', options='-srcwin 0 0 15 20 -b 1 -b 1 -colorinterp_2 alpha -scale_2 0 255 255 255') right_ds = gdal.Translate('/vsimem/right.tif', '../gcore/data/byte.tif', options='-srcwin 5 0 15 20 -b 1 -b 1 -colorinterp_2 alpha -scale_2 0 255 255 255') ds = gdal.Warp(tmpfilename, [left_ds, right_ds], options = '-f COG') assert ds.RasterCount == 2 assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetRasterBand(2).Checksum() == 4873 ds = None gdal.Unlink(tmpfilename) gdal.Unlink('/vsimem/left.tif') gdal.Unlink('/vsimem/right.tif') ############################################################################### # Test warping of multiple source, incompatible of BuildVRT mosaicing, to COG, # with reprojection options def test_gdalwarp_lib_multiple_source_incompatible_buildvrt_to_cog_reprojection_options(): tmpfilename = '/vsimem/cog.tif' left_ds = gdal.Translate('/vsimem/left.tif', '../gcore/data/byte.tif', options='-srcwin 0 0 15 20 -b 1 -b 1 -colorinterp_2 alpha -scale_2 0 255 255 255') right_ds = gdal.Translate('/vsimem/right.tif', '../gcore/data/byte.tif', options='-srcwin 5 0 15 20 -b 1 -b 1 -colorinterp_2 alpha -scale_2 0 255 255 255') ds = gdal.Warp(tmpfilename, [left_ds, right_ds], options = '-f COG -co TILING_SCHEME=GoogleMapsCompatible') assert ds.RasterCount == 2 assert ds.GetRasterBand(1).Checksum() in (4207, 4315) # 4300 on Mac assert ds.GetRasterBand(2).Checksum() == 4415 ds = None gdal.Unlink(tmpfilename) gdal.Unlink('/vsimem/left.tif') gdal.Unlink('/vsimem/right.tif') ############################################################################### def test_gdalwarp_lib_no_crs(): src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) out_ds = gdal.Warp('', src_ds, options = '-of MEM -ct "+proj=unitconvert +xy_in=1 +xy_out=2"') assert out_ds.GetGeoTransform() == (0.0, 5.0, 0.0, 0.0, 0.0, -5.0) ############################################################################### # Cleanup def test_gdalwarp_lib_cleanup(): # We don't clean up when run in debug mode. if gdal.GetConfigOption('CPL_DEBUG', 'OFF') == 'ON': return for i in range(2): try: os.remove('tmp/testgdalwarp' + str(i + 1) + '.tif') except OSError: pass try: os.remove('tmp/testgdalwarp_gcp.tif') except OSError: pass gdalautotest-3.1.2/utilities/test_gdalmdimtranslate_lib.py0000775000175000017500000007213713701060014022646 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalmdimtranslate_lib.py 44649e0d7520d3f687c57eb818699767515d3230 2019-09-02 23:52:42 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: test librarified gdalmdimtranslate # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import struct from osgeo import gdal ############################################################################### def test_gdalmdimtranslate_no_arg(): tmpfile = '/vsimem/out.vrt' assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt') assert gdal.MultiDimInfo(tmpfile) == gdal.MultiDimInfo('data/mdim.vrt') gdal.Unlink(tmpfile) ############################################################################### def test_gdalmdimtranslate_multidim_to_mem(): out_ds = gdal.MultiDimTranslate('', 'data/mdim.vrt', format = 'MEM') assert out_ds rg = out_ds.GetRootGroup() assert rg ar = rg.OpenMDArray('time_increasing') assert ar assert ar.Read() == ['2010-01-01', '2011-01-01', '2012-01-01', '2013-01-01'] ############################################################################### def test_gdalmdimtranslate_multidim_to_classic(): tmpfile = '/vsimem/out.tif' with gdaltest.error_handler(): assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt') assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['/my_subgroup/array_in_subgroup']) gdal.Unlink(tmpfile) ############################################################################### def test_gdalmdimtranslate_multidim_1d_to_classic(): tmpfile = '/vsimem/out.tif' assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['latitude']) ds = gdal.Open(tmpfile) band = ds.GetRasterBand(1) data = band.ReadRaster() assert len(data) == 10 * 4 assert struct.unpack('f' * 10, data)[0] == 90.0 ds = None gdal.Unlink(tmpfile) ############################################################################### def test_gdalmdimtranslate_classic_to_classic(): tmpfile = '/vsimem/out.tif' ds = gdal.MultiDimTranslate(tmpfile, '../gcore/data/byte.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdal.Unlink(tmpfile) ############################################################################### def test_gdalmdimtranslate_classic_to_multidim(): tmpfile = '/vsimem/out.vrt' tmpgtifffile = '/vsimem/tmp.tif' ds = gdal.Translate(tmpgtifffile, '../gcore/data/byte.tif') ds.SetSpatialRef(None) ds = None assert gdal.MultiDimTranslate(tmpfile, tmpgtifffile, arraySpecs = ['band=1,dstname=ar,view=[newaxis,...]']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('utf-8') gdal.VSIFCloseL(f) #print(got_data) gdal.Unlink(tmpfile) gdal.Unlink(tmpgtifffile) assert got_data == """ Float64 Float64 Byte tmp.tif 1 [newaxis,...] """ ############################################################################### def test_gdalmdimtranslate_array(): tmpfile = '/vsimem/out.vrt' with gdaltest.error_handler(): assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['not_existing']) assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['name=my_variable_with_time_increasing,unknown_opt=foo']) assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['my_variable_with_time_increasing']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data) gdal.Unlink(tmpfile) assert got_data == """ Float32 data/mdim.vrt /latitude Float32 data/mdim.vrt /longitude Int32 data/mdim.vrt /my_variable_with_time_increasing String data/mdim.vrt /time_increasing """ ############################################################################### def test_gdalmdimtranslate_array_with_transpose_and_view(): tmpfile = '/vsimem/out.vrt' assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['name=my_variable_with_time_increasing,dstname=foo,transpose=[1,2,0],view=[::-1,1,...]']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data) gdal.Unlink(tmpfile) assert got_data == """ Int32 data/mdim.vrt /my_variable_with_time_increasing 1,2,0 [::-1,1,...] Int32 1 Float32 2.5 Float32 data/mdim.vrt /latitude [::-1] String data/mdim.vrt /time_increasing """ ############################################################################### def test_gdalmdimtranslate_group(): tmpfile = '/vsimem/out.vrt' with gdaltest.error_handler(): assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', groupSpecs = ['not_existing']) assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', groupSpecs = ['name=my_subgroup,unknown_opt=foo']) assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', groupSpecs = ['my_subgroup']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data) gdal.Unlink(tmpfile) assert got_data == """ Int32 data/mdim.vrt /my_subgroup/array_in_subgroup Float32 data/mdim.vrt /latitude Float32 data/mdim.vrt /longitude """ ############################################################################### def test_gdalmdimtranslate_two_groups(): tmpfile = '/vsimem/out.vrt' assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', groupSpecs = ['my_subgroup', 'name=other_subgroup,dstname=renamed']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data) gdal.Unlink(tmpfile) assert got_data == """ Int32 data/mdim.vrt /my_subgroup/array_in_subgroup Float32 data/mdim.vrt /latitude Float32 data/mdim.vrt /longitude String bar """ ############################################################################### def test_gdalmdimtranslate_subset(): tmpfile = '/vsimem/out.vrt' with gdaltest.error_handler(): assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', subsetSpecs = ['latitude(']) assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', subsetSpecs = ['latitude(1']) assert not gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', subsetSpecs = ['latitude(1,2,3)']) for subset_spec, success, expected_view in [ # Increasing numeric variable ('longitude(-180,-0.01)', False, None), # All below min ('longitude(-180)', False, None), ('longitude(22.51,100)', False, None), # All above max ('longitude(22.51)', False, None), ('longitude(-0.01,22.51)', True, None), # Encompassing whole range ('longitude(0,22.5)', True, None), # Exact range ('longitude(0)', True, '[0]'), ('longitude(2.5)', True, '[1]'), ('longitude(20)', True, '[8]'), ('longitude(22.5)', True, '[9]'), ('longitude(0,0)', True, '[0:1:1]'), ('longitude(-0.01,0.01)', True, '[0:1:1]'), ('longitude(0,0.01)', True, '[0:1:1]'), ('longitude(-0.01,0)', True, '[0:1:1]'), ('longitude(-0.01,22.49)', True, '[0:9:1]'), ('longitude(0.01,22.49)', True, '[1:9:1]'), ('longitude(0.01,22.51)', True, '[1:10:1]'), ('longitude(22.5,22.5)', True, '[9:10:1]'), ('longitude(22.49,22.5)', True, '[9:10:1]'), ('longitude(22.49,22.51)', True, '[9:10:1]'), ('longitude(22.5,22.51)', True, '[9:10:1]'), # Decreasing numeric variable ('latitude(-180,67.49)', False, None), # All below min ('latitude(-180)', False, None), ('latitude(90.01,100)', False, None), # All above max ('latitude(90.01)', False, None), ('latitude(64.49,90.01)', True, None), # Encompassing whole range ('latitude(67.5,90)', True, None), # Exact range ('latitude(67.5)', True, '[9]'), ('latitude(70)', True, '[8]'), ('latitude(87.5)', True, '[1]'), ('latitude(90)', True, '[0]'), ('latitude(70,87.5)', True, '[1:9:1]'), ('latitude(90,90)', True, '[0:1:1]'), ('latitude(89.99,90)', True, '[0:1:1]'), ('latitude(90,90.01)', True, '[0:1:1]'), ('latitude(67.5,67.5)', True, '[9:10:1]'), ('latitude(67.5,67.51)', True, '[9:10:1]'), ('latitude(67.49,67.5)', True, '[9:10:1]'), # Increasing string variable ('time_increasing("2008-01-01","2009-01-01")', False, None), # All below min ('time_increasing("2008-01-01")', False, None), ('time_increasing("2014-01-01","2016-01-01")', False, None), # All above max ('time_increasing("2014-01-01")', False, None), ('time_increasing("2009-01-01","2014-01-01")', True, None), # Encompassing whole range ('time_increasing("2010-01-01","2013-01-01")', True, None), # Exact range ('time_increasing("2010-01-01")', True, "[0]"), ('time_increasing("2011-01-01")', True, "[1]"), ('time_increasing("2012-01-01")', True, "[2]"), ('time_increasing("2013-01-01")', True, "[3]"), ('time_increasing("2009-12-31","2010-01-02")', True, "[0:1:1]"), ('time_increasing("2009-12-13","2010-01-01")', True, "[0:1:1]"), ('time_increasing("2010-01-01","2010-01-01")', True, "[0:1:1]"), ('time_increasing("2010-01-01","2010-01-02")', True, "[0:1:1]"), ('time_increasing("2011-01-01","2012-01-01")', True, "[1:3:1]"), ('time_increasing("2012-12-31","2013-01-02")', True, "[3:4:1]"), ('time_increasing("2012-12-13","2013-01-01")', True, "[3:4:1]"), ('time_increasing("2013-01-01","2013-01-01")', True, "[3:4:1]"), ('time_increasing("2013-01-01","2013-01-02")', True, "[3:4:1]"), # Decreasing string variable ('time_decreasing("2008-01-01","2009-01-01")', False, None), # All below min ('time_decreasing("2008-01-01")', False, None), ('time_decreasing("2014-01-01","2016-01-01")', False, None), # All above max ('time_decreasing("2014-01-01")', False, None), ('time_decreasing("2009-01-01","2014-01-01")', True, None), # Encompassing whole range ('time_decreasing("2010-01-01","2013-01-01")', True, None), # Exact range ('time_decreasing("2010-01-01")', True, "[3]"), ('time_decreasing("2011-01-01")', True, "[2]"), ('time_decreasing("2012-01-01")', True, "[1]"), ('time_decreasing("2013-01-01")', True, "[0]"), ('time_decreasing("2009-12-31","2010-01-02")', True, "[3:4:1]"), ('time_decreasing("2009-12-13","2010-01-01")', True, "[3:4:1]"), ('time_decreasing("2010-01-01","2010-01-01")', True, "[3:4:1]"), ('time_decreasing("2010-01-01","2010-01-02")', True, "[3:4:1]"), ('time_decreasing("2011-01-01","2012-01-01")', True, "[1:3:1]"), ('time_decreasing("2012-12-31","2013-01-02")', True, "[0:1:1]"), ('time_decreasing("2012-12-13","2013-01-01")', True, "[0:1:1]"), ('time_decreasing("2013-01-01","2013-01-01")', True, "[0:1:1]"), ('time_decreasing("2013-01-01","2013-01-02")', True, "[0:1:1]"), ]: with gdaltest.error_handler(): res = gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = [subset_spec[0:subset_spec.find('(')]], subsetSpecs = [subset_spec]) is not None assert res == success, subset_spec if not success: continue f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data)/ gdal.Unlink(tmpfile) if expected_view: assert expected_view in got_data, subset_spec else: assert 'SourceView' not in got_data, subset_spec assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', subsetSpecs = ['latitude(70,87.5)', 'time_increasing("2012-01-01")']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data) gdal.Unlink(tmpfile) assert got_data == """ Float32 data/mdim.vrt /latitude [1:9:1] Float32 data/mdim.vrt /longitude Int32 data/mdim.vrt /my_variable_with_time_decreasing [:,1:9:1,:] Int32 data/mdim.vrt /my_variable_with_time_increasing [2,1:9:1,:] Int32 2 String 2012-01-01 String data/mdim.vrt /time_decreasing String data/mdim.vrt /time_increasing [2] Int32 2 String 2012-01-01 Int32 data/mdim.vrt /my_subgroup/array_in_subgroup [1:9:1,:] String bar """ ############################################################################### def test_gdalmdimtranslate_scaleaxes(): tmpfile = '/vsimem/out.vrt' assert gdal.MultiDimTranslate(tmpfile, 'data/mdim.vrt', arraySpecs = ['my_variable_with_time_increasing'], scaleAxesSpecs = ['longitude(2)']) f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) # print(got_data) gdal.Unlink(tmpfile) assert got_data == """ Float32 data/mdim.vrt /latitude Float32 data/mdim.vrt /longitude [0:10:2] Int32 data/mdim.vrt /my_variable_with_time_increasing [:,:,0:10:2] String data/mdim.vrt /time_increasing """ def test_gdalmdimtranslate_dims_with_same_name_different_size(): srcfile = '/vsimem/in.vrt' gdal.FileFromMemBuffer(srcfile, """ Float64 Float64 """) tmpfile = '/vsimem/test.vrt' gdal.MultiDimTranslate(tmpfile, srcfile, groupSpecs = [ '/' ], format = 'VRT') f = gdal.VSIFOpenL(tmpfile, 'rb') got_data = gdal.VSIFReadL(1, 10000, f).decode('ascii') gdal.VSIFCloseL(f) #print(got_data) assert got_data == """ Float64 in.vrt /X Float64 in.vrt /Y """ gdal.Unlink(tmpfile) gdal.Unlink(srcfile) def XXXX_test_all(): while True: test_gdalmdimtranslate_no_arg() test_gdalmdimtranslate_multidim_to_classic() test_gdalmdimtranslate_classic_to_classic() test_gdalmdimtranslate_classic_to_multidim() test_gdalmdimtranslate_array() test_gdalmdimtranslate_array_with_transpose_and_view() test_gdalmdimtranslate_group() test_gdalmdimtranslate_two_groups() test_gdalmdimtranslate_subset() test_gdalmdimtranslate_scaleaxes() gdalautotest-3.1.2/utilities/test_gdal_rasterize.py0000775000175000017500000003311713701060014021316 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_rasterize.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_rasterize testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2013, Even Rouault # Copyright (c) 2008, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import pytest sys.path.append('../gcore') from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest import test_cli_utilities ############################################################################### # Simple polygon rasterization (adapted from alg/rasterize.py). def test_gdal_rasterize_1(): if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() # Setup working spatial reference # sr_wkt = 'LOCAL_CS["arbitrary"]' # sr = osr.SpatialReference( sr_wkt ) sr = osr.SpatialReference() sr.ImportFromEPSG(32631) sr_wkt = sr.ExportToWkt() # Create a raster to rasterize into. target_ds = gdal.GetDriverByName('GTiff').Create('tmp/rast1.tif', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Close TIF file target_ds = None # Create a layer to rasterize from. rast_ogr_ds = \ ogr.GetDriverByName('MapInfo File').CreateDataSource('tmp/rast1.tab') rast_lyr = rast_ogr_ds.CreateLayer('rast1', srs=sr) rast_lyr.GetLayerDefn() field_defn = ogr.FieldDefn('foo') rast_lyr.CreateField(field_defn) # Add a polygon. wkt_geom = 'POLYGON((1020 1030,1020 1045,1050 1045,1050 1030,1020 1030))' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) # Add feature without geometry to test fix for #3310 feat = ogr.Feature(rast_lyr.GetLayerDefn()) rast_lyr.CreateFeature(feat) # Add a linestring. wkt_geom = 'LINESTRING(1000 1000, 1100 1050)' feat = ogr.Feature(rast_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_lyr.CreateFeature(feat) # Close file rast_ogr_ds.Destroy() # Run the algorithm. (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_rasterize_path() + ' -b 3 -b 2 -b 1 -burn 200 -burn 220 -burn 240 -l rast1 tmp/rast1.tab tmp/rast1.tif') assert (err is None or err == ''), 'got error/warning' # Check results. target_ds = gdal.Open('tmp/rast1.tif') expected = 6452 checksum = target_ds.GetRasterBand(2).Checksum() assert checksum == expected, 'Did not get expected image checksum' target_ds = None ############################################################################### # Test rasterization with ALL_TOUCHED (adapted from alg/rasterize.py). def test_gdal_rasterize_2(): if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() # Create a raster to rasterize into. target_ds = gdal.GetDriverByName('GTiff').Create('tmp/rast2.tif', 12, 12, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((0, 1, 0, 12, 0, -1)) # Close TIF file target_ds = None # Run the algorithm. gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' -at -b 3 -b 2 -b 1 -burn 200 -burn 220 -burn 240 -l cutline ../alg/data/cutline.csv tmp/rast2.tif') # Check results. target_ds = gdal.Open('tmp/rast2.tif') expected = 121 checksum = target_ds.GetRasterBand(2).Checksum() assert checksum == expected, 'Did not get expected image checksum' target_ds = None ############################################################################### # Test creating an output file def test_gdal_rasterize_3(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_contour_path() + ' ../gdrivers/data/n43.dt0 tmp/n43dt0.shp -i 10 -3d') gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' -3d tmp/n43dt0.shp tmp/n43dt0.tif -l n43dt0 -ts 121 121 -a_nodata 0 -q') ds_ref = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43dt0.tif') assert ds.GetRasterBand(1).GetNoDataValue() == 0.0, \ 'did not get expected nodata value' assert ds.RasterXSize == 121 and ds.RasterYSize == 121, \ 'did not get expected dimensions' gt_ref = ds_ref.GetGeoTransform() gt = ds.GetGeoTransform() for i in range(6): assert gt[i] == pytest.approx(gt_ref[i], abs=1e-6), 'did not get expected geotransform' wkt = ds.GetProjectionRef() assert wkt.find("WGS_1984") != -1, 'did not get expected SRS' ############################################################################### # Same but with -tr argument def test_gdal_rasterize_4(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() gdal.GetDriverByName('GTiff').Delete('tmp/n43dt0.tif') gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' -3d tmp/n43dt0.shp tmp/n43dt0.tif -l n43dt0 -tr 0.008333333333333 0.008333333333333 -a_nodata 0 -a_srs EPSG:4326') ds_ref = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43dt0.tif') assert ds.GetRasterBand(1).GetNoDataValue() == 0.0, \ 'did not get expected nodata value' # Allow output to grow by 1/2 cell, as per #6058 assert ds.RasterXSize == 122 and ds.RasterYSize == 122, \ 'did not get expected dimensions' gt_ref = ds_ref.GetGeoTransform() gt = ds.GetGeoTransform() assert gt[1] == pytest.approx(gt_ref[1], abs=1e-6) and gt[5] == pytest.approx(gt_ref[5], abs=1e-6), \ 'did not get expected geotransform(dx/dy)' # Allow output to grow by 1/2 cell, as per #6058 assert (abs(gt[0] + (gt[1] / 2) - gt_ref[0]) <= 1e-6 and \ abs(gt[3] + (gt[5] / 2) - gt_ref[3]) <= 1e-6), \ 'did not get expected geotransform' wkt = ds.GetProjectionRef() assert wkt.find("WGS_1984") != -1, 'did not get expected SRS' ############################################################################### # Test point rasterization (#3774) def test_gdal_rasterize_5(): if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() f = open('tmp/test_gdal_rasterize_5.csv', 'wb') f.write("""x,y,Value 0.5,0.5,1 0.5,2.5,2 2.5,2.5,3 2.5,0.5,4 1.5,1.5,5""".encode('ascii')) f.close() f = open('tmp/test_gdal_rasterize_5.vrt', 'wb') f.write(""" test_gdal_rasterize_5.csv test_gdal_rasterize_5 wkbPoint """.encode('ascii')) f.close() gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' -l test tmp/test_gdal_rasterize_5.vrt tmp/test_gdal_rasterize_5.tif -a Value -tr 1 1 -ot Byte') ds = gdal.Open('tmp/test_gdal_rasterize_5.tif') assert ds.RasterXSize == 3 and ds.RasterYSize == 3, \ 'did not get expected dimensions' gt_ref = [0, 1, 0, 3, 0, -1] gt = ds.GetGeoTransform() for i in range(6): assert gt[i] == pytest.approx(gt_ref[i], abs=1e-6), 'did not get expected geotransform' data = ds.GetRasterBand(1).ReadRaster(0, 0, 3, 3) assert data.decode('iso-8859-1') == '\x02\x00\x03\x00\x05\x00\x01\x00\x04', \ 'did not get expected values' ds = None ############################################################################### # Test on the fly reprojection of input data def test_gdal_rasterize_6(): if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() f = open('tmp/test_gdal_rasterize_6.csv', 'wb') f.write("""WKT,Value "POLYGON((2 49,2 50,3 50,3 49,2 49))",255 """.encode('ascii')) f.close() f = open('tmp/test_gdal_rasterize_6.prj', 'wb') f.write("""EPSG:4326""".encode('ascii')) f.close() ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdal_rasterize_6.tif', 100, 100) ds.SetGeoTransform([200000, (400000 - 200000) / 100, 0, 6500000, 0, -(6500000 - 6200000) / 100]) sr = osr.SpatialReference() sr.ImportFromEPSG(3857) ds.SetProjection(sr.ExportToWkt()) ds = None gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' -l test_gdal_rasterize_6 tmp/test_gdal_rasterize_6.csv tmp/test_gdal_rasterize_6.tif -a Value') ds = gdal.Open('tmp/test_gdal_rasterize_6.tif') assert ds.GetRasterBand(1).Checksum() == 39190, 'did not get expected checksum' ds = None ############################################################################### # Test SQLITE dialect in SQL def test_gdal_rasterize_7(): try: from osgeo import gdalnumeric gdalnumeric.zeros except (ImportError, AttributeError): pytest.skip() if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() drv = ogr.GetDriverByName('SQLite') if drv is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = drv.CreateDataSource('/vsimem/foo.db', options=['SPATIALITE=YES']) if ds is None: pytest.skip() ds = None gdal.Unlink('/vsimem/foo.db') gdal.PopErrorHandler() f = open('tmp/test_gdal_rasterize_7.csv', 'wb') x = (0, 0, 50, 50, 25) y = (0, 50, 0, 50, 25) f.write('WKT,Value\n'.encode('ascii')) for i, xi in enumerate(x): r = 'POINT(%d %d),1\n' % (xi, y[i]) f.write(r.encode('ascii')) f.close() cmds = '''tmp/test_gdal_rasterize_7.csv tmp/test_gdal_rasterize_7.tif -init 0 -burn 1 -sql "SELECT ST_Buffer(GEOMETRY, 2) FROM test_gdal_rasterize_7" -dialect sqlite -tr 1 1 -te -1 -1 51 51''' gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' ' + cmds) ds = gdal.Open('tmp/test_gdal_rasterize_7.tif') data = ds.GetRasterBand(1).ReadAsArray() assert data.sum() > 5, 'Only rasterized 5 pixels or less.' ds = None ############################################################################### # Make sure we create output that encompasses all the input points on a point # layer, #6058. def test_gdal_rasterize_8(): if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() f = open('tmp/test_gdal_rasterize_8.csv', 'wb') f.write('WKT,Value\n'.encode('ascii')) f.write('"LINESTRING (0 0, 5 5, 10 0, 10 10)",1'.encode('ascii')) f.close() cmds = '''tmp/test_gdal_rasterize_8.csv tmp/test_gdal_rasterize_8.tif -init 0 -burn 1 -tr 1 1''' gdaltest.runexternal(test_cli_utilities.get_gdal_rasterize_path() + ' ' + cmds) ds = gdal.Open('tmp/test_gdal_rasterize_8.tif') cs = ds.GetRasterBand(1).Checksum() assert cs == 21, 'Did not rasterize line data properly' ds = None ########################################### def test_gdal_rasterize_cleanup(): if test_cli_utilities.get_gdal_rasterize_path() is None: pytest.skip() gdal.GetDriverByName('GTiff').Delete('tmp/rast1.tif') ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/rast1.tab') gdal.GetDriverByName('GTiff').Delete('tmp/rast2.tif') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/n43dt0.shp') gdal.GetDriverByName('GTiff').Delete('tmp/n43dt0.tif') gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_rasterize_5.tif') os.unlink('tmp/test_gdal_rasterize_5.csv') os.unlink('tmp/test_gdal_rasterize_5.vrt') gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_rasterize_6.tif') os.unlink('tmp/test_gdal_rasterize_6.csv') os.unlink('tmp/test_gdal_rasterize_6.prj') if os.path.exists('tmp/test_gdal_rasterize_7.tif'): gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_rasterize_7.tif') if os.path.exists('tmp/test_gdal_rasterize_7.csv'): os.unlink('tmp/test_gdal_rasterize_7.csv') gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_rasterize_8.tif') os.unlink('tmp/test_gdal_rasterize_8.csv') gdalautotest-3.1.2/utilities/test_gdalmdiminfo_lib.py0000775000175000017500000002024213701060014021572 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalmdiminfo_lib.py b309b2f9b4b2fe3551a58be94a6914b7f135ac78 2020-01-27 16:30:33 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: test librarified gdalmdiminfo # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import json import os import pytest import struct from osgeo import gdal from osgeo import osr ############################################################################### # Validate against schema def _validate(res): try: import jsonschema except ImportError: return if int(jsonschema.__version__.split('.')[0]) < 3: return if isinstance(res, str): res = json.loads(res) schema_filename = '../../gdal/data/gdalmdiminfo_output.schema.json' if not os.path.exists(schema_filename): return jsonschema.validate(res, json.loads(open(schema_filename, 'rt').read())) ############################################################################### # Test with non multidim dataset def test_gdalmdiminfo_lib_non_multidim_dataset(): ds = gdal.Open('../gcore/data/byte.tif') with pytest.raises(TypeError): gdal.MultiDimInfo(ds) with pytest.raises(TypeError): gdal.MultiDimInfo('../gcore/data/byte.tif') ############################################################################### # Test with a empty MEM dataset def test_gdalmdiminfo_lib_empty_mem_dataset(): drv = gdal.GetDriverByName('MEM') ds = drv.CreateMultiDimensional('') ret = gdal.MultiDimInfo(ds) _validate(ret) assert ret == {'type': 'group', "driver": "MEM", 'name': '/'} ############################################################################### # Test with a MEM dataset def test_gdalmdiminfo_lib_mem_dataset(): drv = gdal.GetDriverByName('MEM') ds = drv.CreateMultiDimensional('') rg = ds.GetRootGroup() subg = rg.CreateGroup('subgroup') subg.CreateGroup('subsubgroup') dim0 = rg.CreateDimension("dim0", "my_type", "my_direction", 2) comp0 = gdal.EDTComponent.Create('x', 0, gdal.ExtendedDataType.Create(gdal.GDT_Int16)) comp1 = gdal.EDTComponent.Create('y', 4, gdal.ExtendedDataType.Create(gdal.GDT_Int32)) dt = gdal.ExtendedDataType.CreateCompound("mytype", 8, [comp0, comp1]) ar = rg.CreateMDArray("ar_compound", [ dim0 ], dt) assert ar.Write(struct.pack('hi' * 2, 32767, 1000000, -32768, -1000000)) == gdal.CE_None assert ar.SetNoDataValueRaw(struct.pack('hi', 32767, 1000000)) == gdal.CE_None dim1 = rg.CreateDimension("dim1", None, None, 3) ar = rg.CreateMDArray("ar_2d", [ dim0, dim1 ], gdal.ExtendedDataType.Create(gdal.GDT_Byte)) ar.SetOffset(1) ar.SetScale(2) ar.SetUnit('foo') srs = osr.SpatialReference() srs.SetFromUserInput("+proj=utm +zone=31 +datum=WGS84") srs.SetDataAxisToSRSAxisMapping([2,1]) ar.SetSpatialRef(srs) attr = ar.CreateAttribute('myattr', [], gdal.ExtendedDataType.CreateString()) attr.WriteString('bar') ret = gdal.MultiDimInfo(ds, detailed = True, as_text = True) _validate(ret) expected = """{ "type": "group", "driver": "MEM", "name": "/", "dimensions": [ { "name": "dim0", "full_name": "/dim0", "size": 2, "type": "my_type", "direction": "my_direction" }, { "name": "dim1", "full_name": "/dim1", "size": 3 } ], "arrays": { "ar_2d": { "datatype": "Byte", "dimensions": [ "/dim0", "/dim1" ], "attributes": { "myattr": { "datatype": "String", "value": "bar" } }, "unit": "foo", "offset": 1, "scale": 2, "srs": { "wkt": "PROJCRS[\\"unknown\\",BASEGEOGCRS[\\"unknown\\",DATUM[\\"World Geodetic System 1984\\",ELLIPSOID[\\"WGS 84\\",6378137,298.257223563,LENGTHUNIT[\\"metre\\",1]],ID[\\"EPSG\\",6326]],PRIMEM[\\"Greenwich\\",0,ANGLEUNIT[\\"degree\\",0.0174532925199433],ID[\\"EPSG\\",8901]]],CONVERSION[\\"UTM zone 31N\\",METHOD[\\"Transverse Mercator\\",ID[\\"EPSG\\",9807]],PARAMETER[\\"Latitude of natural origin\\",0,ANGLEUNIT[\\"degree\\",0.0174532925199433],ID[\\"EPSG\\",8801]],PARAMETER[\\"Longitude of natural origin\\",3,ANGLEUNIT[\\"degree\\",0.0174532925199433],ID[\\"EPSG\\",8802]],PARAMETER[\\"Scale factor at natural origin\\",0.9996,SCALEUNIT[\\"unity\\",1],ID[\\"EPSG\\",8805]],PARAMETER[\\"False easting\\",500000,LENGTHUNIT[\\"metre\\",1],ID[\\"EPSG\\",8806]],PARAMETER[\\"False northing\\",0,LENGTHUNIT[\\"metre\\",1],ID[\\"EPSG\\",8807]],ID[\\"EPSG\\",16031]],CS[Cartesian,2],AXIS[\\"(E)\\",east,ORDER[1],LENGTHUNIT[\\"metre\\",1,ID[\\"EPSG\\",9001]]],AXIS[\\"(N)\\",north,ORDER[2],LENGTHUNIT[\\"metre\\",1,ID[\\"EPSG\\",9001]]]]", "data_axis_to_srs_axis_mapping": [2, 1] }, "values": [ [0, 0, 0], [0, 0, 0] ] }, "ar_compound": { "datatype": { "name": "mytype", "size": 8, "components": [ { "name": "x", "offset": 0, "type": "Int16" }, { "name": "y", "offset": 4, "type": "Int32" } ] }, "dimensions": [ "/dim0" ], "nodata_value": { "x": 32767, "y": 1000000 }, "values": [{"x": 32767, "y": 1000000}, {"x": -32768, "y": -1000000}] } }, "groups": { "subgroup": { "groups": { "subsubgroup": {} } } } }""" try: expected = expected.decode('UTF-8') except: pass if ret != expected: print(ret) assert ret == expected ret = gdal.MultiDimInfo(ds, array = 'ar_compound', detailed = True, as_text = True) _validate(ret) expected = """{ "type": "array", "name": "ar_compound", "datatype": { "name": "mytype", "size": 8, "components": [ { "name": "x", "offset": 0, "type": "Int16" }, { "name": "y", "offset": 4, "type": "Int32" } ] }, "dimensions": [ { "name": "dim0", "full_name": "/dim0", "size": 2, "type": "my_type", "direction": "my_direction" } ], "nodata_value": { "x": 32767, "y": 1000000 }, "values": [{"x": 32767, "y": 1000000}, {"x": -32768, "y": -1000000}] }""" if ret != expected: print(ret) assert ret == expected ############################################################################### # Test arrayoption def test_gdalmdiminfo_lib_arrayoption(): if gdal.GetDriverByName('netCDF') is None: pytest.skip('netCDF driver not enabled') ret = gdal.MultiDimInfo('../gdrivers/data/with_bounds.nc') assert len(ret['arrays']) == 2 ret = gdal.MultiDimInfo('../gdrivers/data/with_bounds.nc', arrayoptions = ['SHOW_BOUNDS=NO']) assert len(ret['arrays']) == 1 gdalautotest-3.1.2/utilities/test_nearblack.py0000775000175000017500000002027213701060014020237 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_nearblack.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: nearblack testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal import gdaltest import test_cli_utilities import pytest ############################################################################### # Basic test def test_nearblack_1(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_nearblack_path() + ' ../gdrivers/data/rgbsmall.tif -nb 0 -of GTiff -o tmp/nearblack1.tif') assert (err is None or err == ''), 'got error/warning' src_ds = gdal.Open('../gdrivers/data/rgbsmall.tif') ds = gdal.Open('tmp/nearblack1.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 21106, 'Bad checksum band 1' assert ds.GetRasterBand(2).Checksum() == 20736, 'Bad checksum band 2' assert ds.GetRasterBand(3).Checksum() == 21309, 'Bad checksum band 3' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' src_ds = None ds = None ############################################################################### # Add alpha band def test_nearblack_2(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_nearblack_path() + ' ../gdrivers/data/rgbsmall.tif -setalpha -nb 0 -of GTiff -o tmp/nearblack2.tif -co TILED=YES') ds = gdal.Open('tmp/nearblack2.tif') assert ds is not None assert ds.GetRasterBand(4).Checksum() == 22002, 'Bad checksum band 0' ds = None ############################################################################### # Set existing alpha band def test_nearblack_3(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() shutil.copy('tmp/nearblack2.tif', 'tmp/nearblack3.tif') gdaltest.runexternal(test_cli_utilities.get_nearblack_path() + ' -setalpha -nb 0 -of GTiff tmp/nearblack3.tif') ds = gdal.Open('tmp/nearblack3.tif') assert ds is not None assert ds.GetRasterBand(4).Checksum() == 22002, 'Bad checksum band 0' ds = None ############################################################################### # Test -white def test_nearblack_4(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -wo "INIT_DEST=255" ../gdrivers/data/rgbsmall.tif tmp/nearblack4_src.tif -srcnodata 0') gdaltest.runexternal(test_cli_utilities.get_nearblack_path() + ' -q -setalpha -white -nb 0 -of GTiff tmp/nearblack4_src.tif -o tmp/nearblack4.tif') ds = gdal.Open('tmp/nearblack4.tif') assert ds is not None assert ds.GetRasterBand(4).Checksum() == 24151, 'Bad checksum band 0' ds = None ############################################################################### # Add mask band def test_nearblack_5(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_nearblack_path() + ' ../gdrivers/data/rgbsmall.tif --config GDAL_TIFF_INTERNAL_MASK NO -setmask -nb 0 -of GTiff -o tmp/nearblack5.tif -co TILED=YES') ds = gdal.Open('tmp/nearblack5.tif') assert ds is not None assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 22002, \ 'Bad checksum mask band' ds = None ############################################################################### # Set existing mask band def test_nearblack_6(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() shutil.copy('tmp/nearblack5.tif', 'tmp/nearblack6.tif') shutil.copy('tmp/nearblack5.tif.msk', 'tmp/nearblack6.tif.msk') gdaltest.runexternal(test_cli_utilities.get_nearblack_path() + ' -setmask -nb 0 -of GTiff tmp/nearblack6.tif') ds = gdal.Open('tmp/nearblack6.tif') assert ds is not None assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 22002, \ 'Bad checksum mask band' ds = None ############################################################################### # Test -color def test_nearblack_7(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_nearblack_path() + ' data/whiteblackred.tif -o tmp/nearblack7.tif -color 0,0,0 -color 255,255,255 -of GTiff') ds = gdal.Open('tmp/nearblack7.tif') assert ds is not None assert (ds.GetRasterBand(1).Checksum() == 418 and \ ds.GetRasterBand(2).Checksum() == 0 and \ ds.GetRasterBand(3).Checksum() == 0), 'Bad checksum' ds = None ############################################################################### # Test in-place update def test_nearblack_8(): if test_cli_utilities.get_nearblack_path() is None: pytest.skip() src_ds = gdal.Open('../gdrivers/data/rgbsmall.tif') gdal.GetDriverByName('GTiff').CreateCopy('tmp/nearblack8.tif', src_ds) src_ds = None (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_nearblack_path() + ' tmp/nearblack8.tif -nb 0') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/nearblack8.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 21106, 'Bad checksum band 1' assert ds.GetRasterBand(2).Checksum() == 20736, 'Bad checksum band 2' assert ds.GetRasterBand(3).Checksum() == 21309, 'Bad checksum band 3' ############################################################################### # Cleanup def test_nearblack_cleanup(): try: os.remove('tmp/nearblack1.tif') except OSError: pass try: os.remove('tmp/nearblack2.tif') except OSError: pass try: os.remove('tmp/nearblack3.tif') except OSError: pass try: os.remove('tmp/nearblack4_src.tif') except OSError: pass try: os.remove('tmp/nearblack4.tif') except OSError: pass try: os.remove('tmp/nearblack5.tif') except OSError: pass try: os.remove('tmp/nearblack5.tif.msk') except OSError: pass try: os.remove('tmp/nearblack6.tif') except OSError: pass try: os.remove('tmp/nearblack6.tif.msk') except OSError: pass try: os.remove('tmp/nearblack7.tif') except OSError: pass try: os.remove('tmp/nearblack8.tif') except OSError: pass gdalautotest-3.1.2/utilities/test_gdaldem.py0000775000175000017500000005233613701060014017720 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdaldem.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdaldem testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import osr import gdaltest import test_cli_utilities import pytest ############################################################################### # Test gdaldem hillshade def test_gdaldem_hillshade(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaldem_path() + ' hillshade -s 111120 -z 30 ../gdrivers/data/n43.dt0 tmp/n43_hillshade.tif') assert (err is None or err == ''), 'got error/warning' src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_hillshade.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 45587, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade def test_gdaldem_hillshade_compressed_tiled_output(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaldem_path() + ' hillshade -s 111120 -z 30 ../gdrivers/data/n43.dt0 tmp/n43_hillshade_compressed_tiled.tif -co TILED=YES -co COMPRESS=DEFLATE --config GDAL_CACHEMAX 0') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/n43_hillshade_compressed_tiled.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 45587, 'Bad checksum' ds = None stat_uncompressed = os.stat('tmp/n43_hillshade.tif') stat_compressed = os.stat('tmp/n43_hillshade_compressed_tiled.tif') assert stat_uncompressed.st_size >= stat_compressed.st_size, \ 'failure: compressed size greater than uncompressed one' ############################################################################### # Test gdaldem hillshade -combined def test_gdaldem_hillshade_combined(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' hillshade -s 111120 -z 30 -combined ../gdrivers/data/n43.dt0 tmp/n43_hillshade_combined.tif') src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_hillshade_combined.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 43876, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade with -compute_edges def test_gdaldem_hillshade_compute_edges(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' hillshade -compute_edges -s 111120 -z 30 ../gdrivers/data/n43.dt0 tmp/n43_hillshade_compute_edges.tif') ds = gdal.Open('tmp/n43_hillshade_compute_edges.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 50239, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade with -az parameter def test_gdaldem_hillshade_azimuth(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() from sys import version_info ds = gdal.GetDriverByName('GTiff').Create('tmp/pyramid.tif', 100, 100, 1) ds.SetGeoTransform([2, 0.01, 0, 49, 0, -0.01]) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) for j in range(100): data = '' for i in range(100): val = 255 - 5 * max(abs(50 - i), abs(50 - j)) data = data + ('%c' % (val)) if version_info >= (3, 0, 0): data = bytes(data, 'ISO-8859-1') ds.GetRasterBand(1).WriteRaster(0, j, 100, 1, data) ds = None # Light from the east gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' hillshade -s 111120 -z 100 -az 90 -co COMPRESS=LZW tmp/pyramid.tif tmp/pyramid_shaded.tif') ds_ref = gdal.Open('data/pyramid_shaded_ref.tif') ds = gdal.Open('tmp/pyramid_shaded.tif') assert gdaltest.compare_ds(ds, ds_ref, verbose=1) <= 1, 'Bad checksum' ds = None ds_ref = None ############################################################################### # Test gdaldem hillshade to PNG def test_gdaldem_hillshade_png(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' hillshade -of PNG -s 111120 -z 30 ../gdrivers/data/n43.dt0 tmp/n43_hillshade.png') ds = gdal.Open('tmp/n43_hillshade.png') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 45587, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade to PNG with -compute_edges def test_gdaldem_hillshade_png_compute_edges(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' hillshade -compute_edges -of PNG -s 111120 -z 30 ../gdrivers/data/n43.dt0 tmp/n43_hillshade_compute_edges.png') ds = gdal.Open('tmp/n43_hillshade_compute_edges.png') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 50239, 'Bad checksum' ds = None ############################################################################### # Test gdaldem slope def test_gdaldem_slope(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' slope -s 111120 ../gdrivers/data/n43.dt0 tmp/n43_slope.tif') src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_slope.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 63748, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == -9999.0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem aspect def test_gdaldem_aspect(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' aspect ../gdrivers/data/n43.dt0 tmp/n43_aspect.tif') src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_aspect.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 54885, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == -9999.0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem color relief def test_gdaldem_color_relief(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief ../gdrivers/data/n43.dt0 data/color_file.txt tmp/n43_colorrelief.tif') src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_colorrelief.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 55009, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 37543, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47711, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' src_ds = None ds = None ############################################################################### # Test gdaldem color relief on a GMT .cpt file def test_gdaldem_color_relief_cpt(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief ../gdrivers/data/n43.dt0 data/color_file.cpt tmp/n43_colorrelief_cpt.tif') src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_colorrelief_cpt.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 55009, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 37543, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47711, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' src_ds = None ds = None ############################################################################### # Test gdaldem color relief to VRT def test_gdaldem_color_relief_vrt(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief -of VRT ../gdrivers/data/n43.dt0 data/color_file.txt tmp/n43_colorrelief.vrt') src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.Open('tmp/n43_colorrelief.vrt') assert ds is not None ds_ref = gdal.Open('tmp/n43_colorrelief.tif') assert gdaltest.compare_ds(ds, ds_ref, verbose=0) <= 1, 'Bad checksum' ds_ref = None src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' src_ds = None ds = None ############################################################################### # Test gdaldem color relief from a Float32 dataset def test_gdaldem_color_relief_from_float32(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -ot Float32 ../gdrivers/data/n43.dt0 tmp/n43_float32.tif') gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief tmp/n43_float32.tif data/color_file.txt tmp/n43_colorrelief_from_float32.tif') ds = gdal.Open('tmp/n43_colorrelief_from_float32.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 55009, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 37543, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47711, 'Bad checksum' ds = None ############################################################################### # Test gdaldem color relief to PNG def test_gdaldem_color_relief_png(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief -of PNG ../gdrivers/data/n43.dt0 data/color_file.txt tmp/n43_colorrelief.png') ds = gdal.Open('tmp/n43_colorrelief.png') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 55009, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 37543, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47711, 'Bad checksum' ds = None ############################################################################### # Test gdaldem color relief from a Float32 to PNG def test_gdaldem_color_relief_from_float32_to_png(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief -of PNG tmp/n43_float32.tif data/color_file.txt tmp/n43_colorrelief_from_float32.png') ds = gdal.Open('tmp/n43_colorrelief_from_float32.png') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 55009, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 37543, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47711, 'Bad checksum' ds = None ############################################################################### # Test gdaldem color relief with -nearest_color_entry def test_gdaldem_color_relief_nearest_color_entry(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief -nearest_color_entry ../gdrivers/data/n43.dt0 data/color_file.txt tmp/n43_colorrelief_nearest.tif') ds = gdal.Open('tmp/n43_colorrelief_nearest.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 57296, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 42926, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47181, 'Bad checksum' ds = None ############################################################################### # Test gdaldem color relief with -nearest_color_entry and -of VRT def test_gdaldem_color_relief_nearest_color_entry_vrt(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief -of VRT -nearest_color_entry ../gdrivers/data/n43.dt0 data/color_file.txt tmp/n43_colorrelief_nearest.vrt') ds = gdal.Open('tmp/n43_colorrelief_nearest.vrt') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 57296, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 42926, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47181, 'Bad checksum' ds = None ############################################################################### # Test gdaldem color relief with a nan nodata def test_gdaldem_color_relief_nodata_nan(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() f = open('tmp/nodata_nan_src.asc', 'wt') f.write("""ncols 2 nrows 2 xllcorner 440720 yllcorner 3750120 cellsize 60 NODATA_value nan 0.0 0 0 nan""") f.close() f = open('tmp/nodata_nan_plt.txt', 'wt') f.write('0 0 0 0\n') f.write('nv 1 1 1\n') f.close() gdaltest.runexternal(test_cli_utilities.get_gdaldem_path() + ' color-relief tmp/nodata_nan_src.asc tmp/nodata_nan_plt.txt tmp/nodata_nan_out.tif') ds = gdal.Open('tmp/nodata_nan_out.tif') val = ds.GetRasterBand(1).ReadRaster() ds = None import struct val = struct.unpack('B' * 4, val) assert val == (0, 0, 0, 1) os.unlink('tmp/nodata_nan_src.asc') os.unlink('tmp/nodata_nan_plt.txt') os.unlink('tmp/nodata_nan_out.tif') ############################################################################### # Test gdaldem color relief with entries with repeated DEM values in the color table (#6422) def test_gdaldem_color_relief_repeated_entry(): if test_cli_utilities.get_gdaldem_path() is None: pytest.skip() f = open('tmp/test_gdaldem_color_relief_repeated_entry.asc', 'wt') f.write("""ncols 2 nrows 3 xllcorner 440720 yllcorner 3750120 cellsize 60 NODATA_value 5 1 4.9 5 5.1 6 7 """) f.close() f = open('tmp/test_gdaldem_color_relief_repeated_entry.txt', 'wt') f.write('1 1 1 1\n') f.write('6 10 10 10\n') f.write('6 20 20 20\n') f.write('8 30 30 30\n') f.write('nv 5 5 5\n') f.close() gdaltest.runexternal( test_cli_utilities.get_gdaldem_path() + ' color-relief tmp/test_gdaldem_color_relief_repeated_entry.asc tmp/test_gdaldem_color_relief_repeated_entry.txt tmp/test_gdaldem_color_relief_repeated_entry_out.tif', display_live_on_parent_stdout=True, ) ds = gdal.Open('tmp/test_gdaldem_color_relief_repeated_entry_out.tif') val = ds.GetRasterBand(1).ReadRaster() ds = None import struct val = struct.unpack('B' * 6, val) assert val == (1, 1, 5, 10, 10, 25) gdaltest.runexternal( test_cli_utilities.get_gdaldem_path() + ' color-relief tmp/test_gdaldem_color_relief_repeated_entry.asc tmp/test_gdaldem_color_relief_repeated_entry.txt tmp/test_gdaldem_color_relief_repeated_entry_out.vrt -of VRT', display_live_on_parent_stdout=True, ) ds = gdal.Open('tmp/test_gdaldem_color_relief_repeated_entry_out.vrt') val = ds.GetRasterBand(1).ReadRaster() ds = None val = struct.unpack('B' * 6, val) assert val == (1, 1, 5, 10, 10, 25) os.unlink('tmp/test_gdaldem_color_relief_repeated_entry.asc') os.unlink('tmp/test_gdaldem_color_relief_repeated_entry.txt') os.unlink('tmp/test_gdaldem_color_relief_repeated_entry_out.tif') os.unlink('tmp/test_gdaldem_color_relief_repeated_entry_out.vrt') ############################################################################### # Cleanup def test_gdaldem_cleanup(): try: os.remove('tmp/n43_hillshade.tif') except OSError: pass try: os.remove('tmp/n43_hillshade_compressed_tiled.tif') except OSError: pass try: os.remove('tmp/n43_hillshade_combined.tif') except OSError: pass try: os.remove('tmp/n43_hillshade_compute_edges.tif') except OSError: pass try: os.remove('tmp/pyramid.tif') os.remove('tmp/pyramid_shaded.tif') except OSError: pass try: os.remove('tmp/n43_hillshade.png') os.remove('tmp/n43_hillshade.png.aux.xml') except OSError: pass try: os.remove('tmp/n43_hillshade_compute_edges.png') os.remove('tmp/n43_hillshade_compute_edges.png.aux.xml') except OSError: pass try: os.remove('tmp/n43_slope.tif') except OSError: pass try: os.remove('tmp/n43_aspect.tif') except OSError: pass try: os.remove('tmp/n43_colorrelief.tif') except OSError: pass try: os.remove('tmp/n43_colorrelief_cpt.tif') except OSError: pass try: os.remove('tmp/n43_colorrelief.vrt') except OSError: pass try: os.remove('tmp/n43_float32.tif') os.remove('tmp/n43_colorrelief_from_float32.tif') except OSError: pass try: os.remove('tmp/n43_colorrelief.png') os.remove('tmp/n43_colorrelief.png.aux.xml') except OSError: pass try: os.remove('tmp/n43_colorrelief_from_float32.png') os.remove('tmp/n43_colorrelief_from_float32.png.aux.xml') except OSError: pass try: os.remove('tmp/n43_colorrelief_nearest.tif') except OSError: pass try: os.remove('tmp/n43_colorrelief_nearest.vrt') except OSError: pass gdalautotest-3.1.2/utilities/test_gdal_contour.py0000775000175000017500000003325513701060014021002 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_contour.py 4594191a2db0442760392a1e928ce127244106de 2019-08-07 14:48:57 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_contour testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import array from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest import ogrtest import test_cli_utilities import pytest ############################################################################### # Test with -a and -i options def test_gdal_contour_1(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() try: os.remove('tmp/contour.shp') except OSError: pass try: os.remove('tmp/contour.dbf') except OSError: pass try: os.remove('tmp/contour.shx') except OSError: pass drv = gdal.GetDriverByName('GTiff') sr = osr.SpatialReference() sr.ImportFromEPSG(4326) wkt = sr.ExportToWkt() size = 160 precision = 1. / size ds = drv.Create('tmp/gdal_contour.tif', size, size, 1) ds.SetProjection(wkt) ds.SetGeoTransform([1, precision, 0, 50, 0, -precision]) raw_data = array.array('h', [10 for i in range(int(size / 2))]).tostring() for i in range(int(size / 2)): ds.WriteRaster(int(size / 4), i + int(size / 4), int(size / 2), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) raw_data = array.array('h', [20 for i in range(int(size / 2))]).tostring() for i in range(int(size / 4)): ds.WriteRaster(int(size / 4) + int(size / 8), i + int(size / 4) + int(size / 8), int(size / 4), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) raw_data = array.array('h', [25 for i in range(int(size / 4))]).tostring() for i in range(int(size / 8)): ds.WriteRaster(int(size / 4) + int(size / 8) + int(size / 16), i + int(size / 4) + int(size / 8) + int(size / 16), int(size / 8), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) ds = None (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_contour_path() + ' -a elev -i 10 tmp/gdal_contour.tif tmp/contour.shp') assert (err is None or err == ''), 'got error/warning' ds = ogr.Open('tmp/contour.shp') expected_envelopes = [[1.25, 1.75, 49.25, 49.75], [1.25 + 0.125, 1.75 - 0.125, 49.25 + 0.125, 49.75 - 0.125]] expected_height = [10, 20] lyr = ds.ExecuteSQL("select * from contour order by elev asc") assert lyr.GetSpatialRef().ExportToWkt() == wkt, 'Did not get expected spatial ref' assert lyr.GetFeatureCount() == len(expected_envelopes) i = 0 feat = lyr.GetNextFeature() while feat is not None: envelope = feat.GetGeometryRef().GetEnvelope() assert feat.GetField('elev') == expected_height[i] for j in range(4): if expected_envelopes[i][j] != pytest.approx(envelope[j], abs=precision / 2 * 1.001): print('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) print(feat.GetGeometryRef().GetEnvelope()) pytest.fail('%f, %f' % (expected_envelopes[i][j] - envelope[j], precision / 2)) i = i + 1 feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) ds.Destroy() ############################################################################### # Test with -fl option and -3d option def test_gdal_contour_2(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() try: os.remove('tmp/contour.shp') except OSError: pass try: os.remove('tmp/contour.dbf') except OSError: pass try: os.remove('tmp/contour.shx') except OSError: pass # put -3d just after -fl to test #2793 gdaltest.runexternal(test_cli_utilities.get_gdal_contour_path() + ' -a elev -fl 10 20 25 -3d tmp/gdal_contour.tif tmp/contour.shp') size = 160 precision = 1. / size ds = ogr.Open('tmp/contour.shp') expected_envelopes = [[1.25, 1.75, 49.25, 49.75], [1.25 + 0.125, 1.75 - 0.125, 49.25 + 0.125, 49.75 - 0.125], [1.25 + 0.125 + 0.0625, 1.75 - 0.125 - 0.0625, 49.25 + 0.125 + 0.0625, 49.75 - 0.125 - 0.0625]] expected_height = [10, 20, 25] lyr = ds.ExecuteSQL("select * from contour order by elev asc") assert lyr.GetFeatureCount() == len(expected_envelopes) i = 0 feat = lyr.GetNextFeature() while feat is not None: assert feat.GetGeometryRef().GetZ(0) == expected_height[i] envelope = feat.GetGeometryRef().GetEnvelope() assert feat.GetField('elev') == expected_height[i] for j in range(4): if expected_envelopes[i][j] != pytest.approx(envelope[j], abs=precision / 2 * 1.001): print('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) print(feat.GetGeometryRef().GetEnvelope()) pytest.fail('%f, %f' % (expected_envelopes[i][j] - envelope[j], precision / 2)) i = i + 1 feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) ds.Destroy() ############################################################################### # Test on a real DEM def test_gdal_contour_3(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() try: os.remove('tmp/contour.shp') except OSError: pass try: os.remove('tmp/contour.dbf') except OSError: pass try: os.remove('tmp/contour.shx') except OSError: pass # put -3d just after -fl to test #2793 gdaltest.runexternal(test_cli_utilities.get_gdal_contour_path() + ' -a elev -i 50 ../gdrivers/data/n43.dt0 tmp/contour.shp') ds = ogr.Open('tmp/contour.shp') lyr = ds.ExecuteSQL("select distinct elev from contour order by elev asc") expected_heights = [100, 150, 200, 250, 300, 350, 400, 450] assert lyr.GetFeatureCount() == len(expected_heights) i = 0 feat = lyr.GetNextFeature() while feat is not None: assert feat.GetField('elev') == expected_heights[i] i = i + 1 feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) ds.Destroy() ############################################################################### # Test contour orientation def test_gdal_contour_4(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() try: os.remove('tmp/contour_orientation.shp') except OSError: pass try: os.remove('tmp/contour_orientation.dbf') except OSError: pass try: os.remove('tmp/contour_orientation.shx') except OSError: pass drv = gdal.GetDriverByName('GTiff') wkt = 'GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]' size = 160 precision = 1. / size ds = drv.Create('tmp/gdal_contour_orientation.tif', size, size, 1) ds.SetProjection(wkt) ds.SetGeoTransform([1, precision, 0, 50, 0, -precision]) # Make the elevation 15 for the whole image raw_data = array.array('h', [15 for i in range(int(size))]).tostring() for i in range(int(size)): ds.WriteRaster(0, i, int(size), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) # Create a hill with elevation 25 raw_data = array.array('h', [25 for i in range(2)]).tostring() for i in range(2): ds.WriteRaster(int(size / 4) + int(size / 8) - 1, i + int(size / 2) - 1, 2, 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) # Create a depression with elevation 5 raw_data = array.array('h', [5 for i in range(2)]).tostring() for i in range(2): ds.WriteRaster(int(size / 2) + int(size / 8) - 1, i + int(size / 2) - 1, 2, 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) ds = None gdaltest.runexternal(test_cli_utilities.get_gdal_contour_path() + ' -a elev -i 10 tmp/gdal_contour_orientation.tif tmp/contour_orientation1.shp') ds = ogr.Open('tmp/contour_orientation1.shp') expected_contours = ['LINESTRING (' + '1.628125 49.493749999999999,' + '1.63125 49.496875000000003,' + '1.63125 49.503124999999997,' + '1.628125 49.50625,' + '1.621875 49.50625,' + '1.61875 49.503124999999997,' + '1.61875 49.496875000000003,' + '1.621875 49.493749999999999,' + '1.628125 49.493749999999999)', 'LINESTRING (' + '1.38125 49.496875000000003,' + '1.378125 49.493749999999999,' + '1.371875 49.493749999999999,' + '1.36875 49.496875000000003,' + '1.36875 49.503124999999997,' + '1.371875 49.50625,' + '1.378125 49.50625,' + '1.38125 49.503124999999997,' + '1.38125 49.496875000000003)'] expected_elev = [10, 20] lyr = ds.ExecuteSQL("select * from contour_orientation1 order by elev asc") assert lyr.GetFeatureCount() == len(expected_contours) i = 0 test_failed = False feat = lyr.GetNextFeature() while feat is not None: expected_geom = ogr.CreateGeometryFromWkt(expected_contours[i]) assert feat.GetField('elev') == expected_elev[i] if ogrtest.check_feature_geometry(feat, expected_geom, 0.01) != 0: print('Got %s.\nExpected %s' % (feat.GetGeometryRef().ExportToWkt(), expected_contours[i])) test_failed = True i = i + 1 feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) ds.Destroy() assert not test_failed ############################################################################### # Test contour orientation def test_gdal_contour_5(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() ds = None gdaltest.runexternal(test_cli_utilities.get_gdal_contour_path() + ' -a elev -i 10 data/contour_orientation.tif tmp/contour_orientation2.shp') ds = ogr.Open('tmp/contour_orientation2.shp') expected_contours = ['LINESTRING (0.0 1.999999,' + '0.5 1.999999,' + '1.5 1.999999,' + '1.95454293244555 2.5,' + '2.1249976158233 3.5,' + '1.5 3.9545460850748,' + '0.5 4.06666564941406,' + '0.0 4.06666564941406)'] expected_elev = [140] lyr = ds.ExecuteSQL("select * from contour_orientation2 order by elev asc") assert lyr.GetFeatureCount() == len(expected_contours) i = 0 test_failed = False feat = lyr.GetNextFeature() while feat is not None: expected_geom = ogr.CreateGeometryFromWkt(expected_contours[i]) assert feat.GetField('elev') == expected_elev[i] if ogrtest.check_feature_geometry(feat, expected_geom) != 0: print('Got %s.\nExpected %s' % (feat.GetGeometryRef().ExportToWkt(), expected_contours[i])) test_failed = True i = i + 1 feat = lyr.GetNextFeature() ds.ReleaseResultSet(lyr) ds.Destroy() assert not test_failed ############################################################################### # Cleanup def test_gdal_contour_cleanup(): if test_cli_utilities.get_gdal_contour_path() is None: pytest.skip() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/contour.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/contour_orientation1.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/contour_orientation2.shp') try: os.remove('tmp/gdal_contour.tif') os.remove('tmp/gdal_contour_orientation.tif') except OSError: pass gdalautotest-3.1.2/utilities/test_gdalinfo.py0000775000175000017500000006017713701060014020110 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalinfo.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdalinfo testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import json from osgeo import gdal import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdalinfo_1(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' ../gcore/data/byte.tif', encoding = 'UTF-8') assert (err is None or err == ''), 'got error/warning' assert ret.find('Driver: GTiff/GeoTIFF') != -1 ############################################################################### # Test -checksum option def test_gdalinfo_2(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -checksum ../gcore/data/byte.tif') assert ret.find('Checksum=4672') != -1 ############################################################################### # Test -nomd option def test_gdalinfo_3(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gcore/data/byte.tif') assert ret.find('Metadata') != -1 ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -nomd ../gcore/data/byte.tif') assert ret.find('Metadata') == -1 ############################################################################### # Test -noct option def test_gdalinfo_4(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gdrivers/data/bug407.gif') assert ret.find('0: 255,255,255,255') != -1 ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -noct ../gdrivers/data/bug407.gif') assert ret.find('0: 255,255,255,255') == -1 ############################################################################### # Test -stats option def test_gdalinfo_5(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() try: os.remove('../gcore/data/byte.tif.aux.xml') except OSError: pass ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gcore/data/byte.tif') assert ret.find('STATISTICS_MINIMUM=74') == -1, 'got wrong minimum.' ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -stats ../gcore/data/byte.tif') assert ret.find('STATISTICS_MINIMUM=74') != -1, 'got wrong minimum (2).' # We will blow an exception if the file does not exist now! os.remove('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test a dataset with overviews and RAT def test_gdalinfo_6(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gdrivers/data/int.img') assert ret.find('Overviews') != -1 assert ret.find('GDALRasterAttributeTable') != -1 ############################################################################### # Test a dataset with GCPs def test_gdalinfo_7(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -wkt_format WKT1 ../gcore/data/gcps.vrt') assert ret.find('GCP Projection =') != -1 assert ret.find('PROJCS["NAD27 / UTM zone 11N"') != -1 assert ret.find('(100,100) -> (446720,3745320,0)') != -1 # Same but with -nogcps ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -wkt_format WKT1 -nogcp ../gcore/data/gcps.vrt') assert ret.find('GCP Projection =') == -1 assert ret.find('PROJCS["NAD27 / UTM zone 11N"') == -1 assert ret.find('(100,100) -> (446720,3745320,0)') == -1 ############################################################################### # Test -hist option def test_gdalinfo_8(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() try: os.remove('../gcore/data/byte.tif.aux.xml') except OSError: pass ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gcore/data/byte.tif') assert ret.find('0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 57 0 0 0 0 0 0 0 62 0 0 0 0 0 0 0 66 0 0 0 0 0 0 0 0 72 0 0 0 0 0 0 0 31 0 0 0 0 0 0 0 24 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1') == -1, \ 'did not expect histogram.' ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -hist ../gcore/data/byte.tif') assert ret.find('0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 37 0 0 0 0 0 0 0 57 0 0 0 0 0 0 0 62 0 0 0 0 0 0 0 66 0 0 0 0 0 0 0 0 72 0 0 0 0 0 0 0 31 0 0 0 0 0 0 0 24 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1') != -1, \ 'did not get expected histogram.' # We will blow an exception if the file does not exist now! os.remove('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test -mdd option def test_gdalinfo_9(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gdrivers/data/fake_nsif.ntf') assert ret.find('BLOCKA=010000001000000000') == -1, 'got unexpected extra MD.' ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -mdd TRE ../gdrivers/data/fake_nsif.ntf') assert ret.find('BLOCKA=010000001000000000') != -1, 'did not get extra MD.' ############################################################################### # Test -mm option def test_gdalinfo_10(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gcore/data/byte.tif') assert ret.find('Computed Min/Max=74.000,255.000') == -1 ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -mm ../gcore/data/byte.tif') assert ret.find('Computed Min/Max=74.000,255.000') != -1 ############################################################################### # Test gdalinfo --version def test_gdalinfo_11(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --version', check_memleak=False) assert ret.startswith(gdal.VersionInfo('--version')) ############################################################################### # Test gdalinfo --build def test_gdalinfo_12(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --build', check_memleak=False) ret = ret.replace('\r\n', '\n') assert ret.startswith(gdal.VersionInfo('BUILD_INFO')) ############################################################################### # Test gdalinfo --license def test_gdalinfo_13(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --license', check_memleak=False) ret = ret.replace('\r\n', '\n') if not ret.startswith(gdal.VersionInfo('LICENSE')): print(gdal.VersionInfo('LICENSE')) if gdaltest.is_travis_branch('mingw'): return 'expected_fail' pytest.fail(ret) ############################################################################### # Test erroneous use of --config. def test_gdalinfo_14(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --config', check_memleak=False) assert '--config option given without a key and value argument' in err ############################################################################### # Test erroneous use of --mempreload. def test_gdalinfo_15(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --mempreload', check_memleak=False) assert '--mempreload option given without directory path' in err ############################################################################### # Test --mempreload def test_gdalinfo_16(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (ret, _) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --debug on --mempreload ../gcore/data /vsimem/byte.tif', check_memleak=False, encoding = 'UTF-8') assert ret.startswith('Driver: GTiff/GeoTIFF') ############################################################################### # Test erroneous use of --debug. def test_gdalinfo_17(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --debug', check_memleak=False) assert '--debug option given without debug level' in err ############################################################################### # Test erroneous use of --optfile. def test_gdalinfo_18(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --optfile', check_memleak=False) assert '--optfile option given without filename' in err (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --optfile /foo/bar', check_memleak=False) assert 'Unable to open optfile' in err ############################################################################### # Test --optfile def test_gdalinfo_19(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() f = open('tmp/optfile.txt', 'wt') f.write('# comment\n') f.write('../gcore/data/byte.tif\n') f.close() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --optfile tmp/optfile.txt', check_memleak=False) os.unlink('tmp/optfile.txt') assert ret.startswith('Driver: GTiff/GeoTIFF') ############################################################################### # Test --formats def test_gdalinfo_20(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --formats', check_memleak=False) assert 'GTiff -raster- (rw+vs): GeoTIFF' in ret ############################################################################### # Test erroneous use of --format. def test_gdalinfo_21(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --format', check_memleak=False) assert '--format option given without a format code' in err (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' --format foo_bar', check_memleak=False) assert '--format option given with format' in err ############################################################################### # Test --format def test_gdalinfo_22(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --format GTiff', check_memleak=False) expected_strings = [ 'Short Name:', 'Long Name:', 'Extensions:', 'Mime Type:', 'Help Topic:', 'Supports: Create()', 'Supports: CreateCopy()', 'Supports: Virtual IO', 'Creation Datatypes', ''] for expected_string in expected_strings: assert expected_string in ret, ('did not find %s' % expected_string) ############################################################################### # Test --help-general def test_gdalinfo_23(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --help-general', check_memleak=False) assert 'Generic GDAL utility command options' in ret ############################################################################### # Test --locale def test_gdalinfo_24(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --locale C ../gcore/data/byte.tif', check_memleak=False) assert ret.startswith('Driver: GTiff/GeoTIFF') ############################################################################### # Test -listmdd def test_gdalinfo_25(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gdrivers/data/byte_with_xmp.tif -listmdd', check_memleak=False) assert 'Metadata domains:' in ret assert ' xml:XMP' in ret ############################################################################### # Test -mdd all def test_gdalinfo_26(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gdrivers/data/byte_with_xmp.tif -mdd all', check_memleak=False) assert 'Metadata (xml:XMP)' in ret ############################################################################### # Test -oo def test_gdalinfo_27(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' ../gdrivers/data/float64.asc -oo datatype=float64', check_memleak=False) assert 'Type=Float64' in ret ############################################################################### # Simple -json test def test_gdalinfo_28(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' -json ../gcore/data/byte.tif', encoding = 'UTF-8') ret = json.loads(ret) assert (err is None or err == ''), 'got error/warning' assert ret['driverShortName'] == 'GTiff' ############################################################################### # Test -json -checksum option def test_gdalinfo_29(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -checksum ../gcore/data/byte.tif') ret = json.loads(ret) assert ret['bands'][0]['checksum'] == 4672 ############################################################################### # Test -json -nomd option def test_gdalinfo_30(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gcore/data/byte.tif') ret = json.loads(ret) assert 'metadata' in ret ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -nomd ../gcore/data/byte.tif') ret = json.loads(ret) assert 'metadata' not in ret ############################################################################### # Test -json -noct option def test_gdalinfo_31(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gdrivers/data/bug407.gif') ret = json.loads(ret) assert ret['bands'][0]['colorTable']['entries'][0] == [255, 255, 255, 255] ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -noct ../gdrivers/data/bug407.gif') ret = json.loads(ret) assert 'colorTable' not in ret['bands'][0] ############################################################################### # Test -stats option def test_gdalinfo_32(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() try: os.remove('../gcore/data/byte.tif.aux.xml') except OSError: pass ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gcore/data/byte.tif') ret = json.loads(ret) assert '' not in ret['bands'][0]['metadata'], 'got wrong minimum.' ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -stats ../gcore/data/byte.tif') ret = json.loads(ret) assert ret['bands'][0]['metadata']['']['STATISTICS_MINIMUM'] == '74', \ 'got wrong minimum (2).' # We will blow an exception if the file does not exist now! os.remove('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test a dataset with overviews and RAT def test_gdalinfo_33(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gdrivers/data/int.img') ret = json.loads(ret) assert 'overviews' in ret['bands'][0] assert 'rat' in ret ############################################################################### # Test a dataset with GCPs def test_gdalinfo_34(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gcore/data/gcps.vrt') ret = json.loads(ret) assert 'wkt' in ret['gcps']['coordinateSystem'] assert ret['gcps']['coordinateSystem']['wkt'].find('PROJCRS["NAD27 / UTM zone 11N"') != -1 assert ret['gcps']['gcpList'][0]['x'] == 440720.0 ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -nogcp ../gcore/data/gcps.vrt') ret = json.loads(ret) assert 'gcps' not in ret ############################################################################### # Test -hist option def test_gdalinfo_35(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() try: os.remove('../gcore/data/byte.tif.aux.xml') except OSError: pass ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gcore/data/byte.tif') ret = json.loads(ret) assert 'histogram' not in ret['bands'][0], 'did not expect histogram.' ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -hist ../gcore/data/byte.tif') ret = json.loads(ret) assert ret['bands'][0]['histogram']['buckets'] == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 62, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1], \ 'did not get expected histogram.' # We will blow an exception if the file does not exist now! os.remove('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test -mdd option def test_gdalinfo_36(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gdrivers/data/fake_nsif.ntf') ret = json.loads(ret) assert 'TRE' not in ret['metadata'], 'got unexpected extra MD.' ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -mdd TRE ../gdrivers/data/fake_nsif.ntf') ret = json.loads(ret) assert ret['metadata']['TRE']['BLOCKA'].find('010000001000000000') != -1, \ 'did not get extra MD.' ############################################################################### # Test -mm option def test_gdalinfo_37(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gcore/data/byte.tif') ret = json.loads(ret) assert 'computedMin' not in ret['bands'][0] ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json -mm ../gcore/data/byte.tif') ret = json.loads(ret) assert ret['bands'][0]['computedMin'] == 74.000 ############################################################################### # Test -listmdd def test_gdalinfo_38(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gdrivers/data/byte_with_xmp.tif -listmdd', check_memleak=False) ret = json.loads(ret) assert 'metadataDomains' in ret['metadata'] assert ret['metadata']['metadataDomains'][0] == 'xml:XMP' ############################################################################### # Test -mdd all def test_gdalinfo_39(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gdrivers/data/byte_with_xmp.tif -mdd all', check_memleak=False) ret = json.loads(ret) assert 'xml:XMP' in ret['metadata'] ############################################################################### # Test -json wgs84Extent def test_gdalinfo_40(): if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -json ../gdrivers/data/small_world.tif') ret = json.loads(ret) assert 'wgs84Extent' in ret assert 'type' in ret['wgs84Extent'] assert ret['wgs84Extent']['type'] == 'Polygon' assert 'coordinates' in ret['wgs84Extent'] assert ret['wgs84Extent']['coordinates'] == [[[-180.0, 90.0], [-180.0, -90.0], [180.0, -90.0], [180.0, 90.0], [-180.0, 90.0]]] gdalautotest-3.1.2/utilities/test_gdalbuildvrt.py0000775000175000017500000004733613701060014021012 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalbuildvrt.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdalbuildvrt testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest import test_cli_utilities import pytest ############################################################################### def gdalbuildvrt_check(): ds = gdal.Open('tmp/mosaic.vrt') try: assert ds.GetProjectionRef().find('WGS 84') != -1, \ ('Expected WGS 84\nGot : %s' % (ds.GetProjectionRef())) gt = ds.GetGeoTransform() expected_gt = [2, 0.1, 0, 49, 0, -0.1] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 20 and ds.RasterYSize == 20, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) assert ds.RasterCount == 1, ('Wrong raster count : %d ' % (ds.RasterCount)) assert ds.GetRasterBand(1).Checksum() == 3508, 'Wrong checksum' finally: del ds ############################################################################### # Simple test def test_gdalbuildvrt_1(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') wkt = srs.ExportToWkt() ds = drv.Create('tmp/gdalbuildvrt1.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) ds.GetRasterBand(1).Fill(0) ds = None ds = drv.Create('tmp/gdalbuildvrt2.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([3, 0.1, 0, 49, 0, -0.1]) ds.GetRasterBand(1).Fill(63) ds = None ds = drv.Create('tmp/gdalbuildvrt3.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([2, 0.1, 0, 48, 0, -0.1]) ds.GetRasterBand(1).Fill(127) ds = None ds = drv.Create('tmp/gdalbuildvrt4.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([3, 0.1, 0, 48, 0, -0.1]) ds.GetRasterBand(1).Fill(255) ds = None (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/mosaic.vrt tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif') assert (err is None or err == ''), 'got error/warning' return gdalbuildvrt_check() ############################################################################### # Test with tile index def test_gdalbuildvrt_2(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() try: os.remove('tmp/tileindex.shp') except OSError: pass try: os.remove('tmp/tileindex.dbf') except OSError: pass try: os.remove('tmp/tileindex.shx') except OSError: pass try: os.remove('tmp/mosaic.vrt') except OSError: pass gdaltest.runexternal(test_cli_utilities.get_gdaltindex_path() + ' tmp/tileindex.shp tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif') gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/mosaic.vrt tmp/tileindex.shp') return gdalbuildvrt_check() ############################################################################### # Test with file list def test_gdalbuildvrt_3(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() open('tmp/filelist.txt', 'wt').write('tmp/gdalbuildvrt1.tif\ntmp/gdalbuildvrt2.tif\ntmp/gdalbuildvrt3.tif\ntmp/gdalbuildvrt4.tif') gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -input_file_list tmp/filelist.txt tmp/mosaic.vrt') return gdalbuildvrt_check() ############################################################################### # Try adding a raster in another projection def test_gdalbuildvrt_4(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') wkt = """GEOGCS["WGS 72", DATUM["WGS_1972", SPHEROID["WGS 72",6378135,298.26], TOWGS84[0,0,4.5,0,0,0.554,0.2263]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""" ds = drv.Create('tmp/gdalbuildvrt5.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([47, 0.1, 0, 2, 0, -0.1]) ds = None gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/mosaic.vrt tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif tmp/gdalbuildvrt5.tif') return gdalbuildvrt_check() ############################################################################### # Try adding a raster with different band count # NOTE: fails. commented out originally in 4ef886421c99a4451f8873cb6e094d45ecc86d3f, not sure why @pytest.mark.skip() def test_gdalbuildvrt_5(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') wkt = srs.ExportToWkt() ds = drv.Create('tmp/gdalbuildvrt5.tif', 10, 10, 2) ds.SetProjection(wkt) ds.SetGeoTransform([47, 0.1, 0, 2, 0, -0.1]) ds = None gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/mosaic.vrt tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif tmp/gdalbuildvrt5.tif') return gdalbuildvrt_check() ############################################################################### # Test -separate option def test_gdalbuildvrt_6(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -separate tmp/stacked.vrt tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif') ds = gdal.Open('tmp/stacked.vrt') assert ds.GetProjectionRef().find('WGS 84') != -1, \ ('Expected WGS 84\nGot : %s' % (ds.GetProjectionRef())) gt = ds.GetGeoTransform() expected_gt = [2, 0.1, 0, 49, 0, -0.1] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 20 and ds.RasterYSize == 20, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) assert ds.RasterCount == 4, ('Wrong raster count : %d ' % (ds.RasterCount)) assert ds.GetRasterBand(1).Checksum() == 0, 'Wrong checksum' ############################################################################### # Test source rasters with nodata def test_gdalbuildvrt_7(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() out_ds = gdal.GetDriverByName('GTiff').Create('tmp/vrtnull1.tif', 20, 10, 3, gdal.GDT_UInt16) out_ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') out_ds.SetProjection(srs.ExportToWkt()) out_ds.GetRasterBand(1).SetRasterColorInterpretation(gdal.GCI_RedBand) out_ds.GetRasterBand(2).SetRasterColorInterpretation(gdal.GCI_GreenBand) out_ds.GetRasterBand(3).SetRasterColorInterpretation(gdal.GCI_BlueBand) out_ds.GetRasterBand(1).SetNoDataValue(256) try: ff = '\xff'.encode('latin1') except UnicodeDecodeError: ff = '\xff' out_ds.GetRasterBand(1).WriteRaster(0, 0, 10, 10, ff, buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds.GetRasterBand(2).WriteRaster(0, 0, 10, 10, '\x00', buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds.GetRasterBand(3).WriteRaster(0, 0, 10, 10, '\x00', buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds = None out_ds = gdal.GetDriverByName('GTiff').Create('tmp/vrtnull2.tif', 20, 10, 3, gdal.GDT_UInt16) out_ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') out_ds.SetProjection(srs.ExportToWkt()) out_ds.GetRasterBand(1).SetRasterColorInterpretation(gdal.GCI_RedBand) out_ds.GetRasterBand(2).SetRasterColorInterpretation(gdal.GCI_GreenBand) out_ds.GetRasterBand(3).SetRasterColorInterpretation(gdal.GCI_BlueBand) out_ds.GetRasterBand(1).SetNoDataValue(256) out_ds.GetRasterBand(1).WriteRaster(10, 0, 10, 10, '\x00', buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds.GetRasterBand(2).WriteRaster(10, 0, 10, 10, ff, buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds.GetRasterBand(3).WriteRaster(10, 0, 10, 10, '\x00', buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds = None gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/gdalbuildvrt7.vrt tmp/vrtnull1.tif tmp/vrtnull2.tif') ds = gdal.Open('tmp/gdalbuildvrt7.vrt') assert ds.GetRasterBand(1).Checksum() == 1217, 'Wrong checksum' assert ds.GetRasterBand(2).Checksum() == 1218, 'Wrong checksum' assert ds.GetRasterBand(3).Checksum() == 0, 'Wrong checksum' ds = None ############################################################################### # Test -tr option def test_gdalbuildvrt_8(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -tr 0.05 0.05 tmp/mosaic2.vrt tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif') ds = gdal.Open('tmp/mosaic2.vrt') gt = ds.GetGeoTransform() expected_gt = [2, 0.05, 0, 49, 0, -0.05] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 40 and ds.RasterYSize == 40, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -tr 0.1 0.1 tmp/mosaic.vrt tmp/mosaic2.vrt') return gdalbuildvrt_check() ############################################################################### # Test -te option def test_gdalbuildvrt_9(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -te 1 46 5 50 tmp/mosaic2.vrt tmp/gdalbuildvrt1.tif tmp/gdalbuildvrt2.tif tmp/gdalbuildvrt3.tif tmp/gdalbuildvrt4.tif') ds = gdal.Open('tmp/mosaic2.vrt') gt = ds.GetGeoTransform() expected_gt = [1, 0.1, 0, 50, 0, -0.1] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 40 and ds.RasterYSize == 40, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -te 2 47 4 49 tmp/mosaic.vrt tmp/mosaic2.vrt') return gdalbuildvrt_check() ############################################################################### # Test explicit nodata setting (#3254) def test_gdalbuildvrt_10(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() out_ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdalbuildvrt_10_1.tif', 10, 10, 1, gdal.GDT_Byte, options=['NBITS=1', 'PHOTOMETRIC=MINISWHITE']) out_ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') out_ds.SetProjection(srs.ExportToWkt()) out_ds.GetRasterBand(1).WriteRaster(1, 1, 3, 3, '\x01', buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds = None out_ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdalbuildvrt_10_2.tif', 10, 10, 1, gdal.GDT_Byte, options=['NBITS=1', 'PHOTOMETRIC=MINISWHITE']) out_ds.SetGeoTransform([2, 0.1, 0, 49, 0, -0.1]) srs = osr.SpatialReference() srs.SetFromUserInput('EPSG:4326') out_ds.SetProjection(srs.ExportToWkt()) out_ds.GetRasterBand(1).WriteRaster(6, 6, 3, 3, '\x01', buf_type=gdal.GDT_Byte, buf_xsize=1, buf_ysize=1) out_ds = None gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -srcnodata 0 tmp/gdalbuildvrt10.vrt tmp/test_gdalbuildvrt_10_1.tif tmp/test_gdalbuildvrt_10_2.tif') ds = gdal.Open('tmp/gdalbuildvrt10.vrt') assert ds.GetRasterBand(1).Checksum() == 18, 'Wrong checksum' ds = None ############################################################################### # Test that we can stack ungeoreference single band images with -separate (#3432) def test_gdalbuildvrt_11(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() out_ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdalbuildvrt_11_1.tif', 10, 10, 1) out_ds.GetRasterBand(1).Fill(255) cs1 = out_ds.GetRasterBand(1).Checksum() out_ds = None out_ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdalbuildvrt_11_2.tif', 10, 10, 1) out_ds.GetRasterBand(1).Fill(127) cs2 = out_ds.GetRasterBand(1).Checksum() out_ds = None gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -separate tmp/gdalbuildvrt11.vrt tmp/test_gdalbuildvrt_11_1.tif tmp/test_gdalbuildvrt_11_2.tif') ds = gdal.Open('tmp/gdalbuildvrt11.vrt') assert ds.GetRasterBand(1).Checksum() == cs1, 'Wrong checksum' assert ds.GetRasterBand(2).Checksum() == cs2, 'Wrong checksum' ds = None ############################################################################### # Test -tap option def test_gdalbuildvrt_12(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalbuildvrt_path() + ' -tap tmp/gdalbuildvrt12.vrt ../gcore/data/byte.tif', check_memleak=False) assert err.find('-tap option cannot be used without using -tr') != -1, \ 'expected error' gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' -tr 100 50 -tap tmp/gdalbuildvrt12.vrt ../gcore/data/byte.tif') ds = gdal.Open('tmp/gdalbuildvrt12.vrt') gt = ds.GetGeoTransform() expected_gt = [440700.0, 100.0, 0.0, 3751350.0, 0.0, -50.0] for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.RasterXSize == 13 and ds.RasterYSize == 25, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) ############################################################################### # Test -a_srs def test_gdalbuildvrt_13(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/gdalbuildvrt13.vrt ../gcore/data/byte.tif -a_srs EPSG:4326') ds = gdal.Open('tmp/gdalbuildvrt13.vrt') assert ds.GetProjectionRef().find('4326') != -1 ds = None ############################################################################### # Test -r def test_gdalbuildvrt_14(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/test_gdalbuildvrt_14.vrt ../gcore/data/byte.tif -r cubic -tr 30 30') gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of VRT ../gcore/data/byte.tif tmp/test_gdalbuildvrt_14_ref.vrt -r cubic -outsize 40 40') ds = gdal.Open('tmp/test_gdalbuildvrt_14.vrt') ds_ref = gdal.Open('tmp/test_gdalbuildvrt_14_ref.vrt') cs = ds.GetRasterBand(1).Checksum() cs_ref = ds_ref.GetRasterBand(1).Checksum() ds = None ds_ref = None assert cs == cs_ref ############################################################################### # Test -b def test_gdalbuildvrt_15(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalbuildvrt_path() + ' tmp/test_gdalbuildvrt_15.vrt ../gcore/data/byte.tif -b 1') ds = gdal.Open('tmp/test_gdalbuildvrt_15.vrt') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4672 ############################################################################### # Test output to non writable file def test_gdalbuildvrt_16(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() (out, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalbuildvrt_path() + ' /non_existing_dir/non_existing_subdir/out.vrt ../gcore/data/byte.tif') if not gdaltest.is_travis_branch('mingw'): assert 'ERROR ret code = 1' in err, out else: # We don't get the error code on Travis mingw assert 'ERROR' in err, out ############################################################################### # Cleanup def test_gdalbuildvrt_cleanup(): if test_cli_utilities.get_gdalbuildvrt_path() is None: pytest.skip() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/tileindex.shp') gdal.GetDriverByName('VRT').Delete('tmp/mosaic.vrt') gdal.GetDriverByName('VRT').Delete('tmp/mosaic2.vrt') gdal.GetDriverByName('VRT').Delete('tmp/stacked.vrt') gdal.GetDriverByName('VRT').Delete('tmp/gdalbuildvrt7.vrt') gdal.GetDriverByName('VRT').Delete('tmp/gdalbuildvrt10.vrt') gdal.GetDriverByName('VRT').Delete('tmp/gdalbuildvrt11.vrt') gdal.GetDriverByName('VRT').Delete('tmp/gdalbuildvrt12.vrt') gdal.GetDriverByName('VRT').Delete('tmp/gdalbuildvrt13.vrt') gdal.GetDriverByName('VRT').Delete('tmp/test_gdalbuildvrt_14.vrt') gdal.GetDriverByName('VRT').Delete('tmp/test_gdalbuildvrt_14_ref.vrt') gdal.GetDriverByName('VRT').Delete('tmp/test_gdalbuildvrt_15.vrt') drv = gdal.GetDriverByName('GTiff') drv.Delete('tmp/gdalbuildvrt1.tif') drv.Delete('tmp/gdalbuildvrt2.tif') drv.Delete('tmp/gdalbuildvrt3.tif') drv.Delete('tmp/gdalbuildvrt4.tif') drv.Delete('tmp/gdalbuildvrt5.tif') drv.Delete('tmp/vrtnull1.tif') drv.Delete('tmp/vrtnull2.tif') drv.Delete('tmp/test_gdalbuildvrt_10_1.tif') drv.Delete('tmp/test_gdalbuildvrt_10_2.tif') drv.Delete('tmp/test_gdalbuildvrt_11_1.tif') drv.Delete('tmp/test_gdalbuildvrt_11_2.tif') try: os.remove('tmp/filelist.txt') except OSError: pass gdalautotest-3.1.2/utilities/test_ogrlineref.py0000775000175000017500000001173213701060014020452 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # # Project: GDAL/OGR Test Suite # Purpose: ogrlineref testing # Author: Dmitry Baryshnikov. polimax@mail.ru # ############################################################################### # Copyright (c) 2008-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import pytest sys.path.append('../ogr') from osgeo import ogr import gdaltest import ogrtest import test_cli_utilities ############################################################################### # create test def test_ogrlineref_1(): if not ogrtest.have_geos() or test_cli_utilities.get_ogrlineref_path() is None: pytest.skip() if os.path.exists('tmp/parts.shp'): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/parts.shp') _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrlineref_path() + ' -create -l data/path.shp -p data/mstones.shp -pm pos -o tmp/parts.shp -s 1000') assert err is None or err == '', ('got error/warning: "%s"' % err) ds = ogr.Open('tmp/parts.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 9 ############################################################################### # get_pos test def test_ogrlineref_2(): if not ogrtest.have_geos() or test_cli_utilities.get_ogrlineref_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrlineref_path() + ' -get_pos -r tmp/parts.shp -x -1.4345 -y 51.9497 -quiet').strip() expected = '15977.724709' assert ret == expected, ('"%s" != %s' % (ret.strip(), expected)) ############################################################################### # get_coord test def test_ogrlineref_3(): if not ogrtest.have_geos() or test_cli_utilities.get_ogrlineref_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrlineref_path() + ' -get_coord -r tmp/parts.shp -m 15977.724709 -quiet').strip() expected = '-1.435097,51.950080,0.000000' assert ret == expected, ('%s != %s' % (ret.strip(), expected)) ############################################################################### # get_subline test def test_ogrlineref_4(): if not ogrtest.have_geos() or test_cli_utilities.get_ogrlineref_path() is None: pytest.skip() if os.path.exists('tmp/subline.shp'): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/subline.shp') gdaltest.runexternal(test_cli_utilities.get_ogrlineref_path() + ' -get_subline -r tmp/parts.shp -mb 13300 -me 17400 -o tmp/subline.shp') ds = ogr.Open('tmp/subline.shp') assert ds is not None, 'ds is None' feature_count = ds.GetLayer(0).GetFeatureCount() assert feature_count == 1, ('feature count %d != 1' % feature_count) ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/subline.shp') ############################################################################### # test kml def test_ogrlineref_5(): if not ogrtest.have_geos() or test_cli_utilities.get_ogrlineref_path() is None: pytest.skip() if os.path.exists('tmp/parts.kml'): ogr.GetDriverByName('KML').DeleteDataSource('tmp/parts.kml') gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrlineref_path() + ' -create -f "KML" -l data/path.shp -p data/mstones.shp -pm pos -o tmp/parts.kml -s 222') if os.path.exists('tmp/parts.kml'): return pytest.fail() def test_ogrlineref_cleanup(): if not ogrtest.have_geos() or test_cli_utilities.get_ogrlineref_path() is None: pytest.skip() if os.path.exists('tmp/parts.shp'): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/parts.shp') if os.path.exists('tmp/parts.kml'): ogr.GetDriverByName('KML').DeleteDataSource('tmp/parts.kml') gdalautotest-3.1.2/utilities/test_gdal_translate.py0000775000175000017500000010322213701060014021276 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_translate.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_translate testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdal_translate_1(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif tmp/test1.tif') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/test1.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -of option def test_gdal_translate_2(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of GTiff ../gcore/data/byte.tif tmp/test2.tif') ds = gdal.Open('tmp/test2.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -ot option def test_gdal_translate_3(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -ot Int16 ../gcore/data/byte.tif tmp/test3.tif') ds = gdal.Open('tmp/test3.tif') assert ds is not None assert ds.GetRasterBand(1).DataType == gdal.GDT_Int16, 'Bad data type' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -b option def test_gdal_translate_4(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -b 3 -b 2 -b 1 ../gcore/data/rgbsmall.tif tmp/test4.tif') ds = gdal.Open('tmp/test4.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 21349, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 21053, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 21212, 'Bad checksum' ds = None ############################################################################### # Test -expand option def test_gdal_translate_5(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -expand rgb ../gdrivers/data/bug407.gif tmp/test5.tif') ds = gdal.Open('tmp/test5.tif') assert ds is not None assert ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_RedBand, \ 'Bad color interpretation' assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_GreenBand, \ 'Bad color interpretation' assert ds.GetRasterBand(3).GetRasterColorInterpretation() == gdal.GCI_BlueBand, \ 'Bad color interpretation' assert ds.GetRasterBand(1).Checksum() == 20615, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 59147, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 63052, 'Bad checksum' ds = None ############################################################################### # Test -outsize option in absolute mode def test_gdal_translate_6(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -outsize 40 40 ../gcore/data/byte.tif tmp/test6.tif') ds = gdal.Open('tmp/test6.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18784, 'Bad checksum' ds = None ############################################################################### # Test -outsize option in percentage mode def test_gdal_translate_7(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -outsize 200% 200% ../gcore/data/byte.tif tmp/test7.tif') ds = gdal.Open('tmp/test7.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18784, 'Bad checksum' ds = None ############################################################################### # Test -a_srs and -gcp options def test_gdal_translate_8(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_srs EPSG:26711 -gcp 0 0 440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000 ../gcore/data/byte.tif tmp/test8.tif') ds = gdal.Open('tmp/test8.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' gcps = ds.GetGCPs() assert len(gcps) == 4, 'GCP count wrong.' assert ds.GetGCPProjection().find('26711') != -1, 'Bad GCP projection.' ds = None ############################################################################### # Test -a_nodata option def test_gdal_translate_9(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_nodata 1 ../gcore/data/byte.tif tmp/test9.tif') ds = gdal.Open('tmp/test9.tif') assert ds is not None assert ds.GetRasterBand(1).GetNoDataValue() == 1, 'Bad nodata value' ds = None ############################################################################### # Test -srcwin option def test_gdal_translate_10(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -srcwin 0 0 1 1 ../gcore/data/byte.tif tmp/test10.tif') ds = gdal.Open('tmp/test10.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 2, 'Bad checksum' ds = None ############################################################################### # Test -projwin option def test_gdal_translate_11(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -projwin 440720.000 3751320.000 441920.000 3750120.000 ../gcore/data/byte.tif tmp/test11.tif') ds = gdal.Open('tmp/test11.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -a_ullr option def test_gdal_translate_12(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_ullr 440720.000 3751320.000 441920.000 3750120.000 ../gcore/data/byte.tif tmp/test12.tif') ds = gdal.Open('tmp/test12.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -mo option def test_gdal_translate_13(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -mo TIFFTAG_DOCUMENTNAME=test13 ../gcore/data/byte.tif tmp/test13.tif') ds = gdal.Open('tmp/test13.tif') assert ds is not None md = ds.GetMetadata() assert 'TIFFTAG_DOCUMENTNAME' in md, 'Did not get TIFFTAG_DOCUMENTNAME' ds = None ############################################################################### # Test -co option def test_gdal_translate_14(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -co COMPRESS=LZW ../gcore/data/byte.tif tmp/test14.tif') ds = gdal.Open('tmp/test14.tif') assert ds is not None md = ds.GetMetadata('IMAGE_STRUCTURE') assert 'COMPRESSION' in md and md['COMPRESSION'] == 'LZW', 'Did not get COMPRESSION' ds = None ############################################################################### # Test -sds option def test_gdal_translate_15(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -sds ../gdrivers/data/A.TOC tmp/test15.tif') ds = gdal.Open('tmp/test15_1.tif') assert ds is not None ds = None ############################################################################### # Test -of VRT which is a special case def test_gdal_translate_16(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of VRT ../gcore/data/byte.tif tmp/test16.vrt') ds = gdal.Open('tmp/test16.vrt') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -expand option to VRT def test_gdal_translate_17(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of VRT -expand rgba ../gdrivers/data/bug407.gif tmp/test17.vrt') ds = gdal.Open('tmp/test17.vrt') assert ds is not None assert ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_RedBand, \ 'Bad color interpretation' assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_GreenBand, \ 'Bad color interpretation' assert ds.GetRasterBand(3).GetRasterColorInterpretation() == gdal.GCI_BlueBand, \ 'Bad color interpretation' assert ds.GetRasterBand(4).GetRasterColorInterpretation() == gdal.GCI_AlphaBand, \ 'Bad color interpretation' assert ds.GetRasterBand(1).Checksum() == 20615, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 59147, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 63052, 'Bad checksum' assert ds.GetRasterBand(4).Checksum() == 63052, 'Bad checksum' ds = None ############################################################################### # Test translation of a VRT made of VRT def test_gdal_translate_18(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/8bit_pal.bmp -of VRT tmp/test18_1.vrt') gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' tmp/test18_1.vrt -expand rgb -of VRT tmp/test18_2.vrt') (_, ret_stderr) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' tmp/test18_2.vrt tmp/test18_2.tif') # Check that all datasets are closed assert ret_stderr.find('Open GDAL Datasets') == -1 ds = gdal.Open('tmp/test18_2.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -expand rgba on a color indexed dataset with an alpha band def test_gdal_translate_19(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdal_translate_19_src.tif', 1, 1, 2) ct = gdal.ColorTable() ct.SetColorEntry(127, (1, 2, 3, 255)) ds.GetRasterBand(1).SetRasterColorTable(ct) ds.GetRasterBand(1).Fill(127) ds.GetRasterBand(2).Fill(250) ds = None gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -expand rgba tmp/test_gdal_translate_19_src.tif tmp/test_gdal_translate_19_dst.tif') ds = gdal.Open('tmp/test_gdal_translate_19_dst.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 1, 'Bad checksum for band 1' assert ds.GetRasterBand(2).Checksum() == 2, 'Bad checksum for band 2' assert ds.GetRasterBand(3).Checksum() == 3, 'Bad checksum for band 3' assert ds.GetRasterBand(4).Checksum() == 250 % 7, 'Bad checksum for band 4' ds = None ############################################################################### # Test -a_nodata None def test_gdal_translate_20(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_nodata 255 ../gcore/data/byte.tif tmp/test_gdal_translate_20_src.tif') gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_nodata None tmp/test_gdal_translate_20_src.tif tmp/test_gdal_translate_20_dst.tif') ds = gdal.Open('tmp/test_gdal_translate_20_dst.tif') assert ds is not None nodata = ds.GetRasterBand(1).GetNoDataValue() assert nodata is None ds = None ############################################################################### # Test that statistics are copied only when appropriate (#3889) # in that case, they must be copied def test_gdal_translate_21(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of HFA ../gcore/data/utmsmall.img tmp/test_gdal_translate_21.img') ds = gdal.Open('tmp/test_gdal_translate_21.img') md = ds.GetRasterBand(1).GetMetadata() ds = None assert md['STATISTICS_MINIMUM'] == '8', 'STATISTICS_MINIMUM is wrong.' assert md['STATISTICS_HISTOBINVALUES'] == '0|0|0|0|0|0|0|0|8|0|0|0|0|0|0|0|23|0|0|0|0|0|0|0|0|29|0|0|0|0|0|0|0|46|0|0|0|0|0|0|0|69|0|0|0|0|0|0|0|99|0|0|0|0|0|0|0|0|120|0|0|0|0|0|0|0|178|0|0|0|0|0|0|0|193|0|0|0|0|0|0|0|212|0|0|0|0|0|0|0|281|0|0|0|0|0|0|0|0|365|0|0|0|0|0|0|0|460|0|0|0|0|0|0|0|533|0|0|0|0|0|0|0|544|0|0|0|0|0|0|0|0|626|0|0|0|0|0|0|0|653|0|0|0|0|0|0|0|673|0|0|0|0|0|0|0|629|0|0|0|0|0|0|0|0|586|0|0|0|0|0|0|0|541|0|0|0|0|0|0|0|435|0|0|0|0|0|0|0|348|0|0|0|0|0|0|0|341|0|0|0|0|0|0|0|0|284|0|0|0|0|0|0|0|225|0|0|0|0|0|0|0|237|0|0|0|0|0|0|0|172|0|0|0|0|0|0|0|0|159|0|0|0|0|0|0|0|105|0|0|0|0|0|0|0|824|', \ 'STATISTICS_HISTOBINVALUES is wrong.' ############################################################################### # Test that statistics are copied only when appropriate (#3889) # in that case, they must *NOT* be copied def test_gdal_translate_22(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of HFA -scale 0 255 0 128 ../gcore/data/utmsmall.img tmp/test_gdal_translate_22.img') ds = gdal.Open('tmp/test_gdal_translate_22.img') md = ds.GetRasterBand(1).GetMetadata() ds = None assert 'STATISTICS_MINIMUM' not in md, \ 'did not expected a STATISTICS_MINIMUM value.' assert 'STATISTICS_HISTOBINVALUES' not in md, \ 'did not expected a STATISTICS_HISTOBINVALUES value.' ############################################################################### # Test -stats option (#3889) def test_gdal_translate_23(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -stats ../gcore/data/byte.tif tmp/test_gdal_translate_23.tif') ds = gdal.Open('tmp/test_gdal_translate_23.tif') md = ds.GetRasterBand(1).GetMetadata() ds = None assert md['STATISTICS_MINIMUM'] == '74', 'STATISTICS_MINIMUM is wrong.' assert not os.path.exists('tmp/test_gdal_translate_23.tif.aux.xml') gdal.Unlink('../gcore/data/byte.tif.aux.xml') ############################################################################### # Test -srcwin option when partially outside def test_gdal_translate_24(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -q -srcwin -10 -10 40 40 ../gcore/data/byte.tif tmp/test_gdal_translate_24.tif') ds = gdal.Open('tmp/test_gdal_translate_24.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 4620, 'Bad checksum' ds = None ############################################################################### # Test -norat def test_gdal_translate_25(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -q ../gdrivers/data/int.img tmp/test_gdal_translate_25.tif -norat') ds = gdal.Open('tmp/test_gdal_translate_25.tif') assert ds.GetRasterBand(1).GetDefaultRAT() is None, 'RAT unexpected' ds = None ############################################################################### # Test -a_nodata and -stats (#5463) def test_gdal_translate_26(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() f = open('tmp/test_gdal_translate_26.xyz', 'wb') f.write("""X Y Z 0 0 -999 1 0 10 0 1 15 1 1 20""".encode('ascii')) f.close() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_nodata -999 -stats tmp/test_gdal_translate_26.xyz tmp/test_gdal_translate_26.tif') ds = gdal.Open('tmp/test_gdal_translate_26.tif') assert ds.GetRasterBand(1).GetMinimum() == 10 assert ds.GetRasterBand(1).GetNoDataValue() == -999 ds = None ############################################################################### # Test that we don't preserve statistics when we ought not. def test_gdal_translate_27(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() f = open('tmp/test_gdal_translate_27.asc', 'wb') f.write("""ncols 2 nrows 2 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 0 256 0 0""".encode('ascii')) f.close() gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' -stats tmp/test_gdal_translate_27.asc') # Translate to an output type that accepts 256 as maximum gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' tmp/test_gdal_translate_27.asc tmp/test_gdal_translate_27.tif -ot UInt16') ds = gdal.Open('tmp/test_gdal_translate_27.tif') assert ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') is not None ds = None # Translate to an output type that accepts 256 as maximum gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' tmp/test_gdal_translate_27.asc tmp/test_gdal_translate_27.tif -ot Float64') ds = gdal.Open('tmp/test_gdal_translate_27.tif') assert ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') is not None ds = None # Translate to an output type that doesn't accept 256 as maximum gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' tmp/test_gdal_translate_27.asc tmp/test_gdal_translate_27.tif -ot Byte') ds = gdal.Open('tmp/test_gdal_translate_27.tif') assert ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') is None ds = None ############################################################################### # Test -oo def test_gdal_translate_28(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gdrivers/data/float64.asc tmp/test_gdal_translate_28.tif -oo datatype=float64') ds = gdal.Open('tmp/test_gdal_translate_28.tif') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float64 ds = None ############################################################################### # Test -r def test_gdal_translate_29(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif tmp/test_gdal_translate_29.tif -outsize 50% 50% -r cubic') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/test_gdal_translate_29.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 1059, 'Bad checksum' ds = None (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif tmp/test_gdal_translate_29.vrt -outsize 50% 50% -r cubic -of VRT') assert (err is None or err == ''), 'got error/warning' (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' tmp/test_gdal_translate_29.vrt tmp/test_gdal_translate_29.tif') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/test_gdal_translate_29.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 1059, 'Bad checksum' ds = None ############################################################################### # Test -tr option def test_gdal_translate_30(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -tr 30 30 ../gcore/data/byte.tif tmp/test_gdal_translate_30.tif') ds = gdal.Open('tmp/test_gdal_translate_30.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 18784, 'Bad checksum' ds = None ############################################################################### # Test -projwin_srs option def test_gdal_translate_31(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -projwin_srs EPSG:4267 -projwin -117.641168620797 33.9023526904262 -117.628110837847 33.8915970129613 ../gcore/data/byte.tif tmp/test_gdal_translate_31.tif') ds = gdal.Open('tmp/test_gdal_translate_31.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-6), \ 'Bad geotransform' ds = None ############################################################################### # Test subsetting a file with a RPC def test_gdal_translate_32(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte_rpc.tif tmp/test_gdal_translate_32.tif -srcwin 1 2 13 14 -outsize 150% 300%') ds = gdal.Open('tmp/test_gdal_translate_32.tif') md = ds.GetMetadata('RPC') assert (float(md['LINE_OFF']) == pytest.approx(47496, abs=1e-5) and \ float(md['LINE_SCALE']) == pytest.approx(47502, abs=1e-5) and \ float(md['SAMP_OFF']) == pytest.approx(19676.6923076923, abs=1e-5) and \ float(md['SAMP_SCALE']) == pytest.approx(19678.1538461538, abs=1e-5)) gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte_rpc.tif tmp/test_gdal_translate_32.tif -srcwin -10 -5 20 20') ds = gdal.Open('tmp/test_gdal_translate_32.tif') md = ds.GetMetadata('RPC') assert (float(md['LINE_OFF']) == pytest.approx((15834 - -5), abs=1e-5) and \ float(md['LINE_SCALE']) == pytest.approx(15834, abs=1e-5) and \ float(md['SAMP_OFF']) == pytest.approx((13464 - -10), abs=1e-5) and \ float(md['SAMP_SCALE']) == pytest.approx(13464, abs=1e-5)) ############################################################################### # Test -outsize option in auto mode def test_gdal_translate_33(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -outsize 100 0 ../gdrivers/data/small_world.tif tmp/test_gdal_translate_33.tif') ds = gdal.Open('tmp/test_gdal_translate_33.tif') assert ds.RasterYSize == 50 ds = None gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -outsize 0 100 ../gdrivers/data/small_world.tif tmp/test_gdal_translate_33.tif') ds = gdal.Open('tmp/test_gdal_translate_33.tif') assert ds.RasterXSize == 200, ds.RasterYSize ds = None os.unlink('tmp/test_gdal_translate_33.tif') (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' -outsize 0 0 ../gdrivers/data/small_world.tif tmp/test_gdal_translate_33.tif') assert '-outsize 0 0 invalid' in err ############################################################################### # Test NBITS is preserved def test_gdal_translate_34(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/oddsize1bit.tif tmp/test_gdal_translate_34.vrt -of VRT -mo FOO=BAR') ds = gdal.Open('tmp/test_gdal_translate_34.vrt') assert ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ds = None os.unlink('tmp/test_gdal_translate_34.vrt') ############################################################################### # Test various errors (missing source or dest...) def test_gdal_translate_35(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path()) assert 'No source dataset specified' in err (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif') assert 'No target dataset specified' in err (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' /non_existing_path/non_existing.tif /vsimem/out.tif') assert 'does not exist in the file system' in err or 'No such file or directory' in err (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif /non_existing_path/non_existing.tif') assert 'Attempt to create new tiff file' in err ############################################################################### # Test RAT is copied from hfa to gtiff - continuous/athematic def test_gdal_translate_36(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -of gtiff data/onepixelcontinuous.img tmp/test_gdal_translate_36.tif') ds = gdal.Open('tmp/test_gdal_translate_36.tif') assert ds is not None rat = ds.GetRasterBand(1).GetDefaultRAT() assert rat, 'Did not get RAT' assert rat.GetRowCount() == 256, 'RAT has incorrect row count' assert rat.GetTableType() == 1, 'RAT not athematic' rat = None ds = None ############################################################################### # Test RAT is copied from hfa to gtiff - thematic def test_gdal_translate_37(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -q -of gtiff data/onepixelthematic.img tmp/test_gdal_translate_37.tif') ds = gdal.Open('tmp/test_gdal_translate_37.tif') assert ds is not None rat = ds.GetRasterBand(1).GetDefaultRAT() assert rat, 'Did not get RAT' assert rat.GetRowCount() == 256, 'RAT has incorrect row count' assert rat.GetTableType() == 0, 'RAT not thematic' rat = None ds = None # Test RAT is copied round trip back to hfa def test_gdal_translate_38(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -q -of hfa tmp/test_gdal_translate_37.tif tmp/test_gdal_translate_38.img') ds = gdal.Open('tmp/test_gdal_translate_38.img') assert ds is not None rat = ds.GetRasterBand(1).GetDefaultRAT() assert rat, 'Did not get RAT' assert rat.GetRowCount() == 256, 'RAT has incorrect row count' assert rat.GetTableType() == 0, 'RAT not thematic' rat = None ds = None ############################################################################### # Test -nogcp options def test_gdal_translate_39(): if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -nogcp ../gcore/data/byte_gcp.tif tmp/test39.tif') ds = gdal.Open('tmp/test39.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' gcps = ds.GetGCPs() assert len(gcps) == 0, 'GCP count wrong.' ds = None ############################################################################### # Cleanup def test_gdal_translate_cleanup(): for i in range(14): try: os.remove('tmp/test' + str(i + 1) + '.tif') except OSError: pass try: os.remove('tmp/test' + str(i + 1) + '.tif.aux.xml') except OSError: pass try: os.remove('tmp/test15_1.tif') except OSError: pass try: os.remove('tmp/test16.vrt') except OSError: pass try: os.remove('tmp/test17.vrt') except OSError: pass try: os.remove('tmp/test18_1.vrt') except OSError: pass try: os.remove('tmp/test18_2.vrt') except OSError: pass try: os.remove('tmp/test18_2.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_19_src.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_19_dst.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_20_src.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_20_dst.tif') except OSError: pass try: gdal.GetDriverByName('HFA').Delete('tmp/test_gdal_translate_21.img') except (AttributeError, RuntimeError): pass try: gdal.GetDriverByName('HFA').Delete('tmp/test_gdal_translate_22.img') except (AttributeError, RuntimeError): pass try: gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_translate_23.tif') except (AttributeError, RuntimeError): pass try: os.remove('tmp/test_gdal_translate_24.tif') except OSError: pass try: gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_translate_25.tif') except (AttributeError, RuntimeError): pass try: gdal.GetDriverByName('XYZ').Delete('tmp/test_gdal_translate_26.xyz') gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_translate_26.tif') except (AttributeError, RuntimeError): pass try: gdal.GetDriverByName('AAIGRID').Delete('tmp/test_gdal_translate_27.asc') gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_translate_27.tif') except (AttributeError, RuntimeError): pass try: gdal.GetDriverByName('GTiff').Delete('tmp/test_gdal_translate_28.tif') except (AttributeError, RuntimeError): pass try: os.remove('tmp/test_gdal_translate_29.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_29.vrt') except OSError: pass try: os.remove('tmp/test_gdal_translate_30.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_31.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_32.tif') except OSError: pass try: os.remove('tmp/test_gdal_translate_36.tif') except: pass try: os.remove('tmp/test_gdal_translate_36.tif.aux.xml') except: pass try: os.remove('tmp/test_gdal_translate_37.tif') except: pass try: os.remove('tmp/test_gdal_translate_37.tif.aux.xml') except: pass try: gdal.GetDriverByName('HFA').Delete('tmp/test_gdal_translate_38.img') except: pass gdalautotest-3.1.2/utilities/data/0000775000175000017500000000000013701060014015607 5ustar evenevengdalautotest-3.1.2/utilities/data/path.cpg0000664000175000017500000000000513701057752017250 0ustar evenevenUTF-8gdalautotest-3.1.2/utilities/data/contour_orientation.tif0000664000175000017500000000036313701057752022440 0ustar evenevenII*  PS-9993 C C C3 C C C C3 C C Cff C3 C3 C Cff C3 C3 C C C3 Cgdalautotest-3.1.2/utilities/data/path.qpj0000664000175000017500000000040113701057752017271 0ustar evenevenGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] gdalautotest-3.1.2/utilities/data/mdim.vrt0000664000175000017500000000464413701057752017321 0ustar eveneven Float32 Float32 Int32 1 String 2010-01-01 2011-01-01 2012-01-01 2013-01-01 Int32 1 String 2013-01-01 2012-01-01 2011-01-01 2010-01-01 Int32 1 String bar gdalautotest-3.1.2/utilities/data/grid.vrt0000664000175000017500000000064713701057752017317 0ustar eveneven grid.csv EPSG:26711 wkbPoint gdalautotest-3.1.2/utilities/data/path.dbf0000664000175000017500000000027413701057752017242 0ustar eveneven_a[idN nameCP **********test gdalautotest-3.1.2/utilities/data/test_bug_4326_to_3857.tif0000664000175000017500000000137613701057752022023 0ustar evenevenII*nS    VfApS? wG)}?2*_ce$5@#  mtr@@TXAWGS 84|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/utilities/data/test_gdalwarp_lib_129_lower_right.tif0000664000175000017500000000111213701057752025013 0ustar evenevenII*   S   * jz-32768f& 4"?`4"?}\v8TW!"?#  mtr@@TXAWGS 84|''''''''''''''''''''''''''''''''''''''''&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%gdalautotest-3.1.2/utilities/data/utmsmall.tif0000664000175000017500000002417013701057752020174 0ustar evenevenII*'k{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sŜŌֵέ֭sk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{Ŕεs{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{Žέ֭Δŵ{{s{s{s{kskssckkksssssksc{Zkckss{kk{{{{ss{kέńBΥννΜsss{{{kk{sckc{csscksZsZcsk{kccs{ss{{{s{{k{ccť攽s{ksc{skscZk{cs{Zcccc{kskk{kssk{ZsΔŽޜZkŭ{ŭc{sc{{ssckk{ckkcsccZcsZss{{{sνﵔťsޥ{s{{kssksc{cck{kcccsZ{sksskss{sc{{ss{s{{csc{sskcscJ{sZskskssk{{{c{s{{Rcֵ֌ccs{kksks{{k{kskscskkssks{Zֽ楄{c{kcs{{k{{{ksks{ks{{c{cc{{ss{{ksέέ{֔極{{{k{{ssZkkkkkc{ss{kc{c{{Zk{{s{ckc{ť{kέ޽{ޥΥc{{k{ckksskckZ{ksss{ss{ksssε{Δ楥ޥŜŭk{ccsccs{c{ssc{kkcs{s{{skk{֜Žֵ޽ŽŭޥεkkZkskZc{sss{{sc{kckk{{ssŵ{{νΜֽεΔŽŵ֥ťޭŜ{kkkscscckssZ{s{{k{{{Zk{kkńŵsc{ŽŭŌksZcsZcckccksZs{skskssֵŭΜεΌŔ޽ŭ֜{cs{Jsc{ckkskksŽ{εŵν֭Μks΄k{{k{k{RccZŭŜΥε浌ŭ{{ޭΔ{Ό޵skkkkksckZsccέޭ޵ֵ֥s{Ŝ{ޭΜ{sZcsZkccZckcc{ε朔ŭŽŵŭŵŵk{{{kcRkkkcckŭŭ֥ޭ֔Ŝ{ޜZckcRss޽έބε業{Z{k{ŽŭŌŵŜŭc{{kޔŽť{{sR{֜{s{{{sֵޥֽs{{{{Zc楜{έ{ŽΔΜc{εk΄省ΜΥsks{{Ō攜֔ŔskޜŔs{εޭńŽ֭ﭥ{֔{{ťs{{Ό޽֭歵Z{ŵŵŌťŽŌ{{sֵŔ޽ssŌsνť挥ť޵޽֔楥{ν{ŵε潔޽朔Υ{ֽŭ֌攔ք{Rkŵޔsks{ZŽ楔ޭs歔掠ť{k{kscsc{ť֜c{kޜs{J{c{Rcs{kΥέŔťŵνΜsk{sskk{skscRcJk{sέ{Ŝ֌޽έޭޥ{k{{Rk{kZ{RťŭνŵΜŌks{sskck{ֵŜsZŭ֔εŵεJkkss{{s{c{ŌޥŜsk歜֜{޽s֭{{{{Ŝ{s{k{{ckkŜ浌c潥ޔޥs{{s֔s{s{c{ks{s{s{εέֵ{{ssss{{kskkュ{ssތŌkckckcsksks{{ss{{Ό{sŽ歵{΄֜ބksckkk{{{{sks{{ťck{޵޽{έބkksssssc{kc{ccsބŌcsޥŭs{sR{c{sZks{ss{kcs{kZ{ޔޔkޥ{ŔֽŔŵ{{kkskskZ{sZksssZRk{kc{{ńs{k潌֭s֭kޜ歭csZsc{{ckcs{c{skRk{RZsťŭ{ssŽνΜ֭潽޽ŌksRssssk{{sksc{{kRBνŽ{{ťŭ޵ŔνޥΥ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{kRRsksRJJBB1J)JZkR!JsZ)kBRZsJZ{c::ZBZZZck:11):sBRs)JsZcRޭν{s{cRRZJsRRZcs{kcRR1BJBB{kJ11!!:BBB::sB!RZs{kBJBcss)B::)JB挜έcZk:k{ksZZ{{RsJ{cZJRZ)BBBsZ1Rs!1JBc:)J:ZkZRR:R!BJZR{Zs{{攜{sJJJR{cJBRBZRkZkRJBZBBBBcsBcZs:!J:Z!1J)R!B)::ZcR1BcsZ:1Z:kskJΌJssJsccsRckJJRJJcJ{sskkkc)JBZskRRJ1!Zc{!)::Z)R)1:BsckssZZ1:BBJJR!B֌JBcRs{cJBZsZ:ssJRJZ{kZ{Zk{{{ZRR1Bs1BJR11BR{{s{)ZcZR))!B)sŔZc):s{ZJkkRsBJ1ccBkZZB1ssskZkR{:RRZks{ZkccBs:)!:kcsތRRkZ:))!!):JRkB11{{1cskRRRZ!cRsZ:k1{J:1ksJZ{k{JZ{:skccRZZk)JRk1ccBckssZ!11cJ)JJB)RRs{R:){k1:JJ):)kR{sJJZkBkBJBZ:R1:ZcccsJRRskk:{sscRZ{dd'Q'S ( '*(b(l@A̞LAN@N@ Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/utilities/data/mstones.shx0000664000175000017500000000023413701057752020041 0ustar eveneven' N )dbI@Hi`I@2 @ N \ j x gdalautotest-3.1.2/utilities/data/w_jpeg.tiff0000664000175000017500000014017413701057752017762 0ustar evenevenII*,Sl[>rP    8H N - T + >  9   +   -:G-TX`lxo(F^C     C    }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz??fV@#  mtr@@TXAWGS 84|??fV@#  mtr@@TXAWGS 84|" ?NyWOeZ"1]]^ >e?姛W?ߗ$rͻiם_fxHSF|Ԧˏ~|g]An1?;|wgG]Q+9mGe|=֦Y+z֗ey/wUOM[Ǩ]DXaʴZ~³?Z-[m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_deiK̰9}9~:'kۥǔ_?[EZ|Ry_jm;{{}C<[I>o t~RݜW>Wgq ){/揈jG" ?i4?t/ _tD/& _$uma )/|Gi*ɛrWM}vo&Q"%6/O&*fXZdVXj$ZOHn妫mji;dK]kɩS]k*Q\|~!W?sozuVRe~iDٓ~H&X'--.߭;Z-!bGxègc} 28{~0Bm.Hv~?fY+CTMYK /\sZr]~?K#+ʓzUO.+/ šFy'B?Eil|/&o%(S"Ff&*VVwx[Oga?+VkdzޯlH?Z?,jojΦb[z{>X4CWLPwO:IH&%p֢VĞ8a|;fe/+O5UdSZ#oo:[cZ_ֲӣd=٘tm:?kRڏ6Oz ?E'6Oz<='>OHj/a6Ozo3''εfOU=SrzZ>=SZzԿkoTezԾM=S͓ޏ*OzAK@{A!&l~C Ʀ>l"דMhE16ոm dY(ZUMsN|KYۉ=i-XNt_hyϋ<1$0]^ĸ_=?_ι]s7~$O+~_U_;M!HzK>8ǓhgϪo\}ˏ+䒪xE7et X)/4ny]:E|߱ޔ}ngdalautotest-3.1.2/utilities/data/cutline.csv0000664000175000017500000000014313701057752020004 0ustar evenevenID,"WKT" 1,"POLYGON ((445125 3748212,442222 3748212,442222 3750366,445125 3750366,445125 3748212))"gdalautotest-3.1.2/utilities/data/test_gdalwarp_lib_129_dem.vrt0000664000175000017500000000503613701057752023275 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1, 1.3888888888888889e-04, 0.0000000000000000e+00, 1, 0.0000000000000000e+00, -1.3888888888888889e-04 Gray test_gdalwarp_lib_129_upper_left.tif 1 1727 0 test_gdalwarp_lib_129_upper_left.tif 1 test_gdalwarp_lib_129_upper_right.tif 1 test_gdalwarp_lib_129_lower_right.tif 1 test_gdalwarp_lib_129_lower_left.tif 1 gdalautotest-3.1.2/utilities/data/path.shx0000664000175000017500000000015413701057752017306 0ustar eveneven' 6&|ZW~/K,I@}9$-uI@2gdalautotest-3.1.2/utilities/data/test_gdalwarp_lib_129_lower_left.tif0000664000175000017500000000111213701057752024630 0ustar evenevenII*   S   * jz-32768`4"?`4"?\x raO?#  mtr@@TXAWGS 84|~~~gdalautotest-3.1.2/utilities/data/test_gdalwarp_lib_128_dem.tif0000664000175000017500000000317413701057752023244 0ustar evenevenII*+$$=S   6 v-32768.gf?qllf?Q@L@@#  mtr@@TXAWGS 84|xRrf|L$\%[V/E$z$Lw ^!?fv~ywtR W$H 7Zwzi׻SJPgIK4i]$?z{p|qvT4g$?kїw>012A<_]}qvrrryF/OPeXq5O4\^^^cn9=pLSdjE*ܨy9bxӤSqnEؚ3՛ag`Y7U>2LfuZ.VfY颤DiT"%*^TfFɺ5EiQFoƃ!rlE]Ef ~/+̆bX^(i֙+VyX<-6sUF b80o"h:"rS(J+U Tb4`hfY` ќH3I@f=(xprI@Y^[&I@|+M9I@'PI@* [F .zI@1yX 'I@oq$I@wXFAI@}9$-mI@z(ҀazI@+ٻ^lI@<_uI@gdalautotest-3.1.2/utilities/data/color_file.txt0000664000175000017500000000020013701057752020474 0ustar eveneven500 255 255 255 450 235 220 175 300 190 185 135 150 240 250 150 76 50 180 50 75 200 230 255 -32768 200 230 255 gdalautotest-3.1.2/utilities/data/unstable_rpc_with_dem_elevation.tif0000664000175000017500000000077113701057752024746 0ustar evenevenII*  z =S   " brx?w?@ \@\m'}Z6@#  mtr@@TXAWGS 84|x ~Y ?/ʰ2 Sfe8 T#21<;^ggfg1\d. ?AWh"u:U80gdalautotest-3.1.2/utilities/data/color_file.cpt0000664000175000017500000000026013701057752020451 0ustar eveneven# fake cpt file #COLOR_MODEL = RGB # 500 255 255 255 450 235 220 175 300 190 185 135 150 240 250 150 76 50 180 50 75 200 230 255 F 0 0 0 B 0 0 0 N 200 230 255 gdalautotest-3.1.2/utilities/data/onepixelthematic.img0000664000175000017500000002077413701057752021700 0ustar evenevenEHFA_HEADER_TAG@RdE rootroot`IAE RRLayer_161412787Eimg_Layer`IA Ehfa_Layer12787Ehfa_Layer`IA0 n0Statistics12787Esta_Statistics`IA?????F(StatisticsParametersEimg_StatisticsParameters830`IADescriptor_TableersEdsc_TableticsParameters830`IAjlFN#Bin_Function#eersEdsc_BinFunctionrameters830`IAo@5FHistogramion#eersEdsc_Columntionrameters830`IAo FzFHistogramParametersEimg_StatisticsParameters830`IAo@opion,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{1:Cdata,}RasterDMS,.R IMGFormatInfo87ImgFormatInfo831`IA7f M 4RasterDMS12787Edms_State`IAc g y `IA  fMap_Info12787Eprj_MapInfo`IA Unknown 1 I ??a other?:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.8gdalautotest-3.1.2/utilities/data/mstones.qpj0000664000175000017500000000040113701057752020025 0ustar evenevenGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] gdalautotest-3.1.2/utilities/data/mstones.cpg0000664000175000017500000000000513701057752020004 0ustar evenevenUTF-8gdalautotest-3.1.2/utilities/data/onepixelcontinuous.img0000664000175000017500000002077413701057752022310 0ustar evenevenEHFA_HEADER_TAG@RdE rootroot`IAE RRLayer_161412744Eimg_Layer`IA Ehfa_Layer12744Ehfa_Layer`IA0 n0Statistics12744Esta_Statistics`IA?????F(StatisticsParametersEimg_StatisticsParameters830`IAGGGGDescriptor_TableersEdsc_TableticsParameters830`IAjlFN#Bin_Function#eersEdsc_BinFunctionrameters830`IAo@v6FHistogramion#eersEdsc_Columntionrameters830`IAo FzFHistogramParametersEimg_StatisticsParameters830`IA (0@o@^opion,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{1:Cdata,}RasterDMS,.R IMGFormatInfo44ImgFormatInfo831`IA7f M 4RasterDMS12744Edms_State`IAc g y `IA  fMap_Info12744Eprj_MapInfo`IA Unknown 1 I ??a other?:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.8gdalautotest-3.1.2/utilities/data/mstones.prj0000664000175000017500000000021713701057752020033 0ustar evenevenGEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]gdalautotest-3.1.2/utilities/data/mstones.dbf0000664000175000017500000000047213701057752017776 0ustar eveneven_aidN posN **********18900.00000000000000 **********18100.00000000000000 **********16900.00000000000000 **********15900.00000000000000 **********14900.00000000000000 **********13700.00000000000000 **********12100.00000000000000gdalautotest-3.1.2/utilities/data/withnodata.asc0000664000175000017500000000023513701057752020460 0ustar evenevenncols 2 nrows 2 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 NODATA_value -999 -999 0 0 0 gdalautotest-3.1.2/utilities/data/grid.csv0000664000175000017500000002500413701057752017271 0ustar eveneven440750.000,3751290.000,107 440810.000,3751290.000,123 440870.000,3751290.000,132 440930.000,3751290.000,115 440990.000,3751290.000,132 441050.000,3751290.000,132 441110.000,3751290.000,140 441170.000,3751290.000,132 441230.000,3751290.000,132 441290.000,3751290.000,132 441350.000,3751290.000,107 441410.000,3751290.000,132 441470.000,3751290.000,107 441530.000,3751290.000,132 441590.000,3751290.000,132 441650.000,3751290.000,107 441710.000,3751290.000,123 441770.000,3751290.000,115 441830.000,3751290.000,156 441890.000,3751290.000,148 440750.000,3751230.000,115 440810.000,3751230.000,132 440870.000,3751230.000,107 440930.000,3751230.000,123 440990.000,3751230.000,148 441050.000,3751230.000,115 441110.000,3751230.000,165 441170.000,3751230.000,115 441230.000,3751230.000,140 441290.000,3751230.000,107 441350.000,3751230.000,123 441410.000,3751230.000,123 441470.000,3751230.000,99 441530.000,3751230.000,132 441590.000,3751230.000,123 441650.000,3751230.000,132 441710.000,3751230.000,132 441770.000,3751230.000,132 441830.000,3751230.000,99 441890.000,3751230.000,156 440750.000,3751170.000,115 440810.000,3751170.000,132 440870.000,3751170.000,140 440930.000,3751170.000,132 440990.000,3751170.000,123 441050.000,3751170.000,115 441110.000,3751170.000,140 441170.000,3751170.000,107 441230.000,3751170.000,140 441290.000,3751170.000,115 441350.000,3751170.000,132 441410.000,3751170.000,123 441470.000,3751170.000,107 441530.000,3751170.000,132 441590.000,3751170.000,132 441650.000,3751170.000,115 441710.000,3751170.000,115 441770.000,3751170.000,107 441830.000,3751170.000,115 441890.000,3751170.000,107 440750.000,3751110.000,148 440810.000,3751110.000,132 440870.000,3751110.000,123 440930.000,3751110.000,123 440990.000,3751110.000,115 441050.000,3751110.000,132 441110.000,3751110.000,132 441170.000,3751110.000,123 441230.000,3751110.000,115 441290.000,3751110.000,123 441350.000,3751110.000,115 441410.000,3751110.000,123 441470.000,3751110.000,107 441530.000,3751110.000,115 441590.000,3751110.000,148 441650.000,3751110.000,107 441710.000,3751110.000,115 441770.000,3751110.000,140 441830.000,3751110.000,115 441890.000,3751110.000,132 440750.000,3751050.000,132 440810.000,3751050.000,156 440870.000,3751050.000,132 440930.000,3751050.000,140 440990.000,3751050.000,132 441050.000,3751050.000,132 441110.000,3751050.000,115 441170.000,3751050.000,115 441230.000,3751050.000,115 441290.000,3751050.000,123 441350.000,3751050.000,148 441410.000,3751050.000,123 441470.000,3751050.000,165 441530.000,3751050.000,123 441590.000,3751050.000,132 441650.000,3751050.000,107 441710.000,3751050.000,107 441770.000,3751050.000,132 441830.000,3751050.000,156 441890.000,3751050.000,123 440750.000,3750990.000,189 440810.000,3750990.000,173 440870.000,3750990.000,173 440930.000,3750990.000,148 440990.000,3750990.000,148 441050.000,3750990.000,115 441110.000,3750990.000,148 441170.000,3750990.000,123 441230.000,3750990.000,107 441290.000,3750990.000,132 441350.000,3750990.000,115 441410.000,3750990.000,132 441470.000,3750990.000,156 441530.000,3750990.000,99 441590.000,3750990.000,123 441650.000,3750990.000,115 441710.000,3750990.000,132 441770.000,3750990.000,132 441830.000,3750990.000,206 441890.000,3750990.000,107 440750.000,3750930.000,197 440810.000,3750930.000,173 440870.000,3750930.000,148 440930.000,3750930.000,140 440990.000,3750930.000,140 441050.000,3750930.000,132 441110.000,3750930.000,99 441170.000,3750930.000,132 441230.000,3750930.000,123 441290.000,3750930.000,115 441350.000,3750930.000,140 441410.000,3750930.000,132 441470.000,3750930.000,132 441530.000,3750930.000,99 441590.000,3750930.000,132 441650.000,3750930.000,123 441710.000,3750930.000,132 441770.000,3750930.000,173 441830.000,3750930.000,123 441890.000,3750930.000,115 440750.000,3750870.000,148 440810.000,3750870.000,123 440870.000,3750870.000,148 440930.000,3750870.000,115 440990.000,3750870.000,148 441050.000,3750870.000,123 441110.000,3750870.000,140 441170.000,3750870.000,123 441230.000,3750870.000,107 441290.000,3750870.000,115 441350.000,3750870.000,132 441410.000,3750870.000,115 441470.000,3750870.000,107 441530.000,3750870.000,115 441590.000,3750870.000,99 441650.000,3750870.000,123 441710.000,3750870.000,99 441770.000,3750870.000,181 441830.000,3750870.000,99 441890.000,3750870.000,107 440750.000,3750810.000,123 440810.000,3750810.000,115 440870.000,3750810.000,132 440930.000,3750810.000,115 440990.000,3750810.000,123 441050.000,3750810.000,132 441110.000,3750810.000,115 441170.000,3750810.000,132 441230.000,3750810.000,132 441290.000,3750810.000,123 441350.000,3750810.000,123 441410.000,3750810.000,132 441470.000,3750810.000,99 441530.000,3750810.000,115 441590.000,3750810.000,99 441650.000,3750810.000,123 441710.000,3750810.000,132 441770.000,3750810.000,115 441830.000,3750810.000,115 441890.000,3750810.000,107 440750.000,3750750.000,140 440810.000,3750750.000,140 440870.000,3750750.000,99 440930.000,3750750.000,140 440990.000,3750750.000,99 441050.000,3750750.000,115 441110.000,3750750.000,123 441170.000,3750750.000,107 441230.000,3750750.000,132 441290.000,3750750.000,107 441350.000,3750750.000,115 441410.000,3750750.000,107 441470.000,3750750.000,115 441530.000,3750750.000,123 441590.000,3750750.000,132 441650.000,3750750.000,123 441710.000,3750750.000,107 441770.000,3750750.000,123 441830.000,3750750.000,132 441890.000,3750750.000,132 440750.000,3750690.000,132 440810.000,3750690.000,132 440870.000,3750690.000,132 440930.000,3750690.000,123 440990.000,3750690.000,99 441050.000,3750690.000,132 441110.000,3750690.000,123 441170.000,3750690.000,107 441230.000,3750690.000,148 441290.000,3750690.000,99 441350.000,3750690.000,115 441410.000,3750690.000,123 441470.000,3750690.000,140 441530.000,3750690.000,173 441590.000,3750690.000,123 441650.000,3750690.000,107 441710.000,3750690.000,123 441770.000,3750690.000,123 441830.000,3750690.000,123 441890.000,3750690.000,107 440750.000,3750630.000,123 440810.000,3750630.000,123 440870.000,3750630.000,123 440930.000,3750630.000,107 440990.000,3750630.000,140 441050.000,3750630.000,123 441110.000,3750630.000,123 441170.000,3750630.000,115 441230.000,3750630.000,115 441290.000,3750630.000,90 441350.000,3750630.000,107 441410.000,3750630.000,173 441470.000,3750630.000,107 441530.000,3750630.000,107 441590.000,3750630.000,107 441650.000,3750630.000,107 441710.000,3750630.000,99 441770.000,3750630.000,132 441830.000,3750630.000,123 441890.000,3750630.000,115 440750.000,3750570.000,173 440810.000,3750570.000,148 440870.000,3750570.000,99 440930.000,3750570.000,123 440990.000,3750570.000,123 441050.000,3750570.000,107 441110.000,3750570.000,123 441170.000,3750570.000,99 441230.000,3750570.000,107 441290.000,3750570.000,189 441350.000,3750570.000,173 441410.000,3750570.000,107 441470.000,3750570.000,115 441530.000,3750570.000,115 441590.000,3750570.000,107 441650.000,3750570.000,99 441710.000,3750570.000,140 441770.000,3750570.000,107 441830.000,3750570.000,173 441890.000,3750570.000,140 440750.000,3750510.000,148 440810.000,3750510.000,132 440870.000,3750510.000,132 440930.000,3750510.000,107 440990.000,3750510.000,123 441050.000,3750510.000,99 441110.000,3750510.000,99 441170.000,3750510.000,115 441230.000,3750510.000,99 441290.000,3750510.000,132 441350.000,3750510.000,99 441410.000,3750510.000,140 441470.000,3750510.000,115 441530.000,3750510.000,148 441590.000,3750510.000,123 441650.000,3750510.000,99 441710.000,3750510.000,132 441770.000,3750510.000,123 441830.000,3750510.000,148 441890.000,3750510.000,140 440750.000,3750450.000,140 440810.000,3750450.000,107 440870.000,3750450.000,140 440930.000,3750450.000,90 440990.000,3750450.000,107 441050.000,3750450.000,115 441110.000,3750450.000,107 441170.000,3750450.000,90 441230.000,3750450.000,99 441290.000,3750450.000,123 441350.000,3750450.000,115 441410.000,3750450.000,115 441470.000,3750450.000,115 441530.000,3750450.000,123 441590.000,3750450.000,123 441650.000,3750450.000,148 441710.000,3750450.000,115 441770.000,3750450.000,148 441830.000,3750450.000,99 441890.000,3750450.000,132 440750.000,3750390.000,165 440810.000,3750390.000,148 440870.000,3750390.000,156 440930.000,3750390.000,123 440990.000,3750390.000,107 441050.000,3750390.000,107 441110.000,3750390.000,107 441170.000,3750390.000,115 441230.000,3750390.000,140 441290.000,3750390.000,99 441350.000,3750390.000,115 441410.000,3750390.000,99 441470.000,3750390.000,99 441530.000,3750390.000,107 441590.000,3750390.000,115 441650.000,3750390.000,132 441710.000,3750390.000,115 441770.000,3750390.000,90 441830.000,3750390.000,123 441890.000,3750390.000,115 440750.000,3750330.000,189 440810.000,3750330.000,173 440870.000,3750330.000,140 440930.000,3750330.000,140 440990.000,3750330.000,165 441050.000,3750330.000,115 441110.000,3750330.000,132 441170.000,3750330.000,90 441230.000,3750330.000,99 441290.000,3750330.000,115 441350.000,3750330.000,90 441410.000,3750330.000,99 441470.000,3750330.000,99 441530.000,3750330.000,107 441590.000,3750330.000,99 441650.000,3750330.000,132 441710.000,3750330.000,99 441770.000,3750330.000,107 441830.000,3750330.000,132 441890.000,3750330.000,132 440750.000,3750270.000,156 440810.000,3750270.000,181 440870.000,3750270.000,140 440930.000,3750270.000,173 440990.000,3750270.000,123 441050.000,3750270.000,132 441110.000,3750270.000,99 441170.000,3750270.000,115 441230.000,3750270.000,123 441290.000,3750270.000,74 441350.000,3750270.000,115 441410.000,3750270.000,99 441470.000,3750270.000,123 441530.000,3750270.000,140 441590.000,3750270.000,156 441650.000,3750270.000,132 441710.000,3750270.000,165 441770.000,3750270.000,140 441830.000,3750270.000,140 441890.000,3750270.000,99 440750.000,3750210.000,173 440810.000,3750210.000,247 440870.000,3750210.000,255 440930.000,3750210.000,206 440990.000,3750210.000,132 441050.000,3750210.000,107 441110.000,3750210.000,140 441170.000,3750210.000,123 441230.000,3750210.000,148 441290.000,3750210.000,132 441350.000,3750210.000,165 441410.000,3750210.000,165 441470.000,3750210.000,148 441530.000,3750210.000,140 441590.000,3750210.000,132 441650.000,3750210.000,123 441710.000,3750210.000,107 441770.000,3750210.000,123 441830.000,3750210.000,107 441890.000,3750210.000,123 440750.000,3750150.000,181 440810.000,3750150.000,181 440870.000,3750150.000,156 440930.000,3750150.000,148 440990.000,3750150.000,156 441050.000,3750150.000,156 441110.000,3750150.000,156 441170.000,3750150.000,181 441230.000,3750150.000,132 441290.000,3750150.000,148 441350.000,3750150.000,115 441410.000,3750150.000,132 441470.000,3750150.000,107 441530.000,3750150.000,107 441590.000,3750150.000,107 441650.000,3750150.000,107 441710.000,3750150.000,107 441770.000,3750150.000,115 441830.000,3750150.000,99 441890.000,3750150.000,107 gdalautotest-3.1.2/utilities/data/unstable_rpc_with_dem_blank_output.tif0000664000175000017500000000251313701057752025463 0ustar evenevenII*|7O7=RS  0 DT Red Alpha .03@I&d'3@ e<5hAtuzCA 2 2#    ? )#@TXAmtr@PCS Name = WGS_1984_Web_Mercator_Auxiliary_Sphere|GCS_WGS_1984|ESRI PE String = PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]|xàSU|ugdalautotest-3.1.2/utilities/data/pyramid_shaded_ref.tif0000664000175000017500000000313213701057752022142 0ustar evenevenII*ddQ=S   2 r{Gz?{Gz?@H@#  mtr@@TXAWGS 84| P8$ BaPd6ObQ8V-FcQv($M'Zp"܊#(LfQSY-S,7K:$}wOeOO4 dWTtmVsXG+U6aEvK-ziur,jz(߂a0lDcf8G%&eryMhiWM%9hY%OjjuM-]t;MonnOq6o#/Cv]gCahmw<~J~zo5CG?M2Sj@B@, 7s1N B 50LH7íYQ|a0 FsƑԯZOU?<ӕ_6/%gV#\ o'kUWeg\fQ]rj67m(ڌM!Gs+usݭ3!{s+lEv>wwy`5.9 p8$ 3!Xd6DbQ89bu;QuAPTVM'Eb?!0Lm(ˣ K7Pb3ny=M(T]G:lb/T:[PV9z;`R=0.S\Q;uybkF׬lF6PcqZ>G%2|ă74Z=&MjuZfddQ=S    BR0}{Gz?{Gz?@H@#  mtr@@TXAWGS 84|gdalautotest-3.1.2/utilities/data/whiteblackred.tif0000664000175000017500000001675213701057752021155 0ustar evenevenII* 222LSgdalautotest-3.1.2/utilities/data/dataforogr2ogr21.csv0000664000175000017500000000005413701057752021427 0ustar evenevencomment,name,WKT COMMENT,NAME,POINT(2 49) gdalautotest-3.1.2/utilities/data/duplicatedfields.csv0000664000175000017500000000011413701057752021644 0ustar evenevenfoo,bar,foo,foo2,baz,foo val_foo,val_bar,val_foo3,val_foo2,val_baz,val_foo4 gdalautotest-3.1.2/utilities/data/cutline.vrt0000664000175000017500000000173213701057752020031 0ustar eveneven cutline.csv cutline wkbPolygon PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982139006, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]] gdalautotest-3.1.2/utilities/data/mstones.shp0000664000175000017500000000045013701057752020031 0ustar eveneven'  )dbI@Hi`I@ Gti`I@ \Sx #I@ HI@ ҙ 6I@  :A S_SI@ fL겕lI@  )dbI@gdalautotest-3.1.2/utilities/data/unstable_rpc_with_dem_source.tif0000664000175000017500000001203513701057752024254 0ustar evenevenII*  E=S \} @@K7Q6@M\@ @@@qHP?0@ĭ?8l?% XLP^"޺_ a?-G#ЉpΠ?E>bճfuaqXA?(80a&?f;7o?O n Xt=2va-?|&z?/N?.s?UN0??jqj9xu+j?xH?BFf;8v?ybxfEc ?XG?~! K1겿WmC> =<7I_ž Qe[|.|J>QD')}q>rD#DHxǾ :V+IgпؿsUҿ6%?Bc?t?S^ V?Oָ?y8.?F wa#hb4v2lUE[9MQQ"? .FKM%r-?Ī3vuhN?G ?/1űT4=?tN5H맑?ah@?<:?2:%qNユj:w4>as?M)׳>'(1V bOO>]vax  oTx  o787hJgdalautotest-3.1.2/utilities/data/path.prj0000664000175000017500000000021713701057752017277 0ustar evenevenGEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]gdalautotest-3.1.2/utilities/data/utmsmall.tif.aux.xml0000664000175000017500000000230113701060014021540 0ustar eveneven -0.498046875 255.498046875 256 0 0 2|0|0|0|0|0|0|0|8|0|0|0|0|0|0|0|23|0|0|0|0|0|0|0|0|29|0|0|0|0|0|0|0|46|0|0|0|0|0|0|0|69|0|0|0|0|0|0|0|99|0|0|0|0|0|0|0|0|120|0|0|0|0|0|0|0|178|0|0|0|0|0|0|0|193|0|0|0|0|0|0|0|212|0|0|0|0|0|0|0|281|0|0|0|0|0|0|0|0|365|0|0|0|0|0|0|0|460|0|0|0|0|0|0|0|533|0|0|0|0|0|0|0|544|0|0|0|0|0|0|0|0|626|0|0|0|0|0|0|0|653|0|0|0|0|0|0|0|673|0|0|0|0|0|0|0|629|0|0|0|0|0|0|0|0|586|0|0|0|0|0|0|0|541|0|0|0|0|0|0|0|435|0|0|0|0|0|0|0|348|0|0|0|0|0|0|0|341|0|0|0|0|0|0|0|0|284|0|0|0|0|0|0|0|225|0|0|0|0|0|0|0|237|0|0|0|0|0|0|0|172|0|0|0|0|0|0|0|0|159|0|0|0|0|0|0|0|105|0|0|0|0|0|0|0|824 255 154.6212 0 54.250980733624 test value gdalautotest-3.1.2/utilities/data/Fields.csv0000664000175000017500000000030013701057752017542 0ustar evenevena,A_1,a_1_2,aaaaaAAAAAb,aAaaaAAAAAc,aaaaaAAAABa,aaaaaAAAABb,aaaaaAAAABc,aaaaaAAAABd,aaaaaAAAABe,aaaaaAAAABf,aaaaaAAAABg,aaaaaAAAABh,aaaaaAAAABi,aaaaaAAAABj 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 gdalautotest-3.1.2/utilities/data/test_gdalwarp_lib_129_upper_left.tif0000664000175000017500000000111213701057752024633 0ustar evenevenII*   S   * jz-32768`4"?f`4"?҅Cffffff?#  mtr@@TXAWGS 84|ABBBBBBAABAAABBAAA@@@@AAAA@@???@@@@???>>??????>>>>>>>>>>====>======<<<>====<<<<;>>===<<<;;>>>==<<<;;gdalautotest-3.1.2/utilities/data/test_gdalwarp_lib_129_upper_right.tif0000664000175000017500000000111213701057752025016 0ustar evenevenII*   S   * jz-32768`4"?`4"?\x^2DD?#  mtr@@TXAWGS 84|%#! #!!          #""""""!! %%$$$###""gdalautotest-3.1.2/utilities/test_gdaltindex.py0000775000175000017500000002573013701060014020444 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdaltindex.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdaltindex testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import ogr from osgeo import osr import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdaltindex_1(): if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() try: os.remove('tmp/tileindex.shp') except OSError: pass try: os.remove('tmp/tileindex.dbf') except OSError: pass try: os.remove('tmp/tileindex.shx') except OSError: pass try: os.remove('tmp/tileindex.prj') except OSError: pass drv = gdal.GetDriverByName('GTiff') wkt = 'GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]' ds = drv.Create('tmp/gdaltindex1.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([49, 0.1, 0, 2, 0, -0.1]) ds = None ds = drv.Create('tmp/gdaltindex2.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([49, 0.1, 0, 3, 0, -0.1]) ds = None ds = drv.Create('tmp/gdaltindex3.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([48, 0.1, 0, 2, 0, -0.1]) ds = None ds = drv.Create('tmp/gdaltindex4.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([48, 0.1, 0, 3, 0, -0.1]) ds = None (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' tmp/tileindex.shp tmp/gdaltindex1.tif tmp/gdaltindex2.tif') assert (err is None or err == ''), 'got error/warning' (ret_stdout, ret_stderr) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' tmp/tileindex.shp tmp/gdaltindex3.tif tmp/gdaltindex4.tif') ds = ogr.Open('tmp/tileindex.shp') if ds.GetLayer(0).GetFeatureCount() != 4: print(ret_stdout) pytest.fail(ret_stderr) tileindex_wkt = ds.GetLayer(0).GetSpatialRef().ExportToWkt() if tileindex_wkt.find('WGS_1984') == -1: print(ret_stdout) pytest.fail(ret_stderr) expected_wkts = ['POLYGON ((49 2,50 2,50 1,49 1,49 2))', 'POLYGON ((49 3,50 3,50 2,49 2,49 3))', 'POLYGON ((48 2,49 2,49 1,48 1,48 2))', 'POLYGON ((48 3,49 3,49 2,48 2,48 3))'] i = 0 feat = ds.GetLayer(0).GetNextFeature() while feat is not None: assert feat.GetGeometryRef().ExportToWkt() == expected_wkts[i], \ ('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) i = i + 1 feat = ds.GetLayer(0).GetNextFeature() ds.Destroy() ############################################################################### # Try adding the same rasters again def test_gdaltindex_2(): if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() (_, ret_stderr) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' tmp/tileindex.shp tmp/gdaltindex1.tif tmp/gdaltindex2.tif tmp/gdaltindex3.tif tmp/gdaltindex4.tif') assert (not (ret_stderr.find('File tmp/gdaltindex1.tif is already in tileindex. Skipping it.') == -1 or \ ret_stderr.find('File tmp/gdaltindex2.tif is already in tileindex. Skipping it.') == -1 or \ ret_stderr.find('File tmp/gdaltindex3.tif is already in tileindex. Skipping it.') == -1 or \ ret_stderr.find('File tmp/gdaltindex4.tif is already in tileindex. Skipping it.') == -1)), \ 'got unexpected error messages.' ds = ogr.Open('tmp/tileindex.shp') assert ds.GetLayer(0).GetFeatureCount() == 4 ds.Destroy() ############################################################################### # Try adding a raster in another projection with -skip_different_projection # 5th tile should NOT be inserted def test_gdaltindex_3(): if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') wkt = """GEOGCS["WGS 72", DATUM["WGS_1972", SPHEROID["WGS 72",6378135,298.26], TOWGS84[0,0,4.5,0,0,0.554,0.2263]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""" ds = drv.Create('tmp/gdaltindex5.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([47, 0.1, 0, 2, 0, -0.1]) ds = None (_, ret_stderr) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' -skip_different_projection tmp/tileindex.shp tmp/gdaltindex5.tif') assert (not (ret_stderr.find('Warning : tmp/gdaltindex5.tif is not using the same projection system as other files in the tileindex.') == -1 or \ ret_stderr.find('Use -t_srs option to set target projection system (not supported by MapServer).') == -1)), \ ('got unexpected error message \n[%s]' % (ret_stderr)) ds = ogr.Open('tmp/tileindex.shp') assert ds.GetLayer(0).GetFeatureCount() == 4 ds.Destroy() ############################################################################### # Try adding a raster in another projection with -t_srs # 5th tile should be inserted, will not be if there is a srs transformation error def test_gdaltindex_4(): if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') wkt = """GEOGCS["WGS 72", DATUM["WGS_1972", SPHEROID["WGS 72",6378135,298.26], TOWGS84[0,0,4.5,0,0,0.554,0.2263]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""" ds = drv.Create('tmp/gdaltindex5.tif', 10, 10, 1) ds.SetProjection(wkt) ds.SetGeoTransform([47, 0.1, 0, 2, 0, -0.1]) ds = None gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' -t_srs EPSG:4326 tmp/tileindex.shp tmp/gdaltindex5.tif') ds = ogr.Open('tmp/tileindex.shp') assert ds.GetLayer(0).GetFeatureCount() == 5, \ ('got %d features, expecting 5' % ds.GetLayer(0).GetFeatureCount()) ds.Destroy() ############################################################################### # Test -src_srs_name, -src_srs_format options def test_gdaltindex_5(): if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() drv = gdal.GetDriverByName('GTiff') ds = drv.Create('tmp/gdaltindex6.tif', 10, 10, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(4322) ds.SetProjection(sr.ExportToWkt()) ds.SetGeoTransform([47, 0.1, 0, 2, 0, -0.1]) ds = None for src_srs_format in ['', '-src_srs_format AUTO', '-src_srs_format EPSG', '-src_srs_format PROJ', '-src_srs_format WKT']: gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_gdaltindex_5.shp') gdal.PopErrorHandler() gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' -src_srs_name src_srs %s -t_srs EPSG:4326 tmp/test_gdaltindex_5.shp tmp/gdaltindex1.tif tmp/gdaltindex6.tif' % src_srs_format) ds = ogr.Open('tmp/test_gdaltindex_5.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 2, \ ('got %d features, expecting 2' % ds.GetLayer(0).GetFeatureCount()) feat = lyr.GetNextFeature() feat = lyr.GetNextFeature() if src_srs_format == '-src_srs_format PROJ': if feat.GetField('src_srs').find('+proj=longlat +ellps=WGS72') != 0: feat.DumpReadable() pytest.fail() elif src_srs_format == '-src_srs_format WKT': #if feat.GetField('src_srs').find('GEOGCS["WGS 72"') != 0: # Full definition too long... if feat.GetField('src_srs') is not None: feat.DumpReadable() pytest.fail() else: if feat.GetField('src_srs') != 'EPSG:4322': feat.DumpReadable() pytest.fail() ds = None ############################################################################### # Test -f, -lyr_name def test_gdaltindex_6(): if test_cli_utilities.get_gdaltindex_path() is None: pytest.skip() for option in ['', '-lyr_name tileindex']: gdal.PushErrorHandler('CPLQuietErrorHandler') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_gdaltindex_6.mif') gdal.PopErrorHandler() gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdaltindex_path() + ' -f "MapInfo File" %s tmp/test_gdaltindex_6.mif tmp/gdaltindex1.tif' % option) ds = ogr.Open('tmp/test_gdaltindex_6.mif') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1, \ ('got %d features, expecting 1' % lyr.GetFeatureCount()) ds = None ############################################################################### # Cleanup def test_gdaltindex_cleanup(): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/tileindex.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_gdaltindex_5.shp') ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/test_gdaltindex_6.mif') drv = gdal.GetDriverByName('GTiff') drv.Delete('tmp/gdaltindex1.tif') drv.Delete('tmp/gdaltindex2.tif') drv.Delete('tmp/gdaltindex3.tif') drv.Delete('tmp/gdaltindex4.tif') drv.Delete('tmp/gdaltindex5.tif') drv.Delete('tmp/gdaltindex6.tif') gdalautotest-3.1.2/utilities/test_gdalmdiminfo.py0000775000175000017500000000410613701060014020745 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalmdiminfo.py 9598f66a2ef90ef40fc3274e54d5d723ad597b0f 2019-07-13 00:03:57 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdalmdiminfo testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdalmdiminfo_1(): if test_cli_utilities.get_gdalmdiminfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalmdiminfo_path() + ' data/mdim.vrt') assert (err is None or err == ''), 'got error/warning' assert '"type": "group"' in ret gdalautotest-3.1.2/utilities/tmp/0000775000175000017500000000000013701057752015515 5ustar evenevengdalautotest-3.1.2/utilities/tmp/do-not-remove0000664000175000017500000000000013701057752020121 0ustar evenevengdalautotest-3.1.2/utilities/ref_data/0000775000175000017500000000000013701057752016462 5ustar evenevengdalautotest-3.1.2/utilities/ref_data/grid_average_300_100_40.tif0000664000175000017500000000674613701057752023067 0ustar evenevenII*@f S   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|*^@q]@NN,_@`@`@"`@D`@F`@`@_@x^@x^@]@X^@8^@<^@_@_@_@;{_@fffff^@۶m۶M_@`@1 0 C`@1 0 C`@<\`@%I$IR`@m۶m_@<<_@zy^@<<^@<<^@=@>@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|mqw}}yz{uuzztt||utwyyosy||zy|~yuvzxrs{}yxz||~rv{|ywy{vvyzvpqz~|}~}{{tx}~{z|~}yvx{zuoqz~}}}}{wswwz~{|zzx{}{vprz{yxwvsqsw{~|zz~zy}~zy{|{vqryyttuvuttuv}zz}{xyzyyz{zwtswxqrw||zxz{~|}}zwvwy{}}|||{z~wpqw}zwutvz~~uopv~|xusuz{|{uqsy||wsuz~|twyvvyx~~zvvz}~vpvzyzu|yy||ywx|}rov{{||t}xx||xvvz}wpotxzz}zsq~~}zvsty}xtronorvwxqmm~{wuvy}~{upnomkmsvw{nkk}}{z}}}~~}{yz{}{volonkmtyz}wpnm~|{{zyxx{{zy{}~zwxyyuonqrqrwzzzzyxvts}ww{zsquxxwvy~}wstutsrtxzzyyxvvxz|||{yx|ypnsxyvsw~}toprsux~}xutux|~~|{}|{wpov{{vsw~rlotx|{trtvy||zwu}yusv{}|wtw}zoinwupoqvz||xtq|yvvz}}|{wttwtmjp}||zuomlnsz~~{vtytsw}~{yyvrprux||sqpnkjloty|wrsx{zvtutolo{~vsrqnkinvzzystwxvpnpoljm|yvvyxsmjpz~|~xssusmijkkjku~|yzzrnq{~zqnpqmihhihhoy{vuz|y{~yvw{~|piknnljgeegmtvssvvuw|~}~}~|{tkkmnnlighlpssrqpooquwy~|y{yuuy}}sponnmllpuvqoonkiiknqt{yropruxy}ysqqpnpuupkjifeegjlov||uliltzzz|vvrljmomifdcdegklnt{{tmkqy~~}zvqkhjjhedddfinruwz|xwz}zztpnoplechkklrx~wr|yuttx{vllv|{{{to®{z}~}~~}~~|xuss~|xursutpoqszwvtsqonoqpljmowqonnmmllnpnjhjlgdalautotest-3.1.2/utilities/ref_data/testgdalwarp12.tif0000664000175000017500000000364613701057752022043 0ustar evenevenII*((f(@S   J>@>@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kow}ww~qq~~qq~~qowyu}mqy}~|wzzst}|op}~utz|y}qu~~usw}|wsvy|wkm|}~|u{swtqyuzysqlz}ufi~~}xeqsw}rxqpvr~vknywwupmnquw{}yvu{rqyv~~wlm{uoqrpqssrq~}ztu}{wxxzxuv{wjhp~tkpxtv{~}z}|vx~|xrsy|zz{zxur{shmw~~xsttstx}|qhhp}~{xusqsy~v}qkms|wyytlp{y~shw{ss{~|­ozxypq~xxjcw}vxmý{mn~{wvzgf}|{yq|ll}{vqwxiiy}zxtrq||}yolowzsqppnjmyvfywjlm~zvu~yqosxzriirpbdvxhushjk~xvur~zz}{{||hdpobdu~~}rnlk~{x{{ywtwut|{wx{zjfqrkmw~~sqvvsqklnhrwywqtsostqnmotx}~~yrpuz~~mmhbpy|xkoohprlmv~{tnox~~~yddz~vjrneotrwxpovzz|~ztqzrlp~wmth^ivqkksy}}{wpm}}}|{op}|ytt{s[T_x~pwwqmlidk~{ytq}wrmt|w{zrooonpuwffgijiihnz}ylfs||qq{yjdfzsqpnmkhckpyohu{|vkjtticbzwkqvzyrjajowxqr{whbejpndnytuxpafw}~lguujdbemlbg{zehwxwop|xrd[ipqokf`]]fx|qpxyuw|y|ru}vi]ekqrng_`hotvusonoquwwxujoz|mhgkljjlumhssieehlos{yoggqvww}zunlppntlelldaacgjlstgZ_w|ywxq{e^gmrna]ababggaii_`j|w~xc\bfjh_\`cejpqmsuoqx~|}lfkoulTRdi`bnyskw~{liqzxYYwts~}piٻvnp~w{y}|yz~utuuɲ|}|ytnnuumlsw{utsrqpnlmrqiglo{w~qkkkkkkkkmqogeikgdalautotest-3.1.2/utilities/ref_data/grid_maximum.tif0000664000175000017500000000136613701057752021656 0ustar evenevenII*fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|gdalautotest-3.1.2/utilities/ref_data/grid_invdist_90_90_8p.tif0000664000175000017500000000674613701057752023117 0ustar evenevenII*@f S   JM@fffffN@DA̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|M~`@gZ@L^@.~b@e\@?d@Uz\@ɪ7_~a@pSyZ@S)^@\8[^@w(aX@!όn`@^@r{`@\w`@xY`@d#X@`@`X~a@1Ƈ`@r;Ru^@_N\@\'a@6QZ@ܴc~a@\@(Q`@"3x^@F Z@{`@j`@?e\@'\@E:`@Z@Ue=\@ W`@1^@D^@\@h1U`@̜օ`@Q^@uq\@^@@b-m?\@?^@o%oZ@|;\@(~b@, Z@+\@o9a@ 0 \@=eyRc@}:f `@ļa@5.`@CZ`@{{y\@ɹ\@T4X\@c^@/J~b@:&^@Lږe^d@!^@`@D0Z@QZ@vs %`@\lc@0ue@_"ve@Drb@a}-b@Zh\@SVn~b@ѿ^@ZtkZ@z|X`@rs\@nϓ+`@aE~c@2X@ѦE^@a*xx\@ k]`@`@#@i@&1$5e@ePBFb@q3a@CFa@`@,L7=X@;S3s`@f^,^@ N\@-hfa@Nz`@M`@:?BX@'sm`@Az^@< `@@'e@즣^@3NB^@B~b@4Շ\@5-|~b@T^@I? a@^@܅LZ@j g\@"U`@9U\@{54Z@hϧ\@q~?X@T)^@2uX@=f@DQX@:\@(?2v`@x12\@'^@;`@wI3\@X9`@m`@%a]ο^@ݿ^@Z{`@н[X@@ȿ\@9X@wO^@&`@ǚ~\@]3\@*/ a@oX@r:l~a@\X@ZtAda\@d ^@έ|RZ@b`@XZ@Qj\@*&Z@8Ki^\@-^@Ej{`@koҿ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ss\@g`<\@L\@v)Y\@0E>]@"ui]@)Y7]@S䳮]@v)Y]@[^@n0E^@<<<<<_@rO#,_@."_@.bd@,4rc@Ҳb@o0E>a@"u`@a| f_@S.^@)Y7X]@n0E>]@Sn\@"ui]@v)Yw]@Ϻ]@n0E>^@]@v)Yw^@`|M^@-----^@O#,4^@]tE}^@33333Ke@`d@`c@iiiiib@a@xxxxx`@`@KKKKK^@ ^@0^@]@]@]@4^@a^@o^@^@^@؉]@l]@%f@E]t!e@N^d@jFxc@=b@FXia@i垆`@FXi_@{Z_@5rO#^@=ܓ^@=p^@{]@jF^@a^@=p^@FXi^@ى؉]@tE]t]@^@;;f@e@fffffd@.bd@/袋~c@]tEwb@.a@颋.8`@tE]`@颋.`@袋._@^@/袋n_@^@F]tх_@]tE^@F]te^@33333]@]@;;q]@gdalautotest-3.1.2/utilities/ref_data/grid_count_300_300.tif0000664000175000017500000000136613701057752022275 0ustar evenevenII*fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|$)-..........-)$%+16777777777761+%$+29?@@@@@@@@@@?92+$)19AHIIIIIIIIIIHA91)-6?HOPPPPPPPPPPOH?6-.7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7..7@IPQQQQQQQQQQPI@7.-6?HOPPPPPPPPPPOH?6-)19AHIIIIIIIIIIHA91)$+29?@@@@@@@@@@?92+$%+16777777777761+%$)-..........-)$gdalautotest-3.1.2/utilities/ref_data/grid_minimum_400_100_120.tif0000664000175000017500000000136613701057752023201 0ustar evenevenII*fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kkkkskkkkkcccckkcccckkkcckkkkkcccckkkccckkkccckkkkcccccccccckkkcccckkcccccccccccccckccckkccccccccccccccccccckcccccccccccccccccZZckccccccccccccccccZZZcccccccccccccccccZZZZkcccccccccZZccZZcZZZccccccccccZZZcZZZZZZZkccZZccccZZZZZZZZZZZcccZZZccckZZZZZJJZZZZccZZZZcckZZZZZJJJZZZcccZZZcckkZZZZJJJJZZZccZZZZckkZZZZZJJJZZZcccZZZckkZZZZJJJJZZcccZZZZkkZZZZZJJJZZccccZZZkkZZZZJJJJZccccZZZkkZZZZJJJZZccccZZgdalautotest-3.1.2/utilities/ref_data/grid_minimum.tif0000664000175000017500000000136613701057752021654 0ustar evenevenII*fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJgdalautotest-3.1.2/utilities/ref_data/grid_invdistnn_250_8minp.tif0000664000175000017500000000676213701057752023723 0ustar evenevenII*@r S   V0M@fffffN@DA̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|/$5sZ@̿^@50.`@/I\\@ju`@FZL `@[a@4k`@<"R`@/L&Z`@Z@=U `@4m`ތZ@`@#i`@m@Z@hpMC^@sg\@~c@vb@xO\@~`@%[Z@|i^@}b@2\@d@,xC\@Sܧ~a@6Z@C ^@T^@5sX@ ``@LQ^@8+o`@mY`@Ki`@eX@Z~c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|{uy}|xrrx|{zzzytp}udiz|x|vpsutru||seeq~}zuqpsy{t|~qjmpvlwypip}wzuft{sr|zuʽ]ķyxxor~wu~h`vxx±^Ȼykn~~vvzed|~ywn{ik|~snw~wijyvr~dmw{}{xpklxzpoqqnjp}s_{yYfstyus}xpnrz{qgjtp`bwvfvw^dk~wnuto}{||{{{{gdrqa`r~}rigg~}{yyz{xsw~tr{|wv|{idmqlmw}qnwytq}hkpfpyyuputnrusollou{yroryjni]l|vhnphqrijv|slox|~yb`vsfrrequorwnpv{z||up~}}zokstkxgVbxmhlrz~~zrjfvvw}}nn}|xsxsYJTzmw|rllhbl{pmm}vnjv|v{{smmoqrux`_egjkigmy}xjdp~|qr|{l_a{ronjiifcm~ozmht}shisum`_}ôtgnz~}vf[kmuwqu|wh_clsmcp}ttyl[fty|}jesxmb`fnk`fyu_exwvopyoqdXhtrokf`ZYexzmlx|vw}v|qltvkY_kqsof_`jrtwzvoknqttuxvifw~jbeknjgjxkftwjbeilot~}oghotts~|wlkqqnvnejlf`_bghhq~uaS\w{tvo~g\frvpb]bdabgd]h~iWYh{x~xcY\ejf]X]adjqqmtxpr||meiqthSP`f]]kxpcưqzzkel}xVVxxs~ka༎ogq|}szvy|z~wsuwгs{{yyqegtthiu~Ż{ppqonokgjsqedlrrky{kbdhiiijkpspfcfigdalautotest-3.1.2/utilities/ref_data/grid_avdist.tif0000664000175000017500000000674613701057752021502 0ustar evenevenII*@f S   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|̽-z@;0U@{biK@k^@64@6Ӓ4@:0ߒX@߲)@2rK@-@-@1rK@ݲ)@80ߒX@8Ӓ4@64@k^@{biK@;0U@̽-z@;0U@x#@wF3@;{@ƻ"WD@7 @)%Y@P@]+J@΍q%&@ύq%&@]+J@P@)%Y@7 @ƻ"WD@;{@wF3@x#@;0U@zbiK@wF3@[]@ @q@U@]@Jlǃ@$fW@o @AJ͌X@AJ͌X@o @$fW@Jlǃ@U@]@q@ @[]@ wF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\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@)\_@gdalautotest-3.1.2/utilities/test_gdalsrsinfo.py0000775000175000017500000003353113701060014020632 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalsrsinfo.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdalsrsinfo testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2011-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdalsrsinfo_1(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalsrsinfo_path() + ' ../gcore/data/byte.tif', encoding='utf-8') assert (err is None or err == ''), 'got error/warning' assert ret.find('PROJ.4 :') != -1, ret assert ret.find('OGC WKT2:2018 :') != -1, ret ############################################################################### # Test -o proj4 option def test_gdalsrsinfo_2(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -o proj4 ../gcore/data/byte.tif') assert ret.strip() == "+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs" ############################################################################### # Test -o wkt1 option def test_gdalsrsinfo_3(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' --single-line -o wkt1 ../gcore/data/byte.tif') assert ret.strip() == 'PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]]' ############################################################################### # Test -o wkt_esri option def test_gdalsrsinfo_4(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' --single-line -o wkt_esri ../gcore/data/byte.tif') assert ret.strip() == 'PROJCS["NAD_1927_UTM_Zone_11N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.978698213898]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-117.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]' ############################################################################### # Test -o wkt_old option def test_gdalsrsinfo_5(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' --single-line -o wkt_noct ../gcore/data/byte.tif') assert ret.strip() == 'PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1]]' ############################################################################### # Test -o wkt_simple option def test_gdalsrsinfo_6(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() if gdaltest.is_travis_branch('mingw'): pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' --single-line -o wkt_simple ../gcore/data/byte.tif') ret = ret.replace('\r\n', '\n') val = """PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1]]""" assert ret.strip() == val ############################################################################### # Test -o mapinfo option def test_gdalsrsinfo_7(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -o mapinfo ../gcore/data/byte.tif') assert ret.strip() == """'Earth Projection 8, 62, "m", -117, 0, 0.9996, 500000, 0'""" ############################################################################### # Test nonexistent file. def test_gdalsrsinfo_9(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() _, err = gdaltest.runexternal_out_and_err( test_cli_utilities.get_gdalsrsinfo_path() + ' nonexistent_file') assert err.strip() == "ERROR 1: ERROR - failed to load SRS definition from nonexistent_file" ############################################################################### # Test -V option - valid def test_gdalsrsinfo_10(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]' if sys.platform == 'win32': # Win32 shell quoting oddities wkt = wkt.replace('"', '\"') ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + " -V -o proj4 "" + wkt + """) else: ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + " -V -o proj4 '" + wkt + "'") ret = ret #assert ret.find('Validate Succeeds') != -1 ############################################################################### # Test -V option - invalid def test_gdalsrsinfo_11(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],BADAUTHORITY["EPSG","4326"]]' if sys.platform == 'win32': # Win32 shell quoting oddities wkt = wkt.replace('"', '\"') ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + " -V -o proj4 "" + wkt + """) else: ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + " -V -o proj4 '" + wkt + "'") if ret.find('Validate Fails') == -1: pytest.xfail('validation currently broken. FIXME') ############################################################################### # Test EPSG:epsg format def test_gdalsrsinfo_12(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' --single-line -o wkt1 EPSG:4326') assert ret.strip() == """GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]""" ############################################################################### # Test proj4 format def test_gdalsrsinfo_13(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' --single-line -o wkt1 "+proj=longlat +datum=WGS84 +no_defs"') assert ret.strip() == """GEOGCS["unknown",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Longitude",EAST],AXIS["Latitude",NORTH]]""" ############################################################################### # Test VSILFILE format def test_gdalsrsinfo_14(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -o proj4 /vsizip/../gcore/data/byte.tif.zip') assert ret.strip() == "+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs" ############################################################################### # Test .shp format def test_gdalsrsinfo_14bis(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -o proj4 ../ogr/data/Stacks.shp') assert ret.strip() == "+proj=lcc +lat_0=27.8333333333333 +lon_0=-99 +lat_1=30.2833333333333 +lat_2=28.3833333333333 +x_0=600000 +y_0=3999999.9998984 +datum=NAD83 +units=us-ft +no_defs" ############################################################################### # Test .prj format def test_gdalsrsinfo_15(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -o proj4 ../osr/data/lcc_esri.prj') assert ret.strip() == "+proj=lcc +lat_0=33.75 +lon_0=-79 +lat_1=34.3333333333333 +lat_2=36.1666666666667 +x_0=609601.22 +y_0=0 +datum=NAD83 +units=m +no_defs" ############################################################################### # Test DRIVER:file syntax (bug #4493) - similar test should be done with OGR def test_gdalsrsinfo_16(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() cmd = test_cli_utilities.get_gdalsrsinfo_path() +\ ' GTIFF_RAW:../gcore/data/byte.tif' try: (_, err) = gdaltest.runexternal_out_and_err(cmd, encoding = 'UTF-8') except: pytest.fail('gdalsrsinfo execution failed') assert err == '' ############################################################################### # Test -e def test_gdalsrsinfo_17(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() # Zero match ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -e "LOCAL_CS[foo]"') assert 'EPSG:-1' in ret # One match ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -e ../osr/data/lcc_esri.prj') assert 'EPSG:32119' in ret # Two matches open('tmp/test_gdalsrsinfo_17.wkt', 'wt').write( 'GEOGCS["myLKS94",DATUM["Lithuania_1994_ETRS89",SPHEROID["GRS_1980",6378137,298.257222101],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]') ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + """ -e tmp/test_gdalsrsinfo_17.wkt""") assert 'EPSG:4669' in ret ############################################################################### # Test -o all option def test_gdalsrsinfo_all(): if test_cli_utilities.get_gdalsrsinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdalsrsinfo_path() + ' -o all ../gcore/data/byte.tif', encoding = 'UTF-8') assert 'PROJ.4 :' in ret, ret assert 'OGC WKT1 :' in ret, ret assert 'OGC WKT2:2015 :' in ret, ret assert 'OGC WKT2:2018 :' in ret, ret assert 'OGC WKT1 (simple) :' in ret, ret assert 'OGC WKT1 (no CT) :' in ret, ret assert 'ESRI WKT :' in ret, ret gdalautotest-3.1.2/utilities/test_gdal_grid.py0000775000175000017500000010601313701060014020227 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_grid.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_grid testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import struct import pytest sys.path.append('../gcore') from osgeo import gdal from osgeo import ogr import gdaltest import ogrtest import test_cli_utilities # List of output TIFF files that will be created by tests and later deleted # in test_gdal_grid_cleanup() outfiles = [] # Path to gdal_grid utility executable gdal_grid = test_cli_utilities.get_gdal_grid_path() ############################################################################### # def test_gdal_grid_1(): if gdal_grid is None: pytest.skip() shape_drv = ogr.GetDriverByName('ESRI Shapefile') outfiles.append('tmp/n43.tif') try: os.remove('tmp/n43.shp') except OSError: pass try: os.remove('tmp/n43.dbf') except OSError: pass try: os.remove('tmp/n43.shx') except OSError: pass try: os.remove('tmp/n43.qix') except OSError: pass # Create an OGR grid from the values of n43.dt0 ds = gdal.Open('../gdrivers/data/n43.dt0') geotransform = ds.GetGeoTransform() shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_ds = shape_drv.CreateDataSource('tmp') shape_lyr = shape_ds.CreateLayer('n43') data = ds.ReadRaster(0, 0, 121, 121) array_val = struct.unpack('h' * 121 * 121, data) for j in range(121): for i in range(121): wkt = 'POINT(%f %f %s)' % (geotransform[0] + (i + .5) * geotransform[1], geotransform[3] + (j + .5) * geotransform[5], array_val[j * 121 + i]) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) shape_lyr.CreateFeature(dst_feat) dst_feat.Destroy() shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON n43') shape_ds.Destroy() # Create a GDAL dataset from the previous generated OGR grid (_, err) = gdaltest.runexternal_out_and_err(gdal_grid + ' -txe -80.0041667 -78.9958333 -tye 42.9958333 44.0041667 -outsize 121 121 -ot Int16 -a nearest:radius1=0.0:radius2=0.0:angle=0.0 -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 tmp/n43.shp ' + outfiles[-1]) assert (err is None or err == ''), 'got error/warning' # We should get the same values as in n43.td0 ds2 = gdal.Open(outfiles[-1]) assert ds.GetRasterBand(1).Checksum() == ds2.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds2.GetRasterBand(1).Checksum())) assert ds2.GetRasterBand(1).GetNoDataValue() is None, 'did not expect nodata value' ds = None ds2 = None ############################################################################### # Test Nearest Neighbour gridding algorithm def test_gdal_grid_2(): if gdal_grid is None: pytest.skip() # Open reference dataset ds_ref = gdal.Open('../gcore/data/byte.tif') checksum_ref = ds_ref.GetRasterBand(1).Checksum() ds_ref = None ################# outfiles.append('tmp/grid_near.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Grid nodes are located exactly in raster nodes. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=0.0:radius2=0.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) if ds.GetRasterBand(1).Checksum() != checksum_ref: print('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), checksum_ref)) pytest.fail('bad checksum') assert ds.GetRasterBand(1).GetNoDataValue() == 0.0, 'expected a nodata value' ds = None ################# outfiles.append('tmp/grid_near_shift.tif') try: os.remove(outfiles[-1]) except OSError: pass # Now the same, but shift grid nodes a bit in both horizontal and vertical # directions. gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=0.0:radius2=0.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) if ds.GetRasterBand(1).Checksum() != checksum_ref: print('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), checksum_ref)) pytest.fail('bad checksum') ds = None ################# outfiles.append('tmp/grid_near_search3.tif') try: os.remove(outfiles[-1]) except OSError: pass # Now try the search ellipse larger than the raster cell. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=180.0:radius2=180.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) if ds.GetRasterBand(1).Checksum() != checksum_ref: print('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), checksum_ref)) pytest.fail('bad checksum') ds = None ################# outfiles.append('tmp/grid_near_search1.tif') try: os.remove(outfiles[-1]) except OSError: pass # Search ellipse smaller than the raster cell. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=20.0:radius2=20.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) if ds.GetRasterBand(1).Checksum() != checksum_ref: print('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), checksum_ref)) pytest.fail('bad checksum') ds = None ################# outfiles.append('tmp/grid_near_shift_search3.tif') try: os.remove(outfiles[-1]) except OSError: pass # Large search ellipse and the grid shift. gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=180.0:radius2=180.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) if ds.GetRasterBand(1).Checksum() != checksum_ref: print('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), checksum_ref)) pytest.fail('bad checksum') ds = None ################# outfiles.append('tmp/grid_near_shift_search1.tif') try: os.remove(outfiles[-1]) except OSError: pass # Small search ellipse and the grid shift. gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=20.0:radius2=20.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) if ds.GetRasterBand(1).Checksum() != checksum_ref: print('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), checksum_ref)) pytest.fail('bad checksum') ds = None ############################################################################### # Test Inverse Distance to a Power gridding algorithm def test_gdal_grid_3(): if gdal_grid is None: pytest.skip() ################# # Test generic implementation (no AVX, no SSE) outfiles.append('tmp/grid_invdist_generic.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". print('Step 1: Disabling AVX/SSE optimized versions...') (_, err) = gdaltest.runexternal_out_and_err(gdal_grid + ' --debug on --config GDAL_USE_AVX NO --config GDAL_USE_SSE NO -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) pos = err.find(' threads') if pos >= 0: pos_blank = err[0:pos - 1].rfind(' ') if pos_blank >= 0: print('Step 1: %s threads used' % err[pos_blank + 1:pos]) # We should get the same values as in "ref_data/gdal_invdist.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdist.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# # Potentially test optimized SSE implementation outfiles.append('tmp/grid_invdist_sse.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". print('Step 2: Trying SSE optimized version...') (_, err) = gdaltest.runexternal_out_and_err(gdal_grid + ' --debug on --config GDAL_USE_AVX NO -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) if 'SSE' in err: print('...SSE optimized version used') else: print('...SSE optimized version NOT used') # We should get the same values as in "ref_data/gdal_invdist.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdist.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# # Potentially test optimized AVX implementation outfiles.append('tmp/grid_invdist_avx.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". print('Step 3: Trying AVX optimized version...') (_, err) = gdaltest.runexternal_out_and_err(gdal_grid + ' --debug on -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) if 'AVX' in err: print('...AVX optimized version used') else: print('...AVX optimized version NOT used') # We should get the same values as in "ref_data/gdal_invdist.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdist.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# # Test GDAL_NUM_THREADS config option to 1 outfiles.append('tmp/grid_invdist_1thread.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". gdaltest.runexternal(gdal_grid + ' --config GDAL_NUM_THREADS 1 -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/gdal_invdist.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdist.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# # Test GDAL_NUM_THREADS config option to 2 outfiles.append('tmp/grid_invdist_2threads.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". gdaltest.runexternal(gdal_grid + ' --config GDAL_NUM_THREADS 2 -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/gdal_invdist.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdist.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# outfiles.append('tmp/grid_invdist_90_90_8p.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Circular window, shifted, test min points and NODATA setting. gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdist:power=2.0:radius1=90.0:radius2=90.0:angle=0.0:max_points=0:min_points=8:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_invdist_90_90_8p.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdist_90_90_8p.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ############################################################################### # Test Moving Average gridding algorithm def test_gdal_grid_4(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_average.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # We are using all the points from input dataset to average, so # the result is a raster filled with the same value in each node. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_average.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_average.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ################# outfiles.append('tmp/grid_average_190_190.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # This time using a circular window. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average:radius1=190.0:radius2=190.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_average_190_190.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_average_190_190.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ################# outfiles.append('tmp/grid_average_300_100_40.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Elliptical window, rotated. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average:radius1=300.0:radius2=100.0:angle=40.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_average_300_100_40.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_average_300_100_40.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ################# outfiles.append('tmp/grid_average_90_90_8p.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Circular window, shifted, test min points and NODATA setting. gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average:radius1=90.0:radius2=90.0:angle=0.0:min_points=8:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_average_90_90_8p.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_average_90_90_8p.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ############################################################################### # Test Minimum data metric def test_gdal_grid_5(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_minimum.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Search the whole dataset for minimum. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a minimum:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_minimum.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_minimum.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ################# outfiles.append('tmp/grid_minimum_400_100_120.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Elliptical window, rotated. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a minimum:radius1=400.0:radius2=100.0:angle=120.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_minimum_400_100_120.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_minimum_400_100_120.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ############################################################################### # Test Maximum data metric def test_gdal_grid_6(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_maximum.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Search the whole dataset for maximum. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a maximum:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_maximum.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_maximum.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ################# outfiles.append('tmp/grid_maximum_100_100.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Circular window. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a maximum:radius1=100.0:radius2=100.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_maximum_100_100.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_maximum_100_100.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ############################################################################### # Test Range data metric def test_gdal_grid_7(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_range.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Search the whole dataset. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a range:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_range.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_range.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ################# outfiles.append('tmp/grid_range_90_90_8p.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Circular window, fill node with NODATA value if less than required # points found. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a range:radius1=90.0:radius2=90.0:angle=0.0:min_points=8:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_range_90_90_8p.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_range_90_90_8p.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ############################################################################### # Test Count data metric def test_gdal_grid_8(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_count_70_70.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a count:radius1=70.0:radius2=70.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_count_70_70.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_count_70_70.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ################# outfiles.append('tmp/grid_count_300_300.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a count:radius1=300.0:radius2=300.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_count_300_300.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_count_300_300.tif') assert ds.GetRasterBand(1).Checksum() == ds_ref.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds_ref.GetRasterBand(1).checksum_ref)) ds_ref = None ds = None ############################################################################### # Test Average Distance data metric def test_gdal_grid_9(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_avdist.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # We are using all the points from input dataset to average, so # the result is a raster filled with the same value in each node. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average_distance:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_avdist.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_avdist.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ################# outfiles.append('tmp/grid_avdist_150_150.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # We are using all the points from input dataset to average, so # the result is a raster filled with the same value in each node. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average_distance:radius1=150.0:radius2=150.0:angle=0.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_avdist_150_150.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_avdist_150_150.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ############################################################################### # Test Average Distance Between Points data metric def test_gdal_grid_10(): if gdal_grid is None: pytest.skip() ################# outfiles.append('tmp/grid_avdist_150_50_-15.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # We are using all the points from input dataset to average, so # the result is a raster filled with the same value in each node. gdaltest.runexternal(gdal_grid + ' -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a average_distance_pts:radius1=150.0:radius2=50.0:angle=-15.0:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_avdist_150_50_-15.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_avdist_150_50_-15.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds_ref = None if maxdiff > 1: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds = None ############################################################################### # Test linear def test_gdal_grid_11(): if gdal_grid is None: pytest.skip() outfiles.append('tmp/n43_linear.tif') # Create a GDAL dataset from the previous generated OGR grid (_, err) = gdaltest.runexternal_out_and_err(gdal_grid + ' -txe -80.0041667 -78.9958333 -tye 42.9958333 44.0041667 -outsize 121 121 -ot Int16 -l n43 -a linear -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 tmp/n43.shp ' + outfiles[-1]) assert (err is None or err == ''), 'got error/warning' # We should get the same values as in n43.td0 ds = gdal.Open('../gdrivers/data/n43.dt0') ds2 = gdal.Open(outfiles[-1]) assert ds.GetRasterBand(1).Checksum() == ds2.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds2.GetRasterBand(1).Checksum())) ds = None ds2 = None ############################################################################### # Test Inverse Distance to a Power with Nearest Neighbor gridding algorithm def test_gdal_grid_12(): if gdal_grid is None: pytest.skip() ################# # Test generic implementation (no AVX, no SSE) outfiles.append('tmp/grid_invdistnn_generic.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". (_, _) = gdaltest.runexternal_out_and_err(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdistnn:power=2.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/gdal_invdistnn.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdistnn.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 0.00001: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# outfiles.append('tmp/grid_invdistnn_250_8minp.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". # Circular window, shifted, test min points and NODATA setting. gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdistnn:power=2.0:radius=250.0:max_points=12:min_points=8:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/grid_invdistnn_250_8minp.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdistnn_250_8minp.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 0.00001: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ################# # Test generic implementation with max_points and radius specified outfiles.append('tmp/grid_invdistnn_250_10maxp_3pow.tif') try: os.remove(outfiles[-1]) except OSError: pass # Create a GDAL dataset from the values of "grid.csv". gdaltest.runexternal(gdal_grid + ' -txe 440721.0 441920.0 -tye 3751321.0 3750120.0 -outsize 20 20 -ot Float64 -l grid -a invdistnn:power=3.0:radius=250.0:max_points=10:min_points=0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) # We should get the same values as in "ref_data/gdal_invdistnn_250_10maxp_3pow.tif" ds = gdal.Open(outfiles[-1]) ds_ref = gdal.Open('ref_data/grid_invdistnn_250_10maxp_3pow.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) if maxdiff > 0.00001: gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from the reference') ds_ref = None ds = None ############################################################################### # Test -clipsrc def test_gdal_grid_clipsrc(): if gdal_grid is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() ################# outfiles.append('tmp/grid_clipsrc.tif') try: os.remove(outfiles[-1]) except OSError: pass open('tmp/clip.csv', 'wt').write( 'id,WKT\n1,"POLYGON((440750 3751340,440750 3750100,441900 3750100,441900 3751340,440750 3751340))"\n') # Create a GDAL dataset from the values of "grid.csv". # Grid nodes are located exactly in raster nodes. gdaltest.runexternal_out_and_err(gdal_grid + ' -clipsrc tmp/clip.csv -txe 440720.0 441920.0 -tye 3751320.0 3750120.0 -outsize 20 20 -ot Byte -l grid -a nearest:radius1=0.0:radius2=0.0:angle=0.0:nodata=0.0 data/grid.vrt ' + outfiles[-1]) os.unlink('tmp/clip.csv') # We should get the same values as in "gcore/data/byte.tif" ds = gdal.Open(outfiles[-1]) cs = ds.GetRasterBand(1).Checksum() assert not (cs == 0 or cs == 4672), 'bad checksum' ds = None ############################################################################### # Cleanup def test_gdal_grid_cleanup(): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/n43.shp') drv = gdal.GetDriverByName('GTiff') for outfile in outfiles: drv.Delete(outfile) gdalautotest-3.1.2/utilities/__init__.py0000775000175000017500000000000013701060014017000 0ustar evenevengdalautotest-3.1.2/utilities/test_gdalinfo_lib.py0000775000175000017500000001215213701060014020724 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalinfo_lib.py 4f9469719977ba99aff9aba36b9446f62a1cfd81 2020-07-06 17:51:08 -0700 adsnash $ # # Project: GDAL/OGR Test Suite # Purpose: test librarified gdalinfo # Author: Faza Mahamood # ############################################################################### # Copyright (c) 2015, Faza Mahamood # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal ############################################################################### # Simple test def test_gdalinfo_lib_1(): ds = gdal.Open('../gcore/data/byte.tif') ret = gdal.Info(ds) assert ret.find('Driver: GTiff/GeoTIFF') != -1, 'did not get expected string.' ############################################################################### # Test Json format def test_gdalinfo_lib_2(): ds = gdal.Open('../gcore/data/byte.tif') ret = gdal.Info(ds, format='json') assert ret['driverShortName'] == 'GTiff', 'wrong value for driverShortName.' ############################################################################### # Test extraMDDomains() def test_gdalinfo_lib_3(): ds = gdal.Open('../gdrivers/data/fake_nsif.ntf') ret = gdal.Info(ds, format='json') assert 'TRE' not in ret['metadata'], 'got unexpected extra MD.' options = gdal.InfoOptions(format='json', extraMDDomains=['TRE']) ret = gdal.Info(ds, options=options) assert ret['metadata']['TRE']['BLOCKA'].find('010000001000000000') != -1, \ 'did not get extra MD.' ############################################################################### # Test allMetadata def test_gdalinfo_lib_4(): ds = gdal.Open('../gdrivers/data/byte_with_xmp.tif') ret = gdal.Info(ds, allMetadata=True, format='json') assert 'xml:XMP' in ret['metadata'] ############################################################################### # Test all options def test_gdalinfo_lib_5(): ds = gdal.Open('../gdrivers/data/byte.tif') ret = gdal.Info(ds, format='json', deserialize=True, computeMinMax=True, reportHistograms=True, reportProj4=True, stats=True, approxStats=True, computeChecksum=True, showGCPs=False, showMetadata=False, showRAT=False, showColorTable=False, listMDD=True, showFileList=False) assert 'files' not in ret band = ret['bands'][0] assert 'computedMin' in band assert 'histogram' in band assert 'checksum' in band assert ret['coordinateSystem']['dataAxisToSRSAxisMapping'] == [1, 2] ds = None gdal.Unlink('../gdrivers/data/byte.tif.aux.xml') ############################################################################### # Test command line syntax + dataset as string def test_gdalinfo_lib_6(): ret = gdal.Info('../gcore/data/byte.tif', options='-json') assert ret['driverShortName'] == 'GTiff', 'wrong value for driverShortName.' assert type(ret) == dict ############################################################################### # Test with unicode strings def test_gdalinfo_lib_7(): ret = gdal.Info('../gcore/data/byte.tif'.encode('ascii').decode('ascii'), options='-json'.encode('ascii').decode('ascii')) assert ret['driverShortName'] == 'GTiff', 'wrong value for driverShortName.' assert type(ret) == dict ############################################################################### # Test with list of strings def test_gdalinfo_lib_8(): ret = gdal.Info('../gcore/data/byte.tif', options=['-json']) assert ret['driverShortName'] == 'GTiff', 'wrong value for driverShortName.' assert type(ret) == dict ############################################################################### def test_gdalinfo_lib_nodatavalues(): ds = gdal.Translate('', '../gcore/data/byte.tif', options='-of VRT -b 1 -b 1 -b 1 -mo "NODATA_VALUES=0 1 2"') ret = gdal.Info(ds) assert 'PER_DATASET NODATA' in ret, 'wrong value for mask flags.' gdalautotest-3.1.2/utilities/test_gdaldem_lib.py0000775000175000017500000004120413701060014020536 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdaldem_lib.py 160d622335cd6554059376f442f57f92c42cbc49 2020-06-05 23:03:58 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdaldem testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct from osgeo import gdal from osgeo import osr import gdaltest import pytest ############################################################################### # Test gdaldem hillshade def test_gdaldem_lib_hillshade(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 45587, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade with source being floating point def test_gdaldem_lib_hillshade_float(): src_ds = gdal.Translate('', gdal.Open('../gdrivers/data/n43.dt0'), format='MEM', outputType=gdal.GDT_Float32) ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 45587, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade with source being floating point def test_gdaldem_lib_hillshade_float_png(): src_ds = gdal.Translate('', gdal.Open('../gdrivers/data/n43.dt0'), format='MEM', outputType=gdal.GDT_Float32) ds = gdal.DEMProcessing('/vsimem/test_gdaldem_lib_hillshade_float_png.png', src_ds, 'hillshade', format='PNG', scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 45587, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None gdal.GetDriverByName('PNG').Delete('/vsimem/test_gdaldem_lib_hillshade_float_png.png') ############################################################################### # Test gdaldem hillshade -combined def test_gdaldem_lib_hillshade_combined(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', combined=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 43876, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade -alg ZevenbergenThorne def test_gdaldem_lib_hillshade_ZevenbergenThorne(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', alg='ZevenbergenThorne', scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 46544, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade -alg ZevenbergenThorne -combined def test_gdaldem_lib_hillshade_ZevenbergenThorne_combined(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', alg='ZevenbergenThorne', combined=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 43112, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' assert ds.GetRasterBand(1).GetNoDataValue() == 0, 'Bad nodata value' src_ds = None ds = None ############################################################################### # Test gdaldem hillshade with -compute_edges def test_gdaldem_lib_hillshade_compute_edges(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', computeEdges=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 50239, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade with -compute_edges with floating point def test_gdaldem_lib_hillshade_compute_edges_float(): src_ds = gdal.Translate('', gdal.Open('../gdrivers/data/n43.dt0'), format='MEM', outputType=gdal.GDT_Float32) ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', computeEdges=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 50239, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade with -az parameter def test_gdaldem_lib_hillshade_azimuth(): from sys import version_info src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 1) src_ds.SetGeoTransform([2, 0.01, 0, 49, 0, -0.01]) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) src_ds.SetProjection(sr.ExportToWkt()) for j in range(100): data = '' for i in range(100): val = 255 - 5 * max(abs(50 - i), abs(50 - j)) data = data + ('%c' % (val)) if version_info >= (3, 0, 0): data = bytes(data, 'ISO-8859-1') src_ds.GetRasterBand(1).WriteRaster(0, j, 100, 1, data) # Light from the east ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', azimuth=90, scale=111120, zFactor=100) assert ds is not None ds_ref = gdal.Open('data/pyramid_shaded_ref.tif') assert gdaltest.compare_ds(ds, ds_ref, verbose=1) <= 1, 'Bad checksum' ds = None ds_ref = None ############################################################################### # Test gdaldem hillshade -multidirectional def test_gdaldem_lib_hillshade_multidirectional(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', multiDirectional=True, computeEdges=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 51784, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade -multidirectional def test_gdaldem_lib_hillshade_multidirectional_ZevenbergenThorne(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', alg='ZevenbergenThorne', multiDirectional=True, computeEdges=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 50860, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade -igor def test_gdaldem_lib_hillshade_igor(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', igor=True, computeEdges=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 48830, 'Bad checksum' ds = None ############################################################################### # Test gdaldem hillshade -igor def test_gdaldem_lib_hillshade_igor_ZevenbergenThorne(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', alg='ZevenbergenThorne', igor=True, computeEdges=True, scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 49014, 'Bad checksum' ds = None ############################################################################### # Test gdaldem color relief def test_gdaldem_lib_color_relief(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'color-relief', format='MEM', colorFilename='data/color_file.txt') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 55009, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 37543, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 47711, 'Bad checksum' src_gt = src_ds.GetGeoTransform() dst_gt = ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(dst_gt[i], abs=1e-10), 'Bad geotransform' dst_wkt = ds.GetProjectionRef() assert dst_wkt.find('AUTHORITY["EPSG","4326"]') != -1, 'Bad projection' ds = gdal.DEMProcessing('', src_ds, 'color-relief', format='MEM', colorFilename='data/color_file.txt', addAlpha=True) assert ds.RasterCount == 4, 'Bad RasterCount' src_ds = None ds = None def test_gdaldem_lib_color_relief_nodata_value(): src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) colorFilename = '/vsimem/color_file.txt' gdal.FileFromMemBuffer(colorFilename, """nv 255 255 255""") with gdaltest.error_handler(): ds = gdal.DEMProcessing('', src_ds, 'color-relief', format='MEM', colorFilename=colorFilename) assert ds.GetRasterBand(1).Checksum() == 0 src_ds.GetRasterBand(1).SetNoDataValue(1) ds = gdal.DEMProcessing('', src_ds, 'color-relief', format='MEM', colorFilename=colorFilename) assert ds.GetRasterBand(1).Checksum() != 0 gdal.Unlink(colorFilename) ############################################################################### # Test gdaldem tpi def test_gdaldem_lib_tpi(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'tpi', format='MEM') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 60504, 'Bad checksum' ds = None ############################################################################### # Test gdaldem tri def test_gdaldem_lib_tri(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'tri', format='MEM') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 61143, 'Bad checksum' ds = None ############################################################################### # Test gdaldem roughness def test_gdaldem_lib_roughness(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'roughness', format='MEM') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 38624, 'Bad checksum' ds = None ############################################################################### # Test gdaldem slope -alg ZevenbergenThorne def test_gdaldem_lib_slope_ZevenbergenThorne(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'slope', format='MEM', alg='ZevenbergenThorne', scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 64393, 'Bad checksum' ############################################################################### # Test gdaldem aspect -alg ZevenbergenThorne def test_gdaldem_lib_aspect_ZevenbergenThorne(): src_ds = gdal.Open('../gdrivers/data/n43.dt0') ds = gdal.DEMProcessing('', src_ds, 'aspect', format='MEM', alg='ZevenbergenThorne', scale=111120, zFactor=30) assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 50539, 'Bad checksum' ############################################################################### # Test gdaldem hillshade with nodata values def test_gdaldem_lib_nodata(): for (value, typ) in [(0, gdal.GDT_Byte), (1, gdal.GDT_Byte), (255, gdal.GDT_Byte), (0, gdal.GDT_UInt16), (1, gdal.GDT_UInt16), (65535, gdal.GDT_UInt16), (0, gdal.GDT_Int16), (-32678, gdal.GDT_Int16), (32767, gdal.GDT_Int16)]: src_ds = gdal.GetDriverByName('MEM').Create('', 10, 10, 1, typ) src_ds.GetRasterBand(1).SetNoDataValue(value) src_ds.GetRasterBand(1).Fill(value) ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 0, 'Bad checksum' src_ds = None ds = None src_ds = gdal.GetDriverByName('MEM').Create('', 3, 3, 1) src_ds.GetRasterBand(1).SetNoDataValue(0) src_ds.GetRasterBand(1).WriteRaster(1, 1, 1, 1, struct.pack('B', 255)) ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM') cs = ds.GetRasterBand(1).Checksum() if cs != 0: print(ds.ReadAsArray()) pytest.fail('Bad checksum') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', computeEdges=True) cs = ds.GetRasterBand(1).Checksum() if cs != 10: print(ds.ReadAsArray()) # Should be 0 0 0 0 181 0 0 0 0 pytest.fail('Bad checksum') # Same with floating point src_ds = gdal.GetDriverByName('MEM').Create('', 3, 3, 1, gdal.GDT_Float32) src_ds.GetRasterBand(1).SetNoDataValue(0) src_ds.GetRasterBand(1).WriteRaster(1, 1, 1, 1, struct.pack('f', 255)) ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM') cs = ds.GetRasterBand(1).Checksum() if cs != 0: print(ds.ReadAsArray()) pytest.fail('Bad checksum') ds = gdal.DEMProcessing('', src_ds, 'hillshade', format='MEM', computeEdges=True) cs = ds.GetRasterBand(1).Checksum() if cs != 10: print(ds.ReadAsArray()) # Should be 0 0 0 0 181 0 0 0 0 pytest.fail('Bad checksum') gdalautotest-3.1.2/utilities/test_gdal_grid_lib.py0000775000175000017500000001534113701060014021060 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_grid_lib.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_grid testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct from osgeo import gdal, ogr import ogrtest ############################################################################### # def test_gdal_grid_lib_1(): # Create an OGR grid from the values of n43.dt0 ds = gdal.Open('../gdrivers/data/n43.dt0') geotransform = ds.GetGeoTransform() shape_drv = ogr.GetDriverByName('ESRI Shapefile') shape_ds = shape_drv.CreateDataSource('/vsimem/tmp') shape_lyr = shape_ds.CreateLayer('n43') data = ds.ReadRaster(0, 0, 121, 121) array_val = struct.unpack('h' * 121 * 121, data) for j in range(121): for i in range(121): wkt = 'POINT(%f %f %s)' % (geotransform[0] + (i + .5) * geotransform[1], geotransform[3] + (j + .5) * geotransform[5], array_val[j * 121 + i]) dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt(wkt)) shape_lyr.CreateFeature(dst_feat) shape_ds.ExecuteSQL('CREATE SPATIAL INDEX ON n43') shape_ds = None spatFilter = None if ogrtest.have_geos(): spatFilter = [-180, -90, 180, 90] # Create a GDAL dataset from the previous generated OGR grid ds2 = gdal.Grid('', '/vsimem/tmp/n43.shp', format='MEM', outputBounds=[-80.0041667, 42.9958333, -78.9958333, 44.0041667], width=121, height=121, outputType=gdal.GDT_Int16, algorithm='nearest:radius1=0.0:radius2=0.0:angle=0.0', spatFilter=spatFilter) # We should get the same values as in n43.td0 assert ds.GetRasterBand(1).Checksum() == ds2.GetRasterBand(1).Checksum(), \ ('bad checksum : got %d, expected %d' % (ds.GetRasterBand(1).Checksum(), ds2.GetRasterBand(1).Checksum())) assert ds2.GetRasterBand(1).GetNoDataValue() is None, 'did not expect nodata value' ds = None ds2 = None ############################################################################### # Test with a point number not multiple of 8 or 16 def test_gdal_grid_lib_2(): shape_ds = ogr.Open('/vsimem/tmp', update=1) shape_lyr = shape_ds.CreateLayer('test_gdal_grid_lib_2') dst_feat = ogr.Feature(feature_def=shape_lyr.GetLayerDefn()) dst_feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0 100)')) shape_lyr.CreateFeature(dst_feat) shape_ds = None for env_list in [[('GDAL_USE_AVX', 'NO'), ('GDAL_USE_SSE', 'NO')], [('GDAL_USE_AVX', 'NO')], []]: for (key, value) in env_list: gdal.SetConfigOption(key, value) # Point strictly on grid ds1 = gdal.Grid('', '/vsimem/tmp/test_gdal_grid_lib_2.shp', format='MEM', outputBounds=[-0.5, -0.5, 0.5, 0.5], width=1, height=1, outputType=gdal.GDT_Byte) ds2 = gdal.Grid('', '/vsimem/tmp/test_gdal_grid_lib_2.shp', format='MEM', outputBounds=[-0.4, -0.4, 0.6, 0.6], width=10, height=10, outputType=gdal.GDT_Byte) gdal.SetConfigOption('GDAL_USE_AVX', None) gdal.SetConfigOption('GDAL_USE_SSE', None) cs = ds1.GetRasterBand(1).Checksum() assert cs == 2 cs = ds2.GetRasterBand(1).Checksum() assert cs == 1064 ############################################################################### # Test bugfix for #7101 (segmentation fault with linear interpolation) def test_gdal_grid_lib_3(): wkt = 'POLYGON ((37.3495241627097 55.6901648563184 187.680953979492,37.349543273449 55.6901565410051 187.714370727539,37.3495794832707 55.6901531392856 187.67333984375,37.3496210575104 55.6901595647556 187.6396484375,37.3496398329735 55.6901716597552 187.596603393555,37.3496726900339 55.6901780852222 187.681350708008,37.3496793955565 55.6901829988139 187.933898925781,37.3496921360493 55.6901860225623 187.934280395508,37.3497162759304 55.6902037870796 187.435394287109,37.3497484624386 55.6902094566047 187.515319824219,37.3497618734837 55.6902241973661 190.329940795898,37.3497511446476 55.690238560154 190.345748901367,37.3497404158115 55.6902567026153 190.439697265625,37.3497142642736 55.6902650179072 189.086044311523,37.349688783288 55.6902608602615 187.763305664062,37.3496626317501 55.6902468754498 187.53678894043,37.3496378213167 55.6902412059301 187.598648071289,37.3496103286743 55.6902400720261 187.806274414062,37.3495902121067 55.6902313787607 187.759521484375,37.3495734483004 55.6902177719067 187.578125,37.349532879889 55.6902035980954 187.56965637207,37.3495161160827 55.6901939599008 187.541793823242,37.3495187982917 55.6901754394418 187.610427856445,37.3495241627097 55.6901648563184 187.680953979492))' polygon = ogr.CreateGeometryFromWkt(wkt) gdal.Grid('', polygon.ExportToJson(), width=115, height=93, outputBounds=[37.3495161160827, 55.6901531392856, 37.3497618734837, 55.6902650179072], format='MEM', algorithm='linear') ############################################################################### # Cleanup def test_gdal_grid_lib_cleanup(): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/tmp') gdalautotest-3.1.2/utilities/test_ogrinfo.py0000775000175000017500000004674013701060014017770 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_ogrinfo.py f151b0f35b5f0b1394de38d0145a53907634a246 2019-12-18 12:11:59 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ogrinfo testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import ogrtest import test_cli_utilities import pytest ############################################################################### # Simple test def test_ogrinfo_1(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp') assert (err is None or err == ''), 'got error/warning' assert ret.find('ESRI Shapefile') != -1 ############################################################################### # Test -ro option def test_ogrinfo_2(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro ../ogr/data/poly.shp') assert ret.find('ESRI Shapefile') != -1 ############################################################################### # Test -al option def test_ogrinfo_3(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -al ../ogr/data/poly.shp') assert ret.find('Layer name: poly') != -1 assert ret.find('Geometry: Polygon') != -1 assert ret.find('Feature Count: 10') != -1 assert ret.find('Extent: (478315') != -1 assert ret.find('PROJCRS["OSGB') != -1 assert ret.find('AREA: Real (') != -1 ############################################################################### # Test layer name def test_ogrinfo_4(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly') assert ret.find('Feature Count: 10') != -1 ############################################################################### # Test -sql option def test_ogrinfo_5(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp -sql "select * from poly"') assert ret.find('Feature Count: 10') != -1 ############################################################################### # Test -geom=NO option def test_ogrinfo_6(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly -geom=no') assert ret.find('Feature Count: 10') != -1 assert ret.find('POLYGON') == -1 ############################################################################### # Test -geom=SUMMARY option def test_ogrinfo_7(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly -geom=summary') assert ret.find('Feature Count: 10') != -1 assert ret.find('POLYGON (') == -1 assert ret.find('POLYGON :') != -1 ############################################################################### # Test -spat option def test_ogrinfo_8(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly -spat 479609 4764629 479764 4764817') if ogrtest.have_geos(): assert ret.find('Feature Count: 4') != -1 return else: assert ret.find('Feature Count: 5') != -1 return ############################################################################### # Test -where option def test_ogrinfo_9(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly -where "EAS_ID=171"') assert ret.find('Feature Count: 1') != -1 ############################################################################### # Test -fid option def test_ogrinfo_10(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly -fid 9') assert ret.find('OGRFeature(poly):9') != -1 ############################################################################### # Test -fields=no option def test_ogrinfo_11(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' ../ogr/data/poly.shp poly -fields=no') assert ret.find('AREA (Real') == -1 assert ret.find('POLYGON (') != -1 ############################################################################### # Test ogrinfo --version def test_ogrinfo_12(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' --version', check_memleak=False) assert ret.startswith(gdal.VersionInfo('--version')) ############################################################################### # Test erroneous use of --config def test_ogrinfo_13(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --config', check_memleak=False) assert '--config option given without a key and value argument' in err ############################################################################### # Test erroneous use of --mempreload. def test_ogrinfo_14(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --mempreload', check_memleak=False) assert '--mempreload option given without directory path' in err ############################################################################### # Test --mempreload def test_ogrinfo_15(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (ret, _) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --debug on --mempreload ../ogr/data /vsimem/poly.shp', check_memleak=False) assert "ESRI Shapefile" in ret ############################################################################### # Test erroneous use of --debug. def test_ogrinfo_16(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --debug', check_memleak=False) assert '--debug option given without debug level' in err ############################################################################### # Test erroneous use of --optfile. def test_ogrinfo_17(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --optfile', check_memleak=False) assert '--optfile option given without filename' in err (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --optfile /foo/bar', check_memleak=False) assert 'Unable to open optfile' in err f = open('tmp/optfile.txt', 'wt') f.write('--config foo\n') f.close() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' --optfile tmp/optfile.txt', check_memleak=False) os.unlink('tmp/optfile.txt') assert '--config option given without a key and value argument' in err ############################################################################### # Test --optfile def test_ogrinfo_18(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() f = open('tmp/optfile.txt', 'wt') f.write('# comment\n') f.write('../ogr/data/poly.shp\n') f.close() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' --optfile tmp/optfile.txt', check_memleak=False) os.unlink('tmp/optfile.txt') assert "ESRI Shapefile" in ret ############################################################################### # Test --formats def test_ogrinfo_19(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' --formats', check_memleak=False) assert 'ESRI Shapefile -vector- (rw+v): ESRI Shapefile' in ret ############################################################################### # Test --help-general def test_ogrinfo_20(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' --help-general', check_memleak=False) assert 'Generic GDAL utility command options' in ret ############################################################################### # Test --locale def test_ogrinfo_21(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' --locale C ../ogr/data/poly.shp', check_memleak=False) assert "ESRI Shapefile" in ret ############################################################################### # Test RFC 41 support def test_ogrinfo_22(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() f = open('tmp/test_ogrinfo_22.csv', 'wt') f.write('_WKTgeom1_EPSG_4326,_WKTgeom2_EPSG_32631\n') f.write('"POINT(1 2)","POINT(3 4)"\n') f.close() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' tmp/test_ogrinfo_22.csv', check_memleak=False) assert '1: test_ogrinfo_22 (Unknown (any), Unknown (any))' in ret ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -al -wkt_format wkt1 tmp/test_ogrinfo_22.csv', check_memleak=False) expected_ret = """INFO: Open of `tmp/test_ogrinfo_22.csv' using driver `CSV' successful. Layer name: test_ogrinfo_22 Geometry (geom__WKTgeom1_EPSG_4326): Unknown (any) Geometry (geom__WKTgeom2_EPSG_32631): Unknown (any) Feature Count: 1 Extent (geom__WKTgeom1_EPSG_4326): (1.000000, 2.000000) - (1.000000, 2.000000) Extent (geom__WKTgeom2_EPSG_32631): (3.000000, 4.000000) - (3.000000, 4.000000) SRS WKT (geom__WKTgeom1_EPSG_4326): GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AXIS["Latitude",NORTH], AXIS["Longitude",EAST], AUTHORITY["EPSG","4326"]] Data axis to CRS axis mapping: 2,1 SRS WKT (geom__WKTgeom2_EPSG_32631): PROJCS["WGS 84 / UTM zone 31N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",3], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","32631"]] Data axis to CRS axis mapping: 1,2 Geometry Column 1 = geom__WKTgeom1_EPSG_4326 Geometry Column 2 = geom__WKTgeom2_EPSG_32631 _WKTgeom1_EPSG_4326: String (0.0) _WKTgeom2_EPSG_32631: String (0.0) OGRFeature(test_ogrinfo_22):1 _WKTgeom1_EPSG_4326 (String) = POINT(1 2) _WKTgeom2_EPSG_32631 (String) = POINT(3 4) geom__WKTgeom1_EPSG_4326 = POINT (1 2) geom__WKTgeom2_EPSG_32631 = POINT (3 4) """ expected_lines = expected_ret.splitlines() lines = ret.splitlines() for i, exp_line in enumerate(expected_lines): assert exp_line == lines[i], ret os.unlink('tmp/test_ogrinfo_22.csv') ############################################################################### # Test -geomfield (RFC 41) support def test_ogrinfo_23(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() f = open('tmp/test_ogrinfo_23.csv', 'wt') f.write('_WKTgeom1_EPSG_4326,_WKTgeom2_EPSG_32631\n') f.write('"POINT(1 2)","POINT(3 4)"\n') f.write('"POINT(3 4)","POINT(1 2)"\n') f.close() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -al tmp/test_ogrinfo_23.csv -wkt_format wkt1 -spat 1 2 1 2 -geomfield geom__WKTgeom2_EPSG_32631', check_memleak=False) expected_ret = """INFO: Open of `tmp/test_ogrinfo_23.csv' using driver `CSV' successful. Layer name: test_ogrinfo_23 Geometry (geom__WKTgeom1_EPSG_4326): Unknown (any) Geometry (geom__WKTgeom2_EPSG_32631): Unknown (any) Feature Count: 1 Extent (geom__WKTgeom1_EPSG_4326): (3.000000, 4.000000) - (3.000000, 4.000000) Extent (geom__WKTgeom2_EPSG_32631): (1.000000, 2.000000) - (1.000000, 2.000000) SRS WKT (geom__WKTgeom1_EPSG_4326): GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AXIS["Latitude",NORTH], AXIS["Longitude",EAST], AUTHORITY["EPSG","4326"]] Data axis to CRS axis mapping: 2,1 SRS WKT (geom__WKTgeom2_EPSG_32631): PROJCS["WGS 84 / UTM zone 31N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",3], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","32631"]] Data axis to CRS axis mapping: 1,2 Geometry Column 1 = geom__WKTgeom1_EPSG_4326 Geometry Column 2 = geom__WKTgeom2_EPSG_32631 _WKTgeom1_EPSG_4326: String (0.0) _WKTgeom2_EPSG_32631: String (0.0) OGRFeature(test_ogrinfo_23):2 _WKTgeom1_EPSG_4326 (String) = POINT(3 4) _WKTgeom2_EPSG_32631 (String) = POINT(1 2) geom__WKTgeom1_EPSG_4326 = POINT (3 4) geom__WKTgeom2_EPSG_32631 = POINT (1 2) """ expected_lines = expected_ret.splitlines() lines = ret.splitlines() for i, exp_line in enumerate(expected_lines): assert exp_line == lines[i], ret os.unlink('tmp/test_ogrinfo_23.csv') ############################################################################### # Test metadata def test_ogrinfo_24(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() f = open('tmp/test_ogrinfo_24.vrt', 'wt') f.write(""" bar foo baz ../../ogr/data/poly.shp poly """) f.close() ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro -al tmp/test_ogrinfo_24.vrt -so', check_memleak=False) assert 'foo=bar' in ret assert 'bar=baz' in ret ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro -al tmp/test_ogrinfo_24.vrt -so -mdd all', check_memleak=False) assert 'foo=bar' in ret assert 'baz=foo' in ret assert 'bar=baz' in ret ret = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' -ro -al tmp/test_ogrinfo_24.vrt -so -nomd', check_memleak=False) assert 'Metadata' not in ret os.unlink('tmp/test_ogrinfo_24.vrt') ############################################################################### # Test -rl def test_ogrinfo_25(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' -rl -q ../ogr/data/poly.shp') assert (err is None or err == ''), 'got error/warning' assert 'OGRFeature(poly):0' in ret and 'OGRFeature(poly):9' in ret, \ 'wrong output' ############################################################################### # Test SQLStatement with -sql @filename syntax def test_ogrinfo_sql_filename(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() open('tmp/my.sql', 'wt').write('-- initial comment\nselect * from poly\n-- trailing comment') (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' -q ../ogr/data/poly.shp -sql @tmp/my.sql') os.unlink('tmp/my.sql') assert (err is None or err == ''), 'got error/warning' assert 'OGRFeature(poly):0' in ret and 'OGRFeature(poly):9' in ret, \ 'wrong output' ############################################################################### # Test -nogeomtype def test_ogrinfo_nogeomtype(): if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogrinfo_path() + ' -nogeomtype ../ogr/data/poly.shp') assert (err is None or err == ''), 'got error/warning' expected_ret = """INFO: Open of `../ogr/data/poly.shp' using driver `ESRI Shapefile' successful. 1: poly """ expected_lines = expected_ret.splitlines() lines = ret.splitlines() for i, exp_line in enumerate(expected_lines): if exp_line != lines[i]: if gdaltest.is_travis_branch('mingw'): return 'expected_fail' pytest.fail(ret) gdalautotest-3.1.2/utilities/test_gdalwarp.py0000775000175000017500000014006013701060014020114 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalwarp.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdalwarp testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import stat from osgeo import gdal import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdalwarp_1(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/byte.tif tmp/testgdalwarp1.tif') assert (err is None or err == ''), 'got error/warning' ds = gdal.Open('tmp/testgdalwarp1.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -of option def test_gdalwarp_2(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -of GTiff ../gcore/data/byte.tif tmp/testgdalwarp2.tif') ds = gdal.Open('tmp/testgdalwarp2.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -ot option def test_gdalwarp_3(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ot Int16 ../gcore/data/byte.tif tmp/testgdalwarp3.tif') ds = gdal.Open('tmp/testgdalwarp3.tif') assert ds is not None assert ds.GetRasterBand(1).DataType == gdal.GDT_Int16, 'Bad data type' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -t_srs option def test_gdalwarp_4(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs EPSG:32611 ../gcore/data/byte.tif tmp/testgdalwarp4.tif') ds = gdal.Open('tmp/testgdalwarp4.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test warping from GCPs without any explicit option def test_gdalwarp_5(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -a_srs EPSG:26711 -gcp 0 0 440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000 ../gcore/data/byte.tif tmp/testgdalwarp_gcp.tif') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/testgdalwarp_gcp.tif tmp/testgdalwarp5.tif') ds = gdal.Open('tmp/testgdalwarp5.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test warping from GCPs with -tps def test_gdalwarp_6(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -tps tmp/testgdalwarp_gcp.tif tmp/testgdalwarp6.tif') ds = gdal.Open('tmp/testgdalwarp6.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -tr def test_gdalwarp_7(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -tr 120 120 tmp/testgdalwarp_gcp.tif tmp/testgdalwarp7.tif') ds = gdal.Open('tmp/testgdalwarp7.tif') assert ds is not None expected_gt = (440720.0, 120.0, 0.0, 3751320.0, 0.0, -120.0) assert gdaltest.geotransform_equals(expected_gt, ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -ts def test_gdalwarp_8(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 10 10 tmp/testgdalwarp_gcp.tif tmp/testgdalwarp8.tif') ds = gdal.Open('tmp/testgdalwarp8.tif') assert ds is not None expected_gt = (440720.0, 120.0, 0.0, 3751320.0, 0.0, -120.0) assert gdaltest.geotransform_equals(expected_gt, ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -te def test_gdalwarp_9(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -te 440720.000 3750120.000 441920.000 3751320.000 tmp/testgdalwarp_gcp.tif tmp/testgdalwarp9.tif') ds = gdal.Open('tmp/testgdalwarp9.tif') assert ds is not None assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -rn def test_gdalwarp_10(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 40 40 -rn tmp/testgdalwarp_gcp.tif tmp/testgdalwarp10.tif') ds = gdal.Open('tmp/testgdalwarp10.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18784, 'Bad checksum' ds = None ############################################################################### # Test -rb def test_gdalwarp_11(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 40 40 -rb tmp/testgdalwarp_gcp.tif tmp/testgdalwarp11.tif') ds = gdal.Open('tmp/testgdalwarp11.tif') assert ds is not None ref_ds = gdal.Open('ref_data/testgdalwarp11.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds, verbose=0) ref_ds = None if maxdiff > 1: gdaltest.compare_ds(ds, ref_ds, verbose=1) pytest.fail('Image too different from reference') ds = None ############################################################################### # Test -rc def test_gdalwarp_12(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 40 40 -rc tmp/testgdalwarp_gcp.tif tmp/testgdalwarp12.tif') ds = gdal.Open('tmp/testgdalwarp12.tif') assert ds is not None ref_ds = gdal.Open('ref_data/testgdalwarp12.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds, verbose=0) if maxdiff > 1: gdaltest.compare_ds(ds, ref_ds, verbose=1) ref_ds = None pytest.fail('Image too different from reference') ds = None ref_ds = None ############################################################################### # Test -rcs def test_gdalwarp_13(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 40 40 -rcs tmp/testgdalwarp_gcp.tif tmp/testgdalwarp13.tif') ds = gdal.Open('tmp/testgdalwarp13.tif') assert ds is not None ref_ds = gdal.Open('ref_data/testgdalwarp13.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ds = None ############################################################################### # Test -r lanczos def test_gdalwarp_14(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 40 40 -r lanczos tmp/testgdalwarp_gcp.tif tmp/testgdalwarp14.tif') ds = gdal.Open('tmp/testgdalwarp14.tif') assert ds is not None ref_ds = gdal.Open('ref_data/testgdalwarp14.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ds = None ############################################################################### # Test -dstnodata def test_gdalwarp_15(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -dstnodata 1 -t_srs EPSG:32610 tmp/testgdalwarp_gcp.tif tmp/testgdalwarp15.tif') ds = gdal.Open('tmp/testgdalwarp15.tif') assert ds is not None assert ds.GetRasterBand(1).GetNoDataValue() == 1, 'Bad nodata value' assert ds.GetRasterBand(1).Checksum() == 4523, 'Bad checksum' ds = None ############################################################################### # Test -of VRT which is a special case def test_gdalwarp_16(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -of VRT tmp/testgdalwarp_gcp.tif tmp/testgdalwarp16.vrt') ds = gdal.Open('tmp/testgdalwarp16.vrt') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -dstalpha def test_gdalwarp_17(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -dstalpha ../gcore/data/rgbsmall.tif tmp/testgdalwarp17.tif') ds = gdal.Open('tmp/testgdalwarp17.tif') assert ds is not None assert ds.GetRasterBand(4) is not None, 'No alpha band generated' ds = None ############################################################################### # Test -wm -multi def test_gdalwarp_18(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() (_, ret_stderr) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalwarp_path() + ' -wm 20 -multi ../gcore/data/byte.tif tmp/testgdalwarp18.tif') # This error will be returned if GDAL is not compiled with thread support if ret_stderr.find('CPLCreateThread() failed in ChunkAndWarpMulti()') != -1: pytest.skip('GDAL not compiled with thread support') ds = gdal.Open('tmp/testgdalwarp18.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -et 0 which is a special case def test_gdalwarp_19(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -et 0 tmp/testgdalwarp_gcp.tif tmp/testgdalwarp19.tif') ds = gdal.Open('tmp/testgdalwarp19.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test -of VRT -et 0 which is a special case def test_gdalwarp_20(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -of VRT -et 0 tmp/testgdalwarp_gcp.tif tmp/testgdalwarp20.vrt') ds = gdal.Open('tmp/testgdalwarp20.vrt') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test cutline from OGR datasource. def test_gdalwarp_21(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/utmsmall.tif tmp/testgdalwarp21.tif -cutline data/cutline.vrt -cl cutline') ds = gdal.Open('tmp/testgdalwarp21.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 19139, 'Bad checksum' ds = None ############################################################################### # Test with a cutline and an output at a different resolution. def test_gdalwarp_22(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/utmsmall.tif tmp/testgdalwarp22.tif -cutline data/cutline.vrt -cl cutline -tr 30 30') ds = gdal.Open('tmp/testgdalwarp22.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 14047, 'Bad checksum' ds = None ############################################################################### # Test cutline with ALL_TOUCHED enabled. def test_gdalwarp_23(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -wo CUTLINE_ALL_TOUCHED=TRUE ../gcore/data/utmsmall.tif tmp/testgdalwarp23.tif -cutline data/cutline.vrt -cl cutline') ds = gdal.Open('tmp/testgdalwarp23.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 20123, 'Bad checksum' ds = None ############################################################################### # Test warping an image crossing the 180E/180W longitude (#3206) def test_gdalwarp_24(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() ds = gdal.GetDriverByName('GTiff').Create('tmp/testgdalwarp24src.tif', 100, 100) ds.SetGeoTransform([179.5, 0.01, 0, 45, 0, -0.01]) ds.SetProjection('GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]') ds.GetRasterBand(1).Fill(255) ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs EPSG:32660 tmp/testgdalwarp24src.tif tmp/testgdalwarp24dst.tif') ds = gdal.Open('tmp/testgdalwarp24dst.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 50634, 'Bad checksum' ds = None ############################################################################### # Test warping a full EPSG:4326 extent to +proj=sinu (#2305) def test_gdalwarp_25(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs "+proj=sinu" data/w_jpeg.tiff tmp/testgdalwarp25.tif') ds = gdal.Open('tmp/testgdalwarp25.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 8016 or cs == 6157, 'Bad checksum' gt = ds.GetGeoTransform() expected_gt = [-20037508.342789248, 78245.302611923355, 0.0, 10001965.729313632, 0.0, -77939.656898595524] for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1), 'Bad gt' ds = None ############################################################################### # Test warping a full EPSG:4326 extent to +proj=eck4 (#2305) def test_gdalwarp_26(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs "+proj=eck4" data/w_jpeg.tiff tmp/testgdalwarp26.tif') ds = gdal.Open('tmp/testgdalwarp26.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 8582 or cs == 3938, 'Bad checksum' gt = ds.GetGeoTransform() expected_gt = [-16921202.922943164, 41752.719393322564, 0.0, 8460601.4614715818, 0.0, -41701.109109770863] for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1), 'Bad gt' ds = None ############################################################################### # Test warping a full EPSG:4326 extent to +proj=vandg (#2305) def test_gdalwarp_27(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs "+proj=vandg" data/w_jpeg.tiff tmp/testgdalwarp27.tif -overwrite') ds = gdal.Open('tmp/testgdalwarp27.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() # 22615 for MacOSX assert cs == 22006 or cs == 22615, 'Bad checksum' gt = ds.GetGeoTransform() expected_gt = [-20015109.356056381, 98651.645855415176, 0.0, 20015109.356056374, 0.0, -98651.645855415176] for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1), 'Bad gt' ds = None ############################################################################### # Test warping a full EPSG:4326 extent to +proj=aeqd +lat_0=45 +lon_0=90 (#2305) def test_gdalwarp_28(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs "+proj=aeqd +lat_0=45 +lon_0=90" data/w_jpeg.tiff tmp/testgdalwarp28.tif') ds = gdal.Open('tmp/testgdalwarp28.tif') assert ds is not None # Check that there is no hole at the south pole location cs = ds.GetRasterBand(1).Checksum() # 1219 for MacOSX assert cs in (1794,1219), 'Bad checksum' gt = ds.GetGeoTransform() expected_gt1 = [-18494092.97555049, 93907.15126464187, 0.0, 20003931.458625447, 0.0, -93907.15126464187] for i in range(6): assert gt[i] == pytest.approx(expected_gt1[i], abs=1) , \ ('Bad gt', gt) ds = None ############################################################################### # Test warping a full EPSG:4326 extent to EPSG:3785 (#2305) def test_gdalwarp_29(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs EPSG:3785 data/w_jpeg.tiff tmp/testgdalwarp29.tif') ds = gdal.Open('tmp/testgdalwarp29.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 55149 or cs == 56054, 'Bad checksum' gt = ds.GetGeoTransform() expected_gt = [-20037508.342789248, 90054.726863985939, 0.0, 16213801.067583967, 0.0, -90056.750611190684] for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1), 'Bad gt' ds = None ############################################################################### # Test the effect of the -wo OPTIMIZE_SIZE=TRUE and -wo STREAMABLE_OUTPUT=TRUE options (#3459, #1866) def test_gdalwarp_30(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() # First run : no parameter gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + " data/w_jpeg.tiff tmp/testgdalwarp30_1.tif -t_srs EPSG:3785 -co COMPRESS=LZW -wm 500000 --config GDAL_CACHEMAX 1 -ts 1000 500 -co TILED=YES") # Second run : with -wo OPTIMIZE_SIZE=TRUE gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + " data/w_jpeg.tiff tmp/testgdalwarp30_2.tif -t_srs EPSG:3785 -co COMPRESS=LZW -wm 500000 -wo OPTIMIZE_SIZE=TRUE --config GDAL_CACHEMAX 1 -ts 1000 500 -co TILED=YES") # Third run : with -wo STREAMABLE_OUTPUT=TRUE gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + " data/w_jpeg.tiff tmp/testgdalwarp30_3.tif -t_srs EPSG:3785 -co COMPRESS=LZW -wm 500000 -wo STREAMABLE_OUTPUT=TRUE --config GDAL_CACHEMAX 1 -ts 1000 500 -co TILED=YES") file_size1 = os.stat('tmp/testgdalwarp30_1.tif')[stat.ST_SIZE] file_size2 = os.stat('tmp/testgdalwarp30_2.tif')[stat.ST_SIZE] file_size3 = os.stat('tmp/testgdalwarp30_3.tif')[stat.ST_SIZE] ds = gdal.Open('tmp/testgdalwarp30_1.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 64629 or cs == 1302, 'Bad checksum on testgdalwarp30_1' ds = None ds = gdal.Open('tmp/testgdalwarp30_2.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 64629 or cs == 1302, 'Bad checksum on testgdalwarp30_2' ds = None ds = gdal.Open('tmp/testgdalwarp30_3.tif') assert ds is not None cs = ds.GetRasterBand(1).Checksum() assert cs == 64629 or cs == 1302, 'Bad checksum on testgdalwarp30_3' ds = None assert file_size1 > file_size2, \ 'Size with -wo OPTIMIZE_SIZE=TRUE larger than without !' assert file_size1 > file_size3, \ 'Size with -wo STREAMABLE_OUTPUT=TRUE larger than without !' ############################################################################### # Test -overwrite (#3759) def test_gdalwarp_31(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + " ../gcore/data/byte.tif tmp/testgdalwarp31.tif") ds = gdal.Open('tmp/testgdalwarp31.tif') cs1 = ds.GetRasterBand(1).Checksum() ds = None (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalwarp_path() + " ../gcore/data/byte.tif tmp/testgdalwarp31.tif -t_srs EPSG:4326") ds = gdal.Open('tmp/testgdalwarp31.tif') cs2 = ds.GetRasterBand(1).Checksum() ds = None (_, err2) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalwarp_path() + " ../gcore/data/byte.tif tmp/testgdalwarp31.tif -t_srs EPSG:4326 -overwrite") ds = gdal.Open('tmp/testgdalwarp31.tif') cs3 = ds.GetRasterBand(1).Checksum() ds = None assert cs1 == 4672 and cs2 == 4672 and cs3 == 4727 and err != '' and err2 == '' ############################################################################### # Test -tap def test_gdalwarp_32(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalwarp_path() + ' -tap ../gcore/data/byte.tif tmp/testgdalwarp32.tif', check_memleak=False) assert err.find('-tap option cannot be used without using -tr') != -1, \ 'expected error' gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -tr 100 50 -tap ../gcore/data/byte.tif tmp/testgdalwarp32.tif') ds = gdal.Open('tmp/testgdalwarp32.tif') assert ds is not None expected_gt = (440700.0, 100.0, 0.0, 3751350.0, 0.0, -50.0) got_gt = ds.GetGeoTransform() assert gdaltest.geotransform_equals(expected_gt, got_gt, 1e-9), 'Bad geotransform' assert ds.RasterXSize == 13 and ds.RasterYSize == 25, \ ('Wrong raster dimensions : %d x %d' % (ds.RasterXSize, ds.RasterYSize)) ds = None ############################################################################### # Test warping a JPEG compressed image with a mask into a RGBA image def test_gdalwarp_33(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -dstalpha ../gcore/data/ycbcr_with_mask.tif tmp/testgdalwarp33.tif') src_ds = gdal.Open('../gcore/data/ycbcr_with_mask.tif') ds = gdal.Open('tmp/testgdalwarp33.tif') assert ds is not None # There are expected diffs because of the artifacts due to JPEG compression in 8x8 blocks # that are partially masked. gdalwarp will remove those artifacts max_diff = gdaltest.compare_ds(src_ds, ds) assert max_diff <= 40 src_ds = None gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' -expand gray GTIFF_DIR:2:../gcore/data/ycbcr_with_mask.tif tmp/testgdalwarp33_mask.tif') mask_ds = gdal.Open('tmp/testgdalwarp33_mask.tif') expected_cs = mask_ds.GetRasterBand(1).Checksum() mask_ds = None cs = ds.GetRasterBand(4).Checksum() ds = None assert cs == expected_cs, 'did not get expected checksum on alpha band' ############################################################################### # Test warping multiple sources def test_gdalwarp_34(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() try: os.remove('tmp/testgdalwarp34.tif') except OSError: pass gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif tmp/testgdalwarp34src_1.tif -srcwin 0 0 10 20') gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gcore/data/byte.tif tmp/testgdalwarp34src_2.tif -srcwin 10 0 10 20') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/testgdalwarp34src_1.tif tmp/testgdalwarp34src_2.tif tmp/testgdalwarp34.tif') os.remove('tmp/testgdalwarp34src_1.tif') os.remove('tmp/testgdalwarp34src_2.tif') ds = gdal.Open('tmp/testgdalwarp34.tif') cs = ds.GetRasterBand(1).Checksum() gt = ds.GetGeoTransform() xsize = ds.RasterXSize ysize = ds.RasterYSize ds = None os.remove('tmp/testgdalwarp34.tif') assert xsize == 20 and ysize == 20, 'bad dimensions' assert cs == 4672, 'bad checksum' expected_gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-5), 'bad gt' ############################################################################### # Test -ts and -te optimization (doesn't need calling GDALSuggestedWarpOutput2, #4804) def test_gdalwarp_35(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -ts 20 20 -te 440720.000 3750120.000 441920.000 3751320.000 ../gcore/data/byte.tif tmp/testgdalwarp35.tif') ds = gdal.Open('tmp/testgdalwarp35.tif') assert ds is not None assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test -tr and -te optimization (doesn't need calling GDALSuggestedWarpOutput2, #4804) def test_gdalwarp_36(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -tr 60 60 -te 440720.000 3750120.000 441920.000 3751320.000 ../gcore/data/byte.tif tmp/testgdalwarp36.tif') ds = gdal.Open('tmp/testgdalwarp36.tif') assert ds is not None assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test metadata copying - stats should not be copied (#5319) def test_gdalwarp_37(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -tr 60 60 ./data/utmsmall.tif tmp/testgdalwarp37.tif') ds = gdal.Open('tmp/testgdalwarp37.tif') assert ds is not None md = ds.GetRasterBand(1).GetMetadata() # basic metadata test assert 'testkey' in md and md['testkey'] == 'test value', \ ('Output file metadata is wrong : { %s }' % md) # make sure stats not copied assert 'STATISTICS_MEAN' not in md, 'Output file contains statistics metadata' assert ds.GetRasterBand(1).GetMinimum() is None, 'Output file has statistics' ds = None ############################################################################### # Test implicit nodata setting (#5675) def test_gdalwarp_38(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' data/withnodata.asc tmp/testgdalwarp38.tif') ds = gdal.Open('tmp/testgdalwarp38.tif') assert ds.GetRasterBand(1).Checksum() == 65531 assert ds.GetRasterBand(1).GetNoDataValue() == -999 ds = None ############################################################################### # Test -oo def test_gdalwarp_39(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gdrivers/data/float64.asc tmp/test_gdalwarp_39.tif -oo DATATYPE=Float64 -overwrite') ds = gdal.Open('tmp/test_gdalwarp_39.tif') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float64 ds = None ############################################################################### # Test -ovr def test_gdalwarp_40(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() src_ds = gdal.Open('../gcore/data/byte.tif') out_ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/test_gdalwarp_40_src.tif', src_ds) cs_main = out_ds.GetRasterBand(1).Checksum() out_ds.BuildOverviews('NONE', overviewlist=[2, 4]) out_ds.GetRasterBand(1).GetOverview(0).Fill(127) cs_ov0 = out_ds.GetRasterBand(1).GetOverview(0).Checksum() out_ds.GetRasterBand(1).GetOverview(1).Fill(255) cs_ov1 = out_ds.GetRasterBand(1).GetOverview(1).Checksum() out_ds = None # Should select main resolution gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == cs_main ds = None # Test -ovr AUTO. Should select main resolution gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ovr AUTO') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == cs_main ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/byte.tif tmp/test_gdalwarp_40.tif -overwrite -ts 5 5') ds = gdal.Open('tmp/test_gdalwarp_40.tif') expected_cs = ds.GetRasterBand(1).Checksum() ds = None # Test -ovr NONE. Should select main resolution too gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ovr NONE -ts 5 5') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/byte.tif tmp/test_gdalwarp_40.tif -overwrite -ts 15 15') ds = gdal.Open('tmp/test_gdalwarp_40.tif') expected_cs = ds.GetRasterBand(1).Checksum() ds = None # Should select main resolution too gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ts 15 15') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs ds = None # Should select overview 0 gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ts 10 10') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == cs_ov0 ds = None # Should select overview 0 through VRT gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.vrt -overwrite -ts 10 10 -of VRT') ds = gdal.Open('tmp/test_gdalwarp_40.vrt') assert ds.GetRasterBand(1).Checksum() == cs_ov0 ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif -oo OVERVIEW_LEVEL=0 tmp/test_gdalwarp_40.tif -overwrite -ts 7 7') ds = gdal.Open('tmp/test_gdalwarp_40.tif') expected_cs = ds.GetRasterBand(1).Checksum() ds = None # Should select overview 0 too gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ts 7 7') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif -ovr NONE -oo OVERVIEW_LEVEL=0 tmp/test_gdalwarp_40.tif -overwrite -ts 5 5') ds = gdal.Open('tmp/test_gdalwarp_40.tif') expected_cs = ds.GetRasterBand(1).Checksum() ds = None # Test AUTO-n. Should select overview 0 too gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ts 5 5 -ovr AUTO-1') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs ds = None # Should select overview 1 gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ts 5 5') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == cs_ov1 ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif -oo OVERVIEW_LEVEL=1 tmp/test_gdalwarp_40.tif -overwrite -ts 3 3') ds = gdal.Open('tmp/test_gdalwarp_40.tif') expected_cs = ds.GetRasterBand(1).Checksum() ds = None # Should select overview 1 too gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ts 3 3') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif -oo OVERVIEW_LEVEL=1 tmp/test_gdalwarp_40.tif -overwrite -ts 20 20') ds = gdal.Open('tmp/test_gdalwarp_40.tif') expected_cs = ds.GetRasterBand(1).Checksum() ds = None # Specify a level >= number of overviews. Should select overview 1 too gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_40_src.tif tmp/test_gdalwarp_40.tif -overwrite -ovr 5') ds = gdal.Open('tmp/test_gdalwarp_40.tif') assert ds.GetRasterBand(1).Checksum() == expected_cs ds = None ############################################################################### # Test source fill ratio heuristics (#3120) def test_gdalwarp_41(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() src_ds = gdal.GetDriverByName('GTiff').Create('tmp/test_gdalwarp_41_src.tif', 666, 666) src_ds.SetGeoTransform([-3333500, 10010.510510510510358, 0, 3333500.000000000000000, 0, -10010.510510510510358]) src_ds.SetProjection("""PROJCS["WGS_1984_Stereographic_South_Pole", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Polar_Stereographic"], PARAMETER["latitude_of_origin",-71], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""") src_ds.GetRasterBand(1).Fill(255) src_ds = None # Check when source fill ratio heuristics is ON gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_41_src.tif tmp/test_gdalwarp_41.tif -overwrite -t_srs EPSG:4326 -te -180 -90 180 90 -wo INIT_DEST=127 -wo SKIP_NOSOURCE=YES') ds = gdal.Open('tmp/test_gdalwarp_41.tif') assert ds.GetRasterBand(1).Checksum() == 25945 ds = None # Check when source fill ratio heuristics is OFF gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/test_gdalwarp_41_src.tif tmp/test_gdalwarp_41.tif -overwrite -t_srs EPSG:4326 -te -180 -90 180 90 -wo INIT_DEST=127 -wo SKIP_NOSOURCE=YES -wo SRC_FILL_RATIO_HEURISTICS=NO') ds = gdal.Open('tmp/test_gdalwarp_41.tif') assert ds.GetRasterBand(1).Checksum() == 65068 ds = None ############################################################################### # Test warping multiple source images, in one step or several, with INIT_DEST/nodata (#5909, #5387) def test_gdalwarp_42(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gdrivers/data/small_world.tif tmp/small_world_left.tif -srcwin 0 0 200 200 -a_nodata 255') gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gdrivers/data/small_world.tif tmp/small_world_right.tif -srcwin 200 0 200 200 -a_nodata 255') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/small_world_left.tif tmp/test_gdalwarp_42.tif -overwrite -te -180 -90 180 90 -dstalpha -wo UNIFIED_SRC_NODATA=YES') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/small_world_right.tif tmp/test_gdalwarp_42.tif -wo UNIFIED_SRC_NODATA=YES') ds = gdal.Open('tmp/test_gdalwarp_42.tif') got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [25382, 27573, 35297, 59540] assert got_cs == expected_cs ds = None # In one step gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/small_world_left.tif tmp/small_world_right.tif tmp/test_gdalwarp_42.tif -overwrite -te -180 -90 180 90 -dstalpha -wo UNIFIED_SRC_NODATA=YES') ds = gdal.Open('tmp/test_gdalwarp_42.tif') got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [25382, 27573, 35297, 59540] assert got_cs == expected_cs ds = None # In one step with -wo INIT_DEST=255,255,255,0 gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/small_world_left.tif tmp/small_world_right.tif tmp/test_gdalwarp_42.tif -wo INIT_DEST=255,255,255,0 -overwrite -te -180 -90 180 90 -dstalpha -wo UNIFIED_SRC_NODATA=YES') ds = gdal.Open('tmp/test_gdalwarp_42.tif') got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [30111, 32302, 40026, 59540] assert got_cs == expected_cs ds = None # In one step with -wo INIT_DEST=0,0,0,0 # Different checksum since there are source pixels at 255, so they get remap to 0 gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/small_world_left.tif tmp/small_world_right.tif tmp/test_gdalwarp_42.tif -wo INIT_DEST=0,0,0,0 -overwrite -te -180 -90 180 90 -dstalpha -wo UNIFIED_SRC_NODATA=YES') ds = gdal.Open('tmp/test_gdalwarp_42.tif') got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [25382, 27573, 35297, 59540] assert got_cs == expected_cs ds = None ############################################################################### # Test that NODATA_VALUES is honoured, but not transferred when adding an alpha channel. def test_gdalwarp_43(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() if test_cli_utilities.get_gdal_translate_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdal_translate_path() + ' ../gdrivers/data/small_world.tif tmp/small_world.tif -mo "FOO=BAR" -mo "NODATA_VALUES=62 93 23"') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' tmp/small_world.tif tmp/test_gdalwarp_43.tif -overwrite -dstalpha') ds = gdal.Open('tmp/test_gdalwarp_43.tif') assert ds.GetMetadataItem('NODATA_VALUES') is None assert ds.GetMetadataItem('FOO') == 'BAR' got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [30106, 32285, 40022, 64261] assert got_cs == expected_cs ############################################################################### # Test effect of -wo SRC_COORD_PRECISION def test_gdalwarp_44(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() # Without -wo SRC_COORD_PRECISION gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -q ../gcore/data/byte.tif tmp/test_gdalwarp_44.tif -wm 10 -overwrite -ts 500 500 -r cubic -ot float32 -t_srs EPSG:4326') ds = gdal.Open('tmp/test_gdalwarp_44.tif') cs1 = ds.GetRasterBand(1).Checksum() ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -q ../gcore/data/byte.tif tmp/test_gdalwarp_44.tif -wm 0.1 -overwrite -ts 500 500 -r cubic -ot float32 -t_srs EPSG:4326') ds = gdal.Open('tmp/test_gdalwarp_44.tif') cs2 = ds.GetRasterBand(1).Checksum() ds = None if cs1 == cs2: print('Unexpected cs1 == cs2') # With -wo SRC_COORD_PRECISION gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -q ../gcore/data/byte.tif tmp/test_gdalwarp_44.tif -wm 10 -et 0.01 -wo SRC_COORD_PRECISION=0.1 -overwrite -ts 500 500 -r cubic -ot float32 -t_srs EPSG:4326') ds = gdal.Open('tmp/test_gdalwarp_44.tif') cs3 = ds.GetRasterBand(1).Checksum() ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -q ../gcore/data/byte.tif tmp/test_gdalwarp_44.tif -wm 0.1 -et 0.01 -wo SRC_COORD_PRECISION=0.1 -overwrite -ts 500 500 -r cubic -ot float32 -t_srs EPSG:4326') ds = gdal.Open('tmp/test_gdalwarp_44.tif') cs4 = ds.GetRasterBand(1).Checksum() ds = None assert cs3 == cs4 ############################################################################### # Test -te_srs def test_gdalwarp_45(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -te_srs EPSG:4267 -te -117.641087629972 33.8915301685897 -117.628190189534 33.9024195619201 ../gcore/data/byte.tif tmp/test_gdalwarp_45.tif -overwrite') ds = gdal.Open('tmp/test_gdalwarp_45.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -te_srs EPSG:4267 -te -117.641087629972 33.8915301685897 -117.628190189534 33.9024195619201 -t_srs EPSG:32611 ../gcore/data/byte.tif tmp/test_gdalwarp_45.tif -overwrite') ds = gdal.Open('tmp/test_gdalwarp_45.tif') assert ds.GetRasterBand(1).Checksum() == 4672 ds = None ############################################################################### # Test -crop_to_cutline def test_gdalwarp_46(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/utmsmall.tif tmp/test_gdalwarp_46.tif -cutline data/cutline.vrt -crop_to_cutline -overwrite') ds = gdal.Open('tmp/test_gdalwarp_46.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18837, 'Bad checksum' ds = None # With explicit -s_srs and -t_srs gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/utmsmall.tif tmp/test_gdalwarp_46.tif -cutline data/cutline.vrt -crop_to_cutline -overwrite -s_srs EPSG:26711 -t_srs EPSG:26711') ds = gdal.Open('tmp/test_gdalwarp_46.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18837, 'Bad checksum' ds = None # With cutline in another SRS gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/cutline_4326.shp data/cutline.vrt -s_srs EPSG:26711 -t_srs EPSG:4326') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' ../gcore/data/utmsmall.tif tmp/test_gdalwarp_46.tif -cutline tmp/cutline_4326.shp -crop_to_cutline -overwrite -t_srs EPSG:32711') ds = gdal.Open('tmp/test_gdalwarp_46.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 19582, 'Bad checksum' ds = None ############################################################################### # Test gdalwarp -co APPEND_SUBDATASET=YES def test_gdalwarp_47_append_subdataset(): if test_cli_utilities.get_gdalwarp_path() is None: pytest.skip() tmpfilename = 'tmp/test_gdalwarp_47_append_subdataset.tif' gdal.Translate(tmpfilename, '../gcore/data/byte.tif') gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -co APPEND_SUBDATASET=YES ../gcore/data/utmsmall.tif ' + tmpfilename) ds = gdal.Open('GTIFF_DIR:2:' + tmpfilename) assert ds.GetRasterBand(1).Checksum() == 50054 ds = None gdal.Unlink(tmpfilename) ############################################################################### # Cleanup def test_gdalwarp_cleanup(): # We don't clean up when run in debug mode. if gdal.GetConfigOption('CPL_DEBUG', 'OFF') == 'ON': return for i in range(37): try: os.remove('tmp/testgdalwarp' + str(i + 1) + '.tif') except OSError: pass try: os.remove('tmp/testgdalwarp' + str(i + 1) + '.vrt') except OSError: pass try: os.remove('tmp/testgdalwarp' + str(i + 1) + '.tif.aux.xml') except OSError: pass try: os.remove('tmp/testgdalwarp_gcp.tif') except OSError: pass try: os.remove('tmp/testgdalwarp24src.tif') except OSError: pass try: os.remove('tmp/testgdalwarp24dst.tif') except OSError: pass try: os.remove('tmp/testgdalwarp30_1.tif') except OSError: pass try: os.remove('tmp/testgdalwarp30_2.tif') except OSError: pass try: os.remove('tmp/testgdalwarp30_3.tif') except OSError: pass try: os.remove('tmp/testgdalwarp33_mask.tif') except OSError: pass try: os.remove('tmp/testgdalwarp37.tif') except OSError: pass try: os.remove('tmp/testgdalwarp38.tif') except OSError: pass try: os.remove('tmp/test_gdalwarp_39.tif') except OSError: pass try: os.remove('tmp/test_gdalwarp_40_src.tif') os.remove('tmp/test_gdalwarp_40.tif') os.remove('tmp/test_gdalwarp_40.vrt') except OSError: pass try: os.remove('tmp/test_gdalwarp_41_src.tif') os.remove('tmp/test_gdalwarp_41.tif') except OSError: pass try: os.remove('tmp/small_world_left.tif') os.remove('tmp/small_world_right.tif') os.remove('tmp/test_gdalwarp_42.tif') except OSError: pass try: os.remove('tmp/small_world.tif') os.remove('tmp/test_gdalwarp_43.tif') except OSError: pass try: os.remove('tmp/test_gdalwarp_44.tif') except OSError: pass try: os.remove('tmp/test_gdalwarp_45.tif') except OSError: pass try: os.remove('tmp/test_gdalwarp_46.tif') except OSError: pass try: os.remove('tmp/cutline_4326.shp') os.remove('tmp/cutline_4326.shx') os.remove('tmp/cutline_4326.dbf') os.remove('tmp/cutline_4326.prj') except OSError: pass gdalautotest-3.1.2/utilities/test_ogr2ogr_lib.py0000775000175000017500000005323613701060014020532 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_ogr2ogr_lib.py 6e648dd6ba67cffa0caf9db47316082b65e664e6 2020-04-27 13:07:20 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: librarified ogr2ogr testing # Author: Faza Mahamood # ############################################################################### # Copyright (c) 2015, Faza Mahamood # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal, gdalconst, ogr import gdaltest import ogrtest import pytest ############################################################################### # Simple test def test_ogr2ogr_lib_1(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 feat0 = ds.GetLayer(0).GetFeature(0) assert feat0.GetFieldAsDouble('AREA') == 215229.266, \ 'Did not get expected value for field AREA' assert feat0.GetFieldAsString('PRFEDEA') == '35043411', \ 'Did not get expected value for field PRFEDEA' ############################################################################### # Test SQLStatement def test_ogr2ogr_lib_2(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory', SQLStatement='select * from poly', SQLDialect='OGRSQL') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 # Test @filename syntax gdal.FileFromMemBuffer('/vsimem/sql.txt', '-- initial comment\nselect * from poly\n-- trailing comment') ds = gdal.VectorTranslate('', srcDS, format='Memory', SQLStatement='@/vsimem/sql.txt') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 gdal.Unlink('/vsimem/sql.txt') # Test @filename syntax with a UTF-8 BOM if sys.version_info >= (3, 0, 0): gdal.FileFromMemBuffer('/vsimem/sql.txt', '\xEF\xBB\xBFselect * from poly'.encode('LATIN1')) else: gdal.FileFromMemBuffer('/vsimem/sql.txt', '\xEF\xBB\xBFselect * from poly') ds = gdal.VectorTranslate('', srcDS, format='Memory', SQLStatement='@/vsimem/sql.txt') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 gdal.Unlink('/vsimem/sql.txt') ############################################################################### # Test WHERE def test_ogr2ogr_lib_3(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory', where='EAS_ID=171') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 # Test @filename syntax gdal.FileFromMemBuffer('/vsimem/filter.txt', 'EAS_ID=171') ds = gdal.VectorTranslate('', srcDS, format='Memory', where='@/vsimem/filter.txt') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 gdal.Unlink('/vsimem/filter.txt') ############################################################################### # Test accessMode def test_ogr2ogr_lib_4(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('/vsimem/poly.shp', srcDS) assert ds.GetLayer(0).GetFeatureCount() == 10, 'wrong feature count' ds = None ds = gdal.VectorTranslate('/vsimem/poly.shp', srcDS, accessMode='append') assert ds is not None, 'ds is None' assert ds.GetLayer(0).GetFeatureCount() == 20, 'wrong feature count' ret = gdal.VectorTranslate(ds, srcDS, accessMode='append') assert ret == 1, 'ds is None' assert ds.GetLayer(0).GetFeatureCount() == 30, 'wrong feature count' feat10 = ds.GetLayer(0).GetFeature(10) assert feat10.GetFieldAsDouble('AREA') == 215229.266, \ 'Did not get expected value for field AREA' assert feat10.GetFieldAsString('PRFEDEA') == '35043411', \ 'Did not get expected value for field PRFEDEA' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/poly.shp') ############################################################################### # Test dstSRS def test_ogr2ogr_lib_5(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory', dstSRS='EPSG:4326') assert str(ds.GetLayer(0).GetSpatialRef()).find('1984') != -1 ############################################################################### # Test selFields def test_ogr2ogr_lib_6(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') # Voluntary don't use the exact case of the source field names (#4502) ds = gdal.VectorTranslate('', srcDS, format='Memory', selectFields=['eas_id', 'prfedea']) lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 feat = lyr.GetNextFeature() ret = 'success' if feat.GetFieldAsDouble('EAS_ID') != 168: gdaltest.post_reason('did not get expected value for EAS_ID') print(feat.GetFieldAsDouble('EAS_ID')) ret = 'fail' elif feat.GetFieldAsString('PRFEDEA') != '35043411': gdaltest.post_reason('did not get expected value for PRFEDEA') print(feat.GetFieldAsString('PRFEDEA')) ret = 'fail' return ret ############################################################################### # Test LCO def test_ogr2ogr_lib_7(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('/vsimem/poly.shp', srcDS, layerCreationOptions=['SHPT=POLYGONZ']) assert ds.GetLayer(0).GetLayerDefn().GetGeomType() == ogr.wkbPolygon25D ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/poly.shp') ############################################################################### # Add explicit source layer name def test_ogr2ogr_lib_8(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory', layers=['poly']) assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 # Test also with just a string and not an array ds = gdal.VectorTranslate('', srcDS, format='Memory', layers='poly') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ############################################################################### # Test -segmentize def test_ogr2ogr_lib_9(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory', segmentizeMaxDist=100) assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 feat = ds.GetLayer(0).GetNextFeature() assert feat.GetGeometryRef().GetGeometryRef(0).GetPointCount() == 36 ############################################################################### # Test overwrite with a shapefile def test_ogr2ogr_lib_10(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('/vsimem/tmp/poly.shp', srcDS) assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds = None # Overwrite ds = gdal.VectorTranslate('/vsimem/tmp', srcDS, accessMode='overwrite') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/tmp') ############################################################################### # Test filter def test_ogr2ogr_lib_11(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') ds = gdal.VectorTranslate('', srcDS, format='Memory', spatFilter=[479609, 4764629, 479764, 4764817]) if ogrtest.have_geos(): assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 else: assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 5 ############################################################################### # Test callback def mycallback(pct, msg, user_data): # pylint: disable=unused-argument user_data[0] = pct return 1 def test_ogr2ogr_lib_12(): tab = [0] ds = gdal.VectorTranslate('', '../ogr/data/poly.shp', format='Memory', callback=mycallback, callback_data=tab) assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 assert tab[0] == 1.0, 'Bad percentage' ############################################################################### # Test callback with failure def mycallback_with_failure(pct, msg, user_data): # pylint: disable=unused-argument if pct > 0.5: return 0 return 1 def test_ogr2ogr_lib_13(): with gdaltest.error_handler(): ds = gdal.VectorTranslate('', '../ogr/data/poly.shp', format='Memory', callback=mycallback_with_failure) assert ds is None ############################################################################### # Test internal wrappers def test_ogr2ogr_lib_14(): # Null dest name and no option try: gdal.wrapper_GDALVectorTranslateDestName(None, gdal.OpenEx('../ogr/data/poly.shp'), None) except RuntimeError: pass ############################################################################### # Test non existing zfield def test_ogr2ogr_lib_15(): srcDS = gdal.OpenEx('../ogr/data/poly.shp') with gdaltest.error_handler(): ds = gdal.VectorTranslate('', srcDS, format='Memory', zField='foo') lyr = ds.GetLayer(0) assert lyr.GetGeomType() == ogr.wkbPolygon ############################################################################### # Test -dim def test_ogr2ogr_lib_16(): tests = [['POINT M (1 2 3)', None, 'POINT M (1 2 3)'], ['POINT M (1 2 3)', 'XY', 'POINT (1 2)'], ['POINT M (1 2 3)', 'XYZ', 'POINT Z (1 2 0)'], ['POINT M (1 2 3)', 'XYM', 'POINT M (1 2 3)'], ['POINT M (1 2 3)', 'XYZM', 'POINT ZM (1 2 0 3)'], ['POINT M (1 2 3)', 'layer_dim', 'POINT M (1 2 3)'], ['POINT ZM (1 2 3 4)', None, 'POINT ZM (1 2 3 4)'], ['POINT ZM (1 2 3 4)', 'XY', 'POINT (1 2)'], ['POINT ZM (1 2 3 4)', 'XYZ', 'POINT Z (1 2 3)'], ['POINT ZM (1 2 3 4)', 'XYM', 'POINT M (1 2 4)'], ['POINT ZM (1 2 3 4)', 'XYZM', 'POINT ZM (1 2 3 4)'], ['POINT ZM (1 2 3 4)', 'layer_dim', 'POINT ZM (1 2 3 4)'], ] for (wkt_before, dim, wkt_after) in tests: srcDS = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) geom = ogr.CreateGeometryFromWkt(wkt_before) lyr = srcDS.CreateLayer('test', geom_type=geom.GetGeometryType()) f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(geom) lyr.CreateFeature(f) ds = gdal.VectorTranslate('', srcDS, format='Memory', dim=dim) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f.GetGeometryRef().ExportToIsoWkt() != wkt_after: print(wkt_before) pytest.fail(dim) ############################################################################### # Test gdal.VectorTranslate(dst_ds, ...) without accessMode specified (#6612) def test_ogr2ogr_lib_17(): ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) gdal.VectorTranslate(ds, gdal.OpenEx('../ogr/data/poly.shp')) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 10 ds = None ############################################################################### # Test -limit def test_ogr2ogr_lib_18(): ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) gdal.VectorTranslate(ds, gdal.OpenEx('../ogr/data/poly.shp'), limit=1) lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 1 ds = None ############################################################################### # Test -addFields + -select def test_ogr2ogr_lib_19(): src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) lyr = src_ds.CreateLayer('layer') lyr.CreateField(ogr.FieldDefn('foo')) lyr.CreateField(ogr.FieldDefn('bar')) f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'bar' f['bar'] = 'foo' lyr.CreateFeature(f) ds = gdal.VectorTranslate('', src_ds, format='Memory', selectFields=['foo']) gdal.VectorTranslate(ds, src_ds, accessMode='append', addFields=True, selectFields=['bar']) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() if f['foo'] != 'bar' or f.IsFieldSet('bar'): f.DumpReadable() pytest.fail() f = lyr.GetNextFeature() if f['bar'] != 'foo' or f.IsFieldSet('foo'): f.DumpReadable() pytest.fail() ds = None ############################################################################### # Test preservation of source geometry field name def test_ogr2ogr_lib_20(): if ogr.GetDriverByName('GPKG') is None: pytest.skip() src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) lyr = src_ds.CreateLayer('layer', geom_type=ogr.wkbNone) lyr.CreateGeomField(ogr.GeomFieldDefn('foo')) ds = gdal.VectorTranslate('/vsimem/out.gpkg', src_ds, format='GPKG') lyr = ds.GetLayer(0) assert lyr.GetGeometryColumn() == 'foo' ds = None gdal.Unlink('/vsimem/out.gpkg') src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) lyr = src_ds.CreateLayer('layer', geom_type=ogr.wkbNone) lyr.CreateGeomField(ogr.GeomFieldDefn('foo')) lyr.CreateGeomField(ogr.GeomFieldDefn('bar')) ds = gdal.VectorTranslate('/vsimem/out.gpkg', src_ds, format='GPKG', selectFields=['bar']) lyr = ds.GetLayer(0) assert lyr.GetGeometryColumn() == 'bar' ds = None gdal.Unlink('/vsimem/out.gpkg') ############################################################################### # Verify -append and -select options are an invalid combination def test_ogr2ogr_lib_21(): src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) lyr = src_ds.CreateLayer('layer') lyr.CreateField(ogr.FieldDefn('foo')) lyr.CreateField(ogr.FieldDefn('bar')) f = ogr.Feature(lyr.GetLayerDefn()) f['foo'] = 'bar' f['bar'] = 'foo' lyr.CreateFeature(f) ds = gdal.VectorTranslate('', src_ds, format='Memory') with gdaltest.error_handler(): gdal.VectorTranslate(ds, src_ds, accessMode='append', selectFields=['foo']) ds = None f.Destroy() src_ds = None assert gdal.GetLastErrorNo() == gdalconst.CPLE_IllegalArg, \ 'expected use of -select and -append together to be invalid' ############################################################################### def test_ogr2ogr_clipsrc_no_dst_geom(): if not ogrtest.have_geos(): pytest.skip() tmpfilename = '/vsimem/out.csv' wkt = 'POLYGON ((479461 4764494,479461 4764196,480012 4764196,480012 4764494,479461 4764494))' ds = gdal.VectorTranslate(tmpfilename, '../ogr/data/poly.shp', options='-f CSV -clipsrc "%s"' % wkt) lyr = ds.GetLayer(0) fc = lyr.GetFeatureCount() assert fc == 1 ds = None gdal.Unlink(tmpfilename) ############################################################################### # Check that ogr2ogr does data axis to CRS axis mapping adaptations in case # of the output driver not following the mapping of the input dataset. def test_ogr2ogr_axis_mapping_swap(): gdal.FileFromMemBuffer("/vsimem/test_ogr2ogr_axis_mapping_swap.gml", """ 49 2 """) gdal.FileFromMemBuffer("/vsimem/test_ogr2ogr_axis_mapping_swap.gfs", """" test test urn:ogc:def:crs:EPSG::4326 """) ds = gdal.OpenEx('/vsimem/test_ogr2ogr_axis_mapping_swap.gml', open_options = ['INVERT_AXIS_ORDER_IF_LAT_LONG=NO']) if ds is None: gdal.Unlink("/vsimem/test_ogr2ogr_axis_mapping_swap.gml") gdal.Unlink("/vsimem/test_ogr2ogr_axis_mapping_swap.gfs") pytest.skip() lyr = ds.GetLayer(0) assert lyr.GetSpatialRef().GetDataAxisToSRSAxisMapping() == [1,2] ds = None ds = gdal.VectorTranslate('/vsimem/test_ogr2ogr_axis_mapping_swap.shp', '/vsimem/test_ogr2ogr_axis_mapping_swap.gml') gdal.Unlink("/vsimem/test_ogr2ogr_axis_mapping_swap.gml") gdal.Unlink("/vsimem/test_ogr2ogr_axis_mapping_swap.gfs") lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() ret = ogrtest.check_feature_geometry(feat, "POINT (2 49)") ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource( '/vsimem/test_ogr2ogr_axis_mapping_swap.shp') assert ret == 0 ############################################################################### # Test -ct def test_ogr2ogr_lib_ct(): ds = gdal.VectorTranslate('', '../ogr/data/poly.shp', format='Memory', dstSRS='EPSG:32630', reproject=True, coordinateOperation="+proj=affine +s11=-1") lyr = ds.GetLayer(0) f = lyr.GetNextFeature() #f.DumpReadable() assert ogrtest.check_feature_geometry(f, "POLYGON ((-479819.84375 4765180.5,-479690.1875 4765259.5,-479647.0 4765369.5,-479730.375 4765400.5,-480039.03125 4765539.5,-480035.34375 4765558.5,-480159.78125 4765610.5,-480202.28125 4765482.0,-480365.0 4765015.5,-480389.6875 4764950.0,-480133.96875 4764856.5,-480080.28125 4764979.5,-480082.96875 4765049.5,-480088.8125 4765139.5,-480059.90625 4765239.5,-480019.71875 4765319.5,-479980.21875 4765409.5,-479909.875 4765370.0,-479859.875 4765270.0,-479819.84375 4765180.5))") == 0 ############################################################################### # Test -ct without SRS specification def test_ogr2ogr_lib_ct_no_srs(): ds = gdal.VectorTranslate('', '../ogr/data/poly.shp', format='Memory', coordinateOperation="+proj=affine +s11=-1") lyr = ds.GetLayer(0) assert lyr.GetSpatialRef().GetAuthorityCode(None) == '27700' f = lyr.GetNextFeature() #f.DumpReadable() assert ogrtest.check_feature_geometry(f, "POLYGON ((-479819.84375 4765180.5,-479690.1875 4765259.5,-479647.0 4765369.5,-479730.375 4765400.5,-480039.03125 4765539.5,-480035.34375 4765558.5,-480159.78125 4765610.5,-480202.28125 4765482.0,-480365.0 4765015.5,-480389.6875 4764950.0,-480133.96875 4764856.5,-480080.28125 4764979.5,-480082.96875 4765049.5,-480088.8125 4765139.5,-480059.90625 4765239.5,-480019.71875 4765319.5,-479980.21875 4765409.5,-479909.875 4765370.0,-479859.875 4765270.0,-479819.84375 4765180.5))") == 0 ############################################################################### # Test -nlt CONVERT_TO_LINEAR -nlt PROMOTE_TO_MULTI @pytest.mark.parametrize('geometryType', [ ['PROMOTE_TO_MULTI', 'CONVERT_TO_LINEAR'], ['CONVERT_TO_LINEAR', 'PROMOTE_TO_MULTI'] ]) def test_ogr2ogr_lib_convert_to_linear_promote_to_multi(geometryType): src_ds = gdal.GetDriverByName('Memory').Create('', 0, 0, 0) lyr = src_ds.CreateLayer('layer') f = ogr.Feature(lyr.GetLayerDefn()) f.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 0,0 0)')) lyr.CreateFeature(f) ds = gdal.VectorTranslate('', src_ds, format='Memory', geometryType=geometryType) lyr = ds.GetLayer(0) f = lyr.GetNextFeature() g = f.GetGeometryRef() assert g.GetGeometryType() == ogr.wkbMultiLineString ############################################################################### # Test -makevalid def test_ogr2ogr_lib_makevalid(): # Check if MakeValid() is available g = ogr.CreateGeometryFromWkt('POLYGON ((0 0,10 10,0 10,10 0,0 0))') with gdaltest.error_handler(): make_valid_available = g.MakeValid() is not None tmpfilename = '/vsimem/tmp.csv' with gdaltest.tempfile(tmpfilename,"""id,WKT 1,"POLYGON ((0 0,10 10,0 10,10 0,0 0))" 2,"POLYGON ((0 0,0 1,0.5 1,0.5 0.75,0.5 1,1 1,1 0,0 0))" """): if make_valid_available: ds = gdal.VectorTranslate('', tmpfilename, format='Memory', makeValid=True) else: with gdaltest.error_handler(): with pytest.raises(Exception): gdal.VectorTranslate('', tmpfilename, format='Memory', makeValid=True) return lyr = ds.GetLayer(0) f = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(f, "MULTIPOLYGON (((0 0,5 5,10 0,0 0)),((5 5,0 10,10 10,5 5)))") == 0 f = lyr.GetNextFeature() assert ogrtest.check_feature_geometry(f, "POLYGON ((0 0,0 1,0.5 1.0,1 1,1 0,0 0))") == 0 gdalautotest-3.1.2/utilities/test_ogr2ogr.py0000775000175000017500000025576613701060014017720 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_ogr2ogr.py beafef7c74495c25010f454db15c8c0b5bc64247 2020-01-24 18:52:34 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ogr2ogr testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import os import shutil import pytest from osgeo import gdal, ogr, osr import gdaltest import ogrtest import test_cli_utilities ############################################################################### # Simple test def test_ogr2ogr_1(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp') assert (err is None or err == ''), 'got error/warning' ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 feat0 = ds.GetLayer(0).GetFeature(0) assert feat0.GetFieldAsDouble('AREA') == 215229.266, \ 'Did not get expected value for field AREA' assert feat0.GetFieldAsString('PRFEDEA') == '35043411', \ 'Did not get expected value for field PRFEDEA' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -sql def test_ogr2ogr_2(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -sql "select * from poly"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -spat def test_ogr2ogr_3(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -spat 479609 4764629 479764 4764817') ds = ogr.Open('tmp/poly.shp') if ogrtest.have_geos(): assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 else: assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 5 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -where def test_ogr2ogr_4(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -where "EAS_ID=171"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -append def test_ogr2ogr_5(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp') # All 3 variants below should be equivalent gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -update -append tmp/poly.shp ../ogr/data/poly.shp') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/poly.shp ../ogr/data/poly.shp') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append -update tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 40 feat10 = ds.GetLayer(0).GetFeature(10) assert feat10.GetFieldAsDouble('AREA') == 215229.266, \ 'Did not get expected value for field AREA' assert feat10.GetFieldAsString('PRFEDEA') == '35043411', \ 'Did not get expected value for field PRFEDEA' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') def check_if_has_ogr_pg(): path = '../ogr' if path not in sys.path: sys.path.append(path) import ogr_pg ogr_pg.test_ogr_pg_1() if gdaltest.pg_ds is None: pytest.skip() gdaltest.pg_ds.Destroy() ############################################################################### # Test -overwrite def test_ogr2ogr_6(): check_if_has_ogr_pg() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PostgreSQL PG:"' + gdaltest.pg_connection_string + '" ../ogr/data/poly.shp -nln tpoly') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -update -overwrite -f PostgreSQL PG:"' + gdaltest.pg_connection_string + '" ../ogr/data/poly.shp -nln tpoly') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert ds is not None and ds.GetLayerByName('tpoly').GetFeatureCount() == 10 ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') ############################################################################### # Test -gt def test_ogr2ogr_7(): check_if_has_ogr_pg() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if test_cli_utilities.get_ogrinfo_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PostgreSQL PG:"' + gdaltest.pg_connection_string + '" ../ogr/data/poly.shp -nln tpoly -gt 1') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) assert ds is not None and ds.GetLayerByName('tpoly').GetFeatureCount() == 10 ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' PG:"' + gdaltest.pg_connection_string + '" -sql "DELLAYER:tpoly"') ############################################################################### # Test -t_srs def test_ogr2ogr_8(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -t_srs EPSG:4326 tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert str(ds.GetLayer(0).GetSpatialRef()).find('1984') != -1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -a_srs def test_ogr2ogr_9(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -a_srs EPSG:4326 tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert str(ds.GetLayer(0).GetSpatialRef()).find('1984') != -1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -select def test_ogr2ogr_10(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass # Voluntary don't use the exact case of the source field names (#4502) gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -select eas_id,prfedea tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') lyr = ds.GetLayer(0) assert lyr.GetLayerDefn().GetFieldCount() == 2 feat = lyr.GetNextFeature() ret = 'success' if feat.GetFieldAsDouble('EAS_ID') != 168: gdaltest.post_reason('did not get expected value for EAS_ID') print(feat.GetFieldAsDouble('EAS_ID')) ret = 'fail' elif feat.GetFieldAsString('PRFEDEA') != '35043411': gdaltest.post_reason('did not get expected value for PRFEDEA') print(feat.GetFieldAsString('PRFEDEA')) ret = 'fail' feat = None ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') return ret ############################################################################### # Test -lco def test_ogr2ogr_11(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -lco SHPT=POLYGONZ tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds.GetLayer(0).GetLayerDefn().GetGeomType() == ogr.wkbPolygon25D ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -nlt def test_ogr2ogr_12(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -nlt POLYGON25D tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds.GetLayer(0).GetLayerDefn().GetGeomType() == ogr.wkbPolygon25D ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Add explicit source layer name def test_ogr2ogr_13(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp poly') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -segmentize def test_ogr2ogr_14(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -segmentize 100 tmp/poly.shp ../ogr/data/poly.shp poly') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 feat = ds.GetLayer(0).GetNextFeature() assert feat.GetGeometryRef().GetGeometryRef(0).GetPointCount() == 36 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -overwrite with a shapefile def test_ogr2ogr_15(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() # Overwrite gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -overwrite tmp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -fid def test_ogr2ogr_16(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -fid 8 tmp/poly.shp ../ogr/data/poly.shp') src_ds = ogr.Open('../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 src_feat = src_ds.GetLayer(0).GetFeature(8) feat = ds.GetLayer(0).GetNextFeature() assert feat.GetField("EAS_ID") == src_feat.GetField("EAS_ID") ds.Destroy() src_ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -progress def test_ogr2ogr_17(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass ret = gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -progress tmp/poly.shp ../ogr/data/poly.shp') assert ret.find('0...10...20...30...40...50...60...70...80...90...100 - done.') != -1 ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -wrapdateline def test_ogr2ogr_18(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') except (OSError, AttributeError): pass try: os.stat('tmp/wrapdateline_dst.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') except (OSError, AttributeError): pass ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/wrapdateline_src.shp') srs = osr.SpatialReference() srs.ImportFromEPSG(32660) lyr = ds.CreateLayer('wrapdateline_src', srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('POLYGON((700000 4000000,800000 4000000,800000 3000000,700000 3000000,700000 4000000))') feat.SetGeometryDirectly(geom) lyr.CreateFeature(feat) feat.Destroy() ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -wrapdateline -t_srs EPSG:4326 tmp/wrapdateline_dst.shp tmp/wrapdateline_src.shp') expected_wkt = 'MULTIPOLYGON (((-179.667822828781 36.0983491954137,-179.974688335419 27.0898861430767,-180.0 27.0904291236983,-180.0 36.1071354433546,-179.667822828781 36.0983491954137)),((180.0 27.0904291237411,179.017505655195 27.1079795236252,179.222391385437 36.1240958321293,180.0 36.1071354433546,180.0 27.0904291237411)))' expected_geom = ogr.CreateGeometryFromWkt(expected_wkt) ds = ogr.Open('tmp/wrapdateline_dst.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() got_wkt = feat.GetGeometryRef().ExportToWkt() ret = ogrtest.check_feature_geometry(feat, expected_geom) feat.Destroy() expected_geom.Destroy() ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') if ret == 0: return pytest.fail(got_wkt) ############################################################################### # Test -clipsrc def test_ogr2ogr_19(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -clipsrc spat_extent -spat 479609 4764629 479764 4764817') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test correct remap of fields when laundering to Shapefile format # Test that the data is going into the right field # FIXME: Any field is skipped if a subsequent field with same name is found. def test_ogr2ogr_20(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() expected_fields = ['a', 'A_1', 'a_1_2', 'aaaaaAAAAA', 'aAaaaAAA_1', 'aaaaaAAAAB', 'aaaaaAAA_2', 'aaaaaAAA_3', 'aaaaaAAA_4', 'aaaaaAAA_5', 'aaaaaAAA_6', 'aaaaaAAA_7', 'aaaaaAAA_8', 'aaaaaAAA_9', 'aaaaaAAA10'] expected_data = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'] gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp data/Fields.csv') ds = ogr.Open('tmp/Fields.dbf') assert ds is not None layer_defn = ds.GetLayer(0).GetLayerDefn() if layer_defn.GetFieldCount() != 15: ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.dbf') pytest.fail('Unexpected field count: ' + str(ds.GetLayer(0).GetLayerDefn().GetFieldCount())) error_occurred = False feat = ds.GetLayer(0).GetNextFeature() for i in range(layer_defn.GetFieldCount()): if layer_defn.GetFieldDefn(i).GetNameRef() != expected_fields[i]: print('Expected ', expected_fields[i], ',but got', layer_defn.GetFieldDefn(i).GetNameRef()) error_occurred = True if feat.GetFieldAsString(i) != expected_data[i]: print('Expected the value ', expected_data[i], ',but got', feat.GetFieldAsString(i)) error_occurred = True ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.dbf') assert not error_occurred ############################################################################### # Test ogr2ogr when the output driver has already created the fields # at dataset creation (#3247) def test_ogr2ogr_21(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.remove('tmp/testogr2ogr21.gtm') except OSError: pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GPSTrackMaker tmp/testogr2ogr21.gtm data/dataforogr2ogr21.csv ' + '-sql "SELECT comment, name FROM dataforogr2ogr21" -nlt POINT') ds = ogr.Open('tmp/testogr2ogr21.gtm') assert ds is not None ds.GetLayer(0).GetLayerDefn() lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('name') != 'NAME' or \ feat.GetFieldAsString('comment') != 'COMMENT': print(feat.GetFieldAsString('comment')) ds.Destroy() os.remove('tmp/testogr2ogr21.gtm') pytest.fail(feat.GetFieldAsString('name')) ds.Destroy() os.remove('tmp/testogr2ogr21.gtm') ############################################################################### # Test ogr2ogr when the output driver delays the destination layer defn creation (#3384) def test_ogr2ogr_22(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f "MapInfo File" tmp/testogr2ogr22.mif data/dataforogr2ogr21.csv ' + '-sql "SELECT comment, name FROM dataforogr2ogr21" -nlt POINT') ds = ogr.Open('tmp/testogr2ogr22.mif') assert ds is not None ds.GetLayer(0).GetLayerDefn() lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('name') != 'NAME' or \ feat.GetFieldAsString('comment') != 'COMMENT': print(feat.GetFieldAsString('comment')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr22.mif') pytest.fail(feat.GetFieldAsString('name')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr22.mif') ############################################################################### # Same as previous but with -select def test_ogr2ogr_23(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f "MapInfo File" tmp/testogr2ogr23.mif data/dataforogr2ogr21.csv ' + '-sql "SELECT comment, name FROM dataforogr2ogr21" -select comment,name -nlt POINT') ds = ogr.Open('tmp/testogr2ogr23.mif') assert ds is not None ds.GetLayer(0).GetLayerDefn() lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetFieldAsString('name') != 'NAME' or \ feat.GetFieldAsString('comment') != 'COMMENT': print(feat.GetFieldAsString('comment')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr23.mif') pytest.fail(feat.GetFieldAsString('name')) ds.Destroy() ogr.GetDriverByName('MapInfo File').DeleteDataSource('tmp/testogr2ogr23.mif') ############################################################################### # Test -clipsrc with WKT geometry (#3530) def test_ogr2ogr_24(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -clipsrc "POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -clipsrc with clip from external datasource def test_ogr2ogr_25(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass f = open('tmp/clip.csv', 'wt') f.write('foo,WKT\n') f.write('foo,"POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -clipsrc tmp/clip.csv -clipsrcwhere foo=\'foo\'') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') os.remove('tmp/clip.csv') ############################################################################### # Test -clipdst with WKT geometry (#3530) def test_ogr2ogr_26(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/poly.shp ../ogr/data/poly.shp -clipdst "POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test -clipdst with clip from external datasource def test_ogr2ogr_27(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass f = open('tmp/clip.csv', 'wt') f.write('foo,WKT\n') f.write('foo,"POLYGON((479609 4764629,479609 4764817,479764 4764817,479764 4764629,479609 4764629))"\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -nlt MULTIPOLYGON tmp/poly.shp ../ogr/data/poly.shp -clipdst tmp/clip.csv -clipdstsql "SELECT * from clip"') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 4 assert ds.GetLayer(0).GetExtent() == (479609, 479764, 4764629, 4764817), \ 'unexpected extent' ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') os.remove('tmp/clip.csv') ############################################################################### # Test -wrapdateline on linestrings def test_ogr2ogr_28(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') except (OSError, AttributeError): pass try: os.stat('tmp/wrapdateline_dst.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') except (OSError, AttributeError): pass ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/wrapdateline_src.shp') srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer('wrapdateline_src', srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) geom = ogr.CreateGeometryFromWkt('LINESTRING(160 0,165 1,170 2,175 3,177 4,-177 5,-175 6,-170 7,-177 8,177 9,170 10)') feat.SetGeometryDirectly(geom) lyr.CreateFeature(feat) feat.Destroy() ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -wrapdateline tmp/wrapdateline_dst.shp tmp/wrapdateline_src.shp') expected_wkt = 'MULTILINESTRING ((160 0,165 1,170 2,175 3,177 4,180 4.5),(-180 4.5,-177 5,-175 6,-170 7,-177 8,-180 8.5),(180 8.5,177 9,170 10))' expected_geom = ogr.CreateGeometryFromWkt(expected_wkt) ds = ogr.Open('tmp/wrapdateline_dst.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() ret = ogrtest.check_feature_geometry(feat, expected_geom) feat.Destroy() expected_geom.Destroy() ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') assert ret == 0 ############################################################################### # Test -wrapdateline on polygons def test_ogr2ogr_29(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if not ogrtest.have_geos(): pytest.skip() for i in range(2): try: os.stat('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') except (OSError, AttributeError): pass try: os.stat('tmp/wrapdateline_dst.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') except (OSError, AttributeError): pass ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/wrapdateline_src.shp') srs = osr.SpatialReference() srs.ImportFromEPSG(4326) lyr = ds.CreateLayer('wrapdateline_src', srs=srs) feat = ogr.Feature(lyr.GetLayerDefn()) if i == 0: geom = ogr.CreateGeometryFromWkt('POLYGON((179 40,179.5 40,-179.5 40,-179 40,-170 40,-165 40,-165 30,-170 30,-179 30,-179.5 30,179.5 30,179 30,179 40))') else: geom = ogr.CreateGeometryFromWkt('POLYGON((-165 30,-170 30,-179 30,-179.5 30,179.5 30,179 30,179 40,179.5 40,-179.5 40,-179 40,-170 40,-165 40,-165 30))') feat.SetGeometry(geom) lyr.CreateFeature(feat) feat.Destroy() ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -wrapdateline tmp/wrapdateline_dst.shp tmp/wrapdateline_src.shp') expected_wkt = 'MULTIPOLYGON (((180 30,179.5 30.0,179 30,179 40,179.5 40.0,180 40,180 30)),((-180 40,-179.5 40.0,-179 40,-170 40,-165 40,-165 30,-170 30,-179 30,-179.5 30.0,-180 30,-180 40)))' expected_geom = ogr.CreateGeometryFromWkt(expected_wkt) ds = ogr.Open('tmp/wrapdateline_dst.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() ret = ogrtest.check_feature_geometry(feat, expected_geom) if ret != 0: print('src is : %s' % geom.ExportToWkt()) print('got : %s' % feat.GetGeometryRef().ExportToWkt()) feat.Destroy() expected_geom.Destroy() ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/wrapdateline_dst.shp') assert ret == 0 ############################################################################### # Test -splitlistfields option def test_ogr2ogr_30(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() ds = ogr.Open('../ogr/data/testlistfields.gml') if ds is None: pytest.skip() ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -splitlistfields tmp/test_ogr2ogr_30.dbf ../ogr/data/testlistfields.gml') gdal.Unlink('../ogr/data//testlistfields.gfs') ds = ogr.Open('tmp/test_ogr2ogr_30.dbf') assert ds is not None lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('attrib11') != 'value1' or \ feat.GetField('attrib12') != 'value2' or \ feat.GetField('attrib2') != 'value3' or \ feat.GetField('attrib31') != 4 or \ feat.GetField('attrib32') != 5 or \ feat.GetField('attrib41') != 6.1 or \ feat.GetField('attrib42') != 7.1: feat.DumpReadable() pytest.fail('did not get expected attribs') ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_30.dbf') ############################################################################### # Test that -overwrite work if the output file doesn't yet exist (#3825) def test_ogr2ogr_31(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -overwrite tmp/poly.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') ############################################################################### # Test that -append/-overwrite to a single-file shapefile work without specifying -nln def test_ogr2ogr_32(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_32.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_32.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_32.shp ../ogr/data/poly.shp') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/test_ogr2ogr_32.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_32.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20, '-append failed' ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -overwrite tmp/test_ogr2ogr_32.shp ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_32.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ '-overwrite failed' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_32.shp') ############################################################################### # Test -explodecollections def test_ogr2ogr_33(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_33_src.csv') ogr.GetDriverByName('CSV').DeleteDataSource('tmp/test_ogr2ogr_33_src.csv') except (OSError, AttributeError): pass try: os.stat('tmp/test_ogr2ogr_33_dst.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_33_dst.shp') except (OSError, AttributeError): pass f = open('tmp/test_ogr2ogr_33_src.csv', 'wt') f.write('foo,WKT\n') f.write('bar,"MULTIPOLYGON (((10 10,10 11,11 11,11 10,10 10)),((100 100,100 200,200 200,200 100,100 100),(125 125,175 125,175 175,125 175,125 125)))"\n') f.write('baz,"POLYGON ((0 0,0 1,1 1,1 0,0 0))"\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -explodecollections tmp/test_ogr2ogr_33_dst.shp tmp/test_ogr2ogr_33_src.csv -select foo') ds = ogr.Open('tmp/test_ogr2ogr_33_dst.shp') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 3, '-explodecollections failed' feat = lyr.GetFeature(0) if feat.GetField("foo") != 'bar': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((10 10,10 11,11 11,11 10,10 10))': feat.DumpReadable() pytest.fail() feat = lyr.GetFeature(1) if feat.GetField("foo") != 'bar': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((100 100,100 200,200 200,200 100,100 100),(125 125,175 125,175 175,125 175,125 125))': feat.DumpReadable() pytest.fail() feat = lyr.GetFeature(2) if feat.GetField("foo") != 'baz': feat.DumpReadable() pytest.fail() if feat.GetGeometryRef().ExportToWkt() != 'POLYGON ((0 0,0 1,1 1,1 0,0 0))': feat.DumpReadable() pytest.fail() ds = None ogr.GetDriverByName('CSV').DeleteDataSource('tmp/test_ogr2ogr_33_src.csv') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_33_dst.shp') ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist src.shp -nln someDirThatDoesNotExist' # This should result in creating a someDirThatDoesNotExist directory with # someDirThatDoesNotExist.shp/dbf/shx inside this directory def test_ogr2ogr_34(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_34_dir') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_34_dir') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_34_dir ../ogr/data/poly.shp -nln test_ogr2ogr_34_dir') ds = ogr.Open('tmp/test_ogr2ogr_34_dir/test_ogr2ogr_34_dir.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ 'initial shapefile creation failed' ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/test_ogr2ogr_34_dir ../ogr/data/poly.shp -nln test_ogr2ogr_34_dir') ds = ogr.Open('tmp/test_ogr2ogr_34_dir/test_ogr2ogr_34_dir.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20, '-append failed' ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -overwrite tmp/test_ogr2ogr_34_dir ../ogr/data/poly.shp -nln test_ogr2ogr_34_dir') ds = ogr.Open('tmp/test_ogr2ogr_34_dir/test_ogr2ogr_34_dir.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ '-overwrite failed' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_34_dir') ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist src.shp' def test_ogr2ogr_35(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_35_dir') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_35_dir') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_35_dir ../ogr/data/poly.shp ') ds = ogr.Open('tmp/test_ogr2ogr_35_dir/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ 'initial shapefile creation failed' ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/test_ogr2ogr_35_dir ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_35_dir/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 20, '-append failed' ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -overwrite tmp/test_ogr2ogr_35_dir ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_35_dir/poly.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 10, \ '-overwrite failed' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_35_dir') ############################################################################### # Test ogr2ogr -zfield def test_ogr2ogr_36(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_36.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_36.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_36.shp ../ogr/data/poly.shp -zfield EAS_ID') ds = ogr.Open('tmp/test_ogr2ogr_36.shp') feat = ds.GetLayer(0).GetNextFeature() wkt = feat.GetGeometryRef().ExportToWkt() ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_36.shp') assert wkt.find(' 168,') != -1 ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist.shp dataSourceWithMultipleLayer' def test_ogr2ogr_37(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_37_dir.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_37_dir.shp') except (OSError, AttributeError): pass try: os.mkdir('tmp/test_ogr2ogr_37_src') except OSError: pass shutil.copy('../ogr/data/poly.shp', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/poly.shx', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/poly.dbf', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/testpoly.shp', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/testpoly.shx', 'tmp/test_ogr2ogr_37_src') shutil.copy('../ogr/data/testpoly.dbf', 'tmp/test_ogr2ogr_37_src') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_37_dir.shp tmp/test_ogr2ogr_37_src') ds = ogr.Open('tmp/test_ogr2ogr_37_dir.shp') assert ds is not None and ds.GetLayerCount() == 2 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_37_src') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_37_dir.shp') ############################################################################### # Test that we take into account the fields by the where clause when combining # -select and -where (#4015) def test_ogr2ogr_38(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_38.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_38.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_38.shp ../ogr/data/poly.shp -select AREA -where "EAS_ID = 170"') ds = ogr.Open('tmp/test_ogr2ogr_38.shp') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() assert feat is not None ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_38.shp') ############################################################################### # Test 'ogr2ogr someDirThatDoesNotExist.shp dataSourceWithMultipleLayer -sql "select * from alayer"' (#4268) def test_ogr2ogr_39(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_39_dir.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_39.shp') except (OSError, AttributeError): pass try: os.mkdir('tmp/test_ogr2ogr_39_src') except OSError: pass shutil.copy('../ogr/data/poly.shp', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/poly.shx', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/poly.dbf', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/testpoly.shp', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/testpoly.shx', 'tmp/test_ogr2ogr_39_src') shutil.copy('../ogr/data/testpoly.dbf', 'tmp/test_ogr2ogr_39_src') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_39.shp tmp/test_ogr2ogr_39_src -sql "select * from poly"') ds = ogr.Open('tmp/test_ogr2ogr_39.shp') assert ds is not None and ds.GetLayerCount() == 1 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_39_src') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_39.shp') ############################################################################### # Test 'ogr2ogr -update asqlite.db asqlite.db layersrc -nln layerdst' (#4270) def test_ogr2ogr_40(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() drv = ogr.GetDriverByName('SQLite') if drv is None: pytest.skip() try: ogr.GetDriverByName('SQLite').DeleteDataSource('tmp/test_ogr2ogr_40.db') except AttributeError: pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f SQlite tmp/test_ogr2ogr_40.db ../ogr/data/poly.shp') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -update tmp/test_ogr2ogr_40.db tmp/test_ogr2ogr_40.db poly -nln poly2') ds = ogr.Open('tmp/test_ogr2ogr_40.db') lyr = ds.GetLayerByName('poly2') assert lyr.GetFeatureCount() == 10 ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('tmp/test_ogr2ogr_40.db') ############################################################################### # Test 'ogr2ogr -update PG:xxxx PG:xxxx layersrc -nln layerdst' (#4270) def test_ogr2ogr_41(): check_if_has_ogr_pg() if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() ds = ogr.Open('PG:' + gdaltest.pg_connection_string) ds.ExecuteSQL('DELLAYER:test_ogr2ogr_41_src') ds.ExecuteSQL('DELLAYER:test_ogr2ogr_41_target') lyr = ds.CreateLayer('test_ogr2ogr_41_src') lyr.CreateField(ogr.FieldDefn('foo', ogr.OFTString)) lyr.StartTransaction() for i in range(501): feat = ogr.Feature(lyr.GetLayerDefn()) feat['foo'] = '%d' % i lyr.CreateFeature(feat) feat = None lyr.CommitTransaction() lyr = None ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -update PG:"' + gdaltest.pg_connection_string + '" PG:"' + gdaltest.pg_connection_string + '" test_ogr2ogr_41_src -nln test_ogr2ogr_41_target') ds = ogr.Open('PG:' + gdaltest.pg_connection_string) lyr = ds.GetLayerByName('test_ogr2ogr_41_target') assert lyr.GetFeatureCount() == 501 ds.ExecuteSQL('DELLAYER:test_ogr2ogr_41_src') ds.ExecuteSQL('DELLAYER:test_ogr2ogr_41_target') ds = None ############################################################################### # Test combination of -select and -where FID=xx (#4500) def test_ogr2ogr_42(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_42.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_42.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_42.shp ../ogr/data/poly.shp -select AREA -where "FID = 0"') ds = ogr.Open('tmp/test_ogr2ogr_42.shp') lyr = ds.GetLayerByIndex(0) assert lyr.GetFeatureCount() == 1 ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_42.shp') ############################################################################### # Test -dim 3 and -dim 2 def test_ogr2ogr_43(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_43_3d.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_3d.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_43_3d.shp ../ogr/data/poly.shp -dim 3') ds = ogr.Open('tmp/test_ogr2ogr_43_3d.shp') lyr = ds.GetLayerByIndex(0) assert lyr.GetGeomType() == ogr.wkbPolygon25D ds = None try: os.stat('tmp/test_ogr2ogr_43_2d.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_2d.shp') except (OSError, AttributeError): pass gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_43_2d.shp tmp/test_ogr2ogr_43_3d.shp -dim 2') ds = ogr.Open('tmp/test_ogr2ogr_43_2d.shp') lyr = ds.GetLayerByIndex(0) assert lyr.GetGeomType() == ogr.wkbPolygon ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_2d.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_43_3d.shp') ############################################################################### # Test -nlt PROMOTE_TO_MULTI for polygon/multipolygon def test_ogr2ogr_44(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_44_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_44_src.shp') except (OSError, AttributeError): pass gdal.Unlink('tmp/test_ogr2ogr_44.gml') gdal.Unlink('tmp/test_ogr2ogr_44.xsd') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test_ogr2ogr_44_src.shp') lyr = ds.CreateLayer('test_ogr2ogr_44_src', geom_type=ogr.wkbPolygon) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 1,1 1,0 0)),((10 0,10 1,11 1,10 0)))')) lyr.CreateFeature(feat) ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/test_ogr2ogr_44.gml tmp/test_ogr2ogr_44_src.shp -nlt PROMOTE_TO_MULTI') f = open('tmp/test_ogr2ogr_44.xsd') data = f.read() f.close() assert data.find('type="gml:MultiPolygonPropertyType"') != -1 f = open('tmp/test_ogr2ogr_44.gml') data = f.read() f.close() assert data.find('0,0 0,1 1,1 0,0') != -1 ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_44_src.shp') os.unlink('tmp/test_ogr2ogr_44.gml') os.unlink('tmp/test_ogr2ogr_44.xsd') ############################################################################### # Test -nlt PROMOTE_TO_MULTI for linestring/multilinestring def test_ogr2ogr_45(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_45_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_45_src.shp') except (OSError, AttributeError): pass gdal.Unlink('tmp/test_ogr2ogr_45.gml') gdal.Unlink('tmp/test_ogr2ogr_45.xsd') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test_ogr2ogr_45_src.shp') lyr = ds.CreateLayer('test_ogr2ogr_45_src', geom_type=ogr.wkbLineString) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,0 1,1 1,0 0)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 0,0 1,1 1,0 0),(10 0,10 1,11 1,10 0))')) lyr.CreateFeature(feat) ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/test_ogr2ogr_45.gml tmp/test_ogr2ogr_45_src.shp -nlt PROMOTE_TO_MULTI') f = open('tmp/test_ogr2ogr_45.xsd') data = f.read() f.close() assert data.find('type="gml:MultiLineStringPropertyType"') != -1 f = open('tmp/test_ogr2ogr_45.gml') data = f.read() f.close() assert data.find('0,0 0,1 1,1 0,0') != -1 ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_45_src.shp') os.unlink('tmp/test_ogr2ogr_45.gml') os.unlink('tmp/test_ogr2ogr_45.xsd') ############################################################################### # Test -gcp (#4604) def test_ogr2ogr_46(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/test_ogr2ogr_46_src.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_46_src.shp') except (OSError, AttributeError): pass gdal.Unlink('tmp/test_ogr2ogr_46.gml') gdal.Unlink('tmp/test_ogr2ogr_46.xsd') ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/test_ogr2ogr_46_src.shp') lyr = ds.CreateLayer('test_ogr2ogr_46_src', geom_type=ogr.wkbPoint) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(0 0)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 1)')) lyr.CreateFeature(feat) ds = None for option in ['', ' -tps', ' -order 1', ' -a_srs EPSG:4326', ' -s_srs EPSG:4326 -t_srs EPSG:3857']: gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/test_ogr2ogr_46.gml tmp/test_ogr2ogr_46_src.shp -gcp 0 0 2 49 -gcp 0 1 2 50 -gcp 1 0 3 49%s' % option) f = open('tmp/test_ogr2ogr_46.gml') data = f.read() f.close() assert not (data.find('2,49') == -1 and data.find('2.0,49.0') == -1 and data.find('222638.') == -1), \ option assert not (data.find('3,50') == -1 and data.find('3.0,50.0') == -1 and data.find('333958.') == -1), \ option os.unlink('tmp/test_ogr2ogr_46.gml') os.unlink('tmp/test_ogr2ogr_46.xsd') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_46_src.shp') ############################################################################### # Test reprojection with features with different SRS def test_ogr2ogr_47(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_47_src.gml', 'wt') f.write(""" 500000,4500000 500000,4500000 """) f.close() gdal.Unlink('tmp/test_ogr2ogr_47_src.gfs') ds = ogr.Open('tmp/test_ogr2ogr_47_src.gml') if ds is None: os.unlink('tmp/test_ogr2ogr_47_src.gml') pytest.skip() ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML -t_srs EPSG:4326 tmp/test_ogr2ogr_47_dst.gml tmp/test_ogr2ogr_47_src.gml') f = open('tmp/test_ogr2ogr_47_dst.gml') data = f.read() f.close() assert ('>-3.0,40.65' in data and '>3.0,40.65' in data) or \ ('>-3,40.65' in data and '>3.0,40.65' in data) or \ ('>-2.99999999999999,40.65' in data and '>2.99999999999999,40.65' in data), data os.unlink('tmp/test_ogr2ogr_47_dst.gml') os.unlink('tmp/test_ogr2ogr_47_dst.xsd') os.unlink('tmp/test_ogr2ogr_47_src.gml') os.unlink('tmp/test_ogr2ogr_47_src.gfs') ############################################################################### # Test fieldmap option def test_ogr2ogr_48(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp data/Fields.csv') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append -fieldmap identity tmp data/Fields.csv') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append -fieldmap 14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 tmp data/Fields.csv') ds = ogr.Open('tmp/Fields.dbf') assert ds is not None layer_defn = ds.GetLayer(0).GetLayerDefn() if layer_defn.GetFieldCount() != 15: ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.dbf') pytest.fail('Unexpected field count: ' + str(ds.GetLayer(0).GetLayerDefn().GetFieldCount())) error_occurred = False lyr = ds.GetLayer(0) lyr.GetNextFeature() feat = lyr.GetNextFeature() for i in range(layer_defn.GetFieldCount()): if feat.GetFieldAsString(i) != str(i + 1): print('Expected the value ', str(i + 1), ',but got', feat.GetFieldAsString(i)) error_occurred = True feat = lyr.GetNextFeature() for i in range(layer_defn.GetFieldCount()): if feat.GetFieldAsString(i) != str(layer_defn.GetFieldCount() - i): print('Expected the value ', str(layer_defn.GetFieldCount() - i), ',but got', feat.GetFieldAsString(i)) error_occurred = True ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/Fields.dbf') assert not error_occurred ############################################################################### # Test detection of duplicated field names in source layer and renaming # in target layer def test_ogr2ogr_49(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f CSV tmp/test_ogr2ogr_49.csv data/duplicatedfields.csv') f = open('tmp/test_ogr2ogr_49.csv') lines = f.readlines() f.close() os.unlink('tmp/test_ogr2ogr_49.csv') assert (lines[0].find('foo,bar,foo3,foo2,baz,foo4') == 0 and \ lines[1].find('val_foo,val_bar,val_foo3,val_foo2,val_baz,val_foo4') == 0) ############################################################################### # Test detection of duplicated field names is case insensitive (#5208) def test_ogr2ogr_49_bis(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f KML tmp/test_ogr2ogr_49_bis.kml data/grid.csv -sql "SELECT field_1 AS name FROM grid WHERE fid = 1"') f = open('tmp/test_ogr2ogr_49_bis.kml') lines = f.readlines() f.close() os.unlink('tmp/test_ogr2ogr_49_bis.kml') expected_lines = [ """""", """""", """""", """grid""", """ """, """ 440750.000""", """ """, """""", """"""] assert len(lines) == len(expected_lines) for i, line in enumerate(lines): assert line.strip() == expected_lines[i].strip(), lines ############################################################################### # Test -addfields def test_ogr2ogr_50(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_50_1.csv', 'wt') f.write('id,field1\n') f.write('1,foo\n') f.close() f = open('tmp/test_ogr2ogr_50_2.csv', 'wt') f.write('id,field1,field2\n') f.write('2,bar,baz\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_50.dbf tmp/test_ogr2ogr_50_1.csv -nln test_ogr2ogr_50') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -addfields tmp/test_ogr2ogr_50.dbf tmp/test_ogr2ogr_50_2.csv -nln test_ogr2ogr_50') ds = ogr.Open('tmp/test_ogr2ogr_50.dbf') lyr = ds.GetLayer(0) feat = lyr.GetNextFeature() if feat.GetField('field1') != 'foo' or not feat.IsFieldNull('field2'): feat.DumpReadable() pytest.fail() feat = lyr.GetNextFeature() if feat.GetField('field1') != 'bar' or feat.GetField('field2') != 'baz': feat.DumpReadable() pytest.fail() ds = None os.unlink('tmp/test_ogr2ogr_50.dbf') os.unlink('tmp/test_ogr2ogr_50_1.csv') os.unlink('tmp/test_ogr2ogr_50_2.csv') ############################################################################### # Test RFC 41 support def test_ogr2ogr_51(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_51_src.csv', 'wt') f.write('id,_WKTgeom1_EPSG_4326,foo,_WKTgeom2_EPSG_32631\n') f.write('1,"POINT(1 2)","bar","POINT(3 4)"\n') f.close() # Test conversion from a multi-geometry format into a multi-geometry format gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f CSV tmp/test_ogr2ogr_51_dst.csv tmp/test_ogr2ogr_51_src.csv -nln test_ogr2ogr_51_dst -dsco GEOMETRY=AS_WKT -lco STRING_QUOTING=ALWAYS') f = open('tmp/test_ogr2ogr_51_dst.csv', 'rt') lines = f.readlines() f.close() expected_lines = ['"_WKTgeom1_EPSG_4326","_WKTgeom2_EPSG_32631","id","foo"', '"POINT (1 2)","POINT (3 4)","1","bar"'] for i in range(2): assert lines[i].strip() == expected_lines[i] # Test conversion from a multi-geometry format into a single-geometry format gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_51_dst.shp tmp/test_ogr2ogr_51_src.csv -nln test_ogr2ogr_51_dst') ds = ogr.Open('tmp/test_ogr2ogr_51_dst.shp') lyr = ds.GetLayer(0) sr = lyr.GetSpatialRef() assert sr is not None and sr.ExportToWkt().find('GEOGCS["WGS 84"') == 0 feat = lyr.GetNextFeature() assert feat.GetGeometryRef().ExportToWkt() == 'POINT (1 2)' ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_51_dst.shp') # Test -append into a multi-geometry format gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/test_ogr2ogr_51_dst.csv tmp/test_ogr2ogr_51_src.csv -nln test_ogr2ogr_51_dst') f = open('tmp/test_ogr2ogr_51_dst.csv', 'rt') lines = f.readlines() f.close() expected_lines = ['"_WKTgeom1_EPSG_4326","_WKTgeom2_EPSG_32631","id","foo"', '"POINT (1 2)","POINT (3 4)","1","bar"', '"POINT (1 2)","POINT (3 4)","1","bar"'] for i in range(3): assert lines[i].strip() == expected_lines[i] os.unlink('tmp/test_ogr2ogr_51_dst.csv') # Test -select with geometry field names gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -select foo,geom__WKTgeom2_EPSG_32631,id,geom__WKTgeom1_EPSG_4326 -f CSV tmp/test_ogr2ogr_51_dst.csv tmp/test_ogr2ogr_51_src.csv -nln test_ogr2ogr_51_dst -dsco GEOMETRY=AS_WKT -lco STRING_QUOTING=ALWAYS') f = open('tmp/test_ogr2ogr_51_dst.csv', 'rt') lines = f.readlines() f.close() expected_lines = ['"_WKTgeom2_EPSG_32631","_WKTgeom1_EPSG_4326","foo","id"', '"POINT (3 4)","POINT (1 2)","bar","1"'] for i in range(2): assert lines[i].strip() == expected_lines[i] # Test -geomfield option gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/test_ogr2ogr_51_dst.csv tmp/test_ogr2ogr_51_src.csv -nln test_ogr2ogr_51_dst -spat 1 2 1 2 -geomfield geom__WKTgeom1_EPSG_4326') f = open('tmp/test_ogr2ogr_51_dst.csv', 'rt') lines = f.readlines() f.close() expected_lines = ['"_WKTgeom2_EPSG_32631","_WKTgeom1_EPSG_4326","foo","id"', '"POINT (3 4)","POINT (1 2)","bar","1"', '"POINT (3 4)","POINT (1 2)","bar","1"'] for i in range(2): assert lines[i].strip() == expected_lines[i] os.unlink('tmp/test_ogr2ogr_51_src.csv') os.unlink('tmp/test_ogr2ogr_51_dst.csv') ############################################################################### # Test -nlt CONVERT_TO_LINEAR and -nlt CONVERT_TO_CURVE def test_ogr2ogr_52(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_52_src.csv', 'wt') f.write('id,WKT\n') f.write('1,"CIRCULARSTRING(0 0,1 0,0 0)"\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f CSV tmp/test_ogr2ogr_52_dst.csv tmp/test_ogr2ogr_52_src.csv -select id -nln test_ogr2ogr_52_dst -dsco GEOMETRY=AS_WKT -nlt CONVERT_TO_LINEAR') f = open('tmp/test_ogr2ogr_52_dst.csv', 'rt') content = f.read() f.close() assert 'LINESTRING (0 0,' in content gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f CSV tmp/test_ogr2ogr_52_dst2.csv tmp/test_ogr2ogr_52_dst.csv -select id -nln test_ogr2ogr_52_dst2 -dsco GEOMETRY=AS_WKT -nlt CONVERT_TO_CURVE') f = open('tmp/test_ogr2ogr_52_dst2.csv', 'rt') content = f.read() f.close() assert 'COMPOUNDCURVE ((0 0,' in content os.unlink('tmp/test_ogr2ogr_52_src.csv') os.unlink('tmp/test_ogr2ogr_52_dst.csv') os.unlink('tmp/test_ogr2ogr_52_dst2.csv') ############################################################################### # Test -mapFieldType and 64 bit integers def test_ogr2ogr_53(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_53.csv', 'wt') f.write('id,i64,b,WKT\n') f.write('1,123456789012,true,"POINT(0 0)"\n') f.close() f = open('tmp/test_ogr2ogr_53.csvt', 'wt') f.write('Integer,Integer64,Integer(Boolean),String\n') f.close() # Default behaviour with a driver that declares GDAL_DMD_CREATIONFIELDDATATYPES gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f KML tmp/test_ogr2ogr_53.kml tmp/test_ogr2ogr_53.csv -mapFieldType "Integer(Boolean)=String"') f = open('tmp/test_ogr2ogr_53.kml', 'rt') content = f.read() f.close() assert ('' in content and \ '1' in content and \ '' in content and \ '123456789012' in content and \ '' in content and \ '1' in content) os.unlink('tmp/test_ogr2ogr_53.kml') # Default behaviour with a driver that does not GDAL_DMD_CREATIONFIELDDATATYPES gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f BNA tmp/test_ogr2ogr_53.bna tmp/test_ogr2ogr_53.csv -nlt POINT') f = open('tmp/test_ogr2ogr_53.bna', 'rt') content = f.read() f.close() assert '"123456789012.0"' in content os.unlink('tmp/test_ogr2ogr_53.bna') # with -mapFieldType gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f KML tmp/test_ogr2ogr_53.kml tmp/test_ogr2ogr_53.csv -mapFieldType Integer64=String') f = open('tmp/test_ogr2ogr_53.kml', 'rt') content = f.read() f.close() assert ('' in content and \ '123456789012' in content) os.unlink('tmp/test_ogr2ogr_53.kml') os.unlink('tmp/test_ogr2ogr_53.csv') os.unlink('tmp/test_ogr2ogr_53.csvt') ############################################################################### # Test behaviour with nullable fields def test_ogr2ogr_54(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_54.csv', 'wt') f.write('fld1,fld2,WKT\n') f.write('1,2,"POINT(0 0)"\n') f.close() f = open('tmp/test_ogr2ogr_54.vrt', 'wt') f.write(""" test_ogr2ogr_54.csv test_ogr2ogr_54 wkbUnknown """) f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/test_ogr2ogr_54.gml tmp/test_ogr2ogr_54.vrt') f = open('tmp/test_ogr2ogr_54.xsd', 'rt') content = f.read() f.close() assert ('' in content and \ '' in content and \ '' in content) os.unlink('tmp/test_ogr2ogr_54.gml') os.unlink('tmp/test_ogr2ogr_54.xsd') # Test -forceNullable gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -forceNullable -f GML tmp/test_ogr2ogr_54.gml tmp/test_ogr2ogr_54.vrt') f = open('tmp/test_ogr2ogr_54.xsd', 'rt') content = f.read() f.close() assert ('' in content and \ '' in content and \ '' in content) os.unlink('tmp/test_ogr2ogr_54.gml') os.unlink('tmp/test_ogr2ogr_54.xsd') os.unlink('tmp/test_ogr2ogr_54.csv') os.unlink('tmp/test_ogr2ogr_54.vrt') ############################################################################### # Test behaviour with default values def test_ogr2ogr_55(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_55.csv', 'wt') f.write('fld1,fld2,WKT\n') f.write('1,,"POINT(0 0)"\n') f.close() f = open('tmp/test_ogr2ogr_55.csvt', 'wt') f.write('Integer,Integer,String\n') f.close() f = open('tmp/test_ogr2ogr_55.vrt', 'wt') f.write(""" test_ogr2ogr_55.csv test_ogr2ogr_55 wkbUnknown """) f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GML tmp/test_ogr2ogr_55.gml tmp/test_ogr2ogr_55.vrt') f = open('tmp/test_ogr2ogr_55.gml', 'rt') content = f.read() f.close() assert '2' in content os.unlink('tmp/test_ogr2ogr_55.gml') os.unlink('tmp/test_ogr2ogr_55.xsd') # Test -unsetDefault gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -forceNullable -unsetDefault -f GML tmp/test_ogr2ogr_55.gml tmp/test_ogr2ogr_55.vrt') f = open('tmp/test_ogr2ogr_55.gml', 'rt') content = f.read() f.close() assert '' not in content os.unlink('tmp/test_ogr2ogr_55.gml') os.unlink('tmp/test_ogr2ogr_55.xsd') os.unlink('tmp/test_ogr2ogr_55.csv') os.unlink('tmp/test_ogr2ogr_55.csvt') os.unlink('tmp/test_ogr2ogr_55.vrt') ############################################################################### # Test behaviour when creating a field with same name as FID column. def test_ogr2ogr_56(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_56.csv', 'wt') f.write('str,myid,WKT\n') f.write('aaa,10,"POINT(0 0)"\n') f.close() f = open('tmp/test_ogr2ogr_56.csvt', 'wt') f.write('String,Integer,String\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PGDump tmp/test_ogr2ogr_56.sql tmp/test_ogr2ogr_56.csv -lco FID=myid --config PGDUMP_DEBUG_ALLOW_CREATION_FIELD_WITH_FID_NAME NO') f = open('tmp/test_ogr2ogr_56.sql', 'rt') content = f.read() f.close() assert ("""ALTER TABLE "public"."test_ogr2ogr_56" ADD COLUMN "myid"" """ not in content and \ """INSERT INTO "public"."test_ogr2ogr_56" ("wkb_geometry" , "myid" , "str", "wkt") VALUES ('010100000000000000000000000000000000000000', 10, 'aaa', 'POINT(0 0)');""" in content) os.unlink('tmp/test_ogr2ogr_56.sql') os.unlink('tmp/test_ogr2ogr_56.csv') os.unlink('tmp/test_ogr2ogr_56.csvt') ############################################################################### # Test default propagation of FID column name and values, and -unsetFid def test_ogr2ogr_57(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_57.csv', 'wt') f.write('id,str,WKT\n') f.write('10,a,"POINT(0 0)"\n') f.close() f = open('tmp/test_ogr2ogr_57.csvt', 'wt') f.write('Integer,String,String\n') f.close() f = open('tmp/test_ogr2ogr_57.vrt', 'wt') f.write(""" test_ogr2ogr_57.csv test_ogr2ogr_57 wkbUnknown id """) f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PGDump tmp/test_ogr2ogr_57.sql tmp/test_ogr2ogr_57.vrt') f = open('tmp/test_ogr2ogr_57.sql', 'rt') content = f.read() f.close() assert ("""CREATE TABLE "public"."test_ogr2ogr_57" ( "id" SERIAL, CONSTRAINT "test_ogr2ogr_57_pk" PRIMARY KEY ("id") )""" in content and \ """INSERT INTO "public"."test_ogr2ogr_57" ("wkt" , "id" , "str") VALUES ('010100000000000000000000000000000000000000', 10, 'a')""" in content) os.unlink('tmp/test_ogr2ogr_57.sql') # Test -unsetFid gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f PGDump tmp/test_ogr2ogr_57.sql tmp/test_ogr2ogr_57.vrt -unsetFid') f = open('tmp/test_ogr2ogr_57.sql', 'rt') content = f.read() f.close() assert ("""CREATE TABLE "public"."test_ogr2ogr_57" ( "ogc_fid" SERIAL, CONSTRAINT "test_ogr2ogr_57_pk" PRIMARY KEY ("ogc_fid") )""" in content and \ """INSERT INTO "public"."test_ogr2ogr_57" ("wkt" , "str") VALUES ('010100000000000000000000000000000000000000', 'a')""" in content) os.unlink('tmp/test_ogr2ogr_57.sql') os.unlink('tmp/test_ogr2ogr_57.csv') os.unlink('tmp/test_ogr2ogr_57.csvt') os.unlink('tmp/test_ogr2ogr_57.vrt') ############################################################################### # Test datasource transactions def test_ogr2ogr_58(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if ogr.GetDriverByName('SQLite') is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -gt 3 -f SQLite tmp/test_ogr2ogr_58.sqlite ../ogr/data/poly.shp') ds = ogr.Open('tmp/test_ogr2ogr_58.sqlite') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 10 ds = None ogr.GetDriverByName('SQLite').DeleteDataSource('tmp/test_ogr2ogr_58.sqlite') ############################################################################### # Test metadata support def test_ogr2ogr_59(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if ogr.GetDriverByName('GPKG') is None: pytest.skip() ds = ogr.GetDriverByName('GPKG').CreateDataSource('tmp/test_ogr2ogr_59_src.gpkg') ds.SetMetadataItem('FOO', 'BAR') ds.SetMetadataItem('BAR', 'BAZ', 'another_domain') lyr = ds.CreateLayer('mylayer') lyr.SetMetadataItem('lyr_FOO', 'lyr_BAR') lyr.SetMetadataItem('lyr_BAR', 'lyr_BAZ', 'lyr_another_domain') ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GPKG tmp/test_ogr2ogr_59_dest.gpkg tmp/test_ogr2ogr_59_src.gpkg -mo BAZ=BAW') ds = ogr.Open('tmp/test_ogr2ogr_59_dest.gpkg') assert ds.GetMetadata() == {'FOO': 'BAR', 'BAZ': 'BAW'} assert ds.GetMetadata('another_domain') == {'BAR': 'BAZ'} lyr = ds.GetLayer(0) assert lyr.GetMetadata() == {'lyr_FOO': 'lyr_BAR'} assert lyr.GetMetadata('lyr_another_domain') == {'lyr_BAR': 'lyr_BAZ'} ds = None ogr.GetDriverByName('GPKG').DeleteDataSource('tmp/test_ogr2ogr_59_dest.gpkg') gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f GPKG tmp/test_ogr2ogr_59_dest.gpkg tmp/test_ogr2ogr_59_src.gpkg -nomd') ds = ogr.Open('tmp/test_ogr2ogr_59_dest.gpkg') assert ds.GetMetadata() == {} lyr = ds.GetLayer(0) assert lyr.GetMetadata() == {} ds = None ogr.GetDriverByName('GPKG').DeleteDataSource('tmp/test_ogr2ogr_59_dest.gpkg') ogr.GetDriverByName('GPKG').DeleteDataSource('tmp/test_ogr2ogr_59_src.gpkg') ############################################################################### # Test forced datasource transactions def test_ogr2ogr_60(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() if ogr.GetDriverByName('FileGDB') is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -ds_transaction -f FileGDB tmp/test_ogr2ogr_60.gdb ../ogr/data/poly.shp -mapFieldType Integer64=Integer') ds = ogr.Open('tmp/test_ogr2ogr_60.gdb') lyr = ds.GetLayer(0) assert lyr.GetFeatureCount() == 10 ds = None ogr.GetDriverByName('FileGDB').DeleteDataSource('tmp/test_ogr2ogr_60.gdb') ############################################################################### # Test -spat_srs def test_ogr2ogr_61(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() f = open('tmp/test_ogr2ogr_61.csv', 'wt') f.write('foo,WKT\n') f.write('1,"POINT(2 49)"\n') f.close() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_61.shp tmp/test_ogr2ogr_61.csv -spat 426857 5427937 426858 5427938 -spat_srs EPSG:32631 -s_srs EPSG:4326 -a_srs EPSG:4326') ds = ogr.Open('tmp/test_ogr2ogr_61.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 ds.Destroy() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/test_ogr2ogr_61_2.shp tmp/test_ogr2ogr_61.shp -spat 426857 5427937 426858 5427938 -spat_srs EPSG:32631') ds = ogr.Open('tmp/test_ogr2ogr_61_2.shp') assert ds is not None and ds.GetLayer(0).GetFeatureCount() == 1 ds.Destroy() ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_61.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/test_ogr2ogr_61_2.shp') os.unlink('tmp/test_ogr2ogr_61.csv') ############################################################################### # Test -noNativeData def test_ogr2ogr_62(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() # Default behaviour fp = open('tmp/test_ogr2ogr_62_in.json', 'wt') fp.write('{"type": "FeatureCollection", "foo": "bar", "features":[ { "type": "Feature", "bar": "baz", "properties": { "myprop": "myvalue" }, "geometry": null } ]}') fp = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + """ -f GeoJSON tmp/test_ogr2ogr_62.json tmp/test_ogr2ogr_62_in.json""") fp = gdal.VSIFOpenL('tmp/test_ogr2ogr_62.json', 'rb') assert fp is not None data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) os.unlink('tmp/test_ogr2ogr_62.json') assert 'bar' in data and 'baz' in data # Test -noNativeData gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + """ -f GeoJSON tmp/test_ogr2ogr_62.json tmp/test_ogr2ogr_62_in.json -noNativeData""") fp = gdal.VSIFOpenL('tmp/test_ogr2ogr_62.json', 'rb') assert fp is not None data = gdal.VSIFReadL(1, 10000, fp).decode('ascii') gdal.VSIFCloseL(fp) os.unlink('tmp/test_ogr2ogr_62.json') os.unlink('tmp/test_ogr2ogr_62_in.json') assert 'bar' not in data and 'baz' not in data ############################################################################### # Test --formats def test_ogr2ogr_63(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: os.stat('tmp/poly.shp') ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/poly.shp') except (OSError, AttributeError): pass (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogr2ogr_path() + ' --formats') assert 'Supported Formats' in ret, err assert 'ERROR' not in err, ret ############################################################################### # Test appending multiple layers, whose one already exists (#6345) def test_ogr2ogr_64(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() try: shutil.rmtree('tmp/in_csv') except OSError: pass try: shutil.rmtree('tmp/out_csv') except OSError: pass os.mkdir('tmp/in_csv') open('tmp/in_csv/lyr1.csv', 'wt').write("id,col\n1,1\n") open('tmp/in_csv/lyr2.csv', 'wt').write("id,col\n1,1\n") ds = ogr.Open('tmp/in_csv') first_layer = ds.GetLayer(0).GetName() second_layer = ds.GetLayer(1).GetName() ds = None gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f CSV tmp/out_csv tmp/in_csv ' + second_layer) gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -append tmp/out_csv tmp/in_csv') ds = ogr.Open('tmp/out_csv') assert ds.GetLayerByName(first_layer).GetFeatureCount() == 1 assert ds.GetLayerByName(second_layer).GetFeatureCount() == 2 ds = None shutil.rmtree('tmp/in_csv') shutil.rmtree('tmp/out_csv') ############################################################################### # Test detection of extension def test_ogr2ogr_65(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' tmp/out.csv ../ogr/data/poly.shp') ds = gdal.OpenEx('tmp/out.csv') assert ds.GetDriver().ShortName == 'CSV' ds = None gdal.Unlink('tmp/out.csv') (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogr2ogr_path() + ' /vsimem/out.xxx ../ogr/data/poly.shp') if "Cannot guess" not in err: print(ret) pytest.fail('expected a warning about probably wrong extension') ############################################################################### # Test accidental overriding of dataset when dst and src filenames are the same (#1465) def test_ogr2ogr_66(): if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_ogr2ogr_path() + ' ../ogr/data/poly.shp ../ogr/data/poly.shp') assert "Source and destination datasets must be different in non-update mode" in err, \ ret def hexify_double(val): val = hex(val) # On 32bit Linux, we might get a trailing L return val.rstrip('L').lstrip('0x').zfill(16).upper() def check_identity_transformation(x, y, srid): import struct if test_cli_utilities.get_ogr2ogr_path() is None: pytest.skip() shape_drv = ogr.GetDriverByName('ESRI Shapefile') for output_shp in ['tmp/output_point.shp', 'tmp/output_point2.shp']: try: os.stat(output_shp) shape_drv.DeleteDataSource(output_shp) except OSError: pass # Generate CSV file with test point xy_wkb = '0101000000' + ''.join(hexify_double(q) for q in struct.unpack('>QQ', struct.pack(" # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest import test_cli_utilities import pytest ############################################################################### # Test create # gnmmanage create -f GNMFile -t_srs EPSG:4326 -dsco net_name=test_gnm -dsco net_description="Test file based GNM" /home/bishop/tmp/ --config CPL_DEBUG ON def test_gnmmanage_1(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gnmmanage_path() + ' create -f GNMFile -t_srs EPSG:4326 -dsco net_name=test_gnm -dsco net_description="Test file based GNM" tmp') assert (err is None or err == ''), 'got error/warning' try: os.stat('tmp/test_gnm') except OSError: pytest.fail('Expected create tmp/test_gnm') ############################################################################### # Test import # gnmmanage import /home/bishop/tmp/data/pipes.shp /home/bishop/tmp/test_gnm --config CPL_DEBUG ON # gnmmanage import /home/bishop/tmp/data/wells.shp /home/bishop/tmp/test_gnm --config CPL_DEBUG ON def test_gnmmanage_2(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gnmmanage_path() + ' import ../gnm/data/pipes.shp tmp/test_gnm') assert (err is None or err == ''), 'got error/warning' (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gnmmanage_path() + ' import ../gnm/data/wells.shp tmp/test_gnm') assert (err is None or err == ''), 'got error/warning' ############################################################################### # Test info # gnmmanage info /home/bishop/tmp/test_gnm def test_gnmmanage_3(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gnmmanage_path() + ' info tmp/test_gnm') assert ret.find('Network version: 1.0.') != -1 assert ret.find('Network name: test_gnm.') != -1 assert ret.find('Network description') != -1 ############################################################################### # Test autoconect # gnmmanage autoconnect 0.000001 /home/bishop/tmp/test_gnm --config CPL_DEBUG ON def test_gnmmanage_4(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gnmmanage_path() + ' autoconnect 0.000001 tmp/test_gnm') assert ret.find('success') != -1 ############################################################################### # Test dijkstra # gnmanalyse dijkstra 61 50 -alo "fetch_vertex=OFF" -ds /home/bishop/tmp/di.shp -lco "SHPT=ARC" /home/bishop/tmp/test_gnm --config CPL_DEBUG ON def test_gnmanalyse_1(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() if test_cli_utilities.get_gnmanalyse_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gnmanalyse_path() + ' dijkstra 61 50 tmp/test_gnm') assert ret.find('Feature Count: 19') != -1 ############################################################################### # Test kpaths # gnmanalyse kpaths 61 50 3 -alo "fetch_vertex=OFF" -ds /home/bishop/tmp/kp.shp -lco "SHPT=ARC" /home/bishop/tmp/test_gnm --config CPL_DEBUG ON def test_gnmanalyse_2(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() if test_cli_utilities.get_gnmanalyse_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gnmanalyse_path() + ' kpaths 61 50 3 tmp/test_gnm') assert ret.find('Feature Count: 61') != -1 ############################################################################### # Test cleanup def test_gnm_cleanup(): if test_cli_utilities.get_gnmmanage_path() is None: pytest.skip() (_, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gnmmanage_path() + ' delete tmp/test_gnm') assert (err is None or err == ''), 'got error/warning' assert not os.path.exists('tmp/test_gnm') gdalautotest-3.1.2/utilities/test_gdaltransform.py0000775000175000017500000001702713701060014021164 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: test_gdaltransform.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: gdaltransform testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import test_cli_utilities import pytest ############################################################################### # Test -s_srs and -t_srs def test_gdaltransform_1(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '2 49 1\n' + '3 50 2\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -s_srs EPSG:4326 -t_srs EPSG:4326', strin) assert ret.find('2 49 1') != -1 assert ret.find('3 50 2') != -1 ############################################################################### # Test -gcp def test_gdaltransform_2(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '0 0\n' + '20 0\n' + '20 20\n' + '0 20\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -gcp 0 0 440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000', strin) assert ret.find('440720 3751320') != -1 assert ret.find('441920 3751320') != -1 assert ret.find('441920 3750120') != -1 assert ret.find('440720 3750120') != -1 ############################################################################### # Test -gcp -tps def test_gdaltransform_3(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '0 0\n' + '20 0\n' + '20 20\n' + '0 20\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -tps -gcp 0 0 440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000', strin) assert ret.find('440720 3751320') != -1 assert ret.find('441920 3751320') != -1 assert ret.find('441920 3750120') != -1 assert ret.find('440720 3750120') != -1 ############################################################################### # Test -gcp -order 1 def test_gdaltransform_4(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '0 0\n' + '20 0\n' + '20 20\n' + '0 20\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -order 1 -gcp 0 0 440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000', strin) assert ret.find('440720 3751320') != -1 assert ret.find('441920 3751320') != -1 assert ret.find('441920 3750120') != -1 assert ret.find('440720 3750120') != -1 ############################################################################### # Test with input file and -t_srs def test_gdaltransform_5(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '0 0\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -t_srs EPSG:26711 ../gcore/data/byte.tif', strin) text_split = ret.split(' ') x = float(text_split[0]) y = float(text_split[1]) assert x == pytest.approx(440720, abs=1e-4) and y == pytest.approx(3751320, abs=1e-4), ret ############################################################################### # Test with input file and output file def test_gdaltransform_6(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '440720 3751320\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' ../gcore/data/byte.tif ../gcore/data/byte.tif', strin) text_split = ret.split(' ') x = float(text_split[0]) y = float(text_split[1]) assert x == pytest.approx(440720, abs=1e-4) and y == pytest.approx(3751320, abs=1e-4), ret ############################################################################### # Test with input file and -t_srs and -i def test_gdaltransform_7(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '440720 3751320\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -t_srs EPSG:26711 ../gcore/data/byte.tif -i', strin) text_split = ret.split(' ') x = float(text_split[0]) y = float(text_split[1]) assert x == pytest.approx(0, abs=1e-4) and y == pytest.approx(0, abs=1e-4), ret ############################################################################### # Test -to def test_gdaltransform_8(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '2 49 1\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -to "SRC_SRS=WGS84" -to "DST_SRS=WGS84"', strin) assert ret.find('2 49 1') != -1 ############################################################################### # Test -output_xy def test_gdaltransform_9(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() strin = '0 0 0\n' ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' ../gcore/data/byte.tif -output_xy', strin) text_split = ret.split(' ') assert len(text_split) == 2, ret ############################################################################### # Test -ct and 4D def test_gdaltransform_ct_4D(): if test_cli_utilities.get_gdaltransform_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -ct "+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=cart +step +proj=helmert +convention=position_vector +x=0.0127 +dx=-0.0029 +rx=-0.00039 +drx=-0.00011 +y=0.0065 +dy=-0.0002 +ry=0.00080 +dry=-0.00019 +z=-0.0209 +dz=-0.0006 +rz=-0.00114 +drz=0.00007 +s=0.00195 +ds=0.00001 +t_epoch=1988.0 +step +proj=cart +inv +step +proj=unitconvert +xy_in=rad +xy_out=deg" -coord 2 49 0 2000') values = [float(x) for x in ret.split(' ')] assert len(values) == 3, ret assert values[0] == pytest.approx(2.0000005420366, abs=1e-10), ret assert values[1] == pytest.approx(49.0000003766711, abs=1e-10), ret assert values[2] == pytest.approx(-0.0222802283242345, abs=1e-8), ret gdalautotest-3.1.2/utilities/test_gdal_translate_lib.py0000775000175000017500000004054413701060014022133 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_translate_lib.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: test librarified gdal_translate # Author: Faza Mahamood # ############################################################################### # Copyright (c) 2015, Faza Mahamood # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import pytest ############################################################################### # Simple test def test_gdal_translate_lib_1(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test1.tif', ds) assert ds is not None, 'got error/warning' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ds = gdal.Open('tmp/test1.tif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test format option and callback def mycallback(pct, msg, user_data): # pylint: disable=unused-argument user_data[0] = pct return 1 def test_gdal_translate_lib_2(): src_ds = gdal.Open('../gcore/data/byte.tif') tab = [0] ds = gdal.Translate('tmp/test2.tif', src_ds, format='GTiff', callback=mycallback, callback_data=tab) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert tab[0] == 1.0, 'Bad percentage' ds = None ############################################################################### # Test outputType option def test_gdal_translate_lib_3(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test3.tif', ds, outputType=gdal.GDT_Int16) assert ds is not None assert ds.GetRasterBand(1).DataType == gdal.GDT_Int16, 'Bad data type' assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' ds = None ############################################################################### # Test bandList option def test_gdal_translate_lib_4(): ds = gdal.Open('../gcore/data/rgbsmall.tif') ds = gdal.Translate('tmp/test4.tif', ds, bandList=[3, 2, 1]) assert ds is not None, 'got error/warning' assert ds.GetRasterBand(1).Checksum() == 21349, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 21053, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 21212, 'Bad checksum' ds = None ############################################################################### # Test rgbExpand option def test_gdal_translate_lib_5(): ds = gdal.Open('../gdrivers/data/bug407.gif') ds = gdal.Translate('tmp/test5.tif', ds, rgbExpand='rgb') assert ds is not None assert ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_RedBand, \ 'Bad color interpretation' assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_GreenBand, \ 'Bad color interpretation' assert ds.GetRasterBand(3).GetRasterColorInterpretation() == gdal.GCI_BlueBand, \ 'Bad color interpretation' assert ds.GetRasterBand(1).Checksum() == 20615, 'Bad checksum' assert ds.GetRasterBand(2).Checksum() == 59147, 'Bad checksum' assert ds.GetRasterBand(3).Checksum() == 63052, 'Bad checksum' ds = None ############################################################################### # Test oXSizePixel and oYSizePixel option def test_gdal_translate_lib_6(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test6.tif', ds, width=40, height=40) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18784, 'Bad checksum' ds = None ############################################################################### # Test oXSizePct and oYSizePct option def test_gdal_translate_lib_7(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test7.tif', ds, widthPct=200.0, heightPct=200.0) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 18784, 'Bad checksum' ds = None ############################################################################### # Test outputSRS and GCPs options def test_gdal_translate_lib_8(): gcpList = [gdal.GCP(440720.000, 3751320.000, 0, 0, 0), gdal.GCP(441920.000, 3751320.000, 0, 20, 0), gdal.GCP(441920.000, 3750120.000, 0, 20, 20), gdal.GCP(440720.000, 3750120.000, 0, 0, 20)] ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test8.tif', ds, outputSRS='EPSG:26711', GCPs=gcpList) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' gcps = ds.GetGCPs() assert len(gcps) == 4, 'GCP count wrong.' assert ds.GetGCPProjection().find('26711') != -1, 'Bad GCP projection.' ds = None ############################################################################### # Test nodata option def test_gdal_translate_lib_9(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test9.tif', ds, noData=1) assert ds is not None assert ds.GetRasterBand(1).GetNoDataValue() == 1, 'Bad nodata value' ds = None ############################################################################### # Test srcWin option def test_gdal_translate_lib_10(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test10.tif', ds, srcWin=[0, 0, 1, 1]) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 2, 'Bad checksum' ds = None ############################################################################### # Test projWin option def test_gdal_translate_lib_11(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test11.tif', ds, projWin=[440720.000, 3751320.000, 441920.000, 3750120.000]) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test outputBounds option def test_gdal_translate_lib_12(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test12.tif', ds, outputBounds=[440720.000, 3751320.000, 441920.000, 3750120.000]) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ds = None ############################################################################### # Test metadataOptions def test_gdal_translate_lib_13(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test13.tif', ds, metadataOptions=['TIFFTAG_DOCUMENTNAME=test13']) assert ds is not None md = ds.GetMetadata() assert 'TIFFTAG_DOCUMENTNAME' in md, 'Did not get TIFFTAG_DOCUMENTNAME' ds = None ############################################################################### # Test creationOptions def test_gdal_translate_lib_14(): ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Translate('tmp/test14.tif', ds, creationOptions=['COMPRESS=LZW']) assert ds is not None md = ds.GetMetadata('IMAGE_STRUCTURE') assert 'COMPRESSION' in md and md['COMPRESSION'] == 'LZW', 'Did not get COMPRESSION' ds = None ############################################################################### # Test internal wrappers def test_gdal_translate_lib_100(): # No option with gdaltest.error_handler(): gdal.TranslateInternal('', gdal.Open('../gcore/data/byte.tif'), None) # Will create an implicit options structure with gdaltest.error_handler(): gdal.TranslateInternal('', gdal.Open('../gcore/data/byte.tif'), None, gdal.TermProgress) # Null dest name try: gdal.TranslateInternal(None, gdal.Open('../gcore/data/byte.tif'), None) except: pass ############################################################################### # Test behaviour with SIGNEDBYTE def test_gdal_translate_lib_101(): ds = gdal.Translate('/vsimem/test_gdal_translate_lib_101.tif', gdal.Open('../gcore/data/byte.tif'), creationOptions=['PIXELTYPE=SIGNEDBYTE'], noData='-128') assert ds.GetRasterBand(1).GetMetadataItem('PIXELTYPE', 'IMAGE_STRUCTURE') == 'SIGNEDBYTE', \ 'Did not get SIGNEDBYTE' assert ds.GetRasterBand(1).GetNoDataValue() == -128, 'Did not get -128' ds2 = gdal.Translate('/vsimem/test_gdal_translate_lib_101_2.tif', ds, noData=-127) assert ds2.GetRasterBand(1).GetNoDataValue() == -127, 'Did not get -127' ds = None ds2 = None gdal.Unlink('/vsimem/test_gdal_translate_lib_101.tif') gdal.Unlink('/vsimem/test_gdal_translate_lib_101_2.tif') ############################################################################### # Test -scale def test_gdal_translate_lib_102(): ds = gdal.Translate('', gdal.Open('../gcore/data/byte.tif'), format='MEM', scaleParams=[[0, 255, 0, 65535]], outputType=gdal.GDT_UInt16) result = ds.GetRasterBand(1).ComputeRasterMinMax(False) assert result == (19018.0, 65535.0) (approx_min, approx_max) = ds.GetRasterBand(1).ComputeRasterMinMax(True) ds2 = gdal.Translate('', ds, format='MEM', scaleParams=[[approx_min, approx_max]], outputType=gdal.GDT_Byte) expected_stats = ds2.GetRasterBand(1).ComputeStatistics(False) # Implicit source statistics use approximate source min/max ds2 = gdal.Translate('', ds, format='MEM', scaleParams=[[]], outputType=gdal.GDT_Byte) stats = ds2.GetRasterBand(1).ComputeStatistics(False) for i in range(4): assert stats[i] == pytest.approx(expected_stats[i], abs=1e-3) ############################################################################### # Test that -projwin with nearest neighbor resampling uses integer source # pixel boundaries (#6610) def test_gdal_translate_lib_103(): ds = gdal.Translate('', '../gcore/data/byte.tif', format='MEM', projWin=[440730, 3751310, 441910, 3750140]) assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' assert gdaltest.geotransform_equals(gdal.Open('../gcore/data/byte.tif').GetGeoTransform(), ds.GetGeoTransform(), 1e-9), \ 'Bad geotransform' ############################################################################### # Test translate with a MEM source to a anonymous VRT def test_gdal_translate_lib_104(): src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.GetRasterBand(1).Fill(255) ds = gdal.Translate('', '../gcore/data/byte.tif', format='VRT', width=1, height=1) assert ds.GetRasterBand(1).Checksum() == 3, 'Bad checksum' ############################################################################### # Test GCPs propagation in "VRT path" def test_gdal_translate_lib_gcp_vrt_path(): src_ds = gdal.Open('../gcore/data/gcps.vrt') ds = gdal.Translate('', src_ds, format='MEM', metadataOptions=['FOO=BAR']) assert len(ds.GetGCPs()) == len(src_ds.GetGCPs()) for i in range(len(src_ds.GetGCPs())): assert ds.GetGCPs()[i].GCPX == src_ds.GetGCPs()[i].GCPX assert ds.GetGCPs()[i].GCPY == src_ds.GetGCPs()[i].GCPY assert ds.GetGCPs()[i].GCPPixel == src_ds.GetGCPs()[i].GCPPixel assert ds.GetGCPs()[i].GCPLine == src_ds.GetGCPs()[i].GCPLine ############################################################################### # Test RPC propagation in "VRT path" def test_gdal_translate_lib_rcp_vrt_path(): src_ds = gdal.Open('../gcore/data/rpc.vrt') ds = gdal.Translate('', src_ds, format='MEM', metadataOptions=['FOO=BAR']) assert ds.GetMetadata('RPC') == src_ds.GetMetadata('RPC') ############################################################################### # Test GeoLocation propagation in "VRT path" def test_gdal_translate_lib_geolocation_vrt_path(): src_ds = gdal.Open('../gcore/data/sstgeo.vrt') ds = gdal.Translate('/vsimem/temp.vrt', src_ds, format='VRT', metadataOptions=['FOO=BAR']) assert ds.GetMetadata('GEOLOCATION') == src_ds.GetMetadata('GEOLOCATION') gdal.Unlink('/vsimem/temp.vrt') ############################################################################### # Test -colorinterp and -colorinterp_X def test_gdal_translate_lib_colorinterp(): src_ds = gdal.Open('../gcore/data/rgbsmall.tif') # Less bands specified than available ds = gdal.Translate('', src_ds, options='-f MEM -colorinterp blue,gray') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GrayIndex assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand # More bands specified than available and a unknown color interpretation with gdaltest.error_handler(): ds = gdal.Translate('', src_ds, options='-f MEM -colorinterp alpha,red,undefined,foo') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_Undefined # Test colorinterp_ ds = gdal.Translate('', src_ds, options='-f MEM -colorinterp_2 alpha') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand # Test invalid colorinterp_ with pytest.raises(Exception): with gdaltest.error_handler(): gdal.Translate('', src_ds, options='-f MEM -colorinterp_0 alpha') ############################################################################### # Test nogcp options def test_gdal_translate_lib_110(): ds = gdal.Open('../gcore/data/byte_gcp.tif') ds = gdal.Translate('tmp/test110.tif', ds, nogcp='True') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672, 'Bad checksum' gcps = ds.GetGCPs() assert len(gcps) == 0, 'GCP count wrong.' ds = None ############################################################################### # Test gdal_translate foo.tif foo.tif.ovr def test_gdal_translate_lib_generate_ovr(): gdal.FileFromMemBuffer('/vsimem/foo.tif', open('../gcore/data/byte.tif', 'rb').read()) gdal.GetDriverByName('GTiff').Create('/vsimem/foo.tif.ovr', 10, 10) ds = gdal.Translate('/vsimem/foo.tif.ovr', '/vsimem/foo.tif', resampleAlg = gdal.GRA_Average, format = 'GTiff', width = 10, height = 10) assert ds assert ds.GetRasterBand(1).Checksum() == 1152, 'Bad checksum' ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/foo.tif') ############################################################################### # Cleanup def test_gdal_translate_lib_cleanup(): for i in range(14): try: os.remove('tmp/test' + str(i + 1) + '.tif') except OSError: pass try: os.remove('tmp/test' + str(i + 1) + '.tif.aux.xml') except OSError: pass gdalautotest-3.1.2/utilities/test_gdal_viewshed.py0000775000175000017500000001705713701060014021131 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_viewshed.py 60d13e19f89619ca16040b9a270d3837b8f0df63 2020-03-05 10:02:43 +0200 Ilmari Ayres $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_viewshed testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2020, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import test_cli_utilities import pytest pytestmark = pytest.mark.skipif(test_cli_utilities.get_gdalwarp_path() is None or test_cli_utilities.get_gdal_viewshed_path() is None, reason="gdal_viewshed not available") ############################################################################### def test_gdal_viewshed(): gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs EPSG:32617 -overwrite ../gdrivers/data/n43.dt0 tmp/test_gdal_viewshed_in.tif') _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -oz 100 -ox 621528 -oy 4817617 tmp/test_gdal_viewshed_in.tif tmp/test_gdal_viewshed_out.tif') assert err is None or err == '' ds = gdal.Open('tmp/test_gdal_viewshed_out.tif') assert ds cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None gdal.Unlink('tmp/test_gdal_viewshed_in.tif') gdal.Unlink('tmp/test_gdal_viewshed_out.tif') assert cs == 42397 assert nodata is None ############################################################################### def test_gdal_viewshed_alternative_modes(): gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs EPSG:32617 -overwrite ../gdrivers/data/n43.dt0 tmp/test_gdal_viewshed_in.tif') _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -om DEM -oz 100 -ox 621528 -oy 4817617 tmp/test_gdal_viewshed_in.tif tmp/test_gdal_viewshed_out.tif') assert err is None or err == '' ds = gdal.Open('tmp/test_gdal_viewshed_out.tif') assert ds cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None gdal.Unlink('tmp/test_gdal_viewshed_out.tif') assert cs == 48478 assert nodata is None _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -om GROUND -oz 100 -ox 621528 -oy 4817617 tmp/test_gdal_viewshed_in.tif tmp/test_gdal_viewshed_out.tif') assert err is None or err == '' ds = gdal.Open('tmp/test_gdal_viewshed_out.tif') assert ds cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None gdal.Unlink('tmp/test_gdal_viewshed_in.tif') gdal.Unlink('tmp/test_gdal_viewshed_out.tif') assert cs == 49633 assert nodata is None ############################################################################### def test_gdal_viewshed_all_options(): gdaltest.runexternal(test_cli_utilities.get_gdalwarp_path() + ' -t_srs EPSG:32617 -overwrite ../gdrivers/data/n43.dt0 tmp/test_gdal_viewshed_in.tif') _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -om NORMAL -f GTiff -oz 10 -ox 621528 -oy 4817617 -b 1 -a_nodata 0 -tz 5 -md 20000 -cc 0.85714 -iv 127 -vv 254 -ov 0 tmp/test_gdal_viewshed_in.tif tmp/test_gdal_viewshed_out.tif') assert err is None or err == '' ds = gdal.Open('tmp/test_gdal_viewshed_out.tif') assert ds cs = ds.GetRasterBand(1).Checksum() nodata = ds.GetRasterBand(1).GetNoDataValue() ds = None gdal.Unlink('tmp/test_gdal_viewshed_in.tif') gdal.Unlink('tmp/test_gdal_viewshed_out.tif') assert cs == 24412 assert nodata == 0 ############################################################################### def test_gdal_viewshed_missing_source(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path()) assert 'Missing source filename' in err ############################################################################### def test_gdal_viewshed_missing_destination(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' /dev/null') assert 'Missing destination filename' in err ############################################################################### def test_gdal_viewshed_missing_ox(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' /dev/null /dev/null') assert 'Missing -ox' in err ############################################################################### def test_gdal_viewshed_missing_oy(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -ox 0 /dev/null /dev/null') assert 'Missing -oy' in err ############################################################################### def test_gdal_viewshed_invalid_input(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -ox 0 -oy 0 /dev/null /dev/null') assert 'not recognized as a supported file format' in err ############################################################################### def test_gdal_viewshed_invalid_band(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -ox 0 -oy 0 -b 2 ../gdrivers/data/n43.dt0 tmp/tmp.tif') assert 'Illegal band' in err ############################################################################### def test_gdal_viewshed_invalid_observer_point(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -ox 0 -oy 0 ../gdrivers/data/n43.dt0 tmp/tmp.tif') gdal.Unlink('tmp/tmp.tif') assert 'The observer location falls outside of the DEM area' in err ############################################################################### def test_gdal_viewshed_invalid_output_driver(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -ox -79.5 -oy 43.5 -of FOOBAR ../gdrivers/data/n43.dt0 tmp/tmp.tif') assert 'Cannot get driver' in err ############################################################################### def test_gdal_viewshed_invalid_output_filename(): _, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdal_viewshed_path() + ' -ox -79.5 -oy 43.5 ../gdrivers/data/n43.dt0 i/do_not/exist.tif') assert 'Cannot create dataset' in err gdalautotest-3.1.2/utilities/test_gdalmdimtranslate.py0000775000175000017500000000427113701060014022012 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdalmdimtranslate.py 9598f66a2ef90ef40fc3274e54d5d723ad597b0f 2019-07-13 00:03:57 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: test command line gdalmdimtranslate # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import test_cli_utilities import pytest ############################################################################### # Simple test def test_gdalmdimtranslate_1(): if test_cli_utilities.get_gdalmdimtranslate_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalmdimtranslate_path() + ' data/mdim.vrt tmp/out.vrt') assert (err is None or err == ''), 'got error/warning' assert os.path.exists('tmp/out.vrt') gdal.Unlink('tmp/out.vrt') gdalautotest-3.1.2/utilities/test_gdallocationinfo.py0000775000175000017500000001234013701060014021626 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdallocationinfo.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: gdallocationinfo testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2010-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys import pytest sys.path.append('../gcore') from osgeo import gdal import gdaltest import test_cli_utilities ############################################################################### # Test basic usage def test_gdallocationinfo_1(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() (ret, err) = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdallocationinfo_path() + ' ../gcore/data/byte.tif 0 0') assert (err is None or err == ''), 'got error/warning' ret = ret.replace('\r\n', '\n') expected_ret = """Report: Location: (0P,0L) Band 1: Value: 107""" assert ret.startswith(expected_ret) ############################################################################### # Test -xml def test_gdallocationinfo_2(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdallocationinfo_path() + ' -xml ../gcore/data/byte.tif 0 0') ret = ret.replace('\r\n', '\n') expected_ret = """ 107 """ assert ret.startswith(expected_ret) ############################################################################### # Test -valonly def test_gdallocationinfo_3(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdallocationinfo_path() + ' -b 1 -valonly ../gcore/data/byte.tif 0 0') expected_ret = """107""" assert ret.startswith(expected_ret) ############################################################################### # Test -geoloc def test_gdallocationinfo_4(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdallocationinfo_path() + ' -geoloc ../gcore/data/byte.tif 440720.000 3751320.000') ret = ret.replace('\r\n', '\n') expected_ret = """Report: Location: (0P,0L) Band 1: Value: 107""" assert ret.startswith(expected_ret) ############################################################################### # Test -lifonly def test_gdallocationinfo_5(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdallocationinfo_path() + ' -lifonly ../gcore/data/byte.vrt 0 0') expected_ret1 = """../gcore/data/byte.tif""" expected_ret2 = """../gcore/data\\byte.tif""" assert expected_ret1 in ret or expected_ret2 in ret ############################################################################### # Test -overview def test_gdallocationinfo_6(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() src_ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.GetDriverByName('GTiff').CreateCopy('tmp/test_gdallocationinfo_6.tif', src_ds) ds.BuildOverviews('AVERAGE', overviewlist=[2]) ds = None src_ds = None ret = gdaltest.runexternal(test_cli_utilities.get_gdallocationinfo_path() + ' tmp/test_gdallocationinfo_6.tif 10 10 -overview 1') gdal.GetDriverByName('GTiff').Delete('tmp/test_gdallocationinfo_6.tif') expected_ret = """Value: 130""" assert expected_ret in ret def test_gdallocationinfo_wgs84(): if test_cli_utilities.get_gdallocationinfo_path() is None: pytest.skip() ret = gdaltest.runexternal(test_cli_utilities.get_gdallocationinfo_path() + ' -valonly -wgs84 ../gcore/data/byte.tif -117.6354747 33.8970515') expected_ret = """115""" assert expected_ret in ret gdalautotest-3.1.2/alg/0000775000175000017500000000000013701060015013427 5ustar evenevengdalautotest-3.1.2/alg/applyverticalshiftgrid.py0000775000175000017500000003172413701060014020575 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: applyverticalshiftgrid.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test GDALApplyVerticalShiftGrid algorithm. # Author: Even Rouault # ############################################################################### # Copyright (c) 2017, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal, osr ############################################################################### # Rather dummy test: grid = DEM def test_applyverticalshiftgrid_1(): src_ds = gdal.Open('../gcore/data/byte.tif') src_ds = gdal.Translate('', src_ds, format='MEM', width=20, height=40) grid_ds = gdal.Translate('', src_ds, format='MEM') out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds.GetRasterBand(1).DataType == gdal.GDT_Byte assert out_ds.RasterXSize == src_ds.RasterXSize assert out_ds.RasterYSize == src_ds.RasterYSize assert out_ds.GetGeoTransform() == src_ds.GetGeoTransform() assert out_ds.GetProjectionRef() == src_ds.GetProjectionRef() # Check that we can drop the reference to the sources src_ds = None grid_ds = None cs = out_ds.GetRasterBand(1).Checksum() assert cs == 10038 src_ds = gdal.Open('../gcore/data/byte.tif') src_ds = gdal.Translate('', src_ds, format='MEM', width=20, height=40) # Test block size out_ds = gdal.ApplyVerticalShiftGrid(src_ds, src_ds, options=['BLOCKSIZE=15']) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 10038 # Inverse transformer out_ds = gdal.ApplyVerticalShiftGrid(src_ds, src_ds, True, options=['DATATYPE=Float32']) assert out_ds.GetRasterBand(1).DataType == gdal.GDT_Float32 cs = out_ds.GetRasterBand(1).Checksum() assert cs == 0 ############################################################################### # Error cases def test_applyverticalshiftgrid_2(): sr = osr.SpatialReference() sr.SetFromUserInput("WGS84") for i in range(6): src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) if i != 0: src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) if i != 1: src_ds.SetProjection(sr.ExportToWkt()) if i == 2: src_ds.AddBand(gdal.GDT_Byte) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) if i != 3: grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) if i != 4: grid_ds.SetProjection(sr.ExportToWkt()) if i == 5: grid_ds.AddBand(gdal.GDT_Byte) with gdaltest.error_handler(): out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds is None, i # Non invertable source geotransform src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 0, 0, 0, 0, 0]) src_ds.SetProjection(sr.ExportToWkt()) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) with gdaltest.error_handler(): out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds is None # Non invertable grid geotransform src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 0, 0, 0, 0, 0]) grid_ds.SetProjection(sr.ExportToWkt()) with gdaltest.error_handler(): out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds is None # No PROJ.4 translation for source SRS, coordinate transformation # initialization has failed src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection('LOCAL_CS["foo"]') with gdaltest.error_handler(): out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds is None # Out of memory if gdal.GetConfigOption('SKIP_MEM_INTENSIVE_TEST') is None: src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) with gdaltest.error_handler(): out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['BLOCKSIZE=2000000000']) assert out_ds is None # Wrong DATATYPE src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) with gdaltest.error_handler(): out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['DATATYPE=x']) assert out_ds is None ############################################################################### # Test with grid and src not in same projection def test_applyverticalshiftgrid_3(): src_ds = gdal.Open('../gcore/data/byte.tif') grid_ds = gdal.Warp('', src_ds, format='MEM', dstSRS='EPSG:4326', width=40, height=40) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['RESAMPLING=NEAREST']) assert out_ds.RasterXSize == src_ds.RasterXSize assert out_ds.RasterYSize == src_ds.RasterYSize assert out_ds.GetGeoTransform() == src_ds.GetGeoTransform() assert out_ds.GetProjectionRef() == src_ds.GetProjectionRef() cs = out_ds.GetRasterBand(1).Checksum() assert cs == 5112 out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['RESAMPLING=BILINEAR']) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 4867 or cs == 4868 out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['RESAMPLING=CUBIC']) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 4841 or cs == 4854 ############################################################################### # Test nodata def test_applyverticalshiftgrid_4(): sr = osr.SpatialReference() sr.SetFromUserInput("WGS84") # Nodata on source src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(1) src_ds.GetRasterBand(1).SetNoDataValue(1) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) grid_ds.GetRasterBand(1).Fill(30) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds.GetRasterBand(1).GetNoDataValue() == 1 cs = out_ds.GetRasterBand(1).Checksum() assert cs == 1 # Nodata on grid src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(1) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) grid_ds.GetRasterBand(1).Fill(30) grid_ds.GetRasterBand(1).SetNoDataValue(30) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds) assert out_ds.GetRasterBand(1).GetNoDataValue() is None cs = out_ds.GetRasterBand(1).Checksum() assert cs == 1 # ERROR_ON_MISSING_VERT_SHIFT due to non compatible extents src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(255) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([10, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['ERROR_ON_MISSING_VERT_SHIFT=YES']) with gdaltest.error_handler(): data = out_ds.GetRasterBand(1).ReadRaster() assert data is None # ERROR_ON_MISSING_VERT_SHIFT due to nodata in grid src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).Fill(255) grid_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) grid_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) grid_ds.SetProjection(sr.ExportToWkt()) grid_ds.GetRasterBand(1).SetNoDataValue(0) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, options=['ERROR_ON_MISSING_VERT_SHIFT=YES']) with gdaltest.error_handler(): data = out_ds.GetRasterBand(1).ReadRaster() assert data is None ############################################################################### # Test scaling parameters def test_applyverticalshiftgrid_5(): src_ds = gdal.Open('../gcore/data/byte.tif') grid_ds = gdal.Translate('', src_ds, format='MEM') grid_ds.GetRasterBand(1).Fill(0) src_ds = gdal.Translate('', src_ds, format='MEM', outputType=gdal.GDT_Float32, scaleParams=[[0, 1, 0, 0.5]]) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, srcUnitToMeter=2) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 4672 src_ds = gdal.Open('../gcore/data/byte.tif') grid_ds = gdal.Translate('', src_ds, format='MEM') grid_ds.GetRasterBand(1).Fill(0) src_ds = gdal.Translate('', src_ds, format='MEM', outputType=gdal.GDT_Float32, scaleParams=[[0, 1, 0, 0.5]]) out_ds = gdal.ApplyVerticalShiftGrid(src_ds, grid_ds, dstUnitToMeter=0.5) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 4672 ############################################################################### # Simulate EGM grids def test_applyverticalshiftgrid_6(): grid_ds = gdal.GetDriverByName('GTX').Create( '/vsimem/applyverticalshiftgrid_6.gtx', 1440, 721, 1, gdal.GDT_Float32) grid_ds.SetGeoTransform([-180.125, 0.25, 0, 90.125, 0, -0.25]) grid_ds.GetRasterBand(1).Fill(10) grid_ds = None ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', dstSRS='+proj=utm +zone=11 +datum=NAD27 +geoidgrids=/vsimem/applyverticalshiftgrid_6.gtx +vunits=m +no_defs') cs = ds.GetRasterBand(1).Checksum() assert cs == 4783 gdal.Unlink('/vsimem/applyverticalshiftgrid_6.gtx') ############################################################################### # Simulate USA geoid grids with long origin > 180 def test_applyverticalshiftgrid_7(): grid_ds = gdal.GetDriverByName('GTX').Create( '/vsimem/applyverticalshiftgrid_7.gtx', 700, 721, 1, gdal.GDT_Float32) grid_ds.SetGeoTransform([-150 + 360, 0.25, 0, 90.125, 0, -0.25]) grid_ds.GetRasterBand(1).Fill(10) grid_ds = None ds = gdal.Warp('', '../gcore/data/byte.tif', format='MEM', dstSRS='+proj=utm +zone=11 +datum=NAD27 +geoidgrids=/vsimem/applyverticalshiftgrid_7.gtx +vunits=m +no_defs') cs = ds.GetRasterBand(1).Checksum() assert cs == 4783 gdal.Unlink('/vsimem/applyverticalshiftgrid_7.gtx') gdalautotest-3.1.2/alg/polygonize.py0000775000175000017500000001577213701060014016216 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: polygonize.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test Polygonize() algorithm. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import ogrtest from osgeo import gdal, ogr ############################################################################### # Test a fairly simple case, with nodata masking. def test_polygonize_1(is_int_polygonize=True): src_ds = gdal.Open('data/polygonize_in.grd') src_band = src_ds.GetRasterBand(1) # Create a memory OGR datasource to put results in. mem_drv = ogr.GetDriverByName('Memory') mem_ds = mem_drv.CreateDataSource('out') mem_layer = mem_ds.CreateLayer('poly', None, ogr.wkbPolygon) fd = ogr.FieldDefn('DN', ogr.OFTInteger) mem_layer.CreateField(fd) # run the algorithm. if is_int_polygonize: result = gdal.Polygonize(src_band, src_band.GetMaskBand(), mem_layer, 0) else: result = gdal.FPolygonize(src_band, src_band.GetMaskBand(), mem_layer, 0) assert result == 0, 'Polygonize failed' # Confirm we get the set of expected features in the output layer. expected_feature_number = 13 assert mem_layer.GetFeatureCount() == expected_feature_number expect = [107, 123, 115, 115, 140, 148, 123, 140, 156, 100, 101, 102, 103] tr = ogrtest.check_features_against_list(mem_layer, 'DN', expect) # check at least one geometry. if tr: mem_layer.SetAttributeFilter('dn = 156') feat_read = mem_layer.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'POLYGON ((440720 3751200,440720 3751020,440900 3751020,440900 3751200,440720 3751200),(440780 3751140,440840 3751140,440840 3751080,440780 3751080,440780 3751140))') != 0: tr = 0 feat_read.Destroy() assert tr def test_polygonize_1_float(): return test_polygonize_1(is_int_polygonize=False) ############################################################################### # Test a simple case without masking. def test_polygonize_2(): src_ds = gdal.Open('data/polygonize_in.grd') src_band = src_ds.GetRasterBand(1) # Create a memory OGR datasource to put results in. mem_drv = ogr.GetDriverByName('Memory') mem_ds = mem_drv.CreateDataSource('out') mem_layer = mem_ds.CreateLayer('poly', None, ogr.wkbPolygon) fd = ogr.FieldDefn('DN', ogr.OFTInteger) mem_layer.CreateField(fd) # run the algorithm. result = gdal.Polygonize(src_band, None, mem_layer, 0) assert result == 0, 'Polygonize failed' # Confirm we get the set of expected features in the output layer. expected_feature_number = 17 assert mem_layer.GetFeatureCount() == expected_feature_number expect = [107, 123, 115, 132, 115, 132, 140, 132, 148, 123, 140, 132, 156, 100, 101, 102, 103] tr = ogrtest.check_features_against_list(mem_layer, 'DN', expect) assert tr ############################################################################### # A more involved case with a complex looping. def test_polygonize_3(): src_ds = gdal.Open('data/polygonize_in_2.grd') src_band = src_ds.GetRasterBand(1) # Create a memory OGR datasource to put results in. mem_drv = ogr.GetDriverByName('Memory') mem_ds = mem_drv.CreateDataSource('out') mem_layer = mem_ds.CreateLayer('poly', None, ogr.wkbPolygon) fd = ogr.FieldDefn('DN', ogr.OFTInteger) mem_layer.CreateField(fd) # run the algorithm. result = gdal.Polygonize(src_band, None, mem_layer, 0) assert result == 0, 'Polygonize failed' # Confirm we get the expected count of features. expected_feature_number = 125 assert mem_layer.GetFeatureCount() == expected_feature_number # check at least one geometry. mem_layer.SetAttributeFilter('dn = 0') feat_read = mem_layer.GetNextFeature() if ogrtest.check_feature_geometry(feat_read, 'POLYGON ((6 -3,6 -40,19 -40,19 -39,24 -39,25 -39,25 -38,26 -38,27 -38,27 -37,28 -37,28 -36,29 -36,29 -35,30 -35,30 -34,31 -34,31 -25,30 -25,30 -24,29 -24,29 -23,28 -23,28 -22,27 -22,27 -21,24 -21,24 -20,23 -20,23 -19,25 -19,26 -19,26 -18,27 -18,27 -17,28 -17,28 -16,29 -16,29 -8,28 -8,28 -7,27 -7,27 -6,26 -6,26 -5,24 -5,24 -4,18 -4,18 -3,6 -3),(24 -35,25 -35,26 -35,26 -33,27 -33,27 -25,26 -25,26 -23,24 -23,24 -22,11 -22,11 -36,24 -36,24 -35),(11 -7,11 -18,23 -18,23 -17,24 -17,24 -16,25 -16,25 -9,24 -9,24 -8,23 -8,23 -7,11 -7))') != 0: print(feat_read.GetGeometryRef().ExportToWkt()) tr = 0 else: tr = 1 feat_read.Destroy() assert tr ############################################################################### # Test a simple case without masking but with 8-connectedness. def test_polygonize_4(): src_ds = gdal.Open('data/polygonize_in.grd') src_band = src_ds.GetRasterBand(1) # Create a memory OGR datasource to put results in. mem_drv = ogr.GetDriverByName('Memory') mem_ds = mem_drv.CreateDataSource('out') mem_layer = mem_ds.CreateLayer('poly', None, ogr.wkbPolygon) fd = ogr.FieldDefn('DN', ogr.OFTInteger) mem_layer.CreateField(fd) # run the algorithm. result = gdal.Polygonize(src_band, None, mem_layer, 0, ["8CONNECTED=8"]) assert result == 0, 'Polygonize failed' # Confirm we get the set of expected features in the output layer. expected_feature_number = 16 assert mem_layer.GetFeatureCount() == expected_feature_number expect = [107, 123, 132, 115, 132, 115, 140, 148, 123, 140, 132, 156, 100, 101, 102, 103] tr = ogrtest.check_features_against_list(mem_layer, 'DN', expect) assert tr gdalautotest-3.1.2/alg/data/0000775000175000017500000000000013701060014014337 5ustar evenevengdalautotest-3.1.2/alg/data/utm_alpha_noinit.vrt0000664000175000017500000000537513701057751020456 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]] -1.1764116862079686e+02, 5.9741237520048360e-04, 0.0000000000000000e+00, 3.3903634039985498e+01, 0.0000000000000000e+00, -5.9741237520048360e-04 Gray Alpha 512 128 6.71089e+07 NearestNeighbour Byte ../../gdrivers/data/utm.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 -117.6411686207969,0.0005974123752004836,0,33.9036340399855,0,-0.0005974123752004836 196917.8636135853,1673.885646684861,0,56750.80638998799,0,-1673.885646684861 PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]] 2 gdalautotest-3.1.2/alg/data/utmsmall_max.tif0000664000175000017500000000545213701057751017572 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|s{ss{{{{s{{ֵŽ֔{sss{{{νsk{{ks{s{ťŔ{{{{s{ss֥{s{ss{{{s{{潭ֽ{{{{s{{޵ťsss{ބεֽε{sֵŵεΜ޽Ŝ޽{{scޭνŭޜέ޵εŵ{skkŭ֭ޭ֥ŭ歵{εΜ歜攽ŵ省εΔεŜքֵﭥŭťŽŽť潜ν楥Ŝ֭Δﭵޭ步ŭ֥ޜ֌֥潽ֵΥΜŌs{ŵֵޭޥ{ssk{ε޽ޔ֔s{{{kŽŌŽֽcŵֽńkk{s{{{ﭔֵkss{步Ž޵t・ckcŵcﭭŭޭsZkkss{sk޽ﭥŵsssZsZ{֌έέք{ss{kc{ތŽRscskk{{Z{cΔ挵ޔֽﵽkZk{ccZs{sc{ֽŵŭ潜RkJsssk{Rccc֭ŽŵŔνZRZBJksBkRkccJŵﵽ޽ŵBBR{sksZZ{{sνスťﵵ1:BJs{Rscֵ{ֵ֔B:Bkcε{νέk步νcsBssk{sksk{ťΔkŔťkcs{{{kZsZkc{ckRRZskkRsk{sΌ{ŵksZZcZJkΜkksc{֭ksŜ歜ΥkJZZJRR!s!{sks{{{s{ckssRRJRkŽ!ZcsZkcRss޽s{scZJBBJZcJRkZcRcscRZkkJZs!BZR{{JRsތk{cskZsk{kcsJkkssk:cJJB{s{sZksk{Rc{{{sZgdalautotest-3.1.2/alg/data/empty_rcs.vrt0000664000175000017500000001057513701057751017127 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 2.0983170908647397e+04, 5.0109700347667203e+03, 0.0000000000000000e+00, 5.0175402506259708e+06, 0.0000000000000000e+00, -5.0109700347667203e+03 Alpha 512 128 6.71089e+07 CubicSpline Byte ../tmp/empty.tif 0.125 500000,5000,0,5000000,0,-5000 -100,0.0002,0,1000,0,-0.0002 20983.1709086474,5010.97003476672,0,5017540.250625971,0,-5010.97003476672 -4.187446894127006,0.000199562159235014,0,1001.311166463512,0,-0.000199562159235014 PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32630"]] PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 4 4 gdalautotest-3.1.2/alg/data/3by3_average_with_srcoffset.vrt0000664000175000017500000000324613701057751022502 0ustar eveneven 3.3333333333333331e-01, 3.3333333333333331e-01, 0.0000000000000000e+00, 6.6666666666666663e-01, 0.0000000000000000e+00, -3.3333333333333331e-01 -1.7e+308 Gray 1 1 6.71089e+07 Average Float64 4by4.tif 0.125 0,0.25,0,1,0,-0.25 -0,4,0,4,0,-4 0.333333333333333315,0.333333333333333315,0,0.66666666666666663,0,-0.333333333333333315 -1,3,0,2,0,-3 -1.7e+308 0 -1.7e+308 0 gdalautotest-3.1.2/alg/data/test_nearest_float.vrt0000664000175000017500000001060413701057751021000 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 2.0983170908647397e+04, 5.0109700347667203e+03, 0.0000000000000000e+00, 5.0175402506259708e+06, 0.0000000000000000e+00, -5.0109700347667203e+03 Alpha 512 128 6.71089e+07 NearestNeighbour Float32 ../tmp/test.tif 0.125 500000,5000,0,5000000,0,-5000 -100,0.0002,0,1000,0,-0.0002 20983.1709086474,5010.97003476672,0,5017540.250625971,0,-5010.97003476672 -4.187446894127006,0.000199562159235014,0,1001.311166463512,0,-0.000199562159235014 PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32630"]] PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 4 4 gdalautotest-3.1.2/alg/data/utmsmall_near_ushort.vrt0000664000175000017500000000343613701057751021367 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 NearestNeighbour UInt16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_cubic.tiff0000664000175000017500000075136613701057751020254 0ustar evenevenII* B S   J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@f!@&`f&f:&Zfy&f4&Tfs&f.&Nfm&$@$@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kkklortwz|}}zwttwz}~zuqmmquz~~zuqmmquz~~zuqmlortwzzyxvutv}|unmquz~~zuqmlmnpqrroljgdeimquyyuqmiea]YTPLMT[bippke`ZUUZ`ekpssssssrqpnmllortwz{{{{{{yuqmieeimquy{{{{{{zyxvutssssssrqpnmljgda^[[\^_abdefhijkkkkkkjihfedeimquyzwtrolnsy~|{{{{{{zyxvutroljgdfkqv|}|zyxvutsssssstuvxyz|}}zwttuvxyz|}Ǿ{vv{»kkklortwz|}}zwttwz}~zuqmmquz~~zuqmmquz~~zuqmlortwzzyxvutv}|unmquz~~zuqmlmnpqrroljgdeimquyyuqmiea]YTPLMT[bippke`ZUUZ`ekpssssssrqpnmllortwz{{{{{{yuqmieeimquy{{{{{{zyxvutssssssrqpnmljgda^[[\^_abdefhijkkkkkkjihfedeimquyzwtrolnsy~|{{{{{{zyxvutroljgdfkqv|}|zyxvutsssssstuvxyz|}}zwttuvxyz|}Ǿ{vv{»kkklortwz|}}zwttwz}~zuqmmquz~~zuqmmquz~~zuqmlortwzzyxvutv}|unmquz~~zuqmlmnpqrroljgdeimquyyuqmiea]YTPLMT[bippke`ZUUZ`ekpssssssrqpnmllortwz{{{{{{yuqmieeimquy{{{{{{zyxvutssssssrqpnmljgda^[[\^_abdefhijkkkkkkjihfedeimquyzwtrolnsy~|{{{{{{zyxvutroljgdfkqv|}|zyxvutsssssstuvxyz|}}zwttuvxyz|}Ǿ{vv{»lllmpruxz|}~~|zwuux{~}yurnnrvz~}yuqllquy~~zvsonqsvx{{zywvuw}}vpnrv{~zvrnlmopqrromjhffimptwwtpmieb^[XTQRX^diopkfa\WW\afkprrrrrrqpnmljknqsvyzzzzzzxuqmiffimquy{{zzzyyxwvutssssstsrponljhec`]]_`bdfghijkmmmmmnnmkjhgefjnrvzzxurpmnty~{zzzz{{zyxvutromjhfglqv{~}|zywvussssttuuvwwxyz{}|yvtsuvwyz|}żzz~mmmnqtvy|}}}~~~}|zywvwz}~}zxuspqtwz}|wsokkpty}~{xusrtvxz|}|{zyxy}yrquy||wsomnopqsrpnljhhjmorttqnlifdb`^\Z[_cgkookhd`\\`dhkoqqppponmljighknqtwyyyyyywtqmjggjnrvy{zyxwvuutttssstttutsrponljhfcaacfhjlnnoppqqrrrssrpnljhimptx{|yvtqnpuz|ywxyyz{zyxvutrpnljhimptx|~}}||{zywutrrstvwyyxwwvuvxy{}|zwurrtuwyz|~nnnprux{}~}}|{zyyxxwwx{~~}{yxvutrsuxz}~zvrnjjosx}~|zxvvxy{|~~~}|{z{}~{usw{~}yupoopqrsrqonljjkmnoppnmkigfeedcccfhjlonlifdaadfilnoonnmmljigfefilosvxxxxxxvspnkhhkorvyzywutrqrrrsssttuuvvtsrponljigefhknpsttuuuuvvwwxxwurpmkkorvy}}{xurpqv{~zvuvwxyzzyxvutrqonljknpsvxzzzz{{zxvtsqqsuxz||zxvtrrtvxz||zwusqqstvxz|~Žpppqtwy|~|zxvvvvwwwy}|}}{~}zwuuuuutuwyz|~}yuqlhinsx}~}}|{zz{|}~~}}|||{{}}wvy}~zvrppqrrsrqponmllmmmmmlkjihhiijkkllmmnnnlkihffhiklnnmllkjihfecbcfjmquvvvvvvuspnkiilpsvyzxusqnnopqrsstuvvwwvtsrponmljijmpsvy{{zzzzz{||}~}zwtqnnqux{|ywtqrw{}xtrtvwyzzyxvutrqponmmoprsuvwxyz{zxvtropsvz}|yvronpruwyywusqoortvxz|~qqqrux{~~{xusrstvwx{}y{{y||wsrstuvwxyz{|}{wsokghmrw|~}}}~~~~|zwuru{zy|{wsqqrrrssrqqponmllkjiiiiiijlnprtusrqonmlllkkkklllmmlkjihfecb`_`dhlosuuuuuutrpnljjmpswzzwtqnkjlmoqrstuvwxxwvtsrqpoonmnruy|~~{xtqqtwz}~{xursx|{vqprtvxzzyxvutsrqqpoopppqqrtuwyzzxusqnosw{zupkjmoqtvvusqpnnqsuxz|~rrrtwy|~zvsonpsuwy||wxxvz~zupnprtwyzz{{{|zvrnjfflqw|~||}~|wsnjlu}|{~}ytrrssssssrrrrqnljhfefghijlpsvz}~zwtqmlmnnopponnmlkjigfedba_^\]afjnrttttttsqpnmklnqtwzyvrnkgfikmprtuvwxzzxwvtsrrrrqqsw{{xtsvy||ywtty}ztonpruwzzyxvutssrrrrqqponmnqsuxzzwurpmnsx}{tnhfiknqstrqonlmpruwz|zzssstwz}{upmlmosvz~}vrt{|tru{xqljlosx{}~~~}|yupjfcdhov}}{{|~{skebdlw}{}~yvsrqqqrrrstuutqnjfdccdegilqw}{upkjkmprttsqomkihgedcb`^\ZZ\_cimqstuttsrqomkjknrvy{zwqlfcbdgkortvxz{{{zxvussrrrstvz}xutvy}~zvuuyxqljkoswz{zyxvuttttttsromlkknrvy{{yupmkmrz~tkecdgkpsssqomllnqtwz}~wv}~}ºssstwz}}xtqpqsvy|{uqszyrpszxqljlpuz}}{yupjfdeipw~~||}~~xqjebdjt~|}~{ywtrponnoruwxwuqmjgeeefghkouz~ysmihjlpsuusqmjgfddccba`_^]]_aeimprsssssrpmkihilpuy{{wqkfbacgkptvxz{||{zxusrrrtuwy{~~zwvwz}|zyz}wpkijmquxzzzzyyxxxwwvusqnmlmoswz|}zvromnsz~umgefinruvusqpopqtwz|~ÿssstwz}}zxwxy{}ytqryvonryzrmlnrw|~{yupkgfgkqx~}}~~~~}}}|{xtpkgefkrz~}}~~~|zwsnkiikoty{|zvrokjhgffgilpuy{{xtojgghlpsuusokgcbaaaaaaaaabbcehjmopqrssrqolifefinty|{xrkfbadhmrvxz{|||{zwtqppruy|}{yxy{}~~wpjiilptwyz|}~~~}|zywvtrpoooruy|~~|yuqpqu{~wpkiknruxyywvtstvxz}þſssstwz}|wsqrx}tmmqx{tonpty~~|yuqlighlry~~}}||{{{{{zzyxwutsqnljjjmquy|~~~}|{zyyyz|~~yslgccgmtz~~|xtqoljhfefhkorttrnjgeegkosutqmhc`^]^_`abcdeghijklmnopqrsrqnjfcabflrx||xrlfbbeinsxz|}}}|{yvronorw|}zxxz}}{zzz{|}wpjhiknruwz}}{xwutsrrsux{~~{xustw|ysonpsvz|}}|zyxyz|~þüssstwz}}yurqsxzqllpx|vqprv{~|yvrnkijnsz}{yxwwwwwwvusqponmmnnnoopqrstvxz|}}{xvsrruz~{skc__cjs{}zvtpmifddegjlnnljgecdfjnrtspke`][[\]_acegikmnnnmmmmoprssqnid`^_cjqw{|xslgccejpuy{}}~}|{xtpmlmrx~ztqqsx}~}||{{{{{{|}~wpkiijmpsvz~|zxwvuuvwy{~~{xvwy|{wttux{~~~~~|}Ŀý¾ssstwz}}|ywtrrtx~xpkkpw}wsrtx|~|zvroljkotz}zwutsttttsrpnlkklnoqrrqpnmlmpswz||yvromnqw}|sia[[`ir{~{xtokgdccegikkigecccfjnqsrojd_[YZ[]_bdfjmoqrqpnmllmoqssrnhb^[\`gov{{xsmgccfkpvz|}~~}|zwsolklqxxqmlotz~|{{{{{{{{zzz{|wqljijloruy~{yxxxxyz|~}{zz{~}{yyz||z{}ͽǾvvvwy|~~|zywutssuy~~wpllpw~}xttuy}~|zwsolklosy~~zvsqqqrrsrqonmllmoqrssrpmlkkmqtxyywsoljkou{|si`[[`hr{~{wrlhdcdfikmmkigeddgjnqsrojd_\ZZ\^`behknqstsqnlkkloqstrnhb]ZZ_fmuyzwrlgccfkpuy{}}}|{zwsolklqyxqmlnsx~}{{zzzzzzzzyyz|~~xrmkjkmoqty~}|{{{{|}~~}}~~}}~~{zz}ɸǽ{{{|}}{yxwvuuuvw{~xrnnqw}}yvuvy{~~|zwsoljkmqv{zuqooopqrrrqqpppqrrsssrponmmoqsuvuspmjijnsy~zqia]]ahqy~ztojffgjnrttrokhffhkorsspkfb_]]^`bdfilpstusqnkiiknrtvtoib\YY]dkrwxupkfccejnswyz{{{zyvsolkmqx{upoqtw{~~}|{{zyxxxxxxyz{~~xsomlmmoqsw|}{zz{}½ò}{ywvuuuvxy{}zurqsw{|ywwwxz{||}}}}|zwsnkiikosw{~{upnmnoprsstuvwwvutsrrrrrrrrrrrqqpomkiijmqvy{zvpic``dipw|}wqliilqv{~~|wrnjijmprssqmjfcbbccefhjmpsuuspljhhkosvxvqjc\XX\bioturniebbdhlqtvxyyyyxvsomlmrw~~zwuuvwxyz{|}}}}|zxvutuvwxz|~}yurpooooprux|~{yyyz{}½μ~}{ywuttuvxz|~|xvuuwy{}}}|{yyxxxxxxxyz{||zwsnjhgilptw{{tolllnprtvx{}~~|yvsqqrtvwxxvtqnlkjiiijkmoruvurnjfddgkotx{~ztolmqxztommnprtsromkihggghijlnqsttrokhfgjotxzxsld]XX[`flpqplhdbbcfjnqstvwwwwuspnmorv|~|{ywutuvy|~}zvsqqqsvxz|~|zwusrqpppqsuxz}~~yuttvy|ÿųxrs}~~~}}|{zwutssuwz}~{yxwwwxxxxyyzzyxwvutuvxz{{zwsnjhghjmptx~|tnkkkmprtx|~ytqqrvz}~~zvqlhfffhijklnopqpomjhghjlorux{~|vroqv~yspopqstssrponmlkkjjkmoqstsqmjgefioty{zune^YXZ_ejmnmjgdbbcehkmoqstuvvusqpoprvy}|wspprv{zuqnmoqtxz|}~~}|zyxwutsrqqrstuwy|~||}vpoptx}ɻsbY\j~}|{{{{{{zywusssuy|}{zxwvuttuwxz{zyxvtsstvyz{zxtpljiijlorv||tmjjjloruy~{vrrtx}~wpjeccdgikllllllllkkjjklmoqsux|}xsrtz|uqppqrsssssrrqpomlkkmoqrsrplieddhnty{zvog_ZY[_chklkifdbbcegikmnpqstttsrrqrsuwz|~~wqmlotz{uplkmptwz|}}}||||||||||{{{zyxwusrrqqqrsuy~~{{{smlnrx~»Ƚ}eRHK\wź~|{zz{{||{zxvtstwz~}|zywusrrtuxz{{zywuttuwyz{{yvsponmmnoqu{|smjijknqtyyvuw{xqjdbbdfhjkkkkjjjjjjjkllmoprtwz~|wtsu||uqppqrrssttttsrpnlkklnprsrplhdbcglrwzyuoha\[\_cgjkjigeddefghjklnopqrsstttuuvvwxz~wpkknsz{uplkmpswz{|{{zzzzzzzzz{{||||{yxvutsrqqrtw|||zrlkmrx~~}}Ľu]I?CVsǻ}{zz{|}~}|zxvuvx|~}}|{zxvtrrrsuwy{||{zzyyzzz{{{zzyxwwutsrsv{{slihijmosw}~{z|~~xqkfdcdfhijjjjjjjjiijjklmoqstvy{}~~|yvtsv{zspnnopqrstuuuurpmjhhjlprsspkgb``dinsvvsnid`_`begijjjiihhhhiiijjklmnoqsuwxyxvussuzxpkjmsz}wrnmnqtvyzzzyxxxxxxyyz{|}}~~}}|zyxwusrrsw{yrmkmrw}|{{~ýž~lWF=BVsǻ~|{{}~}{yxy{~~|{zzyyyxwutrrrsuwyz|}~~}{{{|~}zwvw{zrlihhikmpu{~xsmigfffghhhiijjjjihhhikmprtvvwwxxwvutssuz|upmllmopqrsuvvurnjgeegjnrtspkea^]`dinqrpmjgdddeghijklmmmmmlkjiiihhijlosw{}~{xspnpu}yqkjmsz~yuqpqrtvwxxwwvvvvwwxyy{|}~~|ywustvy}yrnmorw{~~|{|~µ}|}vdSF@FYuź¿}|}}||~~zxvvvvvwvutssrssuvxz|~|z{~|yy|xqligghiknrx~|xtpmjihgfffghijkkjigffgjmqtvwwutrqpppqrsux||vpljjjkmnoqstvvtqmhdaadhmqtspke_\[]`dhkmmlkjiiiiiijklnprsrqpmkjigfeefhmsyyrlikpyzrmlotz|xutttuvvvvuutttuuvwxz{|~~{xvuvx{}~}~}xtqpqsvy|}~~~~~}}~zwuvx}wk^QIGN_y¹{xusssstttttsssstuvxy|}z{|z|}wqlihgghjlpu{}zxuspnljhfeeegijkkjhfedehmrvxywtpmjjklnpstvxz||{xtokhgghikmnprtuutpke`]]aflqttpjd^ZYZ]`dfhjklmnnmlkkjkmpsvwwuspmjigdcbcfks|zrjfflu|tonpu{~{ywvvuuuttssssstuvwyz|}{xwwxyz|~|zxyz}}yvtstuwyz{|}~~վzpkjlqv~ukbYROPWh~ſ~zvtrrrrssssssssttuvwy|}{|}{{~{vpljhgghjloty~~{xwvusqnkhfdcdfhjkkjheccdhmrwzzwsnieefilortuvvvvtrnjgeddfgiklnqsttsoic^[[_djpsspjd^ZYY[]`cehkmpqrqomlklnquxzzxuroligdbabekt}|riddir|}vrqsw|}{zxwvutssrrrsstuwxz{}~~{yxxxyz||yvuuvy}~|zyxxxxyz{|}¾׽rgcdhovø|lb[WUVZbq}zwutsssssssrrrrstuvxz}~{}|yy|zupmkiiijkmptx}|xvuuutrpliecccegijjigdccdhmsx{{wrlfcbdgkorttuttsqnkhebbbdfhjkmoqrsqmhb]ZZ^cinrroke`\[[\]_bdgjnqstsqnlklnruy{{yvspmkhfdccfmv}sjeeiqzzvuwz~~|zywutsrrrrsstuwxz{}~}|{zzz{|{wtrrtwz~~~}||||}~׾tjfgkqyuf^ZY[`fn{~}|{zyxwvutssrqqqqsuwy|~|yvvx|}yuqmlkklmopsux|zusstuuspmifcbbcefggfeccceinty|{xrkea`bfjortuuutsqnjfc`_`bdfhjkmoppnkgb^[[^bglopnkhdb````abdgkortutromklnqtwyyxvsqomkihghkqxvnihlqx~}|~}{zxvtsrrrrstuvxz{}~~~~~{wsqqruy}ÿyutux}na\\`fnv~¾}|}~}{xvtsqpooprux{~~~}tqqtx|~|yuqnmnoprsuvwy{wqoprtusqmifcbabbcccccbbcfjouz||xrkd`_bejosuvwwvusokfa^]^_bdghiklllkieb^]]_bfilmmlkjihgfeddfhkortutromllmprtvvvusrqpoonnoqv{ztpoprvz}~|yxvtsqqqrsuwxz|~~|{{}{wspprux|³rf^]bju|yy{|xvsqnmmnquy}~~~xolmpuz}}{xurpoprtwyzzzz{~unlmprtsqmjfdba`___``aacegkqvz||xrke``bfjosuwxyyxvqlf`][\^`cefghhihhfdb`__`bdfijlmnoppnljhghilorttsrpnllmnoqrrssssstttuuwx{~zwvutttux{|zwvtrqppqrtwy|~~{ywwy|}zvronnqv{|wspprtx|ƿ|vnf`]`ivyvvyzwtpnlklpuz}{yyyz|~sjghlrw{|{xusqqsuy{~~}||~Ƚrkijmqssqnjgdb`^]\\]^_adfimrwz||xrkeaabfkosuwy{{zxsmf`\ZZ\_bdeefffeedcbaaaabcdegjnqtvvuroljikmorstsqonmllllmnopqstvwyz{|~~|yvrpoqw}zxutrqpppqsvy|zvrpqsx~}ytnidbcgnv}}xtqqruy}ļ{uojfb_\\_fr~xttx|xuqnlklouz{wttux{~{ofcejpvz{{xvsrsux|~~qhfhlpssqnjgdb`^\[Z[\_behkoswz|{wrlfcbdgkoruwy{||zung`[YY[^acdddddccccccbbbbbbceinswzzyurnkklmprssrqomlkkjjjklnqsvy{|~}wqmknt~|yvtrqqppqsux|~xsnllpv}}xqjc^[\ajs|zurrtvz~ù¿ķzoe^ZWWY]cl{ÿ~xttx~~zvsomllpuz~zvssux{xldachouz|{ywuttwz~ɽphfhlpsrpnjgdb`]\ZZ[]`dhknqtwyzzvrmhedehknqsvxz{{ytnga\ZZ[^`bccccccccccccccbaabdhmrwzzyurnkklmprssrpnlkjiiiijlnqux{}~xrmkmt~~{xvtsrrrstvx{~~xsnllpv~zskd^[\ajs||wuuvy|÷}µth`[Z[_dluzvvx}|yurpnoquz~}zxvvxz}ujcacipw|}}{xvuvx{~pigimpsrpmjgdb`^]\\]`dhlortvwxxwurnkihijkmopruwyyxsnhb^\\]^`bbcddeeeeeddccbaa`acfjnruvtroljjkmoqsrqnligggghikmptx{~~ysonpv}zxutstuvxy{|~{vrpptyyrkeabfnv~~{xxz}µ~zy{¹ypkjkot{ľ}zyyz}|yvtrrsvy{}~~}|{{{}~~sib`cjqy~}{xwwy||qkjknqsrpmifdb`____adhmqtvwwwvuutrqonmmlkkllnqtvvurnid`_^^_`abcefhhihgfdcbbaa`abdfilnnnljihhjloqrrplifcccegilorv{~~zvsruz~{ywvuuvx{~|xvwy}|upllou{~}}ɿ~zyz~Ż~|zxvuuvwz}}zxvuuvwxz{|}~{qhbadks{}zxyz}yrnmnprsrolifcbaaabceimrwz{zyvtrrrrssssqnljhhjmorsrpmjfdba``aabdfikllkigecbaaaaaabcdeffffeefgilnqrqnjfb__`cfjmquz~~{zz}}{yxxz|zxwvvwy}~}|}~~}yxz}ĺ|{{ɼ{vqmkknsy~~{yxwvvvvwz}yogbbfmu}|zz{}|wsqpqrssrolhecbbbcegimrw|~}zvroopruwxwtqlhfefhknopomkigfdcbaabehknppnkhecbaaabbaa`__^__`abcehknqrqnid_\\^afkosx}|xvvz~||{|}~}{yxwwwy||zxwx{Ž~~½}¾|unheeiov}~|zxvussux}~vngccgnv~}{{{|~~{xvusrrsstsroliecbccegilpv{{upmlnquy{zwrmhdcdehjlmmllkjihfdcbcfimprrpmjfcbbbbccba_][ZZ[\^`bdgkoqsrnic^ZZ]afkpuz{vsty|{{|~|zyxxxy{~{wuttx|Ⱦ½ÿ~x|unhddhnv}~|zxusrrsw}{tnhddhnu|}|{{{|}zurqrrsssttttspmifdccdegjmrw}{uokjlptxzzwrmhdccdfhijkllmmlkhfeddgjnqssqnkgecccdddcb`^\[[\]^`bdhlortsojd^[[]aflqv{}wtuy|{{}|{zyyz{~|xustw{¾˾ÿſ}w|wqliilqx}~{ywvtrqqsw|~|xsnigginty}~}|{zyxx{snllnprrstuuutqnkhedddegilqw~|uojijmquwwuqmifedddefgikmnoonljhgghknqrrqnligfffffffedcba```aabdhmquwvsmgb^^`chlqv{{xy|}||}~}}|}}{wtuw|ÿǺ|}yvsqqswz~}zxutrqppqsw|}|{{{zyxurnkjjknqtwxzz{||{yvsrsy{ohfgjmpqrtuvvuspmjgfeeeegjov}}unighjmprrqomkihfedccdfjmprsrpnljjklnopppnmkjiiiiiiiijjjiihfdcceinsx{zwrlgcbcfimqu{~~}}~{wwy|ĿʿĿ}}~}|{{{{|}~~|yvsqpooooqsw|}zxwvvuutrqonmmmmnopqsvxz{{xsnllq~ykecdgknoqsuwwwurolihfeddehmu|}uniffghjllmmmmlkifca`adhmruvvtronmmmnnnnnnnnmmmmlllmnpqssrpmifefjpv{~|wqlighiknqu{~~~{z{}~~ſƾzw{¸|xx|~|}~}{yurommlmnoqsw|~zvtsrqqppppppponmkjjkmquy{{vpjffkywib`aehlnpsuxyxwtqnkigecbcfks{|umhedddefgikmopolgc_]^bgmsxyyxusqponmmlmmnooppppooopsvy{|{xsnighkqx~|vrnlllmoquz~~}~~~}ywx{ƿù|qjiozϿž~yuuy|{}}zwspmlkklnortw{|xtrqonmmmmoqrrrolifeeinsx{zvohcbguvha_`cgjmosvyzzxvroljgecbbejrz{slfcaaabcdgjnqrqnhc^[\`fmty{{zxusrpomlkklnoqrssrrqrsvz~~xrmjjmsz~zvrqpoopquz}|||zvstx~ƿʽ~rhccjuʼ~}~|y}~wssw~|{}}zwspnlllmnprux{{xurpnlkjjknpstsplhdbbflrwzzvpicbgttga_`bfiloswz{{zwsoljgecbcejqx~~wpic`__`acdgkortsoib]ZZ_emtz||{yvtrqomlkklnoqsssssrsux|{vqnmpuz{xutrqqqruz}{z{}{vtuyžʼumihmvĮʼ}{|~{vz}vqqu|}}~~|yvsqooopqstvx{~|zwurolihgilprtsplgb`adjqvz{xrlhgkushb`acfikosw{}}{wrnjhgeedegkpvz}|xqjc^\\]`cehknqtusoib\YY]dlsy{{zxusrpomllllmopqrrssstux{}yvssuw{~}{ywvtssstvz}zxyz}zwx|ý|z{}κĻ~|ytx|uqpty~|zxvttsttuvxy{}~}{xuplhfegknrtspkfb_`dipvz{zvronqx~rjeccdfhjnsx|~~{wqlhfeefgijmpsvwupjb\XWY\afjmortvvtoha[XX\cjqwyyxvtrponnmllmmnoopqqrstuwz|~~}{zzzz{{{{{zyxxwvuutuwz~|{|~|ywvxz}|}ſǼ{y}˽}zxsw}{uqpsw}~}{zyxxxxyyz{|~~}xsmhedfimqsspkfa_`ciouz||zxwwx|yrligffghjnsy}|vpjeddfhjlmopqqpmhb[URRU[bioruvwwvsoha[XX\biotvwusqoonnnnnnmmmmmnnpqrtuvxyz{|~}zxvvvvwxxxxwwvwx{~~yurrsvz}|xutuwz}ÿrjlxǸxu{~|zxvsv|{uqqrvz~~|zyyz|~}||{{z{{||}~|unhdcdhlpsrokfb`adiouy|~~~~~}yvromkjhhhjntz}vohdbcfjmppppnljga[TOMNS[dmtxyzyxvsnha\XX\ahnsttsqommmnnoooonllklmnprstuuuvwx{zuqpqruwyzzyyyyy{}|wqmjikoty}|wtssuwz|~~~лk]]lƬ{kgn{}}}|{yxvtsv{zvsrsuwz|~}zvttvz}~}|{{z{{{|~}woidbdhlprrplhdbbejpuy||ywuttssrqomkjjkou{~wohcbdgkorrqolifb]VPLJLR\fpx{}|zxurmga\ZY]bhnrssqomlllnoqrrpomlkklnoqsttssrsuyyrnlmpswz{{{{zzz{|}~}{wrlgddgkpuz~}xtrrsuwz}|{|ͫiVTd~Ҵygagv||||{yxwvuwz}}zwuttuvwxz|~}yussux|}{zzyyyz{}}voiecehlpssqmjfeehlqvz|}yurqqrstutrpnllmrw}yqkfdfimqssqolhda\VPLJLS]hry}}|zwsplgb^\\_diostsqolkklnqstusrpnllmnpqrsrrqqqtx~xpkjkosw{|}}}|||||||{xupkgddfjoty|~yusssuwz}|{|ٵmXUb{۽mfkx~}|{zxxyz{{{{{zyyxwvuttuwz}|xusstwy|~{yxwwwxxy{}zuojfefimqssrpmkjjmptwz|~~zvsqpqrtvxxvtrqpruz|uojiiknqrrqnlieb^XSONPV_isy||zwspmjfc`_`chmruvuroljjmptwyzywtrpooppqqrqpppqsw|}vojikotx|~~~}}|{zxvtpmkiiknqux|{wuuuwx{}~}¿⿚yc]fyʮy{~|{ywuttvx{}~}{xurpprtx{}}|zxvutuvwyz|~|yvuuuvvwwxz{{{zwsnkhgiknqsttsrqpqsuwy{|}}}}|{ywusrrsuwy{{{ywvvwz{uqonopqqqonljhfb]YUTV[cksxzzwsokigedccehmrvyywtpljjmrw{}zxvtsrqqpppooopruz~ysnjjlpuz~~|zxvutsrrqrstuwy|~{yxyz{}¿ʨsknyî}ytpmmqv{{uplklorvxyyyxwwvvuuuuvy|~zvsrrrtuvvvvvvutrpnlkklmprtuvvvwwxyz{|||{zxwvuuttttuwy{}~~~|||}|xutrqpoonnmmljgc_][\agmswxvsnjgeeeeghjnrw{}}zvpljjntz~{ywusqonnnooprtwz|}|yuqmkkmrw{|ywutuvxz{|{zzyz|}||}~½Ӷ|xy~˾yqkhhlt|}unighjnruvwxyyyxwurqpqtx}|xspooprstttsrqponnnmnnoprtuwxz{}~~~~~~}{ywtrppprsuwyz|~~|yvrpnmmmnoonlifdccfjosuusojfcccegjmosw|}wrmjkou}~{wtpnmmmnpqrsuvwwwtrnlklosx}|xuttvz~~|{|Į{vsswõypiddjr|~ulfddgkortvxyz{zxtqnlmqv{|vqmllnprssrqomlllmnoqrstuwxz|~~}zxtqnllmpsvy{}}xtolkkmoqrrpnljiikmpstsqmiecbdfimpsw{ysnkkpv~}ytpmkkmnprssttttsqomkkloty~|xustw|}{|оqfabjw®zqiddjs}}tjdabejnrtwyz{|{xtoljkou{|upkjjloqrsrpnlkklnprtvwyz|}~{yvsomkkmpswz|~ztoljkmorstsqpnmmnoqrsrpmjgeegiloruy}ztolmpw~ytokjjloqstuuuttsqoljjlotz|xustw}}{{ʻrbXW_mȴ|tmhhmu~{qhb`bekptwyz|||{xsokijov}}vojhhknprsrpnlklmpsvy{~~{ywtrpnmmoruxz|~{uoljkmortuttsrqppqqqqqponmllmnprtvy|zuqnnqu{~xrmihilpsvxxyyxwvspljhjntz|xvtux||z{~ɻwcWT[j|˻~xroorxxof`_bfmswz|}}}|{wsnjijpwwoifgimprsrpommnpswz~}zxvtsrqpqqrtvxz|}~||||~{upljkmortuvuuttssrqpppqrsuvvvutttuwz}~{wsqpqsvy{}~wpjfeglqvz|}~~~}{wrmighlsz~|ywvvx{|yxz~ʵiZV]k}¹}yvvx|}ule`_bhov{~~|zwrnjikqyxohefhlprssrpooqsw{|yvtrqqqrtuvvwxyz{|~~{ywvvvxy{}~{upljkmortuvwwwwvtrponorvz~|yvttux{}}{xvtrrqqqrtwz~|unhdcflrx}{unheejqz}{zxxwxz{}~~|zxwwy}~}}~èra\bp~}~~yrjd``dkrz~|zvrnjilr{xngdegkorttssrsuw{|xurponoqtvxyzzzzz{||}~~}{xurqpqrsuwy|{upljkmortuvwxyyxvspmmnsy}xtssux{|}|{zxwuspmkjknsy}ztlfbbfls{wohcdiqz}|{zzyyyxxxxxwvutuw{~}|{{|}~yvv{е|jdjw~{vpidbbgmu||zvrnkjls|xmfccfjortuuvvwy|zuqomllnqtxz{|||{{{{||||{xuromllmoqsvy}{uplkklnqstvxyzzzwsolkms{ytrrtvy{{|||{zxtpkgeehnty||xrkfbcgmu|zphcchqz}{{{{{{zyxvuttsrrrsuz}|zyyyz|}voklr~ۿsmr~ƾĿ~~}{xtojgefjpx~|zvrnlkmt|vldabdimqtvxz{}}wsomkkkmpswy{||||||||||{zwtpmkjjlmoqsw{{upljjlmoqsuwy{|{xsokjlr|{usstvy{|}~~~|wrlgccfkpuxyvqlgefiov|{qieejr|{zyzz{{{zxvussrqppqsw|}zyxwxyz}zskggm{Ǫ}vzĿzz}zwurpmlkmpuz~|zwspmmnt|}rh`]^aeinrv{zuqnlkjjknpsuwyz|}}}}}|{zxvsomkjjkmoqsvz~zupljjjkmnprvy{||xsnjhjqz|vttuwz|}|vpjfefimpssrpnlklorw{{slhhmu~}ywwxy{{{zyxvutrqonnpsx}{wtttuvx{~|tlgflyʹǿ¼}wv|}zvtrqqrrsuwz}~|zwtroopt{wlc\YY\`ejov~|vrpmlkjjkklnprtw{}~}{ywuromlkklnprtvz}}ytpljiiiijlosw{||xsmhfhnw|xvvwy{}|vpkihhijllnoprstuwxy{|{tollqxzvttvxy{{{{zyxwtqolklosw{~~{xtpmmoqtx|xoihmyҽƾ{tsx}~~zvrpoqsvy|~~}|zxvsrqruy}ypg^XUVX\afmwzxz}{vrpnmllkjjiiijlotz~}{xvtrpnmmmnpqstwy|~~{xtpljhgfffhlpuz||xrlgeflt}}yxxy{}}wrnkhfeefinsx|}}{ywvvx{~~zvrpqv|~xsrrtvxz{|}}}|zwsokhhjmquwwtpliggjnsx}~tnkp{Ʒ»{sqt|}}}}}}}}}{|~~{wsommpu{~}}}|{zywutsstwz{|yskc[VTTVZ_elx~tppqtwyywusqonmllllkigedegkrx~~{xvusqpooopqrtuwy{|}|zwsoljhfdcceinty|{xrlfcdiqy}{zz{}}xsnid`_`emv~yuqprux{}~|zxvuvz}wrpqruxz{}~~zuojfefiloqqnjgdbcglsy{sqtú}{{|ľĻ}urty|||||||||{{|}}}{xtpmklqw~}|{{{{{{yxvusstuvwvsohb\XWWY\`fmz{pjhijmnnnmmllllllllkifdbbdipw~}zxwutsrqqrrsstvxz{|{yvsoljhecbbdhmsx{{wrkfcdhow~}{{|}~|wqib][\cmxzsnlmptx{||{zyyz~}wsqqsuxz|~}voieccehklljgdbacgmtzzwzǿĿ{uokjmvƿǿzvvy~~~}|||{{zxvrnlkmrx~{yyyz{{{yxvtsrrrssrpmieb___acgkr}ynheefhiiiijjjjkkkkkjigecdfjpw}~}|zxvutsrrqqrtvxz{zxuroljhfeddeinswzzwqlgddiov}}{{|}~yrjc]Z\cnyyqkjknswz||||{|}~zvuuvwy{|xqjebbdfhjjigfeegkqw}~ǿ|wpjecfnƿļ~}{ywvtrpnmmotz|xwwxz{|{zwurqoooooooonnnnopqrux|wmhfeefggghhiijjjjiiiihhhiknrvz~|zxuspnmnprvxzzxurnljihhhijmqtwyyvqlhfgkqw~~{zz{}~yske_]^eozxpjikoty|~~~~~}}|||}~zslgdddfhjkklmnorux|¾ztojggjrƾż|wspnmmnoprv{}xutuwy{||zvspmlkkklmorv{}unjhgghhhhhhiiiihhghhjkmoqstuvwy{|wsnkhhjnswyzxuqnkjklmopqstvwxwtqmjijnsz}zxxy{~|xsmhcachqz}unjilpv|}vojhffgijmosw{~ytpnoqv~Ƽº|uokiiknqtvy}}yurqsvy{}|yuqmjhgggikpv{wsomlkkjjjjjiiiihgfefgjoswz{zxussv|zslfcbejpuyzxuqmkkloruxyyyxwvusqnmlnqw||xvvwz~|zwsolighmszzsmjjmsy~}{zz|ysnkjiijlou{ÿýytsuzź}tlgefjnswz|}|yuqooqtx{}|ytojfedcdfjpzzusrqqqppoonnmmlkkjihfdcdfkry{upnqy|sjc^]agntyzyuqmkknrw{|zwusrqpopquy~{wttvy}~|{ywusqommnquy}|wqljkou|~zwuuw~|vqomlklnrzĹſŹzvx}ĸź}skecdiouy|}~~}}{xuqnllorwz|{xsmhdcaabdhp|ypkjkmprsssrrrqponlkjhecbbekt}~unknw~tja\Z^emty{yuqmkkotz{wtrqqqqrsw{~zvssuy}}{zxwvutsrqqqrtvy{|{xtpljlpw~~zvsru}}xtqonmnpu~ͽʽ|y|öǺ~tkecejouy|}}}|{zwsoljjmptxzyvrmhdca`acgo|wmihilpsttuuvuutrpnmkhecabekt~vnjmwujb\Z^emuz|zvrnklouz{wtrrqqrstwz~}yvttvz}}{zxvusrrqrrsstvwyz{zwsolklqw{wtsv}|xtrpnnoqwɺľɽ}¶woighlpuxz{|||{yvrnkhhjmqtvvtpmifecbabfmzwplklnqstvxyz{zywuromjfca`cjt~wolnwwmd^]`gov{}{wsommosw{~~}{yvtssrrrrsux{}~|zxvwy|~|zwurpnnnoqstuvxyzzyvsomlmqw}|yxz~{xtqpnmmnqwƹĹƾztommoqtvwyz{{{zvrnigfgiloqqpomkjigdccekvzvsrqqrstwz}}zvsplgc`_bir|xqnpyyphcbekry}~}yuqnmnprtvwwwvvuutsrqqqstwxz{{{zzz{}}{wspljjjloqtuvxyyyxvspnmnqv{|zxxyyyxvsqnmllklnqwú¿»¿~zvtsrrsstuxz{|zwrmieddfhjklmnnnnmkhecdir~~~}zxvtstx|{wsnhd`_agpzztqs{|tmhgjou{~{wspnmmmmmnprtuwwvtrpoopqrsuvxy{|~|xsnifegilpsuvwxyyxwtqonoquy}{wtsqqponmkjihiijknqx̚}{xvsqpprux{|{wsmhdbbcdeghjlnpqqnjgddfnwytrty~~yustx~zvpjea_afox|wuw}~wqnmoty~}yuqomjhgfgjnruxywurpnmmmmnprtx{~zsmgdbdgkortvwxyyyxusqpprtwz}|yvsqomkjihgffffghjlosy½ٖ}xtpmmorvz|{xsmhdbaaabcegknqssplhdcejr{{skgglt}|vstx|xsmgcabgnv~~zyzzurqsw|~{wsqmjfdcdglqvzzyvrolkjjjjlnqv{|unhcbcfjnrtvwyzzzywusrrstvx{~~{ywutrqomkjhgggfghiklorv|Ķýľ㓓ztnjikotxzzwrmiecaaaabcfimprrolgdbdiow}|umfbbhq{}wsty~zupkgffjpw}~}~|xutvz~}yvsolifefinsx{|zwsoljihghikoty~xqkfefhlortvxz{||{yxvuuuuvwy||zxwwwvuutsrqqpoooopqsvy|ʾü咒}~zrlgegkpuwwurnjgedcbbccehkmnnliebacgnu{~~zskeabhpz|wttx~{wtqomnptx|}ywwy|{xvtqonmnptx|}}{wrnjhgeeefgkpuz~~~xrnmmnprtvxz|}~}|{zyyxxyy{~}|||}~~||}ż»º|wz~yqhcacglqtutroljigfeeeeefhiiigdb``bfmsy}}ztmhdeipx{vtux~~|zyxxwwxxy{|~~~~{xxz~~{zyyyyzz{}{wrmigecbbcdgkptxzzzyxyz~}ywvvvvwxy|~~|{{z{}»¼¿֏|xru{yof_]_chmprrqpomlkjihgffeddcca`_^_aflsy}}{vqliilqv{|xvtux|}|}~~{zyz~~xttv{{yy|~~|wrmifdba``bdgkoqsssrrsuz~|zyy{~}|{||~¿ˎ}xtmryxnd]Z[_dimopqqqpponmkjhfdb`^]]\\]_bflsx|}|yuqnnpruxzzyxvutuwz}~||}}yvw|zrlknt{|zz}|wrmifdba```begjlmmmllnqv~}{{|}{zzyyyyxwwvwx{~Żù¿Ĺzupkpxync\YZ]bgkmopqrrrrqomligc`][ZZ[\^`chmsx{}|zwtrrrrstuuuttsstuwy{}}}|{z{}xtuzwmfehov~|{{~}xsokhfdbbabcdfhjkkjiijnt||{}}{ywvuutsrqqruy~ý{yxy{}~ùÿ÷¾|vqmry{pe]ZZ]aeikmoqrsssqpnljgc`][Z[]_adgjnrvyzzywutssrrrqqqqqqrstuvxyzyyyyz|xssxukdcflt||{|~~zvroljigfffghjklmlkiijms{~{{|~{ywvutsrqqpqruz}xuuuwyz|}ýǻ|xrv~~sia^]_behikmoqrrrqonljgeb_^^`behkmoqrtuuvvvuutsrqonnnnnoopqrsuvvwwwwy{xsru{{rjedgmsy~}{{{}}{ywusrqpoopqrsttrpnllnt{~{yy{~~{xvuttssssrssuy~}wttuvxyz|}ƾǼĖ~y}yogcbbcefhikmopqponlkjhfeccdgjnruvutsqppqrtuuutromkkjkkllmnopqrsttuvxzytrsvy|~}zupliikosx{|}|{zzz|~~}|{{{}~~{xtqpqu{}{ywuuvx|}{xvtsssstuvvvwxz~Ž~xuuvxz{{|}ºΛvnjgfffffgikmnnnmlkjiihhhiknsx|~~|xsolklnqtuutqnkihgghhijklmnoqrrstvy}yurqqqqqqpoonnoprtvxxyyyyyy{|~|xuuw{zuqonnopqsvy}~|zxvtrqppqrtvxy{|}{xwyz|}~~¿¿۟|uqmkihgfghjklllkkjijjjklnquz{smhfhkosuusplifeedeefghijlmnoprsuw{~yuroligeegjnqsuuvuuuuvvwxyyz{{|}~{wutuvx{~}yxy{~{uoieccegjmpswz}~{xusqonmllmorux|~¶~{{|~¿zx|棣{wspmkjhhijjkkkkjjjjklmoqty}skecehmqttrokgecbbbccdeghjklnopqsux|}yurmhc_]]agmsxzzywusstuwxyzzzz{{|~{uqmlmpsw{|zz{}~~{voga][\_bgjmqtxz||zwtpmlkjiijlosw{·~~{wxtjgkt~}|}ƶ裏{xusqomllkkkkkkkllmmnnpqty|skecdgkoqqpmifcbaaaabcdeghjklmnoqsvz~|xtpke_[YZ^enu{}}{xuttuwy{|}}}|{{|}~ytolkkmpsw{|yyy{{{xslf`\Z[^aeilorvxzzxuqnkjihhikmquzǿwrs{pdaemv}zyxwwy~ǵ󫫫}|{zywurpnlllmnpqqponnnptzzslgeegilmmligdcaa``aabcdfgijjjklmosx|}ytplgb]ZXZ_fow}}zxvvx{~~~}zvrponnnpru{~yvvvwxxvrnieb``acehjloruvvuroljiiijkmpty~ľ¼wqr|ujegmu}}{{zyyz»ij󯯯zuqnlmpruvvtqnkjjmrvz}}{wsnkihhhhhggedcbbaa```abdeghhhhgghkou{{vpkhd`][Z\biqx~}{z{}~}|{yxwuspnllnry}xtrrrstutsqomljihggggiloqssrpnlkkkkmnqty~º¸žxsuuppsx}¿п𳳳|upnoswz||xsmhdcehlpsttsrqonkigdcbaabbbbbaa``abceghhgfdddflryzslgca_]]^aflsz~~|zzz|~~ytniffjpv}zvronmnpqstuvwxwvtpligfgilnpqponmlmnopsvz~ƾȻ|xz||~ľǸ췷xroqu{{tle_]^`cgjkmpqrrqnjfa^]]^`abcbbaaaabdfghhgecaadiqxxqic`___`cfjpv|}ywwy}wnf`_bgnty|~~|{yvspmkjklmoqsw{~~xrlhffhkmoppoonnoqruw{Ĵ|ùȿʾ軻{tqsx}|tkc\ZY[]`cfilprtsoje_[ZZ\^abcccbbbcdfgijjhecaaciqxxpica`abegjoty~{wttx~ynd][]agnsvxyz{{{zyxvusqomkjjjkmoqty~~wpjhhjloqqqqqqqrtvy|ƿɾǿ溺~vsuy~|tkb\YYZ\_bdgjnpqqmid_[ZZ\^`bccdccdefhjlmmkigeeglszzslgeefgjlosw|zussw}xmc[Y[`flqtwyz|||{zxvtsqponmmnnoqsuz{tomnoqtvvvutttuwy|Ͼž»˿¾赵zwwy|~}xqjc_\\]_bdefhijkjheb_]\\]^`abcdeeghjlnpqrqpnmmosx}~yurpoopqrtx|~|xtrsv|vlb\Z\agmrvy||ywvuuuuuuuutuuw{zwwxy|~~|zxwxy|;¿ºſ쯯}zyyyxxurniecabceghhgfdcaa``````_____`bdfhjloqsvwyyyyyyz|~~}|{zz{}~zwwz}yvtssvz~{sjb]\_djpvz~}||}~}|zyz{}}{{|~˿¾ô񪪪~{xurpmljihggijlnnmid_[XWX[^adddb`_^_adgknqtwy|~ztpoquz~~|zywvutstuwz{{zuoic``chnu{~}|{{{|}~üŸ}wrligfgiklmortutrld\TPORW^dijifc`^_bejnsvy|~vojhilptwxxwutsssssstttuuutsplhedehntz~{xvvx|ȿƺ||~~wpiecdfjmpruxz{zvoeZQKJOW`hnpokgcaadhmrw{~|slfccehknoonnmmmnpqssssrponmkihghjntz|wtru{}|~ÿƽź|yy{}wpiedehkosux{~{sh]SMLQZdnuwvrmiggjnrw{{rkebabdfhhhhhiijkmoqrrqomkiihhijlotzzvtv|~|}ſż|xwx{~~{vqlihiknqtvz~xncYSSYbmw~}xtqrsvz~ysmhecbbbbbccdefgikmoponkifeegiknrv{|y{¿ǽ¿¼~xuuwxyxwusqppppqstvzvlc^^dmx{xtpmjgda_^]^_`bdegiklmljgdbabeinty~¿ºÿ·yusrrrrstvxyyxwuttvz~vnjkqy~|zxwvutrokfa]ZYY[^`cdfghiiigd`^^`dkryĿ¹Ĺǻ|vronmmpuy~}zwvw{yvw}}|zyyxyz|}~{xusrsuwxwupib[WUVX\_bceffgffc`][[^dluľ¸¿~~ŻĿɼxrnlkkpv}{yy}}{xurpnnptwz||zwspmmpswz{yskbZTRSVZ_bcdeeedca]ZYY]dnyÿǿĿø¾~|{}ĺƼǻ{uqnmnry~}{yurnkiilotwzzwtpljjmqvz|yskbYSQRVZ_cdeeddcb_\YWX]ep|þ¾Ļ¼zwy~~{z|ɿǼ쯯ȿ{wtstx~~}|{zzxvsokhggimrvxxvrnjhhkotxzxrjaYSQSW\aeggfedba^[XWX]fq~ÿǿýž|uruz}|~üùᰰû}|}~}{zyxwwwvusqmjgffimquwwuqmiffimruwuph`YTRUY_eijjhgdca^[YXY^htù½yroqv|¼Բ½}{zyyzzyxwvutsssssrqoligfgimqtvvtplhfegkorsrmg_YUUX]chlnmkheca_\ZY[`jvȼþɽĻÿxqnptzƳ¿yurqqrsssrrqppoooooonmkjhhhknqtuusokgeefilopnje_ZWWZ`flpqpmjfdb_][[]blx÷yqnpty~|xvx|~xsnlkklmmmmmmlllllllllkkjjjjloqstsqnjgddegiklkhd_[YZ]cinrsqnkgdb`^]]_enzĽø»˸ʿzsqquz}vqpquz~~ytokihhhiiiiijjjjjjjjjjjkkllmnpqrrqolhecbcegijigc`][\_djorsqnjgdba_^_bhq}ǿȽżƴȽž}wuux}|yxxz}wpkikoswzzxurnkihgfeeeefgghhhhggghiknoqrrrqqpnlieca`aceghhfda_^_bfjnpqolifcbaaabeks~žǾ²ƿ}}~yvuvy}|}yqjecehlpstsrpnlkigecbabcdfggffeddfimqtwxwuromkheb`^^_acefffdcbbbdgjlnnljgecbbbceinvúþ˽ſ~zwvx||yz{}}xrke`_`bfilmnoooonkhda_^_acefffdcbbdintz}~{xsnjgda_]\\]_acdeeeeeeffhijjjigecbccdfimryƹø½}zz|}zxxxyyyvrlf`][\^adfhkmoqqpmid`]\]_beggfdbaadipw~zsmgda_][[[[]_acdefghhhhhhggfedcbbcegimqv|ôÿüÿ~}|zyxxwvurnic^[ZZ[^`cehlorsroid_[Z\_cfiihfcbadiqyzslfb_][ZZZ[\^`bdeghjjjjhgeddcbaabdfimqv{ýɺ¾~}}~~}|zywurnhc_[ZZ[]`bdgkorsrnic^ZZ\`eimnljgedfkqx~~xqjea_]\[Z[[]_abdfgijkkjhfdcbaaaabehmqw|ƿ̽¾ƿ}}|yuqkfa^\\]_bdfhloqrpmga\YZ]ciosutqnljkmqvy{{xsnidb_^]\\\]^`bcefhijkjihfdcbaaaacfkqw~º˽˿ü|{}|vpjea``acfhikmnppnje`[YZ_fov|~}{xurqqqrrrpnlifdca`__^__abdefghhiiihgedccbaabdhnv~źȼķļzwy}|z{}wqkgeegikmnnoonnlhc^[Y\bku~{xuqmjgedddeeddcbbabbdefghhhhhggfeedcccbbcejq{ȺĺüнŽƼzpkkou{~{zz}~xrnllmorssrqpnljfb^[[^fq|~wphb][[]adfgggfeeefghiiiihgfeeddddddcccdglt˻ſʶŻƻżymgfiouy{||||~{wuuvwxyxvtqnlifc`^_ckwxnd\VSUY_dhjkkjiiiijjkkjihfedccccccddccehnwμøݸƺĶunmoty}~|zwspmkhfdcejs~vlaXRQSY_fknooonmmmmllkjihfdcbbaaabbccdfioxĺӾȽŹ~zvronmllmpu~ypg^WRQU[cjpsuuttsrpomkjhgfdcba`__^__`bdgkpxƺþüʹ嶸~yusrrtvy~woh`ZVSTX`hpvz{|{zxwtqmjgedccbba_]\[[\^`dhlqw}ÿû»Ƚ½}ywwy|zme_ZWVVX^env}|xsniecbaaba`^\YWWX[_dinrvz}ž̾Ǿü¹Ļ~||se\XVVWZ]dlt}}wpjebaaabb`^ZWTSUX^djosuvwx{~ʵ̿»ƽȶƸm_WTTWZ^ciqz|uoifddddca^ZVSRSW^ekqsttsrsw|ĽӺѿƿºм;}l_XVWZ_chnv~~xsolkigec_[WTRTX_fmruutrqquz׽Ƴ°ylc^]^aejnt{|wsniea]YVUVZahotwwvtssw}ؾɷɸ²|unigghjnquzvoid_\ZYZ^dkqvyzyxwx|׾Ķ¾|yvusrrrrrstuwy|tmgc`^^_bgmsx{|||}Խ|vpkfddfkqw{~¸zqkgdccdgkpuz}~ѼĿ˾~woha\Z[ait}ijuokihhiknrvz}κþĽƼȼ{sle`^`fp{Ƕyspnnnnopsvy{~̹ÿº¸¸|wsqsx}xvtttsssstux{~Ŀʷÿû~|{{zywtrqqrvzǴƿͿ{vqnlmpv}ű}||~̽ʾxqkghkryï|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ľøzuqnmlnquy}þ}{|}~|zz|˼ø~xspnoruy}|ywvx|~~´}zzƶ¼~ytrrtwz~{wtsuz}z|Ͼ{vuzƶ|{}zwwx{~{wsrty|y|ȶ}wv{ʽŸxtxɽ|{}~}{xutvz}|Ͼǻ̿xnikw~}~}{zz{~Ǻùĺqf`akz½ǿľĽxkaZZalz~}ϽŻľÿth^XW[cmw~|||}Ƭɴý{qg^YXZ_gox¾ÿ~{|~z|xxƿxqib^^`dipxþǾú~|||£xxڿƿ|yvrnkjkmqv|ʿ}~ʮí}{xvttttvxz}¾̹}{yvtqommosy¼¿þǾ{wspnkiijnv¿zy{Ŀ̾{vrpmkijlr|ýzutv{Ŀı¼ɿ{xwusstw~ǽzusv{ýƱ¼ɿ¸|xwy}İƿ}}~οŽŹ|}Ȼʼü¼{xyȷѿzz}¾ɾ~xuwӿ˸~ƽ~xuxűɸ¼ü{x{ȵɽ¾ú¿}˸¿ȿ¿ͻƾ½ɼ~Ͽſľĵ|{·¾ļ˽}|ǼŻǽ¾ɿýнöľǾȴοĿĻĺ˻ʿɽҹɷɾ~δĴǽ¿ij}}ͳúľɶ~}εźþ~|͹}~ѹȿ¼ľ~wuxҼ~Ծĸzqkhjp{{{ʿzrpt|¹ıŷ{pf]WUW_kz{snnrz½ȹ{rpu}ĬɹʹȻsiaZUTV^iv~zrmmry¾´zw|ȳɹ÷¼tnjhgginu|ztsv||yy}÷¹ͼ¹||~{qjhmu~ȼ}{z{uia`enzù}|||~Ƹ{vrqrv|{z|pd\[`kw¿ƾ~{xvttuy~¸Ȳwpljkozytrrsvz}nbZY_iv¿ȿ~yvsqqtyȼ͵~uokiimw~tommnrv}}pe^]clwɽȿ~zwvx}˼Ȳwqmllpx}tomllnrxwojims|ûžʹºⷷϾzvsrsu|~vromllos|~{z|¾dzƸ¾Ⱦ|zz{|zvsomklnu}ƿ¾ſ½í¿ͷz|ľ}zvrnkjkou|~}||~~||}{yxz~þƾؿùԸoikt̻}{~¼}{wsoljjmpuy}}x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ssrrrrtw{{vqorx}uplhfddfjov|~|zvqlihkr|vlfceiouy|~}ridaaabdegiloruy}˸ýοyhbdku{tqprv}¾xw{}{{}­wpljhgghhjlorsttttsrrrrrstux{~{xwy}vqlhdbacglsz}{xtpmmpxuleceiouz}xme`^^_`bdfhkoruy|ɶľŮ{ibcis~xspnoryĹ¼yrqv}{{}Ʊʶzuqlhdbbeimruvvusqppqsuvxz|~}vqlhca_`diov||ywwz~|zyyz|vmgfhlrx}}tleb``bcegilpsvy{~̴nggmuytolmr|żvpns{~~оĵ}}}{rib]\_elrwxwtqnmmptx|{vqlgc`^^afkqw{~~~~zwutstuy}}vplknrx~zupliggghikmpswz}ѻxposzzsnkmvſvpnryĻzzz|ylaYW[bjrxyxtokijnu{|yuqmhc_]]_chmqux|~|{zzzz{|}~yuqonmmorvz~{wsqruy}{||tpnmmnnnoopqsux{{y{yqlkrøxrpsxƺwwwy}oaWTW_iryzxsmhfgmu~|zxwuqmhc^\[]`eimpruxz|}}|||}|xvuuvvwxxz{~}upljhhhikosvyzzywvvx{}vrt{~qhcdfkosuwxxy{}Ʊunko{ʹ|vtux}ÿ~ʼƼtttvzqaURU^hry{xrkfcelvzwvuutqmhb^[Z\_cgjmoprsuvvvwxz~wsqpqrstuuvx{ypkgedddegjmqsuvwwxy|yqlnwzj_[]bjqx{}~ȸȶzpkmvızxxz}}~Ⱥòtttvz~qaURU^hry{xrkebeku~wtttutqmhb]ZZ[_cgjlnnopprssuvy~}tpnnoqrsssstw{ulfcaaabcehknqsuuvxy|vokmvxh]Y[bjsz~²ƶ}rllr}Ϳ}|}ļĻuuuw{pbXUX`jsyzwrkfcekt~~{vttuutrmgb]YY[`ejmoponmmopsux|yrnmmnpqqponoqu}|pf`]]^_acehlorstttuvy~|uomoxzka]_emu{ǺumkowͼǸǿؿvvvx|{oc\Y]cksxyvqlgdekrz|z|zvuuvvurmga\YY\ahnrtsqolklosx||vqnmnopqpnlihinvwj_YXY[_behknqtuusrqrtz|xtrrt|}qhegkqw|»xolmqxĸ̾¹~||׾xxxy}}ume`_bgmswxuqlhfgjpv|~zwvvx{~~{yxwwwwurmg`[XY]dlsxzxtpljkou{{wspnnoppqplhdbbfp|sdYSSUZ_dgknruwwvsommou~~xvtttuw{yroprvz}|{z{}}snllou~¾}{{|~Žztppuռyyy{~{xsokgeegkosuvtqmjhhknswyzyxusqpoonnnoqsuwyyyyywurmg`[XY^gpx~}xrmjkpv~{ywusqpppqqrqpkfa]\`jvo`UPPTZ`fjnquxyywsnjikrz|tnlmptx}{yxyz{}Ƽ}{xvuuwz~wqlihkr;·~zwvwzulggnŽҺzzz||vqmkjiiijknprttrpnljjlnpstutsqomkieb_^`diouy{{{zwurmf`[YZ`is|ztnkkpwzusrqqrrrrsttsqle_ZY]fs~m^TOPT[bhlptwy{{xsokikqyulfehmt{~}||}}{Ŀ~zwtrsux||unhddivԿûzvstx~ļtjden˻ϸyyyz}~vojgfghjlmnopqrrqpnmllmoprrrqpomkhd`\XWY^emuz}}|ywtplfa][]cku}|vplmqx~yusssstuuuvvvusng`\Z]fr}oaXTTX^djmptwyzzxuronotzyphcbfmt|}zyz|°}ĺ|ywvvwy|zrjdaepɵŻxttyxplmxɹʵuuuvy|yqjebcehknoopppppoooooopqrssrqomkhfb^ZWVX^fox~}yuqnjfb_^`fmv}}xsppsw|}{zzz{{{{{{{zywrlfa_bjt~tjb__adhkmprtvwxyyyyyz|}~yrkebbgmu|zvtsuy}ijļyogbclϼǾǾ}ww}ž~ͽ¯qqqrux{}{tlea_`dhloppponmmnopqrsstuuutrolifda]ZXX[bjt|}xrmjgecbceiov|~{xvuvwxz|}~|wrmihjox{uqnllllmmnopqsvz~~yurnjgedeiov|}yvtux||vplkmpty}~ŶüwmgejyǼļǿſ||ľƼƸmmmnqtwy|{vphb^]_chmpqqomkjjlnqsuvwxxxwvsplhec`^]\]agpy~voifeeefhjmrvz~~}{zxvtssuy}yvsqsv||xtqomlllmosz}rjecbcdfhlqv{~~{vplijnu|zqjecehlqux|~ƹÿ~|{zz{~ulhkuſȵµýiiijmpruxvrle_\[^chmqrqnkighjmquxyz{{{zxuplgdba``acgmv~umfdcegjlnqtwy{}{upljmt~~|{{}}vqnkihikq{|l_ZY[_dhkoswz|{vohb__enwwme_]^afkptx}~Ż»~zxvuvx}}smmrz¾þŭ̷úeeefilnqtsoic^[[^cinrsqnjfdehlqvy{}}}}|zvqlgdbbbcehlrz~tkebceimprtvwyz|~|umgdgp}}}{tpliggio{{gXRRV\cimqux{{yskbZVW]gs}~vkb[Z[_djosx}ļ½~|{|}{wtsstyzspqu{ѷȮȿľfffhjloqsrnic^[[^ciossqmhdbbfjpvz|}~~}|yvqlhdccdehknt{}tkecdgkpsuwxyz{||tkdbdn{{{xsokhgio|{fVOOSZahlpuy|}zsi^UOPWco{vlc][]bhouy~~|zzz|~zwttuyxttvy}þ׾īöĽmmmnpqsuvtpke`]]`ekpssplfa__chnty{|}|{zxuqmigffghkmpuz{tmhghknruwyz{|}~zrkebdmy|{}ytpljkq}{fWPOQW]cgmtz~}ui\QJJR^lyxogbaelt{}{z{{}~{yy|{z|ñѾȹľtttuvwxyzwsniebadhmqtspjd_\\`elrwyzzyxwuspnkjijklnpruy}~ytpmlmoruwy{}~~|wqkfdfmw}{vroos~{iZSQQTX\ahqzxj[NEEMZhv{smikqy}{{|}~Ǻ·ͽ{{{{{|||}{wsniffhkortsoib\YY]cipuwxxvutsqponmmmnpqrtuwxyzzywusrrstuwy{}|zwtokhginu}~yvvy~~yutv~{l`YURRSVZco{}m\LBBIVet~xtsv~{z{~½{vqmjikmqstrng`ZVVZ`gnsuvutsrqqpppppqrsstttttsssttuvwwxxxyz{~~zvsqnljjknsx|~|wrmklqxzxy|pf_ZURPQU`m|p]LA@GTds~~||¾~zz|ĽþȾ¯¾~ytolklnqstrme^XTTW^elqtuutsrrrrrrrssstttsrqonmnpruwz{{{zzz|~ytronllklmpsuvurniedflt|~|||~~{{}tle_YSPPT_n}s`NBAHUds½~yz}}}}~ſĽżıý¼~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}tmgefimrvy{~ÿ}phfjr|ŵſ¼ɿƾȺսooooprstuwuromlowr]K??HXk}}ric`^]]\ZXUSRQSV[`fkqw~~{wqlgeeiov|~{xvtsrqqsw~{vsrrsuwy{}¶yqjeehnv}rjinyºÿĿȷƴggggikmoptttuux|w_J=4/3@Si}}tmklptx{{zyvsolf`ZUQQTY^dggd^YTRTZblu}ztnidbbcdfhjmpsuxyyyxwwvvvvutsqoljihijlmmlhc_ZWVWX[^bhpztg_^dp}~qe]YZ]bgmqv{~~zupnmorvy|}}|zyyz}{yz~øϻ·ùvvvwxz{|~~xpf]UPKGDCCFNXblrrne\TNMPV^dilmmljf`UG9.).:9?K[m}xsmf]UNIGGJNRVY[]_acefghjkmoqtvy{~~zvrokheb`^\[Z[]bipuyxtld]YY]ckry}sidbbdgjnt{}sjc`^_`cehmrw|·|tnjkqz}{{}žºûbbbekpv|uja\^fszmb[VROLJHGGGGHHIJKLLLIFBABHR`o~~zuog_WOJGGILOSVZ^cgjkkjihghjlnqtx}zupkfb^\YVUTUW^fnvzzumd\XX\dmu}pbYUW]fnuy}zsmifdddefimsx~Ĵ~unjls~}zz|~ӿ]]]`gmtz~vld`cn~~m_WRONMKIFDA?>>@BDGIJJIHIKQZeq}~zvpi`XQKHHIKNQTZ`flpqpmjfddegjmqv}}wqkfa\YVSQPQT[dmuz{vne]YY^enx~ueWNLQ\hu~~|yvroljihggikotzμvnklt}zz{~~}òȱ̾}[[[_elsywngeiuo`VQNMLKHD?;8668FLQTVX[^cipx{wsng`YSOLKKLNQU[ckswyvqkfcbdgkpty}wpic_[YWVVXZ_elrvwuqlhefimrw}|vrqrtx|vk`WRSZes}xuqmjgeefilortvxz|~¯~volnu|zz}yttyʺ̶ͿŽaaadinsx~~zusszƺ{i]UPMJF@90(! &0P`jqvy|~{uqnmptx|~~{wrmieb_[YWVTTTUW[bjs{}wpieeipw~~{yz||vqmklmprssqnkhhinv}~wqmnt|xqkgca``adhloqtwz{|zvpid``chouzysme]VPNPYes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ic^[Z[ajt}}vqmnrw~}qf^YVUVWZ]ahntxzyvspnnoruxzzyxvtstvx{~~~ȿ´}{{|ð~z}Ƚ¾ǺdddaZTNHB;8778:=AGMT\ep}sliiknt|ztoljiijmpu}p`USXamw~}wmaVNIGFGHIIHHHHHGEB??BKZno^PFCFNXbinpqqqpoliebbfoz~tlhghimqwvoic_\[\bjt|zsnjkou|~qe\WTSTUX[ahpv{|zvrmjjlptx{|{xusrrtwz~zy~ķɽ}|{|~ð}y}÷ºµeeec^YTOKCA@@ABDFHKOT\fs}xvvx|}wqmigfffhkpyrcZX^hutg[QLIHHHHHGFEEEFFGHKPXeu{nbWPNQX`hnqqpnkihfdbabekt}~vmgefgjosy~tnieb``aekrx|}{vqljjnsz}obXSPPQSWZ`hpw|}{wrmjjmqvz}}{xspnoquz|utyɾ~|{|~zuyƽżŹfffea^ZWSNMMMNNNMKJJLQ[hu}wsru~~xsmifcbaabdiq|tha`gr|naVPMKJJJIHFEDEHLQW^elt~~zunhc__bgmsvvtpkfb`_^^_`bfjosvvsniebbdglqv|yqlihgghhjmpsuutqnlklorw{{l^SNLLNRVZ`hpw|}|xsollosx}|vqlijnszwpot|ż~|{|~;ups|}|~ȾĽhhhgeb`^\[[\\\\ZUOIEDGP\ivzskecemx|wrmhda_\[ZZ\ais~vnijq}ug\UROONNLJHFFGKS]is|}xurqpoooooopqrsvy|}wph`ZWWXZ\^^______^]\\\_chntz}unkjkmoqqqponmmmmmmnoqsuwz}yiZNIGILQUZ`gov{}{xtqoorw{|unhdejr{~sljow½~|{|~ʻ}oknw|vsrstvy}¼iiiihggfehhijjhe]TJB>?GR_kuz}~|yriaZVW^hs|xtplgc_\YWUTTUYajt}~xsqs{|mb[WTSSRQNKIHJP[jzzupjeb_^^^_aejpw}{pe[SPPSVZ\[YUQMKJKMPTX]ciqw}xqljlotxzzwsnjgfgjmprtttttux~veUJDDFKPUZ`houz|{yvsqruy~|tleabhq|{ohfks~¾|{|~}~Ʒzlhks~xqligfginu}~|}ĽjjjkklmmnqrsttrmdXLA;;AKWblquwxxvslcYQMNS\fq{{wusqnkgb^YVTRPOOQU[dmu||zww{qf_[YXXXVSOLKMUcuxqjd^YVSRRSUY^gq}}pcWNJKOSXZYUNGA==?DJPV\dls{ztnkknsy~|vohdceiotwyxvtssuzraQFAAEJPW\bhouy|{ywtstw{}uleacir}xmedhpzý|{|~}yvvxõzlhjr|ÿwoic_]\^dlu}~zy{~½mmmnnopqruvxyywqh\OD=<@HS]ejnqssspi`VNJJOW`kt|~xsqonlhc^YTPNMMMNQUZbiqwz{{{z|rhb^]]^^\YTQOQYh{xphb\WTRQQRTX^gr~~pbULHIMRWZYTMF?;;>CJQX_gow~}xsommqw}yqjfehmsy}}{xutuy{l]ND@AEKRY^djqvz||yvtrsvz~wpjfhmvwldcgnwý|z{}zuqory~rnou}½yqic^ZY[`ir{qqqqqqqqqvwxyywrj_TKDBEJQY_cgkoqqoiaYQMMQX`iqx{wtqokgaZSMHGGILPTX]chnrvxz{}}ridccdffea\WUV]lvoid`\ZYXYZ]bjs}qbULHIMSY\\XRLGCDGKQX_elt|~{xusrsv{~wqnnqv|}zz{}zpdWKC@BGNU\bgnty|~|yurppsw||wsqrv|vlecfls{þzyz}yrljmuzz}wpic_]^ckt}½ľuuuutsrqptuvvvtqkc[TOMMOSVZ]bgloqple^XTTW\cjqv|{vrmg^ULE@?AFMTZ^beiloruy|ypjggilopoke_\\cq|wrnkigfffgjntzqcWMJKOU[_`^[WTRSVY^chmt{}{zyyyz|{z{~~|yvrldZPHBADJRZaflrw|}ytollosx}wmgefjou{ywx|xoifhq~yrlgefjqyƿzzzywusqoqqqrrqokgc^[YWVUUVY]ciorrpke`]]_chmquy}}vog]QF=77:7770+),3>JV`gmqtvxxwuronnortwyzxvtstxxvz~pcZVVY^cgiijjjjlnqtvxyyyxwvuuuuttsqnljkovwqpt{ì~zxwxz|~ĸѹ~̾Ŀĺļffffeeeddehmrvz|}}}}|zxurokifc`][XUQMKJLQW^eknrtvvuqj`VMFDGKRX\]]\ZXURNIC@?CMZht||wmaVMJLPUZ\\YTOJD?92,('+5CSbnw}}|||}yqib[TMF=4+%"$+5BNX`fkorttrokhffimrwzzxtpmmq|zpmqyufXOLOV_gnqsrrqqqsuwyzzyxvutstvwxyxuqnkjmt}|smms{ư~{yxxxz{}ķӸ~yz}¾¼ƿ____```aacglqvy|}}}}|zxvspmjhec`]ZVRNKJKOU[agjnqtutpi^SIB@BGMSXYYXVSQOLHDBBENYepwwrh]SKHIMQUXXVRNJFA<5/++/9FUcpx~}||||}~umf`ZUOH?6-&"#*3?JT\bgloqrplgcabflrx{|xrlhfkuvlimu~~paTKJNVakswxxvutuvxz{||zxvtssuwz|}}zupmkms|xnijq|Dz}{yxxxy|õԹù{{~ʽWWWWYZ[]^aejotxz||||{zxuromkihhfeb^YTPNNPSX\adhmpssph^SIB?BGNTYZYWTPNKIFDBCFMV_glmh`WOIGHKORUUUSQOMJFA<99=FR_kv~}}}xohc_[XSNF=4.**/6@IRX^dimopnjea_afmu{zrib_blztkhlrzznbVONS[fpw{|{ywvvwy{}~~|zwutuwz~~zuqnpu}}rhcen|ò|zxwxy|ʿѼ|yxy~úſNNNORTVX[^bglquwyz{{zywtpmkjklnoomic]XTRRSTWY\aglprpi_TJDBEKRY^^\XSNJHFDCCCEJPV[__\VPKGFGIMPSUVWWXXWURPNNRYcmw|z{xogb_^]\YUOH@:658=CJPU[`fjmnlhd`_agoy}rg]WXan}|rkilqw}~xne\WV[clu|~}zxvvxz|~~|ywvwy}zvstxxla\_k|ɽþ}zyxxz}¹̿~zvrpprwƾ½FFFGKNQTW[`dinqtvxyyyxurnkiilpuy{yuoha[XUSQQRTY`gmpoi`VMGFJQX_dd`ZSLGDCBBCCDGILOPQOLIGEFGILORTX[_bdffeedfiou}yx{zske_]\]_``^YTNHECDFIMPTY^chklkgc`_bis}rdWOOVbo|xqmkmquy{zvpid`aelsz~zwuuwz}~|zyz}{yy|tf[VZh|½¾~{yxxz~þ|xurolihilqyĻ¿>>>@DHLPTX]afjnqsuvwwvsokhfhls{yqib\WRNKJLQYbjnnibYQLKOV^eiid\TKEB@@ABCCCCCDDDDDDEEGHJLNQUZ_ekosuvwxz}wv{}||{zyxvusqnie`[XXY]`dfec_[WSRQPPQRTX]bgjkjgca`ckvrbSIGLVamuyywtqooprtvwvtqnkjkoty~~zvttwz~}|~~~paVQVf~½|yxy{Ǿyuqmjgecbdgmt}û5558=BGLQVZ_cgknprstutqlhedflt~wnf_YRKGDEKT]fklic[UPPT[bhlje]TKD@??ABBBA?=<<<=@BEGIJKLNPU[biqw|}uu{|xvtrpnkifda_\YVTSTW\afijjheb_^\ZXWWX[_cgjkjgdbbelwq`PEBELV_gknopqqrssttttsrqqqruy~}yustw{~o`TOVg¾|yxxz~Ϳ~xsnkheba`bejrzɽ2224:?DIOSX]aeiknpqrrqnjfbadjs}wnf_XPIC@AGOXagigc]XUUX]cgihc[SKEA@@AABA@><::;=AEHKMNNNNPTZbjqx}zssyzuqomkifc_\XVTRQPPPRV[afjklkjigfdca___adgikljgeccelu}n^PEABGMTZ_chmqtuvuutssrrrrsuw{}yustx}~pbWSYkø}ywvx|ǵ}yuqnjgdccfkqy˾3336:?DINQV[_dgjlmnnnmjfc`_bhpy{skc\UNGA>?CKS[acca_\ZZ\^acca^XRMHECBAA@@??>>?ADHMQTUUSQPQSY_gnty{}vqqwxpkhfedb_[WRNKJIJKMPRVZ^bfhjklmmnnnnnnnnnoonnligedfkry~~vk^RIECCEHLPW`iqwz{zxvtssrrrrsvy}|xtsuzuh_\ctɿ~yustxϽ~ytoljknszʾ½5557;@DHMNSY^bfhjjjjihfc`^]_dkry}|ysld]XQKE@>>AGMTY\^`aaaa`_^\ZXVTROMKHEB@?>?ACFHKOTX\^_]ZVSRSW\bhmpqrrrtvy}~wroot{ukc^]\]]\YUOIDA@AEHMPSVX[]`behkoqtw{~}yvspnkihggimpstrmf^WPLGB><=AJWer{}yvusrppoprvy|~}zvttw}{rjioĿþ~xronr{ƶxtrtw|ǽƽ6668<@DHKLQW\aeghgfedca_][[\`ekorqnic]WRMHC?==?CHMQUZ^cfhgd_ZTPNNOQRRQMHC?==@DINSW\aehjifa[VSRTX]adfedcbbdhnty~~|zxvtrommnqv{ypf\UQQRTVWTOIB<88;AGMRUVWWWY\`ejouz}xtqnlkihgggffdca_\XSKB81/3>Oas}zwtromklnqux{{zwustxü|ww}wojilu{{|¼¾ȼ8889=@DGJKPV[`dffeca`^][YXXY[_bfgfd`[VQMIEA>==>@CGKOV]ejnmg_VMGEFKPTWVRKD?;<@GOW^chlpstrng`YTRRTWZ[[YWTQQSX_gnsutqmjgffghjklnqsttqjaXOHFFIMPQPKD<6337>GNUWXVTSSV[ahow~|vsqomkhea^[XXY\^`_[PC5*%(6I_t|yuqmjhgilptwxwtrrsyøźƾvmgdgp~Ƽƹ999;>ACFIKPU[_cddc`^\[YWVUTUVX[]^][XTPMJFC?=;;<>@DHMT^gnrpi^RG?=@FNUYYTME>:;AJT]fkpuxzzxskc[TQPQSTUSPLIFEGMU^fkmlhc_\\^adhjllmlkie^ULD?<>BFJLKG@93017?HPWZYWTQQSX_gow~xurqomic]WRNNQW]bc_TD4' $2G_u}zupkgedfimpsutrpprxźȾŻvmfben{̾¾::::84226;AHOU\dlqtqh[M@747>FNSTPJD><=CLV`hmquwxxuph`XRNMNOPPOLHDBADJR\dknnljgeegikmnmkieb]XRJC<7557;>@A@?=<=?DKQX]__^\ZZ\_chnsy|xusqolgaYRKGFINUZ][SH=404ASfy~yuqmiecbdfjmoomjgfgnzȻ÷yqkhksƺ~»ż:::524:AGLMKGB?>@EMV^eimoqqpnib[TOLLLNPPPNKHFFIOW`hosuvvvvvuutsrolhd_ZUOHA;6434579;>ADGKNRVZ^acdddddefhjlnpsvy|~~}|zxvtrpnjf`YRLGFGJNQSSPLGDDHR_n{ytqmjgedcdfikllid`]^dqľ{uporzº~yz¿:::=CIOTZ_aa`__^^^]\ZWQJC<867:>BEGILNNNJC9/&"$-:HWbinqrrpkbVI=5126;@DEECA@@BGNU[adfhiigea\VPLJJLNPQRPOMLMPV]fnuz~zvqmhc^YSMGA<8531113761/038=ADHKNPPLD8," +;N_lsvvuqlg^SG<40026:=????@ADHNSX]_aaaa`^ZVQMJIJKNPRSSRQQSW\dlt{xrmgb\WRMHC?;851/./3FMU]djjgc_\[[\]]\WPF;2,*+/5;@CHLPRROF9-#!-?Sft{|zuohbYOD;40/1379;<=>@ADHMRVZ\]]]\[YWSOLJIJKNPRSTTTUW[ahpxxqke_ZUQMIFC@=940-.3>L[jtyzvrmklou{|vnf_XPG?857>IVajnonlheb^YUPLIEA>=?DN\jx~{wrmiecbbbcddfhijkic\UPOS_ptjc^YVTUY`kwúè˼Ǿxqtľypmr{:::>FNV^fmkhc^ZXY[\]\WPE:1*(*/53*&)5GZly~~zskd]TKA93//148:<<==>?BFKPUX[\]]]\ZXUQNLKKLMOPQRSTUX\cjrz~tmga\WSOMLJIGE@:5227AP`ny~}ysnkkpv}xof]UMC:4029DQ]fklljgda]XSNJHEB@@CIUeu|xtojgca````abdgjlmlha[WUZds}pf_YTQOPS\gtؿ~|ź̼ĺº{vzüulimv:::>FNU]emkga\WVWY[]\XPF;2,*-3:AGKORUWWUPH@:8;FTdr|}woe]VNE=61/049=AB@><:9;@FMSX\^`aaa`^[XURQONMMMNNOPSV[bjs{tkd_ZVSQOOQRTTRMGA<;?HTbox|{vpkhinu}ypf]VNF?978>FQZbfhhhfda\VOIFDCDFIOWcs{vqmifca_]]]]_bfkorsqmjggjs~}qga\XUSTW_it~ѽÿͽ}}ujhlt:::>EMU\dkie_YUSTWZ\\YRH>5/.29AIPTWYZZ[ZXURPPS[eoy~~zrh^UMF?83//39@FJJGA:4138@IQY^begijiheb^[XUQNKIIIJLOSX`is|zpg_YURPOOPSW\acb^XQKHJPYdmtvtpjfcejr{zpg_YSNJFEEHMSY^`bdeec`ZRJC??BGOW_iu{uplifca^[YXXZ_elsy|}~}}~umgca___bgow~ʻϾ~ywx|úȾvlilt~:::>ELT[cigb\VQPRUY\\ZSJA9448@IRZ]___^^_acegjmqv{~|uk`VLE>830./5>HPUTND9/)*09EPZ`fkoqssrolhd_ZTNIEDCDGJNT]gr|}xqi`XRNKJJKMPV^gnsspib[WVY_eknomid`^`foxyqha]ZXWVVUVVWXY[]_bcc`YOF=9;BLYfr|ztoligda]YUSRU[dnx{uqnmmnopsw{»ºxsprx˻ƻxnknu:::>ELSZafd_YSONPSW[\ZUMD=9:@HR[bffecaachnu|zqfZNE>83/-.08CNX^\TG8+##*5BP[cjpvy|}{yupke^VNFA?>?BFJQZfr|{tmg`YQKFCBBDGKPYdoyyrjeccegijjgc_[Z]ckt}~xphc``acefeb_[XVVX\_bc`XNC:69CRduyrnkigeb]WRNMQYcp|~|{{}~ýü}tmjlt¿Ҽø¾{qnqw:::=DKRY`da\VPLKMQUY[ZUOHB?@FOXahkjhebbelvwmaUI?830.-.2;GS]baWI8*!!(4BQ]fnu{~ztnh`VLD=::;>BHNXeq|{ria[TMFA=<;=?CHOZgt}vpmlkkkjhea]ZY[`hqx}~{unhdcdhloqpke^XTSUY^bcaYNC:6;GYnxqmjigea\UOKJNWcrþ¿ƽñ|qiegqýּ~tqsy===@GMSY_b_ZTNJIKNSVYXUPKGEFLS[cilkhdaaelw~vl_RF=620//15=HS\a_WI:-%%,8FT`hpw}~yslf]SIA;8799778:<>@CGIKKIEB??AHPZckpuz}}xph_XQJD>96457:?ELVcozxoe]WRMHEB?=;::=<>@CGKOTY`flqtwz{|zwpf\RJD?:753457;?ELVboyyph`[WSOKHEA=:88;AIS]elrw|xqjd^YVTTVX[]^^]]\\\\]]^_`abdegijkmosxukfdegijifc`\YWSOLKMR]l|~ørbZ[i}ĵ¿~YYYYZZ[[\XUQLHDCAAABDHMT[aefea]XUSQPPOOPPPPRTW^fntwuodYNEBACFIJID>82028ALV_ejmpstvwxyxupg]QG>8421123584-),5BQ`kruwwvuuuuuspjaVJ>60.--.036;@EKR[dnv|~|wqkea^\YVSOIB;52247=CJR\fr}}pbTI@=?EMTYZYUQMKLOTY^cefffgimt}s`OB>AHR\cec`[WTRPNMMPVap~oaXV[cnzſ½¶wdZ[iò¾½hhhgeca_^ZUPKGCA?>>?ADKT]ejjf_WOIFFFGIIIFC@>>BIT_ipqmf]UOLMORUURKA6.*-7FVfrxzyvspoooonkf]RG<4/,++-/28>EMTZahntwxvsnhda^\ZWTPJC<621247=CKUamz~p`PC969@IRYZYUQMJKMQV[_bcddfinwzhVE:6:CNX`cb_ZVSQOMLLOU`o~zj[RQV`lz¼¼yg]^lǵþqqqpmkhfc_ZSMHCA?>?@BFLS[beeaZRJDBBCEGHHEB><746@N]lvzyuoiecceggfc\SI@840-,,.2:DOYbglnpqqpnkgd`][YWUROIC=7421237414=GRY\[XTPNMNPRTWY[]`chnxwj[L@75:BMW^aa^[WTROMKJLQ]kzyj]TSYco}ſÿ{jacpȹý{{{yvsplif`XPIDA@@ACFIMRX\^^YSKD?=>@CFHHFC?=:7431125:9;>BFIIHEB??@EKQX]acefgghgfedb`]ZVSSU[dmtxwodWLDADJQX\][XTOKF@81-,2@Sgyti`\YXWVVTSQOMKIFC@=;8630/16?LYfqy}tgVE6-+0:GS\abba_\YTNHC@AELS\dmyraRID@>=>@DJQX\__^][XVQLGCCHR`p}}sjefluºtoq}ſ½¿¾~}}~yutk`ULEAADGKNOPPPOMKGB=9668536>GPWZ[[YWTPH>5.-3CZrueXRONOPPONLJIGFEDBA@>;63005=HUakqvy{}}~~~}{wobRB4+)/:GT^cfggeb^VLB:56;CNYdmyxbM>646:@EHLPUY\]^^]\ZXRLFA@DN[jwytqsyʼzwz»¼¿½}{{{|}{wmbVLEABEINQQPNLIFC@;74236;@EIKJHECBCEGJNRV\binrsrokgddegjmoprsttqk`QB5,*.6@JRVY[\\ZVNC80.5F_yuaRJGGHJLKJHFEDCDEFFFEB=9558?IU_hmopppopqssspj^O@3*)0;HU_ehjjhe`WJ=3,-3>KYenznV@0*+1:DLPSVXYZ[\]]\[YSMFB@CLWeq{}}ŵǼĿ~|{zzz{{|}}~~yuk`UKDABEJORRPMIEA>;7310149?EIJIGEBAACEHKOSY`flprplhdaadimruuutqnicXL?4,*-4=FMQUX[\[XPF;317Ib|r]MEBBDGIHGECBAACFJMNNLHDA@CIR[dknonljihiklmkeZM>2+*1CGIHEB@>?@CFIMQV\afijhd_[YZ_emswwtohb[UNF?95459>CHKORVXXVPG>75=?CIOUY[[ZXWWZ^ekquvurnjfeefffd_VJ>3-.4?LYbfhgea]WMA4*%(1@QaoxucP?405>JU^aa`]ZWVVWXXXWUROLLMPU[agnu~ʹĶ¿ÿ~~|zxwwy|~ytokfd]UMFA?ADIMOOLGB=8520.--.27=BFGFC?<;;>AEIMPTW[]__\XSPNPW`iqvuof[QIDBBBCCCCBBBCDGKORSSNG@<;AOauyfUG@>?BEGGD@=::=CKU^eknprtuwz~~ysmhdbba`]YQG=6129DP[cffc^YSMD9/(%)4EXjx|vl`SHA@ENYcjlje`ZVSSSSTTUUUVVWWVUTUY`kzŹzvvzǺſ~|}{wtux}vvvsojea\YSMGB?>@DHLMMID?9520.,,,.27FNTURMGA>=?BFJMMKGDAAFQ`o{{n_PE@>@BEGFC>:77;CN[hr{yqjea_\ZWRLE>968>IT^dfc^VOHB:2+&%+9Lat}unid^XTQSXajrwwrkcZTPONNOQRUY]acb]VOKKRbwȶ÷umijrɾ¼|{}|vssxkkkhd`[WRMIEB?==?CGJLKGB=730.-,,-/27<@CDA>96458=CIMNNMKIGEB>:88BEIJIFA<620.--./048<@BB@<74226<852015?M[flj^L8'(:Oanpi]N@51149>BDFHJLNQV\bfhgb[RJD@@@BCDC@;75661,)''+4DYoqbXUW\dkrw}seYOIFEEGINU`jswvl]NB>FZwʰžvh^Y]j}¿û½¹|{xsszUUUSPLIFB><:988:KXcig[I6%(;Qdqsl^N>3..15;?CFJMPSVY[^__]ZTNIDB@@?@@?<977:AN^p½xog`ZTOKHFDBBCEJQY_a`YPE;3.+))+09I]s}l\RPT]it}sdVLFBAACGLU`lv}|sdUIEMa~üжɾwj`\`m»Ľľ¼}|zuv|JJJIGECA?:876557;?DIKLIEA<9766789:;=?@A@=:6300269=?@@><:97642238@KW`ecYJ:,#$/@Sdoph[L=2--/49>BGLQVY[[[ZXVURPMJGDA>;987779==<;76432248>DJMNMJFC@?>?@ABBBBBA@?<963100135678899:::999;>EMV]`_XMA712:GUaiibVH:1--/49>BHOU[_`^[VRNLLLLLKIC=61..15FRbqp`RJKUdv|m\MB;879<96420/.---.0369<>?@ABDFJPUY[[WQKEBBGOW]a_YNC81..049>CJRZ`dea[SLGEFILOPME;1($%+4?LXdr|vqkgc_\YWUSQPONNMNOOPOMJEA<:9:DNZfr|ĿDz¿ι)))*,.024420-++.4;CKQTTSQONNOPRSSQOLHDA><:8642/,)&%'*/4:>BDFHJLMPRTUWWWUTSRRTVXYXUOG>61//25:>DKT]dhhcZPGA?AFLQSPG:-"&3CTco}wlggimqssqnkgdb`^\ZXWUTSRQONMLJIGEB@>>?ADHLQW^gpwzyqfYOJN[nrbQC82/027=CMXdp{¾˸˴þ|zyyz|ý #'*-121.+)),2:BJQTUUTRRRSUWXYWTPKFB@><;:861,'#!"&,3:@DGJMOQRRSRRSTVY\^__]ZWTPLF@:510136;?ELV_fkjdZND=;>DKQTPG9+%5GZjwucVPQU[afhhgfecba_^\[YXWUTRQNKIFDCA@??@CFKPV[`fmswyxpfZRNR`syk\M?5/-/27=DMXdp|ͽȰÿ~~zwuttuw{ú #'+/0/-*('*08@HNRSSRQQRTVY[[ZWSNIECBAA@?<71*%"#&,29?CGJMOQRRQQPPRV[`dfea\UNID?;7421248;@EMV^fjibYMC<9>?@DIPX_fkqv{~~wlbYVZfx|qdVI=40/04:AHQ\ht˾ƮĿſ}{}yurppprv|ƽ!$'+./.,)'').5=DJMNMLLLMPSWZ\\ZVRNKIIJJJIFA:2,('*.38=ADGIKMNONNNOQV\afhfaYPF?:742112358;?DKSZadd^VMD=:GQX]`dfhihfb^ZWUTTTTSQNKGDA?=<;;>BJT_isz}rjegq|pf[PE<6335:?FNWbn{žĮ¿~zvrommosyȿ !#%(*-.-+)'&(,29>CFFEDCCEINSX[]\ZWTSRSTVVVSME>61//148;=?ACEGHIJKLNQV\bfhf^TH=4/--./12469<<<<<;963238@JUajrzweQ?3.18AKTZ_ejmonje^XSPPPQRRPNKGDA?<9779?IWftyy~zmaXPHB<989><;::?ACFHKMQV\bfgcZNA4*&%'*-1357::520025:>CHNT[afkpuz|{uhXF6+(+3=HQX_gmsutog^UNKJKMOPOMKHEC@<8435==>AEJPW_iu·|yz~Ƴù}wqmjkpv~%%%%&'(*+,+*)''(*-14676421149@HPVZ\]^_`behlnolg_WOGB>;975444568:=AEJNRW]beeaWJ;.$ #(-258:8313;J]sƽugZMC=;:DJOSX^bed`VH9,"#)059FLQUXZ\_cipv{~}xriaYRKD=72/-++,.16=DKQV[`dfeaXK=1($%*06<@CGJMOPPONMLMORUVVRJ>3)$%-:IVaefd`\YXXZ[[YTK?3)""&/9DNV_hpvywpeYMD@?@BEHIJKMMMLHB=:;DSh~Ļ{rh\OC80-/3:AHOU\cks}ɹ|rifjwzmjmu|vssw~żɰuklyø¿{usv|xqllpv}Ľ///.,*(&$#$&(*,./123320-)'&',18?EILNQSW\clu|~xph`XPG?71,*(((+.4>?ACDHLPSVVSOKHIP^o~vmd\QE;2,*,29AJQZcluɾ|sjdbgu{okow|xvw{ȱþvkkwzx||tonqv}~~|}ƿ3332.+'$  #(,0246787630+(&')-27;?ABDFJPZeq|~wnf_UK@7/*'%$%(,3=GQY_cgikkie_XRNLLMORUX^djptutqmifdddddc_YQIB==@FLSWYXVSPNNORUWWTLB8/**/7AKSY]adffd`YRKEB?=<;JU^dhkmmnnmkigfedcbbcgmt|zvsqomlifa\WSOMLMNOOONLJIHILPTWXVPG>6115=GPWZ\]\[YXURNJGD@<866:BLWbkpqqpopsz|voic]XTOKFB<5/+()-3:CLVbp~}qjebabfn|vsv~Ŀµ}sr{|vtuy}{xx{{|~}yvv|ü<<<92,& '07;>@AAA?<72-)'&&'()****,08EUetxqi_RE9/)%"!"%*3?LYcimoopprtvxz{{yvrppsy|yuroljgec`]YTPLHFDCCCDFJOTXZYTLD<88=DLTY[[XUQNLKKKJIFB<6226?LZhsz~zrke_ZTPKGDA?=:840-**,0594/*(&$####"!"#(0=M_o{{uncVI<2,'$"#&+5AO\fmpqqqrtx}~zy{{vsqppqqokd\SKDA?>>@ADHMSXZZVPIC??CIPVZ[XTNIFDDFHJJHC<6104>L[jwwmbYRMHD@=:8654320.-,-04:AIR]kzȼ˻saXVY^fnw}z}ǶɾͿ½|z|yy|{vsru}}z{yurrwľAAA=5-%&/6;>@ABA@=83/+(%#"! !&-9HXgry}~~{wqh[NB82-)'').7CQ]hnqrrqruy~|{}|xustvyzyumcXNFA?>>@ACGLQUXXVRMHFFHLQUXWTPJEBABDGIJID>7215>KYgt|xl`WPJFCA>;975321100136;AHPYcp~ƽ}||Ǹq`XVY`gpx}{ȷ˾;}|}{{}|xtsv}}{}~ytqqvľ>>>:4-' $+258;<==<962-*'%#"! !!!#%)09DP[ekquxyxumcXMC=73/./2;FR^gmpqrrrtwz|}{yxz~|ywuux|wlaVMGDCBCDEGJNQSTSRPNMLMNOPQPMJGDBBCEGIJIE@;769@IT_iqyxlb\WTRPMJGC?<987789<@FLT\emwyttvy}}zwvw}tf_^`djqw|{ŷ²|{}{||yxy~~ytqqvý;;;83-(#"'+.03567642/,)'&$###$%'*-15;@GMSYahpuxxslcZRLF@;769?HS]eknpqqrrrqqpoooppqqrtvy{|||{zyxwvutttvzvk_VQMJIHHHHIJKLMOQRTTTROLIGFEEEEEEFGHHIHFCA?>@CGLRY`ir|wqmkjifb]VPJFCBBCEHLSZcksyzpigjov}ztpnrzypkjjlorw~{zƶĻ|zz~|{|~~ytqrx88862-)%!"$%(*,.///-+*(''&%%&(+/37:====>AFOZfpxzxtmg`[TMGB?@DLT\chknoppolhc^[[\_cfhihgecbbbdefhiklmoru{uja[WTQOMKIHFFFGKPUZ\[WPIB=;DKQVZ^bfkpx{sniea]YUPJEB@BIR\dig_SF:203:BJPRRPMJIILPTWXVNC8/+/9GYk|Ļvlfddfimqx}ske`\XUROLJHGINXer~vj_WSRSVZ^cjs}yustwy|~~|yvssv|ÿǸ¶þ~}xniikosx{~~z{{xvw~0000/.,+*)&#  "#%')+,-./149>DHJHA6+"",636BEFC=3)!!*8GVbilmmljigda^]]_behihe`[VQNLIHFEDDEEEDB>82-+-3?BFJMOPPPPQSVZ^``\RE7,(,8Kavƽymhhkqw|~~vmc\VPKGDCBDFJNSW]djorrmg_WQNLLLNQU\eow}~{vronoqsuwwurpnnqx{zz{~»ø~}~~|zz|....----,/.,)'%#!"%)-/135679;<>??<70)#!#+5AMV[^^^]\]^_abcehloqpmf[QG@>@EKPTSPKE?:730-,-19COZaeda]YWY]dkqvy{|{{zyxvtrpnjfc`^^aeimonjd]WQNLJIIIJLORUXZ]`bcb^TG:0,1@Umÿthceks{~{wsnga[UQMIFDCEIOV]beffedca^ZWSQOONOPRUY_djmoomkihiknruvwuqnlkou~|vsrtw|ÿ´Ļ}|||}~~~~~}}}}|||},,,,----.110/.,*'#!&+/2579:;;;;:8752.*'&(-4=<96410/.--./158<>??><<=AIR\emsx}}vfQ<)*>Thtul\I6)##%*18@LYgsz{ti\PGCDGLQV[`flrvz|}~~}|ywtrpoprtutph]RHBAFNW`gjkkigd`WLB;:BTmwg\Y_jwwj^TNLKKLLLKIHIKPYfr}yk\MC?@CIOSVWXYYYYWURPOPRTW[_bgmrvyyvqlgfipyúznihkpw~ʽľĿ~volllnqrsstttuwy|****+,./035789972+$#*06:<>@AA@>:620//13466666554310027ALYeov|weM5 $ABCDCCA>:75569;=>><952/.,***-3=JWdnuz~|saI1";XqwcL6&!$+5AKT_lwxhWG;657;@FKQX`gmrvz|zvvy~yk\OGEKT`ktvvsojea[TNKLSdyyqjghoztg_^ep|qaQE?>?BFIJKKKMPV`m{zgS@2.2;FQY]^^][YXVSQONPRW[`eimrvy{zvpidadjs~̼rkkou}þöŻɿſvpllnpsvvutsrrtx}////.-+*)+.38;=;6.&'09@DFFFEEEDDCBBCEGJKKIE>71,)('(*-3GQZaehiigc]QA2% -@UhuwoaQB88?KYgrx}|vj[K<2-/3:BHKNPRTWZ]aeinsz}tja\[`gpx~~{vpieba`abdhnv{voh`[XY_is}}{{~}rfZQLIHHIJKKLMNPSX^cgif]QC8107BNZbda[SMJLS\grz{ungb_aemvʸĽľµƼ»zwx{~}}~~88851-)$ !(08<<70' %/;FORROKHGIMT[bgjmnnmjdZM@3*&&(,16:@GNTXZ[[YWSOG>5-*,6DSajmh^SJEGQ_o}}umaRD7.,.5=FLOONLJJLORW\ahpz|wqlijmsy}wpidcdgkorssssrqqqqqpolg`ZURSX`iry~{skc\WSQONMLMMOPQRSTTTSQKD<746>IU`hicYNFBFRcv{umga^_ciqzĺĿķοȿ|zyz}{z|<<<93-'!#,5;<70(! (3@KTXWSNJILS]hqy}~|wocTD6+&&*/6;?CGKNPQPNKHEC@<9779?HQY_a_[VRRWbqxmcWJ>4-,08BKRTQMHC@@BFJPV]gr~~{ywvvwz~xphdcgmt{~}xpg_YWX[_bdc`ZUPNOSX_gnu}~ytpkgc_[WTQPPQRSSROLHEB@=;98:>GR^hnnfYLA=CTk{sle`]^aelu~ǹù¹п{yxyyzyyz}Żxspoopsw~~{}@@@<5-&)39;70)""*6BNW[ZWRNMQZer}~vhXG7,'(,29?BEGIKKKHEB><<<=?ACFHLORUWXWWY\cordYOD;4//4=GQWXTNF?;::889;>BHQ\gqvul]NB=DXsƾyqjc^\\^bhoxʾùüıvmihiknoqsvztkfddehlqx~||}~{}@@@<5-&(18960)$"$,6BMVZ[YVTUYbmy~ugWG8-().4;ADFHJJJJGC?<:;=BFKNPPONMMOQTX]cjvyh[QHA;756;DMV[\XQIB=<=@EJPW_is||zz}|riddkvraPD?@ELRWXVSOKIJKMPU[co}|xwwwxwuqmhd`^^_```]XQKEA?@BEINT]gr{~ufWKFM`{º}umf`[YY[^dkt~ɾ¿ĺʿǺ}md``adgjmqu{Ļwkb][[]`ejr|}zxvwz|xz<<<93-'!(/564/*&$'-5>GOTXZ[^afmw|ul`SE8/+,06EKRZaiou{~wof_UKA930148=ADHKORSTROLIHJPW_eig`UI?99?IUakquy{{ytk_RF>:?DO^n}zrkhghijjhfb_[ZYYZ[^ckxqfcgoz|hZVZcnz~}{{|++++,,--./.-+*))*,-/00.,))-6G\stkaUJ@832357:;;<<>@DJRZagjkjhggjqzvaJ6)'1ATeprk`QC7/("%3F[n||wstw{ufWI@=@HQ[chknprtvy{~slkq||ume^YUTUWXWTME=6127?HQY^acegjou|xl`WPKFCBBCGLSZbhpx|vpljkozûõzop|~}}{ytokhhmvzrke_ZUPIC=::>JYjy{qg`]]^aceda^ZWTSRRRUYao}l_\_fp{vcVRV_lx}{|..../011231/-+*)*+-/010-,,0:KawwkaVK@70,,.1489:;<>@ELT\djnonlklov{gQ>1/7FXhrsl`QC80*$ !)7J_r|vrrv|}paQC:7;BLV_dgikmoqtvy{umlr{~vnga^]^`aa]ULA9337?HQX]`bcehmszþui^UOJFDCBDGLQX^djqx~{vqmjikp{ſujlzų~|}{z{||zvrnkkox~tmga]XTOIB=99=HWgv~vkaZWWZ]`bb_\XTRQPOORV^m{h[WY_hr{sbVSWamy7777776656420-,+++,-./0125;DTh|{k^SJA81+(()+.13579<@FMV^gmqrqonnqwq_ODAGR_kssne[PGA;50./5AQcs}voklrzxpeXK@87;CMW_cefeeegilorv{vonrzztommnpqpkcWLB;:?GPYaeffeefjpx¹~tj`XRNKIGGHJMPUY^cjpv{}wsqpooqu{ÿƿsjl{˸|vtuwy{{xurppt{ypic_[WTPJE?<<@JWfs|~zrh^WUVY\`ba_[WSQPPPRUZbpyfXSTX`hpv~qd[Y^gr}AAA@?=<:9875310.-+*)*-05;BJTaq~m\ND<60,)&%%%'(+.26;@FNW`iossrponqw|pe][]biossqmid_[UOIEDGOZfqy|yrkeacku{pf^ULD=9:?HR\cfeb_[ZZ\_bgkqxvqpsx}sgZOGFKT^horqnjfegmt|º~vmd]XTRPONNNOPRTX\binsvwxxwwvtqomlnqtyŽsko~пvonpswzzyxwvvy~ule`]ZWUQMHDBBENYepxzvof^XVWZ]acc`\XTRRSUX\bjwxeVPORW]chnv~yogcchpzKKKJGDB?<:976542/+(&&*1;FQ\ep{p^L>5/,*)(&#!  "&,29@HPYbjpttspnnpu|}ywutssssuwy{{ytmf`[[^cinrqmf_YWZco}{l^RKE@=<EKRZbhlkf]SJC@?@CGKPXblu{~}yvtsrqqrtw|ypnt~ymebdhnu{zupligfeec`\WRMKJMQV[]]YSMHEEHLSZdo~ʮ||x|uhbadinsvy}{xvx}yofa^\[ZYXWVVVWY^cinrrpmhdbabdgijifb]ZY[_fnv~|k\SMHFDDEGJOTY_djqw~ǵccc`[VQLGB@>=<;94/+)*1>Pdv}scO;($)*'$$-6@IPX_flqssqnkjkmquz{uu}~wqlfa[UPLKNWcp{}q_J8*&(.7@IOU\bfhhd]UNHECAABEIQ[fpw{|zxusrqoooptzyw{znfbcfjpuz{wspljhhgfdb]XSOLKLORUWVRMGCACGMU^ivȬz~ÿ|¹qe`_bfkpsvz~zvrpqwynfa^]\\\[ZZYZ[]aflqtusplifefhjllkhc_[Z\ahqyrdZRLGDBBCGLRX^elt|̸ccca\XSOJFB?=:9753125CIOUZ^bfiklmligdcccegilpu|}~}ytplheb`_^`dgihdZM?3+*.7ALTXXWVTTV[bhmomdXK@:;CP_mw||yuqnmlllmot{}vniecbabcejou{}zvromnrw}|uokknsy~xsomkjhgfdca`^][YXVTRPMKIHHHIKNRW^fozȿ̾пÿ~tkd`^_bdghjlnpqqoljhhjqz|tmigeddcba_^^_bgov}}yvtssssrpke`\Z[`goxyndZQLKOU]fnty~˷ccca^[XURNG@:4225;BJR[er}~tiXC/ '06L]mx}}ytnkiijkmqu}~zwsokhd`][Z[^cinrsqnjfca_^]\]^aeilnnkf`[YY\`flquz~|uoifdddccb`^\ZYXYZ[[[XTNIDABEJQX`hpxͻ~įµ{tmhda__`abbcddeffedcceipyxqnkjihhfdb`_`cjs}|{zywurmga\Z[_emv~rf\UTXaku~dzcccb_]ZXURJB92/06@KVair{zpeTA- +5:768?HR[aa\RIA>DShw]F63;J\mz~}yrlgfghjmrw~zvsqqponkf`ZURQTY_dffb[UNIGGHJLNPRUWYZYWSOLJKMQV[`djpw{~~ztmfa^]]^__^\ZXVUUWZ^aa_YQH@<>DMWcnxŭwomrzԸ̿Ŵuojhfdb`__^^]]\[[[\\]^`choy{uqonmlkigda`adlw~{xuoic^\\`fmu}qe^\blxgdalautotest-3.1.2/alg/data/utmsmall_mode.tiff0000664000175000017500000000545213701057751020077 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{ksccssk{{ssck{{c{ss{sŌ΄{ss{ksskkcsZsZc{kk{{{s{νֽΔsssk{sccsskks{s{kcŔcs{{sccksccs{Ž֥{s{s{sJskssk{{{Rֵ{c{skk{{sk{{{c{{s{k{֔c{ckscZkss{ssέޥŔŌkkcss{sc{{{s{έ֜޵ޜccccksZ{ksεΌŜޥťεkkkkRcŵΥ挌ޔ{εޜΔ{{skkcc朥ťŜޔބZcsťΥΜ歜c攽{k{札{ΥΌs{Δޥ{Ž{޽νsνŌ֜޵ޭRŜބﵵ{{kc{֥kk{k{Ōքޭs{sk{sZքε֜k{{k挽޽ޭ{{sss{kk{s޽kskk{ks{{Ŝc{ޥŌk{{sk{s{k{k{ތޥŌΔޭcscsk{{ckk{s{s֜֔νJJRsRssֵckΜֽŔBkZcZkcks{{ss浵sZcZ:sRcZ{kkk{Žތ{έks1ZRBRcssc籠ZֽŜkŽ{J{BJRZJBks{ZBJ{Zsńsֵޭ楥c֜Žc:kR{{JBssZ{{{{֔έťŵZc{Rks)ckskR{Js{{sέ{cŵέ1kcckk:R{s{ZkZccsss֥΄c֜ޥﭵ:ZBR{1BZRsBk1cBccc{֜k浥ŌcBkJsRsk1JRJk:ckZRR֭ŵZֽť{Z:1BJR1RB:kB1R{J{ťŭޔs))){11c:J!Z!BJ:1Jkk֭k֔))JsRcRRsZkRZkJZ{Δ{s{֜޽ޔB:ZBkJcZZRcZJsZJBZ֭ﭵkcc:ssRs)k{s{ZcZk޽{cZskZZΔ)kcBR{sBc{{cskksRRcZZcc{k{kZZsJZRc!B)R:JkR{kRRkJ:ZkJskkksZc{ZRcBB{:kksckZJs{cBBZ:Zc޵sŜ{ssZJ:BJ)B:!!Z!!c)Z1ZJ1BBcccRsRcΜRkcsR{sJB1BR:{J1)BZ!ZB::BZck1)sB:JZc޽{s{RZJRRs{cRBB1s!JcJ:Z:RRBZ{Z{sJcJJJkRBBBR!c):ZR)sksZ1BJ!ތJksJcZsJJk{R{{ZcBs)kcRZ1))JRkB{JcRRZcs:1J1ZcJRkcscRZgdalautotest-3.1.2/alg/data/test_nearest_short.vrt0000664000175000017500000001060213701057751021030 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 2.0983170908647397e+04, 5.0109700347667203e+03, 0.0000000000000000e+00, 5.0175402506259708e+06, 0.0000000000000000e+00, -5.0109700347667203e+03 Alpha 512 128 6.71089e+07 NearestNeighbour Int16 ../tmp/test.tif 0.125 500000,5000,0,5000000,0,-5000 -100,0.0002,0,1000,0,-0.0002 20983.1709086474,5010.97003476672,0,5017540.250625971,0,-5010.97003476672 -4.187446894127006,0.000199562159235014,0,1001.311166463512,0,-0.000199562159235014 PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32630"]] PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 4 4 gdalautotest-3.1.2/alg/data/2by2.tif0000664000175000017500000000111713701057751015637 0ustar evenevenII*@:=S     13.5 8.5 3.5 4.7609522856952 -1.6999999999999999e+308??? P0a*+ @@gdalautotest-3.1.2/alg/data/utmsmall_mode_int32.vrt0000664000175000017500000000417613701057751021003 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Mode Int32 ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_average_float.tiff0000664000175000017500000002463613701057751021757 0ustar evenevenII*22 (S   2r @! 255 154.6212 0 54.250980733624 ^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|BBC CBBBBB CBBBBBBBBBBBBBBBBBBBBC0C&C C CC*C8C"C(CCKCCCGC@^CKClCfC^CMCCCBBBBBBBBBBBBBBBBBBBBBBBBCCCCBCVC;C@AC@EC@=C@;C-CC-CC@=CKClC`C@fCKC@ACCC"C@CCBBCCBBCBBBBBBBBBBBCBBCBCBB@CCC5C@;C5C@?CKCCB$C9C@C@CIC@bCRC`CnCCC;C@ C CCBBCBB@CBBBBBBBBBBCCCC@CC@C"C@CC@CIC@ACKC@`C(C@C@CC\C7CCC CC+C^CrCC}CUCXCCBBBBBBBBBBBBBBBBBBBCB C@C@C&CICXC@ECZCOCZChCpCnC CjCwCRCC@C C(CQCGC\C{C@dCrCXCBBBBBCCBBBBBBCCBBBCBBBCCC@CCCnCCCCCC@hC@ECCQC=CQCCCCC=C C@C@7C}ClC)C@CBBBCCBBB@CBBBBCBBC CBB"C&C(C@C@=C\CbC\CZC@fCvCCnCGC@;C"C@AC1CTC\CEC@=C(C8C(C5CCCGC$C CBBBBBBCBBBCCCBBBBCEC@GCB(C7C(C1C@?C=C@C3C0COCrC`C4C,C C@9CMCXC-COCrCWCEC C@3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3)+F_3(+Fkz߾$ei#?oW0pɥ*`'ap g%Ә |#_)<[`[x혱N0En00y@b`CP>BTX:d(4Y2< 3UskߗF9>v٩k[ S~5~&~Uz,z,%Yu 7G++[mQ㷾_'*/2x"rNX;vQH|)G}ގse1cM1c/u,9_cTM?^Yin6]ׅi}}8Z;oۻ}_`Ȭ7Ǐ?~Ky\'x헿΂0GGMGo@C;8AF1$r~)7ztI?~=eׯ?~ӯdYmď?U^UR[5uIaٌdz疈J:[w)CQTsTU9}~_񶿣sc ǰ}ӧOo9kI{uZm&U'1͇g+kj J& Kq#F߯)8X[ᖧž=-Z͢ja W&=9[ӡU eo8ӧO>}ӧPz` -x혱O@g:GMlp1 $%Biz%< Vxg˅./E@')_#YƒߦQvʱ'p@~_dV N?~OjA`'~F? '~Nv O|o6 JD^qU%"٫v͸-G(GԐ؟SU)UI8?,q>F1Im/asXijR|~-Ժ4|ֹ;P11>Wݖf?z?SQbv~Y_}7szt5gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_min.tif0000664000175000017500000000420113701057751021265 0ustar evenevenII*yS   Vr^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|-32767  &.6> &F66 .6& _O &.&... .6. &.&  &..& ..> FW>_.>>  &. O&& F& >FO> & &WW   .         >>OFF  &&   OW>&.FO &  6& &  __O  &&.FWW  &OF  F.__ .__O. & &&6 gW > & .>O.>  .. & 6F && .& W&   gdalautotest-3.1.2/alg/data/utmsmall_cubic_wt_float32.vrt0000664000175000017500000000412413701057751022162 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Cubic Float32 ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/polygonize_in.grd0000664000175000017500000000044213701057751017740 0ustar evenevenncols 5 nrows 7 xllcorner 440720.000000000000 yllcorner 3751020.000000000000 cellsize 60.000000000000 NODATA_value 132 107 123 132 115 132 115 132 132 123 123 115 132 140 132 123 148 132 123 123 123 156 156 156 140 132 156 100 156 101 102 156 156 156 103 103 gdalautotest-3.1.2/alg/data/utmsmall_cubicspline_short.vrt0000664000175000017500000000343013701057751022547 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 CubicSpline Int16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/test_bug_2365.vrt0000664000175000017500000000307313701057751017410 0ustar eveneven PROJCS["WGS 84 / UTM zone 48N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32648"]] 4.3866278499999997e+05, 4.9932686434108541e+02, 0.0000000000000000e+00, 1.2197200549999999e+06, 0.0000000000000000e+00, -4.9932686288848242e+02 Area BAND Gray ../../gcore/data/byte.tif 1 255 0 gdalautotest-3.1.2/alg/data/white_nodata.vrt0000664000175000017500000001042513701057751017562 0ustar eveneven PROJCS["WGS 84 / UTM zone 32N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32632"]] 2.7632427649497848e+04, 5.0134167725698410e+02, 0.0000000000000000e+00, 5.0175402506259708e+06, 0.0000000000000000e+00, -5.0134167725698410e+02 2.55000000000000E+02 512 128 6.71089e+07 NearestNeighbour Byte white_nodata.tif 0.125 500000,500,0,5000000,0,-500 -1000,0.002,0,10000,0,-0.002 27632.42764949785,501.3416772569841,0,5017540.250625971,0,-501.3416772569841 -55.11695696373088,0.001994647653215967,0,10008.22488582775,0,-0.001994647653215967 PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32631"]] PROJCS["WGS 84 / UTM zone 32N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32632"]] 255 0 255 0 gdalautotest-3.1.2/alg/data/contour_in.tif0000664000175000017500000000116213701057751017240 0ustar evenevenII* S %& +?AC@5)1A>DGEB#3<EGHJJJE #4<>FIJKJJEA(6CFHIKLJIC<6.>EJLLKJGC=80(8CHLPOOLF?7/(!FIKMNNLH@5+"GIJKJHE@6) HHHHEA;4( HFD?;50) EA;3,(# ?92*" gdalautotest-3.1.2/alg/data/cutline_blend.vrt0000664000175000017500000000444613701057751017731 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 5.9999999999999993e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -5.9999999999999993e+01 512 128 6.71089e+07 NearestNeighbour Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,59.99999999999999,0,3751320,0,-59.99999999999999 -7345.333333333334,0.01666666666666667,0,62522.00000000001,0,-0.01666666666666667 POLYGON((10 10,10 50,60 50, 10 10)) 5 gdalautotest-3.1.2/alg/data/utmsmall_near_float_with_alpha.vrt0000664000175000017500000000343713701057751023351 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 NearestNeighbour Float32 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_Q3.vrt0000664000175000017500000000447613701057751021034 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area -3.27670000000000E+04 Gray 30 30 6.71089e+07 Quartile3 Int16 utmsmall-int16-neg.tiff 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,120,0,3751320,0,-120 -3672.666666666667,0.008333333333333333,0,31261,0,-0.008333333333333333 -32767 0 -32767 0 gdalautotest-3.1.2/alg/data/utmsmall_ds_cubic.vrt0000664000175000017500000000341713701057751020610 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,50,0,3751320,0,-50 Gray 512 128 6.71089e+07 Cubic Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,50,0,3751320,0,-50 gdalautotest-3.1.2/alg/data/pat.tif0000664000175000017500000000155413701057751015652 0ustar evenevenII* q(S255HH/wrk/home/warmerda/small.tif@@@@@@@@@gdalautotest-3.1.2/alg/data/rgbsmall_dstalpha.vrt0000664000175000017500000000424413701057751020601 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -4.4840319999999998e+01, 3.4319999999999950e-03, 0.0000000000000000e+00, -2.2932583999999999e+01, 0.0000000000000000e+00, -3.4319999999999950e-03 Alpha 512 128 6.71089e+07 NearestNeighbour Byte ../gcore/data/rgbsmall.tif 0.125 -44.84032,0.003432,0,-22.932584,0,-0.003432 13065.3613053613,291.3752913752913,0,-6681.988344988345,0,-291.3752913752913 -44.84032,0.003431999999999995,0,-22.932584,0,-0.003431999999999995 13065.36130536132,291.3752913752918,0,-6681.988344988355,0,-291.3752913752918 4 gdalautotest-3.1.2/alg/data/utmsmall_ds_cubicspline.vrt0000664000175000017500000000342513701057751022022 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,50,0,3751320,0,-50 Gray 512 128 6.71089e+07 CubicSpline Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,50,0,3751320,0,-50 gdalautotest-3.1.2/alg/data/utmsmall_Q1.vrt0000664000175000017500000000420113701057751017306 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Quartile1 Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_ds_near.vrt0000664000175000017500000000343213701057751020445 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,50,0,3751320,0,-50 Gray 512 128 6.71089e+07 NearestNeighbour Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,50,0,3751320,0,-50 gdalautotest-3.1.2/alg/data/utmsmall_near.tiff0000664000175000017500000003076513701057751020105 0ustar evenevenII* N =S   VRW9[mQUD;Z^pgqryr^u = @.r57 "#%&(Y*+-J/0$@$@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|x!RADb+W]yyD"" ؓXJD>*3SfWhh6ˌ3=/K4R!b1Z%]E^2}vSnFxB%TFyfg2Ѿ۳2/2/2/2/2&l| vi{0gΧni̹0M5vݕeĬ{\װMQ< ne^e^e^e^e~wOobD=Z?+|i,?WI?zz* {:#bxyy?!!x!nQ Dc. ]XXXXXXZXتI Y kv6Jpa/:E&UZ$s䚛l*iu.|\3]m !zWt#['-xl_ Gbuߦ[жB͞kl_J7[{Sonǖ+x# &)OV}F2OoSDp0|a>̇0?`>yla{~[<~;3v޼Dζٺ#&Ya\o/#7! +a>̇0|a~O= EhrޢCYQ,8w!#[G:,/~" oۛklq}DLgzQx P'_2/2/28S,чr6O{f=ɛw̽dI]ss.woK8]W/ڗ%*û#cȺ'`>brg/%"4 gy|$k8Pu-d slx ҽ/%r/7bLO=yyyy#1G~uC&6IwLǁoc/SCfC8zXo%:Gz[TOaWKUpd}(JԼVyyyy?sfsFSeoN7IsWIyvHNQfa/q >1Fk]*<4 e c~Jޖx!A FYʕkȑXI$IJ, Tv:O{i*-4>Vd!|L$k?KvS䬥\kըLMdK:<<1*ܴHɻзfyQx-By3Ex١n\A Fw,,-,, - ,-\XXW(ܪT}(>`t/3^FG_GÈg.Wї9$xȽF*jv=xu׽N`QۭaCmvDg^,[;t7{2p#[qoN-ĖIzjTЮr٩|TeIםvoss5u9ewk/e̗2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ηPS_'*7rngv5-7Bĩy[jv?IPBD~^|q>8ye~l̼vy[+bU;=g/ncX_rlWl3%Զמ{mL}#zT{ݎq>8|ȃx׭NA["H,Hd-"++J$YE"!'$'Q{,.Ut2ʣ&ʙ]s9ϑO82 Wg!Z6>G>[}Fުn"vέ,<")9nla>̇0|a~r1Ĥ$,hr]"=${Mnu7#ۖ޼ۺdt[$/XWln|fsPt*t3O>OG:0|a>̇1C2uG~?Sub]XDc"{m߫RoD]^fɚ!_QJwYn{pܷ"5̇0?1x.x!RAQHdd/H$DrH$W@BѯRVL.p!<@w~-dqE(^[̕Nto)|G8 S9NgEw(*WP2\:DWAC=K>Bƻ[=ޒwx rzcșC=WzVb2ty3zQu_Jwdڡu~q_v~3 0 0 0 0 0 ÿaJgdalautotest-3.1.2/alg/data/utmsmall_cubic_ushort.vrt0000664000175000017500000000342313701057751021523 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Cubic UInt16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_mode.vrt0000664000175000017500000000417413701057751017762 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Mode Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_min.vrt0000664000175000017500000000417713701057751017624 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Minimum Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/byte_tps.vrt0000664000175000017500000000460613701057751016751 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area Gray 20 20 6.71089e+07 NearestNeighbour Byte ../../gcore/data/byte.tif 0.125 0 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 gdalautotest-3.1.2/alg/data/cutline.csv0000664000175000017500000000031113701057751016530 0ustar evenevenCounter,WKT 1,"POLYGON((6.25 1.25,7.25 1.25,7.25 2.25,6.25 2.25,6.25 1.25))" 2,"POLYGON((4.25 4.25,6.25 4.25,6.25 6.25,4.25 6.25,4.25 4.25))" 3,"POLYGON((1.001 1.001,3.999 3.999,3.2 1.6,1.001 1.001))" gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_Q1.tif0000664000175000017500000000420113701057751020763 0ustar evenevenII*yS   Vr^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|-32767  &.6> &F66 .6& _O &.&... .6. &.&  &..& ..> FW>_.>>  &. O&& F& >FO> & &WW   .         >>OFF  &&   OW>&.FO &  6& &  __O  &&.FWW  &OF  F.__ .__O. & &&6 gW > & .>O.>  .. & 6F && .& W&   gdalautotest-3.1.2/alg/data/utmsmall_near.vrt0000664000175000017500000000343413701057751017761 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 NearestNeighbour Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/test_bug_2365_wraped_med.vrt0000664000175000017500000000641713701057751021604 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]] -7.5700000000000003e+01, 5.0000000000000003e-02, 0.0000000000000000e+00, 2.5000000000000001e-02, 0.0000000000000000e+00, -5.0000000000000003e-02 Area Gray 10 1 6.71089e+07 Median Byte test_bug_2365.vrt 0.125 438662.784999999974,499.326864341085411,0,1219720.05499999993,0,-499.326862888482424 -878.508280500513251,0.00200269617241524873,0,2442.72869267281385,0,-0.00200269617824133748 -75.7000000000000028,0.0500000000000000028,0,0.0250000000000000014,0,-0.0500000000000000028 1514,20,0,0.5,0,-20 PROJCS["WGS 84 / UTM zone 48N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32648"]] GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]] gdalautotest-3.1.2/alg/data/4by4.tif0000664000175000017500000000115113701057751015641 0ustar evenevenII*@63=S   16 8.5 1 4.7609522856952 -1.6999999999999999e+308??? P7  !**B00N$Dd9FEѐdAFFgdalautotest-3.1.2/alg/data/3by3_sum.tif0000664000175000017500000000054013701057751016524 0ustar evenevenII*@HS  -1.69999999999999994e+308UUUUUU?UUUUUU??@oq)@pq5@88@88.@8@98 @VUUUUU1@88:@gdalautotest-3.1.2/alg/data/cutline_multipolygon.vrt0000664000175000017500000000451013701057751021377 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 5.9999999999999993e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -5.9999999999999993e+01 512 128 6.71089e+07 NearestNeighbour Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,59.99999999999999,0,3751320,0,-59.99999999999999 -7345.333333333334,0.01666666666666667,0,62522.00000000001,0,-0.01666666666666667 MULTIPOLYGON(((10 10,10 50,60 50, 10 10)),((70 70,70 100,100 100,100 70,70 70),(80 80,80 90,90 90,90 80,80 80))) gdalautotest-3.1.2/alg/data/unmergable.grd0000664000175000017500000000037013701057751017174 0ustar evenevenncols 5 nrows 7 xllcorner 440720.000000000000 yllcorner 3751020.000000000000 cellsize 60.000000000000 NODATA_value 132 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 gdalautotest-3.1.2/alg/data/utmsmall_cubicspline_wt_short.vrt0000664000175000017500000000413013701057751023257 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 CubicSpline Int16 ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_blinear.tiff0000664000175000017500000076630413701057751020601 0ustar evenevenII*f B S   J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@f!@&`f&f:&Zfy&f4&Tfs&f.&Nfm&$@$@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kkklortwz|}}zwttwz}~zuqmmquz~~zuqmmquz~~zuqmlortwzzyxvutv}|unmquz~~zuqmlmnpqrroljgdeimquyyuqmiea]YTPLMT[bippke`ZUUZ`ekpssssssrqpnmllortwz{{{{{{yuqmieeimquy{{{{{{zyxvutssssssrqpnmljgda^[[\^_abdefhijkkkkkkjihfedeimquyzwtrolnsy~|{{{{{{zyxvutroljgdfkqv|}|zyxvutsssssstuvxyz|}}zwttuvxyz|}Ǿ{vv{»kkklortwz|}}zwttwz}~zuqmmquz~~zuqmmquz~~zuqmlortwzzyxvutv}|unmquz~~zuqmlmnpqrroljgdeimquyyuqmiea]YTPLMT[bippke`ZUUZ`ekpssssssrqpnmllortwz{{{{{{yuqmieeimquy{{{{{{zyxvutssssssrqpnmljgda^[[\^_abdefhijkkkkkkjihfedeimquyzwtrolnsy~|{{{{{{zyxvutroljgdfkqv|}|zyxvutsssssstuvxyz|}}zwttuvxyz|}Ǿ{vv{»kkklortwz|}}zwttwz}~zuqmmquz~~zuqmmquz~~zuqmlortwzzyxvutv}|unmquz~~zuqmlmnpqrroljgdeimquyyuqmiea]YTPLMT[bippke`ZUUZ`ekpssssssrqpnmllortwz{{{{{{yuqmieeimquy{{{{{{zyxvutssssssrqpnmljgda^[[\^_abdefhijkkkkkkjihfedeimquyzwtrolnsy~|{{{{{{zyxvutroljgdfkqv|}|zyxvutsssssstuvxyz|}}zwttuvxyz|}Ǿ{vv{»lllmpruxz|}~~|zwuux{~}yurnnrvz~}yuqllquy~~zvsonqsvx{{zywvuw}}vpnrv{~zvrnlmopqrromjhffimptwwtpmieb^[XTQRX^diopkfa\WW\afkprrrrrrqpnmljknqsvyzzzzzzxuqmiffimquy{{zzzyyxwvutssssstsrponljhec`]]_`bdfghijkmmmmmnnmkjhgefjnrvzzxurpmnty~{zzzz{{zyxvutromjhfglqv{~}|zywvussssttuuvwwxyz{}|yvtsuvwyz|}żzz~mmmnqtvy|}}}~~~}|zywvwz}~}zxuspqtwz}|wsokkpty}~{xusrtvxz|}|{zyxy}yrquy||wsomnopqsrpnljhhjmorttqnlifdb`^\Z[_cgkookhd`\\`dhkoqqppponmljighknqtwyyyyyywtqmjggjnrvy{zyxwvuutttssstttutsrponljhfcaacfhjlnnoppqqrrrssrpnljhimptx{|yvtqnpuz|ywxyyz{zyxvutrpnljhimptx|~}}||{zywutrrstvwyyxwwvuvxy{}|zwurrtuwyz|~nnnprux{}~}}|{zyyxxwwx{~~}{yxvutrsuxz}~zvrnjjosx}~|zxvvxy{|~~~}|{z{}~{usw{~}yupoopqrsrqonljjkmnoppnmkigfeedcccfhjlonlifdaadfilnoonnmmljigfefilosvxxxxxxvspnkhhkorvyzywutrqrrrsssttuuvvtsrponljigefhknpsttuuuuvvwwxxwurpmkkorvy}}{xurpqv{~zvuvwxyzzyxvutrqonljknpsvxzzzz{{zxvtsqqsuxz||zxvtrrtvxz||zwusqqstvxz|~Žpppqtwy|~|zxvvvvwwwy}|}}{~}zwuuuuutuwyz|~}yuqlhinsx}~}}|{zz{|}~~}}|||{{}}wvy}~zvrppqrrsrqponmllmmmmmlkjihhiijkkllmmnnnlkihffhiklnnmllkjihfecbcfjmquvvvvvvuspnkiilpsvyzxusqnnopqrsstuvvwwvtsrponmljijmpsvy{{zzzzz{||}~}zwtqnnqux{|ywtqrw{}xtrtvwyzzyxvutrqponmmoprsuvwxyz{zxvtropsvz}|yvronpruwyywusqoortvxz|~qqqrux{~~{xusrstvwx{}y{{y||wsrstuvwxyz{|}{wsokghmrw|~}}}~~~~|zwuru{zy|{wsqqrrrssrqqponmllkjiiiiiijlnprtusrqonmlllkkkklllmmlkjihfecb`_`dhlosuuuuuutrpnljjmpswzywtqnkjlmoqrttuvwxxwvtsrqpoonmnruy|~~{xtqqtwz}~{xursx|{vqprtvxzzyxvutsrqqpoopppqqrtuwyzzwusqnosw{zupkjmoqtvvusqpnnqsuxz|~rrrtwy|~zvsonpsuwy||wxxvz~zupnprtwyzz{{{|zvrnjfflqw|~||}~|wsnjlu}|{~}ytrrssssssrrrrqnljhfefghijlpsvz}~zwtqmlmnnopponnmlkjigfedba_^\]afjnrttttttsqpnmklnqtwzyvrnkgfikmprtuvwxzzxwvtsrrrrqqsw{{xtsvy||ywtty}ztonpruwzzyxvutssrrrrqqponmnqsuxzzwurpmnsx}{tnhfiknqstrqonlmpruwz|zzssstwz}~{wspoqtvx{~{vw~vty}ytnmpruxz||{{{{yuqmifflqw|~||}{vqlgiqz}|}zvttsrrqqrrsttsqnkifefghijlptx||xtplkmnoqrrqonljihgfedba`_^]^beimprsssssrqonljknqtwzyuqmiedgjmortuwxyzzywvussssttuwz}}yvuxz}}{yvw{~ysnloqtwyzyxwvvuuttttsrqonmnpsuxzzxuspnoty~{uohfiknqstsqponnqsvx{}~}ssstwz}}zwutvwy{|~zuw~|usx|zupnqtvy|}}|||{yurnjghmrw|~}~~~~|xtpmijqx}|}|zxvusqonnoqsuvvtqomjiiiiiiknruy||yurnkjlmoqrrpnljhffeedccbbaa`bdgjmpqrrrssrpnljhhlosvyyuqmieehjmpsuvwxy{zywutrrstvwyz|~}zwvxz|~}{z{~~ysnloqsvxyyyyyyyxwwvutsrqpopsuwz||zwuspqvz|wqljmoqtvwvutsrrtvxz|~ssstwz}}|zyz{|}~|yuv}zsrw{{vqprux{}~~}}|{yvrokhinsx}~~~}}}}}}}}}||{zzxvspnklqv{~|{||}}~~}}|{zyvspmjjmpsvyywurpnmlkjihiloruxxuroliiklnprromjhedddcccccddddegikmopqqrrsromjhefjnquyyuqmieehknquwwxyz{zxvtsqqsuxz|}~~~~~|zxwyz|~~~~ysnlnpruwxyz{|}}|zyxwvuttsrsuwy{~~{ywustw{}ytonpruwyzyxwwvvxy{|~¿½ssstwz}~~{xuv|xrqv{{wrqtwy|~}|{yvsplijosx}~}|{zzzzzzzyxwwvusrpomnqtw{~~~}|{{zzzyyyzz{|}{wsokffkosw{|zxvtrpnmkighjmorttromjhgjlnprrolifcabbbcccdefghijklmnoppqrsrolifcchlpuyyuqmieehlorvxxyzz{zxvtropsvz}~|{yz|}~|zyxy{|}~~ysnlnprtuwy{}}|zxwwvvuuuwy{}}{ywuvy|~zwsrtvxz|}||{zzz{|}ssstwz}~{ywtv{}vppuz|xsrux{~~}|yvspmjkpty}}|zxwwwwwwwvutsrqqpppopqrtuwxxyyz{zyxvuttvx{}}xsmhcchmsx}}{yxvtqnliffhjlnppnljhffikmprqnjgc`__`abcdegijlmmmmmmnopqrsqnjgc`aejotyyuqmieeilpswyyzzz{zwusqnosw{~{xuuwz}~}|{zyz{{|}~~ysnlnoqstvy|~|zyxxxwwxz{}}{zxx{}|yvvxy{}~~~ssstwz}~|{ywvtuz~ztonty}yttwy|~}|zwtqnllquy~}{xvtttttttsqponmnopqqqqqppoprtvxzzxusqoosvz}yslf__flsy}{zwtpmiedfhikllkihfdehjmorqmiea]\]_`abdfikmppponmllnopqrqmiea]^cinsxyuqmieeimqtxzz{{{{zwurpmnsx}~yuppsw{~~}|||{{{z{{{{|}~ysnlmoprsvy}~|zzzzzzz|~~|z{|~~|zz{}~}½½vvvwy|~~}{zyxwvuvz~~ytooty~}yvuwz|~}|zwtrolmquy}}zwtrssssssrqponnopqrssrqponnprtvxxvsqolmqux|xrke__elry}|zvrnjfegiklnnlkigefhjmorqmifb^]^_abcegjmorrqonmkkmnpqsrmie`\]bglrwxtplieeilptxzzzzzzywtromnsy~zuposvz}~}||{{{zzzzzz{{|~ytomnopqruy}~||||||}~~}}~~~~}|þȼ{{{|}~}{zyyxxxwy|zvqqux||yvvxy{}~}|{zwtrolmptw{~~{wsqrrrssssssssssssssssrrrqrrsstutsqonlmpsvy|{vqkfaaglrw}~~}{xtpmihknpsvvspnkhhjlnprqnkhebaabcdefhkmorrqomljjlnprtsnjea\\afkpuurokheehkoruwxxxyyxvtrpnotx}|xutvxy{}~~~}}}}|{zyxwxyyz{|~}yuqopqqrsux{~~~~}}}¿~}{zxxxyyyz{~{wtsvx{~}{ywwxyz{|}|||{{zwtrollorux{~{vrpqqrrsstuvwxxwvutsstttuuuttsrqqponmlloqtvxxsokgcchmqv{}}~~~}yvrokkosvz~~zvsokjlnoqrromjhfeeefffgilnprrpnlkiiknpsutokfa\\aeinrspmjgddgjmpsuuvvwwwutrqoptx|~|zyyyyyzz{|}}~~|zywuuvwxyz|}}zvsrrrrsstwy|~~{z{|}}~þŹ~}{zxwwxyz{|~|yvuwxz{}}|{zyxxxyyyzzzz{{{zwtrolloqtvy|{vqoppqrstvxz{}}{zxvttuvwxyyvtrpnmmlllklnoqsutqnkhefimqux{|}~{xuqnosx||xsomnopqrrpomkiihhhhhijlnprrpnljghknpsvupkfa\\`dhlppnligddgilnprsttuvvutrqpqtwz}~|{yxvvxz|~}zxusrtvwyz|}~|zxuttttsstvwy{}~{wvxz|~ſɽz{~~~}}{zxwvvxy{}}{xwxxxyyyyyyyyyyxxxwxxyyz{zwtrollnprtvy}|vpnopqrstwz}}zwttvwy{}|yurnkijjjkklmnopqpomkihhknpsvxz|}}zwtqrw}}wropqqrsrqponmllkkjijkmoprrpmkifgjmqtwvqlgb]\_cfjmnljhfddfhjlnpqrstuutssrqruwy|~|yvssux{~}zwtqprtvxz{|}}~}|zyxwvuutstuvwxyz}~ytsux{~~rgiz~}||||||{zxwvtuwz|~|{yyxwvuvvwxyzzyxwvuuvwxyzzwtrollmoprtw||uolnopqruy||yutwy|~{vqlgfghijkklllmmmllkjjjlnprtvx{}|yvsu{{urrrrsssrrrqqponmlkklnoqrromjhefimquxxrmgb]\_behkljhgeddeghjlmnoqrstssssrsuwxz|}~ytoosvz~~zvrnnpruwz{{||||||||||||{{zzyxwvutstttuuwz~~~}vposvz~½ĹrcTWl~}|||||||zyxvuvx{~~|{zywvuttuvxyz{zyxwvvwxyz{zxvtsqpqqrssv{|unlmnoqrty}|xwz|~|vqlgefghijjkkkkkkkkkkjkmnpqsuwy|~~{ywtv|{urrrrrrrsssssrqonljjlnoqrrolifddhlpswwrmhc^]`begjjihgfeefghijlmnopqrssttuuvwwxy{~ytnnrvz~~zvrnmpruwyzzzzzzz{{{{{{{{{||{zyxwvuuttttvy}|vpnrvz~þzk[LPg}ü~}~~~}|{yxxz}~}|{zyxwvustuvxyz{{{{{{{{{{{{{{zzzzyxxwvuw|ztnlmnopqsw{~~~{wrnigghhiiijjjkkkkjjjijlnprtvwxyz{{zxwutv{}xropppqqqrrrssrpnljhhjlnprqnkhebbfimpsspliebaceghjkjjjiiiijjjkklmmnoprsuwxyxwwvuw{zuposwz~{xtqpqsuwxyyyyyyyzzz{{{|||}}}||{zzyxwwvuwz}}wrqtwz}þ¼vi]PUj}|{{}~~||{zyxwwvutstuvxyz{|}~~}|{|}~~|zwx|ytnklmnoorvz~~{wsoliiihhhhiijjkkjjiihiknpsuvvvvvvvuuttsuy}~ytommnnoopqqrrsromjheehjmorqnkgdaadgjmppnljheefghijkklllmmlllkkkkllllnqsvy||zxvtrsx|{vqptw{|yvsrstuvwxxxxxxxyyzz{{|}}~~~~~~~}|zyxwxz|}ytsuxz}{qh^UZnĿ~~~}{zyyxwwvvuttstuvxyz|~~||}yy|}xsnkllmnnpuy}}zwtqnlkjihgghhijkkjihhghknpsvwvutrqqqrrrstwz}}yupljkllmnoppqrsrolifccfilorqnjgc`_bdgilmlkjjiiijjjkklmnopponmlkkkjjjjlptx||yvropuz{wrqux|}{xvtuuuvvvvvvvvwxxyz{{|}~}|zxyz|~~~zvuwyz|~ʽ{tmf`Y^q½}zxwwvvvuuutttstuvxyz||}{z}|wrmklllmmosw||zwuspnlkihffghijkjjihgfgjmqtwxvsqollmnpqrtvwy{|{xtpmihijklmnopqrsqnjgc``cgjnqqmjfb^]_bdfhijkkllmlllkklmoqrttrqomlkjiihgjoty~zupklrx}|xssvy||zxwvvvvuuuuuuuvwxyz{|}~~|zz{|}~|zz}~{xxyz{|}~̻~~yqmiea]ct~{xvttttttttsssstuvxyz}}~}{}zvrmkkkkllnrvz~~{yxvtspnligedfghijjihgfdfimquxyurnkggikmprsttuvvurolifefgijklnopqrqmiea]]aeimqqmiea]\]_abdfhjlnpponmlklnqsuxxusqnljihgfegntz{tnhhou|}yttwz}~|{yxwvuttttttttvwxyz|}~~|{{{|||~~|yvvy|}{zz{{{||~͹}suvxy{~phfedbahx¼}{ywvuuutttssssrsuvxy{~~}z|}}yurnllllmmoswz~}yxwvutroljgddefghiihgfedfimquyyuqmiedgjlorssssstroljgdcdfghjklmopqplhd`]]`dhlpplieb^]^`abcegjmorrqpnmlloqtvxyvtrpmlkjhgfiou||uoiiouz~{xxz|~~}{zywvutssttttuvxyz|}~}|}}}}}~}zwttwz}~~~ͺ~uwxz{}zkdfghikr~}||{zyxwvutssrqrtvxz|~~yvxz|}yvromnoopqsvy|{wvuutsroljgdcdeeffgfffeegjnrvyyuqmiedgjlorsstttuspmifbacdfghjklmnomjgda^^adgjmnljhecbccddefhkmorrqpnmllnprtvvutrqponmmllnsx}}xsnmquz~~~~|zyxwvusstuuvwxy{|}}zwttwz}̽vkgknrvz~}~~|{ywvutrqpqsvx{}}uruwz||yvspopqrtuwy{~yttttssroljgdcccddddeeeffhkorvyyuqmiedgjlorsttuuvtqmiea`acdfghijjklkifda__adfiklkjjihhggggfgilnprrqpnmllmoprtttssrrrqqqqqsw{{wsrtvy{}}{ywwvutstuvwxy{|}~}}~}zwttwz}¿{skipv||{}~{ywutrqopsvy|zqnqtwz}}{xvsqprtuwyz|~xrrrrssroljgdccbbbabcdefgilpsvyyuqmiedgjlorstuvvwvqmid`^`acdfgghhiiigedb``bdegijkkllmmlkjihijlnprrqpnmllmnopqrrsstttuuuvvx{}}{xvwwxxyz}~|zwvvuttstuwyz|~}|zz|~~{yvstwz}}zwttwz}ýzuojlu~}yy|~{xvtrpnorvy}~}||}~vmknqux||zxvtrrtvx{}~vopqqrsroljgdcba`___acefhjmpswzyuqmiedgjlorttuvwxwrmhc_]^`acdefffggfedcbaabcdefhjlnprrpomkjjkmoprrqpnmlklmmnopqrtuvwxyz{{}~~}{zxwutv{~{yvuutttstvxz}}zwuux|}zvrnjkoty}}zwttwz}½}wtrpnljoz|ww||ywtromnruy}~{ywwy{~|sjgknrvz{yxvustvy{~²tmnopqrroljgdba`_]\]_bdgilnqtwzyuqmiedgjlortuvwxzxrmhc][]^`acddddddddcccbbcccddfimpswwurpnkklnoqrrqpnmlkkllllmprtvyz|}~|yvsoqx}zxuttsssstwy|~{wsppuz~zupkfabhnu{}zwttwz}žƼzqgdefghjq|ww{}zxuspnnrvy}}{xvvy{~zqheimqvz{zxwvtuxz}¿slmopqrroljgdba`_]\]`cfilnprtwyxuqnjgfhjloqrtuvxywrmhc^\]_`abccddddddddccccccccehlosvwurpnkkmnoqrrqonljjjjkkkmpsux{}~~zvsoqx}zxuttuuuvwy|~{wsppuz|wqlgabhou{~|yvvy|ǾĻtjfhjmoqy~yy{~~|zwusppsvy|~~}|{zz|~xpgejnrw{}{zxwvvy{~smnopqsroljgdcba`__`cfilprstuvwvtqoljijkmnopqrtuvuqmid`__`abccdeefggfeedcccccccdgjloqrpomkjjlmoqrrpnljhghijklorux{~~{xust{|zxvvwxyz{|}~{xuuy~~yupkkpuz|zz}û½~z{}~|{{|}~~{ywusstvxz|}}}}}}~~wogejosx|~}{zxwwz|~~soopqrsroljgdccbbbacfjmptuuuuuttsqponmmmmmlmnpqrtsplifcabbbccdefghiihgfedccccccdfgiklmlkjihiklnprromjheeghjlmpswz}~}~~|zxvx}~|zywwy{|~|zz~}yttw{~~||{zyxxz{}~}{ywuuvwxyz{|}~|ungejoty~~}{zxy{}{sppqrrsroljgdcccdddfimqtxyxvutrrrqqqqponmljjlmnpqqnljgedddcccdeghjlljhgedcccccccdefgghggggfgjlnprrolifcbegjlnquy|}{|~}}|{z|~}|{yxy{~~~~}¼~|yvsqqtwz}}{zxwwwwwwx{}zsmffkpuz~}{zz|~~ytqqrrrsroljgdcdeeffilptx|}zxusppqrrsttqomkhhijlmnnmljigffeedcdfhjlnnljhfdccccccccccbbbccddefikmprqnjgc``cfiloswz~~{yy}}}}~~~}|{{zy{~~|z{}ƿû¾|wsniinsx|~|zyxwwvuvz}}wrlffkpv{~}{{}~~{yvtrrssssroljgddefghilptx|}yurnmprtvxwtpmjfefhijlllkkjjihgfeddgilnppnligdccccccba`_^]]^`abcehjmorqmiea]]aeimptx|~zvw|~|}~}|{{{{z|~{yvw{~Ļ~|wrniinrw|~|zyxwvutuy}{vqlgglpuz~}||}~}xwvutsrsssstrpmjhedefhijlquy~~yuqllnpsuxwtpmifefgghijjkkllljihfeehjmoqqoljhedddddddca`_^^_`abcehkmpsrnjfb^^bfimquy~{wx}~|~~||||||~|yvvz~¿ƽ~}yvroorvy}}{zxwvuutsuy}~~|xtpmiilpswz||{{{{{{{{||zutssrqqrsstutqnlifefgghikpty}}ytpkjlnprttromjhgggggggijlmnnmljihhikmoppomkihgggggggfffeeeeeeeegjmpsvuqnjfbbehknquz~~{{~~|yy|ÿ¹}{ywuuwy{}}{ywuttttssux|~}||{zzxvspnkkmoqsuwwxyz{{zyxww{vqqpppppqrtuvurpmjhfgggghjosx}}xsojhjlmopponmkjihgfedegjlnqqpnmljjklmnoonmlkjjjjjjjjjjkkkkjihhghkoruxxuqmjffhjmoruz|{~ĿȾľ~~}}|{{|}}~~~{ywusrrrrssux{}{zyxwwvusrpommmnopprsuwxzzxwusrv~smmnnnnoqrtuwvtqnlihggggfinsx}}xsnighijklmmmmllkjhfdbcfilpstrqpnmlmmmnnnnmmmlllllllmnopqrrpnljiimqtx{{xtqnjikmopruz~Ŀſ{{~~~~|zwuspopqqrsux{~}{xwvutsrqqpppoonmmllmortwzzwtromq}|oijkklmnprtvxxurpmjihggfehmrw||wrmhefgghijklmmnnkheb``dimquvutrqponnnnmmnnnnoooooooprsuwyxuspmjkorvz~~{xuqnmnopqrv{~~~}}Ľ|zúſ}xx}~}}zxuspnmnopqrtwz}~{xvtsqponmnopqqqomkighkorvyyvrokhlyylfghijkmortwyyvtqnljihfedflqw||wqlfddddeefhjlnqplhea]^chmrwyxvutrqponmllmnopqrrrrrrsuxz}{wtpllptx}~{xurqqrrrsv{~|}{xx}ɾxonv~||{vv{~}}{xvsqnnopqrsuxz}}{xvtrpomkkmnoqrroljgdeimquyyvrokhlxwkefghijloruxzzwtroljihgfeglpuzytnidabccdefhkmorqmid`\]bgmrxzxwvtsrqpnmllmnpqrrssssstwy|}zvsoosvz}~|zwuttttttv{}{|~}xy~ɾ|tsyƸ~{{zuuz~~~|zxvtrrrsstuvxz|}|zxvtqomjjlmoqrroljgdeimquyzwtrompzvlghiijkmpsvy||xuqnkiihhggilpswzytoje_^`bdfhjkmoprqmid`\]bglqvxwvtsrqpoonmmnoopqqrrrsstvxz}}{xvttvxy{}}|zywvuuuuuuw{~|zz}ĿĻź|yy}~zuuy|~|{yxvuvvvvvwyz|~~}|{yuroliiklnprroljgdeimquyzxwusrt{~vnjjjjkkmpswz}}yuqmjhhhiiikmoqsutoje`[Z^adhkmnopqrqmid`\\afkpuwvtsrppoooonnooooppqqrrstuwyz|}|{zzyyyyyyzyyxxwwvvvvvvx{~||}~|yy{}¿ûÿ}zxx{}yuux{~~~~~}|{zyyyxxxxy{|}~~~~}}{wtplhgjlnprroljgdeimquy{zyxwwx|{uollllkkmptw{~~zuqmhghijklmmnoppnje`\WW\`ejoqqrrrsqmid`\\afkotvtsrponooooppoooonoppqrstuvwxyz{|}}~~|{yxvvvvwwwxxxxxxy{}~{xvuxz|~{xwy{}wxǻ~|zxvwz}|xutwy{~~}{zz{}~~}}|{zyyz{{|}}~~~yuplgfikmprroljgdeimquy{{{{|||~~{xtqonmmlkmqtx|{vqlgfhiklnonmmllie`\WSSY`flrutttssqmid`\\aejnstsrponmnoopqqpoonmnopqrsstuuvwxz||yvsrstvwxyyyyyyz{|~|yvroorux{~~zwvxy{}~ɷnmij~z}}}|{yxvtux{~~{xutvwy{|~}{yvvy{}}|{z{{{{||}{vqkfehjmorroljgdeimquy|}~~|{yxwvusrqponmlmquy}{vqlfegjlnpqomkigd_[WSNPW_fnuxwvutsqmid`\\`eimrsrponllmnpqrrqpnmllnopqrssttttvz}~ytonpsuwyzzzzzz{{{||}{wtplhhlpsw{~~zvtvwyz|~~~Ʈ}dcxͷtoz||||{yxwvvxz|~~|zxvuvwwxyz{}|zwuuwz|~~|{zzzzzz{|}{vqlgfhkmprspnlighkorvy|}~~|zwutttttttsqponosw{}xsmhgikmoqqoljheb^[WSOQX`gowzxwutrpliea^^bfjnrtrpomllnoqsttsrponnnopqrrsssssuy}}xsnloruxz|||||||{{{{zyurokhhlorvy|zvuvwyz{~~~жgdxտzt~~}|{zyzz{{||{{zzyyxwwvuvxy{}}{yxvvwyz|}~|zxwxxxyyyz{|}}|xtpmihjmoqttsqonlmortwz{||}}~}|zywvuvvvwwwvutsrsvz}{vrmlmnopqpomkiheb^[WTU\biovxwusrpnkifdabfjnquvtrpnlloqsvxywvusrqqqqqqqrrrssux{~{vrmmpsvy|}}}}}}}|{{zyxvtrpnnqsuxz}}yxyz{|}սup~ɶ~}|zyxwwxyz|}|zxvtrrtvxz||{zyxwwwxxyyz|~}{xvuuvvwwxxxyyyxvspnkkmoqsuvutsrqrsuwxz{{zzzzyyxxwwwwxyyzzyxwwvwz}~zvsqppppponmlkjheb_\YZ`ejpuwusqomljihfefjmquxyvtqolmpsvy|}{zywvutsrqppqqrrstwy|~|xtqmmpswz}~}|{yxwwvvutuvwxyz}|z{|}~~Į|ĵ}{xurrux{}|yvronpruwyzyyyxxwwwvvvwy{~|yvsrsttuvvvvvvuusrpommoqsuwxwwwwvwwxyz{{zyxwvvvvwwwxyz{||}||{zz{}~{xvtsrponnmmmlkifda__dhlptusqomkjiiiiijnqtx{{xurolmqtx|~}|zywusqooppqrstvwy{}|yvspmmptw{~~|zywwwxyz{{{{{{{}}~~˸ƻ{vrmmrv{zupkjmoqtvwxxxyyxwvtsrsvy|{xtqpqrstuutssrrqqpppopqsuvxyzz{{|||{{{{zywutrrstvwxz{|}~~~}{xvsqnmnnnnonljhfddgjmpstromkhghijklnqux{~~{wtpmmrv{~|zwtqnnopqrstuvwxyxvsqolmqtx||zxvvxz|~}|}}Ǿ{uoiiou{{tnhfiknqsuvwxyzywuspnoswz~~zvrnmnoqrssrqponmnopqqrtuwxz{|}~~}|zxusqnnpsuwy{|~|xuqmlmnopqqonlkiikmoqsrpmkhfegjlnprux{~}yuqmnsx}|yuqnlnopqrstttuutsqonlmquy}}zxuuy|~|}ʼujly|uoiiou{zsmfdgjmpsuvwxyzzwtrolmrvzzvqmkmnoqrrqponmmopqstvxy{}~~|zyvtrpmnpruwz|}~~zuqmlmnpqrrqponmmnopqrqpnljhhjlnprtwz|~zvrnosx}}yuqlkmoprttuuuuutrqomkmquz~}zxuvy}~||Źrccp~Ʒ}xsnnrw|xrlfehkorvxxyyz{zwtrolmrw|{vqljlmoqrsrqqpoprsuwxz}}{zxvutrqpprtvxz|}~~~~zuqmlmnpqrsrqqpoooppqqqqpppoppqqrstwy|~}zwtqqtwz}|wsokjmoqtvwxxxyyxurpmjkpuz|zxvvy|~|z{ĸxhgsŻ{wsrvy}|wqkfeimptxzzz{{{zwtrolnsx}|vpkiklnprssrrrrsuwyz|}{ywuttssrrrtvwyz{|}~}|{zz|}~~zuqmlmnpqrssrrrrqqqpppprstuwwvvutstvy{}}zxusrtvwyz{|}~~zvrnjiloruyz{{|}}|xtqmijpuz~|zywwy{}}|zxz~ò~mjw}{xwy{}zupkfeinrv{}|||{{zwtrolnty}wpjgjlnprssttttuxz|~~{ywusrrssttuvwxyz{|}}~~~|{yxvvwyz{}~~zuqmlmnpqrsstttttsrqpopsvx{~|zxvttvxz|~~|zywuttttttuwyz|~}yuqlhhlptw{}~{vrmiiouz~}|{yxxyz{|}}|zyxwx}ϼrnz~}|}}~~}xsojeejoty}~}|{zwtrolntz~wpifikmprstuuvwx{}|zwusppqrtuvwxyyz{{|||}}|zxvtrrsuvwyz|~~zuqmlmnpqrstuuvwvtsqpnotx}|xutvwy{|}|{zyxvusqpnoqtwy|{wsokgglpuy~~xsmhhnt{~}|{{zyyyyyyyyxwwvuw{}}}}}}}dzwr}ÿ~~}zvrniefkpu{~}|zwtrolnu|wohehjmortuvwxy{~zxuspnmprtvyzzzz{{{{{{||{xvsqnnoprstvy{~~zuqmlmnpqrtuvwxyxvtqomou{zutuwxz{|{{{zzxurnkhhlosvzzvrnjffkqv{ztmggnt{}|{{{{zzyxwvvuuttttvz~}||||||~~zvrxѼ|v½~|zxurnkhinrw|~}|zwuromou{~vnfdfilnqsvxz|~}xvtqolloqsvxyzz{{|||{{{{zwuromlmopqrtwz|}yuqmlmnopqrtvwyzzwtqolnt{{vtvwxz{|||}}}{wsokggjmpswwtqnkhimrv{{unhhou||z{{{{{zyxwvuttssrrtx{}zyzz{{|~{wsnt­~¼}{zxvusqpnorvy}~}|zwuspnpuzzsldbehjmpswz~zvtrpnllnoqstvwxz{}}}|||{zwuspnmnopqstwy|~|xtqmklmmnoprtvxzyvtqnklsy|wvwxz{}~~{wsokjkmoprrqpponoqtwz|{vqllrx}~{yzzz{{{zyyxxwutrqpqtx{~{yvvwxz{}zvqwƴĿ~}{ywuttttttuwy{}~}|{zxvtqoptx|}vpicacfilnrx}|wtrpomllmnopqrtwy{~~~}}|{zxvtqooopqrstvy{}~{wtpmkkllllnpruwzyvspmikqw~|xwxz{}~{wsommmmmmnopqrtuuvwxy{|~{wsopuz}yxyyzz{{{{zzzywtrpmnqtwz}}{ywtrrtwy{~}ytyʻ~~{ywusrtvwyz{|}}~~~~}}|{zxvtrqqtwz|~xrlga_begjmry{z|~~zwsqponmlklllmmorux{~}|{zxvtrqppqrrstvxz|~}zwspmkkjjjjknqtwzyvrolhiou||yxz{}~{wspomljiimpsvyzzyxwvvy{}~{xursx||xwxxyz{{{|||}{xurnkkmpruwxvtrpnorux{|w{µĿ~}}}}}}}}}}}}}}}|zwuspqtwz}~~}}|||{zxwusrrtuwyzytnid_^`cfilqzwtuwxy{zxvtrponmmlkkkjjjikosw|~}|zxwusrqqrrrstvwy{||yvspmkjiihgilosvyyurnkghnty}zz{}~{wspmjgdejouz~{xusruwy|~~}{yxvw{{wvwxyz{{|}~~zuqmihjlnprrqomljkosw|z~ɿ}|||||||||||||||zxuspnosx}}||{{{{zywvtsssttuutokfb]\_begjq{}snnoopppoonmmllllkkkjihgfhmrw|~}|zywvtsrrsssstuwxz{zxuroljihgfefjnruyyuqmjfflrw}}{{}~{wrmid_`hov~}ytonqsvy{||{zzy{~~zvtvwxyz|}~{vqlgeghjkmmljigfhmrw||¼~}|zyxľ}~~~}}|{{zyxvtromoty~~{zzzz{{zywvtrrrrrrrqnlifdcfhkmou~{qlllllllkkkkkkkkkkjjiihggimrv{~}{yxvutssrqrsuwxzzwtrolkjihgfgknruyyuqmjfglrw|~}{{}~|xsnid_`how}xsnlorux{||||||}|yxxyz{{|~}wrlgefgijkkkkjjikpuy~zxwusqyſļ~|zxvutsqpoquy}~{xwxyyz{zxvtrpopppqqqqrrrssuvxy{~yqmmmmmmmlllkkkkjjjiijkklmoqtwz|}zxvtrpnnpsuwzzwtrolkkkkkkloqsvxxtqnkhinsx}~|zz|~~{wsokfbdjqw~|wrmmpswz~~~~}~~~}~~ytojghijklnoqrsuwz|{{{{{{ľŽ}zvsqqqqqrsvz}~{xvuvwxyzzwurpnmmnnooqux{~}wqnnnnnnnmmllkkjjiihikmoqsuuvwxy{|xuqnjjmpsvyzwtrolklmnopqrtuvwwtromklpuy}}{yy{}|yvsplifgmrw}~zvqmmqux|{vqljkllmnpsvz}|~ü~ytonopqrtuxz|~{yvsrtvwyzzwtqnkjkllmnqx~}yurpppppponnmlkkjihhghkorvyzzyxwvx~zuqlgfjnruyzwtrollnprsuvvvvvvvtrpomnrvz~~|zwwz|~}zxusqnljkosw||xuqmmqvz~~~}xsommnnoorw|þ}º¼~xrljmoqsvxyz|}~{xvspprtvxzyvsolihijklmr{~{ywutrqqqqqqponmlkjjihgfglqv{~{xusu}|vpjcbgkptyzwtrolloruxz{zyxwvutrqpoqtx{~{yvvy{~~|zxvtsrpomnqtx{~~zwspmmrw|~}{z|zvqoopppqt{˿þ~xpigjnqtxzz{{||{xvspnnpruwzyurnjfefgijkr~~uqqqrrrrrrrrrrponmljihgfdgmsy}ytor|~woh`_dinsxzwtrolmqtx|~|ywutssrrrsvy|}zxuuxz}~|{yxvtsssrrqrtvxz{{xurolnsx}}{yvy|xtrrrrrrwŸķŻxqigknquxzzzz{{zwtqollnpsuxwtpmifefghijq~|snopqrssttuuvusrpomljhgedfmt{~ytor|xph`_diotyzxurpmmqux|~|ywutssssrtvy{~|zxvvx{~~|{yxvtsrrrrsstuvxyzzwuromnsy~|zwy|xtrsssstx¿ķǾù{tnlnprtvwxyyz{yvtqnkjlnprttromjhgghhiioz}wsssssstuvxy{zxvtrpnljhfdfmszzvqt}zrkdcglqv{|yvtqnnqsvx{{zyxwvutssrqrtvx{}}|{zyxxz}~|zwuspopqqrstuvxyzzwuspnotx}~|~|yvsqrsstuzļ}xsqrrsstuvwxyzyvspmihjlmopponmkjiiihhhmw~{xwvutstvy{}}zxuspnligdflsy{wtv~|unhgkotx}}{xurpoprstvvvvvvvvutrqpprtuwyzzzzzz{}~}zwtqnmnopqrtuvxyzzxvtqoptx|}}}~~~}{xvsqpqrtuv{ƿ{xvuttsrrtvwyzyvrolhghijklmmmmlllkjihgkt}}{zxvtux{~|yvspmjgdflrx~|yvx}wqlknrvz~|ywtqpppppqqrtuvwwutrqoopqrtuvwyz{|~~{wsoljlnoqrtuvxyzzxvtrqqtwz}|zzzyyyxvtsqooqrtuw|þɚ}{yvtrpprtvxzyurnkgefgghijklmmnnlkihfipx}xwy{~}zwtuy}|yurokheflrw}}{xzzuonruy|~{xurqponmlloqsvxxvtrpnmnoopqruwz|{wrnihjlnprtuvxyzzxwusrruwy|~}{xwvvuttsrqponnprtvx}Ӗ|yurnnpruwzyuqmjfddddeefhjlnqpnligegmsy|vqllqw||yuv{|xtpliefkqw|~|{||xsruy||ywtqomkiggknruyywtromllllmmorvz}|vqlgfhjmortuvxyzzywvtssuwxz|~~|zywutsrqonnmmmllmortwy~úþݓ~yuplknpsvxxtqmjfddddddegiknppmkifdfkpv{|vqlggntz}yuv{}yvsoliinsw|~~~zvux{~~{xvsqomkiimpswzzxurolkkkkkjlptx|~ytojhjlnqstvwyz||{yxwvvwxyz{}}|{zzyxxxwwwvvuttstvxz|ƾľ½ߒ~~ytoihknpsvvspnkhgfffeefghjklljigedfkpuz{wrnijoty~~{xuuz~}zxvtrpqsvy|~~zwvy|}{xwvutsrrtvxz||yvspmkkjjjiknruy|~~~~~~~zuqpqrstuvxy{}~~}|{zyzzz{{|ľ½ّ|{}~ysmgehkmpssrpnlkiihhggggghhhhgfedcejoty~~{wsollptx|~|ywtuy||{zzyxxxyz{||~~{xx{}}{zzzz{{{||}~~}zwspmkjjiihiloruxzzzzzz{~|ywwwwwvwy{}~}}|||{|~¾¾ԏ|xwz}xrkdbehknpqpoonmlkjjihggffeeddddccejosx|}zwtqnnqsvy|}{ywvtux{~~|{|}~~~}|{{{~|yy{~~|yy|~~~{wtpmkjihhghjmortuuuuuuw{~|{zxy{}~}|{|}~½þΎ}xtsw|xpib`behknoooooonmlkjihgedba`aabbcejnrw{|zwuspprsuwxyxwvuttwy{~~}||~~{yy}|wrquy}~|zz}|xtqmjjihgffhjlnpqqqqqqty~}zz}~|{{{{{{{{{{{{}ľ»žȍzuppuzwog_]`behkmnoopqqpomlkigdb`]]^_`abeimqvz{yxvtsrssttuuutttstvwy{|}}|||{}{ww|yrkjnsx}}{|}yuqmjihgfddfhiklmmmmmmpv}||~|{zyxwvvvvvvvx}º¾Ž|vqqv{yqia^`cegjlmnoqrrqonmljgeb`]]_`bdfhknqtwyxwvutssrrrrrrrrrrrtuvxyzzzzzz|{vuz~wpiglqv{~}||~{wtqnmlkjhhjklmnonnmmmov|{{~~{yxwwvuuuuvvvy~||||||}¿żÒ|xw|}unfcdfgijlmnopqqponmkjhgecaacfhjlnoprstuutttssrqqpooooooopqrtuvwxxxyy{zuux{~~zupkkorvz~~}|{|~}|zxwvutsrrstuvwwutrqprw|}{xx{~~|zxwwwwwwxyz{|}}}}}}}~¼˖~~zrkhiijjkklmnoooonmlkjihgfefhknpstssrrqqrrrssrqponmllllllmnpqrtuuvvwwy}~zutuwxz{{xvsqnnqtvy|}|||{{|}~}}|{{|}}~~|zwustx|}{zywvuvx{~}|zxwuuvwxyz{}~¿½¾ÿӛ~wqmmlllkkllmnnnnmllkkjjjiijmpsvyzwuspnnopqrsrqonljjjjjjjjlmnpqrsttuvx{}yussssrrrrrqqqrsuvxyzzz{{{|}~|yvvy{~}zwtrrrrrrsvy{~~}{zxwvusrstvxz|~۟|vrqpnmlklllmmmmlllkkklllmnruy||wsokjlmoqrrpnljhgggggghijlmnpqrstuwz}|xurpomkijlnprtuvvvwwxxyyz{{|}}~}zxxyz{|}}yxz{}{wsokijklmnpsvx{~~|zxvtsrqqpopsvy|~ü¿㣣{wusqnlkkkkllllkkkkklmnopsw{ztnhfikmprromjhfddddddefhijlmnoqrsux{~~{xuqnkgdaaejnrwyxwvvuuvwxyz{{||||}~{xtqprtvy{~|z{{||}{vpkfa`bdgiknpsvx{{yvtqonmmmmlnrvy}ƾ¿}~~spw}Ǻ맧{ywusqoonmmlllllmmmnoopqsw{ysmgegjlnppmkifdccccccdefhijlmnopqsvy||yvsplhea]^cinty{zywvuuwxz{}~}}}}}}~}zvsooprtvw{|zzzzzzxsojea_adfhjloqtwyywtromllllmmotx|Ľ¿xyznkqw}~¾ȹ~}|{zxvtrpnmnoopqqpoonmorvy}{wrnighijklljigedccccccdefhijklmmnoqtx{{xtqnkheb`afkpu{}|{zyxxz|~}{xvtssssssu{~ywxxxyywtqnkhghhijkloqsvxxvtrpnmnoopqtx}þž{|wsw|µ쯯~zwtpopqrtutrpnljjmpsvyywtqnkjiiiiihgfedcccccccdefhijkkllllnrvz~~zvrnkjhfdbdhmrw|~~}|{z{~~}}|{zzyxvtrpnpuz~zvuuvvwwwutsqponmmlklnpruwwutrqoopqrtux}þ¿~|~ȼ곳|wrprtuwyxtqmjffhknpssrqpnmljihfeddddccccccccdefhijkkjjjjlpuy}}yuplihgfedfkpty~~~}~}{z{|}}~|yuqmjjotx}|yvsrsttuvvwwwwwvtrpnllnprtuvutrqpprtuwy|¼ƼĿ·鷷ztrtvx{}{vqmhcadfhjlmnnnoonkifda`aabbcccccccdefhijkjiihginsx}}xsniggggggimrv{~{yxz|{vpkeeinrw{~~|zwusppqrstuvxy{}~zwtpmlnoqstutssrqrtvx{}÷ƾŻ绻~vtvy{~xrlf_]_`bdfgikmoqpliea^]^_`abccccccdefhijjihgfeglrw||wrlgefgghilpty}~zvvz}~woh`_cglptwxy{|}}|{yxwvtrqommnoqrsuy||wrmlmoprstssssrtvy{~½ǾÿȾŽ庺xuxz|~~xrle_]^`acdfhikmonkgda^]^_`abccdddefgijlmmlkjihjotx}}ytokijkllmpsw{|yuuy|~vog_^bfjosvxy{}~~}{zxwutsrqppqrstuwz~{vrqrsuvxxxwwvuvy|̿þƾÿɾ絵zxxyz{{yuplgcabdeghiiiiiihgedba`aabbccdefghjlmoqrssrrrqsvy|}zxussssssux{~~}}}zwttwz}ztnha`einrwz}~|{{{zzzyyyyyyz|~}{z|~~|z{}ʿ¿ɾ믯|zyxxwwurolifeghiklljhgecbcccddddddccdegijlnprtvxyyzzz{|}~}|{zyz|}{xx{}}{zxvttvxz{}|wrmhdchmrv{~~~ȿľɿ𪪪~|zxvtrpomlkiiklmopolhda]\^aceghgfedcdfikmprtwy{}{wsrtwy|~~}|zyxwvutsstuvwxwtpmiffkpuz~~~{wtpmkllllmmoprstrmgb\WVZ^cgkljigedegjmpsvy{~}xsnlnprtvwvvuttssssssssssssrpnljhinty~~|z|ý{wrmhgijlnprstvwxung`XQPV\bhnpmkifdehlpswz}|uoighjkmnooonnnnopqrssrqponmmlkkjlrw|~zwyÿ|}~{vrmihjlnpstvxy{|yrjbZSRY`fmtvsqoljjnqux{~ztnhefgghiiijjjjklmopqqpnmljjkllmnqw|}yz¿žžþ}}}~~~|zwtqonoprstvxz|~~wpic\\biov|~|zxvtuwy|~}ytpkihggfeefgghijklmnonmljighjmortx}½ƿ~}}|{zyxwvuutuuuvvxz}}wqkeelrx~}zwtqnljhfdbabdefghijjklljigfefjnrvzľǿ~|zxvvwxyzz{zzyxxy|}xsnou{~}{zxwvtsrolheb^]_abdfgghhiiihfecbdjouzÿýſ~{xussux{~~}{z{~|xx~~}||{zzz{|}~~|zxvtstttuusnid_[Y[^`bdefffggfecb`_bipxþ¼񬬬Ź~zvsooty}~||~}{ywusqqsuwy{{yvtqooqrtvxvpjc]WUX[]`bdddddddba_^\`irzſ¿~żĸ|yuqrw|~}|zxvtqolloqtwyyvtqnllnqsvxvpic\VTWZ]`cddddccba`^][`is}Ľſ¾»¾|~üƽ篯û|yy}~}|{zyxvtrpnlloqsvxxurpmjjmoqtvtnhc]WVY\_begfeedcba`_^]akuÿ}{½ݰþ~}||{zyxwwvutrpomllnpruwvtqnliikmoqsrmgb]XWZ^aehihgfedcba`_^cmw¿Ľþ½ÿ|y}Ҳÿ~|{{zzyxxwwvvuttssrqponmllnprtuurpmjhgikmoqokfb]YX\`cgkljhgedcbaa``doy½ƻĽ{x{dz{wuutttsssrrrqqqpppoonmmlklnoqsttqnliffhikmnmieb^ZZ^beimnljhfdcbbbaafq{ļºywz}~yx{~}yupnnnnnnnnmmmmmmmmmlllllkklmoprsrpmjhedfgijlkhda^[[_chlppnligdccccbbhs}Ŀ¼ɼǿĿxux{~~ytruxz}|xuqmkkkjjjjjjjkkkkkkkjkkkllmmnopqqpnkifdcdfghjigdb_]]aehlppnligdccdddejuüýƹǿ½{x{~~}~zuonqsvx{{xvsqnlkjihgghiijkkkjjjijklnoqqqppponkigdbacdfghhfeca_`behknnljhfdcdefghnw¾½·ſ~zupkjlnqsuvtsrpomljhgeefghijkjjiihikmprtusrpomkigec``acdfggfedcbbdfhjkljhgeddegijlqz½Ŀȿ¿~zuplgehjlnpqpppppnljgebbdegijkjihhghknruxxvspnkigeca_^`acdfffeeeddefghiihgfeddfikmpu}½ü¿Ŀ}}|||{yuplgcacegijlmnopqolifc`_adfhjjjihgfgkosx||xtpmifdca_]]^`acdeefffggggggggfeedcegjmpsxþȽþ}{zyxwvtokgc^]_`bcegikmoqpmiea]]_begjjihgfdfkpuz{vqlgdb`_]\[]^`acdefghiihggfeddddccehlpsw|ÿĸ¾¿~}{zxwtokgc_]_`bcdfhkmoqpliea]\`cgjmnmkjhghlquy~}ytokfcb`_]\\]_`bcdefhijjigfedcccccdfjosx|ƻ~|yuqmhdcdefghjklnopolhea^^cglpuvtrpnllnprtvvspmjgdcba`__`abcdefgghiihgfecccdddehmsx}ýĺzvrnjhijklmmnnooonkheb_aflqw}~|ywtrqpppponmkjigfedcbbbbcdeffgggghggfedccddeefjpv}ƾ¹Ǻ»¿|xsonnoopqqppooomkhfcacipw}}{xurpmkhggggghggfeeddeefgghggggfffeddccdeffgkszɿþ´û{~}yusstttutsrponljhfdbelt|}ytpkfa_acefhihhhgggghhhiihggfeeedddcddefghmu~¿ľü˼Ļºwqtwy|~zxxyyyyxvsqomkihfecgpy~vohaZX[_beijjjjjjjjjjjjjihfedddccccdefghjoxÿǷƾŻ~xz|~~|zwtqnmlkjjimv}unf_WVZ^cglnnnnnnnmmllkjihfedccbbbbbdfgikpyÿķóûĺȾ|yvsqrrsssw}wqke_YY]bglqsssssssqpnmljihfedcbaa`_`begilqxʿ¿ʽƿ¹}zwvx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~|pkmoqsuyźƿͿķ}xx}topqrsux~}||||||}ýļǺɾ}}{vvwxxy|}}}}}}~~ÿµ¸||}}}}}||{zz|ÿÿɽúzyxwwvw|ľÿ÷Ȼº}wvutsrsw|Ľſɽ˻ȸ|tsqponosw|zx{}ɾľù³ɺvtsqomnrvz~ȿĿywy|~ȿƽǻ~{yvspqtx{ƾ~|~Ļľż{wtsvy|~¹¿ž{wvx{}~}{|øƼzxz|}zxz~̿øù~~}{|~~{xvw|~ǹʿƼ|~~~|zwy}ǽ}vy~~ɽĽļxqs~¿½ľyrkmvʾÿ{tmffnv~ξõž|ung``fmsy¿~~ȳƵzupjeejpu{Ž~ʴij|zxvtu{»°˽~}~Ŀ¿´ƹ~}|{|þ|{zzyxx{{xvuuuuuz¼zx|˾ž}|}}~~~Žyx|Ϳž»ǻĿ·½żùǽÿĸʾɿ~µ¿ǿƶ¶¿ɹÿſ˽ĿþüĿżõſøƹŽʿʾʾûõĺ˼¿¼ĻŵȼǿȾŸɿκǿõ͹ƼľǸнÿǿþʻȿ¿Ŀξŵĸ~¿~|ɺŷ|vpicenx}vv}ȼzxĴǺͿȻ{vqlgbclu}{uv|ĹɺǺǺ¼}|z{}|żùù~vu{ÿǾƿypov|þŽĿ¸}{~}sihpxſü»˻|yuru}yzz{|}xmcbkt}ĺŽ}{y{п{wsps}xtuvwxyyofemv~ȿǿ~ĺǸ~{xuwyuuvvww{yrrw}þſ÷ý߷ʾ|z|yvvvuuux~~·¾ÿzwvutsru{ÿ¾ÿľ~{xvusrpqv{ƽϾǻ~{ywurpnnqux{}zwtstvwxyywtrpnnpruwyywurpnpv|¿ĻϽֿwpzʻ}{yȽĽ|zxvutrqpprtvxz|}~|xtqooppppomkifddgjmpssqoljhiou{úϽ̾ì|uȹ}{x·ƿ{xtqoqrtuwxxyyz{{{{{||}{xvtrpnljihfedehkorvvusqpnosw|¾öλ·}xsniimquy}~~}|{{zyxwwy}yuplgeedddceimptxzyxwvuuwz|~öȼʻĿɿ{tnhbbipv}~|zxwusrsy~~wpjc`aabbceinrv{}|||{{{|||}}~ż½ýǽyqibZ[enx}zwtromnrw|yqh_[\^_abejoty}~}{zz{|}~ľżwne\STamy}yvrokhhlpuy}|qfZVX[]_bfkpu{}zwvwxy{|xv{ý½¾úzzz{|}~ulcZQS`ly|xuroliilptw{}}qeYUX[^adhlpuy}~zusuvwyz~xvz½ƿ¾üyyyyz{|}}|tme^VXbmw|wutsrqpqsvy{~~~~}rg\X[_bfilnpqsux~ztrtuwyz}ľxxxxxxyyy|~ztmga[\emv~|wsrstuvwxz|~|zwuw||rh^[_cgkopponmlpx{sqstvxz}¿vvvvvvvvuw|}{xsnid``gmtz~zwsoorux{~~zuqlnt{|sj`^bgkptuqnkgdhs~|sortvxz|~ſuuuutssrrsw|~{z{}~}{zxvrokhdeinrw{|xuqnklqv{~wqjddlt|{skcafkptyysmga[_m{|rnqsuxz{|}~~Ǿtttsrqponosw|}yurqsuxz||{yxwusqomkiilnqsuurolifipw~~uld[[dnw{tmedioty}uld[SWhx}qmpruwz{zyyxwzÿǼ½ƿvvvusqonlmquy}{xurqsuwy{|zywvtsrqponmnnooppnmljils{~tkbYYbkt}ztmgflqw|wof]TXhx|pknqux{|{yxwvw|½øſļ{{{zwtrolmqtx|~}|||}~~~}{yxvutssrrqpomlkkmnpqsv|~ume\\dlt|ysnhhmsx~{tme^ao|xlimquy}~}|{z{~ý¹Ľž¼{xtpmmptw{~}{ywvvvvvutqoligglptx|~vog``gmt{}xsniiotzytnhkutifkpv{~~»ýՆ{vrmmpswz}}{yxxxyyywsokfbcjqx~wqjdciotz{wsnjjpu{{wst|zpfdjpv|ʌ~ysnmpsvy|}zyz{|}}{uoic]_is|~xsmhgkpty}}zvroklqw|}~vlcbipv}|yvst{{unloruxz~|{|}~woh`Y[gt~ytpkknqtx{{xurolmsx~zqh`_gow~zsmf`akt~¿ȿü}wpnqsvx{~|{}~xpiaZ]iv}yuqnmpsvy||yvtqnpuzxqibcjqyyrkd]^gpzľ¾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nmptwz~}wsrrqppprtvxz}ʾvrx~xyſпʾ{uolmmnnooppqqqrrrrrrssstttvx{~}zwtv||vqomkhfhmrw|~|yvspmow~xqihkosw{}~}umhhhhgghkmprux|ķǶpjqw~xvz~|~µysonmlkijlmoqsssssrrrsstuuwy|~~|z|}vrolifdejouz}{yvtrt|wpigkosw{~zqieeeeffgjlortx{õͻpjpv}|xz|}ûxw}~Ƶɼ|xtqmjffilnqttssrqpprtvxz|}{vqnkhebchmrw{~|~~}}}||}}wrlkosw{}wrlijjjkkmoruwz|ƻϾxrv{~~~Ľyx}õȾ}}}{uoicbfjmquutrqomnqux|~zuqnkgdaafjosw{~~}~~}yyxxwwxz}|xsoosw{|xuromnooppruwz}y}}{{y}ƾzzz|yqi`_chlquvtrpmklqvz|xuqnjgc``dhlpswy|~~}|{z{|}~~yutssrqruwz}}zxursw{~yuttsrqqrstuvxz}ýĵ|x}Ƽ|z}ǿwwwy}}rh][`fkqvwtqolijpv||zwtqmjfb^^beilprtvxz|~~{zzyxxxyz{|}~uqponmlmoruwz{zyxwvw{|wyxokmoqrtvwxyz{}ƽǹ{ux˿¾}z}ùtttvztgZW^djqwxuqnjfhpw}{ywvtqmiea]\_beilnoqstvwxyz{}zvuuuuuuvwyz{{rlkjihfgjlortvwwxxy{~wqs||pebfjnswz{|~ʽzqtǸû~{}÷ƹtttvz~tgZW^djqwxuqmifgow~zyxvutqmid`\\_behknnopqrsuwxz|~wssssssstuvwx|xnhhgfedehjmprtuvwxy||vpr{zoc`ejoty|}ȼǻ{qr}ôĺºijuuuw{}rh][`fkqvwtqmjghou|~zyxvutqmid`\\`dhkoqqqqqqruwy|~|vsssssssssssswtjeeeeeefilnqtuuvvwwy~~{wsu}}sifjnruy|~Ž~ts|ȿŽvvvx|yqi`_chlquvspnkhinty~}{|}zyxvutqmid`\\aejosutsrqpqtwz}zusssssssrqponrz|qfabcdefhjmpruvvvuuuw{}{zxvywomoruwz|~wu{ļúϿxxxy}{uoicbfjmquuspnkijnrvz~|zxvwy{}~}|zyxvutqmid`\]bglrwywusqoptx||xussssssrpnlkilvxmb]_acegilnqtvwvutsrty~}yxxxyyy|{usuvwyz|~zvz}ýƾļ}̼yyy{~~{xtqmjffilnqttrpnljknqtwzzywutrqrrrrssuvxyzzyxvutqmid`\]ciou{|zwtqnotx}~|zxvtssssssrolifdgq{uj^Z\_behjmpruxxvusrprw||wrpsuxz}|zzzz{{|~|||xyz{|}ƿ{|{w~ʹzzz||wronmlkijlmoqssqpnmkkmoqsuutrqonljigecdhmquyzyxvutqmid`\]dkqx|yuqnnsy~|ywvuutsssssssqmjfb_bmw~rfZVZ]aehlnqtvyywtrpnotz}wpjinrw{~}|{|Ÿ~|ywwz}yxvusr}¼|xx~ü{vqzǺǷyyyz}|wrljjjkkklmnopqqpoonmmnoqrssqpnmkigdb_]^diotz|zxvtspliea^_flsy~zvsooty}~|ywwwvvvvvuuuusokgc_cmw~sh^Z]`dgjmortvyyxvusrswz~~xrmgflqv{}{yz}ǺĿ~|zy{}~zwtqmwŸſyz}yķóuuuvy|~ytoighijklmmnnooooooooopqrsttrpnljhfeca_aflqw|~{xvspnkifdacinty~{xussux{~~~}||{{zzzyxtqmjfiqzxpheghiklnoqsuvxyz{|}}}}~~~{wsokgglqv{~~}zwttx{~ƺ¾|xtowƻýɽʽqqqrux{}zupkfeghjlmnnnmmmmnoopqrsttuvuspnkigfedcbdiotz}yurnljihfegkpuy~~|zxvvwxyzz|~~~|yvspmov}}xsqppoooopqrstvz}}yvspnljghmquz~}{ywuux{}~{wsoorvy}Ż|wqvĿ½·mmmnqtwy|{vrmhcbegjlnonmlkjklnprsuuvvwwvspnkhffeeedglrw}~zupljiiiiijnrvy}~}}|{zyxwvuuv{~{yvtu{~|zxusqppqqqru{|unjjiihhjmquy}}zvsollquy~}xtojjmqtx|Ļzsv¿½̿ļ½Ļiiijmpruxwsnjea`cfilopnmkjhhknpsvwwxxxywtqmjgeefffgiotzzuojghijklnqtvy|}}}~~~|zwtqoqx}{{{wsqppppos||qfacdeghknqux|{vqlhcciou{|vpkedhlptw{~ļ}|~}uu}ÿοʽºeeefilnqtsojfb^]aeimpqomjhffjmqtxzzzzzzxuqmifdefghilrw}{tnhegjlnprtuwy{|}~{vrmiku{urqponmr}{m^X\_beilortwzyslf`Z[bjqyztmg`_cgkosw{ý¾~~|ywx~wuy~̻ȷǿfffhjloqsrnjfb]]aeimqrolifcdhlptxzzzzzzyuqmjfefgijknsx}ztnhfiknprtvwyz|}~{vqkfis}~yusrpomr~{l\VY]`dgknqux{yrkc\TU^fow{tnhaaejosx|~}~~{xy~|y|~¿ŴúĿmmmnpqsuvuqmid``cgjnqqnkgd`aejnrwyyyyyyxtqnkhghijklosvz~}ytpkjlnprtvxy{}~~yuplgirz}zxvtrpt~{m_Y[]`bdglquz}tlc[RS\enw}xsniiou{÷ƽĿtttuvwxyzxtpkgccfilorqmifb^^cglquxxxxxxwtromkjkllmnpruxz}}zwtqnnoqrtvwy{}~}{wtplhjqx}zxusv|oc]]^_``djpv|wmdZPPZclv{xtqryżĽɿ{{{{{|||}{wrnjfehjmorqmhd`[\`ejotvvvvvvvtrpommmnnooprsuvxxwvtsrrstuvwy{}}{yurolijpuz~|yy}|yvx|qf``_^]]`how~yodYNNXaku}zx{½Ŀ~yuqmihjlnprqlgb]YY^chmruuuuuuutrqpooopppqqrrrssstttuuuvwwxyz}~{yvtqomjkorvz~~{yvsqrv{|yz|sidb`][Y]fow|pdXLKV`ju~ĸ|xtpljlnoqrpkfa[VV[aflqtttttttssrrrrrrrrrrqpponoqrtvxyyzzzz|~~zvtrpomkknprtvvspnkhjpv}~|||tmgd`]YVYdnx~qdWJIT^it}~~Žƺ}xtokiklnpqpje_ZTTZ`ekqtuuvvwwvuttsrrqqqppomlkjknpsvxzzzzzz|{xuspnljjkmnprqomkigiou|~}|~|}~wqlhda]Y]gq{tg[NMWblw¿~~{z|}~½Ŀǽþ¼|vqkfdfikmpnic^XSSY_flrvxy{}~|ywurponmlkjjihhghknpsvwxxxyy{~}yvrnjgfhjlnpqponmlnsx}~~~}}}{{|vroligdgowyncXWakt~÷}ywxyz{{»ƿĿ¼ĸztmg`_behknmgb\WQRY_flsx{~~zvromkjhfeeedddehkmpsuuvvwwz~~ysnicbdgilnpppppqsw{}z{|}}~}yz{xvtrpnqw~}tkbbks|˾{wtuuuvvzƽý¿˾yrjc[Z]aeillfa[VPQX_fmtz~|wqmkhfca```aaabehknprsttuvy}|ung`^adgjmoprstvx{}yvxz|~{xy~}|{zy{{sllt|ŷytrqqqqqu}¹˿žžŶxog_VTY]bfkje_ZTOPW_fnu|xqkheb_\[[\]]^`behknpqrstuw|vne]Z]adhknqsvx{}~{usux{~}zwx~|vw~̽~xronmmllox~~ʽ´úǽ¼˻vmd[QOTZ_diic^XSMOW_fnv~ypjfb^ZWUVXYZ[]`behkmnoqrsv|xncYVZ^bfjmqux|~wposvz~~{xuw~}»ó}vplkjhgfjrz{tsw{ĵĿǹý~umd\SRW]bhmmf`YRLMV_hpyxohea]YUTUVWXY[^adgjmnprtvy}xndZW[_cglosvz}~wqptw{}zwtv|~ü{tnjjiihhkryxpnsx|Ͽ˿ŷÿļŴ~~~{tnhb\[aflqwumd[SJKU`jt~vmgda^[XVWWWXXZ]adhknqtvy|~vnf^\`eimqtvxy{}~~~~~~|wvy{~~{xuuz~žķysljklnoqtx}zqpv|˽Ľżû̼wwwwxxyyyxtplhdejpu{~si^SIIU`lw}tlfdb_]ZYXXXWWY]adhlptw{ztnicbfjnrwyyyyyzzzzzzz|~}~{xutwz}~wqkilpsvy|~|sryĹǼÿùõooooprstuusqpnmotzzm`TGGTan{zrjedb`_][ZYXWVX\`eimrv{~}zvsokggkptx|~|{yxvuuuuuuy|xutuvxyz|~ļ|uoiinsx}~ut|¸˾ggggikmoprrsttux~rcTEESbp~xpidcba`_^\ZXWUV[`ejoty~|zxvtsqomlmquy}|yvsqqqqqqu|}yussrrrqsvz}¿ytnhhov}vvſ¶^^^_bdgilorux{~veUDCSbr|ungcccbbb`^[YVTU[`ejpv||ywurpoooopprv{~ytommmmmmqy}yurpnlkijoty}Ŀ}wrlfhqyxxµXXXY\^adfjnsw{tdTDDTds~xrlfccccbba_]ZXVW]bglrw}}zwtrollmnpqrux|}ytommlllkow~}yvromjgdfkqv|üĺ}xrmgir{}~}}ĿŽƼTTTUWY[^`chmrw{~uj^SHIWes~yuqmiecbbbaa`_^]\[]afkpuy}}zwtrollmnpqrtwy|~~{xusqponmlnu|~}zwspmjgdfkqv|zuojkt|||¿¼PPPQRTVWY]bglrwyxvusrng`YRKNZfs~ysomkifdcbaa``___```bfkosx{}~}|zwtrollmnpqrtuvxyzzzyxwvusqonlntz{z|~|zxuqnkhefkqv|ǿ|~¾ȿ}wrlnu}z{Ŀ¿LLLMNOPQRV\agmssokgc_[YVSQNR]hs~}vpieedddccba`_^^`abcegkosw{}|||{{{{{{{{zwtrollmnpqrssstttuuvwxyxvtqolmrw|}zwwy{~~|zyvrolhefkqv|xvy|Ƽzuopw~yyHHHHIJJKLOV\bhnng`YRKIKLNPQW`is|~vnf^[]^_abba`_^]]`begjlpswz~|zwurrtuwyzzwtrollmnpqrsrqponoqtwz||yvspmmquy}|yvssvy|~~}~~~~}|{zwsplhefkqv|ɼzrosx|ù}wrry}xx~¾ŽûDDDDDEEEEIOV]cjh_UKB8665=EMT\bfimptsmga[UTVY\_ba^ZWSPRYahpw{||}}~|yvspmlnprtvurokhddfhjlnnkhfc`bhmsy~{xusrrsstutsqonlmptw{~~}|{zyyyyyyyxwwvuuvvvwwuqnjfcchlquz}{wsrstuvwxyz{|}ƽ~ytsx}{ww|ĿźZZZZ[[\]]^^__``]VOHA:;BJQYaefhijkjgc`]YY[\^`ba\WRMHKT^hr|~}{zywvtsqqrrsstrokgc__adfikkhec`]_ekqw}~|zxvuttsrqqponmllorux{||{zyxxxxxxxwvutsrqrrsttsolheaaeimqty}ļ}}||{{zxvtrpprtuwy}|wrrvz~{xy}Ŀľcccdeefghgeca_]ZTOJD?@GOV]ehgfedcba`_^^^_`abc`ZSMGACP\ht|zwuvvvvvvuttsrpkgc^ZY\_behhfc`]Z\ciou|~}}|{zyvtrpnmmlllkloqtvyzyyxwwvvvvvvvtrqonmnopqqpmifc__cfilotzý|trvy|}xsnihjmortx~zuqptx|}{yz~ú½ļmmmmnpqrsqmhd_[VSOKGDELT[bikhda^ZY[]^`bcccccc_XPHA97;K[kz~|wsojd^YSMLOSVZ]^^]\[[\aejnsvxy{}|zwurqqpppoonnnmmmlllkklmoqrtspmifbbehjmpqpoonmmnpqrsw~}vpibclu~{qg]Z]`cfimquz~|wrmmrvz~||÷»ùmmmosw{~yrkd][`dhmqrqomkifa\WRMKMOQSVWWWXXXVQLGB=AP^m{}yupke_YSMKNQTWZ\]^^__adgjmprtvxz|}|||{{zxwutrqonlkihhggffgjlorutqmieaaehlptvvwxxyz{{|}~~xurolhjqw~yqia^`begjmquz~}xsnnsy||~żĻhhhjotx}zsmf__fmsz|wqlgb^YUQLJKLMMNOPQRSTSPLIFCGUbo|~zvrmf`ZSMKNPSUXZ\^`bdfghjklnpruwy{}~~{xvspnkhfdcbba`bfjnrvvqmid``einsw{}zqlmmnnoqvz~xqkdaceghjmquz~¸ytnnu|}|~½ſ»bbbekpv|{tnhbclu~vme^[WSPLJIHHGGGIJLNOPNMKJHNYeq|{wsngaZTMKMOQSUX[_bfikjjjiijmoqtvy}}yuqnjfb`_^]\[]bglqvwrmhc__ejpu{xndaeimquxz|~|wqlgefghijmquz~ztnow~|~Ľ¾Ȼſ]]]`gmtz{vpjdgr~znb[XUROLIGECA??BDFIKLMMNNNT^hs}}ytohb[TMKLNOQSV[_dinomljhffiknqsw}|wrmhc_[ZYXWUX^dkqwxrmhc]^ekrxznbWU]dlt|~~|yurnkiijjjkmquz~˽|unpy~|}ź˻[[[_elsy|wrnimypbZWTQNKHEA>;88<@DHLNPQSTV[dmu~|xtnhb[UOLMNPQRU[aflrspmjgddgjmpsw}~ytoid_\ZYXWVX^djpvwrnjeabhmsy{z}uj_UT]fow~|{xurpmjijklmnpswz~|uopy~|~}}Ź²ź^^^agmsy}yvroste\YUQNJFB>:6239?EKQUWY[]_dkry}yuqlga\VQNOPQRSW]cintvrokheehkorvy}{vqlgc`__^]]^bgkostrpnljjnqux|zutwz}{tle^^emt{}{xurokhddgjnqtvxz{}|vpqy~|z{Ƚʼaaadinsx~}{ywuzwi_ZVRMID?:50+-5>FNW\_adfimrw|{wrnjea\XSQRSSTUX_ekqwxtpmieeimptx{}}xtokgddddccdgiknpqqqrrrstuvxy|}xtoortwz}~zvsokghnty|yvrokgc_`ejotz|||}}}̿{vqry}}xyµdddfkotx}~~}}|{{la\WRMHB<60*$'2=;952.*'*3=;8631.19BJRZ]ZWTQNNQTWZ]`behkmmkhec`__```aaaa````^]\ZYYZ[\]^_abcefghijklmnoopqwxpiaYRPSVY\_envyncXW_gowzsmf`]_`acdjv{uojddkryĻ¿¿¾¸|xuqnjgec`^\[]^`abl~ĽYYY[_dhlqtvy{}~}{zxy|þ{rh^TJECBA?>=;:9769@HOV]_\YVROORVY\_bbcdefec`][XWWXYYZ[]^`bddba`^]\\\\\\\]]]^^`cehjmopqrtuzzsmg`ZTQSUVXY^fnv~wphaahpw~}ume]Z]`dgjpz|wqlgbcjqw~¿Ƚ}zwtrponmlkihfedmTTTW\afkptvxz|~}tke^WQJFECBA??>>>>>AGNTZab_[XTPPTX[_bccba`_]ZXURPOPPQRSUX\`cghgedca`_]\[ZYXXXWWY]aeinprtuwy}~unid`[VSSSSSSW^elt{}yurnjlrxvmcYW\afkpv}~{wrnie`ahov}Ŀ¿ø}||||||zvqmiemĹPPPSY_ejptvwy{|~{oc[XTQMJGFECBA@ABCDEHNSY^dea]YVRRVY]aeec`]ZXURPMJHGHIJKLOTZ_ejlkihgeda_\ZWVTSRPOQW]chnrtvx{}{pifb_[XUTRPOMPV]cjptttsssv|xlaVT[ahov|}yuqnjfb^`gnu|~~~}þ|}»ʿ{tmfnǼLLLOV\ciptuwxz{}|n`RKKJJJIIGFECBBDGI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osw{q^KCFHKMPRSTUVWWVUTSRTX\aeijgda^[ZZZ[[[ZWTQNKMSY_ekmkhfda`__^]\_flrx|xvuuttstuwxz{|||}}}~tjaWSTVWYZ]`dhkoqpppoory}wuwxz{}}zxusqsz||||||ytnid^]_adfhigeca_blv}wttuuuvx~ȽȾ~~ƿĿwos[[[ZXVTSQQTVY\^bfjnswwfUMNPQRSUVWYZ[\\\\\\]`cfillifc`][\\\\\[YWVTRSY^chnomljhfdb`^\Z\biov||xvwwwwxxz{|}~~~}~zpf\QNQTW[^adgjnqrsssssw~~wstuvwxxwwvuuw}|}}}}}ztnic][^`cfhifdb`^blu}wtsssssv{ǽʿ~~zxƿ¾zrv\\\[XUSPMMOQSVX[`eins{tg`_]\ZYYZ\]^`adfiknopqqrsqnjgc`^___`````___`bdfhjkjjjiigda^[XY^chnswy{}|yurnnruy|~~~~xog^URW[`dhklmnopqrrrssw~~wssssssstuuvwy}~wqjd][]_adfffedccfnu}|wutttssuzĽǼ~~|zĿy}^^^\XUQMJIJLNOQUZ_dinwysokgc^]^`abdglqv{~}{zwsokgcabbcddefhijlljihgffghjklkgb^ZUUY^bfjmnpqsttqnkhegmt{}zwsrtuvxyz|}~~vog`XW]bhmsutsrqppqqrrswwsrqponnpsuwy{}{sle^[\^`acdeffggjpuz~{xvuuttsuz~Ĺ~~}{___]XTOKFEFGHIJNTY_ejs~yrkdacdeghlt{|xsojfdefgghjmpsvxxsokfbadgjmpnid^YSRUX[^acdefghhec`^[_ir|ztngfhknqtvwyz{}ztnhb\\cipw}|yvspoppqrswwrpnlkijmqtx{}~~~~vnf^[\]^_`bdfhjlorux{~}|{zxwvvutsuy}~}ŷ|aaa^YSNHC@ABBCDGMTZ`foz}sjeghiklr||xsnighijklosx||umf^\aejnsrke^XQOQRTVXYZZ[\\[YWUSQWdq~wnd[Y]bfkorsuvwywrmid_ahpxzupnopqrswwrolifdejosx}~|{yxy{~xpg^Z[\\]^`cgjnqstuuvwwxxxyyxwvutsux|ʿ}}ɺ}ûbbb_YRLF?<<====AGNU[bkv{ojklnopw|wqljkmnoptzzpeZX^djpvunf^WOLLMMNOOOOPPPONLKIHO_osg[OLRX^djnoprstspmifcenw~volnopqrxxqmjfb_`fmsy~zwtqqv{{qh_ZZ[[[[^cglqvwvtsqpprtvxyzxwvutux{~ĺǼ}}̾~¹ɿdddaZTNHB??????AGLRW]epzvqrsuvx~|vqljklmnpt{}rf[Y`gmt{zriaYPLLLLLKKKKKKKKKKKKKSbr~rfZOLRX^eknnoooonljhfcfow{tmjlnprtywqmjfc_`flrx~|yurnoty~{qg]XYYYZZ]bhmsxzwurommpruxz{yxvtsswz}}|Ⱦ¸}|;}ǽ»Żeeec^YTOKHHHHHHJLORUW^hr}~z|~|wrmgefghijnu|}sja`gmt{xof^UPPOOONNMMMLLMPSVY[bmxzrjbZY^bglqrqomkjhgedcadiou{|xsnihknpsv{}upnljhffjnrvz{yvtrpqux|xndYUVWXYZ]bhmsxzwuspnnqtvy||zwuspquy~yxż}|ʻzùĽĽfffea^ZWSRRRRRRRRRRRRWajt~~{wy|wrmhcabccdeipv}|unggmt{~ulbYTSSRRQPPOONNPV[aflrx}zvrnjffimptwwsokhdbaa``_adhknrromjhefimqux}{soonmmllnprtuvuttsrsvx{~vk`UQSTVXY]bhmsxzxvtqoprux{}}zwtqnoty~}ut{½}|~Ǹ|xžÿhhhgeb`^\[[[[[[ZWUROLPYblu~}ytpkmt||vrmhd_]]^^__cjqx|wrlmt{{qg]XWVVUTSRQQPOS[clt|}zwvvutsrrrrrrsuwy{}{upjd^[\\]]^^_`abbcbbbbachmqv{~xroopqqrrrrqqqqrrsstuwxz{}sh]RMPRTWY]bhmsxzxvtrqqtwy|~{wsolmsy~zqpw~}|~ŵyu|~~}iiiihggfeeeeeeeb]WRLGIRZcluzz{||}{upje_`hpx~zuqmhd_[XYYYZZ^ekry|xurt{vlb\[ZYXWUTSRQPValw{wsokiiiiiijnrvz~xph`XUVXYZ\[ZXWUSSUWY[]aglrw}{upnprt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ysnhc^YTNIIOUZ`fknrvz~~{wsolkorvy}|vpnqsvy|ľzx{~|wqlo{}yy~~~~|zwtqnmmmmmmlkjhgedb`][YZ_chlqroljgddgjmpsvxy{}|unf]TJA88AJT]fkjjjiikosw|~}|zxtplieejotx}~zwsplq}}{zxvwy|xof]TQTWZ]_behkmprsuvwy{~wog_YVSPMJKQW]djnruy|{wrniimptx{}wrprsuwxzwz~{vpjmz¾ǿĿĂ|yuqnllllllllmmnnlhc_[VW\afkprpomkiikmoqstuuvvwy{~~wof[QF<22=IT_komljhfhmrw|~{xuqomjhfdflrx~zvrv}yuqptx{xog^VSVX[^aeinrw|~~~}vk`UONMLKJMSZ`gnruy||vqlgfjnrvz~}ytrssttu|Ļ¼yvz~{unhkxýȾƿ|xtplkkkkllmnoqrsqlga\WV[`ejopomljiiklnpqrssssstvxz|~|tmdYOE;01=IUbnrolifbdinsy~~zvrnjgedba_bipx~zwz}xsrux{~~vnf^URTVXZ\`flrx~}|~sh^SMMMMMMQW]djpuwz|{vqlggjnqux~~{|xvvvvvv~ýyvy}|vpjn{¼þ|||zwtqnkjkklmnopqrstsnid_[Z]adhkljigeddfikmpqrrrssssssssvz~{unh`WNF=45ALXdosokgc__dinrwwsokgc`^\ZXVYaiqy~|z}}|}}~|tld\TPQQQRRV\cipvz{|}~~||}~vog`XTTTTTTW\bgmrvxy{}~zvrokjloqtv{{y}}}}}}}Ȼžzwz}~yuqvŻ¾vvvuspnkiijlmoqrsttuvtplgc_]_adfhhfdb`^_behknpqqrrsrpomkikosw{~ysnic]UNF?79DOZfqtoje`[[_chlpplhd`\YVTQOLOYbkt}~~~yqjbZSNMLJIHKRYahosuwyz|}~~~~~}|{{||}}~ysojfb][[[[[[]bfkptwxyz{||yvtqnnopqstxxw|ƿzxz|}{y}ļ¾qqqpnlkighjlnqsuuvvwwvrnjfcabbccdca_][YZ]aeiloppqrsqnjfc_`dhlptsokgc_YSMGA;=HR]hruoic]WVZ^bfjiea]YUROLIFCFPZdnx~~|vog`YQLIFDA>@HPX`hmortvyzyyyxxxxyzz{{zzzyy|}umhgfedbbbbbbbdgkorvxxyyyzyxvusrqqqqrru}}uu{ǹ{yz|~ĸǿǾkkkkjihgfgjmoruwwxxxywtqmjfddcbaa_]ZXVSTY]bfknopqrspke`[UUY]aeiifc`]ZVQLHC>AKU_jtvohaZTRUY\_cb^ZVRNKGD@=9=HS^itz|~ztle^WPJEA=846>GOX`filosvwutsqpprtvxzzyxvutw{z}tja^`bdfhiiiiiijmpruxyyxxxwwwvvvutsrqqpszzsry;»|z{|}~üǸÿĽĿffffeeeddfimptxzzzzzzyvspmjhfda_][XVSQNOTZ_dilnopqrohaZRKJNRVZ^_][YWUROLHEBEOXbluvog_XPNPSVY\[WSOKGC@<8404@LWcowz~yqjc\UNHB<60*+4=GPY_cgkossqomjhilosvyzxusqos}~trw|uj`USX]bhmppppppprtvxyzyxwvuuvvwxyxvtrpmpw~~wppxó}{{{|||~żʷĺÿĽ____```aadhlptxzzzzzzyvtqnligeca_]ZWTQNNSX\aehjlnpqng_WOGEIMQUY[YWUSROMKHFCFOW`iqrkc\UNKNPSVXXURNKHEA>:737CNZeqx|~umga\VPJC=60*+3>>@DHLPTX\aeimpqrstutqnlifglpty}}wqke`[YVSPNOTZ_ejje`[VQPTX\aed_YTNIFEDDCBCDEGHJJJJJJJKMNPRSVZ^bgkmnoqrsv{{z}||{zzywusqpmjfc_\[\^_aba_\YWTSTVWXY\_behklkigfdflrxyoe[QPW]dkruttsrqrstvwyxurpmjknrvz~}zxvtux|xof]bt~}|ù{wtsqonlou|ý5558=BGLQUZ^bfjmnoqrsrpmjhegmsy~xqkd_ZUQLHIOU\bhie`\WSSW[_chf`ZSMGCCCCBBBAA@@@@BDFGIKLNOQRV\agmswz|~yx{ywusqoljgeb`^\ZXVVZ]`cggfdb`^]]\[[Z[^adgjkjhgedfmszynbWKHNTZ`fjkmoprsssttuutsrqpqtw{~|ywtuy}ulbY_s¼~}|ĸ{vqnlkihfipw}ú2224:?DIOSX\`dhklmnoppmkhecekrx~~xqkd^YTNIDEKRX_egc`]ZVVY\_bed^XSMGDCCBBBAA@??>?BEGJMNOPPQRU[bhnty{~wv~ytrpnligda^[XVVUTTSUX\`cgihggfeedccbabdfhikljigfdglrx~vk`UJGKOSW[_cgkosuuttttssssrrsvy|~|ywtuzwne\bwĽ~|z~̿|wsqomjhjpv|ź3336:?DINRVZ_cgijkkllligeb`aglrw}}wqke`ZVQLGBCINTZ`ba_^\[[[\]^^]YUQNJGFECBAABCDEFHJMPRUVUTTSRUZ_dinqstvwy{{ttz|unjigfeca^[XUQPQRRSTUX[^acefgghiijklmnoooooonlkigfgknrvzwog_WNKLNOPRV\cipvyxwwvutssrqppsvy|~}zxvtv||umflľ|yvzź~yuqqvzú5557;@DHMQUY]afhhhhhiheca_]^cglpuupje`[VRNIEAAFKQV[]^^__`_]\ZYWVTRPOMKIFDB@@CEHJMPRUXZ]][YWUSTX\`dhjkkllmotx}{vrrvzxqjc`__^^]\XUQNKJLNPRTVXZ\^`bdfhjlnqsvy{|zxvtsqomkiggiklnpnhc]XRONLKJHLU^gpy}|zyxwutrqomnpsvy||zywutw~|vpvĿ~zwsvzy|º6668<@DHKOTX\`dfffeeecb`^\Z[_bfimmhd_[WROKGC?@DHMQVY[]`bdc`\XTPOOOOPPNKHEB??DHLPTX[]`ceea^[WTSVY\_bccbbaachnsx}~~}}{ywtrppruxz}{tmf_YUVVWWXVROKHDDGKNRUWXYZ[\^behlosw|~zvsqomkigggfffda_\YWSOKGC?BNYep|}|zxvtrpmkknqsvyyxwvutw{ľ}ytor}ſ8889=@DGJNRV[_cedcbaa_^\ZYWXZ]`beea]ZVROKHDA>>BEIMPTX\aeihb\UOIGJLNQSRNJFB>?EJPV\`cehkmlhc^YTSUVXZ[\ZYXVUW]ciotwutrqoonnnmmnopqrspib[UNKLNOPRPMIEA=>BGLQVXXXXXX[_dinsx~zvsqoljheca^\[[[[[[WPJC<59GUcq~|zwtqolihknpsvwvuutsxļŽ|wqlnyǿ999;>ACFIMQUY]bcba_^][ZXWVTTVXZ[]]ZWTQNKHEB?<FMT\chknpsvtnha[URSSTUUTRPNKIKRX_elnligdbbdegikkkjjiie^WQJCACEGILKGC?;67>DJPVYXWVUUW]cjpv}}xvsqnlhd_[VRQTVY\_[RH?5+/?P`q~|xuqnjffhknpsttttssyżż{uohjuøƾ:::<>@BEGGDA>;9:@FLRX[ZYXWWY_djpu|}xvsqnlhb]WRMLPSW[^\SJA7.2BRbr}zwtpliedgiloqrrqqqpvûĺ|vpilvʾƾ:::<@DHLPSVX[]``_^]\[XUROLIIKMOQSSRQONMJFB>:67CGKPPMIEA>@GNU\chjlnprpjd^YSPQQQRRQONLJIKRY`gnqpoonmmmmmmmligeb`\VPJE?=>?ABCDDDDDDFJOSX\^^^^^^`dgjnquz~}yvtqomjfa\WRMKNQTWYXSNIC>BO[hu}zwtqnkhddgiknpponmlkq}ƽ¸~ytpr|ƽľ:::>>???ADFILNQTWZ]`bccdefghjklmnprtvxyxwvvusqomkie`[VQLKMOQRTUSRQONR[enw}yvspnkigddfhjmoomkjhfkxĽ}yvy»:::=CIOTZ]]]^^^]]\\[ZWRMGB=>==<<>DIOTY]^_abcegijlnomlkjhggffeefhjlnqqomkigd_[VQLJKLMNOQTVY[^bhnty}yvrolkigfddfhjlmmkhfcafr¸ûʿ~|ľ~¾:::=DKRY_ba`_^]\\[[[ZWPJC=658ABBAAA@CHMRW\__`aab`]YURNMNOPQRRRSSSTW^elszytojfa]XTQMIFB?><;98;DLT\dhhhggghknqsvvrokhda^[XURSX]bglnmkihfc^ZUQLJJJJJJNTZagnruwy|~}zvrokihgfeddfgiklkheb_\`my{wvutsrsx}½ǹŽɽ¾|~}:::>FMU]dgec`^\[[ZZZZVOG?80.26:>BEGJLNPMF>6/'*8FTbpurolif`XOG>63468:<=>??@ADHLQUY\\\\\][XUROLKMNOPQRSTUVW[bipw~}vpke`[VROLIFC@>;9749DNYdotrpnlkkoswz~}wqkf`ZTOID>?HPX`hljigfdb]YUPLJIHGFEJT_is~~}zwsokgeedddcdeghjkjfb^ZW[gtwnifdb`]`hpy½°ȼ½üz}½vt|:::>FNV^fifc`]ZYYYYZZVNF?7/-26:?CGIKNPRPIB<5.1?LYgtytpkfb\TLD=52468:<>>>>??BFKOTX[[\\]]\YWTQNMNNOOPQRTUWX\dkryzrlgb]YTQONLJIGDA>;8FNU]egda^[XVWXXYZVOHA:326;@EJMOPRTUTPLHD@CMWalvxrmga\UOHB;4369<;=BHNTY]^`abdc`]ZWTRQPONMMOPRTUZbiqyxpic`\YURPQRSSTSPMIFCFOXajsvspnkhinrw{xrlf_ZVQMHDDJPV\bedddcca\WRMHHKNQTW]gq{{wtplheba`_^]_cgkosusrpomqyyqlkigecflszʽȼ~~þƿsqx:::>EMU\dfc_\XUTUVWXYWPJC=76;AFKPTUVWXYXWVTSRT[bipwxqjc\UOJD?9438<@EIIEB>:68?FLSZ_acfhjjgc`]YVTQOLIIKMOQRW`hpx{tmf_ZXVTRPPSVY\__\XURNPV]djqspmkhefkpty~}xrlfa\YWTQNNRUX\_aabbbc`[VQKFFLRX^dlt|{vsolheb`_][Y\agmsy|}}~~~~wtrqponpty}ĿŻɼyyĽtry:::>ELT[cea]ZVRQSUVXYWQLF@::@FLQWZZ[[[\]^_abcfjnquywog_WOIE@<8349?DJOOIC=823;CKS[adgjnqqmjfc_[WSOJFEGIKNPU^fow~|zvoib\UQQPONNPU[`ekkhda]YZ^bgkopnkhebdimrw||wrlgb_]\[YXXYZZ[\]^_`ab`ZUOIDENW`irzzurnkheb_]ZXVX`hpw~{zzzyyz|ÿʽ|tu~Ĺºusz:::>ELSZac_[XTPOQSUWYWRMHC>?EKQW^a```__aeimquxxyyz{vmd[RIC?<9634;BHOUUME=5-.7@JS\cgkoswxtplhe`ZTNICADFHKMS\enw~zvsojd^WQKIIJJKLPW_gnvxtplhddfhjlnnkheb`afkpv{{vqmhcaaabbbb`^][YY[]_`b`ZTMGADP\htytqnkgda^[XURU_hr{¿˾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QValx}wppv{ſrdewºý```_^^]\[YUQMIECCCCDDGMSY_eea\XSOMMLLLLLKKJJILT[bippib[SLIJKMNOLGA<613=HR]gmnnopqqqponmh_VMD:5543324:?DIOU\cjqxzuqmida^[XURNID?:55:?DHMT^hr{{pe[PEBFKOTXZWUSQOORVY]`bdeghjnu|seXJFLQW\bc`]ZXUSSSRRRWbmx|si`_hpx¾½scdw˿¿hhhgeca_^[VRMIDBBCCCCFLRX_ee`ZUPKHHIIIJIHGEDCFNU]elmhb\VPNOPQRSPJD>825@KVbmrqponmmlkkjie\SJB94432214;BHOV[`ejotuqnjfc`]ZWURNID?:658<@CGNYdny|pcWK?;AGMRXZWURPMNQTWZ]_adfhjowwj]PC?FLRY_a^\YWTRRRRQQValwyoe[[dmwĿ½uegyµ¾qqqpmkhfc`ZUOJEBCDDEFHMQVZ_^ZUPKFDEFGHIIHGEDCELSZagiea^ZVTUUUVVTPKGB>@IR[dmpmjgebabbcddaZSMF?:975425>GPYbgijkmnmjgda^\YWTROLHEA=98;=@BEKU`jtxl`TH<9?FLSY[YWUSQQQRSSTVZ^beiow|tkaXNECHNSY^`^[YWUSRRQPOS^is~zrjbckt}xkm~¹{{{yvsplie^XRKECDEFGHJMPSVXXSOKFB@BDFGIIHGEDCEKQW\bdca_^\[[ZZZYXUROLIKRX_flmid`[VUWY[]`^YTOJEA>;8527BMXdosqoljheca^\ZWUSQOLJGEB?=<=?@ACHR\fpy|th\PE96>ELSZ][ZXWUTRPOMLNSX^chov~|tld_YSMGFKOTX]^][YXVTSQPNLQ[epz{upjks{ÿ|qs¼~{wsojb[TMFCDFGIKLMOPQRQMIEA==?ADFIIHGEDCDINSX]``aaaba`_^]\[ZYWVUV[_chlke^XQKJMPTW[[XTQNKGC?;738ES`n|ysmga^\ZYWUSQPNLJHFECB@@@@@@AEOXaktz~{wpdYMA64CGLQVXVUSRPMHC>949IYixxne[VUTSRQONLJIGFEEEDDCBA@?>BKT]fotvxz|~~|zwurl`UJ>32:CKT\``_^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ROKHDA>=@CEHKJFC?;7543321369;967;?CFJLKJJIIGFDB@>AIQYaih]SH=32:CKT\]WPJC=:=?BDGHHIIIJMT[bipph`XPHDDDDDDCBA?>=BMYep|}voiea]XTPMIEA>?FLSY``ZSMGA<:75307FUdsyslfcddeefhlptx|zrjbZRNNNNNNQV[`ejjfa\WSZmпļ}umnzƿÿ}xx```]YUQMIFDB@><AA?<96448=AEIJHFDB@><;986:CLU^geYL?3&&3@MZfh_ULB958;=@CEGIKLNQVZ^bfe_YRLFCCCCCCBA?>=;BO]kyxohc^YTOLJGECACIOTZ`_XPHA95432218HXhyyof\Z_chmrvy|xndZPKKKKKKOV]dlsrjb[SKRiȵ¾vmcfu¼¾º~}wxUUUSPLIFB@?=<;9:=@CFIIEA=9644444468:;96337:>AEFDB@><:987548AJS\dcVJ>2%&3AN[ij`VKA6258;>ADGJMPSUWY[]_]YTOJFCBAA@???????FTcqxohc]XSNKIHGEDFKOTY^\UMF>6334445=L\k{wmbWV]elt{zodYMHHIIIINV^goxxpiaYRYo½̹Ľwofix½¾¾yzJJJIGECA?=<:9868;?CFJJGDA>;9:::;;<=>?@AA><974468;=???>>=<<;;::9=DKSZa`VMC:01;EOYdd[RH?6258;>ADHKOSVXXXYYYWTQNKHEB@>;99==<;:986545:>BGKLJGEB@?@@AABBBBBBBA?<:865667899:;;<==>>>>?BGMRX^]VPIB;;BIPW^^VNE=5258;>ADIMQVZ\ZXVUSQPNMKIGC?;7349?DJOXdp}{vpjfb^ZVSPOMLKIJLNPRTSNID?;9<>@BEKWbmy|ri`WWalvth\QE@ACDEFKU^gqz~~}}}Ͼɽÿ44445667876532138=BGLNLJIGEEEFGHIHGFEDCA?=;976554323579<>?@ABCDFJNRVZZVRNJFFJNRUYXQJC<5258;>AEJOTY^_[XTPMKKKKKKIC=82-.6?GOWalw}~~~~~|xtplheb^[XUSQPOMLLLMNOONKGD@==@CFIMS\enxypg_VXdo{|peYMA<>@ACEJT^hr{Ǻ¿)))*,.0245321/.06<:97530.,-047;>ABDFGIKMPRUWXVUTRQQQRSSTQKF@:4258;>AEKPV\bb]WRLGEGHJLMJC<5.')4?IT_jt~wmjkmoqsrpmkifda_\ZWUTSQPONMLLKKIGECA?@DHLPTZahow~}unf^VYfsymaUI=8:=?ACIS^hr}ķŶ¿ #'*-120/.,+.4;AHNQQPPPOPQRTUVUQNKGDA@>=;:841-*&',05:?BEGILNPPQRSTUVXY[\\YVTQOKFB=83258;>AELRY_fe^WPHA?BEILOLD;2)!#1?LZgs|uh[VY]`cghgffedca_][ZXWUTSQPNLJHFDDCBBACHMRW\afkpv{yrkd]VYhvvj^RE947:BDGILNOPPQQRSVY\_ba\WRNIEA>:73369<>AFLRY_ee]VNG@=@CFILJB:3+#&4AO\ju|zk]NIMRV[_bbcddedb`][YWVUTSRPNKIFDCBBBBAEKRY_fkptx|xqjc\`mzyodYND958;>ADLWbmxż±ÿ¿|zxwusu{ž!$(+./.-,+),17940/147:ADGKOSW[[WSOJFCBA@?>=<;:98>BGKPT\gr}ƿ˿¿¿}zwtqrx}"""#%&(*,,,+**)+.269=>>=<;:@DGJMPSVY\_b_WOF>62345568:=@CEHKNQSVVTQOLIFC@=:779<>@CGLRW\bfjmqtxsg\PD85DR_lz|ri_UNLIFDABGLRW\dozǾ~Ⱦ|xtpqw|%%%%&'(*+++***)*-02589876546;AFLQUVWXYZ\_adgiha[UOIDB?<97667889;?DHLPSVY\_b^ULB90,.03579953333346;@EJOSVY\_b^SI>4*&*-148;=@CEHJJKKLLMNNOOPLE>70)*3ADGKRX_eltɼ~y|urx~||¼²vx»{y|~ysnnty½++++*))(''(()**+,./0220.-+*,28?EKORUWZ]aejotyxqke^XRLF@:411111039?EKQUX[^`c_VLB9/,/36:>ADGJMPQQQPPPPQRSSTQJB;3,-6?IR\`^][ZYXYYYZZULC:1((/7?GOV\agmsriaXPGCDEFGGHIJLMNMKIGECJ\mǿyqh^TJ@638<@EIOV^emt}ķzuorspv}}yy~¼²stzx|zuooty~///.,*(&$$%')+,./1235420.,*+05:?CGILNQSX^ekqxxsmhb]WPIB;411000/29@GNUY\^acfc\UNG?=?BDGILPTW[_`_^]\[ZZZZZZWQKE?99?EKQXZYXWVUUVWXYZVNF>5--4;BIPVZ^bgkic\UNGDDDDDDEHKORUVUTSRQXftzslf^VNF=538=BGLR[clu}¸{wsoturyýuv~xrqvzĿ3332.+'$ #&),/123567742/-*+.258CINV_is}{xvtrouxu{½xx{utw{~88850+'"!%)-145689:9630-**,.02468:<>@FPYcmvyvrnkgaXOG>510/..-19BKT\bdegikkigec`_`````chmrw|~{ywtrpnljhfd`]YVSQQPPPPOONNMLMPRTWYWQJD>77=CHNTWWXXYYXUROKHFDB@>;9<:86543214;BHOU_mzǾ¿yh`dgjmqx|ĺÿ~}{|~~|yvy}~{xv{ľAAA=5-%"(.489;<=?=:62/+('&%$##%&()+2>JVbnssssssndZPF<6421/-2<97666666:AGNU[eq}xg`cgjnqx}źɿ~~|~}zwy~}zxuzĿ>>>:4-' "&+/2456898630-*)(''&%&(*,.06>GOX`fhkmorog^VNF@><9748AJS\ejklmnopqstuwwvutrqswz~~|zxvtrrtuwyzwphaYRNMLKJIIKMOQSSRQONMMMNNOOOMLJHGFGHHIJIFDA?DINSX]bglqpic]VPKHEB?<>EMU\dhijjklllkkjjjjjjjjkmnprtutttttssrqqpqtwz|}vohaZVTRPOMLMNNOPPQQRRSRQOMKJIIIIIIIIIIJJIHGEDCDHLOSW]fowzxusqnjd^XRLIJKKLLPV\bioty~ztruy|{xtqs{{sopqqrsv}{{¾ƽž}~~}~|zw}88862-)%!!"#%&')*+-..-,+*)))****,/258;=?ABDFJRY`hoqlhc^ZVRNJGCDJQW]cgghhiiifdb`]]^_`acccbbbabdefhikklmmnptx||vohb][YVTQPONNMLMORTVYXTPLHDCDFGIKKKKKJJJJJIIIIIJJKKP[fp{~vnf_WSTUVVW[agmsy|}~zvqlhhmrw|}xsnijpv||ywvuutsv{~yyɿÿ|}~}}{y~55541.*'$#""""!"#%&'))))))))*++,-/269=@A?=<:8=@CFILNMLLKJJKLMNONKHEB?DP]iu~uka]^_`abekqw}|zwusqonljgda_\^elsz{tnhbaeimquxy{|}~|zxvtuy|~zwx¹}}|||{}}}~|z22210.,*(&$"  "#$%&'()*+,-./269=AEE@:50+/;HT`msrqponkfa[VQPTW[^bdddddda[VPJDCFIMPTSOJFA==BFKPTY\`cfjou{}wrmieb^ZVSPLIFGMSY_ec[RJA97;@EJNPONMLKKMOQSVSMF@:37ESbp~wlghijlmpv|yslgda]ZWUTSRQPT]enwyqibZWZ\^`cgmsy|xutvxz}}{ywuw~Żƾvrtuwyz}}~~}{0000/.,+*)&$" !#%&(*+,./0248;?CFE?92,&)6BN[gnnnnnnkgc_[WVY\^addca`^]ZUPLGBADFHJMLGC>:56BFJOPPOONNOQSUWZWOG?703CRbq½|pklnprtw{{sle_[XTPMKLMMNOS[bjryzrkd]VSTVWXY^emt{~zwsrtvwyzzywvtru|Žzuwy{}~~}////.--,+*)'%$"!!  #%'*,./123569;>@CA=83.*,6@JT^ccccccb`_^\[[^`cehgb^YUPNNNMMMLKJIGFEB@=;8;AHNU[______bgmsy~{ywtromkhfc`^[XVW[_cgkjc]VPIFHIKLMOPQRSTUVXYZ\YQJC<59IZjzýymhknruxz{|}~}wqke`[YVSPMMPRTWY\`cgjnmhd_[VTUVWXZ]bhnsyzxvtrpprtvxzzxvtrpszþ¸....----,,+*)('&$#! "%(+/1235679:;<>?>;740-/6>ELTXXXXXXXZ[\^_acegjlibZSLDBGKOSWWRMID@===<<@BBBBBBELSZ`glmoqrtnaTF9++8ER^kl`UJ>3/37:>BHQYbksskc[SJHLPSW[^bfjmqtuvwxyyyyyyyywvusrqqpppole^WPIIOTZ`fhgedca^YTOIDK]o{odbhou|zrjbZVUTSRQPPPPPPT[biqxwne\SJGJMPSVXXYYYZZZZZZZ\^`bdfilosvyyvsolikt}xsw{ƽĿ¿|vtuvwxyyyxxxwy{~****+,./012346750+&!!',169;<=?@?=;964345678887777777777;EOXbkqrtuwxq`P@/1BSduvhYJ;,(.49?EMV_ir{zodYOD@CFILOSY_djptvy{}~zwtsuwyz|xoe[RHGNV]elnljhfc`[WRNIQcv{uu|wla_gow~zodYNIJJKKLMMNOPQV_gpysfYL>;@FKQWYYZZZZYWVTRPQUX\_cfjnruyyurnjfir|uosw{Ž»yqnpqrstuuuuutvz~++++,,--./1357972-'""(.4:=>?ABCBA?=;99:;=>?><97421112228BLV`jpqrstun]M=-0ASewxj[L=.*18@GNU]emu}{ocWK?;>ADGJNTZ`fkpsvy{~|xwz|~~tj`VLKSZbjqtqnkhea^[XTQXhyxrklt|wnedkryyncWLGGHIJKLMNPQRW_hpy~qcUH:7=DKRY\\[ZYXXWWVVUWZ^aehknqtwzyuqmhdgpyǸxsw{úŽº½{tqstvwxyxwvutvz~////.-+*)*-036972-(#%+28?BCDDEFFFGGGHHHIIJJHC?:61012345:BKS\diijjjkdXK>2%&5DRaprfZOC75=EMU]cgkoswti^SH=:=AEHLPTW[_cfimpsvy}~~~~vnf^VV\cipvwtplieba_^][`kw}wqkffnu|zuoosx|ypf]SNNNNNNNOPQRSW]ciourg]RG=;BIPW_a_\ZXUVZ^aeilnprtvxxyzz{ytplgcenv˼~ºŽľþ~|~|yvw{3332/-*'%%)-14883.)$ '.5=DGHHHHIJLOQSVWVVVVURKE>81/02457CHNSX[ZYXWVRLFA;56?HQZbd_ZUOJLU_hqz}zwtpmg^ULB97DJPV\^\YWUSWaku}voh`XPH@76ELQUX\_cglrw|}xtokdZPF<2/269=@CFIKNQQOMKIGHKORUYYVSPLIJPUZ_djouzyoe[QKJIHGFHLQUZ^_\YVSPPRUXZ]aeimquy}~{z|~xpiipw~vlbXSTVWXYYWUSQOOPRSTV[eoy~ywxyyz{zxvtrpoooooonljhfdccdddehov}{sldhxvnje`[VW\bgmr|ļɿuonmmlkntzºwmd______cmv~{ywutrtywsy~88851-)$ #'*.120.,*)*06;AFLSZ`gnrtvy{}{vpje_XQJB;4258;>ADGKORVWUTRQOPTX\`db\VPJDDKRY_fklnprtph`WOFDGILORUX[]`cdba`^]]_abdfghhiijlpuy~}{yy{}zrjjqy}tkb]]\[[ZYXVUSQPPPOONS\eox~|yvuwz|~~~}}}}}}}}}}~~~~|{zywz~xzxohc_[VRSX^cinw»¿øwqponmlov}zri`[[ZYXW\eoy}zxusqomklqvz|z}pmsy3332/-*'%$&)+-/0/.-,+,048<@GQ[enx}|{{zyuohaZSMID?:5479<>ADIMRV[]\ZYXWY]afjnlcZQH?>GOW`hkjhfdb^WPJC<;9779;=?AEJPU[`bba``_afkptyui]QE98BLV`jlga\VQKFA<725?JU_joonnmmnoqsuwwwwwwwtmf`YRQW]cinrrsstuvy{~vmmu}}wqmie`\ZYXXWVTPLHD@AIQYaimmnnnoqv{~tka[WTPMJKPV[afmvŷzvtrpnlpy|ungaZURPMJHLWbny~ytomllllkjhec`^^`cfikr}xljpw~qc`gnv}++++,,--..--,+++,--./012234=M]m}~xqi`WNE<7888889;=>@AELRX_ehhhgggjotypaRC42>IU`lmd[RH?952.+'-89@GNU]acegikov|wndZTQNKHEGLRW]bipx~|zxvtxxx÷~{xvtqolp{|tnhb\VRNKGC@DP\ht}vpjcabccdedb_\ZWVXZ\^_gsrebhov}zl]Yaiqy..../011220/.,++,-./0123567@P`qzqi`WOF=51234678:<>@BFMT[ahlkkkkknsx~ugXI;9CNXcnne\SI@:741.+1?N]kz}zwtqrw{~wlaVLA?ELSZ`efhjlnpsvx{~ypow~}wqkebbbbbb^WPHA::AHNU\`bdfhint{ľ~tkbYSPNKIFGLPUZ_dkqx~}yxwvutyþtuȻ~}|{ywuspnr|voje`ZUQMIFB>BNZeq}yrke^[]^`acb_]ZWTTUWY[]dq}oa]ciou{wj]Zbjs{7777776655321/.-...//158<@DLYfszpf\SMF?92/00112369940.----,.37;?CIPV]dknmmllkmrw|~voh`_bfjmqromkhfb^ZUQLNU]dksuqnjgdelry~wpib\WRMHCDJPW]cfdcba_`bdfikov|~xqquz|sjbYQPW^dkrtrpmkijpv{~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\YURNNOQSUVVSQNKIKRY`gnzű½vidfikmpruwz||zxusuzxphdba_^\[[[[[[]bfkoturpmjhghijklkheb_\^elsztg_ZUPLGGKPTY]ciov|õccca\XSOJGDA?<9899:;;BN[gs|yvm]N>.!%)-//////39?EKQV[_dhmnmljighknqsvz~~yz|xuqmjgc`]Z[_dhmqnbWL@528>DIOSUWZ\^_^^^]][WSOLHJS\enwzxvtrpopqqrsv}}xqjhijlmnqv{|xurokhfecba_^\ZWUSRRRRRRRRRRRRV^emt|;ɾ}shdegijlnoqsuwwutsqprx~zrkfecb`_^^]]]\_djouz|ywtqomnnnoomjgda^`fmsztlf`YSMMRX]bhmrw|ccca]YVRNJGC?<88;>ACFMXbmw~zwsiZK;,"',1468:<>AFJOTY]_behkljigfeegijlnqtwz~~|{||zwurpmkhfccdefghd[RJA86DIOTZ^`bdfhihhhggfecb`_^^^^^^_abcefimquz~~}}||||}}}}}}|||{zyxwvsmga[UQMIEA>?ELRY_`\WRMIMYfs}oaSECMWblvyvsolihjlnprv}|ywutrqpmiea\XX[_beihd`\XTRSTUUVXZ\_adda_\ZXX[^adgjnqux|{wsokgdcba`_^\[ZXWWY[^`b`[UPJEFNW_goxο~~̻ǼŸ{wrnjecbbaa````____abcefkrz~xrnmljigfedcbaemu}}{zxuqnjfcdjou{tj`_gowƸ  S   8 h@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@f!@&`f&f:&Zfy&f4&Tfs&f.&Nfm&$@$@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_mode.vrt0000664000175000017500000000455613701057751021474 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area -3.27670000000000E+04 Gray 30 30 6.71089e+07 Mode Int32 utmsmall-int16-neg.tiff 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 -32767 0 -32767 0 gdalautotest-3.1.2/alg/data/utmsmall_med.tif0000664000175000017500000000545213701057751017552 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|ss{k{{{scckkkk{skkks{sksss{sνέ΄{s{s{kssskk{ksckZcssk{{{s{{νŽŽss{{s{cccsccckkks{s{{s{{c{sk{kkkcckkcks{ŽΜֽ{sss{ss{sskkckssk{s{{Zֵ{{{scskk{sskk{{ck{{{k{{ťޭ{楔kkckksc{skssss{ssŽ֥{kkcsk{ss{{k{k{s{ֽέŵ{ccckkksk{sssֽΜťεkkkkZcŵֵέ{Ŝέ{cckccckŵŜŵޔZcs֔ť潽ŭcŜޔc{֔ŭ凜sŜ{{{ŜΥsֽ֜֜ŵޜֽ֭朄{ŽΥ޵ﵵk{kcs{νֵΜޥΔsk{{kkkk{ŵνŵss{k{skέޥŵ{{{k{{ssŜޜ{ksks{k{{s{s浭Ό֭kksk{ks{sŔk{ޜŌ{kks{Zk{s{cs{{Ōέޭskcsks{k{{RR{֜ŽνkkJkRs{kkscsέΜťֽ֜BJZcZkkc{kssccks{浵kJ:{ZZc{ZckkZ{ks{{ֽ֜ŵŵkcBZZkJRkkZk{ZcΥ{ZkޥŽ{{R{BJRZJZks{Zc{s{Z{s{Υkνc:s{s{R{cJsZkZZkkZss{{{εscsZksZBZBssJs{Jss{{s{ֵŭ:cZBRB:RRkkJRckcBsssֵ{Ō:ZBRc1BZJJBkcRJcccŵsŭcBBBRRkR1JBJk:Jk:ZR֭{ﵜ1:1::RJ1RBscZB1R{B{ť{s޽)1)c11cJRBZBBJR1Zs{֜ŵ{{ε)111c:1RsZkJJkJJRZssŵs))Rk:JJc1ZRskZJksZ{{Z{Ŕ{kRc{Z1{JcRs{JBBJskZBJsZRB{֭{ccsZscZZ)cc{Z{sRZk{{BZZskk{JRRsZk{Zccc{kJRZZkJRRc!B::BB:JkR{{{c:RZ::{RJs޵kk{RcZcs{ZRJBZ{!)kZ)JZJJZZcJJZcccZBR{{ŵ{skRsRB:BJBBk!ZRBc)ZcZJBBBcBJRRJBcss樓RZc{cR{s{JB1BRRJ1kRs!BB:BBZc{B1:sB:JZccks{kZZRRkRRBB{ZZs:!B1)!B:R1Bs:Zkss{΄sJR{ccJRJZsRZBBsRJB{:111Bss)cZ:B)B)cs{JcsJBcBsJJ{ZZkR{{{ZR):1cBkRZ1!)JBRR1k:J1cRRJRZB:::ZcJRkk{scRkgdalautotest-3.1.2/alg/data/utmsmall_ds_cubicspline.tiff0000664000175000017500000000212413701057751022132 0ustar evenevenII*fS   JI@I@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|nw~{{}tzuvtws{zxwwzqt~|~v~||w|{qt{z~z|}y}y{zstvs~|{ww{}||{~sq}xtu~|}rqvu}~syv|y{{wzyoz{||ytw~xrnsxy|{wx}{qmmkux~{{yx{zz~~xyyqorqxzzyznuyty}qrsu|}xt|vpz{tz}lpz|rs}xv|}{uutjt{zqlnzrx}vvqmy{qokjt~tvvmnmjzwy{qkzwnqkhiho|uzz}zv{{ilnkfgotrrquz}}wronmsvnmigjovwyvnjojecdhlq|tfS   8I@I@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|gdalautotest-3.1.2/alg/data/byte_gcp.vrt0000664000175000017500000000464713701057751016721 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area Gray 20 20 6.71089e+07 NearestNeighbour Byte ../../gcore/data/byte.tif 0.125 1 0 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 gdalautotest-3.1.2/alg/data/utmsmall_near_short.vrt0000664000175000017500000000343513701057751021201 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 NearestNeighbour Int16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_lanczos_2.tif0000664000175000017500000000536513701057751020702 0ustar evenevenII*22r2 =S   V^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|x WPۇ>kz]M4NJ ,aB[hO$ ОHh @H,01Mہ=>,-dtomj8e4 CQ'g +Nj:M!aYm8ÂP4A1t&JQbPouL^Nų;ImJx!pF2KG睌1br0#iBcs;8[eݮ<8x{eT 0DH9 UiW[,Rwwz9<ғK+'3֡魄ѤըrO_1O/t~Y֖nY- 5ZX&jje(uBOBfYZ!]3zm)|aOWåyt`dι<{96:RÒy+{NӯJ][ߝnxd,+poT$T:Rlv]IP4E|S" ml-{:*pIV"0),1휭;17?)E2Fi4u:UKmB޾<8;\XNѪXm٩胭l-պ_q%v<~#vmuY>S\mnN8cR8 ?oeN9'{wN"00fPeFǛ;㥽w{ ƌ:cN!Yq -+xx2Pu*~Hq+|A5E~W]$@޻RpϪAşz hY݀,Ү+paW=ŗ>y n}Mk""G{[aЪؽ4>Q"{߀߿Qٵf_ nj(y*Oq %tfjgdalautotest-3.1.2/alg/data/utmsmall_ds_lanczos.vrt0000664000175000017500000000342113701057751021167 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,50,0,3751320,0,-50 Gray 512 128 6.71089e+07 Lanczos Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,50,0,3751320,0,-50 gdalautotest-3.1.2/alg/data/utmsmall_cubic_2_float.vrt0000664000175000017500000000412413701057751021524 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Cubic Float32 ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/3by3_sum.vrt0000664000175000017500000000317513701057751016564 0ustar eveneven 0.0000000000000000e+00, 3.3333333333333331e-01, 0.0000000000000000e+00, 1.0000000000000000e+00, 0.0000000000000000e+00, -3.3333333333333331e-01 -1.7e+308 Gray 3 3 6.71089e+07 Sum Float64 4by4.tif 0.125 0,0.25,0,1,0,-0.25 -0,4,0,4,0,-4 0,0.333333333333333315,0,1,0,-0.333333333333333315 -0,3,0,3,0,-3 -1.7e+308 0 -1.7e+308 0 gdalautotest-3.1.2/alg/data/utmsmall_cubic_short.vrt0000664000175000017500000000342213701057751021335 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Cubic Int16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/test_rpc_with_gt_bug_2460.tif0000664000175000017500000000314613701057751021745 0ustar evenevenII*(=S؅  b \WU@WU@`@`@K7AB@kw\@@`@`@~jtX?a2U0*c?@@+NVm?R+w'I&@pu@~ҿ#-Sȿe;%?H2(MR?=3!ڛ??G-̹?OH_;^|޿?A&E$=?sC`?ڱ?ڛnI-?L+ ?њm? m׻ ?L^^¿-ԝen?٤vv?uw/@?ԫt,Ju`?R3?jw??t9sE:,AV_y?ѻ̳ehM M?lړB!C?GCVOٺ? `} ͬf߈; B?Ƥ`ÿwt?-=I?޶3Ըs¡@&/#!?=;r?X(j۳:J?3amu¿#h'$ ?5z0n*`?Gv؂get_mh}`?sԗ>Ǐ@D?6dJf =~'v56{8Js&v?/犀kߪMk+鏿zn0Aҿ>_s|;S$APq|8e`?v nNA?# c )#WGS 84 / UTM zone 11N|WGS 84|?P8$ BaPd6DbQ8V-FcQv=HdR9$M'JeRd]/LfS9m7NgS}?PhT:%GRiTe6OTjU:VWVkUv_XlV;%gZmVeo\nW;w^oW`pX<& bqXf7drY'ry\g7tz]>Wv{]wx|^?'z}^g|~_?~_ , Ll% - 5 Ð= Eđ,MLUől]eƑmuǑ} !Ȓ,#L%ɒl')ʒ+̵-˒/ 1̓,3 jgdalautotest-3.1.2/alg/data/sieve_src.grd0000664000175000017500000000044213701057751017035 0ustar evenevenncols 5 nrows 7 xllcorner 440720.000000000000 yllcorner 3751020.000000000000 cellsize 60.000000000000 NODATA_value 132 107 123 132 115 132 115 132 132 123 123 115 132 140 132 123 148 132 123 123 123 156 156 156 140 132 156 100 156 101 102 156 156 156 103 103 gdalautotest-3.1.2/alg/data/utmsmall_mode_int16.vrt0000664000175000017500000000417613701057751021005 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Mode Int16 ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/warpedvrt_with_ovr.vrt0000664000175000017500000000627013701057751021056 0ustar eveneven -2.9991966282908999e+002, 2.5531597443786556e+000, 0.0000000000000000e+000, 2.2681602079169127e+002, 0.0000000000000000e+000,-2.5612550811638806e+000 Red Green Blue 512 128 6.71089e+007 NearestNeighbour Byte warpedvrt_with_ovr.png 0.125 0 -0.69617369803609108,0.99213321513500075,0,1022.1492516466913,0,-0.99213321513500075 0.70169377198137839,1.0079291618756345,0,1030.2540385240566,0,-1.0079291618756345 gdalautotest-3.1.2/alg/data/utmsmall_blinear_short.vrt0000664000175000017500000000342513701057751021667 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Bilinear Int16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/refine_gcps.vrt0000664000175000017500000000372213701057751017402 0ustar eveneven 0,1,0,20,0,-1 20 20 6.71089e+07 NearestNeighbour Byte ../../gcore/data/byte.tif 0.125 1 0 1 1 0,1,0,20,0,-1 0,1,0,20,0,-1 gdalautotest-3.1.2/alg/data/polygonize_in_2.grd0000664000175000017500000001217513701057751020167 0ustar evenevenncols 36 nrows 42 xllcorner 0.000000000000 yllcorner -42.000000000000 cellsize 1.000000000000 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 2 15 30 60 109 167 246 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 14 113 241 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 202 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 205 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 250 235 196 133 33 0 0 0 0 0 47 251 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 247 99 0 0 0 0 0 167 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 254 60 0 0 0 0 85 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 175 0 0 0 0 35 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 233 0 0 0 0 11 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 250 0 0 0 0 8 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 233 0 0 0 0 27 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 176 0 0 0 0 75 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 254 62 0 0 0 0 152 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 248 103 0 0 0 0 28 243 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 250 236 198 135 35 0 0 0 0 8 190 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 37 196 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 84 175 252 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 58 164 251 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 44 205 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 243 227 186 129 37 0 0 0 0 9 185 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 254 149 7 0 0 0 9 214 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 170 0 0 0 0 56 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 72 0 0 0 0 191 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 166 0 0 0 0 105 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 224 0 0 0 0 47 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 246 0 0 0 0 19 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 244 0 0 0 0 5 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 222 0 0 0 0 23 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 164 0 0 0 0 47 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 68 0 0 0 0 105 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 255 255 165 0 0 0 0 0 183 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 255 255 255 255 253 146 6 0 0 0 0 49 253 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 255 255 255 255 255 255 255 255 244 228 187 129 37 0 0 0 0 0 3 196 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 164 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25 178 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 23 118 240 255 255 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 0 0 0 0 7 22 37 74 125 182 251 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 gdalautotest-3.1.2/alg/data/utmsmall_mode_int32.tiff0000664000175000017500000002420613701057751021114 0ustar evenevenII*22 (S   Z@v ^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{ksccssk{{ssck{{c{ss{s{ss{ksskkcsZsZc{kk{{{s{sssk{sccsskks{s{kccs{{sccksccs{{s{s{sJskssk{{{R{c{skk{{sk{{{c{{s{k{c{ckscZkss{sskkcss{sc{{{s{ccccksZ{kskkkkRc{{{skkccZcsc{k{{s{{{sR{{kc{kk{k{s{sk{sZk{{k{{sss{kk{skskk{ks{{c{k{{sk{s{k{k{cscsk{{ckk{s{sJJRsRssckBkZcZkcks{{sssZcZ:sRcZ{kkk{{ks1ZRBRcsscZk{J{BJRZJBks{ZBJ{Zsscc:kR{{JBssZ{{{{Zc{Rks)ckskR{Js{{s{c1kcckk:R{s{ZkZccsssc:ZBR{1BZRsBk1cBccc{kcBkJsRsk1JRJk:ckZRRZ{Z:1BJR1RB:kB1R{J{s))){11c:J!Z!BJ:1Jkkk))JsRcRRsZkRZkJZ{{s{B:ZBkJcZZRcZJsZJBZkcc:ssRs)k{s{ZcZk{cZskZZ)kcBR{sBc{{cskksRRcZZcc{k{kZZsJZRc!B)R:JkR{kRRkJ:ZkJskkksZc{ZRcBB{:kksckZJs{cBBZ:Zcs{ssZJ:BJ)B:!!Z!!c)Z1ZJ1BBcccRsRcRkcsR{sJB1BR:{J1)BZ!ZB::BZck1)sB:JZc{s{RZJRRs{cRBB1s!JcJ:Z:RRBZ{Z{sJcJJJkRBBBR!c):ZR)sksZ1BJ!JksJcZsJJk{R{{ZcBs)kcRZ1))JRkB{JcRRZcs:1J1ZcJRkcscRZgdalautotest-3.1.2/alg/data/utmsmall_lanczos.vrt0000664000175000017500000000342313701057751020503 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Lanczos Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/2by2.vrt0000664000175000017500000000311413701057751015667 0ustar eveneven 0.0000000000000000e+00, 5.0000000000000000e-01, 0.0000000000000000e+00, 1.0000000000000000e+00, 0.0000000000000000e+00, -5.0000000000000000e-01 -1.70000000000000E+308 Gray 2 2 6.71089e+07 Average Float64 4by4.tif 0.125 0,0.25,0,1,0,-0.25 -0,4,0,4,0,-4 0,0.5,0,1,0,-0.5 -0,2,0,2,0,-2 -1.7e+308 0 -1.7e+308 0 gdalautotest-3.1.2/alg/data/utmsmall_average.tiff0000664000175000017500000000545213701057751020565 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|wwyv|~~qmgimmouukxswwquwu΄y~{{s~wumm~wogmikuyzy{y|ֻŽģ}ww~keoucekmos~~w~|̘{Ļ|sqwoovkgommqm੖ܷ؂zuw|wqwwz~miis|quw~ҟ؀y|uqowuykqmxy{swŝҾҘľsqm{k~sqszou|sȻƽȥmisoouu}uwǀ൭حƌmgeu~wqØңĿ~uqmaḁسƩÜûmg|iee|лاڷ}g{ġŝ̩œkԷؖuԘг޹zԽȱ̟Щ֧湐Ț鯜ǩĵ̥ؿƿֳĻֱswso|ԵȣܷƐw}msuzпι~~~ģҳڟʷ񒒤~yұίƫЯ~w|u}|ڎƻȵymoy|Ȟڵފނso~gsscuuȽԖ瘭޽zkiqusz_i|ŷ»˜ؽuxgX{oxysʣڿګaLg_cvgc|mysi{q{Ƚ潱qTB|_iogswq~m俫ХʭuemsXqTRsgs|[|ȥķƽoZ{uN_\P]uicmwc}}ÿԥ_SaysP{s_gosTuuҧƚmucekmVcNHu{gku}çػBggJ_PHZgz[Ng{iJ{s|Ω³QVF[e@HeLR]koXSmkuÊʜҿηÿuFJFaT_RV]D_HNRZiصĎֹ:@D<:PN:WHJ>LBaiy[0+H<:2LHR>Lmei|̀TYsgJ|P]i[>HxycL~@%QB8Jeq}RekT4@@oocmNeePsNRcexm}}\R6/DDPkcP12/FPo6eciN[cXHY_LPBWXka^iaxVygdalautotest-3.1.2/alg/data/warpedvrt_with_ovr.png.aux.xml0000664000175000017500000000246013701060014022401 0ustar eveneven PIXEL gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_max.vrt0000664000175000017500000000447413701057751021334 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area -3.27670000000000E+04 Gray 30 30 6.71089e+07 Maximum Int16 utmsmall-int16-neg.tiff 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,120,0,3751320,0,-120 -3672.666666666667,0.008333333333333333,0,31261,0,-0.008333333333333333 -32767 0 -32767 0 gdalautotest-3.1.2/alg/data/utmsmall_cubic_2.vrt0000664000175000017500000000412113701057751020334 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Cubic Byte ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_mode_int16.tiff0000664000175000017500000001235613701057751021121 0ustar evenevenII*22f2S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{ksccssk{{ssck{{c{ss{s{ss{ksskkcsZsZc{kk{{{s{sssk{sccsskks{s{kccs{{sccksccs{{s{s{sJskssk{{{R{c{skk{{sk{{{c{{s{k{c{ckscZkss{sskkcss{sc{{{s{ccccksZ{kskkkkRc{{{skkccZcsc{k{{s{{{sR{{kc{kk{k{s{sk{sZk{{k{{sss{kk{skskk{ks{{c{k{{sk{s{k{k{cscsk{{ckk{s{sJJRsRssckBkZcZkcks{{sssZcZ:sRcZ{kkk{{ks1ZRBRcsscZk{J{BJRZJBks{ZBJ{Zsscc:kR{{JBssZ{{{{Zc{Rks)ckskR{Js{{s{c1kcckk:R{s{ZkZccsssc:ZBR{1BZRsBk1cBccc{kcBkJsRsk1JRJk:ckZRRZ{Z:1BJR1RB:kB1R{J{s))){11c:J!Z!BJ:1Jkkk))JsRcRRsZkRZkJZ{{s{B:ZBkJcZZRcZJsZJBZkcc:ssRs)k{s{ZcZk{cZskZZ)kcBR{sBc{{cskksRRcZZcc{k{kZZsJZRc!B)R:JkR{kRRkJ:ZkJskkksZc{ZRcBB{:kksckZJs{cBBZ:Zcs{ssZJ:BJ)B:!!Z!!c)Z1ZJ1BBcccRsRcRkcsR{sJB1BR:{J1)BZ!ZB::BZck1)sB:JZc{s{RZJRRs{cRBB1s!JcJ:Z:RRBZ{Z{sJcJJJkRBBBR!c):ZR)sksZ1BJ!JksJcZsJJk{R{{ZcBs)kcRZ1))JRkB{JcRRZcs:1J1ZcJRkcscRZgdalautotest-3.1.2/alg/data/3by3_average.tif0000664000175000017500000000054013701057751017332 0ustar evenevenII*@HS  -1.69999999999999994e+308UUUUUU?UUUUUU??@@(@ @!@+@@#@-@gdalautotest-3.1.2/alg/data/utmsmall-int16-neg.tiff0000664000175000017500000001736713701057751020611 0ustar evenevenII*<<<S   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|  &              &  >..O  6F.  .   & & 6  &&.&.    &&&6.66>     ..6_Fx .  O .  F>.>. .  & . .6&>g  &.>>.&WFF>6O   6xF6 FO>.6>.6OWO>__& 6O_F F6...>>&.&.>. & .xOWp&W6  6F...&&O6 . & .& &6 F_xWWF>6 O6&&6.OF6.xO && 6F.6F&6F_WggO&&6>OxO6.g6  F. 666&FWO._. .66_6.  >>x&>.&W&W6>& 6&6&6>FO6FgF.& .66F>..>F6 &&FOOOF.&&F..FF.&& ..>>W&.> F_gWg_p_&6 >Op___> &.&.&__F&&>&&&>_Og&. .W .&.WF>W_p 6.. ..66F.F &. &.W6&OgF.   .gFWg>66.6>6> >  pO. .&& .FpW &6.&6& &O_p_O>&& & 6Og& .&& &.6>O.>pOF6.   &&&FWp& .FO666&. 6.6x&O&6&6   .. && .&66&.& WWp 6  F  W&&&&_WF&_p.&&&W&.&    . && . &F&>. .  .6&F6F6F .  &F& &F>>6F 6 >> >_WF    &FOO>6.&6F&g &&  F&  & _O>O_Fg>6...&&.>&&66  .Opg>O_>6&...Fg6&.O&6.6>& &&&6.xWg.FOgOO___Og_OO_> & ..&.  &.>6>WWW&&6 &F6>6& O_&6 .>6 .&.& 6F_pgOWp p.>FFWOWF>_xg&x__..& &g. . g_WF& . >& WF&._xgWWW6&6 .&&x&g&  &&. >O&O.>OFpWFWF& & O_OO 6 O.gFF 6W .Fxg_> .p_O.>. &  .FOF_Wg>F& gF.g_xpxg_   &.66p W666F6&p>Fxg_F.>O &&& &   &F &__&_F.Og.>6 OgxW& Ox&FW  p&gFxg6 >&_g>&_..>> &6.&6 . &&x& >.>6>O6>W_>gFgO &6WF &p>.x>&& .p_ .>g 6 . &&gOOg O&O x6F>.&  &&&.OF&6 &6>__6Fg  .FW_F W ..&.__& &>&&.&&._& _ &>>&6.     O6.>F &6>&6 g &  &6 F&F.>.>&6 ..&&F  && O>.&>&F> 6 .F&>F.6 & &6&. .&&WW.6p .F_W&    6&& . .O&> F &666.&p .66Op6. .. .F.g&&66.6 &6O . 6 &&& .Og .& &>_ O  6 .W&6>F6 _<<f< S L d N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|-32767gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_Q3.tif0000664000175000017500000000420113701057751020765 0ustar evenevenII*yS   Vr^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|-32767    .  . .  &    ._Fx  F  ..6>  OFF>..>O&_6    .xWF&66.F&6O& 6OF&6_g&6>x6W&>& FO&>OFF& .>>.6pO_& ..W__p&.&._F&&&p6F& .WW6.66& _p&& &&Fg&F.6..6&6  .&&&6F&& _&&66.  &&>66.> _>&&O6.66 & g.OOO_O_g6&&..&.66&&FOF>_gx_ .. &.FpF& &F>_pFW&&xO ..O_WF.xpx   F66F.g>x_.O6.  &g&>.6_>>W>FF &Og&p_> &FW.>&_&  & ..  >&6. &>.&>&> .&.F  &&&.&O>F &6. .666 ..O.  & OW&>6 gdalautotest-3.1.2/alg/data/utmsmall_cubicspline.vrt0000664000175000017500000000342713701057751021336 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 CubicSpline Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_cubic.vrt0000664000175000017500000000342113701057751020115 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Cubic Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_bilinear_2.vrt0000664000175000017500000000412413701057751021037 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Bilinear Byte ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_blinear.vrt0000664000175000017500000000342413701057751020447 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Bilinear Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_max.vrt0000664000175000017500000000417713701057751017626 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Maximum Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_average_float.vrt0000664000175000017500000000420513701057751021630 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Average Float32 ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_cubic_2.tif0000664000175000017500000000536113701057751020312 0ustar evenevenII*22r2 =S   V^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|xSzk^\zqQo @1d$^HD"4 I Ybb1k;χ=OaiFvaж6 C \ߠL/u.~:9}IH$"x<Ch$dlbj =?Ix.Ǒ@(  #pTsi u!4ZPZ]} ۑmaszٽF9/Ud6|cdxˣ."LD"ކqx**Վ_Lٵ^ DtƳp@+Kl>Z14͠?51+yvfN<>$ZT7G̹Sau¤ TϏw󙰂RSs@2)ͤQ*pd" [~-, 3^i\$U }PYl/m {Q'"7VʬoP.ˍi&/7;aGq$<ХmE)ٗfͣ?>D=Tp2E %GeWiF*L|$s|Ca-1X͈W5CȘ^-K' -N,}^|Tc{t7\MmiQʍ>+8Wo߾ٟ}n3piīQI b{,O-ݿm.lSOquCa߿ߜ:9>N֝z* aY.-ںula'zzqouL֮9:ͬ.T#wE~_^/>XZX ?; 3< O`T~7NG<~6Yh@ېzL͍i$,KE:Ӊٝ%Stibj} @)mr2@zAiꅂŅd>-,,.:;>:]9#)L@c24Ё)Qg AGIU݃׶3VO t6@ۼ@'!;ߑU9?8۱HER[F`iK&uSvA;/?>Z}N/L:$BŮ7Nqztb?휼K,q02?X iC[ **`y NѐoY{s>>l{ŠˋX=uM(ЩXxQy=8t@`ݼa4]=k\Y>9l˭ֻte/L" P !2 L`, )..jdj+-XȷmRiF?B~w|3x bByuXw8sQGh=S鉠Y"V){IY 4W4I~.񁉱okb#Ɲ㥠Kߞ+-:_qIz@& x'7j&i|jzܸRVv+(B-KAQ5V1 = AC?Һ2=xkeZnly|~1dAJv9@.BdֈĢkW.|s }q'Wۮ76U6uCoēpCD^//C* Zb%I}b@ǘDDt (zɷ y\A_WjfS&Y[BdMlmCO7[qR) k/.W+MsVE\,?DmXw6*1R ~zN!>R (T* k++a54{<gdalautotest-3.1.2/alg/data/utmsmall_cubicspline_ushort.vrt0000664000175000017500000000343113701057751022735 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 CubicSpline UInt16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/warpedvrt_with_ovr.png0000664000175000017500000002330313701057751021023 0ustar evenevenPNG  IHDR<_ IDATxݻzǺ*?ȔTJL6}gFlR*RiZ4E >7FM{ʥ~tZ_LZS/j̯6N󩔇ݻru;rn}Q}^|yqaן}ۧ?)<^p\ms82Vx}Z}\J1r~}ww /?|`VWPrĵe,7W<.?^Э7\=ן}2k+WL>nM)j#R|Q>ץ|z!@_~|^oOv \ן}2BYZ>W͇\m3n_gu_\߯ץ/Kz9@/|Vg[)֟ߕr+8osݸ{WŪwmjS[kgm^VW 09_m/#DDDDDDp0jx9y{譵 m?e0L`;$ d^0bЙEoJHYEE\? 0 f007F`ާ,܅1 s*x83,hW"910wou `fDB&0!0SFD^C$`6{"9 ·`oG3  @;1Eh4 H6{6{Dh4vn8h4fwL8:f4Fu_3 d2 lyy3<2 Lr`6xa4Ixvb]lΜ) p&Fה wg4S]"< 0+F؟׋Eg'wh4h4> ^^dwL֑a.@ \C].0@\1f>Qo;__2Xp}Y6`fnm?QF 90,V<}I3II `8+'f/pFFA0hahFb4..7U`*FgctYm0Rjz%睆z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J1< |0qs(uPy+K;uR`kxˣ0dTQqf]Y:t̥7S;ɩu%te_DutwsEb Xq-Du^m/0 "ou *MVXj>>34Ol83m#SJ2>j/{V>>hQ6 83xrw1>nrx xf?C`1FUt֭Pe@THo`ȼcV ]>C pY[[a /fu9J#eОgdalautotest-3.1.2/alg/data/utmsmall-int16-neg_med.vrt0000664000175000017500000000447313701057751021313 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area -3.27670000000000E+04 Gray 30 30 6.71089e+07 Median Int16 utmsmall-int16-neg.tiff 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,120,0,3751320,0,-120 -3672.666666666667,0.008333333333333333,0,31261,0,-0.008333333333333333 -32767 0 -32767 0 gdalautotest-3.1.2/alg/data/empty_rc.vrt0000664000175000017500000001056713701057751016745 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 2.0983170908647397e+04, 5.0109700347667203e+03, 0.0000000000000000e+00, 5.0175402506259708e+06, 0.0000000000000000e+00, -5.0109700347667203e+03 Alpha 512 128 6.71089e+07 Cubic Byte ../tmp/empty.tif 0.125 500000,5000,0,5000000,0,-5000 -100,0.0002,0,1000,0,-0.0002 20983.1709086474,5010.97003476672,0,5017540.250625971,0,-5010.97003476672 -4.187446894127006,0.000199562159235014,0,1001.311166463512,0,-0.000199562159235014 PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32630"]] PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 4 4 gdalautotest-3.1.2/alg/data/ut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27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Lanczos Byte ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_min.vrt0000664000175000017500000000447413701057751021332 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area -3.27670000000000E+04 Gray 30 30 6.71089e+07 Minimum Int16 utmsmall-int16-neg.tiff 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,120,0,3751320,0,-120 -3672.666666666667,0.008333333333333333,0,31261,0,-0.008333333333333333 -32767 0 -32767 0 gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_mode.tiff0000664000175000017500000000761213701057751021605 0ustar evenevenII* zS   ^-32767^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|   &  F    &   &66 .  ..>  6F O..>W_> & xWp&6&..&6 &F66_gO&>x.g . OFFg& 6>.6 &__ O__.&._F&&6g. .Fg>666 Op& g.&&6.xO 6 . &&&&. _&&.  &. &F>  >  &O>.&6  F g_6_.F&.. &6W&6 F66 __.6 &.6p&. &W&_gW&6 .& 6 OFF W.g>  &.6 6F&>gFOFW &gg >_>_.> 6W &>x& ._> &.F &>_  _ >&. &&>> .& & &&.&W6 6_&6p. ... 6&Og.&> gdalautotest-3.1.2/alg/data/utmsmall_lanczos.tiff0000664000175000017500000076630413701057751020636 0ustar evenevenII*f B S   J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@f!@&`f&f:&Zfy&f4&Tfs&f.&Nfm&$@$@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|ghijkmpsw||wsqqsvz~zrliimsz~xrnmnrw|~wpjfegkpuxxvrmklqzyqkhhkpv|{upkjjloqrqmida`bgnu{}wof\RH@<<@IUalstph]TMKNU^hpvz{{ywusqpoopqsvx{}~zuoidaacgmsy}}{xvtsrrqqqqqpomjhda]ZWVTTUVX[]`bdfggggfeca_^^_bflqvxyvsnkjlpw~}{zzz{{{{zyvrmgb__bhpy}zxwwwvtrpnmmnqtw{}zwuuwy{|{xutv|̾xpjhkq{ƿýhhiklnptx|{vsrrux|yrlijnt{}wqmlnqw|}wqkhgimrvyywsomnrzzsmiilqw}|vpljjloqrqnjebacgmtz~{vof]TKD@@DLWclstph^UOMPW_hpvy{zxvtrponnopruxz}~zuoidbbdhmsy}}{ywutsrrrrrrrqomkhea^[YWVWXY[^`bdfghiiihgeca__`cglrwyywsoljlqw|zzzz{{{{zxvrmhc``chpx}zxwvvutrqoooprtwz}|yvttvy{|{xvtw}˼|tnlns{ſühijkmoruy}}yvsstwz~~xrmjkot{|vplkmqv|}wrmjikoswzzxurpptz}unkjmrx~|vpljjlorsrokfcbdgmsx|}|ytnf^VOIEEIPZdmrsoh_WRPSYaipuxzywuspnmllmnqtwz}}ytoiecceinty}}{zxvutsrrrrssrqpnlifb_\ZYYY[]_bdeghijkllkjhfcbaadhmsxzzxtolklqw}{yyyz{{{{zxuqmhdbadiow~}zxvvutsrqqqqrsuwy{~~{wussuxz{{yvvx~Ȼxsqqu|ľüijklnpsvz}~{wustvy}|vqmlmpv{ztokjlqv|}xsommnquy{|zxussv{xqmlotz~wqmjkmprtsplhecdglquxzyvrmg`ZSOLLPV^gnrrohaZUTV[cjpuwxxvsqnljiijlorvy|~|ytojfddfjouy|~~|{ywvutsssssssssrqomjgc`][[[]_begijkklmnnoonligdcceinty{{yuplklqw|yxxyz{{{zywtqmhecceiou||zwvtssrrrsstuuvvwxz}|yvsrrtwy{{ywwyƸ~yvvx|þļjklnprux{~~|zwutsux|}ytpnmnrw|~xrmjikpv||yurqqrux{}~}{yxwy{{tonpv|xrmkkmpsttrnjgeegknrtuusplgc^ZWUVX]cjorqnib]YXZ_ekqtvwvtqoligffgimqux{}~{xsojgffhlqvy|}}{ywvtssrrsssttttttsqnkhda_]^_behlnoppoopqrstsqnkheegjpvz}}zvplklqw~zwvwxz{|{zxvsplifeegjoty}~|ywusqqqrsuwxxxwvuuvx{}}zwsqppruxzzzyy{µ~|{}½ļklnorux{}}{ywusrrtv{~~~|yvrpooqty}|vpkhhjov||zwvuvwy{~~}||||~wrprxzsnkkmpsuutqmjgghjlnpqpomkhfcb``acfjnpqpniea^^`chmqsuutrolifdbbdfjoswz|}}|zwsokhghjnrvz{|zxvsrqppqrrstuuvvvutrpmjfca`adglptvwwutttuwyzywtpligilqw||wqmklqx{wutuxz{|{zwuroljhghiknruy{}~~}{yvtqooprux{|}{yusqqrux{||zxtqonnqtwyzzz{~ƽ~}}Ļmnoqtwz}}zwtqpooqtx~|{|~{{~{wtrpopqtw{~~ytniffiou|}|{zzz{|}|ywwy~{usuz{tollnpsvvuspmjiiijkklkkjiiiijklmnpqqqqomjgeddfhknprrrqolifb`^^`cglquy{||zxuroljijlptxz{zxuqomlmnoqstuvwwwwwvtrolheddfinty}~|zxxz|~~zupljknsy~}xsnlmrxytrrtvy{|{ywtqomkkkklmnprtvxz{|{yvspmmnrv{zupmlmosvxywuromlmorvxz{{}{xy|ĺnoqsvy}{wsomklnqu{ywy{xx|}wrpnnoqtwz}|wqkgdehnu|~|{||}|vqnns{xvw|}vpmmnpsuvvurpnljihhggfffgiknruwyyxwuromljjjjklmnoooonmkifb_][[]`ejotwyzzywtqnljjknruyzzxuqmjhhiknqsuwxxyyxxwusqnkihikpu{}}{upnnqv{ztpnosz|vqooqux{|{ywsqonnnnooonnopqtvyz{yvrolkmrx~|uniggjnruvuspmlklnruxz|}|vtv}}|ùnprtw{{upmjikmrw}|vtv~wtuzztnlkmptw{~}ztoiecdhnv||{{|~zrkfeir}{yz~~xspooprtuvvusrpmkhfecccdfimrw|{vqnkjklnpqqqpomlkjihfc`]ZYY[_cinruwxxwuspnljkloswz{zwsnifddfimqtwxzzzzzyxvtrpnmmnqv{zurqtx}|wsqrv|zsnlloswz||zwurqqqqrrqpnmllmptwz{zwrnkjmrz~ulfccfjortsromkklnrvy{}vrsz|{}¹nprtx||vqmkjlotyzsqt||sprxyqkiilqv{}xsmhdcdhov}~{z{}xoga_ckv~||{wsqpopqrtuvwvtrnjgdbaabdhmsz|upkiikortuuspmjhgfedca^\ZYZ\_chmqtuvvusqoljijlosw{|zwrlfcabdhmrvy{|||{zywutrqqqsux|}xuuvz~~yvuvzxqkiilquy||{ywvutuuuusqnljjknrwz|{xsnkjms{uleaadinrttrpmllmptx{}|vv{}{}moqsw{~yuqoopsw|wqorzxpmpwyqjhimsy~|wrlgddejpw~~{z{||ume`^agq|~~~{xtqnllmpsvyzywsojfca`acglrx~yrlhghkptwxvsojfcbaaaa`^]\\\^adhlorstutrpmkighjnrw{|{wqkea_adinsx{}~~}|zxvtrrrtvy{~{yxy{~|zz|wojggjnsx{}}|{zzzyyxwtrnljiknsw{}}zuplkns{ulebbekptvvtrpnnpsw{~~ſlmorvz~~{xvvwy||uonqytmkowzqkikou||wrmhffglry|{{|~~~~~~}{wqkfbachnv~~~~~|wrlhghkpuz~~}ytojfcbbcfinsx{}|ysmheegkpuwxvrlgb_]]]^_`````acegjlnprsssrolifeegkqv{}|xrkea_aejpvz}~|yvsqqqsvz~}{z{|~~~voiffhlqvz}~}{xuromkkmpuy}|wsonpu{~vnhefjotxzzxvsrrtw{ƽ½klnqtx}~~~ysonqx|rkjnv|smkmrx~|wrnjhhjntz~|{{|}}~~}||{zyxwvtqnkigghjnrvz}~|zxxy|zrkebbflt{zuokgdccdfimqsutqmheccfkptvvtoic_[ZZ[]_`bcdeghijklmnpqrrqolhdbbdhnuz}|yslfbabflrw|~{xtqonpsx~{yy{~~}}|||}~~voifegkoty}|yvsponoqtx|~zvsqrv|~wqmkloty|~~|zxwwy|ƾľkmoqtw{|wroorxypjjnv}upnptz}xsoljjlouz~}{zzyyyxxxwvusqpnmllllmmnnoprtwz}~|yusrsw|{sib^^birz{uplhfdcdehjmnmkhebbcfkosutqmga\YXXZ\_begiklmmmmllmnprsrolgb_^`elsy||ytmgcbdhmsy}}zvrollosz{urqsx}~}}}}|||||}~~wpjgfgjnsx}~zwtrrrsux|}ywuvx|~yurqruy}}||~}|}þ¾¹ǾĽnoqrux{|xurpqtywokkov~xsqrv{}ytpmkkloty~~|ywuttttuttrpnlkklmoqrqpomllnptx{}|yuqnlnsy|si`[[_fpy{vqlhecccegijkigdbbcfkortspke`[XWXZ]`dgkmpqqqonlllmprtsqlfa][]ahpw{|ytnhdcdhnty}}yuqmkkmszyrmlnsy}{z{{|||{zzz{|~wqliggimqw||xvuuvxz|}zyy{}}zxxy{~~{z{};¿stuvwy|}|zxusrqsv{~vpllpv~yuttwz~}yuqmkjknrw|}yurqppqrrrqonlllmoqstsromkjkmquxyxvrmjikpv}{rh`[Z^enx{vpkgdccehjlmkifddegkorsroje`\ZYY[_bfjmqsttsqnlkkmpsuurmg`[YZ^emtyzxsmhdcdhnsx||ytpliilrzyqljlpv|~{zyyyzzzyyxyz|~~xrnjhhilpuz~{zyz{|~~}}~~~~~|zyz|þûʹz{{{|}~~{yxvussssuy}}wrooqv|zwvvwy{~}zuqmjiiknsx}zupnmmnpqrrqpoopqrstttrpnlklmprtutqnjhgintzyqha\\_emv~ztnifefimpstroliggiloqsrokgb_]\]^adhlpsuvvtqmkijmqtwwuoh`ZWW[bjrvxvrlgcbcglrwz}~|xtokiilqy{tolmotx|~}{yyxxwwwvvwxy|~~ytpmkjjlorw|~~~{yxyz}ĽƿǴƿ~{ywusssstvx|~zusrsvz~~{ywwwwxy{|~~~}zvqmigfgjnsy{toljkloqstuuuuvvuuttsrqqpppppqqpoljhfgimrw{|zvpic`_afmt{~wqlihkouz}~|xsnkjjloqsrpmifca`abdgjmqtvvvsplihimqvyzwqjaZVVY_gnsutpjebabejotx{}}}{xtpljjlqxytqpqsvxz|}}}|{zxvutsstuwy|}yvrpmlklnptx||ywwxz|ý¯|zwusrrstvx{|yvuuvxz|}}}|{zywvuuuvxz|}|zvrmifdegjou{|uojiiknqtwz|}}}{ywtsrrstuvutrpnkihgffhjmptvvurnjfccdhlrx}ysnlmqw~{uollmoqssrpmjhffefgilnqtuvurnkhgilrw{|ytlc[VUX^ekprqmida`adhlqtwz{{zxtqnkkmqv||xvtsstvxz|~~~|yvspopqtvy|}zxuspommnoqtwz}}}wtstw{þ»üλxsu~¿~}{xvtrrrsvx{|yxvvvwwxyz{{{zxvtsrsuxz||zwsnjfddehlry}unjggimqvz~}yurrsux{||yuplheddegikmopqqpnljhgghjmpty~{upoqv~zsommoqstsrpomlkjjjklnqstusqmiffglqw{}{ume]XVX]cimonkgda`acfjnqtvxxxvtrpnnoquy~|xtrpqtw{~zuqnlmorvz}}|{zxvtrqpoooqrux{}{}xsporw|½¼òqc\_kƽ~}}}}}}}}|zxvtsrsux{~~{ywvuttuvxyz{{ywusrstwy{{zxtqmjgffhkpw~~vniffhlqv|{vsrtx}}xqjebabdgjlmnnmmlkkjjjjklmorvz{urqtz}vpmmnprttttsrpomlkklnprttrokgddejouz|{vog_ZXY]bgkmljgdbabcfhknprstuttsrqqqrtvy||upmmpuz|vplkknrvz|~~~}}}}}||||||{zyxvusrqpopqsvz}{|}unllpv|~~|}xaPIM]v~|zzyzz{||{ywutstwz}~|zxvtrrrtuxz{{zywvuuvwyz{zywtrpmlkkmqv}~unheegjou|~xutw{zrkeaabdgjlmmlkjjjjjkkllmnoqtx|~yursv}~vqmmnortuvvvutrpmkjkloqssrojfbacglrwzyvpib][[^bfikkjigeddefhiklmnpqrsttuuuttstvzwojjlry}wqmkknrvy|}}|{yyxxyyzz{|||||{{yxvtrpooqsw{~||zqkijou|{xvx}ƾľ||~kTB;ASo´|yxwxy{|}}{ywuuvy|}}|||{zxvtrqqrtvxz{||{{zzzzzz{zzzzyxvtrqpsw}~umhddeimsz|xxz~{slfbabdgiklkkjiiiijkklmmnpqsvy|}~}zwtrsw}}upmllnqsuwxxxvtplihhjmpstroje`^_bgmrvvtpjea__`cfhjkkkjiihhhhhhhhijlnqtwyzywtqoptzxoigjpxysnlmorvy{{zyxvuuuvvwyz{|}~~|ywtqppqtx}~wojhjnt{|xtrsxƽƽ~~x_I94;Om´~zxwwy{~~|zxwy{}zxwxyyyyxvtrqqrsuwy|~~|{zz|~|xvvx}|tmgdcdgkqw~}|~{tnieccdfhijjjjjiiiiijklmoqstvwxxxwusrrsw|yrnkjkmoruwyzywtojgdegkostsojd^[[]bgmprrolhfdccefhjkmnnnnmmkjhgeddegjotz~~{uokjmt~yoifiow~{vrooqsvxyyxwutssstuvxy{}~|yusqqsvz~|uokikoty~~zvsqsxǿ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]bglrx~|ria]\^dksz~{yvuux||{{{}{vsqqsw|Ƚż}tlgddglqvy|}ƿxlc`afp}˽óſľƻʿοѹopqsuwz||zupjgiozu_L@@K]s}slgdcbbceghhfc_[XVWZ`fnv~|vqmjihhiknqvz{vpjeb`adjs}{yy{~yslfa^]_dlt|ywy}Ź̾zqieejsywy~zy{ľƿü³DEDDDDFINU^hrzseWJB@FSey{ne_]]_aceghiigd`][[]agnu||xsoljiijlosw{~~{xtojfcbchpyzvuwz~{uohb_^`emu~Ǽ~tonryȽȷ~tmhhmvwtw~üþþ½@@??>==@ELWcnw}|vndZPHBADM[l}{m`XTTW[`cfghhgfdb`_`chov}~{zyz{|{ywsolkjknqtwyz{{zzzz{{{yuqkgddgmv~yursuy~}xqkea`bgnw˺vkfgmvǿyqllpx|usu|Ǽ?>><;:9:?GR^irwwrj`UKB=;EO[fmpmeYK?5/.19CP]kw~seXNIIMSZ`dedb_^^_adhmrx~xqkgeglqwz|{xsolklnqstsqmjggimszysmjilpv{~|xsommoty~|{{{{||||||}~}ztniecdhov~ʴwldacjs|·xsrtzytsu{|z{~þǾƴƴ~úHGFECA??BHP[diidYK;.%"$-9HWdpz|ti^TLIJOV]bdc`[XVVZ_emtzzskfbbdiouy{zvrnjijmprsqmhb_^afnwysolmoruwwtqmjjknsy}zyxxxyzzzyyxyy{|}}{xsnhdbbekryιulgeglsy~¹zusuyxttw||xvx~{z½ſĴƲ|yƽQPPOMKJIKOU]cfd\PA1$".=N^ktz|{wqjbZSOMPU\bed`ZSNLNS\gqz~xsmhdbcejotwxvrmifegjmpqnic]YWZajt~ztpnnooonljgggjnsy~|ywvvwwxxwvuuuuwxyzxupkfa_^`djpv{ϼ~xtpnmnpsuwxxwvwy}Ƽzustw||wuux}}yx{|z}ſž\[[[ZYWWWY]adc_WJ;-"'4EVepvxvqlfa\XUTUY^cghd]TJCADMYhv}vpligfghknqtttqlgb``bfjmnlg`YTSU\fq{zuqnljhfdcccfinsx|~{ywvvvvvutsrqqrstuutqlgb]ZYY\agmsy̾yussuwyyxuspnlklmptx}~xtrrtx|~zwvwz|z}Ⱦź½gggggggfffffeb\SG:.&$'1?O_ksvsnga\XWWX[^bgkljdYMA97;FWizwoiffhknprtttroje_[YY\afjkje^WRPRYbmxzuokfc`^^`beinrvz}~~}{ywvvuutsrponmnopqqpmid_ZVTTUY^dks|Ǿ|qigjpx{skd`_aejoty~{vrpprtwz}}}{ywwx|yvy̼ÿ»ǼppqrtuuutsplgaYPF<4005?LZgptsnf]WSRTX\bfkoqpkbUG:1.4ATi}tjedglrvyzzxtpjd^XTRRV[afhgc]WRPQW_jt}~xqke`]\]_bfjnruwy{{{zyxwvvutsrpnljjjklmmmjgb^YUSQRTX^foypc\\cn{tg\VUW]elrvz~{xz}xspnnoqtwyz{zyxxz}~xuw|ϹŹȾøǷvwxz}}xqh`WOGA=Riukfgkry{voh`YSNLMPV\adda\WRQRW^gqy{tmgb_^_aehlnqrtuvvvvvuuuuuusroligfefhjkkjgd`\XUSSUX^eoywfYTV_nueXPNQXaiotw{~yrqv~{vqnllmpsvy{{{zzz{~zxx{}|³ϷȺúķǺ̻wxz}~ti^UNIGGJOV^elqspjaWOIHJPXahnrtsofZL=/'&-942259>DHKMOPRUZ`hq{}zupiaZSMJGFGJOU]dlquvtqmhdaabejpxyrlfa\XSPNNQV^govzzvpic_]_dlu~zwvwz~wgYOJKR]ky{vromlkjihijlosx|ϼypkjnw~xvx{}wvw}½ű~½ζʹzx}PSV[aiqy}~zsmiluŻ{gXOKJJID=5,&"#'.7@HOTWZ]`dinu|~{xtoha[UPLIHIKPW^gouyzxtniebbdhmt{~voic^YVSSTW[ahnsvwvsokhfgint{{wtqpprv|xk_UONR[guxqligfffhjmpsuwz{}~Ѿxpkkox|wvy~|rmlpyͼ|{þĬ|~³UWY]bhovz{ytootȵn]SNLJG@6+ &2?LU]begjmpuz~}zvqlf`[VROLKKNRYairx|}zvpjfddhmsz{tmfa]ZZ[]`cfjmprstuutsrqppsv||vqnlkjjl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bjtzvuvy{}}{ywwzwkb[WUUX[`eilljd]UOKLPWbmx~wrmid_YRLHGKS`o}sh]VTZh}̾|ywvuuuvwy{}yqot}ɿŶƿvnknu}ƾgilptz~}}|zvof[PGA?@DKRX[\\\]`fnxypic`^^_acdca\UOLMT_m{vgXMHHLT[ab`\VQMKKNSY`hpw~ztmgb^]_cir{}|{{zzzz{|ule^ZWWX\agloojbXNFCFN[k{}void_[XSOLKMR[ft~vh\UWcy}zxutstux{uhadpƾp_RLNXi|||~dgjou{|vplgb[TKB;6466/++.4>JYgt;uja][[\^`cddb]VPLMT_m|udTF>;=BGLNNLIFDBBBDIPYdp|{ria\ZZ]`ekqy~{z|~{wsnhb]ZZ\ahossofZNFDIUg||voia[TPMKLNRX_hqzpe_akzpc^ewɾzvsrruzxdWT^tԽ÷º»hN:/1>Uq}tmighls|adhnt{xmaVLB90)%$(/9GWhyȹrf_ZXXY[^`bca^XSQRYcp|ueVI@<@?;5/+*.5>IRY\]ZUPLIHJMQW]cjpvy{|zwtqonmmmkifc_\XURPOOOPRUX\`ejosvxxwvtqlgb^]_eo}ui]TMIILR[gv~iVJDGP]kv}}xqh`XQMNS\k}xnfbbgoyù{wwzž»¿Ǿ˽zrlhda^ZTNIDA??AFO[j}__`acegkotzzupliikq{ɾ{fRC9434664.&&2@MV\]ZVPLHHIMRX^elrwzzxtpkgedegijjiheb_\YWUTTUVX[^adfiklmnopppnjfcacisƿ~sg\SLHFHLT`o}fRD?CN]lx~wof]VRPRXcr}umgdehow~zy{º}|ƺ¾ºú̾vmgb_][XTPMIGEEEIP\lYZ[]_aeinsy~~{yvvw{n[J=50/022/)!#0?MW]^[VPLIIKOU[agmruvuqke_[XXZ]adghihgeca^\ZYXXY[\^___``abehlnonlihinwzod[SLHFEHNXeu{fTGDITds~~ukaYSQRV^jxxpjecdhov~{ustzķ}{{½ʻwoida_]\[YXVUROMNS]lɼRTVX[^chnty~ù|paSF<621121/*$!+8ER[__\WQMJKNSY_dimpqplg`YSOLLN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Ƚ}{{{|~~y{·žʽigeb^YSMHC@?@ACCDDGKQZer~yx{xrprx{uqnkifcbdir~o`WUZer~zm_SJDBBBCCCCBBA@>>@DKVdtxl_UONPV_gnsttqmifb`_`cipx~vmfa^^agoyukd_]]_bgmrwyywrmhffhlszsfZQKIIMSZcktz~}xrlihjou{~~|xtomlmpu||usv}µü}|{{|}{uwº~}·ǻhfec`]YUQNMMNOOMJFDEHOYer~zrmjlr|~wrolifb_]^bkvqd\\cn|teWMGDCDDCA@>>?ADHNU^hr}~ztmfa__bgmrvwuqkfa][[\^aejnruutqlgc_]]`djq{zpidbbdfilnpqqpnligefgjot|qcVMGEFKQYbksz~}xsmjjmry~|vojgfhmt}xpnqy¸~||||}Ͽtnow{trsx~ĸŽffedca_]\[\]^^\XQJD@@EMYfs~zqib^]bkx~xsokhea]YWW[bmysidfmzzj\QKHGGGFCA>>AFMWaku}|xtqnnnnoooonoqtw{~|vnf_YUTUX[^`aba`_][YYXY[^bhnu}}tlhfgjmpqqpnljhgggghijjlpu}o_RHBADJQZbkry|~|ytpmmqv|{skeaadkt~slimu}||}~̼|ngho{vnjhjntz~{yz|ŸſffffffeefgilmlibYOE>;=DN[ht}|tkbZTRU[fs|yuqnjfc_[WTQRU[doz}uompyoaVPMMNNLHDAAEMYguyrmhea^\[\^afkqv|wmbYRONPTX[[ZVRNKIIJMQU[`gmsz~vojhimrvyywsmheccehknoommmqw{jZMD??CJR[ckrw{|{yurpquz{rib__ckvzohfir}¾~||}~}}ȸyjccjvulea`bekqx{wuux}ĸǿhhiijjklnqtwxwskaUI?::?GS_jtz~}xph_VPLLQYdp||wtqpnlid`\XTQNMNQV^gpx~{wuuzsf\WUUVVTOJFFKUcu{of`\XVSQPPSX`ir|ym`UNJJMRWYYVPIC><=@FMU]dlsyxqljjmsy~}vohcacglquwvtqopu|tdUH@=?DLT]elrwz{{yvtrsw|{sjd`afnxvlecgnyľ~|{}{xvvyõ{ldcisvld^ZY[`gow~~{xwx|øŽllmnnoprtw{~}yqfZND=;>DMXbkrwyxuog_VOKILR[fq{}vqnmlkhd_YTOLJIJLOU[bjpuyzzyz|ujb^]_``]XQLKP[lzmc\XUSQNMMPU^hs~{m`TLHHLRX[ZVOG@;9:?FNWajrzztpmmnsyzrkfehmtz}xutv{yk\OD>=?FNW`hotx{|{yvtssw{}vojghls|tkdbdkt~Ľ~{z|ysonqxĽumknv{pf^XVVZair{üqrrssttuwz|~ztj_TKDAAEKS[cjpsusoibZSNLMQXajt|xspnljf`XQKFDCEHLQV\afkpsvy{~wnhffikkhbZTRVarrha][YWTRRTY`hr{}o`TKHHMTZ^^[TMFA?AELT^gpy{wtrqrty~~wronrw~||}}vl`TIA=>BIR[dlrx{}}{xurqqtx}}xtrsv{~tkdbchowľ}zy{woigjq|{xx|wlc\XWZ`hr{¾xxxxxwwwwxz{|{xsld\TNJHIKOU\biorsqmg`ZURRU[aipw~{wtqle\RIB=;=AGOV[`cfilosx|~vpmmosvvsld]Y\fv¹}tnkigdb_^_aejpv}~pbVMIJOV]bdb^XSONORW^fox~ywuuwx{~~{z{~zvph^TKD?>@FMV_hpw||xtpnmoty~umgcbejqy}xwy~vmebdlxtkc_^_dktǿ~}}{zxvuuuuuusqmic^ZURONOQV\cjpstrmhb][Z\`ekpty~}vndYLA9448?IS\bfhhhjlqv}~xspprv{}vnfackyĽ|zxvsqommnnoqtx~~rdXPLLQX`fijifca`acfkpw~}yxxz}|tlcZRJD@?AEKS[dmu|}xrnjijnsyyqjfcdglt||wux~vkc_ajw~vojhilrz·˄~{xurpnnnnnnnmkifa\WSPPSX_gnsvurnieccdgknqsvx{|qdVH;2./5?LXcjmmjhgint{}xsommotzvniio{½}{xuqnmnrx~sf[SNNRX`floqrrrrsstvz~|zz|zncXOGB??AEJQXairy}wqkgeehmt||uoieddhpzù{utw}wkb_ajx}yvvwzȿɿȿ{wsnkihhikmoqrrplf_YTQRV]elruvtqmkiikmoqrsstuvxz}rdTD6-),4AP_krtqmhefjqyzuojfddfjqy~vpos}}vpkjlqx}sh]UPNQV\ciouy||z{~vi\QHB>>@DJPW^fnu|}wpjebbdiox||ztnhedfnyúȼ{usv|xmd`cm|{xy}ʿ¾ɽ˿{vqlhedegimquxyxuog_XTSV[bjostrpnlklnprtttsrqppppruzrbRB4+(,6DVfsyzungbaelt||voha\XVW[ais~{vtwwpmnqw}{rh^UOLMPU[bjry|{|~qcWMFA@AEJPW]djqx}|vpjeb`aekt|ww{yrlfdfn{ij}|~ǻztsv|yngdhr¿{wvy~ǻĿ˾ǻ}ytojfdcegkotx|~}ztme]XVW[`fjmmljihhjmpstuutrpnkigghlqy|o`PA4+).9J\myxne^\_fnvz{ysld[TMIGHLS]iuzxz|xwx|ypf]TMHFGJOV_is||zz{~ui^UNIFFHLQW]cinty~zupkfcaachp{zttw}~wpjfhpιzx{µztsv{yqkjnyÿľ{z{ĸſ²}zvqlhfdegjnrw{}xqib]ZY[^adedca``beimqtuvutqnjeb_^_ciqx~uj]OA5.-2?ObsynbZWY_gostqkcZQHA;89=DO\iv}|}|umdZQIC><=AHQ\hs}}{yxxy{}|riaZURPOPRUY_dinrvz}|yuqnjfdbcfmvxssv}}uoklu{z~ùzutvzzspqvſøſɺǼ}|zwtqmjgffhknrvz~}ysmgb_]\]]^][YWVWZ^chmquwwvsojd^YVUW[ahntwxwsmdZNB8228EUgwyl_VRTY`gklic[RI?70,,/6AN]lwyri`WOF=62039BMZgrz}|{zywvvvwwwwwxzvkb\YXXYZ[\]_bfjnrux{}}}}{ywutqolhedfjr~vrrw~|vrs|ǭzwvwz}~zwvy¯ɺľĶ¹tsrpnkigefgjnrvz}~|yupkgca_]\ZXUQONORV\bhnsvxxvrle]VPLLNSY`eikkhd^VLC;78>JZjxvi\RNNSY_cdb]VND;2*%$&,7ETcpz~ume]UMD:1*'(,4?LYeov{}}|ywusqonoqsvwwusrsv}zy}tf[TRSX]bfhiiijloruxz{{{zywvvvvvtqnjgfioy{sprx~{}˲Ľ|yxxy{}~~}||}Ϳؿ|{¼¸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@<::<=?BDFFFEDCBAAABBCDEHKOSY_ekosuwxz{}~vtx|zzz{{|||{xtnha[XXZ]aeggea[UPKHFEFIMSY`eiigc^\]blyq`PFDHSap{xrmjjlpsttqnjggimsz|xutvy}~{xwy|~|}xiZPMTcy~yutvz|vqmjfc`^^aejqy¼Ż.0248=BIPW]behknqtvwvsojeccflu}{qg]TLFCCFMV`hmnjc[SOORYagkjf^UKD?==?ACCB@>=<<=?ADFGHIJLPTZaipv{{uty{vtrqponljhea]YVSSUX]bfjkkjfc^ZWTRRSUY^cgjjhd`^_enzq`PE@AHS^hptutrqppqrsssqpnnoquz~yvttvzyiZPNUe}ytstyztolifc`^^`dipxɾù+,/159?FMTZ_bfhknqstrokfb``dkt~}sh^TKD@?BHOX`fihd^YVVY^dhjie^UMFB???@AA?=;::;>BFJMNONNOQTZbjry~xssy{toljiheb^ZVSPNMLMOSW\`eikmnmljhfdcbbbdgiklkifbabgoy}paSG@>@FMU]djnruwxxwvtsrqqrtvz}|wtstx}{k]TRZk·»ytqqv}λ~xusrokgdccfkqx̿ú*,.037@DJQX^bcca_]^_bdffd`\VPKFCA@@?>=<;;=@DJOTWXWUSRRUY`hpw|zsprx{qjfdcba]YSLGCAACEIMRVZ^aehkmoqrstuuuutttsrpnkgedeiou{~wncWMD>;;=CJS^hqy~}yvsrqrsuwz}~zvttv{~qd\[ctǽüyrnmqyİ{uokijmsy̿ľŽ,-/136;@FMSY^begikkkifc`]\]agow}{sjaXPID@??AEJPUZ^accddcba_][YWUSPMIEB?=<<<>AEJPV\`bb`\YUTTW]djptvwwxxz}}wqmlov~yne_\\\][XRJB<767;AGMRUXZ\_beinsw|~ytpligggjlorstspke]UKB93029DRbp|~yurppqrtwz}|yvuvyxnhhpºzqlils}̸wrpqu{Ⱦɽ/02357;?EKQW\`dfghhfdb_\[Z\_djotwwupjbZSMHDA@@@BEINTZ`dhiifa\WSQQRTUUSOID?<;;>CIPW^dilmlhc^XUTUY^cgiihgffhlrw||yuqmjhhimsy}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QIC?<:8667=COau}uokihgd_YQKGHMUbpÿƻμsg`_dn}ùȾ¿xtsw8:=AFLRX\][WQLHFGIMQSTTRPOPRW\bgjjhd`^^ahq{th\OD;3.,,.3;CKRWXUOE;3//5>KYgr||umd[RJC=841026?JWer|{pdYOGB?=;97569?HTanz{wqkfcabdgjllkhecbcfkorsrnhb\XWY]bffc]TMIJR_q{vrnkiheb]VOIGHNXeu¾¯uf]Z_j{Ž׽¹}xx|>@BEIMRVYYWSOJFDDEGJMPRTUWY\_beffeb^[YZ\ahow~~ui]PD;400159>CFIKKIEA=;<<<>AEJQX`gov|xqh^TJB<864431125:768?CHNV]cgihfb]XTRPPPPPPPQSW]emtxyumbVJA<;>BFHGC=7201572001233459@JVboy|tkb[VTRPMHC>9657;BJT^fov}ui^UNJIJMRWZ]\[XUTTUY\`cefghijknptzudWPNQW_dhhfa\WRMIHINWdsxpjils}¼¿½n^WZexĺ]]]]]]][YVSOKGD@=;;<@FMV^ejkid^VPLJJKLLKIFDCFLU_iqutof[PHDDGLOPLE<3,),3?M[hqwyyxwwwxxvqjaVJ@60+*+-0368@ELSY[[WSOLLOSY_cefffgimsztaPE?@FOYafge`[UPKHGINXeutg]WW]hvſijqaY[fy¾ÿkjjihgec_ZUQLHD@=;:;?ENW_fjjg`XPIECDFIIHD@;9;@IT_ioqoh`WQNNRVXXRI>3,)-7EVfs|~ztommnonke]SH=4-)''*.38?EMU]elquxxvsojeb_]\YVPJC=72.-.17>GQ\hu}kZJ?758>GPX[[XSNJIKPV[_bbbbdhnwr_N@747?JU_egea[UOJFEGLVdtzj[PKLTbrľ½ĵtd\^i|ƴ½yxwvusplg`ZSNID@=;;@DGHFC=856:ALWaimmjd_ZXY\_a_YOD9205@Oaq|}tjc^^`ceeb\TJA80+'&',3;FQ[dlqttsqomjgeb`_]\YVQKE?82-)''+19CO]kz}jWF91.19CNW]^[WRNKLNRVXZZZ[_enz~m\L>4//4=HS]cfea\VPJECDIR`qxgXMGJSasſµwg`bm¿ɹ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F:2./5>JWbjoqojaUG9-$!$,:K]n}|lZG8.+/9GU`hjhd^ZWVWXYYXVSPNLLLOSY`ir}ºѾ}~Ƿ½~}}~|yvuuvy}xoe[QJDAACFJNPPMHA:4/*(&')-28>CGIHFC@>>?AEINRW\_aa^YSNJJOXcnx||uk]PD<88:=@ABA@@AEJPUYYUMC;68AQf{kVE:68>DHIFA;768=FPZdlruxz|~}vohb_]]^]ZULC9303:DP[djmmiaWK>1& %1AUhx}qcTG=88>IVclrrng_YTRRSUVWXZZZXUQMJKPYgwȷ|tonqv~˼¿~{z|ytrrty|xrjbZQJDA?@BEILMMJD>71+(%%&(,28>CFGFC?<::<@EJNRUWXWUQKE?=?EP]kuzwn_N>2-.5>HOSRMGA=FSdusbPB:7:@FIIE?8436=GTbo{~umfa]ZYWTOH@9448@JU^fjjg`WL@3(! )8L`t~rf[RKGGKR\gqwzwqh_WQMLLORV[`dge`WNEACL]sпʾticbfo|̿|yy|{tppt{xvtqmic\UNHB?==>ADHJKJGB<50+(&%')-28=BDEC?;867:>DINQRRQNJD>8325ACB@<84337=?BEFC?:535;EScuwnf_YTPLHD?<;=BJS[aed`XOD9.& (6I^twh[TQTZclv~~th\QHB??BHQ\hryztgWH>BFIJJHD?:520//03594+$ $-<97432247:62/-.037;>?@?=:741.,-18CO[cd_TD3& #/BViuxreTC4*&&+2:BJPUY\^][XTQONMMMKHDA=:631149BM[k}vnf_YTPMKIFEEGKPUZ]]ZUME<4,'$%*3ARexraQHFLYj}qbTG=6337?JWer|~vj^VU\mùپȶyldcivºǻľ~{{666556654310//149?EKNPOMJFC@??@ABBBBA@>;851.-,-.025678887654458>FPX^`\SG:1-0:J[irsmaQA3*&&+2:CLU\adda[TMHFGJNPPMG@81+(),4>KZj{yqjd^YVSQOMKJJKNQTVXWTOIC<61.,-2:FUeuvgVHABL\q|m]NB81./4ELPSTROLJHHHIJJIHFC@=:7520.,+**+,-/257:;<=>?AEKQVZ[YSLD?=@HR]fkjcXK>3,()-32(!!)5DUgyyrlfa]ZWVTSRPONNOPQRRQNKFB>;8668BNawwgWI<3,*,2:EQ^jv~ζһ~zz|!"%(+.110-+*+/4;97542/,)&%%&)-28<@CEGIJLORTVWWURPNNPTY^a`]VND;3.,,06>GR\eknke[OE><@GPVXSI;-!)8K_rvolmpsvwuqlgc`][ZYXWVUSRQPONNLKHFDA@???@CGMU_irwxrgZLCAFTg~p`QC8/*),2;DO[fr}ҼľͶzvuvx|Ž $)-010-*)),29BJQUWWUSRRSUWXXVSOJEA><;;:840+&#!"%+18>DHLNOPQQQRRSTVXZ\]^^][XTNHB<620//27>GQ\ekmkdYNC<:>ENUVQG9*,=Qfzyh[SPSY`fklkieca_^\[ZYXWVTRQNLJHECA@?@ACFIMSY`hpw{ytj]RKIO]pxhXK?5.**.4FPZafhhgfdca_\[YXWVUSQNKHEA?<;;DIMOQQPOMKKLQW_fkmjdZNB80,*+,/02246;BIRY_a`[TKC=::>BFFC<4,'&)1>L]m}~jUB4,*/9EQ[chkkkjhd`\XVUUUUTROKGC?;7557;AJT_ju~unloxpaTIA:62137=DLT]gt¹¿įƽ||~ytplkkmqw~"',/10,)&%&*/6=BEFFEDEGLQW\`aa_\YVUVWXXVQKC;3.,,.28=AEHJKLKJIGHJPW`hmni`TE7+# #(,023458=DJQUXXUQKE@;99:::8531149AJUamyp\H6)"!'1>KWaioqrqmg`ZTQPQRSTRPLHC>830/15=IVfupbUKC>;988:>DJRYbmzŽ}~ðƿŶľĿ{vqlihjnt|#',./.,(&$%(-27;==<;;<<=>@CGLSZakvʿ|vux~ñ½ɵ}Ǿ~}~~ztnjhils{ "%(+---+(&%&(+/356532126;BKSY^abbbbdgjmnmid]TLE?;87778889:;=?@BFKQYahkibVH7)&-3789:;=?ADFIKMNONJD=4-'%&+3=HRY_abcehlpssndWH8+"$.:HVcnw|}zsj^SKEDEHLOQQOLHB;4-**/9H[q¸zl]PE>:9:>BEHLQV]dlvͿuonr{µü~~̵wuzķywwzxqlhils{$%%&'()*++*)(''(*,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bksy|{xskbXND<7447=EOYckquxxxwvutrqqqqsuwy{}~}{ywusrru{|n`TJDAABDEFFGHJMPSVXXWTPLHDB@@@ACEFHIIIGEB@>>>@EKRZbjs{|rjeba`_\XTOKGDBAADHNU]fow}pf_]`gpyztoos}umihkpw}}żоɻ|yxxz}|z{{tonpwB@=:5/)#"&),/01210/,*'%#""#&).38;=<;;<@FP\hsz}wpf\SJC?<=@FNW`hotwyxupke`]\]afkoqqpnkigffghiijjlnszxj^UNKIIHHFCAABGLSY^_^YQH@:77:?CHKLLKIHGFGGGGFDDDFJOW`jv~}}{wqjc[UPMKLNSZclv{qf[SPQYdp||skggks}|ywvwy||z{Ųúyspnoqtx|zy{{upory<:9630,'#!#&(*++,+*)(&%%&(+18>CEC?94016@N]kwyqh_VOIEDFJOV^elquutoh_VOJILRY`dfd`[UQNMORVZ^`cfjpwti`ZVSROLHC>=>CJS\cec]RF;4027>FLPQOMJHGILOQPMHC>;;>DN[k{žvkc\XUVY_gpz|vsqpmic[RJFFLVcr~}rh_[Z^dlsz~{yyz~{wwy~̻þýxngeeimsx|}yy||vqpt{544310.+(%!!#%&'()))(((*-17?FJKG@6-'%)2ARcq{}vog_XROMMPTY_eimonkf^TJB>=@FNTXXUOG@;9:>DKQVZ]aekr{{skfb^[XSMF@=>CKU_gjh`TG;2.06?HOSTRNJIIMRWZYTKB81./6BRdxúwme`^_cjr{wnf`\YWTPJEAADLXes~zocYRNNQV^foy|wttvz}~~{xussv|½ŵ|}xlebdiou{}zz~|wssv~///////.-*'#  "$%')*++,.16::CGIGA7,"#1AQ_ipsrpmifda``acfikkjfa[UOJFDBA@ABCCB@;5-&" #)3?JSY]^^^_bgov}|ywtqlf`YSNNPV]djmlf]SIA=<>CHLOPPONPSY`ehe\O@1'"$/AWp»ƾ|ogeglt|}ukbXPHC?==>ADIOV^fmruusnh`XQJFCCFKRZdmu{}}yuokijlpsuuspmlmqw|wtqpqu|ƿ|}}~~{ywx|%&')+.02442/,'# "&*.1468:>>>=:61+% %.8BINQQPOOQTY_flsz~teSB4,+1;840,)&$$%(,17>?CJR[eoyvcL7&);Pcpsm_M:)*7FVepwxtk`UKDBCHOV^elrx|~|zwtrommnqsuvsmeZOFA@CJS\elqttpi^QC823>PiǾweZW\gt~qcWOJIIKLJHDABFO[jxscTHA>@EKQVZ[\[ZXURPNLLLNQUZ_flruwurnifegmuvjb]^bjs}Ǽƾǻľſzxy||tmihhjmoqrrsstuwz}&&'()+-/258:;;95/(" &-4:>BCDCA>:630.--/02356776420./39AKWcozt^E-%?BFJKJHFGLUcrn[I;327@KT\`bb`\YUQMJHHILPV\cjpvyzxtniedejr}zmdabhqz˿Ƚ¹ºľ~{{|}tlhfgimprrrqqrtw{+++++**+-049=>>:4,$#*3:@DFFECA>;86568;>@BA?<940+'$$&+21*,3?LW_cdb^ZVSQOOOPRUZ_ekqw|~~{vpjeccgoz̺tlils|ƾĺwplklosvwwusrsux}}||}321/-*(''*/5;@@>8/&'0:BHKKIFCA?>>?ADHLPSSPJC;2+$ "(0:EP[fox~}teP9$&?[tmV@/'(1@RcsscQ@3*')/7?FMRV[_bfjmrw|~pbVOMQZepx|}ztmf_XTRSXbn}ynd\XX\dnzyqllqy~paQE<99=AFIJJJLPXbmv||uhWD5*&*4BO[aca\WRPPSW[`cgjmpsw{}wpjebbekuðwvzĽɻ̿ƾyvuw{~|xvuwz}zxvvw<:840+&"!"(08>A?91'!+7CKPQOKGCABCGKPV\aefc]TI=2( #*3?BFHJKKMPU[afhf_TG9.'(.:HU_ba[SLHHMWbnx~wpjebachq|ɷĹȻɿŶĹ{yz}~|ywuuuEB>:3,$ *4<@?:1'$0>JSXWSMHDCFKRZbjquxwri]O@2'!'/8@GMRW[^`_\UK@3("!'4FZkuwqeVJCDM]oraO?1($%*3BL]q~voida`aelvξķýŻȺ˺{|Ǽ|yy{}|~}{yxxxKHD=6-#$/8>>91( '4BOX\[VPJGHMU_jt||qcRB3(!!&.6>DIMOQRRQOLGA;50.05>JWbhie^UOOUaq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MT\enwzvuw|ǿξwu}yslf`]\`fp|yphaZTLE>98AEKS[afihfdbdjsr[D1%$-=Pbpusj\K:,%4G[m||vttvzsdVIA=?ENXbjortvwxyz}}rkjpyxof_YUSSUVWVRKC;4115=FPY_ceghkntzɿ{ocXOGB@?@CGLRYaiqx|slhhkq|Ĵwnp{~{~}|zvpjeceku{rkd_ZUNF>758@L[lzvkb][\`ceec`]YVRNLKOWctpb[Y^huwdWPRZft}xtsv}))*+-/123320.,*)*,/11.+'%&-;Mcy|l\NB92-+*+.268:::318EUepspgYI:,! +;Nbt~wrpsy{l]NA968>HS]ejlmmnnoqsw}unlpw~vngc``bddc^VLB9436JYhvxmbYTSUZ^aba^[WSOKHHKS`q}k\SPT\hvqaVQS[gt}z{0012356787642/-+*+,--+*()-6DWko]M@5.)&$#%'*.12469=DMWajptutrprv}raRHEIQ]horoh^RF;2+'(-7EVgv~unijoy}oaRD:437?IT]dggecaabdhmt|wpnpv~}xsrrtvvsmcWKA;9?DMYeouvslbYRNORX]`a`^ZWSPNMOT]iyvbRGBBHQZdnv|zrkd`_bir}JIHGFDB@><;::962-)%##&+21)$###" !&,4AHOV]chlnonlkiijns{XWUSPMID@=<<=<:6/)#!"&/;IXgutcP?0%  #%$""*4>HS^gotvwutrqruzxrpqu}~uokjkmnmibXPKKR_o{iVF91./4;DOYcjmkf]RH@<;>DMV`irz}yurpqsvy~rf__do{xmfbchqzľzslgca``_^\XTOLKMQW]addb^YTOKJLPV]fp|ŭunoxϼzkb^`fnv}znd]XVUVUURPMLNRX_flopmib]YWX\`dffd`]ZXXY\ahr~wdTG@=>BGKPTX\`cfjmpsvz~Źdb`]YTOIC?==>><71*$!#*6EVgvwgTB0##'(%!#-7BMWaiosttsqonmosx~vrsyztqolhbZQIEGO[kz}lXE5*&'-6ALW`hlmke]SJA<9:>DLT]fov{|yuronoqtw|tmmr||pfa`dks|ytnkhgffec`\VPLJKNSX\^]YUOJFCCFLU`m}Ǭ{~¾|uu}´vh`]^cjry~}ywwzzof^ZWWXXXWUTTUY^cinqqolgc`_`cfijifb^[ZZ]ahq{}k[OFA?@BDGJNSX^djqw}ƶmkhe`[TMFA>===;71+&%)2@Qctp]I6%"(+*&"#*4>HR[cjoqrqpnkihikot{zuv~}vqke_WOIFHOZgt|zo]I7)! %/;GR\bgiigd_YRLE@=<=AHPZeow|~~|ytpmllmpsy{z~}qg`^`elsyzvromkjjigeb]WRMKJLOSVWURNIECBCGOZhyȬwv~~|Ƽrg`]]agmty~}xronqw|rib][[\\\[ZYY[_chnruvurnkhghjlnmkgc^[Z[^dkuwhZOHDBBBDGKQX_gowнrpmje`YQJC><;:851-+-4>M^p}kWB. !)/0/,**,18@IRY`fknoonljgeccdfkqy{|{tmg`ZSOMOT\emrrl`O>.#!(4AMW]_``_`accb^XOF>87;CO\it{|xsnkiijnry|pga]]_dinsx}}xuv{{vtuz{vspnmllkihfc`\XTPMLKLNOOMKIGFFGJPYeuȯzwzĽÿyne`]]`dinswz||zvpkhgjqz~umgcaaaaa`^]]_chmsx|}}zwtqooprrqmhc^ZYZ]ckuwi\SLGEDFJOV^gowsqolhc]VNF?:75310038AN\l{|iU?+ !+379:;=@DJPW\afilmmljheca_]^_cgnv~wqkfa]ZYZ\`dghe]RD5*#!&0* "-8@EJMQUY]aegiklllkifdb_][ZYZ\_chntzzuqnljihggfeb^XPF;1*')0:GRY\YRKEFMZl~{fN9,(.=Qeu|uniedeint}}xsnie`\XWWZ^chmprqokfb^ZXVVWY]aehigc]WRNMNRX`hqzwngb``bceeda^[YXXYYXWSOJFB@?AEMU]djr{{wuvx}ǰ~źwoifca`_^_`bdefggfca__afmw|upmlllkifca`bgmv~}|{zvqkd^YWWY^fp|zl`XSRU\fpzϺlkjigeb]VMC:3.,.2:EQ_lxweR>* %2>HQX]cgkmopponmljhfca_][YXWWWYZ\^aeiotz}zxxxxxxurmf_VNE=60./4 0.0000000000000000e+00, 3.3333333333333331e-01, 0.0000000000000000e+00, 1.0000000000000000e+00, 0.0000000000000000e+00, -3.3333333333333331e-01 -1.7e+308 Gray 3 3 6.71089e+07 Average Float64 4by4.tif 0.125 0,0.25,0,1,0,-0.25 -0,4,0,4,0,-4 0,0.333333333333333315,0,1,0,-0.333333333333333315 -0,3,0,3,0,-3 -1.7e+308 0 -1.7e+308 0 gdalautotest-3.1.2/alg/data/utmsmall_ds_blinear.vrt0000664000175000017500000000342213701057751021133 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,50,0,3751320,0,-50 Gray 512 128 6.71089e+07 Bilinear Byte ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,50,0,3751320,0,-50 gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_max.tif0000664000175000017500000000420113701057751021267 0ustar evenevenII*yS   Vr^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|-32767&          >.&O  6F 6 & &..&    &.6 ..  O.>. .& .>>&g&   6x_FO6>OW>_>.& &  .&&6FWp6W6OF6O6Ox6&FW_.F_gO>Ox>gWF.OOF6.&FFgF..6FW.>&&g.6W >p__6..66_&>&.&Og. .gpg>6&6>6>>&p6.&6Op&..O66>O66xO6&F .W&&&._W6. p.&WFFF.. &F&.&F>FF>.>6...FO>>Fg&&F.gO_g__g>.O6.6>&&&>>WWWp.6>FWWx_.>6.&g.&.g&. &>.WOxWF.&_. & 6  OFggW&F&&& && .6pW___6pFgFx&&FW&6.pxxg>>&gO__g &6W6 . &&pgx&O&OxF& &.O_F6W6_.g &>&&.&O6_>F_&>>g &&&6 OFF>.F 66F>F &&  66...WWp.F6_666Op.&6.FgO 6&6. .g.&6&F__gdalautotest-3.1.2/alg/data/nodata_precision_issue_float32.tif0000664000175000017500000000071013701057751023142 0ustar evenevenII* S   $: 3.40282346600000016e+38W2$@2$@`TA!H \A#   )#ETRS89 / TM35FIN(E,N)|ETRS89|on;gdalautotest-3.1.2/alg/data/sieve_2634.grd0000664000175000017500000000047413701057751016651 0ustar evenevenncols 10 nrows 8 xllcorner 646973.105999974650 yllcorner 4645937.876000000164 cellsize 3.659999999972 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0 0 0 255 0 0 0 0 255 255 255 255 255 255 255 0 0 0 0 255 0 0 0 255 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_med.tif0000664000175000017500000000420113701057751021247 0ustar evenevenII*yS   Vr^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|-32767     &  &66>   &.WF>O 6F 6..>... xW> &..6 &F66W6&>O.66 66&F6.& 6>&F _gg_& &OFW..FF& .W. . F . OO_ &W & &6. p&     &&6&&&   &&  & _O_gW  &.&&6  px>F6..O_& . &.&F>6O&_6& 6pgWW& .O>OgW6&6 &Og FF6> ggxg>gp>  6 6&FO.>Ox&O &F6 >&6.> g >O .6>g &.F &.__  &66&  &.> .&6 & &&.6 6&p&.  . &> gdalautotest-3.1.2/alg/data/empty_rb.vrt0000664000175000017500000001057213701057751016740 0ustar eveneven PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 2.0983170908647397e+04, 5.0109700347667203e+03, 0.0000000000000000e+00, 5.0175402506259708e+06, 0.0000000000000000e+00, -5.0109700347667203e+03 Alpha 512 128 6.71089e+07 Bilinear Byte ../tmp/empty.tif 0.125 500000,5000,0,5000000,0,-5000 -100,0.0002,0,1000,0,-0.0002 20983.1709086474,5010.97003476672,0,5017540.250625971,0,-5010.97003476672 -4.187446894127006,0.000199562159235014,0,1001.311166463512,0,-0.000199562159235014 PROJCS["WGS 84 / UTM zone 30N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32630"]] PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","32631"]] 4 4 gdalautotest-3.1.2/alg/data/cutline_noblend.vrt0000664000175000017500000000437313701057751020265 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 5.9999999999999993e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -5.9999999999999993e+01 512 128 6.71089e+07 NearestNeighbour Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,59.99999999999999,0,3751320,0,-59.99999999999999 -7345.333333333334,0.01666666666666667,0,62522.00000000001,0,-0.01666666666666667 POLYGON((10 10,10 50,60 50, 10 10)) gdalautotest-3.1.2/alg/data/utmsmall-int16-neg_Q1.vrt0000664000175000017500000000447613701057751021032 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area -3.27670000000000E+04 Gray 30 30 6.71089e+07 Quartile1 Int16 utmsmall-int16-neg.tiff 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,120,0,3751320,0,-120 -3672.666666666667,0.008333333333333333,0,31261,0,-0.008333333333333333 -32767 0 -32767 0 gdalautotest-3.1.2/alg/data/utmsmall_min.tif0000664000175000017500000000545213701057751017570 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kksskkcksckkcJRcZccsZcckksckck{s{νs{sksskkkkcZsccZcZckkkk{ks{{{{kέBŜssksckkkcZcsZZZckcckss{k{Zs{kZc{{s{ckscccccccZccZcZs{{{ssc{sťscckkkcckkccJZkkkk{c{s{RcΥ{kckZkkkcksccs{Zccssccks{k{ΥcccccsckZckk{ck{skkŵ{ťkkZkZcccsZc{kkckZkks{sc{ŔֽksZJZcccckkZskksΜ{Όksέk{skkkcRZs{{{{k{sZZcRZccΔ{ֽޔ{ZckRsޥ{{R{ń{{s{{{{sks{{{Zc{k{ޜ֔sks{{ks{ńZ{{s{{s֌{sŌs{ֵΔ֔Δ{省Ό{RksZkssΌŭ樂ֵ{Jc{Rcc{k֜ŔcνŜ{ksk{skksRcRcJZs{R{Ŝŭތέŵ{kk{ss{ks{cc{sZ{s{{{Jks{{scsks{ck{kc{έޔޥs{{skcccssksksskks{{ss{Μޥkkcskc{{{kc{{ccccsŔs{{֭sRckZZkssZRkckZ{skk{sŌkŔ{έcZRckcscc{skRBZs{{ssZJ:cRkkRkkcsc{ks{ŭd{ΌB)JJ)cJRkcscZcRRsks{{{{ΔޭksZcBRcJRckRZk{ZkJkJskk{k{{c:1:!JRBBcc{JJBJsZcsZ1sBcťksJcBBRR:BRB{JZBsJ{ZZs{ssc::kJkkRRJJBRBJ:sZcsBkcc{sksZ{ŭZckRJBR)J)s{k!ZckkJJckkssc{1ZR:J::JBZc:1RZJ!scsR֥ckc:J)!:1!J:Z:1ZZ1:BcJRR{csŜkZB1BJ))11J1:k))k)RBRZ{Zޭ)11!11::JJB1R{1BZ{s{sc֥{s)!)1)!:J!B!B1::1JZkksksks{ss))!1R!:JB1B)kZBJ1Jcck{k{{ks{!11):)1!::ccB1ZZ:JBRBkk{kks:ZRZZRB)cZRkcB)::cscJ1BRZJ:kc{skZRcZcZBZR{):)BRkZB1Zk:1:Jk{cZR1RRcZZZsZcBJ{k1BRZJ{JB:J!):JcR1cckB):1!1Z::kZkkkZkJBBcc{B::BB{R1J)1ZJB1BJJBB{Z::ZccZZJsskB{cs11::)B:c!B!:1:1J!1:1B:B1J1)cZcsR:Z:R1k{ZR{sBB1)J:{J)BZ!:B::!ZZk:1)s)))BRZ:kcRRJRJc{scJ1)Bsk1R:!))::!BZ1R:ZkJ{JssJJsRJBBJJ{skkJB)BckR1!c:)):ckZZ1)!!Z):JBRRB1Z:ZB1ssZR{:RZksR1B!cR!)!:)Rsk{)11J))RJ!BB:111sJcJR::cscRZgdalautotest-3.1.2/alg/data/utmsmall_near_float.vrt0000664000175000017500000000343713701057751021151 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 NearestNeighbour Float32 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/white_nodata.tif0000664000175000017500000000216013701057751017526 0ustar evenevenII*tS   V255@@@@ASA# w )#WGS 84 / UTM zone 31N|WGS 84|tS   R255@@@@ASA# w )#WGS 84 / UTM zone 31N|WGS 84|gdalautotest-3.1.2/alg/data/utmsmall_med.vrt0000664000175000017500000000417613701057751017605 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Median Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_Q3.vrt0000664000175000017500000000420113701057751017310 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Quartile3 Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_blinear_ushort.vrt0000664000175000017500000000342613701057751022055 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 440720,10,0,3751320,0,-10 Gray 512 128 6.71089e+07 Bilinear UInt16 ../../gcore/data/utmsmall.tif 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,10,0,3751320,0,-10 gdalautotest-3.1.2/alg/data/utmsmall_cubicspline_2.tif0000664000175000017500000000531513701057751021524 0ustar evenevenII*22r2[ =S   V^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|x gS?Mr38cs6&"PCHz/Ht޻ $ H0609ܝLcsiD¤Ј8 2 H$c0|ˮ>}dof) Qp=@ T f ٹtjdxf׎dJf&d U$i8AS($@Ie ER,*qBf %l/$0rh5X}]-fO7WFVAJ:>19u:×ێЬ?tWkTIct֤tRIgmʩ B%N.]D|>>V26ٴX*V[4JqdR_i=;o[-eƗ82tLSFa5jZl[g_?쬔frX(6JkК./5*:ìч_~xu7彄ś,dcDt~mjäT k0s+vuW;WWfqo14*s0̯./-ݠϠYLJWCGaX1InnJBi]xqћǗY|M'qki) ;{'_V<=Y][/-+GO#㣣\rR(U 3_t% hɇSrz'spLf33z10*;Jeeft\^:Jd:K|y`>kiJu\X.KٵRi} iQ.aC4igk#zZQ~?~}s6%QD.C0I&4w*> :՞=lDx251d\yDR\,ē篧y;GQC0G X4BgTPp%i݃\p/?Zc ^h0j3J8l}DJƚ?\OGw{&B;Ɍ^5̙䳙Äq{PU` };/bXpqPW6EX{mkv"OsI@= yuB::qWE$^],%غQ1w9L& 3X@`rD&zC [isj~KB2FYC47 H (z \f!DSNH{u$B_W774ę,bpƣg=>w.IFn\"ZfD[{/9I$tW/}Lf1cnܽ]᷆HTSb_Dcx<yܺqs08wtw-v! lhL u1ÙY&{- H.JSŖʑBR 'ED*9 6k?ܪmlltsXh GZ̩R6j_Qm>%זvh;C U"2NaJ/m}NɄ@%FS:xoED|"@2?7+ $8Bb(n<2 60%4' |[duP8T8f|.It`#QJu֪8~?^4vXbG¨ؾVxW/o -6 ӈ'/j:!M]{ b%PRЮ6& ⺇@W3wֽ^|v0F @[뛛jZx\|8Ýgdalautotest-3.1.2/alg/data/utmsmall_ds_lanczos.tiff0000664000175000017500000000212413701057751021303 0ustar evenevenII*fS   JI@I@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|ju}tjvqjwqwlw|ptkn|n~n|vkjt|}|{sxzvwy~mjoo|y{v|vr{zzzr}mixsrs~|wmismpuzc{r̻kyvxvd{x}ymr}tqms}dppyryjlp\yn~{y{xttwxxogqlznt`q~muisko{|luai~csv~ykxvwxn|t{sM^o|mlbrg|r}sawufehgwxn}xemqazwn~n[|zeyh`lgfz\~znyp}Wksp_\lzvqpux}wqgkjkbtiagmw|po^rs_bbddbifS   8I@I@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|gdalautotest-3.1.2/alg/data/utmsmall_cubicspline_2.vrt0000664000175000017500000000412713701057751021555 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 CubicSpline Byte ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/test3658.tif0000664000175000017500000001760713701057751016401 0ustar evenevenII*22;2LS  @. u255?? ;AąUA!S!#     > )#@TXAr@UTM Zone 32, Northern Hemisphere|GCS Name = unnamed ellipse|Datum = unknown|Ellipsoid = unnamed|Primem = Greenwich||ğɬƱxw}vtzt~t}{|w~w|}{}~{~|~||~y~y~}|~|}w{v|z}}~yyvvwy}|x}tzw}z|~zx~z~|{zwztr|qlvtmsz{ws}~}y~zyx{~~}|wz~y}wumpvtzsknuuytt{z§ßȟŠáǞŚ{~~{|{zgdalautotest-3.1.2/alg/data/utmsmall_average.vrt0000664000175000017500000000417713701057751020453 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 Average Byte ../../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/data/utmsmall_Q3.tif0000664000175000017500000000545213701057751017270 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|{{{sskssss{sss{{s{{sŭ΄{{{ssskksskssk{{{{{sֽŭέ{{{sk{sccssk{sŜk歔ss{sskksssssν浜ť{{{s{{ssssss{{{s{k{{{k{{{{s{ޭ֥{{ssk{sss{sŵ޽ŭεkk{sss{{{{{ńŽΥŭŌŵssc{ssŔťΥŜֵΜ{skccť極֥έťΥ{kkkc{ŜťŜޥk{省ť޵Ŝťs֔ŵ޽{朜ŜﵭťΔޥ{֭޽εŜŽތť{{ssŽ֥ޜs{s{ŔŌsŜŔޭք{楽޽ֽ{Ŝs{朥{޽潌ssss֜ޥތks{sssk{{֔ŵńssss{sk{ŽΔń{ZsssνŌkΥֽ{Rscskck{{k{εֽ浵{ZJcsss{{k֥Žތֽε޽ss{Z{ZRssscޥνֽεsﵽZ{RkZJcscsk{ŵֽޭ楥ŽŽkck{{Rcks{Z{{ŵťťŭֵε޽k{kksksccR{ss{έ{֭ŵ޽εν֭JkcJkZBR{skZk{kc{s΄ΌεޭcZBc{:ZkRRsk{kcskŵ挽֭ŵŭ{BJJscsZRcJkZcRZ{ΥֽŽέŭBJRBBRcBcBcRB{Jŭŭޥŵ֥֭):){RRs{scZRJJ1sΌֵ֭浵1!::sscJkssRZscRZZ{΄νޔ޽11Z{BkRsZs{ZZ{c֭ޭc{c:)skJk{ss{kcZ޽Δcsckc֜ŔBk{scs{RcssZksΔkcc{RkcZs{ZZ{RJRBZRBJkc{kJZkJ:kJεdkŵks{{ZRRBs:Bk!BsRkksskRZֵ{֌{sZJJBJJJ!ks!ccccZRZscccccRcRkŜZkkRJBBJZZs1JZ{:ZRsJBsB:JΌ{{Zs{Z{ZRBBcs!1J:J:ZRZRJZ{{JckJRckcBBsZ1)JRBRs{sZRBJBքZksJcZsRZkk{Zc:)RccsZ1))JR:{{:kkRZckJZJkZksZskZ{gdalautotest-3.1.2/alg/data/utmsmall_Q1.tif0000664000175000017500000000545213701057751017266 0ustar evenevenII*22f2 S   J^@^@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kksskkcksckkcJRcZccsZcckksckck{s{νs{sksskkkkcZsccZcZckkkk{ks{{{{kέBŜssksckkkcZcsZZZckcckss{k{Zs{kZc{{s{ckscccccccZccZcZs{{{ssc{sťscckkkcckkccJZkkkk{c{s{RcΥ{kckZkkkcksccs{Zccssccks{k{ΥcccccsckZckk{ck{skkŵ{ťkkZkZcccsZc{kkckZkks{sc{ŔֽksZJZcccckkZskksΜ{Όksέk{skkkcRZs{{{{k{sZZcRZccΔ{ֽޔ{ZckRsޥ{{R{ń{{s{{{{sks{{{Zc{k{ޜ֔sks{{ks{ńZ{{s{{s֌{sŌs{ֵΔ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EOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 1.2000000000000000e+02, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -1.2000000000000000e+02 Area Gray 50 50 6.71089e+07 CubicSpline Float32 ../gcore/data/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,120,0,3751320,0,-120 -3672.66666666666652,0.00833333333333333322,0,31261,0,-0.00833333333333333322 gdalautotest-3.1.2/alg/reproject.py0000775000175000017500000001210313701060014015775 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: reproject.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test ReprojectImage() algorithm. # Author: Even Rouault # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import osr import pytest ############################################################################### # Test a trivial case. def test_reproject_1(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('../gcore/data/byte.tif') dst_ds = drv.Create('tmp/byte.tif', src_ds.RasterXSize, src_ds.RasterYSize, gdal.GDT_Byte) dst_ds.SetProjection(src_ds.GetProjectionRef()) dst_ds.SetGeoTransform(src_ds.GetGeoTransform()) gdal.ReprojectImage(src_ds, dst_ds) cs_expected = src_ds.GetRasterBand(1).Checksum() cs = dst_ds.GetRasterBand(1).Checksum() dst_ds = None drv.Delete('tmp/byte.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Test a real reprojection case. def test_reproject_2(): sr = osr.SpatialReference() sr.ImportFromEPSG(32611) sr2 = osr.SpatialReference() sr2.ImportFromEPSG(4326) drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('../gcore/data/byte.tif') dst_ds = drv.Create('tmp/byte_4326.tif', 22, 18, gdal.GDT_Byte) dst_ds.SetGeoTransform([-117.641169915168746, 0.000598105625684, 0, 33.900668703925191, 0, -0.000598105625684]) gdal.ReprojectImage(src_ds, dst_ds, sr.ExportToWkt(), sr2.ExportToWkt()) cs_expected = 4727 cs = dst_ds.GetRasterBand(1).Checksum() dst_ds = None drv.Delete('tmp/byte_4326.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Test nodata values def test_reproject_3(): data = '\x02\x7f\x7f\x02\x02\x7f\x7f\x02\x02\x7f\x7f\x02' src_ds = gdal.GetDriverByName('MEM').Create('', 4, 3) src_ds.GetRasterBand(1).WriteRaster(0, 0, 4, 3, data) src_ds.GetRasterBand(1).SetNoDataValue(2) src_ds.SetGeoTransform([10, 1, 0, 10, 0, -1]) dst_ds = gdal.GetDriverByName('MEM').Create('', 6, 3) dst_ds.GetRasterBand(1).SetNoDataValue(3) dst_ds.GetRasterBand(1).Fill(3) dst_ds.SetGeoTransform([10, 2. / 3., 0, 10, 0, -1]) gdal.ReprojectImage(src_ds, dst_ds, '', '', gdal.GRA_Bilinear) got_data = dst_ds.GetRasterBand(1).ReadRaster(0, 0, 6, 3).decode('latin1') expected_data = '\x03\x7f\x7f\x7f\x03\x03\x03\x7f\x7f\x7f\x03\x03\x03\x7f\x7f\x7f\x03\x03' if got_data != expected_data: import struct pytest.fail(struct.unpack('B' * 18, got_data)) ############################################################################### # Test warp options def test_reproject_4(): data = '\x02\x7f\x7f\x02\x02\x7f\x7f\x02\x02\x7f\x7f\x02' src_ds = gdal.GetDriverByName('MEM').Create('', 4, 3) src_ds.GetRasterBand(1).WriteRaster(0, 0, 4, 3, data) src_ds.GetRasterBand(1).SetNoDataValue(2) src_ds.SetGeoTransform([10, 1, 0, 10, 0, -1]) dst_ds = gdal.GetDriverByName('MEM').Create('', 6, 3) dst_ds.GetRasterBand(1).SetNoDataValue(3) dst_ds.SetGeoTransform([10, 2. / 3., 0, 10, 0, -1]) gdal.ReprojectImage(src_ds, dst_ds, '', '', gdal.GRA_Bilinear, options=['INIT_DEST=NO_DATA']) got_data = dst_ds.GetRasterBand(1).ReadRaster(0, 0, 6, 3).decode('latin1') expected_data = '\x03\x7f\x7f\x7f\x03\x03\x03\x7f\x7f\x7f\x03\x03\x03\x7f\x7f\x7f\x03\x03' if got_data != expected_data: import struct pytest.fail(struct.unpack('B' * 18, got_data)) gdalautotest-3.1.2/alg/contour.py0000775000175000017500000003455613701060014015511 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: contour.py 3ef97ac2fde04c6e4eba37a53757a74c0d140bbf 2020-04-15 15:55:36 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: ContourGenerate() testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import array import os from osgeo import gdal from osgeo import ogr import gdaltest import ogrtest import pytest ############################################################################### # Test with -a and -i options def test_contour_1(): try: os.remove('tmp/contour.shp') except OSError: pass try: os.remove('tmp/contour.dbf') except OSError: pass try: os.remove('tmp/contour.shx') except OSError: pass drv = gdal.GetDriverByName('GTiff') wkt = 'GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]' size = 160 precision = 1.0 / size ds = drv.Create('tmp/gdal_contour.tif', size, size, 1) ds.SetProjection(wkt) ds.SetGeoTransform([1, precision, 0, 50, 0, -precision]) raw_data = array.array('h', [10 for i in range(int(size / 2))]).tostring() for i in range(int(size / 2)): ds.WriteRaster(int(size / 4), i + int(size / 4), int(size / 2), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) raw_data = array.array('h', [20 for i in range(int(size / 2))]).tostring() for i in range(int(size / 4)): ds.WriteRaster(int(size / 4) + int(size / 8), i + int(size / 4) + int(size / 8), int(size / 4), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) raw_data = array.array('h', [25 for i in range(int(size / 4))]).tostring() for i in range(int(size / 8)): ds.WriteRaster(int(size / 4) + int(size / 8) + int(size / 16), i + int(size / 4) + int(size / 8) + int(size / 16), int(size / 8), 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1]) ogr_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/contour.shp') ogr_lyr = ogr_ds.CreateLayer('contour') field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('elev', ogr.OFTReal) ogr_lyr.CreateField(field_defn) gdal.ContourGenerate(ds.GetRasterBand(1), 10, 0, [], 0, 0, ogr_lyr, 0, 1) ds = None expected_envelopes = [[1.25, 1.75, 49.25, 49.75], [1.25 + 0.125, 1.75 - 0.125, 49.25 + 0.125, 49.75 - 0.125]] expected_height = [10, 20] lyr = ogr_ds.ExecuteSQL("select * from contour order by elev asc") assert lyr.GetFeatureCount() == len(expected_envelopes) i = 0 feat = lyr.GetNextFeature() while feat is not None: envelope = feat.GetGeometryRef().GetEnvelope() assert feat.GetField('elev') == expected_height[i] for j in range(4): if expected_envelopes[i][j] != pytest.approx(envelope[j], abs=precision / 2 * 1.001): print('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) print(feat.GetGeometryRef().GetEnvelope()) pytest.fail('%f, %f' % (expected_envelopes[i][j] - envelope[j], precision / 2)) i = i + 1 feat = lyr.GetNextFeature() ogr_ds.ReleaseResultSet(lyr) ogr_ds.Destroy() ############################################################################### # Test with -fl option and -3d option def test_contour_2(): try: os.remove('tmp/contour.shp') except OSError: pass try: os.remove('tmp/contour.dbf') except OSError: pass try: os.remove('tmp/contour.shx') except OSError: pass ogr_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/contour.shp') ogr_lyr = ogr_ds.CreateLayer('contour', geom_type=ogr.wkbLineString25D) field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('elev', ogr.OFTReal) ogr_lyr.CreateField(field_defn) ds = gdal.Open('tmp/gdal_contour.tif') gdal.ContourGenerate(ds.GetRasterBand(1), 0, 0, [10, 20, 25], 0, 0, ogr_lyr, 0, 1) ds = None size = 160 precision = 1. / size expected_envelopes = [[1.25, 1.75, 49.25, 49.75], [1.25 + 0.125, 1.75 - 0.125, 49.25 + 0.125, 49.75 - 0.125], [1.25 + 0.125 + 0.0625, 1.75 - 0.125 - 0.0625, 49.25 + 0.125 + 0.0625, 49.75 - 0.125 - 0.0625]] expected_height = [10, 20, 25, 10000] lyr = ogr_ds.ExecuteSQL("select * from contour order by elev asc") assert lyr.GetFeatureCount() == len(expected_envelopes) i = 0 feat = lyr.GetNextFeature() while feat is not None: assert feat.GetGeometryRef().GetZ(0) == expected_height[i] envelope = feat.GetGeometryRef().GetEnvelope() assert feat.GetField('elev') == expected_height[i] for j in range(4): if expected_envelopes[i][j] != pytest.approx(envelope[j], abs=precision / 2 * 1.001): print('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) print(feat.GetGeometryRef().GetEnvelope()) pytest.fail('%f, %f' % (expected_envelopes[i][j] - envelope[j], precision / 2)) i = i + 1 feat = lyr.GetNextFeature() ogr_ds.ReleaseResultSet(lyr) ogr_ds.Destroy() ############################################################################### # def test_contour_real_world_case(): ogr_ds = ogr.GetDriverByName('Memory').CreateDataSource('') ogr_lyr = ogr_ds.CreateLayer('contour', geom_type=ogr.wkbLineString) field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('elev', ogr.OFTReal) ogr_lyr.CreateField(field_defn) ds = gdal.Open('data/contour_in.tif') gdal.ContourGenerate(ds.GetRasterBand(1), 10, 0, [], 0, 0, ogr_lyr, 0, 1) ds = None ogr_lyr.SetAttributeFilter('elev = 330') assert ogr_lyr.GetFeatureCount() == 1 f = ogr_lyr.GetNextFeature() assert ogrtest.check_feature_geometry(f, 'LINESTRING (4.50497512437811 11.5,4.5 11.501996007984,3.5 11.8333333333333,2.5 11.5049751243781,2.490099009901 11.5,2.0 10.5,2.5 10.1666666666667,3.0 9.5,3.5 9.21428571428571,4.49800399201597 8.5,4.5 8.49857346647646,5.5 8.16666666666667,6.5 8.0,7.5 8.0,8.0 7.5,8.5 7.0,9.490099009901 6.5,9.5 6.49667774086379,10.5 6.16666666666667,11.4950248756219 5.5,11.5 5.49833610648919,12.5 5.49667774086379,13.5 5.49800399201597,13.501996007984 5.5,13.5 5.50199600798403,12.501996007984 6.5,12.5 6.50142653352354,11.5 6.509900990099,10.509900990099 7.5,10.5 7.50142653352354,9.5 7.9,8.50332225913621 8.5,8.5 8.50249376558603,7.83333333333333 9.5,7.5 10.0,7.0 10.5,6.5 10.7857142857143,5.5 11.1666666666667,4.50497512437811 11.5)', 0.01) == 0 # Test with -p option (polygonize) def test_contour_3(): try: os.remove('tmp/contour.shp') except OSError: pass try: os.remove('tmp/contour.dbf') except OSError: pass try: os.remove('tmp/contour.shx') except OSError: pass ogr_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('tmp/contour.shp') ogr_lyr = ogr_ds.CreateLayer('contour', geom_type=ogr.wkbMultiPolygon) field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('elevMin', ogr.OFTReal) ogr_lyr.CreateField(field_defn) field_defn = ogr.FieldDefn('elevMax', ogr.OFTReal) ogr_lyr.CreateField(field_defn) ds = gdal.Open('tmp/gdal_contour.tif') #gdal.ContourGenerateEx(ds.GetRasterBand(1), 0, 0, 0, [10, 20, 25], 0, 0, ogr_lyr, 0, 1, 1) gdal.ContourGenerateEx(ds.GetRasterBand(1), ogr_lyr, options = [ "FIXED_LEVELS=10,20,25", "ID_FIELD=0", "ELEV_FIELD_MIN=1", "ELEV_FIELD_MAX=2", "POLYGONIZE=TRUE" ] ) ds = None size = 160 precision = 1. / size expected_envelopes = [[1.0, 2.0, 49.0, 50.0], [1.25, 1.75, 49.25, 49.75], [1.25 + 0.125, 1.75 - 0.125, 49.25 + 0.125, 49.75 - 0.125], [1.25 + 0.125 + 0.0625, 1.75 - 0.125 - 0.0625, 49.25 + 0.125 + 0.0625, 49.75 - 0.125 - 0.0625]] expected_height = [10, 20, 25, 10000] lyr = ogr_ds.ExecuteSQL("select * from contour order by elevMin asc") assert lyr.GetFeatureCount() == len(expected_envelopes) i = 0 feat = lyr.GetNextFeature() while feat is not None: if i < 3 and feat.GetField('elevMax') != expected_height[i]: pytest.fail('Got %f as z. Expected %f' % (feat.GetField('elevMax'), expected_height[i])) elif i > 0 and i < 3 and feat.GetField('elevMin') != expected_height[i-1]: pytest.fail('Got %f as z. Expected %f' % (feat.GetField('elevMin'), expected_height[i-1])) envelope = feat.GetGeometryRef().GetEnvelope() for j in range(4): if expected_envelopes[i][j] != pytest.approx(envelope[j], abs=precision / 2 * 1.001): print('i=%d, wkt=%s' % (i, feat.GetGeometryRef().ExportToWkt())) print(feat.GetGeometryRef().GetEnvelope()) pytest.fail('%f, %f' % (expected_envelopes[i][j] - envelope[j], precision / 2)) i = i + 1 feat = lyr.GetNextFeature() ogr_ds.ReleaseResultSet(lyr) ogr_ds.Destroy() # Check behaviour when the nodata value as a double isn't exactly the Float32 pixel value def test_contour_nodata_precision_issue_float32(): ogr_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/contour.shp') ogr_lyr = ogr_ds.CreateLayer('contour', geom_type=ogr.wkbLineString) field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) ds = gdal.Open('data/nodata_precision_issue_float32.tif') gdal.ContourGenerateEx(ds.GetRasterBand(1), ogr_lyr, options = [ "LEVEL_INTERVAL=0.1", "ID_FIELD=0", "NODATA=%.19g" % ds.GetRasterBand(1).GetNoDataValue()] ) ds = None assert ogr_lyr.GetFeatureCount() == 0 ogr_ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/contour.shp') def test_contour_too_many_levels(): ogr_ds = ogr.GetDriverByName('ESRI Shapefile').CreateDataSource('/vsimem/contour.shp') ogr_lyr = ogr_ds.CreateLayer('contour', geom_type=ogr.wkbLineString) field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) content1 = """ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 1 1e30 0 0 0""" content2 = """ncols 2 nrows 2 xllcorner 0 yllcorner 0 cellsize 1 1e6 0 0 0""" for content in (content1, content2): with gdaltest.tempfile('/vsimem/test.asc', content): ds = gdal.Open('/vsimem/test.asc') with gdaltest.error_handler(): assert gdal.ContourGenerateEx(ds.GetRasterBand(1), ogr_lyr, options = [ "LEVEL_INTERVAL=1", "ID_FIELD=0"] ) != 0 with gdaltest.tempfile('/vsimem/test.asc', content): ds = gdal.Open('/vsimem/test.asc') with gdaltest.error_handler(): assert gdal.ContourGenerateEx(ds.GetRasterBand(1), ogr_lyr, options = [ "LEVEL_INTERVAL=1", "LEVEL_EXP_BASE=1.0001", "ID_FIELD=0"] ) != 0 ogr_ds = None ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('/vsimem/contour.shp') ############################################################################### def test_contour_raster_acquisition_error(): ogr_ds = ogr.GetDriverByName('Memory').CreateDataSource('') ogr_lyr = ogr_ds.CreateLayer('contour', geom_type=ogr.wkbLineString) field_defn = ogr.FieldDefn('ID', ogr.OFTInteger) ogr_lyr.CreateField(field_defn) ds = gdal.Open('../gcore/data/byte_truncated.tif') with gdaltest.error_handler(): assert gdal.ContourGenerateEx(ds.GetRasterBand(1), ogr_lyr, options = [ "LEVEL_INTERVAL=1", "ID_FIELD=0"] ) != 0 ############################################################################### # Cleanup def test_contour_cleanup(): ogr.GetDriverByName('ESRI Shapefile').DeleteDataSource('tmp/contour.shp') try: os.remove('tmp/gdal_contour.tif') except OSError: pass gdalautotest-3.1.2/alg/tmp/0000775000175000017500000000000013701057751014244 5ustar evenevengdalautotest-3.1.2/alg/tmp/do-not-remove0000664000175000017500000000000013701057751016650 0ustar evenevengdalautotest-3.1.2/alg/warp.py0000775000175000017500000015130713701060014014763 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: warp.py f48a34f948917b8e550f89ab0f1beb415756c7a6 2020-06-10 19:17:21 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test the image reprojection functions. Try to test as many # resamplers as possible (we have optimized resamplers for some # data types, test them too). # Author: Andrey Kiselev, dron16@ak4719.spb.edu # ############################################################################### # Copyright (c) 2008, Andrey Kiselev # Copyright (c) 2008-2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import sys from osgeo import gdal from osgeo import osr import gdaltest import pytest import struct ############################################################################### # Verify that we always getting the same image when warping. # Warp the image using the VRT file and compare result with reference image # Upsampling def test_warp_1(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_near.vrt') ref_ds = gdal.Open('data/utmsmall_near.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_1_short(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_near_short.vrt') ref_ds = gdal.Open('data/utmsmall_near.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_1_ushort(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_near_ushort.vrt') ref_ds = gdal.Open('data/utmsmall_near.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_1_float(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_near_float.vrt') ref_ds = gdal.Open('data/utmsmall_near.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_2(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_blinear.vrt') ref_ds = gdal.Open('data/utmsmall_blinear.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_2_short(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_blinear_short.vrt') ref_ds = gdal.Open('data/utmsmall_blinear.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_2_ushort(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_blinear_ushort.vrt') ref_ds = gdal.Open('data/utmsmall_blinear.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_2_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_bilinear_2.vrt') ref_ds = gdal.Open('data/utmsmall_bilinear_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_3(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubic.vrt') ref_ds = gdal.Open('data/utmsmall_cubic.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_3_short(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubic_short.vrt') ref_ds = gdal.Open('data/utmsmall_cubic.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_3_ushort(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubic_ushort.vrt') ref_ds = gdal.Open('data/utmsmall_cubic.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_3_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubic_2.vrt') ref_ds = gdal.Open('data/utmsmall_cubic_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_3_float_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubic_2_float.vrt') ref_ds = gdal.Open('data/utmsmall_cubic_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_4(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubicspline.vrt') ref_ds = gdal.Open('data/utmsmall_cubicspline.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_4_short(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubicspline_short.vrt') ref_ds = gdal.Open('data/utmsmall_cubicspline.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_4_ushort(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubicspline_ushort.vrt') ref_ds = gdal.Open('data/utmsmall_cubicspline.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_4_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubicspline_2.vrt') ref_ds = gdal.Open('data/utmsmall_cubicspline_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_4_short_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubicspline_wt_short.vrt') ref_ds = gdal.Open('data/utmsmall_cubicspline_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_4_float_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_cubicspline_wt_float32.vrt') ref_ds = gdal.Open('data/utmsmall_cubicspline_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_5(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_lanczos.vrt') ref_ds = gdal.Open('data/utmsmall_lanczos.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_5_downsize(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_lanczos_2.vrt') ref_ds = gdal.Open('data/utmsmall_lanczos_2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Downsampling def test_warp_6(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() tst = gdaltest.GDALTest('VRT', 'utmsmall_ds_near.vrt', 1, 4770) return tst.testOpen() def test_warp_7(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() tst = gdaltest.GDALTest('VRT', 'utmsmall_ds_blinear.vrt', 1, 4755) return tst.testOpen() def test_warp_8(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() tst = gdaltest.GDALTest('VRT', 'utmsmall_ds_cubic.vrt', 1, 4833) return tst.testOpen() def test_warp_9(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_ds_cubicspline.vrt') ref_ds = gdal.Open('data/utmsmall_ds_cubicspline.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_10(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_ds_lanczos.vrt') ref_ds = gdal.Open('data/utmsmall_ds_lanczos.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' def test_warp_11(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() tst = gdaltest.GDALTest('VRT', 'rgbsmall_dstalpha.vrt', 4, 30658) return tst.testOpen() # Test warping an empty RGBA with bilinear resampling def test_warp_12(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/empty.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(0) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'empty_rb.vrt', 4, 0) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/empty.tif') return ret # Test warping an empty RGBA with cubic resampling def test_warp_13(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/empty.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(0) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'empty_rc.vrt', 4, 0) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/empty.tif') return ret # Test warping an empty RGBA with cubic spline resampling def test_warp_14(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/empty.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(0) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'empty_rcs.vrt', 4, 0) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/empty.tif') return ret # Test GWKNearestFloat with transparent source alpha band def test_warp_15(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/test.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(0) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'test_nearest_float.vrt', 4, 0) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/test.tif') return ret # Test GWKNearestFloat with opaque source alpha band def test_warp_16(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/test.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(255) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(255) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'test_nearest_float.vrt', 4, 4921) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/test.tif') return ret # Test GWKNearestShort with transparent source alpha band def test_warp_17(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/test.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(0) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'test_nearest_short.vrt', 4, 0) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/test.tif') return ret # Test GWKNearestShort with opaque source alpha band def test_warp_18(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdaltest.tiff_drv.Create('tmp/test.tif', 20, 20, 4) ds.GetRasterBand(1).Fill(255) ds.GetRasterBand(2).Fill(0) ds.GetRasterBand(3).Fill(0) ds.GetRasterBand(4).Fill(255) ds = None # The alpha channel must be empty tst = gdaltest.GDALTest('VRT', 'test_nearest_short.vrt', 4, 4921) ret = tst.testOpen() gdaltest.tiff_drv.Delete('tmp/test.tif') return ret def warp_19_internal(size, datatype, resampling_string): ds = gdaltest.tiff_drv.Create('tmp/test.tif', size, size, 1, datatype) ds.SetGeoTransform((10, 5, 0, 30, 0, -5)) ds.SetProjection('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]') ds.GetRasterBand(1).Fill(10.1, 20.1) ds = None gdal.Warp('tmp/testwarp.tif', 'tmp/test.tif', options='-r ' + resampling_string) ref_ds = gdal.Open('tmp/test.tif') ds = gdal.Open('tmp/testwarp.tif') checksum = ds.GetRasterBand(1).Checksum() checksum_ref = ref_ds.GetRasterBand(1).Checksum() ds = None ref_ds = None gdaltest.tiff_drv.Delete('tmp/testwarp.tif') assert checksum == checksum_ref gdaltest.tiff_drv.Delete('tmp/test.tif') # Test all data types and resampling methods for very small images # to test edge behaviour def test_warp_19(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() datatypes = [gdal.GDT_Byte, gdal.GDT_Int16, gdal.GDT_CInt16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_CInt32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_CFloat32, gdal.GDT_Float64, gdal.GDT_CFloat64] methods = ['near', 'bilinear', 'cubic', 'cubicspline', 'lanczos', 'average'] sizes = [1, 2, 3, 7] for size in sizes: print('Testing size = %d ...' % size) for method in methods: for datatype in datatypes: warp_19_internal(size, datatype, method) # Test fix for #2724 (initialization of destination area to nodata in warped VRT) def test_warp_20(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() tst = gdaltest.GDALTest('VRT', 'white_nodata.vrt', 1, 1705) return tst.testOpen() ############################################################################### # Test overviews on warped VRT files def test_warp_21(): shutil.copy('data/utmsmall_near.vrt', 'tmp/warp_21.vrt') ds = gdal.Open('tmp/warp_21.vrt', gdal.GA_Update) ds.BuildOverviews('NEAR', overviewlist=[2]) ds = None ds = gdal.Open('tmp/warp_21.vrt') if ds.GetRasterBand(1).GetOverviewCount() != 1: pytest.skip() ds.GetRasterBand(1).GetOverview(0).Checksum() ds = None os.remove('tmp/warp_21.vrt') ############################################################################### # Test warping with datasets which are "bigger" than the wm parameter. # Would have detected issue of #3458 def test_warp_22(): # Generate source image with non uniform data w = 1001 h = 1001 ds = gdal.GetDriverByName('GTiff').Create("tmp/warp_22_src.tif", w, h, 1) ds.SetGeoTransform([2, 0.01, 0, 49, 0, -0.01]) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) for j in range(h): line = '' for i in range(w): line = line + '%c' % int((i * i + h * j / (i + 1)) % 256) ds.GetRasterBand(1).WriteRaster(0, j, w, 1, line) expected_cs = ds.GetRasterBand(1).Checksum() ds = None ret = 'success' failures = '' # warp with various options for option1 in ['', '-wo OPTIMIZE_SIZE=TRUE']: for option2 in ['', '-co TILED=YES', '-co TILED=YES -co BLOCKXSIZE=16 -co BLOCKYSIZE=16']: option = option1 + ' ' + option2 try: os.remove('tmp/warp_22_dst.tif') except OSError: pass # -wm should not be greater than 2 * w * h. Let's put it at its minimum value gdal.Warp('tmp/warp_22_dst.tif', 'tmp/warp_22_src.tif', options='-wm 100000 ' + option) ds = gdal.Open('tmp/warp_22_dst.tif') cs = ds.GetRasterBand(1).Checksum() if cs != expected_cs: if failures != '': failures = failures + '\n' failures = failures + 'failed for %s. Checksum : got %d, expected %d' % (option, cs, expected_cs) ret = 'fail' ds = None if failures != '': gdaltest.post_reason(failures) os.remove('tmp/warp_22_src.tif') os.remove('tmp/warp_22_dst.tif') return ret ############################################################################### # Test warping with datasets where some RasterIO() requests involve nBufXSize == 0 (#3582) def test_warp_23(): gcp1 = gdal.GCP() gcp1.GCPPixel = 3213 gcp1.GCPLine = 2225 gcp1.GCPX = -88.834495 gcp1.GCPY = 29.979959 gcp2 = gdal.GCP() gcp2.GCPPixel = 2804 gcp2.GCPLine = 2236 gcp2.GCPX = -88.836706 gcp2.GCPY = 29.979516 gcp3 = gdal.GCP() gcp3.GCPPixel = 3157 gcp3.GCPLine = 4344 gcp3.GCPX = -88.833389 gcp3.GCPY = 29.969519 gcp4 = gdal.GCP() gcp4.GCPPixel = 3768 gcp4.GCPLine = 5247 gcp4.GCPX = -88.830168 gcp4.GCPY = 29.964958 gcp5 = gdal.GCP() gcp5.GCPPixel = 2697 gcp5.GCPLine = 9225 gcp5.GCPX = -88.83516 gcp5.GCPY = 29.945386 gcp6 = gdal.GCP() gcp6.GCPPixel = 4087 gcp6.GCPLine = 12360 gcp6.GCPX = -88.827899 gcp6.GCPY = 29.929807 gcp7 = gdal.GCP() gcp7.GCPPixel = 4629 gcp7.GCPLine = 11258 gcp7.GCPX = -88.825102 gcp7.GCPY = 29.93527 gcp8 = gdal.GCP() gcp8.GCPPixel = 4480 gcp8.GCPLine = 7602 gcp8.GCPX = -88.826733 gcp8.GCPY = 29.95304 gcps = [gcp1, gcp2, gcp3, gcp4, gcp5, gcp6, gcp7, gcp8] sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds = gdal.GetDriverByName('GTiff').Create('tmp/test3582.tif', 70, 170, 4, options=['SPARSE_OK=YES']) for i, gcp in enumerate(gcps): gcps[i].GCPPixel = gcp.GCPPixel / 10 gcps[i].GCPLine = gcp.GCPLine / 10 ds.SetGCPs(gcps, sr.ExportToWkt()) ds = None ds = gdal.Warp('', 'tmp/test3582.tif', format='MEM') ret = 'success' if ds is None: gdaltest.post_reason('could not open output dataset') ret = 'fail' ds = None os.remove('tmp/test3582.tif') return ret ############################################################################### # Test fix for #3658 (numerical imprecision with Ubuntu 8.10 GCC 4.4.3 -O2 leading to upper # left pixel being not set in GWKBilinearResample() case) def test_warp_24(): ds_ref = gdal.Open('data/test3658.tif') cs_ref = ds_ref.GetRasterBand(1).Checksum() ds = gdal.Warp('', ds_ref, options='-of MEM -r bilinear') cs = ds.GetRasterBand(1).Checksum() assert cs == cs_ref, 'did not get expected checksum' ############################################################################### # Test -refine_gcps (#4143) def test_warp_25(): ds = gdal.Open('data/refine_gcps.vrt') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4672, 'did not get expected checksum' ############################################################################### # Test serializing and deserializing TPS transformer def test_warp_26(): gdal.Translate('tmp/warp_25_gcp.vrt', '../gcore/data/byte.tif', options='-of VRT -gcp 0 0 0 20 -gcp 0 20 0 0 ' '-gcp 20 0 20 20 -gcp 20 20 20 0') gdal.Warp('tmp/warp_25_warp.vrt', 'tmp/warp_25_gcp.vrt', options='-of VRT -tps') ds = gdal.Open('tmp/warp_25_warp.vrt') cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 4672, 'did not get expected checksum' os.unlink('tmp/warp_25_gcp.vrt') os.unlink('tmp/warp_25_warp.vrt') ############################################################################### # Pure Python reprojection example. Nothing particular, just make use of existing # API. def warp_27_progress_callback(pct, message, user_data): # pylint: disable=unused-argument return 1 # 1 to continue, 0 to stop def test_warp_27(): # Open source dataset src_ds = gdal.Open('../gcore/data/byte.tif') # Desfine target SRS dst_srs = osr.SpatialReference() dst_srs.ImportFromEPSG(4326) dst_wkt = dst_srs.ExportToWkt() error_threshold = 0.125 # error threshold --> use same value as in gdalwarp resampling = gdal.GRA_Bilinear # Call AutoCreateWarpedVRT() to fetch default values for target raster dimensions and geotransform tmp_ds = gdal.AutoCreateWarpedVRT(src_ds, None, # src_wkt : left to default value --> will use the one from source \ dst_wkt, \ resampling, \ error_threshold) dst_xsize = tmp_ds.RasterXSize dst_ysize = tmp_ds.RasterYSize dst_gt = tmp_ds.GetGeoTransform() tmp_ds = None # Now create the true target dataset dst_ds = gdal.GetDriverByName('GTiff').Create('tmp/warp_27.tif', dst_xsize, dst_ysize, src_ds.RasterCount) dst_ds.SetProjection(dst_wkt) dst_ds.SetGeoTransform(dst_gt) # And run the reprojection cbk = warp_27_progress_callback cbk_user_data = None # value for last parameter of above warp_27_progress_callback gdal.ReprojectImage(src_ds, dst_ds, None, # src_wkt : left to default value --> will use the one from source \ None, # dst_wkt : left to default value --> will use the one from destination \ resampling, \ 0, # WarpMemoryLimit : left to default value \ error_threshold, cbk, # Progress callback : could be left to None or unspecified for silent progress cbk_user_data) # Progress callback user data # Done ! dst_ds = None # Check that we have the same result as produced by 'gdalwarp -rb -t_srs EPSG:4326 ../gcore/data/byte.tif tmp/warp_27.tif' ds = gdal.Open('tmp/warp_27.tif') cs = ds.GetRasterBand(1).Checksum() ds = None ds = gdal.Warp('tmp/warp_27_ref.tif', '../gcore/data/byte.tif', options='-rb -t_srs EPSG:4326') ref_cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == ref_cs gdal.Unlink('tmp/warp_27.tif') gdal.Unlink('tmp/warp_27_ref.tif') ############################################################################### # Test reading a VRT with a destination alpha band, but no explicit # INIT_DEST setting def test_warp_28(): ds = gdal.Open('data/utm_alpha_noinit.vrt') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() assert not (cs1 == 0 or cs2 == 0), 'bad checksum' ds = None ############################################################################### # Test multi-thread computations def test_warp_29(): ds = gdal.Open('data/white_nodata.vrt') cs_monothread = ds.GetRasterBand(1).Checksum() ds = None old_val = gdal.GetConfigOption('GDAL_NUM_THREADS') gdal.SetConfigOption('GDAL_NUM_THREADS', 'ALL_CPUS') gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', '0') ds = gdal.Open('data/white_nodata.vrt') cs_multithread = ds.GetRasterBand(1).Checksum() ds = None gdal.SetConfigOption('GDAL_NUM_THREADS', old_val) gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', None) assert cs_monothread == cs_multithread old_val = gdal.GetConfigOption('GDAL_NUM_THREADS') gdal.SetConfigOption('GDAL_NUM_THREADS', '2') gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', '0') ds = gdal.Open('data/white_nodata.vrt') cs_multithread = ds.GetRasterBand(1).Checksum() ds = None gdal.SetConfigOption('GDAL_NUM_THREADS', old_val) gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', None) assert cs_monothread == cs_multithread src_ds = gdal.Open('../gcore/data/byte.tif') ds = gdal.Open('data/byte_gcp.vrt') old_val = gdal.GetConfigOption('GDAL_NUM_THREADS') gdal.SetConfigOption('GDAL_NUM_THREADS', '2') gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', '0') got_cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_NUM_THREADS', old_val) gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', None) ds = None assert got_cs == src_ds.GetRasterBand(1).Checksum() ds = gdal.Open('data/byte_tps.vrt') old_val = gdal.GetConfigOption('GDAL_NUM_THREADS') gdal.SetConfigOption('GDAL_NUM_THREADS', '2') gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', '0') got_cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_NUM_THREADS', old_val) gdal.SetConfigOption('WARP_THREAD_CHUNK_SIZE', None) ds = None assert got_cs == src_ds.GetRasterBand(1).Checksum() src_ds = None ############################################################################### # Test warping interruption def warp_30_progress_callback(pct, message, user_data): # pylint: disable=unused-argument return bool(pct <= 0.2) def test_warp_30(): # Open source dataset src_ds = gdal.Open('../gcore/data/byte.tif') # Desfine target SRS dst_srs = osr.SpatialReference() dst_srs.ImportFromEPSG(4326) dst_wkt = dst_srs.ExportToWkt() error_threshold = 0.125 # error threshold --> use same value as in gdalwarp resampling = gdal.GRA_Bilinear # Call AutoCreateWarpedVRT() to fetch default values for target raster dimensions and geotransform tmp_ds = gdal.AutoCreateWarpedVRT(src_ds, None, # src_wkt : left to default value --> will use the one from source \ dst_wkt, \ resampling, \ error_threshold) dst_xsize = tmp_ds.RasterXSize dst_ysize = tmp_ds.RasterYSize dst_gt = tmp_ds.GetGeoTransform() tmp_ds = None # Now create the true target dataset dst_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/warp_30.tif', dst_xsize, dst_ysize, src_ds.RasterCount) dst_ds.SetProjection(dst_wkt) dst_ds.SetGeoTransform(dst_gt) # And run the reprojection cbk = warp_30_progress_callback cbk_user_data = None # value for last parameter of above warp_27_progress_callback gdal.PushErrorHandler('CPLQuietErrorHandler') ret = gdal.ReprojectImage(src_ds, dst_ds, None, # src_wkt : left to default value --> will use the one from source \ None, # dst_wkt : left to default value --> will use the one from destination \ resampling, \ 0, # WarpMemoryLimit : left to default value \ error_threshold, cbk, # Progress callback : could be left to None or unspecified for silent progress cbk_user_data) # Progress callback user data gdal.PopErrorHandler() assert ret != 0 old_val = gdal.GetConfigOption('GDAL_NUM_THREADS') gdal.SetConfigOption('GDAL_NUM_THREADS', '2') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = gdal.ReprojectImage(src_ds, dst_ds, None, # src_wkt : left to default value --> will use the one from source \ None, # dst_wkt : left to default value --> will use the one from destination \ resampling, \ 0, # WarpMemoryLimit : left to default value \ error_threshold, cbk, # Progress callback : could be left to None or unspecified for silent progress cbk_user_data) # Progress callback user data gdal.PopErrorHandler() gdal.SetConfigOption('GDAL_NUM_THREADS', old_val) assert ret != 0 gdal.Unlink('/vsimem/warp_30.tif') # Average (Byte) def test_warp_31(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_average.vrt') ref_ds = gdal.Open('data/utmsmall_average.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Average (Float) def test_warp_32(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_average_float.vrt') ref_ds = gdal.Open('data/utmsmall_average_float.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Mode (Byte) def test_warp_33(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_mode.vrt') ref_ds = gdal.Open('data/utmsmall_mode.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Mode (Int16) def test_warp_34(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_mode_int16.vrt') ref_ds = gdal.Open('data/utmsmall_mode_int16.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Mode (Int16 - signed with negative values) def test_warp_35(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall-int16-neg_mode.vrt') ref_ds = gdal.Open('data/utmsmall-int16-neg_mode.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Mode (Int32) - this uses algorithm 2 (inefficient) def test_warp_36(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_mode_int32.vrt') ref_ds = gdal.Open('data/utmsmall_mode_int32.tiff') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ############################################################################### # Test a few error cases def test_warp_37(): # Open source dataset src_ds = gdal.Open('../gcore/data/byte.tif') # Dummy proj.4 method sr = osr.SpatialReference() sr.ImportFromWkt("""PROJCS["unnamed", GEOGCS["unnamed ellipse", DATUM["unknown", SPHEROID["unnamed",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]], PROJECTION["custom_proj4"], UNIT["Meter",1], EXTENSION["PROJ4","+proj=dummy_method +units=m +wktext"]]""") dst_wkt = sr.ExportToWkt() gdal.PushErrorHandler('CPLQuietErrorHandler') tmp_ds = gdal.AutoCreateWarpedVRT(src_ds, None, dst_wkt) gdal.PopErrorHandler() gdal.ErrorReset() assert tmp_ds is None ############################################################################### # Test a warp with GCPs on the *destination* image. def test_warp_38(): # Create an output file with GCPs. out_file = 'tmp/warp_38.tif' ds = gdal.GetDriverByName('GTiff').Create(out_file, 50, 50, 3) gcp_list = [ gdal.GCP(397000, 5642000, 0, 0, 0), gdal.GCP(397000, 5641990, 0, 0, 50), gdal.GCP(397010, 5642000, 0, 50, 0), gdal.GCP(397010, 5641990, 0, 50, 50), gdal.GCP(397005, 5641995, 0, 25, 25), ] ds.SetGCPs(gcp_list, gdaltest.user_srs_to_wkt('EPSG:32632')) ds = None gdal.Warp(out_file, 'data/test3658.tif', options='-to DST_METHOD=GCP_POLYNOMIAL') ds = gdal.Open(out_file) cs = ds.GetRasterBand(1).Checksum() ds = None # Should exactly match the source file. exp_cs = 30546 assert cs == exp_cs os.unlink(out_file) ############################################################################### # Test a warp with GCPs for TPS on the *destination* image. def test_warp_39(): # Create an output file with GCPs. out_file = 'tmp/warp_39.tif' ds = gdal.GetDriverByName('GTiff').Create(out_file, 50, 50, 3) gcp_list = [ gdal.GCP(397000, 5642000, 0, 0, 0), gdal.GCP(397000, 5641990, 0, 0, 50), gdal.GCP(397010, 5642000, 0, 50, 0), gdal.GCP(397010, 5641990, 0, 50, 50), gdal.GCP(397005, 5641995, 0, 25, 25), ] ds.SetGCPs(gcp_list, gdaltest.user_srs_to_wkt('EPSG:32632')) ds = None gdal.Warp(out_file, 'data/test3658.tif', options='-to DST_METHOD=GCP_TPS') ds = gdal.Open(out_file) cs = ds.GetRasterBand(1).Checksum() ds = None # Should exactly match the source file. exp_cs = 30546 assert cs == exp_cs os.unlink(out_file) ############################################################################### # test average (#5311) def test_warp_40(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/2by2.vrt') ref_ds = gdal.Open('data/2by2.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ############################################################################### # test weighted average def test_warp_weighted_average(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/3by3_average.vrt') ref_ds = gdal.Open('data/3by3_average.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ############################################################################### # test weighted average, with src offset (fix for #2665) def test_warp_weighted_average_with_srcoffset(): ds = gdal.Open('data/3by3_average_with_srcoffset.vrt') val = struct.unpack('d', ds.ReadRaster(0, 0, 1, 1))[0] assert val == pytest.approx(8.5, abs=1e-5) ############################################################################### # test sum def test_warp_sum(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/3by3_sum.vrt') ref_ds = gdal.Open('data/3by3_sum.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ############################################################################### # test GDALSuggestedWarpOutput (#5693) def test_warp_41(): src_ds = gdal.Open(""" -2.0037508340000000e+07, 5.9716428339481353e-01, 0.0000000000000000e+00, 2.0037508340000000e+07, 0.0000000000000000e+00, -5.9716428339481353e-01 dummy 1 """) vrt_ds = gdal.AutoCreateWarpedVRT(src_ds, None, None, gdal.GRA_NearestNeighbour, 0.3) assert vrt_ds.RasterXSize == src_ds.RasterXSize assert vrt_ds.RasterYSize == src_ds.RasterYSize src_gt = src_ds.GetGeoTransform() vrt_gt = vrt_ds.GetGeoTransform() for i in range(6): assert src_gt[i] == pytest.approx(vrt_gt[i], abs=1e-5) ############################################################################### # Maximum def test_warp_42(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_max.vrt') ref_ds = gdal.Open('data/utmsmall_max.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Minimum def test_warp_43(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_min.vrt') ref_ds = gdal.Open('data/utmsmall_min.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Median def test_warp_44(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_med.vrt') ref_ds = gdal.Open('data/utmsmall_med.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Quartile 1 def test_warp_45(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_Q1.vrt') ref_ds = gdal.Open('data/utmsmall_Q1.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Quartile 3 def test_warp_46(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall_Q3.vrt') ref_ds = gdal.Open('data/utmsmall_Q3.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Maximum (Int16 - signed with negative values) def test_warp_47(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall-int16-neg_max.vrt') ref_ds = gdal.Open('data/utmsmall-int16-neg_max.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Minimum (Int16 - signed with negative values) def test_warp_48(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall-int16-neg_min.vrt') ref_ds = gdal.Open('data/utmsmall-int16-neg_min.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Median (Int16 - signed with negative values) def test_warp_49(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall-int16-neg_med.vrt') ref_ds = gdal.Open('data/utmsmall-int16-neg_med.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Quartile 1 (Int16 - signed with negative values) def test_warp_50(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall-int16-neg_Q1.vrt') ref_ds = gdal.Open('data/utmsmall-int16-neg_Q1.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' # Quartile 3 (Int16 - signed with negative values) def test_warp_51(): gdaltest.tiff_drv = gdal.GetDriverByName('GTiff') if gdaltest.tiff_drv is None: pytest.skip() ds = gdal.Open('data/utmsmall-int16-neg_Q3.vrt') ref_ds = gdal.Open('data/utmsmall-int16-neg_Q3.tif') maxdiff = gdaltest.compare_ds(ds, ref_ds) ds = None ref_ds = None assert maxdiff <= 1, 'Image too different from reference' ############################################################################### # Test fix for #6182 def test_warp_52(): src_ds = gdal.GetDriverByName('MEM').Create('', 4096, 4096, 3, gdal.GDT_UInt16) rpc = [ "HEIGHT_OFF=1466.05894327379", "HEIGHT_SCALE=144.837606185489", "LAT_OFF=38.9266809014185", "LAT_SCALE=-0.108324009570885", "LINE_DEN_COEFF=1 -0.000392404256440504 -0.0027925489381758 0.000501819414812054 0.00216726134806561 -0.00185617059201599 0.000183834173326118 -0.00290342803717354 -0.00207181007131322 -0.000900223247894285 -0.00132518281680544 0.00165598132063197 0.00681015244696305 0.000547865679631528 0.00516214646283021 0.00795287690785699 -0.000705040639059332 -0.00254360623317078 -0.000291154885056484 0.00070943440010757", "LINE_NUM_COEFF=-0.000951099635749339 1.41709976082781 -0.939591985038569 -0.00186609235173885 0.00196881101098923 0.00361741523740639 -0.00282449434932066 0.0115361898794214 -0.00276027843825304 9.37913944402154e-05 -0.00160950221565737 0.00754053609977256 0.00461831968713819 0.00274991122620312 0.000689605203796422 -0.0042482778732957 -0.000123966494595151 0.00307976709897974 -0.000563274426174409 0.00049981716767074", "LINE_OFF=2199.50159296339", "LINE_SCALE=2195.852519621", "LONG_OFF=76.0381768085136", "LONG_SCALE=0.130066683772651", "SAMP_DEN_COEFF=1 -0.000632078047521022 -0.000544107268758971 0.000172438016778527 -0.00206391734870399 -0.00204445747536872 -0.000715754551621987 -0.00195545265530244 -0.00168532972557267 -0.00114709980708329 -0.00699131177532728 0.0038551339822296 0.00283631282133365 -0.00436885468926666 -0.00381335885955994 0.0018742043611019 -0.0027263909314293 -0.00237054119407013 0.00246374716379501 -0.00121074576302219", "SAMP_NUM_COEFF=0.00249293151551852 -0.581492592442025 -1.00947448466175 0.00121597346320039 -0.00552825219917498 -0.00194683170765094 -0.00166012459012905 -0.00338315804553888 -0.00152062885009498 -0.000214562164393127 -0.00219914905535387 -0.000662800177832777 -0.00118644828432841 -0.00180061222825708 -0.00364756875260519 -0.00287273485650089 -0.000540077934728493 -0.00166800463003749 0.000201057249109451 -8.49620129025469e-05", "SAMP_OFF=3300.34602166792", "SAMP_SCALE=3297.51222987611" ] src_ds.SetMetadata(rpc, "RPC") import time start = time.time() out_ds = gdal.Warp('', src_ds, format='MEM', outputBounds=[8453323.83095, 4676723.13796, 8472891.71018, 4696291.0172], xRes=4.77731426716, yRes=4.77731426716, dstSRS='EPSG:3857', warpOptions=['SKIP_NOSOURCE=YES', 'DST_ALPHA_MAX=255'], transformerOptions=['RPC_DEM=data/warp_52_dem.tif'], dstAlpha=True, errorThreshold=0, resampleAlg=gdal.GRA_Cubic) end = time.time() assert end - start <= 5, 'processing time was way too long' cs = out_ds.GetRasterBand(4).Checksum() assert cs == 3188 ############################################################################### # Test Grey+Alpha def test_warp_53(): if sys.platform == 'darwin': pytest.skip("Expected checksum should be updated for Mac") for typestr in ('Byte', 'UInt16', 'Int16'): src_ds = gdal.Translate('', '../gcore/data/byte.tif', options='-of MEM -b 1 -b 1 -ot ' + typestr) src_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_AlphaBand) src_ds.GetRasterBand(2).Fill(255) zero = struct.pack('B' * 1, 0) src_ds.GetRasterBand(2).WriteRaster(10, 10, 1, 1, zero, buf_type=gdal.GDT_Byte) dst_ds = gdal.Translate('', src_ds, options='-of MEM -a_srs EPSG:32611') for option in ('-wo USE_GENERAL_CASE=TRUE', ''): # First checksum is proj 4.8, second proj 4.9.2 for alg_name, expected_cs in (('near', [3781, 3843]), ('cubic', [3942, 4133]), ('cubicspline', [3874, 4076]), ('bilinear', [4019, 3991])): dst_ds.GetRasterBand(1).Fill(0) dst_ds.GetRasterBand(2).Fill(0) gdal.Warp(dst_ds, src_ds, options='-r ' + alg_name + ' ' + option) cs1 = dst_ds.GetRasterBand(1).Checksum() cs2 = dst_ds.GetRasterBand(2).Checksum() if cs1 not in expected_cs or cs2 not in [3903, 4138]: print(typestr) print(option) pytest.fail(alg_name) ############################################################################### # Test Alpha on UInt16/Int16 def test_warp_54(): # UInt16 src_ds = gdal.Translate('', '../gcore/data/stefan_full_rgba.tif', options='-of MEM -scale 0 255 0 65535 -ot UInt16 -a_ullr -162 150 0 0') dst_ds = gdal.Warp('', src_ds, format='MEM') for i in range(4): expected_cs = src_ds.GetRasterBand(i + 1).Checksum() got_cs = dst_ds.GetRasterBand(i + 1).Checksum() assert expected_cs == got_cs, i # Int16 src_ds = gdal.Translate('', '../gcore/data/stefan_full_rgba.tif', options='-of MEM -scale 0 255 0 32767 -ot Int16 -a_ullr -162 150 0 0') dst_ds = gdal.Warp('', src_ds, format='MEM') for i in range(4): expected_cs = src_ds.GetRasterBand(i + 1).Checksum() got_cs = dst_ds.GetRasterBand(i + 1).Checksum() assert expected_cs == got_cs, i # Test NBITS src_ds = gdal.Translate('', '../gcore/data/stefan_full_rgba.tif', options='-of MEM -scale 0 255 0 32767 -ot UInt16 -a_ullr -162 150 0 0') for i in range(4): src_ds.GetRasterBand(i + 1).SetMetadataItem('NBITS', '15', 'IMAGE_STRUCTURE') dst_ds = gdal.Warp('/vsimem/warp_54.tif', src_ds, options='-co NBITS=15') for i in range(4): expected_cs = src_ds.GetRasterBand(i + 1).Checksum() got_cs = dst_ds.GetRasterBand(i + 1).Checksum() assert expected_cs == got_cs, i dst_ds = None gdal.Unlink('/vsimem/warp_54.tif') ############################################################################### # Test warped VRT with source overview, target GT != GenImgProjetion target GT # and subsampling (#6972) def test_warp_55(): ds = gdal.Open('data/warpedvrt_with_ovr.vrt') cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 25128 ds = None ############################################################################### # Test bilinear interpolation when warping into same coordinate system (and # same size). This test crops a single pixel out of a 3-by-3 image. def test_warp_56(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() pix_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) src_ds = gdal.GetDriverByName('MEM').Create('', 3, 3) src_ds.GetRasterBand(1).WriteArray(numpy.array([[0, 0, 0], [0, 0, 0], [0, 0, 100]])) src_ds.SetGeoTransform([1, 1, 0, 1, 0, 1]) for off in numpy.linspace(0, 2, 21): pix_ds.SetGeoTransform([off + 1, 1, 0, off + 1, 0, 1]) gdal.Warp(pix_ds, src_ds, resampleAlg='bilinear') exp = 0 if off < 1 else 100 * (off - 1)**2 warped = pix_ds.GetRasterBand(1).ReadAsArray()[0, 0] assert warped == pytest.approx(exp, abs=0.6), \ 'offset: {}, expected: {:.0f}, got: {}'.format(off, exp, warped) ############################################################################### # Test bugfix for #1656 def test_warp_nearest_real_nodata_multiple_band(): src_ds = gdal.GetDriverByName('MEM').Create('', 2, 1, 2, gdal.GDT_Float64) src_ds.GetRasterBand(1).SetNoDataValue(65535) src_ds.GetRasterBand(1).WriteRaster(0,0,1,1,struct.pack('d', 65535)) src_ds.GetRasterBand(2).SetNoDataValue(65535) src_ds.GetRasterBand(2).WriteRaster(0,0,1,1,struct.pack('d', 65535)) src_ds.SetGeoTransform([1, 1, 0, 1, 0, 1]) out_ds = gdal.Warp('', src_ds, options = '-of MEM') assert struct.unpack('d' * 4, out_ds.ReadRaster()) == struct.unpack('d' * 4, src_ds.ReadRaster()) ############################################################################### # Test bugfix for #2365 def test_warp_med_out_of_bounds_src_pixels(): ds = gdal.Open('data/test_bug_2365_wraped_med.vrt') cs = ds.GetRasterBand(1).Checksum() assert cs == 0 ds = None ############################################################################### # Test fix for #2460 def test_warp_rpc_source_has_geotransform(): out_ds = gdal.Warp('', 'data/test_rpc_with_gt_bug_2460.tif', format='MEM', transformerOptions=['METHOD=RPC', 'RPC_HEIGHT=1118']) cs = out_ds.GetRasterBand(1).Checksum() assert cs == 60397 gdalautotest-3.1.2/alg/__init__.py0000775000175000017500000000000013701060015015531 0ustar evenevengdalautotest-3.1.2/alg/cutline.py0000775000175000017500000001253413701060015015454 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: cutline.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test the image reprojection functions. Try to test as many # resamplers as possible (we have optimized resamplers for some # data types, test them too). # Author: Andrey Kiselev, dron16@ak4719.spb.edu # ############################################################################### # Copyright (c) 2008, Andrey Kiselev # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import ogrtest import gdaltest import pytest ############################################################################### def test_cutline_1(): tst = gdaltest.GDALTest('VRT', 'cutline_noblend.vrt', 1, 11409) return tst.testOpen() ############################################################################### def test_cutline_2(): if not ogrtest.have_geos(): pytest.skip() tst = gdaltest.GDALTest('VRT', 'cutline_blend.vrt', 1, 21395) return tst.testOpen() ############################################################################### def test_cutline_3(): if not ogrtest.have_geos(): pytest.skip() tst = gdaltest.GDALTest('VRT', 'cutline_multipolygon.vrt', 1, 20827) return tst.testOpen() ############################################################################### def test_cutline_4(): if not ogrtest.have_geos(): pytest.skip() ds = gdal.Translate('/vsimem/utmsmall.tif', '../gcore/data/utmsmall.tif') ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open(""" PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 5.9999999999999993e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -5.9999999999999993e+01 512 128 6.71089e+07 NearestNeighbour Byte /vsimem/utmsmall.tif 0.125 440720,60,0,3751320,0,-60 -7345.333333333333,0.01666666666666667,0,62522,0,-0.01666666666666667 440720,59.99999999999999,0,3751320,0,-59.99999999999999 -7345.333333333334,0.01666666666666667,0,62522.00000000001,0,-0.01666666666666667 MULTIPOLYGON(((10 10,10 50,60 50, 10 10)),((70 70,70 100,100 100,100 70,70 70),(80 80,80 90,90 90,90 80,80 80))) """) out_ds = gdal.Translate('', ds, options='-of MEM -outsize 50%% 50%%') cs = out_ds.GetRasterBand(1).Checksum() assert cs == 5170 gdal.Unlink('/vsimem/utmsmall.tif') ############################################################################### gdalautotest-3.1.2/alg/dither.py0000775000175000017500000000643313701060015015271 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: dither.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test gdal.ComputeMedianCutPCT() and gdal.DitherRGB2PCT() # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2008-2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest ############################################################################### # Test def test_dither_1(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('../gdrivers/data/rgbsmall.tif') r_band = src_ds.GetRasterBand(1) g_band = src_ds.GetRasterBand(2) b_band = src_ds.GetRasterBand(3) dst_ds = drv.Create('tmp/rgbsmall.tif', src_ds.RasterXSize, src_ds.RasterYSize, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) ct = gdal.ColorTable() nColors = 8 gdal.ComputeMedianCutPCT(r_band, g_band, b_band, nColors, ct) dst_band.SetRasterColorTable(ct) gdal.DitherRGB2PCT(r_band, g_band, b_band, dst_band, ct) cs_expected = 8803 cs = dst_band.Checksum() dst_band = None dst_ds = None assert ct.GetCount() == nColors, 'color table size wrong' ref_ct = [(36, 48, 32, 255), (92, 120, 20, 255), (88, 96, 20, 255), (92, 132, 56, 255), (0, 0, 0, 255), (96, 152, 24, 255), (60, 112, 32, 255), (164, 164, 108, 255)] for i in range(nColors): ct_data = ct.GetColorEntry(i) ref_data = ref_ct[i] for j in range(4): if ct_data[j] != ref_data[j]: for k in range(nColors): print(ct.GetColorEntry(k)) print(ref_ct[k]) pytest.fail('color table mismatch') if cs == cs_expected or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/rgbsmall.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') gdalautotest-3.1.2/alg/sieve.py0000775000175000017500000002155613701060015015130 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: sieve.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test SieveFilter() algorithm. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2009-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest ############################################################################### # Test a fairly default case. def test_sieve_1(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/sieve_src.grd') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/sieve_1.tif', 5, 7, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, None, dst_band, 2, 4) cs_expected = 364 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/sieve_1.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Try eight connected. def test_sieve_2(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/sieve_src.grd') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/sieve_2.tif', 5, 7, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, None, dst_band, 2, 8) cs_expected = 370 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/sieve_2.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Do a sieve resulting in unmergable polygons. def test_sieve_3(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/unmergable.grd') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/sieve_3.tif', 5, 7, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, None, dst_band, 2, 8) # cs_expected = 472 cs_expected = 451 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/sieve_3.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Try the bug 2634 simplified data. def test_sieve_4(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/sieve_2634.grd') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/sieve_4.tif', 10, 8, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, None, dst_band, 2, 4) cs_expected = 98 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/sieve_4.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Same as sieve_1, but we provide a mask band # This should yield the same result as we use an opaque band def test_sieve_5(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/sieve_src.grd') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/sieve_1.tif', 5, 7, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, dst_band.GetMaskBand(), dst_band, 2, 4) cs_expected = 364 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/sieve_1.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Performance test. When increasing the 'size' parameter, performance # should stay roughly linear with the number of pixels (i.e. size^2) def test_sieve_6(): try: import numpy except ImportError: pytest.skip() # Try 3002. Should run in less than 10 seconds # size = 3002 size = 102 ds = gdal.GetDriverByName('MEM').Create('', size + 1, size) ar = numpy.zeros((size, size + 1), dtype=numpy.uint8) for i in range(size): for j in range(int(size / 3)): ar[i][size + 1 - 1 - i - 1 - 3 * j] = 255 ar[i][size + 1 - 1 - i - 3 * j] = 255 ar[i][0] = 255 ar[size - 1] = 255 ds.GetRasterBand(1).WriteArray(ar) band = ds.GetRasterBand(1) gdal.SieveFilter(band, None, band, 2, 4) # ar = band.ReadAsArray() # print(ar) cs = band.Checksum() if (size == 102 and cs != 60955) or (size == 3002 and cs != 63178): print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Test with nodata def test_sieve_7(): gdal.FileFromMemBuffer('/vsimem/sieve_7.asc', """ncols 7 nrows 7 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 NODATA_value 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 1 1 1 0 1 0 2 2 2 1 0 1 1 2 1 2 1 0 1 1 2 2 2 1 0 1 1 1 1 1 1 """) drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('/vsimem/sieve_7.asc') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('/vsimem/sieve_7.tif', 7, 7, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, src_band.GetMaskBand(), dst_band, 4, 4) cs_expected = 42 cs = dst_band.Checksum() dst_band = None dst_ds = None gdal.Unlink('/vsimem/sieve_7.asc') if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('/vsimem/sieve_7.tif') # Expected: # [[0 0 0 0 0 0 0] # [0 1 1 1 1 1 1] # [0 1 0 0 1 1 1] # [0 1 0 2 2 2 1] # [0 1 1 2 2 2 1] # [0 1 1 2 2 2 1] # [0 1 1 1 1 1 1]] if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Test propagation in our search of biggest neighbour def test_sieve_8(): gdal.FileFromMemBuffer('/vsimem/sieve_8.asc', """ncols 7 nrows 7 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 0 0 0 0 0 0 0 0 5 5 0 0 0 0 0 5 2 3 4 0 0 0 0 8 1 5 0 0 0 0 7 6 5 9 0 0 0 0 0 9 9 0 0 0 0 0 0 0 0 """) drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('/vsimem/sieve_8.asc') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('/vsimem/sieve_8.tif', 7, 7, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.SieveFilter(src_band, src_band.GetMaskBand(), dst_band, 4, 4) # All non 0 should be mapped to 0 cs_expected = 0 cs = dst_band.Checksum() dst_band = None dst_ds = None gdal.Unlink('/vsimem/sieve_8.asc') if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('/vsimem/sieve_8.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') gdalautotest-3.1.2/alg/proximity.py0000775000175000017500000001026713701060015016056 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: proximity.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test ComputeProximity() algorithm. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest ############################################################################### # Test a fairly default case. def test_proximity_1(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/pat.tif') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/proximity_1.tif', 25, 25, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.ComputeProximity(src_band, dst_band) cs_expected = 1941 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/proximity_1.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Try several options def test_proximity_2(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/pat.tif') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/proximity_2.tif', 25, 25, 1, gdal.GDT_Float32) dst_band = dst_ds.GetRasterBand(1) gdal.ComputeProximity(src_band, dst_band, options=['VALUES=65,64', 'MAXDIST=12', 'NODATA=-1', 'FIXED_BUF_VAL=255']) cs_expected = 3256 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/proximity_2.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') ############################################################################### # Try input nodata option def test_proximity_3(): drv = gdal.GetDriverByName('GTiff') src_ds = gdal.Open('data/pat.tif') src_band = src_ds.GetRasterBand(1) dst_ds = drv.Create('tmp/proximity_3.tif', 25, 25, 1, gdal.GDT_Byte) dst_band = dst_ds.GetRasterBand(1) gdal.ComputeProximity(src_band, dst_band, options=['VALUES=65,64', 'MAXDIST=12', 'USE_INPUT_NODATA=YES', 'NODATA=0']) cs_expected = 1465 cs = dst_band.Checksum() dst_band = None dst_ds = None if cs == cs_expected \ or gdal.GetConfigOption('CPL_DEBUG', 'OFF') != 'ON': drv.Delete('tmp/proximity_3.tif') if cs != cs_expected: print('Got: ', cs) pytest.fail('got wrong checksum') gdalautotest-3.1.2/alg/transformgeoloc.py0000775000175000017500000000606113701060015017213 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: transformgeoloc.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test TransformGeoloc algorithm. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2012, Frank Warmerdam # Copyright (c) 2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import osr import pytest ############################################################################### # Test a fairly default case. def test_transformgeoloc_1(): try: import numpy except ImportError: pytest.skip() # Setup 2x2 geolocation arrays in a memory dataset with lat/long values. drv = gdal.GetDriverByName('MEM') geoloc_ds = drv.Create('geoloc_1', 2, 2, 3, gdal.GDT_Float64) lon_array = numpy.asarray([[-117.0, -116.0], [-116.5, -115.5]]) lat_array = numpy.asarray([[45.0, 45.5], [44.0, 44.5]]) geoloc_ds.GetRasterBand(1).WriteArray(lon_array) geoloc_ds.GetRasterBand(2).WriteArray(lat_array) # Z left as default zero. # Create a wgs84 to utm transformer. wgs84_wkt = osr.GetUserInputAsWKT('WGS84') utm_wkt = osr.GetUserInputAsWKT('+proj=utm +zone=11 +datum=WGS84') ll_utm_transformer = gdal.Transformer(None, None, ['SRC_SRS=' + wgs84_wkt, 'DST_SRS=' + utm_wkt]) # transform the geoloc dataset in place. status = ll_utm_transformer.TransformGeolocations( geoloc_ds.GetRasterBand(1), geoloc_ds.GetRasterBand(2), geoloc_ds.GetRasterBand(3)) print(status) print(geoloc_ds.ReadAsArray()) gdalautotest-3.1.2/alg/tps.py0000775000175000017500000000463513701060015014622 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: tps.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test TPS algorithm. # Author: Even Rouault # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest from osgeo import gdal, osr ############################################################################### # Test error case (#5586) def test_tps_1(): drv = gdal.GetDriverByName('MEM') ds = drv.Create('foo', 2, 2) gcp_list = [ gdal.GCP(0, 0, 0, 0, 0), gdal.GCP(0, 50, 0, 0, 50), gdal.GCP(50, 0, 0, 50, 0), gdal.GCP(50, 50, 0, 50, 50), gdal.GCP(0 * 25, 0 * 25, 0, 25, 25), ] ds.SetGCPs(gcp_list, osr.GetUserInputAsWKT('WGS84')) utm_wkt = osr.GetUserInputAsWKT('+proj=utm +zone=11 +datum=WGS84') with gdaltest.error_handler(): transformer = gdal.Transformer(ds, None, ['DST_SRS=' + utm_wkt, 'METHOD=GCP_TPS']) assert transformer is None gdalautotest-3.1.2/alg/rasterize.py0000775000175000017500000003752213701060015016025 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: rasterize.py 9cdb32691ee7eac5cc9e07062e1f2f7f867f77fc 2020-04-03 16:44:37 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RasterizeLayer() and related calls. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import struct import ogrtest from osgeo import gdal, ogr, osr import pytest ############################################################################### # Simple polygon rasterization. def test_rasterize_1(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) # Create a memory raster to rasterize into. target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a memory layer to rasterize from. rast_ogr_ds = \ ogr.GetDriverByName('Memory').CreateDataSource('wrk') rast_mem_lyr = rast_ogr_ds.CreateLayer('poly', srs=sr) # Add a polygon. wkt_geom = 'POLYGON((1020 1030,1020 1045,1050 1045,1050 1030,1020 1030))' feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_mem_lyr.CreateFeature(feat) # Add a linestring. wkt_geom = 'LINESTRING(1000 1000, 1100 1050)' feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_mem_lyr.CreateFeature(feat) # Run the algorithm. err = gdal.RasterizeLayer(target_ds, [3, 2, 1], rast_mem_lyr, burn_values=[200, 220, 240]) assert err == 0, 'got non-zero result code from RasterizeLayer' # Check results. expected = 6452 checksum = target_ds.GetRasterBand(2).Checksum() if checksum != expected: print(checksum) gdal.GetDriverByName('GTiff').CreateCopy('tmp/rasterize_1.tif', target_ds) pytest.fail('Did not get expected image checksum') ############################################################################### # Test rasterization with ALL_TOUCHED. def test_rasterize_2(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' # Create a memory raster to rasterize into. target_ds = gdal.GetDriverByName('MEM').Create('', 12, 12, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((0, 1, 0, 12, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a memory layer to rasterize from. cutline_ds = ogr.Open('data/cutline.csv') # Run the algorithm. gdal.PushErrorHandler('CPLQuietErrorHandler') err = gdal.RasterizeLayer(target_ds, [3, 2, 1], cutline_ds.GetLayer(0), burn_values=[200, 220, 240], options=["ALL_TOUCHED=TRUE"]) gdal.PopErrorHandler() assert err == 0, 'got non-zero result code from RasterizeLayer' # Check results. expected = 121 checksum = target_ds.GetRasterBand(2).Checksum() if checksum != expected: print(checksum) gdal.GetDriverByName('GTiff').CreateCopy('tmp/rasterize_2.tif', target_ds) pytest.fail('Did not get expected image checksum') ############################################################################### # Rasterization with BURN_VALUE_FROM. def test_rasterize_3(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) # Create a memory raster to rasterize into. target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a memory layer to rasterize from. rast_ogr_ds = \ ogr.GetDriverByName('Memory').CreateDataSource('wrk') rast_mem_lyr = rast_ogr_ds.CreateLayer('poly', srs=sr) # Add polygons and linestrings. wkt_geom = ['POLYGON((1020 1030 40,1020 1045 30,1050 1045 20,1050 1030 35,1020 1030 40))', 'POLYGON((1010 1046 85,1015 1055 35,1055 1060 26,1054 1048 35,1010 1046 85))', 'POLYGON((1020 1076 190,1025 1085 35,1065 1090 26,1064 1078 35,1020 1076 190),(1023 1079 5,1061 1081 35,1062 1087 26,1028 1082 35,1023 1079 85))', 'LINESTRING(1005 1000 10, 1100 1050 120)', 'LINESTRING(1000 1000 150, 1095 1050 -5, 1080 1080 200)'] for g in wkt_geom: feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=g)) rast_mem_lyr.CreateFeature(feat) # Run the algorithm. err = gdal.RasterizeLayer(target_ds, [3, 2, 1], rast_mem_lyr, burn_values=[10, 10, 55], options=["BURN_VALUE_FROM=Z"]) assert err == 0, 'got non-zero result code from RasterizeLayer' # Check results. expected = 15006 checksum = target_ds.GetRasterBand(2).Checksum() if checksum != expected: print(checksum) gdal.GetDriverByName('GTiff').CreateCopy('tmp/rasterize_3.tif', target_ds) pytest.fail('Did not get expected image checksum') ############################################################################### # Rasterization with ATTRIBUTE. def test_rasterize_4(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) # Create a memory raster to rasterize into. target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a memory layer to rasterize from. rast_ogr_ds = ogr.GetDriverByName('Memory').CreateDataSource('wrk') rast_mem_lyr = rast_ogr_ds.CreateLayer('poly', srs=sr) # Setup Schema ogrtest.quick_create_layer_def(rast_mem_lyr, [('CELSIUS', ogr.OFTReal)]) # Add polygons and linestrings and a field named CELSIUS. wkt_geom = ['POLYGON((1020 1030 40,1020 1045 30,1050 1045 20,1050 1030 35,1020 1030 40))', 'POLYGON((1010 1046 85,1015 1055 35,1055 1060 26,1054 1048 35,1010 1046 85))', 'POLYGON((1020 1076 190,1025 1085 35,1065 1090 26,1064 1078 35,1020 1076 190),(1023 1079 5,1061 1081 35,1062 1087 26,1028 1082 35,1023 1079 85))', 'LINESTRING(1005 1000 10, 1100 1050 120)', 'LINESTRING(1000 1000 150, 1095 1050 -5, 1080 1080 200)'] celsius_field_values = [50, 255, 60, 100, 180] i = 0 for g in wkt_geom: feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=g)) feat.SetField('CELSIUS', celsius_field_values[i]) rast_mem_lyr.CreateFeature(feat) i = i + 1 # Run the algorithm. err = gdal.RasterizeLayer(target_ds, [1, 2, 3], rast_mem_lyr, options=["ATTRIBUTE=CELSIUS"]) assert err == 0, 'got non-zero result code from RasterizeLayer' # Check results. expected = 16265 checksum = target_ds.GetRasterBand(2).Checksum() if checksum != expected: print(checksum) gdal.GetDriverByName('GTiff').CreateCopy('tmp/rasterize_4.tif', target_ds) pytest.fail('Did not get expected image checksum') ############################################################################### # Rasterization with MERGE_ALG=ADD. def test_rasterize_5(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) # Create a memory raster to rasterize into. target_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3, gdal.GDT_Byte) target_ds.SetGeoTransform((1000, 1, 0, 1100, 0, -1)) target_ds.SetProjection(sr_wkt) # Create a memory layer to rasterize from. rast_ogr_ds = \ ogr.GetDriverByName('Memory').CreateDataSource('wrk') rast_mem_lyr = rast_ogr_ds.CreateLayer('poly', srs=sr) # Add polygons. wkt_geom = 'POLYGON((1020 1030,1020 1045,1050 1045,1050 1030,1020 1030))' feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_mem_lyr.CreateFeature(feat) wkt_geom = 'POLYGON((1045 1050,1055 1050,1055 1020,1045 1020,1045 1050))' feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_mem_lyr.CreateFeature(feat) # Add linestrings. wkt_geom = 'LINESTRING(1000 1000, 1100 1050)' feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_mem_lyr.CreateFeature(feat) wkt_geom = 'LINESTRING(1005 1000, 1000 1050)' feat = ogr.Feature(rast_mem_lyr.GetLayerDefn()) feat.SetGeometryDirectly(ogr.Geometry(wkt=wkt_geom)) rast_mem_lyr.CreateFeature(feat) # Run the algorithm. err = gdal.RasterizeLayer(target_ds, [1, 2, 3], rast_mem_lyr, burn_values=[100, 110, 120], options=["MERGE_ALG=ADD"]) assert err == 0, 'got non-zero result code from RasterizeLayer' # Check results. expected = 13022 checksum = target_ds.GetRasterBand(2).Checksum() if checksum != expected: print(checksum) gdal.GetDriverByName('GTiff').CreateCopy('tmp/rasterize_5.tif', target_ds) pytest.fail('Did not get expected image checksum') ############################################################################### # Test bug fix for #5580 (used to hang) def test_rasterize_6(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) wkb = struct.pack('B' * 93, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 5, 65, 28, 138, 141, 120, 239, 76, 104, 65, 87, 9, 185, 80, 29, 20, 208, 65, 28, 144, 191, 125, 165, 41, 54, 65, 87, 64, 14, 111, 103, 53, 124, 65, 30, 132, 127, 255, 255, 255, 254, 65, 87, 63, 241, 218, 241, 62, 127, 65, 30, 132, 128, 0, 0, 0, 0, 65, 87, 9, 156, 142, 126, 144, 236, 65, 28, 138, 141, 120, 239, 76, 104, 65, 87, 9, 185, 80, 29, 20, 208) data_source = ogr.GetDriverByName('MEMORY').CreateDataSource('') layer = data_source.CreateLayer('', sr, geom_type=ogr.wkbPolygon) feature = ogr.Feature(layer.GetLayerDefn()) feature.SetGeometryDirectly(ogr.CreateGeometryFromWkb(wkb)) layer.CreateFeature(feature) mask_ds = gdal.GetDriverByName('Mem').Create('', 5000, 5000, 1, gdal.GDT_Byte) mask_ds.SetGeoTransform([499000, 0.4, 0, 6095000, 0, -0.4]) mask_ds.SetProjection(sr_wkt) gdal.RasterizeLayer(mask_ds, [1], layer, burn_values=[1], options=["ALL_TOUCHED"]) ############################################################################### # Test rasterizing linestring with multiple segments and MERGE_ALG=ADD # Tests https://github.com/OSGeo/gdal/issues/1307 def test_rasterize_merge_alg_add_multiple_segment_linestring(): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) data_source = ogr.GetDriverByName('MEMORY').CreateDataSource('') layer = data_source.CreateLayer('', sr, geom_type=ogr.wkbLineString) feature = ogr.Feature(layer.GetLayerDefn()) # Diagonal segments feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(0.5 0.5,100.5 50.5,199.5 99.5)')) layer.CreateFeature(feature) feature = ogr.Feature(layer.GetLayerDefn()) # Vertical and horizontal segments feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt('LINESTRING(30.5 40.5,30.5 70.5,50.5 70.5)')) layer.CreateFeature(feature) ds = gdal.GetDriverByName('Mem').Create('', 10, 10, 1, gdal.GDT_Byte) ds.SetGeoTransform([0, 20, 0, 100, 0, -10]) ds.SetProjection(sr_wkt) ds.GetRasterBand(1).Fill(0) gdal.RasterizeLayer(ds, [1], layer, burn_values=[1], options=["MERGE_ALG=ADD"]) got = struct.unpack('B' * 100, ds.ReadRaster()) expected = (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0) assert got == expected, '%s' % str(got) ds.GetRasterBand(1).Fill(0) gdal.RasterizeLayer(ds, [1], layer, burn_values=[1], options=["MERGE_ALG=ADD", "ALL_TOUCHED"]) got = struct.unpack('B' * 100, ds.ReadRaster()) expected = (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0) assert got == expected, '%s' % str(got) ############################################################################### # Test rasterizing polygon with horizontal segments and MERGE_ALG=ADD # to check that we don't redraw several times the top segment, depending on # the winding order @pytest.mark.parametrize("wkt", ['POLYGON((0 0,0 1,1 1,1 0,0 0))', 'POLYGON((0 0,1 0,1 1,0 1,0 0))'], ids=['clockwise', 'counterclockwise']) def test_rasterize_merge_alg_add_polygon(wkt): # Setup working spatial reference sr_wkt = 'LOCAL_CS["arbitrary"]' sr = osr.SpatialReference(sr_wkt) data_source = ogr.GetDriverByName('MEMORY').CreateDataSource('') layer = data_source.CreateLayer('', sr, geom_type=ogr.wkbPolygon) feature = ogr.Feature(layer.GetLayerDefn()) feature.SetGeometryDirectly(ogr.CreateGeometryFromWkt(wkt)) layer.CreateFeature(feature) ds = gdal.GetDriverByName('Mem').Create('', 5, 5, 1, gdal.GDT_Byte) ds.SetGeoTransform([-0.125, 0.25, 0, 1.125, 0, -0.25]) ds.SetProjection(sr_wkt) ds.GetRasterBand(1).Fill(0) gdal.RasterizeLayer(ds, [1], layer, burn_values=[10], options=["MERGE_ALG=ADD"]) got = struct.unpack('B' * 25, ds.ReadRaster()) expected = (0, 10, 10, 10, 10, 0, 10, 10, 10, 10, 0, 10, 10, 10, 10, 0, 10, 10, 10, 10, 0, 10, 10, 10, 10,) assert got == expected, '%s' % str(got) gdalautotest-3.1.2/alg/fillnodata.py0000775000175000017500000001371113701060015016124 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: fillnodata.py d839df27fcec381753ca44dc6e12dce1134a0832 2019-02-04 15:43:32 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: GDALFillNoData() testing # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import struct def test_fillnodata_1x1_no_nodata(): ds = gdal.GetDriverByName('MEM').Create('', 1, 1) ar = struct.pack('B' * 1, 1) ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, ar) gdal.FillNodata(targetBand = ds.GetRasterBand(1), maxSearchDist = 1, maskBand = None, smoothingIterations = 0) ar = ds.ReadRaster() ar = struct.unpack('B' * 1, ar) assert ar == (1,) def _test_fillnodata_nodata_zero(width, height, input_ar, maxSearchDist = 1): ds = gdal.GetDriverByName('MEM').Create('', width, height) npixels = ds.RasterXSize * ds.RasterYSize ds.GetRasterBand(1).SetNoDataValue(0) ar = struct.pack('B', input_ar[0]) for i in range(1, len(input_ar)): ar += struct.pack('B', input_ar[i]) ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, ar) gdal.FillNodata(targetBand = ds.GetRasterBand(1), maxSearchDist = maxSearchDist, maskBand = None, smoothingIterations = 0) ar = ds.ReadRaster() return struct.unpack('B' * npixels, ar) def test_fillnodata_1x1_nodata_but_pixel_valid(): assert _test_fillnodata_nodata_zero(1, 1, (1,)) == (1,) def test_fillnodata_1x1_nodata_pixel_invalid(): assert _test_fillnodata_nodata_zero(1, 1, (0,)) == (0,) def test_fillnodata_2x1_valid_invalid(): assert _test_fillnodata_nodata_zero(2, 1, (1, 0)) == (1, 1) def test_fillnodata_2x1_invalid_valid(): assert _test_fillnodata_nodata_zero(2, 1, (0, 1)) == (1, 1) def test_fillnodata_3x1_valid_invalid_valid(): assert _test_fillnodata_nodata_zero(3, 1, (2, 0, 4)) == (2, 3, 4) def test_fillnodata_4x1_valid_invalid_invalid_valid(): assert _test_fillnodata_nodata_zero(4, 1, (2, 0, 0, 4)) == (2, 2, 4, 4) def test_fillnodata_1x2_valid_invalid(): assert _test_fillnodata_nodata_zero(1, 2, (1, 0)) == (1, 1) def test_fillnodata_1x2_invalid_valid(): assert _test_fillnodata_nodata_zero(1, 2, (0, 1)) == (1, 1) def test_fillnodata_1x3_valid_invalid_valid(): assert _test_fillnodata_nodata_zero(1, 3, (2, 0, 4)) == (2, 3, 4) def test_fillnodata_1x4_valid_invalid_invalid_valid(): assert _test_fillnodata_nodata_zero(1, 4, (2, 0, 0, 4)) == (2, 2, 4, 4) def test_fillnodata_3x3_central_column_invalid(): assert _test_fillnodata_nodata_zero(3, 3, (2, 0, 4, 4, 0, 6, 6, 0, 8)) == (2, 3, 4, 4, 5, 6, 6, 7, 8) def test_fillnodata_3x3_central_line_invalid(): assert _test_fillnodata_nodata_zero(3, 3, (2, 3, 4, 0, 0, 0, 6, 7, 8)) == (2, 3, 4, 4, 5, 6, 6, 7, 8) def test_fillnodata_3x3_central_column_and_line_invalid(): assert _test_fillnodata_nodata_zero(3, 3, (2, 0, 4, 0, 0, 0, 6, 0, 8)) == (2, 3, 4, 4, 0, 6, 6, 7, 8) # 1.5 > sqrt(2) def test_fillnodata_3x3_central_column_and_line_invalid_search_dist_1_5(): assert _test_fillnodata_nodata_zero(3, 3, (2, 0, 4, 0, 0, 0, 6, 0, 8), maxSearchDist = 1.5) \ == (2, 3, 4, 4, 5, 6, 6, 7, 8) gdalautotest-3.1.2/conftest.py0000775000175000017500000000516113701060015015071 0ustar eveneven# coding: utf-8 from __future__ import absolute_import, division, print_function import os import sys import pytest from osgeo import gdal # Put the pymod dir on the path, so modules can `import gdaltest` sys.path.insert(0, os.path.join(os.path.dirname(__file__), "pymod")) # put the autotest dir on the path too. This lets us import all test modules sys.path.insert(1, os.path.dirname(__file__)) # These files may be non-importable, and don't contain tests anyway. # So we skip searching them during test collection. collect_ignore = ["kml_generate_test_files.py", "gdrivers/netcdf_cfchecks.py"] # we set ECW to not resolve projection and datum strings to get 3.x behavior. gdal.SetConfigOption("ECW_DO_NOT_RESOLVE_DATUM_PROJECTION", "YES") if 'APPLY_LOCALE' in os.environ: import locale locale.setlocale(locale.LC_ALL, '') @pytest.fixture(scope="module", autouse=True) def chdir_to_test_file(request): """ Changes to the same directory as the test file. Also puts that directory at the start of sys.path, so that imports of other files in the same directory are easy. Tests have grown to expect this. NOTE: This happens when the test is *run*, not during collection. So test modules must not rely on it at module level. """ old = os.getcwd() os.chdir(os.path.dirname(request.module.__file__)) sys.path.insert(0, ".") yield if sys.path and sys.path[0] == ".": sys.path.pop(0) os.chdir(old) def pytest_collection_modifyitems(config, items): # skip tests with @pytest.mark.require_driver(name) when the driver isn't available skip_driver_not_present = pytest.mark.skip("Driver not present") # skip test with @ptest.mark.require_run_on_demand when RUN_ON_DEMAND is not set skip_run_on_demand_not_set = pytest.mark.skip("RUN_ON_DEMAND not set") import gdaltest drivers_checked = {} for item in items: for mark in item.iter_markers('require_driver'): driver_name = mark.args[0] if driver_name not in drivers_checked: driver = gdal.GetDriverByName(driver_name) drivers_checked[driver_name] = bool(driver) if driver: # Store the driver on gdaltest module so test functions can assume it's there. setattr(gdaltest, '%s_drv' % driver_name.lower(), driver) if not drivers_checked[driver_name]: item.add_marker(skip_driver_not_present) if not gdal.GetConfigOption('RUN_ON_DEMAND'): for mark in item.iter_markers('require_run_on_demand'): item.add_marker(skip_run_on_demand_not_set) gdalautotest-3.1.2/generate_sample_gpkg.py0000775000175000017500000004222613701060015017412 0ustar eveneven# -*- coding: utf-8 -*- ############################################################################### # # Purpose: Generate GPKG sample file # Author: Even Rouault # ############################################################################### # Copyright (c) 2014-2017, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal from osgeo import ogr from osgeo import osr if int(gdal.VersionInfo('VERSION_NUM')) < 2020000: print('Requires GDAL >= 2.2(dev)') sys.exit(1) sr4326 = osr.SpatialReference() sr4326.SetFromUserInput('WGS84') sr32631 = osr.SpatialReference() sr32631.ImportFromEPSG(32631) byte_src_ds = gdal.OpenEx('https://raw.githubusercontent.com/OSGeo/gdal/master/autotest/gcore/data/byte.tif', allowed_drivers=['GTIFF', 'HTTP']) elev_src_ds = gdal.OpenEx('https://raw.githubusercontent.com/OSGeo/gdal/master/autotest/gdrivers/data/n43.dt0', allowed_drivers=['DTED', 'HTTP']) gdal.SetConfigOption('CREATE_METADATA_TABLES', 'NO') for (out_filename, options) in [ ('gdal_sample_v1.2_no_extensions.gpkg', {}), ('gdal_sample_v1.2_no_extensions_with_gpkg_ogr_contents.gpkg', {'gpkg_ogr_contents': True}), ('gdal_sample_v1.2_spatial_index_extension.gpkg', {'spi': True}), ('gdal_sample_v1.2_spi_nonlinear_webp_elevation.gpkg', {'spi': True, 'nonlinear': True, 'webp': True, 'elevation': True}) ]: dataset_options = ['VERSION=1.2'] if not('gpkg_ogr_contents' in options and options['gpkg_ogr_contents']): dataset_options += ['ADD_GPKG_OGR_CONTENTS=NO'] layer_options = [] if not('spi' in options and options['spi']): layer_options += ['SPATIAL_INDEX=NO'] ds = ogr.GetDriverByName('GPKG').CreateDataSource(out_filename, options=dataset_options) lyr = ds.CreateLayer('attribute_table', geom_type=ogr.wkbNone) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) feat = ogr.Feature(lyr.GetLayerDefn()) feat['intfield'] = 1 lyr.CreateFeature(feat) lyr = ds.CreateLayer('point2d', geom_type=ogr.wkbPoint, options=layer_options) lyr.CreateField(ogr.FieldDefn('intfield', ogr.OFTInteger)) lyr.CreateField(ogr.FieldDefn('strfield', ogr.OFTString)) lyr.CreateField(ogr.FieldDefn('realfield', ogr.OFTReal)) lyr.CreateField(ogr.FieldDefn('datetimefield', ogr.OFTDateTime)) lyr.CreateField(ogr.FieldDefn('datefield', ogr.OFTDate)) lyr.CreateField(ogr.FieldDefn('binaryfield', ogr.OFTBinary)) feat = ogr.Feature(lyr.GetLayerDefn()) feat['intfield'] = 1 feat['strfield'] = 'foo' feat['realfield'] = 1.23456 feat['datetimefield'] = '2014/06/07 14:20:00' feat['datefield'] = '2014/06/07' feat.SetFieldBinaryFromHexString('binaryfield', '007FFF') feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('linestring2d', geom_type=ogr.wkbLineString, srs=sr4326, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 2,3 4)')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('polygon2d', geom_type=ogr.wkbPolygon, srs=sr32631, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multipoint2d', geom_type=ogr.wkbMultiPoint, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1,2 3)')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multilinestring2d', geom_type=ogr.wkbMultiLineString, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 1,2 3),(4 5,6 7))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multipolygon2d', geom_type=ogr.wkbMultiPolygon, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),((-9 0,-9 10,-1 10,-1 0,-9 0)))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('geomcollection2d', geom_type=ogr.wkbGeometryCollection, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5),POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),MULTIPOINT(0 1,2 3),MULTILINESTRING((0 1,2 3),(4 5,6 7)),MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),((-9 0,-9 10,-1 10,-1 0,-9 0))))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1,2 3)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 1,2 3),(4 5,6 7))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),((-9 0,-9 10,-1 10,-1 0,-9 0)))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('geometry2d', geom_type=ogr.wkbUnknown, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 2,3 4)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1,2 3)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 1,2 3),(4 5,6 7))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),((-9 0,-9 10,-1 10,-1 0,-9 0)))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(0 1),LINESTRING(2 3,4 5),POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),MULTIPOINT(0 1,2 3),MULTILINESTRING((0 1,2 3),(4 5,6 7)),MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0),(1 1,1 9,9 9,9 1,1 1)),((-9 0,-9 10,-1 10,-1 0,-9 0))))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('point3d', geom_type=ogr.wkbPoint25D, options=layer_options) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2 3)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('linestring3d', geom_type=ogr.wkbLineString25D, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 2 3,4 5 6)')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('polygon3d', geom_type=ogr.wkbPolygon25D, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multipoint3d', geom_type=ogr.wkbMultiPoint25D, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1 2,3 4 5)')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multilinestring3d', geom_type=ogr.wkbMultiLineString25D, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 1 2,3 4 5),(6 7 8,9 10 11))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multipolygon3d', geom_type=ogr.wkbMultiPolygon25D, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),((-9 0 50,-9 10 50,-1 10 50,-1 0 50,-9 0 50)))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('geomcollection3d', geom_type=ogr.wkbGeometryCollection25D, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(1 2 3),LINESTRING(1 2 3,4 5 6),POLYGON((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),MULTIPOINT(0 1 2,3 4 5),MULTILINESTRING((0 1 2,3 4 5),(6 7 8,9 10 11)),MULTIPOLYGON(((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),((-9 0 50,-9 10 50,-1 10 50,-1 0 50,-9 0 50))))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1 2,3 4 5)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 1 2,3 4 5),(6 7 8,9 10 11))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),((-9 0 50,-9 10 50,-1 10 50,-1 0 50,-9 0 50)))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) lyr = ds.CreateLayer('geometry3d', geom_type=ogr.wkbUnknown | ogr.wkb25DBit, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POINT(1 2 3)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(1 2 3,4 5 6)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOINT(0 1 2,3 4 5)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTILINESTRING((0 1 2,3 4 5),(6 7 8,9 10 11))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTIPOLYGON(((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),((-9 0 50,-9 10 50,-1 10 50,-1 0 50,-9 0 50)))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('GEOMETRYCOLLECTION(POINT(1 2 3),LINESTRING(1 2 3,4 5 6),POLYGON((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),MULTIPOINT(0 1 2,3 4 5),MULTILINESTRING((0 1 2,3 4 5),(6 7 8,9 10 11)),MULTIPOLYGON(((0 0 100,0 10 100,10 10 100,10 0 100,0 0 100),(1 1 100,1 9 100,9 9 100,9 1 100,1 1 100)),((-9 0 50,-9 10 50,-1 10 50,-1 0 50,-9 0 50))))')) lyr.CreateFeature(feat) # Null geometry feat = ogr.Feature(lyr.GetLayerDefn()) lyr.CreateFeature(feat) if 'nonlinear' in options and options['nonlinear']: lyr = ds.CreateLayer('circularstring', geom_type=ogr.wkbCircularString, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 1,2 0)')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('compoundcurve', geom_type=ogr.wkbCompoundCurve, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,2 0),(2 0,3 0))')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('curvepolygon', geom_type=ogr.wkbCurvePolygon, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,2 0),(2 0,3 0,3 -1,0 -1,0 0)))')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multicurve', geom_type=ogr.wkbMultiCurve, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTICURVE(CIRCULARSTRING(0 0,1 1,2 0))')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('multisurface', geom_type=ogr.wkbMultiSurface, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('MULTISURFACE(CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,2 0),(2 0,3 0,3 -1,0 -1,0 0))))')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('curve', geom_type=ogr.wkbCurve, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('LINESTRING(0 0,1 1,2 0)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('CIRCULARSTRING(0 0,1 1,2 0)')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,2 0),(2 0,3 0))')) lyr.CreateFeature(feat) lyr = ds.CreateLayer('surface', geom_type=ogr.wkbSurface, options=layer_options) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('POLYGON((0 0,0 1,1 1,0 0))')) lyr.CreateFeature(feat) feat = ogr.Feature(lyr.GetLayerDefn()) feat.SetGeometry(ogr.CreateGeometryFromWkt('CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,2 0),(2 0,3 0,3 -1,0 -1,0 0)))')) lyr.CreateFeature(feat) ds = None raster_options = ['APPEND_SUBDATASET=YES'] gdal.GetDriverByName('GPKG').CreateCopy(out_filename, byte_src_ds, options=raster_options + ['TILE_FORMAT=PNG', 'RASTER_TABLE=byte_png']) gdal.GetDriverByName('GPKG').CreateCopy(out_filename, byte_src_ds, options=raster_options + ['TILE_FORMAT=JPEG', 'RASTER_TABLE=byte_jpeg']) if 'webp' in options and options['webp']: gdal.GetDriverByName('GPKG').CreateCopy(out_filename, byte_src_ds, options=raster_options + ['TILE_FORMAT=WEBP', 'RASTER_TABLE=byte_webp']) if 'elevation' in options and options['elevation']: gdal.Translate(out_filename, elev_src_ds, format='GPKG', outputType=gdal.GDT_Float32, creationOptions=raster_options + ['RASTER_TABLE=elev_tiff']) gdal.GetDriverByName('GPKG').CreateCopy(out_filename, elev_src_ds, options=raster_options + ['RASTER_TABLE=elev_png']) gdalautotest-3.1.2/gdrivers/0000775000175000017500000000000013701060034014512 5ustar evenevengdalautotest-3.1.2/gdrivers/cpg.py0000775000175000017500000000347013701060015015643 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: cpg.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test CPG driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Test a fake CPG dataset def test_cpg_1(): tst = gdaltest.GDALTest('CPG', 'fakecpgSIRC.hdr', 1, 0) return tst.testOpen() gdalautotest-3.1.2/gdrivers/dimap.py0000775000175000017500000001474513701060015016173 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: dimap.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test SPOT DIMAP driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal import pytest ############################################################################### # Open and verify a the GCPs and metadata. def test_dimap_1(): shutil.copy('data/dimap/METADATA.DIM', 'tmp') shutil.copy('data/dimap/IMAGERY.TIF', 'tmp') shutil.copy('data/rgbsmall.tif', 'tmp') ds = gdal.Open('tmp/METADATA.DIM') assert ds.RasterCount == 1 and ds.RasterXSize == 6000 and ds.RasterYSize == 6000, \ 'wrong size or bands' assert ds.GetRasterBand(1).Checksum(0, 0, 100, 100) == 21586, 'wrong checksum' md = ds.GetMetadata() assert md['PROCESSING_LEVEL'] == '1A', 'metadata wrong.' md = ds.GetMetadata() assert md['SPECTRAL_PHYSICAL_BIAS'] == '0.000000', 'metadata wrong.' gcp_srs = ds.GetGCPProjection() assert (not (gcp_srs[:6] != 'GEOGCS' \ or gcp_srs.find('WGS') == -1 \ or gcp_srs.find('84') == -1)), 'GCP Projection not retained.' gcps = ds.GetGCPs() assert len(gcps) == 4 and gcps[0].GCPPixel == 0.5 and gcps[0].GCPLine == 0.5 and gcps[0].GCPX == pytest.approx(4.3641728, abs=0.0000002) and gcps[0].GCPY == pytest.approx(44.2082255, abs=0.0000002) and gcps[0].GCPZ == pytest.approx(0, abs=0.0000002), \ 'GCPs wrong.' ds = None os.unlink('tmp/METADATA.DIM') os.unlink('tmp/IMAGERY.TIF') os.unlink('tmp/rgbsmall.tif') ############################################################################### # Open DIMAP 2 def test_dimap_2(): for name in ['data/dimap2', 'data/dimap2/VOL_PHR.XML', 'data/dimap2/DIM_foo.XML']: ds = gdal.Open(name) assert ds.RasterCount == 4 and ds.RasterXSize == 20 and ds.RasterYSize == 30, \ 'wrong size or bands' md = ds.GetMetadata() expected_md = {'GEOMETRIC_ATTITUDES_USED': 'ACCURATE', 'FACILITY_PROCESSING_CENTER': 'PROCESSING_CENTER', 'GEOMETRIC_VERTICAL_DESC': 'REFERENCE3D', 'EPHEMERIS_ACQUISITION_ORBIT_DIRECTION': 'DESCENDING', 'BAND_MODE': 'PX', 'EPHEMERIS_NADIR_LON': 'NADIR_LON', 'EPHEMERIS_ACQUISITION_ORBIT_NUMBER': 'ACQUISITION_ORBIT_NUMBER', 'SPECTRAL_PROCESSING': 'PMS', 'CLOUDCOVER_MEASURE_TYPE': 'AUTOMATIC', 'DATASET_JOB_ID': 'JOB_ID', 'MISSION': 'PHR', 'GEOMETRIC_GROUND_SETTING': 'true', 'GEOMETRIC_VERTICAL_SETTING': 'true', 'DATASET_PRODUCTION_DATE': 'PRODUCTION_DATE', 'DATASET_PRODUCER_CONTACT': 'PRODUCER_CONTACT', 'IMAGING_DATE': '2016-06-17', 'CLOUDCOVER_QUALITY_TABLES': 'PHR', 'DATASET_PRODUCER_NAME': 'PRODUCER_NAME', 'GEOMETRIC_GEOMETRIC_PROCESSING': 'SENSOR', 'GEOMETRIC_EPHEMERIS_USED': 'CORRECTED', 'GEOMETRIC_GROUND_DESC': 'R3D_ORTHO', 'DATASET_DELIVERY_TYPE': 'DELIVERY_TYPE', 'PROCESSING_LEVEL': 'SENSOR', 'DATASET_PRODUCER_ADDRESS': 'PRODUCER_ADDRESS', 'DATASET_PRODUCT_CODE': 'PRODUCT_CODE', 'INSTRUMENT_INDEX': '1A', 'EPHEMERIS_NADIR_LAT': 'NADIR_LAT', 'INSTRUMENT': 'PHR', 'CLOUDCOVER_MEASURE_NAME': 'Cloud_Cotation (CLD)', 'FACILITY_SOFTWARE': 'SOFTWARE', 'IMAGING_TIME': '12:34:56', 'MISSION_INDEX': '1A'} assert md == expected_md, 'metadata wrong.' rpc = ds.GetMetadata('RPC') expected_rpc = {'HEIGHT_OFF': 'HEIGHT_OFF', 'LINE_NUM_COEFF': ' LINE_NUM_COEFF_1 LINE_NUM_COEFF_2 LINE_NUM_COEFF_3 LINE_NUM_COEFF_4 LINE_NUM_COEFF_5 LINE_NUM_COEFF_6 LINE_NUM_COEFF_7 LINE_NUM_COEFF_8 LINE_NUM_COEFF_9 LINE_NUM_COEFF_10 LINE_NUM_COEFF_11 LINE_NUM_COEFF_12 LINE_NUM_COEFF_13 LINE_NUM_COEFF_14 LINE_NUM_COEFF_15 LINE_NUM_COEFF_16 LINE_NUM_COEFF_17 LINE_NUM_COEFF_18 LINE_NUM_COEFF_19 LINE_NUM_COEFF_20', 'LONG_OFF': 'LONG_OFF', 'SAMP_DEN_COEFF': ' SAMP_DEN_COEFF_1 SAMP_DEN_COEFF_2 SAMP_DEN_COEFF_3 SAMP_DEN_COEFF_4 SAMP_DEN_COEFF_5 SAMP_DEN_COEFF_6 SAMP_DEN_COEFF_7 SAMP_DEN_COEFF_8 SAMP_DEN_COEFF_9 SAMP_DEN_COEFF_10 SAMP_DEN_COEFF_11 SAMP_DEN_COEFF_12 SAMP_DEN_COEFF_13 SAMP_DEN_COEFF_14 SAMP_DEN_COEFF_15 SAMP_DEN_COEFF_16 SAMP_DEN_COEFF_17 SAMP_DEN_COEFF_18 SAMP_DEN_COEFF_19 SAMP_DEN_COEFF_20', 'LINE_SCALE': 'LINE_SCALE', 'SAMP_NUM_COEFF': ' SAMP_NUM_COEFF_1 SAMP_NUM_COEFF_2 SAMP_NUM_COEFF_3 SAMP_NUM_COEFF_4 SAMP_NUM_COEFF_5 SAMP_NUM_COEFF_6 SAMP_NUM_COEFF_7 SAMP_NUM_COEFF_8 SAMP_NUM_COEFF_9 SAMP_NUM_COEFF_10 SAMP_NUM_COEFF_11 SAMP_NUM_COEFF_12 SAMP_NUM_COEFF_13 SAMP_NUM_COEFF_14 SAMP_NUM_COEFF_15 SAMP_NUM_COEFF_16 SAMP_NUM_COEFF_17 SAMP_NUM_COEFF_18 SAMP_NUM_COEFF_19 SAMP_NUM_COEFF_20', 'LONG_SCALE': 'LONG_SCALE', 'SAMP_SCALE': 'SAMP_SCALE', 'SAMP_OFF': '4', 'LAT_SCALE': 'LAT_SCALE', 'LAT_OFF': 'LAT_OFF', 'LINE_OFF': '9', 'LINE_DEN_COEFF': ' LINE_DEN_COEFF_1 LINE_DEN_COEFF_2 LINE_DEN_COEFF_3 LINE_DEN_COEFF_4 LINE_DEN_COEFF_5 LINE_DEN_COEFF_6 LINE_DEN_COEFF_7 LINE_DEN_COEFF_8 LINE_DEN_COEFF_9 LINE_DEN_COEFF_10 LINE_DEN_COEFF_11 LINE_DEN_COEFF_12 LINE_DEN_COEFF_13 LINE_DEN_COEFF_14 LINE_DEN_COEFF_15 LINE_DEN_COEFF_16 LINE_DEN_COEFF_17 LINE_DEN_COEFF_18 LINE_DEN_COEFF_19 LINE_DEN_COEFF_20', 'HEIGHT_SCALE': 'HEIGHT_SCALE'} assert rpc == expected_rpc, 'RPC wrong.' cs = ds.GetRasterBand(1).Checksum() assert cs == 7024, 'wrong checksum.' ds = None gdalautotest-3.1.2/gdrivers/nwt_grd.py0000775000175000017500000000510713701060015016535 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: nwt_grd.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test Northwood GRD driver # Author: Chaitanya kumar CH, # ############################################################################### # Copyright (c) 2009, Chaitanya kumar CH, # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import shutil from osgeo import gdal import gdaltest ############################################################################### # Test a GRD dataset with three bands + Z def test_nwt_grd_1(): tst1 = gdaltest.GDALTest('NWT_GRD', 'nwt_grd.grd', 1, 28093) tst1.testOpen() tst2 = gdaltest.GDALTest('NWT_GRD', 'nwt_grd.grd', 2, 33690) tst2.testOpen() tst3 = gdaltest.GDALTest('NWT_GRD', 'nwt_grd.grd', 3, 20365) tst3.testOpen() tst4 = gdaltest.GDALTest('NWT_GRD', 'nwt_grd.grd', 4, 25856) tst4.testOpen() def test_nwt_grd_2(): """ Test writing a GRD via CreateCopy """ shutil.copy('data/nwt_grd.grd', 'tmp/nwt_grd.grd') tst1 = gdaltest.GDALTest('NWT_GRD', 'tmp/nwt_grd.grd', 1, 25856, filename_absolute=1, open_options=['BAND_COUNT=1']) ret = tst1.testCreateCopy(new_filename='tmp/out.grd', check_minmax=0, dest_open_options=['BAND_COUNT=1']) gdal.Unlink('tmp/nwt_grd.grd') gdal.Unlink('tmp/nwt_grd.grd.aux.xml') return ret gdalautotest-3.1.2/gdrivers/hdf5.py0000775000175000017500000004005413701060015015717 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: hdf5.py 47945e3ec75b6340ddb9feae92e67594135cfeaa 2020-01-20 20:01:25 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for HDF5 driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import shutil import pytest from osgeo import gdal import gdaltest from uffd import uffd_compare ############################################################################### # Test if HDF5 driver is present pytestmark = pytest.mark.require_driver('HDF5') @pytest.fixture(autouse=True) def check_no_file_leaks(): num_files = len(gdaltest.get_opened_files()) yield diff = len(gdaltest.get_opened_files()) - num_files assert diff == 0, 'Leak of file handles: %d leaked' % diff ############################################################################### # Confirm expected subdataset information. def test_hdf5_2(): ds = gdal.Open('data/groups.h5') sds_list = ds.GetMetadata('SUBDATASETS') assert len(sds_list) == 4, 'Did not get expected subdataset count.' assert sds_list['SUBDATASET_1_NAME'] == 'HDF5:"data/groups.h5"://MyGroup/Group_A/dset2' and sds_list['SUBDATASET_2_NAME'] == 'HDF5:"data/groups.h5"://MyGroup/dset1', \ 'did not get expected subdatasets.' ds = None assert not gdaltest.is_file_open('data/groups.h5'), 'file still opened.' ############################################################################### # Confirm that single variable files can be accessed directly without # subdataset stuff. def test_hdf5_3(): ds = gdal.Open('HDF5:"data/u8be.h5"://TestArray') cs = ds.GetRasterBand(1).Checksum() assert cs == 135, 'did not get expected checksum' ds = None assert not gdaltest.is_file_open('data/u8be.h5'), 'file still opened.' ############################################################################### # Confirm subdataset access, and checksum. def test_hdf5_4(): ds = gdal.Open('HDF5:"data/u8be.h5"://TestArray') cs = ds.GetRasterBand(1).Checksum() assert cs == 135, 'did not get expected checksum' ############################################################################### # Similar check on a 16bit dataset. def test_hdf5_5(): ds = gdal.Open('HDF5:"data/groups.h5"://MyGroup/dset1') cs = ds.GetRasterBand(1).Checksum() assert cs == 18, 'did not get expected checksum' ############################################################################### # Test generating an overview on a subdataset. def test_hdf5_6(): shutil.copyfile('data/groups.h5', 'tmp/groups.h5') ds = gdal.Open('HDF5:"tmp/groups.h5"://MyGroup/dset1') ds.BuildOverviews(overviewlist=[2]) ds = None assert not gdaltest.is_file_open('tmp/groups.h5'), 'file still opened.' ds = gdal.Open('HDF5:"tmp/groups.h5"://MyGroup/dset1') assert ds.GetRasterBand(1).GetOverviewCount() == 1, 'failed to find overview' ds = None # confirm that it works with a different path. (#3290) ds = gdal.Open('HDF5:"data/../tmp/groups.h5"://MyGroup/dset1') assert ds.GetRasterBand(1).GetOverviewCount() == 1, \ 'failed to find overview with alternate path' ovfile = ds.GetMetadataItem('OVERVIEW_FILE', 'OVERVIEWS') assert ovfile[:11] == 'data/../tmp', 'did not get expected OVERVIEW_FILE.' ds = None gdaltest.clean_tmp() ############################################################################### # Coarse metadata check (regression test for #2412). def test_hdf5_7(): ds = gdal.Open('data/metadata.h5') metadata = ds.GetMetadata() metadataList = ds.GetMetadata_List() ds = None assert not gdaltest.is_file_open('data/metadata.h5'), 'file still opened.' assert len(metadata) == len(metadataList), 'error in metadata dictionary setup' metadataList = [item.split('=', 1)[0] for item in metadataList] for key in metadataList: try: metadata.pop(key) except KeyError: pytest.fail('unable to find "%s" key' % key) ############################################################################### # Test metadata names. def test_hdf5_8(): ds = gdal.Open('data/metadata.h5') metadata = ds.GetMetadata() ds = None assert metadata, 'no metadata found' h5groups = ['G1', 'Group with spaces', 'Group_with_underscores', 'Group with spaces_and_underscores'] h5datasets = ['D1', 'Dataset with spaces', 'Dataset_with_underscores', 'Dataset with spaces_and_underscores'] attributes = { 'attribute': 'value', 'attribute with spaces': 0, 'attribute_with underscores': 0, 'attribute with spaces_and_underscores': .1, } def scanMetadata(parts): for attr in attributes: name = '_'.join(parts + [attr]) name = name.replace(' ', '_') assert name in metadata, ('unable to find metadata: "%s"' % name) value = metadata.pop(name) value = value.strip(' d') value = type(attributes[attr])(value) assert value == attributes[attr], ('incorrect metadata value for "%s": ' '"%s" != "%s"' % (name, value, attributes[attr])) # level0 assert scanMetadata([]) is None # level1 datasets for h5dataset in h5datasets: assert scanMetadata([h5dataset]) is None # level1 groups for h5group in h5groups: assert scanMetadata([h5group]) is None # level2 datasets for h5dataset in h5datasets: assert scanMetadata([h5group, h5dataset]) is None ############################################################################### # Variable length string metadata check (regression test for #4228). def test_hdf5_9(): if int(gdal.VersionInfo('VERSION_NUM')) < 1900: pytest.skip('would crash') ds = gdal.Open('data/vlstr_metadata.h5') metadata = ds.GetRasterBand(1).GetMetadata() ds = None assert not gdaltest.is_file_open('data/vlstr_metadata.h5'), 'file still opened.' ref_metadata = { 'TEST_BANDNAMES': 'SAA', 'TEST_CODING': '0.6666666667 0.0000000000 TRUE', 'TEST_FLAGS': '255=noValue', 'TEST_MAPPING': 'Geographic Lat/Lon 0.5000000000 0.5000000000 27.3154761905 -5.0833333333 0.0029761905 0.0029761905 WGS84 Degrees', 'TEST_NOVALUE': '255', 'TEST_RANGE': '0 255 0 255', } assert len(metadata) == len(ref_metadata), ('incorrect number of metadata: ' 'expected %d, got %d' % (len(ref_metadata), len(metadata))) for key in metadata: assert key in ref_metadata, ('unexpected metadata key "%s"' % key) assert metadata[key] == ref_metadata[key], \ ('incorrect metadata value for key "%s": ' 'expected "%s", got "%s" ' % (key, ref_metadata[key], metadata[key])) ############################################################################### # Test CSK_DGM.h5 (#4160) def test_hdf5_10(): # Try opening the QLK subdataset to check that no error is generated gdal.ErrorReset() ds = gdal.Open('HDF5:"data/CSK_DGM.h5"://S01/QLK') assert ds is not None and gdal.GetLastErrorMsg() == '' ds = None ds = gdal.Open('HDF5:"data/CSK_DGM.h5"://S01/SBI') got_gcpprojection = ds.GetGCPProjection() assert got_gcpprojection.startswith('GEOGCS["WGS 84",DATUM["WGS_1984"') got_gcps = ds.GetGCPs() assert len(got_gcps) == 4 assert (got_gcps[0].GCPPixel == pytest.approx(0, abs=1e-5) and got_gcps[0].GCPLine == pytest.approx(0, abs=1e-5) and \ got_gcps[0].GCPX == pytest.approx(12.2395902509238, abs=1e-5) and got_gcps[0].GCPY == pytest.approx(44.7280047434954, abs=1e-5)) ds = None assert not gdaltest.is_file_open('data/CSK_DGM.h5'), 'file still opened.' ############################################################################### # Test CSK_GEC.h5 (#4160) def test_hdf5_11(): # Try opening the QLK subdataset to check that no error is generated gdal.ErrorReset() ds = gdal.Open('HDF5:"data/CSK_GEC.h5"://S01/QLK') assert ds is not None and gdal.GetLastErrorMsg() == '' ds = None ds = gdal.Open('HDF5:"data/CSK_GEC.h5"://S01/SBI') got_projection = ds.GetProjection() assert got_projection.startswith('PROJCS["Transverse_Mercator",GEOGCS["WGS 84",DATUM["WGS_1984"') got_gt = ds.GetGeoTransform() expected_gt = (275592.5, 2.5, 0.0, 4998152.5, 0.0, -2.5) for i in range(6): assert got_gt[i] == pytest.approx(expected_gt[i], abs=1e-5) ds = None assert not gdaltest.is_file_open('data/CSK_GEC.h5'), 'file still opened.' ############################################################################### # Test ODIM_H5 (#5032) def test_hdf5_12(): if not gdaltest.download_file('http://trac.osgeo.org/gdal/raw-attachment/ticket/5032/norsa.ss.ppi-00.5-dbz.aeqd-1000.20070601T000039Z.hdf', 'norsa.ss.ppi-00.5-dbz.aeqd-1000.20070601T000039Z.hdf'): pytest.skip() ds = gdal.Open('tmp/cache/norsa.ss.ppi-00.5-dbz.aeqd-1000.20070601T000039Z.hdf') got_projection = ds.GetProjection() assert 'Azimuthal_Equidistant' in got_projection got_gt = ds.GetGeoTransform() expected_gt = (-239999.9823595533, 997.9165855496311, 0.0, 239000.03320328312, 0.0, -997.9167782264051) assert max([abs(got_gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-5, got_gt ############################################################################### # Test MODIS L2 HDF5 GCPs (#6666) def test_hdf5_13(): if not gdaltest.download_file('http://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2016273115000.L2_LAC_OC.nc', 'A2016273115000.L2_LAC_OC.nc'): pytest.skip() ds = gdal.Open('HDF5:"tmp/cache/A2016273115000.L2_LAC_OC.nc"://geophysical_data/Kd_490') got_gcps = ds.GetGCPs() assert len(got_gcps) == 3030 assert (got_gcps[0].GCPPixel == pytest.approx(0.5, abs=1e-5) and got_gcps[0].GCPLine == pytest.approx(0.5, abs=1e-5) and \ got_gcps[0].GCPX == pytest.approx(33.1655693, abs=1e-5) and got_gcps[0].GCPY == pytest.approx(39.3207207, abs=1e-5)) ############################################################################### # Test complex data subsets def test_hdf5_14(): ds = gdal.Open('data/complex.h5') sds_list = ds.GetMetadata('SUBDATASETS') assert len(sds_list) == 6, 'Did not get expected complex subdataset count.' assert sds_list['SUBDATASET_1_NAME'] == 'HDF5:"data/complex.h5"://f16' and sds_list['SUBDATASET_2_NAME'] == 'HDF5:"data/complex.h5"://f32' and sds_list['SUBDATASET_3_NAME'] == 'HDF5:"data/complex.h5"://f64', \ 'did not get expected subdatasets.' ds = None assert not gdaltest.is_file_open('data/complex.h5'), 'file still opened.' ############################################################################### # Confirm complex subset data access and checksum # Start with Float32 def test_hdf5_15(): ds = gdal.Open('HDF5:"data/complex.h5"://f32') cs = ds.GetRasterBand(1).Checksum() assert cs == 523, 'did not get expected checksum' # Repeat for Float64 def test_hdf5_16(): ds = gdal.Open('HDF5:"data/complex.h5"://f64') cs = ds.GetRasterBand(1).Checksum() assert cs == 511, 'did not get expected checksum' # Repeat for Float16 def test_hdf5_17(): ds = gdal.Open('HDF5:"data/complex.h5"://f16') cs = ds.GetRasterBand(1).Checksum() assert cs == 412, 'did not get expected checksum' def test_hdf5_single_char_varname(): ds = gdal.Open('HDF5:"data/single_char_varname.h5"://e') assert ds is not None def test_hdf5_attr_all_datatypes(): ds = gdal.Open('data/attr_all_datatypes.h5') assert ds is not None assert ds.GetMetadata() == {'attr_float16': '125 ', 'attr_float32': '125 ', 'attr_float64': '125 ', 'attr_int16': '125 ', 'attr_int32': '125 ', 'attr_int8': '125 ', 'attr_uint16': '125 ', 'attr_uint32': '125 ', 'attr_uint8': '125 '} def test_hdf5_virtual_file(): hdf5_files = [ 'CSK_GEC.h5', 'vlstr_metadata.h5', 'groups.h5', 'complex.h5', 'single_char_varname.h5', 'CSK_DGM.h5', 'u8be.h5', 'metadata.h5' ] for hdf5_file in hdf5_files: assert uffd_compare(hdf5_file) is True # FIXME: This FTP server seems to have disappeared. Replace with something else? hdf5_list = [ ('ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf_files/hdf5/samples/convert', 'C1979091.h5', 'HDF4_PALGROUP/HDF4_PALETTE_2', 7488, -1), ('ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf_files/hdf5/samples/convert', 'C1979091.h5', 'Raster_Image_#0', 3661, -1), ('ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf_files/hdf5/geospatial/DEM', 'half_moon_bay.grid', 'HDFEOS/GRIDS/DEMGRID/Data_Fields/Elevation', 30863, -1), ] @pytest.mark.parametrize( 'downloadURL,fileName,subdatasetname,checksum,download_size', hdf5_list, ids=['HDF5:"' + item[1] + '"://' + item[2] for item in hdf5_list], ) def test_hdf5(downloadURL, fileName, subdatasetname, checksum, download_size): if not gdaltest.download_file(downloadURL + '/' + fileName, fileName, download_size): pytest.skip('no download') ds = gdal.Open('HDF5:"tmp/cache/' + fileName + '"://' + subdatasetname) assert ds.GetRasterBand(1).Checksum() == checksum, 'Bad checksum. Expected %d, got %d' % (checksum, ds.GetRasterBand(1).Checksum()) def test_hdf5_dimension_labels_with_null(): assert gdal.Open('data/dimension_labels_with_null.h5') def test_hdf5_recursive_groups(): # File generated with # import h5py # f = h5py.File('recursive_groups.h5','w') # group = f.create_group("subgroup") # group['link_to_root'] = f # group['link_to_self'] = group # group['soft_link_to_root'] = h5py.SoftLink('/') # group['soft_link_to_self'] = h5py.SoftLink('/subgroup') # group['soft_link_to_not_existing'] = h5py.SoftLink('/not_existing') # group['hard_link_to_root'] = h5py.HardLink('/') # group['ext_link_to_self_root'] = h5py.ExternalLink("recursive_groups.h5", "/") # f.close() ds = gdal.Open('data/recursive_groups.h5') assert ds is not None ds.GetSubDatasets() def test_hdf5_family_driver(): assert gdal.Open('data/test_family_0.h5') def test_hdf5_single_dim(): ds = gdal.Open('HDF5:data/byte_chunked_multiple.nc://x') assert ds b = ds.GetRasterBand(1) assert b.YSize == 1 assert b.XSize == 20 assert b.GetBlockSize() == [20, 1] assert b.Checksum() == 231 gdalautotest-3.1.2/gdrivers/gpkg.py0000775000175000017500000036074413701060015016034 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: gpkg.py beafef7c74495c25010f454db15c8c0b5bc64247 2020-01-24 18:52:34 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GeoPackage raster functionality. # Author: Even Rouault # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys import pytest # Make sure we run from the directory of the script if os.path.basename(sys.argv[0]) == os.path.basename(__file__): if os.path.dirname(sys.argv[0]) != '': os.chdir(os.path.dirname(sys.argv[0])) from osgeo import osr, gdal, ogr import gdaltest ############################################################################### # Validate a geopackage def validate(filename, quiet=False): path = '../../gdal/swig/python/samples' if path not in sys.path: sys.path.append(path) try: import validate_gpkg except ImportError: print('Cannot import validate_gpkg') return True my_filename = filename if my_filename.startswith('/vsimem/'): my_filename = 'tmp/validate.gpkg' f = gdal.VSIFOpenL(filename, 'rb') if f is None: print('Cannot open %s' % filename) return False content = gdal.VSIFReadL(1, 10000000, f) gdal.VSIFCloseL(f) open(my_filename, 'wb').write(content) try: validate_gpkg.check(my_filename) except Exception as e: if not quiet: print(e) return False finally: if my_filename != filename: os.unlink(my_filename) return True ############################################################################### # Test if GPKG and tile drivers are available def test_gpkg_init(): gdaltest.gpkg_dr = None gdaltest.gpkg_dr = gdal.GetDriverByName('GPKG') if gdaltest.gpkg_dr is None: pytest.skip() gdaltest.png_dr = gdal.GetDriverByName('PNG') gdaltest.jpeg_dr = gdal.GetDriverByName('JPEG') gdaltest.webp_dr = gdal.GetDriverByName('WEBP') gdaltest.webp_supports_rgba = False if gdaltest.webp_dr is not None and gdal.GetConfigOption("GPKG_SIMUL_WEBP_3BAND") is None: md = gdaltest.webp_dr.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LOSSLESS') >= 0: gdaltest.webp_supports_rgba = True # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') gdal.SetConfigOption('GPKG_DEBUG', 'ON') ############################################################################### # def get_expected_checksums(src_ds, tile_drv, working_bands, extend_src=True, clamp_output=True): if extend_src: mem_ds = gdal.GetDriverByName('MEM').Create('', 256, 256, working_bands) else: mem_ds = gdal.GetDriverByName('MEM').Create('', src_ds.RasterXSize, src_ds.RasterYSize, working_bands) for i in range(working_bands): if src_ds.RasterCount == 2 and working_bands == 3: src_band = 1 elif src_ds.RasterCount == 2 and working_bands == 4: if i < 3: src_band = 1 else: src_band = 2 elif src_ds.RasterCount == 1: src_band = 1 else: src_band = i + 1 data = src_ds.GetRasterBand(src_band).ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize) mem_ds.GetRasterBand(i + 1).WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, data) if tile_drv.ShortName == 'PNG': options = [] else: options = ['QUALITY=75'] tmp_ds = tile_drv.CreateCopy('/vsimem/tmp.' + tile_drv.ShortName, mem_ds, options=options) if clamp_output: mem_ds = gdal.GetDriverByName('MEM').Create('', src_ds.RasterXSize, src_ds.RasterYSize, working_bands) mem_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, tmp_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize)) expected_cs = [mem_ds.GetRasterBand(i + 1).Checksum() for i in range(working_bands)] else: tmp_ds.FlushCache() expected_cs = [tmp_ds.GetRasterBand(i + 1).Checksum() for i in range(working_bands)] mem_ds = None tmp_ds = None gdal.Unlink('/vsimem/tmp.' + tile_drv.ShortName) return expected_cs ############################################################################### # def check_tile_format(out_ds, expected_format, expected_band_count, expected_ct, row=0, col=0, zoom_level=None): if zoom_level is None: zoom_level_str = "(SELECT MAX(zoom_level) FROM tmp)" else: zoom_level_str = str(zoom_level) sql_lyr = out_ds.ExecuteSQL('SELECT GDAL_GetMimeType(tile_data), ' + 'GDAL_GetBandCount(tile_data), ' + 'GDAL_HasColorTable(tile_data) FROM tmp ' + 'WHERE zoom_level = %s AND tile_column = %d AND tile_row = %d' % (zoom_level_str, col, row)) feat = sql_lyr.GetNextFeature() if feat is not None: mime_type = feat.GetField(0) band_count = feat.GetField(1) has_ct = feat.GetField(2) else: mime_type = None band_count = None has_ct = None out_ds.ReleaseResultSet(sql_lyr) out_ds = None if expected_format is None: if mime_type is None: return pytest.fail() if expected_format == 'PNG': expected_mime_type = 'image/png' elif expected_format == 'JPEG': expected_mime_type = 'image/jpeg' elif expected_format == 'WEBP': expected_mime_type = 'image/x-webp' assert mime_type == expected_mime_type assert band_count == expected_band_count assert expected_ct == has_ct ############################################################################### # Single band, PNG def test_gpkg_1(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # With padding ds = gdal.Open('data/byte.tif') expected_cs = ds.GetRasterBand(1).Checksum() clamped_expected_cs = get_expected_checksums(ds, gdaltest.png_dr, 1, clamp_output=False)[0] expected_gt = ds.GetGeoTransform() expected_wkt = ds.GetProjectionRef() with gdaltest.config_option('CREATE_METADATA_TABLES', 'NO'): gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG']) ds = None assert validate('/vsimem/tmp.gpkg'), 'validation failed' out_ds = gdal.Open('/vsimem/tmp.gpkg') # Check there's no ogr_empty_table sql_lyr = out_ds.ExecuteSQL("SELECT COUNT(*) FROM sqlite_master WHERE name = 'ogr_empty_table'") f = sql_lyr.GetNextFeature() assert f.GetField(0) == 0 out_ds.ReleaseResultSet(sql_lyr) got_gt = out_ds.GetGeoTransform() for i in range(6): assert expected_gt[i] == pytest.approx(got_gt[i], abs=1e-8) got_wkt = out_ds.GetProjectionRef() assert expected_wkt == got_wkt expected_cs = [expected_cs, expected_cs, expected_cs, 4873] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 2, False) # Check that there's no extensions out_ds = gdal.Open('/vsimem/tmp.gpkg') sql_lyr = out_ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 out_ds.ReleaseResultSet(sql_lyr) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_spatial_ref_sys') assert sql_lyr.GetLayerDefn().GetFieldIndex('definition_12_063') < 0 out_ds.ReleaseResultSet(sql_lyr) out_ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=3']) expected_cs = expected_cs[0:3] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(out_ds.RasterCount)] assert got_cs == expected_cs out_ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) assert ds.RasterXSize == 256 and ds.RasterYSize == 256 expected_cs = [clamped_expected_cs, clamped_expected_cs, clamped_expected_cs, 4898] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None # Test USE_TILE_EXTENT=YES with empty table ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE) ds.ExecuteSQL('DELETE FROM tmp') ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER, open_options=['USE_TILE_EXTENT=YES']) assert ds is None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding ds = gdal.Open('data/byte.tif') expected_cs = ds.GetRasterBand(1).Checksum() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=20']) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') expected_cs = [expected_cs, expected_cs, expected_cs, 4873] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 1, False) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Single band, JPEG def test_gpkg_2(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.jpeg_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # With padding ds = gdal.Open('data/byte.tif') expected_cs = get_expected_checksums(ds, gdaltest.jpeg_dr, 1)[0] clamped_expected_cs = get_expected_checksums(ds, gdaltest.jpeg_dr, 3, clamp_output=False) clamped_expected_cs.append(17849) with gdaltest.config_option('CREATE_METADATA_TABLES', 'NO'): gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=JPEG']) out_ds = gdal.Open('/vsimem/tmp.gpkg') expected_cs = [expected_cs, expected_cs, expected_cs, 4873] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'JPEG', 1, False) # Check that there's no extensions out_ds = gdal.Open('/vsimem/tmp.gpkg') sql_lyr = out_ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 out_ds.ReleaseResultSet(sql_lyr) out_ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == clamped_expected_cs ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding ds = gdal.Open('data/byte.tif') expected_cs = get_expected_checksums(ds, gdaltest.jpeg_dr, 1, extend_src=False)[0] out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=JPEG', 'BLOCKSIZE=20']) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') expected_cs = [expected_cs, expected_cs, expected_cs, 4873] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'JPEG', 1, False) # Try deregistering JPEG driver gdaltest.jpeg_dr.Deregister() out_ds = gdal.Open('/vsimem/tmp.gpkg') # Should give warning at pixel reading time gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') out_ds.GetRasterBand(1).Checksum() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ds = gdal.Open('data/byte.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=JPEG']) gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') out_ds.FlushCache() gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' out_ds = None # Re-register driver gdaltest.jpeg_dr.Register() gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Single band, WEBP def test_gpkg_3(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.webp_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') ds = gdal.Open('data/byte.tif') expected_cs = get_expected_checksums(ds, gdaltest.webp_dr, 3) clamped_expected_cs = get_expected_checksums(ds, gdaltest.webp_dr, 3, clamp_output=False) if gdaltest.webp_supports_rgba: clamped_expected_cs.append(4898) else: clamped_expected_cs.append(17849) out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=WEBP']) out_ds = None assert validate('/vsimem/tmp.gpkg'), 'validation failed' out_ds = gdal.OpenEx('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs in (expected_cs, [4736, 4734, 4736]) # Check that extension is declared sql_lyr = out_ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'tmp' AND column_name = 'tile_data' AND extension_name = 'gpkg_webp'") assert sql_lyr.GetFeatureCount() == 1 out_ds.ReleaseResultSet(sql_lyr) if gdaltest.webp_supports_rgba: expected_band_count = 4 else: expected_band_count = 3 check_tile_format(out_ds, 'WEBP', expected_band_count, False) out_ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs in (clamped_expected_cs, [6850, 6848, 6850, 4898]) ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding ds = gdal.Open('data/byte.tif') expected_cs = get_expected_checksums(ds, gdaltest.webp_dr, 3, extend_src=False) out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=WEBP', 'BLOCKSIZE=20']) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') expected_cs.append(4873) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'WEBP', 3, False) # Try deregistering WEBP driver gdaltest.webp_dr.Deregister() # Should give warning at open time since the webp extension is declared gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') out_ds = gdal.Open('/vsimem/tmp.gpkg') gdal.PopErrorHandler() if gdal.GetLastErrorMsg() == '': gdaltest.webp_dr.Register() pytest.fail() # And at pixel reading time as well gdal.ErrorReset() gdal.PushErrorHandler('CPLQuietErrorHandler') out_ds.GetRasterBand(1).Checksum() gdal.PopErrorHandler() if gdal.GetLastErrorMsg() == '': gdaltest.webp_dr.Register() pytest.fail() out_ds = None # Re-register driver gdaltest.webp_dr.Register() gdal.Unlink('/vsimem/tmp.gpkg') # Check updating a non-WEBP dataset with TILE_FORMAT=WEBP out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1) out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) out_ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE, open_options=['TILE_FORMAT=WEBP']) sql_lyr = out_ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'tmp' AND column_name = 'tile_data' AND extension_name = 'gpkg_webp'") assert sql_lyr.GetFeatureCount() == 1 out_ds.ReleaseResultSet(sql_lyr) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Three band, PNG def test_gpkg_4(tile_drv_name='PNG'): if gdaltest.gpkg_dr is None: pytest.skip() if tile_drv_name == 'PNG': tile_drv = gdaltest.png_dr working_bands = 4 elif tile_drv_name == 'JPEG': tile_drv = gdaltest.jpeg_dr working_bands = 3 elif tile_drv_name == 'WEBP': tile_drv = gdaltest.webp_dr if gdaltest.webp_supports_rgba: working_bands = 4 else: working_bands = 3 if tile_drv is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') ds = gdal.Open('data/rgbsmall.tif') expected_cs = get_expected_checksums(ds, tile_drv, 3) clamped_expected_cs = get_expected_checksums(ds, tile_drv, 3, clamp_output=False) if working_bands == 3: clamped_expected_cs.append(17849) else: clamped_expected_cs.append(30638) out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=' + tile_drv_name]) ds = None out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') expected_cs.append(30658) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs in (expected_cs, [22290, 21651, 21551, 30658]) check_tile_format(out_ds, tile_drv_name, working_bands, False) out_ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs in (clamped_expected_cs, [56886, 43228, 56508, 30638]) ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding ds = gdal.Open('data/rgbsmall.tif') expected_cs = get_expected_checksums(ds, tile_drv, 3, extend_src=False) expected_cs.append(30658) out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=' + tile_drv_name, 'BLOCKSIZE=50']) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, tile_drv_name, 3, False) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Three band, JPEG def test_gpkg_5(): return test_gpkg_4(tile_drv_name='JPEG') ############################################################################### # Three band, WEBP def test_gpkg_6(): return test_gpkg_4(tile_drv_name='WEBP') ############################################################################### # 4 band, PNG def get_georeferenced_rgba_ds(alpha_fully_transparent=False, alpha_fully_opaque=False): assert not (alpha_fully_transparent and alpha_fully_opaque) src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tmp.tif', src_ds.RasterXSize, src_ds.RasterYSize, 4) tmp_ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) tmp_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize)) if alpha_fully_opaque: tmp_ds.GetRasterBand(4).Fill(255) elif alpha_fully_transparent: tmp_ds.GetRasterBand(4).Fill(0) return tmp_ds def test_gpkg_7(tile_drv_name='PNG'): if gdaltest.gpkg_dr is None: pytest.skip() if tile_drv_name == 'PNG': tile_drv = gdaltest.png_dr working_bands = 4 elif tile_drv_name == 'JPEG': tile_drv = gdaltest.jpeg_dr working_bands = 3 elif tile_drv_name == 'WEBP': tile_drv = gdaltest.webp_dr if gdaltest.webp_supports_rgba: working_bands = 4 else: working_bands = 3 if tile_drv is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = get_georeferenced_rgba_ds() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILE_FORMAT=' + tile_drv_name]) out_ds = None expected_cs = get_expected_checksums(src_ds, tile_drv, working_bands) src_filename = src_ds.GetDescription() src_ds = None gdal.Unlink(src_filename) out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(working_bands)] assert got_cs == expected_cs check_tile_format(out_ds, tile_drv_name, working_bands, False) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding with alpha fully opaque tmp_ds = get_georeferenced_rgba_ds(alpha_fully_opaque=True) expected_cs = get_expected_checksums(tmp_ds, tile_drv, 3, extend_src=False) tmp_filename = tmp_ds.GetDescription() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', tmp_ds, options=['TILE_FORMAT=' + tile_drv_name, 'BLOCKXSIZE=%d' % tmp_ds.RasterXSize, 'BLOCKYSIZE=%d' % tmp_ds.RasterYSize]) out_ds = None tmp_ds = None gdal.Unlink(tmp_filename) out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs check_tile_format(out_ds, tile_drv_name, 3, False) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding with alpha fully transparent tmp_ds = get_georeferenced_rgba_ds(alpha_fully_transparent=True) tmp_filename = tmp_ds.GetDescription() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', tmp_ds, options=['TILE_FORMAT=' + tile_drv_name, 'BLOCKXSIZE=%d' % tmp_ds.RasterXSize, 'BLOCKYSIZE=%d' % tmp_ds.RasterYSize]) out_ds = None tmp_ds = None gdal.Unlink(tmp_filename) out_ds = gdal.Open('/vsimem/tmp.gpkg') expected_cs = [0, 0, 0, 0] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, None, None, None) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # 4 band, JPEG def test_gpkg_8(): return test_gpkg_7(tile_drv_name='JPEG') ############################################################################### # 4 band, WEBP def test_gpkg_9(): return test_gpkg_7(tile_drv_name='WEBP') ############################################################################### # def get_georeferenced_ds_with_pct32(): src_ds = gdal.Open('../gcore/data/stefan_full_rgba_pct32.png') tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tmp.tif', src_ds.RasterXSize, src_ds.RasterYSize) tmp_ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) tmp_ds.GetRasterBand(1).SetColorTable(src_ds.GetRasterBand(1).GetColorTable()) tmp_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize)) return tmp_ds ############################################################################### # Single band with 32 bit color table, PNG def test_gpkg_10(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') tmp_ds = get_georeferenced_ds_with_pct32() expected_ct = tmp_ds.GetRasterBand(1).GetColorTable().Clone() expected_cs_single_band = tmp_ds.GetRasterBand(1).Checksum() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', tmp_ds, options=['BLOCKXSIZE=%d' % tmp_ds.RasterXSize, 'BLOCKYSIZE=%d' % tmp_ds.RasterYSize]) out_ds = None tmp_filename = tmp_ds.GetDescription() tmp_ds = None gdal.Unlink(tmp_filename) expected_cs = [10991, 57677, 34965, 10638] out_ds = gdal.Open('/vsimem/tmp.gpkg') block_size = out_ds.GetRasterBand(1).GetBlockSize() assert block_size == [out_ds.RasterXSize, out_ds.RasterYSize] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 1, True) got_ct = out_ds.GetRasterBand(1).GetColorTable() assert got_ct is None # SetColorTable() on a non single-band dataset gdal.ErrorReset() gdal.PushErrorHandler() out_ds.GetRasterBand(1).SetColorTable(None) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' out_ds = None expected_cs = [expected_cs_single_band] out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=1']) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(out_ds.RasterCount)] assert got_cs == expected_cs got_ct = out_ds.GetRasterBand(1).GetColorTable() assert expected_ct.GetCount() == got_ct.GetCount() # SetColorTable() on a re-opened dataset gdal.ErrorReset() gdal.PushErrorHandler() out_ds.GetRasterBand(1).SetColorTable(None) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Repeated SetColorTable() out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1) out_ds.GetRasterBand(1).SetColorTable(None) gdal.ErrorReset() gdal.PushErrorHandler() out_ds.GetRasterBand(1).SetColorTable(None) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' gdal.PushErrorHandler() out_ds = None gdal.PopErrorHandler() gdal.Unlink('/vsimem/tmp.gpkg') # Partial tile tmp_ds = get_georeferenced_ds_with_pct32() expected_ct = tmp_ds.GetRasterBand(1).GetColorTable().Clone() expected_cs_single_band = tmp_ds.GetRasterBand(1).Checksum() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', tmp_ds) out_ds = None tmp_filename = tmp_ds.GetDescription() tmp_ds = None gdal.Unlink(tmp_filename) expected_cs = [10991, 57677, 34965, 10638] out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 4, False) got_ct = out_ds.GetRasterBand(1).GetColorTable() assert got_ct is None ############################################################################### # Single band with 32 bit color table, JPEG def test_gpkg_11(tile_drv_name='JPEG'): if gdaltest.gpkg_dr is None: pytest.skip() if tile_drv_name == 'JPEG': tile_drv = gdaltest.jpeg_dr working_bands = 3 elif tile_drv_name == 'WEBP': tile_drv = gdaltest.webp_dr if gdaltest.webp_supports_rgba: working_bands = 4 else: working_bands = 3 if tile_drv is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') rgba_xml = '' for i in range(4): rgba_xml += """ ../gcore/data/stefan_full_rgba_pct32.png 1 %d """ % (i + 1, i + 1) rgba_xml += '' rgba_ds = gdal.Open(rgba_xml) tmp_ds = get_georeferenced_ds_with_pct32() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', tmp_ds, options=['TILE_FORMAT=' + tile_drv_name]) out_ds = None tmp_filename = tmp_ds.GetDescription() tmp_ds = None gdal.Unlink(tmp_filename) expected_cs = get_expected_checksums(rgba_ds, tile_drv, working_bands) rgba_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(working_bands)] assert got_cs == expected_cs out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Single band with 32 bit color table, WEBP def test_gpkg_12(): return test_gpkg_11(tile_drv_name='WEBP') ############################################################################### # Single band with 24 bit color table, PNG def test_gpkg_13(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = gdal.Open('data/small_world_pct.tif') expected_ct = src_ds.GetRasterBand(1).GetColorTable().Clone() expected_cs_single_band = src_ds.GetRasterBand(1).Checksum() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['BLOCKXSIZE=%d' % src_ds.RasterXSize, 'BLOCKYSIZE=%d' % src_ds.RasterYSize]) out_ds = None src_ds = None expected_cs = [63025, 48175, 12204] out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs got_ct = out_ds.GetRasterBand(1).GetColorTable() assert got_ct is None out_ds = None expected_cs = [expected_cs_single_band] out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=1']) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(out_ds.RasterCount)] assert got_cs == expected_cs got_ct = out_ds.GetRasterBand(1).GetColorTable() assert expected_ct.GetCount() == got_ct.GetCount() out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Partial tile src_ds = gdal.Open('data/small_world_pct.tif') expected_ct = src_ds.GetRasterBand(1).GetColorTable().Clone() expected_cs_single_band = src_ds.GetRasterBand(1).Checksum() out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds) out_ds = None src_ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) assert ds.RasterXSize == 512 and ds.RasterYSize == 256 expected_cs = [62358, 45823, 12238, 64301] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test creation and opening options def test_gpkg_14(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = gdal.Open('data/small_world.tif') ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILE_FORMAT=PNG', 'RASTER_TABLE=foo', 'RASTER_IDENTIFIER=bar', 'RASTER_DESCRIPTION=baz']) ds = None gdal.PushErrorHandler() ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['TABLE=non_existing']) gdal.PopErrorHandler() assert ds is None ds = gdal.Open('/vsimem/tmp.gpkg') sql_lyr = ds.ExecuteSQL("SELECT * FROM gpkg_contents WHERE table_name='foo'") feat_count = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert feat_count == 1 assert ds.GetMetadataItem('IDENTIFIER') == 'bar', ds.GetMetadata() assert ds.GetMetadataItem('DESCRIPTION') == 'baz', ds.GetMetadata() assert ds.GetMetadataItem('ZOOM_LEVEL') == '1', ds.GetMetadata() assert ds.GetRasterBand(1).GetOverviewCount() == 0 assert ds.GetRasterBand(1).GetOverview(0) is None ds = None # In update mode, we expose even empty overview levels ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert ds.GetMetadataItem('ZOOM_LEVEL') == '1', ds.GetMetadata() assert ds.GetRasterBand(1).GetOverviewCount() == 1 assert ds.GetRasterBand(1).GetOverview(0) is not None assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 0 ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['ZOOM_LEVEL=2']) assert ds.RasterXSize == 400 ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['ZOOM_LEVEL=1']) assert ds.RasterXSize == 400 assert ds.GetRasterBand(1).GetOverviewCount() == 0 ds = None # In update mode, we expose even empty overview levels ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE, open_options=['ZOOM_LEVEL=1']) assert ds.RasterXSize == 400 assert ds.GetRasterBand(1).GetOverviewCount() == 1 ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['ZOOM_LEVEL=0']) assert ds.RasterXSize == 200 assert ds.GetRasterBand(1).Checksum() == 0 ds = None gdal.Translate('/vsimem/tmp2.gpkg', 'data/byte.tif', format='GPKG') ds = gdal.OpenEx('/vsimem/tmp2.gpkg', gdal.OF_UPDATE) ds.ExecuteSQL('UPDATE gpkg_contents SET min_x = NULL') ds = None with gdaltest.error_handler(): ds = gdal.OpenEx('/vsimem/tmp2.gpkg', open_options=['ZOOM_LEVEL=-1']) assert ds is None gdal.Unlink('/vsimem/tmp2.gpkg') ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) assert ds.RasterXSize == 512 and ds.RasterYSize == 256 expected_cs = [27644, 31968, 38564, 64301] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None # Open with exactly one tile shift ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE, open_options=['TILE_FORMAT=PNG', 'MINX=-410.4', 'MAXY=320.4']) assert ds.RasterXSize == 400 + 256 and ds.RasterYSize == 200 + 256 expected_cs = [29070, 32796, 41086, 64288] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) for i in range(ds.RasterCount): ds.GetRasterBand(i + 1).Fill(0) ds.FlushCache() sql_lyr = ds.ExecuteSQL('SELECT * FROM foo') fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 0 ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, data) ds = None # Partial tile shift (enclosing tiles) ds = gdal.OpenEx('GPKG:/vsimem/tmp.gpkg:foo', gdal.OF_UPDATE, open_options=['MINX=-270', 'MAXY=180', 'MINY=-180', 'MAXX=270']) assert ds.RasterXSize == 600 and ds.RasterYSize == 400 expected_cs = [28940, 32454, 40526, 64323] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs # Force full rewrite data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) # Do a clean just to be sure for i in range(ds.RasterCount): ds.GetRasterBand(i + 1).Fill(0) ds.FlushCache() sql_lyr = ds.ExecuteSQL('SELECT * FROM foo') fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 0 ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, data) ds = None ds = gdal.OpenEx('GPKG:/vsimem/tmp.gpkg:foo', gdal.OF_UPDATE, open_options=['MINX=-270', 'MAXY=180', 'MINY=-180', 'MAXX=270']) expected_cs = [28940, 32454, 40526, 64323] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs # Partial rewrite data = ds.GetRasterBand(1).ReadRaster(0, 0, 256, 256) ds.GetRasterBand(1).WriteRaster(0, 0, 256, 256, data) ds = None ds = gdal.OpenEx('GPKG:/vsimem/tmp.gpkg:foo', open_options=['MINX=-270', 'MAXY=180', 'MINY=-180', 'MAXX=270']) expected_cs = [28940, 32454, 40526, 64323] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None # Partial tile shift (included in tiles) ds = gdal.OpenEx('GPKG:/vsimem/tmp.gpkg:foo', gdal.OF_UPDATE, open_options=['MINX=-90', 'MAXY=45', 'MINY=-45', 'MAXX=90']) assert ds.RasterXSize == 200 and ds.RasterYSize == 100 expected_cs = [9586, 9360, 26758, 48827] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs # Force full rewrite data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) ds.WriteRaster(0, 0, ds.RasterXSize, ds.RasterYSize, data) ds = None ds = gdal.OpenEx('GPKG:/vsimem/tmp.gpkg:foo', open_options=['MINX=-90', 'MAXY=45', 'MINY=-45', 'MAXX=90']) assert ds.RasterXSize == 200 and ds.RasterYSize == 100 expected_cs = [9586, 9360, 26758, 48827] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['APPEND_SUBDATASET=YES', 'RASTER_TABLE=other', 'BLOCKSIZE=64', 'TILE_FORMAT=PNG']) ds = None another_src_ds = gdal.Open('data/byte.tif') ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', another_src_ds, options=['APPEND_SUBDATASET=YES']) ds = None another_src_ds = None ds = gdal.Open('/vsimem/tmp.gpkg') md = ds.GetMetadata('SUBDATASETS') assert md['SUBDATASET_1_NAME'] == 'GPKG:/vsimem/tmp.gpkg:foo' assert md['SUBDATASET_1_DESC'] == 'foo - bar' assert md['SUBDATASET_2_NAME'] == 'GPKG:/vsimem/tmp.gpkg:other' assert md['SUBDATASET_2_DESC'] == 'other - other' assert md['SUBDATASET_3_NAME'] == 'GPKG:/vsimem/tmp.gpkg:byte' assert md['SUBDATASET_3_DESC'] == 'byte - byte' ds = None ds = gdal.Open('GPKG:/vsimem/tmp.gpkg:other') block_size = ds.GetRasterBand(1).GetBlockSize() assert block_size == [64, 64] ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['TABLE=other', 'MINX=-90', 'MAXY=45', 'MINY=-45', 'MAXX=90']) assert ds.RasterXSize == 200 and ds.RasterYSize == 100 block_size = ds.GetRasterBand(1).GetBlockSize() assert block_size == [64, 64] expected_cs = [9586, 9360, 26758, 48827] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Open and fill with an area of interest larger/containing the natural extent ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 20, 20, 1, options=['BLOCKSIZE=20']) ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE, open_options=['MINX=-5', 'MAXY=5', 'MAXX=25', 'MINY=-25', 'BAND_COUNT=1']) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['MINX=-10', 'MAXY=10', 'MINY=-30', 'MAXX=30']) expected_cs = [4934, 4934, 4934, 4934] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Open and fill with an area of interest smaller/inside the natural extent # (and smaller than the block size actually) ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 20, 20, 1, options=['BLOCKSIZE=20']) ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE, open_options=['MINX=5', 'MAXY=-5', 'MAXX=15', 'MINY=-15', 'BAND_COUNT=1']) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['MINX=-10', 'MAXY=10', 'MINY=-30', 'MAXX=30']) expected_cs = [1223, 1223, 1223, 1223] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Other corner case : the block intersects a tile at the right of the raster # size (because the raster size is smaller than the block size) ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 400, 200, 1) ds.SetGeoTransform([-180, 0.9, 0, 90, 0, -0.9]) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE, open_options=['MINX=-5', 'MAXY=5', 'MAXX=25', 'MINY=-25', 'BAND_COUNT=1']) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg') expected_cs = [13365, 13365, 13365, 13365] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Test reading block from partial tile database ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 512, 256, 4) ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE, open_options=['MINX=-5', 'MAXY=5', 'TILE_FORMAT=PNG']) mem_ds = gdal.GetDriverByName('MEM').Create('', 256, 256) mem_ds.GetRasterBand(1).Fill(255) mem_ds.FlushCache() data = mem_ds.GetRasterBand(1).ReadRaster() mem_ds = None # Only write one of the tile ds.GetRasterBand(2).WriteRaster(0, 0, 256, 256, data) # "Flush" into partial tile database, but not in definitive database oldSize = gdal.GetCacheMax() gdal.SetCacheMax(0) gdal.SetCacheMax(oldSize) sql_lyr = ds.ExecuteSQL('SELECT * FROM tmp') fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 0 expected_cs = [0, 56451, 0, 0] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] if got_cs != expected_cs: ds.GetRasterBand(4).Fill(255) # sys.exit(0) pytest.fail('Got %s, expected %s' % (str(got_cs), str(expected_cs))) ds = None # Overflow occurred in ComputeTileAndPixelShifts() with gdaltest.error_handler(): ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['MINX=-1e12', 'MAXX=-0.9999e12']) assert ds is None # Overflow occurred in ComputeTileAndPixelShifts() with gdaltest.error_handler(): ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['MINY=-1e12', 'MAXY=-0.9999e12']) assert ds is None # Overflow occurred in ComputeTileAndPixelShifts() gdal.Translate('/vsimem/tmp.gpkg', 'data/byte.tif', format='GPKG') ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_UPDATE) ds.ExecuteSQL('UPDATE gpkg_contents SET min_x=-1000000002000, max_x=-1000000000000') ds = None with gdaltest.error_handler(): ds = gdal.Open('/vsimem/tmp.gpkg') assert ds is None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test error cases def test_gpkg_15(): if gdaltest.gpkg_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # SetGeoTransform() and SetProjection() on a non-raster GPKG out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 0, 0, 0) assert out_ds.GetGeoTransform(can_return_null=True) is None assert out_ds.GetProjectionRef() == '' gdal.PushErrorHandler() ret = out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) gdal.PopErrorHandler() assert ret != 0 srs = osr.SpatialReference() srs.ImportFromEPSG(4326) gdal.PushErrorHandler() ret = out_ds.SetProjection(srs.ExportToWkt()) gdal.PopErrorHandler() assert ret != 0 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Repeated SetGeoTransform() out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1) ret = out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) assert ret == 0 gdal.PushErrorHandler() ret = out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) gdal.PopErrorHandler() assert ret != 0 out_ds = None # Repeated SetProjection() out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetProjectionRef() == '' srs = osr.SpatialReference() srs.ImportFromEPSG(4326) ret = out_ds.SetProjection(srs.ExportToWkt()) assert ret == 0 assert out_ds.GetProjectionRef().find('4326') >= 0 out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetProjectionRef().find('4326') >= 0 out_ds.SetProjection('') out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') assert out_ds.GetProjectionRef() == '' # Test setting on read-only dataset gdal.PushErrorHandler() ret = out_ds.SetProjection('') gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ret = out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) gdal.PopErrorHandler() assert ret != 0 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Test SetColorInterpretation() out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1) out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_Undefined) assert ret == 0 ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_GrayIndex) assert ret == 0 ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_PaletteIndex) assert ret == 0 gdal.PushErrorHandler() ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_RedBand) gdal.PopErrorHandler() assert ret != 0 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1, 3) out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_RedBand) assert ret == 0 gdal.PushErrorHandler() ret = out_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_RedBand) gdal.PopErrorHandler() assert ret != 0 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1, 2) out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_GrayIndex) assert ret == 0 gdal.PushErrorHandler() ret = out_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_RedBand) gdal.PopErrorHandler() assert ret != 0 ret = out_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_AlphaBand) assert ret == 0 gdal.PushErrorHandler() ret = out_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_RedBand) gdal.PopErrorHandler() assert ret != 0 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test block/tile caching def test_gpkg_16(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.jpeg_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1, 3, options=['TILE_FORMAT=JPEG']) out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) out_ds.GetRasterBand(1).Fill(255) out_ds.GetRasterBand(1).FlushCache() # Rewrite same tile after re-reading it # Will cause a debug message to be emitted out_ds.GetRasterBand(2).Fill(127) out_ds.GetRasterBand(3).Checksum() out_ds.GetRasterBand(2).FlushCache() out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') val1 = ord(out_ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1)) val2 = ord(out_ds.GetRasterBand(2).ReadRaster(0, 0, 1, 1)) val3 = ord(out_ds.GetRasterBand(3).ReadRaster(0, 0, 1, 1)) out_ds = None assert val1 == pytest.approx(255, abs=1) assert val2 == pytest.approx(127, abs=1) assert val3 == pytest.approx(0, abs=1) gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test overviews with single band dataset def test_gpkg_17(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, immediately after create copy ds = gdal.Open('data/byte.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=10']) out_ds.BuildOverviews('NEAR', [2]) out_ds = None ds = None assert validate('/vsimem/tmp.gpkg'), 'validation failed' out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = out_ds.GetRasterBand(1).GetOverview(0).Checksum() assert got_cs == 1087 check_tile_format(out_ds, 'PNG', 1, False, zoom_level=0) assert out_ds.GetRasterBand(1).GetOverview(0).GetColorTable() is None out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, after reopening, and BAND_COUNT = 1 ds = gdal.Open('data/byte.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=10']) out_ds = None # FIXME? Should we eventually write the driver somewhere in metadata ? out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE, open_options=['TILE_FORMAT=PNG', 'BAND_COUNT=1']) out_ds.BuildOverviews('NEAR', [2]) out_ds = None ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = out_ds.GetRasterBand(1).GetOverview(0).Checksum() assert got_cs == 1087 check_tile_format(out_ds, 'PNG', 1, False, zoom_level=0) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, after reopening ds = gdal.Open('data/byte.tif') with gdaltest.config_option('CREATE_METADATA_TABLES', 'NO'): gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=10']) # FIXME? Should we eventually write the driver somewhere in metadata ? out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE, open_options=['TILE_FORMAT=PNG']) out_ds.BuildOverviews('NEAR', [2]) out_ds = None ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = out_ds.GetRasterBand(1).GetOverview(0).Checksum() assert got_cs == 1087 check_tile_format(out_ds, 'PNG', 3, False, zoom_level=0) # Check that there's no extensions out_ds = gdal.Open('/vsimem/tmp.gpkg') sql_lyr = out_ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 out_ds.ReleaseResultSet(sql_lyr) out_ds = None # Test clearing overviews out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) out_ds.BuildOverviews('NONE', []) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') assert out_ds.GetRasterBand(1).GetOverviewCount() == 0 out_ds = None # Test building on an overview dataset --> error out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) gdal.PushErrorHandler() ret = out_ds.GetRasterBand(1).GetOverview(0).GetDataset().BuildOverviews('NONE', []) gdal.PopErrorHandler() assert ret != 0 out_ds = None # Test building overview factor 1 --> error out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) gdal.PushErrorHandler() ret = out_ds.BuildOverviews('NEAR', [1]) gdal.PopErrorHandler() assert ret != 0 out_ds = None # Test building non-supported overview levels out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) gdal.PushErrorHandler() gdal.SetConfigOption('ALLOW_GPKG_ZOOM_OTHER_EXTENSION', 'NO') ret = out_ds.BuildOverviews('NEAR', [3]) gdal.SetConfigOption('ALLOW_GPKG_ZOOM_OTHER_EXTENSION', None) gdal.PopErrorHandler() assert ret != 0 out_ds = None # Test building non-supported overview levels out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) gdal.PushErrorHandler() gdal.SetConfigOption('ALLOW_GPKG_ZOOM_OTHER_EXTENSION', 'NO') ret = out_ds.BuildOverviews('NEAR', [2, 4]) gdal.SetConfigOption('ALLOW_GPKG_ZOOM_OTHER_EXTENSION', None) gdal.PopErrorHandler() assert ret != 0 out_ds = None # Test gpkg_zoom_other extension out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) # Will fail because results in a 6x6 overview gdal.PushErrorHandler() ret = out_ds.BuildOverviews('NEAR', [3]) gdal.PopErrorHandler() assert ret != 0 out_ds = None # Test building overviews on read-only dataset out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER) gdal.PushErrorHandler() ret = out_ds.BuildOverviews('NEAR', [2]) gdal.PopErrorHandler() assert ret != 0 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test overviews with 3 band dataset def test_gpkg_18(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, immediately after create copy ds = gdal.Open('data/small_world.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKXSIZE=100', 'BLOCKYSIZE=100']) out_ds.BuildOverviews('CUBIC', [2, 4]) out_ds = None tmp_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tmp.tif', ds) tmp_ds.BuildOverviews('CUBIC', [2, 4]) expected_cs_ov0 = [tmp_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(3)] expected_cs_ov1 = [tmp_ds.GetRasterBand(i + 1).GetOverview(1).Checksum() for i in range(3)] # tmp_ds.BuildOverviews('NEAR', [3]) # expected_cs_ov_factor3 = [tmp_ds.GetRasterBand(i+1).GetOverview(2).Checksum() for i in range(3)] tmp_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tmp.tif') ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(3)] assert got_cs == expected_cs_ov0 got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(1).Checksum() for i in range(3)] assert got_cs == expected_cs_ov1 check_tile_format(out_ds, 'PNG', 3, False, zoom_level=1) check_tile_format(out_ds, 'PNG', 4, False, zoom_level=0) out_ds = None # Test gpkg_zoom_other extension out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) # We expect a warning gdal.PushErrorHandler() ret = out_ds.BuildOverviews('NEAR', [3]) gdal.PopErrorHandler() assert ret == 0 assert out_ds.GetRasterBand(1).GetOverviewCount() == 3 got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(3)] assert got_cs == expected_cs_ov0 expected_cs = [24807, 25544, 34002] got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(1).Checksum() for i in range(3)] assert got_cs == expected_cs got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(2).Checksum() for i in range(3)] assert got_cs == expected_cs_ov1 # Check that extension is declared sql_lyr = out_ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE table_name = 'tmp' AND extension_name = 'gpkg_zoom_other'") assert sql_lyr.GetFeatureCount() == 1 out_ds.ReleaseResultSet(sql_lyr) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') assert out_ds.GetRasterBand(1).GetOverviewCount() == 3 got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(3)] assert got_cs == expected_cs_ov0 expected_cs = [24807, 25544, 34002] got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(1).Checksum() for i in range(3)] assert got_cs == expected_cs got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(2).Checksum() for i in range(3)] assert got_cs == expected_cs_ov1 out_ds = None # Add terminating overview out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER | gdal.OF_UPDATE) ret = out_ds.BuildOverviews('NEAR', [8]) assert ret == 0 expected_cs = [12725, 12539, 13553] got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(3).Checksum() for i in range(3)] assert got_cs == expected_cs out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, immediately after create copy ds = gdal.Open('data/small_world.tif') with gdaltest.config_option('CREATE_METADATA_TABLES', 'NO'): out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKXSIZE=100', 'BLOCKYSIZE=100']) # Should not result in gpkg_zoom_other ret = out_ds.BuildOverviews('NEAR', [8]) assert ret == 0 out_ds = None # Check that there's no extensions out_ds = gdal.Open('/vsimem/tmp.gpkg') sql_lyr = out_ds.ExecuteSQL("SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'gpkg_extensions'") assert sql_lyr.GetFeatureCount() == 0 out_ds.ReleaseResultSet(sql_lyr) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test overviews with 24-bit color palette single band dataset def test_gpkg_19(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, immediately after create copy ds = gdal.Open('data/small_world_pct.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG', 'BLOCKXSIZE=100', 'BLOCKYSIZE=100']) out_ds.BuildOverviews('NEAR', [2, 4]) out_ds = None tmp_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/tmp.tif', ds) tmp_ds.BuildOverviews('NEAR', [2, 4]) expected_cs_ov0 = [tmp_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(1)] expected_cs_ov1 = [tmp_ds.GetRasterBand(i + 1).GetOverview(1).Checksum() for i in range(1)] tmp_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/tmp.tif') ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER, open_options=['BAND_COUNT=1']) assert out_ds.GetRasterBand(1).GetOverview(0).GetColorTable() is not None got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(1)] assert got_cs == expected_cs_ov0 got_cs = [out_ds.GetRasterBand(i + 1).GetOverview(1).Checksum() for i in range(1)] assert got_cs == expected_cs_ov1 check_tile_format(out_ds, 'PNG', 1, True, zoom_level=1) check_tile_format(out_ds, 'PNG', 4, False, zoom_level=0) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test PNG8 def test_gpkg_20(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, with small tiles (<=256x256) ds = gdal.Open('data/small_world.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG8', 'BLOCKSIZE=200']) out_ds = None ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [30875, 31451, 38110, 64269] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 1, True) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, with big tiles (>256x256) ds = gdal.Open('data/small_world.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG8', 'BLOCKXSIZE=400', 'BLOCKYSIZE=200']) out_ds = None ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [27001, 30168, 34800, 64269] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 1, True) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # With and without padding, with small tiles ds = gdal.Open('data/small_world.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG8', 'BLOCKSIZE=150']) out_ds = None ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [27718, 31528, 42062, 64269] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 1, True) check_tile_format(out_ds, 'PNG', 4, False, row=0, col=2) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Without padding, with small tiles (<=256x256), but especially less # than 256 colors. ds = gdal.GetDriverByName('MEM').Create('', 50, 50, 3) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(2).Fill(2) ds.GetRasterBand(3).Fill(3) ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', ds, options=['TILE_FORMAT=PNG8', 'BLOCKSIZE=50']) out_ds = None ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [2500, 5000, 7500, 30658] assert got_cs == expected_cs check_tile_format(out_ds, 'PNG', 1, True) out_ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', gdal.OF_RASTER, open_options=['BAND_COUNT=1']) assert out_ds.GetRasterBand(1).GetColorTable().GetCount() == 1 out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Test metadata def test_gpkg_21(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1) out_ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) mddlist = out_ds.GetMetadataDomainList() assert len(mddlist) == 3 out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) # No metadata for now sql_lyr = out_ds.ExecuteSQL("SELECT 1 FROM sqlite_master WHERE name = 'gpkg_metadata'") feat = sql_lyr.GetNextFeature() out_ds.ReleaseResultSet(sql_lyr) feat_is_none = feat is None assert feat_is_none # Set a metadata item now out_ds.SetMetadataItem('foo', 'bar') out_ds = None foo_value = 'bar' for i in range(4): out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert not out_ds.GetMetadata('GEOPACKAGE') if out_ds.GetMetadataItem('foo') != foo_value: feat.DumpReadable() pytest.fail(out_ds.GetMetadataItem('foo')) md = out_ds.GetMetadata() if len(md) != 3 or md['foo'] != foo_value or \ md['IDENTIFIER'] != 'tmp' or md['ZOOM_LEVEL'] != '0': feat.DumpReadable() pytest.fail(md) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata') feat = sql_lyr.GetNextFeature() if feat.GetField('id') != 1 or feat.GetField('md_scope') != 'dataset' or \ feat.GetField('md_standard_uri') != 'http://gdal.org' or \ feat.GetField('mime_type') != 'text/xml' or \ feat.GetField('metadata') != """ %s """ % foo_value: feat.DumpReadable() pytest.fail(i) out_ds.ReleaseResultSet(sql_lyr) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata_reference') feat = sql_lyr.GetNextFeature() if feat.GetField('reference_scope') != 'table' or \ feat.GetField('table_name') != 'tmp' or \ not feat.IsFieldNull('column_name') or \ not feat.IsFieldNull('row_id_value') or \ not feat.IsFieldSet('timestamp') or \ feat.GetField('md_file_id') != 1 or \ not feat.IsFieldNull('md_parent_id'): feat.DumpReadable() pytest.fail(i) out_ds.ReleaseResultSet(sql_lyr) if i == 1: out_ds.SetMetadataItem('foo', 'bar') elif i == 2: out_ds.SetMetadataItem('foo', 'baz') foo_value = 'baz' out_ds = None # Clear metadata out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) out_ds.SetMetadata(None) out_ds = None # No more metadata out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata') feat = sql_lyr.GetNextFeature() if feat is not None: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata_reference') feat = sql_lyr.GetNextFeature() if feat is not None: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) out_ds.SetMetadataItem('IDENTIFIER', 'my_identifier') out_ds.SetMetadataItem('DESCRIPTION', 'my_description') out_ds = None # Still no metadata out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetMetadataItem('IDENTIFIER') == 'my_identifier' assert out_ds.GetMetadataItem('DESCRIPTION') == 'my_description' sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata') feat = sql_lyr.GetNextFeature() if feat is not None: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata_reference') feat = sql_lyr.GetNextFeature() if feat is not None: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) # Write metadata in global scope out_ds.SetMetadata({'bar': 'foo'}, 'GEOPACKAGE') out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetMetadataItem('bar', 'GEOPACKAGE') == 'foo' sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata') feat = sql_lyr.GetNextFeature() if feat.GetField('id') != 1 or feat.GetField('md_scope') != 'dataset' or \ feat.GetField('md_standard_uri') != 'http://gdal.org' or \ feat.GetField('mime_type') != 'text/xml' or \ feat.GetField('metadata') != """ foo """: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata_reference') feat = sql_lyr.GetNextFeature() if feat.GetField('reference_scope') != 'geopackage' or \ not feat.IsFieldNull('table_name') or \ not feat.IsFieldNull('column_name') or \ not feat.IsFieldNull('row_id_value') or \ not feat.IsFieldSet('timestamp') or \ feat.GetField('md_file_id') != 1 or \ not feat.IsFieldNull('md_parent_id'): feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) out_ds.SetMetadataItem('bar', 'baz', 'GEOPACKAGE') out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetMetadataItem('bar', 'GEOPACKAGE') == 'baz' out_ds.SetMetadata(None, 'GEOPACKAGE') out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert not out_ds.GetMetadata('GEOPACKAGE') out_ds.SetMetadataItem('1', '2') out_ds.SetMetadataItem('3', '4', 'CUSTOM_DOMAIN') out_ds.SetMetadataItem('6', '7', 'GEOPACKAGE') # Non GDAL metdata out_ds.ExecuteSQL("INSERT INTO gpkg_metadata VALUES (10, 'dataset', 'uri', 'text/plain', 'my_metadata')") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata_reference VALUES ('geopackage',NULL,NULL,NULL,'2012-08-17T14:49:32.932Z',10,NULL)") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata VALUES (11, 'dataset', 'uri', 'text/plain', 'other_metadata')") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata_reference VALUES ('geopackage',NULL,NULL,NULL,'2012-08-17T14:49:32.932Z',11,NULL)") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata VALUES (12, 'dataset', 'uri', 'text/plain', 'my_metadata_local')") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata_reference VALUES ('table','tmp',NULL,NULL,'2012-08-17T14:49:32.932Z',12,NULL)") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata VALUES (13, 'dataset', 'uri', 'text/plain', 'other_metadata_local')") out_ds.ExecuteSQL("INSERT INTO gpkg_metadata_reference VALUES ('table','tmp',NULL,NULL,'2012-08-17T14:49:32.932Z',13,NULL)") out_ds = None for i in range(2): out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetMetadataItem('1') == '2' assert out_ds.GetMetadataItem('GPKG_METADATA_ITEM_1') == 'my_metadata_local', \ out_ds.GetMetadata() assert out_ds.GetMetadataItem('GPKG_METADATA_ITEM_2') == 'other_metadata_local', \ out_ds.GetMetadata() assert out_ds.GetMetadataItem('GPKG_METADATA_ITEM_1', 'GEOPACKAGE') == 'my_metadata', \ out_ds.GetMetadata('GEOPACKAGE') assert out_ds.GetMetadataItem('GPKG_METADATA_ITEM_2', 'GEOPACKAGE') == 'other_metadata', \ out_ds.GetMetadata('GEOPACKAGE') assert out_ds.GetMetadataItem('3', 'CUSTOM_DOMAIN') == '4' assert out_ds.GetMetadataItem('6', 'GEOPACKAGE') == '7' out_ds.SetMetadata(out_ds.GetMetadata()) out_ds.SetMetadata(out_ds.GetMetadata('GEOPACKAGE'), 'GEOPACKAGE') out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) out_ds.SetMetadata(None) out_ds.SetMetadata(None, 'CUSTOM_DOMAIN') out_ds.SetMetadata(None, 'GEOPACKAGE') out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) assert out_ds.GetMetadataItem('GPKG_METADATA_ITEM_1', 'GEOPACKAGE') == 'my_metadata', \ out_ds.GetMetadata() sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata WHERE id < 10') feat = sql_lyr.GetNextFeature() if feat is not None: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) sql_lyr = out_ds.ExecuteSQL('SELECT * FROM gpkg_metadata_reference WHERE md_file_id < 10') feat = sql_lyr.GetNextFeature() if feat is not None: feat.DumpReadable() out_ds.ReleaseResultSet(sql_lyr) pytest.fail() out_ds.ReleaseResultSet(sql_lyr) out_ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Two band, PNG def get_georeferenced_greyalpha_ds(): src_ds = gdal.Open('../gcore/data/stefan_full_greyalpha.tif') tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/tmp.tif', src_ds.RasterXSize, src_ds.RasterYSize, 2) tmp_ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) tmp_ds.WriteRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize, src_ds.ReadRaster(0, 0, src_ds.RasterXSize, src_ds.RasterYSize)) return tmp_ds def test_gpkg_22(tile_drv_name='PNG'): if gdaltest.gpkg_dr is None: pytest.skip() if tile_drv_name is None: tile_drv = gdaltest.png_dr if gdaltest.jpeg_dr is None: pytest.skip() expected_cs = [2466, 10807] clamped_expected_cs = [1989, 1989, 1989, 11580] if tile_drv_name == 'PNG': tile_drv = gdaltest.png_dr expected_cs = [1970, 10807] clamped_expected_cs = [2100, 2100, 2100, 11580] elif tile_drv_name == 'JPEG': tile_drv = gdaltest.jpeg_dr expected_cs = [6782, 32706] clamped_expected_cs = [6538, 6538, 6538, 32744] elif tile_drv_name == 'WEBP': tile_drv = gdaltest.webp_dr if gdaltest.webp_supports_rgba: expected_cs = [13112, 10807] clamped_expected_cs = [13380, 13380, 13380, 11580] else: expected_cs = [13112, 32706] clamped_expected_cs = [13380, 13380, 13380, 32744] if tile_drv is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') tmp_ds = get_georeferenced_greyalpha_ds() if tile_drv_name: options = ['TILE_FORMAT=' + tile_drv_name, 'BLOCKSIZE=16'] else: options = ['BLOCKSIZE=16'] out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', tmp_ds, options=options) tmp_ds_filename = tmp_ds.GetDescription() ds = None gdal.Unlink(tmp_ds_filename) out_ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=2']) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(2)] if got_cs != expected_cs: assert tile_drv_name == 'WEBP' and got_cs in ([4899, 10807], [6274, 10807], [17638, 10807]) out_ds = None out_ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] expected_cs = [expected_cs[0], expected_cs[0], expected_cs[0], expected_cs[1]] if got_cs != expected_cs: assert tile_drv_name == 'WEBP' and got_cs in ([4899, 4899, 4899, 10807], [4899, 4984, 4899, 10807], [6274, 6274, 6274, 10807], [17638, 17631, 17638, 10807]) out_ds = None ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['USE_TILE_EXTENT=YES']) got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] if got_cs != clamped_expected_cs: assert tile_drv_name == 'WEBP' and got_cs in ([5266, 5266, 5266, 11580], [5266, 5310, 5266, 11580], [6436, 6436, 6436, 11580], [17007, 17000, 17007, 11580]) ds = None gdal.Unlink('/vsimem/tmp.gpkg') ############################################################################### # Two band, JPEG def test_gpkg_23(): return test_gpkg_22(tile_drv_name='JPEG') ############################################################################### # Two band, WEBP def test_gpkg_24(): return test_gpkg_22(tile_drv_name='WEBP') ############################################################################### # Two band, mixed def test_gpkg_25(): return test_gpkg_22(tile_drv_name=None) ############################################################################### # Test TILING_SCHEME def test_gpkg_26(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') tests = [('CUSTOM', [4672, 4672, 4672, 4873], None), ('GoogleCRS84Quad', [3562, 3562, 3562, 3691], None), ('GoogleCRS84Quad', [3562, 3562, 3562, 3691], ['RESAMPLING=BILINEAR']), ('GoogleCRS84Quad', [3417, 3417, 3417, 3691], ['RESAMPLING=CUBIC']), ('GoogleCRS84Quad', [3562, 3562, 3562, 3691], ['ZOOM_LEVEL_STRATEGY=AUTO']), ('GoogleCRS84Quad', [14445, 14445, 14445, 14448], ['ZOOM_LEVEL_STRATEGY=UPPER']), ('GoogleCRS84Quad', [3562, 3562, 3562, 3691], ['ZOOM_LEVEL_STRATEGY=LOWER']), ('GoogleMapsCompatible', [4118, 4118, 4118, 4406], None), ('PseudoTMS_GlobalGeodetic', [3562, 3562, 3562, 3691], None), ('PseudoTMS_GlobalMercator', [4118, 4118, 4118, 4406], None)] for (scheme, expected_cs, other_options) in tests: src_ds = gdal.Open('data/byte.tif') options = ['TILE_FORMAT=PNG', 'TILING_SCHEME=' + scheme] if other_options: options = options + other_options ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=options) ds = None ds = gdal.Open('/vsimem/tmp.gpkg') assert ds.GetMetadataItem('AREA_OR_POINT') == 'Area' got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] # VC12 returns [3561, 3561, 3561, 3691] for GoogleCRS84Quad # and For GoogleCRS84Quad RESAMPLING=CUBIC, got [3415, 3415, 3415, 3691] if max([abs(got_cs[i] - expected_cs[i]) for i in range(4)]) > 2: print('For %s, got %s, expected %s' % (scheme, str(got_cs), str(expected_cs))) assert gdal.GetConfigOption('APPVEYOR') is not None ds = None gdal.Unlink('/vsimem/tmp.gpkg') tests = [('GoogleCRS84Quad', [[42255, 47336, 24963, 35707], [42255, 47336, 24965, 35707], [42253, 47333, 24961, 35707]], None), ('GoogleMapsCompatible', [[35429, 36787, 20035, 17849]], None)] for (scheme, expected_cs, other_options) in tests: src_ds = gdal.Open('data/small_world.tif') options = ['TILE_FORMAT=PNG', 'TILING_SCHEME=' + scheme] if other_options: options = options + other_options ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=options) ds = None ds = gdal.Open('/vsimem/tmp.gpkg') got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] if got_cs not in expected_cs: print('For %s, got %s, expected %s' % (scheme, str(got_cs), str(expected_cs))) assert gdal.GetConfigOption('APPVEYOR') is not None ds = None gdal.Unlink('/vsimem/tmp.gpkg') # Test a few error cases gdal.PushErrorHandler() ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1, 1, options=['TILING_SCHEME=GoogleCRS84Quad', 'BLOCKSIZE=128']) gdal.PopErrorHandler() assert ds is None gdal.Unlink('/vsimem/tmp.gpkg') ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 1, 1, 1, options=['TILING_SCHEME=GoogleCRS84Quad']) # Test that implicit SRS registration works. assert ds.GetProjectionRef().find('4326') >= 0 gdal.PushErrorHandler() ret = ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) gdal.PopErrorHandler() assert ret != 0 srs = osr.SpatialReference() srs.ImportFromEPSG(32630) gdal.PushErrorHandler() ret = ds.SetProjection(srs.ExportToWkt()) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler() ds = None gdal.PopErrorHandler() gdal.Unlink('/vsimem/tmp.gpkg') # Invalid TILING_SCHEME src_ds = gdal.Open('data/byte.tif') gdal.PushErrorHandler() ds = gdaltest.gpkg_dr.CreateCopy('/foo/tmp.gpkg', src_ds, options=['TILING_SCHEME=invalid']) gdal.PopErrorHandler() assert ds is None # Invalid target filename src_ds = gdal.Open('data/byte.tif') gdal.PushErrorHandler() ds = gdaltest.gpkg_dr.CreateCopy('/foo/tmp.gpkg', src_ds, options=['TILING_SCHEME=GoogleCRS84Quad']) gdal.PopErrorHandler() assert ds is None # Source is not georeferenced src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') gdal.PushErrorHandler() ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILING_SCHEME=GoogleCRS84Quad']) gdal.PopErrorHandler() assert ds is None ############################################################################### # Test behaviour with low block cache max def test_gpkg_27(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') oldSize = gdal.GetCacheMax() gdal.SetCacheMax(0) src_ds = gdal.Open('data/small_world.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILE_FORMAT=PNG', 'BLOCKXSIZE=200', 'BLOCKYSIZE=200']) gdal.SetCacheMax(oldSize) expected_cs = [src_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs ############################################################################### # Test that reading a block in a band doesn't wipe another band of the same # block that would have gone through the GPKG in-memory cache def test_gpkg_28(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = gdal.Open('data/small_world.tif') data = [] for b in range(3): data.append(src_ds.GetRasterBand(b + 1).ReadRaster()) expected_cs = [src_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] src_ds = None out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 400, 200, 3, options=['TILE_FORMAT=PNG', 'BLOCKXSIZE=400', 'BLOCKYSIZE=200']) out_ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) out_ds.GetRasterBand(1).WriteRaster(0, 0, 400, 200, data[0]) # Force the block to go through IWriteBlock() oldSize = gdal.GetCacheMax() gdal.SetCacheMax(0) gdal.SetCacheMax(oldSize) # Read (another, but could be any) band out_ds.GetRasterBand(2).ReadRaster(0, 0, 400, 200) # Write remaining bands 2 and 3 for b in range(2): out_ds.GetRasterBand(b + 2).WriteRaster(0, 0, 400, 200, data[b + 1]) out_ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=3']) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs ############################################################################### # Variation of gpkg_28 with 2 blocks def test_gpkg_29(x=0): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = gdal.Open('data/small_world.tif') left = [] right = [] for b in range(3): left.append(src_ds.GetRasterBand(b + 1).ReadRaster(0, 0, 200, 200)) right.append(src_ds.GetRasterBand(b + 1).ReadRaster(200, 0, 200, 200)) expected_cs = [src_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] src_ds = None out_ds = gdaltest.gpkg_dr.Create('/vsimem/tmp.gpkg', 400, 200, 3, options=['TILE_FORMAT=PNG', 'BLOCKXSIZE=200', 'BLOCKYSIZE=200']) out_ds.SetGeoTransform([0, 10, 0, 0, 0, -10]) out_ds.GetRasterBand(1).WriteRaster(0, 0, 200, 200, left[0]) # Force the block to go through IWriteBlock() oldSize = gdal.GetCacheMax() gdal.SetCacheMax(0) gdal.SetCacheMax(oldSize) out_ds.GetRasterBand(2).ReadRaster(x, 0, 200, 200) for b in range(2): out_ds.GetRasterBand(b + 2).WriteRaster(0, 0, 200, 200, left[b + 1]) for b in range(3): out_ds.GetRasterBand(b + 1).WriteRaster(200, 0, 200, 200, right[b]) out_ds = None out_ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=3']) got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs ############################################################################### # Variation of gpkg_29 where the read is done in another block def test_gpkg_30(): return test_gpkg_29(x=200) ############################################################################### # 1 band to RGBA def test_gpkg_31(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Force use of RGBA instead of Grey-Alpha (the natural use case is WEBP) # but here we can test losslessly gdal.SetConfigOption('GPKG_PNG_SUPPORTS_2BANDS', 'NO') gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', gdal.Open('data/byte.tif'), options=['TILE_FORMAT=PNG', 'BLOCKSIZE=21']) gdal.SetConfigOption('GPKG_PNG_SUPPORTS_2BANDS', None) ds = gdal.Open('/vsimem/tmp.gpkg') check_tile_format(ds, 'PNG', 4, False) expected_cs = [4672, 4672, 4672, 4873] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ############################################################################### # grey-alpha to RGBA def test_gpkg_32(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Force use of RGBA instead of Grey-Alpha (the natural use case is WEBP) # but here we can test losslessly gdal.SetConfigOption('GPKG_PNG_SUPPORTS_2BANDS', 'NO') gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', get_georeferenced_greyalpha_ds(), options=['TILE_FORMAT=PNG', 'BLOCKSIZE=200']) gdal.SetConfigOption('GPKG_PNG_SUPPORTS_2BANDS', None) ds = gdal.Open('/vsimem/tmp.gpkg') check_tile_format(ds, 'PNG', 4, False) expected_cs = [1970, 1970, 1970, 10807] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == expected_cs ds = gdal.OpenEx('/vsimem/tmp.gpkg', open_options=['BAND_COUNT=2']) expected_cs = [1970, 10807] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(ds.RasterCount)] assert got_cs == expected_cs ############################################################################### # Single band with 32 bit color table -> RGBA def test_gpkg_33(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') # Force use of RGBA instead of color-table (the natural use case is WEBP) # but here we can test losslessly gdal.SetConfigOption('GPKG_PNG_SUPPORTS_CT', 'NO') src_ds = get_georeferenced_ds_with_pct32() gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILE_FORMAT=PNG']) gdal.SetConfigOption('GPKG_PNG_SUPPORTS_CT', None) gdal.Unlink(src_ds.GetDescription()) ds = gdal.Open('/vsimem/tmp.gpkg') check_tile_format(ds, 'PNG', 4, False) expected_cs = [10991, 57677, 34965, 10638] got_cs = [ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs ############################################################################### # Test partial tiles with overviews (#6335) def test_gpkg_34(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = gdal.GetDriverByName('MEM').Create('', 512, 417) src_ds.SetGeoTransform([-20037508.342789299786091, 2 * 20037508.342789299786091 / 512, 0, 16213801.067584000527859, 0, -2 * 16213801.067584000527859 / 417]) srs = osr.SpatialReference() srs.ImportFromEPSG(3857) src_ds.SetProjection(srs.ExportToWkt()) gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILE_FORMAT=PNG', 'TILING_SCHEME=GoogleMapsCompatible']) ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) gdal.ErrorReset() ds.BuildOverviews('NEAR', [2]) ds = None assert gdal.GetLastErrorMsg() == '' ############################################################################### # Test dirty block flushing while reading block (#6365) def test_gpkg_35(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') src_ds = gdal.GetDriverByName('MEM').Create('', 512, 417, 4) src_ds.SetGeoTransform([-20037508.342789299786091, 2 * 20037508.342789299786091 / 512, 0, 16213801.067584000527859, 0, -2 * 16213801.067584000527859 / 417]) srs = osr.SpatialReference() srs.ImportFromEPSG(3857) src_ds.SetProjection(srs.ExportToWkt()) out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/tmp.gpkg', src_ds, options=['TILE_FORMAT=PNG', 'TILING_SCHEME=GoogleMapsCompatible']) out_ds.GetRasterBand(1).Fill(32) out_ds.GetRasterBand(2).Fill(64) out_ds.GetRasterBand(3).Fill(128) out_ds.GetRasterBand(4).Fill(255) height = out_ds.RasterYSize expected_data = out_ds.ReadRaster(0, 0, 256, height) out_ds = None src_ds = gdal.GetDriverByName('MEM').Create('', 256, height, 4) src_ds.GetRasterBand(1).Fill(255) src_ds.GetRasterBand(2).Fill(255) src_ds.GetRasterBand(3).Fill(255) src_ds.GetRasterBand(4).Fill(255) white_data = src_ds.ReadRaster(0, 0, 256, height) ds = gdal.Open('/vsimem/tmp.gpkg', gdal.GA_Update) ds.WriteRaster(256, 0, 256, height, white_data) oldSize = gdal.GetCacheMax() # + 2 * 128 > + 2 * sizeof(GDALRasterBlock). Cf gdalrasterblock.cpp:GetEffectiveBlockSize() gdal.SetCacheMax((256 * 256 + 2 * 128) * 4) got_data = ds.ReadRaster(0, 0, 256, height) gdal.SetCacheMax(oldSize) assert got_data == expected_data ############################################################################### # Single band with 24 bit color table, PNG, GoogleMapsCompatible def test_gpkg_36(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.png_dr is None: pytest.skip() src_ds = gdal.Open('data/small_world_pct.tif') out_ds = gdaltest.gpkg_dr.CreateCopy('/vsimem/gpkg_36.gpkg', src_ds, options=['TILE_FORMAT=PNG', 'TILING_SCHEME=GoogleMapsCompatible', 'RESAMPLING=NEAREST']) out_ds = None src_ds = None expected_cs = [993, 50461, 64354, 17849] out_ds = gdal.Open('/vsimem/gpkg_36.gpkg') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(4)] assert got_cs == expected_cs got_ct = out_ds.GetRasterBand(1).GetColorTable() assert got_ct is None out_ds = None gdal.Unlink('/vsimem/gpkg_36.gpkg') ############################################################################### # Test that we don't crash when generating big overview factors on rasters with big dimensions # due to issues in comparing the factor of overviews with the user specified # factors def test_gpkg_37(): if gdaltest.gpkg_dr is None: pytest.skip() ds = gdal.GetDriverByName('GPKG').Create('/vsimem/gpkg_37.gpkg', 205000, 200000) ds.SetGeoTransform([100, 0.000001, 0, 100, 0, -0.000001]) ds = None ds = gdal.Open('/vsimem/gpkg_37.gpkg', gdal.GA_Update) ret = ds.BuildOverviews('NONE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]) assert ret == 0 and gdal.GetLastErrorMsg() == '' ds = None gdal.Unlink('/vsimem/gpkg_37.gpkg') ############################################################################### # Test generating more than 1000 tiles def test_gpkg_38(): if gdaltest.gpkg_dr is None: pytest.skip() # Without padding, immediately after create copy src_ds = gdal.Open('data/small_world.tif') gdaltest.gpkg_dr.CreateCopy('/vsimem/gpkg_38.gpkg', src_ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=8']) ds = gdal.Open('/vsimem/gpkg_38.gpkg') assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() ds = None filesize = gdal.VSIStatL('/vsimem/gpkg_38.gpkg').size gdal.Unlink('/vsimem/gpkg_38.gpkg') filename = '/vsimem/||maxlength=%d||gpkg_38.gpkg' % (filesize - 100000) with gdaltest.error_handler(): ds = gdaltest.gpkg_dr.CreateCopy(filename, src_ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=8']) ds_is_none = ds is None ds = None gdal.Unlink(filename) assert ds_is_none or gdal.GetLastErrorMsg() != '' filename = '/vsimem/||maxlength=%d||gpkg_38.gpkg' % (filesize - 1) with gdaltest.error_handler(): ds = gdaltest.gpkg_dr.CreateCopy(filename, src_ds, options=['TILE_FORMAT=PNG', 'BLOCKSIZE=8']) ds_is_none = ds is None ds = None gdal.Unlink(filename) assert ds_is_none or gdal.GetLastErrorMsg() != '' ############################################################################### # Test tile gridded coverage data def test_gpkg_39(): if gdaltest.gpkg_dr is None: pytest.skip() src_ds = gdal.Open('data/int16.tif') gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG') assert validate('/vsimem/gpkg_39.gpkg'), 'validation failed' ds = gdal.Open('/vsimem/gpkg_39.gpkg') # Check there a ogr_empty_table sql_lyr = ds.ExecuteSQL("SELECT COUNT(*) FROM sqlite_master WHERE name = 'ogr_empty_table'") f = sql_lyr.GetNextFeature() assert f.GetField(0) == 1 ds.ReleaseResultSet(sql_lyr) assert ds.GetRasterBand(1).DataType == gdal.GDT_Int16 assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetMetadataItem('AREA_OR_POINT') == 'Area' sql_lyr = ds.ExecuteSQL('SELECT scale, offset FROM gpkg_2d_gridded_tile_ancillary') f = sql_lyr.GetNextFeature() if f['scale'] != 1.0: f.DumpReadable() pytest.fail() if f['offset'] != 0.0: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('SELECT grid_cell_encoding FROM gpkg_2d_gridded_coverage_ancillary') f = sql_lyr.GetNextFeature() if f['grid_cell_encoding'] != 'grid-value-is-area': f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) # No metadata for now sql_lyr = ds.ExecuteSQL("SELECT 1 FROM sqlite_master WHERE name = 'gpkg_metadata'") feat = sql_lyr.GetNextFeature() ds.ReleaseResultSet(sql_lyr) feat_is_none = feat is None assert feat_is_none sql_lyr = ds.ExecuteSQL('PRAGMA application_id') f = sql_lyr.GetNextFeature() if f['application_id'] != 1196444487: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('PRAGMA user_version') f = sql_lyr.GetNextFeature() if f['user_version'] != 10200: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) # Statistics not available on partial tile without nodata md = ds.GetRasterBand(1).GetMetadata() assert md == {} ds = None # From a AREA_OR_POINT=Point dataset gdal.Translate('/vsimem/gpkg_39.gpkg', 'data/n43.dt0', format='GPKG') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetMetadataItem('AREA_OR_POINT') == 'Point', ds.GetMetadata() assert ds.GetRasterBand(1).GetUnitType() == 'm' ds = None # Test GRID_CELL_ENCODING=grid-value-is-corner gdal.Translate('/vsimem/gpkg_39.gpkg', 'data/byte.tif', format='GPKG', outputType=gdal.GDT_UInt16, creationOptions=['GRID_CELL_ENCODING=grid-value-is-corner']) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetMetadataItem('AREA_OR_POINT') == 'Point', ds.GetMetadata() assert ds.GetRasterBand(1).GetMetadataItem('GRID_CELL_ENCODING') == 'grid-value-is-corner' # No metadata for now sql_lyr = ds.ExecuteSQL("SELECT 1 FROM sqlite_master WHERE name = 'gpkg_metadata'") feat = sql_lyr.GetNextFeature() ds.ReleaseResultSet(sql_lyr) feat_is_none = feat is None assert feat_is_none ds = None # With nodata: statistics available gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=0) ds = gdal.Open('/vsimem/gpkg_39.gpkg') md = ds.GetRasterBand(1).GetMetadata() assert md == {'STATISTICS_MINIMUM': '74', 'STATISTICS_MAXIMUM': '255'} ds = None ds = gdal.Open('/vsimem/gpkg_39.gpkg') mdi = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') assert mdi == '74' ds = None # Entire tile: statistics available gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', width=256, height=256) ds = gdal.Open('/vsimem/gpkg_39.gpkg') md = ds.GetRasterBand(1).GetMetadata() assert md == {'STATISTICS_MINIMUM': '74', 'STATISTICS_MAXIMUM': '255'} ds = None ds = gdal.Open('/vsimem/gpkg_39.gpkg') mdi = ds.GetRasterBand(1).GetMetadataItem('STATISTICS_MINIMUM') assert mdi == '74' ds = None gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=1) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetRasterBand(1).GetNoDataValue() == -32768.0 gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=74) ds = gdal.Open('/vsimem/gpkg_39.gpkg') cs = ds.GetRasterBand(1).Checksum() assert cs == 4649 assert ds.GetRasterBand(1).GetNoDataValue() == -32768.0 gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=1, creationOptions=['TILING_SCHEME=GoogleMapsCompatible']) ds = gdal.Open('/vsimem/gpkg_39.gpkg') cs = ds.GetRasterBand(1).Checksum() assert cs == 4118 or cs == 4077 gdal.SetConfigOption('GPKG_ADD_DEFINITION_12_063', 'YES') gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=1, creationOptions=['TILING_SCHEME=GoogleMapsCompatible']) gdal.SetConfigOption('GPKG_ADD_DEFINITION_12_063', None) ds = gdal.Open('/vsimem/gpkg_39.gpkg') cs = ds.GetRasterBand(1).Checksum() assert cs == 4118 or cs == 4077 gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', width=1024, height=1024) ds = gdal.Open('/vsimem/gpkg_39.gpkg', gdal.GA_Update) ds.BuildOverviews('NEAR', [2, 4]) assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 37308 ds.BuildOverviews('NONE', []) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).GetOverviewCount() == 0 gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', outputType=gdal.GDT_UInt16) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_UInt16 assert ds.GetRasterBand(1).Checksum() == 4672 sql_lyr = ds.ExecuteSQL('SELECT scale, offset FROM gpkg_2d_gridded_tile_ancillary') f = sql_lyr.GetNextFeature() assert f['scale'] == 1.0 ds.ReleaseResultSet(sql_lyr) gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', outputType=gdal.GDT_UInt16, noData=1) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetRasterBand(1).GetNoDataValue() == 1.0 gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', outputType=gdal.GDT_UInt16, noData=74) ds = gdal.Open('/vsimem/gpkg_39.gpkg') cs = ds.GetRasterBand(1).Checksum() assert cs == 4672 assert ds.GetRasterBand(1).GetNoDataValue() == 74.0 src_ds = gdal.Open('data/float32.tif') gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float32 assert ds.GetRasterBand(1).Checksum() == 4672 sql_lyr = ds.ExecuteSQL('SELECT scale, offset FROM gpkg_2d_gridded_tile_ancillary') f = sql_lyr.GetNextFeature() assert f.GetField('scale') == 1.0 ds.ReleaseResultSet(sql_lyr) gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=1) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetRasterBand(1).GetNoDataValue() == 1 gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', creationOptions=['TILE_FORMAT=PNG']) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float32 assert ds.GetRasterBand(1).Checksum() == 4672 sql_lyr = ds.ExecuteSQL('SELECT scale, offset FROM gpkg_2d_gridded_tile_ancillary') f = sql_lyr.GetNextFeature() assert f['scale'] != 1.0 and f.IsFieldSetAndNotNull('scale') ds.ReleaseResultSet(sql_lyr) gdal.Translate('/vsimem/gpkg_39.gpkg', src_ds, format='GPKG', noData=74, creationOptions=['TILE_FORMAT=PNG']) ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float32 cs = ds.GetRasterBand(1).Checksum() assert cs == 4680 sql_lyr = ds.ExecuteSQL('SELECT scale, offset FROM gpkg_2d_gridded_tile_ancillary') f = sql_lyr.GetNextFeature() assert f['scale'] != 1.0 and f.IsFieldSetAndNotNull('scale') ds.ReleaseResultSet(sql_lyr) # Particular case with nodata = -32768 for Int16 gdal.FileFromMemBuffer('/vsimem/gpkg_39.asc', """ncols 6 nrows 1 xllcorner 440720 yllcorner 3750120 cellsize 60 NODATA_value -32768 -32768 -32767 -32766 0 32766 32767""") gdal.Translate('/vsimem/gpkg_39.gpkg', '/vsimem/gpkg_39.asc', format='GPKG', outputType=gdal.GDT_Int16) src_ds = gdal.Open('/vsimem/gpkg_39.asc') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_Int16 assert ds.GetRasterBand(1).GetNoDataValue() == -32768.0 assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ ds.GetRasterBand(1).GetNoDataValue() ds = None src_ds = None gdal.Unlink('/vsimem/gpkg_39.asc') # Particular case with nodata = 65535 for UInt16 gdal.FileFromMemBuffer('/vsimem/gpkg_39.asc', """ncols 6 nrows 1 xllcorner 440720 yllcorner 3750120 cellsize 60 NODATA_value 65535 0 1 2 65533 65534 65535""") gdal.Translate('/vsimem/gpkg_39.gpkg', '/vsimem/gpkg_39.asc', format='GPKG', outputType=gdal.GDT_UInt16) src_ds = gdal.Open('/vsimem/gpkg_39.asc') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_UInt16 assert ds.GetRasterBand(1).GetNoDataValue() == 65535.0 assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ ds.GetRasterBand(1).GetNoDataValue() ds = None src_ds = None gdal.Unlink('/vsimem/gpkg_39.asc') # Particular case with nodata = 0 for UInt16 gdal.FileFromMemBuffer('/vsimem/gpkg_39.asc', """ncols 6 nrows 1 xllcorner 440720 yllcorner 3750120 cellsize 60 NODATA_value 0 0 1 2 65533 65534 65535""") gdal.Translate('/vsimem/gpkg_39.gpkg', '/vsimem/gpkg_39.asc', format='GPKG', outputType=gdal.GDT_UInt16) src_ds = gdal.Open('/vsimem/gpkg_39.asc') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_UInt16 assert ds.GetRasterBand(1).GetNoDataValue() == 0 assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ ds.GetRasterBand(1).GetNoDataValue() ds = None src_ds = None gdal.Unlink('/vsimem/gpkg_39.asc') # Test large dynamic for Float32 and TILE_FORMAT=PNG gdal.FileFromMemBuffer('/vsimem/gpkg_39.asc', """ncols 2 nrows 1 xllcorner 440720 yllcorner 3750120 cellsize 60 -100000 100000""") gdal.Translate('/vsimem/gpkg_39.gpkg', '/vsimem/gpkg_39.asc', format='GPKG', outputType=gdal.GDT_Float32, creationOptions=['TILE_FORMAT=PNG']) assert validate('/vsimem/gpkg_39.gpkg'), 'validation failed' src_ds = gdal.Open('/vsimem/gpkg_39.asc') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float32 assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ ds.GetRasterBand(1).GetNoDataValue() ds = None src_ds = None gdal.Unlink('/vsimem/gpkg_39.asc') # Test large dynamic for Float32 and TILE_FORMAT=PNG and nodata gdal.FileFromMemBuffer('/vsimem/gpkg_39.asc', """ncols 2 nrows 1 xllcorner 440720 yllcorner 3750120 cellsize 60 -100000 100000""") gdal.Translate('/vsimem/gpkg_39.gpkg', '/vsimem/gpkg_39.asc', format='GPKG', outputType=gdal.GDT_Float32, noData=0, creationOptions=['TILE_FORMAT=PNG']) src_ds = gdal.Open('/vsimem/gpkg_39.asc') ds = gdal.Open('/vsimem/gpkg_39.gpkg') assert ds.GetRasterBand(1).DataType == gdal.GDT_Float32 assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ ds.GetRasterBand(1).GetNoDataValue() ds = None src_ds = None gdal.Unlink('/vsimem/gpkg_39.asc') # Test that we can delete an existing tile ds = gdaltest.gpkg_dr.Create('/vsimem/gpkg_39.gpkg', 256, 256, 1, gdal.GDT_UInt16) ds.SetGeoTransform([2, 0.001, 0, 49, 0, -0.001]) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) ds.GetRasterBand(1).SetNoDataValue(0) ds.GetRasterBand(1).Fill(1) ds.GetRasterBand(1).FlushCache() ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(1).FlushCache() sql_lyr = ds.ExecuteSQL('SELECT scale, offset FROM gpkg_2d_gridded_tile_ancillary') f = sql_lyr.GetNextFeature() assert f is None ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/gpkg_39.gpkg') # Test detecting tiles at zero (without nodata value) ds = gdaltest.gpkg_dr.Create('/vsimem/gpkg_39.gpkg', 256, 256, 1, gdal.GDT_Float32) ds.SetGeoTransform([2, 0.001, 0, 49, 0, -0.001]) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) ds.GetRasterBand(1).Fill(0) ds.GetRasterBand(1).FlushCache() sql_lyr = ds.ExecuteSQL('SELECT * FROM gpkg_39') f = sql_lyr.GetNextFeature() assert f is None ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/gpkg_39.gpkg') # Test detecting tiles at nodata value ds = gdaltest.gpkg_dr.Create('/vsimem/gpkg_39.gpkg', 256, 256, 1, gdal.GDT_Float32) ds.SetGeoTransform([2, 0.001, 0, 49, 0, -0.001]) sr = osr.SpatialReference() sr.ImportFromEPSG(4326) ds.SetProjection(sr.ExportToWkt()) ds.GetRasterBand(1).SetNoDataValue(2) ds.GetRasterBand(1).Fill(2) ds.GetRasterBand(1).FlushCache() sql_lyr = ds.ExecuteSQL('SELECT * FROM gpkg_39') f = sql_lyr.GetNextFeature() assert f is None ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/gpkg_39.gpkg') gdal.Unlink('/vsimem/gpkg_39.gpkg.aux.xml') ############################################################################### # Test VERSION def test_gpkg_40(): if gdaltest.gpkg_dr is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') # Should default to 1.2 gdal.Translate('/vsimem/gpkg_40.gpkg', src_ds, format='GPKG') ds = gdal.Open('/vsimem/gpkg_40.gpkg') sql_lyr = ds.ExecuteSQL('PRAGMA application_id') f = sql_lyr.GetNextFeature() if f['application_id'] != 1196444487: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('PRAGMA user_version') f = sql_lyr.GetNextFeature() if f['user_version'] != 10200: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None # Should default to 1.2 if we didn't override it. gdal.Translate('/vsimem/gpkg_40.gpkg', src_ds, format='GPKG', outputType=gdal.GDT_Int16, creationOptions=['VERSION=1.0']) ds = gdal.Open('/vsimem/gpkg_40.gpkg') sql_lyr = ds.ExecuteSQL('PRAGMA application_id') f = sql_lyr.GetNextFeature() if f['application_id'] != 1196437808: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('PRAGMA user_version') f = sql_lyr.GetNextFeature() if f['user_version'] != 0: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Translate('/vsimem/gpkg_40.gpkg', src_ds, format='GPKG', creationOptions=['VERSION=1.1']) ds = gdal.Open('/vsimem/gpkg_40.gpkg') sql_lyr = ds.ExecuteSQL('PRAGMA application_id') f = sql_lyr.GetNextFeature() if f['application_id'] != 1196437809: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('PRAGMA user_version') f = sql_lyr.GetNextFeature() if f['user_version'] != 0: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Translate('/vsimem/gpkg_40.gpkg', src_ds, format='GPKG', creationOptions=['VERSION=1.2']) ds = gdal.Open('/vsimem/gpkg_40.gpkg') sql_lyr = ds.ExecuteSQL('PRAGMA application_id') f = sql_lyr.GetNextFeature() if f['application_id'] != 1196444487: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) sql_lyr = ds.ExecuteSQL('PRAGMA user_version') f = sql_lyr.GetNextFeature() if f['user_version'] != 10200: f.DumpReadable() pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/gpkg_40.gpkg') ############################################################################### # Robustness test def test_gpkg_41(): if gdaltest.gpkg_dr is None or gdal.GetConfigOption('TRAVIS') is not None or \ gdal.GetConfigOption('APPVEYOR') is not None: pytest.skip() gdal.SetConfigOption('GPKG_ALLOW_CRAZY_SETTINGS', 'YES') with gdaltest.error_handler(): gdal.Translate('/vsimem/gpkg_41.gpkg', 'data/huge_line.tif', format='GPKG', creationOptions=[ 'BLOCKXSIZE=500000000', 'BLOCKYSIZE=1']) gdal.SetConfigOption('GPKG_ALLOW_CRAZY_SETTINGS', None) gdal.Unlink('/vsimem/gpkg_41.gpkg') ############################################################################### # Test opening in vector mode a database without gpkg_geometry_columns def test_gpkg_42(): if gdaltest.gpkg_dr is None: pytest.skip() gdal.SetConfigOption('CREATE_GEOMETRY_COLUMNS', 'NO') gdal.Translate('/vsimem/gpkg_42.gpkg', 'data/byte.tif', format='GPKG') gdal.SetConfigOption('CREATE_GEOMETRY_COLUMNS', None) ds = gdal.OpenEx('/vsimem/gpkg_42.gpkg', gdal.OF_VECTOR | gdal.OF_UPDATE) sql_lyr = ds.ExecuteSQL("SELECT 1 FROM sqlite_master WHERE name = 'gpkg_geometry_columns'") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 0 lyr = ds.CreateLayer('test') assert lyr is not None ds.FlushCache() assert gdal.GetLastErrorMsg() == '' ds = None gdal.Unlink('/vsimem/gpkg_42.gpkg') ############################################################################### # Test adding raster to a database without pre-existing raster support tables. def test_gpkg_43(): if gdaltest.gpkg_dr is None: pytest.skip() gdal.SetConfigOption('CREATE_RASTER_TABLES', 'NO') ds = gdaltest.gpkg_dr.Create('/vsimem/gpkg_43.gpkg', 0, 0, 0, gdal.GDT_Unknown) gdal.SetConfigOption('CREATE_RASTER_TABLES', None) ds.CreateLayer('foo') ds = None ds = gdal.OpenEx('/vsimem/gpkg_43.gpkg', gdal.OF_UPDATE) sql_lyr = ds.ExecuteSQL("SELECT 1 FROM sqlite_master WHERE name = 'gpkg_tile_matrix_set'") fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) assert fc == 0 ds = None gdal.Translate('/vsimem/gpkg_43.gpkg', 'data/byte.tif', format='GPKG', creationOptions=['APPEND_SUBDATASET=YES']) ds = gdal.OpenEx('/vsimem/gpkg_43.gpkg') assert ds.GetRasterBand(1).Checksum() == 4672 assert ds.GetLayerCount() == 1 ds = None assert validate('/vsimem/gpkg_43.gpkg'), 'validation failed' gdal.Unlink('/vsimem/gpkg_43.gpkg') ############################################################################### # Test opening a .gpkg.sql file def test_gpkg_44(): if gdaltest.gpkg_dr is None: pytest.skip() if gdaltest.gpkg_dr.GetMetadataItem("ENABLE_SQL_GPKG_FORMAT") != 'YES': pytest.skip() ds = gdal.Open('data/byte.gpkg.sql') assert ds.GetRasterBand(1).Checksum() == 4672, 'validation failed' ############################################################################### # Test opening a .gpkg file def test_gpkg_45(): if gdaltest.gpkg_dr is None: pytest.skip() ds = gdal.Open('data/byte.gpkg') assert ds.GetRasterBand(1).Checksum() == 4672, 'validation failed' ############################################################################### # Test fix for #6932 def test_gpkg_46(): if gdaltest.gpkg_dr is None: pytest.skip() ds = gdaltest.gpkg_dr.Create('/vsimem/gpkg_46.gpkg', 6698, 6698, options=['TILING_SCHEME=GoogleMapsCompatible']) srs = osr.SpatialReference() srs.ImportFromEPSG(3857) ds.SetProjection(srs.ExportToWkt()) ds.SetGeoTransform([500, 0.037322767717371, 0, 750, 0, -0.037322767717371]) ds = None ds = gdal.Open('/vsimem/gpkg_46.gpkg', gdal.GA_Update) ds.BuildOverviews('NEAR', [2, 4, 8, 16, 32, 64, 128, 256]) ds = None ds = gdal.Open('/vsimem/gpkg_46.gpkg') sql_lyr = ds.ExecuteSQL('SELECT zoom_level, matrix_width * pixel_x_size * tile_width, matrix_height * pixel_y_size * tile_height FROM gpkg_tile_matrix ORDER BY zoom_level') count = 0 for f in sql_lyr: count += 1 if f.GetField(1) != pytest.approx(40075016.6855785, abs=1e-7) or \ f.GetField(2) != pytest.approx(40075016.6855785, abs=1e-7): f.DumpReadable() ds.ReleaseResultSet(sql_lyr) gdal.Unlink('/vsimem/gpkg_46.gpkg') pytest.fail() ds.ReleaseResultSet(sql_lyr) ds = None gdal.Unlink('/vsimem/gpkg_46.gpkg') assert count == 23 ############################################################################### # Test fix for #6976 def test_gpkg_47(): if gdaltest.gpkg_dr is None: pytest.skip() tmpfile = '/vsimem/gpkg_47.gpkg' ds = gdaltest.gpkg_dr.CreateCopy(tmpfile, gdal.Open('data/byte.tif')) ds.ExecuteSQL('UPDATE gpkg_contents SET min_x = 1, max_x = 0') ds = None with gdaltest.error_handler(): ds = gdal.Open(tmpfile) assert ds.RasterXSize == 256 ds = None gdal.Unlink(tmpfile) ############################################################################### # Test fix for https://issues.qgis.org/issues/16997 (opening a file with # subdatasets on Windows) def test_gpkg_48(): if gdaltest.gpkg_dr is None: pytest.skip() if sys.platform == 'win32': filename = os.path.join(os.getcwd(), 'tmp', 'byte.gpkg') else: # Test Windows code path in a weird way... filename = 'C:\\byte.gpkg' gdal.Translate(filename, 'data/byte.tif', format='GPKG', creationOptions=['RASTER_TABLE=foo']) gdal.Translate(filename, 'data/byte.tif', format='GPKG', creationOptions=['APPEND_SUBDATASET=YES', 'RASTER_TABLE=bar']) ds = gdal.Open('GPKG:' + filename + ':foo') if ds is None: gdal.Unlink(filename) pytest.fail() ds = None ds = gdal.Open('GPKG:' + filename + ':bar') if ds is None: gdal.Unlink(filename) pytest.fail() ds = None gdal.Unlink(filename) ############################################################################### def test_gpkg_delete_raster_layer(): if gdaltest.gpkg_dr is None: pytest.skip() filename = '/vsimem/byte.gpkg' gdal.Translate(filename, 'data/byte.tif', format='GPKG', creationOptions=['RASTER_TABLE=foo']) ds = ogr.Open(filename, update=1) ds.ExecuteSQL('DROP TABLE foo') sql_lyr = ds.ExecuteSQL('SELECT * FROM gpkg_metadata') fc = sql_lyr.GetFeatureCount() ds.ReleaseResultSet(sql_lyr) ds.ExecuteSQL('VACUUM') ds = None assert fc == 0 # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(filename, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert 'foo' not in content gdal.Unlink(filename) ############################################################################### def test_gpkg_delete_gridded_coverage_raster_layer(): if gdaltest.gpkg_dr is None: pytest.skip() filename = '/vsimem/float32.gpkg' gdal.Translate(filename, 'data/float32.tif', format='GPKG', creationOptions=['RASTER_TABLE=foo']) ds = ogr.Open(filename, update=1) ds.ExecuteSQL('DROP TABLE foo') ds.ExecuteSQL('VACUUM') ds = None # Check that there is no more any reference to the layer f = gdal.VSIFOpenL(filename, 'rb') content = gdal.VSIFReadL(1, 1000000, f).decode('latin1') gdal.VSIFCloseL(f) assert 'foo' not in content gdal.Unlink(filename) ############################################################################### def test_gpkg_open_old_gpkg_elevation_tiles_extension(): if gdaltest.gpkg_dr is None: pytest.skip() gdal.ErrorReset() ds = gdal.Open('data/uint16-old-elevation-extension.gpkg') assert gdal.GetLastErrorMsg() == '' cs = ds.GetRasterBand(1).Checksum() assert cs == 4672 ############################################################################### def test_gpkg_GeneralCmdLineProcessor(): if gdaltest.gpkg_dr is None: pytest.skip() import test_cli_utilities if test_cli_utilities.get_gdalinfo_path() is not None and test_cli_utilities.get_ogrinfo_path() is not None: ret_gdalinfo = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --format GPKG') ret_ogrinfo = gdaltest.runexternal(test_cli_utilities.get_ogrinfo_path() + ' --format GPKG') assert ('' in ret_gdalinfo and \ '' in ret_ogrinfo and \ 'scope=' not in ret_gdalinfo and \ 'scope=' not in ret_ogrinfo) ############################################################################### def test_gpkg_match_overview_factor(): if gdaltest.gpkg_dr is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/gpkg_match_overview_factor.gpkg', open('data/test_match_overview_factor.gpkg', 'rb').read()) ds = gdal.Open('/vsimem/gpkg_match_overview_factor.gpkg', gdal.GA_Update) ret = ds.BuildOverviews('NONE', [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]) assert ret == 0 and gdal.GetLastErrorMsg() == '' ds = None gdal.Unlink('/vsimem/gpkg_match_overview_factor.gpkg') ############################################################################### def test_gpkg_wkt2(): if gdaltest.gpkg_dr is None: pytest.skip() # WKT2-only compatible SRS with EPSG code filename = '/vsimem/test_gpkg_wkt2.gpkg' ds = gdaltest.gpkg_dr.Create(filename, 1, 1) sr = osr.SpatialReference() sr.ImportFromEPSG(4979) # WGS 84 3D sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ds.SetSpatialRef(sr) ds.SetGeoTransform([2,1,0,49,0,-1]) ds = None ds = gdal.Open(filename) sr_got = ds.GetSpatialRef() assert sr_got.IsSame(sr), sr_got.ExportToWkt() lyr = ds.ExecuteSQL('SELECT * FROM gpkg_spatial_ref_sys ORDER BY srs_id') f = lyr.GetNextFeature() assert f.GetField('srs_name') == 'Undefined cartesian SRS' assert f.GetField('srs_id') == -1 assert f.GetField('organization') == 'NONE' assert f.GetField('organization_coordsys_id') == -1 assert f.GetField('definition') == 'undefined' assert f.GetField('description') == 'undefined cartesian coordinate reference system' assert f.GetField('definition_12_063') == 'undefined' lyr.GetNextFeature() f = lyr.GetNextFeature() assert f.GetField('definition').startswith('GEOGCS["WGS 84"') assert f.GetField('definition_12_063').startswith('GEODCRS["WGS 84"') and 'ID["EPSG",4326]' in f.GetField('definition_12_063') f = lyr.GetNextFeature() assert f.GetField('definition') == 'undefined' assert f.GetField('definition_12_063').startswith('GEODCRS["WGS 84"') and 'ID["EPSG",4979]' in f.GetField('definition_12_063') ds.ReleaseResultSet(lyr) lyr = ds.ExecuteSQL("SELECT * FROM gpkg_extensions WHERE extension_name = 'gpkg_crs_wkt'") assert lyr.GetFeatureCount() == 1 ds.ReleaseResultSet(lyr) ds = None # WKT2-only compatible SRS without EPSG code ds = gdaltest.gpkg_dr.Create(filename, 1, 1, options = ['APPEND_SUBDATASET=YES', 'RASTER_TABLE=table2']) sr.SetFromUserInput('GEODCRS["my CRS",DATUM["my datum",ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,3],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],AXIS["ellipsoidal height (h)",up,ORDER[3],LENGTHUNIT["metre",1]]]') sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ds.SetSpatialRef(sr) ds.SetGeoTransform([2,1,0,49,0,-1]) ds = None ds = gdal.Open('GPKG:' + filename + ':table2') sr_got = ds.GetSpatialRef() assert sr_got.IsSame(sr), sr_got.ExportToWkt() ds = None # WKT1 compatible SRS ds = gdaltest.gpkg_dr.Create(filename, 1, 1, options = ['APPEND_SUBDATASET=YES', 'RASTER_TABLE=table3']) sr.ImportFromEPSG(32631) sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER) ds.SetSpatialRef(sr) ds.SetGeoTransform([500000,1,0,4500000,0,-1]) ds = None ds = gdal.Open('GPKG:' + filename + ':table3') sr_got = ds.GetSpatialRef() assert sr_got.IsSame(sr), sr_got.ExportToWkt() lyr = ds.ExecuteSQL('SELECT * FROM gpkg_spatial_ref_sys WHERE srs_id = 32631') f = lyr.GetNextFeature() assert f.GetField('definition').startswith('PROJCS["WGS 84 / UTM zone 31N",') and 'AUTHORITY["EPSG","32631"]' in f.GetField('definition') assert f.GetField('definition_12_063').startswith('PROJCRS["WGS 84 / UTM zone 31N",') and 'ID["EPSG",32631]' in f.GetField('definition_12_063') ds.ReleaseResultSet(lyr) ds = None assert validate(filename), 'validation failed' gdal.Unlink(filename) ############################################################################### # Test reading a 50000x25000 block uint16 def test_gpkg_50000_25000_uint16(): if gdaltest.gpkg_dr is None: pytest.skip() if not gdaltest.run_slow_tests(): pytest.skip() if sys.maxsize < 2**32: pytest.skip('Test not available on 32 bit') ds = gdal.Open('/vsizip/data/50000_25000_uint16.gpkg.zip/50000_25000_uint16.gpkg') import psutil sizeof_uint16 = 2 sizeof_block = 50000 * 25000 * sizeof_uint16 # 2 * sizeof_block, because of GDAL block cache and GPKG internal cache if psutil.virtual_memory().available < 2 * sizeof_block: pytest.skip("Not enough virtual memory available") data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, buf_xsize = 20, buf_ysize = 20) assert data ref_ds = gdal.Open('../gcore/data/uint16.tif') assert data == ref_ds.ReadRaster() ############################################################################### # Test reading a 50000x50000 block uint16 def test_gpkg_50000_50000_uint16(): if gdaltest.gpkg_dr is None: pytest.skip() if not gdaltest.run_slow_tests(): pytest.skip() if sys.maxsize < 2**32: pytest.skip('Test not available on 32 bit') ds = gdal.Open('/vsizip/data/50000_50000_uint16.gpkg.zip/50000_50000_uint16.gpkg') import psutil sizeof_uint16 = 2 sizeof_block = 50000 * 50000 * sizeof_uint16 # 2 * sizeof_block, because of GDAL block cache and GPKG internal cache if psutil.virtual_memory().available < 2 * sizeof_block: pytest.skip("Not enough virtual memory available") data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, buf_xsize = 20, buf_ysize = 20) assert data ref_ds = gdal.Open('../gcore/data/uint16.tif') assert data == ref_ds.ReadRaster() ############################################################################### # def test_gpkg_cleanup(): if gdaltest.gpkg_dr is None: pytest.skip() gdal.Unlink('/vsimem/tmp.gpkg') gdal.Unlink('/vsimem/tmp.gpkg.aux.xml') gdal.SetConfigOption('GPKG_DEBUG', None) ############################################################################### gdalautotest-3.1.2/gdrivers/zmap.py0000775000175000017500000000366313701060015016045 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: zmap.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for ZMap driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Test CreateCopy() of byte.tif def test_zmap_1(): tst = gdaltest.GDALTest('ZMap', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1, check_gt=(-67.00041667, 0.00083333, 0.0, 50.000416667, 0.0, -0.00083333)) gdalautotest-3.1.2/gdrivers/mrsid.py0000775000175000017500000004126313701060015016212 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: mrsid.py 4594191a2db0442760392a1e928ce127244106de 2019-08-07 14:48:57 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for MrSID driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2005, Frank Warmerdam # Copyright (c) 2009-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil from osgeo import gdal import gdaltest import pytest ############################################################################### # Read a simple byte file, checking projections and geotransform. def test_mrsid_1(): gdaltest.mrsid_drv = gdal.GetDriverByName('MrSID') if gdaltest.mrsid_drv is None: pytest.skip() tst = gdaltest.GDALTest('MrSID', 'mercator.sid', 1, None) gt = (-15436.385771224039, 60.0, 0.0, 3321987.8617962394, 0.0, -60.0) # # Old, internally generated. # prj = """PROJCS["MER E000|", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Mercator_1SP"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""" # # MrSID SDK getWKT() method. # prj = """PROJCS["MER E000|", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982139006, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Mercator_1SP"], PARAMETER["latitude_of_origin",1], PARAMETER["central_meridian",1], PARAMETER["scale_factor",1], PARAMETER["false_easting",1], PARAMETER["false_northing",1], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""" # # MrSID SDK getWKT() method - DSDK 8 and newer? # prj = """PROJCS["MER E000|", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982139006, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""" tst.testOpen(check_gt=gt, check_stat=(0.0, 255.0, 103.319, 55.153), check_approx_stat=(2.0, 243.0, 103.131, 43.978)) ds = gdal.Open('data/mercator.sid') got_prj = ds.GetProjectionRef() ds = None if prj.find('North_American_Datum_1927') == -1 or \ prj.find('Mercator_1SP') == -1: print(got_prj) pytest.fail('did not get expected projection') if got_prj != prj: print('Warning: did not get exactly expected projection. Got %s' % got_prj) ############################################################################### # Do a direct IO to read the image at a resolution for which there is no # builtin overview. Checks for the bug Steve L found in the optimized # RasterIO implementation. def test_mrsid_2(): if gdaltest.mrsid_drv is None: pytest.skip() ds = gdal.Open('data/mercator.sid') try: data = ds.ReadRaster(0, 0, 515, 515, buf_xsize=10, buf_ysize=10) except: pytest.fail('Small overview read failed: ' + gdal.GetLastErrorMsg()) ds = None is_bytes = False if (isinstance(data, bytes) and not isinstance(data, str)): is_bytes = True # check that we got roughly the right values by checking mean. if is_bytes is True: total = sum(data) else: total = sum([ord(c) for c in data]) mean = float(total) / len(data) assert mean >= 95 and mean <= 105, 'image mean out of range.' ############################################################################### # Test overview reading. def test_mrsid_3(): if gdaltest.mrsid_drv is None: pytest.skip() ds = gdal.Open('data/mercator.sid') band = ds.GetRasterBand(1) assert band.GetOverviewCount() == 4, 'did not get expected overview count' new_stat = band.GetOverview(3).GetStatistics(0, 1) check_stat = (11.0, 230.0, 103.42607897153351, 39.952592422557757) stat_epsilon = 0.0001 for i in range(4): if new_stat[i] != pytest.approx(check_stat[i], abs=stat_epsilon): print('') print('old = ', check_stat) print('new = ', new_stat) pytest.fail('Statistics differ.') ############################################################################### # Check a new (V3) file which uses a different form for coordinate sys. def test_mrsid_4(): if gdaltest.mrsid_drv is None: pytest.skip() try: os.remove('data/mercator_new.sid.aux.xml') except OSError: pass tst = gdaltest.GDALTest('MrSID', 'mercator_new.sid', 1, None) gt = (-15436.385771224039, 60.0, 0.0, 3321987.8617962394, 0.0, -60.0) prj = """PROJCS["MER E000", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Mercator_1SP"], PARAMETER["latitude_of_origin",33.76446202777777], PARAMETER["central_meridian",-117.4745428888889], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""" ret = tst.testOpen(check_gt=gt, check_prj=prj, check_stat=(0.0, 255.0, 103.112, 52.477), check_approx_stat=(0.0, 255.0, 102.684, 51.614)) try: os.remove('data/mercator_new.sid.aux.xml') except OSError: pass return ret ############################################################################### # Test JP2MrSID driver def test_mrsid_5(): gdaltest.jp2mrsid_drv = gdal.GetDriverByName('JP2MrSID') if gdaltest.jp2mrsid_drv is None: pytest.skip() gdaltest.deregister_all_jpeg2000_drivers_but('JP2MrSID') ############################################################################### # Open byte.jp2 def test_mrsid_6(): if gdaltest.jp2mrsid_drv is None: pytest.skip() srs = """PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]] """ gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) tst = gdaltest.GDALTest('JP2MrSID', 'byte.jp2', 1, 50054) return tst.testOpen(check_prj=srs, check_gt=gt) ############################################################################### # Open int16.jp2 def test_mrsid_7(): if gdaltest.jp2mrsid_drv is None: pytest.skip() ds = gdal.Open('data/int16.jp2') ds_ref = gdal.Open('data/int16.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref) if maxdiff > 5: print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None pytest.fail('Image too different from reference') ds = None ds_ref = None ############################################################################### # Test PAM override for nodata, coordsys, and geotransform. def test_mrsid_8(): if gdaltest.mrsid_drv is None: pytest.skip() new_gt = (10000, 50, 0, 20000, 0, -50) new_srs = """PROJCS["OSGB 1936 / British National Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","27700"]]""" gdal.PushErrorHandler('CPLQuietErrorHandler') gdal.GetDriverByName('MrSID').Delete('tmp/mercator.sid') gdal.PopErrorHandler() shutil.copyfile('data/mercator.sid', 'tmp/mercator.sid') ds = gdal.Open('tmp/mercator.sid') ds.SetGeoTransform(new_gt) ds.SetProjection(new_srs) ds.GetRasterBand(1).SetNoDataValue(255) ds = None ds = gdal.Open('tmp/mercator.sid') assert new_srs == ds.GetProjectionRef(), 'SRS Override failed.' assert new_gt == ds.GetGeoTransform(), 'Geotransform Override failed.' assert ds.GetRasterBand(1).GetNoDataValue() == 255, 'Nodata override failed.' ds = None gdal.GetDriverByName('MrSID').Delete('tmp/mercator.sid') ############################################################################### # Test VSI*L IO with .sid def test_mrsid_9(): if gdaltest.mrsid_drv is None: pytest.skip() f = open('data/mercator.sid', 'rb') data = f.read() f.close() f = gdal.VSIFOpenL('/vsimem/mrsid_9.sid', 'wb') gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) ds = gdal.Open('/vsimem/mrsid_9.sid') assert ds is not None ds = None gdal.Unlink('/vsimem/mrsid_9.sid') ############################################################################### # Test VSI*L IO with .jp2 def test_mrsid_10(): if gdaltest.jp2mrsid_drv is None: pytest.skip() f = open('data/int16.jp2', 'rb') data = f.read() f.close() f = gdal.VSIFOpenL('/vsimem/mrsid_10.jp2', 'wb') gdal.VSIFWriteL(data, 1, len(data), f) gdal.VSIFCloseL(f) ds = gdal.Open('/vsimem/mrsid_10.jp2') assert ds is not None ds = None gdal.Unlink('/vsimem/mrsid_10.jp2') ############################################################################### # Check that we can use .j2w world files (#4651) def test_mrsid_11(): if gdaltest.jp2mrsid_drv is None: pytest.skip() ds = gdal.Open('data/byte_without_geotransform.jp2') geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(440720, abs=0.1) and geotransform[1] == pytest.approx(60, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(3751320, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-60, abs=0.001), \ 'geotransform differs from expected' ds = None ############################################################################### def test_mrsid_online_1(): if gdaltest.jp2mrsid_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/7sisters200.j2k', '7sisters200.j2k'): pytest.skip() # Checksum = 29473 on my PC tst = gdaltest.GDALTest('JP2MrSID', 'tmp/cache/7sisters200.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/7sisters200.j2k') ds.GetRasterBand(1).Checksum() ds = None ############################################################################### def test_mrsid_online_2(): if gdaltest.jp2mrsid_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/gcp.jp2', 'gcp.jp2'): pytest.skip() # Checksum = 209 on my PC tst = gdaltest.GDALTest('JP2MrSID', 'tmp/cache/gcp.jp2', 1, None, filename_absolute=1) tst.testOpen() # The JP2MrSID driver doesn't handle GCPs ds = gdal.Open('tmp/cache/gcp.jp2') ds.GetRasterBand(1).Checksum() # if len(ds.GetGCPs()) != 15: # gdaltest.post_reason('bad number of GCP') # return 'fail' # # expected_wkt = """GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]""" # if ds.GetGCPProjection() != expected_wkt: # gdaltest.post_reason('bad GCP projection') # return 'fail' ds = None ############################################################################### def test_mrsid_online_3(): if gdaltest.jp2mrsid_drv is None: pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.j2k', 'Bretagne1.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.bmp', 'Bretagne1.bmp'): pytest.skip() # checksum = 14443 on my PC tst = gdaltest.GDALTest('JP2MrSID', 'tmp/cache/Bretagne1.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne1.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne1.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref, verbose=0) ds = None ds_ref = None # Difference between the image before and after compression if maxdiff > 17: print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) gdaltest.compare_ds(ds, ds_ref, verbose=1) pytest.fail('Image too different from reference') ############################################################################### def test_mrsid_online_4(): if gdaltest.jp2mrsid_drv is None: pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.j2k', 'Bretagne2.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.bmp', 'Bretagne2.bmp'): pytest.skip() # Checksum = 53186 on my PC tst = gdaltest.GDALTest('JP2MrSID', 'tmp/cache/Bretagne2.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne2.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne2.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref, width=256, height=256) ds = None ds_ref = None # Difference between the image before and after compression if maxdiff > 1: print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) pytest.fail('Image too different from reference') ############################################################################### # Cleanup. def test_mrsid_cleanup(): try: os.remove('data/mercator.sid.aux.xml') os.remove('data/mercator_new.sid.aux.xml') except OSError: pass gdaltest.reregister_all_jpeg2000_drivers() gdalautotest-3.1.2/gdrivers/tiledb_write.py0000775000175000017500000001644213701060015017552 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: tiledb_write.py c1f8e0d267d277d1d5359553c23a67d77311099f 2020-01-27 07:44:17 -0600 Norman Barker $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for GeoTIFF format. # Author: TileDB, Inc # ############################################################################### # Copyright (c) 2019, TileDB, Inc # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest import gdaltest @pytest.mark.require_driver('TileDB') def test_tiledb_write_complex(): gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') src_ds = gdal.Open('../gcore/data/cfloat64.tif') new_ds = gdaltest.tiledb_drv.CreateCopy('tmp/tiledb_complex64', src_ds) bnd = new_ds.GetRasterBand(1) assert bnd.Checksum() == 5028, 'Didnt get expected checksum on still-open file' bnd = None new_ds = None gdaltest.tiledb_drv.Delete('tmp/tiledb_complex64') @pytest.mark.require_driver('TileDB') def test_tiledb_write_custom_blocksize(): gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') src_ds = gdal.Open('../gcore/data/utmsmall.tif') options = ['BLOCKXSIZE=32', 'BLOCKYSIZE=32'] new_ds = gdaltest.tiledb_drv.CreateCopy('tmp/tiledb_custom', src_ds, options=options) bnd = new_ds.GetRasterBand(1) assert bnd.Checksum() == 50054, 'Didnt get expected checksum on still-open file' assert bnd.GetBlockSize() == [32, 32] bnd = None new_ds = None gdaltest.tiledb_drv.Delete('tmp/tiledb_custom') @pytest.mark.require_driver('TileDB') def test_tiledb_write_update(): try: import numpy as np except (ImportError): pytest.skip() gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') new_ds = gdaltest.tiledb_drv.Create('tmp/tiledb_update', 20, 20, 1, gdal.GDT_Byte) new_ds.GetRasterBand(1).WriteArray(np.zeros((20, 20))) del new_ds update_ds = gdal.Open('tmp/tiledb_update', gdal.GA_Update) update_bnd = update_ds.GetRasterBand(1) # make a partial block write update_bnd.WriteArray(np.ones((10, 10)) * 255) update_bnd = None update_ds = None test_ds = gdal.Open('tmp/tiledb_update') assert test_ds.GetRasterBand(1).Checksum() == 1217, 'Didnt get expected checksum on file update' test_ds = None gdaltest.tiledb_drv.Delete('tmp/tiledb_update') @pytest.mark.require_driver('TileDB') def test_tiledb_write_rgb(): gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') src_ds = gdal.Open('../gcore/data/rgbsmall.tif') new_ds = gdaltest.tiledb_drv.CreateCopy('tmp/tiledb_rgb', src_ds) assert new_ds.RasterCount == 3, 'Didnt get expected band count' bnd = new_ds.GetRasterBand(2) assert bnd.Checksum() == 21053, 'Didnt get expected checksum on still-open file' new_ds = None gdaltest.tiledb_drv.Delete('tmp/tiledb_rgb') @pytest.mark.require_driver('TileDB') def test_tiledb_write_attributes(): gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') src_ds = gdal.Open('../gcore/data/rgbsmall.tif') w, h, num_bands = src_ds.RasterXSize, src_ds.RasterYSize, src_ds.RasterCount # build attribute data in memory gdal.GetDriverByName('GTiff').Create('/vsimem/temp1.tif', w, h, num_bands, gdal.GDT_Int32) gdal.GetDriverByName('GTiff').Create('/vsimem/temp2.tif', w, h, num_bands, gdal.GDT_Float32) options = [ 'TILEDB_ATTRIBUTE=%s' % ('/vsimem/temp1.tif'), 'TILEDB_ATTRIBUTE=%s' % ('/vsimem/temp2.tif') ] new_ds = gdaltest.tiledb_drv.CreateCopy('tmp/tiledb_rgb_atts', src_ds, options=options) assert new_ds is not None assert new_ds.RasterXSize == src_ds.RasterXSize assert new_ds.RasterYSize == src_ds.RasterYSize assert new_ds.RasterCount == src_ds.RasterCount new_ds = None # check we can open the attributes with the band as well as the pixel values att1_ds = gdal.OpenEx('tmp/tiledb_rgb_atts', open_options=['TILEDB_ATTRIBUTE=temp1']) att2_ds = gdal.OpenEx('tmp/tiledb_rgb_atts', open_options=['TILEDB_ATTRIBUTE=temp2']) val_ds = gdal.Open('tmp/tiledb_rgb_atts') meta = val_ds.GetMetadata('IMAGE_STRUCTURE') assert 'TILEDB_ATTRIBUTE_1' in meta assert meta['TILEDB_ATTRIBUTE_1'] == 'temp1' assert 'TILEDB_ATTRIBUTE_2' in meta assert meta['TILEDB_ATTRIBUTE_2'] == 'temp2' assert att1_ds is not None assert att2_ds is not None assert val_ds is not None assert att1_ds.GetRasterBand(1).DataType == gdal.GDT_Int32 assert att2_ds.GetRasterBand(1).DataType == gdal.GDT_Float32 assert val_ds.RasterCount == src_ds.RasterCount assert val_ds.GetRasterBand(1).DataType == src_ds.GetRasterBand(1).DataType src_ds = None att1_ds = None att2_ds = None val_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/temp1.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/temp2.tif') gdaltest.tiledb_drv.Delete('tmp/tiledb_rgb_atts') @pytest.mark.require_driver('TileDB') @pytest.mark.require_driver('HDF5') def test_tiledb_write_subdatasets(): gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') src_ds = gdal.Open('data/DeepBlue-SeaWiFS-1.0_L3_20100101_v004-20130604T131317Z.h5') new_ds = gdaltest.tiledb_drv.CreateCopy('tmp/test_sds_array', src_ds, False) assert new_ds is not None new_ds = None src_ds = None src_ds = gdal.Open('TILEDB:"tmp/test_sds_array":viewing_zenith_angle') assert src_ds.GetRasterBand(1).Checksum() == 42472 src_ds = None src_ds = gdal.Open('TILEDB:"tmp/test_sds_array":i_dont_exist') assert not src_ds gdaltest.tiledb_drv.Delete('tmp/test_sds_array') @pytest.mark.require_driver('TileDB') def test_tiledb_write_band_meta(): gdaltest.tiledb_drv = gdal.GetDriverByName('TileDB') src_ds = gdal.Open('../gcore/data/rgbsmall.tif') new_ds = gdaltest.tiledb_drv.CreateCopy('tmp/tiledb_meta', src_ds) bnd = new_ds.GetRasterBand(1) bnd.SetMetadataItem('Item', 'Value') bnd = None new_ds = None src_ds = None new_ds = gdal.Open('tmp/tiledb_meta') assert new_ds.GetRasterBand(1).GetMetadataItem('Item') == 'Value' gdaltest.tiledb_drv.Delete('tmp/tiledb_meta')gdalautotest-3.1.2/gdrivers/mff.py0000775000175000017500000000443013701060015015637 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: mff.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test MFF driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Test reading a - fake - MFF dataset def test_mff_1(): tst = gdaltest.GDALTest('MFF', 'fakemff.hdr', 1, 1) return tst.testOpen() ############################################################################### # Test reading a - fake - tiled MFF dataset def test_mff_2(): tst = gdaltest.GDALTest('MFF', 'fakemfftiled.hdr', 1, 1) return tst.testOpen() ############################################################################### # Test reading a MFF file generated by CreateCopy() def test_mff_3(): tst = gdaltest.GDALTest('MFF', 'bytemff.hdr', 1, 4672) return tst.testOpen() gdalautotest-3.1.2/gdrivers/grib.py0000775000175000017500000020121513701060015016012 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: grib.py 111ddab546748482d008cd057ff8ccfe5171a236 2020-04-23 21:09:58 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GRIB driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # Copyright (c) 2008-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import struct import shutil from osgeo import gdal from osgeo import osr import pytest import gdaltest pytestmark = pytest.mark.require_driver('GRIB') def has_jp2kdrv(): for i in range(gdal.GetDriverCount()): if gdal.GetDriver(i).ShortName.startswith('JP2'): return True return False ############################################################################### # Do a simple checksum on our test file def test_grib_1(): tst = gdaltest.GDALTest('GRIB', 'grib/ds.mint.bin', 2, 46927) return tst.testOpen() ############################################################################### # Test a small GRIB 1 sample file. def test_grib_2(): tst = gdaltest.GDALTest('GRIB', 'grib/Sample_QuikSCAT.grb', 4, 50714) return tst.testOpen() ############################################################################### # This file has different raster sizes for some of the products, which # we sort-of-support per ticket Test a small GRIB 1 sample file. def test_grib_read_different_sizes_messages(): tst = gdaltest.GDALTest('GRIB', 'grib/bug3246.grb', 4, 4081) gdal.PushErrorHandler('CPLQuietErrorHandler') result = tst.testOpen() gdal.PopErrorHandler() msg = gdal.GetLastErrorMsg() if msg.find('data access may be incomplete') == -1 \ or gdal.GetLastErrorType() != 2: gdaltest.post_reason('did not get expected warning.') return result ############################################################################### # Check nodata def test_grib_grib2_read_nodata(): ds = gdal.Open('data/grib/ds.mint.bin') assert ds.GetRasterBand(1).GetNoDataValue() == 9999 assert ds.GetRasterBand(2).GetNoDataValue() == 9999 md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_REF_TIME': ' 1203613200 sec UTC', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '0 5 2 0 0 255 255 1 19 1 0 0 255 -1 -2147483647 2008 2 22 12 0 0 1 0 3 255 1 12 1 0', 'GRIB_VALID_TIME': ' 1203681600 sec UTC', 'GRIB_FORECAST_SECONDS': '68400 sec', 'GRIB_UNIT': '[C]', 'GRIB_PDS_TEMPLATE_NUMBERS': '0 5 2 0 0 0 255 255 1 0 0 0 19 1 0 0 0 0 0 255 129 255 255 255 255 7 216 2 22 12 0 0 1 0 0 0 0 3 255 1 0 0 0 12 1 0 0 0 0', 'GRIB_DISCIPLINE': '0(Meteorological)', 'GRIB_PDS_PDTN': '8', 'GRIB_COMMENT': 'Minimum temperature [C]', 'GRIB_SHORT_NAME': '0-SFC', 'GRIB_ELEMENT': 'MinT'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # Check grib units (#3606) def test_grib_read_units(): gdal.Unlink('tmp/ds.mint.bin.aux.xml') shutil.copy('data/grib/ds.mint.bin', 'tmp/ds.mint.bin') ds = gdal.Open('tmp/ds.mint.bin') md = ds.GetRasterBand(1).GetMetadata() if md['GRIB_UNIT'] != '[C]' or md['GRIB_COMMENT'] != 'Minimum temperature [C]': print(md) return ds.GetRasterBand(1).ComputeStatistics(False) if ds.GetRasterBand(1).GetMinimum() != pytest.approx(13, abs=1): print(ds.GetRasterBand(1).GetMinimum()) return ds = None os.unlink('tmp/ds.mint.bin.aux.xml') gdal.SetConfigOption('GRIB_NORMALIZE_UNITS', 'NO') ds = gdal.Open('tmp/ds.mint.bin') gdal.SetConfigOption('GRIB_NORMALIZE_UNITS', None) md = ds.GetRasterBand(1).GetMetadata() if md['GRIB_UNIT'] != '[K]' or md['GRIB_COMMENT'] != 'Minimum temperature [K]': print(md) return ds.GetRasterBand(1).ComputeStatistics(False) if ds.GetRasterBand(1).GetMinimum() != pytest.approx(286, abs=1): print(ds.GetRasterBand(1).GetMinimum()) return ds = None gdal.GetDriverByName('GRIB').Delete('tmp/ds.mint.bin') ############################################################################### # Handle geotransform for 1xn or nx1 grids. The geotransform was faulty when # grib files had one cell in either direction for geographic projections. See # ticket #5532 def test_grib_read_geotransform_one_n_or_n_one(): ds = gdal.Open('data/grib/one_one.grib2') egt = (-114.25, 0.5, 0.0, 47.250, 0.0, -0.5) gt = ds.GetGeoTransform() ds = None if gt != egt: print(gt, '!=', egt) pytest.fail('Invalid geotransform') ############################################################################### # This is more a /vsizip/ file test than a GRIB one, but could not easily # come up with a pure /vsizip/ test case, so here's a real world use # case (#5530). def test_grib_read_vsizip(): ds = gdal.Open('/vsizip/data/grib/gfs.t00z.mastergrb2f03.zip/gfs.t00z.mastergrb2f03') assert ds is not None ############################################################################### # Write PDS numbers to all bands def test_grib_grib2_test_grib_pds_all_bands(): ds = gdal.Open('/vsizip/data/grib/gfs.t00z.mastergrb2f03.zip/gfs.t00z.mastergrb2f03') assert ds is not None band = ds.GetRasterBand(2) md = band.GetMetadataItem('GRIB_PDS_TEMPLATE_NUMBERS') ds = None assert md is not None, 'Failed to fetch pds numbers (#5144)' gdal.SetConfigOption('GRIB_PDS_ALL_BANDS', 'OFF') ds = gdal.Open('/vsizip/data/grib/gfs.t00z.mastergrb2f03.zip/gfs.t00z.mastergrb2f03') assert ds is not None band = ds.GetRasterBand(2) md = band.GetMetadataItem('GRIB_PDS_TEMPLATE_NUMBERS') ds = None assert md is None, 'Got pds numbers, when disabled (#5144)' ############################################################################### # Test support for template 4.15 (#5768) def test_grib_grib2_read_template_4_15(): import test_cli_utilities if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' data/grib/template_4_15.grb2 -checksum') # This is a JPEG2000 compressed file, so just check we can open it or that we get a message saying there's no JPEG2000 driver available assert 'Checksum=' in ret or 'Is the JPEG2000 driver available?' in err, \ 'Could not open file' ############################################################################### # Test support for PNG compressed def test_grib_grib2_read_png(): if gdal.GetDriverByName('PNG') is None: pytest.skip() ds = gdal.Open('data/grib/MRMS_EchoTop_18_00.50_20161015-133230.grib2') cs = ds.GetRasterBand(1).Checksum() assert cs == 41854, 'Could not open file' ############################################################################### # Test support for GRIB2 Section 4 Template 32, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for synthetic satellite data. def test_grib_grib2_read_template_4_32(): # First band extracted from http://nomads.ncep.noaa.gov/pub/data/nccf/com/hur/prod/hwrf.2017102006/twenty-se27w.2017102006.hwrfsat.core.0p02.f000.grb2 ds = gdal.Open('data/grib/twenty-se27w.2017102006.hwrfsat.core.0p02.f000_truncated.grb2') cs = ds.GetRasterBand(1).Checksum() assert cs == 48230, 'Could not open file' assert ds.GetRasterBand(1).ComputeRasterMinMax() == pytest.approx((-9.765,2.415), 1e-3) # Reasonable range for Celcius md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_REF_TIME': ' 1508479200 sec UTC', 'GRIB_VALID_TIME': ' 1508479200 sec UTC', 'GRIB_FORECAST_SECONDS': '0 sec', 'GRIB_UNIT': '[C]', 'GRIB_PDS_TEMPLATE_NUMBERS': '5 7 2 0 0 0 0 0 1 0 0 0 0 1 0 31 1 29 67 140 2 0 0 238 217', 'GRIB_PDS_PDTN': '32', 'GRIB_COMMENT': 'Brightness Temperature [C]', 'GRIB_SHORT_NAME': '0 undefined', 'GRIB_ELEMENT': 'BRTEMP', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '5 7 2 0 0 0 0 1 0 1 31 285 17292 2 61145'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # GRIB2 file with all 0 data def test_grib_grib2_read_all_zero_data(): # From http://dd.weather.gc.ca/model_wave/great_lakes/erie/grib2/00/CMC_rdwps_lake-erie_ICEC_SFC_0_latlon0.05x0.05_2017111800_P000.grib2 ds = gdal.Open('data/grib/CMC_rdwps_lake-erie_ICEC_SFC_0_latlon0.05x0.05_2017111800_P000.grib2') cs = ds.GetRasterBand(1).Checksum() assert cs == 0, 'Could not open file' md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_REF_TIME': ' 1510963200 sec UTC', 'GRIB_VALID_TIME': ' 1510963200 sec UTC', 'GRIB_FORECAST_SECONDS': '0 sec', 'GRIB_UNIT': '[Proportion]', 'GRIB_PDS_TEMPLATE_NUMBERS': '2 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 255 255 255 255 255 255', 'GRIB_PDS_PDTN': '0', 'GRIB_COMMENT': 'Ice cover [Proportion]', 'GRIB_SHORT_NAME': '0-SFC', 'GRIB_ELEMENT': 'ICEC'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # GRIB1 file with rotate pole lonlat def test_grib_grib1_read_rotated_pole_lonlat(): ds = gdal.Open('/vsisparse/data/grib/rotated_pole.grb.xml') assert ds.RasterXSize == 726 and ds.RasterYSize == 550, \ 'Did not get expected dimensions' projection = ds.GetProjectionRef() expected_projection_proj_7 = 'GEOGCRS["Coordinate System imported from GRIB file",BASEGEOGCRS["Coordinate System imported from GRIB file",DATUM["unnamed",ELLIPSOID["Sphere",6367470,0,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],DERIVINGCONVERSION["Pole rotation (GRIB convention)",METHOD["Pole rotation (GRIB convention)"],PARAMETER["Latitude of the southern pole (GRIB convention)",-30,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],PARAMETER["Longitude of the southern pole (GRIB convention)",-15,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],PARAMETER["Axis rotation (GRIB convention)",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],CS[ellipsoidal,2],AXIS["latitude",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["longitude",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]' expected_projection_before_proj_7 = 'PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Sphere",6367470,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Rotated_pole"],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=ob_tran +lon_0=-15 +o_proj=longlat +o_lon_p=0 +o_lat_p=30 +a=6367470 +b=6367470 +to_meter=0.0174532925199 +wktext"]]' assert projection in (expected_projection_proj_7, expected_projection_before_proj_7), projection if projection == expected_projection_proj_7: assert ds.GetSpatialRef().IsDerivedGeographic() gt = ds.GetGeoTransform() expected_gt = (-30.25, 0.1, 0.0, 24.15, 0.0, -0.1) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_REF_TIME': ' 1503295200 sec UTC', 'GRIB_VALID_TIME': ' 1503295200 sec UTC', 'GRIB_FORECAST_SECONDS': '0 sec', 'GRIB_UNIT': '[m^2/s^2]', 'GRIB_COMMENT': 'Geopotential [m^2/s^2]', 'GRIB_SHORT_NAME': '0-HTGL', 'GRIB_ELEMENT': 'GP'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # GRIB2 file with rotate pole lonlat def test_grib_grib2_read_rotated_pole_lonlat(): ds = gdal.Open('/vsisparse/data/grib/rotated_pole.grb2.xml') assert ds.RasterXSize == 1102 and ds.RasterYSize == 1076 projection = ds.GetProjectionRef() expected_projection_proj_7 = 'GEOGCRS["Coordinate System imported from GRIB file",BASEGEOGCRS["Coordinate System imported from GRIB file",DATUM["unnamed",ELLIPSOID["Sphere",6371229,0,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],DERIVINGCONVERSION["Pole rotation (GRIB convention)",METHOD["Pole rotation (GRIB convention)"],PARAMETER["Latitude of the southern pole (GRIB convention)",-31.758312,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],PARAMETER["Longitude of the southern pole (GRIB convention)",-92.402969,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],PARAMETER["Axis rotation (GRIB convention)",0,ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]],CS[ellipsoidal,2],AXIS["latitude",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["longitude",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]' expected_projection_before_proj_7 = 'PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Sphere",6371229,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Rotated_pole"],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=ob_tran +lon_0=-92.4029689999999846 +o_proj=longlat +o_lon_p=0 +o_lat_p=31.7583120000000001 +a=6371229 +b=6371229 +to_meter=0.0174532925199 +wktext"]]' assert projection in (expected_projection_proj_7, expected_projection_before_proj_7), projection gt = ds.GetGeoTransform() expected_gt = (-62.6222310049955, 0.09000000999091741, 0.0, 48.28500200186046, 0.0, -0.09000000372093023) assert gt == pytest.approx(expected_gt, 1e-3) ############################################################################### # Test support for GRIB2 Section 4 Template 40, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents def test_grib_grib2_read_template_4_40(): # We could use some other encoding that JP2K... if not has_jp2kdrv(): pytest.skip() # First band extracted from https://download.regional.atmosphere.copernicus.eu/services/CAMS50?token=__M0bChV6QsoOFqHz31VRqnpr4GhWPtcpaRy3oeZjBNSg__&grid=0.1&model=ENSEMBLE&package=ANALYSIS_PM10_SURFACE&time=-24H-1H&referencetime=2017-09-12T00:00:00Z&format=GRIB2&licence=yes # with data nullified ds = gdal.Open('data/grib/template_4_40.grb2') md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_REF_TIME': ' 1505088000 sec UTC', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127 -2147483647', 'GRIB_VALID_TIME': ' 1505088000 sec UTC', 'GRIB_FORECAST_SECONDS': '0 sec', 'GRIB_UNIT': '[kg/(m^3)]', 'GRIB_PDS_TEMPLATE_NUMBERS': '20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255 255', 'GRIB_PDS_PDTN': '40', 'GRIB_COMMENT': 'Mass Density (Concentration) [kg/(m^3)]', 'GRIB_SHORT_NAME': '0-SFC', 'GRIB_ELEMENT': 'MASSDEN'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # Test support for a unhandled GRIB2 Section 4 Template def test_grib_grib2_read_template_4_unhandled(): with gdaltest.error_handler(): ds = gdal.Open('data/grib/template_4_65535.grb2') md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_TEMPLATE_NUMBERS': '0 1 2 3 4 5', 'GRIB_PDS_PDTN': '65535'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # Test reading GRIB2 Transverse Mercator grid def test_grib_grib2_read_transverse_mercator(): ds = gdal.Open('data/grib/transverse_mercator.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Sphere",6367470,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 Mercator grid def test_grib_grib2_read_mercator(): ds = gdal.Open('data/grib/mercator.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (-13095853.598139772, 72.237, 0.0, 3991876.4600486886, 0.0, -72.237) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 Mercator grid def test_grib_grib2_read_mercator_2sp(): ds = gdal.Open('data/grib/mercator_2sp.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",33.5],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (-10931598.94836207, 60.299, 0.0, 3332168.629121481, 0.0, -60.299) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 Lambert Conformal Conic grid def test_grib_grib2_read_lcc(): ds = gdal.Open('data/grib/lambert_conformal_conic.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",117],PARAMETER["standard_parallel_1",33],PARAMETER["standard_parallel_2",34],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (8974734.737685828, 60.021, 0.0, 6235918.9698001575, 0.0, -60.021) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 Polar Stereographic grid def test_grib_grib2_read_polar_stereo(): ds = gdal.Open('data/grib/polar_stereographic.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",60],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",SOUTH],AXIS["Northing",SOUTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (-5621962.072511509, 71.86, 0.0, 2943991.8007649644, 0.0, -71.86) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 Albers Equal Area grid def test_grib_grib2_read_aea(): ds = gdal.Open('data/grib/albers_equal_area.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["latitude_of_center",33.5],PARAMETER["longitude_of_center",117],PARAMETER["standard_parallel_1",33],PARAMETER["standard_parallel_2",34],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (8974979.714292033, 60.022, 0.0, 6235686.52464211, 0.0, -60.022) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 Lambert Azimuthal Equal Area grid def test_grib_grib2_read_laea(): ds = gdal.Open('data/grib/lambert_azimuthal_equal_area.grb2') projection = ds.GetProjectionRef() expected_projection = """PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",33.5],PARAMETER["longitude_of_center",243],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" assert projection == expected_projection, 'Did not get expected projection' gt = ds.GetGeoTransform() expected_gt = (-59384.01063035424, 60.021, 0.0, 44812.5792223211, 0.0, -60.021) assert max([abs(gt[i] - expected_gt[i]) for i in range(6)]) <= 1e-3, \ 'Did not get expected geotransform' ############################################################################### # Test reading GRIB2 with Grid point data - IEEE Floating Point Data (template 5.4) def test_grib_grib2_read_template_5_4_grid_point_ieee_floating_point(): ds = gdal.Open('data/grib/ieee754_single.grb2') cs = ds.GetRasterBand(1).Checksum() assert cs == 4727, 'Did not get expected checksum' ds = gdal.Open('data/grib/ieee754_double.grb2') cs = ds.GetRasterBand(1).Checksum() assert cs == 4727, 'Did not get expected checksum' ############################################################################### # Test reading GRIB2 with NBITS=0 and DECIMAL_SCALE !=0 def test_grib_grib2_read_section_5_nbits_zero_decimal_scaled(): ds = gdal.Open('data/grib/simple_packing_nbits_zero_decimal_scaled.grb2') cs = ds.GetRasterBand(1).Checksum() assert cs == 5, 'Did not get expected checksum' if gdal.GetDriverByName('PNG') is not None: ds = gdal.Open('data/grib/png_nbits_zero_decimal_scaled.grb2') cs = ds.GetRasterBand(1).Checksum() assert cs == 5, 'Did not get expected checksum' if has_jp2kdrv(): ds = gdal.Open('data/grib/jpeg2000_nbits_zero_decimal_scaled.grb2') cs = ds.GetRasterBand(1).Checksum() assert cs == 5, 'Did not get expected checksum' ############################################################################### # Test reading GRIB2 with complex packing and spatial differencing of order 1 def test_grib_grib2_read_spatial_differencing_order_1(): ds = gdal.Open('data/grib/spatial_differencing_order_1.grb2') cs = ds.GetRasterBand(1).Checksum() if cs != 46650: gdaltest.post_reason('Did not get expected checksum') print(cs) ############################################################################### # Test GRIB2 creation options def test_grib_grib2_write_creation_options(): tmpfilename = '/vsimem/out.grb2' gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "DISCIPLINE=1", "IDS=CENTER=85(Toulouse) SUBCENTER=2 MASTER_TABLE=5 LOCAL_TABLE=0 SIGNF_REF_TIME=0(Analysis) REF_TIME=2017-09-11T12:34:56Z PROD_STATUS=2(Research) TYPE=0(Analysis)", "IDS_SUBCENTER=3", # Test that it overrides IDS "PDS_PDTN=30", "BAND_1_PDS_PDTN=40", # Test that it overrides PDS_PDTN "PDS_TEMPLATE_NUMBERS=20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255 255" ]) ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_IDS': 'CENTER=85(Toulouse) SUBCENTER=3 MASTER_TABLE=5 LOCAL_TABLE=0 SIGNF_REF_TIME=0(Analysis) REF_TIME=2017-09-11T12:34:56Z PROD_STATUS=2(Research) TYPE=0(Analysis)', 'GRIB_PDS_TEMPLATE_NUMBERS': '20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255 255', 'GRIB_DISCIPLINE': '1(Hydrological)', 'GRIB_PDS_PDTN': '40'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_NUMBERS and more elements than needed (warning) with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=40", "PDS_TEMPLATE_NUMBERS=20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255 255 0extra" ]) assert out_ds is not None out_ds = None ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '40', 'GRIB_PDS_TEMPLATE_NUMBERS': '20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255 255 0'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES and insufficient number of elements with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=40", "PDS_TEMPLATE_NUMBERS=20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255" ]) assert out_ds is None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=40", "PDS_TEMPLATE_ASSEMBLED_VALUES=20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127 -2147483647" ]) ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '40', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127 -2147483647'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES and more elements than needed (warning) with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=40", "PDS_TEMPLATE_ASSEMBLED_VALUES=20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127 -2147483647 0extra" ]) assert out_ds is not None out_ds = None ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '40', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127 -2147483647'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES and insufficient number of elements with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=40", "PDS_TEMPLATE_ASSEMBLED_VALUES=20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127" ]) assert out_ds is None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES with variable number of elements gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=32", "PDS_TEMPLATE_ASSEMBLED_VALUES=5 7 2 0 0 0 0 1 0 2 31 285 17292 2 61145 31 285 17292 2 61145" ]) ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '32', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '5 7 2 0 0 0 0 1 0 2 31 285 17292 2 61145 31 285 17292 2 61145'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES with variable number of elements, and insufficient number of elements in the variable section with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=32", "PDS_TEMPLATE_ASSEMBLED_VALUES=5 7 2 0 0 0 0 1 0 2 31 285 17292 2 61145 31 285 17292 2" ]) assert out_ds is None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_ASSEMBLED_VALUES with variable number of elements, and extra elements with gdaltest.error_handler(): gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=32", "PDS_TEMPLATE_ASSEMBLED_VALUES=5 7 2 0 0 0 0 1 0 2 31 285 17292 2 61145 31 285 17292 2 61145 0extra" ]) ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '32', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '5 7 2 0 0 0 0 1 0 2 31 285 17292 2 61145 31 285 17292 2 61145'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with PDS_TEMPLATE_NUMBERS with variable number of elements gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=32", "PDS_TEMPLATE_NUMBERS=5 7 2 0 0 0 0 0 1 0 0 0 0 2 0 31 1 29 67 140 2 0 0 238 217 0 31 1 29 67 140 2 0 0 238 217" ]) ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '32', 'GRIB_PDS_TEMPLATE_ASSEMBLED_VALUES': '5 7 2 0 0 0 0 1 0 2 31 285 17292 2 61145 31 285 17292 2 61145'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with unknown PDS_PDTN with PDS_TEMPLATE_NUMBERS with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=65535", "PDS_TEMPLATE_NUMBERS=1 2 3 4 5" ]) assert out_ds is not None out_ds = None with gdaltest.error_handler(): ds = gdal.Open(tmpfilename) md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_PDS_PDTN': '65535', 'GRIB_PDS_TEMPLATE_NUMBERS': '1 2 3 4 5'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ds = None gdal.Unlink(tmpfilename) # Test with unknown PDS_PDTN with PDS_TEMPLATE_ASSEMBLED_VALUES with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=65535", "PDS_TEMPLATE_ASSEMBLED_VALUES=1 2 3 4 5" ]) assert out_ds is None gdal.Unlink(tmpfilename) # Test with PDS_PDTN != 0 without template numbers with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=32" ]) assert out_ds is None gdal.Unlink(tmpfilename) # Test with invalid values in PDS_TEMPLATE_NUMBERS with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=254", "PDS_TEMPLATE_NUMBERS=-1 256 0 0 0 0" ]) assert out_ds is not None out_ds = None gdal.Unlink(tmpfilename) # Test with invalid values in PDS_TEMPLATE_ASSEMBLED_VALUES with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=44", # {44,21,0, {1, 1, 2,1,-1, -4, -1,-4,1,1,1, 2, 1,1,-2 ,1,-1, -4,1,-1,-4} }, "PDS_TEMPLATE_ASSEMBLED_VALUES=-1 256 -1 1 128 4000000000 -1 -4 1 1 1 65536 1 1 32768 1 -129 -4 1 -1 -4" ]) assert out_ds is not None out_ds = None gdal.Unlink(tmpfilename) # Test with both PDS_TEMPLATE_NUMBERS and PDS_TEMPLATE_ASSEMBLED_VALUES with gdaltest.error_handler(): out_ds = gdal.Translate(tmpfilename, 'data/byte.tif', format='GRIB', creationOptions=[ "PDS_PDTN=40", "PDS_TEMPLATE_NUMBERS=20 0 156 72 0 255 99 0 0 0 1 0 0 0 0 1 255 255 255 255 255 255 255 255 255 255 255", "PDS_TEMPLATE_ASSEMBLED_VALUES=20 0 40008 0 255 99 0 0 1 0 1 -127 -2147483647 255 -127 -2147483647" ]) assert out_ds is None gdal.Unlink(tmpfilename) ############################################################################### # Test GRIB2 write support for projections def test_grib_grib2_write_projections(): filenames = ['albers_equal_area.grb2', 'lambert_azimuthal_equal_area.grb2', 'lambert_conformal_conic.grb2', 'mercator.grb2', 'mercator_2sp.grb2', 'polar_stereographic.grb2', 'ieee754_single.grb2' # Longitude latitude ] for filename in filenames: filename = 'data/grib/' + filename src_ds = gdal.Open(filename) tmpfilename = '/vsimem/out.grb2' gdal.Translate(tmpfilename, filename, format='GRIB') out_ds = gdal.Open(tmpfilename) assert src_ds.GetProjectionRef() == out_ds.GetProjectionRef(), \ ('did not get expected projection for %s' % filename) expected_gt = src_ds.GetGeoTransform() got_gt = out_ds.GetGeoTransform() assert max([abs(expected_gt[i] - got_gt[i]) for i in range(6)]) <= 1e-5, \ ('did not get expected geotransform for %s' % filename) out_ds = None gdal.Unlink(tmpfilename) # Test writing GRS80 src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 1, gdal.GDT_Float32) src_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) src_ds.SetProjection("""GEOGCS["GRS 1980(IUGG, 1980)", DATUM["unknown", SPHEROID["GRS80",6378137,298.257222101]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433]]""") tmpfilename = '/vsimem/out.grb2' out_ds = gdaltest.grib_drv.CreateCopy(tmpfilename, src_ds) wkt = out_ds.GetProjectionRef() out_ds = None gdal.Unlink(tmpfilename) assert 'SPHEROID["GRS80",6378137,298.257222101]' in wkt # Test writing Mercator_1SP with scale != 1 (will be read as Mercator_2SP) src_ds = gdal.Warp('', 'data/byte.tif', format='MEM', dstSRS="""PROJCS["unnamed", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4267"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",0.8347374126019634], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""") tmpfilename = '/vsimem/out.grb2' gdal.Translate(tmpfilename, src_ds, format='GRIB') out_ds = gdal.Open(tmpfilename) expected_wkt = 'PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Spheroid imported from GRIB file",6378206.4,294.978698213911]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",33.500986],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' got_sr = osr.SpatialReference() got_sr.SetFromUserInput(out_ds.GetProjectionRef()) expected_sr = osr.SpatialReference() expected_sr.SetFromUserInput(expected_wkt) if got_sr.IsSame(expected_sr) == 0: print(out_ds.GetProjectionRef()) pytest.fail('did not get expected projection for Mercator_1SP') expected_gt = (-10931635.565066436, 60.297, 0.0, 3331982.221608528, 0.0, -60.297) got_gt = out_ds.GetGeoTransform() assert max([abs(expected_gt[i] - got_gt[i]) for i in range(6)]) <= 1e-5, \ 'did not get expected geotransform for Mercator_1SP' out_ds = None gdal.Unlink(tmpfilename) # Test writing LCC_1SP (will be read as LCC_2SP) src_ds = gdal.Warp('', 'data/byte.tif', format='MEM', dstSRS="""PROJCS["unnamed", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4267"]], PROJECTION["Lambert_Conformal_Conic_1SP"], PARAMETER["latitude_of_origin",33.5], PARAMETER["central_meridian",117], PARAMETER["scale_factor",0.9999], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1]]""") tmpfilename = '/vsimem/out.grb2' gdal.Translate(tmpfilename, src_ds, format='GRIB') out_ds = gdal.Open(tmpfilename) expected_wkt = 'PROJCS["unnamed",GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Spheroid imported from GRIB file",6378206.4,294.978698213911]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["latitude_of_origin",33.5],PARAMETER["central_meridian",117],PARAMETER["standard_parallel_1",34.310911],PARAMETER["standard_parallel_2",32.686501],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' got_sr = osr.SpatialReference() got_sr.SetFromUserInput(out_ds.GetProjectionRef()) expected_sr = osr.SpatialReference() expected_sr.SetFromUserInput(expected_wkt) if got_sr.IsSame(expected_sr) == 0: print(out_ds.GetProjectionRef()) pytest.fail('did not get expected projection for LCC_1SP') expected_gt = (8974472.884926716, 60.017, 0.0, 6235685.688523474, 0.0, -60.017) got_gt = out_ds.GetGeoTransform() assert max([abs(expected_gt[i] - got_gt[i]) for i in range(6)]) <= 1e-5, \ 'did not get expected geotransform for LCC_1SP' out_ds = None gdal.Unlink(tmpfilename) ############################################################################### def _grib_read_section(filename, sect_num_to_read): f = gdal.VSIFOpenL(filename, 'rb') if f is None: return None # Ignore Sect 0 gdal.VSIFReadL(1, 16, f) ret = None while True: sect_size_bytes = gdal.VSIFReadL(1, 4, f) if not sect_size_bytes: break sect_size_num = struct.unpack('>I', sect_size_bytes)[0] sect_num_bytes = gdal.VSIFReadL(1, 1, f) sect_num = ord(sect_num_bytes) if sect_num == sect_num_to_read: ret = sect_size_bytes + sect_num_bytes + gdal.VSIFReadL(1, sect_size_num - 5, f) break gdal.VSIFSeekL(f, sect_size_num - 5, 1) gdal.VSIFCloseL(f) return ret ############################################################################### # Test GRIB2 write support for data encodings def test_grib_grib2_write_data_encodings(): # Template 5 numbers GS5_SIMPLE = 0 GS5_CMPLX = 2 GS5_CMPLXSEC = 3 GS5_IEEE = 4 GS5_JPEG2000 = 40 GS5_PNG = 41 tests = [] tests += [['data/byte.tif', [], 4672, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING'], 4672, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=IEEE_FLOATING_POINT'], 4672, GS5_IEEE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'NBITS=8'], 4672, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'NBITS=9'], 4672, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'NBITS=7'], 4484, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'DECIMAL_SCALE_FACTOR=-1'], 4820, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'NBITS=5', 'DECIMAL_SCALE_FACTOR=-1'], 4820, GS5_SIMPLE]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'NBITS=8', 'DECIMAL_SCALE_FACTOR=-1'], 4855, GS5_SIMPLE]] tests += [['data/grib/ds.mint.bin', ['PDS_PDTN=8', 'PDS_TEMPLATE_ASSEMBLED_VALUES=0 5 2 0 0 255 255 1 19 1 0 0 255 -1 -2147483647 2008 2 22 12 0 0 1 0 3 255 1 12 1 0'], 46650, GS5_CMPLX]] # has nodata, hence complex packing tests += [['data/byte.tif', ['DATA_ENCODING=COMPLEX_PACKING'], 4672, GS5_CMPLX]] tests += [['data/byte.tif', ['DATA_ENCODING=COMPLEX_PACKING', 'SPATIAL_DIFFERENCING_ORDER=0'], 4672, GS5_CMPLX]] tests += [['data/byte.tif', ['SPATIAL_DIFFERENCING_ORDER=1'], 4672, GS5_CMPLXSEC]] tests += [['data/byte.tif', ['DATA_ENCODING=COMPLEX_PACKING', 'SPATIAL_DIFFERENCING_ORDER=1'], 4672, GS5_CMPLXSEC]] tests += [['data/byte.tif', ['DATA_ENCODING=COMPLEX_PACKING', 'SPATIAL_DIFFERENCING_ORDER=2'], 4672, GS5_CMPLXSEC]] tests += [['data/byte.tif', ['DATA_ENCODING=COMPLEX_PACKING', 'DECIMAL_SCALE_FACTOR=-1'], 4820, GS5_CMPLX]] tests += [['data/byte.tif', ['DATA_ENCODING=COMPLEX_PACKING', 'NBITS=7'], 4484, GS5_CMPLX]] if gdal.GetDriverByName('PNG') is not None: tests += [['data/byte.tif', ['DATA_ENCODING=PNG'], 4672, GS5_PNG]] tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=8'], 4672, GS5_PNG]] tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'DECIMAL_SCALE_FACTOR=-1'], 4820, GS5_PNG]] tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=8', 'DECIMAL_SCALE_FACTOR=-1'], 4855, GS5_PNG]] tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=9'], 4672, GS5_PNG]] # rounded to 16 bit tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=7'], 4672, GS5_PNG]] # rounded to 8 bit tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=4'], 5103, GS5_PNG]] tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=3'], 5103, GS5_PNG]] # rounded to 4 bit tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=2'], 5103, GS5_PNG]] tests += [['data/byte.tif', ['DATA_ENCODING=PNG', 'NBITS=1'], 5103, GS5_PNG]] tests += [['../gcore/data/float32.tif', ['DATA_ENCODING=PNG'], 4672, GS5_PNG]] found_j2k_drivers = [] for drvname in ['JP2KAK', 'JP2OPENJPEG', 'JPEG2000', 'JP2ECW']: if gdal.GetDriverByName(drvname) is not None: if drvname != 'JP2ECW': found_j2k_drivers.append(drvname) else: import ecw if ecw.has_write_support(): found_j2k_drivers.append(drvname) if found_j2k_drivers: tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000'], 4672, GS5_JPEG2000]] tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000', 'COMPRESSION_RATIO=2'], 4672, GS5_JPEG2000]] # COMPRESSION_RATIO ignored in that case tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000', 'NBITS=8'], 4672, GS5_JPEG2000]] tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000', 'DECIMAL_SCALE_FACTOR=-1'], (4820, 4722), GS5_JPEG2000]] tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000', 'NBITS=8', 'DECIMAL_SCALE_FACTOR=-1'], (4855, 4795), GS5_JPEG2000]] tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000', 'NBITS=9'], 4672, GS5_JPEG2000]] # 4899 for JP2ECW, 4440 for JP2OPENJPEG tests += [['data/byte.tif', ['DATA_ENCODING=JPEG2000', 'NBITS=7'], (4484, 4899, 4440), GS5_JPEG2000]] for drvname in found_j2k_drivers: tests += [['data/byte.tif', ['JPEG2000_DRIVER=' + drvname], 4672, GS5_JPEG2000]] tests += [['../gcore/data/float32.tif', ['DATA_ENCODING=JPEG2000'], 4672, GS5_JPEG2000]] tests += [['../gcore/data/int16.tif', [], 4672, GS5_SIMPLE]] tests += [['../gcore/data/uint16.tif', [], 4672, GS5_SIMPLE]] tests += [['../gcore/data/int32.tif', [], 4672, GS5_SIMPLE]] tests += [['../gcore/data/uint32.tif', [], 4672, GS5_SIMPLE]] tests += [['../gcore/data/float32.tif', [], 4672, GS5_IEEE]] tests += [['../gcore/data/float64.tif', [], 4672, GS5_IEEE]] tests += [['../gcore/data/float32.tif', ['DATA_ENCODING=IEEE_FLOATING_POINT'], 4672, GS5_IEEE]] tests += [['../gcore/data/float64.tif', ['DATA_ENCODING=IEEE_FLOATING_POINT'], 4672, GS5_IEEE]] tests += [['../gcore/data/float32.tif', ['DATA_ENCODING=COMPLEX_PACKING'], 4672, GS5_CMPLX]] one_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) one_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') one_ds.SetProjection(sr.ExportToWkt()) one_ds.GetRasterBand(1).Fill(1) tests += [[one_ds, [], 1, GS5_SIMPLE]] tests += [[one_ds, ['DATA_ENCODING=COMPLEX_PACKING'], 1, GS5_CMPLX]] if gdal.GetDriverByName('PNG') is not None: tests += [[one_ds, ['DATA_ENCODING=PNG'], 1, GS5_PNG]] if found_j2k_drivers: tests += [[one_ds, ['DATA_ENCODING=JPEG2000'], 1, GS5_JPEG2000]] nodata_never_hit_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) nodata_never_hit_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) nodata_never_hit_ds.SetProjection(sr.ExportToWkt()) nodata_never_hit_ds.GetRasterBand(1).SetNoDataValue(1) tests += [[nodata_never_hit_ds, [], 0, GS5_SIMPLE]] all_nodata_ds = gdal.GetDriverByName('MEM').Create('', 1, 1) all_nodata_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) all_nodata_ds.SetProjection(sr.ExportToWkt()) all_nodata_ds.GetRasterBand(1).SetNoDataValue(0) tests += [[all_nodata_ds, ['DATA_ENCODING=COMPLEX_PACKING'], 0, GS5_CMPLX]] for (filename, options, expected_cs, expected_section5_template_number) in tests: tmpfilename = '/vsimem/out.grb2' gdal.ErrorReset() gdal.Translate(tmpfilename, filename, format='GRIB', creationOptions=options) error_msg = gdal.GetLastErrorMsg() assert error_msg == '', \ ('did not expect error for %s, %s' % (str(filename), str(options))) section5 = _grib_read_section(tmpfilename, 5) section5_template_number = struct.unpack('>h', section5[9:11])[0] assert section5_template_number == expected_section5_template_number, \ ('did not get expected section 5 template number for %s, %s' % (str(filename), str(options))) out_ds = gdal.Open(tmpfilename) cs = out_ds.GetRasterBand(1).Checksum() nd = out_ds.GetRasterBand(1).GetNoDataValue() out_ds = None gdal.Unlink(tmpfilename) if not isinstance(expected_cs, tuple): expected_cs = (expected_cs,) assert cs in expected_cs, \ ('did not get expected checksum for %s, %s' % (str(filename), str(options))) if section5_template_number in (GS5_CMPLX, GS5_CMPLXSEC): if isinstance(filename, str): ref_ds = gdal.Open(filename) else: ref_ds = filename expected_nd = ref_ds.GetRasterBand(1).GetNoDataValue() assert nd == expected_nd, \ ('did not get expected nodata for %s, %s' % (str(filename), str(options))) # Test floating point data with dynamic < 1 test_ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 1, gdal.GDT_Float32) test_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) test_ds.SetProjection(sr.ExportToWkt()) test_ds.WriteRaster(0, 0, 2, 2, struct.pack(4 * 'f', 1.23, 1.45, 1.56, 1.78)) encodings = ['SIMPLE_PACKING', 'COMPLEX_PACKING', 'IEEE_FLOATING_POINT'] if gdal.GetDriverByName('PNG') is not None: encodings += ['PNG'] # JPEG2000 doesn't result in an appropriate result if found_j2k_drivers and found_j2k_drivers != ['JPEG2000'] and found_j2k_drivers != ['JPEG2000', 'JP2ECW']: encodings += ['JPEG2000'] for encoding in encodings: tmpfilename = '/vsimem/out.grb2' gdal.ErrorReset() options = ['DATA_ENCODING=' + encoding] if encoding == 'COMPLEX_PACKING': with gdaltest.error_handler(): success = gdal.Translate(tmpfilename, test_ds, format='GRIB', creationOptions=options) assert not success, \ ('expected error for %s, %s' % ('floating point data with dynamic < 1', str(options))) else: gdal.Translate(tmpfilename, test_ds, format='GRIB', creationOptions=options) error_msg = gdal.GetLastErrorMsg() assert error_msg == '', \ ('did not expect error for %s, %s' % ('floating point data with dynamic < 1', str(options))) out_ds = gdal.Open(tmpfilename) got_vals = struct.unpack(4 * 'd', out_ds.ReadRaster()) out_ds = None if encoding == 'IEEE_FLOATING_POINT': expected_vals = (1.23, 1.45, 1.56, 1.78) else: expected_vals = (1.2300000190734863, 1.4487500190734863, 1.5581250190734863, 1.7807812690734863) assert max([abs(got_vals[i] - expected_vals[i]) for i in range(4)]) <= 1e-7, \ 'did not get expected values' gdal.Unlink(tmpfilename) test_ds = None # Test floating point data with very large dynamic test_ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 1, gdal.GDT_Float32) test_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) test_ds.SetProjection(sr.ExportToWkt()) test_ds.WriteRaster(0, 0, 2, 2, struct.pack(4 * 'f', 1.23e10, -2.45e10, 1.23e10, -2.45e10)) encodings = ['SIMPLE_PACKING'] if gdal.GetDriverByName('PNG') is not None: encodings += ['PNG'] # JP2ECW doesn't manage to compress such a small file if found_j2k_drivers and found_j2k_drivers != ['JP2ECW'] and found_j2k_drivers != ['JPEG2000', 'JP2ECW']: encodings += ['JPEG2000'] for encoding in encodings: tmpfilename = '/vsimem/out.grb2' if encoding != 'SIMPLE_PACKING': gdal.PushErrorHandler() gdal.Translate(tmpfilename, test_ds, format='GRIB', creationOptions=['DATA_ENCODING=' + encoding]) if encoding != 'SIMPLE_PACKING': gdal.PopErrorHandler() out_ds = gdal.Open(tmpfilename) assert out_ds is not None, ('failed to re-open dataset for ' + encoding) got_vals = struct.unpack(4 * 'd', out_ds.ReadRaster()) out_ds = None gdal.Unlink(tmpfilename) expected_vals = (1.23e10, -2.45e10, 1.23e10, -2.45e10) assert max([abs((got_vals[i] - expected_vals[i]) / expected_vals[i]) for i in range(4)]) <= 1e-4, \ ('did not get expected values for ' + encoding) test_ds = None # Test lossy J2K compression for drvname in found_j2k_drivers: tmpfilename = '/vsimem/out.grb2' gdal.ErrorReset() gdal.Translate(tmpfilename, 'data/utm.tif', format='GRIB', creationOptions=['JPEG2000_DRIVER=' + drvname, 'COMPRESSION_RATIO=20']) error_msg = gdal.GetLastErrorMsg() assert error_msg == '', \ ('did not expect error for %s, %s' % (str(filename), str(options))) out_ds = gdal.Open(tmpfilename) cs = out_ds.GetRasterBand(1).Checksum() out_ds = None gdal.Unlink(tmpfilename) if cs == 0 or cs == 50235: # 50235: lossless checksum gdaltest.post_reason('did not get expected checksum for lossy JPEG2000 with ' + drvname) print(cs) ############################################################################### # Test GRIB2 write support with warnings/errors def test_grib_grib2_write_data_encodings_warnings_and_errors(): # Cases where warnings are expected tests = [] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'DECIMAL_SCALE_FACTOR=1'], 4672]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'JPEG2000_DRIVER=FOO'], 4672]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'JPEG2000_DRIVER=FOO'], 4672]] tests += [['data/byte.tif', ['DATA_ENCODING=SIMPLE_PACKING', 'SPATIAL_DIFFERENCING_ORDER=1'], 4672]] tests += [['data/grib/ds.mint.bin', ['DATA_ENCODING=SIMPLE_PACKING'], 41640]] # should warn since simple packing doesn't support nodata tests += [['data/byte.tif', ['NBITS=32'], 4672]] tests += [['data/byte.tif', ['DATA_ENCODING=IEEE_FLOATING_POINT', 'NBITS=8'], 4672]] tests += [['data/byte.tif', ['DATA_ENCODING=IEEE_FLOATING_POINT', 'DECIMAL_SCALE_FACTOR=-1'], 4672]] for (filename, options, expected_cs) in tests: tmpfilename = '/vsimem/out.grb2' src_ds = gdal.Open(filename) gdal.ErrorReset() with gdaltest.error_handler(): out_ds = gdaltest.grib_drv.CreateCopy(tmpfilename, src_ds, options=options) error_msg = gdal.GetLastErrorMsg() assert error_msg != '', \ ('expected warning for %s, %s' % (str(filename), str(options))) assert out_ds is not None, \ ('did not expect null return for %s, %s' % (str(filename), str(options))) cs = out_ds.GetRasterBand(1).Checksum() out_ds = None gdal.Unlink(tmpfilename) if not isinstance(expected_cs, tuple): expected_cs = (expected_cs,) assert cs in expected_cs, \ ('did not get expected checksum for %s, %s' % (str(filename), str(options))) # Cases where errors are expected tests = [] tests += [['data/byte.tif', ['DATA_ENCODING=FOO']]] # invalid DATA_ENCODING tests += [['data/byte.tif', ['JPEG2000_DRIVER=FOO', 'SPATIAL_DIFFERENCING_ORDER=BAR']]] # both cannot be used together tests += [['data/byte.tif', ['SPATIAL_DIFFERENCING_ORDER=3']]] tests += [['data/byte.tif', ['JPEG2000_DRIVER=THIS_IS_NOT_A_J2K_DRIVER']]] # non-existing driver tests += [['data/byte.tif', ['JPEG2000_DRIVER=DERIVED']]] # Read-only driver tests += [['../gcore/data/cfloat32.tif', []]] # complex data type tests += [['data/float64.asc', []]] # no projection tests += [['data/byte.sgi', []]] # no geotransform tests += [['data/rotation.img', []]] # geotransform with rotation terms gdal.GetDriverByName('GTiff').Create('/vsimem/huge.tif', 65535, 65535, 1, options=['SPARSE_OK=YES']) tests += [['/vsimem/huge.tif', []]] # too many pixels for (filename, options,) in tests: tmpfilename = '/vsimem/out.grb2' src_ds = gdal.Open(filename) gdal.ErrorReset() with gdaltest.error_handler(): out_ds = gdaltest.grib_drv.CreateCopy(tmpfilename, src_ds, options=options) error_msg = gdal.GetLastErrorMsg() assert error_msg != '', \ ('expected warning for %s, %s' % (str(filename), str(options))) assert out_ds is None, \ ('expected null return for %s, %s' % (str(filename), str(options))) out_ds = None gdal.Unlink(tmpfilename) gdal.Unlink('/vsimem/huge.tif') with gdaltest.error_handler(): out_ds = gdal.Translate('/i/do_not/exist.grb2', 'data/byte.tif', format='GRIB') assert out_ds is None, 'expected null return' ############################################################################### # Test writing temperatures with automatic Celsius -> Kelvin conversion def test_grib_grib2_write_temperatures(): for (src_type, data_encoding, input_unit) in [ (gdal.GDT_Float32, 'IEEE_FLOATING_POINT', None), (gdal.GDT_Float32, 'IEEE_FLOATING_POINT', 'C'), (gdal.GDT_Float32, 'IEEE_FLOATING_POINT', 'K'), (gdal.GDT_Float64, 'IEEE_FLOATING_POINT', None), (gdal.GDT_Float32, 'SIMPLE_PACKING', None)]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 1, src_type) src_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') src_ds.SetProjection(sr.ExportToWkt()) src_ds.WriteRaster(0, 0, 2, 2, struct.pack(4 * 'f', 25.0, 25.1, 25.1, 25.2), buf_type=gdal.GDT_Float32) tmpfilename = '/vsimem/out.grb2' options = [ 'DATA_ENCODING=' + data_encoding, 'PDS_PDTN=8', 'PDS_TEMPLATE_NUMBERS=0 5 2 0 0 0 255 255 1 0 0 0 43 1 0 0 0 0 0 255 129 255 255 255 255 7 216 2 23 12 0 0 1 0 0 0 0 3 255 1 0 0 0 12 1 0 0 0 0' ] if input_unit is not None: options += ['INPUT_UNIT=' + input_unit] gdaltest.grib_drv.CreateCopy(tmpfilename, src_ds, options=options) out_ds = gdal.Open(tmpfilename) got_vals = struct.unpack(4 * 'd', out_ds.ReadRaster()) out_ds = None gdal.Unlink(tmpfilename) if input_unit != 'K': expected_vals = (25.0, 25.1, 25.1, 25.2) else: expected_vals = (25.0 - 273.15, 25.1 - 273.15, 25.1 - 273.15, 25.2 - 273.15) assert max([abs((got_vals[i] - expected_vals[i]) / expected_vals[i]) for i in range(4)]) <= 1e-4, \ ('fail with data_encoding = %s and type = %s' % (data_encoding, str(src_type))) ############################################################################### def test_grib_grib2_write_nodata(): for src_type in [ gdal.GDT_Byte, gdal.GDT_Float32 ]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 1, src_type) src_ds.SetGeoTransform([2, 1, 0, 49, 0, -1]) sr = osr.SpatialReference() sr.SetFromUserInput('WGS84') src_ds.SetProjection(sr.ExportToWkt()) src_ds.GetRasterBand(1).SetNoDataValue(123) tmpfilename = '/vsimem/out.grb2' options = [ 'DATA_ENCODING=COMPLEX_PACKING' ] gdaltest.grib_drv.CreateCopy(tmpfilename, src_ds, options=options) ds = gdal.Open(tmpfilename) assert ds.GetRasterBand(1).GetNoDataValue() == 123 ds = None gdal.Unlink(tmpfilename) ############################################################################### # Test GRIB2 file with JPEG2000 codestream on a single line (#6719) def test_grib_online_grib2_jpeg2000_single_line(): if not has_jp2kdrv(): pytest.skip() filename = 'CMC_hrdps_continental_PRATE_SFC_0_ps2.5km_2017111712_P001-00.grib2' if not gdaltest.download_file('http://download.osgeo.org/gdal/data/grib/' + filename): pytest.skip() ds = gdal.Open('tmp/cache/' + filename) cs = ds.GetRasterBand(1).Checksum() assert cs != 0, 'Could not open file' nd = ds.GetRasterBand(1).GetNoDataValue() assert nd == 9999, 'Bad nodata value' md = ds.GetRasterBand(1).GetMetadata() expected_md = {'GRIB_REF_TIME': ' 1510920000 sec UTC', 'GRIB_VALID_TIME': ' 1510923600 sec UTC', 'GRIB_FORECAST_SECONDS': '3600 sec', 'GRIB_UNIT': '[kg/(m^2 s)]', 'GRIB_PDS_TEMPLATE_NUMBERS': '1 7 2 50 50 0 0 0 0 0 0 0 60 1 0 0 0 0 0 255 255 255 255 255 255', 'GRIB_PDS_PDTN': '0', 'GRIB_COMMENT': 'Precipitation rate [kg/(m^2 s)]', 'GRIB_SHORT_NAME': '0-SFC', 'GRIB_ELEMENT': 'PRATE'} for k in expected_md: assert k in md and md[k] == expected_md[k], 'Did not get expected metadata' ############################################################################### # Template 4.12 with Derived forecast = spread. Do not do unit conversion ! def test_grib_grib2_derived_forecast_spread(): ds = gdal.Open('data/grib/template_4_12_spread.grb2') band = ds.GetRasterBand(1) assert band.GetMetadataItem('GRIB_UNIT') == '[spread]' assert band.ComputeRasterMinMax() == (0.24296024441719055, 0.24296024441719055) out_ds = gdaltest.grib_drv.CreateCopy('/vsimem/out.grb2', ds) band = out_ds.GetRasterBand(1) assert band.GetMetadataItem('GRIB_UNIT') == '[spread]' assert band.ComputeRasterMinMax() == (0.24296024441719055, 0.24296024441719055) out_ds = None gdal.Unlink('/vsimem/out.grb2') ############################################################################### # Template 4.48 with Optical Properties of Aerosol def test_grib_grib2_template_4_48(): ds = gdal.Open('data/grib/template_4_48.grb2') band = ds.GetRasterBand(1) assert band.GetMetadataItem('GRIB_UNIT') == '[1/kg]' assert band.GetMetadataItem('GRIB_ELEMENT') == 'ASNCON' assert band.GetMetadataItem('GRIB_SHORT_NAME') == '0-EATM' ############################################################################### # Test reading product whose scan flag is not 64 def test_grib_grib2_scan_flag_not_64(): ds = gdal.Open('/vsisparse/data/blend.t17z.master.f001.co.grib2.sparse.xml') gt = ds.GetGeoTransform() expected_gt = (-3272421.457337171, 2539.703, 0.0, 3790842.1060354356, 0.0, -2539.703) assert gt == pytest.approx(expected_gt, rel=1e-6) gdalautotest-3.1.2/gdrivers/usgsdem.py0000775000175000017500000002271713701060015016546 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: usgsdem.py e6196ddef3ef73652eedef2c2daf73c087ebf4f2 2019-09-30 16:53:43 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for USGSDEM driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import osr import gdaltest import pytest ############################################################################### # Test truncated version of http://download.osgeo.org/gdal/data/usgsdem/022gdeme def test_usgsdem_1(): tst = gdaltest.GDALTest('USGSDEM', '022gdeme_truncated', 1, 1583) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('NAD27') return tst.testOpen(check_prj=srs.ExportToWkt(), check_gt=(-67.00041667, 0.00083333, 0.0, 50.000416667, 0.0, -0.00083333)) ############################################################################### # Test truncated version of http://download.osgeo.org/gdal/data/usgsdem/114p01_0100_deme.dem def test_usgsdem_2(): tst = gdaltest.GDALTest('USGSDEM', '114p01_0100_deme_truncated.dem', 1, 53864) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('NAD27') return tst.testOpen(check_prj=srs.ExportToWkt(), check_gt=(-136.25010416667, 0.000208333, 0.0, 59.25010416667, 0.0, -0.000208333)) ############################################################################### # Test truncated version of file that triggered bug #2348 def test_usgsdem_3(): tst = gdaltest.GDALTest('USGSDEM', '39079G6_truncated.dem', 1, 61424) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS72') srs.SetUTM(17) return tst.testOpen(check_prj=srs.ExportToWkt(), check_gt=(606855.0, 30.0, 0.0, 4414605.0, 0.0, -30.0)) ############################################################################### # Test CreateCopy() def test_usgsdem_4(): tst = gdaltest.GDALTest('USGSDEM', '39079G6_truncated.dem', 1, 61424, options=['RESAMPLE=Nearest']) return tst.testCreateCopy(check_gt=1, check_srs=1, vsimem=1) ############################################################################### # Test CreateCopy() without any creation options def test_usgsdem_5(): ds = gdal.Open('data/n43.dt0') ds2 = gdal.GetDriverByName('USGSDEM').CreateCopy('tmp/n43.dem', ds, options=['RESAMPLE=Nearest']) if ds.GetRasterBand(1).Checksum() != ds2.GetRasterBand(1).Checksum(): print(ds2.GetRasterBand(1).Checksum()) print(ds.GetRasterBand(1).Checksum()) ds2 = None print(open('tmp/n43.dem', 'rb').read()) pytest.fail('Bad checksum.') gt1 = ds.GetGeoTransform() gt2 = ds2.GetGeoTransform() for i in range(6): if gt1[i] != pytest.approx(gt2[i], abs=1e-5): print('') print('old = ', gt1) print('new = ', gt2) pytest.fail('Geotransform differs.') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('WGS84') assert ds2.GetProjectionRef() == srs.ExportToWkt(), 'Bad SRS.' ds2 = None ############################################################################### # Test CreateCopy() without a few creation options. Then create a new copy with TEMPLATE # creation option and check that both files are binary identical. def test_usgsdem_6(): ds = gdal.Open('data/n43.dt0') ds2 = gdal.GetDriverByName('USGSDEM').CreateCopy('tmp/file_1.dem', ds, options=['PRODUCER=GDAL', 'OriginCode=GDAL', 'ProcessCode=A', 'RESAMPLE=Nearest']) ds3 = gdal.GetDriverByName('USGSDEM').CreateCopy('tmp/file_2.dem', ds2, options=['TEMPLATE=tmp/file_1.dem', 'RESAMPLE=Nearest']) del ds2 del ds3 f1 = open('tmp/file_1.dem', 'rb') f2 = open('tmp/file_2.dem', 'rb') # Skip the 40 first bytes because the dataset name will differ f1.seek(40, 0) f2.seek(40, 0) data1 = f1.read() data2 = f2.read() assert data1 == data2 f1.close() f2.close() ############################################################################### # Test CreateCopy() with CDED50K profile def test_usgsdem_7(): ds = gdal.Open('data/n43.dt0') # To avoid warning about 'Unable to find NTS mapsheet lookup file: NTS-50kindex.csv' gdal.PushErrorHandler('CPLQuietErrorHandler') ds2 = gdal.GetDriverByName('USGSDEM').CreateCopy('tmp/000a00DEMz', ds, options=['PRODUCT=CDED50K', 'TOPLEFT=80w,44n', 'RESAMPLE=Nearest', 'ZRESOLUTION=1.1', 'INTERNALNAME=GDAL']) gdal.PopErrorHandler() assert ds2.RasterXSize == 1201 and ds2.RasterYSize == 1201, 'Bad image dimensions.' expected_gt = (-80.000104166666674, 0.000208333333333, 0, 44.000104166666667, 0, -0.000208333333333) got_gt = ds2.GetGeoTransform() for i in range(6): if expected_gt[i] != pytest.approx(got_gt[i], abs=1e-5): print('') print('expected = ', expected_gt) print('got = ', got_gt) pytest.fail('Geotransform differs.') srs = osr.SpatialReference() srs.SetWellKnownGeogCS('NAD83') assert ds2.GetProjectionRef() == srs.ExportToWkt(), 'Bad SRS.' ds2 = None ############################################################################### # Test truncated version of http://download.osgeo.org/gdal/data/usgsdem/various.zip/39109h1.dem # Undocumented format def test_usgsdem_8(): tst = gdaltest.GDALTest('USGSDEM', '39109h1_truncated.dem', 1, 39443) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('NAD27') srs.SetUTM(12) return tst.testOpen(check_prj=srs.ExportToWkt(), check_gt=(660055.0, 10.0, 0.0, 4429465.0, 0.0, -10.0)) ############################################################################### # Test truncated version of http://download.osgeo.org/gdal/data/usgsdem/various.zip/4619old.dem # Old format def test_usgsdem_9(): tst = gdaltest.GDALTest('USGSDEM', '4619old_truncated.dem', 1, 10659) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('NAD27') return tst.testOpen(check_prj=srs.ExportToWkt(), check_gt=(18.99958333, 0.0008333, 0.0, 47.000416667, 0.0, -0.0008333)) ############################################################################### # https://github.com/OSGeo/gdal/issues/583 def test_usgsdem_with_extra_values_at_end_of_profile(): tst = gdaltest.GDALTest('USGSDEM', 'usgsdem_with_extra_values_at_end_of_profile.dem', 1, 56679) return tst.testOpen() ############################################################################### # Like Novato.dem of https://trac.osgeo.org/gdal/ticket/4901 def test_usgsdem_with_spaces_after_byte_864(): tst = gdaltest.GDALTest('USGSDEM', 'usgsdem_with_spaces_after_byte_864.dem', 1, 61078) return tst.testOpen() ############################################################################### # Test truncated version of https://s3.amazonaws.com/data.tnris.org/8ea19b45-7a66-4e95-9833-f9e89611d106/resources/fema06-140cm-coastal_2995441_dem.zip # downloaded from https://data.tnris.org/collection/8ea19b45-7a66-4e95-9833-f9e89611d106 def test_usgsdem_with_header_of_918_bytes(): tst = gdaltest.GDALTest('USGSDEM', 'fema06-140cm_2995441b_truncated.dem', 1, 0) srs = osr.SpatialReference() srs.SetWellKnownGeogCS('NAD83') srs.SetUTM(15) with gdaltest.error_handler(): return tst.testOpen(check_prj=srs.ExportToWkt(), check_gt=(248500.0, 1.4, 0.0, 3252508.7, 0.0, -1.4)) ############################################################################### # Cleanup def test_usgsdem_cleanup(): try: os.remove('tmp/n43.dem') os.remove('tmp/n43.dem.aux.xml') os.remove('tmp/file_1.dem') os.remove('tmp/file_1.dem.aux.xml') os.remove('tmp/file_2.dem') os.remove('tmp/file_2.dem.aux.xml') os.remove('tmp/000a00DEMz') os.remove('tmp/000a00DEMz.aux.xml') except OSError: pass gdalautotest-3.1.2/gdrivers/jpipkak.py0000775000175000017500000001245613701060015016527 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: jpipkak.py 18659 2010-01-25 03:39:15Z warmerdam $ # # Project: GDAL/OGR Test Suite # Purpose: Test reading with JPIPKAK driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2010, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import pytest ############################################################################### # Read test of simple byte reference data. def test_jpipkak_1(): pytest.skip() # pylint: disable=unreachable gdaltest.jpipkak_drv = gdal.GetDriverByName('JPIPKAK') if gdaltest.jpipkak_drv is None: pytest.skip() ds = gdal.Open('jpip://216.150.195.220/JP2Server/qb_boulder_msi_uint') assert ds is not None, 'failed to open jpip stream.' target = ds.GetRasterBand(3).GetOverview(3) stats = target.GetStatistics(0, 1) assert stats[2] == pytest.approx(6791.121, abs=1.0) and stats[3] == pytest.approx(3046.536, abs=1.0), \ 'did not get expected mean/stddev' ############################################################################### # def test_jpipkak_2(): pytest.skip() # pylint: disable=unreachable if gdaltest.jpipkak_drv is None: pytest.skip() ds = gdal.Open('jpip://216.150.195.220/JP2Server/qb_boulder_pan_byte') assert ds is not None, 'failed to open jpip stream.' wkt = ds.GetProjectionRef() exp_wkt = 'PROJCS["WGS 84 / UTM zone 13N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","32613"]]' assert gdaltest.equal_srs_from_wkt(exp_wkt, wkt) target = ds.GetRasterBand(1).GetOverview(3) stats = target.GetStatistics(0, 1) assert stats[2] == pytest.approx(43.429, abs=1.0) and stats[3] == pytest.approx(18.526, abs=1.0), \ 'did not get expected mean/stddev' ############################################################################### # Test an 11bit image. def test_jpipkak_3(): pytest.skip() # pylint: disable=unreachable if gdaltest.jpipkak_drv is None: pytest.skip() ds = gdal.Open('jpip://216.150.195.220/JP2Server/qb_boulder_pan_11bit') assert ds is not None, 'failed to open jpip stream.' target = ds.GetRasterBand(1) stats = target.GetStatistics(0, 1) assert stats[2] == pytest.approx(483.501, abs=1.0) and stats[3] == pytest.approx(117.972, abs=1.0), \ 'did not get expected mean/stddev' ############################################################################### # Test a 20bit image, reduced to 16bit during processing. def test_jpipkak_4(): pytest.skip() # pylint: disable=unreachable if gdaltest.jpipkak_drv is None: pytest.skip() ds = gdal.Open('jpip://216.150.195.220/JP2Server/qb_boulder_pan_20bit') assert ds is not None, 'failed to open jpip stream.' target = ds.GetRasterBand(1) stats = target.GetStatistics(0, 1) assert stats[2] == pytest.approx(5333.148, abs=1.0) and stats[3] == pytest.approx(2522.023, abs=1.0), \ 'did not get expected mean/stddev' ############################################################################### # Test an overview level that will result in multiple fetches with subwindows. def test_jpipkak_5(): pytest.skip() # pylint: disable=unreachable if gdaltest.jpipkak_drv is None: pytest.skip() ds = gdal.Open('jpip://216.150.195.220/JP2Server/qb_boulder_pan_byte') assert ds is not None, 'failed to open jpip stream.' target = ds.GetRasterBand(1).GetOverview(1) stats = target.GetStatistics(0, 1) assert stats[2] == pytest.approx(42.462, abs=1.0) and stats[3] == pytest.approx(20.611, abs=1.0), \ 'did not get expected mean/stddev' gdalautotest-3.1.2/gdrivers/rik.py0000775000175000017500000000632213701060015015656 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: rik.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: RIK Testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2009-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import pytest ############################################################################### # Test a RIK map # Data downloaded from : http://www.lantmateriet.se/upload/filer/kartor/programvaror/sverige500_swe99.zip def test_rik_online_1(): if gdal.GetDriverByName('RIK') is None: pytest.skip() if not gdaltest.download_file('http://www.lantmateriet.se/upload/filer/kartor/programvaror/sverige500_swe99.zip', 'sverige500_swe99.zip'): pytest.skip() try: os.stat('tmp/cache/sverige500_swe99.rik') file_to_test = 'tmp/cache/sverige500_swe99.rik' except OSError: try: print('Uncompressing ZIP file...') import zipfile zfobj = zipfile.ZipFile('tmp/cache/sverige500_swe99.zip') outfile = open('tmp/cache/sverige500_swe99.rik', 'wb') outfile.write(zfobj.read('sverige500_swe99.rik')) outfile.close() file_to_test = 'tmp/cache/sverige500_swe99.rik' except OSError: pytest.skip() tst = gdaltest.GDALTest('RIK', file_to_test, 1, 17162, filename_absolute=1) return tst.testOpen() ############################################################################### # Test a LZW compressed RIK dataset def test_rik_online_2(): if gdal.GetDriverByName('RIK') is None: pytest.skip() if not gdaltest.download_file('http://trac.osgeo.org/gdal/raw-attachment/ticket/3674/ab-del.rik', 'ab-del.rik'): pytest.skip() tst = gdaltest.GDALTest('RIK', 'tmp/cache/ab-del.rik', 1, 44974, filename_absolute=1) return tst.testOpen() gdalautotest-3.1.2/gdrivers/netcdf_cf.py0000775000175000017500000007112713701060015017011 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: netcdf_cf.py 2f4e0fa743974d54a54b5c694595454a0b672917 2019-11-30 16:18:05 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test NetCDF driver support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import imp # for netcdf_cf_setup() from gdrivers.netcdf import netcdf_setup, netcdf_test_copy # noqa netcdf_setup; # to please pyflakes from osgeo import gdal from osgeo import osr import gdaltest import pytest ############################################################################### # Netcdf CF compliance Functions ############################################################################### ############################################################################### # check for necessary files and software def netcdf_cf_setup(): # global vars gdaltest.netcdf_cf_method = None gdaltest.netcdf_cf_files = None gdaltest.netcdf_cf_check_error = '' # if netcdf is not supported, skip detection if gdaltest.netcdf_drv is None: pytest.skip() # skip if on windows if os.name != 'posix': pytest.skip('NOTICE: will skip CF checks because OS is not posix!') # try local method cdms2_installed = False try: imp.find_module('cdms2') cdms2_installed = True except ImportError: print('NOTICE: cdms2 not installed!') print(' see installation notes at http://pypi.python.org/pypi/cfchecker') if cdms2_installed: xml_dir = './data/netcdf_cf_xml' tmp_dir = './tmp/cache' files = dict() files['a'] = xml_dir + '/area-type-table.xml' files['s'] = tmp_dir + '/cf-standard-name-table-v18.xml' # either find udunits path in UDUNITS_PATH, or based on location of udunits app, or copy all .xml files to data # opt_u = '/home/soft/share/udunits/udunits2.xml' files['u'] = xml_dir + '/udunits2.xml' # look for xml files if not (os.path.exists(files['a']) and os.path.exists(files['s']) and os.path.exists(files['u'])): print('NOTICE: cdms2 installed, but necessary xml files are not found!') print(' the following files must exist:') print(' ' + xml_dir + '/area-type-table.xml from http://cf-pcmdi.llnl.gov/documents/cf-standard-names/area-type-table/1/area-type-table.xml') print(' ' + tmp_dir + '/cf-standard-name-table-v18.xml - http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/18/cf-standard-name-table.xml') print(' ' + xml_dir + '/udunits2*.xml from a UDUNITS2 install') # try to get cf-standard-name-table if not os.path.exists(files['s']): # print ' downloading cf-standard-name-table.xml (v18) from http://cf-pcmdi.llnl.gov ...' if not gdaltest.download_file('http://cf-pcmdi.llnl.gov/documents/cf-standard-names/standard-name-table/18/cf-standard-name-table.xml', 'cf-standard-name-table-v18.xml'): print(' Failed to download, please get it and try again.') if os.path.exists(files['a']) and os.path.exists(files['s']) and os.path.exists(files['u']): gdaltest.netcdf_cf_method = 'local' gdaltest.netcdf_cf_files = files print('NOTICE: netcdf CF compliance checks: using local checker script') return # skip http method if GDAL_DOWNLOAD_TEST_DATA and GDAL_RUN_SLOW_TESTS are not defined if not gdaltest.download_test_data(): print('NOTICE: skipping netcdf CF compliance checks') print('to enable remote http checker script, define GDAL_DOWNLOAD_TEST_DATA=YES') return if not gdaltest.run_slow_tests(): print('NOTICE: skipping netcdf CF compliance checks') return # http method with curl, should use python module but easier for now success = False try: gdaltest.runexternal_out_and_err('curl') except OSError: print('no curl executable') else: # make sure script is responding handle = gdaltest.gdalurlopen("http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl") if handle is not None: success = True else: print('script not responding') if success: gdaltest.netcdf_cf_method = 'http' print('NOTICE: netcdf CF compliance checks: using remote HTTP ' 'checker script, consider installing cdms2 locally') return if gdaltest.netcdf_cf_method is None: print('NOTICE: skipping netcdf CF compliance checks') ############################################################################### # build a command used to check ifile def netcdf_cf_get_command(ifile, version='auto'): command = '' # fetch method obtained previously method = gdaltest.netcdf_cf_method if method is not None: if method == 'local': command = './netcdf_cfchecks.py -a ' + gdaltest.netcdf_cf_files['a'] \ + ' -s ' + gdaltest.netcdf_cf_files['s'] \ + ' -u ' + gdaltest.netcdf_cf_files['u'] \ + ' -v ' + version + ' ' + ifile elif method == 'http': # command = shlex.split( 'curl --form cfversion="1.5" --form upload=@' + ifile + ' --form submit=\"Check file\" "http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl"' ) # switch to 1.5 as driver now supports, and auto when it becomes available version = '1.5' command = 'curl --form cfversion=' + version + ' --form upload=@' + ifile + ' --form submit=\"Check file\" "http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl"' return command ############################################################################### # Check a file for CF compliance def netcdf_cf_check_file(ifile, version='auto', silent=True): # pylint: disable=unused-argument gdaltest.netcdf_cf_check_error = '' if not os.path.exists(ifile): pytest.skip() output_all = '' command = netcdf_cf_get_command(ifile, version='auto') if command is None or command == '': pytest.skip('no suitable method found, skipping') try: if gdaltest.netcdf_cf_method == 'http': print('calling ' + command) (ret, err) = gdaltest.runexternal_out_and_err(command) except OSError: pytest.fail('ERROR with command - ' + command) # There should be a ERRORS detected summary if 'ERRORS detected' not in ret: print(err) pytest.fail('ERROR with command - ' + command) output_all = ret output_err = '' output_warn = '' for line in output_all.splitlines(): # optimize this with regex if 'ERROR' in line and 'ERRORS' not in line: output_err = output_err + '\n' + line elif 'WARNING' in line and 'WARNINGS' not in line: output_warn = output_warn + '\n' + line result = 'success' if output_err != '': result = 'fail' if output_err != '': gdaltest.netcdf_cf_check_error += output_err.strip() if not silent: print('=> CF check ERRORS for file ' + ifile + ' : ' + output_err) if output_warn != '': if not silent: print('CF check WARNINGS for file ' + ifile + ' : ' + output_warn) return result ############################################################################### # Netcdf CF projection Functions and data ############################################################################### ############################################################################### # Definitions to test projections that are supported by CF # Tuple structure: # 0: Short code (e.g. AEA) - (no GDAL significance, just for filenames etc.) # 1: official name from CF-1 conventions # 2: EPSG code, or WKT, to tell GDAL to do reprojection # 3: Actual attribute official name of grid mapping # 4: List of required attributes to define projection # 5: List of required coordinate variable standard name attributes netcdf_cfproj_tuples = [ ("AEA", "Albers Equal Area", "EPSG:3577", "albers_conical_equal_area", ['standard_parallel', 'longitude_of_central_meridian', 'latitude_of_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), ("AZE", "Azimuthal Equidistant", # Didn't have EPSG suitable for AU "+proj=aeqd +lat_0=-37 +lon_0=145 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "azimuthal_equidistant", ['longitude_of_projection_origin', 'latitude_of_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), ("LAZEA", "Lambert azimuthal equal area", # Specify proj4 since no appropriate LAZEA for AU. # "+proj=laea +lat_0=0 +lon_0=134 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs", "+proj=laea +lat_0=-37 +lon_0=145 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "lambert_azimuthal_equal_area", ['longitude_of_projection_origin', 'latitude_of_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), ("LC_2SP", "Lambert conformal", "EPSG:3112", "lambert_conformal_conic", ['standard_parallel', 'longitude_of_central_meridian', 'latitude_of_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), # TODO: Test LCC with 1SP ("LCEA", "Lambert Cylindrical Equal Area", "+proj=cea +lat_ts=-37 +lon_0=145 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "lambert_cylindrical_equal_area", ['longitude_of_central_meridian', 'standard_parallel', # TODO: OR 'scale_factor_at_projection_origin' 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), # 2 entries for Mercator, since attribs different for 1SP or 2SP ("M-1SP", "Mercator", "+proj=merc +lon_0=145 +k_0=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "mercator", ['longitude_of_projection_origin', 'scale_factor_at_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), # Commented out as it seems GDAL itself's support of Mercator with 2SP # is a bit dodgy ("M-2SP", "Mercator", "+proj=merc +lat_ts=-37 +lon_0=145 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", # Trying with full WKT: # """PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_2SP"], PARAMETER["central_meridian",146], PARAMETER["standard_parallel_1",-37], PARAMETER["latitude_of_origin",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]""", "mercator", ['longitude_of_projection_origin', 'standard_parallel', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), ("Ortho", "Orthographic", "+proj=ortho +lat_0=-37 +lon_0=145 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "orthographic", ['longitude_of_projection_origin', 'latitude_of_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), # Seems GDAL may have problems with Polar stereographic, as it # considers these "local coordinate systems" ("PSt", "Polar stereographic", "+proj=stere +lat_ts=-37 +lat_0=-90 +lon_0=145 +k_0=1.0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", "polar_stereographic", ['straight_vertical_longitude_from_pole', 'latitude_of_projection_origin', 'standard_parallel', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), ("St", "Stereographic", "+proj=stere +lat_0=-37 +lon_0=145 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", # 'PROJCS["unnamed", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Stereographic"], PARAMETER["latitude_of_origin",-37.5], PARAMETER["central_meridian",145], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]]]', "stereographic", ['longitude_of_projection_origin', 'latitude_of_projection_origin', 'scale_factor_at_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), # Note: Rotated Pole not in this list, as seems not GDAL-supported ("TM", "Transverse Mercator", "EPSG:32655", # UTM Zone 55N "transverse_mercator", ['scale_factor_at_central_meridian', 'longitude_of_central_meridian', 'latitude_of_projection_origin', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']), ("GEOS", "Geostationary_satellite", "+proj=geos +h=35785831 +lon_0=145 +datum=WGS84 +sweep=y +units=m", "geostationary", ['longitude_of_projection_origin', 'perspective_point_height', 'sweep_angle_axis', 'false_easting', 'false_northing'], ['projection_x_coordinate', 'projection_y_coordinate']) ] # By default, we will use GeoTIFF as the 'intermediate' raster format # for gdalwarp'ing into before gdal_translate to NetCDF. # But since Gratify can't act as a storage format for certain projections # (e.g. Mercator-2SP), we will choose other intermediate formats for certain # projection. # The following array maps projection short code, to driver format to use netcdf_cfproj_def_int_format = "GTiff" netcdf_cfproj_int_fmt_maps = { "M-2SP": 'HFA' } netcdf_cfproj_format_fnames = {"HFA": "img", "GTiff": "tif", "NITF": "nitf", "ERS": "ers"} ############################################################################### # Check support for given projection tuple definitions # For each projection, warp the original file and then create a netcdf def netcdf_cfproj_testcopy(projTuples, origTiff, interFormats, inPath, outPath, resFilename): """Test a Geotiff file can be converted to NetCDF, and projection in CF-1 conventions can be successfully maintained. Save results to file. :arg: projTuples - list of tuples :arg: interFormats - dict of intermediate format overrides :arg: outPath - path to save output :arg: resFilename - results filename to write to. """ silent = True gdaltest.netcdf_drv_silent = True bWriteGdalTags = "YES" # silent = False gdaltest.netcdf_drv_silent = False # bWriteGdalTags="NO" result = 'success' # Test if ncdump is available try: (_, err) = gdaltest.runexternal_out_and_err('ncdump -h') except OSError: # nothing is supported as ncdump not found pytest.skip('NOTICE: netcdf version not found') i = err.find('netcdf library version ') # version not found if i == -1: pytest.skip('NOTICE: netcdf version not found') if not os.path.exists(outPath): os.makedirs(outPath) resFile = open(os.path.join(outPath, resFilename), "w") if not os.path.exists(outPath): os.makedirs(outPath) heading = "Testing GDAL translation results to NetCDF\n" resFile.write(heading) resFile.write(len(heading) * "=" + "\n") # now = datetime.datetime.now() # resFile.write("*Date/time:* %s\n" % (now.strftime("%Y-%m-%d %H:%M"))) resFile.write("\n") resPerProj = {} dsTiff = gdal.Open(os.path.join(inPath, origTiff), gdal.GA_ReadOnly) s_srs_wkt = dsTiff.GetProjection() # objects to hold the various tests i_t = 0 tst_res = {} for proj in projTuples: try: intFmt = interFormats[proj[0]] except KeyError: intFmt = netcdf_cfproj_def_int_format intExt = netcdf_cfproj_format_fnames[intFmt] # Our little results data structures if not silent: print("") print("Testing %s (%s) translation:" % (proj[0], proj[1])) if not silent: print("About to create raster in chosen SRS") # projVrt = os.path.join(outPath, "%s_%s.vrt" % \ # (origTiff.rstrip('.tif'), proj[0] )) projRaster = os.path.join(outPath, "%s_%s.%s" % (origTiff.rstrip('.tif'), proj[0], intExt)) srs = osr.SpatialReference() srs.SetFromUserInput(proj[2]) t_srs_wkt = srs.ExportToWkt() if not silent: print("going to warp file " + origTiff + "\n" + s_srs_wkt + "\ninto file " + projRaster + "\n" + t_srs_wkt) dswarp = gdal.AutoCreateWarpedVRT(dsTiff, s_srs_wkt, t_srs_wkt, gdal.GRA_NearestNeighbour, 0) drv_inter = gdal.GetDriverByName(intFmt) drv_netcdf = gdal.GetDriverByName("netcdf") dsw = drv_inter.CreateCopy(projRaster, dswarp, 0) if not silent: print("Warped %s to %s" % (proj[0], projRaster)) projNc = os.path.join(outPath, "%s_%s.nc" % (origTiff.rstrip('.tif'), proj[0])) # Force GDAL tags to be written to make testing easier, with preserved datum etc # ncCoOpts = "-co WRITE_GDAL_TAGS=yes" if not silent: print("About to translate to NetCDF") dst = drv_netcdf.CreateCopy(projNc, dsw, 0, ['WRITE_GDAL_TAGS=' + bWriteGdalTags]) # For drivers like HFA, line below ESSENTIAL so that all info is # saved to new raster file - which we'll reopen later and want # to be fully updated. dsw = None del dst if not silent: print("Translated to %s" % (projNc)) transWorked, resDetails = netcdf_cfproj_test_cf(proj, projNc) resPerProj[proj[0]] = resDetails resFile.write("%s (%s): " % (proj[0], proj[1])) if transWorked: resFile.write("OK\n") else: resFile.write("BAD\n") if 'missingProjName' in resPerProj[proj[0]]: resFile.write("\tMissing proj name '%s'\n" % (resPerProj[proj[0]]['missingProjName'])) for attrib in resPerProj[proj[0]]['missingAttrs']: resFile.write("\tMissing attrib '%s'\n" % (attrib)) for cVarStdName in resPerProj[proj[0]]['missingCoordVarStdNames']: resFile.write("\tMissing coord var with std name '%s'\n" % (cVarStdName)) if 'cfcheck_error' in resPerProj[proj[0]]: resFile.write("\tFailed cf check: %s\n" % (resPerProj[proj[0]]['cfcheck_error'])) # test file copy # We now copy to a new file, just to be safe projNc2 = projNc.rstrip('.nc') + '2.nc' projRaster2 = os.path.join(outPath, "%s_%s2.%s" % (origTiff.rstrip('.tif'), proj[0], intExt)) tst_res[i_t + 1] = netcdf_test_copy(projRaster, 1, None, projNc2, [], 'NETCDF') tst_res[i_t + 2] = netcdf_test_copy(projNc2, 1, None, projRaster2, [], intFmt) if tst_res[i_t + 1] == 'fail' or tst_res[i_t + 2] == 'fail': result = 'fail' i_t = i_t + 2 resFile.close() if not silent: print("\n" + "*" * 80) print("Saved results to file %s" % (os.path.join(outPath, resFilename))) # result = 'success' resFile = open(os.path.join(outPath, resFilename), "r") resStr = resFile.read() if resStr.find('BAD') != -1: print('\nCF projection tests failed, here is the output (stored in file %s)\n' % (os.path.join(outPath, resFilename))) print(resStr) result = 'fail' return result ############################################################################### # Test an NC file has valid conventions according to passed-in proj tuple # Note: current testing strategy is a fairly simple attribute search. # this could use GDAL NetCDF driver for getting attribs instead. def netcdf_cfproj_test_cf(proj, projNc): transWorked = True command = 'ncdump -h ' + projNc (ret, err) = gdaltest.runexternal_out_and_err(command) if err != '': print(err) dumpStr = ret resDetails = {} resDetails['missingAttrs'] = [] resDetails['missingCoordVarStdNames'] = [] if (':grid_mapping_name = "%s"' % (proj[3])) not in dumpStr: transWorked = False resDetails['missingProjName'] = proj[3] # Check attributes in the projection are included. for attrib in proj[4]: # The ':' prefix and ' ' suffix is to help check for exact name, # e.g. to catch the standard_parallel_1 and 2 issue. if (":" + attrib + " ") not in dumpStr: transWorked = False resDetails['missingAttrs'].append(attrib) # print "**Error for proj '%s': CF-1 attrib '%s' not found.**" % \ # (proj[0], attrib) # Now we check the required X and Y attributes are included (e.g. Rotated # Pole has special names required here. for coordVarStdName in proj[5]: if coordVarStdName not in dumpStr: transWorked = False resDetails['missingCoordVarStdNames'].append(coordVarStdName) # Final check use the cf-checker. result_cf = netcdf_cf_check_file(projNc, 'auto', True) if result_cf == 'fail': resDetails['cfcheck_error'] = gdaltest.netcdf_cf_check_error transWorked = False return transWorked, resDetails ############################################################################### # Netcdf CF Tests ############################################################################### ############################################################################### # test copy and CF compliance for lat/lon (no datum, no GEOGCS) file, tif->nc->tif def test_netcdf_cf_1(netcdf_setup): # noqa # setup netcdf and netcdf_cf environment netcdf_cf_setup() if gdaltest.netcdf_drv is None: pytest.skip() # tst1 = gdaltest.GDALTest( 'NETCDF', 'trmm.tif', 1, 14 ) # result = tst1.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_1.nc', delete_copy = 0) result = netcdf_test_copy('data/trmm.nc', 1, 14, 'tmp/netcdf_cf_1.nc') if result != 'fail': # tst2 = gdaltest.GDALTest( 'GTIFF', '../tmp/netcdf_cf_1.nc', 1, 14 ) # result = tst2.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_1.tiff', delete_copy = 0) result = netcdf_test_copy('tmp/netcdf_cf_1.nc', 1, 14, 'tmp/netcdf_cf_1.tif', [], 'GTIFF') result_cf = 'success' if gdaltest.netcdf_cf_method is not None: result_cf = netcdf_cf_check_file('tmp/netcdf_18.nc', 'auto', False) if result != 'fail' and result_cf != 'fail': return pytest.fail() ############################################################################### # test copy and CF compliance for lat/lon (no datum, no GEOGCS) file, nc->nc def test_netcdf_cf_2(): if gdaltest.netcdf_drv is None: pytest.skip() result = netcdf_test_copy('data/trmm.nc', 1, 14, 'tmp/netcdf_cf_2.nc') result_cf = 'success' if gdaltest.netcdf_cf_method is not None: result_cf = netcdf_cf_check_file('tmp/netcdf_cf_2.nc', 'auto', False) if result != 'fail' and result_cf != 'fail': return pytest.fail() ############################################################################### # test copy and CF compliance for lat/lon (W*S84) file, tif->nc->tif # note: this test fails in trunk (before r23246) def test_netcdf_cf_3(): if gdaltest.netcdf_drv is None: pytest.skip() result = 'success' result_cf = 'success' result = netcdf_test_copy('data/trmm-wgs84.tif', 1, 14, 'tmp/netcdf_cf_3.nc') if result == 'success': # tst = gdaltest.GDALTest( 'GTIFF', '../tmp/netcdf_cf_3.nc', 1, 14 ) # result = tst.testCreateCopy(check_gt=1, check_srs=1, new_filename='tmp/netcdf_cf_3.tif', delete_copy = 0) result = netcdf_test_copy('tmp/netcdf_cf_3.nc', 1, 14, 'tmp/netcdf_cf_3.tif', [], 'GTIFF') result_cf = 'success' if gdaltest.netcdf_cf_method is not None: result_cf = netcdf_cf_check_file('tmp/netcdf_cf_3.nc', 'auto', False) if result != 'fail' and result_cf != 'fail': return pytest.fail() ############################################################################### # test support for various CF projections def test_netcdf_cf_4(): if gdaltest.netcdf_drv is None: pytest.skip() result = netcdf_cfproj_testcopy(netcdf_cfproj_tuples, 'melb-small.tif', netcdf_cfproj_int_fmt_maps, 'data', 'tmp', 'translate_results.txt') # result = netcdf_cfproj_testcopy(netcdf_cfproj_tuples1, 'melb-small.tif', \ # 'data', 'tmp', 'translate_results.txt') return result ############################################################################### # test support for PS variants (bug #2893) def test_netcdf_cf_5(): if gdaltest.netcdf_drv is None: pytest.skip() ifiles = ['NETCDF:data/orog_CRCM1.nc:orog', 'NETCDF:data/orog_CRCM2.nc:orog'] for ifile in ifiles: ds = gdal.Open(ifile) prj = ds.GetProjection() sr = osr.SpatialReference() sr.ImportFromWkt(prj) lat_origin = sr.GetProjParm('latitude_of_origin') assert lat_origin == 60, ('Latitude of origin in %s does not match expected: %f' % (ifile, lat_origin)) ############################################################################### # test CF support for dims and variables in different groups def test_netcdf_cf_6(): if gdaltest.netcdf_drv is None: pytest.skip() ifiles = ('data/cf_dimsindiff_4326.nc', 'NETCDF:data/cf_nasa_4326.nc:/science/grids/data/temp', 'NETCDF:data/cf_nasa_4326.nc:/science/grids/imagingGeometry/lookAngle') for ifile in ifiles: ds = gdal.Open(ifile) prj = ds.GetProjection() sr = osr.SpatialReference() sr.ImportFromWkt(prj) proj_out = sr.ExportToProj4() assert proj_out == '+proj=longlat +ellps=WGS84 +no_defs' ############################################################################### # test check sums def test_netcdf_cf_7(netcdf_setup): # noqa # setup netcdf and netcdf_cf environment netcdf_cf_setup() if gdaltest.netcdf_drv is None: pytest.skip() checks = (('data/cf_dimsindiff_4326.nc', 1, 2041), ('NETCDF:data/cf_nasa_4326.nc:/science/grids/data/temp', 1, 2041), ('NETCDF:data/cf_nasa_4326.nc:/science/grids/imagingGeometry/lookAngle', 1, 476), ('NETCDF:data/cf_nasa_4326.nc:/science/grids/imagingGeometry/lookAngle', 4, 476)) for infile, band, checksum in checks: ds = gdal.Open(infile, gdal.GA_ReadOnly) assert ds.GetRasterBand(band).Checksum() == checksum gdalautotest-3.1.2/gdrivers/pcraster.py0000775000175000017500000000477213701060015016723 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: pcraster.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test PCRaster driver support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import pytest ############################################################################### # Perform simple read test. def test_pcraster_1(): gdaltest.pcraster_drv = gdal.GetDriverByName('PCRaster') if gdaltest.pcraster_drv is None: pytest.skip() tst = gdaltest.GDALTest('PCRaster', 'ldd.map', 1, 4528) return tst.testOpen() ############################################################################### # Verify some auxiliary data. def test_pcraster_2(): if gdaltest.pcraster_drv is None: pytest.skip() ds = gdal.Open('data/ldd.map') gt = ds.GetGeoTransform() assert gt[0] == 182140.0 and gt[1] == 10 and gt[2] == 0 and gt[3] == 327880.0 and gt[4] == 0 and gt[5] == -10, \ 'PCRaster geotransform wrong.' band1 = ds.GetRasterBand(1) assert band1.GetNoDataValue() == 255, 'PCRaster NODATA value wrong or missing.' gdalautotest-3.1.2/gdrivers/georaster.py0000775000175000017500000003212013701060015017057 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: georaster.py 05c258ce182fe537c6a493ff4f93fa57ed1f0466 2018-12-14 16:11:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: GeoRaster Testing. # Author: Ivan Lucena # ############################################################################### # Copyright (c) 2008, Ivan Lucena # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import ogr import gdaltest import pytest pytestmark = [ pytest.mark.skipif('OCI_DSNAME' not in os.environ, reason='no OCI_DSNAME in environment'), pytest.mark.require_driver('GeoRaster'), ] ############################################################################### # def get_connection_str(): oci_dsname = os.environ.get('OCI_DSNAME') if oci_dsname is None: # TODO: Spelling - informe? return '' return 'geor:' + oci_dsname.split(':')[1] ############################################################################### # def test_georaster_init(): gdaltest.oci_ds = None gdaltest.georasterDriver = gdal.GetDriverByName('GeoRaster') gdaltest.oci_ds = ogr.Open(os.environ['OCI_DSNAME']) if gdaltest.oci_ds is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') rs = gdaltest.oci_ds.ExecuteSQL('select owner from all_sdo_geor_sysdata') gdal.PopErrorHandler() err_msg = gdal.GetLastErrorMsg() if rs is not None: gdaltest.oci_ds.ReleaseResultSet(rs) rs = None if err_msg != '': gdaltest.oci_ds = None pytest.skip('ALL_SDO_GEOR_SYSDATA inaccessible, ' 'likely georaster unavailable.') ############################################################################### # def test_georaster_byte(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/byte.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1001, sdo_geor.init('GDAL_TEST_RDT',1001))"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 4672, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_int16(): if gdaltest.oci_ds is None: pytest.skip() get_connection_str() ds_src = gdal.Open('data/int16.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1002, sdo_geor.init('GDAL_TEST_RDT',1002))"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 4672, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_int32(): if gdaltest.oci_ds is None: pytest.skip() get_connection_str() ds_src = gdal.Open('data/int32.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1003, sdo_geor.init('GDAL_TEST_RDT',1003))"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 4672, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_rgb_b1(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/rgbsmall.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1004, sdo_geor.init('GDAL_TEST_RDT',1004))", "BLOCKBSIZE=1"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 21212, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_rgb_b2(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/rgbsmall.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1005, sdo_geor.init('GDAL_TEST_RDT',1005))", "BLOCKBSIZE=2"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 21212, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_rgb_b3_bsq(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/rgbsmall.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1006, sdo_geor.init('GDAL_TEST_RDT',1006))", "BLOCKBSIZE=3", "INTERLEAVE=BSQ"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 21212, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_rgb_b3_bip(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/rgbsmall.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1007, sdo_geor.init('GDAL_TEST_RDT',1007))", "BLOCKBSIZE=3", "INTERLEAVE=BIP"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 21212, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_rgb_b3_bil(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/rgbsmall.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1008, sdo_geor.init('GDAL_TEST_RDT',1008))", "BLOCKBSIZE=3", "INTERLEAVE=BIL"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 21212, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_byte_deflate(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/byte.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1009, sdo_geor.init('GDAL_TEST_RDT',1009))", "COMPRESS=DEFLATE"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 4672, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_rgb_deflate_b3(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/rgbsmall.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1010, sdo_geor.init('GDAL_TEST_RDT',1010))", "COMPRESS=DEFLATE", "BLOCKBSIZE=3", "INTERLEAVE=PIXEL"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 21212, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_1bit(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/byte.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1011, sdo_geor.init('GDAL_TEST_RDT',1011))", "NBITS=1"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 252, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_2bit(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/byte.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1012, sdo_geor.init('GDAL_TEST_RDT',1012))", "NBITS=2"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 718, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_4bit(): if gdaltest.oci_ds is None: pytest.skip() ds_src = gdal.Open('data/byte.tif') ds = gdaltest.georasterDriver.CreateCopy(get_connection_str() + ',GDAL_TEST,RASTER', ds_src, 1, ["DESCRIPTION=(id number, raster sdo_georaster)", "INSERT=(1013, sdo_geor.init('GDAL_TEST_RDT',1013))", "NBITS=4"]) ds_name = ds.GetDescription() ds = None tst = gdaltest.GDALTest('GeoRaster', ds_name, 1, 2578, filename_absolute=1) return tst.testOpen() ############################################################################### # def test_georaster_cleanup(): if gdaltest.oci_ds is None: pytest.skip() gdaltest.oci_ds.ExecuteSQL('drop table GDAL_TEST') gdaltest.oci_ds.ExecuteSQL('drop table GDAL_TEST_RDT') gdaltest.oci_ds.Destroy() gdaltest.oci_ds = None ############################################################################### # gdalautotest-3.1.2/gdrivers/kea.py0000775000175000017500000005461513701060015015641 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id $ # # Project: GDAL/OGR Test Suite # Purpose: Test KEA driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2014, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import osr import gdaltest import pytest ############################################################################### def test_kea_init(): gdaltest.kea_driver = gdal.GetDriverByName('KEA') ############################################################################### # Test copying a reference sample with CreateCopy() def test_kea_1(): if gdaltest.kea_driver is None: pytest.skip() tst = gdaltest.GDALTest('KEA', 'byte.tif', 1, 4672, options=['IMAGEBLOCKSIZE=15', 'THEMATIC=YES']) return tst.testCreateCopy(check_srs=True, check_gt=1, new_filename='tmp/byte.kea') ############################################################################### # Test CreateCopy() for various data types def test_kea_2(): if gdaltest.kea_driver is None: pytest.skip() src_files = ['byte.tif', 'int16.tif', '../../gcore/data/uint16.tif', '../../gcore/data/int32.tif', '../../gcore/data/uint32.tif', '../../gcore/data/float32.tif', '../../gcore/data/float64.tif'] for src_file in src_files: tst = gdaltest.GDALTest('KEA', src_file, 1, 4672) tst.testCreateCopy(check_minmax=1) ############################################################################### # Test Create() for various data types def test_kea_3(): if gdaltest.kea_driver is None: pytest.skip() src_files = ['byte.tif', 'int16.tif', '../../gcore/data/uint16.tif', '../../gcore/data/int32.tif', '../../gcore/data/uint32.tif', '../../gcore/data/float32.tif', '../../gcore/data/float64.tif'] for src_file in src_files: tst = gdaltest.GDALTest('KEA', src_file, 1, 4672) tst.testCreate(out_bands=1, check_minmax=1) ############################################################################### # Test Create()/CreateCopy() error cases or limit cases def test_kea_4(): if gdaltest.kea_driver is None: pytest.skip() gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdaltest.kea_driver.Create("/non_existing_path/non_existing_path", 1, 1) gdal.PopErrorHandler() assert ds is None src_ds = gdaltest.kea_driver.Create('tmp/src.kea', 1, 1, 0) assert src_ds is not None ds = gdaltest.kea_driver.CreateCopy("tmp/out.kea", src_ds) assert ds is not None assert ds.RasterCount == 0 src_ds = None ds = None # Test updating a read-only file ds = gdaltest.kea_driver.Create('tmp/out.kea', 1, 1) ds.GetRasterBand(1).Fill(255) ds = None ds = gdal.Open('tmp/out.kea') gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.SetProjection('a') gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.SetGeoTransform([1, 2, 3, 4, 5, 6]) gdal.PopErrorHandler() assert ret != 0 # Disabled for now since some of them cause memory leaks or # crash in the HDF5 library finalizer if False: # pylint: disable=using-constant-test gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.SetMetadataItem('foo', 'bar') gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.SetMetadata({'foo': 'bar'}) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.GetRasterBand(1).SetMetadataItem('foo', 'bar') gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.GetRasterBand(1).SetMetadata({'foo': 'bar'}) gdal.PopErrorHandler() assert ret != 0 gdal.PushErrorHandler('CPLQuietErrorHandler') ret = ds.SetGCPs([], "") gdal.PopErrorHandler() assert ret != 0 with gdaltest.error_handler(): ret = ds.AddBand(gdal.GDT_Byte) assert ret != 0 with gdaltest.error_handler(): ret = ds.GetRasterBand(1).WriteRaster(0, 0, 1, 1, '\0') assert ret != 0 with gdaltest.error_handler(): ret = ds.FlushCache() assert ret != 0 assert ds.GetRasterBand(1).Checksum() == 3 ds = None gdaltest.kea_driver.Delete('tmp/src.kea') gdaltest.kea_driver.Delete('tmp/out.kea') ############################################################################### # Test Create() creation options def test_kea_5(): if gdaltest.kea_driver is None: pytest.skip() options = ['IMAGEBLOCKSIZE=15', 'ATTBLOCKSIZE=100', 'MDC_NELMTS=10', 'RDCC_NELMTS=256', 'RDCC_NBYTES=500000', 'RDCC_W0=0.5', 'SIEVE_BUF=32768', 'META_BLOCKSIZE=1024', 'DEFLATE=9', 'THEMATIC=YES'] ds = gdaltest.kea_driver.Create("tmp/out.kea", 100, 100, 3, options=options) ds = None ds = gdal.Open('tmp/out.kea') assert ds.GetRasterBand(1).GetBlockSize() == [15, 15] assert ds.GetRasterBand(1).GetMetadataItem('LAYER_TYPE') == 'thematic', \ ds.GetRasterBand(1).GetMetadata() assert ds.GetRasterBand(1).Checksum() == 0 assert ds.GetGeoTransform() == (0, 1, 0, 0, 0, -1) assert ds.GetProjectionRef() == '' ds = None gdaltest.kea_driver.Delete('tmp/out.kea') ############################################################################### # Test metadata def test_kea_6(): if gdaltest.kea_driver is None: pytest.skip() ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1, 5) ds.SetMetadata({'foo': 'bar'}) ds.SetMetadataItem('bar', 'baw') ds.GetRasterBand(1).SetMetadata({'bar': 'baz'}) ds.GetRasterBand(1).SetDescription('desc') ds.GetRasterBand(2).SetMetadata({'LAYER_TYPE': 'any_string_that_is_not_athematic_is_thematic'}) ds.GetRasterBand(3).SetMetadata({'LAYER_TYPE': 'athematic'}) ds.GetRasterBand(4).SetMetadataItem('LAYER_TYPE', 'thematic') ds.GetRasterBand(5).SetMetadataItem('LAYER_TYPE', 'athematic') assert ds.SetMetadata({'foo': 'bar'}, 'other_domain') != 0 assert ds.SetMetadataItem('foo', 'bar', 'other_domain') != 0 assert ds.GetRasterBand(1).SetMetadata({'foo': 'bar'}, 'other_domain') != 0 assert ds.GetRasterBand(1).SetMetadataItem('foo', 'bar', 'other_domain') != 0 ds = None ds = gdal.Open('tmp/out.kea') assert ds.GetMetadata('other_domain') == {} assert ds.GetMetadataItem('item', 'other_domain') is None assert ds.GetRasterBand(1).GetMetadata('other_domain') == {} assert ds.GetRasterBand(1).GetMetadataItem('item', 'other_domain') is None md = ds.GetMetadata() assert md['foo'] == 'bar' assert ds.GetMetadataItem('foo') == 'bar' assert ds.GetMetadataItem('bar') == 'baw' assert ds.GetRasterBand(1).GetDescription() == 'desc' md = ds.GetRasterBand(1).GetMetadata() assert md['bar'] == 'baz' assert ds.GetRasterBand(1).GetMetadataItem('bar') == 'baz' assert ds.GetRasterBand(2).GetMetadataItem('LAYER_TYPE') == 'thematic' assert ds.GetRasterBand(3).GetMetadataItem('LAYER_TYPE') == 'athematic' assert ds.GetRasterBand(4).GetMetadataItem('LAYER_TYPE') == 'thematic' assert ds.GetRasterBand(5).GetMetadataItem('LAYER_TYPE') == 'athematic' out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) ds = None assert out2_ds.GetMetadataItem('foo') == 'bar' assert out2_ds.GetRasterBand(1).GetMetadataItem('bar') == 'baz' out2_ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test georef def test_kea_7(): if gdaltest.kea_driver is None: pytest.skip() sr = osr.SpatialReference() sr.ImportFromEPSG(4326) # Geotransform ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1) assert ds.GetGCPCount() == 0 assert ds.SetGeoTransform([1, 2, 3, 4, 5, 6]) == 0 assert ds.SetProjection(sr.ExportToWkt()) == 0 ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) ds = None assert out2_ds.GetGCPCount() == 0 assert out2_ds.GetGeoTransform() == (1, 2, 3, 4, 5, 6) assert out2_ds.GetProjectionRef() != '' out2_ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') # GCP ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1) gcp1 = gdal.GCP(0, 1, 2, 3, 4) gcp1.Id = "id" gcp1.Info = "info" gcp2 = gdal.GCP(0, 1, 2, 3, 4) gcps = [gcp1, gcp2] ds.SetGCPs(gcps, sr.ExportToWkt()) ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) ds = None assert out2_ds.GetGCPCount() == 2 assert out2_ds.GetGCPProjection() != '' got_gcps = out2_ds.GetGCPs() for i in range(2): assert (got_gcps[i].GCPX == gcps[i].GCPX and got_gcps[i].GCPY == gcps[i].GCPY and \ got_gcps[i].GCPZ == gcps[i].GCPZ and got_gcps[i].GCPPixel == gcps[i].GCPPixel and \ got_gcps[i].GCPLine == gcps[i].GCPLine and got_gcps[i].Id == gcps[i].Id and \ got_gcps[i].Info == gcps[i].Info) out2_ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test colortable def test_kea_8(): if gdaltest.kea_driver is None: pytest.skip() for i in range(2): ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1) assert ds.GetRasterBand(1).GetColorTable() is None assert ds.GetRasterBand(1).SetColorTable(None) != 0 ct = gdal.ColorTable() ct.SetColorEntry(0, (0, 255, 0, 255)) ct.SetColorEntry(1, (255, 0, 255, 255)) ct.SetColorEntry(2, (0, 0, 255, 255)) assert ds.GetRasterBand(1).SetColorTable(ct) == 0 if i == 1: # And again assert ds.GetRasterBand(1).SetColorTable(ct) == 0 ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) ds = None got_ct = out2_ds.GetRasterBand(1).GetColorTable() assert got_ct.GetCount() == 3, 'Got wrong color table entry count.' assert got_ct.GetColorEntry(1) == (255, 0, 255, 255), \ 'Got wrong color table entry.' out2_ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test color interpretation def test_kea_9(): if gdaltest.kea_driver is None: pytest.skip() ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1, gdal.GCI_YCbCr_CrBand - gdal.GCI_GrayIndex + 1) assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex for i in range(gdal.GCI_GrayIndex, gdal.GCI_YCbCr_CrBand + 1): ds.GetRasterBand(i).SetColorInterpretation(i) ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) ds = None for i in range(gdal.GCI_GrayIndex, gdal.GCI_YCbCr_CrBand + 1): assert out2_ds.GetRasterBand(i).GetColorInterpretation() == i, \ 'Got wrong color interpretation.' out2_ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test nodata def test_kea_10(): if gdaltest.kea_driver is None: pytest.skip() for (dt, nd, expected_nd) in [(gdal.GDT_Byte, 0, 0), (gdal.GDT_Byte, 1.1, 1.0), (gdal.GDT_Byte, 255, 255), (gdal.GDT_Byte, -1, None), (gdal.GDT_Byte, 256, None), (gdal.GDT_UInt16, 0, 0), (gdal.GDT_UInt16, 65535, 65535), (gdal.GDT_UInt16, -1, None), (gdal.GDT_UInt16, 65536, None), (gdal.GDT_Int16, -32768, -32768), (gdal.GDT_Int16, 32767, 32767), (gdal.GDT_Int16, -32769, None), (gdal.GDT_Int16, 32768, None), (gdal.GDT_UInt32, 0, 0), (gdal.GDT_UInt32, 0xFFFFFFFF, 0xFFFFFFFF), (gdal.GDT_UInt32, -1, None), (gdal.GDT_UInt32, 0xFFFFFFFF + 1, None), (gdal.GDT_Int32, -2147483648, -2147483648), (gdal.GDT_Int32, 2147483647, 2147483647), (gdal.GDT_Int32, -2147483649, None), (gdal.GDT_Int32, 2147483648, None), (gdal.GDT_Float32, 0.5, 0.5), ]: ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1, 1, dt) assert ds.GetRasterBand(1).GetNoDataValue() is None ds.GetRasterBand(1).SetNoDataValue(nd) if ds.GetRasterBand(1).GetNoDataValue() != expected_nd: print(dt) pytest.fail('Got wrong nodata.') ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) ds = None if out2_ds.GetRasterBand(1).GetNoDataValue() != expected_nd: print(dt) pytest.fail('Got wrong nodata.') out2_ds.GetRasterBand(1).DeleteNoDataValue() out2_ds = None ds = gdal.Open('tmp/out2.kea') assert ds.GetRasterBand(1).GetNoDataValue() is None ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test AddBand def test_kea_11(): if gdaltest.kea_driver is None: pytest.skip() ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1, 1, gdal.GDT_Byte) ds = None ds = gdal.Open('tmp/out.kea', gdal.GA_Update) assert ds.AddBand(gdal.GDT_Byte) == 0 assert ds.AddBand(gdal.GDT_Int16, options=['DEFLATE=9']) == 0 ds = None ds = gdal.Open('tmp/out.kea') assert ds.RasterCount == 3 assert ds.GetRasterBand(2).DataType == gdal.GDT_Byte assert ds.GetRasterBand(3).DataType == gdal.GDT_Int16 ds = None gdaltest.kea_driver.Delete('tmp/out.kea') ############################################################################### # Test RAT def test_kea_12(): if gdaltest.kea_driver is None: pytest.skip() ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1, 1, gdal.GDT_Byte) assert ds.GetRasterBand(1).GetDefaultRAT().GetColumnCount() == 0 assert ds.GetRasterBand(1).SetDefaultRAT(None) != 0 rat = ds.GetRasterBand(1).GetDefaultRAT() rat.CreateColumn('col_real_generic', gdal.GFT_Real, gdal.GFU_Generic) assert ds.GetRasterBand(1).SetDefaultRAT(rat) == 0 rat = ds.GetRasterBand(1).GetDefaultRAT() rat.CreateColumn('col_integer_pixelcount', gdal.GFT_Real, gdal.GFU_PixelCount) rat.CreateColumn('col_string_name', gdal.GFT_String, gdal.GFU_Name) rat.CreateColumn('col_integer_red', gdal.GFT_Integer, gdal.GFU_Red) rat.CreateColumn('col_integer_green', gdal.GFT_Integer, gdal.GFU_Green) rat.CreateColumn('col_integer_blue', gdal.GFT_Integer, gdal.GFU_Blue) rat.CreateColumn('col_integer_alpha', gdal.GFT_Integer, gdal.GFU_Alpha) rat.SetRowCount(1) rat.SetValueAsString(0, 0, "1.23") rat.SetValueAsInt(0, 0, 1) rat.SetValueAsDouble(0, 0, 1.23) rat.SetValueAsInt(0, 2, 0) rat.SetValueAsDouble(0, 2, 0) rat.SetValueAsString(0, 2, 'foo') rat.SetValueAsString(0, 3, "123") rat.SetValueAsDouble(0, 3, 123) rat.SetValueAsInt(0, 3, 123) cloned_rat = rat.Clone() assert ds.GetRasterBand(1).SetDefaultRAT(rat) == 0 ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) rat = out2_ds.GetRasterBand(1).GetDefaultRAT() for i in range(7): assert rat.GetColOfUsage(rat.GetUsageOfCol(i)) == i assert cloned_rat.GetNameOfCol(0) == 'col_real_generic' assert cloned_rat.GetTypeOfCol(0) == gdal.GFT_Real assert cloned_rat.GetUsageOfCol(0) == gdal.GFU_Generic assert cloned_rat.GetUsageOfCol(1) == gdal.GFU_PixelCount assert cloned_rat.GetTypeOfCol(2) == gdal.GFT_String assert cloned_rat.GetTypeOfCol(3) == gdal.GFT_Integer assert rat.GetColumnCount() == cloned_rat.GetColumnCount() assert rat.GetRowCount() == cloned_rat.GetRowCount() for i in range(rat.GetColumnCount()): assert rat.GetNameOfCol(i) == cloned_rat.GetNameOfCol(i) assert rat.GetTypeOfCol(i) == cloned_rat.GetTypeOfCol(i) assert rat.GetUsageOfCol(i) == cloned_rat.GetUsageOfCol(i) gdal.PushErrorHandler('CPLQuietErrorHandler') rat.GetNameOfCol(-1) rat.GetTypeOfCol(-1) rat.GetUsageOfCol(-1) rat.GetNameOfCol(rat.GetColumnCount()) rat.GetTypeOfCol(rat.GetColumnCount()) rat.GetUsageOfCol(rat.GetColumnCount()) rat.GetValueAsDouble(-1, 0) rat.GetValueAsInt(-1, 0) rat.GetValueAsString(-1, 0) rat.GetValueAsDouble(rat.GetColumnCount(), 0) rat.GetValueAsInt(rat.GetColumnCount(), 0) rat.GetValueAsString(rat.GetColumnCount(), 0) rat.GetValueAsDouble(0, -1) rat.GetValueAsInt(0, -1) rat.GetValueAsString(0, -1) rat.GetValueAsDouble(0, rat.GetRowCount()) rat.GetValueAsInt(0, rat.GetRowCount()) rat.GetValueAsString(0, rat.GetRowCount()) gdal.PopErrorHandler() assert rat.GetValueAsDouble(0, 0) == 1.23 assert rat.GetValueAsInt(0, 0) == 1 assert rat.GetValueAsString(0, 0) == '1.23' assert rat.GetValueAsInt(0, 3) == 123 assert rat.GetValueAsDouble(0, 3) == 123 assert rat.GetValueAsString(0, 3) == '123' assert rat.GetValueAsString(0, 2) == 'foo' assert rat.GetValueAsInt(0, 2) == 0 assert rat.GetValueAsDouble(0, 2) == 0 ds = None out2_ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test overviews def test_kea_13(): if gdaltest.kea_driver is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') ds = gdaltest.kea_driver.CreateCopy("tmp/out.kea", src_ds) src_ds = None ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) # yes CreateCopy() of KEA copies overviews assert out2_ds.GetRasterBand(1).GetOverviewCount() == 1 assert out2_ds.GetRasterBand(1).GetOverview(0).Checksum() == 1087 assert out2_ds.GetRasterBand(1).GetOverview(0).GetDefaultRAT() is None assert out2_ds.GetRasterBand(1).GetOverview(0).SetDefaultRAT(None) != 0 assert out2_ds.GetRasterBand(1).GetOverview(-1) is None assert out2_ds.GetRasterBand(1).GetOverview(1) is None out2_ds = None ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test mask bands def test_kea_14(): if gdaltest.kea_driver is None: pytest.skip() ds = gdaltest.kea_driver.Create("tmp/out.kea", 1, 1, 1, gdal.GDT_Byte) assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_ALL_VALID assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 3 ds.GetRasterBand(1).CreateMaskBand(0) assert ds.GetRasterBand(1).GetMaskFlags() == 0 assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 3 ds.GetRasterBand(1).GetMaskBand().Fill(0) assert ds.GetRasterBand(1).GetMaskBand().Checksum() == 0 ds = None ds = gdal.Open('tmp/out.kea') out2_ds = gdaltest.kea_driver.CreateCopy('tmp/out2.kea', ds) # yes CreateCopy() of KEA copies overviews assert out2_ds.GetRasterBand(1).GetMaskFlags() == 0 assert out2_ds.GetRasterBand(1).GetMaskBand().Checksum() == 0 out2_ds = None ds = None gdaltest.kea_driver.Delete('tmp/out.kea') gdaltest.kea_driver.Delete('tmp/out2.kea') ############################################################################### # Test /vsi functionality def test_kea_15(): if gdaltest.kea_driver is None: pytest.skip() # create an temp image ds = gdaltest.kea_driver.Create('tmp/vsitest.kea', 1, 1) ds.GetRasterBand(1).Fill(255) ds = None # load it into /vsimem and try and open it gdal.FileFromMemBuffer('/vsimem/foo.kea', open('tmp/vsitest.kea', 'rb').read()) ds = gdal.Open('/vsimem/foo.kea') assert ds.GetDriver().ShortName == "KEA" ds = None gdal.Unlink('/vsimem/foo.kea') gdaltest.kea_driver.Delete('tmp/vsitest.kea') def test_kea_destroy(): # there is always a 'tmp/out.kea.aux.xml' left behind by # a few of the tests gdal.Unlink('tmp/out.kea.aux.xml') gdalautotest-3.1.2/gdrivers/rs2.py0000775000175000017500000000625113701060015015600 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: rs2.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test RS2 driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Test reading a - fake - RS2 dataset. Note: the XML file was written by studying # the code of the driver. It is really not meant as being used by other readers. If RS2 code # evolves, this might break the test legitimately ! def test_rs2_1(): tst = gdaltest.GDALTest('RS2', 'product.xml', 1, 4672) return tst.testOpen() def test_rs2_2(): tst = gdaltest.GDALTest('RS2', 'RADARSAT_2_CALIB:BETA0:data/product.xml', 1, 4848, filename_absolute=1) return tst.testOpen() # Test reading our dummy RPC def test_rs2_3(): ds = gdal.Open('data/product.xml') got_rpc = ds.GetMetadata('RPC') expected_rpc = {'ERR_BIAS': 'biasError', 'ERR_RAND': 'randomError', 'HEIGHT_OFF': 'heightOffset', 'HEIGHT_SCALE': 'heightScale', 'LAT_OFF': 'latitudeOffset', 'LAT_SCALE': 'latitudeScale', 'LINE_DEN_COEFF': 'lineDenominatorCoefficients', 'LINE_NUM_COEFF': 'lineNumeratorCoefficients', 'LINE_OFF': 'lineOffset', 'LINE_SCALE': 'lineScale', 'LONG_OFF': 'longitudeOffset', 'LONG_SCALE': 'longitudeScale', 'SAMP_DEN_COEFF': 'pixelDenominatorCoefficients', 'SAMP_NUM_COEFF': 'pixelNumeratorCoefficients', 'SAMP_OFF': 'pixelOffset', 'SAMP_SCALE': 'pixelScale'} assert got_rpc == expected_rpc gdalautotest-3.1.2/gdrivers/ntv1.py0000775000175000017500000000371513701060015015764 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ntv1.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: NTv1 Testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2018, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys sys.path.append('../pymod') import gdaltest ############################################################################### # Open a little-endian NTv2 grid def test_ntv1_1(): tst = gdaltest.GDALTest('NTV1', 'ntv1_can_truncated.dat', 1, 65532) gt = (-44.375, 0.25, 0.0, 40.375, 0.0, -0.25) return tst.testOpen(check_gt=gt, check_prj='WGS84') gdalautotest-3.1.2/gdrivers/ctg.py0000775000175000017500000000624013701060015015645 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ctg.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test CTG driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Test a fake CTG dataset def test_ctg_1(): tst = gdaltest.GDALTest('CTG', 'fake_grid_cell', 1, 21) expected_gt = [421000.0, 200.0, 0.0, 5094400.0, 0.0, -200.0] expected_srs = """PROJCS["WGS 84 / UTM zone 14N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-99], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], AUTHORITY["EPSG","32614"], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" ret = tst.testOpen(check_gt=expected_gt, check_prj=expected_srs) if ret == 'success': ds = gdal.Open('data/fake_grid_cell') lst = ds.GetRasterBand(1).GetCategoryNames() assert lst is not None and lst, 'expected non empty category names for band 1' lst = ds.GetRasterBand(2).GetCategoryNames() assert lst is None, 'expected empty category names for band 2' assert ds.GetRasterBand(1).GetNoDataValue() == 0, \ 'did not get expected nodata value' return ret gdalautotest-3.1.2/gdrivers/rasterlite.py0000775000175000017500000003213613701060015017251 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: rasterlite.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for Rasterlite driver. # Author: Even Rouault, # ############################################################################### # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import ogr import gdaltest import pytest ############################################################################### # Get the rasterlite driver def test_rasterlite_1(): gdaltest.rasterlite_drv = gdal.GetDriverByName('RASTERLITE') gdaltest.epsilon_drv = gdal.GetDriverByName('EPSILON') # This is to speed-up the runtime of tests on EXT4 filesystems # Do not use this for production environment if you care about data safety # w.r.t system/OS crashes, unless you know what you are doing. gdal.SetConfigOption('OGR_SQLITE_SYNCHRONOUS', 'OFF') ############################################################################### # Test opening a rasterlite DB without overviews def test_rasterlite_2(): if gdaltest.rasterlite_drv is None: pytest.skip() # Test if SQLite3 supports rtrees try: os.remove('tmp/testrtree.sqlite') except OSError: pass ds2 = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/testrtree.sqlite') gdal.ErrorReset() ds2.ExecuteSQL('CREATE VIRTUAL TABLE testrtree USING rtree(id,minX,maxX,minY,maxY)') ds2.Destroy() try: os.remove('tmp/testrtree.sqlite') except OSError: pass if gdal.GetLastErrorMsg().find('rtree') != -1: gdaltest.rasterlite_drv = None pytest.skip('Please upgrade your sqlite3 library to be able to read Rasterlite DBs (needs rtree support)!') gdal.ErrorReset() ds = gdal.Open('data/rasterlite.sqlite') if ds is None: if gdal.GetLastErrorMsg().find('unsupported file format') != -1: gdaltest.rasterlite_drv = None pytest.skip('Please upgrade your sqlite3 library to be able to read Rasterlite DBs!') pytest.fail() assert ds.RasterCount == 3, 'expected 3 bands' assert ds.GetRasterBand(1).GetOverviewCount() == 0, 'did not expect overview' cs = ds.GetRasterBand(1).Checksum() expected_cs = 11746 assert cs == expected_cs or cs == 11751, \ ('for band 1, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) cs = ds.GetRasterBand(2).Checksum() expected_cs = 19843 assert cs == expected_cs or cs == 20088 or cs == 20083, \ ('for band 2, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) cs = ds.GetRasterBand(3).Checksum() expected_cs = 48911 assert cs == expected_cs or cs == 47978, \ ('for band 3, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) assert ds.GetProjectionRef().find('WGS_1984') != -1, \ ('projection_ref = %s' % ds.GetProjectionRef()) gt = ds.GetGeoTransform() expected_gt = (-180.0, 360. / ds.RasterXSize, 0.0, 90.0, 0.0, -180. / ds.RasterYSize) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-15) ds = None ############################################################################### # Test opening a rasterlite DB with overviews def test_rasterlite_3(): if gdaltest.rasterlite_drv is None: pytest.skip() ds = gdal.Open('RASTERLITE:data/rasterlite_pyramids.sqlite,table=test') assert ds.RasterCount == 3, 'expected 3 bands' assert ds.GetRasterBand(1).GetOverviewCount() == 1, 'expected 1 overview' cs = ds.GetRasterBand(1).GetOverview(0).Checksum() expected_cs = 59551 assert cs == expected_cs or cs == 59833, \ ('for overview of band 1, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) cs = ds.GetRasterBand(2).GetOverview(0).Checksum() expected_cs = 59603 assert cs == expected_cs or cs == 59588, \ ('for overview of band 2, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) cs = ds.GetRasterBand(3).GetOverview(0).Checksum() expected_cs = 42173 assert cs == expected_cs or cs == 42361, \ ('for overview of band 3, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) ds = None ############################################################################### # Test opening a rasterlite DB with color table and user-defined spatial extent def test_rasterlite_4(): if gdaltest.rasterlite_drv is None: pytest.skip() ds = gdal.Open('RASTERLITE:data/rasterlite_pct.sqlite,minx=0,miny=0,maxx=180,maxy=90') assert ds.RasterCount == 1, 'expected 1 band' assert ds.RasterXSize == 169 and ds.RasterYSize == 85 ct = ds.GetRasterBand(1).GetRasterColorTable() assert ct is not None, 'did not get color table' cs = ds.GetRasterBand(1).Checksum() expected_cs = 36473 assert cs == expected_cs, \ ('for band 1, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) ds = None ############################################################################### # Test opening a rasterlite DB with color table and do color table expansion def test_rasterlite_5(): if gdaltest.rasterlite_drv is None: pytest.skip() ds = gdal.Open('RASTERLITE:data/rasterlite_pct.sqlite,bands=3') assert ds.RasterCount == 3, 'expected 3 bands' ct = ds.GetRasterBand(1).GetRasterColorTable() assert ct is None, 'did not expect color table' cs = ds.GetRasterBand(1).Checksum() expected_cs = 506 assert cs == expected_cs, \ ('for band 1, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) cs = ds.GetRasterBand(2).Checksum() expected_cs = 3842 assert cs == expected_cs, \ ('for band 2, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) cs = ds.GetRasterBand(3).Checksum() expected_cs = 59282 assert cs == expected_cs, \ ('for band 3, cs = %d, different from expected_cs = %d' % (cs, expected_cs)) ds = None ############################################################################### # Test CreateCopy() def test_rasterlite_6(): if gdaltest.rasterlite_drv is None: pytest.skip() # Test first if spatialite is available gdal.PushErrorHandler('CPLQuietErrorHandler') ogr_ds = ogr.GetDriverByName('SQLite').CreateDataSource('tmp/spatialite_test.db', options=['SPATIALITE=YES']) if ogr_ds is not None: sql_lyr = ogr_ds.ExecuteSQL("SELECT AsText(GeomFromText('POINT(0 1)'))") else: sql_lyr = None gdal.PopErrorHandler() if sql_lyr is None: gdaltest.has_spatialite = False ogr_ds = None pytest.skip() gdaltest.has_spatialite = True ogr_ds.ReleaseResultSet(sql_lyr) ogr_ds.Destroy() # Test now CreateCopy() src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('RASTERLITE').CreateCopy('RASTERLITE:tmp/byte.sqlite,table=byte', src_ds) assert ds is not None assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ 'Wrong checksum' gt = ds.GetGeoTransform() expected_gt = src_ds.GetGeoTransform() for i in range(6): assert not abs(gt[i] - expected_gt[i] > 1e-5), \ ('Expected : %s\nGot : %s' % (expected_gt, gt)) assert ds.GetProjectionRef().find('NAD27 / UTM zone 11N') != -1, 'Wrong SRS' src_ds = None ds = None ############################################################################### # Test BuildOverviews() def test_rasterlite_7(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() ds = gdal.Open('tmp/byte.sqlite', gdal.GA_Update) # Resampling method is not taken into account ds.BuildOverviews('NEAREST', overviewlist=[2, 4]) assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 1192, \ 'Wrong checksum for overview 0' assert ds.GetRasterBand(1).GetOverview(1).Checksum() == 233, \ 'Wrong checksum for overview 1' # Reopen and test ds = None ds = gdal.Open('tmp/byte.sqlite') assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 1192, \ 'Wrong checksum for overview 0' assert ds.GetRasterBand(1).GetOverview(1).Checksum() == 233, \ 'Wrong checksum for overview 1' ############################################################################### # Test CleanOverviews() def test_rasterlite_8(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() ds = gdal.Open('tmp/byte.sqlite', gdal.GA_Update) ds.BuildOverviews(overviewlist=[]) assert ds.GetRasterBand(1).GetOverviewCount() == 0 ############################################################################### # Create a rasterlite dataset with EPSILON tiles def test_rasterlite_9(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() if gdaltest.epsilon_drv is None: pytest.skip() tst = gdaltest.GDALTest('RASTERLITE', 'byte.tif', 1, 4866, options=['DRIVER=EPSILON']) return tst.testCreateCopy(check_gt=1, check_srs=1, check_minmax=0) ############################################################################### # Create a rasterlite dataset with EPSILON tiles def test_rasterlite_10(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() if gdaltest.epsilon_drv is None: pytest.skip() tst = gdaltest.GDALTest('RASTERLITE', 'rgbsmall.tif', 1, 23189, options=['DRIVER=EPSILON']) return tst.testCreateCopy(check_gt=1, check_srs=1, check_minmax=0) ############################################################################### # Test BuildOverviews() with AVERAGE resampling def test_rasterlite_11(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() ds = gdal.Open('tmp/byte.sqlite', gdal.GA_Update) ds.BuildOverviews(overviewlist=[]) # Resampling method is not taken into account ds.BuildOverviews('AVERAGE', overviewlist=[2, 4]) # Reopen and test ds = None ds = gdal.Open('tmp/byte.sqlite') assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 1152, \ 'Wrong checksum for overview 0' assert ds.GetRasterBand(1).GetOverview(1).Checksum() == 215, \ 'Wrong checksum for overview 1' ############################################################################### # Test opening a .rasterlite file def test_rasterlite_12(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() ds = gdal.Open('data/byte.rasterlite') assert ds.GetRasterBand(1).Checksum() == 4672, 'validation failed' ############################################################################### # Test opening a .rasterlite.sql file def test_rasterlite_13(): if gdaltest.rasterlite_drv is None: pytest.skip() if gdaltest.has_spatialite is False: pytest.skip() if gdaltest.rasterlite_drv.GetMetadataItem("ENABLE_SQL_SQLITE_FORMAT") != 'YES': pytest.skip() ds = gdal.Open('data/byte.rasterlite.sql') assert ds.GetRasterBand(1).Checksum() == 4672, 'validation failed' ############################################################################### # Cleanup def test_rasterlite_cleanup(): if gdaltest.rasterlite_drv is None: pytest.skip() try: os.remove('tmp/spatialite_test.db') except OSError: pass try: os.remove('tmp/byte.sqlite') except OSError: pass try: os.remove('tmp/byte.tif.tst') except OSError: pass try: os.remove('tmp/rgbsmall.tif.tst') except OSError: pass gdalautotest-3.1.2/gdrivers/lcp.py0000775000175000017500000007511413701060015015654 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: lcp.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for LCP driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2009, Even Rouault # Copyright (c) 2013, Kyle Shannon # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import pytest ############################################################################### # Test test_FARSITE_UTM12.LCP def test_lcp_1(): ds = gdal.Open('data/test_FARSITE_UTM12.LCP') assert ds.RasterCount == 8, 'wrong number of bands' assert ds.GetProjectionRef().find('NAD83 / UTM zone 12N') != -1, \ ("didn't get expect projection. Got : %s" % (ds.GetProjectionRef())) metadata = [('LATITUDE', '49'), ('LINEAR_UNIT', 'Meters'), ('DESCRIPTION', 'This is a test LCP file created with FARSITE 4.1.054, using data downloaded from the USGS \r\nNational Map for LANDFIRE (2008-05-06). Data were reprojected to UTM zone 12 on NAD83 \r\nusing gdalwarp (GDAL 1.4.2).\r\n')] md = ds.GetMetadata() for item in metadata: assert md[item[0]] == item[1], \ ('wrong metadataitem for dataset. md[\'%s\']=\'%s\', expected \'%s\'' % (item[0], md[item[0]], item[1])) check_gt = (285807.932887174887583, 30, 0, 5379230.386217921040952, 0, -30) new_gt = ds.GetGeoTransform() for i in range(6): if new_gt[i] != pytest.approx(check_gt[i], abs=1e-5): print('') print('old = ', check_gt) print('new = ', new_gt) pytest.fail('Geotransform differs.') dataPerBand = [(18645, [('ELEVATION_UNIT', '0'), ('ELEVATION_UNIT_NAME', 'Meters'), ('ELEVATION_MIN', '1064'), ('ELEVATION_MAX', '1492'), ('ELEVATION_NUM_CLASSES', '-1'), ('ELEVATION_FILE', '')]), (16431, [('SLOPE_UNIT', '0'), ('SLOPE_UNIT_NAME', 'Degrees'), ('SLOPE_MIN', '0'), ('SLOPE_MAX', '34'), ('SLOPE_NUM_CLASSES', '36'), ('SLOPE_FILE', 'slope.asc')]), (18851, [('ASPECT_UNIT', '2'), ('ASPECT_UNIT_NAME', 'Azimuth degrees'), ('ASPECT_MIN', '0'), ('ASPECT_MAX', '357'), ('ASPECT_NUM_CLASSES', '-1'), ('ASPECT_FILE', 'aspect.asc')]), (26182, [('FUEL_MODEL_OPTION', '0'), ('FUEL_MODEL_OPTION_DESC', 'no custom models AND no conversion file needed'), ('FUEL_MODEL_MIN', '1'), ('FUEL_MODEL_MAX', '99'), ('FUEL_MODEL_NUM_CLASSES', '6'), ('FUEL_MODEL_VALUES', '1,2,5,8,10,99'), ('FUEL_MODEL_FILE', 'fbfm13.asc')]), (30038, [('CANOPY_COV_UNIT', '0'), ('CANOPY_COV_UNIT_NAME', 'Categories (0-4)'), ('CANOPY_COV_MIN', '0'), ('CANOPY_COV_MAX', '95'), ('CANOPY_COV_NUM_CLASSES', '10'), ('CANOPY_COV_FILE', 'cancov.asc')]), (22077, [('CANOPY_HT_UNIT', '3'), ('CANOPY_HT_UNIT_NAME', 'Meters x 10'), ('CANOPY_HT_MIN', '0'), ('CANOPY_HT_MAX', '375'), ('CANOPY_HT_NUM_CLASSES', '5'), ('CANOPY_HT_FILE', 'canht.asc')]), (30388, [('CBH_UNIT', '3'), ('CBH_UNIT_NAME', 'Meters x 10'), ('CBH_MIN', '0'), ('CBH_MAX', '100'), ('CBH_NUM_CLASSES', '33'), ('CBH_FILE', 'cbh.asc')]), (23249, [('CBD_UNIT', '3'), ('CBD_UNIT_NAME', 'kg/m^3 x 100'), ('CBD_MIN', '0'), ('CBD_MAX', '21'), ('CBD_NUM_CLASSES', '20'), ('CBD_FILE', 'cbd.asc')]) ] for i in range(8): band = ds.GetRasterBand(i + 1) assert band.Checksum() == dataPerBand[i][0], \ ('wrong checksum for band %d. Got %d, expected %d' % (i + 1, band.Checksum(), dataPerBand[i][0])) md = band.GetMetadata() for item in dataPerBand[i][1]: assert md[item[0]] == item[1], \ ('wrong metadataitem for band %d. md[\'%s\']=\'%s\', expected \'%s\'' % (i + 1, item[0], md[item[0]], item[1])) ds = None ############################################################################### # test test_USGS_LFNM_Alb83.lcp def test_lcp_2(): ds = gdal.Open('data/test_USGS_LFNM_Alb83.lcp') assert ds.RasterCount == 8, 'wrong number of bands' metadata = [('LATITUDE', '48'), ('LINEAR_UNIT', 'Meters'), ('DESCRIPTION', '')] md = ds.GetMetadata() for item in metadata: assert md[item[0]] == item[1], \ ('wrong metadataitem for dataset. md[\'%s\']=\'%s\', expected \'%s\'' % (item[0], md[item[0]], item[1])) check_gt = (-1328145, 30, 0, 2961735, 0, -30) new_gt = ds.GetGeoTransform() for i in range(6): if new_gt[i] != pytest.approx(check_gt[i], abs=1e-5): print('') print('old = ', check_gt) print('new = ', new_gt) pytest.fail('Geotransform differs.') dataPerBand = [(28381, [('ELEVATION_UNIT', '0'), ('ELEVATION_UNIT_NAME', 'Meters'), ('ELEVATION_MIN', '1064'), ('ELEVATION_MAX', '1492'), ('ELEVATION_NUM_CLASSES', '-1'), ('ELEVATION_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_elevation_1.txt')]), (25824, [('SLOPE_UNIT', '0'), ('SLOPE_UNIT_NAME', 'Degrees'), ('SLOPE_MIN', '0'), ('SLOPE_MAX', '34'), ('SLOPE_NUM_CLASSES', '35'), ('SLOPE_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_slope_1.txt')]), (28413, [('ASPECT_UNIT', '2'), ('ASPECT_UNIT_NAME', 'Azimuth degrees'), ('ASPECT_MIN', '0'), ('ASPECT_MAX', '357'), ('ASPECT_NUM_CLASSES', '-1'), ('ASPECT_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_aspect_1.txt')]), (19052, [('FUEL_MODEL_OPTION', '0'), ('FUEL_MODEL_OPTION_DESC', 'no custom models AND no conversion file needed'), ('FUEL_MODEL_MIN', '1'), ('FUEL_MODEL_MAX', '10'), ('FUEL_MODEL_NUM_CLASSES', '5'), ('FUEL_MODEL_VALUES', '1,2,5,8,10'), ('FUEL_MODEL_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_fuel1.txt')]), (30164, [('CANOPY_COV_UNIT', '1'), ('CANOPY_COV_UNIT_NAME', 'Percent'), ('CANOPY_COV_MIN', '0'), ('CANOPY_COV_MAX', '95'), ('CANOPY_COV_NUM_CLASSES', '10'), ('CANOPY_COV_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_canopy1.txt')]), (22316, [('CANOPY_HT_UNIT', '3'), ('CANOPY_HT_UNIT_NAME', 'Meters x 10'), ('CANOPY_HT_MIN', '0'), ('CANOPY_HT_MAX', '375'), ('CANOPY_HT_NUM_CLASSES', '5'), ('CANOPY_HT_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_height_1.txt')]), (30575, [('CBH_UNIT', '3'), ('CBH_UNIT_NAME', 'Meters x 10'), ('CBH_MIN', '0'), ('CBH_MAX', '100'), ('CBH_NUM_CLASSES', '33'), ('CBH_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_base_1.txt')]), (23304, [('CBD_UNIT', '3'), ('CBD_UNIT_NAME', 'kg/m^3 x 100'), ('CBD_MIN', '0'), ('CBD_MAX', '21'), ('CBD_NUM_CLASSES', '20'), ('CBD_FILE', 'd:\\scratch\\dist\\79990093\\Output\\rastert_density_1.txt')]) ] for i in range(8): band = ds.GetRasterBand(i + 1) assert band.Checksum() == dataPerBand[i][0], \ ('wrong checksum for band %d. Got %d, expected %d' % (i + 1, band.Checksum(), dataPerBand[i][0])) md = band.GetMetadata() for item in dataPerBand[i][1]: assert md[item[0]] == item[1], \ ('wrong metadataitem for band %d. md[\'%s\']=\'%s\', expected \'%s\'' % (i + 1, item[0], md[item[0]], item[1])) ds = None ############################################################################### # Test for empty prj def test_lcp_3(): ds = gdal.Open('data/test_USGS_LFNM_Alb83.lcp') assert ds is not None wkt = ds.GetProjection() assert wkt is not None, 'Got None from GetProjection()' ############################################################################### # Test that the prj file isn't added to the sibling list if it isn't there. def test_lcp_4(): ds = gdal.Open('data/test_USGS_LFNM_Alb83.lcp') assert ds is not None fl = ds.GetFileList() assert len(fl) == 1, 'Invalid file list' ############################################################################### # Test for valid prj def test_lcp_5(): ds = gdal.Open('data/test_FARSITE_UTM12.LCP') assert ds is not None wkt = ds.GetProjection() assert not (wkt is None or wkt == ''), 'Got invalid wkt from GetProjection()' ############################################################################### # Test for valid sibling list def test_lcp_6(): retval = 'success' ds = gdal.Open('data/test_FARSITE_UTM12.LCP') assert ds is not None fl = ds.GetFileList() if len(fl) != 2: gdaltest.post_reason('Invalid file list') retval = 'fail' ds = None try: os.remove('data/test_FARSITE_UTM12.LCP.aux.xml') except OSError: pass return retval ############################################################################### # Test create copy that copies data over def test_lcp_7(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None lcp_drv = gdal.GetDriverByName('LCP') assert lcp_drv is not None # Make sure all available band counts work. retval = 'success' co = ['LATITUDE=0', 'LINEAR_UNIT=METER'] for i in [5, 7, 8, 10]: src_ds = mem_drv.Create('/vsimem/lcptest', 10, 20, i, gdal.GDT_Int16) assert src_ds is not None dst_ds = lcp_drv.CreateCopy('tmp/lcp_7.lcp', src_ds, False, co) if dst_ds is None: gdaltest.post_reason('Failed to create lcp with %d bands' % i) retval = 'fail' break dst_ds = None src_ds = None dst_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_7.' + ext) except OSError: pass return retval ############################################################################### # Test create copy with invalid bands def test_lcp_8(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None lcp_drv = gdal.GetDriverByName('LCP') assert lcp_drv is not None gdal.PushErrorHandler('CPLQuietErrorHandler') retval = 'success' co = ['LATITUDE=0', 'LINEAR_UNIT=METER'] for i in [0, 1, 2, 3, 4, 6, 9, 11]: src_ds = mem_drv.Create('', 10, 10, i, gdal.GDT_Int16) if src_ds is None: retval = 'fail' break dst_ds = lcp_drv.CreateCopy('tmp/lcp_8.lcp', src_ds, False, co) src_ds = None if dst_ds is not None: gdaltest.post_reason('Created invalid lcp') retval = 'fail' dst_ds = None break dst_ds = None gdal.PopErrorHandler() for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_8.' + ext) except OSError: pass return retval ############################################################################### # Test create copy def test_lcp_9(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None lcp_drv = gdal.GetDriverByName('LCP') assert lcp_drv is not None src_ds = mem_drv.Create('', 10, 20, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' co = ['LATITUDE=0', 'LINEAR_UNIT=METER'] lcp_ds = lcp_drv.CreateCopy('tmp/lcp_9.lcp', src_ds, False, co) assert lcp_ds is not None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_9.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_10(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' for option in ['METERS', 'FEET']: co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'ELEVATION_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_10.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(1).GetMetadataItem("ELEVATION_UNIT_NAME") if units.lower() != option.lower(): gdaltest.post_reason('Could not set ELEVATION_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_10.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_11(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' for option in ['DEGREES', 'PERCENT']: co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'SLOPE_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_11.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(2).GetMetadataItem("SLOPE_UNIT_NAME") if units.lower() != option.lower(): gdaltest.post_reason('Could not set SLOPE_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_11.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_12(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' for option in ['GRASS_CATEGORIES', 'AZIMUTH_DEGREES', 'GRASS_DEGREES']: co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'ASPECT_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_12.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(3).GetMetadataItem("ASPECT_UNIT_NAME") if units.lower() != option.replace('_', ' ').lower(): gdaltest.post_reason('Could not set ASPECT_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_12.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_13(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' for option in ['PERCENT', 'CATEGORIES']: co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'CANOPY_COV_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_13.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(5).GetMetadataItem("CANOPY_COV_UNIT_NAME") if units.lower()[:10] != option.lower()[:10]: gdaltest.post_reason('Could not set CANOPY_COV_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_13.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_14(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' for option in ['METERS', 'FEET', 'METERS_X_10', 'FEET_X_10']: co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'CANOPY_HT_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_14.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(6).GetMetadataItem("CANOPY_HT_UNIT_NAME") if units.lower() != option.replace('_', ' ').lower(): gdaltest.post_reason('Could not set CANOPY_HT_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_14.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_15(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' for option in ['METERS', 'FEET', 'METERS_X_10', 'FEET_X_10']: co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'CBH_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_15.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(7).GetMetadataItem("CBH_UNIT_NAME") if units.lower() != option.replace('_', ' ').lower(): gdaltest.post_reason('Could not set CBH_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'prj', 'lcp.aux.xml']: try: os.remove('tmp/lcp_15.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work def test_lcp_16(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' answers = ['kg/m^3', 'lb/ft^3', 'kg/m^3 x 100', 'lb/ft^3 x 1000', 'tons/acre x 100'] for i, option in enumerate(['KG_PER_CUBIC_METER', 'POUND_PER_CUBIC_FOOT', 'KG_PER_CUBIC_METER_X_100', 'POUND_PER_CUBIC_FOOT_X_1000']): co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'CBD_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_16.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(8).GetMetadataItem("CBD_UNIT_NAME") if units.lower() != answers[i].lower(): gdaltest.post_reason('Could not set CBD_UNIT') retval = 'fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_16.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure all unit metadata co work # It is unclear whether the metadata generated is correct, or the # documentation. Docs say mg/ha * 10 and tn/ac * 10, metadata is not * 10. def test_lcp_17(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' answers = ['mg/ha', 't/ac x 10'] for i, option in enumerate(['MG_PER_HECTARE_X_10', 'TONS_PER_ACRE_X_10']): co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'DUFF_UNIT=%s' % option] lcp_ds = drv.CreateCopy('tmp/lcp_17.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' break units = lcp_ds.GetRasterBand(9).GetMetadataItem("DUFF_UNIT_NAME") if units.lower() != answers[i].lower(): # gdaltest.post_reason('Could not set DUFF_UNIT') retval = 'expected_fail' lcp_ds = None break lcp_ds = None src_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_17.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure creation options work. def test_lcp_18(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' co = ['LATITUDE=45', 'LINEAR_UNIT=METER'] lcp_ds = drv.CreateCopy('tmp/lcp_18.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' if lcp_ds.GetMetadataItem('LATITUDE') != '45': gdaltest.post_reason('Failed to set LATITUDE creation option') retval = 'fail' src_ds = None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_18.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure creation options work. def test_lcp_19(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' co = ['LATITUDE=0', 'LINEAR_UNIT=FOOT'] lcp_ds = drv.CreateCopy('tmp/lcp_19.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' if lcp_ds.GetMetadataItem('LINEAR_UNIT') != 'Feet': gdaltest.post_reason('Failed to set LINEAR_UNIT creation option') retval = 'fail' src_ds = None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_19.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure DESCRIPTION co works def test_lcp_20(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' desc = 'test description' co = ['LATITUDE=0', 'LINEAR_UNIT=METER', 'DESCRIPTION=%s' % desc] lcp_ds = drv.CreateCopy('tmp/lcp_20.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' if lcp_ds.GetMetadataItem('DESCRIPTION') != desc: gdaltest.post_reason('Failed to set DESCRIPTION creation option') retval = 'fail' src_ds = None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_20.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make data is copied over via checksums def test_lcp_21(): try: import random import struct except ImportError: pytest.skip() mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 3, 3, 10, gdal.GDT_Int16) assert src_ds is not None for i in range(10): data = [random.randint(0, 100) for i in range(9)] src_ds.GetRasterBand(i + 1).WriteRaster(0, 0, 3, 3, struct.pack('h' * 9, *data)) co = ['LATITUDE=0', 'LINEAR_UNIT=METER'] lcp_ds = drv.CreateCopy('tmp/lcp_21.lcp', src_ds, False, co) if lcp_ds is None: retval = 'fail' retval = 'success' for i in range(10): if src_ds.GetRasterBand(i + 1).Checksum() != lcp_ds.GetRasterBand(i + 1).Checksum(): gdaltest.post_reason('Did not get expected checksum') retval = 'fail' src_ds = None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_21.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make data is copied over via numpy comparison. def test_lcp_22(): try: import random import struct import numpy except ImportError: pytest.skip() mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 3, 3, 10, gdal.GDT_Int16) assert src_ds is not None for i in range(10): data = [random.randint(0, 100) for i in range(9)] src_ds.GetRasterBand(i + 1).WriteRaster(0, 0, 3, 3, struct.pack('h' * 9, *data)) retval = 'success' co = ['LATITUDE=0', 'LINEAR_UNIT=METER'] lcp_ds = drv.CreateCopy('tmp/lcp_22.lcp', src_ds, False, co) assert lcp_ds is not None retval = 'success' for i in range(10): src_data = src_ds.GetRasterBand(i + 1).ReadAsArray() dst_data = lcp_ds.GetRasterBand(i + 1).ReadAsArray() if not numpy.array_equal(src_data, dst_data): gdaltest.post_reason('Did not copy data correctly') retval = 'fail' src_ds = None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_22.' + ext) except OSError: pass return retval ############################################################################### # Test create copy and make sure invalid creation options are caught. def test_lcp_23(): mem_drv = gdal.GetDriverByName('MEM') assert mem_drv is not None drv = gdal.GetDriverByName('LCP') assert drv is not None src_ds = mem_drv.Create('/vsimem/', 10, 10, 10, gdal.GDT_Int16) assert src_ds is not None retval = 'success' bad = 'NOT_A_REAL_OPTION' gdal.PushErrorHandler('CPLQuietErrorHandler') for option in ['ELEVATION_UNIT', 'SLOPE_UNIT', 'ASPECT_UNIT', 'FUEL_MODEL_OPTION', 'CANOPY_COV_UNIT', 'CANOPY_HT_UNIT', 'CBH_UNIT', 'CBD_UNIT', 'DUFF_UNIT']: co = ['%s=%s' % (option, bad), ] lcp_ds = drv.CreateCopy('tmp/lcp_23.lcp', src_ds, False, co) if lcp_ds is not None: retval = 'fail' gdal.PopErrorHandler() src_ds = None lcp_ds = None for ext in ['lcp', 'lcp.aux.xml']: try: os.remove('tmp/lcp_23.' + ext) except OSError: pass return retval gdalautotest-3.1.2/gdrivers/rraster.py0000775000175000017500000003603613701060015016560 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: rraster.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test RRASTER format driver. # Author: Even Rouault, # ############################################################################### # Copyright (c) 2016, Even Rouault, # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pprint from osgeo import gdal from osgeo import osr import gdaltest ############################################################################### # Perform simple read test. def test_rraster_1(filename='data/byte_rraster.grd', check_prj=None): tst = gdaltest.GDALTest('RRASTER', filename, 1, 4672, filename_absolute=True) ref_ds = gdal.Open('data/byte.tif') if check_prj is None: check_prj = ref_ds.GetProjectionRef() tst.testOpen(check_prj=check_prj, check_gt=ref_ds.GetGeoTransform(), check_min=74, check_max=255) ds = gdal.Open(filename) md = ds.GetMetadata() assert md == {'CREATOR': "R package 'raster'", 'CREATED': '2016-06-25 17:32:47'} assert ds.GetRasterBand(1).GetDescription() == 'byte' ############################################################################### def test_rraster_1_copy(): filename = '/vsimem/byte_rraster.grd' gdal.Translate(filename, 'data/byte_rraster.grd', format='RRASTER') assert not gdal.VSIStatL(filename + '.aux.xml'), 'did not expect .aux.xml' sr = osr.SpatialReference() sr.SetFromUserInput('+proj=utm +zone=11 +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat +units=m +no_defs') test_rraster_1(filename, check_prj=sr.ExportToWkt()) gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def _compare_val(got, expected, key_name, to_print): if isinstance(got, list) and isinstance(expected, list): if len(got) != len(expected): print('Unexpected number of elements for %s. Got %d, expected %d' % (key_name, len(got), len(expected))) pprint.pprint(to_print) return False for i, val in enumerate(got): if not _compare_val(val, expected[i], '%s[%d]' % (key_name, i), to_print): return False elif isinstance(got, dict) and isinstance(expected, dict): if not _is_dict_included_in_dict(got, expected, key_name, to_print): pprint.pprint(to_print) return False elif got != expected: print('Value for %s is different' % key_name) pprint.pprint(got) return False return True ############################################################################### def _is_dict_included_in_dict(got, expected, key_name='', to_print=None): if to_print is None: to_print = got for k in expected: if k not in got: print('Missing %s' % k) return False if not _compare_val(got[k], expected[k], key_name + '/' + k, to_print): return False return True ############################################################################### def test_rraster_rgba(filename='data/rgba_rraster.grd'): ds = gdal.Open(filename) info = gdal.Info(ds, computeChecksum=True, format='json') expected_info = { 'bands': [{'band': 1, 'block': [2, 1], 'checksum': 19, 'colorInterpretation': 'Red', 'description': 'red'}, {'band': 2, 'block': [2, 1], 'checksum': 27, 'colorInterpretation': 'Green', 'description': 'green'}, {'band': 3, 'block': [2, 1], 'checksum': 22, 'colorInterpretation': 'Blue', 'description': 'blue'}, {'band': 4, 'block': [2, 1], 'checksum': 7, 'colorInterpretation': 'Alpha', 'description': 'alpha'}] } assert _is_dict_included_in_dict(info, expected_info) ############################################################################### def test_rraster_rgba_copy(): filename = '/vsimem/rgba_rraster.grd' for creationOptions in [[], ['INTERLEAVE=BIP'], ['INTERLEAVE=BIL'], ['INTERLEAVE=BSQ']]: gdal.Translate(filename, 'data/rgba_rraster.grd', format='RRASTER', creationOptions=creationOptions) assert not gdal.VSIStatL(filename + '.aux.xml'), 'did not expect .aux.xml' print(creationOptions) test_rraster_rgba(filename) gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_ct_rgb(filename='data/byte_rraster_ct_rgb.grd'): ds = gdal.Open(filename) info = gdal.Info(ds, format='json') expected_info = { 'bands': [{'band': 1, 'colorInterpretation': 'Palette', 'colorTable': {'count': 2, 'entries': [[10, 20, 30, 255], [11, 21, 31, 255]], 'palette': 'RGB'}, 'type': 'Byte'}] } assert _is_dict_included_in_dict(info, expected_info) ############################################################################### def test_rraster_ct_rgb_copy(): filename = '/vsimem/byte_rraster_ct_rgb.grd' gdal.Translate(filename, 'data/byte_rraster_ct_rgb.grd', format='RRASTER') assert not gdal.VSIStatL(filename + '.aux.xml'), 'did not expect .aux.xml' test_rraster_ct_rgb(filename) gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_ct_rgba(filename='data/byte_rraster_ct_rgba.grd'): ds = gdal.Open(filename) info = gdal.Info(ds, format='json') expected_info = { 'bands': [{'band': 1, 'colorInterpretation': 'Palette', 'colorTable': {'count': 2, 'entries': [[10, 20, 30, 0], [11, 21, 31, 255]], 'palette': 'RGB'}, 'type': 'Byte'}] } assert _is_dict_included_in_dict(info, expected_info) ############################################################################### def test_rraster_ct_rgba_copy(): filename = '/vsimem/byte_rraster_ct_rgba.grd' gdal.Translate(filename, 'data/byte_rraster_ct_rgba.grd', format='RRASTER') assert not gdal.VSIStatL(filename + '.aux.xml'), 'did not expect .aux.xml' test_rraster_ct_rgba(filename) gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_rat(filename='data/byte_rraster_rat.grd'): ds = gdal.Open(filename) info = gdal.Info(ds, format='json') expected_info = { 'bands': [{'band': 1, 'block': [20, 1], 'colorInterpretation': 'Undefined', 'metadata': {}, 'type': 'Byte'}], 'rat': {'fieldDefn': [{'index': 0, 'name': 'ID', 'type': 0, 'usage': 0}, {'index': 1, 'name': 'int_field', 'type': 0, 'usage': 0}, {'index': 2, 'name': 'numeric_field', 'type': 1, 'usage': 0}, {'index': 3, 'name': 'string_field', 'type': 2, 'usage': 0}, {'index': 4, 'name': 'red', 'type': 0, 'usage': 6}, {'index': 5, 'name': 'green', 'type': 0, 'usage': 7}, {'index': 6, 'name': 'blue', 'type': 0, 'usage': 8}, {'index': 7, 'name': 'alpha', 'type': 0, 'usage': 9}, {'index': 8, 'name': 'pixelcount', 'type': 0, 'usage': 1}, {'index': 9, 'name': 'name', 'type': 2, 'usage': 2}], 'row': [{'f': [0, 10, 1.2, 'foo', 0, 2, 4, 6, 8, 'baz'], 'index': 0}, {'f': [1, 11, 2.3, 'bar', 1, 3, 5, 7, 9, 'baw'], 'index': 1}]} } assert _is_dict_included_in_dict(info, expected_info) ############################################################################### def test_rraster_rat_copy(): filename = '/vsimem/byte_rraster_rat.grd' gdal.Translate(filename, 'data/byte_rraster_rat.grd', format='RRASTER') assert not gdal.VSIStatL(filename + '.aux.xml'), 'did not expect .aux.xml' test_rraster_rat(filename) gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_signedbyte(): filename = '/vsimem/rraster_signedbyte.grd' filename2 = '/vsimem/rraster_signedbyte2.grd' gdal.Translate(filename, 'data/byte_rraster.grd', format='RRASTER', creationOptions=['PIXELTYPE=SIGNEDBYTE']) gdal.Translate(filename2, filename, format='RRASTER') ds = gdal.Open(filename2) assert ds.GetRasterBand(1).GetMetadataItem('PIXELTYPE', 'IMAGE_STRUCTURE') == 'SIGNEDBYTE' assert ds.GetRasterBand(1).GetMinimum() == -124 ds = None gdal.GetDriverByName('RRASTER').Delete(filename) gdal.GetDriverByName('RRASTER').Delete(filename2) ############################################################################### def test_rraster_datatypes(): filename = '/vsimem/temp.grd' for srcfilename in ['../gcore/data/uint16.tif', '../gcore/data/int16.tif', '../gcore/data/uint32.tif', '../gcore/data/int32.tif', '../gcore/data/float32.tif', '../gcore/data/float64.tif']: src_ds = gdal.Open(srcfilename) gdal.Translate(filename, src_ds, format='RRASTER') ds = gdal.Open(filename) assert ds.GetRasterBand(1).DataType == src_ds.GetRasterBand(1).DataType, \ srcfilename assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum(), \ srcfilename gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_nodata_and_metadata(): filename = '/vsimem/temp.grd' ds = gdal.GetDriverByName('RRASTER').Create(filename, 1, 1) ds.GetRasterBand(1).SetNoDataValue(1) ds.GetRasterBand(1).SetColorTable(None) ds.GetRasterBand(1).SetDefaultRAT(None) ds.SetMetadataItem('CREATOR', 'GDAL') ds.SetMetadataItem('CREATED', 'Today') ds = None ds = gdal.Open(filename) assert ds.GetMetadata() == {'CREATOR': 'GDAL', 'CREATED': 'Today'} assert ds.GetRasterBand(1).GetNoDataValue() == 1 ds = None gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_update(): filename = '/vsimem/temp.grd' gdal.Translate(filename, 'data/byte_rraster.grd', format='RRASTER') gdal.Open(filename, gdal.GA_Update) ds = gdal.Open(filename, gdal.GA_Update) assert ds.GetRasterBand(1).Checksum() == 4672 ds.GetRasterBand(1).Fill(0) ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).Checksum() == 0 ds = None gdal.GetDriverByName('RRASTER').Delete(filename) ############################################################################### def test_rraster_colorinterpretation(): filename = '/vsimem/temp.grd' ds = gdal.GetDriverByName('RRASTER').Create(filename, 1, 1, 4) ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_RedBand) ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_GreenBand) ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_BlueBand) ds.GetRasterBand(4).SetColorInterpretation(gdal.GCI_AlphaBand) ds = None ds = gdal.Open(filename) assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None gdal.GetDriverByName('RRASTER').Delete(filename) gdalautotest-3.1.2/gdrivers/ecw.py0000775000175000017500000022111113701060015015642 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: ecw.py 4594191a2db0442760392a1e928ce127244106de 2019-08-07 14:48:57 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for ECW driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import os.path import sys from sys import version_info import array import shutil from osgeo import gdal from osgeo import osr import gdaltest import pytest ############################################################################### def has_write_support(): if hasattr(gdaltest, 'b_ecw_has_write_support'): return gdaltest.b_ecw_has_write_support gdaltest.b_ecw_has_write_support = False if test_ecw_1() != 'success': return False if test_ecw_3() == 'success': gdaltest.b_ecw_has_write_support = True try: os.remove('tmp/jrc_out.ecw') except OSError: pass return gdaltest.b_ecw_has_write_support ############################################################################### # def test_ecw_init(): gdaltest.deregister_all_jpeg2000_drivers_but('JP2ECW') ############################################################################### # Verify we have the driver. def test_ecw_1(): gdaltest.ecw_drv = gdal.GetDriverByName('ECW') gdaltest.jp2ecw_drv = gdal.GetDriverByName('JP2ECW') gdaltest.ecw_write = 0 if gdaltest.ecw_drv is not None: if gdaltest.ecw_drv.GetMetadataItem('DMD_CREATIONDATATYPES') is not None: gdaltest.ecw_write = 1 longname = gdaltest.ecw_drv.GetMetadataItem('DMD_LONGNAME') sdk_off = longname.find('SDK ') if sdk_off != -1: gdaltest.ecw_drv.major_version = int(float(longname[sdk_off + 4])) sdk_minor_off = longname.find('.', sdk_off) if sdk_minor_off >= 0: if longname[sdk_minor_off + 1] == 'x': gdaltest.ecw_drv.minor_version = 3 else: gdaltest.ecw_drv.minor_version = int(longname[sdk_minor_off + 1]) else: gdaltest.ecw_drv.minor_version = 0 else: gdaltest.ecw_drv.major_version = 3 gdaltest.ecw_drv.minor_version = 3 # we set ECW to not resolve projection and datum strings to get 3.x behavior. gdal.SetConfigOption("ECW_DO_NOT_RESOLVE_DATUM_PROJECTION", "YES") ############################################################################### # Verify various information about our test image. def test_ecw_2(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') if gdaltest.ecw_drv.major_version == 3: (exp_mean, exp_stddev) = (141.172, 67.3636) else: if gdaltest.ecw_drv.major_version == 5: (exp_mean, exp_stddev) = (141.606, 67.2919) else: (exp_mean, exp_stddev) = (140.332, 67.611) (mean, stddev) = ds.GetRasterBand(1).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=0.5) and stddev == pytest.approx(exp_stddev, abs=0.5), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(467498.5, abs=0.1) and geotransform[1] == pytest.approx(16.5475, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(5077883.2825, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-16.5475, abs=0.001), \ 'geotransform differs from expected' ############################################################################### # Verify that an write the imagery out to a new file. def test_ecw_3(): if gdaltest.ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('data/jrc.ecw') out_ds = gdaltest.ecw_drv.CreateCopy('tmp/jrc_out.ecw', ds, options=['TARGET=75']) if out_ds is not None: version = out_ds.GetMetadataItem('VERSION') assert version == '2', 'bad VERSION' ds = None if out_ds is None: if gdal.GetLastErrorMsg().find('ECW_ENCODE_KEY') >= 0: gdaltest.ecw_write = 0 pytest.skip() gdaltest.b_ecw_has_write_support = True ############################################################################### # Verify various information about our generated image. def test_ecw_4(): if gdaltest.ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() gdal.Unlink('tmp/jrc_out.ecw.aux.xml') ds = gdal.Open('tmp/jrc_out.ecw') version = ds.GetMetadataItem('VERSION') assert version == '2', 'bad VERSION' if gdaltest.ecw_drv.major_version == 3: (exp_mean, exp_stddev) = (140.290, 66.6303) else: if gdaltest.ecw_drv.major_version == 5: (exp_mean, exp_stddev) = (141.517, 67.1285) else: (exp_mean, exp_stddev) = (138.971, 67.716) (mean, stddev) = ds.GetRasterBand(1).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=1.5) and stddev == pytest.approx(exp_stddev, abs=0.5), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(467498.5, abs=0.1) and geotransform[1] == pytest.approx(16.5475, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(5077883.2825, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-16.5475, abs=0.001), \ 'geotransform differs from expected' ds = None ############################################################################### # Now try writing a JPEG2000 compressed version of the same with the ECW driver def test_ecw_5(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('data/small.vrt') ds_out = gdaltest.jp2ecw_drv.CreateCopy('tmp/ecw_5.jp2', ds, options=['TARGET=75']) assert ds_out.GetDriver().ShortName == "JP2ECW" version = ds_out.GetMetadataItem('VERSION') assert version == '1', 'bad VERSION' ds = None ############################################################################### # Verify various information about our generated image. def test_ecw_6(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('tmp/ecw_5.jp2') if gdaltest.ecw_drv.major_version == 3: (exp_mean, exp_stddev) = (144.422, 44.9075) else: (exp_mean, exp_stddev) = (143.375, 44.8539) (mean, stddev) = ds.GetRasterBand(1).ComputeBandStats() # The difference in the stddev is outrageously large between win32 and # Linux, but I don't know why. assert mean == pytest.approx(exp_mean, abs=1.5) and stddev == pytest.approx(exp_stddev, abs=6), \ ('mean/stddev of (%g,%g) diffs from ' 'expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) (mean, stddev) = ds.GetRasterBand(2).ComputeBandStats() # The difference in the stddev is outrageously large between win32 and # Linux, but I don't know why. assert mean == pytest.approx(exp_mean, abs=1.0) and stddev == pytest.approx(exp_stddev, abs=6), \ ('mean/stddev of (%g,%g) diffs from ' 'expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(440720, abs=0.1) and geotransform[1] == pytest.approx(60, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(3751320, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-60, abs=0.001), \ 'geotransform differs from expected' prj = ds.GetProjectionRef() assert (not (prj.find('UTM') == -1 or prj.find('NAD27') == -1 \ or prj.find('one 11') == -1)), 'Coordinate system not UTM 11, NAD27?' ds = None ############################################################################### # Write the same image to NITF. def test_ecw_7(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('data/small.vrt') drv = gdal.GetDriverByName('NITF') drv.CreateCopy('tmp/ecw_7.ntf', ds, options=['IC=C8', 'TARGET=75'], strict=0) ds = None ############################################################################### # Verify various information about our generated image. def test_ecw_8(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('tmp/ecw_7.ntf') (exp_mean, exp_stddev) = (145.57, 43.1712) (mean, stddev) = ds.GetRasterBand(1).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=1.0) and stddev == pytest.approx(exp_stddev, abs=1.0), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(440720, abs=0.1) and geotransform[1] == pytest.approx(60, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(3751320, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-60, abs=0.001), \ 'geotransform differs from expected' prj = ds.GetProjectionRef() assert prj.find('PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0]') == -1 or prj.find('WGS 84') > 0, \ 'Coordinate system not UTM 11, WGS 84?' ds = None ############################################################################### # Try writing 16bit JP2 file directly using Create(). def test_ecw_9(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() # This always crashes on Frank's machine - some bug in old sdk. if os.getenv('USER') == 'warmerda' and gdaltest.ecw_drv.major_version == 3: pytest.skip() ds = gdaltest.jp2ecw_drv.Create('tmp/ecw9.jp2', 200, 100, 1, gdal.GDT_Int16, options=['TARGET=75']) ds.SetGeoTransform((100, 0.1, 0.0, 30.0, 0.0, -0.1)) ds.SetProjection('GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]') raw_data = array.array('h', list(range(200))).tostring() for line in range(100): ds.WriteRaster(0, line, 200, 1, raw_data, buf_type=gdal.GDT_Int16) ds = None ############################################################################### # Verify previous 16bit file. def test_ecw_10(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() # This always crashes on Frank's machine - some bug in old sdk. if os.getenv('USER') == 'warmerda' and gdaltest.ecw_drv.major_version == 3: pytest.skip() ds = gdal.Open('tmp/ecw9.jp2') (exp_mean, exp_stddev) = (98.49, 57.7129) (mean, stddev) = ds.GetRasterBand(1).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=1.1) and stddev == pytest.approx(exp_stddev, abs=0.1), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(100, abs=0.1) and geotransform[1] == pytest.approx(0.1, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(30, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-0.1, abs=0.001), \ 'geotransform differs from expected' ############################################################################### # Test direct creation of an NITF/JPEG2000 file. def test_ecw_11(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() drv = gdal.GetDriverByName('NITF') ds = drv.Create('tmp/test_11.ntf', 200, 100, 3, gdal.GDT_Byte, ['ICORDS=G']) ds.SetGeoTransform((100, 0.1, 0.0, 30.0, 0.0, -0.1)) my_list = list(range(200)) + list(range(20, 220)) + list(range(30, 230)) raw_data = array.array('h', my_list).tostring() for line in range(100): ds.WriteRaster(0, line, 200, 1, raw_data, buf_type=gdal.GDT_Int16, band_list=[1, 2, 3]) ds.GetRasterBand(1).SetRasterColorInterpretation(gdal.GCI_BlueBand) ds.GetRasterBand(2).SetRasterColorInterpretation(gdal.GCI_GreenBand) ds.GetRasterBand(3).SetRasterColorInterpretation(gdal.GCI_RedBand) ds = None ############################################################################### # Verify previous file def test_ecw_12(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('tmp/test_11.ntf') geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(100, abs=0.1) and geotransform[1] == pytest.approx(0.1, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(30.0, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-0.1, abs=0.001), \ 'geotransform differs from expected' assert ds.GetRasterBand(1).GetRasterColorInterpretation() == gdal.GCI_BlueBand, \ 'Got wrong color interpretation.' assert ds.GetRasterBand(2).GetRasterColorInterpretation() == gdal.GCI_GreenBand, \ 'Got wrong color interpretation.' assert ds.GetRasterBand(3).GetRasterColorInterpretation() == gdal.GCI_RedBand, \ 'Got wrong color interpretation.' ds = None ############################################################################### # This is intended to verify that the ECWDataset::RasterIO() special case # works properly. It is used to copy subwindow into a memory dataset # which we then checksum. To stress the RasterIO(), we also change data # type and select an altered band list. def test_ecw_13(): if gdaltest.jp2ecw_drv is None: pytest.skip() ds = gdal.Open('data/rgb16_ecwsdk.jp2') wrktype = gdal.GDT_Float32 raw_data = ds.ReadRaster(10, 10, 40, 40, buf_type=wrktype, band_list=[3, 2, 1]) ds = None drv = gdal.GetDriverByName('MEM') ds = drv.Create('workdata', 40, 40, 3, wrktype) ds.WriteRaster(0, 0, 40, 40, raw_data, buf_type=wrktype) checksums = (ds.GetRasterBand(1).Checksum(), ds.GetRasterBand(2).Checksum(), ds.GetRasterBand(3).Checksum()) ds = None assert checksums == (19253, 17848, 19127), \ 'Expected checksums do match expected checksums' ############################################################################### # Write out image with GCPs. def test_ecw_14(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('data/rgb_gcp.vrt') gdaltest.jp2ecw_drv.CreateCopy('tmp/rgb_gcp.jp2', ds) ds = None ############################################################################### # Verify various information about our generated image. def test_ecw_15(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('tmp/rgb_gcp.jp2') gcp_srs = ds.GetGCPProjection() assert (not (gcp_srs[:6] != 'GEOGCS' \ or gcp_srs.find('WGS') == -1 \ or gcp_srs.find('84') == -1)), 'GCP Projection not retained.' gcps = ds.GetGCPs() assert len(gcps) == 4 and gcps[1].GCPPixel == 0 and gcps[1].GCPLine == 50 and gcps[1].GCPX == 0 and gcps[1].GCPY == 50 and gcps[1].GCPZ == 0, \ 'GCPs wrong.' ds = None ############################################################################### # Open byte.jp2 def test_ecw_16(): if gdaltest.jp2ecw_drv is None: pytest.skip() srs = """PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]] """ gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) tst = gdaltest.GDALTest('JP2ECW', 'byte.jp2', 1, 50054) return tst.testOpen(check_prj=srs, check_gt=gt) ############################################################################### # Open int16.jp2 def test_ecw_17(): if gdaltest.jp2ecw_drv is None: pytest.skip() if gdaltest.ecw_drv.major_version == 4: pytest.skip('4.x SDK gets unreliable results for jp2') ds = gdal.Open('data/int16.jp2') ds_ref = gdal.Open('data/int16.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref) ds = None ds_ref = None # Quite a bit of difference... assert maxdiff <= 6, 'Image too different from reference' ############################################################################### # Open byte.jp2.gz (test use of the VSIL API) def test_ecw_18(): if gdaltest.jp2ecw_drv is None: pytest.skip() srs = """PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]] """ gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) tst = gdaltest.GDALTest('JP2ECW', '/vsigzip/data/byte.jp2.gz', 1, 50054, filename_absolute=1) return tst.testOpen(check_prj=srs, check_gt=gt) ############################################################################### # Test a JPEG2000 with the 3 bands having 13bit depth and the 4th one 1 bit def test_ecw_19(): if gdaltest.jp2ecw_drv is None: pytest.skip() ds = gdal.Open('data/3_13bit_and_1bit.jp2') expected_checksums = [64570, 57277, 56048, 61292] for i in range(4): assert ds.GetRasterBand(i + 1).Checksum() == expected_checksums[i], \ ('unexpected checksum (%d) for band %d' % (expected_checksums[i], i + 1)) assert ds.GetRasterBand(1).DataType == gdal.GDT_UInt16, 'unexpected data type' ############################################################################### # Confirm that we have an overview for this image and that the statistics # are as expected. def test_ecw_20(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') band = ds.GetRasterBand(1) assert band.GetOverviewCount() == 1, 'did not get expected number of overview' # Both requests should go *exactly* to the same code path data_subsampled = band.ReadRaster(0, 0, 400, 400, 200, 200) data_overview = band.GetOverview(0).ReadRaster(0, 0, 200, 200) assert data_subsampled == data_overview, 'inconsistent overview behaviour' if gdaltest.ecw_drv.major_version == 3: (exp_mean, exp_stddev) = (141.644, 67.2186) else: if gdaltest.ecw_drv.major_version == 5: (exp_mean, exp_stddev) = (142.189, 62.4223) else: (exp_mean, exp_stddev) = (140.889, 62.742) (mean, stddev) = band.GetOverview(0).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=0.5) and stddev == pytest.approx(exp_stddev, abs=0.5), \ ('mean/stddev of (%g,%g) diffs from ' 'expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) ############################################################################### # This test is intended to go through an optimized data path (likely # one big interleaved read) in the CreateCopy() instead of the line by # line access typical of ComputeBandStats. Make sure we get the same as # line by line. def test_ecw_21(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') mem_ds = gdal.GetDriverByName('MEM').CreateCopy('xxxyyy', ds, options=['INTERLEAVE=PIXEL']) ds = None if gdaltest.ecw_drv.major_version == 3: (exp_mean, exp_stddev) = (141.172, 67.3636) else: if gdaltest.ecw_drv.major_version == 5: (exp_mean, exp_stddev) = (141.606, 67.2919) else: (exp_mean, exp_stddev) = (140.332, 67.611) (mean, stddev) = mem_ds.GetRasterBand(1).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=0.5) and stddev == pytest.approx(exp_stddev, abs=0.5), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) ############################################################################### # This tests reading of georeferencing and coordinate system from within an # ECW file. def test_ecw_22(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/spif83.ecw') expected_wkt = """PROJCS["L2CAL6M",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",32.7833333078095],PARAMETER["standard_parallel_2",33.8833333208765],PARAMETER["latitude_of_origin",32.166666682432],PARAMETER["central_meridian",-116.249999974595],PARAMETER["false_easting",2000000],PARAMETER["false_northing",500000],UNIT["Metre",1],AXIS["Easting",EAST],AXIS["Northing",NORTH]]""" wkt = ds.GetProjectionRef() assert wkt == expected_wkt, 'did not get expected SRS.' ############################################################################### # This tests overriding the coordinate system from an .aux.xml file, while # preserving the ecw derived georeferencing. def test_ecw_23(): if gdaltest.ecw_drv is None: pytest.skip() shutil.copyfile('data/spif83.ecw', 'tmp/spif83.ecw') shutil.copyfile('data/spif83_hidden.ecw.aux.xml', 'tmp/spif83.ecw.aux.xml') ds = gdal.Open('tmp/spif83.ecw') expected_wkt = """PROJCS["OSGB 1936 / British National Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","27700"]]""" wkt = ds.GetProjectionRef() assert wkt == expected_wkt, 'did not get expected SRS.' gt = ds.GetGeoTransform() expected_gt = (6138559.5576418638, 195.5116973254697, 0.0, 2274798.7836679211, 0.0, -198.32414964918371) assert gt == expected_gt, 'did not get expected geotransform.' try: os.remove('tmp/spif83.ecw') os.remove('tmp/spif83.ecw.aux.xml') except OSError: pass ############################################################################### # Test that we can alter geotransform on existing ECW def test_ecw_24(): if gdaltest.ecw_drv is None: pytest.skip() shutil.copyfile('data/spif83.ecw', 'tmp/spif83.ecw') try: os.remove('tmp/spif83.ecw.aux.xml') except OSError: pass ds = gdal.Open('tmp/spif83.ecw', gdal.GA_Update) if ds is None and gdaltest.ecw_drv.major_version == 3 and gdal.GetConfigOption('APPVEYOR') is not None: try: os.remove('tmp/spif83.ecw') except OSError: pass pytest.skip() gt = [1, 2, 0, 3, 0, -4] ds.SetGeoTransform(gt) ds = None with pytest.raises(OSError): os.stat('tmp/spif83.ecw.aux.xml') ds = gdal.Open('tmp/spif83.ecw') got_gt = ds.GetGeoTransform() ds = None for i in range(6): assert gt[i] == pytest.approx(got_gt[i], abs=1e-5) try: os.remove('tmp/spif83.ecw') except OSError: pass ############################################################################### # Test that we can alter projection info on existing ECW (through SetProjection()) def test_ecw_25(): if gdaltest.ecw_drv is None: pytest.skip() shutil.copyfile('data/spif83.ecw', 'tmp/spif83.ecw') try: os.remove('tmp/spif83.ecw.aux.xml') except OSError: pass proj = 'NUTM31' datum = 'WGS84' units = 'FEET' ds = gdal.Open('tmp/spif83.ecw', gdal.GA_Update) if ds is None and gdaltest.ecw_drv.major_version == 3 and gdal.GetConfigOption('APPVEYOR') is not None: try: os.remove('tmp/spif83.ecw') except OSError: pass pytest.skip() sr = osr.SpatialReference() sr.ImportFromERM(proj, datum, units) wkt = sr.ExportToWkt() ds.SetProjection(wkt) ds = None with pytest.raises(OSError): os.stat('tmp/spif83.ecw.aux.xml') ds = gdal.Open('tmp/spif83.ecw') got_proj = ds.GetMetadataItem("PROJ", "ECW") got_datum = ds.GetMetadataItem("DATUM", "ECW") got_units = ds.GetMetadataItem("UNITS", "ECW") got_wkt = ds.GetProjectionRef() ds = None assert got_proj == proj assert got_datum == datum assert got_units == units assert wkt == got_wkt try: os.remove('tmp/spif83.ecw') except OSError: pass ############################################################################### # Test that we can alter projection info on existing ECW (through SetMetadataItem()) def test_ecw_26(): if gdaltest.ecw_drv is None: pytest.skip() shutil.copyfile('data/spif83.ecw', 'tmp/spif83.ecw') try: os.remove('tmp/spif83.ecw.aux.xml') except OSError: pass proj = 'NUTM31' datum = 'WGS84' units = 'FEET' ds = gdal.Open('tmp/spif83.ecw', gdal.GA_Update) if ds is None and gdaltest.ecw_drv.major_version == 3 and gdal.GetConfigOption('APPVEYOR') is not None: try: os.remove('tmp/spif83.ecw') except OSError: pass pytest.skip() ds.SetMetadataItem("PROJ", proj, "ECW") ds.SetMetadataItem("DATUM", datum, "ECW") ds.SetMetadataItem("UNITS", units, "ECW") ds = None with pytest.raises(OSError): os.stat('tmp/spif83.ecw.aux.xml') ds = gdal.Open('tmp/spif83.ecw') got_proj = ds.GetMetadataItem("PROJ", "ECW") got_datum = ds.GetMetadataItem("DATUM", "ECW") got_units = ds.GetMetadataItem("UNITS", "ECW") got_wkt = ds.GetProjectionRef() ds = None assert got_proj == proj assert got_datum == datum assert got_units == units sr = osr.SpatialReference() sr.ImportFromERM(proj, datum, units) wkt = sr.ExportToWkt() assert wkt == got_wkt try: os.remove('tmp/spif83.ecw') except OSError: pass ############################################################################### # Check that we can use .j2w world files (#4651) def test_ecw_27(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.Open('data/byte_without_geotransform.jp2') geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(440720, abs=0.1) and geotransform[1] == pytest.approx(60, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(3751320, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-60, abs=0.001), \ 'geotransform differs from expected' ds = None ############################################################################### # Check picking use case def test_ecw_28(): if gdaltest.ecw_drv is None: pytest.skip() x = y = 50 ds = gdal.Open('data/jrc.ecw') multiband_data = ds.ReadRaster(x, y, 1, 1) ds = None ds = gdal.Open('data/jrc.ecw') data1 = ds.GetRasterBand(1).ReadRaster(x, y, 1, 1) data2 = ds.GetRasterBand(2).ReadRaster(x, y, 1, 1) data3 = ds.GetRasterBand(3).ReadRaster(x, y, 1, 1) ds = None import struct struct.unpack('B' * 3, multiband_data) struct.unpack('B' * 3, data1 + data2 + data3) ############################################################################### # Test supersampling def test_ecw_29(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') data_b1 = ds.GetRasterBand(1).ReadRaster(0, 0, 400, 400) ds = None ds = gdal.Open('data/jrc.ecw') data_ecw_supersampled_b1 = ds.GetRasterBand(1).ReadRaster(0, 0, 400, 400, 800, 800) ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ecw_29_0.tif', 400, 400, 1) ds.WriteRaster(0, 0, 400, 400, data_b1) data_tiff_supersampled_b1 = ds.GetRasterBand(1).ReadRaster(0, 0, 400, 400, 800, 800) ds = None ds1 = gdal.GetDriverByName('GTiff').Create('/vsimem/ecw_29_1.tif', 800, 800, 1) ds1.WriteRaster(0, 0, 800, 800, data_ecw_supersampled_b1) ds2 = gdal.GetDriverByName('GTiff').Create('/vsimem/ecw_29_2.tif', 800, 800, 1) ds2.WriteRaster(0, 0, 800, 800, data_tiff_supersampled_b1) ret = 'success' if gdaltest.ecw_drv.major_version < 5: maxdiff = gdaltest.compare_ds(ds1, ds2) if maxdiff != 0: print(maxdiff) ret = 'fail' else: # Compare the images by comparing their statistics on subwindows nvals = 0 sum_abs_diff_mean = 0 sum_abs_diff_stddev = 0 tile = 32 for j in range(2 * int((ds1.RasterYSize - tile / 2) / tile)): for i in range(2 * int((ds1.RasterXSize - tile / 2) / tile)): tmp_ds1 = gdal.GetDriverByName('MEM').Create('', tile, tile, 1) tmp_ds2 = gdal.GetDriverByName('MEM').Create('', tile, tile, 1) data1 = ds1.ReadRaster(i * int(tile / 2), j * int(tile / 2), tile, tile) data2 = ds2.ReadRaster(i * int(tile / 2), j * int(tile / 2), tile, tile) tmp_ds1.WriteRaster(0, 0, tile, tile, data1) tmp_ds2.WriteRaster(0, 0, tile, tile, data2) (_, _, mean1, stddev1) = tmp_ds1.GetRasterBand(1).GetStatistics(1, 1) (_, _, mean2, stddev2) = tmp_ds2.GetRasterBand(1).GetStatistics(1, 1) nvals = nvals + 1 sum_abs_diff_mean = sum_abs_diff_mean + abs(mean1 - mean2) sum_abs_diff_stddev = sum_abs_diff_stddev + abs(stddev1 - stddev2) if mean1 != pytest.approx(mean2, abs=(stddev1 + stddev2) / 2) or stddev1 != pytest.approx(stddev2, abs=30): print("%d, %d, %f, %f" % (j, i, abs(mean1 - mean2), abs(stddev1 - stddev2))) ret = 'fail' if sum_abs_diff_mean / nvals > 4 or sum_abs_diff_stddev / nvals > 3: print(sum_abs_diff_mean / nvals) print(sum_abs_diff_stddev / nvals) ret = 'fail' ds1 = None ds2 = None gdal.Unlink('/vsimem/ecw_29_0.tif') gdal.Unlink('/vsimem/ecw_29_1.tif') gdal.Unlink('/vsimem/ecw_29_2.tif') return ret ############################################################################### # Test IReadBlock() def test_ecw_30(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') (blockxsize, blockysize) = ds.GetRasterBand(1).GetBlockSize() data_readraster = ds.GetRasterBand(1).ReadRaster(0, 0, blockxsize, blockysize) data_readblock = ds.GetRasterBand(1).ReadBlock(0, 0) ds = None assert data_readraster == data_readblock ############################################################################### # Test async reader interface ( SDK >= 4.x ) def test_ecw_31(): if gdaltest.ecw_drv is None: pytest.skip() if gdaltest.ecw_drv.major_version < 4: pytest.skip() ds = gdal.Open('data/jrc.ecw') ref_buf = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) ds = None ds = gdal.Open('data/jrc.ecw') asyncreader = ds.BeginAsyncReader(0, 0, ds.RasterXSize, ds.RasterYSize) while True: result = asyncreader.GetNextUpdatedRegion(0.05) if result[0] == gdal.GARIO_COMPLETE: break elif result[0] != gdal.GARIO_ERROR: continue else: ds.EndAsyncReader(asyncreader) pytest.fail('error occurred') if result != [gdal.GARIO_COMPLETE, 0, 0, ds.RasterXSize, ds.RasterYSize]: print(result) ds.EndAsyncReader(asyncreader) pytest.fail('wrong return values for GetNextUpdatedRegion()') async_buf = asyncreader.GetBuffer() ds.EndAsyncReader(asyncreader) asyncreader = None ds = None assert async_buf == ref_buf, 'async_buf != ref_buf' ############################################################################### # ECW SDK 3.3 has a bug with the ECW format when we query the # number of bands of the dataset, but not in the "natural order". # It ignores the content of panBandMap. (#4234) def test_ecw_32(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') data_123 = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, band_list=[1, 2, 3]) data_321 = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, band_list=[3, 2, 1]) assert data_123 != data_321 vrt_ds = gdal.Open(""" data/jrc.ecw 3 data/jrc.ecw 2 data/jrc.ecw 1 """) data_vrt = vrt_ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, band_list=[1, 2, 3]) assert data_321 == data_vrt ############################################################################### # Test heuristics that detect successive band reading pattern def test_ecw_33(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') multiband_data = ds.ReadRaster(100, 100, 50, 50) ds = None ds = gdal.Open('data/jrc.ecw') # To feed the heuristics ds.GetRasterBand(1).ReadRaster(10, 10, 50, 50) ds.GetRasterBand(2).ReadRaster(10, 10, 50, 50) ds.GetRasterBand(3).ReadRaster(10, 10, 50, 50) # Now the heuristics should be set to ON data1_1 = ds.GetRasterBand(1).ReadRaster(100, 100, 50, 50) data2_1 = ds.GetRasterBand(2).ReadRaster(100, 100, 50, 50) data3_1 = ds.GetRasterBand(3).ReadRaster(100, 100, 50, 50) # Break heuristics ds.GetRasterBand(2).ReadRaster(100, 100, 50, 50) ds.GetRasterBand(1).ReadRaster(100, 100, 50, 50) # To feed the heuristics again ds.GetRasterBand(1).ReadRaster(10, 10, 50, 50) ds.GetRasterBand(2).ReadRaster(10, 10, 50, 50) ds.GetRasterBand(3).ReadRaster(10, 10, 50, 50) # Now the heuristics should be set to ON data1_2 = ds.GetRasterBand(1).ReadRaster(100, 100, 50, 50) data2_2 = ds.GetRasterBand(2).ReadRaster(100, 100, 50, 50) data3_2 = ds.GetRasterBand(3).ReadRaster(100, 100, 50, 50) ds = None assert data1_1 == data1_2 and data2_1 == data2_2 and data3_1 == data3_2 # When heuristics is ON, returned values should be the same as # 3-band at a time reading import struct tab1 = struct.unpack('B' * 3 * 50 * 50, multiband_data) tab2 = struct.unpack('B' * 3 * 50 * 50, data1_1 + data2_1 + data3_2) assert tab1 == tab2 ds = None ############################################################################### # Check bugfix for #5262 def test_ecw_33_bis(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/jrc.ecw') data_ref = ds.ReadRaster(0, 0, 50, 50) ds = gdal.Open('data/jrc.ecw') # To feed the heuristics ds.GetRasterBand(1).ReadRaster(0, 0, 50, 50, buf_pixel_space=4) ds.GetRasterBand(2).ReadRaster(0, 0, 50, 50, buf_pixel_space=4) ds.GetRasterBand(3).ReadRaster(0, 0, 50, 50, buf_pixel_space=4) # Now the heuristics should be set to ON data1 = ds.GetRasterBand(1).ReadRaster(0, 0, 50, 50, buf_pixel_space=4) data2 = ds.GetRasterBand(2).ReadRaster(0, 0, 50, 50, buf_pixel_space=4) data3 = ds.GetRasterBand(3).ReadRaster(0, 0, 50, 50, buf_pixel_space=4) # Note: we must compare with the dataset RasterIO() buffer since # with SDK 3.3, the results of band RasterIO() and dataset RasterIO() are # not consistent. (which seems to be no longer the case with more recent # SDK such as 5.0) for i in range(50 * 50): assert data1[i * 4] == data_ref[i] assert data2[i * 4] == data_ref[50 * 50 + i] assert data3[i * 4] == data_ref[2 * 50 * 50 + i] ds = None ############################################################################### # Verify that an write the imagery out to a new ecw file. Source file is 16 bit. def test_ecw_34(): if gdaltest.ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() if gdaltest.ecw_drv.major_version < 5: pytest.skip() ds = gdal.GetDriverByName('MEM').Create('MEM:::', 128, 128, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).Fill(65535) ref_data = ds.GetRasterBand(1).ReadRaster(0, 0, 128, 128, buf_type=gdal.GDT_UInt16) out_ds = gdaltest.ecw_drv.CreateCopy('tmp/UInt16_big_out.ecw', ds, options=['ECW_FORMAT_VERSION=3', 'TARGET=1']) del out_ds ds = None ds = gdal.Open('tmp/UInt16_big_out.ecw') got_data = ds.GetRasterBand(1).ReadRaster(0, 0, 128, 128, buf_type=gdal.GDT_UInt16) version = ds.GetMetadataItem('VERSION') ds = None assert got_data == ref_data assert version == '3', 'bad VERSION' ############################################################################### # Verify that an write the imagery out to a new JP2 file. Source file is 16 bit. def test_ecw_35(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() ds = gdal.GetDriverByName('MEM').Create('MEM:::', 128, 128, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).Fill(65535) ref_data = ds.GetRasterBand(1).ReadRaster(0, 0, 128, 128, buf_type=gdal.GDT_UInt16) out_ds = gdaltest.jp2ecw_drv.CreateCopy('tmp/UInt16_big_out.jp2', ds, options=['TARGET=1']) del out_ds ds = None ds = gdal.Open('tmp/UInt16_big_out.jp2') got_data = ds.GetRasterBand(1).ReadRaster(0, 0, 128, 128, buf_type=gdal.GDT_UInt16) ds = None assert got_data == ref_data ############################################################################### # Make sure that band descriptions are preserved for version 3 ECW files. def test_ecw_36(): if gdaltest.ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() if gdaltest.ecw_drv.major_version < 5: pytest.skip() vrt_ds = gdal.Open(""" Blue data/jrc.ecw 3 Red data/jrc.ecw 1 Green data/jrc.ecw 2 """) dswr = gdaltest.ecw_drv.CreateCopy('tmp/jrc312.ecw', vrt_ds, options=['ECW_FORMAT_VERSION=3', 'TARGET=75']) assert dswr.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_BlueBand, \ ('Band 1 color interpretation should be Blue but is : ' + gdal.GetColorInterpretationName(dswr.GetRasterBand(1).GetColorInterpretation())) assert dswr.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_RedBand, \ ('Band 2 color interpretation should be Red but is : ' + gdal.GetColorInterpretationName(dswr.GetRasterBand(2).GetColorInterpretation())) assert dswr.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_GreenBand, \ ('Band 3 color interpretation should be Green but is : ' + gdal.GetColorInterpretationName(dswr.GetRasterBand(3).GetColorInterpretation())) dswr = None dsr = gdal.Open('tmp/jrc312.ecw') assert dsr.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_BlueBand, \ ('Band 1 color interpretation should be Blue but is : ' + gdal.GetColorInterpretationName(dsr.GetRasterBand(1).GetColorInterpretation())) assert dsr.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_RedBand, \ ('Band 2 color interpretation should be Red but is : ' + gdal.GetColorInterpretationName(dsr.GetRasterBand(2).GetColorInterpretation())) assert dsr.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_GreenBand, \ ('Band 3 color interpretation should be Green but is : ' + gdal.GetColorInterpretationName(dsr.GetRasterBand(3).GetColorInterpretation())) dsr = None ############################################################################### # Make sure that band descriptions are preserved for version 2 ECW files when # color space set implicitly to sRGB. def test_ecw_37(): if gdaltest.ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() if gdaltest.ecw_drv.major_version < 5: pytest.skip() ds = gdal.Open("data/jrc.ecw") dswr = gdaltest.ecw_drv.CreateCopy('tmp/jrc123.ecw', ds, options=['ECW_FORMAT_VERSION=3', 'TARGET=75']) assert dswr.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand, \ ('Band 1 color interpretation should be Red but is : ' + gdal.GetColorInterpretationName(dswr.GetRasterBand(1).GetColorInterpretation())) assert dswr.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand, \ ('Band 2 color interpretation should be Green but is : ' + gdal.GetColorInterpretationName(dswr.GetRasterBand(2).GetColorInterpretation())) assert dswr.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand, \ ('Band 3 color interpretation should be Blue but is : ' + gdal.GetColorInterpretationName(dswr.GetRasterBand(3).GetColorInterpretation())) dswr = None dsr = gdal.Open('tmp/jrc123.ecw') assert dsr.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand, \ ('Band 1 color interpretation should be Red but is : ' + gdal.GetColorInterpretationName(dsr.GetRasterBand(1).GetColorInterpretation())) assert dsr.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand, \ ('Band 2 color interpretation should be Green but is : ' + gdal.GetColorInterpretationName(dsr.GetRasterBand(2).GetColorInterpretation())) assert dsr.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand, \ ('Band 3 color interpretation should be Blue but is : ' + gdal.GetColorInterpretationName(dsr.GetRasterBand(3).GetColorInterpretation())) dsr = None ############################################################################### # Check opening unicode files. def test_ecw_38(): if gdaltest.ecw_drv is None: pytest.skip() gdaltest.ecw_38_fname = '' if version_info >= (3, 0, 0): exec("""gdaltest.ecw_38_fname = 'tmp/za\u017C\u00F3\u0142\u0107g\u0119\u015Bl\u0105ja\u017A\u0144.ecw'""") else: exec("""gdaltest.ecw_38_fname = u'tmp/za\u017C\u00F3\u0142\u0107g\u0119\u015Bl\u0105ja\u017A\u0144.ecw'""") fname = gdaltest.ecw_38_fname if gdaltest.ecw_drv.major_version < 4: pytest.skip() shutil.copyfile('data/jrc.ecw', fname) ds = gdal.Open('data/jrc.ecw') ds_ref = gdal.Open(fname) maxdiff = gdaltest.compare_ds(ds, ds_ref) ds = None ds_ref = None # Quite a bit of difference... assert maxdiff <= 0, 'Image too different from reference' ############################################################################### # Check writing histograms. def test_ecw_39(): if gdaltest.ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() if gdaltest.ecw_drv.major_version < 5: pytest.skip() ds = gdal.Open('data/jrc.ecw') dswr = gdaltest.ecw_drv.CreateCopy('tmp/jrcstats.ecw', ds, options=['ECW_FORMAT_VERSION=3', 'TARGET=75']) ds = None hist = (0, 255, 2, [3, 4]) dswr.GetRasterBand(1).SetDefaultHistogram(0, 255, [3, 4]) dswr = None ds = gdal.Open('tmp/jrcstats.ecw') result = (hist == ds.GetRasterBand(1).GetDefaultHistogram(force=0)) ds = None assert result, 'Default histogram written incorrectly' ############################################################################### # Check reading a ECW v3 file def test_ecw_40(): if gdaltest.ecw_drv is None: pytest.skip() ds = gdal.Open('data/stefan_full_rgba_ecwv3_meta.ecw') if ds is None: if gdaltest.ecw_drv.major_version < 5: if gdal.GetLastErrorMsg().find('requires ECW SDK 5.0') >= 0: pytest.skip() pytest.fail('explicit error message expected') pytest.fail() expected_md = [ ('CLOCKWISE_ROTATION_DEG', '0.000000'), ('COLORSPACE', 'RGB'), ('COMPRESSION_DATE', '2013-04-04T09:20:03Z'), ('COMPRESSION_RATE_ACTUAL', '3.165093'), ('COMPRESSION_RATE_TARGET', '20'), ('FILE_METADATA_COMPRESSION_SOFTWARE', 'python2.7/GDAL v1.10.0.0/ECWJP2 SDK v5.0.0.0'), ('FILE_METADATA_ACQUISITION_DATE', '2012-09-12'), ('FILE_METADATA_ACQUISITION_SENSOR_NAME', 'Leica ADS-80'), ('FILE_METADATA_ADDRESS', '2 Abbotsford Street, West Leederville WA 6007 Australia'), ('FILE_METADATA_AUTHOR', 'Unknown'), ('FILE_METADATA_CLASSIFICATION', 'test gdal image'), ('FILE_METADATA_COMPANY', 'ERDAS-QA'), ('FILE_METADATA_COMPRESSION_SOFTWARE', 'python2.7/GDAL v1.10.0.0/ECWJP2 SDK v5.0.0.0'), ('FILE_METADATA_COPYRIGHT', 'Intergraph 2013'), ('FILE_METADATA_EMAIL', 'support@intergraph.com'), ('FILE_METADATA_TELEPHONE', '+61 8 9388 2900'), ('VERSION', '3')] got_md = ds.GetMetadata() for (key, value) in expected_md: assert key in got_md and got_md[key] == value expected_cs_list = [28760, 59071, 54087, 22499] for i in range(4): got_cs = ds.GetRasterBand(i + 1).Checksum() assert got_cs == expected_cs_list[i] ############################################################################### # Check generating statistics & histogram for a ECW v3 file def test_ecw_41(): if gdaltest.ecw_drv is None or gdaltest.ecw_drv.major_version < 5: pytest.skip() shutil.copy('data/stefan_full_rgba_ecwv3_meta.ecw', 'tmp/stefan_full_rgba_ecwv3_meta.ecw') try: os.remove('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') except OSError: pass ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw') # Check that no statistics is already included in the file assert ds.GetRasterBand(1).GetMinimum() is None assert ds.GetRasterBand(1).GetMaximum() is None assert ds.GetRasterBand(1).GetStatistics(1, 0) == [0.0, 0.0, 0.0, -1.0] assert ds.GetRasterBand(1).GetDefaultHistogram(force=0) is None # Now compute the stats stats = ds.GetRasterBand(1).GetStatistics(0, 1) expected_stats = [0.0, 255.0, 21.662427983539093, 51.789457392268119] for i in range(4): assert stats[i] == pytest.approx(expected_stats[i], abs=1) ds = None # Check that there's no .aux.xml file with pytest.raises(OSError): os.stat('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw') assert ds.GetRasterBand(1).GetMinimum() == 0 assert ds.GetRasterBand(1).GetMaximum() == 255 stats = ds.GetRasterBand(1).GetStatistics(0, 0) expected_stats = [0.0, 255.0, 21.662427983539093, 51.789457392268119] for i in range(4): assert stats[i] == pytest.approx(expected_stats[i], abs=1) ds = None ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw') # And compute the histogram got_hist = ds.GetRasterBand(1).GetDefaultHistogram() expected_hist = (-0.5, 255.5, 256, [1006, 16106, 548, 99, 13, 24, 62, 118, 58, 125, 162, 180, 133, 146, 70, 81, 84, 97, 90, 60, 79, 70, 85, 77, 73, 63, 60, 64, 56, 69, 63, 73, 70, 72, 61, 66, 40, 52, 65, 44, 62, 54, 56, 55, 63, 51, 47, 39, 58, 44, 36, 43, 47, 45, 54, 28, 40, 41, 37, 36, 33, 31, 28, 34, 19, 32, 19, 23, 23, 33, 16, 34, 32, 54, 29, 33, 40, 37, 27, 34, 24, 29, 26, 21, 22, 24, 25, 19, 29, 22, 24, 14, 20, 20, 29, 28, 13, 19, 21, 19, 19, 21, 13, 19, 13, 14, 22, 15, 13, 26, 10, 13, 13, 14, 10, 17, 15, 19, 11, 18, 11, 14, 8, 12, 20, 12, 17, 10, 15, 15, 16, 14, 11, 7, 7, 10, 8, 12, 7, 8, 14, 7, 9, 12, 4, 6, 12, 5, 5, 4, 11, 8, 4, 8, 7, 10, 11, 6, 7, 5, 6, 8, 10, 10, 7, 5, 3, 5, 5, 6, 4, 10, 7, 6, 8, 4, 6, 6, 4, 6, 6, 7, 10, 4, 5, 2, 5, 6, 1, 1, 2, 6, 2, 1, 7, 4, 1, 3, 3, 2, 6, 2, 3, 3, 3, 3, 5, 5, 4, 2, 3, 2, 1, 3, 5, 5, 4, 1, 1, 2, 5, 10, 5, 9, 3, 5, 3, 5, 4, 5, 4, 4, 6, 7, 9, 17, 13, 15, 14, 13, 20, 18, 16, 27, 35, 53, 60, 51, 46, 40, 38, 50, 66, 36, 45, 13]) assert got_hist == expected_hist ds = None # Remove the .aux.xml file try: os.remove('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') except OSError: pass ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw') assert ds.GetRasterBand(1).GetMinimum() == 0 assert ds.GetRasterBand(1).GetMaximum() == 255 got_hist = ds.GetRasterBand(1).GetDefaultHistogram(force=0) assert got_hist == expected_hist ds = None # Check that there's no .aux.xml file with pytest.raises(OSError): os.stat('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') ############################################################################### # Test setting/unsetting file metadata of a ECW v3 file def test_ecw_42(): if gdaltest.ecw_drv is None or gdaltest.ecw_drv.major_version < 5: pytest.skip() shutil.copy('data/stefan_full_rgba_ecwv3_meta.ecw', 'tmp/stefan_full_rgba_ecwv3_meta.ecw') try: os.remove('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') except OSError: pass ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw', gdal.GA_Update) md = {} md['FILE_METADATA_CLASSIFICATION'] = 'FILE_METADATA_CLASSIFICATION' md['FILE_METADATA_ACQUISITION_DATE'] = '2013-04-04' md['FILE_METADATA_ACQUISITION_SENSOR_NAME'] = 'FILE_METADATA_ACQUISITION_SENSOR_NAME' md['FILE_METADATA_COMPRESSION_SOFTWARE'] = 'FILE_METADATA_COMPRESSION_SOFTWARE' md['FILE_METADATA_AUTHOR'] = 'FILE_METADATA_AUTHOR' md['FILE_METADATA_COPYRIGHT'] = 'FILE_METADATA_COPYRIGHT' md['FILE_METADATA_COMPANY'] = 'FILE_METADATA_COMPANY' md['FILE_METADATA_EMAIL'] = 'FILE_METADATA_EMAIL' md['FILE_METADATA_ADDRESS'] = 'FILE_METADATA_ADDRESS' md['FILE_METADATA_TELEPHONE'] = 'FILE_METADATA_TELEPHONE' ds.SetMetadata(md) ds = None # Check that there's no .aux.xml file with pytest.raises(OSError): os.stat('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') # Check item values ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw') got_md = ds.GetMetadata() for item in md: assert got_md[item] == md[item] ds = None # Test unsetting all the stuff ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw', gdal.GA_Update) md = {} md['FILE_METADATA_CLASSIFICATION'] = '' md['FILE_METADATA_ACQUISITION_DATE'] = '1970-01-01' md['FILE_METADATA_ACQUISITION_SENSOR_NAME'] = '' md['FILE_METADATA_COMPRESSION_SOFTWARE'] = '' md['FILE_METADATA_AUTHOR'] = '' md['FILE_METADATA_COPYRIGHT'] = '' md['FILE_METADATA_COMPANY'] = '' md['FILE_METADATA_EMAIL'] = '' md['FILE_METADATA_ADDRESS'] = '' md['FILE_METADATA_TELEPHONE'] = '' ds.SetMetadata(md) ds = None # Check that there's no .aux.xml file with pytest.raises(OSError): os.stat('tmp/stefan_full_rgba_ecwv3_meta.ecw.aux.xml') # Check item values ds = gdal.Open('tmp/stefan_full_rgba_ecwv3_meta.ecw') got_md = ds.GetMetadata() for item in md: assert item not in got_md or item == 'FILE_METADATA_ACQUISITION_DATE', md[item] ds = None ############################################################################### # Test auto-promotion of 1bit alpha band to 8bit # Note: only works on reversible files like this one def test_ecw_43(): if gdaltest.jp2ecw_drv is None: pytest.skip() ds = gdal.Open('data/stefan_full_rgba_alpha_1bit.jp2') fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') is None got_cs = fourth_band.Checksum() assert got_cs == 8527 jp2_bands_data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) jp2_fourth_band_data = fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, int(ds.RasterXSize / 16), int(ds.RasterYSize / 16)) tmp_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/ecw_43.tif', ds) fourth_band = tmp_ds.GetRasterBand(4) got_cs = fourth_band.Checksum() gtiff_bands_data = tmp_ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) gtiff_fourth_band_data = fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) # gtiff_fourth_band_subsampled_data = fourth_band.ReadRaster(0,0,ds.RasterXSize,ds.RasterYSize,ds.RasterXSize/16,ds.RasterYSize/16) tmp_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/ecw_43.tif') assert got_cs == 8527 assert jp2_bands_data == gtiff_bands_data assert jp2_fourth_band_data == gtiff_fourth_band_data ds = gdal.OpenEx('data/stefan_full_rgba_alpha_1bit.jp2', open_options=['1BIT_ALPHA_PROMOTION=NO']) fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ############################################################################### # Test metadata retrieval from JP2 file def test_ecw_44(): if gdaltest.jp2ecw_drv is None: pytest.skip() if gdaltest.ecw_drv.major_version < 5 or (gdaltest.ecw_drv.major_version == 5 and gdaltest.ecw_drv.minor_version < 1): pytest.skip() ds = gdal.Open('data/stefan_full_rgba_alpha_1bit.jp2') expected_md = [ ('CODE_BLOCK_SIZE_X', '64'), ('CODE_BLOCK_SIZE_Y', '64'), ('GML_JP2_DATA', 'FALSE'), ('PRECINCT_SIZE_X', '128,128'), ('PRECINCT_SIZE_Y', '128,128'), ('PRECISION', '8,8,8,1'), ('PROFILE', '0'), ('PROGRESSION_ORDER', 'RPCL'), ('QUALITY_LAYERS', '1'), ('RESOLUTION_LEVELS', '2'), ('PROGRESSION_ORDER', 'RPCL'), ('TILE_HEIGHT', '150'), ('TILE_WIDTH', '162'), ('TILES_X', '1'), ('TILES_Y', '1'), ('TRANSFORMATION_TYPE', '5x3'), ('USE_EPH', 'TRUE'), ('USE_SOP', 'FALSE')] got_md = ds.GetMetadata('JPEG2000') for (key, value) in expected_md: assert key in got_md and got_md[key] == value ############################################################################### # Test metadata reading & writing def RemoveDriverMetadata(md): if 'COMPRESSION_RATE_TARGET' in md: del md['COMPRESSION_RATE_TARGET'] if 'COLORSPACE' in md: del md['COLORSPACE'] if 'VERSION' in md: del md['VERSION'] return md def test_ecw_45(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() # No metadata src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) out_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_45.jp2', src_ds, options=['WRITE_METADATA=YES']) del out_ds assert gdal.VSIStatL('/vsimem/ecw_45.jp2.aux.xml') is None ds = gdal.Open('/vsimem/ecw_45.jp2') md = RemoveDriverMetadata(ds.GetMetadata()) assert md == {} gdal.Unlink('/vsimem/ecw_45.jp2') # Simple metadata in main domain for options in [['WRITE_METADATA=YES']]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadataItem('FOO', 'BAR') out_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_45.jp2', src_ds, options=options) del out_ds assert gdal.VSIStatL('/vsimem/ecw_45.jp2.aux.xml') is None ds = gdal.Open('/vsimem/ecw_45.jp2') md = RemoveDriverMetadata(ds.GetMetadata()) assert md == {'FOO': 'BAR'} gdal.Unlink('/vsimem/ecw_45.jp2') # Simple metadata in auxiliary domain src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadataItem('FOO', 'BAR', 'SOME_DOMAIN') out_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_45.jp2', src_ds, options=['WRITE_METADATA=YES']) del out_ds assert gdal.VSIStatL('/vsimem/ecw_45.jp2.aux.xml') is None ds = gdal.Open('/vsimem/ecw_45.jp2') md = RemoveDriverMetadata(ds.GetMetadata('SOME_DOMAIN')) assert md == {'FOO': 'BAR'} gdal.Unlink('/vsimem/ecw_45.jp2') # Simple metadata in auxiliary XML domain src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadata([''], 'xml:SOME_DOMAIN') out_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_45.jp2', src_ds, options=['WRITE_METADATA=YES']) del out_ds assert gdal.VSIStatL('/vsimem/ecw_45.jp2.aux.xml') is None ds = gdal.Open('/vsimem/ecw_45.jp2') assert ds.GetMetadata('xml:SOME_DOMAIN')[0] == '\n' gdal.Unlink('/vsimem/ecw_45.jp2') # Special xml:BOX_ metadata domain for options in [['WRITE_METADATA=YES']]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadata([''], 'xml:BOX_1') out_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_45.jp2', src_ds, options=options) del out_ds assert gdal.VSIStatL('/vsimem/ecw_45.jp2.aux.xml') is None ds = gdal.Open('/vsimem/ecw_45.jp2') assert ds.GetMetadata('xml:BOX_0')[0] == '' gdal.Unlink('/vsimem/ecw_45.jp2') # Special xml:XMP metadata domain for options in [['WRITE_METADATA=YES']]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadata([''], 'xml:XMP') out_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_45.jp2', src_ds, options=options) del out_ds assert gdal.VSIStatL('/vsimem/ecw_45.jp2.aux.xml') is None ds = gdal.Open('/vsimem/ecw_45.jp2') assert ds.GetMetadata('xml:XMP')[0] == '' gdal.Unlink('/vsimem/ecw_45.jp2') ############################################################################### # Test non nearest upsampling def test_ecw_46(): if gdaltest.jp2ecw_drv is None or gdaltest.ecw_write == 0: pytest.skip() tmp_ds = gdaltest.jp2ecw_drv.CreateCopy('/vsimem/ecw_46.jp2', gdal.Open('data/int16.tif')) tmp_ds = None tmp_ds = gdal.Open('/vsimem/ecw_46.jp2') full_res_data = tmp_ds.ReadRaster(0, 0, 20, 20) upsampled_data = tmp_ds.ReadRaster(0, 0, 20, 20, 40, 40, resample_alg=gdal.GRIORA_Cubic) tmp_ds = None gdal.Unlink('/vsimem/ecw_46.jp2') tmp_ds = gdal.GetDriverByName('MEM').Create('', 20, 20, 1, gdal.GDT_Int16) tmp_ds.GetRasterBand(1).WriteRaster(0, 0, 20, 20, full_res_data) ref_upsampled_data = tmp_ds.ReadRaster(0, 0, 20, 20, 40, 40, resample_alg=gdal.GRIORA_Cubic) mem_ds = gdal.GetDriverByName('MEM').Create('', 40, 40, 1, gdal.GDT_Int16) mem_ds.GetRasterBand(1).WriteRaster(0, 0, 40, 40, ref_upsampled_data) ref_cs = mem_ds.GetRasterBand(1).Checksum() mem_ds.GetRasterBand(1).WriteRaster(0, 0, 40, 40, upsampled_data) cs = mem_ds.GetRasterBand(1).Checksum() assert cs == ref_cs ############################################################################### # /vsi reading with ECW (#6482) def test_ecw_47(): if gdaltest.ecw_drv is None: pytest.skip() if gdaltest.ecw_drv.major_version == 3: pytest.skip() data = open('data/jrc.ecw', 'rb').read() gdal.FileFromMemBuffer('/vsimem/ecw_47.ecw', data) ds = gdal.Open('/vsimem/ecw_47.ecw') assert ds is not None mean_tolerance = 0.5 if gdaltest.ecw_drv.major_version == 5: (exp_mean, exp_stddev) = (141.606, 67.2919) else: (exp_mean, exp_stddev) = (140.332, 67.611) (mean, stddev) = ds.GetRasterBand(1).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=mean_tolerance) and stddev == pytest.approx(exp_stddev, abs=0.5), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) gdal.Unlink('/vsimem/ecw_47.ecw') ############################################################################### # Test "Upward" orientation is forced by default def test_ecw_48(): if gdaltest.ecw_drv is None: pytest.skip() ecw_upward = gdal.GetConfigOption('ECW_ALWAYS_UPWARD', 'TRUE') assert ecw_upward == 'TRUE' or ecw_upward == 'ON', \ 'ECW_ALWAYS_UPWARD default value must be TRUE.' ds = gdal.Open('data/spif83_downward.ecw') gt = ds.GetGeoTransform() # expect Y resolution negative expected_gt = (6138559.5576418638, 195.5116973254697, 0.0, 2274798.7836679211, 0.0, -198.32414964918371) assert gt == expected_gt, 'did not get expected geotransform.' ############################################################################### # Test "Upward" orientation can be overridden with ECW_ALWAYS_UPWARD=FALSE def test_ecw_49(): if gdaltest.ecw_drv is None: pytest.skip() ecw_upward_old = gdal.GetConfigOption('ECW_ALWAYS_UPWARD', 'TRUE') gdal.SetConfigOption('ECW_ALWAYS_UPWARD', 'FALSE') ds = gdal.Open('data/spif83_downward.ecw') gt = ds.GetGeoTransform() gdal.SetConfigOption('ECW_ALWAYS_UPWARD', ecw_upward_old) # expect Y resolution positive expected_gt = (6138559.5576418638, 195.5116973254697, 0.0, 2274798.7836679211, 0.0, 198.32414964918371) assert gt == expected_gt, 'did not get expected geotransform.' ############################################################################### def test_ecw_online_1(): if gdaltest.jp2ecw_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/7sisters200.j2k', '7sisters200.j2k'): pytest.skip() # checksum = 32316 on my PC tst = gdaltest.GDALTest('JP2ECW', 'tmp/cache/7sisters200.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/7sisters200.j2k') ds.GetRasterBand(1).Checksum() ds = None ############################################################################### def test_ecw_online_2(): if gdaltest.jp2ecw_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/gcp.jp2', 'gcp.jp2'): pytest.skip() # checksum = 1292 on my PC tst = gdaltest.GDALTest('JP2ECW', 'tmp/cache/gcp.jp2', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/gcp.jp2') ds.GetRasterBand(1).Checksum() assert len(ds.GetGCPs()) == 15, 'bad number of GCP' expected_wkt = """GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]""" assert ds.GetGCPProjection() == expected_wkt, 'bad GCP projection' ds = None ############################################################################### def ecw_online_3(): if gdaltest.jp2ecw_drv is None: pytest.skip() if gdaltest.ecw_drv.major_version == 4: pytest.skip('4.x SDK gets unreliable results for jp2') if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.j2k', 'Bretagne1.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.bmp', 'Bretagne1.bmp'): pytest.skip() # checksum = 16481 on my PC tst = gdaltest.GDALTest('JP2ECW', 'tmp/cache/Bretagne1.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne1.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne1.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Difference between the image before and after compression assert maxdiff <= 16, 'Image too different from reference' ############################################################################### def test_ecw_online_4(): if gdaltest.jp2ecw_drv is None: pytest.skip() if gdaltest.ecw_drv.major_version == 5 and gdaltest.ecw_drv.minor_version == 2: pytest.skip('This test hangs on Linux in a mutex in the SDK 5.2.1') if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.j2k', 'Bretagne2.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.bmp', 'Bretagne2.bmp'): pytest.skip() # Checksum = 53054 on my PC tst = gdaltest.GDALTest('JP2ECW', 'tmp/cache/Bretagne2.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne2.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne2.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref, width=256, height=256) # print(ds.GetRasterBand(1).Checksum()) # print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Difference between the image before and after compression assert maxdiff <= 1, 'Image too different from reference' ############################################################################### def test_ecw_online_5(): if gdaltest.ecw_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/ecw/red_flower.ecw', 'red_flower.ecw'): pytest.skip() ds = gdal.Open('tmp/cache/red_flower.ecw') if gdaltest.ecw_drv.major_version == 3: (exp_mean, exp_stddev) = (112.801, 52.0431) # on Tamas slavebots, (mean,stddev) = (113.301,52.0434) mean_tolerance = 1 else: mean_tolerance = 0.5 if gdaltest.ecw_drv.major_version == 5: (exp_mean, exp_stddev) = (113.345, 52.1259) else: (exp_mean, exp_stddev) = (114.337, 52.1751) (mean, stddev) = ds.GetRasterBand(2).ComputeBandStats() assert mean == pytest.approx(exp_mean, abs=mean_tolerance) and stddev == pytest.approx(exp_stddev, abs=0.5), \ ('mean/stddev of (%g,%g) diffs from expected(%g,%g)' % (mean, stddev, exp_mean, exp_stddev)) ############################################################################### # This tests the HTTP driver in fact. To ensure if keeps the original filename, # and in particular the .ecw extension, to make the ECW driver happy def test_ecw_online_6(): if gdaltest.ecw_drv is None: pytest.skip() drv = gdal.GetDriverByName('HTTP') if drv is None: pytest.skip() dods_drv = gdal.GetDriverByName('DODS') if dods_drv is not None: dods_drv.Deregister() url = 'http://download.osgeo.org/gdal/data/ecw/spif83.ecw' ds = gdal.Open(url) if dods_drv is not None: dods_drv.Register() if ds is None: # The ECW driver (3.3) doesn't manage to open in /vsimem, thus fallbacks # to writing to /tmp, which doesn't work on Windows if sys.platform == 'win32': pytest.skip() conn = gdaltest.gdalurlopen(url) if conn is None: pytest.skip('cannot open URL') conn.close() pytest.fail() ds = None ############################################################################### # ECWv2 file with alpha channel (#6028) def test_ecw_online_7(): if gdaltest.ecw_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/ecw/sandiego2m_null.ecw', 'sandiego2m_null.ecw'): pytest.skip() ds = gdal.Open('tmp/cache/sandiego2m_null.ecw') if gdaltest.ecw_drv.major_version == 3: expected_band_count = 3 else: expected_band_count = 4 assert ds.RasterCount == expected_band_count, \ ('Expected %d bands, got %d' % (expected_band_count, ds.RasterCount)) ############################################################################### def test_ecw_cleanup(): # gdaltest.clean_tmp() try: os.remove('tmp/jrc_out.ecw') except OSError: pass try: os.remove('tmp/jrc_out.ecw.aux.xml') except OSError: pass try: os.remove('tmp/ecw_5.jp2') except OSError: pass try: os.remove('tmp/ecw_5.jp2.aux.xml') except OSError: pass try: os.remove('tmp/ecw_7.ntf') except OSError: pass try: os.remove('tmp/ecw9.jp2') except OSError: pass try: os.remove('tmp/test_11.ntf') except OSError: pass try: os.remove('tmp/rgb_gcp.jp2') except OSError: pass try: os.remove('tmp/spif83.ecw') except OSError: pass try: os.remove('tmp/spif83.ecw.aux.xml') except OSError: pass try: os.remove('tmp/UInt16_big_out.ecw') except OSError: pass try: os.remove('tmp/UInt16_big_out.jp2') except OSError: pass try: os.remove('tmp/UInt16_big_out.jp2.aux.xml') except OSError: pass try: os.remove('tmp/UInt16_big_out.ecw.aux.xml') except OSError: pass try: os.remove('tmp/jrc312.ecw') except OSError: pass try: os.remove('tmp/jrc123.ecw') except OSError: pass try: os.remove('tmp/jrcstats.ecw') except OSError: pass if hasattr(gdaltest, 'ecw_38_fname'): gdal.Unlink(gdaltest.ecw_38_fname) gdal.Unlink(gdaltest.ecw_38_fname + ".aux.xml") try: os.remove('tmp/stefan_full_rgba_ecwv3_meta.ecw') except OSError: pass gdaltest.reregister_all_jpeg2000_drivers() gdalautotest-3.1.2/gdrivers/pcidsk.py0000775000175000017500000003654013701060015016353 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: pcidsk.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for PCIDSK driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2005, Frank Warmerdam # Copyright (c) 2009-2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal from osgeo import ogr import gdaltest import pytest ############################################################################### # Read test of floating point reference data. def test_pcidsk_1(): tst = gdaltest.GDALTest('PCIDSK', 'utm.pix', 1, 39576) return tst.testOpen() ############################################################################### # Test lossless copying (16, multiband) via Create(). def test_pcidsk_2(): tst = gdaltest.GDALTest('PCIDSK', 'rgba16.png', 2, 2042) return tst.testCreate() ############################################################################### # Test copying of georeferencing and projection. def test_pcidsk_3(): tst = gdaltest.GDALTest('PCIDSK', 'utm.pix', 1, 39576) return tst.testCreateCopy(check_gt=1, check_srs=1) ############################################################################### # Test overview reading. def test_pcidsk_4(): ds = gdal.Open('data/utm.pix') band = ds.GetRasterBand(1) assert band.GetOverviewCount() == 1, 'did not get expected overview count' cs = band.GetOverview(0).Checksum() assert cs == 8368, ('wrong overview checksum (%d)' % cs) ############################################################################### # Test writing metadata to a newly created file. def test_pcidsk_5(): # Are we using the new PCIDSK SDK based driver? driver = gdal.GetDriverByName('PCIDSK') col = driver.GetMetadataItem('DMD_CREATIONOPTIONLIST') if col.find('COMPRESSION') == -1: gdaltest.pcidsk_new = 0 pytest.skip() else: gdaltest.pcidsk_new = 1 # Create testing file. gdaltest.pcidsk_ds = driver.Create('tmp/pcidsk_5.pix', 400, 600, 1, gdal.GDT_Byte) # Write out some metadata to the default and non-default domain and # using the set and single methods. gdaltest.pcidsk_ds.SetMetadata(['ABC=DEF', 'GHI=JKL']) gdaltest.pcidsk_ds.SetMetadataItem('XXX', 'YYY') gdaltest.pcidsk_ds.SetMetadataItem('XYZ', '123', 'AltDomain') # Close and reopen. gdaltest.pcidsk_ds = None gdaltest.pcidsk_ds = gdal.Open('tmp/pcidsk_5.pix', gdal.GA_Update) # Check metadata. mddef = gdaltest.pcidsk_ds.GetMetadata() if mddef['GHI'] != 'JKL' or mddef['XXX'] != 'YYY': print(mddef) gdaltest.post_reason('file default domain metadata broken. ') if gdaltest.pcidsk_ds.GetMetadataItem('GHI') != 'JKL': gdaltest.post_reason('GetMetadataItem() in default domain metadata broken. ') mdalt = gdaltest.pcidsk_ds.GetMetadata('AltDomain') if mdalt['XYZ'] != '123': print(mdalt) gdaltest.post_reason('file alt domain metadata broken. ') ############################################################################### # Test writing metadata to a band. def test_pcidsk_6(): if gdaltest.pcidsk_new == 0: pytest.skip() # Write out some metadata to the default and non-default domain and # using the set and single methods. band = gdaltest.pcidsk_ds.GetRasterBand(1) band.SetMetadata(['ABC=DEF', 'GHI=JKL']) band.SetMetadataItem('XXX', 'YYY') band.SetMetadataItem('XYZ', '123', 'AltDomain') band = None # Close and reopen. gdaltest.pcidsk_ds = None gdaltest.pcidsk_ds = gdal.Open('tmp/pcidsk_5.pix', gdal.GA_Update) # Check metadata. band = gdaltest.pcidsk_ds.GetRasterBand(1) mddef = band.GetMetadata() if mddef['GHI'] != 'JKL' or mddef['XXX'] != 'YYY': print(mddef) gdaltest.post_reason('channel default domain metadata broken. ') mdalt = band.GetMetadata('AltDomain') if mdalt['XYZ'] != '123': print(mdalt) gdaltest.post_reason('channel alt domain metadata broken. ') ############################################################################### # Test creating a color table and reading it back. def test_pcidsk_7(): if gdaltest.pcidsk_new == 0: pytest.skip() # Write out some metadata to the default and non-default domain and # using the set and single methods. band = gdaltest.pcidsk_ds.GetRasterBand(1) ct = band.GetColorTable() assert ct is None, 'Got color table unexpectedly.' ct = gdal.ColorTable() ct.SetColorEntry(0, (0, 255, 0, 255)) ct.SetColorEntry(1, (255, 0, 255, 255)) ct.SetColorEntry(2, (0, 0, 255, 255)) band.SetColorTable(ct) ct = band.GetColorTable() assert ct.GetColorEntry(1) == (255, 0, 255, 255), \ 'Got wrong color table entry immediately.' ct = None band = None # Close and reopen. gdaltest.pcidsk_ds = None gdaltest.pcidsk_ds = gdal.Open('tmp/pcidsk_5.pix', gdal.GA_Update) band = gdaltest.pcidsk_ds.GetRasterBand(1) ct = band.GetColorTable() assert ct.GetColorEntry(1) == (255, 0, 255, 255), \ 'Got wrong color table entry after reopen.' assert band.GetColorInterpretation() == gdal.GCI_PaletteIndex, 'Not a palette?' assert band.SetColorTable(None) == 0, 'SetColorTable failed.' assert band.GetColorTable() is None, 'color table still exists!' assert band.GetColorInterpretation() == gdal.GCI_Undefined, 'Paletted?' ############################################################################### # Test FILE interleaving. def test_pcidsk_8(): tst = gdaltest.GDALTest('PCIDSK', 'rgba16.png', 2, 2042, options=['INTERLEAVING=FILE']) return tst.testCreate() ############################################################################### # Test that we cannot open a vector only pcidsk # FIXME: test disabled because of unification def pcidsk_9(): if gdaltest.pcidsk_new == 0: pytest.skip() ogr_drv = ogr.GetDriverByName('PCIDSK') if ogr_drv is None: pytest.skip() ds = ogr_drv.CreateDataSource('/vsimem/pcidsk_9.pix') ds.CreateLayer('foo') ds = None gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('/vsimem/pcidsk_9.pix') gdal.PopErrorHandler() assert ds is None ds = None gdal.Unlink('/vsimem/pcidsk_9.pix') ############################################################################### # Test overview creation. def test_pcidsk_10(): if gdaltest.pcidsk_new == 0: pytest.skip() src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('PCIDSK').CreateCopy('/vsimem/pcidsk_10.pix', src_ds) src_ds = None # ds = None # ds = gdal.Open( '/vsimem/pcidsk_10.pix', gdal.GA_Update ) band = ds.GetRasterBand(1) ds.BuildOverviews('NEAR', [2]) assert band.GetOverviewCount() == 1, 'did not get expected overview count' cs = band.GetOverview(0).Checksum() assert cs == 1087, ('wrong overview checksum (%d)' % cs) ds = None gdal.GetDriverByName('PCIDSK').Delete('/vsimem/pcidsk_10.pix') ############################################################################### # Test INTERLEAVING=TILED interleaving. def test_pcidsk_11(): if gdaltest.pcidsk_new == 0: pytest.skip() tst = gdaltest.GDALTest('PCIDSK', 'rgba16.png', 2, 2042, options=['INTERLEAVING=TILED', 'TILESIZE=32']) return tst.testCreate() ############################################################################### # Test INTERLEAVING=TILED interleaving and COMPRESSION=RLE def test_pcidsk_12(): if gdaltest.pcidsk_new == 0: pytest.skip() tst = gdaltest.GDALTest('PCIDSK', 'rgba16.png', 2, 2042, options=['INTERLEAVING=TILED', 'TILESIZE=32', 'COMPRESSION=RLE']) return tst.testCreate() ############################################################################### # Test INTERLEAVING=TILED interleaving and COMPRESSION=JPEG def test_pcidsk_13(): if gdaltest.pcidsk_new == 0: pytest.skip() if gdal.GetDriverByName('JPEG') is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('PCIDSK').CreateCopy('/vsimem/pcidsk_13.pix', src_ds, options=['INTERLEAVING=TILED', 'COMPRESSION=JPEG']) src_ds = None gdal.Unlink('/vsimem/pcidsk_13.pix.aux.xml') ds = None ds = gdal.Open('/vsimem/pcidsk_13.pix') band = ds.GetRasterBand(1) band.GetDescription() cs = band.Checksum() ds = None gdal.GetDriverByName('PCIDSK').Delete('/vsimem/pcidsk_13.pix') assert cs == 4645, 'bad checksum' ############################################################################### # Test SetDescription() def test_pcidsk_14(): if gdaltest.pcidsk_new == 0: pytest.skip() ds = gdal.GetDriverByName('PCIDSK').Create('/vsimem/pcidsk_14.pix', 1, 1) band = ds.GetRasterBand(1).SetDescription('mydescription') del ds gdal.Unlink('/vsimem/pcidsk_14.pix.aux.xml') ds = None ds = gdal.Open('/vsimem/pcidsk_14.pix') band = ds.GetRasterBand(1) desc = band.GetDescription() ds = None gdal.GetDriverByName('PCIDSK').Delete('/vsimem/pcidsk_14.pix') assert desc == 'mydescription', 'bad description' ############################################################################### # Test mixed raster and vector def test_pcidsk_15(): if gdaltest.pcidsk_new == 0: pytest.skip() # One raster band and vector layer ds = gdal.GetDriverByName('PCIDSK').Create('/vsimem/pcidsk_15.pix', 1, 1) ds.CreateLayer('foo') ds = None ds = gdal.Open('/vsimem/pcidsk_15.pix') assert ds.RasterCount == 1 assert ds.GetLayerCount() == 1 ds2 = gdal.GetDriverByName('PCIDSK').CreateCopy('/vsimem/pcidsk_15_2.pix', ds) ds2 = None ds = None ds = gdal.Open('/vsimem/pcidsk_15_2.pix') assert ds.RasterCount == 1 assert ds.GetLayerCount() == 1 ds = None # One vector layer only ds = gdal.GetDriverByName('PCIDSK').Create('/vsimem/pcidsk_15.pix', 0, 0, 0) ds.CreateLayer('foo') ds = None ds = gdal.OpenEx('/vsimem/pcidsk_15.pix') assert ds.RasterCount == 0 assert ds.GetLayerCount() == 1 ds2 = gdal.GetDriverByName('PCIDSK').CreateCopy('/vsimem/pcidsk_15_2.pix', ds) ds2 = None ds = None ds = gdal.OpenEx('/vsimem/pcidsk_15_2.pix') assert ds.RasterCount == 0 assert ds.GetLayerCount() == 1 ds = None # Zero raster band and vector layer ds = gdal.GetDriverByName('PCIDSK').Create('/vsimem/pcidsk_15.pix', 0, 0, 0) ds = None ds = gdal.OpenEx('/vsimem/pcidsk_15.pix') assert ds.RasterCount == 0 assert ds.GetLayerCount() == 0 ds2 = gdal.GetDriverByName('PCIDSK').CreateCopy('/vsimem/pcidsk_15_2.pix', ds) del ds2 ds = None ds = gdal.OpenEx('/vsimem/pcidsk_15_2.pix') assert ds.RasterCount == 0 assert ds.GetLayerCount() == 0 ds = None gdal.GetDriverByName('PCIDSK').Delete('/vsimem/pcidsk_15.pix') gdal.GetDriverByName('PCIDSK').Delete('/vsimem/pcidsk_15_2.pix') ############################################################################### def test_pcidsk_external_ovr(): gdal.Translate('/vsimem/test.pix', 'data/byte.tif', format='PCIDSK') ds = gdal.Open('/vsimem/test.pix') ds.BuildOverviews('NEAR', [2]) ds = None assert gdal.VSIStatL('/vsimem/test.pix.ovr') is not None ds = gdal.Open('/vsimem/test.pix') assert ds.GetRasterBand(1).GetOverviewCount() == 1 ds = None gdal.GetDriverByName('PCIDSK').Delete('/vsimem/test.pix') ############################################################################### def test_pcidsk_external_ovr_rrd(): gdal.Translate('/vsimem/test.pix', 'data/byte.tif', format='PCIDSK') ds = gdal.Open('/vsimem/test.pix', gdal.GA_Update) with gdaltest.config_option('USE_RRD', 'YES'): ds.BuildOverviews('NEAR', [2]) ds = None assert gdal.VSIStatL('/vsimem/test.aux') is not None ds = gdal.Open('/vsimem/test.pix') assert ds.GetRasterBand(1).GetOverviewCount() == 1 ds = None gdal.GetDriverByName('PCIDSK').Delete('/vsimem/test.pix') ############################################################################### # Check various items from a modern irvine.pix def test_pcidsk_online_1(): if gdaltest.pcidsk_new == 0: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/pcidsk/sdk_testsuite/irvine_gcp2.pix', 'irvine_gcp2.pix'): pytest.skip() ds = gdal.Open('tmp/cache/irvine_gcp2.pix') band = ds.GetRasterBand(6) names = band.GetRasterCategoryNames() exp_names = ['', '', '', '', '', '', '', '', '', '', '', 'Residential', 'Commercial', 'Industrial', 'Transportation', 'Commercial/Industrial', 'Mixed', 'Other', '', '', '', 'Crop/Pasture', 'Orchards', 'Feeding', 'Other', '', '', '', '', '', '', 'Herbaceous', 'Shrub', 'Mixed', '', '', '', '', '', '', '', 'Deciduous', 'Evergreen', 'Mixed', '', '', '', '', '', '', '', 'Streams/Canals', 'Lakes', 'Reservoirs', 'Bays/Estuaries', '', '', '', '', '', '', 'Forested', 'Nonforested', '', '', '', '', '', '', '', '', 'Dry_Salt_Flats', 'Beaches', 'Sandy_Areas', 'Exposed_Rock', 'Mines/Quarries/Pits', 'Transitional_Area', 'Mixed', '', '', '', 'Shrub/Brush', 'Herbaceous', 'Bare', 'Wet', 'Mixed', '', '', '', '', '', 'Perennial_Snow', 'Glaciers'] if names != exp_names: print(names) gdaltest.post_reason('did not get expected category names.') return 'false' band = ds.GetRasterBand(20) assert band.GetDescription() == 'Training site for type 2 crop', \ 'did not get expected band 20 description' exp_checksum = 2057 checksum = band.Checksum() assert exp_checksum == checksum, 'did not get right bitmap checksum.' md = band.GetMetadata('IMAGE_STRUCTURE') assert md['NBITS'] == '1', 'did not get expected NBITS=1 metadata.' ############################################################################### # Cleanup. def test_pcidsk_cleanup(): gdaltest.pcidsk_ds = None gdaltest.clean_tmp() gdalautotest-3.1.2/gdrivers/hf2.py0000775000175000017500000000563213701060015015553 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: hf2.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for HF2 driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest ############################################################################### # Test CreateCopy() of byte.tif def test_hf2_1(): tst = gdaltest.GDALTest('HF2', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1, check_gt=(-67.00041667, 0.00083333, 0.0, 50.000416667, 0.0, -0.00083333)) ############################################################################### # Test CreateCopy() of byte.tif with options def test_hf2_2(): tst = gdaltest.GDALTest('HF2', 'byte.tif', 1, 4672, options=['COMPRESS=YES', 'BLOCKSIZE=10']) ret = tst.testCreateCopy(new_filename='tmp/hf2_2.hfz') try: os.remove('tmp/hf2_2.hfz.properties') except OSError: pass return ret ############################################################################### # Test CreateCopy() of float.img def test_hf2_3(): tst = gdaltest.GDALTest('HF2', 'float.img', 1, 23529) return tst.testCreateCopy(check_minmax=0) ############################################################################### # Test CreateCopy() of n43.dt0 def test_hf2_4(): tst = gdaltest.GDALTest('HF2', 'n43.dt0', 1, 49187) return tst.testCreateCopy() ############################################################################### # Cleanup def test_hf2_cleanup(): pass gdalautotest-3.1.2/gdrivers/aigrid.py0000775000175000017500000001671413701060015016336 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: aigrid.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for AIGRID driver. # Author: Swapnil Hajare # ############################################################################### # Copyright (c) 2006, Swapnil Hajare # Copyright (c) 2009-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import pytest ############################################################################### # Read test of simple byte reference data. def test_aigrid_1(): tst = gdaltest.GDALTest('AIG', 'abc3x1', 1, 3) return tst.testOpen() ############################################################################### # Verify some auxiliary data. def test_aigrid_2(): ds = gdal.Open('data/abc3x1/prj.adf') gt = ds.GetGeoTransform() assert gt[0] == -0.5 and gt[1] == 1.0 and gt[2] == 0.0 and gt[3] == 0.5 and gt[4] == 0.0 and gt[5] == -1.0, \ 'Aigrid geotransform wrong.' prj = ds.GetProjection() assert prj.find('PROJCS["unnamed",GEOGCS["GDA94",DATUM["Geocentric_Datum_of_Australia_1994"') != -1, \ ('Projection does not match expected:\n%s' % prj) band1 = ds.GetRasterBand(1) assert band1.GetNoDataValue() == 255, 'Grid NODATA value wrong or missing.' assert band1.DataType == gdal.GDT_Byte, 'Data type is not Byte!' ############################################################################### # Verify the colormap, and nodata setting for test file. def test_aigrid_3(): ds = gdal.Open('data/abc3x1') cm = ds.GetRasterBand(1).GetRasterColorTable() assert cm.GetCount() == 256 and cm.GetColorEntry(0) == (95, 113, 150, 255) and cm.GetColorEntry(1) == (95, 57, 29, 255), \ 'Wrong colormap entries' cm = None assert ds.GetRasterBand(1).GetNoDataValue() == 255.0, 'Wrong nodata value.' ############################################################################### # Read test of simple byte reference data with data directory name in all uppercase def test_aigrid_4(): tst = gdaltest.GDALTest('AIG', 'ABC3X1UC', 1, 3) return tst.testOpen() ############################################################################### # Verify the colormap, and nodata setting for test file with names of coverage directory and all files in it in all uppercase. Additionally also test for case where clr file resides in parent directory of coverage. def test_aigrid_5(): ds = gdal.Open('data/ABC3X1UC') cm = ds.GetRasterBand(1).GetRasterColorTable() assert cm.GetCount() == 256 and cm.GetColorEntry(0) == (95, 113, 150, 255) and cm.GetColorEntry(1) == (95, 57, 29, 255), \ 'Wrong colormap entries' cm = None assert ds.GetRasterBand(1).GetNoDataValue() == 255.0, 'Wrong nodata value.' ############################################################################### # Verify dataset whose sta.adf is 24 bytes def test_aigrid_6(): ds = gdal.Open('data/aigrid_sta_24bytes/teststa') assert ds.GetRasterBand(1).GetMinimum() == 0.0, 'Wrong minimum' assert ds.GetRasterBand(1).GetMaximum() == 2.0, 'Wrong maximum' ############################################################################### # Test on real dataset downloaded from http://download.osgeo.org/gdal/data/aig/nzdem def test_aigrid_online_1(): list_files = ['info/arc.dir', 'info/arc0000.dat', 'info/arc0000.nit', 'info/arc0001.dat', 'info/arc0001.nit', 'info/arc0002.dat', 'info/arc0002.nit', 'info/arc0002r.001', 'nzdem500/dblbnd.adf', 'nzdem500/hdr.adf', 'nzdem500/log', 'nzdem500/sta.adf', 'nzdem500/vat.adf', 'nzdem500/w001001.adf', 'nzdem500/w001001x.adf'] try: os.mkdir('tmp/cache/nzdem') os.mkdir('tmp/cache/nzdem/info') os.mkdir('tmp/cache/nzdem/nzdem500') except OSError: pass for filename in list_files: if not gdaltest.download_file('http://download.osgeo.org/gdal/data/aig/nzdem/' + filename, 'nzdem/' + filename): pytest.skip() tst = gdaltest.GDALTest('AIG', 'tmp/cache/nzdem/nzdem500/hdr.adf', 1, 45334, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/nzdem/nzdem500/hdr.adf') try: rat = ds.GetRasterBand(1).GetDefaultRAT() except: print('Skipping RAT checking... OG Python bindings have no RAT API') return assert rat is not None, 'No RAT found' assert rat.GetRowCount() == 2642, 'Wrong row count in RAT' assert rat.GetColumnCount() == 2, 'Wrong column count in RAT' assert rat.GetNameOfCol(0) == 'VALUE', 'Wrong name of col 0' assert rat.GetTypeOfCol(0) == gdal.GFT_Integer, 'Wrong type of col 0' assert rat.GetUsageOfCol(0) == gdal.GFU_MinMax, 'Wrong usage of col 0' assert rat.GetNameOfCol(1) == 'COUNT', 'Wrong name of col 1' assert rat.GetTypeOfCol(1) == gdal.GFT_Integer, 'Wrong type of col 1' assert rat.GetUsageOfCol(1) == gdal.GFU_PixelCount, 'Wrong usage of col 1' assert rat.GetValueAsInt(2641, 0) == 3627, 'Wrong value in RAT' assert ds.GetRasterBand(1).GetMinimum() == 0.0, 'Wrong minimum' assert ds.GetRasterBand(1).GetMaximum() == 3627.0, 'Wrong maximum' ############################################################################### # Test on real dataset downloaded from http://download.osgeo.org/gdal/data/aig/nzdem def test_aigrid_online_2(): if not gdaltest.download_file('http://download.osgeo.org/gdal/data/aig/ai_bug_6886.zip', 'ai_bug_6886.zip'): pytest.skip() try: os.stat('tmp/cache/ai_bug') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/ai_bug_6886') try: os.stat('tmp/cache/ai_bug') except OSError: pytest.skip() except: pytest.skip() tst = gdaltest.GDALTest('AIG', 'tmp/cache/ai_bug/ai_bug/hdr.adf', 1, 16018, filename_absolute=1) return tst.testOpen() ############################################################################### gdalautotest-3.1.2/gdrivers/ndf.py0000775000175000017500000000540613701060015015642 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ndf.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test NLAPS/NDF driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2008, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Simple image test of an NLAPS/NDF2 dataset. def test_ndf_1(): tst = gdaltest.GDALTest('NDF', 'LE7134052000500350.H3', 1, 6510, xoff=0, yoff=0, xsize=15620, ysize=1) gt = (320325.75, 14.25, 0, 1383062.25, 0, -14.25) wkt = """PROJCS["UTM Zone 46, Northern Hemisphere", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AXIS["Lat",NORTH], AXIS["Long",EAST], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",93], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1]]""" return tst.testOpen(check_gt=gt, gt_epsilon=0.0001, check_prj=wkt) gdalautotest-3.1.2/gdrivers/jp2metadata.py0000775000175000017500000001607013701060015017266 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: jp2metadata.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test JP2 metadata support. # Author: Even Rouault < even dot rouault @ spatialys.com > # ############################################################################### # Copyright (c) 2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import pytest ############################################################################### # Test bugfix for #5249 (Irrelevant ERDAS GeoTIFF JP2Box read) def test_jp2metadata_1(): ds = gdal.Open('data/erdas_foo.jp2') if ds is None: pytest.skip() wkt = ds.GetProjectionRef() gt = ds.GetGeoTransform() assert wkt.startswith('PROJCS["ETRS89') expected_gt = (356000.0, 0.5, 0.0, 7596000.0, 0.0, -0.5) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-5) ############################################################################### # Test Pleiades imagery metadata def test_jp2metadata_2(): # Pleiades product description http://www.cscrs.itu.edu.tr/assets/downloads/PleiadesUserGuide.pdf try: os.remove('data/IMG_md_ple_R1C1.jp2.aux.xml') except OSError: pass ds = gdal.Open('data/IMG_md_ple_R1C1.jp2', gdal.GA_ReadOnly) if ds is None: pytest.skip() filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' mddlist = ds.GetMetadataDomainList() assert 'IMD' in mddlist and 'RPC' in mddlist and 'IMAGERY' in mddlist, \ 'did not get expected metadata list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' ds = None assert not os.path.exists('data/IMG_md_ple_R1C1.jp2.aux.xml') ############################################################################### # Test reading GMLJP2 file with srsName only on the Envelope, and lots of other # metadata junk. This file is also handled currently with axis reordering # disabled. def test_jp2metadata_3(): gdal.SetConfigOption('GDAL_IGNORE_AXIS_ORIENTATION', 'YES') exp_wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' ds = gdal.Open('data/ll.jp2') if ds is None: gdal.SetConfigOption('GDAL_IGNORE_AXIS_ORIENTATION', 'NO') pytest.skip() wkt = ds.GetProjection() if wkt != exp_wkt: print('got: ', wkt) print('exp: ', exp_wkt) pytest.fail('did not get expected WKT, should be WGS84') gt = ds.GetGeoTransform() if gt[0] != pytest.approx(8, abs=0.0000001) or gt[3] != pytest.approx(50, abs=0.000001) \ or gt[1] != pytest.approx(0.000761397164, abs=0.000000000005) \ or gt[2] != pytest.approx(0.0, abs=0.000000000005) \ or gt[4] != pytest.approx(0.0, abs=0.000000000005) \ or gt[5] != pytest.approx(-0.000761397164, abs=0.000000000005): print('got: ', gt) pytest.fail('did not get expected geotransform') ds = None gdal.SetConfigOption('GDAL_IGNORE_AXIS_ORIENTATION', 'NO') ############################################################################### # Test reading a file with axis orientation set properly for an alternate # axis order coordinate system (urn:...:EPSG::4326). def test_jp2metadata_4(): exp_wkt = 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]' ds = gdal.Open('data/gmljp2_dtedsm_epsg_4326_axes.jp2') if ds is None: pytest.skip() wkt = ds.GetProjection() if wkt != exp_wkt: print('got: ', wkt) print('exp: ', exp_wkt) pytest.fail('did not get expected WKT, should be WGS84') gt = ds.GetGeoTransform() gte = (42.999583333333369, 0.008271349862259, 0, 34.000416666666631, 0, -0.008271349862259) if gt[0] != pytest.approx(gte[0], abs=0.0000001) or gt[3] != pytest.approx(gte[3], abs=0.000001) \ or gt[1] != pytest.approx(gte[1], abs=0.000000000005) \ or gt[2] != pytest.approx(gte[2], abs=0.000000000005) \ or gt[4] != pytest.approx(gte[4], abs=0.000000000005) \ or gt[5] != pytest.approx(gte[5], abs=0.000000000005): print('got: ', gt) pytest.fail('did not get expected geotransform') ds = None ############################################################################### # Test reading a file with EPSG axis orientation being northing, easting, # but with explicit axisName being easting, northing (#5960) def test_jp2metadata_5(): ds = gdal.Open('data/gmljp2_epsg3035_easting_northing.jp2') if ds is None: pytest.skip() sr = ds.GetSpatialRef() assert sr.GetAuthorityCode(None) == '3035' gt = ds.GetGeoTransform() gte = (4895766.000000001, 2.0, 0.0, 2296946.0, 0.0, -2.0) if gt[0] != pytest.approx(gte[0], abs=0.0000001) or gt[3] != pytest.approx(gte[3], abs=0.000001) \ or gt[1] != pytest.approx(gte[1], abs=0.000000000005) \ or gt[2] != pytest.approx(gte[2], abs=0.000000000005) \ or gt[4] != pytest.approx(gte[4], abs=0.000000000005) \ or gt[5] != pytest.approx(gte[5], abs=0.000000000005): print('got: ', gt) pytest.fail('did not get expected geotransform') ds = None gdalautotest-3.1.2/gdrivers/mg4lidar.py0000775000175000017500000000636413701060016016603 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: mg4lidar.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: MG4Lidar Reading Driver testing. # Author: Even Rouault # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import gdal import pytest ############################################################################### # Test reading a MG4Lidar file # def test_mg4lidar_1(): drv = gdal.GetDriverByName('MG4Lidar') if drv is None: pytest.skip() if not gdaltest.download_file('http://home.gdal.org/tmp/GDAL_MG4Lidar_Src.zip', 'GDAL_MG4Lidar_Src.zip'): pytest.skip() try: os.stat('tmp/cache/GDAL_MG4Lidar_Src') except OSError: try: gdaltest.unzip('tmp/cache', 'tmp/cache/GDAL_MG4Lidar_Src.zip') try: os.stat('tmp/cache/GDAL_MG4Lidar_Src') except OSError: pytest.skip() except OSError: pytest.skip() ds = gdal.Open('tmp/cache/GDAL_MG4Lidar_Src/Tetons_200k.view') assert ds is not None, 'could not open dataset' prj = ds.GetProjectionRef() if prj.find('NAD83 / UTM zone 12N') == -1: gdaltest.post_reason('did not get expected projection') print(prj) return gt = ds.GetGeoTransform() ref_gt = (504489.919999999983702, 3.078227571115974, 0, 4795848.389999999664724, 0, -3.078259860787739) for i in range(6): assert gt[i] == pytest.approx(ref_gt[i], abs=1e-6), 'did not get expected geotransform' cs = ds.GetRasterBand(1).Checksum() if cs != 13216: gdaltest.post_reason('did not get expected checksum') print(cs) return cs = ds.GetRasterBand(1).GetOverview(0).Checksum() if cs != 64099: gdaltest.post_reason('did not get expected overview checksum') print(cs) return ds = None gdalautotest-3.1.2/gdrivers/iris.py0000775000175000017500000001100113701060016016026 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: iris.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test IRIS driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2012-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Test reading a - fake - IRIS dataset def test_iris_1(): tst = gdaltest.GDALTest('IRIS', 'fakeiris.dat', 1, 65532) return tst.testOpen() ############################################################################### # Test reading a real world IRIS dataset. def test_iris_2(): ds = gdal.Open('data/iristest.dat') assert ds.GetRasterBand(1).Checksum() == 52872 ds.GetProjectionRef() # expected_wkt = """PROJCS["unnamed",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",6371000.5,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0]]""" # got_srs = osr.SpatialReference(got_wkt) # expected_srs = osr.SpatialReference(expected_wkt) # There are some differences in the values of the parameters between Linux # and Windows not sure if it is only due to rounding differences, # different proj versions, etc... # if got_srs.IsSame(expected_srs) != 1: # gdaltest.post_reason('fail') # print('') # print(expected_wkt) # print(got_wkt) # return 'fail' got_gt = ds.GetGeoTransform() expected_gt = [16435.721785269096, 1370.4263720754534, 0.0, 5289830.4584420761, 0.0, -1357.6498705837876] for i in range(6): assert not ((expected_gt[i] == 0.0 and got_gt[i] != 0.0) or \ (expected_gt[i] != 0.0 and abs(got_gt[i] - expected_gt[i]) / abs(expected_gt[i]) > 1e-5)) expected_metadata = [ "AZIMUTH_SMOOTHING_FOR_SHEAR=0.0", "CAPPI_BOTTOM_HEIGHT=1000.0 m", "COMPOSITED_PRODUCT=YES", "COMPOSITED_PRODUCT_MASK=0x0000080c", "DATA_TYPE=Clutter Corrected H reflectivity (1 byte)", "DATA_TYPE_CODE=dBZ", "DATA_TYPE_INPUT=Clutter Corrected H reflectivity (1 byte)", "DATA_TYPE_INPUT_CODE=dBZ", "DATA_TYPE_UNITS=dBZ", "GROUND_HEIGHT=523 m", "INGEST_HARDWARE_NAME=composada ", "INGEST_SITE_IRIS_VERSION=8.12", "INGEST_SITE_NAME=composada ", "MAX_AGE_FOR_SHEAR_VVP_CORRECTION=600 s", "NYQUIST_VELOCITY=6.00 m/s", "PRF=450 Hz", "PRODUCT=CAPPI", "PRODUCT_CONFIGURATION_NAME=CAPPI250CAT ", "PRODUCT_ID=3", "PRODUCT_SITE_IRIS_VERSION=8.12", "PRODUCT_SITE_NAME=SMCXRADSRV01 ", "RADAR_HEIGHT=542 m", "TASK_NAME=PPIVOL_A ", "TIME_INPUT_INGEST_SWEEP=2012-04-19 14:48:05", "TIME_PRODUCT_GENERATED=2012-04-19 14:48:30", "WAVELENGTH=5.33 cm"] got_metadata = ds.GetMetadata() for md in expected_metadata: key = md[0:md.find('=')] value = md[md.find('=') + 1:] assert got_metadata[key] == value, ('did not find %s' % key) gdalautotest-3.1.2/gdrivers/gta.py0000775000175000017500000001654213701060016015652 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: gta.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test GTA driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest import gdaltest from osgeo import gdal init_list = [ ('byte.tif', 4672), ('byte_signed.tif', 4672), ('int16.tif', 4672), ('uint16.tif', 4672), ('int32.tif', 4672), ('uint32.tif', 4672), ('float32.tif', 4672), ('float64.tif', 4672), ('cint16.tif', 5028), ('cint32.tif', 5028), ('cfloat32.tif', 5028), ('cfloat64.tif', 5028), ('rgbsmall.tif', 21212)] ############################################################################### # Verify we have the driver. def test_gta_1(): gdaltest.gta_drv = gdal.GetDriverByName('GTA') if gdaltest.gta_drv is None: pytest.skip() ############################################################################### # Test updating existing dataset, check srs, check gt def test_gta_2(): if gdaltest.gta_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') out_ds = gdaltest.gta_drv.CreateCopy('/vsimem/byte.gta', src_ds) out_ds = None out_ds = gdal.Open('/vsimem/byte.gta', gdal.GA_Update) out_ds.GetRasterBand(1).Fill(0) out_ds = None out_ds = gdal.Open('/vsimem/byte.gta') cs = out_ds.GetRasterBand(1).Checksum() assert cs == 0, 'did not get expected checksum' out_ds = None out_ds = gdal.Open('/vsimem/byte.gta', gdal.GA_Update) out_ds.WriteRaster(0, 0, 20, 20, src_ds.ReadRaster(0, 0, 20, 20)) out_ds = None out_ds = gdal.Open('/vsimem/byte.gta') cs = out_ds.GetRasterBand(1).Checksum() assert cs == src_ds.GetRasterBand(1).Checksum(), 'did not get expected checksum' gt = out_ds.GetGeoTransform() wkt = out_ds.GetProjectionRef() out_ds = None expected_gt = src_ds.GetGeoTransform() for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-6), 'did not get expected wkt' assert wkt == src_ds.GetProjectionRef(), 'did not get expected wkt' gdaltest.gta_drv.Delete('/vsimem/byte.gta') ############################################################################### # Test writing and readings GCPs def test_gta_3(): if gdaltest.gta_drv is None: pytest.skip() src_ds = gdal.Open('../gcore/data/gcps.vrt') new_ds = gdaltest.gta_drv.CreateCopy('/vsimem/gta_3.gta', src_ds) new_ds = None new_ds = gdal.Open('/vsimem/gta_3.gta') assert new_ds.GetGeoTransform() == (0.0, 1.0, 0.0, 0.0, 0.0, 1.0), \ 'GeoTransform not set properly.' assert new_ds.GetProjectionRef() == '', 'Projection not set properly.' assert new_ds.GetGCPProjection() == src_ds.GetGCPProjection(), \ 'GCP Projection not set properly.' gcps = new_ds.GetGCPs() expected_gcps = src_ds.GetGCPs() assert len(gcps) == len(expected_gcps), 'GCP count wrong.' new_ds = None gdaltest.gta_drv.Delete('/vsimem/gta_3.gta') ############################################################################### # Test band metadata def test_gta_4(): if gdaltest.gta_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 17) src_ds.GetRasterBand(1).Fill(255) src_ds.GetRasterBand(1).ComputeStatistics(False) src_ds.GetRasterBand(1).SetNoDataValue(123) src_ds.GetRasterBand(1).SetCategoryNames(['a', 'b']) src_ds.GetRasterBand(1).SetOffset(2) src_ds.GetRasterBand(1).SetScale(3) src_ds.GetRasterBand(1).SetUnitType('custom') src_ds.GetRasterBand(1).SetDescription('description') for i in range(17): if i != gdal.GCI_PaletteIndex: src_ds.GetRasterBand(i + 1).SetColorInterpretation(i) new_ds = gdaltest.gta_drv.CreateCopy('/vsimem/gta_4.gta', src_ds) new_ds = None new_ds = gdal.Open('/vsimem/gta_4.gta') band = new_ds.GetRasterBand(1) assert band.GetNoDataValue() == 123, 'did not get expected nodata value' assert band.GetMinimum() == 255, 'did not get expected minimum value' assert band.GetMaximum() == 255, 'did not get expected maximum value' assert band.GetCategoryNames() == ['a', 'b'], 'did not get expected category names' assert band.GetOffset() == 2, 'did not get expected offset value' assert band.GetScale() == 3, 'did not get expected scale value' assert band.GetUnitType() == 'custom', 'did not get expected unit value' assert band.GetDescription() == 'description', 'did not get expected description' for i in range(17): if i != gdal.GCI_PaletteIndex: assert new_ds.GetRasterBand(i + 1).GetColorInterpretation() == i, \ ('did not get expected color interpretation ' 'for band %d' % (i + 1)) new_ds = None gdaltest.gta_drv.Delete('/vsimem/gta_4.gta') ############################################################################### # Test compression algorithms def test_gta_5(): if gdaltest.gta_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') compress_list = ['NONE', 'BZIP2', "XZ", "ZLIB", "ZLIB1", "ZLIB2", "ZLIB3", "ZLIB4", "ZLIB5", "ZLIB6", "ZLIB7", "ZLIB8", "ZLIB9"] for compress in compress_list: out_ds = gdaltest.gta_drv.CreateCopy('/vsimem/gta_5.gta', src_ds, options=['COMPRESS=' + compress]) del out_ds gdaltest.gta_drv.Delete('/vsimem/gta_5.gta') @pytest.mark.parametrize( 'filename,checksum', init_list, ids=[tup[0].split('.')[0] for tup in init_list], ) @pytest.mark.require_driver('GTA') def test_gta_create(filename, checksum): if filename != 'byte_signed.tif': filename = '../../gcore/data/' + filename ut = gdaltest.GDALTest('GTA', filename, 1, checksum, options=[]) ut.testCreateCopy() gdalautotest-3.1.2/gdrivers/hdf5multidim.py0000775000175000017500000005107313701060016017470 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: hdf5multidim.py a54fb26a959d72b97385564a81652988c305fd91 2019-09-02 17:34:02 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test multidimensional support in HDF5 driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest import pytest import struct from osgeo import gdal pytestmark = pytest.mark.require_driver('HDF5') def test_hdf5_multidim_basic(): ds = gdal.OpenEx('data/u8be.h5', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg assert not rg.GetGroupNames() assert not rg.OpenGroup('non_existing') assert rg.GetMDArrayNames() == [ 'TestArray' ] assert not rg.OpenMDArray('non_existing') ar = rg.OpenMDArray('TestArray') assert ar assert not ar.GetAttribute('non_existing') dims = ar.GetDimensions() assert len(dims) == 2 assert dims[0].GetSize() == 6 assert dims[1].GetSize() == 5 assert ar.GetDataType().GetNumericDataType() == gdal.GDT_Byte got_data = ar.Read(buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert len(got_data) == 30 * 2 assert struct.unpack('H' * 30, got_data) == (0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 5, 6, 7, 8, 9) got_data = ar.Read( array_start_idx = [2, 1], count = [3, 2], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert len(got_data) == 6 * 2 assert struct.unpack('H' * 6, got_data) == (3, 4, 4, 5, 5, 6) got_data = ar.Read( array_start_idx = [2, 1], count = [3, 2], array_step = [-1, -1], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert len(got_data) == 6 * 2 assert struct.unpack('H' * 6, got_data) == (3, 2, 2, 1, 1, 0) with gdaltest.config_option('GDAL_HDF5_TEMP_ARRAY_ALLOC_SIZE', '0'): got_data = ar.Read( array_start_idx = [2, 1], count = [3, 2], array_step = [-1, -1], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert len(got_data) == 6 * 2 assert struct.unpack('H' * 6, got_data) == (3, 2, 2, 1, 1, 0) def test_hdf5_multidim_var_alldatatypes(): ds = gdal.OpenEx('HDF5:data/alldatatypes.nc', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg expected_vars = [ #('char_var', gdal.GDT_Byte, (ord('x'),ord('y'))), ('ubyte_var', gdal.GDT_Byte, (255, 254)), ('byte_var', gdal.GDT_Int16, (-128,-127)), ('byte_unsigned_false_var', gdal.GDT_Int16, (-128,-127)), #('byte_unsigned_true_var', gdal.GDT_Byte, (128, 129)), ('ushort_var', gdal.GDT_UInt16, (65534, 65533)), ('short_var', gdal.GDT_Int16, (-32768, -32767)), ('uint_var', gdal.GDT_UInt32, (4294967294, 4294967293)), ('int_var', gdal.GDT_Int32, (-2147483648, -2147483647)), ('uint64_var', gdal.GDT_Float64, (1.8446744073709552e+19, 1.8446744073709552e+19)), ('int64_var', gdal.GDT_Float64, (-9.223372036854776e+18, -9.223372036854776e+18)), ('float_var', gdal.GDT_Float32, (1.25, 2.25)), ('double_var', gdal.GDT_Float64, (1.25125, 2.25125)), ('complex_int16_var', gdal.GDT_CInt16, (-32768, -32767, -32766, -32765)), ('complex_int32_var', gdal.GDT_CInt32, (-2147483648, -2147483647, -2147483646, -2147483645)), ('complex64_var', gdal.GDT_CFloat32, (1.25, 2.5, 2.25, 3.5)), ('complex128_var', gdal.GDT_CFloat64, (1.25125, 2.25125, 3.25125, 4.25125)), ] for var_name, dt, val in expected_vars: var = rg.OpenMDArray(var_name) assert var assert var.GetDataType().GetClass() == gdal.GEDTC_NUMERIC, var_name assert var.GetDataType().GetNumericDataType() == dt, var_name if dt == gdal.GDT_Byte: assert struct.unpack('B' * len(val), var.Read()) == val if dt == gdal.GDT_UInt16: assert struct.unpack('H' * len(val), var.Read()) == val if dt == gdal.GDT_Int16: assert struct.unpack('h' * len(val), var.Read()) == val if dt == gdal.GDT_UInt32: assert struct.unpack('I' * len(val), var.Read()) == val if dt == gdal.GDT_Int32: assert struct.unpack('i' * len(val), var.Read()) == val if dt == gdal.GDT_Float32: assert struct.unpack('f' * len(val), var.Read()) == val if dt == gdal.GDT_Float64: assert struct.unpack('d' * len(val), var.Read()) == val if dt == gdal.GDT_CInt16: assert struct.unpack('h' * len(val), var.Read()) == val if dt == gdal.GDT_CInt32: assert struct.unpack('i' * len(val), var.Read()) == val if dt == gdal.GDT_CFloat32: assert struct.unpack('f' * len(val), var.Read()) == val if dt == gdal.GDT_CFloat64: assert struct.unpack('d' * len(val), var.Read()) == val var = rg.OpenMDArray('custom_type_2_elts_var') dt = var.GetDataType() assert dt.GetClass() == gdal.GEDTC_COMPOUND assert dt.GetSize() == 8 assert dt.GetName() == 'custom_type_2_elts' comps = dt.GetComponents() assert len(comps) == 2 assert comps[0].GetName() == 'x' assert comps[0].GetOffset() == 0 assert comps[0].GetType().GetNumericDataType() == gdal.GDT_Int32 assert comps[1].GetName() == 'y' assert comps[1].GetOffset() == 4 assert comps[1].GetType().GetNumericDataType() == gdal.GDT_Int16 data = var.Read() assert len(data) == 2 * 8 assert struct.unpack('ihihh', data) == (1, 2, 3, 4, 0) var = rg.OpenMDArray('custom_type_3_elts_var') dt = var.GetDataType() assert dt.GetClass() == gdal.GEDTC_COMPOUND assert dt.GetSize() == 12 comps = dt.GetComponents() assert len(comps) == 3 assert comps[0].GetName() == 'x' assert comps[0].GetOffset() == 0 assert comps[0].GetType().GetNumericDataType() == gdal.GDT_Int32 assert comps[1].GetName() == 'y' assert comps[1].GetOffset() == 4 assert comps[1].GetType().GetNumericDataType() == gdal.GDT_Int16 assert comps[2].GetName() == 'z' assert comps[2].GetOffset() == 8 assert comps[2].GetType().GetNumericDataType() == gdal.GDT_Float32 data = var.Read() assert len(data) == 2 * 12 assert struct.unpack('ihf' * 2, data) == (1, 2, 3.5, 4, 5, 6.5) var = rg.OpenMDArray('string_var') dt = var.GetDataType() assert dt.GetClass() == gdal.GEDTC_STRING assert var.Read() == ['abcd', 'ef'] def test_hdf5_multidim_read_array(): ds = gdal.OpenEx('HDF5:data/alldatatypes.nc', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() # 0D var = rg.OpenMDArray('ubyte_no_dim_var') assert var assert struct.unpack('B', var.Read()) == (2,) assert struct.unpack('H', var.Read(buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16))) == (2,) # 1D var = rg.OpenMDArray('ubyte_x2_var') data = var.Read(array_start_idx = [1], count = [2], array_step = [2]) got_data_ref = (2, 4) assert struct.unpack('B' * len(data), data) == got_data_ref data = var.Read(array_start_idx = [1], count = [2], array_step = [2], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert struct.unpack('H' * (len(data) // 2), data) == got_data_ref data = var.Read(array_start_idx = [2], count = [2], array_step = [-2]) got_data_ref = (3, 1) assert struct.unpack('B' * len(data), data) == got_data_ref # 2D var = rg.OpenMDArray('ubyte_y2_x2_var') data = var.Read(count = [2, 3], array_step = [2, 1]) got_data_ref = (1, 2, 3, 9, 10, 11) assert struct.unpack('B' * len(data), data) == got_data_ref data = var.Read(count = [2, 3], array_step = [2, 1], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert struct.unpack('H' * (len(data) // 2), data) == got_data_ref data = var.Read(array_start_idx = [1, 2], count = [2, 2]) got_data_ref = (7, 8, 11, 12) assert struct.unpack('B' * len(data), data) == got_data_ref data = var.Read(array_start_idx = [1, 2], count = [2, 2], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert struct.unpack('H' * (len(data) // 2), data) == got_data_ref # 3D var = rg.OpenMDArray('ubyte_z2_y2_x2_var') data = var.Read(count = [3, 2, 3], array_step = [1, 2, 1]) got_data_ref = (1, 2, 3, 9, 10, 11, 2, 3, 4, 10, 11, 12, 3, 4, 5, 11, 12, 1) assert struct.unpack('B' * len(data), data) == got_data_ref data = var.Read(count = [3, 2, 3], array_step = [1, 2, 1], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert struct.unpack('H' * (len(data) // 2), data) == got_data_ref data = var.Read(array_start_idx = [1, 1, 1], count = [3, 2, 2]) got_data_ref = (7, 8, 11, 12, 8, 9, 12, 1, 9, 10, 1, 2) assert struct.unpack('B' * len(data), data) == got_data_ref data = var.Read(array_start_idx = [1, 1, 1], count = [3, 2, 2], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert struct.unpack('H' * (len(data) // 2), data) == got_data_ref # 4D var = rg.OpenMDArray('ubyte_t2_z2_y2_x2_var') data = var.Read(count = [2, 3, 2, 3], array_step = [1, 1, 2, 1]) got_data_ref = (1, 2, 3, 9, 10, 11, 2, 3, 4, 10, 11, 12, 3, 4, 5, 11, 12, 1, 2, 3, 4, 10, 11, 12, 3, 4, 5, 11, 12, 1, 4, 5, 6, 12, 1, 2) assert struct.unpack('B' * len(data), data) == got_data_ref data = var.Read(count = [2, 3, 2, 3], array_step = [1, 1, 2, 1], buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_UInt16)) assert struct.unpack('H' * (len(data) // 2), data) == got_data_ref def test_hdf5_multidim_attr_alldatatypes(): ds = gdal.OpenEx('HDF5:data/alldatatypes.nc', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() attrs = rg.GetAttributes() assert len(attrs) == 1 assert attrs[0].GetName() == 'global_attr' attrs = rg.OpenGroup('group').GetAttributes() assert len(attrs) == 1 assert attrs[0].GetName() == 'group_global_attr' var = rg.OpenMDArray('ubyte_var') assert var attrs = var.GetAttributes() assert len(attrs) == 30 map_attrs = {} for attr in attrs: map_attrs[attr.GetName()] = attr attr = map_attrs['attr_byte'] assert attr.GetDimensionCount() == 0 assert len(attr.GetDimensionsSize()) == 0 assert attr.GetDataType().GetNumericDataType() == gdal.GDT_Int16 assert attr.Read() == -128 assert map_attrs['attr_ubyte'].Read() == 255 assert map_attrs['attr_char'].GetDataType().GetClass() == gdal.GEDTC_STRING assert map_attrs['attr_char'].GetDimensionCount() == 0 assert map_attrs['attr_char'].Read() == 'x' assert map_attrs['attr_char'].ReadAsStringArray() == ['x'] with gdaltest.error_handler(): assert not map_attrs['attr_char'].ReadAsRaw() assert map_attrs['attr_string_as_repeated_char'].GetDataType().GetClass() == gdal.GEDTC_STRING assert map_attrs['attr_string_as_repeated_char'].GetDimensionCount() == 0 assert map_attrs['attr_string_as_repeated_char'].Read() == 'xy' assert map_attrs['attr_string_as_repeated_char'].ReadAsStringArray() == ['xy'] assert map_attrs['attr_empty_char'].GetDataType().GetClass() == gdal.GEDTC_STRING assert map_attrs['attr_empty_char'].GetDimensionCount() == 0 assert map_attrs['attr_empty_char'].Read() == '' assert map_attrs['attr_two_strings'].GetDataType().GetClass() == gdal.GEDTC_STRING assert map_attrs['attr_two_strings'].GetDimensionCount() == 1 assert map_attrs['attr_two_strings'].GetDimensionsSize()[0] == 2 assert map_attrs['attr_two_strings'].Read() == ['ab', 'cd'] assert map_attrs['attr_two_strings'].ReadAsString() == 'ab' assert map_attrs['attr_int'].Read() == -2147483647 assert map_attrs['attr_float'].Read() == 1.25 assert map_attrs['attr_double'].Read() == 1.25125 assert map_attrs['attr_double'].ReadAsDoubleArray() == (1.25125,) assert map_attrs['attr_int64'].Read() == -9.223372036854776e+18 assert map_attrs['attr_uint64'].Read() == 1.8446744073709552e+19 assert map_attrs['attr_complex_int16'].GetDataType().GetNumericDataType() == gdal.GDT_CInt16 assert struct.unpack('H'* 2, map_attrs['attr_complex_int16'].ReadAsRaw()) == (1, 2) assert map_attrs['attr_complex_int16'].Read() == 1.0 assert map_attrs['attr_complex_int16'].ReadAsString() == '1+2j' assert map_attrs['attr_two_bytes'].Read() == (-128, -127) assert map_attrs['attr_two_ints'].Read() == (-2147483648, -2147483647) assert map_attrs['attr_two_doubles'].GetDataType().GetNumericDataType() == gdal.GDT_Float64 assert map_attrs['attr_two_doubles'].GetDimensionCount() == 1 assert map_attrs['attr_two_doubles'].GetDimensionsSize()[0] == 2 assert map_attrs['attr_two_doubles'].Read() == (1.25125, 2.125125) assert map_attrs['attr_two_doubles'].ReadAsDouble() == 1.25125 assert map_attrs['attr_enum_ubyte'].GetDataType().GetNumericDataType() == gdal.GDT_Byte assert map_attrs['attr_enum_ubyte'].Read() == 1 assert map_attrs['attr_enum_int'].GetDataType().GetNumericDataType() == gdal.GDT_Int32 assert map_attrs['attr_enum_int'].Read() == 1000000001 assert len(map_attrs['attr_custom_type_2_elts'].ReadAsRaw()) == 8 # Compound type contains a string with gdaltest.error_handler(): assert not map_attrs['attr_custom_with_string'].ReadAsRaw() def test_hdf5_multidim_nodata_unit(): ds = gdal.OpenEx('HDF5:data/trmm-nc4.nc', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() ar = rg.OpenMDArray('pcp') assert struct.unpack('f', ar.GetNoDataValueAsRaw())[0] == struct.unpack('f', struct.pack('f', -9999.9))[0] assert ar.GetUnit() == '' ar = rg.OpenMDArray('longitude') assert ar.GetNoDataValueAsRaw() is None assert ar.GetUnit() == 'degrees_east' def test_hdf5_multidim_recursive_groups(): # File generated with # import h5py # f = h5py.File('recursive_groups.h5','w') # group = f.create_group("subgroup") # group['link_to_root'] = f # group['link_to_self'] = group # group['soft_link_to_root'] = h5py.SoftLink('/') # group['soft_link_to_self'] = h5py.SoftLink('/subgroup') # group['soft_link_to_not_existing'] = h5py.SoftLink('/not_existing') # group['hard_link_to_root'] = h5py.HardLink('/') # group['ext_link_to_self_root'] = h5py.ExternalLink("recursive_groups.h5", "/") # f.close() ds = gdal.OpenEx('data/recursive_groups.h5', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() assert rg.GetGroupNames() == ['subgroup'] def test_hdf5_netcdf_dimensions(): ds = gdal.OpenEx('HDF5:data/trmm-nc4.nc', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() assert rg.GetAttribute('CDI') dims = rg.GetDimensions() assert len(dims) == 3 assert dims[0].GetFullName() == '/latitude' assert dims[0].GetName() == 'latitude' assert dims[0].GetSize() == 40 var = dims[0].GetIndexingVariable() assert var assert var.GetName() == 'latitude' assert dims[1].GetFullName() == '/longitude' assert dims[1].GetName() == 'longitude' assert dims[1].GetSize() == 40 var = dims[1].GetIndexingVariable() assert var assert dims[2].GetFullName() == '/time' assert dims[2].GetName() == 'time' assert dims[2].GetSize() == 1 var = dims[2].GetIndexingVariable() assert var ar = rg.OpenMDArray('latitude') dims = ar.GetDimensions() assert len(dims) == 1 assert dims[0].GetName() == 'latitude' assert dims[0].GetIndexingVariable() assert dims[0].GetIndexingVariable().GetName() == 'latitude' ar = rg.OpenMDArray('pcp') dims = ar.GetDimensions() assert len(dims) == 3 assert dims[0].GetName() == 'time' assert dims[0].GetIndexingVariable() assert dims[0].GetIndexingVariable().GetName() == 'time' def test_hdf5_multidim_netcdf_dimensions_complex_case(): ds = gdal.OpenEx('HDF5:data/alldatatypes.nc', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() dims = rg.GetDimensions() assert len(dims) == 6 dim = next((x for x in dims if x.GetName() == 'X'), None) assert dim assert dim.GetFullName() == '/X' assert dim.GetSize() == 2 assert dim.GetIndexingVariable() assert dim.GetIndexingVariable().GetFullName() == '/X' dim = next((x for x in dims if x.GetName() == 'Y'), None) assert dim assert dim.GetFullName() == '/Y' assert dim.GetSize() == 1 assert dim.GetIndexingVariable() assert dim.GetIndexingVariable().GetFullName() == '/Y' dim = next((x for x in dims if x.GetName() == 'X2'), None) assert dim assert dim.GetFullName() == '/X2' assert dim.GetSize() == 4 assert not dim.GetIndexingVariable() assert 'X' in rg.GetMDArrayNames() assert 'X2' not in rg.GetMDArrayNames() subgroup = rg.OpenGroup('group') assert subgroup dims = subgroup.GetDimensions() assert len(dims) == 2 dim = next((x for x in dims if x.GetName() == 'X'), None) assert dim assert dim.GetFullName() == '/group/X' assert dim.GetSize() == 3 assert not dim.GetIndexingVariable() dim = next((x for x in dims if x.GetName() == 'Y'), None) assert dim assert dim.GetFullName() == '/group/Y' assert dim.GetSize() == 2 assert not dim.GetIndexingVariable() ar = subgroup.OpenMDArray('char_var') assert ar dims = ar.GetDimensions() assert len(dims) == 3 assert dims[0].GetFullName() == '/Y' assert dims[0].GetSize() == 1 assert dims[0].GetIndexingVariable() assert dims[1].GetFullName() == '/group/Y' assert dims[1].GetSize() == 2 assert not dims[1].GetIndexingVariable() assert dims[2].GetFullName() == '/group/X' assert dims[2].GetSize() == 3 assert not dims[2].GetIndexingVariable() ar = rg.OpenMDArray('ubyte_z2_y2_x2_var') assert ar dims = ar.GetDimensions() assert len(dims) == 3 assert dims[0].GetFullName() == '/Z2' assert not dims[0].GetIndexingVariable() def test_hdf5_multidim_dimension_labels_with_null(): ds = gdal.OpenEx('data/dimension_labels_with_null.h5', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() ar = rg.OpenMDArray('data') attr = ar.GetAttribute('DIMENSION_LABELS') assert attr.ReadAsStringArray() == ['', '', 'x'] ds = gdal.OpenEx('data/dimension_labels_with_null.h5', gdal.OF_MULTIDIM_RASTER) rg = ds.GetRootGroup() ar = rg.OpenMDArray('data') dims = ar.GetDimensions() assert len(dims) == 3 assert dims[0].GetName() == 'dim0' assert dims[1].GetName() == 'dim1' assert dims[2].GetName() == 'x' def test_hdf5_multidim_family_driver(): assert gdal.OpenEx('data/test_family_0.h5', gdal.OF_MULTIDIM_RASTER) gdalautotest-3.1.2/gdrivers/e00grid.py0000775000175000017500000001160113701060016016320 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: e00grid.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test E00GRID driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Test a fake E00GRID dataset def test_e00grid_1(): tst = gdaltest.GDALTest('E00GRID', 'fake_e00grid.e00', 1, 65359) expected_gt = [500000.0, 1000.0, 0.0, 4000000.0, 0.0, -1000.0] expected_srs = """PROJCS["UTM Zone 15, Northern Hemisphere", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-93], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["METERS",1]]""" ret = tst.testOpen(check_gt=expected_gt, check_prj=expected_srs) if ret == 'success': ds = gdal.Open('data/fake_e00grid.e00') assert ds.GetRasterBand(1).GetNoDataValue() == -32767, \ 'did not get expected nodata value' assert ds.GetRasterBand(1).GetUnitType() == 'ft', \ 'did not get expected nodata value' return ret ############################################################################### # Test a fake E00GRID dataset, compressed and with statistics def test_e00grid_2(): tst = gdaltest.GDALTest('E00GRID', 'fake_e00grid_compressed.e00', 1, 65347) expected_gt = [500000.0, 1000.0, 0.0, 4000000.0, 0.0, -1000.0] expected_srs = """PROJCS["UTM Zone 15, Northern Hemisphere", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-93], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["METERS",1]]""" ret = tst.testOpen(check_gt=expected_gt, check_prj=expected_srs) if ret == 'success': ds = gdal.Open('data/fake_e00grid_compressed.e00') line0 = ds.ReadRaster(0, 0, 5, 1) ds.ReadRaster(0, 1, 5, 1) line2 = ds.ReadRaster(0, 2, 5, 1) assert line0 != line2, 'should not have gotten the same values' ds.ReadRaster(0, 0, 5, 1) line2_bis = ds.ReadRaster(0, 2, 5, 1) assert line2 == line2_bis, 'did not get the same values for the same line' assert ds.GetRasterBand(1).GetMinimum() == 1, \ 'did not get expected minimum value' assert ds.GetRasterBand(1).GetMaximum() == 50, \ 'did not get expected maximum value' stats = ds.GetRasterBand(1).GetStatistics(False, True) assert stats == [1.0, 50.0, 25.5, 24.5], 'did not get expected statistics' return ret gdalautotest-3.1.2/gdrivers/fit.py0000775000175000017500000000424413701060016015655 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: fit.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for FIT driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest from osgeo import gdal @pytest.mark.parametrize('filename', [ 'byte', 'int16', 'uint16', 'int32', 'uint32', 'float32', 'float64' ]) def test_fit(filename): fitDriver = gdal.GetDriverByName('FIT') ds = gdal.Open('../gcore/data/' + filename + '.tif') fitDriver.CreateCopy('tmp/' + filename + '.fit', ds, options=['PAGESIZE=2,2']) ds2 = gdal.Open('tmp/' + filename + '.fit') assert ds2.GetRasterBand(1).Checksum() == ds.GetRasterBand(1).Checksum() assert ds2.GetRasterBand(1).DataType == ds.GetRasterBand(1).DataType ds2 = None gdalautotest-3.1.2/gdrivers/ecrgtoc.py0000775000175000017500000002453513701060016016526 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ecrgtoc.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for ECRGTOC driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import gdaltest import pytest ############################################################################### # Basic test def test_ecrgtoc_1(): toc_xml = """ TOC.xml clfc\\2 001 lf 2 clfc\\2 001 lf 2 LF 1:500 K (LFC Day) 1:500 K LFC Day """ f = gdal.VSIFOpenL('/vsimem/TOC.xml', 'wb') gdal.VSIFWriteL(toc_xml, 1, len(toc_xml), f) gdal.VSIFCloseL(f) ds = gdal.Open('/vsimem/TOC.xml') assert ds is not None expected_gt = [-85.43147208121826, 0.00059486040609137061, 0.0, 33.166986564299428, 0.0, -0.00044985604606525913] gt = ds.GetGeoTransform() for i in range(6): if gt[i] != pytest.approx(expected_gt[i], abs=1e-10): gdaltest.post_reason('did not get expected geotransform') print(gt) wkt = ds.GetProjectionRef() assert wkt.find('WGS 84') != -1, 'did not get expected SRS' filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected filelist' ds2 = gdal.GetDriverByName('NITF').Create('/vsimem/clfc/2/000000009s0013.lf2', 2304, 2304, 3, options=['ICORDS=G', 'TRE=GEOLOB=000605184000800256-85.43147208122+33.16698656430']) ds2.SetGeoTransform([-85.43147208122, 0.00059486040609137061, 0.0, 33.16698656430, 0.0, -0.00044985604606525913]) ds2.SetProjection(wkt) ds2.GetRasterBand(1).Fill(255) ds2 = None ds2 = gdal.GetDriverByName('NITF').Create('/vsimem/clfc/2/000000009t0013.lf2', 2304, 2304, 3, options=['ICORDS=G', 'TRE=GEOLOB=000605184000800256-84.06091370558+33.16698656430']) ds2.SetGeoTransform([-84.06091370558, 0.00059486040609137061, 0.0, 33.16698656430, 0.0, -0.00044985604606525913]) ds2.SetProjection(wkt) ds2 = None cs = ds.GetRasterBand(1).Checksum() ds = None assert cs == 5966, 'bad checksum' ############################################################################### # Test overviews def test_ecrgtoc_2(): ds = gdal.Open('/vsimem/TOC.xml') ds.BuildOverviews('NEAR', [2]) ds = None ds = gdal.Open('/vsimem/TOC.xml') filelist = ds.GetFileList() assert len(filelist) == 4, 'did not get expected filelist' ds = None ############################################################################### # Test opening subdataset def test_ecrgtoc_3(): # Try different errors for name in ['ECRG_TOC_ENTRY:', 'ECRG_TOC_ENTRY:ProductTitle', 'ECRG_TOC_ENTRY:ProductTitle:DiscId', 'ECRG_TOC_ENTRY:ProductTitle:DiscId:not_existing', 'ECRG_TOC_ENTRY:ProductTitle:DiscId:c:/not_existing', 'ECRG_TOC_ENTRY:ProductTitle:DiscId:1_500_K:not_existing', 'ECRG_TOC_ENTRY:ProductTitle:DiscId:1_500_K:c:/not_existing', 'ECRG_TOC_ENTRY:ProductTitle:DiscId:1_500_K:c:/not_existing:extra', 'ECRG_TOC_ENTRY:ProductTitle:DiscId:inexisting_scale:/vsimem/TOC.xml', 'ECRG_TOC_ENTRY:ProductTitle:DiscId2:/vsimem/TOC.xml', 'ECRG_TOC_ENTRY:ProductTitle2:DiscId:/vsimem/TOC.xml']: gdal.PushErrorHandler() ds = gdal.Open(name) gdal.PopErrorHandler() assert ds is None, name # Legacy syntax ds = gdal.Open('ECRG_TOC_ENTRY:ProductTitle:DiscId:/vsimem/TOC.xml') assert ds is not None ds = None ds = gdal.Open('ECRG_TOC_ENTRY:ProductTitle:DiscId:1_500_K:/vsimem/TOC.xml') assert ds is not None ds = None gdal.Unlink('/vsimem/TOC.xml') gdal.Unlink('/vsimem/TOC.xml.1.ovr') gdal.Unlink('/vsimem/clfc/2/000000009s0013.lf2') gdal.Unlink('/vsimem/clfc/2/000000009t0013.lf2') ############################################################################### # Test dataset with 3 subdatasets def test_ecrgtoc_4(): toc_xml = """ TOC.xml clfc\\2 001 lf 2 clfc\\2 001 lf 2 clfc\\2 001 lf 2 LF 1:500 K (LFC Day) 1:500 K LFC Day """ f = gdal.VSIFOpenL('/vsimem/TOC.xml', 'wb') gdal.VSIFWriteL(toc_xml, 1, len(toc_xml), f) gdal.VSIFCloseL(f) ds = gdal.Open('/vsimem/TOC.xml') assert ds is not None assert ds.RasterCount == 0, 'bad raster count' expected_gt = (-85.43147208121826, 0.00059486040609137061, 0.0, 37.241379310344833, 0.0, -0.00044985604606525913) gt = ds.GetGeoTransform() for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-10), 'did not get expected geotransform' wkt = ds.GetProjectionRef() assert wkt.find('WGS 84') != -1, 'did not get expected SRS' filelist = ds.GetFileList() assert len(filelist) == 4, 'did not get expected filelist' subdatasets = ds.GetMetadata('SUBDATASETS') if len(subdatasets) != 6: print(filelist) pytest.fail('did not get expected subdatasets') ds = None ds = gdal.Open('ECRG_TOC_ENTRY:ProductTitle:DiscId:1_500_K:/vsimem/TOC.xml') assert ds is not None, 'did not get subdataset' ds = None ds = gdal.Open('ECRG_TOC_ENTRY:ProductTitle:DiscId:1_1000_K:/vsimem/TOC.xml') assert ds is not None, 'did not get subdataset' ds = None ds = gdal.Open('ECRG_TOC_ENTRY:ProductTitle:DiscId2:1_500_K:/vsimem/TOC.xml') assert ds is not None, 'did not get subdataset' ds = None gdal.PushErrorHandler('CPLQuietErrorHandler') ds = gdal.Open('ECRG_TOC_ENTRY:ProductTitle:DiscId:/vsimem/TOC.xml') gdal.PopErrorHandler() assert ds is None, 'should not have got subdataset' gdal.Unlink('/vsimem/TOC.xml') ############################################################################### def test_ecrgtoc_online_1(): if not gdaltest.download_file('http://www.falconview.org/trac/FalconView/downloads/17', 'ECRG_Sample.zip'): pytest.skip() try: os.stat('tmp/cache/ECRG_Sample.zip') except OSError: pytest.skip() ds = gdal.Open('/vsizip/tmp/cache/ECRG_Sample.zip/ECRG_Sample/EPF/TOC.xml') assert ds is not None expected_gt = (-85.43147208121826, 0.00059486040609137061, 0.0, 35.239923224568145, 0.0, -0.00044985604606525913) gt = ds.GetGeoTransform() for i in range(6): if gt[i] != pytest.approx(expected_gt[i], abs=1e-10): gdaltest.post_reason('did not get expected geotransform') print(gt) wkt = ds.GetProjectionRef() assert wkt.find('WGS 84') != -1, 'did not get expected SRS' filelist = ds.GetFileList() assert len(filelist) == 7, 'did not get expected filelist' gdalautotest-3.1.2/gdrivers/mff2.py0000775000175000017500000000352313701060016015724 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: mff2.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test MFF2 driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2009, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Test reading a MFF2 file generated by CreateCopy() def test_mff2_1(): tst = gdaltest.GDALTest('MFF2', 'bytemff2', 1, 4672) return tst.testOpen() gdalautotest-3.1.2/gdrivers/isce.py0000775000175000017500000000651413701060016016020 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: isce.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test ISCE format driver. # Author: Matthieu Volat # ############################################################################### # Copyright (c) 2014, Matthieu Volat # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Perform simple read test. def test_isce_1(): tst = gdaltest.GDALTest('isce', 'isce.slc', 1, 350) prj = """GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]]""" return tst.testOpen(check_prj=prj, check_gt=(14.259166666666667, 0.0008333333333333334, 0.0, 38.22083333333333, 0.0, -0.0008333333333333334)) ############################################################################### # Test reading of metadata from the ISCE metadata domain def test_isce_2(): ds = gdal.Open('data/isce.slc') val = ds.GetMetadataItem('IMAGE_TYPE', 'ISCE') assert val == 'slc' ############################################################################### # Verify this can be exported losslessly. def test_isce_3(): tst = gdaltest.GDALTest('isce', 'isce.slc', 1, 350) return tst.testCreateCopy(check_gt=0, new_filename='isce.tst.slc') ############################################################################### # Verify VSIF*L capacity def test_isce_4(): tst = gdaltest.GDALTest('isce', 'isce.slc', 1, 350) return tst.testCreateCopy(check_gt=0, new_filename='isce.tst.slc', vsimem=1) gdalautotest-3.1.2/gdrivers/gif.py0000775000175000017500000001470013701060016015636 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: gif.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for GIF driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2004, Frank Warmerdam # Copyright (c) 2008-2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Get the GIF driver, and verify a few things about it. def test_gif_1(): gdaltest.gif_drv = gdal.GetDriverByName('GIF') if gdaltest.gif_drv is None: gdaltest.post_reason('GIF driver not found!') return 'false' # Move the BIGGIF driver after the GIF driver. drv = gdal.GetDriverByName('BIGGIF') drv.Deregister() drv.Register() drv_md = gdaltest.gif_drv.GetMetadata() if drv_md['DMD_MIMETYPE'] != 'image/gif': gdaltest.post_reason('mime type is wrong') return 'false' ############################################################################### # Read test of simple byte reference data. def test_gif_2(): tst = gdaltest.GDALTest('GIF', 'bug407.gif', 1, 57921) return tst.testOpen() ############################################################################### # Test lossless copying. def test_gif_3(): tst = gdaltest.GDALTest('GIF', 'bug407.gif', 1, 57921, options=['INTERLACING=NO']) return tst.testCreateCopy() ############################################################################### # Verify the colormap, and nodata setting for test file. def test_gif_4(): ds = gdal.Open('data/bug407.gif') cm = ds.GetRasterBand(1).GetRasterColorTable() assert cm.GetCount() == 16 and cm.GetColorEntry(0) == (255, 255, 255, 255) and cm.GetColorEntry(1) == (255, 255, 208, 255), \ 'Wrong colormap entries' cm = None assert ds.GetRasterBand(1).GetNoDataValue() is None, 'Wrong nodata value.' md = ds.GetRasterBand(1).GetMetadata() assert 'GIF_BACKGROUND' in md and md['GIF_BACKGROUND'] == '0', \ 'background metadata missing.' ############################################################################### # Test creating an in memory copy. def test_gif_5(): tst = gdaltest.GDALTest('GIF', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Verify nodata support def test_gif_6(): src_ds = gdal.Open('../gcore/data/nodata_byte.tif') new_ds = gdaltest.gif_drv.CreateCopy('tmp/nodata_byte.gif', src_ds) if new_ds is None: gdaltest.post_reason('Create copy operation failure') return 'false' bnd = new_ds.GetRasterBand(1) if bnd.Checksum() != 4440: gdaltest.post_reason('Wrong checksum') return 'false' bnd = None new_ds = None src_ds = None new_ds = gdal.Open('tmp/nodata_byte.gif') bnd = new_ds.GetRasterBand(1) if bnd.Checksum() != 4440: gdaltest.post_reason('Wrong checksum') return 'false' # NOTE - mloskot: condition may fail as nodata is a float-point number nodata = bnd.GetNoDataValue() if nodata != 0: gdaltest.post_reason('Got unexpected nodata value.') return 'false' bnd = None new_ds = None gdaltest.gif_drv.Delete('tmp/nodata_byte.gif') ############################################################################### # Confirm reading with the BIGGIF driver. def test_gif_7(): # Move the GIF driver after the BIGGIF driver. drv = gdal.GetDriverByName('GIF') drv.Deregister() drv.Register() tst = gdaltest.GDALTest('BIGGIF', 'bug407.gif', 1, 57921) tst.testOpen() ds = gdal.Open('data/bug407.gif') assert ds is not None assert ds.GetDriver().ShortName == 'BIGGIF' ############################################################################### # Confirm that BIGGIF driver is selected for huge gifs def test_gif_8(): # Move the BIGGIF driver after the GIF driver. drv = gdal.GetDriverByName('BIGGIF') drv.Deregister() drv.Register() ds = gdal.Open('data/fakebig.gif') assert ds is not None assert ds.GetDriver().ShortName == 'BIGGIF' ############################################################################### # Test writing to /vsistdout/ def test_gif_9(): src_ds = gdal.Open('data/byte.tif') ds = gdal.GetDriverByName('GIF').CreateCopy( '/vsistdout_redirect//vsimem/tmp.gif', src_ds) assert ds.GetRasterBand(1).Checksum() == 0 src_ds = None ds = None ds = gdal.Open('/vsimem/tmp.gif') assert ds is not None assert ds.GetRasterBand(1).Checksum() == 4672 gdal.Unlink('/vsimem/tmp.gif') ############################################################################### # Test interlacing def test_gif_10(): tst = gdaltest.GDALTest('GIF', 'byte.tif', 1, 4672, options=['INTERLACING=YES']) return tst.testCreateCopy(vsimem=1) ############################################################################### # Cleanup. def test_gif_cleanup(): gdaltest.clean_tmp() gdalautotest-3.1.2/gdrivers/ilwis.py0000775000175000017500000001023113701060016016213 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ilwis.py 8e5eeb35bf76390e3134a4ea7076dab7d478ea0e 2018-11-14 22:55:13 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test ILWIS format driver. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2005, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Perform simple read test. def test_ilwis_1(): tst = gdaltest.GDALTest('ilwis', 'LanduseSmall.mpr', 1, 2351) srs = """PROJCS["UTM", GEOGCS["PSAD56", DATUM["Provisional_South_American_Datum_1956", SPHEROID["International 1924",6378388,297, AUTHORITY["EPSG","7022"]], AUTHORITY["EPSG","6248"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4248"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-69], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",10000000], UNIT["Meter",1], AXIS["Easting",EAST], AXIS["Northing",NORTH]]""" gt = (795480, 20, 0, 8090520, 0, -20) return tst.testOpen(check_gt=gt, check_prj=srs) ############################################################################### # copy byte data and verify. def test_ilwis_2(): tst = gdaltest.GDALTest('ilwis', 'byte.tif', 1, 4672) return tst.testCreateCopy(check_srs=1, check_gt=1, new_filename='tmp/byte.mpr') ############################################################################### # copy floating point data and use Create interface. def test_ilwis_3(): tst = gdaltest.GDALTest('ilwis', 'float.img', 1, 23529) return tst.testCreate(new_filename='tmp/float.mpr', out_bands=1) ############################################################################### # Try multi band dataset. def test_ilwis_4(): tst = gdaltest.GDALTest('ilwis', 'rgbsmall.tif', 2, 21053) return tst.testCreate(new_filename='tmp/rgb.mpl', check_minmax=0, out_bands=3) ############################################################################### # Test vsi in-memory support. def test_ilwis_5(): tst = gdaltest.GDALTest('ilwis', 'byte.tif', 1, 4672) return tst.testCreateCopy(check_srs=1, check_gt=1, vsimem=1, new_filename='/vsimem/ilwis/byte.mpr') ############################################################################### # Cleanup. # # Currently the ILWIS driver does not keep track of the files that are # part of the dataset properly, so we can't automatically clean them up # properly. So we do the brute force approach... def test_ilwis_cleanup(): gdaltest.clean_tmp() gdalautotest-3.1.2/gdrivers/gribmultidim.py0000775000175000017500000001447513701060016017572 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: gribmultidim.py e6284bde94350861610502db9ebf3440c4c15051 2020-02-25 21:23:13 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test multidimensional support in GRIB driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import pytest import struct pytestmark = pytest.mark.require_driver('GRIB') ############################################################################### def test_grib_multidim_grib2_3d_same_ref_time_different_forecast_time(): ds = gdal.OpenEx('data/grib/ds.mint.bin', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg assert not rg.GetGroupNames() assert not rg.OpenGroup('non_existing') assert rg.GetMDArrayNames() == ['Y', 'X', 'TIME', 'MinT_0-SFC'] assert not rg.OpenMDArray('non_existing') dims = rg.GetDimensions() assert len(dims) == 3 ar = rg.OpenMDArray('MinT_0-SFC') assert ar attrs = ar.GetAttributes() assert len(attrs) == 13 assert ar.GetAttribute('name').Read() == 'MinT' assert ar.GetAttribute('long_name').Read() == 'Minimum temperature [C]' assert ar.GetAttribute('first_level').Read() == '0-SFC' assert ar.GetAttribute('discipline_code').Read() == 0 assert ar.GetAttribute('discipline_name').Read() == 'Meteorological' assert ar.GetAttribute('center_code').Read() == 8 assert ar.GetAttribute('center_name').Read() == 'US-NWSTG' assert ar.GetAttribute('signification_of_ref_time').Read() == 'Start of Forecast' assert ar.GetAttribute('reference_time_iso8601').Read() == '2008-02-21T17:00:00Z' assert ar.GetAttribute('production_status').Read() == 'Operational' assert ar.GetAttribute('type').Read() == 'Forecast' assert ar.GetAttribute('product_definition_template_number').Read() == 8 assert ar.GetAttribute('product_definition_numbers').Read() == ( 0, 5, 2, 0, 0, 255, 255, 1, 19, 1, 0, 0, 255, 4294967295, 2147483649, 2008, 2, 22, 12, 0, 0, 1, 0, 3, 255, 1, 12, 1, 0) dims = ar.GetDimensions() assert len(dims) == 3 assert dims[0].GetFullName() == '/TIME' assert dims[0].GetSize() == 2 assert struct.unpack('d' * 2, dims[0].GetIndexingVariable().Read()) == pytest.approx((1203681600.0, 1203768000.0)) assert dims[1].GetFullName() == '/Y' assert dims[1].GetSize() == 129 assert struct.unpack('d' * 129, dims[1].GetIndexingVariable().Read())[0:2] == pytest.approx((1784311.461394906, 1786811.461394906)) assert dims[2].GetFullName() == '/X' assert dims[2].GetSize() == 177 assert struct.unpack('d' * 177, dims[2].GetIndexingVariable().Read())[0:2] == pytest.approx((-7125887.299303299, -7123387.299303299)) assert ar.GetSpatialRef() assert ar.GetUnit() == 'C' assert ar.GetNoDataValueAsDouble() == 9999 data = ar.Read() assert len(data) == 2 * 129 * 177 * 8 data = struct.unpack('d' * 2 * 129 * 177, data) assert data[0] == 9999 assert data[20 * 177 + 20] == 24.950006103515648 data = ar.Read(buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_Float32)) assert len(data) == 2 * 129 * 177 * 4 data = struct.unpack('f' * 2 * 129 * 177, data) assert data[0] == 9999 assert data[20 * 177 + 20] == struct.unpack('f', struct.pack('f', 24.950006103515648))[0] ############################################################################### def test_grib_multidim_grib1_2d(): ds = gdal.OpenEx('data/grib/Sample_QuikSCAT.grb', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg assert not rg.GetGroupNames() assert not rg.OpenGroup('non_existing') assert rg.GetMDArrayNames() == ['Y', 'X', 'CRAIN_0-SFC', 'USCT_0-SFC', 'VSCT_0-SFC', 'TSEC_0-SFC'] dims = rg.GetDimensions() assert len(dims) == 2 ar = rg.OpenMDArray('CRAIN_0-SFC') assert ar dims = ar.GetDimensions() assert len(dims) == 2 assert dims[0].GetFullName() == '/Y' assert dims[0].GetSize() == 74 assert dims[1].GetFullName() == '/X' assert dims[1].GetSize() == 66 data = ar.Read() assert len(data) == 74 * 66 * 8 data = struct.unpack('d' * 74 * 66, data) assert data[0] == 0 assert data[20] == 9999 data = ar.Read(buffer_datatype = gdal.ExtendedDataType.Create(gdal.GDT_Float32)) assert len(data) == 74 * 66 * 4 data = struct.unpack('f' * 74 * 66, data) assert data[0] == 0 assert data[20] == 9999 ############################################################################### # This file has different raster sizes for some of the products. def test_grib_multidim_different_sizes_messages(): ds = gdal.OpenEx('data/grib/bug3246.grb', gdal.OF_MULTIDIM_RASTER) assert ds rg = ds.GetRootGroup() assert rg assert rg.GetMDArrayNames() == [ 'Y', 'X', 'UOGRD_1-SFC', 'VOGRD_1-SFC', 'Y2', 'X2', 'PRMSL_0-MSL', 'UGRD_10-HTGL', 'VGRD_10-HTGL', 'Y3', 'X3', 'HTSGW_1-SFC', 'WVPER_1-SFC', 'WVDIR_1-SFC', 'PERPW_1-SFC', 'DIRPW_1-SFC', 'PERSW_1-SFC', 'DIRSW_1-SFC'] dims = rg.GetDimensions() assert len(dims) == 6 gdalautotest-3.1.2/gdrivers/rl2.py0000775000175000017500000004471713701060016015603 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: rl2.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for SQLite RasterLite2 driver. # Author: Even Rouault, # ############################################################################### # Copyright (c) 2016, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal, ogr import gdaltest import pytest ############################################################################### # Get the rl2 driver def test_rl2_1(): gdaltest.rl2_drv = gdal.GetDriverByName('SQLite') if gdaltest.rl2_drv is None: pytest.skip() if gdaltest.rl2_drv.GetMetadataItem('DCAP_RASTER') is None: gdaltest.rl2_drv = None pytest.skip() ############################################################################### # Test opening a rl2 DB gray level def test_rl2_2(): if gdaltest.rl2_drv is None: pytest.skip() ds = gdal.Open('data/byte.rl2') assert ds.RasterCount == 1, 'expected 1 band' assert ds.GetRasterBand(1).GetOverviewCount() == 0, 'did not expect overview' cs = ds.GetRasterBand(1).Checksum() assert cs == 4672 gt = ds.GetGeoTransform() expected_gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-15) wkt = ds.GetProjectionRef() assert '26711' in wkt assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex assert ds.GetRasterBand(1).GetMinimum() == 74 assert ds.GetRasterBand(1).GetOverview(-1) is None assert ds.GetRasterBand(1).GetOverview(0) is None subds = ds.GetSubDatasets() expected_subds = [] assert subds == expected_subds gdal.SetConfigOption('RL2_SHOW_ALL_PYRAMID_LEVELS', 'YES') ds = gdal.Open('data/byte.rl2') gdal.SetConfigOption('RL2_SHOW_ALL_PYRAMID_LEVELS', None) cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 1087 ############################################################################### # Test opening a rl2 DB gray level def test_rl2_3(): if gdaltest.rl2_drv is None: pytest.skip() ds = gdal.Open('data/small_world.rl2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand ds.GetRasterBand(1).GetNoDataValue() cs = ds.GetRasterBand(1).Checksum() assert cs == 25550 cs = ds.GetRasterBand(2).Checksum() assert cs == 28146 assert ds.GetRasterBand(1).GetOverviewCount() == 2 cs = ds.GetRasterBand(1).GetOverview(1).Checksum() assert cs == 51412 subds = ds.GetSubDatasets() expected_subds = [('RASTERLITE2:data/small_world.rl2:small_world:1:world_west', 'Coverage small_world, section world_west / 1'), ('RASTERLITE2:data/small_world.rl2:small_world:2:world_east', 'Coverage small_world, section world_east / 2')] assert subds == expected_subds ds = gdal.Open('RASTERLITE2:data/small_world.rl2:small_world:1:world_west') cs = ds.GetRasterBand(1).Checksum() assert cs == 3721 assert ds.GetRasterBand(1).GetOverviewCount() == 1 cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 35686 ############################################################################### # Test opening a rl2 DB paletted def test_rl2_4(): if gdaltest.rl2_drv is None: pytest.skip() ds = gdal.Open('data/small_world_pct.rl2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_PaletteIndex cs = ds.GetRasterBand(1).Checksum() assert cs == 14890 pct = ds.GetRasterBand(1).GetColorTable() assert pct.GetCount() == 256 assert pct.GetColorEntry(1) == (176, 184, 176, 255) pct = ds.GetRasterBand(1).GetColorTable() assert pct.GetCount() == 256 cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs == 35614 ############################################################################### # Test opening a rl2 DB with various data types def test_rl2_5(): if gdaltest.rl2_drv is None: pytest.skip() ds = gdal.Open('data/multi_type.rl2') subds = ds.GetSubDatasets() expected_subds = [('RASTERLITE2:data/multi_type.rl2:uint8', 'Coverage uint8'), ('RASTERLITE2:data/multi_type.rl2:int8', 'Coverage int8'), ('RASTERLITE2:data/multi_type.rl2:uint16', 'Coverage uint16'), ('RASTERLITE2:data/multi_type.rl2:int16', 'Coverage int16'), ('RASTERLITE2:data/multi_type.rl2:uint32', 'Coverage uint32'), ('RASTERLITE2:data/multi_type.rl2:int32', 'Coverage int32'), ('RASTERLITE2:data/multi_type.rl2:float', 'Coverage float'), ('RASTERLITE2:data/multi_type.rl2:double', 'Coverage double'), ('RASTERLITE2:data/multi_type.rl2:1bit', 'Coverage 1bit'), ('RASTERLITE2:data/multi_type.rl2:2bit', 'Coverage 2bit'), ('RASTERLITE2:data/multi_type.rl2:4bit', 'Coverage 4bit')] assert subds == expected_subds tests = [('RASTERLITE2:data/multi_type.rl2:uint8', gdal.GDT_Byte, 4672), ('RASTERLITE2:data/multi_type.rl2:int8', gdal.GDT_Byte, 4575), ('RASTERLITE2:data/multi_type.rl2:uint16', gdal.GDT_UInt16, 4457), ('RASTERLITE2:data/multi_type.rl2:int16', gdal.GDT_Int16, 4457), ('RASTERLITE2:data/multi_type.rl2:uint32', gdal.GDT_UInt32, 4457), ('RASTERLITE2:data/multi_type.rl2:int32', gdal.GDT_Int32, 4457), ('RASTERLITE2:data/multi_type.rl2:float', gdal.GDT_Float32, 4457), ('RASTERLITE2:data/multi_type.rl2:double', gdal.GDT_Float64, 4457), ('RASTERLITE2:data/multi_type.rl2:1bit', gdal.GDT_Byte, 4873)] for (subds_name, dt, expected_cs) in tests: ds = gdal.Open(subds_name) assert ds.GetRasterBand(1).DataType == dt, subds_name cs = ds.GetRasterBand(1).Checksum() assert cs == expected_cs if subds_name == 'RASTERLITE2:data/multi_type.rl2:int8': assert ds.GetRasterBand(1).GetMetadataItem('PIXELTYPE', 'IMAGE_STRUCTURE') == 'SIGNEDBYTE' ############################################################################### # Test CreateCopy() on a grayscale uint8 def test_rl2_6(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test CreateCopy() on a RGB def test_rl2_7(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'small_world.tif', 1, 30111, options=['COMPRESS=PNG']) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a paletted dataset def test_rl2_8(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'small_world_pct.tif', 1, 14890, options=['COMPRESS=PNG']) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test CreateCopy() on a DATAGRID uint16 def test_rl2_9(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/uint16.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a DATAGRID int16 def test_rl2_10(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/int16.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a DATAGRID uint32 def test_rl2_11(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/uint32.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a DATAGRID int32 def test_rl2_12(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/int32.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a DATAGRID float def test_rl2_13(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/float32.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a DATAGRID double def test_rl2_14(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/float64.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Test CreateCopy() on a 1 bit paletted def test_rl2_15(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', '../../gcore/data/1bit.bmp', 1, 200) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test CreateCopy() on a forced 1 bit def test_rl2_16(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'byte.tif', 1, 4873, options=['NBITS=1', 'COMPRESS=CCITTFAX4']) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test CreateCopy() on a forced 2 bit def test_rl2_17(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'byte.tif', 1, 4873, options=['NBITS=2', 'COMPRESS=DEFLATE']) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test CreateCopy() on a forced 4 bit def test_rl2_18(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'byte.tif', 1, 2541, options=['NBITS=4']) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test CreateCopy() with forced monochrome def test_rl2_19(): if gdaltest.rl2_drv is None: pytest.skip() tst = gdaltest.GDALTest('SQLite', 'byte.tif', 1, 4873, options=['PIXEL_TYPE=MONOCHROME']) return tst.testCreateCopy(vsimem=1, check_minmax=False) ############################################################################### # Test incompatibilities on CreateCopy() # Se https://www.gaia-gis.it/fossil/librasterlite2/wiki?name=reference_table def test_rl2_20(): if gdaltest.rl2_drv is None: pytest.skip() tests = [('MONOCHROME', 2, gdal.GDT_Byte, 'NONE', None, None), ('MONOCHROME', 1, gdal.GDT_UInt16, 'NONE', None, None), ('PALETTE', 1, gdal.GDT_Byte, 'NONE', None, None), ('PALETTE', 1, gdal.GDT_UInt16, 'NONE', None, gdal.ColorTable()), ('GRAYSCALE', 2, gdal.GDT_Byte, 'NONE', None, None), ('GRAYSCALE', 1, gdal.GDT_UInt16, 'NONE', None, None), ('RGB', 1, gdal.GDT_Byte, 'NONE', None, None), ('RGB', 3, gdal.GDT_Int16, 'NONE', None, None), ('MULTIBAND', 1, gdal.GDT_Byte, 'NONE', None, None), ('MULTIBAND', 256, gdal.GDT_Byte, 'NONE', None, None), ('MULTIBAND', 2, gdal.GDT_Int16, 'NONE', None, None), ('DATAGRID', 2, gdal.GDT_Byte, 'NONE', None, None), ('DATAGRID', 1, gdal.GDT_CFloat32, 'NONE', None, None), ('MONOCHROME', 1, gdal.GDT_Byte, 'JPEG', None, None), ('PALETTE', 1, gdal.GDT_Byte, 'JPEG', None, gdal.ColorTable()), ('GRAYSCALE', 1, gdal.GDT_Byte, 'CCITTFAX4', None, None), ('RGB', 3, gdal.GDT_Byte, 'CCITTFAX4', None, None), ('RGB', 3, gdal.GDT_UInt16, 'JPEG', None, None), ('MULTIBAND', 3, gdal.GDT_Byte, 'CCITTFAX4', None, None), ('MULTIBAND', 3, gdal.GDT_UInt16, 'CCITTFAX4', None, None), ('MULTIBAND', 2, gdal.GDT_Byte, 'CCITTFAX4', None, None), ('DATAGRID', 1, gdal.GDT_Byte, 'CCITTFAX4', None, None), ('DATAGRID', 1, gdal.GDT_Int16, 'CCITTFAX4', None, None), ] for (pixel_type, band_count, dt, compress, nbits, pct) in tests: src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, band_count, dt) if pct is not None: src_ds.GetRasterBand(1).SetColorTable(pct) if nbits is not None: src_ds.GetRasterBand(1).SetMetadataItem('NBITS', nbits, 'IMAGE_STRUCTURE') options = ['PIXEL_TYPE=' + pixel_type, 'COMPRESS=' + compress] with gdaltest.error_handler(): out_ds = gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_20.rl2', src_ds, options=options) assert out_ds is None, \ ('Expected error for %s, band=%d, dt=%d, %s, nbits=%s' % (pixel_type, band_count, dt, compress, nbits)) gdal.Unlink('/vsimem/rl2_20.rl2') ############################################################################### # Test compression methods def test_rl2_21(): if gdaltest.rl2_drv is None: pytest.skip() tests = [('DEFLATE', None), ('LZMA', None), ('PNG', None), ('JPEG', None), ('JPEG', 50), ('JPEG', 100), ('WEBP', None), ('WEBP', 50), ('WEBP', 100), ('CHARLS', None), ('JPEG2000', None), ('JPEG2000', 50), ('JPEG2000', 100)] src_ds = gdal.Open('data/byte.tif') for (compress, quality) in tests: if gdaltest.rl2_drv.GetMetadataItem('DMD_CREATIONOPTIONLIST').find(compress) < 0: print('Skipping test of %s, since it is not available in the run-time librasterlite2' % compress) continue options = ['COMPRESS=' + compress] if quality is not None: options += ['QUALITY=' + str(quality)] out_ds = gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_21.rl2', src_ds, options=options) assert out_ds is not None, \ ('Got error with %s, quality=%d' % (compress, quality)) assert out_ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE').find(compress) >= 0, \ ('Compression %s does not seem to have been applied' % compress) gdal.Unlink('/vsimem/rl2_21.rl2') ############################################################################### # Test APPEND_SUBDATASET def test_rl2_22(): if gdaltest.rl2_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/rl2_22.rl2', options=['SPATIALITE=YES']) ds.CreateLayer('foo', None, ogr.wkbPoint) ds = None ds = gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_22.rl2', src_ds, options=['APPEND_SUBDATASET=YES', 'COVERAGE=byte']) assert ds.GetRasterBand(1).Checksum() == 4672 ds = None ds = gdal.OpenEx('/vsimem/rl2_22.rl2') assert ds.RasterXSize == 20 assert ds.GetLayerCount() == 1 left_ds = gdal.Translate('left', src_ds, srcWin=[0, 0, 10, 20], format='MEM') right_ds = gdal.Translate('', src_ds, srcWin=[10, 0, 10, 20], format='MEM') gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_22.rl2', left_ds, options=['COVERAGE=left_right']) ds = gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_22.rl2', right_ds, options=['APPEND_SUBDATASET=YES', 'COVERAGE=left_right', 'SECTION=right']) assert ds.GetRasterBand(1).Checksum() == 4672 src_ds = gdal.Open('data/rgbsmall.tif') ds = gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_22.rl2', src_ds, options=['APPEND_SUBDATASET=YES', 'COVERAGE=rgbsmall']) assert ds.GetRasterBand(1).Checksum() == src_ds.GetRasterBand(1).Checksum() ds = None gdal.Unlink('/vsimem/rl2_22.rl2') ############################################################################### # Test BuildOverviews def test_rl2_23(): if gdaltest.rl2_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') src_ds = gdal.Translate('', src_ds, format='MEM', width=2048, height=2048) ds = gdaltest.rl2_drv.CreateCopy('/vsimem/rl2_23.rl2', src_ds) ret = ds.BuildOverviews('NEAR', [2]) assert ret == 0 assert ds.GetRasterBand(1).GetOverviewCount() == 5 cs = ds.GetRasterBand(1).GetOverview(0).Checksum() assert cs != 0 ret = ds.BuildOverviews('NONE', []) assert ret == 0 ds = gdal.Open('/vsimem/rl2_23.rl2') assert ds.GetRasterBand(1).GetOverviewCount() != 5 ds = None gdal.Unlink('/vsimem/rl2_23.rl2') ############################################################################### # Test opening a .rl2.sql file def test_rl2_24(): if gdaltest.rl2_drv is None: pytest.skip() if gdal.GetDriverByName('SQLite').GetMetadataItem("ENABLE_SQL_SQLITE_FORMAT") != 'YES': pytest.skip() ds = gdal.Open('data/byte.rl2.sql') assert ds.GetRasterBand(1).Checksum() == 4672, 'validation failed' ############################################################################### # Test Create() def test_rl2_error_create(): if gdaltest.rl2_drv is None: pytest.skip() with gdaltest.error_handler(): assert gdaltest.rl2_drv.Create('/vsimem/out.db', 1, 1) is None gdalautotest-3.1.2/gdrivers/vrtpansharpen.py0000775000175000017500000022526613701060016017777 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: vrtpansharpen.py 685b96644b37dcd526ccb68cbb763f67a4108800 2020-03-20 17:27:19 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test VRTPansharpenedDataset support. # Author: Even Rouault # ############################################################################### # Copyright (c) 2015, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import shutil from osgeo import gdal import pytest ############################################################################### # Error cases def test_vrtpansharpen_1(): src_ds = gdal.Open('data/small_world.tif') src_data = src_ds.GetRasterBand(1).ReadRaster() gt = src_ds.GetGeoTransform() wkt = src_ds.GetProjectionRef() src_ds = None pan_ds = gdal.GetDriverByName('GTiff').Create('tmp/small_world_pan.tif', 800, 400) gt = [gt[i] for i in range(len(gt))] gt[1] *= 0.5 gt[5] *= 0.5 pan_ds.SetGeoTransform(gt) pan_ds.SetProjection(wkt) pan_ds.GetRasterBand(1).WriteRaster(0, 0, 800, 400, src_data, 400, 200) pan_ds = None # Missing PansharpeningOptions gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue """) gdal.PopErrorHandler() assert vrt_ds is None # PanchroBand missing gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # PanchroBand.SourceFilename missing gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Invalid dataset name gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 /does/not/exist 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Inconsistent declared VRT dimensions with panchro dataset. gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # VRTRasterBand of unrecognized subclass 'blabla' gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Algorithm unsupported_alg unsupported gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue unsupported_alg 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # 10 invalid band of tmp/small_world_pan.tif gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 10 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # SpectralBand.dstBand = '-1' invalid gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # SpectralBand.SourceFilename missing gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Invalid dataset name gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 /does/not/exist 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # 10 invalid band of data/small_world.tif gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 10 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Another spectral band is already mapped to output band 1 gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # No spectral band defined gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 """) gdal.PopErrorHandler() assert vrt_ds is None # Hole in SpectralBand.dstBand numbering gdal.PushErrorHandler() vrt_ds = gdal.Open(""" WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Band 4 of type VRTPansharpenedRasterBand, but no corresponding SpectralBand gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # SpectralBand.dstBand = '3' invalid gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # 2 weights defined, but 3 input spectral bands gdal.PushErrorHandler() vrt_ds = gdal.Open(""" Red Green Blue WeightedBrovey 0.33333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is None # Dimensions of input spectral band 1 different from first spectral band gdal.PushErrorHandler() vrt_ds = gdal.Open(""" tmp/small_world_pan.tif 1 data/small_world.tif 1 tmp/small_world_pan.tif 1 """) gdal.PopErrorHandler() assert vrt_ds is None # Just warnings # Warning 1: Pan dataset and data/byte.tif do not seem to have same projection. Results might be incorrect # Georeferencing of top-left corner of pan dataset and data/byte.tif do not match # Georeferencing of bottom-right corner of pan dataset and data/byte.tif do not match gdal.ErrorReset() gdal.PushErrorHandler() vrt_ds = gdal.Open(""" None tmp/small_world_pan.tif 1 data/byte.tif 1 """) gdal.PopErrorHandler() assert vrt_ds is not None assert gdal.GetLastErrorMsg() != '' # Just warnings # No spectral band is mapped to an output band # No output pansharpened band defined gdal.ErrorReset() gdal.PushErrorHandler() vrt_ds = gdal.Open(""" WeightedBrovey 0.33333,0.333333,0.333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) gdal.PopErrorHandler() assert vrt_ds is not None assert gdal.GetLastErrorMsg() != '' # Unsupported gdal.PushErrorHandler() ret = vrt_ds.AddBand(gdal.GDT_Byte) gdal.PopErrorHandler() assert ret != 0 ############################################################################### # Nominal cases def test_vrtpansharpen_2(): shutil.copy('data/small_world.tif', 'tmp/small_world.tif') # Super verbose case vrt_ds = gdal.Open(""" GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1.8000000000000000e+02, 4.5000000000000001e-01, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.5000000000000001e-01 Red Green Blue WeightedBrovey 0.33333333333333333,0.33333333333333333,0.33333333333333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) assert vrt_ds is not None assert vrt_ds.GetFileList() == ['tmp/small_world_pan.tif', 'data/small_world.tif'] assert vrt_ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') is None cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([4735, 10000, 9742], [4731, 9991, 9734]) assert vrt_ds.GetRasterBand(1).GetOverviewCount() == 0 assert vrt_ds.GetRasterBand(1).GetOverview(-1) is None assert vrt_ds.GetRasterBand(1).GetOverview(0) is None # Check VRTPansharpenedDataset::IRasterIO() in non-resampling case data = vrt_ds.ReadRaster() tmp_ds = gdal.GetDriverByName('MEM').Create('', 800, 400, 3) tmp_ds.WriteRaster(0, 0, 800, 400, data) cs = [tmp_ds.GetRasterBand(i + 1).Checksum() for i in range(tmp_ds.RasterCount)] assert cs in ([4735, 10000, 9742], [4731, 9991, 9734]) # Check VRTPansharpenedDataset::IRasterIO() in resampling case data = vrt_ds.ReadRaster(0, 0, 800, 400, 400, 200) ref_data = tmp_ds.ReadRaster(0, 0, 800, 400, 400, 200) assert data == ref_data # Compact case vrt_ds = gdal.Open(""" tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) assert vrt_ds is not None cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([4735, 10000, 9742], [4731, 9991, 9734]) # Expose pan band too vrt_ds = gdal.Open(""" GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1.8000000000000000e+02, 4.5000000000000001e-01, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.5000000000000001e-01 tmp/small_world_pan.tif 1 Red Green Blue WeightedBrovey 0.33333333333333333,0.33333333333333333,0.33333333333333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) assert vrt_ds is not None # gdal.GetDriverByName('GTiff').CreateCopy('out1.tif', vrt_ds) cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([50261, 4735, 10000, 9742], [50261, 4731, 9991, 9734]) # Same, but everything scrambled, and with spectral bands not in # the same dataset vrt_ds = gdal.Open(""" GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1.8000000000000000e+02, 4.5000000000000001e-01, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.5000000000000001e-01 tmp/small_world_pan.tif 1 Red Green Blue WeightedBrovey 0.33333333333333333,0.33333333333333333,0.33333333333333333 Cubic ALL_CPUS 8 tmp/small_world_pan.tif 1 data/small_world.tif 2 data/small_world.tif 1 tmp/small_world.tif 3 """) assert vrt_ds is not None # gdal.GetDriverByName('GTiff').CreateCopy('out2.tif', vrt_ds) cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([50261, 4735, 10000, 9742], [50261, 4727, 9998, 9732]) ############################################################################### # Test with overviews def test_vrtpansharpen_3(): ds = gdal.Open('tmp/small_world_pan.tif') ds.BuildOverviews('CUBIC', [2]) ds = None xml = """ tmp/small_world_pan.tif 1 tmp/small_world.tif 1 tmp/small_world.tif 2 tmp/small_world.tif 3 """ # Test when only Pan band has overviews vrt_ds = gdal.Open(xml) assert vrt_ds.GetRasterBand(1).GetOverviewCount() == 1 assert vrt_ds.GetRasterBand(1).GetOverview(0) is not None cs = [vrt_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([7123, 7445, 5025], [7120, 7440, 5025]) # Check VRTPansharpenedDataset::IRasterIO() in resampling case with overviews data = vrt_ds.ReadRaster(0, 0, 800, 400, 400, 200) data2 = vrt_ds.GetRasterBand(1).ReadRaster(0, 0, 800, 400, 400, 200) data2 += vrt_ds.GetRasterBand(2).ReadRaster(0, 0, 800, 400, 400, 200) data2 += vrt_ds.GetRasterBand(3).ReadRaster(0, 0, 800, 400, 400, 200) assert data == data2 tmp_ds = gdal.GetDriverByName('MEM').Create('', 400, 200, 3) tmp_ds.WriteRaster(0, 0, 400, 200, data) cs = [tmp_ds.GetRasterBand(i + 1).Checksum() for i in range(tmp_ds.RasterCount)] assert cs in ([7123, 7445, 5025], [7120, 7440, 5025]) vrt_ds = None ds = gdal.Open('tmp/small_world.tif') ds.BuildOverviews('CUBIC', [2]) ds = None # Test when both Pan and spectral bands have overviews vrt_ds = gdal.Open(xml) assert vrt_ds.GetRasterBand(1).GetOverviewCount() == 1 assert vrt_ds.GetRasterBand(1).GetOverview(0) is not None cs = [vrt_ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([18033, 18395, 16824], [18033, 18395, 16822]) vrt_ds = None ############################################################################### # Test RasterIO() with various buffer datatypes def test_vrtpansharpen_4(): xml = """ tmp/small_world_pan.tif 1 tmp/small_world.tif 1 tmp/small_world.tif 2 tmp/small_world.tif 3 """ vrt_ds = gdal.Open(xml) for dt in [gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CFloat64]: data = vrt_ds.GetRasterBand(1).ReadRaster(buf_type=dt) tmp_ds = gdal.GetDriverByName('MEM').Create('', 800, 400, 1, dt) tmp_ds.WriteRaster(0, 0, 800, 400, data) cs = tmp_ds.GetRasterBand(1).Checksum() if dt == gdal.GDT_CFloat64: expected_cs = [4724, 4720] else: expected_cs = [4735, 4731] assert cs in expected_cs, gdal.GetDataTypeName(dt) ############################################################################### # Test RasterIO() with various band datatypes def test_vrtpansharpen_5(): for dt in [gdal.GDT_Int16, gdal.GDT_UInt16, gdal.GDT_Int32, gdal.GDT_UInt32, gdal.GDT_Float32, gdal.GDT_Float64, gdal.GDT_CFloat64]: spectral_xml = """ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1.8000000000000000e+02, 9.0000000000000002e-01, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -9.0000000000000002e-01 Red data/small_world.tif 1 Green data/small_world.tif 2 Blue data/small_world.tif 3 """ % (gdal.GetDataTypeName(dt), gdal.GetDataTypeName(dt), gdal.GetDataTypeName(dt)) xml = """ GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1.8000000000000000e+02, 4.5000000000000001e-01, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -4.5000000000000001e-01 tmp/small_world_pan.tif 1 ]]> 1 1 2 3 """ % (gdal.GetDataTypeName(dt), spectral_xml, spectral_xml, spectral_xml) vrt_ds = gdal.Open(xml) data = vrt_ds.GetRasterBand(1).ReadRaster(buf_type=gdal.GDT_Byte) tmp_ds = gdal.GetDriverByName('MEM').Create('', 800, 400, 1) tmp_ds.WriteRaster(0, 0, 800, 400, data) cs = tmp_ds.GetRasterBand(1).Checksum() if dt == gdal.GDT_UInt16: assert cs in (4553, 4549), gdal.GetDataTypeName(dt) else: assert cs == 4450, gdal.GetDataTypeName(dt) ############################################################################### # Test BitDepth limitations def test_vrtpansharpen_6(): try: from osgeo import gdalnumeric gdalnumeric.zeros import numpy except (ImportError, AttributeError): pytest.skip() # i = 0: VRT has 7 # i = 1: bands have NBITS=7 and VRT 7 # i = 2: bands have NBITS=7 for dt in [gdal.GDT_Byte, gdal.GDT_UInt16]: if dt == gdal.GDT_Byte: nbits = 7 elif dt == gdal.GDT_UInt16: nbits = 12 else: nbits = 17 for i in range(3): if i > 0: options = ['NBITS=%d' % nbits] else: options = [] mem_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ms.tif', 4, 1, 1, dt, options=options) ar = numpy.array([[80, 125, 125, 80]]) if dt == gdal.GDT_UInt16: ar = ar << (12 - 7) elif dt == gdal.GDT_UInt32: ar = ar << (17 - 7) mem_ds.GetRasterBand(1).WriteArray(ar) mem_ds = None mem_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/pan.tif', 8, 2, 1, dt, options=options) ar = numpy.array([[76, 89, 115, 127, 127, 115, 89, 76], [76, 89, 115, 127, 127, 115, 89, 76]]) if dt == gdal.GDT_UInt16: ar = ar << (12 - 7) elif dt == gdal.GDT_UInt32: ar = ar << (17 - 7) mem_ds.GetRasterBand(1).WriteArray(ar) mem_ds = None xml = """ """ if i < 2: xml += """ %d""" % nbits xml += """ 0.8 /vsimem/pan.tif 1 /vsimem/ms.tif 1 """ vrt_ds = gdal.Open(xml) assert vrt_ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == str(nbits) ar = vrt_ds.GetRasterBand(1).ReadAsArray() if dt == gdal.GDT_Byte: expected_ar = [95, 111, 127, 127, 127, 127, 111, 95] elif dt == gdal.GDT_UInt16: expected_ar = [3040, 3560, 4095, 4095, 4095, 4095, 3560, 3040] else: expected_ar = [97280, 113920, 131071, 131071, 131071, 131071, 113920, 97280] if list(ar[0]) != expected_ar: print(gdal.GetDataTypeName(dt)) pytest.fail(i) vrt_ds = None gdal.Unlink('/vsimem/ms.tif') gdal.Unlink('/vsimem/pan.tif') ############################################################################### # Test bands with different extents def test_vrtpansharpen_7(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrtpansharpen_7_pan.tif', 20, 40) ds.SetGeoTransform([120, 1, 0, 80, 0, -1]) ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrtpansharpen_7_ms.tif', 15, 30) ds.SetGeoTransform([100, 2, 0, 100, 0, -2]) ds = None xml = """ /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ ds = gdal.Open(xml) assert ds.GetGeoTransform() == (100.0, 1.0, 0.0, 100.0, 0.0, -1.0) and ds.RasterXSize == 40 and ds.RasterYSize == 60 ds = None xml = """ Union /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ ds = gdal.Open(xml) assert ds.GetGeoTransform() == (100.0, 1.0, 0.0, 100.0, 0.0, -1.0) and ds.RasterXSize == 40 and ds.RasterYSize == 60 ds = None xml = """ BlaBla /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ gdal.ErrorReset() gdal.PushErrorHandler() ds = gdal.Open(xml) gdal.PopErrorHandler() assert ds.GetGeoTransform() == (100.0, 1.0, 0.0, 100.0, 0.0, -1.0) and ds.RasterXSize == 40 and ds.RasterYSize == 60 assert gdal.GetLastErrorMsg() == '' ds = None xml = """ Intersection /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ ds = gdal.Open(xml) assert ds.GetGeoTransform() == (120.0, 1.0, 0.0, 80.0, 0.0, -1.0) and ds.RasterXSize == 10 and ds.RasterYSize == 40 ds = None xml = """ None /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ gdal.ErrorReset() gdal.PushErrorHandler() ds = gdal.Open(xml) gdal.PopErrorHandler() assert ds.GetGeoTransform() == (120.0, 1.0, 0.0, 80.0, 0.0, -1.0) and ds.RasterXSize == 20 and ds.RasterYSize == 40 assert gdal.GetLastErrorMsg() != '' ds = None xml = """ NoneWithoutWarning /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ gdal.ErrorReset() ds = gdal.Open(xml) assert ds.GetGeoTransform() == (120.0, 1.0, 0.0, 80.0, 0.0, -1.0) and ds.RasterXSize == 20 and ds.RasterYSize == 40 assert gdal.GetLastErrorMsg() == '' ds = None # Empty intersection ds = gdal.GetDriverByName('GTiff').Create('/vsimem/vrtpansharpen_7_ms.tif', 15, 30) ds.SetGeoTransform([-100, 2, 0, -100, 0, -2]) ds = None xml = """ Intersection /vsimem/vrtpansharpen_7_pan.tif /vsimem/vrtpansharpen_7_ms.tif """ gdal.PushErrorHandler() ds = gdal.Open(xml) gdal.PopErrorHandler() assert ds is None ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/vrtpansharpen_7_pan.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/vrtpansharpen_7_ms.tif') ############################################################################### # Test SerializeToXML() def test_vrtpansharpen_8(): xml = """ 123 small_world_pan.tif data/small_world.tif data/small_world.tif 2 """ open('tmp/vrtpansharpen_8.vrt', 'wt').write(xml) ds = gdal.Open('tmp/vrtpansharpen_8.vrt', gdal.GA_Update) expected_cs1 = ds.GetRasterBand(1).Checksum() expected_cs2 = ds.GetRasterBand(2).Checksum() expected_cs3 = ds.GetRasterBand(3).Checksum() # Force update ds.SetMetadata(ds.GetMetadata()) ds = None ds = gdal.Open('tmp/vrtpansharpen_8.vrt') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() cs3 = ds.GetRasterBand(3).Checksum() ds = None gdal.Unlink('tmp/vrtpansharpen_8.vrt') assert cs1 == expected_cs1 and cs2 == expected_cs2 and cs3 == expected_cs3 ############################################################################### # Test NoData support def test_vrtpansharpen_9(): # Explicit nodata vrt_ds = gdal.Open(""" 0 tmp/small_world_pan.tif 1 data/small_world.tif 1 data/small_world.tif 2 data/small_world.tif 3 """) assert vrt_ds is not None cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([6950, 11745, 8965],) # Implicit nodata ds = gdal.GetDriverByName('GTiff').Create('/vsimem/small_world_pan_nodata.tif', 800, 400) ds.GetRasterBand(1).SetNoDataValue(0) ds.WriteRaster(0, 0, 800, 400, gdal.Open('tmp/small_world_pan.tif').ReadRaster()) ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/small_world_nodata.tif', 400, 200, 3) ds.GetRasterBand(1).SetNoDataValue(0) ds.GetRasterBand(2).SetNoDataValue(0) ds.GetRasterBand(3).SetNoDataValue(0) ds.WriteRaster(0, 0, 400, 200, gdal.Open('data/small_world.tif').ReadRaster()) ds = None vrt_ds = gdal.Open(""" /vsimem/small_world_pan_nodata.tif 1 /vsimem/small_world_nodata.tif 1 /vsimem/small_world_nodata.tif 2 /vsimem/small_world_nodata.tif 3 """) assert vrt_ds is not None cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in ([6950, 11745, 8965],) gdal.Unlink('/vsimem/small_world_pan_nodata.tif') gdal.Unlink('/vsimem/small_world_nodata.tif') ############################################################################### # Test UInt16 optimizations def test_vrtpansharpen_10(): ds = gdal.GetDriverByName('GTiff').Create('/vsimem/pan.tif', 1023, 1023, 1, gdal.GDT_UInt16) ds.GetRasterBand(1).Fill(1000) ds = None ds = gdal.GetDriverByName('GTiff').Create('/vsimem/ms.tif', 256, 256, 4, gdal.GDT_UInt16) for i in range(4): ds.GetRasterBand(i + 1).Fill(1000) ds = None # 4 bands vrt_ds = gdal.Open(""" ALL_CPUS /vsimem/pan.tif 1 /vsimem/ms.tif 1 /vsimem/ms.tif 2 /vsimem/ms.tif 3 /vsimem/ms.tif 4 """) cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs == [62009, 62009, 62009, 62009] # Actually go through the optimized impl data = vrt_ds.ReadRaster() # And check data_int32 = vrt_ds.ReadRaster(buf_type=gdal.GDT_Int32) tmp_ds = gdal.GetDriverByName('MEM').Create('', vrt_ds.RasterXSize, vrt_ds.RasterYSize, vrt_ds.RasterCount, gdal.GDT_Int32) tmp_ds.WriteRaster(0, 0, vrt_ds.RasterXSize, vrt_ds.RasterYSize, data_int32) ref_data = tmp_ds.ReadRaster(buf_type=gdal.GDT_UInt16) assert data == ref_data # 4 bands -> 3 bands vrt_ds = gdal.Open(""" ALL_CPUS /vsimem/pan.tif 1 /vsimem/ms.tif 1 /vsimem/ms.tif 2 /vsimem/ms.tif 3 /vsimem/ms.tif 4 """) cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs == [62009, 62009, 62009] # Actually go through the optimized impl data = vrt_ds.ReadRaster() # And check data_int32 = vrt_ds.ReadRaster(buf_type=gdal.GDT_Int32) tmp_ds = gdal.GetDriverByName('MEM').Create('', vrt_ds.RasterXSize, vrt_ds.RasterYSize, vrt_ds.RasterCount, gdal.GDT_Int32) tmp_ds.WriteRaster(0, 0, vrt_ds.RasterXSize, vrt_ds.RasterYSize, data_int32) ref_data = tmp_ds.ReadRaster(buf_type=gdal.GDT_UInt16) assert data == ref_data # 3 bands vrt_ds = gdal.Open(""" ALL_CPUS /vsimem/pan.tif 1 /vsimem/ms.tif 1 /vsimem/ms.tif 2 /vsimem/ms.tif 3 """) cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs == [62009, 62009, 62009] # Actually go through the optimized impl data = vrt_ds.ReadRaster() # And check data_int32 = vrt_ds.ReadRaster(buf_type=gdal.GDT_Int32) tmp_ds = gdal.GetDriverByName('MEM').Create('', vrt_ds.RasterXSize, vrt_ds.RasterYSize, vrt_ds.RasterCount, gdal.GDT_Int32) tmp_ds.WriteRaster(0, 0, vrt_ds.RasterXSize, vrt_ds.RasterYSize, data_int32) ref_data = tmp_ds.ReadRaster(buf_type=gdal.GDT_UInt16) assert data == ref_data ############################################################################### # Test gdal.CreatePansharpenedVRT() def test_vrtpansharpen_11(): pan_ds = gdal.Open('tmp/small_world_pan.tif') ms_ds = gdal.Open('data/small_world.tif') vrt_ds = gdal.CreatePansharpenedVRT(""" """, pan_ds.GetRasterBand(1), [ms_ds.GetRasterBand(i + 1) for i in range(3)]) assert vrt_ds is not None cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in([4735, 10000, 9742], [4731, 9991, 9734]) # Also test with completely anonymous datasets pan_mem_ds = gdal.GetDriverByName('MEM').CreateCopy('', pan_ds) ms_mem_ds = gdal.GetDriverByName('MEM').CreateCopy('', ms_ds) pan_ds = None ms_ds = None vrt_ds = gdal.CreatePansharpenedVRT(""" """, pan_mem_ds.GetRasterBand(1), [ms_mem_ds.GetRasterBand(i + 1) for i in range(3)]) assert vrt_ds is not None cs = [vrt_ds.GetRasterBand(i + 1).Checksum() for i in range(vrt_ds.RasterCount)] assert cs in([4735, 10000, 9742], [4731, 9991, 9734]) vrt_ds = None # Check that wrapping with VRT works (when gt are not compatible) pan_mem_ds = gdal.GetDriverByName('MEM').Create('', 20, 40, 1) ms_mem_ds = gdal.GetDriverByName('MEM').Create('', 15, 30, 3) pan_mem_ds.SetGeoTransform([120, 1, 0, 80, 0, -1]) ms_mem_ds.SetGeoTransform([100, 2, 0, 100, 0, -2]) vrt_ds = gdal.CreatePansharpenedVRT(""" """, pan_mem_ds.GetRasterBand(1), [ms_mem_ds.GetRasterBand(i + 1) for i in range(3)]) assert vrt_ds.GetGeoTransform() == (100.0, 1.0, 0.0, 100.0, 0.0, -1.0) and vrt_ds.RasterXSize == 40 and vrt_ds.RasterYSize == 60 vrt_ds = None # Test error cases as well gdal.PushErrorHandler() vrt_ds = gdal.CreatePansharpenedVRT(""" """, pan_mem_ds.GetRasterBand(1), [ms_mem_ds.GetRasterBand(i + 1) for i in range(3)]) gdal.PopErrorHandler() assert vrt_ds is None # Too many bands gdal.PushErrorHandler() vrt_ds = gdal.CreatePansharpenedVRT(""" """, pan_mem_ds.GetRasterBand(1), [ms_mem_ds.GetRasterBand(i + 1) for i in range(3)]) gdal.PopErrorHandler() assert vrt_ds is None ############################################################################### # Test fix for https://github.com/OSGeo/gdal/issues/2328 def test_vrtpansharpen_nodata_multiple_spectral_bands(): gdal.Translate('/vsimem/b1.tif', 'data/small_world.tif') gdal.Translate('/vsimem/b2.tif', 'data/small_world.tif') vrt_ds = gdal.Open(""" 0 data/small_world.tif 1 /vsimem/b1.tif 1 /vsimem/b2.tif 1 """) assert vrt_ds gdal.Unlink('/vsimem/b1.tif') gdal.Unlink('/vsimem/b2.tif') ############################################################################### # Cleanup def test_vrtpansharpen_cleanup(): gdal.GetDriverByName('GTiff').Delete('tmp/small_world_pan.tif') gdal.GetDriverByName('GTiff').Delete('tmp/small_world.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/pan.tif') gdal.GetDriverByName('GTiff').Delete('/vsimem/ms.tif') gdalautotest-3.1.2/gdrivers/pnm.py0000775000175000017500000000540613701060016015666 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: pnm.py 9e44514bae62a67876af0212755582126993f2e0 2020-03-01 15:54:45 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: PNM (Portable Anyware Map) Testing. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2007, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import pytest ############################################################################### # Read Test grayscale (PGM) def test_pnm_1(): tst = gdaltest.GDALTest('PNM', 'byte.pgm', 1, 4672) return tst.testOpen() ############################################################################### # Write Test grayscale (PGM) def test_pnm_2(): tst = gdaltest.GDALTest('PNM', 'byte.pgm', 1, 4672) return tst.testCreateCopy(vsimem=1) ############################################################################### # Read Test RGB (PPM) def test_pnm_3(): tst = gdaltest.GDALTest('PNM', 'rgbsmall.ppm', 2, 21053) return tst.testOpen() ############################################################################### # Write Test RGB (PPM) def test_pnm_4(): tst = gdaltest.GDALTest('PNM', 'rgbsmall.ppm', 2, 21053) return tst.testCreateCopy() @pytest.mark.parametrize("nbands", [1, 3]) def test_pnm_write_non_standard_extension(nbands): gdal.ErrorReset() with gdaltest.error_handler(): gdal.GetDriverByName('PNM').Create('foo.foo', 1, 1, nbands) assert gdal.GetLastErrorType() != 0 gdal.Unlink('foo.foo') gdalautotest-3.1.2/gdrivers/pds.py0000775000175000017500000004266513701060016015672 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: pds.py 78dcb03e448c6b4e28d9835d73c80660c0184b11 2020-05-08 18:25:02 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for PDS driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal from osgeo import osr import gdaltest import pytest ############################################################################### # Read a truncated and modified version of http://download.osgeo.org/gdal/data/pds/mc02.img def test_pds_1(): tst = gdaltest.GDALTest('PDS', 'mc02_truncated.img', 1, 47151) expected_prj = """PROJCS["SIMPLE_CYLINDRICAL MARS",GEOGCS["GCS_MARS",DATUM["D_MARS",SPHEROID[""MARS"",3396000,0]],PRIMEM["Reference_Meridian",0],UNIT["degree",0.0174532925199433]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],PARAMETER["pseudo_standard_parallel_1",0],UNIT["metre",1]]""" expected_gt = (-10668384.903788566589355, 926.115274429321289, 0, 3852176.483988761901855, 0, -926.115274429321289) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', '-0.5') gdal.SetConfigOption('PDS_LineProjOffset_Shift', '-0.5') tst.testOpen(check_prj=expected_prj, check_gt=expected_gt) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', None) gdal.SetConfigOption('PDS_LineProjOffset_Shift', None) ############################################################################### # Read a truncated and modified version of ftp://pdsimage2.wr.usgs.gov/cdroms/magellan/mg_1103/fl78n018/fl73n003.img def test_pds_2(): tst = gdaltest.GDALTest('PDS', 'fl73n003_truncated.img', 1, 34962) expected_prj = """PROJCS["SINUSOIDAL VENUS", GEOGCS["GCS_VENUS", DATUM["D_VENUS", SPHEROID["VENUS",6051000,0]], PRIMEM["Reference_Meridian",0], UNIT["degree",0.0174532925199433]], PROJECTION["Sinusoidal"], PARAMETER["longitude_of_center",18], PARAMETER["false_easting",0], PARAMETER["false_northing",0],UNIT["metre",1]]""" expected_gt = (587861.55900404998, 75.000002980232239, 0.0, -7815243.4746123618, 0.0, -75.000002980232239) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', '-0.5') gdal.SetConfigOption('PDS_LineProjOffset_Shift', '-0.5') tst.testOpen(check_prj=expected_prj, check_gt=expected_gt) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', None) gdal.SetConfigOption('PDS_LineProjOffset_Shift', None) ds = gdal.Open('data/fl73n003_truncated.img') assert ds.GetRasterBand(1).GetNoDataValue() == 7 assert ds.GetRasterBand(1).GetScale() == 0.2 assert ds.GetRasterBand(1).GetOffset() == -20.2 # Per #3939 we would also like to test a dataset with MISSING_CONSTANT. ds = gdal.Open('data/fl73n003_alt_truncated.img') assert ds.GetRasterBand(1).GetNoDataValue() == 7 ############################################################################### # Read a truncated and modified version of ftp://pdsimage2.wr.usgs.gov/cdroms/messenger/MSGRMDS_1001/DATA/2004_232/EN0001426030M.IMG # 16bits image def test_pds_3(): # Shut down warning about missing projection gdal.PushErrorHandler('CPLQuietErrorHandler') tst = gdaltest.GDALTest('PDS', 'EN0001426030M_truncated.IMG', 1, 1367) gt_expected = (0, 1, 0, 0, 0, 1) tst.testOpen(check_gt=gt_expected) ds = gdal.Open('data/EN0001426030M_truncated.IMG') assert ds.GetRasterBand(1).GetNoDataValue() == 0 gdal.PopErrorHandler() ############################################################################### # Read a hacked example of reading a detached file with an offset #3177. def test_pds_4(): tst = gdaltest.GDALTest('PDS', 'pds_3177.lbl', 1, 3418) gt_expected = (6119184.3590369327, 1.0113804322107001, 0.0, -549696.39009125973, 0.0, -1.0113804322107001) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', '-0.5') gdal.SetConfigOption('PDS_LineProjOffset_Shift', '-0.5') tst.testOpen(check_gt=gt_expected) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', None) gdal.SetConfigOption('PDS_LineProjOffset_Shift', None) ############################################################################### # Read a hacked example of reading a detached file with an offset #3355. def test_pds_5(): tst = gdaltest.GDALTest('PDS', 'pds_3355.lbl', 1, 2748) return tst.testOpen() ############################################################################### # Read an image via the PDS label. This is a distinct mode of the PDS # driver mostly intended to support jpeg2000 files with PDS labels. def test_pds_6(): if os.path.exists('data/byte.tif.aux.xml'): os.unlink('data/byte.tif.aux.xml') tst = gdaltest.GDALTest('PDS', 'ESP_013951_1955_RED.LBL', 1, 4672) gt_expected = (-6139197.5, 0.5, 0.0, 936003.0, 0.0, -0.5) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', '-0.5') gdal.SetConfigOption('PDS_LineProjOffset_Shift', '-0.5') tst.testOpen(check_gt=gt_expected) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', None) gdal.SetConfigOption('PDS_LineProjOffset_Shift', None) ds = gdal.Open('data/ESP_013951_1955_RED.LBL') assert len(ds.GetFileList()) == 2, 'failed to get expected file list.' expected_wkt = 'PROJCS["EQUIRECTANGULAR MARS",GEOGCS["GCS_MARS",DATUM["D_MARS",SPHEROID["MARS_localRadius",3394839.8133163,0]],PRIMEM["Reference_Meridian",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Equirectangular"],PARAMETER["standard_parallel_1",15],PARAMETER["central_meridian",180],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]' wkt = ds.GetProjection() if expected_wkt != wkt: print('Got: ', wkt) print('Exp: ', expected_wkt) pytest.fail('did not get expected coordinate system.') ############################################################################### # Read an uncompressed image via the PDS label. (#3943) def test_pds_7(): tst = gdaltest.GDALTest('PDS', 'LDEM_4.LBL', 1, 50938, 0, 0, 1440, 2) gt_expected = (-5450622.3254203796, 7580.8377265930176, 0.0, 2721520.7438468933, 0.0, -7580.8377265930176) prj_expected = """PROJCS["SIMPLE_CYLINDRICAL MOON", GEOGCS["GCS_MOON", DATUM["D_MOON", SPHEROID["MOON",1737400,0]], PRIMEM["Reference_Meridian",0], UNIT["degree",0.0174532925199433]], PROJECTION["Equirectangular"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",180], PARAMETER["standard_parallel_1",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0],UNIT["metre",1]]""" gdal.SetConfigOption('PDS_SampleProjOffset_Shift', '-0.5') gdal.SetConfigOption('PDS_LineProjOffset_Shift', '-0.5') tst.testOpen(check_prj=prj_expected, check_gt=gt_expected) gdal.SetConfigOption('PDS_SampleProjOffset_Shift', None) gdal.SetConfigOption('PDS_LineProjOffset_Shift', None) ############################################################################### # Test applying adjustment offsets via configuration variables for the # geotransform (#3940) def test_pds_8(): # values for MAGELLAN FMAP data. gdal.SetConfigOption('PDS_SampleProjOffset_Shift', '1.5') gdal.SetConfigOption('PDS_LineProjOffset_Shift', '1.5') gdal.SetConfigOption('PDS_SampleProjOffset_Mult', '1.0') gdal.SetConfigOption('PDS_LineProjOffset_Mult', '-1.0') tst = gdaltest.GDALTest('PDS', 'mc02_truncated.img', 1, 47151) expected_gt = (10670237.134337425, 926.11527442932129, 0.0, -3854028.7145376205, 0.0, -926.11527442932129) result = tst.testOpen(check_gt=expected_gt) # clear config settings gdal.SetConfigOption('PDS_SampleProjOffset_Shift', None) gdal.SetConfigOption('PDS_LineProjOffset_Shift', None) gdal.SetConfigOption('PDS_SampleProjOffset_Mult', None) gdal.SetConfigOption('PDS_LineProjOffset_Mult', None) return result ############################################################################### # Test a PDS with an image compressed in a ZIP, and with nodata expressed as # an hexadecimal floating point value (#3939) def test_pds_9(): # Derived from http://pdsimage.wr.usgs.gov/data/co-v_e_j_s-radar-3-sbdr-v1.0/CORADR_0035/DATA/BIDR/BIEQI49N071_D035_T00AS01_V02.LBL tst = gdaltest.GDALTest('PDS', 'PDS_WITH_ZIP_IMG.LBL', 1, 0) tst.testOpen() ds = gdal.Open('data/PDS_WITH_ZIP_IMG.LBL') got_nd = ds.GetRasterBand(1).GetNoDataValue() expected_nd = -3.40282265508890445e+38 assert abs((got_nd - expected_nd) / expected_nd) <= 1e-5 assert ds.GetProjectionRef() ############################################################################### # Test PDS label with nested arrays (#6970) def test_pds_10(): gdal.FileFromMemBuffer('/vsimem/pds_10', """PDS_VERSION_ID = "PDS3" DATA_FORMAT = "PDS" ^IMAGE = 1 # Non sensical but just to parse nested arrays NOTE = ((1, 2, 3)) PRODUCT_ID = ({1, 2}, {3,4}) OBJECT = IMAGE BANDS = 1 BAND_STORAGE_TYPE = "BAND SEQUENTIAL" LINES = 1 LINE_SAMPLES = 1 SAMPLE_BITS = 8 END_OBJECT = IMAGE END """) ds = gdal.Open('/vsimem/pds_10') assert ds.GetMetadataItem('NOTE') == '((1,2,3))' assert ds.GetMetadataItem('PRODUCT_ID') == '({1,2},{3,4})', \ ds.GetMetadataItem('NOTE') gdal.FileFromMemBuffer('/vsimem/pds_10', """PDS_VERSION_ID = "PDS3" # Unpaired NOTE = (x, y} END """) with gdaltest.error_handler(): gdal.Open('/vsimem/pds_10') gdal.FileFromMemBuffer('/vsimem/pds_10', """PDS_VERSION_ID = "PDS3" # Unpaired NOTE = {x, y) END """) with gdaltest.error_handler(): gdal.Open('/vsimem/pds_10') gdal.Unlink('/vsimem/pds_10') ############################################################################### # Read a hacked example of reading an image where the line offset is not # a multiple of the record size # https://github.com/OSGeo/gdal/issues/955 def test_pds_line_offset_not_multiple_of_record(): tst = gdaltest.GDALTest('PDS', 'pds/map_000_038_truncated.lbl', 1, 14019) return tst.testOpen() ############################################################################### # Read http://pds-geosciences.wustl.edu/mro/mro-m-crism-3-rdr-targeted-v1/mrocr_2104/trdr/2010/2010_095/hsp00017ba0/hsp00017ba0_01_ra218s_trr3.lbl # Test ability of using OBJECT = FILE section to support CRISM # as well as BAND_STORAGE_TYPE = LINE_INTERLEAVED def test_pds_band_storage_type_line_interleaved(): tst = gdaltest.GDALTest('PDS', 'pds/hsp00017ba0_01_ra218s_trr3_truncated.lbl', 1, 64740) return tst.testOpen() def test_pds_oblique_cylindrical_read(): # This dataset is a champion in its category. It features: # - POSITIVE_LONGITUDE_DIRECTION = WEST # - MAP_PROJECTION_ROTATION = 90.0 # - oblique cylindrical projection # https://pds-imaging.jpl.nasa.gov/data/cassini/cassini_orbiter/CORADR_0101_V03/DATA/BIDR/BIBQH03N123_D101_T020S03_V03.LBL ds = gdal.Open('data/BIBQH03N123_D101_T020S03_V03_truncated.IMG') srs = ds.GetSpatialRef() assert srs.ExportToProj4() == '+proj=ob_tran +R=2575000 +o_proj=eqc +o_lon_p=-257.744003 +o_lat_p=120.374532 +lon_0=-303.571748 +wktext +no_defs' gt = ds.GetGeoTransform() assert gt == pytest.approx((-5347774.07796, 0, 351.11116, -2561707.02336, 351.11116, 0)) geog_srs = srs.CloneGeogCS() ct = osr.CoordinateTransformation(srs, geog_srs) def to_lon_lat(pixel, line): x = gt[0] + pixel * gt[1] + line * gt[2] y = gt[3] + pixel * gt[4] + line * gt[5] lon, lat, _ = ct.TransformPoint(x, y) return lon, lat # Check consistency of the corners of the image with the long,lat bounds # in the metadata # MAXIMUM_LATITUDE = 32.37062573 # MINIMUM_LATITUDE = -31.41702033 # EASTERNMOST_LONGITUDE = 75.792673220 # WESTERNMOST_LONGITUDE = 169.8235459 _, lat = to_lon_lat(0, 0) assert lat == pytest.approx(-31.097321393323572) # MINIMUM_LATITUDE lon, _ = to_lon_lat(ds.RasterXSize, 0) assert lon == pytest.approx(-169.8290961385244) # WESTERNMOST_LONGITUDE * -1 _, lat = to_lon_lat(0, ds.RasterYSize) assert lat == pytest.approx(-31.421452666874025) # MINIMUM_LATITUDE lon, _ = to_lon_lat(ds.RasterXSize, ds.RasterYSize) assert lon == pytest.approx(-75.787124149033) # EASTERNMOST_LONGITUDE * -1 ############################################################################### def test_pds_sharp_on_continuing_line(): gdal.FileFromMemBuffer('/vsimem/test', """PDS_VERSION_ID = "PDS3" NOTE = (#9933FF, #FFFF33) ^IMAGE = 1 OBJECT = IMAGE BANDS = 1 BAND_STORAGE_TYPE = "BAND SEQUENTIAL" LINES = 1 LINE_SAMPLES = 1 SAMPLE_BITS = 8 END_OBJECT = IMAGE END """) ds = gdal.Open('/vsimem/test') assert ds.GetMetadataItem('NOTE') == '(#9933FF,#FFFF33)' gdal.Unlink('/vsimem/test') ############################################################################### def test_pds_sharp_comma_continuing_line(): gdal.FileFromMemBuffer('/vsimem/test', """PDS_VERSION_ID = "PDS3" NOTE = ("a" ,"b") ^IMAGE = 1 OBJECT = IMAGE BANDS = 1 BAND_STORAGE_TYPE = "BAND SEQUENTIAL" LINES = 1 LINE_SAMPLES = 1 SAMPLE_BITS = 8 END_OBJECT = IMAGE END """) ds = gdal.Open('/vsimem/test') assert ds.GetMetadataItem('NOTE') == '("a","b")' gdal.Unlink('/vsimem/test') ############################################################################### # Test reading a Mercator_2SP dataset (#2490) def test_pds_mercator_2SP(): # Dataset from https://sbnarchive.psi.edu/pds3/dawn/fc/DWNCLCFC2_2/DATA/CE_LAMO_Q_00N_036E_MER_CLR.IMG ds = gdal.Open('data/CE_LAMO_Q_00N_036E_MER_CLR_truncated.IMG') expected_wkt = """PROJCRS["MERCATOR 1_CERES", BASEGEOGCRS["GCS_1_CERES", DATUM["D_1_CERES", ELLIPSOID["1_CERES",470000,0, LENGTHUNIT["metre",1, ID["EPSG",9001]]]], PRIMEM["Reference_Meridian",0, ANGLEUNIT["degree",0.0174532925199433, ID["EPSG",9122]]]], CONVERSION["unnamed", METHOD["Mercator (variant B)", ID["EPSG",9805]], PARAMETER["Latitude of 1st standard parallel",-12.99, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8823]], PARAMETER["Longitude of natural origin",36, ANGLEUNIT["degree",0.0174532925199433], ID["EPSG",8802]], PARAMETER["False easting",0, LENGTHUNIT["metre",1], ID["EPSG",8806]], PARAMETER["False northing",0, LENGTHUNIT["metre",1], ID["EPSG",8807]]], CS[Cartesian,2], AXIS["easting",east, ORDER[1], LENGTHUNIT["metre",1, ID["EPSG",9001]]], AXIS["northing",north, ORDER[2], LENGTHUNIT["metre",1, ID["EPSG",9001]]]]""" expected_srs = osr.SpatialReference() expected_srs.ImportFromWkt(expected_wkt) srs = ds.GetSpatialRef() assert srs.IsSame(expected_srs), srs.ExportToWkt() gdalautotest-3.1.2/gdrivers/ace2.py0000775000175000017500000000511213701060016015700 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: ace2.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test ACE2 driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2011, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Test a fake ACE2 dataset def test_ace2_1(): f = gdal.VSIFOpenL('/vsimem/45N015E_5M.ACE2', 'wb') gdal.VSIFSeekL(f, 180 * 180 * 4 - 1, 0) gdal.VSIFWriteL('\0', 1, 1, f) gdal.VSIFCloseL(f) tst = gdaltest.GDALTest('ACE2', '/vsimem/45N015E_5M.ACE2', 1, 0, filename_absolute=1) expected_gt = [15.0, 0.08333333333333333, 0.0, 60.0, 0.0, -0.08333333333333333] expected_srs = """GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]]""" ret = tst.testOpen(check_gt=expected_gt, check_prj=expected_srs) gdal.Unlink('/vsimem/45N015E_5M.ACE2') return ret gdalautotest-3.1.2/gdrivers/wcs.py0000775000175000017500000004512113701060016015666 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: wcs.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test WCS client support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2003, Frank Warmerdam # Copyright (c) 2009-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import numbers import re import shutil try: import urllib.parse as urlparse except ImportError: import urlparse try: from BaseHTTPServer import BaseHTTPRequestHandler except ImportError: from http.server import BaseHTTPRequestHandler import pytest from osgeo import gdal import webserver import gdaltest ############################################################################### # Verify we have the driver. def test_wcs_1(): # Disable wcs tests till we have a more reliable test server. gdaltest.wcs_drv = gdal.GetDriverByName('WCS') # NOTE - mloskot: # This is a dirty hack checking if remote WCS service is online. # Nothing genuine but helps to keep the buildbot waterfall green. srv = 'http://demo.opengeo.org/geoserver/wcs?' if gdaltest.gdalurlopen(srv) is None: gdaltest.wcs_drv = None gdaltest.wcs_ds = None if gdaltest.wcs_drv is None: pytest.skip() ############################################################################### # Open the GeoServer WCS service. def wcs_2(): if gdaltest.wcs_drv is None: pytest.skip() # first, copy to tmp directory. open('tmp/geoserver.wcs', 'w').write(open('data/geoserver.wcs').read()) gdaltest.wcs_ds = None gdaltest.wcs_ds = gdal.Open('tmp/geoserver.wcs') if gdaltest.wcs_ds is not None: return pytest.fail('open failed.') ############################################################################### # Check various things about the configuration. def test_wcs_3(): if gdaltest.wcs_drv is None or gdaltest.wcs_ds is None: pytest.skip() assert gdaltest.wcs_ds.RasterXSize == 983 and gdaltest.wcs_ds.RasterYSize == 598 and gdaltest.wcs_ds.RasterCount == 3, \ 'wrong size or bands' wkt = gdaltest.wcs_ds.GetProjectionRef() assert wkt[:14] == 'GEOGCS["WGS 84', ('Got wrong SRS: ' + wkt) gt = gdaltest.wcs_ds.GetGeoTransform() expected_gt = (-130.85167999999999, 0.070036907426246159, 0.0, 54.114100000000001, 0.0, -0.055867725752508368) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=0.00001), 'wrong geotransform' assert gdaltest.wcs_ds.GetRasterBand(1).GetOverviewCount() >= 1, 'no overviews!' assert gdaltest.wcs_ds.GetRasterBand(1).DataType == gdal.GDT_Byte, \ 'wrong band data type' ############################################################################### # Check checksum def test_wcs_4(): if gdaltest.wcs_drv is None or gdaltest.wcs_ds is None: pytest.skip() cs = gdaltest.wcs_ds.GetRasterBand(1).Checksum() assert cs == 58765, ('Wrong checksum: ' + str(cs)) ############################################################################### # Open the service using XML as filename. def wcs_5(): if gdaltest.wcs_drv is None: pytest.skip() fn = """ http://demo.opengeo.org/geoserver/wcs? Img_Sample """ ds = gdal.Open(fn) assert ds is not None, 'open failed.' assert ds.RasterXSize == 983 and ds.RasterYSize == 598 and ds.RasterCount == 3, \ 'wrong size or bands' ds = None ############################################################################### # Open the srtm plus service. def old_wcs_2(): if gdaltest.wcs_drv is None: pytest.skip() # first, copy to tmp directory. open('tmp/srtmplus.wcs', 'w').write(open('data/srtmplus.wcs').read()) gdaltest.wcs_ds = None gdaltest.wcs_ds = gdal.Open('tmp/srtmplus.wcs') if gdaltest.wcs_ds is not None: return pytest.fail('open failed.') ############################################################################### # Check various things about the configuration. def old_wcs_3(): if gdaltest.wcs_drv is None or gdaltest.wcs_ds is None: pytest.skip() assert gdaltest.wcs_ds.RasterXSize == 43200 and gdaltest.wcs_ds.RasterYSize == 21600 and gdaltest.wcs_ds.RasterCount == 1, \ 'wrong size or bands' wkt = gdaltest.wcs_ds.GetProjectionRef() assert wkt[:12] == 'GEOGCS["NAD8', ('Got wrong SRS: ' + wkt) gt = gdaltest.wcs_ds.GetGeoTransform() assert gt[0] == pytest.approx(-180.0041667, abs=0.00001) and gt[3] == pytest.approx(90.004167, abs=0.00001) and gt[1] == pytest.approx(0.00833333, abs=0.00001) and gt[2] == pytest.approx(0, abs=0.00001) and gt[5] == pytest.approx(-0.00833333, abs=0.00001) and gt[4] == pytest.approx(0, abs=0.00001), \ 'wrong geotransform' assert gdaltest.wcs_ds.GetRasterBand(1).GetOverviewCount() >= 1, 'no overviews!' assert gdaltest.wcs_ds.GetRasterBand(1).DataType >= gdal.GDT_Int16, \ 'wrong band data type' ############################################################################### # Check checksum for a small region. def old_wcs_4(): if gdaltest.wcs_drv is None or gdaltest.wcs_ds is None: pytest.skip() cs = gdaltest.wcs_ds.GetRasterBand(1).Checksum(0, 0, 100, 100) assert cs == 10469, ('Wrong checksum: ' + str(cs)) ############################################################################### # Open the srtm plus service using XML as filename. def old_wcs_5(): if gdaltest.wcs_drv is None: pytest.skip() fn = 'http://geodata.telascience.org/cgi-bin/mapserv_dem?srtmplus_raw75' ds = gdal.Open(fn) assert ds is not None, 'open failed.' assert ds.RasterXSize == 43200 and ds.RasterYSize == 21600 and ds.RasterCount == 1, \ 'wrong size or bands' ds = None ############################################################################### # utilities def read_urls(): retval = {} fname = 'data/wcs/urls' f = open(fname, 'rb') text = f.read().decode('utf-8') f.close() for line in text.splitlines(): items = line.split() if items[1].endswith('2'): items[1] = items[1][:-1] if not items[0] in retval: retval[items[0]] = {} retval[items[0]][items[1]] = items[2] return retval do_log = False wcs_6_ok = True class WCSHTTPHandler(BaseHTTPRequestHandler): def log_request(self, code=',', size=','): # pylint: disable=unused-argument pass def Headers(self, typ): self.send_response(200) self.send_header('Content-Type', typ) self.end_headers() def Respond(self, request, brand, version, test): try: fname = 'data/wcs/' if request == 'GetCapabilities': # *2 and Simple* are different coverages from same server brand = brand.replace('2', '') brand = brand.replace('Simple', '') if request == 'GetCoverage' and test == "scaled": suffix = '.tiff' self.Headers('image/tiff') fname += brand + '-' + version + '-scaled' + suffix elif request == 'GetCoverage' and test == "non_scaled": suffix = '.tiff' self.Headers('image/tiff') fname += brand + '-' + version + '-non_scaled' + suffix elif request == 'GetCoverage': suffix = '.tiff' self.Headers('image/tiff') fname += brand + '-' + version + suffix else: suffix = '.xml' self.Headers('application/xml') fname += request + '-' + brand + '-' + version + suffix f = open(fname, 'rb') content = f.read() f.close() self.wfile.write(content) except IOError: self.send_error(404, 'File Not Found: ' + request + ' ' + brand + ' ' + version) global wcs_6_ok wcs_6_ok = False def do_GET(self): if do_log: f = open('/tmp/log.txt', 'a') f.write('GET %s\n' % self.path) f.close() split = urlparse.urlparse(self.path) query = urlparse.parse_qs(split.query) query2 = {} for key in query: query2[key.lower()] = query[key] server = query2['server'][0] version = query2['version'][0] request = query2['request'][0] test = '' if 'test' in query2: test = query2['test'][0] key = server + '-' + version if key in urls and test in urls[key]: _, got = self.path.split('SERVICE=WCS') got = re.sub('\&test=.*', '', got) _, have = urls[key][test].split('SERVICE=WCS') have += '&server=' + server if got == have: ok = 'ok' else: ok = "not ok\ngot: " + got + "\nhave: " + have global wcs_6_ok wcs_6_ok = False print('test ' + server + ' ' + test + ' WCS ' + version + ' ' + ok) self.Respond(request, server, version, test) def setupFct(): return { 'SimpleGeoServer': { 'URL': 'https://msp.smartsea.fmi.fi/geoserver/wcs', 'Options': [ "", "-oo OuterExtents", "-oo OuterExtents", "" ], 'Projwin': "-projwin 145300 6737500 209680 6688700", 'Outsize': "-outsize $size 0", 'Coverage': [ 'smartsea:eusm2016', 'smartsea:eusm2016', 'smartsea:eusm2016', 'smartsea__eusm2016'], 'Versions': [100, 110, 111, 201], }, 'GeoServer2': { 'URL': 'https://msp.smartsea.fmi.fi/geoserver/wcs', 'Options': [ "", "-oo OuterExtents -oo NoGridAxisSwap", "-oo OuterExtents -oo NoGridAxisSwap", "-oo NoGridAxisSwap -oo SubsetAxisSwap" ], 'Projwin': "-projwin 145300 6737500 209680 6688700", 'Outsize': "-outsize $size 0", 'Coverage': ['smartsea:south', 'smartsea:south', 'smartsea:south', 'smartsea__south'], 'Versions': [100, 110, 111, 201], 'Range': ['GREEN_BAND', 'BLUE_BAND'] }, 'GeoServer': { 'URL': 'https://msp.smartsea.fmi.fi/geoserver/wcs', 'Options': [ "", "-oo OuterExtents -oo BufSizeAdjust=0.5 -oo NoGridAxisSwap", "-oo OuterExtents -oo BufSizeAdjust=0.5 -oo NoGridAxisSwap", "-oo NoGridAxisSwap -oo SubsetAxisSwap", ], 'Projwin': "-projwin 3200000 6670000 3280000 6620000", 'Outsize': "-outsize $size 0", 'Coverage': [ 'smartsea:eusm2016-EPSG2393', 'smartsea:eusm2016-EPSG2393', 'smartsea:eusm2016-EPSG2393', 'smartsea__eusm2016-EPSG2393'], 'Versions': [100, 110, 111, 201] }, 'MapServer': { 'URL': 'http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows', 'Options': [ "-oo INTERLEAVE=PIXEL -oo OriginAtBoundary -oo BandIdentifier=none", "-oo INTERLEAVE=PIXEL -oo OffsetsPositive -oo NrOffsets=2 -oo NoGridAxisSwap -oo BandIdentifier=none", "-oo INTERLEAVE=PIXEL -oo OffsetsPositive -oo NrOffsets=2 -oo NoGridAxisSwap -oo BandIdentifier=none", "-oo INTERLEAVE=PIXEL -oo OffsetsPositive -oo NrOffsets=2 -oo NoGridAxisSwap -oo BandIdentifier=none", "-oo OriginAtBoundary", ], 'Projwin': "-projwin 10 45 15 35", 'Outsize': "-outsize $size 0", 'Coverage': 'BGS_EMODNET_CentralMed-MCol', 'Versions': [100, 110, 111, 112, 201] }, 'Rasdaman': { 'URL': 'http://ows.rasdaman.org/rasdaman/ows', 'Options': "", 'Projwin': "-projwin 10 45 15 35", 'Outsize': "-outsize $size 0", 'Coverage': 'BlueMarbleCov', 'Versions': [201] }, 'Rasdaman2': { 'URL': 'http://ows.rasdaman.org/rasdaman/ows', 'Options': '-oo subset=unix("2008-01-05T01:58:30.000Z")', 'Projwin': "-projwin 100000 5400000 150000 5100000", 'Outsize': "-outsize $size 0", 'Coverage': 'test_irr_cube_2', 'Versions': [201], 'Dimension': "unix(\"2008-01-05T01:58:30.000Z\")" }, 'ArcGIS': { 'URL': 'http://paikkatieto.ymparisto.fi/arcgis/services/Testit/Velmu_wcs_testi/MapServer/WCSServer', 'Options': [ "", "-oo NrOffsets=2", "-oo NrOffsets=2", "-oo NrOffsets=2", "-oo UseScaleFactor" ], 'Projwin': "-projwin 181000 7005000 200000 6980000", 'Outsize': "-outsize $size 0", 'Coverage': [2, 2, 2, 2, 'Coverage2'], 'Versions': [100, 110, 111, 112, 201] } } ############################################################################### def test_wcs_6(): driver = gdal.GetDriverByName('WCS') if driver is None: pytest.skip() # Generating various URLs from the driver and comparing them to ones # that have worked. first_call = True size = 60 cache = 'CACHE=wcs_cache' global urls urls = read_urls() (process, port) = webserver.launch(handler=WCSHTTPHandler) url = "http://127.0.0.1:" + str(port) setup = setupFct() servers = [] for server in setup: servers.append(server) for server in sorted(servers): for i, v in enumerate(setup[server]['Versions']): version = str(int(v / 100)) + '.' + str(int(v % 100 / 10)) + '.' + str((v % 10)) if not server + '-' + version in urls: print("Error: " + server + '-' + version + " not in urls") global wcs_6_ok wcs_6_ok = False continue options = [cache] if first_call: options.append('CLEAR_CACHE') first_call = False query = 'server=' + server + '&version=' + version ds = gdal.OpenEx(utf8_path="WCS:" + url + "/?" + query, open_options=options) coverage = setup[server]['Coverage'] if isinstance(coverage, list): coverage = coverage[i] if isinstance(coverage, numbers.Number): coverage = str(coverage) query += '&coverage=' + coverage options = [cache] if isinstance(setup[server]['Options'], list): oo = setup[server]['Options'][i] else: oo = setup[server]['Options'] oo = oo.split() for o in oo: if o != '-oo': options.append(o) options.append('GetCoverageExtra=test=none') ds = gdal.OpenEx(utf8_path="WCS:" + url + "/?" + query, open_options=options) ds = 0 options = [cache] options.append('GetCoverageExtra=test=scaled') options.append('INTERLEAVE=PIXEL') ds = gdal.OpenEx(utf8_path="WCS:" + url + "/?" + query, open_options=options) if not ds: print("OpenEx failed: WCS:" + url + "/?" + query) wcs_6_ok = False break projwin = setup[server]['Projwin'].replace('-projwin ', '').split() for i, c in enumerate(projwin): projwin[i] = int(c) options = [cache] tmpfile = "tmp/" + server + version + ".tiff" gdal.Translate(tmpfile, ds, projWin=projwin, width=size, options=options) os.remove(tmpfile) if os.path.isfile('data/wcs/' + server + '-' + version + '-non_scaled.tiff'): options = [cache] options.append('GetCoverageExtra=test=non_scaled') options.append('INTERLEAVE=PIXEL') ds = gdal.OpenEx(utf8_path="WCS:" + url + "/?" + query, open_options=options) if not ds: print("OpenEx failed: WCS:" + url + "/?" + query) wcs_6_ok = False break options = [cache] gdal.Translate(tmpfile, ds, srcWin=[0, 0, 2, 2], options=options) os.remove(tmpfile) else: print(server + ' ' + version + ' non_scaled skipped (no response file)') webserver.server_stop(process, port) assert wcs_6_ok ############################################################################### # todo tests: # test that nothing is put into cache if request fails # parsing Capabilities and DescribeCoverage: test data in metadata and service files? ############################################################################### def test_wcs_cleanup(): gdaltest.wcs_drv = None gdaltest.wcs_ds = None try: os.remove('tmp/geoserver.wcs') except OSError: pass try: shutil.rmtree('wcs_cache') except OSError: pass gdalautotest-3.1.2/gdrivers/cals.py0000775000175000017500000001266213701060016016020 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: cals.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test CALS driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2015, Even Rouault, # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest ############################################################################### # Source has no color table def test_cals_1(): tst = gdaltest.GDALTest('CALS', 'small1bit.img', 1, 9907) return tst.testCreateCopy() ############################################################################### # Source has a color table (0,0,0),(255,255,255) def test_cals_2(): # Has no color table tst = gdaltest.GDALTest('CALS', '../../gcore/data/oddsize1bit.tif', 1, 3883) return tst.testCreateCopy() ############################################################################### # Source has a color table (255,255,255),(0,0,0) def test_cals_3(): src_ds = gdal.Open('../gcore/data/oddsize1bit.tif') tmp_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_2_tmp.cal', src_ds) tmp_ds.SetMetadataItem('TIFFTAG_XRESOLUTION', '600') tmp_ds.SetMetadataItem('TIFFTAG_YRESOLUTION', '600') out_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_2.cal', tmp_ds) assert gdal.VSIStatL('/vsimem/cals_2.cal.aux.xml') is None assert out_ds.GetRasterBand(1).Checksum() == 3883 assert out_ds.GetMetadataItem('PIXEL_PATH') is None assert out_ds.GetMetadataItem('TIFFTAG_XRESOLUTION') == '600' assert out_ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_PaletteIndex tmp_ds = None out_ds = None gdal.Unlink('/vsimem/cals_2_tmp.cal') gdal.Unlink('/vsimem/cals_2_tmp.cal.aux.xml') gdal.Unlink('/vsimem/cals_2.cal') ############################################################################### # Test CreateCopy() error conditions def test_cals_4(): # 0 band src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 0) gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_4.cal', src_ds) gdal.PopErrorHandler() assert out_ds is None # 2 bands src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 2) gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_4.cal', src_ds, strict=True) gdal.PopErrorHandler() assert out_ds is None # 1 band but not 1-bit src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 1) gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_4.cal', src_ds, strict=True) gdal.PopErrorHandler() assert out_ds is None # Dimension > 999999 src_ds = gdal.GetDriverByName('MEM').Create('', 1000000, 1, 1) src_ds.GetRasterBand(1).SetMetadataItem('NBITS', '1', 'IMAGE_STRUCTURE') gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_4.cal', src_ds, strict=True) gdal.PopErrorHandler() assert out_ds is None # Invalid output filename src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 1) src_ds.GetRasterBand(1).SetMetadataItem('NBITS', '1', 'IMAGE_STRUCTURE') gdal.PushErrorHandler() out_ds = gdal.GetDriverByName('CALS').CreateCopy('/not_existing_dir/cals_4.cal', src_ds) gdal.PopErrorHandler() assert out_ds is None ############################################################################### # Test PIXEL_PATH & LINE_PROGRESSION metadata item def test_cals_5(): src_ds = gdal.GetDriverByName('MEM').Create('', 1, 1, 1) src_ds.GetRasterBand(1).SetMetadataItem('NBITS', '1', 'IMAGE_STRUCTURE') src_ds.SetMetadataItem('PIXEL_PATH', '90') src_ds.SetMetadataItem('LINE_PROGRESSION', '270') out_ds = gdal.GetDriverByName('CALS').CreateCopy('/vsimem/cals_5.cal', src_ds) assert gdal.VSIStatL('/vsimem/cals_5.cal.aux.xml') is None assert out_ds.GetMetadataItem('PIXEL_PATH') == '90' assert out_ds.GetMetadataItem('LINE_PROGRESSION') == '270' out_ds = None gdal.Unlink('/vsimem/cals_5.cal') ############################################################################### gdalautotest-3.1.2/gdrivers/exr.py0000664000175000017500000002030013701060016015655 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: exr.py fa9cbb747c2bf17876167ed747fd7e7757f8fc29 2020-02-03 18:04:27 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test EXR driver # Author: Even Rouault # ############################################################################### # Copyright (c) 2020, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import pytest pytestmark = pytest.mark.require_driver('EXR') def test_exr_byte_createcopy(): tst = gdaltest.GDALTest('EXR', 'byte.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) def test_exr_byte_createcopy_pixel_type_half(): tst = gdaltest.GDALTest('EXR', 'byte.tif', 1, 4672, options = ['PIXEL_TYPE=HALF']) return tst.testCreateCopy(vsimem=1) def test_exr_byte_createcopy_pixel_type_float(): tst = gdaltest.GDALTest('EXR', 'byte.tif', 1, 4672, options = ['PIXEL_TYPE=FLOAT']) return tst.testCreateCopy(vsimem=1) def test_exr_byte_createcopy_pixel_type_uint(): tst = gdaltest.GDALTest('EXR', 'byte.tif', 1, 4672, options = ['PIXEL_TYPE=UINT']) return tst.testCreateCopy(vsimem=1) def test_exr_byte_create(): tst = gdaltest.GDALTest('EXR', 'byte.tif', 1, 4672) return tst.testCreate(vsimem=1) def test_exr_uint16_createcopy(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/uint16.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) def test_exr_uint16_create(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/uint16.tif', 1, 4672) return tst.testCreate(vsimem=1) def test_exr_uint32_createcopy(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/uint32.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) def test_exr_uint32_create(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/uint32.tif', 1, 4672) return tst.testCreate(vsimem=1) def test_exr_float32_createcopy(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/float32.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) def test_exr_float32_create(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/float32.tif', 1, 4672) return tst.testCreate(vsimem=1) def test_exr_float64_createcopy(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/float64.tif', 1, 4672) return tst.testCreateCopy(vsimem=1) def test_exr_float64_create(): tst = gdaltest.GDALTest('EXR', '../../gcore/data/float64.tif', 1, 4672) return tst.testCreate(vsimem=1) def test_exr_compression_createcopy(): src_ds = gdal.Open('data/byte.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['COMPRESS=RLE']) assert ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') == 'RLE' band = ds.GetRasterBand(1) assert band.Checksum() == 4672 ds = None gdal.Unlink(tmpfilename) def test_exr_compression_create(): src_ds = gdal.Open('data/byte.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').Create(tmpfilename, 20, 20, options = ['COMPRESS=RLE']) ds.GetRasterBand(1).WriteRaster(0, 0, 20, 20, src_ds.GetRasterBand(1).ReadRaster()) ds = None ds = gdal.Open(tmpfilename) assert ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') == 'RLE' band = ds.GetRasterBand(1) assert band.Checksum() == 4672 ds = None gdal.Unlink(tmpfilename) def test_exr_compression_dwa_compression_level(): src_ds = gdal.Open('data/small_world.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['COMPRESS=DWAB', 'DWA_COMPRESSION_LEVEL=100']) assert ds.GetMetadataItem('COMPRESSION', 'IMAGE_STRUCTURE') == 'DWAB' band = ds.GetRasterBand(1) assert band.Checksum() == 12863 ds = None gdal.Unlink(tmpfilename) def test_exr_tiling(): src_ds = gdal.Open('data/byte.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['TILED=YES']) band = ds.GetRasterBand(1) assert band.GetBlockSize() == [256, 256] assert band.Checksum() == 4672 ds = None gdal.Unlink(tmpfilename) def test_exr_tiling_custom_tile_size(): src_ds = gdal.Open('data/byte.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['TILED=YES', 'BLOCKXSIZE=13', 'BLOCKYSIZE=15']) band = ds.GetRasterBand(1) assert band.GetBlockSize() == [13, 15] assert band.Checksum() == 4672 ds = None gdal.Unlink(tmpfilename) def test_exr_rgb_byte_tiled(): src_ds = gdal.Open('data/small_world.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['TILED=YES', 'BLOCKXSIZE=64', 'BLOCKYSIZE=32']) assert ds.GetRasterBand(1).Checksum() == 12852 assert ds.GetRasterBand(2).Checksum() == 12226 assert ds.GetRasterBand(3).Checksum() == 10731 ds = None gdal.Unlink(tmpfilename) def test_exr_rgb_byte_strip_no_auto_rescale(): src_ds = gdal.Open('data/small_world.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['AUTO_RESCALE=NO']) assert [ds.GetRasterBand(i+1).Checksum() for i in range(3)] == \ [src_ds.GetRasterBand(i+1).Checksum() for i in range(3)] ds = None gdal.Unlink(tmpfilename) def test_exr_overviews(): src_ds = gdal.Open('data/small_world.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['OVERVIEWS=YES']) assert ds.GetRasterBand(1).GetOverviewCount() == 1 assert ds.GetRasterBand(1).GetOverview(-1) is None assert ds.GetRasterBand(1).GetOverview(1) is None assert ds.GetRasterBand(1).GetOverview(0).Checksum() == 2666 ds = None gdal.Unlink(tmpfilename) def test_exr_preview(): src_ds = gdal.Open('data/small_world.tif') tmpfilename = '/vsimem/temp.exr' ds = gdal.GetDriverByName('EXR').CreateCopy(tmpfilename, src_ds, options = ['PREVIEW=YES']) assert len(ds.GetSubDatasets()) == 1 subds_name = ds.GetSubDatasets()[0][0] ds = None ds = gdal.Open(subds_name) assert ds.RasterCount == 4 assert [ds.GetRasterBand(i+1).Checksum() for i in range(4)] == [51312, 51623, 55830, 61313] ds = None gdal.Unlink(tmpfilename) gdalautotest-3.1.2/gdrivers/isg.py0000775000175000017500000000357613701060016015664 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: isg.py 57075ecc56abf574988aa7247dad3c73fd0c4a6d 2020-04-01 00:27:29 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test ISG support. # Author: Even Rouault, # ############################################################################### # Copyright (c) 2019, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Perform simple read test. def test_isg_1(): tst = gdaltest.GDALTest('ISG', 'test.isg', 1, 159) expected_gt = [120.0, 0.25, 0.0, 41.0, 0.0, -0.25] return tst.testOpen(check_gt=expected_gt) gdalautotest-3.1.2/gdrivers/mbtiles.py0000775000175000017500000004705213701060016016536 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: mbtiles.py 6705917bb366522a4e77cca9c461badad3ed671f 2019-11-28 20:16:03 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for MBTiles driver. # Author: Even Rouault, # ############################################################################### # Copyright (c) 2012-2016, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import sys from osgeo import gdal from osgeo import ogr import gdaltest import webserver import pytest ############################################################################### # Get the mbtiles driver def test_mbtiles_1(): gdaltest.mbtiles_drv = gdal.GetDriverByName('MBTiles') ############################################################################### # Basic test def test_mbtiles_2(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('JPEG') is None: pytest.skip() ds = gdal.OpenEx('data/world_l1.mbtiles', open_options=['USE_BOUNDS=NO']) assert ds is not None assert ds.RasterCount == 4, 'expected 3 bands' assert ds.GetRasterBand(1).GetOverviewCount() == 1, \ 'did not get expected overview count' expected_cs_tab = [6324, 19386, 45258] expected_cs_tab_jpeg8 = [6016, 13996, 45168] expected_cs_tab_jpeg9b = [6016, 14034, 45168] for i in range(3): cs = ds.GetRasterBand(i + 1).Checksum() assert ds.GetRasterBand(i + 1).GetColorInterpretation() == gdal.GCI_RedBand + i, \ 'bad color interpretation' expected_cs = expected_cs_tab[i] assert cs == expected_cs or cs == expected_cs_tab_jpeg8[i] or cs == expected_cs_tab_jpeg9b[i], \ ('for band %d, cs = %d, different from expected_cs = %d' % (i + 1, cs, expected_cs)) expected_cs_tab = [16642, 15772, 10029] expected_cs_tab_jpeg8 = [16621, 14725, 8988] expected_cs_tab_jpeg9b = [16621, 14723, 8988] for i in range(3): cs = ds.GetRasterBand(i + 1).GetOverview(0).Checksum() expected_cs = expected_cs_tab[i] assert cs == expected_cs or cs == expected_cs_tab_jpeg8[i] or cs == expected_cs_tab_jpeg9b[i], \ ('for overview of band %d, cs = %d, different from expected_cs = %d' % (i + 1, cs, expected_cs)) assert ds.GetProjectionRef().find('3857') != -1, \ ('projection_ref = %s' % ds.GetProjectionRef()) gt = ds.GetGeoTransform() expected_gt = (-20037508.342789244, 78271.516964020484, 0.0, 20037508.342789244, 0.0, -78271.516964020484) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-15), 'bad gt' md = ds.GetMetadata() assert md['bounds'] == '-180.0,-85,180,85', 'bad metadata' ds = None ############################################################################### # Open a /vsicurl/ DB def test_mbtiles_3(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('HTTP') is None: pytest.skip() if sys.platform == 'darwin' and gdal.GetConfigOption('TRAVIS', None) is not None: pytest.skip("Hangs on MacOSX Travis sometimes. Not sure why.") # Check that we have SQLite VFS support gdal.PushErrorHandler('CPLQuietErrorHandler') ds = ogr.GetDriverByName('SQLite').CreateDataSource('/vsimem/mbtiles_3.db') gdal.PopErrorHandler() if ds is None: pytest.skip() ds = None gdal.Unlink('/vsimem/mbtiles_3.db') ds = gdal.Open('/vsicurl/http://a.tiles.mapbox.com/v3/mapbox.geography-class.mbtiles') if ds is None: # Just skip. The service isn't perfectly reliable sometimes pytest.skip() # long=2,lat=49 in WGS 84 --> x=222638,y=6274861 in Google Mercator locationInfo = ds.GetRasterBand(1).GetMetadataItem('GeoPixel_222638_6274861', 'LocationInfo') if locationInfo is None or locationInfo.find("France") == -1: print(locationInfo) if gdaltest.skip_on_travis(): pytest.skip() pytest.fail('did not get expected LocationInfo') locationInfo2 = ds.GetRasterBand(1).GetOverview(5).GetMetadataItem('GeoPixel_222638_6274861', 'LocationInfo') if locationInfo2 != locationInfo: print(locationInfo2) if gdaltest.skip_on_travis(): pytest.skip() pytest.fail('did not get expected LocationInfo on overview') ############################################################################### # def test_mbtiles_start_webserver(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('HTTP') is None: pytest.skip() (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch(handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() ############################################################################### # def test_mbtiles_http_jpeg_three_bands(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('HTTP') is None: pytest.skip() if gdal.GetDriverByName('JPEG') is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.FileHandler( {'/world_l1.mbtiles': open('data/world_l1.mbtiles', 'rb').read()}) with webserver.install_http_handler(handler): ds = gdal.Open('/vsicurl/http://localhost:%d/world_l1.mbtiles' % gdaltest.webserver_port) assert ds is not None ############################################################################### # def test_mbtiles_http_jpeg_single_band(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('HTTP') is None: pytest.skip() if gdal.GetDriverByName('JPEG') is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.FileHandler( {'/byte_jpeg.mbtiles': open('data/byte_jpeg.mbtiles', 'rb').read()}) with webserver.install_http_handler(handler): ds = gdal.Open('/vsicurl/http://localhost:%d/byte_jpeg.mbtiles' % gdaltest.webserver_port) assert ds is not None ############################################################################### # def test_mbtiles_http_png(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('HTTP') is None: pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.FileHandler( {'/byte.mbtiles': open('data/byte.mbtiles', 'rb').read()}) with webserver.install_http_handler(handler): ds = gdal.Open('/vsicurl/http://localhost:%d/byte.mbtiles' % gdaltest.webserver_port) assert ds is not None ############################################################################### # def test_mbtiles_stop_webserver(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('HTTP') is None: pytest.skip() if gdaltest.webserver_port != 0: webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) ############################################################################### # Basic test without any option def test_mbtiles_4(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('JPEG') is None: pytest.skip() ds = gdal.Open('data/world_l1.mbtiles') assert ds is not None assert ds.RasterCount == 4, 'expected 4 bands' assert ds.GetRasterBand(1).GetOverviewCount() == 1, \ 'did not get expected overview count' assert ds.RasterXSize == 512 and ds.RasterYSize == 510, 'bad dimensions' gt = ds.GetGeoTransform() expected_gt = (-20037508.342789244, 78271.516964020484, 0.0, 19971868.880408563, 0.0, -78271.516964020484) for i in range(6): assert gt[i] == pytest.approx(expected_gt[i], abs=1e-15), 'bad gt' ds = None ############################################################################### # Test write support of a single band dataset def test_mbtiles_5(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') gdaltest.mbtiles_drv.CreateCopy('/vsimem/mbtiles_5.mbtiles', src_ds) src_ds = None ds = gdal.OpenEx('/vsimem/mbtiles_5.mbtiles', open_options=['BAND_COUNT=2']) assert ds.RasterXSize == 19 and ds.RasterYSize == 19 assert ds.RasterCount == 2 got_gt = ds.GetGeoTransform() expected_gt = (-13095853.550435878, 76.437028285176254, 0.0, 4015708.8887064462, 0.0, -76.437028285176254) for i in range(6): assert expected_gt[i] == pytest.approx(got_gt[i], rel=1e-6) got_cs = ds.GetRasterBand(1).Checksum() assert got_cs == 4118 got_cs = ds.GetRasterBand(2).Checksum() assert got_cs == 4406 got_md = ds.GetMetadata() expected_md = {'ZOOM_LEVEL': '11', 'minzoom': '11', 'maxzoom': '11', 'name': 'mbtiles_5', 'format': 'png', 'bounds': '-117.6420540294745,33.89160566594387,-117.6290077648261,33.90243460427036', 'version': '1.1', 'type': 'overlay', 'description': 'mbtiles_5'} assert set(got_md.keys()) == set(expected_md.keys()) for key in got_md: assert key == 'bounds' or got_md[key] == expected_md[key] ds = None gdal.Unlink('/vsimem/mbtiles_5.mbtiles') ############################################################################### # Test write support with options def test_mbtiles_6(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('JPEG') is None: pytest.skip() # Test options src_ds = gdal.Open('data/byte.tif') options = [] options += ['TILE_FORMAT=JPEG'] options += ['QUALITY=50'] options += ['NAME=name'] options += ['DESCRIPTION=description'] options += ['TYPE=baselayer'] options += ['VERSION=version'] options += ['WRITE_BOUNDS=no'] gdaltest.mbtiles_drv.CreateCopy('tmp/mbtiles_6.mbtiles', src_ds, options=options) src_ds = None ds = gdal.Open('tmp/mbtiles_6.mbtiles') got_cs = ds.GetRasterBand(1).Checksum() assert got_cs != 0 got_md = ds.GetMetadata() expected_md = {'ZOOM_LEVEL': '11', 'minzoom': '11', 'maxzoom': '11', 'format': 'jpg', 'version': 'version', 'type': 'baselayer', 'name': 'name', 'description': 'description'} assert got_md == expected_md ds = None gdal.Unlink('tmp/mbtiles_6.mbtiles') ############################################################################### # Test building overview def test_mbtiles_7(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() src_ds = gdal.Open('data/small_world.tif') data = src_ds.ReadRaster() mem_ds = gdal.GetDriverByName('MEM').Create('', src_ds.RasterXSize * 2, src_ds.RasterYSize * 2, src_ds.RasterCount) mem_ds.SetProjection(src_ds.GetProjectionRef()) gt = src_ds.GetGeoTransform() gt = [gt[i] for i in range(6)] gt[1] /= 2 gt[5] /= 2 mem_ds.SetGeoTransform(gt) mem_ds.WriteRaster(0, 0, mem_ds.RasterXSize, mem_ds.RasterYSize, data, src_ds.RasterXSize, src_ds.RasterYSize) src_ds = None gdaltest.mbtiles_drv.CreateCopy('/vsimem/mbtiles_7.mbtiles', mem_ds, options=['TILE_FORMAT=PNG8', 'DITHER=YES', 'RESAMPLING=NEAREST']) mem_ds = None ds = gdal.Open('/vsimem/mbtiles_7.mbtiles', gdal.GA_Update) ds.BuildOverviews('NEAR', [2, 4]) ds = None ds = gdal.Open('/vsimem/mbtiles_7.mbtiles') assert ds.GetRasterBand(1).GetOverviewCount() == 1 expected_ovr_cs = [21179, 22577, 11996, 17849] got_ovr_cs = [ds.GetRasterBand(i + 1).GetOverview(0).Checksum() for i in range(ds.RasterCount)] assert expected_ovr_cs == got_ovr_cs assert ds.GetMetadataItem('minzoom') == '0', ds.GetMetadata() ds = None ds = gdal.Open('/vsimem/mbtiles_7.mbtiles', gdal.GA_Update) ds.BuildOverviews('NONE', []) ds = None ds = gdal.Open('/vsimem/mbtiles_7.mbtiles') assert ds.GetRasterBand(1).GetOverviewCount() == 0 assert ds.GetMetadataItem('minzoom') == '1', ds.GetMetadata() ds = None gdal.Unlink('/vsimem/mbtiles_7.mbtiles') ############################################################################### # Single band with 24 bit color table, PNG def test_mbtiles_8(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() src_ds = gdal.Open('data/small_world_pct.tif') out_ds = gdaltest.mbtiles_drv.CreateCopy('/vsimem/mbtiles_8.mbtiles', src_ds, options=['RESAMPLING=NEAREST']) out_ds = None src_ds = None expected_cs = [993, 50461, 64354] out_ds = gdal.Open('/vsimem/mbtiles_8.mbtiles') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs got_ct = out_ds.GetRasterBand(1).GetColorTable() assert got_ct is None assert out_ds.GetRasterBand(1).GetBlockSize() == [256, 256] out_ds = None # 512 pixel tiles src_ds = gdal.Open('data/small_world_pct.tif') out_ds = gdaltest.mbtiles_drv.CreateCopy('/vsimem/mbtiles_8.mbtiles', src_ds, options=['RESAMPLING=NEAREST', 'BLOCKSIZE=512']) out_ds = None src_ds = None expected_cs = [60844, 7388, 53813] out_ds = gdal.Open('/vsimem/mbtiles_8.mbtiles') got_cs = [out_ds.GetRasterBand(i + 1).Checksum() for i in range(3)] assert got_cs == expected_cs got_ct = out_ds.GetRasterBand(1).GetColorTable() assert got_ct is None assert out_ds.GetRasterBand(1).GetBlockSize() == [512, 512] out_ds = None gdal.Unlink('/vsimem/mbtiles_8.mbtiles') ############################################################################### # Test we are robust to invalid bounds def test_mbtiles_9(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') gdaltest.mbtiles_drv.CreateCopy('/vsimem/mbtiles_9.mbtiles', src_ds, options=['RESAMPLING=NEAREST']) src_ds = None ds = ogr.Open('SQLITE:/vsimem/mbtiles_9.mbtiles', update=1) ds.ExecuteSQL("UPDATE metadata SET value='invalid' WHERE name='bounds'") ds = None with gdaltest.error_handler(): ds = gdal.Open('/vsimem/mbtiles_9.mbtiles') assert ds.RasterXSize == 256 and ds.RasterYSize == 256 assert ds.GetGeoTransform()[0] == pytest.approx(-13110479.091473430395126, abs=1e-6) ds = None gdal.Unlink('/vsimem/mbtiles_9.mbtiles') ############################################################################### # Test compaction of temporary database def test_mbtiles_10(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() old_val_GPKG_FORCE_TEMPDB_COMPACTION = gdal.GetConfigOption('GPKG_FORCE_TEMPDB_COMPACTION') gdal.SetConfigOption('GPKG_FORCE_TEMPDB_COMPACTION', 'YES') with gdaltest.SetCacheMax(0): gdal.Translate('/vsimem/mbtiles_10.mbtiles', '../gcore/data/byte.tif', options='-of MBTILES -outsize 512 512') gdal.SetConfigOption('GPKG_FORCE_TEMPDB_COMPACTION', old_val_GPKG_FORCE_TEMPDB_COMPACTION) ds = gdal.Open('/vsimem/mbtiles_10.mbtiles') cs = ds.GetRasterBand(1).Checksum() assert cs in (29925, 30092) # 30092 on Mac ds = None gdal.Unlink('/vsimem/mbtiles_10.mbtiles') ############################################################################### # Test opening a .mbtiles.sql file def test_mbtiles_11(): if gdaltest.mbtiles_drv is None: pytest.skip() if gdaltest.mbtiles_drv.GetMetadataItem("ENABLE_SQL_SQLITE_FORMAT") != 'YES': pytest.skip() if gdal.GetDriverByName('PNG') is None: pytest.skip() ds = gdal.Open('data/byte.mbtiles.sql') assert ds.GetRasterBand(1).Checksum() == 4118, 'validation failed' ############################################################################### def test_mbtiles_raster_open_in_vector_mode(): if gdaltest.mbtiles_drv is None: pytest.skip() ds = ogr.Open('data/byte.mbtiles') assert ds is None ############################################################################### def test_mbtiles_create(): if gdaltest.mbtiles_drv is None: pytest.skip() filename = '/vsimem/mbtiles_create.mbtiles' gdaltest.mbtiles_drv.Create(filename, 1, 1, 1) with gdaltest.error_handler(): assert gdal.Open(filename) is None # Nominal case gdal.Unlink(filename) src_ds = gdal.Open('data/byte.mbtiles') ds = gdaltest.mbtiles_drv.Create(filename, src_ds.RasterXSize, src_ds.RasterYSize) ds.SetGeoTransform(src_ds.GetGeoTransform()) ds.SetProjection(src_ds.GetProjectionRef()) # Cannot modify geotransform once set" with gdaltest.error_handler(): ret = ds.SetGeoTransform(src_ds.GetGeoTransform()) assert ret != 0 ds = None ds = gdal.Open('data/byte.mbtiles') # SetGeoTransform() not supported on read-only dataset" with gdaltest.error_handler(): ret = ds.SetGeoTransform(src_ds.GetGeoTransform()) assert ret != 0 # SetProjection() not supported on read-only dataset with gdaltest.error_handler(): ret = ds.SetProjection(src_ds.GetProjectionRef()) assert ret != 0 ds = None gdal.Unlink(filename) ds = gdaltest.mbtiles_drv.Create(filename, src_ds.RasterXSize, src_ds.RasterYSize) # Only EPSG:3857 supported on MBTiles dataset with gdaltest.error_handler(): ret = ds.SetProjection('LOCAL_CS["foo"]') assert ret != 0 ds = None gdal.Unlink(filename) ds = gdaltest.mbtiles_drv.Create(filename, src_ds.RasterXSize, src_ds.RasterYSize) # Only north-up non rotated geotransform supported with gdaltest.error_handler(): ret = ds.SetGeoTransform([0, 1, 0, 0, 0, 1]) assert ret != 0 ds = None gdal.Unlink(filename) ds = gdaltest.mbtiles_drv.Create(filename, src_ds.RasterXSize, src_ds.RasterYSize) # Could not find an appropriate zoom level that matches raster pixel size with gdaltest.error_handler(): ret = ds.SetGeoTransform([0, 1, 0, 0, 0, -1]) assert ret != 0 ds = None gdal.Unlink(filename) ############################################################################### # Cleanup def test_mbtiles_cleanup(): if gdaltest.mbtiles_drv is None: pytest.skip() gdalautotest-3.1.2/gdrivers/plmosaic.py0000775000175000017500000006770213701060016016712 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: plmosaic.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: PlanetLabs mosaic driver test suite. # Author: Even Rouault, even dot rouault at spatialys.com # ############################################################################### # Copyright (c) 2015, Planet Labs # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import struct from osgeo import gdal import gdaltest import pytest ############################################################################### # Find PLMosaic driver def test_plmosaic_1(): gdaltest.plmosaic_drv = gdal.GetDriverByName('PLMosaic') if gdaltest.plmosaic_drv is not None: return pytest.skip() ############################################################################### # Error: no API_KEY def test_plmosaic_2(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert ds is None ############################################################################### # Error case: invalid root URL def test_plmosaic_3(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/does_not_exist/') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert ds is None ############################################################################### # Error case: invalid JSON def test_plmosaic_4(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root', """{""") gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert ds is None ############################################################################### # Error case: not a JSON dictionary def test_plmosaic_5(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root', """null""") gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert ds is None ############################################################################### # Error case: missing "mosaics" element def test_plmosaic_6(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root', """{}""") gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert ds is None ############################################################################### # Valid root but no mosaics def test_plmosaic_7(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root', """{ "mosaics": [], }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds is None ds = None ############################################################################### # Valid root with 2 mosaics def test_plmosaic_8(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root', """{ "_links" : { "_next": "/vsimem/root/?page=2" }, "mosaics": [ { "id": "my_mosaic_id", "name": "my_mosaic_name", "coordinate_system": "EPSG:3857", "_links" : { "_self": "/vsimem/root/my_mosaic" }, "quad_download": true } ], }""") gdal.FileFromMemBuffer('/vsimem/root/?page=2', """{ "_links" : { "_next": null }, "mosaics": [ { "id": "another_mosaic_id", "name": "another_mosaic_name", "coordinate_system": "EPSG:3857", "_links" : { "_self": "/vsimem/root/another_mosaic" }, "quad_download": true }, { "id": "this_one_will_be_ignored", "name": "this_one_will_be_ignored", "coordinate_system": "EPSG:1234", "_links" : { "_self": "/vsimem/root/this_one_will_be_ignored" }, "quad_download": true } ], }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds.GetMetadata("SUBDATASETS") == {'SUBDATASET_2_NAME': 'PLMOSAIC:mosaic=another_mosaic_name', 'SUBDATASET_2_DESC': 'Mosaic another_mosaic_name', 'SUBDATASET_1_NAME': 'PLMOSAIC:mosaic=my_mosaic_name', 'SUBDATASET_1_DESC': 'Mosaic my_mosaic_name'} ds = None ############################################################################### # Error case: invalid mosaic def test_plmosaic_9(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=does_not_exist']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert ds is None and gdal.GetLastErrorMsg().find('/vsimem/root/?name__is=does_not_exist') >= 0 ############################################################################### # Invalid mosaic definition: invalid JSON def test_plmosaic_9bis(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('JSON parsing error') >= 0 ############################################################################### # Invalid mosaic definition: JSON without mosaics array def test_plmosaic_9ter(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{}""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('No mosaic my_mosaic') >= 0 ############################################################################### # Invalid mosaic definition: missing parameters def test_plmosaic_10(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic" }] }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('Missing required parameter') >= 0 ############################################################################### # Invalid mosaic definition: unsupported projection def test_plmosaic_11(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:1234", "datatype": "byte", "grid": { "quad_size": 4096, "resolution": 4.77731426716 } }] }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('Unsupported coordinate_system') >= 0 ############################################################################### # Invalid mosaic definition: unsupported datatype def test_plmosaic_12(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "datatype": "blabla", "grid": { "quad_size": 4096, "resolution": 4.77731426716 } }] }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('Unsupported data_type') >= 0 ############################################################################### # Invalid mosaic definition: unsupported resolution def test_plmosaic_13(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "datatype": "byte", "grid": { "quad_size": 4096, "resolution": 1.1234 } }] }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('Unsupported resolution') >= 0 ############################################################################### # Invalid mosaic definition: unsupported quad_size def test_plmosaic_14(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "datatype": "byte", "grid": { "quad_size": 1234, "resolution": 4.77731426716 } }] }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('Unsupported quad_size') >= 0 ############################################################################### # Nearly valid mosaic definition. Warning about invalid links.tiles def test_plmosaic_15(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "datatype": "byte", "grid": { "quad_size": 4096, "resolution": 4.77731426716 }, "first_acquired": "first_date", "last_acquired": "last_date", "_links" : { "tiles" : "/vsimem/root/my_mosaic/tiles/foo" }, "quad_download": true }] }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=tmp']) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert gdal.GetLastErrorMsg().find('Invalid _links.tiles') >= 0 assert ds.GetRasterBand(1).GetOverviewCount() == 0 assert ds.GetRasterBand(1).GetOverview(0) is None ds = None ############################################################################### # Valid mosaic definition def test_plmosaic_16(): if gdaltest.plmosaic_drv is None: pytest.skip() try: shutil.rmtree('tmp/plmosaic_cache') except OSError: pass gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "datatype": "byte", "grid": { "quad_size": 4096, "resolution": 4.77731426716 }, "first_acquired": "first_date", "last_acquired": "last_date", "_links" : { "tiles" : "/vsimem/root/my_mosaic/tiles{0-3}/{z}/{x}/{y}.png" }, "quad_download": true }] }""") # Valid root: one single mosaic, should open the dataset directly gdal.FileFromMemBuffer('/vsimem/root', """{ "mosaics": [ { "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "_links" : { "_self": "/vsimem/root/my_mosaic" }, "quad_download": true } ], }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') gdal.PushErrorHandler() ds = gdal.OpenEx('PLMosaic:api_key=foo,unsupported_option=val', gdal.OF_RASTER) gdal.PopErrorHandler() gdal.SetConfigOption('PL_URL', None) assert ds is None and gdal.GetLastErrorMsg().find('Unsupported option unsupported_option') >= 0 gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds.GetMetadata("SUBDATASETS") == {} assert ds.GetMetadata() == {'LAST_ACQUIRED': 'last_date', 'NAME': 'my_mosaic', 'FIRST_ACQUIRED': 'first_date'} ds = None ############################################################################### # Open with explicit MOSAIC dataset open option def test_plmosaic_17(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=tmp']) gdal.SetConfigOption('PL_URL', None) assert ds is not None assert ds.GetMetadata() == {'LAST_ACQUIRED': 'last_date', 'NAME': 'my_mosaic', 'FIRST_ACQUIRED': 'first_date'} assert ds.GetProjectionRef().find('3857') >= 0 assert ds.RasterXSize == 8388608 assert ds.RasterYSize == 8388608 got_gt = ds.GetGeoTransform() expected_gt = (-20037508.34, 4.7773142671600004, 0.0, 20037508.34, 0.0, -4.7773142671600004) for i in range(6): assert got_gt[i] == pytest.approx(expected_gt[i], abs=1e-8), ds.GetGeoTransform() assert ds.GetMetadataItem('INTERLEAVE', 'IMAGE_STRUCTURE') == 'PIXEL', \ ds.GetMetadata('IMAGE_STRUCTURE') assert ds.GetRasterBand(1).GetOverviewCount() == 15 assert ds.GetRasterBand(1).GetOverview(-1) is None assert ds.GetRasterBand(1).GetOverview(ds.GetRasterBand(1).GetOverviewCount()) is None assert ds.GetRasterBand(1).GetOverview(0) is not None try: shutil.rmtree('tmp/plmosaic_cache') except OSError: pass for i in range(12): # Read at one nonexistent position. ds.GetRasterBand(1).ReadRaster(4096 * i, 0, 1, 1) assert gdal.GetLastErrorMsg() == '' for i in range(11, -1, -1): # Again in the same quad, but in different block, to test cache ds.GetRasterBand(1).ReadRaster(4096 * i + 256, 0, 1, 1) assert gdal.GetLastErrorMsg() == '' for i in range(12): # Again in the same quad, but in different block, to test cache ds.GetRasterBand(1).ReadRaster(4096 * i + 512, 256, 1, 1) assert gdal.GetLastErrorMsg() == '' ds.FlushCache() # Invalid tile content gdal.FileFromMemBuffer('/vsimem/root/my_mosaic_id/quads/0-2047/full', 'garbage') gdal.PushErrorHandler() ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) gdal.PopErrorHandler() os.stat('tmp/plmosaic_cache/my_mosaic/my_mosaic_0-2047.tif') ds.FlushCache() shutil.rmtree('tmp/plmosaic_cache') # GeoTIFF but with wrong dimensions gdal.GetDriverByName('GTiff').Create('/vsimem/root/my_mosaic_id/quads/0-2047/full', 1, 1, 1) gdal.PushErrorHandler() ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) gdal.PopErrorHandler() os.stat('tmp/plmosaic_cache/my_mosaic/my_mosaic_0-2047.tif') ds.FlushCache() shutil.rmtree('tmp/plmosaic_cache') # Good GeoTIFF tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/root/my_mosaic_id/quads/0-2047/full', 4096, 4096, 4, options=['INTERLEAVE=BAND', 'SPARSE_OK=YES']) tmp_ds.GetRasterBand(1).Fill(255) tmp_ds = None val = ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) val = struct.unpack('B', val)[0] assert val == 255 os.stat('tmp/plmosaic_cache/my_mosaic/my_mosaic_0-2047.tif') ds.FlushCache() # Read again from file cache. # We change the file behind the scene (but not changing its size) # to demonstrate that the cached tile is still use tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/root/my_mosaic_id/quads/0-2047/full', 4096, 4096, 4, options=['INTERLEAVE=BAND', 'SPARSE_OK=YES']) tmp_ds.GetRasterBand(1).Fill(1) tmp_ds = None val = ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) val = struct.unpack('B', val)[0] assert val == 255 ds = None # Read again from file cache, but with TRUST_CACHE=YES # delete the full GeoTIFF before gdal.Unlink('/vsimem/root/my_mosaic_id/quads/0-2047/full') gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:API_KEY=foo,MOSAIC=my_mosaic,CACHE_PATH=tmp,TRUST_CACHE=YES', gdal.OF_RASTER) gdal.SetConfigOption('PL_URL', None) val = ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) val = struct.unpack('B', val)[0] assert val == 255 ds = None # Read again from file cache but the metatile has changed in between gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=tmp']) gdal.SetConfigOption('PL_URL', None) tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/root/my_mosaic_id/quads/0-2047/full', 4096, 4096, 4, options=['INTERLEAVE=BAND', 'SPARSE_OK=YES']) tmp_ds.SetMetadataItem('foo', 'bar') tmp_ds.GetRasterBand(1).Fill(254) tmp_ds = None val = ds.ReadRaster(0, 0, 1, 1) val = struct.unpack('B' * 4, val) assert val == (254, 0, 0, 0) ############################################################################### # Test location info def test_plmosaic_18(): if gdaltest.plmosaic_drv is None: pytest.skip() shutil.rmtree('tmp/plmosaic_cache') gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=tmp']) gdal.SetConfigOption('PL_URL', None) ret = ds.GetRasterBand(1).GetMetadataItem('Pixel_0_0', 'LocationInfo') assert ret == """ """ old_ret = ret ret = ds.GetRasterBand(1).GetMetadataItem('Pixel_0_0', 'LocationInfo') assert ret == old_ret gdal.FileFromMemBuffer('/vsimem/root/my_mosaic_id/quads/0-2047/items', """{ "items": [ { "link": "foo" } ] }""") ds.FlushCache() ret = ds.GetRasterBand(1).GetMetadataItem('Pixel_0_0', 'LocationInfo') assert ret == """ foo """ ds = None ############################################################################### # Try error in saving in cache def test_plmosaic_19(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=/does_not_exist']) gdal.SetConfigOption('PL_URL', None) gdal.PushErrorHandler() val = ds.ReadRaster(0, 0, 1, 1) gdal.PopErrorHandler() val = struct.unpack('B' * 4, val) assert val == (254, 0, 0, 0) val = ds.ReadRaster(256, 0, 1, 1) val = struct.unpack('B' * 4, val) assert val == (254, 0, 0, 0) ds = None ############################################################################### # Try disabling cache def test_plmosaic_20(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=']) gdal.SetConfigOption('PL_URL', None) val = ds.ReadRaster(0, 0, 1, 1) val = struct.unpack('B' * 4, val) assert val == (254, 0, 0, 0) val = ds.ReadRaster(256, 0, 1, 1) val = struct.unpack('B' * 4, val) assert val == (254, 0, 0, 0) ds = None ############################################################################### # Try use_tiles def test_plmosaic_21(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=my_mosaic', 'CACHE_PATH=', 'USE_TILES=YES']) gdal.SetConfigOption('PL_URL', None) gdal.ErrorReset() gdal.PushErrorHandler() ds.ReadRaster(256, 512, 1, 1) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() gdal.PushErrorHandler() ds.GetRasterBand(1).ReadRaster(256, 512, 1, 1) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() gdal.PushErrorHandler() ds.GetRasterBand(1).ReadBlock(1, 2) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg() != '' gdal.FileFromMemBuffer('/vsimem/root/?name__is=mosaic_uint16', """{ "mosaics": [{ "id": "mosaic_uint16", "name": "mosaic_uint16", "coordinate_system": "EPSG:3857", "datatype": "uint16", "grid": { "quad_size": 4096, "resolution": 4.77731426716 }, "first_acquired": "first_date", "last_acquired": "last_date", "_links" : { "tiles" : "/vsimem/root/mosaic_uint16/tiles{0-3}/{z}/{x}/{y}.png" }, "quad_download": true }] }""") # Should emit a warning gdal.ErrorReset() gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=mosaic_uint16', 'CACHE_PATH=', 'USE_TILES=YES']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Cannot use tile API for full resolution data on non Byte mosaic') >= 0 gdal.FileFromMemBuffer('/vsimem/root/?name__is=mosaic_without_tiles', """{ "mosaics": [{ "id": "mosaic_without_tiles", "name": "mosaic_without_tiles", "coordinate_system": "EPSG:3857", "datatype": "byte", "grid": { "quad_size": 4096, "resolution": 4.77731426716 }, "first_acquired": "first_date", "last_acquired": "last_date", "quad_download": true }] }""") # Should emit a warning gdal.ErrorReset() gdal.PushErrorHandler() gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo', 'MOSAIC=mosaic_without_tiles', 'CACHE_PATH=', 'USE_TILES=YES']) gdal.SetConfigOption('PL_URL', None) gdal.PopErrorHandler() assert gdal.GetLastErrorMsg().find('Cannot find tile definition, so use_tiles will be ignored') >= 0 ############################################################################### # Valid mosaic definition with bbox def test_plmosaic_with_bbox(): if gdaltest.plmosaic_drv is None: pytest.skip() try: shutil.rmtree('tmp/plmosaic_cache') except OSError: pass gdal.FileFromMemBuffer('/vsimem/root/?name__is=my_mosaic', """{ "mosaics": [{ "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "datatype": "byte", "grid": { "quad_size": 4096, "resolution": 4.77731426716 }, "bbox" : [ -100, 30, -90, 40 ], "first_acquired": "first_date", "last_acquired": "last_date", "_links" : { "tiles" : "/vsimem/root/my_mosaic/tiles{0-3}/{z}/{x}/{y}.png" }, "quad_download": true }] }""") # Valid root: one single mosaic, should open the dataset directly gdal.FileFromMemBuffer('/vsimem/root', """{ "mosaics": [ { "id": "my_mosaic_id", "name": "my_mosaic", "coordinate_system": "EPSG:3857", "_links" : { "_self": "/vsimem/root/my_mosaic" }, "quad_download": true } ], }""") gdal.SetConfigOption('PL_URL', '/vsimem/root') ds = gdal.OpenEx('PLMosaic:', gdal.OF_RASTER, open_options=['API_KEY=foo']) gdal.SetConfigOption('PL_URL', None) assert ds.RasterXSize == 233472 assert ds.RasterYSize == 286720 got_gt = ds.GetGeoTransform() expected_gt = (-11134123.286585508, 4.77731426716, 0.0, 4872401.930333553, 0.0, -4.77731426716) for i in range(6): assert got_gt[i] == pytest.approx(expected_gt[i], abs=1e-8) # Good GeoTIFF tmp_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/root/my_mosaic_id/quads/455-1272/full', 4096, 4096, 4, options=['INTERLEAVE=BAND', 'SPARSE_OK=YES']) tmp_ds.GetRasterBand(1).Fill(125) tmp_ds = None val = ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) val = struct.unpack('B', val)[0] assert val == 125 gdal.FileFromMemBuffer('/vsimem/root/my_mosaic_id/quads/455-1272/items', """{ "items": [ { "link": "bar" } ] }""") ret = ds.GetRasterBand(1).GetMetadataItem('Pixel_0_0', 'LocationInfo') assert ret == """ bar """ ############################################################################### # def test_plmosaic_cleanup(): if gdaltest.plmosaic_drv is None: pytest.skip() gdal.Unlink('/vsimem/root_no_mosaics') gdal.Unlink('/vsimem/root') gdal.Unlink('/vsimem/root/?page=2') gdal.Unlink('/vsimem/root/?name__is=my_mosaic') gdal.Unlink('/vsimem/root/my_mosaic_id/quads/0-2047/full') gdal.Unlink('/vsimem/root/my_mosaic_id/quads/0-2047/items') gdal.Unlink('/vsimem/root/my_mosaic_id/quads/455-1272/full') gdal.Unlink('/vsimem/root/my_mosaic_id/quads/455-1272/items') gdal.Unlink('/vsimem/root/?name__is=mosaic_uint16') gdal.Unlink('/vsimem/root/?name__is=mosaic_without_tiles') if gdal.ReadDir('/vsimem/root') is not None: print(gdal.ReadDir('/vsimem/root')) try: shutil.rmtree('tmp/plmosaic_cache') except OSError: pass gdalautotest-3.1.2/gdrivers/vrtderived.py0000775000175000017500000007156213701060016017260 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: vrtderived.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test AddBand() with VRTDerivedRasterBand. # Author: Antonio Valentino # ############################################################################### # Copyright (c) 2011, Antonio Valentino # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import shutil import threading from osgeo import gdal import gdaltest import pytest def _xmlsearch(root, nodetype, name): for node in root[2:]: if node[0] == nodetype and node[1] == name: return node ############################################################################### # Verify raster band subClass def test_vrtderived_1(): filename = 'tmp/derived.vrt' vrt_ds = gdal.GetDriverByName('VRT').Create(filename, 50, 50, 0) options = [ 'subClass=VRTDerivedRasterBand', ] vrt_ds.AddBand(gdal.GDT_Byte, options) simpleSourceXML = ''' data/byte.tif 1 ''' md = {} md['source_0'] = simpleSourceXML vrt_ds.GetRasterBand(1).SetMetadata(md, 'vrt_sources') md_read = vrt_ds.GetRasterBand(1).GetMetadata('vrt_sources') vrt_ds = None expected_md_read = ( '\n' ' data/byte.tif\n' ' 1\n' ' \n' '\n') assert md_read['source_0'] == expected_md_read xmlstring = open(filename).read() gdal.Unlink(filename) node = gdal.ParseXMLString(xmlstring) node = _xmlsearch(node, gdal.CXT_Element, 'VRTRasterBand') node = _xmlsearch(node, gdal.CXT_Attribute, 'subClass') node = _xmlsearch(node, gdal.CXT_Text, 'VRTDerivedRasterBand') assert node is not None, 'invalid subclass' ############################################################################### # Verify derived raster band pixel function type def test_vrtderived_2(): filename = 'tmp/derived.vrt' vrt_ds = gdal.GetDriverByName('VRT').Create(filename, 50, 50, 0) options = [ 'subClass=VRTDerivedRasterBand', 'PixelFunctionType=dummy', 'PixelFunctionLanguage=Python', ] vrt_ds.AddBand(gdal.GDT_Byte, options) simpleSourceXML = ''' data/byte.tif 1 ''' md = {} md['source_0'] = simpleSourceXML vrt_ds.GetRasterBand(1).SetMetadata(md, 'vrt_sources') with gdaltest.error_handler(): cs = vrt_ds.GetRasterBand(1).Checksum() assert cs == 0 with gdaltest.error_handler(): ret = vrt_ds.GetRasterBand(1).WriteRaster(0, 0, 1, 1, ' ') assert ret != 0 vrt_ds = None xmlstring = open(filename).read() gdal.Unlink(filename) node = gdal.ParseXMLString(xmlstring) node = _xmlsearch(node, gdal.CXT_Element, 'VRTRasterBand') pixelfunctiontype = _xmlsearch(node, gdal.CXT_Element, 'PixelFunctionType') pixelfunctiontype = _xmlsearch(pixelfunctiontype, gdal.CXT_Text, 'dummy') assert pixelfunctiontype is not None, 'incorrect PixelFunctionType value' pixelfunctionlanguage = _xmlsearch(node, gdal.CXT_Element, 'PixelFunctionLanguage') pixelfunctionlanguage = _xmlsearch(pixelfunctionlanguage, gdal.CXT_Text, 'Python') assert pixelfunctionlanguage is not None, 'incorrect PixelFunctionLanguage value' ############################################################################### # Verify derived raster band transfer type def test_vrtderived_3(): filename = 'tmp/derived.vrt' vrt_ds = gdal.GetDriverByName('VRT').Create(filename, 50, 50, 0) options = [ 'subClass=VRTDerivedRasterBand', 'PixelFunctionType=dummy', 'SourceTransferType=Byte', ] vrt_ds.AddBand(gdal.GDT_Byte, options) simpleSourceXML = ''' data/byte.tif 1 ''' md = {} md['source_0'] = simpleSourceXML vrt_ds.GetRasterBand(1).SetMetadata(md, 'vrt_sources') vrt_ds = None xmlstring = open(filename).read() gdal.Unlink(filename) node = gdal.ParseXMLString(xmlstring) node = _xmlsearch(node, gdal.CXT_Element, 'VRTRasterBand') node = _xmlsearch(node, gdal.CXT_Element, 'SourceTransferType') node = _xmlsearch(node, gdal.CXT_Text, 'Byte') assert node is not None, 'incorrect SourceTransferType value' ############################################################################### # Check handling of invalid derived raster band transfer type def test_vrtderived_4(): filename = 'tmp/derived.vrt' vrt_ds = gdal.GetDriverByName('VRT').Create(filename, 50, 50, 0) options = [ 'subClass=VRTDerivedRasterBand', 'PixelFunctionType=dummy', 'SourceTransferType=Invalid', ] gdal.PushErrorHandler('CPLQuietErrorHandler') ret = vrt_ds.AddBand(gdal.GDT_Byte, options) gdal.PopErrorHandler() assert ret != 0, 'invalid SourceTransferType value not detected' ############################################################################### # Check Python derived function with BufferRadius=1 def test_vrtderived_5(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') ds = gdal.Open('data/n43_hillshade.vrt') cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) assert cs == 50577, 'invalid checksum' ############################################################################### # Check Python derived function with BufferRadius=0 and no source def test_vrtderived_6(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') ds = gdal.Open('data/python_ones.vrt') cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) assert cs == 10000, 'invalid checksum' ############################################################################### # Check Python derived function with no started Python interpreter def test_vrtderived_7(): import test_cli_utilities if test_cli_utilities.get_gdalinfo_path() is None: pytest.skip() ret, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' -checksum data/n43_hillshade.vrt --config GDAL_VRT_ENABLE_PYTHON YES') if gdal.GetConfigOption('CPL_DEBUG') is not None: print(err) # Either we cannot find a Python library, either it works if 'Checksum=0' in ret: print('Did not manage to find a Python library') elif 'Checksum=50577' not in ret: print(err) pytest.fail(ret) ret, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' -checksum data/n43_hillshade.vrt --config GDAL_VRT_ENABLE_PYTHON YES --config VRT_ENABLE_PYTHON_PATH NO') if gdal.GetConfigOption('CPL_DEBUG') is not None: print(err) # Either we cannot find a Python library, either it works if 'Checksum=0' in ret: print('Did not manage to find a Python library') elif 'Checksum=50577' not in ret: print(err) pytest.fail(ret) ret, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' -checksum data/n43_hillshade.vrt --config GDAL_VRT_ENABLE_PYTHON YES --config VRT_ENABLE_PYTHON_SYMLINK NO') if gdal.GetConfigOption('CPL_DEBUG') is not None: print(err) # Either we cannot find a Python library, either it works if 'Checksum=0' in ret: print('Did not manage to find a Python library') elif 'Checksum=50577' not in ret: print(err) pytest.fail(ret) # Invalid shared object name ret, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' -checksum data/n43_hillshade.vrt --config GDAL_VRT_ENABLE_PYTHON YES --config PYTHONSO foo') if gdal.GetConfigOption('CPL_DEBUG') is not None: print(err) assert 'Checksum=0' in ret, err # Valid shared object name, but without Python symbols libgdal_so = gdaltest.find_lib('gdal') if libgdal_so is not None: ret, err = gdaltest.runexternal_out_and_err(test_cli_utilities.get_gdalinfo_path() + ' -checksum data/n43_hillshade.vrt --config GDAL_VRT_ENABLE_PYTHON YES --config PYTHONSO "%s"' % libgdal_so) if gdal.GetConfigOption('CPL_DEBUG') is not None: print(err) assert 'Checksum=0' in ret, err ############################################################################### # Check that GDAL_VRT_ENABLE_PYTHON=NO or undefined is honored def test_vrtderived_8(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'NO') ds = gdal.Open('data/n43_hillshade.vrt') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) assert cs == 0, 'invalid checksum' ds = gdal.Open('data/n43_hillshade.vrt') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() assert cs == 0, 'invalid checksum' ############################################################################### # Check various failure modes with Python functions def test_vrtderived_9(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() # Missing PixelFunctionType with gdaltest.error_handler(): ds = gdal.Open(""" Python """) assert ds is None # Unsupported PixelFunctionLanguage with gdaltest.error_handler(): ds = gdal.Open(""" identity foo """) assert ds is None # PixelFunctionCode can only be used with Python with gdaltest.error_handler(): ds = gdal.Open(""" identity """) assert ds is None # PixelFunctionArguments can only be used with Python with gdaltest.error_handler(): ds = gdal.Open(""" identity """) assert ds is None # BufferRadius can only be used with Python with gdaltest.error_handler(): ds = gdal.Open(""" identity 1 """) assert ds is None # Invalid BufferRadius with gdaltest.error_handler(): ds = gdal.Open(""" identity Python -1 """) assert ds is None # Error at Python code compilation (indentation error) ds = gdal.Open(""" identity Python """) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # Error at run time (in global code) ds = gdal.Open(""" identity Python """) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # Error at run time (in pixel function) ds = gdal.Open(""" identity Python """) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # User exception ds = gdal.Open(""" identity Python """) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # unknown_function ds = gdal.Open(""" unknown_function Python """) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # uncallable object ds = gdal.Open(""" uncallable_object Python """) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # unknown_module ds = gdal.Open(""" unknown_module.unknown_function Python """) with gdaltest.error_handler(): gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') def vrtderived_code_that_only_makes_sense_with_GDAL_VRT_ENABLE_PYTHON_equal_IF_SAFE_but_that_is_now_disabled(): # untrusted import ds = gdal.Open(""" my_func Python """) with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # untrusted function ds = gdal.Open(""" my_func Python """) with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # GDAL_VRT_ENABLE_PYTHON not set to YES ds = gdal.Open(""" vrtderived.one_pix_func Python """) with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') ############################################################################### # Check Python function in another module def one_pix_func(in_ar, out_ar, xoff, yoff, xsize, ysize, raster_xsize, raster_ysize, r, gt, **kwargs): # pylint: disable=unused-argument out_ar.fill(1) def test_vrtderived_10(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() content = """ Gray vrtderived.one_pix_func Python """ ds = gdal.Open(content) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 100: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # GDAL_VRT_TRUSTED_MODULES not defined ds = gdal.Open(content) with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # GDAL_VRT_PYTHON_TRUSTED_MODULES *NOT* matching our module for val in ['vrtderive', 'vrtderivedX', 'vrtderivedX*', 'vrtderive.*' 'vrtderivedX.*']: ds = gdal.Open(content) gdal.SetConfigOption('GDAL_VRT_PYTHON_TRUSTED_MODULES', val) with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_PYTHON_TRUSTED_MODULES', None) if cs != 0: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # GDAL_VRT_PYTHON_TRUSTED_MODULES matching our module for val in ['foo,vrtderived,bar', '*', 'foo,vrtderived*,bar', 'foo,vrtderived.*,bar', 'foo,vrtderi*,bar']: ds = gdal.Open(content) gdal.SetConfigOption('GDAL_VRT_PYTHON_TRUSTED_MODULES', val) cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_PYTHON_TRUSTED_MODULES', None) if cs != 100: print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') ############################################################################### # Test serializing with python code def test_vrtderived_11(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() shutil.copy('data/n43_hillshade.vrt', 'tmp/n43_hillshade.vrt') shutil.copy('data/n43.dt0', 'tmp/n43.dt0') ds = gdal.Open('tmp/n43_hillshade.vrt', gdal.GA_Update) ds.SetMetadataItem('foo', 'bar') ds = None ds = gdal.Open('tmp/n43_hillshade.vrt') gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', 'YES') cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) ds = None os.unlink('tmp/n43_hillshade.vrt') os.unlink('tmp/n43.dt0') assert cs == 50577, 'invalid checksum' ############################################################################### # Test all data types with python code def test_vrtderived_12(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() for dt in ["Byte", "UInt16", "Int16", "UInt32", "Int32", "Float32", "Float64", "CInt16", "CInt32", "CFloat32", "CFloat64"]: ds = gdal.Open(""" Gray vrtderived.one_pix_func Python """ % dt) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) # CInt16/CInt32 do not map to native numpy types if dt == 'CInt16' or dt == 'CInt32': expected_cs = 0 # error else: expected_cs = 100 if cs != expected_cs: print(dt) print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') # Same for SourceTransferType for dt in ["CInt16", "CInt32"]: ds = gdal.Open(""" Byte Gray vrtderived.one_pix_func Python """ % dt) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") with gdaltest.error_handler(): cs = ds.GetRasterBand(1).Checksum() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) if cs != 0: print(dt) print(gdal.GetLastErrorMsg()) pytest.fail('invalid checksum') ############################################################################### # Test translating a Python derived VRT def test_vrtderived_13(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") # Will test the VRTDerivedRasterBand::IGetDataCoverageStatus() interface ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/vrtderived_13.tif', gdal.Open('data/python_ones.vrt')) gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) cs = ds.GetRasterBand(1).Checksum() ds = None gdal.Unlink('/vsimem/vrtderived_13.tif') assert cs == 10000, 'invalid checksum' ############################################################################### # Test statistics functions def test_vrtderived_14(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/vrtderived_14.vrt', gdal.Open('data/python_ones.vrt')) (my_min, my_max) = ds.GetRasterBand(1).ComputeRasterMinMax() (my_min2, my_max2, mean, stddev) = ds.GetRasterBand(1).ComputeStatistics(False) hist = ds.GetRasterBand(1).GetHistogram() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) assert (my_min, my_max) == (1.0, 1.0), 'invalid ComputeRasterMinMax' assert (my_min2, my_max2, mean, stddev) == (1.0, 1.0, 1.0, 0.0), \ 'invalid ComputeStatistics' assert hist[1] == 10000, 'invalid GetHistogram' ds = None gdal.GetDriverByName('VRT').Delete('/vsimem/vrtderived_14.vrt') ############################################################################### # Test threading def vrtderived_15_worker(args_dict): content = """ Gray vrtderived.one_pix_func Python """ ds = gdal.Open(content) for _ in range(5): cs = ds.GetRasterBand(1).Checksum() if cs != 2304: print(cs) args_dict['ret'] = False ds.FlushCache() def test_vrtderived_15(): try: import numpy numpy.ones except (ImportError, AttributeError): pytest.skip() gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', "YES") threads = [] args_array = [] for i in range(4): args_dict = {'ret': True} t = threading.Thread(target=vrtderived_15_worker, args=(args_dict,)) args_array.append(args_dict) threads.append(t) t.start() ret = 'success' for i in range(4): threads[i].join() if not args_array[i]: ret = 'fail' gdal.SetConfigOption('GDAL_VRT_ENABLE_PYTHON', None) return ret ############################################################################### # Cleanup. def test_vrtderived_cleanup(): try: os.remove('tmp/derived.vrt') except OSError: pass gdalautotest-3.1.2/gdrivers/jpeg2000.py0000775000175000017500000003524513701060016016327 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: jpeg2000.py 2da6e90962a140a55650fd7ccf263cbf84c52b9c 2019-08-07 14:31:52 +1200 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for Jasper/JP2ECW driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2009-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import pytest gdaltest.buggy_jasper = None def is_buggy_jasper(): if gdaltest.buggy_jasper is not None: return gdaltest.buggy_jasper gdaltest.buggy_jasper = False if gdal.GetDriverByName('JPEG2000') is None: return False # This test will cause a crash with an unpatched version of Jasper, such as the one of Ubuntu 8.04 LTS # --> "jpc_dec.c:1072: jpc_dec_tiledecode: Assertion `dec->numcomps == 3' failed." # Recent Debian/Ubuntu have the appropriate patch. # So we try to run in a subprocess first import test_cli_utilities if test_cli_utilities.get_gdalinfo_path() is not None: ret = gdaltest.runexternal(test_cli_utilities.get_gdalinfo_path() + ' --config GDAL_SKIP "JP2ECW JP2MRSID JP2KAK JP2OpenJPEG" data/3_13bit_and_1bit.jp2') if ret.find('Band 1') == -1: gdaltest.post_reason('Jasper library would need patches') gdaltest.buggy_jasper = True return True return False ############################################################################### # Verify we have the driver. def test_jpeg2000_1(): gdaltest.jpeg2000_drv = gdal.GetDriverByName('JPEG2000') gdaltest.deregister_all_jpeg2000_drivers_but('JPEG2000') ############################################################################### # Open byte.jp2 def test_jpeg2000_2(): if gdaltest.jpeg2000_drv is None: pytest.skip() srs = """PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]] """ gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) tst = gdaltest.GDALTest('JPEG2000', 'byte.jp2', 1, 50054) return tst.testOpen(check_prj=srs, check_gt=gt) ############################################################################### # Open int16.jp2 def test_jpeg2000_3(): if gdaltest.jpeg2000_drv is None: pytest.skip() ds = gdal.Open('data/int16.jp2') ds_ref = gdal.Open('data/int16.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Quite a bit of difference... assert maxdiff <= 6, 'Image too different from reference' ############################################################################### # Test copying byte.jp2 def test_jpeg2000_4(): if gdaltest.jpeg2000_drv is None: pytest.skip() tst = gdaltest.GDALTest('JPEG2000', 'byte.jp2', 1, 50054) tst.testCreateCopy() # This may fail for a good reason if tst.testCreateCopy(check_gt=1, check_srs=1) != 'success': gdaltest.post_reason('This is an expected failure if Jasper has not the jp2_encode_uuid function') return 'expected_fail' ############################################################################### # Test copying int16.jp2 def test_jpeg2000_5(): if gdaltest.jpeg2000_drv is None: pytest.skip() tst = gdaltest.GDALTest('JPEG2000', 'int16.jp2', 1, None) return tst.testCreateCopy() ############################################################################### # Test reading ll.jp2 def test_jpeg2000_6(): if gdaltest.jpeg2000_drv is None: pytest.skip() tst = gdaltest.GDALTest('JPEG2000', 'll.jp2', 1, None) tst.testOpen() ds = gdal.Open('data/ll.jp2') ds.GetRasterBand(1).Checksum() ds = None ############################################################################### # Open byte.jp2.gz (test use of the VSIL API) def test_jpeg2000_7(): if gdaltest.jpeg2000_drv is None: pytest.skip() tst = gdaltest.GDALTest('JPEG2000', '/vsigzip/data/byte.jp2.gz', 1, 50054, filename_absolute=1) return tst.testOpen() ############################################################################### # Test a JPEG2000 with the 3 bands having 13bit depth and the 4th one 1 bit def test_jpeg2000_8(): if gdaltest.jpeg2000_drv is None or is_buggy_jasper(): pytest.skip() ds = gdal.Open('data/3_13bit_and_1bit.jp2') expected_checksums = [64570, 57277, 56048, 61292] for i in range(4): assert ds.GetRasterBand(i + 1).Checksum() == expected_checksums[i], \ ('unexpected checksum (%d) for band %d' % (expected_checksums[i], i + 1)) assert ds.GetRasterBand(1).DataType == gdal.GDT_UInt16, 'unexpected data type' ############################################################################### # Check that we can use .j2w world files (#4651) def test_jpeg2000_9(): if gdaltest.jpeg2000_drv is None: pytest.skip() ds = gdal.Open('data/byte_without_geotransform.jp2') geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(440720, abs=0.1) and geotransform[1] == pytest.approx(60, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(3751320, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-60, abs=0.001), \ 'geotransform differs from expected' ds = None ############################################################################### # Check writing a file with more than 4 bands (#4686) def test_jpeg2000_10(): if gdaltest.jpeg2000_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('GTiff').Create('/vsimem/jpeg2000_10_src.tif', 128, 128, 5) for i in range(src_ds.RasterCount): src_ds.GetRasterBand(i + 1).Fill(10 * i + 1) ds = gdaltest.jpeg2000_drv.CreateCopy('/vsimem/jpeg2000_10_dst.tif', src_ds) ds = None ds = gdal.Open('/vsimem/jpeg2000_10_dst.tif') assert ds is not None for i in range(src_ds.RasterCount): assert ds.GetRasterBand(i + 1).Checksum() == src_ds.GetRasterBand(i + 1).Checksum(), \ ('bad checksum for band %d' % (i + 1)) ds = None src_ds = None gdal.Unlink('/vsimem/jpeg2000_10_src.tif') gdal.Unlink('/vsimem/jpeg2000_10_dst.tif') ############################################################################### # Test auto-promotion of 1bit alpha band to 8bit def test_jpeg2000_11(): if gdaltest.jpeg2000_drv is None or is_buggy_jasper(): pytest.skip() ds = gdal.Open('data/stefan_full_rgba_alpha_1bit.jp2') fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') is None got_cs = fourth_band.Checksum() assert got_cs == 8527 jp2_bands_data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) jp2_fourth_band_data = fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, int(ds.RasterXSize / 16), int(ds.RasterYSize / 16)) tmp_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/jpeg2000_11.tif', ds) fourth_band = tmp_ds.GetRasterBand(4) got_cs = fourth_band.Checksum() gtiff_bands_data = tmp_ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) gtiff_fourth_band_data = fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) # gtiff_fourth_band_subsampled_data = fourth_band.ReadRaster(0,0,ds.RasterXSize,ds.RasterYSize,ds.RasterXSize/16,ds.RasterYSize/16) tmp_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/jpeg2000_11.tif') assert got_cs == 8527 assert jp2_bands_data == gtiff_bands_data assert jp2_fourth_band_data == gtiff_fourth_band_data ds = gdal.OpenEx('data/stefan_full_rgba_alpha_1bit.jp2', open_options=['1BIT_ALPHA_PROMOTION=NO']) fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ############################################################################### def test_jpeg2000_online_1(): if gdaltest.jpeg2000_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/7sisters200.j2k', '7sisters200.j2k'): pytest.skip() # Checksum = 32669 on my PC tst = gdaltest.GDALTest('JPEG2000', 'tmp/cache/7sisters200.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/7sisters200.j2k') ds.GetRasterBand(1).Checksum() ds = None ############################################################################### def test_jpeg2000_online_2(): if gdaltest.jpeg2000_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/gcp.jp2', 'gcp.jp2'): pytest.skip() # Checksum = 15621 on my PC tst = gdaltest.GDALTest('JPEG2000', 'tmp/cache/gcp.jp2', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/gcp.jp2') ds.GetRasterBand(1).Checksum() assert len(ds.GetGCPs()) == 15, 'bad number of GCP' expected_wkt = """GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]""" assert ds.GetGCPProjection() == expected_wkt, 'bad GCP projection' ds = None ############################################################################### def test_jpeg2000_online_3(): if gdaltest.jpeg2000_drv is None: pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.j2k', 'Bretagne1.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.bmp', 'Bretagne1.bmp'): pytest.skip() # Checksum = 14443 on my PC tst = gdaltest.GDALTest('JPEG2000', 'tmp/cache/Bretagne1.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne1.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne1.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Difference between the image before and after compression assert maxdiff <= 17, 'Image too different from reference' ############################################################################### def test_jpeg2000_online_4(): if gdaltest.jpeg2000_drv is None: pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.j2k', 'Bretagne2.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.bmp', 'Bretagne2.bmp'): pytest.skip() tst = gdaltest.GDALTest('JPEG2000', 'tmp/cache/Bretagne2.j2k', 1, None, filename_absolute=1) # Jasper cannot handle this image # Actually, a patched Jasper can ;-) if tst.testOpen() != 'success': gdaltest.post_reason('Expected failure: Jasper cannot handle this image yet') return 'expected_fail' ds = gdal.Open('tmp/cache/Bretagne2.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne2.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Difference between the image before and after compression assert maxdiff <= 17, 'Image too different from reference' ############################################################################### # Try reading JPEG2000 with color table def test_jpeg2000_online_5(): if gdaltest.jpeg2000_drv is None: pytest.skip() if not gdaltest.download_file('http://www.gwg.nga.mil/ntb/baseline/software/testfile/Jpeg2000/jp2_09/file9.jp2', 'file9.jp2'): pytest.skip() ds = gdal.Open('tmp/cache/file9.jp2') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() cs3 = ds.GetRasterBand(3).Checksum() assert cs1 == 48954 and cs2 == 4939 and cs3 == 17734, \ 'Did not get expected checksums' ds = None ############################################################################### # Try reading YCbCr JPEG2000 as RGB def test_jpeg2000_online_6(): if gdaltest.jpeg2000_drv is None: pytest.skip() if not gdaltest.download_file('http://www.gwg.nga.mil/ntb/baseline/software/testfile/Jpeg2000/jp2_03/file3.jp2', 'file3.jp2'): pytest.skip() ds = gdal.Open('tmp/cache/file3.jp2') cs1 = ds.GetRasterBand(1).Checksum() cs2 = ds.GetRasterBand(2).Checksum() cs3 = ds.GetRasterBand(3).Checksum() assert cs1 == 25337 and cs2 == 28262 and cs3 == 59580, \ 'Did not get expected checksums' ds = None ############################################################################### def test_jpeg2000_cleanup(): gdaltest.reregister_all_jpeg2000_drivers() gdalautotest-3.1.2/gdrivers/rmf.py0000775000175000017500000006145513701060016015666 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: rmf.py 6705917bb366522a4e77cca9c461badad3ed671f 2019-11-28 20:16:03 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test Raster Matrix Format used in GISes "Panorama"/"Integratsia". # Author: Andrey Kiselev # ############################################################################### # Copyright (c) 2008, Andrey Kiselev # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import gdal from osgeo import osr import pytest ############################################################################### # Perform simple read tests. def test_rmf_1(): tst = gdaltest.GDALTest('rmf', 'byte.rsw', 1, 4672) return tst.testOpen(check_gt=(440720, 60, 0, 3751320, 0, -60)) def test_rmf_2(): tst = gdaltest.GDALTest('rmf', 'byte-lzw.rsw', 1, 40503) with gdaltest.error_handler(): return tst.testOpen() def test_rmf_3(): tst = gdaltest.GDALTest('rmf', 'float64.mtw', 1, 4672) with gdaltest.error_handler(): return tst.testOpen(check_gt=(440720, 60, 0, 3751320, 0, -60)) def test_rmf_4(): tst = gdaltest.GDALTest('rmf', 'rgbsmall.rsw', 1, 21212) tst.testOpen(check_gt=(-44.840320, 0.003432, 0, -22.932584, 0, -0.003432)) tst = gdaltest.GDALTest('rmf', 'rgbsmall.rsw', 2, 21053) tst.testOpen(check_gt=(-44.840320, 0.003432, 0, -22.932584, 0, -0.003432)) tst = gdaltest.GDALTest('rmf', 'rgbsmall.rsw', 3, 21349) tst.testOpen(check_gt=(-44.840320, 0.003432, 0, -22.932584, 0, -0.003432)) def test_rmf_5(): tst = gdaltest.GDALTest('rmf', 'rgbsmall-lzw.rsw', 1, 40503) with gdaltest.error_handler(): tst.testOpen() tst = gdaltest.GDALTest('rmf', 'rgbsmall-lzw.rsw', 2, 41429) with gdaltest.error_handler(): tst.testOpen() tst = gdaltest.GDALTest('rmf', 'rgbsmall-lzw.rsw', 3, 40238) with gdaltest.error_handler(): return tst.testOpen() def test_rmf_6(): tst = gdaltest.GDALTest('rmf', 'big-endian.rsw', 1, 7782) with gdaltest.error_handler(): tst.testOpen() tst = gdaltest.GDALTest('rmf', 'big-endian.rsw', 2, 8480) with gdaltest.error_handler(): tst.testOpen() tst = gdaltest.GDALTest('rmf', 'big-endian.rsw', 3, 4195) with gdaltest.error_handler(): return tst.testOpen() ############################################################################### # Create simple copy and check. def test_rmf_7(): tst = gdaltest.GDALTest('rmf', 'byte.rsw', 1, 4672) return tst.testCreateCopy(check_srs=1, check_gt=1, vsimem=1) def test_rmf_8(): tst = gdaltest.GDALTest('rmf', 'rgbsmall.rsw', 2, 21053) return tst.testCreateCopy(check_srs=1, check_gt=1) ############################################################################### # Create RMFHUGE=YES def test_rmf_9(): tst = gdaltest.GDALTest('rmf', 'byte.rsw', 1, 4672, options=['RMFHUGE=YES']) return tst.testCreateCopy(check_srs=1, check_gt=1, vsimem=1) ############################################################################### # Compressed DEM def test_rmf_10(): tst = gdaltest.GDALTest('rmf', 't100.mtw', 1, 6388) with gdaltest.error_handler(): return tst.testOpen() ############################################################################### # Overviews def test_rmf_11(): test_fn = '/vsigzip/data/overviews.rsw.gz' src_ds = gdal.Open(test_fn) assert src_ds is not None, 'Failed to open test dataset.' band1 = src_ds.GetRasterBand(1) assert band1.GetOverviewCount() == 3, 'overviews is missing' ovr_n = (0, 1, 2) ovr_size = (256, 64, 16) ovr_checksum = (32756, 51233, 3192) for i in ovr_n: ovr_band = band1.GetOverview(i) if ovr_band.XSize != ovr_size[i] or ovr_band.YSize != ovr_size[i]: msg = 'overview wrong size: overview %d, size = %d * %d,' % \ (i, ovr_band.XSize, ovr_band.YSize) pytest.fail(msg) if ovr_band.Checksum() != ovr_checksum[i]: msg = 'overview wrong checksum: overview %d, checksum = %d,' % \ (i, ovr_band.Checksum()) pytest.fail(msg) ############################################################################### # Check file open with cucled header offsets . def test_rmf_12a(): tst = gdaltest.GDALTest('rmf', 'cucled-1.rsw', 1, 4672) with gdaltest.error_handler(): return tst.testOpen(check_gt=(440720, 60, 0, 3751320, 0, -60)) ############################################################################### # Check file open with cucled header offsets . def test_rmf_12b(): tst = gdaltest.GDALTest('rmf', 'cucled-2.rsw', 1, 4672) with gdaltest.error_handler(): return tst.testOpen(check_gt=(440720, 60, 0, 3751320, 0, -60)) ############################################################################### # Check file open with invalid subheader marker. def test_rmf_12c(): tst = gdaltest.GDALTest('rmf', 'invalid-subheader.rsw', 1, 4672) with gdaltest.error_handler(): return tst.testOpen(check_gt=(440720, 60, 0, 3751320, 0, -60)) ############################################################################### # Check file open with corrupted subheader. def test_rmf_12d(): tst = gdaltest.GDALTest('rmf', 'corrupted-subheader.rsw', 1, 4672) return tst.testOpen(check_gt=(440720, 60, 0, 3751320, 0, -60)) ############################################################################### # Build overviews and check def rmf_build_ov(source, testid, options, ov_sizes, crs, reopen=False, pass_count=1): rmf_drv = gdal.GetDriverByName('RMF') assert rmf_drv is not None, 'RMF driver not found.' src_ds = gdal.Open('data/' + source, gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' test_ds_name = 'tmp/ov-' + testid + '.tst' src_ds = rmf_drv.CreateCopy(test_ds_name, src_ds, options=options) assert src_ds is not None, 'Failed to create test dataset copy.' for _ in range(pass_count): if reopen: src_ds = None src_ds = gdal.Open(test_ds_name, gdal.GA_Update) assert src_ds is not None, 'Failed to open test dataset.' reopen = True err = src_ds.BuildOverviews(overviewlist=[2, 4]) assert err == 0, 'BuildOverviews reports an error' src_ds = None src_ds = gdal.Open(test_ds_name, gdal.GA_ReadOnly) for iBand in range(src_ds.RasterCount): band = src_ds.GetRasterBand(iBand + 1) assert band.GetOverviewCount() == 2, 'overviews missing' for iOverview in range(band.GetOverviewCount()): ovr_band = band.GetOverview(iOverview) if ovr_band.XSize != ov_sizes[iOverview][0] or \ ovr_band.YSize != ov_sizes[iOverview][1]: msg = 'overview wrong size: band %d, overview %d, size = %d * %d,' % \ (iBand, iOverview, ovr_band.XSize, ovr_band.YSize) pytest.fail(msg) if ovr_band.Checksum() != crs[iOverview][iBand]: msg = 'overview wrong checksum: band %d, overview %d, checksum = %d,' % \ (iBand, iOverview, ovr_band.Checksum()) pytest.fail(msg) src_ds = None os.remove(test_ds_name) ############################################################################### # Build overviews on newly created RSW file def test_rmf_13(): return rmf_build_ov(source='byte.rsw', testid='13', options=['RMFHUGE=NO'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087, 1087, 1087], [328, 328, 328]], reopen=False) ############################################################################### # Build overviews on newly created huge RSW file def test_rmf_14(): return rmf_build_ov(source='byte.rsw', testid='14', options=['RMFHUGE=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087, 1087, 1087], [328, 328, 328]], reopen=False) ############################################################################### # Build overviews on closed and reopened RSW file def test_rmf_15(): return rmf_build_ov(source='byte.rsw', testid='15', options=['RMFHUGE=NO'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087, 1087, 1087], [328, 328, 328]], reopen=True) ############################################################################### # Build overviews on closed and reopened huge RSW file def test_rmf_16(): return rmf_build_ov(source='byte.rsw', testid='16', options=['RMFHUGE=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087, 1087, 1087], [328, 328, 328]], reopen=True) ############################################################################### # Build overviews on newly created MTW file def test_rmf_17(): return rmf_build_ov(source='float64.mtw', testid='17', options=['RMFHUGE=NO', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087, 1087, 1087], [328, 328, 328]], reopen=False) ############################################################################### # Build overviews on newly created MTW file def test_rmf_18(): return rmf_build_ov(source='float64.mtw', testid='18', options=['RMFHUGE=YES', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=False) ############################################################################### # Build overviews on closed and reopened MTW file def test_rmf_19(): return rmf_build_ov(source='float64.mtw', testid='19', options=['RMFHUGE=NO', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=True) ############################################################################### # Build overviews on closed and reopened huge MTW file def test_rmf_20(): return rmf_build_ov(source='float64.mtw', testid='20', options=['RMFHUGE=YES', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=True) ############################################################################### # Recreate overviews on newly created MTW file def test_rmf_21(): return rmf_build_ov(source='float64.mtw', testid='21', options=['RMFHUGE=NO', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=False, pass_count=2) ############################################################################### # Recreate overviews on newly created huge MTW file def test_rmf_22(): return rmf_build_ov(source='float64.mtw', testid='22', options=['RMFHUGE=YES', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=False, pass_count=2) ############################################################################### # Recreate overviews on closed and reopened MTW file def test_rmf_23(): return rmf_build_ov(source='float64.mtw', testid='23', options=['RMFHUGE=NO', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=True, pass_count=2) ############################################################################### # Recreate overviews on closed and reopened huge MTW file def test_rmf_24(): return rmf_build_ov(source='float64.mtw', testid='24', options=['RMFHUGE=YES', 'MTW=YES'], ov_sizes=[[10, 10], [5, 5]], crs=[[1087], [328]], reopen=True, pass_count=2) ############################################################################### # Nodata write test def test_rmf_25(): rmf_drv = gdal.GetDriverByName('RMF') assert rmf_drv is not None, 'RMF driver not found.' src_ds = gdal.Open('data/byte.rsw', gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' test_ds_name = 'tmp/nodata.rsw' test_ds = rmf_drv.CreateCopy(test_ds_name, src_ds) assert test_ds is not None, 'Failed to create test dataset copy.' test_ds.GetRasterBand(1).SetNoDataValue(33) nd = test_ds.GetRasterBand(1).GetNoDataValue() assert nd == 33, 'Invalid NoData value after CreateCopy.' test_ds = None test_ds = gdal.Open(test_ds_name, gdal.GA_Update) assert test_ds is not None, 'Failed to reopen test dataset.' nd = test_ds.GetRasterBand(1).GetNoDataValue() assert nd == 33, 'Invalid NoData value after dataset reopen.' test_ds.GetRasterBand(1).SetNoDataValue(55) test_ds = None test_ds = gdal.Open(test_ds_name, gdal.GA_ReadOnly) assert test_ds is not None, 'Failed to reopen test dataset.' nd = test_ds.GetRasterBand(1).GetNoDataValue() assert nd == 55, 'Invalid NoData value after dataset update.' test_ds = None os.remove(test_ds_name) ############################################################################### # Unit write test def test_rmf_26(): rmf_drv = gdal.GetDriverByName('RMF') assert rmf_drv is not None, 'RMF driver not found.' src_ds = gdal.Open('data/float64.mtw', gdal.GA_ReadOnly) assert src_ds is not None, 'Failed to open test dataset.' test_ds_name = 'tmp/unit.mtw' test_ds = rmf_drv.CreateCopy(test_ds_name, src_ds, options=['MTW=YES']) assert test_ds is not None, 'Failed to create test dataset copy.' test_ds.GetRasterBand(1).SetUnitType('cm') unittype = test_ds.GetRasterBand(1).GetUnitType() assert unittype == 'cm', 'Invalid UnitType after CreateCopy.' test_ds = None test_ds = gdal.Open(test_ds_name, gdal.GA_Update) assert test_ds is not None, 'Failed to reopen test dataset.' unittype = test_ds.GetRasterBand(1).GetUnitType() assert unittype == 'cm', 'Invalid UnitType after dataset reopen.' test_ds.GetRasterBand(1).SetUnitType('mm') test_ds = None test_ds = gdal.Open(test_ds_name, gdal.GA_ReadOnly) assert test_ds is not None, 'Failed to reopen test dataset.' unittype = test_ds.GetRasterBand(1).GetUnitType() assert unittype == 'mm', 'Invalid UnitType after dataset update.' test_ds.GetRasterBand(1).SetUnitType('ft') unittype = test_ds.GetRasterBand(1).GetUnitType() assert unittype == 'mm', 'Invalid UnitType after dataset update.' test_ds = None os.remove(test_ds_name) ############################################################################### # Test read JPEG compressed RMF dataset def test_rmf_27(): if gdal.GetDriverByName('JPEG') is None: pytest.skip() cs1 = [50553, 27604, 36652] # cs2 = [51009, 27640, 37765] # osx, clang ds = gdal.Open('data/jpeg-in-rmf.rsw', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open test dataset.' md = ds.GetMetadata('IMAGE_STRUCTURE') assert md['COMPRESSION'] == 'JPEG', \ ('"COMPRESSION" value is "%s" but expected "JPEG"' % md['COMPRESSION']) cs = [0, 0, 0] for iBand in range(ds.RasterCount): band = ds.GetRasterBand(iBand + 1) cs[iBand] = band.Checksum() assert cs == cs1 or cs == cs2, ('Invalid checksum %s expected %s or %s.' % (str(cs), str(cs1), str(cs2))) ############################################################################### # Check compression metadata def test_rmf_28a(): ds = gdal.Open('data/byte-lzw.rsw', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open test dataset.' md = ds.GetMetadata('IMAGE_STRUCTURE') assert md['COMPRESSION'] == 'LZW', \ ('"COMPRESSION" value is "%s" but expected "LZW"' % md['COMPRESSION']) def test_rmf_28b(): ds = gdal.Open('data/t100.mtw', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open test dataset.' md = ds.GetMetadata('IMAGE_STRUCTURE') assert md['COMPRESSION'] == 'RMF_DEM', \ ('"COMPRESSION" value is "%s" but expected "RMF_DEM"' % md['COMPRESSION']) ############################################################################### # Check EPSG code def test_rmf_29(): rmf_drv = gdal.GetDriverByName('RMF') assert rmf_drv is not None, 'RMF driver not found.' ds = gdal.Open('data/byte.rsw', gdal.GA_ReadOnly) assert ds is not None, 'Failed to open test dataset.' test_ds_name = 'tmp/epsg.rsw' test_ds = rmf_drv.CreateCopy(test_ds_name, ds) assert test_ds is not None, 'Failed to create test dataset copy.' sr = osr.SpatialReference() sr.SetFromUserInput('EPSG:3388') test_ds.SetProjection(sr.ExportToWkt()) test_ds = None; ds = None test_ds = gdal.Open(test_ds_name, gdal.GA_ReadOnly) assert test_ds is not None, 'Failed to open test dataset.' wkt = test_ds.GetProjectionRef() sr = osr.SpatialReference() sr.SetFromUserInput(wkt) assert str(sr.GetAuthorityCode(None)) == '3388', ('EPSG code is %s expected 3388.' % str(sr.GetAuthorityCode(None))) ############################################################################### # Check interleaved access def test_rmf_30(): ds_name = 'tmp/interleaved.tif' gdal.Translate(ds_name, 'data/rgbsmall-lzw.rsw', format='GTiff') ds = gdal.Open(ds_name) assert ds is not None, ('Can\'t open ' + ds_name) expected_cs = [40503, 41429, 40238] cs = [ds.GetRasterBand(1).Checksum(), ds.GetRasterBand(2).Checksum(), ds.GetRasterBand(3).Checksum()] assert cs == expected_cs, ('Invalid checksum %s expected %s.' % (str(cs), str(expected_cs))) ############################################################################### # Check compressed write def test_rmf_31a(): tst = gdaltest.GDALTest('rmf', 'small_world.tif', 1, 30111, options=['COMPRESS=NONE']) return tst.testCreateCopy(check_minmax=0, check_srs=1, check_gt=1) def test_rmf_31b(): tst = gdaltest.GDALTest('rmf', 'small_world.tif', 1, 30111, options=['COMPRESS=LZW']) return tst.testCreateCopy(check_minmax=0, check_srs=1, check_gt=1) def test_rmf_31c(): ds_name = 'tmp/rmf_31c.rsw' gdal.Translate(ds_name, 'data/small_world.tif', format='RMF', options='-co COMPRESS=JPEG') ds = gdal.Open(ds_name) assert ds is not None, ('Can\'t open ' + ds_name) expected_cs1 = [25789, 27405, 31974] expected_cs2 = [23764, 25265, 33585] # osx cs = [ds.GetRasterBand(1).Checksum(), ds.GetRasterBand(2).Checksum(), ds.GetRasterBand(3).Checksum()] assert cs == expected_cs1 or cs == expected_cs2, \ ('Invalid checksum %s expected %s or %s.' % (str(cs), str(expected_cs1), str(expected_cs2))) def test_rmf_31d(): tst = gdaltest.GDALTest('rmf', 't100.mtw', 1, 6388, options=['MTW=YES', 'COMPRESS=RMF_DEM']) return tst.testCreateCopy(check_minmax=0, check_srs=1, check_gt=1) def test_rmf_31e(): try: import numpy except ImportError: pytest.skip() drv = gdal.GetDriverByName('Gtiff') if drv is None: pytest.skip() # Create test data stripeSize = 32; sx = 256 sy = 8*stripeSize tst_name = 'tmp/rmf_31e.tif' tst_ds = drv.Create(tst_name, sx, sy, 1, gdal.GDT_Int32 ) assert tst_ds is not None, ('Can\'t create ' + tst_name) # No deltas buff = numpy.zeros((sx, stripeSize), dtype = numpy.int32) tst_ds.GetRasterBand(1).WriteArray(buff, 0, 0) # 4-bit deltas buff = numpy.random.randint(0, 16, [stripeSize, sx]) tst_ds.GetRasterBand(1).WriteArray(buff, 0, stripeSize) # 8-bit deltas buff = numpy.random.randint(0, 256, [stripeSize, sx]) tst_ds.GetRasterBand(1).WriteArray(buff, 0, stripeSize*2) # 12-bit deltas buff = numpy.random.randint(0, 256*16, [stripeSize, sx]) tst_ds.GetRasterBand(1).WriteArray(buff, 0, stripeSize*3) # 16-bit deltas buff = numpy.random.randint(0, 256*256, [stripeSize, sx]) tst_ds.GetRasterBand(1).WriteArray(buff, 0, stripeSize*4) # 24-bit deltas buff = numpy.random.randint(0, 256*256*256, [stripeSize, sx]) tst_ds.GetRasterBand(1).WriteArray(buff, 0, stripeSize*5) # 32-bit deltas buff = numpy.random.randint(0, 256*256*256*128 - 1, [stripeSize, sx]) tst_ds.GetRasterBand(1).WriteArray(buff, 0, stripeSize*6) tst_ds = None tst_ds = gdal.Open(tst_name) assert tst_ds is not None, ('Can\'t open ' + tst_name) cs = tst_ds.GetRasterBand(1).Checksum() tst_ds = None tst = gdaltest.GDALTest('rmf', '../' + tst_name, 1, cs, options=['MTW=YES', 'COMPRESS=RMF_DEM']) return tst.testCreateCopy(check_minmax=0, check_srs=1, check_gt=1) ############################################################################### # Check parallel compression def test_rmf_32a(): ds_name = 'tmp/rmf_32a.rsw' gdal.Translate(ds_name, 'data/small_world.tif', format='RMF', options='-outsize 400% 400% -co COMPRESS=LZW -co NUM_THREADS=0') tst = gdaltest.GDALTest('rmf', '../' + ds_name, 1, 5540) res = tst.testOpen(check_gt=None) os.remove(ds_name) return res def test_rmf_32b(): ds_name = 'tmp/rmf_32b.rsw' gdal.Translate(ds_name, 'data/small_world.tif', format='RMF', options='-outsize 400% 400% -co COMPRESS=LZW -co NUM_THREADS=4') tst = gdaltest.GDALTest('rmf', '../' + ds_name, 1, 5540) res = tst.testOpen(check_gt=None) os.remove(ds_name) return res ############################################################################### # Parallel build overviews on newly created RSW file def test_rmf_32c(): ds_name = 'tmp/rmf_32c.rsw' gdal.Translate(ds_name, 'data/small_world.tif', format='RMF', options='-outsize 400% 400% -co COMPRESS=LZW -co NUM_THREADS=4') res = rmf_build_ov(source='../' + ds_name, testid='32c', options=['RMFHUGE=NO', 'COMPRESS=LZW', 'NUM_THREADS=4'], ov_sizes=[[800, 400], [400, 200]], crs=[[50261, 64846, 28175], [30111, 32302, 40026]], reopen=False) os.remove(ds_name) return res ############################################################################### # Read 1-bit & 4-bit files def test_rmf_33a(): tst = gdaltest.GDALTest('rmf', '1bit.rsw', 1, 34325) return tst.testOpen() def test_rmf_33b(): tst = gdaltest.GDALTest('rmf', '4bit.rsw', 1, 55221) return tst.testOpen() def test_rmf_33c(): tst = gdaltest.GDALTest('rmf', '4bit-lzw.rsw', 1, 55221) return tst.testOpen() ############################################################################### gdalautotest-3.1.2/gdrivers/til.py0000775000175000017500000000640713701060016015666 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: til.py 010860a7429f4a21ba9ccb8034afbc3a2b61575a 2019-06-29 23:31:46 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test TIL driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import gdaltest from osgeo import gdal ############################################################################### # Test a fake TIL dataset def test_til_1(): tst = gdaltest.GDALTest('TIL', 'testtil.til', 1, 4672) return tst.testOpen() ############################################################################### # Check GetFileList() result (#4018) & IMD def test_til_2(): try: os.remove('data/testtil.til.aux.xml') except OSError: pass ds = gdal.Open('data/testtil.til') filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' ds = None assert not os.path.exists('data/testtil.til.aux.xml') ############################################################################### # Check GetFileList() & XML def test_til_3(): try: os.remove('data/testtil.til.aux.xml') except OSError: pass ds = gdal.Open('data/testtil2.til') filelist = ds.GetFileList() assert len(filelist) == 3, 'did not get expected file list.' md = ds.GetMetadata('IMAGERY') assert 'SATELLITEID' in md, 'SATELLITEID not present in IMAGERY Domain' assert 'CLOUDCOVER' in md, 'CLOUDCOVER not present in IMAGERY Domain' assert 'ACQUISITIONDATETIME' in md, \ 'ACQUISITIONDATETIME not present in IMAGERY Domain' ds = None assert not os.path.exists('data/testtil.til.aux.xml') gdalautotest-3.1.2/gdrivers/jp2lura.py0000775000175000017500000022526713701060016016464 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: jp2lura.py beafef7c74495c25010f454db15c8c0b5bc64247 2020-01-24 18:52:34 +0100 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for JP2Lura driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2016, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import struct import sys import shutil from osgeo import gdal from osgeo import ogr from osgeo import osr import pytest import gdaltest ############################################################################### # Verify we have the driver. def test_jp2lura_1(): gdaltest.jp2lura_drv = gdal.GetDriverByName('JP2Lura') if gdaltest.jp2lura_drv is None: pytest.skip() if gdaltest.jp2lura_drv is not None: if gdal.GetConfigOption('LURA_LICENSE_NUM_1') is None or \ gdal.GetConfigOption('LURA_LICENSE_NUM_2') is None: gdaltest.jp2lura_drv = None pytest.skip('Driver JP2Lura is registered, but missing LURA_LICENSE_NUM_1 and LURA_LICENSE_NUM_2') gdaltest.deregister_all_jpeg2000_drivers_but('JP2Lura') ds = gdal.Open('data/byte.jp2') if ds is None and gdal.GetLastErrorMsg().find('license') >= 0: gdaltest.jp2lura_drv = None pytest.skip('Driver JP2Lura is registered, but issue with license') ############################################################################### # def test_jp2lura_missing_license_num(): if gdaltest.jp2lura_drv is None: pytest.skip() old_num_1 = gdal.GetConfigOption('LURA_LICENSE_NUM_1') old_num_2 = gdal.GetConfigOption('LURA_LICENSE_NUM_2') gdal.SetConfigOption('LURA_LICENSE_NUM_1', '') gdal.SetConfigOption('LURA_LICENSE_NUM_2', '') with gdaltest.error_handler(): ds = gdal.Open('data/byte.jp2') gdal.SetConfigOption('LURA_LICENSE_NUM_1', old_num_1) gdal.SetConfigOption('LURA_LICENSE_NUM_2', old_num_2) assert ds is None ############################################################################### # def test_jp2lura_invalid_license_num(): if gdaltest.jp2lura_drv is None: pytest.skip() old_num_1 = gdal.GetConfigOption('LURA_LICENSE_NUM_1') old_num_2 = gdal.GetConfigOption('LURA_LICENSE_NUM_2') gdal.SetConfigOption('LURA_LICENSE_NUM_1', '1') gdal.SetConfigOption('LURA_LICENSE_NUM_2', '1') with gdaltest.error_handler(): ds = gdal.Open('data/byte.jp2') gdal.SetConfigOption('LURA_LICENSE_NUM_1', old_num_1) gdal.SetConfigOption('LURA_LICENSE_NUM_2', old_num_2) assert ds is None ############################################################################### def validate(filename, expected_gmljp2=True, return_error_count=False, oidoc=None, inspire_tg=True): path = '../../gdal/swig/python/samples' if path not in sys.path: sys.path.append(path) try: import validate_jp2 except ImportError: pytest.skip('Cannot run validate_jp2') try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET') os.stat('tmp/cache/SCHEMAS_OPENGIS_NET/xlink.xsd') os.stat('tmp/cache/SCHEMAS_OPENGIS_NET/xml.xsd') ogc_schemas_location = 'tmp/cache/SCHEMAS_OPENGIS_NET' except OSError: ogc_schemas_location = 'disabled' if ogc_schemas_location != 'disabled': try: import xmlvalidate xmlvalidate.validate # to make pyflakes happy except (ImportError, AttributeError): ogc_schemas_location = 'disabled' res = validate_jp2.validate(filename, oidoc, inspire_tg, expected_gmljp2, ogc_schemas_location) if return_error_count: return (res.error_count, res.warning_count) if res.error_count == 0 and res.warning_count == 0: return pytest.fail() ############################################################################### # Open byte.jp2 def test_jp2lura_2(): if gdaltest.jp2lura_drv is None: pytest.skip() srs = """PROJCS["NAD27 / UTM zone 11N", GEOGCS["NAD27", DATUM["North_American_Datum_1927", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], AUTHORITY["EPSG","6267"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4267"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-117], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26711"]] """ gt = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) tst = gdaltest.GDALTest('JP2Lura', 'byte.jp2', 1, 50054) return tst.testOpen(check_prj=srs, check_gt=gt) ############################################################################### # Open int16.jp2 def test_jp2lura_3(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/int16.jp2') ds_ref = gdal.Open('data/int16.tif') maxdiff = gdaltest.compare_ds(ds, ds_ref) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Quite a bit of difference... assert maxdiff <= 6, 'Image too different from reference' ds = ogr.Open('data/int16.jp2') assert ds is None ############################################################################### # Test copying byte.jp2 def test_jp2lura_4(out_filename='tmp/jp2lura_4.jp2'): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.jp2') src_wkt = src_ds.GetProjectionRef() src_gt = src_ds.GetGeoTransform() vrt_ds = gdal.GetDriverByName('VRT').CreateCopy('/vsimem/jp2lura_4.vrt', src_ds) vrt_ds.SetMetadataItem('TIFFTAG_XRESOLUTION', '300') vrt_ds.SetMetadataItem('TIFFTAG_YRESOLUTION', '200') vrt_ds.SetMetadataItem('TIFFTAG_RESOLUTIONUNIT', '3 (pixels/cm)') gdal.Unlink(out_filename) out_ds = gdal.GetDriverByName('JP2Lura').CreateCopy(out_filename, vrt_ds, options=['REVERSIBLE=YES']) del out_ds vrt_ds = None gdal.Unlink('/vsimem/jp2lura_4.vrt') assert gdal.VSIStatL(out_filename + '.aux.xml') is None assert validate(out_filename, inspire_tg=False) != 'fail' ds = gdal.Open(out_filename) cs = ds.GetRasterBand(1).Checksum() got_wkt = ds.GetProjectionRef() got_gt = ds.GetGeoTransform() xres = ds.GetMetadataItem('TIFFTAG_XRESOLUTION') yres = ds.GetMetadataItem('TIFFTAG_YRESOLUTION') resunit = ds.GetMetadataItem('TIFFTAG_RESOLUTIONUNIT') ds = None gdal.Unlink(out_filename) assert xres == '300' and yres == '200' and resunit == '3 (pixels/cm)', \ 'bad resolution' sr1 = osr.SpatialReference() sr1.SetFromUserInput(got_wkt) sr2 = osr.SpatialReference() sr2.SetFromUserInput(src_wkt) if sr1.IsSame(sr2) == 0: print(got_wkt) print(src_wkt) pytest.fail('bad spatial reference') for i in range(6): assert got_gt[i] == pytest.approx(src_gt[i], abs=1e-8), 'bad geotransform' assert cs == 50054, 'bad checksum' def test_jp2lura_4_vsimem(): return test_jp2lura_4('/vsimem/jp2lura_4.jp2') ############################################################################### # Test copying int16.jp2 def test_jp2lura_5(): if gdaltest.jp2lura_drv is None: pytest.skip() tst = gdaltest.GDALTest('JP2Lura', 'int16.jp2', 1, None, options=['REVERSIBLE=YES', 'CODEC=J2K']) return tst.testCreateCopy() ############################################################################### # Test reading ll.jp2 def test_jp2lura_6(): if gdaltest.jp2lura_drv is None: pytest.skip() tst = gdaltest.GDALTest('JP2Lura', 'll.jp2', 1, None) tst.testOpen() ds = gdal.Open('data/ll.jp2') ds.GetRasterBand(1).Checksum() ds = None ############################################################################### # Open byte.jp2.gz (test use of the VSIL API) def test_jp2lura_7(): if gdaltest.jp2lura_drv is None: pytest.skip() tst = gdaltest.GDALTest('JP2Lura', '/vsigzip/data/byte.jp2.gz', 1, 50054, filename_absolute=1) return tst.testOpen() ############################################################################### # Test a JP2Lura with the 3 bands having 13bit depth and the 4th one 1 bit def test_jp2lura_8(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/3_13bit_and_1bit.jp2') expected_checksums = [64570, 57277, 56048] # 61292] for i, csum in enumerate(expected_checksums): assert ds.GetRasterBand(i + 1).Checksum() == csum, \ ('unexpected checksum (%d) for band %d' % (csum, i + 1)) assert ds.GetRasterBand(1).DataType == gdal.GDT_UInt16, 'unexpected data type' ############################################################################### # Check that we can use .j2w world files (#4651) def test_jp2lura_9(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/byte_without_geotransform.jp2') geotransform = ds.GetGeoTransform() assert geotransform[0] == pytest.approx(440720, abs=0.1) and geotransform[1] == pytest.approx(60, abs=0.001) and geotransform[2] == pytest.approx(0, abs=0.001) and geotransform[3] == pytest.approx(3751320, abs=0.1) and geotransform[4] == pytest.approx(0, abs=0.001) and geotransform[5] == pytest.approx(-60, abs=0.001), \ 'geotransform differs from expected' ds = None ############################################################################### # Test YCBCR420 creation option def DISABLED_jp2lura_10(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('data/rgbsmall.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_10.jp2', src_ds, options=['YCBCR420=YES', 'RESOLUTIONS=3']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) assert out_ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert out_ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert out_ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand del out_ds src_ds = None gdal.Unlink('/vsimem/jp2lura_10.jp2') # Quite a bit of difference... assert maxdiff <= 12, 'Image too different from reference' ############################################################################### # Test auto-promotion of 1bit alpha band to 8bit def DISABLED_jp2lura_11(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/stefan_full_rgba_alpha_1bit.jp2') fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') is None got_cs = fourth_band.Checksum() assert got_cs == 8527 jp2_bands_data = ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) jp2_fourth_band_data = fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize, int(ds.RasterXSize / 16), int(ds.RasterYSize / 16)) tmp_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/jp2lura_11.tif', ds) fourth_band = tmp_ds.GetRasterBand(4) got_cs = fourth_band.Checksum() gtiff_bands_data = tmp_ds.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) gtiff_fourth_band_data = fourth_band.ReadRaster(0, 0, ds.RasterXSize, ds.RasterYSize) # gtiff_fourth_band_subsampled_data = fourth_band.ReadRaster(0,0,ds.RasterXSize,ds.RasterYSize,ds.RasterXSize/16,ds.RasterYSize/16) tmp_ds = None gdal.GetDriverByName('GTiff').Delete('/vsimem/jp2lura_11.tif') assert got_cs == 8527 assert jp2_bands_data == gtiff_bands_data assert jp2_fourth_band_data == gtiff_fourth_band_data ds = gdal.OpenEx('data/stefan_full_rgba_alpha_1bit.jp2', open_options=['1BIT_ALPHA_PROMOTION=NO']) fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ############################################################################### # Check that PAM overrides internal georeferencing (#5279) def test_jp2lura_12(): if gdaltest.jp2lura_drv is None: pytest.skip() # Override projection shutil.copy('data/byte.jp2', 'tmp/jp2lura_12.jp2') ds = gdal.Open('tmp/jp2lura_12.jp2') sr = osr.SpatialReference() sr.ImportFromEPSG(32631) ds.SetProjection(sr.ExportToWkt()) ds = None ds = gdal.Open('tmp/jp2lura_12.jp2') wkt = ds.GetProjectionRef() ds = None gdaltest.jp2lura_drv.Delete('tmp/jp2lura_12.jp2') assert '32631' in wkt # Override geotransform shutil.copy('data/byte.jp2', 'tmp/jp2lura_12.jp2') ds = gdal.Open('tmp/jp2lura_12.jp2') ds.SetGeoTransform([1000, 1, 0, 2000, 0, -1]) ds = None ds = gdal.Open('tmp/jp2lura_12.jp2') gt = ds.GetGeoTransform() ds = None gdaltest.jp2lura_drv.Delete('tmp/jp2lura_12.jp2') assert gt == (1000, 1, 0, 2000, 0, -1) ############################################################################### # Check that PAM overrides internal GCPs (#5279) def test_jp2lura_13(): if gdaltest.jp2lura_drv is None: pytest.skip() # Create a dataset with GCPs src_ds = gdal.Open('data/rgb_gcp.vrt') ds = gdaltest.jp2lura_drv.CreateCopy('tmp/jp2lura_13.jp2', src_ds) ds = None src_ds = None assert gdal.VSIStatL('tmp/jp2lura_13.jp2.aux.xml') is None ds = gdal.Open('tmp/jp2lura_13.jp2') count = ds.GetGCPCount() gcps = ds.GetGCPs() wkt = ds.GetGCPProjection() assert count == 4 assert len(gcps) == 4 assert '4326' in wkt ds = None # Override GCP ds = gdal.Open('tmp/jp2lura_13.jp2') sr = osr.SpatialReference() sr.ImportFromEPSG(32631) gcps = [gdal.GCP(0, 1, 2, 3, 4)] ds.SetGCPs(gcps, sr.ExportToWkt()) ds = None ds = gdal.Open('tmp/jp2lura_13.jp2') count = ds.GetGCPCount() gcps = ds.GetGCPs() wkt = ds.GetGCPProjection() ds = None gdaltest.jp2lura_drv.Delete('tmp/jp2lura_13.jp2') assert count == 1 assert len(gcps) == 1 assert '32631' in wkt ############################################################################### # Check that we get GCPs even there's no projection info def test_jp2lura_14(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/byte_2gcps.jp2') assert ds.GetGCPCount() == 2 ############################################################################### # Test reading PixelIsPoint file (#5437) def test_jp2lura_16(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/byte_point.jp2') gt = ds.GetGeoTransform() assert ds.GetMetadataItem('AREA_OR_POINT') == 'Point', \ 'did not get AREA_OR_POINT = Point' ds = None gt_expected = (440690.0, 60.0, 0.0, 3751350.0, 0.0, -60.0) assert gt == gt_expected, 'did not get expected geotransform' gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', 'TRUE') ds = gdal.Open('data/byte_point.jp2') gt = ds.GetGeoTransform() ds = None gdal.SetConfigOption('GTIFF_POINT_GEO_IGNORE', None) gt_expected = (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0) assert gt == gt_expected, \ 'did not get expected geotransform with GTIFF_POINT_GEO_IGNORE TRUE' ############################################################################### # Test writing PixelIsPoint file (#5437) def test_jp2lura_17(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('data/byte_point.jp2') ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_17.jp2', src_ds) ds = None src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_17.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_17.jp2') gt = ds.GetGeoTransform() assert ds.GetMetadataItem('AREA_OR_POINT') == 'Point', \ 'did not get AREA_OR_POINT = Point' ds = None gt_expected = (440690.0, 60.0, 0.0, 3751350.0, 0.0, -60.0) assert gt == gt_expected, 'did not get expected geotransform' gdal.Unlink('/vsimem/jp2lura_17.jp2') ############################################################################### # Test when using the decode_area API when one dimension of the dataset is not a # multiple of 1024 (#5480) def test_jp2lura_18(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('Mem').Create('', 2000, 2000) ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_18.jp2', src_ds, options=['TILEXSIZE=2000', 'TILEYSIZE=2000']) ds = None src_ds = None ds = gdal.Open('/vsimem/jp2lura_18.jp2') ds.GetRasterBand(1).Checksum() assert gdal.GetLastErrorMsg() == '' ds = None gdal.Unlink('/vsimem/jp2lura_18.jp2') ############################################################################### # Test reading file where GMLJP2 has nul character instead of \n (#5760) def test_jp2lura_19(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/byte_gmljp2_with_nul_car.jp2') assert ds.GetProjectionRef() != '' ds = None ############################################################################### # Validate GMLJP2 content against schema def test_jp2lura_20(): if gdaltest.jp2lura_drv is None: pytest.skip() try: import xmlvalidate except ImportError: import traceback traceback.print_exc(file=sys.stdout) pytest.skip('Cannot import xmlvalidate') try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET.zip') except OSError: try: os.stat('../ogr/tmp/cache/SCHEMAS_OPENGIS_NET.zip') shutil.copy('../ogr/tmp/cache/SCHEMAS_OPENGIS_NET.zip', 'tmp/cache') except OSError: url = 'http://schemas.opengis.net/SCHEMAS_OPENGIS_NET.zip' if not gdaltest.download_file(url, 'SCHEMAS_OPENGIS_NET.zip', force_download=True, max_download_duration=20): pytest.skip('Cannot get SCHEMAS_OPENGIS_NET.zip') try: os.mkdir('tmp/cache/SCHEMAS_OPENGIS_NET') except OSError: pass try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET/gml/3.1.1/profiles/gmlJP2Profile/1.0.0/gmlJP2Profile.xsd') except OSError: gdaltest.unzip('tmp/cache/SCHEMAS_OPENGIS_NET', 'tmp/cache/SCHEMAS_OPENGIS_NET.zip') try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET/xlink.xsd') except OSError: xlink_xsd_url = 'http://www.w3.org/1999/xlink.xsd' if not gdaltest.download_file(xlink_xsd_url, 'SCHEMAS_OPENGIS_NET/xlink.xsd', force_download=True, max_download_duration=10): xlink_xsd_url = 'http://even.rouault.free.fr/xlink.xsd' if not gdaltest.download_file(xlink_xsd_url, 'SCHEMAS_OPENGIS_NET/xlink.xsd', force_download=True, max_download_duration=10): pytest.skip('Cannot get xlink.xsd') try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET/xml.xsd') except OSError: xlink_xsd_url = 'http://www.w3.org/1999/xml.xsd' if not gdaltest.download_file(xlink_xsd_url, 'SCHEMAS_OPENGIS_NET/xml.xsd', force_download=True, max_download_duration=10): xlink_xsd_url = 'http://even.rouault.free.fr/xml.xsd' if not gdaltest.download_file(xlink_xsd_url, 'SCHEMAS_OPENGIS_NET/xml.xsd', force_download=True, max_download_duration=10): pytest.skip('Cannot get xml.xsd') xmlvalidate.transform_abs_links_to_ref_links('tmp/cache/SCHEMAS_OPENGIS_NET') src_ds = gdal.Open('data/byte.tif') ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_20.jp2', src_ds) gmljp2 = ds.GetMetadata_List("xml:gml.root-instance")[0] ds = None gdal.Unlink('/vsimem/jp2lura_20.jp2') assert xmlvalidate.validate(gmljp2, ogc_schemas_location='tmp/cache/SCHEMAS_OPENGIS_NET') ############################################################################### # Test RGBA support def test_jp2lura_22(): if gdaltest.jp2lura_drv is None: pytest.skip() # RGBA src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_22.jp2', src_ds, options=['REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_22.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_22.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None assert validate('/vsimem/jp2lura_22.jp2', expected_gmljp2=False, inspire_tg=False) != 'fail' gdal.Unlink('/vsimem/jp2lura_22.jp2') assert maxdiff <= 0, 'Image too different from reference' if False: # pylint: disable=using-constant-test # RGBA with 1BIT_ALPHA=YES src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_22.jp2', src_ds, options=['1BIT_ALPHA=YES']) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_22.jp2.aux.xml') is None ds = gdal.OpenEx('/vsimem/jp2lura_22.jp2', open_options=['1BIT_ALPHA_PROMOTION=NO']) fourth_band = ds.GetRasterBand(4) assert fourth_band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ds = None ds = gdal.Open('/vsimem/jp2lura_22.jp2') assert ds.GetRasterBand(4).Checksum() == 23120 ds = None gdal.Unlink('/vsimem/jp2lura_22.jp2') # RGBA with YCBCR420=YES src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_22.jp2', src_ds, options=['YCBCR420=YES']) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_22.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_22.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(1).Checksum() == 11457 ds = None gdal.Unlink('/vsimem/jp2lura_22.jp2') # RGBA with YCC=YES. Will emit a warning for now because of OpenJPEG # bug (only fixed in trunk, not released versions at that time) src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_22.jp2', src_ds, options=['YCC=YES', 'QUALITY=100', 'REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_22.jp2.aux.xml') is None gdal.Unlink('/vsimem/jp2lura_22.jp2') assert maxdiff <= 0, 'Image too different from reference' # RGB,undefined src_ds = gdal.Open('../gcore/data/stefan_full_rgba_photometric_rgb.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_22.jp2', src_ds, options=['QUALITY=100', 'REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_22.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_22.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_Undefined ds = None gdal.Unlink('/vsimem/jp2lura_22.jp2') assert maxdiff <= 0, 'Image too different from reference' # RGB,undefined with ALPHA=YES src_ds = gdal.Open('../gcore/data/stefan_full_rgba_photometric_rgb.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_22.jp2', src_ds, options=['QUALITY=100', 'REVERSIBLE=YES', 'ALPHA=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_22.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_22.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_RedBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None gdal.Unlink('/vsimem/jp2lura_22.jp2') assert maxdiff <= 0, 'Image too different from reference' ############################################################################### # Test NBITS support def DISABLED_jp2lura_23(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('../gcore/data/uint16.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_23.jp2', src_ds, options=['NBITS=9', 'QUALITY=100', 'REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None ds = gdal.Open('/vsimem/jp2lura_23.jp2') assert ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '9' out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_23_2.jp2', ds) assert out_ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '9' del out_ds ds = None assert gdal.VSIStatL('/vsimem/jp2lura_23.jp2.aux.xml') is None gdal.Unlink('/vsimem/jp2lura_23.jp2') gdal.Unlink('/vsimem/jp2lura_23_2.jp2') assert maxdiff <= 1, 'Image too different from reference' ############################################################################### # Test Grey+alpha support def test_jp2lura_24(): if gdaltest.jp2lura_drv is None: pytest.skip() # Grey+alpha src_ds = gdal.Open('../gcore/data/stefan_full_greyalpha.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_24.jp2', src_ds, options=['REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_24.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_24.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_AlphaBand ds = None assert validate('/vsimem/jp2lura_24.jp2', expected_gmljp2=False, inspire_tg=False) != 'fail' gdal.Unlink('/vsimem/jp2lura_24.jp2') assert maxdiff <= 0, 'Image too different from reference' if False: # pylint: disable=using-constant-test # Grey+alpha with 1BIT_ALPHA=YES src_ds = gdal.Open('../gcore/data/stefan_full_greyalpha.tif') gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_24.jp2', src_ds, options=['1BIT_ALPHA=YES']) src_ds = None assert gdal.VSIStatL('/vsimem/jp2lura_24.jp2.aux.xml') is None ds = gdal.OpenEx('/vsimem/jp2lura_24.jp2', open_options=['1BIT_ALPHA_PROMOTION=NO']) assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(2).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '1' ds = None ds = gdal.Open('/vsimem/jp2lura_24.jp2') assert ds.GetRasterBand(2).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') is None assert ds.GetRasterBand(2).Checksum() == 23120 ds = None gdal.Unlink('/vsimem/jp2lura_24.jp2') ############################################################################### # Test multiband support def test_jp2lura_25(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 5) src_ds.GetRasterBand(1).Fill(255) src_ds.GetRasterBand(2).Fill(250) src_ds.GetRasterBand(3).Fill(245) src_ds.GetRasterBand(4).Fill(240) src_ds.GetRasterBand(5).Fill(235) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_25.jp2', src_ds, options=['REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(src_ds, out_ds) del out_ds src_ds = None ds = gdal.Open('/vsimem/jp2lura_25.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_Undefined ds = None assert gdal.VSIStatL('/vsimem/jp2lura_25.jp2.aux.xml') is None gdal.Unlink('/vsimem/jp2lura_25.jp2') assert maxdiff <= 0, 'Image too different from reference' ############################################################################### # Test CreateCopy() from a JPEG2000 with a 2048x2048 tiling def test_jp2lura_27(): if gdaltest.jp2lura_drv is None: pytest.skip() # Test optimization in GDALCopyWholeRasterGetSwathSize() # Not sure how we can check that except looking at logs with CPL_DEBUG=GDAL # for "GDAL: GDALDatasetCopyWholeRaster(): 2048*2048 swaths, bInterleave=1" src_ds = gdal.GetDriverByName('MEM').Create('', 2049, 2049, 4) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_27.jp2', src_ds, options=['LEVELS=1', 'TILEXSIZE=2048', 'TILEYSIZE=2048']) src_ds = None # print('End of JP2 decoding') out2_ds = gdal.GetDriverByName('GTiff').CreateCopy('/vsimem/jp2lura_27.tif', out_ds, options=['TILED=YES']) out_ds = None del out2_ds gdal.Unlink('/vsimem/jp2lura_27.jp2') gdal.Unlink('/vsimem/jp2lura_27.tif') ############################################################################### # Test CODEBLOCK_WIDTH/_HEIGHT XML_TYPE_IDX = 0 XML_VALUE_IDX = 1 XML_FIRST_CHILD_IDX = 2 def find_xml_node(ar, element_name, only_attributes=False): # type = ar[XML_TYPE_IDX] value = ar[XML_VALUE_IDX] if value == element_name: return ar for child_idx in range(XML_FIRST_CHILD_IDX, len(ar)): child = ar[child_idx] if only_attributes and child[XML_TYPE_IDX] != gdal.CXT_Attribute: continue found = find_xml_node(child, element_name) if found is not None: return found return None def get_attribute_val(ar, attr_name): node = find_xml_node(ar, attr_name, True) if node is None or node[XML_TYPE_IDX] != gdal.CXT_Attribute: return None if len(ar) > XML_FIRST_CHILD_IDX and \ node[XML_FIRST_CHILD_IDX][XML_TYPE_IDX] == gdal.CXT_Text: return node[XML_FIRST_CHILD_IDX][XML_VALUE_IDX] return None def find_element_with_name(ar, element_name, name): typ = ar[XML_TYPE_IDX] value = ar[XML_VALUE_IDX] if typ == gdal.CXT_Element and value == element_name and get_attribute_val(ar, 'name') == name: return ar for child_idx in range(XML_FIRST_CHILD_IDX, len(ar)): child = ar[child_idx] found = find_element_with_name(child, element_name, name) if found: return found return None def get_element_val(node): if node is None: return None for child_idx in range(XML_FIRST_CHILD_IDX, len(node)): child = node[child_idx] if child[XML_TYPE_IDX] == gdal.CXT_Text: return child[XML_VALUE_IDX] return None def jp2lura_test_codeblock(filename, codeblock_width, codeblock_height): node = gdal.GetJPEG2000Structure(filename, ['ALL=YES']) xcb = 2**(2 + int(get_element_val(find_element_with_name(node, "Field", "SPcod_xcb_minus_2")))) ycb = 2**(2 + int(get_element_val(find_element_with_name(node, "Field", "SPcod_ycb_minus_2")))) if xcb != codeblock_width or ycb != codeblock_height: return False return True def test_jp2lura_28(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 10, 10, 1) tests = [(['CODEBLOCK_WIDTH=2'], 64, 64, True), (['CODEBLOCK_WIDTH=2048'], 64, 64, True), (['CODEBLOCK_HEIGHT=2'], 64, 64, True), (['CODEBLOCK_HEIGHT=2048'], 64, 64, True), (['CODEBLOCK_WIDTH=128', 'CODEBLOCK_HEIGHT=128'], 64, 64, True), (['CODEBLOCK_WIDTH=63'], 32, 64, True), (['CODEBLOCK_WIDTH=32', 'CODEBLOCK_HEIGHT=32'], 32, 32, False), ] for (options, expected_cbkw, expected_cbkh, warning_expected) in tests: gdal.ErrorReset() gdal.PushErrorHandler() out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_28.jp2', src_ds, options=options) gdal.PopErrorHandler() if warning_expected and gdal.GetLastErrorMsg() == '': print(options) pytest.fail('warning expected') del out_ds if not jp2lura_test_codeblock('/vsimem/jp2lura_28.jp2', expected_cbkw, expected_cbkh): print(options) pytest.fail('unexpected codeblock size') gdal.Unlink('/vsimem/jp2lura_28.jp2') ############################################################################### # Test color table support def test_jp2lura_30(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 10, 10, 1) ct = gdal.ColorTable() ct.SetColorEntry(0, (255, 255, 255, 255)) ct.SetColorEntry(1, (255, 255, 0, 255)) ct.SetColorEntry(2, (255, 0, 255, 255)) ct.SetColorEntry(3, (0, 255, 255, 255)) src_ds.GetRasterBand(1).SetRasterColorTable(ct) gdal.ErrorReset() gdal.PushErrorHandler() out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_30.jp2', src_ds) gdal.PopErrorHandler() assert out_ds is None ############################################################################### # Test unusual band color interpretation order def DISABLED_jp2lura_31(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 10, 10, 3) src_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_GreenBand) src_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_BlueBand) src_ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_RedBand) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_31.jp2', src_ds) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_31.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_31.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_RedBand ds = None gdal.Unlink('/vsimem/jp2lura_31.jp2') # With alpha now src_ds = gdal.GetDriverByName('MEM').Create('', 10, 10, 4) src_ds.GetRasterBand(1).SetColorInterpretation(gdal.GCI_AlphaBand) src_ds.GetRasterBand(2).SetColorInterpretation(gdal.GCI_GreenBand) src_ds.GetRasterBand(3).SetColorInterpretation(gdal.GCI_BlueBand) src_ds.GetRasterBand(4).SetColorInterpretation(gdal.GCI_RedBand) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_31.jp2', src_ds) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_31.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_31.jp2') assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_AlphaBand assert ds.GetRasterBand(2).GetColorInterpretation() == gdal.GCI_GreenBand assert ds.GetRasterBand(3).GetColorInterpretation() == gdal.GCI_BlueBand assert ds.GetRasterBand(4).GetColorInterpretation() == gdal.GCI_RedBand ds = None gdal.Unlink('/vsimem/jp2lura_31.jp2') ############################################################################### # Test crazy tile size def DISABLED_jp2lura_33(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open(""" """) gdal.PushErrorHandler() out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_33.jp2', src_ds, options=['BLOCKXSIZE=100000', 'BLOCKYSIZE=100000']) gdal.PopErrorHandler() assert out_ds is None out_ds = None gdal.Unlink('/vsimem/jp2lura_33.jp2') ############################################################################### # Test opening a file whose dimensions are > 2^31-1 def test_jp2lura_34(): if gdaltest.jp2lura_drv is None: pytest.skip() gdal.PushErrorHandler() ds = gdal.Open('data/dimensions_above_31bit.jp2') gdal.PopErrorHandler() assert ds is None ############################################################################### # Test opening a truncated file def test_jp2lura_35(): if gdaltest.jp2lura_drv is None: pytest.skip() gdal.PushErrorHandler() ds = gdal.Open('data/truncated.jp2') gdal.PopErrorHandler() assert ds is None ############################################################################### # Test we cannot create files with more than 16384 bands def test_jp2lura_36(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2, 16385) gdal.PushErrorHandler() out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_36.jp2', src_ds) gdal.PopErrorHandler() assert out_ds is None and gdal.VSIStatL('/vsimem/jp2lura_36.jp2') is None ############################################################################### # Test metadata reading & writing def test_jp2lura_37(): if gdaltest.jp2lura_drv is None: pytest.skip() # No metadata src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options=['WRITE_METADATA=YES']) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_37.jp2') assert ds.GetMetadata() == {} gdal.Unlink('/vsimem/jp2lura_37.jp2') # Simple metadata in main domain for options in [['WRITE_METADATA=YES']]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadataItem('FOO', 'BAR') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options=options) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_37.jp2') assert ds.GetMetadata() == {'FOO': 'BAR'} ds = None gdal.Unlink('/vsimem/jp2lura_37.jp2') # Simple metadata in auxiliary domain src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadataItem('FOO', 'BAR', 'SOME_DOMAIN') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options=['WRITE_METADATA=YES']) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_37.jp2') md = ds.GetMetadata('SOME_DOMAIN') assert md == {'FOO': 'BAR'} gdal.Unlink('/vsimem/jp2lura_37.jp2') # Simple metadata in auxiliary XML domain src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadata([''], 'xml:SOME_DOMAIN') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options=['WRITE_METADATA=YES']) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_37.jp2') assert ds.GetMetadata('xml:SOME_DOMAIN')[0] == '\n' gdal.Unlink('/vsimem/jp2lura_37.jp2') # Special xml:BOX_ metadata domain for options in [['WRITE_METADATA=YES']]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadata([''], 'xml:BOX_1') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options=options) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_37.jp2') assert ds.GetMetadata('xml:BOX_0')[0] == '' gdal.Unlink('/vsimem/jp2lura_37.jp2') # Special xml:XMP metadata domain for options in [['WRITE_METADATA=YES']]: src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) src_ds.SetMetadata([''], 'xml:XMP') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options=options) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_37.jp2') assert ds.GetMetadata('xml:XMP')[0] == '' ds = None gdal.Unlink('/vsimem/jp2lura_37.jp2') # Special xml:IPR metadata domain # for options in [ ['WRITE_METADATA=YES'] ]: # src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) # src_ds.SetMetadata( [ '' ], 'xml:IPR') # out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_37.jp2', src_ds, options = options) # del out_ds # if gdal.VSIStatL('/vsimem/jp2lura_37.jp2.aux.xml') is not None: # gdaltest.post_reason('fail') # return 'fail' # ds = gdal.Open('/vsimem/jp2lura_37.jp2') # if ds.GetMetadata('xml:IPR')[0] != '': # gdaltest.post_reason('fail') # return 'fail' # ds = None gdal.Unlink('/vsimem/jp2lura_37.jp2') ############################################################################### # Test non-EPSG SRS (so written with a GML dictionary) def test_jp2lura_38(): if gdaltest.jp2lura_drv is None: pytest.skip() # No metadata src_ds = gdal.GetDriverByName('MEM').Create('', 2, 2) wkt = """PROJCS["UTM Zone 31, Northern Hemisphere",GEOGCS["unnamed ellipse",DATUM["unknown",SPHEROID["unnamed",100,1]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]""" src_ds.SetProjection(wkt) src_ds.SetGeoTransform([0, 60, 0, 0, 0, -60]) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_38.jp2', src_ds, options=['GeoJP2=NO']) assert out_ds.GetProjectionRef() == wkt crsdictionary = out_ds.GetMetadata_List("xml:CRSDictionary.gml")[0] out_ds = None gdal.Unlink('/vsimem/jp2lura_38.jp2') do_validate = False try: import xmlvalidate do_validate = True except ImportError: print('Cannot import xmlvalidate') try: os.stat('tmp/cache/SCHEMAS_OPENGIS_NET') except OSError: do_validate = False if do_validate: assert xmlvalidate.validate(crsdictionary, ogc_schemas_location='tmp/cache/SCHEMAS_OPENGIS_NET') ############################################################################### # Test GMLJP2OVERRIDE configuration option and DGIWG GMLJP2 def test_jp2lura_39(): if gdaltest.jp2lura_drv is None: pytest.skip() # No metadata src_ds = gdal.GetDriverByName('MEM').Create('', 20, 20) src_ds.SetGeoTransform([0, 60, 0, 0, 0, -60]) gdal.SetConfigOption('GMLJP2OVERRIDE', '/vsimem/override.gml') # This GML has srsName only on RectifiedGrid (taken from D.2.2.2 from DGIWG_Profile_of_JPEG2000_for_Georeferenced_Imagery.pdf) gdal.FileFromMemBuffer('/vsimem/override.gml', """ 0 0 4999 9999 X Y 19.1234567 37.1234567 0.0 0.00001234 -0.00001234 0.0 gmljp2://codestream/0 Record Interleaved """) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_39.jp2', src_ds, options=['GeoJP2=NO']) gdal.SetConfigOption('GMLJP2OVERRIDE', None) gdal.Unlink('/vsimem/override.gml') del out_ds ds = gdal.Open('/vsimem/jp2lura_39.jp2') assert ds.GetProjectionRef().find('4326') >= 0 ds = None gdal.Unlink('/vsimem/jp2lura_39.jp2') ############################################################################### # Test we can parse GMLJP2 v2.0 def test_jp2lura_40(): if gdaltest.jp2lura_drv is None: pytest.skip() # No metadata src_ds = gdal.GetDriverByName('MEM').Create('', 20, 20) src_ds.SetGeoTransform([0, 60, 0, 0, 0, -60]) gdal.SetConfigOption('GMLJP2OVERRIDE', '/vsimem/override.gml') gdal.FileFromMemBuffer('/vsimem/override.gml', """ gmljp2://codestream inapplicable 0 0 19 19 Lat Long 48.95 2.05 0 0.1 -0.1 0 gmljp2://codestream inapplicable """) out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_40.jp2', src_ds, options=['GeoJP2=NO']) gdal.SetConfigOption('GMLJP2OVERRIDE', None) gdal.Unlink('/vsimem/override.gml') del out_ds ds = gdal.Open('/vsimem/jp2lura_40.jp2') assert ds.GetProjectionRef().find('4326') >= 0 got_gt = ds.GetGeoTransform() expected_gt = (2, 0.1, 0, 49, 0, -0.1) for i in range(6): assert got_gt[i] == pytest.approx(expected_gt[i], abs=1e-5) ds = None gdal.Unlink('/vsimem/jp2lura_40.jp2') ############################################################################### # Test USE_SRC_CODESTREAM=YES def test_jp2lura_41(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.jp2') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_41.jp2', src_ds, options=['USE_SRC_CODESTREAM=YES', '@PROFILE=PROFILE_1', 'GEOJP2=NO', 'GMLJP2=NO']) assert src_ds.GetRasterBand(1).Checksum() == out_ds.GetRasterBand(1).Checksum() del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_41.jp2').size == 9923 gdal.Unlink('/vsimem/jp2lura_41.jp2') gdal.Unlink('/vsimem/jp2lura_41.jp2.aux.xml') # Warning if ignored option gdal.ErrorReset() gdal.PushErrorHandler() out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_41.jp2', src_ds, options=['USE_SRC_CODESTREAM=YES', 'QUALITY=1']) gdal.PopErrorHandler() del out_ds # if gdal.GetLastErrorMsg() == '': # gdaltest.post_reason('fail') # return 'fail' gdal.Unlink('/vsimem/jp2lura_41.jp2') gdal.Unlink('/vsimem/jp2lura_41.jp2.aux.xml') # Warning if source is not JPEG2000 src_ds = gdal.Open('data/byte.tif') gdal.ErrorReset() gdal.PushErrorHandler() out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_41.jp2', src_ds, options=['USE_SRC_CODESTREAM=YES']) gdal.PopErrorHandler() del out_ds assert gdal.GetLastErrorMsg() != '' gdal.Unlink('/vsimem/jp2lura_41.jp2') ############################################################################### # Get structure of a JPEG2000 file def test_jp2lura_43(): ret = gdal.GetJPEG2000StructureAsString('data/byte.jp2', ['ALL=YES']) assert ret is not None ############################################################################### # Test GMLJP2v2 def test_jp2lura_45(): if gdaltest.jp2lura_drv is None: pytest.skip() if gdal.GetDriverByName('GML') is None: pytest.skip() if gdal.GetDriverByName('KML') is None and gdal.GetDriverByName('LIBKML') is None: pytest.skip() # Test GMLJP2V2_DEF=YES src_ds = gdal.Open('data/byte.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_45.jp2', src_ds, options=['GMLJP2V2_DEF=YES']) assert out_ds.GetLayerCount() == 0 assert out_ds.GetLayer(0) is None del out_ds ds = gdal.Open('/vsimem/jp2lura_45.jp2') gmljp2 = ds.GetMetadata_List("xml:gml.root-instance")[0] minimal_instance = """ inapplicable 440720 3750120 441920 3751320 0 0 19 19 x y 440750 3751290 60 0 0 -60 gmljp2://codestream/0 inapplicable """ assert gmljp2 == minimal_instance gdal.Unlink('/vsimem/jp2lura_45.jp2') ############################################################################### # Test writing & reading RPC in GeoJP2 box def test_jp2lura_47(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('../gcore/data/byte_rpc.tif') out_ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_47.jp2', src_ds) del out_ds assert gdal.VSIStatL('/vsimem/jp2lura_47.jp2.aux.xml') is None ds = gdal.Open('/vsimem/jp2lura_47.jp2') assert ds.GetMetadata('RPC') is not None ds = None gdal.Unlink('/vsimem/jp2lura_47.jp2') ############################################################################### # Test reading a dataset whose tile dimensions are larger than dataset ones def test_jp2lura_48(): if gdaltest.jp2lura_drv is None: pytest.skip() ds = gdal.Open('data/byte_tile_2048.jp2') (blockxsize, blockysize) = ds.GetRasterBand(1).GetBlockSize() assert (blockxsize, blockysize) == (20, 20) assert ds.GetRasterBand(1).Checksum() == 4610 ds = None ############################################################################### def test_jp2lura_online_1(): if gdaltest.jp2lura_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/7sisters200.j2k', '7sisters200.j2k'): pytest.skip() # Checksum = 32669 on my PC tst = gdaltest.GDALTest('JP2Lura', 'tmp/cache/7sisters200.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/7sisters200.j2k') ds.GetRasterBand(1).Checksum() ds = None ############################################################################### def test_jp2lura_online_2(): if gdaltest.jp2lura_drv is None: pytest.skip() if not gdaltest.download_file('http://download.osgeo.org/gdal/data/jpeg2000/gcp.jp2', 'gcp.jp2'): pytest.skip() # Checksum = 15621 on my PC tst = gdaltest.GDALTest('JP2Lura', 'tmp/cache/gcp.jp2', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/gcp.jp2') ds.GetRasterBand(1).Checksum() assert len(ds.GetGCPs()) == 15, 'bad number of GCP' expected_wkt = """GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]""" assert ds.GetGCPProjection() == expected_wkt, 'bad GCP projection' ds = None ############################################################################### def test_jp2lura_online_3(): if gdaltest.jp2lura_drv is None: pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.j2k', 'Bretagne1.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne1.bmp', 'Bretagne1.bmp'): pytest.skip() tst = gdaltest.GDALTest('JP2Lura', 'tmp/cache/Bretagne1.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne1.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne1.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Difference between the image before and after compression assert maxdiff <= 17, 'Image too different from reference' ############################################################################### def test_jp2lura_online_4(): if gdaltest.jp2lura_drv is None: pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.j2k', 'Bretagne2.j2k'): pytest.skip() if not gdaltest.download_file('http://www.openjpeg.org/samples/Bretagne2.bmp', 'Bretagne2.bmp'): pytest.skip() tst = gdaltest.GDALTest('JP2Lura', 'tmp/cache/Bretagne2.j2k', 1, None, filename_absolute=1) tst.testOpen() ds = gdal.Open('tmp/cache/Bretagne2.j2k') ds_ref = gdal.Open('tmp/cache/Bretagne2.bmp') maxdiff = gdaltest.compare_ds(ds, ds_ref, 0, 0, 1024, 1024) print(ds.GetRasterBand(1).Checksum()) print(ds_ref.GetRasterBand(1).Checksum()) ds = None ds_ref = None # Difference between the image before and after compression assert maxdiff <= 10, 'Image too different from reference' ############################################################################### # Try reading JP2Lura with color table def test_jp2lura_online_5(): if gdaltest.jp2lura_drv is None: pytest.skip() if not gdaltest.download_file('http://www.gwg.nga.mil/ntb/baseline/software/testfile/Jpeg2000/jp2_09/file9.jp2', 'file9.jp2'): pytest.skip() ds = gdal.Open('tmp/cache/file9.jp2') cs1 = ds.GetRasterBand(1).Checksum() assert cs1 == 47664, 'Did not get expected checksums' assert ds.GetRasterBand(1).GetColorTable() is not None, \ 'Did not get expected color table' ds = None ############################################################################### # Try reading YCbCr JP2Lura as RGB def test_jp2lura_online_6(): if gdaltest.jp2lura_drv is None: pytest.skip() if not gdaltest.download_file('http://www.gwg.nga.mil/ntb/baseline/software/testfile/Jpeg2000/jp2_03/file3.jp2', 'file3.jp2'): pytest.skip() ds = gdal.Open('tmp/cache/file3.jp2') # cs1 = ds.GetRasterBand(1).Checksum() # cs2 = ds.GetRasterBand(2).Checksum() # cs3 = ds.GetRasterBand(3).Checksum() # if cs1 != 26140 or cs2 != 32689 or cs3 != 48247: # print(cs1, cs2, cs3) # gdaltest.post_reason('Did not get expected checksums') # return 'fail' assert ds is None ds = None ############################################################################### # Test GDAL_GEOREF_SOURCES def test_jp2lura_49(): if gdaltest.jp2lura_drv is None: pytest.skip() tests = [(None, True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), (None, True, False, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), (None, False, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), (None, False, False, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('INTERNAL', True, True, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('INTERNAL,PAM', True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), ('INTERNAL,WORLDFILE', True, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('INTERNAL,PAM,WORLDFILE', True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), ('INTERNAL,WORLDFILE,PAM', True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM,INTERNAL', False, False, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('PAM,WORLDFILE,INTERNAL', False, False, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('PAM', True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), ('PAM,WORLDFILE', True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), ('WORLDFILE', True, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM', True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,INTERNAL', True, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM,INTERNAL', True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,INTERNAL,PAM', True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('NONE', True, True, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ] for (config_option_value, copy_pam, copy_worldfile, expected_srs, expected_gt) in tests: gdal.SetConfigOption('GDAL_GEOREF_SOURCES', config_option_value) gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.jp2', open('data/byte_nogeoref.jp2', 'rb').read()) if copy_pam: gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.jp2.aux.xml', open('data/byte_nogeoref.jp2.aux.xml', 'rb').read()) if copy_worldfile: gdal.FileFromMemBuffer('/vsimem/byte_nogeoref.j2w', open('data/byte_nogeoref.j2w', 'rb').read()) ds = gdal.Open('/vsimem/byte_nogeoref.jp2') gt = ds.GetGeoTransform() srs_wkt = ds.GetProjectionRef() ds = None gdal.SetConfigOption('GDAL_GEOREF_SOURCES', None) gdal.Unlink('/vsimem/byte_nogeoref.jp2') gdal.Unlink('/vsimem/byte_nogeoref.jp2.aux.xml') gdal.Unlink('/vsimem/byte_nogeoref.j2w') if gt != expected_gt: print('Got ' + str(gt)) print('Expected ' + str(expected_gt)) pytest.fail('Did not get expected gt for %s,copy_pam=%s,copy_worldfile=%s' % (config_option_value, str(copy_pam), str(copy_worldfile))) if (expected_srs == '' and srs_wkt != '') or (expected_srs != '' and expected_srs not in srs_wkt): print('Got ' + srs_wkt) print('Expected ' + expected_srs) pytest.fail('Did not get expected SRS for %s,copy_pam=%s,copy_worldfile=%s' % (config_option_value, str(copy_pam), str(copy_worldfile))) tests = [(None, True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), (None, True, False, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), (None, False, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), (None, False, False, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('INTERNAL', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('INTERNAL,PAM', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('INTERNAL,WORLDFILE', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('INTERNAL,PAM,WORLDFILE', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('INTERNAL,WORLDFILE,PAM', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('WORLDFILE,PAM,INTERNAL', False, False, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('PAM,WORLDFILE,INTERNAL', False, False, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('GEOJP2', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('GEOJP2,GMLJP2', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('GMLJP2', True, True, '26712', (439970.0, 60.0, 0.0, 3751030.0, 0.0, -60.0)), ('GMLJP2,GEOJP2', True, True, '26712', (439970.0, 60.0, 0.0, 3751030.0, 0.0, -60.0)), ('MSIG', True, True, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ('MSIG,GMLJP2,GEOJP2', True, True, '26712', (439970.0, 60.0, 0.0, 3751030.0, 0.0, -60.0)), ('MSIG,GEOJP2,GMLJP2', True, True, '26711', (440720.0, 60.0, 0.0, 3751320.0, 0.0, -60.0)), ('PAM', True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), ('PAM,WORLDFILE', True, True, 'LOCAL_CS["PAM"]', (100.0, 1.0, 0.0, 300.0, 0.0, -1.0)), ('WORLDFILE', True, True, '', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM', True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,INTERNAL', True, True, '26711', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,PAM,INTERNAL', True, True, 'LOCAL_CS["PAM"]', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('WORLDFILE,INTERNAL,PAM', True, True, '26711', (99.5, 1.0, 0.0, 200.5, 0.0, -1.0)), ('NONE', True, True, '', (0.0, 1.0, 0.0, 0.0, 0.0, 1.0)), ] for (config_option_value, copy_pam, copy_worldfile, expected_srs, expected_gt) in tests: gdal.FileFromMemBuffer('/vsimem/inconsitant_geojp2_gmljp2.jp2', open('data/inconsitant_geojp2_gmljp2.jp2', 'rb').read()) if copy_pam: gdal.FileFromMemBuffer('/vsimem/inconsitant_geojp2_gmljp2.jp2.aux.xml', open('data/inconsitant_geojp2_gmljp2.jp2.aux.xml', 'rb').read()) if copy_worldfile: gdal.FileFromMemBuffer('/vsimem/inconsitant_geojp2_gmljp2.j2w', open('data/inconsitant_geojp2_gmljp2.j2w', 'rb').read()) open_options = [] if config_option_value is not None: open_options += ['GEOREF_SOURCES=' + config_option_value] ds = gdal.OpenEx('/vsimem/inconsitant_geojp2_gmljp2.jp2', open_options=open_options) gt = ds.GetGeoTransform() srs_wkt = ds.GetProjectionRef() ds = None gdal.Unlink('/vsimem/inconsitant_geojp2_gmljp2.jp2') gdal.Unlink('/vsimem/inconsitant_geojp2_gmljp2.jp2.aux.xml') gdal.Unlink('/vsimem/inconsitant_geojp2_gmljp2.j2w') if gt != expected_gt: print('Got ' + str(gt)) print('Expected ' + str(expected_gt)) pytest.fail('Did not get expected gt for %s,copy_pam=%s,copy_worldfile=%s' % (config_option_value, str(copy_pam), str(copy_worldfile))) if (expected_srs == '' and srs_wkt != '') or (expected_srs != '' and expected_srs not in srs_wkt): print('Got ' + srs_wkt) print('Expected ' + expected_srs) pytest.fail('Did not get expected SRS for %s,copy_pam=%s,copy_worldfile=%s' % (config_option_value, str(copy_pam), str(copy_worldfile))) ds = gdal.OpenEx('data/inconsitant_geojp2_gmljp2.jp2', open_options=['GEOREF_SOURCES=PAM,WORLDFILE']) fl = ds.GetFileList() assert set(fl) == set(['data/inconsitant_geojp2_gmljp2.jp2', 'data/inconsitant_geojp2_gmljp2.jp2.aux.xml']), \ 'Did not get expected filelist' gdal.ErrorReset() with gdaltest.error_handler(): gdal.OpenEx('data/inconsitant_geojp2_gmljp2.jp2', open_options=['GEOREF_SOURCES=unhandled']) assert gdal.GetLastErrorMsg() != '', 'expected warning' ############################################################################### # Test reading split IEEE-754 Float32 def test_jp2lura_50(): if gdaltest.jp2lura_drv is None: pytest.skip() tst = gdaltest.GDALTest('JP2Lura', 'float32_ieee754_split_reversible.jp2', 1, 4672) return tst.testOpen() ############################################################################### # Test split IEEE-754 Float32 def test_jp2lura_51(): if gdaltest.jp2lura_drv is None: pytest.skip() # Don't allow it by default src_ds = gdal.Open('data/float32.tif') with gdaltest.error_handler(): ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_51.jp2', src_ds) assert ds is None ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_51.jp2', src_ds, options=['SPLIT_IEEE754=YES']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert validate('/vsimem/jp2lura_51.jp2', inspire_tg=False) != 'fail' gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_51.jp2') assert maxdiff <= 0.01 # QUALITY with gdaltest.error_handler(): ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_51.jp2', src_ds, options=['SPLIT_IEEE754=YES', 'QUALITY=100']) if ds is not None: maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff <= 124 assert validate('/vsimem/jp2lura_51.jp2', inspire_tg=False) != 'fail' ds = None with gdaltest.error_handler(): gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_51.jp2') gdal.Unlink('/vsimem/jp2lura_51.jp2') # RATE ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_51.jp2', src_ds, options=['SPLIT_IEEE754=YES', 'RATE=1']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff <= 370 assert validate('/vsimem/jp2lura_51.jp2', inspire_tg=False) != 'fail' gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_51.jp2') # Test reversible ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_51.jp2', src_ds, options=['SPLIT_IEEE754=YES', 'REVERSIBLE=YES']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff == 0.0 gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_51.jp2') ############################################################################### # Test other data types def test_jp2lura_52(): if gdaltest.jp2lura_drv is None: pytest.skip() tests = [[-32768, gdal.GDT_Int16, 'h'], [-1, gdal.GDT_Int16, 'h'], [32767, gdal.GDT_Int16, 'h'], [0, gdal.GDT_UInt16, 'H'], [65535, gdal.GDT_UInt16, 'H'], [-2 ** 27, gdal.GDT_Int32, 'i'], [2 ** 27 - 1, gdal.GDT_Int32, 'i'], [0, gdal.GDT_UInt32, 'I'], [2 ** 28 - 1, gdal.GDT_UInt32, 'I'], ] for (val, dt, fmt) in tests: src_ds = gdal.GetDriverByName('MEM').Create('', 10, 10, 1, dt) src_ds.GetRasterBand(1).Fill(val) ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_52.jp2', src_ds, options=['REVERSIBLE=YES']) got_min, got_max = ds.GetRasterBand(1).ComputeRasterMinMax() assert val == got_min and val == got_max, (val, dt, fmt, got_min, got_max) ds = None assert not (val >= 0 and validate('/vsimem/jp2lura_52.jp2', expected_gmljp2=False, inspire_tg=False) == 'fail'), \ (val, dt, fmt) gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_52.jp2') ############################################################################### # Test RATE and QUALITY def test_jp2lura_53(): if gdaltest.jp2lura_drv is None: pytest.skip() src_ds = gdal.Open('data/byte.tif') ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_53.jp2', src_ds, options=['RATE=1']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff <= 8 gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_53.jp2') ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_53.jp2', src_ds, options=['QUALITY=100']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff <= 2 gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_53.jp2') # Forcing irreversible due to RATE ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_53.jp2', src_ds, options=['REVERSIBLE=YES', 'RATE=1']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff <= 8 gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_53.jp2') # QUALITY ignored ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_53.jp2', src_ds, options=['REVERSIBLE=YES', 'QUALITY=100']) maxdiff = gdaltest.compare_ds(ds, src_ds) ds = None assert maxdiff <= 0 gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_53.jp2') ############################################################################### # Test RasterIO edge cases def test_jp2lura_54(): if gdaltest.jp2lura_drv is None: pytest.skip() # Tiled with incomplete boundary tiles src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 1) src_ds.GetRasterBand(1).Fill(100) ds = gdaltest.jp2lura_drv.CreateCopy('/vsimem/jp2lura_54.jp2', src_ds, options=['REVERSIBLE=YES', 'TILEXSIZE=64', 'TILEYSIZE=64']) # Request with a type that is not the natural type data = ds.GetRasterBand(1).ReadRaster(0, 0, 100, 100, 100, 100, buf_type=gdal.GDT_Int16) data = struct.unpack('h' * 100 * 100, data) assert min(data) == 100 and max(data) == 100 # Request at a resolution that is not a power of two data = ds.GetRasterBand(1).ReadRaster(0, 0, 100, 100, 30, 30) data = struct.unpack('B' * 30 * 30, data) assert min(data) == 100 and max(data) == 100 ds = None gdaltest.jp2lura_drv.Delete('/vsimem/jp2lura_54.jp2') ############################################################################### def test_jp2lura_cleanup(): gdaltest.reregister_all_jpeg2000_drivers() gdalautotest-3.1.2/gdrivers/leveller.py0000775000175000017500000000350613701060016016705 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: leveller.py 30250f784292af8d1f0ae95625b06ac482885d86 2018-12-14 10:16:24 +1300 Craig de Stigter $ # # Project: GDAL/OGR Test Suite # Purpose: Test Leveller driver support. # Author: Frank Warmerdam # ############################################################################### # Copyright (c) 2005, Frank Warmerdam # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import gdaltest ############################################################################### # Perform simple read test. def test_leveller_1(): tst = gdaltest.GDALTest('Leveller', 'ter6test.ter', 1, 33441) return tst.testOpen() gdalautotest-3.1.2/gdrivers/webp.py0000775000175000017500000001101213701060016016017 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: webp.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test WEBP driver # Author: Even Rouault, # ############################################################################### # Copyright (c) 2011-2013, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### from osgeo import gdal import gdaltest import pytest ############################################################################### # Test if WEBP driver is present def test_webp_1(): gdaltest.webp_drv = gdal.GetDriverByName('WEBP') if gdaltest.webp_drv is None: pytest.skip() ############################################################################### # Open() test def test_webp_2(): if gdaltest.webp_drv is None: pytest.skip() ds = gdal.Open('data/rgbsmall.webp') cs = ds.GetRasterBand(1).Checksum() assert cs == 21464 or cs == 21450 or cs == 21459, \ 'did not get expected checksum on band 1' ############################################################################### # CreateCopy() test def test_webp_3(): if gdaltest.webp_drv is None: pytest.skip() src_ds = gdal.Open('data/rgbsmall.tif') out_ds = gdaltest.webp_drv.CreateCopy('/vsimem/webp_3.webp', src_ds, options=['QUALITY=80']) src_ds = None cs1 = out_ds.GetRasterBand(1).Checksum() out_ds = None gdal.Unlink('/vsimem/webp_3.webp') gdal.Unlink('/vsimem/webp_3.webp.aux.xml') # 21502 is for libwebp 0.3.0 assert cs1 == 21464 or cs1 == 21502 or cs1 == 21695 or cs1 == 21700, \ 'did not get expected checksum on band 1' ############################################################################### # CreateCopy() on RGBA def test_webp_4(): if gdaltest.webp_drv is None: pytest.skip() md = gdaltest.webp_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LOSSLESS') == -1: pytest.skip() src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') out_ds = gdaltest.webp_drv.CreateCopy('/vsimem/webp_4.webp', src_ds) src_ds = None cs1 = out_ds.GetRasterBand(1).Checksum() cs4 = out_ds.GetRasterBand(4).Checksum() out_ds = None gdal.Unlink('/vsimem/webp_4.webp') # 22849 is for libwebp 0.3.0 assert cs1 in (22001, 22849, 34422, 36652, 36658, 45319), \ 'did not get expected checksum on band 1' assert cs4 == 10807, 'did not get expected checksum on band 4' ############################################################################### # CreateCopy() on RGBA with lossless compression def test_webp_5(): if gdaltest.webp_drv is None: pytest.skip() md = gdaltest.webp_drv.GetMetadata() if md['DMD_CREATIONOPTIONLIST'].find('LOSSLESS') == -1: pytest.skip() src_ds = gdal.Open('../gcore/data/stefan_full_rgba.tif') out_ds = gdaltest.webp_drv.CreateCopy('/vsimem/webp_5.webp', src_ds, options=['LOSSLESS=YES']) src_ds = None cs1 = out_ds.GetRasterBand(1).Checksum() cs4 = out_ds.GetRasterBand(4).Checksum() out_ds = None gdal.Unlink('/vsimem/webp_5.webp') assert cs1 == 12603 or cs1 == 18536 or cs1 == 14800, \ 'did not get expected checksum on band 1' assert cs4 == 10807, 'did not get expected checksum on band 4' gdalautotest-3.1.2/gdrivers/sentinel2.py0000775000175000017500000033331113701060016016776 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: sentinel2.py b846e11320355c1e9ba146b7f672f4ea597c704c 2020-04-16 12:25:02 +0300 an-ivanov $ # # Project: GDAL/OGR Test Suite # Purpose: Test Sentinel2 support. # Author: Even Rouault, # Funded by: Centre National d'Etudes Spatiales (CNES) # ############################################################################### # Copyright (c) 2015, Even Rouault, # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os import sys from osgeo import gdal import gdaltest import pytest ############################################################################### # Test opening a L1C product def test_sentinel2_l1c_1(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FOOTPRINT': 'POLYGON((11 46, 11 45, 13 45, 13 46, 11 46))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1C', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1C', 'QUANTIFICATION_VALUE': '1000', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = {'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution, UTM 32N', 'SUBDATASET_1_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml:10m:EPSG_32632', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12 with 20m resolution, UTM 32N', 'SUBDATASET_2_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml:20m:EPSG_32632', 'SUBDATASET_3_DESC': 'Bands B1, B9, B10 with 60m resolution, UTM 32N', 'SUBDATASET_3_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml:60m:EPSG_32632', 'SUBDATASET_4_DESC': 'RGB preview, UTM 32N', 'SUBDATASET_4_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml:PREVIEW:EPSG_32632'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening a zip file as distributed from https://scihub.esa.int/ if not sys.platform.startswith('win'): os.system('sh -c "cd data/fake_sentinel2_l1c && zip -r ../../tmp/S2A_OPER_PRD_MSIL1C.zip S2A_OPER_PRD_MSIL1C.SAFE >/dev/null" && cd ../..') if os.path.exists('tmp/S2A_OPER_PRD_MSIL1C.zip'): ds = gdal.Open('tmp/S2A_OPER_PRD_MSIL1C.zip') assert ds is not None os.unlink('tmp/S2A_OPER_PRD_MSIL1C.zip') # Try opening the 4 subdatasets for i in range(4): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L1C:', 'SENTINEL2_L1C:foo.xml:10m:EPSG_32632', 'SENTINEL2_L1C:%s' % filename_xml, 'SENTINEL2_L1C:%s:' % filename_xml, 'SENTINEL2_L1C:%s:10m' % filename_xml, 'SENTINEL2_L1C:%s:10m:' % filename_xml, 'SENTINEL2_L1C:%s:10m:EPSG_' % filename_xml, 'SENTINEL2_L1C:%s:50m:EPSG_32632' % filename_xml, 'SENTINEL2_L1C:%s:10m:EPSG_32633' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name ############################################################################### # Test opening a L1C subdataset on the 10m bands def test_sentinel2_l1c_2(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L1C:%s:10m:EPSG_32632' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1C', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1C', 'QUANTIFICATION_VALUE': '1000', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 20984 and ds.RasterYSize == 20980 assert ds.GetProjectionRef().find('32632') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (699960.0, 10.0, 0.0, 5100060.0, 0.0, -10.0) assert ds.RasterCount == 4 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_T32TQR_B08.jp2 1 data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TRQ_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_T32TRQ_B08.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B4', 'BANDWIDTH': '30', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1500', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '665', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.GetColorInterpretation() == gdal.GCI_RedBand assert band.DataType == gdal.GDT_UInt16 assert band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '12' band = ds.GetRasterBand(4) assert band.GetColorInterpretation() == gdal.GCI_Undefined got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B8', 'BANDWIDTH': '115', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1000', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '842', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() ############################################################################### # Test opening a L1C subdataset on the 60m bands and enabling alpha band def test_sentinel2_l1c_3(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml' ds = gdal.OpenEx('SENTINEL2_L1C:%s:60m:EPSG_32632' % filename_xml, open_options=['ALPHA=YES']) assert ds is not None assert ds.RasterCount == 4 band = ds.GetRasterBand(4) assert band.GetColorInterpretation() == gdal.GCI_AlphaBand gdal.ErrorReset() cs = band.Checksum() assert cs == 0 and gdal.GetLastErrorMsg() == '' band.ReadRaster() ############################################################################### # Test opening a L1C subdataset on the PREVIEW bands def test_sentinel2_l1c_4(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml' ds = gdal.OpenEx('SENTINEL2_L1C:%s:PREVIEW:EPSG_32632' % filename_xml) assert ds is not None assert ds.RasterCount == 3 fl = ds.GetFileList() # main XML + 2 granule XML + 2 jp2 if len(fl) != 1 + 2 + 2: import pprint pprint.pprint(fl) pytest.fail() band = ds.GetRasterBand(1) assert band.GetColorInterpretation() == gdal.GCI_RedBand assert band.DataType == gdal.GDT_Byte ############################################################################### # Test opening invalid XML files def test_sentinel2_l1c_5(): # Invalid XML gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C:/vsimem/test.xml:10m:EPSG_32632') assert ds is None # File is OK, but granule MTD are missing gdal.FileFromMemBuffer('/vsimem/test.xml', """ B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B8A S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B01 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B06 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B10 S2A_OPER_MSI_L1C_T32TQR_B08 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B07 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B09 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B05 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B12 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B11 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B04 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B03 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B02 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_B8A S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B01 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B06 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B10 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B08 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B07 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B09 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B05 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B12 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B11 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B04 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B03 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B02 S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TRQ_B8A """) gdal.ErrorReset() with gdaltest.error_handler(): gdal.Open('/vsimem/test.xml') assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C:/vsimem/test.xml:10m:EPSG_32632') assert ds is None # No Product_Info gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C:/vsimem/test.xml:10m:EPSG_32632') assert ds is None # No Product_Organisation gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C:/vsimem/test.xml:10m:EPSG_32632') assert ds is None # No Band_List gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None # No valid bands gdal.FileFromMemBuffer('/vsimem/test.xml', """ Bxx """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None gdal.Unlink('/vsimem/test.xml') ############################################################################### # Windows specific test to test support for long filenames def test_sentinel2_l1c_6(): if sys.platform != 'win32': pytest.skip() filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/S2A_OPER_MTD_SAFL1C.xml' filename_xml = filename_xml.replace('/', '\\') filename_xml = '\\\\?\\' + os.getcwd() + '\\' + filename_xml gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' subds_name = ds.GetMetadataItem('SUBDATASET_1_NAME', 'SUBDATASETS') gdal.ErrorReset() ds = gdal.Open(subds_name) assert ds is not None and gdal.GetLastErrorMsg() == '' ############################################################################### # Test with a real JP2 tile def test_sentinel2_l1c_7(): gdal.FileFromMemBuffer('/vsimem/test.xml', """ B1 S2A_OPER_MSI_L1C_bla_T32TQR_B01 """) gdal.FileFromMemBuffer('/vsimem/GRANULE/S2A_OPER_MSI_L1C_bla_N01.03/S2A_OPER_MTD_L1C_bla.xml', """ S2A_OPER_MSI_L1C_bla_N01.03 WGS84 / UTM zone 53S EPSG:32753 1830 1830 499980 7200040 60 -60 """) # Open with missing tile with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C:/vsimem/test.xml:60m:EPSG_32753') ds = None f = open('data/gtsmall_10_uint16.jp2', 'rb') f2 = gdal.VSIFOpenL('/vsimem/GRANULE/S2A_OPER_MSI_L1C_bla_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_bla_B01.jp2', 'wb') data = f.read() gdal.VSIFWriteL(data, 1, len(data), f2) gdal.VSIFCloseL(f2) f.close() ds = gdal.Open('SENTINEL2_L1C:/vsimem/test.xml:60m:EPSG_32753') nbits = ds.GetRasterBand(1).GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') assert nbits == '10' gdal.Unlink('/vsimem/test.xml') gdal.Unlink('/vsimem/GRANULE/S2A_OPER_MSI_L1C_bla_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_bla_B01.jp2') ############################################################################### # Test opening a L1C tile def test_sentinel2_l1c_tile_1(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUDY_PIXEL_PERCENTAGE': '0', 'DATASTRIP_ID': 'S2A_OPER_MSI_L1C_DS_MTI__20151231T235959_S20151231T235959_N01.03', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'DOWNLINK_PRIORITY': 'NOMINAL', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1C', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1C', 'QUANTIFICATION_VALUE': '1000', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SENSING_TIME': '2015-12-31T23:59:59.999Z', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0', 'TILE_ID': 'S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_N01.03'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = {'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution', 'SUBDATASET_1_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:10m', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12 with 20m resolution', 'SUBDATASET_2_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:20m', 'SUBDATASET_3_DESC': 'Bands B1, B9, B10 with 60m resolution', 'SUBDATASET_3_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:60m', 'SUBDATASET_4_DESC': 'RGB preview', 'SUBDATASET_4_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:PREVIEW'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening the 4 subdatasets for i in range(4): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L1C_TILE:', 'SENTINEL2_L1C_TILE:foo.xml:10m', 'SENTINEL2_L1C_TILE:%s' % filename_xml, 'SENTINEL2_L1C_TILE:%s:' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name ############################################################################### # Test opening a L1C tile without main MTD file def test_sentinel2_l1c_tile_2(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml' gdal.ErrorReset() gdal.SetConfigOption('SENTINEL2_USE_MAIN_MTD', 'NO') # Simulate absence of main MTD file ds = gdal.Open(filename_xml) gdal.SetConfigOption('SENTINEL2_USE_MAIN_MTD', None) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUDY_PIXEL_PERCENTAGE': '0', 'DATASTRIP_ID': 'S2A_OPER_MSI_L1C_DS_MTI__20151231T235959_S20151231T235959_N01.03', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'DOWNLINK_PRIORITY': 'NOMINAL', 'SENSING_TIME': '2015-12-31T23:59:59.999Z', 'TILE_ID': 'S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_N01.03'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = {'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution', 'SUBDATASET_1_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:10m', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12 with 20m resolution', 'SUBDATASET_2_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:20m', 'SUBDATASET_3_DESC': 'Bands B1, B9, B10 with 60m resolution', 'SUBDATASET_3_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:60m', 'SUBDATASET_4_DESC': 'RGB preview', 'SUBDATASET_4_NAME': 'SENTINEL2_L1C_TILE:data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml:PREVIEW'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() ############################################################################### # Test opening a L1C tile subdataset on the 10m bands def test_sentinel2_l1c_tile_3(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L1C_TILE:%s:10m' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUDY_PIXEL_PERCENTAGE': '0', 'DATASTRIP_ID': 'S2A_OPER_MSI_L1C_DS_MTI__20151231T235959_S20151231T235959_N01.03', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'DOWNLINK_PRIORITY': 'NOMINAL', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1C', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1C', 'QUANTIFICATION_VALUE': '1000', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SENSING_TIME': '2015-12-31T23:59:59.999Z', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0', 'TILE_ID': 'S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_N01.03'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 10980 and ds.RasterYSize == 10980 assert ds.GetProjectionRef().find('32632') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (699960.0, 10.0, 0.0, 5100060.0, 0.0, -10.0) assert ds.RasterCount == 4 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_T32TQR_B08.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B4', 'BANDWIDTH': '30', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1500', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '665', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.GetColorInterpretation() == gdal.GCI_RedBand assert band.DataType == gdal.GDT_UInt16 assert band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '12' band = ds.GetRasterBand(4) assert band.GetColorInterpretation() == gdal.GCI_Undefined got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B8', 'BANDWIDTH': '115', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1000', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '842', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() ############################################################################### # Test opening a L1C tile subdataset on the 10m bands without main MTD file def test_sentinel2_l1c_tile_4(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml' gdal.ErrorReset() gdal.SetConfigOption('SENTINEL2_USE_MAIN_MTD', 'NO') # Simulate absence of main MTD file ds = gdal.OpenEx('SENTINEL2_L1C_TILE:%s:10m' % filename_xml, open_options=['ALPHA=YES']) gdal.SetConfigOption('SENTINEL2_USE_MAIN_MTD', None) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUDY_PIXEL_PERCENTAGE': '0', 'DATASTRIP_ID': 'S2A_OPER_MSI_L1C_DS_MTI__20151231T235959_S20151231T235959_N01.03', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'DOWNLINK_PRIORITY': 'NOMINAL', 'SENSING_TIME': '2015-12-31T23:59:59.999Z', 'TILE_ID': 'S2A_OPER_MSI_L1C_TL_MTI__20151231T235959_A000123_T32TQR_N01.03'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 10980 and ds.RasterYSize == 10980 assert ds.GetProjectionRef().find('32632') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (699960.0, 10.0, 0.0, 5100060.0, 0.0, -10.0) assert ds.RasterCount == 5 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/IMG_DATA/S2A_OPER_MSI_L1C_T32TQR_B08.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B4', 'BANDWIDTH': '30', 'BANDWIDTH_UNIT': 'nm', 'WAVELENGTH': '665', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.GetColorInterpretation() == gdal.GCI_RedBand assert band.DataType == gdal.GDT_UInt16 assert band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '12' band = ds.GetRasterBand(5) assert band.GetColorInterpretation() == gdal.GCI_AlphaBand ############################################################################### # Test opening a L1C tile subdataset on the preview bands def test_sentinel2_l1c_tile_5(): filename_xml = 'data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/S2A_OPER_MTD_L1C_T32TQR.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L1C_TILE:%s:PREVIEW' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' assert ds.RasterXSize == 343 and ds.RasterYSize == 343 assert ds.GetProjectionRef().find('32632') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (699960.0, 320.0, 0.0, 5100060.0, 0.0, -320.0) assert ds.RasterCount == 3 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l1c/S2A_OPER_PRD_MSIL1C.SAFE/GRANULE/S2A_OPER_MSI_L1C_T32TQR_N01.03/QI_DATA/S2A_OPER_PVI_L1C_T32TQR.jp2 3 """ assert placement_vrt in vrt ############################################################################### # Test opening invalid XML files def test_sentinel2_l1c_tile_6(): # Invalid XML gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C_TILE:/vsimem/test.xml:10m') assert ds is None gdal.FileFromMemBuffer('/vsimem/GRANULE/S2A_OPER_MSI_L1C_bla_N01.03/S2A_OPER_MTD_L1C_bla.xml', """ S2A_OPER_MSI_L1C_bla_N01.03 WGS84 / UTM zone 53S EPSG:32753 1830 1830 499980 7200040 60 -60 """) # Just tell it doesn't crash without any tile gdal.Open('/vsimem/GRANULE/S2A_OPER_MSI_L1C_bla_N01.03/S2A_OPER_MTD_L1C_bla.xml') with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1C_TILE:/vsimem/GRANULE/S2A_OPER_MSI_L1C_bla_N01.03/S2A_OPER_MTD_L1C_bla.xml:10m') assert ds is None gdal.Unlink('/vsimem/test.xml') gdal.Unlink('/vsimem/S2A_OPER_MSI_L1C_bla_N01.03/S2A_OPER_MTD_L1C_bla.xml') ############################################################################### # Test opening a L1B product def test_sentinel2_l1b_1(): filename_xml = 'data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/S2B_OPER_MTD_SAFL1B.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2B_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2B', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FOOTPRINT': 'POLYGON((11 46, 11 45, 13 45, 13 46, 11 46))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1B', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1B', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = {'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 of granule S2B_OPER_MTD_L1B.xml with 10m resolution', 'SUBDATASET_1_NAME': 'SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:10m', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12 of granule S2B_OPER_MTD_L1B.xml with 20m resolution', 'SUBDATASET_2_NAME': 'SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:20m', 'SUBDATASET_3_DESC': 'Bands B1, B9, B10 of granule S2B_OPER_MTD_L1B.xml with 60m resolution', 'SUBDATASET_3_NAME': 'SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening the 3 subdatasets for i in range(3): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L1B:', 'SENTINEL2_L1B:foo.xml:10m', 'SENTINEL2_L1B:%s' % filename_xml, 'SENTINEL2_L1B:%s:' % filename_xml, 'SENTINEL2_L1B:%s:30m' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name ############################################################################### # Test opening a L1B granule def test_sentinel2_l1b_2(): filename_xml = 'data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUDY_PIXEL_PERCENTAGE': '0', 'DATASTRIP_ID': 'S2B_OPER_MSI_L1B_DS_MTI__20151231T235959_S20151231T235959_N01.03', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2B_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2B', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'DETECTOR_ID': '02', 'DOWNLINK_PRIORITY': 'NOMINAL', 'FOOTPRINT': 'POLYGON((11 46 1, 11 45 2, 13 45 3, 13 46 4, 11 46 1))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'GRANULE_ID': 'S2B_OPER_MSI_L1B_GR_MTI__20151231T235959_S20151231T235959_D02_N01.03', 'INCIDENCE_AZIMUTH_ANGLE': '96', 'INCIDENCE_ZENITH_ANGLE': '8', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1B', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1B', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'SENSING_TIME': '2015-12-31T23:59:59.999Z', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SOLAR_AZIMUTH_ANGLE': '158', 'SOLAR_ZENITH_ANGLE': '43', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() subdatasets_md = {'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution', 'SUBDATASET_1_NAME': 'SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:10m', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12 with 20m resolution', 'SUBDATASET_2_NAME': 'SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:20m', 'SUBDATASET_3_DESC': 'Bands B1, B9, B10 with 60m resolution', 'SUBDATASET_3_NAME': 'SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != subdatasets_md: import pprint pprint.pprint(got_md) pytest.fail() cwd = os.getcwd() gdal.ErrorReset() try: os.chdir('data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03') ds = gdal.Open('S2B_OPER_MTD_L1B.xml') finally: os.chdir(cwd) assert ds is not None and gdal.GetLastErrorMsg() == '' got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() ############################################################################### # Test opening a L1B subdataset def test_sentinel2_l1b_3(): gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L1B:data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m') assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUDY_PIXEL_PERCENTAGE': '0', 'DATASTRIP_ID': 'S2B_OPER_MSI_L1B_DS_MTI__20151231T235959_S20151231T235959_N01.03', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2B_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2B', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'DETECTOR_ID': '02', 'DOWNLINK_PRIORITY': 'NOMINAL', 'FOOTPRINT': 'POLYGON((11 46 1, 11 45 2, 13 45 3, 13 46 4, 11 46 1))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'GRANULE_ID': 'S2B_OPER_MSI_L1B_GR_MTI__20151231T235959_S20151231T235959_D02_N01.03', 'INCIDENCE_AZIMUTH_ANGLE': '96', 'INCIDENCE_ZENITH_ANGLE': '8', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1B', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1B', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'SENSING_TIME': '2015-12-31T23:59:59.999Z', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SOLAR_AZIMUTH_ANGLE': '158', 'SOLAR_ZENITH_ANGLE': '43', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 1276 and ds.RasterYSize == 384 assert ds.GetGCPProjection().find('4326') >= 0 gcps = ds.GetGCPs() assert len(gcps) == 5 assert (gcps[0].GCPPixel == 0 and \ gcps[0].GCPLine == 0 and \ gcps[0].GCPX == 11 and \ gcps[0].GCPY == 46 and \ gcps[0].GCPZ == 1) assert (gcps[1].GCPPixel == 0 and \ gcps[1].GCPLine == 384 and \ gcps[1].GCPX == 11 and \ gcps[1].GCPY == 45 and \ gcps[1].GCPZ == 2) assert (gcps[2].GCPPixel == 1276 and \ gcps[2].GCPLine == 384 and \ gcps[2].GCPX == 13 and \ gcps[2].GCPY == 45 and \ gcps[2].GCPZ == 3) assert (gcps[3].GCPPixel == 1276 and \ gcps[3].GCPLine == 0 and \ gcps[3].GCPX == 13 and \ gcps[3].GCPY == 46 and \ gcps[3].GCPZ == 4) assert (gcps[4].GCPPixel == 1276. / 2 and \ gcps[4].GCPLine == 384. / 2 and \ gcps[4].GCPX == 12 and \ gcps[4].GCPY == 45.5 and \ gcps[4].GCPZ == 2.5) assert ds.RasterCount == 3 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B01.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B1', 'BANDWIDTH': '20', 'BANDWIDTH_UNIT': 'nm', 'WAVELENGTH': '443', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.DataType == gdal.GDT_UInt16 assert band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '12' ############################################################################### # Test opening a L1B granule (with missing tile, without any ../../main_mtd.xml) def test_sentinel2_l1b_4(): gdal.FileFromMemBuffer('/vsimem/foo/S2B_PROD_MTD_foo.xml', """ B1 """) gdal.FileFromMemBuffer('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml', """ S2A_OPER_MSI_L1C_bla_N01.03 1830 1830 """) # Open with missing tile with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m') ds = None # Now open with missing main MTD gdal.Unlink('/vsimem/foo/S2B_PROD_MTD_foo.xml') f = open('data/gtsmall_10_uint16.jp2', 'rb') f2 = gdal.VSIFOpenL('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B01.jp2', 'wb') data = f.read() gdal.VSIFWriteL(data, 1, len(data), f2) gdal.VSIFCloseL(f2) f.close() # With brief granule metadata (no Granule_Dimensions) gdal.FileFromMemBuffer('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml', """ S2A_OPER_MSI_L1C_bla_N01.03 """) ds = gdal.Open('SENTINEL2_L1B:/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m') assert ds.RasterXSize == 500 # With standard granule metadata (with Granule_Dimensions) gdal.FileFromMemBuffer('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml', """ S2A_OPER_MSI_L1C_bla_N01.03 1830 1830 """) ds = gdal.Open('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml') expected_md = {'SUBDATASET_1_DESC': 'Bands B1 with 60m resolution', 'SUBDATASET_1_NAME': 'SENTINEL2_L1B:/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() ds = None ds = gdal.OpenEx('SENTINEL2_L1B:/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml:60m', open_options=['ALPHA=YES']) assert ds is not None assert ds.RasterCount == 2 ds = None gdal.Unlink('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/S2B_OPER_MTD_L1B.xml') gdal.Unlink('/vsimem/foo/GRANULE/S2B_OPER_MTD_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B01.jp2') ############################################################################### # Test opening invalid XML files def test_sentinel2_l1b_5(): # Invalid XML gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None # No Product_Info gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None # No Product_Organisation gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/test.xml:10m') assert ds is None # No Band_List gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None # No valid bands gdal.FileFromMemBuffer('/vsimem/test.xml', """ Bxx """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None # Invalid XML gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/test.xml:10m') assert ds is None # No Granule_Dimensions gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/test.xml:10m') assert ds is None # No ROWS gdal.FileFromMemBuffer('/vsimem/test.xml', """ 2304 2552 """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/test.xml:10m') assert ds is None # No NCOLS gdal.FileFromMemBuffer('/vsimem/test.xml', """ 2304 2552 """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/test.xml:10m') assert ds is None # Not the desired resolution gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L1B:/vsimem/test.xml:10m') assert ds is None gdal.Unlink('/vsimem/test.xml') gdal.Unlink('/vsimem/test.xml') ############################################################################### # Test opening a L2A product def test_sentinel2_l2a_1(): filename_xml = 'data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/S2A_USER_MTD_SAFL2A.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'AOT_RETRIEVAL_ACCURACY': '0', 'BARE_SOILS_PERCENTAGE': '0', 'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'CLOUD_SHADOW_PERCENTAGE': '0', 'DARK_FEATURES_PERCENTAGE': '0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FOOTPRINT': 'POLYGON((11 46, 11 45, 13 45, 13 46, 11 46))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'HIGH_PROBA_CLOUDS_PERCENTAGE': '0', 'L1C_TOA_QUANTIFICATION_VALUE': '1000', 'L1C_TOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_AOT_QUANTIFICATION_VALUE': '1000.0', 'L2A_AOT_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_BOA_QUANTIFICATION_VALUE': '1000', 'L2A_BOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_WVP_QUANTIFICATION_VALUE': '1000.0', 'L2A_WVP_QUANTIFICATION_VALUE_UNIT': 'cm', 'LOW_PROBA_CLOUDS_PERCENTAGE': '0', 'MEDIUM_PROBA_CLOUDS_PERCENTAGE': '0', 'NODATA_PIXEL_PERCENTAGE': '0', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-2Ap', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI2Ap', 'RADIATIVE_TRANSFER_ACCURAY': '0', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SATURATED_DEFECTIVE_PIXEL_PERCENTAGE': '0', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SNOW_ICE_PERCENTAGE': '0', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0', 'THIN_CIRRUS_PERCENTAGE': '0', 'VEGETATION_PERCENTAGE': '0', 'WATER_PERCENTAGE': '0', 'WATER_VAPOUR_RETRIEVAL_ACCURACY': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = {'SUBDATASET_1_DESC': 'Bands B1, B2, B3, B4, B5, B6, B7, B9, B10, B11, B12, B8A, AOT, CLD, SCL, SNW, WVP with 60m resolution, UTM 32N', 'SUBDATASET_1_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/S2A_USER_MTD_SAFL2A.xml:60m:EPSG_32632', 'SUBDATASET_2_DESC': 'RGB preview, UTM 32N', 'SUBDATASET_2_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/S2A_USER_MTD_SAFL2A.xml:PREVIEW:EPSG_32632'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening the 4 subdatasets for i in range(2): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L2A:', 'SENTINEL2_L2A:foo.xml:10m:EPSG_32632', 'SENTINEL2_L2A:%s' % filename_xml, 'SENTINEL2_L2A:%s:' % filename_xml, 'SENTINEL2_L2A:%s:10m' % filename_xml, 'SENTINEL2_L2A:%s:10m:' % filename_xml, 'SENTINEL2_L2A:%s:10m:EPSG_' % filename_xml, 'SENTINEL2_L2A:%s:50m:EPSG_32632' % filename_xml, 'SENTINEL2_L2A:%s:10m:EPSG_32633' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name ############################################################################### # Test opening a L21 subdataset on the 60m bands def test_sentinel2_l2a_2(): filename_xml = 'data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/S2A_USER_MTD_SAFL2A.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L2A:%s:60m:EPSG_32632' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'AOT_RETRIEVAL_ACCURACY': '0', 'BARE_SOILS_PERCENTAGE': '0', 'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'CLOUD_SHADOW_PERCENTAGE': '0', 'DARK_FEATURES_PERCENTAGE': '0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'HIGH_PROBA_CLOUDS_PERCENTAGE': '0', 'L1C_TOA_QUANTIFICATION_VALUE': '1000', 'L1C_TOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_AOT_QUANTIFICATION_VALUE': '1000.0', 'L2A_AOT_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_BOA_QUANTIFICATION_VALUE': '1000', 'L2A_BOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_WVP_QUANTIFICATION_VALUE': '1000.0', 'L2A_WVP_QUANTIFICATION_VALUE_UNIT': 'cm', 'LOW_PROBA_CLOUDS_PERCENTAGE': '0', 'MEDIUM_PROBA_CLOUDS_PERCENTAGE': '0', 'NODATA_PIXEL_PERCENTAGE': '0', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-2Ap', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI2Ap', 'RADIATIVE_TRANSFER_ACCURAY': '0', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SATURATED_DEFECTIVE_PIXEL_PERCENTAGE': '0', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SNOW_ICE_PERCENTAGE': '0', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0', 'THIN_CIRRUS_PERCENTAGE': '0', 'VEGETATION_PERCENTAGE': '0', 'WATER_PERCENTAGE': '0', 'WATER_VAPOUR_RETRIEVAL_ACCURACY': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 1830 and ds.RasterYSize == 1830 assert ds.GetProjectionRef().find('32632') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (699960.0, 60.0, 0.0, 5100060.0, 0.0, -60.0) assert ds.RasterCount == 17 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B01_60m.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B1', 'BANDWIDTH': '20', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1900', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '443', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.DataType == gdal.GDT_UInt16 band = ds.GetRasterBand(13) assert band.GetColorInterpretation() == gdal.GCI_Undefined got_md = band.GetMetadata() expected_md = {'BANDNAME': 'AOT'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() scl_band = 0 for i in range(ds.RasterCount): if ds.GetRasterBand(i + 1).GetMetadataItem('BANDNAME') == 'SCL': scl_band = i + 1 assert scl_band != 0 band = ds.GetRasterBand(scl_band) expected_categories = ['NODATA', 'SATURATED_DEFECTIVE', 'DARK_FEATURE_SHADOW', 'CLOUD_SHADOW', 'VEGETATION', 'BARE_SOIL_DESERT', 'WATER', 'CLOUD_LOW_PROBA', 'CLOUD_MEDIUM_PROBA', 'CLOUD_HIGH_PROBA', 'THIN_CIRRUS', 'SNOW_ICE'] got_categories = band.GetCategoryNames() if got_categories != expected_categories: import pprint pprint.pprint(got_categories) pytest.fail() ############################################################################### # Test opening invalid XML files def test_sentinel2_l2a_3(): # Invalid XML gdal.FileFromMemBuffer('/vsimem/test.xml', """ """) with gdaltest.error_handler(): ds = gdal.Open('/vsimem/test.xml') assert ds is None with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L2A:/vsimem/test.xml:10m:EPSG_32632') assert ds is None # File is OK, but granule MTD are missing gdal.FileFromMemBuffer('/vsimem/test.xml', """ B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B8A S2A_OPER_MSI_L2A_TL_MTI__20151231T235959_A000123_T32TQR_B01_60m """) gdal.ErrorReset() with gdaltest.error_handler(): gdal.Open('/vsimem/test.xml') assert gdal.GetLastErrorMsg() != '' gdal.ErrorReset() with gdaltest.error_handler(): ds = gdal.Open('SENTINEL2_L2A:/vsimem/test.xml:10m:EPSG_32632') assert ds is None gdal.Unlink('/vsimem/test.xml') ############################################################################### # Test opening a L2A MSIL2A product def test_sentinel2_l2a_4(): filename_xml = 'data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = { 'AOT_QUANTIFICATION_VALUE': '1000.0', 'AOT_QUANTIFICATION_VALUE_UNIT': 'none', 'AOT_RETRIEVAL_ACCURACY': '0.0', 'BOA_QUANTIFICATION_VALUE': '10000', 'BOA_QUANTIFICATION_VALUE_UNIT': 'none', 'CLOUD_COVERAGE_ASSESSMENT': '54.4', 'CLOUD_SHADOW_PERCENTAGE': '1.5', 'DARK_FEATURES_PERCENTAGE': '1.5', 'DATATAKE_1_DATATAKE_SENSING_START': '2018-08-18T09:40:31.024Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20180818T094031_016478_N02.08', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '36', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0.0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FOOTPRINT': 'POLYGON((22.6 57.7, 24.5 57.6, 24.4 56.7, 22.6 56.7, 22.6 57.7))', 'FORMAT_CORRECTNESS': 'PASSED', 'GENERAL_QUALITY': 'PASSED', 'GENERATION_TIME': '2018-08-18T12:03:45.000000Z', 'GEOMETRIC_QUALITY': 'PASSED', 'HIGH_PROBA_CLOUDS_PERCENTAGE': '15.3', 'MEDIUM_PROBA_CLOUDS_PERCENTAGE': '24.1', 'NODATA_PIXEL_PERCENTAGE': '0.0', 'NOT_VEGETATED_PERCENTAGE': '3.5', 'PREVIEW_GEO_INFO': 'Not applicable', 'PREVIEW_IMAGE_URL': 'Not applicable', 'PROCESSING_BASELINE': '02.08', 'PROCESSING_LEVEL': 'Level-2A', 'PRODUCT_START_TIME': '2018-08-18T09:40:31.024Z', 'PRODUCT_STOP_TIME': '2018-08-18T09:40:31.024Z', 'PRODUCT_TYPE': 'S2MSI2A', 'PRODUCT_URI': 'S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE', 'RADIATIVE_TRANSFER_ACCURACY': '0.0', 'RADIOMETRIC_QUALITY': 'PASSED', 'REFLECTANCE_CONVERSION_U': '0.97', 'SATURATED_DEFECTIVE_PIXEL_PERCENTAGE': '0.0', 'SENSOR_QUALITY': 'PASSED', 'SNOW_ICE_PERCENTAGE': '0.4', 'SPECIAL_VALUE_NODATA': '0', 'SPECIAL_VALUE_SATURATED': '6', 'THIN_CIRRUS_PERCENTAGE': '14.9', 'UNCLASSIFIED_PERCENTAGE': '5.7', 'VEGETATION_PERCENTAGE': '14.0', 'WATER_PERCENTAGE': '18.7', 'WATER_VAPOUR_RETRIEVAL_ACCURACY': '0.0', 'WVP_QUANTIFICATION_VALUE': '1000.0', 'WVP_QUANTIFICATION_VALUE_UNIT': 'cm'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = { 'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution, UTM 34N', 'SUBDATASET_1_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xml:10m:EPSG_32634', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12, AOT, CLD, SCL, SNW, WVP with 20m resolution, UTM 34N', 'SUBDATASET_2_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xml:20m:EPSG_32634', 'SUBDATASET_3_DESC': 'Bands B1, B9, AOT, CLD, SCL, SNW, WVP with 60m resolution, UTM 34N', 'SUBDATASET_3_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xml:60m:EPSG_32634', 'SUBDATASET_4_DESC': 'True color image, UTM 34N', 'SUBDATASET_4_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xml:TCI:EPSG_32634'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening the 4 subdatasets for i in range(2): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L2A:', 'SENTINEL2_L2A:foo.xml:10m:EPSG_32632', 'SENTINEL2_L2A:%s' % filename_xml, 'SENTINEL2_L2A:%s:' % filename_xml, 'SENTINEL2_L2A:%s:10m' % filename_xml, 'SENTINEL2_L2A:%s:10m:' % filename_xml, 'SENTINEL2_L2A:%s:10m:EPSG_' % filename_xml, 'SENTINEL2_L2A:%s:50m:EPSG_32632' % filename_xml, 'SENTINEL2_L2A:%s:10m:EPSG_32633' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name ############################################################################### # Test opening a L2A MSIL2A subdataset on the 60m bands def test_sentinel2_l2a_5(): filename_xml = 'data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L2A:%s:60m:EPSG_32634' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = { 'AOT_QUANTIFICATION_VALUE': '1000.0', 'AOT_QUANTIFICATION_VALUE_UNIT': 'none', 'AOT_RETRIEVAL_ACCURACY': '0.0', 'BOA_QUANTIFICATION_VALUE': '10000', 'BOA_QUANTIFICATION_VALUE_UNIT': 'none', 'CLOUD_COVERAGE_ASSESSMENT': '54.4', 'CLOUD_SHADOW_PERCENTAGE': '1.5', 'DARK_FEATURES_PERCENTAGE': '1.5', 'DATATAKE_1_DATATAKE_SENSING_START': '2018-08-18T09:40:31.024Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20180818T094031_016478_N02.08', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '36', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0.0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FORMAT_CORRECTNESS': 'PASSED', 'GENERAL_QUALITY': 'PASSED', 'GENERATION_TIME': '2018-08-18T12:03:45.000000Z', 'GEOMETRIC_QUALITY': 'PASSED', 'HIGH_PROBA_CLOUDS_PERCENTAGE': '15.3', 'MEDIUM_PROBA_CLOUDS_PERCENTAGE': '24.1', 'NODATA_PIXEL_PERCENTAGE': '0.0', 'NOT_VEGETATED_PERCENTAGE': '3.5', 'PREVIEW_GEO_INFO': 'Not applicable', 'PREVIEW_IMAGE_URL': 'Not applicable', 'PROCESSING_BASELINE': '02.08', 'PROCESSING_LEVEL': 'Level-2A', 'PRODUCT_START_TIME': '2018-08-18T09:40:31.024Z', 'PRODUCT_STOP_TIME': '2018-08-18T09:40:31.024Z', 'PRODUCT_TYPE': 'S2MSI2A', 'PRODUCT_URI': 'S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE', 'RADIATIVE_TRANSFER_ACCURACY': '0.0', 'RADIOMETRIC_QUALITY': 'PASSED', 'REFLECTANCE_CONVERSION_U': '0.97', 'SATURATED_DEFECTIVE_PIXEL_PERCENTAGE': '0.0', 'SENSOR_QUALITY': 'PASSED', 'SNOW_ICE_PERCENTAGE': '0.4', 'SPECIAL_VALUE_NODATA': '0', 'SPECIAL_VALUE_SATURATED': '6', 'THIN_CIRRUS_PERCENTAGE': '14.9', 'UNCLASSIFIED_PERCENTAGE': '5.7', 'VEGETATION_PERCENTAGE': '14.0', 'WATER_PERCENTAGE': '18.7', 'WATER_VAPOUR_RETRIEVAL_ACCURACY': '0.0', 'WVP_QUANTIFICATION_VALUE': '1000.0', 'WVP_QUANTIFICATION_VALUE_UNIT': 'cm'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 1830 and ds.RasterYSize == 1830 assert ds.GetProjectionRef().find('32634') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (600000.0, 60.0, 0.0, 6400020.0, 0.0, -60.0) assert ds.RasterCount == 7 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B01_60m.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B1', 'BANDWIDTH': '20', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1884.69', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '443', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.DataType == gdal.GDT_UInt16 ############################################################################### # Test opening a L2A MSIL2Ap product def test_sentinel2_l2a_6(): filename_xml = 'data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = { 'AOT_RETRIEVAL_ACCURACY': '0.0', 'BARE_SOILS_PERCENTAGE': '0.4', 'CLOUD_COVERAGE_ASSESSMENT': '86.3', 'CLOUD_COVERAGE_PERCENTAGE': '84.4', 'CLOUD_SHADOW_PERCENTAGE': '4.1', 'DARK_FEATURES_PERCENTAGE': '1.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2017-08-23T09:40:31.026Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20170823T094031_011330_N02.05', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '36', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FOOTPRINT': 'POLYGON((22.6 57.7, 24.5 57.6, 24.4 56.7, 22.6 56.7, 22.6 57.7))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2017-08-25T08:50:10Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'HIGH_PROBA_CLOUDS_PERCENTAGE': '36.1', 'MEDIUM_PROBA_CLOUDS_PERCENTAGE': '28.9', 'L1C_TOA_QUANTIFICATION_VALUE': '10000', 'L1C_TOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_AOT_QUANTIFICATION_VALUE': '1000.0', 'L2A_AOT_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_BOA_QUANTIFICATION_VALUE': '10000', 'L2A_BOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_WVP_QUANTIFICATION_VALUE': '1000.0', 'L2A_WVP_QUANTIFICATION_VALUE_UNIT': 'cm', 'LOW_PROBA_CLOUDS_PERCENTAGE': '1.6', 'NODATA_PIXEL_PERCENTAGE': '0.0', 'PREVIEW_GEO_INFO': 'Not applicable', 'PREVIEW_IMAGE_URL': 'Not applicable', 'PROCESSING_BASELINE': '02.05', 'PROCESSING_LEVEL': 'Level-2Ap', 'PRODUCT_START_TIME': '2017-08-23T09:40:31.026Z', 'PRODUCT_STOP_TIME': '2017-08-23T09:40:31.026Z', 'PRODUCT_TYPE': 'S2MSI2Ap', 'PRODUCT_URI_1C': 'S2A_MSIL1C_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE', 'PRODUCT_URI_2A': 'S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE', 'RADIATIVE_TRANSFER_ACCURAY': '0.0', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SATURATED_DEFECTIVE_PIXEL_PERCENTAGE': '0.0', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SNOW_ICE_PERCENTAGE': '0.2', 'SPECIAL_VALUE_NODATA': '0', 'SPECIAL_VALUE_SATURATED': '6', 'THIN_CIRRUS_PERCENTAGE': '19.3', 'VEGETATION_PERCENTAGE': '5.0', 'WATER_PERCENTAGE': '2.9', 'WATER_VAPOUR_RETRIEVAL_ACCURACY': '0.0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = { 'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution, UTM 34N', 'SUBDATASET_1_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xml:10m:EPSG_32634', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12, AOT, CLD, SCL, SNW, WVP with 20m resolution, UTM 34N', 'SUBDATASET_2_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xml:20m:EPSG_32634', 'SUBDATASET_3_DESC': 'Bands B1, B9, AOT, CLD, SCL, SNW, WVP with 60m resolution, UTM 34N', 'SUBDATASET_3_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xml:60m:EPSG_32634', 'SUBDATASET_4_DESC': 'True color image, UTM 34N', 'SUBDATASET_4_NAME': 'SENTINEL2_L2A:data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xml:TCI:EPSG_32634'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening the 4 subdatasets for i in range(2): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L2A:', 'SENTINEL2_L2A:foo.xml:10m:EPSG_32632', 'SENTINEL2_L2A:%s' % filename_xml, 'SENTINEL2_L2A:%s:' % filename_xml, 'SENTINEL2_L2A:%s:10m' % filename_xml, 'SENTINEL2_L2A:%s:10m:' % filename_xml, 'SENTINEL2_L2A:%s:10m:EPSG_' % filename_xml, 'SENTINEL2_L2A:%s:50m:EPSG_32632' % filename_xml, 'SENTINEL2_L2A:%s:10m:EPSG_32633' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name ############################################################################### # Test opening a L2A MSIL2Ap subdataset on the 60m bands def test_sentinel2_l2a_7(): filename_xml = 'data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L2A:%s:60m:EPSG_32634' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = { 'AOT_RETRIEVAL_ACCURACY': '0.0', 'BARE_SOILS_PERCENTAGE': '0.4', 'CLOUD_COVERAGE_ASSESSMENT': '86.3', 'CLOUD_COVERAGE_PERCENTAGE': '84.4', 'CLOUD_SHADOW_PERCENTAGE': '4.1', 'DARK_FEATURES_PERCENTAGE': '1.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2017-08-23T09:40:31.026Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20170823T094031_011330_N02.05', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '36', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2017-08-25T08:50:10Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'HIGH_PROBA_CLOUDS_PERCENTAGE': '36.1', 'MEDIUM_PROBA_CLOUDS_PERCENTAGE': '28.9', 'L1C_TOA_QUANTIFICATION_VALUE': '10000', 'L1C_TOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_AOT_QUANTIFICATION_VALUE': '1000.0', 'L2A_AOT_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_BOA_QUANTIFICATION_VALUE': '10000', 'L2A_BOA_QUANTIFICATION_VALUE_UNIT': 'none', 'L2A_WVP_QUANTIFICATION_VALUE': '1000.0', 'L2A_WVP_QUANTIFICATION_VALUE_UNIT': 'cm', 'LOW_PROBA_CLOUDS_PERCENTAGE': '1.6', 'NODATA_PIXEL_PERCENTAGE': '0.0', 'PREVIEW_GEO_INFO': 'Not applicable', 'PREVIEW_IMAGE_URL': 'Not applicable', 'PROCESSING_BASELINE': '02.05', 'PROCESSING_LEVEL': 'Level-2Ap', 'PRODUCT_START_TIME': '2017-08-23T09:40:31.026Z', 'PRODUCT_STOP_TIME': '2017-08-23T09:40:31.026Z', 'PRODUCT_TYPE': 'S2MSI2Ap', 'PRODUCT_URI_1C': 'S2A_MSIL1C_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE', 'PRODUCT_URI_2A': 'S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE', 'RADIATIVE_TRANSFER_ACCURAY': '0.0', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SATURATED_DEFECTIVE_PIXEL_PERCENTAGE': '0.0', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SNOW_ICE_PERCENTAGE': '0.2', 'SPECIAL_VALUE_NODATA': '0', 'SPECIAL_VALUE_SATURATED': '6', 'THIN_CIRRUS_PERCENTAGE': '19.3', 'VEGETATION_PERCENTAGE': '5.0', 'WATER_PERCENTAGE': '2.9', 'WATER_VAPOUR_RETRIEVAL_ACCURACY': '0.0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 1830 and ds.RasterYSize == 1830 assert ds.GetProjectionRef().find('32634') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (600000.0, 60.0, 0.0, 6400020.0, 0.0, -60.0) assert ds.RasterCount == 7 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B01_60m.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B1', 'BANDWIDTH': '20', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1913.57', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '443', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.DataType == gdal.GDT_UInt16 ############################################################################### # Test opening a L1C Safe Compact product def test_sentinel2_l1c_safe_compact_1(): filename_xml = 'data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml' gdal.ErrorReset() ds = gdal.Open(filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FOOTPRINT': 'POLYGON((11 46, 11 45, 13 45, 13 46, 11 46))', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1C', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1C', 'QUANTIFICATION_VALUE': '1000', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() expected_md = {'SUBDATASET_1_DESC': 'Bands B2, B3, B4, B8 with 10m resolution, UTM 32N', 'SUBDATASET_1_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml:10m:EPSG_32632', 'SUBDATASET_2_DESC': 'Bands B5, B6, B7, B8A, B11, B12 with 20m resolution, UTM 32N', 'SUBDATASET_2_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml:20m:EPSG_32632', 'SUBDATASET_3_DESC': 'Bands B1, B9, B10 with 60m resolution, UTM 32N', 'SUBDATASET_3_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml:60m:EPSG_32632', 'SUBDATASET_4_DESC': 'True color image, UTM 32N', 'SUBDATASET_4_NAME': 'SENTINEL2_L1C:data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml:TCI:EPSG_32632'} got_md = ds.GetMetadata('SUBDATASETS') if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() # Try opening the 4 subdatasets for i in range(4): gdal.ErrorReset() ds = gdal.Open(got_md['SUBDATASET_%d_NAME' % (i + 1)]) assert ds is not None and gdal.GetLastErrorMsg() == '', \ got_md['SUBDATASET_%d_NAME' % (i + 1)] # Try various invalid subdataset names for name in ['SENTINEL2_L1C:', 'SENTINEL2_L1C:foo.xml:10m:EPSG_32632', 'SENTINEL2_L1C:%s' % filename_xml, 'SENTINEL2_L1C:%s:' % filename_xml, 'SENTINEL2_L1C:%s:10m' % filename_xml, 'SENTINEL2_L1C:%s:10m:' % filename_xml, 'SENTINEL2_L1C:%s:10m:EPSG_' % filename_xml, 'SENTINEL2_L1C:%s:50m:EPSG_32632' % filename_xml, 'SENTINEL2_L1C:%s:10m:EPSG_32633' % filename_xml]: with gdaltest.error_handler(): ds = gdal.Open(name) assert ds is None, name # Try opening a zip file as distributed from https://scihub.esa.int/ if not sys.platform.startswith('win'): os.system('sh -c "cd data/fake_sentinel2_l1c_safecompact && zip -r ../../tmp/S2A_MSIL1C_test.zip S2A_OPER_PRD_MSIL1C.SAFE >/dev/null" && cd ../..') if os.path.exists('tmp/S2A_MSIL1C_test.zip'): ds = gdal.Open('tmp/S2A_MSIL1C_test.zip') assert ds is not None os.unlink('tmp/S2A_MSIL1C_test.zip') ############################################################################### # Test opening a L1C Safe Compact subdataset on the 10m bands def test_sentinel2_l1c_safe_compact_2(): filename_xml = 'data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml' gdal.ErrorReset() ds = gdal.Open('SENTINEL2_L1C:%s:10m:EPSG_32632' % filename_xml) assert ds is not None and gdal.GetLastErrorMsg() == '' expected_md = {'CLOUD_COVERAGE_ASSESSMENT': '0.0', 'DATATAKE_1_DATATAKE_SENSING_START': '2015-12-31T23:59:59.999Z', 'DATATAKE_1_DATATAKE_TYPE': 'INS-NOBS', 'DATATAKE_1_ID': 'GS2A_20151231T235959_000123_N01.03', 'DATATAKE_1_SENSING_ORBIT_DIRECTION': 'DESCENDING', 'DATATAKE_1_SENSING_ORBIT_NUMBER': '22', 'DATATAKE_1_SPACECRAFT_NAME': 'Sentinel-2A', 'DEGRADED_ANC_DATA_PERCENTAGE': '0', 'DEGRADED_MSI_DATA_PERCENTAGE': '0', 'FORMAT_CORRECTNESS_FLAG': 'PASSED', 'GENERAL_QUALITY_FLAG': 'PASSED', 'GENERATION_TIME': '2015-12-31T23:59:59.999Z', 'GEOMETRIC_QUALITY_FLAG': 'PASSED', 'PREVIEW_GEO_INFO': 'BrowseImageFootprint', 'PREVIEW_IMAGE_URL': 'http://example.com', 'PROCESSING_BASELINE': '01.03', 'PROCESSING_LEVEL': 'Level-1C', 'PRODUCT_START_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_STOP_TIME': '2015-12-31T23:59:59.999Z', 'PRODUCT_TYPE': 'S2MSI1C', 'QUANTIFICATION_VALUE': '1000', 'RADIOMETRIC_QUALITY_FLAG': 'PASSED', 'REFERENCE_BAND': 'B1', 'REFLECTANCE_CONVERSION_U': '0.97', 'SENSOR_QUALITY_FLAG': 'PASSED', 'SPECIAL_VALUE_NODATA': '1', 'SPECIAL_VALUE_SATURATED': '0'} got_md = ds.GetMetadata() if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert ds.RasterXSize == 10980 and ds.RasterYSize == 10980 assert ds.GetProjectionRef().find('32632') >= 0 got_gt = ds.GetGeoTransform() assert got_gt == (699960.0, 10.0, 0.0, 5100060.0, 0.0, -10.0) assert ds.RasterCount == 4 vrt = ds.GetMetadata('xml:VRT')[0] placement_vrt = """ data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/GRANULE/FOO/IMG_DATA/BAR_B04.jp2 1 """ assert placement_vrt in vrt assert ds.GetMetadata('xml:SENTINEL2') is not None band = ds.GetRasterBand(1) got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B4', 'BANDWIDTH': '30', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1500', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '665', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() assert band.GetColorInterpretation() == gdal.GCI_RedBand assert band.DataType == gdal.GDT_UInt16 assert band.GetMetadataItem('NBITS', 'IMAGE_STRUCTURE') == '12' band = ds.GetRasterBand(4) assert band.GetColorInterpretation() == gdal.GCI_Undefined got_md = band.GetMetadata() expected_md = {'BANDNAME': 'B8', 'BANDWIDTH': '115', 'BANDWIDTH_UNIT': 'nm', 'SOLAR_IRRADIANCE': '1000', 'SOLAR_IRRADIANCE_UNIT': 'W/m2/um', 'WAVELENGTH': '842', 'WAVELENGTH_UNIT': 'nm'} if got_md != expected_md: import pprint pprint.pprint(got_md) pytest.fail() ############################################################################### # Test opening a L1C subdataset on the TCI bands def test_sentinel2_l1c_safe_compact_3(): filename_xml = 'data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml' ds = gdal.OpenEx('SENTINEL2_L1C:%s:TCI:EPSG_32632' % filename_xml) assert ds is not None assert ds.RasterCount == 3 fl = ds.GetFileList() # main XML + 1 granule XML + 1 jp2 if len(fl) != 1 + 1 + 1: import pprint pprint.pprint(fl) pytest.fail() band = ds.GetRasterBand(1) assert band.GetColorInterpretation() == gdal.GCI_RedBand assert band.DataType == gdal.GDT_Byte gdalautotest-3.1.2/gdrivers/gxf.py0000775000175000017500000000714613701060016015663 0ustar eveneven#!/usr/bin/env pytest # -*- coding: utf-8 -*- ############################################################################### # $Id: gxf.py 355b41831cd2685c85d1aabe5b95665a2c6e99b7 2019-06-19 17:07:04 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test read/write functionality for NITF driver. # Author: Even Rouault # ############################################################################### # Copyright (c) 2008-2012, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import pytest from osgeo import gdal import gdaltest ############################################################################### # Test a small GXF sample def test_gxf_1(): tst = gdaltest.GDALTest('GXF', 'small.gxf', 1, 90) return tst.testOpen() ############################################################################### # Test an other GXF sample (with continuous line) def test_gxf_2(): tst = gdaltest.GDALTest('GXF', 'small2.gxf', 1, 65042) wkt = """PROJCS["NAD27 / Ohio North", GEOGCS["NAD27", DATUM["NAD27", SPHEROID["NAD27",6378206.4,294.978699815746]], PRIMEM["unnamed",0], UNIT["degree",0.0174532925199433]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",40.4333333333], PARAMETER["standard_parallel_2",41.7], PARAMETER["latitude_of_origin",39.6666666667], PARAMETER["central_meridian",82.5], PARAMETER["false_easting",609601.22], UNIT["ftUS",0.3048006096012]]""" return tst.testOpen(check_prj=wkt) gxf_list = [ ('http://download.osgeo.org/gdal/data/gxf', 'SAMPLE.GXF', 24068, -1), ('http://download.osgeo.org/gdal/data/gxf', 'gxf_compressed.gxf', 20120, -1), ('http://download.osgeo.org/gdal/data/gxf', 'gxf_text.gxf', 20265, -1), ('http://download.osgeo.org/gdal/data/gxf', 'gxf_ul_r.gxf', 19930, -1), ('http://download.osgeo.org/gdal/data/gxf', 'latlong.gxf', 12243, -1), ('http://download.osgeo.org/gdal/data/gxf', 'spif83.gxf', 28752, -1), ] @pytest.mark.parametrize( 'downloadURL,fileName,checksum,download_size', gxf_list, ids=[tup[1] for tup in gxf_list], ) def test_gxf(downloadURL, fileName, checksum, download_size): if not gdaltest.download_file(downloadURL + '/' + fileName, fileName, download_size): pytest.skip() ds = gdal.Open('tmp/cache/' + fileName) assert ds.GetRasterBand(1).Checksum() == checksum, 'Bad checksum. Expected %d, got %d' % (checksum, ds.GetRasterBand(1).Checksum()) gdalautotest-3.1.2/gdrivers/srtmhgt.py0000775000175000017500000001212313701060016016556 0ustar eveneven#!/usr/bin/env pytest ############################################################################### # $Id: srtmhgt.py b1c9c12ad373e40b955162b45d704070d4ebf7b0 2019-06-19 16:50:15 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test SRTMHGT support. # Author: Even Rouault < even dot rouault @ spatialys.com > # ############################################################################### # Copyright (c) 2005, Frank Warmerdam # Copyright (c) 2008-2010, Even Rouault # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import os from osgeo import gdal import pytest ############################################################################### # Test a SRTMHGT Level 1 (made from a DTED Level 0) def test_srtmhgt_1(): ds = gdal.Open('data/n43.dt0') bandSrc = ds.GetRasterBand(1) driver = gdal.GetDriverByName("GTiff") dsDst = driver.Create('tmp/n43.dt1.tif', 1201, 1201, 1, gdal.GDT_Int16) dsDst.SetProjection('GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]') dsDst.SetGeoTransform((-80.0004166666666663, 0.0008333333333333, 0, 44.0004166666666670, 0, -0.0008333333333333)) bandDst = dsDst.GetRasterBand(1) data = bandSrc.ReadRaster(0, 0, 121, 121, 1201, 1201, gdal.GDT_Int16) bandDst.WriteRaster(0, 0, 1201, 1201, data, 1201, 1201, gdal.GDT_Int16) bandDst.FlushCache() bandDst = None ds = None dsDst = None ds = gdal.Open('tmp/n43.dt1.tif') driver = gdal.GetDriverByName("SRTMHGT") dsDst = driver.CreateCopy('tmp/n43w080.hgt', ds) band = dsDst.GetRasterBand(1) chksum = band.Checksum() assert chksum == 60918, ('Wrong checksum. Checksum found %d' % chksum) ############################################################################### # Test creating an in memory copy. def test_srtmhgt_2(): ds = gdal.Open('tmp/n43w080.hgt') driver = gdal.GetDriverByName("SRTMHGT") dsDst = driver.CreateCopy('/vsimem/n43w080.hgt', ds) band = dsDst.GetRasterBand(1) chksum = band.Checksum() assert chksum == 60918, ('Wrong checksum. Checksum found %d' % chksum) dsDst = None # Test update support dsDst = gdal.Open('/vsimem/n43w080.hgt', gdal.GA_Update) dsDst.WriteRaster(0, 0, dsDst.RasterXSize, dsDst.RasterYSize, dsDst.ReadRaster()) dsDst.FlushCache() assert chksum == 60918, ('Wrong checksum. Checksum found %d' % chksum) dsDst = None ############################################################################### # Test reading from a .hgt.zip file def test_srtmhgt_3(): ds = gdal.Open('tmp/n43w080.hgt') driver = gdal.GetDriverByName("SRTMHGT") driver.CreateCopy('/vsizip//vsimem/N43W080.SRTMGL1.hgt.zip/N43W080.hgt', ds) dsDst = gdal.Open('/vsimem/N43W080.SRTMGL1.hgt.zip') band = dsDst.GetRasterBand(1) chksum = band.Checksum() assert chksum == 60918, ('Wrong checksum. Checksum found %d' % chksum) ############################################################################### # Test reading from a .SRTMSWBD.raw.zip file (GRASS #3246) def test_srtmhgt_4(): f = gdal.VSIFOpenL('/vsizip//vsimem/N43W080.SRTMSWBD.raw.zip/N43W080.raw', 'wb') if f is None: pytest.skip() gdal.VSIFWriteL(' ' * (3601 * 3601), 1, 3601 * 3601, f) gdal.VSIFCloseL(f) ds = gdal.Open('/vsimem/N43W080.SRTMSWBD.raw.zip') assert ds is not None cs = ds.GetRasterBand(1).Checksum() ds = None gdal.Unlink('/vsimem/N43W080.SRTMSWBD.raw.zip') assert cs == 3636, ('Wrong checksum. Checksum found %d' % cs) ############################################################################### # Cleanup. def test_srtmhgt_cleanup(): try: gdal.GetDriverByName("SRTMHGT").Delete('tmp/n43w080.hgt') gdal.GetDriverByName("SRTMHGT").Delete('/vsimem/n43w080.hgt') gdal.Unlink('/vsimem/N43W080.SRTMGL1.hgt.zip') os.remove('tmp/n43.dt1.tif') except (RuntimeError, OSError): pass gdalautotest-3.1.2/gdrivers/daas.py0000775000175000017500000016764513701060016016022 0ustar eveneven#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: daas.py 353050ce584a87b944a3164c431846bb72785694 2019-07-30 20:23:34 +0200 Even Rouault $ # # Project: GDAL/OGR Test Suite # Purpose: DAAS driver test suite. # Author: Even Rouault, even.rouault at spatialys.com # ############################################################################### # Copyright (c) 2018-2019, Airbus DS Intelligence # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense, # and/or sell copies of the Software, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. ############################################################################### import json import sys sys.path.append('../pymod') from osgeo import gdal import gdaltest import webserver import pytest ############################################################################### # Find DAAS driver def test_daas_test_presence(): gdaltest.daas_drv = gdal.GetDriverByName('DAAS') if gdaltest.daas_drv is None: pytest.skip() gdaltest.daas_vars = {} for var in ('GDAL_DAAS_API_KEY', 'GDAL_DAAS_CLIENT_ID', 'GDAL_DAAS_AUTH_URL'): gdaltest.daas_vars[var] = gdal.GetConfigOption(var) if gdaltest.daas_vars[var] is not None: gdal.SetConfigOption(var, "") (gdaltest.webserver_process, gdaltest.webserver_port) = webserver.launch( handler=webserver.DispatcherHttpHandler) if gdaltest.webserver_port == 0: pytest.skip() ############################################################################### def test_daas_missing_parameters(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.error_handler(): ds = gdal.Open("DAAS:") assert not ds ############################################################################### def test_daas_authentication_failure(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'missing_GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): ds = gdal.Open("DAAS:https://127.0.0.1:99999") assert not ds with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'missing_GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): ds = gdal.Open("DAAS:https://127.0.0.1:99999") assert not ds handler = webserver.SequentialHandler() handler.add('POST', '/auth', 400, {}, '{"error":"unauthorized_client","error_description":"UNKNOWN_CLIENT: Client was not identified by any client authenticator"}') with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): ds = gdal.Open("DAAS:https://127.0.0.1:99999") assert not ds handler = webserver.SequentialHandler() handler.add('POST', '/auth', 200, {}, 'invalid json') with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): ds = gdal.Open("DAAS:https://127.0.0.1:99999") assert not ds handler = webserver.SequentialHandler() handler.add('POST', '/auth', 200, {}, '{ "missing_access_token": null }') with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): ds = gdal.Open("DAAS:https://127.0.0.1:99999") assert not ds ############################################################################### def test_daas_authentication(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # API_KEY + CLIENT_ID handler = webserver.SequentialHandler() handler.add('POST', '/auth', 200, {'Content-type': 'application/json'}, '{"access_token": "my_token"}', expected_body='client_id=client_id&apikey=api_key&grant_type=api_key'.encode('ascii')) handler.add('GET', '/daas/sensors/products/foo/images/bar', 404, expected_headers={'Authorization': 'Bearer my_token'}) with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) # Test X-Forwarded-User handler = webserver.SequentialHandler() handler.add('POST', '/auth', 200, {}, '{ "access_token": "my_token" }') handler.add('GET', '/daas/sensors/products/foo/images/bar', 404, expected_headers={'Authorization': 'Bearer my_token', 'X-Forwarded-User': 'user'}) with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['X_FORWARDED_USER=user']) # Test token expiration handler = webserver.SequentialHandler() handler.add('POST', '/auth', 200, {}, '{ "access_token": "my_token", "expires_in": 1 }') handler.add('POST', '/auth', 200, {}, '{ "access_token": "my_token", "expires_in": 1 }') handler.add('GET', '/daas/sensors/products/foo/images/bar', 404, {}) with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_AUTH_URL': 'http://127.0.0.1:%d/auth' % gdaltest.webserver_port, 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port, 'GDAL_DAAS_CLIENT_ID': 'client_id', 'GDAL_DAAS_API_KEY': 'api_key'}): with gdaltest.error_handler(): gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) # Test ACCESS_TOKEN handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 404, expected_headers={'Authorization': 'Bearer my_token'}) with webserver.install_http_handler(handler): with gdaltest.config_options({'GDAL_DAAS_ACCESS_TOKEN': 'my_token', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): gdal.OpenEx( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) ############################################################################### def test_daas_getimagemetadata_failure(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # Empty content returned by server handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 404, {}) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Error with json payload handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 404, {}, '{ "foo":"bar" }') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Success but empty response handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Success but invalid JSon handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, 'invalid json') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Valid JSon but missing response/payload/payload/imageMetadata/properties handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, '{}') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Valid JSon but missing width and height handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, '{ "response": { "payload": { "payload": { "imageMetadata": { "properties": {} } } } } }') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Valid JSon but invalid width (negative value) handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, '{ "response": { "payload": { "payload": { "imageMetadata": { "properties": { "width": -1, "height": 1 } } } } } }') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Valid JSon but invalid height (string) handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, '{ "response": { "payload": { "payload": { "imageMetadata": { "properties": { "width": 1, "height": "foo" } } } } } }') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Missing pixelType handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, '{ "response": { "payload": { "payload": { "imageMetadata": { "properties": { "width": 1, "height": "1" } } } } } }') with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Invalid pixelType and noDataValue, missing getBuffer url, bands handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 1, "height": 1, "pixelType": "foo", "noDataValue": "foo", }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # Invalid rpc handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "rpc": {} }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds ############################################################################### def test_daas_getimagemetadata(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # Valid JSon but invalid height (string) handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 3, "pixelType": "Byte", "actualBitDepth": 7, "noDataValue": 0, "metadataInt": 123, "acquisitionDate": "2018-02-05T22:28:27.242Z", "cloudCover": 12.345678, "satellite": "MY_SATELLITE", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "geotransform": [2, 0, 0.1, 49, 0, -0.1], "bands": [ { "name": "PAN", "description": "Panchromatic band", "colorInterpretation": "GRAY" } ], "srsExpression": { "names": [ { "type": "unused", "value": "unused" }, { "type": "proj4", "value": "still_unused" }, { "type": "urn", "value": "urn:ogc:def:crs:EPSG::4326" }, { "type": "proj4", "value": "still_unused" }, { "type": "unused", "value": "unused" }, ] }, "rpc": { "sampOff": 1, "lineOff": 2, "latOff": 3, "longOff": 4, "heightOff": 5, "lineScale": 6, "sampScale": 7, "latScale": 8, "longScale": 9, "heightScale": 10, "lineNumCoeff": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "lineDenCoeff": [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0], "sampNumCoeff": [2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1], "sampDenCoeff": [3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2] } }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert ds assert ds.RasterXSize == 2 assert ds.RasterYSize == 3 assert ds.RasterCount == 1 assert ds.GetGeoTransform() == (2, 0, 0.1, 49, 0, -0.1) assert '4326' in ds.GetProjectionRef() md = ds.GetMetadata() assert md == {'metadataInt': '123', 'satellite': 'MY_SATELLITE', 'cloudCover': '12.345678', 'acquisitionDate': '2018-02-05T22:28:27.242Z'} md = ds.GetMetadata('IMAGERY') assert md == {'ACQUISITIONDATETIME': '2018-02-05 22:28:27', 'CLOUDCOVER': '12.35', 'SATELLITEID': 'MY_SATELLITE'} rpc = ds.GetMetadata('RPC') expected_rpc = { 'SAMP_OFF': '1', 'LINE_OFF': '2', 'LAT_OFF': '3', 'LONG_OFF': '4', 'HEIGHT_OFF': '5', 'LINE_SCALE': '6', 'SAMP_SCALE': '7', 'LAT_SCALE': '8', 'LONG_SCALE': '9', 'HEIGHT_SCALE': '10', 'LINE_NUM_COEFF': '0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9', 'LINE_DEN_COEFF': '1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0', 'SAMP_NUM_COEFF': '2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1', 'SAMP_DEN_COEFF': '3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2', } assert rpc == expected_rpc assert ds.GetRasterBand(1).GetNoDataValue() == 0.0 assert ds.GetRasterBand(1).GetDescription() == 'PAN' assert ds.GetRasterBand(1).GetMetadataItem('DESCRIPTION') == 'Panchromatic band' assert ds.GetRasterBand(1).GetColorInterpretation() == gdal.GCI_GrayIndex assert ds.GetRasterBand(1).GetOverviewCount() == 0 assert ds.GetRasterBand(1).GetOverview(-1) is None assert ds.GetRasterBand(1).GetOverview(0) is None ############################################################################### def test_daas_getimagemetadata_http_retry(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # 4 retries and success handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 502, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 503, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 504, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 500, {}) metadata_response = json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 1, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" }, { "name": "Band 2" }, { "name": "Band 3" } ] }}}}}}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, metadata_response) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_INITIAL_RETRY_DELAY': '0.001', 'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert ds # 4 retries and failure handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 502, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 503, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 504, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 500, {}) handler.add('GET', '/daas/sensors/products/foo/images/bar', 500, {}) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_INITIAL_RETRY_DELAY': '0.001', 'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds # No retry on HTTP 403 handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 403, {}) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_INITIAL_RETRY_DELAY': '0.001', 'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.Open( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert not ds ############################################################################### def test_daas_getbuffer_failure(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() metadata_response = json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 1, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" }, { "name": "Band 2" }, { "name": "Band 3" } ] }}}}}}) handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, metadata_response) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=RAW']) assert ds # HTTP 404 handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 404) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # HTTP 404 with payload ds.FlushCache() handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 404, {}, 'my error message') handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # HTTP 200 but invalid multipart ds.FlushCache() handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 200, {}, 'not multipart') handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # Missing data payload part ds.FlushCache() handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":1}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n')) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # Missing metadata part ds.FlushCache() handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream ABCDEF --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n')) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # Inconsistent metadata ds.FlushCache() handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream ABCDEF --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":3,"height":1}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n')) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # Inconsistent data size ds.FlushCache() handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream ABCDE --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":1}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n')) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # Invalid PNG image ds.FlushCache() handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, metadata_response) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx( "DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert ds handler = webserver.SequentialHandler() png_content = 'This is not png !'.encode('ascii') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: image/png """.replace('\n', '\r\n').encode('ascii') + png_content + """ --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":1}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n').encode('ascii')) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data # Inconsistent PNG image ds.FlushCache() handler = webserver.SequentialHandler() png_content = open('data/test.png', 'rb').read() handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: image/png """.replace('\n', '\r\n').encode('ascii') + png_content + """ --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":1}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n').encode('ascii')) handler.add('POST', '/getbuffer', 404) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster() assert not data ############################################################################### def test_daas_getbuffer_pixel_encoding_failures(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 1, "pixelType": "UInt16", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" } ] }}}}}})) # PNG with UInt16 -> unsupported gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=PNG']) assert ds assert gdal.GetLastErrorMsg() != '' # JPEG with UInt16 -> unsupported gdal.ErrorReset() handler.req_count = 0 with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=JPEG']) assert ds assert gdal.GetLastErrorMsg() != '' # PIXEL_ENCODING=FOO -> unsupported gdal.ErrorReset() handler.req_count = 0 with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=FOO']) assert not ds # JPEG2000 with Float32 -> unsupported handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 1, "pixelType": "Float32", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" } ] }}}}}})) gdal.ErrorReset() with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): with gdaltest.error_handler(): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=JPEG2000']) assert ds assert gdal.GetLastErrorMsg() != '' ############################################################################### def test_daas_getbuffer_raw(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 1, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" }, { "name": "Band 2" }, { "name": "Band 3" } ] }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=RAW']) assert ds handler = webserver.SequentialHandler() response = """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream ABCDEF --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":1}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""" response = response.replace('\n', '\r\n') expected_body = """{ "bbox":{ "srs":{ "type":"image" }, "ul":{ "x":0, "y":0 }, "lr":{ "x":2, "y":1 } }, "target-model":{ "step":{ "x":0, "y":0 }, "size":{ "columns":2, "lines":1 }, "sampling-algo":"NEAREST", "strictOutputSize":true, "srs":{ "type":"image" } }, "bands":[ "Band 1", "Band 2", "Band 3" ] }""".encode('ascii') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response, expected_headers={'Accept': 'application/octet-stream'}, expected_body=expected_body) with webserver.install_http_handler(handler): data = ds.GetRasterBand(1).ReadRaster() assert data == 'AB'.encode('ascii') ############################################################################### def _daas_getbuffer(pixel_encoding, drv_name, drv_options, mime_type): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() drv = gdal.GetDriverByName(drv_name) if drv is None: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 100, "height": 100, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" }, { "name": "Band 2" }, { "name": "Band 3" } ] }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=' + pixel_encoding]) assert ds handler = webserver.SequentialHandler() src_ds = gdal.GetDriverByName('MEM').Create('', 100, 100, 3) src_ds.GetRasterBand(1).WriteRaster( 0, 0, 100, 100, 'A', buf_xsize=1, buf_ysize=1) src_ds.GetRasterBand(2).WriteRaster(0, 0, 100, 100, 'B', buf_xsize = 1, buf_ysize = 1) src_ds.GetRasterBand(3).WriteRaster(0, 0, 100, 100, 'C', buf_xsize = 1, buf_ysize = 1) tmpfile = '/vsimem/tmp' drv.CreateCopy(tmpfile, src_ds, options=drv_options) f = gdal.VSIFOpenL(tmpfile, 'rb') content = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) gdal.Unlink(tmpfile) response = ("""--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: """ + mime_type + """ """).replace('\n', '\r\n').encode('ascii') + content + """ --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":100,"height":100}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n').encode('ascii') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response, expected_headers={'Accept': mime_type}) with webserver.install_http_handler(handler): with gdaltest.error_handler(): data = ds.GetRasterBand(1).ReadRaster(0, 0, 1, 1) assert data == 'A'.encode('ascii') data = ds.GetRasterBand(2).ReadRaster(0, 0, 1, 1) assert data == 'B'.encode('ascii') ############################################################################### def test_daas_getbuffer_png(): _daas_getbuffer('PNG', 'PNG', [], 'image/png') ############################################################################### def test_daas_getbuffer_jpeg(): _daas_getbuffer('JPEG', 'JPEG', ['QUALITY=100'], 'image/jpeg') ############################################################################### def test_daas_getbuffer_jpeg2000_jp2kak(): _daas_getbuffer('JPEG2000', 'JP2KAK', ['QUALITY=100', 'CODEC=JP2'], 'image/jp2') ############################################################################### def test_daas_getbuffer_jpeg2000_jp2openjpeg(): _daas_getbuffer('JPEG2000', 'JP2OPENJPEG', ['QUALITY=100', 'REVERSIBLE=YES', 'RESOLUTIONS=1', 'CODEC=JP2'], 'image/jp2') ############################################################################### def test_daas_getbuffer_overview(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 1024, "height": 512, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" } ] }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=RAW']) assert ds assert ds.GetRasterBand(1).GetOverviewCount() == 2 ovr0 = ds.GetRasterBand(1).GetOverview(0) assert ovr0.XSize == 512 assert ovr0.YSize == 256 handler = webserver.SequentialHandler() response = """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream %s --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":512,"height":256}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""" % (' ' * (512 * 256)) response = response.replace('\n', '\r\n') expected_body = """{ "bbox":{ "srs":{ "type":"image" }, "ul":{ "x":0, "y":0 }, "lr":{ "x":1024, "y":512 } }, "target-model":{ "step":{ "x":0, "y":0 }, "size":{ "columns":512, "lines":256 }, "sampling-algo":"NEAREST", "strictOutputSize":true, "srs":{ "type":"image" } }, "bands":[ "Band 1" ] }""".encode('ascii') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response, expected_body=expected_body) with webserver.install_http_handler(handler): data = ds.GetRasterBand(1).ReadRaster(0, 0, 1024, 512, 512, 256) assert data ############################################################################### def test_daas_rasterio(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() handler_metadata = webserver.SequentialHandler() handler_metadata.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 1024, "height": 512, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "Band 1" } ] }}}}}})) with webserver.install_http_handler(handler_metadata): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=RAW']) assert ds handler = webserver.SequentialHandler() response = """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream %s --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":1024,"height":512}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""" % (' ' * (1024 * 512)) response = response.replace('\n', '\r\n') expected_body = """{ "bbox":{ "srs":{ "type":"image" }, "ul":{ "x":0, "y":0 }, "lr":{ "x":1024, "y":512 } }, "target-model":{ "step":{ "x":0, "y":0 }, "size":{ "columns":1024, "lines":512 }, "sampling-algo":"NEAREST", "strictOutputSize":true, "srs":{ "type":"image" } }, "bands":[ "Band 1" ] }""".encode('ascii') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response, expected_body=expected_body) # Check that AdviseRead is properly honoured ds.AdviseRead(0, 0, 1024, 512) with webserver.install_http_handler(handler): data = ds.ReadRaster(0, 0, 512, 512) assert data data = ds.ReadRaster(0, 0, 512, 512) assert data data = ds.ReadRaster(512, 0, 512, 512) assert data # Redo at band level ds.FlushCache() ds.GetRasterBand(1).AdviseRead(0, 0, 1024, 512) handler.req_count = 0 with webserver.install_http_handler(handler): data = ds.GetRasterBand(1).ReadRaster(0, 0, 512, 512) assert data # Re-test by simulating hitting server byte limit handler_metadata.req_count = 0 with webserver.install_http_handler(handler_metadata): with gdaltest.config_options( {'GDAL_DAAS_SERVER_BYTE_LIMIT': '%d' % (512 * 512), 'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=RAW']) assert ds ds.GetRasterBand(1).AdviseRead(0, 0, 1024, 512) handler = webserver.SequentialHandler() response = """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream %s --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":512,"height":512}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""" % (' ' * (512 * 512)) response = response.replace('\n', '\r\n') expected_body = """{ "bbox":{ "srs":{ "type":"image" }, "ul":{ "x":0, "y":0 }, "lr":{ "x":512, "y":512 } }, "target-model":{ "step":{ "x":0, "y":0 }, "size":{ "columns":512, "lines":512 }, "sampling-algo":"NEAREST", "strictOutputSize":true, "srs":{ "type":"image" } }, "bands":[ "Band 1" ] }""".encode('ascii') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response, expected_body=expected_body) handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response) with webserver.install_http_handler(handler): data = ds.GetRasterBand(1).ReadRaster(0, 0, 1024, 512) assert data ############################################################################### def test_daas_mask(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # Valid JSon but invalid height (string) handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 3, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "geotransform": [2, 0, 0.1, 49, 0, -0.1], "bands": [ { "name": "PAN", "description": "Panchromatic band", "colorInterpretation": "GRAY" }, { "name": "THE_MASK", "colorInterpretation": "MAIN_MASK" } ] }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port, open_options=['PIXEL_ENCODING=RAW']) assert ds.RasterCount == 1 assert ds.GetRasterBand(1).GetMaskFlags() == gdal.GMF_PER_DATASET assert ds.GetRasterBand(1).GetMaskBand() assert ds.GetRasterBand(1).GetNoDataValue() is None handler = webserver.SequentialHandler() response = """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream %s --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":3}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""" % ('XXXXXX') response = response.replace('\n', '\r\n') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response) response = """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: application/octet-stream %s --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":3}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""" % ('GHIJKL') response = response.replace('\n', '\r\n') handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, response) with webserver.install_http_handler(handler): data = ds.GetRasterBand(1).GetMaskBand().ReadRaster() assert data == 'GHIJKL'.encode('ascii') ############################################################################### def test_daas_png_response_4_bands_for_a_one_band_request(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port == 0: pytest.skip() # Valid JSon but invalid height (string) handler = webserver.SequentialHandler() handler.add('GET', '/daas/sensors/products/foo/images/bar', 200, {}, json.dumps({"response": {"payload": {"payload": {"imageMetadata": {"properties": { "width": 2, "height": 3, "pixelType": "Byte", "_links": { "getBuffer": { "href": 'http://127.0.0.1:%d/getbuffer' % gdaltest.webserver_port } }, "bands": [ { "name": "PAN", "description": "Panchromatic band", "colorInterpretation": "GRAY" } ] }}}}}})) with webserver.install_http_handler(handler): with gdaltest.config_options( {'GDAL_DAAS_PERFORM_AUTH': 'No', 'GDAL_DAAS_SERVICE_URL': 'http://127.0.0.1:%d/daas' % gdaltest.webserver_port}): ds = gdal.OpenEx("DAAS:http://127.0.0.1:%d/daas/sensors/products/foo/images/bar" % gdaltest.webserver_port) assert ds.RasterCount == 1 src_ds = gdal.GetDriverByName('MEM').Create('', 2, 3, 4) src_ds.GetRasterBand(1).WriteRaster( 0, 0, 2, 3, 'A', buf_xsize=1, buf_ysize=1) src_ds.GetRasterBand(2).WriteRaster( 0, 0, 2, 3, 'B', buf_xsize=1, buf_ysize=1) src_ds.GetRasterBand(3).WriteRaster( 0, 0, 2, 3, 'C', buf_xsize=1, buf_ysize=1) src_ds.GetRasterBand(4).WriteRaster( 0, 0, 2, 3, 'D', buf_xsize=1, buf_ysize=1) tmpfile = '/vsimem/out.png' gdal.GetDriverByName('PNG').CreateCopy(tmpfile, src_ds) f = gdal.VSIFOpenL(tmpfile, 'rb') png_content = gdal.VSIFReadL(1, 10000, f) gdal.VSIFCloseL(f) gdal.Unlink(tmpfile) handler = webserver.SequentialHandler() handler.add('POST', '/getbuffer', 200, {'Content-Type': 'multipart/form-data; boundary=bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7'}, """--bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Data"; Content-Type: image/png """.replace('\n', '\r\n').encode('ascii') + png_content + """ --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7 Content-Disposition: form-data; name="Info"; Content-Type: application/json {"properties":{"format":"application/octet-stream","width":2,"height":3}} --bd3f250361b619a49ef290d4fdfcf5d5691e385e5a74254803befd5fe2a7--""".replace('\n', '\r\n').encode('ascii')) with webserver.install_http_handler(handler): data = ds.GetRasterBand(1).ReadRaster() assert data == 'AAAAAA'.encode('ascii') ############################################################################### # def test_daas_cleanup(): if gdaltest.daas_drv is None: pytest.skip() if gdaltest.webserver_port != 0: webserver.server_stop(gdaltest.webserver_process, gdaltest.webserver_port) gdal.RmdirRecursive('/vsimem/cache_dir') for var in gdaltest.daas_vars: gdal.SetConfigOption(var, gdaltest.daas_vars[var]) gdalautotest-3.1.2/gdrivers/data/0000775000175000017500000000000013701060031015420 5ustar evenevengdalautotest-3.1.2/gdrivers/data/ignfheightasciigrid_ar3.mnt0000664000175000017500000000024613701057753022723 0ustar eveneven-152 -151.5 -16.75 -16.5 0.25 0.25 3 1 1 1 0. x -152 -16.5 1 2 -152 -16.75 4 2 -151.75 -16.5 2 2 -151.75 -16.75 5 2 -151.5 -16.5 3 2 -151.5 -16.75 6 2 gdalautotest-3.1.2/gdrivers/data/n43_wgs72.dt00000664000175000017500000010256213701057753017515 0ustar evenevenUHL10800000W0430000N030003000200U 012101210 DSIU DTED0F18 062 01A960900000000US090078 SPEXDLMS2009609MSLWGS72AS11+C 9609 430000.0N0800000.0W430000N0800000W440000N0800000W440000N0790000W430000N0790000W0000000.0030003000121012100 ACC0200020002000200 10 ~(%%(0<:::<BHNYb[]][J3TX_cdgcjofn|vt?}a&D6}~   ! (!0>;=3;7NRbZYZd\R8GTWYXklndjptr}6Fkh7By "%10665@KLTYTYZb`:2JIOPSWba`clpi}FpvOBݪ}wq   +$%(.138LGR]YSNH:46>GH:<SVk`^hmip #7aurwU?om_   &/*4(6DTSLQ,A)1++)(%-K[H2]ffnt)0Ts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KKKKKKKKKKKOR\`TS^ap~2pp_pnlkhgg^ZYVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKPXX[\P\[hpwot3qqdqrkkhNLaKKPKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKS\]Y\O`h^db3nrrRONNNN]SK[WQUXKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKUSZfWgjgtn| 2ssQ]snkihe_\]YVTKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKRKYM\]`hiko|2]ttpnkiid_\[ZWSKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKRXVddcebhx|~5Zuurnjihc^\]WXSKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKYWdhfitvswtty5nvvtonihd^[\\XTKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK]^[dahjejeq~5wwonji^_[YVSTTKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKU[XUeYYfinn~4xx~fda^XYYWTOMLKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKQNNRUbk]`oz}3>gdalautotest-3.1.2/gdrivers/data/vrt_of_warped_vrt.vrt0000664000175000017500000000676113701057753021744 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area Gray 20 20 6.71089e+07 NearestNeighbour Byte byte.tif 0.125 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 440720,60,0,3751320,0,-60 -7345.33333333333303,0.0166666666666666664,0,62522,0,-0.0166666666666666664 ]]> 1 gdalautotest-3.1.2/gdrivers/data/int16_rat.clr0000664000175000017500000000152213701057753017752 0ustar eveneven -500 127 40 65 -400 154 168 118 -300 172 218 120 -200 82 77 117 -100 245 192 117 100 222 0 86 200 191 173 69 300 14 110 243 400 102 86 25 500 97 139 179 600 211 152 39 700 141 88 211 800 225 127 60 900 128 244 208 1000 162 132 156 1100 193 78 134 1200 202 170 254 1300 6 252 240 1400 157 235 249 1500 183 201 168 1600 91 144 146 1700 153 252 228 1800 243 122 213 1900 14 105 160 2000 145 97 47 gdalautotest-3.1.2/gdrivers/data/grassascii.txt0000664000175000017500000000024213701057753020330 0ustar evenevennorth: 250.000000 south: 0.000000 east: 150.000000 west: -100.000000 rows: 6 cols: 4 -9999 -9999 5 2 -9999 20 100 36 3 8 35 10 32 42 50 6 88 75 27 9 13 5 1 -9999 gdalautotest-3.1.2/gdrivers/data/PRF/0000775000175000017500000000000013701057751016066 5ustar evenevengdalautotest-3.1.2/gdrivers/data/PRF/dem.x-dem0000664000175000017500000000300113701057751017561 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/PRF/ph/0000775000175000017500000000000013701057751016475 5ustar evenevengdalautotest-3.1.2/gdrivers/data/PRF/ph/ph_2_0.tif0000664000175000017500000000576313701057751020263 0ustar evenevenII*  BCDEU S! P$ Ab H$x,t|Gf#=bR  n,HE t* 7ys3 9 2 PtZoW3<՝rUj͋4 +43 &\`6 ۈj_wvʹ*@ Ptz]>Wv{]wx|^>lq&@ \H#&q `I`lPdV@h*N\UUX@, rK 7 p $J<ԔLlr:굹42!BԴ/#$+,'/R/,j-Rr9 n~L!<&.һa), p~@A?N2DE+D` [ `9>pd:@QW,fJ7׵ډaŌYvLNS:Y6Rܬ. I07["ŪuH m Z7r0rx \,G 0Ҥff|YVBmMuݺ F0=?UcrӺJ ` LـI+ObCdPDl:؉Oı-NNs`20A&eXY1eR\!qi Ŗ#V+Qbc8 } Ӂsn,$Np_@ -I|C4nS tw"DXx@`JBAg'rj >3*Ϲ!$$wU]JR!ҊR  HVZ*1dX.5訴.Kv1k藻 EiTݳ3g %0&U{6ih,5bŜr1NԲVn9[+f-y1DGp!v'X|L)iSy"d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Q, r'⼼/r3:dpeo+ϰsbToC&SdV]&Ҵ0јܵLj!P""E 0ī0@De,c!T++ҒW7,IMC<֫Gw:eYIL %IP`|H SJPpbN*G^&%^+ ̴̾/ ·=a'Me[;Zœ֖.K[)pMaiyyR TN@ Y4+. jfիβϳtOjy 7F,VB> +\CԵc6À 'UG  G0!fDE\8P@y$I{'IX^We;SN0@ɾO<9"Lȱ`sR֞-&#F[FPpb` uC0P('R`c-Ƒs"ḏ1d3\7FH sY[ ĭT%$4 6ğ8&  20"` >g a  0PgN4HlѷA/4ؕaVMm(&VX 96%D(<2Vcnߌ).<=4Q'iCNP]Iz}2,&AU8a0h.tM ;F}t`0 7@k1*Q3O+d3)2IfL}d!մp(XA(EkD\bP΍Z&:ǝBxL3$]C@v M 64V@p7:o W@ICL̄I7BȐ3ҔQx`=D@D2%6Lz:rn8y=&t1i\BtWbY;,̍cDyTIy6LbLIGH>S>>??O gdalautotest-3.1.2/gdrivers/data/PRF/ph.prf0000664000175000017500000000302613701057751017207 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/PRF/dem/0000775000175000017500000000000013701057751016633 5ustar evenevengdalautotest-3.1.2/gdrivers/data/PRF/dem/dem_0_0.demtif0000664000175000017500000000016113701057751021226 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/PRF/dem/dem_0_1.demtif0000664000175000017500000000016013701057751021226 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/PRF/dem/Pyramid.demtif0000664000175000017500000000051513701057751021433 0ustar eveneven 0 0 0 0 gdalautotest-3.1.2/gdrivers/data/PRF/dem/dem_1_1.demtif0000664000175000017500000000015713701057751021235 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/PRF/dem/dem_1_0.demtif0000664000175000017500000000016113701057751021227 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/srid.nc0000664000175000017500000000343013701057753016724 0ustar evenevenCDF yx  ConventionsCF-1.6 y  standard_nameprojection_y_coordinateunitsmetersaxisY valid_rangeYu AYu x  standard_nameprojection_x_coordinateunitsmetersaxisX valid_rangep =qAp =qcrs grid_mapping_namelambert_cylindrical_equal_arealongitude_of_central_meridianstandard_parallel@> false_eastingfalse_northing proj4textW+proj=cea +lat_0=0 +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=msridurn:ogc:def:crs:EPSG::6933crs_wktPROJCRS["WGS 84 / NSIDC EASE-Grid 2.0 Global", BASEGEODCRS["WGS 84", DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1.0]]]], CONVERSION["US NSIDC EASE-Grid 2.0 Global", METHOD["Lambert Cylindrical Equal Area",ID["EPSG",9835]], PARAMETER["Latitude of 1st standard parallel",30,ANGLEUNIT["degree",0.01745329252]], PARAMETER["Longitude of natural origin",0,ANGLEUNIT["degree",0.01745329252]], PARAMETER["False easting",0,LENGTHUNIT["metre",1.0]], PARAMETER["False northing",0,LENGTHUNIT["metre",1.0]]], CS[cartesian,2], AXIS["easting (X)",east,ORDER[1]], AXIS["northing (Y)",north,ORDER[2]], LENGTHUNIT["metre",1.0], ID["EPSG",6933]] long_name EASE2_T12.5km!scale_factor_at_projection_origin@pP =test  long_nametestunitscount grid_mappingcrs??gdalautotest-3.1.2/gdrivers/data/HEADER.DAT0000664000175000017500000000300013701057753016714 0ustar evenevenPRODUCT =00062050-01 WRS =160/04600 ACQUISITION DATE =19980826 SATELLITE =L5 INSTRUMENT =TM10 PRODUCT TYPE =MAP ORIENTED PRODUCT SIZE =FULL SCENE TYPE OF GEODETIC PROCESSING =SYSTEMATIC RESAMPLING =NN RAD GAINS/BIASES = 1.05496/-.00708 2.60522/-.01550 1.63473/-.01064 2.94317/-.02215 0.68567/-.00544 1.52431/0.12378 0.42566/-.00328 TAPE SPANNING FLAG=1/1 START LINE #= 1 LINES PER VOL= 8480 ORIENTATION = 0.00 PROJECTION =UTM USGS PROJECTION # = 9 USGS MAP ZONE = 40 USGS PROJECTION PARAMETERS = 0.637813700000000D+07 0.635675231414000D+07 0.999600000000000D+00 0.000000000000000D+00 0.570000000000000D+06 0.000000000000000D+00 0.500000000000000D+06 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 EARTH ELLIPSOID =GRS_1980 SEMI-MAJOR AXIS =6378137.000 SEMI-MINOR AXIS =6356752.314 PIXEL SIZE =25.00 PIXELS PER LINE= 9020 LINES PER IMAGE= 8480 UL 0530511.9670E 210948.2725N 93500.000 2345250.000 UR 0551521.7874E 211159.0593N 318975.000 2345250.000 LR 0551638.2597E 191706.4374N 318975.000 2133275.000 LL 0530803.1477E 191508.4154N 93500.000 2133275.000 BANDS PRESENT =1234567 BLOCKING FACTOR = 1 RECORD LENGTH = 9020 SUN ELEVATION =60 SUN AZIMUTH =104 CENTER 0541108.4567E 201341.3534N 205943.554 2239227.568 4499 4242 OFFSET= 151 REVBgdalautotest-3.1.2/gdrivers/data/world_l1.mbtiles0000664000175000017500000020200013701057753020537 0ustar evenevenSQLite format 3@ "  >i#%indextiles_indextilesCREATE UNIQUE INDEX tiles_index ON tiles (zoom_level, tile_column, tile_row)uItabletilestilesCREATE TABLE tiles (zoom_level integer, tile_column integer, tile_row integer, tile_data blob)IgtablemetadatametadataCREATE TABLE metadata (name text, value text) /bounds-180.0,-85,180,85!      xV߬Q,ebJ#<֌B.anIXx;AȣtjJ }6ejӔYLϲ=J|GM [Vv*P9#^_Jyv7\3d @ʗX3[BKӟ)*vXs6 φZÿ@); (q펕wMG!%B(TDSօ&1VmU+4R$5np0$I >bݨu"xq`0s^a]ūne$ee,- pW ]բ m\p=]-nv\>^)k'|?.#m$Acre<-fkCe9Sڹ5+Bt/o(M<) '8; +QҭaWˢU!@uOjM<=ak-E G1~ls@1SȀS@J*{w^ت_X@u)dE FN {!n+Y,BWFDg/5 ^bfmeJ{Vpm1QZ((((+ImHQ z_Cq0;យXRKf dzJITQ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defghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?("(*OjKcl!!qm!e8 5 elLmKL6^T}~4[/ 001\JFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?("((((((X;RQ@t |S:<+C{ d}Hnt}F=:h,f7+d6W3{f4ng{T+1=={WPVR9_c*\kH8$dIO'֗8'b-(\ HCp=$wג5n3?΢.rmM?b"2 WkmQvGr3g̣=n_+JEW ((ĨRx(QEQJF(('4RPEPEPEPEPEP[@ՉZ73rqU%XɮHTgqXS#nm˷ !+`p3QǾؕ\dߏʦO$%"qctb\_1\kZ'q-dW}~PGzqh7k?![EW0(((uQGJt+8km)P=:zW1`#lcҮhp{,Rnu_R;d{+bM= rozm^(Ğfh{mjw>Z4f>X J"缐E9`xXn*H|\C&m=;o{LC#+.عa͞GQm'>Vp㿭 MQ%fafcRdi$d6On&Y.O.P98s@9ST@r #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?("(((((AN-@ti+ !x=|(ҸO|?iln,܅T9czT4qX~ +?\oG i:8, 0H_'=R+ho4nS|podmMrf.~r\\k~+??ŮU.4Yʹ_A3 eqo/&1'܎@jg]c]fz}^+:6\Ͼɢ6Q dԚQQZL- bu`Yo-iU578i"lFq߆=h"fF_.\B?~+_c%]1d،:щyF坋1&Boq(QEQEQEQEQEQ@_ !.Ity"&P3ݐsӌb8J/ׅmu ?θu}HĥG`M.ࡤ.=9OٌmQj}VU7#źcR5}iڭZ,ٕh;"E==s^z\];oh9{ @ue`6I8\rzTax.};NXmUak|wi[Vw,aK,y +OỶ^-󅽻hރ3=k,axztwhϐ>Wp !7>{kc\~sW$}X}X"7>\w5qf9\FK ֭,xj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iVi}xsDRxsxxis`esxxss}sneVMixIIxexsnƿi[is}Me}}ni}}x`eVsVennssssnxsesi[[sn}s[``[snMnxiD@772772727M}`n`ssMVVMe[[VVs}iexneesδxȿ``s}}̸}snii`sei}}̲se}x``M[snnxssssiR``VI`sV[[[[[[M`ies``[iiDM[@7@77@@VMVexsV`}niR[MVn}sss۶nse[ses}δxȣin[ixsζs`Vins`[Veeii`}sȹ[essixȸisVRR[xx}}isx`eVVM;;ex}M[RVVeVM[nensxiRMMMMM77727@@[ie`n`nnR[sƸeinexxn`s`nn}ʸx}}}isxiesx}}x[Vnظi}}xi`isxxxsxixiViRIRexisxx}}isxssse`[}RMV`VRMV`R`xniI[[VxD;;;DDRxe[;)%s}xsnxxs[}عs}xxsss}i}ƣxeeieֹ}[e[@n`sû}nnxsD}n`[R`[inisxsxxxxssse`[si[eRRRVVVVR[}snVsϔVIDII[`xn;RnsxI@iDȨnnnxxx}ְ}}xxisnnn}nx`iMRseVxѻx}}}}`xR2M@[ns}IIVe@i}i[sRnnIRsxssssxnsxisxi`[si[eRRR[iinnii`@Dx}`R[ne`[D2;RR}xnssns}}}[en}}ssex`ýߴn}}Mx`IeѴise@IMRi[2RRM}xsxM2;7;nxVRReMni}[[snnnnssxss[;M[VMDniii`RRR[iinniiiiMMs}sRMesssnRD;sI}sxxnixsxxsnsVMsxxx}}n`sx}n`ĴVVes``}}xnnxI2DI`}s[eie}}n`snMD[DRes[i[eM[[x``sn`n`n[ixsR727D7siiV`[[`eR`iiiiiMMs}sViiiI`I7岁essxix}nR`xʿxsx`nxixxixnVʹinVnsRRxess`i[Vx`7Re[[[eeDxR`InVn@`s[[s`[s[nxnn`nsMD[7;Me`e[`[[[`is`nxessRRxssViiiIeRD`Rs`sVVRI[[Vxxsss`}}ssx}sxxxss}ssVVsRnResiesiVin;`MD}[x[snIiVsVises`[e[n``iV}[IRM2@[`n`[`[V``issxs`nn[s}`se[ȹieM[RM`esnsDV[RM[[[V[[[VV[nsxxxs}ssnsĽ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i}sInexV`iD;eV[`nn`esMseM[MVeii[xVII@ninnxxnxxiiexsniƿseI̹ĴֶӶn}exssxxnx`VxsiV`ss[[`xxxnnxxxinnniiiss}nex`R[`R[RIR@R}}neRn``[[s``iissxi`IVM[MVi7IiRVV@innxxnxxDex}s`ii2``[ȽiDx}[}sIMs}}ni[[}}seMRIxsxϽȮssiVV}}}nnxi}}n[e`VeiisxxeisxeV[`[[nx`is[`iin[VIMV`ixeD7Resxe`[Dexxi7VsVsDVֿƁ}e7ns}s`M`s}}ein[snRRnD@Vʰnnss[es`ii[xne[nxsx`DMx}nxxs`}}nsse`i[I;DDRseR`x`[Rxsxnnxss2`}nnnn}[x}}snenRn[n۴eȸ`nƿxiM[nV}x}sxnR[`VIVisȶ}sssnsxsnVRisiVssxseRRM`siV`s}[xn[`VV`[MMV[n[ise`IMnxni`n}xs}`Vnssis7[xi}}snenR;`}xssiƿiM`xV;Ii}i}xxnVV}}ƹx[isV[[iiResssVMV`ʴR}}ȽnxV;Miii``i[[ix}e[VIR[`[[[n[xnnxsRVxiDDn}V[̆`RVR;`}xn;en}x[sniD``sx}enn[xʐxsis}nIMR[`sssssVMsx[nV}VneeVeR`nnnnni`Vxxi[[``e`[n`MIVixsxV`sVMMieM`ѣ}iRi`snnsn;esãe;R@ָRssiiIn}xsãnxnĆeRRR``ine@DRe[R[nns`}Rxxe[i[[nixnie[[Vs}`n`[nseV[RIDIDDR[x[ess`DRnsD}s}}}x}}i`s7sȴx}xen}7nee%%7exsx}}xsxû}x}ensiVeisiIRissn}n`Rx`R[s[xIIMVns}MV`[eseesnss[IVeVD@Msxxsenei[ii[M[`in}ns`Vnsx[Is}}e`ieninnRixs}nnn[n2xVD2Mx`DV}}xƽxn}e7772Dx}i`[IIxxxn`}x[Vnxʰs[V}xVnseMMViinxxsn`snsseR;7MRiineisissss`RxM@D[xVesxeVnen}ssx}eiix}xn}nsnR;;xDex@is}xxxxinn27I.isn`n`xx}e[s}sxxse[V[sӽxe[MeexxV[[MVs[Dss}x@MVRRinnnx}is}n[MI`xsxxinni[Viie`sesxe[ieeinexnថ[i@)x}}s[ssnʁsiVi}sn}}snn[esnsi}i}VieMVVR}VRnsi}Vssnnnnnxxs}nxxiVx`[```ixnxs}i}iM`s[ni`n}}inni[nsƋn[@֐}nVċen}șxƲ}se}nsn[`s}xnsnssee[[``n}nxx`RReV`inex׽xs}xxxxxxnn`Mnx`VResx[D[xssssnnx}[i}sx`[}D;V`nin}nVċi`}ĸsi}sxs[Vi}V@ixnx[n}xnexM`ne`nsظĐiVRei`Vxxxsې}nnxsnienx[Ve}seniis}nin}sienx}}}}xni``nssinxs[@ )I}ƣ}s}}si`}ns}ennnns@Mn`}xsxxxse`}snsnnnDVineenxϙ`RIR[[[Rn}nii`nڋsx[ixx}ixxDMeex[Vnsixxs`R[`[M}}ne`[Vei[ViiR7@n`[x}}}snxnxϻnsxsxxi`s}sxnxxi[Vsxx[`}nnx}xϲx`RRVV`eVsnnx}@sxesxxxsi}x[@@[ixxxinxsnse`[V[R[x`xnVis[```xxs;;eù}ni[exsn}[ssȞxxiiiixxxsi}xssssxi[`[e`eV[e}`xsxnnn}}[sV[V[VR[nx}}e`exxxxsnixxsRini`si׿iVRRVMs}[x}n}siie`exnenRVMDsx}seeʁsn`xiiiixxx`̲`n}xxssxnisnn``M`sxsnnnnnx@M[`V[MV[[V`}}ns}e[essn```snenn[n쁆xVM[RxR;x}s}x`xnesM@@i[`}is̻eD`ssnnnx`RMsxxiϰisVisVRee[n``ee`snn[DR[`VMV[[VVinnssxsIIR`snxeVxĶsisxexx;iVIn@}sx}xeisi`x[DMneVRe`nsn}MM[[sn[ni[ssnnMRMsxאseixn[Vii`iisxxniDVVei``[`VV``VeiRMV`ۮssxxniseRxx}}x`}Vi}sƹ}}}iiseenixeVI`nnssi[ie[``[nsx[sM;`ssn}x׮`nĽeie[[in}xsss}VeiexiiMMRRM[[Vixss}sn[[i[`ssxn`sM[eR[n}i`MD.Ms}R@ix}s[eR[xs[[`nnne[RRn`V`øֿixM[VI[ȔsnV`n}sinȆ`nĽeiVMVei`nxxnn`ixxeVMVe[nVnisxssxsnx}xe`n`eix}iĿxxssn`i``xssn`i@`@Dsns}}s}RRVV[ssVne[`nnnii[nsxnVRsineΙęsnËnnsف`nnnĐV[ieiVMVei`n}}si`xn`VRRe`VIRexx}isiiiVes}nni[[VsĴ[MsV@M``[exnn[sV`xsxxsixxsiRIxe`sxi[ei[nni````e}[VxeV}@;ssiR`̻nn`[ns}}n`s`n`iĨss`M`i[MResxn}}se`xxieVRRii[i`Res}}nsnssi`seVe}[sRiMnnnnDMsn`[}R@@DRiV}}@n[ssxii`Mi`e[`xsnneiiesR[nnsnn}M@[RIÿi[nss}sVn`n[xs̋Vs`M`ns}ss}ssesxnxxxeV[[[VVV}xxnxniVsnnssx}[[nnxneMnsnRI[xsn}s`I[VοD@RsssVV``s[`eineeen`i}I[iVsV[iIM}R@`IDeƹRDesnsMV`[IDMMVeM`@IiRx[s}sxn``Ô`R[[[VM`esninnses}e`}}}}VM``esxiR[`n`[xVis}}iexsRsϴ}}IIIDÞs[}`x[isx}i[xxse`ie`snDeVVsennnnxnMiVI`IIMDsenIReVID;M`MDD2e`RVI}sssi}x}i[ڰ`I`MIisn}snnxsnnnns}xnn[iin}s}eiMIVs}n}VVVxΔxexVnx`Vsnnxxxnx[sn`}n}isssMiM`xn[[[MDV[`;nV;[Msxne`;Is@In@V@;;77IVe}}nnns}n}xsVI[x}x}ns}}e`sxxs`nnnn}ne[`DRi`Vx}s`e2xss[`s`}s``nxens}}nssxxs`[xxRes`[`RR[M[ne`7xx7};seVi[Rs`ٞ}@RinM7}xe`MD`}xnnsni}}xniRen`VIisss}iisnsnsxxnennse`MRI`i`}}}x%% 7e}[`eD)D}x}D2@issn`}s}ns}sVnxnxnnnee``eR@se@I[neDM``xe״eis`Me}x}nxn.i}eMIIe`V[nsxns}s`eiMVeinein[[[[ennsssn[``V`[exVV[[s}R 2;sIi[sViģ[%s`[RnsexVVexxx}xsnnxxeiin[eeeV[[[sVRVRR`@}V`xxxxn`[[x}nxn7V[ReVR[sxseen```ei[nxexnVeRR[nxss}}e``[[nene`xýMD}[`xssD%}xsI}[[sxsRxnxĨ}nx}sx}iiiie[[V[VV[[V[V`sixsV}i}}iVxRIIRsxxxRIn[[V`nxeeii[esxsei[isi}s}RVVMDI`ss}neR@xsx}ȶIJnVnnIixss[nssû}ss}}}nx}Ľniiie`[MsiR```[iieeiix}V}}`sVI[[e;Rne}}`;MM[RnÐins`V[[}ssnisi}s}RRM@DVee}[IIIxnxVnsƴi`}[}innsieMsi}}V}sinnxix}x`si[[[[```VinseRi}xxM`V`RVMR`Risxs`nn`Rӹ}ixxeV``is}}sxnxn[[DRM@DVees}`RI@VRxsię}V[xVeVnnnVV@2Vxexen}[2}xnniee`[`e[[enssxiVii}eeVsei[`xs}V@RniVn`}x`}nn`ensssxiss[sxs}VIMMIDDI[nns}`RIeMVi}ùeMii[es`xDިM@R}}sn}ii7n@2ãװxsiȨss}exne``[eensxx[Re}nsssVexse[``VRn}enx``}inensx}snninen`[s[MMIIinIIRMesxsRIVeMVڮeeƽ`xVV``MMsRR[[`xD@ΰ`exniI 2}יȆsis}`eRM}ei[[esn}sMVniRV`i}V᮰RRiRs`;Iine[i}xxssssٽI`[i`nn`ReVIM``MMMVe}x}VDDD}neIRڮx[θxVs}x@;;Ve`;[R;;}inR`nn}@D7`en`}ęxxxnxi}}i}nRDi;[nxsiVRns[[xne`ixsx`nӴ`RVixniiiisnsi}}VVMVVnnnn`DMDI[MDIxnIDRsn[ensi⸞x[ss@[̽[eViI}i;Iissx`ϻeDDVôȣûi}eiVsMe`xsi}[}IDnnenensxin򞐋sV[}V}DRVxen[in`V[ixnse`i`}[[n`sx[[VDIs`DIIMxV}MV`iixƋi[`nsisss@[Ͽe}iD2D;7n[Vssesnx٣}ιδ}`i`}Rnexx`iR};7xRsMni}xx`ex}xI2xie[Ӹ}}RV2@esi`eeiiessxxx}ne[nsRM`sxVRIMD[sV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es}i}nnxnsn}siRϻI7xxssI`niVsDVnIxn@DIex7MDeDVV);IMxI77[DMRMenR[ssnV@[;MRn72DRR`x[s[iis`xnxssssnѲI27IIRs`ni[i[ie`ennnnnns}}ssnnxnnnninseessnn}}MRxI@RexiIRsV27Vxii[[es}sns}iii}}߿e@i`xnni@2[nDi[)DIxiIV[@DiR7MIIRIDVMiDRx`D@V[eۋI@ni@iIVRxMRٲsD;[`De}xnnsx[ie[MDIRn[e[e[sn``ee`[[nn`snenxxxxssssssse``ns}xnsxsi[MDee[is`[MMie[sn``V;[sns}iesٮѴ@;ien}}n2.[VMV7%D;;V[nVDIIInen`DMDMs[VsMI}MMVMI@D;ID}`[RM``nsRiMMMRxnxs`}nxxD`[RnxiIM`Vnii`[iinine`enn`xninsnnn`snsnx``ssxx[DDV`MeVVV`iiMMR7ID`xRVxieiiiesفs`}sRDn`I;InID;De[`%;[M;DIV`D7[xxVVDxD`[@I[[VDixMVI@`[VMixexixi@DVinissxxM@ssxeMsR7IsxnI`nnnni[[[nsi`[nVennx}nenssnsnnnniѲęeenn`e[`V`[@siIDI;;IDe@nI}nȸ}sxinssϹssxxnxxnn7RI;sn77}nDinI%;;[n7;nn`n[iIseDVi;D`MRsIDVnn@ReeRe2e`n`sx`III[R;[in}x`}e[eeM@s[sn[eMM`n`[```sinn`i`}sininnnnxxnsxsແ`VsM`iR}MD`DIR`I7D@IsRixxnxnsn[`snxiRxx}`}se7[@Rs@7I;M;en.27VM`MII[II}}sIV`;DM`RxR[MIInRR[nnIIMx}x}V[`VVnii`en7[eVVissin[R`e``e``[[esinxnixx[`iixxi}iĮx[VxxƋ[iRMiIMM22DDMxiMVD7iMViM}isn`[D`x[ݹMs@s``x}sI7MV@D2D@eeDRȴe;@;2VDDxs``nRIMII;7RRsVD[snMR}`V@ex`nxIIRVneR[M`sinRRe;Rxx}neii``sseRR[xn``ensssnnxix`nn֮ܽiisxV7iιV[IDD}n MMV}[VDRV7MDsnsiReV2Ixe@.enssn}2Ii7D7n`IID2xI@MIxD[isD22DIie@)D[`DVsM@R}`I2exsVVi`nen[[M[`ViieIRRieIiisxnennnxxi`VVsxnsnxssi`issx}ۿeVxi}xVDx`MDVs%e[[x}@I@V[MVRnxiR[`[xs`ಣ}e2;nesiD}VM[2[[Dn[)RDDViRDD}nDMRs`R;;7`s}RVM2@@.Meen}xsR@VR@xxnsxR;;Rn[n`D@MRRIVMĮiVniissxxnnxnii[nn}xiin}isnsn}inssIi[n}`D@VIM[MMnn.;[VxI27;V`M@MD`ee`[ߐ}ӹ[esiMsiD@IVV7`sDVIiV;2RM[VnnDVVi[@IMnD@VVeMMVD2@;;}se`ini[VnRRnn}[IR%.2V}sDD@R`[Vi[ieexsnssnnxse`isxsx[enxniiiinxn`DVesΣ[VM@D@`ix2snDM`@%7IMD..[sssesx}ֽ`@isixi`I%I7xxs7`MD2[׆xIR[I[ssV@seD[RV7@2xIRMM;n@IIIiResxRVxi[7@sxnnIIDDIRiRisniinnxxeess}nieenssii}xsi`iinsѿ}inxneRD[MၮDIRxہi; %@I.2DIIIM.%;}VVRRi``R;Dei;RIinsxnV@[iRMe`xsV)R7Vès`eMIseR}snMR`e;sDVIDMRDneVnsx;;nein}iee[R@;@Meei}e`issxee}}i``[``isi}s`sieeen}׿n}eRxVM@;;`exVesnVRxD)I}VMiRIVD.`iRi[II[`āVV;..)..2RIinnss`R@e} V}i[nMMRsxsM};inVxxssV}M)7@[V[sDVRI@;`xM}[ixnssneI;e}ne[VVx[;@IVxxi[inssxssxxs`[Viie[;`nn[[`nn}sinRD;;s`D22;;2;;;;.@Ie@V}V[M[i2@RIDD@ ƽ;I@;2222D@@@7777)77..e}i[nss`R@e}V)ReVnnIRRxs@@MiDMViVM``DiI@VI@nReI[[[R@x`RissnxRe}nnne``nxiMVenxsi`esiisxninneRR`eMDV[xneR[[MM;2277772)))2.;@2)77ID;@`niD}ܸI.7@I;27`iID2227222722222....2))))x`sxx[D[I;eV)ReVnMRID}iDeMMV[Vis[eMR;7e@VRMRV``[MeMR}ss[snssx`VVe[i}x[M}xne`nsnnssiinnV[i`V[[en}`MM[[}}II.22)2)2%%)%)))).)))7)).27;;I;ѲsD77..2@7Vn7)22.)))22%.27..72..27.2@nniee;;[IDsR@Ies`MRID}iDeM7M;iIVIMiM2IMexeReRR[i}M7RsxnI[xe[`nn`e``sxV;Din`inssni}s[[`snnni``e`ssneRV}i`I.222772.2.277.).2)2))..2)))%%)..)7sӞ;MIV@2222222;D77..2..2.))%22...2%%2)%.)eiDM}I.M`Rei.)@MR`MM}e@`sM7M;ixRnseIiMVMin@neIsni``7isn[isi[ixxxs`[[[`[V`}@DVIR[`iisseesiin`ieseesi```ix}ne`M2227)).%22.)..)%%)..))7)))))%.7%2)2)77..))%22))..))22.).)22))))))..722..7..2...[IVDsiIRsi@@DD@RnRRV}iD[iI`ȹ`@DixRnseIiM@DRMRei}sRn`.M[sx`[x[;@isiexsi`[MR[VnnDRIMMV`inisen}}i[nnnesi`s`[V[iRIR@27272.%27222.2;;.%.2%.)%.27)%)))2)72)%)2%)%2)).)...%.2.2222.22.7)))...).2))%%)))27D[MM@[sn)%@Vii;I}nM`VIVMs@;MVi`VDMVV@DRMReii`[}xI7VVns}[Mii2MxneienseRMM[`n[DDDVDs`es``xinsxnĮ}VID;;)22.)72%%.22.).22 %..2))22)).7.......2)22)))%2)))))%).)7).)7))).22.2..27..).272)2esI.i7@7DeiI@`ReDRVI}ýV[};2Vxe7V`RVVIIM`[n[}xI7V}Ѵs`nssii[in[ieM[iVii`VR@I@VIiseixniiĞ}}V;2.7I272)72.7)).7 .2.722).2%..7..72.%%)22)2.%...%..2%))2)2)))%))%)..%))%%).)..) )..))%)RI2Vxi7MeV`xV7;Vn`In@[M``s@esRDIDVI`ieinin[`xѴs`iiissseexsMMei}VIDVD`RRDsxxi`ex}nnΐV}[;22..@7.72....))))2.))7.)%))2%).7.)22...2...27))2)%%22%...%))77)2)2)))%%))7..7..)7.22..2;))VVII`IDi`D[[s}sDR;RMnse.eV}xsi`s}n[nxxnxniiisssxssxss`sMD7M;Isne[esiRVe`R;;2.))...D22.7.2....2.2.272))27)7)).7))2)%))2)2...2%%..)2)))22.....%%.2))2)%%2))2)))%.))%))I}%)}sDsVRV}`I`ieM̋x;eVMieRiIiinnessx@Dis}ݮess`ii[[sxssxss`@MDn`Mn[M;2Rne`exxsiiR@77)222...2@2.).7))%..22...22.)%..22272)22))))%7)27)2))%)..2.2..))22)%27.%2%%...2)227)))%))%)7@DVe;esVxxse;M[V@.RsenV%xeV`}[2Rnn`xxe`xnnR`xiӐs}```sn[ennxsn@MDn`Mni@IVi`RV`ii[M@.2;72)2222)D7..7%))).722..272..2......22.)))222)))2)2%))))))2)72%....%.%7%))))%.2..%.%.))))%)iIn7@}xsV`[MRRRDD2VVx@`IieIes`nRexnInii[ήRã}n[MRs``senenRDIneMRi@IVi`R`eƞn7;..72).)..7.2I..;2%)%))))).7))))).77......%.......72)2)))2)22)2)%))2))))2...%2..27)%272).%...%s.[s`eR[xMDR[@7s[;7DVI``Mx[[Mx[seD[`s``[`[e``xxn[IR`sxsssMVVDDVxe;}ns`nVe`eƞsD;;2.7;...)...);M2..).772)2.77)2)2)2227)72)%%%..2......%%.2.))))222))))7)2)7))))%)2.....2%2.%%))VR@Inʨ}M[MM7iV[enR[IDn[M``xxs@[Vx;Vxnsssn``VDsVVVII``nsnnsniRII@D[IDRn}einsRöI7ssD;;2.72.))..2;).D@7..).7)..77)).2%.722)))))%%))2))))2..%.....2.22.%222)2277))))))722%222)2%%.2.%;Mϣ[iRRn2IDVMinMRsI7n}Vn[nsM7e[Rsxe}}`xiR[[[neDnMniIVenns[s}[DIR``RMIIneinx}}ãD7772772.))..2;;.2DD.72222..2272.77..)7.)27)))2%2)2%2)))%))2...22.22...22..7)27)2))))22))))2))))2I@iV[[DVRVD[RRDVMVxe@Dii}e}nVneIeIxxRIsnneenVVnVIMRnnVMD[ix}M`x[RDInx[IV[MR[V}}ۿe7777777772777772;;.2DD.7.%2;2.272....227..7.)..))7%)27)22)2%))7))272)).272..2.2..%%..))))272)%)))))gdalautotest-3.1.2/gdrivers/data/LanduseSmall.rpr0000664000175000017500000000173113701057753020554 0ustar eveneven[Ilwis] Description=Representation of land use units Time=991346400 DataReadOnly=no PropertiesReadOnly=no Type=Representation [Table] Domain=LanduseSmall.dom Columns=2 Records=12 Type=TableStore Description=Representation of land use units Time=991346400 DomainInfo=LanduseSmall.dom;Byte;class;12;; [TableStore] Data=LanduseSmall.rp# Col0=Color Type=TableBinary StoreTime=991346400 Col1=Pattern [Col:Color] Description= Domain=Color Time=991346400 DataReadOnly=no PropertiesReadOnly=no Type=ColumnStore Stored=Yes NrDepObjects=0 StoreType=Long DomainInfo=color.dom;Long;color;0;; ReadOnly=No OwnedByTable=Yes [Representation] Domain=LanduseSmall.dom BoundaryColor=0 BoundaryWidth=1 Type=RepresentationClass DomainInfo=LanduseSmall.dom;Byte;class;12;; [Col:Pattern] Description=Pattern Time=991346400 Domain=value.dom DomainInfo=value.dom;Long;value;0;-9999999.9:9999999.9:0.1:offset=0; Range=0:10000:offset=0 ReadOnly=No OwnedByTable=Yes StoreType=Int Stored=Yes Type=ColumnStore gdalautotest-3.1.2/gdrivers/data/test_wms.txt0000664000175000017500000000117413701057753020052 0ustar eveneven 1.1.1 http://onearth.jpl.nasa.gov/wms.cgi? EPSG:4326 image/jpeg modis,global_mosaic -180.0 90.0 180.0 -90.0 2666666 1333333 EPSG:4326 3 gdalautotest-3.1.2/gdrivers/data/complex.h50000664000175000017500000000527413701057753017356 0ustar evenevenHDF   `TREE0HEAPX f16f32f648(r   i   d!ZSNOD x(r  i  d!Z(r ?@4 4i ?@4 4, !Z<<@@BBDDEEFFGGHHHHIIIIJJJJKKKKLL@L@LLLLLMM@M@MMMMMNN@@@@@@AA A A@A@A`A`AAAAAAAAAAAAAAAAABBBBBBBB B B(B(B0B0B8B8B@B@B@@@@"@"@(@(@.@.@2@2@5@5@8@8@;@;@>@>@@@@@B@B@C@C@E@E@F@F@H@H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H{\ЊR.[P˹p!qlEso U yTHp y|H hı)MqL"SVґ3 lˁH"  DlTZ`HP-^64L="e /n ˳UsseΆ)5 B_AXIS_RADIUS = 2575.000000 C_AXIS_RADIUS = 2575.000000 FIRST_STANDARD_PARALLEL = "N/A" SECOND_STANDARD_PARALLEL = "N/A" POSITIVE_LONGITUDE_DIRECTION = WEST CENTER_LATITUDE = 0.000000 CENTER_LONGITUDE = 0.000000 REFERENCE_LATITUDE = 38.827024 REFERENCE_LONGITUDE = 88.872240 LINE_FIRST_PIXEL = 1 LINE_LAST_PIXEL = 26368 SAMPLE_FIRST_PIXEL = 1 SAMPLE_LAST_PIXEL = 4096 MAP_PROJECTION_ROTATION = 90.0 MAP_RESOLUTION = 256.0 MAP_SCALE = 0.17555558 MAXIMUM_LATITUDE = 56.86050186 MINIMUM_LATITUDE = 20.49594608 EASTERNMOST_LONGITUDE = 358.02478394 WESTERNMOST_LONGITUDE = 137.67897415 LINE_PROJECTION_OFFSET = 9471.500 SAMPLE_PROJECTION_OFFSET = 255.500 OBLIQUE_PROJ_POLE_LATITUDE = 48.137545 OBLIQUE_PROJ_POLE_LONGITUDE = 242.787509 OBLIQUE_PROJ_POLE_ROTATION = 159.968008 OBLIQUE_PROJ_X_AXIS_VECTOR = ( 0.01533300, -0.77889143, 0.62697132 ) OBLIQUE_PROJ_Y_AXIS_VECTOR = ( 0.95217404, 0.20275286, 0.22859544 ) OBLIQUE_PROJ_Z_AXIS_VECTOR = ( -0.30517126, 0.59348076, 0.74474901 ) LOOK_DIRECTION = LEFT COORDINATE_SYSTEM_TYPE = "BODY-FIXED ROTATING" COORDINATE_SYSTEM_NAME = "PLANETOGRAPHIC" END_OBJECT = IMAGE_MAP_PROJECTION END_OBJECT = UNCOMPRESSED_FILE END gdalautotest-3.1.2/gdrivers/data/byte_with_xmp.tif0000664000175000017500000000264213701057753021033 0ustar evenevenII*S n   Title Description XMP Test N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/metadata.h50000664000175000017500000006331013701057753017462 0ustar evenevenHDF  f` `TREEHEAP`C` 0 attributevalue H attribute with spaces  P attribute_with_underscores  `&attribute with spaces_and_underscores  = (p êK`SNOD(P`pxph 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces  (t êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces  (x êK`xD P attribute_with_underscoresV` P attribute_with_underscores  `&attribute with spaces_and_underscores  = 0 attributevalue H attribute with spaces  (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces TREE PHEAPp'x0`Pp@` P attribute_with_underscores H attribute with spaces `&attribute with spaces_and_underscores ?@4 4? 0 attributevalue  (êK"`SNOD8 x$(X'P+ P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces  (êK(`D1Dataset with spacesDataset with spaces_and_underscoresDataset_with_underscores@ 6K P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces TREEp3PHEAPp:-0 P attribute_with_underscores H attribute with spaces `&attribute with spaces_and_underscores ?@4 4? 0 attributevalue  (êK4`SNOD27(9P= 6K P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces  ( êK@;`D1Dataset with spacesDataset with spaces_and_underscoresDataset_with_underscores@ 6K P attribute_with_underscores  `&attribute with spaces_and_underscores  = 0 attributevalue H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces TREEGPHEAPp8ND1Dataset with spacesDataset with spaces_and_underscoresDataset_with_underscoresG1Group with spacesGroup with spaces_and_underscoresGroup_with_underscores@B H attribute with spaces `&attribute with spaces_and_underscores ?@4 4? 0 attributevalue  (êK`H`SNODFJ(MPHQ 6K P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces  (êKN`D1Dataset with spacesDataset with spaces_and_underscoresDataset_with_underscores@ 6K P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces TREEYPHEAPp`(THV P attribute_with_underscores H attribute with spaces `&attribute with spaces_and_underscores ?@4 4? 0 attributevalue  (êK[`SNOD Y`](@`Pc 6K P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces  (êKa`D1Dataset with spacesDataset with spaces_and_underscoresDataset_with_underscores@ 6K P attribute_with_underscores  0 attributevalue `&attribute with spaces_and_underscores  = H attribute with spaces   (êK 0 attributevalue P attribute_with_underscores  `&attribute with spaces_and_underscores  = H attribute with spaces gdalautotest-3.1.2/gdrivers/data/byte.tif0000664000175000017500000000134013701057751017104 0ustar evenevenII*k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckS R jN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gdrivers/data/gtsmall_11_int16.jp20000664000175000017500000005344613701057753021057 0ustar eveneven jP ftypjp2 jp2 -jp2hihdrdcolr%asoclbl gml.data asoclbl gml.root-instancexml withheld 0 0 499 99 x y 39.9958333333333 -99.9958333333333 0 0.00833333333333 -0.00833333333333 0 gmljp2://codestream/0 Record Interleaved |uuidK=KCզII*   4 #  mtr@@TXAWGS 84| ? ?YD@jp2cOQ)ddR IYiy\#"궼LLdEҗҗadKakadu-v6.0dKdu-Layer-Info: log_2{Delta-D(MSE)/[2^16*Delta-L(bytes)]}, L(bytes) -57.2, 8.5e+02 -58.0, 1.0e+03 -58.9, 1.3e+03 -59.7, 1.7e+03 -60.2, 2.2e+03 -60.9, 2.9e+03 -61.8, 3.9e+03 -62.2, 5.3e+03 -62.7, 7.4e+03 -63.8, 1.0e+04 -64.3, 1.4e+04 -69.2, 2.0e+04 LXa>   U 5(:3SNNUGo8n{f08w{sA#mԂ|6 _C"=Tم?Fĺc *oFkK D [2c"HlJpZ? rf: pnoxl4wI x 9.в'BLVϦˉH]0T˾1 {l1J-- wlՌYT3K/JAv- *X=V *ڿGLI-R)gR#=FC[uzԿʩ%}XqF?=CWm&w}j*1Q3 Pq vVuj1+8oS봙 K:84Lp6(hDDZq8NpfNtP11 ^)G$Wa!oa =Dpb lnrO\V<2 E?H-nƀ ~ z&{{VJw8^VE_+4{+JeP/^)@%VQ(ByO(w^2)|wh4AFTZ(簃 p\sV]ѮKr>:$FT:r)>oj)—/zGoC:-5nr{&^媭dWSN*EA&H@#1({ok13!'w岲7mY\,vMa!+z݇bZjF z0#a oЎh&)L[|ʁP#3RN@EOϸ;-M[$.z.|M>eOAvpl|/kd&;2ld3:#xDf@+H%xKEq T۝|!@J4q|h+KQ19:-VIy[R`\3{|hLJcI(]>s+(4x A8ڂE&PNⅵ&6q|f~JZ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sw0000664000175000017500000015256213701057753020206 0ustar evenevenWSRr ```̒@@@j@S`@)s"AWwO WA\M:x ̐rP@ƐQQHH%tx%tLApQL##%t/+0%tdFQ 8F%s`%thaHQ##%tI!%t !IhQI͐I(Q2`HI1IPQ1  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZRU@3$5$0(7(5>IDOVHBHDVWLQJ@3$5$0(7(5>IDOVHBQRUWKLQJ@81,7>0HWHU@@Vt         VtVt\ta~gƃcDŽdpʄfbʇekʈhiˉmp̊ngΉpjЍqsғyeҘ-֜.٥0ت.ث.٧uפdڬdڬtة/بm٥g؟sؠg؝l۠eۡeڝrۘ.ۘ|mܖy.ܖ}rٕjڗܗwۙݝXܙyݗyܖxەyߕtݘtޜuߟdߢdݤtߧ/ߨmޮg߮sప.న^߯ZާUޮT߲RⶮR㷰PᶭQ㹱P⻳(ⶱ亰丰亸⻲弳@㼴(㾲mⷰlඨ_ᵫ6ⲧ1߱p㲨mᮤ߲hݬߥߤhઙএ9ߤ@ߢ$$ߜkޚipߛ~gߛjߙsݚe-ߜ.0ߜ.ݚ.ܙ}uݚdݚdݘtܙ/ݘmݙgݘsۚsܝaޜlܚ1ژxٕ.ڗ~nܖ}xڗ|ٔ|ٔzؔz֒|גyבzՒwZZ]‚_ÂałcDŽcDŽf8ˆgpʈib͋kkΌni΋rpЎugӓzj՜sסeئ-ح.ث0٨.٪.٭uڪdکd٨tڨ/٤m٣gڠsܟt۟sۛ.ۘnۖ{۔}ܖ}ۖ~ږ}ܖ{ۙ}ܙݗ|ݘ}`ݖ}ݗޘޛݟߠ॒ݥߩެ(߱oᲨdᶮnᷯa⵭sⳫj߲gബS⵭ᵬᴬ⵬ᵪᷯ8ᷮAⷯ⸲ ⸯ 亳k仲i㾲mⷰlඨ_ᵫ6ⲧ1߱p㲨mᮤ߲hݬߥߤhઙএ9ߤ@ߢ$$ߜkޚipߛ~gߛjߙsݚe-ߜ.0ߜ.ݚ.ܙ}uݚdݚdݘtܙ/ݘmݙgݘsۚsܝaޜlܚ1ژxٕ.ڗ~nܖ}xڗ|ٔ|ٔzؔz֒|גyבzՒw‚_e‚_e‚^-ą\.ƅ_0Džc.Ȇd.Ʌguʆedˈhd͉ht͊i/ЌmmӏusԖ~gנlؤe٫eٰrج.ڮa۲ڭ٨۫ګܫۦ ڠ۟ܡ۟(ܝoۛdۗnܙaۘsܗ|bݕ{pܗݚޘݚޝߠߠ9ߡAߥߧ$ߪ$ઞkޭi߰p೫gතj⺯s⺱eỵ-⹱.⺲0ᷯ.⸭.⹮uᴪd೧d಩tᲨ/౦m߱g೩sᴪg㴪l㶮eᵭe⵪r⵫.ᯠm೩s஡eި-Ⱕ.᭡0߫.ᯢ.ᮣu⬟dߧdߠtࡊ/ࠈmgsgleerߜ.pߜߜޚݙߚXޚޙݚޙ(ޘoݙdܛnݜaݚsܘrۗsۗtڗ~vە~ۖ} ڕ} ڕ|kؕ{iה{pדzgגxjגwsƃ`ƃ`Ń`ņbDžcɇc0Ɇg(̇fx͇hm͊il΋j.ЋkiэlҐoӒu՗X֟ا٬ڮ,۰pٰܱݳPܱܲۨۦ)ڤۢ۠kݜiܜpݝgݚjݚsߘ|eݘ~-ޚ~.ޛ0ߜ.ޚ.ߛudߢdߣtߥ/ߩmଝg߮s౧e൯aතp෭eḭmḬfⷮUᷮSⸯR⹯P⹯ḯᶬ᳨ୟୣᱥದᴩp⵬b㷮k౪iణp௤gᱧjᲨsᲦeᮢ-ਜ਼.⮢0⯡⮠᪛᭜Ⲧ᫝ࠊࠊ⡋ជច᠋⠈⟅p✈bᜆkiᜅpᜃgjsᙂeߙ-ᛂ.0..ߙuߛdߚdߚtޙ/ݙ~mݗgܘ~sݗ~fܗ~eܘ}.ۙnݛuښyڛyڛژ~ٕٓxؒxƆ`gƆ`gƇasȆdsɈbaʊcảeůgc͋ii΋lfЋlpюnmҎsԓv֕z՜ץ٩کڭh۱ܲpܳbڴiܳpܱg۪jܨsܣeܞ-ݘ.ݙ~0ܜ.ݛ.ݜuޝdޚdޚtޞ/ߠmޟgޝsgऑlަeߩeଟr૚_᭢r௢y߱r߮sᰣಣఢᰤᲦದ೧൧೩೦௢᳥Ყ ತ᳤᳤ᳩ⳩YⶩᶫI㷯t㷯t௢kᱥiⶪpᳩg䵫j⵫s䵪e⭡-㴨.ᰡdᯣd᫞t⫝/᧒m᧑gਖs⦔g⧑l⣌e᠊e᠈rᢏ_⣍rឆypᝁmែឃᝅᜅpᝄDߜ ߚ ߛkߛ~iߚpޚgޙjݙsݙeݙ-ݛ.ݜ0ݞ.ܚ.ܙuڙd٘dژtڙ/ؕ}mȇbdȇbdLjctȊc/̉gmˋhgˌgsΌi΍jύkύpҏsՒv֘֞أب٫ڱ۲ܴܴܵ޶@ܶܳpܰbܭkܡpݝgޛjޚsݚeޜ-ޞ.ߞ0ࠆ.ߢ.ोu॑dߤdएtߩ/ߪm߭g߭sୟs௣aᰢaᲦu౥c߬i᭝f߫g߫a߬.ᰝn௡R஠PᯠOᯢPᰣPⱢOᲢN᳨MⶫJ亯JᵧJ㸭K亱I⴪I㷪I彴F伲D㵪D㳦C⴪CᴦC⺮D䶩D潴l滲l䷪l⵨l䳧nᰣnⲤu㮝d᧗d੘t᫝/᪘mᦕg⩙s⪙RᨗAᩗMᦏ{ࢌy⡊z⡊{⢍y៊x❅xᜃᛁ`ᛁᜀߝ ߜ ޜkݜiݜpݝgޚ}jݚsݚeݚ-ݞ.ݡ0ۡ.۟.ܜuۙdȋcfȋcfɉfeˍb2̍fp͍hmύiЏhяlӑrՖy֙לؠ٦٫ڭ۰`۴(ݹxݺmܸlݺ.޻i޹0޷޷ݳܬݨ ޥ ݟkޠi࣏g॓jߧs৏eި-ު.ߪ0૘.ଙ.௟uᱤdೢd߮tଢ଼/௢mఝgᰞsఝeᰟa௛pߪeਔm᧒fଗQ૚Q୛P୛NᮞᰣⲢⳤ丫㻱㻰(乮(o念d澶n仳a㺰süpùm弳D彴P㺯廱弳P中㳦9ᱣAⱡ㳦 Ⲧ 䳦k㳤iⴤp㱣(Ⱔe㰥p㲦.㲥n⯞v⭝z⫚z᪘y⬖y⪕⦎$⢉$⠊➈ឆ➂➄pᢇbᣋk⥏i॑pߣgjsߝe-ߝ.ݟ0ߣ.ߨ.ߪuݪdުdݧtݤ/۟mۙgܚ}sʌd.ʌd.ʋfňg΍iЏjяmғp җu ՚~kסiإp٦gبj٪sڭeܱ-ݷ.ݹ0ݹ.ݸ.޺uັdݷd޶t߹/߻m߶g޲sݬsݧaިlޫ1߫1૘pଘmଚଘଛ௞ᱡ౟Xౠᱡⲡ߰߱ᱥఢଜLᯞᮠAଢ଼ᮜᬛkଛiઘp᭛g᭟jᴩs⳦e㴥-⶧.ᴧ0㸬.弱.弰u㺮d伮d乪t彲/⺮m彲güs佲g弳l廳eºer㸫_ⲣr⮟yⰝj⭘g㮜䶧个䶦湫漯庫乬䷭e⴦-㴦.㴦0䴨.⳧.ⱡu⮛d⪘d⩚t⫛/⪕m⦏g⧑s㩔gᮙlᱢeᬝe૙r৐.ࡇn᠃dៅdऌe੔ଢ଼ఢౠݯޫޤݢ(ݟmܜlۙ_ژ{x̏ȅȅgΏg(ϐiђmpҔsb֚wkםi֠pةgڭjٮs۲eڲ-ڳ.ڱ0۲.ܴ.ܴuܷdݹd޸t߶/ݷm޸g߷s޵g߲lޮe௝eఠr߰.ఞp߮.߮uଡ଼.ᯜm௟௛d߯a߭cச`߬\୘[ᰞ[Ⲡ[ᲟYⰟZᱡXᲠUᱠRᯞOᱟSⱢPⲤNᱣO⵨M㷪JⵥKⷨI⵨I㴧F乭H仯F潰F彲GⷨH徱J·濴t徲tļGCĺBCC估D㹬B䶤@㳤)Ⱡ(䳡+䳨.巪/廪1丫5亭;溬H㸫J漪_绬U溭[湫g庭j㷪i㷮p个g㶫j㷩s䷦e嵩-㴦.ⱞ0䱟.Ⲣ.᭞u⭙d㯜d⫓t⤉/⥈m᥉gᤉsᨑbᩎd૗g߭h߬cߪ`ަ_ߢ[ߞ`ݞjݝ~ޛ|ܙܚ|͑gs͑gsϑhrѐnrҒpԘtԞz֣֝רڬڱڲ۵ܵ۴٭ۮܱۯܱ޴޶޹޶޶ߵޱ޲޲߲߲߳ೡ౟ᯟౠⱠᰠi߯_ଢ଼b᭜^௛\⯚[⮛ZᮛYⱟXⱠYᲣUᲡTⲡS⳥RⶦQⵥO㶪QⶪP㵧L丫K㹪K㶧H丫E㸩G庭E庬F个G漰GFĹG¸E¹DùFFAżC忳D彰B弮A潳?徲?䷩A帨3漬.幫+幫*个+乫-庩*庪)廰*彰,濴1濵025ߟ~:ߝ;ߝ<ߝ~Eޝ}Mݝ~^ݛ~jݛ}rΒl\Βl\ϒliғmsӕtuכz}֡ףةٮڰڱڲܴڲۯڮܯܲܭްݳ߶ߵߵට߷ߴಣഢ߲ഞಡᲡᲠⱣᲡⰞl⯝`ᱚaᯝ]ᯝ]ⱝZⱞZⳟ]᳥WⵦT㸧W㺫W⸫T个R㸧R㹭Q乪S享Q㺫M乩K漭J弯H仰G们G庬K滯J丬IHD濳DƽCĹC÷CƽIùF¹C彲A潳@?Ļ?徱C溩A漰A辱,罰)濱'¶+¹)¸+翳.翵-...濵1徯2享0㷦.䳟-䯙/䮖0䯚1䮗2㭐3㫐`䨌b䦆b䥈b䤉c䥆f䤄d壇c変c䦇_⦅X⦆O⤃JᤅJᣆC⡄=⠄:ᡂ=ᡂ;᠁<ߡ>ߠ>ݡ~=ޟ=ޞ@ޝEޜQҒo<Ғo<ғnBїoPԗse֜ypף}ר׬ڱٴڲ۵۴۱ڭܯܯܯݰ޳޵߶޵߷Ṫศ߶ⶩᶥഢಞᱠⲡ᳣᳠Ⲣ`ⲟ\ⱟ`ⲡ`ⶤ^ⶦ^⶧^⸨]乪Y㼮Z俲Z忳U濳V俳XY濳T潰S徴V佱V亩R忳OLI·I濳LùLIJƿHƽEżEĹEŸEƾDûEĽGƿFƽCµ@=徱?滫@辱=忱=,ù)ż'ĺ*ľ)Ƽ.ķ00澲,廬-帥.嶤.䳠-䰙1存1氚.岜3宗0䭑2媎1䪌/婊4橌.媊/始B䨈K姈N妉Q䧇N㧆I㦇C㥇?㤅:䤂;㣄:⣈;㣅;⢃:⣁=ᣃ>ᣁ:ࢁ;ߠ=ߢ=ߠ=ݠ=ޟ=ޞ9җo>җo>ӗp@՛w=֠>פOשhٯzڴ۶۸۹ܹܷܷܺܺܵ޶޸޹ߺ߹ະ⻲㽴㾴⽲㻱㻭ẪḭṬ仪乬㸨h亨_㹪b㸪`㹬`仮]徰^侳^[¸_ý`Ƽ]ǽ[ǾZWƿYƾZżWĺVùU¸SúSO澯M彲LMN濱IĹGƾDĹBGĸEDEDöDFA潬?<¹=¶>¹<Ĺ8ĺ*ż)ü*÷.)濱(澯*廪(左(嵢)峠/峟+寙.孑-欑1子1䫑2䫌,媊*媋-檋/穌-櫉,檋+橌-橋/樋6䨉4娇1䨇4䧆8䧇8㧇:㧆8夆7奆7㤇9⦄8㤂7㣅8⣅9⣂:ᣄ:ࢃ:ޢ=ߢ=ߠ<ޠ=՞v@՞v@՜xK֞{H֤AקBجCڳg۷xۺ}ܺݾ߿µ߼޼߽߻߽ἱºĻúûúùøúú·vc念]濳Z忶XZWU¹WŻUƽWȾWSNQNMNNƻNźJĸHĹF·EE¸C¸DĹCżA翳@?=翱=µ<Ǻ>ż>A=潮B;ĺ8Ƽ:Ǿ<ǿ;ȿ;9ƾ7Ƽ%¹)),漬(带)䷡+嵞#岖+氓+殓,䬑,欌-䬌/孊.櫋2櫊.嬊/櫌*櫋(櫌0䬌.媌1竊.嫍.䬊+櫊2嫊4䫉.㬉.橇4㩆5㩈6⨉5㧉7㧈7⧇8⦅;⧅6⥇6⤇8⤆9⤄9ᣄ<ࢄ;ޣ?ޢ=ݡ;ՠz9ՠz9գ}=֥Aצ@ج=ڱ>ڳDڵm۹sܺzݾ¸ùĸ´߾⽳ῳ·ùĹźƽƼƽƼŽƽƺļ}ĹvĺsùvĹtĹtùqĸpżqƾnƼmŻnƺnǿlɿmlkklƽkƼlŽlǿkȾmlklǻnõn濮mo¶qöoon迯p濰p濰pn÷sĹnźjźjŷiĶj´j濲h翰#溩(緣$淠(峝$寖%寓*歐殍$宍 孍歍)箍&歎$嬎%歌*笌*欎(欌#筌$讌.孍-孌1箌-孌-毈,歍2䭌5䮊;㬌;嫋>嬋?䬊9䪈0㩊/䩊4㩇2㧇8⩇5㨆8ᧆ=⥇<ृ5ޤ8ᦄ9㧇8婇:橆4إ|إ|ץשl٪qۯqٰuڱx۴۵۹ܼ߾öķ¶ῲµ·øùĸĹĺŻƺŹ¹÷÷¶¸¹ķĹùŹĺļźźĻƺƹƻǾȽȼƻȾƞƛșÙǽŽĹƺźƽǼ~±罪缫~Ĺzöurp翯l潫l缧k湤h淣g浟=岛<泗=簕?篕>气>毓F毓N殓F篑K殒K篐L筒U筒Z殒\箏`篎h箍m宏o箏o殎w歐v殐w毋}母|孏毎殍完孍孌孌䮍䮌䮋䭑㪊B䪊N㪋N㪊M⪊PੋU汌S鲎X㩇^آ|\̚taq[eףzףzإ}ڨ٫ڮڰڰڲܴݷܹ޺޺ຬὫྮ཭໪໮ᾰᾰ㿱´¶ö÷¸¶µ·¶·¶¶÷·øùŸŸźƻƺƻǻɽ˜ȿƻ³öĺżĸóŸz³isŷo³mi转id缪b约]纣[淡[淡X嶡Y渟W湥X淢T䴛S汕籔沘氕簓簒谒豐簑篒篓篓汓籑簓氒籑籓汑篒氒氒篑篑寑氏篑篑篑篐毐殒小䰒導䯏㮊᫉⬎᭏갓đstW\GjN@_G;W>7٣u٣u٣vڦ{ڨڨڧ~ܦ}ݧܱܰݱܰޯ߲߮߯೛ߴട⶞㷠⹢⺦⽭㿰²µøĸĸĸĹŸĹúĹĺŻƹƼǽǻɽåĞȼƸ¶õķ羮羬辩~xyt³rm羫l羨f缥k締g続`級a洙[糗W紗]洚Y浚T沗R峕P泔豔粒沒簓籓籒粒籒粒屔貓汗粕鳔籗沖粕籖籕粕沕糒沔泓泒粒粓气籑汐氏屎尐䭏ᫍ對췓ҝ}\EV9-]<2R8/P7.T<4ZC;YC9٤z٤z٦x٦yۥ{ڦ|ۧ|ަ~ݨ~ި}ިߪߪޫઈᬇ஋⮎⮍⯏Ⱁⱘⵠ⹦们修濱·ùĹĻƼǿȿʾȾȼƹƹƺǼðūʩƤěƻö²龬}辩s缨q齧t翫r迬lkh辩b輦b绥`繢Y蹢^踠Z趞Z緛T絜T絜I継K継J絚H糘F糖F贔B贓豔籕糓糖賗賘賙賖純紓洓賖糕賕糖嵓紕糖泖洓贓洔崔泔泓糓貔糑岑汒籑岏䯎貓᫋u^fC6T:1Y;1S7.S6*T5,U;0U>5T=4٥{٥{ڥ|ۧ{ۦ~ݧ|ݨ~ݨݪݪޫޫ߬ஊᮌୈ௉⯌㰔ᵝ⻨忰·Žɾʿķɴͭͣ͒͟Lj†ɾȽ~ƹ}ķlòlffm迬g]b迫\缤\滣_湢S繡O蹡L躡P縡T鸞Q蹠I鹞G鸟C鷝B跛B跙A趚F渖C浚<糛>紗>贕賘紖跜縠継絗趗贗贖絓絓泖贔赔賗贗綔赕贕紓浒浒糕賓糓洓純洒泓屓Ⲑ絔ڨbwQ>Y=2Z=5Z>2W=4V:/U9.T:1S;0R;2Q:4ڧ}ڧ}ڧ|ۨ|ܩܪ}ݪݪݫޫ߬߮ை்ⱐ᳕ᶞἧ伩ŸɽʾDzαѯѫУϗ͙ɖ„À{ɿvƻmǻkƺdŸgõdeV迨^缦X軣U軣V蹢J躞U蹟V踝N鸝T踜S긜G蹛D趜H鶜I緝H踛I線C縝A縠=緞<踘:綜淘趙跛跜趛鷖跙緗趕}綔赘綖綔鵖贖贘贖鴖緓絕紕淔赕綖巖緖涗䵕䴔꺛᱑dnI:\?4\A8[?6W>3W`E;eJ@{fJ@ycG>Z=3W;1oV;3fS9/S9.|T:,P8,N6-O81P7.N7/N80M6.۳۳۳ڴڷڸ۹޹ݼݽ߼߽߽Ύ⿭㿫㼢仞彟弟濣±ŷǷǺǻõƺɽŸǹŶʼȹǹŷĵŴĵĵ𱯱®|s龤o齠u뼝r꼞}點x麛_輙d麜h麚b黗g麛Y깜c軘g躛W蹜R껙[꺚V麛R鼛\껞P龢J龤D꾧C꾣꼞꼜껚鼛|鼛x齙鼚鼛~鼚꼚黜n麜o꼚|鼛鼙黚黛軛軛軚湘꽜£ۯjqwZEbF;`E9eJ>eH>bF9`E;W=2S7,{T;/wV;2vR:/Q8/P5,P6+M4+L5.L5/M7.M6,K6.ٸٸٸ۶ٸڹ۸ݸ߼޻޹༩⿫¯¬㿥㽢侥徤ðƳįijƶƸǻǻȻǺƺɼɾöʾǺǷǷŶijIJ±®êííĴñ§«ë}鿞|꾠|꿝~꽞v꽚u鼚z鼚y轚q黜g껜l꽜l꼚g꼙a鼚f鼜i뽜f龞a齟c꾞g꾡e龣d龡d꾡^뿜[齝齝꾝齞꾛龚꽝뼞}齝꼞꼜~鼝껟꽝꼝辛輝輝齝軛潜ƣᵕ~hqTE`E9cH>gK@fH9`B5`B7`C9X>5S9/U81U;1W=2R8-R7+P6,N4-L4*M3)M4+M5)M6,K4+ڶڶڶ۷ڸ۹ܺܺ޸޹Ʈؽҵ׷ìưƸɽȾ˾ͻĭƱɭɬɲʶԷԲ¦báīª¨©¨©îí©¥뿢뿡zp꾟e违{龜꽝q꽜o鿝n龜j꽝z뽞n꿜g龞m꾞]뽞`꿝b뾞Z뾟UW꿡I뿠ET뾞a쿝L쾞뾟{齠w뾝뿞뾟꿟鿟~뽠꽟w꾟p连w꽠龠x鿞l龟|迟漝¤Ü|[G`GbF:_C9^B7_B5Y=4U90T92rS91pT:0xT=6pR:3tP7.`Q7-hO7,L6*M6,L6,L6.M7.K60ڹڹڹڻغںۻܼݻí©jmWgSfRx`ÙŮǶ³ɹʶԷŨlnVmVşw]kuƣh^I]GlV*nT=nVim㺛羠꾣羝辜龞鿝鿠v}뿢nu꿟o꿟e뿟kkX꿞cv꿞U뿟NY꿢g꿠i뿟^꿠[Y쿟H뿠HKEMa^vz}y~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8Y>2U=4U<2T:2wS;5yR;2Q8-O71Q82P9/L6.K4+K4,H0*E-'G1&E/(F2,G3*G4-F2,|G5/sE3+wD0+rF70xF3,A.(C1+D40B50A3,?1+?1,,0,,0,)+&'%$++()'#+)'.,+-)).+).,(.-+1/+21,0/-.-+-/+/.+02.12.210341553@:6EA:B<6KA9 C<7 ?;8 :74 ;63:75&;88;98:62"=84'>:6,:61";73&=842=64?=72F=30d=5.|942r<63rB94yPC;eNB|pVH}^NbNcOcObOcIdMeOdNfRfQfSkəyvgzetglnWq`nfk_lKfAgUŽqmmcl{k}čmzx^|lN@{`F=~aE=]@7]E9wZB:Z@7]C8W=4}T;3W>5W<3{T:2|R90zR:0zQ:0Q:.S?6Q=3M7/K3)J6/H1(G1(G1'K7+J61I74H62wD0(oD0(iC0'\C0&\C0)mI92F71C2*A0*@20?1*?4-C83A3.,**,**)'%''#**&)&".-*0/-0,*,)(-*(.,*.,*-)(1/,13/.+*31/0-+2111/,/.*431.-,/.,/,+k41/=210430 10-401 854 842 :5083071,73.96384.71/832,9636:30?:51@:522=74&=42<1+*=62A>95K@<8s=84m>70iO?9nhPGz[QaPcRcNdOdPeQfQeQgQiTiX|bc~cacbdd{`mUkVlZwmXvr[otYv~d}lTz`F:v\E9v`F^G=^G;]D:Y>2ZA4ZB8U?4{VA8yXE>YE9Tp^H:{[D8~_G>y`ME]H>[F<}ZE;WC8YJ>rZGVG>UD9SB8xSB:sO<2yM90zL81}M;4~N=7yI7.sH4+wG3-~D0)~B.&G2*E1*D0(~E4,D7/D81}F<4|A3.?1(3+{<1*|%q%q)'#{))'v,*(x(&#s)'%{+)%s#s+%%x+&#s,)$t,,+w-+(v/,(y.+)o20.j.+'y/*'*$!(#!0-.T.-,1-+K.*'+.+'3+)%T23/42/.,- .)( 22- 1+'831!0+(0/(&+40-2+,88652.821=;7<;65.(853963"862':7604.*493.8=;69AABD@?=9=948>?;ED;8WmTGRsWK`z[Lb]PVbPXcOWeRSgSRfSahPdlUjiTriV{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n_OLh_MIndTreV\XOMPE``[Li_OmbUzjWzjW}oZhznY_vlXUvjVRwgROmXKvbGynt|ozn{oxm{qbyo`te{hrHvro{n|mzkwkqdƈvjɈxb͇weɁufyl^}pb|ra~qd~oaviugsfrhte{ixh{j|hlziucvhLteCvf;|o?@KFIZdh{|rwrwy| llآ讳䪭륧헙ԕ蒔ꗔ蒏z{ztuolibWYP`[Qf\N_WIKI?AC6UN@`VIvfTvfTwiUpeSsfVyjVxcJxbLo\Mp_R{hZ~payoftetf}qeuesdtrfZevh[_vmV~pTwfNxm]Jsk_Gynczn`}la~obsgZwk\~ra~qfvkymHug~ocl^rc}paI|mapgqamrc~nc{nh|oixh^vfnxeuh~titm`~se{qarl[wmb|pcn,o`psuuvp`~nr{kzkwj~xkge=C? #    $#,0<69F?HU@KV27=&$,*,4AALKMXsy@ms7ir1nr~1./,`8  llËwzzvwtrfTrfTlaQ`seTviUjcSg`OkaQtiY qeWlwgXlylZ}|o`tbˀp\}m[xhVyk[z~oawk\tgY}oc}pd|sc~rdwi~rgzqfxiwf{lꒃr|lxiczl]^yiZUaTNRZQTOe^bJjciHfah`W]bYaWT` 65A;6?NKSWOSqd^{n^ vl\Hxobsm^{pbsk^sl^Ixocsl`tn]Wwn^Yvl`pzkÊ|kxmTyoI}ukDaXOHk.1:I34;V56@:AM//7#I" '  X a \ \ \  X Y((.    #%+I*)3E&%.;&%+7..39>>D83083,).432:10<45?,:;F 48G48IW_nOXi[fyPXi IQ`S^q\g|GRdan~bjSXjEL\MUaEV_qR`hzDdm}J`hzJwmZwmZxnY`vlVznZyoZujZ}paxdtcvdvdEwn]G|o_FsbIxfFykGwfEvm^Fufc6:0ZQ.'-5,0.'*! %('(.-4I&&,;)'-6p_\0_\R. 3@:@0MPV+119/55;`54;8**0 &+(-C@J?=F D@G44< !!*WLM|pf{p{~ ~lzlvxhf_13:PQY~}vzu`lvyPZ`# GF        H    I   T [ X  X Y XTSn&$(g-+1"$'!&(./08U9=E/24F>>=D=>AIDADDWKGIq[PW`UKUU %!'"$!!&&$+(&*$"',(.96=88?JFKC[Xc`UVa "&    l     a  ^  \ S R  N L  K  F        H ''."I  SXYYVWSY!")h !(kk ()*438AEISCES27D5?C9ECOed\SoQ}q~tst{n\WN  >89+ 0 2 . /  ( 8   }  } z t r s    c ] W P QN H GD  !  H*+0%&* &I $(,5T+0:X6/74'.+#"(%! `          B  G CE  F E  C C 0 5 1  0 , - 8   #   l lvz  z  x  r  g  j o q        \lf`glf`glgZmjeWmcbWfc[cbVcaXhe[je\ng]jcWe^QZVJYQH[RFbWOC\_SIWrf^TzpjN}qjI}xsGxtrGvqnD{tnCxrmzso{wq{vmvrloli{un$wmytkwql}toH|uxvkZa\W^[U^[I]d`djehnfQfkcXejdVageS_dcQ_e^NedbNpkjSwrmP~zu^yzuczywh~||}}xyyxxvu|urrlk\ZYIHE@=:544 2 1  ,  $         R        8 < 6 1 33/- ( .` 8     $        l  l  r  z  x w gXXbXXbba\`hgZbcZabYcd\fdZff^ fe[lfd\lif]odb\vje\vsj_rph_ftl`eph\emcVkqe[nia[psjcvngvmi|ulxrlztmsrozwr{zt~ydwwr]zuq[|uU|wpPtqmMxupIzvoFvwqGdofBkqmBuwqqvmntlqts tuplsjlri%rrmprkikh omhHxrm|uk|un|wqzvoI~wpupkhcaQb]\Vb\VVOIHSD>;K=50K:2.L/("TQSf c p *14 E  @< 8  8  3 2  3  1  2  @ G C A  E E @ F  DLSQ     8 9  5  3  3  -  ,  , , +   8    %Z]i3Z]i3UZ\0LOK1TWU*[]X*_]X,fb[*lh]-jh]jf_8ie\khapkbuldsne&rmfrngtqjytlwtkppkrqjvumppj opjlvvol|yvr{ytvxs{{qhovndvwpc~ydz`{j{rzzqxvv{wx}zv~wy}w|~xzzwoumamqm\tsoYzyrRxyrNqslKtroHvtnHurjGzqCxq@}tj|pglfZ]VL`TKDRHAQG>&E=7@94<64`622H "*)/3I 5BFOgqUoXepqSP JJ J O  S  ddd        %         C G G  C  @ >  B I E  D  O L Z      5  7UXeBUXeBMRYF89;FKCFG]QTOdXYMjb`Qje`oj`pnh҄s~~}kic:uoi8ztj4yqk.ytp/zun0{s'{xq.|v,w,{{t,~zv |y8}{u{{w}{w|zx'{~yz~{~yv{st{ux~yw}{ xxl{|l{}Uqv|uumtndhmlcqrpdqrn_zwr>}qE{umr}wowsjojesmftnhtla{ocwh]peXjaTbaXOZZSIUNHCRTOQP=::HF &&G(-/F"$#B"! A"$;BIBP[q|snw'  H  I I X U K B @8 7  6  0 64  1  0  ,    &         D  E  C  A @SOXSOX[]e`a^Z\UKaVQe]Wlf\pjaSNMPIR{u>Cb^bCihfGF9BA]6==]275W(-.Q#('M"GIC F ?A("!##" AV_be     F ? =;9  0  2 5  3  5  4  ,`  '\`a:\`a:\ch7_`]1idY7icZ0ng\7a]S1:;;7%'*HBK,]YZGBLkaduph(ytq|u|tzuzw|yz~|yzyrz~~|.}}y7}}z@yyvB}|{B<}9}}-}}2{~{>mlpF~LLU~nz~xqx|umvwu^uvq7rsq8psp3uts0uvt/ntq(run4vur'{xt1}u*v3t|u8xwnwtnvtoyzvy)z~~wvyr`ywr|zuinlWb_P]YM]X M\UlKYWlI[X1P`]-KZZ2JWREDPOQ>HE?=GB;?IE=;EA9086e#*'`^YVS O(&J -*E    I1;KMJ  E  = 3 7 G  X a  d  j x  @ Ccjf8cjf8X]^:ic[6gaV4\TRN\TRcEA@d79;f;=>325SLRVUV~KILF_XXEogg>zvpA}t@{v9|v6z7x1~|:|-~~w2z{u{{~~z,{|x}|x~}w}{)y{xyvvutqvurvvr:67rrwy}+svw+akg0gmj:kpn=jrm8fpj8dnj6irn4rvq2yxqBrvpOosoMwwtQ}zwv}}rnwl}xc~}u:}{>28721qxv3jvs'aok6[nh(]pn-evo`so8WnkWnkVkhRecM``*KZXGTRDRQCSSETQETQBML;EC2<8 )2.l"('l"..1/4878:=>#!%$*'"    ) H     I   / /  1  A D263263?>=`^TLHRIEPJFSNLYSQXSQIKHGDABLLM,WWT+fec/rnk.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!I5/G4,G3*H3+H4/F3/F2+D0(C3-D2.C1+B2-@0,A4.A73=2-8*%7)"WhJ99gK9IS?3DP<1JB2)[>1)A:-)YE4-_A4,rD4-tC4+q[E5mL:2pM<0i@7-lOD7X81,Fr^IDaPEJ=94XhXGTG=B?6:p]KHC;c]Pj]Nokinxfm|EDK[:AMI13>S [ f  7 =  <  ; N10,+^XOeIEA]"&%/  "$%'(*+-.0235689;<>@ACDFGIJLMOQRTUWXZ[]_____ _ _ _____________!_"_$_&_'_)_*_,_._/_1_2_4_6_7_9_:_<_=_?_A_B_D_E_G`I`J`L`M`O`Q`R`T`U`W`Y`Z`\`]`_```b`d`e`g`h`j`l`m`o`p`r`t`u`w`x`z`{`}```_^\[YWVTSQPNMKIHFECB@?=<:875421/.,*)'&$#!  ~|zywvtrqonlkigfdca_^\[YWVTSQONLKIHFDCA@><;9864310.-+)(&%#!    gdalautotest-3.1.2/gdrivers/data/50000_50000_uint16.gpkg.zip0000664000175000017500000011354613701057753021524 0ustar evenevenPKcSN6iD(50000_50000_uint16.gpkgUT Xl\Xl\ux  `e7M@S/$mҖK3i*.Nɛd!3iZ" ."]w=,"UZepݕUĢDT,"ɜIfҤdygμ3UNi{v1W MK C/DDȟۚYnrE%$7?O'ѿxLy5ly5\^=K^̐WcdteVʫ3/WSJ@ǍWc +-zWp,TMٰ(pm3]62n=ݦ/np8vixLl3^2px=gVu;g6债wrӻb0 _p^Ϝں95uuΛpY/HS:t"]Vl8[ndss%և>W._ts$3KPTU/-=B^^OQ?dYM5IӫD\PB^(@*9!/EP NVXJfu/o\ece!/EhU^`׏|@h/wi‸\;j*]@NOw7mיkf伂ٳB=cז[`M974.mm4Z.[h$\cwFkG[5kφUu-Ml4V6n,5[ /\aUhʥֲ m[BAS cy\}7,oj6imr!vaMS6vv {.ost=qWM#M8n;̊5 W/,ov;=mk7Vmnmo%oulζ>ꆵkַ,7-µ-MVGaFKㅍ-kׇVw]n뛮^T_wNͼzK| ׵ݫuht#[aaD*5fK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o?uսww#Gx750w[mݒ>+y1Nu.1(kY|] 50g~ջ{W<*kp֨Yɹ%bkiֹ2~f w]~@)7(8?Qܞ3eujx{߆+wv޾Sg%_FJnҤڷgרxnT}Ut( h?{{ߌ6;5jثs>r{%mܡ=zuNҽw^}{t/y&{Hܾɽz>.ݓ{w{һsqoqSK֩c.y9rDw6bt4ֈ#G'_=fv&{|9Q}<&79M{WE'^ݍu˺o9r쬱Y 򾌠R.g'ߧzN%+r%;S;ɩ{sk3"KBǗM@{i ?CUUa[w 6ܯgxQёcFqwA_w5wzH~q8rs2 5(yQ{>؈R?~j ;qqs+#ejTڀg|ޞ|駝vZ0?>Ba[w(}"zڨ}b[kH792{R xuOx5s,pxޭ=޻~JJL]b@=*StrK>x9m)wӓMw7SnJ{N5QV_K^h{oM)co-Wρ;Cd V"x㒰C͎r9t{5r\_ tyW އ[[,y,;/,5E]'.~n>1 {~:`p4:f#5>'¡ch*s>!3}ZԒo=_? ~rH Um yBiFg0M=Lt9L~PKcSN6iD(50000_50000_uint16.gpkgUTXl\ux PK]gdalautotest-3.1.2/gdrivers/data/8bit_pal.cot0000664000175000017500000002562013701057753017657 0ustar eveneven ????  !!!!""""####$$$$%%%%&&&&''''(((())))****++++,,,,----....////0000111122223333444455556666777788889999::::;;;;<<<<====>>>>????@@@@AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHHIIIIJJJJKKKKLLLLMMMMNNNNOOOOPPPPQQQQRRRRSSSSTTTTUUUUVVVVWWWWXXXXYYYYZZZZ[[[[\\\\]]]]^^^^____````aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnooooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz{{{{||||}}}}~~~~skkkkksck΄k{{k{k{{cs{Jsc{csZcsZcckcck{kkkscscckssZ{skZkskZc{sss{{sck{ccsccs{c{c{{k{ckksskck{{{k{{ssZkkkkkc{s{c{kcs{{k{{{kccs{kksks{{k{{ss{s{{csc{ssk{s{{kssksc{cckŭc{sc{{ss{ksc{sksss{{{kk{{{s{s{s{ksksss{sks{kssksksk{ssk{{c{ck{skkk{sgdalautotest-3.1.2/gdrivers/data/cf_geog.nc0000664000175000017500000000423413701057753017357 0ustar evenevenCDF lonlat CDIGClimate Data Interface version 1.5.2 (http://code.zmaw.de/projects/cdi) ConventionsCF-1.0historyTue Oct 25 00:14:05 2011: ncatted -a missing_value,Total_cloud_cover,a,f,nan cf_geog.nc Tue Oct 25 00:13:55 2011: ncatted -a missing_value,Total_cloud_cover,d,, cf_geog.nc Mon Oct 24 21:59:24 2011: cdo -f nc copy cf_geog.nc cf_geog.nc.okCDOHClimate Data Operators version 1.5.2 (http://code.zmaw.de/projects/cdo) lon  standard_name longitude long_name longitudeunits degrees_eastaxisXpllat  standard_namelatitude long_namelatitudeunits degrees_northaxisYXTotal_cloud_cover long_name%Total_cloud_cover @ entire_atmosphereunitspercentGRIB_param_disciplineMeteorological_productsGRIB_param_categoryCloudGRIB_param_nameTotal_cloud_cover GRIB_param_idGRIB_product_definition_type,Analysis/forecast at horizontal level/layerGRIB_level_typeGRIB_VectorComponentFlag gridRelative missing_valueh4?@@@@@@@ @"@$@&@(@*?@@@@@@@ @"@$BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBgdalautotest-3.1.2/gdrivers/data/fake_grid_cell0000664000175000017500000000074013701057753020277 0ustar eveneven 558 868618 789 0 200 4 17 14 1 7874016 1984 1 1 789 558 1 556 8 0 395 3 782 0 789 556 395 369 450000 1000000 460000 1000000 460000 990000 460000 980000 450000 980000 450000 990000 421100 5094300 91170 FAKE CITY 14 422600 5094200 21 38029 10130102 38029532 0 0gdalautotest-3.1.2/gdrivers/data/n43_sparse_cols.dt00000664000175000017500000000754013701057753021061 0ustar evenevenUHL10800000W0430000N03000300NA U 012101210 DSIU DTED0000000000000000 01A000000000000 PRF89020B000005MSLWGS84 430000.0N0800000.0W430000N0800000W440000N0800000W440000N0790000W430000N0790000W0000000.0030003000121012100 ACCNA NA NA NA 00 gdalautotest-3.1.2/gdrivers/data/byte_enc.pdf0000664000175000017500000000505513701057753017731 0ustar eveneven%PDF-1.3 % 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 4 0 obj<> stream uah><4XJs80 %CQ6yP endstream endobj 5 0 obj<>>> endobj 6 0 obj[] endobj 7 0 obj<>> endobj 8 0 obj<> endobj 9 0 obj<>> endobj 10 0 obj<> stream T"W[F}93 *媆?c?eZ^Rra#5jcssG#5fގgWȔy;aq;SvpYQJ sO u}!sIwgAsՠQN1ޜ6߂bt}7nC Q=S.߀hri)OO XUFu"Cf]Lh)PX endstream endobj 11 0 obj 228 endobj 12 0 obj 33 endobj 13 0 obj</P -3904/R 2/U/V 1>> endobj xref 0 14 0000000000 65535 f 0000000015 00000 n 0000000066 00000 n 0000000110 00000 n 0000000239 00000 n 0000000338 00000 n 0000000384 00000 n 0000000401 00000 n 0000000486 00000 n 0000000680 00000 n 0000001564 00000 n 0000001947 00000 n 0000001967 00000 n 0000001986 00000 n trailer <]/Root 2 0 R/Size 14>> startxref 2174 %%EOF gdalautotest-3.1.2/gdrivers/data/test_ogc_bp.pdf0000664000175000017500000000252713701057753020432 0ustar eveneven%PDF-1.6 % 7 0 obj << /CTM [ (0.05) 0 0 (0.05) 2 48 ] /Description (WGS 84) /Neatline [ 0 20 0 0 20 0 20 20 ] /Projection << /Datum (WGE) /ProjectionType (GEOGRAPHIC) /Type /Projection >> /Type /LGIDict /Version (2.1) >> endobj 3 0 obj << /Annots 6 0 R /Contents 4 0 R /LGIDict 7 0 R /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 5 0 R /Type /Page /UserUnit 1 >> endobj 8 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 20 /Length 9 0 R /Subtype /Image /Type /XObject /Width 20 >> stream x%!rD1 C# ~td2d%IA*I$vW㠒 ZlCW }@"[ D',jO6׽hA;߷tiǸYr|00H*\UQ2E l u])#bMv;F|tTTyw8]QlY˸~ˀNo:1xݪr 2pm[i5ٽ~4?> xO endstream endobj 9 0 obj 228 endobj 4 0 obj << /Length 10 0 R >> stream q 20 0 0 20 0 0 cm /Image8 Do Q endstream endobj 10 0 obj 32 endobj 5 0 obj << /XObject << /Image8 8 0 R >> >> endobj 6 0 obj [ ] endobj 1 0 obj << /Count 1 /Kids [ 3 0 R ] /Type /Pages >> endobj 2 0 obj << /Pages 1 0 R /Type /Catalog >> endobj xref 0 11 0000000000 65535 f 0000000973 00000 n 0000001032 00000 n 0000000232 00000 n 0000000797 00000 n 0000000904 00000 n 0000000954 00000 n 0000000015 00000 n 0000000377 00000 n 0000000775 00000 n 0000000882 00000 n trailer << /Root 2 0 R /Size 11 >> startxref 1081 %%EOF gdalautotest-3.1.2/gdrivers/data/stefan_full_rgba_alpha_1bit.jp20000664000175000017500000001454613701057753023451 0ustar eveneven jP ftypjp2 jp2 J2P1[jp2hihdr bpcccolr"cdefjp2cOQ2Rfww\ P`XX`XX X&C}S8 ecFP(!óPT63[йj9J=,b}+e$ǜ^$@J~)mդr`ux eU9?QW~bfBdF^ ?>PIx3湅_8ևЗZp0\[;hE(篢6I}nF %r@ w$@,o>8ٔ}RI D}mhi'Lx,zEWF~6&ͫYgVv"oi_Եݎ<ۅokԼg:o {gETǯS~&P{QyVP: $w̄$iLRҍc䶕rK0*Hb[dd V'A`*:Z*FO8J @ &FM4[dR(ۋȈcD&qVM/qgQXEO ?9H/<Dž*8l܌d$5}kO[apHPǐHn~WGj_.c?}tLmQvyyImY|;87ܷ,d>qA ""}eWdPv(^ἇi[n*A>T1%=mrC`.a?fn'1 (_;dpӳd)X9/L1)/σ8"2ǻ@ǒ-clwR\ ywB,4R]dʺ'OQ }Kpy.EzCAB-]LO4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'+9>w-e 9ՙ,hQ EO1!„mv1 -}-|G烖HJ[n%Mfsz~{GZ͟bu7lz2sxBH@2,E0*:뭦<OUpAOBB_Պڜ#k28<.QW"YғjF;b'9Z-IOۣ]޿"C?y}NR5"yx{p2ӪۊEt0G6ȶsW㪫kQl#t )So/ᗛFTN=//{-?W"x{uqnf7'e,׃RMcb>,Oflm69tjmQqӭCktn %=n 3ܣP)ʹMQpDApte\Evxv17JƦzy`wS{: 49-ow`;ոO.Ll|嵢#u[L`nqJY ǜHKؑY0jܡpz0kRw[Jz"}bN(!<"@/jްK߬9O!*\I#z3V@WUدy3^\rK5%bHxAWh'xsf]2;P[`UC<UrQAxWݰD8ODw?iڑXc 8j%mPs~OJYB>f)[H") KUv,VgC涭uULܪ۔obVRL0l{d=E,I7RԳE')t2Ⱥ{ d-M"sDLwL_d˴d;0tlω S·H|ƿ4B_:`ZtZT^8Ŋq*KDt:vycZBן=8:ͳM?Ty0: >EҳB ̏d 8v@*dBLL|,A.s8 ]$"_ΩBza!/ʗRxޡ[$P h0ΠF6 ;&tqEfIw-zKA@ $%tw:J1kܰbA6_%} \'‰X.vwC\woۓI wu/dFTc{4/=LR$Dڤ7Xp ώ iՐnş)ꗁiBj(hl R.NvCԧTp|e@T Fd! j⒟54"h/KBhӣDKG\(A$15,+_gdalautotest-3.1.2/gdrivers/data/byte.gpkg.sql0000664000175000017500000000445413701057753020063 0ustar eveneven-- SQL GPKG CREATE TABLE gpkg_spatial_ref_sys (srs_name,srs_id,organization,organization_coordsys_id,definition,description); INSERT INTO gpkg_spatial_ref_sys VALUES('NAD27 / UTM zone 11N',26711,'EPSG',26711,'',NULL); CREATE TABLE gpkg_contents (table_name,data_type,identifier,description,last_change,min_x,min_y,max_x,max_y,srs_id); INSERT INTO gpkg_contents VALUES('x','tiles','x','','2017-06-04T20:06:59.704Z',440720.0,3750120.0,441920.0,3751320.0,26711); CREATE TABLE gpkg_tile_matrix_set (table_name,srs_id,min_x,min_y,max_x,max_y); INSERT INTO gpkg_tile_matrix_set VALUES('x',26711,440720.0,3735960.0,456080.0,3751320.0); CREATE TABLE gpkg_tile_matrix (table_name,zoom_level,matrix_width,matrix_height,tile_width,tile_height,pixel_x_size,pixel_y_size); INSERT INTO gpkg_tile_matrix VALUES('x',0,1,1,256,256,60.0,60.0); CREATE TABLE x (id,zoom_level,tile_column,tile_row,tile_data); INSERT INTO x VALUES(1,0,0,0,X'89504E470D0A1A0A0000000D4948445200000100000001000804000000F67B60ED0000028F49444154789CEDD9A16E23671486E177AD80311BB30C340C6CD82E5CD8DB286C6FADB43070976D58030D27CC6633AC0519550B4A2D4BD6F35CC1278D74FEEF9CF9F4FB3F63FBCE1DAAA1B5AAB9A9B9A99A1B5B7B6AED8F4F71877643FBE686C6CE4D9D1B9A1B5B5AABA5A97D87BE37DC3A2757F250756C6DAEE6D66A68DFD250ED3B576B63AFB7CCC815ED8ED5B9A5B5436B637343E7AACE8DADD5B19A6E99912BDA5D7A6CDFA14375DE3AC0B1FAD2D0A55A5B7B6AB96546AE68F7B9434F5B073836B4B6EFD4BEA5F79686A6EAB9CBAD737225BBA18FB77FEDD06BFBAD0CD67BB56FA89EFA5309BC5BBBD77E5473434B4F2DDBD83F373776AA4E0DBD6F4F03F76737B776A9E6F6CDED9B1A5A3AFCF7C98FBD34DE322157B53B34756AEA7DBB01D4A5B5B9B1A1631FB3E1600BB85BBBB5B563E7EA50B5AD7E6353CF2D5D1AABA5F99619B9A2DDD2D2D2655BF5864E2DAD3D77EAA54BF5DEBE94C0BBB57B6EEABDB173973EC6FF6F7DEDA5A1A15A7B6AEED91370B77673978E5BF77F6F6CED7B7F75AC8E8DB55D07B957BB753BFE5E1AB712B86C9F7CAE7EE9DCD4AB35F06E3D4C0D0D1DBBB45653536F8D5DAA613B067FDB4A22F768F7D8D4A5435F1A9A9A7BFB69E47FB48243FB6D43E0FEEC4E0DD5B1BF3B746AEAB1B7A6EAB1639FABAF1D1B3ADD3826D7F270E86BBFF6DA5B734F9D9BDAF7F18B78EDBDA56F8D5D7ABC754EAEE461E8A5B9B5C71EABA75E1BFBD1E1A7E6BF6EC762000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000E0FFFC0BA4F1A934B5FA51FD0000000049454E44AE426082'); gdalautotest-3.1.2/gdrivers/data/test_ers_recursive.tar0000664000175000017500000000600013701057753022064 0ustar eveneventest.ers0000664000175000017500000000023013305470740011224 0ustar evenevenDatasetHeader Begin DataSetType = ERStorage RasterInfo Begin NrOfLines = 1 NrOfCellsPerLine = 1 NrOfBands = 1 RasterInfo End DatasetHeader End test.ers.msk0000664000175000017500000000024213305470751012022 0ustar evenevenDatasetHeader Begin DataSetType = Translated RasterInfo Begin NrOfCellsPerLine = 1 NrOfLines = 1 NrOfBands = 1 RasterInfo End DatasetHeader End test0000775000175000017500000000000213305470722010434 0ustar evenevenx gdalautotest-3.1.2/gdrivers/data/orog_CRCM1.nc0000664000175000017500000057763413701057753017644 0ustar evenevenCDF ycsxc lat axisY long_namelatitude standard_namelatitudeunits degrees_northlon axisX long_name longitude standard_name longitudeunits degrees_east|orog  _FillValue coordinateslon lat grid_descpolar_stereographic grid_mappingpolar_stereographic long_nameSurface Altitude missing_value`x standard_namesurface_altitudeunitsm xc axisX long_name.x-coordinate of polar_stereographic projection standard_nameprojection_x_coordinateunitsm0yc axisY long_name.y-coordinate of polar_stereographic projection standard_nameprojection_y_coordinateunitsmpolar_stereographic %straight_vertical_longitude_from_pole@ppstandard_parallel@N false_eastingAJRHfalse_northingA\kdlatitude_of_projection_origin@Vgrid_mapping_namepolar_stereographicresolution_at_standard_parallel@jxc axisX long_name.x-coordinate of polar_stereographic projection standard_nameprojection_x_coordinateunitsm0yc axisY long_name.y-coordinate of polar_stereographic projection standard_nameprojection_y_coordinateunitsmpolar_stereographic %straight_vertical_longitude_from_pole@ppstandard_parallel@N false_eastingAJRHfalse_northingA\kdlatitude_of_projection_origin@Vgr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B vB WB B B B VB B AB =B ӭB &B YB !B әB B AnB sB B ,B ;B ,B @B `B }9B B B B B ܋B B tB B B tB B ܋B B B B B }9B `B @B ,B ;B ,B B sB AnB B әB !B YB &B ӭB =B AB B VB Q>BIB}BFBxBJB#^BBSeBeBxB}BB=BNB(BB*BB"B%BMA VAAFAA|ANKAAA[AkA(A,AAImAsAAHAA苻A((A?A="AoAcAqAA.AxAܽA.FA|AA AMAAőA-A,AYAPBSIB(BpB BB BBlBB qBB\BtwBBVBB.}BBBIB ]B B B smB XB `B oB B B Q'B gB إB B TB B B B%BRxB|BdBŞBBB;B2BFBVBbBlBsBvKBvKBsBlBbBVBFB2B;BBBŞBdB|BRxB%B B B B TB B إB gB Q'B B B oB `B XB smB B B ]BIBBB.}BBVBBtwB\BB qBBlBB BB BpB(BSIAPAYA,A-AőAAMA AA|A.FAܽAxA.AAqAcAoA="AA'{AAA\DA+ArAqAAAdAPAA3ApA^ABBBBABB]BBpBBxB_BwyBBlBcBV B4B 5B AB ,B pSB ӭB 42B B B DB B B :B B BBXBBդBcBFByBBBB'BKBkB.B+BBqBݷBBBBHBHBBBBݷBqBB+B.BkBKB'BBBByBFBcBդBBXBB B B :B B B DB B B 42B ӭB pSB ,B AB 5B4BV BcBlBBwyB_BxBBpBB]BBABBBAA^ApA3AAPAdAAAqArA+A\DAAA'{AA7AFAA|A^AJA[AUA^AA`AOASAܱBpBjBH=BByMByB\B1B'BKBmB\jBBbBcB_HBٔB Q>B @B 8B ,B B B fB JB xB 2B gB BBhBBBOBBIBBXBB/BHB/3B\BlBBBBB+jBBqBV/BfBsB}BNBBBNB}BsBfBV/BBqB+jBBBBBlB\B/3BHB/BBXBBIBBOBBBhBB B gB 2B xB JB fB B B ,B 8B @B Q>BٔB_HBcBbBB\jBmBKB'B1B\ByByMBBH=BjBpAܱASAOA`AA^AUA[AJA^A|AAFA7AA)AAAsJA A=%AA#AOAABBtBe,BB.B=hBeBmBBB#YBB;BBIBTB N+B kB H B B 7QB B B B B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J,J9JGJ T@J aJnJ|J@JJJJ!@J$ˀJ'J*J-@J1J4 J7J:(@J=5J@BJCPJF]@JIjJLwJOJR@JUJXJ[J^@JaԀJdJgJj@Jn JqJt$Jw1@Jz>J}KJ,J J9J`JGJ͠JT@JJaJ JnJ`J|JJ@JJJ JJ*`JJ7J@JDJˀJR JJ_`JJlJ@JyJJ J J`JJJ(@JJ5J JBJ`JPJ֠J]@JJjJ JwJ`JυJ JҒ@JGCPGPH|HCPHt$H|HHPHۺH$IGI|II*I7ICPIOI[IgIt$I,IGIaI|IIIˀIIII5IPIjIυI՟IۺIԀII I$I>J,J9JGJ T@J aJnJ|J@JJJJ!@J$ˀJ'J*J-@J1J4 J7J:(@J=5J@BJCPJF]@JIjJLwJOJR@JUJXJ[J^@JaԀJdJgJj@Jn JqJt$Jw1@Jz>J}KJ,J J9J`JGJ͠JT@JJaJ JnJ`J|JJ@JJJ JJ*`JJ7J@JDJˀJR JJ_`JJlJ@gdalautotest-3.1.2/gdrivers/data/small_world.rl20000664000175000017500000030200013701057753020374 0ustar evenevenSQLite format 3@ a-a1-(   efSiepsgWGS 84+proj=longlat +datum=WGS84 +no_defsGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]] $/ small_world_tilesgeometry'5 small_world_sectionsgeometry /small_world_tilesgeometry 5 small_world_sectionsgeometry  ]--mtablegeome]--mtablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name TEXT NOT NULL, f_geometry_column TEXT NOT NULL, geometry_type INTEGER NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER NOT NULL, spatial_index_enabled INTEGER NOT NULL, CONSTRAINT pk_geom_cols PRIMARY KEY (f_table_name, f_geometry_column), CONSTRAINT fk_gc_srs FOREIGN KEY (srid) REFERENCES spatial_ref_sys (srid), CONSTRAINT ck_gc_rtree CHECK (spatial_index_enabled IN (0,1,2)))?S-indexsqlite_autoindex_geometry_columns_1geometry_columns++[tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name TEXT NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name TEXT NOT NULL DEFAULT 'Unknown', proj4text TEXT NOT NULL, srtext TEXT NOT NULL DEFAULT 'Undefined') I--Etableraster_coveragesraster_coveragesCREATE TABLE raster_coverages ( coverage_name TEXT NOT NULL PRIMARY KEY, title TEXT NOT NULL DEFAULT '*** missing Title ***', abstract TEXT NOT NULL DEFAULT '** ?S-indexsqlite_autoindex_raster_coverages_1raster_coverages &33stablespatial_ref_sys_auxspatial_ref_sys_auxCREATE TABLE spatial_ref_sys_aux ( srid INTEGER NOT NULL PRIMARY KEY, is_geographic INTEGER, has_flipped_axes INTEGER, spheroid TEXT, prime_meridian TEXT, datum TEXT, projection TEXT, unit TEXT, axis_1_name TEXT, axis_1_orientation TEXT, axis_2_name TEXT, axis_2_orientation TEXT, CONSTRAINT fk_sprefsys FOREIGN KEY (srid) REFERENCES spatial_ref_sys (srid))A (%#7=6$ small_world*** missing Title ****** missing Abstract ***UINT8RGBJPEGP??&&&#'A@7o@K5H@!AG@m@p@pt@z@~@؂@@<@@@-@@@ # small_world* missing Abstract ***', sample_type TEXT NOT NULL DEFAULT '*** undefined ***', pixel_type TEXT NOT NULL DEFAULT '*** undefined ***', num_bands INTEGER NOT NULL DEFAULT 1, compression TEXT NOT NULL DEFAULT 'NONE', quality INTEGER NOT NULL DEFAULT 100, tile_width INTEGER NOT NULL DEFAULT 512, tile_height INTEGER NOT NULL DEFAULT 512, horz_resolution DOUBLE NOT NULL, vert_resolution DOUBLE NOT NULL, srid INTEGER NOT NULL, nodata_pixel BLOB NOT NULL, palette BLOB, statistics BLOB, geo_minx DOUBLE, geo_miny DOUBLE, geo_maxx DOUBLE, geo_maxy DOUBLE, extent_minx DOUBLE, extent_miny DOUBLE, extent_maxx DOUBLE, extent_maxy DOUBLE, strict_resolution INTEGER NOT NULL, mixed_resolutions INTEGER NOT NULL, section_paths INTEGER NOT NULL, section_md5 INTEGER NOT NULL, section_summary INTEGER NOT NULL, is_queryable INTEGER, red_band_index INTEGER, green_band_index INTEGER, blue_band_index INTEGER, nir_band_index INTEGER, enable_auto_ndvi INTEGER, CONSTRAINT fk_rc_srs FOREIGN KEY (srid) REFERENCES spatial_ref_sys (srid)) p@@@@~@z@s@s@p@m@i@ g@a@_@ `@ c@a@_@a@d@ a@d@d@h@`g@`n@j@`m@n@i@@p@m@k@k@o@l@ i@n@@p@l@`l@m@@n@@o@j@m@@m@@o@k@l@ m@j@@m@l@k@j@`l@m@h@ h@`f@h@@f@ e@f@d@a@`b@b@b@`@@Z@@]@_@Z@^@W@^@@Z@_@Z@@W@@W@@Y@[@T@T@@W@@U@U@U@S@W@S@T@T@W@T@U@U@@T@@V@M@R@T@Q@R@R@@S@W@Q@R@W@U@T@T@W@T@V@Y@[@[@W@X@@X@@Y@Y@\@ Y@X@@Z@W@[@@S@Y@^@@X@Z@Z@]@@^@@^@a@`@`@`@]@^@c@@[@a@@b@`a@`@a@Z@\@@Y@ c@`@b@``@`@_@_@^@a@``@@`@`@X@]@ `@[@^@\@X@[@^@[@[@Y@Y@X@Y@Y@@[@@[@W@W@Q@S@R@Q@S@S@L@U@R@K@L@P@P@J@H@I@K@J@C@J@F@E@J@J@E@?@K@P@B@F@J@H@F@F@C@K@P@C@I@J@M@O@P@Q@N@N@P@R@X@Y@S@`f@؂@J:7o@4;bH@&}AG@@g@n@p@0x@`}@@x@h@ԟ@y@@6@@@@@{@z@`y@pu@`p@o@h@f@d@\@`@@Z@S@@S@S@P@L@N@I@I@P@L@K@P@@S@M@O@R@S@X@@Z@Z@`a@a@ b@g@g@i@j@m@o@p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J:Q*LZ   SSdg ==atableraster_coverages_keywordraster_coverages_keywordCREATE TABLE raster_coverages_keyword ( coverage_name TEXT NOT NULL, keyword TEXT NOT NULL, CONSTRAINT pk_raster_coverages_keyword PRIMARY KEY (coverage_name, keyword), CONSTRAINT fk_raster_coverages_keyword FOREIGN KEY (coverage_name) REFERENCES raster_coverages (coverage_name) ON DELETE CASCADE)I]7indexsqlite_autoindex_raster_coverages_srid_1raster_coverages_sridu77 tableraster_coverages_sridraster_coverages_sridCREATE TABLE raster_coverages_srid ( coverage_name TEXT NOT NULL, srid INTEGER NOT NULL, extent_minx DOUBLE, extent_miny DOUBLE, extent_maxx DOUBLE, extent_maxy DOUBLE, CONSTRAINT pk_raster_coverages_srid PRIMARY KEY (coverage_name, srid), CONSTRAINT fk_raster_coverages_srid FOREIGN KEY (coverage_name) REFERENCES raster_coverages (coverage_name) ON DELETE CASCADE, CONSTRAINT fk_raster_srid FOREIGN KEY (srid) REFERENCES spatial_ref_sys (srid))   EP ++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)g 11ytablesmall_world_levelssmall_world_levelsCREATE TABLE "small_world_levels" ( pyramid_level INTEGER PRIMARY KEY AUTOINCREMENT, x_resolution_1_1 DOUBLE NOT NULL, y_resolution_1_1 DOUBLE NOT NULL, x_resolution_1_2 DOUBLE, y_resolution_1_2 DOUBLE, x_resolution_1_4 DOUBLE, y_resolution_1_4 DOUBLE, x_resolution_1_8 DOUBLE, y_resolution_1_8 DOUBLE)O c=indexsqlite_autoindex_raster_coverages_keyword_1raster_coverages_keyword52 55tablesmall_world_sectionssmall_world_sectionsCREATE TABLE "small_world_sections" ( section_id INTEGER PRIMARY KEY AUTOINCREMENT, section_name TEXT NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, file_path TEXT, md5_checksum TEXT, summary TEXT, statistics BLOB, "geometry" POLYGON) hJ @L@L@\@\@l@l@|@|J @@@,@,@<@<@L@LJ ????@ @ @@ /small_world_tiles1small_world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\@@W@U@Z@U@Z@R@R@U@T@@T@U@Q@@V@@R@@Q@P@S@F@J@P@A@L@F@A@B@B@@@C@C@:@@@@@5@4@8@6@;@=@.@3@2@5@3@4@,@&@*@,@*@(@@"@@@@@?@@@ @?@@@@@@@@@?@@@@@@A@J:J*Vf@V@|Vf@Vf@V@V@V  !M&$world_west1a2b40cdc2683a07c556bf70db58afe2x}N@_15I^h_/7H7 YEA@)mfw3;3I콣 eo8zҚ7ô?̓M3VAN&ک|:1f$z&ں\#[]:kR5< `bI'ij.j-+IEز%zNR:T8\+N䔕)bBۤ.^Sf"g$IiikD d~^列J8|^(7 A+ZdRS$:;=9-Hh:A<[z3cqW]޲5_Lny?OhYs@@?6oz…;C/?ꇖJ/HxQDR+%ϲ]pHmGMqBGw/f e'  A@7o@VCC@5AG z@]@@`@`c@j@m@q@w@@x@x@@(@@@~@@u@s@k@@i@d@a@``@_@@V@W@Q@P@J@Q@Q  !M"$world_east0cacd314aaa05594bb5788f68defb7a2x}N@_B՘kR z妝ҍ0CEѧwP \I콡 UozҚ7dػV0KR7Z:fh&=Z<۩ h Msm&{@t֤jp&rȸN}Z)0V`c Jtji'>p2 7)+=SĄI]!DHmHc"֤ D d~^列J8sNW/+;߆ qV*YTa"pvN/r !\''Kox.3Eu,Q3)[hп !֙?:e#ΩG\(7"yVoT +urGZ5vJu/Lvٻ!5Ñ Mw~OeܼAy c' A@7o@-K=kM@J_\˧AGy@^@a@e@j@ p@s@{@@P@@g@(@Ё@@v@pr@p@j@`c@e@`@\@[@V@Q@M@@S@T@R `91<[[Otableidx_small_world_sections_geometry_rowididx_small_world_sections_geometry_rowid*CREATE TABLE "idx_small_world_sections_geometry_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER)5YYEtableidx_small_world_sections_geometry_nodeidx_small_world_sections_geometry_node)CREATE TABLE "idx_small_world_sections_geometry_node"(nodeno INTEGER PRIMARY KEY, data BLOB)0OOQtableidx_small_world_sections_geometryidx_small_world_sections_geometryCREATE VIRTUAL TABLE "idx_small_world_sections_geometry" USING rtree(pkid, xmin, xmax, ymin, ymax)nD]][tableidx_small_world_sections_geometry_parentidx_small_world_sections_geometry_parent+CREATE TABLE "idx_small_world_sections_geometry_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER) 99D 4´BC4´B    sX fVf@V@|fVf@Vf@V@fV@fV  fVf@V@|fVf@Vf@V@fV@fV Vf@V@|Vf@Vf@V@V@V  fVV@|fVVV@fV@fV )3UUItableidx_small_world_tiles_geometry_rowididx_small_world_tiles_geometry_rowid/CREATE TABLE "idx_small_world_tiles_geometry_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER),SS?tableidx_small_world_tiles_geometry_nodeidx_small_world_tiles_geometry_node.CREATE TABLE "idx_small_world_tiles_geometry_node"(nodeno INTEGER PRIMARY KEY, data BLOB)'IIKtableidx_small_world_tiles_geometryidx_small_world_tiles_geometryCREATE VIRTUAL TABLE "idx_small_world_tiles_geometry" USING rtree(pkid, xmin, xmax, ymin, ymax)T//Wtablesmall_world_tilessmall_world_tiles,CREATE TABLE "small_world_tiles" ( tile_id INTEGER PRIMARY KEY AUTOINCREMENT, pyramid_level INTEGER NOT NULL, section_id INTEGER, "geometry" POLYGON, CONSTRAINT "fk_small_world_tiles_section" FOREIGN KEY (section_id) REFERENCES "small_world_sections" (section_id) ON DELETE CASCADE, CONSTRAINT "fk_small_world_tiles_level" FOREIGN KEY (pyramid_level) REFERENCES "small_world_levels" (pyramid_level) ON DELETE CASCADE) 99D 4´BC4´B4C4´B4C4´B      HHa%%tableSpatialIndexSpatialIndexCREATE VIRTUAL TABLE SpatialIndex USING VirtualSpatialIndex()/77}tablesmall_world_tile_datasmall_world_tile_data2CREATE TABLE "small_world_tile_data" ( tile_id INTEGER NOT NULL PRIMARY KEY, tile_data_odd BLOB NOT NULL, tile_data_even BLOB, CONSTRAINT "fk_small_world_tile_data" FOREIGN KEY (tile_id) REFERENCES "small_world_tiles" (tile_id) ON DELETE CASCADE);WWUtableidx_small_world_tiles_geometry_parentidx_small_world_tiles_geometry_parent0CREATE TABLE "idx_small_world_tiles_geometry_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)w55tableElementaryGeometriesElementaryGeometriesCREATE VIRTUAL TABLE ElementaryGeometries USING VirtualElementary()^]4%# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?(\((|1I<(JYM2>ՖKj!\2G+m;bfG@}*$i]B{#ʳM:@?11*HY-^a,tr|1Jc|sma4>>jc!.m aQY`r 5i^n_iQFVy,b#y:{u),'kBϵ3Pnj,Ng*c,G.=hԾ,K]^icT=20=f5嶛$ȭiGp](hwWɐzaW!>}.}-ۤcpF`2ykWVRq ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (5OS񤮍|Glt."3Y%a0C*pG= l՟ۍvCt[H`>Q8V_WʬI21]K $ۛ3=OCNw*Y'$xysj{=`{SnQT֫MC!GwdW\6֑H.wdnHt\[]o{սpcu)"Ѓϥ 3/;.}bg0m?jV2ji-- "<S܍v&_97ϸIdc#r3~TK1iY.>{A#Ӯt"[g*@^z`@ 8V&E]&38_QQ\7bP] 9jXe,zFߺ_̵$[ ٴvQ01xۦu٘'\}x4V1[fNr eAx$f D*8p Qh۔ߧ ̹y{^]Η>2K[˸Ww K+hᲃM*%.\)+B *kxkO4S >ѻd}Jy~ H-OW ˀ6y6\P)J X܂ Q|'%Vm &\ O zUxuT>ȕN2.gH9񸑎*9"1SvuB+We+\V柪4%"æ/]=8$qX._z @4#Ot/* H pG>ݭ0T8]rpr; Wq;+1eC#O;*^PU q*IeY#9d H$G]anR8Q O|fEn΄8zj9J.3>G6\0z*-7gn3əm4pz]RF*pyשOV :7EXY 򌓒;Gki}z7C{nrK)P A1'~kT;_V)NT,">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YuˉJ)$8Q\Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@QEzQ@Q(? ;MSHX[gVLqHշ/5CY섄rzJNd$C+6᧋ytgԪFX(1'װ<i{HwCQW5-2K8++9$JqF̄:d} J[*ص4< 6pRG"5, ^09ϧ5-8Z<f*<IXDٸJA=;V5jWtm*V9c$(K \9<Jϖ8HǾ-ZڎO 0EX@W-; e[;ʅ4A;~_nT2sW67QGKZm9PzgzϽ[o3ĩCo#f|V'Abc%,}0@|;$Q '$ u2p9u9>&.̵_Sj wGk\؀w4lx ~Y^k (QEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQEQE}|5f!|njԫ4.${8,u c(jΙHmq)VѰtH95bJCB)XjI'Μmu\}?֥4KEk{3Q[lۏV$ՙHucU_J:$llð*eh!E<&x_ 211~FWmA(KLRDA]Ÿb?V^0rm`w*&VU%S&(uA$۞jAђ[c@!9;Xv<)9;rLy<0b*P)c=sV蒌#EJ\8E;Vv1389ib{*qMWCY|]׸[]?6޼ ޾La /1Rgx/lo1$W*`(^dhW9#֬f'qTƙrA q\ /WU]g\cHD{MR}Z?`aQ/sTpf|JxHБBXZZG#`kxdfU!O(z\aYmt=VɆ 16zrpk fഒnrPN>K >aX5 *ֹz|mG6OgByv"˜gy"Nk6B? J).[QP0((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((M(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((N(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((ɶGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGOGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGȀ"YiQ%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?‰vy!+ M"ng%p5es5WR,j<3]xS&܋kj>+[2K(467_ẼhWlAPp q&Tp~ӝ5Ǯ6⩠ÚŅb)*)n]iIy5pG Dfu<(cpxO5͉5ʆϯqIe~V@[|*8 d!Xi6ɛp_}ǍuLVrd9ŒY}ў ]qN ѩQߘ܆dN0ǮWn׷*SLh( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( (: w-4Awj~$7ӝcXdAҹ+]wV9/? g#W9#u,KzXIvVau=rRGO>51}2dyFSwL3\<: humB9Y~y_xYKRxd$v|+\`_,-u|< PKiK@/`os^}R oH5|U9_YO 0C^AK'CVk]Bh.x&BFTcU)K$&vC՘ƙYIݶER(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((S(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((T(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((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@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@ɶ\$o@ 0b& JFIFCREATOR: RasterLite2 C   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((" }!1AQa"q2#BR$3br P^<& h4JFIFCREATOR: RasterLite2 C   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzAB& L/JFIFCREATOR: RasterLite2 C   3 S(& JFIFCREATOR: RasterLite2 C   %# , #&')*)-0-(0%()(C   (((((((((((((((((((((((((((((((((((((((((((((((((((" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?X:E@;1:768I ,4@C9GDXQNVd#2E?;<b&LE^eHu+0c c_ #-7AKU_wKwd! !"#$%&')*-01d 97FwAFqA_˷'TA_˷TA>@>@slope.ascaspect.ascfbfm13.asccancov.asccanht.asccbh.asccbd.ascThis is a test LCP file created with FARSITE 4.1.054, using data downloaded from the USGS National Map for LANDFIRE (2008-05-06). Data were reprojected to UTM zone 12 on NAD83 using gdalwarp (GDAL 1.4.2). cccccccccccccccccccccccccccccccccccccccccccccccin7dh-dg7dcccccccccccccccccccccccccccccccccccccccccccccccj7 nA s7 u K tK poK ljAdjhAdgzfcccccccccccccccccccccccccccccccccccccccccv5 Um3 _ g 5UdcS-dc-de_ #db#i- nK r UpKmmK jwK fn7wdA cccccccccccccccccccccccccccccccccc=A BA BA AK >K :K 7K6Kx3 Uo3Kh8K b IKd_Ad_ #dZ #`g- l U m Ul U h U gK dK cccccccccccccccccccccccccccc K%  K)   U%   U  K  , U4K @A CK CK AK=K9K8K5K4 Ux4Kq8 Ug=K ` GK ]DK YXKdY7d]7deK h Uc Ud Ud U c U cccccccccccccccccccccQK NK  V U  d U  U  K!  K1 K0  U$   U  #K 2A 9K EAK EA CK?K;K8A6 U3K4 U 6U z9Uo< Uf?K d@ U \ CK WbK W Ad\7 `K [ U \ U]K ZK cccccccccccccc7K7K 9K 9AK  4AK  &A AdLA  EK  NK  ^ U!  e U%   U-  K% K* K"  U , U 8K ?K  GK DA @AK=K9K 7K 4K 4K 6K 8K ;Ux>Kn? U kAK aBK Z HK TuKdU 7dXA [ U SK S7 P- cccccccc&K + U 0K2K5K7K:K:K ;A ;AK  8K  /K  KdKAd @K  HK  V U!  a U   U% K U "K ) U 5 U  > U  EK  C U  ?K <A 9K 7K 5K 4K 3K 6K :K>K@Ku@K s@A h>K _AK VFAdRj7dQ7dR A L-dK- I-dcccccc+K 'K ( U . U 1 U4 U7K8K<K<K =K >K ;K 5KK OAd =K  CK!  PK%  ] U  UK U)K +K 9K B U  EK  > U  <K 9K 7 U 5K 4K 4K 3U 6A :K=K?U }@K {<A q:K g:K ]8K U;A N HAdL-dN AdJ +AdI:Adcccccc'A &A ,K 1AK 4A7K9K:K<K>K ?KK ?K =K 9K K TAd ;K  > U  JK  Z _  U K% U+K-AK 8K =K  ?K  8 U  6K  5 U 5 U 4K 3K 3K 2K 6K 8K ; K =K =K 9A {7A q5A! h0A _0K U+K OKd[ U T& U P3 U cccccc&7 (K /K 3K 8K 9K;K<K>K@K AK AK @K <K #A ]Ad :Kd : _  BKS U U U'K+K/K 4AK 67  7K  2K  2K  4 U  4 U 3 U 2 U 2U 3K 6K 7K :K! <A <K 9A 7K& {2A% t-K k,K d$K ^U i$ U a/K X@K ccccccc 'AK ,K 0 U 4 U 9 U 9K :K<K?K BK BK AK AK <A  5A -K  <Ad 4K 8 UI Ud UK  %K  ,AK 0K /AK  0A  1AK  0A  2K  5 U  4 U  2K 1 U 1K 3K 6K7K :K ;A ;A 8A 7K$ 1A -K w*K r#K x' U t1K lB U `R U cccccc)A .A 1K 5K 8K 8K :KK =KK@K CK CA DAK DAK >7K  5A  #K ?Ad 1K 1 U@ UZ _K &K .K 1AK -AK  .K  /K  3A  6K  7 U  4K  2K  1K  0K 3K 6K9A <K<A ;K 9K7K 1K .K .K |*K ~7K yGKpVKb` U cccccc+A .A 3AK 5 U 6K 8 U ;K >K AK DK GA JA I7 EAK  =A 7 ?#K  ,7K  , U 4 UI U  U" U-K /A -K .K  /K  5K  9 U  8 U  5 U  0 U  .K  / U 4 U 8K =K! =K! =K < U 9K6 U 4K 4 U 6 U 6K ~7K {R Ur] Ubb Ucccccc%.A 0K 4KK 5K 7K 9K <K ?K DK HA LK NA MAK LA  CA &A K .Ad ( U ) _ 4 U Q _ _& U ,K -K 0K 2K 5K 7K  6K  0K  )K  +K / U 6 U< U@ U > U ?K >K; U: U<K< U? U@ UF U~VKt^Kc`K cccccc.0K '2K (7K 7K 9 U ;AK >A AA KK ORK RK QAK  N7  CK  !A bA  AA  . U ' U- UQ _d _ U (K ,K 1A 3K 0K 1K  0K  )A  %A * U / U :K @ UC UB UCK @K B U D UFKE UGK G UM UXKu\Ke\ U cccccc73KK /5K0:AK '<K >K AK E GKK WK XA XKSK  IA  9K  A  A  YA @K / U- U@ UKK U $ U * U 0 U 1 U ,K , U  ,K  'K  ' U - U 3 U AK GK H U G UGK DK J _ LK MK MA NK NK Q UYK wZK i[K cccccc?5K 78K 6>K .BK %EK JKKNK QK UK `AK _A YK MK ;AK  +Ad A  K  K XK ; U+ U/ U$ UV U U ( U - U . U ) U * U , U +K 0K 6K <K NK RK OK N U L U K U J _ UK U U UK  UK  TK VK ]K ]K z\ U l^ U ccccccG8 U F>K =BK 4HAK *MK !S UXK\KgKfAaA  QK  <AK  *7dK A   U  K  U P U *K  U U U; _$ U, U , U * U - U 1 _ 6 U ;K AK \K  a U a U ]K Z U W _ U _ ^ U ^ U ^ U ]K  ]A  \A dK dK{dKlbK ccccccP<KNAK CGK 8LK .RA $XAK]KcKdA `A  SA  ;A  )7d AdK   U  K  !K   U  U BK  U KK U U/ U- U1 U7 U =K D U K U TK  oK  u U  vK  s U m U f U ` U i U f U dK dK  dA  dK h7 h7K{gAleA ccccccX=ANAK JKK =OK 2TAK %YAK ^A bAKVA NA  =A  )Ad A  K  K  !AK  %K 'K  (K &K! K K  U K  UKKnK UQ UQ U V U \ _ f U vK  ~K  K  U U x U o _ t U m U kK jK  jK  iA h7 jK zhK lgK ccccccbAKUFKPNKASK5V7K 'W7 XA YA IK AA  /A  "K  K  K  K  &K  (K  +K  ,K  -A +K *K ,K 7K K K  U U _ _m U f U g _ m U vK  x U  U  U  U  _ } _ _ z _ u U p U  n U  mK k7 lK yiK leA ccccccjFK\IKUPKEQK9SAK *R7 QA OK BK 7KK (Kd K  K  K  A -7 /A  / U  .K  .K  +K *K  1 U 0 U +K  U  UK  U _ _ s U m U l U p Un U zK K U  U  U U U } U v U s U p U nA mK xh-w lb7w ccccccqH UcKKZOK KNK =NK 0LA %KA HK BK .K %K !K #K  'K  )A  5A 7A 3K .K  , U  - U  0 U  5 U 4 U 2 U 4 _ K K U U _ U q U j _h _k UpK }K K  U  U  U U U } _ w _ r U qK n U whK maK ccccccxIKjLK`M7 SL- CL7K 7JK *IK EK <K (K &K &K *K!  -K)  1A'  =A% ?K 8K .K - U3 U 6 U< U< U< _: U= UH U{ U _ U _ _ _ v _{ _t _p UuK A  K  K  U U _ _  _ v _  s U n U wi U md U ccccccIK yNK gM7 ZL7 ILA >JK /H U &@KK &,Ad"'K)K*K.K% 1K1 =K)  BK%  CA% <A 5K 3 U9 UL _N _L _G UJ UU U{ U U U _ _ _ _ _ U{ U{ U U K  K  K  U  U  U  U  { U  y U ~sK vn U mi U ccccccKK ~PK nO- `N- PMK DJK 6DKK .97K 0)Kd+) U%, U / U2 U6K% =K) EK%  EK% BK AK A UH Up _m _i Ue Uc UiKx _ U U U U  U _ U U _ U U  K  K  A  K  U  U  U  U  U { U tvK lo U ccccccM7 ~PK uP- eP7 WNA IH7 >=7K 62Ad:+U4. U.1K(5 U!7K<KAK! JK  JK"  H U J U WK k UK U _ U U} U _ U U U U  _ _ U _ _ U U K  A  K  U  U  U  U  U  U w U q U jv UccccccRA R- {S7 jRA ]M7w OD7 H8AK ?0K B4K;7K59 U.< U'?K DKHKRK QK  PK UK gK } U K U U U U U U _ U  U  U  U _ U U U U  U  U  U |K K  U  U  U  U }K q U l U f UccccccUA" TA" W7 nSA bKK VA7 P8H5 U H@ UAC U:FK3I U,K U$MKPK]K [K ]A  d U rK  K K U U U U U _ U K  U K  U Uw U K U  U  zA  wK  v U TK a U q U  K ~ K z U v U j Uw f U a UccccccXA X7 X# tR7 hKA ]BAK W=K O> UH@ UETK=X U6\ U.^K'_K_Kq UmK oA  uA  |7w  A  K U _ U _ _  U  U  U  U  U  U _ U UvK  lK  c7w  Z7  TA  P U Z _ c _ m U z { U t K o U d U `KZKcccccccZ- Z-K X- xSA mNK cJAK \IKTL UMdKFhK>lAK6r U-x U&|K7w Uw Kw Aw A K K  U  U  _ _ U _  U  U  U  U  K  K UkK\KUK TKw QK  LK  KK  c U gK k Un _ ys U q}K g z U `  U Z US Ucccccc[# X-K UA {RKK pSAK gTK ^Y UW_KLtAwDxK;{K2~Aw(Kw 77 7 7w K  U  U K  U  U  _w Uw U U  U  U  K  U  U U| Uz _e _^ _\ UW _ W U  \K  { _ { U| U z _ vx U ny U e z U ^xKWzAMKccccccZ- TKw R UwRKsV7 i[7w _cKw VmAw IsAw @wK 7yA -{K !7 A 7 7 7w Kw Kw Kw Kw K  U  U  U U K  U  K  U  U K U _ _ _ _ _ _ | _  y _ _  U  U { U r _ l _ b U ]|KTvKJyKccccccWTKw RKwUKvYK k^Aw _fAw Sm7 GeAw >h7 4j# *kAw oKvAK AK Aw Aw Aw Aw Kw Aw  Aw  K  U K A U  U  qK K  K U U _ _ _ _ _  U  U  _  _  U { U t U m U h U b U Z _Q{KGy UccccccUAw SKwUKXKy[ U l_ U _bKw Rc7 H[Aw ?\7 5`# *fAj UoKwK yKw {Aw AK A  7w  Aw  Kw K K A u7 dK  g U  g _ r U  A  K K U _ U  U  U  U  U  U  U z U s Uw l UK f Uw b U ^ U U U L U BK ccccccSAw TAY U] U{_K naK ``K T]7w K_A A`7w 6gK)nKqKtKwK tAw u7K w-w |Aw  Kw  Uw  Kw K AK A K c U b _q _r U  { U  U K  U  U K  U  U  _  U K v U pK kK d _ _ U Z K X U NKdE~K <zK ccccccTA VK_Kc Uw{fKwngAw `fKw VcAK K_A BtK4sA%r7sAK tAw t7w nAw nAw p7w t7K  yK  K  U A - - K  _ u U _ z U z U } U  U  U K Kd Kd KdK }K zK n Kdi A d uAK _ i7d[c7dWj7dS }AdMcKwdCkKd8nUdcccccccV_cAgKwzk7wmoAK_rKwUtAwEA<A /A #z- u- r7 uAw oAw l7w l7 n-w  p7w  t7 qK ~ U A A U _ _ U  U  U z _ s _  rK  8Kd >Ud PK bKdz wKdv Kdr KdnGUdk 7Udg .7dd-Ad_4K Z @K XYK NdK Dk U 7nAcccccc[A e7 fAiAwo7itKw[|KwPKw<A 2 '- 7 Az7 }7 w Uw sAw o- m7  l7  mA  i U r U UA _ _ _ _ K  ~ U  p U  [ U  EKd+ U3 U= UF U| M Uv T U qUUdr6 _p" _ p # U k . U g< U _JK Xl U Lq U BsK 3tccccccem- lA mAtpAew UwTAwH7K 0#&## #K}7 rKwdtAK rA  oK  k U  hK  bK d UuK7  AK  U U  K  rK ZUd >Kd 0K ( U/ _; _E _K _N _y O U tG _ rj _r _ru _pd _ k c _ af U Vu U IvK =vA 0u#cccccco7m- s7  q7 r r7_!wA L~A >-'|zu snlnW7 `AdgAK  k U  kK  fK WK PUd PKd[AduAK K  KdFK  4Kd "Kd  U U$ U@ _L _U UY U\ _z ] U u_ _ q _ o _ n U l Uh U`y _QzK ExK 8xK -u7 ccccccw- v7 yA  wA m"u7 X"u7 Ey#6{'QA;8 =#D-M#K EK M U VAK _A  cAw _KCA  =K =K  ?K  EK  LAK  OA  $K   U _ _" U1 _V _] Ub Ue Uf _z f U u m U o z U k U g _ f _ b _\ U QzK @|73|7+ x-ccccccy-zA  |7y }7 f"z-S!u?o2d/,#d)'K #) U ,U 3 U 8K ?K FK MK PAK TA  SAK LA  1K  3 _  7 U  9K  9 U  6K  /K   U  _  U ! _ 8 _ J _V _d Uf Uf Ue U { e U t j U n r U h | U c Ua U] _W _ L~ Uw :{.{* xccccccu#y7!wp {^ yMr?\6>;K 8! U 0'K)/K5K :A ?A LA OK NK K7w A7  7A  1K  2 U  8 U  ; U  9 U  3 U ) U U  U # _ 9 _ O _ Z Ua _e _e _e U d U { d U t i _ m v U f z U b U] UY U R~ U G{-5u, t)occccccco-!m7|!o-joXiKVD3@"I U F# U =+U74K(;U@K NA QA PK L7w EA# 9A&  1K$  6K  :K  @ U  C U  ?K  : UD _- _* _> _ S _ \ _a Uh Ug Uf UgU jU {m _ pw _ j z U c ~ U_ UZ _V U Nx U @v2r, p(lcccccc k7  kAz gi^#[K-R/-N-MAW U R(K J1KA: U4CK&JA SK UK RK MK EK ;K#  6A  E _"  KA  PA  Q U Q UO _v U U| _u U q _ n _k _w U p Ul Uk U o U ys _ pw _ g w U a } U] _W UR U K| U ;}A 1x+v(rcccccc mA f{[mFd/7]-\7Zc&U \2 UU< UIFK=NA +RK !YK XA UK QK JA CA  BK  [A  bA  fK j _o Ur Uv U U _ _ U U  U  U  U u U q U p U vq U nt U eo U _ w UZ US _N U F U ccccccccccl-XEv,-qm7l U gU m3Uc?KK[KAKNTK AZK /[K !YK ]A XA UA PAK PA  TA  lA  sK  y U  U U  U  U U U U U U  U  U  U  U xU ~r U tm U ml U ccccccccccccccccfX-A} Uz U r) U t@AK kJK_VA Q^K CaK 1aK#`AK ZA XAK VA WK \K dA r7w  xAK  K  A  K  _  _ U U U U U  U cccccccccccccccccccccccSK>-K #KA U ! U + U }6AK zHA pSAK `[K RaK BcA2aAK#]7 UK VA ZA `K f U lK gmv AK  K  K ccccccccccccccccccccccccccccc2-d(-K K  U #K +K 5K ?A PAtWAKb]KKT`A A_7 4ZA &VA X U[ U aK e7f-fgcccccccccccccccccccccccccccccccccccc -d U " U ) U .K 6K ?K HA YAv_KdbKUaA D^AK 7YKccccccccccccccccccccccccccccccccccccccccccc U$K *K 2A 7A @A KA TKccccccccccccccccccccccccccccccccccccccccccccccccc  U cccccccccccccccccccccccccccccccccccccccccccccccccgdalautotest-3.1.2/gdrivers/data/small.raw0000664000175000017500000000207513701057752017267 0ustar evenevenk{skkk{skksc{cJsRssk{ssk{{c{c{sssckksks{sks{kssksk{kZ{ckcsZ{{s{s{s{kskssckkkssssssss{{{kk{sckc{cssckss{ksc{skscZk{cs{Zccŭc{sc{{ssckk{ckkcs{s{{kssksc{cck{kcccsZ{sk{ss{s{{csc{sskcscJ{sZsksccs{kksks{{k{kskscsk{c{kcs{{k{{{ksks{ks{{c{{{k{{ssZkkkkkc{ss{kc{c{{c{{k{ckksskckZ{ksss{sk{ccsccs{c{ssc{kkckZkskZc{sss{{sc{kckk{kkkscscckssZ{s{{k{{{ZsZcsZcckccksZs{sks{cs{Jsc{ckkskks΄k{{k{k{RccZŭŜskkkkksckZsccέޭ{sZcsZkccZckcc{εk{{{kcRkkkcckŭޜZckcRss業{Z{k{Žŭc{{sR{{{{Zcc{Υsks{{֔Ŕﭥ{֔{Z{ŵŵŌťssŌs{ν潔޽朔Υgdalautotest-3.1.2/gdrivers/data/nitf59.hdr0000664000175000017500000000013613701057753017256 0ustar eveneven0 1 2 3 4 5 6 Selected Projection: Universal Transverse Mercator Zone: 31 9 10 11 12 13 14 15gdalautotest-3.1.2/gdrivers/data/ignfheightasciigrid_ar4.mnt0000664000175000017500000000024613701057753022724 0ustar eveneven-152 -151.5 -16.75 -16.5 0.25 0.25 4 1 1 1 0. x -152 -16.75 4 2 -151.75 -16.75 5 2 -151.5 -16.75 6 2 -152 -16.5 1 2 -151.75 -16.5 2 2 -151.5 -16.5 3 2 gdalautotest-3.1.2/gdrivers/data/pixel_per_line.prj0000664000175000017500000000215413701057753021156 0ustar evenevenProjection ALBERS Datum NAD83 Zunits NO Units METERS Spheroid GRS1980 Xshift 0.0000000000 Yshift 0.0000000000 Parameters 61 40 0.000 /* 1st standard parallel 68 0 0.000 /* 2nd standard parallel -132 30 0.000 /* central meridian 59 0 0.000 /* latitude of projection's origin 500000.00000 /* false easting (meters) 500000.00000 /* false northing (meters) gdalautotest-3.1.2/gdrivers/data/U_4017A.NTF0000664000175000017500000001670313701057753017001 0ustar evenevenNITF02.0004 U241GJJ0 01224425ZJUN94checks a 64x64 mono image with 12 bit JPEG. lincoln. U 00000000000JITC FT HUACHUCA (602) 538-5458 00000000761900040400100120300000060120000000000000000000000000IM000000000101120000ZJUN94 This is an unclassified image in an unclassified NITF file U241GJJ0.NTF U 999998This image will not need downgrading. 0 0000006400000064INTMONO VIS 12RN9This is image comment #1 for the unclassified image #1 from test message J0. This is image comment #2 for the unclassified image #1 from test message J0. This is image comment #3 for the unclassified image #1 from test message J0. This is image comment #4 for the unclassified image #1 from test message J0. This is image comment #5 for the unclassified image #1 from test message J0. This is image comment #6 for the unclassified image #1 from test message J0. This is image comment #7 for the unclassified image #1 from test message J0. This is image comment #8 for the unclassified image #1 from test message J0. This is image comment #9 for the unclassified image #1 from test message J0. C300.01 N 00B00010001006400641200100000000000001.0 0000000000NITFB   &*L   !"1A Q2a #BRq$3 b%C 4r&Sт'5Dc 6ETdest()*+,-.789:;<=>FGHIJKLMNUVWXYZ[\]^fghijklmnuvwxyz{|}~ @@?ꎨ=硗T\M##7>Q>~[/P?F[b\nUKzZV uFmZMCO?rW?cmz_Jnů7IVKy}Iw?/:":ۧxIj1Imv6!/4]ZGw`A,+=_P; ־CL*-}gu]f]_TW;ɈV H8B \`X+z^`5MRb?g@{c<;UwYw#ѯ䲦tյpm;Xi2-Z;Y7RQԗnz_p}xnݯV4JZ7Y͈m>׷֭ͥWP}֩P),Ð#Ok=ߩ]ˠnҺ+]1;e&·o)7J!&(/*5oQ=^]ntaӺ~+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QPmI.$IPtPpPpPtp JqPqUpUPpTm.MPpTpTqUPmNqTPQPpPp$ .MpqtPuTPu.J%PTPQpqPmQ. qQpqtPTPm$Q NMpTPuqu .qPupPT IqPUpQm NITpuPpQ$ IqPQs$ JM.nIn.N%  EN.N%mINII/mII   NIN.IINI .J$INsNI%INu2N$ImPpQJ IIUP. N$IIPpuQJNI)mQTPR!I  TpUp. IUQPUP2INIPptpPuQJN  mUPQPtP. NIQtuPqP2N rPQPtTQ.. /QtpUpQPN.2QTQTPpTp.%N2pPpQUPpQqPQ2 IIRPtQTpuPUQTtTPRJI2pPtQtQTPpPtpQpQpRNQUPQPpPpQuPQPtPTp NptpTqTqTpPtQuPqPQPQPUpTPQTQPpPtTIqPpPpQpuPpqtQtQPQ.IqUTUpTPqTPtPtp. JmpPpQtpTqtQpQTQ2NMPUQtQpIUPTQtPpQmUptPpTPIQpqtPpUQTQ IMPQPpQpmtTPQtPpTRImuptUtTuQPqtPpQTQTQ NMPQpQTpQTQtPpq2NmQtqTpPIUpTpQTQTUPTQMPu%!.                                                                    Im   MNOR.RSnsQpQpuPqPpTI% IM/R/SNSRrQpTPpUpQIN2NRNSNsRUpUqtUpTPt  I)n/.SNSRspPpPqPI%.IRNSNSRQTQtTqtuqTuT. N).NN.3.ROqtPqPQPpPs NE. $ NRORPQPtTPtqtQtQ$mr.$%NNR/RptPqPqTPtPIIEN /N.SQPUPpTpPquPqQۍI N IN.SQpQpQUpUPTPtPڑNJ N R.RtTtPpPpQtQے.)N %NRPQpPuTuQTPpPmnN NNRpPuPpPtQuP)IIN   . N2TPuPuPtQpPTpmmI N NqPpPqPuPTqPpnN .Q.NRPuTtPpTqTq֒.  .PpQIRPpPqTQPtڶ$Ir  QUuTR.nQuPQtqtuPqڶI2pPpPIRPtPtPtڶm  .TpUPUpRNmQpQpQtQtQu۶mR pQpPtpPQIRPtTPtPpPڶ%I 2TQtQPQTp2NnQpqQpQUtPֶi pPtPtpUpQIRPTtPpPQֶr.PUPqQPQTP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QpqTqTPppqP. JN %NPtPpPTQPQPuTPTPpTqUTPT.   . %. N..pQPtQptttPpPqpUqPpPpqU.   NMN  2PtQtQTQPQPtPTPPPTtQTPP.  .N I.QPQPpPpptpQuQtqtpQpQtqT. JI % .tpTqTUPUPTpPPQTQTpTPPP.    %NN QPTqPpPqpQpUtppPtPQqtQ2   N...uPpPuPTPTPPPQUPqPtPTP.  EI I   QPTuPPuptqupptPuPuPqp.   NNNqPpPtQPQPPPPQPpPpPTT   I$. . QtQpPtPttUttPuPUPqq.   .I) .TPtUqPQPQPQPtPtpTP   JI  .QPpPTptpptQpQQPQt.  .N.QPUpQUPUPPuPtTpP.     NN RPpTpPptPtPpQpTR   E)%   .QPqTQQQpUPUpQQ  N.I2pPptTpPpTpTQ     .I.EI  2PQPpUqPQTp. .N$IM   .QQPPtppP2   NI NN ..2.2..  .N$ N N  NI%PtPpUqTUpUpQpPpQpPUpUpuTpTqTpRSOnI.1QPtpQtPqTQTQpTpPtQpTPpPpPTPtQtPTqPPPQPPqPPPqRN.2M%  .QPPtQtPppTpTqQPPTpQTQuPqQtPPqPtTuptpTqTupTRSROn..RPPpQTQQQPPrrrQpPtPtPtPPqTtPQpPPPQPtPPQPR.N.2$N .RTPtpttpusRsRrRqPpQTqTqPQpUpQuTuPqPtQRSSSSOnI   NQPPQPPsnsNsRORRQQPPTpTpTPTpPpPtQRNN.N...N..QQRSRRSRRORORORNRRQRqppPQQRMNnMNIIII%IIJMNNSORONO2ROROROR/.NNNNIIIJN.RNR3RSNSN2.NNII%IN3ON/N.NNI%%NRNMI%$IIII$$J .NNMI$INNNNI  NNI%INnN   .I    IINN I222.2.22.IINN...2Q2.NPptptPupTtTQ2%INNQUQtQR22.2RQtPtUp..NQPPQTQPQpPqptQ.EIN.2PpPtPTpTpTPPPUpQpUEN.QtppptTqTPPUPUEMN   QpUPqPqQPqTqtqPpTPPMMQPUPQPpQuPpptN    QpTpTTpTtPPPTPTpQtp.NN.QtPtQtPTpUQP2PQqPqPPqPuqpqUpQTQ2J pQpTPpQpTpt  .tPtPTuPuPTPTPPpTpp2IIRTPqQtTpQPT        PQtQpPPtPqPupUpQQT.JIqPtPpQPUpqQPpPpUpqPtPPPPtTpPRNI  QPuPUpTpPT  QuTqTPTQtQtuQpPqTQ%.PpPPpUpQt      QPPpPqpPpQPPPtQTPqI2TuQtQPpTq qTqTPTQtPtpQtPpQP2M  .PpPtPtQPp    QPPUqtPtQUPTpQTttpnPUPpQPtTp    qTpPPQpPppQtQpQPQ2.ppUpUpQQPQPqTuPtUPUPpPtPtpQ   QPTpTPtpT     .TpPpPQpptPuTQpQTPINptQpQpTQP       QpUPupTPQPPpPtQtq2INQPTpUPqpTQPpTPPQtupUpQTpPP2NN .TpQpTpTPP    2TqQpUpPPPPUpPQTqQNN.PQTPQpUqT      .PpTpTpUpupTpTqTpQNN.tptqTpPpPQpUPqPTPPPQtQpPPRN  RPQPPPqTUP      2PpPtQpqutPpPTuPRNQPptuTpPpP     QtQPqTPPPQuPqPPQNTqUPQPqTQu .PtTpTpuPpTPtPqQN pPPppTpTpP       QPQpQPUPuPpUPTQM.pUtUPUqPqP     .PtUPtpPpPtQpqQj2PPpPpPpTTq.pPpQPUqUPpTP1MQtQuPuPTqPp       QPuTpTpPpqPq2JQpPtPPqPpTQ     QpPqPqTTUTp2 N .PtPQpTuTQP.QPtTPQppPp2NRPUpUpQpPp2         .QPqPtPUQt2NNQpPpPTPtQ.     QpPuPpPp.NNTQTuPqPR 2QpPuP2NN.ppPpQ1.             .NN.22     NN     NNN%IIIIIIIINJMNNN       NNMJII$ NNMIIN .NJI) %%IIIII$.  NNII%INNNN.NN NNNmIINNII%INNN  NNNNNIIJN    NN   r$INN  NN S%IN   2RQNRENN     RPtpqN  O IMN. QpQTQQRN     .UPTpPpqsJI$.     PppUqTQq rn{                                   !!!"""##$$%%( +*** ) ) ) )PpQpTpPpP2II.RQRNUtPTqQ12.2.2. IIR$PqTpNsmIpuP.   N sIPQ. Ns2.EN    IM m  JJII NImI.   N.mIN .sm%N.  $NI$$J.InIINiM.mNE%M.NI NI$IN%$ .NII  .J%Q..J%ptQ.NIIQTQP2 NEImPpUqQ  NIqQUPTpPQ. NEIptpPqTQ NmPQTP.  NmQtqtqQ mIP2 TuPuQ  $QpPpTQ rqmTpUpQ  iqPTPTQ sIIqPqpqQ MmtTPT2i%qQpQp. mpTpTQ s qPpQ..mtUTQ Pp. NmupQP2 mtQ .MT. mQsI$ .mI$ m R$I.ni sI$Rq.I%II$%mqI$$ڶImmmI$mIEn|              # " !!   ! " #$%&'()*+,./0235689;=?EڶImS ֶIIrڶ($ ֶ$.ֶ%mr۶$I.ֶIrڶII׶I ںmIֶmr۶ֶ$ ڶH%۶ֶIIڷmֶ%ڶmֶ$ڷֶmڶ$ֶֶm$ڶMֶmַIڶֶֶڷڶֶֶڶֶֶڷֶֶֶֶֶֺu                                    , +40-)%     #,B)M         .N$EN. II..J %N.    NN   .IIN N%N    .IJ. II. .I$N.  .%)N M%N QRQRQRQRQ(MQ  .J N.    PpTtPqPpTqTqIIN$I. uPqPuTqPpPUPI%.NIEN.2R2. PTPTUpTuMN.MN.2ptPtPqPQ.upuqpPpPUPpPmIIN2TuPQPuPtQTQ2 uPTPTPpTpPuPQq I.QpPpPuPpPTQptQ.pqUqQpQPpTQq)N2QtQTqTpPUqPpTQPQ.uPTpTtTqTpPqM%N.pQTpPpTQpTpTqPtPtQ2IږPqPQpPqPRN%.QPTqPqTQpPtQPQtPQPQpTQpQIuQ2N$NQPqTpTPtQtQPptPtQtpTqPpTQT%߷rNqPpTQpQpPTpUQPQpPQTpTQtpP $ITpPtPUpQpTptPtQtpPqTpPQTm%qPUpTpUpPQTQTQTQTqPQtqP$ImqPpQPTpTqpTpTpPIImMPtpQqTPTUPUTQPqTqTutI%IQPTpPqPqPpPqTpPpPI$uuuunrI%m%mmImIIm)MIiIiIimImI$m%mI$mHmI( ֶm)$ֶnmI$I()I)H)(H׶ֶֶ۶ֶֶֶֶڶֶֶڶֶڶֶֶֶֶֶֺ׶׺ֶֶڶֶֶֶֶֶֶֶֶֶֶֶֺN\                     #          # ',1C8N   QUPpPpqN.    .TpPtUpTQ JI   QPuPpQpQtq.IN   .qPtPQTtPqmNI    1PqPtpQPuqI   NN   QuTqTQPTpPMM$$I   PpPtpUqTmINN  qtQtQPQPpPmiI   %I   PQtPtPtUMMN  qtPpQPQpPmIm  $N   PUtQuvmI  NM   Q..m% Ni$NN...  sMIRQR1QPqPq)PpTqTpR.ImtPptuPtTqqQPqPUTQ.smqPUPQPqP$MpTtPpQ.m$tPtPtpTqTqIPQpQtQmiqPqQPQPpPqqPtPuPtm$PTpuTuTqMpQPpPIIupqPpPT$ے$$PuIm$mmmI%ےmI%m%Imm۶mI$$mI$mII$ImIm$Imֶ$%imַ)(mnmmnmmnmmֶֶmmۑۑm$ֶֶےmmInַHmֶ$ֶ׶ֶֶַ׶Imֶֶ׶IIIIַ*+,,--..000133446688:9;;==I$mmmmmm$/*p8, CJEUeu OWWW@* " bTA#Ehfa_LayerTableersEhfa_Layerticsarameters840bTA{4096:Cdata,}RasterDMS,.p eRRDNamesListbleersEimg_RRDNamesListameters840@bTA$IMAGINE Nearest Neighbor ResamplingD)Li8u_c_b2g_CopyRaster.rrd(:Band_1:_ss_4_){1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{0:pcstring,}Emif_String,{0:px{0:pcstring,}Emif_String,LayerNames,1:*bExcludedValues,1:x{0:pcstring,}Emif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,BinFunction,}Eimg_StatisticsParameters840,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumrows,}Edsc_Table,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lmin,1:lmax,}Edms_FreeIDList,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{0:px{0:pcstring,}Emif_String,LayerNames,1:*bExcludedValues,1:x{0:pcstring,}Emif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,BinFunction,}Eimg_StatisticsParameters840,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumrows,}Edsc_Table,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lmin,1:lmax,}Edms_FreeIDList,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:bcovariance,}Esta_Covariance,.gdalautotest-3.1.2/gdrivers/data/ignfheightasciigrid_ar1_nocoords.mnt0000664000175000017500000000012213701057753024620 0ustar eveneven-152 -151.5 -16.75 -16.5 0.25 0.25 1 0 1 1 0. éix 4 2 1 2 5 2 2 2 6 2 3 2 gdalautotest-3.1.2/gdrivers/data/int32.tif0000664000175000017500000000362013701057752017104 0ustar evenevenII*Hk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksck @S  JzN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gdrivers/data/stefan_full_rgba_ecwv3_meta.ecw0000664000175000017500000007603213701057753023563 0ustar evenevenecw ftypecw ecw ECW3iecwh3ihdr@@ bpcc"cdefgtif%%ERDAS Ermapper projection (RAW, RAW)|0??ecwcxQK<hiXqxL >!*,/z48A%EJMWK]+bI*AKFS0l )%o\UXABI@x#1WRIdcLdq-|MUQa=[^Y[phuV`Z;RoNk@_eP@]+,t7rj"hkmn3f@(#s@i@!n"@(OT]'aQ/g6/c@>8bK"%D!@B CD4?Sle2FiOy^&<EGNLWEG\fgCm}@5Mj9{J.$vw@6@Z~z_Y@cXHb@T):HJ&Vf۬dLAa?5ҏ`:_?_q$3tb}h RIMjvi m9fư󃘞[Vu-ś4'zR5nzw{\n07_%;e%gzzY=Jnⱇ*\LDxVʺ*ժ5 m&B/h=ڃdsK.<:dyPG$uTWWZ?7]?{>zq3V6sרnm`+&Q T7 o4\5/7ⲇ"fm7W6VE=[kծ["Ӯgߧ쓙bR| CKv:kӥ5(J .,xx`FkYd}S16mQ&Nܹs=@^5'0WoΎA3+Bh lc??oGb@ P-R+%^' ztH)".t S?UԜb5RS*Se0 @E=p 3p] HOypz!T[tQ~EאNIG­~ De^?xWWµ]I`_>Qh6e2*R+#+R?>P,/K==y=kf]a`TΈ/KaE.eR! H,}dP`=(; ;9[^b¨ Kc> O&=C;\u~u+2&3kл4z2շ"&nr4+i21b}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X@`n@-@Ph7@\@8]M[S>T63@S[2@@J<@9@K&@$6@g;# "@vJ@YU_i#@hYkVo0@1@b@@FTDCAB3*Ffrs>I˂ Ud|e+ޔnVS;+*֣NxPeHӋӒҮ>koچƷ-֮ح+˜pٞh5 HFmB<-gǍ?&V 8@ @,@ @)@N@ @ @ @ @L@ @ @e@@ @l@I@@ N!@fT@@ C@ @ @y@ @= @ @@ &@#@@@d@ @ @@@@ @7@ @@$7@@ @m:@ @7@  @U@d@@ @V@@d@@ @h@ @-7@ @ @@"@@ @2 @@ @ @r@@@ @U@@ @ [@@ @3S@@ @#,@@ = @ @@mSlE@X'@@ nDQAoCH%@akWV[YMIL>ZTJGF@@iY@NBR@$@@?T@@b[@i9@@U"@D#@_@KjVB@:@OAW? 30`Ǽ daҰBC~,ilk֫ޠr1Aaؗn|g+7q08:F7ĉ0*FLzw<iYuL@@@)@@@@@@-"@ @@@@@@@@@@*1@Y@'@"@m@@ @ @@@ @@e@Hh7@@3@?!@@ N@@ @@@@@P@Y@c@@ @@T@A@po?@_@M@ @ @@@ @@  @@  @&@@@@@@@@M@ O@7 @@ @@?@@@@@ @@@q@< @ @@@ @D@@@@&:@/@@@ B3@@1@@@8n@@@B@@@@@(@@;@4@= @@@ @@a@ @ @@#-@@@&@@@ B0@ @ @4@@@@@@@@:@ @; @@@8@ @@ D@'@ @@ @ @ @ @@ @ @ @@@ @@@ @@@@L@ a@@@@ @@`@ @@@@C@ @@] @ @@ 4@"@@ %@@#C@ @E(@@@B@@@@T@-@@@@@@V@@@@@@@@ @ @@ @6L@&@$@A@@`@*@ @ @@@'@@@@@@@@@@@ @ @B@A @@@@@@ @@ @ @@@8P -autf@J2013-04-04T09:20:03ZERDAS-QAmeta test gdal image 2012-09-12 Leica ADS-80 python2.7/GDAL v1.10.0.0/ECWJP2 SDK v5.0.0.0 Unknown Intergraph 2013 ERDAS-QA support@intergraph.com
2 Abbotsford Street, West Leederville WA 6007 Australia
+61 8 9388 2900
gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/0000775000175000017500000000000013701057753022257 5ustar eveneven././@LongLink0000644000000000000000000000017700000000000011610 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701060016027215 5ustar eveneven././@LongLink0000644000000000000000000000021500000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/MTD_MSIL2A.xmlgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000004215613701060016027227 0ustar eveneven 2017-08-23T09:40:31.026Z 2017-08-23T09:40:31.026Z S2A_MSIL1C_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE Level-2Ap S2MSI2Ap 02.05 2017-08-25T08:50:10Z Not applicable Not applicable Sentinel-2A INS-NOBS 2017-08-23T09:40:31.026Z 36 DESCENDING SAFE_COMPACT GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B01_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B02_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B03_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B04_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B05_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B06_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B07_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B8A_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B09_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B11_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B12_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/AUX_DATA/L2A_T34VFJ_20170823T094031_DEM_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_SCL_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/L2A_T34VFJ_20170823T094031_SNW_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/L2A_T34VFJ_20170823T094031_CLD_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_AOT_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_WVP_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_TCI_60m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B02_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B03_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B04_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B05_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B06_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B07_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B8A_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B11_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B12_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/AUX_DATA/L2A_T34VFJ_20170823T094031_DEM_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_SCL_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/L2A_T34VFJ_20170823T094031_SNW_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/L2A_T34VFJ_20170823T094031_CLD_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_AOT_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_WVP_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_TCI_20m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B02_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B03_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B04_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B08_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/AUX_DATA/L2A_T34VFJ_20170823T094031_DEM_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_AOT_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_WVP_10m GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_TCI_10m NODATA 0 SATURATED 6 3 2 1 10000 10000 1000.0 1000.0 0.97 1913.57 1941.63 1822.61 1512.79 1425.56 1288.32 1163.19 1036.39 955.19 813.04 367.15 245.59 85.25 4.05258688 3.79421934 4.19056789 4.516256 5.19904998 4.86711284 4.52865796 6.19052531 5.13233152 8.52613546 55.22178219 35.32963486 106.39533241 0 SC_NODATA 0 SC_SATURATED_DEFECTIVE 1 SC_DARK_FEATURE_SHADOW 2 SC_CLOUD_SHADOW 3 SC_VEGETATION 4 SC_BARE_SOIL_DESERT 5 SC_WATER 6 SC_CLOUD_LOW_PROBA 7 SC_CLOUD_MEDIUM_PROBA 8 SC_CLOUD_HIGH_PROBA 9 SC_THIN_CIRRUS 10 SC_SNOW_ICE 11 57.7 22.6 57.6 24.5 56.7 24.4 56.7 22.6 57.7 22.6 POINT 1 EPSG GEOGRAPHIC L2A_T34VFJ_A011330_20170823T094252 L2A_T34VFJ_A011330_20170823T094252 L2A_T34VFJ_A011330_20170823T094252 http://data_public:GDdci@data.cgiar-csi.org/srtm/tiles/GeoTIFF/ GlobalSnowMap.tiff 86.3 0 0 PASSED PASSED PASSED PASSED PASSED 0.0 0.0 1.0 4.1 5.0 0.4 2.9 1.6 28.9 36.1 19.3 84.4 0.2 0.0 0.0 0.0 ././@LongLink0000644000000000000000000000020700000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701057753027233 5ustar eveneven././@LongLink0000644000000000000000000000025200000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701060016027215 5ustar eveneven././@LongLink0000644000000000000000000000026300000000000011604 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701057753027233 5ustar eveneven././@LongLink0000644000000000000000000000027000000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701057753027233 5ustar eveneven././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B05_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B11_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B03_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_AOT_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B02_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B07_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_SCL_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_TCI_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_WVP_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B06_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_VIS_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B8A_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B04_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R20m/L2A_T34VFJ_20170823T094031_B12_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000027000000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701057753027233 5ustar eveneven././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B04_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_TCI_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_AOT_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_WVP_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B02_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B03_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R10m/L2A_T34VFJ_20170823T094031_B08_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000027000000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701057753027233 5ustar eveneven././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_AOT_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B05_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B04_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B11_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B12_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_SCL_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_TCI_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B07_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B09_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B06_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B02_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B03_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B8A_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_B01_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/IMG_DATA/R60m/L2A_T34VFJ_20170823T094031_WVP_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000026200000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000775000175000017500000000000013701057753027233 5ustar eveneven././@LongLink0000644000000000000000000000030400000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/MSK_CLDPRB_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000030400000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/MSK_SNWPRB_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000030400000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/MSK_CLDPRB_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000030400000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/QI_DATA/MSK_SNWPRB_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000067613701057753027246 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000026400000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T34VFJ_20170823T094252.SAFE/GRANULE/L2A_T34VFJ_A011330_20170823T094252/MTD_TL.xmlgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2Ap/S2A_MSIL2A_20170823T094031_N0205_R036_T30000664000175000017500000000732513701060016027226 0ustar eveneven S2A_USER_MSI_L2A_TL_SGS__20170823T133142_A011330_T34VFJ_N02.05 S2A_USER_MSI_L2A_DS_SGS__20170823T133142_S20170823T094252_N02.05 NOMINAL 2017-08-23T09:42:52.161Z SGS_ 2017-08-23T14:08:32.325838Z WGS84 / UTM zone 34N EPSG:32634 10980 10980 5490 5490 1830 1830 600000 6400020 10 -10 600000 6400020 20 -20 600000 6400020 60 -60 86.3421 0 0.000000 0.000000 1.058892 4.194147 5.036503 0.448578 2.938666 1.662363 28.919381 36.154309 19.373934 84.447624 0.213228 0.0 0.0 0.0 L2A_T34VFJ_20170823T094031_CLD L2A_T34VFJ_20170823T094031_SNW L2A_T34VFJ_20170823T094031_PVI gdalautotest-3.1.2/gdrivers/data/WMTSCapabilities.xml0000664000175000017500000000721513701060017021257 0ustar eveneven Stripped from BaseMap original service OGC WMTS 1.0.0 none RESTful RESTful Basemap 8.782379 46.358770 17.189532 49.037872 geolandbasemap image/png google3857 google3857 977650 5838030 1913530 6281290 urn:ogc:def:crs:EPSG:6.18.3:3857 urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible 0 559082264.029 -20037508.3428 20037508.3428 256 256 1 1 1 279541132.015 -20037508.3428 20037508.3428 256 256 2 2 gdalautotest-3.1.2/gdrivers/data/jrc.ecw0000664000175000017500000021440113701057753016721 0ustar eveneveneP\(0@\(0Az^SARAW3RAW3@ddPa&bF8e5MԄ>ZVecCmYgX IxO?d[/04:9685'9*#3-J^z |]PbaFt_w\GL`}; QrknE7Hyou qMpSUvR<=1sKjBD W{Nlh@A~fiTL&2d"##########3L&2d2L&5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ew ~SFq2:}_4{9tcDu{x76Hٚl\g2t䐓}2'lAxQAԇ}WYZ ޿!4}2i8ޚI`>xE}zԃtvo+AdHSEN cݗG& &yYN^"E=:!,G4z%)P? k#eWh׉lG0ʅ co2Eres|^1{|)" *8V̡aA`]^G-}EKyqA 0@;i{?[ ӻbz`7dt6DS5' >DWL2Bv1PÉzHdTl!XJ`YG82ږ5< \C2ɺIo5ԺٖP/ B]y;0Ky?0Z$t);:,DH;G \,m׾1d>6  }m9,\K":F]ͼbqw,ҿ3巔 Tw{[`ϋטp35tG4tT0߸tqѻq )c&tWT}=^w'lK# t\oi*)g%cPOuWo|_ʋ«jx1`2~'[N`<P?E9ZEtwԻ<muHzMc8xMETA FAKE_XMP gdalautotest-3.1.2/gdrivers/data/test_ogr_nc4.nc0000664000175000017500000026343013701057753020365 0ustar evenevenHDF  g0OHDR-бVбVбVбVs"!Z I ' ConventionsCF-1.6 <GDAL"GDAL 2.1.0dev, released 2015/99/99 Rhistory5Tue Feb 09 20:48:39 2016: GDAL Create( test.nc, ... ) (ogr_layer_nametest & featureTypepointOHDR-бVбVбVбV!   +CLASSDIMENSION_SCALE$h&WJ&9OCHKrOCHK ZNAME@This is a netCDF dimension but not a netCDF variable. 0UOHDR-бVбVбVбV!    +CLASSDIMENSION_SCALEhNz'8vOCHK LDIMENSION_LISTOCHK ZNAME@This is a netCDF dimension but not a netCDF variable. 3^OHDR-бVбVбVбV ?@4 4+GLs :standard_nameprojection_x_coordinateG unitsm؟&FHIBp]p[pY`OCHK 9 long_namex coordinate of projectioneOHDR-бVбVбVбV ?@4 4+GMs :standard_nameprojection_y_coordinatefG unitsmFSSEMOCHK 9 long_namey coordinate of projection]ehOHDR-бVбVбVбV ?@4 4+GLs + long_name z coordinate )standard_nameheight KOCHK (ogr_field_typeRealOCHK axisZ unitsm=OHDR-бVбVбVбV* Rx5FSSEu>$WOHDR-бVбVбVбV;   +M * long_name Field int32 )ogr_field_nameint32; t LDIMENSION_LIST1OCHK +ogr_field_typeInteger 5 grid_mappingtransverse_mercator}FRHPK  (MLPBTHDd( }eBTHD  d( {aFSHDwPx( %%ǣ +BTLF-L L KX Z20GD\JHViI`A[6Wמ`U 8u ]:úPWX56#BTLF :PWGH6WZ-UiIL u gOCHK & coordinatesx y z;NOHDR-бVбVбVбV   +{0 8 _FillValue { LDIMENSION_LISTOHDR-бVбVбVбV ?@4 4+G , long_name Field float64 +ogr_field_namefloat64 6FRHPN!  6 _FillValueSUZ3/OHDR-бVбVбVбV   +XF LDIMENSION_LIST1ÉOHDR-бVбVбVбV   +(kN 8 _FillValue (kUZ/pZOHDR-бVбVбVбV @+V LDIMENSION_LIST -OHDR-бVбVбVбV @+^ < _FillValue@VZ'OCHKpg LDIMENSION_LIST 8OCHKw LDIMENSION_LISTZ %OCHKo LDIMENSION_LIST6.OCHK LDIMENSION_LIST 8ÍFHIB pcp_#mT<OCHK` LDIMENSION_LIST+)OCHK l0REFERENCE_LIST6datasetdimension .(OCHK LDIMENSION_LIST)OCHK \DIMENSION_LIST  K+OCHKX LDIMENSION_LIST+c(OCHK LDIMENSION_LISTOCHK( LDIMENSION_LIST tOCHK LDIMENSION_LIST(OCHK LDIMENSION_LISTx[OCHK LDIMENSION_LIST7OOCHK LDIMENSION_LIST;m(OCHK LDIMENSION_LISTOCHK LDIMENSION_LISTOCHK8 LDIMENSION_LISTOOCHKx LDIMENSION_LISTZOCHK LDIMENSION_LIST4JOCHK LDIMENSION_LIST0OCHK LDIMENSION_LISTѬOCHK LDIMENSION_LIST!,6POCHKh LDIMENSION_LISTOCHK <0REFERENCE_LIST6datasetdimension j =,.y0G2!4G5679:<=-?I@A4CPDlEFGHIJ6FHDBp uint_fieldGuint_field_explicit_fillValueH uint64_fieldI uint64_field_explicit_fillValueJFHDBي(int64varG5int64var_explicit_fillValue6boolean7boolean_explicit_fillValue9float32:float32_explicit_fillValue<int16=int16_explicit_fillValue-? byte_fieldA ubyte_field4Cubyte_field_explicit_fillValuePD ushort_fieldlEushort_field_explicit_fillValueFFHDBrecordtwodimstringchar_max_widthxjyztransverse_mercatorP int32 int32_explicit_fillValue=float64 float64_explicit_fillValue string3chars, twodimstringchar. datey0 datetimeG2datetime_explicit_fillValue!4x1I@FHDB Jj spatial_refTPROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32631"]]FHDB 'grid_mapping_nametransverse_mercatorlongitude_of_central_meridian ?@4 4@false_easting ?@4 4Afalse_northing ?@4 4latitude_of_projection_origin ?@4 4!scale_factor_at_central_meridian ?@4 4x#? long_nameCRS definitionlongitude_of_prime_meridian ?@4 4semi_major_axis ?@4 4@TXAinverse_flattening ?@4 4mtr@TREE TREE!)TREE19A??G@@G@GG{{+B?GG+B?^@^@#%'STR@GG~2zAGG~2zA^@^@qqqq{{?||?BB{ {{@GG(k(k(kqTREEIMQTREEUY]TREEaiqTREEyTREETREEĀǀTREEʀҀڀTREETREE TREE"TREE*2:TREEBCDTREEEFGTREEHLPTREETX\TREE`bdTREEfhjTREElt|TREETREETREETREETREETREETREETREETREEɁсفgdalautotest-3.1.2/gdrivers/data/L71230079_07920021111_B61.FST0000664000175000017500000000000013701057753020654 0ustar evenevengdalautotest-3.1.2/gdrivers/data/CSK_GEC.h50000664000175000017500000003041013701057753016773 0ustar evenevenHDF  1` @TREE HEAPXS01H XMap Projection Centre ?@4 4-@ P$Ground Projection Reference Surface ELLIPSOID PMap Projection Scale Factor ?@4 4x#? PEllipsoid Semimajor Axis ?@4 4@TXA p"Scene Centre Geodetic Coordinates ?@4 4VJ|uF@:(@ 8Ellipsoid DesignatorWGS84 @ Map Projection Zone! 0 Mission IDCSK 0 Product TypeGEC_B @ Datum Scale ?@4 4? ` Map Projection False East-North ?@4 4A PEllipsoid Semiminor Axis ?@4 4u?XA XDatum Rotation ?@4 4 X Datum Shift ?@4 4 0Projection IDUTM HScene Orientation ?@4 4Fe@h TREEHEAPX B001QLKSBI8SNOD` hCentre Geodetic Coordinates ?@4 4mPaqF@QPc(@ 8TREEHEAPXXPSNOD @( {NpTREE/0'( P{N p"Bottom Right Geodetic Coordinates ?@4 4I^F@$T|)@TREE+- XBottom Left East-North ?@4 4"A@3RA XTop Left East-North ?@4 4"A SA @Column Spacing ?@4 4@ @ Line Spacing ?@4 4@ p!Bottom Left Geodetic Coordinates ?@4 4 [\F@CU(@ XTop Right East-North ?@4 4@A SA hTop Right Geodetic Coordinates ?@4 4šF@.X4u)@ XBottom Right East-North ?@4 4@A@3RA hTop Left Geodetic Coordinates ?@4 4-F@K(@gdalautotest-3.1.2/gdrivers/data/byte.mbtiles0000664000175000017500000001000013701057753017754 0ustar evenevenSQLite format 3@  - IgtablemetadatametadataCREATE TABLE metadata (name TEXT, value TEXT)BctabletilestilesCREATE TABLE tiles (zoom_level INTEGER NOT NULL,tile_column INTEGER NOT NULL,tile_row INTEGER NOT NULL,tile_data BLOB NOT NULL,UNIQUE (zoom_level, tile_column, tile_row) ))=indexsqlite_autoindex_tiles_1tiles %@ b͉PNG  IHDR{`IDATxˎômED,XEJ.*F.-QI mƞS;$y J髪o2:u?_4eۦmZtޛM);_7o۷hۺCtݢe6`&}ުw{׮Y5CO[A lЦc;]gdpR^EWZ싞w߱c۾a}7]ZzlҶͺg=Z`Ծбi֡IgҮC}7M-0']߷}-{ؾumתw ZpRzۤo֤MFlҴ6IͻjӬtlնEMNjU]uzm]6ݷjeփ'IoԼǎ=tW]tߛڶhg]Z`Nikաc:gռqz}MmtO=vqo;hoE˖7VvyC> Z`Nu~Uq7]mӸQ.zGҳ~UjMκn٦Ok-0'5ֽ]iզUo:Zt׫S~h}رǁo _DRIENDB`   b A]OA maxzoom11 minzoom11Sbounds-117.6420540294745,33.89160566594387,-117.6290077648261,33.90243460427036 formatpng version1.1#descriptionbytetypeoverlay namebytegdalautotest-3.1.2/gdrivers/data/offscale_byte.tif0000664000175000017500000000167013701057753020756 0ustar evenevenII*(S     -0.00395256916996050006 1.00395256916999998 N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/uint32.cot0000664000175000017500000000660013701057753017276 0ustar eveneven N@AN@LA? C:\freeware\gdalautotet-1.3.2\gcore\data\uint32.tif.auJ?|8|2|||006<<l@22.92847676Dzx-</<-xDEx rxxExEx<-</<<<6 x-@&|L%|A@`@|%|%|2%|@B@BM@@|$|dN:M$|p&|,%|A&|l%|A@`|%|%|2%|@B5N@BM@@|$|dNk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/rgb.ntf0000664000175000017500000002036013701057753016725 0ustar evenevenNITF02.1005BF01GDAL 20021216151629 U 00000000000 00000000843200040400100052800000075000000000000000000000000000IMMissing 20021216151629 U 0Unknown 0000005000000050INTRGB VIS 08RG225557S0445025W225557S0444007W230615S0444007W230615S0445025W0NC3R N 0G N 0B N 00B00010001005000500800100000000000001.0 0000000000 PxfbfJMolGPRNTY\%jybccbRRZlX^NRh^Z^ts`YR^ZTZUWSP\W_`Q Do}ka|]YWW_cSVTST3MONSHsdeiffReZ`Z]TXSVLRPWWEmihbkq]ZgGC[OUUTDZT@KTPgsil^odTujf]T]\ZMZSMMKU.pong`lcTMVT|\QSNHSYN\WJUHnhqcYZaS`GH`\RZSWHTMRXIUTTdMOLMWjMbWoAXbgJSVOXVQUXl]\TW]cfY\RMUSUbVVR[MPd[R^ZN\RCUWQOQSYLRNPUZVLMTeZJWXIWQVVW[T[^Z\ZX`[QZSI-XZR%JGTKVOPQYXYWXUWk~tUaNO=ZNU:N[UkXVI>YOT\BREFRZ\U\d`tv=NY^MVV\?HJfXYKWSP]J\NM`P[Z[ZVn[URtTUOFYSVNTTYHUORNTKTURSYT[cd]\EVFJU|pVzvLYTLZTOU\ZHRZ`JLsSXmUXsVNkaLGrmfUMW]_[bbg@dX1:X|bn^F?orS%qbcL>_SrHJWbh]^X@MB?X\n.6RedE2*Vo\lxHWGgqd_`HTO@AnY][UYq^ynLjrbifh^SSRSXRTdQIX@lhJKaZoUOFV6Fezq_ddOLNQKMMQOPVPSZOKVV^EUaoKBbv niPr`ONkfPMY[XRtuoai_Zcg_hsiTX:?SRxvysiSZ^gW~jYR`s=1Fhrgu~|{ynv{uj\0gi0Aprmmj][PlL~WhHS3nos~xnz||jrsMrq_lq|khZ_Q/Icpd_LkbP2Ed]cV[HOTz^qtg_cd^JLQ\SMWazvrm6"nnhcVISSOOofV3VRHTB<_hhionpukjv`]SLV#/yi`ffgsbZW48^b}ijtqX7akhoipojsz}zY&KpVHWWIe\]n_1+CYjpwioM<`kikarnpptn8SRq]]VMPUOfKeyjPOvBPbUdbTGAgclerk_\B2[HiLXFF>Acs;3K^VGdSOc*GMTnU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."& %  "" 7&!)1+ # " R$/$*/%9.+#%$"#9),&!.$A""$!/<)4& !'' %#! %)/(7)/" &1"$#&)$* %>*$ #"#".4% ""#&$%#+&&! 764( 5H@) &!%-0%8')!- &   *(@UR@$( &". !$'%*!! 6(%!N? ! /'!  ")(!#!( $&! # %1(5$!( #!#AM=:( C7'$>#"/#2GS9!1J)" -L(!'$ $1$'!".7CW9(#! ' !>'"$, '!3%+#(|I)"#%1 &(-'7G%&+@3W|[.% -  "+(+G7=(2!,3]?  "%''''! -,++)5!' KN*&!*#/#5)"&+/AH%$&"#*(!. R?3A4,;RPf8%!*" &"( ?4Z$)D%1BGH8P$9TT53!!$%#(*3 )! 'F&2+B@ U)F:C & (5!*0!" ";'()>'JA #:/%%.( #$4! %  1')%*@r19*+.CM"-.1'$,$ 0,+ 2&.fJ?.987?2:;$M,(+,5#$';G;4:1#3/1P&24.;565,J<@ ("*;$#$$(# /#7, ;775'%#)'(-+/1*)7 )C$%/ J,0("*,+;*  *I)A++21'-%+%,*%,54?;")/2%Q<*!-"$6- !04O6*4&.(),'()/<+)/441*3"#!"52A4E#Z)**b-$(+('9@*0441-3  2D #$4%%#9&"25,6+./0-&"(#-2$ '%("(-)5<8'7--./K9.4/="/743=:?33&* 3;78194+5#.@,-00,/.>)1 #++F8#=/!%&("%('05-9B)+66'/43001:!4GL6 L069:4&+!,53>+&93?3?=')>'/2552G=??;Mk/0K@ ")-2K?=B7,*: 1264033:~3P>E>CdQ1! 0B)N#,5( 1542B)5520,..gdalautotest-3.1.2/gdrivers/data/trmm-nc2.nc0000664000175000017500000002151013701057753017421 0ustar evenevenCDF  longitude(latitude(time CDIGClimate Data Interface version 1.5.2 (http://code.zmaw.de/projects/cdi) ConventionsCF-1.4historyWed Sep 07 22:35:46 2011: cdo -f nc2 copy trmm.nc trmm-nc2.nc Wed Sep 07 22:33:59 2011: cdo sellonlatbox,-80,-70,-20,-10 tmp4-noc.nc tmp5.nc Wed Sep 7 22:33:53 2011: ncatted -a Conventions,global,d,, tmp4.nc tmp4-noc.nc Wed Aug 24 12:59:04 2011: ncatted -D 10 -a CoreMetadata.0,global,d,, -a ArchiveMetadata.0,global,d,, tmp3.nc tmp4.nc Tue Aug 23 21:04:45 2011: cdo seltimestep,1 tmp2.nc tmp3.nc Tue Aug 23 19:19:18 2011: cdo selvar,pcp tmp1.nc tmp2.nc Tue May 17 19:34:24 2011: cdo sellonlatbox,-85.25,-29.625,15.25,-50 3B43.2011.nc tmp1.nc Tue May 17 19:26:31 2011: cdo mergetime 3B43.110101.6A.nc 3B43.110201.6A.nc 3B43.110301.6A.nc 3B43.110401.6A.nc 3B43.2011.nccalendar standardcommentsbfile created by grads using lats4d available from http://dao.gsfc.nasa.gov/software/grads/lats4d/model geos/dascentergsfcCDOHClimate Data Operators version 1.5.2 (http://code.zmaw.de/projects/cdo)  longitude  standard_name longitude long_name Longitudeunits degrees_eastaxisX@latitude  standard_namelatitude long_nameLatitudeunits degrees_northaxisY@ time  standard_nametimeunitshours since 2011-01-01 00:00:00calendarstandard @pcp  long_nameprecipitation:Precipitation _FillValue?commentsUnknown1 variable comment grid_namegrid-1level_descriptionEarth surfacetime_statisticinstantaneous HSSSSSSSSSxShSXSHS8S(SSRRRRRRRRRxRhRXRHR8R(RRQQQQQQQQ333`3 222`2 111`1 000`0 //@..@--@,,@++@**@))@((@''@&&@%%@$$@;8 ;W9 :>D 9D : 8) 9h 89D :]:}: 9 8) 9}9Sh 9) 9 8) 66i8v:ga;ň9h :!: :) :}:D :D : :) 8) 8) 9}9Sh 9 8 9) : j9D 9}9) 8;>D 99D 9D 9}6>X78`a989 8) :;|9}9D 9}: ;K:H 9};xg;N ;xg99}:h8) 9:>D 98) 9D 9 9D 99}9}8 838!8:49}:!:>D 8) 8) :}9) ;py;W:Í ;ň9;;;;U;.i 9;8:] 8) 8 8) 9) 9 :Sh 9h : 9Sh 983*8j \9L+:˨8) 9h 8) :H 9 8) ;;I;_;y< H8 8 988 : 999) :D :j8 8 8) 8 9}9 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DIMENSION_SCALE "NAMEZ 4 _Netcdf4Dimid v= OCHKB@f325;OCHK 4 _Netcdf4Dimid  6jBBHBAHAHBzDD@@@@@@AA A A@A@A`A`AAAAAAAAAAAAAAAAABBBBBBBB B B(B(B0B0B8B8B@B@B@@@@"@"@(@(@.@.@2@2@5@5@8@8@;@;@>@>@@@@@B@B@C@C@E@E@F@F@H@H@I@I@K@K@L@L@N@N@O@O@P@P@@Q@@Q@R@R@??@@@@@@@@@@@@@@AAAA A A0A0A@A@APAPA`A`ApApAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBB B BBBBBBBBB B B$B$B(B(B,B,B0B0B4B4B8B8B;=3;7NRbZYZd\R8GTWYXklndjptr}6Fkh7By "%10665@KLTYTYZb`:2JIOPSWba`clpi}FpvOBݪ}wq   +$%(.138LGR]YSNH:46>GH:<SVk`^hmip #7aurwU?om_   &/*4(6DTSLQ,A)1++)(%-K[H2]ffnt)0Ts`]rS,kcVVy 5,<'   ',*0:OdtvWVAPEB.CM l`XWb1<5;     !1NId`T>=MD8&BN jbYKe:A@2   "&$(07JV}r]SZ>:HE6"@g ha[Ka~ - "%$'*) $->Lb}w[]JKM:8D<1B iX[KUw     !##+-&01D[b{qh_I=GE52962Dw jYU]cT ""%,."& +%7B]qrgdUE4;>32745Ci_[KKK{  #'+$#%%"!-5CPif^SI:7@/'/35Bi`QKKhb   !))"%'&))*5<ZSWG@99:0203 @bZMKKi^s{  $((/%&.4$+BNGZF;"(.+7.) @2]SPLKKff}))'&$)'13&61D=3+()'!6,"DXRNLKKQdju !! #'/)-#*"5**"(,,0&Eb}VPLKKKK^`iw &*++$($!*01'D_VNMKKKKU]be~ '(/-! $'+15"B˪[TLLNMKKKZ`bmw"+-.0++.'! 0#&,* DcZVLLNKKKKXZfgr| ('(%!!%!+ BskbWVMLMKKKKT[Zfjx   &* &,$ @uri`WTLLMKKUOK[U`gv{w   2;." @Fq^`WTNNKKQKKKKU_got    7hB*%CofRWSNKLKKKKKKV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KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKYWdhfitvswtty5nvvtonihd^[\\XTKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK]^[dahjejeq~5wwonji^_[YVSTTKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKU[XUeYYfinn~4xx~fda^XYYWTOMLKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKQNNRUbk]`oz}3>gdalautotest-3.1.2/gdrivers/data/trmm-2x2.nc0000664000175000017500000000376013701057753017361 0ustar evenevenCDF  longitudelatitudetime CDIGClimate Data Interface version 1.5.4 (http://code.zmaw.de/projects/cdi) ConventionsCF-1.4historyWed Oct 24 12:54:08 2012: cdo selindexbox,0,2,0,2 trmm.nc trmm-2x2.nc Wed Sep 07 22:33:59 2011: cdo sellonlatbox,-80,-70,-20,-10 tmp4-noc.nc tmp5.nc Wed Sep 7 22:33:53 2011: ncatted -a Conventions,global,d,, tmp4.nc tmp4-noc.nc Wed Aug 24 12:59:04 2011: ncatted -D 10 -a CoreMetadata.0,global,d,, -a ArchiveMetadata.0,global,d,, tmp3.nc tmp4.nc Tue Aug 23 21:04:45 2011: cdo seltimestep,1 tmp2.nc tmp3.nc Tue Aug 23 19:19:18 2011: cdo selvar,pcp tmp1.nc tmp2.nc Tue May 17 19:34:24 2011: cdo sellonlatbox,-85.25,-29.625,15.25,-50 3B43.2011.nc tmp1.nc Tue May 17 19:26:31 2011: cdo mergetime 3B43.110101.6A.nc 3B43.110201.6A.nc 3B43.110301.6A.nc 3B43.110401.6A.nc 3B43.2011.nccalendar standardcommentsbfile created by grads using lats4d available from http://dao.gsfc.nasa.gov/software/grads/lats4d/model geos/dascentergsfcCDOHClimate Data Operators version 1.5.4 (http://code.zmaw.de/projects/cdo)  longitude  standard_name longitude long_name Longitudeunits degrees_eastaxisXlatitude  standard_namelatitude long_nameLatitudeunits degrees_northaxisYtime  standard_nametimeunitshours since 2011-01-01 00:00:00calendarstandardpcp  long_nameprecipitation:Precipitation _FillValue?commentsUnknown1 variable comment grid_namegrid-1level_descriptionEarth surfacetime_statisticinstantaneousSS33;8 ;W;ňgdalautotest-3.1.2/gdrivers/data/cf_lcc1sp.nc0000664000175000017500000000676013701057753017631 0ustar evenevenCDF time1yx ConventionsCF-1.0Originating_center0US National Weather Service (NCEP) subcenter = 5Generating_Process_or_ModelForecastProduct_StatusOperational products Product_TypeForecast products cdm_data_typeGRID creator_name0US National Weather Service (NCEP) subcenter = 5 file_formatGRIB-2historyMon Oct 24 23:43:48 2011: ncatted -a missing_value,Total_cloud_cover,d,, cf_lcc1sp.nc.ok Direct read of GRIB-2 into NetCDF-Java 4.0 API; Synthetic dataset from TDS fmrc (best) aggregation, original data from fmrc/NCEP/NDFD/CONUS_5km_CoordinateModelBaseDate2010-01-09T12:00:00ZHistoryTranslated to CF-1.0 Conventions by Netcdf-Java CDM (NetcdfCFWriter) Original Dataset = NDFD-CONUS_5km_best.ncd; Translation Date = Tue Feb 23 14:09:34 MST 2010 Total_cloud_cover long_name%Total_cloud_cover @ entire_atmosphereunitspercent grid_mappingLambert_ConformalGRIB_param_disciplineMeteorological_productsGRIB_param_categoryCloudGRIB_param_nameTotal_cloud_cover GRIB_param_idGRIB_product_definition_type+Analysis/forecast at horizontal level/layerGRIB_level_typeGRIB_VectorComponentFlag gridRelative coordinates time1 y x missing_valueh time1 units hours since 2010-01-09T12:00:00Z long_nameforecast time coordinate standard_nametime_CoordinateAxisTypeTime y unitskm long_namey coordinate of projection standard_nameprojection_y_coordinate grid_spacing5.07947216796875 km_CoordinateAxisTypeGeoYp $x unitskm long_namex coordinate of projection standard_nameprojection_x_coordinate grid_spacing5.07936083984375 km_CoordinateAxisTypeGeoXX Lambert_Conformal grid_mapping_namelambert_conformal_conicstandard_parallel@9longitude_of_central_meridian@platitude_of_projection_origin@9 earth_shape6Earth spherical with radius specified by producer in mspherical_earth_radius_metersAXM_CoordinateTransformType Projection_CoordinateAxisTypes GeoX GeoY BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@V@\8p@fa@@@pIY@zgξ@۪C}@[&@- ",@U@~mId@܋#@o@t@!/a@I*^ g7DohqTw]IṖ 4-C D^{ ] xi4#dgdalautotest-3.1.2/gdrivers/data/small1bit.rrd0000664000175000017500000002120013701057753020035 0ustar evenevenEHFA_HEADER_TAG &{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.l! Z?DependentFileEimg_DependentFilebsmall1bit.imgM !4RasterDMSEdms_State/Mٮwpkyyv[deweڻុڿƾռwwűٷͧ٬ڹ! Ehfa_LayerEhfa_Layer {4096:cdata,}RasterDMS,.rootroot !Layer_1Eimg_Layerl!l"_ss_16_Eimg_Layer_SubSample@@gdalautotest-3.1.2/gdrivers/data/vicar_int16.vic0000664000175000017500000000100013701057753020260 0ustar evenevenLBLSIZE=368 FORMAT='HALF' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=8 ORG='BSQ' NL=3 NS=4 NB=1 N1=4 N2=3 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-64-LINX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 TASK='GEN' USER='vos'  LBLSIZE=120 DAT_TIM='Thu Oct 17 16:46:44 2019' IVAL=1.0 SINC=1.0 LINC=10.0 BINC=1.0 MODULO=0.0 gdalautotest-3.1.2/gdrivers/data/39109h1_truncated.dem0000664000175000017500000004332313701057753021124 0ustar eveneven39109h1_grd 39109h1_grd 1 1 1 12 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 2 2 4 0.660060000000000D+06 0.441536000000000D+07 0.660060000000000D+06 0.442946000000000D+07 0.671040000000000D+06 0.442946000000000D+07 0.671040000000000D+06 0.441536000000000D+07 0.152259997558594D+04 0.225310009765625D+04 0.000000000000000D+00 00.100000E+020.100000E+020.730500E-01 1 2 2 1 1 1 1411 1 0.660060000000000D+06 0.441536000000000D+07 1522.599975585937500 0.171347965748291D+04 0.171501370773926D+04-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 2634 2623 2620 2616 2613 2613 2615-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 1 2 1411 1 0.660070000000000D+06 0.441536000000000D+07 1522.599975585937500 0.168740080312500D+04 0.171698605806885D+04-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 -32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 2256 2263 2271 2279 2287 2296 2309 2320 2334 2345 2363 2397 2453 2498 2538 2589 2661 2639 2631 2517 2517 2528 2533 2528 2589 2613 2645 2639 2641 2642 2642 2643 2643 2641 2641 2638 2638 2639 2638 2638 2637 2634 2632 2637 2634 2628 2624 2617 2612 2608 2604 2602 2604 2606-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767-32767 gdalautotest-3.1.2/gdrivers/data/bytemff.b000000664000175000017500000000062013701057753017376 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/netcdf-sg/0000775000175000017500000000000013701057752017312 5ustar evenevengdalautotest-3.1.2/gdrivers/data/netcdf-sg/multipoint3D_test.nc0000664000175000017500000000260013701057752023264 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometryd$x_nodes units degrees_east standard_name longitudeaxisXy_nodes units degrees_north standard_namelatitudeaxisY(z_nodes unitsmetersaxisZncount  long_name node counthnames_geometry  geometry_typepointnode_coordinatesx_nodes y_nodes z_nodes node_countncount|Trail_1Trail_2Trail_3Trail_4Trail_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$?@@@ @"$@@@@ "@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/corrupted_polygon_pnc.nc0000664000175000017500000000454413701057752024261 0ustar evenevenCDF shapes_node_coordinatesshapes_node_countshapes_part_node_countshapes_field_NAMES_max_width  ConventionsCF-1.8GDAL3GDAL 3.1.0dev-9b1844d3e9-dirty, released 2019/08/02historyBFri Aug 02 20:32:03 2019: GDAL Create( fillvalue_polygon.nc, ... )  shapes_crs grid_mapping_namelatitude_longitude long_nameCRS definitionlongitude_of_prime_meridiansemi_major_axisAXT@inverse_flattening@rtm spatial_ref.GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]shapes  geometry_typepolygonnode_coordinatesshapes_coordX shapes_coordY node_countshapes_node_countpart_node_countshapes_part_node_count interior_ringshapes_interior_ring grid_mapping shapes_crsshapes_node_count shapes_part_node_countshapes_interior_ring shapes_coordX axisX standard_name longitude long_name longitudeunits degrees_east shapes_coordY axisY standard_namelatitude long_namelatitudeunits degrees_northshapes_field_NAMES  long_name Field NAMESgeometryshapesogr_field_nameNAMESogr_field_typeStringogr_field_width grid_mappingcrs@ $| ??@@@@@@ @@@ @ ????????TriangleSquare_in_SquareTriangle_Flippedgdalautotest-3.1.2/gdrivers/data/netcdf-sg/corrupted_polygon_ncpncir.nc0000664000175000017500000000454413701057752025135 0ustar evenevenCDF shapes_node_coordinatesshapes_node_countshapes_part_node_countshapes_field_NAMES_max_width  ConventionsCF-1.8GDAL3GDAL 3.1.0dev-9b1844d3e9-dirty, released 2019/08/02historyBFri Aug 02 20:32:03 2019: GDAL Create( fillvalue_polygon.nc, ... )  shapes_crs grid_mapping_namelatitude_longitude long_nameCRS definitionlongitude_of_prime_meridiansemi_major_axisAXT@inverse_flattening@rtm spatial_ref.GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]shapes  geometry_typepolygonnode_coordinatesshapes_coordX shapes_coordY node_countshapes_node_countpart_node_countshapes_part_node_count interior_ringshapes_interior_ring grid_mapping shapes_crsshapes_node_count shapes_part_node_countshapes_interior_ring shapes_coordX axisX standard_name longitude long_name longitudeunits degrees_east shapes_coordY axisY standard_namelatitude long_namelatitudeunits degrees_northshapes_field_NAMES  long_name Field NAMESgeometryshapesogr_field_nameNAMESogr_field_typeStringogr_field_width grid_mappingcrs@ $|??@@@@@@ @@@ @ ????????TriangleSquare_in_SquareTriangle_Flippedgdalautotest-3.1.2/gdrivers/data/netcdf-sg/cf1.8_states.nc0000664000175000017500000056344013701057752022052 0ustar evenevenCDF charinstance1node,part_  ConventionsCF-1.8 STATE_NAME unitsunknown grid_mapping grid_mappinggeometrygeometry_container4DRAWSEQ unitsunknown _FillValue grid_mapping grid_mappinggeometrygeometry_container  STATE_FIPS unitsunknown grid_mapping grid_mappinggeometrygeometry_container SUB_REGION unitsunknown grid_mapping grid_mappinggeometrygeometry_container STATE_ABBR unitsunknown grid_mapping grid_mappinggeometrygeometry_containertx_nodes units degrees_east standard_name longitudeaxisXfHy_nodes units degrees_north standard_namelatitudeaxisYf~geometry_container  geometry_typepolygon node_count node_countnode_coordinatesx_nodes y_nodes grid_mapping grid_mappingpart_node_countpart_node_count node_count  long_name.count of coordinates in each instance geometry grid_mapping grid_mapping_namelatitude_longitudesemi_major_axisAXT@inverse_flattening@rtmlongitude_of_prime_meridianpart_node_count  long_name$count of nodes in each geometry part|WashingtonMontanaMaineNorth DakotaSouth DakotaWyomingWisconsinIdahoVermontMinnesotaOregonNew HampshireIowaMassachusettsNebraskaNew YorkPennsylvaniaConnecticutRhode IslandNew JerseyIndianaNevadaUtahCaliforniaOhioIllinoisDistrict of ColumbiaDelawareWest VirginiaMarylandColoradoKentuckyKansasVirginiaMissouriArizonaOklahomaNorth CarolinaTennesseeTexasNew MexicoAlabamaMississippiGeorgiaSouth CarolinaArkansasLouisianaFloridaMichigan  !"#$%&'()*+,-./01253302338465655165027413319253136420944341832490639171110542408212051290440374748350128134505221226PacificMountainNew EnglandWest North CentralWest North CentralMountainEast North CentralMountainNew EnglandWest North CentralPacificNew EnglandWest North CentralNew EnglandWest North CentralMiddle AtlanticMiddle AtlanticNew EnglandNew EnglandMiddle AtlanticEast North CentralMountainMountainPacificEast North CentralEast North CentralSouth AtlanticSouth AtlanticSouth AtlanticSouth AtlanticMountainEast South CentralWest North CentralSouth AtlanticWest North CentralMountainWest South CentralSouth AtlanticEast South CentralWest South CentralMountainEast South CentralEast South CentralSouth AtlanticSouth AtlanticWest South CentralWest South CentralSouth AtlanticEast North CentralWAMTMENDSDWYWIIDVTMNORNHIAMANENYPACTRINJINNVUTCAOHILDCDEWVMDCOKYKSVAMOAZOKNCTNTXNMALMSGASCARLAFLMI^l^\^3^Nap^cA^?\^U^vL-8^ vR^v^(^F^C>^$XD^$\vf^ML^!^'[^sU^s^&:6^ X^X^2bN^cN.4^X L ^V^~Sc-^Γ^ ?^9?"^B楁^u=t^Ԛ^=NK^Ȝ\vl^ׯ ^#"2^'h{^f^hd^e^^I^x^jZ^ӏ-^ȡ^OEXI^ uDu^>ђ ^H^F$V^04^ e^~~^6A!]@SI]AP]D}*d]Bؙ]BwA({]B뫟]B9]B7P]B.]Be=C]B|}]A#*]B ]\!zp]Қy]N^6I^E^)^S^Eq^E^X^!^8g^}^VL^SH^|{^d^0 #^I^߭^6fd^^L;f^Xr2^ ^ ^4>^kG^l^[M&N^5bXR^l ^c^\C~^+i>@^ƣ^[^w^ߡ\2 ^8ۊ(^Mu ^[M&N^xP^3^:7@^(U^gH^.-h^V^_6^y^Qӧ8^GV0^+^fyN^٦o^瓘o^_,!^]^;^d`}^xP[m^=9[dx-[I[أ,Ux[bc[f0[n,[0P[:Ȭ[K\[R[U(([(ǁ[[ hXj[py][?5[șW&[@2w[l>[LÒ][Ms[k^[_==["[+[s) [(2f[\:aZ=mZ>ZZwZEp8cZB]/Zt)SZJZuJZ+J|Z!Gܐ0Z|Z82qZ 6m҃ZtZ+bZffZUʛZY*Z +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>k1,@Ec@F <*&@FpN˿@F!qpBe1@F*uL@FAtE@FZ颮@Fn)@Fv@FjV@FlHJ@FG@F@FX@FZL@F@F@F.ť@F~_@FVR@FhB;@Fn<@F-@F!ǐDb@Fm@F2O @FӪcž@F{A:@Fnp,@F׃r@FЩ 3P@F֪@Fy2@Fw!d@FO@Fc@FRv@FgRTp@F}-@F[s]@Fn&/el@FaM@Fc*P@Fz=@F)@F'<@F~4h{@Fr9&@Flݹ@Fc0@F^5"6@FY@FBڏ@F, @Fs=@F @E +@E1@Er@Ec @E!VM@E@ERܞ$@E@eB@E~j#@Ec-zFV @E6:P@E @E/eE@D'DsL@D <|)0 p2{u()~T)F % 8g|P<+O:]Q+pI| ) 0p2{Y $ (~T) F %8\ |k "P<   :UQ1 vgdalautotest-3.1.2/gdrivers/data/netcdf-sg/serpenski3D_2nd.nc0000664000175000017500000000240013701057752022565 0ustar evenevenCDF cinstancenodeparts  ConventionsCF-1.8 NAMES unitsunknowngeometry serpenskix_nodes units degrees_east standard_name longitudeaxisX@(y_nodes units degrees_north standard_namelatitudeaxisY@hz_nodes unitsmetersaxisZ@ncount  long_name node countpcount  long_namepart node countint_ring  long_nameinterior rings serpenski  geometry_typepolygonnode_coordinatesx_nodes y_nodes z_nodes node_countncountpart_node_countpcount interior_ringint_ringSerpenski Triangle???????zXL?۶zXL?۶zXL????????|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/multiline3D_test.nc0000664000175000017500000000304013701057752023061 0ustar evenevenCDF cinstancenodeparts  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydx_nodes units degrees_east standard_name longitudeaxisXy_nodes units degrees_north standard_namelatitudeaxisYz_nodes unitsmetersaxisZHncount  long_name node countpcount  long_namepart node count names_geometry  geometry_typelinenode_coordinatesx_nodes y_nodes z_nodes node_countncountpart_node_countpcountTrail_1Trail_2Trail_3Trail_4Trail_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$@@@@ "@$@@@@ "@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/multipolygon3D_test.nc0000664000175000017500000000241013701057752023621 0ustar evenevenCDF cinstancenode parts  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry(x_nodes units degrees_east standard_name longitudeaxisX`y_nodes units degrees_north standard_namelatitudeaxisY`0z_nodes unitsmetersaxisZ`ncount  long_name node countpcount  long_namepart node count names_geometry  geometry_typepolygonnode_coordinatesx_nodes y_nodes z_nodes node_countncountpart_node_countpcountWedgeDoubleWedge??@@@@@@@@????@@@@$@$@@$@.@.@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/arbitrary_axis_order_test.nc0000664000175000017500000000206013701057752025107 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry($x_nodes units degrees_east standard_name longitudeaxisXHLy_nodes units degrees_north standard_namelatitudeaxisYHz_nodes unitsmetersaxisZHncount  long_name node count$names_geometry  geometry_typepolygonnode_coordinatesy_nodes z_nodes x_nodes node_countncount,WedgeCube??@@@@@????@@??????|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/no_nodecoords.nc0000664000175000017500000000133013701057752022464 0ustar evenevenCDF cinstance  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometryd x_nodes units degrees_east standard_name longitudeaxisX(y_nodes units degrees_north standard_namelatitudeaxisY(names_geometry  geometry_typepointGuage_1Guage_2Guage_3Guage_4Guage_5?@@@@|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/point3D_test.nc0000664000175000017500000000161413701057752022215 0ustar evenevenCDF cinstance  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydx_nodes units degrees_east standard_name longitudeaxisX(y_nodes units degrees_north standard_namelatitudeaxisY(8z_nodes unitsmetersaxisZ(`names_geometry  geometry_typepointnode_coordinatesx_nodes y_nodes z_nodesGuage_1Guage_2Guage_3Guage_4Guage_5?@@@@?@@|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/missing_node_counts_test.nc0000664000175000017500000000157013701057752024747 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry(x_nodes units degrees_east standard_name longitudeaxisXPy_nodes units degrees_north standard_namelatitudeaxisYPncount  long_name node countlnames_geometry  geometry_typepolygonnode_coordinatesx_nodes y_nodestTriangleSquare??@@@@@G???G|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/multiline_test.nc0000664000175000017500000000244013701057752022675 0ustar evenevenCDF cinstancenodeparts  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydDx_nodes units degrees_east standard_name longitudeaxisXy_nodes units degrees_north standard_namelatitudeaxisYHncount  long_name node countpcount  long_namepart node count names_geometry  geometry_typelinenode_coordinatesx_nodes y_nodes node_countncountpart_node_countpcountTrail_1Trail_2Trail_3Trail_4Trail_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/polygon3D_test.nc0000664000175000017500000000206013701057752022547 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry($x_nodes units degrees_east standard_name longitudeaxisXHLy_nodes units degrees_north standard_namelatitudeaxisYHz_nodes unitsmetersaxisZHncount  long_name node count$names_geometry  geometry_typepolygonnode_coordinatesx_nodes y_nodes z_nodes node_countncount,WedgeCube??@@@@@????@@??????|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/no_geometry_type.nc0000664000175000017500000000213413701057752023224 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydx_nodes units degrees_east standard_name longitudeaxisXy_nodes units degrees_north standard_namelatitudeaxisYncount  long_name node countDnames_geometry node_coordinatesx_nodes y_nodes node_countncountXTrail_1Trail_2Trail_3Trail_4Trail_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/corrupted_polygon_ir.nc0000664000175000017500000000454413701057752024113 0ustar evenevenCDF shapes_node_coordinatesshapes_node_countshapes_part_node_countshapes_field_NAMES_max_width  ConventionsCF-1.8GDAL3GDAL 3.1.0dev-9b1844d3e9-dirty, released 2019/08/02historyBFri Aug 02 20:32:03 2019: GDAL Create( fillvalue_polygon.nc, ... )  shapes_crs grid_mapping_namelatitude_longitude long_nameCRS definitionlongitude_of_prime_meridiansemi_major_axisAXT@inverse_flattening@rtm spatial_ref.GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]shapes  geometry_typepolygonnode_coordinatesshapes_coordX shapes_coordY node_countshapes_node_countpart_node_countshapes_part_node_count interior_ringshapes_interior_ring grid_mapping shapes_crsshapes_node_count shapes_part_node_countshapes_interior_ring shapes_coordX axisX standard_name longitude long_name longitudeunits degrees_east shapes_coordY axisY standard_namelatitude long_namelatitudeunits degrees_northshapes_field_NAMES  long_name Field NAMESgeometryshapesogr_field_nameNAMESogr_field_typeStringogr_field_width grid_mappingcrs@ $| ??@@@@@@ @@@ @ ????????TriangleSquare_in_SquareTriangle_Flippedgdalautotest-3.1.2/gdrivers/data/netcdf-sg/flipped_axes_test.nc0000664000175000017500000000166013701057752023341 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry(x_nodes units degrees_east standard_name longitudeaxisXHy_nodes units degrees_north standard_namelatitudeaxisYH\ncount  long_name node countnames_geometry  geometry_typepolygonnode_coordinatesy_nodes x_nodes node_countncountgeometry_dimensioninstanceTriangleSquare??@@@@@???|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/multipolygon_test.nc0000664000175000017500000000211013701057752023427 0ustar evenevenCDF cinstancenode parts  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry(Hx_nodes units degrees_east standard_name longitudeaxisX`py_nodes units degrees_north standard_namelatitudeaxisY`ncount  long_name node count0pcount  long_namepart node count 8names_geometry  geometry_typepolygonnode_coordinatesx_nodes y_nodes node_countncountpart_node_countpcountDTriangleDoubleTriangle??@@@@@@@@????|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/polygon_test.nc0000664000175000017500000000161013701057752022360 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry(x_nodes units degrees_east standard_name longitudeaxisXHy_nodes units degrees_north standard_namelatitudeaxisYH4ncount  long_name node count|names_geometry  geometry_typepolygonnode_coordinatesx_nodes y_nodes node_countncountTriangleSquare??@@@@@???|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/multipoint_test.nc0000664000175000017500000000220013701057752023071 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydx_nodes units degrees_east standard_name longitudeaxisX(y_nodes units degrees_north standard_namelatitudeaxisYncount  long_name node counthnames_geometry  geometry_typepointnode_coordinatesx_nodes y_nodes node_countncount|Guage_1Guage_2Guage_3Guage_4Guage_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/Yahara_alb.nc0000664000175000017500000050104413701057752021663 0ustar evenevenCDF instanceGnode&partT  ConventionsCF-1.8 ID unitsunknown missing_valueÇ;dZ grid_mapping grid_mappinggeometrygeometry_container8@GRIDCODE unitsunknown missing_valueÇ;dZ grid_mapping grid_mappinggeometrygeometry_container8 xX_COORD unitsunknown missing_valueÇ;dZ grid_mapping grid_mappinggeometrygeometry_container8 Y_COORD unitsunknown missing_valueÇ;dZ grid_mapping grid_mappinggeometrygeometry_container8x_nodes units degrees_eastaxisX6 y_nodes units degrees_northaxisY6Ggeometry_container node_coordinatesx_nodes y_nodes geometry_typepolygon node_count node_countpart_node_countpart_node_count interior_ring interior_ring grid_mapping grid_mapping~` node_count  long_name.count of coordinates in each instance geometry~dpart_node_count  long_name$count of nodes in each geometry partP interior_ring  long_nametype of each geometry partP grid_mapping grid_mapping_namealbers_conical_equal_arealongitude_of_central_meridianXlatitude_of_projection_origin@7 false_eastingfalse_northingstandard_parallel@=@Fsemi_major_axisAXT@inverse_flattening@rtmlongitude_of_prime_meridian ?@@@@@@@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@@@A@A@B@B@C@C@D@D@E@E@F@F@G@G@H@H@I@I@J@J@K@K@L@L@M@M@N@N@O@O@P@P@@P@P@Q@Q@@Q@Q@K@J@K@I@I@H@J@F@G@G@E@H@E@D@D@F@C@C@C@B@B@A@A@B@?@?@@@;@?@9@9@@@>@:@9@<@<@<@<@=@@@;@<@:@5@9@6@8@7@5@4@3@1@2@0@.@,@*@"@ @&@(@$@@@@@@@?A!ݴ%A!~(A!p/9iA AJN>lLAȔȬ\A=A~|A IAEA IA\RA1iAc[BAUdM;Ak IA4# A\ IA$2kA CC}:Aˮ ͳAlrAtBmHAlm\A$ IAp IA ͳA IA IA ͳA IASA'Ap ͳAoH IAl< IAf` IAd IAcT IA IA2LfAv䠍A쉍ͳAbA/VAO, IA)GXA+kSA12A APuAnΚ,A c A+{쪹A,,eA qvAd gAq"wA]!AhA r:bQA ~c$ A }$ A {A zFA yA y"A wjA t/H5A sA rA q$6LA q[+uA qhR݋A qhyA onA ncp)A l$fKA jvZA iM;DA hS,A h8BA gƵTA g&!A g'A hR:KA h2 8A i*eiA jR;A kr?A kq0A k#޳BQA jgA kkFA k A3A kMA l׭A m!A nKIA pwuA p A q4A rRV~A s[A tqA v&A vgOA w$A x^&A y=A z_fA {PA {+'A | `A ~iQA ~nA ~wx5A ~JA$A }*uA ~hcElA ~~A / yA P4A (mOA ,BA A A kUA R3A |A ɑ~A "3A =IFA vJA G*A y@A t,A !#{A '>A ±ΞA j=A KA TA A Hd^A Fd#A bqIA l~SA 6h8\A lQ^A BQA NkARA /A 4 uA A ]cgWA )A "vG-A \A uޘA x;A A YA ;?pA >e5A ;53A * A wA ;oA pA A \MjȳA ]A ]2A ]4[gA ]UA ^6*:A ^j?hA _U)A ^`ɻA _3XlA `4BA `FQA `F.!A ` 9A a70bA apu-rA a -;A a%A dCYpA e\oA e-MA f%A gtA iLBA itA l]WA mA mU66A nn8A oA p8oA r"A =y]A <$A ;NA ; fA < A =!.(A >s:A >%@j>A =7aA ?#A ?V0dHA ?̱VA >rCA >9dA =Z\A =42KeA GA 0̰A 0m'A 1{iXfA 4лvA 5+1.A 6oIc% A 6:rA 7 mA 7ADA 8 )A 9H-qA :y>A <9>QA =.
I?EA ?SH_A ?3$A ?6A ?` aA @{5A @*A @ ^A A"1A A<#$.A B_ A Cg`WA D/A EV%jA F]i_A Gq5FA HX+A IݐA Kl TA L5NcA LĦ;A N绸A OeP)A ORpBA PUߖA RA SAA T<#A U&@A VkrA X_Q8A Y:u*A Z~BA [TA [|u.A [H9@kA [DZ=AA [DA [^ VA \vtA ^V%@A `A `eA aVA aU ,A cdA ckCjA emA eՠA g4 7A h _A hS,A iM;DA jvZA l$fKA ncp)A onA qhyA qhR݋A q[+uA q$6LA rA sA t/H5A wjA y"A yA zFA {A }$ A ~c$ A r:bQA &A ~ӓ A }2OLA |`YA |K@_A |5A zo ]ZA ylM#lA xᜱ&A w^?A vA s(?OA rA r`,[A rA ^K mA _c }A `9$A `[3A `ٕpA `(A `A `tA `*ϝA bVW}A cޞA c WA c?!A c򮍊$A dr z3EA cŗA c7,A cOqoA d!LA d"A d}rA d6AA dA f A f ^^A g&3A gA goS A h/[fA hEA hzA i WA ifA i]YA i6MA hA gfA fz0zA e;4y}A dRA d>QoA c\A cgA b(1EAA af,A a q/0A `.5A _q A ^wi A ]P;A Z|2A YmA YY̊A XseA V?A VzA U>/A TIA RRpA Pjm)A P7.oEA OBA O/A N JHA L€A LjS~A Kڌ NA K0wA J|A I^+A IzYoA I: A H˪kA GGu!A 1;e A m A *6A Z*-SA <-$A &Ɏ"A Z/A <^ɄA ]FqA "NA Д'YA A 7,A ݼwA }{A =A RA A _ɕ^A #yA ;rl A -A ѥA ɮ>'A i A ցmkA 6MA R*A U]B]A AA 1;e A eRU!A da"A `h2$ A ^θA ]!A \թ#½A \_ޔVRA Zr$A Yq2A YA Yh^OA XЬA W, A VrA U:iA U_Z[pA TԎ;A Sp4A SRA SBA R#uA Q˲A QI&=A Pᤚ)A O>]cA N6A NY0A MԩP\A L=[.A KG]RA J>,A J[SeA I>A HˊWA G_RA Fe=A EҨA DRRA Cgg1A BºA B:A BXy8A CDFA Cg'A B)-_A AʏA AͳA BA CA DTA EA FwA F~ A Gz@A G fA I^/}A IMK A HZA HQ⓹A G {A GFA I>GA I{mA H\A H A GǐA G<*A GGu!A H˪kA I: A IzYoA I^+A J|A K0wA Kڌ NA LjS~A L€A N JHA O/A OBA P7.oEA Pjm)A RRpA TIA U>/A VzA V?A XseA YY̊A YmA Z|2A ]P;A ^wi A _q A `.5A a q/0A af,A b(1EAA cgA c\A d>QoA dRA e;4y}A fz0zA gfA hA i6MA i]YA ifA l=9BAA l[Jj.A m8Ӛ6A m A m19]A m;A mxA nC2A olYq7A p{A qtmA qk&IA s߳A t`*lA x70cBA xDW(A x6nA w/A w MA v*tOA u9A uA tcAXA r]৿A q,0 A p- A o qA nA oFDiA o+l A nA nnA nN]A la˷lA kiz!A jcA jՓ&eA jT!jPA iZ%A hg2A gzpԋA gf.=A h -A hAnA gA g_^A f3VȠA eCXA dZPA c;HA d'A eo_VA gtAA h<A g A g W A fЬA fxϮA fUA e&R.DA d\ƌfA eRU!A fn8TA e lA eRU!A d\ƌfA e&R.DA fUA fxϮA fЬA g W A g A h<A gtAA eo_VA d'A c;HA dZPA eCXA f3VȠA g_^A gA hAnA h -A gf.=A gzpԋA hg2A iZ%A jT!jPA jՓ&eA jcA kiz!A la˷lA nN]A nnA nA o+l A oFDiA nA o qA p- A q,0 A r]৿A tcAXA uA u9A v*tOA w MA w/A x6nA xDW(A yр6A yfcA {;A |KyA }{&v@A ' BA QenA D#A NA 7tA yQA xo|A vW{A t(nA q 3A nNkA laA *9ݣA )p7A (3ggA &MA %rA $(֔LA "RA "2EA "Z}=A "ZXVA !vpIA lA zfA {A r!1{A tA #3A GA GA G'A 5PA  A 6"A #ݸA CW\A )jA P3A |$A zӅA VW'A  R[A HaA ->qA &8.A V0A Mq.3A 9A 0A /ΧA !kHA 1A  A lLA ZJR[A  A :tA lƭA ~,A  wqA prA  A `BA IkA +A A +A pQ?IA BS9dA >rCA ?̱VA ?V0dHA ?#A =7aA >%@j>A >s:A =!.(A < A ; fA ;NA <$A =y]A >"A AY.A B 9A DORA E A F^BٗA GkFA GV#A GgA}A G,A F%lTA Fla.LA Ei{8oA D|hxQA CӆVA BђA C-zYA CQnA DL`~A ECiA F%DA GGu!A G<*A GǐA H A H\A I{mA I>GA GFA G {A HQ⓹A HZA IMK A I^/}A G fA Gz@A F~ A FwA EA DTA CA BA AͳA AʏA B)-_A Cg'A CDFA BXy8A B:A BºA Cgg1A DRRA EҨA Fe=A G_RA HˊWA I>A J[SeA J>,A KG]RA L=[.A MԩP\A NY0A N6A O>]cA Pᤚ)A QI&=A Q˲A R#uA SBA SRA Sp4A TԎ;A U_Z[pA U:iA VrA W, A XЬA Yh^OA YA Yq2A Zr$A \_ޔVRA \թ#½A ]!A ^θA `h2$ A da"A eRU!A e lA fn8TA e#p A ckA c 7YA brA b7A b4A aժpA bMh%%A a)_A abl#A _%`~A _ ZA ^\LA ^&ޤ§A ]|A ]#u kA [7C LA Y'ܩA XDA WJsA W]*F_rA VrLm-A TNA RavA N}R6A N9~A N:]62A LɷIA K(A KT-uA KHāA I~{A H\n!A G{ EA F8ktCA E"ARAn Am^YAC\;Aށn|Af4AIAC(A+\Aۤ:Aܬ"vA)ɟA>YAs zDAٜ\1AڂДA۽8A"2Ơ3AפA)lA )MAUeA:>Av( A{AQ4AԵ!MAwwPAgéAhy3AG֕AYP3A߱A~/A̕ bAQALAֶmUAZ/A6<A*k>Aӗ-AқQsaA,ALpgT_AbAЂYݯ3A#ˌAO Aҟ|9AӎHAdAe- A\Z=A(dVAnVA(SA)Ace,XA= AuA,pXA7tؖA扸p\[4RA 1N5A UmaA  A :K=qA -nA FA *v9A q.A ҄^3A vA LA hXPA b*A eA ro(A ,A \A ?WA !PA A 3IA y4A ɠ`A ;A 5 jA *2A 2A nA !A tA e0pA -,+A JA A ^[6A "A FA R/A 8fA }b4A A @(&A БmTA  g菿A Q1A l+A c-A qA Ae1A ϫIA;SAxuHAOqpA7vCAAY>AAA q5A kA $^A XRA 8ۦA @ OA &^A ec%A 7}GA ÄRA |A t=A 02͎A ~PUA ~Pi%A }|C^9A |hA zA z9A y;A xp zA w+ >&A wA wFA wJ~A w2]A wfA xdLo A y)A {5A {S.A {LtA ~EuA ~ A ~*~0dA /g8A ~-r[LA }:A ~7cA ^]A 2U6bA ~4A^xA }ƌTA }PA |񧁀A zA z`>A z@A |" A |gؿeA {ͱA {ׇ_AA {nA {- A }# 6A }!LA ~*<}A ~9`%A A |0A +vLA ,4A ǿA M= A }8¸vA A FA {A 6ս3A '$ A XA A3'A Z*-SA *6A m A 1;e A NA #q:A @A l|$A )mA -+zyA OBA ^KA Y8ޗA 2TA KwPA .LA .A v^ A 9 A 4!tA G 37A s\A q'YA LA zSA ҋ$A 7n2A e:oA eA A [A 'enA -A _ 'A b緺A A V̖A RpA zA l1A R *A T>A OVA QQ%P}A *)+A r.%A ,A @rA s3A T"" A ^ A ~`9RA ZA ]A ^CjA 2TA ssA fE?A c6A C|A )jJ\A s AA Ԇ~A H-&A ESA (zhA  g菿A БmTA @(&A A }b4A 8fA R/A FA "A ^[6A JA A -,+A e0pA tA !A nA 2A *2A 5 jA ;A ɠ`A y4A 3IA A !PA ?WA \A ,A ro(A eA b*A hXPA LA vA ҄^3A q.A *v9A FA -nA :K=qA  A UmaA 1N5A >[4RA ͞=AS"A'XAA&1A VA hDA 5P!A 1A `IA X s6A A A V*A Ss7A N nA uy{A Si`A ÑyA A R@A brA G,A եvA uF[ A BSqA HaA  R[A VW'A zӅA |$A P3A )jA CW\A #ݸA 6"A  A 5PA G'A GA GA #3A tA r!1{A {A zfA lA !vpIA "ZXVA "Z}=A "2EA "RA $(֔LA %rA &MA (3ggA )p7A *9ݣA )X)A (A 'wp5A &,A &OmA % lA %*јA %A %(A $۩ʀA #A #ϰA "틹/A !+A !}2!A ! ,XA e+A \SmA PCA ۪uA q0A 6,A kN#A %e$A :A 7,A FJA 3"qaA dcA [FA uA 6KA HA ]FsA EA chA a!A vbqA p][xA eA >AA A 8BgA š4A )A -aA M`A 9lA hA Uy3A 1!A X DA JH=A (rBA CkQA FZbmA 5+;A =KA "A  g菿A `! A _YA `-fA `A `@A `gA _M;KA ^h$A ]ZjIIA \vA [ᦽA [<ܶA YJŃA W<DA W)EA VUjGoA U~A SņA Sy?]A RZR-A R w?A Q:JA NSzSA MA+qA Ln_A Kl?oA ISY$A HxA HnlA HwrX A HbrA H:/>,A G^|+)A FiA FF}t:A E"A F8ktCA G{ EA H\n!A I~{A KHāA KT-uA K(A LɷIA N:]62A N9~A N}R6A RavA TNA VrLm-A W]*F_rA WJsA XDA Y'ܩA [7C LA ]#u kA ]|A ^&ޤ§A ^\LA _ ZA _%`~A abl#A a)_A bMh%%A aժpA b4A b7A brA c 7YA ckA e#p A fn8TA h2hA kPA lA zA |񧁀A }PA }ƌTA ~4A^xA 2U6bA ^]A ~7cA }:A ~-r[LA /g8A ~*~0dA ~ A ~EuA {LtA {S.A {5A y)A xdLo A wfA w2]A wJ~A wFA wA w+ >&A xp zA y;A y3통A x,oA xA w)A w|DA uTH A t 1A tEBA txƱA tBbA tcPA sAgA t:A taA u4qA tMhG*A u;־;5A tqyJA sA s;Ϫ2kA rCA q:A oa~&*A neA n%2EA mqA mK#(rA lB~A k6qA jzA j{(%A i_A gbA g!gA fYAA f{0A ew?HA deA cyFA c@pA bKRA `! A Ϧ A LA )8A x\OzA ͇&A tA cq0A l'A !A ƚA IA `tJA A 9d~1A 8A A ty/ A vA ʷL(A "',xA 'ӹTA A PBA A MA A0A Z/A AGA xoA zTA (zhA ESA H-&A Ԇ~A s AA )jJ\A C|A c6A fE?A ssA 2TA ^CjA ]A ZA ~`9RA ^ A T"" A s3A @rA ,A r.%A *)+A QQ%P}A OVA T>A R *A l1A zA RpA V̖A A b緺A _ 'A -A 'enA [A A eA e:oA 7n2A ҋ$A zSA LA q'YA s\A G 37A 4!tA 9 A v^ A .A .LA KwPA 2TA Y8ޗA ^KA OBA -+zyA )mA l|$A @A #q:A NA 1;e A AA U]B]A R*A 6MA ցmkA i A ɮ>'A ѥA -A ;rl A #yA _ɕ^A A RA r`A 4YA BA #KMPA  A `69A _gA }"A #Qk]A VA nA A =6;A P/A ,AA .A 1A A }'}A ?6A QKįA ZsA GcA bA 5 4A ynnjA eA A A9DA / A A YA BnIA EMA eA nÄA <A OA @6<%:A 6V%QA S.A lOfA 7tA KA {nA A ^p.A JLA 9N};A 4A +NA g }A 6A E/A {dzA c_A ʭnA kvIA CA ļA oSA x``A ĿA _ԪA @hA \ͯ0A m}&A iA A M1A hA ]yj+A 6CA }tA A yoEA F'A }A IiPeA J.A g*޳:A ʮA h\A 2A XsA 5MlA A QdA 6sA ;lA +A oA ,$pA 5A ] hA ЬA -LA zCA X"A WsA EV@JoA HA b aEA )-ejA YhA qA cS}A AAK߭qA "AcA~J9A&ͭAL$ȂAR A->A,B}A۔:ZAsqsA\IAęߍ2A$Aǚf@l A`dU=AXQpA#>A̕ bA~/A߱AYP3AG֕Ahy3AgéAwwPAԵ!MAQ4A{Av( A:>AUeA )MA)lAפA"2Ơ3A۽8AڂДAٜ\1As zDA>YA)ɟAܬ"vAۤ:A+\AC(AIAf4Aށn|AC\;Am^YAn ARAxAݿAWA)QA5^AR' A/GA"D6Aj&uAXÁ]AՀ{7MA|o`jA'AAۼAt79^AvAѲOAѴ-}A"3zASA[eRAwÓAn[ARKAԧ #AAAA7vCAOqpAxuHA;SA ϫIA Ae1A qA c-A l+A Q1A  g菿A "A =KA 5+;A FZbmA CkQA (rBA JH=A X DA 1!A Uy3A hA 9lA >`A 2A ̨A :A MAA eA  VA [oA ̿A aֻA  'A cA !߭yA aA A `8A ,TA bA b zA A {A "CA L,jA M6eA BA b+A szA hA A ȷxA mgA A nz9A zfiA (A CmA u~r"A eA g%+pA ^AA _]A BLHhA5 NA&aAM-A&@SA63AF-AD>jA%A[&AՉ=A <,Ax%A"RA78;9A-ANA~WA|Bd:A߉zA޴?3A}5AW;xAsaAԮAбAέh?A/gAx>ư>AJZAmAɱUuhAAȨ3AAZA+{}A 8-A똔$A-CJAqrKA9VA0{[xA _t]A ^` A ]ϴiA ]צA ]Y-NA ]A@A ^onA ^`A _iBA aWF4lA c ^A e\A f{A e`A e`0A bhфA bzn}A a˾FA `A _Tz A ^LvA \q=)[eA ]A ]LA \#A \-FA ^X}݀A ^A ^|vA ^K ]A ^ɩA _ *_A _z3#A _,%2A _A _ZKA `~ A ap2XNA ayq^A `@ExA `! A bKRA c@pA cyFA deA ew?HA f{0A fYAA g!gA gbA i_A j{(%A jzA k6qA lB~A mK#(rA mqA n%2EA neA oa~&*A q:A rCA s;Ϫ2kA sA tqyJA u;־;5A tMhG*A u4qA taA t:A sAgA tcPA tBbA txƱA tEBA t 1A uTH A w|DA w)A xA x,oA y3통A y;A z9A zA |hA }|C^9A ~Pi%A ~PUA 02͎A t=A |A ÄRA 7}GA ec%A &^A @ OA 8ۦA XRA $^A kA q5A >A (zhA zTA xoA AGA Z/A A0A MA A PBA A 'ӹTA "',xA ʷL(A vA ty/ A A 8A 9d~1A A `tJA 󽿼AA وA >A VA XLA q"A ٍA RJ)A A ++A tF`eA }2a4A | zA |ZGWA |OkA zˏA x:l,A w^s+A w^qkA v#MA v|ՍA uoA uA t+gA sA rKA rVA r:7 eA rI;A rMgg2A qUA q~A l$$A jB,A irA if^ٷA ix~A j6I {A i`}A iJTA i>svA h.'A gܳA eYA eE|HݱA dVoA bfeA ajHA aiBA `A _t]A 9dəA *Sx3A )6+yIA '+A &)IA %A $X/vA #/UA " +A !>|nCA !Ed/cA !HA L*A U2A cVA A fCA !'TA rmNA nyӷA ] A  qVA  A +2A sF+nA /ͼfA ܆^A .XA @A wjA 9ZA .HA 6T/A A aA !߭yA cA  'A aֻA ̿A [oA  VA eA p][xA vbqA a!A chA EA ]FsA HA 6KA uA [FA dcA 3"qaA FJA 7,A :A %e$A kN#A 6,A q0A ۪uA PCA \SmA e+A ! ,XA !}2!A !+A "틹/A #ϰA #A $۩ʀA %(A %A %*јA % lA &OmA &,A 'wp5A (A )X)A *9ݣA +>aA +}A -qA .q#A /(Ƃ^A 0VUA 01-bA 1B6nA 3M}A 6QA 7v A 82OA 8qvA 6E"A 6fA 6{W0_A 6`++A 5A 5K\ "A 4* ߿A 5(!їA 4LyW)A 4&wA 2hH;A 2+x.A 5JA 6MNI^A 7(yA 8~R=PA ;NXdA <,A HbrA HwrX A HnlA HxA H5@08A G@A G_ϼA GA H9i_A J`MA K'A K)0A K!uA LA Lvk|A L@}0A Kݢ{A J5>F>A I\z0A G[bUA E$A DUA Ch2A B%WiA @v:kA ?ޕf$A ?<8A ?@A >O>A =CZA =;9A <IhA O>A ?@A ?<8A ?ޕf$A @v:kA B%WiA Ch2A DUA E$A G[bUA I\z0A J5>F>A Kݢ{A L@}0A Lvk|A LA K!uA K)0A K'A J`MA H9i_A GA G_ϼA G@A H5@08A HxA ISY$A Kl?oA Ln_A MA+qA NSzSA Q:JA R w?A RZR-A Sy?]A SņA U~A VUjGoA W)EA W<DA YJŃA [<ܶA [ᦽA \vA ]ZjIIA ^h$A _M;KA `gA `@A `A `-fA _YA `! A `@ExA ayq^A ap2XNA `~ A _ZKA _A _,%2A _z3#A _ *_A ^ɩA ^K ]A ^|vA ^A ^X}݀A \-FA \#A ]LA ]A \q=)[eA ^LvA _Tz A `A a˾FA bzn}A bhфA e`0A e`A f{A e\A c ^A aWF4lA _iBA ^`A ^onA ]A@A ]Y-NA ]צA ]ϴiA ^` A _t]A ^ۋk;A ^sA ^AA ^g oA ]ٹ A \gkA YXC)A YoA YN^ A XO%fA W./A T#V;A QA MyخA L6MA LIĵjA K`A K?RA J7NA J+8!A I A J- A I,-A H֧dA G.ifrA GtrqA HT A I_jA I<,NpA G1cg7fA F(5A DssLA CA DttWA C`PtA DR^A DmA CkA C'CA CsoA A$pA @{^aA @ oA ? lĕA >A >s*7A =NA =?D(A 7,3AEA/gAέh?AбAԮAsaAW;xA}5A޴?3A߉zA|Bd:A~WANA-A78;9A"RAx%A <,AՉ=A[&A%AD>jAF-A63A&@SAM-A&aA5 NA BLHhA _]A ^AA g%+pA eA u~r"A CmA (A zfiA nz9A A mgA ȷxA A hA szA b+A BA M6eA L,jA "CA {A A b zA bA ,TA `8A A 6T/A .HA 9ZA wjA @A .XA ܆^A /ͼfA sF+nA +2A  A  qVA ] A nyӷA rmNA !'TA fCA A cVA U2A L*A !HA !Ed/cA !>|nCA " +A #/UA $X/vA %A &)IA '+A )6+yIA *Sx3A + {>A +EXA -͓A -\2suA -&A .IdpRA /%hA /OZIA /M]A 0={QA 0W A 1E A 226bA 2A 3թ4{A 6=\A 9rjA 9dəvCAcAمAآ}AAnzAR 'AҖAȮA%A`NLˇAb52AA}4;AANaA)A"A\g%As<KACAd=7V=AUWqA*yA9IsmAOZA AaIARcAMAth=.A1ZAi_~A5=A䈡3cA!Ab%AWABQAA-A}tA[quAkAhɼATVAfJ%XA5'A1APJAk ;AAR.fA3,6|A#zcAʆA~i#A%sAC54-ADs A=A)ځAgFFACmLA3AAvA(A*YD}AAv>8A5XpA @AqBAr rA\fAAwA1 օA.3tA0{[xA9VAqrKA-CJA똔$A 8-A+{}AZAAȨ3AAɱUuhAmAJZAx>ư>A/gAEA >7,3Aϗ} AیLAGy2EA-VAN5AAرA.3A.4Au7TAߣ44A_"cVA̕MA;A,TpA~AiAٲ A1uAa!__Ao6GAEh !AʡuH,AEAʀ$AHEAA UeA FABsAT2/AFA@BTAߗR7A9AA}97A0h.A[` A { A \ A w7A (lA ~HA A WIA bYZA T?A I3T#A k/A LA cgA ;E19A A A (ۂ/A j}A c/dV A T<3UA 8FA UC"3A +mv`A aA yA "=A LA Z)A VĝA eA ެOA FbA hA - A ܦA jA nWA > A =uA MŦA s A H'A VA OwmA z dA cXjSA EQ%1A DߚA >["A A me(KA zTA X^A 9QA |hA _sA -o-UA A 9.C1RA _A F̢yA e@A { $A U;A 3byA Vn/A +^A u7q_A l*A 5ښA Ȧ !A AA }søրA }bZA {B)8A zuA zT#4A xF˩A w{T)A d~8A dt?A b A ]UsA ]sBA ^ O7A ^u8/A ^i ,A ^>A _NlLA _=pNmA ^ϭcA ^7ÙA _SYA _[QA _ԻA ` ėA _JMA _cCUA _,hA ^{/A ^sslA ^+sMA ]CA [UTA Z=A WA Wf[A W}A WͯA Xf;A YluA YoA YXC)A \gkA ]ٹ A ^g oA ^AA ^sA ^ۋk;A _t]A `A aiBA ajHA bfeA dVoA eE|HݱA eYA gܳA h.'A i>svA iJTA i`}A j6I {A ix~A if^ٷA irA jB,A l$$A q~A qUA rMgg2A rI;A r:7 eA rVA rKA sA t+gA uA uoA v|ՍA v#MA w^qkA w^s+A x:l,A zˏA |OkA |ZGWA | zA }2a4A tF`eA ++A A RJ)A ٍA q"A XLA VA >A وA 󽿼AA `tJA IA ƚA !A l'A cq0A tA ͇&A x\OzA )8A LA Ϧ A 5A PoGUA {A iA mٚA ڒUA IA &FA H5NA CA 3 SA hC| A `;$A 8A C:A *FdA ilA X.A 89*A %]A LA "=A yA aA +mv`A UC"3A 8FA T<3UA c/dV A j}A (ۂ/A A A ;E19A cgA LA k/A I3T#A T?A bYZA WIA ĭ>A A j/A ^A c($A fUmA ^|#A 8A ֗A V_A @-A 뗬'A LYA +4A 8 A ~"oA )A TA b(&jA ghr%A bN޴A 0WA 9ŸA [=kA "A P<@HA EQA |A u.:o,A uq3DA u&RA tpfA t2+kA s@A rA rZ A oYA nIQA m hA mnL@نA lbxduA lxA n4s A o*,bA prHA qvbyA ;xA ̗A s?A ۈA --A ρ=A RuA 'aA <_A FwA T됝A M\A h}EA sڠlA K3A S4A yFzPA pA h4BA A T._DA A 3"rA ?A wLWqA QnA ɕZ)A ؎?A \?LA D[A A UTA eHxA }A M}A A VNA RhA IA >0A Z;QkA 1NsA XfRA $A ͻA o'iA 9DfA km eA !A ?|A \4A 'A ԊVA cEO=A SDwA l=uA ڭA T"&MA nB|A K}fA  4HA +A R)lA 'A  {u A E{l1A `qyA "A {auqA 8A NoAU[AVA^AFRAqc0}ADRA4ACVײAMAFN{Ac2]A /A?GFhAs`\Ae(?A΄AޮyzNAJ#AڼmpA8%AׄW:ARԓfAljԒA>ѪAp :A3AbQj_Aָ!ZA1ȑ"A׏ђ]Akզt4AhAԂO3A3x|AҼǟAԔaAγf AԚ* Aͨ!AͳOGr'AǬ=AңQAӟ A]]lA]>A@PA4_$A٬(A񈠾Aݦ?hA޺kɳAO7A VhAM[QAJtAQ'AA8yA*A: :AAA&A}AꩁA4iAg8&A 8A {auqA "A `qyA E{l1A  {u A 'A R)lA +A  4HA K}fA nB|A T"&MA ڭA l=uA SDwA cEO=A ԊVA 'A \4A ?|A !A >km eA V/EA A m" A {vA xA =A ˞A pA <A nKA 6VxA =xA ;/0A cDpaA uyrA "DA j%A ZA J\tA )KA +jA  A L!4A nA  A 6?A qA 4PA xZA Rkl7+A AXA CYA wpA mCvA UoA }׵$A &`A ҙR`A /A qA e~A 让A &LwA wjqUA cSA zA 2V&A RCA ~T-A -`A er\A EYwA UXA 兕AA w,LA ~kA @IA JJ.A A g+A )wA 2~mA /J A t36A D=86A \hA !Q0A 1-A ! 쌔A "CR&A #B7A & XA )D:A *KxA'A +/Ff@A ,f A .A /H˫A /mA 0ډGMA 0}EA /cA -;&A -%CA ,3{A +\A *PisA *tA )}ΙA (/A &+yA %d:DeA %GA %2|zA &5JA &<A &qGA &䆧A 'g A &WA %9AA $2LA #T A #j<4\A " A ":A "_ʮA !ۃA !A !dA !V}tA "A "cA "aWA "() A # DU#A "QxA "6.A !jm+A YnA em|A  V pA xG}A 1A ʗ:A A PA 5:A j-rA sA '*A F`jA .A MA wLA RLI(A g5A  A #gA 8A _SA *3A aA _SA qѐA 6h A 2S6~A mDA qѐA A A }A |A QA bHA A YmA ~A ,A QDA YmA BA \J A YmA z3T8A BA ".A eA BA J}*NA ".A iA `8A W/A ͎EA T]A SIA &A XeA L؀A #3QA Aѥ'A {A 6\A XD}A m7A !"A A ?=GA "lsA \cA 9QA  0A 1mwA qAGdA B|A .΂A A 7&ܹA _d _A p6OA dA sA j-rA 5:A PA A ʗ:A 1A xG}A  V pA em|A YnA !jm+A "6.A "QxA # DU#A "() A "aWA "cA "A !V}tA !dA !A !ۃA "_ʮA ":A " A #j<4\A #T A $2LA %9AA &WA 'g A &䆧A &qGA &<A &5JA %2|zA %GA %d:DeA &+yA (/A )}ΙA *tA *PisA +\A ,3{A -%CA -;&A /cA 0}EA 0ډGMA /mA /H˫A /A 1hu$A 33 'RA 50={A 61A 71 lA 89,7)jA 9:qA ;>A =$!AA ?~A A ;A BfOA C1A BqkA @wA ?;N]qA >#=hA <^̠PA ?v_A ?A ?'A @lA @P2iA A,A BTaA F1b%A HnMA NNvA PZz٣A RV1uA SK"A V۪bA X>A Y {A ZTaQSA [9/A [ugA \[I=A ]sBA ]UsA b A dt?A d9S /A d@؄#A dCFuA d }A c'ZA c qXDA b %_A _ʌ%~A ^bZA \A [޻A [*S\JA Z#e A XIj}A WA W^%Z*A WbsA VȜBrA T`DA RdF2OA P,UmwA M>/A M*A J:ǭA GHyA EF6XA DuRA ADZA @FJg%A >CA ;,FA :vĹA 8ϐ+{A 8OA 7>tmA 6LA 4ތ$A 4AuA 2u'A]A 1AzA 2͝A 0>tͪA /P*A .율,iA .uA ,[A ,o#(A ,9TA +ЪÖA +`A * % TA )IhA *إޮA *t3A +fUA +A *)˝A ت /A A jcA z?$A fThA sE]A "eA YcA F~A XA ]ܝA wוA *J8A 4'A WRA m|mA AA ʭ.A F[A IbVA h+[SA kA S~A IA r voA 4YA 'D/ՐA ~[tA ҏ?OA 4JrCA ܴA MhA A վZA kA A )`#A KSA n[A A \A z:>A Y TA GA 뽩A fEXA YPtA p9)wA c`TA T?6A dYA \XA ܞA 1>_A 7BA FA nA )GA ȑ(@wA A \?LA ؎?A ɕZ)A QnA wLWqA ?A 3"rA A T._DA A `qA +!A AяA 5$A sA `A }ʗA *"A Z^6A *7A d560A aA /Q8A ՙxA <A ʗ$MA $}A ÄA 3A |GAA ;A 9*A #^A '4W;IA EAKA ^sA ݘwA {A 7A {6ǺA A` 5A t3MA  #A  A }.CA `VA 7"A +A rA MA 3~A A tA "RZA .k^A gTA ^-{A 4/xA LjwuA Pd>A jA (?HA cOA sA t2X&A |9QA Y+IA ӬA ^W^xA B.EA 4[A u1GA A r*A !e̅A  u]A CzA ²hA wA EAA jA 'hA [1A pkA N?A wA iӥA n;A fK A uhy A qA *d/A DfA FA mڬA 0A nwA ˰'ĺA [MmA ?QA [6lA 32tA \A x A Ƒ}A Ɩ4A `MA Ɋ4LA BŒ?A ɅؠA ;RA ./A <]cA ]:A .ZA >tA ʂa1A >sA 8A TJA ɀA qbA 8ƂA zA ʜ#6nA ʉ~A Q٧A xA fA L_#A ȸjA hk5A A ÷UuA 0_A  A [̯A [\A 5A &A A u^bbA ,UuA 5BlA A 4A M!DA IA  A bhmA !dA A vGA 45A IBuA =KA 1fA 03VA ]oA #3hA #A $@+EA 'FA 'Ak[A '.A (&k{MA )DA *)tͪA 2͝A 1AzA 2u'A]A 4AuA 4ތ$A 6LA 7>tmA 8OA 8ϐ+{A :vĹA ;,FA >CA @FJg%A ADZA DuRA EF6XA GHyA J:ǭA M*A M>/A P,UmwA RdF2OA T`DA VȜBrA WbsA W$A UhA UO;x>A TA SiťA Q]A P; A ONxA N~pA NiA PͪA P9A QƋA U?Ŏ~OA U" :A U_A V hxxA W M A W )A WB%CA XJA ZwDcA \XO A ^{A `y{A cI+A cwQA b #A a_A a>ݰA a@jgA bxPKZA cSMhyA c6_^.A b*A b@NA a;4.A b-UHA a).A `EA `A `rA `iA `_ƶ9A _~VA _AA ^Y?|A ]A ]0?RA \JpXA Zt VA YތA YN`>A XHA W>A W+,dA WA WWsuA Up<@A UĔ3A T1lA RNA Q>A Q զ,:A PзbFA ORj@A Om˓:A NLA NPA N(AA P CA Pq VA O{-A NUA M1A LsZA K}bA J=BA IS rA HGD~-SA <[A ]A .YkG_A .qUA -FA -A +A +7hXA *9H21A )5uiA &lA &GKA %:A $z͠ 3A #3hA Gc0A GJ*A G&A Gc0A <S'A < TA =~mzA <S'A sHWfA ?%rA ?_NA AGA B1 rA DtgA G٥A HV&A H~c"A HYgA I FnEA IiMٝA IL(A J|A I 3ɮ A G_,MA Ct{A C}*A Ei3hjA Fx;qA G!]\A F~PA ER,M`A B .A B֞+mA B쐙A BA A2FA ? PA ?jhYGA ?jlA <^A ;A :]DA :9|A :NxA :g2ۣA ;smA ;t2ܵA <yxA 0A IA RhA VNA A M}A }A eHxA UTA A D[A \?LA A ȑ(@wA )GA nA FA 7BA 1>_A ܞA \XA dYA T?6A c`TA p9)wA YPtA fEXA 뽩A GA Y TA z:>A \A A n[A KSA )`#A A kA վZA A MhA ܴA 4JrCA ҏ?OA ~[tA 'D/ՐA 4YA r voA IA S~A kA h+[SA IbVA F[A ʭ.A AA m|mA WRA 4'A *J8A wוA ]ܝA XA F~A YcA "eA sE]A fThA z?$A jcA A ت /A >˝A ?A iNA LZݻ A 3SA <̵A U0 A oQA !A ؉,fA %XA xhA T~A \a)A {GA :,$A /A TnA zA q8_A UslA AIA 5.A /^UA NA m zA eA }A A ~A F{A ~mA SyDA 9ӱlA npA 6$)iA xcA $kVA h* A BmA !wA h* A ߇DA .KA wghA K} A XA Ue9GA ٗ]A ٖ$9A As]A ؗu.&A $7"A քsaA >B+A ԼrA Իx%>A ԧtcA 9A Ь;A rBA `E?A ҩ A 9s7A 8xWA PmnA ͚#A ͚SOjA ͂ՁA ܏K#A ˕BAA A ɾ=A -lB A e~xA $kA 1A BzZA +RA G A ouA 0~VUA BٖA T0A 4?A q%uHA nab#A yA h-<A A RmVA MA ?A ϱGlA A .RtA [i@A 7ҔMA o^2A o2-A KA A ڹzDA ۆT1LaA A E%l_AA ܡ A ݗ\$]sA yzA kvA pA Jf6A V49A DtA PiA _SA mA NA .A |^A 病mA ~M7A jx(A Dv:A ?A ЁA KO A <[xA gA whͪA bA |A YA ^ lA xNA GHA HA k8wA \A HxA xA {A {RzA TCA []<A [5A A EV*A FA 3dIA kA bX}PA `A S/A 钠 2A ُTA 縌rA Z.#7A  A h|iA S7-A 1!A M#}A ߴB~_A ߇DA A wA y A dA YrA A >5A >quzA =U,A ;ɪA :A 8=EA 8B aA 8/ÿA 7yA 6hyA 5U7A 4ɍ3A 4:g>$A 4B>A 3`QA 2oA 2>:~OA 1E$`A /#.A /ՒA .ew9A -4'A , 5A ,7lUA +W}IA + JROA )CA )HA 'VA &!A &4A #A #jC6A #S&A #tA $<*A #crA #sA $eA #@;C5A !UA )GA %YOA tZgA A !emA iA !MHhA "F+UA #3hA $z͠ 3A %:A &GKA &lA )5uiA *9H21A +7hXA +A -A -FA .qUA .YkG_A / >]A /?0x'A /yiA / A /`A 0#DFA 0`fA 1A 2pQ]A 32XA 3ɐA 4`-@A 4FA 5!@A 5Cw{A 6+AA 6}dA 7=PA 7V-S-A 87~ΑA 8=WA 9?[A : A ;b9݅A ;j{פA ;"?sA ;vaA D~-SA ?u A @&CA A^$_A BLbA CA Ed`!A EږvA FlA G ,aA G|A HGA RNA T1lA UĔ3A Up<@A WWsuA WA W+,dA W>A XHA YN`>A YތA Zt VA \JpXA ]0?RA ]A ^Y?|A _AA _~VA `_ƶ9A `iA `rA `A `EA a).A b-UHA a;4.A b@NA b*A c6_^.A cSMhyA dA vI(A vl \A xyT*A xoI?A zN/A |04BA }V?MA ~\pA 2S6~A ~ KA ~!RA ~LSA |A }A A A /BiA go=A A ,A ~A YmA \J A BA eA ".A *A |>ǔA |!@A |1A |O\A {#2A a) A `{xA _sA ^=g+A _Ƨ>A ^gV A ^I|A ]oA ]KA [_3A [s2PA ZV0A YC#"[A X)*{A VtA U3%A UVmjA T3J"A Rj0A Rg1~?A RHIA QjA PA O'A OC⟷6A Nl:NA N7^A N A LqOQVA L7>A L oA K{!A KjhxbA Jg!dA IパA J'/jA J*QA I@A I A GP#eA FR4ΦA En=A D A EV6AA E,2wA En7A E!u%A DpvA C6uJA BA Bf6A B?bA B v4A A(`mA @tK.A ?N}A >@A >5A rjWA r A w> A wٓA r'[WA r A l ,A mʥ5A n6o֑atA >!|>A >/A <;A ;A ;8= A ;$)A :A ;ojA ;4fjA <7C A ;E8A =0A = A >;bA >5A >@A ?N}A @tK.A A(`mA B v4A B?bA Bf6A BA C6uJA DpvA E!u%A En7A E,2wA EV6AA D A En=A FR4ΦA GP#eA I A I@A J*QA J'/jA IパA Jg!dA KjhxbA K{!A L oA L7>A LqOQVA N A N7^A Nl:NA OC⟷6A O'A PA QjA RHIA Rg1~?A Rj0A T3J"A UVmjA U3%A VtA X)*{A YC#"[A ZV0A [s2PA [_3A ]KA ]oA ^I|A ^gV A _Ƨ>A ^=g+A _sA `{xA a) A b>2A c2 hA d"A em?zA gWTA g;Չ4A g=A h)zA irқA l{A mQ*FA nsldA p;˟GA q SA qpA r6A t5IA ttA u A ubVA vq5A wufr_A x1hvA y :A zJާA {#A ay@A b5qSA am}A aR`WyA `5`A `~tA _XAA _rnA _5dvSA ^T/(A ]`{A \)A Z^lA YtA V4A Uy`A UoqA U3kA T(A R&9A Q ڛA P)=0A NѾ#A M\A LkP0A K;AA K9A IȳDG`A H%< A G0!JIA 8琥A qA A A &ڝA A tuA NO{ĥA }A fD;A F A `A yA XC c#A "nA DFGA aA A E+A zA 3RKA (A hHSA a>A V oA bA v>IA %x`A N>A 쿙XA ͖A 7A p5TA vA TPA -S(A <1A UvA !TA VnA տ"A ZA A )8 A !kA ʨA ,SA i#NA  oA tE)A Z(RA 9ӱlA SyDA ~mA F{A ~A A }A eA m zA >A KTVA ]/A @A [ZA ZA EA ]oA 03VA 1fA =KA IBuA 45A vGA A !dA bhmA  A IA M!DA 4A :>A PY!A )xvA *~A h A y,9CA *aa A HEFA < WA h-<A yA nab#A q%uHA 4?A T0A BٖA 0~VUA ouA G A IA ;57`A + A %\7IA JbVA (A լ=A xA 1sA sA V%A 3 A [$A /ウA Y8]A gGA ܫA yA hA 2A %o?A dA BA kA ЅJnA ^dFA VA A wFA #A 6qA >cA BעA ']B A g4aA mA # HA T-lA d$웪A !jA })$A BA acA 6qA #A wFA A VA ^dFA ЅJnA kA BA dA %o?A 2A hA yA ܫA gGA Y8]A /ウA [$A 3 A V%A sA 1sA xA լ=A (A JbVA %\7IA + A ;57`A IA G A +RA BzZA 1A $kA e~xA -lB A ɾ=A A ˕BAA ܏K#A ͂ՁA ͚SOjA ͚#A PmnA 8xWA 9s7A ҩ A `E?A rBA Ь;A 9A ԧtcA Իx%>A ԼrA >B+A քsaA $7"A ؗu.&A As]A ٖ$9A ٗ]A Ue9GA XA K} A wghA .KA ߇DA eb A A ݖepA VA ەOA ٯA w}A ؜:XA fEA עt'A OBA S׊A dF@sA ՊGA [ËA #%A %A &A ~ A ҖnIA ϯ}-A ¸A ?uA ̗euA N}A 9>A OVA dA r_!qA A XJA 4l~A =cfA âZA A ~XA .3mA A A _Y+bA [EA A yOA A A (,A A 3A A #5A _Y+bA cG]A A wih8A wd&A uTA u/A uFA t'A ukNtuA ugA vvA vXA w;xFA wsA wEzA xʈA xSF~[A y֋!A yrA yEQA z2A {P4A |G+TA |NA }b%[:A ~EvA FA y{=A \`A [N2A ;A'A !!`6A + TcA -FA ȞA %flA ?IA i+A XfA 쥃A IA eA 耐(A R[A 1JA D,]_A xtA A A ;AA rUA R A gVA T[A rA %x`A v>IA bA V oA a>A hHSA (A 3RKA zA E+A A aA DFGA "nA XC c#A yA `A F A fD;A .6\A yWυA 똳A ^A {A Y5|A Njp"PA ļ7A -XYA !A \A ,:A A @A dڹA ]L_A <A (.A aA UGA LA .yhDA i A 6Z=A ,A h!їA ą A O[A .J8>A x5ߌA I}A nA ϫXKUA 9VA GEA 4l~A XJA A r_!qA dA OVA 9>A N}A ̗euA ?uA ¸A ϯ}-A ҖnIA ~ A &A %A #%A [ËA ՊGA dF@sA S׊A OBA עt'A fEA ؜:XA w}A ٯA ەOA VA ݖepA A eb A ߇DA ߴB~_A M#}A 1!A S7-A h|iA  A Z.#7A 縌rA ُTA 钠 2A S/A `A 'Ν(A ;d-A A "%A i,uA YA :f|ÇA *vA 0/p`A q =A 4*1A A )*qA GA -0A u5A mA {wA  A &A Ν7A >ܢA #VA lSjA uD|A ΍[A >VA {6A IeDA XzZA E*A uA iAA :3 A A|A nA I A ˵A VAf&A 8 A B;ɿA ړA 'A hhA k?A 6V1TA 6LA [$A 5VWA ݹ(bc(A ܴ7A 8AA ܋5A M|-A ێA ۠HA D\C~A A I}A Ou<^sA O?͝=A MvA J|A IL(ՔA HA H>/A GioA Fb'$A FInA GAA G0!JIA H%< A IȳDG`A K9A K;AA LkP0A M\A NѾ#A P)=0A Q ڛA R&9A T(A U3kA UoqA Uy`A V4A YtA Z^lA \)A ]`{A ^T/(A _5dvSA _rnA _XAA `~tA `5`A aR`WyA am}A b5qSA ay@A b|"y>A c/A >!|>A >֑atA ?nA @A AA AB*A AwXA BxtKA C A DxOA ER_;A F[grA G0!JIA GAA FInA Fb'$A GioA H>/A HA IL(ՔA J|A MvA O?͝=A Ou<^sA L.aYA KjA KA KA LLcA L&eA LL*A L]mlA L_ll9A LA L_VA ΍[A uD|A lSjA #VA 03A IǔA (&GAA 9T2A zCxA s^A 7:eA 5+A ?A |H9bA A e=89A ^A jaA UE~A +A ʆA ] A n|('A thA D 26A Hbi/A qϔA (&A \#MA %A =NA D%dA bx~A .A èM_A hA `{A nA 4k0A A +qZA H쬕A i(|A :!A A b(6A f2zA 6A A eA l#A G5A ?A cA A ~նeA 괌9A ~zG A MV:A | A 1A qLYA %A ?6"A hl%A KlA UHA ¿A lZA Ut]>A ["6A A -iA CzgA 0VrA lPA UzA \I>RA (MA vpA 8.A s̵A N#k A ژkA !0A pS!TA - A #A {A R`tA FA WaA RyA |+A Ua:A MTA Q&dA A W]A `4clA EA .kA LXA 9A RlA s};0A 9A Q"A <1*;A YA !eA A RyA T#UNA b٩ݱA A Y2||A +A MSA e$A 9EA I9A 1dA [9A ,A vAA +A A 0A K&A r2A IVA ǹMA oA ~LfA ~hCA ~8oA ~QA ~o$ A A ;ҭA & A A +EoA A ܷA 5A UtA BQA юaA I{,A !CA x΋A )ީA !EsA #?A M3}A %A YlA `A b7A TρxA `oEA SA ւA 4YA |@A TDA %(A FnA cv A /A N>A &SϪA A "d)]A v(]A OaA A α%[A eA A A A ,~%A J:A 3;A ~;A iA QT^A ORA A A SA yF{VA x@[A wA wHA v/) W[A uC A vEbEA u - A t}A tS5A s: xA r A p; &A PEڐA N]2A x}cA xCoPA xnA x-A w*gA vM/-)A w#9A w:qA vO3A v5A wFpA xLA x3\1A xsy]rA xuA w{~A w$fMA vڞA wTA wtA wtA x*KA w{A wih8A xCxJA zA { abA {&A |RA UzA lPA 0VrA CzgA -iA A ["6A }KA D`KA |ں2A @a҇A >*ոA 7.A DMA PPA u eA &zA 7+&A jlA ʚYLA S) A gh}A `A ԯ4A =$A \A EҎBA "A BA pBSA >=A F.؍A Q$A h A k\)A pc5A -u]sA ^}mA VkA +NA ~ˀvA A \M'nA h~A h%MA gWA f-eA eKA eACA c> A bTA az[A `:ʓA `e.A _[JfMA _%eA ^m"A ]"'A \#TZOA \B&@ 5A [&3A [N)A [W0A [qA Yl/A X:0bhA W`>A W~%A VGA UBfEA T3aA TQA S+A R9A R@8AA Rh[1 A PiA PªA NA M+5q=A Lr85hA K}iA J/UA Jf$5A ImfA IfwheA H߃lA I=A IGUqyA IܱXA Jأ&A JA L?(A LA Lg}A M  RA MauA NۿA OԂ2NA Ph&A PEڐA PKA Q5ReA S^^߶A TeZ4A Vn EA V ԕA U*A UۥA UqmA Vh}A X[A YCZA YP*gA Z֯A [`CA ]/ѥA ], A ^vA `Z6uJA `./6vA aXm A ddA eA fYQ6A g.ޣyA hǗA i439ZA jAA k5vA kOqhA lcA l]kbA mXj];A mX 8A lJA lA lA luA kmA kDA kw$% A l/f-A laSA sj_A s!RA r65A qaA r@YA q1]A qLA qdA p߭A pA nIǥA jHCA i}iA iA d0A \}A JsN\A 1R'kA H A D=A &nLA {A [YA ŒvA 8lҡA Q:[A zgA w^&A w;byA =A gyA A IL{!A QD@?A PM*A QA 6\9A fA jzNbA i&uA -A A ܗ!"JA :ReA ݄(KA TˎA ݐsA =2-A tW+A 'y5?A CA ߲`6A ]{5A \A Q+A kOA -A bˋA MP0A εw6A {'A ާrIA AA nuS}A q2rA /mA ^A DpA ^SkA qfOA 0A EA DNA8A ᓖ A >MA >+޿A ڿ,A  A q2LA :A b¼/A m5A yGA ~{A '~A &A ?6"A %A qLYA 1A | A MV:A ~zG A 괌9A ~նeA A cA ?A G5A q1>#A M A <Ȓ_A pK ]A |A lA }aA A ;A ?ϲ8A QQ9A 5?A ڛA ~VrgFA HLA aBA XA 6ƀA ؤ A H*NA AfA @kCA ςn =A 4QA ;A (ZA lkBqA κD@A A @A ȡꠙA ܶnA ƘA $npA bLOA C0A ĮܨA CA #n%A T3qXA 7ٲA `";A 4xA ŲvGA ' A ĜNIA A xIA OZA Nu+A ŠA ^z_8A kkA $A A .A Z GA ]TA EA psA A 6NA ÞmA tH2A A ʘA 70HA ^IA /A cYA }ӈA vA 4A ÅjA âZA =cfA 4l~A GEA 9VA ϫXKUA nA I}A $q)A y3A ӑA 1`FA ̄A Q<7A f_A ׂ-W~A lA eSA ĦbA ڏrA FfA ‘gA ܘuA A vWMA ݿ8A 4䛛\A JZA ߖUA wA ͡A 剸N=A +޿A >MA ᓖ A DNA8A EA 0A qfOA ^SkA DpA ^A /mA q2rA nuS}A AA ާrIA {'A εw6A MP0A bˋA -A kOA Q+A \A ]{5A ߲`6A CA 'y5?A tW+A =2-A ݐsA TˎA ݄(KA :ReA ܗ!"JA A -A i&uA jzNbA fA 6\9A QA PM*A QD@?A IL{!A A gyA =A w;byA w^&A zgA Q:[A 8lҡA ŒvA [YA {A &nLA D=A H A 1R'kA JsN\A \}A d0A HA dXA MtGA sfA .A A | A JA o8|A ꋕ-A |~A 锉A [ܘA WA }yA )`i^A ) A )a,A q$A 1jA =KA ys]A FebA U #A evA '8A O,AA QA 06A $GLA krA 6JC/A vA <[ͣA :lA J&[ A 4 A A RA  o@A "A \_JA 54A .hA KA DA A Q8 A PA >cA A 6>g A Hw A gIA f>JA JkA ʧ2A ɹsA )@2A 0A gA F8A ܺF\A 9A x [A $A |WA ׈qEA A@oA A w#l:A A p-A D3[A _YW|A e2A vu57A Cq@A 79A "mA S9)A m3A 2HA JA IA }A y[yA U`A K6A Q!A M%A  !A S#A gA \M'nA A ~ˀvA +NA VkA ^}mA -u]sA pc5A k\)A h A Q$A F.؍A >=A pBSA BA "A EҎBA \A =$A ԯ4A `A gh}A S) A ʚYLA jlA 7+&A &zA u eA PPA DMA 7.A >*ոA @a҇A |ں2A D`KA }KA ["6A Ut]>A lZA ¿A UHA KlA hl%A YFWA (˦pA nwA DA ,RdA hG˚A A\A Vy`A &3A rA `̀A 2RDsA v_,A _`9;A i7FA A ƔrA [s$A ߌA BmPA |A skWA uIA uA @A A 67A ^IA uiA +۹A oSo[.A Ҭ$ mA lHRA },A խlFA AfA ɱA SjA ̧.A ])A Q{8A ېrA ȂA ǒЫmA KuA P#A 4EA :p A )êGA <A ,nA *FzA WSA *A ╱A +A ㇷb:mA 6):A 黗A A 1jA q$A )a,A ) A )`i^A }yA WA [ܘA 锉A |~A ꋕ-A o8|A JA | A A .A sfA MtGA dXA HA d0A !֙A օ6*A A A 򥳦[~A 󭨑~A HgA =4A GA e*pA OA }E곅A 0¶A Y A G1H|A &A 6_A A=3A 'AA 9 A gA -8A `A &2A &YA 3A =A!WA!2(A!ݬA oTA s A FzA GA txA  9A A $A <5P&A CnA iA %A ?A :A r'A ;dA z%A ǹRAA e(A j!A n@A > A &A ^ƒ,A .A 4EA iA i}iA jHCA nIǥA pA p߭A qdA qLA q1]A r@YA qaA r65A s!RA sj_A u:>SA vA xźA x'kA yd ޔ/A }zÐA ~OA A 5A c A .%sA wQA  A FSA HdA ;YA 6A (eA h/A A@oA ׈qEA |WA $A x [A 9A ܺF\A F8A gA 0A )@2A ɹsA ʧ2A JkA f>JA gIA Hw A 6>g A A >cA PA Q8 A A DA KA .hA 54A \_JA "A  o@A RA A 4 A J&[ A :lA <[ͣA vA 6JC/A krA $GLA 06A QA O,AA '8A evA U #A FebA ys]A =KA }+A ;SaA dA |dA e-A 煼CA #lA -A DcA (A =A 6#5A Sl(A h3-A 'VdA f$/A 5cA BxxpA +[ A * A 0MA /E4A )MuA TA N8A 4d&A ܫA ƾ0A yUA n F A ccA ($A I>A xQA MbA |AA 6t'A `wA ' RA mEA C00oA E1A xH:`A ?A AA Q‰A 'A i*}tA Z56A NhպA .߁)A /(A l A *z"A >PA K22A Q]Y A 2LA !DcA ~NA ^KA >sA EA #A 0NA _A ɷA TX uA 9U/A ry*A c$A y!umA ŮΉA nDA J OA Ɩf=A żYA y{A rA bA >nQA ĈޝA YA Ó" f>A YA s5XA vA QA xHA P#A KuA ǒЫmA ȂA ېrA Q{8A ])A ̧.A SjA ɱA ΍:>A ǚ.A BuBA %ݖA ϠǥA ɔA ёA ӮUIA {0_A ֭A $o3A ֬anA 羋A @hA g`sA oA مŝA W4A ڠkA ٜ]A }A A ެA R&A қrA ୘A "4]hA }VA 1jA A 黗A 6):A ㇷb:mA +A ╱A *A WSA *FzA ,nA <A )êGA :p A 4EA :@A =A ͕A 9A &n*A (tamA y(A A \ZA c@,"A ՑA H"A A /A ߘmA ޝ_A \A l+A ИA wku[A zQA sݙA t 5A ,A {A S[A ? GA EWeA ӘN{8A uv A oA !ҳ9A ϠA rWA wA ]=A ̺6A ˁA ˲DtA ˹dA 6BA I}A eA A 7 A B-A 茄DA ;A kA BB A FF2A  A qA ie}A G9MA ƛA ԊA ^RA 8ټDA 60>1A P2A 3 fA ܭ A o6A G2r8A wfGyA ù H-A xcA x3bEA zKA 6A }<@A >QbA ;A +)A YfA ~ZŃA +)A n F A yUA ƾ0A ܫA 4d&A N8A TA )MuA /E4A 0MA * A +[ A BxxpA 5cA f$/A 'VdA h3-A Sl(A 6#5A =A (A DcA -A #lA 煼CA e-A |dA dA ;SaA }+A =KA )/A 7EA iA %RA cqMA $FjA P#A xHA QA vA s5XA YA Ó" f>A YA ĈޝA >nQA bA rA y{A żYA Ɩf=A J OA nDA ŮΉA y!umA c$A ry*A 9U/A TX uA $>ɷA 4PA `Gi%A A +A kA aVwA *6A GA GvLA u#?W/A pA #3yA %E|A A]{A ZӜA hA 9]IA qA M4I.A zGA mOA 1)A 5A 'A  A :q\aA 선2A 2A JĬA ԅ A . @A -MA ǰA A +A 8~A >^>A 1q?A h5yA HA qA m7{A 񠈺RA zhA a=A (A $fA XzA b+;A NJA 4A HA }PA vxA H7A HvA AA HA CA rK'A JfA BRA EGA -A D{َA XXA 4:A ATA YD aA F/A 07d|A 4)A ګO'A \"FA 3^A 2A ۘA mnA oA  ;5A 9A ͕A =A :@A 4EA .A ^ƒ,A &A > A n@A j!A e(A ǹRAA z%A ;dA r'A :A ?A %A iA CnA <5P&A $A TnA NA!,כ/A ˂A!A!LWA!c7A!Lak?A!nA!CEaA!8a8 A!eyA!ۼ]A!SKA!5u#A!5I(A!{|A!huA! $(CA! +A! K-A! QA! RA! 4A! ;A!BhA!LA!<A!o8xA!1#?A!XA!$ A!.MA!A!{\A!mhA!= A!o*uA!ȡi,A!@cYA!+A!/ZA!lvDtA!5`rA! 4"ndA! UA!!C`5A!_ҽA!2A!ڜsA!]CA!<{A!űTA!jOA!kA!A!~_A!]w"A!olqA! 2A!HJA!&A!ذA!%IyA!$A![3A!)1f&A!DA!IgA!l(A!N]A!n@A!]dҼA!A!}^:XA!XM#A!t]LA! ӭA!0GA!ۚA!l5/$A!BA!J A!vaBA!wA!yA!1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ZA@JnA@"pjA@+A@5 A@2!A@A@'I%A@˂8A@x9?(A@p4j%A@3E$A@;hA@;}A@OH\A@dNA@vh|k~A@DA@?'A@*8A@LwA@A@ۓ!WA@JNA@A@A@!ڀ>A@,A@FA@>C(A@(A@ߒA@ppA@)3NA@qdA@]:A@[DA@iVA@z1 A@Z?*A@He2A@3pB(A@3A@^A@ A@A@"A@MA@,ͣ?A@煂A@񦁓jA@\2A@vxnA@A@~ KA@~ҨA@|8?A@|.$A@`kH2A@<#iA@/>8A@(1A@i<@(A@#TA@QiA@vA@&4A@r¤7fA@'kfA@A@zA@9]A@֔B|A@I bA@W[dWA@Y4vA@A@p_~A@[*A@@DA@OԆA@A@~A@}vA@Kk0A@g?A@fv`A@eC@A@:F͍A@q‹&A@NA@؁jA@liA@/n?wA@%+6^A@S A@7x:A@֎vA@` XA@CA@oA@-UA@sZA@͵pA@矧+GA@O>A@$lXA@A@Xu{A@8yA@$ޤA@ [A@A@ގVA@nKTA@nA@9 A@jA@ A@-='A@E,A@y*A@ &A@@KA@':A@4+A@n]6A@mA@MSZA@`@ A@費i7A@ǎA@;v A@A@K `A@]0A@邢lA@hBJA@(IA@$]A@|)A@vA@HA@$ IA@cnA@FnA@A@iM`A@A@HZA@hU&A@Fn,A@A@#O A@:~]'A@Q%L*A@蕫>A@ǜA@HLA@.A@ώwjA@XA@v5A@/n?<v}#l` 'mHv znv}#l` 1 mHv zngdalautotest-3.1.2/gdrivers/data/netcdf-sg/serpenski_2nd.nc0000664000175000017500000000214013701057752022377 0ustar evenevenCDF cinstancenodeparts  ConventionsCF-1.8 NAMES unitsunknowngeometry serpenskix_nodes units degrees_east standard_name longitudeaxisX@y_nodes units degrees_north standard_namelatitudeaxisY@ncount  long_name node countHpcount  long_namepart node countLint_ring  long_nameinterior ringsT serpenski  geometry_typepolygonnode_coordinatesx_nodes y_nodes node_countncountpart_node_countpcount interior_ringint_ring\Serpenski Triangle???????zXL?۶zXL?۶zXL|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/line3D_test.nc0000664000175000017500000000263413701057752022016 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometry geometry_typelined@x_nodes units degrees_east standard_name longitudeaxisXy_nodes units degrees_north standard_namelatitudeaxisYDz_nodes unitsmetersaxisZncount  long_name node countnames_geometry  geometry_typelinenode_coordinatesx_nodes y_nodes z_nodes node_countncountTrail_1Trail_2Trail_3Trail_4Trail_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$?@@@ @"$?@@@ @"$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/bad_feature_test.nc0000664000175000017500000000141013701057752023130 0ustar evenevenCDF cinstance  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydPx_nodes units degrees_east standard_name longitudeaxisX(y_nodes units degrees_north standard_namelatitudeaxisY(names_geometry  geometry_type dunns capnode_coordinatesx_nodes y_nodesGuage_1Guage_2Guage_3Guage_4Guage_5?@@@@|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/multiple_containers.nc0000664000175000017500000000277013701057752023722 0ustar evenevenCDF cinstancenodeparts  ConventionsCF-1.8 NAMES unitsunknowngeometry serpenski4NAMES_2 unitsunknowngeometryserpenski_outlineHx_nodes units degrees_east standard_name longitudeaxisX@\y_nodes units degrees_north standard_namelatitudeaxisY@ncount  long_name node countpcount  long_namepart node countint_ring  long_nameinterior rings serpenski  geometry_typepolygonnode_coordinatesx_nodes y_nodes node_countncountpart_node_countpcount interior_ringint_ringgeometry_dimensioninstanceserpenski_outline  geometry_typelinenode_coordinatesx_nodes y_nodes node_countncountpart_node_countpcountgeometry_dimensioninstanceSerpenski Triangleoutline of triangle???????zXL?۶zXL?۶zXL||gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/0000775000175000017500000000000013701057752021604 5ustar evenevengdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/point3D_write_test.json0000664000175000017500000000114613701057752026272 0ustar eveneven{ "type": "FeatureCollection", "name": "point_collection", "features": [ { "type": "Feature", "properties": { "NAMES": "FishingSpot1" }, "geometry": { "type": "Point", "coordinates": [ 0.5, -0.5, -1.5 ] } }, { "type": "Feature", "properties": { "NAMES": "FishingSpot2" }, "geometry": { "type": "Point", "coordinates": [ 1.0, -1.0, -0.5 ] } }, { "type": "Feature", "properties": { "NAMES": "FishingSpot3" }, "geometry": { "type": "Point", "coordinates": [ 1.5, -1.5, 0.5 ] } }, { "type": "Feature", "properties": { "NAMES": "FishingSpot4" }, "geometry": { "type": "Point", "coordinates": [ 2.0, -2.0, 1.5 ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/empty_multipolygon_write_test.json0000664000175000017500000000055113701057752030731 0ustar eveneven{ "type": "FeatureCollection", "name": "places", "features": [ { "type": "Feature", "properties": { "NAMES": "Nowhere" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ ] ] } }, { "type": "Feature", "properties": { "NAMES": "Somewhere" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [0, 0], [2, 0], [2, 2], [0, 2], [0, 0] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/polygon_write_test.json0000664000175000017500000000127013701057752026437 0ustar eveneven{ "type": "FeatureCollection", "name": "shapes", "features": [ { "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Square_in_Square" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ], [ [3.5, 0.25], [3.75, 0.25], [3.75, 0.5], [3.5, 0.5], [3.5, 0.25] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Triangle_Flipped" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ -1.0, 0.0 ], [ -1.0, -1.0 ], [ 0.0, 0.0 ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multipolygon_write_test.json0000664000175000017500000000124113701057752027510 0ustar eveneven{ "type": "FeatureCollection", "name": "shapes", "features": [ { "type": "Feature", "properties": { "NAMES": "Triangles" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ], [ [ [ 0.0, 0.0 ], [ -1.0, 0.0 ], [ -1.0, -1.0 ], [ 0.0, 0.0 ] ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Square_in_Square_and_Triangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ], [ [3.5, 0.25], [3.75, 0.25], [3.75, 0.5], [3.5, 0.5], [3.5, 0.25] ] ], [ [ [ 4.0, 4.0 ], [ 4.0, 5.0 ], [ 5.0, 4.0 ], [ 4.0, 4.0 ] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multipolygon_no_ir_write_test.json0000664000175000017500000000077713701057752030713 0ustar eveneven{ "type": "FeatureCollection", "name": "mpoly_shape", "features": [ { "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "DoubleTriangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 0.0 ] ] ], [ [ [ 3.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multipolygon3D_write_test.json0000664000175000017500000000175413701057752027710 0ustar eveneven{ "type": "FeatureCollection", "name": "shapes", "features": [ { "type": "Feature", "properties": { "NAMES": "Trianglies" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 1.0 ], [ 1.0, 1.0, 1.0 ], [ 0.0, 0.0, 0.0 ] ] ], [ [ [ 0.0, 0.0, 0.0 ], [ -1.0, 0.0, -1.0 ], [ -1.0, -1.0, -1.0 ], [ 0.0, 0.0, 0.0 ] ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Prismy_and_Triangly" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0, 0.0], [ 4.0, 0.0, 0.0 ], [ 4.0, 1.0, 1.0 ], [ 3.0, 1.0, 1.0 ], [ 3.0, 0.0, 0.0 ] ], [ [3.5, 0.25, 0.0], [3.75, 0.25, 0.0], [3.75, 0.5, 0.1], [3.5, 0.5, 0.1], [3.5, 0.25, 0.0] ] ], [ [ [ 4.0, 4.0, 100.0 ], [ 4.0, 5.0, 101.0 ], [ 5.0, 4.0, 101.0 ], [ 4.0, 4.0, 100.0 ] ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Single_Triangly" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -2.0, 0.0, -5.0 ], [ -2.0, 1.0, -6.0 ], [ -1.0, 1.0, -6.0 ], [ -2.0, 0.0, -5.0 ] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/point_write_test.json0000664000175000017500000000112013701057752026073 0ustar eveneven{ "type": "FeatureCollection", "name": "point_collection", "features": [ { "type": "Feature", "properties": { "NAMES": "FishingSpot1" }, "geometry": { "type": "Point", "coordinates": [ 0.5, -0.5 ] } }, { "type": "Feature", "properties": { "NAMES": "FishingSpot2" }, "geometry": { "type": "Point", "coordinates": [ 1.0, -1.0 ] } }, { "type": "Feature", "properties": { "NAMES": "FishingSpot3" }, "geometry": { "type": "Point", "coordinates": [ 1.5, -1.5 ] } }, { "type": "Feature", "properties": { "NAMES": "FishingSpot4" }, "geometry": { "type": "Point", "coordinates": [ 2.0, -2.0 ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/cf1.8_states.json0000664000175000017500000200611713701057752024710 0ustar eveneven{ "type": "FeatureCollection", "name": "geometry_container", "features": [ { "type": "Feature", "properties": { "STATE_NAME": "Washington", "DRAWSEQ": 2, "STATE_FIPS": "53", "SUB_REGION": "Pacific", "STATE_ABBR": "WA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.402015310383547, 48.225216372377972 ], [ -122.36833331035217, 48.128141372287573 ], [ -122.216992310211225, 48.007439372175156 ], [ -122.230121310223467, 47.969113372139461 ], [ -122.302922310291251, 47.950214372121863 ], [ -122.394492310376535, 47.774176371957907 ], [ -122.414815310395468, 47.664180371855466 ], [ -122.382220310365113, 47.595409371791419 ], [ -122.392633310374805, 47.510242371712103 ], [ -122.319738310306917, 47.390115371600231 ], [ -122.32537631031218, 47.344323371557579 ], [ -122.420837310401083, 47.318844371533849 ], [ -122.441604310420416, 47.301125371517344 ], [ -122.392843310375014, 47.277722371495557 ], [ -122.424094310404115, 47.259472371478552 ], [ -122.546588310518189, 47.316276371531458 ], [ -122.53076331050346, 47.287456371504618 ], [ -122.591806310560301, 47.180060371404593 ], [ -122.700079310661138, 47.098325371328478 ], [ -122.72818631068732, 47.082441371313685 ], [ -122.790048310744936, 47.125859371354125 ], [ -122.923150310868891, 47.047963371281568 ], [ -123.031348310969662, 47.100774371330758 ], [ -123.08120031101609, 47.090058371320779 ], [ -123.115436311047972, 47.207981371430606 ], [ -122.880373310829043, 47.299233371515584 ], [ -122.802184310756232, 47.360740371572874 ], [ -122.773335310729365, 47.3373603715511 ], [ -122.82510831077758, 47.234826371455604 ], [ -122.761238310718099, 47.162496371388244 ], [ -122.719801310679514, 47.223131371444708 ], [ -122.769708310725989, 47.266156371484783 ], [ -122.741549310699753, 47.341450371554906 ], [ -122.637436310602794, 47.398580371608112 ], [ -122.628754310594715, 47.398553371608088 ], [ -122.699744310660833, 47.292085371508932 ], [ -122.606914310574382, 47.270571371488899 ], [ -122.611546310578689, 47.29339837151015 ], [ -122.580530310549804, 47.251387371471026 ], [ -122.553156310524315, 47.283332371500777 ], [ -122.588254310557005, 47.333929371547896 ], [ -122.544125310515895, 47.373927371585154 ], [ -122.558446310529234, 47.398363371607914 ], [ -122.504461310478959, 47.507216371709291 ], [ -122.542702310514571, 47.522734371723743 ], [ -122.555262310526274, 47.583505371780333 ], [ -122.586460310555324, 47.571191371768869 ], [ -122.621509310587967, 47.696968371886008 ], [ -122.473588310450197, 47.754980371940036 ], [ -122.531888310504499, 47.909461372083911 ], [ -122.613217310580239, 47.936189372108799 ], [ -122.611162310578322, 47.85000837202854 ], [ -122.723062310682536, 47.75689937194182 ], [ -122.752942310710381, 47.660688371852217 ], [ -122.916969310863138, 47.614606371809302 ], [ -123.026336310964993, 47.515936371717409 ], [ -123.112685311045411, 47.37156937158295 ], [ -123.03620631097418, 47.356051371568498 ], [ -122.833247310785168, 47.438464371645253 ], [ -123.010471310950209, 47.353027371565688 ], [ -123.154060311083953, 47.348547371561516 ], [ -123.113915311046554, 47.456273371661837 ], [ -122.982744310924403, 47.605474371800796 ], [ -122.899363310846738, 47.672517371863236 ], [ -122.858804310808964, 47.827328372007415 ], [ -122.809517310763056, 47.857075372035119 ], [ -122.789801310744707, 47.802548371984336 ], [ -122.745870310703793, 47.808988371990338 ], [ -122.653585310617842, 47.86443137204197 ], [ -122.661560310625276, 47.917157372091069 ], [ -122.802931310756932, 48.085321372247691 ], [ -122.768882310725218, 48.14399437230233 ], [ -122.841111310792485, 48.133136372292221 ], [ -122.924844310870469, 48.066796372230435 ], [ -122.921594310867448, 48.094179372255937 ], [ -123.12322231105523, 48.148733372306751 ], [ -123.396857311310072, 48.111030372271628 ], [ -123.991215311863613, 48.159161372316461 ], [ -124.563547312396622, 48.357278372500971 ], [ -124.717175312539709, 48.37755737251986 ], [ -124.705209312528567, 48.231996372384287 ], [ -124.73276931255424, 48.149989372307914 ], [ -124.606685312436809, 47.873735372050632 ], [ -124.48403531232259, 47.808255371989652 ], [ -124.373605312219723, 47.6387633718318 ], [ -124.34908031219689, 47.526910371727624 ], [ -124.319427312169267, 47.349238371562159 ], [ -124.23142531208731, 47.275070371493086 ], [ -124.192733312051274, 47.166982371392422 ], [ -124.162036312022693, 46.929612371171352 ], [ -124.112361311976429, 47.042675371276644 ], [ -124.03439431190381, 47.031033371265806 ], [ -123.995864311867933, 46.97638537121491 ], [ -123.812655311697313, 46.963965371203344 ], [ -124.046929311915491, 46.887253371131905 ], [ -124.028808311898615, 46.823767371072776 ], [ -124.104738311969328, 46.874145371119695 ], [ -124.105760311970286, 46.908148371151356 ], [ -124.138827312001069, 46.899985371143757 ], [ -124.102067311966834, 46.78946937104083 ], [ -124.091049311956581, 46.729022370984538 ], [ -124.043158311911981, 46.715855370972278 ], [ -123.895542311774506, 46.744986370999399 ], [ -123.840966311723676, 46.718288370974541 ], [ -123.926470311803314, 46.673060370932419 ], [ -123.95771231183241, 46.617225370880419 ], [ -123.893567311772671, 46.511079370781559 ], [ -123.940693311816545, 46.481115370753656 ], [ -123.841451311724128, 46.404343370682156 ], [ -124.013002311883895, 46.383680370662915 ], [ -124.023043311893247, 46.583541370849048 ], [ -124.065510311932798, 46.639745370901394 ], [ -124.079107311945464, 46.267259370554484 ], [ -123.99332931186558, 46.310274370594549 ], [ -123.88577131176541, 46.240438370529503 ], [ -123.725459311616106, 46.285423370571408 ], [ -123.620076311517948, 46.258665370546481 ], [ -123.470773311378906, 46.275023370561712 ], [ -123.304717311224252, 46.144737370440382 ], [ -123.248799311172178, 46.144020370439712 ], [ -123.212437311138302, 46.170006370463909 ], [ -123.176196311104562, 46.183586370476561 ], [ -123.118554311050872, 46.179310370472578 ], [ -123.050596310987586, 46.155736370450626 ], [ -122.974169310916409, 46.110483370408474 ], [ -122.899757310847107, 46.079329370379462 ], [ -122.875417310824446, 46.027183370330903 ], [ -122.807741310761401, 45.943890370253328 ], [ -122.806223310760004, 45.904072370216241 ], [ -122.784073310739359, 45.867886370182546 ], [ -122.784516310739775, 45.850449370166302 ], [ -122.788009310743035, 45.800343370119634 ], [ -122.764288310720943, 45.760568370082595 ], [ -122.77255131072863, 45.727685370051972 ], [ -122.760541310717457, 45.649397369979056 ], [ -122.696323310657647, 45.631045369961967 ], [ -122.651209310615627, 45.606830369939416 ], [ -122.565429310535734, 45.594818369928227 ], [ -122.437154310416275, 45.564779369900251 ], [ -122.356457310341113, 45.566171369901546 ], [ -122.303150310291471, 45.543092369880057 ], [ -122.244922310237243, 45.548112369884727 ], [ -122.082037310085553, 45.590504369924204 ], [ -122.000011310009143, 45.617824369949652 ], [ -121.972659309983669, 45.635776369966372 ], [ -121.926820309940979, 45.642028369972195 ], [ -121.888283309905091, 45.676856370004629 ], [ -121.811041309833158, 45.700683370026823 ], [ -121.758694309784403, 45.689716370016612 ], [ -121.706417309735713, 45.688793370015745 ], [ -121.52905430957054, 45.719567370044409 ], [ -121.442552309489969, 45.694967370021502 ], [ -121.422029309470872, 45.690603370017435 ], [ -121.367814309420368, 45.699686370025894 ], [ -121.319977309375815, 45.696642370023056 ], [ -121.276391309335224, 45.678340370006012 ], [ -121.214271309277365, 45.665645369994188 ], [ -121.203308309267157, 45.657287369986406 ], [ -121.19205430925669, 45.613242369945382 ], [ -121.174316309240169, 45.60051636993353 ], [ -121.12520430919443, 45.607059369939627 ], [ -121.073530309146292, 45.646610369976457 ], [ -121.033482309109004, 45.652844369982269 ], [ -120.968478309048464, 45.645154369975103 ], [ -120.948573309029925, 45.650316369979912 ], [ -120.907937308992075, 45.635477369966097 ], [ -120.861419308948754, 45.665186369993762 ], [ -120.696994308795624, 45.710509370035972 ], [ -120.658403308759688, 45.732612370056557 ], [ -120.62375730872742, 45.743610370066804 ], [ -120.570082308677428, 45.740918370064293 ], [ -120.499156308611362, 45.695630370022116 ], [ -120.443383308559419, 45.689279370016202 ], [ -120.283635308410652, 45.716583370041633 ], [ -120.207445308339686, 45.719784370044607 ], [ -120.1559083082917, 45.76126137008324 ], [ -120.068648308210427, 45.780202370100881 ], [ -119.994320308141198, 45.811140370129692 ], [ -119.869735308025184, 45.831698370148843 ], [ -119.833556307991472, 45.841609370158068 ], [ -119.678445307847028, 45.852539370168245 ], [ -119.622116307794556, 45.899410370211896 ], [ -119.589294307763993, 45.913315370224851 ], [ -119.512220307692218, 45.899200370211702 ], [ -119.438861307623895, 45.914268370225741 ], [ -119.379441307568555, 45.91761037022885 ], [ -119.302763307497145, 45.932662370242866 ], [ -119.17874230738164, 45.922351370233265 ], [ -119.140250307345781, 45.925708370236393 ], [ -119.03222130724518, 45.966274370274171 ], [ -118.982133307198524, 45.999058370304709 ], [ -117.992527306276884, 46.001639370307103 ], [ -117.982677306267718, 45.999880370305469 ], [ -117.60282630591395, 46.000268370305832 ], [ -117.481663305801106, 45.999834370305429 ], [ -116.919132305277216, 45.995175370301084 ], [ -116.957723305313152, 46.06568737036676 ], [ -116.987211305340622, 46.078509370378697 ], [ -116.961637305316799, 46.097274370396178 ], [ -116.929426305286796, 46.165483370459697 ], [ -116.967490305322258, 46.19755437048957 ], [ -116.972725305327117, 46.249309370537773 ], [ -117.001642305354054, 46.302448370587257 ], [ -117.02797330537858, 46.335427370617971 ], [ -117.064184305412311, 46.348698370630331 ], [ -117.044470305393943, 46.38857437066747 ], [ -117.038558305388435, 46.427980370704169 ], [ -117.04192630539157, 46.536601370805329 ], [ -117.040968305390692, 47.119319371348027 ], [ -117.042392305392013, 47.258501371477649 ], [ -117.041794305391448, 47.36144137157352 ], [ -117.037472305387425, 47.9710923721413 ], [ -117.038868305388718, 48.046186372211238 ], [ -117.029111305379644, 48.838075372948744 ], [ -117.032049305382372, 48.999931373099486 ], [ -117.438580305760979, 48.999918373099476 ], [ -118.200354306470444, 48.999908373099466 ], [ -118.843603307069515, 48.999898373099455 ], [ -120.857059308944685, 48.999830373099392 ], [ -122.765119310721715, 48.999746373099313 ], [ -122.743940310701987, 48.955808373058389 ], [ -122.82242131077507, 48.950725373053658 ], [ -122.754242310711589, 48.909988373015722 ], [ -122.697404310658641, 48.803015372916093 ], [ -122.51685331049049, 48.757921372874094 ], [ -122.526558310499539, 48.711724372831071 ], [ -122.487798310463432, 48.638570372762942 ], [ -122.429545310409196, 48.599397372726457 ], [ -122.505299310479728, 48.559444372689249 ], [ -122.473833310450431, 48.462195372598678 ], [ -122.523228310496435, 48.45840337259515 ], [ -122.608178310575553, 48.518824372651423 ], [ -122.699413310660518, 48.494328372628601 ], [ -122.667032310630361, 48.412895372552768 ], [ -122.564366310534751, 48.414246372554025 ], [ -122.378320310361488, 48.289721372438052 ], [ -122.404404310385772, 48.246594372397887 ], [ -122.5091303104833, 48.253793372404587 ], [ -122.542074310513982, 48.210460372364238 ], [ -122.514511310488317, 48.133973372292999 ], [ -122.361333310345657, 48.060097372224192 ], [ -122.454419310432343, 48.128492372287894 ], [ -122.462855310440204, 48.228363372380912 ], [ -122.402015310383547, 48.225216372377972 ] ] ], [ [ [ -122.967978310910638, 48.443794372581543 ], [ -123.018883310958046, 48.489605372624212 ], [ -123.022271310961202, 48.513359372646335 ], [ -122.967980310910633, 48.526933372658974 ], [ -123.008698310948574, 48.533719372665288 ], [ -123.012095310951736, 48.557477372687416 ], [ -123.103721311037063, 48.608377372734822 ], [ -123.141053311071829, 48.623647372749048 ], [ -123.169899311098703, 48.562564372692151 ], [ -123.159720311089217, 48.521842372654234 ], [ -123.095233311029148, 48.479422372614721 ], [ -122.967978310910638, 48.443794372581543 ] ] ], [ [ [ -122.733187310691974, 48.27664737242587 ], [ -122.768778310725111, 48.218818372372013 ], [ -122.695554310656917, 48.181185372336969 ], [ -122.608628310575966, 48.031430372197498 ], [ -122.544961310516669, 47.967531372137984 ], [ -122.471616310448368, 47.987509372156595 ], [ -122.44278831042152, 47.918056372091911 ], [ -122.386961310369529, 47.90454937207933 ], [ -122.35540031034013, 47.963886372134596 ], [ -122.379994310363031, 48.03214637219817 ], [ -122.496212310471265, 48.09407137225584 ], [ -122.546202310517828, 48.076858372239812 ], [ -122.610925310578111, 48.206321372360378 ], [ -122.732034310690892, 48.225414372378161 ], [ -122.623509310589839, 48.296350372444223 ], [ -122.528648310501481, 48.283510372432268 ], [ -122.525750310498779, 48.321043372467223 ], [ -122.604384310572016, 48.404789372545217 ], [ -122.665612310629044, 48.396777372537755 ], [ -122.733187310691974, 48.27664737242587 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Montana", "DRAWSEQ": 3, "STATE_FIPS": "30", "SUB_REGION": "Mountain", "STATE_ABBR": "MT" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -111.475425300207363, 44.702162369096875 ], [ -111.443632300177754, 44.713179369107138 ], [ -111.395084300132538, 44.708869369103127 ], [ -111.384959300123114, 44.737694369129969 ], [ -111.372309300111326, 44.745087369136854 ], [ -111.349977300090529, 44.726177369119242 ], [ -111.319221300061884, 44.727864369120809 ], [ -111.315475300058395, 44.705193369099703 ], [ -111.295668300039949, 44.682938369078968 ], [ -111.270208300016236, 44.673802369070465 ], [ -111.270665300016674, 44.642212369041047 ], [ -111.223971299973186, 44.626908369026793 ], [ -111.219797299969301, 44.61798136901848 ], [ -111.234233299982733, 44.602562369004119 ], [ -111.219507299969024, 44.573170368976747 ], [ -111.178764299931075, 44.564851368968995 ], [ -111.170242299923146, 44.545186368950681 ], [ -111.134359299889724, 44.527902368934583 ], [ -111.12891829988466, 44.500757368909305 ], [ -111.094630299852724, 44.486124368895673 ], [ -111.051560299812607, 44.473323368883754 ], [ -111.051616299812665, 44.664490369061795 ], [ -111.053428299814357, 44.995695369370253 ], [ -110.429649299233418, 44.992285369367075 ], [ -110.392760299199054, 44.998625369372974 ], [ -109.995529298829112, 45.00279336937686 ], [ -109.799385298646428, 44.999522369373814 ], [ -108.625256297552937, 44.997593369372012 ], [ -108.259238297212065, 45.00011536937437 ], [ -107.894374296872257, 44.999773369374047 ], [ -106.259231295349409, 44.99616236937068 ], [ -106.021150295127683, 44.997213369371664 ], [ -105.085003294255827, 44.999817369374085 ], [ -105.041796294215587, 45.001076369375262 ], [ -104.05984229330106, 44.99733636937178 ], [ -104.043072293285448, 44.997805369372216 ], [ -104.043851293286167, 45.212875369572515 ], [ -104.049517293291444, 45.883052370196665 ], [ -104.048906293290884, 45.942993370252495 ], [ -104.04783629328989, 46.280881370567172 ], [ -104.046705293288838, 46.542539370810857 ], [ -104.047437293289519, 46.642947370904373 ], [ -104.045926293288105, 47.333832371547814 ], [ -104.047307293289393, 47.400017371609451 ], [ -104.048425293290435, 48.000081372168303 ], [ -104.052111293293862, 48.391019372532391 ], [ -104.052317293294053, 48.645824372769695 ], [ -104.062991293303995, 49.000026373099573 ], [ -105.063034294235365, 49.000021373099571 ], [ -106.125579295224938, 49.000021373099571 ], [ -107.188121296214504, 49.000017373099567 ], [ -108.250675297204083, 49.000009373099559 ], [ -109.500737298368293, 49.000005373099555 ], [ -110.750797299532508, 49.000005373099555 ], [ -111.282679300027851, 49.000011373099561 ], [ -112.188387300871369, 48.999992373099545 ], [ -114.063463302617663, 48.999977373099526 ], [ -114.7293253032378, 48.999970373099522 ], [ -116.063531304480364, 48.999950373099502 ], [ -116.056692304474012, 48.498665372632644 ], [ -116.055497304472894, 48.208483372362394 ], [ -116.053492304471021, 47.976191372146054 ], [ -116.025316304444786, 47.964939372135575 ], [ -115.998932304420208, 47.925140372098511 ], [ -115.937842304363315, 47.867124372044472 ], [ -115.903921304331732, 47.841074372020216 ], [ -115.869809304299963, 47.827452372007528 ], [ -115.849324304280884, 47.805182371986788 ], [ -115.836742304269166, 47.756281371941242 ], [ -115.79053730422612, 47.744838371930584 ], [ -115.775727304212324, 47.709732371897893 ], [ -115.733665304173158, 47.69555437188469 ], [ -115.734067304173536, 47.639879371832833 ], [ -115.698284304140202, 47.616080371810675 ], [ -115.692088304134444, 47.590721371787055 ], [ -115.742829304181697, 47.533691371733944 ], [ -115.701522304143225, 47.520893371722025 ], [ -115.692770304135081, 47.489540371692826 ], [ -115.640142304086055, 47.475235371679503 ], [ -115.643185304088888, 47.457793371663257 ], [ -115.656087304100907, 47.449180371655231 ], [ -115.732481304172069, 47.445303371651626 ], [ -115.75010530418848, 47.433966371641063 ], [ -115.750326304188675, 47.42247537163037 ], [ -115.666477304110586, 47.399167371608655 ], [ -115.638782304084799, 47.380044371590849 ], [ -115.599536304048243, 47.370003371581497 ], [ -115.555520304007246, 47.334613371548542 ], [ -115.523064303977023, 47.291982371508837 ], [ -115.501930303957351, 47.281644371499205 ], [ -115.426641303887223, 47.274374371492435 ], [ -115.408207303870057, 47.263593371482393 ], [ -115.343661303809938, 47.255022371474411 ], [ -115.325228303792784, 47.245150371465215 ], [ -115.296234303765772, 47.179550371404119 ], [ -115.193073303669706, 47.124026371352414 ], [ -115.172496303650533, 47.097570371327777 ], [ -115.148684303628357, 47.091742371322347 ], [ -115.13550730361608, 47.063550371296088 ], [ -115.081336303565635, 47.026524371261608 ], [ -115.055638303541699, 46.973358371212093 ], [ -115.037334303524659, 46.963001371202445 ], [ -115.001574303491338, 46.958809371198541 ], [ -114.964730303457031, 46.925213371167253 ], [ -114.924125303419217, 46.907165371150441 ], [ -114.940566303434537, 46.89088837113529 ], [ -114.948409303441835, 46.852446371099489 ], [ -114.902325303398925, 46.799433371050114 ], [ -114.86660330336565, 46.797045371047886 ], [ -114.840792303341601, 46.775538371027856 ], [ -114.794030303298058, 46.766531371019468 ], [ -114.777832303282963, 46.755717371009396 ], [ -114.782919303287713, 46.703040370960338 ], [ -114.748105303255286, 46.695132370952976 ], [ -114.69843130320902, 46.733760370988946 ], [ -114.673887303186163, 46.734721370989845 ], [ -114.625926303141497, 46.687107370945498 ], [ -114.645038303159296, 46.670921370930429 ], [ -114.644740303159011, 46.66082437092102 ], [ -114.610826303127439, 46.629048370891425 ], [ -114.540391303061838, 46.637891370899666 ], [ -114.484718303009998, 46.623574370886331 ], [ -114.44153630296978, 46.645715370906956 ], [ -114.384017302916206, 46.661596370921743 ], [ -114.33468530287027, 46.654227370914882 ], [ -114.324712302860974, 46.622839370885643 ], [ -114.343319302878299, 46.58788137085309 ], [ -114.350115302884632, 46.517389370787441 ], [ -114.360468302894276, 46.506125370776942 ], [ -114.410715302941071, 46.487371370759483 ], [ -114.384025302916214, 46.428179370704356 ], [ -114.397017302928305, 46.399545370677686 ], [ -114.409796302940208, 46.392911370671513 ], [ -114.431795302960694, 46.28471137057074 ], [ -114.473795302999818, 46.252961370541172 ], [ -114.472833302998922, 46.243783370532626 ], [ -114.439553302967923, 46.220254370510709 ], [ -114.440879302969165, 46.168969370462946 ], [ -114.467018302993495, 46.155262370450181 ], [ -114.509613303033177, 46.157417370452187 ], [ -114.518944303041863, 46.136063370432296 ], [ -114.506568303030335, 46.116142370413748 ], [ -114.477370303003141, 46.107357370405566 ], [ -114.456029302983268, 46.082229370382166 ], [ -114.465756302992332, 46.050815370352908 ], [ -114.494321303018936, 46.023410370327383 ], [ -114.474529303000509, 46.009765370314675 ], [ -114.484455303009753, 45.989806370296087 ], [ -114.412447302942681, 45.971973370279478 ], [ -114.40529030293601, 45.953979370262722 ], [ -114.429460302958518, 45.921477370232452 ], [ -114.413530302943684, 45.910651370222368 ], [ -114.392838302924417, 45.870886370185332 ], [ -114.407525302938097, 45.846453370162578 ], [ -114.443231302971355, 45.852621370168322 ], [ -114.473803302999826, 45.839468370156069 ], [ -114.499164303023434, 45.842683370159065 ], [ -114.51737530304041, 45.810067370128692 ], [ -114.563542303083409, 45.762398370084298 ], [ -114.541958303063296, 45.745999370069029 ], [ -114.534976303056794, 45.722996370047603 ], [ -114.497561303021939, 45.694401370020969 ], [ -114.510706303034198, 45.674057370002025 ], [ -114.501741303025852, 45.652393369981851 ], [ -114.564678303084463, 45.624271369955657 ], [ -114.540958303062368, 45.596397369929697 ], [ -114.560924303080952, 45.548740369885309 ], [ -114.527392303049737, 45.558193369894113 ], [ -114.496591303021049, 45.546649369883369 ], [ -114.462708302989483, 45.547847369884479 ], [ -114.433555302962333, 45.527633369865654 ], [ -114.41905130294883, 45.499008369838997 ], [ -114.371457302904503, 45.485740369826644 ], [ -114.350246302884756, 45.463383369805818 ], [ -114.326434302862566, 45.457424369800265 ], [ -114.262239302802783, 45.485859369826755 ], [ -114.247880302789412, 45.502945369842664 ], [ -114.241998302783941, 45.535290369872783 ], [ -114.194808302739986, 45.527917369865918 ], [ -114.172667302719375, 45.543924369880827 ], [ -114.13204830268154, 45.550382369886847 ], [ -114.118139302668581, 45.571127369906165 ], [ -114.082967302635822, 45.586378369920368 ], [ -114.056515302611189, 45.625144369956473 ], [ -114.018032302575349, 45.640773369971029 ], [ -114.0109903025688, 45.652511369981958 ], [ -114.019878302577069, 45.672378370000459 ], [ -114.009472302567374, 45.68633237001346 ], [ -113.971149302531686, 45.69737637002374 ], [ -113.96414430252517, 45.67937837000698 ], [ -113.926698302490294, 45.671211369999369 ], [ -113.923532302487345, 45.655124369984392 ], [ -113.90219930246748, 45.637253369967752 ], [ -113.90330530246851, 45.613491369945621 ], [ -113.852027302420751, 45.609562369941955 ], [ -113.822485302393233, 45.600636369933646 ], [ -113.803754302375793, 45.583729369917904 ], [ -113.833715302403689, 45.514908369853806 ], [ -113.780933302354541, 45.516865369855623 ], [ -113.772304302346498, 45.507054369846486 ], [ -113.769168302343587, 45.477707369819157 ], [ -113.785662302358944, 45.445633369789292 ], [ -113.775026302349033, 45.41017236975626 ], [ -113.741310302317629, 45.382386369730384 ], [ -113.739080302315557, 45.32153036967371 ], [ -113.688709302268649, 45.277788369632972 ], [ -113.69012030226996, 45.262281369618528 ], [ -113.645592302228494, 45.206790369566846 ], [ -113.600928302186901, 45.180992369542821 ], [ -113.594099302180538, 45.149742369513717 ], [ -113.571584302159565, 45.134545369499563 ], [ -113.574376302162165, 45.117711369483885 ], [ -113.552272302141574, 45.107549369474427 ], [ -113.510225302102427, 45.107835369474685 ], [ -113.520609302112092, 45.082063369450687 ], [ -113.49015930208374, 45.071219369440584 ], [ -113.48630530208014, 45.058321369428576 ], [ -113.455435302051399, 45.043349369414628 ], [ -113.458853302054578, 45.027449369399818 ], [ -113.441029302037975, 44.998194369372577 ], [ -113.448765302045189, 44.949522369327248 ], [ -113.463413302058825, 44.940775369319098 ], [ -113.487348302081116, 44.939574369317981 ], [ -113.496191302089358, 44.930670369309695 ], [ -113.445573302042206, 44.851239369235714 ], [ -113.421379302019673, 44.833699369219374 ], [ -113.350024301953226, 44.807568369195039 ], [ -113.34063130194447, 44.779000369168436 ], [ -113.318680301924033, 44.780228369169578 ], [ -113.257154301866734, 44.810486369197761 ], [ -113.240338301851068, 44.811841369199023 ], [ -113.138274301756013, 44.761439369152086 ], [ -113.127431301745915, 44.73737936912967 ], [ -113.101703301721955, 44.715173369108996 ], [ -113.098956301719397, 44.695916369091059 ], [ -113.073144301695365, 44.675525369072069 ], [ -113.054289301677798, 44.624289369024353 ], [ -113.083037301704564, 44.582681368985604 ], [ -113.039660301664171, 44.556294368961026 ], [ -113.037821301662461, 44.532959368939295 ], [ -113.007713301634425, 44.51061236891848 ], [ -113.020309301646151, 44.48177636889163 ], [ -113.006658301633436, 44.452615368864471 ], [ -113.01201430163843, 44.43771536885059 ], [ -112.985249301613493, 44.435540368848564 ], [ -112.938281301569759, 44.407192368822166 ], [ -112.887307301522284, 44.392852368808803 ], [ -112.870781301506895, 44.369978368787507 ], [ -112.844275301482213, 44.353639368772292 ], [ -112.81739630145718, 44.364202368782131 ], [ -112.818710301458395, 44.394819368810644 ], [ -112.826691301465829, 44.421084368835103 ], [ -112.796228301437466, 44.458011368869492 ], [ -112.779863301422225, 44.47392236888431 ], [ -112.733712301379242, 44.484320368893989 ], [ -112.714326301361183, 44.496935368905739 ], [ -112.653189301304238, 44.480802368890721 ], [ -112.539324301198192, 44.47749736888764 ], [ -112.501839301163287, 44.462997368874134 ], [ -112.458519301122948, 44.46883436887957 ], [ -112.420753301087771, 44.449284368861363 ], [ -112.367583301038252, 44.449270368861349 ], [ -112.340577301013099, 44.497180368905973 ], [ -112.342507301014905, 44.525100368931973 ], [ -112.282341300958862, 44.541702368947441 ], [ -112.256675300934958, 44.559972368964452 ], [ -112.230398300910494, 44.559491368964004 ], [ -112.217763300898724, 44.538495368944453 ], [ -112.199658300881865, 44.531449368937885 ], [ -112.124190300811577, 44.528253368934912 ], [ -112.099897300788953, 44.518231368925576 ], [ -112.059367300751205, 44.528611368935245 ], [ -112.027077300721132, 44.52284336892987 ], [ -112.023613300717912, 44.535043368941231 ], [ -111.977818300675253, 44.529676368936236 ], [ -111.940386300640398, 44.549726368954907 ], [ -111.872502300577167, 44.556265368961 ], [ -111.807837300516951, 44.503982368912304 ], [ -111.792608300502764, 44.518462368925796 ], [ -111.766918300478835, 44.51882536892613 ], [ -111.716997300432354, 44.533760368940037 ], [ -111.684862300402415, 44.55075236895587 ], [ -111.60524830032827, 44.542989368948639 ], [ -111.56723130029286, 44.552866368957837 ], [ -111.490241300221172, 44.528697368935326 ], [ -111.482573300214028, 44.536143368942263 ], [ -111.459325300192376, 44.537921368943913 ], [ -111.462827300195627, 44.549942368955115 ], [ -111.492904300223643, 44.551189368956273 ], [ -111.514526300243787, 44.593197368995391 ], [ -111.501747300231884, 44.615971369016606 ], [ -111.507690300237414, 44.63768836903683 ], [ -111.470168300202474, 44.640710369039645 ], [ -111.458265300191385, 44.652555369050674 ], [ -111.460692300193642, 44.670023369066939 ], [ -111.48080430021237, 44.691416369086866 ], [ -111.475425300207363, 44.702162369096875 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Maine", "DRAWSEQ": 4, "STATE_FIPS": "23", "SUB_REGION": "New England", "STATE_ABBR": "ME" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -69.777276261372933, 44.074148368511992 ], [ -69.766755261363144, 44.047732368487388 ], [ -69.800013261394113, 44.026866368467957 ], [ -69.777673261373309, 43.79127036824854 ], [ -69.750359261347867, 43.761704368221004 ], [ -69.724671261323948, 43.784477368242214 ], [ -69.748528261346166, 43.893375368343634 ], [ -69.720635261320183, 43.937979368385172 ], [ -69.612932261219882, 44.033612368474238 ], [ -69.655245261259282, 43.980250368424542 ], [ -69.664453261267866, 43.852224368305308 ], [ -69.589326261197897, 43.84486236829845 ], [ -69.483233261099087, 43.887160368337845 ], [ -69.394488261016434, 44.025128368466341 ], [ -69.346454260971697, 44.01596936845781 ], [ -69.293650260922519, 43.942190368389092 ], [ -69.219140260853138, 43.946787368393373 ], [ -69.074458260718387, 44.069066368507258 ], [ -69.021482260669046, 44.244093368670264 ], [ -68.985028260635104, 44.271112368695427 ], [ -68.959179260611023, 44.43033136884371 ], [ -68.811678260473656, 44.494593368903566 ], [ -68.807903260470141, 44.569654368973467 ], [ -68.860609260519226, 44.610970369011952 ], [ -68.823813260484954, 44.664089369061415 ], [ -68.823552260484718, 44.608906369010029 ], [ -68.74527926041182, 44.552320368957325 ], [ -68.741348260408159, 44.507285368915383 ], [ -68.813768260475598, 44.413990368828493 ], [ -68.812851260474744, 44.327432368747878 ], [ -68.740310260407185, 44.346330368765479 ], [ -68.559427260238721, 44.259887368684971 ], [ -68.53007526021139, 44.289836368712869 ], [ -68.552186260231977, 44.39904936881458 ], [ -68.428571260116854, 44.465306368876284 ], [ -68.363765260056496, 44.431386368844699 ], [ -68.245614259946464, 44.490648368899883 ], [ -68.136264259844623, 44.475237368885537 ], [ -68.074379259786994, 44.38137436879812 ], [ -68.016393259732979, 44.384956368801454 ], [ -67.986523259705166, 44.484812368894453 ], [ -67.963436259683661, 44.505327368913555 ], [ -67.968342259688228, 44.471228368881803 ], [ -67.900042259624627, 44.452399368864263 ], [ -67.858560259586, 44.536077368942202 ], [ -67.8112192595419, 44.554009368958901 ], [ -67.618838259362732, 44.540239368946075 ], [ -67.570993259318172, 44.598333369000173 ], [ -67.388510259148219, 44.69140036908685 ], [ -67.308468259073678, 44.653521369051575 ], [ -67.200364258972996, 44.653781369051813 ], [ -67.007719258793585, 44.780625369169954 ], [ -66.969271258757772, 44.828655369214687 ], [ -67.146706258923032, 44.904581369285395 ], [ -67.065358258847269, 44.959295369336346 ], [ -67.150661258926704, 45.121990369487875 ], [ -67.16590525894091, 45.156264369519789 ], [ -67.274095259041673, 45.182783369544488 ], [ -67.345605259108268, 45.122252369488116 ], [ -67.439435259195648, 45.189584369550822 ], [ -67.47795025923152, 45.280280369635292 ], [ -67.418555259176202, 45.375852369724299 ], [ -67.504106259255877, 45.485816369826708 ], [ -67.4160842591739, 45.503554369843229 ], [ -67.439301259195531, 45.592561369926123 ], [ -67.615140259359293, 45.605199369937893 ], [ -67.718034259455123, 45.681299370008773 ], [ -67.752955259487635, 45.659289369988272 ], [ -67.803433259534657, 45.678113370005804 ], [ -67.803053259534295, 45.794508370114201 ], [ -67.759367259493615, 45.827798370145203 ], [ -67.794571259526393, 45.878475370192405 ], [ -67.755615259490114, 45.916580370227891 ], [ -67.780289259513097, 45.947062370256276 ], [ -67.791011259523088, 47.061003371293722 ], [ -68.230807259932675, 47.352148371564866 ], [ -68.334814260029532, 47.357374371569733 ], [ -68.391257260082099, 47.285097371502417 ], [ -68.514673260197043, 47.296964371513475 ], [ -68.894872260551139, 47.182256371406645 ], [ -69.03671426068324, 47.257361371476591 ], [ -69.046976260692787, 47.422030371629951 ], [ -69.230296260863526, 47.453334371659103 ], [ -69.984977261566371, 46.69136537094947 ], [ -70.014144261593543, 46.57059837083699 ], [ -70.046607261623777, 46.426115370702433 ], [ -70.1910582617583, 46.334839370617424 ], [ -70.283496261844391, 46.190249370482761 ], [ -70.229325261793946, 46.137434370433581 ], [ -70.304849261864277, 46.066658370367662 ], [ -70.280022261841154, 46.053154370355088 ], [ -70.310295261869342, 45.968782370276507 ], [ -70.247464261810833, 45.944619370254003 ], [ -70.25396426181689, 45.899004370211522 ], [ -70.416214261967994, 45.790309370110293 ], [ -70.396383261949524, 45.722046370046712 ], [ -70.552270262094709, 45.660664369989547 ], [ -70.719910262250835, 45.512954369851983 ], [ -70.634929262171681, 45.391967369739305 ], [ -70.796967262322596, 45.42517236977023 ], [ -70.829132262352559, 45.390726369738147 ], [ -70.812666262337217, 45.35467836970458 ], [ -70.842875262365354, 45.278137369633299 ], [ -70.876444262396618, 45.225445369584222 ], [ -70.959382262473852, 45.338865369689856 ], [ -71.087509262593187, 45.301469369655024 ], [ -71.028726262538441, 44.668538369065558 ], [ -71.008596262519688, 44.28214636870571 ], [ -70.984442262497197, 43.791163368248441 ], [ -70.973874262487357, 43.571830368044175 ], [ -70.956524262471191, 43.564143368037008 ], [ -70.949619262464765, 43.548953368022865 ], [ -70.964268262478413, 43.531989368007068 ], [ -70.959278262473759, 43.516388367992533 ], [ -70.970791262484482, 43.470211367949531 ], [ -70.961483262475809, 43.438126367919651 ], [ -70.979099262492227, 43.396184367880593 ], [ -70.969699262483473, 43.366380367852827 ], [ -70.905801262423964, 43.302069367792939 ], [ -70.901086262419568, 43.281020367773337 ], [ -70.813207262337727, 43.235222367730685 ], [ -70.830548262353872, 43.159174367659858 ], [ -70.818668262342811, 43.121871367625118 ], [ -70.665672262200317, 43.091050367596409 ], [ -70.53894126208229, 43.335718367824271 ], [ -70.456977262005964, 43.349470367837085 ], [ -70.365925261921163, 43.430303367912366 ], [ -70.341610261898509, 43.534908368009781 ], [ -70.222239261787337, 43.57724036804921 ], [ -70.235798261799971, 43.685796368150307 ], [ -70.15662826172624, 43.789810368247181 ], [ -70.026403261604955, 43.845601368299143 ], [ -69.9873702615686, 43.845738368299266 ], [ -69.999500261579897, 43.786207368243822 ], [ -69.972903261555132, 43.768847368227654 ], [ -69.903132261490143, 43.790732368248044 ], [ -69.886791261474926, 43.876713368328112 ], [ -69.84615526143709, 43.842344368296111 ], [ -69.85178526144233, 43.744328368204819 ], [ -69.830392261422404, 43.727986368189605 ], [ -69.791528261386205, 43.756085368215771 ], [ -69.859928261449909, 44.000001368442938 ], [ -69.777276261372933, 44.074148368511992 ] ] ], [ [ [ -68.387921260078997, 44.377253368794285 ], [ -68.402890260092946, 44.270801368695139 ], [ -68.320711260016409, 44.225079368652558 ], [ -68.304705260001498, 44.290031368713045 ], [ -68.164769259871179, 44.33449536875446 ], [ -68.238709259940038, 44.437563368850448 ], [ -68.355449260048758, 44.428857368842344 ], [ -68.350254260043911, 44.398951368814494 ], [ -68.387921260078997, 44.377253368794285 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "North Dakota", "DRAWSEQ": 5, "STATE_FIPS": "38", "SUB_REGION": "West North Central", "STATE_ABBR": "ND" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -98.730437288337669, 45.938271370248088 ], [ -98.014709287671096, 45.931498370241783 ], [ -97.978722287637581, 45.93082237024116 ], [ -97.233310286943365, 45.936502370246444 ], [ -96.566921286322739, 45.934110370244213 ], [ -96.56180228631797, 45.947683370256854 ], [ -96.57621528633139, 46.021279370325402 ], [ -96.551931286308772, 46.095529370394551 ], [ -96.571166286326687, 46.177174370470588 ], [ -96.587890286342272, 46.191918370484316 ], [ -96.586456286340933, 46.215413370506198 ], [ -96.598183286351855, 46.238682370527869 ], [ -96.602074286355474, 46.336324370618811 ], [ -96.614861286367386, 46.350812370632298 ], [ -96.652101286402072, 46.359433370640332 ], [ -96.688228286435717, 46.412218370689487 ], [ -96.709682286455688, 46.427168370703413 ], [ -96.714894286460549, 46.46871837074211 ], [ -96.74031628648423, 46.489432370761399 ], [ -96.751227286494384, 46.588619370853777 ], [ -96.77104128651284, 46.599983370864358 ], [ -96.784317286525209, 46.624112370886834 ], [ -96.790246286530731, 46.629773370892103 ], [ -96.793695286533932, 46.678804370937769 ], [ -96.78155628652263, 46.70704437096407 ], [ -96.780382286521544, 46.76231237101554 ], [ -96.797197286537198, 46.812033371061844 ], [ -96.768250286510238, 46.844861371092421 ], [ -96.778061286519375, 46.867349371113363 ], [ -96.756911286499687, 46.92278037116499 ], [ -96.763068286505415, 46.936261371177544 ], [ -96.787925286528562, 46.932184371173747 ], [ -96.789710286530223, 46.948202371188664 ], [ -96.801887286541572, 46.955843371195783 ], [ -96.79342528653369, 46.969641371208631 ], [ -96.816772286555434, 46.969779371208759 ], [ -96.82453128656266, 47.003436371240106 ], [ -96.835296286572685, 47.010231371246434 ], [ -96.822608286560865, 47.033932371268506 ], [ -96.826964286564916, 47.078832371310327 ], [ -96.819151286557641, 47.092604371323148 ], [ -96.839164286576292, 47.15188637137836 ], [ -96.826491286564476, 47.170063371395287 ], [ -96.83706528657433, 47.240458371460846 ], [ -96.849623286586024, 47.256843371476108 ], [ -96.837714286574936, 47.2938843715106 ], [ -96.846747286583351, 47.314602371529901 ], [ -96.838461286575637, 47.342243371555639 ], [ -96.85063128658696, 47.360954371573072 ], [ -96.839827286576906, 47.384117371594641 ], [ -96.850005286586381, 47.408936371617756 ], [ -96.867248286602447, 47.413087371621621 ], [ -96.855827286591804, 47.436753371643661 ], [ -96.86668428660191, 47.461537371666743 ], [ -96.851615286587887, 47.500619371703138 ], [ -96.860687286596331, 47.521356371722455 ], [ -96.849188286585616, 47.544568371744077 ], [ -96.858664286594447, 47.562978371761218 ], [ -96.852217286588441, 47.601151371796774 ], [ -96.873335286608111, 47.615255371809909 ], [ -96.889425286623094, 47.673925371864541 ], [ -96.923659286654981, 47.714094371901957 ], [ -96.932012286662754, 47.763506371947976 ], [ -96.9578302866868, 47.794440371976783 ], [ -96.98389328671108, 47.809661371990956 ], [ -96.977231286704864, 47.828029372008068 ], [ -97.000340286726399, 47.870197372047343 ], [ -97.020566286745222, 47.87556937205234 ], [ -97.015331286740349, 47.917890372091755 ], [ -97.048053286770823, 47.954924372126243 ], [ -97.067071286788547, 48.04816437221308 ], [ -97.092721286812434, 48.070344372233741 ], [ -97.099030286818305, 48.100972372262262 ], [ -97.121873286839573, 48.116369372276608 ], [ -97.120918286838688, 48.142774372301197 ], [ -97.136513286853216, 48.148398372306431 ], [ -97.116065286834171, 48.159223372316518 ], [ -97.137443286854079, 48.167769372324472 ], [ -97.136291286853009, 48.17522737233142 ], [ -97.137275286853921, 48.195063372349892 ], [ -97.130828286847915, 48.203742372357979 ], [ -97.110899286829351, 48.20760537236157 ], [ -97.139754286856231, 48.221755372374751 ], [ -97.109235286827811, 48.22804937238061 ], [ -97.12755428684487, 48.233523372385712 ], [ -97.123784286841357, 48.259173372409606 ], [ -97.13665528685334, 48.264483372414546 ], [ -97.111714286830122, 48.277876372427016 ], [ -97.112683286831015, 48.286147372434726 ], [ -97.130513286847631, 48.293040372441141 ], [ -97.113721286831989, 48.294882372442856 ], [ -97.114751286832941, 48.303618372450998 ], [ -97.132634286849594, 48.310969372457841 ], [ -97.112591286830934, 48.319926372466185 ], [ -97.137136286853789, 48.325991372471833 ], [ -97.131123286848194, 48.361491372504894 ], [ -97.15039628686614, 48.363215372506502 ], [ -97.133786286850679, 48.372454372515101 ], [ -97.135205286851999, 48.384410372526233 ], [ -97.158819286873992, 48.388206372529773 ], [ -97.129124286846334, 48.407885372548101 ], [ -97.149823286865612, 48.40999137255006 ], [ -97.151647286867302, 48.419612372559023 ], [ -97.122601286840251, 48.416110372555764 ], [ -97.119633286837498, 48.43710237257531 ], [ -97.143613286859832, 48.43810937257625 ], [ -97.134594286851424, 48.517314372650013 ], [ -97.148327286864216, 48.517951372650607 ], [ -97.139385286855884, 48.534648372666155 ], [ -97.155537286870924, 48.538398372669647 ], [ -97.160435286875497, 48.545078372675874 ], [ -97.146618286862619, 48.549537372680021 ], [ -97.16794328688249, 48.562263372691874 ], [ -97.152127286867753, 48.572856372701736 ], [ -97.158192286873401, 48.583640372711784 ], [ -97.140812286857212, 48.586905372714824 ], [ -97.144718286860851, 48.614024372740083 ], [ -97.122958286840586, 48.620768372746362 ], [ -97.127444286844764, 48.629794372754773 ], [ -97.107630286826307, 48.629946372754915 ], [ -97.097169286816566, 48.674529372796428 ], [ -97.1167392868348, 48.695243372815725 ], [ -97.110101286828609, 48.708583372828144 ], [ -97.134806286851628, 48.726238372844591 ], [ -97.132502286849473, 48.747218372864126 ], [ -97.147898286863821, 48.755653372871983 ], [ -97.139246286855752, 48.763542372879328 ], [ -97.147516286863464, 48.781170372895744 ], [ -97.173944286888073, 48.801514372914696 ], [ -97.164712286879478, 48.810368372922937 ], [ -97.1804222868941, 48.81553737292775 ], [ -97.171204286885526, 48.835980372946793 ], [ -97.175727286889739, 48.873757372981977 ], [ -97.216369286927588, 48.931830373036064 ], [ -97.229436286939759, 48.999987373099536 ], [ -97.937867287599531, 48.999992373099545 ], [ -99.000403288589098, 49.000006373099552 ], [ -99.533566289085641, 49.000008373099561 ], [ -100.187908289695045, 49.000002373099548 ], [ -101.500437290917432, 49.000020373099574 ], [ -102.022264291403417, 49.000015373099565 ], [ -102.937959292256224, 49.000026373099573 ], [ -104.062991293303995, 49.000026373099573 ], [ -104.052317293294053, 48.645824372769695 ], [ -104.052111293293862, 48.391019372532391 ], [ -104.048425293290435, 48.000081372168303 ], [ -104.047307293289393, 47.400017371609451 ], [ -104.045926293288105, 47.333832371547814 ], [ -104.047437293289519, 46.642947370904373 ], [ -104.046705293288838, 46.542539370810857 ], [ -104.04783629328989, 46.280881370567172 ], [ -104.048906293290884, 45.942993370252495 ], [ -102.994823292309192, 45.941115370250742 ], [ -102.946397292264095, 45.941665370251258 ], [ -102.002775291385277, 45.942505370252036 ], [ -100.514406289999116, 45.940388370250062 ], [ -99.875783289404353, 45.943547370253008 ], [ -99.717345289256798, 45.942761370252271 ], [ -99.006833288595089, 45.939555370249288 ], [ -98.730437288337669, 45.938271370248088 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "South Dakota", "DRAWSEQ": 6, "STATE_FIPS": "46", "SUB_REGION": "West North Central", "STATE_ABBR": "SD" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -102.78838429211693, 42.99530336750724 ], [ -102.086701291463442, 42.989887367502192 ], [ -101.231737290667184, 42.986843367499361 ], [ -100.198142289704577, 42.99109536750332 ], [ -99.532790289084915, 42.992335367504474 ], [ -99.253971288825255, 42.992389367504529 ], [ -98.497651288120878, 42.991778367503954 ], [ -98.457444288083423, 42.937160367453089 ], [ -98.39120428802174, 42.920135367437233 ], [ -98.31033928794642, 42.881794367401525 ], [ -98.167826287813696, 42.839571367362204 ], [ -98.144869287792318, 42.835794367358687 ], [ -98.123117287772061, 42.820223367344184 ], [ -98.121820287770845, 42.808360367333137 ], [ -98.033140287688255, 42.769192367296654 ], [ -97.995144287652877, 42.766812367294442 ], [ -97.963558287623457, 42.773690367300844 ], [ -97.929477287591723, 42.792324367318201 ], [ -97.88994128755489, 42.831271367354475 ], [ -97.888659287553708, 42.855807367377324 ], [ -97.818643287488499, 42.866587367387368 ], [ -97.797028287468365, 42.849597367371544 ], [ -97.772186287445223, 42.846164367368345 ], [ -97.725250287401522, 42.858008367379369 ], [ -97.685752287364735, 42.836837367359657 ], [ -97.634970287317444, 42.861285367382422 ], [ -97.57065428725754, 42.847990367370045 ], [ -97.506132287197445, 42.860136367381358 ], [ -97.483159287176051, 42.857157367378576 ], [ -97.457263287151932, 42.850443367372328 ], [ -97.389306287088644, 42.867433367388152 ], [ -97.311414287016106, 42.861771367382879 ], [ -97.271457286978887, 42.850014367371926 ], [ -97.243189286952557, 42.851826367373619 ], [ -97.224443286935099, 42.841202367363721 ], [ -97.211831286923356, 42.812573367337059 ], [ -97.161422286876416, 42.798619367324065 ], [ -97.130469286847585, 42.773923367301066 ], [ -97.01513928674018, 42.759542367287665 ], [ -96.979593286707072, 42.758313367286526 ], [ -96.970003286698145, 42.752065367280707 ], [ -96.97786928670547, 42.727308367257649 ], [ -96.970773286698858, 42.721147367251916 ], [ -96.908234286640607, 42.73169936726174 ], [ -96.810140286549256, 42.704084367236021 ], [ -96.810437286549529, 42.681341367214841 ], [ -96.799344286539196, 42.67001936720429 ], [ -96.722658286467777, 42.668592367202962 ], [ -96.6990602864458, 42.657715367192836 ], [ -96.694596286441652, 42.64116336717742 ], [ -96.715273286460899, 42.621907367159487 ], [ -96.714059286459772, 42.612302367150541 ], [ -96.636672286387693, 42.550731367093199 ], [ -96.629294286380826, 42.522693367067092 ], [ -96.605467286358632, 42.507236367052691 ], [ -96.58475328633935, 42.518287367062982 ], [ -96.547215286304393, 42.520499367065042 ], [ -96.494701286255477, 42.488459367035205 ], [ -96.439394286203964, 42.489240367035933 ], [ -96.480243286242015, 42.51713036706191 ], [ -96.489337286250489, 42.564028367105578 ], [ -96.500942286261292, 42.573885367114762 ], [ -96.488498286249708, 42.580480367120906 ], [ -96.512844286272369, 42.629755367166794 ], [ -96.541165286298749, 42.662405367197209 ], [ -96.563039286319125, 42.668513367202891 ], [ -96.626540286378258, 42.708354367239998 ], [ -96.640709286391456, 42.748603367277482 ], [ -96.632980286384267, 42.776835367303775 ], [ -96.600875286354366, 42.799558367324934 ], [ -96.587645286342038, 42.835381367358302 ], [ -96.573126286328517, 42.834347367357338 ], [ -96.55621128631276, 42.846660367368806 ], [ -96.537511286295356, 42.896906367415596 ], [ -96.544263286301643, 42.913866367431396 ], [ -96.514935286274323, 42.952382367467266 ], [ -96.517148286276381, 42.986458367498997 ], [ -96.499020286259494, 43.012050367522832 ], [ -96.520010286279046, 43.051508367559585 ], [ -96.47957328624139, 43.061884367569249 ], [ -96.46209428622511, 43.075582367582001 ], [ -96.460805286223916, 43.087872367593448 ], [ -96.451505286215252, 43.12630836762925 ], [ -96.473114286235372, 43.209082367706337 ], [ -96.487245286248537, 43.217909367714554 ], [ -96.558605286315, 43.225489367721622 ], [ -96.566991286322803, 43.23963336773479 ], [ -96.559567286315897, 43.253263367747479 ], [ -96.570722286326273, 43.263612367757119 ], [ -96.579131286334103, 43.29007436778177 ], [ -96.540563286298195, 43.307659367798145 ], [ -96.522894286281741, 43.356966367844066 ], [ -96.52505328628375, 43.384225367869448 ], [ -96.557708286314153, 43.400727367884819 ], [ -96.589113286343405, 43.435539367917244 ], [ -96.583796286338455, 43.481920367960441 ], [ -96.598315286351976, 43.499849367977134 ], [ -96.46045428622358, 43.49971836797701 ], [ -96.45660228621999, 43.848741368302065 ], [ -96.45739728622074, 44.199061368628328 ], [ -96.455106286218609, 44.538343368944311 ], [ -96.456718286220109, 44.628808369028562 ], [ -96.455217286218712, 44.801347369189244 ], [ -96.456080286219503, 44.971994369348181 ], [ -96.454496286218031, 45.275195369630552 ], [ -96.457602286220933, 45.298850369652584 ], [ -96.477592286239542, 45.328509369680205 ], [ -96.532549286290731, 45.37513236972363 ], [ -96.605084286358277, 45.396524369743553 ], [ -96.693169286440323, 45.410638369756697 ], [ -96.738032286482095, 45.45819536980099 ], [ -96.769246286511162, 45.5174783698562 ], [ -96.843087286579944, 45.584090369918236 ], [ -96.854990286591018, 45.609122369941545 ], [ -96.832796286570357, 45.650687369980261 ], [ -96.657391286406991, 45.738970370062475 ], [ -96.60461028635784, 45.808264370127013 ], [ -96.587955286342321, 45.817854370135947 ], [ -96.566921286322739, 45.934110370244213 ], [ -97.233310286943365, 45.936502370246444 ], [ -97.978722287637581, 45.93082237024116 ], [ -98.014709287671096, 45.931498370241783 ], [ -98.730437288337669, 45.938271370248088 ], [ -99.006833288595089, 45.939555370249288 ], [ -99.717345289256798, 45.942761370252271 ], [ -99.875783289404353, 45.943547370253008 ], [ -100.514406289999116, 45.940388370250062 ], [ -102.002775291385277, 45.942505370252036 ], [ -102.946397292264095, 45.941665370251258 ], [ -102.994823292309192, 45.941115370250742 ], [ -104.048906293290884, 45.942993370252495 ], [ -104.049517293291444, 45.883052370196665 ], [ -104.043851293286167, 45.212875369572515 ], [ -104.043072293285448, 44.997805369372216 ], [ -104.05984229330106, 44.99733636937178 ], [ -104.059465293300718, 44.574352368977841 ], [ -104.06103629330218, 44.181825368612273 ], [ -104.059731293300956, 44.145825368578748 ], [ -104.059479293300726, 43.852906368305945 ], [ -104.057914293299277, 43.503712367980732 ], [ -104.05915729330043, 43.47913436795784 ], [ -104.056199293297666, 43.003062367514467 ], [ -103.501464292781037, 42.998618367510332 ], [ -103.005875292319487, 42.999354367511017 ], [ -102.78838429211693, 42.99530336750724 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Wyoming", "DRAWSEQ": 7, "STATE_FIPS": "56", "SUB_REGION": "Mountain", "STATE_ABBR": "WY" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -104.053615293295266, 41.69821836629923 ], [ -104.053513293295168, 41.999815366580123 ], [ -104.056219293297687, 42.614669367152743 ], [ -104.056199293297666, 43.003062367514467 ], [ -104.05915729330043, 43.47913436795784 ], [ -104.057914293299277, 43.503712367980732 ], [ -104.059479293300726, 43.852906368305945 ], [ -104.059731293300956, 44.145825368578748 ], [ -104.06103629330218, 44.181825368612273 ], [ -104.059465293300718, 44.574352368977841 ], [ -104.05984229330106, 44.99733636937178 ], [ -105.041796294215587, 45.001076369375262 ], [ -105.085003294255827, 44.999817369374085 ], [ -106.021150295127683, 44.997213369371664 ], [ -106.259231295349409, 44.99616236937068 ], [ -107.894374296872257, 44.999773369374047 ], [ -108.259238297212065, 45.00011536937437 ], [ -108.625256297552937, 44.997593369372012 ], [ -109.799385298646428, 44.999522369373814 ], [ -109.995529298829112, 45.00279336937686 ], [ -110.392760299199054, 44.998625369372974 ], [ -110.429649299233418, 44.992285369367075 ], [ -111.053428299814357, 44.995695369370253 ], [ -111.051616299812665, 44.664490369061795 ], [ -111.051560299812607, 44.473323368883754 ], [ -111.05040529981153, 43.982553368426693 ], [ -111.046771299808157, 43.515528367991735 ], [ -111.047498299808822, 43.284734367776792 ], [ -111.049215299810427, 43.019883367530127 ], [ -111.046780299808162, 42.503252367048987 ], [ -111.048697299809945, 41.996203366576751 ], [ -111.051068299812158, 41.57859236618782 ], [ -111.05165129981269, 41.25842536588965 ], [ -111.051022299812104, 40.99658336564579 ], [ -110.063185298892108, 40.997892365647004 ], [ -110.00216529883528, 40.997599365646735 ], [ -109.048314297946945, 40.998433365647514 ], [ -107.918671296894885, 41.003375365652111 ], [ -107.30405129632247, 41.000133365649091 ], [ -106.865438295913975, 40.998457365647532 ], [ -106.329125295414499, 41.001289365650166 ], [ -106.203471295297476, 41.000085365649049 ], [ -105.278797294436302, 40.996349365645571 ], [ -104.934493294115654, 40.994289365643652 ], [ -104.051705293293494, 41.003211365651964 ], [ -104.054012293295642, 41.388085366010401 ], [ -104.055500293297015, 41.564222366174441 ], [ -104.053615293295266, 41.69821836629923 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Wisconsin", "DRAWSEQ": 8, "STATE_FIPS": "55", "SUB_REGION": "East North Central", "STATE_ABBR": "WI" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -87.74855527810999, 44.961616369338515 ], [ -87.620335277990577, 44.991997369366807 ], [ -87.61852127798889, 45.056807369427162 ], [ -87.581276277954203, 45.094640369462397 ], [ -87.664886278032071, 45.109054369475828 ], [ -87.672814278039453, 45.140672369505268 ], [ -87.729669278092402, 45.176604369538737 ], [ -87.736200278098494, 45.199072369559659 ], [ -87.721628278084921, 45.211672369571396 ], [ -87.719668278083091, 45.23677136959477 ], [ -87.705142278069559, 45.247086369604375 ], [ -87.704471278068937, 45.27220536962777 ], [ -87.645362278013891, 45.348169369698518 ], [ -87.64368427801233, 45.361856369711262 ], [ -87.689598278055087, 45.391269369738652 ], [ -87.760038278120689, 45.352897369702916 ], [ -87.828008278183987, 45.358321369707973 ], [ -87.84128227819636, 45.346149369696633 ], [ -87.862096278215745, 45.370165369719004 ], [ -87.868535278221742, 45.372072369720783 ], [ -87.873974278226797, 45.36208536971148 ], [ -87.883610278235778, 45.365854369714988 ], [ -87.84953127820404, 45.406117369752486 ], [ -87.860267278214039, 45.445098369788788 ], [ -87.81361427817059, 45.466460369808686 ], [ -87.789385278148018, 45.499067369839054 ], [ -87.805141278162694, 45.544525369881384 ], [ -87.828602278184547, 45.5685913699038 ], [ -87.786312278145161, 45.568519369903733 ], [ -87.775075278134693, 45.600387369933415 ], [ -87.776045278135598, 45.613200369945346 ], [ -87.81993827817648, 45.654450369983763 ], [ -87.817054278173785, 45.665390369993951 ], [ -87.780945278140166, 45.67591537000375 ], [ -87.777473278136924, 45.684101370011376 ], [ -87.801156278158984, 45.701324370027422 ], [ -87.801553278159346, 45.711391370036793 ], [ -87.842362278197356, 45.722418370047066 ], [ -87.873629278226474, 45.750699370073406 ], [ -87.969179278315465, 45.766448370088071 ], [ -87.990070278334926, 45.795046370114704 ], [ -88.051639278392258, 45.78611237010638 ], [ -88.088734278426813, 45.791532370111426 ], [ -88.12994927846519, 45.819402370137382 ], [ -88.121786278457591, 45.834878370151799 ], [ -88.065421278405097, 45.873642370187902 ], [ -88.095764278433364, 45.891803370204812 ], [ -88.093850278431574, 45.920615370231644 ], [ -88.111390278447914, 45.926287370236935 ], [ -88.150438278484273, 45.936293370246247 ], [ -88.180194278511991, 45.953516370262292 ], [ -88.214992278544401, 45.947901370257057 ], [ -88.257168278583677, 45.967055370274899 ], [ -88.299152278622785, 45.961944370270139 ], [ -88.321323278643433, 45.966712370274578 ], [ -88.369938278688707, 45.994587370300536 ], [ -88.403522278719976, 45.983422370290143 ], [ -88.454319278767287, 46.000760370306288 ], [ -88.483814278794753, 45.999151370304787 ], [ -88.494083278804325, 46.012960370317657 ], [ -88.515613278824375, 46.018609370322913 ], [ -88.548358278854863, 46.019300370323556 ], [ -88.57535727888002, 46.008959370313924 ], [ -88.597536278900677, 46.015516370320029 ], [ -88.615502278917404, 45.994120370300109 ], [ -88.643669278943634, 45.993388370299428 ], [ -88.67738427897504, 46.020144370324346 ], [ -88.703605278999461, 46.018923370323208 ], [ -88.726409279020686, 46.029581370333133 ], [ -88.773017279064106, 46.021147370325281 ], [ -88.777480279068257, 46.032614370335956 ], [ -88.793815279083475, 46.036360370339445 ], [ -88.804397279093322, 46.026804370330545 ], [ -88.925195279205823, 46.073601370374128 ], [ -88.985301279261805, 46.10039137039908 ], [ -89.099806279368451, 46.145642370441223 ], [ -89.925136280137096, 46.304025370588732 ], [ -90.111659280310803, 46.34042937062263 ], [ -90.115177280314086, 46.36515537064566 ], [ -90.141797280338878, 46.393899370672429 ], [ -90.161391280357122, 46.442380370717579 ], [ -90.211526280403817, 46.50629537077711 ], [ -90.258401280447472, 46.508789370779425 ], [ -90.26978528045808, 46.522480370792181 ], [ -90.300181280486385, 46.525051370794571 ], [ -90.302393280488445, 46.544296370812496 ], [ -90.313708280498986, 46.551563370819267 ], [ -90.385525280565858, 46.539657370808172 ], [ -90.408200280586982, 46.568610370835145 ], [ -90.540877280710546, 46.587526370852757 ], [ -90.730714280887341, 46.645696370906933 ], [ -90.926244281069444, 46.585503370850873 ], [ -90.777445280930863, 46.883122371128053 ], [ -90.774486280928116, 46.920235371162619 ], [ -90.861730281009372, 46.952479371192652 ], [ -91.555773281655746, 46.756860371010461 ], [ -91.921461281996315, 46.680134370939001 ], [ -92.004157282073336, 46.683800370942421 ], [ -92.095970282158845, 46.742627370997212 ], [ -92.209154282264251, 46.646872370908028 ], [ -92.287271282337002, 46.658786370919124 ], [ -92.288685282338321, 46.415984370692996 ], [ -92.288944282338562, 46.156600370451429 ], [ -92.289370282338965, 46.073231370373783 ], [ -92.327372282374355, 46.056878370358554 ], [ -92.346225282391913, 46.022596370326625 ], [ -92.364963282409363, 46.01624837032071 ], [ -92.424999282465279, 46.02550437032933 ], [ -92.462345282500053, 45.981197370288072 ], [ -92.523977282557453, 45.982583370289362 ], [ -92.552672282584183, 45.951269370260199 ], [ -92.666208282689922, 45.915703370227078 ], [ -92.706240282727194, 45.890958370204032 ], [ -92.73409728275314, 45.84498037016121 ], [ -92.748762282766805, 45.837302370154056 ], [ -92.779107282795067, 45.763340370085174 ], [ -92.833636282845845, 45.730890370054951 ], [ -92.860019282870411, 45.710562370036023 ], [ -92.885397282894047, 45.644955369974923 ], [ -92.876831282886073, 45.578836369913347 ], [ -92.835037282847154, 45.563402369898967 ], [ -92.762175282779296, 45.56426336989977 ], [ -92.72815428274761, 45.547242369883918 ], [ -92.685421282707807, 45.470053369812035 ], [ -92.654817282679304, 45.455221369798217 ], [ -92.644975282670146, 45.439452369783531 ], [ -92.648751282673658, 45.395466369742564 ], [ -92.684869282707297, 45.363076369712402 ], [ -92.70738428272827, 45.318201369670604 ], [ -92.746593282764778, 45.297603369651426 ], [ -92.755419282773005, 45.212376369572048 ], [ -92.762583282779673, 45.186612369548058 ], [ -92.744935282763237, 45.156422369519937 ], [ -92.745422282763684, 45.113004369479498 ], [ -92.7967622828115, 45.065610369435362 ], [ -92.76299128278005, 45.022119369394858 ], [ -92.767126282783906, 45.001005369375193 ], [ -92.749768282767732, 44.935655369314333 ], [ -92.753926282771616, 44.915002369295095 ], [ -92.771871282788325, 44.899496369280655 ], [ -92.764263282781243, 44.862234369245954 ], [ -92.761028282778227, 44.835371369220937 ], [ -92.805584282819723, 44.746160369137854 ], [ -92.737145282755975, 44.713594369107525 ], [ -92.630367282656536, 44.642652369041457 ], [ -92.608973282636612, 44.610292369011319 ], [ -92.509215282543707, 44.575159368978596 ], [ -92.340872282386925, 44.552835368957801 ], [ -92.32047828236793, 44.540491368946306 ], [ -92.296687282345772, 44.492182368901318 ], [ -92.249100282301455, 44.456216368867821 ], [ -92.206137282261437, 44.43839436885122 ], [ -92.091333282154523, 44.415589368829984 ], [ -91.972386282043743, 44.364487368782392 ], [ -91.938868282012535, 44.339111368758758 ], [ -91.922754281997527, 44.317520368738649 ], [ -91.922349281997143, 44.288341368711471 ], [ -91.888694281965797, 44.257495368682747 ], [ -91.848744281928589, 44.191187368620994 ], [ -91.753219281839634, 44.137227368570734 ], [ -91.65223328174558, 44.066895368505236 ], [ -91.601786281698594, 44.04082236848096 ], [ -91.569162281668213, 44.034955368475494 ], [ -91.528420281630275, 44.034215368474804 ], [ -91.425902281534789, 43.985619368429539 ], [ -91.373357281485852, 43.947191368393753 ], [ -91.291948281410043, 43.847190368300616 ], [ -91.251105281372006, 43.788075368245565 ], [ -91.258916281379271, 43.722395368184394 ], [ -91.258389281378783, 43.67732236814242 ], [ -91.232990281355129, 43.598890368069377 ], [ -91.240558281362183, 43.548712368022642 ], [ -91.223566281346351, 43.500808367978024 ], [ -91.235903281357835, 43.464684367944386 ], [ -91.210916281334576, 43.424051367906543 ], [ -91.198243281322775, 43.370513367856681 ], [ -91.17704828130303, 43.353946367841253 ], [ -91.078498281211253, 43.313297367803393 ], [ -91.066428281200004, 43.280683367773022 ], [ -91.069052281202445, 43.2578983677518 ], [ -91.161354281288411, 43.147576367649052 ], [ -91.168571281295129, 43.082888367588808 ], [ -91.159752281286913, 43.081182367587218 ], [ -91.152214281279896, 43.001316367512842 ], [ -91.139121281267705, 42.925893367442598 ], [ -91.093428281225144, 42.871440367391884 ], [ -91.082030281214543, 42.783365367309855 ], [ -91.066168281199765, 42.744913367274044 ], [ -90.999182281137379, 42.707058367238787 ], [ -90.919409281063082, 42.680677367214223 ], [ -90.892545281038068, 42.678240367211956 ], [ -90.745610280901218, 42.657001367192173 ], [ -90.694791280853892, 42.63792836717441 ], [ -90.664380280825569, 42.57139136711244 ], [ -90.639219280802138, 42.555714367097842 ], [ -90.625707280789555, 42.528562367072553 ], [ -90.638456280801421, 42.509363367054675 ], [ -90.42010328059807, 42.508365367053742 ], [ -89.923691280135742, 42.504115367049785 ], [ -89.834739280052901, 42.50346836704918 ], [ -89.400613279648596, 42.497502367043623 ], [ -89.359559279610366, 42.49791736704401 ], [ -88.939187279218856, 42.490879367037458 ], [ -88.765058279056689, 42.490922367037498 ], [ -88.706623279002272, 42.489671367036337 ], [ -88.297989278621699, 42.491988367038488 ], [ -88.194790278525588, 42.489631367036296 ], [ -87.797382278155467, 42.48915236703585 ], [ -87.791509278150002, 42.666642367201149 ], [ -87.756803278117673, 42.777546367304438 ], [ -87.819849278176392, 42.84156336736406 ], [ -87.836438278191849, 42.964592367478637 ], [ -87.891983278243572, 43.025774367535618 ], [ -87.860069278213857, 43.075875367582277 ], [ -87.889834278241565, 43.19721636769529 ], [ -87.875332278228072, 43.358592367845574 ], [ -87.802959278160657, 43.458714367938825 ], [ -87.786045278144911, 43.54629736802039 ], [ -87.702730278067321, 43.673176368138556 ], [ -87.726122278089107, 43.893904368344124 ], [ -87.644370278012971, 44.097830368534048 ], [ -87.51732227789465, 44.175754368606619 ], [ -87.537489277913423, 44.32785136874827 ], [ -87.473528277853859, 44.533946368940214 ], [ -87.373070277760291, 44.676918369073363 ], [ -87.314465277705722, 44.794718369183073 ], [ -87.367459277755074, 44.811567369198769 ], [ -87.433747277816806, 44.89109636927283 ], [ -87.551672277926627, 44.823023369209437 ], [ -87.552787277927678, 44.851335369235805 ], [ -87.614464277985107, 44.833047369218775 ], [ -87.723821278086959, 44.68928736908488 ], [ -87.764226278124596, 44.64404836904275 ], [ -87.868782278221971, 44.616906369017471 ], [ -87.92640827827563, 44.539139368945044 ], [ -87.966228278312713, 44.535496368941658 ], [ -88.04041727838181, 44.571449368975138 ], [ -88.013021278356305, 44.622234369022436 ], [ -87.975758278321592, 44.595814368997836 ], [ -88.013288278356541, 44.639118369038158 ], [ -87.983182278328513, 44.677265369073687 ], [ -87.985791278330936, 44.72047436911393 ], [ -87.831020278186799, 44.873346369256303 ], [ -87.839992278195155, 44.927323369306578 ], [ -87.74855527810999, 44.961616369338515 ] ] ], [ [ [ -87.034524277445001, 45.290405369644716 ], [ -87.066064277474382, 45.296462369650357 ], [ -87.17791327757854, 45.154973369518586 ], [ -87.230915277627901, 45.175063369537298 ], [ -87.283484277676862, 45.052619369423269 ], [ -87.342161277731506, 45.015213369388427 ], [ -87.405419277790429, 44.911200369291556 ], [ -87.37873727776558, 44.837742369223143 ], [ -87.311123277702606, 44.798773369186847 ], [ -87.205650277604377, 44.873239369256204 ], [ -87.168788277570044, 44.933323369312163 ], [ -87.178692277579273, 44.982806369358244 ], [ -87.112557277517681, 45.064763369434573 ], [ -87.083900277490983, 45.05328536942389 ], [ -87.087678277494504, 45.092178369460107 ], [ -87.04490127745467, 45.095513369463212 ], [ -87.079876277487244, 45.147307369511452 ], [ -87.025448277436553, 45.149974369513934 ], [ -87.045112277454862, 45.249019369606174 ], [ -86.995734277408872, 45.218411369577666 ], [ -86.967712277382773, 45.240277369598033 ], [ -86.986253277400053, 45.298657369652403 ], [ -87.034524277445001, 45.290405369644716 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Idaho", "DRAWSEQ": 9, "STATE_FIPS": "16", "SUB_REGION": "Mountain", "STATE_ABBR": "ID" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -117.026295305377019, 43.67903136814401 ], [ -117.018864305370101, 41.994794366575448 ], [ -116.992313305345363, 41.994794366575448 ], [ -115.947544304372343, 41.994599366575258 ], [ -115.02486330351303, 41.996506366577037 ], [ -114.269471302809535, 41.995924366576496 ], [ -114.039072302594946, 41.995391366576001 ], [ -112.989575301617535, 42.001146366581359 ], [ -112.147116300832934, 41.999054366579415 ], [ -112.100514300789527, 42.002300366582432 ], [ -111.494586300225208, 42.000171366580446 ], [ -111.048697299809945, 41.996203366576751 ], [ -111.046780299808162, 42.503252367048987 ], [ -111.049215299810427, 43.019883367530127 ], [ -111.047498299808822, 43.284734367776792 ], [ -111.046771299808157, 43.515528367991735 ], [ -111.05040529981153, 43.982553368426693 ], [ -111.051560299812607, 44.473323368883754 ], [ -111.094630299852724, 44.486124368895673 ], [ -111.12891829988466, 44.500757368909305 ], [ -111.134359299889724, 44.527902368934583 ], [ -111.170242299923146, 44.545186368950681 ], [ -111.178764299931075, 44.564851368968995 ], [ -111.219507299969024, 44.573170368976747 ], [ -111.234233299982733, 44.602562369004119 ], [ -111.219797299969301, 44.61798136901848 ], [ -111.223971299973186, 44.626908369026793 ], [ -111.270665300016674, 44.642212369041047 ], [ -111.270208300016236, 44.673802369070465 ], [ -111.295668300039949, 44.682938369078968 ], [ -111.315475300058395, 44.705193369099703 ], [ -111.319221300061884, 44.727864369120809 ], [ -111.349977300090529, 44.726177369119242 ], [ -111.372309300111326, 44.745087369136854 ], [ -111.384959300123114, 44.737694369129969 ], [ -111.395084300132538, 44.708869369103127 ], [ -111.443632300177754, 44.713179369107138 ], [ -111.475425300207363, 44.702162369096875 ], [ -111.48080430021237, 44.691416369086866 ], [ -111.460692300193642, 44.670023369066939 ], [ -111.458265300191385, 44.652555369050674 ], [ -111.470168300202474, 44.640710369039645 ], [ -111.507690300237414, 44.63768836903683 ], [ -111.501747300231884, 44.615971369016606 ], [ -111.514526300243787, 44.593197368995391 ], [ -111.492904300223643, 44.551189368956273 ], [ -111.462827300195627, 44.549942368955115 ], [ -111.459325300192376, 44.537921368943913 ], [ -111.482573300214028, 44.536143368942263 ], [ -111.490241300221172, 44.528697368935326 ], [ -111.56723130029286, 44.552866368957837 ], [ -111.60524830032827, 44.542989368948639 ], [ -111.684862300402415, 44.55075236895587 ], [ -111.716997300432354, 44.533760368940037 ], [ -111.766918300478835, 44.51882536892613 ], [ -111.792608300502764, 44.518462368925796 ], [ -111.807837300516951, 44.503982368912304 ], [ -111.872502300577167, 44.556265368961 ], [ -111.940386300640398, 44.549726368954907 ], [ -111.977818300675253, 44.529676368936236 ], [ -112.023613300717912, 44.535043368941231 ], [ -112.027077300721132, 44.52284336892987 ], [ -112.059367300751205, 44.528611368935245 ], [ -112.099897300788953, 44.518231368925576 ], [ -112.124190300811577, 44.528253368934912 ], [ -112.199658300881865, 44.531449368937885 ], [ -112.217763300898724, 44.538495368944453 ], [ -112.230398300910494, 44.559491368964004 ], [ -112.256675300934958, 44.559972368964452 ], [ -112.282341300958862, 44.541702368947441 ], [ -112.342507301014905, 44.525100368931973 ], [ -112.340577301013099, 44.497180368905973 ], [ -112.367583301038252, 44.449270368861349 ], [ -112.420753301087771, 44.449284368861363 ], [ -112.458519301122948, 44.46883436887957 ], [ -112.501839301163287, 44.462997368874134 ], [ -112.539324301198192, 44.47749736888764 ], [ -112.653189301304238, 44.480802368890721 ], [ -112.714326301361183, 44.496935368905739 ], [ -112.733712301379242, 44.484320368893989 ], [ -112.779863301422225, 44.47392236888431 ], [ -112.796228301437466, 44.458011368869492 ], [ -112.826691301465829, 44.421084368835103 ], [ -112.818710301458395, 44.394819368810644 ], [ -112.81739630145718, 44.364202368782131 ], [ -112.844275301482213, 44.353639368772292 ], [ -112.870781301506895, 44.369978368787507 ], [ -112.887307301522284, 44.392852368808803 ], [ -112.938281301569759, 44.407192368822166 ], [ -112.985249301613493, 44.435540368848564 ], [ -113.01201430163843, 44.43771536885059 ], [ -113.006658301633436, 44.452615368864471 ], [ -113.020309301646151, 44.48177636889163 ], [ -113.007713301634425, 44.51061236891848 ], [ -113.037821301662461, 44.532959368939295 ], [ -113.039660301664171, 44.556294368961026 ], [ -113.083037301704564, 44.582681368985604 ], [ -113.054289301677798, 44.624289369024353 ], [ -113.073144301695365, 44.675525369072069 ], [ -113.098956301719397, 44.695916369091059 ], [ -113.101703301721955, 44.715173369108996 ], [ -113.127431301745915, 44.73737936912967 ], [ -113.138274301756013, 44.761439369152086 ], [ -113.240338301851068, 44.811841369199023 ], [ -113.257154301866734, 44.810486369197761 ], [ -113.318680301924033, 44.780228369169578 ], [ -113.34063130194447, 44.779000369168436 ], [ -113.350024301953226, 44.807568369195039 ], [ -113.421379302019673, 44.833699369219374 ], [ -113.445573302042206, 44.851239369235714 ], [ -113.496191302089358, 44.930670369309695 ], [ -113.487348302081116, 44.939574369317981 ], [ -113.463413302058825, 44.940775369319098 ], [ -113.448765302045189, 44.949522369327248 ], [ -113.441029302037975, 44.998194369372577 ], [ -113.458853302054578, 45.027449369399818 ], [ -113.455435302051399, 45.043349369414628 ], [ -113.48630530208014, 45.058321369428576 ], [ -113.49015930208374, 45.071219369440584 ], [ -113.520609302112092, 45.082063369450687 ], [ -113.510225302102427, 45.107835369474685 ], [ -113.552272302141574, 45.107549369474427 ], [ -113.574376302162165, 45.117711369483885 ], [ -113.571584302159565, 45.134545369499563 ], [ -113.594099302180538, 45.149742369513717 ], [ -113.600928302186901, 45.180992369542821 ], [ -113.645592302228494, 45.206790369566846 ], [ -113.69012030226996, 45.262281369618528 ], [ -113.688709302268649, 45.277788369632972 ], [ -113.739080302315557, 45.32153036967371 ], [ -113.741310302317629, 45.382386369730384 ], [ -113.775026302349033, 45.41017236975626 ], [ -113.785662302358944, 45.445633369789292 ], [ -113.769168302343587, 45.477707369819157 ], [ -113.772304302346498, 45.507054369846486 ], [ -113.780933302354541, 45.516865369855623 ], [ -113.833715302403689, 45.514908369853806 ], [ -113.803754302375793, 45.583729369917904 ], [ -113.822485302393233, 45.600636369933646 ], [ -113.852027302420751, 45.609562369941955 ], [ -113.90330530246851, 45.613491369945621 ], [ -113.90219930246748, 45.637253369967752 ], [ -113.923532302487345, 45.655124369984392 ], [ -113.926698302490294, 45.671211369999369 ], [ -113.96414430252517, 45.67937837000698 ], [ -113.971149302531686, 45.69737637002374 ], [ -114.009472302567374, 45.68633237001346 ], [ -114.019878302577069, 45.672378370000459 ], [ -114.0109903025688, 45.652511369981958 ], [ -114.018032302575349, 45.640773369971029 ], [ -114.056515302611189, 45.625144369956473 ], [ -114.082967302635822, 45.586378369920368 ], [ -114.118139302668581, 45.571127369906165 ], [ -114.13204830268154, 45.550382369886847 ], [ -114.172667302719375, 45.543924369880827 ], [ -114.194808302739986, 45.527917369865918 ], [ -114.241998302783941, 45.535290369872783 ], [ -114.247880302789412, 45.502945369842664 ], [ -114.262239302802783, 45.485859369826755 ], [ -114.326434302862566, 45.457424369800265 ], [ -114.350246302884756, 45.463383369805818 ], [ -114.371457302904503, 45.485740369826644 ], [ -114.41905130294883, 45.499008369838997 ], [ -114.433555302962333, 45.527633369865654 ], [ -114.462708302989483, 45.547847369884479 ], [ -114.496591303021049, 45.546649369883369 ], [ -114.527392303049737, 45.558193369894113 ], [ -114.560924303080952, 45.548740369885309 ], [ -114.540958303062368, 45.596397369929697 ], [ -114.564678303084463, 45.624271369955657 ], [ -114.501741303025852, 45.652393369981851 ], [ -114.510706303034198, 45.674057370002025 ], [ -114.497561303021939, 45.694401370020969 ], [ -114.534976303056794, 45.722996370047603 ], [ -114.541958303063296, 45.745999370069029 ], [ -114.563542303083409, 45.762398370084298 ], [ -114.51737530304041, 45.810067370128692 ], [ -114.499164303023434, 45.842683370159065 ], [ -114.473803302999826, 45.839468370156069 ], [ -114.443231302971355, 45.852621370168322 ], [ -114.407525302938097, 45.846453370162578 ], [ -114.392838302924417, 45.870886370185332 ], [ -114.413530302943684, 45.910651370222368 ], [ -114.429460302958518, 45.921477370232452 ], [ -114.40529030293601, 45.953979370262722 ], [ -114.412447302942681, 45.971973370279478 ], [ -114.484455303009753, 45.989806370296087 ], [ -114.474529303000509, 46.009765370314675 ], [ -114.494321303018936, 46.023410370327383 ], [ -114.465756302992332, 46.050815370352908 ], [ -114.456029302983268, 46.082229370382166 ], [ -114.477370303003141, 46.107357370405566 ], [ -114.506568303030335, 46.116142370413748 ], [ -114.518944303041863, 46.136063370432296 ], [ -114.509613303033177, 46.157417370452187 ], [ -114.467018302993495, 46.155262370450181 ], [ -114.440879302969165, 46.168969370462946 ], [ -114.439553302967923, 46.220254370510709 ], [ -114.472833302998922, 46.243783370532626 ], [ -114.473795302999818, 46.252961370541172 ], [ -114.431795302960694, 46.28471137057074 ], [ -114.409796302940208, 46.392911370671513 ], [ -114.397017302928305, 46.399545370677686 ], [ -114.384025302916214, 46.428179370704356 ], [ -114.410715302941071, 46.487371370759483 ], [ -114.360468302894276, 46.506125370776942 ], [ -114.350115302884632, 46.517389370787441 ], [ -114.343319302878299, 46.58788137085309 ], [ -114.324712302860974, 46.622839370885643 ], [ -114.33468530287027, 46.654227370914882 ], [ -114.384017302916206, 46.661596370921743 ], [ -114.44153630296978, 46.645715370906956 ], [ -114.484718303009998, 46.623574370886331 ], [ -114.540391303061838, 46.637891370899666 ], [ -114.610826303127439, 46.629048370891425 ], [ -114.644740303159011, 46.66082437092102 ], [ -114.645038303159296, 46.670921370930429 ], [ -114.625926303141497, 46.687107370945498 ], [ -114.673887303186163, 46.734721370989845 ], [ -114.69843130320902, 46.733760370988946 ], [ -114.748105303255286, 46.695132370952976 ], [ -114.782919303287713, 46.703040370960338 ], [ -114.777832303282963, 46.755717371009396 ], [ -114.794030303298058, 46.766531371019468 ], [ -114.840792303341601, 46.775538371027856 ], [ -114.86660330336565, 46.797045371047886 ], [ -114.902325303398925, 46.799433371050114 ], [ -114.948409303441835, 46.852446371099489 ], [ -114.940566303434537, 46.89088837113529 ], [ -114.924125303419217, 46.907165371150441 ], [ -114.964730303457031, 46.925213371167253 ], [ -115.001574303491338, 46.958809371198541 ], [ -115.037334303524659, 46.963001371202445 ], [ -115.055638303541699, 46.973358371212093 ], [ -115.081336303565635, 47.026524371261608 ], [ -115.13550730361608, 47.063550371296088 ], [ -115.148684303628357, 47.091742371322347 ], [ -115.172496303650533, 47.097570371327777 ], [ -115.193073303669706, 47.124026371352414 ], [ -115.296234303765772, 47.179550371404119 ], [ -115.325228303792784, 47.245150371465215 ], [ -115.343661303809938, 47.255022371474411 ], [ -115.408207303870057, 47.263593371482393 ], [ -115.426641303887223, 47.274374371492435 ], [ -115.501930303957351, 47.281644371499205 ], [ -115.523064303977023, 47.291982371508837 ], [ -115.555520304007246, 47.334613371548542 ], [ -115.599536304048243, 47.370003371581497 ], [ -115.638782304084799, 47.380044371590849 ], [ -115.666477304110586, 47.399167371608655 ], [ -115.750326304188675, 47.42247537163037 ], [ -115.75010530418848, 47.433966371641063 ], [ -115.732481304172069, 47.445303371651626 ], [ -115.656087304100907, 47.449180371655231 ], [ -115.643185304088888, 47.457793371663257 ], [ -115.640142304086055, 47.475235371679503 ], [ -115.692770304135081, 47.489540371692826 ], [ -115.701522304143225, 47.520893371722025 ], [ -115.742829304181697, 47.533691371733944 ], [ -115.692088304134444, 47.590721371787055 ], [ -115.698284304140202, 47.616080371810675 ], [ -115.734067304173536, 47.639879371832833 ], [ -115.733665304173158, 47.69555437188469 ], [ -115.775727304212324, 47.709732371897893 ], [ -115.79053730422612, 47.744838371930584 ], [ -115.836742304269166, 47.756281371941242 ], [ -115.849324304280884, 47.805182371986788 ], [ -115.869809304299963, 47.827452372007528 ], [ -115.903921304331732, 47.841074372020216 ], [ -115.937842304363315, 47.867124372044472 ], [ -115.998932304420208, 47.925140372098511 ], [ -116.025316304444786, 47.964939372135575 ], [ -116.053492304471021, 47.976191372146054 ], [ -116.055497304472894, 48.208483372362394 ], [ -116.056692304474012, 48.498665372632644 ], [ -116.063531304480364, 48.999950373099502 ], [ -117.032049305382372, 48.999931373099486 ], [ -117.029111305379644, 48.838075372948744 ], [ -117.038868305388718, 48.046186372211238 ], [ -117.037472305387425, 47.9710923721413 ], [ -117.041794305391448, 47.36144137157352 ], [ -117.042392305392013, 47.258501371477649 ], [ -117.040968305390692, 47.119319371348027 ], [ -117.04192630539157, 46.536601370805329 ], [ -117.038558305388435, 46.427980370704169 ], [ -117.044470305393943, 46.38857437066747 ], [ -117.064184305412311, 46.348698370630331 ], [ -117.02797330537858, 46.335427370617971 ], [ -117.001642305354054, 46.302448370587257 ], [ -116.972725305327117, 46.249309370537773 ], [ -116.967490305322258, 46.19755437048957 ], [ -116.929426305286796, 46.165483370459697 ], [ -116.961637305316799, 46.097274370396178 ], [ -116.987211305340622, 46.078509370378697 ], [ -116.957723305313152, 46.06568737036676 ], [ -116.919132305277216, 45.995175370301084 ], [ -116.898197305257725, 45.980516370287432 ], [ -116.856472305218858, 45.903597370215799 ], [ -116.791262305158128, 45.845867370162033 ], [ -116.773707305141784, 45.819763370137721 ], [ -116.703180305076103, 45.819169370137175 ], [ -116.654398305030668, 45.780630370101278 ], [ -116.56063230494334, 45.747424370070348 ], [ -116.528275304913194, 45.710728370036179 ], [ -116.514915304900754, 45.664491369993115 ], [ -116.470418304859322, 45.606257369938881 ], [ -116.478551304866897, 45.566058369901441 ], [ -116.554503304937626, 45.493647369834008 ], [ -116.565772304948126, 45.459863369802541 ], [ -116.672265305047304, 45.335410369686635 ], [ -116.688813305062709, 45.262350369618588 ], [ -116.736585305107212, 45.137307369502139 ], [ -116.761268305130187, 45.10630036947326 ], [ -116.778092305145861, 45.099480369466903 ], [ -116.78721030515436, 45.075752369444814 ], [ -116.807307305173069, 45.049755369420595 ], [ -116.85451330521704, 45.016945369390044 ], [ -116.848097305211056, 45.000042369374299 ], [ -116.855887305218317, 44.979965369355597 ], [ -116.848159305211112, 44.971741369347939 ], [ -116.831396305195511, 44.97263336934877 ], [ -116.84755630521056, 44.954850369332206 ], [ -116.835396305199225, 44.920144369299891 ], [ -116.867076305228736, 44.868608369251888 ], [ -116.89736730525695, 44.84855536923321 ], [ -116.909620305268362, 44.828940369214948 ], [ -116.951494305307364, 44.776035369165676 ], [ -117.039572305389385, 44.749115369140604 ], [ -117.066513305414475, 44.697557369092586 ], [ -117.079354305426435, 44.689336369084927 ], [ -117.130504305474062, 44.572523368976135 ], [ -117.143940305486581, 44.559287368963808 ], [ -117.145160305487721, 44.534655368940875 ], [ -117.187391305527058, 44.511805368919596 ], [ -117.20396230554249, 44.485785368895364 ], [ -117.22441030556152, 44.472987368883437 ], [ -117.21722130555483, 44.427855368841406 ], [ -117.236921305573176, 44.38998236880613 ], [ -117.201602305540291, 44.339438368759062 ], [ -117.217455305555049, 44.300665368722953 ], [ -117.213572305551423, 44.284719368708103 ], [ -117.17072330551153, 44.253332368678869 ], [ -117.143279305485976, 44.250632368676357 ], [ -117.112692305457472, 44.269805368694207 ], [ -117.10056030544618, 44.267078368691671 ], [ -117.081387305428322, 44.243846368670035 ], [ -117.052027305400983, 44.231556368658588 ], [ -117.030352305380802, 44.249336368675145 ], [ -116.992707305345732, 44.247063368673032 ], [ -116.976127305330294, 44.225182368652654 ], [ -116.981871305335645, 44.197842368627192 ], [ -116.913051305271551, 44.177304368608063 ], [ -116.902254305261494, 44.1463133685792 ], [ -116.946886305303053, 44.093025368529574 ], [ -116.963443305318492, 44.09029836852703 ], [ -116.97681730533094, 44.073894368511759 ], [ -116.933593305290685, 44.014202368456168 ], [ -116.967957305322685, 43.963195368408662 ], [ -116.959716305315013, 43.928577368376423 ], [ -116.978141305332173, 43.904441368353943 ], [ -116.978148305332184, 43.873469368325097 ], [ -116.985770305339273, 43.859351368311948 ], [ -117.016220305367625, 43.852972368306006 ], [ -117.010505305362301, 43.839769368293709 ], [ -117.027626305378249, 43.831567368286073 ], [ -117.037117305387099, 43.8001423682568 ], [ -117.023794305374679, 43.753701368213555 ], [ -117.026295305377019, 43.67903136814401 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Vermont", "DRAWSEQ": 10, "STATE_FIPS": "50", "SUB_REGION": "New England", "STATE_ABBR": "VT" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.25806026461467, 42.746058367275111 ], [ -73.019695264392681, 42.740396367269838 ], [ -72.922997264302623, 42.73736436726702 ], [ -72.455770263867478, 42.725852367256294 ], [ -72.462171263873444, 42.746840367275837 ], [ -72.479322263889415, 42.761588367289576 ], [ -72.507269263915447, 42.768732367296224 ], [ -72.513068263920843, 42.789259367315346 ], [ -72.53891726394491, 42.807733367332553 ], [ -72.553428263958423, 42.860643367381826 ], [ -72.524810263931784, 42.91261436743023 ], [ -72.520217263927506, 42.9516723674666 ], [ -72.504263263912634, 42.965584367479565 ], [ -72.473341263883839, 42.976143367489399 ], [ -72.457159263868775, 42.999603367511241 ], [ -72.461752263873052, 43.046504367554924 ], [ -72.443464263856015, 43.079039367585224 ], [ -72.437605263850557, 43.116270367619897 ], [ -72.452398263864339, 43.156022367656917 ], [ -72.435598263848689, 43.232253367727921 ], [ -72.402419263817791, 43.307382367797885 ], [ -72.410231263825068, 43.323404367812806 ], [ -72.397628263813331, 43.351006367838515 ], [ -72.412139263826845, 43.377125367862838 ], [ -72.396248263812041, 43.410156367893606 ], [ -72.382515263799249, 43.48462936796296 ], [ -72.394998263810876, 43.517554367993625 ], [ -72.37349826379085, 43.572374368044677 ], [ -72.333085263753219, 43.597364368067957 ], [ -72.304040263726165, 43.698530368162167 ], [ -72.260055263685203, 43.73530036819642 ], [ -72.219123263647077, 43.75069236821075 ], [ -72.206092263634943, 43.764635368223736 ], [ -72.184836263615153, 43.801690368258249 ], [ -72.170089263601412, 43.878917368330164 ], [ -72.121649263556307, 43.909217368358384 ], [ -72.11320426354844, 43.939166368386282 ], [ -72.091711263528424, 43.95799136840381 ], [ -72.112808263548075, 43.976515368421062 ], [ -72.109909263545376, 43.989229368432902 ], [ -72.085204263522357, 44.008924368451247 ], [ -72.07691926351464, 44.032040368472778 ], [ -72.034728263475358, 44.08337436852058 ], [ -72.03244726347323, 44.096099368532435 ], [ -72.049515263489127, 44.100452368536494 ], [ -72.034920263475527, 44.120746368555388 ], [ -72.044724263484667, 44.156435368588632 ], [ -72.059282263498218, 44.182176368612602 ], [ -72.044390263484345, 44.234379368661223 ], [ -72.059566263498482, 44.261494368686471 ], [ -72.035495263476065, 44.299434368721805 ], [ -71.994433263437827, 44.327548368747991 ], [ -71.938905263386104, 44.32578636874635 ], [ -71.928361263376289, 44.336112368755963 ], [ -71.83481626328917, 44.344199368763498 ], [ -71.821197263276488, 44.35036036876923 ], [ -71.797729263254624, 44.384172368800726 ], [ -71.766570263225617, 44.398248368813839 ], [ -71.676884263142085, 44.42134236883534 ], [ -71.656399263123006, 44.440137368852845 ], [ -71.647709263114919, 44.469174368879891 ], [ -71.636554263104529, 44.476731368886931 ], [ -71.61422326308373, 44.474507368884858 ], [ -71.586619263058012, 44.494537368903508 ], [ -71.575243263047426, 44.52580536893263 ], [ -71.591441263062507, 44.538874368944803 ], [ -71.592288263063296, 44.55120336895628 ], [ -71.536791263011608, 44.578931368982111 ], [ -71.55410226302773, 44.596589368998551 ], [ -71.568027263040705, 44.637446369036603 ], [ -71.588749263059995, 44.650599369048855 ], [ -71.607678263077631, 44.677862369074248 ], [ -71.631133263099471, 44.741710369133706 ], [ -71.583501263055112, 44.779197369168621 ], [ -71.575101263047287, 44.816019369202913 ], [ -71.50636526298328, 44.899671369280824 ], [ -71.516977262993166, 44.94369636932182 ], [ -71.540927263015462, 44.976563369352434 ], [ -71.505372262982348, 45.013351369386697 ], [ -71.901868263351616, 45.007340369381097 ], [ -72.547231263952654, 45.005370369379264 ], [ -73.188546264549927, 45.008486369382162 ], [ -73.344723264695375, 45.006138369379975 ], [ -73.350758264701, 44.981973369357469 ], [ -73.336414264687647, 44.932604369311491 ], [ -73.382306264730389, 44.847933369232635 ], [ -73.369054264718045, 44.819118369205796 ], [ -73.326786264678674, 44.799293369187339 ], [ -73.373158264721866, 44.724236369117435 ], [ -73.358151264707885, 44.680368369076575 ], [ -73.373097264721807, 44.661276369058797 ], [ -73.370136264719051, 44.634349369033721 ], [ -73.38182526472994, 44.61980736902018 ], [ -73.371296264720129, 44.579167368982326 ], [ -73.347812264698263, 44.553971368958862 ], [ -73.334452264685808, 44.544328368949877 ], [ -73.293319264647508, 44.432853368846061 ], [ -73.299995264653731, 44.405533368820613 ], [ -73.329788264681468, 44.367390368785095 ], [ -73.305325264658691, 44.260142368685209 ], [ -73.377332264725752, 44.201247368630362 ], [ -73.382062264730152, 44.172107368603221 ], [ -73.407865264754193, 44.136227368569806 ], [ -73.40875726475501, 44.106610368542221 ], [ -73.435215264779657, 44.063897368502445 ], [ -73.43600026478039, 44.04567936848548 ], [ -73.40825126475454, 44.018222368459902 ], [ -73.417406264763073, 43.988197368431941 ], [ -73.405334264751829, 43.914807368363597 ], [ -73.375121264723688, 43.885977368336739 ], [ -73.384740264732656, 43.804508368260869 ], [ -73.358997264708677, 43.778427368236578 ], [ -73.356669264706511, 43.756558368216218 ], [ -73.370989264719839, 43.714281368176842 ], [ -73.42296026476825, 43.632114368100318 ], [ -73.418320264763921, 43.582479368054095 ], [ -73.38811426473579, 43.569143368041665 ], [ -73.363685264713041, 43.614998368084372 ], [ -73.303534264657017, 43.624714368093422 ], [ -73.29410426464824, 43.619653368088706 ], [ -73.28173626463672, 43.593187368064065 ], [ -73.291402264645725, 43.575033368047158 ], [ -73.259984264616463, 43.55938236803258 ], [ -73.238391264596345, 43.512832367989226 ], [ -73.250071264607229, 43.31085436780112 ], [ -73.27600526463138, 42.940294367456005 ], [ -73.279583264634709, 42.837103367359902 ], [ -73.29616926465016, 42.803549367328657 ], [ -73.269275264625108, 42.747481367276436 ], [ -73.25806026461467, 42.746058367275111 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Minnesota", "DRAWSEQ": 11, "STATE_FIPS": "27", "SUB_REGION": "West North Central", "STATE_ABBR": "MN" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -91.730366281818348, 43.499571367976877 ], [ -91.611099281707268, 43.500626367977858 ], [ -91.223566281346351, 43.500808367978024 ], [ -91.240558281362183, 43.548712368022642 ], [ -91.232990281355129, 43.598890368069377 ], [ -91.258389281378783, 43.67732236814242 ], [ -91.258916281379271, 43.722395368184394 ], [ -91.251105281372006, 43.788075368245565 ], [ -91.291948281410043, 43.847190368300616 ], [ -91.373357281485852, 43.947191368393753 ], [ -91.425902281534789, 43.985619368429539 ], [ -91.528420281630275, 44.034215368474804 ], [ -91.569162281668213, 44.034955368475494 ], [ -91.601786281698594, 44.04082236848096 ], [ -91.65223328174558, 44.066895368505236 ], [ -91.753219281839634, 44.137227368570734 ], [ -91.848744281928589, 44.191187368620994 ], [ -91.888694281965797, 44.257495368682747 ], [ -91.922349281997143, 44.288341368711471 ], [ -91.922754281997527, 44.317520368738649 ], [ -91.938868282012535, 44.339111368758758 ], [ -91.972386282043743, 44.364487368782392 ], [ -92.091333282154523, 44.415589368829984 ], [ -92.206137282261437, 44.43839436885122 ], [ -92.249100282301455, 44.456216368867821 ], [ -92.296687282345772, 44.492182368901318 ], [ -92.32047828236793, 44.540491368946306 ], [ -92.340872282386925, 44.552835368957801 ], [ -92.509215282543707, 44.575159368978596 ], [ -92.608973282636612, 44.610292369011319 ], [ -92.630367282656536, 44.642652369041457 ], [ -92.737145282755975, 44.713594369107525 ], [ -92.805584282819723, 44.746160369137854 ], [ -92.761028282778227, 44.835371369220937 ], [ -92.764263282781243, 44.862234369245954 ], [ -92.771871282788325, 44.899496369280655 ], [ -92.753926282771616, 44.915002369295095 ], [ -92.749768282767732, 44.935655369314333 ], [ -92.767126282783906, 45.001005369375193 ], [ -92.76299128278005, 45.022119369394858 ], [ -92.7967622828115, 45.065610369435362 ], [ -92.745422282763684, 45.113004369479498 ], [ -92.744935282763237, 45.156422369519937 ], [ -92.762583282779673, 45.186612369548058 ], [ -92.755419282773005, 45.212376369572048 ], [ -92.746593282764778, 45.297603369651426 ], [ -92.70738428272827, 45.318201369670604 ], [ -92.684869282707297, 45.363076369712402 ], [ -92.648751282673658, 45.395466369742564 ], [ -92.644975282670146, 45.439452369783531 ], [ -92.654817282679304, 45.455221369798217 ], [ -92.685421282707807, 45.470053369812035 ], [ -92.72815428274761, 45.547242369883918 ], [ -92.762175282779296, 45.56426336989977 ], [ -92.835037282847154, 45.563402369898967 ], [ -92.876831282886073, 45.578836369913347 ], [ -92.885397282894047, 45.644955369974923 ], [ -92.860019282870411, 45.710562370036023 ], [ -92.833636282845845, 45.730890370054951 ], [ -92.779107282795067, 45.763340370085174 ], [ -92.748762282766805, 45.837302370154056 ], [ -92.73409728275314, 45.84498037016121 ], [ -92.706240282727194, 45.890958370204032 ], [ -92.666208282689922, 45.915703370227078 ], [ -92.552672282584183, 45.951269370260199 ], [ -92.523977282557453, 45.982583370289362 ], [ -92.462345282500053, 45.981197370288072 ], [ -92.424999282465279, 46.02550437032933 ], [ -92.364963282409363, 46.01624837032071 ], [ -92.346225282391913, 46.022596370326625 ], [ -92.327372282374355, 46.056878370358554 ], [ -92.289370282338965, 46.073231370373783 ], [ -92.288944282338562, 46.156600370451429 ], [ -92.288685282338321, 46.415984370692996 ], [ -92.287271282337002, 46.658786370919124 ], [ -92.303148282351785, 46.666575370926381 ], [ -92.214624282269341, 46.668204370927896 ], [ -92.088492282151876, 46.791897371043092 ], [ -91.800969281884093, 46.927086371168997 ], [ -91.468657281574608, 47.12493537135326 ], [ -91.021475281158146, 47.461058371666297 ], [ -90.509633280681456, 47.70993837189809 ], [ -89.999677280206512, 47.824564372004843 ], [ -89.636373279868167, 47.959390372130407 ], [ -89.625645279858176, 47.992561372161298 ], [ -89.530673279769715, 48.001656372169769 ], [ -89.749310279973344, 48.026484372192897 ], [ -89.900389280114041, 47.992505372161247 ], [ -89.987020280194727, 48.023556372190164 ], [ -90.02670028023168, 48.086079372248392 ], [ -90.145270280342103, 48.112770372273253 ], [ -90.556835280725409, 48.092750372254606 ], [ -90.567455280735302, 48.121699372281569 ], [ -90.743365280899127, 48.088443372250595 ], [ -90.864495281011941, 48.254198372404971 ], [ -91.02714828116342, 48.195339372350148 ], [ -91.23944628136114, 48.081298372243943 ], [ -91.571562281670452, 48.043571372208802 ], [ -91.568775281667854, 48.104457372265514 ], [ -91.703731281793537, 48.114835372275181 ], [ -91.711938281801181, 48.196775372351489 ], [ -91.788815281872786, 48.206145372360211 ], [ -91.979534282050395, 48.250398372401428 ], [ -92.035183282102224, 48.355508372499315 ], [ -92.125962282186777, 48.366756372509798 ], [ -92.276131282326631, 48.352319372496353 ], [ -92.300272282349113, 48.298311372446051 ], [ -92.276918282327358, 48.244340372395783 ], [ -92.370116282414159, 48.22077937237384 ], [ -92.473322282510281, 48.357499372501174 ], [ -92.456345282494468, 48.402169372542772 ], [ -92.497529282532824, 48.440072372578072 ], [ -92.706643282727569, 48.460370372596984 ], [ -92.698821282720289, 48.494721372628973 ], [ -92.626380282652818, 48.502824372636518 ], [ -92.641820282667197, 48.540349372671471 ], [ -92.729000282748402, 48.540211372671337 ], [ -92.946926282951353, 48.628355372753433 ], [ -93.091442283085954, 48.626584372751779 ], [ -93.304236283284126, 48.637163372761634 ], [ -93.457769283427112, 48.592710372720234 ], [ -93.465339283434162, 48.549520372680007 ], [ -93.514139283479608, 48.534271372665806 ], [ -93.781106283728249, 48.511590372644683 ], [ -93.812685283757659, 48.525408372657552 ], [ -93.843904283786728, 48.624737372750062 ], [ -94.230827284147082, 48.651987372775437 ], [ -94.292337284204365, 48.707711372827333 ], [ -94.430634284333166, 48.710785372830202 ], [ -94.570312284463256, 48.713676372832893 ], [ -94.694432284578852, 48.777615372892441 ], [ -94.681250284566573, 48.877161372985142 ], [ -94.832039284707008, 49.33080637340764 ], [ -95.151867285004869, 49.37173037344575 ], [ -95.157750285010351, 48.999996373099549 ], [ -95.27665728512109, 48.99999137309954 ], [ -96.406915286173728, 48.999982373099535 ], [ -97.229436286939759, 48.999987373099536 ], [ -97.216369286927588, 48.931830373036064 ], [ -97.175727286889739, 48.873757372981977 ], [ -97.171204286885526, 48.835980372946793 ], [ -97.1804222868941, 48.81553737292775 ], [ -97.164712286879478, 48.810368372922937 ], [ -97.173944286888073, 48.801514372914696 ], [ -97.147516286863464, 48.781170372895744 ], [ -97.139246286855752, 48.763542372879328 ], [ -97.147898286863821, 48.755653372871983 ], [ -97.132502286849473, 48.747218372864126 ], [ -97.134806286851628, 48.726238372844591 ], [ -97.110101286828609, 48.708583372828144 ], [ -97.1167392868348, 48.695243372815725 ], [ -97.097169286816566, 48.674529372796428 ], [ -97.107630286826307, 48.629946372754915 ], [ -97.127444286844764, 48.629794372754773 ], [ -97.122958286840586, 48.620768372746362 ], [ -97.144718286860851, 48.614024372740083 ], [ -97.140812286857212, 48.586905372714824 ], [ -97.158192286873401, 48.583640372711784 ], [ -97.152127286867753, 48.572856372701736 ], [ -97.16794328688249, 48.562263372691874 ], [ -97.146618286862619, 48.549537372680021 ], [ -97.160435286875497, 48.545078372675874 ], [ -97.155537286870924, 48.538398372669647 ], [ -97.139385286855884, 48.534648372666155 ], [ -97.148327286864216, 48.517951372650607 ], [ -97.134594286851424, 48.517314372650013 ], [ -97.143613286859832, 48.43810937257625 ], [ -97.119633286837498, 48.43710237257531 ], [ -97.122601286840251, 48.416110372555764 ], [ -97.151647286867302, 48.419612372559023 ], [ -97.149823286865612, 48.40999137255006 ], [ -97.129124286846334, 48.407885372548101 ], [ -97.158819286873992, 48.388206372529773 ], [ -97.135205286851999, 48.384410372526233 ], [ -97.133786286850679, 48.372454372515101 ], [ -97.15039628686614, 48.363215372506502 ], [ -97.131123286848194, 48.361491372504894 ], [ -97.137136286853789, 48.325991372471833 ], [ -97.112591286830934, 48.319926372466185 ], [ -97.132634286849594, 48.310969372457841 ], [ -97.114751286832941, 48.303618372450998 ], [ -97.113721286831989, 48.294882372442856 ], [ -97.130513286847631, 48.293040372441141 ], [ -97.112683286831015, 48.286147372434726 ], [ -97.111714286830122, 48.277876372427016 ], [ -97.13665528685334, 48.264483372414546 ], [ -97.123784286841357, 48.259173372409606 ], [ -97.12755428684487, 48.233523372385712 ], [ -97.109235286827811, 48.22804937238061 ], [ -97.139754286856231, 48.221755372374751 ], [ -97.110899286829351, 48.20760537236157 ], [ -97.130828286847915, 48.203742372357979 ], [ -97.137275286853921, 48.195063372349892 ], [ -97.136291286853009, 48.17522737233142 ], [ -97.137443286854079, 48.167769372324472 ], [ -97.116065286834171, 48.159223372316518 ], [ -97.136513286853216, 48.148398372306431 ], [ -97.120918286838688, 48.142774372301197 ], [ -97.121873286839573, 48.116369372276608 ], [ -97.099030286818305, 48.100972372262262 ], [ -97.092721286812434, 48.070344372233741 ], [ -97.067071286788547, 48.04816437221308 ], [ -97.048053286770823, 47.954924372126243 ], [ -97.015331286740349, 47.917890372091755 ], [ -97.020566286745222, 47.87556937205234 ], [ -97.000340286726399, 47.870197372047343 ], [ -96.977231286704864, 47.828029372008068 ], [ -96.98389328671108, 47.809661371990956 ], [ -96.9578302866868, 47.794440371976783 ], [ -96.932012286662754, 47.763506371947976 ], [ -96.923659286654981, 47.714094371901957 ], [ -96.889425286623094, 47.673925371864541 ], [ -96.873335286608111, 47.615255371809909 ], [ -96.852217286588441, 47.601151371796774 ], [ -96.858664286594447, 47.562978371761218 ], [ -96.849188286585616, 47.544568371744077 ], [ -96.860687286596331, 47.521356371722455 ], [ -96.851615286587887, 47.500619371703138 ], [ -96.86668428660191, 47.461537371666743 ], [ -96.855827286591804, 47.436753371643661 ], [ -96.867248286602447, 47.413087371621621 ], [ -96.850005286586381, 47.408936371617756 ], [ -96.839827286576906, 47.384117371594641 ], [ -96.85063128658696, 47.360954371573072 ], [ -96.838461286575637, 47.342243371555639 ], [ -96.846747286583351, 47.314602371529901 ], [ -96.837714286574936, 47.2938843715106 ], [ -96.849623286586024, 47.256843371476108 ], [ -96.83706528657433, 47.240458371460846 ], [ -96.826491286564476, 47.170063371395287 ], [ -96.839164286576292, 47.15188637137836 ], [ -96.819151286557641, 47.092604371323148 ], [ -96.826964286564916, 47.078832371310327 ], [ -96.822608286560865, 47.033932371268506 ], [ -96.835296286572685, 47.010231371246434 ], [ -96.82453128656266, 47.003436371240106 ], [ -96.816772286555434, 46.969779371208759 ], [ -96.79342528653369, 46.969641371208631 ], [ -96.801887286541572, 46.955843371195783 ], [ -96.789710286530223, 46.948202371188664 ], [ -96.787925286528562, 46.932184371173747 ], [ -96.763068286505415, 46.936261371177544 ], [ -96.756911286499687, 46.92278037116499 ], [ -96.778061286519375, 46.867349371113363 ], [ -96.768250286510238, 46.844861371092421 ], [ -96.797197286537198, 46.812033371061844 ], [ -96.780382286521544, 46.76231237101554 ], [ -96.78155628652263, 46.70704437096407 ], [ -96.793695286533932, 46.678804370937769 ], [ -96.790246286530731, 46.629773370892103 ], [ -96.784317286525209, 46.624112370886834 ], [ -96.77104128651284, 46.599983370864358 ], [ -96.751227286494384, 46.588619370853777 ], [ -96.74031628648423, 46.489432370761399 ], [ -96.714894286460549, 46.46871837074211 ], [ -96.709682286455688, 46.427168370703413 ], [ -96.688228286435717, 46.412218370689487 ], [ -96.652101286402072, 46.359433370640332 ], [ -96.614861286367386, 46.350812370632298 ], [ -96.602074286355474, 46.336324370618811 ], [ -96.598183286351855, 46.238682370527869 ], [ -96.586456286340933, 46.215413370506198 ], [ -96.587890286342272, 46.191918370484316 ], [ -96.571166286326687, 46.177174370470588 ], [ -96.551931286308772, 46.095529370394551 ], [ -96.57621528633139, 46.021279370325402 ], [ -96.56180228631797, 45.947683370256854 ], [ -96.566921286322739, 45.934110370244213 ], [ -96.587955286342321, 45.817854370135947 ], [ -96.60461028635784, 45.808264370127013 ], [ -96.657391286406991, 45.738970370062475 ], [ -96.832796286570357, 45.650687369980261 ], [ -96.854990286591018, 45.609122369941545 ], [ -96.843087286579944, 45.584090369918236 ], [ -96.769246286511162, 45.5174783698562 ], [ -96.738032286482095, 45.45819536980099 ], [ -96.693169286440323, 45.410638369756697 ], [ -96.605084286358277, 45.396524369743553 ], [ -96.532549286290731, 45.37513236972363 ], [ -96.477592286239542, 45.328509369680205 ], [ -96.457602286220933, 45.298850369652584 ], [ -96.454496286218031, 45.275195369630552 ], [ -96.456080286219503, 44.971994369348181 ], [ -96.455217286218712, 44.801347369189244 ], [ -96.456718286220109, 44.628808369028562 ], [ -96.455106286218609, 44.538343368944311 ], [ -96.45739728622074, 44.199061368628328 ], [ -96.45660228621999, 43.848741368302065 ], [ -96.46045428622358, 43.49971836797701 ], [ -96.061039285851606, 43.498533367975909 ], [ -95.866912285670807, 43.498944367976293 ], [ -95.464775285296284, 43.499541367976846 ], [ -95.396558285232757, 43.500334367977587 ], [ -94.920464284789361, 43.499371367976693 ], [ -94.8598392847329, 43.500030367977303 ], [ -94.455238284356085, 43.498102367975505 ], [ -94.24678728416194, 43.498948367976297 ], [ -93.97395028390784, 43.50029836797755 ], [ -93.653699283609583, 43.500762367977984 ], [ -93.500830283467224, 43.500488367977731 ], [ -93.05438028305143, 43.501457367978631 ], [ -93.027211283026134, 43.501278367978465 ], [ -92.558008282589142, 43.50025936797752 ], [ -92.453169282491515, 43.499462367976776 ], [ -92.077532282141675, 43.49915336797649 ], [ -91.730366281818348, 43.499571367976877 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Oregon", "DRAWSEQ": 12, "STATE_FIPS": "41", "SUB_REGION": "Pacific", "STATE_ABBR": "OR" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -121.441509309489007, 41.994334366575018 ], [ -120.871908308958524, 41.987672366568809 ], [ -119.993459308140402, 41.989205366570239 ], [ -119.35169230754272, 41.988853366569913 ], [ -119.31094230750476, 41.989135366570167 ], [ -118.18531730645644, 41.996637366577161 ], [ -117.018864305370101, 41.994794366575448 ], [ -117.026295305377019, 43.67903136814401 ], [ -117.023794305374679, 43.753701368213555 ], [ -117.037117305387099, 43.8001423682568 ], [ -117.027626305378249, 43.831567368286073 ], [ -117.010505305362301, 43.839769368293709 ], [ -117.016220305367625, 43.852972368306006 ], [ -116.985770305339273, 43.859351368311948 ], [ -116.978148305332184, 43.873469368325097 ], [ -116.978141305332173, 43.904441368353943 ], [ -116.959716305315013, 43.928577368376423 ], [ -116.967957305322685, 43.963195368408662 ], [ -116.933593305290685, 44.014202368456168 ], [ -116.97681730533094, 44.073894368511759 ], [ -116.963443305318492, 44.09029836852703 ], [ -116.946886305303053, 44.093025368529574 ], [ -116.902254305261494, 44.1463133685792 ], [ -116.913051305271551, 44.177304368608063 ], [ -116.981871305335645, 44.197842368627192 ], [ -116.976127305330294, 44.225182368652654 ], [ -116.992707305345732, 44.247063368673032 ], [ -117.030352305380802, 44.249336368675145 ], [ -117.052027305400983, 44.231556368658588 ], [ -117.081387305428322, 44.243846368670035 ], [ -117.10056030544618, 44.267078368691671 ], [ -117.112692305457472, 44.269805368694207 ], [ -117.143279305485976, 44.250632368676357 ], [ -117.17072330551153, 44.253332368678869 ], [ -117.213572305551423, 44.284719368708103 ], [ -117.217455305555049, 44.300665368722953 ], [ -117.201602305540291, 44.339438368759062 ], [ -117.236921305573176, 44.38998236880613 ], [ -117.21722130555483, 44.427855368841406 ], [ -117.22441030556152, 44.472987368883437 ], [ -117.20396230554249, 44.485785368895364 ], [ -117.187391305527058, 44.511805368919596 ], [ -117.145160305487721, 44.534655368940875 ], [ -117.143940305486581, 44.559287368963808 ], [ -117.130504305474062, 44.572523368976135 ], [ -117.079354305426435, 44.689336369084927 ], [ -117.066513305414475, 44.697557369092586 ], [ -117.039572305389385, 44.749115369140604 ], [ -116.951494305307364, 44.776035369165676 ], [ -116.909620305268362, 44.828940369214948 ], [ -116.89736730525695, 44.84855536923321 ], [ -116.867076305228736, 44.868608369251888 ], [ -116.835396305199225, 44.920144369299891 ], [ -116.84755630521056, 44.954850369332206 ], [ -116.831396305195511, 44.97263336934877 ], [ -116.848159305211112, 44.971741369347939 ], [ -116.855887305218317, 44.979965369355597 ], [ -116.848097305211056, 45.000042369374299 ], [ -116.85451330521704, 45.016945369390044 ], [ -116.807307305173069, 45.049755369420595 ], [ -116.78721030515436, 45.075752369444814 ], [ -116.778092305145861, 45.099480369466903 ], [ -116.761268305130187, 45.10630036947326 ], [ -116.736585305107212, 45.137307369502139 ], [ -116.688813305062709, 45.262350369618588 ], [ -116.672265305047304, 45.335410369686635 ], [ -116.565772304948126, 45.459863369802541 ], [ -116.554503304937626, 45.493647369834008 ], [ -116.478551304866897, 45.566058369901441 ], [ -116.470418304859322, 45.606257369938881 ], [ -116.514915304900754, 45.664491369993115 ], [ -116.528275304913194, 45.710728370036179 ], [ -116.56063230494334, 45.747424370070348 ], [ -116.654398305030668, 45.780630370101278 ], [ -116.703180305076103, 45.819169370137175 ], [ -116.773707305141784, 45.819763370137721 ], [ -116.791262305158128, 45.845867370162033 ], [ -116.856472305218858, 45.903597370215799 ], [ -116.898197305257725, 45.980516370287432 ], [ -116.919132305277216, 45.995175370301084 ], [ -117.481663305801106, 45.999834370305429 ], [ -117.60282630591395, 46.000268370305832 ], [ -117.982677306267718, 45.999880370305469 ], [ -117.992527306276884, 46.001639370307103 ], [ -118.982133307198524, 45.999058370304709 ], [ -119.03222130724518, 45.966274370274171 ], [ -119.140250307345781, 45.925708370236393 ], [ -119.17874230738164, 45.922351370233265 ], [ -119.302763307497145, 45.932662370242866 ], [ -119.379441307568555, 45.91761037022885 ], [ -119.438861307623895, 45.914268370225741 ], [ -119.512220307692218, 45.899200370211702 ], [ -119.589294307763993, 45.913315370224851 ], [ -119.622116307794556, 45.899410370211896 ], [ -119.678445307847028, 45.852539370168245 ], [ -119.833556307991472, 45.841609370158068 ], [ -119.869735308025184, 45.831698370148843 ], [ -119.994320308141198, 45.811140370129692 ], [ -120.068648308210427, 45.780202370100881 ], [ -120.1559083082917, 45.76126137008324 ], [ -120.207445308339686, 45.719784370044607 ], [ -120.283635308410652, 45.716583370041633 ], [ -120.443383308559419, 45.689279370016202 ], [ -120.499156308611362, 45.695630370022116 ], [ -120.570082308677428, 45.740918370064293 ], [ -120.62375730872742, 45.743610370066804 ], [ -120.658403308759688, 45.732612370056557 ], [ -120.696994308795624, 45.710509370035972 ], [ -120.861419308948754, 45.665186369993762 ], [ -120.907937308992075, 45.635477369966097 ], [ -120.948573309029925, 45.650316369979912 ], [ -120.968478309048464, 45.645154369975103 ], [ -121.033482309109004, 45.652844369982269 ], [ -121.073530309146292, 45.646610369976457 ], [ -121.12520430919443, 45.607059369939627 ], [ -121.174316309240169, 45.60051636993353 ], [ -121.19205430925669, 45.613242369945382 ], [ -121.203308309267157, 45.657287369986406 ], [ -121.214271309277365, 45.665645369994188 ], [ -121.276391309335224, 45.678340370006012 ], [ -121.319977309375815, 45.696642370023056 ], [ -121.367814309420368, 45.699686370025894 ], [ -121.422029309470872, 45.690603370017435 ], [ -121.442552309489969, 45.694967370021502 ], [ -121.52905430957054, 45.719567370044409 ], [ -121.706417309735713, 45.688793370015745 ], [ -121.758694309784403, 45.689716370016612 ], [ -121.811041309833158, 45.700683370026823 ], [ -121.888283309905091, 45.676856370004629 ], [ -121.926820309940979, 45.642028369972195 ], [ -121.972659309983669, 45.635776369966372 ], [ -122.000011310009143, 45.617824369949652 ], [ -122.082037310085553, 45.590504369924204 ], [ -122.244922310237243, 45.548112369884727 ], [ -122.303150310291471, 45.543092369880057 ], [ -122.356457310341113, 45.566171369901546 ], [ -122.437154310416275, 45.564779369900251 ], [ -122.565429310535734, 45.594818369928227 ], [ -122.651209310615627, 45.606830369939416 ], [ -122.696323310657647, 45.631045369961967 ], [ -122.760541310717457, 45.649397369979056 ], [ -122.77255131072863, 45.727685370051972 ], [ -122.764288310720943, 45.760568370082595 ], [ -122.788009310743035, 45.800343370119634 ], [ -122.784516310739775, 45.850449370166302 ], [ -122.784073310739359, 45.867886370182546 ], [ -122.806223310760004, 45.904072370216241 ], [ -122.807741310761401, 45.943890370253328 ], [ -122.875417310824446, 46.027183370330903 ], [ -122.899757310847107, 46.079329370379462 ], [ -122.974169310916409, 46.110483370408474 ], [ -123.050596310987586, 46.155736370450626 ], [ -123.118554311050872, 46.179310370472578 ], [ -123.176196311104562, 46.183586370476561 ], [ -123.212437311138302, 46.170006370463909 ], [ -123.248799311172178, 46.144020370439712 ], [ -123.304717311224252, 46.144737370440382 ], [ -123.363557311279052, 46.144154370439836 ], [ -123.517029311421993, 46.236091370525457 ], [ -123.670246311564682, 46.1744983704681 ], [ -123.717161311608379, 46.169893370463811 ], [ -123.761414311649588, 46.209939370501104 ], [ -123.820978311705062, 46.193649370485929 ], [ -123.777083311664171, 46.144430370440091 ], [ -123.794096311680022, 46.111448370409377 ], [ -123.977340311850682, 46.202706370494369 ], [ -123.921187311798377, 46.012323370317063 ], [ -123.996505311868532, 45.94192237025149 ], [ -123.956274311831066, 45.87104137018548 ], [ -123.976629311850019, 45.775482370096483 ], [ -123.936076311812258, 45.702835370028822 ], [ -123.953415311828394, 45.568528369903746 ], [ -123.859507311740941, 45.499082369839066 ], [ -123.892108311771295, 45.474050369815757 ], [ -123.936674311812808, 45.507966369847338 ], [ -123.980560311853679, 45.485084369826026 ], [ -123.956607311831377, 45.292965369647106 ], [ -124.007572311878846, 45.036103369407883 ], [ -124.075568311942163, 44.81473836920172 ], [ -124.054405311922451, 44.662139369059602 ], [ -124.118319311981978, 44.269515368693945 ], [ -124.15832531201923, 43.85711836830987 ], [ -124.226004312082267, 43.605004368075072 ], [ -124.273994312126973, 43.459105367939188 ], [ -124.406076312249979, 43.300197367791199 ], [ -124.386772312231997, 43.261589367755235 ], [ -124.485346312323799, 42.955454367470125 ], [ -124.559617312392973, 42.832457367355573 ], [ -124.401078312245318, 42.622699367160223 ], [ -124.391763312236634, 42.553027367095339 ], [ -124.437818312279546, 42.429608366980396 ], [ -124.415062312258343, 42.245894366809296 ], [ -124.352246312199838, 42.098677366672192 ], [ -124.20644431206405, 41.997648366578105 ], [ -123.819146311703349, 41.992948366573728 ], [ -123.51320431141842, 41.997833366578277 ], [ -123.22210231114731, 42.002191366582331 ], [ -122.28470531027429, 42.000764366581002 ], [ -121.441509309489007, 41.994334366575018 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "New Hampshire", "DRAWSEQ": 13, "STATE_FIPS": "33", "SUB_REGION": "New England", "STATE_ABBR": "NH" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -72.279917263703709, 42.720467367251274 ], [ -71.930216263378014, 42.707209367238931 ], [ -71.900942263350757, 42.70537836723723 ], [ -71.287194262779153, 42.698603367230916 ], [ -71.252411262746762, 42.7260693672565 ], [ -71.240479262735647, 42.743555367272776 ], [ -71.186347262685231, 42.738760367268313 ], [ -71.181061262680316, 42.807317367332161 ], [ -71.120604262624013, 42.818281367342379 ], [ -71.065564262572749, 42.80431936732937 ], [ -71.025426262535362, 42.851171367373006 ], [ -70.92133626243843, 42.885149367404651 ], [ -70.898111262416791, 42.886877367406257 ], [ -70.849740262371739, 42.863429367384427 ], [ -70.813880262338344, 42.867065367387809 ], [ -70.73413926226408, 43.058763367566343 ], [ -70.810427262335139, 43.089740367595191 ], [ -70.886494262405975, 43.058883367566452 ], [ -70.9054162624236, 43.08402136758987 ], [ -70.874631262394928, 43.101527367606167 ], [ -70.884748262404344, 43.127706367630552 ], [ -70.818668262342811, 43.121871367625118 ], [ -70.830548262353872, 43.159174367659858 ], [ -70.813207262337727, 43.235222367730685 ], [ -70.901086262419568, 43.281020367773337 ], [ -70.905801262423964, 43.302069367792939 ], [ -70.969699262483473, 43.366380367852827 ], [ -70.979099262492227, 43.396184367880593 ], [ -70.961483262475809, 43.438126367919651 ], [ -70.970791262484482, 43.470211367949531 ], [ -70.959278262473759, 43.516388367992533 ], [ -70.964268262478413, 43.531989368007068 ], [ -70.949619262464765, 43.548953368022865 ], [ -70.956524262471191, 43.564143368037008 ], [ -70.973874262487357, 43.571830368044175 ], [ -70.984442262497197, 43.791163368248441 ], [ -71.008596262519688, 44.28214636870571 ], [ -71.028726262538441, 44.668538369065558 ], [ -71.087509262593187, 45.301469369655024 ], [ -71.153089262654262, 45.237969369595888 ], [ -71.297235262788504, 45.293494369647597 ], [ -71.386378262871531, 45.234930369593059 ], [ -71.446560262927576, 45.236082369594129 ], [ -71.402522262886563, 45.202803369563135 ], [ -71.430410262912531, 45.116992369483214 ], [ -71.50299926298014, 45.059890369430036 ], [ -71.505372262982348, 45.013351369386697 ], [ -71.540927263015462, 44.976563369352434 ], [ -71.516977262993166, 44.94369636932182 ], [ -71.50636526298328, 44.899671369280824 ], [ -71.575101263047287, 44.816019369202913 ], [ -71.583501263055112, 44.779197369168621 ], [ -71.631133263099471, 44.741710369133706 ], [ -71.607678263077631, 44.677862369074248 ], [ -71.588749263059995, 44.650599369048855 ], [ -71.568027263040705, 44.637446369036603 ], [ -71.55410226302773, 44.596589368998551 ], [ -71.536791263011608, 44.578931368982111 ], [ -71.592288263063296, 44.55120336895628 ], [ -71.591441263062507, 44.538874368944803 ], [ -71.575243263047426, 44.52580536893263 ], [ -71.586619263058012, 44.494537368903508 ], [ -71.61422326308373, 44.474507368884858 ], [ -71.636554263104529, 44.476731368886931 ], [ -71.647709263114919, 44.469174368879891 ], [ -71.656399263123006, 44.440137368852845 ], [ -71.676884263142085, 44.42134236883534 ], [ -71.766570263225617, 44.398248368813839 ], [ -71.797729263254624, 44.384172368800726 ], [ -71.821197263276488, 44.35036036876923 ], [ -71.83481626328917, 44.344199368763498 ], [ -71.928361263376289, 44.336112368755963 ], [ -71.938905263386104, 44.32578636874635 ], [ -71.994433263437827, 44.327548368747991 ], [ -72.035495263476065, 44.299434368721805 ], [ -72.059566263498482, 44.261494368686471 ], [ -72.044390263484345, 44.234379368661223 ], [ -72.059282263498218, 44.182176368612602 ], [ -72.044724263484667, 44.156435368588632 ], [ -72.034920263475527, 44.120746368555388 ], [ -72.049515263489127, 44.100452368536494 ], [ -72.03244726347323, 44.096099368532435 ], [ -72.034728263475358, 44.08337436852058 ], [ -72.07691926351464, 44.032040368472778 ], [ -72.085204263522357, 44.008924368451247 ], [ -72.109909263545376, 43.989229368432902 ], [ -72.112808263548075, 43.976515368421062 ], [ -72.091711263528424, 43.95799136840381 ], [ -72.11320426354844, 43.939166368386282 ], [ -72.121649263556307, 43.909217368358384 ], [ -72.170089263601412, 43.878917368330164 ], [ -72.184836263615153, 43.801690368258249 ], [ -72.206092263634943, 43.764635368223736 ], [ -72.219123263647077, 43.75069236821075 ], [ -72.260055263685203, 43.73530036819642 ], [ -72.304040263726165, 43.698530368162167 ], [ -72.333085263753219, 43.597364368067957 ], [ -72.37349826379085, 43.572374368044677 ], [ -72.394998263810876, 43.517554367993625 ], [ -72.382515263799249, 43.48462936796296 ], [ -72.396248263812041, 43.410156367893606 ], [ -72.412139263826845, 43.377125367862838 ], [ -72.397628263813331, 43.351006367838515 ], [ -72.410231263825068, 43.323404367812806 ], [ -72.402419263817791, 43.307382367797885 ], [ -72.435598263848689, 43.232253367727921 ], [ -72.452398263864339, 43.156022367656917 ], [ -72.437605263850557, 43.116270367619897 ], [ -72.443464263856015, 43.079039367585224 ], [ -72.461752263873052, 43.046504367554924 ], [ -72.457159263868775, 42.999603367511241 ], [ -72.473341263883839, 42.976143367489399 ], [ -72.504263263912634, 42.965584367479565 ], [ -72.520217263927506, 42.9516723674666 ], [ -72.524810263931784, 42.91261436743023 ], [ -72.553428263958423, 42.860643367381826 ], [ -72.53891726394491, 42.807733367332553 ], [ -72.513068263920843, 42.789259367315346 ], [ -72.507269263915447, 42.768732367296224 ], [ -72.479322263889415, 42.761588367289576 ], [ -72.462171263873444, 42.746840367275837 ], [ -72.455770263867478, 42.725852367256294 ], [ -72.279917263703709, 42.720467367251274 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Iowa", "DRAWSEQ": 14, "STATE_FIPS": "19", "SUB_REGION": "West North Central", "STATE_ABBR": "IA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -91.120132281250022, 40.705443365374641 ], [ -91.092895281224656, 40.761587365426934 ], [ -91.089050281221077, 40.833767365494154 ], [ -91.049353281184096, 40.879623365536858 ], [ -90.983419281122693, 40.923965365578155 ], [ -90.960851281101682, 40.950541365602902 ], [ -90.954794281096042, 41.070397365714527 ], [ -90.957930281098953, 41.104393365746191 ], [ -90.990485281129281, 41.144404365783458 ], [ -91.018402281155275, 41.165857365803433 ], [ -91.056466281190723, 41.176290365813152 ], [ -91.101672281232823, 41.231552365864616 ], [ -91.102496281233599, 41.267848365898416 ], [ -91.073429281206529, 41.334925365960892 ], [ -91.05593528119023, 41.401407366022809 ], [ -91.027637281163877, 41.423536366043422 ], [ -91.000842281138929, 41.431112366050471 ], [ -90.949800281091385, 41.421263366041302 ], [ -90.844284280993122, 41.444652366063082 ], [ -90.780042280933287, 41.44985236606793 ], [ -90.70835428086653, 41.450093366068145 ], [ -90.658929280820487, 41.462350366079562 ], [ -90.600838280766396, 41.50961836612359 ], [ -90.54097528071064, 41.526003366138852 ], [ -90.45512628063068, 41.527579366140316 ], [ -90.435098280612038, 41.543612366155244 ], [ -90.423135280600889, 41.567305366177308 ], [ -90.348494280531384, 41.586882366195546 ], [ -90.339476280522973, 41.602831366210395 ], [ -90.341262280524646, 41.649122366253508 ], [ -90.326157280510571, 41.7227683663221 ], [ -90.305016280490889, 41.756497366353514 ], [ -90.255438280444707, 41.781769366377048 ], [ -90.195965280389316, 41.806167366399769 ], [ -90.154645280350834, 41.930802366515849 ], [ -90.142796280339809, 41.983989366565382 ], [ -90.150663280347132, 42.033453366611447 ], [ -90.168226280363484, 42.061066366637164 ], [ -90.166776280362143, 42.103767366676934 ], [ -90.176214280370928, 42.120524366692536 ], [ -90.191702280385357, 42.122710366694577 ], [ -90.231063280422006, 42.159741366729065 ], [ -90.323730280508315, 42.197337366764074 ], [ -90.367858280549413, 42.210226366776084 ], [ -90.40730128058614, 42.242661366806288 ], [ -90.418112280596219, 42.263939366826108 ], [ -90.427809280605246, 42.34064536689754 ], [ -90.441725280618201, 42.360083366915646 ], [ -90.491171280664261, 42.388791366942385 ], [ -90.563711280731809, 42.421843366973164 ], [ -90.605955280771155, 42.460564367009226 ], [ -90.648473280810748, 42.475647367023271 ], [ -90.65189928081395, 42.49470036704102 ], [ -90.638456280801421, 42.509363367054675 ], [ -90.625707280789555, 42.528562367072553 ], [ -90.639219280802138, 42.555714367097842 ], [ -90.664380280825569, 42.57139136711244 ], [ -90.694791280853892, 42.63792836717441 ], [ -90.745610280901218, 42.657001367192173 ], [ -90.892545281038068, 42.678240367211956 ], [ -90.919409281063082, 42.680677367214223 ], [ -90.999182281137379, 42.707058367238787 ], [ -91.066168281199765, 42.744913367274044 ], [ -91.082030281214543, 42.783365367309855 ], [ -91.093428281225144, 42.871440367391884 ], [ -91.139121281267705, 42.925893367442598 ], [ -91.152214281279896, 43.001316367512842 ], [ -91.159752281286913, 43.081182367587218 ], [ -91.168571281295129, 43.082888367588808 ], [ -91.161354281288411, 43.147576367649052 ], [ -91.069052281202445, 43.2578983677518 ], [ -91.066428281200004, 43.280683367773022 ], [ -91.078498281211253, 43.313297367803393 ], [ -91.17704828130303, 43.353946367841253 ], [ -91.198243281322775, 43.370513367856681 ], [ -91.210916281334576, 43.424051367906543 ], [ -91.235903281357835, 43.464684367944386 ], [ -91.223566281346351, 43.500808367978024 ], [ -91.611099281707268, 43.500626367977858 ], [ -91.730366281818348, 43.499571367976877 ], [ -92.077532282141675, 43.49915336797649 ], [ -92.453169282491515, 43.499462367976776 ], [ -92.558008282589142, 43.50025936797752 ], [ -93.027211283026134, 43.501278367978465 ], [ -93.05438028305143, 43.501457367978631 ], [ -93.500830283467224, 43.500488367977731 ], [ -93.653699283609583, 43.500762367977984 ], [ -93.97395028390784, 43.50029836797755 ], [ -94.24678728416194, 43.498948367976297 ], [ -94.455238284356085, 43.498102367975505 ], [ -94.8598392847329, 43.500030367977303 ], [ -94.920464284789361, 43.499371367976693 ], [ -95.396558285232757, 43.500334367977587 ], [ -95.464775285296284, 43.499541367976846 ], [ -95.866912285670807, 43.498944367976293 ], [ -96.061039285851606, 43.498533367975909 ], [ -96.46045428622358, 43.49971836797701 ], [ -96.598315286351976, 43.499849367977134 ], [ -96.583796286338455, 43.481920367960441 ], [ -96.589113286343405, 43.435539367917244 ], [ -96.557708286314153, 43.400727367884819 ], [ -96.52505328628375, 43.384225367869448 ], [ -96.522894286281741, 43.356966367844066 ], [ -96.540563286298195, 43.307659367798145 ], [ -96.579131286334103, 43.29007436778177 ], [ -96.570722286326273, 43.263612367757119 ], [ -96.559567286315897, 43.253263367747479 ], [ -96.566991286322803, 43.23963336773479 ], [ -96.558605286315, 43.225489367721622 ], [ -96.487245286248537, 43.217909367714554 ], [ -96.473114286235372, 43.209082367706337 ], [ -96.451505286215252, 43.12630836762925 ], [ -96.460805286223916, 43.087872367593448 ], [ -96.46209428622511, 43.075582367582001 ], [ -96.47957328624139, 43.061884367569249 ], [ -96.520010286279046, 43.051508367559585 ], [ -96.499020286259494, 43.012050367522832 ], [ -96.517148286276381, 42.986458367498997 ], [ -96.514935286274323, 42.952382367467266 ], [ -96.544263286301643, 42.913866367431396 ], [ -96.537511286295356, 42.896906367415596 ], [ -96.55621128631276, 42.846660367368806 ], [ -96.573126286328517, 42.834347367357338 ], [ -96.587645286342038, 42.835381367358302 ], [ -96.600875286354366, 42.799558367324934 ], [ -96.632980286384267, 42.776835367303775 ], [ -96.640709286391456, 42.748603367277482 ], [ -96.626540286378258, 42.708354367239998 ], [ -96.563039286319125, 42.668513367202891 ], [ -96.541165286298749, 42.662405367197209 ], [ -96.512844286272369, 42.629755367166794 ], [ -96.488498286249708, 42.580480367120906 ], [ -96.500942286261292, 42.573885367114762 ], [ -96.489337286250489, 42.564028367105578 ], [ -96.480243286242015, 42.51713036706191 ], [ -96.439394286203964, 42.489240367035933 ], [ -96.396074286163625, 42.467401367015597 ], [ -96.397890286165321, 42.441793366991746 ], [ -96.4176282861837, 42.414777366966582 ], [ -96.411761286178233, 42.380918366935049 ], [ -96.424175286189794, 42.349279366905584 ], [ -96.389781286157771, 42.328789366886497 ], [ -96.368700286138136, 42.298023366857848 ], [ -96.342881286114078, 42.282081366843002 ], [ -96.332658286104561, 42.260307366822722 ], [ -96.337708286109262, 42.22952236679405 ], [ -96.3635122861333, 42.214042366779637 ], [ -96.352165286122727, 42.168185366736921 ], [ -96.285123286060298, 42.123452366695261 ], [ -96.265483286041999, 42.04889736662583 ], [ -96.238725286017086, 42.028438366606778 ], [ -96.236093286014636, 42.001258366581467 ], [ -96.202842285983664, 41.996615366577139 ], [ -96.185217285967255, 41.980685366562298 ], [ -96.147328285931962, 41.966254366548867 ], [ -96.145870285930599, 41.924907366510354 ], [ -96.159970285943743, 41.904151366491021 ], [ -96.135623285921056, 41.862620366452347 ], [ -96.076417285865915, 41.791469366386082 ], [ -96.099321285887257, 41.752975366350228 ], [ -96.09977128588767, 41.731563366330292 ], [ -96.08555728587443, 41.704987366305538 ], [ -96.122202285908557, 41.694913366296156 ], [ -96.120264285906757, 41.684094366286082 ], [ -96.099306285887238, 41.654680366258688 ], [ -96.11130728589842, 41.599006366206837 ], [ -96.080835285870037, 41.576000366185411 ], [ -96.091936285880379, 41.563145366173437 ], [ -96.085840285874696, 41.537522366149574 ], [ -96.050172285841484, 41.524335366137294 ], [ -96.004592285799035, 41.536663366148773 ], [ -95.99396528578913, 41.528103366140805 ], [ -95.996688285791663, 41.511517366125361 ], [ -96.013451285807278, 41.492994366108107 ], [ -96.006897285801173, 41.481954366097824 ], [ -95.953185285751147, 41.47238736608891 ], [ -95.935065285734282, 41.462381366079597 ], [ -95.940056285738919, 41.394805366016655 ], [ -95.942895285741571, 41.340077365965691 ], [ -95.88910728569148, 41.301389365929658 ], [ -95.897591285699377, 41.286863365916133 ], [ -95.911202285712051, 41.308469365936254 ], [ -95.930230285729778, 41.302056365930284 ], [ -95.910981285711841, 41.22524536585874 ], [ -95.922250285722342, 41.20785436584255 ], [ -95.91610028571661, 41.194063365829706 ], [ -95.859198285663624, 41.180537365817102 ], [ -95.859801285664176, 41.16686536580437 ], [ -95.876685285679912, 41.164202365801899 ], [ -95.858274285662759, 41.109187365750657 ], [ -95.878804285681881, 41.065871365710315 ], [ -95.859539285663942, 41.035002365681564 ], [ -95.860897285665203, 41.002650365651434 ], [ -95.83760328564351, 40.974258365624991 ], [ -95.836541285642525, 40.901108365556865 ], [ -95.834396285640523, 40.87030036552818 ], [ -95.846435285651737, 40.848332365507716 ], [ -95.851790285656719, 40.792600365455812 ], [ -95.876616285679845, 40.730436365397921 ], [ -95.767999285578682, 40.643117365316598 ], [ -95.757546285568949, 40.620904365295907 ], [ -95.767479285578204, 40.589048365266237 ], [ -95.382555285219709, 40.584334365261853 ], [ -95.217428285065921, 40.581892365259577 ], [ -94.920616284789503, 40.57721836525522 ], [ -94.639876284528043, 40.575744365253854 ], [ -94.485231284384014, 40.574205365252418 ], [ -94.238392284154131, 40.570966365249404 ], [ -94.018059283948929, 40.574022365252247 ], [ -93.786303283733091, 40.578448365256364 ], [ -93.562910283525042, 40.580813365258571 ], [ -93.37027128334563, 40.580491365258268 ], [ -93.100938283094791, 40.584347365261863 ], [ -92.717815282737973, 40.58966736526682 ], [ -92.646432282671498, 40.591462365268484 ], [ -92.36151328240615, 40.599576365276043 ], [ -92.193174282249373, 40.60008836527652 ], [ -91.946370282019515, 40.608266365284138 ], [ -91.741711281828913, 40.609784365285549 ], [ -91.71697628180587, 40.593435365270324 ], [ -91.689959281780716, 40.581202365258932 ], [ -91.692081281782691, 40.551677365231434 ], [ -91.622536281717927, 40.532903365213954 ], [ -91.616860281712633, 40.504873365187848 ], [ -91.586028281683923, 40.484519365168893 ], [ -91.579383281677735, 40.463760365149554 ], [ -91.533208281634728, 40.455441365141809 ], [ -91.538846281639977, 40.441288365128628 ], [ -91.529607281631371, 40.435086365122856 ], [ -91.527691281629586, 40.410169365099648 ], [ -91.500377281604145, 40.405160365094986 ], [ -91.490314281594777, 40.390806365081616 ], [ -91.477038281582409, 40.391012365081806 ], [ -91.448747281556066, 40.371946365064048 ], [ -91.418968281528336, 40.386919365077993 ], [ -91.385909281497547, 40.392405365083107 ], [ -91.372908281485437, 40.403032365092997 ], [ -91.385551281497214, 40.447294365134226 ], [ -91.37494628148734, 40.503697365186753 ], [ -91.382255281494139, 40.528538365209883 ], [ -91.413026281522804, 40.548034365228041 ], [ -91.411271281521167, 40.573012365251302 ], [ -91.375762281488093, 40.60348036527968 ], [ -91.262211281382349, 40.639587365313304 ], [ -91.215060281338424, 40.643859365317283 ], [ -91.162644281289616, 40.656352365328921 ], [ -91.129303281258558, 40.682189365352983 ], [ -91.120132281250022, 40.705443365374641 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Massachusetts", "DRAWSEQ": 15, "STATE_FIPS": "25", "SUB_REGION": "New England", "STATE_ABBR": "MA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -71.31932826280908, 41.77219536636813 ], [ -71.266628262760008, 41.749743366347218 ], [ -71.228976262724942, 41.707694366308061 ], [ -71.198808262696843, 41.678500366280872 ], [ -71.141212262643194, 41.655273366259237 ], [ -71.117132262620771, 41.49306236610817 ], [ -71.001185262512791, 41.520124366133373 ], [ -70.892128262411219, 41.633912366239343 ], [ -70.839430262362143, 41.626692366232618 ], [ -70.619761262157567, 41.735636366334084 ], [ -70.664888262199582, 41.556127366166905 ], [ -70.637139262173747, 41.539804366151699 ], [ -70.432919261983557, 41.569756366179597 ], [ -70.397616261950674, 41.61257136621947 ], [ -69.954423261537912, 41.671495366274343 ], [ -69.917780261503793, 41.767653366363902 ], [ -69.964170261546997, 41.904094366490973 ], [ -70.050471261627365, 42.026298366604784 ], [ -70.135090261706182, 42.072494366647803 ], [ -70.255148261817993, 42.060119366636286 ], [ -70.100497261673965, 42.00219436658233 ], [ -70.000448261580786, 41.856350366446506 ], [ -70.019214261598265, 41.781519366376813 ], [ -70.205259261771531, 41.712573366312604 ], [ -70.341127261898066, 41.711813366311901 ], [ -70.27383426183539, 41.721663366321067 ], [ -70.423511261974795, 41.743622366341519 ], [ -70.537705262081147, 41.805762366399392 ], [ -70.540338262083594, 41.930951366515984 ], [ -70.618703262156572, 41.968189366550661 ], [ -70.686037262219287, 42.153166366722942 ], [ -70.774595262301759, 42.248640366811856 ], [ -70.824661262348386, 42.260507366822907 ], [ -70.892671262411724, 42.265766366827805 ], [ -70.923204262440166, 42.234517366798698 ], [ -71.034162262543504, 42.285628366846304 ], [ -70.960622262475013, 42.432393366982993 ], [ -70.893604262412595, 42.448068366997589 ], [ -70.813128262337642, 42.5464363670892 ], [ -70.633452262170309, 42.582642367122915 ], [ -70.593199262132828, 42.646305367182208 ], [ -70.739695262269265, 42.663523367198245 ], [ -70.813880262338344, 42.867065367387809 ], [ -70.849740262371739, 42.863429367384427 ], [ -70.898111262416791, 42.886877367406257 ], [ -70.92133626243843, 42.885149367404651 ], [ -71.025426262535362, 42.851171367373006 ], [ -71.065564262572749, 42.80431936732937 ], [ -71.120604262624013, 42.818281367342379 ], [ -71.181061262680316, 42.807317367332161 ], [ -71.186347262685231, 42.738760367268313 ], [ -71.240479262735647, 42.743555367272776 ], [ -71.252411262746762, 42.7260693672565 ], [ -71.287194262779153, 42.698603367230916 ], [ -71.900942263350757, 42.70537836723723 ], [ -71.930216263378014, 42.707209367238931 ], [ -72.279917263703709, 42.720467367251274 ], [ -72.455770263867478, 42.725852367256294 ], [ -72.922997264302623, 42.73736436726702 ], [ -73.019695264392681, 42.740396367269838 ], [ -73.25806026461467, 42.746058367275111 ], [ -73.35082426470106, 42.504755367050379 ], [ -73.498840264838918, 42.077460366652431 ], [ -73.4842302648253, 42.047428366624459 ], [ -73.045632264416824, 42.036310366614103 ], [ -73.006095264380008, 42.036009366613825 ], [ -72.816451264203394, 42.033507366611502 ], [ -72.817679264204529, 41.997185366577668 ], [ -72.76757526415787, 42.002167366582313 ], [ -72.755894264146988, 42.033847366611809 ], [ -72.609526264010668, 42.030536366608729 ], [ -72.607825264009094, 42.02280036660153 ], [ -72.581907263984959, 42.021607366600414 ], [ -72.571226263975007, 42.030125366608345 ], [ -72.507572263915719, 42.030766366608944 ], [ -72.13634626356999, 42.026402366604884 ], [ -72.094971263531463, 42.025799366604318 ], [ -71.802340263258927, 42.017977366597037 ], [ -71.797831263254722, 42.004274366584269 ], [ -71.497430262974959, 42.009253366588908 ], [ -71.378644262864327, 42.013713366593066 ], [ -71.382405262867834, 41.979263366560978 ], [ -71.383953262869269, 41.888439366476391 ], [ -71.333086262821894, 41.896031366483463 ], [ -71.342493262830658, 41.875783366464603 ], [ -71.334542262823248, 41.857903366447957 ], [ -71.34548326283344, 41.813161366406284 ], [ -71.339798262828154, 41.784425366379523 ], [ -71.31932826280908, 41.77219536636813 ] ] ], [ [ [ -70.604331262143191, 41.429663366049127 ], [ -70.605842262144591, 41.474663366091036 ], [ -70.667488262202014, 41.454937366072663 ], [ -70.751769262280504, 41.382169366004888 ], [ -70.770926262298346, 41.324980365951632 ], [ -70.782524262309153, 41.352517365977278 ], [ -70.843920262366325, 41.348599365973627 ], [ -70.769713262297216, 41.298164365926652 ], [ -70.738676262268314, 41.334155365960171 ], [ -70.486141262033115, 41.341561365967067 ], [ -70.515157262060143, 41.398660366020252 ], [ -70.575857262116671, 41.410285366031076 ], [ -70.552831262095225, 41.417388366037692 ], [ -70.567694262109072, 41.464566366081627 ], [ -70.604331262143191, 41.429663366049127 ] ] ], [ [ [ -70.031716261609901, 41.311931365939472 ], [ -70.097872261671512, 41.277631365907531 ], [ -70.207096261773231, 41.294087365922863 ], [ -70.213268261778992, 41.270205365900615 ], [ -70.10310526167639, 41.238279365870881 ], [ -69.968444261550971, 41.251816365883492 ], [ -69.96598026154868, 41.294891365923604 ], [ -70.049264261626249, 41.391961366014016 ], [ -70.034486261612486, 41.349718365974667 ], [ -70.087633261661978, 41.296848365925428 ], [ -70.02662026160516, 41.337210365963017 ], [ -70.006508261586418, 41.324774365951441 ], [ -70.031716261609901, 41.311931365939472 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Nebraska", "DRAWSEQ": 16, "STATE_FIPS": "31", "SUB_REGION": "West North Central", "STATE_ABBR": "NE" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -101.407393290830782, 40.001003364718585 ], [ -101.322148290751386, 40.001821364719341 ], [ -100.75485629022306, 40.000198364717832 ], [ -100.735049290204614, 39.99917236471687 ], [ -100.191111289698028, 40.000585364718191 ], [ -100.180910289688526, 40.000478364718091 ], [ -99.627859289173458, 40.002987364720425 ], [ -99.178201288754678, 39.999577364717254 ], [ -99.064747288649016, 39.998338364716098 ], [ -98.720632288328545, 39.998461364716213 ], [ -98.504479288127229, 39.997129364714972 ], [ -98.264165287903424, 39.998434364716189 ], [ -97.929588287591827, 39.998452364716201 ], [ -97.816589287486579, 39.999729364717396 ], [ -97.361912287063134, 39.997380364715205 ], [ -96.908287286640657, 39.996154364714066 ], [ -96.801420286541131, 39.994476364712497 ], [ -96.45403828621761, 39.994172364712213 ], [ -96.240598286018823, 39.994503364712529 ], [ -96.001253285795926, 39.995159364713139 ], [ -95.780700285590513, 39.993489364711579 ], [ -95.329701285170486, 39.992595364710752 ], [ -95.308697285150927, 39.999407364717094 ], [ -95.345067285184797, 40.024974364740906 ], [ -95.371244285209173, 40.028751364744423 ], [ -95.390532285227138, 40.043750364758395 ], [ -95.413764285248774, 40.048111364762448 ], [ -95.403784285239482, 40.080379364792506 ], [ -95.384542285221556, 40.095362364806462 ], [ -95.392813285229266, 40.115416364825137 ], [ -95.422476285256892, 40.131743364840347 ], [ -95.46095228529272, 40.173995364879687 ], [ -95.466636285298023, 40.21325536491625 ], [ -95.476822285307506, 40.226855364928923 ], [ -95.547137285372997, 40.266215364965575 ], [ -95.595532285418059, 40.309776365006144 ], [ -95.646827285465832, 40.309109365005526 ], [ -95.645553285464644, 40.32234636501785 ], [ -95.617933285438923, 40.331418365026302 ], [ -95.616201285437313, 40.346497365040349 ], [ -95.634185285454066, 40.358800365051806 ], [ -95.636817285456516, 40.396390365086816 ], [ -95.695361285511041, 40.485338365169653 ], [ -95.684970285501365, 40.512205365194674 ], [ -95.658060285476296, 40.530332365211557 ], [ -95.662944285480847, 40.558729365238008 ], [ -95.675693285492713, 40.565835365244624 ], [ -95.687413285503638, 40.561170365240272 ], [ -95.692066285507963, 40.524129365205781 ], [ -95.737036285549848, 40.532373365213459 ], [ -95.763412285574418, 40.549707365229601 ], [ -95.767479285578204, 40.589048365266237 ], [ -95.757546285568949, 40.620904365295907 ], [ -95.767999285578682, 40.643117365316598 ], [ -95.876616285679845, 40.730436365397921 ], [ -95.851790285656719, 40.792600365455812 ], [ -95.846435285651737, 40.848332365507716 ], [ -95.834396285640523, 40.87030036552818 ], [ -95.836541285642525, 40.901108365556865 ], [ -95.83760328564351, 40.974258365624991 ], [ -95.860897285665203, 41.002650365651434 ], [ -95.859539285663942, 41.035002365681564 ], [ -95.878804285681881, 41.065871365710315 ], [ -95.858274285662759, 41.109187365750657 ], [ -95.876685285679912, 41.164202365801899 ], [ -95.859801285664176, 41.16686536580437 ], [ -95.859198285663624, 41.180537365817102 ], [ -95.91610028571661, 41.194063365829706 ], [ -95.922250285722342, 41.20785436584255 ], [ -95.910981285711841, 41.22524536585874 ], [ -95.930230285729778, 41.302056365930284 ], [ -95.911202285712051, 41.308469365936254 ], [ -95.897591285699377, 41.286863365916133 ], [ -95.88910728569148, 41.301389365929658 ], [ -95.942895285741571, 41.340077365965691 ], [ -95.940056285738919, 41.394805366016655 ], [ -95.935065285734282, 41.462381366079597 ], [ -95.953185285751147, 41.47238736608891 ], [ -96.006897285801173, 41.481954366097824 ], [ -96.013451285807278, 41.492994366108107 ], [ -95.996688285791663, 41.511517366125361 ], [ -95.99396528578913, 41.528103366140805 ], [ -96.004592285799035, 41.536663366148773 ], [ -96.050172285841484, 41.524335366137294 ], [ -96.085840285874696, 41.537522366149574 ], [ -96.091936285880379, 41.563145366173437 ], [ -96.080835285870037, 41.576000366185411 ], [ -96.11130728589842, 41.599006366206837 ], [ -96.099306285887238, 41.654680366258688 ], [ -96.120264285906757, 41.684094366286082 ], [ -96.122202285908557, 41.694913366296156 ], [ -96.08555728587443, 41.704987366305538 ], [ -96.09977128588767, 41.731563366330292 ], [ -96.099321285887257, 41.752975366350228 ], [ -96.076417285865915, 41.791469366386082 ], [ -96.135623285921056, 41.862620366452347 ], [ -96.159970285943743, 41.904151366491021 ], [ -96.145870285930599, 41.924907366510354 ], [ -96.147328285931962, 41.966254366548867 ], [ -96.185217285967255, 41.980685366562298 ], [ -96.202842285983664, 41.996615366577139 ], [ -96.236093286014636, 42.001258366581467 ], [ -96.238725286017086, 42.028438366606778 ], [ -96.265483286041999, 42.04889736662583 ], [ -96.285123286060298, 42.123452366695261 ], [ -96.352165286122727, 42.168185366736921 ], [ -96.3635122861333, 42.214042366779637 ], [ -96.337708286109262, 42.22952236679405 ], [ -96.332658286104561, 42.260307366822722 ], [ -96.342881286114078, 42.282081366843002 ], [ -96.368700286138136, 42.298023366857848 ], [ -96.389781286157771, 42.328789366886497 ], [ -96.424175286189794, 42.349279366905584 ], [ -96.411761286178233, 42.380918366935049 ], [ -96.4176282861837, 42.414777366966582 ], [ -96.397890286165321, 42.441793366991746 ], [ -96.396074286163625, 42.467401367015597 ], [ -96.439394286203964, 42.489240367035933 ], [ -96.494701286255477, 42.488459367035205 ], [ -96.547215286304393, 42.520499367065042 ], [ -96.58475328633935, 42.518287367062982 ], [ -96.605467286358632, 42.507236367052691 ], [ -96.629294286380826, 42.522693367067092 ], [ -96.636672286387693, 42.550731367093199 ], [ -96.714059286459772, 42.612302367150541 ], [ -96.715273286460899, 42.621907367159487 ], [ -96.694596286441652, 42.64116336717742 ], [ -96.6990602864458, 42.657715367192836 ], [ -96.722658286467777, 42.668592367202962 ], [ -96.799344286539196, 42.67001936720429 ], [ -96.810437286549529, 42.681341367214841 ], [ -96.810140286549256, 42.704084367236021 ], [ -96.908234286640607, 42.73169936726174 ], [ -96.970773286698858, 42.721147367251916 ], [ -96.97786928670547, 42.727308367257649 ], [ -96.970003286698145, 42.752065367280707 ], [ -96.979593286707072, 42.758313367286526 ], [ -97.01513928674018, 42.759542367287665 ], [ -97.130469286847585, 42.773923367301066 ], [ -97.161422286876416, 42.798619367324065 ], [ -97.211831286923356, 42.812573367337059 ], [ -97.224443286935099, 42.841202367363721 ], [ -97.243189286952557, 42.851826367373619 ], [ -97.271457286978887, 42.850014367371926 ], [ -97.311414287016106, 42.861771367382879 ], [ -97.389306287088644, 42.867433367388152 ], [ -97.457263287151932, 42.850443367372328 ], [ -97.483159287176051, 42.857157367378576 ], [ -97.506132287197445, 42.860136367381358 ], [ -97.57065428725754, 42.847990367370045 ], [ -97.634970287317444, 42.861285367382422 ], [ -97.685752287364735, 42.836837367359657 ], [ -97.725250287401522, 42.858008367379369 ], [ -97.772186287445223, 42.846164367368345 ], [ -97.797028287468365, 42.849597367371544 ], [ -97.818643287488499, 42.866587367387368 ], [ -97.888659287553708, 42.855807367377324 ], [ -97.88994128755489, 42.831271367354475 ], [ -97.929477287591723, 42.792324367318201 ], [ -97.963558287623457, 42.773690367300844 ], [ -97.995144287652877, 42.766812367294442 ], [ -98.033140287688255, 42.769192367296654 ], [ -98.121820287770845, 42.808360367333137 ], [ -98.123117287772061, 42.820223367344184 ], [ -98.144869287792318, 42.835794367358687 ], [ -98.167826287813696, 42.839571367362204 ], [ -98.31033928794642, 42.881794367401525 ], [ -98.39120428802174, 42.920135367437233 ], [ -98.457444288083423, 42.937160367453089 ], [ -98.497651288120878, 42.991778367503954 ], [ -99.253971288825255, 42.992389367504529 ], [ -99.532790289084915, 42.992335367504474 ], [ -100.198142289704577, 42.99109536750332 ], [ -101.231737290667184, 42.986843367499361 ], [ -102.086701291463442, 42.989887367502192 ], [ -102.78838429211693, 42.99530336750724 ], [ -103.005875292319487, 42.999354367511017 ], [ -103.501464292781037, 42.998618367510332 ], [ -104.056199293297666, 43.003062367514467 ], [ -104.056219293297687, 42.614669367152743 ], [ -104.053513293295168, 41.999815366580123 ], [ -104.053615293295266, 41.69821836629923 ], [ -104.055500293297015, 41.564222366174441 ], [ -104.054012293295642, 41.388085366010401 ], [ -104.051705293293494, 41.003211365651964 ], [ -103.57231629284702, 40.999648365648639 ], [ -103.38295629267067, 41.000316365649262 ], [ -102.652271291990161, 40.998124365647222 ], [ -102.621257291961285, 41.000214365649171 ], [ -102.047739291427149, 40.998071365647171 ], [ -102.046992291426449, 40.743130365409741 ], [ -102.046031291425564, 40.697319365367079 ], [ -102.047620291427037, 40.431077365119123 ], [ -102.047545291426971, 40.342644365036762 ], [ -102.051535291430682, 39.998918364716637 ], [ -101.407393290830782, 40.001003364718585 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "New York", "DRAWSEQ": 17, "STATE_FIPS": "36", "SUB_REGION": "Middle Atlantic", "STATE_ABBR": "NY" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -79.763235270673093, 42.267327366829264 ], [ -79.761659270671615, 42.003105366583185 ], [ -79.612367270532573, 42.000585366580836 ], [ -79.059489270017664, 42.001157366581367 ], [ -78.918538269886398, 41.999846366580144 ], [ -78.305088269315078, 41.999420366579756 ], [ -78.204262269221175, 41.998200366578615 ], [ -77.74500826879347, 41.997333366577806 ], [ -77.612847268670379, 41.998829366579201 ], [ -76.968573268070358, 42.002981366583072 ], [ -76.928395268032929, 42.002534366582651 ], [ -76.563915267693488, 42.003011366583095 ], [ -76.145020267303366, 42.000654366580903 ], [ -76.104834267265929, 41.999498366579829 ], [ -75.479732266683769, 41.996367366576905 ], [ -75.382813266593502, 41.998356366578761 ], [ -75.345657266558902, 41.992845366573633 ], [ -75.324066266538793, 41.961275366544228 ], [ -75.283690266501182, 41.947603366531496 ], [ -75.254515266474016, 41.868873366458175 ], [ -75.171284266396498, 41.867839366457204 ], [ -75.148280266375068, 41.855789366445983 ], [ -75.124751266353158, 41.849182366439834 ], [ -75.117777266346664, 41.836986366428476 ], [ -75.079843266311343, 41.814148366407203 ], [ -75.096826266327156, 41.797207366391426 ], [ -75.097155266327462, 41.779041366374507 ], [ -75.06131826629408, 41.77026036636633 ], [ -75.056970266290037, 41.726708366325767 ], [ -75.065401266297883, 41.714836366314714 ], [ -75.051325266284778, 41.637314366242514 ], [ -75.072451266304455, 41.613080366219947 ], [ -75.069865266302045, 41.604478366211936 ], [ -75.025087266260343, 41.565801366175911 ], [ -75.014887266250838, 41.539556366151473 ], [ -74.971788266210709, 41.483602366099362 ], [ -74.932564266174168, 41.48435036610006 ], [ -74.898559266142499, 41.461894366079136 ], [ -74.895279266139454, 41.444671366063105 ], [ -74.864066266110385, 41.447154366065412 ], [ -74.792799266044, 41.429917366049359 ], [ -74.754826266008635, 41.43014636604957 ], [ -74.740040265994864, 41.422059366042042 ], [ -74.74043726599524, 41.401635366023015 ], [ -74.705273265962489, 41.375059365998268 ], [ -74.700062265957641, 41.350573365975464 ], [ -74.371981265652096, 41.195850365831369 ], [ -74.242359265531363, 41.137626365777145 ], [ -74.213038265504068, 41.123611365764091 ], [ -73.89669726520944, 40.998529365647599 ], [ -73.896148265208936, 40.960871365612526 ], [ -73.908966265220869, 40.927314365581275 ], [ -73.922394265233379, 40.88604036554284 ], [ -73.977061265284291, 40.797487365460363 ], [ -74.006260265311482, 40.737730365404715 ], [ -74.006183265311407, 40.704002365373299 ], [ -73.919862265231018, 40.80280436546532 ], [ -73.796346265115986, 40.832334365492812 ], [ -73.780041265100806, 40.886688365543435 ], [ -73.653151264982625, 40.998392365647476 ], [ -73.653724264983154, 41.012617365660716 ], [ -73.725237265049756, 41.100354365742433 ], [ -73.478120264819623, 41.210755365845245 ], [ -73.550259264886805, 41.293620365922422 ], [ -73.544293264881247, 41.365298365989176 ], [ -73.530392264868297, 41.522745366135808 ], [ -73.517147264855964, 41.665686366268936 ], [ -73.4842302648253, 42.047428366624459 ], [ -73.498840264838918, 42.077460366652431 ], [ -73.35082426470106, 42.504755367050379 ], [ -73.25806026461467, 42.746058367275111 ], [ -73.269275264625108, 42.747481367276436 ], [ -73.29616926465016, 42.803549367328657 ], [ -73.279583264634709, 42.837103367359902 ], [ -73.27600526463138, 42.940294367456005 ], [ -73.250071264607229, 43.31085436780112 ], [ -73.238391264596345, 43.512832367989226 ], [ -73.259984264616463, 43.55938236803258 ], [ -73.291402264645725, 43.575033368047158 ], [ -73.28173626463672, 43.593187368064065 ], [ -73.29410426464824, 43.619653368088706 ], [ -73.303534264657017, 43.624714368093422 ], [ -73.363685264713041, 43.614998368084372 ], [ -73.38811426473579, 43.569143368041665 ], [ -73.418320264763921, 43.582479368054095 ], [ -73.42296026476825, 43.632114368100318 ], [ -73.370989264719839, 43.714281368176842 ], [ -73.356669264706511, 43.756558368216218 ], [ -73.358997264708677, 43.778427368236578 ], [ -73.384740264732656, 43.804508368260869 ], [ -73.375121264723688, 43.885977368336739 ], [ -73.405334264751829, 43.914807368363597 ], [ -73.417406264763073, 43.988197368431941 ], [ -73.40825126475454, 44.018222368459902 ], [ -73.43600026478039, 44.04567936848548 ], [ -73.435215264779657, 44.063897368502445 ], [ -73.40875726475501, 44.106610368542221 ], [ -73.407865264754193, 44.136227368569806 ], [ -73.382062264730152, 44.172107368603221 ], [ -73.377332264725752, 44.201247368630362 ], [ -73.305325264658691, 44.260142368685209 ], [ -73.329788264681468, 44.367390368785095 ], [ -73.299995264653731, 44.405533368820613 ], [ -73.293319264647508, 44.432853368846061 ], [ -73.334452264685808, 44.544328368949877 ], [ -73.347812264698263, 44.553971368958862 ], [ -73.371296264720129, 44.579167368982326 ], [ -73.38182526472994, 44.61980736902018 ], [ -73.370136264719051, 44.634349369033721 ], [ -73.373097264721807, 44.661276369058797 ], [ -73.358151264707885, 44.680368369076575 ], [ -73.373158264721866, 44.724236369117435 ], [ -73.326786264678674, 44.799293369187339 ], [ -73.369054264718045, 44.819118369205796 ], [ -73.382306264730389, 44.847933369232635 ], [ -73.336414264687647, 44.932604369311491 ], [ -73.350758264701, 44.981973369357469 ], [ -73.344723264695375, 45.006138369379975 ], [ -74.021539265325714, 44.990847369365738 ], [ -74.736107265991208, 44.992916369367663 ], [ -74.968469266207606, 44.948625369326408 ], [ -75.328862266543254, 44.810629369197898 ], [ -75.75865726694353, 44.51753336892493 ], [ -75.848030267026772, 44.390262368806397 ], [ -76.362881267506253, 44.098354368534537 ], [ -76.296883267444798, 44.042017368482064 ], [ -76.201542267356004, 44.065598368504027 ], [ -76.134522267293576, 44.013229368455256 ], [ -76.129066267288508, 43.932208368379804 ], [ -76.193718267348714, 43.912490368361432 ], [ -76.239992267391813, 43.835127368289392 ], [ -76.205666267359845, 43.68270036814743 ], [ -76.184570267340192, 43.633197368101321 ], [ -76.222764267375766, 43.554153368027713 ], [ -76.454655267591733, 43.500721367977945 ], [ -76.619628267745369, 43.414152367897323 ], [ -76.71847126783743, 43.323442367812845 ], [ -76.736829267854532, 43.34273336783081 ], [ -76.914527268020024, 43.278596367771073 ], [ -77.377316268451025, 43.27571336776839 ], [ -77.5757112686358, 43.241547367736572 ], [ -77.745007268793458, 43.335170367823764 ], [ -77.992009269023498, 43.365571367852077 ], [ -78.464653269463682, 43.37199336785806 ], [ -79.062239270020228, 43.268216367761411 ], [ -79.039325269998898, 43.144739367646409 ], [ -79.061114270019189, 43.090605367595998 ], [ -78.925596269892978, 43.066626367573662 ], [ -78.88279326985311, 43.022357367532436 ], [ -78.936551269903177, 42.974231367487619 ], [ -78.859200269831135, 42.792745367318588 ], [ -79.043752270003012, 42.69924636723151 ], [ -79.142233270094735, 42.574616367115439 ], [ -79.354884270292786, 42.493461367039863 ], [ -79.444020270375788, 42.419361366970847 ], [ -79.763235270673093, 42.267327366829264 ] ] ], [ [ [ -73.752209265074882, 40.594587365271394 ], [ -73.422526264767839, 40.661325365333553 ], [ -72.521164263928384, 40.815041365476716 ], [ -71.918702263367294, 41.030574365677438 ], [ -71.86998626332192, 41.074507365718361 ], [ -71.923700263371956, 41.084871365728006 ], [ -72.077011263514734, 41.000574365649499 ], [ -72.203350263632387, 41.035374365681918 ], [ -72.293082263715959, 41.024017365671341 ], [ -72.476109263886414, 40.920148365574605 ], [ -72.604815264006291, 40.905300365560777 ], [ -72.550971263956143, 40.966180365617475 ], [ -72.416345263830763, 41.026040365673225 ], [ -72.354279263772952, 41.110202365751604 ], [ -72.281149263704847, 41.142535365781711 ], [ -72.317031263738272, 41.149333365788046 ], [ -72.631572264031206, 40.981285365631535 ], [ -73.021269264394135, 40.968433365619575 ], [ -73.140979264505631, 40.951396365603699 ], [ -73.214523264574126, 40.901041365556807 ], [ -73.4306482647754, 40.922556365576838 ], [ -73.478089264819587, 40.879744365536972 ], [ -73.598272264931509, 40.903144365558759 ], [ -73.749477265072343, 40.844998365504608 ], [ -73.753918265076479, 40.788851365452317 ], [ -73.899017265211612, 40.797117365460018 ], [ -73.955607265264305, 40.73938236540625 ], [ -74.027721265331465, 40.639336365313071 ], [ -74.004039265309416, 40.581259365258987 ], [ -73.87981426519373, 40.590269365267375 ], [ -73.915734265227172, 40.631131365305436 ], [ -73.846060265162293, 40.652600365325426 ], [ -73.764935265086734, 40.636933365310838 ], [ -73.761395265083436, 40.618238365293422 ], [ -73.927590265238223, 40.557650365236995 ], [ -73.752209265074882, 40.594587365271394 ] ] ], [ [ [ -73.293059264647269, 40.626382365301012 ], [ -73.24905126460628, 40.62542436530012 ], [ -73.030934264403143, 40.671341365342883 ], [ -72.956315264333654, 40.700038365369608 ], [ -72.764025264154569, 40.758392365423958 ], [ -72.757326264148318, 40.767959365432858 ], [ -72.782199264171496, 40.764133365429302 ], [ -72.876906264259688, 40.737346365404349 ], [ -73.051023264421858, 40.675167365346439 ], [ -73.240437264598256, 40.633076365307247 ], [ -73.291144264645482, 40.633077365307244 ], [ -73.293059264647269, 40.626382365301012 ] ] ], [ [ [ -74.236939265526317, 40.506003365188903 ], [ -74.193642265485991, 40.510562365193145 ], [ -74.122999265420205, 40.544741365224979 ], [ -74.059193265360776, 40.601709365278026 ], [ -74.07286626537352, 40.649563365322599 ], [ -74.166298265460526, 40.624497365299256 ], [ -74.236940265526329, 40.537905365218606 ], [ -74.236939265526317, 40.506003365188903 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Pennsylvania", "DRAWSEQ": 18, "STATE_FIPS": "42", "SUB_REGION": "Middle Atlantic", "STATE_ABBR": "PA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -77.475793268542745, 39.719623364456524 ], [ -77.464433268532161, 39.720073364456944 ], [ -77.221051268305487, 39.72067936445751 ], [ -76.996812268096647, 39.720891364457707 ], [ -76.7904912679045, 39.721256364458043 ], [ -76.569834267698994, 39.72026536445712 ], [ -76.233122267385411, 39.721853364458603 ], [ -76.139223267297965, 39.722229364458954 ], [ -75.791094266973744, 39.723866364460477 ], [ -75.774927266958684, 39.724552364461118 ], [ -75.745592266931368, 39.774929364508033 ], [ -75.694771266884032, 39.820457364550435 ], [ -75.643994266836742, 39.83830636456706 ], [ -75.58344326678035, 39.84011936456875 ], [ -75.469986266674681, 39.826547364556106 ], [ -75.420468266628575, 39.798983364530436 ], [ -75.345932266559146, 39.848516364576568 ], [ -75.253740266473287, 39.845537364573786 ], [ -75.24699526646701, 39.850405364578322 ], [ -75.185605266409837, 39.877405364603476 ], [ -75.14290126637006, 39.881602364607375 ], [ -75.135805266363462, 39.89688736462162 ], [ -75.147158266374035, 39.934740364656868 ], [ -75.13986426636724, 39.955919364676589 ], [ -75.11096326634032, 39.976690364695941 ], [ -75.084587266315751, 39.975732364695048 ], [ -75.068045266300345, 39.985391364704043 ], [ -75.045675266279517, 40.007634364724751 ], [ -74.983485266221592, 40.034073364749375 ], [ -74.956201266196189, 40.05801436477168 ], [ -74.871924266117702, 40.078056364790342 ], [ -74.829022266077743, 40.116161364825828 ], [ -74.746294266000689, 40.124358364833462 ], [ -74.725480265981304, 40.149306364856699 ], [ -74.738824265993742, 40.177725364883166 ], [ -74.842763266090543, 40.248452364949031 ], [ -74.880659266125832, 40.299591364996658 ], [ -74.921150266163536, 40.314033365010111 ], [ -74.932503266174109, 40.333774365028496 ], [ -74.95018826619058, 40.345473365039396 ], [ -74.972841266211688, 40.404448365094318 ], [ -75.000475266237416, 40.408621365098199 ], [ -75.021266266256788, 40.401323365091407 ], [ -75.05745326629048, 40.420171365108956 ], [ -75.070118266302273, 40.45625436514257 ], [ -75.063679266296276, 40.521003365202873 ], [ -75.079786266311288, 40.545356365225544 ], [ -75.124526266352945, 40.564798365243654 ], [ -75.182282266406744, 40.556799365236202 ], [ -75.197572266420977, 40.570684365249136 ], [ -75.193513266417199, 40.583768365261321 ], [ -75.200387266423604, 40.614743365290167 ], [ -75.197938266421318, 40.634205365308297 ], [ -75.208917266431541, 40.65073836532369 ], [ -75.184060266408395, 40.669792365341436 ], [ -75.205355266428228, 40.686061365356593 ], [ -75.187754266411844, 40.723857365391794 ], [ -75.193644266417323, 40.748003365414277 ], [ -75.170313266395596, 40.774809365439239 ], [ -75.130319266358342, 40.772707365437284 ], [ -75.100541266330609, 40.791659365454933 ], [ -75.089211266320063, 40.821390365482628 ], [ -75.099542266329678, 40.839285365499293 ], [ -75.054619266287844, 40.855673365514555 ], [ -75.056488266289591, 40.8720453655298 ], [ -75.073685266305603, 40.884626365541521 ], [ -75.079736266311244, 40.903348365558955 ], [ -75.135525266363189, 40.962936365614453 ], [ -75.139302266366713, 40.977527365628035 ], [ -75.11661926634558, 41.000248365649199 ], [ -75.069979266302155, 41.010716365658951 ], [ -75.035256266269812, 41.028203365675239 ], [ -75.001151266238054, 41.062485365707161 ], [ -74.966291266205587, 41.082676365725966 ], [ -74.988883266226622, 41.081761365725114 ], [ -74.984595266222627, 41.099380365741524 ], [ -74.949994266190402, 41.111854365753146 ], [ -74.914768266157594, 41.141105365780383 ], [ -74.862886266109285, 41.20677136584154 ], [ -74.866411266112564, 41.226817365860214 ], [ -74.825196266074173, 41.282706365912262 ], [ -74.794143266045253, 41.295214365923911 ], [ -74.791663266042946, 41.311964365939509 ], [ -74.700062265957641, 41.350573365975464 ], [ -74.705273265962489, 41.375059365998268 ], [ -74.74043726599524, 41.401635366023015 ], [ -74.740040265994864, 41.422059366042042 ], [ -74.754826266008635, 41.43014636604957 ], [ -74.792799266044, 41.429917366049359 ], [ -74.864066266110385, 41.447154366065412 ], [ -74.895279266139454, 41.444671366063105 ], [ -74.898559266142499, 41.461894366079136 ], [ -74.932564266174168, 41.48435036610006 ], [ -74.971788266210709, 41.483602366099362 ], [ -75.014887266250838, 41.539556366151473 ], [ -75.025087266260343, 41.565801366175911 ], [ -75.069865266302045, 41.604478366211936 ], [ -75.072451266304455, 41.613080366219947 ], [ -75.051325266284778, 41.637314366242514 ], [ -75.065401266297883, 41.714836366314714 ], [ -75.056970266290037, 41.726708366325767 ], [ -75.06131826629408, 41.77026036636633 ], [ -75.097155266327462, 41.779041366374507 ], [ -75.096826266327156, 41.797207366391426 ], [ -75.079843266311343, 41.814148366407203 ], [ -75.117777266346664, 41.836986366428476 ], [ -75.124751266353158, 41.849182366439834 ], [ -75.148280266375068, 41.855789366445983 ], [ -75.171284266396498, 41.867839366457204 ], [ -75.254515266474016, 41.868873366458175 ], [ -75.283690266501182, 41.947603366531496 ], [ -75.324066266538793, 41.961275366544228 ], [ -75.345657266558902, 41.992845366573633 ], [ -75.382813266593502, 41.998356366578761 ], [ -75.479732266683769, 41.996367366576905 ], [ -76.104834267265929, 41.999498366579829 ], [ -76.145020267303366, 42.000654366580903 ], [ -76.563915267693488, 42.003011366583095 ], [ -76.928395268032929, 42.002534366582651 ], [ -76.968573268070358, 42.002981366583072 ], [ -77.612847268670379, 41.998829366579201 ], [ -77.74500826879347, 41.997333366577806 ], [ -78.204262269221175, 41.998200366578615 ], [ -78.305088269315078, 41.999420366579756 ], [ -78.918538269886398, 41.999846366580144 ], [ -79.059489270017664, 42.001157366581367 ], [ -79.612367270532573, 42.000585366580836 ], [ -79.761659270671615, 42.003105366583185 ], [ -79.763235270673093, 42.267327366829264 ], [ -80.520592271378433, 41.986872366568065 ], [ -80.522644271380344, 41.850774366441314 ], [ -80.523925271381529, 41.495102366110068 ], [ -80.519996271377877, 41.489288366104653 ], [ -80.522932271380611, 41.129627365769693 ], [ -80.520924271378732, 40.897270365553297 ], [ -80.520306271378161, 40.854168365513154 ], [ -80.521999271379741, 40.637203365311088 ], [ -80.52435727138193, 40.478784365163548 ], [ -80.523564271381204, 40.403033365092995 ], [ -80.526045271383509, 40.162521364869008 ], [ -80.524962271382506, 40.022825364738907 ], [ -80.524650271382214, 39.958419364678917 ], [ -80.524269271381854, 39.721209364458005 ], [ -80.429082271293211, 39.719842364456724 ], [ -79.918268270817478, 39.721667364458426 ], [ -79.765132270674854, 39.721807364458556 ], [ -79.480971270410208, 39.720274364457126 ], [ -79.396610270331635, 39.719313364456241 ], [ -78.930173269897239, 39.722337364459051 ], [ -78.817758269792549, 39.723115364459773 ], [ -78.384783269389303, 39.723748364460363 ], [ -78.334550269342515, 39.724096364460692 ], [ -78.095948269120299, 39.725461364461964 ], [ -77.475793268542745, 39.719623364456524 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Connecticut", "DRAWSEQ": 19, "STATE_FIPS": "09", "SUB_REGION": "New England", "STATE_ABBR": "CT" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -73.530392264868297, 41.522745366135808 ], [ -73.544293264881247, 41.365298365989176 ], [ -73.550259264886805, 41.293620365922422 ], [ -73.478120264819623, 41.210755365845245 ], [ -73.725237265049756, 41.100354365742433 ], [ -73.653724264983154, 41.012617365660716 ], [ -73.653151264982625, 40.998392365647476 ], [ -73.104418264471576, 41.161039365798949 ], [ -72.906734264287465, 41.270063365900484 ], [ -72.527245263934049, 41.263702365894559 ], [ -72.378153263795198, 41.278102365907969 ], [ -72.37841226379544, 41.358348365982707 ], [ -72.326355263746947, 41.289641365918719 ], [ -72.281416263705097, 41.281145365910803 ], [ -71.866678263318846, 41.322769365949569 ], [ -71.847772263301238, 41.325348365951967 ], [ -71.836869263291078, 41.34196136596745 ], [ -71.845995263299585, 41.403854366025087 ], [ -71.802743263259302, 41.415829366036235 ], [ -71.790194263247614, 41.601307366208978 ], [ -71.792605263249854, 41.641758366246648 ], [ -71.788249263245802, 41.721603366321013 ], [ -71.797831263254722, 42.004274366584269 ], [ -71.802340263258927, 42.017977366597037 ], [ -72.094971263531463, 42.025799366604318 ], [ -72.13634626356999, 42.026402366604884 ], [ -72.507572263915719, 42.030766366608944 ], [ -72.571226263975007, 42.030125366608345 ], [ -72.581907263984959, 42.021607366600414 ], [ -72.607825264009094, 42.02280036660153 ], [ -72.609526264010668, 42.030536366608729 ], [ -72.755894264146988, 42.033847366611809 ], [ -72.76757526415787, 42.002167366582313 ], [ -72.817679264204529, 41.997185366577668 ], [ -72.816451264203394, 42.033507366611502 ], [ -73.006095264380008, 42.036009366613825 ], [ -73.045632264416824, 42.036310366614103 ], [ -73.4842302648253, 42.047428366624459 ], [ -73.517147264855964, 41.665686366268936 ], [ -73.530392264868297, 41.522745366135808 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Rhode Island", "DRAWSEQ": 20, "STATE_FIPS": "44", "SUB_REGION": "New England", "STATE_ABBR": "RI" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -71.790194263247614, 41.601307366208978 ], [ -71.802743263259302, 41.415829366036235 ], [ -71.845995263299585, 41.403854366025087 ], [ -71.836869263291078, 41.34196136596745 ], [ -71.847772263301238, 41.325348365951967 ], [ -71.866678263318846, 41.322769365949569 ], [ -71.722264263184343, 41.327264365953752 ], [ -71.489888262967924, 41.392085366014129 ], [ -71.427318262909651, 41.486689366102233 ], [ -71.419247262902147, 41.652212366256393 ], [ -71.36901226285535, 41.703291366303958 ], [ -71.393580262878231, 41.761155366357855 ], [ -71.367387262853839, 41.741350366339404 ], [ -71.284001262776187, 41.679549366281847 ], [ -71.228976262724942, 41.707694366308061 ], [ -71.266628262760008, 41.749743366347218 ], [ -71.31932826280908, 41.77219536636813 ], [ -71.339798262828154, 41.784425366379523 ], [ -71.34548326283344, 41.813161366406284 ], [ -71.334542262823248, 41.857903366447957 ], [ -71.342493262830658, 41.875783366464603 ], [ -71.333086262821894, 41.896031366483463 ], [ -71.383953262869269, 41.888439366476391 ], [ -71.382405262867834, 41.979263366560978 ], [ -71.378644262864327, 42.013713366593066 ], [ -71.497430262974959, 42.009253366588908 ], [ -71.797831263254722, 42.004274366584269 ], [ -71.788249263245802, 41.721603366321013 ], [ -71.792605263249854, 41.641758366246648 ], [ -71.790194263247614, 41.601307366208978 ] ] ], [ [ [ -71.198808262696843, 41.678500366280872 ], [ -71.199937262697887, 41.463318366080472 ], [ -71.117132262620771, 41.49306236610817 ], [ -71.141212262643194, 41.655273366259237 ], [ -71.198808262696843, 41.678500366280872 ] ] ], [ [ [ -71.269169262762375, 41.621268366227568 ], [ -71.349525262837204, 41.445857366064203 ], [ -71.288007262779914, 41.483619366099376 ], [ -71.238673262733968, 41.474849366091206 ], [ -71.219447262716059, 41.635642366240958 ], [ -71.269169262762375, 41.621268366227568 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "New Jersey", "DRAWSEQ": 21, "STATE_FIPS": "34", "SUB_REGION": "Middle Atlantic", "STATE_ABBR": "NJ" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -75.48928026669266, 39.714858364452084 ], [ -75.570234266768054, 39.617735364361636 ], [ -75.516689266718188, 39.56656836431398 ], [ -75.552763266751782, 39.490514364243154 ], [ -75.4156722666241, 39.374971364135547 ], [ -75.119958266348704, 39.184691363958329 ], [ -75.014407266250402, 39.198363363971062 ], [ -74.916654266159355, 39.170638363945244 ], [ -74.890202266134722, 39.113860363892364 ], [ -74.968125266207295, 38.971738363760004 ], [ -74.876301266121772, 38.956682363745983 ], [ -74.879253266124522, 38.989843363776863 ], [ -74.802292266052845, 39.02637336381089 ], [ -74.624587265887342, 39.250828364019924 ], [ -74.622527265885424, 39.281632364048619 ], [ -74.658234265918679, 39.287251364053844 ], [ -74.447501265722423, 39.381075364141225 ], [ -74.460418265734447, 39.426756364183774 ], [ -74.401119265679228, 39.50262736425443 ], [ -74.412388265689728, 39.542621364291676 ], [ -74.328850265611919, 39.523627364273992 ], [ -74.323342265606797, 39.572086364319119 ], [ -74.237675265527002, 39.624046364367516 ], [ -74.171427265465312, 39.718274364455269 ], [ -74.159228265453947, 39.878605364604589 ], [ -74.077333265377675, 40.042273364757015 ], [ -74.122180265419445, 40.051561364765661 ], [ -74.04979026535203, 40.056856364770596 ], [ -74.034294265337593, 40.091367364802736 ], [ -74.08377326538367, 40.088181364799766 ], [ -74.091426265390808, 40.116085364825757 ], [ -74.039231265342195, 40.101842364812498 ], [ -73.97844026528557, 40.323616365019035 ], [ -74.121885265419166, 40.451458365138095 ], [ -74.224503265514741, 40.443584365130761 ], [ -74.268915265556103, 40.463748365149542 ], [ -74.278910265565415, 40.514303365196625 ], [ -74.208253265499607, 40.591187365268233 ], [ -74.146858265442432, 40.675479365346732 ], [ -74.115531265413253, 40.705626365374812 ], [ -74.129058265425854, 40.647072365320284 ], [ -74.006183265311407, 40.704002365373299 ], [ -74.006260265311482, 40.737730365404715 ], [ -73.977061265284291, 40.797487365460363 ], [ -73.922394265233379, 40.88604036554284 ], [ -73.908966265220869, 40.927314365581275 ], [ -73.896148265208936, 40.960871365612526 ], [ -73.89669726520944, 40.998529365647599 ], [ -74.213038265504068, 41.123611365764091 ], [ -74.242359265531363, 41.137626365777145 ], [ -74.371981265652096, 41.195850365831369 ], [ -74.700062265957641, 41.350573365975464 ], [ -74.791663266042946, 41.311964365939509 ], [ -74.794143266045253, 41.295214365923911 ], [ -74.825196266074173, 41.282706365912262 ], [ -74.866411266112564, 41.226817365860214 ], [ -74.862886266109285, 41.20677136584154 ], [ -74.914768266157594, 41.141105365780383 ], [ -74.949994266190402, 41.111854365753146 ], [ -74.984595266222627, 41.099380365741524 ], [ -74.988883266226622, 41.081761365725114 ], [ -74.966291266205587, 41.082676365725966 ], [ -75.001151266238054, 41.062485365707161 ], [ -75.035256266269812, 41.028203365675239 ], [ -75.069979266302155, 41.010716365658951 ], [ -75.11661926634558, 41.000248365649199 ], [ -75.139302266366713, 40.977527365628035 ], [ -75.135525266363189, 40.962936365614453 ], [ -75.079736266311244, 40.903348365558955 ], [ -75.073685266305603, 40.884626365541521 ], [ -75.056488266289591, 40.8720453655298 ], [ -75.054619266287844, 40.855673365514555 ], [ -75.099542266329678, 40.839285365499293 ], [ -75.089211266320063, 40.821390365482628 ], [ -75.100541266330609, 40.791659365454933 ], [ -75.130319266358342, 40.772707365437284 ], [ -75.170313266395596, 40.774809365439239 ], [ -75.193644266417323, 40.748003365414277 ], [ -75.187754266411844, 40.723857365391794 ], [ -75.205355266428228, 40.686061365356593 ], [ -75.184060266408395, 40.669792365341436 ], [ -75.208917266431541, 40.65073836532369 ], [ -75.197938266421318, 40.634205365308297 ], [ -75.200387266423604, 40.614743365290167 ], [ -75.193513266417199, 40.583768365261321 ], [ -75.197572266420977, 40.570684365249136 ], [ -75.182282266406744, 40.556799365236202 ], [ -75.124526266352945, 40.564798365243654 ], [ -75.079786266311288, 40.545356365225544 ], [ -75.063679266296276, 40.521003365202873 ], [ -75.070118266302273, 40.45625436514257 ], [ -75.05745326629048, 40.420171365108956 ], [ -75.021266266256788, 40.401323365091407 ], [ -75.000475266237416, 40.408621365098199 ], [ -74.972841266211688, 40.404448365094318 ], [ -74.95018826619058, 40.345473365039396 ], [ -74.932503266174109, 40.333774365028496 ], [ -74.921150266163536, 40.314033365010111 ], [ -74.880659266125832, 40.299591364996658 ], [ -74.842763266090543, 40.248452364949031 ], [ -74.738824265993742, 40.177725364883166 ], [ -74.725480265981304, 40.149306364856699 ], [ -74.746294266000689, 40.124358364833462 ], [ -74.829022266077743, 40.116161364825828 ], [ -74.871924266117702, 40.078056364790342 ], [ -74.956201266196189, 40.05801436477168 ], [ -74.983485266221592, 40.034073364749375 ], [ -75.045675266279517, 40.007634364724751 ], [ -75.068045266300345, 39.985391364704043 ], [ -75.084587266315751, 39.975732364695048 ], [ -75.11096326634032, 39.976690364695941 ], [ -75.13986426636724, 39.955919364676589 ], [ -75.147158266374035, 39.934740364656868 ], [ -75.135805266363462, 39.89688736462162 ], [ -75.14290126637006, 39.881602364607375 ], [ -75.185605266409837, 39.877405364603476 ], [ -75.24699526646701, 39.850405364578322 ], [ -75.253740266473287, 39.845537364573786 ], [ -75.345932266559146, 39.848516364576568 ], [ -75.420468266628575, 39.798983364530436 ], [ -75.411754266620449, 39.789770364521857 ], [ -75.427647266635248, 39.77824336451112 ], [ -75.460394266665759, 39.763362364497254 ], [ -75.474768266679135, 39.741832364477204 ], [ -75.475974266680268, 39.720084364456952 ], [ -75.48928026669266, 39.714858364452084 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Indiana", "DRAWSEQ": 22, "STATE_FIPS": "18", "SUB_REGION": "East North Central", "STATE_ABBR": "IN" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -86.341606276799666, 38.177288363020111 ], [ -86.297674276758755, 38.150304362994987 ], [ -86.291440276752951, 38.078489362928096 ], [ -86.277699276740151, 38.05817336290918 ], [ -86.252155276716366, 38.040721362892924 ], [ -86.190621276659058, 38.01775836287154 ], [ -86.104986276579297, 38.011336362865563 ], [ -86.05271527653062, 37.966784362824065 ], [ -86.031620276510978, 37.992950362848433 ], [ -86.006663276487728, 38.001767362856647 ], [ -85.958582276442954, 38.011840362866025 ], [ -85.930872276417148, 38.034049362886712 ], [ -85.914751276402129, 38.064874362915418 ], [ -85.912074276399636, 38.18000136302264 ], [ -85.852335276344007, 38.238561363077181 ], [ -85.839907276332426, 38.276291363112321 ], [ -85.806551276301363, 38.286179363121526 ], [ -85.786211276282415, 38.282391363117995 ], [ -85.74692627624583, 38.270315363106747 ], [ -85.681389276184802, 38.300953363135285 ], [ -85.6542282761595, 38.337753363169554 ], [ -85.643593276149602, 38.383688363212343 ], [ -85.612640276120771, 38.446670363270997 ], [ -85.507200276022573, 38.471419363294046 ], [ -85.466382275984557, 38.518175363337591 ], [ -85.432370275952877, 38.537016363355136 ], [ -85.41746127593899, 38.561475363377916 ], [ -85.424404275945463, 38.584840363399678 ], [ -85.453679275972732, 38.694674363501967 ], [ -85.446690275966219, 38.724840363530063 ], [ -85.418186275939675, 38.738417363542709 ], [ -85.335009275862205, 38.73700636354139 ], [ -85.271394275802962, 38.744376363548255 ], [ -85.205162275741273, 38.695817363503032 ], [ -85.160933275700089, 38.695176363502434 ], [ -85.119657275661638, 38.71413936352009 ], [ -85.068454275613959, 38.75042436355389 ], [ -85.025073275573561, 38.764291363566798 ], [ -84.975611275527484, 38.780641363582028 ], [ -84.818780275381428, 38.793410363593921 ], [ -84.824426275386685, 38.834463363632153 ], [ -84.787446275352252, 38.866643363662121 ], [ -84.78866727535339, 38.884385363678646 ], [ -84.803224275366944, 38.897190363690569 ], [ -84.859743275419575, 38.902042363695088 ], [ -84.875254275434031, 38.90943136370197 ], [ -84.875880275434611, 38.927604363718899 ], [ -84.846316275407077, 38.95463136374407 ], [ -84.834444275396024, 38.98277536377028 ], [ -84.844225275405122, 39.005831363791756 ], [ -84.876293275434989, 39.032895363816962 ], [ -84.889996275447757, 39.050648363833488 ], [ -84.88670827544469, 39.065045363846906 ], [ -84.827861275389893, 39.103687363882891 ], [ -84.811480275374635, 39.102585363881865 ], [ -84.812070275375177, 39.303029364068543 ], [ -84.812025275375134, 39.312333364077205 ], [ -84.811105275374288, 39.513163364264244 ], [ -84.811037275374218, 39.56405036431164 ], [ -84.808696275372043, 39.733299364469261 ], [ -84.806149275369663, 39.917166364640501 ], [ -84.803564275367265, 40.013990364730674 ], [ -84.795388275359642, 40.319500365015202 ], [ -84.794556275358872, 40.35305036504645 ], [ -84.793252275357659, 40.588738365265954 ], [ -84.793061275357474, 40.72886036539645 ], [ -84.791023275355585, 40.93770836559095 ], [ -84.790527275355117, 40.988341365638107 ], [ -84.791586275356096, 41.253132365884717 ], [ -84.790975275355535, 41.283818365913291 ], [ -84.791897275356391, 41.427899366047484 ], [ -84.791370275355902, 41.530492366143029 ], [ -84.79037727535497, 41.697494366298557 ], [ -84.788478275353214, 41.760959366357667 ], [ -84.826008275388162, 41.761875366358524 ], [ -85.193140275730073, 41.762867366359444 ], [ -85.297209275827001, 41.763581366360114 ], [ -85.65945927616437, 41.762627366359219 ], [ -85.799227276294545, 41.763535366360067 ], [ -86.06830227654514, 41.76462836636108 ], [ -86.234565276699982, 41.764864366361309 ], [ -86.525181276970642, 41.765540366361932 ], [ -86.834829277259018, 41.765504366361895 ], [ -86.94246027735926, 41.71650336631626 ], [ -87.233854277630641, 41.626188366232157 ], [ -87.394746277780484, 41.634191366239605 ], [ -87.441974277824471, 41.658113366261887 ], [ -87.419307277803355, 41.676366366278884 ], [ -87.463711277844709, 41.671624366274472 ], [ -87.529906277906363, 41.723626366322897 ], [ -87.532686277908951, 41.469750366086458 ], [ -87.532484277908765, 41.30133836592961 ], [ -87.531765277908093, 41.173790365810824 ], [ -87.532052277908363, 41.009963365658251 ], [ -87.532696277908954, 40.745448365411903 ], [ -87.537191277913152, 40.494646365178326 ], [ -87.535695277911756, 40.483282365167739 ], [ -87.535357277911444, 40.166231364872459 ], [ -87.53579327791185, 39.887339364612721 ], [ -87.535597277911663, 39.609376364353849 ], [ -87.538589277914454, 39.477483364231013 ], [ -87.540237277915978, 39.350562364112811 ], [ -87.597688277969496, 39.338305364101394 ], [ -87.625262277995176, 39.307441364072652 ], [ -87.610643277981552, 39.297699364063575 ], [ -87.615824277986377, 39.281456364048452 ], [ -87.606920277978091, 39.258202364026793 ], [ -87.584588277957295, 39.248791364018032 ], [ -87.588617277961035, 39.208505363980507 ], [ -87.59423227796627, 39.198167363970882 ], [ -87.607950277979043, 39.196107363968963 ], [ -87.644282278012881, 39.168546363943292 ], [ -87.670352278037157, 39.146719363922969 ], [ -87.659480278027033, 39.130693363908037 ], [ -87.662287278029652, 39.113509363892035 ], [ -87.631693278001165, 39.103983363883167 ], [ -87.630892278000417, 39.089015363869223 ], [ -87.612031277982851, 39.084647363865159 ], [ -87.585343277957989, 39.062477363844508 ], [ -87.58177227795467, 38.995785363782403 ], [ -87.591881277964077, 38.99412636378085 ], [ -87.547927277923151, 38.97712036376501 ], [ -87.533492277909701, 38.963746363752563 ], [ -87.530204277906634, 38.931963363722957 ], [ -87.539222277915044, 38.904905363697758 ], [ -87.559081277933529, 38.869856363665122 ], [ -87.550529277925563, 38.857936363654019 ], [ -87.507909277885872, 38.795605363595968 ], [ -87.519048277896246, 38.776745363578399 ], [ -87.508023277885982, 38.769768363571899 ], [ -87.508336277886272, 38.736680363541083 ], [ -87.543913277919401, 38.686021363493907 ], [ -87.58850127796093, 38.672215363481051 ], [ -87.625215277995125, 38.642858363453712 ], [ -87.62867127799835, 38.62296436343518 ], [ -87.619851277990136, 38.599256363413105 ], [ -87.640619278009467, 38.593225363407484 ], [ -87.652880278020888, 38.573919363389507 ], [ -87.672969278039602, 38.547471363364878 ], [ -87.651415278019527, 38.515417363335018 ], [ -87.653559278021518, 38.50049036332112 ], [ -87.679935278046088, 38.504053363324438 ], [ -87.692844278058104, 38.481580363303507 ], [ -87.756124278117042, 38.466172363289161 ], [ -87.758688278119436, 38.45714336328075 ], [ -87.738980278101081, 38.445527363269932 ], [ -87.748456278109899, 38.418011363244304 ], [ -87.784048278143047, 38.378170363207204 ], [ -87.834533278190065, 38.352570363183361 ], [ -87.850112278204577, 38.286144363121494 ], [ -87.863036278216612, 38.285408363120808 ], [ -87.874069278226884, 38.316834363150079 ], [ -87.883476278235648, 38.315598363148922 ], [ -87.888496278240325, 38.300705363135052 ], [ -87.914139278264201, 38.281094363116793 ], [ -87.91368127826378, 38.302392363136626 ], [ -87.925950278275209, 38.304818363138885 ], [ -87.980050278325592, 38.241131363079575 ], [ -87.986040278331174, 38.234860363073736 ], [ -87.97796027832365, 38.200760363041972 ], [ -87.932319278281142, 38.171177363014422 ], [ -87.932021278280857, 38.157573363001752 ], [ -87.950599278298156, 38.136959362982552 ], [ -87.973534278319519, 38.131805362977758 ], [ -88.018579278361472, 38.103348362951252 ], [ -88.012361278355684, 38.092392362941048 ], [ -87.964897278311483, 38.096794362945147 ], [ -87.975326278321191, 38.073352362923316 ], [ -88.03476127837655, 38.054130362905411 ], [ -88.043123278384329, 38.045166362897064 ], [ -88.041506278382826, 38.038349362890713 ], [ -88.021729278364404, 38.033577362886277 ], [ -88.029244278371408, 38.008281362862718 ], [ -88.021737278364412, 37.975101362831808 ], [ -88.042543278383789, 37.956310362814307 ], [ -88.041803278383099, 37.934543362794038 ], [ -88.06465427840439, 37.92982836278965 ], [ -88.07897527841773, 37.944045362802889 ], [ -88.084033278422439, 37.923705362783949 ], [ -88.030473278372554, 37.917636362778296 ], [ -88.026620278368966, 37.905803362767273 ], [ -88.044900278385981, 37.896049362758191 ], [ -88.100116278437412, 37.906215362767654 ], [ -88.101490278438689, 37.895351362757538 ], [ -88.075770278414737, 37.867854362731933 ], [ -88.034272278376093, 37.843791362709524 ], [ -88.04216927838344, 37.82756736269441 ], [ -88.089297278427338, 37.831294362697882 ], [ -88.086062278424322, 37.817657362685182 ], [ -88.035607278377327, 37.805728362674074 ], [ -88.01122327835462, 37.801352362669995 ], [ -87.958738278305745, 37.776224362646595 ], [ -87.93961027828793, 37.799551362668318 ], [ -87.920170278269822, 37.809728362677795 ], [ -87.910228278260561, 37.838613362704699 ], [ -87.936849278285351, 37.875223362738794 ], [ -87.934484278283151, 37.904204362765782 ], [ -87.921895278271435, 37.919909362780409 ], [ -87.899036278250136, 37.92459736278478 ], [ -87.857187278211171, 37.890947362753437 ], [ -87.823647278179934, 37.878255362741612 ], [ -87.753782278114869, 37.898128362760126 ], [ -87.728200278091037, 37.894585362756828 ], [ -87.709408278073539, 37.899754362761641 ], [ -87.679721278045889, 37.89704936275912 ], [ -87.684717278050542, 37.836372362702612 ], [ -87.651696278019784, 37.828175362694978 ], [ -87.607588277978707, 37.843819362709546 ], [ -87.59363427796572, 37.864910362729191 ], [ -87.59471827796672, 37.890766362753268 ], [ -87.627137277996923, 37.923454362783716 ], [ -87.604325277975676, 37.971157362828137 ], [ -87.504803277882985, 37.915627362776419 ], [ -87.452288277834072, 37.936520362795882 ], [ -87.387550277773784, 37.934969362794433 ], [ -87.310559277702083, 37.893718362756019 ], [ -87.272746277666869, 37.870819362734693 ], [ -87.226762277624033, 37.849118362714478 ], [ -87.17578027757655, 37.838640362704723 ], [ -87.158080277560074, 37.82696736269385 ], [ -87.131879277535674, 37.789736362659177 ], [ -87.106427277511969, 37.784251362654068 ], [ -87.071308277479261, 37.807136362675379 ], [ -87.036480277446827, 37.908005362769323 ], [ -87.013156277425097, 37.924764362784927 ], [ -86.989031277402631, 37.930616362790381 ], [ -86.931573277349116, 37.938040362797295 ], [ -86.900078277319793, 37.95369736281188 ], [ -86.863272277285517, 37.986920362842824 ], [ -86.82630727725109, 37.991559362847141 ], [ -86.8028152772292, 37.978800362835258 ], [ -86.75382527718358, 37.898359362760345 ], [ -86.728876277160339, 37.894621362756858 ], [ -86.689126277123322, 37.911853362772902 ], [ -86.668655277104264, 37.913196362774158 ], [ -86.66030827709649, 37.902573362764265 ], [ -86.67067027710614, 37.860641362725211 ], [ -86.665924277101723, 37.847381362712866 ], [ -86.645568277082759, 37.846000362711578 ], [ -86.61478227705409, 37.857975362722726 ], [ -86.598310277038749, 37.921072362781494 ], [ -86.58178427702336, 37.925665362785772 ], [ -86.541087276985451, 37.921515362781903 ], [ -86.522738276968369, 37.927871362787826 ], [ -86.516901276962926, 37.94224236280121 ], [ -86.530848276975917, 37.987477362843336 ], [ -86.52783427697311, 38.018693362872412 ], [ -86.519091276964971, 38.047048362898821 ], [ -86.503114276950086, 38.051648362903101 ], [ -86.458367276908419, 38.059161362910103 ], [ -86.442467276893609, 38.075995362925781 ], [ -86.442521276893658, 38.088698362937606 ], [ -86.474337276923293, 38.111707362959038 ], [ -86.464846276914443, 38.129156362975287 ], [ -86.452524276902977, 38.129755362975843 ], [ -86.40718127686074, 38.108218362955782 ], [ -86.393677276848166, 38.12329436296983 ], [ -86.344039276801936, 38.134270362980047 ], [ -86.335418276793902, 38.144028362989133 ], [ -86.343124276801092, 38.155559362999881 ], [ -86.387101276842046, 38.168021363011484 ], [ -86.388307276843165, 38.194808363036429 ], [ -86.364350276820858, 38.193290363035018 ], [ -86.341606276799666, 38.177288363020111 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Nevada", "DRAWSEQ": 23, "STATE_FIPS": "32", "SUB_REGION": "Mountain", "STATE_ABBR": "NV" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -119.152450307357157, 38.411801363238524 ], [ -118.417419306672599, 37.886676362749455 ], [ -117.83868630613361, 37.457298362349569 ], [ -117.160423305501936, 36.959594361886047 ], [ -115.88576930431482, 36.001226360993499 ], [ -115.626197304073074, 35.795698360802085 ], [ -114.62106830313698, 34.99891436006002 ], [ -114.633780303148811, 35.041863360100024 ], [ -114.595632303113291, 35.076058360131867 ], [ -114.635909303150797, 35.118655360171537 ], [ -114.626441303141974, 35.133906360185748 ], [ -114.582616303101162, 35.132560360184485 ], [ -114.572255303091509, 35.14006736019148 ], [ -114.561040303081072, 35.17434636022341 ], [ -114.559583303079705, 35.220183360266091 ], [ -114.587890303106079, 35.304768360344866 ], [ -114.589584303107642, 35.358378360394795 ], [ -114.645396303159629, 35.450760360480835 ], [ -114.672215303184601, 35.515754360541365 ], [ -114.649792303163736, 35.546637360570131 ], [ -114.653134303166837, 35.5848333606057 ], [ -114.639866303154491, 35.611348360630394 ], [ -114.65406630316771, 35.646584360663212 ], [ -114.66848630318114, 35.656399360672353 ], [ -114.665091303177974, 35.693099360706533 ], [ -114.688820303200075, 35.732595360743318 ], [ -114.68273930319441, 35.764703360773218 ], [ -114.689867303201055, 35.847442360850273 ], [ -114.662462303175516, 35.870960360872175 ], [ -114.661600303174723, 35.880473360881041 ], [ -114.699276303209814, 35.911612360910041 ], [ -114.736212303244201, 35.987648360980856 ], [ -114.717673303226945, 36.036758361026585 ], [ -114.728966303237456, 36.058753361047074 ], [ -114.728150303236703, 36.085962361072419 ], [ -114.712761303222379, 36.105181361090317 ], [ -114.621610303137487, 36.141966361124574 ], [ -114.598935303116363, 36.138335361121193 ], [ -114.530573303052705, 36.155090361136793 ], [ -114.466613302993125, 36.124711361108503 ], [ -114.443945302972026, 36.121053361105098 ], [ -114.380803302913208, 36.150991361132981 ], [ -114.344234302879158, 36.137480361120396 ], [ -114.316095302852943, 36.111438361096141 ], [ -114.30385730284155, 36.087108361073483 ], [ -114.307587302845022, 36.062233361050318 ], [ -114.233472302775994, 36.01833136100943 ], [ -114.206769302751127, 36.017255361008424 ], [ -114.129023302678718, 36.04173036103122 ], [ -114.107775302658936, 36.121090361105132 ], [ -114.045105302600561, 36.193978361173009 ], [ -114.037392302593389, 36.216023361193542 ], [ -114.043716302599279, 36.84184936177639 ], [ -114.043939302599483, 36.996538361920457 ], [ -114.047260302602581, 37.598478362481053 ], [ -114.047273302602591, 38.137652362983204 ], [ -114.045090302600556, 38.571095363386874 ], [ -114.044267302599792, 38.678996363487364 ], [ -114.040105302595904, 39.538685364288014 ], [ -114.039844302595668, 39.908778364632688 ], [ -114.038108302594054, 40.111046364821064 ], [ -114.038151302594088, 40.997686365646814 ], [ -114.039072302594946, 41.995391366576001 ], [ -114.269471302809535, 41.995924366576496 ], [ -115.02486330351303, 41.996506366577037 ], [ -115.947544304372343, 41.994599366575258 ], [ -116.992313305345363, 41.994794366575448 ], [ -117.018864305370101, 41.994794366575448 ], [ -118.18531730645644, 41.996637366577161 ], [ -119.31094230750476, 41.989135366570167 ], [ -119.35169230754272, 41.988853366569913 ], [ -119.993459308140402, 41.989205366570239 ], [ -119.996324308143073, 41.177566365814343 ], [ -119.996165308142935, 39.720610364457443 ], [ -119.996011308142783, 39.443501364199363 ], [ -119.995304308142124, 39.311545364076473 ], [ -119.995527308142329, 39.15871336393414 ], [ -119.994541308141407, 39.106131363885169 ], [ -119.995150308141973, 39.063491363845458 ], [ -119.99525430814208, 38.99410636378083 ], [ -119.889341308043441, 38.922251363713912 ], [ -119.575687307751323, 38.702910363509638 ], [ -119.3188253075121, 38.52710836334591 ], [ -119.152450307357157, 38.411801363238524 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Utah", "DRAWSEQ": 24, "STATE_FIPS": "49", "SUB_REGION": "Mountain", "STATE_ABBR": "UT" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -114.047273302602591, 38.137652362983204 ], [ -114.047260302602581, 37.598478362481053 ], [ -114.043939302599483, 36.996538361920457 ], [ -112.899983301534093, 36.996227361920162 ], [ -112.542521301201177, 36.997994361921812 ], [ -112.237258300916878, 36.995492361919474 ], [ -111.356164300096296, 37.001709361925265 ], [ -110.740063299522504, 37.002488361925998 ], [ -110.484089299284108, 37.003926361927334 ], [ -110.452236299254452, 36.991746361915986 ], [ -109.997076298830549, 36.992067361916291 ], [ -109.048480297947094, 36.996641361920553 ], [ -109.045602297944413, 37.630820362511173 ], [ -109.043206297942191, 37.887420362750149 ], [ -109.043464297942421, 38.15293336299743 ], [ -109.055861297953967, 38.244920363083097 ], [ -109.053948297952189, 38.494651363315683 ], [ -109.051417297949826, 39.360966364122504 ], [ -109.0535282979518, 39.518170364268911 ], [ -109.052551297950885, 39.657382364398558 ], [ -109.051263297949689, 40.2105113649137 ], [ -109.046155297944935, 40.665291365337247 ], [ -109.048314297946945, 40.998433365647514 ], [ -110.00216529883528, 40.997599365646735 ], [ -110.063185298892108, 40.997892365647004 ], [ -111.051022299812104, 40.99658336564579 ], [ -111.05165129981269, 41.25842536588965 ], [ -111.051068299812158, 41.57859236618782 ], [ -111.048697299809945, 41.996203366576751 ], [ -111.494586300225208, 42.000171366580446 ], [ -112.100514300789527, 42.002300366582432 ], [ -112.147116300832934, 41.999054366579415 ], [ -112.989575301617535, 42.001146366581359 ], [ -114.039072302594946, 41.995391366576001 ], [ -114.038151302594088, 40.997686365646814 ], [ -114.038108302594054, 40.111046364821064 ], [ -114.039844302595668, 39.908778364632688 ], [ -114.040105302595904, 39.538685364288014 ], [ -114.044267302599792, 38.678996363487364 ], [ -114.045090302600556, 38.571095363386874 ], [ -114.047273302602591, 38.137652362983204 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "California", "DRAWSEQ": 25, "STATE_FIPS": "06", "SUB_REGION": "Pacific", "STATE_ABBR": "CA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -121.665220309697361, 38.169285363012662 ], [ -121.659581309692101, 38.096465362944841 ], [ -121.55414930959391, 38.137361362982929 ], [ -121.572834309611309, 38.113798362960985 ], [ -121.547473309587701, 38.06347336291411 ], [ -121.569545309608259, 38.063667362914295 ], [ -121.576885309615079, 38.094138362942672 ], [ -121.657750309690385, 38.086101362935189 ], [ -121.698956309728771, 38.023496362876884 ], [ -122.000623310009729, 38.057151362908229 ], [ -122.295522310284369, 38.014795362868782 ], [ -122.379684310362748, 37.973445362830269 ], [ -122.371497310355124, 37.909345362770573 ], [ -122.307553310295575, 37.891763362754197 ], [ -122.312413310300101, 37.778462362648682 ], [ -122.199732310195159, 37.735201362608386 ], [ -122.093023310095774, 37.497313362386834 ], [ -121.975337309986173, 37.46072036235276 ], [ -122.089308310092321, 37.452541362345144 ], [ -122.359671310344112, 37.60978636249159 ], [ -122.366331310350319, 37.702450362577885 ], [ -122.346471310331822, 37.725223362599095 ], [ -122.400931310382532, 37.808625362676764 ], [ -122.498214310473145, 37.782942362652847 ], [ -122.498208310473132, 37.700254362575841 ], [ -122.505682310480097, 37.522904362410671 ], [ -122.441463310420289, 37.479482362370234 ], [ -122.389253310371657, 37.352412362251883 ], [ -122.414638310395304, 37.239126362146379 ], [ -122.274633310264903, 37.106782362023125 ], [ -122.173442310170671, 37.000869361924487 ], [ -122.061332310066263, 36.947506361874787 ], [ -121.883536309900677, 36.96209836188838 ], [ -121.791712309815154, 36.850327361784281 ], [ -121.761391309786916, 36.818990361755098 ], [ -121.808564309830842, 36.648221361596057 ], [ -121.86738130988563, 36.607713361558332 ], [ -121.911420309926655, 36.640427361588799 ], [ -121.955283309967498, 36.582773361535104 ], [ -121.882277309899507, 36.306943361278215 ], [ -121.689811309720255, 36.18113436116105 ], [ -121.445541309492768, 35.879850360880454 ], [ -121.329080309384295, 35.801034360807051 ], [ -121.270261309329527, 35.663535360678999 ], [ -121.146559309214311, 35.629322360647137 ], [ -120.991948309070324, 35.456581360486254 ], [ -120.875212308961608, 35.427765360459418 ], [ -120.849996308938117, 35.364537360400533 ], [ -120.883597308969399, 35.259405360302623 ], [ -120.861342308948679, 35.209253360255914 ], [ -120.638410308741058, 35.140028360191444 ], [ -120.6167653087209, 35.074816360130711 ], [ -120.644339308746581, 34.972637360035549 ], [ -120.665946308766706, 34.903809359971447 ], [ -120.608159308712885, 34.85561535992656 ], [ -120.63167330873479, 34.75990635983743 ], [ -120.60162730870681, 34.704022359785384 ], [ -120.641293308743741, 34.57233735966274 ], [ -120.509406308620925, 34.52137435961528 ], [ -120.456202308571363, 34.44249935954182 ], [ -120.140163308277039, 34.471902359569199 ], [ -120.011495308157208, 34.461661359559663 ], [ -119.869433308024895, 34.404796359506705 ], [ -119.606293307779822, 34.41643535951755 ], [ -119.483010307665012, 34.374862359478826 ], [ -119.266767307463624, 34.238098359351454 ], [ -119.216334307416645, 34.146340359265999 ], [ -118.939360307158694, 34.04008135916704 ], [ -118.788115307017847, 34.018257359146716 ], [ -118.541854306788494, 34.037251359164401 ], [ -118.412110306667657, 33.882967359020711 ], [ -118.388175306645365, 33.812324358954925 ], [ -118.428954306683352, 33.775448358920578 ], [ -118.405089306661125, 33.738450358886126 ], [ -118.286892306551039, 33.703907358853954 ], [ -118.246616306513531, 33.773925358919158 ], [ -118.106717306383246, 33.747564358894607 ], [ -117.597331305908838, 33.394534358565828 ], [ -117.410144305734505, 33.234089358416398 ], [ -117.328439305658407, 33.111482358302212 ], [ -117.254868305589895, 32.888172358094238 ], [ -117.285325305618258, 32.851220358059827 ], [ -117.248207305583691, 32.680094357900451 ], [ -117.198774305537654, 32.738934357955252 ], [ -117.124529305468513, 32.678931357899373 ], [ -117.120606305464861, 32.602872357828531 ], [ -117.199812305538615, 32.718442357936169 ], [ -117.128098305471838, 32.535781357766048 ], [ -116.106973304520835, 32.619470357843994 ], [ -114.722049303231017, 32.720857357938414 ], [ -114.712695303222318, 32.735013357951601 ], [ -114.694040303204929, 32.741425357957567 ], [ -114.603942303121016, 32.726285357943468 ], [ -114.603522303120627, 32.73588635795241 ], [ -114.571959303091234, 32.737439357953861 ], [ -114.572210303091481, 32.748829357964468 ], [ -114.560751303080792, 32.748936357964567 ], [ -114.561582303081565, 32.760753357975574 ], [ -114.543004303064265, 32.76074935797557 ], [ -114.543187303064443, 32.771232357985333 ], [ -114.530095303052249, 32.7714113579855 ], [ -114.53507730305688, 32.788047358000995 ], [ -114.526219303048634, 32.80991235802135 ], [ -114.461436302988304, 32.845422358054428 ], [ -114.476444303002282, 32.935908358138697 ], [ -114.468387302994785, 32.977789358177702 ], [ -114.520627303043426, 33.027707358224191 ], [ -114.559089303079247, 33.036782358232642 ], [ -114.609925303126602, 33.027002358223534 ], [ -114.633967303148978, 33.033567358229647 ], [ -114.645159303159403, 33.044412358239754 ], [ -114.663951303176916, 33.038922358234636 ], [ -114.711355303221069, 33.095382358287218 ], [ -114.709463303219309, 33.122375358312354 ], [ -114.678120303190099, 33.167250358354153 ], [ -114.680051303191902, 33.224595358407555 ], [ -114.687711303199038, 33.23925835842121 ], [ -114.677693303189713, 33.268016358447994 ], [ -114.735427303243483, 33.305708358483102 ], [ -114.703603303213839, 33.352418358526606 ], [ -114.724936303233704, 33.411059358581213 ], [ -114.645092303159345, 33.419116358588724 ], [ -114.630573303145837, 33.439425358607636 ], [ -114.621089303136998, 33.468599358634805 ], [ -114.598086303115565, 33.486127358651132 ], [ -114.587061303105301, 33.509445358672849 ], [ -114.529420303051623, 33.560073358719997 ], [ -114.540247303061705, 33.580507358739027 ], [ -114.52717030304953, 33.622136358777794 ], [ -114.525263303047751, 33.665504358818183 ], [ -114.536433303058146, 33.682735358834236 ], [ -114.49567630302019, 33.708369358858107 ], [ -114.510287303033806, 33.743200358890547 ], [ -114.50455830302846, 33.771714358917102 ], [ -114.521122303043896, 33.82603135896769 ], [ -114.511722303035128, 33.841965358982527 ], [ -114.520962303043746, 33.862926359002046 ], [ -114.49818830302253, 33.925036359059895 ], [ -114.525632303048098, 33.952413359085391 ], [ -114.518208303041177, 33.965063359097172 ], [ -114.428980302958081, 34.029844359157508 ], [ -114.424029302953471, 34.078332359202662 ], [ -114.410166302940553, 34.102654359225312 ], [ -114.322799302859181, 34.141297359261301 ], [ -114.285368302824338, 34.17123135928918 ], [ -114.235776302778135, 34.186222359303144 ], [ -114.149912302698183, 34.266979359378354 ], [ -114.125230302675192, 34.272621359383606 ], [ -114.134127302683481, 34.314548359422659 ], [ -114.153415302701433, 34.336447359443049 ], [ -114.182080302728139, 34.365206359469838 ], [ -114.257842302798693, 34.405488359507352 ], [ -114.283394302822501, 34.412069359513481 ], [ -114.302865302840615, 34.435754359535537 ], [ -114.332636302868352, 34.454873359553346 ], [ -114.376507302909204, 34.459679359557818 ], [ -114.383862302916057, 34.477085359574033 ], [ -114.376828302909502, 34.536563359629426 ], [ -114.40974230294016, 34.583723359673343 ], [ -114.434302302963033, 34.598963359687538 ], [ -114.42227030295183, 34.610895359698652 ], [ -114.465637302992221, 34.709873359790834 ], [ -114.497804303022178, 34.744757359823318 ], [ -114.525553303048014, 34.74891135982719 ], [ -114.542040303063374, 34.759958359837476 ], [ -114.570217303089606, 34.831860359904439 ], [ -114.62726330314274, 34.875533359945116 ], [ -114.630475303145744, 34.919501359986064 ], [ -114.621007303136921, 34.943609360008516 ], [ -114.632276303147421, 34.997651360058846 ], [ -114.62106830313698, 34.99891436006002 ], [ -115.626197304073074, 35.795698360802085 ], [ -115.88576930431482, 36.001226360993499 ], [ -117.160423305501936, 36.959594361886047 ], [ -117.83868630613361, 37.457298362349569 ], [ -118.417419306672599, 37.886676362749455 ], [ -119.152450307357157, 38.411801363238524 ], [ -119.3188253075121, 38.52710836334591 ], [ -119.575687307751323, 38.702910363509638 ], [ -119.889341308043441, 38.922251363713912 ], [ -119.99525430814208, 38.99410636378083 ], [ -119.995150308141973, 39.063491363845458 ], [ -119.994541308141407, 39.106131363885169 ], [ -119.995527308142329, 39.15871336393414 ], [ -119.995304308142124, 39.311545364076473 ], [ -119.996011308142783, 39.443501364199363 ], [ -119.996165308142935, 39.720610364457443 ], [ -119.996324308143073, 41.177566365814343 ], [ -119.993459308140402, 41.989205366570239 ], [ -120.871908308958524, 41.987672366568809 ], [ -121.441509309489007, 41.994334366575018 ], [ -122.28470531027429, 42.000764366581002 ], [ -123.22210231114731, 42.002191366582331 ], [ -123.51320431141842, 41.997833366578277 ], [ -123.819146311703349, 41.992948366573728 ], [ -124.20644431206405, 41.997648366578105 ], [ -124.207501312065034, 41.848327366439037 ], [ -124.243099312098195, 41.776757366372379 ], [ -124.144210312006095, 41.727193366326219 ], [ -124.057954311925755, 41.458164366075664 ], [ -124.071602311938477, 41.313832365941252 ], [ -124.149703312011212, 41.128832365768957 ], [ -124.109446311973713, 40.978211365628681 ], [ -124.392638312237466, 40.435237365122987 ], [ -124.336107312184808, 40.327555365022704 ], [ -124.345306312193372, 40.252430364952744 ], [ -124.094560311959853, 40.100377364811131 ], [ -124.007638311878907, 39.998580364716325 ], [ -123.838108311721015, 39.826397364555966 ], [ -123.783532311670186, 39.687108364426244 ], [ -123.754651311643286, 39.551879364300305 ], [ -123.813718311698295, 39.347806364110241 ], [ -123.68344731157697, 39.041806363825259 ], [ -123.721901311612783, 38.92477136371626 ], [ -123.52388631142837, 38.757659363560627 ], [ -123.29794131121794, 38.547333363364743 ], [ -123.121544311053668, 38.433600363258819 ], [ -123.048796310985907, 38.294141363128944 ], [ -122.994649310935472, 38.29722736313181 ], [ -122.939272310883908, 38.153265362997743 ], [ -123.010730310950464, 37.994466362849849 ], [ -122.956597310900037, 37.990757362846395 ], [ -122.921181310867055, 38.030623362883517 ], [ -122.822193310774878, 38.007672362862145 ], [ -122.691723310653359, 37.894392362756648 ], [ -122.66639231062976, 37.906919362768313 ], [ -122.515725310489444, 37.822106362689325 ], [ -122.45825931043592, 37.834221362700603 ], [ -122.49002231046552, 37.931767362791454 ], [ -122.441781310420581, 37.982955362839128 ], [ -122.506450310480801, 38.018652362872373 ], [ -122.474545310451106, 38.085457362934591 ], [ -122.528648310501481, 38.150671362995325 ], [ -122.488935310464498, 38.113414362960626 ], [ -122.429202310408868, 38.113807362960991 ], [ -122.398464310380234, 38.161337363005259 ], [ -122.272772310263178, 38.097484362945792 ], [ -122.285354310274897, 38.159311363003368 ], [ -122.338907310324771, 38.19358236303529 ], [ -122.315759310303207, 38.205933363046796 ], [ -122.273001310263396, 38.159418363003468 ], [ -122.232243310225442, 38.071079362921196 ], [ -121.984549309994748, 38.139500362984919 ], [ -121.902766309918576, 38.0729093629229 ], [ -121.782362309806445, 38.066775362917191 ], [ -121.665220309697361, 38.169285363012662 ] ] ], [ [ [ -119.867823308023389, 34.07522835919977 ], [ -119.92769030807915, 34.059180359184822 ], [ -119.873987308029143, 34.0318753591594 ], [ -119.889061308043182, 34.004669359134056 ], [ -119.847275308004257, 33.968416359100296 ], [ -119.712539307878785, 33.965284359097382 ], [ -119.539377307717501, 34.00649635913576 ], [ -119.523095307702334, 34.034590359161925 ], [ -119.572589307748444, 34.055781359181658 ], [ -119.667922307837216, 34.02134335914959 ], [ -119.867823308023389, 34.07522835919977 ] ] ], [ [ [ -120.167386308302383, 33.924162359059082 ], [ -120.109179308248173, 33.894814359031749 ], [ -119.963386308112405, 33.947763359081058 ], [ -120.046801308190084, 34.041105359167993 ], [ -120.238548308368664, 34.010885359139849 ], [ -120.167386308302383, 33.924162359059082 ] ] ], [ [ [ -118.594780306837777, 33.480818358646182 ], [ -118.556434306802061, 33.434482358603034 ], [ -118.481342306732131, 33.419552358589129 ], [ -118.455386306707965, 33.324786358500866 ], [ -118.304036306567014, 33.30749435848476 ], [ -118.294591306558203, 33.334448358509867 ], [ -118.362395306621352, 33.41101135858117 ], [ -118.594780306837777, 33.480818358646182 ] ] ], [ [ [ -118.350958306610707, 32.819195358030001 ], [ -118.541585306788249, 32.987384358186638 ], [ -118.571486306816098, 33.03597135823189 ], [ -118.599517306842188, 33.021022358217962 ], [ -118.51167730676039, 32.892076358097874 ], [ -118.420106306675109, 32.806114358017815 ], [ -118.350958306610707, 32.819195358030001 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Ohio", "DRAWSEQ": 26, "STATE_FIPS": "39", "SUB_REGION": "East North Central", "STATE_ABBR": "OH" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -83.272755273941584, 38.609257363422415 ], [ -83.245013273915745, 38.624172363436301 ], [ -83.181939273856997, 38.609841363422959 ], [ -83.143150273820879, 38.619339363431806 ], [ -83.11124327379116, 38.664833363474173 ], [ -83.06088027374426, 38.685726363493629 ], [ -83.026943273712646, 38.714512363520441 ], [ -82.972483273661936, 38.719643363525222 ], [ -82.921304273614268, 38.746414363550151 ], [ -82.890312273585408, 38.742775363546762 ], [ -82.873191273569461, 38.719006363524628 ], [ -82.880011273575803, 38.683301363491374 ], [ -82.860029273557203, 38.652395363462588 ], [ -82.853856273551457, 38.600458363414219 ], [ -82.826992273526429, 38.571662363387404 ], [ -82.8023642735035, 38.557288363374013 ], [ -82.741945273447229, 38.553066363370085 ], [ -82.69557927340405, 38.539142363357115 ], [ -82.669760273379993, 38.502140363322653 ], [ -82.613743273327827, 38.472668363295206 ], [ -82.586604273302555, 38.412519363239184 ], [ -82.575419273292141, 38.403902363231168 ], [ -82.547548273266173, 38.400511363228006 ], [ -82.494987273217234, 38.40583236323296 ], [ -82.414891273142629, 38.430392363255834 ], [ -82.394764273123883, 38.42847036325405 ], [ -82.329179273062806, 38.441952363266601 ], [ -82.314240273048895, 38.46522936328828 ], [ -82.289971273026296, 38.580081363395244 ], [ -82.270897273008529, 38.594890363409036 ], [ -82.213659272955226, 38.584835363399669 ], [ -82.184247272927834, 38.595032363409167 ], [ -82.173657272917964, 38.632190363443769 ], [ -82.188977272932235, 38.677893363486334 ], [ -82.183973272927574, 38.710303363516523 ], [ -82.216750272958095, 38.778939363580449 ], [ -82.197722272940382, 38.80461936360436 ], [ -82.1460992728923, 38.838787363636186 ], [ -82.139317272885989, 38.899398363692626 ], [ -82.101207272850488, 38.952094363741708 ], [ -82.085016272835418, 38.977198363765083 ], [ -82.058503272810725, 38.989065363776135 ], [ -82.04288527279617, 39.014139363799487 ], [ -81.999678272755929, 39.015261363800533 ], [ -81.975187272733123, 38.993006363779813 ], [ -81.937733272698239, 38.991175363778105 ], [ -81.927830272689022, 38.984271363771676 ], [ -81.898608272661804, 38.932224363723201 ], [ -81.931851272692768, 38.894742363688295 ], [ -81.915248272677303, 38.884446363678705 ], [ -81.892695272656297, 38.873453363668467 ], [ -81.86680027263219, 38.885709363679879 ], [ -81.840913272608077, 38.937889363728473 ], [ -81.82377727259211, 38.948467363738331 ], [ -81.783225272554347, 38.923562363715135 ], [ -81.762297272534852, 38.930181363721303 ], [ -81.781730272552963, 38.968529363757014 ], [ -81.775679272547322, 39.016829363801996 ], [ -81.813462272582512, 39.044108363827405 ], [ -81.824273272592578, 39.066416363848177 ], [ -81.819565272588193, 39.077017363858047 ], [ -81.786361272557272, 39.07725736385828 ], [ -81.753561272526724, 39.094720363874544 ], [ -81.744703272518478, 39.125875363903553 ], [ -81.758910272531708, 39.175751363949999 ], [ -81.723074272498323, 39.213268363984945 ], [ -81.697903272474889, 39.220020363991232 ], [ -81.689526272467077, 39.260226364028682 ], [ -81.66752227244659, 39.27049536403824 ], [ -81.572685272358271, 39.265917364033982 ], [ -81.557388272344028, 39.332655364096134 ], [ -81.540648272328426, 39.352709364114808 ], [ -81.46500827225799, 39.406858364165238 ], [ -81.447956272242109, 39.411027364169122 ], [ -81.433978272229083, 39.406023364164461 ], [ -81.375916272175019, 39.345690364108272 ], [ -81.338836272140483, 39.353644364115681 ], [ -81.284017272089429, 39.387072364146817 ], [ -81.237621272046212, 39.388472364148114 ], [ -81.22494827203441, 39.408358364166638 ], [ -81.200305272011462, 39.415896364173662 ], [ -81.180567271993084, 39.437800364194061 ], [ -81.117090271933961, 39.467784364221984 ], [ -81.098245271916412, 39.496451364248678 ], [ -81.037383271859724, 39.532664364282404 ], [ -81.03256827185524, 39.544142364293094 ], [ -80.983646271809675, 39.581805364328176 ], [ -80.932611271762156, 39.606941364351584 ], [ -80.912590271743511, 39.607353364351965 ], [ -80.881110271714192, 39.624081364367541 ], [ -80.872746271706404, 39.662411364403241 ], [ -80.863414271697707, 39.680351364419948 ], [ -80.83278727166919, 39.703400364441414 ], [ -80.832298271668733, 39.718834364455788 ], [ -80.856453271691223, 39.73633536447209 ], [ -80.870727271704524, 39.759993364494122 ], [ -80.819104271656443, 39.809001364539768 ], [ -80.825916271662791, 39.839667364568328 ], [ -80.798525271637274, 39.856722364584208 ], [ -80.790849271630123, 39.87234736459876 ], [ -80.812136271649948, 39.904901364629083 ], [ -80.807840271645944, 39.91590336463932 ], [ -80.796021271634942, 39.919839364642989 ], [ -80.768127271608961, 39.913313364636913 ], [ -80.758887271600358, 39.921266364644318 ], [ -80.763060271604246, 39.947015364668303 ], [ -80.738888271581729, 39.983476364702256 ], [ -80.738239271581122, 40.035664364750858 ], [ -80.70206527154744, 40.154090364861155 ], [ -80.700890271546342, 40.168181364874272 ], [ -80.678557271525548, 40.19415136489846 ], [ -80.650113271499052, 40.245679364946454 ], [ -80.614688271466065, 40.276502364975158 ], [ -80.604517271456587, 40.306244365002854 ], [ -80.609247271461001, 40.373275365065282 ], [ -80.629244271479621, 40.388663365079616 ], [ -80.627848271478314, 40.398226365088519 ], [ -80.601830271454091, 40.480539365165185 ], [ -80.625253271475898, 40.504464365187467 ], [ -80.633440271483522, 40.539204365219817 ], [ -80.668620271516289, 40.568279365246894 ], [ -80.66772727151546, 40.582137365259804 ], [ -80.637338271487152, 40.613982365289459 ], [ -80.611549271463133, 40.620063365295124 ], [ -80.574416271428561, 40.615974365291315 ], [ -80.521999271379741, 40.637203365311088 ], [ -80.520306271378161, 40.854168365513154 ], [ -80.520924271378732, 40.897270365553297 ], [ -80.522932271380611, 41.129627365769693 ], [ -80.519996271377877, 41.489288366104653 ], [ -80.523925271381529, 41.495102366110068 ], [ -80.522644271380344, 41.850774366441314 ], [ -80.520592271378433, 41.986872366568065 ], [ -80.999772271824696, 41.850257366440829 ], [ -81.362264272162292, 41.724283366323505 ], [ -81.478263272270326, 41.631716366237299 ], [ -81.73850227251269, 41.491154366106393 ], [ -81.961908272720763, 41.501918366116413 ], [ -82.01560527277077, 41.515310366128887 ], [ -82.341382273074174, 41.431501366050838 ], [ -82.548837273267381, 41.391337366013431 ], [ -82.716946273423943, 41.450524366068549 ], [ -82.908932273602744, 41.429468366048937 ], [ -83.070398273753128, 41.456110366073759 ], [ -82.784707273487058, 41.507417366121537 ], [ -82.795830273497415, 41.537648366149696 ], [ -83.00343327369076, 41.538193366150196 ], [ -83.153746273830748, 41.626089366232058 ], [ -83.482691274137096, 41.725130366324294 ], [ -83.76395427439904, 41.717042366316761 ], [ -83.868639274496545, 41.715993366315786 ], [ -84.359208274953417, 41.708039366308384 ], [ -84.384393274976873, 41.707150366307552 ], [ -84.79037727535497, 41.697494366298557 ], [ -84.791370275355902, 41.530492366143029 ], [ -84.791897275356391, 41.427899366047484 ], [ -84.790975275355535, 41.283818365913291 ], [ -84.791586275356096, 41.253132365884717 ], [ -84.790527275355117, 40.988341365638107 ], [ -84.791023275355585, 40.93770836559095 ], [ -84.793061275357474, 40.72886036539645 ], [ -84.793252275357659, 40.588738365265954 ], [ -84.794556275358872, 40.35305036504645 ], [ -84.795388275359642, 40.319500365015202 ], [ -84.803564275367265, 40.013990364730674 ], [ -84.806149275369663, 39.917166364640501 ], [ -84.808696275372043, 39.733299364469261 ], [ -84.811037275374218, 39.56405036431164 ], [ -84.811105275374288, 39.513163364264244 ], [ -84.812025275375134, 39.312333364077205 ], [ -84.812070275375177, 39.303029364068543 ], [ -84.811480275374635, 39.102585363881865 ], [ -84.789927275354557, 39.107033363886003 ], [ -84.742875275310737, 39.142063363918631 ], [ -84.667487275240532, 39.089624363869788 ], [ -84.62264827519877, 39.074934363856116 ], [ -84.59306827517122, 39.07026536385176 ], [ -84.515301275098793, 39.09419536387405 ], [ -84.49205327507714, 39.107363363886314 ], [ -84.444918275033245, 39.11182736389047 ], [ -84.425683275015331, 39.084724363865227 ], [ -84.419740275009801, 39.047337363830408 ], [ -84.391312274983321, 39.035744363819617 ], [ -84.345779274940909, 39.037812363821537 ], [ -84.313315274910678, 39.014074363799431 ], [ -84.290136274889093, 38.944538363734665 ], [ -84.26152527486245, 38.917477363709466 ], [ -84.235294274838012, 38.874555363669494 ], [ -84.228702274831875, 38.812690363611878 ], [ -84.176752274783496, 38.788498363589348 ], [ -84.088867274701641, 38.765504363567928 ], [ -84.053801274668984, 38.763735363566283 ], [ -83.962163274583645, 38.777647363579241 ], [ -83.912539274537423, 38.757960363560905 ], [ -83.85755227448621, 38.744918363548763 ], [ -83.837532274467577, 38.711880363517992 ], [ -83.790465274423738, 38.693844363501192 ], [ -83.770223274404884, 38.650819363461125 ], [ -83.712825274351431, 38.635553363446903 ], [ -83.678530274319485, 38.620928363433286 ], [ -83.655755274298272, 38.623880363436029 ], [ -83.64318927428657, 38.635862363447188 ], [ -83.63324127427731, 38.664972363474305 ], [ -83.618378274263463, 38.677972363486411 ], [ -83.526556274177949, 38.696111363503306 ], [ -83.500073274153294, 38.69013736349774 ], [ -83.453616274110018, 38.663774363473188 ], [ -83.371422274033478, 38.654997363465014 ], [ -83.330023273994911, 38.631988363443583 ], [ -83.320325273985887, 38.606563363419909 ], [ -83.306531273973036, 38.596317363410364 ], [ -83.290043273957679, 38.596638363410662 ], [ -83.272755273941584, 38.609257363422415 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Illinois", "DRAWSEQ": 27, "STATE_FIPS": "17", "SUB_REGION": "East North Central", "STATE_ABBR": "IL" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -88.07159127841085, 37.511038362399617 ], [ -88.134202278469161, 37.583620362467215 ], [ -88.157664278491012, 37.628526362509035 ], [ -88.15940427849263, 37.660733362539034 ], [ -88.133670278468657, 37.700790362576342 ], [ -88.072504278411699, 37.735446362608613 ], [ -88.035607278377327, 37.805728362674074 ], [ -88.086062278424322, 37.817657362685182 ], [ -88.089297278427338, 37.831294362697882 ], [ -88.04216927838344, 37.82756736269441 ], [ -88.034272278376093, 37.843791362709524 ], [ -88.075770278414737, 37.867854362731933 ], [ -88.101490278438689, 37.895351362757538 ], [ -88.100116278437412, 37.906215362767654 ], [ -88.044900278385981, 37.896049362758191 ], [ -88.026620278368966, 37.905803362767273 ], [ -88.030473278372554, 37.917636362778296 ], [ -88.084033278422439, 37.923705362783949 ], [ -88.07897527841773, 37.944045362802889 ], [ -88.06465427840439, 37.92982836278965 ], [ -88.041803278383099, 37.934543362794038 ], [ -88.042543278383789, 37.956310362814307 ], [ -88.021737278364412, 37.975101362831808 ], [ -88.029244278371408, 38.008281362862718 ], [ -88.021729278364404, 38.033577362886277 ], [ -88.041506278382826, 38.038349362890713 ], [ -88.043123278384329, 38.045166362897064 ], [ -88.03476127837655, 38.054130362905411 ], [ -87.975326278321191, 38.073352362923316 ], [ -87.964897278311483, 38.096794362945147 ], [ -88.012361278355684, 38.092392362941048 ], [ -88.018579278361472, 38.103348362951252 ], [ -87.973534278319519, 38.131805362977758 ], [ -87.950599278298156, 38.136959362982552 ], [ -87.932021278280857, 38.157573363001752 ], [ -87.932319278281142, 38.171177363014422 ], [ -87.97796027832365, 38.200760363041972 ], [ -87.986040278331174, 38.234860363073736 ], [ -87.980050278325592, 38.241131363079575 ], [ -87.925950278275209, 38.304818363138885 ], [ -87.91368127826378, 38.302392363136626 ], [ -87.914139278264201, 38.281094363116793 ], [ -87.888496278240325, 38.300705363135052 ], [ -87.883476278235648, 38.315598363148922 ], [ -87.874069278226884, 38.316834363150079 ], [ -87.863036278216612, 38.285408363120808 ], [ -87.850112278204577, 38.286144363121494 ], [ -87.834533278190065, 38.352570363183361 ], [ -87.784048278143047, 38.378170363207204 ], [ -87.748456278109899, 38.418011363244304 ], [ -87.738980278101081, 38.445527363269932 ], [ -87.758688278119436, 38.45714336328075 ], [ -87.756124278117042, 38.466172363289161 ], [ -87.692844278058104, 38.481580363303507 ], [ -87.679935278046088, 38.504053363324438 ], [ -87.653559278021518, 38.50049036332112 ], [ -87.651415278019527, 38.515417363335018 ], [ -87.672969278039602, 38.547471363364878 ], [ -87.652880278020888, 38.573919363389507 ], [ -87.640619278009467, 38.593225363407484 ], [ -87.619851277990136, 38.599256363413105 ], [ -87.62867127799835, 38.62296436343518 ], [ -87.625215277995125, 38.642858363453712 ], [ -87.58850127796093, 38.672215363481051 ], [ -87.543913277919401, 38.686021363493907 ], [ -87.508336277886272, 38.736680363541083 ], [ -87.508023277885982, 38.769768363571899 ], [ -87.519048277896246, 38.776745363578399 ], [ -87.507909277885872, 38.795605363595968 ], [ -87.550529277925563, 38.857936363654019 ], [ -87.559081277933529, 38.869856363665122 ], [ -87.539222277915044, 38.904905363697758 ], [ -87.530204277906634, 38.931963363722957 ], [ -87.533492277909701, 38.963746363752563 ], [ -87.547927277923151, 38.97712036376501 ], [ -87.591881277964077, 38.99412636378085 ], [ -87.58177227795467, 38.995785363782403 ], [ -87.585343277957989, 39.062477363844508 ], [ -87.612031277982851, 39.084647363865159 ], [ -87.630892278000417, 39.089015363869223 ], [ -87.631693278001165, 39.103983363883167 ], [ -87.662287278029652, 39.113509363892035 ], [ -87.659480278027033, 39.130693363908037 ], [ -87.670352278037157, 39.146719363922969 ], [ -87.644282278012881, 39.168546363943292 ], [ -87.607950277979043, 39.196107363968963 ], [ -87.59423227796627, 39.198167363970882 ], [ -87.588617277961035, 39.208505363980507 ], [ -87.584588277957295, 39.248791364018032 ], [ -87.606920277978091, 39.258202364026793 ], [ -87.615824277986377, 39.281456364048452 ], [ -87.610643277981552, 39.297699364063575 ], [ -87.625262277995176, 39.307441364072652 ], [ -87.597688277969496, 39.338305364101394 ], [ -87.540237277915978, 39.350562364112811 ], [ -87.538589277914454, 39.477483364231013 ], [ -87.535597277911663, 39.609376364353849 ], [ -87.53579327791185, 39.887339364612721 ], [ -87.535357277911444, 40.166231364872459 ], [ -87.535695277911756, 40.483282365167739 ], [ -87.537191277913152, 40.494646365178326 ], [ -87.532696277908954, 40.745448365411903 ], [ -87.532052277908363, 41.009963365658251 ], [ -87.531765277908093, 41.173790365810824 ], [ -87.532484277908765, 41.30133836592961 ], [ -87.532686277908951, 41.469750366086458 ], [ -87.529906277906363, 41.723626366322897 ], [ -87.612676277983454, 41.84736536643814 ], [ -87.670606278037397, 42.059852366636036 ], [ -87.760302278120932, 42.156482366726024 ], [ -87.837015278192382, 42.31423536687295 ], [ -87.797382278155467, 42.48915236703585 ], [ -88.194790278525588, 42.489631367036296 ], [ -88.297989278621699, 42.491988367038488 ], [ -88.706623279002272, 42.489671367036337 ], [ -88.765058279056689, 42.490922367037498 ], [ -88.939187279218856, 42.490879367037458 ], [ -89.359559279610366, 42.49791736704401 ], [ -89.400613279648596, 42.497502367043623 ], [ -89.834739280052901, 42.50346836704918 ], [ -89.923691280135742, 42.504115367049785 ], [ -90.42010328059807, 42.508365367053742 ], [ -90.638456280801421, 42.509363367054675 ], [ -90.65189928081395, 42.49470036704102 ], [ -90.648473280810748, 42.475647367023271 ], [ -90.605955280771155, 42.460564367009226 ], [ -90.563711280731809, 42.421843366973164 ], [ -90.491171280664261, 42.388791366942385 ], [ -90.441725280618201, 42.360083366915646 ], [ -90.427809280605246, 42.34064536689754 ], [ -90.418112280596219, 42.263939366826108 ], [ -90.40730128058614, 42.242661366806288 ], [ -90.367858280549413, 42.210226366776084 ], [ -90.323730280508315, 42.197337366764074 ], [ -90.231063280422006, 42.159741366729065 ], [ -90.191702280385357, 42.122710366694577 ], [ -90.176214280370928, 42.120524366692536 ], [ -90.166776280362143, 42.103767366676934 ], [ -90.168226280363484, 42.061066366637164 ], [ -90.150663280347132, 42.033453366611447 ], [ -90.142796280339809, 41.983989366565382 ], [ -90.154645280350834, 41.930802366515849 ], [ -90.195965280389316, 41.806167366399769 ], [ -90.255438280444707, 41.781769366377048 ], [ -90.305016280490889, 41.756497366353514 ], [ -90.326157280510571, 41.7227683663221 ], [ -90.341262280524646, 41.649122366253508 ], [ -90.339476280522973, 41.602831366210395 ], [ -90.348494280531384, 41.586882366195546 ], [ -90.423135280600889, 41.567305366177308 ], [ -90.435098280612038, 41.543612366155244 ], [ -90.45512628063068, 41.527579366140316 ], [ -90.54097528071064, 41.526003366138852 ], [ -90.600838280766396, 41.50961836612359 ], [ -90.658929280820487, 41.462350366079562 ], [ -90.70835428086653, 41.450093366068145 ], [ -90.780042280933287, 41.44985236606793 ], [ -90.844284280993122, 41.444652366063082 ], [ -90.949800281091385, 41.421263366041302 ], [ -91.000842281138929, 41.431112366050471 ], [ -91.027637281163877, 41.423536366043422 ], [ -91.05593528119023, 41.401407366022809 ], [ -91.073429281206529, 41.334925365960892 ], [ -91.102496281233599, 41.267848365898416 ], [ -91.101672281232823, 41.231552365864616 ], [ -91.056466281190723, 41.176290365813152 ], [ -91.018402281155275, 41.165857365803433 ], [ -90.990485281129281, 41.144404365783458 ], [ -90.957930281098953, 41.104393365746191 ], [ -90.954794281096042, 41.070397365714527 ], [ -90.960851281101682, 40.950541365602902 ], [ -90.983419281122693, 40.923965365578155 ], [ -91.049353281184096, 40.879623365536858 ], [ -91.089050281221077, 40.833767365494154 ], [ -91.092895281224656, 40.761587365426934 ], [ -91.120132281250022, 40.705443365374641 ], [ -91.129303281258558, 40.682189365352983 ], [ -91.162644281289616, 40.656352365328921 ], [ -91.215060281338424, 40.643859365317283 ], [ -91.262211281382349, 40.639587365313304 ], [ -91.375762281488093, 40.60348036527968 ], [ -91.411271281521167, 40.573012365251302 ], [ -91.413026281522804, 40.548034365228041 ], [ -91.382255281494139, 40.528538365209883 ], [ -91.37494628148734, 40.503697365186753 ], [ -91.385551281497214, 40.447294365134226 ], [ -91.372908281485437, 40.403032365092997 ], [ -91.385909281497547, 40.392405365083107 ], [ -91.418968281528336, 40.386919365077993 ], [ -91.448747281556066, 40.371946365064048 ], [ -91.486849281591546, 40.309668365006047 ], [ -91.499087281602954, 40.2514223649518 ], [ -91.506701281610034, 40.200504364904376 ], [ -91.516284281618965, 40.134589364842995 ], [ -91.504160281607682, 40.066757364779818 ], [ -91.487443281592107, 40.005798364723049 ], [ -91.447395281554805, 39.946110364667462 ], [ -91.430540281539109, 39.921882364644894 ], [ -91.434203281542523, 39.901874364626259 ], [ -91.451141281558293, 39.885288364610815 ], [ -91.449340281556616, 39.86309436459014 ], [ -91.381863281493779, 39.803817364534936 ], [ -91.373569281486056, 39.761318364495352 ], [ -91.367237281480158, 39.724685364461237 ], [ -91.317812281434129, 39.68596236442518 ], [ -91.20338928132756, 39.600067364345179 ], [ -91.156329281283732, 39.552639364301008 ], [ -91.093750281225454, 39.528973364278968 ], [ -91.064521281198225, 39.474030364227801 ], [ -91.036475281172116, 39.444458364200258 ], [ -90.948024281089729, 39.400632364159442 ], [ -90.850624280999028, 39.35049936411275 ], [ -90.779469280932759, 39.296850364062792 ], [ -90.738207280894329, 39.247858364017162 ], [ -90.732462280888981, 39.224794363995684 ], [ -90.718317280875809, 39.195921363968793 ], [ -90.716860280874442, 39.144259363920675 ], [ -90.690522280849919, 39.093749363873634 ], [ -90.70771228086592, 39.058227363840551 ], [ -90.706193280864511, 39.03784136382157 ], [ -90.668999280829865, 38.935303363726071 ], [ -90.627335280791073, 38.880845363675348 ], [ -90.570448280738091, 38.871377363666532 ], [ -90.53054528070092, 38.89165936368542 ], [ -90.469957280644493, 38.959227363748354 ], [ -90.413186280591631, 38.962378363751284 ], [ -90.319853280504702, 38.924956363716433 ], [ -90.279043280466695, 38.924765363716254 ], [ -90.244038280434097, 38.914557363706749 ], [ -90.132920280330609, 38.853079363649492 ], [ -90.113228280312271, 38.830515363628479 ], [ -90.121834280320286, 38.800559363600584 ], [ -90.135285280332809, 38.78553336358658 ], [ -90.163507280359099, 38.773147363575049 ], [ -90.196681280389996, 38.72401536352929 ], [ -90.202350280395265, 38.700413363507309 ], [ -90.183689280377891, 38.658822363468573 ], [ -90.183819280378017, 38.610322363423407 ], [ -90.24105728043132, 38.562857363379202 ], [ -90.261344280450217, 38.532820363351227 ], [ -90.265899280454448, 38.518741363338115 ], [ -90.301958280488037, 38.42741036325306 ], [ -90.339725280523211, 38.390900363219053 ], [ -90.358807280540987, 38.365383363195292 ], [ -90.36946628055091, 38.32361336315639 ], [ -90.364889280546649, 38.234353363073254 ], [ -90.336835280520518, 38.188767363030806 ], [ -90.289753280476674, 38.16687036301041 ], [ -90.254177280443542, 38.122223362968825 ], [ -90.207644280400203, 38.08895936293785 ], [ -90.134827280332388, 38.054004362905296 ], [ -90.119453280318069, 38.032325362885103 ], [ -90.042035280245969, 37.993258362848721 ], [ -90.010922280216988, 37.969371362826479 ], [ -89.958338280168022, 37.963686362821178 ], [ -89.979023280187278, 37.911937362772989 ], [ -89.937983280149055, 37.878097362741471 ], [ -89.900659280114297, 37.875956362739473 ], [ -89.866921280082877, 37.891928362754349 ], [ -89.861153280077502, 37.90553936276703 ], [ -89.851822280068816, 37.905115362766637 ], [ -89.728551279954004, 37.841043362706962 ], [ -89.691158279919179, 37.804846362673246 ], [ -89.675960279905027, 37.78402136265386 ], [ -89.666561279896271, 37.745505362617983 ], [ -89.581535279817089, 37.706155362581335 ], [ -89.521619279761296, 37.694848362570809 ], [ -89.513471279753702, 37.679890362556876 ], [ -89.519277279759109, 37.650425362529433 ], [ -89.513463279753694, 37.615978362497351 ], [ -89.525068279764497, 37.572006362456399 ], [ -89.494877279736386, 37.491775362381681 ], [ -89.453714279698048, 37.453235362345787 ], [ -89.427665279673789, 37.411068362306516 ], [ -89.435828279681388, 37.355766362255011 ], [ -89.468833279712129, 37.339459362239822 ], [ -89.500672279741778, 37.329491362230542 ], [ -89.513977279754172, 37.305012362207748 ], [ -89.513976279754175, 37.276452362181146 ], [ -89.489683279731551, 37.25605136216214 ], [ -89.465398279708936, 37.253781362160026 ], [ -89.468304279711631, 37.224316362132583 ], [ -89.440606279685838, 37.165367362077689 ], [ -89.423880279670257, 37.13725336205151 ], [ -89.380070279629464, 37.099133362016005 ], [ -89.383028279632214, 37.049263361969558 ], [ -89.311058279565188, 37.009732361932741 ], [ -89.282843279538909, 36.999257361922986 ], [ -89.262076279519576, 37.00873636193181 ], [ -89.264319279521658, 37.027783361949552 ], [ -89.309777279564003, 37.060959361980451 ], [ -89.303369279558027, 37.085434362003241 ], [ -89.284311279540276, 37.091294362008703 ], [ -89.264130279521481, 37.087174362004866 ], [ -89.237753279496914, 37.041783361962587 ], [ -89.210126279471183, 37.029023361950706 ], [ -89.193584279455777, 36.986822361911408 ], [ -89.129930279396504, 36.988165361912657 ], [ -89.150316279415492, 36.998491361922277 ], [ -89.174404279437923, 37.02576236194767 ], [ -89.169621279433471, 37.064287361983546 ], [ -89.146419279411859, 37.093237362010512 ], [ -89.116893279384357, 37.112188362028164 ], [ -89.065104279336126, 37.185911362096817 ], [ -88.993240279269202, 37.220088362128649 ], [ -88.932567279212691, 37.218459362127135 ], [ -88.863350279148236, 37.202247362112033 ], [ -88.746560279039457, 37.152161362065385 ], [ -88.739166279032574, 37.14123636205521 ], [ -88.688421278985317, 37.135465362049842 ], [ -88.614268278916256, 37.109102362025283 ], [ -88.559319278865075, 37.072871361991545 ], [ -88.517317278825956, 37.064826361984053 ], [ -88.490743278801204, 37.068237361987229 ], [ -88.476841278788271, 37.072200361990923 ], [ -88.450511278763742, 37.098727362015623 ], [ -88.422555278737704, 37.156965362069862 ], [ -88.450739278763962, 37.205724362115276 ], [ -88.5014692788112, 37.257836362163808 ], [ -88.511365278820421, 37.296905362200192 ], [ -88.467686278779738, 37.400808362296956 ], [ -88.419893278735231, 37.420343362315151 ], [ -88.359214278678721, 37.409361362304921 ], [ -88.311742278634497, 37.442903362336168 ], [ -88.087910278426051, 37.476321362367287 ], [ -88.07159127841085, 37.511038362399617 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "District of Columbia", "DRAWSEQ": 28, "STATE_FIPS": "11", "SUB_REGION": "South Atlantic", "STATE_ABBR": "DC" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -77.007930268107003, 38.966667363755278 ], [ -77.042088268138826, 38.993541363780309 ], [ -77.12232826821355, 38.932171363723157 ], [ -77.078649268172867, 38.915711363707828 ], [ -77.067586268162572, 38.88621236368035 ], [ -77.038777268135732, 38.862543363658304 ], [ -77.040104268136972, 38.838526363635935 ], [ -77.044888268141435, 38.829477363627511 ], [ -77.034946268132174, 38.814028363613119 ], [ -77.045147268141676, 38.788234363589098 ], [ -76.910904268016651, 38.89010036368397 ], [ -77.007930268107003, 38.966667363755278 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Delaware", "DRAWSEQ": 29, "STATE_FIPS": "10", "SUB_REGION": "South Atlantic", "STATE_ABBR": "DE" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -75.707073266895492, 38.5575913633743 ], [ -75.698802266887782, 38.463182363286371 ], [ -75.349842266562788, 38.455322363279052 ], [ -75.092721266323323, 38.450563363274625 ], [ -75.067924266300238, 38.450075363274166 ], [ -75.045623266279463, 38.449602363273726 ], [ -75.082762266314049, 38.799924363599985 ], [ -75.190571266414466, 38.808782363608238 ], [ -75.307535266523388, 38.946024363736058 ], [ -75.324488266539177, 39.012499363797964 ], [ -75.39736826660706, 39.073149363854448 ], [ -75.402122266611485, 39.257750364026371 ], [ -75.515217266716817, 39.367051364128166 ], [ -75.589836266786307, 39.46388036421834 ], [ -75.562643266760986, 39.56683536431423 ], [ -75.610374266805437, 39.612905364357132 ], [ -75.48928026669266, 39.714858364452084 ], [ -75.475974266680268, 39.720084364456952 ], [ -75.474768266679135, 39.741832364477204 ], [ -75.460394266665759, 39.763362364497254 ], [ -75.427647266635248, 39.77824336451112 ], [ -75.411754266620449, 39.789770364521857 ], [ -75.420468266628575, 39.798983364530436 ], [ -75.469986266674681, 39.826547364556106 ], [ -75.58344326678035, 39.84011936456875 ], [ -75.643994266836742, 39.83830636456706 ], [ -75.694771266884032, 39.820457364550435 ], [ -75.745592266931368, 39.774929364508033 ], [ -75.774927266958684, 39.724552364461118 ], [ -75.791094266973744, 39.723866364460477 ], [ -75.772353266956287, 39.383118364143129 ], [ -75.764319266948803, 39.295959364061957 ], [ -75.761313266946004, 39.247864364017161 ], [ -75.752576266937865, 39.141660363918255 ], [ -75.724590266911804, 38.830283363628261 ], [ -75.710712266898881, 38.649665363460045 ], [ -75.707073266895492, 38.5575913633743 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "West Virginia", "DRAWSEQ": 30, "STATE_FIPS": "54", "SUB_REGION": "South Atlantic", "STATE_ABBR": "WV" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -79.231663270178018, 38.480496363302493 ], [ -79.127427270080943, 38.658244363468043 ], [ -79.121064270075024, 38.663767363473184 ], [ -79.088546270044731, 38.659205363468935 ], [ -79.08723427004351, 38.707268363513691 ], [ -79.05655527001494, 38.762053363564718 ], [ -79.054800270013303, 38.79063336359134 ], [ -79.033742269993695, 38.799959363600024 ], [ -78.987453269950578, 38.846761363643608 ], [ -78.86656026983799, 38.763404363565975 ], [ -78.815861269790773, 38.833745363631486 ], [ -78.793055269769539, 38.880219363674769 ], [ -78.74925326972874, 38.911491363703888 ], [ -78.737732269718009, 38.929282363720461 ], [ -78.724143269705351, 38.930324363721432 ], [ -78.718986269700551, 38.904991363697839 ], [ -78.680227269664456, 38.921684363713382 ], [ -78.646969269633487, 38.950553363740269 ], [ -78.630847269618471, 38.979712363767433 ], [ -78.59869626958853, 38.967306363755874 ], [ -78.553208269546161, 39.013936363799303 ], [ -78.549202269542434, 39.023488363808198 ], [ -78.564179269556377, 39.035145363819055 ], [ -78.536651269530736, 39.057132363839528 ], [ -78.501600269498098, 39.093684363873578 ], [ -78.485250269482876, 39.111944363890579 ], [ -78.447979269448155, 39.11903636389718 ], [ -78.430569269431942, 39.148626363924741 ], [ -78.402362269405671, 39.170594363945199 ], [ -78.424068269425888, 39.197628363970381 ], [ -78.423069269424957, 39.212143363983898 ], [ -78.399127269402655, 39.244952364014452 ], [ -78.413547269416085, 39.257540364026177 ], [ -78.34084626934839, 39.341458364104327 ], [ -78.343928269351252, 39.350956364113173 ], [ -78.365474269371319, 39.361686364123173 ], [ -78.350231269357124, 39.380828364140996 ], [ -78.347546269354623, 39.456998364211941 ], [ -78.276881269288808, 39.423464364180703 ], [ -78.22950826924469, 39.391113364150577 ], [ -78.033328269061982, 39.265639364033717 ], [ -77.830680268873252, 39.132181363909424 ], [ -77.820044268863342, 39.141725363918312 ], [ -77.805449268849756, 39.196606363969423 ], [ -77.768232268815098, 39.246550364015945 ], [ -77.759458268806924, 39.284643364051419 ], [ -77.727467268777133, 39.317796364082298 ], [ -77.750089268798192, 39.326818364090698 ], [ -77.754300268802126, 39.338594364101667 ], [ -77.745450268793874, 39.360372364121943 ], [ -77.756223268803907, 39.378476364138805 ], [ -77.737233268786227, 39.396195364155304 ], [ -77.740834268789584, 39.403439364162054 ], [ -77.756986268804624, 39.425163364182282 ], [ -77.802275268846799, 39.432316364188949 ], [ -77.804694268849047, 39.440018364196121 ], [ -77.79579826884077, 39.450916364206272 ], [ -77.804190268848586, 39.463138364217656 ], [ -77.785109268830809, 39.459102364213891 ], [ -77.799498268844218, 39.480827364234131 ], [ -77.771551268818186, 39.498115364250225 ], [ -77.825187268868135, 39.493907364246311 ], [ -77.847877268889263, 39.502005364253847 ], [ -77.825263268868213, 39.512038364263191 ], [ -77.828925268871615, 39.529253364279228 ], [ -77.835464268877715, 39.525610364275835 ], [ -77.843849268885521, 39.531931364281718 ], [ -77.86463226890487, 39.514651364265632 ], [ -77.869561268909465, 39.545912364294743 ], [ -77.889916268928417, 39.558092364306091 ], [ -77.885171268923997, 39.564451364312006 ], [ -77.852959268893997, 39.565454364312941 ], [ -77.839867268881804, 39.572740364319728 ], [ -77.842407268884173, 39.605374364350126 ], [ -77.855523268896391, 39.602166364347134 ], [ -77.888437268927049, 39.616570364360548 ], [ -77.89074126892919, 39.600701364345767 ], [ -77.903253268940844, 39.596124364341506 ], [ -77.938609268973764, 39.618218364362079 ], [ -77.947543268982088, 39.6150133643591 ], [ -77.935458268970834, 39.591939364337605 ], [ -77.944979268979708, 39.586011364332087 ], [ -77.964236268997638, 39.611325364355665 ], [ -77.995205269026485, 39.598969364344157 ], [ -78.026418269055554, 39.622867364366414 ], [ -78.094338269118808, 39.67560036441553 ], [ -78.182972269201358, 39.694641364433259 ], [ -78.204304269221211, 39.675938364415842 ], [ -78.227598269242918, 39.673988364414022 ], [ -78.229230269244425, 39.658566364399661 ], [ -78.257726269270975, 39.641167364383456 ], [ -78.273016269285208, 39.618409364362265 ], [ -78.347923269354979, 39.640590364382916 ], [ -78.356781269363225, 39.632370364375262 ], [ -78.377670269382676, 39.631317364374283 ], [ -78.384636269389162, 39.61449436435862 ], [ -78.431894269433172, 39.620952364364626 ], [ -78.403999269407194, 39.587613364333578 ], [ -78.450631269450625, 39.592705364338322 ], [ -78.461816269461039, 39.580834364327266 ], [ -78.420822269422871, 39.549409364298 ], [ -78.445870269446189, 39.548318364296989 ], [ -78.455811269455452, 39.533735364283402 ], [ -78.481278269479176, 39.519937364270554 ], [ -78.508783269504789, 39.525159364275417 ], [ -78.564188269556382, 39.521073364271615 ], [ -78.604366269593811, 39.535683364285219 ], [ -78.637082269624273, 39.529949364279872 ], [ -78.649144269635514, 39.537998364287375 ], [ -78.666425269651597, 39.536929364286379 ], [ -78.716315269698072, 39.559572364307471 ], [ -78.732718269713345, 39.576642364323362 ], [ -78.761451269740107, 39.581792364328159 ], [ -78.773743269751549, 39.601617364346623 ], [ -78.736251269716632, 39.608792364353306 ], [ -78.730498269711276, 39.621544364365178 ], [ -78.732383269713026, 39.626965364370228 ], [ -78.767616269745844, 39.6266143643699 ], [ -78.772705269750588, 39.644241364386318 ], [ -78.798150269774283, 39.630833364373828 ], [ -78.798471269774581, 39.615418364359478 ], [ -78.822412269796871, 39.585698364331797 ], [ -78.806550269782107, 39.566823364314217 ], [ -78.838114269811499, 39.563318364310959 ], [ -78.870815269841955, 39.525790364276006 ], [ -78.955391269920725, 39.460458364215157 ], [ -78.970436269934737, 39.438525364194732 ], [ -79.048854270007766, 39.483815364236911 ], [ -79.064411270022262, 39.485825364238778 ], [ -79.07062927002805, 39.470849364224833 ], [ -79.104597270059685, 39.47087236422486 ], [ -79.096715270052343, 39.464628364219038 ], [ -79.104078270059205, 39.447306364202909 ], [ -79.13140027008464, 39.417031364174719 ], [ -79.158127270109532, 39.413960364171857 ], [ -79.163018270114094, 39.393495364152798 ], [ -79.260168270204574, 39.348641364111018 ], [ -79.279822270222866, 39.325243364089232 ], [ -79.29527327023726, 39.30054136406622 ], [ -79.346194270284684, 39.292092364058355 ], [ -79.384847270320691, 39.269300364037129 ], [ -79.449282270380692, 39.212093363983854 ], [ -79.461192270391791, 39.213264363984941 ], [ -79.489865270418491, 39.197395363970159 ], [ -79.480971270410208, 39.720274364457126 ], [ -79.765132270674854, 39.721807364458556 ], [ -79.918268270817478, 39.721667364458426 ], [ -80.429082271293211, 39.719842364456724 ], [ -80.524269271381854, 39.721209364458005 ], [ -80.524650271382214, 39.958419364678917 ], [ -80.524962271382506, 40.022825364738907 ], [ -80.526045271383509, 40.162521364869008 ], [ -80.523564271381204, 40.403033365092995 ], [ -80.52435727138193, 40.478784365163548 ], [ -80.521999271379741, 40.637203365311088 ], [ -80.574416271428561, 40.615974365291315 ], [ -80.611549271463133, 40.620063365295124 ], [ -80.637338271487152, 40.613982365289459 ], [ -80.66772727151546, 40.582137365259804 ], [ -80.668620271516289, 40.568279365246894 ], [ -80.633440271483522, 40.539204365219817 ], [ -80.625253271475898, 40.504464365187467 ], [ -80.601830271454091, 40.480539365165185 ], [ -80.627848271478314, 40.398226365088519 ], [ -80.629244271479621, 40.388663365079616 ], [ -80.609247271461001, 40.373275365065282 ], [ -80.604517271456587, 40.306244365002854 ], [ -80.614688271466065, 40.276502364975158 ], [ -80.650113271499052, 40.245679364946454 ], [ -80.678557271525548, 40.19415136489846 ], [ -80.700890271546342, 40.168181364874272 ], [ -80.70206527154744, 40.154090364861155 ], [ -80.738239271581122, 40.035664364750858 ], [ -80.738888271581729, 39.983476364702256 ], [ -80.763060271604246, 39.947015364668303 ], [ -80.758887271600358, 39.921266364644318 ], [ -80.768127271608961, 39.913313364636913 ], [ -80.796021271634942, 39.919839364642989 ], [ -80.807840271645944, 39.91590336463932 ], [ -80.812136271649948, 39.904901364629083 ], [ -80.790849271630123, 39.87234736459876 ], [ -80.798525271637274, 39.856722364584208 ], [ -80.825916271662791, 39.839667364568328 ], [ -80.819104271656443, 39.809001364539768 ], [ -80.870727271704524, 39.759993364494122 ], [ -80.856453271691223, 39.73633536447209 ], [ -80.832298271668733, 39.718834364455788 ], [ -80.83278727166919, 39.703400364441414 ], [ -80.863414271697707, 39.680351364419948 ], [ -80.872746271706404, 39.662411364403241 ], [ -80.881110271714192, 39.624081364367541 ], [ -80.912590271743511, 39.607353364351965 ], [ -80.932611271762156, 39.606941364351584 ], [ -80.983646271809675, 39.581805364328176 ], [ -81.03256827185524, 39.544142364293094 ], [ -81.037383271859724, 39.532664364282404 ], [ -81.098245271916412, 39.496451364248678 ], [ -81.117090271933961, 39.467784364221984 ], [ -81.180567271993084, 39.437800364194061 ], [ -81.200305272011462, 39.415896364173662 ], [ -81.22494827203441, 39.408358364166638 ], [ -81.237621272046212, 39.388472364148114 ], [ -81.284017272089429, 39.387072364146817 ], [ -81.338836272140483, 39.353644364115681 ], [ -81.375916272175019, 39.345690364108272 ], [ -81.433978272229083, 39.406023364164461 ], [ -81.447956272242109, 39.411027364169122 ], [ -81.46500827225799, 39.406858364165238 ], [ -81.540648272328426, 39.352709364114808 ], [ -81.557388272344028, 39.332655364096134 ], [ -81.572685272358271, 39.265917364033982 ], [ -81.66752227244659, 39.27049536403824 ], [ -81.689526272467077, 39.260226364028682 ], [ -81.697903272474889, 39.220020363991232 ], [ -81.723074272498323, 39.213268363984945 ], [ -81.758910272531708, 39.175751363949999 ], [ -81.744703272518478, 39.125875363903553 ], [ -81.753561272526724, 39.094720363874544 ], [ -81.786361272557272, 39.07725736385828 ], [ -81.819565272588193, 39.077017363858047 ], [ -81.824273272592578, 39.066416363848177 ], [ -81.813462272582512, 39.044108363827405 ], [ -81.775679272547322, 39.016829363801996 ], [ -81.781730272552963, 38.968529363757014 ], [ -81.762297272534852, 38.930181363721303 ], [ -81.783225272554347, 38.923562363715135 ], [ -81.82377727259211, 38.948467363738331 ], [ -81.840913272608077, 38.937889363728473 ], [ -81.86680027263219, 38.885709363679879 ], [ -81.892695272656297, 38.873453363668467 ], [ -81.915248272677303, 38.884446363678705 ], [ -81.931851272692768, 38.894742363688295 ], [ -81.898608272661804, 38.932224363723201 ], [ -81.927830272689022, 38.984271363771676 ], [ -81.937733272698239, 38.991175363778105 ], [ -81.975187272733123, 38.993006363779813 ], [ -81.999678272755929, 39.015261363800533 ], [ -82.04288527279617, 39.014139363799487 ], [ -82.058503272810725, 38.989065363776135 ], [ -82.085016272835418, 38.977198363765083 ], [ -82.101207272850488, 38.952094363741708 ], [ -82.139317272885989, 38.899398363692626 ], [ -82.1460992728923, 38.838787363636186 ], [ -82.197722272940382, 38.80461936360436 ], [ -82.216750272958095, 38.778939363580449 ], [ -82.183973272927574, 38.710303363516523 ], [ -82.188977272932235, 38.677893363486334 ], [ -82.173657272917964, 38.632190363443769 ], [ -82.184247272927834, 38.595032363409167 ], [ -82.213659272955226, 38.584835363399669 ], [ -82.270897273008529, 38.594890363409036 ], [ -82.289971273026296, 38.580081363395244 ], [ -82.314240273048895, 38.46522936328828 ], [ -82.329179273062806, 38.441952363266601 ], [ -82.394764273123883, 38.42847036325405 ], [ -82.414891273142629, 38.430392363255834 ], [ -82.494987273217234, 38.40583236323296 ], [ -82.547548273266173, 38.400511363228006 ], [ -82.575419273292141, 38.403902363231168 ], [ -82.586604273302555, 38.412519363239184 ], [ -82.598239273313382, 38.368464363198157 ], [ -82.572298273289235, 38.307811363141667 ], [ -82.580049273296453, 38.29251036312742 ], [ -82.574579273291349, 38.255973363093389 ], [ -82.589113273304889, 38.245388363083535 ], [ -82.616228273330137, 38.23881136307741 ], [ -82.60664527332122, 38.193826363035512 ], [ -82.613763273327848, 38.178095363020866 ], [ -82.647158273358954, 38.169435363012795 ], [ -82.646128273357988, 38.146330362991279 ], [ -82.593208273308704, 38.109962362957411 ], [ -82.524678273244874, 38.015662362869591 ], [ -82.475779273199336, 37.975907362832558 ], [ -82.480174273203431, 37.954396362812531 ], [ -82.493396273215751, 37.942513362801463 ], [ -82.500209273222097, 37.922262362782604 ], [ -82.437607273163792, 37.894854362757073 ], [ -82.421508273148802, 37.872356362736127 ], [ -82.405805273134177, 37.811719362679653 ], [ -82.339846273072737, 37.78440036265421 ], [ -82.319498273053796, 37.758426362630019 ], [ -82.329401273063013, 37.74417136261674 ], [ -82.295625273031561, 37.669058362546792 ], [ -82.238371272978242, 37.656776362535354 ], [ -82.20544027294757, 37.62401636250484 ], [ -82.185549272929038, 37.640667362520347 ], [ -82.159310272904605, 37.593569362476487 ], [ -82.131781272878968, 37.590537362473654 ], [ -82.137473272884264, 37.569896362454436 ], [ -82.146522272892696, 37.565921362450737 ], [ -82.142509272888958, 37.557452362442845 ], [ -82.084392272834833, 37.548310362434336 ], [ -82.055665272808085, 37.525342362412943 ], [ -82.049134272801993, 37.551453362437258 ], [ -82.026351272780772, 37.530519362417763 ], [ -81.976574272734425, 37.543253362429624 ], [ -81.959575272718581, 37.531172362418374 ], [ -81.935450272696116, 37.506644362395527 ], [ -81.947993272707805, 37.493026362382849 ], [ -81.976422272734283, 37.482905362373415 ], [ -81.988202272745241, 37.466586362358221 ], [ -81.920733272682412, 37.415516362310655 ], [ -81.926822272688085, 37.37172736226988 ], [ -81.897158272660462, 37.340588362240879 ], [ -81.863815272629409, 37.325456362226781 ], [ -81.858681272624622, 37.307031362209628 ], [ -81.838889272606195, 37.285505362189575 ], [ -81.81538127258429, 37.279539362184018 ], [ -81.792659272563128, 37.287153362191106 ], [ -81.751854272525136, 37.272257362177236 ], [ -81.73845627251265, 37.250491362156964 ], [ -81.701728272478448, 37.235434362142939 ], [ -81.665885272445067, 37.204910362114518 ], [ -81.556654272343337, 37.206352362115858 ], [ -81.505536272295728, 37.234372362141954 ], [ -81.495533272286409, 37.252850362159165 ], [ -81.475360272267622, 37.254422362160625 ], [ -81.403344272200556, 37.282624362186894 ], [ -81.390946272189012, 37.311154362213458 ], [ -81.358795272159071, 37.338952362239354 ], [ -81.311873272115363, 37.29370736219721 ], [ -81.222933272032535, 37.240214362147398 ], [ -81.140737271955985, 37.274925362179722 ], [ -81.02493227184813, 37.286061362190097 ], [ -80.985936271811809, 37.306241362208887 ], [ -80.978535271804915, 37.296475362199793 ], [ -80.967892271795009, 37.291791362195426 ], [ -80.934183271763615, 37.301370362204352 ], [ -80.855429271690269, 37.33941136223978 ], [ -80.848418271683741, 37.350943362250518 ], [ -80.87735827171069, 37.388697362285683 ], [ -80.850525271685697, 37.423460362318053 ], [ -80.799611271638284, 37.413062362308374 ], [ -80.799244271637946, 37.391753362288526 ], [ -80.770022271610728, 37.386195362283345 ], [ -80.762995271604183, 37.371414362269583 ], [ -80.747689271589934, 37.379081362276722 ], [ -80.746324271588662, 37.387737362284781 ], [ -80.729737271573214, 37.392719362289426 ], [ -80.705207271550364, 37.38837836228538 ], [ -80.597491271450053, 37.446054362339098 ], [ -80.542755271399074, 37.469210362360663 ], [ -80.508765271367409, 37.475047362366098 ], [ -80.487881271347959, 37.460597362352644 ], [ -80.486797271346958, 37.433860362327742 ], [ -80.474764271335744, 37.422821362317464 ], [ -80.425378271289759, 37.434906362328718 ], [ -80.388306271255232, 37.465725362357418 ], [ -80.352157271221557, 37.476101362367082 ], [ -80.347511271217229, 37.491177362381123 ], [ -80.287916271161734, 37.51115136239973 ], [ -80.280730271155036, 37.53625936242311 ], [ -80.308303271180719, 37.528370362415757 ], [ -80.325906271197113, 37.533401362420449 ], [ -80.316721271188555, 37.566718362451475 ], [ -80.246393271123068, 37.596896362479583 ], [ -80.218928271097482, 37.624266362505068 ], [ -80.254422271130537, 37.640703362520384 ], [ -80.300932271173849, 37.640547362520238 ], [ -80.304862271177512, 37.65224636253113 ], [ -80.295700271168982, 37.671502362549063 ], [ -80.303109271175884, 37.682671362559461 ], [ -80.250033271126455, 37.726052362599866 ], [ -80.254689271130786, 37.757232362628905 ], [ -80.220546271098996, 37.778858362649046 ], [ -80.223735271101958, 37.802364362670943 ], [ -80.171594271053394, 37.842968362708753 ], [ -80.172220271053988, 37.860184362724787 ], [ -80.160005271042607, 37.877228362740659 ], [ -80.118507271003963, 37.891278362753745 ], [ -80.106490270992765, 37.914658362775519 ], [ -80.054807270944636, 37.95564836281369 ], [ -80.000499270894053, 37.989870362845565 ], [ -79.966493270862387, 38.038621362890964 ], [ -79.957513270854022, 38.067365362917741 ], [ -79.928292270826802, 38.103311362951217 ], [ -79.935327270833355, 38.12130836296798 ], [ -79.910340270810082, 38.162606363006439 ], [ -79.916161270815508, 38.179264363021957 ], [ -79.831152270736339, 38.25027936308809 ], [ -79.793622270701391, 38.268666363105211 ], [ -79.78651127069476, 38.285118363120539 ], [ -79.802778270709908, 38.298870363133346 ], [ -79.800329270707635, 38.314326363147742 ], [ -79.764004270673809, 38.353991363184676 ], [ -79.732829270644771, 38.351840363182674 ], [ -79.720035270632849, 38.394685363222578 ], [ -79.684092270599379, 38.43023836325569 ], [ -79.692653270607352, 38.500354363320994 ], [ -79.665614270582168, 38.520778363340014 ], [ -79.669430270585721, 38.550177363367396 ], [ -79.642406270560556, 38.592355363406675 ], [ -79.536513270461938, 38.55380536337077 ], [ -79.486347270415209, 38.462145363285408 ], [ -79.316999270257497, 38.412633363239294 ], [ -79.272359270215915, 38.437306363262273 ], [ -79.231663270178018, 38.480496363302493 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Maryland", "DRAWSEQ": 31, "STATE_FIPS": "24", "SUB_REGION": "South Atlantic", "STATE_ABBR": "MD" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -75.710712266898881, 38.649665363460045 ], [ -75.724590266911804, 38.830283363628261 ], [ -75.752576266937865, 39.141660363918255 ], [ -75.761313266946004, 39.247864364017161 ], [ -75.764319266948803, 39.295959364061957 ], [ -75.772353266956287, 39.383118364143129 ], [ -75.791094266973744, 39.723866364460477 ], [ -76.139223267297965, 39.722229364458954 ], [ -76.233122267385411, 39.721853364458603 ], [ -76.569834267698994, 39.72026536445712 ], [ -76.7904912679045, 39.721256364458043 ], [ -76.996812268096647, 39.720891364457707 ], [ -77.221051268305487, 39.72067936445751 ], [ -77.464433268532161, 39.720073364456944 ], [ -77.475793268542745, 39.719623364456524 ], [ -78.095948269120299, 39.725461364461964 ], [ -78.334550269342515, 39.724096364460692 ], [ -78.384783269389303, 39.723748364460363 ], [ -78.817758269792549, 39.723115364459773 ], [ -78.930173269897239, 39.722337364459051 ], [ -79.396610270331635, 39.719313364456241 ], [ -79.480971270410208, 39.720274364457126 ], [ -79.489865270418491, 39.197395363970159 ], [ -79.461192270391791, 39.213264363984941 ], [ -79.449282270380692, 39.212093363983854 ], [ -79.384847270320691, 39.269300364037129 ], [ -79.346194270284684, 39.292092364058355 ], [ -79.29527327023726, 39.30054136406622 ], [ -79.279822270222866, 39.325243364089232 ], [ -79.260168270204574, 39.348641364111018 ], [ -79.163018270114094, 39.393495364152798 ], [ -79.158127270109532, 39.413960364171857 ], [ -79.13140027008464, 39.417031364174719 ], [ -79.104078270059205, 39.447306364202909 ], [ -79.096715270052343, 39.464628364219038 ], [ -79.104597270059685, 39.47087236422486 ], [ -79.07062927002805, 39.470849364224833 ], [ -79.064411270022262, 39.485825364238778 ], [ -79.048854270007766, 39.483815364236911 ], [ -78.970436269934737, 39.438525364194732 ], [ -78.955391269920725, 39.460458364215157 ], [ -78.870815269841955, 39.525790364276006 ], [ -78.838114269811499, 39.563318364310959 ], [ -78.806550269782107, 39.566823364314217 ], [ -78.822412269796871, 39.585698364331797 ], [ -78.798471269774581, 39.615418364359478 ], [ -78.798150269774283, 39.630833364373828 ], [ -78.772705269750588, 39.644241364386318 ], [ -78.767616269745844, 39.6266143643699 ], [ -78.732383269713026, 39.626965364370228 ], [ -78.730498269711276, 39.621544364365178 ], [ -78.736251269716632, 39.608792364353306 ], [ -78.773743269751549, 39.601617364346623 ], [ -78.761451269740107, 39.581792364328159 ], [ -78.732718269713345, 39.576642364323362 ], [ -78.716315269698072, 39.559572364307471 ], [ -78.666425269651597, 39.536929364286379 ], [ -78.649144269635514, 39.537998364287375 ], [ -78.637082269624273, 39.529949364279872 ], [ -78.604366269593811, 39.535683364285219 ], [ -78.564188269556382, 39.521073364271615 ], [ -78.508783269504789, 39.525159364275417 ], [ -78.481278269479176, 39.519937364270554 ], [ -78.455811269455452, 39.533735364283402 ], [ -78.445870269446189, 39.548318364296989 ], [ -78.420822269422871, 39.549409364298 ], [ -78.461816269461039, 39.580834364327266 ], [ -78.450631269450625, 39.592705364338322 ], [ -78.403999269407194, 39.587613364333578 ], [ -78.431894269433172, 39.620952364364626 ], [ -78.384636269389162, 39.61449436435862 ], [ -78.377670269382676, 39.631317364374283 ], [ -78.356781269363225, 39.632370364375262 ], [ -78.347923269354979, 39.640590364382916 ], [ -78.273016269285208, 39.618409364362265 ], [ -78.257726269270975, 39.641167364383456 ], [ -78.229230269244425, 39.658566364399661 ], [ -78.227598269242918, 39.673988364414022 ], [ -78.204304269221211, 39.675938364415842 ], [ -78.182972269201358, 39.694641364433259 ], [ -78.094338269118808, 39.67560036441553 ], [ -78.026418269055554, 39.622867364366414 ], [ -77.995205269026485, 39.598969364344157 ], [ -77.964236268997638, 39.611325364355665 ], [ -77.944979268979708, 39.586011364332087 ], [ -77.935458268970834, 39.591939364337605 ], [ -77.947543268982088, 39.6150133643591 ], [ -77.938609268973764, 39.618218364362079 ], [ -77.903253268940844, 39.596124364341506 ], [ -77.89074126892919, 39.600701364345767 ], [ -77.888437268927049, 39.616570364360548 ], [ -77.855523268896391, 39.602166364347134 ], [ -77.842407268884173, 39.605374364350126 ], [ -77.839867268881804, 39.572740364319728 ], [ -77.852959268893997, 39.565454364312941 ], [ -77.885171268923997, 39.564451364312006 ], [ -77.889916268928417, 39.558092364306091 ], [ -77.869561268909465, 39.545912364294743 ], [ -77.86463226890487, 39.514651364265632 ], [ -77.843849268885521, 39.531931364281718 ], [ -77.835464268877715, 39.525610364275835 ], [ -77.828925268871615, 39.529253364279228 ], [ -77.825263268868213, 39.512038364263191 ], [ -77.847877268889263, 39.502005364253847 ], [ -77.825187268868135, 39.493907364246311 ], [ -77.771551268818186, 39.498115364250225 ], [ -77.799498268844218, 39.480827364234131 ], [ -77.785109268830809, 39.459102364213891 ], [ -77.804190268848586, 39.463138364217656 ], [ -77.79579826884077, 39.450916364206272 ], [ -77.804694268849047, 39.440018364196121 ], [ -77.802275268846799, 39.432316364188949 ], [ -77.756986268804624, 39.425163364182282 ], [ -77.740834268789584, 39.403439364162054 ], [ -77.737233268786227, 39.396195364155304 ], [ -77.756223268803907, 39.378476364138805 ], [ -77.745450268793874, 39.360372364121943 ], [ -77.754300268802126, 39.338594364101667 ], [ -77.750089268798192, 39.326818364090698 ], [ -77.727467268777133, 39.317796364082298 ], [ -77.679302268732272, 39.318781364083208 ], [ -77.616236268673532, 39.299818364065551 ], [ -77.56867326862924, 39.298495364064323 ], [ -77.541901268604306, 39.269042364036892 ], [ -77.49377326855948, 39.250014364019165 ], [ -77.464667268532381, 39.229160363999746 ], [ -77.461707268529622, 39.218735363990035 ], [ -77.478347268545122, 39.1770373639512 ], [ -77.516328268580494, 39.157549363933057 ], [ -77.512758268577159, 39.116759363895063 ], [ -77.478959268545694, 39.104064363883239 ], [ -77.459404268527479, 39.080944363861704 ], [ -77.432746268502655, 39.066884363848615 ], [ -77.346226268422072, 39.068620363850229 ], [ -77.324306268401656, 39.062696363844715 ], [ -77.255692268337754, 39.027681363812107 ], [ -77.24343226832633, 38.975989363763958 ], [ -77.151747268240953, 38.964889363753628 ], [ -77.12232826821355, 38.932171363723157 ], [ -77.042088268138826, 38.993541363780309 ], [ -77.007930268107003, 38.966667363755278 ], [ -76.910904268016651, 38.89010036368397 ], [ -77.045147268141676, 38.788234363589098 ], [ -77.04616926814262, 38.718895363524524 ], [ -77.056820268152535, 38.712136363518226 ], [ -77.081578268175605, 38.715394363521263 ], [ -77.092847268186091, 38.704099363510743 ], [ -77.124815268215869, 38.677915363486363 ], [ -77.129690268220401, 38.648242363458721 ], [ -77.277459268358029, 38.487220363308765 ], [ -77.255577268337646, 38.413717363240309 ], [ -77.220626268305097, 38.390787363218948 ], [ -77.002092268101578, 38.426977363252654 ], [ -76.972725268074214, 38.331155363163411 ], [ -76.908270268014192, 38.299978363134372 ], [ -76.863873267972849, 38.391471363219587 ], [ -76.759927267876037, 38.234409363073311 ], [ -76.576950267705627, 38.222764363062467 ], [ -76.329838267475481, 38.045830362897682 ], [ -76.343450267488166, 38.213187363053549 ], [ -76.646937267770809, 38.450548363274606 ], [ -76.519757267652366, 38.410261363237083 ], [ -76.471598267607504, 38.335783363167721 ], [ -76.421136267560513, 38.320623363153601 ], [ -76.405129267545604, 38.346143363177376 ], [ -76.385482267527308, 38.391404363219522 ], [ -76.50857126764194, 38.522221363341359 ], [ -76.52493126765718, 38.709751363516006 ], [ -76.548805267679413, 38.759089363561955 ], [ -76.471718267607628, 38.908351363700973 ], [ -76.423616267562821, 39.118464363896649 ], [ -76.563605267693191, 39.196374363969213 ], [ -76.594826267722269, 39.158796363934215 ], [ -76.607018267733636, 39.181092363954974 ], [ -76.576667267705361, 39.198228363970941 ], [ -76.564819267694332, 39.231553364001975 ], [ -76.60371526773055, 39.259460364027966 ], [ -76.53098126766281, 39.242726364012384 ], [ -76.398721267539642, 39.231252364001691 ], [ -76.363710267507031, 39.393388364152699 ], [ -76.226338267379091, 39.374998364135564 ], [ -76.154200267311907, 39.402046364160753 ], [ -76.078178267241114, 39.542475364291548 ], [ -76.03108026719724, 39.57004136431722 ], [ -75.974430267144484, 39.524137364274466 ], [ -75.952303267123881, 39.471295364225256 ], [ -75.97846426714824, 39.394663364153885 ], [ -75.849399267028048, 39.379251364139527 ], [ -76.03709126720284, 39.358480364120183 ], [ -76.112045267272649, 39.321407364085658 ], [ -76.218112267371438, 39.204962363977209 ], [ -76.238567267390479, 39.130935363908264 ], [ -76.221446267374532, 39.093029363872965 ], [ -76.110952267271628, 39.118705363896879 ], [ -76.199342267353956, 38.973467363761614 ], [ -76.113536267274043, 38.920829363712585 ], [ -76.095164267256933, 38.948244363738127 ], [ -76.102564267263816, 38.898132363691452 ], [ -76.075532267238643, 38.889663363683567 ], [ -76.114039267274507, 38.885570363679747 ], [ -76.165523267322456, 38.788725363589563 ], [ -76.194843267349768, 38.765372363567806 ], [ -76.272088267421708, 38.834115363631831 ], [ -76.350204267494448, 38.699143363506124 ], [ -76.337295267482432, 38.679494363487834 ], [ -76.266791267416764, 38.770004363572127 ], [ -76.222981267375971, 38.762908363565515 ], [ -76.173708267330085, 38.709213363515502 ], [ -76.123703267283503, 38.708094363514462 ], [ -76.075659267238763, 38.610900363423944 ], [ -76.046582267211676, 38.591976363406317 ], [ -76.027722267194122, 38.622123363434397 ], [ -76.031597267197725, 38.572040363387757 ], [ -76.250721267401801, 38.595201363409323 ], [ -76.191881267347, 38.543463363361141 ], [ -76.291653267439926, 38.478851363300961 ], [ -76.293942267442048, 38.437057363262042 ], [ -76.065120267228949, 38.259057363096268 ], [ -76.020464267187364, 38.322017363154899 ], [ -75.994942267163594, 38.282646363118232 ], [ -75.949584267121352, 38.282177363117796 ], [ -75.886481267062578, 38.375581363204788 ], [ -75.872092267049183, 38.35735136318781 ], [ -75.894613267070156, 38.258995363096204 ], [ -75.793826266976282, 38.263724363100614 ], [ -75.861325267039149, 38.240166363078671 ], [ -75.837726267017175, 38.231716363070802 ], [ -75.897451267072796, 38.175057363018034 ], [ -75.769206266953361, 38.09737136294568 ], [ -75.865385267042925, 37.979780362836166 ], [ -75.647866266840353, 37.970255362827302 ], [ -75.626084266820058, 37.996541362851779 ], [ -75.372420266583816, 38.016833362870678 ], [ -75.373068266584426, 38.0690413629193 ], [ -75.262499266481456, 38.201533363042692 ], [ -75.150617266377253, 38.273881363110071 ], [ -75.154873266381216, 38.369739363199344 ], [ -75.092721266323323, 38.450563363274625 ], [ -75.349842266562788, 38.455322363279052 ], [ -75.698802266887782, 38.463182363286371 ], [ -75.707073266895492, 38.5575913633743 ], [ -75.710712266898881, 38.649665363460045 ] ] ], [ [ [ -76.292804267440999, 38.90783636370049 ], [ -76.273189267422723, 38.949343363739146 ], [ -76.24640926739778, 38.923694363715256 ], [ -76.247822267399101, 38.979009363766778 ], [ -76.299490267447226, 39.040707363824239 ], [ -76.356474267500289, 38.958300363747483 ], [ -76.375240267517768, 38.854218363650553 ], [ -76.32938726747507, 38.876003363670847 ], [ -76.34222126748702, 38.924170363715703 ], [ -76.322308267468472, 38.912200363704557 ], [ -76.314130267460854, 38.942038363732337 ], [ -76.338743267483778, 38.956774363746064 ], [ -76.294186267442285, 38.967680363756223 ], [ -76.292804267440999, 38.90783636370049 ] ] ], [ [ [ -75.067924266300238, 38.450075363274166 ], [ -75.087320266318301, 38.323059363155878 ], [ -75.045623266279463, 38.449602363273726 ], [ -75.067924266300238, 38.450075363274166 ] ] ], [ [ [ -75.270357266488773, 38.027709362880806 ], [ -75.242219266462556, 38.028647362881685 ], [ -75.172812266397926, 38.124306362970771 ], [ -75.094027266324545, 38.320316363153317 ], [ -75.164373266390058, 38.204962363045887 ], [ -75.209388266431986, 38.094297362942825 ], [ -75.244096266464311, 38.038023362890414 ], [ -75.270357266488773, 38.027709362880806 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Colorado", "DRAWSEQ": 32, "STATE_FIPS": "08", "SUB_REGION": "Mountain", "STATE_ABBR": "CO" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -102.044456291424098, 37.641474362521095 ], [ -102.043976291423647, 37.734398362607635 ], [ -102.046061291425588, 38.253822363091388 ], [ -102.045549291425104, 38.263343363100262 ], [ -102.047584291427, 38.615499363428228 ], [ -102.047568291426984, 38.69255036349999 ], [ -102.048972291428299, 39.037003363820787 ], [ -102.047874291427277, 39.126753363904371 ], [ -102.048801291428134, 39.562803364310476 ], [ -102.049442291428733, 39.568693364315962 ], [ -102.051535291430682, 39.998918364716637 ], [ -102.047545291426971, 40.342644365036762 ], [ -102.047620291427037, 40.431077365119123 ], [ -102.046031291425564, 40.697319365367079 ], [ -102.046992291426449, 40.743130365409741 ], [ -102.047739291427149, 40.998071365647171 ], [ -102.621257291961285, 41.000214365649171 ], [ -102.652271291990161, 40.998124365647222 ], [ -103.38295629267067, 41.000316365649262 ], [ -103.57231629284702, 40.999648365648639 ], [ -104.051705293293494, 41.003211365651964 ], [ -104.934493294115654, 40.994289365643652 ], [ -105.278797294436302, 40.996349365645571 ], [ -106.203471295297476, 41.000085365649049 ], [ -106.329125295414499, 41.001289365650166 ], [ -106.865438295913975, 40.998457365647532 ], [ -107.30405129632247, 41.000133365649091 ], [ -107.918671296894885, 41.003375365652111 ], [ -109.048314297946945, 40.998433365647514 ], [ -109.046155297944935, 40.665291365337247 ], [ -109.051263297949689, 40.2105113649137 ], [ -109.052551297950885, 39.657382364398558 ], [ -109.0535282979518, 39.518170364268911 ], [ -109.051417297949826, 39.360966364122504 ], [ -109.053948297952189, 38.494651363315683 ], [ -109.055861297953967, 38.244920363083097 ], [ -109.043464297942421, 38.15293336299743 ], [ -109.043206297942191, 37.887420362750149 ], [ -109.045602297944413, 37.630820362511173 ], [ -109.048480297947094, 36.996641361920553 ], [ -108.372473297317512, 36.999471361923185 ], [ -107.472460296479312, 36.998776361922538 ], [ -107.410820296421903, 36.997525361921376 ], [ -106.890370295937203, 36.999083361922828 ], [ -106.861249295910085, 36.989501361913895 ], [ -106.472177295547723, 36.991504361915766 ], [ -105.992000295100524, 36.992289361916498 ], [ -105.713460294841113, 36.994560361918616 ], [ -105.213091294375118, 36.99260436191679 ], [ -105.146172294312791, 36.993207361917356 ], [ -103.993635293239407, 36.994469361918526 ], [ -103.077866292386531, 36.99976036192345 ], [ -102.997709292311882, 36.998523361922302 ], [ -102.037207291417346, 36.988994361913427 ], [ -102.042010291421818, 37.386279362283432 ], [ -102.044456291424098, 37.641474362521095 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Kentucky", "DRAWSEQ": 33, "STATE_FIPS": "21", "SUB_REGION": "East South Central", "STATE_ABBR": "KY" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -86.510668276957119, 36.655074361602445 ], [ -86.415443276868444, 36.650932361598585 ], [ -86.198992276666857, 36.643290361591468 ], [ -85.980610276463466, 36.633112361581986 ], [ -85.785476276281742, 36.626685361576001 ], [ -85.437374275957538, 36.618199361568102 ], [ -85.300094275829693, 36.626101361575458 ], [ -85.272498275803983, 36.625616361575005 ], [ -84.998461275548763, 36.62098236157069 ], [ -84.791057275355612, 36.60543836155621 ], [ -84.781871275347058, 36.605076361555874 ], [ -84.256777274858024, 36.595498361546959 ], [ -84.254488274855888, 36.595452361546918 ], [ -84.006746274625158, 36.59208836154378 ], [ -83.935600274558908, 36.591290361543038 ], [ -83.695608274335399, 36.584249361536479 ], [ -83.675177274316368, 36.598704361549942 ], [ -83.646802274289939, 36.61697736156696 ], [ -83.530895274181987, 36.661481361608409 ], [ -83.460221274116179, 36.661832361608731 ], [ -83.404150274063952, 36.672327361618514 ], [ -83.385855274046918, 36.688219361633308 ], [ -83.321383273986868, 36.709533361653158 ], [ -83.203656273877229, 36.734260361676192 ], [ -83.138513273816557, 36.740059361681588 ], [ -83.124391273803411, 36.751167361691934 ], [ -83.128220273806974, 36.779152361717998 ], [ -83.067952273750848, 36.850996361784908 ], [ -83.046634273730987, 36.858793361792166 ], [ -82.950805273641748, 36.864078361797091 ], [ -82.878043273573979, 36.893694361824672 ], [ -82.860632273557755, 36.932162361860499 ], [ -82.86656027356328, 36.974585361900012 ], [ -82.812222273512674, 37.005600361928899 ], [ -82.723598273430142, 37.033992361955335 ], [ -82.720057273426846, 37.065929361985084 ], [ -82.709170273416703, 37.075482361993977 ], [ -82.721377273428075, 37.093117362010403 ], [ -82.719096273425947, 37.110017362026142 ], [ -82.568022273285251, 37.193919362104282 ], [ -82.550040273268507, 37.199378362109364 ], [ -82.405885273134245, 37.250704362157165 ], [ -82.353842273085775, 37.260519362166306 ], [ -82.288951273025347, 37.304861362207603 ], [ -81.959575272718581, 37.531172362418374 ], [ -81.976574272734425, 37.543253362429624 ], [ -82.026351272780772, 37.530519362417763 ], [ -82.049134272801993, 37.551453362437258 ], [ -82.055665272808085, 37.525342362412943 ], [ -82.084392272834833, 37.548310362434336 ], [ -82.142509272888958, 37.557452362442845 ], [ -82.146522272892696, 37.565921362450737 ], [ -82.137473272884264, 37.569896362454436 ], [ -82.131781272878968, 37.590537362473654 ], [ -82.159310272904605, 37.593569362476487 ], [ -82.185549272929038, 37.640667362520347 ], [ -82.20544027294757, 37.62401636250484 ], [ -82.238371272978242, 37.656776362535354 ], [ -82.295625273031561, 37.669058362546792 ], [ -82.329401273063013, 37.74417136261674 ], [ -82.319498273053796, 37.758426362630019 ], [ -82.339846273072737, 37.78440036265421 ], [ -82.405805273134177, 37.811719362679653 ], [ -82.421508273148802, 37.872356362736127 ], [ -82.437607273163792, 37.894854362757073 ], [ -82.500209273222097, 37.922262362782604 ], [ -82.493396273215751, 37.942513362801463 ], [ -82.480174273203431, 37.954396362812531 ], [ -82.475779273199336, 37.975907362832558 ], [ -82.524678273244874, 38.015662362869591 ], [ -82.593208273308704, 38.109962362957411 ], [ -82.646128273357988, 38.146330362991279 ], [ -82.647158273358954, 38.169435363012795 ], [ -82.613763273327848, 38.178095363020866 ], [ -82.60664527332122, 38.193826363035512 ], [ -82.616228273330137, 38.23881136307741 ], [ -82.589113273304889, 38.245388363083535 ], [ -82.574579273291349, 38.255973363093389 ], [ -82.580049273296453, 38.29251036312742 ], [ -82.572298273289235, 38.307811363141667 ], [ -82.598239273313382, 38.368464363198157 ], [ -82.586604273302555, 38.412519363239184 ], [ -82.613743273327827, 38.472668363295206 ], [ -82.669760273379993, 38.502140363322653 ], [ -82.69557927340405, 38.539142363357115 ], [ -82.741945273447229, 38.553066363370085 ], [ -82.8023642735035, 38.557288363374013 ], [ -82.826992273526429, 38.571662363387404 ], [ -82.853856273551457, 38.600458363414219 ], [ -82.860029273557203, 38.652395363462588 ], [ -82.880011273575803, 38.683301363491374 ], [ -82.873191273569461, 38.719006363524628 ], [ -82.890312273585408, 38.742775363546762 ], [ -82.921304273614268, 38.746414363550151 ], [ -82.972483273661936, 38.719643363525222 ], [ -83.026943273712646, 38.714512363520441 ], [ -83.06088027374426, 38.685726363493629 ], [ -83.11124327379116, 38.664833363474173 ], [ -83.143150273820879, 38.619339363431806 ], [ -83.181939273856997, 38.609841363422959 ], [ -83.245013273915745, 38.624172363436301 ], [ -83.272755273941584, 38.609257363422415 ], [ -83.290043273957679, 38.596638363410662 ], [ -83.306531273973036, 38.596317363410364 ], [ -83.320325273985887, 38.606563363419909 ], [ -83.330023273994911, 38.631988363443583 ], [ -83.371422274033478, 38.654997363465014 ], [ -83.453616274110018, 38.663774363473188 ], [ -83.500073274153294, 38.69013736349774 ], [ -83.526556274177949, 38.696111363503306 ], [ -83.618378274263463, 38.677972363486411 ], [ -83.63324127427731, 38.664972363474305 ], [ -83.64318927428657, 38.635862363447188 ], [ -83.655755274298272, 38.623880363436029 ], [ -83.678530274319485, 38.620928363433286 ], [ -83.712825274351431, 38.635553363446903 ], [ -83.770223274404884, 38.650819363461125 ], [ -83.790465274423738, 38.693844363501192 ], [ -83.837532274467577, 38.711880363517992 ], [ -83.85755227448621, 38.744918363548763 ], [ -83.912539274537423, 38.757960363560905 ], [ -83.962163274583645, 38.777647363579241 ], [ -84.053801274668984, 38.763735363566283 ], [ -84.088867274701641, 38.765504363567928 ], [ -84.176752274783496, 38.788498363589348 ], [ -84.228702274831875, 38.812690363611878 ], [ -84.235294274838012, 38.874555363669494 ], [ -84.26152527486245, 38.917477363709466 ], [ -84.290136274889093, 38.944538363734665 ], [ -84.313315274910678, 39.014074363799431 ], [ -84.345779274940909, 39.037812363821537 ], [ -84.391312274983321, 39.035744363819617 ], [ -84.419740275009801, 39.047337363830408 ], [ -84.425683275015331, 39.084724363865227 ], [ -84.444918275033245, 39.11182736389047 ], [ -84.49205327507714, 39.107363363886314 ], [ -84.515301275098793, 39.09419536387405 ], [ -84.59306827517122, 39.07026536385176 ], [ -84.62264827519877, 39.074934363856116 ], [ -84.667487275240532, 39.089624363869788 ], [ -84.742875275310737, 39.142063363918631 ], [ -84.789927275354557, 39.107033363886003 ], [ -84.811480275374635, 39.102585363881865 ], [ -84.827861275389893, 39.103687363882891 ], [ -84.88670827544469, 39.065045363846906 ], [ -84.889996275447757, 39.050648363833488 ], [ -84.876293275434989, 39.032895363816962 ], [ -84.844225275405122, 39.005831363791756 ], [ -84.834444275396024, 38.98277536377028 ], [ -84.846316275407077, 38.95463136374407 ], [ -84.875880275434611, 38.927604363718899 ], [ -84.875254275434031, 38.90943136370197 ], [ -84.859743275419575, 38.902042363695088 ], [ -84.803224275366944, 38.897190363690569 ], [ -84.78866727535339, 38.884385363678646 ], [ -84.787446275352252, 38.866643363662121 ], [ -84.824426275386685, 38.834463363632153 ], [ -84.818780275381428, 38.793410363593921 ], [ -84.975611275527484, 38.780641363582028 ], [ -85.025073275573561, 38.764291363566798 ], [ -85.068454275613959, 38.75042436355389 ], [ -85.119657275661638, 38.71413936352009 ], [ -85.160933275700089, 38.695176363502434 ], [ -85.205162275741273, 38.695817363503032 ], [ -85.271394275802962, 38.744376363548255 ], [ -85.335009275862205, 38.73700636354139 ], [ -85.418186275939675, 38.738417363542709 ], [ -85.446690275966219, 38.724840363530063 ], [ -85.453679275972732, 38.694674363501967 ], [ -85.424404275945463, 38.584840363399678 ], [ -85.41746127593899, 38.561475363377916 ], [ -85.432370275952877, 38.537016363355136 ], [ -85.466382275984557, 38.518175363337591 ], [ -85.507200276022573, 38.471419363294046 ], [ -85.612640276120771, 38.446670363270997 ], [ -85.643593276149602, 38.383688363212343 ], [ -85.6542282761595, 38.337753363169554 ], [ -85.681389276184802, 38.300953363135285 ], [ -85.74692627624583, 38.270315363106747 ], [ -85.786211276282415, 38.282391363117995 ], [ -85.806551276301363, 38.286179363121526 ], [ -85.839907276332426, 38.276291363112321 ], [ -85.852335276344007, 38.238561363077181 ], [ -85.912074276399636, 38.18000136302264 ], [ -85.914751276402129, 38.064874362915418 ], [ -85.930872276417148, 38.034049362886712 ], [ -85.958582276442954, 38.011840362866025 ], [ -86.006663276487728, 38.001767362856647 ], [ -86.031620276510978, 37.992950362848433 ], [ -86.05271527653062, 37.966784362824065 ], [ -86.104986276579297, 38.011336362865563 ], [ -86.190621276659058, 38.01775836287154 ], [ -86.252155276716366, 38.040721362892924 ], [ -86.277699276740151, 38.05817336290918 ], [ -86.291440276752951, 38.078489362928096 ], [ -86.297674276758755, 38.150304362994987 ], [ -86.341606276799666, 38.177288363020111 ], [ -86.364350276820858, 38.193290363035018 ], [ -86.388307276843165, 38.194808363036429 ], [ -86.387101276842046, 38.168021363011484 ], [ -86.343124276801092, 38.155559362999881 ], [ -86.335418276793902, 38.144028362989133 ], [ -86.344039276801936, 38.134270362980047 ], [ -86.393677276848166, 38.12329436296983 ], [ -86.40718127686074, 38.108218362955782 ], [ -86.452524276902977, 38.129755362975843 ], [ -86.464846276914443, 38.129156362975287 ], [ -86.474337276923293, 38.111707362959038 ], [ -86.442521276893658, 38.088698362937606 ], [ -86.442467276893609, 38.075995362925781 ], [ -86.458367276908419, 38.059161362910103 ], [ -86.503114276950086, 38.051648362903101 ], [ -86.519091276964971, 38.047048362898821 ], [ -86.52783427697311, 38.018693362872412 ], [ -86.530848276975917, 37.987477362843336 ], [ -86.516901276962926, 37.94224236280121 ], [ -86.522738276968369, 37.927871362787826 ], [ -86.541087276985451, 37.921515362781903 ], [ -86.58178427702336, 37.925665362785772 ], [ -86.598310277038749, 37.921072362781494 ], [ -86.61478227705409, 37.857975362722726 ], [ -86.645568277082759, 37.846000362711578 ], [ -86.665924277101723, 37.847381362712866 ], [ -86.67067027710614, 37.860641362725211 ], [ -86.66030827709649, 37.902573362764265 ], [ -86.668655277104264, 37.913196362774158 ], [ -86.689126277123322, 37.911853362772902 ], [ -86.728876277160339, 37.894621362756858 ], [ -86.75382527718358, 37.898359362760345 ], [ -86.8028152772292, 37.978800362835258 ], [ -86.82630727725109, 37.991559362847141 ], [ -86.863272277285517, 37.986920362842824 ], [ -86.900078277319793, 37.95369736281188 ], [ -86.931573277349116, 37.938040362797295 ], [ -86.989031277402631, 37.930616362790381 ], [ -87.013156277425097, 37.924764362784927 ], [ -87.036480277446827, 37.908005362769323 ], [ -87.071308277479261, 37.807136362675379 ], [ -87.106427277511969, 37.784251362654068 ], [ -87.131879277535674, 37.789736362659177 ], [ -87.158080277560074, 37.82696736269385 ], [ -87.17578027757655, 37.838640362704723 ], [ -87.226762277624033, 37.849118362714478 ], [ -87.272746277666869, 37.870819362734693 ], [ -87.310559277702083, 37.893718362756019 ], [ -87.387550277773784, 37.934969362794433 ], [ -87.452288277834072, 37.936520362795882 ], [ -87.504803277882985, 37.915627362776419 ], [ -87.604325277975676, 37.971157362828137 ], [ -87.627137277996923, 37.923454362783716 ], [ -87.59471827796672, 37.890766362753268 ], [ -87.59363427796572, 37.864910362729191 ], [ -87.607588277978707, 37.843819362709546 ], [ -87.651696278019784, 37.828175362694978 ], [ -87.684717278050542, 37.836372362702612 ], [ -87.679721278045889, 37.89704936275912 ], [ -87.709408278073539, 37.899754362761641 ], [ -87.728200278091037, 37.894585362756828 ], [ -87.753782278114869, 37.898128362760126 ], [ -87.823647278179934, 37.878255362741612 ], [ -87.857187278211171, 37.890947362753437 ], [ -87.899036278250136, 37.92459736278478 ], [ -87.921895278271435, 37.919909362780409 ], [ -87.934484278283151, 37.904204362765782 ], [ -87.936849278285351, 37.875223362738794 ], [ -87.910228278260561, 37.838613362704699 ], [ -87.920170278269822, 37.809728362677795 ], [ -87.93961027828793, 37.799551362668318 ], [ -87.958738278305745, 37.776224362646595 ], [ -88.01122327835462, 37.801352362669995 ], [ -88.035607278377327, 37.805728362674074 ], [ -88.072504278411699, 37.735446362608613 ], [ -88.133670278468657, 37.700790362576342 ], [ -88.15940427849263, 37.660733362539034 ], [ -88.157664278491012, 37.628526362509035 ], [ -88.134202278469161, 37.583620362467215 ], [ -88.07159127841085, 37.511038362399617 ], [ -88.087910278426051, 37.476321362367287 ], [ -88.311742278634497, 37.442903362336168 ], [ -88.359214278678721, 37.409361362304921 ], [ -88.419893278735231, 37.420343362315151 ], [ -88.467686278779738, 37.400808362296956 ], [ -88.511365278820421, 37.296905362200192 ], [ -88.5014692788112, 37.257836362163808 ], [ -88.450739278763962, 37.205724362115276 ], [ -88.422555278737704, 37.156965362069862 ], [ -88.450511278763742, 37.098727362015623 ], [ -88.476841278788271, 37.072200361990923 ], [ -88.490743278801204, 37.068237361987229 ], [ -88.517317278825956, 37.064826361984053 ], [ -88.559319278865075, 37.072871361991545 ], [ -88.614268278916256, 37.109102362025283 ], [ -88.688421278985317, 37.135465362049842 ], [ -88.739166279032574, 37.14123636205521 ], [ -88.746560279039457, 37.152161362065385 ], [ -88.863350279148236, 37.202247362112033 ], [ -88.932567279212691, 37.218459362127135 ], [ -88.993240279269202, 37.220088362128649 ], [ -89.065104279336126, 37.185911362096817 ], [ -89.116893279384357, 37.112188362028164 ], [ -89.146419279411859, 37.093237362010512 ], [ -89.169621279433471, 37.064287361983546 ], [ -89.174404279437923, 37.02576236194767 ], [ -89.150316279415492, 36.998491361922277 ], [ -89.129930279396504, 36.988165361912657 ], [ -89.107216279375351, 36.977504361902731 ], [ -89.105034279373314, 36.953922361880764 ], [ -89.129653279396237, 36.86649436179934 ], [ -89.166565279430614, 36.843476361777903 ], [ -89.173531279437114, 36.829439361764827 ], [ -89.16444427942865, 36.804476361741578 ], [ -89.125906279392751, 36.7924683617304 ], [ -89.125540279392411, 36.768088361707697 ], [ -89.151435279416532, 36.759097361699318 ], [ -89.177269279440594, 36.760982361701075 ], [ -89.196365279458377, 36.727478361669867 ], [ -89.197563279459487, 36.713425361656789 ], [ -89.167899279431865, 36.671628361617863 ], [ -89.177161279440483, 36.653062361600568 ], [ -89.200187279461929, 36.631357361580356 ], [ -89.210128279471192, 36.581954361534343 ], [ -89.241684279500575, 36.569328361522579 ], [ -89.283495279539522, 36.575309361528156 ], [ -89.3223452795757, 36.622076361571708 ], [ -89.342395279594371, 36.62890836157807 ], [ -89.363621279614136, 36.625761361575144 ], [ -89.373951279623768, 36.61624736156628 ], [ -89.418210279664976, 36.510625361467916 ], [ -89.414784279661788, 36.502679361460508 ], [ -89.34666727959835, 36.502610361460448 ], [ -88.830372279117512, 36.499854361457878 ], [ -88.826359279113774, 36.499908361457926 ], [ -88.810718279099206, 36.499045361457128 ], [ -88.512681278821645, 36.49954636145759 ], [ -88.49602527880613, 36.498207361456352 ], [ -88.042763278384001, 36.496570361454822 ], [ -88.035079278376841, 36.538200361493594 ], [ -88.041091278382439, 36.582721361535057 ], [ -88.071341278410614, 36.679683361625358 ], [ -87.870711278223766, 36.669423361615806 ], [ -87.853537278207767, 36.641522361589821 ], [ -87.69352827805875, 36.644488361592579 ], [ -87.640655278009504, 36.645217361593261 ], [ -87.346611277735661, 36.649277361597044 ], [ -87.112702277517812, 36.651307361598931 ], [ -87.068184277476348, 36.650811361598471 ], [ -86.770535277199144, 36.652100361599672 ], [ -86.510668276957119, 36.655074361602445 ] ] ], [ [ [ -89.533272279772149, 36.498170361456317 ], [ -89.475897279718708, 36.498609361456722 ], [ -89.481757279724164, 36.50475836146245 ], [ -89.471449279714562, 36.525616361481873 ], [ -89.481749279724156, 36.547836361502569 ], [ -89.493202279734831, 36.559177361513129 ], [ -89.530442279769503, 36.564616361518191 ], [ -89.556214279793508, 36.557803361511851 ], [ -89.568231279804706, 36.541469361496638 ], [ -89.567064279803617, 36.51879936147553 ], [ -89.533272279772149, 36.498170361456317 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Kansas", "DRAWSEQ": 34, "STATE_FIPS": "20", "SUB_REGION": "West North Central", "STATE_ABBR": "KS" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -95.071931284930415, 37.001478361925052 ], [ -95.03274528489392, 37.000779361924401 ], [ -94.62037928450988, 36.997046361920923 ], [ -94.620664284510141, 37.060147361979695 ], [ -94.618977284508574, 37.3277323622289 ], [ -94.618764284508373, 37.360766362259668 ], [ -94.618996284508597, 37.650374362529391 ], [ -94.619293284508871, 37.679869362556857 ], [ -94.61673528450649, 38.030387362883303 ], [ -94.617330284507034, 38.055784362906955 ], [ -94.619053284508652, 38.39203236322011 ], [ -94.618717284508335, 38.471473363294095 ], [ -94.61314828450314, 38.737222363541591 ], [ -94.612469284502509, 38.837109363634625 ], [ -94.609281284499545, 39.044667363827926 ], [ -94.608137284498483, 39.112801363891379 ], [ -94.601224284492048, 39.141227363917849 ], [ -94.612653284502684, 39.151649363927561 ], [ -94.646407284534121, 39.158427363933868 ], [ -94.675514284561231, 39.174922363949236 ], [ -94.730531284612468, 39.171256363945815 ], [ -94.790049284667901, 39.19688336396969 ], [ -94.820819284696555, 39.211004363982838 ], [ -94.83347628470834, 39.261766364030109 ], [ -94.881107284752702, 39.286046364052723 ], [ -94.907681284777453, 39.323028364087165 ], [ -94.911343284780855, 39.340121364103084 ], [ -94.8982812847687, 39.380640364140824 ], [ -94.925748284794281, 39.381266364141403 ], [ -94.958494284824781, 39.411447364169518 ], [ -94.986204284850587, 39.439461364195608 ], [ -95.040511284901157, 39.462940364217474 ], [ -95.047599284907761, 39.48532836423832 ], [ -95.102037284958456, 39.532848364282572 ], [ -95.108988284964937, 39.560692364308508 ], [ -95.053613284913368, 39.586776364332806 ], [ -95.056017284915598, 39.625689364369038 ], [ -95.028292284889773, 39.661913364402778 ], [ -94.978570284843471, 39.684988364424271 ], [ -94.961786284827838, 39.732038364468082 ], [ -94.953142284819791, 39.736501364472247 ], [ -94.930856284799034, 39.72702636446342 ], [ -94.90567828477559, 39.726755364463166 ], [ -94.877860284749673, 39.739305364474859 ], [ -94.871185284743461, 39.754118364488647 ], [ -94.877067284748946, 39.760679364494763 ], [ -94.921800284790606, 39.757841364492123 ], [ -94.935114284803007, 39.77542636450849 ], [ -94.933267284801275, 39.782773364515336 ], [ -94.899323284769665, 39.793775364525587 ], [ -94.888505284759589, 39.817400364547588 ], [ -94.898324284768734, 39.828332364557767 ], [ -94.923876284792527, 39.833131364562234 ], [ -94.936511284804297, 39.849386364577377 ], [ -94.938243284805921, 39.896081364620869 ], [ -94.965023284830849, 39.900823364625282 ], [ -95.02177228488371, 39.896978364621702 ], [ -95.033506284894628, 39.877844364603881 ], [ -95.063246284922329, 39.866538364593353 ], [ -95.100722284957229, 39.86986536459645 ], [ -95.150551285003644, 39.908054364632015 ], [ -95.193963285044077, 39.910180364633995 ], [ -95.207597285056764, 39.938176364660066 ], [ -95.240961285087849, 39.942105364663732 ], [ -95.308697285150927, 39.999407364717094 ], [ -95.329701285170486, 39.992595364710752 ], [ -95.780700285590513, 39.993489364711579 ], [ -96.001253285795926, 39.995159364713139 ], [ -96.240598286018823, 39.994503364712529 ], [ -96.45403828621761, 39.994172364712213 ], [ -96.801420286541131, 39.994476364712497 ], [ -96.908287286640657, 39.996154364714066 ], [ -97.361912287063134, 39.997380364715205 ], [ -97.816589287486579, 39.999729364717396 ], [ -97.929588287591827, 39.998452364716201 ], [ -98.264165287903424, 39.998434364716189 ], [ -98.504479288127229, 39.997129364714972 ], [ -98.720632288328545, 39.998461364716213 ], [ -99.064747288649016, 39.998338364716098 ], [ -99.178201288754678, 39.999577364717254 ], [ -99.627859289173458, 40.002987364720425 ], [ -100.180910289688526, 40.000478364718091 ], [ -100.191111289698028, 40.000585364718191 ], [ -100.735049290204614, 39.99917236471687 ], [ -100.75485629022306, 40.000198364717832 ], [ -101.322148290751386, 40.001821364719341 ], [ -101.407393290830782, 40.001003364718585 ], [ -102.051535291430682, 39.998918364716637 ], [ -102.049442291428733, 39.568693364315962 ], [ -102.048801291428134, 39.562803364310476 ], [ -102.047874291427277, 39.126753363904371 ], [ -102.048972291428299, 39.037003363820787 ], [ -102.047568291426984, 38.69255036349999 ], [ -102.047584291427, 38.615499363428228 ], [ -102.045549291425104, 38.263343363100262 ], [ -102.046061291425588, 38.253822363091388 ], [ -102.043976291423647, 37.734398362607635 ], [ -102.044456291424098, 37.641474362521095 ], [ -102.042010291421818, 37.386279362283432 ], [ -102.037207291417346, 36.988994361913427 ], [ -102.024519291405525, 36.988875361913315 ], [ -101.553676290967019, 36.996693361920599 ], [ -101.071604290518053, 36.997466361921319 ], [ -100.950587290405352, 36.996661361920573 ], [ -100.634245290110727, 36.99783236192166 ], [ -100.088574289602533, 36.997652361921496 ], [ -99.999261289519353, 36.995417361919408 ], [ -99.544639289095954, 36.995463361919448 ], [ -99.437473288996145, 36.994558361918607 ], [ -98.999516288588268, 36.998072361921885 ], [ -98.540219288160515, 36.998376361922169 ], [ -98.3471432879807, 36.999061361922799 ], [ -98.104529287754744, 36.99867136192244 ], [ -97.804250287475085, 36.998567361922341 ], [ -97.465405287159513, 36.996467361920388 ], [ -97.137693286854315, 36.999808361923499 ], [ -96.748696286492034, 37.000166361923831 ], [ -96.519187286278282, 37.000577361924215 ], [ -96.006049285800387, 36.998333361922121 ], [ -95.957961285755601, 37.000083361923757 ], [ -95.785748285595218, 36.998114361921921 ], [ -95.526019285353328, 37.001018361924622 ], [ -95.406622285242122, 37.000615361924247 ], [ -95.071931284930415, 37.001478361925052 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Virginia", "DRAWSEQ": 35, "STATE_FIPS": "51", "SUB_REGION": "South Atlantic", "STATE_ABBR": "VA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -79.144063270096439, 36.546198361501041 ], [ -78.796428269772676, 36.543674361498688 ], [ -78.737116269717433, 36.546214361501058 ], [ -78.458529269457983, 36.541623361496782 ], [ -78.320969269329865, 36.545675361500557 ], [ -78.051381269078803, 36.552621361507022 ], [ -77.898568268936472, 36.553092361507467 ], [ -77.763638268810823, 36.553589361507925 ], [ -77.319746268397409, 36.554068361508371 ], [ -77.177042268264501, 36.556437361510575 ], [ -76.923816268028673, 36.554298361508586 ], [ -76.921314268026336, 36.554309361508601 ], [ -76.563255267692867, 36.555404361509616 ], [ -76.497228267631385, 36.555964361510135 ], [ -76.329916267475554, 36.556208361510365 ], [ -76.12705026728662, 36.557315361511399 ], [ -76.045611267210774, 36.557106361511202 ], [ -76.061512267225581, 36.603744361554632 ], [ -76.026819267193275, 36.556870361510981 ], [ -75.998314267166734, 36.556805361510925 ], [ -75.950448267122155, 36.721716361664505 ], [ -75.892499267068189, 36.59917536155038 ], [ -75.901631267076681, 36.556352361510498 ], [ -75.877811267054497, 36.556028361510201 ], [ -75.995014267163654, 36.923281361852233 ], [ -76.118088267278281, 36.931764361860132 ], [ -76.191325267346485, 36.904589361834823 ], [ -76.201991267356419, 36.935217361863344 ], [ -76.283889267432698, 36.96288136188911 ], [ -76.307281267454471, 36.942148361869798 ], [ -76.29236426744059, 36.828490361763947 ], [ -76.317100267463616, 36.845992361780247 ], [ -76.400851267541626, 36.826286361761895 ], [ -76.393755267535013, 36.836074361771011 ], [ -76.341584267486425, 36.860335361793602 ], [ -76.347810267492221, 36.913489361843105 ], [ -76.410473267550586, 36.901561361831995 ], [ -76.506866267640362, 36.869621361802253 ], [ -76.561524267691254, 36.795765361733473 ], [ -76.560189267690021, 36.841949361776486 ], [ -76.486289267621189, 36.895717361826556 ], [ -76.481849267617051, 36.91923436184846 ], [ -76.516846267649655, 36.912334361842028 ], [ -76.489181267623891, 36.961871361888171 ], [ -76.554721267684926, 37.006343361929581 ], [ -76.613049267739243, 36.994991361919013 ], [ -76.577503267706135, 37.024642361946633 ], [ -76.665320267787934, 37.054282361974231 ], [ -76.671217267793423, 37.14786036206138 ], [ -76.685645267806862, 37.198133362108209 ], [ -76.728890267847135, 37.150817362064139 ], [ -76.79707626791064, 37.20745036211688 ], [ -76.900549268006998, 37.201202362111061 ], [ -76.941177268044839, 37.236758362144172 ], [ -76.878110267986102, 37.259574362165424 ], [ -76.875173267983371, 37.323092362224585 ], [ -76.856854267966312, 37.244048362150963 ], [ -76.795611267909266, 37.240534362147692 ], [ -76.745782267862865, 37.193537362103925 ], [ -76.696830267817276, 37.232668362140366 ], [ -76.647771267771589, 37.225984362134142 ], [ -76.609707267736127, 37.178723362090125 ], [ -76.624593267750001, 37.132421362047005 ], [ -76.5681182676974, 37.080320361998481 ], [ -76.564166267693722, 37.117917362033495 ], [ -76.514940267647873, 37.088514362006109 ], [ -76.530794267662642, 37.067789361986812 ], [ -76.425786267564845, 36.965407361891465 ], [ -76.384220267526132, 36.990561361914885 ], [ -76.293006267441186, 37.020635361942894 ], [ -76.278594267427763, 37.074489361993052 ], [ -76.395359267536506, 37.107853362024123 ], [ -76.285338267434042, 37.122240362037523 ], [ -76.336984267482137, 37.177152362088663 ], [ -76.36345126750679, 37.146571362060186 ], [ -76.396542267537612, 37.173174362084964 ], [ -76.412663267552617, 37.152537362065743 ], [ -76.424337267563502, 37.207441362116867 ], [ -76.594715267722165, 37.291442362195106 ], [ -76.669661267791966, 37.371791362269931 ], [ -76.704361267824282, 37.418636362313563 ], [ -76.653166267776612, 37.412344362307707 ], [ -76.46080726759746, 37.2555753621617 ], [ -76.392406267533758, 37.293567362197081 ], [ -76.45522126759225, 37.377631362275373 ], [ -76.403423267544014, 37.373167362271218 ], [ -76.416752267556433, 37.412274362307642 ], [ -76.463606267600071, 37.41903136231393 ], [ -76.446538267584174, 37.458104362350319 ], [ -76.338685267483726, 37.39368436229033 ], [ -76.300636267448283, 37.334710362235398 ], [ -76.274855267424272, 37.330460362231442 ], [ -76.2542552674051, 37.3903253622872 ], [ -76.355333267499233, 37.515889362404138 ], [ -76.433850267572353, 37.515338362403625 ], [ -76.512528267645635, 37.552713362438432 ], [ -76.348306267492688, 37.525285362412887 ], [ -76.314309267461027, 37.55133536243715 ], [ -76.56917126769838, 37.642046362521626 ], [ -76.681412267802912, 37.774893362645358 ], [ -76.732034267850054, 37.798619362667452 ], [ -76.818188267930296, 37.919641362780162 ], [ -76.77153226788684, 37.916810362777525 ], [ -76.631453267756385, 37.796487362665459 ], [ -76.580136267708596, 37.770254362641033 ], [ -76.50676026764026, 37.656523362535111 ], [ -76.34453826748917, 37.623059362503952 ], [ -76.322726267468866, 37.677948362555071 ], [ -76.356670267500476, 37.700265362575848 ], [ -76.309611267456646, 37.719245362593526 ], [ -76.324207267470243, 37.798945362667752 ], [ -76.25158826740261, 37.850306362715585 ], [ -76.258866267409388, 37.8901583627527 ], [ -76.367414267510483, 37.957080362815027 ], [ -76.524220267656517, 38.012874362866995 ], [ -76.573370267702288, 38.00330036285807 ], [ -76.557722267687723, 38.025459362878706 ], [ -76.548711267679323, 38.074240362924144 ], [ -76.595283267722706, 38.120352362967083 ], [ -76.936155268040167, 38.202603363043693 ], [ -76.999054268098746, 38.280402363116146 ], [ -77.05423226815013, 38.37547636320469 ], [ -77.240401268323509, 38.331497363163734 ], [ -77.321526268399069, 38.344109363175477 ], [ -77.289185268368954, 38.362796363192885 ], [ -77.338189268414581, 38.436948363261941 ], [ -77.303323268382115, 38.502033363322553 ], [ -77.227296268311306, 38.650839363461145 ], [ -77.194451268280716, 38.660883363470496 ], [ -77.196961268283061, 38.622817363435047 ], [ -77.129690268220401, 38.648242363458721 ], [ -77.124815268215869, 38.677915363486363 ], [ -77.092847268186091, 38.704099363510743 ], [ -77.081578268175605, 38.715394363521263 ], [ -77.056820268152535, 38.712136363518226 ], [ -77.04616926814262, 38.718895363524524 ], [ -77.045147268141676, 38.788234363589098 ], [ -77.034946268132174, 38.814028363613119 ], [ -77.044888268141435, 38.829477363627511 ], [ -77.040104268136972, 38.838526363635935 ], [ -77.038777268135732, 38.862543363658304 ], [ -77.067586268162572, 38.88621236368035 ], [ -77.078649268172867, 38.915711363707828 ], [ -77.12232826821355, 38.932171363723157 ], [ -77.151747268240953, 38.964889363753628 ], [ -77.24343226832633, 38.975989363763958 ], [ -77.255692268337754, 39.027681363812107 ], [ -77.324306268401656, 39.062696363844715 ], [ -77.346226268422072, 39.068620363850229 ], [ -77.432746268502655, 39.066884363848615 ], [ -77.459404268527479, 39.080944363861704 ], [ -77.478959268545694, 39.104064363883239 ], [ -77.512758268577159, 39.116759363895063 ], [ -77.516328268580494, 39.157549363933057 ], [ -77.478347268545122, 39.1770373639512 ], [ -77.461707268529622, 39.218735363990035 ], [ -77.464667268532381, 39.229160363999746 ], [ -77.49377326855948, 39.250014364019165 ], [ -77.541901268604306, 39.269042364036892 ], [ -77.56867326862924, 39.298495364064323 ], [ -77.616236268673532, 39.299818364065551 ], [ -77.679302268732272, 39.318781364083208 ], [ -77.727467268777133, 39.317796364082298 ], [ -77.759458268806924, 39.284643364051419 ], [ -77.768232268815098, 39.246550364015945 ], [ -77.805449268849756, 39.196606363969423 ], [ -77.820044268863342, 39.141725363918312 ], [ -77.830680268873252, 39.132181363909424 ], [ -78.033328269061982, 39.265639364033717 ], [ -78.22950826924469, 39.391113364150577 ], [ -78.276881269288808, 39.423464364180703 ], [ -78.347546269354623, 39.456998364211941 ], [ -78.350231269357124, 39.380828364140996 ], [ -78.365474269371319, 39.361686364123173 ], [ -78.343928269351252, 39.350956364113173 ], [ -78.34084626934839, 39.341458364104327 ], [ -78.413547269416085, 39.257540364026177 ], [ -78.399127269402655, 39.244952364014452 ], [ -78.423069269424957, 39.212143363983898 ], [ -78.424068269425888, 39.197628363970381 ], [ -78.402362269405671, 39.170594363945199 ], [ -78.430569269431942, 39.148626363924741 ], [ -78.447979269448155, 39.11903636389718 ], [ -78.485250269482876, 39.111944363890579 ], [ -78.501600269498098, 39.093684363873578 ], [ -78.536651269530736, 39.057132363839528 ], [ -78.564179269556377, 39.035145363819055 ], [ -78.549202269542434, 39.023488363808198 ], [ -78.553208269546161, 39.013936363799303 ], [ -78.59869626958853, 38.967306363755874 ], [ -78.630847269618471, 38.979712363767433 ], [ -78.646969269633487, 38.950553363740269 ], [ -78.680227269664456, 38.921684363713382 ], [ -78.718986269700551, 38.904991363697839 ], [ -78.724143269705351, 38.930324363721432 ], [ -78.737732269718009, 38.929282363720461 ], [ -78.74925326972874, 38.911491363703888 ], [ -78.793055269769539, 38.880219363674769 ], [ -78.815861269790773, 38.833745363631486 ], [ -78.86656026983799, 38.763404363565975 ], [ -78.987453269950578, 38.846761363643608 ], [ -79.033742269993695, 38.799959363600024 ], [ -79.054800270013303, 38.79063336359134 ], [ -79.05655527001494, 38.762053363564718 ], [ -79.08723427004351, 38.707268363513691 ], [ -79.088546270044731, 38.659205363468935 ], [ -79.121064270075024, 38.663767363473184 ], [ -79.127427270080943, 38.658244363468043 ], [ -79.231663270178018, 38.480496363302493 ], [ -79.272359270215915, 38.437306363262273 ], [ -79.316999270257497, 38.412633363239294 ], [ -79.486347270415209, 38.462145363285408 ], [ -79.536513270461938, 38.55380536337077 ], [ -79.642406270560556, 38.592355363406675 ], [ -79.669430270585721, 38.550177363367396 ], [ -79.665614270582168, 38.520778363340014 ], [ -79.692653270607352, 38.500354363320994 ], [ -79.684092270599379, 38.43023836325569 ], [ -79.720035270632849, 38.394685363222578 ], [ -79.732829270644771, 38.351840363182674 ], [ -79.764004270673809, 38.353991363184676 ], [ -79.800329270707635, 38.314326363147742 ], [ -79.802778270709908, 38.298870363133346 ], [ -79.78651127069476, 38.285118363120539 ], [ -79.793622270701391, 38.268666363105211 ], [ -79.831152270736339, 38.25027936308809 ], [ -79.916161270815508, 38.179264363021957 ], [ -79.910340270810082, 38.162606363006439 ], [ -79.935327270833355, 38.12130836296798 ], [ -79.928292270826802, 38.103311362951217 ], [ -79.957513270854022, 38.067365362917741 ], [ -79.966493270862387, 38.038621362890964 ], [ -80.000499270894053, 37.989870362845565 ], [ -80.054807270944636, 37.95564836281369 ], [ -80.106490270992765, 37.914658362775519 ], [ -80.118507271003963, 37.891278362753745 ], [ -80.160005271042607, 37.877228362740659 ], [ -80.172220271053988, 37.860184362724787 ], [ -80.171594271053394, 37.842968362708753 ], [ -80.223735271101958, 37.802364362670943 ], [ -80.220546271098996, 37.778858362649046 ], [ -80.254689271130786, 37.757232362628905 ], [ -80.250033271126455, 37.726052362599866 ], [ -80.303109271175884, 37.682671362559461 ], [ -80.295700271168982, 37.671502362549063 ], [ -80.304862271177512, 37.65224636253113 ], [ -80.300932271173849, 37.640547362520238 ], [ -80.254422271130537, 37.640703362520384 ], [ -80.218928271097482, 37.624266362505068 ], [ -80.246393271123068, 37.596896362479583 ], [ -80.316721271188555, 37.566718362451475 ], [ -80.325906271197113, 37.533401362420449 ], [ -80.308303271180719, 37.528370362415757 ], [ -80.280730271155036, 37.53625936242311 ], [ -80.287916271161734, 37.51115136239973 ], [ -80.347511271217229, 37.491177362381123 ], [ -80.352157271221557, 37.476101362367082 ], [ -80.388306271255232, 37.465725362357418 ], [ -80.425378271289759, 37.434906362328718 ], [ -80.474764271335744, 37.422821362317464 ], [ -80.486797271346958, 37.433860362327742 ], [ -80.487881271347959, 37.460597362352644 ], [ -80.508765271367409, 37.475047362366098 ], [ -80.542755271399074, 37.469210362360663 ], [ -80.597491271450053, 37.446054362339098 ], [ -80.705207271550364, 37.38837836228538 ], [ -80.729737271573214, 37.392719362289426 ], [ -80.746324271588662, 37.387737362284781 ], [ -80.747689271589934, 37.379081362276722 ], [ -80.762995271604183, 37.371414362269583 ], [ -80.770022271610728, 37.386195362283345 ], [ -80.799244271637946, 37.391753362288526 ], [ -80.799611271638284, 37.413062362308374 ], [ -80.850525271685697, 37.423460362318053 ], [ -80.87735827171069, 37.388697362285683 ], [ -80.848418271683741, 37.350943362250518 ], [ -80.855429271690269, 37.33941136223978 ], [ -80.934183271763615, 37.301370362204352 ], [ -80.967892271795009, 37.291791362195426 ], [ -80.978535271804915, 37.296475362199793 ], [ -80.985936271811809, 37.306241362208887 ], [ -81.02493227184813, 37.286061362190097 ], [ -81.140737271955985, 37.274925362179722 ], [ -81.222933272032535, 37.240214362147398 ], [ -81.311873272115363, 37.29370736219721 ], [ -81.358795272159071, 37.338952362239354 ], [ -81.390946272189012, 37.311154362213458 ], [ -81.403344272200556, 37.282624362186894 ], [ -81.475360272267622, 37.254422362160625 ], [ -81.495533272286409, 37.252850362159165 ], [ -81.505536272295728, 37.234372362141954 ], [ -81.556654272343337, 37.206352362115858 ], [ -81.665885272445067, 37.204910362114518 ], [ -81.701728272478448, 37.235434362142939 ], [ -81.73845627251265, 37.250491362156964 ], [ -81.751854272525136, 37.272257362177236 ], [ -81.792659272563128, 37.287153362191106 ], [ -81.81538127258429, 37.279539362184018 ], [ -81.838889272606195, 37.285505362189575 ], [ -81.858681272624622, 37.307031362209628 ], [ -81.863815272629409, 37.325456362226781 ], [ -81.897158272660462, 37.340588362240879 ], [ -81.926822272688085, 37.37172736226988 ], [ -81.920733272682412, 37.415516362310655 ], [ -81.988202272745241, 37.466586362358221 ], [ -81.976422272734283, 37.482905362373415 ], [ -81.947993272707805, 37.493026362382849 ], [ -81.935450272696116, 37.506644362395527 ], [ -81.959575272718581, 37.531172362418374 ], [ -82.288951273025347, 37.304861362207603 ], [ -82.353842273085775, 37.260519362166306 ], [ -82.405885273134245, 37.250704362157165 ], [ -82.550040273268507, 37.199378362109364 ], [ -82.568022273285251, 37.193919362104282 ], [ -82.719096273425947, 37.110017362026142 ], [ -82.721377273428075, 37.093117362010403 ], [ -82.709170273416703, 37.075482361993977 ], [ -82.720057273426846, 37.065929361985084 ], [ -82.723598273430142, 37.033992361955335 ], [ -82.812222273512674, 37.005600361928899 ], [ -82.86656027356328, 36.974585361900012 ], [ -82.860632273557755, 36.932162361860499 ], [ -82.878043273573979, 36.893694361824672 ], [ -82.950805273641748, 36.864078361797091 ], [ -83.046634273730987, 36.858793361792166 ], [ -83.067952273750848, 36.850996361784908 ], [ -83.128220273806974, 36.779152361717998 ], [ -83.124391273803411, 36.751167361691934 ], [ -83.138513273816557, 36.740059361681588 ], [ -83.203656273877229, 36.734260361676192 ], [ -83.321383273986868, 36.709533361653158 ], [ -83.385855274046918, 36.688219361633308 ], [ -83.404150274063952, 36.672327361618514 ], [ -83.460221274116179, 36.661832361608731 ], [ -83.530895274181987, 36.661481361608409 ], [ -83.646802274289939, 36.61697736156696 ], [ -83.675177274316368, 36.598704361549942 ], [ -83.464210274119893, 36.598840361550067 ], [ -83.275031273943696, 36.60046736155158 ], [ -83.248388273918891, 36.589935361541777 ], [ -83.210926273883999, 36.588089361540057 ], [ -82.986697273675162, 36.591289361543033 ], [ -82.849822273547687, 36.591041361542807 ], [ -82.610839273325126, 36.591545361543275 ], [ -82.296858273032711, 36.591801361543517 ], [ -82.216661272958021, 36.594072361545628 ], [ -82.154181272899834, 36.595150361546629 ], [ -81.92930327269039, 36.595950361547381 ], [ -81.918294272680143, 36.61360836156382 ], [ -81.828898272596888, 36.611596361561951 ], [ -81.652272272432384, 36.607673361558298 ], [ -81.669835272448751, 36.589767361541618 ], [ -81.345121272146329, 36.572988361525994 ], [ -80.903240271734802, 36.565342361518873 ], [ -80.837953271673996, 36.56356836151722 ], [ -80.610841271462476, 36.557430361511507 ], [ -80.435092271298799, 36.551181361505684 ], [ -80.047863270938166, 36.547272361502039 ], [ -80.023822270915772, 36.545163361500073 ], [ -79.717201270630213, 36.548028361502745 ], [ -79.510048270437281, 36.54779536150253 ], [ -79.216803270164178, 36.549921361504509 ], [ -79.144063270096439, 36.546198361501041 ] ] ], [ [ [ -75.270357266488773, 38.027709362880806 ], [ -75.346328266559524, 37.918920362779488 ], [ -75.378212266589216, 37.901098362762895 ], [ -75.344451266557769, 37.902037362763764 ], [ -75.385720266596209, 37.875777362739314 ], [ -75.338820266552531, 37.888907362751539 ], [ -75.298496266514974, 37.962998362820542 ], [ -75.242219266462556, 38.028647362881685 ], [ -75.270357266488773, 38.027709362880806 ] ] ], [ [ [ -75.867024267044457, 37.552314362438061 ], [ -75.930411267103494, 37.557021362442441 ], [ -75.954360267125793, 37.52196436240979 ], [ -75.965102267135805, 37.479485362370234 ], [ -75.934103267106934, 37.484776362375158 ], [ -76.018127267185179, 37.308918362211379 ], [ -75.970638267140956, 37.126374362041375 ], [ -75.93104026710408, 37.142644362056529 ], [ -75.896762267072148, 37.367530362265967 ], [ -75.82632626700655, 37.418284362313237 ], [ -75.790420266973115, 37.408245362303887 ], [ -75.820138267000786, 37.426341362320741 ], [ -75.812677266993845, 37.469179362360634 ], [ -75.704918266893486, 37.493609362383388 ], [ -75.756150266941191, 37.510675362399283 ], [ -75.727174266914204, 37.558316362443648 ], [ -75.649917266842266, 37.559888362445115 ], [ -75.6991432668881, 37.58964536247283 ], [ -75.589554266786038, 37.677323362554489 ], [ -75.617570266812137, 37.697262362573056 ], [ -75.372420266583816, 38.016833362870678 ], [ -75.626084266820058, 37.996541362851779 ], [ -75.647866266840353, 37.970255362827302 ], [ -75.658098266849876, 37.941306362800333 ], [ -75.73363026692023, 37.930694362790454 ], [ -75.686358266876198, 37.858250362722984 ], [ -75.695735266884924, 37.824643362691688 ], [ -75.782254266965509, 37.789961362659383 ], [ -75.799374266981459, 37.711922362586705 ], [ -75.905646267080428, 37.592306362475306 ], [ -75.886930267062993, 37.580477362464293 ], [ -75.929214267102381, 37.586015362469446 ], [ -75.940757267113128, 37.561686362446792 ], [ -75.867024267044457, 37.552314362438061 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Missouri", "DRAWSEQ": 36, "STATE_FIPS": "29", "SUB_REGION": "West North Central", "STATE_ABBR": "MO" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -89.105034279373314, 36.953922361880764 ], [ -89.107216279375351, 36.977504361902731 ], [ -89.129930279396504, 36.988165361912657 ], [ -89.193584279455777, 36.986822361911408 ], [ -89.210126279471183, 37.029023361950706 ], [ -89.237753279496914, 37.041783361962587 ], [ -89.264130279521481, 37.087174362004866 ], [ -89.284311279540276, 37.091294362008703 ], [ -89.303369279558027, 37.085434362003241 ], [ -89.309777279564003, 37.060959361980451 ], [ -89.264319279521658, 37.027783361949552 ], [ -89.262076279519576, 37.00873636193181 ], [ -89.282843279538909, 36.999257361922986 ], [ -89.311058279565188, 37.009732361932741 ], [ -89.383028279632214, 37.049263361969558 ], [ -89.380070279629464, 37.099133362016005 ], [ -89.423880279670257, 37.13725336205151 ], [ -89.440606279685838, 37.165367362077689 ], [ -89.468304279711631, 37.224316362132583 ], [ -89.465398279708936, 37.253781362160026 ], [ -89.489683279731551, 37.25605136216214 ], [ -89.513976279754175, 37.276452362181146 ], [ -89.513977279754172, 37.305012362207748 ], [ -89.500672279741778, 37.329491362230542 ], [ -89.468833279712129, 37.339459362239822 ], [ -89.435828279681388, 37.355766362255011 ], [ -89.427665279673789, 37.411068362306516 ], [ -89.453714279698048, 37.453235362345787 ], [ -89.494877279736386, 37.491775362381681 ], [ -89.525068279764497, 37.572006362456399 ], [ -89.513463279753694, 37.615978362497351 ], [ -89.519277279759109, 37.650425362529433 ], [ -89.513471279753702, 37.679890362556876 ], [ -89.521619279761296, 37.694848362570809 ], [ -89.581535279817089, 37.706155362581335 ], [ -89.666561279896271, 37.745505362617983 ], [ -89.675960279905027, 37.78402136265386 ], [ -89.691158279919179, 37.804846362673246 ], [ -89.728551279954004, 37.841043362706962 ], [ -89.851822280068816, 37.905115362766637 ], [ -89.861153280077502, 37.90553936276703 ], [ -89.866921280082877, 37.891928362754349 ], [ -89.900659280114297, 37.875956362739473 ], [ -89.937983280149055, 37.878097362741471 ], [ -89.979023280187278, 37.911937362772989 ], [ -89.958338280168022, 37.963686362821178 ], [ -90.010922280216988, 37.969371362826479 ], [ -90.042035280245969, 37.993258362848721 ], [ -90.119453280318069, 38.032325362885103 ], [ -90.134827280332388, 38.054004362905296 ], [ -90.207644280400203, 38.08895936293785 ], [ -90.254177280443542, 38.122223362968825 ], [ -90.289753280476674, 38.16687036301041 ], [ -90.336835280520518, 38.188767363030806 ], [ -90.364889280546649, 38.234353363073254 ], [ -90.36946628055091, 38.32361336315639 ], [ -90.358807280540987, 38.365383363195292 ], [ -90.339725280523211, 38.390900363219053 ], [ -90.301958280488037, 38.42741036325306 ], [ -90.265899280454448, 38.518741363338115 ], [ -90.261344280450217, 38.532820363351227 ], [ -90.24105728043132, 38.562857363379202 ], [ -90.183819280378017, 38.610322363423407 ], [ -90.183689280377891, 38.658822363468573 ], [ -90.202350280395265, 38.700413363507309 ], [ -90.196681280389996, 38.72401536352929 ], [ -90.163507280359099, 38.773147363575049 ], [ -90.135285280332809, 38.78553336358658 ], [ -90.121834280320286, 38.800559363600584 ], [ -90.113228280312271, 38.830515363628479 ], [ -90.132920280330609, 38.853079363649492 ], [ -90.244038280434097, 38.914557363706749 ], [ -90.279043280466695, 38.924765363716254 ], [ -90.319853280504702, 38.924956363716433 ], [ -90.413186280591631, 38.962378363751284 ], [ -90.469957280644493, 38.959227363748354 ], [ -90.53054528070092, 38.89165936368542 ], [ -90.570448280738091, 38.871377363666532 ], [ -90.627335280791073, 38.880845363675348 ], [ -90.668999280829865, 38.935303363726071 ], [ -90.706193280864511, 39.03784136382157 ], [ -90.70771228086592, 39.058227363840551 ], [ -90.690522280849919, 39.093749363873634 ], [ -90.716860280874442, 39.144259363920675 ], [ -90.718317280875809, 39.195921363968793 ], [ -90.732462280888981, 39.224794363995684 ], [ -90.738207280894329, 39.247858364017162 ], [ -90.779469280932759, 39.296850364062792 ], [ -90.850624280999028, 39.35049936411275 ], [ -90.948024281089729, 39.400632364159442 ], [ -91.036475281172116, 39.444458364200258 ], [ -91.064521281198225, 39.474030364227801 ], [ -91.093750281225454, 39.528973364278968 ], [ -91.156329281283732, 39.552639364301008 ], [ -91.20338928132756, 39.600067364345179 ], [ -91.317812281434129, 39.68596236442518 ], [ -91.367237281480158, 39.724685364461237 ], [ -91.373569281486056, 39.761318364495352 ], [ -91.381863281493779, 39.803817364534936 ], [ -91.449340281556616, 39.86309436459014 ], [ -91.451141281558293, 39.885288364610815 ], [ -91.434203281542523, 39.901874364626259 ], [ -91.430540281539109, 39.921882364644894 ], [ -91.447395281554805, 39.946110364667462 ], [ -91.487443281592107, 40.005798364723049 ], [ -91.504160281607682, 40.066757364779818 ], [ -91.516284281618965, 40.134589364842995 ], [ -91.506701281610034, 40.200504364904376 ], [ -91.499087281602954, 40.2514223649518 ], [ -91.486849281591546, 40.309668365006047 ], [ -91.448747281556066, 40.371946365064048 ], [ -91.477038281582409, 40.391012365081806 ], [ -91.490314281594777, 40.390806365081616 ], [ -91.500377281604145, 40.405160365094986 ], [ -91.527691281629586, 40.410169365099648 ], [ -91.529607281631371, 40.435086365122856 ], [ -91.538846281639977, 40.441288365128628 ], [ -91.533208281634728, 40.455441365141809 ], [ -91.579383281677735, 40.463760365149554 ], [ -91.586028281683923, 40.484519365168893 ], [ -91.616860281712633, 40.504873365187848 ], [ -91.622536281717927, 40.532903365213954 ], [ -91.692081281782691, 40.551677365231434 ], [ -91.689959281780716, 40.581202365258932 ], [ -91.71697628180587, 40.593435365270324 ], [ -91.741711281828913, 40.609784365285549 ], [ -91.946370282019515, 40.608266365284138 ], [ -92.193174282249373, 40.60008836527652 ], [ -92.36151328240615, 40.599576365276043 ], [ -92.646432282671498, 40.591462365268484 ], [ -92.717815282737973, 40.58966736526682 ], [ -93.100938283094791, 40.584347365261863 ], [ -93.37027128334563, 40.580491365258268 ], [ -93.562910283525042, 40.580813365258571 ], [ -93.786303283733091, 40.578448365256364 ], [ -94.018059283948929, 40.574022365252247 ], [ -94.238392284154131, 40.570966365249404 ], [ -94.485231284384014, 40.574205365252418 ], [ -94.639876284528043, 40.575744365253854 ], [ -94.920616284789503, 40.57721836525522 ], [ -95.217428285065921, 40.581892365259577 ], [ -95.382555285219709, 40.584334365261853 ], [ -95.767479285578204, 40.589048365266237 ], [ -95.763412285574418, 40.549707365229601 ], [ -95.737036285549848, 40.532373365213459 ], [ -95.692066285507963, 40.524129365205781 ], [ -95.687413285503638, 40.561170365240272 ], [ -95.675693285492713, 40.565835365244624 ], [ -95.662944285480847, 40.558729365238008 ], [ -95.658060285476296, 40.530332365211557 ], [ -95.684970285501365, 40.512205365194674 ], [ -95.695361285511041, 40.485338365169653 ], [ -95.636817285456516, 40.396390365086816 ], [ -95.634185285454066, 40.358800365051806 ], [ -95.616201285437313, 40.346497365040349 ], [ -95.617933285438923, 40.331418365026302 ], [ -95.645553285464644, 40.32234636501785 ], [ -95.646827285465832, 40.309109365005526 ], [ -95.595532285418059, 40.309776365006144 ], [ -95.547137285372997, 40.266215364965575 ], [ -95.476822285307506, 40.226855364928923 ], [ -95.466636285298023, 40.21325536491625 ], [ -95.46095228529272, 40.173995364879687 ], [ -95.422476285256892, 40.131743364840347 ], [ -95.392813285229266, 40.115416364825137 ], [ -95.384542285221556, 40.095362364806462 ], [ -95.403784285239482, 40.080379364792506 ], [ -95.413764285248774, 40.048111364762448 ], [ -95.390532285227138, 40.043750364758395 ], [ -95.371244285209173, 40.028751364744423 ], [ -95.345067285184797, 40.024974364740906 ], [ -95.308697285150927, 39.999407364717094 ], [ -95.240961285087849, 39.942105364663732 ], [ -95.207597285056764, 39.938176364660066 ], [ -95.193963285044077, 39.910180364633995 ], [ -95.150551285003644, 39.908054364632015 ], [ -95.100722284957229, 39.86986536459645 ], [ -95.063246284922329, 39.866538364593353 ], [ -95.033506284894628, 39.877844364603881 ], [ -95.02177228488371, 39.896978364621702 ], [ -94.965023284830849, 39.900823364625282 ], [ -94.938243284805921, 39.896081364620869 ], [ -94.936511284804297, 39.849386364577377 ], [ -94.923876284792527, 39.833131364562234 ], [ -94.898324284768734, 39.828332364557767 ], [ -94.888505284759589, 39.817400364547588 ], [ -94.899323284769665, 39.793775364525587 ], [ -94.933267284801275, 39.782773364515336 ], [ -94.935114284803007, 39.77542636450849 ], [ -94.921800284790606, 39.757841364492123 ], [ -94.877067284748946, 39.760679364494763 ], [ -94.871185284743461, 39.754118364488647 ], [ -94.877860284749673, 39.739305364474859 ], [ -94.90567828477559, 39.726755364463166 ], [ -94.930856284799034, 39.72702636446342 ], [ -94.953142284819791, 39.736501364472247 ], [ -94.961786284827838, 39.732038364468082 ], [ -94.978570284843471, 39.684988364424271 ], [ -95.028292284889773, 39.661913364402778 ], [ -95.056017284915598, 39.625689364369038 ], [ -95.053613284913368, 39.586776364332806 ], [ -95.108988284964937, 39.560692364308508 ], [ -95.102037284958456, 39.532848364282572 ], [ -95.047599284907761, 39.48532836423832 ], [ -95.040511284901157, 39.462940364217474 ], [ -94.986204284850587, 39.439461364195608 ], [ -94.958494284824781, 39.411447364169518 ], [ -94.925748284794281, 39.381266364141403 ], [ -94.8982812847687, 39.380640364140824 ], [ -94.911343284780855, 39.340121364103084 ], [ -94.907681284777453, 39.323028364087165 ], [ -94.881107284752702, 39.286046364052723 ], [ -94.83347628470834, 39.261766364030109 ], [ -94.820819284696555, 39.211004363982838 ], [ -94.790049284667901, 39.19688336396969 ], [ -94.730531284612468, 39.171256363945815 ], [ -94.675514284561231, 39.174922363949236 ], [ -94.646407284534121, 39.158427363933868 ], [ -94.612653284502684, 39.151649363927561 ], [ -94.601224284492048, 39.141227363917849 ], [ -94.608137284498483, 39.112801363891379 ], [ -94.609281284499545, 39.044667363827926 ], [ -94.612469284502509, 38.837109363634625 ], [ -94.61314828450314, 38.737222363541591 ], [ -94.618717284508335, 38.471473363294095 ], [ -94.619053284508652, 38.39203236322011 ], [ -94.617330284507034, 38.055784362906955 ], [ -94.61673528450649, 38.030387362883303 ], [ -94.619293284508871, 37.679869362556857 ], [ -94.618996284508597, 37.650374362529391 ], [ -94.618764284508373, 37.360766362259668 ], [ -94.618977284508574, 37.3277323622289 ], [ -94.620664284510141, 37.060147361979695 ], [ -94.62037928450988, 36.997046361920923 ], [ -94.62168428451109, 36.763607361703521 ], [ -94.62107328451053, 36.670543361616851 ], [ -94.617257284506977, 36.489414361448155 ], [ -94.081052284007598, 36.491024361449661 ], [ -93.857520283799417, 36.489786361448509 ], [ -93.596449283556268, 36.489958361448664 ], [ -93.328346283306587, 36.490261361448944 ], [ -93.297324283277689, 36.490681361449333 ], [ -92.852275282863204, 36.489884361448595 ], [ -92.777635282793696, 36.489983361448687 ], [ -92.523050282556596, 36.490921361449566 ], [ -92.146319282205738, 36.491660361450251 ], [ -92.127642282188333, 36.491435361450044 ], [ -91.688560281779417, 36.491018361449648 ], [ -91.452989281560022, 36.490438361449108 ], [ -91.41179628152166, 36.491101361449729 ], [ -91.133956281262897, 36.488015361446855 ], [ -90.804434280956002, 36.48926536144802 ], [ -90.581732280748597, 36.491022361449652 ], [ -90.224473280415879, 36.492811361451317 ], [ -90.150259280346759, 36.491873361450445 ], [ -90.137372280334759, 36.457476361418415 ], [ -90.117322280316088, 36.453955361415133 ], [ -90.12392928032223, 36.422626361385952 ], [ -90.116925280315712, 36.404976361369521 ], [ -90.080272280281577, 36.397450361362509 ], [ -90.052157280255386, 36.382615361348698 ], [ -90.050295280253664, 36.362668361330115 ], [ -90.067729280269887, 36.325395361295406 ], [ -90.049845280253237, 36.30053636127225 ], [ -90.066187280268451, 36.272338361245986 ], [ -90.110012280309277, 36.258059361232696 ], [ -90.13131328032911, 36.212135361189922 ], [ -90.161405280357144, 36.197006361175831 ], [ -90.21932128041108, 36.17263136115313 ], [ -90.23232228042319, 36.161213361142501 ], [ -90.234939280425621, 36.137155361120094 ], [ -90.263801280452498, 36.118829361103025 ], [ -90.284851280472111, 36.115972361100361 ], [ -90.315339280500496, 36.091723361077783 ], [ -90.37906228055985, 35.989656360982721 ], [ -90.283554280470895, 35.991228360984181 ], [ -89.963291280172626, 35.99690836098948 ], [ -89.721836279947752, 35.999951360992313 ], [ -89.688922279917108, 36.025867361016445 ], [ -89.678249279907163, 36.083040361069692 ], [ -89.667468279897122, 36.099386361084917 ], [ -89.589501279824503, 36.129861361113299 ], [ -89.589532279824539, 36.152089361134003 ], [ -89.618639279851649, 36.183811361163542 ], [ -89.676869279905873, 36.220935361198116 ], [ -89.695737279923449, 36.240863361216675 ], [ -89.694623279922411, 36.252203361227238 ], [ -89.670666279900104, 36.254961361229803 ], [ -89.618159279851199, 36.240966361216778 ], [ -89.54172527978001, 36.257346361232024 ], [ -89.535454279774171, 36.264605361238793 ], [ -89.542313279780558, 36.280932361253996 ], [ -89.606844279840658, 36.308103361279294 ], [ -89.622874279855594, 36.334847361304206 ], [ -89.605768279839666, 36.354817361322802 ], [ -89.544632279782718, 36.345788361314391 ], [ -89.51940927975923, 36.355996361323903 ], [ -89.520080279759853, 36.401122361365928 ], [ -89.545258279783312, 36.44102336140309 ], [ -89.51609827975615, 36.471872361431821 ], [ -89.533272279772149, 36.498170361456317 ], [ -89.567064279803617, 36.51879936147553 ], [ -89.568231279804706, 36.541469361496638 ], [ -89.556214279793508, 36.557803361511851 ], [ -89.530442279769503, 36.564616361518191 ], [ -89.493202279734831, 36.559177361513129 ], [ -89.481749279724156, 36.547836361502569 ], [ -89.471449279714562, 36.525616361481873 ], [ -89.481757279724164, 36.50475836146245 ], [ -89.475897279718708, 36.498609361456722 ], [ -89.492064279733768, 36.465524361425906 ], [ -89.470908279714067, 36.446017361407741 ], [ -89.448591279693275, 36.456442361417452 ], [ -89.414784279661788, 36.502679361460508 ], [ -89.418210279664976, 36.510625361467916 ], [ -89.373951279623768, 36.61624736156628 ], [ -89.363621279614136, 36.625761361575144 ], [ -89.342395279594371, 36.62890836157807 ], [ -89.3223452795757, 36.622076361571708 ], [ -89.283495279539522, 36.575309361528156 ], [ -89.241684279500575, 36.569328361522579 ], [ -89.210128279471192, 36.581954361534343 ], [ -89.200187279461929, 36.631357361580356 ], [ -89.177161279440483, 36.653062361600568 ], [ -89.167899279431865, 36.671628361617863 ], [ -89.197563279459487, 36.713425361656789 ], [ -89.196365279458377, 36.727478361669867 ], [ -89.177269279440594, 36.760982361701075 ], [ -89.151435279416532, 36.759097361699318 ], [ -89.125540279392411, 36.768088361707697 ], [ -89.125906279392751, 36.7924683617304 ], [ -89.16444427942865, 36.804476361741578 ], [ -89.173531279437114, 36.829439361764827 ], [ -89.166565279430614, 36.843476361777903 ], [ -89.129653279396237, 36.86649436179934 ], [ -89.105034279373314, 36.953922361880764 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Arizona", "DRAWSEQ": 37, "STATE_FIPS": "04", "SUB_REGION": "Mountain", "STATE_ABBR": "AZ" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -114.520627303043426, 33.027707358224191 ], [ -114.468387302994785, 32.977789358177702 ], [ -114.476444303002282, 32.935908358138697 ], [ -114.461436302988304, 32.845422358054428 ], [ -114.526219303048634, 32.80991235802135 ], [ -114.53507730305688, 32.788047358000995 ], [ -114.530095303052249, 32.7714113579855 ], [ -114.543187303064443, 32.771232357985333 ], [ -114.543004303064265, 32.76074935797557 ], [ -114.561582303081565, 32.760753357975574 ], [ -114.560751303080792, 32.748936357964567 ], [ -114.572210303091481, 32.748829357964468 ], [ -114.571959303091234, 32.737439357953861 ], [ -114.603522303120627, 32.73588635795241 ], [ -114.603942303121016, 32.726285357943468 ], [ -114.694040303204929, 32.741425357957567 ], [ -114.712695303222318, 32.735013357951601 ], [ -114.722049303231017, 32.720857357938414 ], [ -114.809394303312359, 32.616044357840799 ], [ -114.821761303323882, 32.487169357720774 ], [ -113.32911130193375, 32.043621357307693 ], [ -111.36952130010873, 31.431531356737636 ], [ -111.07196429983162, 31.335634356648328 ], [ -110.452578299254768, 31.337660356650211 ], [ -109.045615297944423, 31.343453356655608 ], [ -109.049495297948042, 32.442044357678753 ], [ -109.051346297949763, 32.779550357993074 ], [ -109.050526297949006, 33.20516435838946 ], [ -109.050349297948841, 33.783302358927898 ], [ -109.048652297947257, 34.591780359680847 ], [ -109.046641297945385, 34.954646360018792 ], [ -109.047846297946506, 35.99666436098925 ], [ -109.048480297947094, 36.996641361920553 ], [ -109.997076298830549, 36.992067361916291 ], [ -110.452236299254452, 36.991746361915986 ], [ -110.484089299284108, 37.003926361927334 ], [ -110.740063299522504, 37.002488361925998 ], [ -111.356164300096296, 37.001709361925265 ], [ -112.237258300916878, 36.995492361919474 ], [ -112.542521301201177, 36.997994361921812 ], [ -112.899983301534093, 36.996227361920162 ], [ -114.043939302599483, 36.996538361920457 ], [ -114.043716302599279, 36.84184936177639 ], [ -114.037392302593389, 36.216023361193542 ], [ -114.045105302600561, 36.193978361173009 ], [ -114.107775302658936, 36.121090361105132 ], [ -114.129023302678718, 36.04173036103122 ], [ -114.206769302751127, 36.017255361008424 ], [ -114.233472302775994, 36.01833136100943 ], [ -114.307587302845022, 36.062233361050318 ], [ -114.30385730284155, 36.087108361073483 ], [ -114.316095302852943, 36.111438361096141 ], [ -114.344234302879158, 36.137480361120396 ], [ -114.380803302913208, 36.150991361132981 ], [ -114.443945302972026, 36.121053361105098 ], [ -114.466613302993125, 36.124711361108503 ], [ -114.530573303052705, 36.155090361136793 ], [ -114.598935303116363, 36.138335361121193 ], [ -114.621610303137487, 36.141966361124574 ], [ -114.712761303222379, 36.105181361090317 ], [ -114.728150303236703, 36.085962361072419 ], [ -114.728966303237456, 36.058753361047074 ], [ -114.717673303226945, 36.036758361026585 ], [ -114.736212303244201, 35.987648360980856 ], [ -114.699276303209814, 35.911612360910041 ], [ -114.661600303174723, 35.880473360881041 ], [ -114.662462303175516, 35.870960360872175 ], [ -114.689867303201055, 35.847442360850273 ], [ -114.68273930319441, 35.764703360773218 ], [ -114.688820303200075, 35.732595360743318 ], [ -114.665091303177974, 35.693099360706533 ], [ -114.66848630318114, 35.656399360672353 ], [ -114.65406630316771, 35.646584360663212 ], [ -114.639866303154491, 35.611348360630394 ], [ -114.653134303166837, 35.5848333606057 ], [ -114.649792303163736, 35.546637360570131 ], [ -114.672215303184601, 35.515754360541365 ], [ -114.645396303159629, 35.450760360480835 ], [ -114.589584303107642, 35.358378360394795 ], [ -114.587890303106079, 35.304768360344866 ], [ -114.559583303079705, 35.220183360266091 ], [ -114.561040303081072, 35.17434636022341 ], [ -114.572255303091509, 35.14006736019148 ], [ -114.582616303101162, 35.132560360184485 ], [ -114.626441303141974, 35.133906360185748 ], [ -114.635909303150797, 35.118655360171537 ], [ -114.595632303113291, 35.076058360131867 ], [ -114.633780303148811, 35.041863360100024 ], [ -114.62106830313698, 34.99891436006002 ], [ -114.632276303147421, 34.997651360058846 ], [ -114.621007303136921, 34.943609360008516 ], [ -114.630475303145744, 34.919501359986064 ], [ -114.62726330314274, 34.875533359945116 ], [ -114.570217303089606, 34.831860359904439 ], [ -114.542040303063374, 34.759958359837476 ], [ -114.525553303048014, 34.74891135982719 ], [ -114.497804303022178, 34.744757359823318 ], [ -114.465637302992221, 34.709873359790834 ], [ -114.42227030295183, 34.610895359698652 ], [ -114.434302302963033, 34.598963359687538 ], [ -114.40974230294016, 34.583723359673343 ], [ -114.376828302909502, 34.536563359629426 ], [ -114.383862302916057, 34.477085359574033 ], [ -114.376507302909204, 34.459679359557818 ], [ -114.332636302868352, 34.454873359553346 ], [ -114.302865302840615, 34.435754359535537 ], [ -114.283394302822501, 34.412069359513481 ], [ -114.257842302798693, 34.405488359507352 ], [ -114.182080302728139, 34.365206359469838 ], [ -114.153415302701433, 34.336447359443049 ], [ -114.134127302683481, 34.314548359422659 ], [ -114.125230302675192, 34.272621359383606 ], [ -114.149912302698183, 34.266979359378354 ], [ -114.235776302778135, 34.186222359303144 ], [ -114.285368302824338, 34.17123135928918 ], [ -114.322799302859181, 34.141297359261301 ], [ -114.410166302940553, 34.102654359225312 ], [ -114.424029302953471, 34.078332359202662 ], [ -114.428980302958081, 34.029844359157508 ], [ -114.518208303041177, 33.965063359097172 ], [ -114.525632303048098, 33.952413359085391 ], [ -114.49818830302253, 33.925036359059895 ], [ -114.520962303043746, 33.862926359002046 ], [ -114.511722303035128, 33.841965358982527 ], [ -114.521122303043896, 33.82603135896769 ], [ -114.50455830302846, 33.771714358917102 ], [ -114.510287303033806, 33.743200358890547 ], [ -114.49567630302019, 33.708369358858107 ], [ -114.536433303058146, 33.682735358834236 ], [ -114.525263303047751, 33.665504358818183 ], [ -114.52717030304953, 33.622136358777794 ], [ -114.540247303061705, 33.580507358739027 ], [ -114.529420303051623, 33.560073358719997 ], [ -114.587061303105301, 33.509445358672849 ], [ -114.598086303115565, 33.486127358651132 ], [ -114.621089303136998, 33.468599358634805 ], [ -114.630573303145837, 33.439425358607636 ], [ -114.645092303159345, 33.419116358588724 ], [ -114.724936303233704, 33.411059358581213 ], [ -114.703603303213839, 33.352418358526606 ], [ -114.735427303243483, 33.305708358483102 ], [ -114.677693303189713, 33.268016358447994 ], [ -114.687711303199038, 33.23925835842121 ], [ -114.680051303191902, 33.224595358407555 ], [ -114.678120303190099, 33.167250358354153 ], [ -114.709463303219309, 33.122375358312354 ], [ -114.711355303221069, 33.095382358287218 ], [ -114.663951303176916, 33.038922358234636 ], [ -114.645159303159403, 33.044412358239754 ], [ -114.633967303148978, 33.033567358229647 ], [ -114.609925303126602, 33.027002358223534 ], [ -114.559089303079247, 33.036782358232642 ], [ -114.520627303043426, 33.027707358224191 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Oklahoma", "DRAWSEQ": 38, "STATE_FIPS": "40", "SUB_REGION": "West South Central", "STATE_ABBR": "OK" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -94.439322284341259, 34.929151359995046 ], [ -94.428552284331232, 35.40054636043407 ], [ -94.468485284368413, 35.641088360658088 ], [ -94.485935284384666, 35.760310360769125 ], [ -94.542417284437278, 36.106835361091854 ], [ -94.553113284447235, 36.164525361145579 ], [ -94.607453284497836, 36.478790361438264 ], [ -94.617257284506977, 36.489414361448155 ], [ -94.62107328451053, 36.670543361616851 ], [ -94.62168428451109, 36.763607361703521 ], [ -94.62037928450988, 36.997046361920923 ], [ -95.03274528489392, 37.000779361924401 ], [ -95.071931284930415, 37.001478361925052 ], [ -95.406622285242122, 37.000615361924247 ], [ -95.526019285353328, 37.001018361924622 ], [ -95.785748285595218, 36.998114361921921 ], [ -95.957961285755601, 37.000083361923757 ], [ -96.006049285800387, 36.998333361922121 ], [ -96.519187286278282, 37.000577361924215 ], [ -96.748696286492034, 37.000166361923831 ], [ -97.137693286854315, 36.999808361923499 ], [ -97.465405287159513, 36.996467361920388 ], [ -97.804250287475085, 36.998567361922341 ], [ -98.104529287754744, 36.99867136192244 ], [ -98.3471432879807, 36.999061361922799 ], [ -98.540219288160515, 36.998376361922169 ], [ -98.999516288588268, 36.998072361921885 ], [ -99.437473288996145, 36.994558361918607 ], [ -99.544639289095954, 36.995463361919448 ], [ -99.999261289519353, 36.995417361919408 ], [ -100.088574289602533, 36.997652361921496 ], [ -100.634245290110727, 36.99783236192166 ], [ -100.950587290405352, 36.996661361920573 ], [ -101.071604290518053, 36.997466361921319 ], [ -101.553676290967019, 36.996693361920599 ], [ -102.024519291405525, 36.988875361913315 ], [ -102.037207291417346, 36.988994361913427 ], [ -102.997709292311882, 36.998523361922302 ], [ -102.997401292311594, 36.492370361450909 ], [ -102.16567329153699, 36.490234361448927 ], [ -102.034658291414971, 36.492981361451484 ], [ -101.620755291029482, 36.4920313614506 ], [ -101.090102290535285, 36.488050361446888 ], [ -100.957341290411634, 36.489637361448366 ], [ -100.549839290032125, 36.489479361448218 ], [ -100.007273289526822, 36.493912361452345 ], [ -100.001550289521489, 36.492554361451084 ], [ -99.997553289517768, 36.057591361045993 ], [ -99.99812328951829, 35.883837360884172 ], [ -100.000392289520406, 35.618856360637388 ], [ -99.994743289515142, 35.424622360456496 ], [ -99.997570289517782, 35.182235360230749 ], [ -99.996455289516746, 35.031051360089947 ], [ -99.999260289519356, 34.747243359825632 ], [ -99.996475289516766, 34.562384359653471 ], [ -99.972480289494413, 34.561926359653043 ], [ -99.945120289468932, 34.579634359669541 ], [ -99.93228728945698, 34.579173359669106 ], [ -99.880977289409188, 34.548242359640298 ], [ -99.860949289390547, 34.51869435961278 ], [ -99.830308289362009, 34.501846359597089 ], [ -99.778060289313345, 34.444064359543276 ], [ -99.685277289226931, 34.377520359481302 ], [ -99.60181728914921, 34.368634359473027 ], [ -99.585589289134091, 34.384934359488206 ], [ -99.578219289127233, 34.408988359510609 ], [ -99.554232289104888, 34.415256359516448 ], [ -99.502504289056716, 34.404145359506103 ], [ -99.479806289035579, 34.383600359486962 ], [ -99.43874328899733, 34.364783359469442 ], [ -99.410323288970858, 34.369185359473541 ], [ -99.394522288956153, 34.396822359499282 ], [ -99.393157288954882, 34.429070359529312 ], [ -99.364569288928251, 34.450272359549061 ], [ -99.323659288890155, 34.412787359514148 ], [ -99.267535288837877, 34.398364359500718 ], [ -99.254465288825713, 34.368294359472713 ], [ -99.205849288780428, 34.332075359438981 ], [ -99.196663288771873, 34.305205359413954 ], [ -99.204955288779601, 34.255730359367874 ], [ -99.190840288766452, 34.22382135933816 ], [ -99.176511288753105, 34.21281635932791 ], [ -99.128300288708203, 34.201556359317422 ], [ -99.078784288662092, 34.208446359323844 ], [ -99.035570288621841, 34.199009359315056 ], [ -98.996544288585497, 34.209583359324895 ], [ -98.95285728854482, 34.194653359310998 ], [ -98.891689288487854, 34.160910359279569 ], [ -98.811410288413086, 34.146026359265704 ], [ -98.778877288382787, 34.132053359252694 ], [ -98.705632288314575, 34.130806359251537 ], [ -98.682552288293067, 34.150089359269494 ], [ -98.662059288273994, 34.147129359266735 ], [ -98.626330288240709, 34.15852735927735 ], [ -98.607584288223251, 34.151489359270798 ], [ -98.576668288194455, 34.142022359261979 ], [ -98.557914288177003, 34.105428359227901 ], [ -98.499852288122923, 34.066508359191651 ], [ -98.448519288075119, 34.054469359180437 ], [ -98.421670288050109, 34.065924359191108 ], [ -98.407464288036877, 34.082548359206591 ], [ -98.391282288021813, 34.087324359211038 ], [ -98.384583288015563, 34.115873359237625 ], [ -98.350730287984035, 34.142213359262158 ], [ -98.320814287956182, 34.139512359259641 ], [ -98.277324287915675, 34.122964359244229 ], [ -98.173164287818665, 34.115461359237244 ], [ -98.137182287785166, 34.138524359258724 ], [ -98.115186287764672, 34.149079359268555 ], [ -98.094441287745354, 34.134649359255114 ], [ -98.111005287760776, 34.069915359194823 ], [ -98.086522287737978, 34.00541035913475 ], [ -98.055873287709431, 33.989896359120301 ], [ -98.023806287679562, 33.987081359117681 ], [ -97.982995287641558, 34.001382359131 ], [ -97.950539287611335, 33.97125835910294 ], [ -97.948067287609035, 33.959849359092317 ], [ -97.963311287623227, 33.948748359081975 ], [ -97.950997287611756, 33.932616359066955 ], [ -97.976442287635464, 33.912151359047897 ], [ -97.976693287635698, 33.902603359039006 ], [ -97.95504828761554, 33.883579359021283 ], [ -97.909377287572994, 33.874123359012479 ], [ -97.870062287536385, 33.855214358994871 ], [ -97.852857287520365, 33.857171358996695 ], [ -97.790515287462298, 33.890556359027784 ], [ -97.756670287430779, 33.932197359066564 ], [ -97.729326287405314, 33.939391359073262 ], [ -97.704567287382261, 33.971644359103301 ], [ -97.671371287351334, 33.988711359119193 ], [ -97.600484287285326, 33.969535359101336 ], [ -97.592656287278032, 33.917985359053326 ], [ -97.575970287262493, 33.902631359039027 ], [ -97.554890287242856, 33.904004359040307 ], [ -97.51850428720897, 33.916871359052294 ], [ -97.477831287171085, 33.907808359043848 ], [ -97.463060287157333, 33.902483359038889 ], [ -97.457360287152028, 33.890532359027759 ], [ -97.453035287147998, 33.836315358977266 ], [ -97.410416287108305, 33.820812358962826 ], [ -97.363616287064715, 33.831127358972438 ], [ -97.342100287044687, 33.8620173590012 ], [ -97.315252287019675, 33.870494359009101 ], [ -97.314382287018873, 33.895941359032797 ], [ -97.272572286979923, 33.872675359011126 ], [ -97.264202286972136, 33.858832358998235 ], [ -97.250980286959816, 33.873072359011502 ], [ -97.246356286955518, 33.894339359031306 ], [ -97.211626286923163, 33.905790359041973 ], [ -97.188059286901222, 33.899305359035928 ], [ -97.164460286879248, 33.86325035900235 ], [ -97.168885286883366, 33.847896358988052 ], [ -97.195307286907962, 33.836261358977218 ], [ -97.208613286920368, 33.819752358961843 ], [ -97.189455286902515, 33.752874358899554 ], [ -97.152764286868347, 33.728773358877106 ], [ -97.11585228683397, 33.726038358874561 ], [ -97.090788286810621, 33.731776358879905 ], [ -97.08375428680408, 33.74251835888991 ], [ -97.087958286807989, 33.80767535895059 ], [ -97.050313286772933, 33.823551358965375 ], [ -97.078535286799223, 33.837913358978753 ], [ -97.082465286802872, 33.851203358991128 ], [ -97.071188286792378, 33.856830358996376 ], [ -97.025883286750187, 33.840664358981314 ], [ -97.006138286731797, 33.850616358990585 ], [ -96.987995286714892, 33.876525359014714 ], [ -96.988148286715031, 33.944303359077836 ], [ -96.968471286696712, 33.937421359071429 ], [ -96.936487286666917, 33.947949359081235 ], [ -96.929850286660738, 33.961873359094199 ], [ -96.89873628663176, 33.950127359083261 ], [ -96.883133286617237, 33.924692359059577 ], [ -96.879219286613591, 33.884104359021777 ], [ -96.861296286596897, 33.861781359000986 ], [ -96.844290286581057, 33.858134358997589 ], [ -96.814397286553216, 33.871871359010385 ], [ -96.797871286537827, 33.870051359008684 ], [ -96.749102286492402, 33.831840358973096 ], [ -96.711953286457813, 33.833972358975089 ], [ -96.693657286440768, 33.848006358988158 ], [ -96.677979286426165, 33.904424359040696 ], [ -96.666512286415497, 33.913644359049286 ], [ -96.584760286339346, 33.896245359033081 ], [ -96.614439286366988, 33.863001359002119 ], [ -96.601468286354915, 33.843058358983548 ], [ -96.562404286318525, 33.825522358967213 ], [ -96.510843286270514, 33.815787358958147 ], [ -96.501016286261361, 33.788192358932449 ], [ -96.487641286248902, 33.778232358923177 ], [ -96.419730286185654, 33.78842835893267 ], [ -96.371083286140347, 33.740497358888028 ], [ -96.347850286118714, 33.705631358855555 ], [ -96.316538286089553, 33.70190435885209 ], [ -96.301050286075125, 33.714153358863499 ], [ -96.289943286064783, 33.762034358908089 ], [ -96.27833828605398, 33.773489358918752 ], [ -96.212807285992938, 33.756792358903205 ], [ -96.187286285969179, 33.758684358904965 ], [ -96.16907428595222, 33.769457358914998 ], [ -96.161575285945233, 33.798329358941892 ], [ -96.141677285926704, 33.820420358962465 ], [ -96.154777285938906, 33.824044358965835 ], [ -96.180985285963303, 33.808534358951391 ], [ -96.183388285965549, 33.815892358958244 ], [ -96.169464285952571, 33.829083358970536 ], [ -96.149223285933729, 33.835690358976684 ], [ -96.109701285896918, 33.829357358970789 ], [ -96.091780285880233, 33.844677358985052 ], [ -96.048230285839665, 33.84137735898198 ], [ -96.027004285819899, 33.856121358995715 ], [ -96.014324285808087, 33.844307358984707 ], [ -96.002048285796661, 33.857078358996603 ], [ -96.002872285797423, 33.873489359011884 ], [ -95.99446428578959, 33.875476359013739 ], [ -95.977648285773938, 33.858051358997514 ], [ -95.95901628575659, 33.865139359004111 ], [ -95.943323285741968, 33.890071359027331 ], [ -95.933328285732657, 33.890628359027851 ], [ -95.846805285652081, 33.841138358981759 ], [ -95.826221285632911, 33.843125358983613 ], [ -95.795725285604505, 33.864774359003775 ], [ -95.768761285579401, 33.851503358991408 ], [ -95.764497285575416, 33.879106359017115 ], [ -95.760942285572114, 33.893541359030564 ], [ -95.747109285559233, 33.903497359039832 ], [ -95.699950285515314, 33.894926359031857 ], [ -95.633732285453632, 33.920207359055397 ], [ -95.613224285434541, 33.92034135905552 ], [ -95.615070285436261, 33.936794359070845 ], [ -95.606312285428103, 33.944656359078166 ], [ -95.563013285387783, 33.936177359070271 ], [ -95.546555285372449, 33.904137359040433 ], [ -95.519813285347539, 33.906747359042861 ], [ -95.52697028535421, 33.897920359034643 ], [ -95.547730285373547, 33.893262359030302 ], [ -95.544274285370321, 33.885846359023397 ], [ -95.513122285341311, 33.897840359034568 ], [ -95.499091285328248, 33.881822359019651 ], [ -95.468359285299627, 33.88653735902404 ], [ -95.451841285284246, 33.865858359004783 ], [ -95.33027228517102, 33.871024359009596 ], [ -95.336460285176784, 33.897220359033987 ], [ -95.302188285144865, 33.88673035902422 ], [ -95.286662285130404, 33.887008359024477 ], [ -95.277583285121949, 33.91804535905338 ], [ -95.26384928510916, 33.897907359034633 ], [ -95.251223285097396, 33.905128359041356 ], [ -95.251521285097681, 33.936550359070615 ], [ -95.234270285081607, 33.964969359097083 ], [ -95.148544285001776, 33.943653359077231 ], [ -95.12819628498282, 33.940975359074741 ], [ -95.126906284981615, 33.917252359052647 ], [ -95.119452284974685, 33.912388359048116 ], [ -95.095586284952446, 33.921845359056924 ], [ -95.082494284940253, 33.918560359053863 ], [ -95.08994028494719, 33.89702335903381 ], [ -95.083829284941501, 33.888569359025929 ], [ -95.063702284922755, 33.917756359053115 ], [ -95.063366284922438, 33.896801359033603 ], [ -95.043087284903564, 33.884553359022192 ], [ -95.037586284898438, 33.866559359005436 ], [ -95.012996284875527, 33.870053359008686 ], [ -94.989504284853652, 33.856290358995871 ], [ -94.968927284834493, 33.86632235900521 ], [ -94.960129284826294, 33.84818435898832 ], [ -94.940109284807647, 33.840932358981568 ], [ -94.940620284808134, 33.815915358958264 ], [ -94.918456284787482, 33.816304358958632 ], [ -94.908766284778466, 33.803586358946788 ], [ -94.914099284783433, 33.789705358933858 ], [ -94.881855284753399, 33.775072358920227 ], [ -94.858096284731275, 33.74942935889635 ], [ -94.819375284695212, 33.749513358896422 ], [ -94.803437284680371, 33.739691358887278 ], [ -94.783722284662005, 33.753370358900014 ], [ -94.764388284643999, 33.752951358899629 ], [ -94.782241284660628, 33.742376358889778 ], [ -94.783370284661672, 33.733774358881767 ], [ -94.749983284630588, 33.736815358884598 ], [ -94.762930284642636, 33.716906358866055 ], [ -94.742323284623453, 33.719157358868159 ], [ -94.754690284634961, 33.707881358857655 ], [ -94.741865284623017, 33.701377358851595 ], [ -94.691197284575836, 33.690399358841375 ], [ -94.668667284554857, 33.696648358847192 ], [ -94.65568928454276, 33.692403358843237 ], [ -94.644535284532381, 33.677762358829604 ], [ -94.668163284554382, 33.67157135882384 ], [ -94.66963628455575, 33.66617335881881 ], [ -94.658748284545609, 33.663850358816646 ], [ -94.638973284527196, 33.670217358822576 ], [ -94.631946284520652, 33.68401135883542 ], [ -94.601153284491971, 33.665721358818388 ], [ -94.585314284477221, 33.679095358830843 ], [ -94.578714284471076, 33.670585358822919 ], [ -94.560930284454514, 33.672027358824259 ], [ -94.565416284458692, 33.66312735881597 ], [ -94.585367284477272, 33.662246358815153 ], [ -94.58859428448028, 33.655562358808929 ], [ -94.576669284469176, 33.652271358805862 ], [ -94.545625284440263, 33.661735358814674 ], [ -94.542138284437016, 33.648361358802219 ], [ -94.562402284455885, 33.642944358797173 ], [ -94.562356284455845, 33.635650358790386 ], [ -94.550401284444703, 33.632809358787739 ], [ -94.518196284414714, 33.643124358797344 ], [ -94.52526128442129, 33.621136358776866 ], [ -94.510765284407796, 33.63092535878598 ], [ -94.500816284398525, 33.623162358778757 ], [ -94.476691284376059, 33.632081358787062 ], [ -94.468585284368515, 33.939311359073187 ], [ -94.46169128436209, 34.196765359312963 ], [ -94.452624284353647, 34.508432359603226 ], [ -94.445961284347447, 34.735608359814798 ], [ -94.439322284341259, 34.929151359995046 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "North Carolina", "DRAWSEQ": 39, "STATE_FIPS": "37", "SUB_REGION": "South Atlantic", "STATE_ABBR": "NC" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -83.988454274608131, 34.989151360050926 ], [ -83.937899274561047, 34.989477360051232 ], [ -83.549297274199134, 34.98962836005137 ], [ -83.512887274165223, 34.992115360053688 ], [ -83.106157273786422, 35.000366360061378 ], [ -83.007146273694218, 35.024293360083661 ], [ -82.887556273582831, 35.0554733601127 ], [ -82.771201273474475, 35.085537360140691 ], [ -82.697208273405565, 35.091349360146111 ], [ -82.687884273396875, 35.097918360152221 ], [ -82.685900273395035, 35.121580360174264 ], [ -82.654344273365638, 35.119574360172393 ], [ -82.56987627328698, 35.149607360200363 ], [ -82.524479273244694, 35.154677360205085 ], [ -82.466586273190771, 35.173617360222721 ], [ -82.437761273163929, 35.169676360219057 ], [ -82.389450273118939, 35.208356360255081 ], [ -82.371216273101965, 35.182839360231313 ], [ -82.359962273091483, 35.183064360231526 ], [ -82.35070027308285, 35.192788360240584 ], [ -82.320609273054828, 35.184303360232676 ], [ -82.278165273015304, 35.195121360242752 ], [ -82.21001027295182, 35.193241360241004 ], [ -81.971272272729479, 35.188400360236493 ], [ -81.870416272635552, 35.183237360231686 ], [ -81.765181272537546, 35.182596360231088 ], [ -81.361980272162029, 35.162986360212827 ], [ -81.322625272125379, 35.163891360213668 ], [ -81.049099271870645, 35.151672360202284 ], [ -81.048839271870392, 35.132153360184105 ], [ -81.028240271851217, 35.105551360159339 ], [ -81.065350271885777, 35.066625360123084 ], [ -81.03968527186187, 35.037345360095813 ], [ -80.927592271757476, 35.101394360155467 ], [ -80.894510271726674, 35.0598803601168 ], [ -80.839959271675866, 35.00216636006305 ], [ -80.785444271625096, 34.940788360005882 ], [ -80.799856271638518, 34.81626035988991 ], [ -80.561335271416368, 34.815379359889093 ], [ -80.325065271196337, 34.814916359888656 ], [ -79.919736270818845, 34.808074359882283 ], [ -79.685738270600908, 34.80541235987981 ], [ -79.667282270583726, 34.80082035987553 ], [ -79.45574127038671, 34.634252359720406 ], [ -79.446913270378488, 34.619222359706406 ], [ -79.074257270031424, 34.30473835941352 ], [ -78.655453269641384, 33.948845359082071 ], [ -78.579453269570607, 33.882164359019967 ], [ -78.034518269063099, 33.914465359050048 ], [ -77.958236268992053, 33.992753359122958 ], [ -77.9604422689941, 34.189413359306116 ], [ -77.926467268962469, 34.062207359187646 ], [ -77.894109268932326, 34.0693513591943 ], [ -77.864094268904367, 34.192908359309371 ], [ -77.750228268798324, 34.305215359413964 ], [ -77.602309268660562, 34.412796359514161 ], [ -77.609420268667193, 34.435211359535032 ], [ -77.586455268645807, 34.421104359521891 ], [ -77.538326268600983, 34.457175359555485 ], [ -77.15627426824517, 34.660799359745127 ], [ -77.129067268219828, 34.685075359767737 ], [ -77.148630268238051, 34.764493359841701 ], [ -77.050199268146372, 34.699079359780782 ], [ -76.624963267750346, 34.719915359800183 ], [ -76.469546267605594, 34.785223359861007 ], [ -76.314348267461057, 34.948979360013517 ], [ -76.329044267474742, 34.976120360038792 ], [ -76.363652267506978, 34.943275360008201 ], [ -76.423699267562895, 34.946410360011122 ], [ -76.444674267582428, 35.016821360076698 ], [ -76.529426267661364, 34.974797360037556 ], [ -76.669712267792022, 34.970158360033238 ], [ -76.646701267770581, 34.906495359973945 ], [ -76.912773268018384, 34.936630360002013 ], [ -77.000858268100416, 35.053046360110436 ], [ -77.11026026820231, 35.066195360122677 ], [ -77.104347268196804, 35.088145360143123 ], [ -77.047552268143903, 35.092315360147012 ], [ -76.942910268046447, 35.070194360126408 ], [ -76.941155268044824, 35.027587360086727 ], [ -76.84912526795911, 34.982380360044623 ], [ -76.67766226779942, 35.024248360083618 ], [ -76.623873267749332, 35.064513360121111 ], [ -76.604875267731629, 35.138726360190233 ], [ -76.639741267764109, 35.17268636022186 ], [ -76.506775267640265, 35.248933360292867 ], [ -76.540627267671795, 35.303854360344019 ], [ -76.590859267718585, 35.312247360351833 ], [ -76.614167267740285, 35.273086360315361 ], [ -76.694552267815155, 35.350594360387547 ], [ -76.982854268083656, 35.436663360467705 ], [ -77.103444268195958, 35.550348360573579 ], [ -76.705029267824912, 35.412101360444836 ], [ -76.628421267753566, 35.438063360469016 ], [ -76.637853267762353, 35.520501360545786 ], [ -76.492188267626688, 35.541952360565766 ], [ -76.518595267651278, 35.577810360599159 ], [ -76.446173267583831, 35.551031360574221 ], [ -76.458082267594918, 35.504591360530966 ], [ -76.533402267665068, 35.450365360480468 ], [ -76.498451267632518, 35.416383360448819 ], [ -76.181252267337101, 35.341702360379273 ], [ -76.052608267217295, 35.414775360447322 ], [ -75.891122267066905, 35.631437360649102 ], [ -75.778673266962173, 35.578859360600134 ], [ -75.728989266915903, 35.665346360680687 ], [ -75.748584266934145, 35.869508360870825 ], [ -75.817681266998505, 35.923684360921285 ], [ -75.987491267156656, 35.892867360892581 ], [ -76.020844267187712, 35.669259360684329 ], [ -76.104382267265507, 35.663805360679248 ], [ -76.16694626732378, 35.697007360710174 ], [ -76.042704267208066, 35.684014360698072 ], [ -76.075552267238663, 35.756964360766005 ], [ -76.025687267192225, 35.920585360918395 ], [ -76.089282267251448, 35.963073360957964 ], [ -76.213420267367056, 35.977037360970968 ], [ -76.371139267513954, 35.932505360929497 ], [ -76.409128267549335, 35.97762936097152 ], [ -76.69688626781732, 35.941704360938061 ], [ -76.74079426785822, 35.936787360933479 ], [ -76.693431267814105, 35.993130360985958 ], [ -76.760345267876431, 36.144750361127166 ], [ -76.744736267861896, 36.234073361210349 ], [ -76.707168267826901, 36.266288361240356 ], [ -76.741022267858426, 36.315322361286022 ], [ -76.923761268028613, 36.39259836135799 ], [ -76.776318267891298, 36.358484361326219 ], [ -76.688408267809436, 36.294673361266788 ], [ -76.726180267844612, 36.156980361138551 ], [ -76.689823267810752, 36.049770361038711 ], [ -76.632875267757711, 36.037277361027073 ], [ -76.648684267772438, 36.065868361053703 ], [ -76.59366626772119, 36.010293361001942 ], [ -76.52267326765508, 36.007329360999179 ], [ -76.420085267559529, 36.058766361047084 ], [ -76.480192267615507, 36.079952361066816 ], [ -76.275161267424565, 36.110530361095293 ], [ -76.298585267446384, 36.214387361192024 ], [ -76.234633267386812, 36.163519361144644 ], [ -76.141587267300167, 36.147848361130045 ], [ -76.112358267272938, 36.174578361154943 ], [ -76.218558267371847, 36.296764361268743 ], [ -76.182821267338568, 36.315395361286093 ], [ -75.980981267150582, 36.169886361150574 ], [ -75.956826267128093, 36.193931361172972 ], [ -76.008619267176329, 36.319753361290154 ], [ -75.941576267113888, 36.294497361266629 ], [ -75.9571552671284, 36.259612361234133 ], [ -75.913406267087652, 36.24496136122049 ], [ -75.854797267033064, 36.105829361090912 ], [ -75.798480266980619, 36.072982361060326 ], [ -75.799687266981749, 36.112979361097572 ], [ -75.924234267097731, 36.351106361319353 ], [ -75.92776826710103, 36.423401361386681 ], [ -75.950901267122575, 36.365628361332874 ], [ -76.001258267169476, 36.419070361382644 ], [ -75.969411267139819, 36.415275361379109 ], [ -75.975721267145687, 36.436370361398758 ], [ -76.090717267252785, 36.503720361461482 ], [ -76.032861267198911, 36.514527361471551 ], [ -76.045611267210774, 36.557106361511202 ], [ -76.12705026728662, 36.557315361511399 ], [ -76.329916267475554, 36.556208361510365 ], [ -76.497228267631385, 36.555964361510135 ], [ -76.563255267692867, 36.555404361509616 ], [ -76.921314268026336, 36.554309361508601 ], [ -76.923816268028673, 36.554298361508586 ], [ -77.177042268264501, 36.556437361510575 ], [ -77.319746268397409, 36.554068361508371 ], [ -77.763638268810823, 36.553589361507925 ], [ -77.898568268936472, 36.553092361507467 ], [ -78.051381269078803, 36.552621361507022 ], [ -78.320969269329865, 36.545675361500557 ], [ -78.458529269457983, 36.541623361496782 ], [ -78.737116269717433, 36.546214361501058 ], [ -78.796428269772676, 36.543674361498688 ], [ -79.144063270096439, 36.546198361501041 ], [ -79.216803270164178, 36.549921361504509 ], [ -79.510048270437281, 36.54779536150253 ], [ -79.717201270630213, 36.548028361502745 ], [ -80.023822270915772, 36.545163361500073 ], [ -80.047863270938166, 36.547272361502039 ], [ -80.435092271298799, 36.551181361505684 ], [ -80.610841271462476, 36.557430361511507 ], [ -80.837953271673996, 36.56356836151722 ], [ -80.903240271734802, 36.565342361518873 ], [ -81.345121272146329, 36.572988361525994 ], [ -81.669835272448751, 36.589767361541618 ], [ -81.702632272479292, 36.519460361476142 ], [ -81.698115272475079, 36.47190036143185 ], [ -81.740908272514943, 36.391907361357347 ], [ -81.740213272514296, 36.361982361329481 ], [ -81.709290272485489, 36.333850361303277 ], [ -81.730324272505086, 36.329467361299194 ], [ -81.830410272598286, 36.334779361304143 ], [ -81.910994272673349, 36.290875361263254 ], [ -81.932951272693785, 36.263444361237703 ], [ -82.020295272775144, 36.129834361113268 ], [ -82.077602272828514, 36.100260361085731 ], [ -82.11792527286606, 36.096374361082113 ], [ -82.15390127289956, 36.139737361122499 ], [ -82.20758427294956, 36.147127361129378 ], [ -82.26216027300039, 36.120487361104566 ], [ -82.311783273046601, 36.122260361106214 ], [ -82.373713273104286, 36.098807361084376 ], [ -82.408283273136476, 36.075426361062597 ], [ -82.475055273198663, 35.993284360986102 ], [ -82.506794273228223, 35.972650360966881 ], [ -82.554005273272196, 35.956216360951579 ], [ -82.599165273314256, 35.963405360958276 ], [ -82.60566627332031, 36.003654360995753 ], [ -82.592094273307666, 36.022556361013358 ], [ -82.604264273319004, 36.043094361032487 ], [ -82.627909273341018, 36.054446361043063 ], [ -82.643755273355779, 36.051829361040625 ], [ -82.763095273466917, 35.999650360992028 ], [ -82.77346327347658, 35.987607360980817 ], [ -82.776308273479231, 35.956677360952007 ], [ -82.808535273509236, 35.92097536091876 ], [ -82.856137273553571, 35.947528360943487 ], [ -82.89584227359056, 35.948462360944362 ], [ -82.9139382736074, 35.927969360925275 ], [ -82.906689273600662, 35.872317360873438 ], [ -82.962619273652749, 35.791952360798597 ], [ -82.98687427367534, 35.774091360781966 ], [ -83.059828273743278, 35.782676360789957 ], [ -83.118057273797504, 35.763907360772478 ], [ -83.143533273821234, 35.762782360771425 ], [ -83.185220273860054, 35.728983360739953 ], [ -83.243724273914538, 35.718313360730015 ], [ -83.253177273923342, 35.700803360713707 ], [ -83.258999273928765, 35.69110636070468 ], [ -83.298291273965361, 35.656423360672377 ], [ -83.342903274006915, 35.653355360669522 ], [ -83.386972274047949, 35.625313360643403 ], [ -83.458173274114259, 35.597373360617382 ], [ -83.505683274158514, 35.559645360582245 ], [ -83.560922274209958, 35.555268360578168 ], [ -83.613750274259161, 35.571831360593592 ], [ -83.672766274314114, 35.565062360587291 ], [ -83.775774274410054, 35.552693360575773 ], [ -83.830098274460653, 35.519149360544532 ], [ -83.881125274508165, 35.510672360536631 ], [ -83.909912274534975, 35.476564360504867 ], [ -83.9546082745766, 35.455544360485291 ], [ -84.012556274630569, 35.407706360440741 ], [ -84.006217274624674, 35.372943360408364 ], [ -84.029115274646003, 35.325374360364066 ], [ -84.030771274647535, 35.292605360333539 ], [ -84.042689274658642, 35.272658360314963 ], [ -84.101560274713464, 35.245633360289801 ], [ -84.17964227478619, 35.24106936028555 ], [ -84.225863274829237, 35.261683360304744 ], [ -84.290959274889858, 35.21062236025719 ], [ -84.323773274920413, 34.989090360050874 ], [ -84.118152274728914, 34.988307360050143 ], [ -83.988454274608131, 34.989151360050926 ] ] ], [ [ [ -76.026819267193275, 36.556870361510981 ], [ -75.975936267145883, 36.518079361474854 ], [ -75.976927267146806, 36.478170361437691 ], [ -75.924450267097939, 36.474131361433926 ], [ -75.911564267085936, 36.54268436149777 ], [ -75.998314267166734, 36.556805361510925 ], [ -76.026819267193275, 36.556870361510981 ] ] ], [ [ [ -75.901631267076681, 36.556352361510498 ], [ -75.78280626696602, 36.225355361202233 ], [ -75.740492266926609, 36.050488361039378 ], [ -75.702359266891094, 36.050028361038947 ], [ -75.544578266744153, 35.788538360795414 ], [ -75.772788266956695, 36.229418361206015 ], [ -75.877811267054497, 36.556028361510201 ], [ -75.901631267076681, 36.556352361510498 ] ] ], [ [ [ -75.490824266694091, 35.670678360685649 ], [ -75.47502026667938, 35.564675360586932 ], [ -75.521080266722265, 35.281534360323235 ], [ -75.691171266880687, 35.235164360280045 ], [ -75.748898266934447, 35.190001360237986 ], [ -75.525893266726754, 35.22809436027346 ], [ -75.456580266662201, 35.617577360636197 ], [ -75.533233266733589, 35.769034360777255 ], [ -75.490824266694091, 35.670678360685649 ] ] ], [ [ [ -76.016628267183791, 35.069605360125863 ], [ -76.002497267170625, 35.069605360125863 ], [ -75.903562267078485, 35.132664360184584 ], [ -75.811150266992414, 35.164194360213955 ], [ -75.763311266947866, 35.192458360240273 ], [ -75.853549267031909, 35.167455360216991 ], [ -75.97531326714531, 35.116355360169393 ], [ -76.016628267183791, 35.069605360125863 ] ] ], [ [ [ -76.543919267674866, 34.587994359677324 ], [ -76.468904267604998, 34.693446359775535 ], [ -76.287339267435911, 34.877175359946641 ], [ -76.374318267516912, 34.813033359886909 ], [ -76.431938267570573, 34.760848359838306 ], [ -76.484125267619177, 34.697795359779583 ], [ -76.537395267668785, 34.614086359701624 ], [ -76.55479126768499, 34.610824359698583 ], [ -76.543919267674866, 34.587994359677324 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Tennessee", "DRAWSEQ": 40, "STATE_FIPS": "47", "SUB_REGION": "East South Central", "STATE_ABBR": "TN" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -83.9546082745766, 35.455544360485291 ], [ -83.909912274534975, 35.476564360504867 ], [ -83.881125274508165, 35.510672360536631 ], [ -83.830098274460653, 35.519149360544532 ], [ -83.775774274410054, 35.552693360575773 ], [ -83.672766274314114, 35.565062360587291 ], [ -83.613750274259161, 35.571831360593592 ], [ -83.560922274209958, 35.555268360578168 ], [ -83.505683274158514, 35.559645360582245 ], [ -83.458173274114259, 35.597373360617382 ], [ -83.386972274047949, 35.625313360643403 ], [ -83.342903274006915, 35.653355360669522 ], [ -83.298291273965361, 35.656423360672377 ], [ -83.258999273928765, 35.69110636070468 ], [ -83.253177273923342, 35.700803360713707 ], [ -83.243724273914538, 35.718313360730015 ], [ -83.185220273860054, 35.728983360739953 ], [ -83.143533273821234, 35.762782360771425 ], [ -83.118057273797504, 35.763907360772478 ], [ -83.059828273743278, 35.782676360789957 ], [ -82.98687427367534, 35.774091360781966 ], [ -82.962619273652749, 35.791952360798597 ], [ -82.906689273600662, 35.872317360873438 ], [ -82.9139382736074, 35.927969360925275 ], [ -82.89584227359056, 35.948462360944362 ], [ -82.856137273553571, 35.947528360943487 ], [ -82.808535273509236, 35.92097536091876 ], [ -82.776308273479231, 35.956677360952007 ], [ -82.77346327347658, 35.987607360980817 ], [ -82.763095273466917, 35.999650360992028 ], [ -82.643755273355779, 36.051829361040625 ], [ -82.627909273341018, 36.054446361043063 ], [ -82.604264273319004, 36.043094361032487 ], [ -82.592094273307666, 36.022556361013358 ], [ -82.60566627332031, 36.003654360995753 ], [ -82.599165273314256, 35.963405360958276 ], [ -82.554005273272196, 35.956216360951579 ], [ -82.506794273228223, 35.972650360966881 ], [ -82.475055273198663, 35.993284360986102 ], [ -82.408283273136476, 36.075426361062597 ], [ -82.373713273104286, 36.098807361084376 ], [ -82.311783273046601, 36.122260361106214 ], [ -82.26216027300039, 36.120487361104566 ], [ -82.20758427294956, 36.147127361129378 ], [ -82.15390127289956, 36.139737361122499 ], [ -82.11792527286606, 36.096374361082113 ], [ -82.077602272828514, 36.100260361085731 ], [ -82.020295272775144, 36.129834361113268 ], [ -81.932951272693785, 36.263444361237703 ], [ -81.910994272673349, 36.290875361263254 ], [ -81.830410272598286, 36.334779361304143 ], [ -81.730324272505086, 36.329467361299194 ], [ -81.709290272485489, 36.333850361303277 ], [ -81.740213272514296, 36.361982361329481 ], [ -81.740908272514943, 36.391907361357347 ], [ -81.698115272475079, 36.47190036143185 ], [ -81.702632272479292, 36.519460361476142 ], [ -81.669835272448751, 36.589767361541618 ], [ -81.652272272432384, 36.607673361558298 ], [ -81.828898272596888, 36.611596361561951 ], [ -81.918294272680143, 36.61360836156382 ], [ -81.92930327269039, 36.595950361547381 ], [ -82.154181272899834, 36.595150361546629 ], [ -82.216661272958021, 36.594072361545628 ], [ -82.296858273032711, 36.591801361543517 ], [ -82.610839273325126, 36.591545361543275 ], [ -82.849822273547687, 36.591041361542807 ], [ -82.986697273675162, 36.591289361543033 ], [ -83.210926273883999, 36.588089361540057 ], [ -83.248388273918891, 36.589935361541777 ], [ -83.275031273943696, 36.60046736155158 ], [ -83.464210274119893, 36.598840361550067 ], [ -83.675177274316368, 36.598704361549942 ], [ -83.695608274335399, 36.584249361536479 ], [ -83.935600274558908, 36.591290361543038 ], [ -84.006746274625158, 36.59208836154378 ], [ -84.254488274855888, 36.595452361546918 ], [ -84.256777274858024, 36.595498361546959 ], [ -84.781871275347058, 36.605076361555874 ], [ -84.791057275355612, 36.60543836155621 ], [ -84.998461275548763, 36.62098236157069 ], [ -85.272498275803983, 36.625616361575005 ], [ -85.300094275829693, 36.626101361575458 ], [ -85.437374275957538, 36.618199361568102 ], [ -85.785476276281742, 36.626685361576001 ], [ -85.980610276463466, 36.633112361581986 ], [ -86.198992276666857, 36.643290361591468 ], [ -86.415443276868444, 36.650932361598585 ], [ -86.510668276957119, 36.655074361602445 ], [ -86.770535277199144, 36.652100361599672 ], [ -87.068184277476348, 36.650811361598471 ], [ -87.112702277517812, 36.651307361598931 ], [ -87.346611277735661, 36.649277361597044 ], [ -87.640655278009504, 36.645217361593261 ], [ -87.69352827805875, 36.644488361592579 ], [ -87.853537278207767, 36.641522361589821 ], [ -87.870711278223766, 36.669423361615806 ], [ -88.071341278410614, 36.679683361625358 ], [ -88.041091278382439, 36.582721361535057 ], [ -88.035079278376841, 36.538200361493594 ], [ -88.042763278384001, 36.496570361454822 ], [ -88.49602527880613, 36.498207361456352 ], [ -88.512681278821645, 36.49954636145759 ], [ -88.810718279099206, 36.499045361457128 ], [ -88.826359279113774, 36.499908361457926 ], [ -88.830372279117512, 36.499854361457878 ], [ -89.34666727959835, 36.502610361460448 ], [ -89.414784279661788, 36.502679361460508 ], [ -89.448591279693275, 36.456442361417452 ], [ -89.470908279714067, 36.446017361407741 ], [ -89.492064279733768, 36.465524361425906 ], [ -89.475897279718708, 36.498609361456722 ], [ -89.533272279772149, 36.498170361456317 ], [ -89.51609827975615, 36.471872361431821 ], [ -89.545258279783312, 36.44102336140309 ], [ -89.520080279759853, 36.401122361365928 ], [ -89.51940927975923, 36.355996361323903 ], [ -89.544632279782718, 36.345788361314391 ], [ -89.605768279839666, 36.354817361322802 ], [ -89.622874279855594, 36.334847361304206 ], [ -89.606844279840658, 36.308103361279294 ], [ -89.542313279780558, 36.280932361253996 ], [ -89.535454279774171, 36.264605361238793 ], [ -89.54172527978001, 36.257346361232024 ], [ -89.618159279851199, 36.240966361216778 ], [ -89.670666279900104, 36.254961361229803 ], [ -89.694623279922411, 36.252203361227238 ], [ -89.695737279923449, 36.240863361216675 ], [ -89.676869279905873, 36.220935361198116 ], [ -89.618639279851649, 36.183811361163542 ], [ -89.589532279824539, 36.152089361134003 ], [ -89.589501279824503, 36.129861361113299 ], [ -89.667468279897122, 36.099386361084917 ], [ -89.678249279907163, 36.083040361069692 ], [ -89.688922279917108, 36.025867361016445 ], [ -89.721836279947752, 35.999951360992313 ], [ -89.713215279939732, 35.966397360961061 ], [ -89.664271279894152, 35.937894360934514 ], [ -89.645479279876639, 35.913873360912149 ], [ -89.649416279880313, 35.894362360893972 ], [ -89.664728279894575, 35.885721360885924 ], [ -89.714763279941167, 35.911501360909938 ], [ -89.738056279962862, 35.915087360913276 ], [ -89.762990279986084, 35.896887360896329 ], [ -89.766355279989213, 35.884177360884486 ], [ -89.75779427998124, 35.871493360872677 ], [ -89.701518279928834, 35.84211336084531 ], [ -89.700908279928271, 35.827590360831785 ], [ -89.736019279960971, 35.807114360812719 ], [ -89.759877279983186, 35.817497360822387 ], [ -89.790464280011676, 35.805630360811335 ], [ -89.799986280020534, 35.774300360782156 ], [ -89.827124280045808, 35.758347360767303 ], [ -89.859955280076392, 35.748269360757917 ], [ -89.909868280122879, 35.754914360764104 ], [ -89.951121280161288, 35.734345360744946 ], [ -89.952121280162231, 35.712564360724656 ], [ -89.929827280141467, 35.676344360690926 ], [ -89.893487280107621, 35.656050360672026 ], [ -89.865265280081331, 35.673384360688175 ], [ -89.857330280073938, 35.671141360686079 ], [ -89.84928128006645, 35.645301360662017 ], [ -89.863922280080089, 35.629825360647601 ], [ -89.877526280092752, 35.633414360650946 ], [ -89.9571332801669, 35.603183360622793 ], [ -89.95811828016781, 35.578674360599962 ], [ -89.921747280133943, 35.546140360569666 ], [ -89.931261280142792, 35.529313360553999 ], [ -89.947634280158042, 35.526982360551827 ], [ -89.962360280171765, 35.532373360556846 ], [ -89.989674280197207, 35.561756360584212 ], [ -90.033140280237674, 35.552495360575584 ], [ -90.040991280244995, 35.542928360566677 ], [ -90.04190628024584, 35.512521360538358 ], [ -89.999653280206488, 35.445537360475967 ], [ -90.046873280250466, 35.417187360449567 ], [ -90.060385280263048, 35.41349436044613 ], [ -90.074027280275757, 35.426590360458327 ], [ -90.074935280276605, 35.472426360501018 ], [ -90.082320280283483, 35.478289360506473 ], [ -90.102051280301865, 35.47365136050216 ], [ -90.137368280334755, 35.442607360473247 ], [ -90.172770280367715, 35.423801360455727 ], [ -90.167910280363202, 35.384339360418977 ], [ -90.140260280337444, 35.383130360417852 ], [ -90.132562280330276, 35.407685360440723 ], [ -90.112335280311441, 35.41777436045011 ], [ -90.085250280286218, 35.418365360450665 ], [ -90.075568280277196, 35.406613360439721 ], [ -90.08722628028805, 35.381593360416417 ], [ -90.105713280305267, 35.366067360401956 ], [ -90.098793280298821, 35.345678360382969 ], [ -90.106438280305952, 35.314772360354183 ], [ -90.157083280353106, 35.306331360346327 ], [ -90.169840280364994, 35.282653360324275 ], [ -90.152216280348583, 35.26414536030704 ], [ -90.106034280305565, 35.263935360306846 ], [ -90.090195280290814, 35.254486360298046 ], [ -90.06905328027112, 35.212826360259243 ], [ -90.073394280275167, 35.191922360239772 ], [ -90.062522280265043, 35.167005360216564 ], [ -90.064628280267002, 35.14747436019838 ], [ -90.083016280284127, 35.125140360177582 ], [ -90.143823280340769, 35.136626360188274 ], [ -90.164568280360086, 35.129703360181828 ], [ -90.178439280372999, 35.108738360162306 ], [ -90.169176280364368, 35.077919360133599 ], [ -90.195804280389169, 35.040990360099208 ], [ -90.291906280478671, 35.048551360106245 ], [ -90.305448280491291, 35.000788360061762 ], [ -89.717270279943506, 34.999261360060345 ], [ -89.646558279877652, 35.000733360061716 ], [ -89.342373279594355, 34.999805360060847 ], [ -89.198134279460021, 35.000883360061856 ], [ -89.006196279281269, 35.000234360061249 ], [ -88.812548279100909, 35.002438360063309 ], [ -88.785043279075296, 35.003182360063995 ], [ -88.383146278701005, 35.005041360065732 ], [ -88.351727278671746, 35.003832360064607 ], [ -88.193993278524843, 35.004453360065185 ], [ -88.19496227852575, 35.013544360073645 ], [ -87.986078278331206, 35.016033360075966 ], [ -87.60781327797892, 35.010546360070855 ], [ -87.222764277620314, 35.007346360067871 ], [ -87.207588277606177, 35.007960360068445 ], [ -86.833422277257711, 34.998246360059397 ], [ -86.782372277210172, 34.997075360058304 ], [ -86.313052276773078, 34.995273360056629 ], [ -86.303500276764183, 34.995464360056808 ], [ -85.869567276360044, 34.99238436005394 ], [ -85.608960276117344, 34.990164360051871 ], [ -85.467384275985495, 34.990123360051832 ], [ -85.359944275885425, 34.989978360051694 ], [ -85.267717275799541, 34.989149360050931 ], [ -84.972793275524864, 34.992629360054167 ], [ -84.967857275520274, 34.992683360054215 ], [ -84.800417275364325, 34.992832360054358 ], [ -84.771134275337062, 34.990757360052427 ], [ -84.618684275195079, 34.988759360050565 ], [ -84.323773274920413, 34.989090360050874 ], [ -84.290959274889858, 35.21062236025719 ], [ -84.225863274829237, 35.261683360304744 ], [ -84.17964227478619, 35.24106936028555 ], [ -84.101560274713464, 35.245633360289801 ], [ -84.042689274658642, 35.272658360314963 ], [ -84.030771274647535, 35.292605360333539 ], [ -84.029115274646003, 35.325374360364066 ], [ -84.006217274624674, 35.372943360408364 ], [ -84.012556274630569, 35.407706360440741 ], [ -83.9546082745766, 35.455544360485291 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Texas", "DRAWSEQ": 41, "STATE_FIPS": "48", "SUB_REGION": "West South Central", "STATE_ABBR": "TX" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -105.998886295106942, 31.393940356702629 ], [ -105.770250294894012, 31.170908356494913 ], [ -105.60373329473893, 31.086558356416354 ], [ -105.554897294693447, 30.99841835633427 ], [ -105.40957529455811, 30.902645356245074 ], [ -105.390821294540643, 30.853217356199039 ], [ -105.314288294469364, 30.816644356164979 ], [ -105.288104294444977, 30.83208635617936 ], [ -105.258691294417588, 30.797791356147421 ], [ -105.214844294376746, 30.812223356160864 ], [ -105.061060294233528, 30.688010356045179 ], [ -104.998039294174831, 30.684474356041886 ], [ -104.98742529416495, 30.641467356001833 ], [ -104.891169294075297, 30.570700355935926 ], [ -104.853485294040198, 30.39241135576988 ], [ -104.80696029399688, 30.376596355755154 ], [ -104.814444294003849, 30.350618355730958 ], [ -104.703097293900143, 30.238641355626669 ], [ -104.675240293874197, 30.149120355543296 ], [ -104.696977293894449, 30.057462355457936 ], [ -104.67485229387384, 29.909449355320085 ], [ -104.57804129378367, 29.808107355225705 ], [ -104.535729293744268, 29.679642355106061 ], [ -104.378074293597436, 29.550794354986063 ], [ -104.205212293436446, 29.48422835492407 ], [ -104.164859293398877, 29.400905354846468 ], [ -104.046105293288278, 29.328313354778864 ], [ -103.787463293047395, 29.267457354722186 ], [ -103.768229293029478, 29.281438354735208 ], [ -103.782625293042884, 29.229994354687296 ], [ -103.740319293003481, 29.230548354687812 ], [ -103.720779292985284, 29.190832354650823 ], [ -103.52669629280453, 29.146848354609858 ], [ -103.474531292755955, 29.072338354540467 ], [ -103.375903292664091, 29.032314354503193 ], [ -103.335970292626911, 29.050545354520171 ], [ -103.28080029257552, 28.986582354460602 ], [ -103.267037292562705, 29.007662354480232 ], [ -103.153911292457352, 28.978891354453438 ], [ -102.988539292303344, 29.19106735465104 ], [ -102.866609292189779, 29.229241354686593 ], [ -102.908764292229037, 29.269406354724001 ], [ -102.883448292205458, 29.353572354802388 ], [ -102.822640292148833, 29.412045354856843 ], [ -102.805160292132555, 29.530343354967016 ], [ -102.676790292012996, 29.744418355166388 ], [ -102.638039291976909, 29.732532355155321 ], [ -102.576926291919989, 29.778441355198076 ], [ -102.552373291897126, 29.749694355171304 ], [ -102.503521291851627, 29.785649355204789 ], [ -102.385215291741446, 29.768141355188483 ], [ -102.367980291725402, 29.845483355260512 ], [ -102.324751291685132, 29.880309355292951 ], [ -102.064402291442661, 29.78476935520397 ], [ -101.973724291358224, 29.818971355235824 ], [ -101.92462729131249, 29.788701355207632 ], [ -101.819498291214586, 29.814324355231495 ], [ -101.805604291201647, 29.780199355199713 ], [ -101.759491291158696, 29.787367355206392 ], [ -101.640064291047466, 29.75716335517826 ], [ -101.58188129099328, 29.765354355185888 ], [ -101.544344290958321, 29.810322355227768 ], [ -101.538735290953099, 29.763222355183903 ], [ -101.470856290889884, 29.788895355207814 ], [ -101.448813290869353, 29.760791355181638 ], [ -101.401663290825439, 29.770111355190316 ], [ -101.416487290839243, 29.745641355167528 ], [ -101.36878629079483, 29.657373355085323 ], [ -101.306247290736579, 29.65264435508092 ], [ -101.309313290739439, 29.58112435501431 ], [ -101.25496929068882, 29.628964355058866 ], [ -101.261811290695192, 29.526692354963615 ], [ -101.067737290514444, 29.473776354914335 ], [ -101.009431290460142, 29.373482354820929 ], [ -100.797357290262639, 29.242736354699161 ], [ -100.768974290236201, 29.166807354628446 ], [ -100.669132290143224, 29.080312354547893 ], [ -100.64758529012316, 28.922595354401007 ], [ -100.590149290069661, 28.894469354374813 ], [ -100.498264289984093, 28.661243354157605 ], [ -100.403526289895851, 28.589991354091246 ], [ -100.419884289911096, 28.544451354048832 ], [ -100.346151289842425, 28.501072354008436 ], [ -100.377120289871257, 28.478913353987799 ], [ -100.3519192898478, 28.394447353909133 ], [ -100.293239289793149, 28.320627353840379 ], [ -100.298266289797823, 28.280622353803125 ], [ -100.223808289728481, 28.241727353766901 ], [ -100.214416289719736, 28.202206353730091 ], [ -100.097262289610626, 28.154555353685716 ], [ -99.993643289514125, 28.003739353545257 ], [ -99.942189289466199, 27.987162353529818 ], [ -99.875063289403684, 27.797972353353622 ], [ -99.816055289348725, 27.78039435333725 ], [ -99.714818289254453, 27.661849353226849 ], [ -99.54950728910049, 27.612919353181276 ], [ -99.527061289079583, 27.504579353080377 ], [ -99.490813289045832, 27.491051353067778 ], [ -99.54390828909527, 27.3189543529075 ], [ -99.46559028902233, 27.270186352862083 ], [ -99.437475288996154, 27.199502352796252 ], [ -99.455381289012834, 27.028958352637421 ], [ -99.393032288954757, 26.995861352606596 ], [ -99.390835288952715, 26.946943352561039 ], [ -99.285837288854921, 26.857678352477905 ], [ -99.166128288743437, 26.580220352219502 ], [ -99.168989288746104, 26.546061352187689 ], [ -99.101780288683514, 26.488676352134245 ], [ -99.107036288688406, 26.419869352070162 ], [ -98.93957628853245, 26.395651352047608 ], [ -98.909203288504159, 26.360671352015032 ], [ -98.82013628842121, 26.375413352028758 ], [ -98.678219288289043, 26.242404351904884 ], [ -98.600268288216441, 26.260803351922021 ], [ -98.488815288112647, 26.201895351867158 ], [ -98.453689288079929, 26.221261351885197 ], [ -98.384815288015787, 26.156383351824772 ], [ -98.347484287981018, 26.159032351827239 ], [ -98.328226287963076, 26.112000351783436 ], [ -98.292566287929873, 26.133162351803147 ], [ -98.271645287910388, 26.121249351792052 ], [ -98.292237287929566, 26.098459351770828 ], [ -98.200979287844575, 26.055732351731034 ], [ -98.083498287735168, 26.066113351740704 ], [ -98.076631287728759, 26.034982351711708 ], [ -98.040352287694972, 26.059750351734777 ], [ -97.867708287534185, 26.06049635173547 ], [ -97.648240287329799, 26.023801351701294 ], [ -97.613189287297146, 25.962359351644075 ], [ -97.575201287261777, 25.954529351636779 ], [ -97.590353287275889, 25.933589351617279 ], [ -97.434607287130831, 25.845557351535291 ], [ -97.385899287085465, 25.845721351535445 ], [ -97.38124628708114, 25.917379351602182 ], [ -97.304690287009834, 25.939022351622338 ], [ -97.307399287012359, 25.965482351646983 ], [ -97.172474286886711, 25.954927351637153 ], [ -97.21334828692477, 26.009425351687906 ], [ -97.276575286983658, 26.002633351681581 ], [ -97.253373286962045, 26.068672351743086 ], [ -97.353619287055409, 26.182802351849375 ], [ -97.368955287069696, 26.359409352013856 ], [ -97.421447287118582, 26.385407352038069 ], [ -97.474968287168423, 26.477150352123509 ], [ -97.426115287122926, 26.518569352162086 ], [ -97.451958287146994, 26.60132735223916 ], [ -97.495837287187854, 26.794117352418709 ], [ -97.558317287246055, 26.846387352467389 ], [ -97.568831287255847, 26.978188352590138 ], [ -97.479260287172423, 26.996838352607504 ], [ -97.503767287195245, 27.081868352686698 ], [ -97.427481287124195, 27.265455352857678 ], [ -97.548424287236841, 27.230530352825149 ], [ -97.78501728745718, 27.28804035287871 ], [ -97.680279287359639, 27.294693352884906 ], [ -97.750349287424896, 27.419983353001591 ], [ -97.600382287285228, 27.300455352890275 ], [ -97.528650287218426, 27.344420352931216 ], [ -97.507808287199012, 27.439531353019795 ], [ -97.500703287192394, 27.319988352908464 ], [ -97.412528287110277, 27.321345352909727 ], [ -97.331727287035022, 27.562636353134447 ], [ -97.250061286958967, 27.689143353252266 ], [ -97.309480287014296, 27.708173353269991 ], [ -97.347772287049963, 27.631752353198817 ], [ -97.39948528709813, 27.633498353200444 ], [ -97.353632287055419, 27.641112353207532 ], [ -97.320283287024367, 27.690944353253943 ], [ -97.349779287051831, 27.715637353276939 ], [ -97.318063287022298, 27.712534353274052 ], [ -97.396830287095653, 27.771146353328639 ], [ -97.388812287088186, 27.831730353385062 ], [ -97.480083287173187, 27.820585353374682 ], [ -97.499806287191561, 27.843544353396062 ], [ -97.521969287212201, 27.863927353415047 ], [ -97.496952287188904, 27.875769353426076 ], [ -97.479626287172763, 27.853264353405116 ], [ -97.345889287048209, 27.873480353423943 ], [ -97.361315287062581, 27.840257353393 ], [ -97.283754286990344, 27.871447353422049 ], [ -97.213608286925009, 27.831415353384767 ], [ -97.24729228695638, 27.822624353376582 ], [ -97.195732286908367, 27.812525353367175 ], [ -97.114891286833071, 27.915687353463252 ], [ -97.024071286748494, 28.020532353560895 ], [ -97.026673286750921, 28.108041353642395 ], [ -97.123345286840944, 28.054560353592585 ], [ -97.23648328694631, 28.040814353579783 ], [ -97.27056328697806, 28.026227353566199 ], [ -97.241503286950987, 28.048947353587359 ], [ -97.260554286968741, 28.065017353602329 ], [ -97.157327286872601, 28.116672353650436 ], [ -97.168261286882782, 28.15974935369055 ], [ -97.135683286852441, 28.162099353692739 ], [ -97.132104286849113, 28.130717353663513 ], [ -97.02383528674828, 28.200083353728118 ], [ -97.033883286757629, 28.137687353670003 ], [ -96.975372286703134, 28.115336353649191 ], [ -96.941337286671441, 28.187059353715988 ], [ -96.975571286703328, 28.21103735373832 ], [ -96.912986286645037, 28.2570823537812 ], [ -96.951171286680605, 28.114646353648546 ], [ -96.803951286543494, 28.211734353738969 ], [ -96.778194286519508, 28.22963535375564 ], [ -96.79359828653385, 28.271657353794772 ], [ -96.786533286527273, 28.313142353833413 ], [ -96.788493286529089, 28.352753353870302 ], [ -96.853756286589871, 28.405277353919217 ], [ -96.775622286517105, 28.391911353906771 ], [ -96.759363286501966, 28.411192353924726 ], [ -96.788599286529191, 28.446534353957642 ], [ -96.824138286562288, 28.449920353960795 ], [ -96.78735528652804, 28.477785353986746 ], [ -96.741029286484888, 28.403738353917785 ], [ -96.704071286450471, 28.396166353910733 ], [ -96.702622286449127, 28.340479353858868 ], [ -96.661568286410883, 28.30654735382727 ], [ -96.390975286158877, 28.434339353946285 ], [ -96.476754286238759, 28.499733354007187 ], [ -96.51875528627788, 28.461106353971211 ], [ -96.563449286319511, 28.469906353979411 ], [ -96.486832286248145, 28.50650035401349 ], [ -96.566958286322773, 28.574374354076703 ], [ -96.610600286363422, 28.559217354062586 ], [ -96.606960286360035, 28.623908354122833 ], [ -96.660267286409677, 28.679348354174465 ], [ -96.6467702863971, 28.714413354207124 ], [ -96.591753286345863, 28.717630354210119 ], [ -96.576738286331889, 28.690961354185283 ], [ -96.572465286327898, 28.808442354294694 ], [ -96.570810286326363, 28.692113354186354 ], [ -96.570650286326213, 28.636540354134599 ], [ -96.511986286271579, 28.649815354146963 ], [ -96.512147286271727, 28.608456354108441 ], [ -96.483521286245065, 28.598330354099012 ], [ -96.454635286218164, 28.656206354152914 ], [ -96.437407286202117, 28.59726535409802 ], [ -96.491456286252458, 28.557220354060725 ], [ -96.375646286144601, 28.610362354110219 ], [ -96.419035286185007, 28.638937354136829 ], [ -96.403646286170684, 28.719763354212105 ], [ -96.432509286197558, 28.697519354191389 ], [ -96.449927286213779, 28.755304354245204 ], [ -96.427336286192741, 28.712283354205141 ], [ -96.392979286160738, 28.726298354218194 ], [ -96.392026286159862, 28.670523354166249 ], [ -96.364408286134136, 28.618254354117568 ], [ -96.326404286098736, 28.634361354132569 ], [ -96.270624286046797, 28.709249354202313 ], [ -96.286219286061311, 28.661995354158307 ], [ -96.212418285992584, 28.686989354181584 ], [ -96.151305285935663, 28.762938354252316 ], [ -96.240701286018918, 28.635130354133285 ], [ -96.157715285941634, 28.611502354111281 ], [ -96.239275286017602, 28.597389354098137 ], [ -96.237833286016254, 28.571595354074113 ], [ -95.983990285779839, 28.653401354150301 ], [ -95.991888285787198, 28.596695354097491 ], [ -96.20682828598737, 28.488663353996877 ], [ -95.702384285517581, 28.719247354211625 ], [ -95.956387285754133, 28.622942354121932 ], [ -95.937549285736594, 28.690720354185057 ], [ -95.786592285596001, 28.739132354230144 ], [ -95.671552285488858, 28.752941354243006 ], [ -95.683264285499774, 28.727214354219043 ], [ -95.526807285354053, 28.80349635429009 ], [ -95.248618285094977, 28.978637354453202 ], [ -95.19755128504741, 29.105465354571319 ], [ -95.164988285017088, 29.117790354582798 ], [ -95.160730285013116, 29.200271354659613 ], [ -95.066572284925428, 29.196116354655743 ], [ -94.951334284818103, 29.326157354776853 ], [ -94.898987284769348, 29.309011354760884 ], [ -94.891672284762535, 29.394065354840098 ], [ -94.815550284691653, 29.371166354818772 ], [ -94.891336284762232, 29.399557354845214 ], [ -94.917193284786308, 29.448054354890381 ], [ -94.913645284783001, 29.420345354864573 ], [ -94.952709284819392, 29.424466354868414 ], [ -94.943958284811231, 29.46491235490608 ], [ -94.98301528484761, 29.460758354902211 ], [ -94.911357284780877, 29.500564354939286 ], [ -95.014327284876771, 29.559494354994165 ], [ -94.989539284853691, 29.679928355106327 ], [ -95.040604284901249, 29.711806355136019 ], [ -95.088472284945823, 29.804205355222074 ], [ -94.932790284800831, 29.682436355108663 ], [ -94.887363284758536, 29.668766355095933 ], [ -94.829615284704744, 29.760081355180979 ], [ -94.735923284617485, 29.793207355211827 ], [ -94.700475284584471, 29.754791355176053 ], [ -94.706617284590195, 29.658741355086597 ], [ -94.78828328466625, 29.538786354974881 ], [ -94.564630284457962, 29.579227355012545 ], [ -94.533890284429333, 29.554213354989248 ], [ -94.511002284408022, 29.545377354981021 ], [ -94.469985284369812, 29.557009354991852 ], [ -94.501472284399142, 29.517754354955294 ], [ -94.572885284465642, 29.533283354969754 ], [ -94.682109284567375, 29.475343354915793 ], [ -94.785444284663612, 29.383495354830252 ], [ -94.766743284646196, 29.364227354812311 ], [ -94.682712284567927, 29.43313835487649 ], [ -94.377194284283391, 29.552198354987372 ], [ -94.357182284264752, 29.560129354994757 ], [ -94.065581283993183, 29.674297355101086 ], [ -93.835125283778552, 29.674792355101545 ], [ -93.951936283887349, 29.818579355235457 ], [ -93.856500283798468, 29.964815355371652 ], [ -93.857447283799345, 29.990867355395913 ], [ -93.760367283708931, 30.006176355410172 ], [ -93.712644283664488, 30.06073135546098 ], [ -93.716023283667639, 30.095878355493713 ], [ -93.708546283660667, 30.114950355511475 ], [ -93.697087283649992, 30.118139355514444 ], [ -93.6988032836516, 30.141434355536141 ], [ -93.686123283639787, 30.141461355536165 ], [ -93.683307283637163, 30.148440355542665 ], [ -93.699826283652556, 30.151017355545065 ], [ -93.6963312836493, 30.175884355568222 ], [ -93.70452528365692, 30.181068355573053 ], [ -93.715008283666691, 30.220513355609789 ], [ -93.707524283659723, 30.239578355627543 ], [ -93.699377283652126, 30.297593355681574 ], [ -93.729941283680589, 30.305122355688589 ], [ -93.759347283707982, 30.341077355722071 ], [ -93.759507283708132, 30.354350355734432 ], [ -93.748002283697417, 30.367615355746786 ], [ -93.755113283704034, 30.38199335576018 ], [ -93.742731283692507, 30.409027355785355 ], [ -93.721705283672918, 30.433183355807852 ], [ -93.696741283649672, 30.44283535581684 ], [ -93.703593283656062, 30.462715355835357 ], [ -93.698146283650985, 30.470249355842373 ], [ -93.715023283666696, 30.488831355859681 ], [ -93.707447283659647, 30.496443355866766 ], [ -93.714810283666509, 30.505316355875031 ], [ -93.705632283657962, 30.523060355891559 ], [ -93.735479283685748, 30.545719355912659 ], [ -93.718054283669531, 30.56835535593374 ], [ -93.717985283669464, 30.587582355951646 ], [ -93.693594283646746, 30.599037355962317 ], [ -93.671758283626403, 30.598033355961384 ], [ -93.692869283646075, 30.615997355978109 ], [ -93.684759283638513, 30.623626355985216 ], [ -93.693053283646236, 30.640243356000692 ], [ -93.678145283632361, 30.639894356000369 ], [ -93.660163283615603, 30.673060356031257 ], [ -93.617781283576136, 30.687003356044244 ], [ -93.612585283571292, 30.710530356066151 ], [ -93.617965283576311, 30.732749356086845 ], [ -93.607825283566868, 30.732211356086346 ], [ -93.618629283576922, 30.745989356099177 ], [ -93.585348283545926, 30.772384356123759 ], [ -93.582045283542854, 30.802239356151563 ], [ -93.550855283513812, 30.828542356176058 ], [ -93.55581428351843, 30.842540356189097 ], [ -93.566618283528484, 30.845346356191712 ], [ -93.55297628351579, 30.860480356205805 ], [ -93.56101728352327, 30.872077356216607 ], [ -93.568670283530395, 30.886431356229973 ], [ -93.564649283526649, 30.902128356244592 ], [ -93.546689283509934, 30.905530356247759 ], [ -93.549794283512824, 30.925080356265966 ], [ -93.530155283494537, 30.927167356267912 ], [ -93.525791283490463, 30.93601435627615 ], [ -93.532360283496587, 30.960926356299353 ], [ -93.537510283501376, 30.957079356295768 ], [ -93.548848283511944, 30.970384356308159 ], [ -93.572629283534084, 30.976372356313739 ], [ -93.56112428352337, 30.991883356328181 ], [ -93.571019283532593, 30.997464356333381 ], [ -93.568067283529842, 31.013117356347959 ], [ -93.565114283527095, 31.018256356352744 ], [ -93.547291283510489, 31.014334356349092 ], [ -93.50738928347333, 31.039099356372155 ], [ -93.525913283490581, 31.057171356388984 ], [ -93.517170283482443, 31.074861356405464 ], [ -93.54427828350768, 31.082563356412635 ], [ -93.543294283506768, 31.094941356424165 ], [ -93.560156283522474, 31.100726356429551 ], [ -93.55685228351939, 31.109532356437754 ], [ -93.535260283499284, 31.116261356444021 ], [ -93.528264283492774, 31.126114356453193 ], [ -93.537679283501532, 31.132629356459262 ], [ -93.544363283507764, 31.159354356484151 ], [ -93.528501283492986, 31.16313035648767 ], [ -93.537191283501087, 31.176527356500145 ], [ -93.527105283491693, 31.178263356501763 ], [ -93.529096283493544, 31.185961356508933 ], [ -93.550764283513729, 31.191116356513731 ], [ -93.577117283538271, 31.172328356496237 ], [ -93.594116283554101, 31.180386356503739 ], [ -93.603096283562465, 31.199253356521311 ], [ -93.590721283550934, 31.229873356549827 ], [ -93.611176283569989, 31.242373356561469 ], [ -93.612054283570799, 31.270218356587403 ], [ -93.616632283575072, 31.275989356592778 ], [ -93.631006283588448, 31.274088356591008 ], [ -93.645770283602204, 31.290447356606244 ], [ -93.656306283612011, 31.286855356602899 ], [ -93.681766283635724, 31.312863356627119 ], [ -93.677219283631487, 31.328570356641748 ], [ -93.635035283592202, 31.374009356684063 ], [ -93.661251283616622, 31.372577356682733 ], [ -93.664196283619361, 31.398510356706886 ], [ -93.687673283641232, 31.406311356714149 ], [ -93.694623283647701, 31.416103356723269 ], [ -93.696310283649268, 31.42791735673427 ], [ -93.687185283640773, 31.438311356743952 ], [ -93.702108283654667, 31.446431356751514 ], [ -93.698599283651404, 31.461638356765675 ], [ -93.726966283677825, 31.459654356763828 ], [ -93.751427283700608, 31.485680356788066 ], [ -93.750618283699851, 31.490736356792777 ], [ -93.719176283670564, 31.495582356797289 ], [ -93.705977283658271, 31.520747356820728 ], [ -93.731842283682369, 31.522055356821944 ], [ -93.747727283697159, 31.537896356836697 ], [ -93.763489283711834, 31.530902356830182 ], [ -93.780313283727509, 31.53391335683299 ], [ -93.810702283755816, 31.559240356856577 ], [ -93.816508283761223, 31.577287356873384 ], [ -93.832805283776395, 31.590360356885558 ], [ -93.835765283779153, 31.615364356908845 ], [ -93.819774283764261, 31.618267356911549 ], [ -93.814914283759734, 31.648141356939369 ], [ -93.806613283752, 31.65394135694477 ], [ -93.812030283757053, 31.674740356964143 ], [ -93.792452283738811, 31.711568356998441 ], [ -93.808955283754187, 31.707738356994874 ], [ -93.815135283759943, 31.712523356999331 ], [ -93.810176283755325, 31.730524357016094 ], [ -93.831348283775043, 31.75345235703745 ], [ -93.822254283766569, 31.774808357057339 ], [ -93.834514283777992, 31.802187357082836 ], [ -93.865010283806384, 31.817442357097043 ], [ -93.877591283818106, 31.850282357127629 ], [ -93.881451283821704, 31.871588357147473 ], [ -93.892713283832194, 31.870234357146209 ], [ -93.899449283838464, 31.894623357168925 ], [ -93.923650283861008, 31.892762357167193 ], [ -93.918111283855836, 31.909870357183124 ], [ -93.935919283872423, 31.909624357182896 ], [ -93.970175283904325, 31.923332357195662 ], [ -93.977400283911066, 31.946327357217079 ], [ -94.004584283936381, 31.978108357246676 ], [ -94.010078283941496, 31.9893003572571 ], [ -94.035255283964943, 31.994679357262108 ], [ -94.034955283964663, 32.199609357452964 ], [ -94.035418283965086, 32.389381357629702 ], [ -94.04038228396972, 32.694957357914291 ], [ -94.041785283971024, 32.882485358088942 ], [ -94.038931283968367, 33.023422358220202 ], [ -94.036691283966277, 33.270453358450268 ], [ -94.03611628396574, 33.556034358716232 ], [ -94.061622283989493, 33.577335358736072 ], [ -94.086846284012992, 33.584075358742354 ], [ -94.098893284024214, 33.573120358732147 ], [ -94.155360284076792, 33.567206358726636 ], [ -94.159710284080845, 33.593894358751498 ], [ -94.205541284123527, 33.5852003587434 ], [ -94.211080284128684, 33.558108358718165 ], [ -94.235564284151494, 33.561656358721471 ], [ -94.223234284140005, 33.585840358743994 ], [ -94.237433284153241, 33.592543358750234 ], [ -94.27474228418798, 33.56185735872166 ], [ -94.272278284185688, 33.584726358742955 ], [ -94.279182284192117, 33.589452358747359 ], [ -94.299019284210587, 33.57997235873853 ], [ -94.302582284213912, 33.557054358717181 ], [ -94.328950284238459, 33.573254358732271 ], [ -94.370959284277589, 33.547802358708566 ], [ -94.395465284300414, 33.560421358720319 ], [ -94.372508284279036, 33.572780358731833 ], [ -94.370829284277463, 33.590160358748015 ], [ -94.379314284285371, 33.593444358751071 ], [ -94.393619284298694, 33.575077358733971 ], [ -94.406772284310946, 33.573604358732595 ], [ -94.428670284331332, 33.59725835875463 ], [ -94.443532284345181, 33.596621358754035 ], [ -94.451757284352837, 33.604464358761341 ], [ -94.436536284338658, 33.616961358772976 ], [ -94.436117284338266, 33.636561358791234 ], [ -94.476691284376059, 33.632081358787062 ], [ -94.500816284398525, 33.623162358778757 ], [ -94.510765284407796, 33.63092535878598 ], [ -94.52526128442129, 33.621136358776866 ], [ -94.518196284414714, 33.643124358797344 ], [ -94.550401284444703, 33.632809358787739 ], [ -94.562356284455845, 33.635650358790386 ], [ -94.562402284455885, 33.642944358797173 ], [ -94.542138284437016, 33.648361358802219 ], [ -94.545625284440263, 33.661735358814674 ], [ -94.576669284469176, 33.652271358805862 ], [ -94.58859428448028, 33.655562358808929 ], [ -94.585367284477272, 33.662246358815153 ], [ -94.565416284458692, 33.66312735881597 ], [ -94.560930284454514, 33.672027358824259 ], [ -94.578714284471076, 33.670585358822919 ], [ -94.585314284477221, 33.679095358830843 ], [ -94.601153284491971, 33.665721358818388 ], [ -94.631946284520652, 33.68401135883542 ], [ -94.638973284527196, 33.670217358822576 ], [ -94.658748284545609, 33.663850358816646 ], [ -94.66963628455575, 33.66617335881881 ], [ -94.668163284554382, 33.67157135882384 ], [ -94.644535284532381, 33.677762358829604 ], [ -94.65568928454276, 33.692403358843237 ], [ -94.668667284554857, 33.696648358847192 ], [ -94.691197284575836, 33.690399358841375 ], [ -94.741865284623017, 33.701377358851595 ], [ -94.754690284634961, 33.707881358857655 ], [ -94.742323284623453, 33.719157358868159 ], [ -94.762930284642636, 33.716906358866055 ], [ -94.749983284630588, 33.736815358884598 ], [ -94.783370284661672, 33.733774358881767 ], [ -94.782241284660628, 33.742376358889778 ], [ -94.764388284643999, 33.752951358899629 ], [ -94.783722284662005, 33.753370358900014 ], [ -94.803437284680371, 33.739691358887278 ], [ -94.819375284695212, 33.749513358896422 ], [ -94.858096284731275, 33.74942935889635 ], [ -94.881855284753399, 33.775072358920227 ], [ -94.914099284783433, 33.789705358933858 ], [ -94.908766284778466, 33.803586358946788 ], [ -94.918456284787482, 33.816304358958632 ], [ -94.940620284808134, 33.815915358958264 ], [ -94.940109284807647, 33.840932358981568 ], [ -94.960129284826294, 33.84818435898832 ], [ -94.968927284834493, 33.86632235900521 ], [ -94.989504284853652, 33.856290358995871 ], [ -95.012996284875527, 33.870053359008686 ], [ -95.037586284898438, 33.866559359005436 ], [ -95.043087284903564, 33.884553359022192 ], [ -95.063366284922438, 33.896801359033603 ], [ -95.063702284922755, 33.917756359053115 ], [ -95.083829284941501, 33.888569359025929 ], [ -95.08994028494719, 33.89702335903381 ], [ -95.082494284940253, 33.918560359053863 ], [ -95.095586284952446, 33.921845359056924 ], [ -95.119452284974685, 33.912388359048116 ], [ -95.126906284981615, 33.917252359052647 ], [ -95.12819628498282, 33.940975359074741 ], [ -95.148544285001776, 33.943653359077231 ], [ -95.234270285081607, 33.964969359097083 ], [ -95.251521285097681, 33.936550359070615 ], [ -95.251223285097396, 33.905128359041356 ], [ -95.26384928510916, 33.897907359034633 ], [ -95.277583285121949, 33.91804535905338 ], [ -95.286662285130404, 33.887008359024477 ], [ -95.302188285144865, 33.88673035902422 ], [ -95.336460285176784, 33.897220359033987 ], [ -95.33027228517102, 33.871024359009596 ], [ -95.451841285284246, 33.865858359004783 ], [ -95.468359285299627, 33.88653735902404 ], [ -95.499091285328248, 33.881822359019651 ], [ -95.513122285341311, 33.897840359034568 ], [ -95.544274285370321, 33.885846359023397 ], [ -95.547730285373547, 33.893262359030302 ], [ -95.52697028535421, 33.897920359034643 ], [ -95.519813285347539, 33.906747359042861 ], [ -95.546555285372449, 33.904137359040433 ], [ -95.563013285387783, 33.936177359070271 ], [ -95.606312285428103, 33.944656359078166 ], [ -95.615070285436261, 33.936794359070845 ], [ -95.613224285434541, 33.92034135905552 ], [ -95.633732285453632, 33.920207359055397 ], [ -95.699950285515314, 33.894926359031857 ], [ -95.747109285559233, 33.903497359039832 ], [ -95.760942285572114, 33.893541359030564 ], [ -95.764497285575416, 33.879106359017115 ], [ -95.768761285579401, 33.851503358991408 ], [ -95.795725285604505, 33.864774359003775 ], [ -95.826221285632911, 33.843125358983613 ], [ -95.846805285652081, 33.841138358981759 ], [ -95.933328285732657, 33.890628359027851 ], [ -95.943323285741968, 33.890071359027331 ], [ -95.95901628575659, 33.865139359004111 ], [ -95.977648285773938, 33.858051358997514 ], [ -95.99446428578959, 33.875476359013739 ], [ -96.002872285797423, 33.873489359011884 ], [ -96.002048285796661, 33.857078358996603 ], [ -96.014324285808087, 33.844307358984707 ], [ -96.027004285819899, 33.856121358995715 ], [ -96.048230285839665, 33.84137735898198 ], [ -96.091780285880233, 33.844677358985052 ], [ -96.109701285896918, 33.829357358970789 ], [ -96.149223285933729, 33.835690358976684 ], [ -96.169464285952571, 33.829083358970536 ], [ -96.183388285965549, 33.815892358958244 ], [ -96.180985285963303, 33.808534358951391 ], [ -96.154777285938906, 33.824044358965835 ], [ -96.141677285926704, 33.820420358962465 ], [ -96.161575285945233, 33.798329358941892 ], [ -96.16907428595222, 33.769457358914998 ], [ -96.187286285969179, 33.758684358904965 ], [ -96.212807285992938, 33.756792358903205 ], [ -96.27833828605398, 33.773489358918752 ], [ -96.289943286064783, 33.762034358908089 ], [ -96.301050286075125, 33.714153358863499 ], [ -96.316538286089553, 33.70190435885209 ], [ -96.347850286118714, 33.705631358855555 ], [ -96.371083286140347, 33.740497358888028 ], [ -96.419730286185654, 33.78842835893267 ], [ -96.487641286248902, 33.778232358923177 ], [ -96.501016286261361, 33.788192358932449 ], [ -96.510843286270514, 33.815787358958147 ], [ -96.562404286318525, 33.825522358967213 ], [ -96.601468286354915, 33.843058358983548 ], [ -96.614439286366988, 33.863001359002119 ], [ -96.584760286339346, 33.896245359033081 ], [ -96.666512286415497, 33.913644359049286 ], [ -96.677979286426165, 33.904424359040696 ], [ -96.693657286440768, 33.848006358988158 ], [ -96.711953286457813, 33.833972358975089 ], [ -96.749102286492402, 33.831840358973096 ], [ -96.797871286537827, 33.870051359008684 ], [ -96.814397286553216, 33.871871359010385 ], [ -96.844290286581057, 33.858134358997589 ], [ -96.861296286596897, 33.861781359000986 ], [ -96.879219286613591, 33.884104359021777 ], [ -96.883133286617237, 33.924692359059577 ], [ -96.89873628663176, 33.950127359083261 ], [ -96.929850286660738, 33.961873359094199 ], [ -96.936487286666917, 33.947949359081235 ], [ -96.968471286696712, 33.937421359071429 ], [ -96.988148286715031, 33.944303359077836 ], [ -96.987995286714892, 33.876525359014714 ], [ -97.006138286731797, 33.850616358990585 ], [ -97.025883286750187, 33.840664358981314 ], [ -97.071188286792378, 33.856830358996376 ], [ -97.082465286802872, 33.851203358991128 ], [ -97.078535286799223, 33.837913358978753 ], [ -97.050313286772933, 33.823551358965375 ], [ -97.087958286807989, 33.80767535895059 ], [ -97.08375428680408, 33.74251835888991 ], [ -97.090788286810621, 33.731776358879905 ], [ -97.11585228683397, 33.726038358874561 ], [ -97.152764286868347, 33.728773358877106 ], [ -97.189455286902515, 33.752874358899554 ], [ -97.208613286920368, 33.819752358961843 ], [ -97.195307286907962, 33.836261358977218 ], [ -97.168885286883366, 33.847896358988052 ], [ -97.164460286879248, 33.86325035900235 ], [ -97.188059286901222, 33.899305359035928 ], [ -97.211626286923163, 33.905790359041973 ], [ -97.246356286955518, 33.894339359031306 ], [ -97.250980286959816, 33.873072359011502 ], [ -97.264202286972136, 33.858832358998235 ], [ -97.272572286979923, 33.872675359011126 ], [ -97.314382287018873, 33.895941359032797 ], [ -97.315252287019675, 33.870494359009101 ], [ -97.342100287044687, 33.8620173590012 ], [ -97.363616287064715, 33.831127358972438 ], [ -97.410416287108305, 33.820812358962826 ], [ -97.453035287147998, 33.836315358977266 ], [ -97.457360287152028, 33.890532359027759 ], [ -97.463060287157333, 33.902483359038889 ], [ -97.477831287171085, 33.907808359043848 ], [ -97.51850428720897, 33.916871359052294 ], [ -97.554890287242856, 33.904004359040307 ], [ -97.575970287262493, 33.902631359039027 ], [ -97.592656287278032, 33.917985359053326 ], [ -97.600484287285326, 33.969535359101336 ], [ -97.671371287351334, 33.988711359119193 ], [ -97.704567287382261, 33.971644359103301 ], [ -97.729326287405314, 33.939391359073262 ], [ -97.756670287430779, 33.932197359066564 ], [ -97.790515287462298, 33.890556359027784 ], [ -97.852857287520365, 33.857171358996695 ], [ -97.870062287536385, 33.855214358994871 ], [ -97.909377287572994, 33.874123359012479 ], [ -97.95504828761554, 33.883579359021283 ], [ -97.976693287635698, 33.902603359039006 ], [ -97.976442287635464, 33.912151359047897 ], [ -97.950997287611756, 33.932616359066955 ], [ -97.963311287623227, 33.948748359081975 ], [ -97.948067287609035, 33.959849359092317 ], [ -97.950539287611335, 33.97125835910294 ], [ -97.982995287641558, 34.001382359131 ], [ -98.023806287679562, 33.987081359117681 ], [ -98.055873287709431, 33.989896359120301 ], [ -98.086522287737978, 34.00541035913475 ], [ -98.111005287760776, 34.069915359194823 ], [ -98.094441287745354, 34.134649359255114 ], [ -98.115186287764672, 34.149079359268555 ], [ -98.137182287785166, 34.138524359258724 ], [ -98.173164287818665, 34.115461359237244 ], [ -98.277324287915675, 34.122964359244229 ], [ -98.320814287956182, 34.139512359259641 ], [ -98.350730287984035, 34.142213359262158 ], [ -98.384583288015563, 34.115873359237625 ], [ -98.391282288021813, 34.087324359211038 ], [ -98.407464288036877, 34.082548359206591 ], [ -98.421670288050109, 34.065924359191108 ], [ -98.448519288075119, 34.054469359180437 ], [ -98.499852288122923, 34.066508359191651 ], [ -98.557914288177003, 34.105428359227901 ], [ -98.576668288194455, 34.142022359261979 ], [ -98.607584288223251, 34.151489359270798 ], [ -98.626330288240709, 34.15852735927735 ], [ -98.662059288273994, 34.147129359266735 ], [ -98.682552288293067, 34.150089359269494 ], [ -98.705632288314575, 34.130806359251537 ], [ -98.778877288382787, 34.132053359252694 ], [ -98.811410288413086, 34.146026359265704 ], [ -98.891689288487854, 34.160910359279569 ], [ -98.95285728854482, 34.194653359310998 ], [ -98.996544288585497, 34.209583359324895 ], [ -99.035570288621841, 34.199009359315056 ], [ -99.078784288662092, 34.208446359323844 ], [ -99.128300288708203, 34.201556359317422 ], [ -99.176511288753105, 34.21281635932791 ], [ -99.190840288766452, 34.22382135933816 ], [ -99.204955288779601, 34.255730359367874 ], [ -99.196663288771873, 34.305205359413954 ], [ -99.205849288780428, 34.332075359438981 ], [ -99.254465288825713, 34.368294359472713 ], [ -99.267535288837877, 34.398364359500718 ], [ -99.323659288890155, 34.412787359514148 ], [ -99.364569288928251, 34.450272359549061 ], [ -99.393157288954882, 34.429070359529312 ], [ -99.394522288956153, 34.396822359499282 ], [ -99.410323288970858, 34.369185359473541 ], [ -99.43874328899733, 34.364783359469442 ], [ -99.479806289035579, 34.383600359486962 ], [ -99.502504289056716, 34.404145359506103 ], [ -99.554232289104888, 34.415256359516448 ], [ -99.578219289127233, 34.408988359510609 ], [ -99.585589289134091, 34.384934359488206 ], [ -99.60181728914921, 34.368634359473027 ], [ -99.685277289226931, 34.377520359481302 ], [ -99.778060289313345, 34.444064359543276 ], [ -99.830308289362009, 34.501846359597089 ], [ -99.860949289390547, 34.51869435961278 ], [ -99.880977289409188, 34.548242359640298 ], [ -99.93228728945698, 34.579173359669106 ], [ -99.945120289468932, 34.579634359669541 ], [ -99.972480289494413, 34.561926359653043 ], [ -99.996475289516766, 34.562384359653471 ], [ -99.999260289519356, 34.747243359825632 ], [ -99.996455289516746, 35.031051360089947 ], [ -99.997570289517782, 35.182235360230749 ], [ -99.994743289515142, 35.424622360456496 ], [ -100.000392289520406, 35.618856360637388 ], [ -99.99812328951829, 35.883837360884172 ], [ -99.997553289517768, 36.057591361045993 ], [ -100.001550289521489, 36.492554361451084 ], [ -100.007273289526822, 36.493912361452345 ], [ -100.549839290032125, 36.489479361448218 ], [ -100.957341290411634, 36.489637361448366 ], [ -101.090102290535285, 36.488050361446888 ], [ -101.620755291029482, 36.4920313614506 ], [ -102.034658291414971, 36.492981361451484 ], [ -102.16567329153699, 36.490234361448927 ], [ -102.997401292311594, 36.492370361450909 ], [ -103.027286292339426, 36.49159136145019 ], [ -103.024048292336403, 36.05606136104457 ], [ -103.022612292335069, 35.742327360752384 ], [ -103.022294292334777, 35.623648360641852 ], [ -103.026151292338369, 35.177265360226123 ], [ -103.025251292337529, 34.964780360028229 ], [ -103.022657292335111, 34.745332359823855 ], [ -103.029646292341624, 34.30782035941639 ], [ -103.033258292344982, 33.82618135896783 ], [ -103.03873629235008, 33.565843358725374 ], [ -103.043101292354152, 33.377831358550267 ], [ -103.049331292359952, 32.953639358155215 ], [ -103.060018292369904, 32.5155453577472 ], [ -103.055640292365837, 32.085116357346337 ], [ -103.058413292368414, 32.002022357268949 ], [ -103.332549292623725, 32.004281357271054 ], [ -103.729444292993364, 32.006229357272865 ], [ -103.981377293227993, 32.006015357272666 ], [ -104.019297293263307, 32.007403357273958 ], [ -104.851068294037958, 32.003265357270109 ], [ -104.922305294104291, 32.004382357271147 ], [ -106.003240295110999, 32.00165835726861 ], [ -106.378387295460385, 32.000747357267763 ], [ -106.623625295688768, 32.001088357268074 ], [ -106.650062295713397, 31.980329357248745 ], [ -106.632605295697132, 31.972220357241191 ], [ -106.633749295698209, 31.914101357187064 ], [ -106.644079295707826, 31.895205357169466 ], [ -106.616123295681788, 31.844740357122468 ], [ -106.614986295680723, 31.817834357097411 ], [ -106.539514295610445, 31.786305357068045 ], [ -106.38358129546522, 31.733872357019216 ], [ -106.213285295306619, 31.478246356781142 ], [ -105.998886295106942, 31.393940356702629 ] ] ], [ [ [ -94.913628284782988, 29.2578103547132 ], [ -95.105621284961799, 29.097200354563622 ], [ -94.748600284629291, 29.319727354770865 ], [ -94.767575284646966, 29.342686354792249 ], [ -94.913628284782988, 29.2578103547132 ] ] ], [ [ [ -96.398133286165546, 28.346128353864131 ], [ -96.422806286188518, 28.391720353906592 ], [ -96.463305286226245, 28.326115353845495 ], [ -96.532391286290576, 28.318528353838428 ], [ -96.739169286483161, 28.183823353712974 ], [ -96.804104286543634, 28.172450353702381 ], [ -96.834889286572306, 28.066615353603815 ], [ -96.398133286165546, 28.346128353864131 ] ] ], [ [ [ -96.940230286670413, 28.046227353584825 ], [ -96.973266286701175, 28.001149353542843 ], [ -96.949652286679182, 27.98482235352764 ], [ -97.024695286749079, 27.914681353462313 ], [ -97.049872286772526, 27.841258353393933 ], [ -96.854070286590172, 28.049696353588057 ], [ -96.837689286574914, 28.10213235363689 ], [ -96.872686286607504, 28.131695353664426 ], [ -96.940230286670413, 28.046227353584825 ] ] ], [ [ [ -97.359380287060773, 27.284040352874985 ], [ -97.223982286934671, 27.574323353145331 ], [ -97.053832286776213, 27.830777353384171 ], [ -97.113303286831595, 27.819521353373691 ], [ -97.075560286796446, 27.811579353366294 ], [ -97.170447286884823, 27.707771353269614 ], [ -97.203849286915926, 27.612379353180774 ], [ -97.258949286967237, 27.652061353217732 ], [ -97.248939286957921, 27.581449353151967 ], [ -97.335769287038787, 27.441138353021294 ], [ -97.37635628707659, 27.284965352875844 ], [ -97.379643287079645, 27.210777352806751 ], [ -97.359380287060773, 27.284040352874985 ] ] ], [ [ [ -97.301387287006762, 26.601365352239192 ], [ -97.278803286985735, 26.540307352182328 ], [ -97.267503286975213, 26.479251352125466 ], [ -97.251504286960312, 26.41965235206996 ], [ -97.226562286937082, 26.348900352004065 ], [ -97.209167286920874, 26.250894351912791 ], [ -97.179586286893326, 26.072276351746442 ], [ -97.172048286886309, 26.078076351751843 ], [ -97.195242286907913, 26.259593351920895 ], [ -97.232361286942478, 26.418490352068879 ], [ -97.296092287001827, 26.601012352238865 ], [ -97.358283287059749, 26.803000352426981 ], [ -97.381593287081458, 26.949354352563283 ], [ -97.387187287086675, 27.097571352701323 ], [ -97.378796287078856, 27.204773352801162 ], [ -97.389050287088409, 27.201975352798556 ], [ -97.401172287099698, 27.111554352714343 ], [ -97.395570287094472, 26.922320352538108 ], [ -97.38159228708146, 26.820711352443475 ], [ -97.358282287059751, 26.706985352337561 ], [ -97.301387287006762, 26.601365352239192 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "New Mexico", "DRAWSEQ": 42, "STATE_FIPS": "35", "SUB_REGION": "Mountain", "STATE_ABBR": "NM" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -109.049495297948042, 32.442044357678753 ], [ -109.045615297944423, 31.343453356655608 ], [ -108.210647297166801, 31.34385335665598 ], [ -108.203255297159913, 31.786903357068603 ], [ -107.283567296303389, 31.78508335706691 ], [ -106.539514295610445, 31.786305357068045 ], [ -106.614986295680723, 31.817834357097411 ], [ -106.616123295681788, 31.844740357122468 ], [ -106.644079295707826, 31.895205357169466 ], [ -106.633749295698209, 31.914101357187064 ], [ -106.632605295697132, 31.972220357241191 ], [ -106.650062295713397, 31.980329357248745 ], [ -106.623625295688768, 32.001088357268074 ], [ -106.378387295460385, 32.000747357267763 ], [ -106.003240295110999, 32.00165835726861 ], [ -104.922305294104291, 32.004382357271147 ], [ -104.851068294037958, 32.003265357270109 ], [ -104.019297293263307, 32.007403357273958 ], [ -103.981377293227993, 32.006015357272666 ], [ -103.729444292993364, 32.006229357272865 ], [ -103.332549292623725, 32.004281357271054 ], [ -103.058413292368414, 32.002022357268949 ], [ -103.055640292365837, 32.085116357346337 ], [ -103.060018292369904, 32.5155453577472 ], [ -103.049331292359952, 32.953639358155215 ], [ -103.043101292354152, 33.377831358550267 ], [ -103.03873629235008, 33.565843358725374 ], [ -103.033258292344982, 33.82618135896783 ], [ -103.029646292341624, 34.30782035941639 ], [ -103.022657292335111, 34.745332359823855 ], [ -103.025251292337529, 34.964780360028229 ], [ -103.026151292338369, 35.177265360226123 ], [ -103.022294292334777, 35.623648360641852 ], [ -103.022612292335069, 35.742327360752384 ], [ -103.024048292336403, 36.05606136104457 ], [ -103.027286292339426, 36.49159136145019 ], [ -102.997401292311594, 36.492370361450909 ], [ -102.997709292311882, 36.998523361922302 ], [ -103.077866292386531, 36.99976036192345 ], [ -103.993635293239407, 36.994469361918526 ], [ -105.146172294312791, 36.993207361917356 ], [ -105.213091294375118, 36.99260436191679 ], [ -105.713460294841113, 36.994560361918616 ], [ -105.992000295100524, 36.992289361916498 ], [ -106.472177295547723, 36.991504361915766 ], [ -106.861249295910085, 36.989501361913895 ], [ -106.890370295937203, 36.999083361922828 ], [ -107.410820296421903, 36.997525361921376 ], [ -107.472460296479312, 36.998776361922538 ], [ -108.372473297317512, 36.999471361923185 ], [ -109.048480297947094, 36.996641361920553 ], [ -109.047846297946506, 35.99666436098925 ], [ -109.046641297945385, 34.954646360018792 ], [ -109.048652297947257, 34.591780359680847 ], [ -109.050349297948841, 33.783302358927898 ], [ -109.050526297949006, 33.20516435838946 ], [ -109.051346297949763, 32.779550357993074 ], [ -109.049495297948042, 32.442044357678753 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Alabama", "DRAWSEQ": 43, "STATE_FIPS": "01", "SUB_REGION": "East South Central", "STATE_ABBR": "AL" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -85.070067275615457, 31.980703357249091 ], [ -85.056700275603006, 32.017376357283247 ], [ -85.06201027560796, 32.050010357313639 ], [ -85.056655275602964, 32.069644357331924 ], [ -85.046187275593212, 32.090895357351719 ], [ -85.053313275599862, 32.126637357385007 ], [ -85.024382275572904, 32.166275357421924 ], [ -85.007826275557491, 32.178878357433661 ], [ -84.960385275513303, 32.191928357445811 ], [ -84.975744275527617, 32.212248357464738 ], [ -84.928371275483499, 32.217978357470074 ], [ -84.916004275471977, 32.228556357479924 ], [ -84.923679275479131, 32.247389357497468 ], [ -84.90536127546207, 32.249555357499482 ], [ -84.894016275451492, 32.259176357508437 ], [ -84.894603275452042, 32.268735357517343 ], [ -84.921071275476692, 32.293137357540068 ], [ -85.005332275555176, 32.329592357574022 ], [ -85.002090275552149, 32.347078357590306 ], [ -84.971663275523809, 32.371503357613051 ], [ -84.984489275535765, 32.387093357627577 ], [ -84.970962275523163, 32.396812357636627 ], [ -84.96538527551796, 32.429450357667022 ], [ -84.989815275540721, 32.454836357690667 ], [ -84.995652275546149, 32.518928357750355 ], [ -85.070774275616117, 32.5812533578084 ], [ -85.084149275628576, 32.603004357828652 ], [ -85.086324275630602, 32.628451357852356 ], [ -85.103803275646882, 32.645910357868615 ], [ -85.090475275634461, 32.676152357896783 ], [ -85.107733275650531, 32.689972357909653 ], [ -85.113868275656245, 32.734389357951017 ], [ -85.124885275666514, 32.744383357960324 ], [ -85.133300275674344, 32.756315357971438 ], [ -85.128090275669493, 32.777070357990766 ], [ -85.162301275701353, 32.807445358019059 ], [ -85.180719275718516, 32.871813358079002 ], [ -85.233503275767674, 33.120139358310276 ], [ -85.233846275767988, 33.129237358318747 ], [ -85.293825275823849, 33.425875358595015 ], [ -85.304980275834239, 33.490594358655287 ], [ -85.33528727586247, 33.654923358808333 ], [ -85.384011275907838, 33.905409359041613 ], [ -85.39573827591876, 33.959829359092296 ], [ -85.416567275938164, 34.086920359210659 ], [ -85.460286275978874, 34.290161359399946 ], [ -85.511856276026904, 34.523014359616809 ], [ -85.52583427603993, 34.584685359674239 ], [ -85.534692276048176, 34.62248835970945 ], [ -85.583058276093212, 34.862322359932811 ], [ -85.608960276117344, 34.990164360051871 ], [ -85.869567276360044, 34.99238436005394 ], [ -86.303500276764183, 34.995464360056808 ], [ -86.313052276773078, 34.995273360056629 ], [ -86.782372277210172, 34.997075360058304 ], [ -86.833422277257711, 34.998246360059397 ], [ -87.207588277606177, 35.007960360068445 ], [ -87.222764277620314, 35.007346360067871 ], [ -87.60781327797892, 35.010546360070855 ], [ -87.986078278331206, 35.016033360075966 ], [ -88.19496227852575, 35.013544360073645 ], [ -88.193993278524843, 35.004453360065185 ], [ -88.143105278477449, 34.93031235999613 ], [ -88.108886278445581, 34.899936359967839 ], [ -88.090468278428432, 34.895629359963827 ], [ -88.136401278471212, 34.580497359670339 ], [ -88.151256278485036, 34.465273359563028 ], [ -88.167613278500269, 34.324147359431592 ], [ -88.199349278529823, 34.090448359213944 ], [ -88.202644278532901, 34.059122359184769 ], [ -88.248195278575324, 33.742726358890103 ], [ -88.274586278599898, 33.538801358700184 ], [ -88.304829278628063, 33.288894358467445 ], [ -88.339466278660325, 32.987497358186744 ], [ -88.348041278668305, 32.924758358128315 ], [ -88.39383227871096, 32.58047035780767 ], [ -88.425792278740715, 32.309224357555053 ], [ -88.43772427875183, 32.227755357479182 ], [ -88.472952278784646, 31.888876357163575 ], [ -88.465097278777321, 31.702245356989756 ], [ -88.450803278764013, 31.435617356741442 ], [ -88.434563278748897, 31.12087935644832 ], [ -88.429199278743894, 31.00069535633639 ], [ -88.417242278732758, 30.736457356090298 ], [ -88.401415278718019, 30.393551355770942 ], [ -88.320326278642497, 30.404293355780947 ], [ -88.135681278470528, 30.337158355718422 ], [ -88.019789278362595, 30.744190356097501 ], [ -87.913385278263505, 30.62118435598294 ], [ -87.903465278254259, 30.421296355796784 ], [ -87.757503278118335, 30.299422355683276 ], [ -87.779941278139219, 30.272638355658334 ], [ -88.00256027834655, 30.233604355621978 ], [ -87.795330278153557, 30.233931355622286 ], [ -87.593405277965502, 30.278415355663714 ], [ -87.58756827796006, 30.319254355701748 ], [ -87.466440277847255, 30.359721355739438 ], [ -87.405251277790271, 30.440360355814537 ], [ -87.418816277802904, 30.481700355853036 ], [ -87.445353277827621, 30.531389355899314 ], [ -87.422067277805922, 30.556493355922694 ], [ -87.393281277779124, 30.620098355981931 ], [ -87.398645277784112, 30.668015356026558 ], [ -87.418894277802977, 30.692810356049648 ], [ -87.46014027784139, 30.705802356061749 ], [ -87.526603277903291, 30.748491356101507 ], [ -87.541900277917534, 30.785695356136156 ], [ -87.61591527798646, 30.848296356194457 ], [ -87.625711277995592, 30.876902356221098 ], [ -87.589867277962199, 30.954361356293237 ], [ -87.598580277970314, 31.002630356338191 ], [ -87.163117277564766, 31.003157356338683 ], [ -86.779361277207357, 30.998191356334058 ], [ -86.701852277135174, 30.998092356333963 ], [ -86.38391927683908, 30.991538356327862 ], [ -86.181476276650542, 30.995225356331296 ], [ -86.031822276511164, 30.99332735632953 ], [ -85.48659727600338, 31.000998356336673 ], [ -85.485010276001901, 31.001001356336673 ], [ -85.001607275551706, 31.00125335633691 ], [ -85.016995275566032, 31.080102356410343 ], [ -85.038068275585658, 31.126713356453752 ], [ -85.068662275614145, 31.162364356486954 ], [ -85.093367275637164, 31.172211356496128 ], [ -85.102957275646091, 31.196922356519138 ], [ -85.093603275637378, 31.22707435654722 ], [ -85.103361275646463, 31.271436356588538 ], [ -85.081228275625847, 31.303080356618008 ], [ -85.082563275627095, 31.332334356645255 ], [ -85.087942275632102, 31.367234356677756 ], [ -85.061406275607396, 31.440663356746143 ], [ -85.066312275611963, 31.476089356779134 ], [ -85.04269827558997, 31.519660356819713 ], [ -85.042721275589997, 31.554389356852056 ], [ -85.059285275605419, 31.621265356914343 ], [ -85.111205275653774, 31.684242356972995 ], [ -85.118674275660723, 31.708571356995648 ], [ -85.115287275657579, 31.731566357017066 ], [ -85.13016527567143, 31.778853357061106 ], [ -85.131561275672723, 31.783814357065726 ], [ -85.135567275676465, 31.854884357131915 ], [ -85.115150275657442, 31.907424357180847 ], [ -85.070067275615457, 31.980703357249091 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Mississippi", "DRAWSEQ": 44, "STATE_FIPS": "28", "SUB_REGION": "East South Central", "STATE_ABBR": "MS" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -88.450803278764013, 31.435617356741442 ], [ -88.465097278777321, 31.702245356989756 ], [ -88.472952278784646, 31.888876357163575 ], [ -88.43772427875183, 32.227755357479182 ], [ -88.425792278740715, 32.309224357555053 ], [ -88.39383227871096, 32.58047035780767 ], [ -88.348041278668305, 32.924758358128315 ], [ -88.339466278660325, 32.987497358186744 ], [ -88.304829278628063, 33.288894358467445 ], [ -88.274586278599898, 33.538801358700184 ], [ -88.248195278575324, 33.742726358890103 ], [ -88.202644278532901, 34.059122359184769 ], [ -88.199349278529823, 34.090448359213944 ], [ -88.167613278500269, 34.324147359431592 ], [ -88.151256278485036, 34.465273359563028 ], [ -88.136401278471212, 34.580497359670339 ], [ -88.090468278428432, 34.895629359963827 ], [ -88.108886278445581, 34.899936359967839 ], [ -88.143105278477449, 34.93031235999613 ], [ -88.193993278524843, 35.004453360065185 ], [ -88.351727278671746, 35.003832360064607 ], [ -88.383146278701005, 35.005041360065732 ], [ -88.785043279075296, 35.003182360063995 ], [ -88.812548279100909, 35.002438360063309 ], [ -89.006196279281269, 35.000234360061249 ], [ -89.198134279460021, 35.000883360061856 ], [ -89.342373279594355, 34.999805360060847 ], [ -89.646558279877652, 35.000733360061716 ], [ -89.717270279943506, 34.999261360060345 ], [ -90.305448280491291, 35.000788360061762 ], [ -90.299604280485838, 34.978576360041082 ], [ -90.248264280438036, 34.949856360014337 ], [ -90.241993280432197, 34.939000360004222 ], [ -90.242939280433077, 34.9208273599873 ], [ -90.266804280455304, 34.896608359964745 ], [ -90.296369280482836, 34.88278735995187 ], [ -90.299543280485793, 34.865057359935356 ], [ -90.301649280487752, 34.85187435992308 ], [ -90.32292028050756, 34.850363359921673 ], [ -90.341521280524887, 34.860674359931274 ], [ -90.4040302805831, 34.841135359913082 ], [ -90.422410280600218, 34.832365359904912 ], [ -90.433648280610683, 34.835451359907786 ], [ -90.427941280605367, 34.872739359942514 ], [ -90.438188280614909, 34.886277359955116 ], [ -90.470629280645127, 34.881020359950227 ], [ -90.474818280649032, 34.857823359928616 ], [ -90.452005280627773, 34.825315359898347 ], [ -90.466807280641561, 34.799761359874545 ], [ -90.448969280624951, 34.760849359838303 ], [ -90.451532280627333, 34.741299359820097 ], [ -90.486026280659459, 34.726933359806722 ], [ -90.504520280676687, 34.729954359809533 ], [ -90.51707128068837, 34.748470359826776 ], [ -90.498836280671398, 34.765884359843 ], [ -90.501384280673761, 34.789931359865392 ], [ -90.51614728068752, 34.805700359880078 ], [ -90.527363280697955, 34.80742135988168 ], [ -90.547849280717045, 34.790434359865856 ], [ -90.533383280703575, 34.713352359794072 ], [ -90.513668280685209, 34.702168359783656 ], [ -90.470080280644609, 34.70435435978569 ], [ -90.466326280641113, 34.672140359755687 ], [ -90.508914280680784, 34.638166359724046 ], [ -90.539067280708863, 34.63699535972296 ], [ -90.547650280716852, 34.651906359736842 ], [ -90.539166280708955, 34.686047359768644 ], [ -90.561162280729434, 34.700386359781994 ], [ -90.579405280746428, 34.645711359731074 ], [ -90.58809528075453, 34.627916359714504 ], [ -90.577719280744859, 34.604845359693016 ], [ -90.53072028070109, 34.555751359647296 ], [ -90.537251280707167, 34.543430359635821 ], [ -90.565786280733747, 34.532611359625747 ], [ -90.580450280747399, 34.5203243596143 ], [ -90.590155280756449, 34.496609359592213 ], [ -90.57450528074186, 34.454049359552577 ], [ -90.579228280746264, 34.433103359533071 ], [ -90.603894280769239, 34.40470335950662 ], [ -90.657346280819013, 34.36601435947059 ], [ -90.657918280819544, 34.330111359437154 ], [ -90.6794402808396, 34.318079359425944 ], [ -90.689481280848952, 34.320249359427962 ], [ -90.681242280841275, 34.363504359468251 ], [ -90.687590280847189, 34.377976359481728 ], [ -90.755418280910348, 34.372269359476412 ], [ -90.761964280916445, 34.36401835946873 ], [ -90.747863280903317, 34.317823359425702 ], [ -90.758360280913095, 34.279081359389622 ], [ -90.792633280945012, 34.300061359409163 ], [ -90.806526280957954, 34.299451359408593 ], [ -90.823944280974175, 34.277444359388099 ], [ -90.831466280981175, 34.229639359343579 ], [ -90.863518281011025, 34.219267359333919 ], [ -90.928545281071592, 34.250298359362816 ], [ -90.9338172810765, 34.234780359348363 ], [ -90.921594281065111, 34.204935359320572 ], [ -90.823027280973321, 34.19065035930727 ], [ -90.80761528095897, 34.166278359284568 ], [ -90.828970280978851, 34.148765359268261 ], [ -90.846716280995381, 34.147651359267222 ], [ -90.929025281072043, 34.185754359302706 ], [ -90.95345528109479, 34.15590835927491 ], [ -90.942354281084448, 34.1260483592471 ], [ -90.906418281050989, 34.102855359225501 ], [ -90.866438281013757, 34.101059359223825 ], [ -90.886450281032381, 34.040818359167723 ], [ -90.950577281092109, 34.03139535915895 ], [ -90.973473281113428, 34.011104359140049 ], [ -90.975381281115205, 33.994713359124788 ], [ -90.961235281102034, 33.978981359110136 ], [ -90.964897281105451, 33.967568359099502 ], [ -90.986924281125965, 33.960923359093314 ], [ -91.000368281138478, 33.968479359100357 ], [ -91.009653281147123, 33.990634359120989 ], [ -91.031169281167166, 33.98580535911649 ], [ -91.069805281203145, 34.006201359135488 ], [ -91.088963281220998, 33.994573359124658 ], [ -91.075817281208757, 33.974749359106191 ], [ -91.018572281155443, 33.936413359070492 ], [ -91.061480281195401, 33.867188359006022 ], [ -91.054926281189296, 33.843633358984079 ], [ -91.028962281165107, 33.816695358958995 ], [ -90.99047828112927, 33.799007358942518 ], [ -90.984146281123373, 33.785450358929893 ], [ -90.995483281133929, 33.771660358917053 ], [ -91.01854028115541, 33.76408335891 ], [ -91.043512281178664, 33.769664358915193 ], [ -91.066500281200078, 33.786635358931001 ], [ -91.105526281236422, 33.776548358921602 ], [ -91.137097281265824, 33.780195358924999 ], [ -91.143002281271322, 33.7719283589173 ], [ -91.13811128126676, 33.723334358872044 ], [ -91.129055281258331, 33.712550358862003 ], [ -91.104678281235621, 33.708343358858087 ], [ -91.056322281190589, 33.719467358868442 ], [ -91.038933281174394, 33.705601358855532 ], [ -91.037941281173474, 33.683327358834788 ], [ -91.083879281216255, 33.662697358815571 ], [ -91.12115828125097, 33.677639358829488 ], [ -91.163411281290323, 33.718424358867473 ], [ -91.21179128133538, 33.709074358858764 ], [ -91.215255281338614, 33.690832358841774 ], [ -91.205420281329452, 33.670054358822426 ], [ -91.154515281282045, 33.63714235879177 ], [ -91.150761281278548, 33.616272358772335 ], [ -91.168133281294729, 33.57735635873609 ], [ -91.187917281313148, 33.574792358733703 ], [ -91.226843281349403, 33.590592358748417 ], [ -91.227743281350243, 33.55646235871663 ], [ -91.21359828133707, 33.539388358700734 ], [ -91.204213281328322, 33.538618358700013 ], [ -91.182957281308532, 33.523463358685902 ], [ -91.180516281306254, 33.512126358675346 ], [ -91.20775328133162, 33.473510358639381 ], [ -91.227262281349795, 33.459567358626394 ], [ -91.2329622813551, 33.443557358611486 ], [ -91.181881281307525, 33.447502358615154 ], [ -91.171840281298174, 33.466758358633086 ], [ -91.174290281300458, 33.504481358668222 ], [ -91.165088281291887, 33.511893358675124 ], [ -91.128908281258191, 33.493304358657809 ], [ -91.119066281249033, 33.469787358635912 ], [ -91.119821281249727, 33.452946358620224 ], [ -91.130625281259796, 33.443238358611183 ], [ -91.198941281323414, 33.422226358591615 ], [ -91.204274281328381, 33.414414358584338 ], [ -91.185093281310515, 33.391946358563416 ], [ -91.137743281266424, 33.388994358560666 ], [ -91.099237281230558, 33.415013358584901 ], [ -91.085908281218153, 33.462971358629559 ], [ -91.073868281206941, 33.466320358632686 ], [ -91.061088281195026, 33.460125358626911 ], [ -91.061622281195525, 33.431912358600641 ], [ -91.078797281211521, 33.410295358580505 ], [ -91.107049281237835, 33.39352235856488 ], [ -91.130533281259702, 33.359518358533215 ], [ -91.141855281270253, 33.322501358498741 ], [ -91.122613281252328, 33.268623358448565 ], [ -91.103013281234084, 33.249329358430593 ], [ -91.076431281209324, 33.292476358470779 ], [ -91.053939281188377, 33.293693358471913 ], [ -91.040534281175894, 33.28204035846106 ], [ -91.054649281189029, 33.245900358427399 ], [ -91.092110281223924, 33.225816358408693 ], [ -91.086426281218635, 33.161723358349008 ], [ -91.095963281227512, 33.145205358333619 ], [ -91.121438281251244, 33.131190358320566 ], [ -91.177737281303664, 33.150408358338467 ], [ -91.19561328132032, 33.140585358329318 ], [ -91.190646281315693, 33.113345358303945 ], [ -91.146898281274943, 33.090774358282928 ], [ -91.117898281247946, 33.065693358259566 ], [ -91.124093281253707, 33.047395358242525 ], [ -91.156794281284164, 33.040555358236155 ], [ -91.160784281287874, 33.021833358218721 ], [ -91.162241281289241, 33.01316235821065 ], [ -91.161974281288991, 33.000418358198779 ], [ -91.209270281333033, 32.935978358138762 ], [ -91.198421281322936, 32.914288358118561 ], [ -91.169809281296281, 32.905148358110054 ], [ -91.137285281266003, 32.917912358121939 ], [ -91.130044281259259, 32.937591358140267 ], [ -91.132463281261508, 32.975348358175431 ], [ -91.111924281242381, 32.987475358186721 ], [ -91.092781281224546, 32.987746358186975 ], [ -91.075698281208645, 32.953838358155394 ], [ -91.079635281212305, 32.877290358084103 ], [ -91.142259281270626, 32.841342358050625 ], [ -91.156450281283838, 32.76281135797749 ], [ -91.136575281265337, 32.751256357966724 ], [ -91.09781728122924, 32.749528357965119 ], [ -91.059135281193207, 32.723650357941018 ], [ -91.139665281268208, 32.663308357884816 ], [ -91.146372281274452, 32.644986357867751 ], [ -91.111100281241605, 32.597663357823684 ], [ -91.06391928119767, 32.606524357831937 ], [ -91.047737281182592, 32.614489357839354 ], [ -91.027572281163813, 32.641637357864639 ], [ -91.007987281145574, 32.642808357865725 ], [ -90.99623728113464, 32.626112357850175 ], [ -90.998763281136988, 32.615603357840392 ], [ -91.03243228116834, 32.58280935780985 ], [ -91.058975281193071, 32.576526357803999 ], [ -91.073372281206474, 32.561749357790234 ], [ -91.063194281196999, 32.542298357772118 ], [ -90.99517728113365, 32.511782357743698 ], [ -90.992156281130832, 32.495421357728461 ], [ -91.019790281156574, 32.490954357724306 ], [ -91.037308281172884, 32.497095357730018 ], [ -91.088891281220924, 32.548775357778155 ], [ -91.118852281248834, 32.524206357755268 ], [ -91.117792281247844, 32.498709357731528 ], [ -91.058617281192724, 32.447140357683494 ], [ -91.027015281163301, 32.442559357679229 ], [ -90.987555281126546, 32.453106357689052 ], [ -90.965590281106088, 32.44017935767701 ], [ -90.970091281110285, 32.419160357657439 ], [ -91.009315281146812, 32.397227357637007 ], [ -90.998969281137178, 32.366378357608284 ], [ -90.984672281123864, 32.35654135759912 ], [ -90.915029281059006, 32.346043357589345 ], [ -90.885259281031281, 32.381500357622365 ], [ -90.875455281022141, 32.379795357620779 ], [ -90.916479281060361, 32.30546435755155 ], [ -90.929350281072345, 32.297553357544182 ], [ -90.971763281111848, 32.30384735755004 ], [ -90.980872281120327, 32.297800357544411 ], [ -90.983924281123166, 32.287280357534613 ], [ -90.971122281111249, 32.269214357517789 ], [ -90.977324281117021, 32.223554357475265 ], [ -91.04175628117703, 32.249588357499512 ], [ -91.062570281196415, 32.232892357483962 ], [ -91.08802228122012, 32.232537357483636 ], [ -91.100679281231905, 32.215036357467334 ], [ -91.116061281246232, 32.225755357477318 ], [ -91.1573752812847, 32.206014357458926 ], [ -91.166958281293631, 32.172141357427385 ], [ -91.15665028128403, 32.144935357402048 ], [ -91.108820281239488, 32.135143357392927 ], [ -91.083116281215553, 32.14873135740558 ], [ -91.054154281188573, 32.134544357392372 ], [ -91.045418281180432, 32.158824357414986 ], [ -91.054581281188973, 32.184683357439063 ], [ -91.024521281160972, 32.170050357425438 ], [ -91.003936281141804, 32.169413357424844 ], [ -91.011390281148749, 32.134213357392056 ], [ -91.041191281176495, 32.107823357367479 ], [ -91.07392228120699, 32.094148357354747 ], [ -91.065118281198792, 32.058707357321737 ], [ -91.089410281221404, 32.056998357320147 ], [ -91.125727281255237, 32.088399357349395 ], [ -91.145694281273833, 32.085828357346998 ], [ -91.143123281271428, 32.066259357328775 ], [ -91.086992281219153, 32.043811357307867 ], [ -91.073243281206359, 32.032150357297006 ], [ -91.072488281205651, 32.021213357286825 ], [ -91.108110281238822, 31.9919843572596 ], [ -91.163143281290075, 31.988448357256306 ], [ -91.201542281325843, 31.91444935718739 ], [ -91.244481281365836, 31.87867235715407 ], [ -91.264692281384654, 31.865586357141883 ], [ -91.241383281362943, 31.83538735711376 ], [ -91.250729281371648, 31.818821357098329 ], [ -91.276800281395936, 31.827533357106443 ], [ -91.292647281410694, 31.861492357138069 ], [ -91.303473281420764, 31.86314435713961 ], [ -91.334846281449984, 31.843478357121292 ], [ -91.347236281461534, 31.795832357076918 ], [ -91.367134281480062, 31.770867357053667 ], [ -91.33625728145131, 31.76362235704692 ], [ -91.262685281382787, 31.773927357056518 ], [ -91.263989281383999, 31.759763357043326 ], [ -91.282621281401347, 31.74988735703413 ], [ -91.339912281454701, 31.758542357042188 ], [ -91.370499281483191, 31.753475357037473 ], [ -91.365074281478144, 31.751741357035854 ], [ -91.387948281499447, 31.716682357003204 ], [ -91.38918428150059, 31.654605356945389 ], [ -91.408403281518488, 31.625530356918311 ], [ -91.457377281564106, 31.626966356919652 ], [ -91.49776928160172, 31.650895356941938 ], [ -91.507809281611074, 31.643870356935395 ], [ -91.508877281612072, 31.621946356914975 ], [ -91.497151281601148, 31.604358356898594 ], [ -91.415384281524993, 31.602592356896949 ], [ -91.40425228151463, 31.586353356881826 ], [ -91.423578281532627, 31.56274635685984 ], [ -91.464473281570719, 31.542866356841326 ], [ -91.502957281606555, 31.534880356833888 ], [ -91.506482281609834, 31.525687356825326 ], [ -91.507900281611157, 31.453083356757709 ], [ -91.473292281578921, 31.420374356727244 ], [ -91.465922281572063, 31.404069356712061 ], [ -91.48083828158596, 31.377780356687577 ], [ -91.494708281598875, 31.37524935668522 ], [ -91.523014281625237, 31.392091356700906 ], [ -91.534169281635627, 31.409238356716877 ], [ -91.534802281636217, 31.434335356740249 ], [ -91.552472281652669, 31.433099356739099 ], [ -91.56773128166688, 31.421406356728205 ], [ -91.559377281659096, 31.38823035669731 ], [ -91.534573281636, 31.382750356692206 ], [ -91.544407281645164, 31.368874356679285 ], [ -91.542790281643647, 31.346986356658899 ], [ -91.505756281609166, 31.323456356636985 ], [ -91.50247528160611, 31.298858356614076 ], [ -91.517078281619703, 31.28306935659937 ], [ -91.556919281656818, 31.270469356587636 ], [ -91.634214281728802, 31.277694356594367 ], [ -91.643682281737611, 31.271118356588239 ], [ -91.636998281731394, 31.241104356560289 ], [ -91.600964281697827, 31.21392935653498 ], [ -91.59148828168901, 31.178482356501966 ], [ -91.620114281715672, 31.127694356454668 ], [ -91.564975281664317, 31.082135356412238 ], [ -91.552081281652306, 31.058159356389908 ], [ -91.572787281671594, 31.032648356366149 ], [ -91.627773281722796, 31.011960356346883 ], [ -91.632297281727006, 31.001365356337011 ], [ -91.17920728130504, 31.000461356336171 ], [ -91.057012281191234, 31.000418356336134 ], [ -90.829714280979545, 31.001545356337182 ], [ -90.560255280728597, 31.00170635633733 ], [ -90.542653280712202, 31.002330356337914 ], [ -90.343660280526876, 31.005390356340762 ], [ -90.259377280448376, 31.007370356342605 ], [ -89.833558280051804, 31.007184356342435 ], [ -89.732717279957896, 31.007445356342679 ], [ -89.723623279949422, 31.001524356337164 ], [ -89.726781279952363, 30.984616356321414 ], [ -89.719823279945885, 30.975493356312917 ], [ -89.739522279964234, 30.965400356303519 ], [ -89.74854027997263, 30.949848356289035 ], [ -89.740475279965111, 30.926109356266927 ], [ -89.758054279981494, 30.92104335626221 ], [ -89.745755279970027, 30.910107356252023 ], [ -89.746800279971012, 30.902794356245213 ], [ -89.763311279986382, 30.900471356243049 ], [ -89.765851279988752, 30.862084356207298 ], [ -89.78502428000661, 30.861579356206828 ], [ -89.774800279997081, 30.830532356177912 ], [ -89.796094280016916, 30.829105356176584 ], [ -89.796567280017356, 30.812652356161259 ], [ -89.810933280030739, 30.811699356160375 ], [ -89.824689280043543, 30.789724356139907 ], [ -89.81335128003299, 30.748168356101203 ], [ -89.825566280044356, 30.742648356096062 ], [ -89.823399280042338, 30.733054356087131 ], [ -89.835614280053719, 30.729362356083691 ], [ -89.844052280061575, 30.712425356067918 ], [ -89.83072328004917, 30.703781356059867 ], [ -89.84134328005905, 30.700550356056858 ], [ -89.841785280059469, 30.679519356037272 ], [ -89.835392280053512, 30.675882356033885 ], [ -89.845447280062885, 30.666252356024913 ], [ -89.829524280048048, 30.67087435602922 ], [ -89.819354280038581, 30.651245356010939 ], [ -89.805536280025706, 30.649456356009274 ], [ -89.820307280039458, 30.624270355985814 ], [ -89.790848280012028, 30.553943355920318 ], [ -89.772796279995219, 30.551247355917809 ], [ -89.755178279978807, 30.515622355884631 ], [ -89.732319279957522, 30.497838355868069 ], [ -89.719059279945171, 30.496037355866392 ], [ -89.713184279939696, 30.481416355852772 ], [ -89.695681279923392, 30.478246355849819 ], [ -89.694598279922388, 30.468186355840452 ], [ -89.683450279912009, 30.46271835583536 ], [ -89.675462279904565, 30.445352355819185 ], [ -89.675369279904487, 30.400074355777019 ], [ -89.65467027988521, 30.379065355757451 ], [ -89.646689279877776, 30.35529035573531 ], [ -89.63345127986544, 30.355307355735327 ], [ -89.620198279853099, 30.343429355724261 ], [ -89.618588279851593, 30.323760355705943 ], [ -89.637082279868821, 30.311843355694847 ], [ -89.639172279870763, 30.295829355679931 ], [ -89.62594227985845, 30.290355355674834 ], [ -89.621661279854465, 30.256964355643738 ], [ -89.606310279840159, 30.247828355635228 ], [ -89.61000327984361, 30.241419355629258 ], [ -89.57388427980996, 30.194935355585969 ], [ -89.438121279683529, 30.200967355591587 ], [ -89.415614279662563, 30.256485355643292 ], [ -89.318542279572156, 30.318853355701375 ], [ -89.357531279608466, 30.365284355744617 ], [ -89.33504627958753, 30.380423355758715 ], [ -89.27352827953024, 30.372386355751232 ], [ -89.276121279532646, 30.314840355697637 ], [ -88.885726279169063, 30.398289355775354 ], [ -88.930223279210509, 30.416801355792597 ], [ -88.873786279157954, 30.430276355805148 ], [ -88.683264278980516, 30.342322355723233 ], [ -88.577760278882252, 30.380749355759022 ], [ -88.464237278776523, 30.326076355708103 ], [ -88.399225278715974, 30.352886355733069 ], [ -88.401415278718019, 30.393551355770942 ], [ -88.417242278732758, 30.736457356090298 ], [ -88.429199278743894, 31.00069535633639 ], [ -88.434563278748897, 31.12087935644832 ], [ -88.450803278764013, 31.435617356741442 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Georgia", "DRAWSEQ": 45, "STATE_FIPS": "13", "SUB_REGION": "South Atlantic", "STATE_ABBR": "GA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -85.13016527567143, 31.778853357061106 ], [ -85.115287275657579, 31.731566357017066 ], [ -85.118674275660723, 31.708571356995648 ], [ -85.111205275653774, 31.684242356972995 ], [ -85.059285275605419, 31.621265356914343 ], [ -85.042721275589997, 31.554389356852056 ], [ -85.04269827558997, 31.519660356819713 ], [ -85.066312275611963, 31.476089356779134 ], [ -85.061406275607396, 31.440663356746143 ], [ -85.087942275632102, 31.367234356677756 ], [ -85.082563275627095, 31.332334356645255 ], [ -85.081228275625847, 31.303080356618008 ], [ -85.103361275646463, 31.271436356588538 ], [ -85.093603275637378, 31.22707435654722 ], [ -85.102957275646091, 31.196922356519138 ], [ -85.093367275637164, 31.172211356496128 ], [ -85.068662275614145, 31.162364356486954 ], [ -85.038068275585658, 31.126713356453752 ], [ -85.016995275566032, 31.080102356410343 ], [ -85.001607275551706, 31.00125335633691 ], [ -85.000142275550331, 30.979319356316481 ], [ -84.973567275525582, 30.963664356301901 ], [ -84.969012275521351, 30.927093356267843 ], [ -84.937776275492254, 30.894957356237914 ], [ -84.926926275482145, 30.846922356193176 ], [ -84.932564275487394, 30.802625356151921 ], [ -84.926895275482124, 30.776088356127207 ], [ -84.915343275471358, 30.754089356106718 ], [ -84.888289275446169, 30.74388935609722 ], [ -84.864583275424081, 30.714503356069855 ], [ -84.863003275422614, 30.712664356068139 ], [ -84.374448274967619, 30.694092356050845 ], [ -84.281663274881197, 30.690419356047421 ], [ -84.075562274689247, 30.678577356036392 ], [ -84.000730274619556, 30.675537356033562 ], [ -83.737844274374723, 30.660491356019548 ], [ -83.609056274254783, 30.650784356010512 ], [ -83.310600273976831, 30.634303355995158 ], [ -83.301315273968186, 30.633285355994211 ], [ -83.1324402738109, 30.621341355983091 ], [ -82.696356273404774, 30.595720355959227 ], [ -82.582957273299158, 30.58905335595302 ], [ -82.463135273187561, 30.582689355947089 ], [ -82.412092273140033, 30.577307355942079 ], [ -82.221039272962088, 30.567076355932549 ], [ -82.238396272978264, 30.531444355899367 ], [ -82.21936727296054, 30.502970355872847 ], [ -82.199187272941742, 30.490014355860779 ], [ -82.20556527294768, 30.423853355799164 ], [ -82.180234272924096, 30.368631355747734 ], [ -82.164639272909568, 30.361291355740896 ], [ -82.052767272805383, 30.363794355743231 ], [ -82.038354272791949, 30.3789043557573 ], [ -82.046099272799168, 30.434068355808677 ], [ -82.035120272788944, 30.44287835581688 ], [ -82.022509272777199, 30.477717355849329 ], [ -82.005801272761644, 30.570990355936196 ], [ -82.013652272768951, 30.598690355961992 ], [ -82.044911272798061, 30.650910356010627 ], [ -82.031881272785924, 30.757532356109927 ], [ -82.012967272768307, 30.764256356116189 ], [ -82.015538272770712, 30.791319356141393 ], [ -81.981480272738992, 30.778351356129313 ], [ -81.961551272720428, 30.796007356145758 ], [ -81.953029272712484, 30.820431356168505 ], [ -81.943805272703898, 30.824249356172061 ], [ -81.907518272670103, 30.81347535616203 ], [ -81.899141272662305, 30.828308356175842 ], [ -81.873002272637962, 30.799084356148626 ], [ -81.803198272572956, 30.788085356138382 ], [ -81.776708272548277, 30.761584356113701 ], [ -81.757710272530588, 30.769631356121195 ], [ -81.736675272510993, 30.763888356115846 ], [ -81.716769272492456, 30.7453693560986 ], [ -81.642477272423264, 30.72908135608343 ], [ -81.62798127240977, 30.731774356085936 ], [ -81.604771272388149, 30.716321356071546 ], [ -81.601170272384792, 30.724887356079524 ], [ -81.536591272324657, 30.706577356062471 ], [ -81.528595272317204, 30.721452356076327 ], [ -81.498382272289064, 30.757514356109908 ], [ -81.529269272317833, 30.864778356209808 ], [ -81.484827272276448, 30.944900356284428 ], [ -81.528561272317177, 30.962119356300462 ], [ -81.490855272282062, 30.985812356322526 ], [ -81.535429272323569, 31.076756356407227 ], [ -81.475337272267609, 31.043823356376556 ], [ -81.525259272314102, 31.086548356416344 ], [ -81.528388272317017, 31.131128356457864 ], [ -81.381006272179746, 31.148945356474457 ], [ -81.31024927211385, 31.242695356561768 ], [ -81.30083527210509, 31.275819356592621 ], [ -81.388813272187022, 31.297149356612486 ], [ -81.394771272192571, 31.264090356581697 ], [ -81.41034427220707, 31.311480356625829 ], [ -81.365581272165386, 31.344554356656634 ], [ -81.313066272116473, 31.337597356650154 ], [ -81.208571272019157, 31.466897356770573 ], [ -81.194770272006309, 31.5051523568062 ], [ -81.239145272047637, 31.556883356854378 ], [ -81.240719272049105, 31.64017335693195 ], [ -81.187189271999245, 31.599898356894442 ], [ -81.134937271950577, 31.646070356937443 ], [ -81.289729272094746, 31.799665357080489 ], [ -81.175177271988062, 31.735802357021011 ], [ -81.196366272007793, 31.784844357066685 ], [ -81.174012271986967, 31.799811357080625 ], [ -81.136824271952335, 31.727073357012884 ], [ -81.06104227188176, 31.777543357059884 ], [ -81.039011271861241, 31.823360357102558 ], [ -81.141468271956668, 31.853516357130641 ], [ -81.18025027199279, 31.897672357171764 ], [ -81.220105272029897, 31.893140357167546 ], [ -81.206488272017225, 31.920650357193164 ], [ -81.244947272053039, 31.894691357168988 ], [ -81.284294272089681, 31.949428357219965 ], [ -81.23968327204814, 31.903415357177114 ], [ -81.203910272014824, 31.928432357200414 ], [ -81.19730227200867, 31.919895357192459 ], [ -81.207258272017938, 31.900120357174046 ], [ -81.179998271992545, 31.905891357179421 ], [ -81.139851271955166, 31.864340357140719 ], [ -80.970875271797794, 31.890314357164911 ], [ -80.973556271800291, 31.947928357218569 ], [ -80.894753271726898, 32.005994357272648 ], [ -81.10487527192258, 32.105446357365267 ], [ -81.119112271935848, 32.117614357376603 ], [ -81.11471827193175, 32.19059335744457 ], [ -81.147692271962455, 32.224446357476097 ], [ -81.148173271962904, 32.257713357507079 ], [ -81.124048271940438, 32.27664435752471 ], [ -81.131890271947739, 32.332618357576841 ], [ -81.141884271957053, 32.348467357591602 ], [ -81.157479271971582, 32.338740357582537 ], [ -81.179123271991728, 32.371781357613315 ], [ -81.178252271990928, 32.386829357627327 ], [ -81.199927272011109, 32.420316357658514 ], [ -81.195157272006668, 32.464560357699725 ], [ -81.236240272044924, 32.520614357751924 ], [ -81.267985272074498, 32.533929357764322 ], [ -81.274302272080376, 32.554814357783776 ], [ -81.298983272103357, 32.567287357795394 ], [ -81.340404272141939, 32.571360357799186 ], [ -81.351489272152264, 32.583528357810522 ], [ -81.366702272166435, 32.581979357809075 ], [ -81.366267272166027, 32.588365357815022 ], [ -81.384906272183386, 32.595883357822025 ], [ -81.41210527220872, 32.625609357849712 ], [ -81.399478272196959, 32.650815357873185 ], [ -81.407191272204145, 32.686702357906604 ], [ -81.420535272216569, 32.701567357920453 ], [ -81.407626272204539, 32.741806357957927 ], [ -81.423037272218892, 32.749812357965382 ], [ -81.416072272212404, 32.756728357971824 ], [ -81.430240272225603, 32.786153357999225 ], [ -81.420833272216839, 32.809494358020963 ], [ -81.430309272225671, 32.820305358031035 ], [ -81.423961272219756, 32.831771358041713 ], [ -81.432331272227557, 32.841681358050941 ], [ -81.455319272248957, 32.844576358053637 ], [ -81.458539272251954, 32.871400358078617 ], [ -81.48320527227493, 32.876092358082985 ], [ -81.465031272258003, 32.897728358103137 ], [ -81.477048272269201, 32.897571358102994 ], [ -81.510236272300105, 32.947221358149235 ], [ -81.509840272299741, 32.955419358156867 ], [ -81.497900272288618, 32.959676358160834 ], [ -81.492735272283809, 33.004813358202867 ], [ -81.508749272298729, 33.012793358210303 ], [ -81.529600272318135, 33.043927358239301 ], [ -81.547660272334966, 33.043683358239072 ], [ -81.560035272346482, 33.060815358255027 ], [ -81.595825272379813, 33.070790358264318 ], [ -81.61096227239392, 33.087875358280229 ], [ -81.704279272480818, 33.122939358312884 ], [ -81.740374272514444, 33.144697358333147 ], [ -81.763408272535898, 33.169835358356558 ], [ -81.759593272532342, 33.195381358380352 ], [ -81.769878272541916, 33.213881358397579 ], [ -81.779834272551184, 33.217368358400826 ], [ -81.801563272571428, 33.207926358392029 ], [ -81.810764272580002, 33.22644235840928 ], [ -81.853963272620234, 33.243501358425164 ], [ -81.836796272604246, 33.260613358441105 ], [ -81.839840272607077, 33.273308358452923 ], [ -81.826573272594715, 33.269424358449307 ], [ -81.86071427262651, 33.297091358475072 ], [ -81.840107272607327, 33.308344358485556 ], [ -81.865544272631013, 33.315668358492374 ], [ -81.876874272641572, 33.306837358484152 ], [ -81.893483272657036, 33.335237358510604 ], [ -81.91209127267436, 33.332196358507773 ], [ -81.911412272673729, 33.349495358523882 ], [ -81.936712272697292, 33.350437358524758 ], [ -81.945066272705077, 33.377147358549635 ], [ -81.925809272687147, 33.376559358549088 ], [ -81.940336272700662, 33.40816335857852 ], [ -81.913563272675731, 33.415441358585298 ], [ -81.927274272688507, 33.436143358604575 ], [ -81.916638272678597, 33.451333358618726 ], [ -81.936383272696986, 33.471019358637058 ], [ -81.980917272738466, 33.490736358655425 ], [ -81.99653427275301, 33.520490358683134 ], [ -82.020140272774995, 33.538732358700123 ], [ -82.038543272792126, 33.547505358708293 ], [ -82.0656812728174, 33.573865358732839 ], [ -82.116403272864645, 33.594776358752313 ], [ -82.138979272885663, 33.593907358751508 ], [ -82.167132272911886, 33.615215358771351 ], [ -82.192187272935229, 33.623840358779383 ], [ -82.214206272955735, 33.680734358832368 ], [ -82.234898272975002, 33.690339358841314 ], [ -82.266218273004171, 33.761595358907677 ], [ -82.305510273040767, 33.78264835892729 ], [ -82.311118273045992, 33.80391435894709 ], [ -82.351311273083425, 33.835392358976407 ], [ -82.365708273096828, 33.83600935897698 ], [ -82.390596273120011, 33.854140358993867 ], [ -82.424525273151602, 33.860254358999562 ], [ -82.4566312731815, 33.878224359016301 ], [ -82.51753827323823, 33.931029359065477 ], [ -82.576615273293257, 33.959287359091789 ], [ -82.573608273290446, 33.968904359100748 ], [ -82.596138273311439, 34.013420359142209 ], [ -82.602944273317775, 34.034636359161965 ], [ -82.660355273371238, 34.108356359230626 ], [ -82.735781273441489, 34.169796359287844 ], [ -82.742593273447824, 34.205553359321144 ], [ -82.758028273462202, 34.233373359347055 ], [ -82.764170273467926, 34.280960359391372 ], [ -82.782870273485344, 34.290515359400274 ], [ -82.808583273509285, 34.339900359446268 ], [ -82.836439273535234, 34.371046359475272 ], [ -82.844092273542358, 34.41267535951404 ], [ -82.868043273564666, 34.457543359555828 ], [ -82.905055273599132, 34.477985359574866 ], [ -82.981963273670758, 34.476497359573486 ], [ -83.007949273694962, 34.470828359568202 ], [ -83.054995273738783, 34.490061359586115 ], [ -83.079021273761157, 34.518972359613045 ], [ -83.108121273788257, 34.535016359627981 ], [ -83.137366273815488, 34.567867359658578 ], [ -83.158950273835586, 34.576831359666926 ], [ -83.164879273841109, 34.598937359687511 ], [ -83.236987273908269, 34.613321359700912 ], [ -83.298895273965925, 34.662945359747127 ], [ -83.339790274004017, 34.677692359760862 ], [ -83.350685274014154, 34.709647359790623 ], [ -83.350334274013832, 34.72738135980714 ], [ -83.323424273988763, 34.752233359830285 ], [ -83.322690273988087, 34.787244359862889 ], [ -83.302753273969515, 34.805531359879922 ], [ -83.270114273939129, 34.815079359888813 ], [ -83.267771273936944, 34.839230359911305 ], [ -83.250421273920779, 34.839710359911749 ], [ -83.250306273920671, 34.850166359921488 ], [ -83.235688273907058, 34.862384359932868 ], [ -83.243073273913936, 34.878081359947487 ], [ -83.232803273904366, 34.87382135994352 ], [ -83.219428273891921, 34.889182359957829 ], [ -83.203513273877093, 34.88417035995316 ], [ -83.182180273857227, 34.910647359977816 ], [ -83.158353273835033, 34.91765135998434 ], [ -83.155026273831936, 34.932280359997961 ], [ -83.137562273815675, 34.930475359996279 ], [ -83.12563627380456, 34.940790360005892 ], [ -83.113101273792893, 34.93612536000154 ], [ -83.127315273806133, 34.954374360018541 ], [ -83.121401273800615, 34.960893360024613 ], [ -83.115542273795171, 34.954687360018831 ], [ -83.100450273781107, 34.984162360046284 ], [ -83.106157273786422, 35.000366360061378 ], [ -83.512887274165223, 34.992115360053688 ], [ -83.549297274199134, 34.98962836005137 ], [ -83.937899274561047, 34.989477360051232 ], [ -83.988454274608131, 34.989151360050926 ], [ -84.118152274728914, 34.988307360050143 ], [ -84.323773274920413, 34.989090360050874 ], [ -84.618684275195079, 34.988759360050565 ], [ -84.771134275337062, 34.990757360052427 ], [ -84.800417275364325, 34.992832360054358 ], [ -84.967857275520274, 34.992683360054215 ], [ -84.972793275524864, 34.992629360054167 ], [ -85.267717275799541, 34.989149360050931 ], [ -85.359944275885425, 34.989978360051694 ], [ -85.467384275985495, 34.990123360051832 ], [ -85.608960276117344, 34.990164360051871 ], [ -85.583058276093212, 34.862322359932811 ], [ -85.534692276048176, 34.62248835970945 ], [ -85.52583427603993, 34.584685359674239 ], [ -85.511856276026904, 34.523014359616809 ], [ -85.460286275978874, 34.290161359399946 ], [ -85.416567275938164, 34.086920359210659 ], [ -85.39573827591876, 33.959829359092296 ], [ -85.384011275907838, 33.905409359041613 ], [ -85.33528727586247, 33.654923358808333 ], [ -85.304980275834239, 33.490594358655287 ], [ -85.293825275823849, 33.425875358595015 ], [ -85.233846275767988, 33.129237358318747 ], [ -85.233503275767674, 33.120139358310276 ], [ -85.180719275718516, 32.871813358079002 ], [ -85.162301275701353, 32.807445358019059 ], [ -85.128090275669493, 32.777070357990766 ], [ -85.133300275674344, 32.756315357971438 ], [ -85.124885275666514, 32.744383357960324 ], [ -85.113868275656245, 32.734389357951017 ], [ -85.107733275650531, 32.689972357909653 ], [ -85.090475275634461, 32.676152357896783 ], [ -85.103803275646882, 32.645910357868615 ], [ -85.086324275630602, 32.628451357852356 ], [ -85.084149275628576, 32.603004357828652 ], [ -85.070774275616117, 32.5812533578084 ], [ -84.995652275546149, 32.518928357750355 ], [ -84.989815275540721, 32.454836357690667 ], [ -84.96538527551796, 32.429450357667022 ], [ -84.970962275523163, 32.396812357636627 ], [ -84.984489275535765, 32.387093357627577 ], [ -84.971663275523809, 32.371503357613051 ], [ -85.002090275552149, 32.347078357590306 ], [ -85.005332275555176, 32.329592357574022 ], [ -84.921071275476692, 32.293137357540068 ], [ -84.894603275452042, 32.268735357517343 ], [ -84.894016275451492, 32.259176357508437 ], [ -84.90536127546207, 32.249555357499482 ], [ -84.923679275479131, 32.247389357497468 ], [ -84.916004275471977, 32.228556357479924 ], [ -84.928371275483499, 32.217978357470074 ], [ -84.975744275527617, 32.212248357464738 ], [ -84.960385275513303, 32.191928357445811 ], [ -85.007826275557491, 32.178878357433661 ], [ -85.024382275572904, 32.166275357421924 ], [ -85.053313275599862, 32.126637357385007 ], [ -85.046187275593212, 32.090895357351719 ], [ -85.056655275602964, 32.069644357331924 ], [ -85.06201027560796, 32.050010357313639 ], [ -85.056700275603006, 32.017376357283247 ], [ -85.070067275615457, 31.980703357249091 ], [ -85.115150275657442, 31.907424357180847 ], [ -85.135567275676465, 31.854884357131915 ], [ -85.131561275672723, 31.783814357065726 ], [ -85.13016527567143, 31.778853357061106 ] ] ], [ [ [ -81.485055272276654, 30.903883356246226 ], [ -81.503305272293659, 30.881735356225597 ], [ -81.469887272262525, 30.860259356205596 ], [ -81.479460272271439, 30.736883356090694 ], [ -81.455716272249333, 30.716427356071645 ], [ -81.403052272200284, 30.938803356278747 ], [ -81.416405272212714, 30.97060035630836 ], [ -81.485055272276654, 30.903883356246226 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "South Carolina", "DRAWSEQ": 46, "STATE_FIPS": "45", "SUB_REGION": "South Atlantic", "STATE_ABBR": "SC" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -81.759593272532342, 33.195381358380352 ], [ -81.763408272535898, 33.169835358356558 ], [ -81.740374272514444, 33.144697358333147 ], [ -81.704279272480818, 33.122939358312884 ], [ -81.61096227239392, 33.087875358280229 ], [ -81.595825272379813, 33.070790358264318 ], [ -81.560035272346482, 33.060815358255027 ], [ -81.547660272334966, 33.043683358239072 ], [ -81.529600272318135, 33.043927358239301 ], [ -81.508749272298729, 33.012793358210303 ], [ -81.492735272283809, 33.004813358202867 ], [ -81.497900272288618, 32.959676358160834 ], [ -81.509840272299741, 32.955419358156867 ], [ -81.510236272300105, 32.947221358149235 ], [ -81.477048272269201, 32.897571358102994 ], [ -81.465031272258003, 32.897728358103137 ], [ -81.48320527227493, 32.876092358082985 ], [ -81.458539272251954, 32.871400358078617 ], [ -81.455319272248957, 32.844576358053637 ], [ -81.432331272227557, 32.841681358050941 ], [ -81.423961272219756, 32.831771358041713 ], [ -81.430309272225671, 32.820305358031035 ], [ -81.420833272216839, 32.809494358020963 ], [ -81.430240272225603, 32.786153357999225 ], [ -81.416072272212404, 32.756728357971824 ], [ -81.423037272218892, 32.749812357965382 ], [ -81.407626272204539, 32.741806357957927 ], [ -81.420535272216569, 32.701567357920453 ], [ -81.407191272204145, 32.686702357906604 ], [ -81.399478272196959, 32.650815357873185 ], [ -81.41210527220872, 32.625609357849712 ], [ -81.384906272183386, 32.595883357822025 ], [ -81.366267272166027, 32.588365357815022 ], [ -81.366702272166435, 32.581979357809075 ], [ -81.351489272152264, 32.583528357810522 ], [ -81.340404272141939, 32.571360357799186 ], [ -81.298983272103357, 32.567287357795394 ], [ -81.274302272080376, 32.554814357783776 ], [ -81.267985272074498, 32.533929357764322 ], [ -81.236240272044924, 32.520614357751924 ], [ -81.195157272006668, 32.464560357699725 ], [ -81.199927272011109, 32.420316357658514 ], [ -81.178252271990928, 32.386829357627327 ], [ -81.179123271991728, 32.371781357613315 ], [ -81.157479271971582, 32.338740357582537 ], [ -81.141884271957053, 32.348467357591602 ], [ -81.131890271947739, 32.332618357576841 ], [ -81.124048271940438, 32.27664435752471 ], [ -81.148173271962904, 32.257713357507079 ], [ -81.147692271962455, 32.224446357476097 ], [ -81.11471827193175, 32.19059335744457 ], [ -81.119112271935848, 32.117614357376603 ], [ -81.10487527192258, 32.105446357365267 ], [ -80.892914271725175, 32.068173357330558 ], [ -80.780561271620542, 32.248123357498145 ], [ -80.821866271659019, 32.400710357640257 ], [ -80.867177271701209, 32.532695357763174 ], [ -80.830517271667077, 32.516281357747886 ], [ -80.784786271624483, 32.505052357737434 ], [ -80.799382271638066, 32.473307357707867 ], [ -80.741963271584595, 32.360212357602535 ], [ -80.678014271525043, 32.285665357533112 ], [ -80.626028271476628, 32.272821357521153 ], [ -80.460392271322362, 32.318685357563865 ], [ -80.442797271305977, 32.373507357614919 ], [ -80.486072271346274, 32.431031357668495 ], [ -80.64355827149295, 32.49846035773129 ], [ -80.646411271495609, 32.518879357750308 ], [ -80.538882271395465, 32.509866357741913 ], [ -80.550394271406191, 32.557841357786593 ], [ -80.480707271341288, 32.51043435774244 ], [ -80.399803271265938, 32.504960357737346 ], [ -80.415992271281013, 32.66916035789027 ], [ -80.390868271257617, 32.655401357877452 ], [ -80.347174271216915, 32.511955357743858 ], [ -80.290654271164286, 32.504070357736516 ], [ -80.210803271089915, 32.561601357790096 ], [ -79.996617270890439, 32.605787357831247 ], [ -79.896393270797105, 32.677421357897963 ], [ -79.891655270792683, 32.734030357950687 ], [ -79.94798427084514, 32.81079935802218 ], [ -79.96211927085831, 32.904410358109359 ], [ -79.930250270828637, 32.914221358118496 ], [ -79.907141270807102, 32.859389358067432 ], [ -79.799859270707188, 32.929956358133154 ], [ -79.907486270807425, 32.790707358003466 ], [ -79.752320270662921, 32.794235358006752 ], [ -79.606812270527399, 32.899243358104549 ], [ -79.587646270509552, 32.925106358128637 ], [ -79.617233270537113, 32.980968358180661 ], [ -79.58235727050463, 33.0160133582133 ], [ -79.410618270344685, 33.013868358211305 ], [ -79.287877270230368, 33.104698358295892 ], [ -79.297834270239647, 33.138961358327805 ], [ -79.348755270287072, 33.154994358342734 ], [ -79.229562270176061, 33.141505358330178 ], [ -79.201911270150319, 33.183688358369459 ], [ -79.27084627021452, 33.297038358475028 ], [ -79.158115270109519, 33.342433358517304 ], [ -79.150150270102102, 33.317256358493857 ], [ -79.120866270074828, 33.430778358599582 ], [ -79.000695269962918, 33.572629358731689 ], [ -78.854881269827118, 33.716362358865553 ], [ -78.585931269576633, 33.853531358993301 ], [ -78.622592269610777, 33.865708359004643 ], [ -78.579453269570607, 33.882164359019967 ], [ -78.655453269641384, 33.948845359082071 ], [ -79.074257270031424, 34.30473835941352 ], [ -79.446913270378488, 34.619222359706406 ], [ -79.45574127038671, 34.634252359720406 ], [ -79.667282270583726, 34.80082035987553 ], [ -79.685738270600908, 34.80541235987981 ], [ -79.919736270818845, 34.808074359882283 ], [ -80.325065271196337, 34.814916359888656 ], [ -80.561335271416368, 34.815379359889093 ], [ -80.799856271638518, 34.81626035988991 ], [ -80.785444271625096, 34.940788360005882 ], [ -80.839959271675866, 35.00216636006305 ], [ -80.894510271726674, 35.0598803601168 ], [ -80.927592271757476, 35.101394360155467 ], [ -81.03968527186187, 35.037345360095813 ], [ -81.065350271885777, 35.066625360123084 ], [ -81.028240271851217, 35.105551360159339 ], [ -81.048839271870392, 35.132153360184105 ], [ -81.049099271870645, 35.151672360202284 ], [ -81.322625272125379, 35.163891360213668 ], [ -81.361980272162029, 35.162986360212827 ], [ -81.765181272537546, 35.182596360231088 ], [ -81.870416272635552, 35.183237360231686 ], [ -81.971272272729479, 35.188400360236493 ], [ -82.21001027295182, 35.193241360241004 ], [ -82.278165273015304, 35.195121360242752 ], [ -82.320609273054828, 35.184303360232676 ], [ -82.35070027308285, 35.192788360240584 ], [ -82.359962273091483, 35.183064360231526 ], [ -82.371216273101965, 35.182839360231313 ], [ -82.389450273118939, 35.208356360255081 ], [ -82.437761273163929, 35.169676360219057 ], [ -82.466586273190771, 35.173617360222721 ], [ -82.524479273244694, 35.154677360205085 ], [ -82.56987627328698, 35.149607360200363 ], [ -82.654344273365638, 35.119574360172393 ], [ -82.685900273395035, 35.121580360174264 ], [ -82.687884273396875, 35.097918360152221 ], [ -82.697208273405565, 35.091349360146111 ], [ -82.771201273474475, 35.085537360140691 ], [ -82.887556273582831, 35.0554733601127 ], [ -83.007146273694218, 35.024293360083661 ], [ -83.106157273786422, 35.000366360061378 ], [ -83.100450273781107, 34.984162360046284 ], [ -83.115542273795171, 34.954687360018831 ], [ -83.121401273800615, 34.960893360024613 ], [ -83.127315273806133, 34.954374360018541 ], [ -83.113101273792893, 34.93612536000154 ], [ -83.12563627380456, 34.940790360005892 ], [ -83.137562273815675, 34.930475359996279 ], [ -83.155026273831936, 34.932280359997961 ], [ -83.158353273835033, 34.91765135998434 ], [ -83.182180273857227, 34.910647359977816 ], [ -83.203513273877093, 34.88417035995316 ], [ -83.219428273891921, 34.889182359957829 ], [ -83.232803273904366, 34.87382135994352 ], [ -83.243073273913936, 34.878081359947487 ], [ -83.235688273907058, 34.862384359932868 ], [ -83.250306273920671, 34.850166359921488 ], [ -83.250421273920779, 34.839710359911749 ], [ -83.267771273936944, 34.839230359911305 ], [ -83.270114273939129, 34.815079359888813 ], [ -83.302753273969515, 34.805531359879922 ], [ -83.322690273988087, 34.787244359862889 ], [ -83.323424273988763, 34.752233359830285 ], [ -83.350334274013832, 34.72738135980714 ], [ -83.350685274014154, 34.709647359790623 ], [ -83.339790274004017, 34.677692359760862 ], [ -83.298895273965925, 34.662945359747127 ], [ -83.236987273908269, 34.613321359700912 ], [ -83.164879273841109, 34.598937359687511 ], [ -83.158950273835586, 34.576831359666926 ], [ -83.137366273815488, 34.567867359658578 ], [ -83.108121273788257, 34.535016359627981 ], [ -83.079021273761157, 34.518972359613045 ], [ -83.054995273738783, 34.490061359586115 ], [ -83.007949273694962, 34.470828359568202 ], [ -82.981963273670758, 34.476497359573486 ], [ -82.905055273599132, 34.477985359574866 ], [ -82.868043273564666, 34.457543359555828 ], [ -82.844092273542358, 34.41267535951404 ], [ -82.836439273535234, 34.371046359475272 ], [ -82.808583273509285, 34.339900359446268 ], [ -82.782870273485344, 34.290515359400274 ], [ -82.764170273467926, 34.280960359391372 ], [ -82.758028273462202, 34.233373359347055 ], [ -82.742593273447824, 34.205553359321144 ], [ -82.735781273441489, 34.169796359287844 ], [ -82.660355273371238, 34.108356359230626 ], [ -82.602944273317775, 34.034636359161965 ], [ -82.596138273311439, 34.013420359142209 ], [ -82.573608273290446, 33.968904359100748 ], [ -82.576615273293257, 33.959287359091789 ], [ -82.51753827323823, 33.931029359065477 ], [ -82.4566312731815, 33.878224359016301 ], [ -82.424525273151602, 33.860254358999562 ], [ -82.390596273120011, 33.854140358993867 ], [ -82.365708273096828, 33.83600935897698 ], [ -82.351311273083425, 33.835392358976407 ], [ -82.311118273045992, 33.80391435894709 ], [ -82.305510273040767, 33.78264835892729 ], [ -82.266218273004171, 33.761595358907677 ], [ -82.234898272975002, 33.690339358841314 ], [ -82.214206272955735, 33.680734358832368 ], [ -82.192187272935229, 33.623840358779383 ], [ -82.167132272911886, 33.615215358771351 ], [ -82.138979272885663, 33.593907358751508 ], [ -82.116403272864645, 33.594776358752313 ], [ -82.0656812728174, 33.573865358732839 ], [ -82.038543272792126, 33.547505358708293 ], [ -82.020140272774995, 33.538732358700123 ], [ -81.99653427275301, 33.520490358683134 ], [ -81.980917272738466, 33.490736358655425 ], [ -81.936383272696986, 33.471019358637058 ], [ -81.916638272678597, 33.451333358618726 ], [ -81.927274272688507, 33.436143358604575 ], [ -81.913563272675731, 33.415441358585298 ], [ -81.940336272700662, 33.40816335857852 ], [ -81.925809272687147, 33.376559358549088 ], [ -81.945066272705077, 33.377147358549635 ], [ -81.936712272697292, 33.350437358524758 ], [ -81.911412272673729, 33.349495358523882 ], [ -81.91209127267436, 33.332196358507773 ], [ -81.893483272657036, 33.335237358510604 ], [ -81.876874272641572, 33.306837358484152 ], [ -81.865544272631013, 33.315668358492374 ], [ -81.840107272607327, 33.308344358485556 ], [ -81.86071427262651, 33.297091358475072 ], [ -81.826573272594715, 33.269424358449307 ], [ -81.839840272607077, 33.273308358452923 ], [ -81.836796272604246, 33.260613358441105 ], [ -81.853963272620234, 33.243501358425164 ], [ -81.810764272580002, 33.22644235840928 ], [ -81.801563272571428, 33.207926358392029 ], [ -81.779834272551184, 33.217368358400826 ], [ -81.769878272541916, 33.213881358397579 ], [ -81.759593272532342, 33.195381358380352 ] ] ], [ [ [ -80.767805271608665, 32.258648357507951 ], [ -80.819267271656599, 32.104698357364569 ], [ -80.666616271514428, 32.220113357472059 ], [ -80.719083271563292, 32.272204357520579 ], [ -80.767805271608665, 32.258648357507951 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Arkansas", "DRAWSEQ": 47, "STATE_FIPS": "05", "SUB_REGION": "West South Central", "STATE_ABBR": "AR" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -94.46169128436209, 34.196765359312963 ], [ -94.468585284368515, 33.939311359073187 ], [ -94.476691284376059, 33.632081358787062 ], [ -94.436117284338266, 33.636561358791234 ], [ -94.436536284338658, 33.616961358772976 ], [ -94.451757284352837, 33.604464358761341 ], [ -94.443532284345181, 33.596621358754035 ], [ -94.428670284331332, 33.59725835875463 ], [ -94.406772284310946, 33.573604358732595 ], [ -94.393619284298694, 33.575077358733971 ], [ -94.379314284285371, 33.593444358751071 ], [ -94.370829284277463, 33.590160358748015 ], [ -94.372508284279036, 33.572780358731833 ], [ -94.395465284300414, 33.560421358720319 ], [ -94.370959284277589, 33.547802358708566 ], [ -94.328950284238459, 33.573254358732271 ], [ -94.302582284213912, 33.557054358717181 ], [ -94.299019284210587, 33.57997235873853 ], [ -94.279182284192117, 33.589452358747359 ], [ -94.272278284185688, 33.584726358742955 ], [ -94.27474228418798, 33.56185735872166 ], [ -94.237433284153241, 33.592543358750234 ], [ -94.223234284140005, 33.585840358743994 ], [ -94.235564284151494, 33.561656358721471 ], [ -94.211080284128684, 33.558108358718165 ], [ -94.205541284123527, 33.5852003587434 ], [ -94.159710284080845, 33.593894358751498 ], [ -94.155360284076792, 33.567206358726636 ], [ -94.098893284024214, 33.573120358732147 ], [ -94.086846284012992, 33.584075358742354 ], [ -94.061622283989493, 33.577335358736072 ], [ -94.03611628396574, 33.556034358716232 ], [ -94.036691283966277, 33.270453358450268 ], [ -94.038931283968367, 33.023422358220202 ], [ -93.809931283755091, 33.022729358219557 ], [ -93.511915283477549, 33.021287358218217 ], [ -93.479070283446958, 33.021528358218433 ], [ -93.232543283217353, 33.019375358216436 ], [ -92.978989282981217, 33.018274358215407 ], [ -92.717236282737446, 33.016839358214071 ], [ -92.063441282128551, 33.010151358207843 ], [ -91.454470281561399, 33.013999358211422 ], [ -91.427644281536416, 33.013545358211005 ], [ -91.254727281375366, 33.013601358211055 ], [ -91.162241281289241, 33.01316235821065 ], [ -91.160784281287874, 33.021833358218721 ], [ -91.156794281284164, 33.040555358236155 ], [ -91.124093281253707, 33.047395358242525 ], [ -91.117898281247946, 33.065693358259566 ], [ -91.146898281274943, 33.090774358282928 ], [ -91.190646281315693, 33.113345358303945 ], [ -91.19561328132032, 33.140585358329318 ], [ -91.177737281303664, 33.150408358338467 ], [ -91.121438281251244, 33.131190358320566 ], [ -91.095963281227512, 33.145205358333619 ], [ -91.086426281218635, 33.161723358349008 ], [ -91.092110281223924, 33.225816358408693 ], [ -91.054649281189029, 33.245900358427399 ], [ -91.040534281175894, 33.28204035846106 ], [ -91.053939281188377, 33.293693358471913 ], [ -91.076431281209324, 33.292476358470779 ], [ -91.103013281234084, 33.249329358430593 ], [ -91.122613281252328, 33.268623358448565 ], [ -91.141855281270253, 33.322501358498741 ], [ -91.130533281259702, 33.359518358533215 ], [ -91.107049281237835, 33.39352235856488 ], [ -91.078797281211521, 33.410295358580505 ], [ -91.061622281195525, 33.431912358600641 ], [ -91.061088281195026, 33.460125358626911 ], [ -91.073868281206941, 33.466320358632686 ], [ -91.085908281218153, 33.462971358629559 ], [ -91.099237281230558, 33.415013358584901 ], [ -91.137743281266424, 33.388994358560666 ], [ -91.185093281310515, 33.391946358563416 ], [ -91.204274281328381, 33.414414358584338 ], [ -91.198941281323414, 33.422226358591615 ], [ -91.130625281259796, 33.443238358611183 ], [ -91.119821281249727, 33.452946358620224 ], [ -91.119066281249033, 33.469787358635912 ], [ -91.128908281258191, 33.493304358657809 ], [ -91.165088281291887, 33.511893358675124 ], [ -91.174290281300458, 33.504481358668222 ], [ -91.171840281298174, 33.466758358633086 ], [ -91.181881281307525, 33.447502358615154 ], [ -91.2329622813551, 33.443557358611486 ], [ -91.227262281349795, 33.459567358626394 ], [ -91.20775328133162, 33.473510358639381 ], [ -91.180516281306254, 33.512126358675346 ], [ -91.182957281308532, 33.523463358685902 ], [ -91.204213281328322, 33.538618358700013 ], [ -91.21359828133707, 33.539388358700734 ], [ -91.227743281350243, 33.55646235871663 ], [ -91.226843281349403, 33.590592358748417 ], [ -91.187917281313148, 33.574792358733703 ], [ -91.168133281294729, 33.57735635873609 ], [ -91.150761281278548, 33.616272358772335 ], [ -91.154515281282045, 33.63714235879177 ], [ -91.205420281329452, 33.670054358822426 ], [ -91.215255281338614, 33.690832358841774 ], [ -91.21179128133538, 33.709074358858764 ], [ -91.163411281290323, 33.718424358867473 ], [ -91.12115828125097, 33.677639358829488 ], [ -91.083879281216255, 33.662697358815571 ], [ -91.037941281173474, 33.683327358834788 ], [ -91.038933281174394, 33.705601358855532 ], [ -91.056322281190589, 33.719467358868442 ], [ -91.104678281235621, 33.708343358858087 ], [ -91.129055281258331, 33.712550358862003 ], [ -91.13811128126676, 33.723334358872044 ], [ -91.143002281271322, 33.7719283589173 ], [ -91.137097281265824, 33.780195358924999 ], [ -91.105526281236422, 33.776548358921602 ], [ -91.066500281200078, 33.786635358931001 ], [ -91.043512281178664, 33.769664358915193 ], [ -91.01854028115541, 33.76408335891 ], [ -90.995483281133929, 33.771660358917053 ], [ -90.984146281123373, 33.785450358929893 ], [ -90.99047828112927, 33.799007358942518 ], [ -91.028962281165107, 33.816695358958995 ], [ -91.054926281189296, 33.843633358984079 ], [ -91.061480281195401, 33.867188359006022 ], [ -91.018572281155443, 33.936413359070492 ], [ -91.075817281208757, 33.974749359106191 ], [ -91.088963281220998, 33.994573359124658 ], [ -91.069805281203145, 34.006201359135488 ], [ -91.031169281167166, 33.98580535911649 ], [ -91.009653281147123, 33.990634359120989 ], [ -91.000368281138478, 33.968479359100357 ], [ -90.986924281125965, 33.960923359093314 ], [ -90.964897281105451, 33.967568359099502 ], [ -90.961235281102034, 33.978981359110136 ], [ -90.975381281115205, 33.994713359124788 ], [ -90.973473281113428, 34.011104359140049 ], [ -90.950577281092109, 34.03139535915895 ], [ -90.886450281032381, 34.040818359167723 ], [ -90.866438281013757, 34.101059359223825 ], [ -90.906418281050989, 34.102855359225501 ], [ -90.942354281084448, 34.1260483592471 ], [ -90.95345528109479, 34.15590835927491 ], [ -90.929025281072043, 34.185754359302706 ], [ -90.846716280995381, 34.147651359267222 ], [ -90.828970280978851, 34.148765359268261 ], [ -90.80761528095897, 34.166278359284568 ], [ -90.823027280973321, 34.19065035930727 ], [ -90.921594281065111, 34.204935359320572 ], [ -90.9338172810765, 34.234780359348363 ], [ -90.928545281071592, 34.250298359362816 ], [ -90.863518281011025, 34.219267359333919 ], [ -90.831466280981175, 34.229639359343579 ], [ -90.823944280974175, 34.277444359388099 ], [ -90.806526280957954, 34.299451359408593 ], [ -90.792633280945012, 34.300061359409163 ], [ -90.758360280913095, 34.279081359389622 ], [ -90.747863280903317, 34.317823359425702 ], [ -90.761964280916445, 34.36401835946873 ], [ -90.755418280910348, 34.372269359476412 ], [ -90.687590280847189, 34.377976359481728 ], [ -90.681242280841275, 34.363504359468251 ], [ -90.689481280848952, 34.320249359427962 ], [ -90.6794402808396, 34.318079359425944 ], [ -90.657918280819544, 34.330111359437154 ], [ -90.657346280819013, 34.36601435947059 ], [ -90.603894280769239, 34.40470335950662 ], [ -90.579228280746264, 34.433103359533071 ], [ -90.57450528074186, 34.454049359552577 ], [ -90.590155280756449, 34.496609359592213 ], [ -90.580450280747399, 34.5203243596143 ], [ -90.565786280733747, 34.532611359625747 ], [ -90.537251280707167, 34.543430359635821 ], [ -90.53072028070109, 34.555751359647296 ], [ -90.577719280744859, 34.604845359693016 ], [ -90.58809528075453, 34.627916359714504 ], [ -90.579405280746428, 34.645711359731074 ], [ -90.561162280729434, 34.700386359781994 ], [ -90.539166280708955, 34.686047359768644 ], [ -90.547650280716852, 34.651906359736842 ], [ -90.539067280708863, 34.63699535972296 ], [ -90.508914280680784, 34.638166359724046 ], [ -90.466326280641113, 34.672140359755687 ], [ -90.470080280644609, 34.70435435978569 ], [ -90.513668280685209, 34.702168359783656 ], [ -90.533383280703575, 34.713352359794072 ], [ -90.547849280717045, 34.790434359865856 ], [ -90.527363280697955, 34.80742135988168 ], [ -90.51614728068752, 34.805700359880078 ], [ -90.501384280673761, 34.789931359865392 ], [ -90.498836280671398, 34.765884359843 ], [ -90.51707128068837, 34.748470359826776 ], [ -90.504520280676687, 34.729954359809533 ], [ -90.486026280659459, 34.726933359806722 ], [ -90.451532280627333, 34.741299359820097 ], [ -90.448969280624951, 34.760849359838303 ], [ -90.466807280641561, 34.799761359874545 ], [ -90.452005280627773, 34.825315359898347 ], [ -90.474818280649032, 34.857823359928616 ], [ -90.470629280645127, 34.881020359950227 ], [ -90.438188280614909, 34.886277359955116 ], [ -90.427941280605367, 34.872739359942514 ], [ -90.433648280610683, 34.835451359907786 ], [ -90.422410280600218, 34.832365359904912 ], [ -90.4040302805831, 34.841135359913082 ], [ -90.341521280524887, 34.860674359931274 ], [ -90.32292028050756, 34.850363359921673 ], [ -90.301649280487752, 34.85187435992308 ], [ -90.299543280485793, 34.865057359935356 ], [ -90.296369280482836, 34.88278735995187 ], [ -90.266804280455304, 34.896608359964745 ], [ -90.242939280433077, 34.9208273599873 ], [ -90.241993280432197, 34.939000360004222 ], [ -90.248264280438036, 34.949856360014337 ], [ -90.299604280485838, 34.978576360041082 ], [ -90.305448280491291, 35.000788360061762 ], [ -90.291906280478671, 35.048551360106245 ], [ -90.195804280389169, 35.040990360099208 ], [ -90.169176280364368, 35.077919360133599 ], [ -90.178439280372999, 35.108738360162306 ], [ -90.164568280360086, 35.129703360181828 ], [ -90.143823280340769, 35.136626360188274 ], [ -90.083016280284127, 35.125140360177582 ], [ -90.064628280267002, 35.14747436019838 ], [ -90.062522280265043, 35.167005360216564 ], [ -90.073394280275167, 35.191922360239772 ], [ -90.06905328027112, 35.212826360259243 ], [ -90.090195280290814, 35.254486360298046 ], [ -90.106034280305565, 35.263935360306846 ], [ -90.152216280348583, 35.26414536030704 ], [ -90.169840280364994, 35.282653360324275 ], [ -90.157083280353106, 35.306331360346327 ], [ -90.106438280305952, 35.314772360354183 ], [ -90.098793280298821, 35.345678360382969 ], [ -90.105713280305267, 35.366067360401956 ], [ -90.08722628028805, 35.381593360416417 ], [ -90.075568280277196, 35.406613360439721 ], [ -90.085250280286218, 35.418365360450665 ], [ -90.112335280311441, 35.41777436045011 ], [ -90.132562280330276, 35.407685360440723 ], [ -90.140260280337444, 35.383130360417852 ], [ -90.167910280363202, 35.384339360418977 ], [ -90.172770280367715, 35.423801360455727 ], [ -90.137368280334755, 35.442607360473247 ], [ -90.102051280301865, 35.47365136050216 ], [ -90.082320280283483, 35.478289360506473 ], [ -90.074935280276605, 35.472426360501018 ], [ -90.074027280275757, 35.426590360458327 ], [ -90.060385280263048, 35.41349436044613 ], [ -90.046873280250466, 35.417187360449567 ], [ -89.999653280206488, 35.445537360475967 ], [ -90.04190628024584, 35.512521360538358 ], [ -90.040991280244995, 35.542928360566677 ], [ -90.033140280237674, 35.552495360575584 ], [ -89.989674280197207, 35.561756360584212 ], [ -89.962360280171765, 35.532373360556846 ], [ -89.947634280158042, 35.526982360551827 ], [ -89.931261280142792, 35.529313360553999 ], [ -89.921747280133943, 35.546140360569666 ], [ -89.95811828016781, 35.578674360599962 ], [ -89.9571332801669, 35.603183360622793 ], [ -89.877526280092752, 35.633414360650946 ], [ -89.863922280080089, 35.629825360647601 ], [ -89.84928128006645, 35.645301360662017 ], [ -89.857330280073938, 35.671141360686079 ], [ -89.865265280081331, 35.673384360688175 ], [ -89.893487280107621, 35.656050360672026 ], [ -89.929827280141467, 35.676344360690926 ], [ -89.952121280162231, 35.712564360724656 ], [ -89.951121280161288, 35.734345360744946 ], [ -89.909868280122879, 35.754914360764104 ], [ -89.859955280076392, 35.748269360757917 ], [ -89.827124280045808, 35.758347360767303 ], [ -89.799986280020534, 35.774300360782156 ], [ -89.790464280011676, 35.805630360811335 ], [ -89.759877279983186, 35.817497360822387 ], [ -89.736019279960971, 35.807114360812719 ], [ -89.700908279928271, 35.827590360831785 ], [ -89.701518279928834, 35.84211336084531 ], [ -89.75779427998124, 35.871493360872677 ], [ -89.766355279989213, 35.884177360884486 ], [ -89.762990279986084, 35.896887360896329 ], [ -89.738056279962862, 35.915087360913276 ], [ -89.714763279941167, 35.911501360909938 ], [ -89.664728279894575, 35.885721360885924 ], [ -89.649416279880313, 35.894362360893972 ], [ -89.645479279876639, 35.913873360912149 ], [ -89.664271279894152, 35.937894360934514 ], [ -89.713215279939732, 35.966397360961061 ], [ -89.721836279947752, 35.999951360992313 ], [ -89.963291280172626, 35.99690836098948 ], [ -90.283554280470895, 35.991228360984181 ], [ -90.37906228055985, 35.989656360982721 ], [ -90.315339280500496, 36.091723361077783 ], [ -90.284851280472111, 36.115972361100361 ], [ -90.263801280452498, 36.118829361103025 ], [ -90.234939280425621, 36.137155361120094 ], [ -90.23232228042319, 36.161213361142501 ], [ -90.21932128041108, 36.17263136115313 ], [ -90.161405280357144, 36.197006361175831 ], [ -90.13131328032911, 36.212135361189922 ], [ -90.110012280309277, 36.258059361232696 ], [ -90.066187280268451, 36.272338361245986 ], [ -90.049845280253237, 36.30053636127225 ], [ -90.067729280269887, 36.325395361295406 ], [ -90.050295280253664, 36.362668361330115 ], [ -90.052157280255386, 36.382615361348698 ], [ -90.080272280281577, 36.397450361362509 ], [ -90.116925280315712, 36.404976361369521 ], [ -90.12392928032223, 36.422626361385952 ], [ -90.117322280316088, 36.453955361415133 ], [ -90.137372280334759, 36.457476361418415 ], [ -90.150259280346759, 36.491873361450445 ], [ -90.224473280415879, 36.492811361451317 ], [ -90.581732280748597, 36.491022361449652 ], [ -90.804434280956002, 36.48926536144802 ], [ -91.133956281262897, 36.488015361446855 ], [ -91.41179628152166, 36.491101361449729 ], [ -91.452989281560022, 36.490438361449108 ], [ -91.688560281779417, 36.491018361449648 ], [ -92.127642282188333, 36.491435361450044 ], [ -92.146319282205738, 36.491660361450251 ], [ -92.523050282556596, 36.490921361449566 ], [ -92.777635282793696, 36.489983361448687 ], [ -92.852275282863204, 36.489884361448595 ], [ -93.297324283277689, 36.490681361449333 ], [ -93.328346283306587, 36.490261361448944 ], [ -93.596449283556268, 36.489958361448664 ], [ -93.857520283799417, 36.489786361448509 ], [ -94.081052284007598, 36.491024361449661 ], [ -94.617257284506977, 36.489414361448155 ], [ -94.607453284497836, 36.478790361438264 ], [ -94.553113284447235, 36.164525361145579 ], [ -94.542417284437278, 36.106835361091854 ], [ -94.485935284384666, 35.760310360769125 ], [ -94.468485284368413, 35.641088360658088 ], [ -94.428552284331232, 35.40054636043407 ], [ -94.439322284341259, 34.929151359995046 ], [ -94.445961284347447, 34.735608359814798 ], [ -94.452624284353647, 34.508432359603226 ], [ -94.46169128436209, 34.196765359312963 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Louisiana", "DRAWSEQ": 48, "STATE_FIPS": "22", "SUB_REGION": "West South Central", "STATE_ABBR": "LA" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -93.707524283659723, 30.239578355627543 ], [ -93.715008283666691, 30.220513355609789 ], [ -93.70452528365692, 30.181068355573053 ], [ -93.6963312836493, 30.175884355568222 ], [ -93.699826283652556, 30.151017355545065 ], [ -93.683307283637163, 30.148440355542665 ], [ -93.686123283639787, 30.141461355536165 ], [ -93.6988032836516, 30.141434355536141 ], [ -93.697087283649992, 30.118139355514444 ], [ -93.708546283660667, 30.114950355511475 ], [ -93.716023283667639, 30.095878355493713 ], [ -93.712644283664488, 30.06073135546098 ], [ -93.760367283708931, 30.006176355410172 ], [ -93.791454283737878, 29.850520355265203 ], [ -93.899902283838884, 29.80998135522745 ], [ -93.801820283747531, 29.725865355149111 ], [ -93.721991283673191, 29.758793355179776 ], [ -93.233657283218392, 29.788993355207904 ], [ -92.607425282635177, 29.588626355021297 ], [ -92.297374282346411, 29.541571354977474 ], [ -92.059757282125119, 29.607014355038423 ], [ -92.19969828225544, 29.763120355183808 ], [ -92.130101282190623, 29.7735263551935 ], [ -92.137151282197195, 29.730741355153654 ], [ -91.973327282044622, 29.806057355223796 ], [ -91.967086282038807, 29.841888355257169 ], [ -91.827503281908818, 29.839041355254516 ], [ -91.823933281905482, 29.78689235520595 ], [ -91.846631281926619, 29.808397355225978 ], [ -91.881178281958796, 29.765955355186449 ], [ -91.863256281942114, 29.725839355149088 ], [ -91.615768281711624, 29.769138355189412 ], [ -91.643547281737483, 29.643964355072836 ], [ -91.548490281648967, 29.642129355071127 ], [ -91.547865281648384, 29.531686354968269 ], [ -91.433025281541418, 29.552582354987727 ], [ -91.262725281382828, 29.489587354929061 ], [ -91.213735281337193, 29.40592335485114 ], [ -91.102190281233305, 29.314134354765656 ], [ -91.078385281211141, 29.360018354808389 ], [ -90.936527281079023, 29.343517354793022 ], [ -90.897349281042537, 29.267664354722378 ], [ -90.818550280969149, 29.256802354712264 ], [ -90.814293280965188, 29.221006354678927 ], [ -90.920413281064015, 29.181909354642514 ], [ -90.882639281028844, 29.137412354601071 ], [ -90.839379280988553, 29.182340354642914 ], [ -90.772689280926443, 29.160625354622688 ], [ -90.782898280935953, 29.126943354591322 ], [ -90.676794280837129, 29.140277354603739 ], [ -90.683858280843708, 29.181920354642521 ], [ -90.638120280801118, 29.162571354624504 ], [ -90.650051280812221, 29.254292354709925 ], [ -90.621265280785408, 29.222965354680749 ], [ -90.583133280749905, 29.260928354716107 ], [ -90.611095280775942, 29.305036354757185 ], [ -90.476472280650569, 29.303941354756162 ], [ -90.450516280626388, 29.352442354801333 ], [ -90.406829280585711, 29.325991354776701 ], [ -90.396430280576027, 29.27234735472674 ], [ -90.347646280530583, 29.312951354764557 ], [ -90.284099280471409, 29.245534354701768 ], [ -90.278819280466493, 29.275158354729356 ], [ -90.242914280433041, 29.254741354710344 ], [ -90.263957280452644, 29.184649354645067 ], [ -90.227762280418943, 29.098674354564995 ], [ -90.077802280279272, 29.176442354637423 ], [ -90.043110280246964, 29.223676354681412 ], [ -90.07787828027935, 29.214574354672934 ], [ -90.111639280310783, 29.321725354772727 ], [ -90.033001280237556, 29.308872354760759 ], [ -90.055943280258916, 29.351431354800393 ], [ -90.029942280234707, 29.374208354821604 ], [ -90.055325280258344, 29.428283354871965 ], [ -90.036084280240416, 29.447157354889544 ], [ -90.174133280368991, 29.495941354934978 ], [ -90.208146280400669, 29.544730354980416 ], [ -90.151793280348187, 29.595307355027522 ], [ -90.137290280334682, 29.533811354970247 ], [ -90.11308128031213, 29.553848354988908 ], [ -90.006695280213052, 29.493936354933112 ], [ -89.971926280180668, 29.503541354942058 ], [ -89.966738280175832, 29.472678354913313 ], [ -89.81752728003687, 29.477625354917919 ], [ -89.821746280040799, 29.420912354865102 ], [ -89.753706279977436, 29.37428835482168 ], [ -89.794944280015841, 29.322540354773487 ], [ -89.610718279844264, 29.331758354782071 ], [ -89.61959227985254, 29.279575354733474 ], [ -89.493197279734815, 29.234995354691954 ], [ -89.459117279703079, 29.255736354711267 ], [ -89.46707327971049, 29.216321354674562 ], [ -89.393134279641629, 29.146265354609319 ], [ -89.388662279637458, 29.10037835456658 ], [ -89.339734279591895, 29.104495354570417 ], [ -89.319090279572663, 29.180188354640912 ], [ -89.263288279520694, 29.148212354611132 ], [ -89.394892279643273, 28.939655354416896 ], [ -89.257496279515308, 29.059463354528475 ], [ -89.241162279500088, 29.121169354585945 ], [ -89.144395279409977, 29.016678354488629 ], [ -89.154024279418934, 29.057217354526387 ], [ -89.111405279379241, 29.083017354550414 ], [ -89.126542279393348, 29.135309354599116 ], [ -89.057753279329276, 29.085278354552518 ], [ -89.021803279295796, 29.147118354610111 ], [ -89.098275279367016, 29.163443354625315 ], [ -89.033263279306468, 29.223413354681167 ], [ -89.120225279387469, 29.211884354670431 ], [ -89.129937279396501, 29.290887354744008 ], [ -89.193400279455616, 29.349047354798174 ], [ -89.262556279520012, 29.297809354750456 ], [ -89.264775279522084, 29.350663354799678 ], [ -89.337058279589399, 29.34089335479058 ], [ -89.384522279633615, 29.397938354843706 ], [ -89.53707627977569, 29.401453354846979 ], [ -89.544629279782725, 29.471685354912388 ], [ -89.771778279994265, 29.610246355041433 ], [ -89.723208279949034, 29.606027355037504 ], [ -89.748545279972632, 29.637378355066701 ], [ -89.728319279953794, 29.646176355074896 ], [ -89.635261279867123, 29.626531355056599 ], [ -89.695328279923075, 29.694079355119509 ], [ -89.676704279905721, 29.70296135512778 ], [ -89.597951279832373, 29.665157355092575 ], [ -89.47918927972178, 29.636171355065578 ], [ -89.511943279752273, 29.66461435509207 ], [ -89.611837279845318, 29.697747355122925 ], [ -89.592877279827647, 29.710864355135143 ], [ -89.650587279881407, 29.766901355187329 ], [ -89.540500279778868, 29.754731355175995 ], [ -89.482238279724612, 29.830948355246978 ], [ -89.417425279664258, 29.782937355202264 ], [ -89.364039279614531, 29.796774355215149 ], [ -89.42115527966773, 29.828098355244322 ], [ -89.402202279650069, 29.845945355260945 ], [ -89.431048279676943, 29.940277355348798 ], [ -89.37779327962734, 29.951286355359052 ], [ -89.453623279697965, 29.985733355391133 ], [ -89.435854279681408, 30.044405355445775 ], [ -89.574378279810432, 30.008960355412764 ], [ -89.585863279821126, 29.898157355309571 ], [ -89.627414279859821, 29.875679355288639 ], [ -89.712202279938779, 29.897527355308984 ], [ -89.715016279941409, 29.969403355375924 ], [ -89.820848280039968, 29.951290355359056 ], [ -89.848963280066158, 30.01068535541437 ], [ -89.716840279943099, 30.055226355455851 ], [ -89.649394279880283, 30.122426355518439 ], [ -89.669201279898729, 30.163382355556582 ], [ -89.724928279950632, 30.121095355517198 ], [ -89.740088279964752, 30.158928355552433 ], [ -89.798265280018938, 30.105371355502555 ], [ -89.891226280105514, 30.15609135554979 ], [ -89.990548280198013, 30.053664355454398 ], [ -90.111546280310705, 30.041610355443172 ], [ -90.275980280463841, 30.062053355462211 ], [ -90.395567280575222, 30.092080355490175 ], [ -90.424530280602198, 30.185877355577531 ], [ -90.309027280494618, 30.303846355687398 ], [ -90.239751280430099, 30.380951355759208 ], [ -90.075561280277185, 30.368978355748055 ], [ -89.943536280154234, 30.269853355655741 ], [ -89.759217279982565, 30.231093355619642 ], [ -89.728560279954024, 30.181013355573 ], [ -89.57388427980996, 30.194935355585969 ], [ -89.61000327984361, 30.241419355629258 ], [ -89.606310279840159, 30.247828355635228 ], [ -89.621661279854465, 30.256964355643738 ], [ -89.62594227985845, 30.290355355674834 ], [ -89.639172279870763, 30.295829355679931 ], [ -89.637082279868821, 30.311843355694847 ], [ -89.618588279851593, 30.323760355705943 ], [ -89.620198279853099, 30.343429355724261 ], [ -89.63345127986544, 30.355307355735327 ], [ -89.646689279877776, 30.35529035573531 ], [ -89.65467027988521, 30.379065355757451 ], [ -89.675369279904487, 30.400074355777019 ], [ -89.675462279904565, 30.445352355819185 ], [ -89.683450279912009, 30.46271835583536 ], [ -89.694598279922388, 30.468186355840452 ], [ -89.695681279923392, 30.478246355849819 ], [ -89.713184279939696, 30.481416355852772 ], [ -89.719059279945171, 30.496037355866392 ], [ -89.732319279957522, 30.497838355868069 ], [ -89.755178279978807, 30.515622355884631 ], [ -89.772796279995219, 30.551247355917809 ], [ -89.790848280012028, 30.553943355920318 ], [ -89.820307280039458, 30.624270355985814 ], [ -89.805536280025706, 30.649456356009274 ], [ -89.819354280038581, 30.651245356010939 ], [ -89.829524280048048, 30.67087435602922 ], [ -89.845447280062885, 30.666252356024913 ], [ -89.835392280053512, 30.675882356033885 ], [ -89.841785280059469, 30.679519356037272 ], [ -89.84134328005905, 30.700550356056858 ], [ -89.83072328004917, 30.703781356059867 ], [ -89.844052280061575, 30.712425356067918 ], [ -89.835614280053719, 30.729362356083691 ], [ -89.823399280042338, 30.733054356087131 ], [ -89.825566280044356, 30.742648356096062 ], [ -89.81335128003299, 30.748168356101203 ], [ -89.824689280043543, 30.789724356139907 ], [ -89.810933280030739, 30.811699356160375 ], [ -89.796567280017356, 30.812652356161259 ], [ -89.796094280016916, 30.829105356176584 ], [ -89.774800279997081, 30.830532356177912 ], [ -89.78502428000661, 30.861579356206828 ], [ -89.765851279988752, 30.862084356207298 ], [ -89.763311279986382, 30.900471356243049 ], [ -89.746800279971012, 30.902794356245213 ], [ -89.745755279970027, 30.910107356252023 ], [ -89.758054279981494, 30.92104335626221 ], [ -89.740475279965111, 30.926109356266927 ], [ -89.74854027997263, 30.949848356289035 ], [ -89.739522279964234, 30.965400356303519 ], [ -89.719823279945885, 30.975493356312917 ], [ -89.726781279952363, 30.984616356321414 ], [ -89.723623279949422, 31.001524356337164 ], [ -89.732717279957896, 31.007445356342679 ], [ -89.833558280051804, 31.007184356342435 ], [ -90.259377280448376, 31.007370356342605 ], [ -90.343660280526876, 31.005390356340762 ], [ -90.542653280712202, 31.002330356337914 ], [ -90.560255280728597, 31.00170635633733 ], [ -90.829714280979545, 31.001545356337182 ], [ -91.057012281191234, 31.000418356336134 ], [ -91.17920728130504, 31.000461356336171 ], [ -91.632297281727006, 31.001365356337011 ], [ -91.627773281722796, 31.011960356346883 ], [ -91.572787281671594, 31.032648356366149 ], [ -91.552081281652306, 31.058159356389908 ], [ -91.564975281664317, 31.082135356412238 ], [ -91.620114281715672, 31.127694356454668 ], [ -91.59148828168901, 31.178482356501966 ], [ -91.600964281697827, 31.21392935653498 ], [ -91.636998281731394, 31.241104356560289 ], [ -91.643682281737611, 31.271118356588239 ], [ -91.634214281728802, 31.277694356594367 ], [ -91.556919281656818, 31.270469356587636 ], [ -91.517078281619703, 31.28306935659937 ], [ -91.50247528160611, 31.298858356614076 ], [ -91.505756281609166, 31.323456356636985 ], [ -91.542790281643647, 31.346986356658899 ], [ -91.544407281645164, 31.368874356679285 ], [ -91.534573281636, 31.382750356692206 ], [ -91.559377281659096, 31.38823035669731 ], [ -91.56773128166688, 31.421406356728205 ], [ -91.552472281652669, 31.433099356739099 ], [ -91.534802281636217, 31.434335356740249 ], [ -91.534169281635627, 31.409238356716877 ], [ -91.523014281625237, 31.392091356700906 ], [ -91.494708281598875, 31.37524935668522 ], [ -91.48083828158596, 31.377780356687577 ], [ -91.465922281572063, 31.404069356712061 ], [ -91.473292281578921, 31.420374356727244 ], [ -91.507900281611157, 31.453083356757709 ], [ -91.506482281609834, 31.525687356825326 ], [ -91.502957281606555, 31.534880356833888 ], [ -91.464473281570719, 31.542866356841326 ], [ -91.423578281532627, 31.56274635685984 ], [ -91.40425228151463, 31.586353356881826 ], [ -91.415384281524993, 31.602592356896949 ], [ -91.497151281601148, 31.604358356898594 ], [ -91.508877281612072, 31.621946356914975 ], [ -91.507809281611074, 31.643870356935395 ], [ -91.49776928160172, 31.650895356941938 ], [ -91.457377281564106, 31.626966356919652 ], [ -91.408403281518488, 31.625530356918311 ], [ -91.38918428150059, 31.654605356945389 ], [ -91.387948281499447, 31.716682357003204 ], [ -91.365074281478144, 31.751741357035854 ], [ -91.370499281483191, 31.753475357037473 ], [ -91.339912281454701, 31.758542357042188 ], [ -91.282621281401347, 31.74988735703413 ], [ -91.263989281383999, 31.759763357043326 ], [ -91.262685281382787, 31.773927357056518 ], [ -91.33625728145131, 31.76362235704692 ], [ -91.367134281480062, 31.770867357053667 ], [ -91.347236281461534, 31.795832357076918 ], [ -91.334846281449984, 31.843478357121292 ], [ -91.303473281420764, 31.86314435713961 ], [ -91.292647281410694, 31.861492357138069 ], [ -91.276800281395936, 31.827533357106443 ], [ -91.250729281371648, 31.818821357098329 ], [ -91.241383281362943, 31.83538735711376 ], [ -91.264692281384654, 31.865586357141883 ], [ -91.244481281365836, 31.87867235715407 ], [ -91.201542281325843, 31.91444935718739 ], [ -91.163143281290075, 31.988448357256306 ], [ -91.108110281238822, 31.9919843572596 ], [ -91.072488281205651, 32.021213357286825 ], [ -91.073243281206359, 32.032150357297006 ], [ -91.086992281219153, 32.043811357307867 ], [ -91.143123281271428, 32.066259357328775 ], [ -91.145694281273833, 32.085828357346998 ], [ -91.125727281255237, 32.088399357349395 ], [ -91.089410281221404, 32.056998357320147 ], [ -91.065118281198792, 32.058707357321737 ], [ -91.07392228120699, 32.094148357354747 ], [ -91.041191281176495, 32.107823357367479 ], [ -91.011390281148749, 32.134213357392056 ], [ -91.003936281141804, 32.169413357424844 ], [ -91.024521281160972, 32.170050357425438 ], [ -91.054581281188973, 32.184683357439063 ], [ -91.045418281180432, 32.158824357414986 ], [ -91.054154281188573, 32.134544357392372 ], [ -91.083116281215553, 32.14873135740558 ], [ -91.108820281239488, 32.135143357392927 ], [ -91.15665028128403, 32.144935357402048 ], [ -91.166958281293631, 32.172141357427385 ], [ -91.1573752812847, 32.206014357458926 ], [ -91.116061281246232, 32.225755357477318 ], [ -91.100679281231905, 32.215036357467334 ], [ -91.08802228122012, 32.232537357483636 ], [ -91.062570281196415, 32.232892357483962 ], [ -91.04175628117703, 32.249588357499512 ], [ -90.977324281117021, 32.223554357475265 ], [ -90.971122281111249, 32.269214357517789 ], [ -90.983924281123166, 32.287280357534613 ], [ -90.980872281120327, 32.297800357544411 ], [ -90.971763281111848, 32.30384735755004 ], [ -90.929350281072345, 32.297553357544182 ], [ -90.916479281060361, 32.30546435755155 ], [ -90.875455281022141, 32.379795357620779 ], [ -90.885259281031281, 32.381500357622365 ], [ -90.915029281059006, 32.346043357589345 ], [ -90.984672281123864, 32.35654135759912 ], [ -90.998969281137178, 32.366378357608284 ], [ -91.009315281146812, 32.397227357637007 ], [ -90.970091281110285, 32.419160357657439 ], [ -90.965590281106088, 32.44017935767701 ], [ -90.987555281126546, 32.453106357689052 ], [ -91.027015281163301, 32.442559357679229 ], [ -91.058617281192724, 32.447140357683494 ], [ -91.117792281247844, 32.498709357731528 ], [ -91.118852281248834, 32.524206357755268 ], [ -91.088891281220924, 32.548775357778155 ], [ -91.037308281172884, 32.497095357730018 ], [ -91.019790281156574, 32.490954357724306 ], [ -90.992156281130832, 32.495421357728461 ], [ -90.99517728113365, 32.511782357743698 ], [ -91.063194281196999, 32.542298357772118 ], [ -91.073372281206474, 32.561749357790234 ], [ -91.058975281193071, 32.576526357803999 ], [ -91.03243228116834, 32.58280935780985 ], [ -90.998763281136988, 32.615603357840392 ], [ -90.99623728113464, 32.626112357850175 ], [ -91.007987281145574, 32.642808357865725 ], [ -91.027572281163813, 32.641637357864639 ], [ -91.047737281182592, 32.614489357839354 ], [ -91.06391928119767, 32.606524357831937 ], [ -91.111100281241605, 32.597663357823684 ], [ -91.146372281274452, 32.644986357867751 ], [ -91.139665281268208, 32.663308357884816 ], [ -91.059135281193207, 32.723650357941018 ], [ -91.09781728122924, 32.749528357965119 ], [ -91.136575281265337, 32.751256357966724 ], [ -91.156450281283838, 32.76281135797749 ], [ -91.142259281270626, 32.841342358050625 ], [ -91.079635281212305, 32.877290358084103 ], [ -91.075698281208645, 32.953838358155394 ], [ -91.092781281224546, 32.987746358186975 ], [ -91.111924281242381, 32.987475358186721 ], [ -91.132463281261508, 32.975348358175431 ], [ -91.130044281259259, 32.937591358140267 ], [ -91.137285281266003, 32.917912358121939 ], [ -91.169809281296281, 32.905148358110054 ], [ -91.198421281322936, 32.914288358118561 ], [ -91.209270281333033, 32.935978358138762 ], [ -91.161974281288991, 33.000418358198779 ], [ -91.162241281289241, 33.01316235821065 ], [ -91.254727281375366, 33.013601358211055 ], [ -91.427644281536416, 33.013545358211005 ], [ -91.454470281561399, 33.013999358211422 ], [ -92.063441282128551, 33.010151358207843 ], [ -92.717236282737446, 33.016839358214071 ], [ -92.978989282981217, 33.018274358215407 ], [ -93.232543283217353, 33.019375358216436 ], [ -93.479070283446958, 33.021528358218433 ], [ -93.511915283477549, 33.021287358218217 ], [ -93.809931283755091, 33.022729358219557 ], [ -94.038931283968367, 33.023422358220202 ], [ -94.041785283971024, 32.882485358088942 ], [ -94.04038228396972, 32.694957357914291 ], [ -94.035418283965086, 32.389381357629702 ], [ -94.034955283964663, 32.199609357452964 ], [ -94.035255283964943, 31.994679357262108 ], [ -94.010078283941496, 31.9893003572571 ], [ -94.004584283936381, 31.978108357246676 ], [ -93.977400283911066, 31.946327357217079 ], [ -93.970175283904325, 31.923332357195662 ], [ -93.935919283872423, 31.909624357182896 ], [ -93.918111283855836, 31.909870357183124 ], [ -93.923650283861008, 31.892762357167193 ], [ -93.899449283838464, 31.894623357168925 ], [ -93.892713283832194, 31.870234357146209 ], [ -93.881451283821704, 31.871588357147473 ], [ -93.877591283818106, 31.850282357127629 ], [ -93.865010283806384, 31.817442357097043 ], [ -93.834514283777992, 31.802187357082836 ], [ -93.822254283766569, 31.774808357057339 ], [ -93.831348283775043, 31.75345235703745 ], [ -93.810176283755325, 31.730524357016094 ], [ -93.815135283759943, 31.712523356999331 ], [ -93.808955283754187, 31.707738356994874 ], [ -93.792452283738811, 31.711568356998441 ], [ -93.812030283757053, 31.674740356964143 ], [ -93.806613283752, 31.65394135694477 ], [ -93.814914283759734, 31.648141356939369 ], [ -93.819774283764261, 31.618267356911549 ], [ -93.835765283779153, 31.615364356908845 ], [ -93.832805283776395, 31.590360356885558 ], [ -93.816508283761223, 31.577287356873384 ], [ -93.810702283755816, 31.559240356856577 ], [ -93.780313283727509, 31.53391335683299 ], [ -93.763489283711834, 31.530902356830182 ], [ -93.747727283697159, 31.537896356836697 ], [ -93.731842283682369, 31.522055356821944 ], [ -93.705977283658271, 31.520747356820728 ], [ -93.719176283670564, 31.495582356797289 ], [ -93.750618283699851, 31.490736356792777 ], [ -93.751427283700608, 31.485680356788066 ], [ -93.726966283677825, 31.459654356763828 ], [ -93.698599283651404, 31.461638356765675 ], [ -93.702108283654667, 31.446431356751514 ], [ -93.687185283640773, 31.438311356743952 ], [ -93.696310283649268, 31.42791735673427 ], [ -93.694623283647701, 31.416103356723269 ], [ -93.687673283641232, 31.406311356714149 ], [ -93.664196283619361, 31.398510356706886 ], [ -93.661251283616622, 31.372577356682733 ], [ -93.635035283592202, 31.374009356684063 ], [ -93.677219283631487, 31.328570356641748 ], [ -93.681766283635724, 31.312863356627119 ], [ -93.656306283612011, 31.286855356602899 ], [ -93.645770283602204, 31.290447356606244 ], [ -93.631006283588448, 31.274088356591008 ], [ -93.616632283575072, 31.275989356592778 ], [ -93.612054283570799, 31.270218356587403 ], [ -93.611176283569989, 31.242373356561469 ], [ -93.590721283550934, 31.229873356549827 ], [ -93.603096283562465, 31.199253356521311 ], [ -93.594116283554101, 31.180386356503739 ], [ -93.577117283538271, 31.172328356496237 ], [ -93.550764283513729, 31.191116356513731 ], [ -93.529096283493544, 31.185961356508933 ], [ -93.527105283491693, 31.178263356501763 ], [ -93.537191283501087, 31.176527356500145 ], [ -93.528501283492986, 31.16313035648767 ], [ -93.544363283507764, 31.159354356484151 ], [ -93.537679283501532, 31.132629356459262 ], [ -93.528264283492774, 31.126114356453193 ], [ -93.535260283499284, 31.116261356444021 ], [ -93.55685228351939, 31.109532356437754 ], [ -93.560156283522474, 31.100726356429551 ], [ -93.543294283506768, 31.094941356424165 ], [ -93.54427828350768, 31.082563356412635 ], [ -93.517170283482443, 31.074861356405464 ], [ -93.525913283490581, 31.057171356388984 ], [ -93.50738928347333, 31.039099356372155 ], [ -93.547291283510489, 31.014334356349092 ], [ -93.565114283527095, 31.018256356352744 ], [ -93.568067283529842, 31.013117356347959 ], [ -93.571019283532593, 30.997464356333381 ], [ -93.56112428352337, 30.991883356328181 ], [ -93.572629283534084, 30.976372356313739 ], [ -93.548848283511944, 30.970384356308159 ], [ -93.537510283501376, 30.957079356295768 ], [ -93.532360283496587, 30.960926356299353 ], [ -93.525791283490463, 30.93601435627615 ], [ -93.530155283494537, 30.927167356267912 ], [ -93.549794283512824, 30.925080356265966 ], [ -93.546689283509934, 30.905530356247759 ], [ -93.564649283526649, 30.902128356244592 ], [ -93.568670283530395, 30.886431356229973 ], [ -93.56101728352327, 30.872077356216607 ], [ -93.55297628351579, 30.860480356205805 ], [ -93.566618283528484, 30.845346356191712 ], [ -93.55581428351843, 30.842540356189097 ], [ -93.550855283513812, 30.828542356176058 ], [ -93.582045283542854, 30.802239356151563 ], [ -93.585348283545926, 30.772384356123759 ], [ -93.618629283576922, 30.745989356099177 ], [ -93.607825283566868, 30.732211356086346 ], [ -93.617965283576311, 30.732749356086845 ], [ -93.612585283571292, 30.710530356066151 ], [ -93.617781283576136, 30.687003356044244 ], [ -93.660163283615603, 30.673060356031257 ], [ -93.678145283632361, 30.639894356000369 ], [ -93.693053283646236, 30.640243356000692 ], [ -93.684759283638513, 30.623626355985216 ], [ -93.692869283646075, 30.615997355978109 ], [ -93.671758283626403, 30.598033355961384 ], [ -93.693594283646746, 30.599037355962317 ], [ -93.717985283669464, 30.587582355951646 ], [ -93.718054283669531, 30.56835535593374 ], [ -93.735479283685748, 30.545719355912659 ], [ -93.705632283657962, 30.523060355891559 ], [ -93.714810283666509, 30.505316355875031 ], [ -93.707447283659647, 30.496443355866766 ], [ -93.715023283666696, 30.488831355859681 ], [ -93.698146283650985, 30.470249355842373 ], [ -93.703593283656062, 30.462715355835357 ], [ -93.696741283649672, 30.44283535581684 ], [ -93.721705283672918, 30.433183355807852 ], [ -93.742731283692507, 30.409027355785355 ], [ -93.755113283704034, 30.38199335576018 ], [ -93.748002283697417, 30.367615355746786 ], [ -93.759507283708132, 30.354350355734432 ], [ -93.759347283707982, 30.341077355722071 ], [ -93.729941283680589, 30.305122355688589 ], [ -93.699377283652126, 30.297593355681574 ], [ -93.707524283659723, 30.239578355627543 ] ] ], [ [ [ -92.016367282084701, 29.596478355028609 ], [ -91.849089281928912, 29.487083354926728 ], [ -91.758113281844189, 29.494513354933648 ], [ -91.764964281850567, 29.534253354970659 ], [ -91.701616281791573, 29.577266355010718 ], [ -91.769847281855121, 29.578615355011976 ], [ -91.902549281978708, 29.650931355079322 ], [ -92.016367282084701, 29.596478355028609 ] ] ], [ [ [ -91.341319281456023, 29.341911354791527 ], [ -91.27616228139533, 29.254028354709678 ], [ -91.128307281257634, 29.226999354684509 ], [ -91.13469328126358, 29.259925354715172 ], [ -91.163663281290567, 29.245267354701518 ], [ -91.152592281280249, 29.266533354721325 ], [ -91.1950592813198, 29.273673354727975 ], [ -91.200460281324837, 29.307985354759928 ], [ -91.188024281313247, 29.284758354738301 ], [ -91.171224281297597, 29.283676354737292 ], [ -91.161564281288605, 29.323720354774586 ], [ -91.189275281314409, 29.297611354750266 ], [ -91.226553281349126, 29.381399354828304 ], [ -91.300493281417999, 29.31645735476782 ], [ -91.341319281456023, 29.341911354791527 ] ] ], [ [ [ -90.934574281077204, 29.259094354714399 ], [ -90.998953281137162, 29.323800354774662 ], [ -91.007369281145003, 29.297544354750208 ], [ -91.127513281256896, 29.293514354746453 ], [ -91.122561281252288, 29.227085354684586 ], [ -91.055557281189877, 29.190915354650901 ], [ -91.067689281201183, 29.253119354708833 ], [ -91.033104281168974, 29.275629354729794 ], [ -91.044448281179541, 29.211258354669845 ], [ -90.994566281133075, 29.22480235468246 ], [ -91.00324028114116, 29.184316354644757 ], [ -90.962025281102768, 29.185799354646136 ], [ -90.944981281086896, 29.226392354683941 ], [ -90.980382281119873, 29.219952354677943 ], [ -90.981382281120801, 29.276348354730466 ], [ -90.953625281094943, 29.273057354727399 ], [ -90.970846281110994, 29.242095354698566 ], [ -90.934574281077204, 29.259094354714399 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Florida", "DRAWSEQ": 49, "STATE_FIPS": "12", "SUB_REGION": "South Atlantic", "STATE_ABBR": "FL" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -80.785662271625299, 28.785194354273045 ], [ -81.097054271915297, 29.351799354800736 ], [ -81.109880271927253, 29.430239354873791 ], [ -81.233766272042629, 29.669024355096177 ], [ -81.243784272051954, 29.737943355160361 ], [ -81.316490272119665, 29.829240355245389 ], [ -81.302758272106885, 29.913052355323444 ], [ -81.432767272227963, 30.246781355634255 ], [ -81.443260272237737, 30.357187355737075 ], [ -81.480798272272693, 30.380540355758825 ], [ -81.457528272251025, 30.454764355827951 ], [ -81.51811727230745, 30.556212355922433 ], [ -81.498784272289441, 30.598605355961915 ], [ -81.528595272317204, 30.721452356076327 ], [ -81.536591272324657, 30.706577356062471 ], [ -81.601170272384792, 30.724887356079524 ], [ -81.604771272388149, 30.716321356071546 ], [ -81.62798127240977, 30.731774356085936 ], [ -81.642477272423264, 30.72908135608343 ], [ -81.716769272492456, 30.7453693560986 ], [ -81.736675272510993, 30.763888356115846 ], [ -81.757710272530588, 30.769631356121195 ], [ -81.776708272548277, 30.761584356113701 ], [ -81.803198272572956, 30.788085356138382 ], [ -81.873002272637962, 30.799084356148626 ], [ -81.899141272662305, 30.828308356175842 ], [ -81.907518272670103, 30.81347535616203 ], [ -81.943805272703898, 30.824249356172061 ], [ -81.953029272712484, 30.820431356168505 ], [ -81.961551272720428, 30.796007356145758 ], [ -81.981480272738992, 30.778351356129313 ], [ -82.015538272770712, 30.791319356141393 ], [ -82.012967272768307, 30.764256356116189 ], [ -82.031881272785924, 30.757532356109927 ], [ -82.044911272798061, 30.650910356010627 ], [ -82.013652272768951, 30.598690355961992 ], [ -82.005801272761644, 30.570990355936196 ], [ -82.022509272777199, 30.477717355849329 ], [ -82.035120272788944, 30.44287835581688 ], [ -82.046099272799168, 30.434068355808677 ], [ -82.038354272791949, 30.3789043557573 ], [ -82.052767272805383, 30.363794355743231 ], [ -82.164639272909568, 30.361291355740896 ], [ -82.180234272924096, 30.368631355747734 ], [ -82.20556527294768, 30.423853355799164 ], [ -82.199187272941742, 30.490014355860779 ], [ -82.21936727296054, 30.502970355872847 ], [ -82.238396272978264, 30.531444355899367 ], [ -82.221039272962088, 30.567076355932549 ], [ -82.412092273140033, 30.577307355942079 ], [ -82.463135273187561, 30.582689355947089 ], [ -82.582957273299158, 30.58905335595302 ], [ -82.696356273404774, 30.595720355959227 ], [ -83.1324402738109, 30.621341355983091 ], [ -83.301315273968186, 30.633285355994211 ], [ -83.310600273976831, 30.634303355995158 ], [ -83.609056274254783, 30.650784356010512 ], [ -83.737844274374723, 30.660491356019548 ], [ -84.000730274619556, 30.675537356033562 ], [ -84.075562274689247, 30.678577356036392 ], [ -84.281663274881197, 30.690419356047421 ], [ -84.374448274967619, 30.694092356050845 ], [ -84.863003275422614, 30.712664356068139 ], [ -84.864583275424081, 30.714503356069855 ], [ -84.888289275446169, 30.74388935609722 ], [ -84.915343275471358, 30.754089356106718 ], [ -84.926895275482124, 30.776088356127207 ], [ -84.932564275487394, 30.802625356151921 ], [ -84.926926275482145, 30.846922356193176 ], [ -84.937776275492254, 30.894957356237914 ], [ -84.969012275521351, 30.927093356267843 ], [ -84.973567275525582, 30.963664356301901 ], [ -85.000142275550331, 30.979319356316481 ], [ -85.001607275551706, 31.00125335633691 ], [ -85.485010276001901, 31.001001356336673 ], [ -85.48659727600338, 31.000998356336673 ], [ -86.031822276511164, 30.99332735632953 ], [ -86.181476276650542, 30.995225356331296 ], [ -86.38391927683908, 30.991538356327862 ], [ -86.701852277135174, 30.998092356333963 ], [ -86.779361277207357, 30.998191356334058 ], [ -87.163117277564766, 31.003157356338683 ], [ -87.598580277970314, 31.002630356338191 ], [ -87.589867277962199, 30.954361356293237 ], [ -87.625711277995592, 30.876902356221098 ], [ -87.61591527798646, 30.848296356194457 ], [ -87.541900277917534, 30.785695356136156 ], [ -87.526603277903291, 30.748491356101507 ], [ -87.46014027784139, 30.705802356061749 ], [ -87.418894277802977, 30.692810356049648 ], [ -87.398645277784112, 30.668015356026558 ], [ -87.393281277779124, 30.620098355981931 ], [ -87.422067277805922, 30.556493355922694 ], [ -87.445353277827621, 30.531389355899314 ], [ -87.418816277802904, 30.481700355853036 ], [ -87.347395277736382, 30.457169355830192 ], [ -87.346807277735834, 30.431498355806283 ], [ -87.409256277794, 30.402239355779034 ], [ -87.424080277807803, 30.323671355705862 ], [ -87.273897277667942, 30.35738435573726 ], [ -87.160102277561961, 30.465033355837516 ], [ -87.171555277572622, 30.557735355923853 ], [ -87.124533277528826, 30.564666355930306 ], [ -87.069272277477367, 30.450564355824042 ], [ -87.019580277431089, 30.587466355951541 ], [ -86.986193277399991, 30.5904303559543 ], [ -87.014400277426262, 30.514434355883523 ], [ -86.932511277349988, 30.463565355836149 ], [ -87.193382277592946, 30.355221355735246 ], [ -86.790347277217592, 30.417963355793677 ], [ -86.61023627704985, 30.423651355798974 ], [ -86.452639276903085, 30.501237355871233 ], [ -86.387879276842767, 30.462167355834847 ], [ -86.219608276686046, 30.487854355858769 ], [ -86.122934276596013, 30.426461355801592 ], [ -86.11464027658829, 30.385802355763726 ], [ -86.241566276706507, 30.428527355803517 ], [ -86.240033276705077, 30.399887355776844 ], [ -86.388108276842985, 30.406012355782547 ], [ -86.505314276952134, 30.409973355786235 ], [ -86.387459276842378, 30.387659355765457 ], [ -85.987013276469426, 30.274430355660002 ], [ -85.726393276226716, 30.128842355524412 ], [ -85.757919276256075, 30.22894535561764 ], [ -85.829942276323152, 30.232814355621244 ], [ -85.85042027634222, 30.280359355665524 ], [ -85.752708276251212, 30.296929355680959 ], [ -85.717131276218083, 30.265062355651278 ], [ -85.569475276080567, 30.311004355694067 ], [ -85.600176276109167, 30.251151355638321 ], [ -85.666058276170517, 30.251689355638824 ], [ -85.709829276211281, 30.178773355570915 ], [ -85.529716276043544, 30.131686355527062 ], [ -85.464316275982625, 30.051163355452069 ], [ -85.395672275918699, 30.058567355458962 ], [ -85.382656275906584, 30.036286355438214 ], [ -85.382694275906616, 30.024270355427021 ], [ -85.432386275952894, 30.045754355447031 ], [ -85.415013275936715, 30.031552355433803 ], [ -85.471358275989189, 30.021863355424781 ], [ -85.568528276079689, 30.098293355495962 ], [ -85.628497276135533, 30.092591355490654 ], [ -85.384792275908566, 29.923801355333453 ], [ -85.300524275830085, 29.809796355227277 ], [ -85.306589275835734, 29.701710355126615 ], [ -85.358043275883659, 29.691254355116875 ], [ -85.402546275925104, 29.794365355212907 ], [ -85.392994275916209, 29.875413355288387 ], [ -85.414052275935816, 29.86306735527689 ], [ -85.40960427593167, 29.776766355196514 ], [ -85.364879275890019, 29.683019355109209 ], [ -85.214760275750209, 29.701557355126475 ], [ -84.988283275539288, 29.719921355143576 ], [ -84.928513275483624, 29.77797235519764 ], [ -84.858030275417988, 29.746860355168664 ], [ -84.46453827505151, 29.92962735533888 ], [ -84.346911274941974, 29.910168355320756 ], [ -84.338938274934549, 29.947141355355193 ], [ -84.433104275022245, 29.959545355366743 ], [ -84.437690275026512, 29.991791355396774 ], [ -84.360416274954545, 29.977390355383363 ], [ -84.353925274948494, 30.069624355469262 ], [ -84.23307127483595, 30.108111355505105 ], [ -84.14785527475658, 30.081725355480533 ], [ -84.074625274688387, 30.099948355497503 ], [ -83.971738274592553, 30.077483355476581 ], [ -83.654182274296815, 29.910961355321497 ], [ -83.550448274200207, 29.737323355159781 ], [ -83.404974274064713, 29.669602355096714 ], [ -83.380031274041485, 29.519874354957267 ], [ -83.234328273905788, 29.43393735487723 ], [ -83.174633273850205, 29.343679354793174 ], [ -83.108995273789063, 29.32818235477874 ], [ -83.142206273819994, 29.299651354752168 ], [ -83.073928273756408, 29.265652354720505 ], [ -83.036747273721787, 29.179387354640163 ], [ -82.802157273503298, 29.155132354617574 ], [ -82.755322273459683, 29.008660354481162 ], [ -82.63661927334914, 28.884708354365721 ], [ -82.636519273349037, 28.814278354300129 ], [ -82.681380273390815, 28.80838235429464 ], [ -82.636075273348624, 28.692749354186947 ], [ -82.673476273383457, 28.428510353940858 ], [ -82.779144273481876, 28.173027353702921 ], [ -82.844285273542539, 27.850641353402672 ], [ -82.741003273446353, 27.685868353249216 ], [ -82.72816327343439, 27.717773353278929 ], [ -82.793838273495552, 27.829654353383127 ], [ -82.678326273387981, 27.705587353267582 ], [ -82.644619273356582, 27.715725353277023 ], [ -82.623653273337055, 27.848527353400705 ], [ -82.564264273281751, 27.878462353428581 ], [ -82.7254852734319, 27.94056235348642 ], [ -82.644741273356701, 27.966584353510655 ], [ -82.700666273408785, 27.97535335351882 ], [ -82.672719273382754, 28.010514353551564 ], [ -82.698339273406617, 28.046169353584773 ], [ -82.650684273362231, 28.007163353548446 ], [ -82.645565273357462, 28.02884735356864 ], [ -82.538995273258209, 27.935728353481917 ], [ -82.510598273231764, 27.831232353384596 ], [ -82.483131273206183, 27.82194735337595 ], [ -82.460998273185567, 27.940155353486041 ], [ -82.398817273127662, 27.906219353454432 ], [ -82.404379273132847, 27.791628353347711 ], [ -82.552500273270795, 27.644014353210238 ], [ -82.540041273259192, 27.608106353176794 ], [ -82.626376273339588, 27.555194353127519 ], [ -82.554262273272428, 27.582239353152705 ], [ -82.569605273286726, 27.552713353125206 ], [ -82.638767273351135, 27.536638353110234 ], [ -82.575571273292283, 27.512324353087592 ], [ -82.427177273154072, 27.522859353097402 ], [ -82.514199273235121, 27.51198935308728 ], [ -82.488267273210965, 27.478067353055685 ], [ -82.681706273391129, 27.524429353098867 ], [ -82.665829273376332, 27.49358735307014 ], [ -82.638889273351253, 27.503459353079336 ], [ -82.685925273395057, 27.473844353051753 ], [ -82.56556227328295, 27.386681352970577 ], [ -82.532740273252386, 27.331802352919468 ], [ -82.569957273287045, 27.274280352865894 ], [ -82.514483273235385, 27.210453352806454 ], [ -82.531131273250892, 27.260277352852853 ], [ -82.506930273228349, 27.236991352831168 ], [ -82.380036273110179, 26.947296352561366 ], [ -82.343628273076263, 26.903632352520702 ], [ -82.368668273099587, 26.947938352561966 ], [ -82.398171273127062, 26.998515352609068 ], [ -82.355431273087262, 26.948896352562855 ], [ -82.289840273026172, 26.849886352470648 ], [ -82.153828272899503, 26.790128352414992 ], [ -82.176495272920604, 26.913693352530071 ], [ -82.257582272996132, 26.9979073526085 ], [ -82.28217927301904, 27.024557352633323 ], [ -82.257459272996016, 27.004409352614559 ], [ -82.153210272898917, 26.937065352551841 ], [ -82.012688272768045, 26.97655035258861 ], [ -81.992851272749576, 27.031676352639952 ], [ -81.979194272736862, 27.031680352639956 ], [ -81.991440272748264, 26.963056352576046 ], [ -82.097872272847383, 26.921785352537608 ], [ -82.051767272804454, 26.866709352486314 ], [ -82.068271272819814, 26.766970352393425 ], [ -82.083660272834152, 26.71579035234576 ], [ -82.021473272776234, 26.524680352167778 ], [ -81.944452272704495, 26.550719352192026 ], [ -81.897102272660405, 26.66376735229731 ], [ -81.773914272545682, 26.710265352340613 ], [ -81.884276272648464, 26.642987352277956 ], [ -81.928773272689895, 26.534980352177367 ], [ -81.96811927272654, 26.517382352160979 ], [ -81.942018272702242, 26.46756235211458 ], [ -81.864212272629771, 26.439554352088496 ], [ -81.849351272615934, 26.332197351988512 ], [ -81.813858272582877, 26.284467351944059 ], [ -81.794717272565052, 26.111162351782657 ], [ -81.705695272482146, 26.000172351679289 ], [ -81.718293272493881, 25.923581351607957 ], [ -81.530742272319202, 25.914658351599648 ], [ -81.25620727206352, 25.803102351495752 ], [ -81.19994727201113, 25.710422351409438 ], [ -81.25837527206555, 25.681100351382131 ], [ -81.143323271958394, 25.396827351117381 ], [ -80.974281271800962, 25.322460351048122 ], [ -80.915274271746, 25.246725350977588 ], [ -80.95102727177931, 25.202537350936435 ], [ -81.011560271835677, 25.214429350947508 ], [ -81.140569271955826, 25.320765351046543 ], [ -81.183784271996075, 25.268879350998219 ], [ -81.148230271962959, 25.164690350901186 ], [ -81.119016271935749, 25.13418835087278 ], [ -80.975877271802446, 25.130501350869345 ], [ -80.856801271691552, 25.185631350920687 ], [ -80.693825271539765, 25.152299350889646 ], [ -80.551876271407565, 25.212318350945544 ], [ -80.420807271285497, 25.192219350926823 ], [ -80.416816271281775, 25.249902350980545 ], [ -80.301975271174825, 25.401200351121453 ], [ -80.329991271200925, 25.490015351204168 ], [ -80.301456271174345, 25.613751351319408 ], [ -80.193099271073422, 25.760032351455642 ], [ -80.127781271012594, 25.977536351658209 ], [ -80.084695270972475, 26.326377351983091 ], [ -80.050911270941, 26.797197352421577 ], [ -80.11461027100033, 26.973837352586088 ], [ -80.090363270977747, 26.974043352586278 ], [ -80.147967271031391, 27.10906935271203 ], [ -80.221273271099662, 27.202842352799365 ], [ -80.290420271164066, 27.212853352808686 ], [ -80.326791271197933, 27.248262352841664 ], [ -80.289635271163334, 27.241338352835214 ], [ -80.223989271102198, 27.215066352810748 ], [ -80.190091271070628, 27.185684352783383 ], [ -80.239638271116775, 27.264647352856926 ], [ -80.357378271226423, 27.55566235312795 ], [ -80.401377271267407, 27.703585353265716 ], [ -80.481853271342345, 27.845721353398091 ], [ -80.509358271367972, 27.825708353379454 ], [ -80.492244271352035, 27.870178353420869 ], [ -80.74719027158946, 28.398992353913364 ], [ -80.850705271685868, 28.785700354273516 ], [ -80.832104271668541, 28.786186354273966 ], [ -80.762415271603643, 28.736334354227537 ], [ -80.785662271625299, 28.785194354273045 ] ] ], [ [ [ -86.833882277258141, 30.399735355776702 ], [ -86.929123277346847, 30.381394355759621 ], [ -87.047641277457217, 30.369401355748451 ], [ -87.139349277542621, 30.351766355732025 ], [ -87.202140277601103, 30.334834355716261 ], [ -87.286089277679295, 30.339772355720857 ], [ -87.29032427768324, 30.332719355714289 ], [ -87.267046277661549, 30.321432355703777 ], [ -87.242348277638555, 30.321431355703776 ], [ -86.834584277258799, 30.387038355764879 ], [ -86.792964277220037, 30.39056535576816 ], [ -86.738641277169435, 30.40255835577933 ], [ -86.532643276977595, 30.393388355770789 ], [ -86.522770276968387, 30.401147355778015 ], [ -86.53475627697955, 30.406791355783273 ], [ -86.620825277059708, 30.414551355790501 ], [ -86.791553277218711, 30.403969355780646 ], [ -86.833882277258141, 30.399735355776702 ] ] ], [ [ [ -80.735833271578883, 28.788844354276442 ], [ -80.862438271696803, 28.991625354465299 ], [ -80.899098271730935, 29.061511354530381 ], [ -80.916287271746953, 29.071822354539986 ], [ -80.89107927172347, 29.013393354485572 ], [ -80.817180271654649, 28.895390354375671 ], [ -80.763330271604502, 28.822067354307386 ], [ -80.735833271578883, 28.788844354276442 ] ] ], [ [ [ -80.725899271569631, 28.784366354272272 ], [ -80.641197271490753, 28.657346354153976 ], [ -80.75406827159587, 28.736884354228053 ], [ -80.734995271578114, 28.706617354199864 ], [ -80.785930271625546, 28.68771635418226 ], [ -80.780445271620437, 28.618960354118226 ], [ -80.691881271537952, 28.588350354089719 ], [ -80.6600432715083, 28.618651354117937 ], [ -80.599129271451574, 28.60392235410422 ], [ -80.577446271431384, 28.548653354052746 ], [ -80.621630271472526, 28.412659353926095 ], [ -80.587656271440892, 28.409260353922928 ], [ -80.525948271383413, 28.463462353973405 ], [ -80.579689271433466, 28.590154354091396 ], [ -80.725899271569631, 28.784366354272272 ] ] ], [ [ [ -80.68862427153492, 28.581764354083585 ], [ -80.721043271565108, 28.385401353900708 ], [ -80.605571271457578, 28.144944353676763 ], [ -80.667110271514886, 28.301841353822887 ], [ -80.66273027151081, 28.42741035393983 ], [ -80.609193271460953, 28.57356635407595 ], [ -80.653794271502477, 28.600890354101395 ], [ -80.68862427153492, 28.581764354083585 ] ] ], [ [ [ -82.101941272851178, 26.586077352224954 ], [ -82.128652272876053, 26.693691352325178 ], [ -82.18331027292696, 26.683432352315624 ], [ -82.135709272882622, 26.642630352277624 ], [ -82.097456272846998, 26.49394235213915 ], [ -82.066953272818594, 26.497564352142522 ], [ -82.101941272851178, 26.586077352224954 ] ] ], [ [ [ -80.249453271125915, 25.35493735107837 ], [ -80.361601271230356, 25.296499351023943 ], [ -80.330297271201204, 25.267981350997381 ], [ -80.35306327122241, 25.211532350944811 ], [ -80.587819271441035, 24.956376350707178 ], [ -80.355665271224822, 25.158233350895173 ], [ -80.249453271125915, 25.35493735107837 ] ] ] ] } }, { "type": "Feature", "properties": { "STATE_NAME": "Michigan", "DRAWSEQ": 50, "STATE_FIPS": "26", "SUB_REGION": "East North Central", "STATE_ABBR": "MI" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -88.497527278807524, 48.17379537233009 ], [ -89.156099279420872, 47.939228372111629 ], [ -89.201787279463417, 47.883857372060064 ], [ -89.192916279455162, 47.844613372023517 ], [ -89.139885279405775, 47.824076372004384 ], [ -89.028622279302155, 47.850655372029138 ], [ -88.901547279183802, 47.960248372131204 ], [ -88.625327278926548, 48.033167372199117 ], [ -88.497527278807524, 48.17379537233009 ] ] ], [ [ [ -88.500681278810461, 47.290180371507155 ], [ -88.595632278898904, 47.243593371463767 ], [ -88.594262278897617, 47.134765371362413 ], [ -88.470664278782507, 47.111472371340724 ], [ -88.412843278728658, 46.988094371225813 ], [ -88.222279278551184, 47.200752371423874 ], [ -87.917042278266905, 47.358007371570324 ], [ -87.737510278099705, 47.393024371602934 ], [ -87.70438327806886, 47.415950371624291 ], [ -87.788120278146849, 47.470793371675363 ], [ -88.211392278541041, 47.44783537165398 ], [ -88.437901278751994, 47.355896371568363 ], [ -88.500681278810461, 47.290180371507155 ] ] ], [ [ [ -85.859844276350998, 45.969469370277146 ], [ -85.655381276160568, 45.972870370280319 ], [ -85.50954627602475, 46.101911370400494 ], [ -85.378243275902463, 46.100047370398755 ], [ -85.061629275607601, 46.02475137032863 ], [ -84.851100275411525, 45.89063637020373 ], [ -84.731732275300359, 45.855679370171174 ], [ -84.689022275260584, 46.035918370339033 ], [ -84.616845275193356, 46.038230370341182 ], [ -84.501635275086059, 45.978342370285411 ], [ -84.354485274949027, 45.999190370304831 ], [ -84.11327227472438, 45.978538370285591 ], [ -83.906460274531767, 45.960239370268553 ], [ -83.901952274527574, 46.005902370311077 ], [ -83.989501274609097, 46.025985370329778 ], [ -84.061981274676612, 46.094470370393566 ], [ -84.029578274646425, 46.128943370425674 ], [ -84.119735274730388, 46.176108370469592 ], [ -84.24703127484895, 46.171447370465259 ], [ -84.273134274873257, 46.207309370498649 ], [ -84.181646274788051, 46.248720370537221 ], [ -84.31161427490909, 46.48866937076069 ], [ -84.415967275006281, 46.480658370753233 ], [ -84.572667275152213, 46.407926370685487 ], [ -84.629815275205445, 46.482943370755358 ], [ -84.803653275367338, 46.444054370719144 ], [ -84.931320275486243, 46.487843370759919 ], [ -85.016639275565694, 46.476444370749306 ], [ -85.051655275598307, 46.505576370776438 ], [ -85.018975275567882, 46.549024370816902 ], [ -85.02697127557532, 46.694339370952235 ], [ -84.954759275508067, 46.770951371023585 ], [ -85.2300942757645, 46.756785371010395 ], [ -85.503850276019449, 46.674174370933457 ], [ -85.857536276348853, 46.694815370952682 ], [ -86.096739276571626, 46.655268370915849 ], [ -86.148109276619465, 46.673053370932408 ], [ -86.462392276912169, 46.561085370828138 ], [ -86.638220277075916, 46.422263370698843 ], [ -86.759495277188861, 46.486631370758793 ], [ -86.871382277293065, 46.444359370719425 ], [ -87.006402277418815, 46.536293370805041 ], [ -87.110679277515928, 46.501473370772615 ], [ -87.37153927775887, 46.507991370778683 ], [ -87.663766278031034, 46.836851371084961 ], [ -87.90065427825165, 46.909761371152868 ], [ -88.036685278378343, 46.911865371154818 ], [ -88.189188278520362, 46.900958371144668 ], [ -88.177827278509781, 46.945890371186508 ], [ -88.446617278760115, 46.799396371050079 ], [ -88.476523278787965, 46.855151371102004 ], [ -88.445964278759504, 46.928304371170128 ], [ -88.441164278755039, 46.990734371228271 ], [ -88.512995278821933, 47.032589371267257 ], [ -88.511215278820274, 47.106506371336096 ], [ -88.61810427891983, 47.131114371359018 ], [ -88.629500278930436, 47.225812371447205 ], [ -88.884832279168236, 47.104554371334274 ], [ -88.929688279210012, 47.030926371265707 ], [ -88.994875279270715, 46.997103371234203 ], [ -89.12518727939208, 46.996606371233739 ], [ -89.214592279475355, 46.923378371165541 ], [ -89.386718279635659, 46.850208371097395 ], [ -89.791244280012393, 46.824713371073656 ], [ -89.886252280100877, 46.768935371021712 ], [ -90.018864280224392, 46.678633370937604 ], [ -90.408200280586982, 46.568610370835145 ], [ -90.385525280565858, 46.539657370808172 ], [ -90.313708280498986, 46.551563370819267 ], [ -90.302393280488445, 46.544296370812496 ], [ -90.300181280486385, 46.525051370794571 ], [ -90.26978528045808, 46.522480370792181 ], [ -90.258401280447472, 46.508789370779425 ], [ -90.211526280403817, 46.50629537077711 ], [ -90.161391280357122, 46.442380370717579 ], [ -90.141797280338878, 46.393899370672429 ], [ -90.115177280314086, 46.36515537064566 ], [ -90.111659280310803, 46.34042937062263 ], [ -89.925136280137096, 46.304025370588732 ], [ -89.099806279368451, 46.145642370441223 ], [ -88.985301279261805, 46.10039137039908 ], [ -88.925195279205823, 46.073601370374128 ], [ -88.804397279093322, 46.026804370330545 ], [ -88.793815279083475, 46.036360370339445 ], [ -88.777480279068257, 46.032614370335956 ], [ -88.773017279064106, 46.021147370325281 ], [ -88.726409279020686, 46.029581370333133 ], [ -88.703605278999461, 46.018923370323208 ], [ -88.67738427897504, 46.020144370324346 ], [ -88.643669278943634, 45.993388370299428 ], [ -88.615502278917404, 45.994120370300109 ], [ -88.597536278900677, 46.015516370320029 ], [ -88.57535727888002, 46.008959370313924 ], [ -88.548358278854863, 46.019300370323556 ], [ -88.515613278824375, 46.018609370322913 ], [ -88.494083278804325, 46.012960370317657 ], [ -88.483814278794753, 45.999151370304787 ], [ -88.454319278767287, 46.000760370306288 ], [ -88.403522278719976, 45.983422370290143 ], [ -88.369938278688707, 45.994587370300536 ], [ -88.321323278643433, 45.966712370274578 ], [ -88.299152278622785, 45.961944370270139 ], [ -88.257168278583677, 45.967055370274899 ], [ -88.214992278544401, 45.947901370257057 ], [ -88.180194278511991, 45.953516370262292 ], [ -88.150438278484273, 45.936293370246247 ], [ -88.111390278447914, 45.926287370236935 ], [ -88.093850278431574, 45.920615370231644 ], [ -88.095764278433364, 45.891803370204812 ], [ -88.065421278405097, 45.873642370187902 ], [ -88.121786278457591, 45.834878370151799 ], [ -88.12994927846519, 45.819402370137382 ], [ -88.088734278426813, 45.791532370111426 ], [ -88.051639278392258, 45.78611237010638 ], [ -87.990070278334926, 45.795046370114704 ], [ -87.969179278315465, 45.766448370088071 ], [ -87.873629278226474, 45.750699370073406 ], [ -87.842362278197356, 45.722418370047066 ], [ -87.801553278159346, 45.711391370036793 ], [ -87.801156278158984, 45.701324370027422 ], [ -87.777473278136924, 45.684101370011376 ], [ -87.780945278140166, 45.67591537000375 ], [ -87.817054278173785, 45.665390369993951 ], [ -87.81993827817648, 45.654450369983763 ], [ -87.776045278135598, 45.613200369945346 ], [ -87.775075278134693, 45.600387369933415 ], [ -87.786312278145161, 45.568519369903733 ], [ -87.828602278184547, 45.5685913699038 ], [ -87.805141278162694, 45.544525369881384 ], [ -87.789385278148018, 45.499067369839054 ], [ -87.81361427817059, 45.466460369808686 ], [ -87.860267278214039, 45.445098369788788 ], [ -87.84953127820404, 45.406117369752486 ], [ -87.883610278235778, 45.365854369714988 ], [ -87.873974278226797, 45.36208536971148 ], [ -87.868535278221742, 45.372072369720783 ], [ -87.862096278215745, 45.370165369719004 ], [ -87.84128227819636, 45.346149369696633 ], [ -87.828008278183987, 45.358321369707973 ], [ -87.760038278120689, 45.352897369702916 ], [ -87.689598278055087, 45.391269369738652 ], [ -87.64368427801233, 45.361856369711262 ], [ -87.645362278013891, 45.348169369698518 ], [ -87.704471278068937, 45.27220536962777 ], [ -87.705142278069559, 45.247086369604375 ], [ -87.719668278083091, 45.23677136959477 ], [ -87.721628278084921, 45.211672369571396 ], [ -87.736200278098494, 45.199072369559659 ], [ -87.729669278092402, 45.176604369538737 ], [ -87.672814278039453, 45.140672369505268 ], [ -87.592514277964668, 45.108501369475306 ], [ -87.583864277956621, 45.162733369525817 ], [ -87.332227277722254, 45.423942369769087 ], [ -87.260707277655655, 45.554802369890957 ], [ -87.123759277528109, 45.696246370022692 ], [ -86.901624277321233, 45.714778370039951 ], [ -86.761469277190699, 45.826067370143591 ], [ -86.584735277026098, 45.813879370132241 ], [ -86.696919277130576, 45.692511370019211 ], [ -86.685053277119536, 45.650048369979665 ], [ -86.629784277068055, 45.621233369952826 ], [ -86.576124277018081, 45.710174370035659 ], [ -86.522010276967691, 45.724094370048626 ], [ -86.529390276974553, 45.748961370071783 ], [ -86.458275276908324, 45.762747370084625 ], [ -86.343795276801714, 45.834396370151353 ], [ -86.315638276775488, 45.90568237021774 ], [ -86.259319276723033, 45.946929370256157 ], [ -86.067891276544756, 45.964210370272255 ], [ -85.917104276404316, 45.918192370229391 ], [ -85.914955276402324, 45.957978370266446 ], [ -85.859844276350998, 45.969469370277146 ] ] ], [ [ [ -83.854680274483542, 46.014031370318648 ], [ -83.885891274512602, 45.970852370278436 ], [ -83.852810274481797, 45.997449370303201 ], [ -83.804881274437165, 45.936764370246692 ], [ -83.629705274274016, 45.95359637026236 ], [ -83.579813274227547, 45.917501370228749 ], [ -83.516159274168274, 45.925714370236399 ], [ -83.473189274128245, 45.987547370293981 ], [ -83.533991274184871, 46.011790370316561 ], [ -83.589498274236576, 46.088518370388016 ], [ -83.649887274292809, 46.103971370402412 ], [ -83.732448274369702, 46.084108370383916 ], [ -83.680314274321148, 46.071794370372444 ], [ -83.673592274314885, 46.036192370339293 ], [ -83.756420274392028, 46.027338370331037 ], [ -83.801105274433652, 45.988412370294789 ], [ -83.854680274483542, 46.014031370318648 ] ] ], [ [ [ -86.834829277259018, 41.765504366361895 ], [ -86.525181276970642, 41.765540366361932 ], [ -86.234565276699982, 41.764864366361309 ], [ -86.06830227654514, 41.76462836636108 ], [ -85.799227276294545, 41.763535366360067 ], [ -85.65945927616437, 41.762627366359219 ], [ -85.297209275827001, 41.763581366360114 ], [ -85.193140275730073, 41.762867366359444 ], [ -84.826008275388162, 41.761875366358524 ], [ -84.788478275353214, 41.760959366357667 ], [ -84.79037727535497, 41.697494366298557 ], [ -84.384393274976873, 41.707150366307552 ], [ -84.359208274953417, 41.708039366308384 ], [ -83.868639274496545, 41.715993366315786 ], [ -83.76395427439904, 41.717042366316761 ], [ -83.482691274137096, 41.725130366324294 ], [ -83.190066273864574, 42.033979366611938 ], [ -83.193873273868121, 42.115749366688092 ], [ -83.107588273787755, 42.292705366852893 ], [ -82.929389273621794, 42.363040366918398 ], [ -82.874907273571054, 42.458067367006905 ], [ -82.88813827358338, 42.495756367041999 ], [ -82.802361273503493, 42.612926367151118 ], [ -82.820407273520303, 42.635794367172423 ], [ -82.729806273435926, 42.681226367214734 ], [ -82.634015273346705, 42.669382367203703 ], [ -82.645877273357755, 42.631728367168634 ], [ -82.518179273238829, 42.634052367170796 ], [ -82.473238273196969, 42.762896367290793 ], [ -82.471952273195782, 42.898682367417251 ], [ -82.41983627314724, 42.972465367485967 ], [ -82.503820273225458, 43.172253367672042 ], [ -82.60573827332037, 43.694568368158485 ], [ -82.618487273332249, 43.787866368245375 ], [ -82.727902273434154, 43.972506368417328 ], [ -82.805978273506867, 44.033564368474195 ], [ -82.940154273631819, 44.069959368508094 ], [ -83.326026273991189, 43.940459368387486 ], [ -83.367163274029508, 43.844452368298072 ], [ -83.466408274121932, 43.745740368206143 ], [ -83.494248274147864, 43.70284136816619 ], [ -83.530909274182008, 43.7259433681877 ], [ -83.654615274297214, 43.607420368077314 ], [ -83.699164274338699, 43.599642368070079 ], [ -83.938121274561254, 43.698283368161938 ], [ -83.918376274542865, 43.916997368365635 ], [ -83.873615274501176, 43.962842368408332 ], [ -83.704802274343962, 43.997165368440292 ], [ -83.598404274244871, 44.070493368508593 ], [ -83.56823727421677, 44.170118368601372 ], [ -83.529150274180367, 44.261274368686266 ], [ -83.356963274020003, 44.335133368755052 ], [ -83.320036273985622, 44.515460368922994 ], [ -83.280812273949081, 44.703183369097829 ], [ -83.319724273985329, 44.860646369244478 ], [ -83.429355274087428, 44.926297369305615 ], [ -83.46490327412053, 44.997883369372289 ], [ -83.43397227409173, 45.011128369384622 ], [ -83.444441274101479, 45.052773369423406 ], [ -83.312707273978788, 45.098620369466104 ], [ -83.398695274058866, 45.213641369573224 ], [ -83.420761274079425, 45.25718236961378 ], [ -83.394019274054514, 45.272907369628427 ], [ -83.489598274143532, 45.328937369680602 ], [ -83.495832274149336, 45.360802369710285 ], [ -83.592363274239233, 45.349502369699763 ], [ -83.712318274350963, 45.412394369758331 ], [ -83.782809274416607, 45.409449369755592 ], [ -83.922892274547067, 45.491773369832259 ], [ -84.105907274717509, 45.498749369838755 ], [ -84.135229274744816, 45.571343369906359 ], [ -84.205560274810324, 45.630905369961837 ], [ -84.321458274918257, 45.665607369994156 ], [ -84.465275275052207, 45.653637369983002 ], [ -84.724186275293334, 45.780304370100978 ], [ -84.972038275524156, 45.737745370061333 ], [ -84.983412275534761, 45.68371337001102 ], [ -85.078019275622864, 45.630185369961168 ], [ -85.120447275662372, 45.569779369904907 ], [ -85.081815275626397, 45.464650369807003 ], [ -84.921674275477258, 45.409899369756005 ], [ -84.985893275537066, 45.373178369721813 ], [ -85.092862275636691, 45.370225369719059 ], [ -85.305475275834695, 45.320383369672641 ], [ -85.373253275897824, 45.273541369629015 ], [ -85.390244275913645, 45.211593369571318 ], [ -85.384869275908642, 45.010603369384135 ], [ -85.451351275970552, 44.860540369244376 ], [ -85.526081276040159, 44.76316236915369 ], [ -85.638039276144426, 44.778435369167909 ], [ -85.653006276158365, 44.958362369335482 ], [ -85.565514276076883, 45.18056036954242 ], [ -85.61021527611851, 45.196527369557288 ], [ -85.795756276291314, 44.985974369361202 ], [ -86.067454276544353, 44.898257369279506 ], [ -86.097964276572768, 44.85061236923513 ], [ -86.082918276558743, 44.777929369167438 ], [ -86.108484276582558, 44.734442369126938 ], [ -86.258627276722393, 44.700731369095543 ], [ -86.238038276703222, 44.522273368929341 ], [ -86.271954276734803, 44.351228368770045 ], [ -86.386423276841413, 44.183204368613559 ], [ -86.518602276964515, 44.053619368492875 ], [ -86.43814727688958, 43.945592368392269 ], [ -86.459548276909516, 43.950184368396542 ], [ -86.428814276880885, 43.820123368275418 ], [ -86.434101276885812, 43.781458368239399 ], [ -86.404345276858095, 43.766642368225604 ], [ -86.447811276898577, 43.772665368231216 ], [ -86.541301276985649, 43.663187368129257 ], [ -86.463201276912912, 43.475166367954145 ], [ -86.273837276736558, 43.121045367624347 ], [ -86.21785427668442, 42.774825367301901 ], [ -86.284980276746936, 42.422324366973612 ], [ -86.374278276830097, 42.249421366812584 ], [ -86.498833276946101, 42.126446366698055 ], [ -86.617592277056701, 41.907448366494094 ], [ -86.834829277259018, 41.765504366361895 ] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multiline_write_test.json0000664000175000017500000000124113701057752026750 0ustar eveneven{ "type": "FeatureCollection", "name": "streams", "features": [ { "type": "Feature", "properties": { "NAMES": "fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 1.0, -5.0 ] ], [ [ 2.0, -4.0 ], [ 3.0, -3.0 ], [ 4.0, -2.0 ], [ 5.0 , -1.0 ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "not_so_fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ -2.0, 5.0 ], [ -3.0, 4.0 ], [ -4.0, 3.0 ], [ -5.0, 2.0 ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "not_fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 0.0, 1.0 ], [ 1.0, 0.0 ] ], [ [ 2.0, 0.0 ], [ -2.0, 0.0 ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multipoint3D_write_test.json0000664000175000017500000000062613701057752027347 0ustar eveneven{ "type": "FeatureCollection", "name": "drilling_sites", "features": [ { "type": "Feature", "properties": { "NAMES": "site1" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 0.0, -1.0, -5.0 ], [ 2.0, -2.0, 2.0 ] ] } }, { "type": "Feature", "properties": { "NAMES": "site2" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 7.0, -2.0, 1.0 ], [ 4.0, 3.0, 2.0 ], [ 8.0, -8.0, 3.0 ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multiline3D_write_test.json0000664000175000017500000000100613701057752027136 0ustar eveneven{ "type": "FeatureCollection", "name": "streams", "features": [ { "type": "Feature", "properties": { "NAMES": "fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 1.0, -5.0, 10.0] ], [ [ 2.0, -4.0, 9.0 ], [ 3.0, -3.0, 8.0 ], [ 4.0, -2.0, 7.0 ], [ 5.0 , -1.0, 8.0 ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "not_fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 0.0, 1.0, 1.0], [ 1.0, 0.0, 2.0 ] ], [ [ 2.0, 0.0, 1.0 ], [ -2.0, 0.0, 1.0 ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/empty_mline_write_test.json0000664000175000017500000000052613701057752027275 0ustar eveneven{ "type": "FeatureCollection", "name": "places", "features": [ { "type": "Feature", "properties": { "NAMES": "Somewhere" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [0, 5], [2, 0] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Everywhere" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/field_test_nc3.nc0000664000175000017500000000336413701057752025021 0ustar evenevenCDF recordNAMES_max_width  ConventionsCF-1.6GDAL3GDAL 3.1.0dev-6247e3cfae-dirty, released 2019/07/25historyCThu Jul 25 20:39:51 2019: GDAL Create( write_test_nc3_WKT.nc, ... )ogr_layer_namenames_geometry featureTypepoint lon  standard_name longitude long_name longitudeunits degrees_eastlat  standard_namelatitude long_namelatitudeunits degrees_northNAMES  long_name Field NAMESogr_field_nameNAMESogr_field_typeStringogr_field_width coordinateslon latIDS  long_name Field IDSogr_field_nameIDSogr_field_typeInteger coordinateslon latNUM_1  long_name Field NUM_1ogr_field_nameNUM_1ogr_field_typeInteger(Int16) coordinateslon latNUM_2  long_name Field NUM_2ogr_field_nameNUM_2ogr_field_typeInteger coordinateslon latFL  long_nameField FLogr_field_nameFLogr_field_type Real(Float32) coordinateslon latDBL  long_name Field DBLogr_field_nameDBLogr_field_typeReal coordinateslon lat?Guage_1?@Xgdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/empty_polygon_write_test.json0000664000175000017500000000054513701057752027661 0ustar eveneven{ "type": "FeatureCollection", "name": "places", "features": [ { "type": "Feature", "properties": { "NAMES": "Somewhere" }, "geometry": { "type": "Polygon", "coordinates": [ [ [0.0, 1.0], [1.0, 0.0], [2.0, 0.0], [0.0, 1.0]] ] } }, { "type": "Feature", "properties": { "NAMES": "Everywhere" }, "geometry": { "type": "Polygon", "coordinates": [ [ ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/polygon3D_write_test.json0000664000175000017500000000142213701057752026625 0ustar eveneven{ "type": "FeatureCollection", "name": "shapes", "features": [ { "type": "Feature", "properties": { "NAMES": "Trianglything" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, -1.0 ], [ 1.0, 1.0, -2.0 ], [ 0.0, 0.0, -3.0 ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Prismthing" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0, 0.0 ], [ 4.0, 0.0, 0.0 ], [ 4.0, 1.0, 1.0 ], [ 3.0, 1.0, 1.0 ], [ 3.0, 0.0, 0.0] ], [ [3.5, 0.25, 1.0], [3.75, 0.25, 1.0], [3.75, 0.5, 1.0], [3.5, 0.5, 1.0], [3.5, 0.25, 1.0] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Trianglyflipped" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0, 0.0 ], [ -1.0, 0.0, 1.0 ], [ -1.0, -1.0, 2.0 ], [ 0.0, 0.0, 3.0 ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multipoint_write_test.json0000664000175000017500000000105513701057752027155 0ustar eveneven{ "type": "FeatureCollection", "name": "peak_list", "features": [ { "type": "Feature", "properties": { "NAMES": "Peaks1" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 1.0, -1.0 ], [ 2.0, -2.0 ], [ 4.0, -4.0 ] ] } }, { "type": "Feature", "properties": { "NAMES": "Peaks2" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 5.0, -5.0 ], [ 6.0, -6.0 ], [ 8.0, -8.0 ] ] } }, { "type": "Feature", "properties": { "NAMES": "Peaks3" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 9.0, -9.0 ], [ 10.0, -10.0 ], [ -2.0, 2.0 ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/polygon3D_no_ir_write_test.json0000664000175000017500000000071513701057752030017 0ustar eveneven{ "type": "FeatureCollection", "name": "noir_write", "features": [ { "type": "Feature", "properties": { "ID": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 2.0 ], [ 1.0, 1.0, 0.0 ], [ 0.0, 0.0, 2.0 ] ] ] } }, { "type": "Feature", "properties": { "ID": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0, -1.0 ], [ 4.0, 0.0, -2.0 ], [ 4.0, 1.0, 0.0 ], [ 3.0, 1.0, -2.0 ], [ 3.0, 0.0, -1.0 ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/line3D_write_test.json0000664000175000017500000000106613701057752026071 0ustar eveneven{ "type": "FeatureCollection", "name": "path", "features": [ { "type": "Feature", "properties": { "NAMES": "path1" }, "geometry": { "type": "LineString", "coordinates": [ [ 0.1, 0.2, 0.3 ], [99.0, -99.0, 0.0 ] ] } }, { "type": "Feature", "properties": { "NAMES": "path2" }, "geometry": { "type": "LineString", "coordinates": [ [ 100.0, 101.0, 102.0 ], [ 25.0, 27.0, 29.0 ] ] } }, { "type": "Feature", "properties": { "NAMES": "path3" }, "geometry": { "type": "LineString", "coordinates": [ [ 7.0, -11.0, -7.0 ], [ -11.0, 7, 11.0 ], [ -6.0, 1945.0, 1918.0] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/Yahara_alb.json0000664000175000017500000203350713701057752024534 0ustar eveneven{ "type": "FeatureCollection", "name": "geometry_container", "features": [ { "type": "Feature", "properties": { "ID": 1.0, "GRIDCODE": 55.0, "X_COORD": 577251.43302, "Y_COORD": 319799.04917999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540729.114031361299567, 2278825.903662639670074 ], [ 540465.539337518974207, 2279088.945257814601064 ], [ 540306.275639685918577, 2279116.079583582468331 ], [ 540107.050839665578678, 2279266.802528467960656 ], [ 539984.032751836581156, 2279437.613289109431207 ], [ 539847.513822817010805, 2279546.21896755695343 ], [ 539793.466132216504775, 2279690.280187537893653 ], [ 539593.864095512428321, 2280063.383799242787063 ], [ 539159.642411884269677, 2280408.803154149092734 ], [ 539075.288505668984726, 2280398.445968925952911 ], [ 538978.497999149607494, 2280398.258675289340317 ], [ 538875.070726773585193, 2280353.339933413080871 ], [ 538797.810882403166033, 2280254.236503818072379 ], [ 538804.160193370073102, 2280202.096523566171527 ], [ 538804.343318731174804, 2280146.275692869909108 ], [ 538569.216284305672161, 2279976.825279451906681 ], [ 538417.789918233873323, 2280048.078379028476775 ], [ 538229.07194823899772, 2280164.367257128469646 ], [ 537959.979884813772514, 2280183.82448982540518 ], [ 537809.498636104632169, 2280392.747808042913675 ], [ 537695.663924788590521, 2280450.48636925034225 ], [ 537628.253862441168167, 2280711.024955438449979 ], [ 537571.355272909859195, 2280759.74930630531162 ], [ 537570.074476078734733, 2280790.17727299593389 ], [ 537563.840146986418404, 2280865.628906451165676 ], [ 537673.161966153769754, 2280927.885713559575379 ], [ 537698.097749472246505, 2281182.591215267777443 ], [ 537812.083476227824576, 2281227.955818586051464 ], [ 537897.117103579686955, 2281294.278721127659082 ], [ 538074.995012271450832, 2281334.993498629890382 ], [ 538040.559907439397648, 2281393.240352897904813 ], [ 538001.934961388004012, 2281542.527456944808364 ], [ 537949.2023824385833, 2281706.723446036688983 ], [ 537988.209524605306797, 2281753.190907944925129 ], [ 538057.525308644748293, 2281792.663631917908788 ], [ 538101.28115314070601, 2282239.521372462622821 ], [ 538219.839116290677339, 2282310.878079128451645 ], [ 538318.355725847999565, 2282226.955322217196226 ], [ 538405.949780868017115, 2282145.657072235830128 ], [ 538683.538259192020632, 2282128.782158916816115 ], [ 538744.564270281116478, 2282072.141277142800391 ], [ 538864.29141910886392, 2282109.192757751792669 ], [ 538921.418625309830531, 2282143.574523261748254 ], [ 539053.941586727974936, 2282149.069912345148623 ], [ 539192.829335766145959, 2282257.388103349134326 ], [ 539411.490286497399211, 2282381.896984350867569 ], [ 539443.553888793918304, 2282417.126802260056138 ], [ 539538.328017142484896, 2282604.037059972062707 ], [ 539695.306039038579911, 2282617.039857057854533 ], [ 539806.854833037592471, 2282552.76557734515518 ], [ 539951.560363066149876, 2282418.453236547298729 ], [ 540040.657256422680803, 2282425.832642260938883 ], [ 540136.585126404534094, 2282296.447492673061788 ], [ 540246.519671455491334, 2282247.666291472502053 ], [ 540468.80664305749815, 2282300.323815384879708 ], [ 540471.360748827341013, 2282239.536829075776041 ], [ 540475.920837825746275, 2282184.311215766705573 ], [ 540453.420423899311572, 2282056.823036688379943 ], [ 540401.083774878294207, 2281936.262188354507089 ], [ 540468.194841546472162, 2281760.072846352122724 ], [ 540503.247251000371762, 2281727.536852843128145 ], [ 540567.5490758883534, 2281700.840960436500609 ], [ 540643.656653627636842, 2281630.196047538891435 ], [ 540692.016461709397845, 2281588.780763095244765 ], [ 540735.754247524077073, 2281548.181270406581461 ], [ 541025.50922852975782, 2281518.839288685470819 ], [ 541069.304844888509251, 2281478.185907636769116 ], [ 541365.546236690599471, 2281574.80515934061259 ], [ 541646.662088033510372, 2281586.448937964625657 ], [ 541707.345882314490154, 2281621.000195723026991 ], [ 541796.783252674620599, 2281690.74655201099813 ], [ 541908.49635468935594, 2281754.352648766711354 ], [ 542021.879373826785013, 2281842.773320784792304 ], [ 542139.454210594878532, 2281889.554062229581177 ], [ 542273.359917956870049, 2281970.135273218154907 ], [ 542346.23823220282793, 2281902.484443614259362 ], [ 542778.086127310874872, 2281896.488857131451368 ], [ 542864.794648274197243, 2281783.192064922302961 ], [ 542867.845811810577288, 2281710.565362541936338 ], [ 543073.347021538531408, 2281619.361826555803418 ], [ 543195.389480746933259, 2281585.477843347005546 ], [ 543323.313940384774469, 2281685.23102820198983 ], [ 543476.165176086127758, 2281554.310462190769613 ], [ 543483.982023740652949, 2281459.613755960948765 ], [ 543487.787661682581529, 2281368.921378454193473 ], [ 543523.197144597885199, 2281309.008769144304097 ], [ 543599.692273982916959, 2281013.241753823123872 ], [ 543670.247339842491783, 2280841.058428604155779 ], [ 543643.204705964308232, 2280804.424014035612345 ], [ 543414.457652058568783, 2280732.819150514900684 ], [ 543350.130358268273994, 2280696.193495475687087 ], [ 543271.209482745965943, 2280602.195426194928586 ], [ 543208.593221873510629, 2280566.543866291642189 ], [ 543130.400360419065692, 2280519.488740855827928 ], [ 543055.855338037479669, 2280616.895444557070732 ], [ 543022.694151530857198, 2280676.183955175802112 ], [ 542853.961255042813718, 2280544.599837501533329 ], [ 542737.231011793250218, 2280534.937709691934288 ], [ 542670.252660844358616, 2280562.748623479157686 ], [ 542550.789961772970855, 2280615.76833257265389 ], [ 542472.236032339395024, 2280572.933989900164306 ], [ 542435.515416920068674, 2280488.350212316028774 ], [ 542411.917589952936396, 2280395.443174899555743 ], [ 542237.623901518294588, 2280443.830740482546389 ], [ 542111.198429084033705, 2280438.595698653720319 ], [ 542022.615640268893912, 2280401.682023418135941 ], [ 541845.020504280924797, 2280361.045275613665581 ], [ 541698.499713631579652, 2280321.12715801037848 ], [ 541341.880720151471905, 2280266.654701249673963 ], [ 541258.719886689912528, 2280175.28070570807904 ], [ 541214.164704288356006, 2279999.858460005372763 ], [ 541044.18468881980516, 2279767.397460158914328 ], [ 541051.581619441276416, 2279677.812024758197367 ], [ 540981.437933069304563, 2279418.934464072808623 ], [ 541046.289342051139101, 2279253.238854143768549 ], [ 541108.244805257185362, 2279148.420033360831439 ], [ 541025.818147368263453, 2279101.483770033344626 ], [ 540729.114031361299567, 2278825.903662639670074 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 2.0, "GRIDCODE": 53.0, "X_COORD": 574349.3624, "Y_COORD": 314176.67263 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 538142.844186850008555, 2271835.52856208384037 ], [ 537844.826950251124799, 2271816.999428656883538 ], [ 537827.896732847089879, 2271862.129492021165788 ], [ 537718.739928211900406, 2271948.976724430918694 ], [ 537717.762251224019565, 2272243.274628666229546 ], [ 537623.678965776460245, 2272362.714860095642507 ], [ 537567.252802462899126, 2272566.053503924049437 ], [ 537566.798539157491177, 2272702.86366462148726 ], [ 537473.57425080856774, 2272746.738807721994817 ], [ 537410.521555851912126, 2272771.338471239432693 ], [ 537350.304646394215524, 2272831.436631485819817 ], [ 537205.304867522092536, 2272946.798559178598225 ], [ 537151.539474733290263, 2273033.365586793981493 ], [ 537150.964793764054775, 2273205.5437165889889 ], [ 537105.044456527219154, 2273242.07723718136549 ], [ 537104.55722569511272, 2273388.484701913781464 ], [ 537038.655164552736096, 2273494.591650320217013 ], [ 537031.39279339229688, 2273554.224666475318372 ], [ 537058.796470185625367, 2273668.977203969843686 ], [ 537145.020463564083911, 2273856.326328198425472 ], [ 537081.340923611540347, 2273958.853129472583532 ], [ 537033.363443348673172, 2274049.081207347102463 ], [ 536964.671570513164625, 2274136.280617797747254 ], [ 536964.400135958800092, 2274217.663836292922497 ], [ 536875.169948510592803, 2274385.466953579336405 ], [ 536677.583615241455846, 2274448.379090267233551 ], [ 536677.228500948869623, 2274554.939674128778279 ], [ 536657.774780779378489, 2274714.649261302314699 ], [ 536696.857733897282742, 2274799.570313911885023 ], [ 536654.853222532197833, 2274841.490414025261998 ], [ 536621.601461188984104, 2274867.941882934421301 ], [ 536583.984810118097812, 2275018.403431090526283 ], [ 536497.549076019087806, 2275052.123270129784942 ], [ 536357.519008085364476, 2275374.86325338948518 ], [ 536110.34754017717205, 2275416.959315190091729 ], [ 536140.151205322123133, 2275583.948754976503551 ], [ 536306.341963621438481, 2275634.076509073376656 ], [ 536293.454282766440883, 2275739.870298217050731 ], [ 536293.10225986270234, 2275845.617275767028332 ], [ 536288.98698299995158, 2275879.400835085660219 ], [ 536347.082481286721304, 2275938.78328122664243 ], [ 536373.48095252062194, 2276008.020829362794757 ], [ 536458.963543717865832, 2276095.39812149759382 ], [ 536441.422613433911465, 2276239.393528020009398 ], [ 536473.672705876757391, 2276280.771789160557091 ], [ 536651.602073190268129, 2276348.651036092080176 ], [ 536611.436170818400569, 2276469.265076688490808 ], [ 536611.033559117582627, 2276590.657632010988891 ], [ 536585.511819648323581, 2276800.191756662912667 ], [ 536731.779666032991372, 2276844.306275607086718 ], [ 536760.228865875164047, 2276963.416061662137508 ], [ 536788.062669194652699, 2277023.884473896585405 ], [ 536831.812272248091176, 2277138.621384393423796 ], [ 537121.551463625393808, 2277202.869972344487906 ], [ 537295.799533365759999, 2277659.832723293453455 ], [ 537318.58848454861436, 2277632.731438625603914 ], [ 537362.958977211033925, 2277549.293688124977052 ], [ 537561.351596475462429, 2277519.222308812662959 ], [ 537824.150163725251332, 2277619.468919583596289 ], [ 537855.445537231396884, 2277750.473507470451295 ], [ 538158.822935484466143, 2277855.557854663580656 ], [ 538251.295113356783986, 2277950.067861166782677 ], [ 538282.607321983901784, 2278032.17400589864701 ], [ 538459.716508630197495, 2278032.518399214372039 ], [ 538621.552544561214745, 2278052.393080580048263 ], [ 538728.881289957440458, 2278020.879729741252959 ], [ 538910.133046939503402, 2277976.478798420168459 ], [ 538928.086638625711203, 2277958.5631372500211 ], [ 538947.012717022444122, 2277915.131738683208823 ], [ 538945.441933156340383, 2277823.658339282497764 ], [ 538958.252174089197069, 2277733.798696959391236 ], [ 538956.016859521856532, 2277603.545802986249328 ], [ 539034.947349875350483, 2277422.408503639511764 ], [ 538884.468578904983588, 2277313.57466889731586 ], [ 538902.598672534106299, 2277186.403179890476167 ], [ 538902.080317040090449, 2277156.152094800025225 ], [ 538921.819485184154473, 2277017.692829421721399 ], [ 538834.249381885398179, 2276874.828537983819842 ], [ 538833.009436520165764, 2276802.614212169311941 ], [ 538900.353007671423256, 2276619.220097322016954 ], [ 539147.526013024267741, 2276447.527057115919888 ], [ 539262.94493709912058, 2276420.119705217890441 ], [ 539370.135810954263434, 2276368.198250980116427 ], [ 539523.872395098791458, 2276310.094925788231194 ], [ 539592.091341474326327, 2276202.922055061906576 ], [ 539636.697305609588511, 2275931.470590312965214 ], [ 539788.997759449994192, 2275834.840412984602153 ], [ 539826.771084584877826, 2275761.963074113242328 ], [ 539894.080163404694758, 2275677.734624445438385 ], [ 539912.632067149272189, 2275602.214025088585913 ], [ 539932.552906213793904, 2275496.011830451898277 ], [ 539995.428879212005995, 2275401.946709088049829 ], [ 540022.31478455697652, 2275258.06829425226897 ], [ 539920.496659127762541, 2275062.123351487331092 ], [ 539787.163373789866455, 2274995.318598924204707 ], [ 539705.126746188383549, 2274877.484937247820199 ], [ 539468.691998716094531, 2274832.569100754335523 ], [ 539358.742801635758951, 2274674.641123194247484 ], [ 538967.818683558376506, 2274623.34097252972424 ], [ 539036.01418608718086, 2274521.319809568114579 ], [ 539109.065760231344029, 2274360.265442534349859 ], [ 539141.407473025145009, 2274268.272235313430429 ], [ 539203.472284341114573, 2274131.436075547710061 ], [ 539072.106809902354144, 2274010.940621584653854 ], [ 539039.901288598426618, 2273862.474639217369258 ], [ 538874.912135608494282, 2273872.868807881139219 ], [ 538725.790406423388049, 2273646.990114836022258 ], [ 538644.146326993824914, 2273606.078130641020834 ], [ 538533.646699924720451, 2273504.844587117433548 ], [ 538491.227188622811809, 2273507.517237345688045 ], [ 538375.866994752897881, 2273466.28699111007154 ], [ 538310.714462792500854, 2273372.695968423970044 ], [ 538204.478793532704003, 2273334.72638202086091 ], [ 538049.94540848582983, 2273112.442300483584404 ], [ 538082.219772333744913, 2273023.428050327114761 ], [ 538195.131708447122946, 2273044.801898133940995 ], [ 538239.807642633211799, 2272946.305549144744873 ], [ 538276.032546921866015, 2272817.0487259933725 ], [ 538340.472599486936815, 2272771.237131399102509 ], [ 538372.815377907478251, 2272679.242016312666237 ], [ 538435.692354768631049, 2272585.174490055069327 ], [ 538456.138673348235898, 2272475.773012457415462 ], [ 538282.629858015920036, 2272135.307648956775665 ], [ 538326.396553493454121, 2271901.135548131540418 ], [ 538142.844186850008555, 2271835.52856208384037 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 3.0, "GRIDCODE": 54.0, "X_COORD": 571415.61179, "Y_COORD": 315471.6737 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 533411.883712265756913, 2271420.290621853433549 ], [ 533266.63285126152914, 2271431.205111025832593 ], [ 533153.804866121849045, 2271539.801059836521745 ], [ 533030.188495591981336, 2271571.015311236493289 ], [ 532978.159046860411763, 2271879.102486703544855 ], [ 532886.738965393858962, 2271915.897840817458928 ], [ 532855.40932111768052, 2271956.770821483805776 ], [ 532969.76352326082997, 2272041.95486843958497 ], [ 533054.204883346450515, 2272108.807432372123003 ], [ 533172.740665716934018, 2272145.259075519628823 ], [ 533302.190865942742676, 2272188.292654788121581 ], [ 533339.073092118022032, 2272338.097238992340863 ], [ 533398.005253257229924, 2272370.835182636976242 ], [ 533427.847818418988027, 2272407.739222446456552 ], [ 533419.050889104721136, 2272494.067174553871155 ], [ 533450.376124717993662, 2272606.521966065280139 ], [ 533371.684103774721734, 2272736.374469659291208 ], [ 533241.935637588263489, 2272788.595621162094176 ], [ 533080.65492633311078, 2272772.054951036348939 ], [ 532746.035255677183159, 2272838.685312582179904 ], [ 532617.175301989191212, 2272897.572954228147864 ], [ 532301.04318340565078, 2273014.629107140935957 ], [ 532156.983137398026884, 2273080.46073932852596 ], [ 532031.977608819957823, 2273102.421829388476908 ], [ 531962.897083834512159, 2273168.905605908483267 ], [ 531956.063285724609159, 2273464.276471366174519 ], [ 532083.50343363347929, 2273535.074437100440264 ], [ 532103.051034395582974, 2273993.365929886698723 ], [ 532305.725656354916282, 2274055.688657674007118 ], [ 532242.62581058498472, 2274321.521976184099913 ], [ 532105.028810244170018, 2274498.694962985813618 ], [ 532369.874069676385261, 2274896.768801021389663 ], [ 532395.094515087315813, 2274999.195669490844011 ], [ 532443.399788568494841, 2275107.289364913478494 ], [ 532290.723174329730682, 2275233.304420095868409 ], [ 532252.822131279041059, 2275269.777921302244067 ], [ 532182.675982383778319, 2275398.35903546679765 ], [ 532122.098231487791054, 2275556.376018616370857 ], [ 532021.287862841272727, 2275673.268101685680449 ], [ 531875.279541353229433, 2275658.291359805501997 ], [ 531785.742152810911648, 2275744.45603060349822 ], [ 531484.704699373454787, 2275372.20988299138844 ], [ 531440.370687892893329, 2275453.473767942748964 ], [ 531364.825763892615214, 2275578.114030607044697 ], [ 531359.543307559448294, 2275806.450414376333356 ], [ 531349.834847829653881, 2275839.540485429577529 ], [ 531113.928465472534299, 2275693.903206414543092 ], [ 531018.698360498994589, 2275737.414399703033268 ], [ 530945.957821601186879, 2275927.147246568463743 ], [ 530712.194320906768553, 2275845.721653745509684 ], [ 530643.409485663287342, 2275987.766200451180339 ], [ 530596.699567647883669, 2276036.078584966249764 ], [ 530505.234622473130003, 2276106.162248039618134 ], [ 530445.974042183021083, 2276348.341310543008149 ], [ 530476.874150454532355, 2276481.90747849829495 ], [ 530613.332115958910435, 2276594.472117816098034 ], [ 530653.637686081812717, 2276731.343249276280403 ], [ 530524.278838003403507, 2276998.469746641814709 ], [ 530415.01474905340001, 2277111.47823653370142 ], [ 530189.853116248385049, 2277148.579590691253543 ], [ 530070.483483405550942, 2277240.039712914265692 ], [ 530018.335789366625249, 2277381.980930391699076 ], [ 529680.076027793693356, 2277422.749075307510793 ], [ 529519.552253587869927, 2277545.737884609028697 ], [ 529477.561514889704995, 2277660.034158814698458 ], [ 529260.032090764143504, 2277796.159855305217206 ], [ 529179.041748917545192, 2277826.749499413184822 ], [ 529260.722462595673278, 2277935.558637406677008 ], [ 529336.425208728760481, 2278010.205230594612658 ], [ 529387.561925017973408, 2278078.325828443281353 ], [ 529448.124791601090692, 2278138.042297527194023 ], [ 529477.735436224145815, 2278218.24459329713136 ], [ 529587.74999300937634, 2278297.837902467697859 ], [ 529613.319506555213593, 2278331.898443638347089 ], [ 529703.210742224357091, 2278365.470881348475814 ], [ 529777.042693725787103, 2278413.360993333160877 ], [ 530053.35411020857282, 2278508.164982593618333 ], [ 530108.997798961238004, 2278544.256826946511865 ], [ 530169.744210958015174, 2278543.118402120657265 ], [ 530324.685183904133737, 2278565.459282693453133 ], [ 530321.938359699910507, 2278404.172000475227833 ], [ 530392.350318992394023, 2278350.22457950655371 ], [ 530436.761864617117681, 2278304.29219246096909 ], [ 530487.404775001923554, 2278265.49111189879477 ], [ 530517.013647457584739, 2278234.868895288556814 ], [ 530550.774274115334265, 2278209.001971872523427 ], [ 530621.922678720904514, 2278108.799893027171493 ], [ 530956.837530000833794, 2278157.088434461504221 ], [ 531181.508142029633746, 2278152.873351398855448 ], [ 531255.643334538908675, 2278163.561239183880389 ], [ 531301.614155563060194, 2278162.698142174631357 ], [ 531333.267288608127274, 2278248.424013551324606 ], [ 531413.383308597374707, 2278290.708922272548079 ], [ 531460.981754546170123, 2278354.110849028453231 ], [ 531620.000348372501321, 2278336.044960368424654 ], [ 531832.84302882081829, 2278291.243071625940502 ], [ 532060.111808518064208, 2278286.974764247424901 ], [ 532119.00576963624917, 2278365.420539147220552 ], [ 532237.64305896370206, 2278409.723826322704554 ], [ 532393.641354099032469, 2278563.526917763985693 ], [ 532439.772698972839862, 2278660.901060574688017 ], [ 532427.509044683305547, 2278746.851094748824835 ], [ 532471.936280261841603, 2278790.653008042834699 ], [ 532541.969158616149798, 2278904.923729886300862 ], [ 532556.269379942095838, 2279119.589816455729306 ], [ 532600.752028476214036, 2279270.612388991750777 ], [ 532625.499970945180394, 2279484.268602421507239 ], [ 532638.058861857047305, 2279731.740259794518352 ], [ 532743.967522051068954, 2279600.867992734536529 ], [ 532915.688168012420647, 2279625.618190729059279 ], [ 533080.942527627456002, 2279510.866857139393687 ], [ 533163.074146521510556, 2279522.704139396548271 ], [ 533294.70637034275569, 2279458.969114435836673 ], [ 533432.605298676295206, 2279478.843031945638359 ], [ 533591.54645801091101, 2279475.854152048937976 ], [ 533742.783156989258714, 2279542.906929166987538 ], [ 533942.470798561815172, 2279482.670982668176293 ], [ 534042.561142217717133, 2279480.786682802252471 ], [ 534114.325639597838745, 2279614.403521654196084 ], [ 534276.45260407414753, 2279759.898167771287262 ], [ 534400.697882567648776, 2279806.286976261995733 ], [ 534441.220434315735474, 2279860.254580319859087 ], [ 534638.516280161915347, 2279988.19484141562134 ], [ 534891.998159428592771, 2279983.420901286415756 ], [ 534993.126999006839469, 2280065.804297568276525 ], [ 535158.618446831009351, 2280062.686838909052312 ], [ 535245.57529179006815, 2280119.073690720833838 ], [ 535349.722721362370066, 2280174.028775141574442 ], [ 535562.51635221298784, 2280347.375470913015306 ], [ 535785.115001355530694, 2280379.446038470603526 ], [ 535900.861202188069001, 2280377.263811119832098 ], [ 535978.305892557837069, 2280418.127193420194089 ], [ 535998.249927198281512, 2280542.484148813411593 ], [ 536032.641061795293353, 2280615.062487772665918 ], [ 535970.176835931953974, 2280930.16678240802139 ], [ 536013.902869957382791, 2280973.268591335974634 ], [ 536035.183844099519774, 2281392.037615864537656 ], [ 536123.41299946908839, 2281349.314245722256601 ], [ 536363.072761503863148, 2281417.949154016561806 ], [ 536576.556866432423703, 2281367.275389710441232 ], [ 536648.280071929330006, 2281154.784388948231936 ], [ 536747.455208088154905, 2281042.121335092000663 ], [ 536746.517920662066899, 2280987.455629642121494 ], [ 536972.197217717766762, 2280902.185749561525881 ], [ 537082.709502619924024, 2280787.871336695738137 ], [ 537280.251277373405173, 2280652.415789815597236 ], [ 537327.482098605018109, 2280490.314578818157315 ], [ 537498.314525908674113, 2280383.381781606934965 ], [ 537680.52119473728817, 2280435.560118896886706 ], [ 537695.663924788590521, 2280450.48636925034225 ], [ 537809.498636104632169, 2280392.747808042913675 ], [ 537959.979884813772514, 2280183.82448982540518 ], [ 538229.07194823899772, 2280164.367257128469646 ], [ 538417.789918233873323, 2280048.078379028476775 ], [ 538569.216284305672161, 2279976.825279451906681 ], [ 538804.343318731174804, 2280146.275692869909108 ], [ 538804.160193370073102, 2280202.096523566171527 ], [ 538797.810882403166033, 2280254.236503818072379 ], [ 538875.070726773585193, 2280353.339933413080871 ], [ 538978.497999149607494, 2280398.258675289340317 ], [ 539075.288505668984726, 2280398.445968925952911 ], [ 539159.642411884269677, 2280408.803154149092734 ], [ 539593.864095512428321, 2280063.383799242787063 ], [ 539793.466132216504775, 2279690.280187537893653 ], [ 539847.513822817010805, 2279546.21896755695343 ], [ 539984.032751836581156, 2279437.613289109431207 ], [ 540107.050839665578678, 2279266.802528467960656 ], [ 540306.275639685918577, 2279116.079583582468331 ], [ 540465.539337518974207, 2279088.945257814601064 ], [ 540729.114031361299567, 2278825.903662639670074 ], [ 540655.947561226552352, 2278777.430718699470162 ], [ 540521.787357859313488, 2278655.809405237436295 ], [ 540313.155562737490982, 2278579.612424835562706 ], [ 540259.535891350591555, 2278505.473870793357491 ], [ 540197.814944262499921, 2278446.79497311450541 ], [ 540161.865281745791435, 2278397.086874330416322 ], [ 539959.526102841831744, 2278405.294739820063114 ], [ 539830.150660875602625, 2278319.324600541964173 ], [ 539760.806045030010864, 2278223.440542777068913 ], [ 539567.123251381330192, 2278231.295632808469236 ], [ 539396.450621601892635, 2278076.566167307086289 ], [ 539028.124250093358569, 2278011.505259109660983 ], [ 538973.321621915092692, 2277975.085275839082897 ], [ 538928.086638625711203, 2277958.5631372500211 ], [ 538910.133046939503402, 2277976.478798420168459 ], [ 538728.881289957440458, 2278020.879729741252959 ], [ 538621.552544561214745, 2278052.393080580048263 ], [ 538459.716508630197495, 2278032.518399214372039 ], [ 538282.607321983901784, 2278032.17400589864701 ], [ 538251.295113356783986, 2277950.067861166782677 ], [ 538158.822935484466143, 2277855.557854663580656 ], [ 537855.445537231396884, 2277750.473507470451295 ], [ 537824.150163725251332, 2277619.468919583596289 ], [ 537561.351596475462429, 2277519.222308812662959 ], [ 537362.958977211033925, 2277549.293688124977052 ], [ 537318.58848454861436, 2277632.731438625603914 ], [ 537295.799533365759999, 2277659.832723293453455 ], [ 537121.551463625393808, 2277202.869972344487906 ], [ 536831.812272248091176, 2277138.621384393423796 ], [ 536788.062669194652699, 2277023.884473896585405 ], [ 536760.228865875164047, 2276963.416061662137508 ], [ 536731.779666032991372, 2276844.306275607086718 ], [ 536585.511819648323581, 2276800.191756662912667 ], [ 536611.033559117582627, 2276590.657632010988891 ], [ 536611.436170818400569, 2276469.265076688490808 ], [ 536651.602073190268129, 2276348.651036092080176 ], [ 536473.672705876757391, 2276280.771789160557091 ], [ 536441.422613433911465, 2276239.393528020009398 ], [ 536458.963543717865832, 2276095.39812149759382 ], [ 536373.48095252062194, 2276008.020829362794757 ], [ 536347.082481286721304, 2275938.78328122664243 ], [ 536288.98698299995158, 2275879.400835085660219 ], [ 536293.10225986270234, 2275845.617275767028332 ], [ 536293.454282766440883, 2275739.870298217050731 ], [ 536306.341963621438481, 2275634.076509073376656 ], [ 536140.151205322123133, 2275583.948754976503551 ], [ 536110.34754017717205, 2275416.959315190091729 ], [ 536357.519008085364476, 2275374.86325338948518 ], [ 536497.549076019087806, 2275052.123270129784942 ], [ 536583.984810118097812, 2275018.403431090526283 ], [ 536621.601461188984104, 2274867.941882934421301 ], [ 536654.853222532197833, 2274841.490414025261998 ], [ 536696.857733897282742, 2274799.570313911885023 ], [ 536657.774780779378489, 2274714.649261302314699 ], [ 536677.228500948869623, 2274554.939674128778279 ], [ 536677.583615241455846, 2274448.379090267233551 ], [ 536875.169948510592803, 2274385.466953579336405 ], [ 536964.400135958800092, 2274217.663836292922497 ], [ 536964.671570513164625, 2274136.280617797747254 ], [ 537033.363443348673172, 2274049.081207347102463 ], [ 537081.340923611540347, 2273958.853129472583532 ], [ 537145.020463564083911, 2273856.326328198425472 ], [ 537058.796470185625367, 2273668.977203969843686 ], [ 537031.39279339229688, 2273554.224666475318372 ], [ 537038.655164552736096, 2273494.591650320217013 ], [ 537104.55722569511272, 2273388.484701913781464 ], [ 537105.044456527219154, 2273242.07723718136549 ], [ 537150.964793764054775, 2273205.5437165889889 ], [ 537151.539474733290263, 2273033.365586793981493 ], [ 537205.304867522092536, 2272946.798559178598225 ], [ 537350.304646394215524, 2272831.436631485819817 ], [ 537410.521555851912126, 2272771.338471239432693 ], [ 537473.57425080856774, 2272746.738807721994817 ], [ 537566.798539157491177, 2272702.86366462148726 ], [ 537567.252802462899126, 2272566.053503924049437 ], [ 537623.678965776460245, 2272362.714860095642507 ], [ 537717.762251224019565, 2272243.274628666229546 ], [ 537718.739928211900406, 2271948.976724430918694 ], [ 537827.896732847089879, 2271862.129492021165788 ], [ 537844.826950251124799, 2271816.999428656883538 ], [ 537833.918680936913006, 2271769.865398243069649 ], [ 537755.296055236482061, 2271555.671627147123218 ], [ 537726.927655192674138, 2271433.088828198611736 ], [ 537572.20105546573177, 2271332.7338060233742 ], [ 537405.324265971081331, 2271410.775296750478446 ], [ 537245.60337428713683, 2271521.729714227840304 ], [ 537170.480478842160664, 2271478.612788838334382 ], [ 537119.159762849099934, 2271339.612756946124136 ], [ 537055.552683730958961, 2271298.357205416075885 ], [ 536974.289855467737652, 2271255.466652389615774 ], [ 536852.096231508650817, 2271167.061961377039552 ], [ 536768.801566397305578, 2271099.190385811030865 ], [ 536708.721067314967513, 2271067.478044840507209 ], [ 536656.590248576132581, 2270970.392827370204031 ], [ 536544.307508648955263, 2271024.782256447710097 ], [ 536379.874354632105678, 2270985.740696763619781 ], [ 536298.048395640566014, 2270876.734220602549613 ], [ 535870.097771639702842, 2270884.806948003359139 ], [ 535806.842824531369843, 2270800.540156700648367 ], [ 535724.513403312535957, 2270788.673684713430703 ], [ 535634.789119344786741, 2270822.584122613072395 ], [ 535402.546289437799715, 2271000.596224608831108 ], [ 535364.239250892656855, 2271074.498205589130521 ], [ 535288.622346394578926, 2271103.07500137668103 ], [ 535047.042212971602567, 2271270.882363530807197 ], [ 534825.219830535701476, 2271238.909709328785539 ], [ 534592.708293353323825, 2271417.121925355866551 ], [ 534555.590692690806463, 2271568.167911875061691 ], [ 534486.130147365038283, 2271677.281578491441905 ], [ 534487.093543457332999, 2271733.747333236970007 ], [ 534277.645776987425052, 2271671.754820481874049 ], [ 534129.755872800946236, 2271597.667125037871301 ], [ 534069.044298752909526, 2271598.809185808524489 ], [ 533997.27368695451878, 2271503.192357674241066 ], [ 533912.35493363335263, 2271532.040185661055148 ], [ 533822.331708969315514, 2271658.863120523281395 ], [ 533722.183775191544555, 2271560.105092905461788 ], [ 533693.293651089770719, 2271481.845935324206948 ], [ 533661.470726312603801, 2271482.445272852666676 ], [ 533605.832852185121737, 2271446.353955386206508 ], [ 533411.883712265756913, 2271420.290621853433549 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 4.0, "GRIDCODE": 51.0, "X_COORD": 576926.36588000006, "Y_COORD": 311936.26461000001 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 541848.616005351534113, 2269496.923860353417695 ], [ 541777.214636684511788, 2269510.777110863476992 ], [ 541682.582447906956077, 2269564.935298657976091 ], [ 541485.385087410337292, 2269565.031479675322771 ], [ 541301.617531913798302, 2269756.833091570064425 ], [ 541331.304272119188681, 2269905.616774288006127 ], [ 541421.676971172797494, 2269905.786704088561237 ], [ 541470.32884816871956, 2270033.39472371712327 ], [ 541509.871805383008905, 2270119.308959726244211 ], [ 541457.308344329241663, 2270242.441260538995266 ], [ 541416.289364348282106, 2270380.624836188741028 ], [ 541415.95683789125178, 2270482.500615105964243 ], [ 541406.827249265741557, 2270557.488804670982063 ], [ 541406.679263856029138, 2270602.812716377899051 ], [ 541389.530504559632391, 2270743.697376037947834 ], [ 541304.351945272297598, 2270776.938629294745624 ], [ 541211.728120700456202, 2270905.583017735742033 ], [ 541140.041127213975415, 2271040.430454012006521 ], [ 540962.070274907629937, 2271226.923874882981181 ], [ 540791.658977998187765, 2271152.898621838539839 ], [ 540659.576262898975983, 2271069.326709757559001 ], [ 540400.74052781611681, 2270955.076320064254105 ], [ 540237.783781304140575, 2270954.762923075817525 ], [ 540152.849388040020131, 2271039.544457990676165 ], [ 539901.69997476041317, 2271239.387491689063609 ], [ 539785.960582739440724, 2271166.155230571515858 ], [ 539741.305208896286786, 2271149.119679390452802 ], [ 539675.555056669050828, 2271168.967379645444453 ], [ 539184.252279949840158, 2271188.93126518279314 ], [ 539124.849362966720946, 2271217.707721464335918 ], [ 538805.574782754061744, 2271227.440524714998901 ], [ 538759.727400541421957, 2271315.899894682690501 ], [ 538709.80953880934976, 2271370.993818662129343 ], [ 538550.174691907828674, 2271300.213521150872111 ], [ 538459.83645517216064, 2271327.479281223379076 ], [ 538366.479583813808858, 2271349.650596629828215 ], [ 538335.00101346464362, 2271410.383929690346122 ], [ 538264.850618164637126, 2271464.160513659007847 ], [ 538346.556725342292339, 2271636.641973780468106 ], [ 538268.413284904090688, 2271759.414259640499949 ], [ 538157.645341337658465, 2271820.214631563983858 ], [ 538142.844186850008555, 2271835.52856208384037 ], [ 538326.396553493454121, 2271901.135548131540418 ], [ 538282.629858015920036, 2272135.307648956775665 ], [ 538456.138673348235898, 2272475.773012457415462 ], [ 538435.692354768631049, 2272585.174490055069327 ], [ 538372.815377907478251, 2272679.242016312666237 ], [ 538340.472599486936815, 2272771.237131399102509 ], [ 538276.032546921866015, 2272817.0487259933725 ], [ 538239.807642633211799, 2272946.305549144744873 ], [ 538195.131708447122946, 2273044.801898133940995 ], [ 538082.219772333744913, 2273023.428050327114761 ], [ 538049.94540848582983, 2273112.442300483584404 ], [ 538204.478793532704003, 2273334.72638202086091 ], [ 538310.714462792500854, 2273372.695968423970044 ], [ 538375.866994752897881, 2273466.28699111007154 ], [ 538491.227188622811809, 2273507.517237345688045 ], [ 538533.646699924720451, 2273504.844587117433548 ], [ 538644.146326993824914, 2273606.078130641020834 ], [ 538725.790406423388049, 2273646.990114836022258 ], [ 538874.912135608494282, 2273872.868807881139219 ], [ 539039.901288598426618, 2273862.474639217369258 ], [ 539072.106809902354144, 2274010.940621584653854 ], [ 539203.472284341114573, 2274131.436075547710061 ], [ 539141.407473025145009, 2274268.272235313430429 ], [ 539109.065760231344029, 2274360.265442534349859 ], [ 539036.01418608718086, 2274521.319809568114579 ], [ 538967.818683558376506, 2274623.34097252972424 ], [ 539358.742801635758951, 2274674.641123194247484 ], [ 539468.691998716094531, 2274832.569100754335523 ], [ 539705.126746188383549, 2274877.484937247820199 ], [ 539787.163373789866455, 2274995.318598924204707 ], [ 539920.496659127762541, 2275062.123351487331092 ], [ 540022.31478455697652, 2275258.06829425226897 ], [ 539995.428879212005995, 2275401.946709088049829 ], [ 539932.552906213793904, 2275496.011830451898277 ], [ 539912.632067149272189, 2275602.214025088585913 ], [ 540017.505972305894829, 2275641.363552144728601 ], [ 540162.736410142737441, 2275759.672700597904623 ], [ 540285.328400081256405, 2275730.558812708593905 ], [ 540369.396639816695824, 2275643.574961358681321 ], [ 540618.635519303381443, 2275522.8372538741678 ], [ 541065.930872341501527, 2275597.180429384112358 ], [ 541165.312685362994671, 2275678.136868001893163 ], [ 541349.925028218887746, 2275588.702644768171012 ], [ 541410.304800422745757, 2275574.361799040809274 ], [ 541412.179345446173102, 2275544.258632800541818 ], [ 541441.982755379169248, 2275546.10939684510231 ], [ 541454.4713354120031, 2275510.040042566135526 ], [ 541478.961888721678406, 2275538.061106869950891 ], [ 541441.982755379169248, 2275546.10939684510231 ], [ 541440.108225215808488, 2275576.21256282646209 ], [ 541410.304800422745757, 2275574.361799040809274 ], [ 541417.754321018815972, 2275681.443089703097939 ], [ 541445.591439390089363, 2275741.910143497399986 ], [ 541468.199823383823968, 2275878.342468330636621 ], [ 541725.022561721270904, 2275976.294759707525373 ], [ 542065.532737950212322, 2276322.26768637355417 ], [ 542249.997083888971247, 2276277.065301513299346 ], [ 542309.910486243665218, 2276248.865021308884025 ], [ 542373.712322351289913, 2276223.967813342809677 ], [ 542320.355329952319153, 2276108.073871252126992 ], [ 542352.832324264571071, 2276039.994944548234344 ], [ 542411.400282109505497, 2275993.39195765927434 ], [ 542429.44581493048463, 2275845.140021309256554 ], [ 542389.041061446303502, 2275739.199768329039216 ], [ 542341.543359828181565, 2275636.026447471231222 ], [ 542362.731254859943874, 2275461.942526162602007 ], [ 542252.935500761843286, 2275349.733778474852443 ], [ 542343.825549612403847, 2275223.509421330876648 ], [ 542399.695552753517404, 2275179.051349898800254 ], [ 542442.401010662317276, 2275110.282035251148045 ], [ 542442.502602853579447, 2275078.907488314434886 ], [ 542485.248836270067841, 2274924.829141743481159 ], [ 542485.47308996913489, 2274855.405994903296232 ], [ 542503.724115388584323, 2274705.439440145157278 ], [ 542504.410194268566556, 2274493.380335397087038 ], [ 542555.96722972986754, 2274396.405058909207582 ], [ 542667.969380073482171, 2274368.955557644367218 ], [ 542842.697977197938599, 2274241.564859563484788 ], [ 543167.448300772462972, 2274333.037145989015698 ], [ 543332.450416910927743, 2274240.961680488660932 ], [ 543312.087515438906848, 2274101.065692042931914 ], [ 543172.22867332410533, 2273958.128546396270394 ], [ 543216.711812920402735, 2273861.069729543291032 ], [ 543455.202368133817799, 2273831.257134716026485 ], [ 543437.741381344851106, 2273509.556310874409974 ], [ 543447.95191027445253, 2273425.662368325516582 ], [ 543417.24693597224541, 2273386.272371831350029 ], [ 543298.224193007103167, 2273321.844138279557228 ], [ 543219.783165303291753, 2273221.213332221843302 ], [ 543100.497656529769301, 2273099.296360976062715 ], [ 543112.678427987266332, 2272999.189940937794745 ], [ 542854.14611456671264, 2272998.708355601876974 ], [ 542813.984131020493805, 2272957.657999615184963 ], [ 542757.569023263524286, 2272854.337903418578207 ], [ 542680.743928247014992, 2272775.817484375089407 ], [ 542663.190280936076306, 2272523.502925399690866 ], [ 542632.903407375444658, 2272492.547034897841513 ], [ 542668.707673972006887, 2272434.88294412381947 ], [ 542719.433079018141143, 2272073.677352625876665 ], [ 542782.996078654541634, 2271971.308531968854368 ], [ 542791.850079641444609, 2271898.546025441028178 ], [ 542806.904032311402261, 2271883.519581764936447 ], [ 542792.050949321710505, 2271868.337140456773341 ], [ 542767.776928584789857, 2271804.686704106628895 ], [ 542722.281520656542853, 2271705.843155149370432 ], [ 542697.116107345675118, 2271498.085078754462302 ], [ 542656.549000894301571, 2271294.815243201330304 ], [ 542568.824050930794328, 2271129.160815447568893 ], [ 542564.841531698475592, 2270698.578678118996322 ], [ 542471.206962878466584, 2270602.869967431761324 ], [ 542324.918956202804111, 2270602.594525692053139 ], [ 542074.449635604047216, 2270367.2891442226246 ], [ 542121.310501967789605, 2269982.307144517078996 ], [ 542122.682149480679072, 2269561.530468169599771 ], [ 541891.487900443491526, 2269515.548121529631317 ], [ 541848.616005351534113, 2269496.923860353417695 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 5.0, "GRIDCODE": 50.0, "X_COORD": 572189.39078000002, "Y_COORD": 308242.57640999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537257.270187143352814, 2265886.955335529521108 ], [ 537090.028084834688343, 2265921.313365897163749 ], [ 536687.203507544007152, 2266021.090372386388481 ], [ 536423.360348314861767, 2266200.429594838060439 ], [ 536203.322324726847, 2266228.841531565412879 ], [ 536170.830350957461633, 2266288.419792449101806 ], [ 536111.934725472936407, 2266337.050118399783969 ], [ 535894.467672978062183, 2266375.27983773034066 ], [ 535796.722566204145551, 2266419.964767619967461 ], [ 535792.001728200353682, 2266624.351141636259854 ], [ 535754.203844519681297, 2266714.708340122364461 ], [ 535656.337523011141457, 2266970.083685633726418 ], [ 535436.488084198324941, 2267025.617913948372006 ], [ 535360.883686566259712, 2267164.248124927282333 ], [ 535270.614087639260106, 2267200.59015254676342 ], [ 535215.797564370557666, 2267194.968455080874264 ], [ 535125.466465420438908, 2267220.763783063739538 ], [ 534968.256997084710747, 2267248.397114332765341 ], [ 535009.660277489107102, 2267538.250916135497391 ], [ 534945.347450130037032, 2267691.983980281278491 ], [ 534889.904567408375442, 2267836.646704964339733 ], [ 534753.397846845444292, 2267891.602230970747769 ], [ 534692.982713632634841, 2267919.216344347223639 ], [ 534630.440708940033801, 2267944.395791183225811 ], [ 534431.447982233366929, 2268035.354290030896664 ], [ 534376.429435676662251, 2268088.314428013749421 ], [ 534316.594915288849734, 2268198.022010029293597 ], [ 534215.915354262571782, 2268223.449805771000683 ], [ 534089.619836270809174, 2268281.177078866399825 ], [ 533984.139925876865163, 2268236.267900924198329 ], [ 533882.482355063315481, 2268443.006496084854007 ], [ 533768.678375106886961, 2268536.961863172240555 ], [ 533663.42179151577875, 2268579.332932837307453 ], [ 533603.005459139938466, 2268606.945492814294994 ], [ 533451.061276415595785, 2268626.55645495839417 ], [ 533337.930458552786149, 2268735.452123460359871 ], [ 533187.751974661834538, 2268549.712718340568244 ], [ 533033.348966488847509, 2268477.582213248126209 ], [ 532946.2027237174334, 2268475.648671946488321 ], [ 532857.997579419170506, 2268560.55068854149431 ], [ 532825.254354836419225, 2268587.583722016774118 ], [ 532780.238109565339983, 2268670.113517521880567 ], [ 532876.634513445897028, 2268741.928324121981859 ], [ 532865.867980723152868, 2268847.587253539822996 ], [ 532862.285470407339744, 2269002.402180786244571 ], [ 532729.895628868835047, 2269155.942242214456201 ], [ 532728.314115932560526, 2269224.299561874940991 ], [ 532818.009740551118739, 2269319.404108870774508 ], [ 532942.910283103701659, 2269388.796564111486077 ], [ 533034.421684704022482, 2269346.973312850110233 ], [ 533189.358588236384094, 2269197.838361548259854 ], [ 533346.560397833934985, 2269264.771841835230589 ], [ 533362.934555432060733, 2269559.137452389113605 ], [ 533449.827190227806568, 2269623.870527346618474 ], [ 533446.023193669272587, 2269661.207494025118649 ], [ 533639.683957323082723, 2269835.770697230473161 ], [ 533670.646582069224678, 2269901.545562194660306 ], [ 533549.016914862440899, 2269932.259966387413442 ], [ 533544.978291145642288, 2270106.969485078006983 ], [ 533464.474427237524651, 2270239.819856305606663 ], [ 533459.963007167447358, 2270434.946831316687167 ], [ 533639.121640846016817, 2270490.041061722673476 ], [ 533693.836979878717102, 2270712.292524414137006 ], [ 533550.417494201683439, 2270869.231445644050837 ], [ 533510.405975121655501, 2271049.224525541998446 ], [ 533475.783148463116959, 2271106.362061346881092 ], [ 533406.08346938889008, 2271234.140703660435975 ], [ 533411.883712265756913, 2271420.290621853433549 ], [ 533605.832852185121737, 2271446.353955386206508 ], [ 533661.470726312603801, 2271482.445272852666676 ], [ 533693.293651089770719, 2271481.845935324206948 ], [ 533722.183775191544555, 2271560.105092905461788 ], [ 533822.331708969315514, 2271658.863120523281395 ], [ 533912.35493363335263, 2271532.040185661055148 ], [ 533997.27368695451878, 2271503.192357674241066 ], [ 534069.044298752909526, 2271598.809185808524489 ], [ 534129.755872800946236, 2271597.667125037871301 ], [ 534277.645776987425052, 2271671.754820481874049 ], [ 534487.093543457332999, 2271733.747333236970007 ], [ 534486.130147365038283, 2271677.281578491441905 ], [ 534555.590692690806463, 2271568.167911875061691 ], [ 534592.708293353323825, 2271417.121925355866551 ], [ 534825.219830535701476, 2271238.909709328785539 ], [ 535047.042212971602567, 2271270.882363530807197 ], [ 535288.622346394578926, 2271103.07500137668103 ], [ 535364.239250892656855, 2271074.498205589130521 ], [ 535402.546289437799715, 2271000.596224608831108 ], [ 535634.789119344786741, 2270822.584122613072395 ], [ 535724.513403312535957, 2270788.673684713430703 ], [ 535806.842824531369843, 2270800.540156700648367 ], [ 535870.097771639702842, 2270884.806948003359139 ], [ 536298.048395640566014, 2270876.734220602549613 ], [ 536379.874354632105678, 2270985.740696763619781 ], [ 536544.307508648955263, 2271024.782256447710097 ], [ 536656.590248576132581, 2270970.392827370204031 ], [ 536708.721067314967513, 2271067.478044840507209 ], [ 536768.801566397305578, 2271099.190385811030865 ], [ 536852.096231508650817, 2271167.061961377039552 ], [ 536974.289855467737652, 2271255.466652389615774 ], [ 537055.552683730958961, 2271298.357205416075885 ], [ 537119.159762849099934, 2271339.612756946124136 ], [ 537170.480478842160664, 2271478.612788838334382 ], [ 537245.60337428713683, 2271521.729714227840304 ], [ 537405.324265971081331, 2271410.775296750478446 ], [ 537572.20105546573177, 2271332.7338060233742 ], [ 537726.927655192674138, 2271433.088828198611736 ], [ 537755.296055236482061, 2271555.671627147123218 ], [ 537833.918680936913006, 2271769.865398243069649 ], [ 537844.826950251124799, 2271816.999428656883538 ], [ 538142.844186850008555, 2271835.52856208384037 ], [ 538157.645341337658465, 2271820.214631563983858 ], [ 538268.413284904090688, 2271759.414259640499949 ], [ 538346.556725342292339, 2271636.641973780468106 ], [ 538264.850618164637126, 2271464.160513659007847 ], [ 538335.00101346464362, 2271410.383929690346122 ], [ 538366.479583813808858, 2271349.650596629828215 ], [ 538459.83645517216064, 2271327.479281223379076 ], [ 538550.174691907828674, 2271300.213521150872111 ], [ 538709.80953880934976, 2271370.993818662129343 ], [ 538759.727400541421957, 2271315.899894682690501 ], [ 538805.574782754061744, 2271227.440524714998901 ], [ 539124.849362966720946, 2271217.707721464335918 ], [ 539184.252279949840158, 2271188.93126518279314 ], [ 539675.555056669050828, 2271168.967379645444453 ], [ 539741.305208896286786, 2271149.119679390452802 ], [ 539675.303577706567012, 2271070.468720549717546 ], [ 539611.90820455015637, 2271065.21567792724818 ], [ 539526.277932157856412, 2271061.663054094649851 ], [ 539413.227873304742388, 2270997.26644194778055 ], [ 539350.864689803798683, 2270928.715114933438599 ], [ 539275.834137485828251, 2270743.824558109045029 ], [ 539185.824717312352732, 2270706.298108069226146 ], [ 538969.183354608598165, 2270656.69647101406008 ], [ 538842.08693075296469, 2270505.237099288031459 ], [ 538695.459327820688486, 2270404.422542717307806 ], [ 538582.519054545206018, 2270306.12957017775625 ], [ 538464.289031104999594, 2270269.093861790373921 ], [ 538531.482530725304969, 2270155.401344727724791 ], [ 538517.511836411082186, 2269909.196602299809456 ], [ 538490.830145685817115, 2269847.697761092334986 ], [ 538465.416855500428937, 2269785.067612169310451 ], [ 538407.057940409285948, 2269751.821807522326708 ], [ 538160.808194858487695, 2269559.676313733682036 ], [ 538036.919894997146912, 2269489.096424477174878 ], [ 537980.693466622848064, 2269392.86219806689769 ], [ 537962.788773727254011, 2269209.806678455322981 ], [ 537898.065264228498563, 2269172.932310909032822 ], [ 537773.028511856333353, 2269023.911112151108682 ], [ 537651.877931180410087, 2268918.465855372138321 ], [ 537533.432501451461576, 2268881.360020008869469 ], [ 537592.346482701250352, 2268830.892014282755554 ], [ 537695.020721500390209, 2268696.720439434051514 ], [ 537610.486070675542578, 2268421.603203157894313 ], [ 537566.466566594666801, 2268369.13656919170171 ], [ 537474.983152251457796, 2268332.710839005187154 ], [ 537369.669790524989367, 2268207.191387880593538 ], [ 537249.887397530372255, 2268168.095622520893812 ], [ 537102.285847732797265, 2268161.966027365997434 ], [ 537073.363736697472632, 2268095.294665707275271 ], [ 537173.396699162083678, 2268009.604760080575943 ], [ 537271.888499240158126, 2267833.49473622161895 ], [ 537537.727063030120917, 2267723.102067624218762 ], [ 537600.542062642751262, 2267454.248112702742219 ], [ 537544.026593283051625, 2267277.783666976727545 ], [ 537488.171775491093285, 2267216.37449468486011 ], [ 537462.761274834629148, 2267153.741140847094357 ], [ 537404.40562525135465, 2267120.492718919180334 ], [ 537386.505195278674364, 2266937.430231138132513 ], [ 537235.045548864174634, 2266693.903508567251265 ], [ 537194.681202304316685, 2266544.794962561689317 ], [ 537257.270187143352814, 2265886.955335529521108 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 6.0, "GRIDCODE": 48.0, "X_COORD": 575188.62722999998, "Y_COORD": 307749.19597 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537352.299669037107378, 2265802.192608362063766 ], [ 537318.527428311761469, 2265860.304987696930766 ], [ 537257.270187143352814, 2265886.955335529521108 ], [ 537194.681202304316685, 2266544.794962561689317 ], [ 537235.045548864174634, 2266693.903508567251265 ], [ 537386.505195278674364, 2266937.430231138132513 ], [ 537404.40562525135465, 2267120.492718919180334 ], [ 537462.761274834629148, 2267153.741140847094357 ], [ 537488.171775491093285, 2267216.37449468486011 ], [ 537544.026593283051625, 2267277.783666976727545 ], [ 537600.542062642751262, 2267454.248112702742219 ], [ 537537.727063030120917, 2267723.102067624218762 ], [ 537271.888499240158126, 2267833.49473622161895 ], [ 537173.396699162083678, 2268009.604760080575943 ], [ 537073.363736697472632, 2268095.294665707275271 ], [ 537102.285847732797265, 2268161.966027365997434 ], [ 537249.887397530372255, 2268168.095622520893812 ], [ 537369.669790524989367, 2268207.191387880593538 ], [ 537474.983152251457796, 2268332.710839005187154 ], [ 537566.466566594666801, 2268369.13656919170171 ], [ 537610.486070675542578, 2268421.603203157894313 ], [ 537695.020721500390209, 2268696.720439434051514 ], [ 537592.346482701250352, 2268830.892014282755554 ], [ 537533.432501451461576, 2268881.360020008869469 ], [ 537651.877931180410087, 2268918.465855372138321 ], [ 537773.028511856333353, 2269023.911112151108682 ], [ 537898.065264228498563, 2269172.932310909032822 ], [ 537962.788773727254011, 2269209.806678455322981 ], [ 537980.693466622848064, 2269392.86219806689769 ], [ 538036.919894997146912, 2269489.096424477174878 ], [ 538160.808194858487695, 2269559.676313733682036 ], [ 538407.057940409285948, 2269751.821807522326708 ], [ 538465.416855500428937, 2269785.067612169310451 ], [ 538490.830145685817115, 2269847.697761092334986 ], [ 538517.511836411082186, 2269909.196602299809456 ], [ 538531.482530725304969, 2270155.401344727724791 ], [ 538464.289031104999594, 2270269.093861790373921 ], [ 538582.519054545206018, 2270306.12957017775625 ], [ 538695.459327820688486, 2270404.422542717307806 ], [ 538842.08693075296469, 2270505.237099288031459 ], [ 538969.183354608598165, 2270656.69647101406008 ], [ 539185.824717312352732, 2270706.298108069226146 ], [ 539275.834137485828251, 2270743.824558109045029 ], [ 539350.864689803798683, 2270928.715114933438599 ], [ 539413.227873304742388, 2270997.26644194778055 ], [ 539526.277932157856412, 2271061.663054094649851 ], [ 539611.90820455015637, 2271065.21567792724818 ], [ 539675.303577706567012, 2271070.468720549717546 ], [ 539741.305208896286786, 2271149.119679390452802 ], [ 539785.960582739440724, 2271166.155230571515858 ], [ 539901.69997476041317, 2271239.387491689063609 ], [ 540152.849388040020131, 2271039.544457990676165 ], [ 540237.783781304140575, 2270954.762923075817525 ], [ 540400.74052781611681, 2270955.076320064254105 ], [ 540659.576262898975983, 2271069.326709757559001 ], [ 540791.658977998187765, 2271152.898621838539839 ], [ 540962.070274907629937, 2271226.923874882981181 ], [ 541140.041127213975415, 2271040.430454012006521 ], [ 541211.728120700456202, 2270905.583017735742033 ], [ 541304.351945272297598, 2270776.938629294745624 ], [ 541389.530504559632391, 2270743.697376037947834 ], [ 541406.679263856029138, 2270602.812716377899051 ], [ 541406.827249265741557, 2270557.488804670982063 ], [ 541415.95683789125178, 2270482.500615105964243 ], [ 541416.289364348282106, 2270380.624836188741028 ], [ 541457.308344329241663, 2270242.441260538995266 ], [ 541509.871805383008905, 2270119.308959726244211 ], [ 541470.32884816871956, 2270033.39472371712327 ], [ 541421.676971172797494, 2269905.786704088561237 ], [ 541331.304272119188681, 2269905.616774288006127 ], [ 541301.617531913798302, 2269756.833091570064425 ], [ 541485.385087410337292, 2269565.031479675322771 ], [ 541472.599847075762227, 2269548.002674979157746 ], [ 541442.319796347175725, 2269518.146055513061583 ], [ 541414.576446802122518, 2269443.020799592137337 ], [ 541211.417459116550162, 2269382.912709315307438 ], [ 541052.868503438774496, 2269312.61820531077683 ], [ 540915.428274515783414, 2269332.055905261076987 ], [ 540804.852995425113477, 2269385.631759653799236 ], [ 540734.61086059990339, 2269353.291888731531799 ], [ 540710.9164819996804, 2269289.127562591806054 ], [ 540669.8887312336592, 2269248.674669584259391 ], [ 540694.264938092324883, 2269077.656840995885432 ], [ 540693.731543847825378, 2269046.50618633441627 ], [ 540791.242557612247765, 2268924.458390759304166 ], [ 540759.04318022064399, 2268743.680487001314759 ], [ 540527.612066869274713, 2268515.48561492562294 ], [ 540437.03171151294373, 2268367.667912626639009 ], [ 540409.565036772168241, 2268248.982667317613959 ], [ 540305.562539756996557, 2268110.438895131461322 ], [ 540099.390975655172952, 2268114.343681680969894 ], [ 540096.216384547646157, 2267929.08895284216851 ], [ 540139.764398628729396, 2267895.700063220225275 ], [ 540137.401746682706289, 2267757.835636836476624 ], [ 540211.923335226252675, 2267640.736746184527874 ], [ 540226.248307245201431, 2267540.243919119238853 ], [ 540007.126034280401655, 2267330.109947119839489 ], [ 539985.18945250636898, 2267235.308266942389309 ], [ 539841.864696780336089, 2267164.121330265887082 ], [ 539660.504756809212267, 2267018.4505127472803 ], [ 539435.858365831431001, 2266730.145055290311575 ], [ 539156.404056031140499, 2266444.421670119278133 ], [ 538847.808679221663624, 2266248.28890638705343 ], [ 538485.653953505097888, 2266122.799695757217705 ], [ 538190.359486676286906, 2265994.484792076982558 ], [ 537991.993871906772256, 2265944.147016389295459 ], [ 537612.028634619899094, 2265746.049372563138604 ], [ 537352.299669037107378, 2265802.192608362063766 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 7.0, "GRIDCODE": 52.0, "X_COORD": 567577.1984, "Y_COORD": 309263.40816 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 533232.051040753605776, 2263278.832123060710728 ], [ 533125.781214501941577, 2263286.202340480871499 ], [ 533059.441359075717628, 2263318.337995103560388 ], [ 533061.157015591277741, 2263419.317464115098119 ], [ 533047.838198662968352, 2263512.680100606754422 ], [ 532970.751907601254061, 2263633.788857689127326 ], [ 533074.946604664553888, 2263736.570452925749123 ], [ 533058.236251341877505, 2263853.694976682774723 ], [ 532887.203231589403003, 2263947.575056537985802 ], [ 532723.086060155066662, 2263986.538567405194044 ], [ 532619.266721442923881, 2264051.541624064557254 ], [ 532446.992804280249402, 2264116.648325954563916 ], [ 532063.966954208444804, 2264132.162408732809126 ], [ 531879.173808246618137, 2264105.509528854861856 ], [ 531519.160624045995064, 2264112.270108498632908 ], [ 531434.579052110901102, 2264057.384267698973417 ], [ 531238.654138844227418, 2263999.366832642816007 ], [ 531072.645658521912992, 2264049.458998445421457 ], [ 530812.585216289153323, 2264212.27401127666235 ], [ 530740.357976085855626, 2264635.366637452505529 ], [ 530963.481377349467948, 2264855.471944414079189 ], [ 530982.236993106082082, 2265137.547364830039442 ], [ 531092.381117391283624, 2265246.198733552359045 ], [ 531028.582114212098531, 2265295.099928456358612 ], [ 531109.679786149645224, 2265427.503928812220693 ], [ 531141.255745526752435, 2265513.068431672640145 ], [ 531248.375333194970153, 2265569.630894259549677 ], [ 531261.67029489192646, 2265832.14730070810765 ], [ 531292.058825695887208, 2265896.3318000016734 ], [ 531276.634957375470549, 2266004.415243149735034 ], [ 531512.989728524116799, 2266321.359122166410089 ], [ 531481.359982575639151, 2266543.015475110150874 ], [ 531391.899345011916012, 2266530.113501589745283 ], [ 531277.399055589339696, 2266648.57669244799763 ], [ 530854.96110145910643, 2266677.851114196702838 ], [ 530593.004983616760001, 2266821.073151739314198 ], [ 530540.596049392363057, 2266875.292602709494531 ], [ 530475.293617901043035, 2266925.34347826987505 ], [ 530324.280811380362138, 2266950.235389387235045 ], [ 530251.428603683016263, 2266985.51671452447772 ], [ 530162.310489226598293, 2267184.180019709281623 ], [ 529919.956032330170274, 2267197.04926314111799 ], [ 529823.356212670681998, 2267243.830860472284257 ], [ 529692.79270660399925, 2267259.571140233427286 ], [ 529660.795776582206599, 2267344.834197266958654 ], [ 529433.701961666578427, 2267471.507962239906192 ], [ 529274.503555396222509, 2267451.920852123759687 ], [ 529132.040146662155166, 2267389.990438947454095 ], [ 528916.419102796819061, 2267307.671472917310894 ], [ 528747.457661377382465, 2267307.310318158008158 ], [ 528717.769913264201023, 2267303.658414953388274 ], [ 528685.245351053425111, 2267303.589156962931156 ], [ 528685.035830224049278, 2267363.648159339092672 ], [ 528638.731330284033902, 2267438.187673501670361 ], [ 528365.474484486039728, 2267496.185384642332792 ], [ 528317.19923418504186, 2267490.244980056770146 ], [ 528141.507686491473578, 2267489.86613224633038 ], [ 528057.261971994652413, 2267381.709991314448416 ], [ 527938.26260380691383, 2267317.238506853580475 ], [ 527868.569734207703732, 2267273.11477264482528 ], [ 527816.975951948086731, 2267370.121082770638168 ], [ 527779.954567167325877, 2267429.715527324005961 ], [ 527779.749779933015816, 2267487.845167849212885 ], [ 527770.657926588319242, 2267562.393761076964438 ], [ 527615.941488711512648, 2267648.686623430810869 ], [ 527615.605728822527453, 2267744.309393420815468 ], [ 527761.933049995801412, 2267851.774534756317735 ], [ 527905.670627951039933, 2267852.083559374324977 ], [ 528093.784341139020398, 2267875.23259817250073 ], [ 527948.27795857784804, 2268215.893029665574431 ], [ 527860.242469220655039, 2268357.60219809319824 ], [ 528104.739370927796699, 2268522.73157256282866 ], [ 528098.377611850271933, 2268574.906964583322406 ], [ 527945.524065824458376, 2268696.484912291169167 ], [ 527908.4538718406111, 2268778.20782879460603 ], [ 528022.961413916083984, 2268862.299864370375872 ], [ 528019.110656087985262, 2268893.875103335827589 ], [ 528094.379563829745166, 2268934.652040201239288 ], [ 528237.151254123426042, 2269117.938918752595782 ], [ 528266.904051995952614, 2269242.624670655466616 ], [ 528328.300515666604042, 2269213.738396409898996 ], [ 528407.90362411364913, 2269182.69291081186384 ], [ 528578.709538186900318, 2269267.338933072984219 ], [ 528508.358567774062976, 2269594.415852745994925 ], [ 528395.295025483821519, 2269580.504422791302204 ], [ 528335.211524024605751, 2269608.771535910665989 ], [ 528173.145159600651823, 2269636.35043054446578 ], [ 528073.774529481423087, 2269823.173126276582479 ], [ 527936.614171347813681, 2269763.548566808924079 ], [ 527738.212652405374683, 2269713.169319749809802 ], [ 527551.437615369912237, 2269712.767209219746292 ], [ 527437.524348766193725, 2269611.52379956189543 ], [ 527348.220492918975651, 2269577.430294867604971 ], [ 527191.325302408193238, 2269509.224924736656249 ], [ 527081.688695051008835, 2269560.801926786080003 ], [ 526954.965403906186111, 2269582.364116857759655 ], [ 526869.532935650087893, 2269667.601586062461138 ], [ 526592.007275032927282, 2269709.88615018222481 ], [ 526453.085449987091124, 2269750.650782733224332 ], [ 526264.37952611700166, 2269981.4614253398031 ], [ 526198.629544294904917, 2270033.753268295899034 ], [ 526208.402806169819087, 2270114.633601160719991 ], [ 526299.052319870097563, 2270207.345554015599191 ], [ 526339.300069650402293, 2270402.119875438511372 ], [ 526261.20376579486765, 2270584.933782305568457 ], [ 526295.261889709276147, 2270658.97996433544904 ], [ 526236.205851944163442, 2270871.646915161982179 ], [ 526183.241154050454497, 2270956.891559485346079 ], [ 526182.983981928788126, 2271030.125886514782906 ], [ 526177.450547389220446, 2271075.485001182183623 ], [ 526199.217354551423341, 2271325.002812910825014 ], [ 526309.460146183846518, 2271384.72512989398092 ], [ 526343.247345622861758, 2271428.099484143778682 ], [ 526323.88837384514045, 2271586.808697561733425 ], [ 526574.646226301905699, 2271702.643821118399501 ], [ 526611.029033814324066, 2271798.131251792423427 ], [ 526656.66462429263629, 2271844.800051030702889 ], [ 526813.898232582607307, 2271929.976121957413852 ], [ 526869.997282949043438, 2271965.490136805921793 ], [ 526900.587221668800339, 2271965.555856906808913 ], [ 526965.2205488079926, 2271973.509832140058279 ], [ 527108.831905476981774, 2271830.235003541223705 ], [ 527240.512267098994926, 2271798.003050576895475 ], [ 527627.624820914352313, 2272184.494490063749254 ], [ 527690.308879950782284, 2272608.000812996178865 ], [ 527724.290056288475171, 2272681.867956773377955 ], [ 527746.66486636584159, 2272775.628830599598587 ], [ 527861.33044007292483, 2272892.883956989273429 ], [ 527836.43268858816009, 2273097.041084313765168 ], [ 527749.446729799266905, 2273166.221112071536481 ], [ 527808.614753842237405, 2273226.724808488041162 ], [ 527831.805451177759096, 2273328.184122058562934 ], [ 527688.120554339257069, 2273384.211924558505416 ], [ 527645.461080041015521, 2273464.407739519141614 ], [ 527483.43573400832247, 2273695.443691077642143 ], [ 527388.532075026188977, 2273718.671655836515129 ], [ 527328.444447997258976, 2273746.936662431806326 ], [ 527297.367302185622975, 2273743.112118494696915 ], [ 527152.304899013484828, 2273842.740268555469811 ], [ 527099.815702308784239, 2273895.103859884664416 ], [ 527012.789931282051839, 2274058.693047467619181 ], [ 526905.779164417064749, 2274084.884282926097512 ], [ 526795.617799092666246, 2274136.700399776920676 ], [ 526732.458957989932969, 2274161.325530483387411 ], [ 526732.061751422937959, 2274274.710038660094142 ], [ 526641.356406993349083, 2274420.689910447224975 ], [ 526545.147300845594145, 2274497.196844911202788 ], [ 526350.45235102600418, 2274530.316853499040008 ], [ 526289.950333209242672, 2274590.672271733172238 ], [ 526174.132804675144143, 2274576.419010952115059 ], [ 526016.973158667213283, 2274650.337197672575712 ], [ 525965.077063525910489, 2274788.576278627850115 ], [ 525964.354417481459677, 2274994.854868886992335 ], [ 526079.823215775890276, 2275057.400854394771159 ], [ 526224.475877251010388, 2275173.610040835104883 ], [ 526143.900610612239689, 2275548.124263022094965 ], [ 526315.999466963578016, 2275548.500743775628507 ], [ 526688.096228285925463, 2275277.400114550255239 ], [ 526892.546174407703802, 2275258.164346421137452 ], [ 526938.689894786570221, 2275171.425859907642007 ], [ 526973.828303752350621, 2275114.877728081308305 ], [ 527005.824072884628549, 2275054.73221518471837 ], [ 527044.034425618359819, 2274993.239528130739927 ], [ 527210.470962792285718, 2275013.71829548664391 ], [ 527279.701769795734435, 2274981.154729490168393 ], [ 527450.01634873682633, 2274959.920351896435022 ], [ 527495.852983798482455, 2274873.754867359995842 ], [ 527616.434228473110124, 2274826.738792533054948 ], [ 527650.514991931733675, 2274792.739559239707887 ], [ 527742.594559952383861, 2274756.836857955902815 ], [ 527859.033784299856052, 2274807.444677190855145 ], [ 528052.1987917823717, 2274865.741041852161288 ], [ 528187.222101871855557, 2274826.123406465165317 ], [ 528217.511503834044561, 2274829.850225144065917 ], [ 528361.796415384742431, 2274830.159538624808192 ], [ 528393.616197663825005, 2274871.001000476069748 ], [ 528514.063834357308224, 2274994.156265496276319 ], [ 528649.748126059421338, 2275036.372389417141676 ], [ 528899.907852462609299, 2274854.093829303048551 ], [ 529013.848408086691052, 2275000.331987584009767 ], [ 529043.554320765193552, 2275030.703596434555948 ], [ 529069.694236505427398, 2275064.254129406996071 ], [ 529218.614723437698558, 2275102.057274237275124 ], [ 529244.75476607226301, 2275135.607677478343248 ], [ 529304.264519438147545, 2275167.836905512958765 ], [ 529360.208314944873564, 2275203.245016444474459 ], [ 529481.461315077613108, 2275249.522713329643011 ], [ 529743.798123248154297, 2275316.114199483767152 ], [ 529783.008827674784698, 2275366.438289485871792 ], [ 529834.505033136229031, 2275419.087504650466144 ], [ 529950.931004522601143, 2275419.333548391237855 ], [ 530060.45530946215149, 2275488.650454773567617 ], [ 530119.965781516977586, 2275520.878541929647326 ], [ 530146.106507171411067, 2275554.428248027339578 ], [ 530205.289925259305164, 2275614.93571934569627 ], [ 530440.287902735057287, 2275661.71953734010458 ], [ 530649.627392333117314, 2275765.428798376582563 ], [ 530712.194320906768553, 2275845.721653745509684 ], [ 530945.957821601186879, 2275927.147246568463743 ], [ 531018.698360498994589, 2275737.414399703033268 ], [ 531113.928465472534299, 2275693.903206414543092 ], [ 531349.834847829653881, 2275839.540485429577529 ], [ 531359.543307559448294, 2275806.450414376333356 ], [ 531364.825763892615214, 2275578.114030607044697 ], [ 531440.370687892893329, 2275453.473767942748964 ], [ 531484.704699373454787, 2275372.20988299138844 ], [ 531785.742152810911648, 2275744.45603060349822 ], [ 531875.279541353229433, 2275658.291359805501997 ], [ 532021.287862841272727, 2275673.268101685680449 ], [ 532122.098231487791054, 2275556.376018616370857 ], [ 532182.675982383778319, 2275398.35903546679765 ], [ 532252.822131279041059, 2275269.777921302244067 ], [ 532290.723174329730682, 2275233.304420095868409 ], [ 532443.399788568494841, 2275107.289364913478494 ], [ 532395.094515087315813, 2274999.195669490844011 ], [ 532369.874069676385261, 2274896.768801021389663 ], [ 532105.028810244170018, 2274498.694962985813618 ], [ 532242.62581058498472, 2274321.521976184099913 ], [ 532305.725656354916282, 2274055.688657674007118 ], [ 532103.051034395582974, 2273993.365929886698723 ], [ 532083.50343363347929, 2273535.074437100440264 ], [ 531956.063285724609159, 2273464.276471366174519 ], [ 531962.897083834512159, 2273168.905605908483267 ], [ 532031.977608819957823, 2273102.421829388476908 ], [ 532156.983137398026884, 2273080.46073932852596 ], [ 532301.04318340565078, 2273014.629107140935957 ], [ 532617.175301989191212, 2272897.572954228147864 ], [ 532746.035255677183159, 2272838.685312582179904 ], [ 533080.65492633311078, 2272772.054951036348939 ], [ 533241.935637588263489, 2272788.595621162094176 ], [ 533371.684103774721734, 2272736.374469659291208 ], [ 533450.376124717993662, 2272606.521966065280139 ], [ 533419.050889104721136, 2272494.067174553871155 ], [ 533427.847818418988027, 2272407.739222446456552 ], [ 533398.005253257229924, 2272370.835182636976242 ], [ 533339.073092118022032, 2272338.097238992340863 ], [ 533302.190865942742676, 2272188.292654788121581 ], [ 533172.740665716934018, 2272145.259075519628823 ], [ 533054.204883346450515, 2272108.807432372123003 ], [ 532969.76352326082997, 2272041.95486843958497 ], [ 532855.40932111768052, 2271956.770821483805776 ], [ 532886.738965393858962, 2271915.897840817458928 ], [ 532978.159046860411763, 2271879.102486703544855 ], [ 533030.188495591981336, 2271571.015311236493289 ], [ 533153.804866121849045, 2271539.801059836521745 ], [ 533266.63285126152914, 2271431.205111025832593 ], [ 533411.883712265756913, 2271420.290621853433549 ], [ 533406.08346938889008, 2271234.140703660435975 ], [ 533475.783148463116959, 2271106.362061346881092 ], [ 533510.405975121655501, 2271049.224525541998446 ], [ 533550.417494201683439, 2270869.231445644050837 ], [ 533693.836979878717102, 2270712.292524414137006 ], [ 533639.121640846016817, 2270490.041061722673476 ], [ 533459.963007167447358, 2270434.946831316687167 ], [ 533464.474427237524651, 2270239.819856305606663 ], [ 533544.978291145642288, 2270106.969485078006983 ], [ 533549.016914862440899, 2269932.259966387413442 ], [ 533670.646582069224678, 2269901.545562194660306 ], [ 533639.683957323082723, 2269835.770697230473161 ], [ 533446.023193669272587, 2269661.207494025118649 ], [ 533449.827190227806568, 2269623.870527346618474 ], [ 533362.934555432060733, 2269559.137452389113605 ], [ 533346.560397833934985, 2269264.771841835230589 ], [ 533189.358588236384094, 2269197.838361548259854 ], [ 533034.421684704022482, 2269346.973312850110233 ], [ 532942.910283103701659, 2269388.796564111486077 ], [ 532818.009740551118739, 2269319.404108870774508 ], [ 532728.314115932560526, 2269224.299561874940991 ], [ 532729.895628868835047, 2269155.942242214456201 ], [ 532862.285470407339744, 2269002.402180786244571 ], [ 532865.867980723152868, 2268847.587253539822996 ], [ 532876.634513445897028, 2268741.928324121981859 ], [ 532780.238109565339983, 2268670.113517521880567 ], [ 532825.254354836419225, 2268587.583722016774118 ], [ 532857.997579419170506, 2268560.55068854149431 ], [ 532946.2027237174334, 2268475.648671946488321 ], [ 533033.348966488847509, 2268477.582213248126209 ], [ 533187.751974661834538, 2268549.712718340568244 ], [ 533337.930458552786149, 2268735.452123460359871 ], [ 533451.061276415595785, 2268626.55645495839417 ], [ 533603.005459139938466, 2268606.945492814294994 ], [ 533663.42179151577875, 2268579.332932837307453 ], [ 533768.678375106886961, 2268536.961863172240555 ], [ 533882.482355063315481, 2268443.006496084854007 ], [ 533984.139925876865163, 2268236.267900924198329 ], [ 534089.619836270809174, 2268281.177078866399825 ], [ 534215.915354262571782, 2268223.449805771000683 ], [ 534316.594915288849734, 2268198.022010029293597 ], [ 534376.429435676662251, 2268088.314428013749421 ], [ 534431.447982233366929, 2268035.354290030896664 ], [ 534630.440708940033801, 2267944.395791183225811 ], [ 534692.982713632634841, 2267919.216344347223639 ], [ 534753.397846845444292, 2267891.602230970747769 ], [ 534889.904567408375442, 2267836.646704964339733 ], [ 534945.347450130037032, 2267691.983980281278491 ], [ 535009.660277489107102, 2267538.250916135497391 ], [ 534968.256997084710747, 2267248.397114332765341 ], [ 535125.466465420438908, 2267220.763783063739538 ], [ 535215.797564370557666, 2267194.968455080874264 ], [ 535270.614087639260106, 2267200.59015254676342 ], [ 535360.883686566259712, 2267164.248124927282333 ], [ 535436.488084198324941, 2267025.617913948372006 ], [ 535656.337523011141457, 2266970.083685633726418 ], [ 535754.203844519681297, 2266714.708340122364461 ], [ 535792.001728200353682, 2266624.351141636259854 ], [ 535796.722566204145551, 2266419.964767619967461 ], [ 535894.467672978062183, 2266375.27983773034066 ], [ 536111.934725472936407, 2266337.050118399783969 ], [ 536170.830350957461633, 2266288.419792449101806 ], [ 536203.322324726847, 2266228.841531565412879 ], [ 536423.360348314861767, 2266200.429594838060439 ], [ 536687.203507544007152, 2266021.090372386388481 ], [ 537090.028084834688343, 2265921.313365897163749 ], [ 537257.270187143352814, 2265886.955335529521108 ], [ 537318.527428311761469, 2265860.304987696930766 ], [ 537352.299669037107378, 2265802.192608362063766 ], [ 537327.931910993065685, 2265703.210532397963107 ], [ 537025.358875942765735, 2265193.433124313130975 ], [ 536976.108105799648911, 2264993.370016861706972 ], [ 536918.222824210301042, 2264820.922431023791432 ], [ 536938.60743757407181, 2264620.766350152902305 ], [ 536905.601684679393657, 2264579.944467013701797 ], [ 536810.833320183679461, 2264527.290159093216062 ], [ 536870.703408414963633, 2264428.464066124521196 ], [ 536824.504937451216392, 2264423.728435910306871 ], [ 536753.211205319268629, 2264492.369309844449162 ], [ 536567.820597663288936, 2264618.388783964328468 ], [ 536464.496785091003403, 2264616.103349786251783 ], [ 536366.148438069154508, 2264577.757009607739747 ], [ 536339.434850771795027, 2264544.718360905535519 ], [ 536295.743306185817346, 2264498.390319662168622 ], [ 536209.72858904057648, 2264391.997844087891281 ], [ 535963.630945563316345, 2264336.514444134198129 ], [ 535793.931944747571833, 2264178.292676206678152 ], [ 535586.017468864563853, 2264136.278286105953157 ], [ 535529.506427837884985, 2264101.38434799946845 ], [ 535470.582568152109161, 2264068.642482537776232 ], [ 535374.723239337676205, 2263824.877972896210849 ], [ 535129.916056116227992, 2263775.406888803467155 ], [ 534832.988073750166222, 2263648.970268772915006 ], [ 534398.746050423709676, 2263604.432735476642847 ], [ 534360.879347398644313, 2263635.700862380675972 ], [ 534301.182054125703871, 2263693.171514654532075 ], [ 534116.857984866714105, 2263711.183931536972523 ], [ 533969.41418577847071, 2263853.131375042721629 ], [ 533930.480815588030964, 2263821.632387063466012 ], [ 533895.142124209436588, 2263731.759730313904583 ], [ 533695.424060688936152, 2263653.876757798716426 ], [ 533569.181186143425293, 2263497.711549181491137 ], [ 533437.526643929770216, 2263446.368471321649849 ], [ 533276.410976060084067, 2263296.132546730339527 ], [ 533232.051040753605776, 2263278.832123060710728 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 8.0, "GRIDCODE": 45.0, "X_COORD": 559157.46924000001, "Y_COORD": 305735.49267000001 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 522413.580578323220834, 2262634.086276938207448 ], [ 522395.512312080943957, 2262710.195346393622458 ], [ 522358.857163881475572, 2262765.014983110129833 ], [ 522320.839920933241956, 2262900.55176190380007 ], [ 522144.357897683279589, 2262994.233956146985292 ], [ 522073.70918543782318, 2263019.233216682448983 ], [ 522037.571814159746282, 2263171.450087337754667 ], [ 522000.916168228664901, 2263226.269069742411375 ], [ 521951.792731245746836, 2263401.396940456703305 ], [ 521961.136942414625082, 2263557.071697369217873 ], [ 522027.027954615070485, 2263688.605497097596526 ], [ 521980.540969038323965, 2263936.984531380236149 ], [ 521990.464756941015366, 2264102.291049549356103 ], [ 521884.761211101198569, 2264125.796104303561151 ], [ 521831.090412038436625, 2264317.128206973895431 ], [ 521888.739836939843372, 2264432.207827508449554 ], [ 521967.473849593196064, 2264504.494880724698305 ], [ 521992.549585822212975, 2264793.177209069952369 ], [ 521705.23685717722401, 2264738.682902970351279 ], [ 521661.040136049501598, 2264787.802575503475964 ], [ 521666.92273773701163, 2264885.798584450036287 ], [ 521621.496987901977263, 2264985.889440075494349 ], [ 521584.156473759445362, 2265157.298891102895141 ], [ 521721.365390465245582, 2265354.837653742171824 ], [ 521758.933692752209026, 2265463.58891807962209 ], [ 521556.448443942645099, 2265607.470324520953 ], [ 521517.282302637409884, 2265686.990563810802996 ], [ 521437.866965447552502, 2265743.421603569760919 ], [ 521272.601332331250887, 2265780.166677605360746 ], [ 521242.118361591303255, 2265842.054346247576177 ], [ 521151.069972374767531, 2265952.71044390834868 ], [ 521110.406555943656713, 2265981.603775840252638 ], [ 521079.923370103584602, 2266043.491149132139981 ], [ 521028.660104724520352, 2266120.145682052709162 ], [ 520997.281945746624842, 2266142.441239301115274 ], [ 521018.456367149017751, 2266237.068837082013488 ], [ 521091.629729841602966, 2266285.750168958678842 ], [ 521269.678152327716816, 2266329.427707220427692 ], [ 521409.998390907247085, 2266456.775880264118314 ], [ 521549.518786043277942, 2266497.322730393148959 ], [ 521482.604732344858348, 2266730.540754388086498 ], [ 521445.961800302262418, 2266882.170582401566207 ], [ 521382.935857584758196, 2266978.739499464631081 ], [ 521470.633499815070536, 2267062.204695403575897 ], [ 521427.109769171045627, 2267183.238148995675147 ], [ 521337.629831334692426, 2267293.556765848770738 ], [ 521248.587759721267503, 2267429.989048782736063 ], [ 521155.939589672489092, 2267752.887287980876863 ], [ 521235.762338784115855, 2267805.989505880512297 ], [ 521383.925280544499401, 2267872.902261993847787 ], [ 521443.723358009476215, 2267912.682305381633341 ], [ 521625.225473685830366, 2267797.311360362917185 ], [ 521689.293997670814861, 2267773.887984053231776 ], [ 521793.839871797536034, 2267661.804959821514785 ], [ 522058.097737649513874, 2267651.17593109048903 ], [ 522203.748976831673644, 2267852.772529229521751 ], [ 522250.019086917105597, 2267896.805136046372354 ], [ 522276.040683978993911, 2267969.674763661809266 ], [ 522456.849549000617117, 2268141.746283378452063 ], [ 522494.559610717289615, 2268247.346243017353117 ], [ 522525.407313822652213, 2268276.700998855754733 ], [ 522571.146268611308187, 2268340.006643121130764 ], [ 522637.86378801742103, 2268214.957834421657026 ], [ 522658.430116120493039, 2268089.954672794789076 ], [ 522656.652205379214138, 2268043.227289081551135 ], [ 522720.996094062109478, 2268019.701888733543456 ], [ 522843.267740242474247, 2267933.872174689546227 ], [ 522939.020472795295063, 2267882.202704519033432 ], [ 523001.044531325460412, 2267709.711527671664953 ], [ 523117.757368978112936, 2267651.575430504977703 ], [ 523190.787012709712144, 2267683.565207591280341 ], [ 523209.147088419878855, 2267901.940903121605515 ], [ 523273.062959448376205, 2267899.368202320300043 ], [ 523406.892171394138131, 2267988.388871726579964 ], [ 523558.510971156414598, 2268066.429870169609785 ], [ 523676.691930709639564, 2268229.993258128874004 ], [ 523823.373015875171404, 2268327.55912915430963 ], [ 523934.135034346370958, 2268305.883620558306575 ], [ 524026.560086800775025, 2268191.92609241604805 ], [ 524057.545027588144876, 2268130.616671510972083 ], [ 524074.678669448068831, 2268117.973015731200576 ], [ 524093.249802222009748, 2268042.449405930936337 ], [ 524271.381178679061122, 2267850.668191149830818 ], [ 524390.810380873270333, 2267498.583223748020828 ], [ 524447.178133564768359, 2267180.650416051968932 ], [ 524696.652748789289035, 2267216.664757032878697 ], [ 524885.666850144392811, 2267087.072031574323773 ], [ 524933.979743719799444, 2267037.099841332063079 ], [ 525085.436120910686441, 2266979.890361288562417 ], [ 525127.846053046872839, 2266807.407793269492686 ], [ 525163.489732942078263, 2266751.430894132703543 ], [ 525205.476482099969871, 2266670.456740093417466 ], [ 525290.221893971553072, 2266638.444553031586111 ], [ 525397.411166137433611, 2266586.544756439514458 ], [ 525511.792751029599458, 2266559.409607904963195 ], [ 525509.29252090328373, 2266411.380367033183575 ], [ 525620.172108629718423, 2266272.6701201768592 ], [ 525617.083057608339004, 2266089.81454602163285 ], [ 525746.769577884697355, 2265999.752971841022372 ], [ 525881.217871312983334, 2265977.603326163254678 ], [ 525965.881195203633979, 2265844.634161904454231 ], [ 525913.549992989283055, 2265675.509736176580191 ], [ 525855.966138969059102, 2265676.584413143806159 ], [ 525657.565067492192611, 2265512.829985865391791 ], [ 525519.249207274871878, 2265388.601727245375514 ], [ 525257.398416140233167, 2265250.299164625816047 ], [ 525375.736732293269597, 2265099.185026642866433 ], [ 525538.393805336207151, 2265122.66317311860621 ], [ 525660.116524327313527, 2265029.384086828678846 ], [ 525691.604957980336621, 2264968.651929351501167 ], [ 525776.347978203324601, 2264936.638093441724777 ], [ 525818.333304917672649, 2264855.661097794771194 ], [ 526028.881703963503242, 2264636.553957773372531 ], [ 526094.859630996128544, 2264366.966064197011292 ], [ 525941.488387806806713, 2264321.534232380799949 ], [ 525746.556512368842959, 2264125.763421887531877 ], [ 525679.97300088906195, 2264090.594906032085419 ], [ 525605.26807940134313, 2263991.011978360824287 ], [ 525487.436241156188771, 2263993.211793354712427 ], [ 525380.767842129105702, 2263923.976649858057499 ], [ 525250.81246627192013, 2263885.478000247851014 ], [ 525225.254944002139382, 2263851.409176059998572 ], [ 525084.378341239644215, 2263712.406787506304681 ], [ 525118.914815104100853, 2263602.960510020144284 ], [ 525183.286171079264022, 2263455.286221758462489 ], [ 525055.334473852766678, 2263267.01641677506268 ], [ 525032.283374229911715, 2263069.398890484124422 ], [ 524933.202946178498678, 2263003.074400825425982 ], [ 524919.158584498451091, 2263019.256961370818317 ], [ 524854.085834793513641, 2263041.527142088860273 ], [ 524814.693381255143322, 2263254.544641271233559 ], [ 524745.852430460625328, 2263337.031950263306499 ], [ 524704.697643610299565, 2263537.72165528126061 ], [ 524391.834548714221455, 2263584.269300524145365 ], [ 524200.134015379066113, 2263514.53363570664078 ], [ 523968.176240761298686, 2263459.640908195637167 ], [ 523859.941839448176324, 2263584.346932671964169 ], [ 523661.866025024617556, 2263601.816182930953801 ], [ 523630.640484120987821, 2263302.834708991460502 ], [ 523478.311234497232363, 2263167.927947171963751 ], [ 523297.940346663875971, 2263125.240999551489949 ], [ 523096.534411668544635, 2262953.733890210278332 ], [ 523042.671834331704304, 2262792.466622814536095 ], [ 523054.86578535917215, 2262734.612751349806786 ], [ 523049.617902225989383, 2262671.30031325481832 ], [ 522795.168544295942411, 2262584.311752894893289 ], [ 522630.385189320950303, 2262638.131978056393564 ], [ 522491.870819284988102, 2262608.516085969284177 ], [ 522413.580578323220834, 2262634.086276938207448 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 9.0, "GRIDCODE": 46.0, "X_COORD": 577243.98702999996, "Y_COORD": 305480.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540808.402652573771775, 2263145.670855690725148 ], [ 540792.993585543241352, 2263192.546168859116733 ], [ 540754.835505998344161, 2263245.63798829074949 ], [ 540725.893553280155174, 2263309.279303587041795 ], [ 540681.070490805665031, 2263371.643993375822902 ], [ 540716.366510953870602, 2263574.989794016815722 ], [ 540700.006049026502296, 2263637.658191251568496 ], [ 540704.018760660546832, 2263668.13308431673795 ], [ 540691.413821188965812, 2263716.41642711404711 ], [ 540722.693646926782094, 2263850.118842489086092 ], [ 540687.108377693337388, 2263986.438130587339401 ], [ 540763.892116675386205, 2264049.671578537672758 ], [ 540674.028297421871684, 2264106.598610164597631 ], [ 540632.72802154708188, 2264232.22758879698813 ], [ 540568.0992245094385, 2264322.150492773391306 ], [ 540539.156903564464301, 2264385.790629534982145 ], [ 540456.057442838442512, 2264438.431325383484364 ], [ 540350.131581432302482, 2264459.730664155445993 ], [ 540245.374972611200064, 2264530.644444339908659 ], [ 540009.249648689758033, 2264457.36890481133014 ], [ 539911.831514176097699, 2264372.039164987392724 ], [ 539865.458967245533131, 2264356.538369011133909 ], [ 539749.218997779884376, 2264449.048541481606662 ], [ 539647.584062521113083, 2264673.15327525511384 ], [ 539647.323655065149069, 2264751.441089099273086 ], [ 539585.137894365820102, 2265009.644054742529988 ], [ 539625.514240224845707, 2265150.589844631962478 ], [ 539608.857806138694286, 2265287.383226136676967 ], [ 539641.200665131094866, 2265357.677896626293659 ], [ 539698.356051893206313, 2265357.788234928622842 ], [ 539785.558914119377732, 2265368.499299169518054 ], [ 540041.290208508726209, 2265479.61716896854341 ], [ 540073.531604902585968, 2265564.205607227049768 ], [ 540113.859400166664273, 2265605.437241493724287 ], [ 540450.797870335401967, 2265733.999880330637097 ], [ 540492.525359209976159, 2265787.554326789453626 ], [ 540537.082993995863944, 2265833.108600215986371 ], [ 540567.701333780889399, 2265961.339905549772084 ], [ 540543.088763096835464, 2266163.50017736852169 ], [ 540410.91646385518834, 2266435.224523204378784 ], [ 540525.608710956177674, 2266497.330195712856948 ], [ 540591.423747000982985, 2266538.980469184927642 ], [ 540569.166432958329096, 2266721.806725247763097 ], [ 540442.12767386669293, 2266822.90836338698864 ], [ 540374.887789395055734, 2266890.032332548871636 ], [ 540374.319831797853112, 2267062.094733916223049 ], [ 540286.471981093287468, 2267203.574782248586416 ], [ 540030.040984591818415, 2267222.133353074081242 ], [ 539985.18945250636898, 2267235.308266942389309 ], [ 540007.126034280401655, 2267330.109947119839489 ], [ 540226.248307245201431, 2267540.243919119238853 ], [ 540211.923335226252675, 2267640.736746184527874 ], [ 540137.401746682706289, 2267757.835636836476624 ], [ 540139.764398628729396, 2267895.700063220225275 ], [ 540096.216384547646157, 2267929.08895284216851 ], [ 540099.390975655172952, 2268114.343681680969894 ], [ 540305.562539756996557, 2268110.438895131461322 ], [ 540409.565036772168241, 2268248.982667317613959 ], [ 540437.03171151294373, 2268367.667912626639009 ], [ 540527.612066869274713, 2268515.48561492562294 ], [ 540759.04318022064399, 2268743.680487001314759 ], [ 540791.242557612247765, 2268924.458390759304166 ], [ 540693.731543847825378, 2269046.50618633441627 ], [ 540694.264938092324883, 2269077.656840995885432 ], [ 540669.8887312336592, 2269248.674669584259391 ], [ 540710.9164819996804, 2269289.127562591806054 ], [ 540734.61086059990339, 2269353.291888731531799 ], [ 540804.852995425113477, 2269385.631759653799236 ], [ 540915.428274515783414, 2269332.055905261076987 ], [ 541052.868503438774496, 2269312.61820531077683 ], [ 541211.417459116550162, 2269382.912709315307438 ], [ 541414.576446802122518, 2269443.020799592137337 ], [ 541442.319796347175725, 2269518.146055513061583 ], [ 541472.599847075762227, 2269548.002674979157746 ], [ 541485.385087410337292, 2269565.031479675322771 ], [ 541682.582447906956077, 2269564.935298657976091 ], [ 541777.214636684511788, 2269510.777110863476992 ], [ 541848.616005351534113, 2269496.923860353417695 ], [ 541863.41573992127087, 2269481.608331201598048 ], [ 541969.721830553608015, 2269441.415605361573398 ], [ 542175.062994924839586, 2269329.097234979271889 ], [ 542518.047822136548348, 2269322.585715111345053 ], [ 542675.286408705287613, 2269532.023917167447507 ], [ 542846.588222338934429, 2269486.996023095212877 ], [ 542959.486937619978562, 2269358.675311082042754 ], [ 543023.301360042882152, 2269212.175162095576525 ], [ 543020.990668254788034, 2269077.791146784089506 ], [ 543221.558975289110094, 2269044.683819230645895 ], [ 543269.846613433095627, 2268994.706852441653609 ], [ 543364.091604271437973, 2268922.442008206620812 ], [ 543309.363320785923861, 2268876.268836593255401 ], [ 543163.184812040417455, 2268821.695465070195496 ], [ 543195.441848160233349, 2268748.305028419010341 ], [ 543258.271706624422222, 2268700.129010556265712 ], [ 543184.638917541946284, 2268582.747405841015279 ], [ 543033.973772907746024, 2268503.238972326740623 ], [ 543032.577306400169618, 2268421.975788954645395 ], [ 543049.650015113060363, 2268302.143373450264335 ], [ 543044.238327095634304, 2267986.966944338753819 ], [ 543116.411217829911038, 2267655.71843250002712 ], [ 543003.815297371009365, 2267499.30360221862793 ], [ 543026.614128620247357, 2267339.298671893775463 ], [ 542948.933772254385985, 2267235.822572172619402 ], [ 542849.498287281836383, 2267137.780163035728037 ], [ 542765.76586749823764, 2267001.143366541713476 ], [ 542739.502728832652792, 2266930.020307728089392 ], [ 542665.754255167790689, 2266857.302488751709461 ], [ 542660.685798262129538, 2266562.123601106926799 ], [ 542725.693174115614966, 2266459.963064596988261 ], [ 542669.45228554517962, 2266269.019939310848713 ], [ 542763.399587809923105, 2266151.420627129264176 ], [ 542761.35757019277662, 2266032.577363109216094 ], [ 542781.275024232920259, 2265892.822180766612291 ], [ 542550.76059589360375, 2265685.907956505194306 ], [ 542377.039168452145532, 2265594.222932049073279 ], [ 542276.830720868427306, 2265460.725660002790391 ], [ 542176.025370101211593, 2265423.085325004532933 ], [ 542120.658487811335362, 2265387.174923178739846 ], [ 542060.582349901436828, 2265355.465780364349484 ], [ 542009.44762164785061, 2265287.344649040140212 ], [ 541948.89051536237821, 2265227.629517692141235 ], [ 541920.264163568965159, 2265189.494657907634974 ], [ 541753.910080498433672, 2265031.922450557351112 ], [ 541610.066666001221165, 2264904.334369909949601 ], [ 541578.183841998456046, 2264766.55008821375668 ], [ 541437.746827880153432, 2264640.48046535346657 ], [ 541101.052223730250262, 2264467.683751289732754 ], [ 541150.681706517585553, 2264347.723149885423481 ], [ 541359.132396680535749, 2264130.673785446211696 ], [ 541337.165183303877711, 2264038.830499260686338 ], [ 541308.764554782188497, 2263978.862285470589995 ], [ 541290.701143421116285, 2263824.366097850725055 ], [ 541233.898419654695317, 2263704.43084947951138 ], [ 541188.793483635177836, 2263509.482948610559106 ], [ 541076.70846016285941, 2263418.138114308938384 ], [ 540985.521545954165049, 2263370.004106206819415 ], [ 540902.915088936453685, 2263288.537533828057349 ], [ 540914.64097395981662, 2263206.278269457630813 ], [ 540883.135404009721242, 2263164.304223172366619 ], [ 540808.402652573771775, 2263145.670855690725148 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 10.0, "GRIDCODE": 47.0, "X_COORD": 562657.1984, "Y_COORD": 306175.56835000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 524933.202946178498678, 2263003.074400825425982 ], [ 525032.283374229911715, 2263069.398890484124422 ], [ 525055.334473852766678, 2263267.01641677506268 ], [ 525183.286171079264022, 2263455.286221758462489 ], [ 525118.914815104100853, 2263602.960510020144284 ], [ 525084.378341239644215, 2263712.406787506304681 ], [ 525225.254944002139382, 2263851.409176059998572 ], [ 525250.81246627192013, 2263885.478000247851014 ], [ 525380.767842129105702, 2263923.976649858057499 ], [ 525487.436241156188771, 2263993.211793354712427 ], [ 525605.26807940134313, 2263991.011978360824287 ], [ 525679.97300088906195, 2264090.594906032085419 ], [ 525746.556512368842959, 2264125.763421887531877 ], [ 525941.488387806806713, 2264321.534232380799949 ], [ 526094.859630996128544, 2264366.966064197011292 ], [ 526028.881703963503242, 2264636.553957773372531 ], [ 525818.333304917672649, 2264855.661097794771194 ], [ 525776.347978203324601, 2264936.638093441724777 ], [ 525691.604957980336621, 2264968.651929351501167 ], [ 525660.116524327313527, 2265029.384086828678846 ], [ 525538.393805336207151, 2265122.66317311860621 ], [ 525375.736732293269597, 2265099.185026642866433 ], [ 525257.398416140233167, 2265250.299164625816047 ], [ 525519.249207274871878, 2265388.601727245375514 ], [ 525657.565067492192611, 2265512.829985865391791 ], [ 525855.966138969059102, 2265676.584413143806159 ], [ 525913.549992989283055, 2265675.509736176580191 ], [ 525965.881195203633979, 2265844.634161904454231 ], [ 525881.217871312983334, 2265977.603326163254678 ], [ 525746.769577884697355, 2265999.752971841022372 ], [ 525617.083057608339004, 2266089.81454602163285 ], [ 525620.172108629718423, 2266272.6701201768592 ], [ 525509.29252090328373, 2266411.380367033183575 ], [ 525511.792751029599458, 2266559.409607904963195 ], [ 525397.411166137433611, 2266586.544756439514458 ], [ 525290.221893971553072, 2266638.444553031586111 ], [ 525205.476482099969871, 2266670.456740093417466 ], [ 525163.489732942078263, 2266751.430894132703543 ], [ 525127.846053046872839, 2266807.407793269492686 ], [ 525085.436120910686441, 2266979.890361288562417 ], [ 524933.979743719799444, 2267037.099841332063079 ], [ 524885.666850144392811, 2267087.072031574323773 ], [ 524696.652748789289035, 2267216.664757032878697 ], [ 524447.178133564768359, 2267180.650416051968932 ], [ 524390.810380873270333, 2267498.583223748020828 ], [ 524271.381178679061122, 2267850.668191149830818 ], [ 524093.249802222009748, 2268042.449405930936337 ], [ 524074.678669448068831, 2268117.973015731200576 ], [ 524098.037640358088538, 2268149.107891727238894 ], [ 524507.248707975959405, 2268263.92981759365648 ], [ 524557.203648983850144, 2268313.213206077925861 ], [ 524621.104570869472809, 2268398.381843870505691 ], [ 524696.788450774736702, 2268473.047999357804656 ], [ 524780.546114930068143, 2268584.680575084872544 ], [ 525146.671954727498814, 2268637.528477255254984 ], [ 525264.003288150532171, 2268564.099404721520841 ], [ 525376.550979640916921, 2268606.158222377300262 ], [ 525483.004044833709486, 2268653.392563962377608 ], [ 525666.663135147537105, 2268649.96638654358685 ], [ 525779.252548558404669, 2268741.754507468082011 ], [ 525939.42863063456025, 2268826.342498641461134 ], [ 526216.547511380165815, 2269011.804038724862039 ], [ 526176.263210817356594, 2269130.735205971635878 ], [ 526023.250236710649915, 2269188.533362303860486 ], [ 526024.838520862162113, 2269282.440345059148967 ], [ 526001.003406122792512, 2269449.372299506329 ], [ 526115.910496113239788, 2269664.276439815759659 ], [ 526075.917281373171136, 2269860.992011013440788 ], [ 526010.63741937384475, 2269963.506408548913896 ], [ 526198.629544294904917, 2270033.753268295899034 ], [ 526264.37952611700166, 2269981.4614253398031 ], [ 526453.085449987091124, 2269750.650782733224332 ], [ 526592.007275032927282, 2269709.88615018222481 ], [ 526869.532935650087893, 2269667.601586062461138 ], [ 526954.965403906186111, 2269582.364116857759655 ], [ 527081.688695051008835, 2269560.801926786080003 ], [ 527191.325302408193238, 2269509.224924736656249 ], [ 527348.220492918975651, 2269577.430294867604971 ], [ 527437.524348766193725, 2269611.52379956189543 ], [ 527551.437615369912237, 2269712.767209219746292 ], [ 527738.212652405374683, 2269713.169319749809802 ], [ 527936.614171347813681, 2269763.548566808924079 ], [ 528073.774529481423087, 2269823.173126276582479 ], [ 528173.145159600651823, 2269636.35043054446578 ], [ 528335.211524024605751, 2269608.771535910665989 ], [ 528395.295025483821519, 2269580.504422791302204 ], [ 528508.358567774062976, 2269594.415852745994925 ], [ 528578.709538186900318, 2269267.338933072984219 ], [ 528407.90362411364913, 2269182.69291081186384 ], [ 528328.300515666604042, 2269213.738396409898996 ], [ 528266.904051995952614, 2269242.624670655466616 ], [ 528237.151254123426042, 2269117.938918752595782 ], [ 528094.379563829745166, 2268934.652040201239288 ], [ 528019.110656087985262, 2268893.875103335827589 ], [ 528022.961413916083984, 2268862.299864370375872 ], [ 527908.4538718406111, 2268778.20782879460603 ], [ 527945.524065824458376, 2268696.484912291169167 ], [ 528098.377611850271933, 2268574.906964583322406 ], [ 528104.739370927796699, 2268522.73157256282866 ], [ 527860.242469220655039, 2268357.60219809319824 ], [ 527948.27795857784804, 2268215.893029665574431 ], [ 528093.784341139020398, 2267875.23259817250073 ], [ 527905.670627951039933, 2267852.083559374324977 ], [ 527761.933049995801412, 2267851.774534756317735 ], [ 527615.605728822527453, 2267744.309393420815468 ], [ 527615.941488711512648, 2267648.686623430810869 ], [ 527770.657926588319242, 2267562.393761076964438 ], [ 527779.749779933015816, 2267487.845167849212885 ], [ 527779.954567167325877, 2267429.715527324005961 ], [ 527816.975951948086731, 2267370.121082770638168 ], [ 527868.569734207703732, 2267273.11477264482528 ], [ 527938.26260380691383, 2267317.238506853580475 ], [ 528057.261971994652413, 2267381.709991314448416 ], [ 528141.507686491473578, 2267489.86613224633038 ], [ 528317.19923418504186, 2267490.244980056770146 ], [ 528365.474484486039728, 2267496.185384642332792 ], [ 528638.731330284033902, 2267438.187673501670361 ], [ 528685.035830224049278, 2267363.648159339092672 ], [ 528685.245351053425111, 2267303.589156962931156 ], [ 528717.769913264201023, 2267303.658414953388274 ], [ 528747.457661377382465, 2267307.310318158008158 ], [ 528916.419102796819061, 2267307.671472917310894 ], [ 529132.040146662155166, 2267389.990438947454095 ], [ 529274.503555396222509, 2267451.920852123759687 ], [ 529433.701961666578427, 2267471.507962239906192 ], [ 529660.795776582206599, 2267344.834197266958654 ], [ 529692.79270660399925, 2267259.571140233427286 ], [ 529580.248048111796379, 2267049.533129216171801 ], [ 529486.462918002624065, 2266988.677237748168409 ], [ 529339.720035529346205, 2266945.222683609463274 ], [ 529269.995591546525247, 2266876.443531091324985 ], [ 529233.655270291143097, 2266649.491953869350255 ], [ 529125.952950490172952, 2266421.998596380464733 ], [ 529145.083630351466127, 2266287.968267420306802 ], [ 529116.3060837861849, 2266209.982883062213659 ], [ 529032.079465315444395, 2266086.078389067202806 ], [ 529005.831777885556221, 2266014.946976441890001 ], [ 528868.979880120139569, 2265879.943624265491962 ], [ 528843.468641748651862, 2265720.610631437040865 ], [ 528724.463956629741006, 2265528.875764149241149 ], [ 528599.343097900389694, 2265405.442178502678871 ], [ 528574.894919697311707, 2265299.69358158390969 ], [ 528518.587855127290823, 2265207.752883200533688 ], [ 528496.959756248281337, 2265072.666568835265934 ], [ 528430.050585372024216, 2264931.327905183658004 ], [ 528384.47371149843093, 2264807.799172998405993 ], [ 528109.833858188940212, 2264587.783494408242404 ], [ 528056.969754761084914, 2264444.502238925546408 ], [ 527946.364289944525808, 2264335.380240867845714 ], [ 527925.883408636320382, 2264101.253086955286562 ], [ 527846.980754051823169, 2264023.409629330039024 ], [ 527882.614638918195851, 2263896.35912459064275 ], [ 527950.10776438692119, 2263811.910246301442385 ], [ 527948.813041337998584, 2263735.369767190888524 ], [ 527967.099872153368779, 2263607.262232849374413 ], [ 527922.194722548825666, 2263512.393295161426067 ], [ 527884.67778226302471, 2263384.892024648375809 ], [ 527861.730169591493905, 2263285.614462411031127 ], [ 527771.147742986795492, 2263287.309255665168166 ], [ 527751.502166219986975, 2263062.686882766894996 ], [ 527698.682733727968298, 2263010.572397023439407 ], [ 527650.855330618331209, 2262854.209190477617085 ], [ 527537.95693517010659, 2262794.580328756943345 ], [ 527536.565499300835654, 2262712.182384960353374 ], [ 527547.257563663762994, 2262637.283193379640579 ], [ 527544.356181009672582, 2262465.6828154604882 ], [ 527576.449993751593865, 2262351.9517752379179 ], [ 527440.382333703455515, 2262357.451226782985032 ], [ 527200.91618230228778, 2262375.157188693992794 ], [ 526876.129696537856944, 2262294.460597498342395 ], [ 526847.885997957084328, 2262256.809153323993087 ], [ 526727.318673126050271, 2262315.198702279478312 ], [ 526546.321908395853825, 2262345.022663587704301 ], [ 526502.853975386940874, 2262546.841469229198992 ], [ 526206.837163127260283, 2262491.942379706539214 ], [ 526054.329596627037972, 2262494.790371739305556 ], [ 525838.099445785395801, 2262613.000088446773589 ], [ 525727.189343207865022, 2262522.561499454081059 ], [ 525579.611525071319193, 2262455.141427473165095 ], [ 525554.05462959012948, 2262421.071982120163739 ], [ 525406.477214610553347, 2262353.651307250373065 ], [ 525336.565702254883945, 2262260.452466360293329 ], [ 525228.0251150210388, 2262372.735533173196018 ], [ 525166.387285478063859, 2262419.973710666410625 ], [ 524798.57899919920601, 2262434.818424502387643 ], [ 524705.710112730157562, 2262530.888170237652957 ], [ 524707.176913333707489, 2262617.872262793593109 ], [ 524826.58577905735001, 2262680.947168429382145 ], [ 524892.482893296866678, 2262768.796125609427691 ], [ 524918.067434692406096, 2262988.139542977325618 ], [ 524933.202946178498678, 2263003.074400825425982 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 11.0, "GRIDCODE": 42.0, "X_COORD": 572539.42342999997, "Y_COORD": 303530.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 536592.96686977148056, 2261190.860079796053469 ], [ 536573.806082676281221, 2261234.843918783590198 ], [ 536598.817471754504368, 2261356.857612194493413 ], [ 536577.782661037170328, 2261504.361803092062473 ], [ 536666.77247292548418, 2261592.14094228297472 ], [ 536688.778842207393609, 2261794.874413941986859 ], [ 536486.615814114571549, 2261871.299315230920911 ], [ 536372.070339769357815, 2261854.788211967796087 ], [ 536287.176592149888165, 2261856.388486756011844 ], [ 536136.998951755464077, 2262011.810901908203959 ], [ 536048.825665673124604, 2261954.600333451293409 ], [ 535966.253004929749295, 2261956.158221480436623 ], [ 535765.644575283280574, 2262163.76678673364222 ], [ 535544.117199399042875, 2261983.186294766142964 ], [ 535444.824750320287421, 2261985.058625837787986 ], [ 535338.707576272310689, 2261843.63795802090317 ], [ 535231.376892853993922, 2261954.713843885809183 ], [ 535031.450725755188614, 2262107.989979634992778 ], [ 534994.736811572220176, 2262102.697191546671093 ], [ 534907.889360969536938, 2262144.773930050432682 ], [ 534848.019336439552717, 2262260.297678069211543 ], [ 534658.11461711791344, 2262232.916390395723283 ], [ 534363.928371260291897, 2262254.710387150757015 ], [ 534226.932137830299325, 2262165.816851790063083 ], [ 534071.468867274816148, 2262263.166645904071629 ], [ 533942.486185056972317, 2262218.696149695664644 ], [ 533673.836077485699207, 2262173.985688575543463 ], [ 533631.257617735886015, 2262155.097044872120023 ], [ 533617.216765237506479, 2262171.282189977355301 ], [ 533563.723333181347698, 2262352.017876790836453 ], [ 533578.475604130188003, 2262529.640616257674992 ], [ 533533.092271235189401, 2262745.143214055337012 ], [ 533423.278291081194766, 2262820.291305357590318 ], [ 533326.978504610364325, 2262931.288921282626688 ], [ 533283.245030052261427, 2263208.402004208415747 ], [ 533232.051040753605776, 2263278.832123060710728 ], [ 533276.410976060084067, 2263296.132546730339527 ], [ 533437.526643929770216, 2263446.368471321649849 ], [ 533569.181186143425293, 2263497.711549181491137 ], [ 533695.424060688936152, 2263653.876757798716426 ], [ 533895.142124209436588, 2263731.759730313904583 ], [ 533930.480815588030964, 2263821.632387063466012 ], [ 533969.41418577847071, 2263853.131375042721629 ], [ 534116.857984866714105, 2263711.183931536972523 ], [ 534301.182054125703871, 2263693.171514654532075 ], [ 534360.879347398644313, 2263635.700862380675972 ], [ 534398.746050423709676, 2263604.432735476642847 ], [ 534832.988073750166222, 2263648.970268772915006 ], [ 535129.916056116227992, 2263775.406888803467155 ], [ 535374.723239337676205, 2263824.877972896210849 ], [ 535470.582568152109161, 2264068.642482537776232 ], [ 535529.506427837884985, 2264101.38434799946845 ], [ 535586.017468864563853, 2264136.278286105953157 ], [ 535793.931944747571833, 2264178.292676206678152 ], [ 535963.630945563316345, 2264336.514444134198129 ], [ 536209.72858904057648, 2264391.997844087891281 ], [ 536295.743306185817346, 2264498.390319662168622 ], [ 536339.434850771795027, 2264544.718360905535519 ], [ 536366.148438069154508, 2264577.757009607739747 ], [ 536464.496785091003403, 2264616.103349786251783 ], [ 536567.820597663288936, 2264618.388783964328468 ], [ 536753.211205319268629, 2264492.369309844449162 ], [ 536824.504937451216392, 2264423.728435910306871 ], [ 536870.703408414963633, 2264428.464066124521196 ], [ 536810.833320183679461, 2264527.290159093216062 ], [ 536905.601684679393657, 2264579.944467013701797 ], [ 536938.60743757407181, 2264620.766350152902305 ], [ 536918.222824210301042, 2264820.922431023791432 ], [ 536976.108105799648911, 2264993.370016861706972 ], [ 537025.358875942765735, 2265193.433124313130975 ], [ 537327.931910993065685, 2265703.210532397963107 ], [ 537352.299669037107378, 2265802.192608362063766 ], [ 537612.028634619899094, 2265746.049372563138604 ], [ 537991.993871906772256, 2265944.147016389295459 ], [ 538190.359486676286906, 2265994.484792076982558 ], [ 538485.653953505097888, 2266122.799695757217705 ], [ 538847.808679221663624, 2266248.28890638705343 ], [ 539156.404056031140499, 2266444.421670119278133 ], [ 539435.858365831431001, 2266730.145055290311575 ], [ 539660.504756809212267, 2267018.4505127472803 ], [ 539841.864696780336089, 2267164.121330265887082 ], [ 539985.18945250636898, 2267235.308266942389309 ], [ 540030.040984591818415, 2267222.133353074081242 ], [ 540286.471981093287468, 2267203.574782248586416 ], [ 540374.319831797853112, 2267062.094733916223049 ], [ 540374.887789395055734, 2266890.032332548871636 ], [ 540442.12767386669293, 2266822.90836338698864 ], [ 540569.166432958329096, 2266721.806725247763097 ], [ 540591.423747000982985, 2266538.980469184927642 ], [ 540525.608710956177674, 2266497.330195712856948 ], [ 540410.91646385518834, 2266435.224523204378784 ], [ 540543.088763096835464, 2266163.50017736852169 ], [ 540567.701333780889399, 2265961.339905549772084 ], [ 540537.082993995863944, 2265833.108600215986371 ], [ 540492.525359209976159, 2265787.554326789453626 ], [ 540450.797870335401967, 2265733.999880330637097 ], [ 540113.859400166664273, 2265605.437241493724287 ], [ 540073.531604902585968, 2265564.205607227049768 ], [ 540041.290208508726209, 2265479.61716896854341 ], [ 539785.558914119377732, 2265368.499299169518054 ], [ 539698.356051893206313, 2265357.788234928622842 ], [ 539641.200665131094866, 2265357.677896626293659 ], [ 539608.857806138694286, 2265287.383226136676967 ], [ 539625.514240224845707, 2265150.589844631962478 ], [ 539585.137894365820102, 2265009.644054742529988 ], [ 539647.323655065149069, 2264751.441089099273086 ], [ 539647.584062521113083, 2264673.15327525511384 ], [ 539749.218997779884376, 2264449.048541481606662 ], [ 539865.458967245533131, 2264356.538369011133909 ], [ 539852.101421556086279, 2264340.019910336472094 ], [ 539765.254245273536071, 2264275.322302687913179 ], [ 539735.972867401666008, 2264239.111343093216419 ], [ 539621.894379906821996, 2264175.73507931176573 ], [ 539532.743585725547746, 2264105.148936702869833 ], [ 539306.307190261082724, 2264100.154251165688038 ], [ 539152.26991181448102, 2263970.421427303925157 ], [ 539170.630810038070194, 2263790.082736629992723 ], [ 539143.235845765215345, 2263691.72748829703778 ], [ 539206.629077020683326, 2263639.373970014974475 ], [ 539185.749851802363992, 2263512.734676579944789 ], [ 539104.540330928633921, 2263375.90939178224653 ], [ 539146.115074041183107, 2263222.469182816334069 ], [ 539240.690678328624927, 2263092.989689037203789 ], [ 539290.434463137178682, 2263051.905771075747907 ], [ 539243.151186202885583, 2262882.136792837642133 ], [ 539293.91942009946797, 2262760.743729163892567 ], [ 539192.738029309781268, 2262653.46023001242429 ], [ 539104.376419239677489, 2262544.169218959286809 ], [ 539037.905595374642871, 2262507.238393130712211 ], [ 539005.630894539062865, 2262425.177606861107051 ], [ 538822.287025100784376, 2262557.755710986442864 ], [ 538578.690415566088632, 2262532.787784844636917 ], [ 538466.198295587440953, 2262561.2153628654778 ], [ 538386.99843041645363, 2262597.428508793003857 ], [ 538332.372912916704081, 2262539.508380446583033 ], [ 538277.568669868865982, 2262471.719920067116618 ], [ 538145.434561867732555, 2262355.498188617639244 ], [ 537984.606624182779342, 2262266.141988089308143 ], [ 537948.553917094366625, 2262227.909851404838264 ], [ 537917.579232380841859, 2262102.076107732951641 ], [ 537812.041747535695322, 2262036.90913231484592 ], [ 537521.292038678308018, 2261961.827459974214435 ], [ 537488.702331483713351, 2261927.267510341480374 ], [ 537462.674979455885477, 2261719.205921709537506 ], [ 537354.742110943421721, 2261677.121191616170108 ], [ 537298.232904688105918, 2261642.227768637239933 ], [ 537138.803875083220191, 2261553.641013569198549 ], [ 537038.738031587912701, 2261373.214668553322554 ], [ 536960.125862118904479, 2261289.848849616013467 ], [ 536909.147861758479849, 2261226.791461848653853 ], [ 536592.96686977148056, 2261190.860079796053469 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 12.0, "GRIDCODE": 49.0, "X_COORD": 580523.00589000003, "Y_COORD": 305541.73961 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 542980.905563623760827, 2260922.986125017516315 ], [ 542797.330664299777709, 2260984.736625831574202 ], [ 542705.081433928571641, 2261091.106385263614357 ], [ 542652.181559070246294, 2261127.323503837920725 ], [ 542566.765103135956451, 2261253.099256861023605 ], [ 542476.728134810691699, 2261233.882204105146229 ], [ 542415.770289933308959, 2261142.86572088021785 ], [ 542288.212006801506504, 2261054.523254834115505 ], [ 542095.987364981439896, 2261117.388839896768332 ], [ 542051.302031904808246, 2261231.591842137277126 ], [ 542152.345514583517797, 2261321.030854401178658 ], [ 542176.189235338242725, 2261356.629507368430495 ], [ 542219.259007603279315, 2261394.75075760949403 ], [ 542236.537876075250097, 2261557.358208751305938 ], [ 542020.610527600278147, 2261662.3968684701249 ], [ 541964.455273352214135, 2261727.14473691675812 ], [ 541754.236686978139915, 2261799.17224436532706 ], [ 541711.231811241479591, 2261888.880551360547543 ], [ 541547.395929698832333, 2262056.166780860163271 ], [ 541515.566705121658742, 2262148.760641302913427 ], [ 541459.851224700454623, 2262230.140466983430088 ], [ 541414.91953917813953, 2262323.864427192136645 ], [ 541314.428352006012574, 2262434.632448769174516 ], [ 541254.519606265123002, 2262559.597781473770738 ], [ 541169.804722824716009, 2262683.331394832581282 ], [ 541047.040483510121703, 2262657.127360693179071 ], [ 541065.506552582490258, 2262879.147111428901553 ], [ 541018.779794921632856, 2262869.172313680872321 ], [ 540893.735222757444717, 2262951.249555248767138 ], [ 540861.463532317662612, 2263045.124144811183214 ], [ 540808.402652573771775, 2263145.670855690725148 ], [ 540883.135404009721242, 2263164.304223172366619 ], [ 540914.64097395981662, 2263206.278269457630813 ], [ 540902.915088936453685, 2263288.537533828057349 ], [ 540985.521545954165049, 2263370.004106206819415 ], [ 541076.70846016285941, 2263418.138114308938384 ], [ 541188.793483635177836, 2263509.482948610559106 ], [ 541233.898419654695317, 2263704.43084947951138 ], [ 541290.701143421116285, 2263824.366097850725055 ], [ 541308.764554782188497, 2263978.862285470589995 ], [ 541337.165183303877711, 2264038.830499260686338 ], [ 541359.132396680535749, 2264130.673785446211696 ], [ 541150.681706517585553, 2264347.723149885423481 ], [ 541101.052223730250262, 2264467.683751289732754 ], [ 541437.746827880153432, 2264640.48046535346657 ], [ 541578.183841998456046, 2264766.55008821375668 ], [ 541610.066666001221165, 2264904.334369909949601 ], [ 541753.910080498433672, 2265031.922450557351112 ], [ 541920.264163568965159, 2265189.494657907634974 ], [ 541948.89051536237821, 2265227.629517692141235 ], [ 542009.44762164785061, 2265287.344649040140212 ], [ 542060.582349901436828, 2265355.465780364349484 ], [ 542120.658487811335362, 2265387.174923178739846 ], [ 542176.025370101211593, 2265423.085325004532933 ], [ 542276.830720868427306, 2265460.725660002790391 ], [ 542377.039168452145532, 2265594.222932049073279 ], [ 542550.76059589360375, 2265685.907956505194306 ], [ 542781.275024232920259, 2265892.822180766612291 ], [ 542761.35757019277662, 2266032.577363109216094 ], [ 542763.399587809923105, 2266151.420627129264176 ], [ 542669.45228554517962, 2266269.019939310848713 ], [ 542725.693174115614966, 2266459.963064596988261 ], [ 542660.685798262129538, 2266562.123601106926799 ], [ 542665.754255167790689, 2266857.302488751709461 ], [ 542739.502728832652792, 2266930.020307728089392 ], [ 542765.76586749823764, 2267001.143366541713476 ], [ 542849.498287281836383, 2267137.780163035728037 ], [ 542948.933772254385985, 2267235.822572172619402 ], [ 543026.614128620247357, 2267339.298671893775463 ], [ 543003.815297371009365, 2267499.30360221862793 ], [ 543116.411217829911038, 2267655.71843250002712 ], [ 543044.238327095634304, 2267986.966944338753819 ], [ 543049.650015113060363, 2268302.143373450264335 ], [ 543032.577306400169618, 2268421.975788954645395 ], [ 543033.973772907746024, 2268503.238972326740623 ], [ 543184.638917541946284, 2268582.747405841015279 ], [ 543258.271706624422222, 2268700.129010556265712 ], [ 543195.441848160233349, 2268748.305028419010341 ], [ 543163.184812040417455, 2268821.695465070195496 ], [ 543309.363320785923861, 2268876.268836593255401 ], [ 543364.091604271437973, 2268922.442008206620812 ], [ 543269.846613433095627, 2268994.706852441653609 ], [ 543221.558975289110094, 2269044.683819230645895 ], [ 543020.990668254788034, 2269077.791146784089506 ], [ 543023.301360042882152, 2269212.175162095576525 ], [ 542959.486937619978562, 2269358.675311082042754 ], [ 542846.588222338934429, 2269486.996023095212877 ], [ 542675.286408705287613, 2269532.023917167447507 ], [ 542518.047822136548348, 2269322.585715111345053 ], [ 542175.062994924839586, 2269329.097234979271889 ], [ 541969.721830553608015, 2269441.415605361573398 ], [ 541863.41573992127087, 2269481.608331201598048 ], [ 541848.616005351534113, 2269496.923860353417695 ], [ 541891.487900443491526, 2269515.548121529631317 ], [ 542122.682149480679072, 2269561.530468169599771 ], [ 542121.310501967789605, 2269982.307144517078996 ], [ 542074.449635604047216, 2270367.2891442226246 ], [ 542324.918956202804111, 2270602.594525692053139 ], [ 542471.206962878466584, 2270602.869967431761324 ], [ 542564.841531698475592, 2270698.578678118996322 ], [ 542568.824050930794328, 2271129.160815447568893 ], [ 542656.549000894301571, 2271294.815243201330304 ], [ 542697.116107345675118, 2271498.085078754462302 ], [ 542722.281520656542853, 2271705.843155149370432 ], [ 542767.776928584789857, 2271804.686704106628895 ], [ 542792.050949321710505, 2271868.337140456773341 ], [ 542806.904032311402261, 2271883.519581764936447 ], [ 542852.311422269791365, 2271841.358796551823616 ], [ 542943.058343540062197, 2271845.116443241015077 ], [ 542982.941000528866425, 2271892.634741854853928 ], [ 543121.647074241423979, 2271950.450745152309537 ], [ 543295.914311077445745, 2271957.665733645670116 ], [ 543467.187915808637626, 2271971.845685209147632 ], [ 543566.186337677412666, 2271946.064638951793313 ], [ 543741.244406099081971, 2271897.446237397380173 ], [ 543889.659373622038402, 2272026.583072066307068 ], [ 543948.022956023691222, 2272059.821313144639134 ], [ 543997.459827825427055, 2272118.723994323983788 ], [ 544113.790939030703157, 2272209.466341842897236 ], [ 544210.019998259260319, 2272166.743483548052609 ], [ 544604.157639973447658, 2272161.257139532826841 ], [ 544624.023774124798365, 2271687.90694337990135 ], [ 544663.396459785290062, 2271621.276397754438221 ], [ 544735.553834490594454, 2271413.598315597511828 ], [ 544783.90444177237805, 2271372.173509030602872 ], [ 544830.577680900343694, 2271328.829501807689667 ], [ 544927.973074991488829, 2271245.382554406300187 ], [ 544936.648260256159119, 2271038.65436642523855 ], [ 544972.26240934280213, 2270974.960598952136934 ], [ 545005.140197079977952, 2270946.789755383506417 ], [ 545016.503791224444285, 2270676.081580091267824 ], [ 545178.52697911427822, 2270537.254318603314459 ], [ 545212.71503280242905, 2270476.107372745871544 ], [ 545395.437091038445942, 2270451.707474829629064 ], [ 545403.868347019073553, 2270250.820004612207413 ], [ 545440.611481376457959, 2270188.630323979072273 ], [ 545490.093346055480652, 2270100.126083778217435 ], [ 545548.991269969847053, 2270000.440843764692545 ], [ 545478.174904730753042, 2269786.523154151625931 ], [ 545569.268419562256895, 2269564.147184266708791 ], [ 545570.652100029983558, 2269531.22708553634584 ], [ 545604.770306455553509, 2269473.479816051200032 ], [ 545653.216335435863584, 2269286.109730284661055 ], [ 545738.758270827704109, 2269212.8106191130355 ], [ 545753.798311684047803, 2269030.537555898539722 ], [ 545696.105927623109892, 2268967.127684677019715 ], [ 545947.168257782352157, 2268768.772038745693862 ], [ 546089.545277802739292, 2268675.328507990576327 ], [ 546230.351541978074238, 2268544.55452139955014 ], [ 546565.107442869339138, 2268371.024149478413165 ], [ 546513.820459713460878, 2268252.843400608748198 ], [ 546561.504849029472098, 2268048.613201715052128 ], [ 546571.052924244431779, 2267821.05051442515105 ], [ 546735.21910537884105, 2267778.280319344252348 ], [ 546853.290064231376164, 2267677.102186943404377 ], [ 546972.653299203957431, 2267566.238038557581604 ], [ 547098.416034752153791, 2267513.984908630140126 ], [ 547160.031578132649884, 2267461.183038827031851 ], [ 547123.558681423193775, 2267179.459855380468071 ], [ 547076.435962905292399, 2266965.577944054268301 ], [ 547056.635124887805432, 2266812.626787123270333 ], [ 547005.855281009571627, 2266756.813184141181409 ], [ 547121.813876123051159, 2266726.602662583813071 ], [ 547173.338733728625812, 2266678.743610970675945 ], [ 547381.732149393064901, 2266640.917931081727147 ], [ 547523.632764602196403, 2266509.11262212600559 ], [ 547670.884252416202798, 2266521.293883726932108 ], [ 547706.717849115259014, 2266460.632997672073543 ], [ 547772.033938425011002, 2266343.787278736941516 ], [ 547831.456113956752233, 2266406.662909822538495 ], [ 547939.06127800536342, 2266534.880628199316561 ], [ 548102.625800457550213, 2266513.39142297860235 ], [ 548310.18125674687326, 2266377.149928300641477 ], [ 548361.041850958717987, 2266247.114122799597681 ], [ 548425.807442155783065, 2266186.954730866476893 ], [ 548490.267127961385995, 2266131.712729505263269 ], [ 548567.150768720777705, 2266060.296927473507822 ], [ 548720.028926152735949, 2266039.868191358633339 ], [ 548804.182566945790313, 2265961.695243586786091 ], [ 548988.53293008392211, 2265831.911012597382069 ], [ 548926.727558346581645, 2265603.755137001164258 ], [ 548928.821625647484325, 2265553.80950350407511 ], [ 548936.237177059636451, 2265463.910043135285378 ], [ 548853.758353625307791, 2265322.777509650215507 ], [ 548810.550785675295629, 2265077.894736833870411 ], [ 548577.14338160736952, 2265004.815086849965155 ], [ 548517.410514164832421, 2264968.854857281781733 ], [ 548403.583730316953734, 2264904.024436760693789 ], [ 548347.350874265423045, 2264807.794835182838142 ], [ 548276.280329603818245, 2264632.687100294977427 ], [ 548186.050416557467543, 2264525.167740076780319 ], [ 548042.90887899545487, 2264395.144913556985557 ], [ 547994.951766533311456, 2264206.267529128119349 ], [ 547918.435278088552877, 2264029.926882424391806 ], [ 547921.159243724192493, 2263964.998706047423184 ], [ 547928.607250703847967, 2263874.724446796812117 ], [ 547671.854600769933313, 2263807.330627957358956 ], [ 547605.851540527306497, 2263734.779221 ], [ 547521.063495132140815, 2263633.737540592439473 ], [ 547289.086215520394035, 2263657.269580510444939 ], [ 547184.29886025050655, 2263798.707204817794263 ], [ 547118.525447152205743, 2263884.698324660770595 ], [ 547085.54065456893295, 2263943.707918462343514 ], [ 546966.549910703208297, 2263993.151284158229828 ], [ 546898.738405338488519, 2264051.266168146394193 ], [ 546896.173005184042268, 2264112.396499140188098 ], [ 546658.670940029551275, 2264158.42712861392647 ], [ 546338.668459249543957, 2263929.338913712650537 ], [ 546340.017011095187627, 2263897.162616769783199 ], [ 546353.020276584313251, 2263739.595104055479169 ], [ 546196.589526337804273, 2263617.542195041663945 ], [ 546032.674292999086902, 2263603.974851699545979 ], [ 545907.295383588178083, 2263659.655551203526556 ], [ 545849.071399250184186, 2263624.600238542072475 ], [ 545762.730798673816025, 2263575.416116586886346 ], [ 545773.2218292276375, 2263325.526831959374249 ], [ 545907.693996361223981, 2263144.025542051531374 ], [ 546003.118993245065212, 2263062.245088871568441 ], [ 545983.044459994183853, 2262853.943700504489243 ], [ 545877.363076880341396, 2262689.363925105892122 ], [ 545791.691904198145494, 2262595.184355608187616 ], [ 545709.825001287390478, 2262497.613575764931738 ], [ 545651.47116985253524, 2262464.371910772286355 ], [ 545570.131408555898815, 2262367.431107721291482 ], [ 545331.458562017418444, 2262413.68271021079272 ], [ 545220.403229283750989, 2262355.0668399995193 ], [ 545154.295307210180908, 2262282.389321777038276 ], [ 545115.907857981976122, 2262187.786559251137078 ], [ 545040.733969526248984, 2262184.674414291977882 ], [ 544955.319173111463897, 2261918.010553631931543 ], [ 544840.664828351116739, 2261831.358608447015285 ], [ 544687.619534898200072, 2261648.950850076042116 ], [ 544629.806700418470427, 2261644.163109821267426 ], [ 544492.257303696358576, 2261679.997642182745039 ], [ 544380.338311217492446, 2261775.91254931781441 ], [ 544328.947226810734719, 2261867.841697496362031 ], [ 544286.636582904378884, 2261805.36771135777235 ], [ 544274.142755994689651, 2261527.442862433381379 ], [ 544195.572431166307069, 2261346.318540693260729 ], [ 544170.014209133340046, 2261283.323137843050063 ], [ 544011.309113183408044, 2261397.149015827104449 ], [ 543894.194384297472425, 2261387.44992371276021 ], [ 543723.963112512486987, 2261380.400437721982598 ], [ 543575.473014251794666, 2261217.138177326880395 ], [ 543548.175628044526093, 2261184.600365956313908 ], [ 543459.848043807782233, 2261180.942059740424156 ], [ 543373.158161527477205, 2261113.290208817459643 ], [ 543106.232416603364982, 2261067.092368170619011 ], [ 543065.302133193123154, 2261018.302696214057505 ], [ 543008.19231790152844, 2260955.512677179649472 ], [ 542980.905563623760827, 2260922.986125017516315 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 13.0, "GRIDCODE": 43.0, "X_COORD": 554938.66362000001, "Y_COORD": 303267.2987 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 519820.120919636916369, 2259146.896098244003952 ], [ 519713.179863742785528, 2259182.735791412182152 ], [ 519611.547904350154568, 2259133.849103799089789 ], [ 519561.351732295297552, 2259205.429760558530688 ], [ 519493.894698017975315, 2259354.053235692903399 ], [ 519458.755016038136091, 2259410.610711395740509 ], [ 519419.423145869746804, 2259542.958280254155397 ], [ 519278.051588983449619, 2259655.396346577443182 ], [ 519042.128846167470329, 2259890.779339744709432 ], [ 519005.43562328547705, 2259988.516586067155004 ], [ 518970.295269817870576, 2260045.073162422515452 ], [ 518922.70105353515828, 2260354.034066556021571 ], [ 519076.3069269109983, 2260511.226835083216429 ], [ 519023.690125960565638, 2260595.910090525634587 ], [ 518944.916233658266719, 2260586.199488626793027 ], [ 518824.478365956514608, 2260489.369757101871073 ], [ 518751.876204747299198, 2260450.010810173116624 ], [ 518573.529106927278917, 2260449.59466665610671 ], [ 518418.141080131579656, 2260767.923915736377239 ], [ 518377.042373487958685, 2260793.87885114364326 ], [ 518231.324903537053615, 2260701.569273394532502 ], [ 518179.765478393586818, 2260753.006977296434343 ], [ 518146.51146505062934, 2260779.45266168564558 ], [ 518116.396797370282002, 2260809.496876569464803 ], [ 518075.297923134639859, 2260835.451556778512895 ], [ 517969.405592117924243, 2260768.369015647098422 ], [ 517799.428764474578202, 2260703.422754133120179 ], [ 517638.347968325135298, 2260588.202103945426643 ], [ 517356.874879058101214, 2260587.539040008559823 ], [ 517294.285495334421284, 2260935.392026850022376 ], [ 517144.333392740983982, 2261019.003875877708197 ], [ 517099.778177298197988, 2261137.667759672738612 ], [ 517125.125060938007664, 2261608.946774828247726 ], [ 517050.713100684515666, 2261783.093841576017439 ], [ 516973.365964955126401, 2261989.088141122832894 ], [ 517031.23255804379005, 2262048.307283989153802 ], [ 516913.435803773521911, 2262290.251578982919455 ], [ 516690.381604007619899, 2262532.294829138554633 ], [ 516690.232607675949112, 2262572.598540568724275 ], [ 516842.190585737349465, 2262728.104279382154346 ], [ 516980.99156166263856, 2262822.413142330013216 ], [ 517095.30202324455604, 2262708.38283319119364 ], [ 517132.914197171165142, 2262713.021203535608947 ], [ 517182.58386878593592, 2262843.485472676344216 ], [ 517173.56591095647309, 2262917.320087067782879 ], [ 516982.391189843183383, 2263124.767994244582951 ], [ 516914.925963022047654, 2263273.378824153915048 ], [ 516879.782533229736146, 2263329.931016867980361 ], [ 516837.418092728999909, 2263442.753776047378778 ], [ 516711.797968137194403, 2263473.482799646444619 ], [ 516662.596890238812193, 2263467.417649962007999 ], [ 516589.15948466619011, 2263467.24233324918896 ], [ 516531.205615079321433, 2263621.579809913411736 ], [ 516530.81201409175992, 2263727.984020309522748 ], [ 516757.978616498992778, 2263894.908808216452599 ], [ 516857.462142500269692, 2264022.694512723945081 ], [ 516955.347214423527475, 2264060.094131360761821 ], [ 517095.114341755921487, 2264120.895604496821761 ], [ 517338.906649725337047, 2264175.074047824367881 ], [ 517321.637219562369864, 2264316.474934688769281 ], [ 517521.12103358382592, 2264579.123241086490452 ], [ 517545.362999989360105, 2264642.793164572678506 ], [ 517734.652326212322805, 2264924.444915899075568 ], [ 517766.664019627554808, 2264957.199710665270686 ], [ 517807.495518031122629, 2265233.486736700870097 ], [ 517894.900900812761392, 2265297.706533955410123 ], [ 517938.767864637542516, 2265354.049114426597953 ], [ 517971.286697901552543, 2265623.541640008799732 ], [ 517927.42047704802826, 2265694.127947528846562 ], [ 518047.243244784825947, 2265739.903631016612053 ], [ 518169.24146555934567, 2265837.97329686395824 ], [ 518297.366063212568406, 2265800.395532351918519 ], [ 518484.200826782325748, 2265685.320932324975729 ], [ 518627.782937856216449, 2265542.094052287749946 ], [ 518829.711913372098934, 2265629.924858145415783 ], [ 518986.449408764077816, 2265668.254181011579931 ], [ 519098.718988701701164, 2265556.2609798964113 ], [ 519300.992122707655653, 2265491.916383666917682 ], [ 519442.780150136968587, 2265394.543867218308151 ], [ 519546.512737791112158, 2265354.105269507505 ], [ 519717.09720540168928, 2265514.513946115970612 ], [ 519875.873330020986032, 2265439.838753314688802 ], [ 520108.934718335804064, 2265518.819468137808144 ], [ 520211.214007504400797, 2265818.35673941206187 ], [ 520276.652198967989534, 2265960.690468883141875 ], [ 520267.414299424854107, 2266036.358249798417091 ], [ 520267.14028266799869, 2266111.903867325745523 ], [ 520246.894755785935558, 2266277.733488082885742 ], [ 520284.984056255954783, 2266360.579206357710063 ], [ 520407.071932045044377, 2266426.74613831564784 ], [ 520486.448118406464346, 2266426.929297428578138 ], [ 520572.41202792734839, 2266464.316548528149724 ], [ 520678.599855125590693, 2266499.479559276252985 ], [ 520728.09798141795909, 2266406.442615732550621 ], [ 520790.228827602230012, 2266357.034868421964347 ], [ 520959.284418724884745, 2266172.657716953195632 ], [ 520997.281945746624842, 2266142.441239301115274 ], [ 521028.660104724520352, 2266120.145682052709162 ], [ 521079.923370103584602, 2266043.491149132139981 ], [ 521110.406555943656713, 2265981.603775840252638 ], [ 521151.069972374767531, 2265952.71044390834868 ], [ 521242.118361591303255, 2265842.054346247576177 ], [ 521272.601332331250887, 2265780.166677605360746 ], [ 521437.866965447552502, 2265743.421603569760919 ], [ 521517.282302637409884, 2265686.990563810802996 ], [ 521556.448443942645099, 2265607.470324520953 ], [ 521758.933692752209026, 2265463.58891807962209 ], [ 521721.365390465245582, 2265354.837653742171824 ], [ 521584.156473759445362, 2265157.298891102895141 ], [ 521621.496987901977263, 2264985.889440075494349 ], [ 521666.92273773701163, 2264885.798584450036287 ], [ 521661.040136049501598, 2264787.802575503475964 ], [ 521705.23685717722401, 2264738.682902970351279 ], [ 521992.549585822212975, 2264793.177209069952369 ], [ 521967.473849593196064, 2264504.494880724698305 ], [ 521888.739836939843372, 2264432.207827508449554 ], [ 521831.090412038436625, 2264317.128206973895431 ], [ 521884.761211101198569, 2264125.796104303561151 ], [ 521990.464756941015366, 2264102.291049549356103 ], [ 521980.540969038323965, 2263936.984531380236149 ], [ 522027.027954615070485, 2263688.605497097596526 ], [ 521961.136942414625082, 2263557.071697369217873 ], [ 521951.792731245746836, 2263401.396940456703305 ], [ 522000.916168228664901, 2263226.269069742411375 ], [ 522037.571814159746282, 2263171.450087337754667 ], [ 522073.70918543782318, 2263019.233216682448983 ], [ 522144.357897683279589, 2262994.233956146985292 ], [ 522320.839920933241956, 2262900.55176190380007 ], [ 522358.857163881475572, 2262765.014983110129833 ], [ 522395.512312080943957, 2262710.195346393622458 ], [ 522413.580578323220834, 2262634.086276938207448 ], [ 522368.93506420677295, 2262617.033266866579652 ], [ 522295.437017943360843, 2262570.483299473300576 ], [ 522232.378929575381335, 2262436.049014214426279 ], [ 522350.290996839350555, 2262286.404235037975013 ], [ 522292.031033357488923, 2262159.674718836322427 ], [ 522260.640442476375028, 2261969.734925640746951 ], [ 522187.915576998551842, 2261895.324554233811796 ], [ 521928.716080117388628, 2261817.03303162753582 ], [ 521754.537794745818246, 2261943.960871143266559 ], [ 521686.190921788860578, 2261935.541162464767694 ], [ 521568.238751281809527, 2262053.225294359959662 ], [ 521503.108766240125988, 2262045.200179004110396 ], [ 521456.789055846573319, 2261923.552940853871405 ], [ 521412.247943337773904, 2261877.979286290705204 ], [ 521373.053929783753119, 2261827.636791981756687 ], [ 521284.365961686940864, 2261736.890119019895792 ], [ 521324.669249142927583, 2261672.020300013944507 ], [ 521325.044820754323155, 2261568.554528475739062 ], [ 521341.033848575898446, 2261437.56790925282985 ], [ 521279.194652598642278, 2261334.946258795447648 ], [ 521302.973661025171168, 2261140.146366969682276 ], [ 521245.885511695989408, 2261015.954923772253096 ], [ 521336.358088990382385, 2260980.67747360561043 ], [ 521456.830752645328175, 2260924.005069218575954 ], [ 521513.994259359489661, 2260581.366276844404638 ], [ 521487.067292153718881, 2260398.01162588968873 ], [ 521552.397847820888273, 2260201.93752427585423 ], [ 521404.180987858679146, 2259955.963325561024249 ], [ 521159.025376062374562, 2259907.088474655523896 ], [ 521115.820925496518612, 2259725.844734836369753 ], [ 520990.503229487105273, 2259550.10610719025135 ], [ 520854.776591850328259, 2259498.252683931030333 ], [ 520805.036606080073398, 2259434.357294037938118 ], [ 520734.008937452570535, 2259395.855320307426155 ], [ 520571.493763295526151, 2259265.197592443786561 ], [ 520430.846233354881406, 2259264.873952054418623 ], [ 520302.166994008875918, 2259344.15361035335809 ], [ 520162.56692301412113, 2259398.587799429893494 ], [ 520083.247397442290094, 2259388.811298373155296 ], [ 520034.107107120915316, 2259325.686828730627894 ], [ 519833.18416496674763, 2259163.678024154156446 ], [ 519820.120919636916369, 2259146.896098244003952 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 14.0, "GRIDCODE": 41.0, "X_COORD": 559153.06464, "Y_COORD": 301284.91191999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 519820.120919636916369, 2259146.896098244003952 ], [ 519833.18416496674763, 2259163.678024154156446 ], [ 520034.107107120915316, 2259325.686828730627894 ], [ 520083.247397442290094, 2259388.811298373155296 ], [ 520162.56692301412113, 2259398.587799429893494 ], [ 520302.166994008875918, 2259344.15361035335809 ], [ 520430.846233354881406, 2259264.873952054418623 ], [ 520571.493763295526151, 2259265.197592443786561 ], [ 520734.008937452570535, 2259395.855320307426155 ], [ 520805.036606080073398, 2259434.357294037938118 ], [ 520854.776591850328259, 2259498.252683931030333 ], [ 520990.503229487105273, 2259550.10610719025135 ], [ 521115.820925496518612, 2259725.844734836369753 ], [ 521159.025376062374562, 2259907.088474655523896 ], [ 521404.180987858679146, 2259955.963325561024249 ], [ 521552.397847820888273, 2260201.93752427585423 ], [ 521487.067292153718881, 2260398.01162588968873 ], [ 521513.994259359489661, 2260581.366276844404638 ], [ 521456.830752645328175, 2260924.005069218575954 ], [ 521336.358088990382385, 2260980.67747360561043 ], [ 521245.885511695989408, 2261015.954923772253096 ], [ 521302.973661025171168, 2261140.146366969682276 ], [ 521279.194652598642278, 2261334.946258795447648 ], [ 521341.033848575898446, 2261437.56790925282985 ], [ 521325.044820754323155, 2261568.554528475739062 ], [ 521324.669249142927583, 2261672.020300013944507 ], [ 521284.365961686940864, 2261736.890119019895792 ], [ 521373.053929783753119, 2261827.636791981756687 ], [ 521412.247943337773904, 2261877.979286290705204 ], [ 521456.789055846573319, 2261923.552940853871405 ], [ 521503.108766240125988, 2262045.200179004110396 ], [ 521568.238751281809527, 2262053.225294359959662 ], [ 521686.190921788860578, 2261935.541162464767694 ], [ 521754.537794745818246, 2261943.960871143266559 ], [ 521928.716080117388628, 2261817.03303162753582 ], [ 522187.915576998551842, 2261895.324554233811796 ], [ 522260.640442476375028, 2261969.734925640746951 ], [ 522292.031033357488923, 2262159.674718836322427 ], [ 522350.290996839350555, 2262286.404235037975013 ], [ 522232.378929575381335, 2262436.049014214426279 ], [ 522295.437017943360843, 2262570.483299473300576 ], [ 522368.93506420677295, 2262617.033266866579652 ], [ 522413.580578323220834, 2262634.086276938207448 ], [ 522491.870819284988102, 2262608.516085969284177 ], [ 522630.385189320950303, 2262638.131978056393564 ], [ 522795.168544295942411, 2262584.311752894893289 ], [ 523049.617902225989383, 2262671.30031325481832 ], [ 523054.86578535917215, 2262734.612751349806786 ], [ 523042.671834331704304, 2262792.466622814536095 ], [ 523096.534411668544635, 2262953.733890210278332 ], [ 523297.940346663875971, 2263125.240999551489949 ], [ 523478.311234497232363, 2263167.927947171963751 ], [ 523630.640484120987821, 2263302.834708991460502 ], [ 523661.866025024617556, 2263601.816182930953801 ], [ 523859.941839448176324, 2263584.346932671964169 ], [ 523968.176240761298686, 2263459.640908195637167 ], [ 524200.134015379066113, 2263514.53363570664078 ], [ 524391.834548714221455, 2263584.269300524145365 ], [ 524704.697643610299565, 2263537.72165528126061 ], [ 524745.852430460625328, 2263337.031950263306499 ], [ 524814.693381255143322, 2263254.544641271233559 ], [ 524854.085834793513641, 2263041.527142088860273 ], [ 524919.158584498451091, 2263019.256961370818317 ], [ 524933.202946178498678, 2263003.074400825425982 ], [ 524918.067434692406096, 2262988.139542977325618 ], [ 524892.482893296866678, 2262768.796125609427691 ], [ 524826.58577905735001, 2262680.947168429382145 ], [ 524707.176913333707489, 2262617.872262793593109 ], [ 524705.710112730157562, 2262530.888170237652957 ], [ 524798.57899919920601, 2262434.818424502387643 ], [ 525166.387285478063859, 2262419.973710666410625 ], [ 525228.0251150210388, 2262372.735533173196018 ], [ 525336.565702254883945, 2262260.452466360293329 ], [ 525406.477214610553347, 2262353.651307250373065 ], [ 525554.05462959012948, 2262421.071982120163739 ], [ 525579.611525071319193, 2262455.141427473165095 ], [ 525727.189343207865022, 2262522.561499454081059 ], [ 525838.099445785395801, 2262613.000088446773589 ], [ 526054.329596627037972, 2262494.790371739305556 ], [ 526206.837163127260283, 2262491.942379706539214 ], [ 526502.853975386940874, 2262546.841469229198992 ], [ 526546.321908395853825, 2262345.022663587704301 ], [ 526727.318673126050271, 2262315.198702279478312 ], [ 526847.885997957084328, 2262256.809153323993087 ], [ 526876.129696537856944, 2262294.460597498342395 ], [ 527200.91618230228778, 2262375.157188693992794 ], [ 527440.382333703455515, 2262357.451226782985032 ], [ 527576.449993751593865, 2262351.9517752379179 ], [ 527622.826835535350256, 2262318.986366436816752 ], [ 527661.902453888207674, 2262207.88054714910686 ], [ 527883.399899567011744, 2261961.328189741820097 ], [ 527868.191091416869313, 2261779.060196522623301 ], [ 527837.939323817263357, 2261681.628556664101779 ], [ 527860.693516580620781, 2261559.987078980542719 ], [ 527760.868894024868496, 2261402.004993980750442 ], [ 527723.558781605330296, 2261168.836598532274365 ], [ 527711.35352105088532, 2261151.289891262538731 ], [ 527664.109524683677591, 2261130.746926341205835 ], [ 527563.085978172719479, 2261130.527758043259382 ], [ 527474.032002416439354, 2261119.565103651955724 ], [ 527153.042740836041048, 2261118.870635160245001 ], [ 526947.001289870473556, 2261260.428412727080286 ], [ 526919.802253111614846, 2261146.384066643193364 ], [ 526865.352079141768627, 2261027.961668264120817 ], [ 526886.086751661030576, 2260857.970210880041122 ], [ 526886.830493140616454, 2260648.49598958529532 ], [ 526590.965990141732618, 2260456.135520330630243 ], [ 526425.989035700797103, 2260455.774349832907319 ], [ 526393.53804606187623, 2260414.098818293772638 ], [ 526260.288616172270849, 2260341.884490876458585 ], [ 526091.865468533826061, 2260457.596317595802248 ], [ 525636.892024755477905, 2260461.748561467044055 ], [ 525557.483661097357981, 2260359.764313787221909 ], [ 525516.794861399335787, 2260113.615373345091939 ], [ 525429.215778327663429, 2260024.009050885215402 ], [ 525373.200811875169165, 2260023.885731499642134 ], [ 525305.57965075422544, 2259981.059092339128256 ], [ 525345.771282387548126, 2259651.617910027503967 ], [ 525114.746964537887834, 2259415.239884687587619 ], [ 524791.28593434591312, 2259414.525443778373301 ], [ 524723.998330457136035, 2259593.808180404826999 ], [ 524525.184915587888099, 2259751.96603699028492 ], [ 524410.385491262772121, 2259659.68300162255764 ], [ 524321.150125754065812, 2259611.31841943692416 ], [ 524237.261530955205671, 2259558.184414773248136 ], [ 524132.181788569374476, 2259501.230181152001023 ], [ 524021.576170923945028, 2259654.793467284180224 ], [ 523977.732667252421379, 2259877.83712225779891 ], [ 523911.053247454750817, 2259792.195673664100468 ], [ 523836.81907721736934, 2259716.238637803122401 ], [ 523746.067200637073256, 2259599.674606626853347 ], [ 523529.470793693501037, 2259453.319885983131826 ], [ 523497.692730526963715, 2259190.057972761802375 ], [ 523334.415853638027329, 2259140.740212687291205 ], [ 523191.259021359262988, 2259025.655889675021172 ], [ 523038.036705376405735, 2258971.077921247109771 ], [ 522952.514312286977656, 2259056.418955900706351 ], [ 522829.874237943033222, 2259077.282154672779143 ], [ 522733.044880164321512, 2259136.945911339484155 ], [ 522732.514257942209952, 2259283.647023931145668 ], [ 522719.694238059280906, 2259388.687423967756331 ], [ 522399.065106931724586, 2259456.715336864814162 ], [ 522210.482412261713762, 2259337.261984844692051 ], [ 522157.203366099798586, 2259197.328348748385906 ], [ 521823.301776380627416, 2259130.762892071157694 ], [ 521712.006192139815539, 2259060.261652670800686 ], [ 521788.86267800751375, 2258936.547130272723734 ], [ 521515.696261940465774, 2258832.187810492701828 ], [ 521275.685366421472281, 2258831.641134887002409 ], [ 521131.256259161920752, 2258813.8430948657915 ], [ 521099.851293756510131, 2258773.501360257156193 ], [ 521054.061304811271839, 2258757.470341046340764 ], [ 520958.073014654626604, 2258712.208197169937193 ], [ 520903.606502649723552, 2258549.083034020848572 ], [ 520812.333455694955774, 2258406.818126703612506 ], [ 520762.181525778025389, 2258376.473341042175889 ], [ 520626.164260576188099, 2258448.14459924865514 ], [ 520513.435096546076238, 2258279.684564447961748 ], [ 520342.50103588408092, 2258369.754592386074364 ], [ 520202.878400758840144, 2258399.784071928821504 ], [ 520130.555374825955369, 2258550.517239838838577 ], [ 520056.230074228951707, 2258659.001175920479 ], [ 520011.26588169921888, 2258752.712532227858901 ], [ 519910.738714013888966, 2258863.446324034593999 ], [ 519797.306157454266213, 2259008.019869118928909 ], [ 519820.120919636916369, 2259146.896098244003952 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 15.0, "GRIDCODE": 40.0, "X_COORD": 574534.23484000005, "Y_COORD": 300399.34795000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 536455.228121668100357, 2257645.637239428237081 ], [ 536406.369873197400011, 2257718.743604091927409 ], [ 536308.405677539412864, 2257832.409425531513989 ], [ 536206.55828589387238, 2257971.845870933495462 ], [ 536236.797218361636624, 2258039.552079038694501 ], [ 536261.628038427326828, 2258102.705766230821609 ], [ 536320.545772039447911, 2258135.449971428140998 ], [ 536396.809326608548872, 2258182.550246190279722 ], [ 536500.868761141551659, 2258390.178626359440386 ], [ 536747.637119961436838, 2258395.637463969178498 ], [ 537075.863375625805929, 2258801.694511736743152 ], [ 537262.460883467807434, 2258859.086127907037735 ], [ 537424.241493225214072, 2258938.360409505665302 ], [ 537307.768317839014344, 2259073.500954331830144 ], [ 537264.008823519572616, 2259313.752465872094035 ], [ 536938.405096576083452, 2259324.956691641360521 ], [ 536893.215804311446846, 2259502.65535079035908 ], [ 536805.873014130396768, 2259465.461272011511028 ], [ 536703.421767850639299, 2259425.507703504525125 ], [ 536513.41470700642094, 2259453.488304581493139 ], [ 536328.648585990653373, 2259434.54136207792908 ], [ 536120.619456153945066, 2259429.938708704896271 ], [ 536204.320220130495727, 2259518.708144345320761 ], [ 536230.481449649087153, 2259560.554544681683183 ], [ 536130.394735966227017, 2259725.780339278280735 ], [ 536129.58842970454134, 2259760.616295680403709 ], [ 536332.172835275530815, 2259765.099488969892263 ], [ 536400.324050131719559, 2259807.188115251250565 ], [ 536382.499227686552331, 2259982.176845457404852 ], [ 536410.748619448044337, 2260045.424924360588193 ], [ 536429.944897936889902, 2260198.908043247647583 ], [ 536454.583277702215128, 2260326.062814454548061 ], [ 536509.267968285246752, 2260384.057388420216739 ], [ 536526.586221306235529, 2260567.649963902309537 ], [ 536551.987797337351367, 2260658.877298670820892 ], [ 536548.176792809157632, 2260696.287581350654364 ], [ 536661.746168408426456, 2260816.726805734448135 ], [ 536760.099131354829296, 2260938.390140789560974 ], [ 536789.737193066510372, 2261144.214818374253809 ], [ 536608.272791071794927, 2261176.123451967723668 ], [ 536592.96686977148056, 2261190.860079796053469 ], [ 536909.147861758479849, 2261226.791461848653853 ], [ 536960.125862118904479, 2261289.848849616013467 ], [ 537038.738031587912701, 2261373.214668553322554 ], [ 537138.803875083220191, 2261553.641013569198549 ], [ 537298.232904688105918, 2261642.227768637239933 ], [ 537354.742110943421721, 2261677.121191616170108 ], [ 537462.674979455885477, 2261719.205921709537506 ], [ 537488.702331483713351, 2261927.267510341480374 ], [ 537521.292038678308018, 2261961.827459974214435 ], [ 537812.041747535695322, 2262036.90913231484592 ], [ 537917.579232380841859, 2262102.076107732951641 ], [ 537948.553917094366625, 2262227.909851404838264 ], [ 537984.606624182779342, 2262266.141988089308143 ], [ 538145.434561867732555, 2262355.498188617639244 ], [ 538277.568669868865982, 2262471.719920067116618 ], [ 538332.372912916704081, 2262539.508380446583033 ], [ 538386.99843041645363, 2262597.428508793003857 ], [ 538466.198295587440953, 2262561.2153628654778 ], [ 538578.690415566088632, 2262532.787784844636917 ], [ 538822.287025100784376, 2262557.755710986442864 ], [ 539005.630894539062865, 2262425.177606861107051 ], [ 539037.905595374642871, 2262507.238393130712211 ], [ 539104.376419239677489, 2262544.169218959286809 ], [ 539192.738029309781268, 2262653.46023001242429 ], [ 539293.91942009946797, 2262760.743729163892567 ], [ 539243.151186202885583, 2262882.136792837642133 ], [ 539290.434463137178682, 2263051.905771075747907 ], [ 539240.690678328624927, 2263092.989689037203789 ], [ 539146.115074041183107, 2263222.469182816334069 ], [ 539104.540330928633921, 2263375.90939178224653 ], [ 539185.749851802363992, 2263512.734676579944789 ], [ 539206.629077020683326, 2263639.373970014974475 ], [ 539143.235845765215345, 2263691.72748829703778 ], [ 539170.630810038070194, 2263790.082736629992723 ], [ 539152.26991181448102, 2263970.421427303925157 ], [ 539306.307190261082724, 2264100.154251165688038 ], [ 539532.743585725547746, 2264105.148936702869833 ], [ 539621.894379906821996, 2264175.73507931176573 ], [ 539735.972867401666008, 2264239.111343093216419 ], [ 539765.254245273536071, 2264275.322302687913179 ], [ 539852.101421556086279, 2264340.019910336472094 ], [ 539865.458967245533131, 2264356.538369011133909 ], [ 539911.831514176097699, 2264372.039164987392724 ], [ 540009.249648689758033, 2264457.36890481133014 ], [ 540245.374972611200064, 2264530.644444339908659 ], [ 540350.131581432302482, 2264459.730664155445993 ], [ 540456.057442838442512, 2264438.431325383484364 ], [ 540539.156903564464301, 2264385.790629534982145 ], [ 540568.0992245094385, 2264322.150492773391306 ], [ 540632.72802154708188, 2264232.22758879698813 ], [ 540674.028297421871684, 2264106.598610164597631 ], [ 540763.892116675386205, 2264049.671578537672758 ], [ 540687.108377693337388, 2263986.438130587339401 ], [ 540722.693646926782094, 2263850.118842489086092 ], [ 540691.413821188965812, 2263716.41642711404711 ], [ 540704.018760660546832, 2263668.13308431673795 ], [ 540700.006049026502296, 2263637.658191251568496 ], [ 540716.366510953870602, 2263574.989794016815722 ], [ 540681.070490805665031, 2263371.643993375822902 ], [ 540725.893553280155174, 2263309.279303587041795 ], [ 540754.835505998344161, 2263245.63798829074949 ], [ 540792.993585543241352, 2263192.546168859116733 ], [ 540808.402652573771775, 2263145.670855690725148 ], [ 540861.463532317662612, 2263045.124144811183214 ], [ 540893.735222757444717, 2262951.249555248767138 ], [ 541018.779794921632856, 2262869.172313680872321 ], [ 541065.506552582490258, 2262879.147111428901553 ], [ 541047.040483510121703, 2262657.127360693179071 ], [ 541169.804722824716009, 2262683.331394832581282 ], [ 541254.519606265123002, 2262559.597781473770738 ], [ 541314.428352006012574, 2262434.632448769174516 ], [ 541414.91953917813953, 2262323.864427192136645 ], [ 541459.851224700454623, 2262230.140466983430088 ], [ 541515.566705121658742, 2262148.760641302913427 ], [ 541547.395929698832333, 2262056.166780860163271 ], [ 541711.231811241479591, 2261888.880551360547543 ], [ 541754.236686978139915, 2261799.17224436532706 ], [ 541964.455273352214135, 2261727.14473691675812 ], [ 542020.610527600278147, 2261662.3968684701249 ], [ 542236.537876075250097, 2261557.358208751305938 ], [ 542219.259007603279315, 2261394.75075760949403 ], [ 542176.189235338242725, 2261356.629507368430495 ], [ 541945.870603449759074, 2261480.069779383018613 ], [ 541820.803908155299723, 2261530.448753104545176 ], [ 541760.398096045828424, 2261558.073632091283798 ], [ 541697.865460435627028, 2261583.26388784404844 ], [ 541525.673151390277781, 2261687.770766155794263 ], [ 541178.222037885570899, 2261721.771650775335729 ], [ 541036.777083752327599, 2261498.989059219136834 ], [ 540969.145814237068407, 2261327.028913415037096 ], [ 540878.499557048198767, 2261291.689348026178777 ], [ 540821.989266251563095, 2261256.7995640123263 ], [ 540602.136721622780897, 2261134.656276316381991 ], [ 540385.978899991605431, 2261209.020000694319606 ], [ 540248.972736201481894, 2261088.515319948084652 ], [ 540205.453672925825231, 2261034.686256139539182 ], [ 540230.655753654777072, 2260787.118859025649726 ], [ 539906.786709305364639, 2260714.116959833540022 ], [ 539677.055511509533972, 2260429.959115016274154 ], [ 539623.18510017299559, 2260372.834210622124374 ], [ 539567.256726664840244, 2260271.996763356029987 ], [ 539458.48269648256246, 2260229.586223177611828 ], [ 539399.743816784699447, 2260080.217975782230496 ], [ 539372.45919818978291, 2260019.13869874086231 ], [ 539377.470471255830489, 2259969.917520299553871 ], [ 539136.39074073440861, 2259642.195305316708982 ], [ 539092.919907124945894, 2259465.589298914186656 ], [ 538992.902921457309276, 2259391.065993924625218 ], [ 538952.837135324953124, 2259341.504168943502009 ], [ 538909.10751203878317, 2259295.131280108354986 ], [ 538916.808135069324635, 2259219.505715440958738 ], [ 538918.701965069631115, 2259137.430580177344382 ], [ 538866.456106523633935, 2259020.469120988622308 ], [ 538827.747985657886602, 2258922.031449227593839 ], [ 538113.070485268253833, 2258906.247828531078994 ], [ 537927.130423997994512, 2258758.98919949028641 ], [ 537808.842667574877851, 2258712.862210768274963 ], [ 537779.0065830264939, 2258675.953400173224509 ], [ 537788.395499250735156, 2258583.762774989940226 ], [ 537883.14268097456079, 2258505.50927565805614 ], [ 537855.541754617937841, 2258443.714078975841403 ], [ 537834.457602749112993, 2258320.292089847847819 ], [ 537759.225509724463336, 2258318.630214390344918 ], [ 537682.090141830849461, 2258310.72077361959964 ], [ 537597.765311142778955, 2258096.254421489313245 ], [ 537341.768262564204633, 2258049.009859845042229 ], [ 537250.74274342332501, 2258010.24688249733299 ], [ 537131.29040096711833, 2257794.834529662504792 ], [ 536941.544909667805769, 2257752.049617751501501 ], [ 536829.207584817893803, 2257653.221765481866896 ], [ 536756.629950846196152, 2257612.887943740934134 ], [ 536650.36635514954105, 2257643.243256350979209 ], [ 536455.228121668100357, 2257645.637239428237081 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 16.0, "GRIDCODE": 44.0, "X_COORD": 566236.88558999996, "Y_COORD": 301820.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 531634.393747229245491, 2256771.021113916300237 ], [ 531587.723469938500784, 2256782.103050528094172 ], [ 531314.120293478947133, 2256888.212203762494028 ], [ 530922.831597938551567, 2256891.800707740709186 ], [ 530765.316101699252613, 2256916.364443195983768 ], [ 530713.499498080695048, 2256908.888305335305631 ], [ 530670.13596373423934, 2256909.701273164711893 ], [ 530553.669996470795013, 2256966.123114205896854 ], [ 530462.74166564096231, 2256953.003188012167811 ], [ 530377.309182118275203, 2257041.409883494488895 ], [ 530343.557327279006131, 2257067.287191761657596 ], [ 530312.07366628665477, 2257128.029580218717456 ], [ 530212.696171203861013, 2257149.814576295204461 ], [ 530151.575468080118299, 2257068.328771057538688 ], [ 530094.09920082858298, 2257265.582700687460601 ], [ 530049.825787183479406, 2257299.525108266621828 ], [ 529912.63655354862567, 2257279.72789819072932 ], [ 529805.020946360891685, 2257281.745386227965355 ], [ 529705.734768840135075, 2257552.101651594974101 ], [ 529563.084913321887143, 2257606.013334472663701 ], [ 529301.795105927041732, 2257769.619220111519098 ], [ 529172.642807178199291, 2257951.595012673176825 ], [ 529113.981970875407569, 2258111.321394301950932 ], [ 528940.353877752553672, 2258128.472242244519293 ], [ 528791.951824570656754, 2258007.454697628505528 ], [ 528735.064233172568493, 2258301.364492272958159 ], [ 528591.122043080977164, 2258464.933449161238968 ], [ 528546.695675742230378, 2258498.988139210268855 ], [ 528548.487736194045283, 2258604.968015048652887 ], [ 528422.083471105434, 2258652.736390942707658 ], [ 528377.473306253785267, 2258887.669891254045069 ], [ 528433.820975836366415, 2258943.271297224797308 ], [ 528449.966118655400351, 2259127.895459463819861 ], [ 528479.700731383170933, 2259273.059570305049419 ], [ 528531.860542813781649, 2259383.270731005817652 ], [ 528485.224559226771817, 2259520.813786186277866 ], [ 528439.352491966332309, 2259757.801823638379574 ], [ 528335.91868269816041, 2259995.146057197824121 ], [ 528260.72136338672135, 2260217.91196577809751 ], [ 528138.314178232103586, 2260285.095249503850937 ], [ 528108.925637578824535, 2260312.277222287841141 ], [ 528384.225144726922736, 2260693.395645324140787 ], [ 528407.901828010333702, 2260757.57476445287466 ], [ 528494.262442696723156, 2260884.646756707690656 ], [ 528483.591578245162964, 2260959.398202713578939 ], [ 528359.420410391874611, 2261054.576884016394615 ], [ 528329.816280109109357, 2261085.204450538381934 ], [ 528284.770640218979679, 2261119.733727598562837 ], [ 528070.591680088080466, 2261024.687331245280802 ], [ 527966.606111044995487, 2261153.226136736571789 ], [ 527711.35352105088532, 2261151.289891262538731 ], [ 527723.558781605330296, 2261168.836598532274365 ], [ 527760.868894024868496, 2261402.004993980750442 ], [ 527860.693516580620781, 2261559.987078980542719 ], [ 527837.939323817263357, 2261681.628556664101779 ], [ 527868.191091416869313, 2261779.060196522623301 ], [ 527883.399899567011744, 2261961.328189741820097 ], [ 527661.902453888207674, 2262207.88054714910686 ], [ 527622.826835535350256, 2262318.986366436816752 ], [ 527576.449993751593865, 2262351.9517752379179 ], [ 527544.356181009672582, 2262465.6828154604882 ], [ 527547.257563663762994, 2262637.283193379640579 ], [ 527536.565499300835654, 2262712.182384960353374 ], [ 527537.95693517010659, 2262794.580328756943345 ], [ 527650.855330618331209, 2262854.209190477617085 ], [ 527698.682733727968298, 2263010.572397023439407 ], [ 527751.502166219986975, 2263062.686882766894996 ], [ 527771.147742986795492, 2263287.309255665168166 ], [ 527861.730169591493905, 2263285.614462411031127 ], [ 527884.67778226302471, 2263384.892024648375809 ], [ 527922.194722548825666, 2263512.393295161426067 ], [ 527967.099872153368779, 2263607.262232849374413 ], [ 527948.813041337998584, 2263735.369767190888524 ], [ 527950.10776438692119, 2263811.910246301442385 ], [ 527882.614638918195851, 2263896.35912459064275 ], [ 527846.980754051823169, 2264023.409629330039024 ], [ 527925.883408636320382, 2264101.253086955286562 ], [ 527946.364289944525808, 2264335.380240867845714 ], [ 528056.969754761084914, 2264444.502238925546408 ], [ 528109.833858188940212, 2264587.783494408242404 ], [ 528384.47371149843093, 2264807.799172998405993 ], [ 528430.050585372024216, 2264931.327905183658004 ], [ 528496.959756248281337, 2265072.666568835265934 ], [ 528518.587855127290823, 2265207.752883200533688 ], [ 528574.894919697311707, 2265299.69358158390969 ], [ 528599.343097900389694, 2265405.442178502678871 ], [ 528724.463956629741006, 2265528.875764149241149 ], [ 528843.468641748651862, 2265720.610631437040865 ], [ 528868.979880120139569, 2265879.943624265491962 ], [ 529005.831777885556221, 2266014.946976441890001 ], [ 529032.079465315444395, 2266086.078389067202806 ], [ 529116.3060837861849, 2266209.982883062213659 ], [ 529145.083630351466127, 2266287.968267420306802 ], [ 529125.952950490172952, 2266421.998596380464733 ], [ 529233.655270291143097, 2266649.491953869350255 ], [ 529269.995591546525247, 2266876.443531091324985 ], [ 529339.720035529346205, 2266945.222683609463274 ], [ 529486.462918002624065, 2266988.677237748168409 ], [ 529580.248048111796379, 2267049.533129216171801 ], [ 529692.79270660399925, 2267259.571140233427286 ], [ 529823.356212670681998, 2267243.830860472284257 ], [ 529919.956032330170274, 2267197.04926314111799 ], [ 530162.310489226598293, 2267184.180019709281623 ], [ 530251.428603683016263, 2266985.51671452447772 ], [ 530324.280811380362138, 2266950.235389387235045 ], [ 530475.293617901043035, 2266925.34347826987505 ], [ 530540.596049392363057, 2266875.292602709494531 ], [ 530593.004983616760001, 2266821.073151739314198 ], [ 530854.96110145910643, 2266677.851114196702838 ], [ 531277.399055589339696, 2266648.57669244799763 ], [ 531391.899345011916012, 2266530.113501589745283 ], [ 531481.359982575639151, 2266543.015475110150874 ], [ 531512.989728524116799, 2266321.359122166410089 ], [ 531276.634957375470549, 2266004.415243149735034 ], [ 531292.058825695887208, 2265896.3318000016734 ], [ 531261.67029489192646, 2265832.14730070810765 ], [ 531248.375333194970153, 2265569.630894259549677 ], [ 531141.255745526752435, 2265513.068431672640145 ], [ 531109.679786149645224, 2265427.503928812220693 ], [ 531028.582114212098531, 2265295.099928456358612 ], [ 531092.381117391283624, 2265246.198733552359045 ], [ 530982.236993106082082, 2265137.547364830039442 ], [ 530963.481377349467948, 2264855.471944414079189 ], [ 530740.357976085855626, 2264635.366637452505529 ], [ 530812.585216289153323, 2264212.27401127666235 ], [ 531072.645658521912992, 2264049.458998445421457 ], [ 531238.654138844227418, 2263999.366832642816007 ], [ 531434.579052110901102, 2264057.384267698973417 ], [ 531519.160624045995064, 2264112.270108498632908 ], [ 531879.173808246618137, 2264105.509528854861856 ], [ 532063.966954208444804, 2264132.162408732809126 ], [ 532446.992804280249402, 2264116.648325954563916 ], [ 532619.266721442923881, 2264051.541624064557254 ], [ 532723.086060155066662, 2263986.538567405194044 ], [ 532887.203231589403003, 2263947.575056537985802 ], [ 533058.236251341877505, 2263853.694976682774723 ], [ 533074.946604664553888, 2263736.570452925749123 ], [ 532970.751907601254061, 2263633.788857689127326 ], [ 533047.838198662968352, 2263512.680100606754422 ], [ 533061.157015591277741, 2263419.317464115098119 ], [ 533059.441359075717628, 2263318.337995103560388 ], [ 533125.781214501941577, 2263286.202340480871499 ], [ 533232.051040753605776, 2263278.832123060710728 ], [ 533283.245030052261427, 2263208.402004208415747 ], [ 533326.978504610364325, 2262931.288921282626688 ], [ 533423.278291081194766, 2262820.291305357590318 ], [ 533533.092271235189401, 2262745.143214055337012 ], [ 533578.475604130188003, 2262529.640616257674992 ], [ 533563.723333181347698, 2262352.017876790836453 ], [ 533617.216765237506479, 2262171.282189977355301 ], [ 533631.257617735886015, 2262155.097044872120023 ], [ 533530.625367908854969, 2262004.478189626708627 ], [ 533459.490451849997044, 2261929.037807590328157 ], [ 533388.686598293017596, 2261770.516442146152258 ], [ 533454.775375261786394, 2261510.696109919808805 ], [ 533570.613253872725181, 2261440.415928029455245 ], [ 533848.188725897693075, 2261419.549316390417516 ], [ 533907.777557958615944, 2261310.280219 ], [ 533975.340157127007842, 2261223.249731059186161 ], [ 533979.065350464428775, 2261062.276959581300616 ], [ 534113.550314664025791, 2260889.042209251783788 ], [ 534091.73129193438217, 2260777.64861211925745 ], [ 534048.044582283124328, 2260731.315807559527457 ], [ 533969.432882293476723, 2260634.059358643367887 ], [ 533786.622484393185005, 2260758.323938276618719 ], [ 533678.339786356315017, 2260691.448123576119542 ], [ 533421.76949603355024, 2260633.583712620660663 ], [ 533235.398719603428617, 2260530.006555597297847 ], [ 533083.562345723272301, 2260368.968123060651124 ], [ 532916.309976182179525, 2260162.040293658152223 ], [ 532754.670729277655482, 2260145.455464117228985 ], [ 532585.230914463754743, 2260141.693545010872185 ], [ 532463.291794913355261, 2260012.356957537122071 ], [ 532436.545381336123683, 2259979.267220564186573 ], [ 532352.874851740896702, 2259977.409670258872211 ], [ 532263.830552043626085, 2259882.963956826366484 ], [ 532214.908716994454153, 2259758.515513693913817 ], [ 532125.751489457092248, 2259687.895356927998364 ], [ 532037.037669441779144, 2259653.290416159667075 ], [ 532006.339495168533176, 2259327.570982029661536 ], [ 531778.664622505195439, 2259172.357716738246381 ], [ 531588.318820134736598, 2259021.580294342711568 ], [ 531482.261129645630717, 2259010.693196905776858 ], [ 531343.265632973401807, 2259095.023904780857265 ], [ 531270.169138877419755, 2259000.934334937483072 ], [ 531245.342400527559221, 2258937.779086788184941 ], [ 531192.861696584150195, 2258820.255067905411124 ], [ 531259.857332814019173, 2258816.850180489011109 ], [ 531343.119551912648603, 2258825.398085477761924 ], [ 531404.473682062351145, 2258766.328604556620121 ], [ 531537.556549207423814, 2258712.746443975716829 ], [ 531682.643451181123964, 2258573.062722848728299 ], [ 531806.470865018782206, 2258541.786383193917572 ], [ 531812.237599340267479, 2258485.216594122350216 ], [ 531697.356425165198743, 2258363.356647544540465 ], [ 531809.086464376188815, 2258233.745874584652483 ], [ 531743.743135925498791, 2258123.600201301276684 ], [ 531710.596874242881313, 2257929.44284151494503 ], [ 531578.02227670699358, 2257855.751669784076512 ], [ 531591.63782960048411, 2257722.181539472192526 ], [ 531516.782960526528768, 2257554.546727277338505 ], [ 531521.398992201196961, 2257355.630454770289361 ], [ 531607.804470573435538, 2257176.031361203640699 ], [ 531680.814073707559146, 2256985.519060926511884 ], [ 531613.061128790373914, 2256845.275610636919737 ], [ 531650.317191881593317, 2256786.733440789394081 ], [ 531634.393747229245491, 2256771.021113916300237 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 17.0, "GRIDCODE": 39.0, "X_COORD": 569551.38022000005, "Y_COORD": 298248.92437000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 531680.814073707559146, 2256985.519060926511884 ], [ 531607.804470573435538, 2257176.031361203640699 ], [ 531521.398992201196961, 2257355.630454770289361 ], [ 531516.782960526528768, 2257554.546727277338505 ], [ 531591.63782960048411, 2257722.181539472192526 ], [ 531578.02227670699358, 2257855.751669784076512 ], [ 531710.596874242881313, 2257929.44284151494503 ], [ 531743.743135925498791, 2258123.600201301276684 ], [ 531809.086464376188815, 2258233.745874584652483 ], [ 531697.356425165198743, 2258363.356647544540465 ], [ 531812.237599340267479, 2258485.216594122350216 ], [ 531806.470865018782206, 2258541.786383193917572 ], [ 531682.643451181123964, 2258573.062722848728299 ], [ 531537.556549207423814, 2258712.746443975716829 ], [ 531404.473682062351145, 2258766.328604556620121 ], [ 531343.119551912648603, 2258825.398085477761924 ], [ 531259.857332814019173, 2258816.850180489011109 ], [ 531192.861696584150195, 2258820.255067905411124 ], [ 531245.342400527559221, 2258937.779086788184941 ], [ 531270.169138877419755, 2259000.934334937483072 ], [ 531343.265632973401807, 2259095.023904780857265 ], [ 531482.261129645630717, 2259010.693196905776858 ], [ 531588.318820134736598, 2259021.580294342711568 ], [ 531778.664622505195439, 2259172.357716738246381 ], [ 532006.339495168533176, 2259327.570982029661536 ], [ 532037.037669441779144, 2259653.290416159667075 ], [ 532125.751489457092248, 2259687.895356927998364 ], [ 532214.908716994454153, 2259758.515513693913817 ], [ 532263.830552043626085, 2259882.963956826366484 ], [ 532352.874851740896702, 2259977.409670258872211 ], [ 532436.545381336123683, 2259979.267220564186573 ], [ 532463.291794913355261, 2260012.356957537122071 ], [ 532585.230914463754743, 2260141.693545010872185 ], [ 532754.670729277655482, 2260145.455464117228985 ], [ 532916.309976182179525, 2260162.040293658152223 ], [ 533083.562345723272301, 2260368.968123060651124 ], [ 533235.398719603428617, 2260530.006555597297847 ], [ 533421.76949603355024, 2260633.583712620660663 ], [ 533678.339786356315017, 2260691.448123576119542 ], [ 533786.622484393185005, 2260758.323938276618719 ], [ 533969.432882293476723, 2260634.059358643367887 ], [ 534048.044582283124328, 2260731.315807559527457 ], [ 534091.73129193438217, 2260777.64861211925745 ], [ 534113.550314664025791, 2260889.042209251783788 ], [ 533979.065350464428775, 2261062.276959581300616 ], [ 533975.340157127007842, 2261223.249731059186161 ], [ 533907.777557958615944, 2261310.280219 ], [ 533848.188725897693075, 2261419.549316390417516 ], [ 533570.613253872725181, 2261440.415928029455245 ], [ 533454.775375261786394, 2261510.696109919808805 ], [ 533388.686598293017596, 2261770.516442146152258 ], [ 533459.490451849997044, 2261929.037807590328157 ], [ 533530.625367908854969, 2262004.478189626708627 ], [ 533631.257617735886015, 2262155.097044872120023 ], [ 533673.836077485699207, 2262173.985688575543463 ], [ 533942.486185056972317, 2262218.696149695664644 ], [ 534071.468867274816148, 2262263.166645904071629 ], [ 534226.932137830299325, 2262165.816851790063083 ], [ 534363.928371260291897, 2262254.710387150757015 ], [ 534658.11461711791344, 2262232.916390395723283 ], [ 534848.019336439552717, 2262260.297678069211543 ], [ 534907.889360969536938, 2262144.773930050432682 ], [ 534994.736811572220176, 2262102.697191546671093 ], [ 535031.450725755188614, 2262107.989979634992778 ], [ 535231.376892853993922, 2261954.713843885809183 ], [ 535338.707576272310689, 2261843.63795802090317 ], [ 535444.824750320287421, 2261985.058625837787986 ], [ 535544.117199399042875, 2261983.186294766142964 ], [ 535765.644575283280574, 2262163.76678673364222 ], [ 535966.253004929749295, 2261956.158221480436623 ], [ 536048.825665673124604, 2261954.600333451293409 ], [ 536136.998951755464077, 2262011.810901908203959 ], [ 536287.176592149888165, 2261856.388486756011844 ], [ 536372.070339769357815, 2261854.788211967796087 ], [ 536486.615814114571549, 2261871.299315230920911 ], [ 536688.778842207393609, 2261794.874413941986859 ], [ 536666.77247292548418, 2261592.14094228297472 ], [ 536577.782661037170328, 2261504.361803092062473 ], [ 536598.817471754504368, 2261356.857612194493413 ], [ 536573.806082676281221, 2261234.843918783590198 ], [ 536592.96686977148056, 2261190.860079796053469 ], [ 536608.272791071794927, 2261176.123451967723668 ], [ 536789.737193066510372, 2261144.214818374253809 ], [ 536760.099131354829296, 2260938.390140789560974 ], [ 536661.746168408426456, 2260816.726805734448135 ], [ 536548.176792809157632, 2260696.287581350654364 ], [ 536551.987797337351367, 2260658.877298670820892 ], [ 536526.586221306235529, 2260567.649963902309537 ], [ 536509.267968285246752, 2260384.057388420216739 ], [ 536454.583277702215128, 2260326.062814454548061 ], [ 536429.944897936889902, 2260198.908043247647583 ], [ 536410.748619448044337, 2260045.424924360588193 ], [ 536382.499227686552331, 2259982.176845457404852 ], [ 536400.324050131719559, 2259807.188115251250565 ], [ 536332.172835275530815, 2259765.099488969892263 ], [ 536129.58842970454134, 2259760.616295680403709 ], [ 536130.394735966227017, 2259725.780339278280735 ], [ 536230.481449649087153, 2259560.554544681683183 ], [ 536204.320220130495727, 2259518.708144345320761 ], [ 536120.619456153945066, 2259429.938708704896271 ], [ 536328.648585990653373, 2259434.54136207792908 ], [ 536513.41470700642094, 2259453.488304581493139 ], [ 536703.421767850639299, 2259425.507703504525125 ], [ 536805.873014130396768, 2259465.461272011511028 ], [ 536893.215804311446846, 2259502.65535079035908 ], [ 536938.405096576083452, 2259324.956691641360521 ], [ 537264.008823519572616, 2259313.752465872094035 ], [ 537307.768317839014344, 2259073.500954331830144 ], [ 537424.241493225214072, 2258938.360409505665302 ], [ 537262.460883467807434, 2258859.086127907037735 ], [ 537075.863375625805929, 2258801.694511736743152 ], [ 536747.637119961436838, 2258395.637463969178498 ], [ 536500.868761141551659, 2258390.178626359440386 ], [ 536396.809326608548872, 2258182.550246190279722 ], [ 536320.545772039447911, 2258135.449971428140998 ], [ 536261.628038427326828, 2258102.705766230821609 ], [ 536236.797218361636624, 2258039.552079038694501 ], [ 536206.55828589387238, 2257971.845870933495462 ], [ 536308.405677539412864, 2257832.409425531513989 ], [ 536406.369873197400011, 2257718.743604091927409 ], [ 536455.228121668100357, 2257645.637239428237081 ], [ 536429.772305018617772, 2257354.033155962824821 ], [ 536423.909717190545052, 2256962.688997448422015 ], [ 536395.877186037716456, 2256712.862708806060255 ], [ 536371.968854082631879, 2256121.734414481557906 ], [ 536300.863043041201308, 2255935.075712079182267 ], [ 536115.508891448727809, 2255673.863620977848768 ], [ 535805.172387415426783, 2255362.170099167153239 ], [ 535735.892498310189694, 2255273.208322894759476 ], [ 535719.27024873602204, 2255286.439639076590538 ], [ 535591.95732067222707, 2255463.290662 ], [ 535447.091804000199772, 2255647.26603336352855 ], [ 535144.56901728163939, 2255816.113761876709759 ], [ 534725.818593614269048, 2255764.619896061718464 ], [ 534204.923208736348897, 2255617.717257712036371 ], [ 534117.428148658713326, 2255579.676053555682302 ], [ 534028.144078892888501, 2255545.58241053018719 ], [ 533965.926520485198125, 2255506.185419576242566 ], [ 533919.661167197977193, 2255384.720084422267973 ], [ 533859.608017823309638, 2255444.675201636739075 ], [ 533781.609626784920692, 2255435.08193719945848 ], [ 533747.524845174746588, 2255276.60613173712045 ], [ 533830.545266175060533, 2255142.894285516813397 ], [ 533728.904168491833843, 2254974.253339950926602 ], [ 533581.919245862169191, 2254973.952999260276556 ], [ 533477.090647889534011, 2255171.150102329440415 ], [ 533486.727438045782037, 2255268.318784302100539 ], [ 533601.164135177619755, 2255214.442063194699585 ], [ 533738.687476915540174, 2255336.707291615195572 ], [ 533662.087274981662631, 2255516.137457083910704 ], [ 533400.694146853638813, 2255535.027632209472358 ], [ 533268.012129332288168, 2255573.995286967605352 ], [ 533049.955957785481587, 2255676.645447547547519 ], [ 532936.050808874890208, 2255818.032485641539097 ], [ 532994.728099475498311, 2255945.647860644385219 ], [ 532949.188110365066677, 2256052.318817698396742 ], [ 533033.39608771703206, 2256138.46433481387794 ], [ 533056.714484326425008, 2256253.595173184759915 ], [ 532944.345366162597202, 2256434.564588764682412 ], [ 532943.418268313282169, 2256701.4525116244331 ], [ 532921.558545602369122, 2256880.805228536948562 ], [ 532674.49051452986896, 2257077.42407192196697 ], [ 532574.74095445824787, 2257215.964352159760892 ], [ 532574.392441136646084, 2257316.38798469863832 ], [ 532356.712437331327237, 2257581.922315658070147 ], [ 532322.933637319481932, 2257493.237746114842594 ], [ 532239.289941138471477, 2257368.810654245316982 ], [ 532216.920523369102739, 2257275.028552464209497 ], [ 532127.634263298241422, 2257240.936296378262341 ], [ 532077.886405078927055, 2257177.049420332536101 ], [ 531895.019062604871579, 2257107.221887367777526 ], [ 531783.165294684004039, 2257036.391712680459023 ], [ 531680.814073707559146, 2256985.519060926511884 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 18.0, "GRIDCODE": 39.0, "X_COORD": 570345.39237000002, "Y_COORD": 293975.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 535518.782706906436943, 2253959.794105647131801 ], [ 535397.151221985928714, 2253987.779812466353178 ], [ 535195.055560760898516, 2254137.049474712461233 ], [ 535222.526143411872908, 2254309.894478174857795 ], [ 535318.677364154020324, 2254507.994436040520668 ], [ 535435.142813371727243, 2254603.139677757397294 ], [ 535518.791505057248287, 2254837.369100139476359 ], [ 535551.771100516663864, 2254868.755813614465296 ], [ 535550.269679952296428, 2254671.04126653727144 ], [ 535535.038768004043959, 2254400.272182359360158 ], [ 535518.782706906436943, 2253959.794105647131801 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 19.0, "GRIDCODE": 38.0, "X_COORD": 561515.54862000002, "Y_COORD": 297278.04973000003 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 529696.248507126583718, 2253324.854440875351429 ], [ 529649.580170894856565, 2253335.933385702781379 ], [ 529293.26241965754889, 2253568.986561917699873 ], [ 528423.812561008497141, 2254319.789424038492143 ], [ 528356.307656722143292, 2254371.53991221357137 ], [ 528219.102770219324157, 2254513.521978537552059 ], [ 528024.079642060212791, 2254559.820104689337313 ], [ 527976.047969648614526, 2254755.235676420852542 ], [ 527881.169703456573188, 2254827.971910401247442 ], [ 527881.768860232201405, 2254863.402270019054413 ], [ 527756.520543554448523, 2254910.736138982698321 ], [ 527691.410849189502187, 2254978.111646486446261 ], [ 527459.268015285837464, 2254891.711565759032965 ], [ 527337.149918888462707, 2254968.174860382452607 ], [ 527212.517262389301322, 2254997.758973652496934 ], [ 527214.210398971103132, 2255098.142642168328166 ], [ 527300.728558801230974, 2255348.8052141033113 ], [ 527230.306715882848948, 2255510.402006894350052 ], [ 527321.945543792913668, 2255558.817337760701776 ], [ 527507.555567647097632, 2255555.346146515570581 ], [ 527692.455026073846966, 2255706.145973790436983 ], [ 527571.94713566522114, 2255856.951945611275733 ], [ 527573.916229346883483, 2255973.632395716384053 ], [ 527567.001877025235444, 2256022.069659256376326 ], [ 527484.15624514373485, 2256010.109246936626732 ], [ 527366.786370176938362, 2256045.523221884854138 ], [ 527224.328606798662804, 2256024.959631256759167 ], [ 527179.409959096927196, 2256025.798104745335877 ], [ 527142.050140767008997, 2256020.407021671533585 ], [ 527095.047817173763178, 2255957.733126042410731 ], [ 527064.779935878003016, 2255927.864965720102191 ], [ 527041.109726101043634, 2255863.676729822531343 ], [ 526832.0755745874485, 2255822.649297542870045 ], [ 526776.72755531151779, 2255786.713242213241756 ], [ 526366.874946939060465, 2255718.434398002922535 ], [ 526337.347753315349109, 2255638.362664417363703 ], [ 526308.964353399933316, 2255578.381506133824587 ], [ 526277.404291249345988, 2255492.798630610108376 ], [ 526197.323361193179153, 2255450.490716834552586 ], [ 526171.770227783359587, 2255416.414089037105441 ], [ 525967.528745602816343, 2255355.898860071785748 ], [ 525776.913728283485398, 2255396.024240725673735 ], [ 525544.275440310244448, 2255362.432789439335465 ], [ 525297.192429163260385, 2255232.498172551393509 ], [ 525164.164324007229879, 2255234.983554703183472 ], [ 525080.691846641362645, 2255166.896032489836216 ], [ 525028.934369632857852, 2255135.68399438355118 ], [ 524944.201112663722597, 2255366.365950588136911 ], [ 524769.839417226030491, 2255395.096475492231548 ], [ 524666.926243147114292, 2255308.442708257585764 ], [ 524675.24724032334052, 2255445.850802817381918 ], [ 524636.34991778479889, 2255531.587320385500789 ], [ 524603.987916693324223, 2255623.599356419406831 ], [ 524462.455124190892093, 2255655.088063316419721 ], [ 524395.240303862257861, 2255846.199677105993032 ], [ 524246.843798847810831, 2255898.724731529131532 ], [ 523916.176180916721933, 2255836.004847274161875 ], [ 523743.305664890445769, 2255677.448307575657964 ], [ 523688.52498889924027, 2255598.660454707220197 ], [ 523622.269422892073635, 2255532.034224118106067 ], [ 523575.897776532394346, 2255801.207400925457478 ], [ 523536.232117687584832, 2255888.632803459651768 ], [ 523575.318908774002921, 2255924.526725641451776 ], [ 523555.271805557364132, 2256031.658264704048634 ], [ 523448.065414122480433, 2256069.606585193425417 ], [ 523331.272465796559118, 2256199.447831223718822 ], [ 523395.083684530225582, 2256300.473760315217078 ], [ 523410.068139103124849, 2256486.050672229379416 ], [ 523186.625139755546115, 2256710.662676842883229 ], [ 523133.727402771648485, 2256861.050937112420797 ], [ 522994.657673957524821, 2256910.272697125561535 ], [ 522961.41836562944809, 2256977.778181775473058 ], [ 522805.858606744965073, 2257032.83427903149277 ], [ 522712.282590388669632, 2257080.791390778496861 ], [ 522636.397378765570465, 2257066.396955955773592 ], [ 522614.424694263550919, 2256704.239793472923338 ], [ 522495.772252693888731, 2256467.318519095890224 ], [ 522408.623984080855735, 2256332.854011635296047 ], [ 522187.08272438403219, 2256591.682070219889283 ], [ 522039.481335577263962, 2256696.591226812452078 ], [ 521989.504686672997195, 2256774.000550235621631 ], [ 522135.783584167598747, 2256826.36014829389751 ], [ 522216.974811258958653, 2256909.959656041115522 ], [ 522013.42501646769233, 2257054.633854305371642 ], [ 522059.550865601573605, 2257203.26768834143877 ], [ 521867.725269082176965, 2257232.815352814272046 ], [ 521772.413699461845681, 2257281.660383137874305 ], [ 521592.024367357604206, 2257336.496264470741153 ], [ 521427.741106975183357, 2257442.595857522450387 ], [ 521344.231618266843725, 2257472.149903449229896 ], [ 521169.919407639943529, 2257602.418859205208719 ], [ 521201.464403216494247, 2257931.282689832150936 ], [ 521189.872122302593198, 2257993.217075739987195 ], [ 521218.310757341969293, 2258463.100710393860936 ], [ 521169.475601263693534, 2258724.019192324019969 ], [ 521099.851293756510131, 2258773.501360257156193 ], [ 521131.256259161920752, 2258813.8430948657915 ], [ 521275.685366421472281, 2258831.641134887002409 ], [ 521515.696261940465774, 2258832.187810492701828 ], [ 521788.86267800751375, 2258936.547130272723734 ], [ 521712.006192139815539, 2259060.261652670800686 ], [ 521823.301776380627416, 2259130.762892071157694 ], [ 522157.203366099798586, 2259197.328348748385906 ], [ 522210.482412261713762, 2259337.261984844692051 ], [ 522399.065106931724586, 2259456.715336864814162 ], [ 522719.694238059280906, 2259388.687423967756331 ], [ 522732.514257942209952, 2259283.647023931145668 ], [ 522733.044880164321512, 2259136.945911339484155 ], [ 522829.874237943033222, 2259077.282154672779143 ], [ 522952.514312286977656, 2259056.418955900706351 ], [ 523038.036705376405735, 2258971.077921247109771 ], [ 523191.259021359262988, 2259025.655889675021172 ], [ 523334.415853638027329, 2259140.740212687291205 ], [ 523497.692730526963715, 2259190.057972761802375 ], [ 523529.470793693501037, 2259453.319885983131826 ], [ 523746.067200637073256, 2259599.674606626853347 ], [ 523836.81907721736934, 2259716.238637803122401 ], [ 523911.053247454750817, 2259792.195673664100468 ], [ 523977.732667252421379, 2259877.83712225779891 ], [ 524021.576170923945028, 2259654.793467284180224 ], [ 524132.181788569374476, 2259501.230181152001023 ], [ 524237.261530955205671, 2259558.184414773248136 ], [ 524321.150125754065812, 2259611.31841943692416 ], [ 524410.385491262772121, 2259659.68300162255764 ], [ 524525.184915587888099, 2259751.96603699028492 ], [ 524723.998330457136035, 2259593.808180404826999 ], [ 524791.28593434591312, 2259414.525443778373301 ], [ 525114.746964537887834, 2259415.239884687587619 ], [ 525345.771282387548126, 2259651.617910027503967 ], [ 525305.57965075422544, 2259981.059092339128256 ], [ 525373.200811875169165, 2260023.885731499642134 ], [ 525429.215778327663429, 2260024.009050885215402 ], [ 525516.794861399335787, 2260113.615373345091939 ], [ 525557.483661097357981, 2260359.764313787221909 ], [ 525636.892024755477905, 2260461.748561467044055 ], [ 526091.865468533826061, 2260457.596317595802248 ], [ 526260.288616172270849, 2260341.884490876458585 ], [ 526393.53804606187623, 2260414.098818293772638 ], [ 526425.989035700797103, 2260455.774349832907319 ], [ 526590.965990141732618, 2260456.135520330630243 ], [ 526886.830493140616454, 2260648.49598958529532 ], [ 526886.086751661030576, 2260857.970210880041122 ], [ 526865.352079141768627, 2261027.961668264120817 ], [ 526919.802253111614846, 2261146.384066643193364 ], [ 526947.001289870473556, 2261260.428412727080286 ], [ 527153.042740836041048, 2261118.870635160245001 ], [ 527474.032002416439354, 2261119.565103651955724 ], [ 527563.085978172719479, 2261130.527758043259382 ], [ 527664.109524683677591, 2261130.746926341205835 ], [ 527711.35352105088532, 2261151.289891262538731 ], [ 527966.606111044995487, 2261153.226136736571789 ], [ 528070.591680088080466, 2261024.687331245280802 ], [ 528284.770640218979679, 2261119.733727598562837 ], [ 528329.816280109109357, 2261085.204450538381934 ], [ 528359.420410391874611, 2261054.576884016394615 ], [ 528483.591578245162964, 2260959.398202713578939 ], [ 528494.262442696723156, 2260884.646756707690656 ], [ 528407.901828010333702, 2260757.57476445287466 ], [ 528384.225144726922736, 2260693.395645324140787 ], [ 528108.925637578824535, 2260312.277222287841141 ], [ 528138.314178232103586, 2260285.095249503850937 ], [ 528260.72136338672135, 2260217.91196577809751 ], [ 528335.91868269816041, 2259995.146057197824121 ], [ 528439.352491966332309, 2259757.801823638379574 ], [ 528485.224559226771817, 2259520.813786186277866 ], [ 528531.860542813781649, 2259383.270731005817652 ], [ 528479.700731383170933, 2259273.059570305049419 ], [ 528449.966118655400351, 2259127.895459463819861 ], [ 528433.820975836366415, 2258943.271297224797308 ], [ 528377.473306253785267, 2258887.669891254045069 ], [ 528422.083471105434, 2258652.736390942707658 ], [ 528548.487736194045283, 2258604.968015048652887 ], [ 528546.695675742230378, 2258498.988139210268855 ], [ 528591.122043080977164, 2258464.933449161238968 ], [ 528735.064233172568493, 2258301.364492272958159 ], [ 528791.951824570656754, 2258007.454697628505528 ], [ 528940.353877752553672, 2258128.472242244519293 ], [ 529113.981970875407569, 2258111.321394301950932 ], [ 529172.642807178199291, 2257951.595012673176825 ], [ 529301.795105927041732, 2257769.619220111519098 ], [ 529563.084913321887143, 2257606.013334472663701 ], [ 529705.734768840135075, 2257552.101651594974101 ], [ 529805.020946360891685, 2257281.745386227965355 ], [ 529912.63655354862567, 2257279.72789819072932 ], [ 530049.825787183479406, 2257299.525108266621828 ], [ 530094.09920082858298, 2257265.582700687460601 ], [ 530151.575468080118299, 2257068.328771057538688 ], [ 530212.696171203861013, 2257149.814576295204461 ], [ 530312.07366628665477, 2257128.029580218717456 ], [ 530343.557327279006131, 2257067.287191761657596 ], [ 530377.309182118275203, 2257041.409883494488895 ], [ 530462.74166564096231, 2256953.003188012167811 ], [ 530553.669996470795013, 2256966.123114205896854 ], [ 530670.13596373423934, 2256909.701273164711893 ], [ 530713.499498080695048, 2256908.888305335305631 ], [ 530765.316101699252613, 2256916.364443195983768 ], [ 530922.831597938551567, 2256891.800707740709186 ], [ 531314.120293478947133, 2256888.212203762494028 ], [ 531587.723469938500784, 2256782.103050528094172 ], [ 531634.393747229245491, 2256771.021113916300237 ], [ 531553.208324355073273, 2256615.965370923280716 ], [ 531435.054877728922293, 2256380.152737435884774 ], [ 531169.156204670434818, 2256043.974531957879663 ], [ 531079.438424417166971, 2255776.502363656647503 ], [ 531032.171257835696451, 2255499.571711868979037 ], [ 530926.277476375107653, 2255230.13625194132328 ], [ 530803.996425280463882, 2255009.547019130550325 ], [ 530664.696938180015422, 2254774.699261073954403 ], [ 530467.189420837908983, 2254272.128267013467848 ], [ 529961.776343530858867, 2253825.379787156358361 ], [ 529830.917527893907391, 2253628.515236354433 ], [ 529696.248507126583718, 2253324.854440875351429 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 20.0, "GRIDCODE": 36.0, "X_COORD": 556456.23282000003, "Y_COORD": 295696.81591 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 522969.804832734924275, 2251363.030705924145877 ], [ 522983.371767666714732, 2251625.929815066047013 ], [ 522904.634544747939799, 2251866.602579182945192 ], [ 522945.659698390983976, 2252014.122894611209631 ], [ 522937.345349440351129, 2252095.56723587308079 ], [ 522785.881701016332954, 2252122.165900255553424 ], [ 522779.561576872773003, 2252392.727412481792271 ], [ 522631.989975431468338, 2252418.642563053406775 ], [ 522529.992735025996808, 2252408.151647010818124 ], [ 522422.729935267008841, 2252457.174744300544262 ], [ 522295.34733257611515, 2252378.444203751161695 ], [ 522253.408574642729945, 2252543.214676016941667 ], [ 522213.047382309683599, 2252569.771566177718341 ], [ 522063.615493489603978, 2252384.773752661421895 ], [ 521909.847529500897508, 2252279.880815884098411 ], [ 521825.391135485318955, 2252212.94076578412205 ], [ 521768.652891434554476, 2252211.670018042437732 ], [ 521648.432346715708263, 2252171.647544867359102 ], [ 521590.858312528172974, 2252170.357554479502141 ], [ 521492.509876847092528, 2252128.436377610079944 ], [ 521381.62684552022256, 2252125.949257688596845 ], [ 520747.739889280172065, 2252054.349320827051997 ], [ 520585.474376989644952, 2251954.049985820427537 ], [ 520408.076464824785944, 2251884.792023331858218 ], [ 520295.095906052796636, 2251814.957511289045215 ], [ 520224.872269097424578, 2251775.89650225546211 ], [ 520123.77212805848103, 2251650.724709232337773 ], [ 520019.731202627939638, 2251648.389621598646045 ], [ 520068.672875071293674, 2251758.068424102850258 ], [ 519972.889641329064034, 2251881.418415802530944 ], [ 519895.101070674427319, 2251912.721588961780071 ], [ 519836.809353102638852, 2251968.830005777068436 ], [ 519804.065502568613738, 2251995.861929309554398 ], [ 519641.059781405900139, 2252180.321751497685909 ], [ 519637.47055565478513, 2252333.681063301861286 ], [ 519626.681280232558493, 2252439.311789204366505 ], [ 519694.321828654792625, 2252590.897771324962378 ], [ 519555.879208953061607, 2252615.201921416446567 ], [ 519525.262405776767991, 2252644.669314508326352 ], [ 519448.275981937127654, 2252708.220343746244907 ], [ 519216.830458115902729, 2252684.408649163320661 ], [ 519139.912093181919772, 2252589.173377620056272 ], [ 518946.86367889016401, 2252545.569161174818873 ], [ 518570.266789833724033, 2252554.98100099619478 ], [ 518490.382198758306913, 2252701.4090571468696 ], [ 518438.05199317127699, 2252787.751085135154426 ], [ 518521.133427431981545, 2252927.893583814613521 ], [ 518509.644660038873553, 2253040.350892375223339 ], [ 518449.346305685408879, 2253090.124124698340893 ], [ 518210.224503860983532, 2253349.28444308694452 ], [ 518224.701966540247668, 2253438.840234680101275 ], [ 518343.314388953906018, 2253384.642988439649343 ], [ 518404.000478579022456, 2253390.888061764650047 ], [ 518458.839298284903634, 2253530.512591240927577 ], [ 518567.354998344962951, 2253611.443224493414164 ], [ 518682.015418006281834, 2253753.404949110932648 ], [ 518869.22372565587284, 2253826.490939299575984 ], [ 518809.572895606514066, 2253969.008966536261141 ], [ 518718.552352996950503, 2254044.141644206829369 ], [ 518630.27911069849506, 2254274.34643845167011 ], [ 518661.578411044261884, 2254494.039778218604624 ], [ 518661.854538846819196, 2254957.12325634714216 ], [ 518804.519708247564267, 2255077.40100034698844 ], [ 518796.7931765926769, 2255153.036204170435667 ], [ 518792.969218900601845, 2255316.388927694410086 ], [ 518697.743936636601575, 2255394.987766371108592 ], [ 518623.692786561499815, 2255832.89559777919203 ], [ 518723.718892857490573, 2255888.530145385302603 ], [ 518864.918171706434805, 2255975.803061130456626 ], [ 518888.066844956949353, 2256111.576430157758296 ], [ 518945.154871243808884, 2256207.859054110944271 ], [ 518986.484496511577163, 2256450.264098841696978 ], [ 519065.751984689733945, 2256670.810575803741813 ], [ 519056.953541947877966, 2256756.943550650030375 ], [ 519162.266799148404971, 2256835.474229102022946 ], [ 519282.443187472934369, 2256902.308704361319542 ], [ 519342.958461582893506, 2257148.521785908378661 ], [ 519306.13681399152847, 2257509.013454488478601 ], [ 519242.587175335385837, 2257613.860366271808743 ], [ 519209.941307464789134, 2257675.669417072087526 ], [ 519325.560762699169572, 2257739.96857111249119 ], [ 519339.052095182996709, 2257983.797177031636238 ], [ 519362.507082525407895, 2258105.029543722979724 ], [ 519385.005226144799963, 2258236.965701589360833 ], [ 519356.902342039975338, 2258512.103484755381942 ], [ 519395.906789559987374, 2258599.493929166346788 ], [ 519516.532064241357148, 2258727.4958202149719 ], [ 519557.947122043347917, 2258895.979110136628151 ], [ 519485.424369901011232, 2258989.35502031352371 ], [ 519453.914637847745325, 2259033.031129151582718 ], [ 519611.547904350154568, 2259133.849103799089789 ], [ 519713.179863742785528, 2259182.735791412182152 ], [ 519820.120919636916369, 2259146.896098244003952 ], [ 519797.306157454266213, 2259008.019869118928909 ], [ 519910.738714013888966, 2258863.446324034593999 ], [ 520011.26588169921888, 2258752.712532227858901 ], [ 520056.230074228951707, 2258659.001175920479 ], [ 520130.555374825955369, 2258550.517239838838577 ], [ 520202.878400758840144, 2258399.784071928821504 ], [ 520342.50103588408092, 2258369.754592386074364 ], [ 520513.435096546076238, 2258279.684564447961748 ], [ 520626.164260576188099, 2258448.14459924865514 ], [ 520762.181525778025389, 2258376.473341042175889 ], [ 520812.333455694955774, 2258406.818126703612506 ], [ 520903.606502649723552, 2258549.083034020848572 ], [ 520958.073014654626604, 2258712.208197169937193 ], [ 521054.061304811271839, 2258757.470341046340764 ], [ 521099.851293756510131, 2258773.501360257156193 ], [ 521169.475601263693534, 2258724.019192324019969 ], [ 521218.310757341969293, 2258463.100710393860936 ], [ 521189.872122302593198, 2257993.217075739987195 ], [ 521201.464403216494247, 2257931.282689832150936 ], [ 521169.919407639943529, 2257602.418859205208719 ], [ 521344.231618266843725, 2257472.149903449229896 ], [ 521427.741106975183357, 2257442.595857522450387 ], [ 521592.024367357604206, 2257336.496264470741153 ], [ 521772.413699461845681, 2257281.660383137874305 ], [ 521867.725269082176965, 2257232.815352814272046 ], [ 522059.550865601573605, 2257203.26768834143877 ], [ 522013.42501646769233, 2257054.633854305371642 ], [ 522216.974811258958653, 2256909.959656041115522 ], [ 522135.783584167598747, 2256826.36014829389751 ], [ 521989.504686672997195, 2256774.000550235621631 ], [ 522039.481335577263962, 2256696.591226812452078 ], [ 522187.08272438403219, 2256591.682070219889283 ], [ 522408.623984080855735, 2256332.854011635296047 ], [ 522495.772252693888731, 2256467.318519095890224 ], [ 522614.424694263550919, 2256704.239793472923338 ], [ 522636.397378765570465, 2257066.396955955773592 ], [ 522712.282590388669632, 2257080.791390778496861 ], [ 522805.858606744965073, 2257032.83427903149277 ], [ 522961.41836562944809, 2256977.778181775473058 ], [ 522994.657673957524821, 2256910.272697125561535 ], [ 523133.727402771648485, 2256861.050937112420797 ], [ 523186.625139755546115, 2256710.662676842883229 ], [ 523410.068139103124849, 2256486.050672229379416 ], [ 523395.083684530225582, 2256300.473760315217078 ], [ 523331.272465796559118, 2256199.447831223718822 ], [ 523448.065414122480433, 2256069.606585193425417 ], [ 523555.271805557364132, 2256031.658264704048634 ], [ 523575.318908774002921, 2255924.526725641451776 ], [ 523536.232117687584832, 2255888.632803459651768 ], [ 523575.897776532394346, 2255801.207400925457478 ], [ 523622.269422892073635, 2255532.034224118106067 ], [ 523688.52498889924027, 2255598.660454707220197 ], [ 523743.305664890445769, 2255677.448307575657964 ], [ 523916.176180916721933, 2255836.004847274161875 ], [ 524246.843798847810831, 2255898.724731529131532 ], [ 524395.240303862257861, 2255846.199677105993032 ], [ 524462.455124190892093, 2255655.088063316419721 ], [ 524603.987916693324223, 2255623.599356419406831 ], [ 524636.34991778479889, 2255531.587320385500789 ], [ 524675.24724032334052, 2255445.850802817381918 ], [ 524666.926243147114292, 2255308.442708257585764 ], [ 524653.390714439912699, 2255263.650413822382689 ], [ 524634.067017611349002, 2255138.72500016912818 ], [ 524521.383682753890753, 2254983.331180887296796 ], [ 524500.175564403412864, 2254888.517854591831565 ], [ 524358.705563423573039, 2254699.97598657105118 ], [ 524425.928633863921277, 2254596.933219725266099 ], [ 524398.148314064485021, 2254500.786093324422836 ], [ 524284.959244537050836, 2254481.93527299631387 ], [ 524233.096050785155967, 2254484.023771833628416 ], [ 524198.206499703926966, 2254328.048332521691918 ], [ 524150.55564873496769, 2254262.063413849100471 ], [ 524085.636415935063269, 2254200.254400204867125 ], [ 524203.941105472273193, 2253966.098268021829426 ], [ 524525.793597808107734, 2254019.710397863760591 ], [ 524621.791187595459633, 2253901.300382386893034 ], [ 524661.512338285683654, 2253762.365793026052415 ], [ 524866.192764876410365, 2253729.735326790250838 ], [ 524948.924751906073652, 2253602.911988692358136 ], [ 524907.359464114531875, 2253517.53073083050549 ], [ 524956.725504421512596, 2253284.573898092843592 ], [ 524993.747153440257534, 2253227.822702577337623 ], [ 524963.878737491555512, 2253166.468725926242769 ], [ 524972.62701069470495, 2253113.28015791811049 ], [ 524942.883058314211667, 2253072.090488727204502 ], [ 524812.506245177006349, 2252947.9584677554667 ], [ 524854.423233493231237, 2252693.104323802515864 ], [ 524783.555724579025991, 2252558.768802986480296 ], [ 524523.541959415073507, 2252463.635658090934157 ], [ 524413.209807473467663, 2252406.818929135799408 ], [ 524422.676852841279469, 2252349.257295870222151 ], [ 524391.218629728653468, 2252284.636385805904865 ], [ 524359.157441905816086, 2252194.801824067719281 ], [ 524273.801205690659117, 2252076.597792622633278 ], [ 524242.963581949297804, 2252047.236524745821953 ], [ 524048.502152994915377, 2252021.641649536788464 ], [ 523890.084451133967377, 2251869.001002132892609 ], [ 523800.645139780186582, 2251696.608447102829814 ], [ 523740.095445869956166, 2251700.404733181931078 ], [ 523657.535511121910531, 2251631.083458872511983 ], [ 523453.027451078640297, 2251500.717772058211267 ], [ 523343.018516540993005, 2251399.802362687885761 ], [ 523088.146017994382419, 2251351.263274791650474 ], [ 522969.804832734924275, 2251363.030705924145877 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 21.0, "GRIDCODE": 37.0, "X_COORD": 571128.90981999994, "Y_COORD": 291563.50932999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 536328.076767052756622, 2252014.938730927184224 ], [ 536291.109483838430606, 2252022.985112939961255 ], [ 536315.585783639107831, 2252051.020366348326206 ], [ 536328.076767052756622, 2252014.938730927184224 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 22.0, "GRIDCODE": 34.0, "X_COORD": 561790.89483999996, "Y_COORD": 293531.1607 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 525310.575190565316007, 2251237.205513622611761 ], [ 525231.723936902242713, 2251275.956590871326625 ], [ 525140.88533796207048, 2251376.961995452642441 ], [ 525052.404194407863542, 2251578.815245822072029 ], [ 524949.944742035702802, 2251703.399099771864712 ], [ 524759.821235263952985, 2251745.70465459022671 ], [ 524722.316557662910782, 2251821.88638305477798 ], [ 524619.392664575250819, 2251842.344654578715563 ], [ 524535.505799393518828, 2251721.682098048739135 ], [ 524485.861302198958583, 2251776.881735764443874 ], [ 524391.511991390376352, 2251797.875302784144878 ], [ 524359.150072659016587, 2251889.892571632750332 ], [ 524242.963581949297804, 2252047.236524745821953 ], [ 524273.801205690659117, 2252076.597792622633278 ], [ 524359.157441905816086, 2252194.801824067719281 ], [ 524391.218629728653468, 2252284.636385805904865 ], [ 524422.676852841279469, 2252349.257295870222151 ], [ 524413.209807473467663, 2252406.818929135799408 ], [ 524523.541959415073507, 2252463.635658090934157 ], [ 524783.555724579025991, 2252558.768802986480296 ], [ 524854.423233493231237, 2252693.104323802515864 ], [ 524812.506245177006349, 2252947.9584677554667 ], [ 524942.883058314211667, 2253072.090488727204502 ], [ 524972.62701069470495, 2253113.28015791811049 ], [ 524963.878737491555512, 2253166.468725926242769 ], [ 524993.747153440257534, 2253227.822702577337623 ], [ 524956.725504421512596, 2253284.573898092843592 ], [ 524907.359464114531875, 2253517.53073083050549 ], [ 524948.924751906073652, 2253602.911988692358136 ], [ 524866.192764876410365, 2253729.735326790250838 ], [ 524661.512338285683654, 2253762.365793026052415 ], [ 524621.791187595459633, 2253901.300382386893034 ], [ 524525.793597808107734, 2254019.710397863760591 ], [ 524203.941105472273193, 2253966.098268021829426 ], [ 524085.636415935063269, 2254200.254400204867125 ], [ 524150.55564873496769, 2254262.063413849100471 ], [ 524198.206499703926966, 2254328.048332521691918 ], [ 524233.096050785155967, 2254484.023771833628416 ], [ 524284.959244537050836, 2254481.93527299631387 ], [ 524398.148314064485021, 2254500.786093324422836 ], [ 524425.928633863921277, 2254596.933219725266099 ], [ 524358.705563423573039, 2254699.97598657105118 ], [ 524500.175564403412864, 2254888.517854591831565 ], [ 524521.383682753890753, 2254983.331180887296796 ], [ 524634.067017611349002, 2255138.72500016912818 ], [ 524653.390714439912699, 2255263.650413822382689 ], [ 524666.926243147114292, 2255308.442708257585764 ], [ 524769.839417226030491, 2255395.096475492231548 ], [ 524944.201112663722597, 2255366.365950588136911 ], [ 525028.934369632857852, 2255135.68399438355118 ], [ 525080.691846641362645, 2255166.896032489836216 ], [ 525164.164324007229879, 2255234.983554703183472 ], [ 525297.192429163260385, 2255232.498172551393509 ], [ 525544.275440310244448, 2255362.432789439335465 ], [ 525776.913728283485398, 2255396.024240725673735 ], [ 525967.528745602816343, 2255355.898860071785748 ], [ 526171.770227783359587, 2255416.414089037105441 ], [ 526197.323361193179153, 2255450.490716834552586 ], [ 526277.404291249345988, 2255492.798630610108376 ], [ 526308.964353399933316, 2255578.381506133824587 ], [ 526337.347753315349109, 2255638.362664417363703 ], [ 526366.874946939060465, 2255718.434398002922535 ], [ 526776.72755531151779, 2255786.713242213241756 ], [ 526832.0755745874485, 2255822.649297542870045 ], [ 527041.109726101043634, 2255863.676729822531343 ], [ 527064.779935878003016, 2255927.864965720102191 ], [ 527095.047817173763178, 2255957.733126042410731 ], [ 527142.050140767008997, 2256020.407021671533585 ], [ 527179.409959096927196, 2256025.798104745335877 ], [ 527224.328606798662804, 2256024.959631256759167 ], [ 527366.786370176938362, 2256045.523221884854138 ], [ 527484.15624514373485, 2256010.109246936626732 ], [ 527567.001877025235444, 2256022.069659256376326 ], [ 527573.916229346883483, 2255973.632395716384053 ], [ 527571.94713566522114, 2255856.951945611275733 ], [ 527692.455026073846966, 2255706.145973790436983 ], [ 527507.555567647097632, 2255555.346146515570581 ], [ 527321.945543792913668, 2255558.817337760701776 ], [ 527230.306715882848948, 2255510.402006894350052 ], [ 527300.728558801230974, 2255348.8052141033113 ], [ 527214.210398971103132, 2255098.142642168328166 ], [ 527212.517262389301322, 2254997.758973652496934 ], [ 527337.149918888462707, 2254968.174860382452607 ], [ 527459.268015285837464, 2254891.711565759032965 ], [ 527691.410849189502187, 2254978.111646486446261 ], [ 527756.520543554448523, 2254910.736138982698321 ], [ 527881.768860232201405, 2254863.402270019054413 ], [ 527881.169703456573188, 2254827.971910401247442 ], [ 527976.047969648614526, 2254755.235676420852542 ], [ 528024.079642060212791, 2254559.820104689337313 ], [ 528219.102770219324157, 2254513.521978537552059 ], [ 528356.307656722143292, 2254371.53991221357137 ], [ 528423.812561008497141, 2254319.789424038492143 ], [ 529293.26241965754889, 2253568.986561917699873 ], [ 529649.580170894856565, 2253335.933385702781379 ], [ 529696.248507126583718, 2253324.854440875351429 ], [ 529677.800752547802404, 2253247.487739508040249 ], [ 529516.845713826245628, 2253145.540284821763635 ], [ 529119.814911757945083, 2253205.70103869214654 ], [ 528975.681300312862732, 2253143.014548066072166 ], [ 528681.617646520840935, 2253035.671074582263827 ], [ 528463.503728242241777, 2252841.714386978186667 ], [ 528206.427912154700607, 2253000.177159681916237 ], [ 527850.317368336487561, 2252816.142402440309525 ], [ 527728.566302926512435, 2252691.551988332532346 ], [ 527615.664817303768359, 2252546.518903863616288 ], [ 527561.961104513844475, 2252539.90824556723237 ], [ 527472.245768859400414, 2252539.714674583636224 ], [ 527368.36387832055334, 2252526.923429471440613 ], [ 527280.706603785976768, 2252526.73252922296524 ], [ 527206.080800054362044, 2252265.880890170112252 ], [ 527265.542992336093448, 2251766.565982580184937 ], [ 527291.586069464799948, 2251602.765158506110311 ], [ 527246.948284782585688, 2251585.711438237689435 ], [ 527018.977240446722135, 2251486.548090605065227 ], [ 526988.135448206798173, 2251446.928552933968604 ], [ 526898.860247516771778, 2251412.820469573140144 ], [ 526742.826037423335947, 2251192.823037675581872 ], [ 526655.165822183364071, 2250825.072236584499478 ], [ 526427.661478149937466, 2250932.153776474297047 ], [ 526361.35027274931781, 2250923.986756682395935 ], [ 526301.280232219607569, 2250952.25783659145236 ], [ 526208.448710540658794, 2250974.995500671677291 ], [ 526139.883624593378045, 2251007.264086517505348 ], [ 526018.074802130460739, 2251176.430018778890371 ], [ 525812.341137490584515, 2251241.933418335393071 ], [ 525772.19839958823286, 2251282.003009653650224 ], [ 525712.413775954279117, 2251329.577390901744366 ], [ 525636.367546256748028, 2251435.183047839440405 ], [ 525417.299456612556241, 2251326.541490414179862 ], [ 525310.575190565316007, 2251237.205513622611761 ] ], [ [ 527229.418252674746327, 2252596.529999136924744 ], [ 527241.913658588659018, 2252560.450667317956686 ], [ 527266.387648446368985, 2252588.490004765801132 ], [ 527229.418252674746327, 2252596.529999136924744 ], [ 527216.9228379848646, 2252632.609307768754661 ], [ 527192.448845351464115, 2252604.569966698996723 ], [ 527229.418252674746327, 2252596.529999136924744 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 23.0, "GRIDCODE": 35.0, "X_COORD": 577552.61496000004, "Y_COORD": 294621.06487 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 539612.74087649199646, 2252098.394718845374882 ], [ 539462.432480921386741, 2252345.708754317834973 ], [ 539418.174089942011051, 2252585.409630634821951 ], [ 539347.431098201661371, 2252677.898672267794609 ], [ 539256.975470106466673, 2252755.422472183592618 ], [ 539282.616314018960111, 2252850.186069140210748 ], [ 539276.518853293149732, 2252923.952095163054764 ], [ 539269.643032172694802, 2253087.177336685359478 ], [ 539199.419147040462121, 2253206.046328171156347 ], [ 539165.388069108594209, 2253281.750052279792726 ], [ 539273.76852627354674, 2253467.365153746679425 ], [ 539269.970859217806719, 2253513.301396805793047 ], [ 539292.893760969047435, 2253635.088184347376227 ], [ 539311.690997997182421, 2253803.653865084052086 ], [ 539128.636750470963307, 2253836.861582474783063 ], [ 539052.09216204599943, 2253907.964478748850524 ], [ 539373.659960179938935, 2254305.178134238347411 ], [ 539493.082842653384432, 2254252.144707701168954 ], [ 539558.01552070886828, 2254226.557774426415563 ], [ 539639.338296038913541, 2254323.526895568706095 ], [ 539757.803441217401996, 2254328.443326597101986 ], [ 539876.823156412458047, 2254338.313011121936142 ], [ 539995.861779628670774, 2254343.253495077602565 ], [ 540076.767336320015602, 2254439.723404170013964 ], [ 540227.977046815794893, 2254525.906752578914165 ], [ 540185.481379923294298, 2254658.306834164075553 ], [ 540230.442015396081842, 2254824.458828237839043 ], [ 540168.482503444654867, 2254929.340984618291259 ], [ 540279.076183605589904, 2255086.996789270080626 ], [ 540317.18335087550804, 2255180.962868925184011 ], [ 540361.10146429669112, 2255282.245951513759792 ], [ 540312.763152561383322, 2255462.363736339844763 ], [ 540461.349190744571388, 2255521.543358847498894 ], [ 540520.160304964752868, 2255556.97143295314163 ], [ 540511.564781309105456, 2255661.000343041494489 ], [ 540504.230591473635286, 2255835.193742012605071 ], [ 540554.243471053312533, 2255950.529930485412478 ], [ 540578.660115719540045, 2256046.783642410300672 ], [ 540662.156709679402411, 2256138.613697806373239 ], [ 540689.439648287487216, 2256171.144025082699955 ], [ 540717.990702971816063, 2256202.542798236943781 ], [ 540766.612812969367951, 2256322.426329728215933 ], [ 540824.028015105403028, 2256420.737851206213236 ], [ 540849.434195479843765, 2256483.38031124509871 ], [ 540896.201968733803369, 2256591.228985206224024 ], [ 541105.078415137948468, 2256710.267484954558313 ], [ 541162.541656615794636, 2256744.879631926305592 ], [ 541193.864960960811004, 2256715.785694599151611 ], [ 541375.066597683238797, 2256697.423438405618072 ], [ 541468.021251942031085, 2256641.890001932159066 ], [ 541552.263284063432366, 2256742.324822354130447 ], [ 541542.649670045007952, 2256858.679669161327183 ], [ 541537.960141544113867, 2256970.133661090396345 ], [ 541654.281739644007757, 2257016.458045422099531 ], [ 541739.278076129383408, 2257082.802334370091558 ], [ 541827.419124745414592, 2257117.902805893681943 ], [ 541912.415773171233013, 2257184.24669836089015 ], [ 541999.288060043356381, 2257249.496582724153996 ], [ 542003.166057040798478, 2257157.321033625863492 ], [ 542129.755639318842441, 2257048.82891299109906 ], [ 542196.931822966551408, 2256928.656039749272168 ], [ 542261.390988830127753, 2256873.413719326257706 ], [ 542294.452926950063556, 2256814.268567995168269 ], [ 542434.338117010658607, 2256859.926165281794965 ], [ 542635.643889501574449, 2256715.539164613932371 ], [ 542769.17480739869643, 2256874.731086250394583 ], [ 542857.315889961901121, 2256909.829937811940908 ], [ 542884.600251315976493, 2256942.358683512546122 ], [ 542914.71087026107125, 2256975.468857964500785 ], [ 543014.44671567925252, 2257221.34186087269336 ], [ 543098.194735759636387, 2257269.063762965612113 ], [ 543133.635141187696718, 2257408.745378721505404 ], [ 543074.489431221387349, 2257593.038165982812643 ], [ 543106.488302083569579, 2257711.249160431325436 ], [ 543124.284877842175774, 2257896.095056897960603 ], [ 543029.455226829042658, 2257977.367610357701778 ], [ 543025.592562378733419, 2258069.266085715033114 ], [ 543018.117579134996049, 2258159.779565253295004 ], [ 543132.314611562294886, 2258256.960819533094764 ], [ 543246.666527813649736, 2258459.807150014676154 ], [ 543381.713863085955381, 2258574.73011664673686 ], [ 543408.999425582587719, 2258607.257699968293309 ], [ 543591.237302080611698, 2258772.85431796964258 ], [ 543628.34987268561963, 2258927.294028788805008 ], [ 543575.791237035300583, 2259055.615809929557145 ], [ 543690.424515994382091, 2259226.325773959979415 ], [ 543787.384011002955958, 2259264.931955425068736 ], [ 543844.465614492888562, 2259299.309075473807752 ], [ 543935.934908379102126, 2259335.729071766138077 ], [ 544035.301809679949656, 2259454.174416377209127 ], [ 544215.310591918416321, 2259594.654829642735422 ], [ 544356.089050642331131, 2259425.807220621034503 ], [ 544496.812230308772996, 2259400.266580537892878 ], [ 544589.389481338555925, 2259344.953755679540336 ], [ 544707.216497729416005, 2259277.002146175131202 ], [ 544543.292389602633193, 2259153.10181281901896 ], [ 544648.426251723081805, 2258896.415397422388196 ], [ 544733.151898587821051, 2258477.262938895262778 ], [ 544860.725988925783895, 2258487.828130506910384 ], [ 545147.142441981122829, 2258470.372002564370632 ], [ 545067.499526255181991, 2258375.438437023200095 ], [ 544873.655204815440811, 2258264.989469844847918 ], [ 544832.738383436109871, 2258113.855431972071528 ], [ 544945.673053095466457, 2257946.35346913151443 ], [ 545058.658489352208562, 2257955.708343665115535 ], [ 545186.300848949002102, 2257930.969832643866539 ], [ 545311.312174652004614, 2258006.253668894991279 ], [ 545601.368910903693177, 2257983.532324152998626 ], [ 545590.697571524768136, 2257684.119753366336226 ], [ 545552.305620814557187, 2257641.905562100932002 ], [ 545664.356147270416841, 2257452.20076469052583 ], [ 545641.11286036123056, 2257354.73738091532141 ], [ 545600.028292913339101, 2257309.564388715662062 ], [ 545711.911849720752798, 2257178.3660569479689 ], [ 545814.764520088792779, 2257054.990475906059146 ], [ 545930.766912580351345, 2256955.559557873755693 ], [ 545948.590356389293447, 2256739.626270503737032 ], [ 545967.894322813488543, 2256664.949977748095989 ], [ 545955.399680211325176, 2256647.661679713055491 ], [ 545858.837107814848423, 2256597.98997257836163 ], [ 545782.740304132574238, 2256525.595611539669335 ], [ 545740.166472939657979, 2256335.572910110466182 ], [ 545689.828588988864794, 2256327.208775913342834 ], [ 545574.533153950818814, 2256331.901431106030941 ], [ 545498.261154784122482, 2256259.34043204318732 ], [ 545475.04135086608585, 2256109.562489026226103 ], [ 545360.608681760379113, 2256090.551575913093984 ], [ 545269.68762465682812, 2256094.247292023152113 ], [ 545214.501763768843375, 2256057.55565149243921 ], [ 545030.000969203189015, 2256012.363928665407002 ], [ 544896.964921089704148, 2255829.036549650132656 ], [ 544875.726958343409933, 2255734.233390409499407 ], [ 544800.687593152164482, 2255613.642988009378314 ], [ 544726.240652314620093, 2255460.855931663885713 ], [ 544795.987747685518116, 2255303.869403241202235 ], [ 544704.286151760257781, 2255047.210664624348283 ], [ 544622.797977181850001, 2254993.024400819092989 ], [ 544431.269038768368773, 2254923.03080484084785 ], [ 544290.867688247351907, 2254622.384840562008321 ], [ 544147.602228024159558, 2254598.572636685334146 ], [ 543960.814720641588792, 2254799.060824774205685 ], [ 543900.582235518144444, 2254801.50855497084558 ], [ 543842.501716501428746, 2254791.857017354108393 ], [ 543733.742731126956642, 2254816.89674124866724 ], [ 543579.099837117828429, 2254864.887926102615893 ], [ 543457.759655015775934, 2254869.820355623029172 ], [ 543342.437778399675153, 2254760.096916886046529 ], [ 543333.295202592038549, 2254521.354870392940938 ], [ 543343.117211017059162, 2254461.505203865468502 ], [ 543338.798877480556257, 2254348.682899387553334 ], [ 543383.949838420725428, 2254190.573307748883963 ], [ 543434.49330903228838, 2254076.822298985905945 ], [ 543410.10392906179186, 2253787.523112709634006 ], [ 543312.083024727064185, 2253694.256701704114676 ], [ 543372.676500038709491, 2253629.21646374464035 ], [ 543482.083932008477859, 2253548.384368907660246 ], [ 543493.823225336964242, 2253476.862580227665603 ], [ 543446.528083550627343, 2253379.78696003742516 ], [ 543441.883694458752871, 2253258.432770309969783 ], [ 543455.605360094923526, 2253174.841219545342028 ], [ 543392.784801945555955, 2253133.06225623190403 ], [ 543302.085323993233033, 2253099.913592080585659 ], [ 543307.262454562005587, 2253068.384608059190214 ], [ 543297.364937306381762, 2252962.265285428613424 ], [ 543284.450723298126832, 2252945.05614522472024 ], [ 543233.50867187185213, 2252946.02098302077502 ], [ 543164.934131452813745, 2252909.818063329905272 ], [ 543094.414701587054878, 2252815.826357954181731 ], [ 543052.647788470960222, 2252809.810717670246959 ], [ 542905.839558613952249, 2252812.598542148247361 ], [ 542772.274524607346393, 2252634.584333227016032 ], [ 542532.021204392891377, 2252507.726471832022071 ], [ 542506.460087709128857, 2252473.65624117013067 ], [ 542435.137634233688004, 2252403.293628013692796 ], [ 542494.366324972244911, 2252310.184704414568841 ], [ 542410.076915935962461, 2252197.839642570354044 ], [ 542161.75258554390166, 2252210.388437801040709 ], [ 542055.752140439697541, 2252242.409143502824008 ], [ 541718.500054766773246, 2252193.812645287252963 ], [ 541677.767376689007506, 2252333.715981925837696 ], [ 541643.846580512705259, 2252359.73523741401732 ], [ 541644.870701551320963, 2252419.740504728630185 ], [ 541267.615377738140523, 2252426.895430348813534 ], [ 541087.338639124413021, 2252336.233134499751031 ], [ 540971.215903108823113, 2252146.616813436150551 ], [ 540949.997652963618748, 2252014.147242492064834 ], [ 540858.560969870421104, 2251820.990048218518496 ], [ 540883.297068958403543, 2251647.454104591161013 ], [ 540826.845417814678513, 2251555.27267829887569 ], [ 540802.391891781357117, 2251402.595140248537064 ], [ 540576.966862195637077, 2251431.594674756750464 ], [ 540345.882269576191902, 2251608.848530140705407 ], [ 540301.4069981679786, 2251789.95857435464859 ], [ 540065.483964241109788, 2251919.540350084193051 ], [ 540000.541913438239135, 2252255.407312731258571 ], [ 539946.068760782829486, 2252256.440927003510296 ], [ 539683.397781213279814, 2252124.79439483396709 ], [ 539612.74087649199646, 2252098.394718845374882 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 24.0, "GRIDCODE": 37.0, "X_COORD": 574679.54825, "Y_COORD": 295387.1928 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537176.247079629683867, 2250404.98910869192332 ], [ 537146.455563663272187, 2250403.134824386797845 ], [ 536910.474715527147055, 2250799.996208877302706 ], [ 536270.309245692798868, 2251776.724004538729787 ], [ 536249.977853859192692, 2251828.688115428201854 ], [ 536326.86974844976794, 2251881.113933054730296 ], [ 536378.9301161657786, 2251945.533675289712846 ], [ 536372.929780385224149, 2252004.438331747427583 ], [ 536433.875477252411656, 2252005.789341022260487 ], [ 536487.212028244044632, 2252141.48616436496377 ], [ 536478.7193483565934, 2252224.853763693012297 ], [ 536384.968381326994859, 2252302.293831161223352 ], [ 536347.50189791910816, 2252431.610410328023136 ], [ 536448.369074444402941, 2252732.2848542612046 ], [ 536493.853556203539483, 2252949.117023803293705 ], [ 536554.366439809906296, 2252950.455615186132491 ], [ 536585.06353582709562, 2253028.552577435038984 ], [ 536566.645624563214369, 2253162.880343429744244 ], [ 536515.193873107316904, 2253099.21593854855746 ], [ 536470.203168448642828, 2253067.335852450691164 ], [ 536416.346642958931625, 2253245.368304084986448 ], [ 536377.972850424703211, 2253362.751220426522195 ], [ 536341.725203782436438, 2253482.568981786258519 ], [ 536225.751232384121977, 2253795.073536224663258 ], [ 536034.666662447620183, 2253952.907064354978502 ], [ 535908.535626785364002, 2254003.707328259944916 ], [ 535518.782706906436943, 2253959.794105647131801 ], [ 535535.038768004043959, 2254400.272182359360158 ], [ 535550.269679952296428, 2254671.04126653727144 ], [ 535551.771100516663864, 2254868.755813614465296 ], [ 535603.046155101968907, 2254980.247864590026438 ], [ 535734.039959217887372, 2255084.351816447451711 ], [ 535735.892498310189694, 2255273.208322894759476 ], [ 535805.172387415426783, 2255362.170099167153239 ], [ 536115.508891448727809, 2255673.863620977848768 ], [ 536300.863043041201308, 2255935.075712079182267 ], [ 536371.968854082631879, 2256121.734414481557906 ], [ 536395.877186037716456, 2256712.862708806060255 ], [ 536423.909717190545052, 2256962.688997448422015 ], [ 536429.772305018617772, 2257354.033155962824821 ], [ 536455.228121668100357, 2257645.637239428237081 ], [ 536650.36635514954105, 2257643.243256350979209 ], [ 536756.629950846196152, 2257612.887943740934134 ], [ 536829.207584817893803, 2257653.221765481866896 ], [ 536941.544909667805769, 2257752.049617751501501 ], [ 537131.29040096711833, 2257794.834529662504792 ], [ 537250.74274342332501, 2258010.24688249733299 ], [ 537341.768262564204633, 2258049.009859845042229 ], [ 537597.765311142778955, 2258096.254421489313245 ], [ 537682.090141830849461, 2258310.72077361959964 ], [ 537759.225509724463336, 2258318.630214390344918 ], [ 537834.457602749112993, 2258320.292089847847819 ], [ 537855.541754617937841, 2258443.714078975841403 ], [ 537883.14268097456079, 2258505.50927565805614 ], [ 537788.395499250735156, 2258583.762774989940226 ], [ 537779.0065830264939, 2258675.953400173224509 ], [ 537808.842667574877851, 2258712.862210768274963 ], [ 537927.130423997994512, 2258758.98919949028641 ], [ 538113.070485268253833, 2258906.247828531078994 ], [ 538827.747985657886602, 2258922.031449227593839 ], [ 538866.456106523633935, 2259020.469120988622308 ], [ 538918.701965069631115, 2259137.430580177344382 ], [ 538916.808135069324635, 2259219.505715440958738 ], [ 538909.10751203878317, 2259295.131280108354986 ], [ 538952.837135324953124, 2259341.504168943502009 ], [ 538992.902921457309276, 2259391.065993924625218 ], [ 539092.919907124945894, 2259465.589298914186656 ], [ 539136.39074073440861, 2259642.195305316708982 ], [ 539377.470471255830489, 2259969.917520299553871 ], [ 539372.45919818978291, 2260019.13869874086231 ], [ 539399.743816784699447, 2260080.217975782230496 ], [ 539458.48269648256246, 2260229.586223177611828 ], [ 539567.256726664840244, 2260271.996763356029987 ], [ 539623.18510017299559, 2260372.834210622124374 ], [ 539677.055511509533972, 2260429.959115016274154 ], [ 539906.786709305364639, 2260714.116959833540022 ], [ 540230.655753654777072, 2260787.118859025649726 ], [ 540205.453672925825231, 2261034.686256139539182 ], [ 540248.972736201481894, 2261088.515319948084652 ], [ 540385.978899991605431, 2261209.020000694319606 ], [ 540602.136721622780897, 2261134.656276316381991 ], [ 540821.989266251563095, 2261256.7995640123263 ], [ 540878.499557048198767, 2261291.689348026178777 ], [ 540969.145814237068407, 2261327.028913415037096 ], [ 541036.777083752327599, 2261498.989059219136834 ], [ 541178.222037885570899, 2261721.771650775335729 ], [ 541525.673151390277781, 2261687.770766155794263 ], [ 541697.865460435627028, 2261583.26388784404844 ], [ 541760.398096045828424, 2261558.073632091283798 ], [ 541820.803908155299723, 2261530.448753104545176 ], [ 541945.870603449759074, 2261480.069779383018613 ], [ 542176.189235338242725, 2261356.629507368430495 ], [ 542152.345514583517797, 2261321.030854401178658 ], [ 542051.302031904808246, 2261231.591842137277126 ], [ 542095.987364981439896, 2261117.388839896768332 ], [ 542288.212006801506504, 2261054.523254834115505 ], [ 542415.770289933308959, 2261142.86572088021785 ], [ 542476.728134810691699, 2261233.882204105146229 ], [ 542566.765103135956451, 2261253.099256861023605 ], [ 542652.181559070246294, 2261127.323503837920725 ], [ 542705.081433928571641, 2261091.106385263614357 ], [ 542797.330664299777709, 2260984.736625831574202 ], [ 542980.905563623760827, 2260922.986125017516315 ], [ 542924.99519143125508, 2260756.061265237629414 ], [ 542632.217341113602743, 2260704.332697255536914 ], [ 542397.907842814107426, 2260498.136870921589434 ], [ 542475.292460736236535, 2260440.975114222615957 ], [ 542518.925008085905574, 2260394.149530804716051 ], [ 542701.285341906594113, 2260327.377890977077186 ], [ 542722.750563886133023, 2260196.618855847977102 ], [ 542718.074756968882866, 2260074.619065689854324 ], [ 542756.34008184983395, 2259988.513337332755327 ], [ 542791.055204715463333, 2259866.96361155807972 ], [ 542873.519541355315596, 2259765.194113702513278 ], [ 542900.13181212649215, 2259603.090790186077356 ], [ 542896.275841849856079, 2259502.453524981625378 ], [ 543004.298797803698108, 2259369.139306565746665 ], [ 543061.435487843351439, 2259255.971358276903629 ], [ 543222.082568304962479, 2259198.274262890219688 ], [ 543284.998876694240607, 2259208.729410012252629 ], [ 543404.060904804151505, 2259149.349436363205314 ], [ 543468.110574518563226, 2259125.896365117281675 ], [ 543499.073428089963272, 2259064.566972453147173 ], [ 543575.791237035300583, 2259055.615809929557145 ], [ 543628.34987268561963, 2258927.294028788805008 ], [ 543591.237302080611698, 2258772.85431796964258 ], [ 543408.999425582587719, 2258607.257699968293309 ], [ 543381.713863085955381, 2258574.73011664673686 ], [ 543246.666527813649736, 2258459.807150014676154 ], [ 543132.314611562294886, 2258256.960819533094764 ], [ 543018.117579134996049, 2258159.779565253295004 ], [ 543025.592562378733419, 2258069.266085715033114 ], [ 543029.455226829042658, 2257977.367610357701778 ], [ 543124.284877842175774, 2257896.095056897960603 ], [ 543106.488302083569579, 2257711.249160431325436 ], [ 543074.489431221387349, 2257593.038165982812643 ], [ 543133.635141187696718, 2257408.745378721505404 ], [ 543098.194735759636387, 2257269.063762965612113 ], [ 543014.44671567925252, 2257221.34186087269336 ], [ 542914.71087026107125, 2256975.468857964500785 ], [ 542884.600251315976493, 2256942.358683512546122 ], [ 542857.315889961901121, 2256909.829937811940908 ], [ 542769.17480739869643, 2256874.731086250394583 ], [ 542635.643889501574449, 2256715.539164613932371 ], [ 542434.338117010658607, 2256859.926165281794965 ], [ 542294.452926950063556, 2256814.268567995168269 ], [ 542261.390988830127753, 2256873.413719326257706 ], [ 542196.931822966551408, 2256928.656039749272168 ], [ 542129.755639318842441, 2257048.82891299109906 ], [ 542003.166057040798478, 2257157.321033625863492 ], [ 541999.288060043356381, 2257249.496582724153996 ], [ 541912.415773171233013, 2257184.24669836089015 ], [ 541827.419124745414592, 2257117.902805893681943 ], [ 541739.278076129383408, 2257082.802334370091558 ], [ 541654.281739644007757, 2257016.458045422099531 ], [ 541537.960141544113867, 2256970.133661090396345 ], [ 541542.649670045007952, 2256858.679669161327183 ], [ 541552.263284063432366, 2256742.324822354130447 ], [ 541468.021251942031085, 2256641.890001932159066 ], [ 541375.066597683238797, 2256697.423438405618072 ], [ 541193.864960960811004, 2256715.785694599151611 ], [ 541162.541656615794636, 2256744.879631926305592 ], [ 541105.078415137948468, 2256710.267484954558313 ], [ 540896.201968733803369, 2256591.228985206224024 ], [ 540849.434195479843765, 2256483.38031124509871 ], [ 540824.028015105403028, 2256420.737851206213236 ], [ 540766.612812969367951, 2256322.426329728215933 ], [ 540717.990702971816063, 2256202.542798236943781 ], [ 540689.439648287487216, 2256171.144025082699955 ], [ 540662.156709679402411, 2256138.613697806373239 ], [ 540578.660115719540045, 2256046.783642410300672 ], [ 540554.243471053312533, 2255950.529930485412478 ], [ 540504.230591473635286, 2255835.193742012605071 ], [ 540511.564781309105456, 2255661.000343041494489 ], [ 540520.160304964752868, 2255556.97143295314163 ], [ 540461.349190744571388, 2255521.543358847498894 ], [ 540312.763152561383322, 2255462.363736339844763 ], [ 540361.10146429669112, 2255282.245951513759792 ], [ 540317.18335087550804, 2255180.962868925184011 ], [ 540279.076183605589904, 2255086.996789270080626 ], [ 540168.482503444654867, 2254929.340984618291259 ], [ 540230.442015396081842, 2254824.458828237839043 ], [ 540185.481379923294298, 2254658.306834164075553 ], [ 540227.977046815794893, 2254525.906752578914165 ], [ 540076.767336320015602, 2254439.723404170013964 ], [ 539995.861779628670774, 2254343.253495077602565 ], [ 539876.823156412458047, 2254338.313011121936142 ], [ 539757.803441217401996, 2254328.443326597101986 ], [ 539639.338296038913541, 2254323.526895568706095 ], [ 539558.01552070886828, 2254226.557774426415563 ], [ 539493.082842653384432, 2254252.144707701168954 ], [ 539373.659960179938935, 2254305.178134238347411 ], [ 539052.09216204599943, 2253907.964478748850524 ], [ 539128.636750470963307, 2253836.861582474783063 ], [ 539311.690997997182421, 2253803.653865084052086 ], [ 539292.893760969047435, 2253635.088184347376227 ], [ 539269.970859217806719, 2253513.301396805793047 ], [ 539273.76852627354674, 2253467.365153746679425 ], [ 539165.388069108594209, 2253281.750052279792726 ], [ 539199.419147040462121, 2253206.046328171156347 ], [ 539269.643032172694802, 2253087.177336685359478 ], [ 539276.518853293149732, 2252923.952095163054764 ], [ 539282.616314018960111, 2252850.186069140210748 ], [ 539256.975470106466673, 2252755.422472183592618 ], [ 539347.431098201661371, 2252677.898672267794609 ], [ 539418.174089942011051, 2252585.409630634821951 ], [ 539462.432480921386741, 2252345.708754317834973 ], [ 539612.74087649199646, 2252098.394718845374882 ], [ 539524.307308379444294, 2252066.767238751985133 ], [ 539341.796187609434128, 2251913.599812748841941 ], [ 539141.324923972715624, 2251772.647414790466428 ], [ 539071.107151112868451, 2251671.699371672235429 ], [ 538936.230869532329962, 2251649.865498123690486 ], [ 538852.235854742466472, 2251611.065536516718566 ], [ 538463.315586386364885, 2251559.982392174191773 ], [ 538127.879626731388271, 2251429.880811422131956 ], [ 537933.829161785775796, 2251150.880523411557078 ], [ 537808.163381103193387, 2251035.511370535008609 ], [ 537757.719629817991517, 2250938.333350515924394 ], [ 537530.5783432982862, 2250652.804461944848299 ], [ 537331.771507189143449, 2250522.153055841103196 ], [ 537249.658172325813212, 2250453.234680011868477 ], [ 537176.247079629683867, 2250404.98910869192332 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 25.0, "GRIDCODE": 31.0, "X_COORD": 571867.1984, "Y_COORD": 289865.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537120.422887716791593, 2250341.050204223021865 ], [ 537116.664047514903359, 2250401.280523233115673 ], [ 537146.455563663272187, 2250403.134824386797845 ], [ 537176.247079629683867, 2250404.98910869192332 ], [ 537158.726983657339588, 2250363.746573708951473 ], [ 537120.422887716791593, 2250341.050204223021865 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 26.0, "GRIDCODE": 31.0, "X_COORD": 571822.1984, "Y_COORD": 289820.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537092.510837488691323, 2250309.080704919993877 ], [ 537090.631399704725482, 2250339.19588584266603 ], [ 537120.422887716791593, 2250341.050204223021865 ], [ 537122.302311342675239, 2250310.935023484751582 ], [ 537092.510837488691323, 2250309.080704919993877 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 27.0, "GRIDCODE": 33.0, "X_COORD": 584905.48696999997, "Y_COORD": 289763.50932999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 550085.312904336955398, 2251055.73500863276422 ], [ 550093.22607012768276, 2251093.084643190726638 ], [ 550120.994409414357506, 2251068.29484408441931 ], [ 550085.312904336955398, 2251055.73500863276422 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 28.0, "GRIDCODE": 27.0, "X_COORD": 570112.1984, "Y_COORD": 288560.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 535473.368907561758533, 2248938.505919435061514 ], [ 535471.488566224696115, 2248968.621703808195889 ], [ 535501.2794695480261, 2248970.476989020593464 ], [ 535503.15979676367715, 2248940.361204800195992 ], [ 535473.368907561758533, 2248938.505919435061514 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 29.0, "GRIDCODE": 31.0, "X_COORD": 575750.71707000001, "Y_COORD": 289640.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 539428.839676742441952, 2247854.444583693519235 ], [ 539378.63574405759573, 2247861.478080935776234 ], [ 539337.590289568062872, 2247879.001537400297821 ], [ 539320.970361330080777, 2247892.235441131517291 ], [ 539283.376726710819639, 2247962.981348764151335 ], [ 539192.415751659194939, 2248035.404264808632433 ], [ 539161.420253144926392, 2248066.359036601148546 ], [ 539134.51151067763567, 2248031.802039347589016 ], [ 539007.261512477416545, 2247938.319567985832691 ], [ 538883.284403623198159, 2247890.980636414140463 ], [ 538611.847706358064897, 2247890.452691172249615 ], [ 538447.766186932218261, 2247834.874779240228236 ], [ 538362.52352009434253, 2247834.70787428598851 ], [ 538295.148932263953611, 2247901.998391535133123 ], [ 538228.192324771196581, 2248027.998683180660009 ], [ 538227.54193186329212, 2248217.893522979691625 ], [ 538394.224709331640042, 2248800.259922936558723 ], [ 538517.279635492363013, 2248972.794531408697367 ], [ 538681.47659067157656, 2249061.769935271702707 ], [ 538811.11769219301641, 2249165.969738932326436 ], [ 538965.143898900714703, 2249499.286243422888219 ], [ 539104.974066443624906, 2249642.340655072592199 ], [ 539300.057442852528766, 2249642.721727336756885 ], [ 539358.983697174699046, 2249680.033195069991052 ], [ 539513.806745443027467, 2249748.430418436415493 ], [ 539600.193675698479638, 2249662.154357029125094 ], [ 539647.961405597161502, 2249723.497604214586318 ], [ 539817.907314287964255, 2249848.331663354299963 ], [ 540000.97262551728636, 2250328.942494040355086 ], [ 540158.455269341939129, 2250460.276506609283388 ], [ 540229.017965231672861, 2250550.887466824613512 ], [ 540146.743122491054237, 2250847.521452556364238 ], [ 540066.841242592781782, 2251034.759721847251058 ], [ 539936.212514369864948, 2251245.217948139645159 ], [ 539730.570191369857639, 2251394.436707198619843 ], [ 539480.658830370754004, 2251592.211913367733359 ], [ 539417.625584102701396, 2251616.825376152992249 ], [ 539326.064143609837629, 2251673.290922305546701 ], [ 539153.330764571204782, 2251694.885553278028965 ], [ 539071.107151112868451, 2251671.699371672235429 ], [ 539141.324923972715624, 2251772.647414790466428 ], [ 539341.796187609434128, 2251913.599812748841941 ], [ 539524.307308379444294, 2252066.767238751985133 ], [ 539612.74087649199646, 2252098.394718845374882 ], [ 539683.397781213279814, 2252124.79439483396709 ], [ 539946.068760782829486, 2252256.440927003510296 ], [ 540000.541913438239135, 2252255.407312731258571 ], [ 540065.483964241109788, 2251919.540350084193051 ], [ 540301.4069981679786, 2251789.95857435464859 ], [ 540345.882269576191902, 2251608.848530140705407 ], [ 540576.966862195637077, 2251431.594674756750464 ], [ 540802.391891781357117, 2251402.595140248537064 ], [ 540826.845417814678513, 2251555.27267829887569 ], [ 540883.297068958403543, 2251647.454104591161013 ], [ 540858.560969870421104, 2251820.990048218518496 ], [ 540949.997652963618748, 2252014.147242492064834 ], [ 540971.215903108823113, 2252146.616813436150551 ], [ 541087.338639124413021, 2252336.233134499751031 ], [ 541267.615377738140523, 2252426.895430348813534 ], [ 541644.870701551320963, 2252419.740504728630185 ], [ 541643.846580512705259, 2252359.73523741401732 ], [ 541677.767376689007506, 2252333.715981925837696 ], [ 541718.500054766773246, 2252193.812645287252963 ], [ 542055.752140439697541, 2252242.409143502824008 ], [ 542161.75258554390166, 2252210.388437801040709 ], [ 542410.076915935962461, 2252197.839642570354044 ], [ 542494.366324972244911, 2252310.184704414568841 ], [ 542435.137634233688004, 2252403.293628013692796 ], [ 542506.460087709128857, 2252473.65624117013067 ], [ 542532.021204392891377, 2252507.726471832022071 ], [ 542772.274524607346393, 2252634.584333227016032 ], [ 542905.839558613952249, 2252812.598542148247361 ], [ 543052.647788470960222, 2252809.810717670246959 ], [ 543094.414701587054878, 2252815.826357954181731 ], [ 543164.934131452813745, 2252909.818063329905272 ], [ 543233.50867187185213, 2252946.02098302077502 ], [ 543284.450723298126832, 2252945.05614522472024 ], [ 543297.364937306381762, 2252962.265285428613424 ], [ 543350.164416291285306, 2252950.883760638535023 ], [ 543484.004955675802194, 2252859.228409965522587 ], [ 543513.56772192788776, 2252718.734703346155584 ], [ 543495.052644724957645, 2252496.027488611638546 ], [ 543675.649102104944177, 2252434.126018864102662 ], [ 543724.159892527968623, 2252106.742977635934949 ], [ 543844.791708682780154, 2252065.394542186520994 ], [ 543848.422959245624952, 2251588.811611138284206 ], [ 543836.180170435691252, 2251514.417786164209247 ], [ 543906.178821677574888, 2251200.513309958390892 ], [ 543608.820286751841195, 2251193.973558753728867 ], [ 543530.977727810386568, 2251097.664890279993415 ], [ 543282.558183922432363, 2250891.089261650107801 ], [ 543229.839923771796748, 2250916.894299276173115 ], [ 543142.879864321323112, 2251000.666050819680095 ], [ 542975.884537428617477, 2250996.992434477433562 ], [ 542915.168564068619162, 2250750.270829045213759 ], [ 542854.974566054530442, 2250648.816433656960726 ], [ 542810.365798499784432, 2250467.543452750891447 ], [ 542751.033573771477677, 2250466.237093900330365 ], [ 542637.258265060721897, 2250366.135679502040148 ], [ 542488.972589923418127, 2250327.840628521516919 ], [ 542462.26434631110169, 2250294.79757097736001 ], [ 542341.010046123992652, 2250192.636149184778333 ], [ 542292.901824266300537, 2250133.112716219387949 ], [ 542263.781550704385154, 2250102.222372968681157 ], [ 542236.634672296000645, 2250068.635143213905394 ], [ 542110.314966208185069, 2250154.554841298609972 ], [ 541945.032866275054403, 2250052.46799398213625 ], [ 541908.316957002156414, 2250048.702425315976143 ], [ 541847.839561520377174, 2250076.371291947551072 ], [ 541632.776862643193454, 2250104.177947683259845 ], [ 541536.605517540941946, 2250263.007414281368256 ], [ 541484.450638518086635, 2250524.818968403153121 ], [ 541253.54987424146384, 2250558.850624989718199 ], [ 541168.768294498207979, 2250396.943980508483946 ], [ 541013.733246237039566, 2250087.557613083161414 ], [ 540953.899543760577217, 2250024.089391930960119 ], [ 541023.378093653940596, 2250023.153741060756147 ], [ 541101.890638159005903, 2250031.201231146231294 ], [ 541133.665409069973975, 2250000.593668458983302 ], [ 541166.397272989386693, 2249973.547811174765229 ], [ 541278.66109465889167, 2249819.792907932773232 ], [ 541447.233777563204058, 2249751.868343375623226 ], [ 541491.82266606471967, 2249615.435803461819887 ], [ 541414.66953106620349, 2249419.170531783252954 ], [ 541244.540743609541096, 2249163.283837550319731 ], [ 541104.481219203677028, 2248910.659909682348371 ], [ 540925.545462144888006, 2248689.241751881316304 ], [ 540655.328524369746447, 2248782.237012793309987 ], [ 540467.017745551420376, 2248719.612996786832809 ], [ 540282.057202852098271, 2248662.717598141171038 ], [ 540017.137462324695662, 2248381.682161615230143 ], [ 539752.726875857682899, 2248054.477099952287972 ], [ 539473.188816205016337, 2247871.744214600883424 ], [ 539428.839676742441952, 2247854.444583693519235 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 30.0, "GRIDCODE": 25.0, "X_COORD": 573858.90981999994, "Y_COORD": 286913.50932999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 539330.344199623679742, 2247515.750868491828442 ], [ 539293.379925824119709, 2247523.799824447371066 ], [ 539317.855094516067766, 2247551.83566689863801 ], [ 539330.344199623679742, 2247515.750868491828442 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 31.0, "GRIDCODE": 25.0, "X_COORD": 573892.1984, "Y_COORD": 286880.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 539362.012972035328858, 2247487.48749780934304 ], [ 539332.222895989078097, 2247485.634319245815277 ], [ 539330.344199623679742, 2247515.750868491828442 ], [ 539360.134289747802541, 2247517.604046820662916 ], [ 539362.012972035328858, 2247487.48749780934304 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 32.0, "GRIDCODE": 32.0, "X_COORD": 558166.33352999995, "Y_COORD": 289315.83111000003 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 522969.804832734924275, 2251363.030705924145877 ], [ 523088.146017994382419, 2251351.263274791650474 ], [ 523343.018516540993005, 2251399.802362687885761 ], [ 523453.027451078640297, 2251500.717772058211267 ], [ 523657.535511121910531, 2251631.083458872511983 ], [ 523740.095445869956166, 2251700.404733181931078 ], [ 523800.645139780186582, 2251696.608447102829814 ], [ 523890.084451133967377, 2251869.001002132892609 ], [ 524048.502152994915377, 2252021.641649536788464 ], [ 524242.963581949297804, 2252047.236524745821953 ], [ 524359.150072659016587, 2251889.892571632750332 ], [ 524391.511991390376352, 2251797.875302784144878 ], [ 524485.861302198958583, 2251776.881735764443874 ], [ 524535.505799393518828, 2251721.682098048739135 ], [ 524619.392664575250819, 2251842.344654578715563 ], [ 524722.316557662910782, 2251821.88638305477798 ], [ 524759.821235263952985, 2251745.70465459022671 ], [ 524949.944742035702802, 2251703.399099771864712 ], [ 525052.404194407863542, 2251578.815245822072029 ], [ 525140.88533796207048, 2251376.961995452642441 ], [ 525231.723936902242713, 2251275.956590871326625 ], [ 525310.575190565316007, 2251237.205513622611761 ], [ 525302.745786343235523, 2251119.14229535870254 ], [ 525121.666863230289891, 2251001.556844024918973 ], [ 524982.632121763192117, 2250981.475324291735888 ], [ 524756.778258932754397, 2250985.688844913616776 ], [ 524577.954662303556688, 2250809.161257671192288 ], [ 524576.503429393284023, 2250722.74655051343143 ], [ 524585.209809993742965, 2250661.777506648562849 ], [ 524484.234592418419197, 2250608.418584551662207 ], [ 524415.29394687153399, 2250540.361519319936633 ], [ 524401.0086799855344, 2250257.167606662027538 ], [ 524373.937577910604887, 2250165.09542933665216 ], [ 524481.322515959152952, 2250124.514819870702922 ], [ 524531.347697678720579, 2250086.166389799676836 ], [ 524582.065919541637413, 2249988.314580897800624 ], [ 524749.316231093253009, 2249948.620926026254892 ], [ 524821.708342256373726, 2249787.217381210997701 ], [ 524909.39484942832496, 2249744.74075049161911 ], [ 525051.145238830242306, 2249721.381601177155972 ], [ 525101.050499528413638, 2249625.098170579411089 ], [ 525283.472033803001978, 2249525.334615983068943 ], [ 525329.277862812625244, 2249586.429145673289895 ], [ 525383.729442194453441, 2249481.372660166583955 ], [ 525489.634646903839894, 2249441.346807754598558 ], [ 525531.615594405913725, 2249360.348455376923084 ], [ 525598.929317239089869, 2249276.10506543982774 ], [ 525632.299242689274251, 2249185.238815497606993 ], [ 525785.216765770106576, 2249166.808214905671775 ], [ 525829.617360923206434, 2249120.85850209183991 ], [ 525910.718864311580546, 2249058.677964733913541 ], [ 525949.060147255193442, 2248902.691407304257154 ], [ 525982.812263602623716, 2248876.817421861924231 ], [ 526012.412014537723735, 2248846.181552726775408 ], [ 526075.241743131307885, 2248798.012919246219099 ], [ 526042.805520118330605, 2248746.234263479709625 ], [ 525937.773381099570543, 2248642.545251546427608 ], [ 525916.168332912609912, 2248507.426242827437818 ], [ 525855.209816258982755, 2248508.564278656616807 ], [ 525809.49398616340477, 2248384.560879569500685 ], [ 525727.804005994927138, 2248303.915187996812165 ], [ 525659.681446200702339, 2248106.470562323927879 ], [ 525655.498063322040252, 2247857.541374559514225 ], [ 525659.9151219825726, 2247826.605479285120964 ], [ 525617.636003948398866, 2247784.865790124051273 ], [ 525547.663965358282439, 2247670.528195751830935 ], [ 525525.885591431171633, 2247576.214794059284031 ], [ 525429.954793386976235, 2247540.342552711255848 ], [ 525354.066699960851111, 2247416.334152419120073 ], [ 525367.129856968531385, 2247324.846414664760232 ], [ 524965.772441106848419, 2247265.544402807019651 ], [ 524921.023836389416829, 2247205.852953173220158 ], [ 524885.841293101548217, 2247171.117648649029434 ], [ 524841.080119511578232, 2247049.687304649502039 ], [ 524798.517059062491171, 2246959.698564475402236 ], [ 524763.022426281124353, 2246863.404698307625949 ], [ 524706.741847401601262, 2246771.436510844156146 ], [ 524671.508548303623684, 2246618.84559375513345 ], [ 524496.567794011323713, 2246361.269918667152524 ], [ 524477.690959615749307, 2246076.438003074377775 ], [ 524411.534448413178325, 2246011.118469779379666 ], [ 524327.218215696280822, 2245986.923144357278943 ], [ 524117.412633346335497, 2246132.694753042422235 ], [ 524005.834959850937594, 2246060.225251327268779 ], [ 523888.092287162435241, 2246016.191251957789063 ], [ 523825.06916169798933, 2246081.413323336280882 ], [ 523740.347420461301226, 2246113.431501352228224 ], [ 523692.067151351366192, 2246206.580038911662996 ], [ 523495.624221844773274, 2246331.238914912566543 ], [ 523295.815760965575464, 2246378.660758049227297 ], [ 523204.520186741661746, 2246422.889371571131051 ], [ 523153.679988048679661, 2246709.662412173114717 ], [ 523032.972428118635435, 2246755.277575817890465 ], [ 522793.758971946139354, 2246921.473903300240636 ], [ 522665.81179533014074, 2246951.839450438506901 ], [ 522623.250440126052126, 2247124.959351850673556 ], [ 522555.933979634137359, 2247209.201791162602603 ], [ 522492.769342482963111, 2247298.206281534396112 ], [ 522155.618630632117856, 2247311.802665328606963 ], [ 522066.648574038059451, 2247298.946382071822882 ], [ 521903.107278595329262, 2247378.163339040242136 ], [ 521778.805181624658871, 2247407.662134058773518 ], [ 521697.085555705823936, 2247787.009331671521068 ], [ 521620.707593539904337, 2247815.869415976107121 ], [ 521591.105876275454648, 2247846.503334402106702 ], [ 521527.561385417939164, 2247870.51178418379277 ], [ 521400.00238056818489, 2248064.844593045301735 ], [ 521484.891306172299664, 2248109.713872941210866 ], [ 521605.59601370053133, 2248188.115871444344521 ], [ 521646.184697549964767, 2248363.922317568212748 ], [ 521676.445866147929337, 2248393.797168760560453 ], [ 521699.954661195923109, 2248460.414333394728601 ], [ 521626.958642783807591, 2248449.866794439032674 ], [ 521562.230273393157404, 2248451.070484014227986 ], [ 521504.707334774720948, 2248748.110831794328988 ], [ 521465.46406353241764, 2248778.192941804416478 ], [ 521391.194945855590049, 2248921.463783547282219 ], [ 521509.228887753270101, 2249038.002551483921707 ], [ 521267.675194145005662, 2249154.302480475045741 ], [ 521141.150550977443345, 2249299.806544557213783 ], [ 521066.032230421202257, 2249357.386636535637081 ], [ 521068.827420982008334, 2249524.279364664107561 ], [ 521265.918480829393957, 2249582.709010357037187 ], [ 521384.927328948921058, 2249580.497574056498706 ], [ 521447.771572306926828, 2249621.315041352063417 ], [ 521527.841783008305356, 2249663.634101126343012 ], [ 521559.390863609150983, 2249749.227699163369834 ], [ 521616.140166063793004, 2249869.209731998853385 ], [ 521677.196654768893495, 2250034.854407106526196 ], [ 521835.179840202210471, 2250031.916369767859578 ], [ 521916.383425695181359, 2250084.653640748932958 ], [ 522089.689057341311127, 2250081.432935094460845 ], [ 522158.605261618387885, 2250209.957738734781742 ], [ 522195.897219452483114, 2250246.773646907880902 ], [ 522307.08399865636602, 2250244.705790245905519 ], [ 522410.825269152468536, 2250259.691101864911616 ], [ 522514.657671490567736, 2250257.760875851847231 ], [ 522580.451958285295404, 2250345.519727984443307 ], [ 522683.42939747357741, 2250447.183689071796834 ], [ 522702.016633892140817, 2250606.723564332351089 ], [ 522733.541629161743913, 2250713.954589393921196 ], [ 522873.695533919730224, 2250766.366993820294738 ], [ 523011.648172435699962, 2250915.915073172189295 ], [ 522919.746966316655744, 2250950.640240174718201 ], [ 522889.501857993891463, 2250991.54069310426712 ], [ 522949.88377224636497, 2251119.193134332075715 ], [ 522922.376041741634253, 2251311.780127201229334 ], [ 522957.030147171171848, 2251345.990507442504168 ], [ 522969.804832734924275, 2251363.030705924145877 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 33.0, "GRIDCODE": 30.0, "X_COORD": 562034.14084000001, "Y_COORD": 288869.53898999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 524411.534448413178325, 2246011.118469779379666 ], [ 524477.690959615749307, 2246076.438003074377775 ], [ 524496.567794011323713, 2246361.269918667152524 ], [ 524671.508548303623684, 2246618.84559375513345 ], [ 524706.741847401601262, 2246771.436510844156146 ], [ 524763.022426281124353, 2246863.404698307625949 ], [ 524798.517059062491171, 2246959.698564475402236 ], [ 524841.080119511578232, 2247049.687304649502039 ], [ 524885.841293101548217, 2247171.117648649029434 ], [ 524921.023836389416829, 2247205.852953173220158 ], [ 524965.772441106848419, 2247265.544402807019651 ], [ 525367.129856968531385, 2247324.846414664760232 ], [ 525354.066699960851111, 2247416.334152419120073 ], [ 525429.954793386976235, 2247540.342552711255848 ], [ 525525.885591431171633, 2247576.214794059284031 ], [ 525547.663965358282439, 2247670.528195751830935 ], [ 525617.636003948398866, 2247784.865790124051273 ], [ 525659.9151219825726, 2247826.605479285120964 ], [ 525655.498063322040252, 2247857.541374559514225 ], [ 525659.681446200702339, 2248106.470562323927879 ], [ 525727.804005994927138, 2248303.915187996812165 ], [ 525809.49398616340477, 2248384.560879569500685 ], [ 525855.209816258982755, 2248508.564278656616807 ], [ 525916.168332912609912, 2248507.426242827437818 ], [ 525937.773381099570543, 2248642.545251546427608 ], [ 526042.805520118330605, 2248746.234263479709625 ], [ 526075.241743131307885, 2248798.012919246219099 ], [ 526012.412014537723735, 2248846.181552726775408 ], [ 525982.812263602623716, 2248876.817421861924231 ], [ 525949.060147255193442, 2248902.691407304257154 ], [ 525910.718864311580546, 2249058.677964733913541 ], [ 525829.617360923206434, 2249120.85850209183991 ], [ 525785.216765770106576, 2249166.808214905671775 ], [ 525632.299242689274251, 2249185.238815497606993 ], [ 525598.929317239089869, 2249276.10506543982774 ], [ 525531.615594405913725, 2249360.348455376923084 ], [ 525489.634646903839894, 2249441.346807754598558 ], [ 525383.729442194453441, 2249481.372660166583955 ], [ 525329.277862812625244, 2249586.429145673289895 ], [ 525283.472033803001978, 2249525.334615983068943 ], [ 525101.050499528413638, 2249625.098170579411089 ], [ 525051.145238830242306, 2249721.381601177155972 ], [ 524909.39484942832496, 2249744.74075049161911 ], [ 524821.708342256373726, 2249787.217381210997701 ], [ 524749.316231093253009, 2249948.620926026254892 ], [ 524582.065919541637413, 2249988.314580897800624 ], [ 524531.347697678720579, 2250086.166389799676836 ], [ 524481.322515959152952, 2250124.514819870702922 ], [ 524373.937577910604887, 2250165.09542933665216 ], [ 524401.0086799855344, 2250257.167606662027538 ], [ 524415.29394687153399, 2250540.361519319936633 ], [ 524484.234592418419197, 2250608.418584551662207 ], [ 524585.209809993742965, 2250661.777506648562849 ], [ 524576.503429393284023, 2250722.74655051343143 ], [ 524577.954662303556688, 2250809.161257671192288 ], [ 524756.778258932754397, 2250985.688844913616776 ], [ 524982.632121763192117, 2250981.475324291735888 ], [ 525121.666863230289891, 2251001.556844024918973 ], [ 525302.745786343235523, 2251119.14229535870254 ], [ 525310.575190565316007, 2251237.205513622611761 ], [ 525417.299456612556241, 2251326.541490414179862 ], [ 525636.367546256748028, 2251435.183047839440405 ], [ 525712.413775954279117, 2251329.577390901744366 ], [ 525772.19839958823286, 2251282.003009653650224 ], [ 525812.341137490584515, 2251241.933418335393071 ], [ 526018.074802130460739, 2251176.430018778890371 ], [ 526139.883624593378045, 2251007.264086517505348 ], [ 526208.448710540658794, 2250974.995500671677291 ], [ 526301.280232219607569, 2250952.25783659145236 ], [ 526361.35027274931781, 2250923.986756682395935 ], [ 526427.661478149937466, 2250932.153776474297047 ], [ 526655.165822183364071, 2250825.072236584499478 ], [ 526742.826037423335947, 2251192.823037675581872 ], [ 526898.860247516771778, 2251412.820469573140144 ], [ 526988.135448206798173, 2251446.928552933968604 ], [ 527018.977240446722135, 2251486.548090605065227 ], [ 527246.948284782585688, 2251585.711438237689435 ], [ 527291.586069464799948, 2251602.765158506110311 ], [ 527327.395495769451372, 2251518.903002567589283 ], [ 527392.142644333536737, 2251324.484514171257615 ], [ 527269.144886005204171, 2251257.807293182238936 ], [ 527309.827961981995031, 2251213.109326983802021 ], [ 527411.976894519058987, 2251277.817075166851282 ], [ 527500.779613241436891, 2251082.057745940983295 ], [ 527641.251605940633453, 2250941.831509978510439 ], [ 527895.644604373723269, 2250778.006860752590001 ], [ 528223.726953223580495, 2250601.807174351066351 ], [ 528290.486795193282887, 2250334.85231114923954 ], [ 528505.011881721206009, 2250120.691668743267655 ], [ 528614.658370381221175, 2250077.904243987053633 ], [ 528487.596052405308001, 2249947.867062370292842 ], [ 528517.419773476663977, 2249939.697433487512171 ], [ 528673.660452864947729, 2250051.45319308154285 ], [ 528859.284296101774089, 2249964.071664779447019 ], [ 529275.022863696329296, 2249964.960698191076517 ], [ 529570.302672273712233, 2250077.756373982876539 ], [ 529701.734871481428854, 2250149.000467067584395 ], [ 529815.638522334396839, 2250232.698479984886944 ], [ 529971.019051547627896, 2250378.835603994317353 ], [ 530275.484114500926808, 2250649.594104160554707 ], [ 530340.478506435989402, 2250674.421453706920147 ], [ 530375.826381138642319, 2250530.575912256725132 ], [ 530541.268120268010534, 2250554.452962346374989 ], [ 530522.744673846522346, 2250391.780496844090521 ], [ 530409.875759778311476, 2250299.719773914664984 ], [ 530130.887172703398392, 2250112.91778227314353 ], [ 530066.965361733920872, 2250008.489997418597341 ], [ 530032.100553467753343, 2249857.584141219966114 ], [ 529801.679859149386175, 2249806.574833294376731 ], [ 529751.657588286674581, 2249807.513887458480895 ], [ 529722.0173547208542, 2249803.236475558951497 ], [ 529598.878050285507925, 2249805.544698395766318 ], [ 529409.873405985534191, 2249740.336582412943244 ], [ 529165.994472297490574, 2249744.905417625792325 ], [ 529074.457475793198682, 2249654.551792787387967 ], [ 529108.46625731990207, 2249553.416466066613793 ], [ 529144.098605950246565, 2249497.425271560437977 ], [ 529178.994711038772948, 2249430.087639760226011 ], [ 529269.332493753172457, 2249360.817236074246466 ], [ 529274.722391366260126, 2249323.052348741330206 ], [ 529273.446339819231071, 2249247.390317530371249 ], [ 529288.203019168577157, 2249143.993868116289377 ], [ 529195.830063627450727, 2249130.657329027540982 ], [ 529052.822761776158586, 2249133.337325946427882 ], [ 528989.974244663026184, 2249092.528556964360178 ], [ 528894.665725858067162, 2249056.8981425287202 ], [ 528821.11758699209895, 2248958.81183884292841 ], [ 528653.016930010868236, 2248869.989306484349072 ], [ 528648.529744948958978, 2248603.732700890861452 ], [ 528687.548368772258982, 2248330.365627680905163 ], [ 528602.51729976630304, 2248191.433161891996861 ], [ 528600.753647627076134, 2248086.782666684128344 ], [ 528607.288096565753222, 2248040.998648447915912 ], [ 528555.24577401438728, 2247930.988301789388061 ], [ 528653.561851758742705, 2247741.265779989771545 ], [ 528689.84705751715228, 2247713.444153128191829 ], [ 528688.826835649437271, 2247652.91297894436866 ], [ 528751.078438777592964, 2247605.176846358925104 ], [ 528773.133467827341519, 2247450.656379501335323 ], [ 528703.932262197718956, 2247414.088758639059961 ], [ 528667.323515211930498, 2247314.795013530179858 ], [ 528565.323237811564468, 2247150.339330992661417 ], [ 528463.55536982207559, 2247049.879178983159363 ], [ 528434.756691887509078, 2246971.762102512642741 ], [ 528262.338547123596072, 2246907.293630410917103 ], [ 528060.006921991356649, 2246708.74905832670629 ], [ 528024.898656334262341, 2246795.008870532736182 ], [ 527973.295902437763289, 2247061.628862152807415 ], [ 527477.79473826137837, 2247075.744703116826713 ], [ 527426.805301957880147, 2247007.738108403049409 ], [ 527324.805093586444855, 2246993.010447812266648 ], [ 527285.008159240474924, 2247034.197643557563424 ], [ 527168.438383087632246, 2246878.719679776579142 ], [ 527123.516952459933236, 2246861.923428137786686 ], [ 526755.188308718847111, 2246770.358292582444847 ], [ 526688.444444145192392, 2246681.333615886978805 ], [ 526449.65162410447374, 2246638.438127283938229 ], [ 526366.191557244164869, 2246570.343399024568498 ], [ 526334.756097621517256, 2246570.930419519543648 ], [ 526155.319386244402267, 2246509.005655908957124 ], [ 526165.509394770604558, 2246437.639750856906176 ], [ 526139.316042784368619, 2246264.325681403279305 ], [ 526057.095341613865457, 2246220.872988885268569 ], [ 525943.116960182902403, 2246118.432932528667152 ], [ 525884.191083134384826, 2246119.531761277467012 ], [ 525667.459721850114875, 2245906.833043227903545 ], [ 525446.088241963530891, 2245910.966862926259637 ], [ 525449.083340105833486, 2246089.277197811752558 ], [ 525263.3890906709712, 2246133.35856156796217 ], [ 524943.122249343898147, 2246087.09654781408608 ], [ 524841.461519514210522, 2245754.418417021632195 ], [ 524797.202157664229162, 2245839.818006904795766 ], [ 524750.563886287622154, 2245913.095972957089543 ], [ 524433.534336251090281, 2245988.352013366296887 ], [ 524411.534448413178325, 2246011.118469779379666 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 34.0, "GRIDCODE": 26.0, "X_COORD": 588205.48696999997, "Y_COORD": 285743.50932999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 553613.186957458383404, 2247223.261165818199515 ], [ 553621.100898443721235, 2247260.612421 ], [ 553648.866489857435226, 2247235.819452223367989 ], [ 553613.186957458383404, 2247223.261165818199515 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 35.0, "GRIDCODE": 25.0, "X_COORD": 575062.1984, "Y_COORD": 285650.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540600.831305073574185, 2246324.958150123246014 ], [ 540571.041815192787908, 2246323.105615777894855 ], [ 540569.163568213349208, 2246353.222731364890933 ], [ 540598.953072138596326, 2246355.075265451334417 ], [ 540600.831305073574185, 2246324.958150123246014 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 36.0, "GRIDCODE": 28.0, "X_COORD": 575167.1984, "Y_COORD": 285455.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540796.471686387085356, 2246065.018349173478782 ], [ 540748.293202774249949, 2246074.371397669427097 ], [ 540646.384975365712307, 2246110.355133469216526 ], [ 540606.466018459177576, 2246234.60671997256577 ], [ 540738.048014216357842, 2246227.709218059666455 ], [ 540783.193262366927229, 2246082.077666141092777 ], [ 540796.471686387085356, 2246065.018349173478782 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 37.0, "GRIDCODE": 28.0, "X_COORD": 575212.1984, "Y_COORD": 285080.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540755.675082617206499, 2245760.140283860266209 ], [ 540753.796859636669978, 2245790.257664564996958 ], [ 540783.586095532518812, 2245792.110119860619307 ], [ 540785.464304484892637, 2245761.992739418521523 ], [ 540755.675082617206499, 2245760.140283860266209 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 38.0, "GRIDCODE": 28.0, "X_COORD": 575175.9545, "Y_COORD": 284990.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540705.487929730908945, 2245605.848206064663827 ], [ 540718.145790455164388, 2245726.900581332854927 ], [ 540755.675082617206499, 2245760.140283860266209 ], [ 540779.738672859035432, 2245654.196737112477422 ], [ 540705.487929730908945, 2245605.848206064663827 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 39.0, "GRIDCODE": 28.0, "X_COORD": 575122.1984, "Y_COORD": 284885.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 540679.455338913830929, 2245543.760753735899925 ], [ 540675.69877719739452, 2245603.995698908343911 ], [ 540705.487929730908945, 2245605.848206064663827 ], [ 540709.244463401730172, 2245545.613261421211064 ], [ 540679.455338913830929, 2245543.760753735899925 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 40.0, "GRIDCODE": 29.0, "X_COORD": 564561.58996000001, "Y_COORD": 288065.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 528501.341494831023738, 2244694.328318995423615 ], [ 528394.187555077602156, 2244701.137248405255377 ], [ 528396.171044821152464, 2244734.205290008336306 ], [ 528358.778507657931186, 2244790.163983949460089 ], [ 528360.664777686470188, 2244821.605647296644747 ], [ 528346.282473185216077, 2244898.502776862122118 ], [ 528200.786416254355572, 2244930.894308445975184 ], [ 528172.199201673967764, 2244962.688753058202565 ], [ 528107.650313153862953, 2244985.550565239042044 ], [ 528017.60023376357276, 2245043.743137668818235 ], [ 527817.128552590380423, 2245074.657789132557809 ], [ 527599.454753746278584, 2245186.282045881263912 ], [ 527496.106495152693242, 2245253.065950851887465 ], [ 527404.132938320864923, 2245285.637572437524796 ], [ 527363.295755133964121, 2245463.82548116799444 ], [ 527556.435799686471, 2245599.709694278426468 ], [ 527585.991928990464658, 2245675.492111887782812 ], [ 527452.623178400914185, 2245875.06590292789042 ], [ 527456.067233677022159, 2245932.454375912435353 ], [ 527564.76632739265915, 2246032.299333031289279 ], [ 527587.113260794896632, 2246135.555266128852963 ], [ 527621.871293570962735, 2246204.974156386218965 ], [ 527705.933970852638595, 2246199.696215184405446 ], [ 527725.721201163250953, 2246310.143927350640297 ], [ 527440.629856767249294, 2246512.707330502569675 ], [ 527383.403341764467768, 2246576.353449258953333 ], [ 527336.483481316361576, 2246609.718483234755695 ], [ 527259.773733995039947, 2246595.170789383351803 ], [ 527151.844513337942772, 2246664.910857809707522 ], [ 527160.107180116581731, 2246802.613976886495948 ], [ 527154.359236710239202, 2246833.345546942204237 ], [ 527168.438383087632246, 2246878.719679776579142 ], [ 527285.008159240474924, 2247034.197643557563424 ], [ 527324.805093586444855, 2246993.010447812266648 ], [ 527426.805301957880147, 2247007.738108403049409 ], [ 527477.79473826137837, 2247075.744703116826713 ], [ 527973.295902437763289, 2247061.628862152807415 ], [ 528024.898656334262341, 2246795.008870532736182 ], [ 528060.006921991356649, 2246708.74905832670629 ], [ 528262.338547123596072, 2246907.293630410917103 ], [ 528434.756691887509078, 2246971.762102512642741 ], [ 528463.55536982207559, 2247049.879178983159363 ], [ 528565.323237811564468, 2247150.339330992661417 ], [ 528667.323515211930498, 2247314.795013530179858 ], [ 528703.932262197718956, 2247414.088758639059961 ], [ 528773.133467827341519, 2247450.656379501335323 ], [ 528751.078438777592964, 2247605.176846358925104 ], [ 528688.826835649437271, 2247652.91297894436866 ], [ 528689.84705751715228, 2247713.444153128191829 ], [ 528653.561851758742705, 2247741.265779989771545 ], [ 528555.24577401438728, 2247930.988301789388061 ], [ 528607.288096565753222, 2248040.998648447915912 ], [ 528600.753647627076134, 2248086.782666684128344 ], [ 528602.51729976630304, 2248191.433161891996861 ], [ 528687.548368772258982, 2248330.365627680905163 ], [ 528648.529744948958978, 2248603.732700890861452 ], [ 528653.016930010868236, 2248869.989306484349072 ], [ 528821.11758699209895, 2248958.81183884292841 ], [ 528894.665725858067162, 2249056.8981425287202 ], [ 528989.974244663026184, 2249092.528556964360178 ], [ 529052.822761776158586, 2249133.337325946427882 ], [ 529195.830063627450727, 2249130.657329027540982 ], [ 529288.203019168577157, 2249143.993868116289377 ], [ 529273.446339819231071, 2249247.390317530371249 ], [ 529274.722391366260126, 2249323.052348741330206 ], [ 529269.332493753172457, 2249360.817236074246466 ], [ 529178.994711038772948, 2249430.087639760226011 ], [ 529144.098605950246565, 2249497.425271560437977 ], [ 529108.46625731990207, 2249553.416466066613793 ], [ 529074.457475793198682, 2249654.551792787387967 ], [ 529165.994472297490574, 2249744.905417625792325 ], [ 529409.873405985534191, 2249740.336582412943244 ], [ 529598.878050285507925, 2249805.544698395766318 ], [ 529722.0173547208542, 2249803.236475558951497 ], [ 529751.657588286674581, 2249807.513887458480895 ], [ 529801.679859149386175, 2249806.574833294376731 ], [ 530032.100553467753343, 2249857.584141219966114 ], [ 530066.965361733920872, 2250008.489997418597341 ], [ 530130.887172703398392, 2250112.91778227314353 ], [ 530409.875759778311476, 2250299.719773914664984 ], [ 530522.744673846522346, 2250391.780496844090521 ], [ 530541.268120268010534, 2250554.452962346374989 ], [ 530375.826381138642319, 2250530.575912256725132 ], [ 530340.478506435989402, 2250674.421453706920147 ], [ 530395.888782531605102, 2250745.600974171422422 ], [ 530612.256758515257388, 2250858.497459224425256 ], [ 530841.563714245567098, 2250964.47927173692733 ], [ 531096.028917237534188, 2251169.046367490664124 ], [ 531215.351936451275833, 2251244.626596251502633 ], [ 531352.524974248604849, 2251318.972278624773026 ], [ 531484.586358350934461, 2251425.138608616776764 ], [ 531613.221905765240081, 2251400.435564051382244 ], [ 531871.249997434904799, 2251042.017484719865024 ], [ 532114.351821608957835, 2250864.737820986658335 ], [ 532458.407211868325248, 2250865.450858854688704 ], [ 532613.76106030435767, 2250949.651073444634676 ], [ 532787.320921974722296, 2251172.575463668443263 ], [ 532865.043962034629658, 2251182.139360749162734 ], [ 532808.721524403314106, 2251029.355250141583383 ], [ 532556.258969290996902, 2250858.769830801524222 ], [ 532381.653056677547283, 2250703.509113371372223 ], [ 532241.620456007076427, 2250656.067653244361281 ], [ 532015.118305227137171, 2250598.533816912211478 ], [ 531958.480359353590757, 2250475.321368550881743 ], [ 531959.034317151876166, 2250317.824482457712293 ], [ 532033.563494640402496, 2250177.619307624176145 ], [ 532326.313115503289737, 2249885.324625573121011 ], [ 532411.486544606741518, 2249852.079136417247355 ], [ 532442.486302521661855, 2249821.129064328037202 ], [ 532469.392882107989863, 2249855.688565036281943 ], [ 532560.484330070670694, 2249905.06185745075345 ], [ 532546.776002478902228, 2250017.535082194022834 ], [ 532701.874564891215414, 2249991.109130192548037 ], [ 532830.862681042519398, 2249953.223939511924982 ], [ 533272.543717559543438, 2250007.564771483652294 ], [ 533559.37904590216931, 2249907.468329389579594 ], [ 534342.406845225719735, 2249851.473423460498452 ], [ 534573.358359147212468, 2249916.379445915110409 ], [ 534904.668347729952075, 2250156.891247367486358 ], [ 535039.646744362777099, 2250265.391043533571064 ], [ 535307.989957165205851, 2250346.402263484895229 ], [ 535554.122512544970959, 2250512.695370116271079 ], [ 535784.472237035050057, 2250935.071872798725963 ], [ 535850.19007799995597, 2251019.474732053466141 ], [ 535964.835046280408278, 2251136.771775053814054 ], [ 536011.508712422917597, 2251238.281705567613244 ], [ 536169.179605759331025, 2251746.023604466579854 ], [ 536249.977853859192692, 2251828.688115428201854 ], [ 536270.309245692798868, 2251776.724004538729787 ], [ 536910.474715527147055, 2250799.996208877302706 ], [ 537146.455563663272187, 2250403.134824386797845 ], [ 537116.664047514903359, 2250401.280523233115673 ], [ 537120.422887716791593, 2250341.050204223021865 ], [ 537090.631399704725482, 2250339.19588584266603 ], [ 537092.510837488691323, 2250309.080704919993877 ], [ 537047.012022416340187, 2250292.804363423027098 ], [ 536964.899302252102643, 2250223.885283819399774 ], [ 536837.748335849377327, 2250134.474051143042743 ], [ 536534.895600482588634, 2250026.134524095803499 ], [ 536443.691555868135765, 2249949.581033709459007 ], [ 536181.466469041421078, 2249785.436592873185873 ], [ 536051.880605573533103, 2249666.605487305670977 ], [ 535957.270167240174487, 2249484.31233824044466 ], [ 535825.698440075968392, 2249363.507427408359945 ], [ 535642.643390568788163, 2249100.27825116738677 ], [ 535501.2794695480261, 2248970.476989020593464 ], [ 535471.488566224696115, 2248968.621703808195889 ], [ 535473.368907561758533, 2248938.505919435061514 ], [ 535396.305194454151206, 2248909.075884104706347 ], [ 535129.688026301329955, 2248740.217087409459054 ], [ 534834.138604709762149, 2248528.85465763323009 ], [ 534537.58658926084172, 2248573.826074549928308 ], [ 534267.345094626653008, 2248653.218282577581704 ], [ 534156.924017583252862, 2248721.305220728740096 ], [ 533789.35336135851685, 2248892.356828168965876 ], [ 533412.445323762949556, 2248817.579398795962334 ], [ 533155.105505566112697, 2248744.984492583200336 ], [ 533050.793599510448985, 2248744.768568189814687 ], [ 532673.133041511522606, 2248536.443338296376169 ], [ 532515.145318208960816, 2248467.826826063916087 ], [ 532345.328642664244398, 2248517.707681337371469 ], [ 531962.587427343125455, 2248530.085169191472232 ], [ 531828.75090613134671, 2248422.486522268503904 ], [ 531559.782761915936135, 2248224.847878801636398 ], [ 531495.500130119733512, 2248224.711101421155035 ], [ 531423.622409475618042, 2248215.866926928982139 ], [ 531325.344754674937576, 2248089.616934400983155 ], [ 531065.974354152102023, 2248032.015592756681144 ], [ 531015.127935512573458, 2247898.462564960122108 ], [ 530746.576670578331687, 2247752.885415733791888 ], [ 530685.770662351744249, 2247714.36783104762435 ], [ 530696.401595148257911, 2247627.178996821865439 ], [ 530463.227613856317475, 2247469.597140453755856 ], [ 530344.042156432988122, 2247424.067958116531372 ], [ 530294.305970561807044, 2247360.173094427213073 ], [ 530234.826123772305436, 2247327.926663947291672 ], [ 530042.446314678527415, 2247146.97089427895844 ], [ 530013.350457285530865, 2247070.541490371339023 ], [ 529948.996739886933938, 2247004.674773353151977 ], [ 529896.333523475681432, 2247004.563315735198557 ], [ 529840.25882416323293, 2246969.040966670960188 ], [ 529668.573860565666109, 2246917.182272864505649 ], [ 529650.856028810958378, 2246650.140356585383415 ], [ 529730.423140486469492, 2246586.81190006993711 ], [ 529781.226952541503124, 2246451.377066470682621 ], [ 529879.700202474952675, 2246338.281136002391577 ], [ 529917.05269281717483, 2246192.281415554694831 ], [ 529779.580540534458123, 2245999.455968825146556 ], [ 529601.503252174938098, 2245607.338183927349746 ], [ 529427.061366894864477, 2245512.765529195778072 ], [ 529395.482772901770659, 2245380.274656588211656 ], [ 529312.710406175348908, 2245335.396902717649937 ], [ 529281.862327434821054, 2245205.970216359943151 ], [ 528969.625330140464939, 2245205.304464002139866 ], [ 528883.443387176259421, 2245094.568686997517943 ], [ 528855.043360977666453, 2244776.874626290984452 ], [ 528675.045253972173668, 2244808.177112535573542 ], [ 528630.150943057378754, 2244738.431093527004123 ], [ 528501.341494831023738, 2244694.328318995423615 ] ], [ [ 532439.70944929565303, 2249626.244798961095512 ], [ 532423.499529097112827, 2249693.94063813611865 ], [ 532399.943685823818669, 2249640.580053564161062 ], [ 532439.70944929565303, 2249626.244798961095512 ] ], [ [ 532391.417180512333289, 2249441.838201829232275 ], [ 532355.738673559157178, 2249429.265972660854459 ], [ 532383.512555037508719, 2249404.484506485983729 ], [ 532391.417180512333289, 2249441.838201829232275 ], [ 532428.221125753247179, 2249460.558847443200648 ], [ 532399.16522423340939, 2249511.846914775669575 ], [ 532391.417180512333289, 2249441.838201829232275 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 41.0, "GRIDCODE": 33.0, "X_COORD": 581805.79336999997, "Y_COORD": 289724.29911999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 545838.82226638298016, 2245289.911961901001632 ], [ 545822.458357971278019, 2245303.437233253382146 ], [ 545789.363390346057713, 2245372.952204915694892 ], [ 545929.617103627300821, 2245521.729625967331231 ], [ 545952.572526035597548, 2245615.008520884439349 ], [ 546018.55990682716947, 2245685.006225790828466 ], [ 546167.400663948385045, 2245655.306890398263931 ], [ 546321.211447209003381, 2245671.059989902190864 ], [ 546462.807204443495721, 2245585.06649028044194 ], [ 546515.520131088327616, 2245559.256332703866065 ], [ 546756.09252054488752, 2245759.325148005969822 ], [ 546803.323945676675066, 2245879.461203078739345 ], [ 546832.443559684907086, 2245910.351073342375457 ], [ 546858.80947614973411, 2245948.883094081655145 ], [ 546784.721133220475167, 2246071.279504531063139 ], [ 546778.940390290925279, 2246322.456065244041383 ], [ 546858.265594107797369, 2246456.160534439608455 ], [ 546953.816039925324731, 2246759.144928294233978 ], [ 546973.269868038827553, 2246992.243627283722162 ], [ 546749.978006587247364, 2247148.184488911181688 ], [ 546606.189604167942889, 2247133.461436962708831 ], [ 546501.665622679051012, 2247131.169437003321946 ], [ 546442.235173994093202, 2247125.081394859589636 ], [ 546322.779267261736095, 2247122.460005004890263 ], [ 546160.922921550227329, 2247105.887065297923982 ], [ 546128.025647344999015, 2247137.58410366717726 ], [ 546035.717958972440101, 2247160.935225911438465 ], [ 545962.595358792692423, 2247194.397433324716985 ], [ 545822.399822265491821, 2247134.700418069958687 ], [ 545676.552583316690288, 2247201.442222885787487 ], [ 545574.177472920389846, 2247138.210003819316626 ], [ 545460.509899774333462, 2247190.227283589541912 ], [ 545287.941892104106955, 2247172.551101990044117 ], [ 545183.417569088633172, 2247170.256516841240227 ], [ 545132.333626186358742, 2247165.021174598485231 ], [ 545002.483586358372122, 2247084.82094394788146 ], [ 544831.546351742348634, 2247026.847201975993812 ], [ 544783.738762991968542, 2247114.578169449232519 ], [ 544691.430333537049592, 2247137.926987901329994 ], [ 544441.635481982375495, 2247330.897160449065268 ], [ 544401.373822273802944, 2247404.784067809581757 ], [ 544397.175234906258993, 2247587.018547341227531 ], [ 544450.75835033878684, 2247779.495522763580084 ], [ 544428.396412576199509, 2247999.266629642806947 ], [ 544430.988011299283244, 2248028.745287619531155 ], [ 544491.732435929239728, 2247970.2217559767887 ], [ 544733.08224708493799, 2247927.72754511795938 ], [ 544794.260812037624419, 2247899.732977435924113 ], [ 544860.671100894222036, 2247981.90132341440767 ], [ 545122.214496506028809, 2248529.062540025450289 ], [ 545224.354555184370838, 2248682.670978357084095 ], [ 545509.339078997960314, 2249131.695511553436518 ], [ 545769.979845236404799, 2249108.802863922901452 ], [ 545828.692548881052062, 2249052.234128336422145 ], [ 545972.084681125124916, 2249178.386039018630981 ], [ 546159.710148456739262, 2249226.82732162438333 ], [ 546089.747137396014296, 2249483.355319836176932 ], [ 546128.888597771641798, 2249524.870603726245463 ], [ 546153.722758961725049, 2249588.027863071300089 ], [ 546202.464449702063575, 2249697.157309321686625 ], [ 546323.633177446201444, 2249879.368776102550328 ], [ 546367.468134744558483, 2249997.599827671423554 ], [ 546304.41124914016109, 2250049.710077971220016 ], [ 546202.492755480459891, 2250147.907380050979555 ], [ 546249.253447434399277, 2250315.833753367885947 ], [ 546371.748637440148741, 2250445.751506648026407 ], [ 546438.300115013495088, 2250528.077873122878373 ], [ 546501.417469839798287, 2250728.187033825553954 ], [ 546627.011210772325285, 2250982.454085240140557 ], [ 546753.345221986994147, 2251195.352608470246196 ], [ 546580.851122860214673, 2251215.668476021848619 ], [ 546341.663749441853724, 2251136.157319809310138 ], [ 546103.422575139324181, 2251130.927781509235501 ], [ 545891.454360279603861, 2251060.462529988959432 ], [ 545863.879145523998886, 2250899.083494782447815 ], [ 545853.260209980071522, 2250869.344193178229034 ], [ 545708.524893323425204, 2251067.606440358795226 ], [ 545605.358693727175705, 2251152.855550413951278 ], [ 545667.460431369021535, 2251257.512810500338674 ], [ 545715.355997804203071, 2251379.311533384956419 ], [ 545708.657649652217515, 2251445.137293670326471 ], [ 545336.340279861236922, 2251752.791102145798504 ], [ 545034.49294568086043, 2251721.87942648306489 ], [ 544938.350091638043523, 2251719.769858496263623 ], [ 544818.173978582839482, 2251774.7553784949705 ], [ 544726.442113648168743, 2251765.361552729271352 ], [ 544609.430898027261719, 2251620.597499023191631 ], [ 544536.621826127986424, 2251543.380166685208678 ], [ 544496.557062236242928, 2251493.818141048774123 ], [ 544419.279499682714231, 2251411.857646253891289 ], [ 544321.215877733076923, 2251409.701429612934589 ], [ 544276.639828649698757, 2251405.135826940648258 ], [ 544100.283510221983306, 2251401.257215059362352 ], [ 543969.388585296808742, 2251480.732467174530029 ], [ 543836.180170435691252, 2251514.417786164209247 ], [ 543848.422959245624952, 2251588.811611138284206 ], [ 543844.791708682780154, 2252065.394542186520994 ], [ 543724.159892527968623, 2252106.742977635934949 ], [ 543675.649102104944177, 2252434.126018864102662 ], [ 543495.052644724957645, 2252496.027488611638546 ], [ 543513.56772192788776, 2252718.734703346155584 ], [ 543484.004955675802194, 2252859.228409965522587 ], [ 543350.164416291285306, 2252950.883760638535023 ], [ 543297.364937306381762, 2252962.265285428613424 ], [ 543307.262454562005587, 2253068.384608059190214 ], [ 543302.085323993233033, 2253099.913592080585659 ], [ 543392.784801945555955, 2253133.06225623190403 ], [ 543455.605360094923526, 2253174.841219545342028 ], [ 543441.883694458752871, 2253258.432770309969783 ], [ 543446.528083550627343, 2253379.78696003742516 ], [ 543493.823225336964242, 2253476.862580227665603 ], [ 543482.083932008477859, 2253548.384368907660246 ], [ 543372.676500038709491, 2253629.21646374464035 ], [ 543312.083024727064185, 2253694.256701704114676 ], [ 543410.10392906179186, 2253787.523112709634006 ], [ 543434.49330903228838, 2254076.822298985905945 ], [ 543383.949838420725428, 2254190.573307748883963 ], [ 543338.798877480556257, 2254348.682899387553334 ], [ 543343.117211017059162, 2254461.505203865468502 ], [ 543333.295202592038549, 2254521.354870392940938 ], [ 543342.437778399675153, 2254760.096916886046529 ], [ 543457.759655015775934, 2254869.820355623029172 ], [ 543579.099837117828429, 2254864.887926102615893 ], [ 543733.742731126956642, 2254816.89674124866724 ], [ 543842.501716501428746, 2254791.857017354108393 ], [ 543900.582235518144444, 2254801.50855497084558 ], [ 543960.814720641588792, 2254799.060824774205685 ], [ 544147.602228024159558, 2254598.572636685334146 ], [ 544290.867688247351907, 2254622.384840562008321 ], [ 544431.269038768368773, 2254923.03080484084785 ], [ 544622.797977181850001, 2254993.024400819092989 ], [ 544704.286151760257781, 2255047.210664624348283 ], [ 544795.987747685518116, 2255303.869403241202235 ], [ 544726.240652314620093, 2255460.855931663885713 ], [ 544800.687593152164482, 2255613.642988009378314 ], [ 544875.726958343409933, 2255734.233390409499407 ], [ 544896.964921089704148, 2255829.036549650132656 ], [ 545030.000969203189015, 2256012.363928665407002 ], [ 545214.501763768843375, 2256057.55565149243921 ], [ 545269.68762465682812, 2256094.247292023152113 ], [ 545360.608681760379113, 2256090.551575913093984 ], [ 545475.04135086608585, 2256109.562489026226103 ], [ 545498.261154784122482, 2256259.34043204318732 ], [ 545574.533153950818814, 2256331.901431106030941 ], [ 545689.828588988864794, 2256327.208775913342834 ], [ 545740.166472939657979, 2256335.572910110466182 ], [ 545782.740304132574238, 2256525.595611539669335 ], [ 545858.837107814848423, 2256597.98997257836163 ], [ 545955.399680211325176, 2256647.661679713055491 ], [ 545967.894322813488543, 2256664.949977748095989 ], [ 545984.260323603404686, 2256651.426943114958704 ], [ 546016.740149845601991, 2256591.833891709335148 ], [ 546116.558211844065227, 2256448.035906421020627 ], [ 546168.320604588021524, 2256312.871530403383076 ], [ 546371.122061994741671, 2256174.93194483127445 ], [ 546464.910236016963609, 2256137.1353326626122 ], [ 546500.067037414060906, 2256103.268713227473199 ], [ 546667.090662912582047, 2256120.366882550530136 ], [ 546611.81218971835915, 2255921.913442732766271 ], [ 546682.684823437943123, 2255853.638813667930663 ], [ 546970.092713343561627, 2255652.963536649011075 ], [ 546982.208858235389926, 2255533.846544437110424 ], [ 546984.19705069786869, 2255447.289658361114562 ], [ 547067.708784731687047, 2255332.900810328312218 ], [ 547220.320799239911139, 2255427.126889983192086 ], [ 547377.655447182245553, 2255407.809721388854086 ], [ 547455.825993938720785, 2255300.738493998534977 ], [ 547711.226946596754715, 2255169.667815401218832 ], [ 547774.112477460992523, 2254961.649226046167314 ], [ 547982.675393440877087, 2254826.213719521649182 ], [ 548168.271146200946532, 2254699.965506507083774 ], [ 548271.17064322438091, 2254658.493992698378861 ], [ 548385.380708166048862, 2254593.66406631283462 ], [ 548556.103228422696702, 2254470.141292108222842 ], [ 548666.916390188853256, 2254669.91898644529283 ], [ 548731.88268926506862, 2254676.567782097496092 ], [ 549059.722794853150845, 2254653.877649836242199 ], [ 549136.697393790469505, 2254749.077063482254744 ], [ 549200.284102689125575, 2254687.815257556736469 ], [ 549249.632523133652285, 2254647.032658064737916 ], [ 549209.298129346454516, 2254439.031907632946968 ], [ 549385.493747467524372, 2254394.46056246291846 ], [ 549538.929830439505167, 2254301.288000960834324 ], [ 549601.451981308637187, 2254276.085914465598762 ], [ 549634.994441286078654, 2254243.769593526609242 ], [ 549756.035265779239126, 2254194.980420956388116 ], [ 549816.430508850957267, 2254167.343546555377543 ], [ 549890.96544074465055, 2254137.298919345252216 ], [ 550004.551846637274139, 2254027.856861210428178 ], [ 550281.206692864070646, 2253799.226521719247103 ], [ 550327.302253342582844, 2253678.820899819023907 ], [ 550451.146553503698669, 2253576.470920489169657 ], [ 550458.704049125895835, 2253502.146685320883989 ], [ 550274.885628698742948, 2253225.803854074329138 ], [ 550421.032014367869124, 2253037.396163338795304 ], [ 550434.405079950112849, 2252905.842187481001019 ], [ 550392.95561921026092, 2252813.07639723084867 ], [ 550454.54463710624259, 2252711.335006083361804 ], [ 550296.329116137814708, 2252240.047218473628163 ], [ 550327.34975789708551, 2252203.823926642537117 ], [ 550360.0779019810725, 2252176.773430697619915 ], [ 550390.679392261081375, 2252147.288350891321898 ], [ 550513.382341364515014, 2252097.824390020221472 ], [ 550445.607388538774103, 2251972.438313365913928 ], [ 550120.600808693561703, 2251570.437839918769896 ], [ 549997.180996469571255, 2251478.488581345416605 ], [ 549857.010681542335078, 2251305.106747135519981 ], [ 549704.545934155234136, 2251191.519993668422103 ], [ 549707.103279166622087, 2251080.049728313460946 ], [ 549771.035894879722036, 2251050.789698834531009 ], [ 550085.312904336955398, 2251055.73500863276422 ], [ 550049.313984282198362, 2250939.881367416121066 ], [ 550082.923102947417647, 2250827.180610812269151 ], [ 550130.814907500753179, 2250793.098687860183418 ], [ 550167.092007901170291, 2250598.769962322898209 ], [ 550046.181647938094102, 2250433.53276399616152 ], [ 550190.513109056744725, 2250272.89730669837445 ], [ 550295.176969669759274, 2250198.408067906275392 ], [ 550242.914539002231322, 2250030.21504358202219 ], [ 550209.492929028347135, 2249807.154487090185285 ], [ 550152.029775483882986, 2249716.239859078079462 ], [ 550127.494573280448094, 2249603.091003096662462 ], [ 550031.664634614135139, 2249411.882725226692855 ], [ 550080.394256497267634, 2249150.834810003638268 ], [ 550072.839068494038656, 2249025.703004911541939 ], [ 550149.110889519099146, 2248914.95398554764688 ], [ 550207.780643834965304, 2248873.198927916586399 ], [ 550222.068774669081904, 2248857.296893185004592 ], [ 550212.74633084598463, 2248780.289390647783875 ], [ 550184.925103031098843, 2248719.797430050559342 ], [ 550136.490361644886434, 2248563.934917148202658 ], [ 550067.043110868660733, 2248412.95065145380795 ], [ 550008.149584744474851, 2248223.419819482602179 ], [ 549980.32893454155419, 2248162.927209188230336 ], [ 549940.210900960839354, 2248057.647911690175533 ], [ 549365.983581456472166, 2247943.433830870315433 ], [ 549339.845690413028933, 2247909.882389694452286 ], [ 549238.595339747844264, 2247855.035489692352712 ], [ 549200.362768073449843, 2247721.532312058843672 ], [ 549165.919530378538184, 2247577.236496780999005 ], [ 549037.825491677504033, 2247496.148548264987767 ], [ 548690.605101074557751, 2247495.532354387454689 ], [ 548596.982717058388516, 2247291.980881921947002 ], [ 548735.321769550675526, 2247141.632038875482976 ], [ 548794.856188845122233, 2247029.555498340167105 ], [ 548828.087504072696902, 2247003.081350768916309 ], [ 548890.80241591995582, 2246683.344043832272291 ], [ 549109.947726055048406, 2246645.933396209962666 ], [ 549029.755570106208324, 2246435.46641522180289 ], [ 548919.598762547248043, 2246294.02187221031636 ], [ 548791.683979618712328, 2246163.181805208325386 ], [ 548763.911287714494392, 2246046.824252837337554 ], [ 548653.706308391178027, 2245934.092066009528935 ], [ 548631.318985058460385, 2245840.304237021133304 ], [ 548576.856564524350688, 2245721.873109396547079 ], [ 548583.846248669084162, 2245664.411429069936275 ], [ 548556.949090946465731, 2245593.819664482027292 ], [ 548417.475197687745094, 2245405.460466776974499 ], [ 548393.213886509416625, 2245341.789470038376749 ], [ 548365.396687825326808, 2245281.293196479789913 ], [ 548354.203470114152879, 2245234.398753425106406 ], [ 548126.02215290418826, 2245328.005005272105336 ], [ 548004.444498219294474, 2245346.805168690159917 ], [ 547861.190966637455858, 2245246.748658124357462 ], [ 547772.586374375387095, 2245254.418670080602169 ], [ 547791.964839221443981, 2245487.454916052520275 ], [ 547682.506974532967433, 2245508.231739371083677 ], [ 547604.512637812877074, 2245391.733893264085054 ], [ 547496.174085231730714, 2245295.799262698739767 ], [ 547357.033680287073366, 2245227.836092644371092 ], [ 547263.951573129394092, 2245088.795388022437692 ], [ 546982.566217558574863, 2245010.252809913828969 ], [ 546902.443450757418759, 2245017.185650170780718 ], [ 546827.396575424354523, 2245001.167244737967849 ], [ 546737.204867769381963, 2245060.406910582445562 ], [ 546624.756116133648902, 2245084.660888752900064 ], [ 546544.024886980536394, 2245177.796023041009903 ], [ 546491.139905449352227, 2244925.430927417241037 ], [ 546283.519929585978389, 2244943.39572105742991 ], [ 546290.908762051374651, 2245032.302323976531625 ], [ 546255.119196280953474, 2245056.823215994983912 ], [ 546139.096827707602642, 2245190.671188368462026 ], [ 545944.101214113412425, 2245249.152553383260965 ], [ 545838.82226638298016, 2245289.911961901001632 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 42.0, "GRIDCODE": 27.0, "X_COORD": 567359.41275000002, "Y_COORD": 286137.15678999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 528855.043360977666453, 2244776.874626290984452 ], [ 528883.443387176259421, 2245094.568686997517943 ], [ 528969.625330140464939, 2245205.304464002139866 ], [ 529281.862327434821054, 2245205.970216359943151 ], [ 529312.710406175348908, 2245335.396902717649937 ], [ 529395.482772901770659, 2245380.274656588211656 ], [ 529427.061366894864477, 2245512.765529195778072 ], [ 529601.503252174938098, 2245607.338183927349746 ], [ 529779.580540534458123, 2245999.455968825146556 ], [ 529917.05269281717483, 2246192.281415554694831 ], [ 529879.700202474952675, 2246338.281136002391577 ], [ 529781.226952541503124, 2246451.377066470682621 ], [ 529730.423140486469492, 2246586.81190006993711 ], [ 529650.856028810958378, 2246650.140356585383415 ], [ 529668.573860565666109, 2246917.182272864505649 ], [ 529840.25882416323293, 2246969.040966670960188 ], [ 529896.333523475681432, 2247004.563315735198557 ], [ 529948.996739886933938, 2247004.674773353151977 ], [ 530013.350457285530865, 2247070.541490371339023 ], [ 530042.446314678527415, 2247146.97089427895844 ], [ 530234.826123772305436, 2247327.926663947291672 ], [ 530294.305970561807044, 2247360.173094427213073 ], [ 530344.042156432988122, 2247424.067958116531372 ], [ 530463.227613856317475, 2247469.597140453755856 ], [ 530696.401595148257911, 2247627.178996821865439 ], [ 530685.770662351744249, 2247714.36783104762435 ], [ 530746.576670578331687, 2247752.885415733791888 ], [ 531015.127935512573458, 2247898.462564960122108 ], [ 531065.974354152102023, 2248032.015592756681144 ], [ 531325.344754674937576, 2248089.616934400983155 ], [ 531423.622409475618042, 2248215.866926928982139 ], [ 531495.500130119733512, 2248224.711101421155035 ], [ 531559.782761915936135, 2248224.847878801636398 ], [ 531828.75090613134671, 2248422.486522268503904 ], [ 531962.587427343125455, 2248530.085169191472232 ], [ 532345.328642664244398, 2248517.707681337371469 ], [ 532515.145318208960816, 2248467.826826063916087 ], [ 532673.133041511522606, 2248536.443338296376169 ], [ 533050.793599510448985, 2248744.768568189814687 ], [ 533155.105505566112697, 2248744.984492583200336 ], [ 533412.445323762949556, 2248817.579398795962334 ], [ 533789.35336135851685, 2248892.356828168965876 ], [ 534156.924017583252862, 2248721.305220728740096 ], [ 534267.345094626653008, 2248653.218282577581704 ], [ 534537.58658926084172, 2248573.826074549928308 ], [ 534834.138604709762149, 2248528.85465763323009 ], [ 535129.688026301329955, 2248740.217087409459054 ], [ 535396.305194454151206, 2248909.075884104706347 ], [ 535473.368907561758533, 2248938.505919435061514 ], [ 535442.034645280218683, 2248811.101879947818816 ], [ 535253.20497984031681, 2248737.432615047320724 ], [ 535207.61696983105503, 2248635.317363440990448 ], [ 535136.935401248396374, 2248455.454599152319133 ], [ 534964.517132923938334, 2248348.926483404822648 ], [ 534671.814628373482265, 2248449.626236588694155 ], [ 534557.832198442425579, 2248411.923526004888117 ], [ 534480.982004596851766, 2248316.805467130616307 ], [ 534335.220158740878105, 2248271.948191056959331 ], [ 534342.981275286525488, 2247937.259435816667974 ], [ 534530.401692682760768, 2247656.772116418927908 ], [ 534596.309035321231931, 2247658.231791440397501 ], [ 534744.88778527919203, 2247673.481103243306279 ], [ 535199.885852763312869, 2247683.565257691778243 ], [ 535233.568261153297499, 2247759.017747578211129 ], [ 535252.968760479707271, 2247914.282982061617076 ], [ 535301.704044123762287, 2247824.879868897609413 ], [ 535528.00398484012112, 2247868.336458643898368 ], [ 535440.337261174921878, 2248013.095001594163477 ], [ 535488.62919337337371, 2248018.05123345553875 ], [ 535636.27596232353244, 2247875.839647265151143 ], [ 535867.969271764042787, 2247858.407277476042509 ], [ 536133.172482431982644, 2247602.964403117075562 ], [ 536381.751377098378725, 2247502.826429408974946 ], [ 536636.925833388580941, 2247305.757600074633956 ], [ 536996.584022186347283, 2247284.798305228352547 ], [ 536968.73248840321321, 2247227.439303456805646 ], [ 536835.268815044662915, 2247085.835897334851325 ], [ 536806.186535029439256, 2246981.322123561054468 ], [ 536785.122565200552344, 2246857.924044069834054 ], [ 536736.270345223019831, 2246682.362754155881703 ], [ 536892.156824886915274, 2246562.248637029901147 ], [ 537001.652095093508251, 2246494.05607174243778 ], [ 536987.186270957579836, 2246378.29426015727222 ], [ 536941.88042577134911, 2246263.003829583525658 ], [ 536864.153630014858209, 2246180.531150878407061 ], [ 536830.616288786521181, 2246105.408025855198503 ], [ 536953.58854363206774, 2245946.923349369317293 ], [ 536724.918320293771103, 2245887.837167888879776 ], [ 536648.367718871333636, 2245840.539240366779268 ], [ 536578.537236469681375, 2245907.805953065864742 ], [ 536577.224492631852627, 2245794.426707563921809 ], [ 536648.368306619231589, 2245676.94081765320152 ], [ 536623.888109026593156, 2245608.286010298877954 ], [ 536573.82441324996762, 2245496.137289796024561 ], [ 536562.128380414913408, 2245132.424338260665536 ], [ 536364.816057189833373, 2245022.720593039877713 ], [ 536256.266898140194826, 2244839.682695446535945 ], [ 536216.393061245442368, 2244738.205645671114326 ], [ 536101.218895117752254, 2244726.390270456671715 ], [ 535882.22666426980868, 2244754.682989899069071 ], [ 535799.320057298638858, 2244868.222343538887799 ], [ 535719.463627762859687, 2244934.196501012891531 ], [ 535661.249559662304819, 2245196.209784624166787 ], [ 535544.314073522458784, 2245389.308568076230586 ], [ 535495.58432307606563, 2245478.704416704364121 ], [ 535426.318586013978347, 2245593.087965780869126 ], [ 535467.874751670868136, 2245686.180411300621927 ], [ 535269.719797022640705, 2245705.556109562516212 ], [ 535266.290185555699281, 2245853.480753249488771 ], [ 535064.712309870170429, 2245961.529706476256251 ], [ 534886.481600240105763, 2245992.877695098519325 ], [ 534723.857902398332953, 2246215.575097164139152 ], [ 534662.917283422546461, 2246050.682970978319645 ], [ 534632.358173914952204, 2245871.598937454633415 ], [ 534494.160966875148006, 2245724.952190673910081 ], [ 534454.897611296968535, 2245565.276924975216389 ], [ 534393.452553251292557, 2245408.895352615974844 ], [ 534312.286518293200061, 2245272.022910705767572 ], [ 534377.578625707421452, 2245166.02888828702271 ], [ 534532.632751490455121, 2244986.080031963065267 ], [ 534584.524645535508171, 2244827.346995496191084 ], [ 534461.54136339109391, 2244779.359067003242671 ], [ 534347.167325159069151, 2244611.723957171663642 ], [ 534266.86127207253594, 2244526.500646976754069 ], [ 534073.852724867407233, 2244287.581421022303402 ], [ 533988.244895126787014, 2244234.675816733390093 ], [ 533850.119651513989083, 2244231.611851513385773 ], [ 533673.961040100548416, 2244156.54616033192724 ], [ 533539.535617109620944, 2244238.143243838101625 ], [ 533469.005397704313509, 2244266.555160512216389 ], [ 533383.021826129523106, 2244349.37345852330327 ], [ 533327.004730303655379, 2244343.623274706304073 ], [ 533229.293869813089259, 2244399.066334810107946 ], [ 533170.326908204820938, 2244455.861177265644073 ], [ 532949.325604637037031, 2244411.636344372294843 ], [ 532820.912692145793699, 2244252.669676763936877 ], [ 532699.685006271931343, 2244150.475972002372146 ], [ 532600.757043071440421, 2244028.00680263992399 ], [ 532449.728596149128862, 2243944.021366726607084 ], [ 532258.24644196999725, 2243825.683233433403075 ], [ 532066.470156542258337, 2243868.937241201288998 ], [ 531999.93186154065188, 2243990.989478199742734 ], [ 531965.315358739462681, 2244048.150207511149347 ], [ 531932.824480040348135, 2244107.746492825448513 ], [ 531893.241879610344768, 2244173.104792692698538 ], [ 531889.041457102284767, 2244353.844755898229778 ], [ 531723.292866946780123, 2244461.434666288085282 ], [ 531661.811030254000798, 2244520.650966444984078 ], [ 531549.750468009733595, 2244476.917127423919737 ], [ 531483.782217459869571, 2244436.149724470451474 ], [ 531371.088525234372355, 2244464.623761473223567 ], [ 531340.479692379012704, 2244494.101567850448191 ], [ 531307.745163809973747, 2244521.143706791102886 ], [ 531221.80100445903372, 2244603.916634792461991 ], [ 531147.264186605229042, 2244633.935743382200599 ], [ 531088.988240219652653, 2244690.062718858011067 ], [ 531026.464449108229019, 2244715.246683089993894 ], [ 530992.089639688376337, 2244804.959415904246271 ], [ 530897.893683749600314, 2244858.402797714807093 ], [ 530841.173240648931824, 2244913.028245657682419 ], [ 530744.361948877573013, 2244940.682987094856799 ], [ 530652.048576851957478, 2244964.008313740603626 ], [ 530535.689364615245722, 2245017.220020750537515 ], [ 530441.569406636757776, 2244982.2654127497226 ], [ 530416.752685779007152, 2244919.095817375928164 ], [ 530389.523491700645536, 2244858.078708925284445 ], [ 530364.706899288925342, 2244794.908966584131122 ], [ 530335.594669853220694, 2244764.009323669597507 ], [ 530308.895007060840726, 2244730.957088400609791 ], [ 530220.940271597239189, 2244665.368925775401294 ], [ 530232.931554029346444, 2244547.800537048839033 ], [ 530121.307947340072133, 2244478.812476222403347 ], [ 530055.368485087994486, 2244472.037540930323303 ], [ 529911.802845915546641, 2244468.84181752987206 ], [ 529819.879704157821834, 2244412.025457578711212 ], [ 529692.641011571628042, 2244470.211308954283595 ], [ 529562.821208268753253, 2244367.319375585764647 ], [ 529244.77171848481521, 2244414.129091142676771 ], [ 529187.804314264445566, 2244269.100638817064464 ], [ 529097.114609215292148, 2244369.157666023820639 ], [ 528957.401612287736498, 2244549.168984290212393 ], [ 528855.043360977666453, 2244776.874626290984452 ] ], [ [ 533425.945326184853911, 2247722.559690638445318 ], [ 533413.45278946054168, 2247758.643072739243507 ], [ 533388.979752745712176, 2247730.604536706581712 ], [ 533425.945326184853911, 2247722.559690638445318 ] ], [ [ 532067.527977828751318, 2246488.998648088425398 ], [ 532080.021250395802781, 2246452.9148621391505 ], [ 532104.493152066366747, 2246480.954577495343983 ], [ 532067.527977828751318, 2246488.998648088425398 ], [ 532078.708594128489494, 2246535.895859644748271 ], [ 532197.768090025754645, 2246571.855102736502886 ], [ 532281.64129179797601, 2246624.985508278012276 ], [ 532370.861362043535337, 2246673.348526783287525 ], [ 532416.884760835906491, 2246732.471036617644131 ], [ 532608.388328351895325, 2246756.03829138725996 ], [ 532845.595782844233327, 2246720.073797406628728 ], [ 533050.484371852944605, 2246777.878094546496868 ], [ 533473.482489396468736, 2246833.190525368787348 ], [ 533573.434254084480926, 2247050.643481308594346 ], [ 533580.746855769539252, 2247385.368578976020217 ], [ 533606.675044269999489, 2247475.987694475799799 ], [ 533642.023974843905307, 2247689.82577212061733 ], [ 533684.652304459013976, 2247663.946236437186599 ], [ 533741.649864916689694, 2247607.030768823809922 ], [ 533830.473995106527582, 2247696.394357591867447 ], [ 533648.101148070185445, 2247699.253868598490953 ], [ 533492.185884880833328, 2247646.43140646442771 ], [ 532939.227654322399758, 2247652.348739011213183 ], [ 532926.921777094248682, 2247753.306386949494481 ], [ 533172.910548460902646, 2247783.573680439963937 ], [ 533308.117147905868478, 2247719.911154904402792 ], [ 533376.065859715919942, 2247789.443825519643724 ], [ 533315.437068888917565, 2247911.341888287104666 ], [ 533161.086529564112425, 2247866.248358891345561 ], [ 532843.050879215588793, 2247744.775727041065693 ], [ 532843.309808117919602, 2247671.130715875886381 ], [ 532854.282422438729554, 2247581.11375967040658 ], [ 532738.771710783941671, 2247518.502737005241215 ], [ 532691.424211683217436, 2247457.682272133417428 ], [ 532470.020141677930951, 2247317.435898283496499 ], [ 532405.03595236770343, 2247309.439612958580256 ], [ 532359.707860638387501, 2247309.344984392635524 ], [ 532061.281441282248124, 2247225.146428019739687 ], [ 531907.040817054687068, 2247224.823107650503516 ], [ 531778.50071158236824, 2247059.693569229915738 ], [ 531740.743872278137133, 2247021.052741015329957 ], [ 531787.806353046558797, 2246910.801638032309711 ], [ 531829.201559890410863, 2246700.046563360840082 ], [ 531897.966115785413422, 2246589.280488358810544 ], [ 531898.099493882269599, 2246551.25251317024231 ], [ 531983.738071664236486, 2246561.792180374264717 ], [ 532020.805241987807676, 2246532.285759528167546 ], [ 532050.906593833118677, 2246502.230592703446746 ], [ 532067.527977828751318, 2246488.998648088425398 ] ], [ [ 531888.788825293537229, 2246477.854538387618959 ], [ 531870.213115837075748, 2246515.083290513604879 ], [ 531819.518757688812912, 2246485.78861693572253 ], [ 531888.788825293537229, 2246477.854538387618959 ] ], [ [ 532160.661843670648523, 2246434.336751946248114 ], [ 532148.168618365423754, 2246470.420566248707473 ], [ 532123.696705287671648, 2246442.38086670730263 ], [ 532160.661843670648523, 2246434.336751946248114 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 43.0, "GRIDCODE": 28.0, "X_COORD": 577775.35819000006, "Y_COORD": 287099.13432999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 542288.826449732063338, 2244192.562497409060597 ], [ 542198.059933353913948, 2244332.790819649584591 ], [ 542108.257989804144017, 2244577.54197387304157 ], [ 541775.062249034293927, 2244924.663299928419292 ], [ 541379.142221278743818, 2245227.039610443636775 ], [ 541059.233540070708841, 2245430.196908514015377 ], [ 540841.28744069871027, 2245581.729904877953231 ], [ 540836.019025566754863, 2245627.956845697015524 ], [ 541055.477305763284676, 2245490.431974099949002 ], [ 541160.833578241872601, 2245438.76572154648602 ], [ 541232.32726228365209, 2245534.080038184300065 ], [ 541358.305708437692374, 2245531.693328120745718 ], [ 541613.177268263418227, 2245626.5093037718907 ], [ 541734.139242859790102, 2245787.779998069629073 ], [ 541765.365061073331162, 2246095.527311432175338 ], [ 541679.983361114282161, 2246291.61907856259495 ], [ 541613.673255836940371, 2246395.876597027294338 ], [ 541533.468250436009839, 2246457.406997458077967 ], [ 541485.313943912275136, 2246769.889424557797611 ], [ 541472.348173897014931, 2246514.074781476520002 ], [ 541444.194805082399398, 2246484.341958199627697 ], [ 541388.163863347261213, 2246887.928577925078571 ], [ 541380.442355837440118, 2246505.973025131039321 ], [ 541174.040973376482725, 2246509.884681317023933 ], [ 541031.395589544204995, 2246446.592984337359667 ], [ 540874.906228467007168, 2246479.592829032801092 ], [ 540759.787013988476247, 2246404.869532165117562 ], [ 540716.437834587646648, 2246629.086299329064786 ], [ 540700.651019406621344, 2246391.777309307828546 ], [ 540600.831305073574185, 2246324.958150123246014 ], [ 540598.953072138596326, 2246355.075265451334417 ], [ 540569.163568213349208, 2246353.222731364890933 ], [ 540462.050286246463656, 2246456.414010259322822 ], [ 540331.123201760463417, 2246564.597327942028642 ], [ 540184.490638382965699, 2246705.856983372010291 ], [ 539984.65270703996066, 2246845.386361297219992 ], [ 539703.904337204876356, 2247056.525296687148511 ], [ 539648.736970265512355, 2247359.507328279316425 ], [ 539446.021189592545852, 2247809.587750196456909 ], [ 539428.839676742441952, 2247854.444583693519235 ], [ 539473.188816205016337, 2247871.744214600883424 ], [ 539752.726875857682899, 2248054.477099952287972 ], [ 540017.137462324695662, 2248381.682161615230143 ], [ 540282.057202852098271, 2248662.717598141171038 ], [ 540467.017745551420376, 2248719.612996786832809 ], [ 540655.328524369746447, 2248782.237012793309987 ], [ 540925.545462144888006, 2248689.241751881316304 ], [ 541104.481219203677028, 2248910.659909682348371 ], [ 541244.540743609541096, 2249163.283837550319731 ], [ 541414.66953106620349, 2249419.170531783252954 ], [ 541491.82266606471967, 2249615.435803461819887 ], [ 541447.233777563204058, 2249751.868343375623226 ], [ 541278.66109465889167, 2249819.792907932773232 ], [ 541166.397272989386693, 2249973.547811174765229 ], [ 541133.665409069973975, 2250000.593668458983302 ], [ 541101.890638159005903, 2250031.201231146231294 ], [ 541023.378093653940596, 2250023.153741060756147 ], [ 540953.899543760577217, 2250024.089391930960119 ], [ 541013.733246237039566, 2250087.557613083161414 ], [ 541168.768294498207979, 2250396.943980508483946 ], [ 541253.54987424146384, 2250558.850624989718199 ], [ 541484.450638518086635, 2250524.818968403153121 ], [ 541536.605517540941946, 2250263.007414281368256 ], [ 541632.776862643193454, 2250104.177947683259845 ], [ 541847.839561520377174, 2250076.371291947551072 ], [ 541908.316957002156414, 2250048.702425315976143 ], [ 541945.032866275054403, 2250052.46799398213625 ], [ 542110.314966208185069, 2250154.554841298609972 ], [ 542236.634672296000645, 2250068.635143213905394 ], [ 542263.781550704385154, 2250102.222372968681157 ], [ 542292.901824266300537, 2250133.112716219387949 ], [ 542341.010046123992652, 2250192.636149184778333 ], [ 542462.26434631110169, 2250294.79757097736001 ], [ 542488.972589923418127, 2250327.840628521516919 ], [ 542637.258265060721897, 2250366.135679502040148 ], [ 542751.033573771477677, 2250466.237093900330365 ], [ 542810.365798499784432, 2250467.543452750891447 ], [ 542854.974566054530442, 2250648.816433656960726 ], [ 542915.168564068619162, 2250750.270829045213759 ], [ 542975.884537428617477, 2250996.992434477433562 ], [ 543142.879864321323112, 2251000.666050819680095 ], [ 543229.839923771796748, 2250916.894299276173115 ], [ 543282.558183922432363, 2250891.089261650107801 ], [ 543530.977727810386568, 2251097.664890279993415 ], [ 543608.820286751841195, 2251193.973558753728867 ], [ 543906.178821677574888, 2251200.513309958390892 ], [ 543836.180170435691252, 2251514.417786164209247 ], [ 543969.388585296808742, 2251480.732467174530029 ], [ 544100.283510221983306, 2251401.257215059362352 ], [ 544276.639828649698757, 2251405.135826940648258 ], [ 544321.215877733076923, 2251409.701429612934589 ], [ 544419.279499682714231, 2251411.857646253891289 ], [ 544496.557062236242928, 2251493.818141048774123 ], [ 544536.621826127986424, 2251543.380166685208678 ], [ 544609.430898027261719, 2251620.597499023191631 ], [ 544726.442113648168743, 2251765.361552729271352 ], [ 544818.173978582839482, 2251774.7553784949705 ], [ 544938.350091638043523, 2251719.769858496263623 ], [ 545034.49294568086043, 2251721.87942648306489 ], [ 545336.340279861236922, 2251752.791102145798504 ], [ 545708.657649652217515, 2251445.137293670326471 ], [ 545715.355997804203071, 2251379.311533384956419 ], [ 545667.460431369021535, 2251257.512810500338674 ], [ 545605.358693727175705, 2251152.855550413951278 ], [ 545708.524893323425204, 2251067.606440358795226 ], [ 545853.260209980071522, 2250869.344193178229034 ], [ 545863.879145523998886, 2250899.083494782447815 ], [ 545891.454360279603861, 2251060.462529988959432 ], [ 546103.422575139324181, 2251130.927781509235501 ], [ 546341.663749441853724, 2251136.157319809310138 ], [ 546580.851122860214673, 2251215.668476021848619 ], [ 546753.345221986994147, 2251195.352608470246196 ], [ 546627.011210772325285, 2250982.454085240140557 ], [ 546501.417469839798287, 2250728.187033825553954 ], [ 546438.300115013495088, 2250528.077873122878373 ], [ 546371.748637440148741, 2250445.751506648026407 ], [ 546249.253447434399277, 2250315.833753367885947 ], [ 546202.492755480459891, 2250147.907380050979555 ], [ 546304.41124914016109, 2250049.710077971220016 ], [ 546367.468134744558483, 2249997.599827671423554 ], [ 546323.633177446201444, 2249879.368776102550328 ], [ 546202.464449702063575, 2249697.157309321686625 ], [ 546153.722758961725049, 2249588.027863071300089 ], [ 546128.888597771641798, 2249524.870603726245463 ], [ 546089.747137396014296, 2249483.355319836176932 ], [ 546159.710148456739262, 2249226.82732162438333 ], [ 545972.084681125124916, 2249178.386039018630981 ], [ 545828.692548881052062, 2249052.234128336422145 ], [ 545769.979845236404799, 2249108.802863922901452 ], [ 545509.339078997960314, 2249131.695511553436518 ], [ 545224.354555184370838, 2248682.670978357084095 ], [ 545122.214496506028809, 2248529.062540025450289 ], [ 544860.671100894222036, 2247981.90132341440767 ], [ 544794.260812037624419, 2247899.732977435924113 ], [ 544733.08224708493799, 2247927.72754511795938 ], [ 544491.732435929239728, 2247970.2217559767887 ], [ 544430.988011299283244, 2248028.745287619531155 ], [ 544428.396412576199509, 2247999.266629642806947 ], [ 544450.75835033878684, 2247779.495522763580084 ], [ 544397.175234906258993, 2247587.018547341227531 ], [ 544401.373822273802944, 2247404.784067809581757 ], [ 544441.635481982375495, 2247330.897160449065268 ], [ 544691.430333537049592, 2247137.926987901329994 ], [ 544783.738762991968542, 2247114.578169449232519 ], [ 544831.546351742348634, 2247026.847201975993812 ], [ 545002.483586358372122, 2247084.82094394788146 ], [ 545132.333626186358742, 2247165.021174598485231 ], [ 545183.417569088633172, 2247170.256516841240227 ], [ 545287.941892104106955, 2247172.551101990044117 ], [ 545460.509899774333462, 2247190.227283589541912 ], [ 545574.177472920389846, 2247138.210003819316626 ], [ 545676.552583316690288, 2247201.442222885787487 ], [ 545822.399822265491821, 2247134.700418069958687 ], [ 545962.595358792692423, 2247194.397433324716985 ], [ 546035.717958972440101, 2247160.935225911438465 ], [ 546128.025647344999015, 2247137.58410366717726 ], [ 546160.922921550227329, 2247105.887065297923982 ], [ 546322.779267261736095, 2247122.460005004890263 ], [ 546442.235173994093202, 2247125.081394859589636 ], [ 546501.665622679051012, 2247131.169437003321946 ], [ 546606.189604167942889, 2247133.461436962708831 ], [ 546749.978006587247364, 2247148.184488911181688 ], [ 546973.269868038827553, 2246992.243627283722162 ], [ 546953.816039925324731, 2246759.144928294233978 ], [ 546858.265594107797369, 2246456.160534439608455 ], [ 546778.940390290925279, 2246322.456065244041383 ], [ 546784.721133220475167, 2246071.279504531063139 ], [ 546858.80947614973411, 2245948.883094081655145 ], [ 546832.443559684907086, 2245910.351073342375457 ], [ 546803.323945676675066, 2245879.461203078739345 ], [ 546756.09252054488752, 2245759.325148005969822 ], [ 546515.520131088327616, 2245559.256332703866065 ], [ 546462.807204443495721, 2245585.06649028044194 ], [ 546321.211447209003381, 2245671.059989902190864 ], [ 546167.400663948385045, 2245655.306890398263931 ], [ 546018.55990682716947, 2245685.006225790828466 ], [ 545952.572526035597548, 2245615.008520884439349 ], [ 545929.617103627300821, 2245521.729625967331231 ], [ 545789.363390346057713, 2245372.952204915694892 ], [ 545822.458357971278019, 2245303.437233253382146 ], [ 545838.82226638298016, 2245289.911961901001632 ], [ 545826.751128880190663, 2245239.323269416578114 ], [ 545629.050310911377892, 2245238.960804630070925 ], [ 545453.676002314081416, 2245082.062493288889527 ], [ 545423.818852112395689, 2244977.765249505639076 ], [ 545373.182004973525181, 2244732.74540845118463 ], [ 545317.902991543291137, 2244757.849170504137874 ], [ 545264.122539565083571, 2244811.575258780270815 ], [ 545078.834060265915468, 2244866.054315267130733 ], [ 545038.198591945343651, 2244861.065144144929945 ], [ 544835.530256780097261, 2244956.556608917191625 ], [ 544710.812370661646128, 2244888.983430112712085 ], [ 544615.399403900024481, 2244828.566967817023396 ], [ 544099.137662219000049, 2244827.609296473674476 ], [ 544003.247416912345216, 2244766.89254954829812 ], [ 543913.980289258528501, 2244732.809750055894256 ], [ 543900.913464499171823, 2244716.031778735108674 ], [ 543671.473510941956192, 2244785.36047344468534 ], [ 543131.070628452347592, 2244893.829667652025819 ], [ 542714.235136327217333, 2244298.470610375516117 ], [ 542288.826449732063338, 2244192.562497409060597 ] ], [ [ 541492.38313331338577, 2246894.367306239902973 ], [ 541473.441249304218218, 2246992.80702415201813 ], [ 541450.9864359338535, 2246913.21408873796463 ], [ 541492.38313331338577, 2246894.367306239902973 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 44.0, "GRIDCODE": 26.0, "X_COORD": 586291.09731999994, "Y_COORD": 284806.48907000001 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 552899.634740948211402, 2243309.125820131972432 ], [ 552704.295273312716745, 2243311.289698761887848 ], [ 552635.533992075012065, 2243406.889642576687038 ], [ 552485.547829650109634, 2243526.383889530785382 ], [ 552321.008824507705867, 2243590.68836132530123 ], [ 552234.697701134602539, 2243676.936228065751493 ], [ 552139.918685610988177, 2243729.892593446187675 ], [ 552139.493813640554436, 2243861.090653223916888 ], [ 552096.726515601971187, 2243806.17540914285928 ], [ 552011.728524629725143, 2243846.240650580264628 ], [ 551954.107686665374786, 2243839.170432019978762 ], [ 551746.225353267975152, 2243881.860369644127786 ], [ 551711.445062701939605, 2243916.615588027983904 ], [ 551518.378322212374769, 2243978.204268119297922 ], [ 551517.734659157227725, 2244175.869464721530676 ], [ 551507.727323111728765, 2244258.175983971916139 ], [ 551401.010207477491349, 2244393.819340441375971 ], [ 551400.337127752020024, 2244601.874480159953237 ], [ 551528.983447619015351, 2244881.580012992024422 ], [ 551423.189325488987379, 2244955.250160696916282 ], [ 551252.821999001316726, 2244847.398923407308757 ], [ 551031.112212306703441, 2244847.014550678431988 ], [ 550940.236033194931224, 2244773.99215377215296 ], [ 550770.157082034042105, 2244704.824294097721577 ], [ 550605.447082672617398, 2244818.143151661381125 ], [ 550605.162715258658864, 2244905.384541259147227 ], [ 550593.292644559056498, 2245003.005341098643839 ], [ 550510.280863140127622, 2245069.12899633962661 ], [ 550346.545137472567149, 2245160.60650728829205 ], [ 550254.999198370263912, 2245217.095579620450735 ], [ 550111.318223863956518, 2245252.359464005567133 ], [ 550038.983247818076052, 2245324.636025031097233 ], [ 549902.198322250507772, 2245344.689617867581546 ], [ 549778.487150185625069, 2245185.847440777346492 ], [ 549737.060926186852157, 2245143.470563072711229 ], [ 549537.240163783775643, 2245237.642103414982557 ], [ 549474.055022338638082, 2245121.814334815368056 ], [ 549411.800855651847087, 2245058.134387196972966 ], [ 549371.216991114313714, 2245108.452996289357543 ], [ 549272.246248910785653, 2245171.200727488845587 ], [ 549233.630568313179538, 2245256.171229931525886 ], [ 549003.164436040446162, 2245082.175672157667577 ], [ 548810.60257706779521, 2245108.377048844471574 ], [ 548678.220988907851279, 2245073.277675963006914 ], [ 548535.190201869467273, 2245092.737386291846633 ], [ 548433.863361165276729, 2245218.359653853811324 ], [ 548354.203470114152879, 2245234.398753425106406 ], [ 548365.396687825326808, 2245281.293196479789913 ], [ 548393.213886509416625, 2245341.789470038376749 ], [ 548417.475197687745094, 2245405.460466776974499 ], [ 548556.949090946465731, 2245593.819664482027292 ], [ 548583.846248669084162, 2245664.411429069936275 ], [ 548576.856564524350688, 2245721.873109396547079 ], [ 548631.318985058460385, 2245840.304237021133304 ], [ 548653.706308391178027, 2245934.092066009528935 ], [ 548763.911287714494392, 2246046.824252837337554 ], [ 548791.683979618712328, 2246163.181805208325386 ], [ 548919.598762547248043, 2246294.02187221031636 ], [ 549029.755570106208324, 2246435.46641522180289 ], [ 549109.947726055048406, 2246645.933396209962666 ], [ 548890.80241591995582, 2246683.344043832272291 ], [ 548828.087504072696902, 2247003.081350768916309 ], [ 548794.856188845122233, 2247029.555498340167105 ], [ 548735.321769550675526, 2247141.632038875482976 ], [ 548596.982717058388516, 2247291.980881921947002 ], [ 548690.605101074557751, 2247495.532354387454689 ], [ 549037.825491677504033, 2247496.148548264987767 ], [ 549165.919530378538184, 2247577.236496780999005 ], [ 549200.362768073449843, 2247721.532312058843672 ], [ 549238.595339747844264, 2247855.035489692352712 ], [ 549339.845690413028933, 2247909.882389694452286 ], [ 549365.983581456472166, 2247943.433830870315433 ], [ 549940.210900960839354, 2248057.647911690175533 ], [ 549980.32893454155419, 2248162.927209188230336 ], [ 550008.149584744474851, 2248223.419819482602179 ], [ 550067.043110868660733, 2248412.95065145380795 ], [ 550136.490361644886434, 2248563.934917148202658 ], [ 550184.925103031098843, 2248719.797430050559342 ], [ 550212.74633084598463, 2248780.289390647783875 ], [ 550222.068774669081904, 2248857.296893185004592 ], [ 550385.517022594925947, 2248796.979592950083315 ], [ 550503.536648591398261, 2248890.439117730595171 ], [ 550622.030382851837203, 2248926.865809950977564 ], [ 550838.705754725146107, 2249060.654302079230547 ], [ 551055.489507859805599, 2249082.834591567516327 ], [ 551094.857383031048812, 2249017.791293260641396 ], [ 551158.794399524340406, 2248900.430776284076273 ], [ 551464.055635703494772, 2248807.784746674820781 ], [ 551472.656496029696427, 2248723.193676160648465 ], [ 551475.415778636583127, 2248602.808268540538847 ], [ 551552.061519997660071, 2248379.86733687389642 ], [ 551615.816948299994692, 2248354.161950080655515 ], [ 551617.546340774279088, 2248278.688010804355145 ], [ 551623.655819435487501, 2248218.601691052317619 ], [ 551626.679780345992185, 2248086.680495402775705 ], [ 551746.629795364220627, 2247947.394858532585204 ], [ 551803.693631723057479, 2247722.747017154470086 ], [ 551999.419396701036021, 2247586.030480486340821 ], [ 552167.121143625350669, 2247424.4035957865417 ], [ 552284.738805584027432, 2247426.971792576834559 ], [ 552387.164438616600819, 2247437.448271125555038 ], [ 552420.058281841455027, 2247405.747648244723678 ], [ 552482.573092438396998, 2247380.539832302369177 ], [ 552528.919607282965444, 2247171.69638060964644 ], [ 552651.679964943206869, 2247115.496842058375478 ], [ 552764.740223796805367, 2247127.063411254435778 ], [ 552971.326992495683953, 2247055.906360933557153 ], [ 553016.433514795731753, 2247170.60189399961382 ], [ 553125.002732948865741, 2247148.24646569788456 ], [ 553259.400789052830078, 2247066.604265508241951 ], [ 553423.633703232510015, 2247136.513114713132381 ], [ 553512.335368450265378, 2247171.089133020490408 ], [ 553613.186957458383404, 2247223.261165818199515 ], [ 553665.71480377856642, 2247122.098399381153286 ], [ 553698.537136504193768, 2247030.635203002020717 ], [ 553732.781605567317456, 2247005.320782368071377 ], [ 553790.185387363890186, 2246891.542667203582823 ], [ 553931.760598147986457, 2246847.569799003191292 ], [ 554175.428323480417021, 2246837.613364667631686 ], [ 554366.708446268923581, 2246869.373579882085323 ], [ 554530.373954124050215, 2246809.38098750449717 ], [ 554583.013739265385084, 2246752.850022606551647 ], [ 554736.413954272982664, 2246734.913445556536317 ], [ 554884.647654027910903, 2246711.061646864749491 ], [ 555038.047572871204466, 2246693.124200912192464 ], [ 555126.702926310244948, 2246665.582843371666968 ], [ 555251.733221461297944, 2246645.570905211381614 ], [ 555221.511052858317271, 2246583.551020159386098 ], [ 555198.394461183343083, 2246518.856145963072777 ], [ 555114.528734979452565, 2246439.069864356890321 ], [ 555183.018702883389778, 2246333.936567400582135 ], [ 555068.313539922935888, 2246224.80842374637723 ], [ 555043.990789533010684, 2246116.264325755648315 ], [ 555012.322433241643012, 2246051.268164977431297 ], [ 555104.864099277998321, 2245982.850363713689148 ], [ 555136.950617694295943, 2245787.175728081725538 ], [ 555007.952318443916738, 2245449.080917426384985 ], [ 555000.544505861005746, 2245256.325376546010375 ], [ 555069.813911903882399, 2245119.022994640283287 ], [ 555197.97718872060068, 2245037.390331574715674 ], [ 555349.664579065749422, 2245002.420626132749021 ], [ 555309.682794455206022, 2244598.943307171575725 ], [ 555181.761239699902944, 2244477.227871611714363 ], [ 555094.841725049889646, 2244335.622431566938758 ], [ 555042.669822638155892, 2244285.981344372034073 ], [ 555010.63861587503925, 2244002.190400214865804 ], [ 554905.859080442343839, 2243963.90640542190522 ], [ 554805.554129211697727, 2243897.207617267034948 ], [ 554673.172831075266004, 2243858.793365575373173 ], [ 554573.188543129130267, 2243805.850737571716309 ], [ 554537.548843121039681, 2243842.77623379137367 ], [ 554185.312745659030043, 2243792.087319343350828 ], [ 554065.56025360012427, 2243794.383712750859559 ], [ 553948.273480875650421, 2243777.507903382182121 ], [ 553773.09011120244395, 2243887.350263291969895 ], [ 553707.474839227972552, 2244014.099571450613439 ], [ 553688.70468510419596, 2243800.099922118708491 ], [ 553513.608987270272337, 2243756.460386987775564 ], [ 553368.900371972587891, 2243715.009214142337441 ], [ 552998.890895757009275, 2243663.15575042180717 ], [ 552922.130466412636451, 2243331.320928449742496 ], [ 552899.634740948211402, 2243309.125820131972432 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 45.0, "GRIDCODE": 21.0, "X_COORD": 578252.43766000005, "Y_COORD": 280505.0468 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 544142.804243861581199, 2241314.467380019836128 ], [ 544013.459048973978497, 2241318.400258656591177 ], [ 544060.849685598397627, 2241429.969018932431936 ], [ 544088.851790737826377, 2241381.744797798804939 ], [ 544129.673957510152832, 2241363.96635331492871 ], [ 544142.804243861581199, 2241314.467380019836128 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 46.0, "GRIDCODE": 25.0, "X_COORD": 568995.13693000004, "Y_COORD": 283595.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 532289.761750850244425, 2240062.647930807434022 ], [ 532239.722385092871264, 2240198.968630507588387 ], [ 532138.789404660579748, 2240276.387807480059564 ], [ 531931.554272975306958, 2240301.401047023944557 ], [ 531775.778378870338202, 2240409.685445969924331 ], [ 531486.846788579714485, 2240563.941183366812766 ], [ 531489.023542862501927, 2240693.045546303503215 ], [ 531479.999540327233262, 2240756.285921460948884 ], [ 531423.737453843816184, 2240748.16669690888375 ], [ 531326.885559841175564, 2240795.106873356737196 ], [ 531114.976986036635935, 2240820.681753200478852 ], [ 531044.393655415507965, 2240893.757288954220712 ], [ 530973.202318136114627, 2241031.16981740668416 ], [ 530977.121136505738832, 2241263.67117592971772 ], [ 530890.935130128753372, 2241371.579174233600497 ], [ 530810.216858704341576, 2241433.487524271942675 ], [ 530719.114452311652713, 2241527.804435732774436 ], [ 530594.571423690766096, 2241446.920022502541542 ], [ 530431.569474639371037, 2241676.691037583164871 ], [ 530307.929289506981149, 2241771.520079447887838 ], [ 530226.8525578744011, 2241759.81417578086257 ], [ 530074.387016508495435, 2241865.78468763269484 ], [ 530018.020677259657532, 2241924.135810478590429 ], [ 529935.10825325048063, 2242109.065634520724416 ], [ 529795.671604075585492, 2242306.265103123150766 ], [ 529797.645159235456958, 2242423.431864881888032 ], [ 529648.935492910793982, 2242458.750106189399958 ], [ 529572.005108895245939, 2242607.223117277957499 ], [ 529323.006858219043352, 2242798.184681750833988 ], [ 529274.76783487398643, 2242733.842123043723404 ], [ 529164.366552955005318, 2242675.493211350403726 ], [ 528881.490345867816359, 2242680.792209196835756 ], [ 528821.131277649779804, 2242672.079026602208614 ], [ 528775.790827368153259, 2242954.110985812731087 ], [ 528880.5507008114364, 2243057.539767757058144 ], [ 528905.30124316108413, 2243238.503151603043079 ], [ 528817.938514573732391, 2243439.039355574175715 ], [ 528887.83551368303597, 2243553.261088906787336 ], [ 528910.859118630527519, 2243627.729493054561317 ], [ 528800.116617298335768, 2243712.654075680300593 ], [ 528623.00975291559007, 2243962.282088626176119 ], [ 528458.802872934262268, 2244161.429529731161892 ], [ 528402.675074087106623, 2244269.747599075548351 ], [ 528442.176573748351075, 2244462.745365558192134 ], [ 528458.306446908973157, 2244647.415068588219583 ], [ 528488.566363496356644, 2244677.287632807157934 ], [ 528501.341494831023738, 2244694.328318995423615 ], [ 528630.150943057378754, 2244738.431093527004123 ], [ 528675.045253972173668, 2244808.177112535573542 ], [ 528855.043360977666453, 2244776.874626290984452 ], [ 528957.401612287736498, 2244549.168984290212393 ], [ 529097.114609215292148, 2244369.157666023820639 ], [ 529187.804314264445566, 2244269.100638817064464 ], [ 529244.77171848481521, 2244414.129091142676771 ], [ 529562.821208268753253, 2244367.319375585764647 ], [ 529692.641011571628042, 2244470.211308954283595 ], [ 529819.879704157821834, 2244412.025457578711212 ], [ 529911.802845915546641, 2244468.84181752987206 ], [ 530055.368485087994486, 2244472.037540930323303 ], [ 530121.307947340072133, 2244478.812476222403347 ], [ 530232.931554029346444, 2244547.800537048839033 ], [ 530220.940271597239189, 2244665.368925775401294 ], [ 530308.895007060840726, 2244730.957088400609791 ], [ 530335.594669853220694, 2244764.009323669597507 ], [ 530364.706899288925342, 2244794.908966584131122 ], [ 530389.523491700645536, 2244858.078708925284445 ], [ 530416.752685779007152, 2244919.095817375928164 ], [ 530441.569406636757776, 2244982.2654127497226 ], [ 530535.689364615245722, 2245017.220020750537515 ], [ 530652.048576851957478, 2244964.008313740603626 ], [ 530744.361948877573013, 2244940.682987094856799 ], [ 530841.173240648931824, 2244913.028245657682419 ], [ 530897.893683749600314, 2244858.402797714807093 ], [ 530992.089639688376337, 2244804.959415904246271 ], [ 531026.464449108229019, 2244715.246683089993894 ], [ 531088.988240219652653, 2244690.062718858011067 ], [ 531147.264186605229042, 2244633.935743382200599 ], [ 531221.80100445903372, 2244603.916634792461991 ], [ 531307.745163809973747, 2244521.143706791102886 ], [ 531340.479692379012704, 2244494.101567850448191 ], [ 531371.088525234372355, 2244464.623761473223567 ], [ 531483.782217459869571, 2244436.149724470451474 ], [ 531549.750468009733595, 2244476.917127423919737 ], [ 531661.811030254000798, 2244520.650966444984078 ], [ 531723.292866946780123, 2244461.434666288085282 ], [ 531889.041457102284767, 2244353.844755898229778 ], [ 531893.241879610344768, 2244173.104792692698538 ], [ 531932.824480040348135, 2244107.746492825448513 ], [ 531965.315358739462681, 2244048.150207511149347 ], [ 531999.93186154065188, 2243990.989478199742734 ], [ 532066.470156542258337, 2243868.937241201288998 ], [ 532258.24644196999725, 2243825.683233433403075 ], [ 532449.728596149128862, 2243944.021366726607084 ], [ 532600.757043071440421, 2244028.00680263992399 ], [ 532699.685006271931343, 2244150.475972002372146 ], [ 532820.912692145793699, 2244252.669676763936877 ], [ 532949.325604637037031, 2244411.636344372294843 ], [ 533170.326908204820938, 2244455.861177265644073 ], [ 533229.293869813089259, 2244399.066334810107946 ], [ 533327.004730303655379, 2244343.623274706304073 ], [ 533383.021826129523106, 2244349.37345852330327 ], [ 533469.005397704313509, 2244266.555160512216389 ], [ 533539.535617109620944, 2244238.143243838101625 ], [ 533673.961040100548416, 2244156.54616033192724 ], [ 533850.119651513989083, 2244231.611851513385773 ], [ 533988.244895126787014, 2244234.675816733390093 ], [ 534073.852724867407233, 2244287.581421022303402 ], [ 534266.86127207253594, 2244526.500646976754069 ], [ 534347.167325159069151, 2244611.723957171663642 ], [ 534461.54136339109391, 2244779.359067003242671 ], [ 534584.524645535508171, 2244827.346995496191084 ], [ 534532.632751490455121, 2244986.080031963065267 ], [ 534377.578625707421452, 2245166.02888828702271 ], [ 534312.286518293200061, 2245272.022910705767572 ], [ 534393.452553251292557, 2245408.895352615974844 ], [ 534454.897611296968535, 2245565.276924975216389 ], [ 534494.160966875148006, 2245724.952190673910081 ], [ 534632.358173914952204, 2245871.598937454633415 ], [ 534662.917283422546461, 2246050.682970978319645 ], [ 534723.857902398332953, 2246215.575097164139152 ], [ 534886.481600240105763, 2245992.877695098519325 ], [ 535064.712309870170429, 2245961.529706476256251 ], [ 535266.290185555699281, 2245853.480753249488771 ], [ 535269.719797022640705, 2245705.556109562516212 ], [ 535467.874751670868136, 2245686.180411300621927 ], [ 535426.318586013978347, 2245593.087965780869126 ], [ 535495.58432307606563, 2245478.704416704364121 ], [ 535544.314073522458784, 2245389.308568076230586 ], [ 535661.249559662304819, 2245196.209784624166787 ], [ 535719.463627762859687, 2244934.196501012891531 ], [ 535799.320057298638858, 2244868.222343538887799 ], [ 535882.22666426980868, 2244754.682989899069071 ], [ 536101.218895117752254, 2244726.390270456671715 ], [ 536216.393061245442368, 2244738.205645671114326 ], [ 536256.266898140194826, 2244839.682695446535945 ], [ 536364.816057189833373, 2245022.720593039877713 ], [ 536562.128380414913408, 2245132.424338260665536 ], [ 536573.82441324996762, 2245496.137289796024561 ], [ 536623.888109026593156, 2245608.286010298877954 ], [ 536648.368306619231589, 2245676.94081765320152 ], [ 536577.224492631852627, 2245794.426707563921809 ], [ 536578.537236469681375, 2245907.805953065864742 ], [ 536648.367718871333636, 2245840.539240366779268 ], [ 536724.918320293771103, 2245887.837167888879776 ], [ 536953.58854363206774, 2245946.923349369317293 ], [ 536830.616288786521181, 2246105.408025855198503 ], [ 536864.153630014858209, 2246180.531150878407061 ], [ 536941.88042577134911, 2246263.003829583525658 ], [ 536987.186270957579836, 2246378.29426015727222 ], [ 537001.652095093508251, 2246494.05607174243778 ], [ 537194.894995072623715, 2246526.222213845700026 ], [ 537328.95844589441549, 2246742.311326689086854 ], [ 537431.571512838127092, 2246867.382660663686693 ], [ 537741.135604845243506, 2246802.127415877766907 ], [ 537915.358730537467636, 2246879.442986867390573 ], [ 537945.363690464524552, 2247009.268640011548996 ], [ 538074.432856267085299, 2247136.641493570059538 ], [ 538324.685647219186649, 2247131.912638228386641 ], [ 538522.630335400230251, 2247219.751232961192727 ], [ 538891.757120568770915, 2247212.769106535241008 ], [ 539028.583510102704167, 2247301.586040390655398 ], [ 539088.639200514298864, 2247333.304572608321905 ], [ 539245.418162147980183, 2247461.157543828710914 ], [ 539351.065129106864333, 2247409.942207927815616 ], [ 539393.141372651094571, 2247416.006698857061565 ], [ 539362.012972035328858, 2247487.48749780934304 ], [ 539399.227628263062797, 2247504.919229558669031 ], [ 539360.134289747802541, 2247517.604046820662916 ], [ 539337.590289568062872, 2247879.001537400297821 ], [ 539378.63574405759573, 2247861.478080935776234 ], [ 539428.839676742441952, 2247854.444583693519235 ], [ 539446.021189592545852, 2247809.587750196456909 ], [ 539648.736970265512355, 2247359.507328279316425 ], [ 539703.904337204876356, 2247056.525296687148511 ], [ 539984.65270703996066, 2246845.386361297219992 ], [ 540184.490638382965699, 2246705.856983372010291 ], [ 540331.123201760463417, 2246564.597327942028642 ], [ 540462.050286246463656, 2246456.414010259322822 ], [ 540569.163568213349208, 2246353.222731364890933 ], [ 540522.519174925517291, 2246337.973039112053812 ], [ 540500.406501958379522, 2246300.827946618199348 ], [ 540454.264305549440905, 2246264.151863047853112 ], [ 540606.466018459177576, 2246234.60671997256577 ], [ 540646.384975365712307, 2246110.355133469216526 ], [ 540748.293202774249949, 2246074.371397669427097 ], [ 540796.471686387085356, 2246065.018349173478782 ], [ 540823.629711745656095, 2245973.200045181438327 ], [ 540723.846554137417115, 2245924.448815393261611 ], [ 540794.308620707713999, 2245900.297811621800065 ], [ 540783.586095532518812, 2245792.110119860619307 ], [ 540753.796859636669978, 2245790.257664564996958 ], [ 540755.675082617206499, 2245760.140283860266209 ], [ 540718.145790455164388, 2245726.900581332854927 ], [ 540705.487929730908945, 2245605.848206064663827 ], [ 540675.69877719739452, 2245603.995698908343911 ], [ 540679.455338913830929, 2245543.760753735899925 ], [ 540662.547200844972394, 2245475.029002897441387 ], [ 540229.622694241348654, 2244886.208695311099291 ], [ 540233.468728102743626, 2244719.817708265967667 ], [ 540287.095771155436523, 2244642.558015995658934 ], [ 540274.317896347027272, 2244625.520212101750076 ], [ 540097.068361190613359, 2244506.857837774790823 ], [ 539941.33344932354521, 2244299.212061671540141 ], [ 539792.334433252923191, 2244202.486499131657183 ], [ 539672.704768840107135, 2244167.060903367586434 ], [ 539578.700093608233146, 2244041.715808179229498 ], [ 539448.527749056229368, 2244022.947269186377525 ], [ 539372.907000265549868, 2244176.755010492168367 ], [ 539374.38078343460802, 2244263.395802716724575 ], [ 539259.058269161032513, 2244319.307540529407561 ], [ 539162.529425540124066, 2244321.133554146625102 ], [ 539000.490651120548137, 2244215.943384618498385 ], [ 538861.037349242717028, 2244235.249716266989708 ], [ 538757.839098569820635, 2244285.282513155601919 ], [ 538632.616787888924591, 2244287.650958211161196 ], [ 538425.832164179999381, 2244083.565880218520761 ], [ 538324.158530064625666, 2243894.018995487131178 ], [ 538230.457973655546084, 2243833.186798305250704 ], [ 537785.036763044656254, 2243747.243898251093924 ], [ 537673.877269592136145, 2243647.367233781144023 ], [ 537502.798948526266031, 2243523.478950038552284 ], [ 537501.917062402237207, 2243471.493866355158389 ], [ 537515.935061099822633, 2243373.178639222867787 ], [ 537270.789549871580675, 2243140.758139055222273 ], [ 537196.567617168067954, 2243179.829714408144355 ], [ 537068.597761792130768, 2243312.336555833928287 ], [ 536863.057022854685783, 2243282.690319001674652 ], [ 536777.828443799167871, 2243370.939423562958837 ], [ 536637.975909971632063, 2243438.738940443843603 ], [ 536568.725928249536082, 2243346.38884393684566 ], [ 536350.701504847849719, 2243152.823342562653124 ], [ 536456.989796854322776, 2242985.731251582503319 ], [ 536430.701828380813822, 2242845.383430594578385 ], [ 536356.743697853642516, 2242746.752298820763826 ], [ 536296.21836809895467, 2242687.010607456788421 ], [ 536203.332610269077122, 2242563.139229306019843 ], [ 536052.185936528258026, 2242506.637243753299117 ], [ 536006.726274082437158, 2242309.870490320958197 ], [ 535851.264038879307918, 2242287.442911500111222 ], [ 535713.568625341518782, 2242383.168030899949372 ], [ 535572.881185814156197, 2242362.870592721737921 ], [ 535365.532819761428982, 2242577.561993668787181 ], [ 535253.779692266718484, 2242619.829661632888019 ], [ 535211.422712815226987, 2242735.229762775823474 ], [ 535065.645972732687369, 2242759.288780139759183 ], [ 534891.498857047059573, 2242868.400828814134002 ], [ 534835.596666328725405, 2242869.45408224966377 ], [ 534791.141189143876545, 2242863.041432730853558 ], [ 534747.438312939484604, 2242863.865499650128186 ], [ 534613.041168335010298, 2242824.048984833061695 ], [ 534517.077796042780392, 2242781.448557909578085 ], [ 534433.942624783841893, 2242783.015363655984402 ], [ 534326.300798246404156, 2242624.556378418579698 ], [ 534341.939875566284172, 2242514.921590099111199 ], [ 534288.027563602430746, 2242443.018047195859253 ], [ 534072.8482613961678, 2242508.000319454818964 ], [ 534043.622991109499708, 2242365.263291035778821 ], [ 534022.87680472235661, 2242235.570294284261763 ], [ 533965.549767551012337, 2242178.981038684025407 ], [ 533897.207828294718638, 2242087.833406885154545 ], [ 533811.565216573886573, 2242042.578300289809704 ], [ 533745.756971084047109, 2241903.465507037006319 ], [ 533779.757554513635114, 2241802.315296464599669 ], [ 533877.082654112018645, 2241680.448531487956643 ], [ 533730.501303263008595, 2241462.654647850431502 ], [ 533640.780363322468475, 2241464.341149750165641 ], [ 533480.656521183089353, 2241360.362287112511694 ], [ 533322.16055913711898, 2241320.796066402457654 ], [ 533218.21607688779477, 2241253.293399096466601 ], [ 533102.425876900786534, 2241192.109180320985615 ], [ 533134.168382676318288, 2241127.107384576462209 ], [ 533231.086324288393371, 2241005.750301244668663 ], [ 533175.108954684692435, 2240950.490667589008808 ], [ 533136.784885082975961, 2240899.372815556824207 ], [ 533072.274295537499711, 2240835.685921307653189 ], [ 532956.106624284060672, 2240662.454712373204529 ], [ 532844.015640732017346, 2240506.533196139149368 ], [ 532819.034396356670186, 2240398.374702643603086 ], [ 532767.831812936346978, 2240290.124038137495518 ], [ 532738.524344360921532, 2240106.873895448632538 ], [ 532628.449955088668503, 2240127.996447615325451 ], [ 532538.147899782052264, 2240155.268119695596397 ], [ 532391.269133820780553, 2240090.053517680615187 ], [ 532304.891117232851684, 2240077.584186648949981 ], [ 532289.761750850244425, 2240062.647930807434022 ] ], [ [ 538933.171256920672022, 2245253.727892177179456 ], [ 538946.523169567808509, 2245270.251665734685957 ], [ 539628.621342496713623, 2245342.988807989284396 ], [ 539635.327841567224823, 2245733.651180529035628 ], [ 538981.576868759235367, 2245755.03130722604692 ], [ 538957.523572919773869, 2245562.566217992454767 ], [ 538239.522596394177526, 2245546.700927995145321 ], [ 538249.003499186248519, 2245453.620357742533088 ], [ 538395.218667873181403, 2245242.988155690021813 ], [ 538933.171256920672022, 2245253.727892177179456 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 47.0, "GRIDCODE": 22.0, "X_COORD": 570379.374, "Y_COORD": 281169.83684 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 533400.065019900910556, 2239043.324829176999629 ], [ 533293.803523618844338, 2239077.181050447747111 ], [ 533161.334710955037735, 2238965.936668891459703 ], [ 533052.15609458333347, 2239087.407638354226947 ], [ 532960.030601791921072, 2239120.051643081009388 ], [ 532811.889590868144296, 2239196.046941300854087 ], [ 532673.03997304989025, 2239101.338545762002468 ], [ 532641.322129575535655, 2239009.467230408452451 ], [ 532609.915969250490889, 2238980.615403237752616 ], [ 532581.462661443394609, 2238939.678347042761743 ], [ 532407.059707643347792, 2238877.252954560332 ], [ 532331.283946633688174, 2238825.565378782339394 ], [ 532297.06540510780178, 2238776.336276805959642 ], [ 532235.873230522382073, 2238745.626648552715778 ], [ 532053.398893291712739, 2238621.157666641287506 ], [ 531915.284444632125087, 2238665.15770713519305 ], [ 531868.120541606098413, 2238675.663071029819548 ], [ 531849.304966692929156, 2238750.933239983394742 ], [ 531802.962955624680035, 2238825.593877051025629 ], [ 531895.802066162927076, 2238963.79988924600184 ], [ 531919.273837280692533, 2239158.305992076173425 ], [ 531995.632025034399703, 2239236.473361456766725 ], [ 531932.82279661949724, 2239751.702422014437616 ], [ 532105.062341234995984, 2240008.099811743013561 ], [ 532188.500069339410402, 2240008.275729153305292 ], [ 532253.692433413933031, 2240016.297847065143287 ], [ 532289.761750850244425, 2240062.647930807434022 ], [ 532304.891117232851684, 2240077.584186648949981 ], [ 532391.269133820780553, 2240090.053517680615187 ], [ 532538.147899782052264, 2240155.268119695596397 ], [ 532628.449955088668503, 2240127.996447615325451 ], [ 532738.524344360921532, 2240106.873895448632538 ], [ 532767.831812936346978, 2240290.124038137495518 ], [ 532819.034396356670186, 2240398.374702643603086 ], [ 532844.015640732017346, 2240506.533196139149368 ], [ 532956.106624284060672, 2240662.454712373204529 ], [ 533072.274295537499711, 2240835.685921307653189 ], [ 533136.784885082975961, 2240899.372815556824207 ], [ 533175.108954684692435, 2240950.490667589008808 ], [ 533231.086324288393371, 2241005.750301244668663 ], [ 533134.168382676318288, 2241127.107384576462209 ], [ 533102.425876900786534, 2241192.109180320985615 ], [ 533218.21607688779477, 2241253.293399096466601 ], [ 533322.16055913711898, 2241320.796066402457654 ], [ 533480.656521183089353, 2241360.362287112511694 ], [ 533640.780363322468475, 2241464.341149750165641 ], [ 533730.501303263008595, 2241462.654647850431502 ], [ 533877.082654112018645, 2241680.448531487956643 ], [ 533779.757554513635114, 2241802.315296464599669 ], [ 533745.756971084047109, 2241903.465507037006319 ], [ 533811.565216573886573, 2242042.578300289809704 ], [ 533897.207828294718638, 2242087.833406885154545 ], [ 533965.549767551012337, 2242178.981038684025407 ], [ 534022.87680472235661, 2242235.570294284261763 ], [ 534043.622991109499708, 2242365.263291035778821 ], [ 534072.8482613961678, 2242508.000319454818964 ], [ 534288.027563602430746, 2242443.018047195859253 ], [ 534341.939875566284172, 2242514.921590099111199 ], [ 534326.300798246404156, 2242624.556378418579698 ], [ 534433.942624783841893, 2242783.015363655984402 ], [ 534517.077796042780392, 2242781.448557909578085 ], [ 534613.041168335010298, 2242824.048984833061695 ], [ 534747.438312939484604, 2242863.865499650128186 ], [ 534791.141189143876545, 2242863.041432730853558 ], [ 534835.596666328725405, 2242869.45408224966377 ], [ 534891.498857047059573, 2242868.400828814134002 ], [ 535065.645972732687369, 2242759.288780139759183 ], [ 535211.422712815226987, 2242735.229762775823474 ], [ 535253.779692266718484, 2242619.829661632888019 ], [ 535365.532819761428982, 2242577.561993668787181 ], [ 535572.881185814156197, 2242362.870592721737921 ], [ 535713.568625341518782, 2242383.168030899949372 ], [ 535851.264038879307918, 2242287.442911500111222 ], [ 536006.726274082437158, 2242309.870490320958197 ], [ 536052.185936528258026, 2242506.637243753299117 ], [ 536203.332610269077122, 2242563.139229306019843 ], [ 536296.21836809895467, 2242687.010607456788421 ], [ 536356.743697853642516, 2242746.752298820763826 ], [ 536430.701828380813822, 2242845.383430594578385 ], [ 536456.989796854322776, 2242985.731251582503319 ], [ 536350.701504847849719, 2243152.823342562653124 ], [ 536568.725928249536082, 2243346.38884393684566 ], [ 536637.975909971632063, 2243438.738940443843603 ], [ 536777.828443799167871, 2243370.939423562958837 ], [ 536863.057022854685783, 2243282.690319001674652 ], [ 537068.597761792130768, 2243312.336555833928287 ], [ 537196.567617168067954, 2243179.829714408144355 ], [ 537270.789549871580675, 2243140.758139055222273 ], [ 537515.935061099822633, 2243373.178639222867787 ], [ 537501.917062402237207, 2243471.493866355158389 ], [ 537502.798948526266031, 2243523.478950038552284 ], [ 537673.877269592136145, 2243647.367233781144023 ], [ 537785.036763044656254, 2243747.243898251093924 ], [ 538230.457973655546084, 2243833.186798305250704 ], [ 538324.158530064625666, 2243894.018995487131178 ], [ 538425.832164179999381, 2244083.565880218520761 ], [ 538632.616787888924591, 2244287.650958211161196 ], [ 538757.839098569820635, 2244285.282513155601919 ], [ 538861.037349242717028, 2244235.249716266989708 ], [ 539000.490651120548137, 2244215.943384618498385 ], [ 539162.529425540124066, 2244321.133554146625102 ], [ 539259.058269161032513, 2244319.307540529407561 ], [ 539374.38078343460802, 2244263.395802716724575 ], [ 539372.907000265549868, 2244176.755010492168367 ], [ 539448.527749056229368, 2244022.947269186377525 ], [ 539578.700093608233146, 2244041.715808179229498 ], [ 539672.704768840107135, 2244167.060903367586434 ], [ 539792.334433252923191, 2244202.486499131657183 ], [ 539941.33344932354521, 2244299.212061671540141 ], [ 540097.068361190613359, 2244506.857837774790823 ], [ 540274.317896347027272, 2244625.520212101750076 ], [ 540287.095771155436523, 2244642.558015995658934 ], [ 540427.383112875861116, 2244534.931910429149866 ], [ 540492.187267281347886, 2244168.814076992683113 ], [ 540572.423549426021054, 2244129.913388386368752 ], [ 540631.054684770409949, 2244138.365218529477715 ], [ 540643.113109274534509, 2244053.77293411269784 ], [ 540248.214771581231616, 2243910.641224114224315 ], [ 540118.631178267649375, 2243782.751443735323846 ], [ 540116.360399132710882, 2243649.301525202579796 ], [ 540147.115457993699238, 2243433.559040606021881 ], [ 539989.741668020607904, 2243004.3343694685027 ], [ 540121.216375145828351, 2242702.38025055732578 ], [ 540138.458115542773157, 2242581.435958034358919 ], [ 540066.962906095432118, 2242387.579465474933386 ], [ 539970.281462291488424, 2242308.725260723382235 ], [ 539769.997774114483036, 2242217.228459121659398 ], [ 539766.976207329076715, 2242039.463325 ], [ 539857.831840701284818, 2241896.611478473991156 ], [ 539806.966074940166436, 2241828.78565008752048 ], [ 539760.968782975221984, 2241783.386028441600502 ], [ 539585.71362184395548, 2241548.224619222804904 ], [ 539616.970359875122085, 2241328.985321516171098 ], [ 539560.28577966731973, 2241253.396179803647101 ], [ 539389.371729543083347, 2241305.02836687117815 ], [ 539257.346398202935234, 2241238.592058382928371 ], [ 539159.490490349708125, 2241158.772131984122097 ], [ 538982.123653648071922, 2241114.512449625879526 ], [ 538980.244107412174344, 2241144.631940779276192 ], [ 538950.456949293846264, 2241142.778278498910367 ], [ 538937.967794829513878, 2241178.866498660296202 ], [ 538913.495954733807594, 2241150.827651665546 ], [ 538950.456949293846264, 2241142.778278498910367 ], [ 538952.336509431479499, 2241112.658787111751735 ], [ 538982.123653648071922, 2241114.512449625879526 ], [ 538964.92580090649426, 2241060.546846144832671 ], [ 539057.093974878080189, 2241080.238015653565526 ], [ 539036.782778547843918, 2240876.870663425885141 ], [ 538999.039676111773588, 2240843.436404071748257 ], [ 538903.616758886142634, 2240938.756678527221084 ], [ 538412.45041170658078, 2240944.064612799324095 ], [ 538353.957164961029775, 2240936.869480446912348 ], [ 538228.384807242429815, 2240973.777140726335347 ], [ 538079.088630836573429, 2240908.849803283810616 ], [ 537985.979556755279191, 2241038.243744993582368 ], [ 537927.710743064293638, 2241084.644137450493872 ], [ 537825.23886674141977, 2241019.73356813006103 ], [ 537630.556769303511828, 2240769.625972972251475 ], [ 537553.372882122988813, 2240769.471420991234481 ], [ 537523.697853134712204, 2240765.822713228873909 ], [ 537450.326104034553282, 2240765.676507230848074 ], [ 537331.120556208770722, 2240821.828526236116886 ], [ 537198.755769277107902, 2240715.40644271671772 ], [ 536960.558253311086446, 2240672.035862483084202 ], [ 536876.740196004509926, 2240604.645138777792454 ], [ 536785.98369832651224, 2240537.94788780529052 ], [ 536832.254396922769956, 2240158.147010051645339 ], [ 536876.937243307707831, 2240122.564811958931386 ], [ 536940.893946597236209, 2240002.199831755831838 ], [ 537057.118564199190587, 2239909.649528032168746 ], [ 536894.067336715525016, 2239821.260649813339114 ], [ 536831.252878210972995, 2239740.556489216163754 ], [ 536858.722599158412777, 2239515.074331432580948 ], [ 536771.713001181022264, 2239426.016008990816772 ], [ 536745.340578778763302, 2239356.741909606382251 ], [ 536663.603549005929381, 2239202.162395583465695 ], [ 536639.360683100763708, 2239138.479746436700225 ], [ 536541.172376409173012, 2239037.979458562098444 ], [ 536505.476367434370331, 2238888.241053639911115 ], [ 536474.541782090789638, 2238820.926261636428535 ], [ 536362.287468616850674, 2238760.070184409618378 ], [ 536297.68773257615976, 2238719.146427877247334 ], [ 536127.581159167108126, 2238718.804927282035351 ], [ 535909.490954786073416, 2238868.788378290832043 ], [ 535682.798480652971193, 2238907.434920596890152 ], [ 535374.799224968650378, 2238869.540148863568902 ], [ 535281.237811104860157, 2238810.263499608263373 ], [ 535223.722221009084024, 2238810.145972639322281 ], [ 535193.517478210269473, 2238806.429559747688472 ], [ 535060.312057165661827, 2238833.745593695901334 ], [ 534880.033493048627861, 2238944.943309883587062 ], [ 534657.56430705206003, 2238917.570985757745802 ], [ 534548.620675589190796, 2238984.766823773272336 ], [ 534376.871366682462394, 2238963.63246791716665 ], [ 534227.378786949091591, 2238963.329503558576107 ], [ 534095.210810190066695, 2238947.063985729590058 ], [ 533990.87261395168025, 2238880.956608915701509 ], [ 533902.764663583715446, 2238968.957464302890003 ], [ 533732.350130300968885, 2238990.248802189715207 ], [ 533522.515649677719921, 2238964.42341489251703 ], [ 533400.065019900910556, 2239043.324829176999629 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 48.0, "GRIDCODE": 24.0, "X_COORD": 581062.1984, "Y_COORD": 281306.75579000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 547915.611141700879671, 2239311.259832253679633 ], [ 547896.560524185537361, 2239386.245396641083062 ], [ 547819.997237086412497, 2239545.558989469893277 ], [ 547659.874366335570812, 2239752.031295410357416 ], [ 547419.502249557175674, 2239950.73068364802748 ], [ 547030.517036910867319, 2240107.555657715536654 ], [ 546786.728198677301407, 2240150.497684848494828 ], [ 546727.15524115099106, 2240076.773482972756028 ], [ 546569.438459027092904, 2240148.965110487304628 ], [ 546189.428514606668614, 2240141.431623606942594 ], [ 546152.638288856600411, 2240507.185712481848896 ], [ 545885.7596047334373, 2240697.13300353474915 ], [ 545742.880950464983471, 2240856.164988130331039 ], [ 545708.130946252844296, 2240880.899104597978294 ], [ 545612.834954334190115, 2240986.967683956958354 ], [ 545570.255579181830399, 2241227.18326410651207 ], [ 545712.900609010481276, 2241298.721700345166028 ], [ 545744.982246729312465, 2241391.584643997251987 ], [ 545826.584137070924044, 2241432.505935668945312 ], [ 545880.239929933100939, 2241478.12117543630302 ], [ 545817.660732972668484, 2241522.65972288325429 ], [ 545785.331368713290431, 2241614.703790972009301 ], [ 545748.704698810703121, 2241669.557038222439587 ], [ 545712.622474247124046, 2241821.839486002922058 ], [ 545654.168044311809354, 2241863.44118685927242 ], [ 545585.03267714229878, 2242155.234180432744324 ], [ 545595.122301391791552, 2242322.684570852667093 ], [ 545554.735107470187359, 2242383.168379385024309 ], [ 545500.85411126143299, 2242492.732962073758245 ], [ 545344.462399284355342, 2242527.605567186139524 ], [ 545395.511334138573147, 2242692.007313468493521 ], [ 545260.376981085981242, 2242788.183456380851567 ], [ 545231.799684206489474, 2242819.987829864956439 ], [ 545083.308472630102187, 2242898.939101888798177 ], [ 544969.665621299413033, 2242939.230154416523874 ], [ 544918.90990695822984, 2243042.436248590238392 ], [ 544850.617565979366191, 2243125.556166786700487 ], [ 544810.780201216461137, 2243338.071920610032976 ], [ 544656.876927802804857, 2243355.403124804608524 ], [ 544622.669063055538572, 2243477.562530205585063 ], [ 544587.91747387452051, 2243502.294999552890658 ], [ 544557.462895291508175, 2243564.217172047123313 ], [ 544505.335403646691702, 2243601.31575567368418 ], [ 544404.975036916206591, 2243713.005873712711036 ], [ 544463.368927997886203, 2243901.058462720364332 ], [ 544499.847249290090986, 2244069.416941300034523 ], [ 544406.30605984700378, 2244183.260890495963395 ], [ 544215.205352136632428, 2244204.77948902733624 ], [ 544142.92390389542561, 2244241.872834760695696 ], [ 543993.727914963965304, 2244555.238636894151568 ], [ 543917.079630455002189, 2244670.012440766207874 ], [ 543900.913464499171823, 2244716.031778735108674 ], [ 543913.980289258528501, 2244732.809750055894256 ], [ 544003.247416912345216, 2244766.89254954829812 ], [ 544099.137662219000049, 2244827.609296473674476 ], [ 544615.399403900024481, 2244828.566967817023396 ], [ 544710.812370661646128, 2244888.983430112712085 ], [ 544835.530256780097261, 2244956.556608917191625 ], [ 545038.198591945343651, 2244861.065144144929945 ], [ 545078.834060265915468, 2244866.054315267130733 ], [ 545264.122539565083571, 2244811.575258780270815 ], [ 545317.902991543291137, 2244757.849170504137874 ], [ 545373.182004973525181, 2244732.74540845118463 ], [ 545423.818852112395689, 2244977.765249505639076 ], [ 545453.676002314081416, 2245082.062493288889527 ], [ 545629.050310911377892, 2245238.960804630070925 ], [ 545826.751128880190663, 2245239.323269416578114 ], [ 545838.82226638298016, 2245289.911961901001632 ], [ 545944.101214113412425, 2245249.152553383260965 ], [ 546139.096827707602642, 2245190.671188368462026 ], [ 546255.119196280953474, 2245056.823215994983912 ], [ 546290.908762051374651, 2245032.302323976531625 ], [ 546283.519929585978389, 2244943.39572105742991 ], [ 546491.139905449352227, 2244925.430927417241037 ], [ 546544.024886980536394, 2245177.796023041009903 ], [ 546624.756116133648902, 2245084.660888752900064 ], [ 546737.204867769381963, 2245060.406910582445562 ], [ 546827.396575424354523, 2245001.167244737967849 ], [ 546902.443450757418759, 2245017.185650170780718 ], [ 546982.566217558574863, 2245010.252809913828969 ], [ 547263.951573129394092, 2245088.795388022437692 ], [ 547357.033680287073366, 2245227.836092644371092 ], [ 547496.174085231730714, 2245295.799262698739767 ], [ 547604.512637812877074, 2245391.733893264085054 ], [ 547682.506974532967433, 2245508.231739371083677 ], [ 547791.964839221443981, 2245487.454916052520275 ], [ 547772.586374375387095, 2245254.418670080602169 ], [ 547861.190966637455858, 2245246.748658124357462 ], [ 548004.444498219294474, 2245346.805168690159917 ], [ 548126.02215290418826, 2245328.005005272105336 ], [ 548354.203470114152879, 2245234.398753425106406 ], [ 548433.863361165276729, 2245218.359653853811324 ], [ 548535.190201869467273, 2245092.737386291846633 ], [ 548678.220988907851279, 2245073.277675963006914 ], [ 548810.60257706779521, 2245108.377048844471574 ], [ 549003.164436040446162, 2245082.175672157667577 ], [ 549233.630568313179538, 2245256.171229931525886 ], [ 549272.246248910785653, 2245171.200727488845587 ], [ 549371.216991114313714, 2245108.452996289357543 ], [ 549411.800855651847087, 2245058.134387196972966 ], [ 549382.821715870057233, 2244940.39755430445075 ], [ 549350.115640383213758, 2244857.210467036813498 ], [ 549264.084973187767901, 2244809.405237023718655 ], [ 549266.914766051922925, 2244686.337006555870175 ], [ 549285.367228577611968, 2244504.861323516815901 ], [ 549259.078141181496903, 2244398.048683031462133 ], [ 549229.917332805343904, 2244367.116288299672306 ], [ 549247.044391412171535, 2244198.670686164870858 ], [ 549096.432019962347113, 2243883.575140692293644 ], [ 548975.22647094714921, 2243808.714438808150589 ], [ 548877.169760261313058, 2243798.678384876810014 ], [ 548761.920010353438556, 2243796.152812223881483 ], [ 548622.953089569229633, 2243648.746943689882755 ], [ 548503.968244168674573, 2243469.794900272972882 ], [ 548444.674258166691288, 2243318.967765309847891 ], [ 548403.808631875435822, 2243227.454371911473572 ], [ 548335.542036910890602, 2243010.971229800023139 ], [ 547922.823196280514821, 2242951.718162145465612 ], [ 547906.965644796378911, 2242560.631794548593462 ], [ 547969.938605403760448, 2242508.579327885992825 ], [ 547986.717950810678303, 2242343.613660544157028 ], [ 547914.901158216525801, 2241972.971288196742535 ], [ 547959.497407988528721, 2241872.866848639212549 ], [ 548065.209027642034926, 2241728.019884875975549 ], [ 548200.261186910560355, 2241693.845041094347835 ], [ 548143.197115146904252, 2241668.12522098608315 ], [ 547908.018240033532493, 2241620.621913559734821 ], [ 547909.345195997739211, 2241563.022930576466024 ], [ 547970.733658381504938, 2241416.111147017218173 ], [ 547904.569433424039744, 2241178.425323162227869 ], [ 547995.221869406756014, 2241144.931417167186737 ], [ 548176.622874376946129, 2241112.975960412062705 ], [ 548129.421162009006366, 2240877.92405838239938 ], [ 547987.979227127041668, 2240799.30963784083724 ], [ 548019.602303172228858, 2240753.374892381951213 ], [ 548052.327369643026032, 2240726.321246386505663 ], [ 548113.525331759243272, 2240667.343670218251646 ], [ 548266.089783383067697, 2240605.831155688501894 ], [ 548274.07211767625995, 2240527.340118339285254 ], [ 548215.801026386441663, 2240429.102425698190928 ], [ 548286.580266092438251, 2240061.880500599741936 ], [ 548129.311917560291477, 2239944.660841722972691 ], [ 548165.689915619324893, 2239884.551865853369236 ], [ 548167.053289950243197, 2239825.314804459922016 ], [ 548203.576198896160349, 2239737.904979768209159 ], [ 548241.676646643783897, 2239587.934369311667979 ], [ 548339.211274434812367, 2239462.162921770475805 ], [ 548311.802278551040217, 2239407.307547189295292 ], [ 548165.580696726799943, 2239404.101425527594984 ], [ 548086.890619275625795, 2239355.490024161525071 ], [ 547915.611141700879671, 2239311.259832253679633 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 49.0, "GRIDCODE": 23.0, "X_COORD": 584535.39237000002, "Y_COORD": 280332.29961 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 549329.324343522894196, 2237735.943318753503263 ], [ 549414.33467084786389, 2237954.873623718507588 ], [ 549442.70958827342838, 2238206.576217770576477 ], [ 549392.523382598068565, 2238512.449642641469836 ], [ 549306.630386396311224, 2238858.878089373931289 ], [ 549006.001560196629725, 2238894.00730240624398 ], [ 548967.95779551868327, 2239000.004632944241166 ], [ 548919.715757087804377, 2239074.050540775060654 ], [ 548764.243203862686642, 2239109.876722915098071 ], [ 548617.393237107316963, 2239085.472033026628196 ], [ 548422.542886075447313, 2239093.411290843039751 ], [ 548316.837185562821105, 2239075.844447183422744 ], [ 548210.658052260056138, 2239005.211418377235532 ], [ 548128.817942791734822, 2239008.543934617191553 ], [ 547845.873444309807383, 2238961.51650619879365 ], [ 547794.278307280619629, 2239121.15173274744302 ], [ 547906.190436184522696, 2239227.674901397898793 ], [ 547915.611141700879671, 2239311.259832253679633 ], [ 548086.890619275625795, 2239355.490024161525071 ], [ 548165.580696726799943, 2239404.101425527594984 ], [ 548311.802278551040217, 2239407.307547189295292 ], [ 548339.211274434812367, 2239462.162921770475805 ], [ 548241.676646643783897, 2239587.934369311667979 ], [ 548203.576198896160349, 2239737.904979768209159 ], [ 548167.053289950243197, 2239825.314804459922016 ], [ 548165.689915619324893, 2239884.551865853369236 ], [ 548129.311917560291477, 2239944.660841722972691 ], [ 548286.580266092438251, 2240061.880500599741936 ], [ 548215.801026386441663, 2240429.102425698190928 ], [ 548274.07211767625995, 2240527.340118339285254 ], [ 548266.089783383067697, 2240605.831155688501894 ], [ 548113.525331759243272, 2240667.343670218251646 ], [ 548052.327369643026032, 2240726.321246386505663 ], [ 548019.602303172228858, 2240753.374892381951213 ], [ 547987.979227127041668, 2240799.30963784083724 ], [ 548129.421162009006366, 2240877.92405838239938 ], [ 548176.622874376946129, 2241112.975960412062705 ], [ 547995.221869406756014, 2241144.931417167186737 ], [ 547904.569433424039744, 2241178.425323162227869 ], [ 547970.733658381504938, 2241416.111147017218173 ], [ 547909.345195997739211, 2241563.022930576466024 ], [ 547908.018240033532493, 2241620.621913559734821 ], [ 548143.197115146904252, 2241668.12522098608315 ], [ 548200.261186910560355, 2241693.845041094347835 ], [ 548065.209027642034926, 2241728.019884875975549 ], [ 547959.497407988528721, 2241872.866848639212549 ], [ 547914.901158216525801, 2241972.971288196742535 ], [ 547986.717950810678303, 2242343.613660544157028 ], [ 547969.938605403760448, 2242508.579327885992825 ], [ 547906.965644796378911, 2242560.631794548593462 ], [ 547922.823196280514821, 2242951.718162145465612 ], [ 548335.542036910890602, 2243010.971229800023139 ], [ 548403.808631875435822, 2243227.454371911473572 ], [ 548444.674258166691288, 2243318.967765309847891 ], [ 548503.968244168674573, 2243469.794900272972882 ], [ 548622.953089569229633, 2243648.746943689882755 ], [ 548761.920010353438556, 2243796.152812223881483 ], [ 548877.169760261313058, 2243798.678384876810014 ], [ 548975.22647094714921, 2243808.714438808150589 ], [ 549096.432019962347113, 2243883.575140692293644 ], [ 549247.044391412171535, 2244198.670686164870858 ], [ 549229.917332805343904, 2244367.116288299672306 ], [ 549259.078141181496903, 2244398.048683031462133 ], [ 549285.367228577611968, 2244504.861323516815901 ], [ 549266.914766051922925, 2244686.337006555870175 ], [ 549264.084973187767901, 2244809.405237023718655 ], [ 549350.115640383213758, 2244857.210467036813498 ], [ 549382.821715870057233, 2244940.39755430445075 ], [ 549411.800855651847087, 2245058.134387196972966 ], [ 549474.055022338638082, 2245121.814334815368056 ], [ 549537.240163783775643, 2245237.642103414982557 ], [ 549737.060926186852157, 2245143.470563072711229 ], [ 549778.487150185625069, 2245185.847440777346492 ], [ 549902.198322250507772, 2245344.689617867581546 ], [ 550038.983247818076052, 2245324.636025031097233 ], [ 550111.318223863956518, 2245252.359464005567133 ], [ 550254.999198370263912, 2245217.095579620450735 ], [ 550346.545137472567149, 2245160.60650728829205 ], [ 550510.280863140127622, 2245069.12899633962661 ], [ 550593.292644559056498, 2245003.005341098643839 ], [ 550605.162715258658864, 2244905.384541259147227 ], [ 550605.447082672617398, 2244818.143151661381125 ], [ 550770.157082034042105, 2244704.824294097721577 ], [ 550940.236033194931224, 2244773.99215377215296 ], [ 551031.112212306703441, 2244847.014550678431988 ], [ 551252.821999001316726, 2244847.398923407308757 ], [ 551423.189325488987379, 2244955.250160696916282 ], [ 551528.983447619015351, 2244881.580012992024422 ], [ 551400.337127752020024, 2244601.874480159953237 ], [ 551401.010207477491349, 2244393.819340441375971 ], [ 551507.727323111728765, 2244258.175983971916139 ], [ 551517.734659157227725, 2244175.869464721530676 ], [ 551518.378322212374769, 2243978.204268119297922 ], [ 551711.445062701939605, 2243916.615588027983904 ], [ 551746.225353267975152, 2243881.860369644127786 ], [ 551954.107686665374786, 2243839.170432019978762 ], [ 552011.728524629725143, 2243846.240650580264628 ], [ 552096.726515601971187, 2243806.17540914285928 ], [ 552139.493813640554436, 2243861.090653223916888 ], [ 552139.918685610988177, 2243729.892593446187675 ], [ 552234.697701134602539, 2243676.936228065751493 ], [ 552321.008824507705867, 2243590.68836132530123 ], [ 552485.547829650109634, 2243526.383889530785382 ], [ 552635.533992075012065, 2243406.889642576687038 ], [ 552704.295273312716745, 2243311.289698761887848 ], [ 552899.634740948211402, 2243309.125820131972432 ], [ 552882.693237618077546, 2243173.779945965856314 ], [ 552720.028774494770914, 2242880.435993548482656 ], [ 552651.197403891012073, 2242795.27192503400147 ], [ 552559.466152260778472, 2242759.510807951912284 ], [ 552394.654501588782296, 2242657.731471015140414 ], [ 552151.809949034242891, 2242583.069961810484529 ], [ 552043.233585291076452, 2242424.012669517658651 ], [ 552014.113959489157423, 2242393.124022436328232 ], [ 551987.406011053011753, 2242360.081752832047641 ], [ 551889.22686384874396, 2242305.524371804669499 ], [ 551847.837601222330704, 2242200.253908605314791 ], [ 551678.162176833720878, 2242156.455510559491813 ], [ 551648.695848478353582, 2242036.732189806178212 ], [ 551621.450243222876452, 2241975.723825832828879 ], [ 551597.968427763669752, 2241838.311740541830659 ], [ 551545.568646818166599, 2241650.117666381411254 ], [ 551570.814223113353364, 2241401.78446648735553 ], [ 551540.98237723344937, 2241364.871603773906827 ], [ 551426.250995577895083, 2241268.202823680825531 ], [ 551243.344596364651807, 2241107.274148695170879 ], [ 550871.745278274291195, 2241016.43092167750001 ], [ 550543.546529850922525, 2240720.455201017670333 ], [ 550518.059077892219648, 2240486.22366985771805 ], [ 550475.69741026929114, 2239992.396272355690598 ], [ 550439.481816574581899, 2239845.235025661066175 ], [ 550414.113244950887747, 2239754.103598300367594 ], [ 550398.654341707704589, 2239540.33689181972295 ], [ 550377.697186252451502, 2239347.710129817947745 ], [ 550457.187264485401101, 2238840.73572938516736 ], [ 550403.858925455017015, 2238624.008163542486727 ], [ 550188.045492107281461, 2238074.959287519566715 ], [ 550042.293799713021144, 2237810.413279660046101 ], [ 549790.946068268967792, 2237778.853114050813019 ], [ 549329.324343522894196, 2237735.943318753503263 ] ], [ [ 548943.335212168283761, 2239133.144242714159191 ], [ 548959.526358435861766, 2239065.432923719286919 ], [ 548983.090236100484617, 2239118.794681910425425 ], [ 548943.335212168283761, 2239133.144242714159191 ], [ 548941.460014515556395, 2239163.264813735149801 ], [ 548911.674161117756739, 2239161.416596912778914 ], [ 548909.79895225528162, 2239191.537154573947191 ], [ 548880.013084559817798, 2239189.688921574503183 ], [ 548876.262647041934542, 2239249.929996367543936 ], [ 548846.476751207257621, 2239248.081747630611062 ], [ 548833.995125102926977, 2239284.173201579600573 ], [ 548809.518777137156576, 2239256.138077184557915 ], [ 548846.476751207257621, 2239248.081747630611062 ], [ 548825.347421277198009, 2239197.35885232873261 ], [ 548880.013084559817798, 2239189.688921574503183 ], [ 548881.888307260815054, 2239159.568363470956683 ], [ 548911.674161117756739, 2239161.416596912778914 ], [ 548913.549372609937564, 2239131.296025448478758 ], [ 548943.335212168283761, 2239133.144242714159191 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 50.0, "GRIDCODE": 21.0, "X_COORD": 576736.07169000001, "Y_COORD": 280188.16997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 539602.705875433050096, 2236919.889983813278377 ], [ 539527.933154229773208, 2236896.297325664199889 ], [ 539378.361973880790174, 2237007.293261900544167 ], [ 539337.987809643731453, 2237132.972498207353055 ], [ 539299.333203817717731, 2237185.50670859683305 ], [ 539263.856778417597525, 2237362.572739424183965 ], [ 539317.65423931053374, 2237458.790938127785921 ], [ 539347.996022981475107, 2237559.698743844404817 ], [ 539395.732198770157993, 2237645.07856406737119 ], [ 539436.347334235557355, 2237864.808939416892827 ], [ 539549.91010642866604, 2237901.947605165652931 ], [ 539577.757078738650307, 2237994.560307589359581 ], [ 539620.635703253559768, 2238070.054816990159452 ], [ 539650.32381084037479, 2238100.438402187079191 ], [ 539689.510303448303603, 2238150.784091603942215 ], [ 539776.890308711794205, 2238214.998833731748164 ], [ 539833.252143136458471, 2238318.376749974675477 ], [ 539886.63629394012969, 2238373.016089888289571 ], [ 539929.497443243861198, 2238485.597155133262277 ], [ 540146.776006615255028, 2238603.367363160476089 ], [ 540195.585604325984605, 2238666.074487250298262 ], [ 540255.060047456761822, 2238698.314197367057204 ], [ 540394.691691256361082, 2238829.648721965029836 ], [ 540493.136394228669815, 2238867.246778968721628 ], [ 540557.638661022647284, 2238867.372530004940927 ], [ 540604.741533205611631, 2238873.163194393739104 ], [ 540590.251910210470669, 2238992.152193842455745 ], [ 540589.926382994512096, 2239087.096179310232401 ], [ 540757.117158924113028, 2239177.717918145470321 ], [ 540930.564707762328908, 2239346.779449508525431 ], [ 541077.520175095298328, 2239414.696069396100938 ], [ 541169.542817511362955, 2239561.388163195922971 ], [ 541272.774999875342473, 2239667.034839658997953 ], [ 541330.768359566805884, 2239819.342419411055744 ], [ 541438.441889102105051, 2239860.461055546067655 ], [ 541492.758147863671184, 2239921.470574032515287 ], [ 541323.365908829029649, 2240105.553148119710386 ], [ 541322.462200256763026, 2240370.441503467969596 ], [ 541549.986890195519663, 2240370.878308592364192 ], [ 541618.819339743931778, 2240459.298589576035738 ], [ 541684.251104121096432, 2240631.137640542350709 ], [ 541784.660856037517078, 2240704.91137576662004 ], [ 541976.645699200103991, 2240966.926685800775886 ], [ 542242.086649890057743, 2241238.55237078666687 ], [ 542268.015691174659878, 2241395.331680098548532 ], [ 542350.53648167301435, 2241660.85337227396667 ], [ 542219.553924587089568, 2241692.982233488932252 ], [ 542189.459436465520412, 2241723.04516732133925 ], [ 542156.223305406747386, 2241749.517111987806857 ], [ 542121.492324502673, 2241814.890646085143089 ], [ 542003.669224609388039, 2241800.408777915872633 ], [ 541911.983065477921627, 2241856.974161322228611 ], [ 541683.404429979156703, 2241885.565661401487887 ], [ 541638.261947065591812, 2241930.663160622119904 ], [ 541597.101513056317344, 2241963.444335442967713 ], [ 541468.949954327428713, 2241994.876292292959988 ], [ 541527.467449982534163, 2242122.156643580645323 ], [ 541617.770212559495121, 2242167.659174585714936 ], [ 541739.55816772847902, 2242097.907241228036582 ], [ 541876.46651402185671, 2242166.374499259516597 ], [ 541853.656757172429934, 2242245.565504586324096 ], [ 541872.394178963382728, 2242364.772533516399562 ], [ 541948.808651403291151, 2242478.467205012217164 ], [ 542148.177814018446952, 2242633.174625239335001 ], [ 542194.731718848808669, 2242625.62357662152499 ], [ 542207.160619532689452, 2242820.528323923237622 ], [ 542105.366814569570124, 2243014.336690163239837 ], [ 542071.401174142956734, 2243167.307014398276806 ], [ 542159.053151773987338, 2243297.712959443219006 ], [ 542296.803004875197075, 2243389.06134238652885 ], [ 542370.767009441042319, 2243513.319215075112879 ], [ 542405.396990267094225, 2243697.037662503309548 ], [ 542365.247952595236711, 2243836.43123028613627 ], [ 542317.125741738127545, 2243934.556674619205296 ], [ 542288.826449732063338, 2244192.562497409060597 ], [ 542714.235136327217333, 2244298.470610375516117 ], [ 543131.070628452347592, 2244893.829667652025819 ], [ 543671.473510941956192, 2244785.36047344468534 ], [ 543900.913464499171823, 2244716.031778735108674 ], [ 543917.079630455002189, 2244670.012440766207874 ], [ 543993.727914963965304, 2244555.238636894151568 ], [ 544142.92390389542561, 2244241.872834760695696 ], [ 544215.205352136632428, 2244204.77948902733624 ], [ 544406.30605984700378, 2244183.260890495963395 ], [ 544499.847249290090986, 2244069.416941300034523 ], [ 544463.368927997886203, 2243901.058462720364332 ], [ 544404.975036916206591, 2243713.005873712711036 ], [ 544505.335403646691702, 2243601.31575567368418 ], [ 544557.462895291508175, 2243564.217172047123313 ], [ 544587.91747387452051, 2243502.294999552890658 ], [ 544622.669063055538572, 2243477.562530205585063 ], [ 544656.876927802804857, 2243355.403124804608524 ], [ 544810.780201216461137, 2243338.071920610032976 ], [ 544850.617565979366191, 2243125.556166786700487 ], [ 544918.90990695822984, 2243042.436248590238392 ], [ 544969.665621299413033, 2242939.230154416523874 ], [ 545083.308472630102187, 2242898.939101888798177 ], [ 545231.799684206489474, 2242819.987829864956439 ], [ 545260.376981085981242, 2242788.183456380851567 ], [ 545395.511334138573147, 2242692.007313468493521 ], [ 545344.462399284355342, 2242527.605567186139524 ], [ 545500.85411126143299, 2242492.732962073758245 ], [ 545554.735107470187359, 2242383.168379385024309 ], [ 545595.122301391791552, 2242322.684570852667093 ], [ 545585.03267714229878, 2242155.234180432744324 ], [ 545654.168044311809354, 2241863.44118685927242 ], [ 545712.622474247124046, 2241821.839486002922058 ], [ 545748.704698810703121, 2241669.557038222439587 ], [ 545785.331368713290431, 2241614.703790972009301 ], [ 545817.660732972668484, 2241522.65972288325429 ], [ 545880.239929933100939, 2241478.12117543630302 ], [ 545826.584137070924044, 2241432.505935668945312 ], [ 545744.982246729312465, 2241391.584643997251987 ], [ 545712.900609010481276, 2241298.721700345166028 ], [ 545570.255579181830399, 2241227.18326410651207 ], [ 545612.834954334190115, 2240986.967683956958354 ], [ 545708.130946252844296, 2240880.899104597978294 ], [ 545742.880950464983471, 2240856.164988130331039 ], [ 545885.7596047334373, 2240697.13300353474915 ], [ 546152.638288856600411, 2240507.185712481848896 ], [ 546189.428514606668614, 2240141.431623606942594 ], [ 546071.106177557026967, 2240118.23843370936811 ], [ 545917.736998066888191, 2239913.74790561478585 ], [ 545803.960149401682429, 2239831.370447473600507 ], [ 545667.257781367516145, 2239649.099732732400298 ], [ 545496.985863431706093, 2239559.163238811306655 ], [ 545196.857830896507949, 2239470.302412060089409 ], [ 544995.772339889779687, 2239289.643356880173087 ], [ 544738.369084066594951, 2238874.740826122462749 ], [ 544604.24839283071924, 2238511.096910163760185 ], [ 544656.866652072058059, 2238141.793577740900218 ], [ 544814.455036896513775, 2238055.18744561355561 ], [ 545004.587379194097593, 2238041.951957298442721 ], [ 544994.493408022914082, 2237952.368862517178059 ], [ 544757.303229443496093, 2237912.931619331240654 ], [ 544690.427199535653926, 2237984.743570369668305 ], [ 544558.649168633855879, 2238033.029990916140378 ], [ 544414.030510830925778, 2238139.930425185710192 ], [ 544360.078476042021066, 2238197.865272257477045 ], [ 544259.470283668604679, 2238221.039209677837789 ], [ 544170.818262332468294, 2238248.56583106610924 ], [ 543939.856813813210465, 2238263.974676610901952 ], [ 543895.237128355074674, 2238352.390616017393768 ], [ 543831.706497480394319, 2238399.350161083973944 ], [ 543771.175834901281632, 2238567.959010153077543 ], [ 543638.349434040603228, 2238609.197934367693961 ], [ 543540.065924215014093, 2238543.803186136297882 ], [ 543427.883827537531033, 2238502.78407337795943 ], [ 543361.654761520097964, 2238411.081455425359309 ], [ 543292.885435235919431, 2238399.646291165612638 ], [ 543206.077210444374941, 2238403.175620310008526 ], [ 543015.698612622334622, 2238356.508699717931449 ], [ 542971.002446587663144, 2238264.708004685118794 ], [ 542923.751194247510284, 2238107.784517635591328 ], [ 542863.993989266920835, 2238050.895346457138658 ], [ 542888.057879964821041, 2237904.325163488276303 ], [ 542525.712692190194502, 2237844.064112518914044 ], [ 542250.733515194500796, 2237903.66194127779454 ], [ 542224.635817355941981, 2237787.041649089194834 ], [ 542100.794667532201856, 2237848.838245548307896 ], [ 542074.795843557803892, 2237812.838606292381883 ], [ 541894.933847546461038, 2237820.147038954310119 ], [ 541799.537669991608709, 2237688.043886984698474 ], [ 541672.777361928368919, 2237734.487450945191085 ], [ 541565.129531585960649, 2237888.531436737626791 ], [ 541445.167369487462565, 2237834.196989513933659 ], [ 541414.396272360580042, 2237835.446574686095119 ], [ 541182.370824561570771, 2237796.853492784313858 ], [ 541121.819740196224302, 2237965.500903259962797 ], [ 541048.084514130372554, 2237933.474708458408713 ], [ 541014.335258127073757, 2237782.644304518587887 ], [ 540789.07440599927213, 2237680.90476418659091 ], [ 540701.769185480196029, 2237559.999469444155693 ], [ 540641.979925983585417, 2237503.071918017230928 ], [ 540522.891472939401865, 2237162.88493035081774 ], [ 540543.029088715207763, 2237040.253784279339015 ], [ 540483.773869557189755, 2236958.192138161510229 ], [ 540468.355985227390192, 2236943.512747793458402 ], [ 540436.280787662602961, 2236979.211845017969608 ], [ 540242.984414956183173, 2236942.58407617174089 ], [ 540122.790635303594172, 2237020.313679194077849 ], [ 540038.190207662992179, 2236898.621838581748307 ], [ 539977.503791828639805, 2236929.764711345545948 ], [ 539718.631779172690585, 2236946.272205869667232 ], [ 539602.705875433050096, 2236919.889983813278377 ] ], [ [ 543174.344577778596431, 2241979.949759650044143 ], [ 543364.169985157088377, 2241972.218487741425633 ], [ 543356.298420856706798, 2241510.449853018857539 ], [ 543426.114089892362244, 2241262.719999642111361 ], [ 543702.860212613944896, 2241129.301873419433832 ], [ 543887.347845009760931, 2241103.184784515760839 ], [ 544045.81812880281359, 2241173.504144635982811 ], [ 544233.75023258512374, 2241220.381598742678761 ], [ 544209.5154773441609, 2241390.48586190212518 ], [ 544044.953694278025068, 2241480.912670479156077 ], [ 544050.010794029105455, 2241777.360254586674273 ], [ 544027.263360303011723, 2241937.006848993711174 ], [ 543765.784761513350531, 2242218.909846507012844 ], [ 543482.914153006742708, 2242265.64200122654438 ], [ 543331.140292620053515, 2242243.768065763637424 ], [ 543213.631521891802549, 2242087.091142950579524 ], [ 543183.367372984648682, 2242057.225873651914299 ], [ 543174.344577778596431, 2241979.949759650044143 ], [ 543138.669313369900919, 2241967.383244235999882 ], [ 543166.436136584030464, 2241942.593510577455163 ], [ 543174.344577778596431, 2241979.949759650044143 ] ], [ [ 545724.105221155681647, 2239931.113720646128058 ], [ 545711.621794525184669, 2239967.204154934734106 ], [ 545687.146241910522804, 2239939.167853615246713 ], [ 545724.105221155681647, 2239931.113720646128058 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 51.0, "GRIDCODE": 20.0, "X_COORD": 586859.41275000002, "Y_COORD": 279060.14140999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 551267.643914088257588, 2236858.331620138138533 ], [ 551223.482342503033578, 2236894.84467335883528 ], [ 551143.834658006788231, 2237004.002309787087142 ], [ 550684.978411396499723, 2237364.353722663596272 ], [ 550435.636086068698205, 2237486.504418265074492 ], [ 550042.293799713021144, 2237810.413279660046101 ], [ 550188.045492107281461, 2238074.959287519566715 ], [ 550403.858925455017015, 2238624.008163542486727 ], [ 550457.187264485401101, 2238840.73572938516736 ], [ 550377.697186252451502, 2239347.710129817947745 ], [ 550398.654341707704589, 2239540.33689181972295 ], [ 550414.113244950887747, 2239754.103598300367594 ], [ 550439.481816574581899, 2239845.235025661066175 ], [ 550475.69741026929114, 2239992.396272355690598 ], [ 550518.059077892219648, 2240486.22366985771805 ], [ 550543.546529850922525, 2240720.455201017670333 ], [ 550871.745278274291195, 2241016.43092167750001 ], [ 551243.344596364651807, 2241107.274148695170879 ], [ 551426.250995577895083, 2241268.202823680825531 ], [ 551540.98237723344937, 2241364.871603773906827 ], [ 551570.814223113353364, 2241401.78446648735553 ], [ 551545.568646818166599, 2241650.117666381411254 ], [ 551597.968427763669752, 2241838.311740541830659 ], [ 551621.450243222876452, 2241975.723825832828879 ], [ 551648.695848478353582, 2242036.732189806178212 ], [ 551678.162176833720878, 2242156.455510559491813 ], [ 551847.837601222330704, 2242200.253908605314791 ], [ 551889.22686384874396, 2242305.524371804669499 ], [ 551987.406011053011753, 2242360.081752832047641 ], [ 552014.113959489157423, 2242393.124022436328232 ], [ 552043.233585291076452, 2242424.012669517658651 ], [ 552151.809949034242891, 2242583.069961810484529 ], [ 552394.654501588782296, 2242657.731471015140414 ], [ 552559.466152260778472, 2242759.510807951912284 ], [ 552651.197403891012073, 2242795.27192503400147 ], [ 552720.028774494770914, 2242880.435993548482656 ], [ 552882.693237618077546, 2243173.779945965856314 ], [ 552899.634740948211402, 2243309.125820131972432 ], [ 552922.130466412636451, 2243331.320928449742496 ], [ 552998.890895757009275, 2243663.15575042180717 ], [ 553368.900371972587891, 2243715.009214142337441 ], [ 553513.608987270272337, 2243756.460386987775564 ], [ 553688.70468510419596, 2243800.099922118708491 ], [ 553707.474839227972552, 2244014.099571450613439 ], [ 553773.09011120244395, 2243887.350263291969895 ], [ 553948.273480875650421, 2243777.507903382182121 ], [ 554065.56025360012427, 2243794.383712750859559 ], [ 554185.312745659030043, 2243792.087319343350828 ], [ 554537.548843121039681, 2243842.77623379137367 ], [ 554573.188543129130267, 2243805.850737571716309 ], [ 554563.577748213894665, 2243729.093614443205297 ], [ 554525.696511683636345, 2243593.080102549865842 ], [ 554736.78114064631518, 2243347.922675586305559 ], [ 554769.24951225949917, 2243288.312631338834763 ], [ 554932.586993873002939, 2243040.535979928448796 ], [ 554870.954703877796419, 2242722.641254417598248 ], [ 555165.200170622090809, 2242709.288459486328065 ], [ 555225.583260520128533, 2242681.641181794926524 ], [ 555288.092654252890497, 2242656.428549632430077 ], [ 555320.560348905273713, 2242596.81758601590991 ], [ 555418.082410456961952, 2242471.039529523812234 ], [ 555397.94939153175801, 2242280.02646120171994 ], [ 555284.583423192962073, 2242231.769084104336798 ], [ 555171.833374043460935, 2242187.816139594651759 ], [ 555139.089097526506521, 2241996.23512898851186 ], [ 554993.437297499389388, 2241880.878531936556101 ], [ 554744.841886831098236, 2241775.049385498277843 ], [ 554578.886615618015639, 2241710.352811716496944 ], [ 554640.015411700936966, 2241550.6231628973037 ], [ 554771.368827790021896, 2241442.016859476454556 ], [ 554721.403542286599986, 2241092.40089968405664 ], [ 554832.122839827323332, 2240827.361688061617315 ], [ 554712.069925982737914, 2240609.522217369638383 ], [ 554632.211576503934339, 2240621.317785338498652 ], [ 554426.867710015852936, 2240600.315892769023776 ], [ 554238.310169617994688, 2240628.161492091603577 ], [ 554143.396427432773635, 2240618.450548383407295 ], [ 554074.49328217539005, 2240616.950173437595367 ], [ 553850.143350737635046, 2240769.655123522505164 ], [ 553705.37567503307946, 2240680.249887784011662 ], [ 553557.636704743257724, 2240677.023758611641824 ], [ 553463.958916290313937, 2240508.084402021020651 ], [ 553359.706822581705637, 2240450.150915674865246 ], [ 553373.447655589552596, 2240314.939820090308785 ], [ 553376.540584466187283, 2240180.035674684680998 ], [ 553475.71679016482085, 2240064.844848199747503 ], [ 553508.527119424543343, 2239999.743156107142568 ], [ 553442.411710432148539, 2239851.702717489562929 ], [ 553387.127738271607086, 2239711.09117385558784 ], [ 553458.845231772633269, 2239491.474428169429302 ], [ 553633.49264364677947, 2239392.279039699584246 ], [ 553359.552939253277145, 2239029.605304926633835 ], [ 553338.465946947108023, 2238906.199830697849393 ], [ 553311.703919281018898, 2238810.077118228189647 ], [ 553141.87468909623567, 2238683.510322139598429 ], [ 553115.168347785715014, 2238650.466692522168159 ], [ 552987.41464752308093, 2238542.820995082147419 ], [ 552877.855750113842078, 2238407.250226028263569 ], [ 552730.846363822813146, 2238251.304687939584255 ], [ 552668.578875635750592, 2238138.994379895739257 ], [ 552538.423524589976296, 2238029.322648423723876 ], [ 552476.291009952430613, 2237776.8511375002563 ], [ 552517.901956257410347, 2237677.246364096179605 ], [ 552563.651342546218075, 2237404.150328193791211 ], [ 552391.054509577690624, 2237275.512751373462379 ], [ 552400.142294704564847, 2237186.105078047141433 ], [ 552226.181322201853618, 2237001.557199007831514 ], [ 551290.264733306481503, 2236886.325418797321618 ], [ 551267.643914088257588, 2236858.331620138138533 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 52.0, "GRIDCODE": 19.0, "X_COORD": 571902.30521000002, "Y_COORD": 278374.85820999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 534458.618227912462316, 2237415.97573680896312 ], [ 534431.903912461944856, 2237621.306127062067389 ], [ 534156.231732664164156, 2237682.721456490457058 ], [ 533822.26330446836073, 2237816.440459272824228 ], [ 533670.079754494945519, 2237839.931189767085016 ], [ 533620.960508796270005, 2238166.749978177249432 ], [ 533535.427391921984963, 2238336.881337479688227 ], [ 533384.416823280858807, 2238444.318487035110593 ], [ 533297.029259894508868, 2238565.347994853742421 ], [ 533313.644252268015407, 2238842.030819594860077 ], [ 533391.628881928161718, 2238965.532645529136062 ], [ 533400.065019900910556, 2239043.324829176999629 ], [ 533522.515649677719921, 2238964.42341489251703 ], [ 533732.350130300968885, 2238990.248802189715207 ], [ 533902.764663583715446, 2238968.957464302890003 ], [ 533990.87261395168025, 2238880.956608915701509 ], [ 534095.210810190066695, 2238947.063985729590058 ], [ 534227.378786949091591, 2238963.329503558576107 ], [ 534376.871366682462394, 2238963.63246791716665 ], [ 534548.620675589190796, 2238984.766823773272336 ], [ 534657.56430705206003, 2238917.570985757745802 ], [ 534880.033493048627861, 2238944.943309883587062 ], [ 535060.312057165661827, 2238833.745593695901334 ], [ 535193.517478210269473, 2238806.429559747688472 ], [ 535223.722221009084024, 2238810.145972639322281 ], [ 535281.237811104860157, 2238810.263499608263373 ], [ 535374.799224968650378, 2238869.540148863568902 ], [ 535682.798480652971193, 2238907.434920596890152 ], [ 535909.490954786073416, 2238868.788378290832043 ], [ 536127.581159167108126, 2238718.804927282035351 ], [ 536297.68773257615976, 2238719.146427877247334 ], [ 536362.287468616850674, 2238760.070184409618378 ], [ 536474.541782090789638, 2238820.926261636428535 ], [ 536505.476367434370331, 2238888.241053639911115 ], [ 536541.172376409173012, 2239037.979458562098444 ], [ 536639.360683100763708, 2239138.479746436700225 ], [ 536663.603549005929381, 2239202.162395583465695 ], [ 536745.340578778763302, 2239356.741909606382251 ], [ 536771.713001181022264, 2239426.016008990816772 ], [ 536858.722599158412777, 2239515.074331432580948 ], [ 536831.252878210972995, 2239740.556489216163754 ], [ 536894.067336715525016, 2239821.260649813339114 ], [ 537057.118564199190587, 2239909.649528032168746 ], [ 536940.893946597236209, 2240002.199831755831838 ], [ 536876.937243307707831, 2240122.564811958931386 ], [ 536832.254396922769956, 2240158.147010051645339 ], [ 536785.98369832651224, 2240537.94788780529052 ], [ 536876.740196004509926, 2240604.645138777792454 ], [ 536960.558253311086446, 2240672.035862483084202 ], [ 537198.755769277107902, 2240715.40644271671772 ], [ 537331.120556208770722, 2240821.828526236116886 ], [ 537450.326104034553282, 2240765.676507230848074 ], [ 537523.697853134712204, 2240765.822713228873909 ], [ 537553.372882122988813, 2240769.471420991234481 ], [ 537630.556769303511828, 2240769.625972972251475 ], [ 537825.23886674141977, 2241019.73356813006103 ], [ 537927.710743064293638, 2241084.644137450493872 ], [ 537985.979556755279191, 2241038.243744993582368 ], [ 538079.088630836573429, 2240908.849803283810616 ], [ 538228.384807242429815, 2240973.777140726335347 ], [ 538353.957164961029775, 2240936.869480446912348 ], [ 538412.45041170658078, 2240944.064612799324095 ], [ 538903.616758886142634, 2240938.756678527221084 ], [ 538999.039676111773588, 2240843.436404071748257 ], [ 538969.252656970755197, 2240841.582739469595253 ], [ 538973.011826850706711, 2240781.343464992009103 ], [ 538814.369791459757835, 2240757.762424224987626 ], [ 538949.112282210146077, 2240737.819425377994776 ], [ 538973.011826850706711, 2240781.343464992009103 ], [ 539017.218052390031517, 2240800.965970801189542 ], [ 539047.535816416959278, 2240769.570956354960799 ], [ 539079.127280553104356, 2240774.124258037656546 ], [ 539158.164837969001383, 2240662.67290304414928 ], [ 539237.575578744173981, 2240632.631104557774961 ], [ 539391.953379937098362, 2240519.038960075937212 ], [ 539588.533634433988482, 2240457.317555361427367 ], [ 539832.45638397987932, 2240541.449296272359788 ], [ 539946.483872938202694, 2240615.479742288589478 ], [ 540222.562544376123697, 2240661.426085931248963 ], [ 540337.476840374758467, 2240701.062663540244102 ], [ 540510.261873784591444, 2240744.176890346221626 ], [ 540652.744298137607984, 2240860.388015126809478 ], [ 540687.773499936098233, 2241260.715257795527577 ], [ 540732.995367377065122, 2241356.292688495479524 ], [ 541084.114151795045473, 2241414.718367645516992 ], [ 541196.261250270414166, 2241595.495367522351444 ], [ 541328.375119146890938, 2241665.283180038444698 ], [ 541459.594666806980968, 2241750.468858300708234 ], [ 541468.949954327428713, 2241994.876292292959988 ], [ 541597.101513056317344, 2241963.444335442967713 ], [ 541638.261947065591812, 2241930.663160622119904 ], [ 541683.404429979156703, 2241885.565661401487887 ], [ 541911.983065477921627, 2241856.974161322228611 ], [ 542003.669224609388039, 2241800.408777915872633 ], [ 542121.492324502673, 2241814.890646085143089 ], [ 542156.223305406747386, 2241749.517111987806857 ], [ 542189.459436465520412, 2241723.04516732133925 ], [ 542219.553924587089568, 2241692.982233488932252 ], [ 542350.53648167301435, 2241660.85337227396667 ], [ 542268.015691174659878, 2241395.331680098548532 ], [ 542242.086649890057743, 2241238.55237078666687 ], [ 541976.645699200103991, 2240966.926685800775886 ], [ 541784.660856037517078, 2240704.91137576662004 ], [ 541684.251104121096432, 2240631.137640542350709 ], [ 541618.819339743931778, 2240459.298589576035738 ], [ 541549.986890195519663, 2240370.878308592364192 ], [ 541322.462200256763026, 2240370.441503467969596 ], [ 541323.365908829029649, 2240105.553148119710386 ], [ 541492.758147863671184, 2239921.470574032515287 ], [ 541438.441889102105051, 2239860.461055546067655 ], [ 541330.768359566805884, 2239819.342419411055744 ], [ 541272.774999875342473, 2239667.034839658997953 ], [ 541169.542817511362955, 2239561.388163195922971 ], [ 541077.520175095298328, 2239414.696069396100938 ], [ 540930.564707762328908, 2239346.779449508525431 ], [ 540757.117158924113028, 2239177.717918145470321 ], [ 540589.926382994512096, 2239087.096179310232401 ], [ 540590.251910210470669, 2238992.152193842455745 ], [ 540604.741533205611631, 2238873.163194393739104 ], [ 540557.638661022647284, 2238867.372530004940927 ], [ 540493.136394228669815, 2238867.246778968721628 ], [ 540394.691691256361082, 2238829.648721965029836 ], [ 540255.060047456761822, 2238698.314197367057204 ], [ 540195.585604325984605, 2238666.074487250298262 ], [ 540146.776006615255028, 2238603.367363160476089 ], [ 539929.497443243861198, 2238485.597155133262277 ], [ 539886.63629394012969, 2238373.016089888289571 ], [ 539833.252143136458471, 2238318.376749974675477 ], [ 539776.890308711794205, 2238214.998833731748164 ], [ 539689.510303448303603, 2238150.784091603942215 ], [ 539650.32381084037479, 2238100.438402187079191 ], [ 539620.635703253559768, 2238070.054816990159452 ], [ 539351.863634044420905, 2238070.2720552906394 ], [ 539291.025653546559624, 2238062.791210083290935 ], [ 539139.55076542054303, 2237838.852992092259228 ], [ 538978.53165026253555, 2237751.568277719430625 ], [ 538946.940855542547069, 2237619.067539247684181 ], [ 538919.133489439496771, 2237558.558529565110803 ], [ 538892.628706868854351, 2237447.384125527925789 ], [ 538733.010459362994879, 2237522.586343955248594 ], [ 538517.253796452656388, 2237592.322530750185251 ], [ 538369.514873214298859, 2237402.501567190513015 ], [ 538240.126276724156924, 2237332.3610760839656 ], [ 538178.25823008432053, 2237252.865870018489659 ], [ 538133.727803520741872, 2237207.286787225864828 ], [ 538098.261653904919513, 2237161.718253718689084 ], [ 538055.555378909688443, 2237049.530281033366919 ], [ 537915.408234775299206, 2237012.26451173517853 ], [ 537871.09642662096303, 2237130.45929102320224 ], [ 537763.872986954753287, 2237283.54616968985647 ], [ 537614.611487588612363, 2237218.622565953992307 ], [ 537548.905512914992869, 2237046.009173681028187 ], [ 537454.101357282255776, 2237104.495526194572449 ], [ 537391.079381656018086, 2237129.111695049330592 ], [ 537332.227190491044894, 2237187.902264930307865 ], [ 537292.960377276293002, 2237183.072588786482811 ], [ 537235.352647701045498, 2237109.049601347185671 ], [ 537034.384095476591028, 2237108.649096580222249 ], [ 537004.710760186659172, 2237104.999850460328162 ], [ 536929.966966074891388, 2237104.852013639174402 ], [ 536821.10294354101643, 2237091.45745822135359 ], [ 536774.786555787199177, 2236969.778346766717732 ], [ 536746.981483364594169, 2236909.267551174387336 ], [ 536730.264176322263665, 2236725.096965144388378 ], [ 536618.4781313870335, 2236664.489785868674517 ], [ 536385.088134972495027, 2236426.971721658483148 ], [ 536405.380246150656603, 2236260.412533226422966 ], [ 536364.372571793617681, 2236171.168746347539127 ], [ 536289.54466550948564, 2236094.568421548232436 ], [ 536250.461468047345988, 2236015.687479695305228 ], [ 536100.657919718767516, 2235959.679337112233043 ], [ 536066.503157888189889, 2235867.026515328325331 ], [ 536029.853567782673053, 2235789.540673721581697 ], [ 535910.869039954501204, 2235864.108050904236734 ], [ 535549.012559281429276, 2235811.892798868007958 ], [ 535460.237291800323874, 2235903.830079055391252 ], [ 535242.78130968788173, 2235872.451544247567654 ], [ 535075.220416235853918, 2235875.60901515558362 ], [ 535077.117451401543804, 2235987.942465012893081 ], [ 535061.938795345486142, 2236094.361315871588886 ], [ 535161.158068542485125, 2236381.944501493126154 ], [ 535234.983690454391763, 2236502.594217702746391 ], [ 535318.462568531278521, 2236775.736137548461556 ], [ 535189.340166427195072, 2236874.799295522272587 ], [ 535192.489432841190137, 2237061.166457520797849 ], [ 535074.170268553774804, 2237209.341984877362847 ], [ 534866.156124379951507, 2237323.616078710183501 ], [ 534685.677958929794841, 2237353.404433710500598 ], [ 534596.513447733363137, 2237380.337795634754002 ], [ 534503.200556331081316, 2237402.509195731021464 ], [ 534458.618227912462316, 2237415.97573680896312 ] ], [ [ 538766.382566948188469, 2240738.247683555819094 ], [ 538730.708536444115452, 2240725.677943509072065 ], [ 538758.476901860325597, 2240700.889983591623604 ], [ 538766.382566948188469, 2240738.247683555819094 ], [ 538802.056609001592733, 2240750.817397034727037 ], [ 538774.288247108343057, 2240775.605360738933086 ], [ 538766.382566948188469, 2240738.247683555819094 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 53.0, "GRIDCODE": 17.0, "X_COORD": 566458.98794999998, "Y_COORD": 276879.17216999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 534285.321180293685757, 2234925.579131506383419 ], [ 532034.614214994595386, 2234799.235969659872353 ], [ 531948.024321823380888, 2234800.863361938856542 ], [ 531686.418328415369615, 2235071.751611358486116 ], [ 531576.660733273602091, 2234982.185242043808103 ], [ 531539.326669385540299, 2234982.886883048340678 ], [ 531416.511059795040637, 2235156.046373876743019 ], [ 531382.768796023097821, 2235181.929211868904531 ], [ 531353.174420448835008, 2235212.574233495630324 ], [ 531107.536841535125859, 2235225.632339893840253 ], [ 531045.908544160076417, 2235344.602130263112485 ], [ 530969.19840699469205, 2235440.659832098521292 ], [ 530913.582724551670253, 2235548.022187190130353 ], [ 530832.06437635642942, 2235650.102676228620112 ], [ 530835.588190984912217, 2235859.542905458249152 ], [ 530793.449659285717644, 2236154.839084014296532 ], [ 530746.801237618084997, 2236261.943877317011356 ], [ 530776.030467452248558, 2236455.37120886798948 ], [ 530841.993044818751514, 2236679.785714996978641 ], [ 531020.343798671965487, 2236774.054996002465487 ], [ 531001.172510970849544, 2236908.4056262569502 ], [ 531093.793305388535373, 2237044.798835337162018 ], [ 531156.733111632522196, 2237317.381027690134943 ], [ 531055.253499393584207, 2237550.378119112923741 ], [ 531005.363561516162008, 2237686.291564504615963 ], [ 531039.775503989192657, 2238068.598625014536083 ], [ 531105.288891151663847, 2238291.46929626353085 ], [ 531194.35699835466221, 2238379.412503672763705 ], [ 531258.768934141262434, 2238378.203855487518013 ], [ 531323.128550868248567, 2238387.493241821415722 ], [ 531655.334882914554328, 2238535.006211331114173 ], [ 531868.120541606098413, 2238675.663071029819548 ], [ 531915.284444632125087, 2238665.15770713519305 ], [ 532053.398893291712739, 2238621.157666641287506 ], [ 532235.873230522382073, 2238745.626648552715778 ], [ 532297.06540510780178, 2238776.336276805959642 ], [ 532331.283946633688174, 2238825.565378782339394 ], [ 532407.059707643347792, 2238877.252954560332 ], [ 532581.462661443394609, 2238939.678347042761743 ], [ 532609.915969250490889, 2238980.615403237752616 ], [ 532641.322129575535655, 2239009.467230408452451 ], [ 532673.03997304989025, 2239101.338545762002468 ], [ 532811.889590868144296, 2239196.046941300854087 ], [ 532960.030601791921072, 2239120.051643081009388 ], [ 533052.15609458333347, 2239087.407638354226947 ], [ 533161.334710955037735, 2238965.936668891459703 ], [ 533293.803523618844338, 2239077.181050447747111 ], [ 533400.065019900910556, 2239043.324829176999629 ], [ 533391.628881928161718, 2238965.532645529136062 ], [ 533313.644252268015407, 2238842.030819594860077 ], [ 533297.029259894508868, 2238565.347994853742421 ], [ 533384.416823280858807, 2238444.318487035110593 ], [ 533535.427391921984963, 2238336.881337479688227 ], [ 533620.960508796270005, 2238166.749978177249432 ], [ 533670.079754494945519, 2237839.931189767085016 ], [ 533822.26330446836073, 2237816.440459272824228 ], [ 534156.231732664164156, 2237682.721456490457058 ], [ 534431.903912461944856, 2237621.306127062067389 ], [ 534458.618227912462316, 2237415.97573680896312 ], [ 534083.090586471371353, 2237341.14824206661433 ], [ 534015.858230791054666, 2237164.500101783312857 ], [ 533982.263891490991227, 2237130.107873725704849 ], [ 533962.284963937825523, 2236998.248311386443675 ], [ 534054.272246709326282, 2236850.031555566936731 ], [ 534104.42021236999426, 2236610.782481809146702 ], [ 534054.017548886942677, 2236434.542763970792294 ], [ 534062.714315933641046, 2236363.186316316947341 ], [ 534063.712848073919304, 2236080.976447896100581 ], [ 534128.818212980637327, 2235846.289149997755885 ], [ 534093.414195037912577, 2235769.230090253986418 ], [ 534230.744163552531973, 2235573.173463380895555 ], [ 534285.321180293685757, 2234925.579131506383419 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 54.0, "GRIDCODE": 18.0, "X_COORD": 587782.918, "Y_COORD": 276606.15093 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 553576.624040309572592, 2235308.135358022525907 ], [ 553587.816871358198114, 2235355.035717540420592 ], [ 553668.860765881487168, 2235489.512849087826908 ], [ 553585.855084471404552, 2235623.353768886066973 ], [ 553087.038494272972457, 2235635.436969849281013 ], [ 552907.332687112968415, 2235557.321045243181288 ], [ 552820.966738055692986, 2235643.6497568404302 ], [ 552730.446499686222523, 2235632.538662063889205 ], [ 552671.610787328914739, 2235691.34667956829071 ], [ 552635.171533974353224, 2235717.628191810101271 ], [ 552587.985541936708614, 2235593.74957487359643 ], [ 552558.297772642690688, 2235563.368710475042462 ], [ 552545.283343545277603, 2235318.956126918084919 ], [ 552427.941943347803317, 2235274.163948687724769 ], [ 552263.723992277402431, 2235273.882777878083289 ], [ 552052.384081918862648, 2235336.069612381979823 ], [ 551931.427409330732189, 2235410.736610765568912 ], [ 551929.824454916175455, 2235900.601334854960442 ], [ 551873.089564069872722, 2235945.807365033775568 ], [ 551788.512499808566645, 2235935.428716484457254 ], [ 551720.619060910190456, 2235935.308739292435348 ], [ 551543.357029108796269, 2236044.731155648827553 ], [ 551448.688041362562217, 2236097.639188833534718 ], [ 551368.869175874395296, 2236208.625944126397371 ], [ 551410.237420672317967, 2236353.128219280391932 ], [ 551314.221016814000905, 2236578.300304935313761 ], [ 551267.643914088257588, 2236858.331620138138533 ], [ 551290.264733306481503, 2236886.325418797321618 ], [ 552226.181322201853618, 2237001.557199007831514 ], [ 552400.142294704564847, 2237186.105078047141433 ], [ 552391.054509577690624, 2237275.512751373462379 ], [ 552563.651342546218075, 2237404.150328193791211 ], [ 552517.901956257410347, 2237677.246364096179605 ], [ 552476.291009952430613, 2237776.8511375002563 ], [ 552538.423524589976296, 2238029.322648423723876 ], [ 552668.578875635750592, 2238138.994379895739257 ], [ 552730.846363822813146, 2238251.304687939584255 ], [ 552877.855750113842078, 2238407.250226028263569 ], [ 552987.41464752308093, 2238542.820995082147419 ], [ 553115.168347785715014, 2238650.466692522168159 ], [ 553141.87468909623567, 2238683.510322139598429 ], [ 553311.703919281018898, 2238810.077118228189647 ], [ 553338.465946947108023, 2238906.199830697849393 ], [ 553359.552939253277145, 2239029.605304926633835 ], [ 553633.49264364677947, 2239392.279039699584246 ], [ 553458.845231772633269, 2239491.474428169429302 ], [ 553387.127738271607086, 2239711.09117385558784 ], [ 553442.411710432148539, 2239851.702717489562929 ], [ 553508.527119424543343, 2239999.743156107142568 ], [ 553475.71679016482085, 2240064.844848199747503 ], [ 553376.540584466187283, 2240180.035674684680998 ], [ 553373.447655589552596, 2240314.939820090308785 ], [ 553359.706822581705637, 2240450.150915674865246 ], [ 553463.958916290313937, 2240508.084402021020651 ], [ 553557.636704743257724, 2240677.023758611641824 ], [ 553705.37567503307946, 2240680.249887784011662 ], [ 553850.143350737635046, 2240769.655123522505164 ], [ 554074.49328217539005, 2240616.950173437595367 ], [ 554143.396427432773635, 2240618.450548383407295 ], [ 554238.310169617994688, 2240628.161492091603577 ], [ 554426.867710015852936, 2240600.315892769023776 ], [ 554632.211576503934339, 2240621.317785338498652 ], [ 554712.069925982737914, 2240609.522217369638383 ], [ 554776.398316976148635, 2240547.509415014646947 ], [ 554916.509741055313498, 2240456.462603595107794 ], [ 555017.078417040524073, 2240236.969157880172133 ], [ 555292.665269462391734, 2240177.398277181200683 ], [ 555325.132483436726034, 2240117.78512026835233 ], [ 555359.725901564699598, 2240060.60671364236623 ], [ 555419.510215413407423, 2239950.831058096140623 ], [ 555457.381265037460253, 2239914.321735364384949 ], [ 555551.546241149539128, 2239860.832120060920715 ], [ 555582.14106060215272, 2239831.338880599476397 ], [ 555760.322354231029749, 2239739.82307812012732 ], [ 555826.619573897798546, 2239618.088807919062674 ], [ 555914.016348958830349, 2239533.832203198224306 ], [ 556085.27613572916016, 2239392.217095243744552 ], [ 555946.904827081831172, 2239184.122464013285935 ], [ 555900.019859454710968, 2239064.875681991688907 ], [ 555850.526785210473463, 2238954.063453953713179 ], [ 555822.845077917794697, 2238811.25705979205668 ], [ 555831.242493861354887, 2238728.589094219729304 ], [ 555834.495665025897324, 2238586.634773393161595 ], [ 555938.023576325504109, 2238486.821602939628065 ], [ 556196.192553793895058, 2238513.219721479341388 ], [ 556344.821615683380514, 2238416.630124620161951 ], [ 556229.949525079806335, 2238274.499811737798154 ], [ 556104.679956847336143, 2238204.888900536112487 ], [ 556050.87085613864474, 2238044.554751414805651 ], [ 556062.863278487464413, 2237926.534035213291645 ], [ 556066.256144660408609, 2237778.337678110226989 ], [ 556134.98903252161108, 2237689.678482941351831 ], [ 556167.454949817154557, 2237630.062675841152668 ], [ 556257.828716885182075, 2237513.48768772277981 ], [ 556128.284000896732323, 2237353.194297457113862 ], [ 556033.433611884131096, 2237252.585352387279272 ], [ 556099.274548960616812, 2236941.327827454544604 ], [ 556030.602380279218778, 2236787.559302411973476 ], [ 555971.810559626086615, 2236484.235722150653601 ], [ 555925.722280930029228, 2235996.168454697355628 ], [ 555745.142430680454709, 2235827.741006209515035 ], [ 555585.205387219320983, 2235778.568608873523772 ], [ 555486.114330653217621, 2235622.413991648703814 ], [ 555471.555846233619377, 2235606.968966245651245 ], [ 555401.315202004043385, 2235575.174285115674138 ], [ 555315.09859229659196, 2235667.794509916566312 ], [ 555207.461356607498601, 2235726.014611748047173 ], [ 555238.41953337402083, 2235789.57503960095346 ], [ 555203.05546379450243, 2235815.725391376763582 ], [ 555130.369968898128718, 2235893.813140634447336 ], [ 554997.895483701722696, 2235991.776258185505867 ], [ 554936.146565924980678, 2236306.044611012563109 ], [ 555038.391741739585996, 2236515.967264997772872 ], [ 554878.253809366375208, 2236489.37082242500037 ], [ 554808.596177213126794, 2236392.946751029230654 ], [ 554659.891034009633586, 2236399.023203354328871 ], [ 554484.624365113675594, 2236369.912130898796022 ], [ 554417.956688542035408, 2236465.361630285158753 ], [ 554367.042935777688399, 2236489.647213607095182 ], [ 554303.417411190108396, 2236205.546290975995362 ], [ 554330.274862921913154, 2236041.75363696180284 ], [ 554175.238823258550838, 2235996.752909852191806 ], [ 554150.789724714355543, 2235887.577306723222136 ], [ 553977.742302233469673, 2235764.114614466205239 ], [ 553880.515835462487303, 2235491.880367568694055 ], [ 553821.528208146919496, 2235370.763194339349866 ], [ 553618.898495965753682, 2235327.273487715050578 ], [ 553576.624040309572592, 2235308.135358022525907 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 55.0, "GRIDCODE": 16.0, "X_COORD": 578189.13992999995, "Y_COORD": 275158.72966999997 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 546246.762515429989435, 2233462.359789432957768 ], [ 546043.816983771976084, 2233543.680504884570837 ], [ 545962.755368032492697, 2233488.405526793561876 ], [ 545785.38036935927812, 2233437.881707244552672 ], [ 545624.711631522281095, 2233473.658554234541953 ], [ 545387.666903413599357, 2233428.758136623539031 ], [ 545228.494835919467732, 2233489.820473032072186 ], [ 545235.06445040658582, 2233597.739882944151759 ], [ 545281.089732457068749, 2233689.646365093067288 ], [ 545223.632716965745203, 2233775.706399427726865 ], [ 545228.265993787208572, 2233852.682219239883125 ], [ 545206.462671778164804, 2233969.439711397513747 ], [ 545094.167140809237026, 2233948.169519261457026 ], [ 544942.142763087758794, 2234033.133314773440361 ], [ 544788.260357914026827, 2234050.466471357271075 ], [ 544699.294850213453174, 2234078.835738382302225 ], [ 544668.485693281283602, 2234073.001000366173685 ], [ 544610.226171185611747, 2234081.691252204589546 ], [ 544679.06917599029839, 2234144.916371487081051 ], [ 544714.426944128237665, 2234275.627459204755723 ], [ 544620.564604168757796, 2234342.440151002258062 ], [ 544568.163254777435213, 2234400.773627216927707 ], [ 544466.012062373338267, 2234423.553826899267733 ], [ 544382.816678131581284, 2234466.26011086627841 ], [ 544336.818096036324278, 2234630.544453364796937 ], [ 544297.188390778843313, 2234718.013062734156847 ], [ 544355.029831368941814, 2234771.134004347026348 ], [ 544379.171076819533482, 2234857.35711372923106 ], [ 544244.661080294055864, 2235021.097226537764072 ], [ 544132.74251951277256, 2234999.896962503902614 ], [ 544042.68949533184059, 2235005.580745073035359 ], [ 543967.651409278158098, 2234991.36760894022882 ], [ 543784.576121473917738, 2235049.743152310140431 ], [ 543707.333275349694304, 2235135.725677837617695 ], [ 543617.411829691031016, 2235157.031104509718716 ], [ 543536.348055941518396, 2235000.796792146749794 ], [ 543493.953656907426193, 2234961.861269565299153 ], [ 543366.590666797361337, 2234969.901568165980279 ], [ 543235.963476012460887, 2234880.823434172198176 ], [ 542987.818483147653751, 2234896.48850782122463 ], [ 542889.299659300479107, 2234947.058214705437422 ], [ 542849.225564813241363, 2234991.664053098298609 ], [ 542729.039274818380363, 2235055.573971220292151 ], [ 542632.553001241525635, 2235162.971515884622931 ], [ 542494.291390723898076, 2235211.995794724673033 ], [ 542440.012911588652059, 2235272.409990408457816 ], [ 542352.699011414777488, 2235255.869953915476799 ], [ 542217.257085830438882, 2235264.416648514568806 ], [ 542145.660327730467543, 2235215.591377740725875 ], [ 541866.069015243789181, 2235414.355037688277662 ], [ 541745.425124099594541, 2235457.131015060469508 ], [ 541678.931568163447082, 2235538.400759015232325 ], [ 541740.598602845799178, 2235661.545399847440422 ], [ 541717.758863169467077, 2235783.819348475895822 ], [ 541804.552141586667858, 2235921.246133207343519 ], [ 541825.198563719633967, 2236016.590659618377686 ], [ 541852.848785229609348, 2236105.682053567841649 ], [ 541860.820751539664343, 2236404.237841697409749 ], [ 541655.596470233984292, 2236365.355818547308445 ], [ 541613.954606824205257, 2236367.981729350052774 ], [ 541563.910495753865689, 2236423.681714106351137 ], [ 541499.375501084490679, 2236446.56231945194304 ], [ 541441.013024674146436, 2236476.515251404605806 ], [ 541376.477924827369861, 2236499.395694684237242 ], [ 541286.451391255483031, 2236557.617546205408871 ], [ 541221.916146480245516, 2236580.497781031765044 ], [ 541113.49929497228004, 2236636.139546025544405 ], [ 540888.643773267744109, 2236650.48290709964931 ], [ 540755.04839877190534, 2236680.214108592830598 ], [ 540656.334838175913319, 2236790.080823208205402 ], [ 540490.813080292893574, 2236848.761266653425992 ], [ 540468.355985227390192, 2236943.512747793458402 ], [ 540483.773869557189755, 2236958.192138161510229 ], [ 540543.029088715207763, 2237040.253784279339015 ], [ 540522.891472939401865, 2237162.88493035081774 ], [ 540641.979925983585417, 2237503.071918017230928 ], [ 540701.769185480196029, 2237559.999469444155693 ], [ 540789.07440599927213, 2237680.90476418659091 ], [ 541014.335258127073757, 2237782.644304518587887 ], [ 541048.084514130372554, 2237933.474708458408713 ], [ 541121.819740196224302, 2237965.500903259962797 ], [ 541182.370824561570771, 2237796.853492784313858 ], [ 541414.396272360580042, 2237835.446574686095119 ], [ 541445.167369487462565, 2237834.196989513933659 ], [ 541565.129531585960649, 2237888.531436737626791 ], [ 541672.777361928368919, 2237734.487450945191085 ], [ 541799.537669991608709, 2237688.043886984698474 ], [ 541894.933847546461038, 2237820.147038954310119 ], [ 542074.795843557803892, 2237812.838606292381883 ], [ 542100.794667532201856, 2237848.838245548307896 ], [ 542224.635817355941981, 2237787.041649089194834 ], [ 542250.733515194500796, 2237903.66194127779454 ], [ 542525.712692190194502, 2237844.064112518914044 ], [ 542888.057879964821041, 2237904.325163488276303 ], [ 542863.993989266920835, 2238050.895346457138658 ], [ 542923.751194247510284, 2238107.784517635591328 ], [ 542971.002446587663144, 2238264.708004685118794 ], [ 543015.698612622334622, 2238356.508699717931449 ], [ 543206.077210444374941, 2238403.175620310008526 ], [ 543292.885435235919431, 2238399.646291165612638 ], [ 543361.654761520097964, 2238411.081455425359309 ], [ 543427.883827537531033, 2238502.78407337795943 ], [ 543540.065924215014093, 2238543.803186136297882 ], [ 543638.349434040603228, 2238609.197934367693961 ], [ 543771.175834901281632, 2238567.959010153077543 ], [ 543831.706497480394319, 2238399.350161083973944 ], [ 543895.237128355074674, 2238352.390616017393768 ], [ 543939.856813813210465, 2238263.974676610901952 ], [ 544170.818262332468294, 2238248.56583106610924 ], [ 544259.470283668604679, 2238221.039209677837789 ], [ 544360.078476042021066, 2238197.865272257477045 ], [ 544414.030510830925778, 2238139.930425185710192 ], [ 544558.649168633855879, 2238033.029990916140378 ], [ 544690.427199535653926, 2237984.743570369668305 ], [ 544757.303229443496093, 2237912.931619331240654 ], [ 544994.493408022914082, 2237952.368862517178059 ], [ 545004.587379194097593, 2238041.951957298442721 ], [ 545131.787885084748268, 2238014.515468345023692 ], [ 545201.027976733632386, 2237913.309856 ], [ 545227.120603429386392, 2237789.273741920478642 ], [ 545180.347109366790392, 2237719.381363722495735 ], [ 545070.920156105188653, 2237777.137539779767394 ], [ 544830.839738958515227, 2237797.90785170905292 ], [ 544721.047351464629173, 2237584.74430888146162 ], [ 544762.068567261099815, 2237344.588713533245027 ], [ 544854.150783479097299, 2237209.99404807202518 ], [ 544868.560166535084136, 2237141.484279702417552 ], [ 544854.675183696206659, 2236974.293572266586125 ], [ 545009.618306826101616, 2236731.376631394028664 ], [ 545330.387821716722101, 2236547.484308098442852 ], [ 545567.280825636000372, 2236516.518097819760442 ], [ 545752.459733720868826, 2236568.229157658293843 ], [ 546090.405284668202512, 2236822.344116029329598 ], [ 546175.188868977711536, 2236801.262195950374007 ], [ 546217.938744097365998, 2236592.386377823539078 ], [ 546371.527027217671275, 2236482.012878223322332 ], [ 546586.395210430840962, 2236411.673520375043154 ], [ 546878.335588455782272, 2236474.011859258636832 ], [ 547136.665788772748783, 2236430.155221329070628 ], [ 547327.573296814225614, 2236479.725017971359193 ], [ 547776.541254235198721, 2236533.945773307234049 ], [ 547889.730567875434645, 2236575.100949307903647 ], [ 548084.430053620482795, 2236600.360600521788001 ], [ 548135.470537148648873, 2236483.078035904094577 ], [ 548115.163693748996593, 2236218.332596993073821 ], [ 547955.89854066807311, 2235996.862416681833565 ], [ 547805.567170422174968, 2235677.271455840207636 ], [ 547515.291327248909511, 2235488.833028600551188 ], [ 547239.690731428214349, 2235503.565866366960108 ], [ 547080.060478417668492, 2235614.608855679631233 ], [ 547047.345990966423415, 2235575.72040425427258 ], [ 547017.697507404256612, 2235237.092862907797098 ], [ 546905.376281401026063, 2235164.177266833372414 ], [ 546815.306395676569082, 2235116.599509386345744 ], [ 546660.46598803170491, 2234990.302434599027038 ], [ 546582.385733638540842, 2234949.057316752150655 ], [ 546697.644977801828645, 2234786.46400647982955 ], [ 546841.616437600110658, 2234675.954501174390316 ], [ 546879.009718305780552, 2234574.001046629622579 ], [ 546912.74827127775643, 2234548.108721089549363 ], [ 546942.330698620295152, 2234517.454882214777172 ], [ 546983.540072024217807, 2234485.825026553124189 ], [ 546953.450834836112335, 2234338.96175074018538 ], [ 546937.284660719335079, 2234154.27024550549686 ], [ 546857.762184005347081, 2234024.358112373389304 ], [ 546856.819154328317381, 2233968.962711280211806 ], [ 546864.265767304808833, 2233916.690671316348016 ], [ 546809.01075330702588, 2233813.670407894067466 ], [ 546735.942403623252176, 2233775.072507272474468 ], [ 546665.679693766636774, 2233681.370686760172248 ], [ 546510.655063270474784, 2233684.326335243880749 ], [ 546397.758159179589711, 2233624.686602258123457 ], [ 546315.349607669981197, 2233543.345076591707766 ], [ 546277.022499406361021, 2233492.231018259190023 ], [ 546246.762515429989435, 2233462.359789432957768 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 56.0, "GRIDCODE": 15.0, "X_COORD": 571838.93149, "Y_COORD": 274978.89995 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 538653.870911006582901, 2232959.956850809976459 ], [ 538613.0512630562298, 2232977.733283103443682 ], [ 538590.542851747828536, 2233016.494855013675988 ], [ 538542.203186591505073, 2233090.211889922618866 ], [ 538305.273390921181999, 2233220.404887902550399 ], [ 538132.98691617930308, 2233398.848587 ], [ 538053.920792982680723, 2234196.206431488506496 ], [ 537855.240537922130898, 2234322.398559076711535 ], [ 537536.90818320272956, 2234360.859062599018216 ], [ 537455.818965370301157, 2234349.1611990891397 ], [ 537502.859084840631112, 2234448.612395912408829 ], [ 537492.344187628128566, 2234522.342212093062699 ], [ 537357.710562999593094, 2234625.647360583767295 ], [ 537196.092264761216938, 2234602.330303092487156 ], [ 537093.927424396504648, 2234666.361668676137924 ], [ 537095.134464549133554, 2234737.772193217650056 ], [ 537088.72432485409081, 2234782.732245047576725 ], [ 537089.235588868148625, 2234813.003586169332266 ], [ 537082.825452777557075, 2234857.963586502708495 ], [ 537084.420407757977955, 2234952.29911594837904 ], [ 537157.259359354851767, 2235106.297470006160438 ], [ 537180.905179406981915, 2235223.260527581907809 ], [ 536986.674046977772377, 2235372.289999385364354 ], [ 536900.458167716627941, 2235404.907657106406987 ], [ 536837.319709192845039, 2235493.944547927007079 ], [ 536743.98786632635165, 2235610.841502220369875 ], [ 536694.763638886972331, 2235779.90440815128386 ], [ 536576.274923514109105, 2235808.063960806466639 ], [ 536412.100073450361378, 2235988.53696246445179 ], [ 536268.053564879344776, 2235967.752045150846243 ], [ 536250.461468047345988, 2236015.687479695305228 ], [ 536289.54466550948564, 2236094.568421548232436 ], [ 536364.372571793617681, 2236171.168746347539127 ], [ 536405.380246150656603, 2236260.412533226422966 ], [ 536385.088134972495027, 2236426.971721658483148 ], [ 536618.4781313870335, 2236664.489785868674517 ], [ 536730.264176322263665, 2236725.096965144388378 ], [ 536746.981483364594169, 2236909.267551174387336 ], [ 536774.786555787199177, 2236969.778346766717732 ], [ 536821.10294354101643, 2237091.45745822135359 ], [ 536929.966966074891388, 2237104.852013639174402 ], [ 537004.710760186659172, 2237104.999850460328162 ], [ 537034.384095476591028, 2237108.649096580222249 ], [ 537235.352647701045498, 2237109.049601347185671 ], [ 537292.960377276293002, 2237183.072588786482811 ], [ 537332.227190491044894, 2237187.902264930307865 ], [ 537391.079381656018086, 2237129.111695049330592 ], [ 537454.101357282255776, 2237104.495526194572449 ], [ 537548.905512914992869, 2237046.009173681028187 ], [ 537614.611487588612363, 2237218.622565953992307 ], [ 537763.872986954753287, 2237283.54616968985647 ], [ 537871.09642662096303, 2237130.45929102320224 ], [ 537915.408234775299206, 2237012.26451173517853 ], [ 538055.555378909688443, 2237049.530281033366919 ], [ 538098.261653904919513, 2237161.718253718689084 ], [ 538133.727803520741872, 2237207.286787225864828 ], [ 538178.25823008432053, 2237252.865870018489659 ], [ 538240.126276724156924, 2237332.3610760839656 ], [ 538369.514873214298859, 2237402.501567190513015 ], [ 538517.253796452656388, 2237592.322530750185251 ], [ 538733.010459362994879, 2237522.586343955248594 ], [ 538892.628706868854351, 2237447.384125527925789 ], [ 538919.133489439496771, 2237558.558529565110803 ], [ 538946.940855542547069, 2237619.067539247684181 ], [ 538978.53165026253555, 2237751.568277719430625 ], [ 539139.55076542054303, 2237838.852992092259228 ], [ 539291.025653546559624, 2238062.791210083290935 ], [ 539351.863634044420905, 2238070.2720552906394 ], [ 539620.635703253559768, 2238070.054816990159452 ], [ 539577.757078738650307, 2237994.560307589359581 ], [ 539549.91010642866604, 2237901.947605165652931 ], [ 539436.347334235557355, 2237864.808939416892827 ], [ 539395.732198770157993, 2237645.07856406737119 ], [ 539347.996022981475107, 2237559.698743844404817 ], [ 539317.65423931053374, 2237458.790938127785921 ], [ 539263.856778417597525, 2237362.572739424183965 ], [ 539299.333203817717731, 2237185.50670859683305 ], [ 539337.987809643731453, 2237132.972498207353055 ], [ 539378.361973880790174, 2237007.293261900544167 ], [ 539527.933154229773208, 2236896.297325664199889 ], [ 539602.705875433050096, 2236919.889983813278377 ], [ 539617.501186243724078, 2236904.565648819319904 ], [ 539669.495905272196978, 2236864.669340749271214 ], [ 539608.727562158717774, 2236601.63486366532743 ], [ 539578.46804508625064, 2236571.764920852147043 ], [ 539562.315899698878638, 2236387.076449806801975 ], [ 539501.308800548431464, 2236354.842573022469878 ], [ 539538.03037566842977, 2236297.100772179663181 ], [ 539581.74772706697695, 2236212.678321926854551 ], [ 539772.729687299579382, 2236167.274670935235918 ], [ 539705.54975406662561, 2235938.827996500767767 ], [ 539725.930079346639104, 2235795.870909533463418 ], [ 539686.476225465303287, 2235625.08597678039223 ], [ 539555.381719127413817, 2235539.95706135686487 ], [ 539468.544494813890196, 2235494.074169080704451 ], [ 539504.156098948791623, 2235438.001189010217786 ], [ 539625.11479524045717, 2235345.184530307538807 ], [ 539589.043237495934591, 2235280.95904902741313 ], [ 539477.150750552420504, 2235170.494959211908281 ], [ 539541.016415137797594, 2235047.16353720612824 ], [ 539722.851714050048031, 2235003.932975652627647 ], [ 539703.01161637774203, 2234611.72727604303509 ], [ 539681.926633367314935, 2234429.284373747184873 ], [ 539728.744902839884162, 2234393.353881635703146 ], [ 539674.945245302980766, 2234279.615719306282699 ], [ 539777.637659748783335, 2233859.449982621707022 ], [ 539717.457526306970976, 2233705.553832421079278 ], [ 539610.364935039076954, 2233636.009675997309387 ], [ 539533.406804642057978, 2233637.465886881574988 ], [ 539415.580164651735686, 2233575.204463519155979 ], [ 539352.845735640847124, 2233472.687623732723296 ], [ 539426.691938387579285, 2233254.67311585880816 ], [ 539365.525734328664839, 2233193.084225751459599 ], [ 539201.260726558743045, 2233106.281157844699919 ], [ 539150.164052641601302, 2233038.124026565812528 ], [ 539083.613528994959779, 2233002.954957524314523 ], [ 538982.541112498613074, 2232920.490508628077805 ], [ 538653.870911006582901, 2232959.956850809976459 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 57.0, "GRIDCODE": 14.0, "X_COORD": 569265.12046000001, "Y_COORD": 273837.01945999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 534562.915730024804361, 2231918.857636952772737 ], [ 534344.293679780792445, 2232092.965582936070859 ], [ 534292.659512574318796, 2232190.148523721843958 ], [ 534220.546866741031408, 2232247.578154460527003 ], [ 534219.694898456335068, 2232487.158571972511709 ], [ 534204.977577330777422, 2232607.91990995965898 ], [ 534266.794105461100116, 2232710.572182613424957 ], [ 534231.026245222310536, 2233004.058738097548485 ], [ 534166.697631855728105, 2232996.143089816905558 ], [ 534108.805624290253036, 2232996.022614924237132 ], [ 534052.65484678465873, 2233145.780461696907878 ], [ 533929.244446758646518, 2233193.975539091043174 ], [ 533680.748890624963678, 2233477.708115679211915 ], [ 533757.378668811055832, 2233644.513621002435684 ], [ 533575.564885391388088, 2233789.29599239397794 ], [ 533444.496034271316603, 2233920.224024748429656 ], [ 533263.510598243796267, 2233938.714343946427107 ], [ 533232.09000696928706, 2233806.843156108632684 ], [ 532934.262385031906888, 2233806.230509598739445 ], [ 532848.865012783324346, 2233696.471034089103341 ], [ 532638.852433345397003, 2233774.327150546945632 ], [ 532676.598254297627136, 2234207.819640440866351 ], [ 532924.771219152840786, 2234461.911065862514079 ], [ 532953.89761431410443, 2234499.341778841800988 ], [ 532939.925341940368526, 2234613.962685060687363 ], [ 533026.311425989144482, 2234801.99838375300169 ], [ 534272.261017258744687, 2234908.796280183829367 ], [ 534285.321180293685757, 2234925.579131506383419 ], [ 534230.744163552531973, 2235573.173463380895555 ], [ 534093.414195037912577, 2235769.230090253986418 ], [ 534128.818212980637327, 2235846.289149997755885 ], [ 534063.712848073919304, 2236080.976447896100581 ], [ 534062.714315933641046, 2236363.186316316947341 ], [ 534054.017548886942677, 2236434.542763970792294 ], [ 534104.42021236999426, 2236610.782481809146702 ], [ 534054.272246709326282, 2236850.031555566936731 ], [ 533962.284963937825523, 2236998.248311386443675 ], [ 533982.263891490991227, 2237130.107873725704849 ], [ 534015.858230791054666, 2237164.500101783312857 ], [ 534083.090586471371353, 2237341.14824206661433 ], [ 534458.618227912462316, 2237415.97573680896312 ], [ 534503.200556331081316, 2237402.509195731021464 ], [ 534596.513447733363137, 2237380.337795634754002 ], [ 534685.677958929794841, 2237353.404433710500598 ], [ 534866.156124379951507, 2237323.616078710183501 ], [ 535074.170268553774804, 2237209.341984877362847 ], [ 535192.489432841190137, 2237061.166457520797849 ], [ 535189.340166427195072, 2236874.799295522272587 ], [ 535318.462568531278521, 2236775.736137548461556 ], [ 535234.983690454391763, 2236502.594217702746391 ], [ 535161.158068542485125, 2236381.944501493126154 ], [ 535061.938795345486142, 2236094.361315871588886 ], [ 535077.117451401543804, 2235987.942465012893081 ], [ 535075.220416235853918, 2235875.60901515558362 ], [ 535242.78130968788173, 2235872.451544247567654 ], [ 535460.237291800323874, 2235903.830079055391252 ], [ 535549.012559281429276, 2235811.892798868007958 ], [ 535910.869039954501204, 2235864.108050904236734 ], [ 536029.853567782673053, 2235789.540673721581697 ], [ 536066.503157888189889, 2235867.026515328325331 ], [ 536100.657919718767516, 2235959.679337112233043 ], [ 536250.461468047345988, 2236015.687479695305228 ], [ 536268.053564879344776, 2235967.752045150846243 ], [ 536412.100073450361378, 2235988.53696246445179 ], [ 536576.274923514109105, 2235808.063960806466639 ], [ 536694.763638886972331, 2235779.90440815128386 ], [ 536743.98786632635165, 2235610.841502220369875 ], [ 536837.319709192845039, 2235493.944547927007079 ], [ 536900.458167716627941, 2235404.907657106406987 ], [ 536986.674046977772377, 2235372.289999385364354 ], [ 537180.905179406981915, 2235223.260527581907809 ], [ 537157.259359354851767, 2235106.297470006160438 ], [ 537084.420407757977955, 2234952.29911594837904 ], [ 537082.825452777557075, 2234857.963586502708495 ], [ 537089.235588868148625, 2234813.003586169332266 ], [ 537088.72432485409081, 2234782.732245047576725 ], [ 537095.134464549133554, 2234737.772193217650056 ], [ 537093.927424396504648, 2234666.361668676137924 ], [ 537196.092264761216938, 2234602.330303092487156 ], [ 537357.710562999593094, 2234625.647360583767295 ], [ 537492.344187628128566, 2234522.342212093062699 ], [ 537502.859084840631112, 2234448.612395912408829 ], [ 537455.818965370301157, 2234349.1611990891397 ], [ 537536.90818320272956, 2234360.859062599018216 ], [ 537855.240537922130898, 2234322.398559076711535 ], [ 538053.920792982680723, 2234196.206431488506496 ], [ 538132.98691617930308, 2233398.848587 ], [ 538305.273390921181999, 2233220.404887902550399 ], [ 538542.203186591505073, 2233090.211889922618866 ], [ 538590.542851747828536, 2233016.494855013675988 ], [ 538374.479293052107096, 2232961.606639185920358 ], [ 538283.419917039689608, 2232903.913619920611382 ], [ 538160.619084489182569, 2232746.103041699156165 ], [ 538116.092579280608334, 2232700.520746061578393 ], [ 538079.232697636936791, 2232653.152886685915291 ], [ 538103.134014635113999, 2232456.940927812829614 ], [ 538103.292204571538605, 2232411.589946010150015 ], [ 538112.433505686116405, 2232336.557690576650202 ], [ 538112.749929362325929, 2232245.855532196350396 ], [ 538120.061896411003545, 2232185.829516744241118 ], [ 538120.646125758532435, 2232018.737258460372686 ], [ 538284.021272438694723, 2231954.917578934691846 ], [ 538284.208071626140736, 2231901.420894104987383 ], [ 538204.182459918782115, 2231768.545787983573973 ], [ 538179.942988511640579, 2231704.856630511581898 ], [ 538081.655164611525834, 2231558.52883908059448 ], [ 538010.850956274894997, 2231486.04074440523982 ], [ 537946.754402838996612, 2231317.621097675524652 ], [ 537754.100046957028098, 2231317.240998836234212 ], [ 537614.384335264796391, 2231185.78131843637675 ], [ 537495.353261097450741, 2231149.825029967352748 ], [ 537462.303415811387822, 2231062.979071092791855 ], [ 537296.281490583438426, 2230986.220161832869053 ], [ 537156.036708014435135, 2230854.256715930067003 ], [ 536817.672706896904856, 2231016.890433005057275 ], [ 536695.090203954605386, 2231037.797316572628915 ], [ 536621.106363621074706, 2231072.654833142645657 ], [ 536404.834888507379219, 2230965.378672131337225 ], [ 536262.407731414888985, 2231053.253570640459657 ], [ 536199.437864829436876, 2231341.269392409361899 ], [ 535984.474092575605027, 2231361.557446073740721 ], [ 535894.056662281858735, 2231350.434285690076649 ], [ 535776.832642865250818, 2231405.661021173931658 ], [ 535713.814585530431941, 2231430.277216538786888 ], [ 535622.272184004308656, 2231486.753174690529704 ], [ 535348.337329849251546, 2231553.930641409009695 ], [ 535278.220897126127966, 2231623.978644174523652 ], [ 535277.822392524918541, 2231736.608251029625535 ], [ 535274.083495216094889, 2231767.299160045571625 ], [ 535301.962559398380108, 2231827.986533402465284 ], [ 535351.018945845542476, 2231972.975171386264265 ], [ 535126.699175661895424, 2232001.012238948605955 ], [ 534959.184676161734387, 2232050.249035649932921 ], [ 534756.48282868845854, 2232075.586033434607089 ], [ 534635.440637942054309, 2231967.890631061978638 ], [ 534562.915730024804361, 2231918.857636952772737 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 58.0, "GRIDCODE": 13.0, "X_COORD": 575611.42691000004, "Y_COORD": 273023.98356999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 542557.180276138475165, 2230299.712587432004511 ], [ 542467.461222741403617, 2230309.814678138121963 ], [ 542360.441666696569882, 2230364.752694308757782 ], [ 542276.977014600066468, 2230394.351009937003255 ], [ 542084.882957264780998, 2230518.607368050143123 ], [ 542027.902366841677576, 2230759.06393466796726 ], [ 541798.738581082085148, 2230715.639146946370602 ], [ 541688.078210060833953, 2230722.621104316785932 ], [ 541603.908081271336414, 2230665.208818964660168 ], [ 541576.773073974647559, 2230415.10820775013417 ], [ 541491.500815722858533, 2230371.186018702574074 ], [ 541257.599145400570706, 2230456.443655515089631 ], [ 541130.119302171748132, 2230432.284395265392959 ], [ 540969.785504505503923, 2230610.899936470203102 ], [ 540765.217710886383429, 2230737.978415445424616 ], [ 540710.27434225846082, 2230849.706629478372633 ], [ 540714.090133818797767, 2230913.161815801635385 ], [ 540820.787362006725743, 2231082.14354660641402 ], [ 540840.51330299989786, 2231192.167745598591864 ], [ 540774.552492625662126, 2231290.953916334547102 ], [ 540708.674188708886504, 2231441.404111362062395 ], [ 540672.045950644067489, 2231496.262316174805164 ], [ 540637.829926903359592, 2231618.441241106018424 ], [ 540517.587597578647546, 2231682.378941478207707 ], [ 540479.516744295367971, 2231759.794431783258915 ], [ 540376.436226328252815, 2231796.341852384619415 ], [ 540276.884709387202747, 2231653.118435480631888 ], [ 540215.697351456386968, 2231622.414467252790928 ], [ 540139.926634092000313, 2231570.732122922316194 ], [ 540093.568103405297734, 2231504.035632451996207 ], [ 540045.389302514726296, 2231281.454483716748655 ], [ 539901.548328684293665, 2231149.316045513376594 ], [ 539844.523781579686329, 2231128.907738680951297 ], [ 539797.263315037125722, 2231107.925774995237589 ], [ 539738.501403796253726, 2231168.796571248210967 ], [ 539611.46024440752808, 2231216.871568612754345 ], [ 539537.241868141572922, 2231519.161873993463814 ], [ 539377.018639613757841, 2231691.918895916081965 ], [ 539318.553354922449216, 2231653.948636597953737 ], [ 539097.026173487072811, 2231737.28628527186811 ], [ 539038.151438887696713, 2231850.98532281909138 ], [ 538921.759903270634823, 2231895.029435995034873 ], [ 538842.528671990497969, 2232110.973886094987392 ], [ 538775.246730054728687, 2232195.255442712455988 ], [ 538719.645631644758396, 2232302.6306954883039 ], [ 538642.195569845265709, 2232399.649367434903979 ], [ 538691.923810961190611, 2232504.792264589108527 ], [ 538719.974477104144171, 2232601.689749361015856 ], [ 538630.704690291080624, 2232806.740826362743974 ], [ 538653.870911006582901, 2232959.956850809976459 ], [ 538982.541112498613074, 2232920.490508628077805 ], [ 539083.613528994959779, 2233002.954957524314523 ], [ 539150.164052641601302, 2233038.124026565812528 ], [ 539201.260726558743045, 2233106.281157844699919 ], [ 539365.525734328664839, 2233193.084225751459599 ], [ 539426.691938387579285, 2233254.67311585880816 ], [ 539352.845735640847124, 2233472.687623732723296 ], [ 539415.580164651735686, 2233575.204463519155979 ], [ 539533.406804642057978, 2233637.465886881574988 ], [ 539610.364935039076954, 2233636.009675997309387 ], [ 539717.457526306970976, 2233705.553832421079278 ], [ 539777.637659748783335, 2233859.449982621707022 ], [ 539674.945245302980766, 2234279.615719306282699 ], [ 539728.744902839884162, 2234393.353881635703146 ], [ 539681.926633367314935, 2234429.284373747184873 ], [ 539703.01161637774203, 2234611.72727604303509 ], [ 539722.851714050048031, 2235003.932975652627647 ], [ 539541.016415137797594, 2235047.16353720612824 ], [ 539477.150750552420504, 2235170.494959211908281 ], [ 539589.043237495934591, 2235280.95904902741313 ], [ 539625.11479524045717, 2235345.184530307538807 ], [ 539504.156098948791623, 2235438.001189010217786 ], [ 539468.544494813890196, 2235494.074169080704451 ], [ 539555.381719127413817, 2235539.95706135686487 ], [ 539686.476225465303287, 2235625.08597678039223 ], [ 539725.930079346639104, 2235795.870909533463418 ], [ 539705.54975406662561, 2235938.827996500767767 ], [ 539772.729687299579382, 2236167.274670935235918 ], [ 539581.74772706697695, 2236212.678321926854551 ], [ 539538.03037566842977, 2236297.100772179663181 ], [ 539501.308800548431464, 2236354.842573022469878 ], [ 539562.315899698878638, 2236387.076449806801975 ], [ 539578.46804508625064, 2236571.764920852147043 ], [ 539608.727562158717774, 2236601.63486366532743 ], [ 539669.495905272196978, 2236864.669340749271214 ], [ 539617.501186243724078, 2236904.565648819319904 ], [ 539602.705875433050096, 2236919.889983813278377 ], [ 539718.631779172690585, 2236946.272205869667232 ], [ 539977.503791828639805, 2236929.764711345545948 ], [ 540038.190207662992179, 2236898.621838581748307 ], [ 540122.790635303594172, 2237020.313679194077849 ], [ 540242.984414956183173, 2236942.58407617174089 ], [ 540436.280787662602961, 2236979.211845017969608 ], [ 540468.355985227390192, 2236943.512747793458402 ], [ 540490.813080292893574, 2236848.761266653425992 ], [ 540656.334838175913319, 2236790.080823208205402 ], [ 540755.04839877190534, 2236680.214108592830598 ], [ 540888.643773267744109, 2236650.48290709964931 ], [ 541113.49929497228004, 2236636.139546025544405 ], [ 541221.916146480245516, 2236580.497781031765044 ], [ 541286.451391255483031, 2236557.617546205408871 ], [ 541376.477924827369861, 2236499.395694684237242 ], [ 541441.013024674146436, 2236476.515251404605806 ], [ 541499.375501084490679, 2236446.56231945194304 ], [ 541563.910495753865689, 2236423.681714106351137 ], [ 541613.954606824205257, 2236367.981729350052774 ], [ 541655.596470233984292, 2236365.355818547308445 ], [ 541860.820751539664343, 2236404.237841697409749 ], [ 541852.848785229609348, 2236105.682053567841649 ], [ 541825.198563719633967, 2236016.590659618377686 ], [ 541804.552141586667858, 2235921.246133207343519 ], [ 541717.758863169467077, 2235783.819348475895822 ], [ 541740.598602845799178, 2235661.545399847440422 ], [ 541678.931568163447082, 2235538.400759015232325 ], [ 541745.425124099594541, 2235457.131015060469508 ], [ 541866.069015243789181, 2235414.355037688277662 ], [ 542145.660327730467543, 2235215.591377740725875 ], [ 542217.257085830438882, 2235264.416648514568806 ], [ 542352.699011414777488, 2235255.869953915476799 ], [ 542440.012911588652059, 2235272.409990408457816 ], [ 542494.291390723898076, 2235211.995794724673033 ], [ 542632.553001241525635, 2235162.971515884622931 ], [ 542729.039274818380363, 2235055.573971220292151 ], [ 542849.225564813241363, 2234991.664053098298609 ], [ 542889.299659300479107, 2234947.058214705437422 ], [ 542987.818483147653751, 2234896.48850782122463 ], [ 543235.963476012460887, 2234880.823434172198176 ], [ 543366.590666797361337, 2234969.901568165980279 ], [ 543493.953656907426193, 2234961.861269565299153 ], [ 543536.348055941518396, 2235000.796792146749794 ], [ 543617.411829691031016, 2235157.031104509718716 ], [ 543707.333275349694304, 2235135.725677837617695 ], [ 543784.576121473917738, 2235049.743152310140431 ], [ 543967.651409278158098, 2234991.36760894022882 ], [ 544042.68949533184059, 2235005.580745073035359 ], [ 544132.74251951277256, 2234999.896962503902614 ], [ 544244.661080294055864, 2235021.097226537764072 ], [ 544379.171076819533482, 2234857.35711372923106 ], [ 544355.029831368941814, 2234771.134004347026348 ], [ 544297.188390778843313, 2234718.013062734156847 ], [ 544336.818096036324278, 2234630.544453364796937 ], [ 544382.816678131581284, 2234466.26011086627841 ], [ 544466.012062373338267, 2234423.553826899267733 ], [ 544568.163254777435213, 2234400.773627216927707 ], [ 544620.564604168757796, 2234342.440151002258062 ], [ 544714.426944128237665, 2234275.627459204755723 ], [ 544679.06917599029839, 2234144.916371487081051 ], [ 544610.226171185611747, 2234081.691252204589546 ], [ 544668.485693281283602, 2234073.001000366173685 ], [ 544699.294850213453174, 2234078.835738382302225 ], [ 544788.260357914026827, 2234050.466471357271075 ], [ 544942.142763087758794, 2234033.133314773440361 ], [ 545094.167140809237026, 2233948.169519261457026 ], [ 545206.462671778164804, 2233969.439711397513747 ], [ 545228.265993787208572, 2233852.682219239883125 ], [ 545223.632716965745203, 2233775.706399427726865 ], [ 545281.089732457068749, 2233689.646365093067288 ], [ 545235.06445040658582, 2233597.739882944151759 ], [ 545228.494835919467732, 2233489.820473032072186 ], [ 545214.858807512908243, 2233473.550654877908528 ], [ 545186.319097497849725, 2233442.143002020195127 ], [ 545086.427201836719178, 2233195.660220665857196 ], [ 544928.455824450473301, 2233086.925852878019214 ], [ 544799.3499361788854, 2232932.885888960212469 ], [ 544617.536866878857836, 2232983.440557237714529 ], [ 544510.424351552152075, 2233011.36868685670197 ], [ 544454.902954349294305, 2233184.452073966152966 ], [ 544442.974682074622251, 2233467.707787130028009 ], [ 544267.575546010630205, 2233678.211954093538225 ], [ 543604.826592777622864, 2232948.801415867172182 ], [ 543597.477376026567072, 2232544.210839213803411 ], [ 543461.301462560193613, 2232337.008908972144127 ], [ 543401.986641215044074, 2232231.684561915695667 ], [ 543243.70196939969901, 2231990.835624047555029 ], [ 543220.188811498926952, 2231898.046655093319714 ], [ 543167.98209140310064, 2231777.544541760347784 ], [ 543170.031719271559268, 2231728.907456335611641 ], [ 543175.052964161615819, 2231668.143977759405971 ], [ 543010.911241607391275, 2231574.528859920799732 ], [ 542976.567435284610838, 2231489.770271057263017 ], [ 542924.256366786779836, 2231369.024351514875889 ], [ 542904.128954521380365, 2231213.098420019261539 ], [ 542879.340313879423775, 2231121.406410278752446 ], [ 542883.091495928238146, 2231076.008739993907511 ], [ 542888.812439147848636, 2230940.279957453720272 ], [ 542900.001289458479732, 2230804.890903593041003 ], [ 542901.90890627563931, 2230759.647860698401928 ], [ 542904.418724066228606, 2230729.267477888613939 ], [ 542846.0887860491639, 2230695.997226286679506 ], [ 542805.184551370912232, 2230647.183764434419572 ], [ 542735.399099332629703, 2230570.371581331826746 ], [ 542709.085219928761944, 2230505.425024311058223 ], [ 542655.39746448257938, 2230446.329005253501236 ], [ 542571.448707745643333, 2230315.417901985347271 ], [ 542557.180276138475165, 2230299.712587432004511 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 59.0, "GRIDCODE": 9.0, "X_COORD": 570208.78104000003, "Y_COORD": 269945.22074999998 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537726.555656216107309, 2227700.671020585112274 ], [ 537618.96811907493975, 2227738.75806219317019 ], [ 537515.771681546233594, 2227838.212957446463406 ], [ 537352.005868357256986, 2227722.084921160712838 ], [ 537309.443590517621487, 2227721.142910427413881 ], [ 537217.628134139231406, 2227846.94167940504849 ], [ 537024.996567043126561, 2228006.167884480208158 ], [ 536917.48024825239554, 2227995.132061609998345 ], [ 536765.179510319489054, 2228141.903396182693541 ], [ 536642.113340692943893, 2228129.270699496380985 ], [ 536576.319131333730184, 2228159.382640595547855 ], [ 536555.178301998996176, 2228035.400484580546618 ], [ 536466.510540025541559, 2228000.785087953321636 ], [ 536410.035988892544992, 2227965.871791960671544 ], [ 536258.566708859056234, 2227927.342912065796554 ], [ 536184.56900293554645, 2227998.652519416064024 ], [ 536097.074707424850203, 2228189.508139445446432 ], [ 536051.965141034102999, 2228184.877166664227843 ], [ 536006.652656785561703, 2228183.873550747521222 ], [ 535979.922246477683075, 2228150.769105445593596 ], [ 535945.389538067742251, 2228119.526356130838394 ], [ 535798.871919128810987, 2228186.578177268616855 ], [ 535628.613650393672287, 2228255.203060638159513 ], [ 535472.350088984356262, 2228239.158726441673934 ], [ 535425.997062150971033, 2228392.43318079598248 ], [ 535331.964301669038832, 2228470.152867559343576 ], [ 535263.629686506348662, 2228648.592603551223874 ], [ 535131.391017011948861, 2228793.463488592766225 ], [ 535080.989415339194238, 2229046.373668560758233 ], [ 534933.874385916744359, 2229083.574954361654818 ], [ 534903.272477912716568, 2229113.061472604051232 ], [ 534870.54541183274705, 2229140.111888129264116 ], [ 534836.178108535008505, 2229229.847999181598425 ], [ 534624.759550911490805, 2229245.759342675097287 ], [ 534539.454610187443905, 2229284.793256346136332 ], [ 534335.802046893164515, 2229408.467439246363938 ], [ 534165.604378379532136, 2229335.906680139712989 ], [ 534073.109782474348322, 2229333.853722291998565 ], [ 533950.705185858649202, 2229451.801305909641087 ], [ 533881.592005402198993, 2229632.263227994553745 ], [ 533811.448983317823149, 2229748.126744085922837 ], [ 533722.21367396635469, 2229821.873983119614422 ], [ 533683.403254759148695, 2229974.513914969749749 ], [ 533615.757327457075007, 2230061.719173917546868 ], [ 533662.76084910472855, 2230304.734734107740223 ], [ 533667.666881378274411, 2230777.359052655287087 ], [ 533742.347208761493675, 2230944.770048807375133 ], [ 533775.427434061421081, 2231029.01449366286397 ], [ 533883.392379311844707, 2231089.07441951520741 ], [ 534024.81046483386308, 2231176.503235298208892 ], [ 534085.994030199246481, 2231177.862785374745727 ], [ 534115.702352925785817, 2231180.910969107411802 ], [ 534160.48846466303803, 2231181.905263260938227 ], [ 534249.190351159311831, 2231191.015882982872427 ], [ 534274.001662127557211, 2231535.555929821915925 ], [ 534499.415055820485577, 2231747.998129484243691 ], [ 534530.340643559349701, 2231786.294806508347392 ], [ 534562.915730024804361, 2231918.857636952772737 ], [ 534635.440637942054309, 2231967.890631061978638 ], [ 534756.48282868845854, 2232075.586033434607089 ], [ 534959.184676161734387, 2232050.249035649932921 ], [ 535126.699175661895424, 2232001.012238948605955 ], [ 535351.018945845542476, 2231972.975171386264265 ], [ 535301.962559398380108, 2231827.986533402465284 ], [ 535274.083495216094889, 2231767.299160045571625 ], [ 535277.822392524918541, 2231736.608251029625535 ], [ 535278.220897126127966, 2231623.978644174523652 ], [ 535348.337329849251546, 2231553.930641409009695 ], [ 535622.272184004308656, 2231486.753174690529704 ], [ 535713.814585530431941, 2231430.277216538786888 ], [ 535776.832642865250818, 2231405.661021173931658 ], [ 535894.056662281858735, 2231350.434285690076649 ], [ 535984.474092575605027, 2231361.557446073740721 ], [ 536199.437864829436876, 2231341.269392409361899 ], [ 536262.407731414888985, 2231053.253570640459657 ], [ 536404.834888507379219, 2230965.378672131337225 ], [ 536621.106363621074706, 2231072.654833142645657 ], [ 536695.090203954605386, 2231037.797316572628915 ], [ 536817.672706896904856, 2231016.890433005057275 ], [ 537156.036708014435135, 2230854.256715930067003 ], [ 537296.281490583438426, 2230986.220161832869053 ], [ 537462.303415811387822, 2231062.979071092791855 ], [ 537495.353261097450741, 2231149.825029967352748 ], [ 537614.384335264796391, 2231185.78131843637675 ], [ 537754.100046957028098, 2231317.240998836234212 ], [ 537946.754402838996612, 2231317.621097675524652 ], [ 538010.850956274894997, 2231486.04074440523982 ], [ 538081.655164611525834, 2231558.52883908059448 ], [ 538179.942988511640579, 2231704.856630511581898 ], [ 538204.182459918782115, 2231768.545787983573973 ], [ 538284.208071626140736, 2231901.420894104987383 ], [ 538284.021272438694723, 2231954.917578934691846 ], [ 538120.646125758532435, 2232018.737258460372686 ], [ 538120.061896411003545, 2232185.829516744241118 ], [ 538112.749929362325929, 2232245.855532196350396 ], [ 538112.433505686116405, 2232336.557690576650202 ], [ 538103.292204571538605, 2232411.589946010150015 ], [ 538103.134014635113999, 2232456.940927812829614 ], [ 538079.232697636936791, 2232653.152886685915291 ], [ 538116.092579280608334, 2232700.520746061578393 ], [ 538160.619084489182569, 2232746.103041699156165 ], [ 538283.419917039689608, 2232903.913619920611382 ], [ 538374.479293052107096, 2232961.606639185920358 ], [ 538590.542851747828536, 2233016.494855013675988 ], [ 538613.0512630562298, 2232977.733283103443682 ], [ 538653.870911006582901, 2232959.956850809976459 ], [ 538630.704690291080624, 2232806.740826362743974 ], [ 538719.974477104144171, 2232601.689749361015856 ], [ 538691.923810961190611, 2232504.792264589108527 ], [ 538642.195569845265709, 2232399.649367434903979 ], [ 538719.645631644758396, 2232302.6306954883039 ], [ 538775.246730054728687, 2232195.255442712455988 ], [ 538842.528671990497969, 2232110.973886094987392 ], [ 538921.759903270634823, 2231895.029435995034873 ], [ 539038.151438887696713, 2231850.98532281909138 ], [ 539097.026173487072811, 2231737.28628527186811 ], [ 539318.553354922449216, 2231653.948636597953737 ], [ 539377.018639613757841, 2231691.918895916081965 ], [ 539537.241868141572922, 2231519.161873993463814 ], [ 539611.46024440752808, 2231216.871568612754345 ], [ 539738.501403796253726, 2231168.796571248210967 ], [ 539797.263315037125722, 2231107.925774995237589 ], [ 539844.523781579686329, 2231128.907738680951297 ], [ 539835.510099722770974, 2231051.618069714866579 ], [ 539790.12398426013533, 2231006.805672946386039 ], [ 539751.803309921408072, 2230955.684804189018905 ], [ 539632.199579698266461, 2230920.251203346997499 ], [ 539609.926371628069319, 2230665.457810338586569 ], [ 539559.882187110953964, 2230529.693685236386955 ], [ 539479.830742788617499, 2230487.38903477601707 ], [ 539458.043912641587667, 2230393.056765520945191 ], [ 539401.76684307528194, 2230301.081147235818207 ], [ 539379.980256323353387, 2230206.748577792197466 ], [ 539296.570175102329813, 2230124.390926878899336 ], [ 539272.135077302576974, 2230018.585787148214877 ], [ 539205.587961234268732, 2229983.415177353657782 ], [ 539158.648654366494156, 2229920.796075575053692 ], [ 539068.829124027863145, 2229887.214637711644173 ], [ 539012.056396562955342, 2229850.341253711842 ], [ 538969.255528373178095, 2229894.678248474374413 ], [ 538873.443284132285044, 2229800.070112113840878 ], [ 538871.605675958213396, 2229691.518012905493379 ], [ 538910.056173602701165, 2229631.04719319101423 ], [ 538801.435672252788208, 2229523.790934132412076 ], [ 538769.317655792809092, 2229414.534389575943351 ], [ 538775.830138341058046, 2229368.857100557535887 ], [ 538774.807631624280475, 2229308.309526672586799 ], [ 538797.868531669490039, 2229146.555900578387082 ], [ 538728.685175830265507, 2229109.990679627284408 ], [ 538699.888838516082615, 2229031.85787667054683 ], [ 538592.387096984428354, 2228925.70342799089849 ], [ 538567.953827000805177, 2228819.899702623486519 ], [ 538485.160600360133685, 2228738.142056772485375 ], [ 538403.550705486210063, 2228471.072236214764416 ], [ 538328.974041798501275, 2228397.426723907701671 ], [ 538403.183337787631899, 2228226.957687838003039 ], [ 538376.91219306923449, 2228001.596388923935592 ], [ 538291.52323302696459, 2227989.275769106112421 ], [ 538220.004670427064411, 2227990.625382890924811 ], [ 538102.023975313873962, 2227770.545726893469691 ], [ 538033.516900701215491, 2227794.269962741062045 ], [ 537901.864410230424255, 2227876.79868221282959 ], [ 537821.145861545810476, 2227843.780659664422274 ], [ 537797.481723975972272, 2227779.569432134740055 ], [ 537752.099606162286364, 2227734.753026659600437 ], [ 537726.555656216107309, 2227700.671020585112274 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 60.0, "GRIDCODE": 8.0, "X_COORD": 573517.44559000002, "Y_COORD": 268422.91668000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537729.411999570205808, 2226218.937439586035907 ], [ 537735.96552603575401, 2226326.869961812160909 ], [ 537767.366067515104078, 2226355.724408436566591 ], [ 537790.350752738886513, 2226509.535625834017992 ], [ 537725.459565899218433, 2226555.7244863063097 ], [ 537684.447661681682803, 2226639.118838174268603 ], [ 537692.676367351203226, 2226776.150382621213794 ], [ 537664.746098950738087, 2226925.626391503959894 ], [ 537672.674522206420079, 2227057.680582785047591 ], [ 537769.505440235487185, 2227251.139419908635318 ], [ 537789.539706970565021, 2227499.388150370679796 ], [ 537746.488771205767989, 2227594.390471597202122 ], [ 537726.555656216107309, 2227700.671020585112274 ], [ 537752.099606162286364, 2227734.753026659600437 ], [ 537797.481723975972272, 2227779.569432134740055 ], [ 537821.145861545810476, 2227843.780659664422274 ], [ 537901.864410230424255, 2227876.79868221282959 ], [ 538033.516900701215491, 2227794.269962741062045 ], [ 538102.023975313873962, 2227770.545726893469691 ], [ 538220.004670427064411, 2227990.625382890924811 ], [ 538291.52323302696459, 2227989.275769106112421 ], [ 538376.91219306923449, 2228001.596388923935592 ], [ 538403.183337787631899, 2228226.957687838003039 ], [ 538328.974041798501275, 2228397.426723907701671 ], [ 538403.550705486210063, 2228471.072236214764416 ], [ 538485.160600360133685, 2228738.142056772485375 ], [ 538567.953827000805177, 2228819.899702623486519 ], [ 538592.387096984428354, 2228925.70342799089849 ], [ 538699.888838516082615, 2229031.85787667054683 ], [ 538728.685175830265507, 2229109.990679627284408 ], [ 538797.868531669490039, 2229146.555900578387082 ], [ 538774.807631624280475, 2229308.309526672586799 ], [ 538775.830138341058046, 2229368.857100557535887 ], [ 538769.317655792809092, 2229414.534389575943351 ], [ 538801.435672252788208, 2229523.790934132412076 ], [ 538910.056173602701165, 2229631.04719319101423 ], [ 538871.605675958213396, 2229691.518012905493379 ], [ 538873.443284132285044, 2229800.070112113840878 ], [ 538969.255528373178095, 2229894.678248474374413 ], [ 539012.056396562955342, 2229850.341253711842 ], [ 539068.829124027863145, 2229887.214637711644173 ], [ 539158.648654366494156, 2229920.796075575053692 ], [ 539205.587961234268732, 2229983.415177353657782 ], [ 539272.135077302576974, 2230018.585787148214877 ], [ 539296.570175102329813, 2230124.390926878899336 ], [ 539379.980256323353387, 2230206.748577792197466 ], [ 539401.76684307528194, 2230301.081147235818207 ], [ 539458.043912641587667, 2230393.056765520945191 ], [ 539479.830742788617499, 2230487.38903477601707 ], [ 539559.882187110953964, 2230529.693685236386955 ], [ 539609.926371628069319, 2230665.457810338586569 ], [ 539632.199579698266461, 2230920.251203346997499 ], [ 539751.803309921408072, 2230955.684804189018905 ], [ 539790.12398426013533, 2231006.805672946386039 ], [ 539835.510099722770974, 2231051.618069714866579 ], [ 539844.523781579686329, 2231128.907738680951297 ], [ 539901.548328684293665, 2231149.316045513376594 ], [ 540045.389302514726296, 2231281.454483716748655 ], [ 540093.568103405297734, 2231504.035632451996207 ], [ 540139.926634092000313, 2231570.732122922316194 ], [ 540215.697351456386968, 2231622.414467252790928 ], [ 540276.884709387202747, 2231653.118435480631888 ], [ 540376.436226328252815, 2231796.341852384619415 ], [ 540479.516744295367971, 2231759.794431783258915 ], [ 540517.587597578647546, 2231682.378941478207707 ], [ 540637.829926903359592, 2231618.441241106018424 ], [ 540672.045950644067489, 2231496.262316174805164 ], [ 540708.674188708886504, 2231441.404111362062395 ], [ 540774.552492625662126, 2231290.953916334547102 ], [ 540840.51330299989786, 2231192.167745598591864 ], [ 540820.787362006725743, 2231082.14354660641402 ], [ 540714.090133818797767, 2230913.161815801635385 ], [ 540710.27434225846082, 2230849.706629478372633 ], [ 540765.217710886383429, 2230737.978415445424616 ], [ 540969.785504505503923, 2230610.899936470203102 ], [ 541130.119302171748132, 2230432.284395265392959 ], [ 541257.599145400570706, 2230456.443655515089631 ], [ 541491.500815722858533, 2230371.186018702574074 ], [ 541576.773073974647559, 2230415.10820775013417 ], [ 541603.908081271336414, 2230665.208818964660168 ], [ 541688.078210060833953, 2230722.621104316785932 ], [ 541798.738581082085148, 2230715.639146946370602 ], [ 542027.902366841677576, 2230759.06393466796726 ], [ 542084.882957264780998, 2230518.607368050143123 ], [ 542276.977014600066468, 2230394.351009937003255 ], [ 542360.441666696569882, 2230364.752694308757782 ], [ 542467.461222741403617, 2230309.814678138121963 ], [ 542557.180276138475165, 2230299.712587432004511 ], [ 542530.912899185204878, 2230006.196924647316337 ], [ 542473.662380572524853, 2229947.59112570155412 ], [ 542447.541092923958786, 2229914.026918979361653 ], [ 542400.313091789023019, 2229865.6793427253142 ], [ 542504.892182382871397, 2229586.634238735772669 ], [ 542585.460161543218419, 2229620.188444535247982 ], [ 542634.921608161181211, 2229683.747768880799413 ], [ 542684.73656736232806, 2229550.378058049827814 ], [ 542654.517043858766556, 2229444.731097226031125 ], [ 542628.554123841575347, 2229158.809527760371566 ], [ 542574.564226448535919, 2229089.426864958368242 ], [ 542530.03831631783396, 2229043.845710678957403 ], [ 542518.951561625581235, 2228769.280110228806734 ], [ 542463.162545493803918, 2228676.649344054982066 ], [ 542473.027603698545136, 2228595.618051938712597 ], [ 542414.860559201915748, 2228520.869193463586271 ], [ 542369.72119885450229, 2228474.658643813803792 ], [ 542298.731362975086085, 2228320.154272440820932 ], [ 542258.76120907405857, 2228119.402268086560071 ], [ 542271.686228498350829, 2228013.254038805142045 ], [ 542242.101133386953734, 2227935.519781890325248 ], [ 542214.218887155526318, 2227874.832585250027478 ], [ 542224.345649769762531, 2227791.660650853998959 ], [ 542139.8928483792115, 2227656.97950151655823 ], [ 542083.384590829024091, 2227599.125951037742198 ], [ 542071.128381742048077, 2227547.701986895874143 ], [ 542056.000794879975729, 2227532.765621748752892 ], [ 542030.453435313538648, 2227498.681811962276697 ], [ 541851.294043327914551, 2227459.545921950601041 ], [ 541779.61652642278932, 2227363.919377718120813 ], [ 541604.368991034454666, 2227320.17496451549232 ], [ 541447.995393941528164, 2227250.746775949373841 ], [ 541328.398339004837908, 2227215.314741682261229 ], [ 541310.733675531111658, 2227013.225356080569327 ], [ 541207.043251498020254, 2226793.96523635648191 ], [ 541071.193466040189378, 2226571.920321219600737 ], [ 540894.912517810822465, 2226478.752991907298565 ], [ 540805.853049777331762, 2226420.905406867153943 ], [ 540455.965821226593107, 2226344.462081084959209 ], [ 540372.739507781341672, 2226276.543618882074952 ], [ 539826.064198141801171, 2226214.52462413161993 ], [ 539736.576988935819827, 2226307.230034148320556 ], [ 539738.493688754038885, 2226420.536448648199439 ], [ 539404.811782892677002, 2226430.719194167293608 ], [ 539293.121732833678834, 2226330.311156437732279 ], [ 539124.707760570570827, 2226253.328602227382362 ], [ 539024.957661959691904, 2226315.866790450178087 ], [ 538961.441819831845351, 2226339.903311721980572 ], [ 538859.422622623387724, 2226389.38960087671876 ], [ 538880.12568451592233, 2226244.187551032751799 ], [ 538819.92420475569088, 2226212.370048435404897 ], [ 538790.474537542671897, 2226173.075352751649916 ], [ 538802.302183088730089, 2226090.118186262436211 ], [ 538735.837896669399925, 2226025.669772934168577 ], [ 538631.83195376151707, 2226133.418372195214033 ], [ 538404.507382560172118, 2226154.005749827250838 ], [ 537974.141142980894074, 2226024.115553298965096 ], [ 537837.502914172713645, 2226181.430971569381654 ], [ 537729.411999570205808, 2226218.937439586035907 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 61.0, "GRIDCODE": 11.0, "X_COORD": 588323.63028000004, "Y_COORD": 270147.02678000001 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 554741.695682908641174, 2226671.089851801283658 ], [ 554703.906955645303242, 2226863.86872464325279 ], [ 554533.226358841639012, 2227060.157594867050648 ], [ 554456.596329910098575, 2227264.748226322233677 ], [ 554404.359448090312071, 2227348.999391880817711 ], [ 554530.056034750887193, 2227525.284725526347756 ], [ 554515.358263394213282, 2227646.165053612552583 ], [ 554346.450751020922326, 2227625.437162731774151 ], [ 554157.506896953214891, 2227681.05052066128701 ], [ 553984.879977899370715, 2227659.862101780250669 ], [ 553756.212866384652443, 2227686.494623525068164 ], [ 553665.660135100944899, 2227777.026334319263697 ], [ 553665.240115397959016, 2227904.779117175377905 ], [ 553659.767497007502243, 2227949.802698175422847 ], [ 553659.616999699850567, 2227995.156181044876575 ], [ 553630.870572523679584, 2228231.598520500585437 ], [ 553199.202095923945308, 2228162.272151788696647 ], [ 553165.470940370578319, 2228162.21487779263407 ], [ 553099.143161628511734, 2228339.279922921210527 ], [ 553000.633302660658956, 2228452.562580133788288 ], [ 553000.151925412123092, 2228599.115425067953765 ], [ 552959.058153679245152, 2228631.866585206240416 ], [ 552987.410859871539287, 2228693.553995616734028 ], [ 553011.462843060144223, 2228760.489915781654418 ], [ 552885.239359330618754, 2228809.839030456729233 ], [ 552884.574329050607048, 2229011.890058930963278 ], [ 552810.588973759673536, 2229105.971160756424069 ], [ 552698.307928529917262, 2229262.132291542366147 ], [ 552523.564714748761617, 2229463.063353062607348 ], [ 552605.454279494122602, 2229546.871025545522571 ], [ 552642.322577574639581, 2229594.230980127118528 ], [ 552618.403896776842885, 2229790.932149197906256 ], [ 552648.225661813747138, 2229993.700400051660836 ], [ 552862.598946976242587, 2230058.393137466162443 ], [ 553025.227231328724883, 2230267.30484957434237 ], [ 553168.577096618595533, 2230310.560017885640264 ], [ 552958.864722885540687, 2230566.735315744765103 ], [ 552921.278082734672353, 2230717.306497406214476 ], [ 552878.741723704733886, 2230845.251772405579686 ], [ 552878.478163763997145, 2230926.030774811282754 ], [ 552839.426400533528067, 2231043.486421020701528 ], [ 552839.210525968926959, 2231109.598264444619417 ], [ 552952.832070756121539, 2231171.172863267362118 ], [ 553009.299902306287549, 2231274.723213153891265 ], [ 552998.656616975320503, 2231362.259525901637971 ], [ 552935.355228162137792, 2231412.70641191676259 ], [ 553021.578106333618052, 2231541.010115009732544 ], [ 552943.327189990435727, 2231667.19749008025974 ], [ 552864.842030814499594, 2232104.862812278792262 ], [ 552759.229153230437078, 2232239.149590444751084 ], [ 552632.599536482011899, 2232288.651982614770532 ], [ 552727.714156979694963, 2232495.552676902152598 ], [ 552708.480405401205644, 2232653.75779609195888 ], [ 552708.053260279819369, 2232783.394513529725373 ], [ 552623.162930398946628, 2232891.327280045486987 ], [ 552888.699388976208866, 2233163.035589034669101 ], [ 552948.095214181928895, 2233271.946816588751972 ], [ 552928.634818539139815, 2233431.989093476906419 ], [ 553122.152846253477037, 2233490.377819830551744 ], [ 553161.794746742816642, 2233656.534193673171103 ], [ 553119.456161358975805, 2233724.805176412686706 ], [ 553119.085683811455965, 2233838.474591632373631 ], [ 553197.373249982949346, 2233968.392384166829288 ], [ 553229.549079083604738, 2234162.82134111225605 ], [ 553319.221086875535548, 2234357.860396799631417 ], [ 553352.281693313154392, 2234496.420192507095635 ], [ 553521.38034126709681, 2234764.971534701064229 ], [ 553465.214378392905928, 2234896.708359388634562 ], [ 553465.030226626317017, 2234953.475659694522619 ], [ 553455.051747515215538, 2235035.566833632998168 ], [ 553491.864560946589336, 2235164.162401017732918 ], [ 553541.575875218375586, 2235272.27715877443552 ], [ 553576.624040309572592, 2235308.135358022525907 ], [ 553618.898495965753682, 2235327.273487715050578 ], [ 553821.528208146919496, 2235370.763194339349866 ], [ 553880.515835462487303, 2235491.880367568694055 ], [ 553977.742302233469673, 2235764.114614466205239 ], [ 554150.789724714355543, 2235887.577306723222136 ], [ 554175.238823258550838, 2235996.752909852191806 ], [ 554330.274862921913154, 2236041.75363696180284 ], [ 554303.417411190108396, 2236205.546290975995362 ], [ 554367.042935777688399, 2236489.647213607095182 ], [ 554417.956688542035408, 2236465.361630285158753 ], [ 554484.624365113675594, 2236369.912130898796022 ], [ 554659.891034009633586, 2236399.023203354328871 ], [ 554808.596177213126794, 2236392.946751029230654 ], [ 554878.253809366375208, 2236489.37082242500037 ], [ 555038.391741739585996, 2236515.967264997772872 ], [ 554936.146565924980678, 2236306.044611012563109 ], [ 554997.895483701722696, 2235991.776258185505867 ], [ 555130.369968898128718, 2235893.813140634447336 ], [ 555203.05546379450243, 2235815.725391376763582 ], [ 555238.41953337402083, 2235789.57503960095346 ], [ 555207.461356607498601, 2235726.014611748047173 ], [ 555315.09859229659196, 2235667.794509916566312 ], [ 555401.315202004043385, 2235575.174285115674138 ], [ 555471.555846233619377, 2235606.968966245651245 ], [ 555457.332007463672198, 2235507.414934852160513 ], [ 555515.587959963944741, 2235451.247955350205302 ], [ 555826.77376772928983, 2235432.996643327176571 ], [ 556055.248316330020316, 2235412.880785420536995 ], [ 556184.752823195187375, 2235426.123685621656477 ], [ 556190.874418963096105, 2235365.863750155083835 ], [ 556162.411778490524739, 2235302.133247021585703 ], [ 556200.457661675754935, 2235211.042694318108261 ], [ 556202.170895700226538, 2235136.272556762211025 ], [ 556358.247932118480094, 2235041.420871284790337 ], [ 556542.041716266423464, 2234967.272548774257302 ], [ 556551.291258245357312, 2234876.23649382404983 ], [ 556497.829843565472402, 2234756.523148712702096 ], [ 556618.174377318588085, 2234726.043885093182325 ], [ 556710.206167804077268, 2234670.113546788692474 ], [ 556863.541146575240418, 2234608.252276010811329 ], [ 556839.729942480218597, 2234526.5820567375049 ], [ 556677.269141561468132, 2234573.087446848861873 ], [ 556569.31023808917962, 2234410.702054074965417 ], [ 556529.735382769373246, 2234206.509433850646019 ], [ 556508.647175693069585, 2234083.096429630182683 ], [ 556368.830362491309643, 2233934.771413004957139 ], [ 556370.383381309220567, 2233866.98489201720804 ], [ 556443.204159126384184, 2233643.933722564950585 ], [ 556456.792431406211108, 2233510.171908131800592 ], [ 556426.963209894951433, 2233473.257280840538442 ], [ 556397.847145514329895, 2233442.366697038523853 ], [ 556278.425602461327799, 2233294.579333286732435 ], [ 556066.106264541274868, 2233229.301098451018333 ], [ 555941.143992832396179, 2233159.853609905578196 ], [ 556004.492974661756307, 2233055.133968573063612 ], [ 556115.003643927280791, 2232813.890898501500487 ], [ 556233.255732592311688, 2232766.184056500904262 ], [ 555943.025262322160415, 2232664.599432040005922 ], [ 555898.159866478759795, 2232564.121335593052208 ], [ 555867.01415878883563, 2232346.110560403205454 ], [ 555889.299902696977369, 2232126.779614461585879 ], [ 555768.128825803403743, 2232059.4366520550102 ], [ 555769.567250343272462, 2231996.738847896456718 ], [ 555774.199622913263738, 2231951.171269135549664 ], [ 555728.668721406953409, 2231849.203593962825835 ], [ 555734.018956797430292, 2231616.00164932757616 ], [ 555797.100251784897409, 2231563.829154770821333 ], [ 555768.57049195014406, 2231328.424173030070961 ], [ 555668.329769828240387, 2231249.009814134798944 ], [ 555529.852294620010071, 2231145.786497131921351 ], [ 555536.925456657540053, 2230837.475231835618615 ], [ 555596.770096414256841, 2230458.325279396958649 ], [ 555648.796064984984696, 2230212.365378431044519 ], [ 555383.869196550454944, 2230130.897141045890749 ], [ 555334.994367780047469, 2229878.636758835986257 ], [ 555381.189908119384199, 2229598.226032985374331 ], [ 555419.527629307005554, 2229480.788820956833661 ], [ 555459.963381569483317, 2229346.924790964461863 ], [ 555680.400282905320637, 2229164.604752782732248 ], [ 555623.271391924936324, 2228959.347463392652571 ], [ 555680.758279430796392, 2228876.452439319342375 ], [ 555675.186735058552586, 2228739.171976140700281 ], [ 555642.884367917431518, 2228668.898611254058778 ], [ 555599.139047875534743, 2228485.522025333717465 ], [ 555455.67504149582237, 2228423.156936078332365 ], [ 555288.300313655170612, 2228372.651286034844816 ], [ 555198.636556253419258, 2228125.730653668753803 ], [ 555222.488888117717579, 2227929.51490459498018 ], [ 555186.772843671962619, 2227892.962245892733335 ], [ 555354.52831972471904, 2227827.364743863232434 ], [ 555422.808995596482418, 2227772.939154150895774 ], [ 555533.048013937543146, 2227632.746391636319458 ], [ 555478.829231455689296, 2227472.163453225046396 ], [ 555346.850878581171855, 2227375.197812995873392 ], [ 555250.415731547749601, 2227121.947133041918278 ], [ 555146.005215365672484, 2227038.003635292872787 ], [ 554859.259942715289071, 2227037.525666103698313 ], [ 554756.537367540528066, 2226686.28179799951613 ], [ 554741.695682908641174, 2226671.089851801283658 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 62.0, "GRIDCODE": 12.0, "X_COORD": 583935.11954, "Y_COORD": 270538.55205 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 553357.25037702685222, 2225859.444624369032681 ], [ 553150.504566953284666, 2226074.738491170108318 ], [ 553105.10227514943108, 2226068.201932072639465 ], [ 553046.797942878562026, 2226069.319391353055835 ], [ 552937.304647786775604, 2226122.461506880819798 ], [ 552873.400688156601973, 2226080.975838816724718 ], [ 552790.313590427627787, 2226082.571886162273586 ], [ 552673.847970905946568, 2226065.795069116167724 ], [ 552638.779258143273182, 2226133.564075421541929 ], [ 552561.494099991629, 2226162.838506065309048 ], [ 552477.854788514901884, 2226249.524021917954087 ], [ 552479.905656595015898, 2226369.425888990052044 ], [ 552360.973275930155069, 2226460.7518699336797 ], [ 552316.604003488551825, 2226506.738233601674438 ], [ 552269.957260549883358, 2226517.844156508333981 ], [ 552255.168841578764841, 2226533.170539187267423 ], [ 552169.141205483581871, 2226565.756247350946069 ], [ 552240.75832069281023, 2226773.249971984885633 ], [ 552204.558825282147154, 2226830.212449218146503 ], [ 552173.106695368885994, 2226890.9911919971928 ], [ 552018.377022318542004, 2226939.634561671875417 ], [ 551803.14094777952414, 2227074.638748820871115 ], [ 551712.860160119365901, 2227168.204971881583333 ], [ 551638.71286984172184, 2227311.4835314033553 ], [ 551533.246056932490319, 2227369.475514985620975 ], [ 551436.305513629922643, 2227355.513711498118937 ], [ 551254.07186223345343, 2227223.973940956406295 ], [ 551223.662958955159411, 2227255.493525301106274 ], [ 551189.929149706265889, 2227281.391097070649266 ], [ 551158.475502801244147, 2227342.176263080909848 ], [ 551035.400326736038551, 2227362.530906566418707 ], [ 550944.385587074211799, 2227419.620570560917258 ], [ 550849.214944769162685, 2227471.948347449302673 ], [ 550810.414684821967967, 2227512.161406110972166 ], [ 550813.843686209060252, 2227712.817254655063152 ], [ 550792.917985211359337, 2227859.765048746019602 ], [ 550838.209491305518895, 2227955.497842974029481 ], [ 550749.133304764982313, 2228218.649191524833441 ], [ 550252.487387536093593, 2228229.765801161527634 ], [ 550176.290112045127898, 2228308.730566113255918 ], [ 549968.872883814503439, 2228327.647509377449751 ], [ 549892.931082946946844, 2228316.706774956546724 ], [ 549708.450544446823187, 2228406.231183511205018 ], [ 549650.216200364753604, 2228518.751990703865886 ], [ 549513.193323502200656, 2228712.736897708848119 ], [ 549514.377465727622621, 2228782.090981423854828 ], [ 549463.430973994894885, 2228899.175800420343876 ], [ 549506.502191636362113, 2229045.611254549585283 ], [ 549638.457301561371423, 2229115.32146929204464 ], [ 549674.101161519996822, 2229162.855335619300604 ], [ 549659.925191811984405, 2229262.386804578825831 ], [ 549680.066856491495855, 2229620.102958046831191 ], [ 549658.495060140150599, 2229771.591221522539854 ], [ 549593.497996994177811, 2229873.848388915881515 ], [ 549523.920171199250035, 2230029.208199130371213 ], [ 549454.152386942063458, 2230082.772656487300992 ], [ 549225.534880892955698, 2230032.214134654961526 ], [ 549180.290079387603328, 2230045.895986098796129 ], [ 549159.822504834970459, 2230119.748512900434434 ], [ 549159.228849915671162, 2230297.813589683733881 ], [ 548961.270961904316209, 2230455.55805990472436 ], [ 548911.240221953950822, 2230734.469691190868616 ], [ 548609.838707429706119, 2230632.383611007593572 ], [ 548498.378227045177482, 2230684.930879915133119 ], [ 548463.546849862090312, 2230680.653298215009272 ], [ 548463.091231989790685, 2230817.222009541466832 ], [ 548602.675857254187576, 2230960.080783826299012 ], [ 548654.928379436722025, 2231027.205803139135242 ], [ 548714.489610841381364, 2231059.490031749941409 ], [ 548708.916873559821397, 2231105.309891421347857 ], [ 548708.464919627876952, 2231240.600639210082591 ], [ 548556.106064320192672, 2231362.002063626423478 ], [ 548449.809789551072754, 2231276.54230659455061 ], [ 548154.342347704572603, 2231276.014164910651743 ], [ 548096.127058344893157, 2231385.643407694995403 ], [ 547995.830446506617591, 2231528.921053933911026 ], [ 547958.250719345640391, 2231599.689976375550032 ], [ 547867.31796430668328, 2231672.144432262517512 ], [ 547833.765721912495792, 2231705.676421856507659 ], [ 547833.497269161045551, 2231785.738572238944471 ], [ 547788.962903751642443, 2231946.408808954060078 ], [ 547788.730232992325909, 2232015.878448536619544 ], [ 547769.709648270043544, 2232172.225960269570351 ], [ 547833.034778497065417, 2232277.332514733076096 ], [ 547825.129744270816445, 2232342.305473719723523 ], [ 547441.771236800821498, 2232280.705551527440548 ], [ 547411.679637525696307, 2232280.649488271214068 ], [ 547299.29070623696316, 2232266.845023235306144 ], [ 547174.000997778843157, 2232344.17797426879406 ], [ 547124.914484203443862, 2232568.86463672015816 ], [ 546991.687942362739705, 2232552.499460001476109 ], [ 546916.731198852416128, 2232560.225394323468208 ], [ 546969.389299525297247, 2232674.795505050569773 ], [ 546992.456645987229422, 2232757.487038129009306 ], [ 546768.530167516553774, 2233000.922573399730027 ], [ 546674.576010173535906, 2233075.777542542666197 ], [ 546637.668891947716475, 2233200.21065073646605 ], [ 546592.681638774345629, 2233272.739223683252931 ], [ 546484.256407129811123, 2233185.569755328819156 ], [ 546326.16115538449958, 2233185.281286756508052 ], [ 546244.855394503101707, 2233266.531919064931571 ], [ 546188.716579898144118, 2233311.257969031110406 ], [ 546149.579678727313876, 2233356.076588662341237 ], [ 546220.637897978420369, 2233428.79562596604228 ], [ 546246.762515429989435, 2233462.359789432957768 ], [ 546277.022499406361021, 2233492.231018259190023 ], [ 546315.349607669981197, 2233543.345076591707766 ], [ 546397.758159179589711, 2233624.686602258123457 ], [ 546510.655063270474784, 2233684.326335243880749 ], [ 546665.679693766636774, 2233681.370686760172248 ], [ 546735.942403623252176, 2233775.072507272474468 ], [ 546809.01075330702588, 2233813.670407894067466 ], [ 546864.265767304808833, 2233916.690671316348016 ], [ 546856.819154328317381, 2233968.962711280211806 ], [ 546857.762184005347081, 2234024.358112373389304 ], [ 546937.284660719335079, 2234154.27024550549686 ], [ 546953.450834836112335, 2234338.96175074018538 ], [ 546983.540072024217807, 2234485.825026553124189 ], [ 546942.330698620295152, 2234517.454882214777172 ], [ 546912.74827127775643, 2234548.108721089549363 ], [ 546879.009718305780552, 2234574.001046629622579 ], [ 546841.616437600110658, 2234675.954501174390316 ], [ 546697.644977801828645, 2234786.46400647982955 ], [ 546582.385733638540842, 2234949.057316752150655 ], [ 546660.46598803170491, 2234990.302434599027038 ], [ 546815.306395676569082, 2235116.599509386345744 ], [ 546905.376281401026063, 2235164.177266833372414 ], [ 547017.697507404256612, 2235237.092862907797098 ], [ 547047.345990966423415, 2235575.72040425427258 ], [ 547080.060478417668492, 2235614.608855679631233 ], [ 547239.690731428214349, 2235503.565866366960108 ], [ 547515.291327248909511, 2235488.833028600551188 ], [ 547805.567170422174968, 2235677.271455840207636 ], [ 547955.89854066807311, 2235996.862416681833565 ], [ 548115.163693748996593, 2236218.332596993073821 ], [ 548135.470537148648873, 2236483.078035904094577 ], [ 548084.430053620482795, 2236600.360600521788001 ], [ 548341.877715746988542, 2236635.711680299602449 ], [ 548670.913992510177195, 2237051.781622506678104 ], [ 548853.731636698707007, 2237444.986548854969442 ], [ 549236.789464945439249, 2237623.993681129999459 ], [ 549314.766439455095679, 2237720.497077053412795 ], [ 549329.324343522894196, 2237735.943318753503263 ], [ 549790.946068268967792, 2237778.853114050813019 ], [ 550042.293799713021144, 2237810.413279660046101 ], [ 550435.636086068698205, 2237486.504418265074492 ], [ 550684.978411396499723, 2237364.353722663596272 ], [ 551143.834658006788231, 2237004.002309787087142 ], [ 551223.482342503033578, 2236894.84467335883528 ], [ 551267.643914088257588, 2236858.331620138138533 ], [ 551314.221016814000905, 2236578.300304935313761 ], [ 551410.237420672317967, 2236353.128219280391932 ], [ 551368.869175874395296, 2236208.625944126397371 ], [ 551448.688041362562217, 2236097.639188833534718 ], [ 551543.357029108796269, 2236044.731155648827553 ], [ 551720.619060910190456, 2235935.308739292435348 ], [ 551788.512499808566645, 2235935.428716484457254 ], [ 551873.089564069872722, 2235945.807365033775568 ], [ 551929.824454916175455, 2235900.601334854960442 ], [ 551931.427409330732189, 2235410.736610765568912 ], [ 552052.384081918862648, 2235336.069612381979823 ], [ 552263.723992277402431, 2235273.882777878083289 ], [ 552427.941943347803317, 2235274.163948687724769 ], [ 552545.283343545277603, 2235318.956126918084919 ], [ 552558.297772642690688, 2235563.368710475042462 ], [ 552587.985541936708614, 2235593.74957487359643 ], [ 552635.171533974353224, 2235717.628191810101271 ], [ 552671.610787328914739, 2235691.34667956829071 ], [ 552730.446499686222523, 2235632.538662063889205 ], [ 552820.966738055692986, 2235643.6497568404302 ], [ 552907.332687112968415, 2235557.321045243181288 ], [ 553087.038494272972457, 2235635.436969849281013 ], [ 553585.855084471404552, 2235623.353768886066973 ], [ 553668.860765881487168, 2235489.512849087826908 ], [ 553587.816871358198114, 2235355.035717540420592 ], [ 553576.624040309572592, 2235308.135358022525907 ], [ 553541.575875218375586, 2235272.27715877443552 ], [ 553491.864560946589336, 2235164.162401017732918 ], [ 553455.051747515215538, 2235035.566833632998168 ], [ 553465.030226626317017, 2234953.475659694522619 ], [ 553465.214378392905928, 2234896.708359388634562 ], [ 553521.38034126709681, 2234764.971534701064229 ], [ 553352.281693313154392, 2234496.420192507095635 ], [ 553319.221086875535548, 2234357.860396799631417 ], [ 553229.549079083604738, 2234162.82134111225605 ], [ 553197.373249982949346, 2233968.392384166829288 ], [ 553119.085683811455965, 2233838.474591632373631 ], [ 553119.456161358975805, 2233724.805176412686706 ], [ 553161.794746742816642, 2233656.534193673171103 ], [ 553122.152846253477037, 2233490.377819830551744 ], [ 552928.634818539139815, 2233431.989093476906419 ], [ 552948.095214181928895, 2233271.946816588751972 ], [ 552888.699388976208866, 2233163.035589034669101 ], [ 552623.162930398946628, 2232891.327280045486987 ], [ 552708.053260279819369, 2232783.394513529725373 ], [ 552708.480405401205644, 2232653.75779609195888 ], [ 552727.714156979694963, 2232495.552676902152598 ], [ 552632.599536482011899, 2232288.651982614770532 ], [ 552759.229153230437078, 2232239.149590444751084 ], [ 552864.842030814499594, 2232104.862812278792262 ], [ 552943.327189990435727, 2231667.19749008025974 ], [ 553021.578106333618052, 2231541.010115009732544 ], [ 552935.355228162137792, 2231412.70641191676259 ], [ 552998.656616975320503, 2231362.259525901637971 ], [ 553009.299902306287549, 2231274.723213153891265 ], [ 552952.832070756121539, 2231171.172863267362118 ], [ 552839.210525968926959, 2231109.598264444619417 ], [ 552839.426400533528067, 2231043.486421020701528 ], [ 552878.478163763997145, 2230926.030774811282754 ], [ 552878.741723704733886, 2230845.251772405579686 ], [ 552921.278082734672353, 2230717.306497406214476 ], [ 552958.864722885540687, 2230566.735315744765103 ], [ 553168.577096618595533, 2230310.560017885640264 ], [ 553025.227231328724883, 2230267.30484957434237 ], [ 552862.598946976242587, 2230058.393137466162443 ], [ 552648.225661813747138, 2229993.700400051660836 ], [ 552618.403896776842885, 2229790.932149197906256 ], [ 552642.322577574639581, 2229594.230980127118528 ], [ 552605.454279494122602, 2229546.871025545522571 ], [ 552523.564714748761617, 2229463.063353062607348 ], [ 552698.307928529917262, 2229262.132291542366147 ], [ 552810.588973759673536, 2229105.971160756424069 ], [ 552884.574329050607048, 2229011.890058930963278 ], [ 552885.239359330618754, 2228809.839030456729233 ], [ 553011.462843060144223, 2228760.489915781654418 ], [ 552987.410859871539287, 2228693.553995616734028 ], [ 552959.058153679245152, 2228631.866585206240416 ], [ 553000.151925412123092, 2228599.115425067953765 ], [ 553000.633302660658956, 2228452.562580133788288 ], [ 553099.143161628511734, 2228339.279922921210527 ], [ 553165.470940370578319, 2228162.21487779263407 ], [ 553199.202095923945308, 2228162.272151788696647 ], [ 553630.870572523679584, 2228231.598520500585437 ], [ 553659.616999699850567, 2227995.156181044876575 ], [ 553659.767497007502243, 2227949.802698175422847 ], [ 553665.240115397959016, 2227904.779117175377905 ], [ 553665.660135100944899, 2227777.026334319263697 ], [ 553756.212866384652443, 2227686.494623525068164 ], [ 553984.879977899370715, 2227659.862101780250669 ], [ 554157.506896953214891, 2227681.05052066128701 ], [ 554346.450751020922326, 2227625.437162731774151 ], [ 554515.358263394213282, 2227646.165053612552583 ], [ 554530.056034750887193, 2227525.284725526347756 ], [ 554404.359448090312071, 2227348.999391880817711 ], [ 554456.596329910098575, 2227264.748226322233677 ], [ 554533.226358841639012, 2227060.157594867050648 ], [ 554703.906955645303242, 2226863.86872464325279 ], [ 554741.695682908641174, 2226671.089851801283658 ], [ 554721.641704770969227, 2226642.247810681350529 ], [ 554614.6970808012411, 2226797.63352835085243 ], [ 554457.651277766446583, 2226700.598564377054572 ], [ 554502.854396063252352, 2226458.33736986014992 ], [ 554471.091780813876539, 2226429.175494622439146 ], [ 554441.47208058310207, 2226386.568267945200205 ], [ 554302.031339941662736, 2226316.635214161127806 ], [ 554333.645802788319997, 2226235.848500598222017 ], [ 554371.717227840446867, 2226178.793654913082719 ], [ 554309.791366214631125, 2226121.927123989909887 ], [ 554336.928681149845943, 2225976.493472042493522 ], [ 554186.269355712924153, 2225922.602563970722258 ], [ 554048.026091474108398, 2225828.339982515200973 ], [ 553969.002169358311221, 2225850.331853255629539 ], [ 553918.974509908934124, 2225906.054836087860167 ], [ 553876.68830391461961, 2225908.734703031368554 ], [ 553706.987382204621099, 2225848.102114058099687 ], [ 553620.981210134923458, 2225943.886958654038608 ], [ 553467.721954856533557, 2225953.59671910200268 ], [ 553357.25037702685222, 2225859.444624369032681 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 63.0, "GRIDCODE": 10.0, "X_COORD": 579022.1984, "Y_COORD": 268283.2896 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 547870.788736699614674, 2224672.168603996746242 ], [ 547829.438426594831981, 2224883.004137003794312 ], [ 547747.38163289334625, 2225265.232824074104428 ], [ 547465.667099301121198, 2225553.654214937239885 ], [ 547301.698533012298867, 2225659.030490316450596 ], [ 547020.577836768701673, 2225624.482341216877103 ], [ 546983.587808640790172, 2225723.214441285468638 ], [ 546956.307955321623012, 2225688.160665581002831 ], [ 546752.594168990151957, 2225636.431299181655049 ], [ 546686.928011158015579, 2225760.095607886090875 ], [ 546632.710200861794874, 2225803.303021784871817 ], [ 546587.145047193276696, 2225848.849525571800768 ], [ 546414.540630058618262, 2225773.770334883593023 ], [ 546157.617887903354131, 2225675.642093 ], [ 546041.615085024968721, 2225602.143885063938797 ], [ 545829.074913350865245, 2225554.964574470184743 ], [ 545690.360493244137615, 2225333.761737619526684 ], [ 545488.339634953183122, 2225333.38983526173979 ], [ 545271.525589416036382, 2225482.598884196020663 ], [ 544906.302813984453678, 2225358.852824258618057 ], [ 544871.994149289559573, 2225074.744665333069861 ], [ 544814.186116446391679, 2224978.758932010270655 ], [ 544528.105094647500664, 2224978.223229218274355 ], [ 544407.20328440470621, 2225126.362958868965507 ], [ 544234.03182785352692, 2225264.348734632134438 ], [ 544290.039127461961471, 2225460.182894598692656 ], [ 544341.355666953139007, 2225571.868690722621977 ], [ 544296.609539125114679, 2225644.016112226061523 ], [ 544296.499829319654964, 2225675.6481979098171 ], [ 544159.194792689522728, 2225850.203773594461381 ], [ 544101.968285173526965, 2225843.168193425983191 ], [ 544027.121886582579464, 2225917.977268699556589 ], [ 543908.277461738558486, 2226318.66469038836658 ], [ 543795.515637972508557, 2226462.012553246691823 ], [ 543795.122988069546409, 2226576.001254244707525 ], [ 543756.34431776672136, 2226638.524684362113476 ], [ 543717.328114455798641, 2226711.994118869304657 ], [ 543716.862498850445263, 2226847.426981991156936 ], [ 543508.626885950798169, 2227060.580515898764133 ], [ 543220.50156987272203, 2227152.482364135794342 ], [ 542968.85660099692177, 2227067.210427592508495 ], [ 542918.136880655190907, 2227162.714387546293437 ], [ 542830.36507625458762, 2227304.216539660468698 ], [ 542734.455513234832324, 2227484.81334388256073 ], [ 542652.349680769955739, 2227617.175573294982314 ], [ 542595.070515622850507, 2227770.020048020407557 ], [ 542270.373714945628308, 2227650.321520893834531 ], [ 542212.420962848351337, 2227575.843021112494171 ], [ 542071.128381742048077, 2227547.701986895874143 ], [ 542083.384590829024091, 2227599.125951037742198 ], [ 542139.8928483792115, 2227656.97950151655823 ], [ 542224.345649769762531, 2227791.660650853998959 ], [ 542214.218887155526318, 2227874.832585250027478 ], [ 542242.101133386953734, 2227935.519781890325248 ], [ 542271.686228498350829, 2228013.254038805142045 ], [ 542258.76120907405857, 2228119.402268086560071 ], [ 542298.731362975086085, 2228320.154272440820932 ], [ 542369.72119885450229, 2228474.658643813803792 ], [ 542414.860559201915748, 2228520.869193463586271 ], [ 542473.027603698545136, 2228595.618051938712597 ], [ 542463.162545493803918, 2228676.649344054982066 ], [ 542518.951561625581235, 2228769.280110228806734 ], [ 542530.03831631783396, 2229043.845710678957403 ], [ 542574.564226448535919, 2229089.426864958368242 ], [ 542628.554123841575347, 2229158.809527760371566 ], [ 542654.517043858766556, 2229444.731097226031125 ], [ 542684.73656736232806, 2229550.378058049827814 ], [ 542634.921608161181211, 2229683.747768880799413 ], [ 542585.460161543218419, 2229620.188444535247982 ], [ 542504.892182382871397, 2229586.634238735772669 ], [ 542400.313091789023019, 2229865.6793427253142 ], [ 542447.541092923958786, 2229914.026918979361653 ], [ 542473.662380572524853, 2229947.59112570155412 ], [ 542530.912899185204878, 2230006.196924647316337 ], [ 542557.180276138475165, 2230299.712587432004511 ], [ 542571.448707745643333, 2230315.417901985347271 ], [ 542655.39746448257938, 2230446.329005253501236 ], [ 542709.085219928761944, 2230505.425024311058223 ], [ 542735.399099332629703, 2230570.371581331826746 ], [ 542805.184551370912232, 2230647.183764434419572 ], [ 542846.0887860491639, 2230695.997226286679506 ], [ 542904.418724066228606, 2230729.267477888613939 ], [ 542901.90890627563931, 2230759.647860698401928 ], [ 542900.001289458479732, 2230804.890903593041003 ], [ 542888.812439147848636, 2230940.279957453720272 ], [ 542883.091495928238146, 2231076.008739993907511 ], [ 542879.340313879423775, 2231121.406410278752446 ], [ 542904.128954521380365, 2231213.098420019261539 ], [ 542924.256366786779836, 2231369.024351514875889 ], [ 542976.567435284610838, 2231489.770271057263017 ], [ 543010.911241607391275, 2231574.528859920799732 ], [ 543175.052964161615819, 2231668.143977759405971 ], [ 543170.031719271559268, 2231728.907456335611641 ], [ 543167.98209140310064, 2231777.544541760347784 ], [ 543220.188811498926952, 2231898.046655093319714 ], [ 543243.70196939969901, 2231990.835624047555029 ], [ 543401.986641215044074, 2232231.684561915695667 ], [ 543461.301462560193613, 2232337.008908972144127 ], [ 543597.477376026567072, 2232544.210839213803411 ], [ 543604.826592777622864, 2232948.801415867172182 ], [ 544267.575546010630205, 2233678.211954093538225 ], [ 544442.974682074622251, 2233467.707787130028009 ], [ 544454.902954349294305, 2233184.452073966152966 ], [ 544510.424351552152075, 2233011.36868685670197 ], [ 544617.536866878857836, 2232983.440557237714529 ], [ 544799.3499361788854, 2232932.885888960212469 ], [ 544928.455824450473301, 2233086.925852878019214 ], [ 545086.427201836719178, 2233195.660220665857196 ], [ 545186.319097497849725, 2233442.143002020195127 ], [ 545214.858807512908243, 2233473.550654877908528 ], [ 545228.494835919467732, 2233489.820473032072186 ], [ 545387.666903413599357, 2233428.758136623539031 ], [ 545624.711631522281095, 2233473.658554234541953 ], [ 545785.38036935927812, 2233437.881707244552672 ], [ 545962.755368032492697, 2233488.405526793561876 ], [ 546043.816983771976084, 2233543.680504884570837 ], [ 546246.762515429989435, 2233462.359789432957768 ], [ 546220.637897978420369, 2233428.79562596604228 ], [ 546149.579678727313876, 2233356.076588662341237 ], [ 546188.716579898144118, 2233311.257969031110406 ], [ 546244.855394503101707, 2233266.531919064931571 ], [ 546326.16115538449958, 2233185.281286756508052 ], [ 546484.256407129811123, 2233185.569755328819156 ], [ 546592.681638774345629, 2233272.739223683252931 ], [ 546637.668891947716475, 2233200.21065073646605 ], [ 546674.576010173535906, 2233075.777542542666197 ], [ 546768.530167516553774, 2233000.922573399730027 ], [ 546992.456645987229422, 2232757.487038129009306 ], [ 546969.389299525297247, 2232674.795505050569773 ], [ 546916.731198852416128, 2232560.225394323468208 ], [ 546991.687942362739705, 2232552.499460001476109 ], [ 547124.914484203443862, 2232568.86463672015816 ], [ 547174.000997778843157, 2232344.17797426879406 ], [ 547299.29070623696316, 2232266.845023235306144 ], [ 547411.679637525696307, 2232280.649488271214068 ], [ 547441.771236800821498, 2232280.705551527440548 ], [ 547825.129744270816445, 2232342.305473719723523 ], [ 547833.034778497065417, 2232277.332514733076096 ], [ 547769.709648270043544, 2232172.225960269570351 ], [ 547788.730232992325909, 2232015.878448536619544 ], [ 547788.962903751642443, 2231946.408808954060078 ], [ 547833.497269161045551, 2231785.738572238944471 ], [ 547833.765721912495792, 2231705.676421856507659 ], [ 547867.31796430668328, 2231672.144432262517512 ], [ 547958.250719345640391, 2231599.689976375550032 ], [ 547995.830446506617591, 2231528.921053933911026 ], [ 548096.127058344893157, 2231385.643407694995403 ], [ 548154.342347704572603, 2231276.014164910651743 ], [ 548449.809789551072754, 2231276.54230659455061 ], [ 548556.106064320192672, 2231362.002063626423478 ], [ 548708.464919627876952, 2231240.600639210082591 ], [ 548708.916873559821397, 2231105.309891421347857 ], [ 548714.489610841381364, 2231059.490031749941409 ], [ 548654.928379436722025, 2231027.205803139135242 ], [ 548602.675857254187576, 2230960.080783826299012 ], [ 548463.091231989790685, 2230817.222009541466832 ], [ 548463.546849862090312, 2230680.653298215009272 ], [ 548498.378227045177482, 2230684.930879915133119 ], [ 548609.838707429706119, 2230632.383611007593572 ], [ 548911.240221953950822, 2230734.469691190868616 ], [ 548961.270961904316209, 2230455.55805990472436 ], [ 549159.228849915671162, 2230297.813589683733881 ], [ 549159.822504834970459, 2230119.748512900434434 ], [ 549180.290079387603328, 2230045.895986098796129 ], [ 549128.005109506542794, 2229892.751541141420603 ], [ 549089.138152397819795, 2229842.821309548802674 ], [ 548921.934619369567372, 2229778.973921418190002 ], [ 549006.408126143272966, 2229642.764070527628064 ], [ 548863.752692018053494, 2229354.899189703166485 ], [ 548746.560352946282364, 2229280.666076666675508 ], [ 548646.5067721134983, 2229242.45601162314415 ], [ 548574.916024268371984, 2229111.142344195395708 ], [ 548422.738804112304933, 2229110.871891570277512 ], [ 548119.44479176774621, 2228801.865204595029354 ], [ 548030.030255777412094, 2228607.309193125925958 ], [ 548086.818570915027522, 2228488.114272279664874 ], [ 548129.251697893952951, 2228454.297796634025872 ], [ 548164.023038782994263, 2228388.814831865951419 ], [ 548413.861665134085342, 2228189.724272254854441 ], [ 548484.875153722474352, 2227539.005279761739075 ], [ 548652.732842665398493, 2227489.614237534813583 ], [ 548877.025993924820796, 2227461.520262158475816 ], [ 548872.737976678065024, 2227077.375867081806064 ], [ 548837.377631985349581, 2227000.423318299464881 ], [ 548882.015693983994424, 2226928.437221160158515 ], [ 548915.859019670868292, 2226838.112250531092286 ], [ 549045.929912693914957, 2226696.672078447416425 ], [ 549107.052327078999951, 2226581.555655028671026 ], [ 549144.653309527551755, 2226551.587147845886648 ], [ 549174.743152170907706, 2226521.514117270708084 ], [ 549329.730651637772098, 2226421.903887467458844 ], [ 549339.7060673951637, 2226339.909109432250261 ], [ 549308.758511870633811, 2226152.742922150529921 ], [ 549073.610714031150565, 2226003.779506041668355 ], [ 548999.136421542963944, 2225994.629859852604568 ], [ 548857.891480477061123, 2225994.374012065120041 ], [ 548819.596260020160116, 2225955.17463521566242 ], [ 548830.365998364053667, 2225866.649869149550796 ], [ 548784.160438809194602, 2225819.346794637851417 ], [ 548731.916852234047838, 2225752.220402493141592 ], [ 548635.783222763682716, 2225653.816405708901584 ], [ 548469.70124789502006, 2225388.991030012257397 ], [ 548336.107729166280478, 2225201.575860011391342 ], [ 548207.669806081685238, 2224769.54840917699039 ], [ 548194.607487209723331, 2224752.766294419765472 ], [ 547967.08186737250071, 2224714.912461495958269 ], [ 547870.788736699614674, 2224672.168603996746242 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 64.0, "GRIDCODE": 7.0, "X_COORD": 583447.1984, "Y_COORD": 266114.9638 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 549058.459595798980445, 2224322.506605695001781 ], [ 549010.137767161359079, 2224396.238211858086288 ], [ 548867.387477436685003, 2224474.731968562118709 ], [ 548626.777587810764089, 2224625.64518403634429 ], [ 548308.707005761214532, 2224725.613637500442564 ], [ 548194.607487209723331, 2224752.766294419765472 ], [ 548207.669806081685238, 2224769.54840917699039 ], [ 548336.107729166280478, 2225201.575860011391342 ], [ 548469.70124789502006, 2225388.991030012257397 ], [ 548635.783222763682716, 2225653.816405708901584 ], [ 548731.916852234047838, 2225752.220402493141592 ], [ 548784.160438809194602, 2225819.346794637851417 ], [ 548830.365998364053667, 2225866.649869149550796 ], [ 548819.596260020160116, 2225955.17463521566242 ], [ 548857.891480477061123, 2225994.374012065120041 ], [ 548999.136421542963944, 2225994.629859852604568 ], [ 549073.610714031150565, 2226003.779506041668355 ], [ 549308.758511870633811, 2226152.742922150529921 ], [ 549339.7060673951637, 2226339.909109432250261 ], [ 549329.730651637772098, 2226421.903887467458844 ], [ 549174.743152170907706, 2226521.514117270708084 ], [ 549144.653309527551755, 2226551.587147845886648 ], [ 549107.052327078999951, 2226581.555655028671026 ], [ 549045.929912693914957, 2226696.672078447416425 ], [ 548915.859019670868292, 2226838.112250531092286 ], [ 548882.015693983994424, 2226928.437221160158515 ], [ 548837.377631985349581, 2227000.423318299464881 ], [ 548872.737976678065024, 2227077.375867081806064 ], [ 548877.025993924820796, 2227461.520262158475816 ], [ 548652.732842665398493, 2227489.614237534813583 ], [ 548484.875153722474352, 2227539.005279761739075 ], [ 548413.861665134085342, 2228189.724272254854441 ], [ 548164.023038782994263, 2228388.814831865951419 ], [ 548129.251697893952951, 2228454.297796634025872 ], [ 548086.818570915027522, 2228488.114272279664874 ], [ 548030.030255777412094, 2228607.309193125925958 ], [ 548119.44479176774621, 2228801.865204595029354 ], [ 548422.738804112304933, 2229110.871891570277512 ], [ 548574.916024268371984, 2229111.142344195395708 ], [ 548646.5067721134983, 2229242.45601162314415 ], [ 548746.560352946282364, 2229280.666076666675508 ], [ 548863.752692018053494, 2229354.899189703166485 ], [ 549006.408126143272966, 2229642.764070527628064 ], [ 548921.934619369567372, 2229778.973921418190002 ], [ 549089.138152397819795, 2229842.821309548802674 ], [ 549128.005109506542794, 2229892.751541141420603 ], [ 549180.290079387603328, 2230045.895986098796129 ], [ 549225.534880892955698, 2230032.214134654961526 ], [ 549454.152386942063458, 2230082.772656487300992 ], [ 549523.920171199250035, 2230029.208199130371213 ], [ 549593.497996994177811, 2229873.848388915881515 ], [ 549658.495060140150599, 2229771.591221522539854 ], [ 549680.066856491495855, 2229620.102958046831191 ], [ 549659.925191811984405, 2229262.386804578825831 ], [ 549674.101161519996822, 2229162.855335619300604 ], [ 549638.457301561371423, 2229115.32146929204464 ], [ 549506.502191636362113, 2229045.611254549585283 ], [ 549463.430973994894885, 2228899.175800420343876 ], [ 549514.377465727622621, 2228782.090981423854828 ], [ 549513.193323502200656, 2228712.736897708848119 ], [ 549650.216200364753604, 2228518.751990703865886 ], [ 549708.450544446823187, 2228406.231183511205018 ], [ 549892.931082946946844, 2228316.706774956546724 ], [ 549968.872883814503439, 2228327.647509377449751 ], [ 550176.290112045127898, 2228308.730566113255918 ], [ 550252.487387536093593, 2228229.765801161527634 ], [ 550749.133304764982313, 2228218.649191524833441 ], [ 550838.209491305518895, 2227955.497842974029481 ], [ 550792.917985211359337, 2227859.765048746019602 ], [ 550813.843686209060252, 2227712.817254655063152 ], [ 550810.414684821967967, 2227512.161406110972166 ], [ 550849.214944769162685, 2227471.948347449302673 ], [ 550944.385587074211799, 2227419.620570560917258 ], [ 551035.400326736038551, 2227362.530906566418707 ], [ 551158.475502801244147, 2227342.176263080909848 ], [ 551189.929149706265889, 2227281.391097070649266 ], [ 551223.662958955159411, 2227255.493525301106274 ], [ 551254.07186223345343, 2227223.973940956406295 ], [ 551436.305513629922643, 2227355.513711498118937 ], [ 551533.246056932490319, 2227369.475514985620975 ], [ 551638.71286984172184, 2227311.4835314033553 ], [ 551712.860160119365901, 2227168.204971881583333 ], [ 551803.14094777952414, 2227074.638748820871115 ], [ 552018.377022318542004, 2226939.634561671875417 ], [ 552173.106695368885994, 2226890.9911919971928 ], [ 552204.558825282147154, 2226830.212449218146503 ], [ 552240.75832069281023, 2226773.249971984885633 ], [ 552169.141205483581871, 2226565.756247350946069 ], [ 552255.168841578764841, 2226533.170539187267423 ], [ 552269.957260549883358, 2226517.844156508333981 ], [ 552172.512742897961289, 2226480.634813234210014 ], [ 552165.902248318423517, 2226041.778942489996552 ], [ 552142.302607470890507, 2225881.259493906982243 ], [ 552272.013446184108034, 2225777.872578874230385 ], [ 552305.171609539771453, 2225698.473980191163719 ], [ 552130.819471526541747, 2225617.900009365752339 ], [ 552047.008880032110028, 2225550.517112486995757 ], [ 551987.54761087463703, 2225518.283924739807844 ], [ 551840.496891071787104, 2225379.957015551626682 ], [ 551795.872154672979377, 2225262.750531813129783 ], [ 551766.190717471530661, 2225232.364275200292468 ], [ 551698.217193474876694, 2225107.676569411531091 ], [ 551650.419295985717326, 2224982.128442307002842 ], [ 551613.593974106013775, 2224827.696617006324232 ], [ 551383.342445471440442, 2224862.70495431125164 ], [ 551175.802380143548362, 2224905.345916100777686 ], [ 551012.790523794363253, 2224774.265011873096228 ], [ 550864.470213164226152, 2224844.207070699892938 ], [ 550802.870831221109256, 2224805.186776137910783 ], [ 550817.034097731113434, 2224688.731803148984909 ], [ 550755.801932757487521, 2224655.537703298032284 ], [ 550726.801227934425697, 2224618.2742586331442 ], [ 550639.39393600274343, 2224618.122077318839729 ], [ 550569.965818298282102, 2224609.597475353628397 ], [ 550483.832387949340045, 2224729.390751610510051 ], [ 550391.05149202758912, 2224752.178048396483064 ], [ 550285.159141725860536, 2224817.56004146207124 ], [ 549990.4288364314707, 2224630.838398306630552 ], [ 549953.037153808167204, 2224532.610718507319689 ], [ 549833.275029522948898, 2224410.020692936144769 ], [ 549541.823158768587746, 2224322.034615715965629 ], [ 549058.459595798980445, 2224322.506605695001781 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 65.0, "GRIDCODE": 6.0, "X_COORD": 588737.54935, "Y_COORD": 264953.62102000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 554856.435947485850193, 2223865.597446409054101 ], [ 554099.114140124176629, 2223833.434156353585422 ], [ 553735.081570931593888, 2224116.542964674532413 ], [ 553630.470946601242758, 2224595.644225181080401 ], [ 553566.40268274967093, 2224646.716894197277725 ], [ 553493.445850208867341, 2224784.151082104071975 ], [ 553387.91618596133776, 2224825.416687067598104 ], [ 553337.0172041405458, 2224997.112048322334886 ], [ 553290.846684455755167, 2225105.431431506760418 ], [ 553365.810280675417744, 2225268.538774948567152 ], [ 553411.858171296888031, 2225389.479384511709213 ], [ 553328.107003486948088, 2225456.239196774549782 ], [ 553327.478345739538781, 2225645.898264858871698 ], [ 553315.496259125182405, 2225744.441636187955737 ], [ 553357.25037702685222, 2225859.444624369032681 ], [ 553467.721954856533557, 2225953.59671910200268 ], [ 553620.981210134923458, 2225943.886958654038608 ], [ 553706.987382204621099, 2225848.102114058099687 ], [ 553876.68830391461961, 2225908.734703031368554 ], [ 553918.974509908934124, 2225906.054836087860167 ], [ 553969.002169358311221, 2225850.331853255629539 ], [ 554048.026091474108398, 2225828.339982515200973 ], [ 554186.269355712924153, 2225922.602563970722258 ], [ 554336.928681149845943, 2225976.493472042493522 ], [ 554309.791366214631125, 2226121.927123989909887 ], [ 554371.717227840446867, 2226178.793654913082719 ], [ 554333.645802788319997, 2226235.848500598222017 ], [ 554302.031339941662736, 2226316.635214161127806 ], [ 554441.47208058310207, 2226386.568267945200205 ], [ 554471.091780813876539, 2226429.175494622439146 ], [ 554502.854396063252352, 2226458.33736986014992 ], [ 554457.651277766446583, 2226700.598564377054572 ], [ 554614.6970808012411, 2226797.63352835085243 ], [ 554721.641704770969227, 2226642.247810681350529 ], [ 554741.695682908641174, 2226671.089851801283658 ], [ 554756.537367540528066, 2226686.28179799951613 ], [ 554859.259942715289071, 2227037.525666103698313 ], [ 555146.005215365672484, 2227038.003635292872787 ], [ 555250.415731547749601, 2227121.947133041918278 ], [ 555346.850878581171855, 2227375.197812995873392 ], [ 555478.829231455689296, 2227472.163453225046396 ], [ 555533.048013937543146, 2227632.746391636319458 ], [ 555422.808995596482418, 2227772.939154150895774 ], [ 555354.52831972471904, 2227827.364743863232434 ], [ 555186.772843671962619, 2227892.962245892733335 ], [ 555222.488888117717579, 2227929.51490459498018 ], [ 555198.636556253419258, 2228125.730653668753803 ], [ 555288.300313655170612, 2228372.651286034844816 ], [ 555455.67504149582237, 2228423.156936078332365 ], [ 555599.139047875534743, 2228485.522025333717465 ], [ 555642.884367917431518, 2228668.898611254058778 ], [ 555675.186735058552586, 2228739.171976140700281 ], [ 555680.758279430796392, 2228876.452439319342375 ], [ 555853.07774973672349, 2228924.224489604122937 ], [ 555906.612709458800964, 2228872.599340335465968 ], [ 556139.556140180793591, 2228813.60047344211489 ], [ 556182.976704216562212, 2228741.81265233270824 ], [ 556236.491747859632596, 2228601.934930765070021 ], [ 556353.429978138068691, 2228548.370646408759058 ], [ 556563.322139720548876, 2228618.155257623642683 ], [ 556884.599846592755057, 2228308.324796080589294 ], [ 556958.272098429617472, 2228274.576099139638245 ], [ 557127.600494196405634, 2228252.620864984579384 ], [ 557196.395358095760457, 2228126.265011516399682 ], [ 557302.712784198229201, 2228023.73242748901248 ], [ 557396.862376846955158, 2227970.231111818924546 ], [ 557488.886030316120014, 2227914.29439952224493 ], [ 557551.427312069106847, 2227889.055036994628608 ], [ 557552.142708484316245, 2227857.879347782582045 ], [ 557626.046192514128052, 2227631.474470076151192 ], [ 557599.960426175268367, 2227588.51295303273946 ], [ 557519.033049466903321, 2227502.643874604254961 ], [ 557469.103303458890878, 2227323.250309022143483 ], [ 557445.132480674888939, 2227182.930321640335023 ], [ 557386.420895500457846, 2227120.626726789399981 ], [ 557403.582043446716852, 2226951.703153926879168 ], [ 557328.538502299925312, 2226760.759257578290999 ], [ 557210.766851688036695, 2226635.789553483948112 ], [ 557254.946120476932265, 2226387.704608055762947 ], [ 557293.329607139690779, 2226270.11615205463022 ], [ 557294.62156640982721, 2226213.705648114904761 ], [ 557355.513054838869721, 2225990.229463494382799 ], [ 557258.808976434636861, 2225844.730085806921124 ], [ 557166.836082450347021, 2225678.782998862676322 ], [ 556855.665083613130264, 2225672.00261346437037 ], [ 556764.22468465694692, 2225534.425143229775131 ], [ 556787.638263543951325, 2225304.01092672534287 ], [ 556674.640041526290588, 2225088.138369196094573 ], [ 556730.354432097170502, 2224996.01683076005429 ], [ 556779.04890614177566, 2224906.576152027584612 ], [ 556908.550937728141434, 2224739.474156832322478 ], [ 556946.369063600781374, 2224388.260005367919803 ], [ 556830.10412713396363, 2224402.3525256710127 ], [ 556739.632215482881293, 2224577.218629167415202 ], [ 556556.331420433823951, 2224646.662445021793246 ], [ 556503.558732182136737, 2224828.145517953671515 ], [ 556401.12461691419594, 2224761.645588808692992 ], [ 556281.525590737932362, 2224726.23753117211163 ], [ 556259.723873560200445, 2224631.912484277971089 ], [ 556110.346156241721474, 2224594.659020425751805 ], [ 556025.239457305055112, 2224556.898062212392688 ], [ 555875.861955695669167, 2224519.643900640308857 ], [ 555791.907026802189648, 2224451.16412453353405 ], [ 555701.279556061839685, 2224478.582857428118587 ], [ 555593.715336397988722, 2224499.916288802400231 ], [ 555423.496282491832972, 2224424.377294555306435 ], [ 555338.767875627265312, 2224311.376976361498237 ], [ 555101.185077761765569, 2224361.570118745788932 ], [ 554856.049184844014235, 2224121.042081288993359 ], [ 554856.435947485850193, 2223865.597446409054101 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 66.0, "GRIDCODE": 5.0, "X_COORD": 575977.1984, "Y_COORD": 263982.54314000002 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 537729.411999570205808, 2226218.937439586035907 ], [ 537837.502914172713645, 2226181.430971569381654 ], [ 537974.141142980894074, 2226024.115553298965096 ], [ 538404.507382560172118, 2226154.005749827250838 ], [ 538631.83195376151707, 2226133.418372195214033 ], [ 538735.837896669399925, 2226025.669772934168577 ], [ 538802.302183088730089, 2226090.118186262436211 ], [ 538790.474537542671897, 2226173.075352751649916 ], [ 538819.92420475569088, 2226212.370048435404897 ], [ 538880.12568451592233, 2226244.187551032751799 ], [ 538859.422622623387724, 2226389.38960087671876 ], [ 538961.441819831845351, 2226339.903311721980572 ], [ 539024.957661959691904, 2226315.866790450178087 ], [ 539124.707760570570827, 2226253.328602227382362 ], [ 539293.121732833678834, 2226330.311156437732279 ], [ 539404.811782892677002, 2226430.719194167293608 ], [ 539738.493688754038885, 2226420.536448648199439 ], [ 539736.576988935819827, 2226307.230034148320556 ], [ 539826.064198141801171, 2226214.52462413161993 ], [ 540372.739507781341672, 2226276.543618882074952 ], [ 540455.965821226593107, 2226344.462081084959209 ], [ 540805.853049777331762, 2226420.905406867153943 ], [ 540894.912517810822465, 2226478.752991907298565 ], [ 541071.193466040189378, 2226571.920321219600737 ], [ 541207.043251498020254, 2226793.96523635648191 ], [ 541310.733675531111658, 2227013.225356080569327 ], [ 541328.398339004837908, 2227215.314741682261229 ], [ 541447.995393941528164, 2227250.746775949373841 ], [ 541604.368991034454666, 2227320.17496451549232 ], [ 541779.61652642278932, 2227363.919377718120813 ], [ 541851.294043327914551, 2227459.545921950601041 ], [ 542030.453435313538648, 2227498.681811962276697 ], [ 542056.000794879975729, 2227532.765621748752892 ], [ 542071.128381742048077, 2227547.701986895874143 ], [ 542212.420962848351337, 2227575.843021112494171 ], [ 542270.373714945628308, 2227650.321520893834531 ], [ 542595.070515622850507, 2227770.020048020407557 ], [ 542652.349680769955739, 2227617.175573294982314 ], [ 542734.455513234832324, 2227484.81334388256073 ], [ 542830.36507625458762, 2227304.216539660468698 ], [ 542918.136880655190907, 2227162.714387546293437 ], [ 542968.85660099692177, 2227067.210427592508495 ], [ 543220.50156987272203, 2227152.482364135794342 ], [ 543508.626885950798169, 2227060.580515898764133 ], [ 543716.862498850445263, 2226847.426981991156936 ], [ 543717.328114455798641, 2226711.994118869304657 ], [ 543756.34431776672136, 2226638.524684362113476 ], [ 543795.122988069546409, 2226576.001254244707525 ], [ 543795.515637972508557, 2226462.012553246691823 ], [ 543908.277461738558486, 2226318.66469038836658 ], [ 544027.121886582579464, 2225917.977268699556589 ], [ 544101.968285173526965, 2225843.168193425983191 ], [ 544159.194792689522728, 2225850.203773594461381 ], [ 544296.499829319654964, 2225675.6481979098171 ], [ 544296.609539125114679, 2225644.016112226061523 ], [ 544341.355666953139007, 2225571.868690722621977 ], [ 544290.039127461961471, 2225460.182894598692656 ], [ 544234.03182785352692, 2225264.348734632134438 ], [ 544407.20328440470621, 2225126.362958868965507 ], [ 544528.105094647500664, 2224978.223229218274355 ], [ 544814.186116446391679, 2224978.758932010270655 ], [ 544871.994149289559573, 2225074.744665333069861 ], [ 544906.302813984453678, 2225358.852824258618057 ], [ 545271.525589416036382, 2225482.598884196020663 ], [ 545488.339634953183122, 2225333.38983526173979 ], [ 545690.360493244137615, 2225333.761737619526684 ], [ 545829.074913350865245, 2225554.964574470184743 ], [ 546041.615085024968721, 2225602.143885063938797 ], [ 546157.617887903354131, 2225675.642093 ], [ 546414.540630058618262, 2225773.770334883593023 ], [ 546587.145047193276696, 2225848.849525571800768 ], [ 546632.710200861794874, 2225803.303021784871817 ], [ 546686.928011158015579, 2225760.095607886090875 ], [ 546752.594168990151957, 2225636.431299181655049 ], [ 546956.307955321623012, 2225688.160665581002831 ], [ 546983.587808640790172, 2225723.214441285468638 ], [ 547020.577836768701673, 2225624.482341216877103 ], [ 547301.698533012298867, 2225659.030490316450596 ], [ 547465.667099301121198, 2225553.654214937239885 ], [ 547747.38163289334625, 2225265.232824074104428 ], [ 547829.438426594831981, 2224883.004137003794312 ], [ 547870.788736699614674, 2224672.168603996746242 ], [ 547646.922207202529535, 2224561.722348307259381 ], [ 547357.516261145472527, 2224352.079047391191125 ], [ 547250.26124342228286, 2223981.448169712908566 ], [ 546878.347043198067695, 2223735.618241400457919 ], [ 546482.589711788343266, 2223664.61466524656862 ], [ 546419.76120196597185, 2223623.813738029450178 ], [ 546321.710967184044421, 2223625.680991729721427 ], [ 546198.750220498070121, 2223607.954015512019396 ], [ 546082.479277836158872, 2223664.377579119987786 ], [ 545881.3711941416841, 2223688.489059956744313 ], [ 545617.120490806060843, 2223641.076387790963054 ], [ 545419.605737387901172, 2223512.799917969852686 ], [ 545267.162249927408993, 2223467.638409866020083 ], [ 545332.099801452830434, 2223417.779796727001667 ], [ 545299.669116157107055, 2223365.989260416477919 ], [ 545203.070672030444257, 2223270.602887012064457 ], [ 545141.41446982731577, 2223155.598292899318039 ], [ 545057.236186755821109, 2223031.63225245475769 ], [ 545045.677839518059045, 2222623.14257347304374 ], [ 544996.082168985973112, 2222574.160726747475564 ], [ 544970.537481734179892, 2222540.083239043131471 ], [ 544908.093019640538841, 2222507.078909943811595 ], [ 544916.775984449894167, 2222446.139603505842388 ], [ 544747.537119537009858, 2222295.817068713717163 ], [ 544746.65400101733394, 2222243.771323432214558 ], [ 544794.352331761969253, 2222049.420731981284916 ], [ 544861.503363510011695, 2221979.828864502720535 ], [ 544995.371230429038405, 2222039.263367758132517 ], [ 545212.667739335331134, 2222012.971395385451615 ], [ 545231.214922131621279, 2221937.389366488903761 ], [ 545201.534211021265946, 2221906.997626258060336 ], [ 545158.078403878607787, 2221851.145881894044578 ], [ 544932.557120732730255, 2221850.727706653997302 ], [ 544780.735605774563737, 2221742.091598710045218 ], [ 544750.152056754566729, 2221742.036216276697814 ], [ 544702.315811611828394, 2221736.152844566851854 ], [ 544667.401276824530214, 2221644.405868102796376 ], [ 544588.188413041410968, 2221601.452880562283099 ], [ 544403.518689403543249, 2221601.106076693162322 ], [ 544342.284039714024402, 2221881.378838138654828 ], [ 544289.59518576960545, 2221923.367011020891368 ], [ 544259.012842333060689, 2221961.376248049549758 ], [ 544316.141877960413694, 2222085.731455069035292 ], [ 544372.292555607738905, 2222321.346983122639358 ], [ 544334.88721545226872, 2222628.617423816584051 ], [ 544203.659406737540849, 2222733.189147857949138 ], [ 544203.077886284328997, 2222901.795237373560667 ], [ 544191.705402298364788, 2222995.226031778380275 ], [ 544095.418656981317326, 2223032.855954614467919 ], [ 544039.204755619750358, 2223089.044904160313308 ], [ 543895.436532310093753, 2223113.591254590079188 ], [ 543746.093176667578518, 2223048.614769514650106 ], [ 543474.018406392657198, 2222864.093881631270051 ], [ 543253.465968910837546, 2222863.682875880971551 ], [ 543188.881338635459542, 2222822.753513460978866 ], [ 542938.147592133143917, 2222767.077901883982122 ], [ 542888.936259062262252, 2222703.822635090909898 ], [ 542535.035540009033866, 2222744.97803080175072 ], [ 542468.065729271969758, 2222871.087437585927546 ], [ 542399.344350087805651, 2222827.536890436895192 ], [ 542255.147964055649936, 2222827.264422041364014 ], [ 542194.264148349757306, 2222888.115920918062329 ], [ 542114.96627860260196, 2222786.193791646510363 ], [ 541969.931561551755294, 2222688.133880949579179 ], [ 541830.34021230309736, 2222556.770539117045701 ], [ 541687.186714324518107, 2222428.581531363539398 ], [ 541633.316543794702739, 2222359.334309257566929 ], [ 541515.278604063205421, 2222359.114740673452616 ], [ 541412.436422981671058, 2222293.930574714206159 ], [ 541267.463091565994546, 2222362.271307707764208 ], [ 541302.871401621378027, 2222439.356374987401068 ], [ 541287.115898163290694, 2222568.740861179307103 ], [ 541153.087522989488207, 2222643.632495234720409 ], [ 541049.634157486259937, 2222598.612581292167306 ], [ 540953.145167589653283, 2222626.994766527786851 ], [ 540892.050324506592005, 2222742.037973734550178 ], [ 540817.509757200721651, 2222836.794639998115599 ], [ 540751.776722360868007, 2222960.571917425841093 ], [ 540633.442463817540556, 2223026.691945444792509 ], [ 540510.254617998725735, 2223111.456828947179019 ], [ 540366.483992378227413, 2223135.993970410898328 ], [ 540236.082198048592545, 2223079.253208654932678 ], [ 540138.272274386836216, 2223125.354390841908753 ], [ 540061.578220532392152, 2223202.003016987815499 ], [ 539993.036963888560422, 2223228.785654588602483 ], [ 539957.555932252085768, 2223323.461683151312172 ], [ 539882.140156962326728, 2223383.546044529415667 ], [ 539920.106670500477776, 2223466.202602785080671 ], [ 539946.975780476932414, 2223536.819074115715921 ], [ 539940.517991626285948, 2223589.839733723551035 ], [ 539964.864620164036751, 2223712.170985380187631 ], [ 539897.740086979465559, 2223797.499889831990004 ], [ 539850.220300716464408, 2223987.733593285083771 ], [ 539432.522488052258268, 2223911.252102037891746 ], [ 539145.865053637186065, 2224011.397882211022079 ], [ 538863.157882413710468, 2224334.322894390672445 ], [ 538797.77622187207453, 2224457.423339476808906 ], [ 538737.628568233107217, 2224554.385816881433129 ], [ 538651.309493334847502, 2224623.151311172172427 ], [ 538614.388671856489964, 2224747.595189092680812 ], [ 538581.157266141730361, 2224774.07146602589637 ], [ 538471.626155977253802, 2224908.25117961037904 ], [ 538302.746166912605986, 2225042.787896832451224 ], [ 538126.055149367661215, 2225375.445530725643039 ], [ 538087.108607183676213, 2225531.34179653506726 ], [ 538035.60230127745308, 2225686.160068043507636 ], [ 537911.463864582707174, 2225828.841470269486308 ], [ 537765.052414398523979, 2225886.042238316498697 ], [ 537729.411999570205808, 2226218.937439586035907 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 67.0, "GRIDCODE": 4.0, "X_COORD": 584803.32510999998, "Y_COORD": 261658.0064 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 548682.5154360398883, 2220760.544521059840918 ], [ 548693.728783197235316, 2220856.64384550973773 ], [ 548771.957933812751435, 2221022.062122032977641 ], [ 548808.474823870579712, 2221121.135339581407607 ], [ 548885.302125634741969, 2221119.666618990711868 ], [ 548912.901052667642944, 2221156.484402583912015 ], [ 549064.940764409839176, 2221153.579197478480637 ], [ 549240.585869331029244, 2221214.165549300611019 ], [ 549386.802085509989411, 2221211.370446672663093 ], [ 549424.139474081341177, 2221216.753036319278181 ], [ 549483.902742890990339, 2221296.482558925636113 ], [ 549641.070791534031741, 2221355.233542312867939 ], [ 549674.173653049976565, 2221498.530757204629481 ], [ 549660.667916762176901, 2221593.374632055871189 ], [ 549689.319288526894525, 2221653.959758931770921 ], [ 549681.982696736929938, 2221705.480416936799884 ], [ 549564.565349978976883, 2221890.248937617056072 ], [ 549591.49962262797635, 2222369.051242257468402 ], [ 549629.21536302252207, 2222618.385189375840127 ], [ 549615.644621381419711, 2222713.688642183318734 ], [ 549707.200481928535737, 2222804.087864890694618 ], [ 549730.868853379972279, 2222868.290701 ], [ 549775.737476200331002, 2222912.595611882396042 ], [ 549628.363156659761444, 2223071.592539741657674 ], [ 549628.910911371465772, 2223103.864501821808517 ], [ 549535.446155974757858, 2223126.113530884496868 ], [ 549444.43479659804143, 2223183.196701067499816 ], [ 549380.922561490209773, 2223207.253279303200543 ], [ 549321.566493220394477, 2223236.057196117937565 ], [ 549219.948729525436647, 2223274.538696780800819 ], [ 549049.914469480747357, 2223485.083433302119374 ], [ 548996.800258799223229, 2223587.713964062742889 ], [ 549001.306414178106934, 2223852.363434866070747 ], [ 549052.473950156010687, 2224026.356641038320959 ], [ 549058.459595798980445, 2224322.506605695001781 ], [ 549541.823158768587746, 2224322.034615715965629 ], [ 549833.275029522948898, 2224410.020692936144769 ], [ 549953.037153808167204, 2224532.610718507319689 ], [ 549990.4288364314707, 2224630.838398306630552 ], [ 550285.159141725860536, 2224817.56004146207124 ], [ 550391.05149202758912, 2224752.178048396483064 ], [ 550483.832387949340045, 2224729.390751610510051 ], [ 550569.965818298282102, 2224609.597475353628397 ], [ 550639.39393600274343, 2224618.122077318839729 ], [ 550726.801227934425697, 2224618.2742586331442 ], [ 550755.801932757487521, 2224655.537703298032284 ], [ 550817.034097731113434, 2224688.731803148984909 ], [ 550802.870831221109256, 2224805.186776137910783 ], [ 550864.470213164226152, 2224844.207070699892938 ], [ 551012.790523794363253, 2224774.265011873096228 ], [ 551175.802380143548362, 2224905.345916100777686 ], [ 551383.342445471440442, 2224862.70495431125164 ], [ 551613.593974106013775, 2224827.696617006324232 ], [ 551650.419295985717326, 2224982.128442307002842 ], [ 551698.217193474876694, 2225107.676569411531091 ], [ 551766.190717471530661, 2225232.364275200292468 ], [ 551795.872154672979377, 2225262.750531813129783 ], [ 551840.496891071787104, 2225379.957015551626682 ], [ 551987.54761087463703, 2225518.283924739807844 ], [ 552047.008880032110028, 2225550.517112486995757 ], [ 552130.819471526541747, 2225617.900009365752339 ], [ 552305.171609539771453, 2225698.473980191163719 ], [ 552272.013446184108034, 2225777.872578874230385 ], [ 552142.302607470890507, 2225881.259493906982243 ], [ 552165.902248318423517, 2226041.778942489996552 ], [ 552172.512742897961289, 2226480.634813234210014 ], [ 552269.957260549883358, 2226517.844156508333981 ], [ 552316.604003488551825, 2226506.738233601674438 ], [ 552360.973275930155069, 2226460.7518699336797 ], [ 552479.905656595015898, 2226369.425888990052044 ], [ 552477.854788514901884, 2226249.524021917954087 ], [ 552561.494099991629, 2226162.838506065309048 ], [ 552638.779258143273182, 2226133.564075421541929 ], [ 552673.847970905946568, 2226065.795069116167724 ], [ 552790.313590427627787, 2226082.571886162273586 ], [ 552873.400688156601973, 2226080.975838816724718 ], [ 552937.304647786775604, 2226122.461506880819798 ], [ 553046.797942878562026, 2226069.319391353055835 ], [ 553105.10227514943108, 2226068.201932072639465 ], [ 553150.504566953284666, 2226074.738491170108318 ], [ 553357.25037702685222, 2225859.444624369032681 ], [ 553315.496259125182405, 2225744.441636187955737 ], [ 553327.478345739538781, 2225645.898264858871698 ], [ 553328.107003486948088, 2225456.239196774549782 ], [ 553411.858171296888031, 2225389.479384511709213 ], [ 553365.810280675417744, 2225268.538774948567152 ], [ 553290.846684455755167, 2225105.431431506760418 ], [ 553337.0172041405458, 2224997.112048322334886 ], [ 553387.91618596133776, 2224825.416687067598104 ], [ 553493.445850208867341, 2224784.151082104071975 ], [ 553566.40268274967093, 2224646.716894197277725 ], [ 553630.470946601242758, 2224595.644225181080401 ], [ 553735.081570931593888, 2224116.542964674532413 ], [ 554099.114140124176629, 2223833.434156353585422 ], [ 554856.435947485850193, 2223865.597446409054101 ], [ 554909.125232687569223, 2223695.441726172342896 ], [ 554910.772878576768562, 2223276.44192451890558 ], [ 554854.792197660775855, 2223127.289948127232492 ], [ 554845.612534313229844, 2223078.585974683053792 ], [ 554771.2151696565561, 2223059.701568584889174 ], [ 554644.228297276073135, 2223016.697897844016552 ], [ 554428.774627362377942, 2222825.066856002435088 ], [ 554226.048284921329468, 2222693.220334871672094 ], [ 554030.177006533718668, 2222441.551321026869118 ], [ 553649.969239596510306, 2222101.22197553794831 ], [ 553600.917128911591135, 2221895.513382473960519 ], [ 553508.068227021256462, 2221741.367716957814991 ], [ 553429.888189288089052, 2221583.597399050369859 ], [ 553111.562133509665728, 2221189.080293446779251 ], [ 552908.213020313996822, 2221039.626942665316164 ], [ 552782.510496015194803, 2220938.547297449782491 ], [ 552552.681450456497259, 2220869.169024165719748 ], [ 552374.252285614958964, 2220756.126260794699192 ], [ 552194.286747694481164, 2220392.902021968737245 ], [ 552174.233241717680357, 2220372.370551971718669 ], [ 552125.159430532716215, 2220412.966225098818541 ], [ 552060.226300058769993, 2220532.223051054403186 ], [ 551994.494216805906035, 2220557.238319158554077 ], [ 551924.45514748012647, 2220470.51559273339808 ], [ 551776.892566784634255, 2220538.11060335393995 ], [ 551678.820314984186552, 2220416.670585365965962 ], [ 551583.789308759151027, 2220379.590726988390088 ], [ 551522.635432420996949, 2220378.254980555735528 ], [ 551372.153286314569414, 2220523.371095756068826 ], [ 551226.730633260216564, 2220508.483843971975148 ], [ 551051.948474393226206, 2220558.511946592479944 ], [ 550928.757466889102943, 2220460.861379235051572 ], [ 550864.446653426392004, 2220427.776545513421297 ], [ 550661.723325694561936, 2220520.640026102773845 ], [ 550630.983588292147033, 2220442.380067748017609 ], [ 550574.967855579801835, 2220316.835821527987719 ], [ 550493.254322693217546, 2220315.049837241880596 ], [ 550336.861190874245949, 2220271.663034031167626 ], [ 550361.133704350912012, 2220033.013966160826385 ], [ 550364.967567108455114, 2219866.900599638931453 ], [ 550372.607400976587087, 2219791.760449499823153 ], [ 550373.428295046556741, 2219756.204680785536766 ], [ 550135.698561045108363, 2219750.995118697173893 ], [ 550114.011769292177632, 2219623.902676090598106 ], [ 550025.351982415886596, 2219589.304752445779741 ], [ 549995.534311359398998, 2219552.378449454903603 ], [ 550004.274446625611745, 2219466.436631040647626 ], [ 550004.973717308952473, 2219436.234099864959717 ], [ 550008.028395873843692, 2219406.177782670594752 ], [ 550009.129413784947246, 2219358.573282273486257 ], [ 549923.136933890171349, 2219310.745522392913699 ], [ 549896.442619733279571, 2219277.69027500692755 ], [ 549859.722129584988579, 2219246.316422234289348 ], [ 549684.955852445447817, 2219296.341901581734419 ], [ 549667.613085204269737, 2219112.252763345837593 ], [ 549603.304144972818904, 2219079.165706968866289 ], [ 549482.27069820673205, 2219134.601862938143313 ], [ 549479.543017337331548, 2219252.817565185949206 ], [ 549404.425264502991922, 2219462.607633712701499 ], [ 549403.093973105889745, 2219520.343776009976864 ], [ 549361.157454675296322, 2219589.669903809204698 ], [ 549392.101089876843616, 2219700.937237831763923 ], [ 549250.431008042301983, 2219818.108213809318841 ], [ 549303.5274674318498, 2219937.108590482734144 ], [ 549249.639056748710573, 2220026.190682811662555 ], [ 549307.895311578293331, 2220088.032455197535455 ], [ 549340.877023940556683, 2220128.876943685114384 ], [ 549308.34305867808871, 2220448.703695059753954 ], [ 549180.328517027781345, 2220613.861660497263074 ], [ 549092.429431745200418, 2220649.319175909273326 ], [ 549006.534196577849798, 2220732.14468289911747 ], [ 548926.618766434490681, 2220764.383436272852123 ], [ 548767.159636330092326, 2220748.049580274149776 ], [ 548682.5154360398883, 2220760.544521059840918 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 68.0, "GRIDCODE": 2.0, "X_COORD": 580015.48696999997, "Y_COORD": 257153.50933 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 547269.585099507472478, 2218011.121187740005553 ], [ 547277.48701147432439, 2218048.490125604905188 ], [ 547305.24678628181573, 2218023.69000625424087 ], [ 547269.585099507472478, 2218011.121187740005553 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 69.0, "GRIDCODE": 2.0, "X_COORD": 580274.48508000001, "Y_COORD": 260398.1419 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 545231.214922131621279, 2221937.389366488903761 ], [ 545212.667739335331134, 2222012.971395385451615 ], [ 544995.371230429038405, 2222039.263367758132517 ], [ 544861.503363510011695, 2221979.828864502720535 ], [ 544794.352331761969253, 2222049.420731981284916 ], [ 544746.65400101733394, 2222243.771323432214558 ], [ 544747.537119537009858, 2222295.817068713717163 ], [ 544916.775984449894167, 2222446.139603505842388 ], [ 544908.093019640538841, 2222507.078909943811595 ], [ 544970.537481734179892, 2222540.083239043131471 ], [ 544996.082168985973112, 2222574.160726747475564 ], [ 545045.677839518059045, 2222623.14257347304374 ], [ 545057.236186755821109, 2223031.63225245475769 ], [ 545141.41446982731577, 2223155.598292899318039 ], [ 545203.070672030444257, 2223270.602887012064457 ], [ 545299.669116157107055, 2223365.989260416477919 ], [ 545332.099801452830434, 2223417.779796727001667 ], [ 545267.162249927408993, 2223467.638409866020083 ], [ 545419.605737387901172, 2223512.799917969852686 ], [ 545617.120490806060843, 2223641.076387790963054 ], [ 545881.3711941416841, 2223688.489059956744313 ], [ 546082.479277836158872, 2223664.377579119987786 ], [ 546198.750220498070121, 2223607.954015512019396 ], [ 546321.710967184044421, 2223625.680991729721427 ], [ 546419.76120196597185, 2223623.813738029450178 ], [ 546482.589711788343266, 2223664.61466524656862 ], [ 546878.347043198067695, 2223735.618241400457919 ], [ 547250.26124342228286, 2223981.448169712908566 ], [ 547357.516261145472527, 2224352.079047391191125 ], [ 547646.922207202529535, 2224561.722348307259381 ], [ 547870.788736699614674, 2224672.168603996746242 ], [ 547967.08186737250071, 2224714.912461495958269 ], [ 548194.607487209723331, 2224752.766294419765472 ], [ 548308.707005761214532, 2224725.613637500442564 ], [ 548626.777587810764089, 2224625.64518403634429 ], [ 548867.387477436685003, 2224474.731968562118709 ], [ 549010.137767161359079, 2224396.238211858086288 ], [ 549058.459595798980445, 2224322.506605695001781 ], [ 549052.473950156010687, 2224026.356641038320959 ], [ 549001.306414178106934, 2223852.363434866070747 ], [ 548996.800258799223229, 2223587.713964062742889 ], [ 549049.914469480747357, 2223485.083433302119374 ], [ 549219.948729525436647, 2223274.538696780800819 ], [ 549321.566493220394477, 2223236.057196117937565 ], [ 549380.922561490209773, 2223207.253279303200543 ], [ 549444.43479659804143, 2223183.196701067499816 ], [ 549535.446155974757858, 2223126.113530884496868 ], [ 549628.910911371465772, 2223103.864501821808517 ], [ 549628.363156659761444, 2223071.592539741657674 ], [ 549775.737476200331002, 2222912.595611882396042 ], [ 549730.868853379972279, 2222868.290701 ], [ 549707.200481928535737, 2222804.087864890694618 ], [ 549615.644621381419711, 2222713.688642183318734 ], [ 549629.21536302252207, 2222618.385189375840127 ], [ 549591.49962262797635, 2222369.051242257468402 ], [ 549564.565349978976883, 2221890.248937617056072 ], [ 549681.982696736929938, 2221705.480416936799884 ], [ 549689.319288526894525, 2221653.959758931770921 ], [ 549660.667916762176901, 2221593.374632055871189 ], [ 549674.173653049976565, 2221498.530757204629481 ], [ 549641.070791534031741, 2221355.233542312867939 ], [ 549483.902742890990339, 2221296.482558925636113 ], [ 549424.139474081341177, 2221216.753036319278181 ], [ 549386.802085509989411, 2221211.370446672663093 ], [ 549240.585869331029244, 2221214.165549300611019 ], [ 549064.940764409839176, 2221153.579197478480637 ], [ 548912.901052667642944, 2221156.484402583912015 ], [ 548885.302125634741969, 2221119.666618990711868 ], [ 548808.474823870579712, 2221121.135339581407607 ], [ 548771.957933812751435, 2221022.062122032977641 ], [ 548693.728783197235316, 2220856.64384550973773 ], [ 548682.5154360398883, 2220760.544521059840918 ], [ 548530.263230186305009, 2220695.663763840682805 ], [ 548490.430985391722061, 2220734.068578951060772 ], [ 548434.925676346058026, 2220759.71486706007272 ], [ 548418.067588245379739, 2220456.212874718010426 ], [ 548269.852139435010031, 2220417.913702167570591 ], [ 548185.480653270147741, 2220351.030127455480397 ], [ 548052.490280079422519, 2220299.129077184014022 ], [ 547884.311326124588959, 2220227.460030984133482 ], [ 547841.296059828368016, 2220117.931090764701366 ], [ 547633.526807185378857, 2220075.930448471568525 ], [ 547576.507439347798936, 2220040.687731117941439 ], [ 547487.124399876105599, 2220081.618535534478724 ], [ 547554.718796643079259, 2219919.805523690767586 ], [ 547601.600536426063627, 2219735.231891677714884 ], [ 547730.636649682652205, 2219683.177046535536647 ], [ 547872.68275831581559, 2219546.206024689599872 ], [ 547970.537802326958627, 2219521.433164037764072 ], [ 547973.534213330014609, 2219391.74445014167577 ], [ 547868.560702243004926, 2219156.457665366120636 ], [ 547919.924694326822646, 2219033.49456711858511 ], [ 547878.602126573910937, 2218881.313395496457815 ], [ 547696.239847392542288, 2218964.836459690704942 ], [ 547382.655791730154306, 2218889.277518399991095 ], [ 547352.556957543711178, 2218812.633413481526077 ], [ 547358.151048268075101, 2218757.66467572748661 ], [ 547360.881202579825185, 2218639.529182915575802 ], [ 547415.482013847446069, 2218594.369242209009826 ], [ 547342.165446878992952, 2218330.710010917857289 ], [ 547187.96685693890322, 2218112.489273939281702 ], [ 547162.090608626254834, 2218066.338437709026039 ], [ 547269.585099507472478, 2218011.121187740005553 ], [ 547183.738580611883663, 2217900.772642413154244 ], [ 546934.582603890565224, 2217928.83662267960608 ], [ 546863.689760136068799, 2218062.36558601539582 ], [ 546769.324956763070077, 2218137.575390218757093 ], [ 546794.78207458218094, 2218214.382686592638493 ], [ 546853.20825734641403, 2218274.201573533937335 ], [ 546785.663501109578647, 2218328.038424273952842 ], [ 546728.38501599652227, 2218385.297070637345314 ], [ 546571.542961088591255, 2218423.807320128194988 ], [ 546478.504040750907734, 2218460.182859733700752 ], [ 546365.331070706131868, 2218573.323179630562663 ], [ 546266.620322534698062, 2218573.14008985646069 ], [ 546055.888330011162907, 2218526.35472443792969 ], [ 546024.876683140755631, 2218486.493438643403351 ], [ 545878.458171038888395, 2218522.437406349927187 ], [ 545899.489131477894261, 2218637.619611733593047 ], [ 546010.032874404569156, 2218846.778602275066078 ], [ 545998.001185935572721, 2218945.631180074997246 ], [ 546107.442820166470483, 2218987.442711586132646 ], [ 546141.178049570764415, 2219076.091484651900828 ], [ 546227.55569410440512, 2219219.539794833399355 ], [ 546407.7392290601274, 2219595.138943765312433 ], [ 546362.000304861459881, 2219876.214436227455735 ], [ 546231.88541358418297, 2220062.119788264855742 ], [ 546211.856069049681537, 2220226.687929965555668 ], [ 546355.575524208601564, 2220373.844729715026915 ], [ 546216.35894803958945, 2220439.485375849530101 ], [ 546146.692100587300956, 2220439.357313372194767 ], [ 546059.95868782850448, 2220428.694540154188871 ], [ 545996.876745472080074, 2220458.438507362268865 ], [ 545933.876319166622125, 2220483.070212909020483 ], [ 545810.696387576055713, 2220567.849473248235881 ], [ 545454.985057949321344, 2220576.413151110522449 ], [ 545438.209078989224508, 2220714.237334330566227 ], [ 545488.549232857301831, 2220846.523026280105114 ], [ 545522.136223719688132, 2220880.916478772647679 ], [ 545578.485184607794508, 2220984.319245691411197 ], [ 545633.5344561325619, 2221040.685264229774475 ], [ 545612.605564006022178, 2221212.638247127644718 ], [ 545732.279679386061616, 2221319.112384900450706 ], [ 545845.623674323200248, 2221380.570525959134102 ], [ 545617.014666828559712, 2221419.608296659775078 ], [ 545532.989230629988015, 2221643.875582935288548 ], [ 545469.737707640510052, 2221694.283410118892789 ], [ 545437.768702227156609, 2221754.48487907089293 ], [ 545404.545154802501202, 2221780.96652876958251 ], [ 545344.207436673459597, 2221894.600288706831634 ], [ 545277.605033846804872, 2221925.999678179621696 ], [ 545231.214922131621279, 2221937.389366488903761 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 70.0, "GRIDCODE": 3.0, "X_COORD": 591088.51003999996, "Y_COORD": 259234.92046 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 555222.650243129115552, 2216538.680739193223417 ], [ 555089.52826238470152, 2216558.939298300072551 ], [ 554761.623176240012981, 2216493.940059438347816 ], [ 554701.425063528586179, 2216522.337613984011114 ], [ 554574.025870746583678, 2216572.170363393612206 ], [ 554606.578025543713011, 2216605.499168016016483 ], [ 554638.51157476415392, 2216689.395632325671613 ], [ 554525.221410524216481, 2216833.502166354097426 ], [ 554562.313927537063137, 2216914.240187019109726 ], [ 554491.598883353290148, 2217169.530346320010722 ], [ 554661.384125703363679, 2217311.220430389046669 ], [ 554731.915080995648168, 2217401.858479375950992 ], [ 554647.496002562344074, 2217706.629373766481876 ], [ 554646.908174928394146, 2217883.463766337372363 ], [ 554851.843968440545723, 2217994.559094481170177 ], [ 554830.047065161634237, 2218173.843772308900952 ], [ 554773.50583370833192, 2218218.919897542335093 ], [ 554740.453559413319454, 2218296.687969831749797 ], [ 554783.490957118337974, 2218589.456386040896177 ], [ 554776.846569813671522, 2218644.101754460483789 ], [ 554835.704255743999965, 2218772.190702573396266 ], [ 554949.142020287574269, 2218772.385437045246363 ], [ 555008.471572057693265, 2218779.667005720548332 ], [ 555107.21331393183209, 2218779.836478899233043 ], [ 555216.267046533641405, 2218979.909273253753781 ], [ 555381.512652653967962, 2219043.008779363706708 ], [ 555467.190423903404735, 2219080.263694814406335 ], [ 555603.079613595618866, 2219117.233889422379434 ], [ 555666.250235778046772, 2218998.209124198183417 ], [ 555820.000171504449099, 2218950.901887704618275 ], [ 555858.692780829383992, 2219033.418952935375273 ], [ 555722.389731707633473, 2219206.792988651432097 ], [ 555721.95920184860006, 2219337.17146222665906 ], [ 555717.990789499483071, 2219369.814739688299596 ], [ 555582.785770585993305, 2219353.216154189780354 ], [ 555358.731389311142266, 2219419.181366224773228 ], [ 555407.322822130168788, 2219589.031640305183828 ], [ 555428.232288386789151, 2219706.421644048765302 ], [ 555270.051282575936057, 2219888.368756585754454 ], [ 555384.828012730344199, 2219950.583567403256893 ], [ 555468.632561283069663, 2220017.967139265500009 ], [ 555577.147629974642769, 2220076.787941440008581 ], [ 555636.645879697753116, 2220326.307310606352985 ], [ 555474.630014971480705, 2220430.475511799566448 ], [ 555426.8189063873142, 2220622.075181286782026 ], [ 555511.005624229786918, 2220805.270889597013593 ], [ 555529.633757399162278, 2220959.34879675321281 ], [ 555588.9180400473997, 2221057.774809735827148 ], [ 555641.103471595793962, 2221276.592368079349399 ], [ 555768.541514058364555, 2221345.666462824679911 ], [ 555564.634704869356938, 2221425.417886458337307 ], [ 555504.4712385853054, 2221628.410653279162943 ], [ 555544.108190610539168, 2221714.667609051801264 ], [ 555586.775793348555453, 2221893.573778633959591 ], [ 555519.92708823538851, 2222050.407588531263173 ], [ 555519.67994900571648, 2222125.708072367124259 ], [ 555607.100333646521904, 2222173.088512681424618 ], [ 555598.816476432722993, 2222241.260061632841825 ], [ 555469.550503493170254, 2222405.669841296970844 ], [ 555369.997821254422888, 2222544.157228335738182 ], [ 555125.973510167212225, 2222738.689933690242469 ], [ 554959.054933405132033, 2222950.368319001048803 ], [ 554845.612534313229844, 2223078.585974683053792 ], [ 554854.792197660775855, 2223127.289948127232492 ], [ 554910.772878576768562, 2223276.44192451890558 ], [ 554909.125232687569223, 2223695.441726172342896 ], [ 554856.435947485850193, 2223865.597446409054101 ], [ 554856.049184844014235, 2224121.042081288993359 ], [ 555101.185077761765569, 2224361.570118745788932 ], [ 555338.767875627265312, 2224311.376976361498237 ], [ 555423.496282491832972, 2224424.377294555306435 ], [ 555593.715336397988722, 2224499.916288802400231 ], [ 555701.279556061839685, 2224478.582857428118587 ], [ 555791.907026802189648, 2224451.16412453353405 ], [ 555875.861955695669167, 2224519.643900640308857 ], [ 556025.239457305055112, 2224556.898062212392688 ], [ 556110.346156241721474, 2224594.659020425751805 ], [ 556259.723873560200445, 2224631.912484277971089 ], [ 556281.525590737932362, 2224726.23753117211163 ], [ 556401.12461691419594, 2224761.645588808692992 ], [ 556503.558732182136737, 2224828.145517953671515 ], [ 556556.331420433823951, 2224646.662445021793246 ], [ 556739.632215482881293, 2224577.218629167415202 ], [ 556830.10412713396363, 2224402.3525256710127 ], [ 556946.369063600781374, 2224388.260005367919803 ], [ 556996.504091871669516, 2224316.60621093492955 ], [ 557028.462557273218408, 2224256.400769907981157 ], [ 557078.321957444655709, 2224175.972701271995902 ], [ 557040.39748373394832, 2224043.449740533716977 ], [ 557155.997887221979909, 2224057.639354269951582 ], [ 557222.290674915537238, 2224026.362953951582313 ], [ 557311.693567035486922, 2224037.334735318087041 ], [ 557376.649180747452192, 2223863.876560743898153 ], [ 557495.464612421230413, 2223745.062995447777212 ], [ 557601.636233381577767, 2223718.97310637217015 ], [ 557724.405038596247323, 2223643.147967091761529 ], [ 557874.534126908518374, 2223643.392905212938786 ], [ 557933.867902666213922, 2223650.670520722866058 ], [ 557993.647973033599555, 2223650.769221005961299 ], [ 558023.314860973856412, 2223654.407971628010273 ], [ 558106.643883965793066, 2223654.539759516716003 ], [ 558141.50024021032732, 2223690.220130704343319 ], [ 558174.704483582288958, 2223732.871723538264632 ], [ 558354.045229064417072, 2223733.15947319380939 ], [ 558479.85971035505645, 2223894.795753989368677 ], [ 558566.647780632250942, 2223894.93424026388675 ], [ 558632.75294407911133, 2223962.585570267401636 ], [ 558657.008976916084066, 2224026.272413303144276 ], [ 558746.249463067739271, 2224060.342591261491179 ], [ 558847.429368827259168, 2224124.420472634024918 ], [ 558945.027850391343236, 2224136.391632758080959 ], [ 559074.649754425161518, 2224109.742450820282102 ], [ 559229.262182206846774, 2224207.658482282422483 ], [ 559343.717224760912359, 2224023.020100738853216 ], [ 559384.906296826782636, 2223857.931434530764818 ], [ 559569.673798265401274, 2223840.409489375539124 ], [ 559634.347236946690828, 2223718.543278277851641 ], [ 559767.058498629950918, 2223734.820310008712113 ], [ 559866.765814154641703, 2223734.981112230569124 ], [ 559987.858890395145863, 2223775.975228352472186 ], [ 560196.213053970132023, 2223817.414834804832935 ], [ 560252.120719762053341, 2223852.816296993754804 ], [ 560311.58292393409647, 2223885.041168072260916 ], [ 560356.315255549387075, 2223942.499882651492953 ], [ 560544.195093926275149, 2223990.165370848029852 ], [ 560729.385099913226441, 2224122.597384762018919 ], [ 561024.593322287546471, 2224097.919423911720514 ], [ 561078.230991035234183, 2224055.149455054663122 ], [ 561122.418375982204452, 2223878.025718367658556 ], [ 561178.067729425150901, 2223878.116441725753248 ], [ 561253.4518203928601, 2223887.358028264716268 ], [ 561313.795070893596858, 2223683.707038729451597 ], [ 561436.130908146384172, 2223561.359899146482348 ], [ 561488.75019953364972, 2223567.812198552303016 ], [ 561558.592764057801105, 2223540.486424555070698 ], [ 561618.754716861294582, 2223480.317263472825289 ], [ 561865.111096134991385, 2223383.944881387986243 ], [ 561871.728907165699638, 2223329.449232176877558 ], [ 561817.252850885968655, 2223186.402344263158739 ], [ 561710.2323820971651, 2223076.890344547107816 ], [ 561681.717384096118622, 2223002.020274785347283 ], [ 561653.905058164498769, 2222941.510606916621327 ], [ 561629.647171058459207, 2222877.824231307022274 ], [ 561421.295970281702466, 2222836.389345422387123 ], [ 561371.555637765908614, 2222772.499602098949254 ], [ 561278.021174115478061, 2222736.793900274671614 ], [ 561213.428783321520314, 2222695.886238355189562 ], [ 560941.935242733568884, 2222695.465501641854644 ], [ 560656.468227034434676, 2222492.741968627087772 ], [ 560733.490010584588163, 2222098.029291876591742 ], [ 560691.456723806797527, 2221987.639000279828906 ], [ 560582.245453167008236, 2221907.396695868112147 ], [ 560565.47738521755673, 2221723.194906703196466 ], [ 560306.96906498039607, 2221657.606544382870197 ], [ 560231.972101768827997, 2221561.257065475918353 ], [ 560052.955797075410374, 2221539.300829340703785 ], [ 559980.896954445284791, 2221539.182501086965203 ], [ 559937.570799815002829, 2221444.925564697943628 ], [ 559891.956116917775944, 2221325.140854785218835 ], [ 559768.288652522023767, 2221309.969155669212341 ], [ 559723.455326740513556, 2221309.896478969603777 ], [ 559678.956631884677336, 2221304.439441906288266 ], [ 559633.368125968496315, 2221304.36424888856709 ], [ 559590.470384471351281, 2221249.253273987211287 ], [ 559348.631335264653899, 2221176.281201555393636 ], [ 559151.911605147295631, 2220900.369101073592901 ], [ 559221.875385278952308, 2220814.31326886638999 ], [ 559296.926972044981085, 2220754.475318927317858 ], [ 559406.837343324208632, 2220614.662963489070535 ], [ 559354.429925813688897, 2220500.636032910086215 ], [ 559327.886118546593934, 2220430.926719164475799 ], [ 559188.782064298051409, 2220307.212103438563645 ], [ 559104.480044716736302, 2220261.520636486820877 ], [ 559079.55457398109138, 2220110.841424989514053 ], [ 558968.897448536939919, 2219997.585296124219894 ], [ 559022.73264715471305, 2219935.894348385743797 ], [ 559159.854342994163744, 2219912.448172314092517 ], [ 558319.922261910978705, 2219831.67639952711761 ], [ 558116.144649688038044, 2219667.8291244963184 ], [ 558089.306881223572418, 2219694.713999724946916 ], [ 558043.280745288357139, 2219781.440222318284214 ], [ 557937.572826199233532, 2219781.272949289530516 ], [ 557908.571675362763926, 2219744.010727225802839 ], [ 557833.448588228202425, 2219703.293607612140477 ], [ 557716.596728508127853, 2219553.15039873868227 ], [ 557638.134659013827331, 2219510.623673286288977 ], [ 557639.383372517768294, 2219128.628801393322647 ], [ 557697.212796633131802, 2219082.522684942930937 ], [ 557607.368340324261226, 2218846.525377108715475 ], [ 557529.716581292450428, 2218767.045709755271673 ], [ 557614.850378594826907, 2218699.163753843866289 ], [ 557675.013608487439342, 2218638.994675528258085 ], [ 557758.684038902400061, 2218572.284468300640583 ], [ 557868.152291413978674, 2218433.033993500284851 ], [ 557754.182227957760915, 2218341.387376312166452 ], [ 557581.787359824054874, 2218341.105265273712575 ], [ 557549.985810764948837, 2218300.249549234285951 ], [ 557520.306273329304531, 2218269.863258237950504 ], [ 557494.103547547478229, 2218236.199547048658133 ], [ 557345.25916804454755, 2218235.957821900956333 ], [ 557321.146292955963872, 2218134.842260422185063 ], [ 557243.008997954661027, 2217964.806637947447598 ], [ 557243.501388812903315, 2217814.802077099680901 ], [ 557303.279502256889828, 2217674.525411333888769 ], [ 557263.772535657626577, 2217588.553147914819419 ], [ 557233.328067938331515, 2217460.888749497942626 ], [ 557067.874511514557526, 2217460.613917680457234 ], [ 557036.810570456786081, 2217393.012389828450978 ], [ 556992.155422038515098, 2217176.821252731606364 ], [ 556904.799636668991297, 2217112.613667666912079 ], [ 556833.738889468950219, 2216982.246683094650507 ], [ 556653.451397583354264, 2216853.270649446174502 ], [ 556595.263585121603683, 2216853.179815546609461 ], [ 556487.555002027424052, 2216784.940734449774027 ], [ 556433.24622495030053, 2216778.274244341999292 ], [ 556313.69747404998634, 2216778.072615099139512 ], [ 556209.873967053368688, 2216765.331733829341829 ], [ 556014.483090797904879, 2216765.007344552315772 ], [ 555957.757289002416655, 2216706.934854407794774 ], [ 555821.049955718568526, 2216531.254116223193705 ], [ 555773.650453823036514, 2216556.864584922790527 ], [ 555736.759854523465037, 2216681.332881172187626 ], [ 555673.075214341632091, 2216732.111804662272334 ], [ 555613.253786826040596, 2216791.932405475527048 ], [ 555519.617815531441011, 2216751.214219721034169 ], [ 555417.872607599012554, 2216751.043540125712752 ], [ 555362.276981948525645, 2216604.980227122083306 ], [ 555325.339319897932, 2216557.5119200469926 ], [ 555265.718090404057875, 2216557.412037852220237 ], [ 555222.650243129115552, 2216538.680739193223417 ] ] ] ] } }, { "type": "Feature", "properties": { "ID": 71.0, "GRIDCODE": 1.0, "X_COORD": 586669.00687000004, "Y_COORD": 258034.42608 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 552174.233241717680357, 2220372.370551971718669 ], [ 552194.286747694481164, 2220392.902021968737245 ], [ 552374.252285614958964, 2220756.126260794699192 ], [ 552552.681450456497259, 2220869.169024165719748 ], [ 552782.510496015194803, 2220938.547297449782491 ], [ 552908.213020313996822, 2221039.626942665316164 ], [ 553111.562133509665728, 2221189.080293446779251 ], [ 553429.888189288089052, 2221583.597399050369859 ], [ 553508.068227021256462, 2221741.367716957814991 ], [ 553600.917128911591135, 2221895.513382473960519 ], [ 553649.969239596510306, 2222101.22197553794831 ], [ 554030.177006533718668, 2222441.551321026869118 ], [ 554226.048284921329468, 2222693.220334871672094 ], [ 554428.774627362377942, 2222825.066856002435088 ], [ 554644.228297276073135, 2223016.697897844016552 ], [ 554771.2151696565561, 2223059.701568584889174 ], [ 554845.612534313229844, 2223078.585974683053792 ], [ 554959.054933405132033, 2222950.368319001048803 ], [ 555125.973510167212225, 2222738.689933690242469 ], [ 555369.997821254422888, 2222544.157228335738182 ], [ 555469.550503493170254, 2222405.669841296970844 ], [ 555598.816476432722993, 2222241.260061632841825 ], [ 555607.100333646521904, 2222173.088512681424618 ], [ 555519.67994900571648, 2222125.708072367124259 ], [ 555519.92708823538851, 2222050.407588531263173 ], [ 555586.775793348555453, 2221893.573778633959591 ], [ 555544.108190610539168, 2221714.667609051801264 ], [ 555504.4712385853054, 2221628.410653279162943 ], [ 555564.634704869356938, 2221425.417886458337307 ], [ 555768.541514058364555, 2221345.666462824679911 ], [ 555641.103471595793962, 2221276.592368079349399 ], [ 555588.9180400473997, 2221057.774809735827148 ], [ 555529.633757399162278, 2220959.34879675321281 ], [ 555511.005624229786918, 2220805.270889597013593 ], [ 555426.8189063873142, 2220622.075181286782026 ], [ 555474.630014971480705, 2220430.475511799566448 ], [ 555636.645879697753116, 2220326.307310606352985 ], [ 555577.147629974642769, 2220076.787941440008581 ], [ 555468.632561283069663, 2220017.967139265500009 ], [ 555384.828012730344199, 2219950.583567403256893 ], [ 555270.051282575936057, 2219888.368756585754454 ], [ 555428.232288386789151, 2219706.421644048765302 ], [ 555407.322822130168788, 2219589.031640305183828 ], [ 555358.731389311142266, 2219419.181366224773228 ], [ 555582.785770585993305, 2219353.216154189780354 ], [ 555717.990789499483071, 2219369.814739688299596 ], [ 555721.95920184860006, 2219337.17146222665906 ], [ 555722.389731707633473, 2219206.792988651432097 ], [ 555858.692780829383992, 2219033.418952935375273 ], [ 555820.000171504449099, 2218950.901887704618275 ], [ 555666.250235778046772, 2218998.209124198183417 ], [ 555603.079613595618866, 2219117.233889422379434 ], [ 555467.190423903404735, 2219080.263694814406335 ], [ 555381.512652653967962, 2219043.008779363706708 ], [ 555216.267046533641405, 2218979.909273253753781 ], [ 555107.21331393183209, 2218779.836478899233043 ], [ 555008.471572057693265, 2218779.667005720548332 ], [ 554949.142020287574269, 2218772.385437045246363 ], [ 554835.704255743999965, 2218772.190702573396266 ], [ 554776.846569813671522, 2218644.101754460483789 ], [ 554783.490957118337974, 2218589.456386040896177 ], [ 554740.453559413319454, 2218296.687969831749797 ], [ 554773.50583370833192, 2218218.919897542335093 ], [ 554830.047065161634237, 2218173.843772308900952 ], [ 554851.843968440545723, 2217994.559094481170177 ], [ 554646.908174928394146, 2217883.463766337372363 ], [ 554647.496002562344074, 2217706.629373766481876 ], [ 554731.915080995648168, 2217401.858479375950992 ], [ 554661.384125703363679, 2217311.220430389046669 ], [ 554491.598883353290148, 2217169.530346320010722 ], [ 554562.313927537063137, 2216914.240187019109726 ], [ 554525.221410524216481, 2216833.502166354097426 ], [ 554638.51157476415392, 2216689.395632325671613 ], [ 554606.578025543713011, 2216605.499168016016483 ], [ 554574.025870746583678, 2216572.170363393612206 ], [ 554701.425063528586179, 2216522.337613984011114 ], [ 554761.623176240012981, 2216493.940059438347816 ], [ 555089.52826238470152, 2216558.939298300072551 ], [ 555222.650243129115552, 2216538.680739193223417 ], [ 555163.360553022939712, 2216277.676229174248874 ], [ 555229.85682580282446, 2216191.862308543175459 ], [ 555266.069751698058099, 2216071.966705285012722 ], [ 555336.319824545062147, 2215903.722157112322748 ], [ 555292.987990283407271, 2215836.354172345250845 ], [ 555108.577231824281625, 2215889.159770350903273 ], [ 554935.084436973440461, 2215751.639090232551098 ], [ 554853.686390149639919, 2215743.306008303537965 ], [ 554730.710269742645323, 2215740.62118402030319 ], [ 554543.329540188773535, 2215678.284569900482893 ], [ 554312.33104615774937, 2215835.615351567976177 ], [ 554205.596969331731088, 2215824.691085334867239 ], [ 554004.223041797522455, 2215854.442427761852741 ], [ 553943.768513916409574, 2215779.579250173643231 ], [ 553851.247126181144267, 2215770.104368082247674 ], [ 553817.522020494914614, 2215832.059444859623909 ], [ 553665.707495678914711, 2215851.738738457672298 ], [ 553550.031898996443488, 2215884.861679116263986 ], [ 553465.333570477087051, 2215779.967389920726418 ], [ 553395.760736313881353, 2215806.445709527470171 ], [ 553286.30092763400171, 2215912.027539594098926 ], [ 553157.257345762685873, 2215971.148713581264019 ], [ 553120.867081504780799, 2215970.353428834117949 ], [ 553091.165955707314424, 2215967.314622422680259 ], [ 553016.541688779834658, 2215965.683409710414708 ], [ 552915.543144142953679, 2215955.341435276903212 ], [ 552880.294182367157191, 2215984.502313135191798 ], [ 552849.705289141624235, 2216014.003958967514336 ], [ 552816.99123455141671, 2216041.06973787304014 ], [ 552772.565196218318306, 2216157.198173548094928 ], [ 552690.350824831053615, 2216155.398429468274117 ], [ 552638.887680742074735, 2216091.66662494558841 ], [ 552539.456613056594506, 2216129.509767183102667 ], [ 552535.676344836014323, 2216293.464148461818695 ], [ 552440.110333547228947, 2216351.559042874723673 ], [ 552318.911031679599546, 2216400.464539989829063 ], [ 552280.788563073030673, 2216491.757558538578451 ], [ 552240.044417268480174, 2216598.255016438663006 ], [ 552028.744626826024614, 2216635.513769153505564 ], [ 551939.583833360462449, 2216709.268923230469227 ], [ 551967.251342853298411, 2216826.819587980397046 ], [ 552140.79368736105971, 2216923.337166908197105 ], [ 552189.603467023116536, 2217032.732224172912538 ], [ 552171.599994098418392, 2217209.751254175789654 ], [ 552262.614780843141489, 2217413.737976506352425 ], [ 552218.871678222552873, 2217486.064715468324721 ], [ 552186.405770743498579, 2217545.695687529630959 ], [ 552089.26652555691544, 2217671.037592104636133 ], [ 552024.827674084226601, 2218125.042449948377907 ], [ 551936.076257676002569, 2218271.771817280910909 ], [ 551913.191486298455857, 2218496.82267386559397 ], [ 552024.257592133944854, 2218499.254018279723823 ], [ 552063.764604495489039, 2218641.284011932089925 ], [ 552046.932920330786146, 2218806.815114396624267 ], [ 552045.53963899530936, 2218867.220899363979697 ], [ 552033.887832776177675, 2218981.796351063996553 ], [ 552061.048671984346583, 2219079.447724997997284 ], [ 552056.417758354335092, 2219124.987217902205884 ], [ 552055.373773894854821, 2219170.291407366283238 ], [ 552041.998863888671622, 2219301.817067532800138 ], [ 552069.642548308009282, 2219495.559468093328178 ], [ 551967.649062633980066, 2219664.193114554509521 ], [ 552133.222266911412589, 2219839.953313706442714 ], [ 552185.942959098378196, 2219935.113023211248219 ], [ 552243.342097304644994, 2219996.041767311282456 ], [ 552189.528516379534267, 2220357.620794892311096 ], [ 552174.233241717680357, 2220372.370551971718669 ] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/multipolygon3D_no_ir_write_test.json0000664000175000017500000000107713701057752031074 0ustar eveneven{ "type": "FeatureCollection", "name": "mpoly_shape", "features": [ { "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 1.0 ], [ 1.0, 1.0, 2.0 ], [ 0.0, 0.0, 3.0 ] ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "DoubleTriangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0, 0.0 ], [ 4.0, 0.0, 1.0 ], [ 4.0, 1.0, 2.0 ], [ 3.0, 0.0, 3.0 ] ] ], [ [ [ 3.0, 0.0, -1.0 ], [ 4.0, 1.0, -2.0 ], [ 3.0, 1.0, -3.0 ], [ 3.0, 0.0, -4.0 ] ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/line_write_test.json0000664000175000017500000000076513701057752025707 0ustar eveneven{ "type": "FeatureCollection", "name": "segv", "features": [ { "type": "Feature", "properties": { "NAMES": "seg1" }, "geometry": { "type": "LineString", "coordinates": [ [ 1.5, -1.5 ] ] } }, { "type": "Feature", "properties": { "NAMES": "seg2" }, "geometry": { "type": "LineString", "coordinates": [ [ 30.5, 30.5 ], [ 5.0, 5.0 ] ] } }, { "type": "Feature", "properties": { "NAMES": "seg3" }, "geometry": { "type": "LineString", "coordinates": [ [ 9.0, -9.0 ], [ 10.0, -10.0 ], [ -1.0, 1.0 ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/write-tests/polygon_no_ir_write_test.json0000664000175000017500000000066213701057752027631 0ustar eveneven{ "type": "FeatureCollection", "name": "noir_write", "features": [ { "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ] } }, { "type": "Feature", "properties": { "NAMES": "Square" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ] ] } } ] } gdalautotest-3.1.2/gdrivers/data/netcdf-sg/line_test.nc0000664000175000017500000000217413701057752021626 0ustar evenevenCDF cinstancenode  ConventionsCF-1.8 NAMES unitsunknowngeometrynames_geometrydx_nodes units degrees_east standard_name longitudeaxisX$y_nodes units degrees_north standard_namelatitudeaxisYncount  long_name node countdnames_geometry  geometry_typelinenode_coordinatesx_nodes y_nodes node_countncountxTrail_1Trail_2Trail_3Trail_4Trail_5?@@@@@@@ @"@$ "$ "$?@@@@@@@ @"@$|gdalautotest-3.1.2/gdrivers/data/netcdf-sg/unequal_xy.nc0000664000175000017500000000210013701057752022017 0ustar evenevenCDF cinstancenodenode_2parts  ConventionsCF-1.8 NAMES unitsunknowngeometry serpenskix_nodes units degrees_east standard_name longitudeaxisX8y_nodes units degrees_north standard_namelatitudeaxisY@ncount  long_name node count(pcount  long_namepart node count,int_ring  long_nameinterior rings4 serpenski  geometry_typepolygonnode_coordinatesx_nodes y_nodes node_countncount interior_ingint_ring NULL 0.0, 1.0, 0.0, 50, 0, -1 Red Green Blue 512 128 6.71089e+07 NearestNeighbour Byte rgb_gcp.vrt 1 0 0.0,1,0,50,0,-1 0.0,1,0,50,0,-1 gdalautotest-3.1.2/gdrivers/data/fake_nsif.ntf0000664000175000017500000000362713701057753020107 0ustar evenevenNSIF01.0003BF01GDAL 20021216151629 U 00000000000 00000000194300040400100063900000009000000000000000000000000000IMMissing 20021216151629 U 0Unknown 0000003000000030INTMONO VIS 08RG411704N0200433E411907N0200445E411900N0200731E411656N0200719E0NC1M N 00B00010001003000300800100000000000001.0 0000000137000BLOCKA00123010000001000000000 +41.319331+020.078400+41.317083+020.126072+41.281634+020.122570+41.283881+020.074924 U8UUqqUqUqq8qUqqqUqUqqq8UqUUU8UqUqUUq*qUU88q88qqUq8Uq8UUUUU88q8qUqUU8q88U8qUqU8qqqUqq8qqUUUq8U88UqqqUq8qq88Uq8q8q8Uq88UqUqUU8UU88q8UUq88q88UqUUUUUqq8q88UUUq8UUUqqUUU8U8U88ŌUq8q8Uq8UU8Uq88Uq8qqq888U8q88UU8qqU8*UUUq88UUUq8UqUUUUUUUqUqU88ŌUq8q8UqqqqU8U8UqU8q8q88U8q88U8UUqUU88UUU88Uq88UUUq8UU8qUUU8qU8ŌUq8q8Uq8q8UqUUUU8q8U88U8q88U8UUUqUqq88UUUq8UqqqUUqUUUU88ŌUq8qq8Uq88Uq88UUUUqqUU88U8UUqq8U8q88q88UU8qq88UUqUU8UUUUqq8qU8U8Uq8U8ŌUUUqUUqqUU8qqU8UUUU8888qUqUUUqUq8U8qU88UUqUU8U88UUUqUqqUUUUUU88q8U8UU8888UUUqq88UqUUUUUqqq88qUUUqUUqq8q8U8U8UqUUqU88Uq88UqUqq8UqUUqU8UUU88q8UqUUq8qUUUU8UqUUU8qUqUqqUU88qU8U8UqqUqqU888Uqq8UqUUqUqqUUUUU8qqU8q8Uq8UUUUqUUUgdalautotest-3.1.2/gdrivers/data/nc_mixed_raster_vector.nc0000664000175000017500000015030013701057753022512 0ustar evenevenHDF  `OHDR @"  I __NCProperties7version=1|netcdflibversion=4.5.0|hdf5libversion=1.8.16 . ConventionsCF-1.6 PGDAL0GDAL 2.4.0dev-29ce66d-dirty, released 2018/11/16 Uhistory5Sat Nov 17 16:00:42 2018: GDAL Create( poly.nc, ... ) ,ogr_layer_namepoly 7ogr_geometry_fieldogc_wkt /ogr_layer_typePOLYGONOHDR !  0CLASSDIMENSION_SCALE3R@OCHK&OCHK `NAME@This is a netCDF dimension but not a netCDF variable. 0 4 _Netcdf4Dimid +\(OHDR ! P 0CLASSDIMENSION_SCALE2OCHK `NAME@This is a netCDF dimension but not a netCDF variable. 1812 4 _Netcdf4Dimid _?OHDR ! @ 0CLASSDIMENSION_SCALE 4Ur OCHK `NAME@This is a netCDF dimension but not a netCDF variable. 16 4 _Netcdf4Dimid X[OHDR <(  A ; long_nameGeometry as ISO WKT `DIMENSION_LIST1"1"h5OHDR ?  ?@4 4G GK 2 long_name Field AREAV  PDIMENSION_LIST1"ܓOCHK ,ogr_field_nameAREA ,ogr_field_typeReal D ogr_field_width  L ogr_field_precision A\WOHDR A  ?@4 4G GT 4 long_name Field EAS_ID PDIMENSION_LIST1"M.OCHK .ogr_field_nameEAS_ID 1ogr_field_type Integer64 D ogr_field_width  z OHDR (  O\ 5 long_name Field PRFEDEA12nFHIBd=9uOCHK /ogr_field_namePRFEDEA .ogr_field_typeString D ogr_field_width 6QOHDR  f dlzQ FSSEB_Q~\vOHDR  ?@4 4  Gf 0CLASSDIMENSION_SCALE "NAMExtZFRHP  7ŐBTHD d( jnuBTHDd( lFSHDPx 5FSSE@FRHP B (w,ڒBTHDd( ?BTHD  d( OFSHDPx(%%@@BTLF!6L X KX h20PD\J PVP`A[Y`מ`_B W` 8 ]CúY`X5YFBTLF CY`P PY`h!6W`PX  _B 0SBTLF~}er!bc?&/@([R$R|^ mv .$KrP3BTLF.$R$v&  (WOCHK6 4 _Netcdf4Dimid  ?standard_nameprojection_x_coordinate B long_namex coordinate of projection !unitsm]kOHDR  ?@4 45 G(g 0CLASSDIMENSION_SCALE "NAMEy 4 _Netcdf4Dimid  ?standard_nameprojection_y_coordinate B long_namey coordinate of projection !unitsm*OHDR (  y5 : long_nameGDAL Band Number 1 A _FillValue 1 LAYER_TYPE athematic ; grid_mappingtransverse_mercator0dGCOL   OCHK `DIMENSION_LIST1"1"JUOCHK tREFERENCE_LISTdatasetdimension JOCHK tREFERENCE_LISTdatasetdimension  ^ kD5OCHK tREFERENCE_LISTdatasetdimension kRHOCHKg `DIMENSION_LIST1" 1" OCHKG tREFERENCE_LISTdatasetdimension   ?OCHKG tREFERENCE_LISTdatasetdimension   FHDB4recordogc_wkt_max_widthPRFEDEA_max_widthogc_wktAREA EAS_ID^ PRFEDEAktransverse_mercatorwx y Band1 FHDBd6 spatial_refqPROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]]FHDBdegrid_mapping_nametransverse_mercatorlongitude_of_central_meridian ?@4 4@]false_easting ?@4 4Afalse_northing ?@4 4latitude_of_projection_origin ?@4 4!scale_factor_at_central_meridian ?@4 4x#? long_nameCRS definitionlongitude_of_prime_meridian ?@4 4semi_major_axis ?@4 4TXAinverse_flattening ?@4 4Uuor@ GeoTransform440720 60 0 3751320 0 -60 TREE Xilpw~Г TREE TREE TREE  0@P`p AAAAxAhAXAHA8A(AAAAAAAAAAALALALAݜLALALA7LAULAsLALALA͝LALA LA'LAELAcLALALALAskkkkksck΄k{{k{k{{cs{Jsc{csZcsZcckcck{kkkscscckssZ{skZkskZc{sss{{sck{ccsccs{c{c{{k{ckksskck{{{k{{ssZkkkkkc{s{c{kcs{{k{{{kccs{kksks{{k{{ss{s{{csc{ssk{s{{kssksc{cckŭc{sc{{ss{ksc{sksss{{{kk{{{s{s{s{ksksss{sks{kssksksk{ssk{{c{ck{skkk{sPOLYGON ((479819.84375 4765180.5,479690.1875 4765259.5,479647.0 4765369.5,479730.375 4765400.5,480039.03125 4765539.5,480035.34375 4765558.5,480159.78125 4765610.5,480202.28125 4765482.0,480365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))POLYGON ((480035.34375 4765558.5,480039.03125 4765539.5,479730.375 4765400.5,479647.0 4765369.5,479690.1875 4765259.5,479819.84375 4765180.5,479779.84375 4765109.5,479681.78125 4764940.0,479468.0 4764942.5,479411.4375 4764940.5,479353.0 4764939.5,479208.65625 4764882.5,479196.8125 4764879.0,479123.28125 4765015.0,479046.53125 4765117.0,479029.71875 4765110.5,479014.9375 4765147.5,479149.9375 4765200.5,479639.625 4765399.5,480035.34375 4765558.5))POLYGON ((479819.84375 4765180.5,479859.875 4765270.0,479909.875 4765370.0,479980.21875 4765409.5,480019.71875 4765319.5,480059.90625 4765239.5,480088.8125 4765139.5,480082.96875 4765049.5,480000.28125 4765043.0,479934.96875 4765020.0,479895.125 4765000.0,479734.375 4764865.0,479680.28125 4764852.0,479644.78125 4764827.5,479637.875 4764803.0,479617.21875 4764760.0,479587.28125 4764718.0,479548.03125 4764693.5,479504.90625 4764609.5,479239.8125 4764505.0,479117.8125 4764847.0,479196.8125 4764879.0,479208.65625 4764882.5,479353.0 4764939.5,479411.4375 4764940.5,479468.0 4764942.5,479681.78125 4764940.0,479779.84375 4765109.5,479819.84375 4765180.5))POLYGON ((479014.9375 4765147.5,479029.71875 4765110.5,479117.8125 4764847.0,479239.8125 4764505.0,479305.875 4764361.0,479256.03125 4764314.5,479220.90625 4764212.5,479114.5 4764174.0,479018.28125 4764418.5,478896.9375 4764371.0,478748.8125 4764308.5,478503.03125 4764218.0,478461.75 4764337.5,478443.9375 4764400.5,478447.8125 4764454.0,478448.6875 4764531.5,478502.1875 4764541.5,478683.0 4764730.5,478621.03125 4764788.5,478597.34375 4764766.5,478532.5 4764695.5,478460.125 4764615.0,478408.0625 4764654.0,478315.53125 4764876.0,478889.25 4765100.0,479014.9375 4765147.5))POLYGON ((479029.71875 4765110.5,479046.53125 4765117.0,479123.28125 4765015.0,479196.8125 4764879.0,479117.8125 4764847.0,479029.71875 4765110.5))POLYGON ((480082.96875 4765049.5,480080.28125 4764979.5,480133.96875 4764856.5,479968.46875 4764788.0,479750.6875 4764702.0,479735.90625 4764752.0,479640.09375 4764721.0,479658.59375 4764670.0,479504.90625 4764609.5,479548.03125 4764693.5,479587.28125 4764718.0,479617.21875 4764760.0,479637.875 4764803.0,479644.78125 4764827.5,479680.28125 4764852.0,479734.375 4764865.0,479895.125 4765000.0,479934.96875 4765020.0,480000.28125 4765043.0,480082.96875 4765049.5))POLYGON ((480389.6875 4764950.0,480537.15625 4765014.0,480567.96875 4764918.0,480605 4764835,480701.0625 4764738.0,480710.25 4764690.5,480588.59375 4764740.5,480540.71875 4764741.0,480515.125 4764695.0,480731.65625 4764561.5,480692.1875 4764453.5,480677.84375 4764439.0,480655.34375 4764397.5,480584.375 4764353.0,480500.40625 4764326.5,480358.53125 4764277.0,480192.3125 4764183.0,480157.125 4764266.5,480234.3125 4764304.0,480289.125 4764348.5,480316 4764395,480343.5625 4764477.0,480343.71875 4764532.5,480258.03125 4764767.0,480177.15625 4764742.0,480093.75 4764703.0,480011.0 4764674.5,479985.0625 4764732.0,479968.46875 4764788.0,480133.96875 4764856.5,480389.6875 4764950.0))POLYGON ((480701.0625 4764738.0,480761.46875 4764778.0,480824.96875 4764820.0,480922.03125 4764850.5,480930.71875 4764852.0,480984.25 4764875.0,481088.1875 4764936.0,481136.84375 4764994.5,481281.3125 4764876.5,481291.09375 4764810.0,481465.90625 4764872.5,481457.375 4764937.0,481509.65625 4764967.0,481538.90625 4764982.5,481575.0 4764999.5,481602.125 4764915.5,481629.84375 4764829.5,481645.3125 4764797.5,481635.96875 4764795.5,481235.3125 4764650.0,481209.8125 4764633.5,481199.21875 4764623.5,481185.5 4764607.0,481159.9375 4764580.0,481140.46875 4764510.5,481141.625 4764480.5,481199.84375 4764180.0,481143.4375 4764010.5,481130.3125 4763979.5,481039.9375 4763889.5,480882.6875 4763670.0,480826.0625 4763650.5,480745.1875 4763628.5,480654.4375 4763627.5,480599.8125 4763660.0,480281.9375 4763576.5,480221.5 4763533.5,480199.6875 4763509.0,480195.09375 4763430.0,480273.6875 4763305.5,480309.6875 4763063.5,480201.84375 4762962.5,479855.3125 4762880.5,479848.53125 4762897.0,479728.875 4763217.5,479492.6875 4763850.0,479550.0625 4763919.5,480120.21875 4764188.5,480192.3125 4764183.0,480358.53125 4764277.0,480500.40625 4764326.5,480584.375 4764353.0,480655.34375 4764397.5,480677.84375 4764439.0,480692.1875 4764453.5,480731.65625 4764561.5,480515.125 4764695.0,480540.71875 4764741.0,480588.59375 4764740.5,480710.25 4764690.5,480701.0625 4764738.0))POLYGON ((479750.6875 4764702.0,479968.46875 4764788.0,479985.0625 4764732.0,480011.0 4764674.5,480093.75 4764703.0,480177.15625 4764742.0,480258.03125 4764767.0,480343.71875 4764532.5,480343.5625 4764477.0,480316 4764395,480289.125 4764348.5,480234.3125 4764304.0,480157.125 4764266.5,480192.3125 4764183.0,480120.21875 4764188.5,479550.0625 4763919.5,479492.6875 4763850.0,479487.75 4763864.5,479442.75 4763990.0,479436 4764023,479398.9375 4764100.0,479349.625 4764230.0,479305.875 4764361.0,479239.8125 4764505.0,479504.90625 4764609.5,479658.59375 4764670.0,479750.6875 4764702.0))POLYGON ((479750.6875 4764702.0,479658.59375 4764670.0,479640.09375 4764721.0,479735.90625 4764752.0,479750.6875 4764702.0)) E A7A`1A|?A7A` A/$@ʡ_@dA`8A7A5" Д@GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGe@`f@`e@e@e@ e@d@c@d@@e@GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG35043411350434233504341435043416350434153504341235043409350433693504340835043413gdalautotest-3.1.2/gdrivers/data/4byteFloat.prj0000664000175000017500000000064113701057753020174 0ustar evenevenPROJCS["NAD_1927_UTM_Zone_11N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] gdalautotest-3.1.2/gdrivers/data/small_world.kml0000664000175000017500000000066113701057753020470 0ustar eveneven small_world ffffffff small_world.tif 1 90 -90 180 -180 gdalautotest-3.1.2/gdrivers/data/byte_scanline.tif0000664000175000017500000000262413701057753020770 0ustar evenevenII*S b z N@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckPS   8x.BVj~ 2FZnN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|gdalautotest-3.1.2/gdrivers/data/DNEC_250K.vrt0000664000175000017500000000606713701057753017421 0ustar eveneven PROJCS["NAD83 / NRCan LCC Canada",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Decimal_Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["central_meridian",-95.0],PARAMETER["latitude_of_origin",49.0],PARAMETER["standard_parallel_1",49.0],PARAMETER["standard_parallel_2",77.0],PARAMETER["false_easting",0.0],PARAMETER["false_northing",0.0],UNIT["Meter",1],AUTHORITY["EPSG","42304"]] -3.0000000000000000e+06, 8.7890625000000000e+03, 0.0000000000000000e+00, 4.5000000000000000e+06, 0.0000000000000000e+00, -8.7976539589442818e+03 PIXEL Red WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=DNEC_250K:ELEVATION/ELEVATION&SRS=EPSG:42304&BBOX=-3000000,-1500000,6000000,4500000 1 Green WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=DNEC_250K:ELEVATION/ELEVATION&SRS=EPSG:42304&BBOX=-3000000,-1500000,6000000,4500000 2 Blue WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=DNEC_250K:ELEVATION/ELEVATION&SRS=EPSG:42304&BBOX=-3000000,-1500000,6000000,4500000 3 gdalautotest-3.1.2/gdrivers/data/test_nosrs.vrt0000664000175000017500000000125413701057752020402 0ustar eveneven Gray byte.tif 1 gdalautotest-3.1.2/gdrivers/data/ers_dem.ers0000664000175000017500000000141713701057753017575 0ustar evenevenDatasetHeader Begin LastUpdated = Tue Sep 30 02:13:00 GMT 2008 Version = "5.0" DataSetType = ERStorage DataType = Raster HeaderOffset = 512 CoordinateSpace Begin Projection = "GEODETIC" CoordinateType = LATLONG Datum = "GDA94" Rotation = 0:0:0 CoordinateSpace End ByteOrder = MSBFirst RasterInfo Begin CellType = IEEE4ByteReal NrOfLines = 36 NrOfCellsPerLine = 30 NrOfBands = 1 NullCellValue = -9999.00000000 CellInfo Begin Xdimension = 0.025 Ydimension = 0.025 CellInfo End RegistrationCellX = 0 RegistrationCellY = 0 RegistrationCoord Begin Longitude = 143:35:46.500000000 Latitude = -39:22:52.500000108 RegistrationCoord End BandId Begin Value = "9secDEM" BandId End RasterInfo End DatasetHeader End gdalautotest-3.1.2/gdrivers/data/test_ogr_nc3.nc0000664000175000017500000001422413701057753020357 0ustar evenevenCDF recordstring3chars_max_widthtwodimstringchar_max_width  ConventionsCF-1.6GDAL"GDAL 2.1.0dev, released 2015/99/99history5Tue Feb 09 20:48:39 2016: GDAL Create( test.nc, ... )ogr_layer_nametest featureTypepoint x  standard_nameprojection_x_coordinate long_namex coordinate of projectionunitsmy  standard_nameprojection_y_coordinate long_namey coordinate of projectionunitsmz  long_name z coordinate standard_nameheightaxisZunitsm transverse_mercator grid_mapping_nametransverse_mercatorlongitude_of_central_meridian@ false_eastingAfalse_northinglatitude_of_projection_origin scale_factor_at_central_meridian?#x long_nameCRS definitionlongitude_of_prime_meridiansemi_major_axisAXT@inverse_flattening@rtm spatial_refTPROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32631"]]int32  long_name Field int32ogr_field_nameint32ogr_field_typeInteger grid_mappingtransverse_mercator coordinatesx y zint32_explicit_fillValue  _FillValue{float64  long_name Field float64ogr_field_namefloat64ogr_field_typeReal grid_mappingtransverse_mercator coordinatesx y zfloat64_explicit_fillValue  _FillValue@^$ string1char  long_nameField string1charogr_field_name string1charogr_field_typeStringogr_field_width grid_mappingtransverse_mercator coordinatesx y z, string3chars  long_nameField string3charsogr_field_name string3charsogr_field_typeStringogr_field_width grid_mappingtransverse_mercator coordinatesx y z0twodimstringchar  long_nameField twodimstringcharogr_field_nametwodimstringcharogr_field_typeStringogr_field_width grid_mappingtransverse_mercator coordinatesx y z4date unitsseconds since 1970-1-1 0:0:0 long_name Field dateogr_field_namedateogr_field_typeDate grid_mappingtransverse_mercator coordinatesx y z8datetime_explicit_fillValue unitsseconds since 1970-1-1 0:0:0 _FillValue@^@datetime unitsseconds since 1970-1-1 0:0:0 long_nameField datetimeogr_field_namedatetimeogr_field_typeDateTime grid_mappingtransverse_mercator coordinatesx y zHint64var  long_nameField int64varogr_field_nameint64varogr_field_type Integer64 grid_mappingtransverse_mercator coordinatesx y zPint64var_explicit_fillValue  _FillValue@^ogr_field_type Integer64Xboolean  long_name Field booleanogr_field_namebooleanogr_field_typeInteger(Boolean)ogr_field_width grid_mappingtransverse_mercator coordinatesx y z`boolean_explicit_fillValue ogr_field_typeInteger(Boolean) _FillValue{dfloat32  long_name Field float32ogr_field_namefloat32ogr_field_type Real(Float32) grid_mappingtransverse_mercator coordinatesx y zhfloat32_explicit_fillValue  _FillValueBlint16  long_name Field int16ogr_field_nameint16ogr_field_typeInteger(Int16) grid_mappingtransverse_mercator coordinatesx y zpint16_explicit_fillValue  _FillValue{tx1  long_nameField xogr_field_namexogr_field_typeReal grid_mappingtransverse_mercator coordinatesx y zx byte_field  long_nameField byte_fieldogr_field_name byte_field grid_mappingtransverse_mercator coordinatesx y z?@@?B+?B+xSTRSTR@Aխz2~Aխz2~BqLBqL{{{??{ {@?@G{G@^G@^GG@^{{{{|B{{GGGG{G@^G@^GG@^{{{{|B{{Ggdalautotest-3.1.2/gdrivers/data/rgb_gcp.vrt0000664000175000017500000000253313701057752017603 0ustar eveneven Red rgbsmall.tif 1 Green rgbsmall.tif 2 Blue rgbsmall.tif 3 gdalautotest-3.1.2/gdrivers/data/513x513.jp20000664000175000017500000000552513701057753017016 0ustar eveneven jP ftypjp2 jp2 jpx rreqC@-jp2hihdrcolrtuuidK=KCզII*   , # Wh )#NAD27 / UTM zone 11N|NAD27|j+@j+@@A̞LAasoclbl gml.dataasoclbl gml.root-instancexml 440720 3750120 441920 3751320 0 0 512 512 x y 440721.169590643 3751318.83040936 2.33918128654971 0 0 -2.33918128654971 gmljp2://codestream/0 Record Interleaved jp2cOQ)R\ BH$WWWbd%Created by OpenJPEG version 2.3.0 , ٳfPTPTPTPT , ٳfPTPTPTPT  Xww , ٳfPTPTPTPT , ٳfPTPTPTPT  Xww  X g g  X g g gdalautotest-3.1.2/gdrivers/data/fema06-140cm_2995441b_truncated.dem0000664000175000017500000000200013701057753023154 0ustar evenevenu299544_1_a DEM derived from LIDAR data, Sanborn -0953334.4196 0292028.90687 CONT 1 1 1 15 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 2 2 4 0.248500700000000D+06 0.324859430000000D+07 0.248500700000000D+06 0.325250730000000D+07 0.251479900000000D+06 0.325250730000000D+07 0.251479900000000D+06 0.324859430000000D+07 0.114999997615814D+01 0.195900001525879D+02 0.000000000000000D+00 10.140000E+010.140000E+010.184400E-02 1 2129 220062006I0 2 3 4 01 9 1 1 2796 1 0.248500700000000D+06 0.324859430000000D+07 1.149999976158142 0.13159gdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/0000775000175000017500000000000013701057751016743 5ustar evenevengdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/0000775000175000017500000000000013701057751020437 5ustar evenevengdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/annotation/0000775000175000017500000000000013701060017022576 5ustar eveneven././@LongLink0000644000000000000000000000020400000000000011577 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/annotation/s1a-iw-grd-vh-20150705t064241-20150705t064306-006672-008ea0-002.xmlgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/annotation/s1a-iw-grd-vh-20150705t064241-2015070000664000175000017500000006324213701060017027320 0ustar eveneven S1A GRD VH IW IW 2015-07-05T06:42:41.504840 2015-07-05T06:43:06.503530 6672 36512 002 0.000000000000000e+00 2015-07-05T06:42:41.504840 1.647904068231583e-01 2.020377069711685e-01 false 3.185296058654785e+00 3.078083992004395e+00 false 0 false 0 false 0 false 0 false 0 false 0 false Nominal Extracted Extended Tapered false 7.140222787857056e-01 4.536430973920501e-02 -1.195062041282654e+00 1.353480175741255e-01 false true 1.647904068231583e-01 true 2.020377069711685e-01 true 1.034831047058105e+00 true 5.124999955296516e-02 true Data Analysis false 4.992516e+01 0.000000e+00 4.220596e+01 0.000000e+00 true true Descending Fast-24h -1.666233808192185e+02 Ground Range 6.434523812571428e+07 5.405000454334350e+09 1.590368784000000e+00 IW1 2015-07-05T06:42:38.408299 2015-07-05T06:38:03.712181 2015-07-05T06:38:34.261984 1.717128973878037e+03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7045 0 0 0 0 0 0 0 0 0 0 0 7045 5.823674372819869e-04 9 16608 8 1 4 256 FDBAQ BAQ 5 Bit Decimation 1.166961908029398e-03 5.659000000000000e+07 6.434523812571429e+07 36 -4.000000000000000e+00 5.240481033595628e-05 -2.825153419637256e+07 1.078230321255894e+12 10 2015-07-05T06:42:39.536682 3.724284919605149e-04 2015-07-05T06:42:39.536682 1.029180388041683e-04 2015-07-05T06:42:56.086349 1.016125808954434e-04 2015-07-05T06:38:02.959763 Normal Pointing Mode false false false IW2 2015-07-05T06:42:39.351800 2015-07-05T06:38:04.544380 2015-07-05T06:38:35.094076 1.451627112193990e+03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6.888821458346830e-04 8 16608 8 1 4 256 FDBAQ BAQ 5 Bit Decimation 1.166961908029398e-03 4.835000000000000e+07 5.459595962181818e+07 44 -4.000000000000000e+00 6.199592966536363e-05 -2.415503791125222e+07 7.792817275120481e+11 11 2015-07-05T06:42:40.369367 4.437491209739135e-04 2015-07-05T06:42:40.369367 1.423215540491502e-04 2015-07-05T06:42:56.919020 1.411226641329743e-04 2015-07-05T06:38:02.960234 Normal Pointing Mode false false false IW3 2015-07-05T06:42:40.307633 2015-07-05T06:38:05.622413 2015-07-05T06:38:36.172205 1.685817302492702e+03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.931840885257075e-04 10 16608 8 1 4 256 FDBAQ BAQ 5 Bit Decimation 1.166961908029398e-03 4.286000000000000e+07 4.691840280000000e+07 68 -4.000000000000000e+00 5.339056426703426e-05 -2.139431040091632e+07 8.014509490705804e+11 12 2015-07-05T06:42:41.448260 4.233946343970601e-04 2015-07-05T06:42:41.448260 9.154190559956572e-05 2015-07-05T06:42:57.997912 9.047622567407600e-05 2015-07-05T06:38:02.961093 Normal Pointing Mode false false false 2015-07-05T06:42:41.504840 2015-07-05T06:43:06.503530 2015-07-05T06:04:08.728528 2015-07-05T06:38:02.804289 Slice 12 1 2015-07-05T06:38:03.712181 2015-07-05T06:38:34.040986 2 2015-07-05T06:38:28.536673 2015-07-05T06:38:58.865478 3 2015-07-05T06:38:53.361165 2015-07-05T06:39:23.689970 4 2015-07-05T06:39:18.185657 2015-07-05T06:39:48.514462 5 2015-07-05T06:39:43.010149 2015-07-05T06:40:13.338954 6 2015-07-05T06:40:10.592918 2015-07-05T06:40:38.163446 7 2015-07-05T06:40:35.417410 2015-07-05T06:41:02.987938 8 2015-07-05T06:41:00.241902 2015-07-05T06:41:27.812430 9 2015-07-05T06:41:25.066394 2015-07-05T06:41:52.636922 10 2015-07-05T06:41:49.890886 2015-07-05T06:42:20.219691 11 2015-07-05T06:42:14.715378 2015-07-05T06:42:45.044183 12 2015-07-05T06:42:39.539870 2015-07-05T06:43:09.868675 13 2015-07-05T06:43:04.364362 2015-07-05T06:43:34.693167 14 2015-07-05T06:43:29.188854 2015-07-05T06:43:59.517659 15 2015-07-05T06:43:54.013346 2015-07-05T06:44:24.342151 16 2015-07-05T06:44:18.837838 2015-07-05T06:44:49.166643 17 2015-07-05T06:44:43.662330 2015-07-05T06:45:13.991135 18 2015-07-05T06:45:08.486822 2015-07-05T06:45:30.540796 5.336495919679645e-03 Detected 16 bit Unsigned Integer 1.000000e+01 1.000655e+01 1.496479475961005e-03 4.864863102995529e+02 256 167 2.746961180000000e+02 3.901775013707726e+01 4.992516e+01 0.000000e+00 4.220596e+01 0.000000e+00 true true false true true true true Data Analysis Range Compressed true true true false Nominal Extracted Extended Tapered IW_Default 2015-07-05T06:42:39.539870 IW1 23802 16522 2015-07-05T06:42:40.372073 IW2 24072 16654 2015-07-05T06:42:41.450110 IW3 19722 16709 8.000000000000000e+05 WGS84 6.378137000000000e+06 6.356752314245000e+06 true Only Echo Lines Auxiliary Downlink 0 0 2015-07-05T06:42:41.504574 5.336495919679645e-03 0 0 3.963321617250224e+01 -8.035000702098266e+00 1.418532666303217e+02 3.051238123584880e+01 2.721939289535370e+01 ././@LongLink0000644000000000000000000000020400000000000011577 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/annotation/s1a-iw-grd-vv-20150705t064241-20150705t064306-006672-008ea0-001.xmlgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/annotation/s1a-iw-grd-vv-20150705t064241-2015070000664000175000017500000006324313701060017027337 0ustar eveneven S1A GRD VV IW IW 2015-07-05T06:42:41.504840 2015-07-05T06:43:06.503530 6672 36512 001 0.000000000000000e+00 2015-07-05T06:42:41.504840 2.288428992033005e-01 1.594403982162476e-01 false 6.914044857025146e+00 7.035089969635010e+00 false 0 false 0 false 0 false 0 false 0 false 0 false Nominal Extracted Extended Tapered false 6.794388095537821e-01 1.014419215858088e-01 -1.273414492607117e+00 1.229467236682559e-01 false true 2.288428992033005e-01 true 1.594403982162476e-01 true 9.827942252159119e-01 true 1.245751976966858e-01 true Data Analysis false 1.111872e+02 0.000000e+00 8.847974e+01 0.000000e+00 true true Descending Fast-24h -1.666233808192185e+02 Ground Range 6.434523812571428e+07 5.405000454334350e+09 1.590368784000000e+00 IW1 2015-07-05T06:42:38.408299 2015-07-05T06:38:03.712181 2015-07-05T06:38:34.261984 1.717128973878037e+03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7045 0 0 0 0 0 0 0 0 0 0 0 7045 5.823674372819869e-04 9 16608 8 0 4 256 FDBAQ BAQ 5 Bit Decimation 2.252213143258578e-01 5.659000000000000e+07 6.434523812571429e+07 36 -4.000000000000000e+00 5.240481033595628e-05 -2.825153419637256e+07 1.078230321255894e+12 10 2015-07-05T06:42:39.536682 3.724284919605149e-04 2015-07-05T06:42:39.536682 1.029180388041683e-04 2015-07-05T06:42:56.086349 1.016125808954434e-04 2015-07-05T06:38:02.959763 Normal Pointing Mode false false false IW2 2015-07-05T06:42:39.351800 2015-07-05T06:38:04.544380 2015-07-05T06:38:35.094076 1.451627112193990e+03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6.888821458346830e-04 8 16608 8 0 4 256 FDBAQ BAQ 5 Bit Decimation 2.252213143258578e-01 4.835000000000000e+07 5.459595962181818e+07 44 -4.000000000000000e+00 6.199592966536363e-05 -2.415503791125222e+07 7.792817275120481e+11 11 2015-07-05T06:42:40.369367 4.437491209739135e-04 2015-07-05T06:42:40.369367 1.423215540491502e-04 2015-07-05T06:42:56.919020 1.411226641329743e-04 2015-07-05T06:38:02.960234 Normal Pointing Mode false false false IW3 2015-07-05T06:42:40.307633 2015-07-05T06:38:05.622413 2015-07-05T06:38:36.172205 1.685817302492702e+03 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5.931840885257075e-04 10 16608 8 0 4 256 FDBAQ BAQ 5 Bit Decimation 2.252213143258578e-01 4.286000000000000e+07 4.691840280000000e+07 68 -4.000000000000000e+00 5.339056426703426e-05 -2.139431040091632e+07 8.014509490705804e+11 12 2015-07-05T06:42:41.448260 4.233946343970601e-04 2015-07-05T06:42:41.448260 9.154190559956572e-05 2015-07-05T06:42:57.997912 9.047622567407600e-05 2015-07-05T06:38:02.961093 Normal Pointing Mode false false false 2015-07-05T06:42:41.504840 2015-07-05T06:43:06.503530 2015-07-05T06:04:08.728528 2015-07-05T06:38:02.804289 Slice 12 1 2015-07-05T06:38:03.712181 2015-07-05T06:38:34.040986 2 2015-07-05T06:38:28.536673 2015-07-05T06:38:58.865478 3 2015-07-05T06:38:53.361165 2015-07-05T06:39:23.689970 4 2015-07-05T06:39:18.185657 2015-07-05T06:39:48.514462 5 2015-07-05T06:39:43.010149 2015-07-05T06:40:13.338954 6 2015-07-05T06:40:10.592918 2015-07-05T06:40:38.163446 7 2015-07-05T06:40:35.417410 2015-07-05T06:41:02.987938 8 2015-07-05T06:41:00.241902 2015-07-05T06:41:27.812430 9 2015-07-05T06:41:25.066394 2015-07-05T06:41:52.636922 10 2015-07-05T06:41:49.890886 2015-07-05T06:42:20.219691 11 2015-07-05T06:42:14.715378 2015-07-05T06:42:45.044183 12 2015-07-05T06:42:39.539870 2015-07-05T06:43:09.868675 13 2015-07-05T06:43:04.364362 2015-07-05T06:43:34.693167 14 2015-07-05T06:43:29.188854 2015-07-05T06:43:59.517659 15 2015-07-05T06:43:54.013346 2015-07-05T06:44:24.342151 16 2015-07-05T06:44:18.837838 2015-07-05T06:44:49.166643 17 2015-07-05T06:44:43.662330 2015-07-05T06:45:13.991135 18 2015-07-05T06:45:08.486822 2015-07-05T06:45:30.540796 5.336495919679645e-03 Detected 16 bit Unsigned Integer 1.000000e+01 1.000655e+01 1.496479475961005e-03 4.864863102995529e+02 256 167 2.746961180000000e+02 3.901775013707726e+01 1.111872e+02 0.000000e+00 8.847974e+01 0.000000e+00 true true false true true true true Data Analysis Range Compressed true true true false Nominal Extracted Extended Tapered IW_Default 2015-07-05T06:42:39.539870 IW1 23802 16522 2015-07-05T06:42:40.372073 IW2 24072 16654 2015-07-05T06:42:41.450110 IW3 19722 16709 8.000000000000000e+05 WGS84 6.378137000000000e+06 6.356752314245000e+06 true Only Echo Lines Auxiliary Downlink 0 0 2015-07-05T06:42:41.504574 5.336495919679645e-03 0 0 3.963321617250224e+01 -8.035000702098266e+00 1.418532666303217e+02 3.051238123584880e+01 2.721939289535370e+01 gdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/manifest.safe0000664000175000017500000005225413701057751023115 0ustar eveneven 0000-000A SENTINEL-1 A Synthetic Aperture Radar IW IW 6672 6672 125 125 52 1 DESCENDING 2015-07-05T06:04:08.728528 4 36512 VV VH S SAR Standard L1 Product Slice GRD Fast-24h true 2015-07-05T06:38:02.921242 12 18 2015-07-05T06:42:41.504840 2015-07-05T06:43:06.503530 2.312776e+06 2.337775e+06 38.130520,-8.407759 38.535374,-11.335915 40.036644,-11.026125 39.633217,-8.035001 ec4c83239908f0bbd7d835c064d6ac80 a27f2c8a06b4f69b3208dd180d03b21f d3125b9405fd5631d53c4bc9f942bde7 fef2f50db843267377cc2d4bbedbf84b 63bc3b1257ebe0dbc5e043c292ab12ba 9986aad444f915d22d26218bb27b7fad 3b8e86ccf1e9c7030248420f4ef1293b efe23a89c7bca820fce1e7ecb1c9d16b 08c406d09fbbbce5df9a2731ddf6f360 31fdf67f84d20f99b83233a91dfc09bb ba4d7489f789b56905a66063588ca3df gdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/measurement/0000775000175000017500000000000013701057751022764 5ustar eveneven././@LongLink0000644000000000000000000000020600000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/measurement/s1a-iw-grd-vh-20150705t064241-20150705t064306-006672-008ea0-002.tiffgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/measurement/s1a-iw-grd-vh-20150705t064241-201500000664000175000017500000000115613701057751027413 0ustar evenevenII*   =S!!!!!!!!!!)Jk1R65535x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x C;Ѧ<@[x CCm I././@LongLink0000644000000000000000000000020600000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/measurement/s1a-iw-grd-vv-20150705t064241-20150705t064306-006672-008ea0-001.tiffgdalautotest-3.1.2/gdrivers/data/SAFE_FAKE/test.SAFE/measurement/s1a-iw-grd-vv-20150705t064241-201500000664000175000017500000000115613701057751027431 0ustar evenevenII*   =S!!!!!!!!!!)Jk1R65535x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\;Ѧ.Z .x 6\Cm ^gdalautotest-3.1.2/gdrivers/data/small16.raw0000664000175000017500000001036413701057753017437 0ustar evenevenk{skkk{skksc{cJsRssk{ssk{{c{c{sssckksks{sks{kssksk{kZ{ckcsZ{{s{s{s{kskssckkkssssssss{{{kk{sckc{cssckss{ksc{skscZk{cs{Zccc{sc{{ssckk{ckkcs{s{{kssksc{cck{kcccsZ{sk{ss{s{{csc{sskcscJ{sZsksccs{kksks{{k{kskscsk{c{kcs{{k{{{ksks{ks{{c{{{k{{ssZkkkkkc{ss{kc{c{{c{{k{ckksskckZ{ksss{sk{ccsccs{c{ssc{kkckZkskZc{sss{{sc{kckk{kkkscscckssZ{s{{k{{{ZsZcsZcckccksZs{sks{cs{Jsc{ckkskksk{{k{k{RccZskkkkksckZscc{sZcsZkccZckcc{k{{{kcRkkkcckZckcRss{Z{k{c{{sR{{{{Zcc{sks{{{{Z{sss{{sssZ{{{sks{{c{{{{Zc{{sR{c{Z{k{ZckcRssk{{{kcRkkkcck{sZcsZkccZckcc{skkkkksckZscck{{k{k{RccZ{cs{Jsc{ckkskkssZcsZcckccksZs{sks{kkkscscckssZ{s{{k{{{ZkZkskZc{sss{{sc{kckkk{ccsccs{c{ssc{kkcc{{k{ckksskckZ{ksss{s{{{k{{ssZkkkkkc{ss{kc{c{{{c{kcs{{k{{{ksks{ks{{cccs{kksks{{k{kskscsk{ss{s{{csc{sskcscJ{sZsks{s{{kssksc{cck{kcccsZ{skc{sc{{ssckk{ckkcss{ksc{skscZk{cs{Zccsss{{{kk{sckc{csscks{{s{s{s{kskssckkkssssss{sks{kssksk{kZ{ckcsZsk{ssk{{c{c{sssckkskk{skkk{skksc{cJsRsgdalautotest-3.1.2/gdrivers/data/3_13bit_and_1bit.jp20000664000175000017500000006462513701057753021000 0ustar eveneven jP ftypjp2 jp2 J2P1[jp2hihdr4 bpcc colr"cdefUxml 1208.7849934895819,1517.0096028645819 0.0000000000000,1.0000000000000,0.0000000000000 1.0000000000000,0.0000000000000,0.0000000000000 uuidK=KCզII*(   x'?OUU#@OUU @xThis file was created with the ECW JPEG 2000 SDK build 3.3.0.160 copyright 1998-2005 by ER Mapper. This GeoJP2 header was translated from the following ER Mapper style registration information: fOriginX: 1208.784993 fO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zf,x,Jp}`ځT,Aq8YY#C>|VTpjIa,>P^c~4d@dkYU%xMc?`JxᷜFKt&o j"͏DmT~8 G MťɮFptm%ml\+E1HB@n G?,Ql/?*A@薻l%`7 dI€ PK^$صS`Z@67@3$,Ǚ+,ShLOW YxBŕRj*6El UzsK50To {*f.N "y v ͎RC?e^LcXG%x'ְ^~s[a 0,YWhBS#2J1P:,xP1\8tu0l痀iWba[szc/ؘrJOYs{Vt[wc $Ȩ΋r|7R-R@kP R_6V`ٱN|Oh@uaɟǦf[;-wGhi]6EEvˣP 1<$Ål5JH):ƿ tvnUg€Md>SBbxR$~|y~ad{fnPD~ujM00\ߨVkί)R%(K"+aڕ -^w;c:|aF8j q},~-&`!Sjn="Ӟ5ox)Q+He6# _DyFt\OͶPOh?ii` ɿޜbO2BoEl0%`gdalautotest-3.1.2/gdrivers/data/geos_vrtwarp.vrt0000664000175000017500000000654413701057753020731 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]] -1.5628130024270072e+02, 1.4534981708669393e-02, 0.0000000000000000e+00, 7.6404172905756070e+01, 0.0000000000000000e+00, -1.4534981708669393e-02 Area 0 Palette 512 128 6.71089e+07 NearestNeighbour Byte geos_vrtwarp.tif 0.125 -5434894.95475267898,1002.00865774377053,0,-5434894.96445174422,0,1002.00865774377053 5423.99999516018943,0.000997995368874063891,0,5424.00000483981148,0,0.000997995368874063891 -156.281300242700723,0.0145349817086693929,0,76.4041729057560701,0,-0.0145349817086693929 10752.0809709369441,68.7995361840427933,0,5256.57165844142673,0,-68.7995361840427933 PROJCS["unnamed",GEOGCS["unknown",DATUM["unnamed",SPHEROID["Spheroid",6378137,298.2572221]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Geostationary_Satellite"],PARAMETER["central_meridian",-75],PARAMETER["satellite_height",35786023],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs +sweep=x"]] GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]] 0 0 0 0 gdalautotest-3.1.2/gdrivers/data/float64.tif0000664000175000017500000000672013701057751017427 0ustar evenevenII* Z@^@`@\@`@`@a@`@`@`@Z@`@Z@`@`@Z@^@\@c@b@\@`@Z@^@b@\@d@\@a@Z@^@^@X@`@^@`@`@`@X@c@\@`@a@`@^@\@a@Z@a@\@`@^@Z@`@`@\@\@Z@\@Z@b@`@^@^@\@`@`@^@\@^@\@^@Z@\@b@Z@\@a@\@`@`@c@`@a@`@`@\@\@\@^@b@^@d@^@`@Z@Z@`@c@^@g@e@e@b@b@\@b@^@Z@`@\@`@c@X@^@\@`@`@i@Z@h@e@b@a@a@`@X@`@^@\@a@`@`@X@`@^@`@e@^@\@b@^@b@\@b@^@a@^@Z@\@`@\@Z@\@X@^@X@f@X@Z@^@\@`@\@^@`@\@`@`@^@^@`@X@\@X@^@`@\@\@Z@a@a@X@a@X@\@^@Z@`@Z@\@Z@\@^@`@^@Z@^@`@`@`@`@`@^@X@`@^@Z@b@X@\@^@a@e@^@Z@^@^@^@Z@^@^@^@Z@a@^@^@\@\@V@Z@e@Z@Z@Z@Z@X@`@^@\@e@b@X@^@^@Z@^@X@Z@g@e@Z@\@\@Z@X@a@Z@e@a@b@`@`@Z@^@X@X@\@X@`@X@a@\@b@^@X@`@^@b@a@a@Z@a@V@Z@\@Z@V@X@^@\@\@\@^@^@b@\@b@X@`@d@b@c@^@Z@Z@Z@\@a@X@\@X@X@Z@\@`@\@V@^@\@g@e@a@a@d@\@`@V@X@\@V@X@X@Z@X@`@X@Z@`@`@c@f@a@e@^@`@X@\@^@R@\@X@^@a@c@`@d@a@a@X@e@n@o@i@`@Z@a@^@b@`@d@d@b@a@`@^@Z@^@Z@^@f@f@c@b@c@c@c@f@`@b@\@`@Z@Z@Z@Z@Z@\@X@Z@@ S B Z   N@N@@A̞LA Wh )#NAD27 / UTM zone 11N|gdalautotest-3.1.2/gdrivers/data/8s.vrt0000664000175000017500000000137413701057753016535 0ustar eveneven 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 SIGNEDBYTE byte.tif 1 gdalautotest-3.1.2/gdrivers/data/uint16_envi_bigendian.hdr0000664000175000017500000000134313701057753022310 0ustar evenevenENVI description = { uint16_envi_bigendian.dat} samples = 20 lines = 20 bands = 1 header offset = 0 file type = ENVI Standard data type = 12 interleave = bsq byte order = 1 map info = {UTM, 1, 1, 440720, 3751320, 60, 60, 11, North,North America 1927} coordinate system string = {PROJCS["NAD_1927_UTM_Zone_11N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.978698213898]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-117.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]} band names = { Band 1} gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/0000775000175000017500000000000013701057753021070 5ustar evenevengdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/0000775000175000017500000000000013701060017024527 5ustar evenevengdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/S2A_USER_MTD_SAFL2A.xml0000664000175000017500000003375113701060017030201 0ustar eveneven 2015-12-31T23:59:59.999Z 2015-12-31T23:59:59.999Z Level-2Ap S2MSI2Ap 01.03 2015-12-31T23:59:59.999Z http://example.com BrowseImageFootprint Sentinel-2A INS-NOBS 2015-12-31T23:59:59.999Z 22 DESCENDING -90.0 -180.0 90.0 180.0 false false B1 B2 B3 B4 B5 B6 B7 B9 B10 B11 B12 B8A Brief YES YES SAFE false S2A_USER_MSI_L2A_T32TQR_B01_60m S2A_USER_MSI_L2A_T32TQR_B02_60m S2A_USER_MSI_L2A_T32TQR_B03_60m S2A_USER_MSI_L2A_T32TQR_B04_60m S2A_USER_MSI_L2A_T32TQR_B05_60m S2A_USER_MSI_L2A_T32TQR_B06_60m S2A_USER_MSI_L2A_T32TQR_B07_60m S2A_USER_MSI_L2A_T32TQR_B8A_60m S2A_USER_MSI_L2A_T32TQR_B09_60m S2A_USER_MSI_L2A_T32TQR_B10_60m S2A_USER_MSI_L2A_T32TQR_B11_60m S2A_USER_MSI_L2A_T32TQR_B12_60m S2A_USER_SCL_L2A_T32TQR_60m S2A_USER_SNW_L2A_T32TQR_60m S2A_USER_CLD_L2A_T32TQR_60m S2A_USER_AOT_L2A_T32TQR_60m S2A_USER_WVP_L2A_T32TQR_60m NODATA 1 SATURATED 0 3 2 1 1000 1000 1000.0 1000.0 0.97 1900 1900 1800 1500 1400 1200 1100 1000 900 800 300 200 80 4 0 SC_NODATA 0 SC_SATURATED_DEFECTIVE 1 SC_DARK_FEATURE_SHADOW 2 SC_CLOUD_SHADOW 3 SC_VEGETATION 4 SC_BARE_SOIL_DESERT 5 SC_WATER 6 SC_CLOUD_LOW_PROBA 7 SC_CLOUD_MEDIUM_PROBA 8 SC_CLOUD_HIGH_PROBA 9 SC_THIN_CIRRUS 10 SC_SNOW_ICE 11 46 11 45 11 45 13 46 13 46 11 POINT 1 EPSG GEOGRAPHIC S2A_OPER_GIP_BLINDP_MPC__20150605T094736_V20150622T000000_21000101T000000_B00 S2__USER_DEM_GLOBEF_PDMC_19800101T000000_S19800101T000000 S2__USER_AUX_UT1UTC_PDMC_20151001T000000_V20151002T000000_20161001T000000 S2A_USER_AUX_GRI065_PDMC_20130621T120000_S20130101T000000 S2__USER_AUX_ECMWFD_FAKE_19800101T000000_V19800101T000000_19800101T000000 S2A_USER_GIP_L2A_TL_MTI__20151231T235959_A000123_T32TQR http://xxxx xxxx.atm xxxx.tiff 0.0 0 0 PASSED PASSED PASSED PASSED PASSED 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/0000775000175000017500000000000013701057753025641 5ustar eveneven././@LongLink0000644000000000000000000000016500000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000775000175000017500000000000013701060017030035 5ustar eveneven././@LongLink0000644000000000000000000000022000000000000011575 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/S2A_USER_MTD_L2A_T32TQR.xmlgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000001242613701060017030044 0ustar eveneven S2A_USER_MSI_L2A_TL_MTI__20151231T235959_A000123_T32TQR_N01.03 S2A_USER_MSI_L2A_DS_MTI__20151231T235959_S20151231T235959_N01.03 NOMINAL 2015-12-31T23:59:59.999Z MTI_ 2015-12-31T23:59:59.999Z WGS84 / UTM zone 32N EPSG:32632 10980 10980 5490 5490 1830 1830 699960 5100060 10 -10 699960 5100060 20 -20 699960 5100060 60 -60 5000 5000 5000 5000 26 135 5000 5000 5000 5000 9 104 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 S2A_USER_MSK_DEFECT_MTI__20151231T235959_A000123_T32TQR_B01_MSIL1C.gml S2A_USER_CLD_L2A_TL_MTI__20151231T235959_A000123_T32TQR S2A_USER_SNW_L2A_TL_MTI__20151231T235959_A000123_T32TQR S2A_USER_PVI_L2A_TL_MTI__20151231T235959_A000123_T32TQR ././@LongLink0000644000000000000000000000017600000000000011607 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000775000175000017500000000000013701057753030052 5ustar eveneven././@LongLink0000644000000000000000000000023500000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/S2A_USER_SCL_L2A_T32TQR_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000020300000000000011576 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000775000175000017500000000000013701057753030052 5ustar eveneven././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B01_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B06_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B07_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B02_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* ** BCD$E$*S././@LongLink0000644000000000000000000000024200000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_WVP_L2A_T32TQR_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B10_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B09_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B03_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* ** BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B11_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B05_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B8A_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B12_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000024200000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_AOT_L2A_T32TQR_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000024600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/IMG_DATA/R60m/S2A_USER_MSI_L2A_T32TQR_B04_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* ** BCD$E$*S././@LongLink0000644000000000000000000000017500000000000011606 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/QI_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000775000175000017500000000000013701057753030052 5ustar eveneven././@LongLink0000644000000000000000000000023000000000000011576 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/QI_DATA/S2A_USER_PVI_L2A_T32TQR.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* WWBCD$E$*S././@LongLink0000644000000000000000000000023400000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/QI_DATA/S2A_USER_SNW_L2A_T32TQR_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000023400000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L2A_T32TQR_N01.03/QI_DATA/S2A_USER_CLD_L2A_T32TQR_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/GRANULE/S2A_USER_MSI_L20000664000175000017500000000067613701057753030065 0ustar evenevenII* && BCD$E$*Sgdalautotest-3.1.2/gdrivers/data/wms/0000775000175000017500000000000013701057753016247 5ustar evenevengdalautotest-3.1.2/gdrivers/data/wms/pal.png0000664000175000017500000000073613701057752017536 0ustar evenevenPNG  IHDRuPLTE                  , ( $       _tRNS@f pHYs  tIME  tEXtCommentGDAL-testIDATxط@Qr9gH3g80S,>rXһs" @@sPE/ @@#ZS(D`JӊBН]sԥLW @@vφԣO!؇H`fffuHQ$PJLuj$LB  u@0qIIENDB`gdalautotest-3.1.2/gdrivers/data/wms/rgba.png0000664000175000017500000003134313701057752017673 0ustar evenevenPNG  IHDR>a pHYs  tIME tEXtCommentGDAL-test IDATx}ۖ:n$v5I5h)" 2)eVu{-tTV"pACq,}""Vh|mί8_"rQȋuSP+f?C{x[5Ģ yP^&C7#<}Dh_mޏ%%?z'D'ߢgp#ܻz'{ l|moN` )P-5'GphLk"|C |[_j~[1dM#| *dAd5|=npn >D 0}- i~EEs]x-!PJց/"~$FpU3OfaWR3dqL ݮ E~ =m?O 4 snzJ(ЁPeh0. ['[5hVo0;7>5y50e1h B`'ѣIVHP Ew>RMHvŠ]3,5;3/ϡ/f_$gH΅j0SkEh/^bu }ۤu~gЋ8 h(aC!EC,ɏzn)kNMTd@=l@%@rSc٦SFЖR{h~ju4:NsvpI A!AqEehCJH ]3U3dx>O v_M`rc`HP@dd`؞4',Òp]A'!E:A> ]ѲkO59#!Mv  &in!~-~mWL x>׆k7 *f9'L.P1C#}O|S}rygPOi;BX!0PAXDs ;I7J|,$LTR^% J̷DuʢFηF ~l[nt5@%Ch$h3-@0k]; :m>VGxo$!B֬IzrCd3"Hd9/aW|ε|oqPи$ 3ȰP̀*CꭀϪLD}H jp(lZIύBx\R, dŲ81`K t`Il N2kf^1/`Eݻs] /cy&L6XT,F26b*A kpO X5VY?֬qV_w2 V$=-k'RA/zAE6Є~C,+])jdhK ˄Qp&Dt$'EVK(W'BL׍p,?,ͪDUé[ wM` FHLШ6LZTv_>Ēa̤BM7 d0Xx&^N,G_Ic2Zt0z)j`$- \3R箯/9Nz1$Vց]O@Mo\ 1KRx6F1gkZb$Z)d0F ~xnBWbS?@%@F} k.1Z)߯+)@ fp c: X#gK$F d(=MA11u"g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>vߵ-w ND*/ >n 3r$FmN}N=U}f%[Kn=πٿ*iV: exa@w֨/_rzΎbɒ~ԑ=`Ipd8*V8V+Q)<rGS{t.4jg(/_[ +vtq)X ;7|tdo5eK ZjWnw7tYOar-L@$9-5Xk$N,7FuُP4Esw/`8E/,R?5UĐ7y_)JpHJCG ,yc[{@lGچrrQG_Iz7OUbo7%w%^JuO)>{X9?GQfAu}5lddq)pLK^bl[Ήy6=^X$P;J}K=Ú⟧v >}M}533A((>e>rs_I5R %GLp$~!SrSԲ4+Սck_޷0'w be^'t_}η_ _jP<]ҩl{|xA+u3{rt /ZD^x&ތS~W` 'sړOAoY| w9;ߒ$yq_=2t6PGp4#ײt }\%I˿y>1/Y7.5im;zdI_7ʃW~}[c q|F.u_~k_a/j}!_䗏VZR?#Χ_i:F<_JIENDB`gdalautotest-3.1.2/gdrivers/data/caseinsensitive0000664000175000017500000000000013701057753020546 0ustar evenevengdalautotest-3.1.2/gdrivers/data/fake_e00grid_compressed.e000000664000175000017500000000155313701057753022417 0ustar evenevenEXP 1 C:\FAKEE00GRID.E00 GRD 2~}~ )5~ )4 2-~^$ withheld 0 0 19 19 x y 440750 3751290 60 0 0 -60 gmljp2://codestream/0 Record Interleaved tuuidK=KCզII*   , # Wh )#NAD27 / UTM zone 11N|NAD27|N@N@@A̞LAjp2cOQ)R IYiy\ dKakadu-v6.4dKdu-Layer-Info: log_2{Delta-D(squared-error)/Delta-L(bytes)}, L(bytes) -32.7, 4.1e+02 -32.7, 4.2e+02 -33.1, 4.3e+02 -34.2, 4.4e+02 -35.6, 4.6e+02 -36.5, 4.8e+02 -37.1, 5.0e+02 -37.4, 5.3e+02 -37.8, 5.8e+02 -38.7, 6.3e+02 -40.4, 7.1e+02 -192.0, 9.3e+02 jXL   *"68  p h p @!A?@` E> }E]v!tf4񀀀 YZ Q&*pq|<0=@='$A1@{u2P{c>A(j˒.G^ImmҺi-ʒԌtUԵLu0#| 6Z3̀[ԤYfi޼yZh-[UViݺuڴimۦ]vgqҾ}t!;no֦cǎԩSL0p 3De'$LI'4M6Y&|t9]tSL)2SM5UzL34vi3te 3̐g134Sfy2,uY3legs̑93]v\s͕;3Ow7| dB -^8,H]t,bY|ӭ[e%ȒK.Z*K/tYf,YngVȊ+VZ)+rVYeYmҽ{ѣGz5X#kfZk+{kuY'뮻n[o` f6oM6$ni6llb-[f[o>}dmɶn.o}vai;g]vɮv-{ck{g}ɾ/8 x`:|9Cr衇#8"Gyd:}9crN8!'xbN:餜|9Sү_z9R__O?=gqF<̜uY9s9sy睗??\pA.\tEs%K/e]/7pCntMs-[oMsmowܑ;3wuWs=0`@w}C=~8|/W_eРA7ow}>?C~ <8?S~/_oeȐ!z'@Zkݬ6-*kڪm*kڮSYWu:^FW̰?&bӯ/T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_T_TߣgYR߬&m;ft4^/cĩkS\׸l\S[7ZqGxz7x^mWwHڿu9އz?jz^z^z^z^}z^z^z^zz^z^z^z^t_z^z^z^z^o/z^z^z^z^7ݗ}z^z^z^z^˾?^z^z^z^Meߟ^z^z^z^={%͒NI3:Ӧ᪫\5nkخOƴOKtK555þxdQ{jF1A ھg&C[7n9g0VXȿ,p_}Yᾘ}1eهb˲ܗe/>s?Tf5THȳc1y.U߸{j\j]K }Uo.5}c?ogdalautotest-3.1.2/gdrivers/data/netcdf_fixes.nc0000664000175000017500000004040013701057753020422 0ustar evenevenCDF timelatitude longitude  ConventionsCF-1.6 U bla%wbla_________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________bla(latitude  standard_namelatitude long_namelatitudeunits degrees_northaxisY(( longitude  standard_name longitude long_name longitudeunits degrees_eastaxisX((time  standard_nametime long_namejulian day (UT)unitsdays since 1990-01-01 00:00:00calendarstandard)ndarstandard)ce 1990-01-01 00:00:00calendarstandard)B:hB:iB:kB:m:B:nB:pB:rXB:t B:uB:ww_ ___\)_33_ =^H^R^\^ff@ͪgdalautotest-3.1.2/gdrivers/data/byte_corrupted.jpg0000664000175000017500000000071513701057753021200 0ustar evenevenJFIFC    }?gdalautotest-3.1.2/gdrivers/data/vicar_int16_basic2.vic0000664000175000017500000000234513701057753021520 0ustar evenevenLBLSIZE=400 FORMAT='HALF' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=40 ORG='BSQ' NL=20 NS=20 NB=1 N1=20 N2=20 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-LINUX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='BASIC2' EOCI1=1090 EOCI2=0 PROPERTY='GEOTIFF' NITF_NROWS='20' NITF_NCOLS='20'   "  !!{NsGѝ5'5#{>O>{Ns^sk} }1>΄sksN{澄|N}ϥ93NNGmJsRBs[Nޭ}(ϥ99ϡgs_^N} } |ѝ9:N{NsN{{sNss>{>>ksNs羄>|Ϙ9_}||М||М|ЏF9:9k} |ޔ>{||}{ռo9z3N||Ϙ3S9:3kZsZ>{691'^{ϣ9_9'9=ޭԼМ|\εέ羄>sJ>c羌΄^|Nk{NWҝМ||Wӝ)ӍBt9'k>cLBLSIZE=163 MODELPIXELSCALETAG='(60,60,0)' MODELTIEPOINTTAG='(0,0,0,440720,3751320,0)' TASK='TASK' USER='even' DAT_TIM='Fri Oct 25 22:59:43 2019' gdalautotest-3.1.2/gdrivers/data/rgbsmall.kap0000664000175000017500000001156613701057753017752 0ustar eveneven!Copyright unknown VER/2.0 BSB/NA=UNKNOWN,NU=999502,RA=50,50,DU=254 KNP/SC=25000,GD=WGS84,PR=Mercator PP=31.500000,PI=0.033333,SP=,SK=0.000000,TA=90.000000 UN=Metres,SD=HHWLT,DX=2.500000,DY=2.500000 RGB/1,112,120,56 RGB/2,56,72,32 RGB/3,44,64,8 RGB/4,0,16,0 RGB/5,104,168,40 RGB/6,88,112,16 RGB/7,124,176,48 RGB/8,104,136,56 RGB/9,80,136,16 RGB/10,40,80,0 RGB/11,132,152,72 RGB/12,80,84,32 RGB/13,80,100,40 RGB/14,88,136,56 RGB/15,72,120,8 RGB/16,116,128,76 RGB/17,128,168,56 RGB/18,120,144,56 RGB/19,72,96,32 RGB/20,136,160,64 RGB/21,88,104,48 RGB/22,16,24,0 RGB/23,120,144,40 RGB/24,192,208,144 RGB/25,104,120,32 RGB/26,80,120,16 RGB/27,80,120,32 RGB/28,104,136,24 RGB/29,72,128,16 RGB/30,24,60,44 RGB/31,104,152,48 RGB/32,8,32,40 RGB/33,0,0,0 RGB/34,104,120,48 RGB/35,88,112,40 RGB/36,116,152,64 RGB/37,44,72,52 RGB/38,88,88,40 RGB/39,148,156,72 RGB/40,60,104,52 RGB/41,104,160,32 RGB/42,64,112,0 RGB/43,96,128,48 RGB/44,56,104,0 RGB/45,32,40,4 RGB/46,56,88,0 RGB/47,152,176,84 RGB/48,128,140,76 RGB/49,128,144,48 RGB/50,56,88,16 RGB/51,80,96,24 RGB/52,80,112,24 RGB/53,152,160,112 RGB/54,32,68,0 RGB/55,112,136,40 RGB/56,120,160,40 RGB/57,148,164,64 RGB/58,72,96,8 RGB/59,64,96,16 RGB/60,128,160,80 RGB/61,64,104,24 RGB/62,16,48,48 RGB/63,88,128,40 RGB/64,96,136,40 RGB/65,16,16,8 RGB/66,68,76,32 RGB/67,100,144,68 RGB/68,124,136,64 RGB/69,112,152,56 RGB/70,56,96,8 RGB/71,88,136,32 RGB/72,168,200,116 RGB/73,24,60,24 RGB/74,56,100,16 RGB/75,48,72,0 RGB/76,108,172,32 RGB/77,112,176,44 RGB/78,80,92,48 RGB/79,104,144,40 RGB/80,60,76,16 RGB/81,64,80,48 RGB/82,112,136,64 RGB/83,96,124,56 RGB/84,120,164,64 RGB/85,72,112,16 RGB/86,8,8,0 RGB/87,44,48,12 RGB/88,112,160,48 RGB/89,88,152,24 RGB/90,96,152,32 RGB/91,124,188,44 RGB/92,48,96,0 RGB/93,120,152,76 RGB/94,56,80,8 RGB/95,184,204,132 RGB/96,96,112,32 RGB/97,68,84,24 RGB/98,120,152,48 RGB/99,28,64,32 RGB/100,120,160,56 RGB/101,112,152,40 RGB/102,100,124,68 RGB/103,96,160,40 RGB/104,96,144,24 RGB/105,96,120,24 RGB/106,104,128,40 RGB/107,84,104,12 RGB/108,80,128,24 RGB/109,96,108,64 RGB/110,68,80,8 RGB/111,144,196,84 RGB/112,128,160,48 RGB/113,128,176,64 RGB/114,128,132,56 RGB/115,116,140,72 RGB/116,64,104,8 RGB/117,112,144,48 RGB/118,16,40,40 RGB/119,96,128,32 RGB/120,84,124,56 RGB/121,28,48,48 RGB/122,96,120,40 RGB/123,112,164,56 RGB/124,132,176,80 RGB/125,148,156,84 RGB/126,96,160,28 RGB/127,16,48,32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! D##+=44GG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-D##?i??44@G!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#r##4??i4?#@@!!!!!!!!!!!!!!!!!!!!!!!!!!!BRD"``?@ii.!!!!!!!!!!!!!!!!!!!!!!!!!! }"j7w7????i?4??!!!!!!!!!!!!!!!!!!!!!!!!!!BS7uwi7U:??iU?l=4!!!!!!!!!!!!!!!!!!!!!!!!!0u77?E@?w?4?4!!!!!!!!!!!!!!!!!!!!!!!!!77wi4?4U???4 !!!!!!!!!!!!!!!!!!!!!!!!!Qju???@?:U?w?l?Ui?U !!!!!!!!!!!!!!!!!!!!!!!!!#7U444?7U@it?7U?? !!!!!!!!!!!!!!!!!!!!!!!!#u?@l?G@7??4#@??44 !!!!!V!!!!!!!!!!!!!!!!!!-f#@??:li444444 !!!!!!!!!!!!!!!!!!!! +4Ui4ii??i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!!!!!$ZZZ|ZqZhZ)LL88e(cyy>>>>0!!!!!!!Gl?|o{l|ML[[[epe$%>>>yy%y1!!!!!!!=$$TH@=TDt4ZMoqqeI>>>>> >2!!!!!!!Q _7<s{q/ " 2UioLo)* *i81uC>>> gdalautotest-3.1.2/gdrivers/data/two_vars_scale_offset.nc0000664000175000017500000001052013701057753022342 0ustar evenevenCDF xy  Conventions COARDS/CF-1.0 x  long_namex actual_range$@$8y  long_namey actual_range$@$z  long_namez scale_factor?zG{ add_offset?q  long_nameq scale_factor? add_offset@ l$" ?@@@@@@@ @"@$$" ?@@@@@@@ @"@$BBBBBpBHB AAA HpŒ ´BBBB|BXB4BAAA4X|¢´BBBB`B@B BAAA @`€ BB|B`BDB(B AAA`@` (D`|ŒBpBXB@B(BAAAA@@@(@XpBHB4B B AAAApA @ p 4HB BBAAAAA@A@@ AAAAAApA@A@@@@@pAAAA`A@A A@@@ @`A AA@@@@@@@?@ @?@@@@@@@AAA `@ @@@AA A@A`AAAp@@@@@AA@ApAAAAA @@AA@AAAABBB H4 p @A ApAAAB B B4BHpX@(@@A@AAABB(B@BXBpŒ|`D( `@A`AAB B(BDB`B|B €`@ AAABB B@B`BBB´¢|X4AAABB4BXB|BBB´ ŒpH A AAB BHBpBBBBBBBBBpBHB AAA HpŒ ´BBBB|BXB4BAAA4X|¢´BBBB`B@B BAAA @`€ BB|B`BDB(B AAA`@` (D`|ŒBpBXB@B(BAAAA@@@(@XpBHB4B B AAAApA @ p 4HB BBAAAAA@A@@ AAAAAApA@A@@@@@pAAAA`A@A A@@@ @`A AA@@@@@@@?@ @?@@@@@@@AAA `@ @@@AA A@A`AAAp@@@@@AA@ApAAAAA @@AA@AAAABBB H4 p @A ApAAAB B B4BHpX@(@@A@AAABB(B@BXBpŒ|`D( `@A`AAB B(BDB`B|B €`@ AAABB B@B`BBB´¢|X4AAABB4BXB|BBB´ ŒpH A AAB BHBpBBBBgdalautotest-3.1.2/gdrivers/data/frmt28.cot0000664000175000017500000015271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@>@ &6@HbAM=1@Ѐy ?(:dAQ۶m۶m۶m۶yGm۶m۶mVMO@{@<Ás@g@@@$@>@ @@!Z@@ .P3@@V@e=@܁@@@@)k'YW!3dGn7icaj"gmQ<+Ah>lb=;@?z%#)eb ԀnZ}uAP'tC]\tuc[;$Eg-LKOnrNt&w[7s8s\Ow-LG@-fUkofg7{VN@5@*@Q@$@@@iJ@@%@I=@@@<6@@@@B0@?CB@@@@@@I@@@@@:F@LS$À=.CIagbQi6Ln3%7l>?A0,w`d!;<cApW,Z|iAtcfq6?lAaQb333333333333333333s{{{{{{{{{{{{-l27Q?BR,a~;Lˀ#-@{ƀ>退NA:{ M zAMQMcz;A?7hgQaf0b%njmeB/i4d5"k(.61$|z$Oߒ$I$ɗT璇3:v^^tvkG۽$I$@΂@}?@;@;@Ё@dR ' H7Q?RA?  @ 7B()dAQCq@R&O@=+<G\)nAs{g6<3ke*lmdf?! c>aTbdQA:DFc9>cgDq}DyQ;e{{ 79e$aA=k7?-"O@| gb> QAhH\~ 3ؙmMNlE-w'nO(@<@@@?@?@\ @@%?@@!a =@a@SP ,@HY QbacA~~~gdalautotest-3.1.2/gdrivers/data/byte_one_poc.j2k0000664000175000017500000000054613701057753020523 0ustar evenevenOQ)R \@@d _ Ϸ@zR.$13E 2yiH*T? m mioIaE,atBG(q=@XprXP,v`9ڽR9D+Mn?&F֢ľKsZG4{Ϊk:k3Ys!9t")!bT|D0k}lMA^Q` `N, O퀚?He=%@tNRe|68,'sZgdalautotest-3.1.2/gdrivers/data/srtm.ers0000664000175000017500000000201613701057753017140 0ustar evenevenDatasetHeader Begin Version = "5.2" DataSetType = ERStorage DataType = Raster ByteOrder = MSBFirst Foo = { "x\\\" y" } CoordinateSpace Begin Datum = "WGS84" Projection = "GEODETIC" CoordinateType = LL Rotation = 0:0:0.0 CoordinateSpace End RasterInfo Begin CellType = Signed16BitInteger NullCellValue = +9999 CellInfo Begin Xdimension = 0.00833333 Ydimension = 0.00833333 CellInfo End NrOfCellsPerLine = 12 NrOfLines = 10 RegistrationCellX = 1 RegistrationCellY = 1 NrOfBands = 1 BandId Begin Value = "Topography" Units = "meters" BandId End RegistrationCoord Begin Latitude = -60:00:00 Longitude = -180:00:00 RegistrationCoord End NrOfBands = 1 RegionInfo Begin RegionName = "All" Stats Begin MinimumValue = { -4315 } MaximumValue = { -3744 } MeanValue = { -4020.25 } MedianValue = { -4000 } Stats End RegionInfo End RasterInfo End DatasetHeader End gdalautotest-3.1.2/gdrivers/data/byte_rraster_rat.grd0000664000175000017500000000102313701057753021506 0ustar eveneven[georeference] nrows=20 ncols=20 xmin=440720 ymin=3750120 xmax=441920 ymax=3751320 projection=+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat [data] datatype=INT1U byteorder=little nbands=1 bandorder=BIL categorical=TRUE ratnames=ID:int_field:numeric_field:string_field:red:green:blue:alpha:pixelcount:name rattypes=integer:integer:numeric:character:integer:integer:integer:integer:integer:character ratvalues=0:1:10:11:1.2:2.3:foo:bar:0:1:2:3:4:5:6:7:8:9:baz:baw gdalautotest-3.1.2/gdrivers/data/test.isg0000664000175000017500000000155013701057753017125 0ustar evenevenThis is an example. Here some information about model computation can be provided. Reference: A. Name1, B. Name2 (year). Title. Journal, Volume(Number), pp. xxx-yyy. begin_of_head ================================================ model name : EXAMPLE model type : gravimetric units : meters reference : GRS80 lat min = 40.0000 lat max = 41.0000 lon min = 120.0000 lon max = 121.5000 delta lat = 0.2500 delta lon = 0.2500 nrows = 4 ncols = 6 nodata = -9999.0000 ISG format = 1.0 end_of_head ================================================== 30.1234 31.2222 32.3456 33.4444 34.5678 36.6666 41.1111 42.2345 43.3333 44.4567 45.5555 46.6789 51.4321 52.9753 53.6543 54.8642 -9999.0000 -9999.0000 61.9999 62.8888 63.7777 64.6666 -9999.0000 -9999.0000 gdalautotest-3.1.2/gdrivers/data/float32.prj0000664000175000017500000000064713701057753017437 0ustar evenevenPROJCS["NAD_1927_UTM_Zone_11N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] gdalautotest-3.1.2/gdrivers/data/byte_pds4_cart_1700.img0000664000175000017500000000062013701057753021512 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/text_md.vrt0000664000175000017500000000121613701057753017642 0ustar eveneven This is text data with a newline. Also, a second text segment is created. byte.tif 1 gdalautotest-3.1.2/gdrivers/data/pds_3177.lbl0000664000175000017500000000701613701057753017407 0ustar evenevenPDS_VERSION_ID = PDS3 RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 15 FILE_RECORDS = 20 LABEL_RECORDS = 1 ^IMAGE = ("small.raw", 3 ) /* This file was manually modified substantially from the original to produce a small file demonstrating bug 3177's detached file with an offset */ OBJECT = IMAGE LINES = 20 LINE_SAMPLES = 15 BANDS = 1 CENTER_FILTER_WAVELENGTH = 1.000 BAND_STORAGE_TYPE = BAND_SEQUENTIAL OFFSET = 0.0 SCALING_FACTOR = 1.0 SAMPLE_BITS = 8 SAMPLE_TYPE = UNSIGNED_INTEGER END_OBJECT /* Identification Information */ DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" PRODUCER_ID = "UA" PRODUCER_FULL_NAME = "ALFRED MCEWEN, PRINCIPLE INVESTIGATOR, SARAH S. MATTSON, TECHNICAL CONTACT" PRODUCT_ID = "DTEEC_008669_1705_009025_1705_A01" PRODUCT_VERSION_ID = "1.0" INSTRUMENT_HOST_NAME = "MARS RECONNAISSANCE ORBITER" INSTRUMENT_HOST_ID = "MRO" INSTRUMENT_NAME = "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT" INSTRUMENT_ID = "HIRISE" TARGET_NAME = "MARS" SOURCE_PRODUCT_ID = (PSP_008669_1705, PSP_009025_1705) RATIONALE_DESC = "Sulfates and valley system in Melas Chasma " SOFTWARE_NAME = "SOCET Set v.5.4.1.20090303" OBJECT = IMAGE_MAP_PROJECTION ^DATA_SET_MAP_PROJECTION = "DSMAP.CAT" MAP_PROJECTION_TYPE = "EQUIRECTANGULAR" PROJECTION_LATITUDE_TYPE = PLANETOCENTRIC /* NOTE: The EQUIRECTANGULAR projection is based on the formula */ /* for a sphere. To eliminate confusion in the */ /* IMAGE_MAP_PROJECTION object we have set all three radii, */ /* A_AXIS_RADIUS, B_AXIS_RADIUS, and C_AXIS_RADIUS to the same */ /* number. The value recorded in the three radii is the local */ /* radius at the center latitude on the Mars ellipsoid. That is, */ /* equatorial radius of 3396.190000 km and polar radius of */ /* 3376.200000 kilometers. Using the local radius of the */ /* ellipsoid implies that the MAP_SCALE and MAP_RESOLUTION are */ /* true at the center latitude. */ A_AXIS_RADIUS = 3396.036 B_AXIS_RADIUS = 3396.036 C_AXIS_RADIUS = 3396.036 COORDINATE_SYSTEM_NAME = PLANETOCENTRIC POSITIVE_LONGITUDE_DIRECTION = EAST KEYWORD_LATITUDE_TYPE = PLANETOCENTRIC /* NOTE: CENTER_LATITUDE and CENTER_LONGITUDE describe the location */ /* of the center of projection, which is not necessarily equal to the */ /* location of the center point of the image. */ CENTER_LATITUDE = -5.0 CENTER_LONGITUDE = 180.0 LINE_FIRST_PIXEL = 1 LINE_LAST_PIXEL = 26376 SAMPLE_FIRST_PIXEL = 1 SAMPLE_LAST_PIXEL = 8211 MAP_PROJECTION_ROTATION = 0.0 MAP_RESOLUTION = 58607.71638002 MAP_SCALE = 1.0113804322107 MAXIMUM_LATITUDE = -9.2737184447053 MINIMUM_LATITUDE = -9.7237459567128 EASTERNMOST_LONGITUDE = 283.3744507 WESTERNMOST_LONGITUDE = 283.2343445 LINE_PROJECTION_OFFSET = -543510.49999999 SAMPLE_PROJECTION_OFFSET = -6050328.5 END_OBJECT END gdalautotest-3.1.2/gdrivers/data/cf_no_sphere.nc0000664000175000017500000000704013701057753020416 0ustar evenevenCDF time1yx ConventionsCF-1.0Originating_center0US National Weather Service (NCEP) subcenter = 5Generating_Process_or_ModelForecastProduct_StatusOperational products Product_TypeForecast products cdm_data_typeGRID creator_name0US National Weather Service (NCEP) subcenter = 5 file_formatGRIB-2historyFTue Oct 25 00:15:16 2011: ncatted -a missing_value,Total_cloud_cover,a,f,nan cf_no_sphere.nc Tue Oct 25 00:15:10 2011: ncatted -a missing_value,Total_cloud_cover,d,, cf_no_sphere.nc Direct read of GRIB-2 into NetCDF-Java 4.0 API; Synthetic dataset from TDS fmrc (best) aggregation, original data from fmrc/NCEP/NDFD/CONUS_5km_CoordinateModelBaseDate2010-01-09T12:00:00ZHistoryTranslated to CF-1.0 Conventions by Netcdf-Java CDM (NetcdfCFWriter) Original Dataset = NDFD-CONUS_5km_best.ncd; Translation Date = Tue Feb 23 14:09:34 MST 2010 Total_cloud_cover long_name%Total_cloud_cover @ entire_atmosphereunitspercent grid_mappingLambert_ConformalGRIB_param_disciplineMeteorological_productsGRIB_param_categoryCloudGRIB_param_nameTotal_cloud_cover GRIB_param_idGRIB_product_definition_type+Analysis/forecast at horizontal level/layerGRIB_level_typeGRIB_VectorComponentFlag gridRelative coordinates time1 y x missing_valueh time1 units hours since 2010-01-09T12:00:00Z long_nameforecast time coordinate standard_nametime_CoordinateAxisTypeTime Ly unitskm long_namey coordinate of projection standard_nameprojection_y_coordinate grid_spacing5.07947216796875 km_CoordinateAxisTypeGeoYp Tx unitskm long_namex coordinate of projection standard_nameprojection_x_coordinate grid_spacing5.07936083984375 km_CoordinateAxisTypeGeoXX Lambert_Conformal grid_mapping_namelambert_conformal_conicstandard_parallel@@@Flongitude_of_central_meridian@pplatitude_of_projection_origin@D earth_shape6Earth spherical with radius specified by producer in m_CoordinateTransformType Projection_CoordinateAxisTypes GeoX GeoYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@V@\8p@fa@@@pIY@zgξ@۪C}@[&@- ",@U@~mId@܋#@o@t@!/a@I*^ g7DohqTw]IṖ 4-C D^{ ] xi4#dgdalautotest-3.1.2/gdrivers/data/geoserver.wcs0000664000175000017500000000020313701057751020151 0ustar eveneven http://demo.opengeo.org/geoserver/wcs? Img_Sample gdalautotest-3.1.2/gdrivers/data/envi_rgbsmall_bil.img0000664000175000017500000001626613701057753021624 0ustar evenevenPxfbfJMolGPRNTY\Wswinclrp|$C-,6?="%jybccbRRZlX^NRh^Z&ntv{wz{pv;="$%(!1'1' ^ts`YR^ZTZUWSP\W_`Qfvsn|{wz|xr~}-:4#$""(#*+ Do}ka|]YWW_cSVTST3MONSKxytwwxzvyyxxWtxw|"CE,6 &*HsdeiffReZ`Z]TXSVLRPWWTv|py{x}syy"P4$$&$'."& %  ""Emihbkq]ZgGC[OUUTDZT@KTPL|{|yjhw}zyi}gr}y 7&!)1+ # " gsil^odTujf]T]\ZMZSMMKU t{s|t}ttr|R$/$*/%9.+#%$"#.pong`lcTMVT|\QSNHSYN\WJU5{voxxv{xp{xq|9),&!.$A""$!HnhqcYZaS`GH`\RZSWH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8%!*" &"( ?4Z$)D%kaLGrmfUMW]_[bbg@dX1:X|bn^F?orSq{c\yt~iW]~la|1BGH8P$9TT53!!$%#(*3 )! 'F&2+B@ %qbcL>_SrHJWbh]^X@MB?X\n.6RedE2*Vo\(z}eVvfcj{hqfhT^sZLy U)F:C & (5!*0!" ";'()>'lxHWGgqd_`HTO@AnY][UYqsYma]iuh~tuxj~|nq}JA #:/%%.( #$4! %  1')%*@r^ynLjrbifh^SSRSXRTdQIX@lhJKaZoUOFV6Feebwz{|{xpn~~s~\i19*+.CM"-.1'$,$ 0,+ 2&.zq_ddOLNQKMMQOPVPSZOKVV^EUaoKBbvtpuxotvzvx~|{uhsabfJ?.987?2:;Mrq_lq|khZ_Q/Icpd_LkbP2Ed]cV[HOTz^qtg_cd^JLQ\SMWazvrm61wyxeg`zbinz|v}W2.16.(2)-0 * $VF(:<-#%&# !:9?J(&2"nnhcVISSOOofV3VRHTB<_hhionpukjv`]SLV#(|mwwqqrMuvq~qm|wuI0-BA7))$" >5'%#)'(-+/1*)7 )C$%//yi`ffgsbZW48^b}ijtqX7akhoipojsz}zY&6WYmuD<710 J,0("*,+;*  *I)A++21'-%+%,*%,54?;")/2KpVHWWIe\]n_1+CYjpwioM<`kikarnpptn8TwrWOjpT;652/%Q<*!-"$6- !04O6*4&.(),'()/<+)/441SRq]]VMPUOfKeyjPOvBPbUdbTGAgclerk_\BgktruketpaoumƠf7521,*3"#!"52A4E#Z)**b-$(+('9@*04412[HiLXFF>Acs;3K^VGdSOc*GMTnUVovmRe{adgra\^\knzMkt}{A9)(&'&"(#-2$ '%("(-)5<8'7--./pjeojxT]VHkrqp{x|Wmojqi|xxptOvnvUhhd7 wuyb@/,')'K9.4/="/743=:?33&* 3;78194+5#.@,-00,/.ofKn__`hjucte_e`msptqWox~uhmnfAl?62/,,,>)1 #++F8#=/!%&("%('05-9B)+66'/43001g]TYmsHUlv|xjoixrp~~mlg&+"uL6331.C6:!4GL6 L069:4&+!,53>+&93?3?=')>'/2552G=Cy{u|gdA}q>Nbmruwg}tqqkaYڟ͔bbv˻?5340+*'??;Mk/0K@ ")-2K?=B7,*: 1264033gdalautotest-3.1.2/gdrivers/data/srtm.dem0000664000175000017500000000036013701057753017114 0ustar evenevenMUZZ\``ZVUOE=6,~n^PA1#{pg]QHC<50-+)'%MUZZ\``ZVUOE=6,~n^PA1#{pg]QHC<50-+)'%gdalautotest-3.1.2/gdrivers/data/BAND7.DAT0000664000175000017500000000000013701057753016554 0ustar evenevengdalautotest-3.1.2/gdrivers/data/trmm.nc0000664000175000017500000002137413701057753016751 0ustar evenevenCDF  longitude(latitude(time CDIGClimate Data Interface version 1.5.2 (http://code.zmaw.de/projects/cdi) ConventionsCF-1.4history^Wed Sep 07 22:33:59 2011: cdo sellonlatbox,-80,-70,-20,-10 tmp4-noc.nc tmp5.nc Wed Sep 7 22:33:53 2011: ncatted -a Conventions,global,d,, tmp4.nc tmp4-noc.nc Wed Aug 24 12:59:04 2011: ncatted -D 10 -a CoreMetadata.0,global,d,, -a ArchiveMetadata.0,global,d,, tmp3.nc tmp4.nc Tue Aug 23 21:04:45 2011: cdo seltimestep,1 tmp2.nc tmp3.nc Tue Aug 23 19:19:18 2011: cdo selvar,pcp tmp1.nc tmp2.nc Tue May 17 19:34:24 2011: cdo sellonlatbox,-85.25,-29.625,15.25,-50 3B43.2011.nc tmp1.nc Tue May 17 19:26:31 2011: cdo mergetime 3B43.110101.6A.nc 3B43.110201.6A.nc 3B43.110301.6A.nc 3B43.110401.6A.nc 3B43.2011.nccalendar standardcommentsbfile created by grads using lats4d available from http://dao.gsfc.nasa.gov/software/grads/lats4d/model geos/dascentergsfcCDOHClimate Data Operators version 1.5.2 (http://code.zmaw.de/projects/cdo)  longitude  standard_name longitude long_name Longitudeunits degrees_eastaxisX@tlatitude  standard_namelatitude long_nameLatitudeunits degrees_northaxisY@time  standard_nametimeunitshours since 2011-01-01 00:00:00calendarstandard pcp  long_nameprecipitation:Precipitation _FillValue?commentsUnknown1 variable com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ȝ>>5>Bt>~>QN>ɍ:D;!;Z;z<35<4$<=O!_=[k=oa=z=N>y>jF>>Ƥ>ϒ> $>1>*>a>{]>xPq>>q>>>Y>>w>>>>>R>&gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/0000775000175000017500000000000013701057753021070 5ustar evenevengdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/0000775000175000017500000000000013701060017024517 5ustar evenevengdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/S2B_OPER_MTD_SAFL1B.xml0000664000175000017500000002374113701060017030157 0ustar eveneven 2015-12-31T23:59:59.999Z 2015-12-31T23:59:59.999Z Level-1B S2MSI1B 01.03 2015-12-31T23:59:59.999Z http://example.com BrowseImageFootprint Sentinel-2B INS-NOBS 2015-12-31T23:59:59.999Z 22 DESCENDING -90.0 -180.0 90.0 180.0 false false B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 B11 B12 B8A Standard YES YES SAFE false S2B_OPER_MSI_L1B_B01 S2B_OPER_MSI_L1B_B06 S2B_OPER_MSI_L1B_B10 S2B_OPER_MSI_L1B_B08 S2B_OPER_MSI_L1B_B07 S2B_OPER_MSI_L1B_B09 S2B_OPER_MSI_L1B_B05 S2B_OPER_MSI_L1B_B12 S2B_OPER_MSI_L1B_B11 S2B_OPER_MSI_L1B_B04 S2B_OPER_MSI_L1B_B03 S2B_OPER_MSI_L1B_B02 S2B_OPER_MSI_L1B_B8A NODATA 1 SATURATED 0 3 2 1 1276 73728 4 3 3 4 5 4 4 6 5 8 61 37 NONE 0 4095 true true 46 11 45 11 45 13 46 13 46 11 POINT 1 EPSG GEOGRAPHIC XX EPSG:1495 2015-12-31T23:59:59.999 0 0 0 0 0 0 0 0 0 0 0 10 10 0 0 0 0 0 10 10 S2B_OPER_GIP_BLINDP_MPC__20150605T094736_V20150622T000000_21000101T000000_B00 S2__OPER_DEM_GLOBEF_PDMC_19800101T000000_S19800101T000000 S2__OPER_AUX_UT1UTC_PDMC_20151001T000000_V20151002T000000_20161001T000000 S2__OPER_DEM_GLOBEF_PDMC_19800101T000000_S19800101T000000 0.0 0 0 PASSED PASSED PASSED PASSED PASSED gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/0000775000175000017500000000000013701057753025631 5ustar eveneven././@LongLink0000644000000000000000000000015600000000000011605 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000775000175000017500000000000013701060017030014 5ustar eveneven././@LongLink0000644000000000000000000000020200000000000011575 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/S2B_OPER_MTD_L1B.xmlgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000516213701060017030022 0ustar eveneven S2B_OPER_MSI_L1B_GR_MTI__20151231T235959_S20151231T235959_D02_N01.03 02 S2B_OPER_MSI_L1B_DS_MTI__20151231T235959_S20151231T235959_N01.03 NOMINAL 2015-12-31T23:59:59.999Z MTI_ 2015-12-31T23:59:59.999Z 46 11 1 45 11 2 45 13 3 46 13 4 46 11 1 POINT 1 1 45.5 12 2.5 0 0 8 96 43 158 2304 2552 1152 1276 384 1276 0 0 S2B_OPER_MSK_CLOLOW_MTI__20151231T235959_S20151231T235959_D02_B01_MSIL1B.gml ././@LongLink0000644000000000000000000000016700000000000011607 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000775000175000017500000000000013701057753030031 5ustar eveneven././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B12.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B06.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B05.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B04.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* ** BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B8A.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B01.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B08.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* ** BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B02.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* ** BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B07.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B10.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B11.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* rr BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B09.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000021700000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L1B_N01.03/IMG_DATA/S2B_OPER_MSI_L1B_B03.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l1b/S2B_OPER_PRD_MSIL1B.SAFE/GRANULE/S2B_OPER_MSI_L10000664000175000017500000000067613701057753030044 0ustar evenevenII* ** BCD$E$*Sgdalautotest-3.1.2/gdrivers/data/r_test.asc0000664000175000017500000000036413701057753017434 0ustar evenevenRDA2 A 2 133377 131840 1026 1 4105 2 gg 526 40 107 123 132 115 115 132 107 123 115 132 140 132 148 132 123 123 132 156 132 140 107 123 132 115 115 132 107 123 115 132 140 132 148 132 123 123 132 156 132 140 1026 1 4105 3 dim 13 3 4 5 2 254 254 gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/0000775000175000017500000000000013701057751021174 5ustar evenevengdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107IREF.DDF0000664000175000017500000000054613701057751022556 0ustar eveneven002072L 1 0600052 3204000002100000102921IREF105500000;&1107IREF.DDF0100;&DDF RECORD IDENTIFER1600;&Internal Spacial ReferenceMODN!RCID!SATP!XLBL!YLBL!HFMT!SFAX!SFAY!XORG!YORG!XHRS!YHRS(A,I,4A,6R)00151 D 1 00041 310400010080IREF10280000001IREF12-TUPLEEastingNorthingR1.000000001.000000000.000000000.0000000030.0000000030.00000000gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107CATD.DDF0000664000175000017500000000363313701057751022544 0ustar eveneven001672L 1 0600049 22040000210000012921CATD68500000;&1107CATD.DDF0100;&DDF RECORD IDENTIFER1600;&Catalog/DirectoryMODN!RCID!NAME!TYPE!FILE!EXTR!MVER(A,I,5A)00091 D 1 00039 21040001080CATD4480000001CATD1IDENIdentification1107IDEN.DDFN100103 D 1 00039 21040001080CATD5680000002CATD2IREFInternal Spatial Reference1107IREF.DDFN100103 D 1 00039 21040001080CATD5680000003CATD3XREFExternal Spatial Reference1107XREF.DDFN100099 D 1 00039 21040001080CATD5280000004CATD4DDSHData Dictionary/Schema1107DDSH.DDFN100099 D 1 00039 21040001080CATD5280000005CATD5DDOMData Dictionary/Domain1107DDOM.DDFN100097 D 1 00039 21040001080CATD5080000006CATD6DQHLData Quality/Lineage1107DQHL.DDFN100109 D 1 00039 21040001080CATD6280000007CATD7DQPAData Quality/Positional Accuracy1107DQPA.DDFN100108 D 1 00039 21040001080CATD6180000008CATD8DQAAData Quality/Attribute Accuracy1107DQAA.DDFN100109 D 1 00039 21040001080CATD6280000009CATD9DQLCData Quality/Logical Consistency1107DQLC.DDFN100103 D 1 00039 21040001080CATD5680000010CATD10DQCGData Quality/Completeness1107DQCG.DDFN100095 D 1 00039 21040001080CATD4880000011CATD11RSDFRaster Definition1107RSDF.DDFN100094 D 1 00039 21040001080CATD4780000012CATD12LDEFLayer Definition1107LDEF.DDFN100095 D 1 00039 21040001080CATD4880000013CATD13CATDCatalog/Directory1107CATD.DDFN100100 D 1 00039 21040001080CATD5380000014CATD14CATSCatalog/Spatial Domain1107CATS.DDFN100097 D 1 00039 21040001080CATD5080000015CATD15STATTransfer Statistics1107STAT.DDFN100104 D 1 00039 21040001080CATD5780000016CATD16DDDFData Dictionary/Definition1107DDDF.DDFN100092 D 1 00039 21040001080CATD4580000017CATD17SPDMSpatial Domain1107SPDM.DDFN100082 D 1 00039 21040001080CATD3580000018CATD18CEL0Cell1107CEL0.DDFN1gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DDOM.DDF0000664000175000017500000000127413701057751022553 0ustar eveneven001912L 1 0600049 22040000210000012921DDOM92500000;&1107DDOM.DDF0100;&DDF RECORD IDENTIFER1600;&Data Dictionary/DomainMODN!RCID!ATLB!AUTH!ATYP!ADVF!ADMU!RAVA!DVAL!DVDF(A,I,6A,I,A)00114 D 1 00039 21040001080DDOM6780000001DDOM1ELEVATIONUSGS/NMDINTEGERIVALUE-32767Void area in DEM00141 D 1 00039 21040001080DDOM9480000002DDOM2ELEVATIONUSGS/NMDINTEGERIVALUE-32766Fill Value used to make the DEM a rectangle00127 D 1 00039 21040001080DDOM8080000003DDOM3ELEVATIONUSGS/NMDINTEGERIMETERSMIN182Minimum elevation of the DEM00127 D 1 00039 21040001080DDOM8080000004DDOM4ELEVATIONUSGS/NMDINTEGERIMETERSMAX345Maximum elevation of the DEMgdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107STAT.DDF0000664000175000017500000000326713701057751022607 0ustar eveneven001672L 1 0600049 22040000210000012921STAT68500000;&1107STAT.DDF0100;&DDF RECORD IDENTIFER1600;&Transfer StatisticsMODN!RCID!MNTF!MNRF!NREC!NSAD(A,I,2A,2I)00078 D 1 00039 21040001080STAT3180000001STAT1IdentificationIDEN1000090 D 1 00039 21040001080STAT4380000002STAT2Internal Spatial ReferenceIREF1000090 D 1 00039 21040001080STAT4380000003STAT3External Spatial ReferenceXREF1000086 D 1 00039 21040001080STAT3980000004STAT4Data Dictionary/SchemaDDSH1000086 D 1 00039 21040001080STAT3980000005STAT5Data Dictionary/DomainDDOM4000085 D 1 00039 21040001080STAT3880000006STAT6Data Quality/LineageDQHL13000096 D 1 00039 21040001080STAT4980000007STAT7Data Quality/Positional AccuracyDQPA9000095 D 1 00039 21040001080STAT4880000008STAT8Data Quality/Attribute AccuracyDQAA1000096 D 1 00039 21040001080STAT4980000009STAT9Data Quality/Logical ConsistencyDQLC2000090 D 1 00039 21040001080STAT4380000010STAT10Data Quality/CompletenessDQCG4000082 D 1 00039 21040001080STAT3580000011STAT11Raster DefinitionRSDF1000081 D 1 00039 21040001080STAT3480000012STAT12Layer DefinitionLDEF1000083 D 1 00039 21040001080STAT3680000013STAT13Catalog/DirectoryCATD18000088 D 1 00039 21040001080STAT4180000014STAT14Catalog/Spatial DomainCATS18000091 D 1 00039 21040001080STAT4480000015STAT15Data Dictionary/DefinitionDDDF1000079 D 1 00039 21040001080STAT3280000016STAT16Spatial DomainSPDM1000071 D 1 00039 21040001080STAT2480000017STAT17CellCEL0472000085 D 1 00039 21040001080STAT3880000018STAT18Transfer StatisticsSTAT180gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DQCG.DDF0000664000175000017500000000522713701057751022550 0ustar eveneven001412L 1 0600049 22040000210000012921DQCG42500000;&1107DQCG.DDF0100;&DDF RECORD IDENTIFER1600;&CompletenessMODN!RCID!COMT(A,I,A)00081 D 1 00039 21040001080DQCG3480000001DQCG1VOID AREAS: No void areas.00793 D 1 00041 310400010080DQCG74480000002DQCG2The 7.5-minute series DEMS are based on a UTM grid. Hence, the scans do not always have the same number of elevation posts due to the variable angle between true north and grid north of the UTM coordinate system. Any elevation post that falls outside of the 7.5-minute quadrangle edge is dropped, i.e. there is no overedge. The 7.5-minute DEM will be encoded as a non-ragged grid by filling with a background post value to the edges of the minimum bounding rectangle. The fill value is distinguishable from all other elevation post values, and it will be same value for all USGS DEM series encoded in SDTS. The Void post value(-32767) will not be reused as the fill value, so the original extent of the DEM data can easily be detected.00471 D 1 00041 310400010080DQCG42280000003DQCG3Void areas occur in the DEM as a result of interruptions to the contours of the source graphic or DLG (eg. photoimages overprinted onto a topographic map). Each DEM elevation post located within a void area is assigned a false negative value of -32,767. The percentage of void elevation values in the DEM, if present, was calculated from the total number of grid posts in the DEM assigned the false negative value.01225 D 1 00043 4104000100080DQCG117480000004DQCG4HYDROGRAPHY INCLUDED: For DEM Level 1 and 2, water bodies contained in DEM data are edited when they conform to the following criteria: 1) Type is a pond, lake, reservoir, or double-line drainage; and, 2) Size of a pond, lake or reservoir exceeds approximately 1/2 inch at map scale (1000 feet at 1:24,000 scale, 4167 feet at 1:100,000 scale) along the major axis; or, 3) Size of a double-line drain exceeds 1/4 inch (500 feet at 1:24,000 scale, 2087 feet at 1:100,000 scale) in width. For level 3 DEM's, the grid is constrained by all major hydrographic features contained within a DLG hydrography category, including drainage, lakes, swamps, and shorelines. Elevations of hydrographic features are determined through interpolation of contours using a registered DLG hypsography file. DEM surfaces constrained to drains are treated as a special case of hypsographic faulting where the DEM surface is simply creased along the track line of the drain. Additionally, all grid cells are tilted consistent with the direction of stream flow, along the track line of the drain. There must not be any unsupported breaks or discontinuities in the rate of slope of the drain.gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DQHL.DDF0000664000175000017500000001111413701057751022552 0ustar eveneven001362L 1 0600049 22040000210000012921DQHL37500000;&1107DQHL.DDF0100;&DDF RECORD IDENTIFER1600;&LineageMODN!RCID!COMT(A,I,A)01754 D 1 00043 4104000100080DQHL170380000001DQHL1CONVERSION TO SDTS: This DEM was converted to SDTS Raster Profile as part ofa mass conversion of US Geological Survey Digital Elevation model archive to SDTS. The data organization was changed from a southwest origin with south to north scans to a northwest origin with west to east scans. The x,y grid positions were not altered -- i.e., the data was not resampled. The UTM gridded DEMs are ragged in their native form. A fill value was used too make the DEM grid rectangular in this transfer. GENERAL NOTES: A number of factors affect gridding processes and the accuracy of the final DEM product: 1) A dependency exists between the scale of the source materials and the level of detail or grid refinement that is possible from a given source. 2) During the process of changing scale, from large to small, some source data may be generalized or dropped out and, therefore, some features would not be available for formation of, or incorporation into, a grid at that scale. 3) The process of forming a grid with regular spacing requires the transfer of precise point or vector data to generalized grid square corners using a process similar to taking a simple weighted average. This process may alter the apparent position upon display of point or vector source data, reducing the ability to recover positions of specific features whose dimensions are less than the internal grid cell spacing. For all DEM's, the grid spacing and spatial resolution results in data intervals that span terrain discontinuities, such as benches, tops, and drainage. Some features can be appropriately captured at a given grid spacing while other, smaller features are subdued or filtered out altogether.00087 D 1 00039 21040001080DQHL4080000002DQHL2DEM CELL NAME: ALANSON, MI-2400000117 D 1 00039 21040001080DQHL7080000003DQHL3PROCESS CODE 5: DLG/hypsography LINETRACE, LT4X complex linear00070 D 1 00039 21040001080DQHL2380000004DQHL4DEM PRODUCER: 00066 D 1 00039 21040001080DQHL1980000005DQHL5DEM LEVEL-200436 D 1 00041 310400010080DQHL38780000006DQHL6DEM LEVEL 2 means: DEM created from digital line graph (DLG) contours or equivalent, or from any USGS map series up to 1:100,00 scale using stable base contour separate or equivalent. DEM data derived from hyposgraphic and hydrographic data digitizing, either photogrammetrically or from existing maps, are entered into the Level 2 category after review on a DEM editing system.00105 D 1 00039 21040001080DQHL5880000007DQHL7SOURCE DATE OF PUBLISHED MAP OR PHOTOGRAPHY: 198300094 D 1 00039 21040001080DQHL4780000008DQHL8DATA INSPECTION OR REVISION DATE: 199800145 D 1 00039 21040001080DQHL9880000009DQHL9INSPECTION FLAG: Iindicates all process of part three quality control have been performed.00152 D 1 00041 310400010080DQHL10380000010DQHL10DATA VALIDATION FLAG: Level 2 and 3 DEMs reviewed and edited. RSME computed from test points.00085 D 1 00039 21040001080DQHL3880000011DQHL11DATA EDITION: 1: USGS default00111 D 1 00039 21040001080DQHL6480000012DQHL12GRID RESOLUTION: 30.000000 METERS X, 30.000000 METERS Y01326 D 1 00043 4104000100080DQHL127580000013DQHL13VISUAL VERIFICATION: Because of practical limitations inherent in all collection systems, there will always be some artifacts such as benches, striations, patches, or some other anomaly that imparts some signature of the collection system in the data set. Some of these artifacts, although falling within normal DEM vertical error tolerances, can coalesce with valid surface features. All DEM's are viewed and edited so corrective actions can be taken to minimize these artifacts. For example, 1) Isolated tops are depicted with their approximate size and shape; 2) Flat trending surfaces are depicted as generally flat trending without confusing patterns or striations; and, 3) Water bodies are flat, lower than the surrounding terrain, and have shorelines clearly delineated. Additional testing is performed using a DEM Editing System (DES) to aid in the identification of blunders such as irregularly gridded data, mistagging of tops and depressions, and spikes. These blunders are generally identified by displaying the DEM with the aid of DES options, which include color banding of elevation gradients, stereoscopic viewing using anaglyphic filters, and shaded-relief enhancement. An elevation matrix is analyzed in suspect areas and corrected as required.gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DDDF.DDF0000664000175000017500000000053113701057751022524 0ustar eveneven001762L 1 0600049 22040000210000012921DDDF77500000;&1107DDDF.DDF0100;&DDF RECORD IDENTIFER1600;&Data Dictionary/DefinitionMODN!RCID!EORA!EALB!DFIN!AUTH!ADSC(A,I,5A)00169 D 1 00041 310400010080DDDF12080000001DDDF1ATTELEVATIONThe vertical distance from a given datumUSGS/NMDU.S. Geological Survey/National Mapping Divisiongdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/README0000664000175000017500000000574613701057751022070 0ustar evenevenThis dataset has been truncated to 25 scanlines for GDAL testing purpose. Original README: **************************************************************************** NOTICE: THESE FILES ARE FOR SOFTWARE TESTING ONLY NOT FOR DISTRIBUTION **************************************************************************** 1:24,000-Scale Raster Profile Digital Elevation Model Readme File Version: 08/2001 (README) This directory contains a Spatial Data Transfer Standard (SDTS)-compliant raster profile transfer, produced by the National Mapping Program of the U.S. Geological Survey (USGS). This transfer corrects potential horizontal errors in SDTS DEMs created before January 1, 2001. This transfer also corrects a variant in the profile identifier field. If you have questions or comments, please send e-mail to sdts@usgs.gov or contact the USGS at: U.S. Geological Survey SDTS Task Force 1400 Independence Road Rolla, MO 65401 PURPOSE OF TRANSFER: The mission of the USGS National Mapping Program is to meet the Nation's need for basic geospatial data, ensuring access to and advancing the application of these data and other related earth science information for users worldwide. These data are provided in SDTS format as the result of a Federal mandate. The digital elevation model (DEM) is the USGS National Mapping Program's response to the Nation's need for accurate and consistent geospatial digital elevation data in raster format. STANDARD AUTHORITY: American National Standards Institute (ANSI): Parts 1-3: ANSI NCITS 320-1998 The Spatial Data Transfer Standard Federal Geographic Data Committee: FGDC-STD-002.5-1999, February 1999 Part 5: SDTS Raster Profile (RPE) with Basic Image Interchange Format (BIIF). ISO 8211 CONFORMANCE: All files with extension *.DDF are in the ISO 8211 file transfer format. All SDTS spatial addresses are expressed in two 32-bit binary subfields defined by the ISO 8211. Files are Level 2 of ISO 8211. CATALOG DIRECTORY MODULE xxxxCATD.DDF: Each transfer includes this catalog directory module that contains a listing of every SDTS ISO 8211 file included in the transfer (xxxx indicates a four-character transfer base that is common to all files in a transfer). IDENTIFICATION MODULE xxxxIDEN.DDF: This module contains information that describes the overall characteristics of the data in a transfer. REFERENCES: "The Spatial Data Transfer Standard Mapping of the USGS Digital Elevation Model" describes SDTS transfers of DEM data, including detailed information on each module. The file can be downloaded from the SDTS FTP site: ftp://sdts.er.usgs.gov/pub/sdts/datasets/raster/dem/ Additional information can be found on the SDTS Web site: http://mcmcweb.er.usgs.gov/sdts gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107CATS.DDF0000664000175000017500000000523613701057751022564 0ustar eveneven001762L 1 0600049 22040000210000012921CATS77500000;&1107CATS.DDF0100;&DDF RECORD IDENTIFER1600;&Catalog/Spatial DomainMODN!RCID!NAME!TYPE!MAP!THEM!AGOB!AGTP(A,I,6A)00133 D 1 00039 21040001080CATS8680000001CATS1IDENIdentificationALANSON, MI ELEVATIONDEM1G200145 D 1 00039 21040001080CATS9880000002CATS2IREFInternal Spatial ReferenceALANSON, MI ELEVATIONDEM1G200145 D 1 00039 21040001080CATS9880000003CATS3XREFExternal Spatial ReferenceALANSON, MI ELEVATIONDEM1G200133 D 1 00039 21040001080CATS8680000004CATS4SPDMSpatial DomainALANSON, MI ELEVATIONDEM1G200139 D 1 00039 21040001080CATS9280000005CATS5DQHLData Quality/LineageALANSON, MI ELEVATIONDEM1G200153 D 1 00041 310400010080CATS10480000006CATS6DQPAData Quality/Positional AccuracyALANSON, MI ELEVATIONDEM1G200152 D 1 00041 310400010080CATS10380000007CATS7DQAAData Quality/Attribute AccuracyALANSON, MI ELEVATIONDEM1G200153 D 1 00041 310400010080CATS10480000008CATS8DQLCData Quality/Logical ConsistancyALANSON, MI ELEVATIONDEM1G200144 D 1 00039 21040001080CATS9780000009CATS9DQCGData Quality/CompletenessALANSON, MI ELEVATIONDEM1G200146 D 1 00039 21040001080CATS9980000010CATS10DDDFData Dictionary/DefinitionALANSON, MI ELEVATIONDEM1G200142 D 1 00039 21040001080CATS9580000011CATS11DDOMData Dictionary/DomainALANSON, MI ELEVATIONDEM1G200142 D 1 00039 21040001080CATS9580000012CATS12DDSHData Dictionary/SchemaALANSON, MI ELEVATIONDEM1G200137 D 1 00039 21040001080CATS9080000013CATS13RSDFRaster DefinitionALANSON, MI ELEVATIONDEM1G200136 D 1 00039 21040001080CATS8980000014CATS14LDEFLayer DefinitionALANSON, MI ELEVATIONDEM1G200124 D 1 00039 21040001080CATS7780000015CATS15CEL0CellALANSON, MI ELEVATIONDEM1G200142 D 1 00039 21040001080CATS9580000016CATS16CATSCatalog/Spatial DomainALANSON, MI ELEVATIONDEM1G200139 D 1 00039 21040001080CATS9280000017CATS17STATTransfer StatisticsALANSON, MI ELEVATIONDEM1G200137 D 1 00039 21040001080CATS9080000018CATS18CATDCatalog/DirectoryALANSON, MI ELEVATIONDEM1G2gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DDSH.DDF0000664000175000017500000000044113701057751022545 0ustar eveneven001832L 1 0600049 22040000210000012921DDSH84500000;&1107DDSH.DDF0100;&DDF RECORD IDENTIFER1600;&Data Dictionary/SchemaMODN!RCID!NAME!TYPE!ATLB!AUTH!FMT!UNIT!PREC(A,I,6A,R)00106 D 1 00039 21040001080DDSH5980000001DDSH1CEL0CELLELEVATIONUSGS/NMDBI16METERS1.00000000gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107RSDF.DDF0000664000175000017500000000102013701057751022553 0ustar eveneven003512L 1 0600085 330400000210000001029021RSDF112050ISID042162SADR031204LYID0312350000;&1107RSDF.DDF0100;&DDF RECORD IDENTIFER1600;&Raster DefinitionMODN!RCID!OBRP!CSCD!DEFI!RWXT!CLXT!SCOR!TIDX!ALTN!FSCN!ASPR!NLAY(A,I,3A,2I,2A,I,A,R,I)1600;&Internal Spatial IDMODN!RCID(A,I)1600;&Spatial AddressX!Y(2R)1600;&Layer IDMODN!RCID(A,I)00177 D 1 00070 2304000108000RSDF52008ISID07060SADR33067LYID071000000001RSDF1G2GIDEF472339TLNOTESS1R1.000000001IREF1666030.000000005040720.00000000LDEF1gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107XREF.DDF0000664000175000017500000000100313701057751022562 0ustar eveneven002332L 1 0600061 2304000021000000129021XREF72050VATT501220000;&1107XREF.DDF0100;&DDF RECORD IDENTIFER1600;&External Spatial ReferenceMODN!RCID!COMT!RSNM!HDAT!ZONE(A,I,4A)1600;&Vertical AttributesVDAT!VEM!ATLB!AUTH(4A)00282 D 1 00055 33040001008000XREF190008VATT0291980000001XREF1National Geodetic Vertical Datum 1929 Vertical Datum Shift = -0.05; always add to convert from National Geodetic Vertical Datum 1929 to North American Vertical Datum 1988.UTMNAS16NGVDCELLELEVATIONUSGS/NMDgdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107SPDM.DDF0000664000175000017500000000063413701057751022572 0ustar eveneven001992L 1 0600061 2304000021000000129021SPDM50050DMSA381000000;&1107SPDM.DDF0100;&DDF RECORD IDENTIFER1600;&Spatial DomainMODN!RCID!DTYP!DSTP(A,I,2A)1600;&Domain Spatial AddressX!Y(2R)00213 D 1 00052 3204000100800SPDM02108DMSA132290000001SPDM1RINGEXTERNAL666390.919530005026588.57789500666023.795294005040475.32910700675789.821559005040741.40018700676178.562581005026854.66559100gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DQAA.DDF0000664000175000017500000000050213701057751022527 0ustar eveneven001472L 1 0600049 22040000210000012921DQAA48500000;&1107DQAA.DDF0100;&DDF RECORD IDENTIFER1600;&Attribute AccuracyMODN!RCID!COMT(A,I,A)00175 D 1 00041 310400010080DQAA12680000001DQAA1No Attribute Accuracy to report. See Positional Accuracy module, because the cell values are elevation measurements.gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107LDEF.DDF0000664000175000017500000000043613701057751022541 0ustar eveneven001962L 1 0600049 22040000210000012921LDEF97500000;&1107LDEF.DDF0100;&DDF RECORD IDENTIFER1600;&Layer DefinitionMODN!RCID!CMNM!LLBL!CODE!NROW!NCOL!SORI!SOCI!RWOO!CLOO!INTR(A,I,3A,6I,A)00090 D 1 00039 21040001080LDEF4380000001LDEF1CEL0ELEVATIONV0253391100CEgdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107CEL0.DDF0000664000175000017500000004277313701057751022524 0ustar eveneven001882L 1 0600057 22040000210000012921CELL4450CVLS37940000;&1107CEL0.DDF0100;&DDF RECORD IDENTIFER1600;&CellMODN!RCID!ROWI!COLI(A(4),3I(5))2600;&Cell Values*ELEVATION(B(16))00759 R 1 00052 3204000100800CELL02008CVLS679280000001CEL0000010000100001Ȁ0000002CEL0000020000200001Ȁ0000003CEL0000030000300001Ȁ0000004CEL0000040000400001  Ȁ0000005CEL0000050000500001                   Ȁ0000006CEL0000060000600001                         Ȁ0000007CEL0000070000700001,,/0/-+(%""""""""!""!! !!                     Ȁ0000008CEL0000080000800001)('''&%$##""""""""""##$%&'''(*+,,,+++,/10/,)&$""""""!  "!"                 ɀ0000009CEL00000900009000017999866689;?CC?><;;;=>?><9:;;:610.,+*)(''''&%$$#"""""""""""#$%&'')*,,,,*)*+-011-)&$#$%%#! "               ɀ0000010CEL00001000010000017766668:;<;9668;;;@DA?><;;<>@@?=;<<=<830/-+*)'''''&&%$#"""""""""""#$&'()+,,,+)()*+.01.+'%#$'''$!                ɀ0000011CEL00001100011000017777767:<>><98:<<=>B@@>=;;;<>@@>;;=??>:51/-,+)('''(''%$#"""""""""""$%')+,,,,+)''''*-/-,(%#$&'''#             ɀ0000012CEL00001200012000019998878:<@@@<;<>@@@@@@?><;;;;=>=;;;=@@?:61/.+*('())))'%$#""""""""""#%&(+,,,,,*''&&&),,,*&#"#'''&"            Ȁ0000013CEL0000130001300001<;;::99:<>@BA>>@AAAAAAA?>=;;;;<<;;;;>@@?951/,*)()**++(&%$#""""""""""$%'*,,,,,*'%$$%%&*,,(%""#&''#!             ƀ0000014CEL0000140001400001BB@>;;;<>@ADEB@ABBCCCCBB@?=;;;;;;;;;;>@@<851-+*)*++,,*'&%#"""""""""""$&),,++,)'%#"##"&),,($""#%'%#!!            0000015CEL0000150001500001EEDB?<<>@@ADEEDBDDDDEEEDCB@><;;9:;;;9:<@>762-,+*+,,++,)'&$#""""""""""#%')))*,*'%#"!! !#(+(%"""$''%#!              0000016CEL0000160001600001EEEEB?>@BBCEEGHFEEEFGHHGFECA?<:879:9768;<721,,++,+*)*+,*'%$#""""""""""$'&&'(,,'%#! !%'%""""$&&$#!               À0000017CEL0000170001700001DIHDBA@BEEEEHJIGEFHIJJJGEEDA><8666665567311/.-,+*)()*+,)&%#"""""""""""##"#$'(%$#!!""""!"%'&$#              ƀ0000018CEL0000180001800001CHJIFECDEFGFIJJJHIJIHHFECBA@>;9666664223112330-+)(''()*)'&$"""""""""""""""""""""  "! #''%#!!"              ǀ0000019CEL0000190001900001=EJKJHFEEHJJJJJJJJGEEC@@@@=;;;96666654226::874/+*('''''''&$#""""""""""""""""!  "&&%#! !""                    Ȁ0000020CEL0000200002000001<@HNOMIHEFIJJJJJIGEEEBB@AA?=;;::866666567:;;950,*)(''''''&$#""""""""""""""""! !" "'&#""! !"'$!                       Ȁ0000021CEL0000210002100001;<CHOOKKIGIJJJJIGEEEEDFEFFB@@>?=:8666666669;961,*)(''''''&$#"""""""""$#"#$$$" "%&# !#""""!  !!"#&'%"                    Ȁ0000022CEL0000220002200001;;>EJOPNMJJJJJJIEFHHGGJIJFEDA@@?=:8666665557860-+)('''''&%$#"""""""#$&&&'')(&"!! !#''%!""""!!"!"$&''&"                    Ȁ0000023CEL0000230002300001@>>@FMTROKKJJJJJGHJJIIJJJHGECCBA@<9666654434541.+(''''''&%$#"""""""#%''()*,,*'&%$"#'''"      """!!$%'''%#                   ǀ0000024CEL0000240002400001@AA@AGLOONNLJJJJIJJJJJJJJJJGEEDB@=:766543222221-*(''''''&%$#""""""""$&')*,,,,+*('$$'''$$%%%%!%'# "#&'''&$!                 ǀ0000025CEL0000250002500001<AEEADFKOQOMJJJJJJJJJJJJJJJHFEDB?=;8665322110/.+)'''''''&%#"##"""""""%')*,,,,,+*)'''))')+*)'$$'$ !&''''&#             ŀgdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DQLC.DDF0000664000175000017500000000261013701057751022546 0ustar eveneven001482L 1 0600049 22040000210000012921DQLC49500000;&1107DQLC.DDF0100;&DDF RECORD IDENTIFER1600;&Logical ConsistencyMODN!RCID!COMT(A,I,A)00650 D 1 00041 310400010080DQLC60180000001DQLC1EDGE MATCH STATUS: West(1), North(1), East(4), South(4). Edge matching is a process of matching elevation values along common quadrangle edges. The objective of edge matching is to improve the alignment of ridges and drains and overall topographic shaping and representation. Code of 0 = not edge matched; 1 = edge match checked and joined; 2 = not edge matched because adjoining DEM is on a different horizontal or vertical datum; 3 = not edge matched because the adjoining DEM is not part of the current project; 4 = not edge matched because the adjoining DEM has a different vertical unit.00618 D 1 00041 310400010080DQLC56980000002DQLC2NULL SCHEME: The method for indicating no value for a cell in the Cell module records contained in this transfer is described here. In the Data Dictionary Domain module there are specific values that are reserved to mean VOID and FILL for ELEVATION. VOID means there is no elevation measurement available for a cell that falls within the *geographic boundaries* of the DEM. (In the geographic coordinate system the bounds of the DEM data are rectangular.) A fill also means there is no data, but is used to make the DEM rectangular in the UTM coordinate system.gdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107IDEN.DDF0000664000175000017500000000115113701057751022541 0ustar eveneven002752L 1 0600061 2304000021000000129021IDEN96050CONF681460000;&1107IDEN.DDF0100;&DDF RECORD IDENTIFER1600;&IdentificationMODN!RCID!STID!STVS!DOCU!PRID!PDOC!PRVS!TITL!DAID!DAST!MPDT!DCDT(A,I,11A)1600;&ConformanceFFYN!VGYN!GTYN!RCYN!EXSP!FTLV!CDLV!NGDM(4A,3I,A)00342 D 1 00055 33040001008000IDEN263008CONF0162710000001IDEN1SPATIAL DATA TRANSFER STANDARD1998 JUNE 9ANSI NCITS 320-1998SRPE: SDTS RASTER PROFILE and EXTENSIONSFederal Geographic Data Committee FGDC-STD-002.51998ALANSON, MI-24000LAT:: 45 22 30.0000 N LONG:: -84 45 0.0000 W SCALE:: 24000DEM19982001808NNNY140Ngdalautotest-3.1.2/gdrivers/data/STDS_1107834_truncated/1107DQPA.DDF0000664000175000017500000000633013701057751022553 0ustar eveneven001482L 1 0600049 22040000210000012921DQPA49500000;&1107DQPA.DDF0100;&DDF RECORD IDENTIFER1600;&Positional AccuracyMODN!RCID!COMT(A,I,A)00295 D 1 00041 310400010080DQPA24680000001DQPA1DEM LEVEL 2 means: Data sets have been processed or smoothed for consistency and edited to remove identifiable systematic errors. An RMSE of half of the contour interval is the maximum permitted, with no errors greater than one contour.00197 D 1 00041 310400010080DQPA14880000002DQPA2ACCURACY: RMSE of the DEM data relative to the file's datum (x,y,z) is (0, 0, 1); accuracy has been calculated based on a sample size of 30.00076 D 1 00039 21040001080DQPA2980000003DQPA3CONTOUR INTERVAL: 5.00087 D 1 00039 21040001080DQPA4080000004DQPA4CONTOUR INTERVAL UNITS: METERS.00087 D 1 00039 21040001080DQPA4080000005DQPA5SUSPECT AREAS: No suspect areas.00297 D 1 00041 310400010080DQPA24880000006DQPA6VERTICAL DATUM SHIFT: -0.050000. Adding this value to the elevation values will convert it to North American Vertical Datum 1988. Value is computed by averaging the shift values for the four quadrangle corners obtained from program VERTCON.01219 D 1 00043 4104000100080DQPA116880000007DQPA7SUSPECT AREAS: Suspect areas in the DEM result from corresponding areas on the graphic source that are shown as disturbed surfaces. They are symbolized by contours that have been overprinted with photorevised or other surface patterns. Examples of disturbed surfaces are: lava flows, land slides, open pit mining, construction cut and fill, and land fill operations. An estimated elevation is supplied for suspect areas based on the presumed elevation at the time the DEM grid is generated; however, the true elevation is subject to change without notice. When an elevation cannot be estimated for a suspect area, the area is downgraded to a void area and assigned a false negative value -32,767. Grid posts falling in suspect areas are added to the DEM grid as though they were valid elevations; they are distinguishable from normal DEM grid posts only by an independent inspection of the graphic source. For this reason, no percentage value for the total number of cells in the DEM that are assigned an estimated value. Suspect areas relate only to graphic sources. Furthermore, no commensurate code exists for suspects areas in the DLG hypsography category.00296 D 1 00041 310400010080DQPA24780000008DQPA8WATER BODIES: Water body areas are naturally occurring areas of constant elevation. Oceans or estuaries at mean sea level are assigned an elevation value of zero. All other water bodies are assigned their known or an estimated elevation.00586 D 1 00041 310400010080DQPA53780000009DQPA9HORIZONTAL ACCURACY: The horizontal positions of grid posts in USGS DEM's are located at precise mathematically defined positions in UTM meters or arc seconds. These grid posts are fixed in position and can be considered constants for the purpose of determining accuracy. The only measurable or perceivable errors in the DEM exist as vertical errors that may be partially attributable to horizontal error inherent in the source data or to errors in converting horizontal and vertical components of the source to gridded format.gdalautotest-3.1.2/gdrivers/data/SENSRB_TRE.ntf0000664000175000017500000000570713701057753017671 0ustar evenevenNITF02.1003BF01GDAL 20021216151629 U 00000000000 00000000301500040400100101100000016000000000000000000000000000IMMissing 20021216151629 U 0Unknown 0000004000000040INTMONO VIS 08R 0NC1M N 00B00010001004000400800100000000000001.0 0000000572000SENSRB00558Y UMS 4 mdeg 00000000000000201905070000084.05986900 Y 000000000000000000000000000000000000000000000000000000000000000000003 470 471 472 43643267 000000000000000000000000 000206b000311111111111111110000111122222222222222220000111133333333333333330000111106e0002444444444444444400005555555555555555000000000000hltvr|lnqn|}kivwmzkpxztxynr~mk||rr{}x{ovskqyxwnqzwgh|{}|nzowuowqzxpqiyrdj~~{u_imt|oxpnupsjo}zyxupllors{|~xss}rqzv{ujkxumproqtsmj~xrs{|vwy{xsu|wjdlugmzury~yx|{uy}|xrrx|{zzzytp}udiz|x|vpsutru||seeq~}zuqpsy{t|~qjmpvlwypip}wzuft{sr|zuʽ]ķyxxor~wu~h`vxx±^Ȼykn~~vvzed|~ywn{ik|~snw~wijyvr~dmw{}{xpklxzpoqqnjp}s_{yYfstyus}xpnrz{qgjtp`bwvfvw^dk~wnuto}{||{{{{gdrqa`r~}rigg~}{yyz{xsw~tr{|wv|{idmqlmw}qnwytq}hkpfpyyuputnrusollou{yroryjni]l|vhnphqrijv|slox|~yb`vsfrrequorwnpv{z||up~}}zokstkxgVbxmhlrz~~zrjfvvw}}nn}|xsxsYJTzmw|rllhbl{pmm}vnjv|v{{smmoqrux`_egjkigmy}xjdp~|qr|{l_a{ronjiifcm~ozmht}shisum`_}ôtgnz~}vf[kmuwqu|wh_clsmcp}ttyl[fty|}jesxmb`fnk`fyu_exwvopyoqdXhtrokf`ZYexzmlx|vw}v|qltvkY_kqsof_`jrtwzvoknqttuxvifw~jbeknjgjxkftwjbeilot~}oghotts~|wlkqqnvnejlf`_bghhq~uaS\w{tvo~g\frvpb]bdabgd]h~iWYh{x~xcY\ejf]X]adjqqmtxpr||meiqthSP`f]]kxpcưqzzkel}xVVxxs~ka༎ogq|}szvy|z~wsuwгs{{yyqegtthiu~Ż{ppqonokgjsqedlrrky{kbdhiiijkpspfcfigdalautotest-3.1.2/gdrivers/data/251_rasterdms.dat0000664000175000017500000000037213701057753020530 0ustar evenevenf8PK4ލRasterDMS3065Edms_State PADSDSfK4 *:JZjgdalautotest-3.1.2/gdrivers/data/4619old_truncated.dem0000664000175000017500000004164313701057753021313 0ustar evenevenRealWorld Data, L.L.C. - 1 Degree Terrain File Format 1 1 0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3 2 4 0.684000000000000D+05 0.165600000000000D+06 0.684000000000000D+05 0.169200000000000D+06 0.720000000000000D+05 0.169200000000000D+06 0.720000000000000D+05 0.165600000000000D+06 0.790000000000000D+02 0.160000000000000D+03 0.0 00.300000E+010.300000E+010.100000E+01 1 2 1 1 1201 1 0.720030000000000D+05 0.165600000000000D+06 0.0 0.900000000000000D+02 0.120000000000000D+03 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 101 101 102 102 103 103 104 105 105 106 107 106 106 107 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 111 111 111 111 111 111 111 112 112 112 112 112 113 113 113 113 114 114 114 114 114 115 115 115 115 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 120 114 113 113 113 113 112 112 112 113 112 112 111 111 111 111 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 109 108 107 106 105 104 103 102 101 101 100 100 100 100 100 100 100 100 100 100 100 100 100 99 99 99 99 99 98 98 98 98 98 97 97 95 95 94 94 95 95 94 94 93 93 93 91 91 91 91 91 91 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 93 93 94 94 95 95 95 95 96 97 98 98 98 98 98 98 98 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 98 98 98 98 98 98 98 97 97 97 97 97 97 97 97 97 96 96 96 96 96 96 96 96 96 96 96 96 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 -32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 -32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 -32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 2 1 1201 1 0.720030000000000D+05 0.165600000000000D+06 0.0 0.900000000000000D+02 0.117000000000000D+03 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 98 99 98 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 101 101 101 102 102 103 103 104 104 104 105 105 106 109 109 109 109 109 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 111 111 111 111 111 111 111 111 111 111 111 112 112 112 112 112 112 113 113 113 113 113 113 116 116 116 116 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 117 116 116 116 116 112 112 112 112 112 112 111 111 112 111 111 111 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 110 109 109 108 107 106 105 104 103 102 101 100 100 100 100 100 100 100 100 100 100 101 100 100 100 100 100 100 99 99 99 99 98 98 98 97 96 96 95 96 95 95 94 94 94 93 92 92 92 91 91 91 91 91 91 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 93 94 94 94 95 95 95 96 97 98 97 98 98 98 98 98 99 99 99 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 99 99 99 100 99 98 98 98 98 97 97 97 97 97 97 97 97 97 96 96 96 96 96 96 96 96 96 96 96 96 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94 94-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 -32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 -32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 -32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000-32000 gdalautotest-3.1.2/gdrivers/data/L71230079_07920021111_HTM.FST0000664000175000017500000001100013701057753020756 0ustar evenevenREQ ID =0000308280000_00000 LOC =230/079F ACQUISITION DATE =20021111 SATELLITE =LANDSAT7 SENSOR =ETM+ SENSOR MODE =NORMAL LOOK ANGLE = 0.00 LOCATION = ACQUISITION DATE = SATELLITE = SENSOR = SENSOR MODE = LOOK ANGLE = LOCATION = ACQUISITION DATE = SATELLITE = SENSOR = SENSOR MODE = LOOK ANGLE = LOCATION = ACQUISITION DATE = SATELLITE = SENSOR = SENSOR MODE = LOOK ANGLE = PRODUCT TYPE =MAP ORIENTED PRODUCT SIZE =FULL SCENE TYPE OF PROCESSING =SYSTEMATIC RESAMPLING =CC VOLUME #/# IN SET =01/01 PIXELS PER LINE =7428 LINES PER BAND =7012 /7012 START LINE # = BLOCKING FACTOR = REC SIZE =52085136 PIXEL SIZE = 30.00 OUTPUT BITS PER PIXEL =8 ACQUIRED BITS PER PIXEL =8 BANDS PRESENT =LH FILENAME =L71230079_07920021111_B61.FSTFILENAME =L72230079_07920021111_B62.FST FILENAME = FILENAME = FILENAME = FILENAME = REV L7A BIASES AND GAINS IN ASCENDING BAND NUMBER ORDER 0.000000000000000 0.066823529411765 3.200000000000000 0.037058823529412 GEOMETRIC DATA MAP PROJECTION =TM ELLIPSOID =WGS84 DATUM =WGS84 USGS PROJECTION PARAMETERS = 0.637813700000000D+07 0.635675231400000D+07 0.100000000000000D+01 0.000000000000000D+00 -0.660000000000000D+08 0.000000000000000D+00 0.500000000000000D+06 0.100022883000000D+08 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 USGS MAP ZONE =3 UL = 0654253.3551W 262922.7769S 3528432.250 7071172.000 UR = 0632851.4727W 262803.7852S 3751242.250 7071172.000 LR = 0632615.1647W 282150.2432S 3751242.250 6860842.000 LL = 0654235.6396W 282315.8679S 3528432.250 6860842.000 CENTER = 0643503.3325W 272555.7121S 3639986.250 6965977.000 3714 3506 OFFSET =0 ORIENTATION ANGLE = 0.00 SUN ELEVATION ANGLE =60.4 SUN AZIMUTH ANGLE = 76.8 gdalautotest-3.1.2/gdrivers/data/fakedipex.dat0000664000175000017500000000200113701057753020064 0ustar evenevengdalautotest-3.1.2/gdrivers/data/BAND1.DAT0000664000175000017500000000000013701057753016546 0ustar evenevengdalautotest-3.1.2/gdrivers/data/cucled-1.rsw0000664000175000017500000001264513701057753017603 0ustar evenevenRSW@UUUUUd@N@tLA@A@@  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~RSW    @Y@@  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~dRSW@Y@P@  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~kkk{s{ksssskŔc{{{{s{ccsc{s{{{c{{kskkkcss{sccZccckkkk{sk{{c{ksccck{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/test_ntv2_be.gsb0000664000175000017500000000066013701057753020536 0ustar evenevenNUM_OREC NUM_SREC NUM_FILEGS_TYPE SECONDS VERSION FOO SYSTEM_FNTF SYSTEM_TRGF93 MAJOR_F AXTLMINOR_F AX?MAJOR_T AXT@MINOR_T AX?+SUB_NAMETEST PARENT NONE CREATED 24/01/16UPDATED S_LAT A7N_LAT ApE_LONG ՟W_LONG @3LAT_INC @ӃLONG_INC@lGS_COUNT=E?:V.;W#_@>;TV.;W`@:;"3"@H5P:;"3END gdalautotest-3.1.2/gdrivers/data/LanduseSmall.rp#0000664000175000017500000000034013701057753020430 0ustar evenevenILWIS 2.00 Table 08txbbbh|j~S(gdalautotest-3.1.2/gdrivers/data/rgbsmall_truncated2.kap0000664000175000017500000001156313701057753022102 0ustar eveneven!Copyright unknown VER/2.0 BSB/NA=UNKNOWN,NU=999502,RA=50,50,DU=254 KNP/SC=25000,GD=WGS84,PR=Mercator PP=31.500000,PI=0.033333,SP=,SK=0.000000,TA=90.000000 UN=Metres,SD=HHWLT,DX=2.500000,DY=2.500000 RGB/1,112,120,56 RGB/2,56,72,32 RGB/3,44,64,8 RGB/4,0,16,0 RGB/5,104,168,40 RGB/6,88,112,16 RGB/7,124,176,48 RGB/8,104,136,56 RGB/9,80,136,16 RGB/10,40,80,0 RGB/11,132,152,72 RGB/12,80,84,32 RGB/13,80,100,40 RGB/14,88,136,56 RGB/15,72,120,8 RGB/16,116,128,76 RGB/17,128,168,56 RGB/18,120,144,56 RGB/19,72,96,32 RGB/20,136,160,64 RGB/21,88,104,48 RGB/22,16,24,0 RGB/23,120,144,40 RGB/24,192,208,144 RGB/25,104,120,32 RGB/26,80,120,16 RGB/27,80,120,32 RGB/28,104,136,24 RGB/29,72,128,16 RGB/30,24,60,44 RGB/31,104,152,48 RGB/32,8,32,40 RGB/33,0,0,0 RGB/34,104,120,48 RGB/35,88,112,40 RGB/36,116,152,64 RGB/37,44,72,52 RGB/38,88,88,40 RGB/39,148,156,72 RGB/40,60,104,52 RGB/41,104,160,32 RGB/42,64,112,0 RGB/43,96,128,48 RGB/44,56,104,0 RGB/45,32,40,4 RGB/46,56,88,0 RGB/47,152,176,84 RGB/48,128,140,76 RGB/49,128,144,48 RGB/50,56,88,16 RGB/51,80,96,24 RGB/52,80,112,24 RGB/53,152,160,112 RGB/54,32,68,0 RGB/55,112,136,40 RGB/56,120,160,40 RGB/57,148,164,64 RGB/58,72,96,8 RGB/59,64,96,16 RGB/60,128,160,80 RGB/61,64,104,24 RGB/62,16,48,48 RGB/63,88,128,40 RGB/64,96,136,40 RGB/65,16,16,8 RGB/66,68,76,32 RGB/67,100,144,68 RGB/68,124,136,64 RGB/69,112,152,56 RGB/70,56,96,8 RGB/71,88,136,32 RGB/72,168,200,116 RGB/73,24,60,24 RGB/74,56,100,16 RGB/75,48,72,0 RGB/76,108,172,32 RGB/77,112,176,44 RGB/78,80,92,48 RGB/79,104,144,40 RGB/80,60,76,16 RGB/81,64,80,48 RGB/82,112,136,64 RGB/83,96,124,56 RGB/84,120,164,64 RGB/85,72,112,16 RGB/86,8,8,0 RGB/87,44,48,12 RGB/88,112,160,48 RGB/89,88,152,24 RGB/90,96,152,32 RGB/91,124,188,44 RGB/92,48,96,0 RGB/93,120,152,76 RGB/94,56,80,8 RGB/95,184,204,132 RGB/96,96,112,32 RGB/97,68,84,24 RGB/98,120,152,48 RGB/99,28,64,32 RGB/100,120,160,56 RGB/101,112,152,40 RGB/102,100,124,68 RGB/103,96,160,40 RGB/104,96,144,24 RGB/105,96,120,24 RGB/106,104,128,40 RGB/107,84,104,12 RGB/108,80,128,24 RGB/109,96,108,64 RGB/110,68,80,8 RGB/111,144,196,84 RGB/112,128,160,48 RGB/113,128,176,64 RGB/114,128,132,56 RGB/115,116,140,72 RGB/116,64,104,8 RGB/117,112,144,48 RGB/118,16,40,40 RGB/119,96,128,32 RGB/120,84,124,56 RGB/121,28,48,48 RGB/122,96,120,40 RGB/123,112,164,56 RGB/124,132,176,80 RGB/125,148,156,84 RGB/126,96,160,28 RGB/127,16,48,32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! D##+=44GG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-D##?i??44@G!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!#r##4??i4?#@@!!!!!!!!!!!!!!!!!!!!!!!!!!!BRD"``?@ii.!!!!!!!!!!!!!!!!!!!!!!!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pee))eGG4_5&!!!!!!!!Vr1??==q{ZZGZ*l8'!!!!!!!W"`e7e4U=;# #/]?EEZZZl?wddTCQ>>(!!!!!!!- 7e@wi=4$#K#Ul**Gww#fc>>)!!!!!!!'p8@E??.^?<TG,Z)8$Scc>>y*!!!!!! /el?U?@. t?EogltZ)[euQ>>>>+!!!!!N4u?@? +"q];|@GZZlU=Hg))Z(>>>,!!!!!!z44?=U:;"]. @="#2 ?Z*{. ZGM2I>>>>>-!!!!! \@ GZZ,,GlU,.\Z *Zh)*j =4li8{x>>>>.!!!!!Vql@ UeqqGM)ddu87C(c>>>>>/!!!!!!$ZZZ|ZqZhZ)LL88e(cyy>>>>0!!!!!!!Gl?|o{l|ML[[[epe$%>>>yy%y1!!!!!!!=$$TH@=TDt4ZMoqqeI>>>>> >2!!!!!!!Q _7<s{q/ " 2UioLo)* *i81uC>>> gdalautotest-3.1.2/gdrivers/data/kmlimage.kmz0000664000175000017500000000304013701057753017747 0ustar evenevenPKpD!t2 doc.kmlUT %S%Sux ݖM0"`p*U?vH[G\6Cz32T[YqTlZ)%5rׯأN MӸe&jWr `;J%]˸f[7}.jvփiqk^~?xEZq(ޥvUwnwS^q;{I4bzBSۦR#s}Slu1K\E ZSrqMjJ<M@#"OJB|I aefv*BqEa'Kh3ReS2}0^;*nvb5c1{]h(ete? ̵t'LXʦ]6q'Ч }/q/o""3Qs,h101^d$=o0btcusφ_ J|,Q4_PK=pD͢>} kml_image_L1_0_0.pngUT %S%Sux  sb``p b``R````r1bk < p WU3: *eo``dfbx0Xܨa3ihs ~.PKWpD; 6kml_image_L2_0_0.pngUT %S%Sux  sb``p b``2,8؀ԗ'+=]C*漽q -s82O3 +n[) D1Hp`TbTbTbTbTbTbTbTbTbTbTbTbTbpKq<]\9%4PKpDBekml_image_L2_0_1.pngUT %S%Sux  sb``p  L@HLf3Q0R@1bۃ ~H&X00L< tsYPKpD!t2 doc.kmlUT%Sux PK=pD͢>} Ukml_image_L1_0_0.pngUT%Sux PKWpD; 6 kml_image_L2_0_0.pngUT%Sux PKpDBekml_image_L2_0_1.pngUT%Sux PK[gdalautotest-3.1.2/gdrivers/data/byte_lut.vrt0000664000175000017500000000112613701057753020025 0ustar eveneven 0:0,50:25,75:50,100:100,100:150,150:200,200:255 byte.tif 1 gdalautotest-3.1.2/gdrivers/data/aea_compressed.dat0000664000175000017500000000146313701057753021111 0ustar evenevenpoE!˕|me$E"k+kWD"H$262;9m6<3MTr)\JIxDY*r9E"|RĂ DkRYe`Pj>^SV9֍yjo쯋gŇ{csO(LO]^w8j٢~箟_Wt!x|TrčM2fR)v H5kM!Bs B̅sfG|rkMGDcǠkm8Pg>z/maȊȒko9LC|r芨H3:)z]^S \! } ]ח )Wa<ݞgdalautotest-3.1.2/gdrivers/data/1bit.rsw0000664000175000017500000002120113701057753017031 0ustar evenevenRSW"@@j@$@"?Bɣ1@"?H@"?Bɣ1@"?Bɣ1@?????????????????????????????????????????????????????????????????gdalautotest-3.1.2/gdrivers/data/dimap2/0000775000175000017500000000000013701057751016613 5ustar evenevengdalautotest-3.1.2/gdrivers/data/dimap2/RPC_foo.XML0000664000175000017500000001456213701057751020474 0ustar eveneven DIMAP PHR_SENSOR RPC en NITF RPC00B SAMP_NUM_COEFF_1 SAMP_NUM_COEFF_2 SAMP_NUM_COEFF_3 SAMP_NUM_COEFF_4 SAMP_NUM_COEFF_5 SAMP_NUM_COEFF_6 SAMP_NUM_COEFF_7 SAMP_NUM_COEFF_8 SAMP_NUM_COEFF_9 SAMP_NUM_COEFF_10 SAMP_NUM_COEFF_11 SAMP_NUM_COEFF_12 SAMP_NUM_COEFF_13 SAMP_NUM_COEFF_14 SAMP_NUM_COEFF_15 SAMP_NUM_COEFF_16 SAMP_NUM_COEFF_17 SAMP_NUM_COEFF_18 SAMP_NUM_COEFF_19 SAMP_NUM_COEFF_20 SAMP_DEN_COEFF_1 SAMP_DEN_COEFF_2 SAMP_DEN_COEFF_3 SAMP_DEN_COEFF_4 SAMP_DEN_COEFF_5 SAMP_DEN_COEFF_6 SAMP_DEN_COEFF_7 SAMP_DEN_COEFF_8 SAMP_DEN_COEFF_9 SAMP_DEN_COEFF_10 SAMP_DEN_COEFF_11 SAMP_DEN_COEFF_12 SAMP_DEN_COEFF_13 SAMP_DEN_COEFF_14 SAMP_DEN_COEFF_15 SAMP_DEN_COEFF_16 SAMP_DEN_COEFF_17 SAMP_DEN_COEFF_18 SAMP_DEN_COEFF_19 SAMP_DEN_COEFF_20 LINE_NUM_COEFF_1 LINE_NUM_COEFF_2 LINE_NUM_COEFF_3 LINE_NUM_COEFF_4 LINE_NUM_COEFF_5 LINE_NUM_COEFF_6 LINE_NUM_COEFF_7 LINE_NUM_COEFF_8 LINE_NUM_COEFF_9 LINE_NUM_COEFF_10 LINE_NUM_COEFF_11 LINE_NUM_COEFF_12 LINE_NUM_COEFF_13 LINE_NUM_COEFF_14 LINE_NUM_COEFF_15 LINE_NUM_COEFF_16 LINE_NUM_COEFF_17 LINE_NUM_COEFF_18 LINE_NUM_COEFF_19 LINE_NUM_COEFF_20 LINE_DEN_COEFF_1 LINE_DEN_COEFF_2 LINE_DEN_COEFF_3 LINE_DEN_COEFF_4 LINE_DEN_COEFF_5 LINE_DEN_COEFF_6 LINE_DEN_COEFF_7 LINE_DEN_COEFF_8 LINE_DEN_COEFF_9 LINE_DEN_COEFF_10 LINE_DEN_COEFF_11 LINE_DEN_COEFF_12 LINE_DEN_COEFF_13 LINE_DEN_COEFF_14 LINE_DEN_COEFF_15 LINE_DEN_COEFF_16 LINE_DEN_COEFF_17 LINE_DEN_COEFF_18 LINE_DEN_COEFF_19 LINE_DEN_COEFF_20 ERR_BIAS_X ERR_BIAS_Y FIRST_LON FIRST_LAT LAST_LON LAST_LAT LONG_SCALE LONG_OFF LAT_SCALE LAT_OFF HEIGHT_SCALE HEIGHT_OFF SAMP_SCALE 5 LINE_SCALE 10 gdalautotest-3.1.2/gdrivers/data/dimap2/DIM_foo.XML0000664000175000017500000003501513701057751020455 0ustar eveneven DIMAP PHR_SENSOR PRODUCT en 1 Strip Source Lineage Information DIMAP RPC Model Geoposition Model DIMAP PRODUCER_NAME PRODUCER_CONTACT PRODUCER_ADDRESS PRODUCTION_DATE JOB_ID PRODUCT_CODE DELIVERY_TYPE CUSTOMER_REFERENCE INTERNAL_REFERENCE COMMERCIAL_REFERENCE COMMERCIAL_ITEM EPSG GEOGRAPHIC2D WGS84 urn:ogc:def:crs:EPSG::4326 ITU UTC SENSOR CENTER POINT 1 RPC Model Geoposition Model DIMAP SOFTWARE PROCESSING_CENTER SENSOR PMS SENSOR CORRECTED ACCURATE true R3D_ORTHO true REFERENCE3D BASIC false true false false true false 0.5 0.5 SPLINE true false BAND_COMPOSITE image/tiff true 30 20 4 2 0 0 INTEGER 12 UNSIGNED LOSSLESS B2 B1 B0 B3 NODATA 0 SATURATED 4095 12 12 B0 CALIBRATION_DATE Spectral range value of raw radiometric Band micrometers Specification accuracy value MIN MAX B1 CALIBRATION_DATE Spectral range value of raw radiometric Band micrometers Specification accuracy value MIN MAX B2 CALIBRATION_DATE Spectral range value of raw radiometric Band micrometers Specification accuracy value MIN MAX B3 CALIBRATION_DATE Spectral range value of raw radiometric Band micrometers Specification accuracy value MIN MAX B0 CALIBRATION_DATE Raw radiometric count (DN) to TOA Radiance (L). Formulae L=DN/GAIN+BIAS watt/m2/steradians/micrometers Specification accuracy value GAIN BIAS B1 CALIBRATION_DATE Raw radiometric count (DN) to TOA Radiance (L). Formulae L=DN/GAIN+BIAS watt/m2/steradians/micrometers Specification accuracy value GAIN BIAS B2 CALIBRATION_DATE Raw radiometric count (DN) to TOA Radiance (L). Formulae L=DN/GAIN+BIAS watt/m2/steradians/micrometers Specification accuracy value GAIN BIAS B3 CALIBRATION_DATE Raw radiometric count (DN) to TOA Radiance (L). Formulae L=DN/GAIN+BIAS watt/m2/steradians/micrometers Specification accuracy value GAIN BIAS B0 CALIBRATION_DATE Solar irradiance value of raw radiometric Band watt/m2/micron Specification VALUE B1 CALIBRATION_DATE Solar irradiance value of raw radiometric Band watt/m2/micron Specification VALUE B2 CALIBRATION_DATE Solar irradiance value of raw radiometric Band watt/m2/micron Specification VALUE B3 CALIBRATION_DATE Solar irradiance value of raw radiometric Band watt/m2/micron Specification VALUE PHR Cloud_Cotation (CLD) AUTOMATIC Cloud_Cotation Mask GML MASK ENCAPSULATED SOURCE_ID Strip_Source PHR1A Data Strip PHR 1A PHR 1A 2016-06-17 12:34:56 PX Strip Source Lineage Information DIMAP gdalautotest-3.1.2/gdrivers/data/dimap2/VOL_PHR.XML0000664000175000017500000000145513701057751020353 0ustar eveneven DIMAP VOLUME SINGLE_VOLUME en PHR Volume Description DATASET_ID DIMAP gdalautotest-3.1.2/gdrivers/data/dimap2/IMG_foo_R1C1.TIF0000664000175000017500000000370213701057751021166 0ustar evenevenII*@RS   &fN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kkkk{{{{sssskkkkkkkkkkkk{{{{sssssssskkkk{{{{sssssssskkkk{{{{{{{{cccc{{{{ccccssss{{{{sssskkkkssss{{{{kkkksssssssskkkksssskkkk{{{{{{{{ssss{{{{ssss{{{{ssss{{{{kkkksssskkkkssssssssssssssssssss{{{{{{{{{{{{kkkkkkkk{{{{ssss{{{{kkkksssscccc{{{{sssskkkkŭcccc{{{{sssscccc{{{{{{{{ssss{{{{ssss{{{{{{{{kkkksssssssskkkksssscccc{{{{cccccccckkkk{{{{ssssssss{{{{ssss{{{{{{{{ccccsssscccc{{{{sssssssskkkkccccccccssss{{{{kkkkkkkksssskkkkssss{{{{{{{{kkkk{{{{{{{{cccc{{{{kkkkccccssss{{{{{{{{kkkk{{{{{{{{{{{{kkkk{{{{{{{{{{{{kkkk{{{{{{{{ssssssssZZZZkkkkkkkkkkkkkkkkkkkkcccc{{{{sssscccc{{{{{{{{kkkk{{{{cccckkkkkkkksssssssskkkkcccckkkkkkkk{{{{ccccccccssssccccccccssss{{{{cccc{{{{kkkkZZZZkkkksssskkkkZZZZcccc{{{{ssssssssssss{{{{{{{{sssscccc{{{{kkkkkkkkkkkkssssccccsssscccccccckkkkssssssssZZZZ{{{{ssssssssZZZZccccssssZZZZcccccccckkkkcccccccckkkk{{{{ccccssss{{{{JJJJsssscccc{{{{cccc΄kkkk{{{{{{{{kkkk{{{{kkkk{{{{sssskkkkkkkkkkkkkkkkkkkksssscccckkkkgdalautotest-3.1.2/gdrivers/data/dimap2/STRIP_foo_DIM.XML0000664000175000017500000000213613701057751021434 0ustar eveneven DIMAP PHR_SENSOR STRIP en IERS TAI NADIR_LAT NADIR_LON ACQUISITION_ORBIT_NUMBER DESCENDING true gdalautotest-3.1.2/gdrivers/data/dimap2/IMG_foo_R2C1.TIF0000664000175000017500000000224213701057751021165 0ustar evenevenII*   RS   &fN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|kkkk{{{{sssskkkkkkkkkkkk{{{{sssssssskkkk{{{{sssssssskkkk{{{{{{{{cccc{{{{ccccssss{{{{sssskkkkssss{{{{kkkksssssssskkkksssskkkk{{{{{{{{ssss{{{{ssss{{{{ssss{{{{kkkksssskkkkssssssssssssssssssss{{{{{{{{{{{{kkkkkkkk{{{{ssss{{{{kkkksssscccc{{{{sssskkkkŭcccc{{{{sssscccc{{{{{{{{ssss{{{{ssss{{{{{{{{kkkksssssssskkkksssscccc{{{{cccccccckkkk{{{{ssssssss{{{{ssss{{{{{{{{ccccsssscccc{{{{sssssssskkkkccccccccssss{{{{kkkkkkkksssskkkkssss{{{{{{{{kkkk{{{{gdalautotest-3.1.2/gdrivers/data/spill.rde0000664000175000017500000001010613701057753017256 0ustar evenevenERDAS_IMG_EXTERNAL_RASTER@@ks{ssŔc{{{scc{{{{s{ccgdalautotest-3.1.2/gdrivers/data/usgsdem_with_spaces_after_byte_864.dem0000664000175000017500000000400013701057753024767 0ustar evenevenFILE WITH SPACES BETWEEN BYTE 864 AND 1024 1 1 1 10 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 0.000000000000000D+00 2 2 4 0.165850101709817D+06 0.000587469481022D+07 0.165738167974383D+06 0.001974384302172D+07 0.176694719320732D+06 0.001983977339906D+07 0.176825312372784D+06 0.000597052120290D+07 -0.100000000000000D+01 0.328000000000000D+03 0.000000000000000D+00 10.300000E+020.300000E+020.100000E+01 1 1 1 1 8 1 0.165740000000000D+06 0.001953000000000D+07 0. -0.100000000000000D+01 0.200000000000000D+01 0 1 2 0 -1 0 0 1 gdalautotest-3.1.2/gdrivers/data/rgbsmall_truncated.kap0000664000175000017500000001150213701057753022011 0ustar eveneven!Copyright unknown VER/2.0 BSB/NA=UNKNOWN,NU=999502,RA=50,50,DU=254 KNP/SC=25000,GD=WGS84,PR=Mercator PP=31.500000,PI=0.033333,SP=,SK=0.000000,TA=90.000000 UN=Metres,SD=HHWLT,DX=2.500000,DY=2.500000 RGB/1,112,120,56 RGB/2,56,72,32 RGB/3,44,64,8 RGB/4,0,16,0 RGB/5,104,168,40 RGB/6,88,112,16 RGB/7,124,176,48 RGB/8,104,136,56 RGB/9,80,136,16 RGB/10,40,80,0 RGB/11,132,152,72 RGB/12,80,84,32 RGB/13,80,100,40 RGB/14,88,136,56 RGB/15,72,120,8 RGB/16,116,128,76 RGB/17,128,168,56 RGB/18,120,144,56 RGB/19,72,96,32 RGB/20,136,160,64 RGB/21,88,104,48 RGB/22,16,24,0 RGB/23,120,144,40 RGB/24,192,208,144 RGB/25,104,120,32 RGB/26,80,120,16 RGB/27,80,120,32 RGB/28,104,136,24 RGB/29,72,128,16 RGB/30,24,60,44 RGB/31,104,152,48 RGB/32,8,32,40 RGB/33,0,0,0 RGB/34,104,120,48 RGB/35,88,112,40 RGB/36,116,152,64 RGB/37,44,72,52 RGB/38,88,88,40 RGB/39,148,156,72 RGB/40,60,104,52 RGB/41,104,160,32 RGB/42,64,112,0 RGB/43,96,128,48 RGB/44,56,104,0 RGB/45,32,40,4 RGB/46,56,88,0 RGB/47,152,176,84 RGB/48,128,140,76 RGB/49,128,144,48 RGB/50,56,88,16 RGB/51,80,96,24 RGB/52,80,112,24 RGB/53,152,160,112 RGB/54,32,68,0 RGB/55,112,136,40 RGB/56,120,160,40 RGB/57,148,164,64 RGB/58,72,96,8 RGB/59,64,96,16 RGB/60,128,160,80 RGB/61,64,104,24 RGB/62,16,48,48 RGB/63,88,128,40 RGB/64,96,136,40 RGB/65,16,16,8 RGB/66,68,76,32 RGB/67,100,144,68 RGB/68,124,136,64 RGB/69,112,152,56 RGB/70,56,96,8 RGB/71,88,136,32 RGB/72,168,200,116 RGB/73,24,60,24 RGB/74,56,100,16 RGB/75,48,72,0 RGB/76,108,172,32 RGB/77,112,176,44 RGB/78,80,92,48 RGB/79,104,144,40 RGB/80,60,76,16 RGB/81,64,80,48 RGB/82,112,136,64 RGB/83,96,124,56 RGB/84,120,164,64 RGB/85,72,112,16 RGB/86,8,8,0 RGB/87,44,48,12 RGB/88,112,160,48 RGB/89,88,152,24 RGB/90,96,152,32 RGB/91,124,188,44 RGB/92,48,96,0 RGB/93,120,152,76 RGB/94,56,80,8 RGB/95,184,204,132 RGB/96,96,112,32 RGB/97,68,84,24 RGB/98,120,152,48 RGB/99,28,64,32 RGB/100,120,160,56 RGB/101,112,152,40 RGB/102,100,124,68 RGB/103,96,160,40 RGB/104,96,144,24 RGB/105,96,120,24 RGB/106,104,128,40 RGB/107,84,104,12 RGB/108,80,128,24 RGB/109,96,108,64 RGB/110,68,80,8 RGB/111,144,196,84 RGB/112,128,160,48 RGB/113,128,176,64 RGB/114,128,132,56 RGB/115,116,140,72 RGB/116,64,104,8 RGB/117,112,144,48 RGB/118,16,40,40 RGB/119,96,128,32 RGB/120,84,124,56 RGB/121,28,48,48 RGB/122,96,120,40 RGB/123,112,164,56 RGB/124,132,176,80 RGB/125,148,156,84 RGB/126,96,160,28 RGB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E ,)Z. $?!!!!!!!!!!Dn#:7?.k"?=?U?G4=ZG*UG?@#?$H!!!!!!!!!!!7kj/@?l?lli4?*lZGGl4?F=Z!!!!!!!!!!V5/'r7@@44G GlGGGGZ,4J;+ !!!!!!!!!!//91j7@4??{{)ZYZ)Zl?.;#!!!!!!!!!!!D18eiG@?<#+$; {)q8?\"!!!!!!!!!Pee))eGG4_5&!!!!!!!!Vr1??==q{ZZGZ*l8'!!!!!!!W"`e7e4U=;# #/]?EEZZZl?wddTCQ>>(!!!!!!!- 7e@wi=4$#K#Ul**Gww#fc>>)!!!!!!!'p8@E??.^?<TG,Z)8$Scc>>y*!!!!!! /el?U?@. t?EogltZ)[euQ>>>>+!!!!!N4u?@? +"q];|@GZZlU=Hg))Z(>>>,!!!!!!z44?=U:;"]. @="#2 ?Z*{. ZGM2I>>>>>-!!!!! \@ GZZ,,GlU,.\Z *Zh)*j =4li8{x>>>>.!!!!!Vql@ UeqqGM)ddu87C(c>>>>>/!!!!!!$ZZZ|ZqZhZ)LL88e(cyy>>>>0!!!!!!!Gl?|o{l|ML[[[epe$%>>>yy%y1!!!!!!!=$$TH@=TDt4ZMoqqeI>>>>> >gdalautotest-3.1.2/gdrivers/data/DeepBlue-SeaWiFS-1.0_L3_20100101_v004-20130604T131317Z.h50000664000175000017500000111574413701057753025042 0ustar evenevenHDF  `TREEUHEAPX8viewing_zenith_anglesolar_zenith_angle TREE2pX ~$tHF0slAj-Ssdk vquv xD\|$Ի$$P$Hh $l9$ $$#$$i$ 2$DBD HPP H$] HHLiA Hlu H% H H H٥P H q HD1 l? l$ lHll l$ l  l/ l; l ]' lD2"="$="H=l="A"B"#B"EB" gB"DBDx^V[ =C9i8MyT4DIHv3'g!¥L]S.TInH{Kf{y~~ߵ׻b&2aHSBxY$ʿEa2?*aHpča0ĭDTa(](Q~Wa";| GLS(Z!H^AaRWypvEB*&.ao ǛAYA^W/qv"_-s ߦٸ2NA,3Fn`GB%Gn!@;8 3¬=❾Y;1v6@jgd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wdָѣ]1n 4h!9ޅbG7G[.p@#^yXCcBT^1fǝ2˄WUէrǫڠ3)qA._ 2PέsSp܋wK>͝봟'$ dݔ{BBD;*?TkzC!{ Vg9;$̽ôh".BuCdy񚟼#"W$>}Kfր3,UҘFmN{z :h=I2 2)q}VX_aJ!O(yJlnԽ;mgGٰX^BSJSQ cgX,bX,_Fx^1 DŽa m43gx^1 DŽa m43gx^1 DŽa m43gx^1 DŽa m43gx^1 DŽa m43gx^1 DŽa m43gGCOL8 (hh  y deflatecV$$Q (unitsdegrees @ long_namesolar zenith angle @standard_namesolar_zenith_angle P valid_range  B P _FillValue  yy `DIMENSION_LIST,,gdalautotest-3.1.2/gdrivers/data/SMALL_ADRG_ZNA18/0000775000175000017500000000000013701057753017767 5ustar evenevengdalautotest-3.1.2/gdrivers/data/SMALL_ADRG_ZNA18/README.TXT0000664000175000017500000000027113701057753021325 0ustar evenevenAdapted from data/SMALL_ADRG_ZNA9. See data/SMALL_ADRG_ZNA9/README.TXT The differences between SMALL_ADRG_ZNA9 and SMALL_ADRG_ZNA18 are the change of ZNA and the change of sign of PSO. gdalautotest-3.1.2/gdrivers/data/SMALL_ADRG_ZNA18/ABCDEF01.GEN0000664000175000017500000000324613701057753021374 0ustar eveneven009083LE1 0900115 ! 340300003400000010450034DRF0740079DSI0470153OVI0850200GEN2400285SPR1730525BDF0530698TIM04207510000;& GENERAL_INFORMATION_FILE1000;& RECORD_ID_FIELDRTY!RID(A(3),A(2))1100;& DATA_SET_DESCRIPTION_FIELDNSH!NSV!NOZ!NOS(I(2),I(2),I(2),I(2))1000;& DATA_SET-ID_FIELDPRT!NAM(A(4),A(8))1600;& OVERVIEW_INFORMATION_FIELDSTR!ARV!BRV!LSO!PSO(I(1),I(8),I(8),A(11),A(10))1600;& GENERAL_INFORMATION_FIELDSTR!LOD!LAD!UNIloa!SWO!SWA!NWO!NWA!NEO!NEA!SEO!SEA!SCA!ZNA!PSP!IMR!ARV!BRV!LSO!PSO!TXT(I(1),R(6),R(6),I(3),A(11),A(10),A(11),A(10),A(11),A(10),A(11),A(10),I(9),I(2),R(5),A(1),I(8),I(8),A(11),A(10),A(64))1600;& DATA_SET_PARAMETERS_FIELDNUL!NUS!NLL!NLS!NFL!NFC!PNC!PNL!COD!ROD!POR!PCB!PVB!BAD!TIF(I(6),I(6),I(6),I(6),I(3),I(3),I(6),I(6),I(1),I(1),I(1),I(1),I(1),A(12),A(1))2600;& BAND_ID_FIELD*BID!WS1!WS2(A(5),I(5),I(5))2100;& TILE_INDEX_MAP_FIELD*TSI(I(5))00066 D 00051 55030010000600000DRF0000900006DSS010101010100274 D 00103 55030010000600000DSI0001300006OVI0003900019SPR0006100058BDF0004600119TIM0000600165OVV01ADRGABCDEF0130004606700046067-0000000.50+480000.5000000000012700012700000000100100012800012801008ABCDEF01.IMGYRed 0000000000Green0000000000Blue 00000000000000100454 D 00103 55030010000600000DSI0001300006GEN0021900019SPR0006100238BDF0004600299TIM0000600345GIN01ADRGABCDEF013000000000000016 0010000001800100N0040038400400384-0594436.83-86480.810 00000000012700012700000000100100012800012801008ABCDEF01.IMGYRed 0000000000Green0000000000Blue 000000000000001gdalautotest-3.1.2/gdrivers/data/SMALL_ADRG_ZNA18/ABCDEF01.IMG0000664000175000017500000014400113701057753021372 0ustar eveneven001852L 0600065 340300002000000010420020PAD0280062SCN0300090 GEO_DATA_FILE1000;&RECORD_ID_FIELDRTY!RID(A(3),A(2))1000;&PADDING_FIELDPAD(A)2000;&PIXEL_FIELD*PIX(A(1))51015 D 00088 9903001000000006000000000PAD000001769000000006SCN000049152000001775IMG01 ~}|~}|{~}||z~}||{y~}}{zyy~~||{zyx}||{zyxw~~}|{zyxwv~}}|{zyxwvu~~}{{zyxwwuu~~||{zyxwwvut~}}|{{yxxwvuts~}|{zyxxwuttsr~}||{yywvuutsrq~}|{zzyxwvutsrqq~}||{zxxwvutssqqo~}|{{yyxwvuttrqppo~}}{zyyxwvutsrrpoon}}|{zyxwwuttrrpponm~}||{zyxwwuttrqqponml}|{{yyxwvvttrrqppomll}}|{zyxxvvutsrqponmmkk~~}|{zyxxwvttsrqpoomlkjj~}|{{yxwwvutsrqqpnnmkkji~}||zzyxvuutsrqqoonmlkjih}}|{{yxxwvutsrqponnllkjihg~}}{zyxwwuuttrqqponmlkjiigg~}|{zzywwvuusrrqoonmlkjiigge~~}{zzxxwvutssqqpnmmllkihgffe}||{zxxwvuttsrqoonmlkjjhhgfed~}}|{zyxwvuutrrqponmlkkjihgfeec~}||zzyxwvutssrqponmlkjjihgfeddb}|{{zyxwwvttsrqponmlljiihggeeccb~~}{{zyxwvvtsrrqpponlljjihgfedcca`~~}|{zzywvvutsrqpoonllkiihgfedccb``~}|{zyxxwuussrqpoonlljjihgfeeccba`_ؾ躔ďɗzxwutssmlƊfddcb_^Ʒˮ񙅄xwwtsrnlddbba^]쭬뒑髏퉃xvvsrnllҀjsdcbaa]]ڴ퐊}}{zzxxwvurnmlkshgfeccbba`]\ﳲڪ}|{zzyxwvutnmlkjrfddcbaa`_\[ڐ|{{yyxwvvttnmlkjj˝ea`__^[Zᬫɨ皎~|{yyxwwuutsmmkjiiho`_^]ZY짦zyxxwvuutsqkjjhhgfef}^^]]ZX}zyxwvvttsqqoiihgfeddbav^]\[YWׯڤ茌닅}|xxwvttsrqpmmhgffedcb`k^][[ZYWW祈}|~xyqqolkkfeޤ{fe]\ZYYXWV׻穩ơ}{{{poolkjid\ZYYVUŻѳƪ졠ڇ}|{{yx{ŏonmkjiigʁ\[ZYXVT~}|{zzywvvuttrqppnnmlkjihggeddcbba`^]\\[ZYXXVUTS~}|{zzywwvutsrrqonmmlkjiigffdccba`__]]\[ZYXXVUUTS~}||{yyxvuutsrrqoommlkjiihffedcba``_^\\[ZYXWWUTTSR~~|{{zyxwvutsrqpponmlkjiiggfedccb``_^]\[ZYXWWVTTSRQ~}}{zzywwvutsrrqponmlkjjhhgfedcbb``_^]\[ZZXXVVUTSRQP~}|{zyyxwwuussrqpnnmlkkjihgeedcbb``^^]\[ZYXXVVUTSRRPO~}||{zxxwvutsrrqponmllkiiggfeecbb`__^]\[ZYYWVVUTSSRPOO~~}|{zyxwwuusrrqponmlljjiggfedccaa_^^]\[ZZYXWUUTTRQQPOM}}|zzyyxvuussqqppnnmlkjihgfeecbba`_^]\[ZZYXWVUUSRQPPONM}}|{zyxwvuutsrqponmmkkjihgffedcb```^]\\[YXXWVUTSRQPPONML~~||{zyywwuttsrqpoonmkjiihgfeeccba``_]\\[ZXXWVUTSSRQPONMML~}|{zyxxvvutsrqqpnmmlkjihgfeddcba`_^]][[YYXWVUUSRQQPONMLLK~~}|{zyxwvuutsrrqponmkkjihhffedcba`_^]\\ZZYXWVVTTRRQPONNLKJI~}||zyxxwvutsrqppnnmkkkiihgeeccbb``^^\\[YYXXVVTSRRQPONMMKJJI~}|{{yxxwvutssqqonnmlljiiggeddcbba`^]]\[ZYXWVUTSSRQPPNNMKJJIH~}||zzxxwvutssqpponmlljihggfedcbb`_^^]\[[ZXXWUTSSRQPOOMLKJJIHG~||{zyxwvuttsqqponmlkjihhffedccb`__]]\[ZYYXVUUTSRQPOONMLKIIHGF~~}{zzyxwvuusrrpponmlkjjihffeddbba`_^]\[ZYXXWUUTSRQPONNLLKJIHGGF~~||{yyxwvuutsrqponnmkjjiggfeecbba`^^]\\ZZYWWVUTSSQQOONMLKJIHGFFE~}}{{yyxxvvutsrqpoomllkjhhgfeedcba__^]\[ZYYXVUUTSRQQOONMLKJIHGFFED~}}{{zyywvuutsrqppnmmlkiihgffecbba`_^]\\ZYYWWVUTSSQPPOMMLKKIIHFFECC~}}{{zyxwvvussrqponmllkjihgfeddcb``_^]\[ZZYXWVUTSSQPPONMLKJJIHGFEDCB~~||{zzyxvvttsrqppomlljjihgfeedcba`_^^\\ZZYXWVUTSSRQPONNLKJJHHGFEDCBA~}|{zyxxvvussrqpoonmkkjihhgeddcba`_^]][[ZXXWVUTTRQQPONMMKKJIGGFEECBA@~}|{zzxwvvttsrqponmlljjjigffedcba`_^]]\[ZYXWVUUTRRQPONNLKJJHHGFEDCBAA@~}|{{yywwuttsrqqponmlkjiihffddcba`_^^]\[ZXXWWUTTSQQPONMLKJJIHGGEDCBA@@?~}}|zzyxwvuttrqqpnnmlkjjhggfedcbb`__^]\ZZYXWWVUTSRQPONMLKKJIHGGEECCBA@?>~}|{{zyxwvuttsqpoommlkjiiggfedcca`__]]\[ZYXWWUTTSRQPONNLKJIIHHFEDDCBA@?>>~~||{yyxwvuussqqponmmkjjhggfedcbb`__^]\[ZYYWWVUTSRRPOOMLKKJIHGFFDCBBA@?>><~~|{zzxxwvutssqqponmlkkihhgfeddcaa`^]]\[[ZXWVVUTSRQPOONMLKJIHHFEDDCBA@?>=<<~~||{zyxwwuutrrqponnlkjjhhgfedcba``^^]\[[ZYWWVUTSRQQOONMLKJIIGFEECBBA@??=<<:~}}{{zyxxvuussqqponmlkjjhhgfedccba`_^]\\ZZXXWUUTTRQPPONLLKJIHHGFEDCBA@@>>=<;:}||{zzxwwutssrqponmlljiihgfedccb``_^]][ZYYXVVUUSRRQPONMLKJIIHGFEDCBA@?>=<<;:9~}}|{zyywvvutsrqponnmljjhhhffedbba`__]\[[YYXWVUTSSQPPONMLKKJIGGFEDCBA@??>=<;:98~||{zyxwwuutsrqppnmlkkiihgffdccba`_^^\[ZYYXWVUTTSQQONNMLKJJHHGFEDCBBA@>=<<;:997~}}|{zyxwvvutsrqpponmkkjihhgfedcba`_^]][ZYYXWVUTSRQPOONMLKKIIHGFEDCBA@@?>=<<:9977~}||zyxxwvutsrqqonnmlkjihgfeddcbaa_^]]\[ZYXXVUTSSQPPOOMLKJJHHGFEECBAA??>=<;::9866~}|{zyxxvvutsrqpponmlkjiihgeeccbb`_^]\\[ZYXWVVTTRRQPOOMMLJIIHGFEDCCBA??>==<;:88765~}|{zzxwwvutsrqqponmlkkiiggeedcba`__^][[ZYXWVVUSSRQPONMMLJJIHGFFDCCBA??>=<;:9877654~}}|zzxwvvuttrrppnnmmkjihhgfddcbaa`^^\[[ZYXXVVTTSRQPONMMLKJIHGFEDDCB@@?>==<::9876543~}|{{yyxwvutssqpoonmlkkjiggfedcbb``_^][[ZZYWWUTTSRQPONMMKKJIIGGFDDCB@??>>=<::88765433~}}{{zyxwvutssqqponmlljihhgfedccb`_^^]\[ZYYWVVUTSRQQONMMLKJIHGFEDDCB@@??=<;::977654432~}|{{yyxwwvttrrqpoomlljjhhffeecba``_^]\[[YYXWVTTSRRPOOMLLKJIHGGEDDCBA@??>=;;99876644321}||{zyxwvutssqqpoonlljjihgfedcbb``_^]\[ZZYXWVUTSSQQOONLLKJIHHFEDDCBB@@?>=<:998776443210~}}{{zyxwvvusrrqpoomlkkjhhgfeeccba`_^]\\ZZXXWVUTTRRQPONMLKJIHHFFEDCBA@??><<::98866543210/~}}|{zyxwvutssrqpoonmlkjihgfeddcaa`_^]][ZYYXWVUTSRRQPONMLLJIHHFFEDCBA@@?>=<;:98765543210//~}|{zyywwvttsrqppnnmlkjihgfeddcaa`__]\[ZZYWWWUTSRQPPONMLKJIIHGFEDCBAA?>><<;:98865543210//.~}|{zzxxwvttsrrqpnmmlkjiigffecbba`_^]]\[ZYXWVVTTRRQPONMMKJIHGGFEDCBBA?>>=<<:99876533210/.--~~}|{zyywvvutsrqppomllkjjhgfeedcba`_^^\\[ZYXWWUUSSRQPONMMKJJHHGFEDCCBA??>=<;;99876543210/.--,}}||zyywwvutsrqpponmlkjihgffeccba`__]\\[ZYXWVVUTSRPPPOMMKKJIHGFEDCBBA@?>=<;;:8765544220/..-,+~}||{yywwvutsrrqponmlkjihgfeeccba``^]\\ZZYXWVVTTRQQPONNMLKJIHGFEEDBAA@?>=<;;98875554311/..-,,*~}||{yxxwvutsrrqponmlkjihhgfedcba`_^^]\[ZYYXWUUTSRQPONMLLKJIHGGEEDCBA@?>=<<::98765533110/.-,+**~}|{{yyxvvutsrqppnmmlkjjhgfeedcbb`_^^]\[ZZXXWUTSSRQQPNNMKKJIHHGEEDCBA@?>=<<:998665433110/.-,,*)(~}}{{zxxwvuutrrpponmmkkiihgeedccba`_]]\[ZYXWWVTTSRQPOONLKKJIHGFFECCBA@?>><<;:98765543210/.-,,+)((}||{zyxwvutssrqponmmkkjihgfeeccaa_^^]\\ZZYXWVUTSRQPOOMLLKJIHHFEDCCBA@?>><<;:98765542110/.-,,+*)('~}|{yyxwvuutsrqponnlkjiihgffddbba`_^]\[ZYXWWVUTSRRPOONLLKJIIHFEEDCBAA?>==<;999776543210//--,+*(('&~}|{zyxxvuttrrqpoomllkjhhgfedccaa__^]\[[ZYWWVUTSRQQOOMMLKJIHHFFECCBAA??><<;:987654432100.--,+*(('&%~||{zyxwvuutsrqpoonmlkjhhgfedcbba`_^]\[ZZXXWVUTTSQQPNNMLKJIHGGFEDCBAA?>=<<;:98765542220//.,,**)('&&%~~}|{zyyxwvttsrqppnmmlkiiigfeedcba`__^\[[ZYXWVUTSRRPONNMLKJIHHGFDDCBA@?>>=<;:998665432110/-,,+*)((&&%$~~}{{zyxwwuttrrqpponmlkjihgfeedcba`__]\[[ZYXWVUTSSRPOONMLLJJHHGFEDCBBA??><;<:98776543210//--,**)(''&$$#~}|{zyxwwvttsrqpoommlkjihhfeddcba``_]\\[ZXXWVVTTRQQPONMLKKJIHGFEDCBAA??>=<<:99876443221/.-,,**)('&%$$#"~}|{zyywvvutsrrqoommlkjihhffedcba`_^]\\ZZXXWVVUTSRQPONMLKKJIHGFEDCCBA@>>=<<:99876543311/..-,+*))''%$$#"!~}}{zyxxwvutsrrqpnnmlkjiiggfddbba`_^]]\[ZYXWVVTTSRQPPNMMLKJIHGFEDCBA@@?>=<;;:88765433200/.-,+**((&%%$#"!!~~}{zzxwwvuussqpponmlkjjhgffddcba`_^]][[ZYXXVUTTSRQPONNMKJJIHGFFDDBAA@?>=<<;:98765533210..-,+**(('&%###"!~}}{{zyxwvvutrqqoonmlkjihhgeedcba`_^^]\[ZYXWWVUSSRQPPONMLKJIHGGEECCAA@?>><;::9776544221//.-,+*))(&&$$#"!!~}}|{zyxwvuttsqpponmmkkiigffedcbba__^]\\ZYXWWUUSSSQPOONMLKJIHGFEDDCBAA@>><<;:88765533200/.--++*((&&%$$#! ~}{{zywwvvussrqponnmkkjihgfeedcaa__^]\[ZYYWVVTTTRQPOOMMLKJIHHFEDDCBAA??=<<;:98765532210/.-,+**((&&%%#""! ~~}{{zyxxwvusrrqponnmlkiihffeddcb``^^]\[ZZXXWVUTSSQPOONMLKKIHGFEEDCBA@??==<;:99866543210/.-,,+))('&%$##!!~}}|{zyxwwvttrrqponmlljjihgfedcbaa`_^]\[[YXXWVUTTRRQONNMLKJIHGFFDDCBBA?>><<;:99765543200/.--,**)('&%$##"! ~}||{zyxwwvutrrqponmlkjjihgffddbaa`_^]\[[ZYXWVUTTRRQOOMMLLKIIHFFEDDBA@@?==<;:997654422100/-,++*)(('%$##"! ~}|{zyxxvvutsrqpoonllkjihggfecbba`_^]][ZZYXWVVUSSRQPONMLLKIIGGFEDDCBA??>=<;::87665432100.--++*)('&%$$"" ~~}|{{yxxwuutsrqqoonmljjihggfddcba`_^^\[ZYYXWVVUTSQQPONMLKKIHHGFEEDCAA@>>=<;::8776432210/.--,+))('&%%$#"! }}||zzxwvuutsrqpoonlkkjihgffecbba`__]][[ZYXWWVTTRRQPOOMLLJJIGGFFDCBBA@?>=<;::88765432100..-++*)('&%$$#"! ~}|{zzxwwvutssqqpnnmlkjihggfeccba`_^^]\[ZYXWVUUTRRPOONMLKJJIHGFFDCBBA@?>=<;:988765433110/.-,+*)('&%%$#"" ~}|{zyyxwuutsrrpponmlkjjhhffedcba``_^\[[ZYXWVVTTRQQPONNLLJJIHGFEEDBBA@?>=<;;:88655432210/.-,+*)('&&%$#"! ~}|{zyxwuvttrqqpnmmlkjjhggfedcba`_^^]\[ZYYXVUUTRRQPPNMLKJIIHHFFEDBAA@?>><<::8876543321//.-,+*))''%%$#"!! ~}||{zywwvvtsrqqoonmlkjiihgfedcba``_]]\[ZYXWWVTTSQQPPNMMKKIIHGFEECCAA@?>=<;:988765433200/--,+*)(''&%$#"! ~~||zzyxwvutssqqponnllkjhhgfedcbaa__^]\[[YXXWUTTSRQPOONMLKJIHGFEECCBA@?>><<:998765432210/.--+*)(('&%$##! ~}}|zyyxxvuutsrqponmlkjjigffeddcb`_^]]\[[YYWVVTTSRRPONNMKJJIHHFEECCBA@?>><<;:98765533210/.-,,+*(('&%$##!! ~}|~}}{~}|{z}|{{z~}|{zzy~}}|{zyx~}}|{zyxw~}}|{zyywv}}|{zyxwvv~}{{zyxwvuu~}|{zyxxwvtt~}|{zyxwwvuss~}|{zyywvvutsr~}||zyyxwvutsrr~~}|{{yxxwvutssrq~}|{zzxxwvuussqqp}|{zzxxwvutssqqoo~~||{zyxwvuutrrqpnn~}|{{zyxwvuttrrqponm~}}|{zyxwvvttsqpponml~~}|{zyxwvutssrqponmmk~~}|{zyyxwvtsrrqppnmmlk~}|{zyywwuutsrqponmmlkj~}|{{yxxvuutsrqppnmllkji~}|{zzyxvuutsrqqpnmlkkjjh~}|{{zyxvvutsrrqpnnmlkjihg~~|{zzyxwvutssrqponmlkjihgf~}|{zzxxvvutsrqpoonmlkjihggf~}|{{yxxwvuttrqqoonmlkjiiggfe}||{zyxwvuutsrqoonmmkjihggeed}}|zzyxwvvtsrqqponmlljiiggfedc~~}{{zyxwvvussrqpoommkjiiggfeecc}|{{zyxwwvutsqqpoomlkkiiggffdcba~}|{zyxwvutssrqpoonlljjihgfeeccba~~}|{zyxxvuttsrqqonnlljjihgffedbba`~}|{zyxwvvussrqppnnllkjihgfedccba`_s2 %T4j  aFCP$ 3`zyxutsrb :mmP 'Oeedca__ΰrq]wptyxwtsr` ?mlJedcba^]Ľs+t)):dbKmzwfIxwuss^ Enml We_Ddcbb`^]t !['#PKNs}||zyxwvvur] Jnmlkaggfeccbb`_]\1{'LjkK"\V !P}|{{zxxwvut[Nnmllj 5^fedcbaa`^\[  91 ~w s|{{zyxwvuutRnmlkkj@"?aa`_^^[Zm@Ki {|zzyxwvutss \mlljjihMW__^]ZY &%d }v ~ q{zyxwvuussrM YljihhgfedS; "_^]\ ZX.y'cq!YU~} NyyxwvvttsqqnHVihhgfeedcbS^]][XXl*YGETL{H~}JoxwwuutsrqpmmDRggffddbb`Y]\[ZYXXWǻ,rq  R`}|_y}|xGitpbFqpomkj@Pfe:S^_M][ZZYXWVšph0.ch{oj}|{zlponlkji<Ke@\[ZYVU÷d' K3h"qm .+{@>u}|{zyxuJ /Woomkjihg8HP+ H[[ZYXUU~}|{zyywwvutsrqppnmmlkjjhgffddcba`__]\[[ZYXWVUUS~}||zyywwvuttrqqonnmlkjihhgfeccbba_^^][[ZYXWVUTSS~}|{{zxxwvutsrrqonnmlljjigffedcba`__^\\[ZYXXVVUTSQ~}|{zzyxwvutsrrqponmlkjiigffedcbb`__]]\[ZYXWVVUSSRR~}}{zzyxwvvttsrqponmlkkiihgeeddcaa`_]]\[ZYYXVVUTSRQP}|{{zxxwvutsrqpponmlkjiihgeedcbaa`_^]\[[YXWWUUTSRQPO~}|{zyxwvutsrrqponmlkkiiggfedccba__]]\[ZZYWWVUTSRRPOO~}}|{zyxxvuttsrqponmmlkiihgfeecbba`_^^\[ZYXXWVUTSRQQPOM~||{zyxwvvutsrqponmllkjhhgfedccb``_^]\[ZZYWWVUTSRQQOONM~~||{zzxwvvttrrqppnnmlkiihggeddbba`_^]\[[YXXWVVUSRRPPONML~}|{zyywwuussrqponnllkjihgffeccba`_^]\[[ZYXWVVUTSRPPONMLK~~}|{zyxxvvutsrrponmmlkjihgffedcba`_^^\\[ZYXWVVUSSRPPONMLLJ~}|{zyxxwuutssqpoonmlkjihgfedccba`_^^\\[ZYXWVUUTSRPOONMLKKJ~~}||zyxwwvutsrqppomllkjiigffecbbb`__]][[ZYXWVVTTSRQPONMLLJJH~}||zyxwwvutssqpponmlkjihggfedcca``^]\\[ZYXWWUTTSQQQONNLKKIIH~}}{{yyxwvutsrrqonnmlljjiggfedcbb``_^]\[ZYXXWVUSSRQPONNMLKJIHG~}}{{zxxwvvttsqqpnnmlkkjihgeedcbba__^]\[ZYYWVVUTSRQPPNMLLKJIHGG~}}{zzyxwvuttrqqpoomlkkiihffedccb``_^]\\[ZYWVVUTSRQPPONMLKJIHHFE}}|{zyxwvuutsrpoonmlkkiiggfedcbba__^]\\ZYXXWVUTSRQPONNMLKJIHGFFE~}}|{zyxwvuutsrpponmllkjihgfeecbb`__^]][ZZXXWVUTSRRQPNMMLKJJIHFFED~~}{{zyxwwuutsrqpoonlkkjhhgfeedbba`_^]\[ZZXWWVUTSRQQOONMLKJIHGFFEDC~~}|{zyxwwuttsrqqoonlljjihgfeedcba`_^^\[[ZYXWVVUSSRQONNMLKJJIHFEEDDB}}|{zyxwwvussrqpoommkkjihggfeccba`_^]\\ZZYXWVUTSRRQPONMLKJIIHGFEDCBA}}|{{yxxwuttsrqpoommkkjihgffedca``_^]\\[YYXWVUTSSRPPONNLLJIIHGFEDDCB@~}|{zzxxvuttsrqqoommljjihhgfecbba`_^]\\[YXXWVUUTRRQPOOMLKKJHHFFFDCBB@@~~}|{zyywwvttsrrponmmlkjjhhgeedbba`_^]\\ZZYXWVUTTSRQPONMMKKJIHGFFDCBBA@?~}|{zzyxvuuusrqqoonllkjihggfedcba``^]]\[ZYYWVVTSSRQPOONMKKJIHGGEDCCBA@?>~}|{zyxxwvuussqqponmlkjiihgfedcba``^]]\[ZYYXWUUTSRQPPONMLKJIHGFEEDBBA??>=~}}{zzyxwvuutrrqpnmmlkjjihfeedcbb``^^]\[ZZXWWUUTSRQPOONMLJJIHGFEDDCBA@?>==~}|{{zywwvutsrrqpnnmllkiihgeedccba__]]\[[YXWVUTTSRQPONNMLKJJHGGEECCBA@?>==<~}}{{zyxwvuusrrpponmlkjjhhgfedcbba`_^]\[ZYYXWVUTSRQPPOMMLKJIHGFFEDCBA@?>==;;~||{zyxwwvutsrpponmmljjhggfeddcb`__^]\[ZZYWVUUTSRQQPONMLKJJIGGFECBBA@@>=<;::~~||{zyxwvuussrqponmlkjjihgfedccb``_^]\[ZZXXWVUTTSRQONNMLKJIHGFEEDCBBA@>=<;;:9~}|{zyywvuttsrqponmmlkjhhgffddcba__^^\[ZYXXWVUTSRRPPONMLKJJHHGFEDCBB@??>=<;:98~}|{zyxxwuttsrqponnmlkjihhffedbb``__]\[[ZYWWVUUTSRPPONMLKJIIHGFEDCCA@??==<;:988~}|{{yywvuussrqponnllkjihggfedcba`_^]\\ZZYXWVUTTRRQPONMLLJJHHGFEECBB@@>>=<;:9876~~}|{zyyxvvutsrqpoonmljjihggeddcaa``^]\\[ZXXWVUUSSRQPONMLKKJIHGFEDCBBA@>==<<::9776~}|{zyxxwuutsrrqoonmlkjihhgfeccba`_^^][[ZYXWWUUSSRQPONMLLKJIHGFEEDBAA@?>=<;;:87665~}}|{zyxwvutsrrqoonmlkjihggeedcba`__]][[ZYXXWVUTRRQPPNMMLKJIHGFEDCCAA@?>=<<;:987554~}|{zyxxwvutsrqpponlllkjigfeedcba`__^][[ZYXXWVUSSRQPPOMLLJJIHGFEECCA@@?>=<;:99876553~}}|{zyxwvuussqqponmlkkjhhgfedcba`_^^]\[ZYXWVUUTSRQPPNNMKJJHHGFEEDCBA@?>=<;;:98765442~}||{yyxwvvtsrrpponmlljiiggfedcba``_]]\[ZYXXWVUTSRRPPNNMKKJIHGFFECCBA@??><<;:987654432}}|{zyxwwuusrrqponnlkkjihgfeddbaa__^]\[ZZYWWVUTSRQPPONMLKJIHHFEDDCBB@@>><;;:9877554320~~||{zyxwwvutsrqpoommkkiihgfedcba``^^]\[ZZXWVVUTSRQQPONMLKJJHGGEEDCBA@@>>=<;:98766433210}}|{zyxwvvutsrqponnllkiihgfedcbba`_^]\[ZYYWWVUTSRQQPNMLLLKJIHGEEDCBAA?>==<;:98876443210/~}|{zyxwvuutsrqpoomllkjhhhffedcaa`_^]\\ZZXXWVUUSRQQOOMMLLJJIHGEEDCBA@??>=<;:98765543210/.~~}|{zyxxvuutsrqqponmlkjihgfeedcba`_^]][[ZYWWVUTSSQQPONMLKKIIGGFEDCCB@??>=<;:98766542210/.-~||{zyxwwutssrqponmmlkjihggfdcbba`_^]\[[YYXWWUTSRRQPNNMLLJIHHGFEDDCBA?>==<;;:97764432100.--~}|{zyyxvvutsrqpponmlkjihgffddcaa`_^]][ZZYXWVVTSSRQPONMLKKIIHGFEDCBBA@>==<;::88665432110..-,~}|{{zxwwvutsrqqpnmmlkjiigffedbbaa_^]]\[ZYXWVUUTSRQPOOMMKJJIHGFFECBA@@?>==;;998765432100/--,+~~}||zzxxwvutsrrpponmlkjjhhfeeccca`__]]\[ZYYWVVUTRRQPONMLKJJHHGFEDDCBA@?>=<;::98665433100/.-,+*~}||{yyxwvutssrqpnnmlljiihffedcbaa_^^]\[ZYYXVVUSSRQPONMMLKJIHGFEDCBAA@?>==<:998765432100/.--+*)}}{{zyxwvuttrqqpommlkjjhggfedcba`__]]\[[YYWVUUSSRQPONNLLJJIHGFFDCCBA@?>==<::98765532210/.-,+**(~~|{zzyxwvvutrrqponnlkjjihffedcbaa__^]\\ZYXWVVTSSRQPONNLKKJIHGFEEDBBA@??>=<;998765432100/.-,+**)(~~||{zyxwvvtsrrqponnlkjihhgfedcbba__^]\\ZYYXWUUTSRQPPOMLLKJIIGFFEDCBAA?>=<;;:98865432210/.-,,*))('~}||{zyxwwutssrqponmmlkjihgfeddcba`^^]\[ZYYXVVUTSRRPONMMLKJIHGGFEDCBA@?>>=<;:99766432200/.--++))('&}|{{zyxwvvutrrpponnlkjjihgfedccba__^]][ZYXWWVUTSRQPOONMLKKIHGFEEDCBA@??><<;:99776443210//.-++))('&%~}}|zzyxwvuutsrqponmmkjjihhfeecbaa`__]\\ZYXXWVUTSSQPONNMLKJJIGFFEDDBAA@?>=;;:99776433210/.-,++*))'&&%~~}|{zyyxvuussrqponmllkjihggedccba`_^]\\[ZYWWVVUSRRPPONMLKJIHGGFEDCBA@?>=<<;;:87765432100..,++*))'&%$$~~}|{zzywvuutsrqqonnllkjihhgfddcba``^^\\ZYYXWVVTTSRPPONMLKJJIHFFEDCBBA@?><<;:987765432100..-,**)(('&$##~~}|{zyxwwvttsrqponmmlkjihgfeeccba`_^]\[[YYXWWUUTSQQPONMLKJJHHGFEDCCA@??>=<;;998754432100..-,+*)('&%$#""~}|{zyywwvuttrqppnnmlkjihgffedcba`_^]]\[YYXWVUUTSRQPONMMKJJIHGFEDCBB@@?>=<;:997765442110/.-,+*))''&%$#"!~}||zyywvuuttrqqponmlkjihhgeeccba`_^]\[[ZYXWVVUTRRPPPNNLKKJIHGFEEDBBA@?>=<<::87765442100.--,+**)''%%$#"!!~}|{zzyxwvuttrqpponllkjiigffedcbaa__^]\[ZYXWVUUTSRQPPNNLLJJIHGFFEDCBA@?>==<::97765442110/.--++))('&%$#"! ~}|{{zyxwvutssrqoonmlkkiihffddcbaa`_^][[ZYXWWUUTSRQQONNMLKJIHGGEDCCBA??>><;;:8876653210//.-,+*))''&%%##! }}{zyyxwvvtssrqponmllkihggfedcbb``_^]\[ZYYWWVUTSRQPPNMMKKJIHGFFECCBA@??>=<;:8776554221//.--+**)('%%$$#!! ~}||{zyxwvuttsrqpoomlkkiihgeedcba``_^]\[ZYXXWUUTSRRPPNNMLKJIHGFEDDCBA@?>==<;:9876643321//.--,+*(('&%$#"!!}}|{yyxwvuusrqqpoomlkkjhhgfedcbaa__]]\[[YYXWVUTSSQQONNLLKJJHGGEEDCBAA??=<<;:98865443210/.-,++*)('&%%#""! ~~||{zyxwvuussrqponmlkjjihgfeddcaa`_^]\\ZZXWWVUTSRQQONNMLKJIHHGEDDBBA@?>==<;:98766443100/..,+**)('&%$#"" ~~}|zzzyxwuutsrqponmlkkjihggeddbba__^^\[[ZYXWVUUSSQQOONMLKJIIGGFEDCCA@??>=<;:98776543210//-,,+*)(''&%$#!! ~}|{zzxwvvttsrqppnnmlkjihgfeedbaa`__]][[ZYWWVUTTRQQOONMLLKIHGGFEDCBAA??==<;:99775542210/.-,,+*)((&&$$#"! }}|{zyyxwvutrrqqonnmkkjihgfeecca``_^]\[ZZYXWVUTSSRQPNNMLLKIIHGFEDCBA@@>>=<;:98775533210//--++*)('&%%$#"! ~}|{zzxwvvutsrqqoonmkjjihggeddcba`_^]\[[ZYXWVVTSRRQPONMLKKJIHGFFDCBAA@>>=<;:997665432100.--,+*)(('%$##"! ~~}|{zyxxwuutsrqqonmllkjihgfeedcba``_^\\ZZYXWWVTTRRPPONMLLKJIHGFEDCCAA??>=<<:98775543321//.,,+*)((&&%$#"! ~}|{zyyxwvutssqqponmlkjjigffedcba``_^\\[ZYXWVUUTRQQPONNLLKJIHGFEDCBBA@?>=<;::8776544210//.-,++*)'&%%$#"!!~}|{{zxxvvutsrqpponmmkjihhgfedcbb`__]]\ZZYXXWUTSSRQPOOMMLKJIHGFEDCBAA@?>==;:99876543220//.,,++)(''&%$#"! ~~}|{yyxwvvutsrpponmlkjiihgeedcba``_^]\[ZZXXVVUSSRQPPONLKJJIHGGFDCCBA@?>><;::98765532100/.-,+*)(('&%$#"!!}}|zzywwvutsrrpoonmlljiiggfedcbba`^^]\[ZZXWWVUTSRRPOONMLKJIHGGEDDCBA@?>=<;:99776553211//.-,+**)('&%$$"! ~}}{{yyxwwuttrrqponmllkjhhgfeeccba__^]\[[ZYXVVUTSRRPPONMLKJIHGGFEDCAA@?>><;::98775443200/..,,*)(('&%$##!! ~}}~}}{~}|{z~}||{z~~||{zy}}{{zxx~|{zzyxw}|{{zxywv~}{zzyxwvv~~}|{zyxwvvt~~||{zyxxwuus~}|{{yywvvuts~}|{zyyxwvttsr~}|{zzywvvutsrq~~}|{zyyxwvutsrrq~}|{zyxxwvuttrqpo~~||{zywwvutsrrppo~~}|zzyxwvuussqqpon~~|{{zyxwwvttrrpoonn~~||{zyxwwuttsrqponmm~}||{zyxwvuussqqponmll}||{zyxwwuttrrqponmlkj~}}|{zyxwwuussrqponnmlkj}}|{zyxxwuutsrqpoonlkjji~~||{zyywwvutsrqpoomlkjjih~~}||zzxwvvutsrqpponmlkjihh~~}|{{yyxvuutsrqpoommlkjiigg~}|{{yyxwvvtsrqqpnmllkkiihgf~}}{zyxxwvutssqqponmlkjihggfd~}|{zzyxwvutsrrqponmlkkiihfeed~~}{{zyxwvuusrqqponmllkiihgfedc~}}{{yyxwvuussrqponnlljjihgfedcc~}}|{zyxwwvttsqqponmmlkjihgfedccb~~}|{zyxwvvttsrqponmmlkiihggedccba~||{zyywvvutsrqpoonmkkjihggeeccba`~~}|{zzyxwuutsrrpoommkkiihggfeccaa`_t2 %T4j  aFCQ$ 3`yxwussra :mmP 'Ofdcbb`^Ͱrq^wptyxvtsr` ?nlJedcba^^Ľs+u)*:dcKmzwfIxvvsr^ Enml Wf^Ddcba`]\s !['#PJMs~}{{zyxwvur] Inmlkbhgfedcba``\\1{'LjkK"\W !P~|{{yywwvut\Nnmlkj 5_fedcba`_^\[  91 ~w r|{{zyxwvuttRnmmlki@"?`aa__][Zm@Kj z{zzxxwvvttr \mlkjiihMX`^^]ZY &%e |v ~ qzzyxwvutssqM YkkiihgfedS; "^^]\ ZY.y'bp!YU ~} NzyxwvvussrqnHViihgfeedbbT^]\[XXl*YGESM|H}|JoxxwuttsrqpmmDRhgfeeccbaY^]\[YXXWƼ,rq  Q`}}_y}|xGhsqbFqqolkk@Ofe:S__M\\ZZYXWVšoh0.ch{oi||{zlpoolkji<Ke?[ZZYWUķd' J3h"qm .,{@>v}||zyxuJ /Woonkjiig8IP+ H\[ZYXUU}}|{{yywvvutsrrqoonmlkjihgffedcba`_^^]\[ZYXWVVTT~}|{{yyxwvutsrqpoonllkkihhgfedcba`__^\\[ZYYWVVUTR~}|{{yywvvutsrqpponmlkjihgffddcba`__^\[[ZYXWVUUTSR~}||zyyxwvuusrrpoonmmkjjhggfedcbaa__^]\[ZZXWVVUTSRQ~}||zyyxwvuttrrqoonmlkkihggfeddba`__^]\[ZYXWVUUTRRQP~~}{{zyxwvuutrqqponmlljiihgfedcbb`_^]]\[ZYXWVVUTSRQQP~~}|{zyxwvutssqqponmlkjjiggfedccba__^]\[ZYYXWVUTSSQQPN~}|{zyxwvuussrqponnmlkiihggfddbaa`_^]\[ZYYXVVUTSRRQPON~}}|zzyxxvvutsrqpoomlkkjiggfeedbaa__^]\[ZZXXVVUUTRRQPONM~~||{zyxwwuutrrqppnmlkjiihgfedcbba`_^]\[[ZYXVVVTSSQPPONML~}}|{zyxxvvttsrqponnmlkiihggfedbb``_^]][[ZYXWVVUSSQPPONMLK~~}||zyyxvvutsrqppnnllkjihgfeddcba`__]\\[YYXXVUTSRQQPONMLKK}}||zyyxwvutsrqppnnmlkjihgffedcba``_^\\[ZYXWVVUTSRPPONNLLKJ~~}|{{zxxwvutsrrpoonmkkjihhffddcba`_^]][[ZYXWVUUTSQQPONMMKJJI~}|{{zyxwuutssqqoonmlkjiigfedccbaa`^]]\[ZZYWWUTTSRQPPNMLLJJHH~}|{{yyxwvutssqppnnmmkjjiggfedcca``^]\\[ZYYWWUTTSRQQONNMKKJIHG~}|{{yyxwvutssqqoonmlkjjhggfedcbaa_^^]\[ZYXWWUUTSRQPOONMKKJIIGG~}|{{zyxwvvtssrqponnlkjihhgfedcbaa`^^]\[ZYYWVVTTSRQQOOMMLKJIIGGF~}||zyxxwvuusrqqponmlkkihhgfedccba_^^]\\[YXWVVUTSRQQOOMLLKJJIGFFE}||{zxxwvuussrqponnlkkjihgfeddbba`_^]\[ZYXXWVUTSRQPPONMLKJJIGGFED}}|{zyxwwuttsrqponnllkihhgfedcca``_^]\[ZYYXVVUTSRQPPONMLKJJIHGEDDC~~}|{{yxwwuutrrqponmmlkjihgfeddcba`__]\[ZZXXWVUUSRRPPONMLLJIHGFEEDCB~}|{zyxxvvussrqpoonmlkjihgffeccba`_^]\[ZZYXWVUTSSRQOONMLKJIIHFFEDCBB~}|{{yyxwvutsrqppnnlkkjihhffddcba`_^^\[[ZYXWWVTTSQQONNMLLKIIGGFEDCCA@~}||zyywwvutsrrqoommlkjihgffedcba`_^^]\[ZYXWVUTSSRQOONMLKJJIHGFEDDCA@@~}||zzywvvutsrrqponmkkjjiggeddbbaa`^^]\[YYXWWUUTRRQPONMMKJJIGGFEDDBA@@?~}|{zzxxwvutsrqpoonmlljjihffddcba``_^][[ZYXXVUTTSRQPONMLKKIIHGFEEDCBA@?>~}||zzxxwvuttrqqonnmlkjjhhgfddcbaa__^]\[ZYXWVVUTSRQPONNLKKIIHGFEEDCBA@?>=~}||{yxxwvutsrrqponmlkkiihffedcbb`__]]\[[YXXVVUSSRRPOONMKKJIHGFEEDBBA@?>><~~|{zzyxwvuutrqqponmlljjhggfeecbba`^]]\\[ZYWVVUTSRQPOONMLKJIHGFEEDCBA@?>>=;~}}|{yxxwvuusrrqponmlkkjhgffedccaa`_^]\[ZYYWWUUTSRQPPNMLLKJJHGFEEDCAA@@>=<<:~~}|{zyxwvuutrqqponmlkjjihgfeecbba__^]\\ZZXXWUUTSRQPONNMLKJIHGGEEDCBA@@>>=<;:~}{zzyxwvuutsqqponnmkkiihgfedcbba`_^]\[[YXXVVUTSRRPPONMLKKIHGFEDDCCA@??>=<;:9~}}{{zyyxvvussrqppnmlkjjihgfeeccba`_^]\[[ZYXVVUTSRRPPOMMLKKJIHFFEDCBA@??==<;:98}||{{zxwwvutsrqppnnmlkjihgfeedba```^]\\[ZYXWVUTTRQQOONMLLJJIHGFEDCBB@@>=<<;:988}}|{zyxxvvussrqppnmmlkjihgfeddcba`_^^][ZZYXWVUTTSRQPONMLKJIHHGFEDDBAA??==<;:9976~}|{zzxxwuttsrrpoonmlkjihhffdccba`_^]\[ZZYXWWUUSSRQPONMLLKIHHGFEDCCB@@?==<;:99876~}||{yywvvutsrqponnmlkjihhffdccba`_^^\\[ZXXXVUUTRRQPONNLKJJHHGFEDCBAA@?>=<;;:87765~}|{zzxxwvutsrrqonnmlkjjhhfeedccaa_^^][[ZYXXWVUTSQPPONMMLJJIGGFEDCBAA@?>=<;::986654~}||{zyxwvuttrrqpnnmlljjhhgeedcbaa`_]][[ZYXWWUUSSRQPONMMKJJIHGFEDCBAA@?>==<::8876554~~|{zyyxwvutssqqonnmlljjigfeedccaa`^^\\[ZYXWWVUTSRQPOOMLKJJIHGFEEDCBA@?>==;:988765432~~}{{zyxwvutsrqpponmmljiiggfedccaa`^^]\[ZYYWWUUSSRQPOONLLKJIHGFEECCBA@?>=<;;:987764322}}{{zyxwvvusrrqoonmlljiihgfeddba``_^]\[ZZYXWVUTSRRQONNLLKJIHHGEEDCBA@?>>=<;99876553210~~|{{zyxwvvutsrppoonmkkjihggeecca``^^]\[[YXXVUUTSRQPPONLLKJIHGFEECCBA@??>=<;:98765533210}}|{zyxwvvutsqqponmllkjihgfeddbb``_^]\[ZYYXWVUTSRQPPNNMLKKJHGFEEDCBB@?>=<<;:98776533210/~}|{zzxwwuttrrqqonmmlkjihgfeeccba__^]\\ZZYXWVUUSRQPPNNMLKJIHHGFEDCBAA?>>=<;:98776543211//~}||{zyywwvutsrqponnmlkjihgffedcba`__]\[[ZYXWVUTTSRQPNNMMKKIHGGEEDCBAA?>>=<;:987655432100.-~}|{zzxxwvutsrqppnnmkkjihgfedccba`__]\[[ZYXWVUTSSQQPONNMKJIIGFFEDCBB@@?>=<;:987765432200.-,~}|{{yxwwvutsrqqonnmlkjihggeddbbaa_^^\\[ZYXWWVTTSQQPONMLKJJHHFFEDCCBA@>>=<;:98866543211/.--,~}}{zyxwwvttsrrqoonllkjihgffeccba``_^][[YYYXVVUTSRQOONMLKJJIHGFEDCBB@@?>=<;;988765443100/--,+~}|{zyxwwvuttrrqoonmlkjiihgfedcbba_^]]\[ZYXWWVUSSRQPONNLKKJHHGFEDDCBA??>=<;:998665432100/.-,+*~}|{{yywwvutsrqpponmlkjihhfeedcbba`_^][[ZYXWVUTSSRQPONMMKJIIHGFEDDBBA@?>=<<;:88765533200/--,+**~}|{zyyxwvutsrqpoonmmkjiihgfedcbb`__^]\[ZYXXVVTTSRQPONNMKKJIHGFEDCCBA@?>=<<:988765432210..-,,+*(~}}|{yyxwvutsrrqponmlkkihhfeedccaa__^]\[ZYXXVVUSSRQPONMLLKJIHGGFEDBBA@?>>=;;:98765533100/..,,**)(~~||{zyxwwvttsrqpoommkjiihffeddbaa`_]]\[ZYXXWUUTSRQQOONMLJJIHHFFEDCBA@@?=<;;:98765543200/.--++*)('~~}|{zyxwvvtsrqpponmlkkiihgffdcbba`_^]\[[YXWVUUTSSQQPOMMLKJIHHFFEDCBB@@>==<::98765543210/.--,*))(''~~||{zyxwvuutsrpponmlljjihgfeedcaa__^]\[[YXXWVTTSSQQPONMLKJIHHFFEDCBA@@>=<<;:99765542200/..,++*)('&%~~}|{zyywwuttrrqponmmkjjihggeddcba`_^]][[YYXWVUTSSRPOOMMLKKJIGFFEDCBAA?>==<;:99766543210/.-,,+*)('&%$~}|{zyyxwvutsrqponnmkjjihgfeddcba``^^][[ZYXWVUTSRQQPOMMLKJIIGFFEDCBA@??=<<;:98765543210/.--++*)(''%%$}||{zyxwwvutsrqppnmllkjihhffdccba`_^^\\ZZYXWWUTSSQQPONNMKJJIHFFEDCBAA@?>=<;:988764432110.-,,+*)(''&%$#~~}|{{zyxwvutsrqppomlljjihgfeedcbaa__]\\[ZYXWVUTSRQQPONMLKJJIHGFEEDBBA@?>=<<:997765433110..-++*)(''&$##"~}||zyxxwvutssqqoommkkjihhffedcbaa_^]\\ZYYXWWUTTSRQPONMMKKJHGGFEDCBB@@?>=<;::9876543210/.--,+*))'&&%$#"!~}}|zzyxvvutsrqpoonmllkjigfeedbbaa_^^]\[ZYXWWVTTSRQPONMMKKJIHGGEDCCAA??>==;:998765432100/.-,+*))''%%##"! ~}|{{yxxwvutssrpponmlkjihggfedcbaa`^^\\[ZYXXVUTTSRQPONNMLKJIHGFEDCBBA@?>=<;;98876543221//.-,+**((&&%$#"" ~}|{{zyxwvutssrppommlkjihhfeedcbba__^\\[ZYYWVVUSSRQQONNMKKIIHGFFDCCAA@?>><;;998765432100..-,+*))(&&%$#"!! ~}|{{yyxwvutssrpponmlkjiiggfedcbba__^]\[ZZXWVUUTSRQPONNLLKJJHGFEDCCBA@@>=<;;:98765432200/.--+*)(('&%$#"! ~}|{{zxxwvutsrrpponmlkjiihffedccaa__^]\[ZYYWWVUTSRQPONMMLKJIHGGEEDCBAA??>=;;:98765433110/.-,,+*)('&%$#"! ~~||{yyxwvutssrqponmmkjiihgfeddca`__^]\[ZZXWWVTTSRQQPNNMLKJJHHGFECCBA@??>=<;:98775543210/.-,++)(('&&%$#"! }}|{zyxwwuttrrqponnlkjjihgfeddbb``_^]\[ZZYXVVUTSRQQONNMLKJIIGGFEDCBAA@>=<<;998776443200//--,+*)(''%$#"! ~}|{zyxwvvutsqqpoommlkihhggfeccba`_^]\\ZZYXWVUUSRRQPONMLKKIHHFFEDCBB@??==<;:99866533210/..-,+*)('&&$$#!!~}}|{zzyxvuttsrqponmmlkiihggeedcba`_^^\[ZZYXWVUTSSQPPONMLKJJIGFFEDCBB@?>>=<;:99775543211/..-++))('&%$##"! ~~}|{{yxwvuttsrqponmmljjihgfeddcba`_^^][[ZYXWWUTSSQQPONMLKJJHGGFEDCCAA@?==<;:988765432100.--,+*))(&%%$#"! ~~}|{zyxxwuttsrqponnmlkjiihffddcba`_^]]\ZZYXWWUTTRRQPONMMLKJIHFFEDCBAA@?><<;:99866543311//-,,+*))''%$$#"!!}}|{{yyxwvutsrqponmllkjihggeddcba`_^^]\[ZYXXWUUTRQPPONMMKKJIHGFEEDBAA@?>=<;;:9876544211//.-,+*)('&&%#""! ~}|{zzxxwvuttsqqponmlkjihgffecbba`_^^]\[ZYXWVVTSSRQPONMMKKJIHGFEDDBA@@?>==;;98776443210/..,,+**)''&$##"! ~}|{zyxwwvutsrqpoonmlkjihhffddcba``^^]\[ZYXXWVTTSQQPPNMMKJJIHGFEDDBAA@?>=<<:99876544311//.,,+*)(('%$$#"! ~}|{{yyxwvutssqqpnnmlkjihhgeedcbba`_^]\[ZYXXVVTSSQQPOONMKKJIHGFEDDBAA@?>>=<;:98765433200/.-,+**)''&%$#""! ~}|{{zxxwvutsrrqponmmkjjiggfedcba``_^]\[ZYYWVUUTSRQPPOMLLKJIIGFEEDBBA@?>=<;;998776542210/..,,+))''%%%#"! ~~|{{zyxwvuussrpponmlljiihgfeddbba`_^]\[ZYYXVVUTSRQPPOMMLKJJHGGEEDCBA@?>=<<;:98866533200/.--++))('&%$##! gdalautotest-3.1.2/gdrivers/data/vicar_float64.vic0000664000175000017500000000110013701057753020577 0ustar evenevenLBLSIZE=384 FORMAT='DOUB' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=32 ORG='BSQ' NL=3 NS=4 NB=1 N1=4 N2=3 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-64-LINX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 TASK='GEN' USER='vos' DAT_TIM='Thu Oct 17 16:46:44 2019' IVAL=1.0 ?@@@&@(@*@,@5@6@7@8@LBLSIZE=96 SINC=1.0 LINC=10.0 BINC=1.0 MODULO=0.0 gdalautotest-3.1.2/gdrivers/data/test_ogr_xyz_float.nc0000664000175000017500000000072013701057753021707 0ustar evenevenCDF record lon  standard_name longitude _FillValuelat  standard_namelatitudez  long_name z coordinate standard_nameheightaxisZunitsmint32?@@@?@|||gdalautotest-3.1.2/gdrivers/data/tm4628_96.bil0000664000175000017500000004074013701057753017420 0ustar evenevenPPFFEETT]]]iiwwzzyyzz}}}}{{ooccee__bbhhqqqggccbbbbbbWW__ZZPPPVVhhxx}}yyy~~yymmbb^^aagg``cccoottqqxx}}~~||||yyy{{~~xxwwwwzz||yyyvviikkrrdd[[ZZaaZZZbbbbffrrrrqquu||{{{||~~zzpppddnnuu{{xxxx~~vvmmllhhoo~~xxccYYJJ>>>99==@@22**%% ((+++++%%##''**''"""""""''0000''))((//..111;;44>>KKUUZZUUOOOOOJJCCDDAA99AANN]]llrrr}}uuttzz~~qq]]]HH5511//++22@@ffpppllqqzz~~iiWWBB,,,%% && ))6699555++++77KKYYcc``cc```__ee``\\WW^^aa__dddbbbbVVPPLLCCHHTTXXOOOLLII@@>>885599??LLLVV\\YYRRTTVVVVVVYYY]]ZZ__YYDD;;8888===DDGGIIMMMMKKGGMMccfffnnyy}}~~{{wwwvv||~~rrhh```VVQQQQXXcciibbccbbbiiuuyyttttssdd__hhppp{{{{zz~~~rrmmttxxttuudd]]ZZ^^ccchhhh``ccbbggmm~~vvqqssyyvvwwhhggrrvv{{~~ggKK88*** !!&&**,,##!!!!!!! &&&''!!##$$!! ## """!!))@@RRgg||wwhhLLL<<00!!##**++(('''**((--3366::77;;55544++&&!!((++**++%%(($$ !!!!!   ))++**---,,%%&&!!!!!!$$$$!!!!!''%%''&&''++++(()))--//,,,,338899CCAAA::AACCOOddtt~~rraaaRRNNHHBB77--))""""!! ((((&&&""##$$&&((((//**!!!$$(("" $$##))''""!!((,,**!!## ""$$!!$$  ##''''((**0002211//++..333300)))**""%%**--66EEJJ@@666))""&&"""'',,000::55....,,##!!%%**))//11--"""##&&##''--((''**,,,((''((((**..--0088800$$((((&&**..%%$$$//5555885522,,****999KKbbww~~oooaaYYZZZZVVZZbbbbjjjkkuuuullUULLJJQQ___{{zzzzyyuujj``]][[ZZZZZWWGG;;7755==IIZZ]]]ffooxx}}ttVV>>>--++%%##!!##"" &&&##))((&&%% ++&&&!!!!""&&  )),,,,,,,##!!((//5599>>HHYYmm}}}dd^^bblllmmffffnn__WWMMKKKKKDD==77,,22DDTTvvǮп»÷óooqqkkdd\\\JJBB>>??WWll~~xxYY??44222554433==CCGGMMSScccuu||rreebbffjjcccPPCC>>DDQQQQGGBBAA@@@@@779999<>FFCC>>99999==<<<>99::>>HH]]lll``JJGGGFFCC@@BB??@@BBEE>>>7755::BBAADD<<,,))'''))**22..337777;;777==JJPPMMFF>><>@@NNLL55110066GGGSSkkeeeRRHH@@CCEEEEEESSVVVddssòzzssffTTIIHHBBGGGOOJJ@@<<44--&&%%'''**,,8855--(($$"" &&.....%%!!&&%%##""!! $$'',,//227777332222233..))&&%%))00///3311,,//447711##,,@@@IIXXmmooollhhdd]]WWZZQQII666%%%%####%%  !!""!!""''''''**1133@@GGXXXnnzzxxxxvvccOOGGMMUU[[YYYPPRRKKRRXX[[UUZZYYYPPGGJJWW\\kk~~ÙܹuummwwooUU99+++**1166==AADDJJTTVVVYY\\WWJJCCFFHHHHMMMIIGGTTYYSSLLHHDD===::<<55;;EEMMHH>><<<<<@@BBIIUU``^^ffss~~xxqqqqssaaa\\[[@@$$  $$''..****''+++22661155<>AAEEJJPPQQCCC//----)),,7777<<:::<<@@JJUU^^WWggvvzzqqpppuu^^OOHHGGKKKZZkkxxPP::++&&&##..555**!! ''**)))%%''44IIccaa888))!!'',,//::UUݠZZ66++))&&%%## !!++66::BBTTTTXXXuu˺ŷwwoonnooxxvvlll``__QQHHIITTZZ__]]]zzddLLHHDDCCC8888>>GGCC44++,,&&&(($$--//11//--1199@@@;;44<<>>??==BB>>===//''$$''!!))## ##''**++,,,''$$((!!"""""''%%###%% !!&&&%%&&******(($$(((++,,&&!!""&&11;;999FFRRTTWWZZ\\TTPPJJNNNWW]]QQAA7711--55999..%% !!$$""!!!!!!&&!!##)))((!! !!,,,,))&&&&&((,,77IIbbnnggQQQ55''%%''&&%%%&&"",,,)) ""%%**6655666::<>CCEEEBB<>333,,%% $$++--228884422))1144BBOOQQIII>>33))))&&&&44::DDD>>11....$$ $$""##""""####!!!!,,77;;::55//---))&&%%""!!!!!!!!""$$""###%%!!''%%$$%%"""++,,$$!!!!""&&(('''''$$%%$$((,,//))))(('''##'',,,,3311++33///,,--//++))5544+++++..33222233774422+++++**,,..0011::<<::>>><<778800..--((%%!!! &&**))..66::DD;;;11))%%##33<>--++''''((55RRsssqqqppooyyzzggOO::+++$$ ##!!//77444,,''22IIaacc\\]]^^^ccllrrffeeffiicc___SSQQPPUUWWLLGGKK[[]]]WWWWIIDD11002288===MMPP__]]ddffdd``XXXXXNNLLEE==<<4433777??IITT]]ffXXTT\\ooyyy{{xx~~{{||{{xxppgg___ZZWWOOUUbbeeccee```ssuuyy||{{ppggggiiuuuxx~~~~vvvuuvvoojjmmoonnuuyyy{{tt}}uurrttvvvttnnee]]WWWWddvv|||yyvvzz{{~~uukkddbb]]bbttt~~}}{{{xxiiff__bbllqqww~~~ccFF222%%!!##""$$$$$,,,,((##!!"" ((###$$$$%% $$%%88LL__uunnTTAAA..(( ##(())--11---//''((33??EE==<<66655//**$$""!!$$##""&&!! &&&  !!##''..33322**&&""!!!!$$ !!!!!!""**''$$%%'''))%%&&))55CC>>>>GGGBB<<::HH]]vvttfffYYWWYYUUII<<22%%&&!!%%$$))*** !!""$$////11**!!!((((%%###%%**&&&&&..++--((""##&&(( !!$$$  ##!!%%,,,++..**++..001100333..$$##++3344??CCDD;;;++&&$$33>>>??BB22,,,,//&& ##&&..//(((((..--//..(()))),,,))&&(())++++))--0004400,,--44225577???KKHHIIJJFF99//3377CCCVViixxttooii\\RRREEBBNNIIPPQQSSYYVVVZZbbff\\KKEEJJRRggg||{{||xxxggcc[[NNGGHHFF@@FFF@@::773355::FFLLTTTMMRRXXffiiZZSS@@333$$##**%%%%!!##!!$$&&&''))((##&&((##$$###$$$$ $$***%%''%%  ##22AAEEFFHHNN]]ssʰbb````fffggffrrwwssqq__UUPPPJJGG<<22..88KKkkýĽť{{{yysshhZZWW[[VVNNEEE====??@@NN\\ggttttqqqssoonniiaaRR??77>>>AA;;2255>>IIQQJJZZZooxxqqccZZWWiiii\\\LL==::>>CCII>>9977222**((++++//6644(("""!!++00''((!!(((++''!!!!! ""%%**66::555--%%((--**!!""'',,,--++..004411//2233333..226611++))##!!###&&,,--++((&&&&&""##""##$$##++++11166;;//$$**//5588999++**//5533558855(((,,))**((**''::GGOOOEE66))**++## !!!!!!!$$!!$$!!00IITTWW__kkjjjpp~~zzssYYIIEESSXX^^[[[XXPPGG??44..**&&'' !! %%++555HHSSGG44**((//>>SSSggxxUU<<66331133377772211AAXXjjwwxxxgg[[LLGGGGHHLLLLMMMRR\\^^[[XXZZPPFFEEEMM__mmʷttppzz}}``ZZWW```aallggYYYYQQ[[SSMMMRR__dd````FF33,,!!!$$AAJJRRQQWWYYZZbbbhhnnmmffggjjgghhoozzzyyhh\\\__oo||ccOOKKBB9966677..$$""##**///66==44331133//**'''!!%%%%""##))***))((##$$88BBMMUUVVZZZQQQQPPOOBBHHHHPPDDD;;33&&   !!((""%% !!!""((--++0022))))++'''!!--))**(( ###((,,,,&&$$''&& !!!$$%%''...<>>EEQQqqyyhh]]XXXYYOO>>)) %%&&%%***++++3388@@>>??::999<>88>>EEHHKKSSbbjjjww{{__SSPPPLL>>;;>>==>>FFJJHHH::00//4499AA::11//,,,,,--33//11221100333AAGGPPLL@@>>@@==<<<;;DDPPKK88001144<<>GGSSMMMKKFFEEDDOOVVZZiiqqqcc__cc^^ddwwǨ˵xxOO333--22==HHVVbbwwppYYIIDD@@JJCCHHHEEIITTVVNNEEBBFF@@@>>CC@@;;>>DDCCCC??DDDAA>>==CCSSVVYYpp~~uuiillzzvvooww{{ZZ11$$$$##**))),,--..337799885533300..00@@kk```zzКffDDD44//55662288BBFFAA5554433++//,,''%%%%(((1133;;BBDDIIMMLLDDD33,,228888995566888::<>OO\\ddccYYEE99**$$$%%"" ))*****''$$$$$$""))+++,,66PPrrŏYYY::00..555577JJ^^gghhh~~II..''%%))))""""" ''))--55;;::FFFWWjj{{ggbb__VV]]kkk~~wwzzggccXXXPPLLGGFFCCNNSSXX\\\sseePPLLDDAAA>>GGLLXX]]PP33,,+++22::??==8855,,22::BBBAA@@AAJJTTIIDD>>333--((##""!!'' %%!!##,,**22..---%%!!!!##)))&&  #### &&&$$ ))++,,..00//...))--++((((**11>>KKKTTXX\\]]bb__YYQQLLXXXggZZSSGG6600--77333//++## ''!!!!"""''  &&))((&&"""####''11@@QQggeeRRR??00%%!!!""##+++((!!##))((..//000==EESS[[WWKK@@99444552233--''((""!!!""$$$$%%((&&&##))//0044;;//))++,,,0044BBHHHH;;00++777<<22,,))%%,,--+++((''((--++(())++,,,335500002266<<;;;;;77553377--33//++++***--44))''&&00//..!!!'',,..,,002222110003377BBFFIIHH>>DDBBBAA<>KKVVWWKK==//+++**&&!!''$$""##!!''((&&&))11;;AANNVVTTDD55///11++**0022::::<>;;AAADDBB4400--00**&&%%%!!''##!!((,,//88:::77330011@@CCLLJJBB777//''$$**((****### (('' !!))+++--((''**221177>>:::77**!!))''%%""%%%%!! !!%%--+++++%%((55??99;;22***$$##//++11////445522244**..44((!!####### ''444,,++((//@@XXffmmiiggg]]FF.. ##'''$$   %% $$,,1100***''##""##""&&333BBRR__^^QQJJNNGG:::00..11**&&//77==77BBBEEBB99++     )))--++3333##    --99EEIIRRPPPPJJJ@@::44-- ''555==AAGGMMVVUUZZZZ[[[UULLFFHHJJEECCHHNNTTTTTPPMMMMOOSSGGAA999220000EERRcc^^GG22**!!"" $$!!&&&%%$$$$ !!%%!!"" %%((****(($$$  ---''"" !!#### +++DDmmffEEE..''##--//!!!!!##   gdalautotest-3.1.2/gdrivers/data/single_block_32769_16385.jp20000664000175000017500000002314513701057753022036 0ustar eveneven jP ftypjp2 jp2 jpx rreqC@-jp2hihdr@colrtuuidK=KCզII*   , # Wh )#NAD27 / UTM zone 11N|NAD27|jJڿ?P+?@A̞LAasoclbl gml.dataasoclbl gml.root-instancexml 440720 3750120 441920 3751320 0 0 32768 16384 x y 440720.018309988 3751319.96338114 0.0366199761970155 0 0 -0.0732377174244736 gmljp2://codestream/0 Record Interleaved jp2cOQ)@@R\5B~~~vvvoongPgPghPPPGWWWbd%Created by OpenJPEG version 2.3.0 ;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +;PTa0u $%* $% +1x3B,81gdalautotest-3.1.2/gdrivers/data/byte.gpkg0000664000175000017500000003100013701057753017250 0ustar evenevenSQLite format 3@ GP10-   f 11[;kUndefined cartesian SRSNONEundefinedundefined cartesian coordinate reference system \=mUndefined geographic SRSNONEundefinedundefined geographic coordinate reference system ff + WGS 84 geodeticEPSGGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]longitude/latitude coordinates in decimal degrees on the WGS 84 spheroid >  =bytetilesbyte2017-06-04T20:58:07.578Z98@9=hW  byte  byte ||9M'indexsqlite_autoindex_gpkg_contents_2gpkg_contents9M'indexsqlite_autoindex_g55)tablegpkg_spatial_ref_sysgpkg_spatial_ref_sysCREATE TABLE gpkg_spatial_ref_sys (srs_name TEXT NOT NULL,srs_id INTEGER NOT NULL PRIMARY KEY,organization TEXT NOT NULL,organization_coordsys_id INTEGER NOT NULL,definition TEXT NOT NULL,description TEXT) aa''wtablegpkg_contentsgpkg_contentsCREATE TABLE gpkg_contents (table_name TEXT NOT NULL PRIMARY KEY,data_type TEXT NOT NULL,identifier TEXT UNIQUE,description TEXT DEFAULT '',last_change DATETIME NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),min_x DOUBLE, min_y DOUBLE,max_x DOUBLE, max_y DOUBLE,srs_id INTEGER,CONSTRAINT fk_gc_r_srs_id FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys(srs_id)) ?]]//[tablegpkg_ogr_contentsgpkg_ogr_contents CREATE TABLE gpkg_ogr_contents(table_name TEXT NOT NULL PRIMARY KEY,feature_count INTEGER DEFAULT NULL)AU/indexsqlite_autoindex_gpkg_ogr_contents_1gpkg_ogr_contents 9M'indexsqlite_autoindex_gpkg_contents_2gpkg_contents9M'indexsqlite_autoindex_gpkg_contents_1gpkg_contents   bytehW99=  byte _G[5indexsqlite_autoindex_gpkg_tile_matrix_set_1gpkg_tile_matrix_set55_tablegpkg_tile_matrix_setgpkg_tile_matrix_set CREATE TABLE gpkg_tile_matrix_set (table_name TEXT NOT NULL PRIMARY KEY,srs_id INTEGER NOT NULL,min_x DOUBLE NOT NULL,min_y DOUBLE NOT NULL,max_x DOUBLE NOT NULL,max_y DOUBLE NOT NULL,CONSTRAINT fk_gtms_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name),CONSTRAINT fk_gtms_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id))   byte<<  byte ::nnC --9tablegpkg_tile_matrixgpkg_tile_matrixCREATE TABLE gpkg_tile_matrix (table_name TEXT NOT NULL,zoom_level INTEGER NOT NULL,matrix_width INTEGER NOT NULL,matrix_height INTEGER NOT NULL,tile_width INTEGER NOT NULL,tile_height INTEGER NOT NULL,pixel_x_size DOUBLE NOT NULL,pixel_y_size DOUBLE NOT NULL,CONSTRAINT pk_ttm PRIMARY KEY (table_name, zoom_level),CONSTRAINT fk_tmm_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name)) TTP ++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)e -tablebytebyteCREATE TABLE "byte" (id INTEGER PRIMARY KEY AUTOINCREMENT,zoom_level INTEGER NOT NULL,tile_column INTEGER NOT NULL,tile_row INTEGER NOT NULL,tile_data BLOB NOT NULL,UNIQUE (zoom_level, tile_column, tile_row))' ;indexsqlite_autoindex_byte_1byte? S-indexsqlite_autoindex_gpkg_tile_matrix_1gpkg_tile_matrix &&OPNG  IHDR{`IDATx١n#gw1 4 l.\(lo0pmX 'f3U J-K\'t?c[{jOqvCM}7:'WPulmjhP;WkcչCkcsC΍ձn+]zlߡ   byte786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]] ``W5oNAD27 / UTM zone 11NEPSGhWPROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9Cu:ХZ[{jeFhCO[86Ծ˭sr%k {oS [~TsCKO-?77vN oOg7vZ:ɏ42!W;4uj}ԥc` [cP~cS-]e[N-=wK޾{n꽱s>o}Z{jpvs[ol{u]Wu;^l|~ԫ5n=L VSSo]a;J"hԥC_{iCmCN ձ;tj걷c:8&pk[sOxo]zuNa襹^nb 4QIENDB`gdalautotest-3.1.2/gdrivers/data/byte_with_neg_fillvalue_and_unsigned_hint.nc0000664000175000017500000000024013701057753026411 0ustar evenevenCDF xy Band1  _Unsignedtrue _FillValue~gdalautotest-3.1.2/gdrivers/data/idat_broken.png0000664000175000017500000000052213701057753020427 0ustar evenevenPNG  IHDRNIDATH_he?;6AwJ(-6ۥ'ٟ7:,`~;mm g-uK]F;{g61eod(_aY5hBZ].rR&d4!#J:f ZZ}b?ZzRp%lePu8nUԁ#Mt|5 `-y Py DR hw6S uX6ZWdPzu*A6 h+u4V2T &6IENDB`gdalautotest-3.1.2/gdrivers/data/frmt09.cot0000664000175000017500000004550213701057753017277 0ustar eveneven  ????  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Y' 0     Y% 0      Y!0      Y E YEYEYFYDY ?Y  5 Y!  , Y * Y  ' Y % Y ! Y Y  Y     Y   Y!   !Y #Y!  $Y! $Y) &Y#&Y#'Y#   (Y $ (Y! ' %Y!) #Y,  "Y .   "Y!!/  "Y"2 #Y#4#Y$5 #Y%8 #Y&9  $Y';  $Y(=  $Y)?$Y*A %Y!+C %Y,D $Y!-C !Y.+  Y/, Y0/  Y11    Y23    Y35    Y48  Y57 Y68 Y77Y88Y98 Y:7   Y;6  Y<5  Y=4     Y>3     'Y?2   Y@1  YA1   YB0   YC/   YD.    YE.     YF-     YG,    YH+    YI*     YJ)    !YK)    "YL(     #YM'    $ YN&    % Y#O%     'Y!P$     (Y!Q"    )YR!    ) YS      )YT     'YU      % Y!V       YW     Y!X    Y!Y     Y!Z    Y![     Y!\     Y]     Y!^   Y_    Y!`    Y!a     Y!b      !Y!c       #Yd       %Ye       'Y!f      )Yg      +Y!h      -Y!i     /Y#j    1Y!k     3Y!l    5Ym     7Yn    8Yo    :Yp   <Yq   >Yr  @Ys  BYt  DYu  FYv HYw JYx  KYy  MYz  MY{ LY|  LY}   KY~    JY   JYIYIY  HY  HY    GY    GY   FY    Fgdalautotest-3.1.2/gdrivers/data/float64.asc0000664000175000017500000000107613701057753017414 0ustar evenevenncols 5 nrows 5 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 nodata_value -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 -1.234567890123 1.234567890123 gdalautotest-3.1.2/gdrivers/data/U_0002A.NTF0000664000175000017500000000060413701057753016760 0ustar evenevenNITF01.10 JR2 04150923ZAUG92This NITF message contains 0 images, 0 symbols, 0 labels and 0 text. U 99999900001000010JITC (602) 538-5458 0000000003880003880000000000000000000000000000gdalautotest-3.1.2/gdrivers/data/frmt27.cot0000664000175000017500000015347313701057753017306 0ustar eveneven dξȼTKQNE?EZTTTÝ˖ӭHȯ-Wf-]w]zwӧw]ùowuuru<*]cWΖcowrl|lcιòzf]cQosR1551RZkw=9Z*J^kk{sos^Jo9JswowJ'{5$oskZVZRZbRZ=Rkg{k^goV^{wkosgV5A=5ENboARZRZboo{kooE9Zw1^ZwVNbZNo;eieis[RRxxne`}xssxin``}ϨnβiVi}xsDRxsxxis<`esxxss}sneVMixIIxexsnƿi[is}Me}}ni}}x`eVsVeþiw㯓?<6cwQTuic΄wr6շBTr0QKwüйulNдrڼcuuz㛄կcEӹòzzfȆfQ^sw{kZ59N{wZ91g1AVVb{sww'AkJ=kww{V*sJ!bkgb{kos{wogoo{obVoN{={oVgwws^AJN^ZoE-=JAbJJssosb`n`ssMVVMe[[VVs}iexneesδxȿ``s}}̸}sni1i`sei}}̲se}x``M[fE9lƉi`lZNzlWӹՆ-ˠBT|0N]H]wâi]*ЭQ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?zskoRNs{{w{{so\^Z{^NJ9*5R^$EA{A5wZN^bJ=Ekg=Rob99=99AJoks^{wRNA-g='bbZJgobbZ-N^$1{15XiDVVei``[`VV``VeiRMV`ۮssxxniseRxx}}x`}Vi}sƹ};iiseenixeVI`nnssi[ie[``[nsua`EHHQHiƷηߖzZ|wr$ *-iocuzZurȷWNcKcZW`0oiȾuâifoozu BANDWIDTH = N/A EXPOSURE_DURATION = 989 EXPOSURE_TYPE = AUTOMATIC DETECTOR_TEMPERATURE = -24.21 FOCAL_PLANE_TEMPERATURE = -19.53 FILTER_TEMPERATURE = "N/A" OPTICS_TEMPERATURE = -20.35 /*** INSTRUMENT RAW PARAMETERS ***/ MESS:MET_EXP = 1426030 MESS:ATT_CLOCK_COUNT = 1426028 MESS:ATT_Q1 = -0.146643 MESS:ATT_Q2 = 0.439917 MESS:ATT_Q3 = 0.468674 MESS:ATT_Q4 = 0.751873 MESS:ATT_FLAG = 7 MESS:PIV_GOAL = 0 MESS:PIV_POS = 1 MESS:PIV_READ = 20652 MESS:PIV_CAL = -26758 MESS:FW_GOAL = 11976 MESS:FW_POS = 11980 MESS:FW_READ = 11980 MESS:CCD_TEMP = 1093 MESS:CAM_T1 = 486 MESS:CAM_T2 = 513 MESS:EXPOSURE = 989 MESS:DPU_ID = 0 MESS:IMAGER = 1 MESS:SOURCE = 1 MESS:FPU_BIN = 1 MESS:COMP12_8 = 0 MESS:COMP_ALG = 0 MESS:COMP_FST = 1 MESS:TIME_PLS = 1 MESS:LATCH_UP = 0 MESS:EXP_MODE = 1 MESS:PIV_STAT = 1 MESS:PIV_MPEN = 0 MESS:PIV_PV = 1 MESS:PIV_RV = 1 MESS:FW_PV = 1 MESS:FW_RV = 1 MESS:AEX_STAT = 1024 MESS:AEX_STHR = 0 MESS:AEX_TGTB = 3000 MESS:AEX_BACB = 240 MESS:AEX_MAXE = 989 MESS:AEX_MINE = 1 MESS:DLNKPRIO = 1 MESS:WVLRATIO = 0 MESS:PIXELBIN = 4 MESS:SUBFRAME = 0 MESS:SUBF_X1 = 0 MESS:SUBF_Y1 = 0 MESS:SUBF_DX1 = 0 MESS:SUBF_DY1 = 0 MESS:SUBF_X2 = 0 MESS:SUBF_Y2 = 0 MESS:SUBF_DX2 = 0 MESS:SUBF_DY2 = 0 MESS:SUBF_X3 = 0 MESS:SUBF_Y3 = 0 MESS:SUBF_DX3 = 0 MESS:SUBF_DY3 = 0 MESS:SUBF_X4 = 0 MESS:SUBF_Y4 = 0 MESS:SUBF_DX4 = 0 MESS:SUBF_DY4 = 0 MESS:SUBF_X5 = 0 MESS:SUBF_Y5 = 0 MESS:SUBF_DX5 = 0 MESS:SUBF_DY5 = 0 MESS:CRITOPNV = 0 MESS:JAILBARS = 0 MESS:JB_X0 = 0 MESS:JB_X1 = 0 MESS:JB_SPACE = 0 /*** GEOMETRY INFORMATION ***/ RIGHT_ASCENSION = 50.38993 DECLINATION = 34.78511 TWIST_ANGLE = 13.95706 RA_DEC_REF_PIXEL = (64.00000,64.00000) RETICLE_POINT_RA = (49.58533 ,51.75069 ,49.01976 ,51.22965 ) RETICLE_POINT_DECLINATION = (33.66986 ,34.11144 ,35.46118 ,35.91225 ) /*** TARGET PARAMETERS ***/ SC_TARGET_POSITION_VECTOR = "N/A" TARGET_CENTER_DISTANCE = "N/A" /*** TARGET WITHIN SENSOR FOV ***/ SLANT_DISTANCE = "N/A" CENTER_LATITUDE = "N/A" CENTER_LONGITUDE = "N/A" HORIZONTAL_PIXEL_SCALE = "N/A" VERTICAL_PIXEL_SCALE = "N/A" SMEAR_MAGNITUDE = "N/A" SMEAR_AZIMUTH = "N/A" NORTH_AZIMUTH = "N/A" RETICLE_POINT_LATITUDE = ("N/A","N/A","N/A","N/A") RETICLE_POINT_LONGITUDE = ("N/A","N/A","N/A","N/A") /*** SPACECRAFT POSITION WITH RESPECT TO CENTRAL BODY ***/ SUB_SPACECRAFT_LATITUDE = "N/A" SUB_SPACECRAFT_LONGITUDE = "N/A" SPACECRAFT_ALTITUDE = "N/A" SUB_SPACECRAFT_AZIMUTH = "N/A" /*** SPACECRAFT LOCATION ***/ SPACECRAFT_SOLAR_DISTANCE = 154803913.08037 SC_SUN_POSITION_VECTOR = (129067998.77303 ,-80148450.30684 ,-29697291.30966 ) SC_SUN_VELOCITY_VECTOR = (-17.30739 ,-19.66653 ,-11.92862 ) /*** VIEWING AND LIGHTING GEOMETRY (SUN ON TARGET) ***/ SOLAR_DISTANCE = "N/A" SUB_SOLAR_AZIMUTH = "N/A" SUB_SOLAR_LATITUDE = "N/A" SUB_SOLAR_LONGITUDE = "N/A" INCIDENCE_ANGLE = "N/A" PHASE_ANGLE = "N/A" EMISSION_ANGLE = "N/A" LOCAL_HOUR_ANGLE = "N/A" /*** GEOMETRY FOR EACH SUBFRAME ***/ OBJECT = SUBFRAME1_PARAMETERS RETICLE_POINT_LATITUDE = ("N/A","N/A","N/A","N/A") RETICLE_POINT_LONGITUDE = ("N/A","N/A","N/A","N/A") END_OBJECT = SUBFRAME1_PARAMETERS OBJECT = SUBFRAME2_PARAMETERS RETICLE_POINT_LATITUDE = ("N/A","N/A","N/A","N/A") RETICLE_POINT_LONGITUDE = ("N/A","N/A","N/A","N/A") END_OBJECT = SUBFRAME2_PARAMETERS OBJECT = SUBFRAME3_PARAMETERS RETICLE_POINT_LATITUDE = ("N/A","N/A","N/A","N/A") RETICLE_POINT_LONGITUDE = ("N/A","N/A","N/A","N/A") END_OBJECT = SUBFRAME3_PARAMETERS OBJECT = SUBFRAME4_PARAMETERS RETICLE_POINT_LATITUDE = ("N/A","N/A","N/A","N/A") RETICLE_POINT_LONGITUDE = ("N/A","N/A","N/A","N/A") END_OBJECT = SUBFRAME4_PARAMETERS OBJECT = SUBFRAME5_PARAMETERS RETICLE_POINT_LATITUDE = ("N/A","N/A","N/A","N/A") RETICLE_POINT_LONGITUDE = ("N/A","N/A","N/A","N/A") END_OBJECT = SUBFRAME5_PARAMETERS OBJECT = IMAGE LINES = 1 LINE_SAMPLES = 128 SAMPLE_TYPE = MSB_UNSIGNED_INTEGER SAMPLE_BITS = 16 END_OBJECT = IMAGE END yqiaYQIA91)! yqiaYQIA91)! yqiaYQIA91)! yqiaYQIA91)! gdalautotest-3.1.2/gdrivers/data/fakecpgSIRC.hdr0000664000175000017500000000026413701057753020223 0ustar evenevennumber_lines 1 number_samples 1 altitude 0.01 near_srd 0.01 sample_size 0.01 sample_size_az 0.01 transposed 0 gdalautotest-3.1.2/gdrivers/data/vicar_bigendian_float32.vic0000664000175000017500000000116013701057753022600 0ustar evenevenLBLSIZE=368 FORMAT='REAL' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=16 ORG='BSQ' NL=3 NS=4 NB=1 N1=4 N2=3 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-LINUX' INTFMT='LOW' REALFMT='IEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 BINC='1.0' DAT_TIM='Thu Oct 17 16:46:44 2019' ?@@@@A0A@APA`AAAALBLSIZE=208 IVAL='1.0' LINC='10.0' MODULO='0.0' SINC='1.0' USER='vos' PROPERTY='GEOTIFF' NITF_NROWS='3' NITF_NCOLS='4' TASK='TASK' USER='even' DAT_TIM='Fri Oct 18 14:16:20 2019' gdalautotest-3.1.2/gdrivers/data/small_world_in_document_folder_pct.kml0000664000175000017500000000073713701057753025261 0ustar eveneven small_world ffffffff small_world_pct.tif 1 90 -90 180 -180 gdalautotest-3.1.2/gdrivers/data/42BW_420730_VT2.aux0000664000175000017500000001775413701057753020166 0ustar evenevenEHFA_HEADER_TAG@bRrootroot> AlR DependentFile20Eimg_DependentFileAZLayer_1t gR 0 Band_183593720Eimg_LayerentFile> A D l] 4RRDNamesList720Eimg_RRDNamesListA% (IMAGINE 2X2 Resampling"BW_420730_VT2.rrd(:Band_1:_ss_4_)"BW_420730_VT2.rrd(:Band_1:_ss_8_)#BW_420730_VT2.rrd(:Band_1:_ss_16_)#"BW_420730_VT2.rrd(:Band_1:_ss_32_)#MBW_420730_VT2.rrd(:Band_1:_ss_64_)$xBW_420730_VT2.rrd(:Band_1:_ss_128_)D >lF*MapToPixelXFormmeExfr_GenericXFormHeaderA$,Affine ;PolynomialNXForm0xelXFormmeEfga_PolynomialmHeaderA k T? *[Z]ÿ (jv /䆦tI>GȊ*V>^Rf>w4`P>F//b> J >V/E ")j@)8@  3btye^<ݿX҉?IQؿV~U2?vUIy>Li? [- m>&Evk7c[k=z"ѾELng"{*A>mJ<<1> RfZ@HPʴ@ lKMapInformationmeEimg_MapInformationderA,NAD_1983_StatePlane_Alaska_4_FIPS_5004_Feetus_survey_feet> l ProjectionionmeEprj_ProParametersderA +DatumtionionmeEprj_DatumametersderA 42BW_420730_VT2.jpg 1,.HHlEhfa_Layer93720Ehfa_LayerentFile> A{35392:Cdata,}RasterDMS,. lRDependentLayerNameEimg_DependentLayerNameAe IMAGINE 2X2 Resampling $ 42BW_420730_VT2.rrd(:Band_1:_ss_4_)$ 42BW_420730_VT2.rrd(:Band_1:_ss_8_)% 42BW_420730_VT2.rrd(:Band_1:_ss_16_)% 42BW_420730_VT2.rrd(:Band_1:_ss_32_)%> 42BW_420730_VT2.rrd(:Band_1:_ss_64_)&k 42BW_420730_VT2.rrd(:Band_1:_ss_128_)0lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,. State Planet@o wGRS 1980@TXA?XA@k{?˯MXANAD83 nadcon.dat{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,{1:*oEfga_Polynomial,forward,1:*oEfga_Polynomial,reverse,}GM_PolyPair,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,.gdalautotest-3.1.2/gdrivers/data/fakebig.gif0000664000175000017500000000011013701057753017510 0ustar evenevenGIF87a̙fffd333,@gdalautotest-3.1.2/gdrivers/data/ll.jp20000664000175000017500000007007513701057753016476 0ustar eveneven jP ftypjp2 jp2 -jp2hihdrcolrcasoclbl gml.datacasoclbl gml.root-instancecxml This file conforms to OGC document 05-047r3, the GMLJP2 Encoding Specification version 1.0.0. Created by LizardTech Geo Express. 42.0000000000 8.0000000000 50.0000000000 16.0000000000 English UTF8 BartholomewRaster1MSeries.xml Dataset tile Kenneth Gibson Collins Bartholomew Ltd Database Coordinator +44(0)141 306 3359 HarperCollins Publishers Ltd. (World Maps & Atlases), Westerhill Road, Bishopbriggs Glasgow Scotland G64 2QT kenneth.gibson@harpercollins.co.uk Originator 2006-06-23 NATO Geospatial Metadata Profile 1 2 Column 10507 0.000761 Row 10507 0.000761 Area true urn:x-ogc:def:crs:EPSG:6.12:4326 GCS_WGS_1984 EuropeRasterTile23.tif European Raster Tile 23 2006-06-20 Creation 2006-06-23 Revision Version 2 2006-06 EuropeRasterTile23.tif Kathryn Kelly Collins Bartholomew Ltd Custom Mapping Manager +44(0)141 306 3752 +44(0)208 237 4230 HarperCollins Publishers Ltd, World Maps & Atlases, Westerhill Road, Bishopbriggs Glasgow Scotland G64 2QT kathryn.kelly@harpercollins.co.uk Point Of Contact Jim Irvine Collins Bartholomew Ltd Head of Digital Resources and the Collins Newsroom +44(0)141 306 3305 HarperCollins Publishers Ltd, World Maps & Atlases, Westerhill Road, Bishopbriggs Glasgow Scotland G64 2QT jim.irvine@harpercollins.co.uk Point Of Contact Kenneth Gibson Collins Bartholomew Ltd Database Coordinator +44(0)141 306 3359 HarperCollins Publishers Ltd, World Maps & Atlases, Westerhill Road, Bishopbriggs Glasgow Scotland G64 2QT kenneth.gibson@harpercollins.co.uk Originator Digital Map This GeoTIFF represents one tile of the Collins European Raster dataset, published as Europe Scene. GMLJP2 3.1.1 This dataset is not intended to be used in conjunction with satellite navigation devices. Whilst every effort is made to ensure that the data is spatially accurate, features will have been deliberately offset and generalized to be represented at a nominal scale of 1:1,000,000. Hence, the data should not be used for determining the precise location of places or features. Collins Bartholomew data has gained a reputation for its accuracy in depicting place names and international boundaries. The status of nations, their names and their boundaries are shown in this data as they are at the time of publication, as far as can be ascertained. Where international boundaries are the subject of dispute it may be that no portrayal of them will meet with the approval of any of the countries involved. However, every reasonable attempt has been made to show where an active territorial dispute exists, and the data aims to be neutral and to represent the situation as it exists on the ground (de facto) at the time of publication. With regards to the spelling of place names, this data uses local name forms where these are in the Roman alphabet. These local name forms are those which are officially recognised by the government of the country concerned, usually as represented by its official mapping agency. This is a basic principle laid down by the United Kingdom government's Permanent Committee on Geographical Names (PCGN) and the equivalent United States Board on Geographic Names (BGN). License Intellectual Property Rights Other Restrictions License Intellectual Property Rights Other Restrictions NATO shall not use 'the Maps', which includes this data, for any use other than contemplated by the Agreement. No classification NATO Geospatial Metadata NATO Grid 1000000 English UTF8 boundaries imageryBaseMapsEarthCover transportation 8.00000000 16.00000000 42.00000000 50.00000000 PixelValue Thematic classification 0 0 10507 10507 x y 8.0003806986 49.9996193014 0.000761397164 0.000000000000 0.000000000000 -0.000761397164 gmljp2://codestream/0 Record Interleaved jp2cOQ)R IYiy\#"wvvvoongLgLgdPPPEWWWadKakadu-v6.0dKdu-Layer-Info: log_2{Delta-D(MSE)/[2^16*Delta-L(bytes)]}, L(bytes) -47.8, 4.8e+02 -47.9, 5.1e+02 -48.6, 5.5e+02 -49.0, 6.1e+02 -49.7, 6.9e+02 -50.1, 8.0e+02 -50.5, 9.5e+02 -50.9, 1.2e+03 -51.5, 1.5e+03 -51.9, 1.9e+03 -52.2, 2.5e+03 -52.6, 3.3e+03 XS       +.( X.D/B!`\KPψ@jO ɋ*`1>NEޒN5D=;ؤ0i~CAyyRhX(fMڍ,k>_ڸyB"ۑ㹰L ^Rm]EݠWLvc`. /*5)W6jV 9WlD8`UF|[oc/$qzs <\oKπ"N\{ޔ&Ҷ _Ib:~*y">\nu&S0ϼ{Xt tR)}2 s{8Հ pnp%l@fԨ1/_tF[ +.dOHoHKQA넗ur؊T%ROTH]c&P(`I6 t ]ZZ4ݑjD1"qwvrR*AD z~KHJ)xSFn5k`Pyﮚ$E֌b/޽+BE-2h;^{V"-<)o(yC4pP(GG `@g_XACZm@|bFŰ9e TYE_yZ grp5VEQ n@ootbU7VW0友APB >9``c]Xf )iNl / cn5p` \*tsx\]]ƈ0L9C Ge\lo_xu2nf `t5̒pyX]V$5Vg2U,uR9(^VИճUq+sw3NOԁ" 6cΨ*U`z!?{tedoGjct +Z'q/㧄2<@k~]fJ%#TnxkQ3-Ī{q£6urCV8Z46(A㌟bMkhQu3Eˣ-IS4Zze nw3|UY/#T R@gB+aeg.WQom! M]{wsjh~J_)(zoj 2p#h&juDtO+!|#eu^#uSȲ{tV1BXz/hpf}T 2˃g8b)/D0g2yYh͌b_S6O$$oRQn zvg#,pUPDn59hE(^48D3Xul !W+2h}ƌR;&du۔p}"&yP$8tP,|.vBNY*&n4r~0w޽G :-!.b3NpN.g_ V6Qq +H[?Wq3|wϒ.Ǽv ]N#ЛBȫdۍzrbFEUVM_,ti+U5E0`3([(ߑk8@.VT;W;`擾υ@:3";"P5H@:3";END gdalautotest-3.1.2/gdrivers/data/isis3_obliquecylindrical.cub0000664000175000017500000000205613701057753023127 0ustar evenevenObject = IsisCube Object = Core Format = Tile TileSamples = 1067 TileLines = 1067 Group = Dimensions Samples = 3201 Lines = 2134 Bands = 1 End_Group Group = Pixels Type = UnsignedByte ByteOrder = Lsb Base = 0.0 Multiplier = 1.0 End_Group End_Object Group = Mapping ProjectionName = ObliqueCylindrical TargetName = Mars EquatorialRadius = 3396190.0 PolarRadius = 3376200.0 LatitudeType = Planetocentric LongitudeDirection = PositiveEast LongitudeDomain = 180 MinimumLatitude = -90.0 MaximumLatitude = 90.0 MinimumLongitude = -180.0 MaximumLongitude = 180.0 UpperLeftCornerX = -10670000.0 UpperLeftCornerY = 5335000.0 PixelResolution = 5000.0 Scale = 11.854939504661 PoleLatitude = 0.0 PoleLongitude = 0.0 PoleRotation = 90.0 End_Group End_Object Endgdalautotest-3.1.2/gdrivers/data/rasterlite.sqlite0000664000175000017500000005600013701057753021043 0ustar evenevenSQLite format 3@  }#-7indexidx_geocolsgeometry_columnsCREATE UNIQUE INDEX idx_geocols ON geometry_columns (f_table_name, f_geometry_column) --Ktablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name VARCHAR(256) NOT NULL, f_geometry_column VARCHAR(256) NOT NULL, type VARCHAR(30) NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER, spatial_index_enabled INTEGER NOT NULL)f++tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR(256) NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name VARCHAR(256), proj4tex   BfmepsgWGS 84+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ''test_metadatageometryPOLYGON 'test_metadatageometry CC,;f++tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR(256) NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name VARCHAR(256), proj4text VARCHAR(2048) NOT NULL) --Ktablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name VARCHAR(256) NOT NULL, f_geometry_column VARCHAR(256) NOT NULL, type VARCHAR(30) NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER, spatial_index_enabled INTEGER NOT NULL)}#-7indexidx_geocolsgeometry_columnsCREATE UNIQUE INDEX idx_geocols ON geometry_columns (f_table_name, f_geometry_column)C1+3triggerfkd_refsys_geocolsspatial_ref_sysCREATE TRIGGER fkd_refsys_geocols BEFORE DELETE ON spatial_ref_sys FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'delete on table ''spatial_ref_sys'' violates constraint: ''geometry_columns.srid''') WHERE (SELECT srid FROM geometry_columns WHERE srid = OLD.srid) IS NOT NULL; END DD\1-ctriggerfki_geocols_refsysgeometry_columnsCREATE TRIGGER fki_geocols_refsys BEFORE INSERT ON geometry_columns FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'insert on table ''geometry_columns'' violates constraint: ''spatial_ref_sys.srid''') WHERE NEW."srid" IS NOT NULL AND (SELECT srid FROM spatial_ref_sys WHERE srid = NEW.srid) IS NULL; ENDZ1-_triggerfku_geocols_refsysgeometry_columnsCREATE TRIGGER fku_geocols_refsys BEFORE UPDATE ON geometry_columns FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'update on table ''geometry_columns'' violates constraint: ''spatial_ref_sys.srid''') WHERE NEW.srid IS NOT NULL AND (SELECT srid FROM spatial_ref_sys WHERE srid = NEW.srid) IS NULL; END 4//viewgeom_cols_ref_sysgeom_cols_ref_sysCREATE VIEW geom_cols_ref_sys AS SELECT f_table_name, f_geometry_column, type, coord_dimension, spatial_ref_sys.srid AS srid, auth_name, auth_srid, ref_sys_name, proj4text FROM geometry_columns, spatial_ref_sys WHERE geometry_columns.srid = spatial_ref_sys.srid''stabletest_metadatatest_metadataCREATE TABLE test_metadata ( id INTEGER NOT NULL PRIMARY KEY, source_name TEXT NOT NULL, tile_id INTEGER NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, pixel_x_size DOUBLE NOT NULL, pixel_y_size DOUBLE NOT NULL, "geometry" POLYGON) ''7 5truemarble338169.tifR? E3? E3fVf@V@|fV@f@V@f@VfVfV@ +raster metadata zz;> A'triggerggi_test_metadata_geometrytest_metadataCREATE TRIGGER "ggi_test_metadata_geometry" BEFORE INSERT ON "test_metadata" FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, '"test_metadata"."geometry" violates Geometry constraint [geom-type or SRID not allowed]') WHERE (SELECT type FROM geometry_columns WHERE f_table_name = 'test_metadata' AND f_geometry_column = 'geometry' AND GeometryConstraints(NEW."geometry", type, srid) = 1) IS NULL; ENDB A'%triggerggu_test_metadata_geometrytest_metadataCREATE TRIGGER "ggu_test_metadata_geometry" BEFORE UPDATE ON "test_metadata" FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, '"test_metadata"."geometry" violates Geometry constraint [geom-type or SRID not allowed]') WHERE (SELECT "type" FROM "geometry_columns" WHERE f_table_name = 'test_metadata' AND f_geometry_column = 'geometry' AND GeometryConstraints(NEW."geometry", type, srid) = 1) IS NULL; END ee$aX A'Qtriggergii_test_metadata_geometrytest_metadataCREATE TRIGGER "gii_test_metadata_geometry" AFTER INSERT ON "test_metadata" FOR EACH ROW BEGIN INSERT INTO "idx_test_metadata_geometry" (pkid, xmin, xmax, ymin, ymax) VALUES (NEW.ROWID, MbrMinX(NEW."geometry"), MbrMaxX(NEW."geometry"), MbrMinY(NEW."geometry"), MbrMaxY(NEW."geometry")); ENDaA'ctriggergiu_test_metadata_geometrytest_metadataCREATE TRIGGER "giu_test_metadata_geometry" AFTER UPDATE ON "test_metadata" FOR EACH ROW BEGIN UPDATE "idx_test_metadata_geometry" SET "xmin" = MbrMinX(NEW."geometry"), "xmax" = MbrMaxX(NEW."geometry"), "ymin" = MbrMinY(NEW."geometry"), "ymax" = MbrMaxY(NEW."geometry") WHERE "pkid" = NEW.ROWID; ENDYA'Striggergid_test_metadata_geometrytest_metadataCREATE TRIGGER "gid_test_metadata_geometry" AFTER DELETE ON "test_metadata" FOR EACH ROW BEGIN DELETE FROM "idx_test_metadata_geometry" WHERE pkid = OLD.ROWID; END yx/P++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)AAEtableidx_test_metadata_geometryidx_test_metadata_geometryCREATE VIRTUAL TABLE "idx_test_metadata_geometry" USING rtree( pkid, xmin, xmax, ymin, ymax) KK7tableidx_test_metadata_geometry_nodeidx_test_metadata_geometry_node CREATE TABLE "idx_test_metadata_geometry_node"(nodeno INTEGER PRIMARY KEY, data BLOB)'MMAtableidx_test_metadata_geometry_rowididx_test_metadata_geometry_rowid CREATE TABLE "idx_test_metadata_geometry_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER)/OOMtableidx_test_metadata_geometry_parentidx_test_metadata_geometry_parentCREATE TABLE "idx_test_metadata_geometry_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)%%Mtabletest_rasterstest_rastersCREATE TABLE test_rasters ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, raster BLOB NOT NULL) 99D 4C4´B   V0JFIF;CREATOR: jpe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gb_Ǒ#ێ+vu9Ā1c/~܏¼1 gW ˍifu^ chPH͂@-kqNijm¤ɖPqӚuc Vc)H,rENQފP( ( ( ( ( (;ot:[#YH@\Ưquw-nv:T :QQ¶1IE`aBTTTQ@Q@?s oseQEQEQET`1WES(((vޒPxx4hz(EsEWA!EPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEP{Gz+P)UAXu(AaShQMhE6=Xu(AaShQMiE6=Xu(AaShQMiE6=Xu(aShyQMiE6=Xu(AaShQMhE6=X;Egdalautotest-3.1.2/gdrivers/data/cucled-2.rsw0000664000175000017500000001264513701057753017604 0ustar evenevenRSW@UUUUUd@N@tLA@A@@  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~RSW     @Y@@  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~dRSW @Y@P@  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~kkk{s{ksssskŔc{{{{s{ccsc{s{{{c{{kskkkcss{sccZccckkkk{sk{{c{ksccck{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/4byteFloat.sg-grd-z0000664000175000017500000000320113701057753021026 0ustar evenevenPKRJ,<4byteFloat.sgrdUT qYuYux M@ gy _@Azq%w%Fb\\t<4V5:c.׈WRd'tYrXirJR<#4Hk³BGTC2L͏Qsr)4ϖuQiuTYInAU!hU19fI 'e:YK,PKRJ"H44byteFloat.sdatUT qYuYux k?|n@QsF38`S@øՁqug/!"PKRJoLE4byteFloat.mgrdUT qYuYux mS[o0^+_!nbl#D@4mQdIY ϰdT?wFMyWl UGeU{yvjꢻ`:i\˰ $IQf.HEˣX@/q0xiIvg~ǰm}26#Te LQGp tLQlc>xϔa)i}k,YQN]F=s\Sչbzss\sAI5GeIJ@3fgZXK{Tr:1S+ҷ"CyQCu= (*zN,9Spn$]EO!-4%]G󎂉 k))85_2;Q<Ǣ +I&kO0e[Lu";"2%)7#>";#1 &)8"=#;#1!"A"3-,&9"=#;#1"!CQ"=#<"1#"CQ"<#=#0$#AQ#<#=$/%#T#<#>#/&$S$<"?$.'#T#="$-( $4D@0$="$-) %5@3@G$>"$,* $6@4@@.$?"#,+ $7@4@2B2@0A2@1@1@1@0A'$@"",, #8@4@1@2@1@2@0A1@1@1@2@!)@"#+- "9@4@4A1@2@0@0@0@1@1@2@ )A"#+. "9@4@1A1@1@2@0@0A2@1@2@(B#"+/ "9@3@2@2@1@2A1A2@1@2@%F##*0 "9D4A0A0@3@1A2@1@2@$F##*1$M##=$#*2'L#%<#"*3'M#&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@@@BA@@@|$2&FAA@A@@@@}W$@,@@@@@@A@@}XAA+@@@@@@A@@@}Y C(@@AA@@@@@@}ZO@@CCAA@A|[p\p]p^p_p`p $(,048<@GNU\enw$7Nat"7Kb>Pbt(=Um  ( > U j }  0 @ P ` p   + ? S g z    $ . 8 B L V ` j t ~  + 6 A L W b m x (5@KXcny $1BQ`o~%0;FQ\gr}*7DQ^kx*7K]q"ALWco{ !,7BMXcny +=N_p2Tv&=Tk:]DFe%?Zv0d  +6ALWk?l)9FUcq}    % - 5 = E M U b o !!;!]!!!!""6"W"|"""""""""""##<#k#$$h$%$%%&B&_&&&&&&&&&gdalautotest-3.1.2/gdrivers/data/bug636.nc0000664000175000017500000010341413701057753017002 0ustar evenevenCDF  longitudelatitude@  file_nameecham3_0fix_tas_va_map model_nameecham3.6T42L19 experiment,Present-Day Simulation with Prescribed SST's  longitude unitsdegreestitle Longitude long_name LONGITUDE latitude unitsdegreestitleLatitude long_nameLATITUDE tas unitsC stat_name$Interannual Variance of Annual Means missing_valueDx@ valid_minqƧ valid_maxp/wmean_valq $/ mean_absval@q $/ warning_flag missing_counttitleSurface Air TemperaturesourceXPMIP Present-Day 10-Year Simulation with Prescribed SST's from the echam3.6T42L19 modelnotes2-meter screen temperature @3@A A4A`AAAA~AABB?}BB(B4B??}BJBUBaBl?}BwB`BBBB@BBBBBB`BBBB@BBBʀBBB`BBB柾B@BBBBC`C0!CC C Cp!C@CCC!CC OC# C%!C(C+C.`C10!C4C6C9C5È>VÈwÈ<)È<È>È?\È<È7 È.VÈ#3ÈLÈ ÇjÇÇÇÇÇ ÇÇÇ}ÇÇÇÇyÇÇÇÇÇÇ7È È ÈÈÈ\È"È%È&È(sÈ)È+È-È.È0BÈ0È2È33È7È<È@ÈBoÈD{ÈBÈ=È7 È/È(sÈ!'ÈsÈ'È ÈÈÇÇ#ÇÇÇÇ\È'ÈÈÈRÈ È Ç`ÇÇÈÈÈÈ`ÈÈ /ÇjÈfÇNÇÇÇÇ}Ç7ÇÇ/Ç}ÇÇÇÇÈÇFÇÇÇÇÇÇÇÇϞÇÇhÇÈÈhÇÈÈÈ$È.wÈQhÈVÈXsÈXÈVfÈRÈNÈJÈHsÈHÈIÈMqÈQhÈRÈOÈF%È6È$È Ç\Ç ÇÇ ÇÇÇ%ÇÇÇwÇ-ÇTÇZÇÇÇÇ}ÇÇÇÇ}ÈÈ ÈhÈ?ÈÈÈÈ È È`ÈÈsÈÈ!È0È1È3È6È:È=È=È:È6È0BÈ(È ÈÈÈÇjÇ9ÇÇÇ`ÇÇRÇPÇHÇÇFÇÇÈÈÈwÈÈ1Ç-ÇmÇÈÈ È/ÈRÈÈ ÈÇRÇÇPÇÇ1ÇÇRÇÇÈ9ÈÈ jÇ{ÇÇZÇÇÇÇÇÇÇÇLÈ+È =ÈÈÈ !È/\È@ÈIÈbÈcÈa'È[DÈS3ÈIÈ)XÈ#È7ÈÈÈ ÈÈÈ6È*ÈfÈoÇÇ!ÇÇÇÇ{ÇÇ5ÇÇٺÇÇ^Ç}ÇÇÇÈHÈÈ ÈÈÈdÈ$È)È.5È0È+È*È*È%`ÈÈÈÈ ÈÈ 7È ÈÈdÈ'mÈ/È0È,È+È!ÈÈ'È)ÈÈÇVÇÇjÇÇÇÇLÇdÇÇÇÇwÇÇRÇÇoÇ^ÇÇJÇÇRÇ}ÇÇ7ÈÇÈbÇÇÇJÇÇÇ/ÇfÇ;ÇÇޘÇÈbÈ ÈÈ1ÇÇÇDÇÇ9ÇŢÇ+ÈÇ\ÈTÈÈ*È<ÈDÈMÈU`È[È`bÈkdÈhÈ`ÈV%ÈJÈ7È-qÈ}È%È ÈÈÈNÈÇJÇÇÇۦÇθÇŢÇÇ?ÇFÇȴÇ͑ÇfÇߞÇÇÈ!È ÈÈÈÈÈ?ÈÈÈÈ(È0È;È:È49È0È5?È.È$ÈÈ PÈÈÈ ÈÈÈÈ.wÈ4È:È5È%`ÈÈ =È È dÈ!hÈ\È ÈuÇÇӖÇ\ÇNÇ!ÇBÇÇXÇÇÇÇÇHÇ%ÇÇɺÇϞÇÇÇևÇ+Ç׍Ç1ÇyÇÇÇ;Ç!ÇÇÇÇÇÇ^ÇщÇ5ÇÈ9ÈÈÈÇÇmÇÇqÇÈ"NÈ.È7+ÈMÈRNÈR-ÈF%ÈLÈ^Èd9ÈhÈk#ÈlÈkdÈcÈVÈCuÈ4È0bÈ,È?\È$ÈRÈÇÇÇÇÇÇÇÇÇ^ÇÇÇÇ/ÇÇLÇÈÈ ÈÈÈ!È#È bÈ ÈÈÈ1ÈyÈ"È0È2È.wÈ&%È%È!È(È'LÈÈÈÈ PÈ È È /ÈÈÈ È&È,JÈ0È)È*È)È6È.È$9ÈÈ-ÇÇɚÇÇ7Ç°ÇÇÇÇÇÇÇ̬Ç'ÇբÇ)ÇÇÇ1Ç׍Ç ÇuÇÇÇÇjÇTÇÈ È ÈVÈ}È#ÈoÈÇÇ;ÈÈuÈ%?È9XÈ>È>wÈ4È6FÈFÈW ÈaÈeÈdÈdÈe`ÈfÈiÈkÈmPÈmPÈmqÈmÈmÈg+ÈaÈHsÈ>5È1È/È.VÈNwÈB-È!HÈ ÈÇÇ=ÇÇfÇÇÇÇÇÇÇÇÈÈ È È /È'ÈoÈÈdÈ"-È%È(RÈ&fÈ$ZÈ&È(1È*È.È.wÈ)È&È!È bÈ"È)XÈ)È(1ÈVÈÈÈJÈ È${È)È/}È8ÈEÈO;ÈWLÈZÈWÈNÈ8RÈ'LÈÈ5ÈÈÇÇJÇÈPÈ2ÈAÈEÈ:=È1È'È7È ÇqÇÇRÇÇѪÇ\ÇÇXÇ{Ç^ÇsÇjÈÈ ÈÈ)È0BÈ/;ÈÈ ÇÈ DÈÈÈ7+ÈJÈTÈYÈ]ÈcÈj^ÈpBÈqhÈoÈmqÈlÈmÈqhÈuÈwLÈtÈoÈj^ÈgÈgÈdÈhsÈe`È]ÈU`È@!ÈRNÈL)È*ÈÈ3È È ÈmÈÇÇÇhÇÇyÇÇÇÇÇÇÇÈÈLÈ ÈLÈ#TÈ'È0È;È<È4È.È*È(È%È&fÈ' È-È&ÈÈ+È'È8RÈ:ÈIÈO\ÈQÈRoÈPÈNÈHÈMÈVÈ_ÈgÈlÈmPÈjÈcÈZÈQÈJÈEÈ@È@BÈ?ÈAÈHÈRÈ]ÈfÈljÈlÈffÈYÈBoÈ0BÈ!È-È ÇPÇÇÇJÇZÇÇ+ÇÇÇÈ^ÈjÈÈ"È' ÈÈ ÈbÈ È È"NÈ.VÈJÈWÈ_ÈdÈi7ÈlÈmÈnÈnÈnwÈoÈqÈtÈw ÈwÈtÈiÈ^ÈFÈD{ÈcÈh1Èd{È?}È4ÈLJÈ*È)XÈ&ÈdÈ9ÈoÈ5ÈFÇ=ÇÇÇÇÇ=ÇDÇÇÇÇÇÇÇÇÈ È"È3TÈÈ8È.È.5È7+È2È,È)È/È4{È5È-È"ÈÈÈ%ÈAÈLÈS3ÈTÈRNÈZ=È\jÈYyÈUÈcÈlÈsÈw Èw ÈvFÈtÈqÈnÈk#ÈgÈdÈbÈcÈdÈfÈiXÈlÈpÈt{ÈvÈuÈoÈb-ÈPBÈ>È2È)È)yÈ}ÇÇNÇÇ7ÇÇÇÇÈ ÈÈbÈÈ#È$È bÈÈÈÈÈ"È6%ÈSÈ`!ÈgmÈkDÈlÈmÈo;Èp!ÈpÈqÈqhÈrNÈsÈtZÈpÈfÈJÈUÈ<)È2ÈUÈ*È(È&ÈÈ&FÈ,È.È/\ÈqÈÈÈ9Ç?ÇÇÇVÇÇÇ9ÈÈÇÇ}ÇÇÇÇÈÈ0È@ÈJÈGÈHÈ@ÈCÈ49È>5ÈCTÈ4È-È)7È1È2oÈ,È!hÈÈFÈ/\ÈAÈJÈNÈMÈ]ÈeÈhÈhsÈi7ÈmÈsÈvÈvÈuÈu`ÈwmÈxÈw ÈsÈpÈpBÈpÈpbÈpBÈpbÈqÈt{ÈwÈy7ÈwmÈtÈo;ÈeÈXsÈPÈ>È1hÈ%?ÈÈÇ ÇÇ7ÈÈÈÈTÈ7ÈÈ!È#È%È&%È)È/}È6È5È5ÈAÈTÈfÈl)ÈmPÈn5ÈpBÈrNÈr ÈqÈq'ÈrÈrÈr ÈrÈrÈnÈgÈ`bÈ<È BÈfÈÈ/È>ÈBÈ=PÈAÈDÈ8È*=È BÈsÈ ÇÇ;ÇbÇÇÇRÇÇqÇÇ)ÇÇÈÈÈsÈLÈ+#ÈD{ÈJ^ÈAÈ@ÈDÈEÈKÈG È>VÈ6È+È+È#TÈ-È5È3È&%ÈÈ)ÈM/ÈO}ÈTÈ[Èe`ÈmPÈoÈnÈnwÈpÈsÈuÈvÈuÈvÈxÈzÈz^ÈyÈx1ÈvÈtÈsÈsÈsÈuÈw+ÈwÈwÈwLÈu`ÈsuÈsÈiÈL)È>wÈ;È81È1È%ÈÈÈHÈBÈ ^ÈÈ.ÈAÈ8È4{È.È+DÈ)È0BÈ;ÈMÈ[È^ÈW+ÈdÈpÈsuÈpÈlÈlÈn5Èo;ÈpÈrÈvÈw+ÈtÈt{ÈuÈsÈqÈl)È_;È1È)È2ÈAhÈHÈGmÈ>È81È8È8sÈ;ÈPÈ@!ÈBÈÈÈsÈ'È<ÈÇ5ÇÇÇ+ÈÈÈÈÈ/È#ÈwÈ*È=/ÈFFÈXÈOÈ\ÈWÈGÈ1È!'È$È"ÈÈ$ÈÈ%È)È!'ÈLÈZ=È]Èa'ÈhÈpÈsÈsÈt9ÈvfÈxÈxÈxRÈxÈy7ÈyÈyÈxÈvÈvÈw+ÈvÈuÈsÈroÈsÈuÈuÈvÈw ÈvÈt{Èr-Èu`ÈnÈHÈ9È=ÈNÈNÈ5`È+È BÈÈÈÈÈ%È.È.VÈ1È3È6fÈ0bÈ2È>ÈQ'È`ÈiÈmÈqÈvÈv%ÈpÈiÈhÈljÈnÈqÈtÈwÈxsÈw ÈtÈsÈr ÈqÈn5Èa'ÈKdÈPÈ`Èc3È^wÈ^ÈB È/;È%È#È&%ÈKÈQÈJ=È9XÈÈ1HÈVÈSuÈ3TÈÈÈÈÈ{È dÈ(È33È3È.È1È;DÈL)ÈTÈXÈ_}Èb ÈYXÈOÈJ=È7ÈLÈ XÈÈ jÈÈÈÈMÈZÈc3ÈTÈiyÈl)ÈpBÈqÈqÈr ÈsÈu?ÈvFÈvÈvÈwmÈxÈwÈvÈtÈs3ÈqÈqhÈqÈqÈqÈsÈu?ÈuÈwmÈxÈwÈsTÈn5Èq'ÈmÈ@BÈ-È5ÈCÈ@È4{È+DÈ-/È*È!'ÈXÈÈ+ÈSÈ#È+È/È97È9È<ÈQÈ\ÈeÈiÈkÈmÈpBÈm/Èe?ÈdÈiÈoÈrÈtZÈu?ÈvfÈwÈw ÈtÈrÈpÈlJÈSTÈQhÈOÈbÈkÈtZÈtÈo;ÈbÈSÈ2-È9ÈHÈÈ'È =È ÈfÈ,)ÈNÈUÈ=È$È9ÈÈÈÈ DÈÈÈ0È4È9ÈÈ[DÈ`ÈdÈfÈeÈdZÈdZÈe`Èf%ÈeÈd9ÈhÈpbÈu?ÈvÈuÈuÈuÈwÈxsÈuÈt9ÈmÈJÈK#ÈPÈeÈ]ÈaÈkÈp!ÈpÈoÈfÈCuÈQ'È"NÈ;ÈÈ #ÈsÈÈ*=ÈLÈ[dÈW+È@È-ÈÈ ÈÈ È"oÈ+È+È,)È1hÈ0È#uÈÈ"È3È>ÈHÈGÈEÈ/ÈÈ!ÈXÈ\ÈJ=È`ÈiXÈiÈdÈ\JÈjÈo;ÈnÈlÈlÈlÈlÈlÈp!ÈroÈrÈrÈr ÈpÈpÈqhÈqHÈo\ÈnVÈo;ÈroÈuÈvÈxRÈwÈwmÈvÈsÈtÈvfÈu?Èw+ÈyÈlÈ<)È.5È*È)È0BÈBÈ?\È!ÈÈmÈBÈÈ=ÈPÈ'È/È^5ÈeÈf%ÈhsÈiÈiÈiÈhÈiÈkÈlJÈm/ÈpÈtÈuÈtÈuÈvÈxRÈxÈxÈv%ÈuÈoÈdÈBÈWÈ<)È+È-qÈ8È^ÈgÈmPÈmÈkÈgÈaÈWLÈFÈ+È'È7ÈKDÈSÈ\jÈVÈHÈ<È.È)XÈ'È<)È6È&ÈÈ${È È È$ÈÈ È#3È5ÈMPÈi7ÈkÈbÈkÈqÈrÈcTÈ;DÈ,È4ÈFÈUÈY7ÈPbÈFfÈ@bÈ;È;È;È=/È:È/È3ÈÈ.È=È+È@È+È-ÈBÈIXÈ/;È(È\ÈÈ-È3uÈlÈpÈl)ÈljÈn5Èm/ÈoÈsÈsÈqÈpÈsTÈt9ÈtÈuÈwÈvÈtÈsTÈrÈtÈvfÈwÈvÈtÈsÈsÈsÈuÈvÈvÈyÈz=ÈxRÈtÈtÈwÈz^ÈyÈxsÈxRÈqhÈaÈ%ÈXÈ.ÈF%ÈC3È,È1ÇÇÈÈdÈ"ÈÈJÈbNÈl)ÈoÈqÈu?ÈwÈxsÈwÈwLÈw ÈvÈvÈvÈvÈwÈyXÈxRÈw+Èw ÈvfÈxÈvFÈvÈuÈ\ÈLÈ@È,È1'È4È6ÈAÈMÈR ÈVÈ[ÈcuÈfÈbÈNÈ6È-È:ÈLÈYÈ[ÈJ=È=qÈ6È4È4ZÈVÈHRÈKdÈSuÈkÈbÈGÈ>5È?\ÈH1ÈE?È<È.5ÈÈÈ*=È<ÈU`ÈLÈ=È:ÈB-ÈKdÈF%È`Ç)È?È!hÈDÈjÈt9ÈtÈrÈwÈxÈvÈuÈsÈrÈqÈqHÈr ÈsÈvÈw+ÈvÈxRÈyXÈxÈxÈxsÈwÈxÈyÈwLÈuÈu`ÈvFÈwÈyÈ|È{ÈzÈyÈxÈyÈzÈyÈwÈwÈ{#ÈzÈvFÈnÈfFÈ[#ÈCuÈ/ÇÇ5ÈYÈp!ÈgÈaÈ_;ÈPÈkÈs3ÈsÈsÈuÈvÈy7ÈwÈu`ÈwLÈxÈxsÈxRÈyÈzÈyÈzÈzÈ{dÈ|ÈzÈy7ÈuÈpÈLjÈ9È7È?}ÈR ÈKÈ2-È,jÈ7ÈEÈGÈ@!È;dÈ?ÈIÈFÈ>ÈQÈJ=ÈK#ÈHÈLÈOÈSÈW ÈaÈgLÈjÈgLÈRÈ&È3È-ÈKdÈR-È\jÈHÈ/}È3ÈBÈAÈ@ÈÈÈ'ÈFÈpÈx1ÈuÈtZÈt{ÈwÈxÈvÈvÈvÈuÈtÈrÈsÈu?Èx1ÈyyÈy7ÈzÈ{ÈyÈyÈyÈxÈxÈyyÈxÈw+ÈwÈxsÈyXÈz=È{È{#ÈzÈyÈyÈyXÈz^ÈyÈw+ÈxRÈyÈxÈvÈxÈqÈfÈZÈ5ÈuÈ)ÈkÈo;ÈpÈlÈo}Èo;ÈpÈqÈrÈsuÈuÈwÈyÈyyÈvÈxÈzÈyÈyyÈxÈw ÈxÈyÈyyÈxÈzÈ{ÈwÈtÈYÈ@È5È6ÈEÈN5ÈH1È;È+#È(È<ÈD9ÈDÈ>È>wÈ<È=È@ÈLjÈ\ÈIXÈ@BÈCÈKdÈTZÈ`bÈrÈuÈwÈpÈqhÈCuÈ7ÈHÈU?È]ÈsÈljÈRÈKdÈ9È9È?;È8È`ÈlÈtÈyÈuÈsÈsTÈuÈvFÈuÈvÈwÈxsÈwÈuÈtÈu?ÈuÈvÈxsÈz=È{È|)ÈzÈ{DÈ{Èz=ÈyXÈyÈyÈyXÈyÈ{È{DÈzÈzÈzÈyÈyÈyÈxÈy7ÈyÈxÈxRÈwmÈu?ÈrÈsÈvÈo;ÈcÈ7È*^È6ÈbÈuÈt{ÈsÈw ÈvÈsÈuÈuÈu`ÈvÈxRÈyÈyÈyÈy7ÈzÈ{È{ÈzÈxÈyXÈz=ÈzÈzÈ{#È|Èw+ÈtÈIXÈ.È,È8RÈDÈFfÈMPÈIÈ97È)È5?È@ÈNÈNÈCTÈÈ.5È49ÈKÈ?ÈC3È^ÈpÈwÈvFÈtÈv%ÈtZÈtÈhÈ@bÈ%?ÈXÈjÈqÈo;ÈpBÈ`È3È8È@ÈGÈmqÈqÈrÈsÈcÈwÈvfÈuÈvFÈwLÈyÈyXÈxÈy7Èz^ÈxÈwmÈyXÈzÈyÈyXÈzÈzÈyÈzÈz^ÈyXÈxÈyÈ{È{È{È{È{#ÈzÈ{DÈ|Èz^ÈyÈyÈxÈuÈu`ÈuÈtÈsÈqÈo\ÈoÈsÈt9ÈpÈu`ÈtÈpÈc3ÈF%È@ÈZÈ[dÈsÈyÈyXÈxÈvFÈuÈwÈz=ÈzÈ{DÈ{È|ÈxÈzÈ|È{DÈyÈyyÈzÈ{DÈ{Èz^ÈrÈkDÈFÈ3È+È"È/\ÈJÈ<È@ÈMÈ;È=ÈE`ÈG+ÈHsÈGÈG+ÈCÈ9È+È0BÈ:ÈPÈcÈsÈsTÈu`Èv%ÈuÈwmÈtÈu`ÈrÈAÈ(RÈ`Ès3Èu?ÈtÈo;ÈtÈj^È_;ÈKdÈHÈsÈqÈt9Èt{ÈsÈsÈpÈrÈvÈyÈyÈyÈyÈ{DÈ{Èz=ÈyÈyyÈxÈyÈzÈz=ÈyÈyÈzÈyyÈxÈxÈxÈzÈzÈ{DÈzÈzÈ{#È{#È{ÈzÈyÈyÈyÈx1Èx1ÈwÈwÈxRÈxÈw ÈvÈx1Èz=ÈuÈu`Èw ÈvÈw ÈlÈhÈmÈfÈwÈwÈxRÈvÈuÈqÈrÈuÈzÈyÈzÈ|)È{È{dÈ|È|È{dÈzÈ{È}qÈ|)Èz^ÈuÈsÈ_ÈEÈ@È81ÈCÈMPÈLÈJÈLJÈ?È>ÈJ^ÈTÈUÈXsÈM/È<ÈRÈNÈ7+È49È;DÈPÈf%ÈwLÈyXÈwÈvÈyÈwÈuÈz=ÈfÈDÈlÈwLÈw+ÈuÈvFÈvÈr ÈqhÈqÈt{ÈxÈuÈwÈvÈsÈsÈs3ÈtÈwÈxÈxÈyÈzÈz^ÈxÈyÈ|È{ÈxÈzÈ|JÈ{ÈzÈ{dÈz^ÈyÈyXÈyÈyÈyÈz^È{ÈzÈ{DÈ{DÈyÈyÈz^ÈyÈyÈxÈxÈyÈxÈyXÈ{dÈ|ÈzÈ{dÈ|JÈzÈxÈwLÈw+ÈvÈu`ÈtÈvfÈnÈXÈt9ÈvÈq'È\ÈMÈHRÈMÈQÈsuÈuÈuÈzÈzÈ|È}/È{È~5È|ÈyÈ|JÈ}qÈ{DÈ{#Èu?ÈvÈdÈaÈZ^ÈUÈeÈbÈ_}È\ÈZ^ÈU`ÈUÈ[ÈUÈ]ÈVÈJÈBÈQ'È;ÈSTÈU`ÈZÈvÈyyÈzÈyyÈyÈz^ÈzÈyÈv%ÈyÈu?ÈzÈvÈrÈrÈvÈx1ÈvÈt9ÈtZÈtÈsÈv%ÈuÈu`ÈwLÈz=ÈxÈvÈw+Èw ÈwÈxsÈyÈyyÈxÈyXÈzÈ{È|jÈ{ÈzÈzÈ|È{È{È{È{ÈzÈyÈzÈ{#ÈzÈz^ÈzÈ{DÈzÈzÈzÈzÈz^ÈzÈyÈxÈxÈy7Èz^ÈzÈyÈzÈ|)È|JÈzÈ{DÈ{#Èz=È{ÈzÈxÈvfÈp!ÈyÈuÈm/ÈSTÈG+ÈC3ÈÈ!ÈÈBNÈiÈvFÈ|È|È|È{È|È{È|JÈzÈz^È{#Èz^ÈzÈ|)ÈzÈyÈyÈxÈ{#ÈxsÈ{ÈqhÈgÈZÈVÈUÈQÈPÈ+È7mÈSÈ[ÈpÈtÈtÈyÈxÈxÈyÈ{DÈyÈxÈwLÈyÈy7ÈwÈwÈwÈxÈxÈyÈxÈwÈqÈt{Èz=È{DÈtZÈvÈkÈbÈrÈyyÈxÈxsÈwmÈvÈvÈvÈvÈvFÈxÈz^È{ÈyyÈzÈ{ÈyyÈy7ÈyÈyÈxÈwÈxRÈz=Èy7ÈwÈxÈxÈx1ÈxRÈxRÈxÈz^ÈzÈyÈz=ÈzÈz=Èy7ÈxÈxÈyyÈz^ÈyÈy7ÈzÈzÈyÈzÈ|JÈ{DÈ|jÈ{È|ÈvfÈxÈ^5ÈQÈT{ÈkÈ^ÈQÈ;#È4ZÈ:=ÈQÈfÈo}ÈwLÈvÈwLÈzÈzÈ}/È}/È|È{Èz=È{È{ÈyÈy7È{È{#È{DÈyÈ{ÈvfÈwmÈljÈkÈaHÈYÈWLÈGÈ5È)ÈUÈdÈtÈy7ÈzÈyÈz=ÈzÈ{#ÈzÈyÈxÈwÈxÈzÈ|È{#Èz=ÈxsÈxÈzÈzÈzÈxRÈuÈz^ÈzÈ{È|ÈkÈTÈt9ÈwmÈw+ÈxÈyXÈsuÈtÈroÈzÈxÈvÈzÈ|)È{DÈ{#È{#ÈzÈyÈzÈy7ÈxsÈxÈy7ÈxÈxsÈyÈyyÈyÈyXÈyXÈyÈyÈyÈyÈyÈzÈ{È{dÈ{DÈ|È{ÈzÈzÈzÈzÈ{È{È{DÈ{È}PÈ|)È{ÈzÈ{dÈuÈuÈ_ÈL)ÈP!È\jÈ_ÈNwÈMPÈTÈUÈSÈVfÈVÈR-È_ÈhÈtÈ{#ÈzÈ}È~5È|jÈ|jÈ|È}È{DÈyÈz=ÈzÈ|)È{È{È|jÈv%È]ÈYÈaÈ\ÈXÈG È3TÈ'LÈ1'ÈiÈwÈxsÈzÈ{#È{dÈ{DÈ{DÈzÈz^ÈyyÈxÈzÈzÈz=ÈzÈz^ÈxÈx1ÈyXÈz=È{#È|È|)È{#Èy7Èy7Èz=Èy7ÈuÈyÈxRÈz=ÈzÈzÈz=ÈvÈtÈuÈyÈwÈwÈyyÈyÈzÈzÈzÈ{#ÈyÈxRÈyÈzÈyÈxsÈyÈ{dÈ{ÈzÈzÈz^ÈzÈzÈzÈz=ÈzÈzÈzÈ{È{#È{È|È|JÈ{È|JÈ|È{dÈ|jÈ{È{È{Èz^È{#È{dÈ|ÈxRÈuÈVÈQÈSÈUÈb È]È[#È[ÈYyÈYÈVÈFÈCÈLÈVÈ[ÈyÈz=È{È|JÈ}/È|jÈ{È{dÈ|È{È|)ÈzÈ{dÈ|)ÈwÈxÈrÈcÈRÈNÈ^ÈZÈPÈAÈ)ÈÈ+Èr-ÈyÈzÈyÈxÈxÈxRÈvFÈxÈyÈyÈz^È{ÈzÈzÈ{dÈyyÈyyÈ{dÈ{È|JÈz=ÈzÈzÈzÈ{ÈxÈwLÈw+Èu`ÈuÈyXÈsÈrÈv%Èw+ÈyÈvÈy7ÈxÈxÈzÈzÈyÈ{ÈyÈyÈyÈyÈ{#È|jÈ{ÈzÈ{È{ÈzÈzÈz^ÈyÈyÈzÈyÈyyÈ{È{DÈ{#È{È{È{È|È|È|È}qÈ|È|È|)È|JÈ|È|È{ÈyyÈ|È}ÈxÈxRÈmÈ_È\)ÈKdÈQÈ]Èd9ÈYÈPbÈRÈTÈJÈ.wÈ1È8RÈLÈx1È{dÈ{È{È|È}PÈ{È|)È{È|JÈ{ÈyÈ{dÈ}PÈxÈx1Ès3È_È:ÈMÈfFÈkÈh1ÈXRÈ5ÈÈ)ÈqhÈvÈvÈzÈx1Èz=Èy7Èw ÈyÈyyÈwÈyÈzÈxÈxÈyÈwÈxÈ{È{Èx1ÈwÈy7ÈyÈzÈ{È{ÈyÈuÈx1ÈoÈd{ÈO\ÈSTÈqÈtÈvÈxÈw+ÈwÈxÈ{È|ÈzÈz=ÈyyÈyyÈyÈyÈzÈ{dÈzÈzÈzÈyyÈyXÈyÈxsÈxÈyÈyÈyyÈyÈzÈ{DÈ{È|È|JÈ|È|jÈ{È|jÈ|È|È|È|È|)È|)È}È}PÈzÈ|JÈ|jÈzÈx1ÈqÈQÈSÈPbÈCÈ5?ÈGmÈMÈKDÈLJÈOÈO;ÈCÈ:È6fÈkDÈyÈ|)È{È|È|È}/È|È|È|È}PÈ}ÈzÈy7È|Èy7ÈvÈqÈUÈ;dÈPÈ[È]È[dÈ[DÈAÈ"È81ÈpÈrNÈ\ÈxÈxÈ{È|È|)È}PÈ|ÈyÈ{dÈzÈwÈwmÈxÈx1ÈxÈzÈy7ÈwÈwÈxsÈxÈyXÈyyÈvÈpÈxÈ`È=È=PÈ@ÈBoÈ\ÈbÈ^VÈwÈvÈxÈxÈz=ÈzÈzÈxÈxÈyÈyÈyÈz^ÈyÈyyÈz=ÈzÈyÈyXÈy7ÈxÈxÈyXÈyÈzÈ{È{#È{È|)È{È{#È{È{È{È|JÈ{ÈzÈ{dÈ|È{È{È|È{È{È{dÈ|Èy7ÈyÈyÈnÈ\jÈ^ÈPÈ5ÈqÈ6fÈHsÈKÈB-È=qÈ?}È@BÈM/ÈwLÈw+È{dÈ{È|jÈ}È|jÈ|È|È|)È{DÈ{dÈzÈ{dÈzÈzÈs3ÈsuÈZÈNÈYÈQÈRoÈT{ÈYÈUÈ@ÈjÈtÈe`Èd{ÈxÈwÈ{#È}PÈ}È|È{ÈzÈ{È{DÈyXÈyÈzÈyÈzÈ{ÈzÈzÈz^Èz^Èy7ÈvÈqÈjÈh1ÈYÈ'LÈ\È1ÈCTÈHÈ=È<ÈHÈmPÈwmÈwmÈxÈxÈyÈzÈyXÈwÈwÈxsÈxÈyÈxsÈwÈxRÈyÈxÈxÈyÈxÈxsÈxsÈyÈzÈz^ÈyÈ|JÈ|JÈzÈyÈyXÈyÈzÈzÈyÈyÈ{#È{ÈzÈ|JÈ{#ÈyÈ{DÈ{È|JÈzÈyÈuÈvÈpBÈ_;ÈgÈVfÈÈ\È:=ÈGÈ3È%È" È4ÈkdÈwÈyÈ{dÈ|È{È|È|JÈ|È|)È{DÈ{È{#È{È{È{ÈzÈtÈo}ÈNÈE`ÈUÈGÈ8RÈ?}ÈJÈ[ÈtÈxÈqhÈ]qÈ`Èz=ÈwÈzÈ|È{DÈ|JÈ|È{ÈzÈyÈy7ÈyÈyÈxÈyyÈyÈyÈyXÈ{È{dÈyÈtÈmÈ\È2NÈÇÈÈ.VÈGmÈMÈFÈ7È<ÈPÈkÈwÈzÈxRÈwÈyXÈyÈwÈwÈxÈxÈxsÈx1ÈxRÈyÈyÈy7ÈxRÈwÈxsÈxÈxÈxÈx1ÈwÈyXÈ{DÈz^ÈyXÈy7Èy7ÈyÈyyÈz^È|È|)È|È{dÈzÈ}PÈ}PÈzÈ{dÈ|JÈ|)Èy7Èw ÈzÈrÈnÈjÈa'ÈRÈÇÈ" ÈCÈB È=È2È<ÈrÈxRÈy7ÈyÈ{DÈ{È~È}È|È|È|È|jÈ|È|JÈxÈz=ÈzÈvÈo}ÈrÈ@ÈLÈPbÈ+dÈ/ÈBÈQÈsÈxÈoÈZÈlÈyXÈzÈxÈ{È{#È{#ÈzÈyÈxÈw ÈvÈwÈwÈvÈwÈxÈxÈyÈyÈzÈxÈsÈk#È:ÈPÈÇÇÈÈ1È5`È9È;#È6%È<)ÈLJÈiyÈvÈwmÈv%ÈwÈxÈwÈxsÈxÈxsÈwÈwÈxÈxRÈxÈyÈyÈxÈyÈyÈxÈxÈx1ÈwLÈwÈxÈxÈwÈw ÈvÈwLÈw+ÈxRÈzÈyÈz=È{È{È{È{ÈzÈ|È{DÈy7È{ÈxÈ{Èr ÈlÈaHÈZÈK#ÈÇmÈÈ4ÈBÈTÈjÈmÈzÈwÈvÈyÈ{DÈ{ÈzÈyXÈ{È|È|È{#Èz=ÈyÈyÈzÈ{ÈxÈsÈuÈPÈ0ÈEÈFÈMPÈ_ÈtÈ{ÈyXÈu?ÈqÈsÈvfÈwÈwÈz^Èz=ÈyÈwÈv%ÈvÈw+ÈvÈwÈwÈw ÈxsÈyXÈyXÈyXÈzÈ{DÈxÈsÈiÈ8È"NÈÈÈVÈ ÈDÈ%È0!È2È-/È%`È1hÈQÈrÈuÈuÈwLÈw ÈvÈxÈyXÈx1ÈxÈy7ÈyÈvÈuÈxÈyÈyXÈx1ÈvÈvÈwÈyÈxÈxÈxsÈxRÈwÈvÈuÈuÈvÈxÈzÈzÈz=È{#È{ÈyÈyÈyÈyÈ{Èy7Èy7ÈxÈxÈsÈg+ÈVÈTÈJÈÈ jÈ(RÈ=qÈD9ÈlÈt{ÈuÈxÈwÈv%ÈxRÈz=ÈyÈvÈtZÈuÈwÈyyÈyXÈ|)ÈzÈyÈz^ÈyXÈuÈvÈv%ÈXÈ@È-ÈVÈbNÈkdÈwLÈxÈxÈwÈw ÈvFÈw Èx1ÈxÈyÈyÈxÈvÈuÈw ÈwLÈuÈuÈw ÈwmÈxRÈxÈxÈyXÈzÈyÈz^ÈvfÈo;ÈYÈEÈ:È1'È3È5ÈB È@BÈ>È7+È(ÈÈ(sÈNÈtÈvÈuÈvfÈvÈwÈyXÈyÈyÈzÈyÈyyÈyXÈyÈz=Èz^ÈyÈyÈz^Èz=È{ÈzÈxÈxÈwÈvÈvÈuÈtÈtZÈu`ÈwÈyXÈzÈz^ÈzÈyÈyÈxÈw ÈxÈzÈwÈxÈz^ÈwÈvÈfÈ\JÈVÈ1ÈfÈÈÈ9ÈBNÈmÈp!ÈsÈxsÈxÈu`ÈvfÈvÈvÈt9ÈsTÈsÈsTÈuÈxsÈzÈxÈyXÈyÈyyÈwmÈzÈuÈsTÈZ=ÈU?ÈaÈpÈwmÈzÈ{ÈzÈzÈz=ÈwÈvÈwÈxÈwÈvÈw ÈxÈxÈxRÈwÈuÈuÈvFÈw ÈwÈxÈyyÈ{#È{Èy7ÈyXÈ{#ÈtÈqÈ]ÈRoÈPÈTZÈmÈpÈVFÈO\È?\È.È!HÈ,ÈG ÈvfÈu`ÈsÈu`Èw+ÈxÈyÈzÈyÈxÈvÈvÈyÈ{È|È|jÈ{È|È{dÈzÈ{ÈyyÈw Èw Èv%ÈtÈsTÈsÈt9ÈsÈtÈvÈy7ÈxÈwÈxÈyÈxÈwmÈtÈvfÈxÈxÈwÈxÈwÈu`ÈgÈh1ÈUÈ(È}ÈqÈ%È=ÈmÈqÈpbÈtÈxÈwÈuÈuÈu?ÈtÈqhÈq'ÈsÈu?ÈtÈvÈxÈxÈvÈwLÈwLÈwmÈvÈvFÈt{ÈrÈrÈtÈvÈxÈ|È{ÈxsÈwÈwÈwmÈx1ÈxÈx1ÈvFÈuÈvÈxÈy7ÈxÈxÈyXÈy7ÈxRÈwmÈwÈxsÈwÈwÈwÈwÈxÈyÈwÈt{ÈroÈpÈqÈtÈu?ÈtZÈt9Èm/ÈNwÈHRÈAÈ@ÈeÈtÈrÈsTÈvÈwÈxRÈyÈxÈxÈvÈuÈu?ÈvFÈvfÈvÈyyÈ{È{DÈyÈxÈyÈwÈw+ÈwLÈuÈrÈr-Èt{ÈuÈsÈtÈwLÈxÈxRÈwÈxÈxsÈvÈuÈsÈu`ÈxRÈxÈwLÈuÈwÈvÈi7È^ÈO}È/È-È6ÈNVÈrÈyXÈsÈtZÈtÈvFÈvfÈtÈsÈsÈsTÈqHÈqÈrÈtZÈsuÈsÈuÈw+ÈtÈtÈvÈwÈw+Èv%ÈvfÈwLÈwmÈwmÈwÈyÈ{ÈyÈwÈvÈvFÈv%Èw ÈwÈwÈw ÈvÈvÈw+ÈwÈx1ÈxsÈwÈvÈv%ÈvÈvÈwÈwÈvÈuÈtZÈvFÈvÈtÈu`ÈwÈyyÈyÈwLÈwLÈ{#ÈyÈxÈroÈ\È]/Èn5ÈsTÈtÈrÈtÈwÈxÈyXÈzÈ{dÈ{#ÈxÈuÈtÈuÈtÈuÈvÈwLÈvÈvÈw+Èv%ÈtÈuÈw+ÈvÈt{ÈtZÈvÈvfÈt9Èt9ÈvfÈvÈvÈwLÈwÈwLÈvÈuÈsÈt{ÈvÈwmÈvfÈtÈwÈv%ÈiXÈ\JÈIÈ5È4È>ÈnÈvÈvÈwÈvfÈsÈt{Èu?ÈtÈsÈt{Èu?ÈtZÈs3ÈsÈt{ÈtZÈtÈvÈvÈvÈvÈxÈyXÈwÈvÈvÈw+ÈvFÈuÈv%ÈvÈvÈv%Èw+Èw Èu`ÈtÈtÈtZÈtÈu?ÈuÈuÈuÈuÈvÈxsÈxÈwÈw+Èx1ÈyÈxÈxÈxÈwÈvÈwÈyÈyÈyÈyÈz^È{È{dÈyyÈyÈyÈyÈ{Èw+ÈvFÈyÈxsÈvÈuÈvÈxÈxRÈxÈ{DÈ{ÈyÈw ÈvÈw+Èw+ÈvÈvÈvfÈuÈtÈuÈuÈtÈsÈtÈvÈw+ÈvÈvÈvÈvFÈt9ÈsÈtZÈtÈvÈvÈw+ÈvÈuÈuÈvÈvfÈwÈwÈvFÈt9ÈxsÈu`ÈaÈ\ÈSÈHÈjÈpBÈwÈyÈzÈyÈxÈvÈvfÈuÈu`ÈtÈu`ÈuÈu`ÈtÈuÈvÈvÈv%ÈwÈwÈxsÈwÈx1ÈwÈvFÈuÈtÈt{ÈtZÈtÈvfÈvÈuÈv%ÈvÈvÈv%ÈtÈtÈtÈsÈsÈtZÈu?ÈuÈuÈu?ÈvÈwÈyÈzÈz^ÈyÈyXÈyÈxÈxsÈx1ÈxsÈxÈxÈwÈxsÈzÈ{dÈxÈvfÈuÈv%Èy7È{dÈ{#ÈzÈxÈvÈuÈuÈvFÈwÈuÈtÈk#ÈtÈvÈw+ÈwÈwÈw+ÈvFÈuÈuÈu?Èu?ÈuÈvÈu`Èt{ÈtÈt9Èt{Èt9ÈsÈsÈr-ÈroÈsTÈsÈt9ÈuÈw ÈwmÈwmÈuÈtZÈtÈuÈw ÈwmÈvfÈtZÈvfÈr È^È]qÈYÈmÈuÈxRÈyÈ|)Èx1ÈwLÈxÈyÈxÈw+ÈvÈtÈtÈtÈt{ÈuÈvFÈvÈvfÈw ÈxsÈyÈuÈuÈu`ÈuÈu`Èu`ÈuÈvfÈvFÈvÈwmÈwLÈvfÈvÈvÈwLÈwLÈw ÈwLÈwÈvÈvÈw ÈwÈxsÈx1Èw+ÈvfÈwLÈxRÈxÈxÈxÈyÈzÈyÈyXÈyXÈxÈxsÈwÈwmÈwÈxsÈxsÈw ÈvFÈw ÈxRÈxÈxsÈw+ÈvfÈvFÈu`ÈtÈtZÈtÈsÈpÈeÈn5ÈqÈv%Èy7ÈyÈyÈxsÈwÈwmÈwÈxsÈxÈwÈvÈvFÈuÈtÈtZÈtÈuÈuÈtÈsÈtÈuÈuÈu`ÈuÈvÈw+ÈwÈxÈwÈvÈuÈu?ÈuÈvÈuÈtÈpÈeÈgÈd{ÈroÈwmÈ{dÈ{#ÈyyÈvÈvÈw ÈwÈvÈuÈuÈvfÈvÈvFÈuÈuÈuÈuÈtÈsÈtÈuÈsÈrÈsuÈtÈuÈuÈuÈuÈvfÈwLÈwÈwÈwÈxÈyyÈyÈyÈyXÈxÈxÈxsÈxRÈxsÈxÈxÈyXÈyÈzÈzÈzÈz=ÈyÈyyÈz=ÈzÈz^ÈyÈyÈyÈzÈzÈzÈzÈz=ÈyÈyÈzÈyÈxÈvfÈu?Èt9Èt9Èu`ÈuÈuÈvÈuÈtÈsÈr ÈroÈsÈvFÈxÈxÈyÈxÈyyÈzÈ{#ÈzÈyÈxÈx1ÈwÈw+ÈvFÈuÈuÈvÈvÈvÈw+ÈwÈx1ÈxsÈxsÈwÈvÈuÈvfÈxRÈyyÈy7ÈxRÈwÈxÈyÈwÈvFÈuÈmqÈnwÈkÈtZÈw+ÈyÈ{Èz=ÈyÈy7Èx1ÈwLÈvFÈuÈvÈvÈw+Èw+ÈwLÈwÈwmÈw Èv%ÈtÈsÈs3ÈuÈu`Èu?ÈuÈvÈvFÈvÈwmÈxRÈxÈxRÈxÈyÈyÈyÈzÈzÈyyÈxÈxÈxsÈwÈwmÈwmÈwÈxRÈy7ÈzÈ{È{dÈ{DÈzÈz=ÈyÈyÈyÈz^ÈzÈzÈ{È{DÈ{È{È|È{ÈzÈzÈzÈxÈwÈvÈvÈw+Èw+ÈwLÈwmÈw+Èw ÈvÈv%Èv%ÈvfÈwÈxÈyÈyyÈwÈwÈxsÈyÈxÈxRÈxÈyÈyÈwÈvÈu?ÈtÈsÈsuÈsTÈt9ÈuÈwLÈxÈy7ÈxÈxsÈwÈuÈtÈuÈvÈwÈx1ÈxRÈxÈxsÈxÈyÈw+Èj^ÈcTÈnÈroÈvÈxÈyÈy7ÈxÈxsÈwÈwÈwÈwÈwÈxÈyyÈyÈyÈx1ÈwmÈw ÈvÈvÈvÈvÈt{ÈsuÈrÈrNÈroÈs3ÈtZÈuÈvÈw+ÈwÈxÈxsÈxÈxsÈxÈyÈyyÈyÈyÈyÈwÈvÈuÈvÈwÈxÈyÈyÈyÈz=ÈyÈyÈyÈyyÈyÈz=Èz^ÈzÈyÈyÈyÈzÈ{ÈzÈy7ÈxRÈwÈwÈvÈuÈu`Èu`ÈuÈvFÈvFÈuÈt9ÈrÈqÈqÈroÈs3ÈsuÈsÈsÈt9ÈuÈv%ÈvÈvÈw+ÈwÈxsÈx1ÈvÈtÈsuÈroÈqÈqÈqÈr-ÈsÈsÈtÈuÈvÈwÈxsÈxÈvÈu?ÈtÈtÈtÈtÈuÈvFÈwÈxÈv%ÈqHÈdÈbÈr-ÈvÈxÈxÈvÈu?ÈtÈuÈvÈwmÈxRÈyXÈyÈzÈ{DÈz^ÈxÈwÈwÈwÈwLÈvfÈuÈaÈcÈb-Èe`ÈiÈkdÈl)ÈnÈoÈqhÈs3ÈuÈvÈwÈxÈxÈwÈvÈuÈt9ÈrNÈqÈqHÈs3ÈuÈv%ÈvÈu`Èt9ÈsTÈrÈs3ÈsÈsÈtÈvFÈxRÈyyÈyyÈy7ÈxÈxÈxÈyXÈyÈyÈyÈxÈxÈxÈx1ÈxÈyyÈyÈy7ÈxÈuÈsTÈpÈo}ÈnÈnÈn5ÈnÈnwÈo}ÈpÈr ÈsÈsÈtÈvÈvÈvÈvFÈuÈtÈs3ÈrNÈqÈqÈqÈqÈr-ÈrÈsuÈsÈt{ÈuÈvÈwÈwÈw+ÈvÈvFÈv%Èv%ÈvÈwLÈwÈvÈtÈsTÈroÈs3Èu`Èv%ÈtÈs3ÈqÈpÈo\Èp!ÈqÈtZÈvÈwÈwÈv%ÈtZÈrÈqÈpÈnwÈlÈkÈgÈbÈLÈKdÈKDÈMÈNÈPÈPÈQÈRÈUÈYyÈ_;ÈcÈeÈeÈeÈfÈeÈeÈbÈ^È^È`bÈcTÈd{ÈcÈ`È\ÈZ=ÈWLÈVfÈYÈZ^È]qÈboÈfÈgÈgLÈffÈfÈfÈgÈjÈmPÈpÈsÈuÈvÈu?ÈsÈqÈo}ÈmqÈkÈjÈiXÈhÈiÈj=ÈkdÈkÈkÈjÈj=ÈiÈjÈjÈkDÈkDÈkÈlÈnÈo\Èo\ÈnVÈm/ÈlÈmqÈnVÈnÈo\ÈoÈpÈqÈrÈt9ÈuÈv%Èw+ÈwÈwmÈvÈvÈvfÈvFÈvÈuÈtÈtÈsÈsuÈs3ÈrÈroÈq'ÈoÈmÈkÈh1Èd{ÈaÈ_;È_ÈboÈfÈiÈkÈiyÈe`Èa'È]PÈYÈVfÈT9ÈSÈT{ÈRÈOÈ>È;dÈ9È8RÈ6È5È6fÈ6È7È9È<È>È@bÈ@È?;È@ÈCÈEÈHÈLJÈO\ÈQÈS3ÈS3ÈQÈLÈHÈGÈFÈFÈ@ÈÈ0È0BÈ0È5?È7ÈÈ<È:È<È@ÈGÈKÈRÈSÈNÈEÈ>È:^È9È8È;È9È5È.È%ÈJÈ{ÈuÈÈÈÈÈ"-È(RÈ,)È.È2-È4ZÈ6È7LÈ5È2 È-È)È$È!ÈqÈdÈ)ÈÈÈ/ÈÈ!È%È'È-È0BÈ-È(1È"ÈwÈDÈ ÈÈBÈVÈ È )ÈÈÈ}È+#È9ÈH1ÈP!ÈWÈ]qÈcuÈeÈeÈdÈcÈbÈbÈcÈeÈfÈfÈeÈcuÈ]qÈX1ÈTÈNÈG È=È1HÈ)È(sÈ(RÈ,JÈ2È;ÈDÈJÈNÈQÈQÈMÈIÈCÈ@!È=/È;#È9È8È6È4È3È(È/È7 È@bÈJÈPBÈPÈLjÈHÈDZÈ?}È8RÈ5?È6È9È;DÈ4È97ÈAÈIXÈMqÈFÈ9yÈ+dÈwÈ È$È'È)ÈoÈÈ,JÈ!ÈÈ+È ÈÈÈ#È#TÈ*È.5È1È2È1hÈ1È3uÈ6È7È6È4È.5È*È-/È-È,È+È'+È$È&È'+È' È&È#È\ÈRÈÈ ÈoÇ)ÇÇÇ-Ç;ÇPÇÇdÇJÇÇ%ÇVÈRÈ-ÈÈ BÈ%?È(È-È.È.È/È0È2 È4È7mÈ:È?\ÈC3ÈCÈCuÈEÈ@!È81È)ÈÈÈ9ÈÈ5È)7È4ZÈ>ÈHÈMÈOÈNVÈKDÈF%È?}È8sÈ2oÈ+È&fÈ#3È ÈÈ bÈ#È:=ÈB ÈB ÈDÈÈ<È6È/È&FÈDÈÈ+È!ÇÇÇTÇÇ'ÇBÇÇÇÇ ÇÇÇÇÇÈÈÈÈ È È )ÈÈÈÈFÈ+ÈÈÈÈjÈÈwÈÈ%È ÈLÇJÈÈÈ È+#È5È=ÈCÈFfÈDÈA'È:È1È(È!ÈÈdÈÈJÈÈ È)È+#È1È3È2 È*=È+#È'È%È#È&È)È-PÈ5È8RÈ;È;dÈ8È5`È4È8ÈBÈIXÈG+È>È8RÈ1È4È/È.5È0BÈ0!È+È%È È !È+dÈ7È:=È9È6È33È/È*È%È!hÈ!HÈ&È,)È0BÈ0bÈ-È(RÈ#uÈ!'È#3È)È0BÈ2È2È@È?È@È>È9È1HÈ&È#ÈÈÇÇÇjÇÇÇFÇ ÇRÇdÇbÇÇÇÈÈÈ ÈÈÈÈÈÈ ÈÈ yÈ È È ÈÈsÈÈ`ÈTÈÇVÇÇ}ÈNÈÈ ÈÈ#È(È-È2È5È6%È5`È2È.È'LÈ È bÈÈ!ÈZÈ!'È'È(È6È8È#3È#È"È}ÈÈÈÈÈ ÈÈÈÈÈÈ1ÈqÈ$È+dÈ33È>ÈC3ÈH1ÈLjÈHÈGÈHÈHsÈEÈ@È:È3TÈ(È=È1È#uÈ=PÈP!ÈWÈXÈUÈSÈQÈNwÈJÈFÈDÈAÈ=È9È6%È2È1hÈ2NÈ4È8È:È:È;ÈIÈLÈKÈJÈEÈ=È3È'È=È ÇÇÇuÇÇ?ÇÇ9ÇmÇ?ÇmÇÇZÇDÇЃÇÇÇÇÈZÈÈBÈÈ1È/È!hÈ&È(RÈ)È)È)È)yÈ"È!'È!'È!È"È"oÈ È;ÈwÈjÈ7È"È%È(È.È3È7 È9È9yÈÈ+È!HÈ&%È+È/È/}È,È(È$È"È È}ÈÈÈÈJÈÈÈÈÈ;È JÈ È )È ÈbÈuÈÈ#È5È!hÈ$ZÈ(È.È2oÈ4È4{È0bÈ)yÈ(È.È97ÈCÈOÈTÈQÈLJÈFÈB-È=È:=È7È5È33È1È0bÈ/È/È.È.wÈ/È0È2oÈ4È8ÈU?ÈHÈKÈNÈKÈC3È;È8È6È,jÈÈ ÇÇÇ?ÇÇ`ÇÇyÇ=Ç;ÇÇÇÇBÇJÇLÇ'ÇRÇ)ÇÇÇÇÇÇÇÇÈÈÈ8sÈD9ÈJÈGLÈDÈ<)È6È.wÈ&FÈ/ÈÈVÈ yÈÈ'ÇÇÇÇ}ÈTÈ )È#È)È0!È#TÈ'LÈ)È*È*È)È'È$È%?È#3È ÈwÈÈXÈÈÈ7ÈÈ È#È"NÈ ÈPÈDÈÈÈÈÈÈÈÈÈ È#uÈ&FÈ)yÈ-qÈ2NÈ6È:^È;È9È5È0È-È+È(È&FÈ#È" È È È BÈ!'È"È$È(1È,)È0!È3È7+È9yÈ;ÈBoÈR-È\)È^È`BÈ^ÈWÈLÈBNÈ7È0È)È!È`ÈÇ+ÇÇÇHÇÇɺÇ1ÇÇ)ÇЃÇԼÇXÇVÇÇÇjÇ!ÇÇÇqÇ}È ÇÈbÈLÈhÈ${È<)È;ÈAÈ>wÈ8RÈ1È+È%È ÈÈwÈÈ5ÈPÈ}È^È#È'+ÈÈ È,È1'È1È(È)È+È+È,È+DÈ)yÈ'mÈ#uÈ!È !ÈÈÈÈÈdÈÈÈÈdÈÈÈÈÈÈVÈ !È" È#uÈ#È$È%È&È'mÈ'È&È%È$È#3È"-È!HÈ È È BÈÈÈÈ È È!È"È$È&fÈ(sÈ*È-È0È3TÈ6È8RÈ:^È<È>VÈ?ÈDÈFÈJÈWÈXÈXÈWÈMÈNwÈPÈNÈKDÈGÈEÈ=È:^È7È5`È2È.È3TÈ,È-È,È)XÈ*^È+È*È,È.È0È9È=È1È0È/È=ÈwÈ<È81È OFFSET = -20.2 MISSING_CONSTANT = 7 NOTE = " DN = 5 * (MIN(MAX(RV ,-20),30) + 20) + 1, where RV = specific radar cross-section divided by the Muhleman Law value, SIGMA0(THETA) = 0.0118 COS(THETA) / ((SIN(THETA) + 0.111 COS(THETA))**3) where THETA is the scattering angle." END_OBJECT = IMAGE OBJECT = IMAGE_MAP_PROJECTION ^DATA_SET_MAP_PROJECTION = "DSMAP.CAT" MAP_PROJECTION_TYPE = SINUSOIDAL MAP_RESOLUTION = 1408.1316 MAP_SCALE = 0.075 MAXIMUM_LATITUDE = 74.00000 MINIMUM_LATITUDE = 71.99000 EASTERNMOST_LONGITUDE = 6.01243 WESTERNMOST_LONGITUDE = 0.00000 LINE_PROJECTION_OFFSET = -104202.7422 SAMPLE_PROJECTION_OFFSET = -7837.6538 A_AXIS_RADIUS = 6051.00 B_AXIS_RADIUS = 6051.00 C_AXIS_RADIUS = 6051.00 FIRST_STANDARD_PARALLEL = "N/A" SECOND_STANDARD_PARALLEL = "N/A" POSITIVE_LONGITUDE_DIRECTION = EAST CENTER_LATITUDE = 0.00000 CENTER_LONGITUDE = 18.00000 REFERENCE_LATITUDE = "N/A" REFERENCE_LONGITUDE = "N/A" LINE_FIRST_PIXEL = 1 SAMPLE_FIRST_PIXEL = 1 LINE_LAST_PIXEL = 1 SAMPLE_LAST_PIXEL = 3184 MAP_PROJECTION_ROTATION = 0.00000 VERTICAL_FRAMELET_OFFSET = 1 HORIZONTAL_FRAMELET_OFFSET = 6 END_OBJECT = IMAGE_MAP_PROJECTION END ,    '$'<>HK:*9N\y1aZ x )5zFXpLu6"o7,ao)b}PEgqb ^ĉ&ibA~KY6h|QZ:$b`/4oԌzkrhNcg[ UPKFJC>:\5U4o0-+'$[#7!1; F(~ a , 0 S H~`c6"zT:D*/G@H5/(#  c_YXYY[[VU[[WWWRNNUYZ_ca[W`baVMY[WV___]\b^_XX^a`\[Z[ZVYZY[\]\YXOJSYVY]\WW_`XQVZVZSNMLQUQQRXWSZfij_UNTY[ZWWVYYXY`ceoe\[UTVblusjaaZ^\[\[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^^ZWVRV\]ZXad__^[XTTX]elf`XXZVZXXZ]aZZ[`acb_ZZ[[Z[Z[X\\^`]XURV\^\YWW[TQQRX]^cgffhgf`beedb`^[XVZ\\YTSRUY\cb[beb\cdabjkgfc_[STWXUVYbdiggfllk^XaiecbYYSVY\^^^ZXbdbba]VUYNSZglhe^YRQSX\dbYS\a_dpyzrhqxyk[_cca_ZTU\agpvxqf[fgdcfgc]WTO_kqpqspc_[Z\\XTV_cc__a_ZZ^]Ybgc`_cbfieZLMRW]a][^cjiaflkhnolkiggfc]ZSRajja_[QT\aec[QNP_joljgfb[^cc`Zajqpj`^\YYXXYWY]jnqmhb`gjheinmheacb`aed`bjoqwxusy~~|vmlqsqi`kquptz~ytuuqhhffdfllfhhc`[X[^a`[_`bb\\aifd]`cdegib`_\[WV_edZVVRMW^\badf`WGBEQZ_\\]gkmlmkpqnlhebbehqpha`^^X^b`fqwwpclqrldTq}|mosrosqrx}qaWVZjnqmga\ajpqf^ZXTV]bdcb_ahhcbjprjf_[[WX[XVQQUbfc[`^UXaeca_][bfefiedgfa_bdbgikppcZYaed_efigihdY_ilj`^YdklkjcYTVU^aakxho{te`YQUehlliosrqrmbhijjmrqlkjhfbemkkinkmjbb\hmqsspgkrrnkchfbaempnjfYX^]X_dn|q_Ydoutlnkgptsngdigfinsvukbhlmggiicdfqpjdbbkzwokkjjbc`krrt|zpdZetsp{skcY_dfd_ULRXW]aaZSZZTWZZUQUY]\[[][Y[Zahmuunc\ab_]ZTZ\`[[bglfXRVX\[VWggeab^Z]cabq~wuvz~snszqdb]XNFINKOMO\l{|th[[^^\^`ca^[^fpvvpker|uebaefd]]be^_ahjgeabgjkjkkie^[_a`fjhda\dihb\UVVUY[RWbdacc_WZekg_ac`[QTW\dba]\dfb_hlchifdcYW^cdc`afnqjbggkkjjcijqz}xrfbnzvtz{xupkikf`_jstwxukjgghllieb_VOX`bb[VS[^d`mzzrh]\ab_^`egd\Yacbfirv}|zxsgerroir|pdfr|}yxvppw~zz{{{dlpspjdejnocefjpjghknedksurgcdebfjkkrsqqqy~vsslmjdeeq{}xrnruvvocbjnrqliou}xnghkmlqrtpmtw|ywuxplfiddbjqmhgijhdmrsmhda^bmnkifmmlhkqtsjfe_[``b`eefeda_]hnom[Z[]eiklifhiijlif^`dc]\ekljopme__cgklprmhlknqqkebhejmpnqxy|~zuw}{vsmjlqrsqsqnrwvrg_`eb`fhlicbehhlonmoostminpsogkwwige]^ef`Z_egekomggje_bhic\gr{~ywxwohhgb`ix}wsqusngbabjztwxo`hjlgddggd`b\WRVPSVae_W]ac\\^\]adfeaa]]cdcc[Z[][Y]`^[ZWhlvzvjo|rb[X][[]egcfbaahgaZVY^_cc`a\`db\[X]d_Zcilnj]Zhv}wkgmnmgfcnsorvle^caZ[cmrlda^^_^aa\_eig\`hkgeeghcbdacfdefc^\XTMKQURMT[XTV]`dekhcab_Z\\^[_`[WVZab_WQNLVgqpmg`ZX^_a]X\]^\]SRYZUY[ejlg_bdcc]egjcaa_YSXZ^\__Z`dda`YWRV]_ZRTTZYYXX[\_cihc\\^_cdYU_eZPZaa[YW]][YYYXZaa]af`Y[_^`gnmkd[\XUY_aWJSXUYbkkcZ[^_elmkkelmnkectyxnjjoqsuwxyusnywrjhntqhagdalautotest-3.1.2/gdrivers/data/empty_double_attr.nc0000664000175000017500000000256013701057753021510 0ustar evenevenCDF xy GDAL_AREA_OR_POINTAreaDEBUG_EMPTY_DOUBLE_ATTR ConventionsCF-1.5GDAL0GDAL 2.5.0dev-62c58be-dirty, released 2019/02/20historyFWed Feb 20 21:29:25 2019: GDAL CreateCopy( empty_double_attr.nc, ... ) transverse_mercator grid_mapping_nametransverse_mercatorlongitude_of_central_meridian]@ false_eastingAfalse_northinglatitude_of_projection_origin scale_factor_at_central_meridian?#x long_nameCRS definitionlongitude_of_prime_meridiansemi_major_axisAXTinverse_flattening@rouUHx  standard_nameprojection_x_coordinate long_namex coordinate of projectionunitsmLy  standard_nameprojection_y_coordinate long_namey coordinate of projectionunitsm\Band1  long_nameGDAL Band Number 1 _Unsignedtrue valid_range _FillValue grid_mappingtransverse_mercatorlAAALALsk{gdalautotest-3.1.2/gdrivers/data/small2.gxf0000664000175000017500000000107513701057753017344 0ustar eveneven#POINTS 10 #ROWS 8 #TRANSFORM 5.0E-03 -118.835 #PTSEPARATION 12.5 #RWSEPARATION 12.5 #XORIGIN 1750000.0 #YORIGIN 4250.0 #ROTATION 0.0 #UNIT_LENGTH "ftUS",0.3048006096012 #MAP_PROJECTION "NAD27 / Ohio North" "NAD27",6378206.4,0.082271854,0 "Lambert Conic Conformal (2SP)",40.4333333333,41.7,39.6666666667,\ 82.5,609601.22 #MAP_DATUM_TRANSFORM "NAD27 to WGS 84 (6)",-8,159,175,0,0,0,1 #GTYPE 3 #GRID """%%/!!! """%%/!!! """%%*!!!(5@(V^?y,?br!!! """%%)!!!(5@(@J)),(5@?y,!!! !!!!!!!!!(@J)/h)Nr(7T?UT!!!!!! !!!!!!)+@*5@*j^"""%%*!!! !!!!!!(c|(B^?y,"""%%*!!! !!!!!!!!!(*6"""%%+!!!gdalautotest-3.1.2/gdrivers/data/r_test.rdb0000664000175000017500000000063413701057753017435 0ustar evenevenRDX2 X   gg(@Z@^@`@\@\@`@Z@^@\@`@a@`@b@`@^@^@`@c@`@a@Z@^@`@\@\@`@Z@^@\@`@a@`@b@`@^@^@`@c@`@a dim gdalautotest-3.1.2/gdrivers/data/4byteFloat.sdat0000664000175000017500000000062013701057753020331 0ustar evenevenO????????O????????????@@@@@@????@ @ @ @ @@????@ @OǀO @@????@ @OǀO @@????@ @ @ @ @@????@@@@@@????????????O????????Ogdalautotest-3.1.2/gdrivers/data/test_family_0.h50000664000175000017500000000175013701057753020441 0ustar evenevenHDF  P`xNCSAfamiTREEHEAPXfoochunked@`TREEgdalautotest-3.1.2/gdrivers/data/testtil.imd0000664000175000017500000000030613701057753017623 0ustar evenevennumRows = 20 numColumns = 20 bitsPerPixel = 8 BEGIN_GROUP = IMAGE_1 satId = "WV03"; firstLineTime = 2015-01-01T00:00:00.000000Z; cloudCover = 0.027; END_GROUP = IMAGE_1 END; gdalautotest-3.1.2/gdrivers/data/poly.nc.txt0000664000175000017500000000643313701057753017572 0ustar evenevennetcdf poly { dimensions: record = 2 ; ogc_wkt_max_width = 1000 ; PRFEDEA_max_width = 16 ; variables: char ogc_wkt(record, ogc_wkt_max_width) ; ogc_wkt:long_name = "Geometry as ISO WKT" ; ogc_wkt:grid_mapping = "transverse_mercator" ; char transverse_mercator ; transverse_mercator:grid_mapping_name = "transverse_mercator" ; transverse_mercator:longitude_of_central_meridian = -2. ; transverse_mercator:false_easting = 400000. ; transverse_mercator:false_northing = -100000. ; transverse_mercator:latitude_of_projection_origin = 49. ; transverse_mercator:scale_factor_at_central_meridian = 0.9996012717 ; transverse_mercator:long_name = "CRS definition" ; transverse_mercator:longitude_of_prime_meridian = 0. ; transverse_mercator:semi_major_axis = 6377563.396 ; transverse_mercator:inverse_flattening = 299.3249646 ; transverse_mercator:spatial_ref = "PROJCS[\"OSGB 1936 / British National Grid\",GEOGCS[\"OSGB 1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy_1830\",6377563.396,299.3249646]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",49],PARAMETER[\"central_meridian\",-2],PARAMETER[\"scale_factor\",0.9996012717],PARAMETER[\"false_easting\",400000],PARAMETER[\"false_northing\",-100000],UNIT[\"Meter\",1]]" ; double AREA(record) ; AREA:long_name = "Field AREA" ; AREA:ogr_field_name = "AREA" ; AREA:ogr_field_type = "Real" ; AREA:ogr_field_width = 12 ; AREA:ogr_field_precision = 3 ; AREA:grid_mapping = "transverse_mercator" ; double EAS_ID(record) ; EAS_ID:long_name = "Field EAS_ID" ; EAS_ID:ogr_field_name = "EAS_ID" ; EAS_ID:ogr_field_type = "Integer64" ; EAS_ID:ogr_field_width = 11 ; EAS_ID:grid_mapping = "transverse_mercator" ; char PRFEDEA(record, PRFEDEA_max_width) ; PRFEDEA:long_name = "Field PRFEDEA" ; PRFEDEA:ogr_field_name = "PRFEDEA" ; PRFEDEA:ogr_field_type = "String" ; PRFEDEA:ogr_field_width = 16 ; PRFEDEA:grid_mapping = "transverse_mercator" ; // global attributes: :Conventions = "CF-1.6" ; :GDAL = "GDAL 2.3.0dev, released 2017/99/99" ; :history = "Wed Jun 07 11:30:26 2017: GDAL Create( poly.nc, ... )" ; :ogr_layer_name = "poly" ; :ogr_geometry_field = "ogc_wkt" ; :ogr_layer_type = "POLYGON" ; data: ogc_wkt = "POLYGON ((479819.84375 4765180.5,479690.1875 4765259.5,479647.0 4765369.5,479730.375 4765400.5,480039.03125 4765539.5,480035.34375 4765558.5,480159.78125 4765610.5,480202.28125 4765482.0,480365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))", "POLYGON ((480035.34375 4765558.5,480039.03125 4765539.5,479730.375 4765400.5,479647.0 4765369.5,479690.1875 4765259.5,479819.84375 4765180.5,479779.84375 4765109.5,479681.78125 4764940.0,479468.0 4764942.5,479411.4375 4764940.5,479353.0 4764939.5,479208.65625 4764882.5,479196.8125 4764879.0,479123.28125 4765015.0,479046.53125 4765117.0,479029.71875 4765110.5,479014.9375 4765147.5,479149.9375 4765200.5,479639.625 4765399.5,480035.34375 4765558.5))" ; transverse_mercator = "" ; AREA = 215229.266, 247328.172 ; EAS_ID = 168, 179 ; PRFEDEA = "3504\"3411", "35043423" ; } gdalautotest-3.1.2/gdrivers/data/small.vrt0000664000175000017500000000321713701057752017310 0ustar eveneven PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Gray small.raw 0 1 31 LSB Gray small.raw 1054 1 -31 LSB gdalautotest-3.1.2/gdrivers/data/small_200ppcm.jp20000664000175000017500000000613613701057753020435 0ustar eveneven jP ftypjp2 jp2 Gjp2hihdr colrres resdasoclbl gml.dataasoclbl gml.root-instancexml withheld 0 0 31 31 x y 271653.543307087 4334846.85863874 307.086614173228 0 0 -306.282722513089 gmljp2://codestream/0 Record Interleaved tuuidK=KCզII*   , # &i )#NAD83 / UTM zone 18N|NAD83|-b1s@ $s@0AfPAjp2cOQ/ R IYiy\#"wvvvoongLgLgdPPPEWWWadKakadu-v6.2.1dKdu-Layer-Info: log_2{Delta-D(MSE)/[2^16*Delta-L(bytes)]}, L(bytes) -0.0, 4.4e+002 -0.0, 4.6e+002 -0.0, 4.7e+002 -0.0, 4.9e+002 -0.0, 5.1e+002 -0.0, 5.3e+002 -0.0, 5.5e+002 -0.0, 5.6e+002 -0.0, 5.8e+002 -0.0, 6.0e+002 -0.0, 6.2e+002 -0.0, 6.1e+002 Xgdalautotest-3.1.2/gdrivers/data/test_pdf_composition_raster_tiled_blending.pdf0000664000175000017500000000456113701057753027000 0ustar eveneven%PDF-1.6 % 4 0 obj << /BM /Multiply /Type /ExtGState /ca 0.7 >> endobj 5 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 16 /Length 6 0 R /Subtype /Image /Type /XObject /Width 16 >> stream x!1C9D֎V6l}&Bݶ2hh!Wl+]ӊα>k&+s 'oSNk3hՎkG\黫+!Al90U.r$,A$WgQI0j9YR_|o endstream endobj 6 0 obj 149 endobj 7 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 16 /Length 8 0 R /Subtype /Image /Type /XObject /Width 4 >> stream x ȡ@ >C Ei#5g;Pk]m>qzKҝ$*i2)? ( endstream endobj 8 0 obj 60 endobj 9 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 4 /Length 10 0 R /Subtype /Image /Type /XObject /Width 16 >> stream x 0:BK$|Dvޙ\yZF14,>T@" endstream endobj 10 0 obj 67 endobj 11 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 4 /Length 12 0 R /Subtype /Image /Type /XObject /Width 4 >> stream xKniYӓ] @o endstream endobj 12 0 obj 22 endobj 13 0 obj << /BBox [ 0 0 20 20 ] /Group << /S /Transparency /Type /Group >> /Length 14 0 R /Resources << /XObject << /Image11 11 0 R /Image5 5 0 R /Image7 7 0 R /Image9 9 0 R >> >> /Subtype /Form /Type /XObject >> stream q 16 0 0 16 0 4 cm /Image5 Do Q q 4 0 0 16 16 4 cm /Image7 Do Q q 16 0 0 4 0 0 cm /Image9 Do Q q 4 0 0 4 16 0 cm /Image11 Do Q endstream endobj 14 0 obj 127 endobj 3 0 obj << /Contents 15 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 16 0 R /Type /Page /UserUnit 1 >> endobj 15 0 obj << /Length 17 0 R >> stream q /GS4 gs /Group13 Do Q endstream endobj 17 0 obj 24 endobj 16 0 obj << /ExtGState << /GS4 4 0 R >> /XObject << /Group13 13 0 R >> >> endobj 1 0 obj << /Count 1 /Kids [ 3 0 R ] /Type /Pages >> endobj 2 0 obj << /Pages 1 0 R /Type /Catalog >> endobj xref 0 18 0000000000 65535 f 0000001883 00000 n 0000001942 00000 n 0000001526 00000 n 0000000015 00000 n 0000000075 00000 n 0000000394 00000 n 0000000416 00000 n 0000000645 00000 n 0000000666 00000 n 0000000903 00000 n 0000000925 00000 n 0000001117 00000 n 0000001139 00000 n 0000001503 00000 n 0000001702 00000 n 0000001802 00000 n 0000001780 00000 n trailer << /Root 2 0 R /Size 18 >> startxref 1991 %%EOF gdalautotest-3.1.2/gdrivers/data/ABC3X1UC.CLR0000664000175000017500000000740213701057753017117 0ustar eveneven# value red green blue 0 95 113 150 1 95 57 29 2 122 141 179 3 132 141 150 4 75 75 66 5 198 200 202 6 150 150 170 7 159 188 159 8 159 95 57 9 255 113 66 10 122 57 38 11 170 188 253 12 122 159 216 13 159 197 216 14 47 38 47 15 38 29 38 16 234 216 197 17 234 207 188 18 253 225 197 19 255 207 179 20 198 200 202 21 188 197 179 22 207 216 188 23 197 207 179 24 179 188 179 25 170 170 179 26 197 188 179 27 207 170 170 28 207 104 57 29 188 104 57 30 234 225 216 31 234 207 207 32 188 216 244 33 179 207 253 34 207 225 253 35 197 207 253 36 179 216 225 37 170 207 225 38 208 234 221 39 207 207 216 40 253 95 38 41 159 179 244 42 104 132 150 43 95 132 188 44 159 170 179 45 141 170 188 46 207 132 75 47 85 95 113 48 197 150 122 49 179 150 122 50 132 122 122 51 122 122 122 52 104 113 122 53 207 234 197 54 225 234 197 55 220 234 248 56 113 95 113 57 104 95 104 58 216 150 104 59 159 141 104 60 234 244 255 61 253 244 253 62 208 234 221 63 253 244 225 64 207 244 225 65 207 244 253 66 113 104 85 67 141 188 197 68 57 57 75 69 197 85 47 70 132 150 234 71 132 159 244 72 113 141 122 73 197 150 141 74 247 149 76 75 47 57 47 76 150 150 150 77 132 141 132 78 66 57 57 79 216 132 75 80 75 113 216 81 85 113 216 82 216 122 66 83 95 104 85 84 188 234 234 85 188 234 216 86 170 170 132 87 57 47 47 88 207 95 38 89 253 225 216 90 255 104 57 91 216 113 47 92 159 170 150 93 141 159 150 94 149 100 66 95 150 104 85 96 159 122 104 97 170 150 150 98 75 104 150 99 66 95 150 100 75 113 179 101 66 95 179 102 225 188 170 103 225 179 159 104 95 85 85 105 95 75 85 106 113 150 207 107 113 132 207 108 38 29 29 109 225 197 159 110 188 197 159 111 197 216 159 112 197 197 159 113 188 179 150 114 179 170 150 115 197 188 150 116 207 170 150 117 179 85 29 118 159 75 29 119 216 255 244 120 207 122 85 121 179 122 95 122 216 255 234 123 216 253 216 124 255 253 234 125 225 255 234 126 225 253 216 127 255 255 255 128 255 255 253 129 234 255 255 130 234 255 244 131 95 85 66 132 85 75 66 133 85 85 85 134 75 75 75 135 170 150 122 136 159 141 122 137 216 159 122 138 216 170 122 139 104 141 207 140 95 132 207 141 132 85 57 142 113 85 66 143 122 122 159 144 122 122 141 145 216 95 29 146 141 122 141 147 150 170 244 148 85 122 188 149 75 75 104 150 85 104 122 151 75 57 75 152 159 85 47 153 150 150 207 154 132 95 85 155 170 150 170 156 225 150 85 157 188 122 104 158 159 132 85 159 198 200 202 160 197 141 104 161 179 141 104 162 132 122 104 163 113 113 104 164 104 104 104 165 113 141 234 166 113 132 234 167 159 197 234 168 122 159 197 169 179 170 132 170 197 170 132 171 141 179 216 172 132 170 216 173 150 188 225 174 150 170 225 175 198 200 202 176 159 188 179 177 141 113 75 178 170 188 216 179 170 170 216 180 188 188 207 181 104 141 225 182 141 66 29 183 122 179 216 184 255 95 47 185 198 200 202 186 255 170 132 187 95 113 179 188 225 95 38 189 255 159 122 190 132 141 104 191 75 113 197 192 85 104 104 193 159 216 234 194 149 100 66 195 104 132 225 196 57 47 57 197 179 95 38 198 253 225 225 199 216 104 38 200 150 122 122 201 179 132 150 202 225 188 188 203 47 38 29 204 207 85 29 205 159 66 38 206 216 255 255 207 255 253 216 208 225 188 132 209 149 100 66 210 255 104 66 211 141 197 216 212 85 122 159 213 188 141 85 214 85 57 66 215 253 234 197 216 244 225 244 217 216 170 104 218 57 66 75 219 57 47 29 220 255 179 150 221 188 234 244 222 122 159 150 223 85 113 179 224 141 141 150 225 216 95 38 226 57 57 38 227 225 132 57 228 85 113 207 229 122 179 197 230 188 188 132 231 197 188 132 232 85 104 85 233 170 170 113 234 225 216 159 235 188 216 159 236 225 141 122 237 216 253 197 238 75 122 197 239 207 95 75 240 85 122 225 241 57 75 104 242 255 104 38 243 225 170 150 244 188 188 253 245 141 75 38 246 95 66 38 247 255 207 159 248 255 188 179 249 255 150 104 250 188 170 207 251 104 159 197 252 141 197 234 253 216 122 104 254 225 188 207 255 255 255 255 gdalautotest-3.1.2/gdrivers/data/LE7134052000500350.H30000664000175000017500000000370413701057753017604 0ustar evenevenNDF_REVISION=2.00; DATA_SET_TYPE=EDC_ETM+; PRODUCT_NUMBER=011050105003300008; PIXEL_FORMAT=BYTE; PIXEL_ORDER=NOT_INVERTED; BITS_PER_PIXEL=8; PIXELS_PER_LINE=15620; LINES_PER_DATA_FILE=14680; DATA_ORIENTATION=UPPER_LEFT/RIGHT; NUMBER_OF_DATA_FILES=1; DATA_FILE_INTERLEAVING=BSQ; TAPE_SPANNING_FLAG=1/1; START_LINE_NUMBER=1; START_DATA_FILE=1; LINES_PER_VOLUME=14680; BLOCKING_FACTOR=1; RECORD_SIZE=15620; UPPER_LEFT_CORNER=0912047.7816E,0123021.1611N,320332.875,1383055.125; UPPER_RIGHT_CORNER=0932341.5564E,0123038.3968N,542903.625,1383055.125; LOWER_RIGHT_CORNER=0932332.0449E,0103708.3904N,542903.625,1173879.375; LOWER_LEFT_CORNER=0912127.5867E,0103653.8244N,320332.875,1173879.375; REFERENCE_POINT=SCENE_CENTER; REFERENCE_POSITION=0922222.1984E,0113352.0236N,431618.250,1278467.250,7810.50,7340.50; REFERENCE_OFFSET=80.38,-17.02; ORIENTATION=0.000000; MAP_PROJECTION_NAME=UTM; USGS_PROJECTION_NUMBER=1; USGS_MAP_ZONE=46; USGS_PROJECTION_PARAMETERS=6378137.000000000000000,6356752.314249999800000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000,0.000000000000000; HORIZONTAL_DATUM=WGS84; EARTH_ELLIPSOID_SEMI-MAJOR_AXIS=6378137.000; EARTH_ELLIPSOID_SEMI-MINOR_AXIS=6356752.314; EARTH_ELLIPSOID_ORIGIN_OFFSET=0.000,0.000,0.000; EARTH_ELLIPSOID_ROTATION_OFFSET=0.000000,0.000000,0.000000; PRODUCT_SIZE=FULL_SCENE; PIXEL_SPACING=14.2500,14.2500; PIXEL_SPACING_UNITS=METERS; RESAMPLING=CC; PROCESSING_DATE/TIME=2005-01-05T15:29:57; PROCESSING_SOFTWARE=NLAPS_4_7_00e16; NUMBER_OF_BANDS_IN_VOLUME=1; WRS=134/052.0; ACQUISITION_DATE/TIME=2005-01-03T03:58:49Z; SATELLITE=LANDSAT_7; SATELLITE_INSTRUMENT=ETM+; PROCESSING_LEVEL=08; SUN_ELEVATION=45.44; SUN_AZIMUTH=140.39; BAND1_NAME=ETM+_BAND_8; BAND1_FILENAME=LE7134052000500350.I8; BAND1_WAVELENGTHS=0.50,0.90; BAND1_RADIOMETRIC_GAINS/BIAS=0.9755906,-5.6755981; END_OF_HDR; gdalautotest-3.1.2/gdrivers/data/byte_2gcps.jp20000664000175000017500000000074013701057753020120 0ustar eveneven jP ftypjp2 jp2 -jp2hihdrcolr uuidK=KCզII*  @A̞LA4@4@AtLAjp2cOQ)R \Bg8gPgPghPPPGWWWb ) <&DBYZ I|gdalautotest-3.1.2/gdrivers/data/caseinsensitive.ers0000664000175000017500000000142213701057753021347 0ustar evenevendatasetheader begin version = "4.1" description = "KENIEBA INLIER RTP 1st Vertical Derivative" datasettype = erstorage datatype = raster byteorder = lsbfirst coordinatespace begin datum = "WGS84" projection = "NUTM29" coordinatetype = en units = "metres" rotation = 0:0:0.0 coordinatespace end rasterinfo begin celltype = ieee4bytereal nroflines = 5366 nrofcellsperline = 2662 nrofbands = 1 nullcellvalue = -99999 registrationcellx = 0.0 registrationcelly = 0.0 cellinfo begin xdimension = 50 ydimension = 50 cellinfo end registrationcoord begin eastings = 168800 northings = 1603450 registrationcoord end bandid begin value = "RTP 1st Vertical Derivative" units = "nT/m" bandid end rasterinfo end datasetheader end gdalautotest-3.1.2/gdrivers/data/CE_LAMO_Q_00N_036E_MER_CLR_truncated.IMG0000664000175000017500000004007313701057753023750 0ustar evenevenPDS_VERSION_ID = PDS3 /* FILE DATA ELEMENTS */ RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 16443 FILE_RECORDS = 10308 LABEL_RECORDS = 2 /* POINTERS TO DATA OBJECTS */ ^IMAGE_HEADER = 3 ^IMAGE = 4 /* DATA OBJECT DEFINITIONS */ OBJECT = IMAGE INTERCHANGE_FORMAT = BINARY LINES = 10305 LINE_SAMPLES = 16443 SAMPLE_TYPE = UNSIGNED_INTEGER SAMPLE_BITS = 8 BANDS = 1 BAND_STORAGE_TYPE = BAND_SEQUENTIAL MISSING_CONSTANT = 0 END_OBJECT = IMAGE /* IDENTIFICATION DATA ELEMENTS */ FILE_NAME = "CE_LAMO_Q_00N_036E_MER_CLR.IMG" DATA_SET_ID = "DAWN-A-FC2-5-CERESMOSAIC-V1.0" PRODUCT_ID = "CE_LAMO_Q_00N_036E_MER_CLR.IMG" PRODUCT_CREATION_TIME = 2016-08-15T07:46:32 PRODUCER_INSTITUTION_NAME = "GERMAN AEROSPACE CENTER (DLR)" INSTRUMENT_HOST_ID = DAWN INSTRUMENT_HOST_NAME = DAWN INSTRUMENT_ID = FC2 INSTRUMENT_NAME = "FRAMING CAMERA 2" /* TIME DATA ELEMENTS */ SPACECRAFT_CLOCK_START_COUNT = "N/A" SPACECRAFT_CLOCK_STOP_COUNT = "N/A" IMAGE_TIME = "N/A" START_TIME = "N/A" STOP_TIME = "N/A" /* MAP OBJECT DEFINITIONS */ OBJECT = IMAGE_MAP_PROJECTION ^DATA_SET_MAP_PROJECTION_CATALOG= "DSMAP.CAT" A_AXIS_RADIUS = 470.0 B_AXIS_RADIUS = 470.0 C_AXIS_RADIUS = 470.0 CENTER_LATITUDE = 0.0 CENTER_LONGITUDE = 36.0 COORDINATE_SYSTEM_NAME = PLANETOCENTRIC COORDINATE_SYSTEM_TYPE = "BODY-FIXED ROTATING" EASTERNMOST_LONGITUDE = 72 FIRST_STANDARD_PARALLEL = -12.99 LINE_FIRST_PIXEL = 1 LINE_LAST_PIXEL = 10305 LINE_PROJECTION_OFFSET = 5152.0 MAP_PROJECTION_ROTATION = 0.0 MAP_PROJECTION_TYPE = "MERCATOR" MAP_RESOLUTION = 234.372785 MAP_SCALE = 0.035 MAXIMUM_LATITUDE = 22 MINIMUM_LATITUDE = -22 POSITIVE_LONGITUDE_DIRECTION = EAST REFERENCE_LATITUDE = "N/A" REFERENCE_LONGITUDE = "N/A" SAMPLE_FIRST_PIXEL = 1 SAMPLE_LAST_PIXEL = 16443 SAMPLE_PROJECTION_OFFSET = 8221.0 SECOND_STANDARD_PARALLEL = 13.0 WESTERNMOST_LONGITUDE = 0 END_OBJECT = IMAGE_MAP_PROJECTION /* MISCELLANEOUS */ TARGET_NAME = "1 CERES" FILTER_NUMBER = "1" CENTER_FILTER_WAVELENGTH = 732 REFERENCE_KEY_ID = ROATSCHETAL2016B DESCRIPTION = "Mosaic from LAMO Clear Filter images in the IAU-approved Kait longitude system. See the Ceres Coordinate System Document in the document directory of this volume for more information." /* IMAGE HEADER DATA ELEMENTS */ OBJECT = IMAGE_HEADER HEADER_TYPE = VICAR2 INTERCHANGE_FORMAT = ASCII BYTES = 16443 ^DESCRIPTION = "VICAR2.TXT" END_OBJECT = IMAGE_HEADER END gdalautotest-3.1.2/gdrivers/data/251_head.dat0000664000175000017500000000532013701057753017423 0ustar evenevenEHFA_HEADER_TAG@dR 9H rootrootOAH R9RBand_130783065Eimg_LayerOAT$T$@@J4Ehfa_Layer3065Ehfa_LayerOA0 8n0StatisticsTableEsta_Statistics!PA:@n@Zd;OCd@d@@e@L C@FStatisticsParametersEimg_StatisticsParameters830!PA`w!hw!pw!]]w!o@w!o@V!88Histogramion#eEdsc_Columntion"PA8FHistogramParametersEimg_StatisticsParameters830"PAPn!Xn!`n!]]pn!o@n!fVRRDNamesList65Eimg_RRDNamesListǭA^IMAGINE 2X2 Resampling}251.rrd(:Band_1:_ss_4_)251.rrd(:Band_1:_ss_8_)251.rrd(:Band_1:_ss_16_)251.rrd(:Band_1:_ss_32_)251.rrd(:Band_1:_ss_64_)(251.rrd(:Band_1:_ss_128_)J251.rrd(:Band_1:_ss_256_) Band_1:ephoPyramid_7)MapToPixelXFormersExfr_GenericXFormHeaders830?)A  FrameCamera8IXForm0xelXFormersCamera_ModelXormHeaders830?)A9MapInformationersEimg_MapInformationders830?)A&UTM2meters; ProjectionionersEprj_ProParametersders830?)AUTM?  Clarke 1866TXA333?XA^s{?fOMXA9 aDatumtionionersEprj_Datumametersders830?)A NAD27 (Canada) $c@`g@ .8.8 1,.{4096:Cdata,}RasterDMS,.R IMGFormatInfo5ImgFormatInfo831OA@4gdalautotest-3.1.2/gdrivers/data/envi_rgbsmall_bip.img0000664000175000017500000001626613701057753021630 0ustar evenevenPW$xCfs-bw,f6JiMno?l=GcPlRrNpT|Y\"%&jn;y=bt"cv$c{%b(RwRzZ!l1X{^'NpRvh1^'Z ^f-t:s4`v#YsRn^|$Z{"TwZ"UzW|SxPr\(W~#_*`+Q} DK"oxC}Eky,at|6]wYwWxWz _&c*SvVyTySxTx3WMtOxNwS|HT"Ps4dv$e|$i&f$f'Rpe.Z"`&Z ]%TyX{SxV} LsRy PyW"W"EL m|7i&h!b{k)q1]|Zyg+GjCh [#OwU}UzTyDi Z"T}@g KrT}Py Rgt$s/i$l*^{o/d%Tsu9j.f+]#T|]%\$Z"MtZ#S}MtMtKrU|.5p{9o)n,g&`!l.c$TvMoVxTx|A\"QvS{NxHpS{Y"Nx\$WJqU|!HR/n[z*Ru^$Z Nx\#RwCfU{W}QtOpQrSpYv"LmRwNsPtUyZ}#Vz"LsMq Tl.e4Z|%JoWz X|"InW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:q/d%_%<]Mig.](QuAh X#V~JtUZ$Quf4Tx!>j `%H~ T O|@n Aq n1Y]'[)U}%Y*q@r^e1y9n*Lbj+r.CMb"i-f.h1^'SwSzR{S|X$R{Td,QxIpX$@n l0h,J~K~a+Z o2UOFsV~&6\Fie.fJ?z.aBbb0v< ]PC1n&i&Pvr1`$OvNuk7f2PrMpY}%['X|%Rvt98|7|?j2r:s;MK$Mrv,q(_l+q,|5k#h$Z_'Qs/NIgc~;pGd};_x4Lhk:b1Ps#2UEhd3]~/c1PV` [z*HbOi Tn$VzF^(q:tf5Vr'3MVu%RvHqT~Bq` A`c2sD;W 3UKx^#V}$Gjd4St%<[Or]%`#BsPq9Qx9\W&Va"\w2{5l,g6(X?4+..,/+0'-Qe&Z{"7a`(ST^#d-i2;d;g\$QCr 4a/\/^\'.\=k_%^j(d">nOzc(*MGkMtT}n-U{Vo)v5mf)Kn1_ _ `#h+j+Fu8c#=t/e!_e%`m&s(p"t%q(Wo'x0~5u-h9Bm)n+f6Al6?'6/24/3,0,0,1g:]!TYm4GLs6Hu ULl0v6|9:x4j&o+i!x,53>r+p&9~3?~3?=m'l)g>&L'6/323515.2+CG"6=CYy?{?u;ڌ|Mkg/d0Ab}Kq@>b Nvb"m)r-u2K?=B7q,k*a:? 51324604+0*3'3gdalautotest-3.1.2/gdrivers/data/byte_rraster_rat.gri0000664000175000017500000000062013701057753021515 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/small16.aux0000664000175000017500000000032413701057753017436 0ustar evenevenAuxilaryTarget: small16.raw RawDefinition: 31 35 2 ChanDefinition-1: 16U 0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0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0Z F0ZE0ZL6W 5w&WvPK*ONM~ test_deflate_2GB.tifUTg\ux PKZ gdalautotest-3.1.2/gdrivers/data/byte_nogeoref.j2w0000664000175000017500000000002513701057753020711 0ustar eveneven1, 0, 0, -1, 100, 200gdalautotest-3.1.2/gdrivers/data/vlstr_metadata.h50000664000175000017500000002374013701057753020717 0ustar evenevenHDF  '`TREE0HEAPXTESTH  hhNxh HFLAGS xSNOD GCOLSAATRUE 0.0000000000 0.6666666667 255=noValue 0.0029761905 0.0029761905WGS84 Degrees 27.3154761905 -5.0833333333 0.5000000000 0.5000000000Geographic Lat/Lon25502552550 hCODING x xx MAPPING x x x x x x xxx HNOVALUEx xRANGExxxx P BANDNAMESGCOLSAAgdalautotest-3.1.2/gdrivers/data/testtil2.til0000664000175000017500000000057413701057753017733 0ustar evenevennumTiles = 1 TILE_1.filename = "byte.tif" TILE_1.ULColOffset = 0 TILE_1.ULRowOffset = 0 TILE_1.LRColOffset = 20 TILE_1.LRRowOffset = 20 END; gdalautotest-3.1.2/gdrivers/data/byte_truncated.nc0000664000175000017500000001000013701057753020766 0ustar evenevenHDF  5`OHDR " RV __NCProperties7version=1|netcdflibversion=4.5.0|hdf5libversion=1.8.16 4GDAL_AREA_OR_POINTArea . ConventionsCF-1.5 PGDAL0GDAL 3.1.0dev-70fc3c6-dirty, released 2019/06/07 Yhistory9Thu Jun 13 21:44:47 2019: GDAL CreateCopy( byte.nc, ... )nOHDR   8LOCHKD&transverse_mercatorFf,FSSE_R7OHDR  ?@4 4  G 0CLASSDIMENSION_SCALE "NAMEx/MIOCHKt <vo\OCHK! 4 _Netcdf4Dimid  ?standard_nameprojection_x_coordinate B long_namex coordinate of projection !unitsm|FRHP  (mBTHDd(h evsBTHD  d(h І9FSHDPx(%%CNBXBTLF!6L X KX h20PD\J PVP`A[Y`מ`_B W` 8 ]CúY`X5{HCBTLF CY`P PY`h!6W`PX  _B -SOHDR  ?@4 4  G 0CLASSDIMENSION_SCALE "NAMEyROCHK@yh J)OCHK4 4 _Netcdf4Dimid  ?standard_nameprojection_y_coordinate B long_namey coordinate of projection !unitsm^FHDB8(MV spatial_refpPROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT[gdalautotest-3.1.2/gdrivers/data/float.img0000664000175000017500000033650413701057753017257 0ustar evenevenEHFA_HEADER_TAG@RgH rootroot1AH RRLayer_132110022Eimg_Layer1A @@ Ehfa_Layer10022Ehfa_Layer1A0 I n0Statistics10022Esta_Statisticsrs1A uD@1D@܄D@ 3D@!VD@; sڦ?Z<StatisticsParametersEimg_StatisticsParameters8301Ahp Descriptor_TableersEdsc_TableticsParameters8301AVZb#Bin_Function#eersEdsc_BinFunctionrameters8301A uD@1D@."ZHistogramion#eersEdsc_Columntionrameters8301AoZZHistogramParametersEimg_StatisticsParameters8301Apx  uD@1D@h_ss_4_132110023Eimg_Layer_SubSample1A33 33Ehfa_Layer10023Ehfa_Layer1A{2601:fdata,}RasterDMS,.|4RasterDMS10023Edms_State1A) ʗz%1AfPJRRDNamesList022Eimg_RRDNamesList1AXIMAGINE 2X2 Resamplingwfloat.img(:Layer_1:_ss_4_)oimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{4096:fdata,}RasterDMS,.R IMGFormatInfo22ImgFormatInfo8311A(fV P RasterDMS10022Edms_State1Af V  .J#mr!\  ! s.1b` i v `cS S  N 1A I sMap_Info10022Eprj_MapInfo1A Transverse Mercator A+[A A1[A* Y@Y@B metersV  Projection10022Eprj_ProParameters1A  Transverse Mercator x#?jk@AcA GRS 1980@TXA?XA@k{?˯MXAI 0XDatumtion10022Eprj_Datumameters1A8GDA94H&1<0Gz @T㥛#@~b>&>9*>2iĵ> Eu?85444443333322221111100000/////.....-----B$B$;B$|B$ B$ B$ AB$ B$ B$ B$B$B$GB$ B$ B$ B$ MB$ B$ B$ B$TB$NB$B$B$B$ TB$ B$ B$ B$ ZB$ B$B$B$B$B$ZB$B$ B$ B$ `B$ B$ B$ %B$ gB$B$aB$B$B$%B$gB$ B$ B$ +B$ mB$ B$ B$B$B$,B$mB$B$B$2B$ sB$ B$ B$ 8B$ zB$2B$tB$B$B$8B$zB$B$ B$ >B$ B$ B$ B$B$B$?B$B$B$B$EB$B$ B$ B$ KB$ B$B$EB$B$B$ B$KB$B$B$B$QB$ B$ B$ B$B$B$B$RB$B$B$B$XB$B$B$B$ ^B$ B$B$XB$B$B$B$^B$B$B$#B$dB$B$ B$ )B$B$B$#B$eB$B$B$)B$kB$B$B$/B$qB$ B$)B$kB$B$B$0B$qB$B$B$6B$wB$B$B$<B$qB$B$B$6B$wB$B$B$B$B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$OuB$NB$MB$M;B$L|B$KB$KB$JBB$IB$HB$HB$GIB$FB$EB$EB$DPB$CB$BB$BB$AWB$@B$?B$?B$VB$UB$U2B$TtB$SB$RB$R9B$Q{B$PB$OB$O@B$NB$MB$MB$LGB$KB$JB$J B$IOB$HB$GB$GB$FVB$EB$DB$DB$C]B$BB$AB$A"B$@dB$?B$W8B$VzB$UB$TB$T?B$SB$RB$RB$QFB$PB$OB$O B$NMB$MB$LB$LB$KTB$JB$IB$IB$H\B$GB$FB$F!B$EcB$DB$CB$C(B$BjB$AB$@B$@/#B ..-],++"*c)((('j&%%/$p#""5!w <}BIOV\! c ( i .p5v;}/c.--(,j+**.)p(''5&w%$$;#}""!B H OV\!c'i . p 4 v;}BH//..p-,,5+v*));(}''&B%$$#H"!! OU\!b'i.o4v ; | AH N0v/..;-},,+A*))(H'&& %N$##"U! \ b'i.o4v;|A  H NU[00A/..-H,++ *N)(('U&%%$[#"" !b 'h-o4u:|AG N  U [ b'100 /N.--,T+**)[('' &b%$$&#h"!!- o4u:|AG NT  [ a&h-o21T0//.[-,, +a*))&(h'&&-%n$##3"u! :{@G NT[ a & h -n3u:2110a/..&-g,++,*n)((3'u&%%:${#""@! G MTZa&h, n 3 u :{@3%2g100,/n.--3,t+**9){(''@&%%$F#"" !M TZa&g,n3t 9 { @ G M32221t0//9.z-,,?+**)F('' &M%$$#S"!! Z`%g,n2t9{@  F MS483z211?0//.F-,, +L*))(S'&&%Y$##"`! %g,m2t9z?F M  S Z`443E211 0L/..-R,++*Y)(('`&%%%$f#""+!m 2s8z?F LS Y  ` %g5K4332R100/Y.--,_+**$)f(''+&m%$$1#s"!!8 z?E LSY` % f + m2t554X3221_0//$.e-,,*+l*))1(s'&&8%y$##>"!! E LRY_$f+m 2 s 8z6^544#3e211*0l/..1-r,++7*y)((>'&&%E$## "K! RX_$f+l1s8 z ? E66*5k43302r1007/y.--=,++*D)(( 'K&%%$Q#""!X _$e*l1s8y> E L 7q65564x322=100/D.-- ,J+**)Q(''&X%$$#^"!!# e*l1r7y>E K  R  X77=6~554C3221J0//.Q-,,+W*))(^'&&#%e$##*"k! 0r7x=D KQX  _ $8776I5443P2110W/..-],++"*d)(()'k&%%0$q#""6!x =D JQX^# e * l 98P7665V4332]100"/d.--),j+**/)q(''6&x%$$=#~""!C JQW^#e*k 0 r 79887\655!4c322(1j0///.p-,,5+w*))<(~''&C%$$#J"!! PW^#d)k0r7x =  :!9c877(6i544.3p21150w/..<-},,+B*))(I'&&%P$##"V! ]"d)k0q6x=D J:99.8o76645v433;2}110B/..-I,++*O)(('V&%%$]#"""!c (j/q6w<~CJ Q ;4:v988;7|665A4332H100 /O.--,U+**)\(''!&c%$$(#j"!!/ p5w<~CIPW  ^;::A9887G655 4N3221U0//.\-,,!+b*))'(i'&&.%p$##5"v! <}BIPV]"d m=<<2;t:9998z766?5443F211 0M/..-T,++*Z)(( 'a&%%&$h#""-!o 4v;|AH OV>>8=z<;;?:998F766 5L4332S100/Z.--,a+**&)g(''-&n%$$3#u"!!: |AH NU\!?>>=E<;; :L9887R6554Y3221`0//%.g-,,,+n*))3(t'&&9%{$##@"!! G NU[ b'i@ ?K>==X=<<;_:99$8f766+5l43312s1008/z.--?,++*F)(( 'M&%%$S#""!Z a&h-o4u:|A@^?>>#=e<;;*:l98817r65584y322>100/E.-- ,L+**)S(''&Z%$$#`"!!% g,n3u:|AHA@@)?k>==06554D322 1K0//.R-,,+Y*))(`'&&%%g$##,"m! 2t9{@G NB/Aq@??6>x=<<=;::9D877 6K5443Q2110X/..-_,++$*f)((+'m&%%2$t#""9!z ?F MT[BAA<@~??>C=<<;J:998Q7665X4332^100$/e.--*,l+**1)s(''8&z%$$?#""!F  LSZaCBBAA@I?>>=P<;;:W9887^655#4e322*1k0//0.r-,,7+y*))>(''&E%$$ #L"!! SZ`%g,nCCBOA@@?V>==<];::"9d877)6k54403q21170x/..=-,,+D*)) (K'&&%R$##"Y! `%g,m3tDUCBBA\@??!>c=<<(;j:99/8q76665x433=2~110D/.. -J,++*Q)(('X&%%$_#""$!f +m2t9z@DD!CbBAA'@i?>>.=p<;;5:w988<7~665C4332J100/Q.--,W+**)^(''#&e%$$*#l"!!1 s8z?F EhDCC-BoA@@4?v>==;<};;:B9887I6554P3221W0//.^-,,#+d*))*(k'&&0%r$##7"y! >E LSEE4DuCBB:A|@@?A>==N=<<;U:998\766!5c433(2j100//q.--6,x+**=)~(('D&%% $K#""!Q X_$fGFFEDD CMBAA@T?>>=[<;; :b988'7i655.4p32251w0//<.~--,C+**)J(''&Q%$$#X"!! ^$e+l1GFFESDCCBZA@@ ?a>==&n=<<3;u:99:8|776A5443H211 0O/..-V,++*])(("'d&%%)$k#""0!r 7y>EHGG%FfEDD,CmBAA3@t?>>:={<;;@:998G766 5N4332U100/\.--!,c+**()j(''/&q%$$6#x"!!= D KI+HlGFF2EsDCC9BzA@@@?>>=F<;; :M9887T6554[322!1b0//'.i-,,.+p*))5(w'&&<%~$$#C"!! JQXIHH8GyFEE?DCCBFA@@ ?M>==IHHGEFEE DLCBBAS@??>Z=<<;a:99&8g766-5n43342u100;/|..-B,++*H)(('O&%%$V#""!] #d*kJJ IKHGGFREDDCYBAA@`?>>%=g<;;,:n98837t655:4{322A100/H.-- ,O+**)V(''&]%$$"#c"!!) j0qKQJIIHXGFFE_DCC$BfA@@+?m>==2z=<@??>E=<< ;L:998S7665Z4332a100&/h.---,o+**4)v('';&}%%$B#""!I PLL/KqJII6HxGFF=EDDCDBAA @K?>>=R<;;:Y9887`655%4g322,1n0//3.u-,,:+|*))A(''&H%$$ #O"!! VMwLKK==<_;::$9f877+6m54423t21190{/..@-,,+G*)) (N'&&%U$##"\! "cNMBLKKJIIHHGPFEEDWCBBA^@??#>e=<<*;l:9918s76685z433?2110F/.. -M,++*T)(('[&%%!$b#""(!i /NMM LOKJJIVHGGF]EDD"CdBAA)@k?>>0=r<;;7:y988>7665E433 2L100/S.--,Z+** )a('''&h%$$.#p"!!5 wONUMLLK\JII!HcGFF(EjDCC/BqA@@6?x>===<;;:D988 7K6554R3221Z0//.a-,,&+h*))-(o'&&4%v$##;"}!! BONN MbLKK'JiIHH.GpFEE5DwCBB== P=<<;X:998_766$5f433+2m1002/t.--9,{+**@)(('G&%% $N#""!UPOO3NuMLL:K|JJIAHGGFHEDDCOBAA@V?>>=^<;;#:e988*7l65514s32281z0//?.--,F+** )M(''&T%$$#["!ߚ#B ..-U,++*\)((!'c&%%($j#""/!q 6x=D LSZ a & h -o4v;}/[.-- ,b+**')i(''.&p%$$5#w"!!< ~D KRY`%g , n 3 u:|AH//&.h-,,-+o*))4(v'&&<%}$$#C"!! JQX_$f+m2t 9 { AH O0n/..3-u,++;*|))(B'&&%I$##"P! W^#e*l1s9z@  G NU\00:/{.--A,++*H)(( 'O&%%$V#""!] "d)k1r8y?F M  T [ b(100/G.-- ,N+**)U(''&\%$$!#c"!!( j0q7x>E LS  Z a'h.p2 1M0//.T-,,+[*)) (b'&&'%i$##/"p! 6x=D KRY` & h -o4v;2110Z/..-a,++&*h)((.'o&%%5$w#""F M  T [ b433?2110F/.. -M,++*T)(('[&%%!$c#""(!j /q6x=E LS Z  a 'h5E433 2L100/S.--,Z+** )a('''&i%$$.#p"!!5 w<~D KRY` & g - o4v554R3221Y0//.`-,,&+h*))-(o'&&4%v$##;"}!! BJQX_%f,n 3 u :|6X5443_211%0f/..,-n,++3*u)((:'|&&%A$##"I! PW^$e+m2t9 { @ G66$5e433+2m1002/t.--9,{+**@)(('G&%% $O#""!V ]"d*k1s8z? F N 7k65514s32281z0//?.--,F+** )N(''&U%$$#\"!!! c)j0r7y>E M  T  [7776y544>3221E0// .L-,,+T*))(['&& %b$##'"i! /p6x=D LSZ  a '8776D544 3K2110R/..-Z,++*a)((&'h&%%.$o#""5!w <~C JRY`& g - o 98J7665Q4332Y100/`.--%,g+**,)n(''4&u%$$;#}""!B IQX_$f,m 3 u :9887W6554_322$1f0//+.m-,,2+t*)):(|'&&A%$$#H"!! OW^#e+l2t9{ @ :9]877#6e544*3l21110s/..9-z,++@*))(G'&& %N$##"U! ]"d)k1r8z?F N:99)8k76605r43372y100?/..-F,++ *M)(('T&%%$\#""!!c (j0q7y>E M T ;/:q98867x655=4332E100 /L.--,S+**)Z('' &b%$$'#i"!!. p6w=D KSZ  a;::<9~887C655 4K3221R0//.Y-,,+`*))&(h'&&-%o$##4"v! <~CJRY`&g 0//.E-,, +M*))(T'&&%[$##!"c! (j/q7x>E M>i=<<.;p:9958w766=5443D211 0K/..-S,++*Z)(('a&%%'$i#"".!p 5w=D KSZ>>4=v<;;;:}998C7665J4332Q100/Y.--,`+**%)g(''-&o%$$4#v"!!; }CJQY`&?|>>=A<;;:I9887P6554W3221_0//$.f-,,,+m*))3(u'&&:%|$$#B"!! IPX_$f,n@?G>== U=<<;\:99"8c766)5k43302r1008/y.--?,++*F)(( 'N&%%$U#""!\ "d)k1r8z?A@[?>> =b<;;':i988/7q65564x322>100/E.-- ,L+**)T(''&[%$$!#b"!!( j/q7x>E MA@@&?h>==-u=<<;;}::9B8776J5443Q2110X/..-`,++%*g)((-'n&%%4$v#"";!} CJQY`BAA9@{?>>A=<<;H:998P7665W4332^100$/f.--+,m+**3)t('':&|%%$A#""!I PX_$fC?BAA@G?>> =N<;;:U9887]655"4d322*1l0//1.s-,,9+z*))@(''&G%$$ #O"!! V^#e+l2tCC BMA@@?T>==<[;::!9c877(6j54403r21170y/..?-,,+F*)) (M'&&%U$##"\! "d)k1r8zDSCBBAZ@?? >a=<<';i:99.8p76665x433=2110E/.. -L,++*S)(('[&%% $b#""(!j /q7x>EDDC`BAA%@g?>>-=o<;;4:v988<7~665C433 2K100/R.--,Y+**)a(''&&h%$$.#p"!!5 w=D KEfDCC+BmA@@3?u>==:<|;;:B9887I6554Q3221X0//._-,,%+g*)),(n'&&4%v$##;"}!! CJRYEE1DsCBB9A{@??@>==N=<<;U:998\766"5d433)2k1001/s.--8,z+**@)(('G&%% $O#""!V ^#e+lGFEEDD CLBAA@T?>>=[<;;!:b988(7j655/4q32271y0//>.--,F+** )M(''&U%$$#\"!!" d)k1s8GFFERDCCBYA@@?a>==&HGXFEED_CBB%Ag@??,>n=<<4;v:99;8}776C5443J2110R/..-Y,++*a)((&'h&%%.$p#""5!w =D LHGG#FeEDD+CmBAA2@t?>>:=|<;;A:998I7665P4332X100/_.--%,g+**,)n(''4&v%$$;#}""!C JRI)HkGFF1EsDCC8BzA@@@?>>=G<;; :O9887V6554^322#1e0//+.m-,,2+t*)):(|'&&A%$$#I"!! PX_IHH7GyFEE>DCCBFA@@ ?M>==[=<< ;b:99(8j766/5q43372y100>/..-F,++ *M)(('U&%%$\#"""!d )k1sJJIJHGGFQEDDCYBAA@`?>>&=h<;;.:o98857w655=4332D100 /L.--,S+**)[('' &b%$$(#j"!!/ q7yKPJIIHWGFFE_DCC$BfA@@,?n>==4{=<G=<< ;N:998V7665^433#2e100+/m.--2,t+**:)|(''A&%%$I#""!P XLL/KpJII6HxGFF>EDDCEBAA @M?>>=T<;;:\988"7c655)4k32211s0//8.z-,,@+**)G('' &O%$$#V"!! ^$MvLKK== 0//.F-,, +M*))(U'&&%\$##""d! *kNMBLKKJIIHHGQFEEDYCBBA`@??&>h=<<-;o:9958w766<5~443D211 0L/..-S,++*[)(( 'b&%%($j#""0!q 7NMM LOKJJIWHGGF^EDD$CfBAA,@n?>>3=u<;;;:}998B7665J4332R100/Y.--,a+**&)h(''.&p%$$6#w"!!= ONUMLLK]JII"HdGFF*ElDCC2BsA@@9?{>==A<;;:H9887P6554W3221_0//%.g-,,,+n*))4(v'&&<%}$$#C"!! KONN!McLKK(JjIHH0GrFEE7DyCBB?A@@?G>== T=<<;\:99!8c766)5k43312s1008/z.--@,++*G)(( 'O&%%$W#""!^POO4NvMLL> =b<;;':i988/7q65574x322>100/F.-- ,M+**)U(''&]%$$"#d"! 7777777777777777777777777777777777777777777777777777777777777777B#B#B#`B#ޢB#B#%B#gB#۩B#B#fB#B#B#+B#mB#ݯB#B#2B#tB#B#2B#sB#ߵB#B#9B#zB#ܼ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B$%B$$B$$B$#]B$"B$!B$!"B$ dB$B$B$*B$lB$B$B$2B$tB$B$B$9B${B$B$B$AB$B$B$B$IB$B$B$B$PB$B$ B$ B$ XB$ B$ B$ B$ `B$B$B$%B$gB$B$4B$42110E/.. -L,++*R)(('Y&%%$`#""%!g ,m2t9{@F M T ;7:y988>7665E433 2K100/R.--,Y+**)`(''%&f%$$+#m"!!2 t9z?F MTZ  a;;:D988 7K6554R3221X0//._-,,$+f*))+(m'&&2%s$##8"z! ?F LSZa&g )(('E&%% $L#""!R Y`%g,m2t9{ =^<;;#:e988*7k65504r32271y0//>.--,E+** )K(''&R%$$#Y"!! `%f+m2t9{@F==)q=<<6;x:99=8776D544 3J2110Q/..-X,++*_)(($'e&%%+$l#""1!s 8z?F LSZ>><=~<<;C:998J7665Q4332W100/^.--#,e+***)l(''1&s%$$8#y"!!> E LSY`%?>>=I<;;:P9887W6554^322#1e0//*.k-,,0+r*))7(y'&&>%$$#E"!! LRY`%g,m@?P>==]=<<";c:99)8j766/5q43362x100=/..-D,++ *K)(('Q&%%$X#""!_ $f+m2s8z?A!@c?>>(=j<;;/:q98867w655<4~332C100/J.--,Q+**)X(''&^%$$$#e"!!* l1s8z?F LA@@.?p>==5E LSB4Av@??;>}==! E KRY`BBAB@??>H=<< ;O:998V7665]433"2d100)/k.--0,q+**6)x(''=&%%$D#"" !K RY_%fCHBAA @O?>>=U<;;:\988!7c655(4j322/1q0//6.x-,,=+~**)D('' &J%$$#Q"!! X_$f+m2sCCBUA@@?\>==!i=<<.;p:9958v766<5}443B2110I/..-P,++*W)(('^&%%#$e#""*!l 1r8y>EDD&ChBAA-@o?>>4=v<;;;:}998B7665I4332P100/V.--,]+**")d('')&k%$$0#r"!!7 y>E LEnDCC3BuA@@:?|>==A<;;:H988 7O6554V3221]0//".d-,,)+j*))0(q'&&6%x$##="!! D KRYEE:D{CBBAA@@?G>== > =b<;;':i988.7o65554v322;1}00/B.--,I+**)P(''&W%$$#^"!!# e*l1s8GFFEZDCCBaA@@&?h>==-HG`FEE%DgCBB,An@??3>u=<<:;|:99A8776H544 3O2110V/..-],++"*d)(()'k&%%0$q#""7!x >D KHGG,FmEDD2CtBAA9@{?>>@=<<;G:99 8N7665U4332\100!/c.--(,j+**/)q(''6&x%$$=#""!D  KRI2HsGFF9EzDCC@BAA@G?>> =M<;;:T9887[655!4b322'1i0//..p-,,5+w*))<(~''&C%$$#J"!! QX_IHH?GFFEFDCC BMA@@?T>==<[;:: 9b877'6h544.3o21150v/..<-},,+C*))(I'&&%P$##"W! ^$eJEIHH GLFEEDSCBBAZ@??>a=<<&;h:99-8o76645v433;2}110B/..-I,++*P)(('W&%%$^#""#!e *l1rJJIRHGGFYEDDC`BAA%@g?>>,=n<;;3:u988:7|655A4332H100 /O.--,V+**)](''"&d%$$)#k"!!0 r7yKXJIIH_GFF$EfDCC+BmA@@2?t>==9<{;::@9887G655 4N3221U0//.\-,,!+c*))((j'&&/%q$##6"x! =DKK$JeIHH+GlFEE2DsCBB9Az@??@>==M=<<;T:998[766 5b433'2i100./p.--5,w+**<)~(('C&%%$J#""!Q XLL7KyJII>HGGFEEDD CLBAA@S?>>=Z<;;:a988&7h655-4o32241v0//;.}--,B+**)I(''&P%$$#W"!! ^#MLLKDJII HKGFFERDCCBYA@@?`>==%m=<<2;t:99:8{766A5443H211 0O/..-V,++*])(("'d&%%)$k#""0!r 7NMMLWKJJI^HGG$FeEDD+ClBAA2@s?>>9=z<;;@:998G766 5N4332U100/\.--!,c+**()j(''/&q%$$6#x"!!= ON]MLL#KdJII*HlGFF1EsDCC8BzA@@??>>=F<;; :M9887T6554[322 1b0//'.i-,,.+p*))5(w'&&<%~$$#C"!! JONN)MkLKK0JrIHH7GyFEE>DCCBEA@@ ?L>==Y=<<;`:99&8g766-5n43342u100;/|..-B,++*I)(('P&%%$W#""!^POO>%=f<;;,:n98837u655:4|322A100/H.-- ,O+**)V(''&]%$$"#d"! 7777777777777777777777777777777777777777777777777777777777777777B#kB#B#B#0B#qB#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RB$tB$sB$sB$rYB$qB$pB$pB$o`B$nB$mB$m&B$lhB$kB$jB$j-B$ioB$hB$gB$g5B$fwB$eB$dB$dB$ZB$y}B$xB$xB$wBB$vB$uB$uB$tJB$sB$rB$rB$qQB$pB$oB$oB$nYB$mB$lB$lB$k`B$jB$iB$i&B$hhB$gB$fB$f-B$eoB$dB$cB$c5B$bwB$aB$`B$`E L  S [ b'100/F.-- ,M+**)T(''&[%$$!#b"!!( j/q6x=D KR  Z  a&h-o2 1L0//.S-,,+Z*)) (a'&&'%h$##."p! 5w<~CJQX` % g ,n3u:2110Y/..-`,++%*g)((-'n&%%4$u#"";!} BIPW^$f+ m 2 t 9{@32_100$/f.--+,m+**3)t('':&{%$$A#""!H  OV]#d*l1s 8 z ? F N322*1l0//1.s-,,8+z*))@(''&G%$$ #N"!! U\"c)j0r7y>  E LT403r21170y/..>-,,+F*)) (M'&&%T$##"[! b(i/p6x=D K  R Za433=2110D/.. -L,++*S)(('Z&%%$a#""&!h .o5v<~CJQ Y  ` %g5C433 2J100/Q.--,Y+**)`(''%&g%$$,#n"!!4 u;|BIPW_ $ f + m2t554P3221W0//._-,,$+f*))+(m'&&2%t$##9"{! AH OV]#e*l 1 s 8z6V5443]211#0d/..*-l,++1*s)((8'z&%%?$##"G! NU\"c)k0r7 y > E66!5c433)2j1000/r.--7,y+**>)(('E&%% $M#""!T [ b(i/q6x= D L 7i655/4p32261x0//=.--,D+** )K(''&S%$$#Z"!! a&h.o5w<~C J  R  Y7746v544<3}221C0//.J-,,+Q*))(X'&&%`$##%"g! ,n4u;}BIPX  _ $8|776B5443I2110P/..-W,++*^)(($'f&%%+$m#""2!t 9{AH OV^# e * l 98G766 5O4332V100/].--#,d+***)l(''1&s%$$8#z"!!? G NU\"d)k 0 r 79887U6554\322!1c0//(.j-,,0+q*))7(y'&&>%$$#E"!! MT[!b(j/q6x =  :9Z877 6b544'3i211.0p/..6-w,++=*))(D'&& %K$##"S! Za&h.p5w<~C K:99&8h766-5o43342v100;/}..-C,++*J)(('Q&%%$X#""!` %g,n4v;}BI Q ;,:m98837u655:4|332A100/I.--,P+**)W(''&^%$$$#f"!!+ m2t:{AHOW  ^;::99{877@6554G322 1O0//.V-,,+]*))#(d'&&*%l$##1"s! 8z@G NU]"d ! F MT[!c(j/ q<< ;L:998S7665Z433 2b100'/i.--.,p+**6)w(''=&%%$D#"" !K SZ a'i.p5w =R<;;:Y9887`655&4g322-1o0//4.v-,,<+}**)C(''&J%$$#Q"!! Y`%g-o4v;}C==<_;::$9f877+6m54433u211:0|//.A-,,+I*))(P'&&%W$##"_! $f+m3u:|AI>e=<<*;l:9918s76695z433@2110G/.. -O,++*V)((']&%%#$e#""*!l 1s9{@G OV>>0=r<;;7:y988?7665F433 2M100/T.--,\+**!)c('')&j%$$0#r"!!7 y?F MU\!?x>===<;;:D988 7L6554S3221Z0// .b-,,'+i*))/(p'&&6%x$##="!! E LS[ b'i@?C>==P=<<;W:998_766$5f433,2m1003/u.--:,|++*B)(('I&%%$P#""!X _%f,n3u;|A@V?>>=]<;;#:e988*7l65514s32291{0//@.--,H+** )O(''&V%$$#^"!!# e*l2t9{AHA@@!?c>==)p=<<6;x:99=8776E544 3L2110S/..-[,++ *b)((('i&%%/$q#""6!x >E LT[BAA4@v?>><=}<<;C:99 8J7665R4332Y100/a.--&,h+**-)o(''5&w%$$<#~""!D  KRZaC:B|AA@A?>>=I<;;:P9887X6554_322%1f0//,.n-,,3+u*));(}''&B%$$#I"!! QX`%g-nCCBGA@@ ?O>==\=<>'=i<;;/:p98867x655=4332E100 /L.--,T+**)[(''!&c%$$(#j"!!0 q7y>F E`DCC&BgA@@-?o>==4|==G=<< ;O:998V7665^433#2e100+/m.--2,t+**:)|(''A&%%$I#""!P W_%fFF>EDDCFBAA @M?>>=U<;;:\988"7d655)4k32211s0//8.z-,,@+**)G('' &N%$$#V"!! ]#e*l2GFF ELDCCBSA@@?Z>== 0//.E-,, +M*))(T'&&%\$##!"c! )k0r8zHGQFEEDYCBBA`@??&>h=<<-;o:9958w766<5~443D211 0K/..-S,++*Z)(( 'b&%%'$i#""/!q 6x>EHGGF_EDD$CfBAA,@n?>>3=u<;;;:|998B7665J4332Q100/Y.--,`+**&)g(''-&o%$$5#v"!!< ~D KI"HdGFF*ElDCC1BsA@@9?{>==@<;;:H9887O6554W3221^0//$.f-,,++m*))3(u'&&:%|$$#B"!! IQXIHH0GrFEE7DyCBB?A@@?F>== S=<<;[:99!8b766(5j43302q1007/y.--?,++*F)(( 'N&%%$U#""!] "d*lJJICHGGFJEDDCRBAA@Y?>>=a<;;&:h988.7p65554w322=100/D.-- ,L+**)S(''&[%$$!#c"!!( j0rKHJIIHPGFFEWDCCB_A@@%?g>==,t=<<9;{:99A8776I5443P2110X/..-_,++%*g)((,'n&%%4$v#"";!} C L[KJJ!IcHGG)FkEDD0CrBAA8@z?>>?=<<;G:99 8N7665V4332]100#/e.--+,l+**2)t('':&|%$$A#""!I PLL'KiJII.HpGFF6ExDCC=BAA@E?>> =M<;;:T9887\655!4c322)1k0//0.r-,,8+z*))@(''&G%$$ #O"!! VMnLKK4JvIHH==-,,+E*)) (M'&&%T$##"\! "dMM:L|KJJAIHHGIFEEDPCBBAX@??>`=<<%;g:99-8o76645v433<2~110D/.. -K,++*S)(('Z&%% $b#""(!i /NMMLGKJJ IOHGGFVEDDC^BAA#@e?>>+=m<;;3:u988:7|665B4332I100/Q.--,Y+**)`(''&&h%$$-#o"!!5 wO NMMLLKTJIIH\GFF"EdDCC)BkA@@1?s>==8>==K=<<;S:998[766 5b433(2j1000/q.--7,y+**?)(('F&%% $N#""!VPOO+NmMLL3KuJII:H|GGFBEDDCJBAA@Q?>>=Y<;;:`988&7h655.4p32251w0//=.--,E+** )L(''&T%$$#["!@@@"@&@(@.@2@3@6@7@9@<@>@?@A@B@B@D@E@F@F@H@I@J@K@L@M@N@O@@P@Q@Q@Q@R@S@@S@T@@T@T@@U@@V@V@@W@W@W@Y@Y@Y@Z@Z@Z@[@@\@\@@]@]@^@^@_@_@@`@``@`@a@@a@@a@a@b@ b@b@b@c@b@c@c@d@@d@d@d@ e@e@`e@e@ f@e@f@f@g@`g@g@g@@h@`h@h@h@`i@`i@i@j@i@i@i@i@i@i@i@j@i@ j@i@i@ j@ j@j@i@i@`i@@i@h@h@h@h@`h@g@ h@g@`g@`g@`g@g@f@f@f@ f@ f@ f@`e@e@`e@e@e@d@d@`d@`d@c@c@d@c@`c@`c@@c@b@b@b@@b@@b@a@a@a@`a@@a@ a@`@`@``@@`@@`@`@_@@_@_@^@]@^@]@]@\@\@\@@[@[@[@Z@@Z@Y@Y@@Y@X@@X@X@W@W@V@V@@V@U@@U@@U@T@@T@S@S@S@R@R@R@R@@Q@P@P@@P@O@N@N@N@L@L@K@K@I@I@H@G@G@F@E@E@C@C@B@B@@@@@?@>@<@;@:@8@6@5@4@1@1@.@,@(@&@"@ @@@@@:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,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ZB$WB$TB$QB$NB$KB$IB$FB$C(B$@;B$=NB$:aB$7tB$4B$1B$.B$+B$(B$%B$"B$ B$B$0B$BB$UB$hB${B$ B$B$B$B#AB$B$B$B$|B$yB$wB$tB$q,B$n?B$kRB$hdB$ewB$bB$_B$\B$YB$VB$SB$PB$NB$K!B$H4B$EGB$BYB$?lB$<B$9B$6B$3B$0B$-B$*B$(B$%B$"(B$ withheld 1 1 8528 7086 Easting Northing 4895767.000000000000000 2296945.000000000000000 2.000000000000000 0 0 -2.000000000000000 0 255 gmljp2://codestream/0 Record Interleaved jjp2cOQ)R \B@ 4zR.$gdalautotest-3.1.2/gdrivers/data/test6645.nc0000664000175000017500000000121013701057753017261 0ustar evenevenCDF latlontime  ConventionsCOARDS lat units degrees_north long_nameLatitude standard_namelatitudeaxisYxlon units degrees_east long_name Longitude standard_name longitudeaxisXtime unitshours since 1-1-1 00:00:0.0 long_nameTime standard_nametimeaxisTfakeBB@ gdalautotest-3.1.2/gdrivers/data/LanduseSmall.tb#0000664000175000017500000000026013701057753020415 0ustar evenevenILWIS 2.00 Table dX22KK2gdalautotest-3.1.2/gdrivers/data/vicar_byte.vic0000664000175000017500000000075413701057753020301 0ustar evenevenLBLSIZE=364 FORMAT='BYTE' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=4 ORG='BSQ' NL=3 NS=4 NB=1 N1=4 N2=3 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-64-LINX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0  LBLSIZE=116 TASK='GEN' DAT_TIM='Thu Oct 17 16:46:44 2019' IVAL=1.0 SINC=1.0 LINC=10.0 BINC=1.0 MODULO=0.0 gdalautotest-3.1.2/gdrivers/data/SMALL_ADRG/0000775000175000017500000000000013701057753017106 5ustar evenevengdalautotest-3.1.2/gdrivers/data/SMALL_ADRG/TRANSH01.THF0000664000175000017500000000456613701057753020624 0ustar eveneven009902L 0600135 340300003000000010420030VDR1180072FDR1020190QSR0740292QUV0670366CPS0990433CPT0570532SPR1700589BDF0500759VFF0460809 TRANSMITTAL_HEADER_FILE1000;&RECORD_ID_FIELDRTY!RID(A(3),A(2))1600;&TRANSMITTAL_HEADER_FIELDMSD!VOO!ADR!NOV!SQN!NOF!URF!EDN!DAT(A(1),A(200),A(1),I(1),I(1),I(3),A(16),I(3),A(12))1600;&DATA_SET_DESCRIPTION_FIELDNAM!STR!PRT!SWO!SWA!NEO!NEA(A(8),I(1),A(4),A(11),A(10),A(11),A(10))1000;&SECURITY_AND_RELEASE_FIELDQSS!QOD!DAT!QLE(A(1),A(1),A(12),A(200))1000;&VOLUME_UP_TO_DATENESS_FIELDSRC!DAT!SPA(A(100),A(12),A(20))1600;&TEST_PATCH_IDENTIFIER_FIELDPNM!DWV!REF!PUR!PIR!PIG!PIB(A(7),I(6),R(5),R(5),I(3),I(3),I(3))1600;&TEST_PATCH_INFORMATION_FIELDSTR!SCR(I(1),A(100))1600;&DATA_SET_PARAMETERS_FIELDNUL!NUS!NLL!NLS!NFL!NFC!PNC!PNL!COD!ROD!POR!PCB!PVB!BAD!TIF(I(6),I(6),I(6),I(6),I(3),I(3),I(6),I(6),I(1),I(1),I(1),I(1),I(1),A(12),A(1))2600;&BAND_ID_FIELD*BID!WS1!WS2(A(5),I(5),I(5))1000;&TRANSMITTAL_FILENAMES_FIELDVFF(A(51))00356 D 00055 34030010060000VDR2390006FDR0560245VTH01 11001 001017,19940101ABCDEF013ADRG-000000.50+465959.48+001000.52+48000.5000409 D 00055 34030010060000QSR2150006QUV1330221LCF01UN MILITARY SPECIFICATION ARC DIGITIZED RASTER GRAPHICS (ADRG) 022,19900222MIL-A-89007 00323 D 00075 34030010060000CPS0330006CPT1020039SPR0610141BDF0460202TPA01Black 0000000003 00000000051100051100000000400400012800012801008TESTPA01.CPHNRed 0000000000Green0000000000Blue 000000000000344 D 00130 9903001000000006000000000VFF000000052000000006VFF000000052000000058VFF000000052000000110VFF000000052000000162TFN01TRANSH01.THF TESTPA01.CPH ABCDEF01.GEN ABCDEF01.IMG gdalautotest-3.1.2/gdrivers/data/SMALL_ADRG/ABCDEF01.GEN0000664000175000017500000000324613701057753020513 0ustar eveneven008182L 0600115 340300003100000010420031DRF0570073DSI0440130OVI0820174GEN2290256SPR1290485BDF0500614TIM0390664 GENERAL_INFORMATION_FILE1000;&RECORD_ID_FIELDRTY!RID(A(3),A(2))1100;&DATA_SET_DESCRIPTION_FIELDNSH!NSV!NOZ!NOS(4I(2))1000;&DATA_SET-ID_FIELDPRT!NAM(A(4),A(8))1600;&OVERVIEW_INFORMATION_FIELDSTR!ARV!BRV!LSO!PSO(I(1),I(8),I(8),A(11),A(10))1600;&GENERAL_INFORMATION_FIELDSTR!LOD!LAD!UNIloa!SWO!SWA!NWO!NWA!NEO!NEA!SEO!SEA!SCA!ZNA!PSP!IMR!ARV!BRV!LSO!PSO!TXT(I(1),2R(6),I(3),A(11),A(10),A(11),A(10),A(11),A(10),A(11),A(10),I(9),I(2),R(5),A(1),2I(8),A(11),A(10),A(64))1600;&DATA_SET_PARAMETERS_FIELDNUL!NUS!NLL!NLS!NFL!NFC!PNC!PNL!COD!ROD!POR!PCB!PVB!BAD!TIF(4I(6),2I(3),2I(6),5I(1),A(12),A(1))2600;&BAND_ID_FIELD*BID!WS1!WS2(A(5),I(5),I(5))2100;&TILE_INDEX_MAP_FIELD*TSI(I(5))00060 D 00045 34030010060000DRF0090006DSS010101010100322 D 00151 9903001000000006000000000DSI000000013000000006OVI000000039000000019SPR000000061000000058BDF000000046000000119TIM000000006000000165OVV01ADRGABCDEF0130004606700046067-0000000.50+480000.5000000000012700012700000000100100012800012801008ABCDEF01.IMGYRed 0000000000Green0000000000Blue 00000000000000100502 D 00151 9903001000000006000000000DSI000000013000000006GEN000000219000000019SPR000000061000000238BDF000000046000000299TIM000000006000000345GIN01ADRGABCDEF0130099.90099.9016-0000000.50+465959.48-0000000.50+480000.50+0010000.52+480000.50+0010000.52+465959.4800869134101100.0N0004606700046067-0000000.50+480000.50 00000000012700012700000000100100012800012801008ABCDEF01.IMGYRed 0000000000Green0000000000Blue 000000000000001gdalautotest-3.1.2/gdrivers/data/SMALL_ADRG/ABCDEF01.IMG0000664000175000017500000014400113701057753020511 0ustar eveneven001852L 0600065 340300002000000010420020PAD0280062SCN0300090 GEO_DATA_FILE1000;&RECORD_ID_FIELDRTY!RID(A(3),A(2))1000;&PADDING_FIELDPAD(A)2000;&PIXEL_FIELD*PIX(A(1))51015 D 00088 9903001000000006000000000PAD000001769000000006SCN000049152000001775IMG01 ~}|~}|{~}||z~}||{y~}}{zyy~~||{zyx}||{zyxw~~}|{zyxwv~}}|{zyxwvu~~}{{zyxwwuu~~||{zyxwwvut~}}|{{yxxwvuts~}|{zyxxwuttsr~}||{yywvuutsrq~}|{zzyxwvutsrqq~}||{zxxwvutssqqo~}|{{yyxwvuttrqppo~}}{zyyxwvutsrrpoon}}|{zyxwwuttrrpponm~}||{zyxwwuttrqqponml}|{{yyxwvvttrrqppomll}}|{zyxxvvutsrqponmmkk~~}|{zyxxwvttsrqpoomlkjj~}|{{yxwwvutsrqqpnnmkkji~}||zzyxvuutsrqqoonmlkjih}}|{{yxxwvutsrqponnllkjihg~}}{zyxwwuuttrqqponmlkjiigg~}|{zzywwvuusrrqoonmlkjiigge~~}{zzxxwvutssqqpnmmllkihgffe}||{zxxwvuttsrqoonmlkjjhhgfed~}}|{zyxwvuutrrqponmlkkjihgfeec~}||zzyxwvutssrqponmlkjjihgfeddb}|{{zyxwwvttsrqponmlljiihggeeccb~~}{{zyxwvvtsrrqpponlljjihgfedcca`~~}|{zzywvvutsrqpoonllkiihgfedccb``~}|{zyxxwuussrqpoonlljjihgfeeccba`_ؾ躔ďɗzxwutssmlƊfddcb_^Ʒˮ񙅄xwwtsrnlddbba^]쭬뒑髏퉃xvvsrnllҀjsdcbaa]]ڴ퐊}}{zzxxwvurnmlkshgfeccbba`]\ﳲڪ}|{zzyxwvutnmlkjrfddcbaa`_\[ڐ|{{yyxwvvttnmlkjj˝ea`__^[Zᬫɨ皎~|{yyxwwuutsmmkjiiho`_^]ZY짦zyxxwvuutsqkjjhhgfef}^^]]ZX}zyxwvvttsqqoiihgfeddbav^]\[YWׯڤ茌닅}|xxwvttsrqpmmhgffedcb`k^][[ZYWW祈}|~xyqqolkkfeޤ{fe]\ZYYXWV׻穩ơ}{{{poolkjid\ZYYVUŻѳƪ졠ڇ}|{{yx{ŏonmkjiigʁ\[ZYXVT~}|{zzywvvuttrqppnnmlkjihggeddcbba`^]\\[ZYXXVUTS~}|{zzywwvutsrrqonmmlkjiigffdccba`__]]\[ZYXXVUUTS~}||{yyxvuutsrrqoommlkjiihffedcba``_^\\[ZYXWWUTTSR~~|{{zyxwvutsrqpponmlkjiiggfedccb``_^]\[ZYXWWVTTSRQ~}}{zzywwvutsrrqponmlkjjhhgfedcbb``_^]\[ZZXXVVUTSRQP~}|{zyyxwwuussrqpnnmlkkjihgeedcbb``^^]\[ZYXXVVUTSRRPO~}||{zxxwvutsrrqponmllkiiggfeecbb`__^]\[ZYYWVVUTSSRPOO~~}|{zyxwwuusrrqponmlljjiggfedccaa_^^]\[ZZYXWUUTTRQQPOM}}|zzyyxvuussqqppnnmlkjihgfeecbba`_^]\[ZZYXWVUUSRQPPONM}}|{zyxwvuutsrqponmmkkjihgffedcb```^]\\[YXXWVUTSRQPPONML~~||{zyywwuttsrqpoonmkjiihgfeeccba``_]\\[ZXXWVUTSSRQPONMML~}|{zyxxvvutsrqqpnmmlkjihgfeddcba`_^]][[YYXWVUUSRQQPONMLLK~~}|{zyxwvuutsrrqponmkkjihhffedcba`_^]\\ZZYXWVVTTRRQPONNLKJI~}||zyxxwvutsrqppnnmkkkiihgeeccbb``^^\\[YYXXVVTSRRQPONMMKJJI~}|{{yxxwvutssqqonnmlljiiggeddcbba`^]]\[ZYXWVUTSSRQPPNNMKJJIH~}||zzxxwvutssqpponmlljihggfedcbb`_^^]\[[ZXXWUTSSRQPOOMLKJJIHG~||{zyxwvuttsqqponmlkjihhffedccb`__]]\[ZYYXVUUTSRQPOONMLKIIHGF~~}{zzyxwvuusrrpponmlkjjihffeddbba`_^]\[ZYXXWUUTSRQPONNLLKJIHGGF~~||{yyxwvuutsrqponnmkjjiggfeecbba`^^]\\ZZYWWVUTSSQQOONMLKJIHGFFE~}}{{yyxxvvutsrqpoomllkjhhgfeedcba__^]\[ZYYXVUUTSRQQOONMLKJIHGFFED~}}{{zyywvuutsrqppnmmlkiihgffecbba`_^]\\ZYYWWVUTSSQPPOMMLKKIIHFFECC~}}{{zyxwvvussrqponmllkjihgfeddcb``_^]\[ZZYXWVUTSSQPPONMLKJJIHGFEDCB~~||{zzyxvvttsrqppomlljjihgfeedcba`_^^\\ZZYXWVUTSSRQPONNLKJJHHGFEDCBA~}|{zyxxvvussrqpoonmkkjihhgeddcba`_^]][[ZXXWVUTTRQQPONMMKKJIGGFEECBA@~}|{zzxwvvttsrqponmlljjjigffedcba`_^]]\[ZYXWVUUTRRQPONNLKJJHHGFEDCBAA@~}|{{yywwuttsrqqponmlkjiihffddcba`_^^]\[ZXXWWUTTSQQPONMLKJJIHGGEDCBA@@?~}}|zzyxwvuttrqqpnnmlkjjhggfedcbb`__^]\ZZYXWWVUTSRQPONMLKKJIHGGEECCBA@?>~}|{{zyxwvuttsqpoommlkjiiggfedcca`__]]\[ZYXWWUTTSRQPONNLKJIIHHFEDDCBA@?>>~~||{yyxwvuussqqponmmkjjhggfedcbb`__^]\[ZYYWWVUTSRRPOOMLKKJIHGFFDCBBA@?>><~~|{zzxxwvutssqqponmlkkihhgfeddcaa`^]]\[[ZXWVVUTSRQPOONMLKJIHHFEDDCBA@?>=<<~~||{zyxwwuutrrqponnlkjjhhgfedcba``^^]\[[ZYWWVUTSRQQOONMLKJIIGFEECBBA@??=<<:~}}{{zyxxvuussqqponmlkjjhhgfedccba`_^]\\ZZXXWUUTTRQPPONLLKJIHHGFEDCBA@@>>=<;:}||{zzxwwutssrqponmlljiihgfedccb``_^]][ZYYXVVUUSRRQPONMLKJIIHGFEDCBA@?>=<<;:9~}}|{zyywvvutsrqponnmljjhhhffedbba`__]\[[YYXWVUTSSQPPONMLKKJIGGFEDCBA@??>=<;:98~||{zyxwwuutsrqppnmlkkiihgffdccba`_^^\[ZYYXWVUTTSQQONNMLKJJHHGFEDCBBA@>=<<;:997~}}|{zyxwvvutsrqpponmkkjihhgfedcba`_^]][ZYYXWVUTSRQPOONMLKKIIHGFEDCBA@@?>=<<:9977~}||zyxxwvutsrqqonnmlkjihgfeddcbaa_^]]\[ZYXXVUTSSQPPOOMLKJJHHGFEECBAA??>=<;::9866~}|{zyxxvvutsrqpponmlkjiihgeeccbb`_^]\\[ZYXWVVTTRRQPOOMMLJIIHGFEDCCBA??>==<;:88765~}|{zzxwwvutsrqqponmlkkiiggeedcba`__^][[ZYXWVVUSSRQPONMMLJJIHGFFDCCBA??>=<;:9877654~}}|zzxwvvuttrrppnnmmkjihhgfddcbaa`^^\[[ZYXXVVTTSRQPONMMLKJIHGFEDDCB@@?>==<::9876543~}|{{yyxwvutssqpoonmlkkjiggfedcbb``_^][[ZZYWWUTTSRQPONMMKKJIIGGFDDCB@??>>=<::88765433~}}{{zyxwvutssqqponmlljihhgfedccb`_^^]\[ZYYWVVUTSRQQONMMLKJIHGFEDDCB@@??=<;::977654432~}|{{yyxwwvttrrqpoomlljjhhffeecba``_^]\[[YYXWVTTSRRPOOMLLKJIHGGEDDCBA@??>=;;99876644321}||{zyxwvutssqqpoonlljjihgfedcbb``_^]\[ZZYXWVUTSSQQOONLLKJIHHFEDDCBB@@?>=<:998776443210~}}{{zyxwvvusrrqpoomlkkjhhgfeeccba`_^]\\ZZXXWVUTTRRQPONMLKJIHHFFEDCBA@??><<::98866543210/~}}|{zyxwvutssrqpoonmlkjihgfeddcaa`_^]][ZYYXWVUTSRRQPONMLLJIHHFFEDCBA@@?>=<;:98765543210//~}|{zyywwvttsrqppnnmlkjihgfeddcaa`__]\[ZZYWWWUTSRQPPONMLKJIIHGFEDCBAA?>><<;:98865543210//.~}|{zzxxwvttsrrqpnmmlkjiigffecbba`_^]]\[ZYXWVVTTRRQPONMMKJIHGGFEDCBBA?>>=<<:99876533210/.--~~}|{zyywvvutsrqppomllkjjhgfeedcba`_^^\\[ZYXWWUUSSRQPONMMKJJHHGFEDCCBA??>=<;;99876543210/.--,}}||zyywwvutsrqpponmlkjihgffeccba`__]\\[ZYXWVVUTSRPPPOMMKKJIHGFEDCBBA@?>=<;;:8765544220/..-,+~}||{yywwvutsrrqponmlkjihgfeeccba``^]\\ZZYXWVVTTRQQPONNMLKJIHGFEEDBAA@?>=<;;98875554311/..-,,*~}||{yxxwvutsrrqponmlkjihhgfedcba`_^^]\[ZYYXWUUTSRQPONMLLKJIHGGEEDCBA@?>=<<::98765533110/.-,+**~}|{{yyxvvutsrqppnmmlkjjhgfeedcbb`_^^]\[ZZXXWUTSSRQQPNNMKKJIHHGEEDCBA@?>=<<:998665433110/.-,,*)(~}}{{zxxwvuutrrpponmmkkiihgeedccba`_]]\[ZYXWWVTTSRQPOONLKKJIHGFFECCBA@?>><<;:98765543210/.-,,+)((}||{zyxwvutssrqponmmkkjihgfeeccaa_^^]\\ZZYXWVUTSRQPOOMLLKJIHHFEDCCBA@?>><<;:98765542110/.-,,+*)('~}|{yyxwvuutsrqponnlkjiihgffddbba`_^]\[ZYXWWVUTSRRPOONLLKJIIHFEEDCBAA?>==<;999776543210//--,+*(('&~}|{zyxxvuttrrqpoomllkjhhgfedccaa__^]\[[ZYWWVUTSRQQOOMMLKJIHHFFECCBAA??><<;:987654432100.--,+*(('&%~||{zyxwvuutsrqpoonmlkjhhgfedcbba`_^]\[ZZXXWVUTTSQQPNNMLKJIHGGFEDCBAA?>=<<;:98765542220//.,,**)('&&%~~}|{zyyxwvttsrqppnmmlkiiigfeedcba`__^\[[ZYXWVUTSRRPONNMLKJIHHGFDDCBA@?>>=<;:998665432110/-,,+*)((&&%$~~}{{zyxwwuttrrqpponmlkjihgfeedcba`__]\[[ZYXWVUTSSRPOONMLLJJHHGFEDCBBA??><;<:98776543210//--,**)(''&$$#~}|{zyxwwvttsrqpoommlkjihhfeddcba``_]\\[ZXXWVVTTRQQPONMLKKJIHGFEDCBAA??>=<<:99876443221/.-,,**)('&%$$#"~}|{zyywvvutsrrqoommlkjihhffedcba`_^]\\ZZXXWVVUTSRQPONMLKKJIHGFEDCCBA@>>=<<:99876543311/..-,+*))''%$$#"!~}}{zyxxwvutsrrqpnnmlkjiiggfddbba`_^]]\[ZYXWVVTTSRQPPNMMLKJIHGFEDCBA@@?>=<;;:88765433200/.-,+**((&%%$#"!!~~}{zzxwwvuussqpponmlkjjhgffddcba`_^]][[ZYXXVUTTSRQPONNMKJJIHGFFDDBAA@?>=<<;:98765533210..-,+**(('&%###"!~}}{{zyxwvvutrqqoonmlkjihhgeedcba`_^^]\[ZYXWWVUSSRQPPONMLKJIHGGEECCAA@?>><;::9776544221//.-,+*))(&&$$#"!!~}}|{zyxwvuttsqpponmmkkiigffedcbba__^]\\ZYXWWUUSSSQPOONMLKJIHGFEDDCBAA@>><<;:88765533200/.--++*((&&%$$#! ~}{{zywwvvussrqponnmkkjihgfeedcaa__^]\[ZYYWVVTTTRQPOOMMLKJIHHFEDDCBAA??=<<;:98765532210/.-,+**((&&%%#""! ~~}{{zyxxwvusrrqponnmlkiihffeddcb``^^]\[ZZXXWVUTSSQPOONMLKKIHGFEEDCBA@??==<;:99866543210/.-,,+))('&%$##!!~}}|{zyxwwvttrrqponmlljjihgfedcbaa`_^]\[[YXXWVUTTRRQONNMLKJIHGFFDDCBBA?>><<;:99765543200/.--,**)('&%$##"! ~}||{zyxwwvutrrqponmlkjjihgffddbaa`_^]\[[ZYXWVUTTRRQOOMMLLKIIHFFEDDBA@@?==<;:997654422100/-,++*)(('%$##"! ~}|{zyxxvvutsrqpoonllkjihggfecbba`_^]][ZZYXWVVUSSRQPONMLLKIIGGFEDDCBA??>=<;::87665432100.--++*)('&%$$"" ~~}|{{yxxwuutsrqqoonmljjihggfddcba`_^^\[ZYYXWVVUTSQQPONMLKKIHHGFEEDCAA@>>=<;::8776432210/.--,+))('&%%$#"! }}||zzxwvuutsrqpoonlkkjihgffecbba`__]][[ZYXWWVTTRRQPOOMLLJJIGGFFDCBBA@?>=<;::88765432100..-++*)('&%$$#"! ~}|{zzxwwvutssqqpnnmlkjihggfeccba`_^^]\[ZYXWVUUTRRPOONMLKJJIHGFFDCBBA@?>=<;:988765433110/.-,+*)('&%%$#"" ~}|{zyyxwuutsrrpponmlkjjhhffedcba``_^\[[ZYXWVVTTRQQPONNLLJJIHGFEEDBBA@?>=<;;:88655432210/.-,+*)('&&%$#"! ~}|{zyxwuvttrqqpnmmlkjjhggfedcba`_^^]\[ZYYXVUUTRRQPPNMLKJIIHHFFEDBAA@?>><<::8876543321//.-,+*))''%%$#"!! ~}||{zywwvvtsrqqoonmlkjiihgfedcba``_]]\[ZYXWWVTTSQQPPNMMKKIIHGFEECCAA@?>=<;:988765433200/--,+*)(''&%$#"! ~~||zzyxwvutssqqponnllkjhhgfedcbaa__^]\[[YXXWUTTSRQPOONMLKJIHGFEECCBA@?>><<:998765432210/.--+*)(('&%$##! ~}}|zyyxxvuutsrqponmlkjjigffeddcb`_^]]\[[YYWVVTTSRRPONNMKJJIHHFEECCBA@?>><<;:98765533210/.-,,+*(('&%$##!! ~}|~}}{~}|{z}|{{z~}|{zzy~}}|{zyx~}}|{zyxw~}}|{zyywv}}|{zyxwvv~}{{zyxwvuu~}|{zyxxwvtt~}|{zyxwwvuss~}|{zyywvvutsr~}||zyyxwvutsrr~~}|{{yxxwvutssrq~}|{zzxxwvuussqqp}|{zzxxwvutssqqoo~~||{zyxwvuutrrqpnn~}|{{zyxwvuttrrqponm~}}|{zyxwvvttsqpponml~~}|{zyxwvutssrqponmmk~~}|{zyyxwvtsrrqppnmmlk~}|{zyywwuutsrqponmmlkj~}|{{yxxvuutsrqppnmllkji~}|{zzyxvuutsrqqpnmlkkjjh~}|{{zyxvvutsrrqpnnmlkjihg~~|{zzyxwvutssrqponmlkjihgf~}|{zzxxvvutsrqpoonmlkjihggf~}|{{yxxwvuttrqqoonmlkjiiggfe}||{zyxwvuutsrqoonmmkjihggeed}}|zzyxwvvtsrqqponmlljiiggfedc~~}{{zyxwvvussrqpoommkjiiggfeecc}|{{zyxwwvutsqqpoomlkkiiggffdcba~}|{zyxwvutssrqpoonlljjihgfeeccba~~}|{zyxxvuttsrqqonnlljjihgffedbba`~}|{zyxwvvussrqppnnllkjihgfedccba`_s2 %T4j  aFCP$ 3`zyxutsrb :mmP 'Oeedca__ΰrq]wptyxwtsr` ?mlJedcba^]Ľs+t)):dbKmzwfIxwuss^ Enml We_Ddcbb`^]t !['#PKNs}||zyxwvvur] Jnmlkaggfeccbb`_]\1{'LjkK"\V !P}|{{zxxwvut[Nnmllj 5^fedcbaa`^\[  91 ~w s|{{zyxwvuutRnmlkkj@"?aa`_^^[Zm@Ki {|zzyxwvutss \mlljjihMW__^]ZY &%d }v ~ q{zyxwvuussrM YljihhgfedS; "_^]\ ZX.y'cq!YU~} NyyxwvvttsqqnHVihhgfeedcbS^]][XXl*YGETL{H~}JoxwwuutsrqpmmDRggffddbb`Y]\[ZYXXWǻ,rq  R`}|_y}|xGitpbFqpomkj@Pfe:S^_M][ZZYXWVšph0.ch{oj}|{zlponlkji<Ke@\[ZYVU÷d' K3h"qm .+{@>u}|{zyxuJ /Woomkjihg8HP+ H[[ZYXUU~}|{zyywwvutsrqppnmmlkjjhgffddcba`__]\[[ZYXWVUUS~}||zyywwvuttrqqonnmlkjihhgfeccbba_^^][[ZYXWVUTSS~}|{{zxxwvutsrrqonnmlljjigffedcba`__^\\[ZYXXVVUTSQ~}|{zzyxwvutsrrqponmlkjiigffedcbb`__]]\[ZYXWVVUSSRR~}}{zzyxwvvttsrqponmlkkiihgeeddcaa`_]]\[ZYYXVVUTSRQP}|{{zxxwvutsrqpponmlkjiihgeedcbaa`_^]\[[YXWWUUTSRQPO~}|{zyxwvutsrrqponmlkkiiggfedccba__]]\[ZZYWWVUTSRRPOO~}}|{zyxxvuttsrqponmmlkiihgfeecbba`_^^\[ZYXXWVUTSRQQPOM~||{zyxwvvutsrqponmllkjhhgfedccb``_^]\[ZZYWWVUTSRQQOONM~~||{zzxwvvttrrqppnnmlkiihggeddbba`_^]\[[YXXWVVUSRRPPONML~}|{zyywwuussrqponnllkjihgffeccba`_^]\[[ZYXWVVUTSRPPONMLK~~}|{zyxxvvutsrrponmmlkjihgffedcba`_^^\\[ZYXWVVUSSRPPONMLLJ~}|{zyxxwuutssqpoonmlkjihgfedccba`_^^\\[ZYXWVUUTSRPOONMLKKJ~~}||zyxwwvutsrqppomllkjiigffecbbb`__]][[ZYXWVVTTSRQPONMLLJJH~}||zyxwwvutssqpponmlkjihggfedcca``^]\\[ZYXWWUTTSQQQONNLKKIIH~}}{{yyxwvutsrrqonnmlljjiggfedcbb``_^]\[ZYXXWVUSSRQPONNMLKJIHG~}}{{zxxwvvttsqqpnnmlkkjihgeedcbba__^]\[ZYYWVVUTSRQPPNMLLKJIHGG~}}{zzyxwvuttrqqpoomlkkiihffedccb``_^]\\[ZYWVVUTSRQPPONMLKJIHHFE}}|{zyxwvuutsrpoonmlkkiiggfedcbba__^]\\ZYXXWVUTSRQPONNMLKJIHGFFE~}}|{zyxwvuutsrpponmllkjihgfeecbb`__^]][ZZXXWVUTSRRQPNMMLKJJIHFFED~~}{{zyxwwuutsrqpoonlkkjhhgfeedbba`_^]\[ZZXWWVUTSRQQOONMLKJIHGFFEDC~~}|{zyxwwuttsrqqoonlljjihgfeedcba`_^^\[[ZYXWVVUSSRQONNMLKJJIHFEEDDB}}|{zyxwwvussrqpoommkkjihggfeccba`_^]\\ZZYXWVUTSRRQPONMLKJIIHGFEDCBA}}|{{yxxwuttsrqpoommkkjihgffedca``_^]\\[YYXWVUTSSRPPONNLLJIIHGFEDDCB@~}|{zzxxvuttsrqqoommljjihhgfecbba`_^]\\[YXXWVUUTRRQPOOMLKKJHHFFFDCBB@@~~}|{zyywwvttsrrponmmlkjjhhgeedbba`_^]\\ZZYXWVUTTSRQPONMMKKJIHGFFDCBBA@?~}|{zzyxvuuusrqqoonllkjihggfedcba``^]]\[ZYYWVVTSSRQPOONMKKJIHGGEDCCBA@?>~}|{zyxxwvuussqqponmlkjiihgfedcba``^]]\[ZYYXWUUTSRQPPONMLKJIHGFEEDBBA??>=~}}{zzyxwvuutrrqpnmmlkjjihfeedcbb``^^]\[ZZXWWUUTSRQPOONMLJJIHGFEDDCBA@?>==~}|{{zywwvutsrrqpnnmllkiihgeedccba__]]\[[YXWVUTTSRQPONNMLKJJHGGEECCBA@?>==<~}}{{zyxwvuusrrpponmlkjjhhgfedcbba`_^]\[ZYYXWVUTSRQPPOMMLKJIHGFFEDCBA@?>==;;~||{zyxwwvutsrpponmmljjhggfeddcb`__^]\[ZZYWVUUTSRQQPONMLKJJIGGFECBBA@@>=<;::~~||{zyxwvuussrqponmlkjjihgfedccb``_^]\[ZZXXWVUTTSRQONNMLKJIHGFEEDCBBA@>=<;;:9~}|{zyywvuttsrqponmmlkjhhgffddcba__^^\[ZYXXWVUTSRRPPONMLKJJHHGFEDCBB@??>=<;:98~}|{zyxxwuttsrqponnmlkjihhffedbb``__]\[[ZYWWVUUTSRPPONMLKJIIHGFEDCCA@??==<;:988~}|{{yywvuussrqponnllkjihggfedcba`_^]\\ZZYXWVUTTRRQPONMLLJJHHGFEECBB@@>>=<;:9876~~}|{zyyxvvutsrqpoonmljjihggeddcaa``^]\\[ZXXWVUUSSRQPONMLKKJIHGFEDCBBA@>==<<::9776~}|{zyxxwuutsrrqoonmlkjihhgfeccba`_^^][[ZYXWWUUSSRQPONMLLKJIHGFEEDBAA@?>=<;;:87665~}}|{zyxwvutsrrqoonmlkjihggeedcba`__]][[ZYXXWVUTRRQPPNMMLKJIHGFEDCCAA@?>=<<;:987554~}|{zyxxwvutsrqpponlllkjigfeedcba`__^][[ZYXXWVUSSRQPPOMLLJJIHGFEECCA@@?>=<;:99876553~}}|{zyxwvuussqqponmlkkjhhgfedcba`_^^]\[ZYXWVUUTSRQPPNNMKJJHHGFEEDCBA@?>=<;;:98765442~}||{yyxwvvtsrrpponmlljiiggfedcba``_]]\[ZYXXWVUTSRRPPNNMKKJIHGFFECCBA@??><<;:987654432}}|{zyxwwuusrrqponnlkkjihgfeddbaa__^]\[ZZYWWVUTSRQPPONMLKJIHHFEDDCBB@@>><;;:9877554320~~||{zyxwwvutsrqpoommkkiihgfedcba``^^]\[ZZXWVVUTSRQQPONMLKJJHGGEEDCBA@@>>=<;:98766433210}}|{zyxwvvutsrqponnllkiihgfedcbba`_^]\[ZYYWWVUTSRQQPNMLLLKJIHGEEDCBAA?>==<;:98876443210/~}|{zyxwvuutsrqpoomllkjhhhffedcaa`_^]\\ZZXXWVUUSRQQOOMMLLJJIHGEEDCBA@??>=<;:98765543210/.~~}|{zyxxvuutsrqqponmlkjihgfeedcba`_^]][[ZYWWVUTSSQQPONMLKKIIGGFEDCCB@??>=<;:98766542210/.-~||{zyxwwutssrqponmmlkjihggfdcbba`_^]\[[YYXWWUTSRRQPNNMLLJIHHGFEDDCBA?>==<;;:97764432100.--~}|{zyyxvvutsrqpponmlkjihgffddcaa`_^]][ZZYXWVVTSSRQPONMLKKIIHGFEDCBBA@>==<;::88665432110..-,~}|{{zxwwvutsrqqpnmmlkjiigffedbbaa_^]]\[ZYXWVUUTSRQPOOMMKJJIHGFFECBA@@?>==;;998765432100/--,+~~}||zzxxwvutsrrpponmlkjjhhfeeccca`__]]\[ZYYWVVUTRRQPONMLKJJHHGFEDDCBA@?>=<;::98665433100/.-,+*~}||{yyxwvutssrqpnnmlljiihffedcbaa_^^]\[ZYYXVVUSSRQPONMMLKJIHGFEDCBAA@?>==<:998765432100/.--+*)}}{{zyxwvuttrqqpommlkjjhggfedcba`__]]\[[YYWVUUSSRQPONNLLJJIHGFFDCCBA@?>==<::98765532210/.-,+**(~~|{zzyxwvvutrrqponnlkjjihffedcbaa__^]\\ZYXWVVTSSRQPONNLKKJIHGFEEDBBA@??>=<;998765432100/.-,+**)(~~||{zyxwvvtsrrqponnlkjihhgfedcbba__^]\\ZYYXWUUTSRQPPOMLLKJIIGFFEDCBAA?>=<;;:98865432210/.-,,*))('~}||{zyxwwutssrqponmmlkjihgfeddcba`^^]\[ZYYXVVUTSRRPONMMLKJIHGGFEDCBA@?>>=<;:99766432200/.--++))('&}|{{zyxwvvutrrpponnlkjjihgfedccba__^]][ZYXWWVUTSRQPOONMLKKIHGFEEDCBA@??><<;:99776443210//.-++))('&%~}}|zzyxwvuutsrqponmmkjjihhfeecbaa`__]\\ZYXXWVUTSSQPONNMLKJJIGFFEDDBAA@?>=;;:99776433210/.-,++*))'&&%~~}|{zyyxvuussrqponmllkjihggedccba`_^]\\[ZYWWVVUSRRPPONMLKJIHGGFEDCBA@?>=<<;;:87765432100..,++*))'&%$$~~}|{zzywvuutsrqqonnllkjihhgfddcba``^^\\ZYYXWVVTTSRPPONMLKJJIHFFEDCBBA@?><<;:987765432100..-,**)(('&$##~~}|{zyxwwvttsrqponmmlkjihgfeeccba`_^]\[[YYXWWUUTSQQPONMLKJJHHGFEDCCA@??>=<;;998754432100..-,+*)('&%$#""~}|{zyywwvuttrqppnnmlkjihgffedcba`_^]]\[YYXWVUUTSRQPONMMKJJIHGFEDCBB@@?>=<;:997765442110/.-,+*))''&%$#"!~}||zyywvuuttrqqponmlkjihhgeeccba`_^]\[[ZYXWVVUTRRPPPNNLKKJIHGFEEDBBA@?>=<<::87765442100.--,+**)''%%$#"!!~}|{zzyxwvuttrqpponllkjiigffedcbaa__^]\[ZYXWVUUTSRQPPNNLLJJIHGFFEDCBA@?>==<::97765442110/.--++))('&%$#"! ~}|{{zyxwvutssrqoonmlkkiihffddcbaa`_^][[ZYXWWUUTSRQQONNMLKJIHGGEDCCBA??>><;;:8876653210//.-,+*))''&%%##! }}{zyyxwvvtssrqponmllkihggfedcbb``_^]\[ZYYWWVUTSRQPPNMMKKJIHGFFECCBA@??>=<;:8776554221//.--+**)('%%$$#!! ~}||{zyxwvuttsrqpoomlkkiihgeedcba``_^]\[ZYXXWUUTSRRPPNNMLKJIHGFEDDCBA@?>==<;:9876643321//.--,+*(('&%$#"!!}}|{yyxwvuusrqqpoomlkkjhhgfedcbaa__]]\[[YYXWVUTSSQQONNLLKJJHGGEEDCBAA??=<<;:98865443210/.-,++*)('&%%#""! ~~||{zyxwvuussrqponmlkjjihgfeddcaa`_^]\\ZZXWWVUTSRQQONNMLKJIHHGEDDBBA@?>==<;:98766443100/..,+**)('&%$#"" ~~}|zzzyxwuutsrqponmlkkjihggeddbba__^^\[[ZYXWVUUSSQQOONMLKJIIGGFEDCCA@??>=<;:98776543210//-,,+*)(''&%$#!! ~}|{zzxwvvttsrqppnnmlkjihgfeedbaa`__]][[ZYWWVUTTRQQOONMLLKIHGGFEDCBAA??==<;:99775542210/.-,,+*)((&&$$#"! }}|{zyyxwvutrrqqonnmkkjihgfeecca``_^]\[ZZYXWVUTSSRQPNNMLLKIIHGFEDCBA@@>>=<;:98775533210//--++*)('&%%$#"! ~}|{zzxwvvutsrqqoonmkjjihggeddcba`_^]\[[ZYXWVVTSRRQPONMLKKJIHGFFDCBAA@>>=<;:997665432100.--,+*)(('%$##"! ~~}|{zyxxwuutsrqqonmllkjihgfeedcba``_^\\ZZYXWWVTTRRPPONMLLKJIHGFEDCCAA??>=<<:98775543321//.,,+*)((&&%$#"! ~}|{zyyxwvutssqqponmlkjjigffedcba``_^\\[ZYXWVUUTRQQPONNLLKJIHGFEDCBBA@?>=<;::8776544210//.-,++*)'&%%$#"!!~}|{{zxxvvutsrqpponmmkjihhgfedcbb`__]]\ZZYXXWUTSSRQPOOMMLKJIHGFEDCBAA@?>==;:99876543220//.,,++)(''&%$#"! ~~}|{yyxwvvutsrpponmlkjiihgeedcba``_^]\[ZZXXVVUSSRQPPONLKJJIHGGFDCCBA@?>><;::98765532100/.-,+*)(('&%$#"!!}}|zzywwvutsrrpoonmlljiiggfedcbba`^^]\[ZZXWWVUTSRRPOONMLKJIHGGEDDCBA@?>=<;:99776553211//.-,+**)('&%$$"! ~}}{{yyxwwuttrrqponmllkjhhgfeeccba__^]\[[ZYXVVUTSRRPPONMLKJIHGGFEDCAA@?>><;::98775443200/..,,*)(('&%$##!! ~}}~}}{~}|{z~}||{z~~||{zy}}{{zxx~|{zzyxw}|{{zxywv~}{zzyxwvv~~}|{zyxwvvt~~||{zyxxwuus~}|{{yywvvuts~}|{zyyxwvttsr~}|{zzywvvutsrq~~}|{zyyxwvutsrrq~}|{zyxxwvuttrqpo~~||{zywwvutsrrppo~~}|zzyxwvuussqqpon~~|{{zyxwwvttrrpoonn~~||{zyxwwuttsrqponmm~}||{zyxwvuussqqponmll}||{zyxwwuttrrqponmlkj~}}|{zyxwwuussrqponnmlkj}}|{zyxxwuutsrqpoonlkjji~~||{zyywwvutsrqpoomlkjjih~~}||zzxwvvutsrqpponmlkjihh~~}|{{yyxvuutsrqpoommlkjiigg~}|{{yyxwvvtsrqqpnmllkkiihgf~}}{zyxxwvutssqqponmlkjihggfd~}|{zzyxwvutsrrqponmlkkiihfeed~~}{{zyxwvuusrqqponmllkiihgfedc~}}{{yyxwvuussrqponnlljjihgfedcc~}}|{zyxwwvttsqqponmmlkjihgfedccb~~}|{zyxwvvttsrqponmmlkiihggedccba~||{zyywvvutsrqpoonmkkjihggeeccba`~~}|{zzyxwuutsrrpoommkkiihggfeccaa`_t2 %T4j  aFCQ$ 3`yxwussra :mmP 'Ofdcbb`^Ͱrq^wptyxvtsr` ?nlJedcba^^Ľs+u)*:dcKmzwfIxvvsr^ Enml Wf^Ddcba`]\s !['#PJMs~}{{zyxwvur] Inmlkbhgfedcba``\\1{'LjkK"\W !P~|{{yywwvut\Nnmlkj 5_fedcba`_^\[  91 ~w r|{{zyxwvuttRnmmlki@"?`aa__][Zm@Kj z{zzxxwvvttr \mlkjiihMX`^^]ZY &%e |v ~ qzzyxwvutssqM YkkiihgfedS; "^^]\ ZY.y'bp!YU ~} NzyxwvvussrqnHViihgfeedbbT^]\[XXl*YGESM|H}|JoxxwuttsrqpmmDRhgfeeccbaY^]\[YXXWƼ,rq  Q`}}_y}|xGhsqbFqqolkk@Ofe:S__M\\ZZYXWVšoh0.ch{oi||{zlpoolkji<Ke?[ZZYWUķd' J3h"qm .,{@>v}||zyxuJ /Woonkjiig8IP+ H\[ZYXUU}}|{{yywvvutsrrqoonmlkjihgffedcba`_^^]\[ZYXWVVTT~}|{{yyxwvutsrqpoonllkkihhgfedcba`__^\\[ZYYWVVUTR~}|{{yywvvutsrqpponmlkjihgffddcba`__^\[[ZYXWVUUTSR~}||zyyxwvuusrrpoonmmkjjhggfedcbaa__^]\[ZZXWVVUTSRQ~}||zyyxwvuttrrqoonmlkkihggfeddba`__^]\[ZYXWVUUTRRQP~~}{{zyxwvuutrqqponmlljiihgfedcbb`_^]]\[ZYXWVVUTSRQQP~~}|{zyxwvutssqqponmlkjjiggfedccba__^]\[ZYYXWVUTSSQQPN~}|{zyxwvuussrqponnmlkiihggfddbaa`_^]\[ZYYXVVUTSRRQPON~}}|zzyxxvvutsrqpoomlkkjiggfeedbaa__^]\[ZZXXVVUUTRRQPONM~~||{zyxwwuutrrqppnmlkjiihgfedcbba`_^]\[[ZYXVVVTSSQPPONML~}}|{zyxxvvttsrqponnmlkiihggfedbb``_^]][[ZYXWVVUSSQPPONMLK~~}||zyyxvvutsrqppnnllkjihgfeddcba`__]\\[YYXXVUTSRQQPONMLKK}}||zyyxwvutsrqppnnmlkjihgffedcba``_^\\[ZYXWVVUTSRPPONNLLKJ~~}|{{zxxwvutsrrpoonmkkjihhffddcba`_^]][[ZYXWVUUTSQQPONMMKJJI~}|{{zyxwuutssqqoonmlkjiigfedccbaa`^]]\[ZZYWWUTTSRQPPNMLLJJHH~}|{{yyxwvutssqppnnmmkjjiggfedcca``^]\\[ZYYWWUTTSRQQONNMKKJIHG~}|{{yyxwvutssqqoonmlkjjhggfedcbaa_^^]\[ZYXWWUUTSRQPOONMKKJIIGG~}|{{zyxwvvtssrqponnlkjihhgfedcbaa`^^]\[ZYYWVVTTSRQQOOMMLKJIIGGF~}||zyxxwvuusrqqponmlkkihhgfedccba_^^]\\[YXWVVUTSRQQOOMLLKJJIGFFE}||{zxxwvuussrqponnlkkjihgfeddbba`_^]\[ZYXXWVUTSRQPPONMLKJJIGGFED}}|{zyxwwuttsrqponnllkihhgfedcca``_^]\[ZYYXVVUTSRQPPONMLKJJIHGEDDC~~}|{{yxwwuutrrqponmmlkjihgfeddcba`__]\[ZZXXWVUUSRRPPONMLLJIHGFEEDCB~}|{zyxxvvussrqpoonmlkjihgffeccba`_^]\[ZZYXWVUTSSRQOONMLKJIIHFFEDCBB~}|{{yyxwvutsrqppnnlkkjihhffddcba`_^^\[[ZYXWWVTTSQQONNMLLKIIGGFEDCCA@~}||zyywwvutsrrqoommlkjihgffedcba`_^^]\[ZYXWVUTSSRQOONMLKJJIHGFEDDCA@@~}||zzywvvutsrrqponmkkjjiggeddbbaa`^^]\[YYXWWUUTRRQPONMMKJJIGGFEDDBA@@?~}|{zzxxwvutsrqpoonmlljjihffddcba``_^][[ZYXXVUTTSRQPONMLKKIIHGFEEDCBA@?>~}||zzxxwvuttrqqonnmlkjjhhgfddcbaa__^]\[ZYXWVVUTSRQPONNLKKIIHGFEEDCBA@?>=~}||{yxxwvutsrrqponmlkkiihffedcbb`__]]\[[YXXVVUSSRRPOONMKKJIHGFEEDBBA@?>><~~|{zzyxwvuutrqqponmlljjhggfeecbba`^]]\\[ZYWVVUTSRQPOONMLKJIHGFEEDCBA@?>>=;~}}|{yxxwvuusrrqponmlkkjhgffedccaa`_^]\[ZYYWWUUTSRQPPNMLLKJJHGFEEDCAA@@>=<<:~~}|{zyxwvuutrqqponmlkjjihgfeecbba__^]\\ZZXXWUUTSRQPONNMLKJIHGGEEDCBA@@>>=<;:~}{zzyxwvuutsqqponnmkkiihgfedcbba`_^]\[[YXXVVUTSRRPPONMLKKIHGFEDDCCA@??>=<;:9~}}{{zyyxvvussrqppnmlkjjihgfeeccba`_^]\[[ZYXVVUTSRRPPOMMLKKJIHFFEDCBA@??==<;:98}||{{zxwwvutsrqppnnmlkjihgfeedba```^]\\[ZYXWVUTTRQQOONMLLJJIHGFEDCBB@@>=<<;:988}}|{zyxxvvussrqppnmmlkjihgfeddcba`_^^][ZZYXWVUTTSRQPONMLKJIHHGFEDDBAA??==<;:9976~}|{zzxxwuttsrrpoonmlkjihhffdccba`_^]\[ZZYXWWUUSSRQPONMLLKIHHGFEDCCB@@?==<;:99876~}||{yywvvutsrqponnmlkjihhffdccba`_^^\\[ZXXXVUUTRRQPONNLKJJHHGFEDCBAA@?>=<;;:87765~}|{zzxxwvutsrrqonnmlkjjhhfeedccaa_^^][[ZYXXWVUTSQPPONMMLJJIGGFEDCBAA@?>=<;::986654~}||{zyxwvuttrrqpnnmlljjhhgeedcbaa`_]][[ZYXWWUUSSRQPONMMKJJIHGFEDCBAA@?>==<::8876554~~|{zyyxwvutssqqonnmlljjigfeedccaa`^^\\[ZYXWWVUTSRQPOOMLKJJIHGFEEDCBA@?>==;:988765432~~}{{zyxwvutsrqpponmmljiiggfedccaa`^^]\[ZYYWWUUSSRQPOONLLKJIHGFEECCBA@?>=<;;:987764322}}{{zyxwvvusrrqoonmlljiihgfeddba``_^]\[ZZYXWVUTSRRQONNLLKJIHHGEEDCBA@?>>=<;99876553210~~|{{zyxwvvutsrppoonmkkjihggeecca``^^]\[[YXXVUUTSRQPPONLLKJIHGFEECCBA@??>=<;:98765533210}}|{zyxwvvutsqqponmllkjihgfeddbb``_^]\[ZYYXWVUTSRQPPNNMLKKJHGFEEDCBB@?>=<<;:98776533210/~}|{zzxwwuttrrqqonmmlkjihgfeeccba__^]\\ZZYXWVUUSRQPPNNMLKJIHHGFEDCBAA?>>=<;:98776543211//~}||{zyywwvutsrqponnmlkjihgffedcba`__]\[[ZYXWVUTTSRQPNNMMKKIHGGEEDCBAA?>>=<;:987655432100.-~}|{zzxxwvutsrqppnnmkkjihgfedccba`__]\[[ZYXWVUTSSQQPONNMKJIIGFFEDCBB@@?>=<;:987765432200.-,~}|{{yxwwvutsrqqonnmlkjihggeddbbaa_^^\\[ZYXWWVTTSQQPONMLKJJHHFFEDCCBA@>>=<;:98866543211/.--,~}}{zyxwwvttsrrqoonllkjihgffeccba``_^][[YYYXVVUTSRQOONMLKJJIHGFEDCBB@@?>=<;;988765443100/--,+~}|{zyxwwvuttrrqoonmlkjiihgfedcbba_^]]\[ZYXWWVUSSRQPONNLKKJHHGFEDDCBA??>=<;:998665432100/.-,+*~}|{{yywwvutsrqpponmlkjihhfeedcbba`_^][[ZYXWVUTSSRQPONMMKJIIHGFEDDBBA@?>=<<;:88765533200/--,+**~}|{zyyxwvutsrqpoonmmkjiihgfedcbb`__^]\[ZYXXVVTTSRQPONNMKKJIHGFEDCCBA@?>=<<:988765432210..-,,+*(~}}|{yyxwvutsrrqponmlkkihhfeedccaa__^]\[ZYXXVVUSSRQPONMLLKJIHGGFEDBBA@?>>=;;:98765533100/..,,**)(~~||{zyxwwvttsrqpoommkjiihffeddbaa`_]]\[ZYXXWUUTSRQQOONMLJJIHHFFEDCBA@@?=<;;:98765543200/.--++*)('~~}|{zyxwvvtsrqpponmlkkiihgffdcbba`_^]\[[YXWVUUTSSQQPOMMLKJIHHFFEDCBB@@>==<::98765543210/.--,*))(''~~||{zyxwvuutsrpponmlljjihgfeedcaa__^]\[[YXXWVTTSSQQPONMLKJIHHFFEDCBA@@>=<<;:99765542200/..,++*)('&%~~}|{zyywwuttrrqponmmkjjihggeddcba`_^]][[YYXWVUTSSRPOOMMLKKJIGFFEDCBAA?>==<;:99766543210/.-,,+*)('&%$~}|{zyyxwvutsrqponnmkjjihgfeddcba``^^][[ZYXWVUTSRQQPOMMLKJIIGFFEDCBA@??=<<;:98765543210/.--++*)(''%%$}||{zyxwwvutsrqppnmllkjihhffdccba`_^^\\ZZYXWWUTSSQQPONNMKJJIHFFEDCBAA@?>=<;:988764432110.-,,+*)(''&%$#~~}|{{zyxwvutsrqppomlljjihgfeedcbaa__]\\[ZYXWVUTSRQQPONMLKJJIHGFEEDBBA@?>=<<:997765433110..-++*)(''&$##"~}||zyxxwvutssqqoommkkjihhffedcbaa_^]\\ZYYXWWUTTSRQPONMMKKJHGGFEDCBB@@?>=<;::9876543210/.--,+*))'&&%$#"!~}}|zzyxvvutsrqpoonmllkjigfeedbbaa_^^]\[ZYXWWVTTSRQPONMMKKJIHGGEDCCAA??>==;:998765432100/.-,+*))''%%##"! ~}|{{yxxwvutssrpponmlkjihggfedcbaa`^^\\[ZYXXVUTTSRQPONNMLKJIHGFEDCBBA@?>=<;;98876543221//.-,+**((&&%$#"" ~}|{{zyxwvutssrppommlkjihhfeedcbba__^\\[ZYYWVVUSSRQQONNMKKIIHGFFDCCAA@?>><;;998765432100..-,+*))(&&%$#"!! ~}|{{yyxwvutssrpponmlkjiiggfedcbba__^]\[ZZXWVUUTSRQPONNLLKJJHGFEDCCBA@@>=<;;:98765432200/.--+*)(('&%$#"! ~}|{{zxxwvutsrrpponmlkjiihffedccaa__^]\[ZYYWWVUTSRQPONMMLKJIHGGEEDCBAA??>=;;:98765433110/.-,,+*)('&%$#"! ~~||{yyxwvutssrqponmmkjiihgfeddca`__^]\[ZZXWWVTTSRQQPNNMLKJJHHGFECCBA@??>=<;:98775543210/.-,++)(('&&%$#"! }}|{zyxwwuttrrqponnlkjjihgfeddbb``_^]\[ZZYXVVUTSRQQONNMLKJIIGGFEDCBAA@>=<<;998776443200//--,+*)(''%$#"! ~}|{zyxwvvutsqqpoommlkihhggfeccba`_^]\\ZZYXWVUUSRRQPONMLKKIHHFFEDCBB@??==<;:99866533210/..-,+*)('&&$$#!!~}}|{zzyxvuttsrqponmmlkiihggeedcba`_^^\[ZZYXWVUTSSQPPONMLKJJIGFFEDCBB@?>>=<;:99775543211/..-++))('&%$##"! ~~}|{{yxwvuttsrqponmmljjihgfeddcba`_^^][[ZYXWWUTSSQQPONMLKJJHGGFEDCCAA@?==<;:988765432100.--,+*))(&%%$#"! ~~}|{zyxxwuttsrqponnmlkjiihffddcba`_^]]\ZZYXWWUTTRRQPONMMLKJIHFFEDCBAA@?><<;:99866543311//-,,+*))''%$$#"!!}}|{{yyxwvutsrqponmllkjihggeddcba`_^^]\[ZYXXWUUTRQPPONMMKKJIHGFEEDBAA@?>=<;;:9876544211//.-,+*)('&&%#""! ~}|{zzxxwvuttsqqponmlkjihgffecbba`_^^]\[ZYXWVVTSSRQPONMMKKJIHGFEDDBA@@?>==;;98776443210/..,,+**)''&$##"! ~}|{zyxwwvutsrqpoonmlkjihhffddcba``^^]\[ZYXXWVTTSQQPPNMMKJJIHGFEDDBAA@?>=<<:99876544311//.,,+*)(('%$$#"! ~}|{{yyxwvutssqqpnnmlkjihhgeedcbba`_^]\[ZYXXVVTSSQQPOONMKKJIHGFEDDBAA@?>>=<;:98765433200/.-,+**)''&%$#""! ~}|{{zxxwvutsrrqponmmkjjiggfedcba``_^]\[ZYYWVUUTSRQPPOMLLKJIIGFEEDBBA@?>=<;;998776542210/..,,+))''%%%#"! ~~|{{zyxwvuussrpponmlljiihgfeddbba`_^]\[ZYYXVVUTSRQPPOMMLKJJHGGEEDCBA@?>=<<;:98866533200/.--++))('&%$##! gdalautotest-3.1.2/gdrivers/data/byte.rsw0000664000175000017500000000403013701057753017136 0ustar evenevenRSW@UUUUUd@N@tLA@A@@   !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/bug6581_src.vrt0000664000175000017500000000321413701057753020146 0ustar eveneven Red byte.tif 1 127 0 Green byte.tif 1 127 0 Blue byte.tif 1 127 0 gdalautotest-3.1.2/gdrivers/data/uint16-old-elevation-extension.gpkg0000664000175000017500000004600013701057753024213 0ustar evenevenSQLite format 3@ & 'GPKG -    !sf 11[;kUndefined cartesian SRSNONEundefinedundefined cartesian coordinate reference system \=mUndefined geographic SRSNONEundefinedundefined geographic coordinate reference system ff + WGS 84 geodeticEPSGGEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]longitude/latitude coordinates in decimal degrees on the WGS 84 spheroid % ++C=ogr_empty_tablefeaturesogr_empty_tableTechnical table needed to be conformant with Requirement 17 of the GeoPackage specification2018-03-21T14:30:26.812ZP 3 =uint162d-gridded-coverageuint162018-03-21T14:30:26.812Z98@9=hW +ogr_empty_table  uint16 +ogr_empty_table  uint16 ||9M'indexsqlite_autoindex_gpkg_contents_2gpkg_contents9M'indexsqlite_autoindex_g55)tablegpkg_spatial_ref_sysgpkg_spatial_ref_sysCREATE TABLE gpkg_spatial_ref_sys (srs_name TEXT NOT NULL,srs_id INTEGER NOT NULL PRIMARY KEY,organization TEXT NOT NULL,organization_coordsys_id INTEGER NOT NULL,definition TEXT NOT NULL,description TEXT) &a&9M'indexsqlite_autoindex_gpkg_contents_1gpkg_contents''wtablegpkg_contentsgpkg_contentsCREATE TABLE gpkg_contents (table_name TEXT NOT NULL PRIMARY KEY,data_type TEXT NOT NULL,identifier TEXT UNIQUE,description TEXT DEFAULT '',last_change DATETIME NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),min_x DOUBLE, min_y DOUBLE,max_x DOUBLE, max_y DOUBLE,srs_id INTEGER,CONSTRAINT fk_gc_r_srs_id FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys(srs_id)) $$9955_tablegpkg_tile_matrix_setgpkg_tile_matrix_set CREATE TABLE gpkg_tile_matrix_set (table_name TEXT NOT NULL PRIMARY KEY,srs_id INTEGER NOT NULL,min_x DOUBLE NOT NULL,min_y DOUBLE NOT NULL,max_x DOUBLE NOT NULL,max_y DOUBLE NOT NULL,CONSTRAINT fk_gtms_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name),CONSTRAINT fk_gtms_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id))9M'indexsqlite_autoindex_gpkg_contents_2gpkg_contents uint16hW98@9=   uint16 nnG[5indexsqlite_autoindex_gpkg_tile_matrix_set_1gpkg_tile_matrix_set   uint16<<   uint16 ::C--9tablegpkg_tile_matrixgpkg_tile_matrixCREATE TABLE gpkg_tile_matrix (table_name TEXT NOT NULL,zoom_level INTEGER NOT NULL,matrix_width INTEGER NOT NULL,matrix_height INTEGER NOT NULL,tile_width INTEGER NOT NULL,tile_height INTEGER NOT NULL,pixel_x_size DOUBLE NOT NULL,pixel_y_size DOUBLE NOT NULL,CONSTRAINT pk_ttm PRIMARY KEY (table_name, zoom_level),CONSTRAINT fk_tmm_table_name FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name)) JJP ++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)k 1tableuint16uint16CREATE TABLE "uint16" (id INTEGER PRIMARY KEY AUTOINCREMENT,zoom_level INTEGER NOT NULL,tile_column INTEGER NOT NULL,tile_row INTEGER NOT NULL,tile_data BLOB NOT NULL,UNIQUE (zoom_level, tile_column, tile_row))+ ?indexsqlite_autoindex_uint16_1uint16?S-indexsqlite_autoindex_gpkg_tile_matrix_1gpkg_tile_matrix 77F PNG  IHDRrIDAT(=/AO'fk2@;w'H!AEPG ɒ &33A>m|V Al6F Ze`U U6J 7`,X4*` Ih`5Lȃbo$]GAA5Nf4UgUq B$Gc7AuP;nf̂uh_;;\< [/AͲsϐYDYI4dEIݫjTUUT7{Rp6"l}//4E'G׭7YP\D߽v1عuziEf؛*;j[ܺEsE2-(hN^ "ydSE2JYddM$7>{'8j1YeOi="n| ;f?cP9IENDB`  !I gpkg_2d_gridded_tile_ancillary  uint16%Q gpkg_2d_gridded_coverage_ancillary hphz5!uint16tile_datagpkg_elevation_tileshttp://www.geopackage.org/spec/#extension_tiled_gridded_elevation_dataread-write I5!gpkg_2d_gridded_tile_ancillarygpkg_elevation_tileshttp://www.geopackage.org/spec/#extension_tiled_gridded_elevation_dataread-write Q5!gpkg_2d_gridded_coverage_ancillarygpkg_elevation_tileshttp://www.geopackage.org/spec/#extension_tiled_gridded_elevation_dataread-write aa)5uint16tile_datagpkg_elevation_tiles8I5gpkg_2d_gridded_tile_ancillarygpkg_elevation_tiles;Q5 gpkg_2d_gridded_coverage_ancillarygpkg_elevation_tiles 44cwQindexsqlite_autoindex_gpkg_2d_gridded_coverage_ancillary_1gpkg_2d_gridded_coverage_ancillaryzQQ_tablegpkg_2d_gridded_coverage_an= Q+indexsqlite_autoindex_gpkg_extensions_1gpkg_extensionsw ++%tablegpkg_extensionsgpkg_extensionsCREATE TABLE gpkg_extensions (table_name TEXT,column_name TEXT,extension_name TEXT NOT NULL,definition TEXT NOT NULL,scope TEXT NOT NULL,CONSTRAINT ge_tce UNIQUE (table_name, column_name, extension_name))   uint16integer   uint16cillarygpkg_2d_gridded_coverage_ancillaryCREATE TABLE gpkg_2d_gridded_coverage_ancillary (id INTEGER PRIMARY KEY AUTOINCREMENT,tile_matrix_set_name TEXT NOT NULL UNIQUE,datatype TEXT NOT NULL DEFAULT 'integer',scale REAL NOT NULL DEFAULT 1.0,offset REAL NOT NULL DEFAULT 0.0,precision REAL DEFAULT 1.0,data_null REAL,CONSTRAINT fk_g2dgtct_name FOREIGN KEY('tile_matrix_set_name') REFERENCES gpkg_tile_matrix_set ( table_name )CHECK (datatype in ('integer','float'))) #  uint16J@_\(@6Cf   uint16 eDo77tablegpkg_geometry_columnsgpkg_g%I]7indexsqlite_autoindex_gpkg_geometry_columns_2gpkg_geometry_columns$I]7indexsqlite_autoindex_gpkg_geometry_columns_1gpkg_geometry_columns#cIIAtablegpkg_2d_gridded_tile_ancill[oIindexsqlite_autoindex_gpkg_2d_gridded_tile_ancillary_1gpkg_2d_gridded_tile_ancillary ++Stableogr_empty_tableogr_empty_table&CREATE TABLE "ogr_empty_table" ( "fid" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "geom" GEOMETRY)arygpkg_2d_gridded_tile_ancillaryCREATE TABLE gpkg_2d_gridded_tile_ancillary (id INTEGER PRIMARY KEY AUTOINCREMENT,tpudt_name TEXT NOT NULL,tpudt_id INTEGER NOT NULL,scale REAL NOT NULL DEFAULT 1.0,offset REAL NOT NULL DEFAULT 0.0,min REAL DEFAULT NULL,max REAL DEFAULT NULL,mean REAL DEFAULT NULL,std_dev REAL DEFAULT NULL,CONSTRAINT fk_g2dgtat_name FOREIGN KEY (tpudt_name) REFERENCES gpkg_contents(table_name),UNIQUE (tpudt_name, tpudt_id)) {sUWGS 84 3DEPSGsGEODCRS["WGS 84",DATUM["World Geodetic System 1984", ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1.0]]],CS[ellipsoidal,3], AXIS["latitude",north,ORDER[1],ANGLEUNIT["degree",0.01745329252]], AXIS["longitude",east,ORDER[2],ANGLEUNIT["degree",0.01745329252]], AXIS["ellipsoidal height",up,ORDER[3],LENGTHUNIT["metre",1.0]],ID["EPSG",4979]]786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]] ``W5oNAD27 / UTM zone 11NEPSGhWPROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9 "+ogr_empty_tablegeomGEOMETRY + ogr_empty_tablegeom + ogr_empty_tableeometry_columns"CREATE TABLE gpkg_geometry_columns (table_name TEXT NOT NULL,column_name TEXT NOT NULL,geometry_type_name TEXT NOT NULL,srs_id INTEGER NOT NULL,z TINYINT NOT NULL,m TINYINT NOT NULL,CONSTRAINT pk_geom_cols PRIMARY KEY (table_name, column_name),CONSTRAINT uk_gc_table_name UNIQUE (table_name),CONSTRAINT fk_gc_tn FOREIGN KEY (table_name) REFERENCES gpkg_contents(table_name),CONSTRAINT fk_gc_srs FOREIGN KEY (srs_id) REFERENCES gpkg_spatial_ref_sys (srs_id)) gdalautotest-3.1.2/gdrivers/data/recursive_groups.h50000664000175000017500000000504013701057753021304 0ustar evenevenHDF   `TREEHEAPXsubgroup@ HTREE(HHEAPp  SNOD HhSNOD` Hhp(@H`link_to_rootlink_to_selfsoft_link_to_root/soft_link_to_self/subgroupsoft_link_to_not_existing/not_existing link_to_root` link_to_self 0soft_link_to_not_existing /not_existingsoft_link_to_root/ soft_link_to_self /subgroup8@ext_link_to_self_rootrecursive_groups.h5/gdalautotest-3.1.2/gdrivers/data/trmm-nc4z.nc0000664000175000017500000005345413701057753017631 0ustar evenevenHDF  ,W0!3OHDR-(N(N(N(N"  alat lon pcpi\FRHP" ? (XpBTHDd( !BTHD  d( )J4FSHDNPx( %%zBTLF# t?& ", .R(e`?k)07Eď`0o'0-% (z: poz}#N? + dֺBTLF )?&e``% E'#+ ", N? : [<FSSE?9 LOHDR-(N(N(N(N(( ?@4 4*G +CLASSDIMENSION_SCALE NAMElonݩ!40XhOHDR-(N(N(N(Nc(( ?@4 4*GQ +CLASSDIMENSION_SCALE NAMElat +standard_namelatitude ' long_namelatitude (units degrees_northˠ#FHDBa"historyWed Oct 26 13:34:43 2011: GDAL NCDFCreateCopy( trmm-nc4z.nc, ... ) Wed Sep 07 22:33:59 2011: cdo sellonlatbox,-80,-70,-20,-10 tmp4-noc.nc tmp5.nc Wed Sep 7 22:33:53 2011: ncatted -a Conventions,global,d,, tmp4.nc tmp4-noc.nc Wed Aug 24 12:59:04 2011: ncatted -D 10 -a CoreMetadata.0,global,d,, -a ArchiveMetadata.0,global,d,, tmp3.nc tmp4.nc Tue Aug 23 21:04:45 2011: cdo seltimestep,1 tmp2.nc tmp3.nc Tue Aug 23 19:19:18 2011: cdo selvar,pcp tmp1.nc tmp2.nc Tue May 17 19:34:24 2011: cdo sellonlatbox,-85.25,-29.625,15.25,-50 3B43.2011.nc tmp1.nc Tue May 17 19:26:31 2011: cdo mergetime 3B43.110101.6A.nc 3B43.110201.6A.nc 3B43.110301.6A.nc 3B43.110401.6A.nc 3B43.2011.ncmodelgeos/dastime-calendarstandardtime-standard_nametime time-unitshours since 2011-01-01 00:00:00GDAL GDAL 1.9dev, released 2011/01/18FHIBaX ~M-FHDBaD֚ _nc3_strict  calendarstandardCDIGClimate Data Interface version 1.5.2 (http://code.zmaw.de/projects/cdi)CDOGClimate Data Operators version 1.5.2 (http://code.zmaw.de/projects/cdo)centergsfc commentsafile created by grads using lats4d available from http://dao.gsfc.nasa.gov/software/grads/lats4d/ ConventionsCF-1.5@$$@%%@&&@''@((@))@**@++@,,@--@..@// 0`000 1`111 2`222 3`333SSSSSSSSxShSXSHS8S(SSSRRRRRRRRxRhRXRHR8R(RRRQQQQQQQQOHDR-(N(N(N(NW$(((( +? .( #    \.R8OCHK@ l0REFERENCE_LIST6datasetdimension OCHK@ l0REFERENCE_LIST6datasetdimension `xc```Sى/*6.9bu6Qa{RS/̪}&3$+WL69զS@*F5?:{puO|}Y]1iԅ{:gnRgemmmccc v8QC xc```ܺ0s]1LQ4:RcmWޜsJ~1RqDִv ٓ =Φgva?ٟ8a Rw+j{|uC,9{kXiI:++kkk[uIDFRHP (<gBTHDd(8 BTHD  d(: FFSHDPx(SLFSSEaOCHK + _Netcdf4Dimid /OCHK + _Netcdf4Dimid  ,standard_name longitude ( long_name longitude 'units degrees_east_GCOL   TREE(7@sABB4CCaD D E $F F \GGHII9JJKKKuL MM=NNnOPPCQQ hR! S"S#;T$T%rU&V'V'(BTLF:L @$Cq3s4 NZ01 E7ď+e >N%- V\cFͬ:OKBTLF @V\+:7N%s4CF01 s_iFHDB#^ _FillValue  ?DIMENSION_LIST _Netcdf4Dimid  long_nameprecipitation:Precipitation commentsUnknown1 variable comment grid_namegrid-1level_description Earth surface NETCDF_DIMENSION_time NETCDF_time_unitshours since 2011-01-01 00:00:00time_statistic instantaneousxb``?pdKؓgmGci!j˗~nv5? 2p-uݥ/V=|wқ^/=绘}H, Ɍm ̘Tgaeee 6 `kkC%xg`8yt ;06^~歝:a/[jkYU},s)'6pƽ6NRߙR ;a;=گbh]ȥwJgcKlRMcJS[ k+++k [>xc`d~[[魈oe~n2YX[q*MlS-<]˜+00$o?Qڬ7 sȚ8fϚ7UX@`lIqDejn)ll, 0wG>^xe>#o+/vxWoܪWl^.[VP }6lߜB^ǂqMosw8#,\椉 O]h+!޳v5HX[BB( |A:xcbd`첸a$AV#F|hOѥfߴrXx83?ՊϚfV6oU?]% ;4uW7&0d]mN )q}&3?w!C+,O0X0X10XZ[-=:xc:r[mc"3W3=_ĠAaÐE#oӬ[iٕ_0 l +'e00h2Lq쁅.3-xQ\]]EX^Na+Ag;#Kk++KKK++kk[(C{6'6xbbv^gdy&=7r w_}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xyboPd`pQPؠP{t 60bP M= ܒ+j[45k5 _ +55__fNiK++ +Kkk+k a $,,,,,-,,-lK+<-xȡ0F "A& ^c<%8,5wr^a ON>2c2U*NN_#򾼤\u!"|6BnmCy۵1wMLc}Z8;)?j.=xʱ 0h8+@?GJ h(B ؀&㊯u7UP΢LK`Ur=Ę|\1]F$$إ$u2s)x/=BթW6[?'x 0D AQ DHTـ]ABL%U$f`8ӽΟ<\`:(ʉEh8mjiRh\V_sX#n㵬kq B@FTgdalautotest-3.1.2/gdrivers/data/vicar_cfloat32.vic0000664000175000017500000000114013701057753020741 0ustar evenevenLBLSIZE=384 FORMAT='COMP' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=32 ORG='BSQ' NL=3 NS=4 NB=1 N1=4 N2=3 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-64-LINX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 TASK='GEN' USER='vos' DAT_TIM='Thu Oct 17 16:46:45 2019' ?@?@@@@@@0A?@A@PA@@`A@A@A@@A@A@LBLSIZE=128 IVAL=(1.0,0.0) SINC=(1.0,1.0) LINC=(10.0,1.0) BINC=(1.0,1.0) MODULO=(0.0,0.0) gdalautotest-3.1.2/gdrivers/data/missing_contents.pdf0000664000175000017500000000313113701057753021520 0ustar eveneven%PDF-1.6 % 7 0 obj << /BBox [ 0 0 20 20 ] /Measure 8 0 R /Name (Layer) /Type /Viewport >> endobj 8 0 obj << /Bounds [ 0 1 0 0 1 0 1 1 ] /GCS 9 0 R /GPTS [ 49 2 48 2 48 3 49 3 ] /LPTS [ 0 1 0 0 1 0 1 1 ] /Subtype /GEO /Type /Measure >> endobj 9 0 obj << /EPSG 4326 /Type /GEOGCS /WKT (GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]) >> endobj 3 0 obj << /Annots 6 0 R /xontents 4 0 R /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 5 0 R /Type /Page /UserUnit 1 /VP [ 7 0 R ] >> endobj 10 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 20 /Length 11 0 R /Subtype /Image /Type /XObject /Width 20 >> stream x%!rD1 C# ~td2d%IA*I$vW㠒 ZlCW }@"[ D',jO6׽hA;߷tiǸYr|00H*\UQ2E l u])#bMv;F|tTTyw8]QlY˸~ˀNo:1xݪr 2pm[i5ٽ~4?> xO endstream endobj 11 0 obj 228 endobj 4 0 obj << /Length 12 0 R >> stream q 20 0 0 20 0 0 cm /Image10 Do Q endstream endobj 12 0 obj 33 endobj 5 0 obj << /XObject << /Image10 10 0 R >> >> endobj 6 0 obj [ ] endobj 1 0 obj << /Count 1 /Kids [ 3 0 R ] /Type /Pages >> endobj 2 0 obj << /Pages 1 0 R /Type /Catalog >> endobj xref 0 13 0000000000 65535 f 0000001191 00000 n 0000001250 00000 n 0000000445 00000 n 0000001012 00000 n 0000001120 00000 n 0000001172 00000 n 0000000015 00000 n 0000000101 00000 n 0000000246 00000 n 0000000589 00000 n 0000000989 00000 n 0000001098 00000 n trailer << /Root 2 0 R /Size 13 >> startxref 1299 %%EOF gdalautotest-3.1.2/gdrivers/data/251_tail.dat0000664000175000017500000004167413701057753017467 0ustar evenevenJ488Descriptor_TableEdsc_TableoPA8d#Bin_Function#eEdsc_BinFunction!PA@@@@@@V@V@@V@@@V@@V@V@@V@V@@V@V@@@V@@@V@@@@@Ps@@p@@@@@@0:@@0:@@V@@0:@@@@@@p@@@Ps@Ps@AV@@V@e AAPs@e AXAAAe AV A+AV AxHA0:AxHA AXA0:A\]A4ApA AA(AA\]AkAyATAyA+A+AATAAA AxHA0:AAA0:AtAtAeA Ak!A(!A6!A A#Ak!AV%A+&A A}'A}'A%A,*A%A&AR)A+&A,AV)A*,At+A0A.ANL-A>,A(A;0A.A>,APs+A\]0A0A+AL%/A%0A+A0AI1A &A0A,*A/A*,Ae*A}'A#A.AV%A4#AR$Ay"Azo&A A#AR)Azo&A|$A+&AR$AL%A#A2a%AZ6"ApAL%AA#AL%AtAL%AD#A\] AAA AVAA AL%AAPsA A+A AL%AAZ6"ApAPsAAL%ATATAtA+AAVA(AAPs Ae AAV@@V@@@@@@@@@metersV?kdJd]:>_Q +'f]@??BQC@G0ƿ؊6@AO ƿ.onVCӚ@?? rhc@MbZd;O?w&A+(RADX|@|-3|/Dol^IY?'N@?ob! 0@w#Eprj_MapProjection830{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:*oEprj_Spheroid,proSpheroid,1:*oEprj_Datum,datum,}Eprj_EarthModel830,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,}Eprj_ProjectionObject830,{1:*oEprj_ProjectionObject830,projectionObject,1:*oEprj_EarthModel830,earthModel,}Eprj_MapProjection830,.UTM? Clarke 1866TXA333?XA^s{?fOMXANAD27 (Canada)$c@`g@metersEprj_ElevationInfo6{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{1:*oEprj_Datum,verticalDatum,0:pcelevationUnit,1:e3:EPRJ_ELEVATION_TYPE_HEIGHT,EPRJ_ELEVATION_TYPE_DEPTH,EPRJ_ELEVATION_TYPE_UNKNOWN,elevationType,}Eprj_ElevationInfo,.= UndefinedmetersC!`g@metersEprj_ElevationInfo6{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{1:*oEprj_Datum,verticalDatum,0:pcelevationUnit,1:e3:EPRJ_ELEVATION_TYPE_HEIGHT,EPRJ_ELEVATION_TYPE_DEPTH,EPRJ_ELEVATION_TYPE_UNKNOWN,elevationType,}Eprj_ElevationInfo,.= Undefinedmeters`pe,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:bcovariance,}Esta_Covariance,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:bcovariance,}Esta_Covariance,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:*oEprj_Spheroid,proSpheroid,1:*oEprj_Datum,datum,}Eprj_EarthModel830,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,}Eprj_ProjectionObject830,{1:*oEprj_ProjectionObject830,projectionObject,1:*oEprj_EarthModel830,earthModel,}Eprj_MapProjection830,{1:e2:EMOD_FORWARD,EMOD_INVERSE,direction,1:e2:EMOD_CARTESIAN,EMOD_TANGENT_PLANE,refType,1:e2:EMOD_DEM_FILE,EMOD_DEM_CONSTANT,demsource,1:e2:Z_DIRECTION,Y_DIRECTION,PhotoDirection,1:e3:OMEGA_PHI_KAPPA,PHIPLUS_OMEGA_KAPPA,PHIMINUS_OMEGA_KAPPA,RotationSystem,0:pcdemfilename,0:pcdemzunits,6:dforSrcAffine,6:dforDstAffine,6:dinvSrcAffine,6:dinvDstAffine,1:dz_mean,1:dlat0,1:dlon0,9:dcoeffs,0:pdLensDistortion,0:pdAdditionalParameters,1:*oEprj_MapProjection830,refParms,}Camera_Model,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:bcovariance,}Esta_Covariance,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:*oEprj_Spheroid,proSpheroid,1:*oEprj_Datum,datum,}Eprj_EarthModel830,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,}Eprj_ProjectionObject830,{1:*oEprj_ProjectionObject830,projectionObject,1:*oEprj_EarthModel830,earthModel,}Eprj_MapProjection830,{1:e2:EMOD_FORWARD,EMOD_INVERSE,direction,1:e2:EMOD_CARTESIAN,EMOD_TANGENT_PLANE,refType,1:e2:EMOD_DEM_FILE,EMOD_DEM_CONSTANT,demsource,1:e2:Z_DIRECTION,Y_DIRECTION,PhotoDirection,1:e3:OMEGA_PHI_KAPPA,PHIPLUS_OMEGA_KAPPA,PHIMINUS_OMEGA_KAPPA,RotationSystem,0:pcdemfilename,0:pcdemzunits,6:dforSrcAffine,6:dforDstAffine,6:dinvSrcAffine,6:dinvDstAffine,1:dz_mean,1:dlat0,1:dlon0,9:dcoeffs,0:pdLensDistortion,0:pdAdditionalParameters,1:*oEprj_MapProjection830,refParms,}Camera_Model,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:e2:EMOD_FORWARD,EMOD_INVERSE,direction,1:e2:EMOD_CARTESIAN,EMOD_TANGENT_PLANE,refType,1:e2:EMOD_DEM_FILE,EMOD_DEM_CONSTANT,demsource,1:e2:Z_DIRECTION,Y_DIRECTION,PhotoDirection,1:e3:OMEGA_PHI_KAPPA,PHIPLUS_OMEGA_KAPPA,PHIMINUS_OMEGA_KAPPA,RotationSystem,0:pcdemfilename,0:pcdemzunits,6:dforSrcAffine,6:dforDstAffine,6:dinvSrcAffine,6:dinvDstAffine,1:dz_mean,1:dlat0,1:dlon0,9:dcoeffs,0:pdLensDistortion,0:pdAdditionalParameters,1:*x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,obsoletePlaceHolder0,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,outputProjection,1:x{0:pcstring,}Emif_String,outputHorizontalUnits,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,outputElevationInfo,}Camera_ModelX,.gdalautotest-3.1.2/gdrivers/data/fakeeir.img0000664000175000017500000000000113701057753017534 0ustar evenevengdalautotest-3.1.2/gdrivers/data/byte_rraster_ct_rgb.gri0000664000175000017500000000062013701057753022167 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/test_deflate_2GB.vrt0000664000175000017500000000224613701057753021277 0ustar eveneven Gray 50000 42992 6.71089e+07 NearestNeighbour Byte /vsizip/data/test_deflate_2GB.tif.zip/test_deflate_2GB.tif 0.125 0,1,0,0,0,1 0,1,0,0,0,1 0,1,0,0,0,1 0,1,0,0,0,1 gdalautotest-3.1.2/gdrivers/data/dimension_labels_with_null.h50000664000175000017500000001414013701057753023273 0ustar evenevenHDF  ``TREE0HEAPXdataH8  `/]x@SNOD  DIMENSION_LABELS`????????????????????????GCOLxgdalautotest-3.1.2/gdrivers/data/test_coord_scale_offset.nc0000664000175000017500000000165013701057753022647 0ustar evenevenCDF yx  ConventionsCF-1.6 foo  grid_mappinglambert_projectiony  standard_nameprojection_y_coordinateunitsmeters scale_factor  add_offsetAG3 x  standard_nameprojection_x_coordinateunitsmeters scale_factor@ add_offsetE#mlambert_projection grid_mapping_namelambert_conformal_conicstandard_parallel@9longitude_of_central_meridianWlatitude_of_projection_origin@9 false_eastingfalse_northing semi_majorAXM semi_minorAXMgdalautotest-3.1.2/gdrivers/data/BAND2.DAT0000664000175000017500000000000013701057753016547 0ustar evenevengdalautotest-3.1.2/gdrivers/data/int16_rat.hdr0000664000175000017500000000037113701057753017750 0ustar evenevenBYTEORDER I LAYOUT BIL NROWS 20 NCOLS 20 NBANDS 1 NBITS 16 BANDROWBYTES 40 TOTALROWBYTES 40 PIXELTYPE SIGNEDINT ULXMAP 440750 ULYMAP 3751290 XDIM 60 YDIM 60 gdalautotest-3.1.2/gdrivers/data/frmt30.cot0000664000175000017500000005631013701057753017270 0ustar eveneven A$ T@@/,,5-fVR_ gi$1@ܣe&3l1?IxHo&]KQĘ;NطpC`һ;X-l6e݅[<w2]e%K0 l1=?Z|*چ%by"үn%H|]X㌠_7*1rE"UPpQ{fC!b/*=Ml;(v r{q5h>%#Yg.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t\ߥX,awB í}Qx[8ۛ}9ׇf p o$rKίgh$^$,Q%p,ל4WA͙t#c_FTO!7XC!&7;OAsUqi],DX f5Z뫵kc K p8!H`KեӤ4FOR*c|t\([xVq_GS𸶟4ZR},Zv,6AL}YB؃HR߱;*,B8߽BX%S3_{mF#Ñ @p b̽9e!tmЏJ,/ܙUMsRXK~hM]?&Wyo<ߎ>x{@dInk*"88)42ڊqe0 d-^l@JgZ={j-Tz y&D"?1NO`ʸ΀(JT@pɎZR]fQyi?G7fѠJYX6Hx/IVk/UVZ4m\I3TZ+n7z] p~8T-+;u}ur. (nѴz)s]Kmx V ^/0?=ӈZo ^0}<wY;S t?K5^n(7-t-J:#Hyg ]NjҷAT[RZάLp+۾wY } 5N?0.WAʸka}]Ev-%*ϭ}-H>nKni957?,lgI@rH]/KHw^!=mb8U:4b,d Zإsze0m w}\ꄭ.wT/BڢƔtShYD¤I1TL227 vKc53e2ћFJ'1!{֘I"+eB~U׿N+~|j(IHҋ ˮXӆeQI%E5wJ~@6N0%1W6>ĦMy͈ݾCX!w7#1K,?)ea[%zq#Wܓ~|[Ir*x{SQts6ތI&UfDmQ~3 Q|,uxoDx䀆EU` $_h=0\AW'H bzϵpԥT: [*'l#q0̭l/w/yQv%=N^CPS7<5 S0Hq<6 yy.ZQP51=b 1v1OdmQw;#{>/%od6K˞}_#ҹ7v ˏ$0jJp3VP47P_-ImsY@?3+=R ~@A,gVo 6@.hS\<>h;46liL8͞Ɛ_E]͕_4TUs1w-):ⳈDu66T_Hr:3xZhNx<ጵʬh'.Oyw1)3 k( F|RWPY;4YBy5FƺUKճ1^'eYDMkw]aT 7h6j1*ּiwL™&`R{[~[=(gdalautotest-3.1.2/gdrivers/data/n43.dt00000664000175000017500000010256213701057752016463 0ustar evenevenUHL10800000W0430000N030003000200U 012101210 DSIU DTED0F18 062 01A960900000000US090078 SPEXDLMS2009609MSLWGS84AS11+C 9609 430000.0N0800000.0W430000N0800000W440000N0800000W440000N0790000W430000N0790000W0000000.0030003000121012100 ACC0200020002000200 10 ~(%%(0<:::<BHNYb[]][J3TX_cdgcjofn|vt?}a&D6}~   ! (!0>;=3;7NRbZYZd\R8GTWYXklndjptr}6Fkh7By "%10665@KLTYTYZb`:2JIOPSWba`clpi}FpvOBݪ}wq   +$%(.138LGR]YSNH:46>GH:<SVk`^hmip #7aurwU?om_   &/*4(6DTSLQ,A)1++)(%-K[H2]ffnt)0Ts`]rS,kcVVy 5,<'   ',*0:OdtvWVAPEB.CM l`XWb1<5;     !1NId`T>=MD8&BN jbYKe:A@2   "&$(07JV}r]SZ>:HE6"@g ha[Ka~ - "%$'*) $->Lb}w[]JKM:8D<1B iX[KUw     !##+-&01D[b{qh_I=GE52962Dw jYU]cT ""%,."& +%7B]qrgdUE4;>32745Ci_[KKK{  #'+$#%%"!-5CPif^SI:7@/'/35Bi`QKKhb   !))"%'&))*5<ZSWG@99:0203 @bZMKKi^s{  $((/%&.4$+BNGZF;"(.+7.) @2]SPLKKff}))'&$)'13&61D=3+()'!6,"DXRNLKKQdju !! #'/)-#*"5**"(,,0&Eb}VPLKKKK^`iw &*++$($!*01'D_VNMKKKKU]be~ '(/-! $'+15"B˪[TLLNMKKKZ`bmw"+-.0++.'! 0#&,* DcZVLLNKKKKXZfgr| ('(%!!%!+ BskbWVMLMKKKKT[Zfjx   &* &,$ @uri`WTLLMKKUOK[U`gv{w   2;." @Fq^`WTNNKKQKKKKU_got    7hB*%CofRWSNKLKKKKKKV]cipz     8`Y/*"FocYWSMMKKKKKKKKX_dgu|}    /LN/.-,G?h_YSXLKKKKKKKKKT^ebir{   *;#0(0&HgVWQMKKKKKKKKKKK\Y]bkt   "3#(%.HcWMQKKKKKKKKKKKKK\[_akyw{w    #!Iª`XQNKKKKKKKKKKKKKKW\`cj\y}y   !   H| aVPMKKKKKKKKKKKKKKTZY_Tkut  #"  GL!!aWPMKKKKKKKKKKKKKKKUTX]ekp %I""`VPKKKKKKKKKKKKKKKKKRRZ\dhq|"% K##`UOKKKKKK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KKKKKKKKKKKKKKKKKKKKKKKKKKKQNNRUbk]`oz}3>gdalautotest-3.1.2/gdrivers/data/geos_vrtwarp.tif0000664000175000017500000014301413701057753020672 0ustar evenevenII*`*`*=BCDyEyS؅ 8. 0EKT3 Rj1EE@Nb_*O,87a [? ""B##*,@--j../48{9=?@"AALBBvC DILJN&OOPPPzQRR9SSX[[.\\X]]^__A`3cseff2gg\hhijjl}pqqӚhǟ>ӧڴuAyMwв&P@Tв&P@ϓT? L#    ,T )#@TXAr@unnamed|GCS Name = unknown|Datum = unnamed|Ellipsoid = Spheroid|Primem = Greenwich||ESRI PE String = PROJCS["unnamed",GEOGCS["unknown",DATUM["unnamed",SPHEROID["Spheroid",6378137,298.2572221]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]]],PROJECTION["Geostationary_Satellite"],PARAMETER["central_meridian",-75],PARAMETER["satellite_height",35786023],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],EXTENSION["PROJ4","+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs +sweep=x"]]|x1 Oa nx1 Oa nxձqd9E@&6M8|l?<x~_a?<x?<x?<x?<x?<x?<x?<x   WXa?<[~~~X~~~X~a?aX_?+~~X~~~X _x~~X~~~X _y/oo/ؿ?`~~X~~Kσ a  />/77<ؿ?߰_߰? z}7ؿ?߰_߰? /믰_a`aX |/o/?aa?a /믰a_ |~/> z~/>a  7/o/?_߰_``aX3_ |~/>߻a_ |~o /7ؿ߰߰`~~XaϞ_ `aX_ `?a ?7 a /7/o¾ /7ؿ߰_``aX _o?aaXE~|}_7_o?aaX~ _ /7/oo?aaX a 7xKnd7&8!Kɥq׃6nHhSUq6J?~H$I$I$I$I$I$I$I$I$I$I$I||||+l>~>>?p?lr';loW~ _=~ȿ= _a__aw~e?l7?p?~}/_aܿl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_jp2/stefan_full_rgba_oi.xml0000664000175000017500000000672213701060017025544 0ustar eveneven test.jp2 Record Interleaved Band 1 0 255 Band 2 0 255 Band 3 0 255 Band 4 0 1 some_id some_namespace gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/byte.xml0000664000175000017500000003231313701060020022510 0ustar eveneven 0D0A870A 6A703220000000006A7032206A707820 jp2 0 jp2 jpx 01C08000020004800043400000 1 0xC0 0x80 2 4 0x80 67 0x40 0 0000001400000014000107070000 20 20 1 7 7 0 0 01000000000011 1 0 0 17 2 20 20 0 0 20 20 0 0 1 7 1 1 1 0 1 0 0 4 4 0 0 153 0 29 0 1 676D6C2E6461746100 gml.data 676D6C2E726F6F742D696E7374616E636500 gml.root-instance 3C676D6C3A46656174757265436F6C6C656374696F6E0A202020786D6C6E733A676D6C3D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C220A202020786D6C6E733A7873693D22687474703A2F2F7777772E77332E6F72672F323030312F584D4C536368656D612D696E7374616E6365220A2020207873693A736368656D614C6F636174696F6E3D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C20687474703A2F2F736368656D61732E6F70656E6769732E6E65742F676D6C2F332E312E312F70726F66696C65732F676D6C4A503250726F66696C652F312E302E302F676D6C4A503250726F66696C652E787364223E0A20203C676D6C3A626F756E64656442793E0A202020203C676D6C3A4E756C6C3E7769746868656C643C2F676D6C3A4E756C6C3E0A20203C2F676D6C3A626F756E64656442793E0A20203C676D6C3A666561747572654D656D6265723E0A202020203C676D6C3A46656174757265436F6C6C656374696F6E3E0A2020202020203C676D6C3A666561747572654D656D6265723E0A20202020202020203C676D6C3A52656374696669656447726964436F7665726167652064696D656E73696F6E3D22322220676D6C3A69643D2252474330303031223E0A202020202020202020203C676D6C3A72656374696669656447726964446F6D61696E3E0A2020202020202020202020203C676D6C3A526563746966696564477269642064696D656E73696F6E3D2232223E0A20202020202020202020202020203C676D6C3A6C696D6974733E0A202020202020202020202020202020203C676D6C3A47726964456E76656C6F70653E0A2020202020202020202020202020202020203C676D6C3A6C6F773E3020303C2F676D6C3A6C6F773E0A2020202020202020202020202020202020203C676D6C3A686967683E31392031393C2F676D6C3A686967683E0A202020202020202020202020202020203C2F676D6C3A47726964456E76656C6F70653E0A20202020202020202020202020203C2F676D6C3A6C696D6974733E0A20202020202020202020202020203C676D6C3A617869734E616D653E783C2F676D6C3A617869734E616D653E0A20202020202020202020202020203C676D6C3A617869734E616D653E793C2F676D6C3A617869734E616D653E0A20202020202020202020202020203C676D6C3A6F726967696E3E0A202020202020202020202020202020203C676D6C3A506F696E7420676D6C3A69643D22503030303122207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A3236373131223E0A2020202020202020202020202020202020203C676D6C3A706F733E34343037353020333735313239303C2F676D6C3A706F733E0A202020202020202020202020202020203C2F676D6C3A506F696E743E0A20202020202020202020202020203C2F676D6C3A6F726967696E3E0A20202020202020202020202020203C676D6C3A6F6666736574566563746F72207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A3236373131223E363020303C2F676D6C3A6F6666736574566563746F723E0A20202020202020202020202020203C676D6C3A6F6666736574566563746F72207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A3236373131223E30202D36303C2F676D6C3A6F6666736574566563746F723E0A2020202020202020202020203C2F676D6C3A526563746966696564477269643E0A202020202020202020203C2F676D6C3A72656374696669656447726964446F6D61696E3E0A202020202020202020203C676D6C3A72616E67655365743E0A2020202020202020202020203C676D6C3A46696C653E0A20202020202020202020202020203C676D6C3A72616E6765506172616D65746572732F3E0A20202020202020202020202020203C676D6C3A66696C654E616D653E676D6C6A70323A2F2F636F646573747265616D2F303C2F676D6C3A66696C654E616D653E0A20202020202020202020202020203C676D6C3A66696C655374727563747572653E5265636F726420496E7465726C65617665643C2F676D6C3A66696C655374727563747572653E0A2020202020202020202020203C2F676D6C3A46696C653E0A202020202020202020203C2F676D6C3A72616E67655365743E0A20202020202020203C2F676D6C3A52656374696669656447726964436F7665726167653E0A2020202020203C2F676D6C3A666561747572654D656D6265723E0A202020203C2F676D6C3A46656174757265436F6C6C656374696F6E3E0A20203C2F676D6C3A666561747572654D656D6265723E0A3C2F676D6C3A46656174757265436F6C6C656374696F6E3E0A00 withheld 0 0 19 19 x y 440750 3751290 60 0 0 -60 gmljp2://codestream/0 Record Interleaved B14BF8BD083D4B43A5AE8CD7D5A6CE03 49492A000A00000000000E000001030001000000010000000101030001000000010000000201030001000000080000000301030001000000010000000601030001000000010000001101040001000000080000001501030001000000010000001601030001000000010000001701040001000000010000001C01030001000000010000000E830C00030000001401000082840C00060000002C010000AF87030020000000B8000000B18702001C000000F8000000000000000100010000000700000400000100010001040000010001000204B187150000000108B187060015000608000001008E23000C000001005768040C0000010029234E41443237202F2055544D207A6F6E652031314E7C4E414432377C000000000000004E400000000000004E4000000000000000000000000000000000000000000000000000000000000000000000000040E61A4100000000CC9E4C410000000000000000 PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/stefan_full_rgba_corrupted.xml0000664000175000017500000002024113701060020027126 0ustar eveneven 0D0A870A jp2 0 jp2 150 162 4 255 7 0 0 7 7 7 7 1 0 0 16 5 0 0 1 1 0 2 4 0 3 3 1 0 3 1 0 2 2200000162 2200000150 2200000000 2200000000 2200000062 2200000050 0 0 5 7 1 1 7 1 1 7 1 1 2 1 1 2 2 2 1 0 1 0 0 4 4 0 0 152 0 18174 0 1 gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/stefan_full_rgba.xml0000664000175000017500000001477713701060020025060 0ustar eveneven 0D0A870A 6A703220000000006A703220 jp2 0 jp2 00000096000000A20004FF070000 150 162 4 255 7 0 0 07070700 7 7 7 0 01000000000010 1 0 0 16 0004000000000001000100000002000200000003000300010000 4 0 0 1 1 0 2 2 0 3 3 1 0 2 162 150 0 0 162 150 0 0 4 7 1 1 7 1 1 7 1 1 0 1 1 1 0 1 0 1 4 4 0 0 152 153 0 18174 0 1 gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/utmsmall_pct.jp20000664000175000017500000003010513701057752024163 0ustar eveneven jP ftypjp2 jp2 jpx rreqC@Ojp2hihdrddcolrpclr  !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~cmap$4jp2cOQ)ddddR\@@HHP #DRH3z;i5SHO/t9L(5oGx^T\K u1GϱDI* r œT\>'BY>JazylPp.Pߝ=PCq9Mp.aܮj.-0ys ;; Wdz`.r}cf`ȶ[3+x()ώH/7IP@ <~F SxE͡M1_$3$c`[ #gC|Lb]lju$O$e]ӓxc$2=?9j2l<7iXf9$ͯ(*Ro`߭\^qPs{/:OVɊUWG)f/_*RNcZJs˂*DDK^}%P]]Vʆvw2lҼ)`1#2~[gE?&/jcDZT~w׆JISƎ_Jih5|[قgksgWR4=BT-Iyߌ69+Tj2-he=k{ue' xVU9-'%xVP8^ ~ÛzFk_$Nnذ,Q[f>Ǡr6]zڛ@tuɜb B7(\$g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{}OԖ 9n,u\\ @ƤY[A<^◺] 9J9YVO pᲤ?>ߥ.J~t 䑘=bXۊJX_Sr̘>ZVCA#JU"X,&bӜjE008g٤iZQh+eXT6*EyzkNԦFA"/GvJ^ۓfGS6A^%ݕݝLOTb7Ͻz-%4Ji\s ;C8Mq [RM":/l@X,s4 J__%]Oyy,L]1Ç$G eXY  M[ߊ[Æ= ZvfyؠSHN}HQelu,E`t7Ōl^G$' ny0]Zf3|›/ =xRqB;4L^ąq Zڤz~6 ('VZ>.(-R3ʑ0>3[[mqyTIxfV_.;RȔ8ZpdZxh[k\zV>?pwVzk <3S5չm(^O)|׭V?|_[A{h_C@C)zʍCtfQVSSwNC0N;gls^_P,֏wu_=ֶJѓg~rׄ20Ob\Gv=!K6cf_[x WY-U|Vʀ u6xclo`weid em\J ƚ|6_؊s(z9аL V(T6ஆb(E^u ώ;o]'ILԃx9^m#!""N6NW]iE.8tx[r<1}'i8+x[6C&}4G~^ {r(R7]ҏ:h𕋳 x\_|"@-$6 !aWI๠:ã4zU/j:}Kb<(6Z\M>eii>!.)<(G6M9.8#mr xF/ ws^lL }Sb-BSRp7*po/bI7M}0=ӽԟ"  kU*sB$R]K5x\׭AXU!V4jVi^30!!"}4n֤?P-Gime&G1vhRl48aaUN o.ߴ71&7~/)QjtXSxw nZ1xDcTXM$ H.`hC N\NчDm+1)DHTasoclbl gml.dataasoclbl gml.root-instancexml withheld 0 0 99 99 x y 440750 3751290 60 0 0 -60 gmljp2://codestream/0 Record Interleaved tuuidK=KCզII*   , # Wh )#NAD27 / UTM zone 11N|NAD27|N@N@@A̞LAgdalautotest-3.1.2/gdrivers/data/test_validate_jp2/byte_oi.xml0000664000175000017500000000571213701060020023202 0ustar eveneven 0 0 19 19 x y 440750 3751290 60 0 0 -60 test.jp2 Record Interleaved Band 1 0 255 some_id some_namespace gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/stefan_full_rgba.jp20000664000175000017500000004372613701057752024771 0ustar eveneven jP ftypjp2 jp2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X۔iܐJGoK^[M\@Rx;!)}:nS(T-p.E++g^ *MLxұfq]!)Y)_NgX  }7@M_!>o|_>ț:)RtylHxcԓHҵo'@b0K9ZP =d"oS](.wo0<.oG o;+^h]LǗ"!uܥ͓:ÐJX% š8ۨ  j\` TpMS\,KYIh_{q?WL߿dZߚB1V2,@,A_#F ֍v1ij1DPu LJVُumaB*=#ucWYlcc'e2RZB9~JĞKpN(jL?٩;[ُmJԫ?6>*˺ n㴍b{hqv` <+'`q 3zĺ=9_-1O"_Il{40wu WGK#UHQZtu=-K-vݯ]E?((qqX*Y{7Gv:Bad6O=zv< t*;ԋ, 4f4Ø>%nCz#nJc&6Fc.Ji"[Jn7^P0:K^H䵾W4,e# 8o)a꺹Eq;JQ8^kC3+s"92#N~ J݌|Ss@ݡe1 $n\֭EσTĵh#*op(hZmQ9R+\]N( *8[ۈ䜑_@c^fΚMɻ6W@s"AIƥPIOr@9dsp۸!K3-lIbs`#˰:\ض withheld 0 0 19 19 x y 440750 3751290 60 0 0 -60 gmljp2://codestream/0 Record Interleaved tuuidK=KCզII*   , # Wh )#NAD27 / UTM zone 11N|NAD27|N@N@@A̞LAgdalautotest-3.1.2/gdrivers/data/test_validate_jp2/utmsmall_pct_oi.xml0000664000175000017500000000746413701060020024751 0ustar eveneven 0 0 99 99 x y 440750 3751290 60 0 0 -60 test.jp2 Record Interleaved Band 1 0 255 Band 2 0 255 Band 3 0 255 some_id some_namespace gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/utmsmall_pct_corrupted.xml0000664000175000017500000002371713701060020026350 0ustar eveneven 0D0A870A jp2 0 jp2 100 100 2 7 7 0 0 1 0 0 16 2 4 7 7 7 7 0 0 0 255 255 255 255 255 0 1 0 0 0 1 2 1 0 2 100 100 0 0 100 100 0 0 1 7 1 1 1 0 1 0 1 4 4 0 1 152 153 0 0 0 0 9188 0 1 gml.data gml.root-instance withheld 0 0 99 99 x y 40750 3751290 60 0 0 -60 gmljp2://codestream/0 Record Interleaved B14BF8BD083D4B43A5AE8CD7D5A6CE03 PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 40720, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/byte_corrupted.xml0000664000175000017500000003277213701060021024611 0ustar eveneven 0D0A870A XXXX 1 jp2 1 0xC0 0x80 1 4 0x80 0 19 21 1 7 6 2 1 1 1 1 1 B14BF8BD083D4B43A5AE8CD7D5A6CE03 PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area B14BF8BD083D4B43A5AE8CD7D5A6CE03 PROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","26711"]] 4.4072000000000000e+05, 6.0000000000000000e+01, 0.0000000000000000e+00, 3.7513200000000000e+06, 0.0000000000000000e+00, -6.0000000000000000e+01 Area gml.data gml.root-instance withheld 1 1 119 119 x y -440750 -3751290 60 0 0 -60 gmljp2://codestream/0 Record Interleaved 0 20 20 0 0 20 20 0 0 2 6 1 1 6 1 1 0 0 1 0 0 5 3 0 0 0 29 0 1 gdalautotest-3.1.2/gdrivers/data/test_validate_jp2/almost_nojp2box.xml0000664000175000017500000000037313701060021024667 0ustar eveneven 0D0A870A gdalautotest-3.1.2/gdrivers/data/ns3034d.nsf0000664000175000017500000000165113701057753017252 0ustar evenevenNSIF01.0003BF01NS3034D 19971218121539Check a mask header with 0 or black (00) being the transparent pixels color. U 00001000010JITC (520) 538-5458 00000000093700040400100043900000000940000000000000000000000000IMMissing ID19961218121539 - BASE IMAGE - U 0Unknown 0000001800000035B MONO VIS 01R 0NM1M N 00B00010001003500180100100000100001001.0 0000000000@>>|>gdalautotest-3.1.2/gdrivers/data/blend.t17z.master.f001.co.grib2.sparse.xml0000664000175000017500000000131613701060021024671 0ustar eveneven 1558505 blend.t17z.master.f001.co.grib2.head 0 0 2000 2000 1556501 0 1558501 4 55 gdalautotest-3.1.2/gdrivers/data/g2009u01_be_truncated.bin0000664000175000017500000000006013701057753021735 0ustar eveneven@D@l??jgdalautotest-3.1.2/gdrivers/data/hrpt_little_endian.l1b.zip0000664000175000017500000000060313701057753022511 0ustar evenevenPK 'Ehrpt_little_endian.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Cj(oc7Jw0 {ܷXOJU}laonl__+_c7&xk?Iξj4E3d/u1|ׁyѱkZuSR&eooϘkTA |SsC>7Es#N{rM?1u(!v.ǑNCpQ4p=wџapZ$GERt/mKW2ވbe3ّ슕ΤGJO7.|עHX=d^ڊ)⺬\&pMq믕6f^}\\\)p}[o+"<`̃1`̃1Ƽb̫ d̀1 31 3`(wŘc )0c )0R)0R    O1<0<0<0<# F,YȂ# FV1`d*F4i0Ҋ# FbHV)0R`#F )Hi@$c -0R-0cK1c˼jm?eMP6eMP6ATMP6A٤/bX6!W W!n(Z^ ```*FFF`, Ʋb, 2ˊn"|Ө'qW O^~[*XQxK뢨P. ;iDv#`U6$ yl:dVvAbVil~A[f?lv(-;zO!8DpSژY@̂WOC!;Ca~hSO(Hܨ{؏ Ł3x2ݼA;p5^ 'a'U -H@2[ن_S c !z{{$uXiKt8' fk$'E0Ad|{x;?FbȾ x/ D^a]yaI9³#Kp{!O=@4c`Xđ#4xdwR ʉ7ňJoDDB6{= ez Qfi38vwJuܱo?kYK.BD[5}o}ڋ#  W2G=6w)tnmu`@y2iIՑmeV.TGZ.rqQ,c>Oh'3 l0BfwtzrC6Ck`+_xa6lڪx>fkѨ7_M7ǞOĺαs51˗|kSW废&EerMNǦ+3rA>wmxO<5<]4 L6uCM}O;5`_B:M ᱳ_˥zvDj ~Q |S,OXى}$5SYm,e[oqI2ԆaT딿\n_Nb}W g^N<ĈϧCr,*1gRfidYY.zgF{EѩK,/B@]FQxY* oE.P E=!}AqpCDQ Ek endstream endobj 7 0 obj 23376 endobj 8 0 obj 54920 endobj 9 0 obj << /Type /FontDescriptor /FontName /MPPRDJ+ArialMT /Flags 32 /FontBBox [-1361 -665 4096 2060] /ItalicAngle 0 /Ascent 1491 /Descent -431 /CapHeight 2060 /StemV 0 /FontFile2 3 0 R >> endobj 10 0 obj << /Type /FontDescriptor /FontName /MVGEWD+Arial-BoldMT /Flags 262176 /FontBBox [-1286 -771 4096 2069] /ItalicAngle 0 /Ascent 1491 /Descent -431 /CapHeight 2069 /StemV 0 /FontFile2 6 0 R >> endobj 11 0 obj << /Type /Font /BaseFont /MPPRDJ+ArialMT /Subtype /TrueType /Encoding /WinAnsiEncoding /FirstChar 0 /LastChar 255 /Widths [750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 278 355 556 556 889 667 191 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278 278 584 584 584 556 1015 667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667 611 722 667 944 667 667 611 278 278 278 469 556 333 556 556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 556 333 500 278 556 500 722 500 500 500 334 260 334 584 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 556 556 556 556 260 556 333 737 370 556 584 333 737 552 400 549 333 333 333 576 537 278 333 333 365 556 834 834 834 611 667 667 667 667 667 667 1000 722 667 667 667 667 278 278 278 278 722 722 778 778 778 778 778 584 778 722 722 722 722 667 667 611 556 556 556 556 556 556 889 500 556 556 556 556 278 278 278 278 556 556 556 556 556 556 556 549 611 556 556 556 556 500 556 500 ] /FontDescriptor 9 0 R >> endobj 12 0 obj << /Type /Font /BaseFont /MVGEWD+Arial-BoldMT /Subtype /TrueType /Encoding /WinAnsiEncoding /FirstChar 0 /LastChar 255 /Widths [750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 474 556 556 889 722 238 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 333 333 584 584 584 611 975 722 722 722 722 667 611 778 722 278 556 722 611 833 722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 333 584 556 333 556 611 556 611 556 333 611 611 278 278 556 278 889 611 611 611 611 389 556 333 611 556 778 556 556 500 389 280 389 584 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 556 556 556 556 280 556 333 737 370 556 584 333 737 552 400 549 333 333 333 576 556 278 333 333 365 556 834 834 834 611 722 722 722 722 722 722 1000 722 667 667 667 667 278 278 278 278 722 722 778 778 778 778 778 584 778 722 722 722 722 667 667 611 556 556 556 556 556 556 889 556 556 556 556 556 278 278 278 278 611 611 611 611 611 611 611 549 611 611 611 611 611 556 611 556 ] /FontDescriptor 10 0 R >> endobj 13 0 obj << /ArialMT 11 0 R /Arial-BoldMT 12 0 R >> endobj 14 0 obj <>>>>> endobj 15 0 obj <>>>>> endobj 16 0 obj <>>>>> endobj 17 0 obj <>>>>> endobj 18 0 obj <>>>>> endobj 19 0 obj << /Font 13 0 R /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Properties<> >> endobj 20 0 obj << /PrintScaling /None >> endobj 21 0 obj <>endobj 22 0 obj <> endobj 23 0 obj <>endobj 24 0 obj <> endobj 25 0 obj << /Type /Page /MediaBox [0 0 612 792] /Parent 26 0 R /Contents 1 0 R /Resources 19 0 R /VP[<><>] >> endobj 26 0 obj << /Type /Pages /Kids [25 0 R] /Count 1 >> endobj 27 0 obj << /Type /Catalog /Pages 26 0 R /OCProperties<>/OCGs[ 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R]>> /PageMode /UseNone /ViewerPreferences 20 0 R >> endobj 28 0 obj << /Creator (ESRI ArcMap 10.0.0.2414) /CreationDate (D:20101021125101-07) >> endobj xref 0 29 0000000000 65535 f 0000000010 00000 n 0000004135 00000 n 0000004158 00000 n 0000027731 00000 n 0000027755 00000 n 0000027779 00000 n 0000051248 00000 n 0000051272 00000 n 0000051296 00000 n 0000051506 00000 n 0000051726 00000 n 0000052954 00000 n 0000054187 00000 n 0000054252 00000 n 0000054401 00000 n 0000054540 00000 n 0000054673 00000 n 0000054820 00000 n 0000054959 00000 n 0000055123 00000 n 0000055170 00000 n 0000055612 00000 n 0000055802 00000 n 0000056009 00000 n 0000056196 00000 n 0000056493 00000 n 0000056559 00000 n 0000056782 00000 n trailer << /Size 29 /Info 28 0 R /Root 27 0 R >> startxref 56881 %%EOF %BeginExifToolUpdate 27 0 obj << /Type /Catalog /Pages 26 0 R /OCProperties << /D << /Order [ 14 0 R [ 15 0 R ] 16 0 R [ 17 0 R 18 0 R ] ] >> /OCGs [ 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R ] >> /PageMode /UseNone /ViewerPreferences 20 0 R /Metadata 29 0 R >> endobj 28 0 obj << /Creator (ESRI ArcMap 10.0.0.2414) /CreationDate (D:20101021125101-07) /Subject (XMP, Test) /Title (Title) >> endobj 29 0 obj << /Type /Metadata /Subtype /XML /Length 3578 >> stream Description XMP Test Title 8 1 20 20 1 1 1 endstream endobj xref 0 1 0000000000 65535 f 27 3 0000057575 00000 n 0000057833 00000 n 0000057970 00000 n trailer << /Size 30 /Info 28 0 R /Root 27 0 R /Prev 56881 >> %EndExifToolUpdate 57553 startxref 61641 %%EOF gdalautotest-3.1.2/gdrivers/data/rasterlite_pyramids.sqlite0000664000175000017500000007200013701057753022751 0ustar evenevenSQLite format 3@ }#-7indexidx_geocolsgeometry_columnsCREATE UNIQUE INDEX idx_geocols ON geometry_columns (f_table_name, f_geometry_column) --Ktablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name VARCHAR(256) NOT NULL, f_geometry_column VARCHAR(256) NOT NULL, type VARCHAR(30) NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER, spatial_index_enabled INTEGER NOT NULL)f++tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR(256) NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name VARCHAR(256), pro    BfmepsgWGS 84+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ''test_metadatageometryPOLYGON 'test_metadatageometry CC,;f++tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR(256) NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name VARCHAR(256), proj4text VARCHAR(2048) NOT NULL) --Ktablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name VARCHAR(256) NOT NULL, f_geometry_column VARCHAR(256) NOT NULL, type VARCHAR(30) NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER, spatial_index_enabled INTEGER NOT NULL)}#-7indexidx_geocolsgeometry_columnsCREATE UNIQUE INDEX idx_geocols ON geometry_columns (f_table_name, f_geometry_column)C1+3triggerfkd_refsys_geocolsspatial_ref_sysCREATE TRIGGER fkd_refsys_geocols BEFORE DELETE ON spatial_ref_sys FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'delete on table ''spatial_ref_sys'' violates constraint: ''geometry_columns.srid''') WHERE (SELECT srid FROM geometry_columns WHERE srid = OLD.srid) IS NOT NULL; END DD\1-ctriggerfki_geocols_refsysgeometry_columnsCREATE TRIGGER fki_geocols_refsys BEFORE INSERT ON geometry_columns FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'insert on table ''geometry_columns'' violates constraint: ''spatial_ref_sys.srid''') WHERE NEW."srid" IS NOT NULL AND (SELECT srid FROM spatial_ref_sys WHERE srid = NEW.srid) IS NULL; ENDZ1-_triggerfku_geocols_refsysgeometry_columnsCREATE TRIGGER fku_geocols_refsys BEFORE UPDATE ON geometry_columns FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'update on table ''geometry_columns'' violates constraint: ''spatial_ref_sys.srid''') WHERE NEW.srid IS NOT NULL AND (SELECT srid FROM spatial_ref_sys WHERE srid = NEW.srid) IS NULL; END 4//viewgeom_cols_ref_sysgeom_cols_ref_sysCREATE VIEW geom_cols_ref_sys AS SELECT f_table_name, f_geometry_column, type, coord_dimension, spatial_ref_sys.srid AS srid, auth_name, auth_srid, ref_sys_name, proj4text FROM geometry_columns, spatial_ref_sys WHERE geometry_columns.srid = spatial_ref_sys.srid''stabletest_metadatatest_metadataCREATE TABLE test_metadata ( id INTEGER NOT NULL PRIMARY KEY, source_name TEXT NOT NULL, tile_id INTEGER NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, pixel_x_size DOUBLE NOT NULL, pixel_y_size DOUBLE NOT NULL, "geometry" POLYGON) n'n6 5truemarble338169.tifT@ E3@ E3fVf@V@|fVf@Vf@V@fV@fV7 5truemarble338169.tifR? E3? E3fVf@V@|fV@f@V@f@VfVfV@ +raster metadata zz;> A'triggerggi_test_metadata_geometrytest_metadataCREATE TRIGGER "ggi_test_metadata_geometry" BEFORE INSERT ON "test_metadata" FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, '"test_metadata"."geometry" violates Geometry constraint [geom-type or SRID not allowed]') WHERE (SELECT type FROM geometry_columns WHERE f_table_name = 'test_metadata' AND f_geometry_column = 'geometry' AND GeometryConstraints(NEW."geometry", type, srid) = 1) IS NULL; ENDB A'%triggerggu_test_metadata_geometrytest_metadataCREATE TRIGGER "ggu_test_metadata_geometry" BEFORE UPDATE ON "test_metadata" FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, '"test_metadata"."geometry" violates Geometry constraint [geom-type or SRID not allowed]') WHERE (SELECT "type" FROM "geometry_columns" WHERE f_table_name = 'test_metadata' AND f_geometry_column = 'geometry' AND GeometryConstraints(NEW."geometry", type, srid) = 1) IS NULL; END ee$aX A'Qtriggergii_test_metadata_geometrytest_metadataCREATE TRIGGER "gii_test_metadata_geometry" AFTER INSERT ON "test_metadata" FOR EACH ROW BEGIN INSERT INTO "idx_test_metadata_geometry" (pkid, xmin, xmax, ymin, ymax) VALUES (NEW.ROWID, MbrMinX(NEW."geometry"), MbrMaxX(NEW."geometry"), MbrMinY(NEW."geometry"), MbrMaxY(NEW."geometry")); ENDaA'ctriggergiu_test_metadata_geometrytest_metadataCREATE TRIGGER "giu_test_metadata_geometry" AFTER UPDATE ON "test_metadata" FOR EACH ROW BEGIN UPDATE "idx_test_metadata_geometry" SET "xmin" = MbrMinX(NEW."geometry"), "xmax" = MbrMaxX(NEW."geometry"), "ymin" = MbrMinY(NEW."geometry"), "ymax" = MbrMaxY(NEW."geometry") WHERE "pkid" = NEW.ROWID; ENDYA'Striggergid_test_metadata_geometrytest_metadataCREATE TRIGGER "gid_test_metadata_geometry" AFTER DELETE ON "test_metadata" FOR EACH ROW BEGIN DELETE FROM "idx_test_metadata_geometry" WHERE pkid = OLD.ROWID; END aaNxP++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)AAEtableidx_test_metadata_geometryidx_test_metadata_geometryCREATE VIRTUAL TABLE "idx_test_metadata_geometry" USING rtree( pkid,AAEtableidx_test_metadata_geometryidx_test_metadata_geometryCREATE VIRTUAL TABLE "idx_test_metadata_geometry" USING rtree( pkid, xmin, xmax, ymin, ymax) KK7tableidx_test_metadata_geometry_nodeidx_test_metadata_geometry_node CREATE TABLE "idx_test_metadata_geometry_node"(nodeno INTEGER PRIMARY KEY, data BLOB)'MMAtableidx_test_metadata_geometry_rowididx_test_metadata_geometry_rowid CREATE TABLE "idx_test_metadata_geometry_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER)/OOMtableidx_test_metadata_geometry_parentidx_test_metadata_geometry_parentCREATE TABLE "idx_test_metadata_geometry_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER) 99D 4C4´B4C4´B   ]>JFIF;CREATOR: jpeg-wrapper (using IJG JPEG v70), quality = 75 C V0JFIF;CREATOR: jpeg-wrapper (using IJG JPEG v70), quality = 75 C    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222R" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz %test_rasters ?(I ( ( +CMҥ$:\7ZE/r9 qgԹ3z ׭ۿ2&zyv[vv)6i$"Fv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aShQMiE6=Xu(aShyQMiE6=Xu(AaShQMhE6=X;E test@ E3@ E3test? E3? E3 e?t)'%indexidx_resolutiontest_metadataCREATE INDEX idx_resolution ON "test_metadata" (pixel_x_size, pixel_y_size)%%Mtabletest_rasterstest_rastersCREATE TABLE test_rasters ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, raster BLOB NOT NULL)P++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)>++3tableraster_pyramidsraster_pyramidsCREATE TABLE raster_pyramids ( table_prefix TEXT NOT NULL, pixel_x_size DOUBLE NOT NULL, pixel_y_size DOUBLE NOT NULL, tile_count INTEGER NOT NULL)   $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222T" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?*`2B}Vw.^XayڵW2KYVXm+5[{2q>uw5N=]Vx crdrW>JM;6 ?I{!םzWB [˞Ic1r}?A=6%{t>¼+89w\@q42[xðZ# ]7?SQRMw0IEQZ-kX1Rn԰1x.ga$[m/$p\8Xw'V®̈ڧ. @#}] zlƑ4Oj5v4+iX$J7^<~T{WX*N4xwNͧEz6y _M0qˏNEy- %E )MiwS["d:?:ƫ&5܋=Okc}7_5PJa\01@Z`MԖ-qs a>~e##sޭEt.4g7}*cVV8QJØon{Y~r>׏a4[ۨck>ƷV/mwN=+̴wRtԫ?­6vb/ pvkiL"|S#{TZ{dKb+=+1q U`toJ$1h2."bGY3@)S0ÜwWNA7{ )*1h.8QEb{eeBA qH1T͋F4V@wvw8cIzRҖ`cmbzQEQGC@ޏd7 qȊ=B=iu@^&.xj}:t%%Wx_6}좼GmryҠp ]$ש+c,!52P¼Zػ50OQXץaʙpKIŭ zL qĠ9?Vi'+uf9&N%/}(5^;mB)e*r+*zP,1@SgcZybiNJ.\%𮓪Z[|:_xψ4uH%A)_M)G݉ /i@AXPRwE՜'0=JIkLZ(QEQE~Uvh<EK`0{`( g#======H>>H=>H?HH>侑====>H=H>=HH>H>H===HHH>=H==HHH>HH>H==>=H>==HHH>?==>v?6?6?>>H>=H=>侑H==??6?>H>H>=侑=HH>==侑==6?H>>H>H>H=HH侑V?侥H=H=H===H侑=HHH>H>H>H=HH======侑=>HH>6?H>HH6?侑=H6?>侑侥v?6?HHH>6?H>>==H侑=H>H>侑=>H>H>H>H侑HHH>H>侑=?>>HH>H侥H=HHv?6?H>H>?H=H侥侑=侥==>V?H>6?=HVH侑H>>=?H>H>侷6??@?=H>>=??>H>=V?V?>>>>>V?=>H=H侥gdalautotest-3.1.2/gdrivers/data/mandelbrot.vrt0000664000175000017500000000224613701057753020331 0ustar eveneven Gray mandelbrot Python gdalautotest-3.1.2/gdrivers/data/mercator_new.sid0000664000175000017500000003522713701057753020640 0ustar evenevenmsidq( @CGCIMAGE::SOM#IMAGE::COLOR_SCHEME IMAGE::DATA_TYPE*IMAGE::DYNAMIC_RANGE_LEVEL@_+IMAGE::DYNAMIC_RANGE_WINDOW@pIMAGE::HEIGHT&IMAGE::INPUT_FILE_SIZEIMAGE::WIDTHIMAGE::WKTPROJCS["MER E000",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4267"]],PROJECTION["Mercator_1SP"],PARAMETER["latitude_of_origin",33.76446202777777],PARAMETER["central_meridian",-117.4745428888889],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]] IMAGE::XY_ORIGIN1`~AIX2OV#IMAGE::X_RESOLUTION@N#IMAGE::Y_RESOLUTION@NIMAGE::EOMC511`~AIX2OV@$Ο lAIOV@NND5o4A_CrްUZxQ<C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)zW ʀdbPґB+nyAgUj tهjsUxID VT& EDu4--z="af՜ m7:y͢9B>ogiF.).Y7t/0 L1$'(P:F-ȕ% Dbf0* `_^7g);{]pB* ^if*c94g&+g)^ 3˕Efà`4)W9|\>ۖ._F3 02CD7uD3n]a >%ɺBJ"yc52&-@)OOΤhZ+m,B?k*XG~a!Y4^| pR,2.. TҳbsEQC=@8q6EZDb`'+`YD :͸}FjΉ:н[_@<䧢t(#hHP@kr C'CuUF \C[aFZBXB7 _C>wD[ .TC*|,CDIsD\ hlM _Cj"rBA8 >! <?, > 9:<<>?'gdalautotest-3.1.2/gdrivers/data/F0116231.aux0000664000175000017500000001537713701057753017120 0ustar evenevenEHFA_HEADER_TAG@Rrootroot'AgRRDependentFileEimg_DependentFile'A ZF0116231.BMPl R0 Band_111815367Eimg_LayerentFile'A l oDescriptor_TableeEdsc_TableentLayerName1Ad0 Descriptor_TableeEdsc_TableentLayerName1A91de,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.PPP gEhfa_Layer15367Ehfa_LayerentFile'A{1104:Cdata,}RasterDMS,.D g\ DependentLayerNameEimg_DependentLayerName'Ad Layer_10 gR Band_211815367Eimg_LayerentFile'APPP1 l Ehfa_Layer15367Ehfa_LayerentFile'A {1104:Cdata,}RasterDMS,. l DependentLayerNameEimg_DependentLayerName'A( Layer_2l Rw Band_311815367Eimg_LayerentFile'APPPnd0 DEhfa_Layer15367Ehfa_LayerentFile'AL{1104:Cdata,}RasterDMS,. w0 DependentLayerNameEimg_DependentLayerName'ALayer_3 gtDescriptor_TableeEdsc_TableentLayerName!'AIMAGINE 2X2 ResamplingF0116231.rrd(:Band_1:_ss_4_)F0116231.rrd(:Band_1:_ss_8_)F0116231.rrd(:Band_1:_ss_16_)F0116231.rrd(:Band_1:_ss_32_) l RRDNamesList367Eimg_RRDNamesList'AIMAGINE 2X2 ResamplingF0116231.rrd(:Band_2:_ss_4_)F0116231.rrd(:Band_2:_ss_8_)*F0116231.rrd(:Band_2:_ss_16_)PF0116231.rrd(:Band_2:_ss_32_) 0 RRDNamesList367Eimg_RRDNamesList'AIMAGINE 2X2 ResamplingF0116231.rrd(:Band_3:_ss_4_)BF0116231.rrd(:Band_3:_ss_8_)gF0116231.rrd(:Band_3:_ss_16_)F0116231.rrd(:Band_3:_ss_32_){1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,.gdalautotest-3.1.2/gdrivers/data/s4103.blx0000664000175000017500000022516413701057753016734 0ustar evenevenfKO4@ I1NK?1NK?4~,'G#3b h00'f@w.S-e.-$w-81O90.*6/G0 Q24 1*Ġ-bTP{;ؔR~rJ .fĠ傾obPQIyAE'4$(d]s6%,/bPQI.II ƕS%ƈLO ;ۡE(3Ip`m0o#"(P2i"A@2(`!\!pd!4  `\.(޶Bh qq@x !(`` B(2q@0FPq@Ld\PD4t4! .h\\k.220.hM24.!4 F@0 =%0(kcɠN@ AqqCCt.0h (C! hCI(\( e6 b 7yi`P&CHd"M6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 < CKb8`zZ.xCtmQ\ (.6rh\-&@.sFny:(( hBi@!@ p(ӣi˹ EtA` <Ap"R+` g, h3A17-Bn:2̂nQ@nэ4&D!m 2h. Lrz2:!<"h'6'G2FtPnd’2mFab(@hLe5<mB(QGs. 9w.ap:Bxy 4GFbCi bm. BtiFFM M;"4\廁``"ɢ stm2AӚ4{HApNҎȸhR'A!AB ZE-9by7pRloKEy6( P 4!4Brm8|4 7th#mfhpP M:7s(͢H.m6Ex@mAFhnͪFڈVۙh@`Fy FD)w'B9A2GF<@E pEP3M t xhb0lE͢Bm@:s/K5x 1 DQfaG@bmYscBtiS(F ;t0itNBpP ˣ`d\M@(R(\:ۖ2&nP(<fFV 46@Q nd <!15im ;@DBtnDQh!;jZhtt6`PdCms7!65din&mzjZ"  fQA4 x eB€AAD@Bh 6tn7MKnh;\D&N"EtnXc 9R-4h`P5 !:E4 Ј `\Є6хѠeb1;Y*Lʀ) F.x(LG.P D&B 29&Mh2`&PqE6'hdQEP"HLB`B@D2 @"pBiM'q@A@@HF@B.CCib(bh4( "5.@\PjJ@4Ip&( p'B M4چ3XDhchLl0))!J BmCAn 66"؁( Hm@6p 6ЂBE @B&ȁ0!VhPQP((CR%0DB@PA0'H@@B!@:3Sojn(.18;/ LE^e#@C6Imhz<K@Ha?EGuwO=CP]")Dr  _ #-7AKU_wKwd! !"#$%&')*-01d 3/>4D4FAFA>@>@d:\scratch\dist\79990093\Output\rastert_elevation_1.txtd:\scratch\dist\79990093\Output\rastert_slope_1.txtd:\scratch\dist\79990093\Output\rastert_aspect_1.txtd:\scratch\dist\79990093\Output\rastert_fuel1.txtd:\scratch\dist\79990093\Output\rastert_canopy1.txtd:\scratch\dist\79990093\Output\rastert_height_1.txtd:\scratch\dist\79990093\Output\rastert_base_1.txtd:\scratch\dist\79990093\Output\rastert_density_1.txt+K 'K &K + U 0K2K5K7K7K7K 9K 9AK  4AK  &A AdQK NK  V U  d U  U  K!  K%  K)   U%   U  K  , U4K =A BA BA AK >K :K 7Kv5 Um3 _ g 5UdcS-dc-dej7 nA s7 u K tK poK ljAdin7dh-dg7d'A &A ( U . U 1 U4 U7K8K:K:K ;A ;AK  8K  /K  KdLA  EK  NK  ^ U!  e U%   U-  K1 K0  U$   U  #K 2A 9K @A CK CK AK=K9K7K6Kx3 Uo3Kh8K b IKd_Ad_ #db#i- nK r UpKmmK jhAdgzf&7 (K ,K 1AK 4A7K9K:K<K<K =K >K ;K 5KK KAd @K  HK  V U!  a U   U%  K% K* K"  U , U 8K ?K EAK EA CK?K;K8A8K5K4 Ux4Kq8 Ug=K ` GK [uAdZ #`g- l U m Ul U jwK fn7wdA 'AK +A /K 3K 8K 9K;K<K>K>K ?KK ?K =K 9K K OAd =K  CK!  PK%  ] U  UK U "K ) U 5 U  > U  EK  GK DA @AK=K9K 7K 6 U3K4 U 6U z9Uo< Uf?K ]DK YXKdY7d]7deK h Ui Uh U gK dK )A ,K 0 U 4 U 9 U 9K :K<K>K @K AK AK @K <K #A TAd ;K  > U  JK  Z _  U K U)K +K 9K B U  EK  C U  ?K <A 9K 7K 5K 4K 4K 6K 8K ;Ux>Kn? U d@ U \ CK WbK W Ad\7 `K c Ud Ud U c U +A .A 1K 5K 8K 8K :KK =KK?K BK BK AK AK <A  ,A ]Ad :Kd : _  BKS U U U% U+K-AK 8K =K  ?K  > U  <K 9K 7 U 5K 4K 4K 3K 6K :K>K@Ku@K kAK aBK Z HK TuKdU 7dXA [ U \ U]K ZK %.A 0K 3AK 5 U 6K 8 U ;K >K @K CK CA DAK DAK >7K  5A -K  <Ad 4K 8 UI Ud UK'K+K/K 4AK 67  7K  8 U  6K  5 U 5 U 4K 3K 3K 3U 6A :K=K?U }@K s@A h>K _AK VFAdRj7dQ7dR A SK S7 P- .0K '2K 4KK 5K 7K 9K <K ?K AK DK GA JA I7 EAK  =A  #K ?Ad 1K 1 U@ UZ _K  %K  ,AK 0K /AK  0A  1AK  2K  2K  4 U  4 U 3 U 2 U 2U 2K 6K 8K ; K =K =K {<A q:K g:K ]8K U;A N HAdL-dL-dK- I-d73KK /5K(7K 7K 9 U ;AK >A AA DK HA LK NA MAK LA  CA 7 ?#K  ,7K  , U 4 UI U K &K .K 1AK -AK  .K  /K  0A  2K  5 U  4 U  2K 1 U 2 U 3K 6K 7K :K! <A <K 9A {7A q5A! h0A _0K U+K OKdN AdJ +AdI:Ad?5K 78K 0:AK '<K >K AK E GKK ORK RK QAK  N7  CK &A K .Ad ( U ) _ 4 U  U" U-K /A -K .K  /K  3A  6K  7 U  4K  2K  1K 1K 3K 6K7K :K ;A ;A 9K 7K& {2A% t-K k,K d$K ^U [ U T& U P3 U G8 U ?; U 6>K .BK %EK JKKNK QK UK WK XA XKSK  IA  9K  !A bA  AA  . U ' U- UQ _ _& U ,K -K 0K 2K 5K  9 U  8 U  5 U  0 U  .K  0K 3K 6K9A <K<A ;K 8A 7K$ 1A -K w*K r#K mK i$ U a/K X@K P<KF>K =BK 4HAK *MK !S UXK\K` U`AK _A YK MK ;AK  +Ad A  A  YA @K / U- U@ Ud _ U (K ,K 1A 3K 5K 7K  6K  0K  )K  +K / U 4 U 8K =K! =K! =K < U 9K7K 1K .K .K |*K x' U t1K lB U `R U X=ANAK CGK 8LK .RA $XAK]KcKgKfAaA  QK  <AK  *7d !7d A  K  K XK ; U+ U/ UKK U $ U * U 0 U 1 U 0K 1K  0K  )A  %A * U / U 6 U< U@ U > U ?K >K9K6 U 4K 4 U 6 U 6K ~7K yGKpVKb` U bAKUFKJKK =OK 2TAK %YAK ^A bAKdA `A  SA  ;A  )7d AdK A   U  K  U P U *K K$ UV U U ( U - U . U ,K , U  ,K  'K  ' U - U 3 U :K @ UC UB UCK @K; U: U<K< U? U@ UF U{R Ur] Ubb UjFK\IKPNKASK5V7K 'W7 XA YA VA NA  =A  )Ad A  K  K   U  K  !K   U  U BK  U U U; _$ U, U , U ) U * U , U +K 0K 6K <K AK GK H U G UGK DK B U D UFKE UGK G UM U~VKt^Kc`K qH UcKKUPKEQK9SAK *R7 QA OK IK AA  /A  "K  K  K  K  !AK  %K 'K  (K &K! K  U KK U U/ U- U * U - U 1 _ 6 U ;K AK IK NK RK OK N U L U K U J _ LK MK MA NK NK Q UXKu\Ke\ U xIKjLKZOK KNK =NK 0LA %KA HK BK 7KK (Kd K  K  K  A  &K  (K  +K  ,K  -A +K K  U K  UKKnK1 U7 U =K D U K U TK  \K  a U a U ]K Z U W _ U _ S U UK U U UK  UK  TK VK YK wZK i[K IK rLK `M7 SL- CL7K 7JK *IK EK <K .K %K !K #K  'K  )A -7 /A  / U  .K  .K  +K *K ,K 7K K K  U U UQ UQ U V U \ _ f U oK  u U  vK  s U m U f U ` U ^ U ^ U ^ U ]K  ]A  \A ]K ]K z\ U l^ U KK yNK gM7 ZL7 ILA >JK /H U &@KK 3K (K &K &K *K!  -K)  1A'  5A 7A 3K .K  , U  - U  0 U  1 U 0 U +K  U  UK  _ _m U f U g _ m U vK  ~K  K  U U x U o _ i U f U dK dK  dA  dK dK dK{dKlbK M7 ~PK nO- `N- PMK DJK 6DKK .97K &,Ad"'K)K*K.K% 1K18K1 =A% ?K 8K .K - U3 U 6 U 5 U 4 U 2 U 4 _ K K U _ _ s U m U l U p U x U  U  U  U  _ } _ t U m U kK jK  jK  iA h7 h7K{gAleA RA R- uP- eP7 WNA IH7 >=7K 62Ad0)Kd+) U%, U / U2 U6K% =K)  BK%  CA% <A 5K 3 U9 U< U< U< _: U= UH UK U U _ U q U j _h _n U zK K U  U  U _ z _ u U p U  n U  mK k7 jK zhK lgK UA" TA" {S7 jRA ]M7w OD7 H8AK ?0K :+U4. U.1K(5 U!7K<KAK! EK%  EK% BK AK A UH UL _N _L _G UJ UU U{ U _ U _ _ _ v _m _k UpK }K K  U  U  U U } U v U s U p U nA lK yiK leA XA X7 W7 nSA bKK VA7 P8H5 U B4K;7K59 U.< U'?K DKHKJK  JK"  H U J U WK k Up _m _i Ue Uc UiKx _ U U _ _ _ _{ _t _p UuK A  K  K  U U U } _ w _ r U qK mK xh-w lb7w Z- Z# X# tR7 hKA ]BAK W=K O> UH@ UAC U:FK3I U,K U$MKPKRK QK  PK UK gK } UK U _ U U} U _ U U U U  U _ _ U{ U{ U U K  K  U U _ _  _ v _ s U n U whK maK [# Z-K X- xSA mNK cJAK \IKTL ULPKETK=X U6\ U.^K'_K_K]K [K ]A  d U rK  K K U U U U U U U U U U  _ _ U U _ U U  K  K  K  U  U  U  U  { U  s U n U wi U md U Z- X-K UA {RKK pSAK gTK ^Y UW_KMdKFhK>lAK6r U-x U&|KxKq UmK oA  uA  |7w  A  K U U U U U _ _ U  U  U  U _ U _ _ U U K  A  A  K  U  U  U  U  y U ~sK vn U mi U WTKw R UwRKsV7 i[7w _cKw VmAw LtAwDxK;{K2~Aw(Kw 77w Uw Kw Aw A K K  K  U _ U _ _  U  U K  U K  U Uw U U U U  U  U  U  K  U  U  U  U  U  U { U tvK lo U UAw SKwRKwUKvYK k^Aw _fAw Sm7 IsAw @wK 7yA -{K !7 A 7 7 7w K  U  U K  U  U  _ _ U _  U  U  U  U  U  U _ U K U  U  zA  wK  v U |K K  U  U  U  U }K w U q U jv USAw TAUKXKy[ U l_ U _bKw Rc7 GeAw >h7 4j# *kAw oKvAK AK 7 7w Kw Kw Kw Kw  U  U  _w Uw U U  U  U  U  U  K  K U U UvK  lK  c7w  Z7  TA TK a U q U  K ~ K z U v U q U l U f UTA VKY U] U{_K naK ``K T]7w H[Aw ?\7 5`# *fAj UoKwK Aw Aw Aw Aw Kw Aw K  U  U  U U K  U  U  K  U  U U| UkK\KUK TKw QK  LK  KK  P U Z _ c _ m U z { U t K o U j Uw f U a UVZK_Kc Uw{fKwngAw `fKw VcAK K_A A`7w 6gK)nKqKtKwK yKw {Aw AK A  7w  Aw  Aw  K  U K A U  U  K  U  U K U _z _e _^ _\ UW _ W U  \K  c U gK k Un _ ys U q}K j U d U `KZK[A _cAgKwzk7wmoAK_rKwUtAwJuKKBtK4sA%r7sAK tAw t7w tAw u7K w-w |Aw  Kw  Uw  Kw K K A u7 dK  g U  qK K  K U U _ _ _ _ _ _ | _  y _ { _ { U| U z _ vx U ny U g z U `  U Z US Uee7 fAiAwo7itKw[|KwPKwEA<A /A #z- u- r7 pKw nAw nAw p7w t7K  yK  K  U K AK A K c U b _ g _ r U  A  K K U _ _ _ _  U  U  _  _  U  U { U r _ l _ e z U ^xKWzAMKo7m- lA mAtpAew UwTAwH7K <A 2 '- 7 Az7 uAw oAw l7w l7 n-w  p7w  t7 Aw A - - K  _ u Uq _r U  { U  U K  U  U  U  U  U  U  U  U  _  U { U t U m U h U b U ]|KTvKJyKw- v7 s7  q7 r r7_!wA L~A >-0#&## #K}7 w Uw sAw o- m7  l7  mA qK ~ U A A U _ _ _ z U z U } U  U  U K K  U  U  _  U K  U z U s Uw l UK f Uw b U ^ U Z _Q{KGy Uy-zA yA  wA m"u7 X"u7 Ey#6{'|zu snlnrKwdtAK rA  oK  k U  hK  i U r U UA _ _ _ U  U  U z _ s _  rK |AdKd Kd KdK }K zK v U pK kK d _ _ U Z K X U U U L U BK u#y7 |7y }7 f"z-S!u?o2d'QA;8 =#D-M#K W7 `AdgAK  k U  kK  fK bK d UuK7  AK  U U  _ K  ~ U  p U  [ U  EKd 8Kd >Ud PK bKdz wKdv Kdr Kdn Kdi A d uAK _ i7d[c7dWj7dS }AdNKdE~K <zK o- s!wp {^ yMr?\6>/,#d)'K #) U ,U 3 U 8K ?K EK M U VAK _A  cAw _K WK PUd PKd[AduAK K  Kd K  rK ZUd >Kd 0K ( U+ U3 U= UF U| M Uv T U qUUdnGUdk 7Udg .7dd-Ad_4K Z @K T QK McKwdCkKd8nUd k7 !m7|!o-joXiKVD3@";K 8! U 0'K)/K5K :A ?A FK MK PAK TA  SAK LA CA  =K =K  ?K  EK  LAK  OA FK  4Kd "Kd  U U$ U/ _; _E _K _N _y O U tG _ r6 _p" _ p # U k . U g< U _JK XYK NdK Dk U 7nA mA  kAz gi^#[K-R/-N-MAI U F# U =+U74K(;U@K FA LA OK NK K7w A7  7A  1K  3 _  7 U  9K  9 U  6K  /K  $K   U _ _" U1 _@ _L _U UY U\ _z ] U u_ _ rj _r _ru _pd _ k c _ af U Xl U Lq U BsK 3tl-f{[mFd/7]-\7ZW U R(K J1KA: U4CK&JA NA QA PK L7w EA# 9A&  1K$  .K  2 U  8 U  ; U  9 U  3 U ) U  U  _  U ! _ 8 _ J _V _] Ub Ue Uf _z f U u m U q _ o _ n U l Uh U`y _Vu U IvK =vA 0u#fXEv,-qm7l U gU c&U \2 UU< UIFK=NA +RK SK UK RK MK EK ;K#  6A  6K  :K  @ U  C U  ?K  : U . U U  U # _ 9 _ O _ Z Ua _d Uf Uf Ue U { e U t j U o z U k U g _ f _ b _\ U QzK ExK 8xK -u7 SK>-K-A} Uz U r) U m3Uc?KK[KAKNTK AZK /[K !YK XA UK QK JA CA  BK  E _"  KA  PA  Q U Q UO _D _- _* _> _ S _ \ _a Uc Ue _e _e U d U { d U t i _ n r U h | U c Ua U] _W _ L~ Uw @|73|7+ x-2-d(-K  #KA U ! U + U }6AK t@AK kJK_VA Q^K CaK 1aK#`AK ]A XA UA PAK PA  TA  [A  bA  fK j _o Ur Uv U U| _u U q _ n _k _h Ug Uf UgU jU {m _ sq _ m v U f z U b U] UY U R~ U G{-:{.{* x -d7 K  U #K +K 5K ?A zHA pSAK `[K RaK BcA2aAK#]7 ZA XAK VA WK \K dA  lA  sK  y U  U U  U  U U _ _ U U  U w U p Ul Uk U o U ys _ pw _ j z U c ~ U_ UZ _V U Nx U Cu5u, t)o U U " U ) U .K 6K ?K HA PAtWAKb]KKT`A A_7 4ZA &VA UK VA ZA `K f U lK r7w  xAK  K  A  K  _  _ U U U U U  U  U  U u U q U p U vq U nt U g w U a } U] _W UR U K| U @v2r, p(l  U $K *K 2A 7A @A KA TKYAv_KdbKUaA D^AK 7YK+XKX U[ U aK e7f-fgmv AK  K  K  U U U U U  U  U  U  U xU ~r U tm U ml U eo U _ w UZ US _N U F U ;}A 1x+v(rgdalautotest-3.1.2/gdrivers/data/testtil2.xml0000664000175000017500000000112113701060021017706 0ustar eveneven 20 20 16 WV03 2015-01-01T00:00:00.000000Z 2.700000000000000e-02 byte.TIF 0 0 20 20 gdalautotest-3.1.2/gdrivers/data/byte_chunked_not_multiple.nc0000664000175000017500000004007713701057753023232 0ustar evenevenHDF  ?@`OHDR }" V 4GDAL_AREA_OR_POINTArea . ConventionsCF-1.5 PGDAL0GDAL 3.1.0dev-245fbcc-dirty, released 2020/01/07 ahistoryATue Jan 07 18:24:09 2020: GDAL CreateCopy( byte_chunked.nc, ... )ƴOHDR   mbщOCHK|D&transverse_mercatorFC6FSSE_ROHDR  ?@4 4  G 0CLASSDIMENSION_SCALE "NAMExSOCHK <xOCHKt! 4 _Netcdf4Dimid  ?standard_nameprojection_x_coordinate B long_namex coordinate of projection !unitsm>ͽFRHP  (TBTHDd(  ½BTHD  d( F8}FSHDPx(K%%IBTLF!6L X KX h20PD\J PVP`A[Y`מ`_B W` 8 ]CúY`X5{HCBTLF CY`P PY`h!6W`PX  _B -SOHDR  ?@4 4S  G 0CLASSDIMENSION_SCALE "NAMEyOCHK_ ry 6pOCHK 4 _Netcdf4Dimid  ?standard_nameprojection_y_coordinate B long_namey coordinate of projection !unitsm,COCHK@ J_NCProperties"version=2,netcdf=4.7.0,hdf5=1.8.16ltFHDB>I spatial_refpPROJCS["NAD27 / UTM zone 11N",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.978698213898,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","26711"]]FHIB vFHDBuȿgrid_mapping_nametransverse_mercatorlongitude_of_central_meridian ?@4 4@]false_easting ?@4 4Afalse_northing ?@4 4latitude_of_projection_origin ?@4 4!scale_factor_at_central_meridian ?@4 4x#? long_nameCRS definitionlongitude_of_prime_meridian ?@4 4semi_major_axis ?@4 4TXAinverse_flattening ?@4 4Uuor@ GeoTransform440720 60 0 3751320 0 -60 AAAAxAhAXAHA8A(AAAAAAAAAAALALALAݜLALALA7LAULAsLALALA͝LALA LA'LAELAcLALALALAx+nɮR'::%[SrqJoxkiiIL(bfTx!@ "#gO W aY0 QzF%bzvt: ,7iz<-xNޚ[Vy[Z!fg̩Ff HJux DQ  & ^ËjߚPp W'4{vok~xFsͥ RT`6dmQN߬nSO|;UG> Zߠ+@j~tKhf&jjNm6VG l"(`hX뵤V1|jbwۢ2&~(Ð6,'-v@ VJ"alLA.̴!n>xKy]v;'q.%4 Dn]'fЧͨ) U'(#J Ia@p`*E"p5!} L c0dieFʬjQ<, E[ )>-upe##<0 1\l t]( do>\8wlr 0/@\F ^)_F,zĸ8=ŸZSZ/y1 A!O侶lbM!I_|ruG ,u|f{Ħ>SDu!ȞAjCW :V:X6ET~MAhm+NU4c3~Ke`±FP@bwȒoRO+l)\%*{b0v掹K^RKΔ<>xfIv6F5-unuH91vWHbI, l&Ohrlo N0XlgJ js8y1ZE'!*oJc%I l%//Wm. !q9 F5-W0ͽPP.4A#>=V)CEUOԩ˵NGz|f_#lb@-eߛXh$ap~_7 a)vH@Lߴ/i`_1OuSDB'&nH[L/)yK^Pq/)yK )yK^R|FѪ)xDbdv`ض-W:/)yK㑔/)yA/)yK^O~ljĆuIW<q[u|7|7ʹl6 al6 0 0 511 511 x y 440750 3751290 60 0 0 -60 test.jp2 Record Interleaved Band 1 0 255 some_id some_namespace gdalautotest-3.1.2/gdrivers/data/byte_image_origin_not_zero.jp20000664000175000017500000000106613701057753023454 0ustar eveneven jP ftypjp2 jp2 -jp2hihdrcolrjp2cOQ)2<((R \@@HHPd%Created by OpenJPEG version 2.3.0 tϵX$ 5`E!P{\~wNz5>$vxʩc6 n x}UvջTVj <щLȉ91gtShG8+=0&/G, q#ie}& ~l/pzd|l_I| VDɩbw3Y#̃QU4RāBt#l j̒6@+:PtU8~"ИUXƬ3=ulZȷ),;-hKLA6bӭgp &`?3i]ui ݘogdalautotest-3.1.2/gdrivers/data/n0o0y867.0fn0000664000175000017500000000000013701057753017246 0ustar evenevengdalautotest-3.1.2/gdrivers/data/test_pdf_composition_outline.pdf0000664000175000017500000000550113701057753024127 0ustar eveneven%PDF-1.6 % 3 0 obj << /Name (foo) /Type /OCG >> endobj 4 0 obj << /Name (bar) /Type /OCG >> endobj 5 0 obj << /Contents 6 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 7 0 R /Type /Page /UserUnit 1 >> endobj 6 0 obj << /Length 8 0 R >> stream endstream endobj 8 0 obj 0 endobj 7 0 obj << >> endobj 9 0 obj << /Contents 10 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 11 0 R /Type /Page /UserUnit 1 >> endobj 10 0 obj << /Length 12 0 R >> stream endstream endobj 12 0 obj 0 endobj 11 0 obj << >> endobj 22 0 obj << /Count 9 /First 13 0 R /Last 21 0 R /Type /Outlines >> endobj 13 0 obj << /A << /S /SetOCGState /State [ /ON 3 0 R 4 0 R ] /Type /Action >> /F 1 /Next 14 0 R /Parent 22 0 R /Title (turn all on) >> endobj 14 0 obj << /A << /S /SetOCGState /State [ /OFF 3 0 R 4 0 R ] /Type /Action >> /F 2 /Next 15 0 R /Parent 22 0 R /Prev 13 0 R /Title (turn all off) >> endobj 15 0 obj << /A << /JS (app.fs.isFullScreen = true;) /Next << /S /SetOCGState /State [ /OFF 4 0 R /ON 3 0 R ] /Type /Action >> /S /JavaScript /Type /Action >> /Next 16 0 R /Parent 22 0 R /Prev 14 0 R /Title (foo on, bar off + fullscreen) >> endobj 16 0 obj << /Count 4 /Dest [ 5 0 R /XYZ null null null ] /First 17 0 R /Last 20 0 R /Next 21 0 R /Parent 22 0 R /Prev 15 0 R /Title (1: page 1) >> endobj 17 0 obj << /Count -2 /First 18 0 R /Last 19 0 R /Next 20 0 R /Parent 16 0 R /Title (1.1) >> endobj 18 0 obj << /Dest [ 5 0 R /XYZ null null null ] /Next 19 0 R /Parent 17 0 R /Title (1.1.1: Page 1) >> endobj 19 0 obj << /Dest [ 9 0 R /XYZ null null null ] /Parent 17 0 R /Prev 18 0 R /Title (1.1.2: Page 2) >> endobj 20 0 obj << /A << /D [ 9 0 R /FitR 1 3 2 4 ] /Next << /S /SetOCGState /State [ /ON 3 0 R ] /Type /Action >> /S /GoTo /Type /Action >> /Parent 16 0 R /Prev 17 0 R /Title >> endobj 21 0 obj << /Dest [ 9 0 R /XYZ null null null ] /Parent 22 0 R /Prev 16 0 R /Title (2: page 2) >> endobj 1 0 obj << /Count 2 /Kids [ 5 0 R 9 0 R ] /Type /Pages >> endobj 2 0 obj << /OCProperties << /D << /Order [ 3 0 R 4 0 R ] >> /OCGs [ 3 0 R 4 0 R ] >> /Outlines 22 0 R /Pages 1 0 R /Type /Catalog >> endobj xref 0 23 0000000000 65535 f 0000002150 00000 n 0000002215 00000 n 0000000015 00000 n 0000000059 00000 n 0000000103 00000 n 0000000277 00000 n 0000000349 00000 n 0000000329 00000 n 0000000370 00000 n 0000000546 00000 n 0000000621 00000 n 0000000600 00000 n 0000000717 00000 n 0000000859 00000 n 0000001016 00000 n 0000001263 00000 n 0000001417 00000 n 0000001517 00000 n 0000001626 00000 n 0000001735 00000 n 0000002045 00000 n 0000000643 00000 n trailer << /Root 2 0 R /Size 23 >> startxref 2355 %%EOF gdalautotest-3.1.2/gdrivers/data/fake_snodas.dat0000664000175000017500000000000013701057753020376 0ustar evenevengdalautotest-3.1.2/gdrivers/data/pds_3355.lbl0000664000175000017500000000703613701057753017407 0ustar evenevenPDS_VERSION_ID = PDS3 RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 15 FILE_RECORDS = 20 LABEL_RECORDS = 1 ^IMAGE = ("small.raw", 1) /* This file was manually modified substantially from the original to produce a small file demonstrating bug 3177's detached file with an offset */ OBJECT = IMAGE LINES = 20 LINE_SAMPLES = 12 BANDS = 1 CENTER_FILTER_WAVELENGTH = 1.000 BAND_STORAGE_TYPE = BAND_SEQUENTIAL OFFSET = 0.0 SCALING_FACTOR = 1.0 SAMPLE_BITS = 8 SAMPLE_TYPE = UNSIGNED_INTEGER LINE_PREFIX_BYTES = 3 END_OBJECT /* Identification Information */ DATA_SET_ID = "MRO-M-HIRISE-5-DTM-V1.0" DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT DTM V1.0" PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" PRODUCER_ID = "UA" PRODUCER_FULL_NAME = "ALFRED MCEWEN, PRINCIPLE INVESTIGATOR, SARAH S. MATTSON, TECHNICAL CONTACT" PRODUCT_ID = "DTEEC_008669_1705_009025_1705_A01" PRODUCT_VERSION_ID = "1.0" INSTRUMENT_HOST_NAME = "MARS RECONNAISSANCE ORBITER" INSTRUMENT_HOST_ID = "MRO" INSTRUMENT_NAME = "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT" INSTRUMENT_ID = "HIRISE" TARGET_NAME = "MARS" SOURCE_PRODUCT_ID = (PSP_008669_1705, PSP_009025_1705) RATIONALE_DESC = "Sulfates and valley system in Melas Chasma " SOFTWARE_NAME = "SOCET Set v.5.4.1.20090303" OBJECT = IMAGE_MAP_PROJECTION ^DATA_SET_MAP_PROJECTION = "DSMAP.CAT" MAP_PROJECTION_TYPE = "EQUIRECTANGULAR" PROJECTION_LATITUDE_TYPE = PLANETOCENTRIC /* NOTE: The EQUIRECTANGULAR projection is based on the formula */ /* for a sphere. To eliminate confusion in the */ /* IMAGE_MAP_PROJECTION object we have set all three radii, */ /* A_AXIS_RADIUS, B_AXIS_RADIUS, and C_AXIS_RADIUS to the same */ /* number. The value recorded in the three radii is the local */ /* radius at the center latitude on the Mars ellipsoid. That is, */ /* equatorial radius of 3396.190000 km and polar radius of */ /* 3376.200000 kilometers. Using the local radius of the */ /* ellipsoid implies that the MAP_SCALE and MAP_RESOLUTION are */ /* true at the center latitude. */ A_AXIS_RADIUS = 3396.036 B_AXIS_RADIUS = 3396.036 C_AXIS_RADIUS = 3396.036 COORDINATE_SYSTEM_NAME = PLANETOCENTRIC POSITIVE_LONGITUDE_DIRECTION = EAST KEYWORD_LATITUDE_TYPE = PLANETOCENTRIC /* NOTE: CENTER_LATITUDE and CENTER_LONGITUDE describe the location */ /* of the center of projection, which is not necessarily equal to the */ /* location of the center point of the image. */ CENTER_LATITUDE = -5.0 CENTER_LONGITUDE = 180.0 LINE_FIRST_PIXEL = 1 LINE_LAST_PIXEL = 26376 SAMPLE_FIRST_PIXEL = 1 SAMPLE_LAST_PIXEL = 8211 MAP_PROJECTION_ROTATION = 0.0 MAP_RESOLUTION = 58607.71638002 MAP_SCALE = 1.0113804322107 MAXIMUM_LATITUDE = -9.2737184447053 MINIMUM_LATITUDE = -9.7237459567128 EASTERNMOST_LONGITUDE = 283.3744507 WESTERNMOST_LONGITUDE = 283.2343445 LINE_PROJECTION_OFFSET = -543510.49999999 SAMPLE_PROJECTION_OFFSET = -6050328.5 END_OBJECT END gdalautotest-3.1.2/gdrivers/data/12bit_rose_extract.jpg0000664000175000017500000000343113701057753021647 0ustar evenevenJFIFC    $.' ",#(7),01444'9=82<.342 22  9 !1 "AQ#BaRq%235DSbr?G;Nut޵F8hR7=?!MKO]hTګZdR4ҭ -)ZnQ#pўSu::J QcfĒJ6XWoo# ;j\UHWEh2KR ;HJ ($p9r5jm^Tʄ:$xDwu 8 YU9覑P.u:pѠU].)a .Aq)AN<>~Pd:ac,uN#;9ښπADWŽh J+)(RTȍ9N)% F{r؜$߉^]Ԋ]F,'?Emٔn}op^SxBtW*ޕ{bɈ™ TV \Wn#.W}wsK{Fmr6n;&4fܐ͠.-T@3 uԭuiFUj̘CUalYY!*$êr2xW_ڳ5fkQkui+t(% ȌeĄ%œBHJFAP #CqfT .lH?8; -z`mCZ5H2:TqL!AiQH!]S--MKe_}T2-ncZPPyXKZGFJiǞ Kt˟oHڎ9Fdւ}a28,?.o4նe9yBu oR;׉}`K!jKhRv '窟Z5)T \zTCrU/yx.^7 bhQTWx>ޱm^5/5b%NNڌ$B| >~.mx#Kr=:lc#9ݐ>OAm8M۔ vIH׈8_^Γk34*C*m)~8鸼 ɿ*j:QW!~D \a \9N=iO1vŇJJRtGBߖBa wWz e*tV(32Iyը)Y??GCwM JTN7 +/LR'vzgoUuV]Mf Rxf?ۋ%#+gdalautotest-3.1.2/gdrivers/data/nwt_grd.grd0000664000175000017500000001544613701057753017615 0ustar evenevenHGPC1@?/WA@XALALAT=CDT=CDFrom: Sqr(Grid1)CoordSys Earth Projection 8, 104, "m", -111, 0, 0.9996, 500000, 10000000AT=C}MDTjDFD|Dhhhhhhhh7)7)7)7)7)7)7)7)7)hhhhhhhhh7)7)7)7)7)7)7)7)hhhhhhhhhhh7)7)7)7)7)7)7)111hhhhhhhhhhh7)7)7)7)7)7)7)11111111hhhhhhhhhhhhh7)7)7)7)7)7)111111111hhhhhhhhhhhhh7)7)7)7)7)1111111111hhhhhhhhhhhhh7)7)7)11111111111hhhhhhhhhhhhhꋾ1111111111 n n&hͱt`x;V`pKNЫo=A\~U|߀U *ں;}1y*%|joYPC(/ Q=U}Ϯll7LFO=\ ºƅ!S_϶OE nЈTp8<tInz7E~W3О6қ 7M]b™tsI3Dc+Aϸ dܺB A ;_SxI5"` R!|̔QR`Y4,K (b=i> Dvyӫ|@ϼ%=\@.o|80dz1M"ѮGьsТ_%:U~"qVDM70of=nQRaFާ@#w0>K,Q :M&@KD-T|V #SFdaRACt_H nd= q놦-wkJ  ;M]`4Ӣf l h?iqpW}3O-\` Ƿ;o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`/e{j$(v]ƾ $J |$ IlmGB/;w.Z!`!j/Еks*a*jl}7XvHv!W*LO^S]Y l3X.RawNiZޒ˂MPVXM&z)6R}ZH2 D8oȿ C1OR [ uq OQYaFʈZF)oCשNBE6HF7eұ˳Ƹ@g _=T:IBq_9 239[r3wܙ3C/f #kv:6lUIYcWxQ<[w0[&/ NCPV!?n6j%=%ߢ.j)(&/TE B12kgť,c]_гV-"޲<;S'02OhajZ,Q*Aˏٕvo揗QJK(q[:^#і%wp@@*a\*v/s\mŃ It]^{*X U4њ2S{Pةdr|,L5m`-I2aKV^̎$/{ncnmS/ nQ6`ΉhM R@x[*g+J\dxEH[2;|B1G~hgZw/+u4-<)qQn ԇz@r,z/:ج_~;y`cSɓ&{9ol $Vy] F2@7 %2/Td21l$SL\8Tp{̵+S.kR^WQᏒ+jzbqHc6]8pJ|#uj 9>ѭ aUj Q- 87/,;"&\Ckѱ(7-B8b_syƃ$XrNةLrk*vZ9!Jgf^L\9Ru.[IrOszZNиr3Z3qO-h?m|>þ'mt-FaD`yqJ]4oR2Ơ*Mj!59Z*}^AP8Fns2 6\%",i ĵ9 OCʅEREmis֦0d .?9(JFƣd#&/JE|7HQMq ^tr砍cב'7c 譢9Ղ`eƂtc~->N$|aUq|͂vt! DqqT+OwQ]\qЛMYaCLdREjO+hQ9j"Ii/yȵ!T׵X4: ҚoxL[Aq:AydK@0,s!//{GW.:޵A(߰d<3ty@v">YHy?us`JJw^~_d~UVƉȅ0|s3g )ő]Mj:^׭drRps L2RF%m\*IA ,@?w=ј YpN;MKuJ}Ϋz; >iϜsyC K;ɴb<7Po$¿\LnAL1&6^hiP^?tQŵynBU,,coq1)lN iMҤI!ܻ6[޵T8J2}}~B2o[ .a{:C1 E _Id5! 6Agdalautotest-3.1.2/gdrivers/data/rset.ntf.r10000664000175000017500000000536413701057753017460 0ustar evenevenNITF02.1003BF01GDAL 20021216151629 U 00000000000 00000000280400040400100052500000018750000000000000000000000000IMMissing 20021216151629 U 0Unknown 0000002500000025INTRGB VIS 08RG225603S0445019W225603S0444013W230609S0444013W230609S0445019W0NC3R N 0G N 0B N 00B00010001002500250800100000000000001.0 0000000000jbcRZXNhZ ok|YWcVS3OSmhk]gCOUDTKP.oglTV|QNSNWUTMLWMWAbJVXQdRZ\CWOSLNUVM-ZJTVPYYXW~taOZU?JXKS]\MPZZnUTOYVT`oFCOHKZZ]U|i\IIHMGuX[\[XqfYkJVQYT[QJGclWQ`r}ʎNLPV=UU?_\SoogH=2tPTPPQSGKFpzvYLTUZR`LSmUsN%qbL_rJb]XM?\.Rd2V\^njbf^SSRdI@hKZUF6enP`NfM[Rua_c_siX?R0rm]PL~WH3o~nz|jskcYENW.S=1ObPINo9z}[s\ONove]JI^Rw{h)"nhVSOoVVHB_hopkv]L#KVWI\n1CjiM`ianpn[iXFAs3^GSO`PQWawl(jox]HrpxWoq|xpOnUh7]YsUl|xoxrmg"Go{}NHtlgyBKSzyh nt{w{pxywzyxWx|||hwzi}ry5vxvx{x|wpspxdr~uyuf}ppmsyzq7mbxyr||yso~yOgyluonx{cqq~zvzccodi}}{p|qpkoc}~xpvg{x{tigrhʢusrzd~y[zuziY@u{wsypke%{pv~|l{t(zevjqhTZyez|{pn~s\vupv`x1}pљsgVdlvRcQo|uU~qj}wB2(|wqruqq|uI-TrWj;5/wm`UjtrxX4,' wuyb/''63.6O̠mot{z73% ;"%!1 C,6 *7!)+  )&.A!)"> #" 6( H@)&!" '% 6%N! 15!##M:(L$1'"7# ' &-G&@W[ "-+)!N!?A,;P8%" "( 4$D ): (5*! "()'1*+C".', , .]C&$2'8!"%/&&G+%R)0=D-4972;J@(;#$( #, 7<,<622)19+$"2604A)$>'%#'-/*7)$/%<"6 0O*&(')<)41-3 D#%#&"2,+/-94="73:3*371+.,0,.!G6094+,3+9??'>/52=:~PECQ!0)#5 14B52,.gdalautotest-3.1.2/gdrivers/data/srtm.dem.rsc0000664000175000017500000000121213701057753017677 0ustar evenevenWIDTH 12 FILE_LENGTH 10 XMIN 0 XMAX 11 YMIN 0 YMAX 9 PROJECTION LL DATUM WGS84 X_FIRST -180.0083333 Y_FIRST -59.9916667 X_STEP 8.33333330000e-03 Y_STEP -8.3333333000e-03 X_UNIT degrees Y_UNIT degrees Z_OFFSET 1. Z_SCALE 2 gdalautotest-3.1.2/gdrivers/data/two_images_jpeg.ntf0000664000175000017500000000420213701057753021313 0ustar evenevenNITF02.1003BF01GDAL 20021216151629 U 00000000000 000000002178000420002000439000000040000044300000004760000000000000000000000000IMMissing 20021216151629 U 0Unknown 0000002000000020INTMONO VIS 08R 0NC1M N 00B00010001002000200800100000000000001.0 0000000000IMMissing 20021216151629 U 0Unknown 0000002000000020INTMONO VIS 08R 0C300.01M N 00B00010001002000200800100000000000001.0 0000000000C    $.' ",#(7),01444'9=82<.342  }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz?R9Q6=:J߯L*W{@'$!v5&eW>ޚ̬0ZfăI#'ӠzgV_\ Fc21<1ֹ*Շa6Is\9n~Q gdalautotest-3.1.2/gdrivers/data/nodata_int.asc0000664000175000017500000000050613701057753020252 0ustar evenevenncols 5 nrows 5 xllcorner 440720.000000000000 yllcorner 3750120.000000000000 cellsize 60.000000000000 nodata_value -99999 107 123 132 115 132 115 132 107 123 148 115 132 140 132 123 148 132 123 123 115 132 156 132 140 132 gdalautotest-3.1.2/gdrivers/data/n43_hillshade.vrt0000664000175000017500000000706413701057753020626 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -8.0004166666666663e+01, 8.3333333333333332e-03, 0.0000000000000000e+00, 4.4004166666666663e+01, 0.0000000000000000e+00, -8.3333333333333332e-03 Gray n43.dt0 1 Python hillshade 1 Int16 gdalautotest-3.1.2/gdrivers/data/h0o0y867.1ah0000664000175000017500000001100013701057753017230 0ustar evenevenPRODUCT ID =2434Dr00-01 LOCATION =024/03400D7 ACQUISITION DATE =19981108 SATELLITE =IRS 1D SENSOR =PAN SENSOR MODE = LOOK ANGLE = 2.30 LOCATION = ACQUISITION DATE = SATELLITE = SENSOR = SENSOR MODE = LOOK ANGLE = LOCATION = ACQUISITION DATE = SATELLITE = SENSOR = SENSOR MODE = LOOK ANGLE = LOCATION = ACQUISITION DATE = SATELLITE = SENSOR = SENSOR MODE = LOOK ANGLE = PRODUCT TYPE =MAP ORIENTED PRODUCT SIZE =SUBSCENE TYPE OF PROCESSING =SYSTEMATIC RESAMPLING =CC VOLUME #/# IN SET =01/01 PIXELS PER LINE = 5815 LINES PER BAND = 5888/ 5888 START LINE # = 1 BLOCKING FACTOR = 1 RECORD LENGTH = 5815 PIXEL SIZE = 5.00 OUTPUT BITS PER PIXEL = 8 ACQUIRED BITS PER PIXEL = 6 BANDS PRESENT =P PRODUCT CODE =GRUCU02AZ VERSION NO =IRS1DDPSV3R1 ACQUISITION TIME =10:32:26:938 GENERATING COUNTRY =GERMANY GENERATING AGENCY =EUROMAP GENERATING FACILITY =CHALD REV CBIASES AND GAINS IN THE BAND ORDER AS ON THIS TAPE 0.000000000000000 9.720000000000001 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 SENSOR GAIN STATE = 4 SENSOR STATE =GOOD GEOMETRIC DATA MAP PROJECTION =UTM ELLIPSOID =WGS_84 DATUM = USGS PROJECTION PARAMETERS = 6378137.000000000000000 6356752.299999999800000 32.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 0.000000000000000 UL = 0112245.2072E 481549.0796N 676567.591 5348339.002 UR = 0114613.7873E 481517.5182N 705637.591 5348339.002 LR = 0114522.6724E 475925.2528N 705637.591 5318904.002 LL = 0112201.2933E 475956.5243N 676567.591 5318904.002 CENTER = 0113405.3835E 480737.8662N 691095.091 5333626.502 2907 2944 OFFSET = 0 ORIENTATION ANGLE = 0.00 SUN ELEVATION ANGLE =55.8 SUN AZIMUTH ANGLE =159.6 gdalautotest-3.1.2/gdrivers/data/mercator.sid0000664000175000017500000005241613701057753017766 0ustar evenevenmsidQ, ( r!.=pIpIxIIm  eȼA#rوm0CQpW? ri xGL%#1p4$KAI 'r &I#e~?HYPT"JsqXm'f$#T<xO0M2 W* ra}/%"销A8J1_2G`ĂB*"(2K%be %pg' &a`N"G$acba3Ţj4(˥!lc/$q֘b2'X^,F#![,ʅr)غH*GSk,6La0ebLO/#8X dAAeK3e|r-2,U#d!,4b=/"JtJ#$QD?$$R5)/^`<œi|T, B94NAr4 t܁;H D3h-MDZ$ !9Hx;&#yĨ`-KYxZ# Gcd4Et;ChE,\1Ϝ끰lO&Sĺq%Jq@b@bcawqΣ2!4IөR3& Ñ}ϟ)D4)Xb3 #.2MԀ;GS %SLh7A~2غg!uG(\@# Cql+F%2r8\v:$Hv% 4qIh6 e݊R8C |>" kḰ4MRtt_,B 0J&E?ZCyZ6 ɨR" łvbBF;bDڴfD&OU}y,-U8(,mRk!:O۷iܗmۑd&v6D2׼^4 O jBw"U.nzON 8* =DǶlWިXJWL6|\4/'/tN<s *4wbΩY97FJ?_i'!j^dC'T?}<}2}WۏLlnh]6 1cbl&iݡ؟-lzH[#zq} ܆]2vVOmm6Rk;FE_nl,]PtuFgS1b29'x#(쫒o".,   ƢҋA{|wբڊ魽1>-:e(1Ԟ?R5X؛i.kI|Vf r68C$ ]2OrZ7jJkLɥ9G50B^?Gk\ud"*Nn%00(Aݜ<>FoF^n,Vn0Dh&Sa_]x-$˚ /-Y6Ғ9|El'UU6c!`!~1#h*y J@״$ܳgdC'2HePZNX AMOH 4_Mǻ$M2"j qXQG !ծJ⣅.(k<\\ESKw-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c&8F'vc-p! qH,)a6;L #sPG Z"Q#:HzSLc+B.ȑxGJvĉ8EW4G !k8/LS!a)LHGoÅ B(4# B1V8~ڄX!hkvaH6A?aJҸӉTH'4iф6`°0'3D#|GHϘk|ǎ0Fdh8;Lxz ~OA %6R5o6cGi(?ߕ%8mbbizt{t/^ 0M a UK|,0W׌1a5Co#>$]$}0+}K`)cJ;t8;R:X~/!ӞCDc?nWbGlh:?ӣf5v#\FH\ilOBl 0ѥ88q۰iOl}0},1FfG !) ֱ>UHV-}x6vžDѥcAnU0PD}j?ǎ SFCaqh(iO>ǧB%!FLt1#4/1dC lchEa!G`FXOO$IMAGE::NO_DATA_VALUE#IMAGE::COLOR_SCHEME IMAGE::DATA_TYPE&IMAGE::BITS_PER_SAMPLE4GEOTIFF_NUM::1024::GTModelTypeGeoKey/GEOTIFF_CHAR::GTModelTypeGeoKeyModelTypeProjected5GEOTIFF_NUM::1025::GTRasterTypeGeoKey0GEOTIFF_CHAR::GTRasterTypeGeoKeyRasterPixelIsArea3GEOTIFF_NUM::1026::GTCitationGeoKeyMER E000|7GEOTIFF_NUM::2048::GeographicTypeGeoKey2GEOTIFF_CHAR::GeographicTypeGeoKeyGCS_NAD278GEOTIFF_NUM::2052::GeogLinearUnitsGeoKey#)3GEOTIFF_CHAR::GeogLinearUnitsGeoKeyLinear_Meter9GEOTIFF_NUM::2054::GeogAngularUnitsGeoKey#4GEOTIFF_CHAR::GeogAngularUnitsGeoKeyAngular_Degree8GEOTIFF_NUM::3072::ProjectedCSTypeGeoKey3GEOTIFF_CHAR::ProjectedCSTypeGeoKeyUser-Defined3GEOTIFF_NUM::3074::ProjectionGeoKey.GEOTIFF_CHAR::ProjectionGeoKeyUser-Defined7GEOTIFF_NUM::3075::ProjCoordTransGeoKey2GEOTIFF_CHAR::ProjCoordTransGeoKeyCT_Mercator8GEOTIFF_NUM::3076::ProjLinearUnitsGeoKey#)3GEOTIFF_CHAR::ProjLinearUnitsGeoKeyLinear_Meter:GEOTIFF_NUM::3080::ProjNatOriginLongGeoKey?]^^#@@H+q9GEOTIFF_NUM::3081::ProjNatOriginLatGeoKey?]^^#@@H+q:GEOTIFF_NUM::3090::ProjCenterEastingGeoKey?]^^#@@H+q;GEOTIFF_NUM::3091::ProjCenterNorthingGeoKey?]^^#@@H+q=GEOTIFF_NUM::3092::ProjScaleAtNatOriginGeoKey?]^^#@@H+q#IMAGE::X_RESOLUTION@N#IMAGE::Y_RESOLUTION@N#IMAGE::Z_RESOLUTION$GEO::ModelTypeGeoKey*GEO::ProjectedCSTypeGeoKeyIMAGE::Z_ORIGIN*IMAGE::COMPRESSION_VERSION /IMAGE::TARGET_COMPRESSION_RATIOAo'IMAGE::COMPRESSION_NLEV)IMAGE::COMPRESSION_WEIGHT@(IMAGE::COMPRESSION_GAMMA@-IMAGE::COMPRESSION_BLOCK_SIZE$IMAGE::CREATION_DATEFri May 02 08:26:46 2003 IMAGE::EOMgdalautotest-3.1.2/gdrivers/data/test_pdf_composition_layer_tree_displayOnlyOnVisiblePages.pdf0000664000175000017500000000242613701057753031770 0ustar eveneven%PDF-1.6 % 3 0 obj << /Name (Layer of page 1) /Type /OCG >> endobj 4 0 obj << /Name (Layer of page 2) /Type /OCG >> endobj 5 0 obj << /Contents 6 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 7 0 R /Type /Page /UserUnit 1 >> endobj 6 0 obj << /Length 8 0 R >> stream /OC /Lyr3 BDC EMC endstream endobj 8 0 obj 18 endobj 7 0 obj << /Properties << /Lyr3 3 0 R >> >> endobj 9 0 obj << /Contents 10 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 11 0 R /Type /Page /UserUnit 1 >> endobj 10 0 obj << /Length 12 0 R >> stream /OC /Lyr4 BDC EMC endstream endobj 12 0 obj 18 endobj 11 0 obj << /Properties << /Lyr4 4 0 R >> >> endobj 1 0 obj << /Count 2 /Kids [ 5 0 R 9 0 R ] /Type /Pages >> endobj 2 0 obj << /OCProperties << /D << /ListMode /VisiblePages /Order [ 3 0 R 4 0 R ] >> /OCGs [ 3 0 R 4 0 R ] >> /Pages 1 0 R /Type /Catalog >> endobj xref 0 13 0000000000 65535 f 0000000765 00000 n 0000000830 00000 n 0000000015 00000 n 0000000071 00000 n 0000000127 00000 n 0000000301 00000 n 0000000392 00000 n 0000000371 00000 n 0000000443 00000 n 0000000619 00000 n 0000000713 00000 n 0000000691 00000 n trailer << /Root 2 0 R /Size 13 >> startxref 977 %%EOF gdalautotest-3.1.2/gdrivers/data/gsg_7binary.grd0000664000175000017500000000634413701057753020361 0ustar evenevenDSRBGRIDHALAN@N@R@o@,GDATA f@f@c@b@c@c@c@f@`@b@\@`@Z@Z@Z@Z@Z@\@X@Z@e@n@o@i@`@Z@a@^@b@`@d@d@b@a@`@^@Z@^@Z@^@c@f@a@e@^@`@X@\@^@R@\@X@^@a@c@`@d@a@a@X@g@e@a@a@d@\@`@V@X@\@V@X@X@Z@X@`@X@Z@`@`@d@b@c@^@Z@Z@Z@\@a@X@\@X@X@Z@\@`@\@V@^@\@a@Z@a@V@Z@\@Z@V@X@^@\@\@\@^@^@b@\@b@X@`@b@`@`@Z@^@X@X@\@X@`@X@a@\@b@^@X@`@^@b@a@e@b@X@^@^@Z@^@X@Z@g@e@Z@\@\@Z@X@a@Z@e@a@^@^@^@Z@a@^@^@\@\@V@Z@e@Z@Z@Z@Z@X@`@^@\@`@`@`@^@X@`@^@Z@b@X@\@^@a@e@^@Z@^@^@^@Z@a@a@X@a@X@\@^@Z@`@Z@\@Z@\@^@`@^@Z@^@`@`@^@\@`@\@^@`@\@`@`@^@^@`@X@\@X@^@`@\@\@Z@b@^@b@\@b@^@a@^@Z@\@`@\@Z@\@X@^@X@f@X@Z@h@e@b@a@a@`@X@`@^@\@a@`@`@X@`@^@`@e@^@\@g@e@e@b@b@\@b@^@Z@`@\@`@c@X@^@\@`@`@i@Z@`@c@`@a@`@`@\@\@\@^@b@^@d@^@`@Z@Z@`@c@^@b@`@^@^@\@`@`@^@\@^@\@^@Z@\@b@Z@\@a@\@`@\@`@a@`@^@\@a@Z@a@\@`@^@Z@`@`@\@\@Z@\@Z@\@`@Z@^@b@\@d@\@a@Z@^@^@X@`@^@`@`@`@X@c@Z@^@`@\@`@`@a@`@`@`@Z@`@Z@`@`@Z@^@\@c@b@gdalautotest-3.1.2/gdrivers/data/spill.img0000664000175000017500000002374513701057753017275 0ustar evenevenEHFA_HEADER_TAGy&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.}ZEhfa_LayerEhfa_Layer`{4096:cdata,}RasterDMS,.rootroot}yyIMGFormatInfoImgFormatInfo831yLayer_1Eimg_Layer @@}*ExternalRasterDMSImgExternalRaster spill.ige1F};\ProjectionXEprj_MapProjection842 CPE_COORDSYSNW{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,coordSys,}PE_COORDSYS,.PROJCS["NAD_1927_UTM_Zone_11N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]^PE}uMap_InfoEprj_MapInfoNAD_1927_UTM_Zone_11N=ALAU(ALAmN@N@meters~} ProjectionEprj_ProParameters"UTM 2? Clarke 1866TXA333?XA^s{?TXAfcDatumEprj_DatumnNAD27~ nadcon.datArea}yRNGDAL_MetaDataEdsc_Table#Bin_Function#Edsc_BinFunctionRpAREA_OR_POINTEdsc_Column} RRDNamesListEimg_RRDNamesListIMAGINE 2X2 Resampling%-spill.rrd(:Layer_1:_ss_2_)gdalautotest-3.1.2/gdrivers/data/rotation.img0000664000175000017500000000000213701057753017766 0ustar evenevenX gdalautotest-3.1.2/gdrivers/data/cf_nasa_4326.nc0000664000175000017500000004457713701057753020054 0ustar evenevenHDF  I`OHDR "   __NCProperties7version=1|netcdflibversion=4.6.1|hdf5libversion=1.10.4scienceKڪ (OHDR " grids6@OHDR " data!"imagingGeometry3*e1OHDR " latitude  longitude'tempi2crs6.rOCHKK . ConventionsCF-1.7 .titleSimple CF fileRZOHDR ! < 0CLASSDIMENSION_SCALEnp4zt\OCHKoKDoOCHK `NAME@This is a netCDF dimension but not a netCDF variable. 15hOHDR  ! , 0CLASSDIMENSION_SCALEnF5nOCHK4 N longitudec%OCHK `NAME@This is a netCDF dimension but not a netCDF variable. 11OHDR !  0CLASSDIMENSION_SCALE n<-OCHK O latitudeCube(wOCHK `NAME@This is a netCDF dimension but not a netCDF variable. 7,ŠOHDR !  0CLASSDIMENSION_SCALEK nV=+,4OCHK M  longitudeCube ǮOCHK `NAME@This is a netCDF dimension but not a netCDF variable. 5)?OHDR !  0CLASSDIMENSION_SCALE n;4dOCHKlatitude heightsCube _OCHK `NAME@This is a netCDF dimension but not a netCDF variable. 4_%OHDR    ||< -units degrees_north 0 long_namelatitude 0standard_namelatitude PDIMENSION_LISTWW"GCOLc(  c   (  ( OCHK tREFERENCE_LISTdatasetdimension  H PI۶m$۶M$ $$@$ A۶MA$AmA۶AAH8(` AAAH ;E Fq@ q@0q@@q@Pq@`q@pq@q@q@q@q@q@q@q@q@r@r@ r@0r@@r@Pr@`r@pr@r@r@r@r@r@r@r@r@s@s@ s@0s@@s@Ps@`s@ps@s@s@s@s@s@s@s@s@t@t@ t@0t@@t@Pt@`t@pt@t@t@t@t@t@t@t@t@u@u@ u@0u@@u@Pu@`u@pu@u@u@u@u@u@u@u@u@v@v@ v@0v@@v@Pv@`v@pv@v@v@v@v@v@v@v@v@w@w@ w@0w@@w@Pw@`w@pw@w@w@w@w@w@w@w@w@x@x@ x@0x@@x@Px@`x@px@x@x@x@x@x@x@x@x@y@y@ y@0y@@y@Py@`y@py@y@y@y@y@y@y@y@y@z@z@ z@0z@@z@Pz@`z@pz@z@z@z@z@z@z@z@z@{@{@ {@0{@@{@P{@OHDR     || , ,units degrees_east 1 long_name longitude 1standard_name longitude PDIMENSION_LISTOCHK tREFERENCE_LISTdatasetdimension ']OHDR "  latitudeCube+  longitudeCubew- heightsCube/ lookAngleo9crs,F]OHDR    ||A  -units degrees_north 0 long_namelatitude 0standard_namelatitude PDIMENSION_LIST#OCHK tREFERENCE_LISTdatasetdimension +9>OHDR    ||]  ,units degrees_east 1 long_name longitude 1standard_name longitude PDIMENSION_LIST6OCHK tREFERENCE_LISTdatasetdimension w-OHDR    ||q  &unitsmeters * positiveup . long_nameheight Hstandard_name height_above_reference_ellipsoid PDIMENSION_LIST.)OCHK tREFERENCE_LISTdatasetdimension /Ø,?OHDR (   ?@4 4  ( P _FillValue ?@4 4 !unitsK 7standard_nameair_temperature + grid_mappingcrs `DIMENSION_LISTL3OCHK tREFERENCE_LISTdatasetdimension  i2oOCHK tREFERENCE_LISTdatasetdimension 'i2YOHDR G   % Bgrid_mapping_namelatitude_longitude `longitude_of_prime_meridian ?@4 4 Psemi_major_axis ?@4 4@TXA Xinverse_flattening ?@4 4mtr@ ecrs_wktEGEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]]Z#OHDR /8 ?@4 4 ,>` P _FillValue ?@4 4 'unitsdegrees Estandard_namelook_angle_or_elevation_angle + grid_mappingcrs pDIMENSION_LIST  @ܐOCHK tREFERENCE_LISTdatasetdimension /o9ɧOCHK tREFERENCE_LISTdatasetdimension +o9OOCHK tREFERENCE_LISTdatasetdimension w-o9$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OHDR G   % Bgrid_mapping_namelatitude_longitude `longitude_of_prime_meridian ?@4 4 Psemi_major_axis ?@4 4@TXA Xinverse_flattening ?@4 4mtr@ ecrs_wktEGEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]]gdalautotest-3.1.2/gdrivers/data/w0y13a4t.0120000664000175000017500000000000013701057753017147 0ustar evenevengdalautotest-3.1.2/gdrivers/data/rasterlite_pct.sqlite0000664000175000017500000012200013701057753021703 0ustar evenevenSQLite format 3@  }#-7indexidx_geocolsgeometry_columnsCREATE UNIQUE INDEX idx_geocols ON geometry_columns (f_table_name, f_geometry_column) --Ktablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name VARCHAR(256) NOT NULL, f_geometry_column VARCHAR(256) NOT NULL, type VARCHAR(30) NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER, spatial_index_enabled INTEGER NOT NULL)f++tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR(256) NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name VARCHAR(256), proj4tex   BfmepsgWGS 84+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ''test_metadatageometryPOLYGON 'test_metadatageometry CC,;f++tablespatial_ref_sysspatial_ref_sysCREATE TABLE spatial_ref_sys ( srid INTEGER NOT NULL PRIMARY KEY, auth_name VARCHAR(256) NOT NULL, auth_srid INTEGER NOT NULL, ref_sys_name VARCHAR(256), proj4text VARCHAR(2048) NOT NULL) --Ktablegeometry_columnsgeometry_columnsCREATE TABLE geometry_columns ( f_table_name VARCHAR(256) NOT NULL, f_geometry_column VARCHAR(256) NOT NULL, type VARCHAR(30) NOT NULL, coord_dimension INTEGER NOT NULL, srid INTEGER, spatial_index_enabled INTEGER NOT NULL)}#-7indexidx_geocolsgeometry_columnsCREATE UNIQUE INDEX idx_geocols ON geometry_columns (f_table_name, f_geometry_column)C1+3triggerfkd_refsys_geocolsspatial_ref_sysCREATE TRIGGER fkd_refsys_geocols BEFORE DELETE ON spatial_ref_sys FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'delete on table ''spatial_ref_sys'' violates constraint: ''geometry_columns.srid''') WHERE (SELECT srid FROM geometry_columns WHERE srid = OLD.srid) IS NOT NULL; END DD\1-ctriggerfki_geocols_refsysgeometry_columnsCREATE TRIGGER fki_geocols_refsys BEFORE INSERT ON geometry_columns FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'insert on table ''geometry_columns'' violates constraint: ''spatial_ref_sys.srid''') WHERE NEW."srid" IS NOT NULL AND (SELECT srid FROM spatial_ref_sys WHERE srid = NEW.srid) IS NULL; ENDZ1-_triggerfku_geocols_refsysgeometry_columnsCREATE TRIGGER fku_geocols_refsys BEFORE UPDATE ON geometry_columns FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, 'update on table ''geometry_columns'' violates constraint: ''spatial_ref_sys.srid''') WHERE NEW.srid IS NOT NULL AND (SELECT srid FROM spatial_ref_sys WHERE srid = NEW.srid) IS NULL; END 4//viewgeom_cols_ref_sysgeom_cols_ref_sysCREATE VIEW geom_cols_ref_sys AS SELECT f_table_name, f_geometry_column, type, coord_dimension, spatial_ref_sys.srid AS srid, auth_name, auth_srid, ref_sys_name, proj4text FROM geometry_columns, spatial_ref_sys WHERE geometry_columns.srid = spatial_ref_sys.srid''stabletest_metadatatest_metadataCREATE TABLE test_metadata ( id INTEGER NOT NULL PRIMARY KEY, source_name TEXT NOT NULL, tile_id INTEGER NOT NULL, width INTEGER NOT NULL, height INTEGER NOT NULL, pixel_x_size DOUBLE NOT NULL, pixel_y_size DOUBLE NOT NULL, "geometry" POLYGON) ##; =truemarble338169_pct.tifR? E3? E3fVf@V@|fV@f@V@f@VfVfV@ +raster metadata zz;> A'triggerggi_test_metadata_geometrytest_metadataCREATE TRIGGER "ggi_test_metadata_geometry" BEFORE INSERT ON "test_metadata" FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, '"test_metadata"."geometry" violates Geometry constraint [geom-type or SRID not allowed]') WHERE (SELECT type FROM geometry_columns WHERE f_table_name = 'test_metadata' AND f_geometry_column = 'geometry' AND GeometryConstraints(NEW."geometry", type, srid) = 1) IS NULL; ENDB A'%triggerggu_test_metadata_geometrytest_metadataCREATE TRIGGER "ggu_test_metadata_geometry" BEFORE UPDATE ON "test_metadata" FOR EACH ROW BEGIN SELECT RAISE(ROLLBACK, '"test_metadata"."geometry" violates Geometry constraint [geom-type or SRID not allowed]') WHERE (SELECT "type" FROM "geometry_columns" WHERE f_table_name = 'test_metadata' AND f_geometry_column = 'geometry' AND GeometryConstraints(NEW."geometry", type, srid) = 1) IS NULL; END ee$aX A'Qtriggergii_test_metadata_geometrytest_metadataCREATE TRIGGER "gii_test_metadata_geometry" AFTER INSERT ON "test_metadata" FOR EACH ROW BEGIN INSERT INTO "idx_test_metadata_geometry" (pkid, xmin, xmax, ymin, ymax) VALUES (NEW.ROWID, MbrMinX(NEW."geometry"), MbrMaxX(NEW."geometry"), MbrMinY(NEW."geometry"), MbrMaxY(NEW."geometry")); ENDaA'ctriggergiu_test_metadata_geometrytest_metadataCREATE TRIGGER "giu_test_metadata_geometry" AFTER UPDATE ON "test_metadata" FOR EACH ROW BEGIN UPDATE "idx_test_metadata_geometry" SET "xmin" = MbrMinX(NEW."geometry"), "xmax" = MbrMaxX(NEW."geometry"), "ymin" = MbrMinY(NEW."geometry"), "ymax" = MbrMaxY(NEW."geometry") WHERE "pkid" = NEW.ROWID; ENDYA'Striggergid_test_metadata_geometrytest_metadataCREATE TRIGGER "gid_test_metadata_geometry" AFTER DELETE ON "test_metadata" FOR EACH ROW BEGIN DELETE FROM "idx_test_metadata_geometry" WHERE pkid = OLD.ROWID; END yx/P++Ytablesqlite_sequencesqlite_sequenceCREATE TABLE sqlite_sequence(name,seq)AAEtableidx_test_metadata_geometryidx_test_metadata_geometryCREATE VIRTUAL TABLE "idx_test_metadata_geometry" USING rtree( pkid, xmin, xmax, ymin, ymax) KK7tableidx_test_metadata_geometry_nodeidx_test_metadata_geometry_node CREATE TABLE "idx_test_metadata_geometry_node"(nodeno INTEGER PRIMARY KEY, data BLOB)'MMAtableidx_test_metadata_geometry_rowididx_test_metadata_geometry_rowid CREATE TABLE "idx_test_metadata_geometry_rowid"(rowid INTEGER PRIMARY KEY, nodeno INTEGER)/OOMtableidx_test_metadata_geometry_parentidx_test_metadata_geometry_parentCREATE TABLE "idx_test_metadata_geometry_parent"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)%%Mtabletest_rasterstest_rastersCREATE TABLE test_rasters ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, raster BLOB NOT NULL) 99D 4C4´B   ++iTGIF87aR (048DDTX\\4@4<(08(0@<(LXX hphh\\lpx@@WIjfo}&acMhdp`x]gRdqxpjFHv|Iapqp)sMkaUw=阈E{DZgPɕh\!T͑xlݛ!l(! @@`M @( 0 0`@ p & }RJj:` @tYu*:9GeuY]{DUR$_>֧čPPAL lAf [lfPZvA,[mRx ՔZ_ul1b1+xK~ $pl|{fAˁJ\ AK\wD[ $<@ %hj󩷜_!6,JI7FbAP?cБOsK<]j `p׬N0N  +py%WJ a1 A^`@  oաjway(A̻@S;,bH׷z _bW襇EUS2cd6 U<` ` or~@VB8GzHv%YdLlå<`T@җ kg\ Z@:O^: Z: 8.6}΀`,&+g r;!q6md\`@J* /Ę@dD%@'ܬ~A8v2V0qp@ +c,->[%=f4A jqg<[_.`>ANr 4p. `^ ,vęXJP` h@  0 6"{,`Z?` : Zj +Hz &L !sUd0y]  v8OEbצ@S^0T  / BYP!t)rka8prk@ .P^C=Y1(6pA*aAX TA\%, M`(RP*X Tp`1^d!HXA,Rs@Q˙8uYr,\G`(7ARe:g@ܸ Ѓpt %̪!qA?D`_20@( béMSY "pLlamYv^@B\/ KhB1A UC02C` g5 ^`B5HTh2t~|oeMcŁ@3W*tE |07P!% 9*bg3D= l0 QvIT`b@@]xk` 7@ld[bJ o@JUgHC6 hP֠&0a &d=1 6qhp9PX S0r9:e@6^б:wB-x{д@4t;O~J؂ P3G`]`,HA@qr; jd7sx& A h88 Y)8@Kme*G4Xxc$$McD>Fۅ"A wp2wX5q:`0tuP)La S`8!`HC*\>D/hԠ6a ]x0 mq l*Rh's>CGk hv:\A>!d*9{ja C K4)EP2!BN'f6A J_W_Qz0<H1).@[J`xMe&0[iwevfP6MS auPx{ K``ffv=xwv}`fua=(6X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&U̥u3g_Vgu(VgY)]\'Jp6U ׇZFPWTws؄vYHyI^%IJ )n&o]I]_{'dpFY]c|`Q8PcT-9L٦iQ6E'cGr2YcH0 u}%Hj7O?P{xg1Zv6m+ζb6sWyPΈIpmdvtwZ$Va zxIA8kWiv_Kce5^9EX^5XNwdGOvrU_dE&h7zٔgnhw~o~[oN&*ȈI8Dn9x|555iІd'RWPz q_yBe;h[4I^rnUZuyl@jʡ !*#J%j')*0';gdalautotest-3.1.2/gdrivers/data/pixel_per_line.asc0000664000175000017500000000562313701057753021135 0ustar evenevenncols 15 nrows 12 xllcorner 0.100000E+06 yllcorner 0.650000E+06 cellsize .500E+02 nodata_value -99999 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .270E+01 .186E+01 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .614E+01 .931E+01 .868E+01 .200E+02 .266E+02 .122E+02 .313E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .162E+02 .542E+02 .944E+02 .953E+02 .977E+02 .833E+02 .505E+02 .144E+02 .209E+01 .000E+00 .000E+00 .000E+00 .000E+00 .199E+01 .170E+02 .784E+02 .173E+03 .266E+03 .332E+03 .264E+03 .230E+03 .120E+03 .415E+02 .941E+01 .801E+00 .240E+02 .000E+00 .410E+01 .177E+02 .116E+03 .303E+03 .562E+03 .756E+03 .759E+03 .618E+03 .309E+03 .171E+03 .603E+02 .792E+02 .254E+03 .242E+03 .483E+00 .678E+01 .529E+02 .212E+03 .585E+03 .108E+04 .140E+04 .128E+04 .817E+03 .436E+03 .219E+03 .275E+03 .890E+03 .145E+04 .158E+04 .000E+00 .307E+01 .162E+02 .141E+03 .435E+03 .862E+03 .109E+04 .889E+03 .559E+03 .289E+03 .296E+03 .116E+04 .245E+04 .332E+04 .309E+04 .000E+00 .000E+00 .516E+01 .296E+02 .128E+03 .245E+03 .305E+03 .223E+03 .119E+03 .472E+02 .517E+03 .173E+04 .289E+04 .345E+04 .309E+04 .000E+00 .000E+00 .000E+00 .266E+01 .107E+02 .192E+02 .146E+02 .182E+02 .805E+01 .378E+02 .442E+03 .165E+04 .274E+04 .280E+04 .214E+04 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .528E+00 .000E+00 .495E+00 .000E+00 .706E+01 .225E+03 .123E+04 .210E+04 .189E+04 .105E+04 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .844E+02 .405E+03 .752E+03 .430E+03 .244E+03 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .577E+02 .350E+02 .196E+02 .503E+01 gdalautotest-3.1.2/gdrivers/data/t100.mtw0000664000175000017500000051467413701057753016677 0ustar evenevenMTW NN8@@ j@@@Y@UfWAx>\A{Te? @@A?`@NRUiL.zd5. eNo5IZInT**L 1 L(۔ 9ۣRH0 )E$0 ա刖z ,..k 9.McOUo _ɿ,o uc` ppyھq# _׌խH{ \DO^ި1ʰ{> NX/| _!o<$ di2㊈~/wok8hK.206"cks227j!+` ɱ ekP1 nh(5]0j  rM㸹͈ћ } p # $ w vf13ge9[!)$F&a!# W:Q 2pZ pyešˁH),V2׽P{ ^p.xNf %^ $vtq9Q q_:]ooxP_%a1+wQ es-Ԉd>znlJ2g k!,)!#31B@ p@a dU1ng9`(jnm'|ttG v5t "9FA d|]s g! &$)` M>/ `e8&6!>XP2 V{!ౌ' Y iY ;w?G5+R!R'x&0e!!i fc$R#J% ObhBp L ++/k%s6<&d]zq\ q"; = .q0 dW/~ag&]ihZ~-y& [#q `Vsd9ap AnY#'-r #e:Z4e $+7?PzM? "a+u3 ̓dߢrW?3 9N3/7ivwgEJ/STl 1_)}} _ɯ7 f@( *vP Pہ2*/#4I3@c>R -d)t0!! p` j0Yyg+/Eiclf<YM " wH  A !Y.e#\q;X l0m O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/:F "q"B b q+e~-=$a u :!e>Ce#C~ #!?x936R:#bpnH ?$ * = !c҃'bJ+!) GEd!z2eaD3& > O +4oȗg "PLծ b',!(@*l="y%%e 0p$B$p1 bt< #>kt!3k%nr`_ծe !Ǘ& -!6 y"Z!&*G$*b%c"{"([,L[`uK 3z:2?ȃ$_ *3'.JÐ ek#J(y.l 3bD+#v $b8#_%M+&0 gl.ȃ$$0tzJ2_ʜų|ڌ)cDKGP4{"fe"!")JP1 Q> 4} 1>\"9lz<҄]ˀ $Do$fh}N=*$ 2gQ2Q7 !2рb ϼ֊K|؀0 Y: {$#y9< &b4vq fnTJESw & !]Kb#5Hcazmxb0Z J{?2ȋ|g}(ʯܼƸuOPj>9WfZE6,3] "ttj = _Zz͞c )F?p8kZs4]nRK_,ЪM⓮d,aՂkmxgC0-5, ;!Lτ ʳkm:]a8JJgdalautotest-3.1.2/gdrivers/data/adobe_style_geospatial.pdf0000664000175000017500000016032113701057753022641 0ustar eveneven%PDF-1.6 1 0 obj << /Length 2 0 R /Filter /FlateDecode >> stream xKo$IZ\X&. iA=^D](Wjzؑtt*{珿q=|o;ooklJpei滟}{cM .5>Z-cޤL-%׃oŸߟ7!FӜ~W ͤT=I>F?Ĕ/>xUILŐ-4$)2ujM@Br(4g{6lII%6QAWbIG4mW(}W}3-d +(2e> YmOg|-+3!ئ#q)R&o*}ޠRBQԳJJ5-<lvL 17 h!J?Vs -wʡ,(r3ߘ*1#5W&)@A77%cb Pssw'֌~YwIFJJ2+5oo?#\kG?|'[j/>G3}a.~hBOAhh]SDդL~hn|2|O(̱\anNRbU M$R&].7O{{ר&]soeuIkTr65z9ڼF5%fm7͉Xר7`VD- pln<\nN=J7.m}ZJZj߫xPCcme95ٸHHus9fWjεF744>\n'`\dib; Ov"1ga|5(ЄiIX^( 5Y}kw%яZCyY$1 %}"W&| etF u5dm\cn֋&LUIw!IRK3ll$R60qn 'Ɉqh+99P}ļE/# (r٢1טŵI4b\%Y"1zY?GVMj.+̍|Ծd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uܱo?kYK.BD[5}o}ڋ#  W2G=6w)tnmu`@y2iIՑmeV.TGZ.rqQ,c>Oh'3 l0BfwtzrC6Ck`+_xa6lڪx>fkѨ7_M7ǞOĺαs51˗|kSW废&EerMNǦ+3rA>wmxO<5<]4 L6uCM}O;5`_B:M ᱳ_˥zvDj ~Q |S,OXى}$5SYm,e[oqI2ԆaT딿\n_Nb}W g^N<ĈϧCr,*1gRfidYY.zgF{EѩK,/B@]FQxY* oE.P E=!}AqpCDQ Ek endstream endobj 7 0 obj 23376 endobj 8 0 obj 54920 endobj 9 0 obj << /Type /FontDescriptor /FontName /MPPRDJ+ArialMT /Flags 32 /FontBBox [-1361 -665 4096 2060] /ItalicAngle 0 /Ascent 1491 /Descent -431 /CapHeight 2060 /StemV 0 /FontFile2 3 0 R >> endobj 10 0 obj << /Type /FontDescriptor /FontName /MVGEWD+Arial-BoldMT /Flags 262176 /FontBBox [-1286 -771 4096 2069] /ItalicAngle 0 /Ascent 1491 /Descent -431 /CapHeight 2069 /StemV 0 /FontFile2 6 0 R >> endobj 11 0 obj << /Type /Font /BaseFont /MPPRDJ+ArialMT /Subtype /TrueType /Encoding /WinAnsiEncoding /FirstChar 0 /LastChar 255 /Widths [750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 278 355 556 556 889 667 191 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 278 278 584 584 584 556 1015 667 667 722 722 667 611 778 722 278 500 667 556 833 722 778 667 778 722 667 611 722 667 944 667 667 611 278 278 278 469 556 333 556 556 500 556 556 278 556 556 222 222 500 222 833 556 556 556 556 333 500 278 556 500 722 500 500 500 334 260 334 584 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 556 556 556 556 260 556 333 737 370 556 584 333 737 552 400 549 333 333 333 576 537 278 333 333 365 556 834 834 834 611 667 667 667 667 667 667 1000 722 667 667 667 667 278 278 278 278 722 722 778 778 778 778 778 584 778 722 722 722 722 667 667 611 556 556 556 556 556 556 889 500 556 556 556 556 278 278 278 278 556 556 556 556 556 556 556 549 611 556 556 556 556 500 556 500 ] /FontDescriptor 9 0 R >> endobj 12 0 obj << /Type /Font /BaseFont /MVGEWD+Arial-BoldMT /Subtype /TrueType /Encoding /WinAnsiEncoding /FirstChar 0 /LastChar 255 /Widths [750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 474 556 556 889 722 238 333 333 389 584 278 333 278 278 556 556 556 556 556 556 556 556 556 556 333 333 584 584 584 611 975 722 722 722 722 667 611 778 722 278 556 722 611 833 722 778 667 778 722 667 611 722 667 944 667 667 611 333 278 333 584 556 333 556 611 556 611 556 333 611 611 278 278 556 278 889 611 611 611 611 389 556 333 611 556 778 556 556 500 389 280 389 584 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 750 278 333 556 556 556 556 280 556 333 737 370 556 584 333 737 552 400 549 333 333 333 576 556 278 333 333 365 556 834 834 834 611 722 722 722 722 722 722 1000 722 667 667 667 667 278 278 278 278 722 722 778 778 778 778 778 584 778 722 722 722 722 667 667 611 556 556 556 556 556 556 889 556 556 556 556 556 278 278 278 278 611 611 611 611 611 611 611 549 611 611 611 611 611 556 611 556 ] /FontDescriptor 10 0 R >> endobj 13 0 obj << /ArialMT 11 0 R /Arial-BoldMT 12 0 R >> endobj 14 0 obj <>>>>> endobj 15 0 obj <>>>>> endobj 16 0 obj <>>>>> endobj 17 0 obj <>>>>> endobj 18 0 obj <>>>>> endobj 19 0 obj << /Font 13 0 R /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Properties<> >> endobj 20 0 obj << /PrintScaling /None >> endobj 21 0 obj <>endobj 22 0 obj <> endobj 23 0 obj <>endobj 24 0 obj <> endobj 25 0 obj << /Type /Page /MediaBox [0 0 612 792] /Parent 26 0 R /Contents 1 0 R /Resources 19 0 R /VP[<><>] >> endobj 26 0 obj << /Type /Pages /Kids [25 0 R] /Count 1 >> endobj 27 0 obj << /Type /Catalog /Pages 26 0 R /OCProperties<>/OCGs[ 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R]>> /PageMode /UseNone /ViewerPreferences 20 0 R >> endobj 28 0 obj << /Creator (ESRI ArcMap 10.0.0.2414) /CreationDate (D:20101021125101-07) >> endobj xref 0 29 0000000000 65535 f 0000000010 00000 n 0000004135 00000 n 0000004158 00000 n 0000027731 00000 n 0000027755 00000 n 0000027779 00000 n 0000051248 00000 n 0000051272 00000 n 0000051296 00000 n 0000051506 00000 n 0000051726 00000 n 0000052954 00000 n 0000054187 00000 n 0000054252 00000 n 0000054401 00000 n 0000054540 00000 n 0000054673 00000 n 0000054820 00000 n 0000054959 00000 n 0000055123 00000 n 0000055170 00000 n 0000055612 00000 n 0000055802 00000 n 0000056009 00000 n 0000056196 00000 n 0000056493 00000 n 0000056559 00000 n 0000056782 00000 n trailer << /Size 29 /Info 28 0 R /Root 27 0 R >> startxref 56881 %%EOF gdalautotest-3.1.2/gdrivers/data/L71118038_03820020111_B80.FST0000664000175000017500000004074013701057753020666 0ustar evenevenPPFFEETT]]]iiwwzzyyzz}}}}{{ooccee__bbhhqqqggccbbbbbbWW__ZZPPPVVhhxx}}yyy~~yymmbb^^aagg``cccoottqqxx}}~~||||yyy{{~~xxwwwwzz||yyyvviikkrrdd[[ZZaaZZZbbbbffrrrrqquu||{{{||~~zzpppddnnuu{{xxxx~~vvmmllhhoo~~xxccYYJJ>>>99==@@22**%% ((+++++%%##''**''"""""""''0000''))((//..111;;44>>KKUUZZUUOOOOOJJCCDDAA99AANN]]llrrr}}uuttzz~~qq]]]HH5511//++22@@ffpppllqqzz~~iiWWBB,,,%% && ))6699555++++77KKYYcc``cc```__ee``\\WW^^aa__dddbbbbVVPPLLCCHHTTXXOOOLLII@@>>885599??LLLVV\\YYRRTTVVVVVVYYY]]ZZ__YYDD;;8888===DDGGIIMMMMKKGGMMccfffnnyy}}~~{{wwwvv||~~rrhh```VVQQQQXXcciibbccbbbiiuuyyttttssdd__hhppp{{{{zz~~~rrmmttxxttuudd]]ZZ^^ccchhhh``ccbbggmm~~vvqqssyyvvwwhhggrrvv{{~~ggKK88*** !!&&**,,##!!!!!!! &&&''!!##$$!! ## """!!))@@RRgg||wwhhLLL<<00!!##**++(('''**((--3366::77;;55544++&&!!((++**++%%(($$ !!!!!   ))++**---,,%%&&!!!!!!$$$$!!!!!''%%''&&''++++(()))--//,,,,338899CCAAA::AACCOOddtt~~rraaaRRNNHHBB77--))""""!! ((((&&&""##$$&&((((//**!!!$$(("" $$##))''""!!((,,**!!## ""$$!!$$  ##''''((**0002211//++..333300)))**""%%**--66EEJJ@@666))""&&"""'',,000::55....,,##!!%%**))//11--"""##&&##''--((''**,,,((''((((**..--0088800$$((((&&**..%%$$$//5555885522,,****999KKbbww~~oooaaYYZZZZVVZZbbbbjjjkkuuuullUULLJJQQ___{{zzzzyyuujj``]][[ZZZZZWWGG;;7755==IIZZ]]]ffooxx}}ttVV>>>--++%%##!!##"" &&&##))((&&%% ++&&&!!!!""&&  )),,,,,,,##!!((//5599>>HHYYmm}}}dd^^bblllmmffffnn__WWMMKKKKKDD==77,,22DDTTvvǮп»÷óooqqkkdd\\\JJBB>>??WWll~~xxYY??44222554433==CCGGMMSScccuu||rreebbffjjcccPPCC>>DDQQQQGGBBAA@@@@@779999<>FFCC>>99999==<<<>99::>>HH]]lll``JJGGGFFCC@@BB??@@BBEE>>>7755::BBAADD<<,,))'''))**22..337777;;777==JJPPMMFF>><>@@NNLL55110066GGGSSkkeeeRRHH@@CCEEEEEESSVVVddssòzzssffTTIIHHBBGGGOOJJ@@<<44--&&%%'''**,,8855--(($$"" &&.....%%!!&&%%##""!! $$'',,//227777332222233..))&&%%))00///3311,,//447711##,,@@@IIXXmmooollhhdd]]WWZZQQII666%%%%####%%  !!""!!""''''''**1133@@GGXXXnnzzxxxxvvccOOGGMMUU[[YYYPPRRKKRRXX[[UUZZYYYPPGGJJWW\\kk~~ÙܹuummwwooUU99+++**1166==AADDJJTTVVVYY\\WWJJCCFFHHHHMMMIIGGTTYYSSLLHHDD===::<<55;;EEMMHH>><<<<<@@BBIIUU``^^ffss~~xxqqqqssaaa\\[[@@$$  $$''..****''+++22661155<>AAEEJJPPQQCCC//----)),,7777<<:::<<@@JJUU^^WWggvvzzqqpppuu^^OOHHGGKKKZZkkxxPP::++&&&##..555**!! ''**)))%%''44IIccaa888))!!'',,//::UUݠZZ66++))&&%%## !!++66::BBTTTTXXXuu˺ŷwwoonnooxxvvlll``__QQHHIITTZZ__]]]zzddLLHHDDCCC8888>>GGCC44++,,&&&(($$--//11//--1199@@@;;44<<>>??==BB>>===//''$$''!!))## ##''**++,,,''$$((!!"""""''%%###%% !!&&&%%&&******(($$(((++,,&&!!""&&11;;999FFRRTTWWZZ\\TTPPJJNNNWW]]QQAA7711--55999..%% !!$$""!!!!!!&&!!##)))((!! !!,,,,))&&&&&((,,77IIbbnnggQQQ55''%%''&&%%%&&"",,,)) ""%%**6655666::<>CCEEEBB<>333,,%% $$++--228884422))1144BBOOQQIII>>33))))&&&&44::DDD>>11....$$ $$""##""""####!!!!,,77;;::55//---))&&%%""!!!!!!!!""$$""###%%!!''%%$$%%"""++,,$$!!!!""&&(('''''$$%%$$((,,//))))(('''##'',,,,3311++33///,,--//++))5544+++++..33222233774422+++++**,,..0011::<<::>>><<778800..--((%%!!! &&**))..66::DD;;;11))%%##33<>--++''''((55RRsssqqqppooyyzzggOO::+++$$ ##!!//77444,,''22IIaacc\\]]^^^ccllrrffeeffiicc___SSQQPPUUWWLLGGKK[[]]]WWWWIIDD11002288===MMPP__]]ddffdd``XXXXXNNLLEE==<<4433777??IITT]]ffXXTT\\ooyyy{{xx~~{{||{{xxppgg___ZZWWOOUUbbeeccee```ssuuyy||{{ppggggiiuuuxx~~~~vvvuuvvoojjmmoonnuuyyy{{tt}}uurrttvvvttnnee]]WWWWddvv|||yyvvzz{{~~uukkddbb]]bbttt~~}}{{{xxiiff__bbllqqww~~~ccFF222%%!!##""$$$$$,,,,((##!!"" ((###$$$$%% $$%%88LL__uunnTTAAA..(( ##(())--11---//''((33??EE==<<66655//**$$""!!$$##""&&!! &&&  !!##''..33322**&&""!!!!$$ !!!!!!""**''$$%%'''))%%&&))55CC>>>>GGGBB<<::HH]]vvttfffYYWWYYUUII<<22%%&&!!%%$$))*** !!""$$////11**!!!((((%%###%%**&&&&&..++--((""##&&(( !!$$$  ##!!%%,,,++..**++..001100333..$$##++3344??CCDD;;;++&&$$33>>>??BB22,,,,//&& ##&&..//(((((..--//..(()))),,,))&&(())++++))--0004400,,--44225577???KKHHIIJJFF99//3377CCCVViixxttooii\\RRREEBBNNIIPPQQSSYYVVVZZbbff\\KKEEJJRRggg||{{||xxxggcc[[NNGGHHFF@@FFF@@::773355::FFLLTTTMMRRXXffiiZZSS@@333$$##**%%%%!!##!!$$&&&''))((##&&((##$$###$$$$ $$***%%''%%  ##22AAEEFFHHNN]]ssʰbb````fffggffrrwwssqq__UUPPPJJGG<<22..88KKkkýĽť{{{yysshhZZWW[[VVNNEEE====??@@NN\\ggttttqqqssoonniiaaRR??77>>>AA;;2255>>IIQQJJZZZooxxqqccZZWWiiii\\\LL==::>>CCII>>9977222**((++++//6644(("""!!++00''((!!(((++''!!!!! ""%%**66::555--%%((--**!!""'',,,--++..004411//2233333..226611++))##!!###&&,,--++((&&&&&""##""##$$##++++11166;;//$$**//5588999++**//5533558855(((,,))**((**''::GGOOOEE66))**++## !!!!!!!$$!!$$!!00IITTWW__kkjjjpp~~zzssYYIIEESSXX^^[[[XXPPGG??44..**&&'' !! %%++555HHSSGG44**((//>>SSSggxxUU<<66331133377772211AAXXjjwwxxxgg[[LLGGGGHHLLLLMMMRR\\^^[[XXZZPPFFEEEMM__mmʷttppzz}}``ZZWW```aallggYYYYQQ[[SSMMMRR__dd````FF33,,!!!$$AAJJRRQQWWYYZZbbbhhnnmmffggjjgghhoozzzyyhh\\\__oo||ccOOKKBB9966677..$$""##**///66==44331133//**'''!!%%%%""##))***))((##$$88BBMMUUVVZZZQQQQPPOOBBHHHHPPDDD;;33&&   !!((""%% !!!""((--++0022))))++'''!!--))**(( ###((,,,,&&$$''&& !!!$$%%''...<>>EEQQqqyyhh]]XXXYYOO>>)) %%&&%%***++++3388@@>>??::999<>88>>EEHHKKSSbbjjjww{{__SSPPPLL>>;;>>==>>FFJJHHH::00//4499AA::11//,,,,,--33//11221100333AAGGPPLL@@>>@@==<<<;;DDPPKK88001144<<>GGSSMMMKKFFEEDDOOVVZZiiqqqcc__cc^^ddwwǨ˵xxOO333--22==HHVVbbwwppYYIIDD@@JJCCHHHEEIITTVVNNEEBBFF@@@>>CC@@;;>>DDCCCC??DDDAA>>==CCSSVVYYpp~~uuiillzzvvooww{{ZZ11$$$$##**))),,--..337799885533300..00@@kk```zzКffDDD44//55662288BBFFAA5554433++//,,''%%%%(((1133;;BBDDIIMMLLDDD33,,228888995566888::<>OO\\ddccYYEE99**$$$%%"" ))*****''$$$$$$""))+++,,66PPrrŏYYY::00..555577JJ^^gghhh~~II..''%%))))""""" ''))--55;;::FFFWWjj{{ggbb__VV]]kkk~~wwzzggccXXXPPLLGGFFCCNNSSXX\\\sseePPLLDDAAA>>GGLLXX]]PP33,,+++22::??==8855,,22::BBBAA@@AAJJTTIIDD>>333--((##""!!'' %%!!##,,**22..---%%!!!!##)))&&  #### &&&$$ ))++,,..00//...))--++((((**11>>KKKTTXX\\]]bb__YYQQLLXXXggZZSSGG6600--77333//++## ''!!!!"""''  &&))((&&"""####''11@@QQggeeRRR??00%%!!!""##+++((!!##))((..//000==EESS[[WWKK@@99444552233--''((""!!!""$$$$%%((&&&##))//0044;;//))++,,,0044BBHHHH;;00++777<<22,,))%%,,--+++((''((--++(())++,,,335500002266<<;;;;;77553377--33//++++***--44))''&&00//..!!!'',,..,,002222110003377BBFFIIHH>>DDBBBAA<>KKVVWWKK==//+++**&&!!''$$""##!!''((&&&))11;;AANNVVTTDD55///11++**0022::::<>;;AAADDBB4400--00**&&%%%!!''##!!((,,//88:::77330011@@CCLLJJBB777//''$$**((****### (('' !!))+++--((''**221177>>:::77**!!))''%%""%%%%!! !!%%--+++++%%((55??99;;22***$$##//++11////445522244**..44((!!####### ''444,,++((//@@XXffmmiiggg]]FF.. ##'''$$   %% $$,,1100***''##""##""&&333BBRR__^^QQJJNNGG:::00..11**&&//77==77BBBEEBB99++     )))--++3333##    --99EEIIRRPPPPJJJ@@::44-- ''555==AAGGMMVVUUZZZZ[[[UULLFFHHJJEECCHHNNTTTTTPPMMMMOOSSGGAA999220000EERRcc^^GG22**!!"" $$!!&&&%%$$$$ !!%%!!"" %%((****(($$$  ---''"" !!#### +++DDmmffEEE..''##--//!!!!!##   gdalautotest-3.1.2/gdrivers/data/hdifftst2.hdf0000664000175000017500000000763013701057753020027 0ustar eveneven j\     < N! o s< !  < ! 1 5< q!  < !  < 3! T \=j    6j    #2j U Y o 2  ?JLQJ I04cNCSA HDF Version 4.2 Release 1-post3, January 27, 2006xPd2ValuesfakeDim0 DimVal0.1fakeDim0Dim0.0ValuesfakeDim1 DimVal0.1 fakeDim1Dim0.0ValuesfakeDim2 DimVal0.1 fakeDim2Dim0.0ValuesfakeDim3 DimVal0.1fakeDim3Dim0.0ValuesfakeDim4 DimVal0.1fakeDim4Dim0.0ValuesfakeDim5 DimVal0.1fakeDim5Dim0.0?@VALUES Valid_rangeAttr0.0 jjjjj dset1Var0.0 jjjjj dset2Var0.0 jjjjjdset3Var0.0Storm_track_data2VALUES File_contentsAttr0.0   hdifftst2.hdfCDF0.0XDATASingle-component Fieldvdata1 5x1 ArrayMulti-component Fieldvdata2 6x4 Array??????@AAA A0A@  PositionMass Temperaturevdata3 Particle Datagdalautotest-3.1.2/gdrivers/data/small1bit.img0000664000175000017500000004031513701057753020032 0ustar evenevenEHFA_HEADER_TAG}&{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e3:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lposition,0:pcname,1:e2:EMSC_FALSE,EMSC_TRUE,editable,1:e3:LEFT,CENTER,RIGHT,alignment,0:pcformat,1:e3:DEFAULT,APPLY,AUTO-APPLY,formulamode,0:pcformula,1:dcolumnwidth,0:pcunits,1:e5:NO_COLOR,RED,GREEN,BLUE,COLOR,colorflag,0:pcgreenname,0:pcbluename,}Eded_ColumnAttributes_1,{1:lversion,1:lnumobjects,1:e2:EAOI_UNION,EAOI_INTERSECTION,operation,}Eaoi_AreaOfInterest,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{0:poEmif_String,titleList,}Exfr_GenericXFormHeader,{1:lorder,1:lnumdimtransform,1:lnumdimpolynomial,1:ltermcount,0:plexponentlist,1:*bpolycoefmtx,1:*bpolycoefvector,}Efga_Polynomial,.ZRasterDMSEdms_Statep$4DTi0$TPI[[y  K"K$K&C'Y(l*4<+r,p-.^Ehfa_LayerEhfa_Layerd{4096:1data,}RasterDMS,.rootroot}}IMGFormatInfoImgFormatInfo83122}Layer_1Eimg_Layer,,@@=<=<=<=<=<===<=========<=<=<<<=<=<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<-PPP,,,,,,,,,,,,,,,,,,,,,,,,**'%$$$!!            dr<---<<<<<<<<<;<<<<<<<<<<<<<<;;<<<;;;<;;;<;<;1110C',=J @C@A JA6 C%/ wD???>>>>>>>>==<<<=====<; ">>>>  ;;;;;;;;;;;;;>> !"""#$$%%%%%%''(((((())****++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,| ||8???8?88<|??00ppp@C         A                          A D~?????????????????l{|???? ????????????????'????(???????????????????????=.O,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2210 0 0 / . - - - , , ++-<<<<<<<<%$#"""!!    !==<<<=====((?2|0|xx?x @??'??????????????????????Ǐ???????>?~uE 4-'#    $ & ( * -. 0 1 4 7 9:;;<<<;;;;;;;;<;;;<<;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,)(&%$""     ((()*+*,+,+,++<+++++++++++++++++++++++++++++E544220. . , , - =<==<<""! ;:;::::;;()* + , - //E#(((((((((((((((((((((((((((((((((((((((((((EZh<<<<;<<<<<<;<;<;<<<;;;;;;;;;;;;;;;;;;;;;;;;:E      !!"#$$%%&''''')*****+,,,,,,,,,,,E/ /gMap_InfoEprj_MapInfo/Unknown"/0@ȩ:/@R/??j/metersAVERAGE_BIT2GRAYSCALETHEMATIC@0.00StatisticsEsta_Statistics?fU:0?~ͺ?1/0FStatisticsParametersEimg_StatisticsParameters830f4@011GDAL_MetaDataEdsc_Table(21 2#Bin_Function#Edsc_BinFunction112RepresentationTypeEdsc_Column/ }:363GDAL_MetaDataEdsc_Table323#Bin_Function#Edsc_BinFunction:32X4PyramidResamplingTypeEdsc_Columnq/14 RRDNamesListEimg_RRDNamesList4IMAGINE 2X2 Resampling 5 5small1bit.rrd(:Layer_1:_ss_16_)gdalautotest-3.1.2/gdrivers/data/trmm.tif0000664000175000017500000002142213701057753017125 0ustar evenevenII*((  (S    Y Latitude latitude degrees_north X Longitude longitude degrees_east standard Climate Data Interface version 1.5.2 (http://code.zmaw.de/projects/cdi) Climate Data Operators version 1.5.2 (http://code.zmaw.de/projects/cdo) gsfc file created by grads using lats4d available from http://dao.gsfc.nasa.gov/software/grads/lats4d/ CF-1.4 Wed Sep 07 22:33:59 2011: cdo sellonlatbox,-80,-70,-20,-10 tmp4-noc.nc tmp5.nc Wed Sep 7 22:33:53 2011: ncatted -a Conventions,global,d,, tmp4.nc tmp4-noc.nc Wed Aug 24 12:59:04 2011: ncatted -D 10 -a CoreMetadata.0,global,d,, -a ArchiveMetadata.0,global,d,, tmp3.nc tmp4.nc Tue Aug 23 21:04:45 2011: cdo seltimestep,1 tmp2.nc tmp3.nc Tue Aug 23 19:19:18 2011: cdo selvar,pcp tmp1.nc tmp2.nc Tue May 17 19:34:24 2011: cdo sellonlatbox,-85.25,-29.625,15.25,-50 3B43.2011.nc tmp1.nc Tue May 17 19:26:31 2011: cdo mergetime 3B43.110101.6A.nc 3B43.110201.6A.nc 3B43.110301.6A.nc 3B43.110401.6A.nc 3B43.2011.nc geos/das -9999.900391 Unknown1 variable comment grid-1 Earth surface precipitation:Precipitation instantaneous standard time hours since 2011-01-01 00:00:00 0 hours since 2011-01-01 00:00:00 pcp -9999.900390625??T$D:!;əZ;z;53<$4<<_!O=k[=ao=z=N=y>Fj>>Ʈ>Ē>$ >1>*>a>]{>qPx>┑>q>>>Y>>w>>>>>R>&>)::;W!M; ;*<\<,<2fN=LJ}=I=\Ь==ZF>ܓ>伻>`>>k>>#>>>1>=>>V>r>>.?>ȣ>Ț>5>tB>~>NQ>> )8p::ۤ:;/;;^2>q}>>>A>>}>>O>N>>,>ު>A>ey>>>>]>Ӥ>> >>3o::{Q:eY; ;?>>h>Ψ>R>S><>>ɹ?,>>#>3>̏>W> > a>4>#y>`'l>p>mV>> 8:0:W:U ;EP;f;\T;&1J<&<<<ݬ~/>ڛ?>RT>>:>>O>>ʏ>@l>T> i>z[>q]>}>Ł>k}^>L>[Q>h>>8ɩ;j:u7:<:,k;I;/v;ȏ;<^.>>2> D>>,> M>>V{>X>)]>hb>9q>(|>>0d>|>>>'̠> Cc;O<\:c:g:>:#;2;O;;j<,Q.4>A>_h>o>>>>o˘>r}>ow>Nn>`g>>U~>Ӫ> >i>> :x:uȢ:3:/v:K[:5;+e4;gw;=P#g>oy>>qׇ>zͧ>>:>>k>>s>Y>f7_>W>]K>>%>%>tr]>pn>i>v>9ę>>)]>-ԥ>4>؏>qJ>4I>e>Mcq>Bџ>>>[>Ґ:>GV>UP>Q>:]>߷t>V>7>,>_G3>KX>5y>pe>~m>Q>a4>>> V;U[;: :Ļi:%:퀑:Ġ:#;;GG8>>zU>S>bE>c >=>>mX>>>̮>> I>=^>> )8 : 9{&;8!:h:2S:: :$=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: hS99*38\ j8+L9:8 9 )8:|;}9 D9}9 ף:K; H:}9gx; N;gx;9}9h: )89 D>:9 )8 D9 9 D99}9}9 838!884:ņ; h9!: ף: ):}: D: D: : ): )8 )8}9 hS9 9 8 )9j : D9}9 )98 D>;9 D9 D9}9X>67a`89 8;W; 9 D>: D9 : )8 h98 D9]:}: : 9 )8}9 hS9 )9 9 )86i6v8ag:gdalautotest-3.1.2/gdrivers/data/8s.ers0000664000175000017500000000140013701057753016501 0ustar evenevenDatasetHeader Begin Version = "6.0" Name = "8s.ers" LastUpdated = Fri Sep 24 15:34:23 GMT 1999 DataSetType = ERStorage DataType = Raster ByteOrder = LSBFirst CoordinateSpace Begin Datum = "NAD27" Projection = "NUTM11" CoordinateType = EN Rotation = 0:0:0.0 CoordinateSpace End RasterInfo Begin CellType = Signed8BitInteger CellInfo Begin Xdimension = 0.75 Ydimension = 0.75 CellInfo End NrOfLines = 10 NrOfCellsPerLine = 10 RegistrationCoord Begin Eastings = 484875.86243129981 Northings = 3620515.0848810002 RegistrationCoord End NrOfBands = 3 BandId Begin Value = "Red" BandId End BandId Begin Value = "Green" BandId End BandId Begin Value = "Blue" BandId End RasterInfo End DatasetHeader End gdalautotest-3.1.2/gdrivers/data/BAND6.DAT0000664000175000017500000000000013701057753016553 0ustar evenevengdalautotest-3.1.2/gdrivers/data/wyhpgn.los0000664000175000017500000000566013701057753017503 0ustar evenevenNADCON EXTRACTED REGION NADGRD !>"B><@NY<{A<*p2<<,<<|<<<<= <=&!!!!!!!!Vr1??==q{ZZGZ*l8'!!!!!!!W"`e7e4U=;# #/]?EEZZZl?wddTCQ>>(!!!!!!!- 7e@wi=4$#K#Ul**Gww#fc>>)!!!!!!!'p8@E??.^?<TG,Z)8$Scc>>y*!!!!!! /el?U?@. t?EogltZ)[euQ>>>>+!!!!!N4u?@? +"q];|@GZZlU=Hg))Z(>>>,!!!!!!z44?=U:;"]. @="#2 ?Z*{. ZGM2I>>>>>-!!!!! \@ GZZ,,GlU,.\Z *Zh)*j =4li8{x>>>>.!!!!!Vql@ UeqqGM)ddu87C(c>>>>>/!!!!!!$ZZZ|ZqZhZ)LL88e(cyy>>>>0!!!!!!!Gl?|o{l|ML[[[epe$%>>>yy%y1!!!!!!!=$$TH@=TDt4ZMoqqeI>>>>> >2!!!!!!!Q _7<s{q/ " 2UioLo)* *i81uC>>> gdalautotest-3.1.2/gdrivers/data/i_3034f.ntf0000664000175000017500000000166413701057753017230 0ustar evenevenNITF02.1003BF01I_3034F 19971218121539Check an RGB/LUT 1 bit image maps black to TP and white to green. U 00001000010 JITC (520) 538-5458 00000000094800040400100045000000000940000000000000000000000000IMMissing ID19961218121539 - BASE IMAGE - U 0Unknown 0000001800000035B RGB/LUT VIS 01R 0NM1LU N 3000020B00010001003500180100100000100001001.0 0000000000@>>|>gdalautotest-3.1.2/gdrivers/data/gsg_binary.grd0000664000175000017500000000317013701057753020264 0ustar evenevenDSBBAALALAR@o@5C5CCCCCC5CCCBCBBBBBBBB-CwCCNCCB CBCC%C%CC CCBBBBBC5C C-CBCBBBBBBB CCC%C C CB=C-C C C%CBCBBBBBBBBCBBCC%CCCBBBBB CBBBBBBCBBBB CB CBBBBBBBBBBBBCBCBCCCCBBBBBBCB CBCBBCBC C-CCBBBBBBB=C-CBBBBB CB-C CBBBB CBBBBBB-CBBBBBCBBCCCBBCBBCBBB C-CBBBBBB C CB CBBBBCBBBBBCBBBCCBBCBBCBCCBBCBBBBCBBBCBCBCB CBBBCBBBBBB5CBBEC-CC C CCBCBB CCCBCBC-CBB=C-C-CCCBCBBCBCCBBBCCNCBCCC CCCBBBBCB%CBCBBCCBCCBBBCCBBBBBBBCBB CBCBC CCBB CB CBCBBCCBBBBBBCBBCB%CB CBBBBCBCCCBCBBCBCC CCCCBCBCCBBBCCgdalautotest-3.1.2/gdrivers/data/n43_coord_inverted.dt00000664000175000017500000000654413701057753021555 0ustar evenevenUHL10430000N0800000W030003000200U 012101210 DSIU DTED0F18 062 01A960900000000US090078 SPEXDLMS2009609MSLWGS84AS11+C 9609 430000.0N0800000.0W430000N0800000W440000N0800000W440000N0790000W430000N0790000W0000000.0030003000121012100 ACC0200020002000200 10 gdalautotest-3.1.2/gdrivers/data/case_sensitive.ASC0000664000175000017500000000562313701057753021003 0ustar evenevenncols 15 nrows 12 xllcorner 0.100000E+06 yllcorner 0.650000E+06 cellsize .500E+02 nodata_value -99999 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .270E+01 .186E+01 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .614E+01 .931E+01 .868E+01 .200E+02 .266E+02 .122E+02 .313E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .162E+02 .542E+02 .944E+02 .953E+02 .977E+02 .833E+02 .505E+02 .144E+02 .209E+01 .000E+00 .000E+00 .000E+00 .000E+00 .199E+01 .170E+02 .784E+02 .173E+03 .266E+03 .332E+03 .264E+03 .230E+03 .120E+03 .415E+02 .941E+01 .801E+00 .240E+02 .000E+00 .410E+01 .177E+02 .116E+03 .303E+03 .562E+03 .756E+03 .759E+03 .618E+03 .309E+03 .171E+03 .603E+02 .792E+02 .254E+03 .242E+03 .483E+00 .678E+01 .529E+02 .212E+03 .585E+03 .108E+04 .140E+04 .128E+04 .817E+03 .436E+03 .219E+03 .275E+03 .890E+03 .145E+04 .158E+04 .000E+00 .307E+01 .162E+02 .141E+03 .435E+03 .862E+03 .109E+04 .889E+03 .559E+03 .289E+03 .296E+03 .116E+04 .245E+04 .332E+04 .309E+04 .000E+00 .000E+00 .516E+01 .296E+02 .128E+03 .245E+03 .305E+03 .223E+03 .119E+03 .472E+02 .517E+03 .173E+04 .289E+04 .345E+04 .309E+04 .000E+00 .000E+00 .000E+00 .266E+01 .107E+02 .192E+02 .146E+02 .182E+02 .805E+01 .378E+02 .442E+03 .165E+04 .274E+04 .280E+04 .214E+04 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .528E+00 .000E+00 .495E+00 .000E+00 .706E+01 .225E+03 .123E+04 .210E+04 .189E+04 .105E+04 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .844E+02 .405E+03 .752E+03 .430E+03 .244E+03 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .000E+00 .577E+02 .350E+02 .196E+02 .503E+01 gdalautotest-3.1.2/gdrivers/data/avfilt.vrt0000664000175000017500000000203513701057753017463 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -4.4840319999999998e+01, 3.4320000000000002e-03, 0.0000000000000000e+00, -2.2932583999999999e+01, 0.0000000000000000e+00, -3.4320000000000002e-03 ./data/rgbsmall.tif 1 3 0.111111 0.111111 0.111111 0.111111 0.111111 0.111111 0.111111 0.111111 0.111111 gdalautotest-3.1.2/gdrivers/data/netcdf-4d.nc0000664000175000017500000001051413701057753017534 0ustar evenevenCDF levelist longitude latitude time  ConventionsCF-1.5 levelist  long_namepressure_levelunits millibarsT longitude  standard_name longitude long_name longitudeunits degrees_eastaxisX(\latitude  standard_namelatitude long_namelatitudeunits degrees_northaxisY(time  standard_nametimeunitshours since 1900-01-01 00:00:00calendarstandardt  _FillValue latitudeunits degrees_northaxisY(time  standard_nametimeunitshours since 1900-01-01 00:00:00calendarstandardt  _FillValue @ @@A AHApAAABBBBBBBBBBA*@A*LA*XA*dgdalautotest-3.1.2/gdrivers/data/isis3_geotiff.lbl0000664000175000017500000000215413701057753020673 0ustar evenevenObject = IsisCube Object = Core ^Core = isis3_geotiff.tif Format = GeoTIFF Group = Dimensions Samples = 317 Lines = 30 Bands = 1 End_Group Group = Pixels Type = UnsignedByte ByteOrder = Lsb Base = 0.0 Multiplier = 1.0 End_Group End_Object Group = Mapping ProjectionName = Equirectangular CenterLongitude = 184.4129944 TargetName = Mars EquatorialRadius = 3396190.0 PolarRadius = 3376200.0 LatitudeType = Planetographic LongitudeDirection = PositiveWest LongitudeDomain = 360 MinimumLatitude = -14.8228149 MaximumLatitude = -14.7275028 MinimumLongitude = 184.4411316 MaximumLongitude = 184.496521 UpperLeftCornerX = -4766.9649842452 UpperLeftCornerY = -872623.62882223 PixelResolution = 10.1025 Scale = 5864.9453125 CenterLatitude = -15.1470003 CenterLatitudeRadius = 3394813.8579782 End_Group End_Object End gdalautotest-3.1.2/gdrivers/data/LanduseSmall.mpr0000664000175000017500000000153213701057753020546 0ustar eveneven[BaseMap] AttributeTable=LanduseSmall.tbt CoordBounds=795479.99999999988 8089020 796979.99999999988 8090520 CoordSystem=LanduseSmall.csy Domain=LanduseSmall.dom DomainInfo=LanduseSmall.dom;Byte;class;12;; Proximity=63.700000 Type=Map [Ilwis] Class=Raster Map Description=MapSubMap(Landuse.mpr,1,1,75,75) Time=1201538962 Type=BaseMap Version=3.1 GeoRefChangeable=Yes [IlwisObjectVirtual] DefOnlyPossible=Yes Expression=MapSubMap(Landuse.mpr,1,1,75,75) [Map] GeoRef=LanduseSmall.grf Size=75 75 Type=MapStore [MapFromMap] Map=Landuse.mpr Type=MapSubMap [MapStore] Data=LanduseSmall.mp# PixelInterLeaved=No RowLength=75 StartOffset=0 StoreTime=1201538962 Structure=Line SwapBytes=No Type=Byte UseAs=No [MapSubMap] Corners=No Offset=0 0 [MapVirtual] Expression=MapSubMap(Landuse.mpr,1,1,75,75) Type=MapFromMapgdalautotest-3.1.2/gdrivers/data/4bit.rsw0000664000175000017500000007166713701057753017061 0ustar evenevenRSWs@@j@$@"?Bɣ1@sH@/m"?Bɣ1@"?Bɣ1@offfffffffffffffofffffffffffffofffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffofffffffffffffffffffffffffffffffffofffffffffffffffffffffofffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffffffofffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffofffffffffffffffffffffffffffffofffffffffffffffofffffffffffffffffffffffffffffoffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffofffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffofffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffofffffffffffffffffffffffffffffgdalautotest-3.1.2/gdrivers/data/byte_and_rgbsmall_2pages.pdf0000664000175000017500000002144013701057753023046 0ustar eveneven%PDF-1.6 % 1 0 obj<> endobj 2 0 obj<>>> endobj 3 0 obj<> endobj 4 0 obj<> stream x+22PA(˥jhtlE endstream endobj 5 0 obj<>>> endobj 6 0 obj[] endobj 7 0 obj<> endobj 8 0 obj<> endobj 9 0 obj<> endobj 10 0 obj<> stream x%!rD1 C# ~td2d%IA*I$vW㠒 ZlCW }@"[ D',jO6׽hA;߷tiǸYr|00H*\UQ2E l u])#bMv;F|tTTyw8]QlY˸~ˀNo:1xݪr 2pm[i5ٽ~4?> xO endstream endobj 11 0 obj 228 endobj 12 0 obj 33 endobj 13 0 obj<> endobj 14 0 obj<> endobj 15 0 obj<> endobj 16 0 obj<> endobj 17 0 obj<> stream x+25PA(˥jhuK endstream endobj 18 0 obj<>>> endobj 19 0 obj[] endobj 20 0 obj<> endobj 21 0 obj<> endobj 22 0 obj<> endobj 23 0 obj<> stream xS[Ys"P9&'d@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w.S/涺>儞s'5Za!%6)2=IJzR)4Z?1cGT ޺In2m]3{>%w7Yz䁱HKu9#F%ZB5NA3xAaz^ѝOI#fH:w:ԡ=4_ TԿVihYw(DR3 2K;AŽ0^`qC 8ogpzcő D04]d!O>g;Ψ&?b_QT-qޕ1-NPPsޙ&JRHjK&5.`I4hـab']H%b'G<:M7?wT_k/',11rʘdTYֽ˒'j-B8u*EuQMe4V)UJfQv@up.4Y@CNUlVl{.>'>j>oNP."N|xMgߴDOw^8T~$p3;ByھE[F&Uɩdߡ0+hJ;yJȳn}DȔ8>y7tv״IȾi p,;mdx1|EPsJ>}* q-p ~CA99OP1jշtuEl. SA`g_*U J>Y,%`  endstream endobj 24 0 obj 5332 endobj 25 0 obj 33 endobj 26 0 obj<> endobj 27 0 obj<> endobj xref 0 28 0000000000 65535 f 0000000015 00000 n 0000000073 00000 n 0000000218 00000 n 0000000347 00000 n 0000000446 00000 n 0000000492 00000 n 0000000509 00000 n 0000000585 00000 n 0000000779 00000 n 0000001243 00000 n 0000001626 00000 n 0000001646 00000 n 0000001665 00000 n 0000001763 00000 n 0000001816 00000 n 0000001862 00000 n 0000001996 00000 n 0000002096 00000 n 0000002143 00000 n 0000002161 00000 n 0000002239 00000 n 0000002434 00000 n 0000002625 00000 n 0000008112 00000 n 0000008133 00000 n 0000008152 00000 n 0000008250 00000 n trailer <<76B8986AEA663CDA71C91956DCB5686C>]/Info 13 0 R/Root 2 0 R/Size 28>> startxref 8284 %%EOF gdalautotest-3.1.2/gdrivers/data/test_pdf_composition_pdf_content_pdfium.pdf0000664000175000017500000000273313701057753026323 0ustar eveneven%PDF-1.6 % 5 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 20 /Length 228 /Subtype /Image /Type /XObject /Width 20 >> stream x%!rD1 C# ~td2d%IA*I$vW㠒 ZlCW }@"[ D',jO6׽hA;߷tiǸYr|00H*\UQ2E l u])#bMv;F|tTTyw8]QlY˸~ˀNo:1xݪr 2pm[i5ٽ~4?> xO endstream endobj 4 0 obj << /XObject << /Image10 5 0 R >> >> endobj 6 0 obj << /BBox [ 0 0 20 20 ] /Group << /S /Transparency /Type /Group >> /Length 7 0 R /Resources 4 0 R /Subtype /Form /Type /XObject >> stream q 20 0 0 20 0 0 cm /Image10 Do Q endstream endobj 7 0 obj 33 endobj 8 0 obj << /BM /Normal /Type /ExtGState /ca 1 >> endobj 3 0 obj << /Contents 9 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 10 0 R /Type /Page /UserUnit 1 >> endobj 9 0 obj << /Length 11 0 R >> stream q /GS8 gs /Form6 Do Q endstream endobj 11 0 obj 22 endobj 10 0 obj << /ExtGState << /GS8 8 0 R >> /XObject << /Form6 6 0 R >> >> endobj 1 0 obj << /Count 1 /Kids [ 3 0 R ] /Type /Pages >> endobj 2 0 obj << /Pages 1 0 R /Type /Catalog >> endobj xref 0 12 0000000000 65535 f 0000001085 00000 n 0000001144 00000 n 0000000735 00000 n 0000000412 00000 n 0000000015 00000 n 0000000463 00000 n 0000000658 00000 n 0000000679 00000 n 0000000910 00000 n 0000001007 00000 n 0000000985 00000 n trailer << /Root 2 0 R /Size 12 >> startxref 1193 %%EOF gdalautotest-3.1.2/gdrivers/data/nc4_vars.nc0000664000175000017500000002625213701057753017511 0ustar evenevenHDF  ,0 =WOHDR-PVPVPVPV"  gx0yBand1q- &FRHPE (q(8OBTHDd( @BTHD  d( rFSHDPx(BTLFU1z8IY3Cuh? Sq2w#y2UU9Wx;' 0-!R ?>|M)BTLF ?U12238U9!M? ;' ƾFSSEEbm*BTHDd(M _*wBTHD  d(M! &uFSSE^ GCOLtestval_stringarrstringtest0@OHDR-PVPVPVPV ?@4 4*G# +CLASSDIMENSION_SCALE NAMEx 1standard_namegrid_longitude 9 long_namex coordinate of projection unitsm axisXpNOHDR-PVPVPVPV ?@4 4*GM# +CLASSDIMENSION_SCALE NAMEy 0standard_name grid_latitude 9 long_namey coordinate of projection unitsm axisY{OHDR-PVPVPVPV$ *,  iAv&TFRHP (q$NFSHDPx(.7BTLF-O?q HU5$:/+/;>l,|G D-Kqm?j<O(? >|9{\ c[gBTLF 5Kq9:/;j<?H-O|G ? \ ADGTiI5vE  i ` E :  d M6}niF#l'fL}?h8g%P%LoL{)V?xR(a'V  < a !!E!n!!!" ")"H"g""""##/#R#o####$$#$B$_$~$$$%%%8%U%x%%&&"&C&f&&&&'%'H'q'''((8(]((((() )$)A)\)w))))***>*Q*d*y******+++.+G+`+++++,,',<,Q,b,q,,,,,,--+-B-Y-p------..*.G.b.}....//=/\/}///00$0C0b0000011121I1Z1o111111111111111111111112222 2 k w)<s)3q)+p)"n)l)  R)    O)      L)     I)  F)     C(    @(    =(  6(  -(      +(     ((     &(    #(    !(    (   (     (     (      (   (   '  '     '     ' " ' ' ' '    '   !'     "'     #'     $'    %'           &'          ''         )&    +&    -&      /&        2&        9&          ?&          B&          D&         G&     J&     M&       O&      R&      S&         S&      T%      U%      V%       V%       W%         X$     Y$     Y$     Z$     [$     \#     ]#        ]#        ^#          ^#         ^#         ^"        _"        _"        _"     _"     _!     `!      `!       `!       `!        `         a         a          a         a         a        b        b        b         b           b           b           c        c        c             c              c              d             d               d               d              d                 e                 e                  e                e                e              f               f               f            f          f          g         g          g          g         g          g          g               g             f             f                f              f              f            f              f              f       $  f       $   f       $   f      $   f            f            f        f       f       f          f        f        f         f         f         f     $  f     &  f     &  f     f       f       f        f      f!     f! !  f!   f"    d"     c"      b#      a#     `#  ^#  ]$   \$      [$      Z$    Z$      Z$      Z$      [$       [$       \$        \$       ]$       ]$         ]$        ^$        ^$      _$  _$  _$   _$   _$   _$   ^$   ^$   ^$   ^$   ^$   ^$  ^$    ^$    _$ +  _$-  _$-  _$ -  _$P  _$P  _$N  _$-  _$-  _%)  _%(   _%(   _%&   ^%%   ]%%   ]%    \%     \%     [% %    Z&&   Z&&   Z&7    Z&7   Z'6   Z'6*  ['6*  ['6*  [(5)  [(4*  [(4*  [(2    \)   \)   \)'   \) (   \* (   \*   )   ]*  '   ]*  '   ]+  $   ]+  #  ]+  #  ]+  ^+  ^+  ^+   ^* ^* ^*  _*  _)  _)     _)     _)     `)   `(  `(  `(  `(  `(  a)  a+  a,  a-   $a.  & a/  & b0  #b1    %b3    %b4   "b;    bB   cI  cN  dQ  fT   hW! jZ! l]$ n`% pe rj to vt wy ygdalautotest-3.1.2/gdrivers/data/small_grass_dataset/PERMANENT/0000775000175000017500000000000013701057752023005 5ustar evenevengdalautotest-3.1.2/gdrivers/data/small_grass_dataset/PERMANENT/PROJ_UNITS0000664000175000017500000000004613701057752024464 0ustar evenevenunit: meter units: meters meters: 1.0 gdalautotest-3.1.2/gdrivers/data/small_grass_dataset/PERMANENT/PROJ_INFO0000664000175000017500000000024413701057752024315 0ustar evenevenname: Universe Transverse Mercator datum: nad83 towgs84: 0.000,0.000,0.000 proj: utm ellps: grs80 a: 6378137.0000000000 es: 0.0066943800 f: 298.2572221010 zone: 18 gdalautotest-3.1.2/gdrivers/data/small_grass_dataset/README.txt0000664000175000017500000000014613701057752023153 0ustar evenevenThis is a very small extract from the sample set http://grass.itc.it/sampledata/fire_grass6data.tar.gzgdalautotest-3.1.2/gdrivers/data/vicar_all_ones_basic2.vic0000664000175000017500000000476613701057753022364 0ustar evenevenLBLSIZE=2000 FORMAT='BYTE' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=0 RECSIZE=2000 ORG='BSQ' NL=50 NS=2000 NB=1 N1=2000 N2=50 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-LINUX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='BASIC2' EOCI1=2550 EOCI2=0 PROPERTY='GEOTIFF' NITF_NROWS='50' NITF_NCOLS='2000' MODELPIXELSCALETAG='(0.6,24,0)' MODELTIEPOINTTAG='(0,0,0,440720,3751320,0)' TASK='TASK' USER='even' DAT_TIM='Sat Oct 26 08:24:14 2019'                                                   gdalautotest-3.1.2/gdrivers/data/byte_jpg.zip0000664000175000017500000000122413701057753017767 0ustar evenevenPK {/>DTbyte.jpgUT 21M21Mux JFIFC    $.' ",#(7),01444'9=82<.342  }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz?R9Q6=:J߯L*W{@'$!v5&eW>ޚ̬0ZfăI#'ӠzgV_\ Fc21<1ֹ*Շa6Is\9n~Q PK {/>DTbyte.jpgUT21Mux PKN0gdalautotest-3.1.2/gdrivers/data/byte_elas.bin0000664000175000017500000001400013701057753020075 0ustar evenevenNOR 9=zEAS BpBp?k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/50000_25000_uint16.gpkg.zip0000664000175000017500000007502113701057753021521 0ustar evenevenPKmSNMy'50000_25000_uint16.gpkgUT Xl\Xl\ux }l}ǏDRe:f&=fJ(:q-Z%&)\Ӹ yn&y2yi,;/)V4Ʋ )u{%8= $+>f0Ä0 ab5|0Lϥ7cS1eMMC߇oC[L.<Xiouke a. .EX12C\d>G?E(r?G"BJ"/Γw&˧$G8#Fy!;\vgr 8q GszTKi3OQZlwD8˥iFRO'\C. ^?"1OE55 YѤTh?5? h-#Nh+!kAIqNHyP`V.C_50mͭAKIݏp 4:zQ1C_i7v䐦dhn6P챋${_gCh2.3lV.~ڡif f)XkIVha~20{g~cxGݡ?yN@NȝSo_^N귯\-=}᯴қcE]H"v2.}[[^ǏL^Ho}5+/9p9č|Tqu|3{LZs%`V׽i]ٺ+t݁@wlد\5C_q45 f9Zos|t<쌆i>aOpa6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(䕰H@$ pphZ:PO=py "=8ԗTߟϚtXD$ 88tzƑ@pp#W[D)dM ppp>Ƅҁz#POڰG,k|Gw]%:'Jz|Nu;~n_Ou]2ƵwwɗKF?).;KF0eQ.tTݸ/5 .?6ל>mkN9fqO8 )Oř7=a'՜6>k9sak.0ޙ5qu}m^|l>kJ^>tk0ec/tQS&^x?m ZxV8EN9f3դP3c ;}ࡃ9fQ'6QG2Ojz˚ k2lM^Us 1&u&M'1?~ j9Wmgo SM{NM{NV畭X%]%Ϯ]1wld3ZVhg->q7i4YbI]kſR>f>{Ml3밲6v w5q촺KF]>j+wm{~Y5}zajz[MSY]ŗOos-MEG'̶MlO˧]R7.ljiXHN PKmSNMy'50000_25000_uint16.gpkgUTXl\ux PK]ygdalautotest-3.1.2/gdrivers/data/isis3_detached.cub0000664000175000017500000002244613701057753021017 0ustar evenevensgddilnnlnt{aZjjmq~yohbbgottsux}hhmmorzrlgemtx{|}{{momry{uokkuz|uopyx|}vqpr{~}s|zv|st|~~zy}z}yu}~}xqtx~y~y~wqnptx}x~~~~ywwtwywuwywqs|~y~~{{wxzsonkm~~}||~vzzplijry~}~{t{yqppq{{{|{ux|{zy~}~~zz~~~~~}wu}|mm{~|~~{rsxnlr{vtu~pv}|||y~urppy~~mnoot{wjnrpt}qjow|xrloy~|rmu}z{ry|}}~~gdalautotest-3.1.2/gdrivers/data/isis3_unit_test.cub0000664000175000017500000047630113701057753021277 0ustar evenevenObject = IsisCube Object = Core StartByte = 65537 Format = Tile TileSamples = 128 TileLines = 128 Group = Dimensions Samples = 150 Lines = 50 Bands = 1 End_Group Group = Pixels Type = SignedWord ByteOrder = Lsb Base = 8190.1245134999 Multiplier = 0.25006486667989 End_Group End_Object Group = BandBin Name = Red Center = 700 Width = 300 End_Group Group = Mapping ProjectionName = Equirectangular CenterLongitude = 195.92 TargetName = mars EquatorialRadius = 3396190.0 PolarRadius = 3376200.0 LatitudeType = Planetocentric LongitudeDirection = PositiveEast LongitudeDomain = 360 MinimumLatitude = -38.96 MaximumLatitude = -38.8 MinimumLongitude = 195.85 MaximumLongitude = 195.99 UpperLeftCornerX = 653.1326414958 UpperLeftCornerY = -2298409.7101628 PixelResolution = 0.38 Scale = 155622.36097143 TrueScaleLatitude = -38.88 CenterLatitude = -38.88 CenterLatitudeRadius = 3388271.7029792 End_Group End_Object Object = Label Bytes = 65536 End_Object Object = History Name = IsisCube StartByte = 161997 Bytes = 1013 End_Object Object = OriginalLabel Name = OriginalLabel StartByte = 131073 Bytes = 30924 End_Object End x?ɇڇʇʇ͇LJȇʇЇՇӇc9ň\Q uׇ(6 ·+0?yLهׇ)NLA߇߇އć ΉEъJȋ֋Ƌڋ-Gs? ooe΋]$T* ;G %3Yɇ·ꇶ܇·ׇԇЇӇr<~2bۈW{ TU;Q!ׇBψEƈ]3iދ Sي ~C%J@. , %cR Ջ3㋰Çχ‡OˇՇ+ ,"Z~vG2ŇƇ jx/9.U䉅IW͇pMЉljɊ;h'enˋ鋅:ӊ>Ha ۋ"c& ㋩̇ۇ2`Çd{㇕Έ_uRˇPOʉ>`WljŠẇoƈ3"~{3Xʼn,"B!fDЊ gϊ튒֊Zk^a͋؋ ۋ :ɋP+q ݋xʇЇʇćه뇫m;AOU=>~"ć܇O)c̉z9CɈ~Z􇸇Iuɇ߇>Wz܊)"<ߊʉG ؊!5cX#jTK֋8@.)ԋjӋsɇׇ݇MӇчi‡UH;t&vUֈڈ;ԇmӊϊ[qFk`ĉxӊ8zqF /%͋?!ɋŋŋ̋_񇼇ɇȇ؇ˇQF懄ԇ}C|hbχr9VsۉʼnTu߇ZҊ܊D#(≀݊E׋͋ۋ^Vrt+ԊX^$*2ۋrʋɋȋpڇhqχ)F쇮5҈Y"tKzʇ[ֈry݈ 4%R}Ӈډ̊ϊ;j܊׊LDEɊ?܋i‹ɋ䊳CC~bNjҋt?hÇƇ҇%@Uhẏˈ ('_5}B Uh46[IZ*|ȇŇ n !.ĊԊs7~6ԋً֋qF񋲋]mY‹rۋ:^$ohpnuynчDÇʇ҈[2'&dBb/t8SHԈf=ካ=N~sgߋˋҋ!8uꊾbƋߋËPtċދ ֋هևև6SEpɇ[-T׉͈|{'gU>P+dM {b5ֈ ,щŠvU:2#؊[~ ԋNjߋdYYFTrϋڋ~ =wItIË(NjӇևχ݇ʇ܇$=Z ڇQĈyCƉS{(+E0b;҈.3ljX.Ԉ)#J=eYEi x!CDʋ.ˋ?' Ë;ڋ򋱋΋9Eڋ,zʋo񋎋U a-̋܇܇͇ԇՇÇۇ>$N/1򈵈Pш ЊҊa}Ԉmae7zډ;숫5z8mۉTҊߊЊ8"SWڋGˋ싵Ƌϋ 7k5'ϋ΋ߋQ~BNj֋\ꋾ5̋ч·އ*9߇Ӈs e҇9qe-cډÉOi_Z̉:NJ8CAڊ[-) GӋ΋׋PT,+ڋQȋՋԋ|v‹֋B ߋ?z‹zÇ%߇6nɉh߇]Zȉ͇̇`7sfƉO;͉ˉ8 R6}@QQ $ϋ}x 0ы&͋͋Ƌ틻ˋP鋱݋%nmi1m̋ӋeՇއӇ1ʇvˆNs=҉鈼χI5x=މՉ3J;|݋m4{ʋŋJۋŋ틿ϋs B͋ꋖًӋl6ߋ5؋LjC9"L ·Ӈć̇ɇȇԇ܇(#ևhq|]*އ߉~ڈ$؊\yЉcsى)8?'9V5^ ̋֋n_׋y]uY7kۋȋ݋@#4׋ ՋʋʋӋ*kA,,ъXԇ臯ӇLJԇև#Ԉ߈DÈG܉0 B!هm6sCՊ|Lj̉G>+ G[Qҋ:Y^ҋKˋdË݋SJߊŠdIugs{ŋ/̋NjƋ‹׋Ћ[;Tڊaևw݇ŇЇ()߇ۇ;@K҈ʼnԇ}1ĉ'n,b6ډaŊ|#}Jh[hLqϋ7ߋ% ce+).ȋrpsƋʋg8ŊT$~ꈲՇهMۇɇχ·ڇ QUԇ9щp\Ӊ܉5Iy==(lY/uʊZ8bF[eiЊ(pe򋽋)K؋݋֋󋯋v\8'3I"N?Bl̉<ԇ‡χ2& ":&hi߉wωĉJ8pފ*Ɋ‹ߋË܋܋ΊS׊߉P(?$zxϋyww֋ʋċiƋkċƋ؋G4 \CC ? ߊ~߇Ƈ ه:W [io,&jϊ9JE`ˋA%/'S|Fi:"Hы ݋ËՋ6yddLQ~sMIFqc|OˋSf >sÉˊLJ+ۇ122m`5[Tz׊ՊߊҊ6Uȋ [:e7؊OF򉠊=N‹jXau>sOWnbD_%ϊ075ω\;R*,桷&We?M?RՊNJ9[y~po݊Z G/戤A+iҋ싥{z拔Jw@tm‹8H)QQVfh4K=/[[H/b/UwKbX# C'󉚉O`u8؇yɇɇˇKeƈ!4%Rc䋾HH4o\p|vFŋ=׋ɋ [eDg~‹܋΋_krUy&ыBZ%tdbwInyWI<38`@Ή%ۇćڇƇއ%Qʼn鉃{(]nÉng1SRfvXT-uIߋyxًȋXΊgz{X爲=ŋNjЋ΋z ^K9}Ë[+Ŋ"ϋˋvfr}Lhϊ/&%ojMU8F#*(܊/0 ·Շ͇DĉD{uŊKO4/Njߊ3yH̉󉦈gj^TP֋ʋڋ̋H]nPS鋇Fxk΋)"+de0 P(6UX1Ȋ Ԋ֊Y $ފvʼnYtszڊRߋ Zu*]Fn}\S_*PމQȌnыeJwMɉQDË׋[P#1P5؊a.@=;Tt@=CkW;hȊ݊򊇊w;+1eD .g(:Їʇ >؉1Ov󊮊@fmE+NKu-ek)< ƋʼnLֈ? ċi΋592֊D,@MJz%iSq&ފ`0|̊}"&d SiȊՊI57kp%2}g][Ɖӈ̊;5ًSwWEt?׊M|֋8Dx݋ӋSfIP^O=0?YF]功ULyY֊mՊX<Sctˊˊb=`܈[ʼn܊̊[zRډh*|@܉gYkxQ:΋򋓋l]/Љzb݋`7f-O܋Ŋ*ˋtom&KB ŠĊ܊&@zVڊ݊:"fYwʊŠ#{uVzъĊQ.ωgȊ4*9lj߈"$ҋ֋F~]5WfosnK]PM=Tŋ~ŋˋۋ*_fTj![K]0T[8Hъ'늱̊8슢/k|يӊP/$Ŋ99ÊSЊh# Pc+ 2Gꉯʼn܋؋ՋA2xUsXj|[1coZ}ҋU\JrՋŋ((Bah!#7T}݊܊oɊ~X`͊׊ ͊Ҋ6-/7-!W3[݉h&L-d9W[c>ʋɋދ2݋$yƈˉ$׈ ktq1~ԋu֋ȋ֋ȋċhUwsHZ*^AB,Vxߊ5ȊmoP~e‰֋y‹݋]VGv4HOwmwȋ勧FPYA;~t|qt@lRs䋟eɋҋNj㋰tQs_dpeNjʋۋۋɋmh:EJ`di݋sҋۋԋӋd]|ۋ[uߋЋŋ‹xext܋u 닒jPыʋPVdLux*‹ԋY>_O)m|n1܋<΋ދolzSje{&狱ߋ\%‹ۋ؋ZrH^[͋ϋ"B8Ypb6NLEVpϋ䋵ˋQƊ brȋċË=]#4`8"ዱ.DxȋЋ؋V{ /t)ŋ>SqꋫlΉS\G‹ˋϋhM|grWG&a1UZ Htp^H&U3F|ood._p 8E"M#؊ϊ@Šߊ֊ۊnI0S'튳Jى_eKf0ۊ͊;ZdJe6ioBs(ΊFЊ< [, Hj`jJ97P_p#lH~|q#6.-x̉fՉ.ĊLBgIOيT։ʼn8׊ߊ",[D:׋Y9:]NJi%qmڋT3(P^NJ,wUtZ2z kЈmbmҊvዪl~KPM>Y"'~q,SJ;* 臵"@Nc`PGkt'ڈ~爂K4ORcW΋0߈xo֊)@V]j[rr_TB։-)|bj=8XV@PDS_VERSION_ID = PDS3 /* File structure: */ /* This file contains an unstructured byte stream. */ /* The UNDEFINED RECORD_TYPE is used to meet PDS standards requirements. */ /* A label "record" is actually a single byte. */ RECORD_TYPE = UNDEFINED /* Locations of Data Objects in the file. */ /* >>> CAUTION <<< The first byte is location 1 (not 0)! */ LABEL_RECORDS = 32768 ^SCIENCE_CHANNEL_TABLE = 32769 ^LOOKUP_TABLE = 33569 ^CPMM_ENGINEERING_TABLE = 49953 ^CALIBRATION_LINE_PREFIX_TABLE = 50013 ^CALIBRATION_LINE_SUFFIX_TABLE = 50013 ^CALIBRATION_IMAGE = 50013 ^LINE_PREFIX_TABLE = 227757 ^LINE_SUFFIX_TABLE = 227757 ^IMAGE = 227757 ^GAP_TABLE = 42547757 /* Identification information. */ DATA_SET_ID = MRO-M-HIRISE-2-EDR-V1.0 DATA_SET_NAME = "MRO MARS HIGH RESOLUTION IMAGING SCIENC EXPERIMENT EDR V1.0" PRODUCER_INSTITUTION_NAME = "UNIVERSITY OF ARIZONA" PRODUCER_ID = UA PRODUCER_FULL_NAME = "ALFRED MCEWEN" OBSERVATION_ID = PSP_002172_1410 MRO:COMMANDED_ID = PSP_002172_1410 PRODUCT_ID = PSP_002172_1410_RED0_0 PRODUCT_VERSION_ID = 1.0 SOURCE_FILE_NAME = 4A_01_4821F11A00_00_0_01.DAT INSTRUMENT_HOST_NAME = "MARS RECONNAISSANCE ORBITER" INSTRUMENT_HOST_ID = MRO INSTRUMENT_NAME = "HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT" INSTRUMENT_ID = HIRISE TARGET_NAME = MARS MISSION_PHASE_NAME = "PRIMARY SCIENCE PHASE" ORBIT_NUMBER = 2172 RATIONALE_DESC = "Gullies with inner channels (MOC Releas MOC2-1416, image S1200190)" SOFTWARE_NAME = "HiRISE_Observation v2.9.1 (2.43 2006/10/0 05:41:12)" FLIGHT_SOFTWARE_VERSION_ID = IE_FSW_V4 /* Science Channel Header Observation Data Component description. */ Object = SCIENCE_CHANNEL_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 1 COLUMNS = 184 ROW_BYTES = 800 DESCRIPTION = "The Science Channel Table contains engineerin fields describing the operating state and commanding of the HiRISE observation. For detailed information about the contents and organization of this observation data component, refer to the SCIENCE_CHANNEL_TABLE.FMT file." ^STRUCTURE = SCIENCE_CHANNEL_TABLE.FMT End_Object /* Lookup Table Observation Data Component description. */ Object = LOOKUP_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 16384 COLUMNS = 1 ROW_BYTES = 1 DESCRIPTION = "The Lookup Table (LUT) defines the translation o 14-bit input pixels to 8-bit output pixels. The table has one column and 16384 rows, one for each input DN value. The first entry of the table refers to the 8-bit output value for the input pixel value 0." Object = COLUMN NAME = "Output Data Value" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 1 BYTES = 1 DESCRIPTION = "The rows represent the 8-bit output pixel value fo each 14-bit input pixel. The first row contains the 8-bit pixel value corresponding to the input DN value of 0. Each subsequent row corresponds to the 8-bit output pixel of the next input DN value." End_Object End_Object /* CPMM Engineering Header Observation Data Component description. */ Object = CPMM_ENGINEERING_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 1 COLUMNS = 8 ROW_BYTES = 60 DESCRIPTION = "The CPMM Engineering Table contains engineerin fields used by the CCD Processing and Memory Module (CPMM) in commanding the CCD during the observation. For detailed information about the contents and organization of this observation data component, refer to the CPMM_ENGINEERING_TABLE.FMT file." ^STRUCTURE = CPMM_ENGINEERING_TABLE.FMT End_Object /* Calibration Image Data Line Prefix description. */ Object = CALIBRATION_LINE_PREFIX_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 168 COLUMNS = 2 ROW_BYTES = 18 ROW_SUFFIX_BYTES = 1040 Object = COLUMN NAME = "Line Identification" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 1 BYTES = 6 DESCRIPTION = "Line ID contains line synchronization pattern, channe number, and line counter." Object = BIT_COLUMN NAME = "Line Synchronization Pattern" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 1 BITS = 19 DESCRIPTION = "For valid lines this line synchronization patter is 2#1111111100000000111#, for a corrupted or missing line the value is 2#1111111111111111111#." End_Object Object = BIT_COLUMN NAME = "Channel Number" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 20 BITS = 5 DESCRIPTION = "Channel number associated with a line." End_Object Object = BIT_COLUMN NAME = "Line Counter" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 25 BITS = 23 DESCRIPTION = "Line counter. First line = 0." End_Object Object = BIT_COLUMN NAME = "Bad Line" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 48 BITS = 1 DESCRIPTION = "The bad line flag is set when the line was foun to have a misplaced or corrupted line header. A line header that is lost in a data gap does not result in a bad line." End_Object End_Object Object = COLUMN NAME = "Buffer Pixels" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 7 BYTES = 12 ITEMS = 12 ITEM_BYTES = 1 DESCRIPTION = "The buffer pixels contain the value of empty pixel after going through the instrument electronics." End_Object End_Object /* Calibration Image Data Line Suffix description. */ Object = CALIBRATION_LINE_SUFFIX_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 168 COLUMNS = 1 ROW_BYTES = 16 ROW_PREFIX_BYTES = 1042 Object = COLUMN NAME = "Dark Reference Pixels" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 1 BYTES = 16 ITEMS = 16 ITEM_BYTES = 1 DESCRIPTION = "Dark reference pixel values produced by maske detectors." End_Object End_Object /* Calibration Image Data Description. */ Object = CALIBRATION_IMAGE LINES = 168 LINE_SAMPLES = 1024 SAMPLE_BITS = 8 SAMPLE_BIT_MASK = 2#11111111# SAMPLE_TYPE = MSB_UNSIGNED_INTEGER MISSING_CONSTANT = 16#FF# LINE_PREFIX_BYTES = 18 LINE_SUFFIX_BYTES = 16 DESCRIPTION = "The calibration image results from passing unexpose pixels through the instrument electronics. This records the instrument fixed noise signature that can be used to correct the observational data." End_Object /* Image data line prefix description. */ Object = LINE_PREFIX_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 40000 COLUMNS = 2 ROW_BYTES = 18 ROW_SUFFIX_BYTES = 1040 Object = COLUMN NAME = "Line Identification" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 1 BYTES = 6 DESCRIPTION = "Line ID contains line synchronization pattern, channe number, and line counter." Object = BIT_COLUMN NAME = "Line Synchronization Pattern" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 1 BITS = 19 DESCRIPTION = "For valid lines this line synchronization patter is 2#1111111100000000111#, for a corrupted or missing line the value is 2#1111111111111111111#." End_Object Object = BIT_COLUMN NAME = "Channel Number" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 20 BITS = 5 DESCRIPTION = "Channel number associated with a line." End_Object Object = BIT_COLUMN NAME = "Line Counter" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 25 BITS = 23 DESCRIPTION = "Line counter. First line = 168." End_Object Object = BIT_COLUMN NAME = "Bad Line" BIT_DATA_TYPE = MSB_UNSIGNED_INTEGER START_BIT = 48 BITS = 1 DESCRIPTION = "The bad line flag is set when the line was foun to have a misplaced or corrupted line header. A line header that is lost in a data gap does not result in a bad line." End_Object End_Object Object = COLUMN NAME = "Buffer Pixels" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 7 BYTES = 12 ITEMS = 12 ITEM_BYTES = 1 DESCRIPTION = "The buffer pixels contain the value of empty pixel after going through the instrument electronics." End_Object End_Object /* Image data line suffix description. */ Object = LINE_SUFFIX_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 40000 COLUMNS = 1 ROW_BYTES = 16 ROW_PREFIX_BYTES = 1042 Object = COLUMN NAME = "Dark Reference Pixels" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 1 BYTES = 16 ITEMS = 16 ITEM_BYTES = 1 DESCRIPTION = "Dark reference pixel values produced by maske detectors." End_Object End_Object /* Image data description. */ Object = IMAGE LINES = 40000 LINE_SAMPLES = 1024 SAMPLE_BITS = 8 SAMPLE_BIT_MASK = 2#11111111# SAMPLE_TYPE = MSB_UNSIGNED_INTEGER MISSING_CONSTANT = 16#FF# LINE_PREFIX_BYTES = 18 LINE_SUFFIX_BYTES = 16 DESCRIPTION = "Observation image data." End_Object /* Gap Table description. */ Object = GAP_TABLE INTERCHANGE_FORMAT = BINARY ROWS = 0 COLUMNS = 2 ROW_BYTES = 8 DESCRIPTION = "The Gap Table identifies the location of gap byt value (0xFF) segments in the file as a set of [start, end) range pairs." Object = COLUMN NAME = "Range Start" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 1 BYTES = 4 DESCRIPTION = "The byte offset (0-based) from the beginning of th file to the start byte (inclusive) of the gap segment." End_Object Object = COLUMN NAME = "Range End" DATA_TYPE = MSB_UNSIGNED_INTEGER START_BYTE = 5 BYTES = 4 DESCRIPTION = "The byte offset (0-based) from the beginning of th file to the end byte (exclusive) of the range." End_Object End_Object /* Observation timing events. */ /* All xxx_COUNT values are for the MRO spacecraft clock (SCLK) */ /* in seconds:subseconds form. A subsecond tick = 15.2588 microseconds. */ /* All xxx_TIME values are referenced to UTC. */ /* To obtain the most accurate results from time values */ /* use the xxx_COUNT values with the latest SPICE kernels */ /* obtained from ftp://naif.jpl.nasa.gov/pub/naif/MRO/kernels. */ Group = TIME_PARAMETERS /* Time when the observation first started. */ MRO:OBSERVATION_START_TIME = 2007-01-12T16:26:59.750 MRO:OBSERVATION_START_COUNT = 853086438:40706 /* Time at the beginning of the first calibration image line. */ MRO:CALIBRATION_START_TIME = 2007-01-12T16:26:59.909 MRO:CALIBRATION_START_COUNT = 853086438:51092 /* Time at the beginning of the first target image line. */ START_TIME = 2007-01-12T16:26:59.922 SPACECRAFT_CLOCK_START_COUNT = 853086438:51978 /* Time at the end of the last target image line. */ STOP_TIME = 2007-01-12T16:27:03.140 SPACECRAFT_CLOCK_STOP_COUNT = 853086442:00696 /* Time when the CPMM readout started. */ MRO:READOUT_START_TIME = 2007-01-12T16:27:05.790 MRO:READOUT_START_COUNT = 853086444:43319 /* Time when this EDR product was created. */ PRODUCT_CREATION_TIME = 2007-01-12T19:53:03 End_Group /* Instrument settings. */ Group = INSTRUMENT_SETTING_PARAMETERS MRO:CPMM_NUMBER = 0 MRO:CHANNEL_NUMBER = 0 FILTER_NAME = RED CENTER_FILTER_WAVELENGTH = 700 BANDWIDTH = 300 MRO:SCAN_EXPOSURE_DURATION = 80.4375 MRO:LINE_EXPOSURE_DURATION = 80.4375 MRO:IMAGE_EXPOSURE_DURATION = 3231013.5000 MRO:DELTA_LINE_TIMER_COUNT = 103 MRO:POWERED_CPMM_FLAG = (ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON) MRO:BINNING = 1 MRO:TDI = 128 MRO:TRIM_LINES = 1789 MRO:FOCUS_POSITION_COUNT = 2023 MRO:FELICS_COMPRESSION_FLAG = YES MRO:STIMULATION_LAMP_FLAG = (OFF, OFF, OFF) MRO:HEATER_CONTROL_MODE = "CLOSED LOOP" MRO:HEATER_CONTROL_FLAG = (ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON) MRO:LOOKUP_TABLE_TYPE = STORED MRO:LOOKUP_TABLE_MINIMUM = -9998 MRO:LOOKUP_TABLE_MAXIMUM = -9998 MRO:LOOKUP_TABLE_MEDIAN = -9998 MRO:LOOKUP_TABLE_K_VALUE = -9998 MRO:LOOKUP_TABLE_NUMBER = 26 /* This table provides a reverse mapping */ /* from 8-bit EDR image data back to 14-bit observation data. */ /* Each node of the map is the (lower, upper) inclusive range */ /* of the original 14-bit observation value */ /* that was translated to the 8-bit image value */ /* corresponding to the node number (first node = 0). */ /* Unused image values have the special range (-9998, -9998). */ /* A special ((0, 0)) map indicates that no LUT was applied. */ MRO:LOOKUP_CONVERSION_TABLE = ((0, 1206), (1207, 1220), (1221, 1234), (1235, 1248), (1249, 1262), (1263, 1276), (1277, 1290), (1291, 1304), (1305, 1318), (1319, 1331), (1332, 1345), (1346, 1359), (1360, 1373), (1374, 1387), (1388, 1401), (1402, 1415), (1416, 1429), (1430, 1443), (1444, 1456), (1457, 1470), (1471, 1484), (1485, 1498), (1499, 1512), (1513, 1526), (1527, 1540), (1541, 1554), (1555, 1568), (1569, 1581), (1582, 1595), (1596, 1609), (1610, 1623), (1624, 1637), (1638, 1651), (1652, 1665), (1666, 1679), (1680, 1693), (1694, 1707), (1708, 1721), (1722, 1735), (1736, 1749), (1750, 1763), (1764, 1777), (1778, 1791), (1792, 1805), (1806, 1820), (1821, 1834), (1835, 1848), (1849, 1862), (1863, 1876), (1877, 1890), (1891, 1904), (1905, 1918), (1919, 1933), (1934, 1947), (1948, 1961), (1962, 1975), (1976, 1989), (1990, 2003), (2004, 2017), (2018, 2031), (2032, 2046), (2047, 2060), (2061, 2074), (2075, 2088), (2089, 2102), (2103, 2116), (2117, 2130), (2131, 2144), (2145, 2159), (2160, 2173), (2174, 2187), (2188, 2201), (2202, 2215), (2216, 2229), (2230, 2243), (2244, 2257), (2258, 2272), (2273, 2286), (2287, 2300), (2301, 2314), (2315, 2328), (2329, 2342), (2343, 2356), (2357, 2370), (2371, 2385), (2386, 2399), (2400, 2413), (2414, 2427), (2428, 2441), (2442, 2455), (2456, 2469), (2470, 2483), (2484, 2497), (2498, 2511), (2512, 2525), (2526, 2539), (2540, 2553), (2554, 2567), (2568, 2581), (2582, 2595), (2596, 2609), (2610, 2624), (2625, 2638), (2639, 2652), (2653, 2666), (2667, 2680), (2681, 2694), (2695, 2708), (2709, 2722), (2723, 2736), (2737, 2750), (2751, 2764), (2765, 2778), (2779, 2792), (2793, 2806), (2807, 2820), (2821, 2834), (2835, 2848), (2849, 2863), (2864, 2877), (2878, 2891), (2892, 2905), (2906, 2919), (2920, 2933), (2934, 2947), (2948, 2961), (2962, 2975), (2976, 2989), (2990, 3003), (3004, 3017), (3018, 3031), (3032, 3045), (3046, 3059), (3060, 3073), (3074, 3087), (3088, 3101), (3102, 3114), (3115, 3127), (3128, 3139), (3140, 3152), (3153, 3165), (3166, 3178), (3179, 3191), (3192, 3203), (3204, 3216), (3217, 3229), (3230, 3242), (3243, 3255), (3256, 3268), (3269, 3280), (3281, 3293), (3294, 3306), (3307, 3319), (3320, 3332), (3333, 3345), (3346, 3357), (3358, 3370), (3371, 3383), (3384, 3396), (3397, 3409), (3410, 3421), (3422, 3434), (3435, 3447), (3448, 3460), (3461, 3473), (3474, 3486), (3487, 3498), (3499, 3511), (3512, 3524), (3525, 3537), (3538, 3550), (3551, 3562), (3563, 3575), (3576, 3588), (3589, 3601), (3602, 3614), (3615, 3627), (3628, 3639), (3640, 3652), (3653, 3665), (3666, 3678), (3679, 3691), (3692, 3704), (3705, 3716), (3717, 3729), (3730, 3742), (3743, 3755), (3756, 3768), (3769, 3780), (3781, 3793), (3794, 3806), (3807, 3821), (3822, 3837), (3838, 3853), (3854, 3869), (3870, 3886), (3887, 3902), (3903, 3918), (3919, 3935), (3936, 3951), (3952, 3967), (3968, 3983), (3984, 4000), (4001, 4016), (4017, 4032), (4033, 4048), (4049, 4065), (4066, 4081), (4082, 4097), (4098, 4114), (4115, 4130), (4131, 4146), (4147, 4162), (4163, 4180), (4181, 4200), (4201, 4220), (4221, 4240), (4241, 4260), (4261, 4280), (4281, 4300), (4301, 4320), (4321, 4340), (4341, 4360), (4361, 4380), (4381, 4400), (4401, 4420), (4421, 4440), (4441, 4460), (4461, 4480), (4481, 4500), (4501, 4520), (4521, 4542), (4543, 4568), (4569, 4594), (4595, 4619), (4620, 4645), (4646, 4671), (4672, 4696), (4697, 4722), (4723, 4747), (4748, 4773), (4774, 4799), (4800, 4824), (4825, 4850), (4851, 4876), (4877, 4908), (4909, 4948), (4949, 4988), (4989, 5028), (5029, 5068), (5069, 5108), (5109, 5148), (5149, 5188), (5189, 5228), (5229, 16383), (-9998, -9998)) /* Waveform sampling timing settings: (image, reset). */ MRO:ADC_TIMING_SETTINGS = (5, 4) /* Clocks timing locks: (first clock, second clock). */ MRO:DLL_LOCKED_FLAG = (YES, YES) MRO:DLL_LOCKED_ONCE_FLAG = (YES, YES) MRO:DLL_RESET_COUNT = 0 MRO:DLL_FREQUENCY_CORRECT_COUNT = 4 End_Group /* Temperature sensor readings at observation start. */ Group = TEMPERATURE_PARAMETERS MRO:OPT_BNCH_FLEXURE_TEMPERATURE = 20.2816 MRO:OPT_BNCH_MIRROR_TEMPERATURE = 20.2816 MRO:OPT_BNCH_FOLD_FLAT_TEMPERATURE = 20.9752 MRO:OPT_BNCH_FPA_TEMPERATURE = 19.5881 MRO:OPT_BNCH_FPE_TEMPERATURE = 19.7615 MRO:OPT_BNCH_LIVING_RM_TEMPERATURE = 20.6284 MRO:OPT_BNCH_BOX_BEAM_TEMPERATURE = 20.6284 MRO:OPT_BNCH_COVER_TEMPERATURE = 19.6748 MRO:FIELD_STOP_TEMPERATURE = 17.9418 MRO:FPA_POSITIVE_Y_TEMPERATURE = 18.6349 MRO:FPA_NEGATIVE_Y_TEMPERATURE = 18.5482 MRO:FPE_TEMPERATURE = 17.8552 MRO:PRIMARY_MIRROR_MNT_TEMPERATURE = 20.2816 MRO:PRIMARY_MIRROR_TEMPERATURE = 20.6284 MRO:PRIMARY_MIRROR_BAF_TEMPERATURE = -0.0162272 MRO:MS_TRUSS_LEG_0_A_TEMPERATURE = 20.2816 MRO:MS_TRUSS_LEG_0_B_TEMPERATURE = 20.5417 MRO:MS_TRUSS_LEG_120_A_TEMPERATURE = 20.0215 MRO:MS_TRUSS_LEG_120_B_TEMPERATURE = 20.8018 MRO:MS_TRUSS_LEG_240_A_TEMPERATURE = 19.5881 MRO:MS_TRUSS_LEG_240_B_TEMPERATURE = 19.6748 MRO:BARREL_BAFFLE_TEMPERATURE = -24.0749 MRO:SUN_SHADE_TEMPERATURE = -35.8885 MRO:SPIDER_LEG_30_TEMPERATURE = 17.0757 MRO:SPIDER_LEG_150_TEMPERATURE = 17.2489 MRO:SPIDER_LEG_270_TEMPERATURE = 17.1623 MRO:SEC_MIRROR_MTR_RNG_TEMPERATURE = 19.9348 MRO:SEC_MIRROR_TEMPERATURE = 20.6284 MRO:SEC_MIRROR_BAFFLE_TEMPERATURE = -23.5637 MRO:IEA_TEMPERATURE = 25.7484 MRO:FOCUS_MOTOR_TEMPERATURE = 21.3221 MRO:IE_PWS_BOARD_TEMPERATURE = 18.3058 MRO:CPMM_PWS_BOARD_TEMPERATURE = 18.8752 MRO:MECH_TLM_BOARD_TEMPERATURE = 34.871 MRO:INST_CONT_BOARD_TEMPERATURE = 34.4121 End_Group /* Instrument electrical power sensor readings. */ Group = POWER_PARAMETERS MRO:CPMM_POSITIVE_29_VOLTAGE = 29.1436 MRO:CPMM_POSITIVE_29_CURRENT = 0.216084 MRO:CPMM_POSITIVE_10_VOLTAGE = 9.02174 MRO:CPMM_POSITIVE_10_CURRENT = 2.32705 MRO:CPMM_POSITIVE_5_VOLTAGE = 5.02654 MRO:CPMM_POSITIVE_5_CURRENT = 7.65065 MRO:CPMM_POSITIVE_3_3_VOLTAGE = 3.31406 MRO:CPMM_POSITIVE_3_3_CURRENT = 1.55702 MRO:CPMM_POSITIVE_2_5_VOLTAGE = 2.50739 MRO:CPMM_POSITIVE_2_5_CURRENT = 0.320927 MRO:CPMM_POSITIVE_1_8_VOLTAGE = 1.81145 MRO:CPMM_POSITIVE_1_8_CURRENT = 4.15481 MRO:CPMM_NEGATIVE_5_VOLTAGE = -5.05272 MRO:CPMM_NEGATIVE_5_CURRENT = -0.694578 MRO:HEATER_CURRENT = 0.68071 MRO:INST_CONT_FPGA_POS_2_5_VOLTAGE = 2.54639 MRO:MECH_TLM_FPGA_POS_2_5_VOLTAGE = 2.5708 MRO:IEA_POSITIVE_28_VOLTAGE = 30.774 MRO:IEA_NEGATIVE_15_VOLTAGE = -15.3089 MRO:IEA_POSITIVE_15_VOLTAGE = 15.1964 MRO:IEA_POSITIVE_5_VOLTAGE = 5.06592 End_Group End Object = cubeit IsisVersion = "3.1.5 MacOSX (Intel) Beta | 2007-01-05" ProgramVersion = 2006-10-11 ExecutionDateTime = 2007-03-09T11:27:13 HostName = gabbro.wr.usgs.gov UserName = lpk Description = "Stacks cubes in individual files into one cube" Group = UserParameters LIST = cublist.dat TO = PSP_002172_1410_PSP_001552_1410_AnaG.cub End_Group End_Object Object = crop IsisVersion = "3.1.13 | 2007-08-23" ProgramVersion = 2007-02-01 ProgramPath = /usgs/pkgs/isis3.1.13/isis/bin ExecutionDateTime = 2007-12-08T14:45:09 HostName = magnus UserName = thare Description = "Crops a cube" Group = UserParameters FROM = /farm/sci7/analysis/Anaglyph/PSP_001552_1410_PSP_002172_1410/PSP_002172_1410_PSP_001552_1410_AnaG.cub+1 TO = isis3_unit_test.cub SAMPLE = 10200 NSAMPLES = 150 SINC = 1 LINE = 10300 NLINES = 50 LINC = 1 End_Group End_Object gdalautotest-3.1.2/gdrivers/data/byte_signed.tif0000664000175000017500000000136613701057753020447 0ustar evenevenII*fS   JN@N@@A̞LA# Wh )#NAD27 / UTM zone 11N|NAD27|k{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skŭc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{c΄k{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/byte_with_xmp.jpg0000664000175000017500000001001113701057753021016 0ustar evenevenJFIFhttp://ns.adobe.com/xap/1.0/ Description XMP Test Title 8 1 20 20 1 1 1 C    $.' ",#(7),01444'9=82<.342  }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz?R9Q6=:J߯L*W{@'$!v5&eW>ޚ̬0ZfăI#'ӠzgV_\ Fc21<1ֹ*Շa6Is\9n~Q gdalautotest-3.1.2/gdrivers/data/87test.img0000664000175000017500000004133513701057753017303 0ustar evenevenEHFA_HEADER_TAG@ R5G rootroot@IAG RRBand_1176315505Eimg_Layer@IA   Ehfa_Layer15505Ehfa_Layer@IA0 njMap_Info15505Eprj_MapInfo@IA vWorld_Cube 0PrW4xkA 0PrAW4xk|E3A|E3Ameters"XProjectionX5505Eprj_MapProjection842@IA `PE_COORDSYSNt{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,coordSys,}PE_COORDSYS,.MEPROJCS["World_Cube",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Cube"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Option",1.0],UNIT["Meter",1.0]]PEEimg_NonInitializedValueEimg_NonInitializedValueIAs/;%UVQz0&,-4!D 1$02)$ 12|.'Fhe@lSa z(\sǟ fRn"5Bn=C5Z1+U)8,32;NXj 0()'I )&_,5B?F %o%A _C G2  (  P  0"2 * Descriptor_TableedValueEdsc_TabletializedValueIAsx ]#Bin_Function840#dValueEdsc_BinFunction840alueIAs@n@UUUUUF@4@2@s>LTJ@@$@ackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{768:Cdata,}RasterDMS,.R IMGFormatInfo05ImgFormatInfo831@IAfO 4RasterDMS15505Edms_StateIAe { IAss BFUniquek{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:LnumBins,1:*bbinLimits,}BFUnique,.ss @@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@@@A@B@B@C@C@D@D@E@F@F@G@G@H@H@I@I@J@J@L@M@N@O@P@@P@P@P@Q@Q@Q@@R@S@T@@T@T@T@@U@U@V@V@W@W@@X@@Y@Y@Z@Z@[@[@[@\@^@_@`@@`@`@`@ a@@a@a@ b@b@b@ c@@c@c@c@`d@d@d@ e@ f@@f@f@f@ g@g@g@ h@`h@h@h@k@@l@l@@n@`n@n@ Unique Value@?????@"@(@1@9@F@H@7@7@&@@@@@@@@@?@???@@@@@@?@???@@@??@?@????@@?@???????@????@??????@??@???@???????????????????@???@?@???@?@2  Histogramion840#dValueEdsc_Columntion840alueIA\xHistogramParametersalueEimg_StatisticsParameters840IAEdsc_BinFunction840.{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,.]ss BFUniquek{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:LnumBins,1:*bbinLimits,}BFUnique,.ss @@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@@@A@B@B@C@C@D@D@E@F@F@G@G@H@H@I@I@J@J@L@M@N@O@P@@P@P@P@Q@Q@Q@@R@S@T@@T@T@T@@U@U@V@V@W@W@@X@@Y@Y@Z@Z@[@[@[@\@^@_@`@@`@`@`@ a@@a@a@ b@b@b@ c@@c@c@c@`d@d@d@ e@ f@@f@f@f@ g@g@g@ h@`h@h@h@k@@l@l@@n@`n@n@ Unique Value 0StatisticsrametersalueEsta_Statisticsarameters840IA\\StatisticsParameterslueEimg_StatisticsParameters840IAEdsc_BinFunction840.{0:pcstring,}Emif_String,{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,0:pcMIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,.]ss BFUniquek{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:LnumBins,1:*bbinLimits,}BFUnique,.ss @@ @"@$@&@(@*@,@.@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@@@A@B@B@C@C@D@D@E@F@F@G@G@H@H@I@I@J@J@L@M@N@O@P@@P@P@P@Q@Q@Q@@R@S@T@@T@T@T@@U@U@V@V@W@W@@X@@Y@Y@Z@Z@[@[@[@\@^@_@`@@`@`@`@ a@@a@a@ b@b@b@ c@@c@c@c@`d@d@d@ e@ f@@f@f@f@ g@g@g@ h@`h@h@h@k@@l@l@@n@`n@n@ Unique ValueASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,{0:px{0:pcstring,}Emif_String,LayerNames,1:*bExcludedValues,1:x{0:pcstring,}Emif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,BinFunction,}Eimg_StatisticsParameters840,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,{1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,projection,1:x{0:pcstring,}Emif_String,title,}Eprj_MapProjection842,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:lstartBin,1:LbinCount,1:LorigBinCount,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,binFunction,1:x{0:pcstring,}Emif_String,title,}Edsc_BinFunction840,{0:px{0:pcstring,}Emif_String,LayerNames,1:*bExcludedValues,1:x{0:pcstring,}Emif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:x{1:x{0:pcstring,}Emif_String,type,1:x{0:pcstring,}Emif_String,MIFDictionary,0:pCMIFObject,}Emif_MIFObject,BinFunction,}Eimg_StatisticsParameters840,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,.gdalautotest-3.1.2/gdrivers/data/vicar_vax_float32.vic0000664000175000017500000000116013701057753021456 0ustar evenevenLBLSIZE=368 FORMAT='REAL' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=16 ORG='BSQ' NL=3 NS=4 NB=1 N1=4 N2=3 N3=1 N4=0 NBB=0 NLB=0 HOST='X86-LINUX' INTFMT='LOW' REALFMT='VAX' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 BINC='1.0' DAT_TIM='Thu Oct 17 16:46:44 2019' @A@AA0B@BPB`BBBBBLBLSIZE=208 IVAL='1.0' LINC='10.0' MODULO='0.0' SINC='1.0' USER='vos' PROPERTY='GEOTIFF' NITF_NROWS='3' NITF_NCOLS='4' TASK='TASK' USER='even' DAT_TIM='Fri Oct 18 00:50:46 2019' gdalautotest-3.1.2/gdrivers/data/fakemff.b00000664000175000017500000000000113701057753017252 0ustar evenevengdalautotest-3.1.2/gdrivers/data/lut.xml0000664000175000017500000000115613701060021016750 0ustar eveneven 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 gdalautotest-3.1.2/gdrivers/data/invalid_bag_vlen_bag_version.bag0000664000175000017500000001414013701057753023755 0ustar evenevenHDF  ``TREEHEAPXBAG_root@(xTREEHEAPXPSNOD HhHh X Bag Version`GCOL1.6.2gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/0000775000175000017500000000000013701060023020214 5ustar evenevengdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2-prefixes.xml0000664000175000017500000000440413701060022024337 0ustar eveneven 1e24 yotta Y 1e21 zetta Z 1e18 exa E 1e15 peta P 1e12 tera T 1e9 giga G 1e6 mega M 1e3 kilo k 100 hecto h 10 deka da .1 deci d .01 centi c 1e-3 milli m 1e-6 micro µ μ u 1e-9 nano n 1e-12 pico p 1e-15 femto f 1e-18 atto a 1e-21 zepto z 1e-24 yocto y gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2-accepted.xml0000664000175000017500000001552213701060022024265 0ustar eveneven 60 s minute min 60 min hour h hr 24 h day d 3.141592653589793238462643383279 pi π (pi/180) rad arc_degree ° angular_degree degree arcdeg °/60 arc_minute ' angular_minute arcminute arcmin '/60 arc_second " angular_second arcsecond arcsec dm^3 liter L litre l 1000 kg metric_ton t tonne 1.60217733e-19 J electronvolt eV electron_volt 1.6605402e-27 kg unified_atomic_mass_unit u atomic_mass_unit atomicmassunit amu 1.495979e11 m astronomical_unit ua 1852 m nautical_mile nautical_mile/hour international_knot knot_international knot 1e-10 m angstrom ångström Å dam^2 are a 100 are hectare 100 fm^2 barn b 1000 hPa bar cm/s^2 gal 3.7e10 Bq curie Ci 2.58e-4 C/kg roentgen R cSv rem gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2-derived.xml0000664000175000017500000000751313701060022024140 0ustar eveneven radian rad rad^2 steradian sr 1/s hertz Hz 1e-3 kg gram g m.kg/s^2 newton N N/m^2 pascal Pa N.m joule J J/s watt W s.A coulomb C W/A volt V C/V farad F V/A ohm Ω A/V siemens S V.s weber Wb Wb/m^2 tesla T Wb/A henry H K @ 273.15 degree_Celsius degrees_Celsius °C cd.sr lumen lm lm/m^2 lux lx mol/s katal kat 1/s becquerel Bq J/kg gray Gy J/kg sievert Sv gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2.xml0000664000175000017500000000100513701060023022507 0ustar eveneven udunits2-prefixes.xml udunits2-base.xml udunits2-derived.xml udunits2-accepted.xml udunits2-common.xml gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2-base.xml0000664000175000017500000000567213701060023023435 0ustar eveneven meter m metre kilogram kg second s ampere A kelvin K mole mol candela cd gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/area-type-table.xml0000664000175000017500000001360513701060023023717 0ustar eveneven Area Type Table 3 8 July 2015 Program for Climate Model Diagnosis and Intercomparison webmaster@pcmdi.llnl.gov A plant that utilizes the C3 carbon fixation pathway as the sole mechanism to bind CO2 before photosynthesis reactions take place. All trees are C3 type. Grasses and crops can be C3 or C4. A plant that utilizes the C4 carbon fixation pathway in which the CO2 is first bound to a compound containing four carbon atoms before photosynthesis reactions take place. All trees are C3 type. Grasses and crops can be C3 or C4. The definition of "crops" is model dependent, for example, some models may include fruit trees as crops. An area_type of "dust_aerosol" indicates that dust aerosol is present at some level in the atmospheric column above an area on the surface of the Earth. An area_type of "fire" indicates that biomass fire, either flaming, smouldering, or both, is present. All ice floating on water including lake-ice, sea-ice, ice-shelves and icebergs. Floating ice excluding ice-shelves and icebergs. Pastures are assumed to be anthropogenic in origin. A primary forest is a naturally regenerated forest of native species, where there are no clearly visible indications of human activities and the ecological processes are not significantly disturbed. Reference: 'Global Forest Resources Assessment: Terms and Definitions', Forestry Department of Food and Agriculture Organization (FAO) of the United Nations, Rome 2010, www.fao.org/forestry/14241-0d7b74f45b0d2cfef31599cc17e4c28cd.pdf. Deciduous trees lose their leaves seasonally, for example, during winter in high latitudes or following seasonal variations in rainfall. A primary forest is a naturally regenerated forest of native species, where there are no clearly visible indications of human activities and the ecological processes are not significantly disturbed. Reference: 'Global Forest Resources Assessment: Terms and Definitions', Forestry Department of Food and Agriculture Organization (FAO) of the United Nations, Rome 2010, www.fao.org/forestry/14241-0d7b74f45b0d2cfef31599cc17e4c28cd.pdf. Evergreen trees have leaves in all seasons. An area_type of "rain" indicates that falling rain is present at some level in the atmospheric column above an area on the surface of the Earth. A secondary forest is a forest that has been logged and has recovered naturally or artificially. Reference: 'Report of the ad hoc technical expert group on forest biological diversity', United Nations Convention on Biological Diversity, www.cbd.int/forest/definitions.shtml. Deciduous trees lose their leaves seasonally, for example, during winter in high latitudes or following seasonal variations in rainfall. A secondary forest is a forest that has been logged and has recovered naturally or artificially. Reference: 'Report of the ad hoc technical expert group on forest biological diversity', United Nations Convention on Biological Diversity, www.cbd.int/forest/definitions.shtml. Evergreen trees have leaves in all seasons. The distinction between trees and shrubs is model dependent. An area_type of "smoke" indicates that smoke aerosol is present at some level in the atmospheric column above an area on the surface of the Earth. The distinction between trees and shrubs is model dependent. All trees are C3 plant functional type. An area_type of "volcanic_ash_cloud" indicates that volcanic ash aerosol is present at some level in the atmospheric column above an area on the surface of the Earth. gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2-LICENCE0000664000175000017500000000335113701057752022775 0ustar evenevenCopyright 2011 University Corporation for Atmospheric Research. All rights reserved. Access and use of this software shall impose the following obligations and understandings on the user. The user is granted the right, without any fee or cost, to use, copy, modify, alter, enhance and distribute this software, and any derivative works thereof, and its supporting documentation for any purpose whatsoever, provided that this entire notice appears in all copies of the software, derivative works and supporting documentation. Further, UCAR requests that the user credit UCAR/Unidata in any publications that result from the use of this software or in any product that includes this software, although this is not an obligation. The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse or promote any products or commercial entity unless specific written permission is obtained from UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with any support, consulting, training or assistance of any kind with regard to the use, operation and performance of this software nor to provide the user with any updates, revisions, new versions or "bug fixes." THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "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 UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. gdalautotest-3.1.2/gdrivers/data/netcdf_cf_xml/udunits2-common.xml0000664000175000017500000014620313701060023024007 0ustar eveneven s sec A amp K °K degree_kelvin degrees_kelvin degree_K degrees_K degreeK degreesK deg_K degs_K degK degsK cd candle mole einstein Hz baud Bd bps degree_Celsius celsius degree_C degrees_C degreeC degreesC deg_C degs_C degC degsC knot kt kts 6.02214179e23/mol avogadro_constant 0.01 percent % 0.9 arc_degree grade 2 pi rad circle cycle turn revolution rotation arc_degree degree_north degrees_north degree_N degrees_N degreeN degreesN degree_east degrees_east degree_E degrees_E degreeE degreesE degree_true degrees_true degree_T degrees_T degreeT degreesT -1 degree_east degree_west degrees_west degree_W degrees_W degreeW degreesW 2.916667e-2 kg assay_ton 2.834952e-2 kg avoirdupois_ounce 4.5359237e-1 kg avoirdupois_pound pound lb 2e-4 kg carat 6.479891e-5 kg grain gr 5.080235e1 kg long_hundredweight 1.555174e-3 kg pennyweight 4.535924e1 kg short_hundredweight 14.59390 kg slug 3.110348e-2 kg troy_ounce apothecary_ounce 3.732417e-1 kg troy_pound apothecary_pound 20 grain scruple 60 grain apdram 480 grain apounce 5760 grain appound 94 pound bag 2000 pound short_ton ton 2240 pound long_ton 1e-15 m fermi 9.46073e15 m light_year 1e-6 m micron 2.54e-5 m mil 3.085678e16 m parsec 3.514598e-4 m printers_point 2.011684e1 m chain 12 printers_point printers_pica pica nautical_mile nmile (1200/3937) m US_survey_foot US_survey_feet 3 US_survey_feet US_survey_yard 5280 US_survey_feet US_survey_mile US_statute_mile 16.5 US_survey_feet rod pole perch 660 US_survey_feet furlong 6 US_survey_feet fathom 2.54 cm international_inch inch in 12 international_inches international_foot international_feet foot feet ft 3 international_feet international_yard yard yd 5280 international_feet international_mile mile mi inch/72 big_point inch/3 barleycorn 191.835 foot arpentlin (2.69e20/avogadro_constant)/m2 dobson DU rotation/second rotation_per_second rotations_per_second rps cps rotation/minute rpm 1.111111e-7 kg/m denier 1e-6 kg/m tex 5.72135e-11 kg/(Pa.s.m^2) perm_0C perms_0C 5.74525e-11 kg/(Pa.s.m^2) perm_23C perms_23C 5.067075e-10 m^2 circular_mil 9.869233e-13 m^2 darcy 160 rod^2 acre 1.233489e3 m^3 acre_foot acre_feet 2.359737e-3 m^3 board_foot board_feet 3.523907e-2 m^3 bushel bu bushel/4 peck pk 4.546090e-3 m^3 Canadian_liquid_gallon 4.404884e-3 m^3 US_dry_gallon cm^3 cc 1 m^3 stere 2.831685 m^3 register_ton US_dry_gallon/4 US_dry_quart dry_quart US_dry_gallon/8 US_dry_pint dry_pint 3.785412e-3 m^3 US_liquid_gallon liquid_gallon gallon 42 US_liquid_gallon barrel bbl barrel/4 firkin US_liquid_gallon/4 US_liquid_quart liquid_quart quart US_liquid_gallon/8 US_liquid_pint liquid_pint pint pt US_liquid_gallon/16 US_liquid_cup liquid_cup cup US_liquid_gallon/32 US_liquid_gill liquid_gill gill US_liquid_gallon/128 US_fluid_ounce US_liquid_ounce fluid_ounce liquid_ounce oz floz US_fluid_ounce/2 tablespoon Tbl Tbsp tbsp Tblsp tblsp US_fluid_ounce/8 fldr US_fluid_ounce/16 dram dr tablespoon/3 teaspoon tsp 4.546090e-3 m^3 UK_liquid_gallon UK_liquid_gallon/4 UK_liquid_quart UK_liquid_gallon/8 UK_liquid_pint UK_liquid_gallon/16 UK_liquid_cup UK_liquid_gallon/32 UK_liquid_gill UK_liquid_gallon/160 UK_fluid_ounce UK_liquid_ounce lg(re (1e-6 m)^3) BZ 1e-8 s shake 8.616409e4 s sidereal_day 3.590170e3 s sidereal_hour 5.983617e1 s sidereal_minute 0.9972696 s sidereal_second 3.155815e7 s sidereal_year 3.15569259747e7 s tropical_year year yr 29.530589 day lunar_month 365 day common_year 366 day leap_year 365.25 day Julian_year 365.2425 day Gregorian_year 27.321661 day sidereal_month 27.321582 day tropical_month 14 day fortnight 7 day week 0.01 s jiffy 1e9 year eon year/12 month 1e6 m^3/s sverdrup 9.806650 m/s^2 standard_free_fall standard_free_fall gravity gravity 1000 kg/m^3 conventional_water water H2O h2o gravity 999.972 kg/m^3 water_4C waters_4C water_39F waters_39F gravity 999.001 kg/m^3 water_60F waters_60F gravity 13595.10 kg/m^3 mercury_0C mercuries_0C mercury_32F mercuries_32F conventional_mercury conventional_mercuries Hg gravity 13556.8 kg/m^3 mercury_60F mercuries_60F standard_free_fall force 1e-5 N dyne 9.806650e-3 N pond 9.806650 N force_kilogram kilogram_force kilograms_force kgf 2.780139e-1 N force_ounce ounce_force ounces_force ozf 4.4482216152605 N force_pound pound_force pounds_force lbf 1.382550e-1 N poundal gram force gram_force grams_force force_gram gf 2000 force_pound force_ton ton_force tons_force 1000 lbf kip 1.01325e5 Pa standard_atmosphere atmosphere atm 1 kg gravity/cm2 technical_atmosphere at cm H2O cm_H2O cmH2O inch water_39F inch_H2O_39F inches_H2O_39F inch water_60F inch_H2O_60F inches_H2O_60F foot water foot_water feet_water foot_H2O feet_H2O footH2O feetH2O ftH2O fth2o cm Hg cm_Hg cmHg mm mercury_0C millimeter_Hg_0C millimeters_Hg_0C inch mercury_32F inch_Hg_32F inches_Hg_32F inch mercury_60F inch_Hg_60F inches_Hg_60F mm Hg millimeter_Hg millimeters_Hg torr mm_Hg mm_hg mmHg mmhg inch Hg inch_Hg inches_Hg in_Hg inHg 1 pound gravity/in^2 psi kip/in^2 ksi 0.1 N/m^2 barie barye lg(re 20e-6 Pa) B_SPL 1e-1 Pa.s poise 1e-4 m^2/s stokes St 10/(Pa.s) rhe 1e-7 J erg 1.05505585262e3 J IT_Btu IT_Btus Btu Btus 1.05506e8 J EC_therm 4.184000 J thermochemical_calorie 4.1868 J IT_calorie calorie cal 4.184 MJ/kg TNT 4.184e9 J ton_TNT tons_TNT 1.054804e8 J US_therm therm thm watt.hour watthour 1e9 eV bev V.A voltampere VA 9.80950e3 W boiler_horsepower 7.456999e2 W shaft_horsepower horsepower hp 7.35499e2 W metric_horsepower 7.460000e2 W electric_horsepower 7.46043e2 W water_horsepower 7.4570e2 W UK_horsepower 12000 Btu/hr refrigeration_ton ton_of_refrigeration tons_of_refrigeration lg(re 1 W) BW lg(re 1 mW) Bm 1.55e-1 K.m^2/W clo 10 A abampere 7.957747e-1 A gilbert 3.335640e-10 A statampere 10 A biot 1e9 F abfarad 1e-9 H abhenry 1e9 S abmho 1e-9 ohm abohm 1e-8 V abvolt 1.602176487e-19 C e 9.64957e4 C chemical_faraday 9.65219e4 C physical_faraday 9.648531e4 C C12_faraday faraday 1e-9 T gamma 1e-4 T gauss 1e-8 Wb maxwell 7.957747e1 A/m oersted Oe 3.335640e-10 C statcoulomb 1.112650e-12 F statfarad 8.987554e11 H stathenry 1.112650e-12 S statmho 8.987554e11 ohm statohm 2.997925e2 V statvolt 1.256637e-7 Wb unit_pole lg(re 1 V) BV lg(re 0.775 V) Bv lg(re 1e-6 V) BµV K/1.8 °R degree_rankine degrees_rankine degreeR degreesR degree_R degrees_R degR degsR deg_R degs_R °R @ 459.67 °F fahrenheit degree_fahrenheit degrees_fahrenheit degreeF degreesF degree_F degrees_F degF degsF deg_F degs_F 1.076391e-1 lx footcandle 3.426259 cd/m^2 footlambert (1e4/pi) cd/m^2 lambert 1e4 cd/m^2 stilb sb 1e4 lm/m^2 phot ph 1 cd/m^2 nit nt 4.184000e4 J/m^2 langley cd/(pi m^2) blondel apostilb 100/m kayser gravity geopotential dynamic gp 2056 hours work_year work_year/12 work_month 1e-6 m^2 s^-1 K kg^-1 potential_vorticity_unit PVU 1 count gdalautotest-3.1.2/gdrivers/data/nc_lonwrap.nc0000664000175000017500000000141013701057753020121 0ustar evenevenCDF  longitudelatitude  valid_minA!test_btesttestval valid_range_i ConventionsCF-1.5  longitude  long_name longitudeunits degrees_east latitude  long_namelatitudeunits degrees_north Band1  _FillValue _Unsignedtrue valid_range_b valid_range_s valid_range_i valid_range_d?qE@oq, valid_range_f=7C< valid_minA! C?@A AHApN4#QRDJNOgdalautotest-3.1.2/gdrivers/data/pds/0000775000175000017500000000000013701057753016227 5ustar evenevengdalautotest-3.1.2/gdrivers/data/pds/map_000_038_truncated.lbl0000664000175000017500000001433013701057752022521 0ustar evenevenPDS_VERSION_ID = PDS3 /*** FILE CHARACTERISTICS DATA ELEMENTS ***/ FILE_NAME = "MAP_000_038_TRUNCATED.LBL" RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 2880 FILE_RECORDS = 6251 DATA_FORMAT = FITS /*** DATA OBJECT POINTERS IDENTIFICATION DATA ELEMENTS ***/ ^HEADER = ("MAP_000_038_TRUNCATED.FIT",1) ^IMAGE = ("MAP_000_038_TRUNCATED.FIT",2) ^RPC_SCIENCE_USAGE_DESC = "RPC_USER_GUIDE.PDF" ^RPC_ILLUMINATION_MAP_DESC = "ILLUMINATION_UG.PDF" /*** IDENTIFICATION DATA ELEMENTS ***/ DATA_SET_ID = "RO-C-NAVCAM-5-ILLUM-V1.0" DATA_SET_NAME = "ROSETTA-ORBITER 67P NAVCAM 5 ILLUM V1.0" PRODUCT_TYPE = "RDR" PRODUCT_ID = "MAP_000_038" PRODUCT_CREATION_TIME = 2018-08-29T14:32:01.000 SOURCE_PRODUCT_ID = "ASCII_000_038" PROCESSING_LEVEL_ID = "5" MISSION_NAME = "INTERNATIONAL ROSETTA MISSION" MISSION_ID = "ROSETTA" MISSION_PHASE_NAME = "N/A" TARGET_NAME = "67P/CHURYUMOV-GERASIMENKO 1 (1969 R1)" TARGET_TYPE = "COMET" OBSERVATION_TYPE = "NAVIGATION IMAGE" PRODUCER_ID = "IMPERIAL COLLEGE LON" PRODUCER_FULL_NAME = "ARNAUD BETH" PRODUCER_INSTITUTION_NAME = "IMPERIAL COLLEGE LONDON" /*** INSTRUMENT RELATED PARAMETERS ***/ INSTRUMENT_HOST_NAME = "ROSETTA-ORBITER" INSTRUMENT_HOST_ID = "RO" INSTRUMENT_NAME = "NAVIGATION CAMERA" INSTRUMENT_ID = "NAVCAM" INSTRUMENT_TYPE = "CCD CAMERA" INSTRUMENT_MODE_ID = "N/A" /*** OBSERVATION AND EXPOSURE DATA ELEMENTS ***/ NOTE = "NO NOTE TO ADD" SUB_SOLAR_LONGITUDE = 000.0 SUB_SOLAR_LATITUDE = +52.0 START_TIME = "N/A" STOP_TIME = "N/A" /*** HEADER AND IMAGE DESCRIPTION ***/ OBJECT = HEADER BYTES = 2880 HEADER_TYPE = FITS INTERCHANGE_FORMAT = ASCII RECORDS = 1 DESCRIPTION = " FITS header for Rosetta-NavCam uncalibrated images (CODMAC Data Level 2)." END_OBJECT = HEADER OBJECT = IMAGE /*** LINES = 3000 ***/ LINES = 2 LINE_SAMPLES = 6000 SAMPLE_TYPE = UNSIGNED_INTEGER SAMPLE_BITS = 8 SAMPLE_DISPLAY_DIRECTION = "RIGHT" LINE_DISPLAY_DIRECTION = "UP" END_OBJECT = IMAGE END gdalautotest-3.1.2/gdrivers/data/pds/map_000_038_truncated.fit0000664000175000017500000003504013701057752022533 0ustar evenevenSIMPLE = T / file does conform to FITS standard BITPIX = 8 / number of bits per data pixel NAXIS = 2 / number of data axes NAXIS1 = 6000 / length of data axis 1 NAXIS2 = 3000 / length of data axis 2 EXTEND = T / FITS dataset may contain extensions AUTHOR = 'ARNAUD BETH' ORIGIN = 'IMPERIAL COLLEGE LONDON' INSTRUME= 'NAVCAM ' OBJECT = '67P/CHURYUMOV-GERASIMENKO' COMMENT FITS (Flexible Image Transport System) format is defined in 'AstronomyCOMMENT and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H END gdalautotest-3.1.2/gdrivers/data/pds/hsp00017ba0_01_ra218s_trr3_truncated.img0000664000175000017500000015300013701057752025113 0ustar evenevenGGGqgl_azQrlH8 ¢/6%@.d&O[ •,©  i*ir16%L>>rn#;8o1$?[."? v Ôs5ңE=|9 ©ſ V]“Qq?܊ UjK qt?GGGGG3hZ:_DοM3˟i+'l Z׺O Fe@0l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AOWA?UA+TAp}TAdXAWARARIA(PA^QA^NA!HAUHA@ADAGA<[DAFADA1@AOAA6@ADAwy=A|9A&:A:A18AHEA`=AA˰?A>A:BAx8A);A~j:AA=;A>AZIAJAQMAzLAUGA?AEA}DACA >A>FAoGAgADGAPHAz4CAP2EA~sJA4GAc>A}DA$?AcAACA!AAGA61FA DAS\DAGAKJAmBA==AKAA'bAA@A:A7A3A,7A;AL8A$8A8Af3AgK5A5AD6AJu1AO-Ar,A/AE+AD1A0A00AW0Ap)Az-Aor#A'&A+AGGGGG[IAHA\UJA}JA\DJAFABAAA>4IAȍAl?AAACABASAALAAEAtJFA,M?A0=A@A AA1@A0:A@ SOLAR_DISTANCE = 249195696.719143 SOLAR_LONGITUDE = 73.592714 SHUTTER_MODE_ID = "OPEN" LIGHT_SOURCE_NAME = "NONE" MRO:CALIBRATION_LAMP_STATUS = "OFF" MRO:CALIBRATION_LAMP_LEVEL = "N/A" PIXEL_AVERAGING_WIDTH = 10 MRO:INSTRUMENT_POINTING_MODE = "FIXED POINTING" SCAN_MODE_ID = "N/A" MRO:FRAME_RATE = 15.00 MRO:EXPOSURE_PARAMETER = 425 SAMPLING_MODE_ID = "MULTISPEC" COMPRESSION_TYPE = "NONE" MRO:WAVELENGTH_FILTER = "2" MRO:WAVELENGTH_FILE_NAME = "CDR450924300802_WA0300020S_2.IMG" MRO:PIXEL_PROC_FILE_NAME = "CDR6_2_0835294537_PP_S_0.TAB" MRO:INV_LOOKUP_TABLE_FILE_NAME = "CDR6_1_0000000000_LI_J_0.TAB" MRO:ATMO_CORRECTION_FLAG = "OFF" MRO:THERMAL_CORRECTION_MODE = "OFF" MRO:PHOTOCLIN_CORRECTION_FLAG = "OFF" MRO:SPATIAL_RESAMPLING_FLAG = "OFF" MRO:SPATIAL_RESAMPLING_FILE = "N/A" MRO:SPATIAL_RESCALING_FLAG = "OFF" MRO:SPATIAL_RESCALING_FILE = "N/A" MRO:SPECTRAL_RESAMPLING_FLAG = "OFF" MRO:SPECTRAL_RESAMPLING_FILE = "N/A" /* Hyperspectral Data Filter Control Parameters */ MRO:HDF_SOFTWARE_NAME = "N/A" MRO:HDF_SOFTWARE_VERSION_ID = "N/A" MRO:IF_MIN_VALUE = "N/A" MRO:IF_MAX_VALUE = "N/A" MRO:TRACE_MIN_VALUE = "N/A" MRO:TRACE_MAX_VALUE = "N/A" MRO:REFZ_MEDIAN_BOX_WIDTH = "N/A" MRO:REFZ_SMOOTH_BOX_WIDTH = "N/A" MRO:FRAM_STAT_MEDIAN_BOX_WIDTH = "N/A" MRO:FRAM_STAT_MIN_DEVIATION = "N/A" MRO:FRAM_STAT_MEDIAN_CONF_LVL = "N/A" MRO:FRAM_STAT_IQR_CONF_LVL = "N/A" MRO:RSC_REF_XY_MEDIAN_WIDTH = "N/A" MRO:RSC_REF_XY_SMOOTH_WIDTH = "N/A" MRO:RSC_REF_YZ_MEDIAN_WIDTH = "N/A" MRO:RSC_REF_YZ_SMOOTH_WIDTH = "N/A" MRO:RSC_RATIO_XY_MEDIAN_WIDTH = "N/A" MRO:RSC_RATIO_XY_SMOOTH_WIDTH = "N/A" MRO:RSC_RES_XY_PLY_ORDER = "N/A" MRO:RSC_RES_XY_PLY_EXTND_WIDTH = "N/A" MRO:LOG_XFORM_NEG_CLIP_VALUE = "N/A" MRO:IKF_NUM_REGIONS = "N/A" MRO:IKF_START_CHANNEL = ("N/A", "N/A") MRO:IKF_STOP_CHANNEL = ("N/A", "N/A") MRO:IKF_CONFIDENCE_LEVEL = ("N/A", "N/A") MRO:IKF_WEIGHTING_STDDEV = ("N/A", "N/A") MRO:IKF_KERNEL_SIZE_X = ("N/A", "N/A") MRO:IKF_KERNEL_SIZE_Y = ("N/A", "N/A") MRO:IKF_KERNEL_SIZE_Z = ("N/A", "N/A") MRO:IKF_MODEL_ORDER_X = ("N/A", "N/A") MRO:IKF_MODEL_ORDER_Y = ("N/A", "N/A") MRO:IKF_MODEL_ORDER_Z = ("N/A", "N/A") /* This Targeted RDR label describes two data files. The first file */ /* contains the first two objects and the second file contains the */ /* third: */ /* 1. A multiple-band image file containing calibrated RDR data, */ /* in units of radiance, */ /* 2. A binary table of selected image row numbers from detector, */ /* 3. A table of ancillary and housekeeping data converted to */ /* engineering units. */ OBJECT = FILE ^IMAGE = "HSP00017BA0_01_RA218S_TRR3_TRUNCATED.IMG" RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 256 FILE_RECORDS = 288901 OBJECT = IMAGE LINES = 2 LINE_SAMPLES = 64 SAMPLE_TYPE = PC_REAL SAMPLE_BITS = 32 UNIT = "W / (m**2 micrometer sr)" BANDS = 107 BAND_STORAGE_TYPE = LINE_INTERLEAVED END_OBJECT = IMAGE END_OBJECT = FILE END gdalautotest-3.1.2/gdrivers/data/n0o0y867.0fp0000664000175000017500000000000013701057753017250 0ustar evenevengdalautotest-3.1.2/gdrivers/data/dimap/0000775000175000017500000000000013701057751016531 5ustar evenevengdalautotest-3.1.2/gdrivers/data/dimap/IMAGERY.TIF0000664000175000017500000000075613701057751020202 0ustar eveneven rgbsmall.tif 1 gdalautotest-3.1.2/gdrivers/data/dimap/METADATA.DIM0000664000175000017500000002160713701057751020252 0ustar eveneven DIMAP SPOTSCENE_1A SCENE 4 048-261/5 01/11/29 10:30:38 1 M COPYRIGHT CNES 29 11 2001 10 H 30 MN 38 S JPEG JPEG +4.3641728203e+00 +4.4208225461e+01 1 1 +5.1937875606e+00 +4.4105080365e+01 1 6000 +5.0277057238e+00 +4.3579069851e+01 6000 6000 +4.2053233519e+00 +4.3681541962e+01 6000 1 +4.7036149861e+00 +4.3893572795e+01 3000 3000 +9.7694940432e+00 EPSG EPSG:4326 GEOGRAPHIC WGS 84 POINT 1 +4.3641728203e+00 +4.4208225461e+01 +0.0000000000e+00 +1.0000000000e+00 +1.0000000000e+00 +5.1937875606e+00 +4.4105080365e+01 +0.0000000000e+00 +6.0000000000e+03 +1.0000000000e+00 +5.0277057238e+00 +4.3579069851e+01 +0.0000000000e+00 +6.0000000000e+03 +6.0000000000e+03 +4.2053233519e+00 +4.3681541962e+01 +0.0000000000e+00 +1.0000000000e+00 +6.0000000000e+03 +4.3640990841e+00 -2.6643496819e-05 +1.4239355527e-04 -2.0095394654e-10 +2.6521261246e-11 -6.8487943015e-10 +4.4208332836e+01 -8.7782663961e-05 -1.7179784977e-05 +1.8702677440e-11 -2.2187479777e-12 -2.3351749623e-12 +4.8824220362e+05 -1.0726214269e+04 -2.4451593111e+03 +3.4503454414e+01 -4.6856166478e+00 -4.6341833825e+01 +8.1566060357e+04 -3.9051709585e+03 +1.6206098799e+04 -2.5694309455e+02 +3.3634380699e+01 +2.1990286174e+02 1 1 1 255 SATURATED 1 1 1 0 NODATA 0 0 0 131299101 SCENE1A Spot SYSTEM SCENE level 1A SPOT_IMAGE 2005-05-12T17:24:33.000000 CAP_T 07-01 SLS_TOULOUSE SCENE 40482610111291030381M SCENE HRVIR1 M 048261 5 2001-11-29 10:30:43 SPOT 4 HRVIR 1 M 1A -1.9977978043e+01 +1.6508350907e+02 +2.3545636152e+01 298 DPCM DT Y FULL 33 6000 6000 1 8 UNSIGNED I NONE BAND_COMPOSITE GEOTIFF NONE 1A RAW SYSTEM 1 0 255 3000 1 PAN equivalent radiance (W.m-2.Sr-1.um-1) 0.000000 4.357726 2001-10-01T00:00:00.000000 gdalautotest-3.1.2/gdrivers/data/int.img0000664000175000017500000016346613701057753016751 0ustar evenevenEHFA_HEADER_TAG@RtH rootroot"AH RRLayer_132110984Eimg_Layer"A@@ Ehfa_Layer10984Ehfa_Layer"A0 I n0Statistics10984Esta_Statisticsrs"A@@Py@ @@ "QF@Z<StatisticsParametersEimg_StatisticsParameters830"A ,<Descriptor_TableersEdsc_TableticsParameters830@"AVZb#Bin_Function#eersEdsc_BinFunctionrameters830@"A@@n!ZHistogramion#eersEdsc_Columntionrameters830@"A|ZZHistogramParametersEimg_StatisticsParameters830@"Aة  @@*h_ss_4_132110985Eimg_Layer_SubSample@"A3333Ehfa_Layer10985Ehfa_Layer@"A{2601:ldata,}RasterDMS,.|4RasterDMS10985Edms_State@"A) _@"AfPHRRDNamesList984Eimg_RRDNamesList@"AXIMAGINE 2X2 Resamplingwint.img(:Layer_1:_ss_4_)D}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,.{4096:ldata,}RasterDMS,.R IMGFormatInfo84ImgFormatInfo831@"A(fV P RasterDMS10984Edms_State"Af  B)q[9';4J U bH'o Z jp{t~yx~N "A I sMap_Info10984Eprj_MapInfo"A Transverse Mercator A+[A A1[A* Y@Y@B metersV  Projection10984Eprj_ProParameters"A  Transverse Mercator x#?jk@AcA GRS 1980@TXA?XA@k{?˯MXAI 0XDatumtion10984Eprj_Datumameters"A8GDA94H&1<0Gz @T㥛#@~b>&>9*>2iĵ>Eu?85444443333322221111100000/////.....-----66543217654321076543210987654321987654321:98765432:98765432;:9876543<;:9876543=<;:987654=<;:987654>=<;:98765>=<;:98765?>=<;:9876@?>=<;:9876@?>=<;:987A@?>=<;:987BA@?>=<;:98CBA@?>=<;:9CBA@?>=<;:9DCBA@?>=<;:DCBA@?>=<;:FEDCBA@?>=<;FEDCBA@?>=<;GFEDCBA@?>=<GFEDCBA@?>=<HGFEDCBA@?>=IHGFEDCBA@?>=IHGFEDCBA@?>JIHGFEDCBA@?>JIHGFEDCBA@?KJIHGFEDCBA@?LKJIHGFEDCBA@MLKJIHGFEDCBA@MLKJIHGFEDCBANMLKJIHGFEDCBANMLKJIHGFEDCBPONMLKJIHGFEDCPONMLKJIHGFEDCQPONMLKJIHGFEDQPONMLKJIHGFEDRQPONMLKJIHGFEE<5.& /.-/.-,+*)(0/.-,+*)('&%$0/.-,+*)('&%$#"! 10/.-,+*)('&%$#"! 210/.-,+*)('&%$#"! 210/.-,+*)('&%$#"! 3210/.-,+*)('&%$#"!  3210/.-,+*)('&%$#"!  43210/.-,+*)('&%$#"!  43210/.-,+*)('&%$#"!  543210/.-,+*)('&%$#"!  543210/.-,+*)('&%$#"!  6543210/.-,+*)('&%$#"!  6543210/.-,+*)('&%$#"!  76543210/.-,+*)('&%$#"!  76543210/.-,+*)('&%$#"!  876543210/.-,+*)('&%$#"!  876543210/.-,+*)('&%$#"!  9876543210/.-,+*)('&%$#"!  9876543210/.-,+*)('&%$#"!  :9876543210/.-,+*)('&%$#"!  :9876543210/.-,+*)('&%$#"!  ;:9876543210/.-,+*)('&%$#"!  ;:9876543210/.-,+*)('&%$#"! <;:9876543210/.-,+*)('&%$#"! =<;:9876543210/.-,+*)('&%$#"! =<;:9876543210/.-,+*)('&%$#"! >=<;:9876543210/.-,+*)('&%$#"! >=<;:9876543210/.-,+*)('&%$#"! ?>=<;:9876543210/.-,+*)('&%$#"! ?>=<;:9876543210/.-,+*)('&%$#"! @?>=<;:9876543210/.-,+*)('&%$#"! @?>=<;:9876543210/.-,+*)('&%$#"! A@?>=<;:9876543210/.-,+*)('&%$#"! A@?>=<;:9876543210/.-,+*)('&%$#"! BA@?>=<;:9876543210/.-,+*)('&%$#"! BA@?>=<;:9876543210/.-,+*)('&%$#"! CBA@?>=<;:9876543210/.-,+*)('&%$#"! CBA@?>=<;:9876543210/.-,+*)('&%$#"! DCBA@?>=<;:9876543210/.-,+*)('&%$#"! !/H:3,%  ߟޟݟ ߟޟݟܠ ߟޟݠ ߟޟݠ ߟޠ ߟޠ ߠ ߠ                J@97777777777777777777777۟ڟٟ؟ܟ۟ڟٟ؟ןܟ۟ڟٟ؟ݟܟ۟ڟٟ؟ݟܟ۟ڟٟޟݟܟ۟ڟٟߟޟݟܟ۟ڟߟޟݟܟ۟ڟߟޟݟܟ۟ߟޟݟܟ۟ߟޟݟܟߟޟݟܟߟޟݟߟޟݟߟޟߟޟߟߟ ,,,,+++++******))))((((((''''&&&&&%%%%%$$$$$$####"""""!!!!!     SRQPONMLKJIHGFESRQPONMLKJIHGFTSRQPONMLKJIHGFUTSRQPONMLKJIHGVUTSRQPONMLKJIHGVUTSRQPONMLKJIHWVUTSRQPONMLKJIHWVUTSRQPONMLKJIXWVUTSRQPONMLKJIYXWVUTSRQPONMLKJZYXWVUTSRQPONMLKJZYXWVUTSRQPONMLK[ZYXWVUTSRQPONMLK[ZYXWVUTSRQPONML\[ZYXWVUTSRQPONML]\[ZYXWVUTSRQPONM^]\[ZYXWVUTSRQPON^]\[ZYXWVUTSRQPON_^]\[ZYXWVUTSRQPO`_^]\[ZYXWVUTSRQPO`_^]\[ZYXWVUTSRQPa`_^]\[ZYXWVUTSRQPa`_^]\[ZYXWVUTSRQba`_^]\[ZYXWVUTSRQba`_^]\[ZYXWVUTSRdcba`_^]\[ZYXWVUTSRdcba`_^]\[ZYXWVUTSedcba`_^]\[ZYXWVUTSedcba`_^]\[ZYXWVUTfedcba`_^]\[ZYXWVUTgfedcba`_^]\[ZYXWVUhgfedcba`_^]\[ZYXWVUhgfedcba`_^]\[ZYXWVihgfedcba`_^]\[ZYXWVjihgfedcba`_^]\[ZYXWjihgfedcba`_^]\[ZYXWkjihgfedcba`_^]\[ZYXkjihgfedcba`_^]\[ZYlkjihgfedcba`_^]\[ZYmlkjihgfedcba`_^]\[Znmlkjihgfedcba`_^]\[Znmlkjihgfedcba`_^]\[onmlkjihgfedcba`_^]\[onmlkjihgfedcba`_^]\ponmlkjihgfedcba`_^]\qponmlkjihgfedcba`_^]rqponmlkjihgfedcba`_^]rqponmlkjihgfedcba`_^srqponmlkjihgfedcba`_^tsrqponmlkjihgfedcba`_tsrqponmlkjihgfedcba`_utsrqponmlkjihgfedcba`utsrqponmlkjihgfedcba`vutsrqponmlkjihgfedcbawvutsrqponmlkjihgfedcbaxwvutsrqponmlkjihgfedcbxwvutsrqponmlkjihgfedcyxwvutsrqponmlkjihgfedcyxwvutsrqponmlkjihgfed{zyxwvutsrqponmlkjihgfed{zyxwvutsrqponmlkjihgfe|{zyxwvutsrqponmlkjihgfe|{zyxwvutsrqponmlkjihgf}|{zyxwvutsrqponmlkjihgf --,++*)(('&%%$##"!  .-,,+**)(''&%$$#""!  ..-,,+*))('&&%$$#"!!  /..-,++*)(('&&%$##"!  0/.--,+**)(('&%%$#""!  0//.-,,+*))(''&%$$#""!  10/..-,++*))('&&%$##"!!  100/.--,++*)(('&%%$##"!  210//.--,+**)(''&%%$#""!  2110/..-,,+*))(''&%$$#"!!  32100/..-,++*)(('&&%$##"!!  322100/.--,+**)(('&%%$#""!  432210//.-,,+**)(''&%$$#""!  4432110/..-,,+*))('&&%$$#"!!  54332100/.--,++*)(('&&%$##"!  55432210//.--,+**)(''&%%$#""!  654432110//.-,,+*))(''&%$$#"!!  6654332110/..-,++*))('&&%$##"!!  76554322100/.--,++*)(('&%%$##"!  77654432210//.-,,+**)(''&%$$#""!  876654432110/..-,,+*))('&&%$$#"!!  8876654332100/..-,++*)(('&&%$##"!  98776554322100/.--,+**)(('&%%$#""!  99877654432110//.-,,+**)(''&%$$#""!  :99876654332110/..-,++*))('&&%$##"!!  ;:98876554332100/.--,++*)(('&%%$##"!  ;::9877655432210//.--,+**)(''&%%$#""!  <;:99876654432110//.-,,+*))(''&%$$#"!! <;;:98876654332100/..-,++*)(('&&%$##"!! =<;::98876554322100/.--,+**)(('&%%$#""! =<<;::9877654432210//.-,,+**)(''&%$$#""! >=<;;:99876654432110/..-,,+*))('&&%$$#"!! >==<;;:98876554332100/.--,++*)(('&&%$##"! ?>==<;::9877655432210//.--,+**)(''&%%$#""! ??>=<<;:99877654432110//.-,,+*))(''&%$$#"!! @?>>=<;;:99876654332110/..-,++*))('&&%$##"!! @@?>==<;::98876554332100/.--,++*)(('&%%$##"! A@??>=<<;::9877654432210//.-,,+**)(''&%%$#""! AA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! BA@@?>>=<;;:98876654332100/..-,++*)(('&&%$##"! BBA@??>==<;::98876554322100/.--,+**)(('&%%$#""! CBAA@??>=<<;:99877654432110//.-,,+**)(''&%$$#""! CCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$$#"!! DCCBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! DDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! EDDCBAA@?>>=<<;:99876654432110//.-,,+*))(''&%$$#"!! FEDCCBA@@?>>=<;;:98876654332100/..-,++*))('&&%$##"!! FEEDCBBA@@?>==<;::98876554322100/.--,+**)(('&%%$#""! GFEDDCBBA@??>=<<;::9877654432210//.-,,+**)(''&%$$#""! GFFEDCCBAA@?>>=<;;:99876654432110/..-,,+*))('&&%$$#"!! HGFEEDCCBA@@?>==<;;:98876554332100/..-,++*)(('&&%$##"! HGGFEEDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! IHGGFEDDCBAA@??>=<<;:99877654432110//.-,,+*))(''&%$$#"!! IHHGFFEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$##"!! JIHHGFEEDCBBA@@?>==<;::98876554332100/.--,++*)(('&%%$##"! JJIHGGFEDDCBBA@??>=<<;::9877654432210//.-,,+**)(''&%%$#""! KJIIHGFFEDDCBAA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! KKJIHHGFFEDCCBA@@?>>=<;;:98876654332100/..-,++*)(('&&%$##"! LKJJIHGGFEEDCBBA@??>==<;::98876554322100/.--,+**)(('&%%$#""! LLKJIIHGGFEDDCBAA@??>=<<;:99877654432210//.-,,+**)(''&%$$#""! MLKKJIIHGFFEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$$#"!! MMLKKJIHHGFEEDCCBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! NMLLKJJIHGGFEDDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! NNMLLKJIIHGFFEDDCBAA@?>>=<<;:99877654432110//.-,,+*))(''&%$$#"!! .-,++*)(('&&%$##"!  .--,+**)(('&%%$#""!  /.-,,+**)(''&%$$#""!  /..-,++*))('&&%$##"!!  0/.--,++*)(('&%%$##"!  0//.--,+**)(''&%%$#""!  10//.-,,+*))(''&%$$#"!!  100/..-,++*))('&&%$##"!!  2100/.--,+**)(('&%%$#""!  2210//.-,,+**)(''&%$$#""!  32110/..-,,+*))('&&%$$#"!!  332100/..-,++*)(('&&%$##"!  432210//.--,+**)(''&%%$#""!  4432110//.-,,+*))(''&%$$#"!!  54332110/..-,++*))('&&%$##"!!  554332100/.--,++*)(('&%%$##"!  654432210//.--,+**)(''&%%$#""!  6654432110/..-,,+*))('&&%$$#"!!  76654332100/..-,++*)(('&&%$##"!  876554322100/.--,+**)(('&%%$#""!  877654432210//.-,,+**)(''&%$$#""!  9876654332110/..-,++*))('&&%$$#"!!  98876554332100/.--,++*)(('&%%$##"!  :9877655432210//.--,+**)(''&%%$#""!  :99877654432110//.-,,+*))(''&%$$#"!!  ;:98876654332110/..-,++*))('&&%$##"!!  ;::98876554322100/.--,++*)(('&%%$##"!  <;::9877654432210//.-,,+**)(''&%$$#""! <<;:99876654432110/..-,,+*))('&&%$$#"!! =<;;:98876654332100/..-,++*)(('&&%$##"! ==<;::98776554322100/.--,+**)(('&%%$#""! >=<<;:99877654432110//.-,,+*))(''&%$$#""! >>=<;;:99876654332110/..-,++*))('&&%$##"!! ?>==<;;:98876554332100/.--,++*)(('&%%$##"! ??>=<<;::9877655432210//.--,+**)(''&%%$#""! @?>>=<<;:99876654432110//.-,,+*))(''&%$$#"!! @@?>>=<;;:98876654332100/..-,++*)(('&&%$##"!! A@@?>==<;::98876554322100/.--,+**)(('&%%$#""! AA@??>=<<;::9877654432210//.-,,+**)(''&%$$#""! BAA@?>>=<;;:99876654432110/..-,,+*))('&&%$$#"!! CBA@@?>==<;;:98876554332100/.--,++*)(('&&%$##"! CBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! DCBAA@??>=<<;:99877654432110//.-,,+*))(''&%$$#"!! DCCBA@@?>>=<;;:99876654332110/..-,++*))('&&%$##"!! EDCBBA@@?>==<;::98876554332100/.--,++*)(('&%%$##"! EDDCBBA@??>=<<;::9877654432210//.-,,+**)(''&%%$#""! FEDDCBAA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! FEEDCCBA@@?>>=<;;:98876654332100/..-,++*)(('&&%$##"! GFEEDCBBA@??>==<;::98876554322100/.--,+**)(('&%%$#""! GGFEDDCBAA@??>=<<;:99877654432210//.-,,+**)(''&%$$#""! HGFFEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$$#"!! HHGFEEDCCBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! IHGGFEDDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! IIHGFFEDDCBAA@?>>=<<;:99877654432110//.-,,+*))(''&%$$#"!! JIHHGFFEDCCBA@@?>>=<;;:98876654332110/..-,++*))('&&%$##"!! JJIHHGFEEDCBBA@@?>==<;::98876554322100/.--,++*)(('&%%$##"! KJIIHGGFEDDCBBA@??>=<<;::9877654432210//.-,,+**)(''&%$$#""! KKJIIHGFFEDCCBAA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! LKKJIHHGFEEDCCBA@@?>==<;;:98876654332100/..-,++*)(('&&%$##"! MLKJJIHGGFEEDCBBA@??>==<;::98776554322100/.--,+**)(('&%%$#""! MLLKJIIHGGFEDDCBAA@??>=<<;:99877654432110//.-,,+**)(''&%$$#""! NMLKKJIHHGFFEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$$#"!! NMMLKJJIHHGFEEDCBBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! ONMLLKJJIHGGFEDDCBBA@??>=<<;::9877655432210//.--,+**)(''&%%$#""!7777777777777777777777777777777777777777777777777777777777777777                      ! ! "! "! #"! #"! $#"! $#"! %$#"! %$#"! &%$#"! '&%$#"!'&%$#"!('&%$#"('&%$#")('&%$#)('&%$#*)('&%$*)('&%$;IMM~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[Z~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[Z~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[~}|{zyxwvutsrqponmlkjihgfedcba`_^]\~}|{zyxwvutsrqponmlkjihgfedcba`_^]\~}|{zyxwvutsrqponmlkjihgfedcba`_^]~}|{zyxwvutsrqponmlkjihgfedcba`_^~}|{zyxwvutsrqponmlkjihgfedcba`_^MYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210ES77777777M+*)('&%+*)('&%,+*)('&,+*)('-,+*)('-,+*)(.-,+*)(.-,+*)/.-,+*) .-,,+**)(''&%$$#""!  ..-,,+*))('&&%$$#"!!  /..-,++*)(('&&%$##"!  0/.--,+**)(('&%%$#""!  0//.-,,+*))(''&%$$#""!  10/..-,++*))('&&%$##"!!  100/.--,++*)(('&%%$##"!  210//.--,+**)(''&%%$#""!  2110//.-,,+*))(''&%$$#"!!  32100/..-,++*)(('&&%$##"!!  322100/.--,+**)(('&%%$#""!  432210//.-,,+**)(''&%$$#""!  4432110/..-,,+*))('&&%$$#"!!  54332100/.--,++*)(('&&%$##"!  55432210//.--,+**)(''&%%$#""!  654432110//.-,,+*))(''&%$$#"!!  6654332110/..-,++*))('&&%$##"!!  76554322100/.--,++*)(('&%%$##"!  77654432210//.-,,+**)(''&%%$#""!  876654432110/..-,,+*))('&&%$$#"!!  8876654332100/..-,++*)(('&&%$##"!  98876554322100/.--,+**)(('&%%$#""!  99877654432110//.-,,+**)(''&%$$#""!  :99876654332110/..-,++*))('&&%$$#"!!  ;:98876554332100/.--,++*)(('&%%$##"!  ;::9877655432210//.--,+**)(''&%%$#""!  <;:99877654432110//.-,,+*))(''&%$$#"!! <;;:98876654332100/..-,++*))('&&%$##"!! =<;::98876554322100/.--,+**)(('&%%$#""! =<<;::9877654432210//.-,,+**)(''&%$$#""! >=<<;:99876654432110/..-,,+*))('&&%$$#"!! >==<;;:98876554332100/..-,++*)(('&&%$##"! ?>==<;::9877655432210//.--,+**)(('&%%$#""! ??>=<<;:99877654432110//.-,,+*))(''&%$$#"!! @?>>=<;;:99876654332110/..-,++*))('&&%$##"!! @@?>==<;::98876554332100/.--,++*)(('&%%$##"! A@??>=<<;::9877654432210//.--,+**)(''&%%$#""! AA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! BA@@?>>=<;;:98876654332100/..-,++*)(('&&%$##"! BBA@@?>==<;::98876554322100/.--,+**)(('&%%$#""! CBAA@??>=<<;:99877654432210//.-,,+**)(''&%$$#""! CCBAA@?>>=<;;:99876654332110/..-,,+*))('&&%$$#"!! DCCBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! EDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! EDDCBAA@??>=<<;:99877654432110//.-,,+*))(''&%$$#"!! FEDCCBA@@?>>=<;;:98876654332110/..-,++*))('&&%$##"!! FEEDCBBA@@?>==<;::98876554322100/.--,++*)(('&%%$##"! GFEDDCBBA@??>=<<;::9877654432210//.-,,+**)(''&%$$#""! GFFEDDCBAA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! HGFEEDCCBA@@?>==<;;:98876654332100/..-,++*)(('&&%$##"! HGGFEEDCBBA@??>==<;::98776554322100/.--,+**)(('&%%$#""! IHGGFEDDCBAA@??>=<<;:99877654432110//.-,,+**)(''&%$$#""! IIHGFFEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$##"!! JIHHGFEEDCCBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! JJIHGGFEDDCBBA@??>=<<;::9877655432210//.--,+**)(''&%%$#""! KJIIHGFFEDDCBAA@?>>=<<;:99876654432110//.-,,+*))(''&%$$#"!! KKJIHHGFFEDCCBA@@?>>=<;;:98876654332100/..-,++*)(('&&%$##"!! LKJJIHHGFEEDCBBA@@?>==<;::98876554322100/.--,+**)(('&%%$#""! LLKJIIHGGFEDDCBAA@??>=<<;::9877654432210//.-,,+**)(''&%$$#""! MLKKJIIHGFFEDCCBAA@?>>=<;;:99876654432110/..-,,+*))('&&%$$#"!! MMLKKJIHHGFEEDCCBA@@?>==<;;:98876554332100/..-,++*)(('&&%$##"! NMMLKJJIHGGFEEDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! NNMLLKJIIHGFFEDDCBAA@??>=<<;:99877654432110//.-,,+*))(''&%$$#"!!ONNMLKKJIHHGFFEDCCBA@@?>>=<;;:99876654332110/..-,++*))('&&%$##"!7777777777777777777777777777777777777777777777777777777777777777 ^k~}|{zyxwvutsrqponmlkjihg~}|{zyxwvutsrqponmlkjihg~}|{zyxwvutsrqponmlkjih~}|{zyxwvutsrqponmlkjih~}|{zyxwvutsrqponmlkji~}|{zyxwvutsrqponmlkji~}|{zyxwvutsrqponmlkj~}|{zyxwvutsrqponmlkj~}|{zyxwvutsrqponmlk~}|{zyxwvutsrqponmlk~}|{zyxwvutsrqponml~}|{zyxwvutsrqponml~}|{zyxwvutsrqponm~}|{zyxwvutsrqpon~}|{zyxwvutsrqpon~}|{zyxwvutsrqpo~}|{zyxwvutsrqpo~}|{zyxwvutsrqp~}|{zyxwvutsrqp~}|{zyxwvutsrq~}|{zyxwvutsrq~}|{zyxwvutsr~}|{zyxwvutsr~}|{zyxwvuts~}|{zyxwvuts~}|{zyxwvut~}|{zyxwvut~}|{zyxwvu~}|{zyxwvu~}|{zyxwv~}|{zyxwv~}|{zyxw~}|{zyxw~}|{zyx~}|{zy~}|{zy~}|{z~}|{z~}|{~}|{~}|~}|~}~}~~8 .--,+**)(''&%%$#""!  /.-,,+*))(''&%$$#"!!  /..-,++*)(('&&%$##"!!  0/.--,+**)(('&%%$#""!  0//.-,,+**)(''&%$$#""!  10/..-,,+*))('&&%$$#"!!  100/.--,++*)(('&&%$##"!  210//.--,+**)(''&%%$#""!  2110//.-,,+*))(''&%$$#"!!  32110/..-,++*))('&&%$##"!!  322100/.--,++*)(('&%%$##"!  432210//.-,,+**)(''&%%$#""!  4432110/..-,,+*))('&&%$$#"!!  54332100/..-,++*)(('&&%$##"!  554322100/.--,+**)(('&%%$#""!  654432110//.-,,+**)(''&%$$#""!  6654332110/..-,++*))('&&%$$#"!!  76554332100/.--,++*)(('&%%$##"!  77655432210//.--,+**)(''&%%$#""!  876654432110//.-,,+*))(''&%$$#"!!  8876654332100/..-,++*))('&&%$##"!!  98876554322100/.--,+**)(('&%%$##"!  :9877654432210//.-,,+**)(''&%$$#""!  :99876654432110/..-,,+*))('&&%$$#"!!  ;:98876554332100/..-,++*)(('&&%$##"!  ;::9877655432210//.--,+**)(('&%%$#""!  <;:99877654432110//.-,,+*))(''&%$$#"!! <;;:99876654332110/..-,++*))('&&%$##"!! =<;::98876554332100/.--,++*)(('&%%$##"! =<<;::9877654432210//.--,+**)(''&%%$#""! >=<<;:99876654432110/..-,,+*))(''&%$$#"!! >>=<;;:98876654332100/..-,++*)(('&&%$##"! ?>==<;::98876554322100/.--,+**)(('&%%$#""! ??>=<<;:99877654432210//.-,,+**)(''&%$$#""! @?>>=<;;:99876654332110/..-,,+*))('&&%$$#"!! @@?>==<;;:98876554332100/.--,++*)(('&%%$##"! A@??>==<;::9877655432210//.--,+**)(''&%%$#""! AA@?>>=<<;:99877654432110//.-,,+*))(''&%$$#"!! BA@@?>>=<;;:98876654332100/..-,++*))('&&%$##"!! BBA@@?>==<;::98876554322100/.--,+**)(('&%%$##"! CBBA@??>=<<;::9877654432210//.-,,+**)(''&%$$#""! CCBAA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! DCCBA@@?>==<;;:98876554332100/..-,++*)(('&&%$##"! EDCBBA@??>==<;::9877655432210//.--,+**)(('&%%$#""! EDDCBAA@??>=<<;:99877654432110//.-,,+*))(''&%$$#""! FEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$##"!! FEEDCBBA@@?>==<;;:98876554332100/.--,++*)(('&%%$##"! GFEDDCBBA@??>=<<;::9877654432210//.--,+**)(''&%%$#""! GFFEDDCBAA@?>>=<<;:99876654432110/..-,,+*))(''&%$$#"!! HGFFEDCCBA@@?>>=<;;:98876654332100/..-,++*)(('&&%$##"!! HGGFEEDCBBA@??>==<;::98876554322100/.--,+**)(('&%%$#""! IHGGFEDDCBAA@??>=<<;:99877654432210//.-,,+**)(''&%$$#""! IIHGFFEDCCBAA@?>>=<;;:99876654332110/..-,,+*))('&&%$$#"!! JIHHGFEEDCCBA@@?>==<;;:98876554332100/.--,++*)(('&&%$##"! JJIHGGFEDDCBBA@??>==<;::9877655432210//.--,+**)(''&%%$#""! KJIIHGFFEDDCBAA@?>>=<<;:99877654432110//.-,,+*))(''&%$$#"!! KKJIHHGFFEDCCBA@@?>>=<;;:98876654332110/..-,++*))('&&%$##"!! LKJJIHHGFEEDCBBA@@?>==<;::98876554322100/.--,++*)(('&%%$##"! LLKJIIHGGFEDDCBBA@??>=<<;::9877654432210//.-,,+**)(''&%%$#""! MLKKJIIHGFFEDCCBAA@?>>=<<;:99876654432110/..-,,+*))('&&%$$#"!! MMLKKJIHHGFEEDCCBA@@?>==<;;:98876654332100/..-,++*)(('&&%$##"! NMMLKJJIHGGFEEDCBBA@??>==<;::98776554322100/.--,+**)(('&%%$#""! NNMLLKJIIHGGFEDDCBAA@??>=<<;:99877654432110//.-,,+**)(''&%$$#""!ONNMLKKJIHHGFFEDCCBAA@?>>=<;;:99876654332110/..-,++*))('&&%$$#"!?@"@$@,@0@3@6@:@;@?@@@C@D@E@F@H@I@K@L@N@O@P@@Q@Q@R@S@T@T@@U@V@W@W@X@Y@Z@Z@@[@[@]@]@^@^@`@@`@`@`@`a@a@@b@`b@b@c@c@d@`d@d@d@e@e@e@f@f@@g@g@h@h@h@@i@@i@i@j@j@j@@k@`k@l@ l@l@l@@m@m@`n@`n@@n@n@n@n@n@@n@n@n@n@n@n@@o@n@n@ n@`n@m@m@@m@ m@m@l@`l@l@k@k@@k@ k@j@j@@j@ j@i@i@@i@@i@h@@h@h@ h@g@g@g@g@g@f@`f@e@e@e@ e@d@d@`d@d@c@c@@c@@c@c@b@`b@@b@a@a@@a@a@a@`@``@`@@_@@_@^@@^@]@\@\@\@[@Z@[@Z@@Y@@Y@X@W@W@W@V@U@U@T@@T@T@@S@R@R@R@Q@@P@P@P@N@M@L@K@J@I@H@F@F@E@D@C@A@A@@@?@<@9@7@7@3@1@1@(@(@$@@@@?0leName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,.{1:lversion,1:LfreeList,1:LrootEntryPtr,1:sentryHeaderLength,1:LdictionaryPtr,}Ehfa_File,{1:Lnext,1:Lprev,1:Lparent,1:Lchild,1:Ldata,1:ldataSize,64:cname,32:ctype,1:tmodTime,}Ehfa_Entry,{16:clabel,1:LheaderPtr,}Ehfa_HeaderTag,{1:LfreeList,1:lfreeSize,}Ehfa_FreeListNode,{1:lsize,1:Lptr,}Ehfa_Data,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer,{1:lwidth,1:lheight,1:e3:thematic,athematic,fft of real-valued data,layerType,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,1:lblockWidth,1:lblockHeight,}Eimg_Layer_SubSample,{1:e2:raster,vector,type,1:LdictionaryPtr,}Ehfa_Layer,{1:sfileCode,1:Loffset,1:lsize,1:e2:false,true,logvalid,1:e2:no compression,ESRI GRID compression,compressionType,}Edms_VirtualBlockInfo,{1:lmin,1:lmax,}Edms_FreeIDList,{1:lnumvirtualblocks,1:lnumobjectsperblock,1:lnextobjectnum,1:e2:no compression,RLC compression,compressionType,0:poEdms_VirtualBlockInfo,blockinfo,0:poEdms_FreeIDList,freelist,1:tmodTime,}Edms_State,{0:pcstring,}Emif_String,{1:oEmif_String,algorithm,0:poEmif_String,nameList,}Eimg_RRDNamesList,{1:oEmif_String,projection,1:oEmif_String,units,}Eimg_MapInformation,{1:oEmif_String,dependent,}Eimg_DependentFile,{1:oEmif_String,ImageLayerName,}Eimg_DependentLayerName,{1:lnumrows,1:lnumcolumns,1:e13:EGDA_TYPE_U1,EGDA_TYPE_U2,EGDA_TYPE_U4,EGDA_TYPE_U8,EGDA_TYPE_S8,EGDA_TYPE_U16,EGDA_TYPE_S16,EGDA_TYPE_U32,EGDA_TYPE_S32,EGDA_TYPE_F32,EGDA_TYPE_F64,EGDA_TYPE_C64,EGDA_TYPE_C128,datatype,1:e4:EGDA_SCALAR_OBJECT,EGDA_TABLE_OBJECT,EGDA_MATRIX_OBJECT,EGDA_RASTER_OBJECT,objecttype,}Egda_BaseData,{1:*bvalueBD,}Eimg_NonInitializedValue,{1:oEmif_String,fileName,2:LlayerStackValidFlagsOffset,2:LlayerStackDataOffset,1:LlayerStackCount,1:LlayerStackIndex,}ImgExternalRaster,{1:*bvalidFlags,}ImgValidFlags,{1:llayerStackCount,1:lwidth,1:lheight,1:lblockWidth,1:lblockHeight,1:e13:u1,u2,u4,u8,s8,u16,s16,u32,s32,f32,f64,c64,c128,pixelType,}ImgExternalLayerStackHeader,{1:LspaceUsedForRasterData,}ImgFormatInfo831,{1:bcovariance,}Esta_Covariance,{1:dx,1:dy,}Eprj_Coordinate,{1:dwidth,1:dheight,}Eprj_Size,{0:pcproName,1:*oEprj_Coordinate,upperLeftCenter,1:*oEprj_Coordinate,lowerRightCenter,1:*oEprj_Size,pixelSize,0:pcunits,}Eprj_MapInfo,{0:pcdatumname,1:e4:EPRJ_DATUM_PARAMETRIC,EPRJ_DATUM_GRID,EPRJ_DATUM_REGRESSION,EPRJ_DATUM_SURFACE,type,0:pdparams,0:pcgridname,}Eprj_Datum,{0:pcsphereName,1:da,1:db,1:deSquared,1:dradius,}Eprj_Spheroid,{1:e2:EPRJ_INTERNAL,EPRJ_EXTERNAL,proType,1:lproNumber,0:pcproExeName,0:pcproName,1:lproZone,0:pdproParams,1:*oEprj_Spheroid,proSpheroid,}Eprj_ProParameters,{1:lnumrows,}Edsc_Table,{1:lnumRows,1:LcolumnDataPtr,1:e4:integer,real,complex,string,dataType,1:lmaxNumChars,}Edsc_Column,{1:dminimum,1:dmaximum,1:dmean,1:dmedian,1:dmode,1:dstddev,}Esta_Statistics,{1:lnumBins,1:e4:direct,linear,logarithmic,explicit,binFunctionType,1:dminLimit,1:dmaxLimit,1:*bbinLimits,}Edsc_BinFunction,{0:poEmif_String,LayerNames,1:*bExcludedValues,1:oEmif_String,AOIname,1:lSkipFactorX,1:lSkipFactorY,1:*oEdsc_BinFunction,BinFunction,}Eimg_StatisticsParameters830,. !5>1A{52/-ay];9n:742/,)&# `]j<8}1Y u<9741.+(%" [XY=5T el+Ϡ><9630-*'$! \,T6l2*e GA>;852/,)&$! tOP?qFC@=:741.+(&#  ޟܟAHEB?<9630-+(%" ޟYJGDA>;8520-*'$! -sLIFC@=:752/,)&#  L@NKHEB?<:741.+(%" SPMJGDB?<9630-*'$"  UROLIGDA>;852/,)'$! -WTQNLIFC@=:741.,)&#  /YVSQNKHEB?<9631.+(%" Q|[XVSPMJGDA>;8630-*'$! `][XUROLIFC@=;852/,)&#  Ơb`]ZWTQNKHEB@=:741.+(%#  $da_\YVSPMJGEB?<9630-*(%" 3fca^[XUROLJGDA>;852/-*'$! U5heb`]ZWTQOLIFC@=:742/,)&#  jgeb_\YVTQNKHEB?<9741.+(%" oljgda^[YVSPMJGDA><9630-*'$! zqolifc`^[XUROLIFCA>;852/,)&$! 5|tqnkhec`]ZWTQNKHFC@=:741.+)&#  Y0vspmjgeb_\YVSPMKHEB?<9630.+(%" !xurolifda^[XURPMJGDA>;8530-*'$! }zwtqnkhfc`]ZWUROLIFC@=:852/,)&#  |yvspmkheb_\ZWTQNKHEB?=:741.+(%"  8~{xurpmjgda_\YVSPMJGDB?<9630-*'%" \O}zwurolifda^[XUROLIGDA>;852/,*'$! |ywtqnkifc`]ZWTQNLIFC@=:741/,)&#  Ơ~|yvspmjheb_\YVSQNKHEB?<9641.+(%" 頋}{xuroljgda^[XVSPMJGDA>;9630-*'$!;Ѡ|zwtqnlifc`]ZXUROLIFC@>;852/,)&#!^~{yvsqnkheb`]ZWTQNKHEC@=:741.+(&# ݠ}{xuspmjgeb_\YVSPMJHEB?<9630-+(%" }zxuroligda^[XUROMJGDA>;8520-*'$!R|ywtqnlifc`]ZWTQOLIFC@=:752/,)&$!>~{xvspnkheb_\YVTQNKHEB?<:741.+(%# _͠}zwuromjgda^[YVSPMJGDA?<9630-*'%"Z|yvtqolifc`^[XUROLIFDA>;852/,)'$!~{yvtqnkhec`]ZWTQNKHFC@=:741.,)&#۠}zxuspmjheb_\YVSPMKHEB?<9631.+(%B(}zwtromjgda^[XURPMJGDA>;8630-*'`|yvsrolifc`]ZWUROLIFC@=;852/,)gdalautotest-3.1.2/gdrivers/data/two_images_jp2.ntf0000664000175000017500000000430313701057753021063 0ustar evenevenNITF02.1003BF01GDAL 20021216151629 U 00000000000 000000002243000420002000439000000040000044300000005410000000000000000000000000IMMissing 20021216151629 U 0Unknown 0000002000000020INTMONO VIS 08R 0NC1M N 00B00010001002000200800100000000000001.0 0000000000IMMissing 20021216151629 U 0Unknown 0000002000000020INTMONO VIS 08R 0C810821M N 00B00010001002000200800100000000000001.0 0000000000OQ)d#Creator: JasPer Version 1.900.1R \@@HHPHHPHHPHHPHHP t8 B Two }vG=a/ EFY+d᠀=,\ .[iʪB-۶2?ѣjL=Q;ta 9𡼳k2QV^johq!E7o |!(bo4Z5K˷IvǫCjI + VTV|S \I H<|>9mWIâG bcѿ`\宭bVyXq9R[4HF)?:8+0)&'&%$$#$-%D(b /k;O9). #'7,Q*P0W3]&Q% ':/C;:O?H]IVkYexepxxtRn(=Z 5)!(/2, 9:0'$&&!!"!#"#%,7*:2*;/"4&'< :R Sp^|Wx 0R' !!)Q$>grH ;c- 1ihƾݡd.nYyZ{_y(Zr^{d fVkax!qwnc~Yt*YoVgxʦoJgB\C[cWmT9y)l!gg{b}9iz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HDT" 's,;[OasWO,n2|pPH)KB s-WQ=_%Ka ")\g8KOI=r2LK"0yW" h}1 + [a`Kg\zvuDT0V*X"!6Ug%P(MUjr7L=^N22D3'& f`XQc0$nkkB^{P%>tqn`o:Hb0v@[al0d:~bN2fueVLEK3ZNK8*^FWyFu-B%gF',@dd.LUd5(rp`bgkL>DQ{|`:F2Q\[QzN9*6HRHG}(8n|%d=_4 yS&IL }a!z334\t4s#.XiWAIMq;o QtZ?~pK\km]au2nX|MKX TIBl?=w N%c 7v%:TV#Arpe\S6e+TktDG2: V 9:PO=t BS!J;>=L1[z0&"9/ tjB>l a3Aph6dO{)|hv-N?Ay\8jY%bh\u`I'fq]>_7}*\%q D!IUL vgg+U_ w Rv ) }C*knreJils: >NW<59S NbQnnu-R +:wv;64Qmp?! D g 0k0AwR,gdalautotest-3.1.2/gdrivers/data/vicar_float32_bil.vic0000664000175000017500000000112013701057753021422 0ustar evenevenLBLSIZE=368 FORMAT='REAL' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=16 ORG='BIL' NL=3 NS=4 NB=2 N1=4 N2=2 N3=3 N4=0 NBB=0 NLB=0 HOST='X86-64-LINX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 TASK='GEN' USER='vos' ??@ @BBBB0A8A@AHABBBBAAAABBBBLBLSIZE=128 DAT_TIM='Thu Oct 17 16:38:44 2019' IVAL=1.0 SINC=0.5 LINC=10.0 BINC=100.0 MODULO=0.0 gdalautotest-3.1.2/gdrivers/data/rgbsmall.ppm0000664000175000017500000001653113701057753017770 0ustar evenevenP6 50 50 255 PW$xCfs-bw,f6JiMno?l=GcPlRrNpT|Y\"%&jn;y=bt"cv$c{%b(RwRzZ!l1X{^'NpRvh1^'Z ^f-t:s4`v#YsRn^|$Z{"TwZ"UzW|SxPr\(W~#_*`+Q} DK"oxC}Eky,at|6]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bl)Ng#q,y5i(BtPK{ @nSz^z1}5y4s2hBC)756532,0 %,#. .gdalautotest-3.1.2/gdrivers/data/frmt09t.cot0000664000175000017500000004515413701057753017466 0ustar eveneven A????  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~T TTnnB ** 0    0    0     E EEFD? 5 ,* ' % !                   $  ' ) ,  .   /  2 45 8 9   ;   = ?A C D C + ,/135  8  78788 7 6 5 4    3    2   1   1    0    /    .     .     -     ,    +    *    )    )    (     '    &    %      $      "     !                                                                                                                                                                                                              !#$$ &&' ((%#"""####$$  $ $%%$!                     '            ! " # $  % '()) )'%     !#%')+- / 13578:<================                          =======gdalautotest-3.1.2/gdrivers/data/byte_tlm_plt.jp20000664000175000017500000000236313701057753020560 0ustar eveneven jP ftypjp2 jp2 Gjp2hihdrcolrres resc''uuidK=KCզII* (  'WN@N@@A̞LA Wh )#NAD27 / UTM zone 11N|jp2cOQ)R33\ HHHPdmy_commentU`l9[ lX' Xϙ [޸ƺ5UWʻp:l 1Ar>zϔPR(![Z.vȁA@N*/ 9X X C,o-tA> [X #X <8|B@ \쵨6-tOyVjv 8:" jf,D(`ҋHy ;!64|4EE tB lJ5TD|B# c8_ ;lXb}ęÄ0xx@  a+c 3NG -N%Y Ҭob>@`DBЏ-o>L:"AQ@f :(:aaA`M ,9ZLƿ6 0ߚ*3 "xRPQҸRѴ0A> (@z)"3k XX ,|gK3Bɜ*r,>! A@IjÂ0gQB"@ 09@:FnxY}R8]gdalautotest-3.1.2/gdrivers/data/fakeiris.dat0000664000175000017500000000120113701057753017722 0ustar evenevengdalautotest-3.1.2/gdrivers/data/case_sensitive.PRJ0000664000175000017500000000215413701057753021024 0ustar evenevenProjection ALBERS Datum NAD83 Zunits NO Units METERS Spheroid GRS1980 Xshift 0.0000000000 Yshift 0.0000000000 Parameters 61 40 0.000 /* 1st standard parallel 68 0 0.000 /* 2nd standard parallel -132 30 0.000 /* central meridian 59 0 0.000 /* latitude of projection's origin 500000.00000 /* false easting (meters) 500000.00000 /* false northing (meters) gdalautotest-3.1.2/gdrivers/data/inconsitant_geojp2_gmljp2.jp2.aux.xml0000664000175000017500000000015013701060023024477 0ustar eveneven LOCAL_CS["PAM"] 100,1,0,300,0,-1 gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/0000775000175000017500000000000013701057753022077 5ustar eveneven././@LongLink0000644000000000000000000000017600000000000011607 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701060024027130 5ustar eveneven././@LongLink0000644000000000000000000000021400000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/MTD_MSIL2A.xmlgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000003473013701060024027141 0ustar eveneven 2018-08-18T09:40:31.024Z 2018-08-18T09:40:31.024Z S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE Level-2A S2MSI2A 02.08 2018-08-18T12:03:45.000000Z Not applicable Not applicable Sentinel-2A INS-NOBS 2018-08-18T09:40:31.024Z 36 DESCENDING SAFE_COMPACT GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B02_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B03_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B04_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B08_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_TCI_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_AOT_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_WVP_10m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B02_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B03_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B04_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B05_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B06_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B07_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B8A_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B11_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B12_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_TCI_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_AOT_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_WVP_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_SCL_20m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B01_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B02_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B03_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B04_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B05_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B06_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B07_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B8A_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B09_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B11_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B12_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_TCI_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_AOT_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_WVP_60m GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_SCL_60m NODATA 0 SATURATED 6 3 2 1 10000 1000.0 1000.0 0.97 1884.69 1959.72 1823.24 1512.06 1424.64 1287.61 1162.08 1041.63 955.32 812.92 367.15 245.59 85.25 SC_NODATA 0 SC_SATURATED_DEFECTIVE 1 SC_DARK_FEATURE_SHADOW 2 SC_CLOUD_SHADOW 3 SC_VEGETATION 4 SC_NOT_VEGETATED 5 SC_WATER 6 SC_UNCLASSIFIED 7 SC_CLOUD_MEDIUM_PROBA 8 SC_CLOUD_HIGH_PROBA 9 SC_THIN_CIRRUS 10 SC_SNOW_ICE 11 57.7 22.6 57.6 24.5 56.7 24.4 56.7 22.6 57.7 22.6 POINT 1 EPSG GEOGRAPHIC 54.4 0.0 0 PASSED PASSED PASSED PASSED PASSED 0.0 0.0 1.5 1.5 14.0 3.5 18.7 5.7 24.1 15.3 14.9 0.4 0.0 0.0 0.0 ././@LongLink0000644000000000000000000000020600000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701057753027147 5ustar eveneven././@LongLink0000644000000000000000000000025100000000000011601 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701060024027130 5ustar eveneven././@LongLink0000644000000000000000000000026200000000000011603 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701057753027147 5ustar eveneven././@LongLink0000644000000000000000000000026700000000000011610 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701057753027147 5ustar eveneven././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B02_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B11_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B04_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_WVP_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B07_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B8A_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_TCI_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B05_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B06_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B12_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_SCL_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_B03_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R20m/T34VFJ_20180818T094031_AOT_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000026700000000000011610 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701057753027147 5ustar eveneven././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_TCI_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B03_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B02_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B08_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_B04_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_WVP_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R10m/T34VFJ_20180818T094031_AOT_10m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000026700000000000011610 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701057753027147 5ustar eveneven././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B02_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_AOT_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B04_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_SCL_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B03_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B06_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B8A_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B09_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B07_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B12_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B11_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B05_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_B01_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_WVP_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000033100000000000011600 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/IMG_DATA/R60m/T34VFJ_20180818T094031_TCI_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000026100000000000011602 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/QI_DATA/gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000775000175000017500000000000013701057753027147 5ustar eveneven././@LongLink0000644000000000000000000000030300000000000011577 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/QI_DATA/MSK_CLDPRB_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000030300000000000011577 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/QI_DATA/MSK_SNWPRB_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000030300000000000011577 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/QI_DATA/MSK_CLDPRB_20m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000030300000000000011577 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/QI_DATA/MSK_SNWPRB_60m.jp2gdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000067613701057753027162 0ustar evenevenII* && BCD$E$*S././@LongLink0000644000000000000000000000026300000000000011604 Lustar rootrootgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T34VFJ_20180818T120345.SAFE/GRANULE/L2A_T34VFJ_A016478_20180818T094030/MTD_TL.xmlgdalautotest-3.1.2/gdrivers/data/fake_sentinel2_l2a_MSIL2A/S2A_MSIL2A_20180818T094031_N0208_R036_T340000664000175000017500000000664613701060024027146 0ustar eveneven S2A_OPER_MSI_L1C_TL_MTI__20180818T101348_A016478_T34VFJ_N02.06 S2A_OPER_MSI_L2A_TL_MTI__20180818T120345_A016478_T34VFJ_N02.08 S2A_OPER_MSI_L2A_DS_MTI__20180818T120345_S20180818T094030_N02.08 NOMINAL 2018-08-18T09:40:30.459Z MTI_ 2018-08-18T15:07:55.560Z WGS84 / UTM zone 34N EPSG:32634 10980 10980 5490 5490 1830 1830 600000 6400020 10 -10 600000 6400020 20 -20 600000 6400020 60 -60 54.416476 0 0.000000 0.000000 1.566982 1.521106 14.057219 3.544726 18.739088 5.750781 24.111301 15.382876 14.922300 0.403622 0.0 0.0 0.0 gdalautotest-3.1.2/gdrivers/data/byte.rl2.sql0000664000175000017500000001175613701057753017635 0ustar eveneven-- SQL SQLITE CREATE TABLE spatial_ref_sys(srid INTEGER PRIMARY KEY,auth_name,auth_srid,ref_sys_name,proj4text,srtext); INSERT INTO spatial_ref_sys VALUES(26711,'epsg',26711,'','','PROJCS["",GEOGCS["",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982138982]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["central_meridian",-117],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],UNIT["meter",1],AUTHORITY["EPSG","26711"]]'); CREATE TABLE geometry_columns(f_table_name,f_geometry_column,geometry_type,coord_dimension,srid,spatial_index_enabled); INSERT INTO geometry_columns VALUES('byte_sections','geometry',3,2,26711,1); INSERT INTO geometry_columns VALUES('byte_tiles','geometry',3,2,26711,1); CREATE TABLE raster_coverages(coverage_name PRIMARY KEY,title,abstract,sample_type,pixel_type,num_bands,compression,quality,tile_width,tile_height,horz_resolution,vert_resolution,srid,nodata_pixel,palette,statistics,geo_minx,geo_miny,geo_maxx,geo_maxy,extent_minx,extent_miny,extent_maxx,extent_maxy,strict_resolution,mixed_resolutions,section_paths,section_md5,section_summary,is_queryable,red_band_index,green_band_index,blue_band_index,nir_band_index,enable_auto_ndvi); INSERT INTO raster_coverages VALUES('byte','','','UINT8','GRAYSCALE',1,'DEFLATE',100,512,512,60.0,60.0,26711,X'000301A513010006FF265CF5B8FE23',NULL,NULL,NULL,NULL,NULL,NULL,440720.0,3750120.0,441920.0,3751320.0,1,0,0,0,0,0,NULL,NULL,NULL,NULL,NULL); CREATE TABLE raster_coverages_srid(coverage_name,srid,extent_minx,extent_miny,extent_maxx,extent_maxy); CREATE TABLE byte_levels(pyramid_level INTEGER PRIMARY KEY,x_resolution_1_1,y_resolution_1_1,x_resolution_1_2,y_resolution_1_2,x_resolution_1_4,y_resolution_1_4,x_resolution_1_8,y_resolution_1_8); INSERT INTO byte_levels VALUES(0,60.0,60.0,120.0,120.0,240.0,240.0,480.0,480.0); -- CREATE TABLE byte_sections(section_id INTEGER PRIMARY KEY,section_name,width,height,file_path,md5_checksum,summary,statistics,geometry POLYGON); -- INSERT INTO byte_sections VALUES(1,'byte',20,20,NULL,NULL,NULL,NULL,X'0001576800000000000040E61A4100000000749C4C410000000000F91A4100000000CC9E4C417C0300000001000000050000000000000040E61A4100000000749C4C410000000000F91A4100000000749C4C410000000000F91A4100000000CC9E4C410000000040E61A4100000000CC9E4C410000000040E61A4100000000749C4C41FE'); -- CREATE VIRTUAL TABLE idx_byte_sections_geometry USING rtree(pkid, xmin, xmax, ymin, ymax); -- INSERT INTO idx_byte_sections_geometry SELECT section_id, ST_MinX(geometry), ST_MaxX(geometry), ST_MinY(geometry), ST_MaxY(geometry) FROM byte_sections; CREATE TABLE byte_tiles(tile_id INTEGER PRIMARY KEY,pyramid_level,section_id,geometry POLYGON); INSERT INTO byte_tiles VALUES(1,0,1,X'0001576800000000000040E61A4100000000CC624C410000000040C61C4100000000CC9E4C417C0300000001000000050000000000000040E61A4100000000CC624C410000000040C61C4100000000CC624C410000000040C61C4100000000CC9E4C410000000040E61A4100000000CC9E4C410000000040E61A4100000000CC624C41FE'); CREATE VIRTUAL TABLE idx_byte_tiles_geometry USING rtree(pkid, xmin, xmax, ymin, ymax); INSERT INTO idx_byte_tiles_geometry SELECT tile_id, ST_MinX(geometry), ST_MaxX(geometry), ST_MinY(geometry), ST_MaxY(geometry) FROM byte_tiles; CREATE TABLE byte_tile_data(tile_id INTEGER PRIMARY KEY,tile_data_odd,tile_data_even); INSERT INTO byte_tile_data VALUES(1,X'00FA0122A51301000200020002000100000200720100000000000000000000C8789CEDD7A1B6D4301405D02B5397BA46560E9F8144F21BE01E0EE4C381E4339EC581C3CEB8672B33AE718DA47C00B615B3B7893D6BDD959B9C0F7958C7483DA2965AA2E67EE91F8347F134A6BEF5B2CC75DC5A89357AEA3FCE0EC5619EA7FB7EF9D78854EA9BD7A1469996AF6787E2307FEEB5475FE67D07F4D88FE172EDDFCF0EC5613EF7714DFFBE005B0C4B6ED3B0BF00F6FFE3788ED8EEF3D62EB79CC6F9DA724433FFC7F1526F53B47C4FEFDBEF14BD5F96B7CBA7B34371986FCB7CDD2BC03A4C7B054CB11781DBFCE5EC501CE6575BA25CC7D721D721529F9754C2FC1FC7CBBB74FB59E7B5B439D6DEB7965BD6FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F89FBF6E9F6101C9B6B7A3BF366AF0',X'00DB0122A51301000200020001A3BF366A0000020075010000C8789CEDD7A19AD4301406D02B332E75131939168745227906DE6071EC232C6E70ACC4E2906071BBB2B232E31AD74ACA03605B31E7B844FDDF97E4DE9B87A1E532BD7929538E5B5D4E11D3DB8FC1BDB8F625D6219635ADA9A73AA6D286C7A343B19B5F3D5A4CB5F5320FE73FE7ED2ABC7FFE7A742876736D653BFD61EE6998B70A70BE7DF8919CFFFD788AF132E6D44BDB1A403A2D3D9F42FDBF1F9F237A9D638D36BCFBBDADD7BAAC5F8E0EC56EAE5BFFCFB7C8BD4E9756DBF60528EBA7A343B19BEF739A7A442A63EE91B621A055EFFF8E7C2B637D394D39BD5EFA79C8B7DA627C3E3A14BBF9196D4D11E5354F43FBB791BAF91F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080FFFA0B1A7B5C01C9BC493FB5D0'); CREATE VIRTUAL TABLE SpatialIndex USING VirtualSpatialIndex(); gdalautotest-3.1.2/gdrivers/data/uint16_envi_bigendian.dat0000664000175000017500000000144013701057753022301 0ustar evenevenk{skkk{ssk{ssk{{c{cs{sks{kssksk{{s{s{s{ksksssss{{{kk{s{ksc{skc{sc{{s{s{{kssksc{cck{ss{s{{csc{sskccs{kksks{{k{{c{kcs{{k{{{k{{{k{{ssZkkkkkc{sc{{k{ckksskckk{ccsccs{c{kZkskZc{sss{{sc{kkkscscckssZ{ssZcsZcckcck{cs{Jsc{ck{{k{k{skkkkksckgdalautotest-3.1.2/gdrivers/data/n43_partial_cols.dt00000664000175000017500000000754013701057753021220 0ustar evenevenUHL10800000W0430000N03000300NA U 012101210 DSIU DTED0000000000000000 01A000000000000 PRF89020B000005MSLWGS84 430000.0N0800000.0W430000N0800000W440000N0800000W440000N0790000W430000N0790000W0000000.0030003000121012100 ACCNA NA NA NA 00 gdalautotest-3.1.2/gdrivers/data/test6759.nc0000664000175000017500000000111013701057753017266 0ustar evenevenCDF xy  ConventionsCF-1.5 x  long_namex coordinate of projectionunitsmaxisXy  long_namey coordinate of projectionunitsmaxisY Band1  long_nameGDAL Band Number 1 _FillValue missing_value$$AAAARAR@ARMgdalautotest-3.1.2/gdrivers/data/rgba_rraster.grd0000664000175000017500000000051413701057753020614 0ustar eveneven[georeference] nrows=2 ncols=2 xmin=440720 ymin=3750120 xmax=441920 ymax=3751320 projection=+proj=utm +zone=11 +datum=NAD27 +units=m +no_defs +ellps=clrk66 +nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat [data] datatype=INT1U byteorder=little nbands=4 bandorder=BIL categorical=FALSE [description] layername=red:green:blue:alpha gdalautotest-3.1.2/gdrivers/data/byte_jpeg.mbtiles0000664000175000017500000001000013701057753020761 0ustar evenevenSQLite format 3@  - IgtablemetadatametadataCREATE TABLE metadata (name TEXT, value TEXT)BctabletilestilesCREATE TABLE tiles (zoom_level INTEGER NOT NULL,tile_column INTEGER NOT NULL,tile_row INTEGER NOT NULL,tile_data BLOB NOT NULL,UNIQUE (zoom_level, tile_column, tile_row) ))=indexsqlite_autoindex_tiles_1tiles __2 bJFIFC    $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222", !A1Q#3Bqr ?˧^ڱEk33G7VAj+&я%o__g-qR6A[-"iyrπ .S4gY<~Vh56MZ[&-2ҷbb'O sL[><bw~3h?V YOyf8#y48+W[Ecݿwty:{u2uH˗Ș"   b /K=/ maxzoom11 minzoom11[/bounds-117.642054029474565,33.8916056659438709,-117.629007764826127,33.9024346042703613 formatjpg version1.1#descriptionbyte_jpegtypeoverlaynamebyte_jpeggdalautotest-3.1.2/gdrivers/data/wc_10m_CCCMA_A2a_2020_tmin_9.bil0000664000175000017500000000000213701057753022502 0ustar eveneven gdalautotest-3.1.2/gdrivers/data/envistat.sta0000664000175000017500000000057713701057753020020 0ustar evenevenAMINY[ ]^[]^[b]?@@@@@@??????@@@@@@@@@@@@??????gdalautotest-3.1.2/gdrivers/data/float32.hdr0000664000175000017500000000036513701057753017416 0ustar evenevenBYTEORDER I LAYOUT BIL NROWS 20 NCOLS 20 NBANDS 1 NBITS 32 BANDROWBYTES 80 TOTALROWBYTES 80 PIXELTYPE FLOAT ULXMAP 440750 ULYMAP 3751290 XDIM 60 YDIM 60 gdalautotest-3.1.2/gdrivers/data/pixel_per_line_comma.asc0000664000175000017500000000562313701057753022311 0ustar evenevenncols 15 nrows 12 xllcorner 0,100000E+06 yllcorner 0,650000E+06 cellsize ,500E+02 nodata_value -99999 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,270E+01 ,186E+01 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,614E+01 ,931E+01 ,868E+01 ,200E+02 ,266E+02 ,122E+02 ,313E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,162E+02 ,542E+02 ,944E+02 ,953E+02 ,977E+02 ,833E+02 ,505E+02 ,144E+02 ,209E+01 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,199E+01 ,170E+02 ,784E+02 ,173E+03 ,266E+03 ,332E+03 ,264E+03 ,230E+03 ,120E+03 ,415E+02 ,941E+01 ,801E+00 ,240E+02 ,000E+00 ,410E+01 ,177E+02 ,116E+03 ,303E+03 ,562E+03 ,756E+03 ,759E+03 ,618E+03 ,309E+03 ,171E+03 ,603E+02 ,792E+02 ,254E+03 ,242E+03 ,483E+00 ,678E+01 ,529E+02 ,212E+03 ,585E+03 ,108E+04 ,140E+04 ,128E+04 ,817E+03 ,436E+03 ,219E+03 ,275E+03 ,890E+03 ,145E+04 ,158E+04 ,000E+00 ,307E+01 ,162E+02 ,141E+03 ,435E+03 ,862E+03 ,109E+04 ,889E+03 ,559E+03 ,289E+03 ,296E+03 ,116E+04 ,245E+04 ,332E+04 ,309E+04 ,000E+00 ,000E+00 ,516E+01 ,296E+02 ,128E+03 ,245E+03 ,305E+03 ,223E+03 ,119E+03 ,472E+02 ,517E+03 ,173E+04 ,289E+04 ,345E+04 ,309E+04 ,000E+00 ,000E+00 ,000E+00 ,266E+01 ,107E+02 ,192E+02 ,146E+02 ,182E+02 ,805E+01 ,378E+02 ,442E+03 ,165E+04 ,274E+04 ,280E+04 ,214E+04 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,528E+00 ,000E+00 ,495E+00 ,000E+00 ,706E+01 ,225E+03 ,123E+04 ,210E+04 ,189E+04 ,105E+04 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,844E+02 ,405E+03 ,752E+03 ,430E+03 ,244E+03 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,000E+00 ,577E+02 ,350E+02 ,196E+02 ,503E+01 gdalautotest-3.1.2/gdrivers/data/test_pdf_composition_pdf_content.pdf0000664000175000017500000000300613701057753024751 0ustar eveneven%PDF-1.6 % 6 0 obj 228 endobj 5 0 obj << /BitsPerComponent 8 /ColorSpace /DeviceGray /Filter /FlateDecode /Height 20 /Length 6 0 R /Subtype /Image /Type /XObject /Width 20 >> stream x%!rD1 C# ~td2d%IA*I$vW㠒 ZlCW }@"[ D',jO6׽hA;߷tiǸYr|00H*\UQ2E l u])#bMv;F|tTTyw8]QlY˸~ˀNo:1xݪr 2pm[i5ٽ~4?> xO endstream endobj 4 0 obj << /XObject << /Image10 5 0 R >> >> endobj 7 0 obj << /BBox [ 0 0 20 20 ] /Group << /S /Transparency /Type /Group >> /Length 8 0 R /Resources 4 0 R /Subtype /Form /Type /XObject >> stream q 20 0 0 20 0 0 cm /Image10 Do Q endstream endobj 8 0 obj 33 endobj 9 0 obj << /BM /Normal /Type /ExtGState /ca 1 >> endobj 3 0 obj << /Contents 10 0 R /Group << /CS /DeviceRGB /S /Transparency /Type /Group >> /MediaBox [ 0 0 20 20 ] /Parent 1 0 R /Resources 11 0 R /Type /Page /UserUnit 1 >> endobj 10 0 obj << /Length 12 0 R >> stream q /GS9 gs /Form7 Do Q endstream endobj 12 0 obj 22 endobj 11 0 obj << /ExtGState << /GS9 9 0 R >> /XObject << /Form7 7 0 R >> >> endobj 1 0 obj << /Count 1 /Kids [ 3 0 R ] /Type /Pages >> endobj 2 0 obj << /Pages 1 0 R /Type /Catalog >> endobj xref 0 13 0000000000 65535 f 0000001108 00000 n 0000001167 00000 n 0000000756 00000 n 0000000433 00000 n 0000000034 00000 n 0000000015 00000 n 0000000484 00000 n 0000000679 00000 n 0000000700 00000 n 0000000932 00000 n 0000001030 00000 n 0000001008 00000 n trailer << /Root 2 0 R /Size 13 >> startxref 1216 %%EOF gdalautotest-3.1.2/gdrivers/data/aea.dat0000664000175000017500000000242613701057753016665 0ustar evenevenk{skkk{skksc{cJsRssk{{c{{sskZckkc{k{{sc{ss{s{֜sŜŌֵέ֭֭޵Ŝέ極ޭsνŜcksks{s{ksZsssscs{{s{Žc֥kkccJֽŭ挽Υֽs攜νεcRZBRRBJBRcJR{kZR{ZJBBJkkcBkcBkJ{{R:JZZscRRkJBZ:RR)JB:J{BRBBcJZZRJkksZ{Μk{csk{c{kc{csk{ssk{{c{c{sssckkskcZssk{cs{ssssk{ssk{kcsk{s{Ŕεޭޥ޽ΥŽ֥޵ťŜccsks{{kkέ{ssk{{޵Δs֥ޥŽs{{{{k{ss{ŵ֜Δ攭ν樂֭޽ޭ{cΔ{ZBJJRJRBZ1scBksZZRRJcJkZk:kRkBZJ{Z1ZZ:cRZJZJR:JJRJBRBJJ:BcBcJcc:J1RsZk{ckRJksssskkksZcs{sks{kssksk{kZ{ckcsZcsksZ{c{{kk{{{ks{{{{{Žέ֭ΔŵޥֽνŭŔssΔތ{{Ž{sscZ{ssRΌc{c{{ޭֵ֭֌{Υޥkkssk{{kŭֽŜŔ{έŽ{kֽťޜ{BB{BRRZJRJJsZRBBZsscckZRBRccRRcRJZcR:BRkZ{RJRRcBkckBcZ1JRZB:BB:J!RBBZJc:BB:Bcsk֌ss{{{kcR{s{kcRsZgdalautotest-3.1.2/gdrivers/data/small_world_400pct_1band.vrt0000664000175000017500000000213113701057752022650 0ustar eveneven GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]] -1.8000000000000000e+02, 2.2500000000000001e-01, 0.0000000000000000e+00, 9.0000000000000000e+01, 0.0000000000000000e+00, -2.2500000000000001e-01 Area BAND Red small_world.tif 1 gdalautotest-3.1.2/gdrivers/data/vicar_float32_bsq.vic0000664000175000017500000000112013701057753021441 0ustar evenevenLBLSIZE=368 FORMAT='REAL' TYPE='IMAGE' BUFSIZ=20480 DIM=3 EOL=1 RECSIZE=16 ORG='BSQ' NL=3 NS=4 NB=2 N1=4 N2=3 N3=2 N4=0 NBB=0 NLB=0 HOST='X86-64-LINX' INTFMT='LOW' REALFMT='RIEEE' BHOST='VAX-VMS' BINTFMT='LOW' BREALFMT='VAX' BLTYPE='' COMPRESS='NONE' EOCI1=0 EOCI2=0 TASK='GEN' USER='vos' ??@ @0A8A@AHAAAAABBBBBBBBBBBBLBLSIZE=128 DAT_TIM='Thu Oct 17 16:38:36 2019' IVAL=1.0 SINC=0.5 LINC=10.0 BINC=100.0 MODULO=0.0 gdalautotest-3.1.2/gdrivers/data/melb-small.tif0000664000175000017500000003615113701057753020200 0ustar evenevenII*O*S   ZVx >@>@?AMO#  )#WGS 84 / UTM zone 55N|WGS 84|svq__prllrzyqmXMXr A]jr\e{y=    )kufjrtndXZVnyae{|oktd[wtZHT`]s{wlagd\dfdnqsZGMNbxq[9 0h`F"HcqU  Akhfjmge`[Wo{ilyzsngbgwlYT[bZy~xug\NHMMMZdgaI>ISboqzz~wpL( ++ :`"     ]j\ae_\ZX[v}oowxsmfgif\Zdba\v~~utp[L??JMEL^RBYNE_WRKcugO(  5   NligaX`c]f}oktsojkni\RYgjogm~~wtwhZHJOK?CXUGSRFT__TgsH*     'gdbarnanrhlqmlpxlXZansnjp{|a[WRPQRTNPSGG\idcpf#     `wgjourgmxgotoprvj]inpqflsg_db]__SC==92@LJDB3   Pkjhibaiwvvqplokfpvtojpiu~wkbelmyxk_D(   @lhjhebam|xvspnnljszlmldTfw|o^X`mofly{|VLCE)     "ekkmddlxv~}yzwrsponpx~rogleWpqf\ahsphit}o{t*      1oyvu}xt}yx{xttrvuvyywwum|`ss_bz~}qqtxtsomrWC5   6kpzzzvwvvwtsu{ysvwyxnmkxsr{y{uliihhlqxvR.   4`hkmwpqqqtsstvxsolpsyqjXwz||lpomqrou||p*   $]gaftytqutruurlecegswsokr{jrzzxquusrmu{G  9PBgb]arvvuw|{nnjhefntpddegjlp{yw~}}yutolvqzZ  Tshcj{~^HYlulL`rrsu|rdftH]}wy|vwy|}}qnsusg*   =G^v3 Qvlnv~y1$9C21hwlpt}ysuz\l~pWalkow|}yt~_3 Dsukkq NrgnxH 6hrkkmmelz|z|wxx}e;VhYf7dz}|l+    >g\bjqz  =lmflu~p!  !UiekiVOi{z}uljx~rbf_bwxxxxxxenS  )`bjqmZ 4dwxwurnL .Xnshemfcrosg_WVQbTIX\P_^hhe`WgvuxVkncuze#  !dVpn8 b|b7<<   Btwo`ds{zpvxjmWZkd`gd9Ssvlhlr{zswcqqefk{@  2dRN[mQ  ew{R   1zhppftzyrooznoxptRS{rx|yx}tdfg`[f_gy}9   Tk^\?   RrnZ  Hxlm~fqusjeey||}u{wmq_m|yz|wao|upmgkv7    ,p" *6H0  1@GU? !Zmqzsmntxxotmf\zw~~xqmwoeg}y}{vnvn*   6B8a.        6x~xzxo~f}wTrtzaulcpqlkwqyx{t{B  2s~K     .U^lt}zVrvxcnoou|q}zx}tsc: &p[   %CYh|sxsxvsrpw|soqowkY(  ;v~=    Bcot^Utwtiqyquzuxutsoi?!GUe{{xyI  =h@ 9]qvkU[lsjbpss~}}rjstw];" 8wqxsv|iyr.  dl" &UospaZfnic{Piojywppqpn`R9\DCpaizp~lh     Z@  2?Phg_fkpYnuop}ypkkljbYV\uPvwy}rdssg}o      /Yq-  =rqmozbwqpu~qscWao ">gkmu~wN       Rl^{qh# =dntqpbokp|ooe+!GaI+!/gq}wr}|  )JK$    Hz~u  ,Rcnoitpxljy|}rqf_`k\V/Oavuty}{